@netless/app-slide 0.2.6 → 0.2.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/main.es.js CHANGED
@@ -6490,14 +6490,16 @@ var Slide = function(t) {
6490
6490
  }, function(t, e, n) {
6491
6491
  n.r(e), n.d(e, "ErrorType", function() {
6492
6492
  return VE;
6493
+ }), n.d(e, "preloadResource", function() {
6494
+ return rI;
6493
6495
  }), n.d(e, "delay", function() {
6494
- return uI;
6496
+ return cI;
6495
6497
  }), n.d(e, "waitUntil", function() {
6496
- return hI;
6498
+ return dI;
6497
6499
  }), n.d(e, "SLIDE_EVENTS", function() {
6498
- return cI;
6500
+ return pI;
6499
6501
  }), n.d(e, "Slide", function() {
6500
- return mI;
6502
+ return vI;
6501
6503
  });
6502
6504
  var i = {};
6503
6505
  n.r(i), n.d(i, "ACESFilmicToneMapping", function() {
@@ -29399,10 +29401,9 @@ void main() {
29399
29401
  }
29400
29402
  class EM {
29401
29403
  constructor(t2) {
29402
- this.target = t2;
29403
- }
29404
- applyCommand(t2, e2) {
29405
- this.target.applyCommand(t2, e2);
29404
+ this.applyCommand = (t3, e2) => {
29405
+ this.target.applyCommand(t3, e2);
29406
+ }, this.target = t2, this.applyCommand = Object(l.debounce)(this.applyCommand, 100, { maxWait: 500 });
29406
29407
  }
29407
29408
  }
29408
29409
  class MM {
@@ -29473,26 +29474,26 @@ void main() {
29473
29474
  return this.object.hitArea ? this.object.hitArea : new g_(0, 0, this.object.width, this.object.height);
29474
29475
  }
29475
29476
  handleAction(t2, e2 = false) {
29476
- this.proxy && !e2 || (this.ctx.eventHub.emit(KR.hyperlinkTrigger, t2), this.execAction(t2));
29477
+ this.proxy && !e2 || (this.ctx.eventHub.emit($R.hyperlinkTrigger, t2), this.execAction(t2));
29477
29478
  }
29478
29479
  execAction(t2) {
29479
29480
  var e2;
29480
- if (this.ctx.eventHub.emit(KR.userInput), t2.action === "ppaction://hlinksldjump") {
29481
+ if (this.ctx.eventHub.emit($R.userInput), t2.action === "ppaction://hlinksldjump") {
29481
29482
  const n2 = ((e2 = t2 == null ? void 0 : t2.target) !== null && e2 !== void 0 ? e2 : "").match(/slide(\d+)\.xml/);
29482
- n2 && n2[1] && this.ctx.eventHub.emit(KR.requestGotoSlide, Number(n2[1]));
29483
+ n2 && n2[1] && this.ctx.eventHub.emit($R.requestGotoSlide, Number(n2[1]));
29483
29484
  } else if (t2.action === "ppaction://hlinkshowjump?jump=nextslide")
29484
- this.ctx.eventHub.emit(KR.requestNextSlide);
29485
+ this.ctx.eventHub.emit($R.requestNextSlide);
29485
29486
  else if (t2.action === "ppaction://hlinkshowjump?jump=previousslide")
29486
- this.ctx.eventHub.emit(KR.requestPrevSlide);
29487
+ this.ctx.eventHub.emit($R.requestPrevSlide);
29487
29488
  else if (t2.action === "ppaction://hlinkshowjump?jump=firstslide")
29488
- this.ctx.eventHub.emit(KR.requestGotoSlide, 1);
29489
+ this.ctx.eventHub.emit($R.requestGotoSlide, 1);
29489
29490
  else if (t2.action === "ppaction://hlinkshowjump?jump=lastslide")
29490
- this.ctx.eventHub.emit(KR.requestGotoSlide, -1);
29491
+ this.ctx.eventHub.emit($R.requestGotoSlide, -1);
29491
29492
  else if (t2.action === "ppaction://hlinkshowjump?jump=lastslideviewed") {
29492
29493
  const t3 = this.ctx.lastViewedIndex;
29493
- this.ctx.eventHub.emit(KR.requestGotoSlide, t3);
29494
+ this.ctx.eventHub.emit($R.requestGotoSlide, t3);
29494
29495
  } else
29495
- t2.action === "ppaction://hlinkshowjump?jump=endshow" && this.ctx.eventHub.emit(KR.requestGotoSlide, -1);
29496
+ t2.action === "ppaction://hlinkshowjump?jump=endshow" && this.ctx.eventHub.emit($R.requestGotoSlide, -1);
29496
29497
  }
29497
29498
  }
29498
29499
  class PM {
@@ -31000,7 +31001,7 @@ void main(void){
31000
31001
  return void this.ctx.logger.info("Media controller prevent seek event with paused state", this.ctx.taskId);
31001
31002
  t3.stopPropagation();
31002
31003
  const e3 = t3.offsetX / this.progress.clientWidth * this.duration;
31003
- this.medianIsEnd = false, this.ctx.mode !== "interactive" && this.jumpToTime(e3), this.ctx.mode !== "local" && this.ctx.eventHub.emit(KR.mediaSeek, { id: this.targetId, time: e3, isPlaying: this.media.isPlaying });
31004
+ this.medianIsEnd = false, this.ctx.mode !== "interactive" && this.jumpToTime(e3), this.ctx.mode !== "local" && this.ctx.eventHub.emit($R.mediaSeek, { id: this.targetId, time: e3, isPlaying: this.media.isPlaying });
31004
31005
  }, this.jumpToTime = (t3 = 0) => {
31005
31006
  const e3 = Math.floor(t3) + this.start;
31006
31007
  this.media.currentTime !== e3 && (this.media.currentTime = e3, this.changeBookmarkIndex(e3, e3 > this.media.currentTime));
@@ -31029,9 +31030,9 @@ void main(void){
31029
31030
  t3();
31030
31031
  });
31031
31032
  }, this.playMediaFromCtrl = () => {
31032
- this.ctx.isPlayerPaused() ? this.ctx.logger.info("Media controller prevent play event with paused state", this.ctx.taskId) : (this.ctx.mode !== "interactive" && this.playMedia(), this.ctx.mode !== "local" && this.ctx.eventHub.emit(KR.mediaPlay, { id: this.targetId, time: this.media.currentTime - this.start }));
31033
+ this.ctx.isPlayerPaused() ? this.ctx.logger.info("Media controller prevent play event with paused state", this.ctx.taskId) : (this.ctx.mode !== "interactive" && this.playMedia(), this.ctx.mode !== "local" && this.ctx.eventHub.emit($R.mediaPlay, { id: this.targetId, time: this.media.currentTime - this.start }));
31033
31034
  }, this.pauseMediaFromCtrl = () => {
31034
- this.ctx.isPlayerPaused() ? this.ctx.logger.info("Media controller prevent pause event with paused state", this.ctx.taskId) : (this.ctx.mode !== "interactive" && this.pauseMedia(), this.ctx.mode !== "local" && this.ctx.eventHub.emit(KR.mediaPause, { id: this.targetId, time: this.media.currentTime - this.start }));
31035
+ this.ctx.isPlayerPaused() ? this.ctx.logger.info("Media controller prevent pause event with paused state", this.ctx.taskId) : (this.ctx.mode !== "interactive" && this.pauseMedia(), this.ctx.mode !== "local" && this.ctx.eventHub.emit($R.mediaPause, { id: this.targetId, time: this.media.currentTime - this.start }));
31035
31036
  }, this.targetId = t2.targetId, this.ctx = t2.ctx, this.height = t2.height, this.width = t2.width, this.target = t2.target, this.media = t2.media, this.info = t2.info, this.shapeId = t2.shapeId, this.canvasElement = t2.canvasElement, this.getMedianContainer(), this.createMediaController(), this.info.cut && (this.start = (e2 = this.info.cut.start) !== null && e2 !== void 0 ? e2 : 0, this.end = (n2 = this.info.cut.end) !== null && n2 !== void 0 ? n2 : 0), this.info.bookmarkList && (this.bookmarkList = this.info.bookmarkList.sort((t3, e3) => t3.time - e3.time));
31036
31037
  }
31037
31038
  getMedianContainer() {
@@ -31117,52 +31118,14 @@ void main(void){
31117
31118
  this.unbindEvent(), this.playCallBackList = [], (t2 = this.container) === null || t2 === void 0 || t2.removeChild(this.mediaController);
31118
31119
  }
31119
31120
  }
31120
- var VA = n(49), WA = function(t2, e2, n2, i2) {
31121
- return new (n2 || (n2 = Promise))(function(r2, o2) {
31122
- function s2(t3) {
31123
- try {
31124
- l2(i2.next(t3));
31125
- } catch (t4) {
31126
- o2(t4);
31127
- }
31128
- }
31129
- function a2(t3) {
31130
- try {
31131
- l2(i2.throw(t3));
31132
- } catch (t4) {
31133
- o2(t4);
31134
- }
31135
- }
31136
- function l2(t3) {
31137
- var e3;
31138
- t3.done ? r2(t3.value) : (e3 = t3.value, e3 instanceof n2 ? e3 : new n2(function(t4) {
31139
- t4(e3);
31140
- })).then(s2, a2);
31141
- }
31142
- l2((i2 = i2.apply(t2, e2 || [])).next());
31143
- });
31144
- };
31145
- class XA extends a.a {
31121
+ var VA = n(49);
31122
+ class WA extends a.a {
31146
31123
  constructor(t2, e2) {
31147
- super(), this.isGlobalPause = false, this.lastTime = -1, this.howl = null, this.rctClient = null, this._isResourceExist = "unknow", this.url = t2, this.runningAudio = e2, QR.RtcAudioClazz ? (this.rctClient = new QR.RtcAudioClazz(t2), this.rctClient.on("load", () => this.emit("load")), this.rctClient.on("pause", () => this.emit("pause")), this.rctClient.on("play", () => this.emit("play"))) : (this.howl = new VA.Howl({ src: [t2] }), this.howl.on("load", () => this.emit("load")), this.howl.on("pause", () => this.emit("pause")), this.howl.on("play", () => this.emit("play"))), this.detectResourceExist();
31124
+ super(), this.isGlobalPause = false, this.lastTime = -1, this.howl = null, this.rctClient = null, this.url = t2, this.runningAudio = e2, KR.RtcAudioClazz ? (this.rctClient = new KR.RtcAudioClazz(t2), this.rctClient.on("load", () => this.emit("load")), this.rctClient.on("pause", () => this.emit("pause")), this.rctClient.on("play", () => this.emit("play"))) : (this.howl = new VA.Howl({ src: [t2] }), this.howl.on("load", () => this.emit("load")), this.howl.on("pause", () => this.emit("pause")), this.howl.on("play", () => this.emit("play")));
31148
31125
  }
31149
31126
  startTimeChangeEmit() {
31150
31127
  this.currentTime !== this.lastTime && (this.lastTime = this.currentTime, this.emit("timeupdate")), this.isEnded || setTimeout(() => this.startTimeChangeEmit(), 300);
31151
31128
  }
31152
- detectResourceExist() {
31153
- return new Promise((t2) => {
31154
- fetch(this.url, { method: "HEAD" }).then((e2) => {
31155
- this._isResourceExist = e2.ok ? "true" : "false", t2(e2.ok);
31156
- }).catch(() => {
31157
- this._isResourceExist = "false", t2(false);
31158
- });
31159
- });
31160
- }
31161
- isResourceExist() {
31162
- return WA(this, void 0, void 0, function* () {
31163
- return this._isResourceExist !== "unknow" ? this._isResourceExist === "true" : this.detectResourceExist();
31164
- });
31165
- }
31166
31129
  play() {
31167
31130
  var t2, e2, n2;
31168
31131
  this.runningAudio.has(this.url) && ((t2 = this.runningAudio.get(this.url)) === null || t2 === void 0 || t2.stop(), this.runningAudio.delete(this.url)), this.lastTime = -1, (e2 = this.howl) === null || e2 === void 0 || e2.play(), (n2 = this.rctClient) === null || n2 === void 0 || n2.play(), this.startTimeChangeEmit(), this.runningAudio.set(this.url, this);
@@ -31204,7 +31167,7 @@ void main(void){
31204
31167
  this.rctClient ? this.rctClient.volume(t2) : this.howl && this.howl.volume(t2);
31205
31168
  }
31206
31169
  }
31207
- var qA = function(t2, e2, n2, i2) {
31170
+ var XA = function(t2, e2, n2, i2) {
31208
31171
  return new (n2 || (n2 = Promise))(function(r2, o2) {
31209
31172
  function s2(t3) {
31210
31173
  try {
@@ -31229,16 +31192,16 @@ void main(void){
31229
31192
  l2((i2 = i2.apply(t2, e2 || [])).next());
31230
31193
  });
31231
31194
  };
31232
- class YA extends a.a {
31195
+ class qA extends a.a {
31233
31196
  constructor(t2) {
31234
31197
  var e2, n2;
31235
31198
  super(), this.type = "video", this.sprite = new Ow(), this.isPlaying = false, this.isGlobalPause = false, this.updateVolume = (t3) => {
31236
- QR.RtcAudioClazz ? this.rtcAudio.volume(t3) : this.videoResource.source && (this.videoResource.source.volume = t3);
31199
+ KR.RtcAudioClazz ? this.rtcAudio.volume(t3) : this.videoResource.source && (this.videoResource.source.volume = t3);
31237
31200
  }, this.id = t2.id, this.start = (e2 = t2.video.cut) === null || e2 === void 0 ? void 0 : e2.start, this.end = (n2 = t2.video.cut) === null || n2 === void 0 ? void 0 : n2.end, this.container = t2.container, this.ctx = t2.ctx, this.ctx.medias[this.id] = this;
31238
31201
  let i2 = t2.video.src;
31239
31202
  this.ctx.loaderDelegate && (i2 = this.ctx.loaderDelegate.redirectMedia(i2), this.ctx.logger.info(`redirect media url from ${t2.video.src} to ${i2} by delegate.`, t2.ctx.taskId)), this.videoResource = new Iy(i2, { autoLoad: true, autoPlay: false, updateFPS: 30, crossorigin: true });
31240
31203
  let r2 = t2.video.src.replace(/4$/, "3");
31241
- this.ctx.loaderDelegate && (r2 = this.ctx.loaderDelegate.redirectMedia(r2), this.ctx.logger.info(`redirect media url from ${t2.video.src.replace(/4$/, "3")} to ${r2} by delegate.`, t2.ctx.taskId)), this.rtcAudio = new XA(r2, t2.ctx.runningAudio);
31204
+ this.ctx.loaderDelegate && (r2 = this.ctx.loaderDelegate.redirectMedia(r2), this.ctx.logger.info(`redirect media url from ${t2.video.src.replace(/4$/, "3")} to ${r2} by delegate.`, t2.ctx.taskId)), this.rtcAudio = new WA(r2, t2.ctx.runningAudio);
31242
31205
  const { video: o2, width: s2, height: a2, target: l2 } = t2;
31243
31206
  this.controller = new jA({ targetId: t2.id, shapeId: t2.shapeId, ctx: t2.ctx, width: s2, height: a2, target: l2, media: this, info: o2, canvasElement: t2.canvasElement }), this.controller.addPlayCallBack(() => {
31244
31207
  this.sprite.width = s2, this.sprite.height = a2, this.ctx.clock.setTimeout(() => {
@@ -31261,7 +31224,7 @@ void main(void){
31261
31224
  return (e2 = (t2 = this.videoResource.source) === null || t2 === void 0 ? void 0 : t2.currentTime) !== null && e2 !== void 0 ? e2 : 0;
31262
31225
  }
31263
31226
  set currentTime(t2) {
31264
- QR.RtcAudioClazz && (this.rtcAudio.currentTime = t2), this.videoResource.source && (this.videoResource.source.currentTime = t2);
31227
+ KR.RtcAudioClazz && (this.rtcAudio.currentTime = t2), this.videoResource.source && (this.videoResource.source.currentTime = t2);
31265
31228
  }
31266
31229
  get paused() {
31267
31230
  var t2, e2;
@@ -31283,19 +31246,16 @@ void main(void){
31283
31246
  }
31284
31247
  play() {
31285
31248
  var t2;
31286
- return qA(this, void 0, void 0, function* () {
31287
- this.isPlaying = true, yield this.load(), yield this.ctx.clock.waitUntil(() => {
31249
+ return XA(this, void 0, void 0, function* () {
31250
+ this.isPlaying = true, this.updateVolume(this.ctx.volumeAdjuster.volume), yield this.load(), yield this.ctx.clock.waitUntil(() => {
31288
31251
  const t3 = this.videoResource.source;
31289
31252
  return !!(t3 && t3.videoWidth > 0);
31290
31253
  }, 3e3);
31291
31254
  const e2 = this.videoResource.source;
31292
- if (e2 && e2.videoWidth <= 0)
31293
- return;
31294
- const n2 = yield this.rtcAudio.isResourceExist();
31295
- QR.RtcAudioClazz && n2 ? (this.videoResource.source.volume = 0, this.rtcAudio.once("play", () => {
31255
+ e2 && e2.videoWidth <= 0 || (KR.RtcAudioClazz ? (this.videoResource.source.volume = 0, this.rtcAudio.once("play", () => {
31296
31256
  var t3;
31297
31257
  (t3 = this.videoResource.source) === null || t3 === void 0 || t3.play();
31298
- }), this.rtcAudio.play()) : yield (t2 = this.videoResource.source) === null || t2 === void 0 ? void 0 : t2.play();
31258
+ }), this.rtcAudio.play()) : yield (t2 = this.videoResource.source) === null || t2 === void 0 ? void 0 : t2.play());
31299
31259
  });
31300
31260
  }
31301
31261
  load() {
@@ -31303,7 +31263,7 @@ void main(void){
31303
31263
  }
31304
31264
  pause() {
31305
31265
  var t2;
31306
- this.isPlaying = false, QR.RtcAudioClazz ? (this.rtcAudio.once("pause", () => {
31266
+ this.isPlaying = false, KR.RtcAudioClazz ? (this.rtcAudio.once("pause", () => {
31307
31267
  var t3;
31308
31268
  (t3 = this.videoResource.source) === null || t3 === void 0 || t3.pause();
31309
31269
  }), this.rtcAudio.pause()) : (t2 = this.videoResource.source) === null || t2 === void 0 || t2.pause();
@@ -31325,10 +31285,10 @@ void main(void){
31325
31285
  }
31326
31286
  destroy() {
31327
31287
  var t2;
31328
- this.sprite.interactive = false, this.sprite.destroy({ texture: true, baseTexture: true }), (t2 = this.videoResource) === null || t2 === void 0 || t2.destroy(), this.rtcAudio.destroy(), this.controller.destroy(), this.ctx.activeMedia.delete(this);
31288
+ this.ctx.volumeAdjuster.removeListener("update", this.updateVolume), this.sprite.interactive = false, this.sprite.destroy({ texture: true, baseTexture: true }), (t2 = this.videoResource) === null || t2 === void 0 || t2.destroy(), this.rtcAudio.destroy(), this.controller.destroy(), this.ctx.activeMedia.delete(this);
31329
31289
  }
31330
31290
  }
31331
- var ZA = function(t2, e2, n2, i2) {
31291
+ var YA = function(t2, e2, n2, i2) {
31332
31292
  return new (n2 || (n2 = Promise))(function(r2, o2) {
31333
31293
  function s2(t3) {
31334
31294
  try {
@@ -31353,13 +31313,13 @@ void main(void){
31353
31313
  l2((i2 = i2.apply(t2, e2 || [])).next());
31354
31314
  });
31355
31315
  };
31356
- class JA extends a.a {
31316
+ class ZA extends a.a {
31357
31317
  constructor(t2) {
31358
31318
  super(), this.type = "audio", this.isPlaying = false, this.isGlobalPause = false, this.updateVolume = (t3) => {
31359
31319
  this.audioPlayer.volume(t3);
31360
31320
  }, this.id = t2.id;
31361
31321
  let e2 = t2.audio.src;
31362
- t2.ctx.loaderDelegate && (e2 = t2.ctx.loaderDelegate.redirectMedia(e2), t2.ctx.logger.info(`redirect media url from ${t2.audio.src} to ${e2} by delegate.`, t2.ctx.taskId)), this.audioPlayer = new XA(e2, t2.ctx.runningAudio), t2.audio.cut && (this.start = t2.audio.cut.start, this.end = t2.audio.cut.end), this.ctx = t2.ctx, this.ctx.medias[this.id] = this;
31322
+ t2.ctx.loaderDelegate && (e2 = t2.ctx.loaderDelegate.redirectMedia(e2), t2.ctx.logger.info(`redirect media url from ${t2.audio.src} to ${e2} by delegate.`, t2.ctx.taskId)), this.audioPlayer = new WA(e2, t2.ctx.runningAudio), t2.audio.cut && (this.start = t2.audio.cut.start, this.end = t2.audio.cut.end), this.ctx = t2.ctx, this.ctx.medias[this.id] = this;
31363
31323
  const { width: n2, height: i2, target: r2 } = t2;
31364
31324
  this.controller = new jA({ targetId: t2.id, shapeId: t2.shapeId, ctx: t2.ctx, height: i2, width: n2, target: r2, media: this, info: t2.audio, canvasElement: t2.canvasElement }), this.audioPlayer.on("load", () => this.emit("durationchange")), this.audioPlayer.on("timeupdate", () => this.emit("timeupdate")), this.audioPlayer.on("pause", () => this.emit("pause")), this.audioPlayer.on("play", () => this.emit("play")), this.ctx.activeMedia.add(this), this.ctx.volumeAdjuster.on("update", this.updateVolume);
31365
31325
  }
@@ -31391,8 +31351,8 @@ void main(void){
31391
31351
  this.controller.hide();
31392
31352
  }
31393
31353
  play() {
31394
- return ZA(this, void 0, void 0, function* () {
31395
- this.ctx.isPlayerPaused() ? this.ctx.logger.info("Audio player prevent play event with paused state", this.ctx.taskId) : (this.isPlaying = true, this.audioPlayer.play());
31354
+ return YA(this, void 0, void 0, function* () {
31355
+ this.ctx.isPlayerPaused() ? this.ctx.logger.info("Audio player prevent play event with paused state", this.ctx.taskId) : (this.updateVolume(this.ctx.volumeAdjuster.volume), this.isPlaying = true, this.audioPlayer.play());
31396
31356
  });
31397
31357
  }
31398
31358
  pause() {
@@ -31417,7 +31377,7 @@ void main(void){
31417
31377
  this.ctx.volumeAdjuster.removeListener("update", this.updateVolume), this.audioPlayer.pause(), this.controller.destroy(), this.ctx.activeMedia.delete(this);
31418
31378
  }
31419
31379
  }
31420
- class $A extends GA {
31380
+ class JA extends GA {
31421
31381
  constructor(t2, e2, n2, i2) {
31422
31382
  super(Object.assign(Object.assign({}, t2), { type: "Shape", useBgFill: false, textRotateWithShape: true, isPicture: true }), e2, n2, i2), this.isInteractiveOutside = false, this.cmd = new EM(this), this.media = t2 == null ? void 0 : t2.media, this.picFill = new TA(this.ctx, t2.picFill, t2.width, t2.height, { useFilter: false, useSlideBackgroundFill: false });
31423
31383
  }
@@ -31440,7 +31400,7 @@ void main(void){
31440
31400
  const s2 = (t2 = this.backgroundGraphics) === null || t2 === void 0 ? void 0 : t2.getClonedDisplayObject();
31441
31401
  ((e2 = this.backgroundGraphics) === null || e2 === void 0 ? void 0 : e2.isNeedMask(o2.width, o2.height)) && s2 && (o2.mask = s2, this.container.addChild(s2)), o2.width = this.designWidth, o2.height = this.designHeight, o2 instanceof jE && this.ctx.slideScopeEventHub.once("slide-render", (t3) => {
31442
31402
  this.ctx.slideIndex === t3 && o2.play();
31443
- }), this.container.addChild(o2), ((n2 = this.media) === null || n2 === void 0 ? void 0 : n2.type) === "video" && this.media.src ? (this.mediaPlayer = new YA({ id: this.json.id + "-video", shapeId: this.json.id, ctx: this.ctx, video: this.media, height: this.designHeight, width: this.designWidth, target: o2, container: this.container, canvasElement: this.ctx.view }), (i2 = this.mediaPlayer) === null || i2 === void 0 || i2.sprite) : ((r2 = this.media) === null || r2 === void 0 ? void 0 : r2.type) === "audio" && this.media.src && (this.mediaPlayer = new JA({ id: this.json.id + "-audio", shapeId: this.json.id, ctx: this.ctx, audio: this.media, height: this.designHeight, width: this.designWidth, target: o2, canvasElement: this.ctx.view })), this.mediaPlayer && (this.isInteractiveOutside = this.container.interactive, this.container.interactive = true, this.container.on("mouseover", () => {
31403
+ }), this.container.addChild(o2), ((n2 = this.media) === null || n2 === void 0 ? void 0 : n2.type) === "video" && this.media.src ? (this.mediaPlayer = new qA({ id: this.json.id + "-video", shapeId: this.json.id, ctx: this.ctx, video: this.media, height: this.designHeight, width: this.designWidth, target: o2, container: this.container, canvasElement: this.ctx.view }), (i2 = this.mediaPlayer) === null || i2 === void 0 || i2.sprite) : ((r2 = this.media) === null || r2 === void 0 ? void 0 : r2.type) === "audio" && this.media.src && (this.mediaPlayer = new ZA({ id: this.json.id + "-audio", shapeId: this.json.id, ctx: this.ctx, audio: this.media, height: this.designHeight, width: this.designWidth, target: o2, canvasElement: this.ctx.view })), this.mediaPlayer && (this.isInteractiveOutside = this.container.interactive, this.container.interactive = true, this.container.on("mouseover", () => {
31444
31404
  this.mediaPlayer.showController();
31445
31405
  }), this.container.on("mouseout", () => {
31446
31406
  this.mediaPlayer.hideController();
@@ -31467,7 +31427,7 @@ void main(void){
31467
31427
  this.mediaPlayer && (this.picFill.displayObject && !this.isInteractiveOutside && (this.container.interactive = false), this.mediaPlayer.destroy(), this.mediaPlayer = void 0), this.picFill.destroy();
31468
31428
  }
31469
31429
  }
31470
- var KA = function(t2, e2, n2, i2) {
31430
+ var $A = function(t2, e2, n2, i2) {
31471
31431
  return new (n2 || (n2 = Promise))(function(r2, o2) {
31472
31432
  function s2(t3) {
31473
31433
  try {
@@ -31492,7 +31452,7 @@ void main(void){
31492
31452
  l2((i2 = i2.apply(t2, e2 || [])).next());
31493
31453
  });
31494
31454
  };
31495
- class QA extends PM {
31455
+ class KA extends PM {
31496
31456
  constructor(t2, e2, n2, i2, r2) {
31497
31457
  super(t2, e2, n2), this.children = [], this.cacheSprite = new Ow(), this.cacheContainer = new ty(), this.json = t2, this.json.fillStyle && this.json.fillStyle.fillType === "groupFill" && i2 && (this.json.fillStyle = i2), this.container.name = t2.id, this.cacheContainer.name = t2.id + "-cache-container", this.ctx.timingTargets.addTarget(t2.id, this), this.updateTransform(this.json), this.fillObject = new TA(this.ctx, t2.fillStyle, t2.width, t2.height, { useFilter: false, useSlideBackgroundFill: false }), this.createChildren(r2);
31498
31458
  }
@@ -31500,10 +31460,10 @@ void main(void){
31500
31460
  var e2, n2, i2, r2;
31501
31461
  const o2 = { x: (n2 = (e2 = this.json.position) === null || e2 === void 0 ? void 0 : e2.x) !== null && n2 !== void 0 ? n2 : 0, y: (r2 = (i2 = this.json.position) === null || i2 === void 0 ? void 0 : i2.y) !== null && r2 !== void 0 ? r2 : 0 };
31502
31462
  for (let e3 = 0, n3 = this.json.children.length; e3 < n3; e3++)
31503
- t2.addSubMTask(() => KA(this, void 0, void 0, function* () {
31463
+ t2.addSubMTask(() => $A(this, void 0, void 0, function* () {
31504
31464
  const n4 = this.json.children[e3];
31505
31465
  let i3 = null;
31506
- (n4 == null ? void 0 : n4.type) === "Shape" ? i3 = new GA(n4, this.ctx, o2, this.json.fillStyle) : (n4 == null ? void 0 : n4.type) === "Picture" ? i3 = new $A(n4, this.ctx, o2, this.json.fillStyle) : (n4 == null ? void 0 : n4.type) === "Container" && (i3 = new QA(n4, this.ctx, o2, this.json.fillStyle, t2)), i3 && this.children.push(i3);
31466
+ (n4 == null ? void 0 : n4.type) === "Shape" ? i3 = new GA(n4, this.ctx, o2, this.json.fillStyle) : (n4 == null ? void 0 : n4.type) === "Picture" ? i3 = new JA(n4, this.ctx, o2, this.json.fillStyle) : (n4 == null ? void 0 : n4.type) === "Container" && (i3 = new KA(n4, this.ctx, o2, this.json.fillStyle, t2)), i3 && this.children.push(i3);
31507
31467
  }), "@ContainerImpl[child.init]");
31508
31468
  }
31509
31469
  get interactiveContainer() {
@@ -31514,7 +31474,7 @@ void main(void){
31514
31474
  }
31515
31475
  preRender(t2) {
31516
31476
  for (const e2 of this.children)
31517
- t2.addSubMTask(() => KA(this, void 0, void 0, function* () {
31477
+ t2.addSubMTask(() => $A(this, void 0, void 0, function* () {
31518
31478
  e2.preRender(t2);
31519
31479
  }), "@ContainerImpl[child.preRender]");
31520
31480
  }
@@ -31530,13 +31490,13 @@ void main(void){
31530
31490
  render(t2) {
31531
31491
  let e2 = new ty();
31532
31492
  for (const n2 of this.children)
31533
- n2.render(t2), t2.addSubMTask(() => KA(this, void 0, void 0, function* () {
31493
+ n2.render(t2), t2.addSubMTask(() => $A(this, void 0, void 0, function* () {
31534
31494
  var t3;
31535
31495
  n2.isStatic() && !this.json.cacheAsTexture && n2.json.width < 4096 && n2.json.height < 4096 ? e2.addChild(n2.renderContainer) : (e2.children.length > 0 && (e2.cacheAsBitmap = true, this.cacheContainer.addChild(e2), e2 = new ty()), this.cacheContainer.addChild(n2.renderContainer)), (n2.json.hlinkHover || n2.json.hlinkClick) && ((t3 = n2.hyperlink) === null || t3 === void 0 || t3.addProxy(this.container));
31536
31496
  }), "@ContainerImpl[child.render]");
31537
- t2.addMTask(() => KA(this, void 0, void 0, function* () {
31497
+ t2.addSubMTask(() => $A(this, void 0, void 0, function* () {
31538
31498
  e2.children.length > 0 && (e2.cacheAsBitmap = true, this.cacheContainer.addChild(e2));
31539
- }), "@ContainerImpl[child.render]"), t2.addSubMTask(() => KA(this, void 0, void 0, function* () {
31499
+ }), "@ContainerImpl[child.render]"), t2.addSubMTask(() => $A(this, void 0, void 0, function* () {
31540
31500
  this.container.addChild(this.cacheContainer), this.json.cacheAsTexture && (!function(t3, e3, n2, i2, r2) {
31541
31501
  const o2 = t3.getBounds(), s2 = Math.min(o2.x, e3.x, o2.x + o2.width, e3.x + e3.width), a2 = Math.max(o2.x, e3.x, o2.x + o2.width, e3.x + e3.width), l2 = Math.min(o2.y, e3.y, o2.y + o2.height, e3.y + e3.height), u2 = a2 - s2, h2 = Math.max(o2.y, e3.y, o2.y + o2.height, e3.y + e3.height) - l2;
31542
31502
  let c2 = KE(e3.x - o2.x), d2 = KE(e3.y - o2.y);
@@ -31559,7 +31519,7 @@ void main(void){
31559
31519
  this.cacheSprite && this.cacheSprite.destroy({ texture: true }), this.children.forEach((t2) => t2.destroy()), this.container.destroy({ children: true, texture: true, baseTexture: true }), this.cacheContainer.destroy({ children: true, texture: true, baseTexture: true });
31560
31520
  }
31561
31521
  }
31562
- class tR extends a.a {
31522
+ class QA extends a.a {
31563
31523
  constructor(t2, e2, n2, i2) {
31564
31524
  super(), this.cond = {}, this.timeoutIds = [], this.condHandle = (t3, e3 = {}) => {
31565
31525
  if (t3)
@@ -31606,7 +31566,7 @@ void main(void){
31606
31566
  }), this.timeoutIds.forEach((t2) => this.ctx.clock.clearTimeout(t2));
31607
31567
  }
31608
31568
  }
31609
- class eR extends a.a {
31569
+ class tR extends a.a {
31610
31570
  constructor(t2) {
31611
31571
  super(), this.isTimeNodeEndSync = false, this.interactiveListeners = [], this.runtimeNodeEventHub = new a.a(), this._currentSeqIndex = 0, this._currentSeqState = "idle", this.isForward = true, this.autoPlay = false, this.handlePrev = (t3 = false) => {
31612
31572
  var e3, n3, i3, r3, o3, s3;
@@ -31616,16 +31576,16 @@ void main(void){
31616
31576
  this.isTimeNodeEndSync && (this.isTimeNodeEndSync = false, this.currentSeqState = "idle", this.currentSeqIndex = 0), this.hasNext() || !this.isMainSeq ? this.currentSeqState === "idle" ? (e3 = this.commonTimeNode.children[this.currentSeqIndex]) === null || e3 === void 0 || e3.commonTimeNode.startTimeNodeForce() : this.currentSeqState === "running" ? ((n3 = this.commonTimeNode.children[this.currentSeqIndex]) === null || n3 === void 0 || n3.commonTimeNode.seekToEnd(false, true), this.currentSeqState = "end", this.incrSeqIndex(), (i3 = this.commonTimeNode.children[this.currentSeqIndex]) === null || i3 === void 0 || i3.commonTimeNode.startTimeNodeForce()) : this.currentSeqState === "end" && (this.incrSeqIndex(), (r3 = this.commonTimeNode.children[this.currentSeqIndex]) === null || r3 === void 0 || r3.commonTimeNode.startTimeNodeForce()) : this.globalEventHub.emit("c:next slide", t3);
31617
31577
  };
31618
31578
  const { json: e2, iterateType: n2, isIterate: i2, isSub: r2, parent: o2, ctx: s2, eventHub: l2, iterateIndex: u2, iterateId: h2, isInInteractiveSeq: c2 } = t2;
31619
- this.isMainSeq = e2.ctn.nodeType === "mainSeq", this.isInteractiveSeq = e2.ctn.nodeType === "interactiveSeq", this.id = e2.ctn.id, this.isIterate = i2, this.json = e2, this.ctx = s2, this.globalEventHub = l2, this.commonTimeNode = new PR({ json: e2.ctn, isSub: r2, eventHubs: { global: l2, runtime: this.runtimeNodeEventHub }, ctx: s2, parent: o2, isIterate: false, iterateType: n2, iterateIndex: u2, iterateId: h2, isInInteractiveSeq: c2 || this.isInteractiveSeq }), this.bindShapeEvent(), this.nextConds = new tR("mainSeq", e2.nextCondLst, { global: l2, runtime: this.runtimeNodeEventHub }, this.ctx), this.prevConds = new tR("mainSeq", e2.preCondLst, { global: l2, runtime: this.runtimeNodeEventHub }, this.ctx), this.commonTimeNode.on("timeNodeRestart", () => {
31579
+ this.isMainSeq = e2.ctn.nodeType === "mainSeq", this.isInteractiveSeq = e2.ctn.nodeType === "interactiveSeq", this.id = e2.ctn.id, this.isIterate = i2, this.json = e2, this.ctx = s2, this.globalEventHub = l2, this.commonTimeNode = new RR({ json: e2.ctn, isSub: r2, eventHubs: { global: l2, runtime: this.runtimeNodeEventHub }, ctx: s2, parent: o2, isIterate: false, iterateType: n2, iterateIndex: u2, iterateId: h2, isInInteractiveSeq: c2 || this.isInteractiveSeq }), this.bindShapeEvent(), this.nextConds = new QA("mainSeq", e2.nextCondLst, { global: l2, runtime: this.runtimeNodeEventHub }, this.ctx), this.prevConds = new QA("mainSeq", e2.preCondLst, { global: l2, runtime: this.runtimeNodeEventHub }, this.ctx), this.commonTimeNode.on("timeNodeRestart", () => {
31620
31580
  this.currentSeqIndex = 0, this.currentSeqState = "idle";
31621
31581
  }), this.commonTimeNode.on("childTimeNodeStart", (t3) => {
31622
31582
  const e3 = this.commonTimeNode.children.findIndex((e4) => e4.commonTimeNode.uuid === t3.id);
31623
- e3 >= 0 && (this.currentSeqIndex = e3), this.currentSeqState = "running", this.isMainSeq && this.ctx.eventHub.emit(KR.mainSeqStepStart, e3);
31583
+ e3 >= 0 && (this.currentSeqIndex = e3), this.currentSeqState = "running", this.isMainSeq && this.ctx.eventHub.emit($R.mainSeqStepStart, e3);
31624
31584
  }), this.commonTimeNode.on("childTimeNodeEnd", (t3) => {
31625
31585
  const e3 = this.commonTimeNode.children.findIndex((e4) => e4.commonTimeNode.uuid === t3.id);
31626
31586
  e3 >= 0 && (this.currentSeqIndex = e3), this.currentSeqState = "end", this.autoPlay && this.ctx.clock.setTimeout(() => {
31627
31587
  this.handleNext();
31628
- }), this.isMainSeq && this.ctx.eventHub.emit(KR.mainSeqStepEnd, e3);
31588
+ }), this.isMainSeq && this.ctx.eventHub.emit($R.mainSeqStepEnd, e3);
31629
31589
  }), this.commonTimeNode.on("timeNodeEndSync", () => {
31630
31590
  this.isTimeNodeEndSync = true, this.commonTimeNode.resetForRepeat();
31631
31591
  }), this.commonTimeNode.on("timeNodeDestroy", () => {
@@ -31642,13 +31602,13 @@ void main(void){
31642
31602
  return this._currentSeqIndex;
31643
31603
  }
31644
31604
  set currentSeqIndex(t2) {
31645
- this._currentSeqIndex = t2, this.isMainSeq ? this.ctx.eventHub.emit(KR.mainSeqStepChange, t2) : this.isInteractiveSeq && this.ctx.eventHub.emit(KR.interactiveSeqStateChange, { id: this.json.ctn.id, state: { step: t2, state: this._currentSeqState } });
31605
+ this._currentSeqIndex = t2, this.isMainSeq ? this.ctx.eventHub.emit($R.mainSeqStepChange, t2) : this.isInteractiveSeq && this.ctx.eventHub.emit($R.interactiveSeqStateChange, { id: this.json.ctn.id, state: { step: t2, state: this._currentSeqState } });
31646
31606
  }
31647
31607
  get currentSeqState() {
31648
31608
  return this._currentSeqState;
31649
31609
  }
31650
31610
  set currentSeqState(t2) {
31651
- this._currentSeqState = t2, this.isMainSeq ? this.ctx.eventHub.emit(KR.mainSeqStateChange, t2) : this.isInteractiveSeq && this.ctx.eventHub.emit(KR.interactiveSeqStateChange, { id: this.json.ctn.id, state: { step: this._currentSeqIndex, state: t2 } });
31611
+ this._currentSeqState = t2, this.isMainSeq ? this.ctx.eventHub.emit($R.mainSeqStateChange, t2) : this.isInteractiveSeq && this.ctx.eventHub.emit($R.interactiveSeqStateChange, { id: this.json.ctn.id, state: { step: this._currentSeqIndex, state: t2 } });
31652
31612
  }
31653
31613
  get stepLength() {
31654
31614
  return this.commonTimeNode.children.length;
@@ -31683,9 +31643,9 @@ void main(void){
31683
31643
  if (t3) {
31684
31644
  t3.interactiveContainer.interactive = true, t3.interactiveContainer.cursor = "pointer";
31685
31645
  const n2 = () => {
31686
- this.ctx.eventHub.emit(KR.userInput);
31646
+ this.ctx.eventHub.emit($R.userInput);
31687
31647
  const t4 = `shape ${e2} onClick`, { mode: n3 } = this.ctx;
31688
- n3 !== "interactive" && n3 !== "sync" || this.ctx.eventHub.emit(KR.interactiveSeqAction, { action: t4, seqId: this.json.ctn.id }), n3 !== "sync" && n3 !== "local" || this.globalEventHub.emit(t4);
31648
+ n3 !== "interactive" && n3 !== "sync" || this.ctx.eventHub.emit($R.interactiveSeqAction, { action: t4, seqId: this.json.ctn.id }), n3 !== "sync" && n3 !== "local" || this.globalEventHub.emit(t4);
31689
31649
  };
31690
31650
  t3.interactiveContainer.on("pointerdown", n2), this.interactiveListeners.push([t3, n2]);
31691
31651
  }
@@ -31706,7 +31666,7 @@ void main(void){
31706
31666
  this.currentSeqIndex = n2, this.currentSeqState = e2 === "start" ? "idle" : "end";
31707
31667
  }
31708
31668
  }
31709
- function nR(t2, e2, n2) {
31669
+ function eR(t2, e2, n2) {
31710
31670
  const i2 = e2.split(".");
31711
31671
  i2.reduce((r2, o2, s2) => {
31712
31672
  if (r2)
@@ -31714,7 +31674,7 @@ void main(void){
31714
31674
  console.warn(`${t2} not support ${e2}`);
31715
31675
  }, t2);
31716
31676
  }
31717
- function iR(t2, e2) {
31677
+ function nR(t2, e2) {
31718
31678
  if (!e2)
31719
31679
  return null;
31720
31680
  return e2.split(".").reduce((n2, i2) => {
@@ -31723,7 +31683,7 @@ void main(void){
31723
31683
  console.warn(`${t2} not support ${e2}`);
31724
31684
  }, t2);
31725
31685
  }
31726
- class rR {
31686
+ class iR {
31727
31687
  constructor(t2) {
31728
31688
  this.timingTarget = null, this.runtimeNodeEventHub = new a.a(), this.basicOnTimeNodeEnd = () => {
31729
31689
  if (this.isConflict) {
@@ -31741,29 +31701,29 @@ void main(void){
31741
31701
  }
31742
31702
  };
31743
31703
  const { isIterate: e2, isSub: n2, json: i2, ctx: r2, parent: o2, eventHub: s2, iterateType: l2, iterateIndex: u2, iterateId: h2, isInInteractiveSeq: c2 } = t2;
31744
- this.json = i2, this.id = i2.cBhvr.ctn.id, this.ctx = r2, this.globalEventHub = s2, this.commonTimeNode = new PR({ json: i2.cBhvr.ctn, isSub: n2, eventHubs: { global: s2, runtime: this.runtimeNodeEventHub }, ctx: r2, parent: o2, isIterate: e2, iterateType: l2, iterateIndex: u2, iterateId: h2, isInInteractiveSeq: c2 }), this.timingTarget = this.ctx.timingTargets.getTarget(i2.cBhvr.target, e2, { type: l2, index: u2, id: h2 }), this.commonTimeNode.on("seekToStart", () => this.onSeekToStart()), this.commonTimeNode.on("seekToEnd", () => this.onSeekToEnd()), this.commonTimeNode.on("timelineStart", this.basicOnTimeLineStart), this.commonTimeNode.on("timeNodeEnd", this.basicOnTimeNodeEnd);
31704
+ this.json = i2, this.id = i2.cBhvr.ctn.id, this.ctx = r2, this.globalEventHub = s2, this.commonTimeNode = new RR({ json: i2.cBhvr.ctn, isSub: n2, eventHubs: { global: s2, runtime: this.runtimeNodeEventHub }, ctx: r2, parent: o2, isIterate: e2, iterateType: l2, iterateIndex: u2, iterateId: h2, isInInteractiveSeq: c2 }), this.timingTarget = this.ctx.timingTargets.getTarget(i2.cBhvr.target, e2, { type: l2, index: u2, id: h2 }), this.commonTimeNode.on("seekToStart", () => this.onSeekToStart()), this.commonTimeNode.on("seekToEnd", () => this.onSeekToEnd()), this.commonTimeNode.on("timelineStart", this.basicOnTimeLineStart), this.commonTimeNode.on("timeNodeEnd", this.basicOnTimeNodeEnd);
31745
31705
  }
31746
31706
  getTargetId(t2) {
31747
31707
  let e2 = t2.id;
31748
31708
  return t2.type === "shape" && t2.txEl && (e2 = `${e2}-txEl-${t2.txEl.range[0]}`), this.commonTimeNode.isIterate && (e2 = `${e2}-iterate-${this.commonTimeNode.iterateIndex}`), e2;
31749
31709
  }
31750
31710
  }
31751
- class oR extends rR {
31711
+ class rR extends iR {
31752
31712
  constructor(t2) {
31753
31713
  super(t2), this.isConflict = false, this.activeWhenConflict = "next", this.startVal = null, this.updateStartValue = () => {
31754
- this.timingTarget && (this.startVal = iR(this.timingTarget, this.json.cBhvr.attrList[0]));
31714
+ this.timingTarget && (this.startVal = nR(this.timingTarget, this.json.cBhvr.attrList[0]));
31755
31715
  }, this.onSeekToStart = () => {
31756
31716
  const t3 = this.json.cBhvr.attrList[0];
31757
- this.startVal !== null && this.timingTarget && nR(this.timingTarget, t3, this.startVal);
31717
+ this.startVal !== null && this.timingTarget && eR(this.timingTarget, t3, this.startVal);
31758
31718
  }, this.onSeekToEnd = () => {
31759
31719
  const t3 = this.json.cBhvr.attrList[0], e2 = this.json.cBhvr.to || this.json.to;
31760
- e2 && this.timingTarget && nR(this.timingTarget, t3, e2);
31720
+ e2 && this.timingTarget && eR(this.timingTarget, t3, e2);
31761
31721
  }, this.commonTimeNode.on("timeNodeStart", this.updateStartValue), this.commonTimeNode.on("timeNodeCreate", this.updateStartValue), this.commonTimeNode.on("timeUpdate", ({ duration: t3, delta: e2 }) => {
31762
31722
  if (e2 / t3 >= 1) {
31763
31723
  const t4 = this.json.cBhvr.attrList[0];
31764
31724
  this.json.cBhvr.attrList.length > 1 && console.warn("this.json.cBhvr.attrList.length > 0");
31765
31725
  const e3 = this.json.cBhvr.to || this.json.to;
31766
- e3 && this.timingTarget && nR(this.timingTarget, t4, e3);
31726
+ e3 && this.timingTarget && eR(this.timingTarget, t4, e3);
31767
31727
  }
31768
31728
  });
31769
31729
  }
@@ -31771,7 +31731,7 @@ void main(void){
31771
31731
  return this.json.cBhvr.attrList[0];
31772
31732
  }
31773
31733
  }
31774
- var sR = function(t2, e2, n2, i2) {
31734
+ var oR = function(t2, e2, n2, i2) {
31775
31735
  var r2, o2 = arguments.length, s2 = o2 < 3 ? e2 : i2 === null ? i2 = Object.getOwnPropertyDescriptor(e2, n2) : i2;
31776
31736
  if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
31777
31737
  s2 = Reflect.decorate(t2, e2, n2, i2);
@@ -31780,7 +31740,7 @@ void main(void){
31780
31740
  (r2 = t2[a2]) && (s2 = (o2 < 3 ? r2(s2) : o2 > 3 ? r2(e2, n2, s2) : r2(e2, n2)) || s2);
31781
31741
  return o2 > 3 && s2 && Object.defineProperty(e2, n2, s2), s2;
31782
31742
  };
31783
- class aR {
31743
+ class sR {
31784
31744
  constructor(t2, e2) {
31785
31745
  this.math = { pi: Math.PI, e: Math.E, abs: Math.abs, acos: Math.acos, asin: Math.asin, atan: Math.atan, ceil: Math.ceil, cos: Math.cos, cosh: Math.cosh, deg: (t3) => t3 / Math.PI * 180, exp: Math.exp, floor: Math.floor, ln: Math.log, max: Math.max, min: Math.min, rad: (t3) => t3 / 180 * Math.PI, rand: Math.random, sin: Math.sin, sinh: Math.sinh, sqrt: Math.sqrt, tan: Math.tan, tanh: Math.tanh }, this.timingTarget = e2, this.val = t2.val.value, this.time = t2.time, t2.fmla && (this.fmla = this.parseFmla(t2.fmla));
31786
31746
  }
@@ -31792,7 +31752,7 @@ void main(void){
31792
31752
  }), new Function("vars", "math", "$", "return " + e2);
31793
31753
  }
31794
31754
  }
31795
- class lR extends aR {
31755
+ class aR extends sR {
31796
31756
  constructor(t2, e2, n2) {
31797
31757
  super(t2, e2), this.value = t2.val.value, n2 && (this.fmla = this.parseFmla(n2));
31798
31758
  }
@@ -31804,8 +31764,8 @@ void main(void){
31804
31764
  return t2.fmla ? t2.fmla(n2, this.math, r2) : r2;
31805
31765
  }
31806
31766
  }
31807
- sR([YE()], lR.prototype, "interpolationFrom", null);
31808
- class uR extends aR {
31767
+ oR([YE()], aR.prototype, "interpolationFrom", null);
31768
+ class lR extends sR {
31809
31769
  constructor(t2, e2) {
31810
31770
  var n2;
31811
31771
  super(t2, e2), this.value = (n2 = t2.val) === null || n2 === void 0 ? void 0 : n2.value;
@@ -31818,8 +31778,8 @@ void main(void){
31818
31778
  return this.value || "";
31819
31779
  }
31820
31780
  }
31821
- sR([YE()], uR.prototype, "interpolationFrom", null);
31822
- class hR extends aR {
31781
+ oR([YE()], lR.prototype, "interpolationFrom", null);
31782
+ class uR extends sR {
31823
31783
  constructor(t2, e2) {
31824
31784
  super(t2, e2), this.fn = this.parseFmla(this.val);
31825
31785
  }
@@ -31831,8 +31791,8 @@ void main(void){
31831
31791
  return t2.fmla ? t2.fmla(n2, this.math, r2) : r2;
31832
31792
  }
31833
31793
  }
31834
- sR([YE()], hR.prototype, "interpolationFrom", null);
31835
- class cR extends aR {
31794
+ oR([YE()], uR.prototype, "interpolationFrom", null);
31795
+ class hR extends sR {
31836
31796
  constructor(t2, e2) {
31837
31797
  super(t2, e2), this.value = t2.val.value;
31838
31798
  }
@@ -31843,11 +31803,11 @@ void main(void){
31843
31803
  return this.value;
31844
31804
  }
31845
31805
  }
31846
- sR([YE()], cR.prototype, "interpolationFrom", null);
31847
- class dR extends rR {
31806
+ oR([YE()], hR.prototype, "interpolationFrom", null);
31807
+ class cR extends iR {
31848
31808
  constructor(t2) {
31849
31809
  super(t2), this.isConflict = true, this.activeWhenConflict = "next", this.startVal = null, this.vars = { ppt_x: 0, ppt_y: 0, ppt_w: 0, ppt_h: 0 }, this.keyFrames = [], this.isColorAnim = false, this.onTimeNodeStart = () => {
31850
- this.timingTarget && (this.startVal = iR(this.timingTarget, this.json.cBhvr.attrList[0]));
31810
+ this.timingTarget && (this.startVal = nR(this.timingTarget, this.json.cBhvr.attrList[0]));
31851
31811
  }, this.updateVars = () => {
31852
31812
  var t3, e2, n2, i2;
31853
31813
  ((t3 = this.timingTarget) === null || t3 === void 0 ? void 0 : t3.ppt_h) && (this.vars.ppt_h = this.timingTarget.ppt_h), ((e2 = this.timingTarget) === null || e2 === void 0 ? void 0 : e2.ppt_w) && (this.vars.ppt_w = this.timingTarget.ppt_w), ((n2 = this.timingTarget) === null || n2 === void 0 ? void 0 : n2.ppt_x) && (this.vars.ppt_x = this.timingTarget.ppt_x), ((i2 = this.timingTarget) === null || i2 === void 0 ? void 0 : i2.ppt_y) && (this.vars.ppt_y = this.timingTarget.ppt_y), this.isColorAnim;
@@ -31855,12 +31815,12 @@ void main(void){
31855
31815
  const n2 = e2 / t3, i2 = this.keyFrames.findIndex((t4) => n2 <= t4[0]), { attrList: r2 } = this.json.cBhvr;
31856
31816
  if (i2 < 0) {
31857
31817
  const t4 = this.keyFrames[this.keyFrames.length - 1];
31858
- return void (this.timingTarget && r2 && r2[0] && nR(this.timingTarget, r2[0], t4[1].resolveValue(this.vars)));
31818
+ return void (this.timingTarget && r2 && r2[0] && eR(this.timingTarget, r2[0], t4[1].resolveValue(this.vars)));
31859
31819
  }
31860
31820
  const o2 = i2 - 1, s2 = this.keyFrames[i2], a2 = this.keyFrames[o2] || s2, l2 = s2[0] - a2[0] == 0 ? 1 : (n2 - a2[0]) / (s2[0] - a2[0]), u2 = s2[1].interpolationFrom(a2[1], l2, this.vars);
31861
- this.timingTarget && r2 && r2[0] && nR(this.timingTarget, r2[0], u2);
31821
+ this.timingTarget && r2 && r2[0] && eR(this.timingTarget, r2[0], u2);
31862
31822
  }, this.onSeekToStart = () => {
31863
- this.startVal !== null && this.timingTarget && nR(this.timingTarget, this.json.cBhvr.attrList[0], this.startVal);
31823
+ this.startVal !== null && this.timingTarget && eR(this.timingTarget, this.json.cBhvr.attrList[0], this.startVal);
31864
31824
  }, this.onSeekToEnd = () => {
31865
31825
  this.onTimeUpdate({ duration: 1, delta: 1, isReverse: false });
31866
31826
  }, this.initKeyFrames(), this.commonTimeNode.on("timeUpdate", this.onTimeUpdate), this.commonTimeNode.on("timelineStart", this.updateVars), this.commonTimeNode.on("timeNodeStart", this.onTimeNodeStart), this.commonTimeNode.on("timeNodeCreate", this.onTimeNodeStart);
@@ -31876,24 +31836,24 @@ void main(void){
31876
31836
  if (this.json.from || this.startVal) {
31877
31837
  const t4 = { time: 0, val: { type: "string", value: this.json.from || this.startVal.toString() }, fmla: "" };
31878
31838
  if (e2 === "num" && this.timingTarget) {
31879
- const e3 = new hR(t4, this.timingTarget);
31839
+ const e3 = new uR(t4, this.timingTarget);
31880
31840
  this.keyFrames.push([t4.time, e3]);
31881
31841
  }
31882
31842
  }
31883
31843
  const t3 = { time: 1, val: { type: "string", value: this.json.to }, fmla: "" };
31884
31844
  if (e2 === "num" && this.timingTarget) {
31885
- const e3 = new hR(t3, this.timingTarget);
31845
+ const e3 = new uR(t3, this.timingTarget);
31886
31846
  this.keyFrames.push([t3.time, e3]);
31887
31847
  }
31888
31848
  } else if (this.json.by) {
31889
31849
  const n2 = { time: 0, val: { type: "string", value: this.json.cBhvr.attrList[0] }, fmla: "" };
31890
31850
  if (e2 === "num" && this.timingTarget) {
31891
- const t3 = new hR(n2, this.timingTarget);
31851
+ const t3 = new uR(n2, this.timingTarget);
31892
31852
  this.keyFrames.push([n2.time, t3]);
31893
31853
  }
31894
31854
  const i2 = { time: 1, val: { type: "string", value: (((t2 = n2.val) === null || t2 === void 0 ? void 0 : t2.value) || "") + "+" + this.json.by }, fmla: "" };
31895
31855
  if (e2 === "num" && this.timingTarget) {
31896
- const t3 = new hR(i2, this.timingTarget);
31856
+ const t3 = new uR(i2, this.timingTarget);
31897
31857
  this.keyFrames.push([i2.time, t3]);
31898
31858
  }
31899
31859
  }
@@ -31902,15 +31862,15 @@ void main(void){
31902
31862
  for (const t3 of this.json.tavLst)
31903
31863
  if (t3.val && this.timingTarget) {
31904
31864
  let n2 = null;
31905
- t3.val.type === "string" ? e2 === "num" ? n2 = new hR(t3, this.timingTarget) : e2 === "str" && (n2 = new uR(t3, this.timingTarget)) : t3.val.type === "number" ? n2 = new lR(t3, this.timingTarget) : t3.val.type === "color" ? (this.isColorAnim = true, n2 = new cR(t3, this.timingTarget)) : t3.val.type === "boolean" && console.warn("not implements"), n2 && this.keyFrames.push([t3.time, n2]);
31865
+ t3.val.type === "string" ? e2 === "num" ? n2 = new uR(t3, this.timingTarget) : e2 === "str" && (n2 = new lR(t3, this.timingTarget)) : t3.val.type === "number" ? n2 = new aR(t3, this.timingTarget) : t3.val.type === "color" ? (this.isColorAnim = true, n2 = new hR(t3, this.timingTarget)) : t3.val.type === "boolean" && console.warn("not implements"), n2 && this.keyFrames.push([t3.time, n2]);
31906
31866
  }
31907
31867
  }
31908
31868
  }
31909
31869
  }
31910
- var pR = n(50), fR = n.n(pR), mR = n(51), gR = n.n(mR);
31911
- class vR extends Gx {
31870
+ var dR = n(50), pR = n.n(dR), fR = n(51), mR = n.n(fR);
31871
+ class gR extends Gx {
31912
31872
  constructor() {
31913
- super(gR.a, fR.a, { percent: 0, direction: 1, transition: 0 });
31873
+ super(mR.a, pR.a, { percent: 0, direction: 1, transition: 0 });
31914
31874
  }
31915
31875
  set transition(t2) {
31916
31876
  this.uniforms.transition = t2;
@@ -31922,10 +31882,10 @@ void main(void){
31922
31882
  this.uniforms.direction = t2;
31923
31883
  }
31924
31884
  }
31925
- var _R = n(52), yR = n.n(_R);
31926
- class xR extends Gx {
31885
+ var vR = n(52), _R = n.n(vR);
31886
+ class yR extends Gx {
31927
31887
  constructor() {
31928
- super(void 0, yR.a, { percent: 0, transition: 1 });
31888
+ super(void 0, _R.a, { percent: 0, transition: 1 });
31929
31889
  }
31930
31890
  set transition(t2) {
31931
31891
  this.uniforms.transition = Math.pow(t2, t2);
@@ -31934,7 +31894,7 @@ void main(void){
31934
31894
  this.uniforms.percent = t2;
31935
31895
  }
31936
31896
  }
31937
- class bR extends rR {
31897
+ class xR extends iR {
31938
31898
  constructor(t2) {
31939
31899
  var e2;
31940
31900
  super(t2), this.filterType = "", this.isConflict = true, this.activeWhenConflict = "prev", this.onTimeUpdate = ({ duration: t3, delta: e3 }) => {
@@ -31955,10 +31915,10 @@ void main(void){
31955
31915
  if (i2) {
31956
31916
  const t3 = i2[1], e3 = i2[3];
31957
31917
  if (t3 === "wipe") {
31958
- const n3 = new vR();
31918
+ const n3 = new gR();
31959
31919
  e3 === "up" ? n3.direction = 1 : e3 === "down" ? n3.direction = 2 : e3 === "left" ? n3.direction = 3 : e3 === "right" && (n3.direction = 4), this.filter = n3, this.filterType = `${t3}-${e3}`;
31960
31920
  } else if (t3 === "fade") {
31961
- const e4 = new xR();
31921
+ const e4 = new yR();
31962
31922
  this.filter = e4, this.filterType = "" + t3;
31963
31923
  }
31964
31924
  this.filter && (this.filter.transition = n2);
@@ -31968,7 +31928,7 @@ void main(void){
31968
31928
  return this.filterType;
31969
31929
  }
31970
31930
  }
31971
- class TR extends rR {
31931
+ class bR extends iR {
31972
31932
  constructor(t2) {
31973
31933
  super(t2), this.isConflict = true, this.activeWhenConflict = "next", this.startPos = null, this.onTimeNodeStart = () => {
31974
31934
  var t3, e2;
@@ -32021,7 +31981,7 @@ void main(void){
32021
31981
  this.path = e2;
32022
31982
  }
32023
31983
  }
32024
- class wR extends rR {
31984
+ class TR extends iR {
32025
31985
  constructor(t2) {
32026
31986
  super(t2), this.isConflict = true, this.activeWhenConflict = "next", this.startVal = null, this.onTimelineStart = (t3) => {
32027
31987
  t3.isReverse || this.updateCurrentValue();
@@ -32051,34 +32011,34 @@ void main(void){
32051
32011
  this.timingTarget && (this.current = { x: this.timingTarget.scale.x, y: this.timingTarget.scale.y });
32052
32012
  }
32053
32013
  }
32054
- class SR extends rR {
32014
+ class wR extends iR {
32055
32015
  constructor(t2) {
32056
32016
  super(t2), this.isConflict = false, this.activeWhenConflict = "next", this.isTimelineStart = false, this.startColorString = null, this.currentColorString = "#FFFFFFFF", this.onTimelineStart = (t3) => {
32057
32017
  if (this.isTimelineStart)
32058
32018
  return;
32059
32019
  this.isTimelineStart = true, t3.isReverse || this.updateCurrentValue(), this.from.isInit() || this.from.fromHexString(this.currentColorString), this.to.isInit() || this.from.by(this.by, this.to);
32060
32020
  const [e2] = this.json.cBhvr.attrList[0].split(".");
32061
- nR(this.timingTarget, e2 + ".on", "true");
32021
+ eR(this.timingTarget, e2 + ".on", "true");
32062
32022
  }, this.onTimeNodeEnd = () => {
32063
32023
  if (this.json.cBhvr.ctn.fill === "remove") {
32064
32024
  const [t3] = this.json.cBhvr.attrList[0].split(".");
32065
- nR(this.timingTarget, t3 + ".on", "false");
32025
+ eR(this.timingTarget, t3 + ".on", "false");
32066
32026
  }
32067
32027
  this.isTimelineStart = false;
32068
32028
  }, this.onSeekToStart = () => {
32069
32029
  var t3;
32070
32030
  if (this.timingTarget && (this.onTimeUpdate({ duration: 1, delta: 0 }), ((t3 = this.timingTarget.fill) === null || t3 === void 0 ? void 0 : t3.designColor.toUpperCase()) === this.from.toHexString().toUpperCase())) {
32071
32031
  const [t4] = this.json.cBhvr.attrList[0].split(".");
32072
- nR(this.timingTarget, t4 + ".on", "false");
32032
+ eR(this.timingTarget, t4 + ".on", "false");
32073
32033
  }
32074
32034
  }, this.onTimeNodeStart = () => {
32075
32035
  if (this.timingTarget) {
32076
- const t3 = iR(this.timingTarget, this.json.cBhvr.attrList[0]);
32036
+ const t3 = nR(this.timingTarget, this.json.cBhvr.attrList[0]);
32077
32037
  t3 && (this.startColorString = t3);
32078
32038
  }
32079
32039
  }, this.onTimeUpdate = ({ delta: t3, duration: e2 }) => {
32080
32040
  const n2 = t3 / e2;
32081
- this.to.interpolationFrom(this.from, n2, this.target), this.timingTarget && nR(this.timingTarget, this.json.cBhvr.attrList[0], this.target.toHexString());
32041
+ this.to.interpolationFrom(this.from, n2, this.target), this.timingTarget && eR(this.timingTarget, this.json.cBhvr.attrList[0], this.target.toHexString());
32082
32042
  }, this.onSeekToEnd = () => {
32083
32043
  this.isTimelineStart || this.onTimelineStart({ isReverse: false, activeCount: 0, id: "" }), this.onTimeUpdate({ duration: 1, delta: 1 });
32084
32044
  }, this.json.clrSpc === "rgb" ? (this.from = new IM(this.json.from), this.to = new IM(this.json.to), this.by = new IM(this.json.by), this.target = new IM()) : (this.from = new CM(this.json.from), this.to = new CM(this.json.to), this.by = new CM(this.json.by), this.target = new CM()), this.commonTimeNode.on("timeNodeStart", this.onTimeNodeStart), this.commonTimeNode.on("timeNodeCreate", this.onTimeNodeStart), this.commonTimeNode.on("timelineStart", this.onTimelineStart), this.commonTimeNode.on("timeNodeEnd", this.onTimeNodeEnd), this.commonTimeNode.on("timeUpdate", this.onTimeUpdate);
@@ -32088,12 +32048,12 @@ void main(void){
32088
32048
  }
32089
32049
  updateCurrentValue() {
32090
32050
  if (this.timingTarget) {
32091
- const t2 = iR(this.timingTarget, this.json.cBhvr.attrList[0]);
32051
+ const t2 = nR(this.timingTarget, this.json.cBhvr.attrList[0]);
32092
32052
  t2 && (this.currentColorString = t2);
32093
32053
  }
32094
32054
  }
32095
32055
  }
32096
- class ER extends rR {
32056
+ class SR extends iR {
32097
32057
  constructor(t2) {
32098
32058
  super(t2), this.isConflict = false, this.activeWhenConflict = "next", this.startVal = null, this.lastVal = null, this.onTimelineStart = (t3) => {
32099
32059
  this.lastVal = null, t3.isReverse || this.updateCurrentValue();
@@ -32126,7 +32086,7 @@ void main(void){
32126
32086
  this.currentVal = (t2 = this.timingTarget) === null || t2 === void 0 ? void 0 : t2.r;
32127
32087
  }
32128
32088
  }
32129
- class MR extends rR {
32089
+ class ER extends iR {
32130
32090
  constructor(t2) {
32131
32091
  super(t2), this.isConflict = false, this.activeWhenConflict = "next", this.isApplied = false, this.onTimeUpdate = () => {
32132
32092
  var t3, e2;
@@ -32147,22 +32107,24 @@ void main(void){
32147
32107
  return ((e2 = (t2 = this.json) === null || t2 === void 0 ? void 0 : t2.cmd) !== null && e2 !== void 0 ? e2 : "") + ((i2 = (n2 = this.json) === null || n2 === void 0 ? void 0 : n2.cmdType) !== null && i2 !== void 0 ? i2 : "");
32148
32108
  }
32149
32109
  }
32150
- class AR {
32110
+ class MR {
32151
32111
  constructor(t2) {
32152
- this.runtimeNodeEventHub = new a.a(), this.stopAudio = () => {
32112
+ this.runtimeNodeEventHub = new a.a(), this.onVolumeUpdate = (t3) => {
32113
+ this.audio.volume(t3);
32114
+ }, this.stopAudio = () => {
32153
32115
  this.audio.stop();
32154
32116
  }, this.destroy = () => {
32155
- this.stopAudio(), this.audio.destroy(), this.ctx.activeMedia.delete(this.audio);
32117
+ this.stopAudio(), this.audio.destroy(), this.ctx.activeMedia.delete(this.audio), this.ctx.volumeAdjuster.off("update", this.onVolumeUpdate);
32156
32118
  };
32157
32119
  const { json: e2, isIterate: n2, isSub: i2, eventHub: r2, ctx: o2, parent: s2, iterateType: l2, iterateIndex: u2, iterateId: h2, isInInteractiveSeq: c2 } = t2;
32158
- this.json = e2, this.id = e2.cMediaNode.ctn.id, this.commonTimeNode = new PR({ json: e2.cMediaNode.ctn, isSub: i2, eventHubs: { global: r2, runtime: this.runtimeNodeEventHub }, ctx: o2, parent: s2, isIterate: n2, iterateType: l2, iterateIndex: u2, iterateId: h2, isInInteractiveSeq: c2 });
32120
+ this.json = e2, this.id = e2.cMediaNode.ctn.id, this.commonTimeNode = new RR({ json: e2.cMediaNode.ctn, isSub: i2, eventHubs: { global: r2, runtime: this.runtimeNodeEventHub }, ctx: o2, parent: s2, isIterate: n2, iterateType: l2, iterateIndex: u2, iterateId: h2, isInInteractiveSeq: c2 });
32159
32121
  let d2 = e2.cMediaNode.tgtEl;
32160
- o2.loaderDelegate && (d2 = o2.loaderDelegate.redirectMedia(d2), o2.logger.info(`redirect media url from ${e2.cMediaNode.tgtEl} to ${d2} by delegate.`, o2.taskId)), this.audio = new XA(d2, o2.runningAudio), o2.activeMedia.add(this.audio), this.commonTimeNode.on("timelineStart", () => {
32161
- this.audio.play();
32162
- }), this.commonTimeNode.on("seekToStart", this.stopAudio), this.commonTimeNode.on("seekToEnd", this.stopAudio), this.commonTimeNode.on("timeNodeDestroy", this.destroy), this.ctx = o2;
32122
+ o2.loaderDelegate && (d2 = o2.loaderDelegate.redirectMedia(d2), o2.logger.info(`redirect media url from ${e2.cMediaNode.tgtEl} to ${d2} by delegate.`, o2.taskId)), this.audio = new WA(d2, o2.runningAudio), o2.activeMedia.add(this.audio), this.commonTimeNode.on("timelineStart", () => {
32123
+ this.audio.volume(o2.volumeAdjuster.volume), this.audio.play();
32124
+ }), this.commonTimeNode.on("seekToStart", this.stopAudio), this.commonTimeNode.on("seekToEnd", this.stopAudio), this.commonTimeNode.on("timeNodeDestroy", this.destroy), this.ctx = o2, this.ctx.volumeAdjuster.on("update", this.onVolumeUpdate);
32163
32125
  }
32164
32126
  }
32165
- var RR = function(t2, e2, n2, i2) {
32127
+ var AR = function(t2, e2, n2, i2) {
32166
32128
  return new (n2 || (n2 = Promise))(function(r2, o2) {
32167
32129
  function s2(t3) {
32168
32130
  try {
@@ -32187,7 +32149,7 @@ void main(void){
32187
32149
  l2((i2 = i2.apply(t2, e2 || [])).next());
32188
32150
  });
32189
32151
  };
32190
- class PR extends a.a {
32152
+ class RR extends a.a {
32191
32153
  constructor(t2) {
32192
32154
  var e2, n2;
32193
32155
  super(), this.uuid = Date.now().toString(32) + Math.random().toString(32).substring(2), this.isSub = false, this.isShadow = false, this.startCount = 0, this.applyCount = 0, this.isReverse = false, this.isConflictDispose = false, this.isIterateEnd = false, this.parentTimeNode = null, this.isActive = false, this.isDestroy = false, this.shouldSeekOnStart = false, this.repeatTimeoutId = "", this.iterateShadows = [], this.isEndEventsEmitted = false, this.tmFilter = [], this.timeDelta = 0, this.isIterate = false, this.iterateType = "el", this.iterateIndex = 0, this.children = [], this.subList = [], this.duration = 0, this.isNegativeSpeed = false, this.handleEndCond = () => {
@@ -32208,7 +32170,7 @@ void main(void){
32208
32170
  const { isSub: i2, isIterate: r2, ctx: o2, eventHubs: s2, parent: a2, json: l2, iterateType: u2, iterateId: h2, iterateIndex: c2, isInInteractiveSeq: d2 } = t2;
32209
32171
  this.isSub = i2, this.isInInteractiveSeq = d2, this.isIterate = r2, this.parentTimeNode = a2, this.json = l2, this.ctx = o2, this.iterateIndex = c2, this.eventHubs = s2, this.iterateType = u2, this.iterateId = h2, this.tmFilter = (n2 = (e2 = l2.tmFilter) === null || e2 === void 0 ? void 0 : e2.split(";").map((t3) => t3.split(",").map((t4) => parseFloat(t4.trim())))) !== null && n2 !== void 0 ? n2 : [];
32210
32172
  const p2 = Number(this.json.dur), f2 = this.json.spd || 1;
32211
- this.isNegativeSpeed = f2 < 0, Number.isNaN(p2) || (this.duration = p2 / Math.abs(f2)), this.uuid += "--" + this.json.id, this.setPreStyle(), l2.childTnLst && this.createChildren(l2.childTnLst), this.startConds = new tR(this.json.id || "", l2.stCondLst, s2, this.ctx), this.endConds = new tR(this.json.id || "", l2.endCondLst, s2, this.ctx), l2.endSync && (this.endSync = new tR(this.json.id || "", [l2.endSync], s2, this.ctx), this.endSync.on("active", () => {
32173
+ this.isNegativeSpeed = f2 < 0, Number.isNaN(p2) || (this.duration = p2 / Math.abs(f2)), this.uuid += "--" + this.json.id, this.setPreStyle(), l2.childTnLst && this.createChildren(l2.childTnLst), this.startConds = new QA(this.json.id || "", l2.stCondLst, s2, this.ctx), this.endConds = new QA(this.json.id || "", l2.endCondLst, s2, this.ctx), l2.endSync && (this.endSync = new QA(this.json.id || "", [l2.endSync], s2, this.ctx), this.endSync.on("active", () => {
32212
32174
  var t3;
32213
32175
  this.json.nodeType === "interactiveSeq" && (this.isActive = false, this.shouldSeekOnStart = true, this.emit("timeNodeEndSync"), (t3 = this.endSync) === null || t3 === void 0 || t3.reset());
32214
32176
  })), this.startConds.on("active", (t3) => {
@@ -32226,7 +32188,7 @@ void main(void){
32226
32188
  n3 === t2 && (e2 = false, this.ctx.eventHub.removeListener("IterateTimeNodeEnd", i2));
32227
32189
  };
32228
32190
  for (this.ctx.eventHub.on("IterateTimeNodeEnd", i2); e2; ) {
32229
- const e3 = JSON.parse(JSON.stringify(this.json)), i3 = new PR({ json: e3, isSub: false, eventHubs: this.eventHubs, ctx: this.ctx, parent: null, isIterate: true, iterateType: e3.iterate.type, iterateIndex: n2, iterateId: t2, isInInteractiveSeq: this.isInInteractiveSeq });
32191
+ const e3 = JSON.parse(JSON.stringify(this.json)), i3 = new RR({ json: e3, isSub: false, eventHubs: this.eventHubs, ctx: this.ctx, parent: null, isIterate: true, iterateType: e3.iterate.type, iterateIndex: n2, iterateId: t2, isInInteractiveSeq: this.isInInteractiveSeq });
32230
32192
  this.iterateShadows[n2] = i3, n2 += 1;
32231
32193
  }
32232
32194
  }
@@ -32242,7 +32204,7 @@ void main(void){
32242
32204
  createTimeNode(t2, e2) {
32243
32205
  let n2 = null;
32244
32206
  const i2 = { json: t2, isSub: e2, isIterate: this.isIterate, eventHub: this.eventHubs.global, ctx: this.ctx, parent: this, iterateType: this.iterateType, iterateIndex: this.iterateIndex, iterateId: this.iterateId, isInInteractiveSeq: this.isInInteractiveSeq };
32245
- return t2.type === "seq" ? n2 = new eR(i2) : t2.type === "par" ? n2 = new CR(i2) : t2.type === "set" ? n2 = new oR(i2) : t2.type === "anim" ? n2 = new dR(i2) : t2.type === "animEffect" ? n2 = new bR(i2) : t2.type === "animMotion" ? n2 = new TR(i2) : t2.type === "animScale" ? n2 = new wR(i2) : t2.type === "animClr" ? n2 = new SR(i2) : t2.type === "animRot" ? n2 = new ER(i2) : t2.type === "cmd" ? n2 = new MR(i2) : t2.type === "audio" && (n2 = new AR(i2)), n2;
32207
+ return t2.type === "seq" ? n2 = new tR(i2) : t2.type === "par" ? n2 = new PR(i2) : t2.type === "set" ? n2 = new rR(i2) : t2.type === "anim" ? n2 = new cR(i2) : t2.type === "animEffect" ? n2 = new xR(i2) : t2.type === "animMotion" ? n2 = new bR(i2) : t2.type === "animScale" ? n2 = new TR(i2) : t2.type === "animClr" ? n2 = new wR(i2) : t2.type === "animRot" ? n2 = new SR(i2) : t2.type === "cmd" ? n2 = new ER(i2) : t2.type === "audio" && (n2 = new MR(i2)), n2;
32246
32208
  }
32247
32209
  createSubList(t2) {
32248
32210
  this.subList && this.subList.forEach((t3) => t3.commonTimeNode.destroy()), this.subList = [], t2.forEach((t3) => {
@@ -32303,7 +32265,7 @@ void main(void){
32303
32265
  startReverseTimeLine() {
32304
32266
  this.isEndEventsEmitted = false, this.timeDelta = 0;
32305
32267
  const t2 = 1e3 / this.ctx.ticker.maxFPS;
32306
- this.duration <= t2 && this.duration > 0 ? (this.emit("timeUpdate", { delta: this.duration, duration: this.duration, isReverse: this.isReverse }), this.ctx.eventHub.emit(KR.animateEnd), this.ctx.ticker.remove(this.updateTimeLine)) : this.duration > t2 && (this.ctx.eventHub.emit(KR.animateStart), this.ctx.ticker.add(this.updateTimeLine));
32268
+ this.duration <= t2 && this.duration > 0 ? (this.emit("timeUpdate", { delta: this.duration, duration: this.duration, isReverse: this.isReverse }), this.ctx.eventHub.emit($R.animateEnd), this.ctx.ticker.remove(this.updateTimeLine)) : this.duration > t2 && (this.ctx.eventHub.emit($R.animateStart), this.ctx.ticker.add(this.updateTimeLine));
32307
32269
  }
32308
32270
  startTimeLine(t2 = true) {
32309
32271
  if (t2 && (this.isEndEventsEmitted = false, this.eventHubs.global.emit(`time ${this.json.id} begin`), this.eventHubs.global.emit(`time ${this.json.id} onBegin`), this.eventHubs.runtime.emit(`runtime ${this.json.id} begin`)), this.json.iterate)
@@ -32312,10 +32274,10 @@ void main(void){
32312
32274
  const e2 = 1e3 / this.ctx.ticker.maxFPS;
32313
32275
  this.duration <= e2 && this.duration > 0 ? (this.timeDelta = this.isReverse ? 0 : this.duration, this.emit("timeUpdate", { delta: this.timeDelta, duration: this.duration, isReverse: this.isReverse }), this.emit("timelineEnd", { id: this.uuid, activeCount: this.applyCount, isReverse: this.isReverse }), this.ctx.ticker.addOnce(() => {
32314
32276
  this.onTimeLineEnd();
32315
- })) : this.duration > e2 && (this.ctx.eventHub.emit(KR.animateStart), this.updateTimeLine(0), this.ctx.ticker.add(this.updateTimeLine));
32277
+ })) : this.duration > e2 && (this.ctx.eventHub.emit($R.animateStart), this.updateTimeLine(0), this.ctx.ticker.add(this.updateTimeLine));
32316
32278
  }
32317
32279
  startIterate() {
32318
- return RR(this, void 0, void 0, function* () {
32280
+ return AR(this, void 0, void 0, function* () {
32319
32281
  if (this.json.iterate) {
32320
32282
  this.isIterateEnd = false;
32321
32283
  for (const t2 of this.iterateShadows) {
@@ -32420,7 +32382,7 @@ void main(void){
32420
32382
  });
32421
32383
  }
32422
32384
  dispose(t2 = false) {
32423
- this.isConflictDispose = t2, this.ctx.clock.clearTimeout(this.repeatTimeoutId), this.ctx.eventHub.emit(KR.animateEnd);
32385
+ this.isConflictDispose = t2, this.ctx.clock.clearTimeout(this.repeatTimeoutId), this.ctx.eventHub.emit($R.animateEnd);
32424
32386
  try {
32425
32387
  this.ctx.ticker.remove(this.updateTimeLine);
32426
32388
  } catch (t3) {
@@ -32456,11 +32418,11 @@ void main(void){
32456
32418
  this.emit("timeNodeDestroy"), this.isDestroy = true, this.dispose(), this.startConds.removeAllListeners(), this.endConds.removeAllListeners(), this.children.forEach((t2) => t2.commonTimeNode.destroy()), this.clearSubList();
32457
32419
  }
32458
32420
  }
32459
- class CR extends a.a {
32421
+ class PR extends a.a {
32460
32422
  constructor(t2) {
32461
32423
  super(), this.isRunning = false, this.runtimeNodeEventHub = new a.a();
32462
32424
  const { json: e2, iterateType: n2, isIterate: i2, isSub: r2, parent: o2, ctx: s2, eventHub: l2, iterateIndex: u2, iterateId: h2, isInInteractiveSeq: c2 } = t2;
32463
- this.id = e2.ctn.id, this.json = e2, this.ctx = s2, this.isIterate = i2, this.globalEventHub = l2, this.commonTimeNode = new PR({ json: e2.ctn, isSub: r2, eventHubs: { global: l2, runtime: this.runtimeNodeEventHub }, ctx: s2, parent: o2, isIterate: false, iterateType: n2, iterateIndex: u2, iterateId: h2, isInInteractiveSeq: c2 }), this.commonTimeNode.on("timeNodeStart", () => {
32425
+ this.id = e2.ctn.id, this.json = e2, this.ctx = s2, this.isIterate = i2, this.globalEventHub = l2, this.commonTimeNode = new RR({ json: e2.ctn, isSub: r2, eventHubs: { global: l2, runtime: this.runtimeNodeEventHub }, ctx: s2, parent: o2, isIterate: false, iterateType: n2, iterateIndex: u2, iterateId: h2, isInInteractiveSeq: c2 }), this.commonTimeNode.on("timeNodeStart", () => {
32464
32426
  this.commonTimeNode.children.forEach((t3) => {
32465
32427
  t3.commonTimeNode.setReverse(this.commonTimeNode.getReverse()), t3.commonTimeNode.startTimeNode();
32466
32428
  }), this.isRunning || (this.isRunning = true, this.globalEventHub.emit(`runtime ${this.id} begin`), this.emit("begin"));
@@ -32473,7 +32435,7 @@ void main(void){
32473
32435
  });
32474
32436
  }
32475
32437
  }
32476
- var IR = function(t2, e2, n2, i2) {
32438
+ var CR = function(t2, e2, n2, i2) {
32477
32439
  return new (n2 || (n2 = Promise))(function(r2, o2) {
32478
32440
  function s2(t3) {
32479
32441
  try {
@@ -32498,11 +32460,11 @@ void main(void){
32498
32460
  l2((i2 = i2.apply(t2, e2 || [])).next());
32499
32461
  });
32500
32462
  };
32501
- class OR {
32463
+ class IR {
32502
32464
  constructor(t2, e2, n2) {
32503
32465
  this.json = t2, this.ctx = n2, this.globalEventHub = e2;
32504
32466
  const i2 = t2.timeNodeList.find((t3) => t3.type === "par" && t3.ctn.nodeType === "tmRoot");
32505
- i2 && (this.tmRoot = new CR({ json: i2, isSub: false, isIterate: false, eventHub: e2, ctx: n2, parent: null, iterateType: "el", iterateIndex: 0, iterateId: "", isInInteractiveSeq: false }), this.mainSeq = this.tmRoot.commonTimeNode.children.find((t3) => {
32467
+ i2 && (this.tmRoot = new PR({ json: i2, isSub: false, isIterate: false, eventHub: e2, ctx: n2, parent: null, iterateType: "el", iterateIndex: 0, iterateId: "", isInInteractiveSeq: false }), this.mainSeq = this.tmRoot.commonTimeNode.children.find((t3) => {
32506
32468
  var e3, n3, i3;
32507
32469
  return ((e3 = t3.json) === null || e3 === void 0 ? void 0 : e3.type) === "seq" && ((i3 = (n3 = t3.json) === null || n3 === void 0 ? void 0 : n3.ctn) === null || i3 === void 0 ? void 0 : i3.nodeType) === "mainSeq";
32508
32470
  }));
@@ -32516,7 +32478,7 @@ void main(void){
32516
32478
  }
32517
32479
  start() {
32518
32480
  var t2, e2;
32519
- return IR(this, void 0, void 0, function* () {
32481
+ return CR(this, void 0, void 0, function* () {
32520
32482
  this.json.autoPlayMainSeq ? (yield this.ctx.clock.delay(16), (t2 = this.mainSeq) === null || t2 === void 0 || t2.commonTimeNode.startTimeNode()) : (e2 = this.mainSeq) === null || e2 === void 0 || e2.commonTimeNode.startTimeNode();
32521
32483
  });
32522
32484
  }
@@ -32574,7 +32536,7 @@ void main(void){
32574
32536
  this.globalEventHub.emit(t2);
32575
32537
  }
32576
32538
  }
32577
- var LR = function(t2, e2, n2, i2) {
32539
+ var OR = function(t2, e2, n2, i2) {
32578
32540
  return new (n2 || (n2 = Promise))(function(r2, o2) {
32579
32541
  function s2(t3) {
32580
32542
  try {
@@ -32599,7 +32561,7 @@ void main(void){
32599
32561
  l2((i2 = i2.apply(t2, e2 || [])).next());
32600
32562
  });
32601
32563
  };
32602
- class NR extends QA {
32564
+ class LR extends KA {
32603
32565
  constructor(t2, e2, n2, i2) {
32604
32566
  super({ id: "stage", width: t2.width, height: t2.height, type: "Container", children: t2.children }, e2, n2, void 0, i2), this.isRendered = false, this.isTimingStartValueCollected = false, this.json = t2, e2.hasBackgroundFillShape = this.detectUseBackgroundFill(this.json), this.container.visible = false, this.ctx = e2;
32605
32567
  const r2 = new Aw();
@@ -32610,9 +32572,9 @@ void main(void){
32610
32572
  }
32611
32573
  initOnReuse() {
32612
32574
  super.initOnReuse(), this.ctx.timingEventHub.on("c:prev slide", (t2) => {
32613
- this.ctx.eventHub.emit(KR.requestPrevSlide, t2);
32575
+ this.ctx.eventHub.emit($R.requestPrevSlide, t2);
32614
32576
  }), this.ctx.timingEventHub.on("c:next slide", (t2) => {
32615
- this.ctx.eventHub.emit(KR.requestNextSlide, t2);
32577
+ this.ctx.eventHub.emit($R.requestNextSlide, t2);
32616
32578
  });
32617
32579
  }
32618
32580
  get interactiveContainer() {
@@ -32621,7 +32583,7 @@ void main(void){
32621
32583
  render(t2) {
32622
32584
  if (this.isRendered)
32623
32585
  return;
32624
- this.collectAnimatedIds().forEach((t3) => this.ctx.animatedIds.add(t3)), this.isRendered = true, super.render(t2), t2.addSubMTask(() => LR(this, void 0, void 0, function* () {
32586
+ this.collectAnimatedIds().forEach((t3) => this.ctx.animatedIds.add(t3)), this.isRendered = true, super.render(t2), t2.addSubMTask(() => OR(this, void 0, void 0, function* () {
32625
32587
  this.ctx.eventHub.emit("StageRenderEnd");
32626
32588
  }), "@StageImpl[emit.StageRenderEnd]");
32627
32589
  }
@@ -32644,7 +32606,7 @@ void main(void){
32644
32606
  }), t2;
32645
32607
  }
32646
32608
  createTiming() {
32647
- this.json.timing && !this.timing && (this.timing = new OR(this.json.timing, this.ctx.timingEventHub, this.ctx));
32609
+ this.json.timing && !this.timing && (this.timing = new IR(this.json.timing, this.ctx.timingEventHub, this.ctx));
32648
32610
  }
32649
32611
  startTiming() {
32650
32612
  var t2;
@@ -32699,11 +32661,11 @@ void main(void){
32699
32661
  }
32700
32662
  nextStep(t2 = false) {
32701
32663
  var e2;
32702
- this.hasTiming() && ((e2 = this.timing) === null || e2 === void 0 ? void 0 : e2.hasMainSeq()) ? (this.ctx.timingEventHub.emit("shape slide onStopAudio"), this.ctx.timingEventHub.emit("shape slide onNext", t2)) : this.ctx.eventHub.emit(KR.requestNextSlide, t2);
32664
+ this.hasTiming() && ((e2 = this.timing) === null || e2 === void 0 ? void 0 : e2.hasMainSeq()) ? (this.ctx.timingEventHub.emit("shape slide onStopAudio"), this.ctx.timingEventHub.emit("shape slide onNext", t2)) : this.ctx.eventHub.emit($R.requestNextSlide, t2);
32703
32665
  }
32704
32666
  prevStep(t2 = false) {
32705
32667
  var e2;
32706
- this.hasTiming() && ((e2 = this.timing) === null || e2 === void 0 ? void 0 : e2.hasMainSeq()) ? (this.ctx.timingEventHub.emit("shape slide onStopAudio"), this.ctx.timingEventHub.emit("shape slide onPrev", t2)) : this.ctx.eventHub.emit(KR.requestPrevSlide, t2);
32668
+ this.hasTiming() && ((e2 = this.timing) === null || e2 === void 0 ? void 0 : e2.hasMainSeq()) ? (this.ctx.timingEventHub.emit("shape slide onStopAudio"), this.ctx.timingEventHub.emit("shape slide onPrev", t2)) : this.ctx.eventHub.emit($R.requestPrevSlide, t2);
32707
32669
  }
32708
32670
  applyInteractiveAction(t2) {
32709
32671
  var e2;
@@ -32718,7 +32680,7 @@ void main(void){
32718
32680
  (i2 = this.timing) === null || i2 === void 0 || i2.setInteractiveSeqState(t2, e2, n2);
32719
32681
  }
32720
32682
  setMediaState(t2, e2) {
32721
- return LR(this, void 0, void 0, function* () {
32683
+ return OR(this, void 0, void 0, function* () {
32722
32684
  const n2 = this.ctx.medias[t2];
32723
32685
  n2 && (e2 ? yield n2.play() : yield n2.pause());
32724
32686
  });
@@ -32728,7 +32690,7 @@ void main(void){
32728
32690
  n2 && n2.seek(e2);
32729
32691
  }
32730
32692
  }
32731
- class DR {
32693
+ class NR {
32732
32694
  constructor(t2) {
32733
32695
  this.ticker = t2, this.tasks = [], this.couldRunning = false, this.applyNext = () => {
32734
32696
  const t3 = this.tasks[0];
@@ -32751,7 +32713,7 @@ void main(void){
32751
32713
  this.couldRunning = false;
32752
32714
  }
32753
32715
  }
32754
- var FR = function(t2, e2, n2, i2) {
32716
+ var DR = function(t2, e2, n2, i2) {
32755
32717
  return new (n2 || (n2 = Promise))(function(r2, o2) {
32756
32718
  function s2(t3) {
32757
32719
  try {
@@ -32776,8 +32738,8 @@ void main(void){
32776
32738
  l2((i2 = i2.apply(t2, e2 || [])).next());
32777
32739
  });
32778
32740
  };
32779
- const BR = (t2) => new Promise((e2) => setTimeout(e2, t2));
32780
- class UR extends a.a {
32741
+ const FR = (t2) => new Promise((e2) => setTimeout(e2, t2));
32742
+ class BR extends a.a {
32781
32743
  constructor(t2, e2, n2) {
32782
32744
  super(), this.slideIndex = t2, this.taskId = e2, this.logger = n2, this.uuid = eM(), this.isCancel = false, this.tasks = [];
32783
32745
  }
@@ -32809,10 +32771,10 @@ void main(void){
32809
32771
  }));
32810
32772
  }
32811
32773
  applyAll() {
32812
- return FR(this, void 0, void 0, function* () {
32774
+ return DR(this, void 0, void 0, function* () {
32813
32775
  for (; !this.tasks.every((t2) => t2.state === "finish"); )
32814
32776
  if (this.tasks.some((t2) => t2.state === "running"))
32815
- yield BR(16);
32777
+ yield FR(16);
32816
32778
  else {
32817
32779
  if (this.tasks.some((t2) => t2.state === "error"))
32818
32780
  return;
@@ -32839,16 +32801,16 @@ void main(void){
32839
32801
  });
32840
32802
  }
32841
32803
  }
32842
- var kR = n(53);
32843
- const GR = new (n.n(kR)).a(), HR = GR.getDevice(), zR = GR.getBrowser(), jR = GR.getOS(), VR = { isDesktop() {
32804
+ var UR = n(53);
32805
+ const kR = new (n.n(UR)).a(), GR = kR.getDevice(), HR = kR.getBrowser(), zR = kR.getOS(), jR = { isDesktop() {
32844
32806
  let t2 = true;
32845
- return HR.type === "mobile" && (t2 = false), /Samsung/.test(zR.name || "") && (t2 = false), window.__nativeTags && window.__nativeTags.platform && (t2 = false), t2;
32807
+ return GR.type === "mobile" && (t2 = false), /Samsung/.test(HR.name || "") && (t2 = false), window.__nativeTags && window.__nativeTags.platform && (t2 = false), t2;
32846
32808
  }, isIOS() {
32847
32809
  let t2 = false;
32848
- return window.__nativeTags && window.__nativeTags.platform && /^ios/i.test(window.__nativeTags.platform) && (t2 = true), jR.name && /iOS/.test(jR.name) && (t2 = true), t2;
32810
+ return window.__nativeTags && window.__nativeTags.platform && /^ios/i.test(window.__nativeTags.platform) && (t2 = true), zR.name && /iOS/.test(zR.name) && (t2 = true), t2;
32849
32811
  }, isAndroid() {
32850
32812
  let t2 = false;
32851
- return window.__nativeTags && window.__nativeTags.platform && /^android/i.test(window.__nativeTags.platform) && (t2 = true), jR.name && /android/i.test(jR.name) && (t2 = true), t2;
32813
+ return window.__nativeTags && window.__nativeTags.platform && /^android/i.test(window.__nativeTags.platform) && (t2 = true), zR.name && /android/i.test(zR.name) && (t2 = true), t2;
32852
32814
  }, isLowGpuMemory() {
32853
32815
  var t2, e2;
32854
32816
  const n2 = (e2 = (t2 = window.__nativeTags) === null || t2 === void 0 ? void 0 : t2.platform) !== null && e2 !== void 0 ? e2 : "";
@@ -32869,7 +32831,7 @@ void main(void){
32869
32831
  }
32870
32832
  return true;
32871
32833
  } };
32872
- var WR = function(t2, e2, n2, i2) {
32834
+ var VR = function(t2, e2, n2, i2) {
32873
32835
  return new (n2 || (n2 = Promise))(function(r2, o2) {
32874
32836
  function s2(t3) {
32875
32837
  try {
@@ -32894,23 +32856,23 @@ void main(void){
32894
32856
  l2((i2 = i2.apply(t2, e2 || [])).next());
32895
32857
  });
32896
32858
  };
32897
- class XR {
32859
+ class WR {
32898
32860
  constructor(t2, e2, n2, i2, r2, o2, s2, a2, l2, u2, h2, c2, d2, p2) {
32899
- this.loader = t2, this.mode = e2, this.renderer = n2, this.ticker = i2, this.view = r2, this.clock = o2, this.objPoolGroup = s2, this.errorChannel = a2, this.localstorage = l2, this.logger = u2, this.loaderDelegate = h2, this.isPlayerPaused = c2, this.maxResolution = d2, this.volumeAdjuster = p2, this.currentStageIndex = 0, this.cacheCount = VR.isDesktop() ? 2 : 1, this.stageStates = /* @__PURE__ */ Object.create(null), this.stageJsons = /* @__PURE__ */ Object.create(null), this.stageCtxs = /* @__PURE__ */ Object.create(null), this.stageImpls = /* @__PURE__ */ Object.create(null), this.taskId = "", this.url = "", this.runningAudio = /* @__PURE__ */ new Map(), this.activeMedia = /* @__PURE__ */ new Set(), this.microTaskManager = new DR(i2);
32861
+ this.loader = t2, this.mode = e2, this.renderer = n2, this.ticker = i2, this.view = r2, this.clock = o2, this.objPoolGroup = s2, this.errorChannel = a2, this.localstorage = l2, this.logger = u2, this.loaderDelegate = h2, this.isPlayerPaused = c2, this.maxResolution = d2, this.volumeAdjuster = p2, this.currentStageIndex = 0, this.cacheCount = jR.isDesktop() ? 2 : 1, this.stageStates = /* @__PURE__ */ Object.create(null), this.stageJsons = /* @__PURE__ */ Object.create(null), this.stageCtxs = /* @__PURE__ */ Object.create(null), this.stageImpls = /* @__PURE__ */ Object.create(null), this.taskId = "", this.url = "", this.runningAudio = /* @__PURE__ */ new Map(), this.activeMedia = /* @__PURE__ */ new Set(), this.microTaskManager = new NR(i2);
32900
32862
  }
32901
32863
  setResourceData(t2, e2) {
32902
32864
  this.taskId = t2, this.url = e2;
32903
32865
  }
32904
32866
  createCtx(t2) {
32905
32867
  const { task: e2 } = this.stageStates[t2];
32906
- e2.addMTask(() => WR(this, void 0, void 0, function* () {
32868
+ e2.addMTask(() => VR(this, void 0, void 0, function* () {
32907
32869
  const e3 = new dM(this.loader), n2 = new a.a(), i2 = { taskId: this.taskId, mode: this.mode, renderer: this.renderer, graphicsTexture: new bM(), stageWidth: 0, stageHeight: 0, ticker: this.ticker, timingTargets: new wM(n2), eventHub: n2, view: this.view, medias: /* @__PURE__ */ Object.create(null), lastViewedIndex: 0, conflictTimeNodeManager: new TM(), clock: this.clock, spriteTexture: e3, slideIndex: t2, objectPoolGroup: this.objPoolGroup, hasBackgroundFillShape: false, slideScopeEventHub: new a.a(), logger: this.logger, loaderDelegate: this.loaderDelegate, runningAudio: this.runningAudio, activeMedia: this.activeMedia, isPlayerPaused: this.isPlayerPaused, timingEventHub: new a.a(), maxResolution: this.maxResolution, animatedIds: /* @__PURE__ */ new Set(), volumeAdjuster: this.volumeAdjuster };
32908
32870
  this.stageCtxs[t2] = i2;
32909
32871
  }), "@StagePool[createCtx]");
32910
32872
  }
32911
32873
  loadStageJson(t2) {
32912
32874
  const { task: e2 } = this.stageStates[t2];
32913
- e2.addMTask(() => WR(this, void 0, void 0, function* () {
32875
+ e2.addMTask(() => VR(this, void 0, void 0, function* () {
32914
32876
  const e3 = yield this.loader.fetchJson(`${this.url}/${this.taskId}/jsonOutput/slide-${t2}.json`);
32915
32877
  this.stageJsons[t2] = e3, this.stageCtxs[t2].stageWidth = e3.width, this.stageCtxs[t2].stageHeight = e3.height;
32916
32878
  }), "@StagePool[loadStageJson]");
@@ -32935,7 +32897,7 @@ void main(void){
32935
32897
  createStage(t2) {
32936
32898
  const { task: e2 } = this.stageStates[t2];
32937
32899
  e2.addMTask(() => {
32938
- const n2 = this.stageJsons[t2], i2 = this.stageCtxs[t2], r2 = new NR(n2, i2, { x: 0, y: 0 }, e2);
32900
+ const n2 = this.stageJsons[t2], i2 = this.stageCtxs[t2], r2 = new LR(n2, i2, { x: 0, y: 0 }, e2);
32939
32901
  return this.stageImpls[t2] = r2, Promise.resolve();
32940
32902
  }, "@StagePool[createStage]");
32941
32903
  }
@@ -32945,7 +32907,7 @@ void main(void){
32945
32907
  }
32946
32908
  createGraphicsTexture(t2) {
32947
32909
  const { task: e2 } = this.stageStates[t2];
32948
- e2.addMTask(() => WR(this, void 0, void 0, function* () {
32910
+ e2.addMTask(() => VR(this, void 0, void 0, function* () {
32949
32911
  const n2 = this.stageCtxs[t2];
32950
32912
  n2.graphicsTexture.pack().forEach((t3, i2) => {
32951
32913
  e2.addSubMTask(() => n2.graphicsTexture.render(t3, i2, this.objPoolGroup), "@StagePool[graphicsTexture.render]");
@@ -32954,12 +32916,12 @@ void main(void){
32954
32916
  }
32955
32917
  renderStage(t2) {
32956
32918
  const { task: e2 } = this.stageStates[t2];
32957
- e2.addMTask(() => WR(this, void 0, void 0, function* () {
32919
+ e2.addMTask(() => VR(this, void 0, void 0, function* () {
32958
32920
  const n2 = this.stageImpls[t2], i2 = this.stageCtxs[t2];
32959
- yield n2.render(e2), e2.addSubMTask(() => WR(this, void 0, void 0, function* () {
32921
+ yield n2.render(e2), e2.addSubMTask(() => VR(this, void 0, void 0, function* () {
32960
32922
  var e3;
32961
32923
  const r2 = `snapshot-${t2.toString()}-start`;
32962
- if (!(yield (e3 = this.localstorage) === null || e3 === void 0 ? void 0 : e3.getItem(r2)) && QR.platform.isLowGpuMemory()) {
32924
+ if (!(yield (e3 = this.localstorage) === null || e3 === void 0 ? void 0 : e3.getItem(r2)) && KR.platform.isLowGpuMemory()) {
32963
32925
  n2.createTiming(), n2.container.visible = true, n2.collectMainSeqStartValue(), n2.setMainSeqStep(0, "start");
32964
32926
  const t3 = Hy.create({ width: n2.json.width, height: n2.json.height, resolution: 1 });
32965
32927
  i2.renderer.render(n2.container, { renderTexture: t3 });
@@ -32989,7 +32951,7 @@ void main(void){
32989
32951
  preload(t2, e2 = false) {
32990
32952
  if (this.stageImpls[t2] || this.stageStates[t2])
32991
32953
  return Promise.resolve();
32992
- const n2 = new UR(t2, this.taskId, this.logger);
32954
+ const n2 = new BR(t2, this.taskId, this.logger);
32993
32955
  return n2.on("task-error", (t3, e3) => {
32994
32956
  delete this.stageStates[e3], delete this.stageImpls[e3], delete this.stageCtxs[e3], this.errorChannel.emit("error", t3, e3);
32995
32957
  }), this.stageStates[t2] = { state: "load", task: n2 }, this.createCtx(t2), this.loadStageJson(t2), this.loadSpriteSheets(t2), this.createStage(t2), this.preRenderStage(t2), this.createGraphicsTexture(t2), this.renderStage(t2), this.microTaskManager.addTask(n2), e2 ? n2.applyAll() : new Promise((e3) => {
@@ -33003,7 +32965,7 @@ void main(void){
33003
32965
  return this.stageJsons[t2] || null;
33004
32966
  }
33005
32967
  getStage(t2) {
33006
- return WR(this, void 0, void 0, function* () {
32968
+ return VR(this, void 0, void 0, function* () {
33007
32969
  this.currentStageIndex = t2;
33008
32970
  const e2 = this.stageStates[t2];
33009
32971
  return (e2 == null ? void 0 : e2.state) === "finish" && this.stageImpls[t2] ? this.stageImpls[t2] : (e2 == null ? void 0 : e2.state) === "load" ? (yield e2.task.applyAll(), this.stageImpls[t2]) : (yield this.preload(t2, true), this.stageImpls[t2]);
@@ -33013,7 +32975,7 @@ void main(void){
33013
32975
  this.runningAudio.clear();
33014
32976
  }
33015
32977
  }
33016
- var qR = function(t2, e2, n2, i2) {
32978
+ var XR = function(t2, e2, n2, i2) {
33017
32979
  return new (n2 || (n2 = Promise))(function(r2, o2) {
33018
32980
  function s2(t3) {
33019
32981
  try {
@@ -33038,10 +33000,10 @@ void main(void){
33038
33000
  l2((i2 = i2.apply(t2, e2 || [])).next());
33039
33001
  });
33040
33002
  };
33041
- class YR {
33003
+ class qR {
33042
33004
  constructor(t2) {
33043
33005
  var e2;
33044
- this.logger = t2, this.taskId = "", this.isIndexDBReady = false, this.memoryCache = /* @__PURE__ */ new Map(), (e2 = YR.localCache) === null || e2 === void 0 || e2.ready(() => {
33006
+ this.logger = t2, this.taskId = "", this.isIndexDBReady = false, this.memoryCache = /* @__PURE__ */ new Map(), (e2 = qR.localCache) === null || e2 === void 0 || e2.ready(() => {
33045
33007
  this.isIndexDBReady = true;
33046
33008
  }).catch(() => {
33047
33009
  t2.warn("local storage not ready", this.taskId);
@@ -33054,17 +33016,17 @@ void main(void){
33054
33016
  this.taskId = t2;
33055
33017
  }
33056
33018
  getItem(t2) {
33057
- return qR(this, void 0, void 0, function* () {
33019
+ return XR(this, void 0, void 0, function* () {
33058
33020
  let e2 = null;
33059
- return this.couldUseIndexDBCache && YR.localCache && (e2 = yield iM(() => YR.localCache.getItem(`${this.taskId}/${t2}`), 500)), e2 = e2 === nM ? null : e2, e2 || this.memoryCache.get(t2) || null;
33021
+ return this.couldUseIndexDBCache && qR.localCache && (e2 = yield iM(() => qR.localCache.getItem(`${this.taskId}/${t2}`), 500)), e2 = e2 === nM ? null : e2, e2 || this.memoryCache.get(t2) || null;
33060
33022
  });
33061
33023
  }
33062
33024
  setItem(t2, e2, n2 = false) {
33063
- return qR(this, void 0, void 0, function* () {
33025
+ return XR(this, void 0, void 0, function* () {
33064
33026
  if (!this.couldUseIndexDBCache)
33065
33027
  return n2 && this.memoryCache.set(t2, e2), Promise.resolve();
33066
- if (YR.localCache) {
33067
- (yield iM(() => YR.localCache.setItem(`${this.taskId}/${t2}`, e2).catch(() => {
33028
+ if (qR.localCache) {
33029
+ (yield iM(() => qR.localCache.setItem(`${this.taskId}/${t2}`, e2).catch(() => {
33068
33030
  n2 && this.memoryCache.set(t2, e2);
33069
33031
  }), 500)) === nM && n2 && this.memoryCache.set(t2, e2);
33070
33032
  }
@@ -33072,21 +33034,21 @@ void main(void){
33072
33034
  }
33073
33035
  dispose() {
33074
33036
  var t2;
33075
- this.memoryCache = /* @__PURE__ */ new Map(), this.couldUseIndexDBCache && ((t2 = YR.localCache) === null || t2 === void 0 || t2.keys().then((t3) => {
33037
+ this.memoryCache = /* @__PURE__ */ new Map(), this.couldUseIndexDBCache && ((t2 = qR.localCache) === null || t2 === void 0 || t2.keys().then((t3) => {
33076
33038
  t3.filter((t4) => t4.indexOf(this.taskId) >= 0).forEach((t4) => {
33077
33039
  var e2;
33078
- (e2 = YR.localCache) === null || e2 === void 0 || e2.removeItem(t4).catch(() => {
33040
+ (e2 = qR.localCache) === null || e2 === void 0 || e2.removeItem(t4).catch(() => {
33079
33041
  });
33080
33042
  });
33081
33043
  }));
33082
33044
  }
33083
33045
  }
33084
- YR.localCache = null;
33046
+ qR.localCache = null;
33085
33047
  try {
33086
- YR.localCache = o.createInstance({ name: "slide_local_cache", driver: o.INDEXEDDB, version: 1 });
33048
+ qR.localCache = o.createInstance({ name: "slide_local_cache", driver: o.INDEXEDDB, version: 1 });
33087
33049
  } catch (t2) {
33088
33050
  }
33089
- class ZR extends a.a {
33051
+ class YR extends a.a {
33090
33052
  constructor() {
33091
33053
  super(...arguments), this._volume = 0.5;
33092
33054
  }
@@ -33097,7 +33059,7 @@ void main(void){
33097
33059
  t2 < 0 && (t2 = 0), t2 > 1 && (t2 = 1), this._volume = t2, this.emit("update", this._volume);
33098
33060
  }
33099
33061
  }
33100
- var JR = function(t2, e2, n2, i2) {
33062
+ var ZR = function(t2, e2, n2, i2) {
33101
33063
  return new (n2 || (n2 = Promise))(function(r2, o2) {
33102
33064
  function s2(t3) {
33103
33065
  try {
@@ -33123,14 +33085,14 @@ void main(void){
33123
33085
  });
33124
33086
  };
33125
33087
  r.skipHello();
33126
- const $R = { randomBar: "RandomLines", circle: "Shape", ripple: "Ripples", wipe: "Erase", dissolve: "Dissolve", morph: "Smooth", fade: "FadeInOut", push: "Push", split: "Separation", reveal: "Display", pull: "Uncover", cover: "Cover", flash: "Flash", checker: "Checkerboard", blinds: "WindowShades", curtains: "Curtain", fallOver: "Fall", drape: "Suspension", wheel: "Clock", comb: "Combing", warp: "Scale", peelOff: "PeelOff", flip: "Flip" }, KR = { mainSeqStepChange: "mainSeqStepChange", mainSeqStateChange: "mainSeqStateChange", interactiveSeqStateChange: "interactiveSeqStateChange", interactiveSeqAction: "interactiveSeqAction", mainSeqStepStart: "mainSeqStepStart", mainSeqStepEnd: "mainSeqStepEnd", slideChange: "slideChange", renderStart: "renderStart", renderEnd: "renderEnd", hyperlinkTrigger: "hyperlinkTrigger", animateStart: "animateStart", animateEnd: "animateEnd", mediaSeek: "mediaSeek", mediaPlay: "mediaPlay", mediaPause: "mediaPause", requestNextSlide: "requestNextSlide", requestPrevSlide: "requestPrevSlide", requestGotoSlide: "requestGotoSlide", userInput: "userInput" };
33127
- class QR extends a.a {
33088
+ const JR = { randomBar: "RandomLines", circle: "Shape", ripple: "Ripples", wipe: "Erase", dissolve: "Dissolve", morph: "Smooth", fade: "FadeInOut", push: "Push", split: "Separation", reveal: "Display", pull: "Uncover", cover: "Cover", flash: "Flash", checker: "Checkerboard", blinds: "WindowShades", curtains: "Curtain", fallOver: "Fall", drape: "Suspension", wheel: "Clock", comb: "Combing", warp: "Scale", peelOff: "PeelOff", flip: "Flip" }, $R = { mainSeqStepChange: "mainSeqStepChange", mainSeqStateChange: "mainSeqStateChange", interactiveSeqStateChange: "interactiveSeqStateChange", interactiveSeqAction: "interactiveSeqAction", mainSeqStepStart: "mainSeqStepStart", mainSeqStepEnd: "mainSeqStepEnd", slideChange: "slideChange", renderStart: "renderStart", renderEnd: "renderEnd", hyperlinkTrigger: "hyperlinkTrigger", animateStart: "animateStart", animateEnd: "animateEnd", mediaSeek: "mediaSeek", mediaPlay: "mediaPlay", mediaPause: "mediaPause", requestNextSlide: "requestNextSlide", requestPrevSlide: "requestPrevSlide", requestGotoSlide: "requestGotoSlide", userInput: "userInput" };
33089
+ class KR extends a.a {
33128
33090
  constructor(t2, e2 = {}) {
33129
- super(), this.errorChannel = new a.a(), this.transactionPlayer = null, this.transactionSprite = new Ow(), this.isForward = true, this.drawCall = 0, this.scale = 1, this.prevSlideBase64 = null, this._isPaused = false, this.maxResolution = new v_(0, 0), this.volumeAdjuster = new ZR(), this.fps = new XE(), this.designWidth = 0, this.designHeight = 0, this.currentIndex = 0, this.slideCount = 0, this.runtime = { drawCall: 0, fps: 0 }, this.isPlayerPaused = () => this._isPaused, this.onWebGLLost = () => {
33091
+ super(), this.errorChannel = new a.a(), this.transactionPlayer = null, this.transactionSprite = new Ow(), this.isForward = true, this.drawCall = 0, this.scale = 1, this.prevSlideBase64 = null, this._isPaused = false, this.maxResolution = new v_(0, 0), this.fps = new XE(), this.designWidth = 0, this.designHeight = 0, this.currentIndex = 0, this.slideCount = 0, this.runtime = { drawCall: 0, fps: 0 }, this.isPlayerPaused = () => this._isPaused, this.onWebGLLost = () => {
33130
33092
  this.errorChannel.emit("error", new qE(VE.CanvasCrash, "webgl context lost."));
33131
- }, this.logger = t2.logger, this.mode = t2.mode, this.localStorage = new YR(this.logger);
33093
+ }, this.logger = t2.logger, this.mode = t2.mode, this.volumeAdjuster = t2.volumeAdjuster, this.localStorage = new qR(this.logger);
33132
33094
  let n2 = Math.max(window.devicePixelRatio, 2);
33133
- VR.isDesktop() || (n2 = 1), this.config = { minFPS: Object(l.isUndefined)(e2.minFPS) ? 30 : e2.minFPS, maxFPS: Object(l.isUndefined)(e2.maxFPS) ? 40 : e2.maxFPS, resolution: Object(l.isUndefined)(e2.resolution) ? n2 : e2.resolution, autoFPS: !Object(l.isUndefined)(e2.autoFPS) && e2.autoFPS, autoResolution: !Object(l.isUndefined)(e2.autoResolution) && e2.autoResolution, transactionBgColor: Object(l.isUndefined)(e2.transactionBgColor) ? 0 : e2.transactionBgColor, maxResolutionLevel: this.getMaxResolution(e2.maxResolutionLevel) }, this.updateMaxResolutionLevel(this.config.maxResolutionLevel), this.loader = new sM(this.localStorage, t2.useLocalCache, this.logger, t2.resourceTimeout, t2.loadDelegate), this.app = new Lb({ antialias: true, autoDensity: false, backgroundColor: 16777215 }), this.updateConfig(this.config), this.app.view.style.zIndex = "1", this.app.stage.sortableChildren = true;
33095
+ jR.isDesktop() || (n2 = 1), this.config = { minFPS: Object(l.isUndefined)(e2.minFPS) ? 30 : e2.minFPS, maxFPS: Object(l.isUndefined)(e2.maxFPS) ? 40 : e2.maxFPS, resolution: Object(l.isUndefined)(e2.resolution) ? n2 : e2.resolution, autoFPS: !Object(l.isUndefined)(e2.autoFPS) && e2.autoFPS, autoResolution: !Object(l.isUndefined)(e2.autoResolution) && e2.autoResolution, transactionBgColor: Object(l.isUndefined)(e2.transactionBgColor) ? 0 : e2.transactionBgColor, maxResolutionLevel: this.getMaxResolution(e2.maxResolutionLevel) }, this.updateMaxResolutionLevel(this.config.maxResolutionLevel), this.loader = new sM(this.localStorage, t2.useLocalCache, this.logger, t2.resourceTimeout, t2.loadDelegate), this.app = new Lb({ antialias: true, autoDensity: false, backgroundColor: 16777215 }), this.updateConfig(this.config), this.app.view.style.zIndex = "1", this.app.stage.sortableChildren = true;
33134
33096
  const i2 = this.app.renderer, { drawElements: r2 } = i2.gl;
33135
33097
  i2.gl.drawElements = (...t3) => {
33136
33098
  r2.call(i2.gl, ...t3), this.drawCall += 1;
@@ -33156,7 +33118,7 @@ void main(void){
33156
33118
  }
33157
33119
  }), this.app.ticker.add(() => {
33158
33120
  this.runtime.drawCall = this.drawCall, this.runtime.fps = Math.floor(this.app.ticker.minFPS), this.drawCall = 0;
33159
- }, null, ey.LOW), this.clock = new lM(this.app.ticker), this.objPoolGroup = eM(), this.stagePool = new XR(this.loader, this.mode, this.app.renderer, this.app.ticker, this.app.view, this.clock, this.objPoolGroup, this.errorChannel, this.localStorage, this.logger, t2.loadDelegate, this.isPlayerPaused, this.maxResolution, this.volumeAdjuster), this.app.view.addEventListener("webglcontextlost", this.onWebGLLost);
33121
+ }, null, ey.LOW), this.clock = new lM(this.app.ticker), this.objPoolGroup = eM(), this.stagePool = new WR(this.loader, this.mode, this.app.renderer, this.app.ticker, this.app.view, this.clock, this.objPoolGroup, this.errorChannel, this.localStorage, this.logger, t2.loadDelegate, this.isPlayerPaused, this.maxResolution, this.volumeAdjuster), this.app.view.addEventListener("webglcontextlost", this.onWebGLLost);
33160
33122
  try {
33161
33123
  this.transactionPlayer = new og();
33162
33124
  } catch (t3) {
@@ -33175,7 +33137,7 @@ void main(void){
33175
33137
  return ((t2 = this.currentStage) === null || t2 === void 0 ? void 0 : t2.json.prevIndex) ? this.currentStage.json.prevIndex : this.currentIndex - 1;
33176
33138
  }
33177
33139
  getMaxResolution(t2) {
33178
- return !Object(l.isUndefined)(t2) && Number.isInteger(t2) ? (t2 < 1 && (t2 = 1), t2 > 4 && (t2 = 4), t2) : QR.platform.isAndroid() || QR.platform.isIOS() ? 2 : 4;
33140
+ return !Object(l.isUndefined)(t2) && Number.isInteger(t2) ? (t2 < 1 && (t2 = 1), t2 > 4 && (t2 = 4), t2) : KR.platform.isAndroid() || KR.platform.isIOS() ? 2 : 4;
33179
33141
  }
33180
33142
  updateMaxResolutionLevel(t2) {
33181
33143
  t2 < 1 && (t2 = 1), t2 > 4 && (t2 = 4);
@@ -33186,7 +33148,7 @@ void main(void){
33186
33148
  Object(l.isUndefined)(t2.minFPS) || (this.config.minFPS = t2.minFPS, this.app.ticker.minFPS = t2.minFPS), Object(l.isUndefined)(t2.maxFPS) || (this.config.maxFPS = t2.maxFPS, this.app.ticker.maxFPS = t2.maxFPS), Object(l.isUndefined)(t2.resolution) || (this.config.resolution = t2.resolution, this.updateResolution(this.scale * this.config.resolution)), Object(l.isUndefined)(t2.autoFPS) || (this.config.autoFPS = t2.autoFPS), Object(l.isUndefined)(t2.autoResolution) || (this.config.autoResolution = t2.autoResolution), Object(l.isUndefined)(t2.transactionBgColor) || (this.config.transactionBgColor = t2.transactionBgColor), this.taskId && this.logger.info("ppt player update config: " + JSON.stringify(this.config), this.taskId), Object(l.isUndefined)(t2.maxResolutionLevel) || (this.config.maxResolutionLevel = t2.maxResolutionLevel, this.updateMaxResolutionLevel(this.config.maxResolutionLevel));
33187
33149
  }
33188
33150
  preload(t2) {
33189
- return JR(this, void 0, void 0, function* () {
33151
+ return ZR(this, void 0, void 0, function* () {
33190
33152
  t2 < 1 || t2 > this.slideCount || (this.logger.info(`preload slide ${t2} begin`, this.taskId), yield this.stagePool.preload(t2), this.logger.info(`preload slide ${t2} end`, this.taskId));
33191
33153
  });
33192
33154
  }
@@ -33205,14 +33167,14 @@ void main(void){
33205
33167
  }
33206
33168
  renderSlide(t2, e2 = false) {
33207
33169
  var n2;
33208
- return JR(this, void 0, void 0, function* () {
33170
+ return ZR(this, void 0, void 0, function* () {
33209
33171
  if (this._isPaused)
33210
33172
  return void this.logger.info("ppt play prevent render slide with paused state", this.taskId);
33211
- this.logger.info("render slide " + t2, this.taskId), this.emit(KR.renderStart, t2);
33173
+ this.logger.info("render slide " + t2, this.taskId), this.emit($R.renderStart, t2);
33212
33174
  const i2 = yield this.stagePool.getStage(t2);
33213
33175
  if (!i2)
33214
33176
  return;
33215
- this.translateEvent(i2.ctx.eventHub, [KR.mainSeqStepChange, KR.mainSeqStateChange, KR.hyperlinkTrigger, KR.interactiveSeqAction, KR.mainSeqStepStart, KR.mainSeqStepEnd, KR.animateStart, KR.animateEnd, KR.mediaPlay, KR.mediaPause, KR.mediaSeek, KR.requestGotoSlide, KR.requestNextSlide, KR.requestPrevSlide, KR.interactiveSeqStateChange, KR.userInput]), this.currentIndex = Number(t2);
33177
+ this.translateEvent(i2.ctx.eventHub, [$R.mainSeqStepChange, $R.mainSeqStateChange, $R.hyperlinkTrigger, $R.interactiveSeqAction, $R.mainSeqStepStart, $R.mainSeqStepEnd, $R.animateStart, $R.animateEnd, $R.mediaPlay, $R.mediaPause, $R.mediaSeek, $R.requestGotoSlide, $R.requestNextSlide, $R.requestPrevSlide, $R.interactiveSeqStateChange, $R.userInput]), this.currentIndex = Number(t2);
33216
33178
  const { width: r2, height: o2, slideCount: s2 } = i2.json;
33217
33179
  this.slideCount = s2, this.designWidth = r2, this.designHeight = o2, i2.json.transition && i2.json.transition.type && !this.prevSlideBase64 && this.currentStage && (this.prevSlideBase64 = this.getBase64(this.currentStage)), (n2 = this.currentStage) === null || n2 === void 0 || n2.clearOnSlideChange();
33218
33180
  const a2 = this.currentStage;
@@ -33224,7 +33186,7 @@ void main(void){
33224
33186
  }
33225
33187
  i2.container.visible = false, this.app.stage.addChild(i2.container);
33226
33188
  let { transition: u2 } = i2.json;
33227
- !this.isForward && (a2 == null ? void 0 : a2.json.transition) && (u2 = a2.json.transition), this.prevSlideBase64 && l2 && u2 && u2.type && a2 && i2 && (yield this.playTransaction(this.prevSlideBase64, l2, u2, a2, i2), this.prevSlideBase64 = null), this.isForward ? yield i2.startTiming() : i2.setMainSeqApplied(), this.updateResolution(this.config.resolution * this.scale), i2.container.visible = true, a2 && (a2.setMainSeqStep(0, "start"), a2.clearOnTransactionEnd(), this.app.stage.removeChild(a2.container)), i2.ctx.slideScopeEventHub.emit("slide-render", i2.ctx.slideIndex), this.emit(KR.renderEnd, t2), this.emit(KR.slideChange, t2), this.preload(t2 + 1).catch((e3) => {
33189
+ !this.isForward && (a2 == null ? void 0 : a2.json.transition) && (u2 = a2.json.transition), this.prevSlideBase64 && l2 && u2 && u2.type && a2 && i2 && (yield this.playTransaction(this.prevSlideBase64, l2, u2, a2, i2), this.prevSlideBase64 = null), this.isForward ? yield i2.startTiming() : i2.setMainSeqApplied(), this.updateResolution(this.config.resolution * this.scale), i2.container.visible = true, a2 && (a2.setMainSeqStep(0, "start"), a2.clearOnTransactionEnd(), this.app.stage.removeChild(a2.container)), i2.ctx.slideScopeEventHub.emit("slide-render", i2.ctx.slideIndex), this.emit($R.renderEnd, t2), this.emit($R.slideChange, t2), this.preload(t2 + 1).catch((e3) => {
33228
33190
  this.errorChannel.emit("error", qE.transform(e3), t2 + 1);
33229
33191
  }), this.preload(t2 - 1).catch((e3) => {
33230
33192
  this.errorChannel.emit("error", qE.transform(e3), t2 - 1);
@@ -33232,7 +33194,7 @@ void main(void){
33232
33194
  });
33233
33195
  }
33234
33196
  renderToBase64(t2, e2, n2) {
33235
- return JR(this, void 0, void 0, function* () {
33197
+ return ZR(this, void 0, void 0, function* () {
33236
33198
  const i2 = yield this.stagePool.getStage(t2);
33237
33199
  if (i2) {
33238
33200
  const { width: r2, height: o2 } = i2.json;
@@ -33254,16 +33216,16 @@ void main(void){
33254
33216
  return e2.destroy(true), n2;
33255
33217
  }
33256
33218
  playTransaction(t2, e2, n2, i2, r2) {
33257
- return JR(this, void 0, void 0, function* () {
33219
+ return ZR(this, void 0, void 0, function* () {
33258
33220
  const o2 = this.app.view.parentElement;
33259
- if (t2 && e2 && o2 && $R[n2.type] && this.transactionPlayer) {
33221
+ if (t2 && e2 && o2 && JR[n2.type] && this.transactionPlayer) {
33260
33222
  this.transactionSprite.zIndex = 999, this.transactionSprite.visible = false, this.app.stage.addChild(this.transactionSprite);
33261
33223
  const o3 = this.transactionPlayer.renderer.domElement, s2 = ky.from(o3), a2 = () => s2.update();
33262
33224
  return this.app.ticker.add(a2), this.transactionSprite.texture = s2, setTimeout(() => {
33263
33225
  this.transactionSprite.visible = true;
33264
33226
  }, 100), new Promise((o4) => {
33265
33227
  var s3, l2, u2, h2;
33266
- (s3 = this.transactionPlayer) === null || s3 === void 0 || s3.play({ reverse: !this.isForward, prevTextureUrl: t2, nextTextureUrl: e2, textureWidth: this.designWidth, textureHeight: this.designHeight, presetType: $R[n2.type], stageWidth: this.designWidth, stageHeight: this.designHeight, duration: (u2 = (l2 = this.currentStage) === null || l2 === void 0 ? void 0 : l2.json.transition) === null || u2 === void 0 ? void 0 : u2.dur, delay: 0, clearColor: this.config.transactionBgColor, maxFPS: Math.ceil((h2 = this.config.maxFPS) !== null && h2 !== void 0 ? h2 : 60), onTransactionEnd: () => {
33228
+ (s3 = this.transactionPlayer) === null || s3 === void 0 || s3.play({ reverse: !this.isForward, prevTextureUrl: t2, nextTextureUrl: e2, textureWidth: this.designWidth, textureHeight: this.designHeight, presetType: JR[n2.type], stageWidth: this.designWidth, stageHeight: this.designHeight, duration: (u2 = (l2 = this.currentStage) === null || l2 === void 0 ? void 0 : l2.json.transition) === null || u2 === void 0 ? void 0 : u2.dur, delay: 0, clearColor: this.config.transactionBgColor, maxFPS: Math.ceil((h2 = this.config.maxFPS) !== null && h2 !== void 0 ? h2 : 60), onTransactionEnd: () => {
33267
33229
  var t3, e3;
33268
33230
  o4(), i2.container.visible = false, r2.container.visible = true, (t3 = this.app.stage) === null || t3 === void 0 || t3.removeChild(this.transactionSprite), (e3 = this.app.ticker) === null || e3 === void 0 || e3.remove(a2);
33269
33231
  } });
@@ -33281,7 +33243,7 @@ void main(void){
33281
33243
  }
33282
33244
  updateResolution(t2, e2) {
33283
33245
  this.app.ticker.addOnce(() => {
33284
- let n2 = VR.isDesktop() ? t2 : 1;
33246
+ let n2 = jR.isDesktop() ? t2 : 1;
33285
33247
  for (; n2 * this.designWidth > this.maxResolution.x || n2 * this.designHeight > this.maxResolution.y; )
33286
33248
  n2 -= 0.1;
33287
33249
  this.app.renderer.resolution = n2, this.app.renderer.plugins.interaction.resolution = this.app.renderer.resolution, this.app.renderer.resize(this.designWidth, this.designHeight), Object(l.isFunction)(e2) && e2();
@@ -33356,7 +33318,7 @@ void main(void){
33356
33318
  }
33357
33319
  setMediaState(t2, e2) {
33358
33320
  var n2;
33359
- return JR(this, void 0, void 0, function* () {
33321
+ return ZR(this, void 0, void 0, function* () {
33360
33322
  yield (n2 = this.currentStage) === null || n2 === void 0 ? void 0 : n2.setMediaState(t2, e2);
33361
33323
  });
33362
33324
  }
@@ -33380,7 +33342,7 @@ void main(void){
33380
33342
  return this.currentStage && this.getBase64(this.currentStage) || "";
33381
33343
  }
33382
33344
  createSnapshotForNextSlide(t2) {
33383
- return JR(this, void 0, void 0, function* () {
33345
+ return ZR(this, void 0, void 0, function* () {
33384
33346
  const e2 = this.nextSlideIndex, n2 = this.stagePool.getStageJson(e2);
33385
33347
  if (n2 && n2.transition && n2.transition.type && this.currentStage && this.transactionPlayer) {
33386
33348
  const e3 = t2 ? `snapshot-${this.currentStage.json.index}-start` : `snapshot-${this.currentStage.json.index}-end`;
@@ -33399,12 +33361,9 @@ void main(void){
33399
33361
  }
33400
33362
  static clearLocalCache() {
33401
33363
  var t2;
33402
- (t2 = YR.localCache) === null || t2 === void 0 || t2.clear().catch(() => {
33364
+ (t2 = qR.localCache) === null || t2 === void 0 || t2.clear().catch(() => {
33403
33365
  });
33404
33366
  }
33405
- updateGlobalVolume(t2) {
33406
- this.volumeAdjuster.volume = t2;
33407
- }
33408
33367
  destroy() {
33409
33368
  var t2;
33410
33369
  try {
@@ -33423,23 +33382,23 @@ void main(void){
33423
33382
  }
33424
33383
  }
33425
33384
  }
33426
- QR.platform = VR, QR.RtcAudioClazz = null;
33427
- var tP = /* @__PURE__ */ new Map();
33428
- function eP(t2) {
33429
- var e2 = tP.get(t2.hookPoint) || [];
33430
- e2.push(t2), tP.set(t2.hookPoint, e2);
33385
+ KR.platform = jR, KR.RtcAudioClazz = null;
33386
+ var QR = /* @__PURE__ */ new Map();
33387
+ function tP(t2) {
33388
+ var e2 = QR.get(t2.hookPoint) || [];
33389
+ e2.push(t2), QR.set(t2.hookPoint, e2);
33431
33390
  }
33432
- var nP, iP = [], rP = "ResizeObserver loop completed with undelivered notifications.";
33391
+ var eP, nP = [], iP = "ResizeObserver loop completed with undelivered notifications.";
33433
33392
  !function(t2) {
33434
33393
  t2.BORDER_BOX = "border-box", t2.CONTENT_BOX = "content-box", t2.DEVICE_PIXEL_CONTENT_BOX = "device-pixel-content-box";
33435
- }(nP || (nP = {}));
33436
- var oP, sP = function(t2) {
33394
+ }(eP || (eP = {}));
33395
+ var rP, oP = function(t2) {
33437
33396
  return Object.freeze(t2);
33438
- }, aP = function(t2, e2) {
33439
- this.inlineSize = t2, this.blockSize = e2, sP(this);
33440
- }, lP = function() {
33397
+ }, sP = function(t2, e2) {
33398
+ this.inlineSize = t2, this.blockSize = e2, oP(this);
33399
+ }, aP = function() {
33441
33400
  function t2(t3, e2, n2, i2) {
33442
- return this.x = t3, this.y = e2, this.width = n2, this.height = i2, this.top = this.y, this.left = this.x, this.bottom = this.top + this.height, this.right = this.left + this.width, sP(this);
33401
+ return this.x = t3, this.y = e2, this.width = n2, this.height = i2, this.top = this.y, this.left = this.x, this.bottom = this.top + this.height, this.right = this.left + this.width, oP(this);
33443
33402
  }
33444
33403
  return t2.prototype.toJSON = function() {
33445
33404
  var t3 = this;
@@ -33447,59 +33406,59 @@ void main(void){
33447
33406
  }, t2.fromRect = function(e2) {
33448
33407
  return new t2(e2.x, e2.y, e2.width, e2.height);
33449
33408
  }, t2;
33450
- }(), uP = function(t2) {
33409
+ }(), lP = function(t2) {
33451
33410
  return t2 instanceof SVGElement && "getBBox" in t2;
33452
- }, hP = function(t2) {
33453
- if (uP(t2)) {
33411
+ }, uP = function(t2) {
33412
+ if (lP(t2)) {
33454
33413
  var e2 = t2.getBBox(), n2 = e2.width, i2 = e2.height;
33455
33414
  return !n2 && !i2;
33456
33415
  }
33457
33416
  var r2 = t2, o2 = r2.offsetWidth, s2 = r2.offsetHeight;
33458
33417
  return !(o2 || s2 || t2.getClientRects().length);
33459
- }, cP = function(t2) {
33418
+ }, hP = function(t2) {
33460
33419
  var e2, n2;
33461
33420
  if (t2 instanceof Element)
33462
33421
  return true;
33463
33422
  var i2 = (n2 = (e2 = t2) === null || e2 === void 0 ? void 0 : e2.ownerDocument) === null || n2 === void 0 ? void 0 : n2.defaultView;
33464
33423
  return !!(i2 && t2 instanceof i2.Element);
33465
- }, dP = typeof window != "undefined" ? window : {}, pP = /* @__PURE__ */ new WeakMap(), fP = /auto|scroll/, mP = /^tb|vertical/, gP = /msie|trident/i.test(dP.navigator && dP.navigator.userAgent), vP = function(t2) {
33424
+ }, cP = typeof window != "undefined" ? window : {}, dP = /* @__PURE__ */ new WeakMap(), pP = /auto|scroll/, fP = /^tb|vertical/, mP = /msie|trident/i.test(cP.navigator && cP.navigator.userAgent), gP = function(t2) {
33466
33425
  return parseFloat(t2 || "0");
33467
- }, _P = function(t2, e2, n2) {
33468
- return t2 === void 0 && (t2 = 0), e2 === void 0 && (e2 = 0), n2 === void 0 && (n2 = false), new aP((n2 ? e2 : t2) || 0, (n2 ? t2 : e2) || 0);
33469
- }, yP = sP({ devicePixelContentBoxSize: _P(), borderBoxSize: _P(), contentBoxSize: _P(), contentRect: new lP(0, 0, 0, 0) }), xP = function(t2, e2) {
33470
- if (e2 === void 0 && (e2 = false), pP.has(t2) && !e2)
33471
- return pP.get(t2);
33472
- if (hP(t2))
33473
- return pP.set(t2, yP), yP;
33474
- var n2 = getComputedStyle(t2), i2 = uP(t2) && t2.ownerSVGElement && t2.getBBox(), r2 = !gP && n2.boxSizing === "border-box", o2 = mP.test(n2.writingMode || ""), s2 = !i2 && fP.test(n2.overflowY || ""), a2 = !i2 && fP.test(n2.overflowX || ""), l2 = i2 ? 0 : vP(n2.paddingTop), u2 = i2 ? 0 : vP(n2.paddingRight), h2 = i2 ? 0 : vP(n2.paddingBottom), c2 = i2 ? 0 : vP(n2.paddingLeft), d2 = i2 ? 0 : vP(n2.borderTopWidth), p2 = i2 ? 0 : vP(n2.borderRightWidth), f2 = i2 ? 0 : vP(n2.borderBottomWidth), m2 = c2 + u2, g2 = l2 + h2, v2 = (i2 ? 0 : vP(n2.borderLeftWidth)) + p2, _2 = d2 + f2, y2 = a2 ? t2.offsetHeight - _2 - t2.clientHeight : 0, x2 = s2 ? t2.offsetWidth - v2 - t2.clientWidth : 0, b2 = r2 ? m2 + v2 : 0, T2 = r2 ? g2 + _2 : 0, w2 = i2 ? i2.width : vP(n2.width) - b2 - x2, S2 = i2 ? i2.height : vP(n2.height) - T2 - y2, E2 = w2 + m2 + x2 + v2, M2 = S2 + g2 + y2 + _2, A2 = sP({ devicePixelContentBoxSize: _P(Math.round(w2 * devicePixelRatio), Math.round(S2 * devicePixelRatio), o2), borderBoxSize: _P(E2, M2, o2), contentBoxSize: _P(w2, S2, o2), contentRect: new lP(c2, l2, w2, S2) });
33475
- return pP.set(t2, A2), A2;
33476
- }, bP = function(t2, e2, n2) {
33477
- var i2 = xP(t2, n2), r2 = i2.borderBoxSize, o2 = i2.contentBoxSize, s2 = i2.devicePixelContentBoxSize;
33426
+ }, vP = function(t2, e2, n2) {
33427
+ return t2 === void 0 && (t2 = 0), e2 === void 0 && (e2 = 0), n2 === void 0 && (n2 = false), new sP((n2 ? e2 : t2) || 0, (n2 ? t2 : e2) || 0);
33428
+ }, _P = oP({ devicePixelContentBoxSize: vP(), borderBoxSize: vP(), contentBoxSize: vP(), contentRect: new aP(0, 0, 0, 0) }), yP = function(t2, e2) {
33429
+ if (e2 === void 0 && (e2 = false), dP.has(t2) && !e2)
33430
+ return dP.get(t2);
33431
+ if (uP(t2))
33432
+ return dP.set(t2, _P), _P;
33433
+ var n2 = getComputedStyle(t2), i2 = lP(t2) && t2.ownerSVGElement && t2.getBBox(), r2 = !mP && n2.boxSizing === "border-box", o2 = fP.test(n2.writingMode || ""), s2 = !i2 && pP.test(n2.overflowY || ""), a2 = !i2 && pP.test(n2.overflowX || ""), l2 = i2 ? 0 : gP(n2.paddingTop), u2 = i2 ? 0 : gP(n2.paddingRight), h2 = i2 ? 0 : gP(n2.paddingBottom), c2 = i2 ? 0 : gP(n2.paddingLeft), d2 = i2 ? 0 : gP(n2.borderTopWidth), p2 = i2 ? 0 : gP(n2.borderRightWidth), f2 = i2 ? 0 : gP(n2.borderBottomWidth), m2 = c2 + u2, g2 = l2 + h2, v2 = (i2 ? 0 : gP(n2.borderLeftWidth)) + p2, _2 = d2 + f2, y2 = a2 ? t2.offsetHeight - _2 - t2.clientHeight : 0, x2 = s2 ? t2.offsetWidth - v2 - t2.clientWidth : 0, b2 = r2 ? m2 + v2 : 0, T2 = r2 ? g2 + _2 : 0, w2 = i2 ? i2.width : gP(n2.width) - b2 - x2, S2 = i2 ? i2.height : gP(n2.height) - T2 - y2, E2 = w2 + m2 + x2 + v2, M2 = S2 + g2 + y2 + _2, A2 = oP({ devicePixelContentBoxSize: vP(Math.round(w2 * devicePixelRatio), Math.round(S2 * devicePixelRatio), o2), borderBoxSize: vP(E2, M2, o2), contentBoxSize: vP(w2, S2, o2), contentRect: new aP(c2, l2, w2, S2) });
33434
+ return dP.set(t2, A2), A2;
33435
+ }, xP = function(t2, e2, n2) {
33436
+ var i2 = yP(t2, n2), r2 = i2.borderBoxSize, o2 = i2.contentBoxSize, s2 = i2.devicePixelContentBoxSize;
33478
33437
  switch (e2) {
33479
- case nP.DEVICE_PIXEL_CONTENT_BOX:
33438
+ case eP.DEVICE_PIXEL_CONTENT_BOX:
33480
33439
  return s2;
33481
- case nP.BORDER_BOX:
33440
+ case eP.BORDER_BOX:
33482
33441
  return r2;
33483
33442
  default:
33484
33443
  return o2;
33485
33444
  }
33445
+ }, bP = function(t2) {
33446
+ var e2 = yP(t2);
33447
+ this.target = t2, this.contentRect = e2.contentRect, this.borderBoxSize = oP([e2.borderBoxSize]), this.contentBoxSize = oP([e2.contentBoxSize]), this.devicePixelContentBoxSize = oP([e2.devicePixelContentBoxSize]);
33486
33448
  }, TP = function(t2) {
33487
- var e2 = xP(t2);
33488
- this.target = t2, this.contentRect = e2.contentRect, this.borderBoxSize = sP([e2.borderBoxSize]), this.contentBoxSize = sP([e2.contentBoxSize]), this.devicePixelContentBoxSize = sP([e2.devicePixelContentBoxSize]);
33489
- }, wP = function(t2) {
33490
- if (hP(t2))
33449
+ if (uP(t2))
33491
33450
  return 1 / 0;
33492
33451
  for (var e2 = 0, n2 = t2.parentNode; n2; )
33493
33452
  e2 += 1, n2 = n2.parentNode;
33494
33453
  return e2;
33495
- }, SP = function() {
33454
+ }, wP = function() {
33496
33455
  var t2 = 1 / 0, e2 = [];
33497
- iP.forEach(function(n3) {
33456
+ nP.forEach(function(n3) {
33498
33457
  if (n3.activeTargets.length !== 0) {
33499
33458
  var i3 = [];
33500
33459
  n3.activeTargets.forEach(function(e3) {
33501
- var n4 = new TP(e3.target), r2 = wP(e3.target);
33502
- i3.push(n4), e3.lastReportedSize = bP(e3.target, e3.observedBox), r2 < t2 && (t2 = r2);
33460
+ var n4 = new bP(e3.target), r2 = TP(e3.target);
33461
+ i3.push(n4), e3.lastReportedSize = xP(e3.target, e3.observedBox), r2 < t2 && (t2 = r2);
33503
33462
  }), e2.push(function() {
33504
33463
  n3.callback.call(n3.observer, i3, n3.observer);
33505
33464
  }), n3.activeTargets.splice(0, n3.activeTargets.length);
@@ -33509,36 +33468,36 @@ void main(void){
33509
33468
  (0, i2[n2])();
33510
33469
  }
33511
33470
  return t2;
33512
- }, EP = function(t2) {
33513
- iP.forEach(function(e2) {
33471
+ }, SP = function(t2) {
33472
+ nP.forEach(function(e2) {
33514
33473
  e2.activeTargets.splice(0, e2.activeTargets.length), e2.skippedTargets.splice(0, e2.skippedTargets.length), e2.observationTargets.forEach(function(n2) {
33515
- n2.isActive() && (wP(n2.target) > t2 ? e2.activeTargets.push(n2) : e2.skippedTargets.push(n2));
33474
+ n2.isActive() && (TP(n2.target) > t2 ? e2.activeTargets.push(n2) : e2.skippedTargets.push(n2));
33516
33475
  });
33517
33476
  });
33518
- }, MP = function() {
33477
+ }, EP = function() {
33519
33478
  var t2, e2 = 0;
33520
- for (EP(e2); iP.some(function(t3) {
33479
+ for (SP(e2); nP.some(function(t3) {
33521
33480
  return t3.activeTargets.length > 0;
33522
33481
  }); )
33523
- e2 = SP(), EP(e2);
33524
- return iP.some(function(t3) {
33482
+ e2 = wP(), SP(e2);
33483
+ return nP.some(function(t3) {
33525
33484
  return t3.skippedTargets.length > 0;
33526
- }) && (typeof ErrorEvent == "function" ? t2 = new ErrorEvent("error", { message: rP }) : ((t2 = document.createEvent("Event")).initEvent("error", false, false), t2.message = rP), window.dispatchEvent(t2)), e2 > 0;
33527
- }, AP = [], RP = function(t2) {
33528
- if (!oP) {
33485
+ }) && (typeof ErrorEvent == "function" ? t2 = new ErrorEvent("error", { message: iP }) : ((t2 = document.createEvent("Event")).initEvent("error", false, false), t2.message = iP), window.dispatchEvent(t2)), e2 > 0;
33486
+ }, MP = [], AP = function(t2) {
33487
+ if (!rP) {
33529
33488
  var e2 = 0, n2 = document.createTextNode("");
33530
33489
  new MutationObserver(function() {
33531
- return AP.splice(0).forEach(function(t3) {
33490
+ return MP.splice(0).forEach(function(t3) {
33532
33491
  return t3();
33533
33492
  });
33534
- }).observe(n2, { characterData: true }), oP = function() {
33493
+ }).observe(n2, { characterData: true }), rP = function() {
33535
33494
  n2.textContent = "" + (e2 ? e2-- : e2++);
33536
33495
  };
33537
33496
  }
33538
- AP.push(t2), oP();
33539
- }, PP = 0, CP = { attributes: true, characterData: true, childList: true, subtree: true }, IP = ["resize", "load", "transitionend", "animationend", "animationstart", "animationiteration", "keyup", "keydown", "mouseup", "mousedown", "mouseover", "mouseout", "blur", "focus"], OP = function(t2) {
33497
+ MP.push(t2), rP();
33498
+ }, RP = 0, PP = { attributes: true, characterData: true, childList: true, subtree: true }, CP = ["resize", "load", "transitionend", "animationend", "animationstart", "animationiteration", "keyup", "keydown", "mouseup", "mousedown", "mouseover", "mouseout", "blur", "focus"], IP = function(t2) {
33540
33499
  return t2 === void 0 && (t2 = 0), Date.now() + t2;
33541
- }, LP = false, NP = new (function() {
33500
+ }, OP = false, LP = new (function() {
33542
33501
  function t2() {
33543
33502
  var t3 = this;
33544
33503
  this.stopped = true, this.listener = function() {
@@ -33547,19 +33506,19 @@ void main(void){
33547
33506
  }
33548
33507
  return t2.prototype.run = function(t3) {
33549
33508
  var e2 = this;
33550
- if (t3 === void 0 && (t3 = 250), !LP) {
33551
- LP = true;
33552
- var n2, i2 = OP(t3);
33509
+ if (t3 === void 0 && (t3 = 250), !OP) {
33510
+ OP = true;
33511
+ var n2, i2 = IP(t3);
33553
33512
  n2 = function() {
33554
33513
  var n3 = false;
33555
33514
  try {
33556
- n3 = MP();
33515
+ n3 = EP();
33557
33516
  } finally {
33558
- if (LP = false, t3 = i2 - OP(), !PP)
33517
+ if (OP = false, t3 = i2 - IP(), !RP)
33559
33518
  return;
33560
33519
  n3 ? e2.run(1e3) : t3 > 0 ? e2.run(t3) : e2.start();
33561
33520
  }
33562
- }, RP(function() {
33521
+ }, AP(function() {
33563
33522
  requestAnimationFrame(n2);
33564
33523
  });
33565
33524
  }
@@ -33567,29 +33526,29 @@ void main(void){
33567
33526
  this.stop(), this.run();
33568
33527
  }, t2.prototype.observe = function() {
33569
33528
  var t3 = this, e2 = function() {
33570
- return t3.observer && t3.observer.observe(document.body, CP);
33529
+ return t3.observer && t3.observer.observe(document.body, PP);
33571
33530
  };
33572
- document.body ? e2() : dP.addEventListener("DOMContentLoaded", e2);
33531
+ document.body ? e2() : cP.addEventListener("DOMContentLoaded", e2);
33573
33532
  }, t2.prototype.start = function() {
33574
33533
  var t3 = this;
33575
- this.stopped && (this.stopped = false, this.observer = new MutationObserver(this.listener), this.observe(), IP.forEach(function(e2) {
33576
- return dP.addEventListener(e2, t3.listener, true);
33534
+ this.stopped && (this.stopped = false, this.observer = new MutationObserver(this.listener), this.observe(), CP.forEach(function(e2) {
33535
+ return cP.addEventListener(e2, t3.listener, true);
33577
33536
  }));
33578
33537
  }, t2.prototype.stop = function() {
33579
33538
  var t3 = this;
33580
- this.stopped || (this.observer && this.observer.disconnect(), IP.forEach(function(e2) {
33581
- return dP.removeEventListener(e2, t3.listener, true);
33539
+ this.stopped || (this.observer && this.observer.disconnect(), CP.forEach(function(e2) {
33540
+ return cP.removeEventListener(e2, t3.listener, true);
33582
33541
  }), this.stopped = true);
33583
33542
  }, t2;
33584
- }())(), DP = function(t2) {
33585
- !PP && t2 > 0 && NP.start(), !(PP += t2) && NP.stop();
33586
- }, FP = function() {
33543
+ }())(), NP = function(t2) {
33544
+ !RP && t2 > 0 && LP.start(), !(RP += t2) && LP.stop();
33545
+ }, DP = function() {
33587
33546
  function t2(t3, e2) {
33588
- this.target = t3, this.observedBox = e2 || nP.CONTENT_BOX, this.lastReportedSize = { inlineSize: 0, blockSize: 0 };
33547
+ this.target = t3, this.observedBox = e2 || eP.CONTENT_BOX, this.lastReportedSize = { inlineSize: 0, blockSize: 0 };
33589
33548
  }
33590
33549
  return t2.prototype.isActive = function() {
33591
- var t3, e2 = bP(this.target, this.observedBox, true);
33592
- return t3 = this.target, uP(t3) || function(t4) {
33550
+ var t3, e2 = xP(this.target, this.observedBox, true);
33551
+ return t3 = this.target, lP(t3) || function(t4) {
33593
33552
  switch (t4.tagName) {
33594
33553
  case "INPUT":
33595
33554
  if (t4.type !== "image")
@@ -33606,57 +33565,57 @@ void main(void){
33606
33565
  return false;
33607
33566
  }(t3) || getComputedStyle(t3).display !== "inline" || (this.lastReportedSize = e2), this.lastReportedSize.inlineSize !== e2.inlineSize || this.lastReportedSize.blockSize !== e2.blockSize;
33608
33567
  }, t2;
33609
- }(), BP = function(t2, e2) {
33568
+ }(), FP = function(t2, e2) {
33610
33569
  this.activeTargets = [], this.skippedTargets = [], this.observationTargets = [], this.observer = t2, this.callback = e2;
33611
- }, UP = /* @__PURE__ */ new WeakMap(), kP = function(t2, e2) {
33570
+ }, BP = /* @__PURE__ */ new WeakMap(), UP = function(t2, e2) {
33612
33571
  for (var n2 = 0; n2 < t2.length; n2 += 1)
33613
33572
  if (t2[n2].target === e2)
33614
33573
  return n2;
33615
33574
  return -1;
33616
- }, GP = function() {
33575
+ }, kP = function() {
33617
33576
  function t2() {
33618
33577
  }
33619
33578
  return t2.connect = function(t3, e2) {
33620
- var n2 = new BP(t3, e2);
33621
- UP.set(t3, n2);
33579
+ var n2 = new FP(t3, e2);
33580
+ BP.set(t3, n2);
33622
33581
  }, t2.observe = function(t3, e2, n2) {
33623
- var i2 = UP.get(t3), r2 = i2.observationTargets.length === 0;
33624
- kP(i2.observationTargets, e2) < 0 && (r2 && iP.push(i2), i2.observationTargets.push(new FP(e2, n2 && n2.box)), DP(1), NP.schedule());
33582
+ var i2 = BP.get(t3), r2 = i2.observationTargets.length === 0;
33583
+ UP(i2.observationTargets, e2) < 0 && (r2 && nP.push(i2), i2.observationTargets.push(new DP(e2, n2 && n2.box)), NP(1), LP.schedule());
33625
33584
  }, t2.unobserve = function(t3, e2) {
33626
- var n2 = UP.get(t3), i2 = kP(n2.observationTargets, e2), r2 = n2.observationTargets.length === 1;
33627
- i2 >= 0 && (r2 && iP.splice(iP.indexOf(n2), 1), n2.observationTargets.splice(i2, 1), DP(-1));
33585
+ var n2 = BP.get(t3), i2 = UP(n2.observationTargets, e2), r2 = n2.observationTargets.length === 1;
33586
+ i2 >= 0 && (r2 && nP.splice(nP.indexOf(n2), 1), n2.observationTargets.splice(i2, 1), NP(-1));
33628
33587
  }, t2.disconnect = function(t3) {
33629
- var e2 = this, n2 = UP.get(t3);
33588
+ var e2 = this, n2 = BP.get(t3);
33630
33589
  n2.observationTargets.slice().forEach(function(n3) {
33631
33590
  return e2.unobserve(t3, n3.target);
33632
33591
  }), n2.activeTargets.splice(0, n2.activeTargets.length);
33633
33592
  }, t2;
33634
- }(), HP = function() {
33593
+ }(), GP = function() {
33635
33594
  function t2(t3) {
33636
33595
  if (arguments.length === 0)
33637
33596
  throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");
33638
33597
  if (typeof t3 != "function")
33639
33598
  throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");
33640
- GP.connect(this, t3);
33599
+ kP.connect(this, t3);
33641
33600
  }
33642
33601
  return t2.prototype.observe = function(t3, e2) {
33643
33602
  if (arguments.length === 0)
33644
33603
  throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");
33645
- if (!cP(t3))
33604
+ if (!hP(t3))
33646
33605
  throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");
33647
- GP.observe(this, t3, e2);
33606
+ kP.observe(this, t3, e2);
33648
33607
  }, t2.prototype.unobserve = function(t3) {
33649
33608
  if (arguments.length === 0)
33650
33609
  throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");
33651
- if (!cP(t3))
33610
+ if (!hP(t3))
33652
33611
  throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");
33653
- GP.unobserve(this, t3);
33612
+ kP.unobserve(this, t3);
33654
33613
  }, t2.prototype.disconnect = function() {
33655
- GP.disconnect(this);
33614
+ kP.disconnect(this);
33656
33615
  }, t2.toString = function() {
33657
33616
  return "function ResizeObserver () { [polyfill code] }";
33658
33617
  }, t2;
33659
- }(), zP = function(t2, e2, n2, i2) {
33618
+ }(), HP = function(t2, e2, n2, i2) {
33660
33619
  return new (n2 || (n2 = Promise))(function(r2, o2) {
33661
33620
  function s2(t3) {
33662
33621
  try {
@@ -33680,7 +33639,7 @@ void main(void){
33680
33639
  }
33681
33640
  l2((i2 = i2.apply(t2, e2 || [])).next());
33682
33641
  });
33683
- }, jP = function(t2, e2) {
33642
+ }, zP = function(t2, e2) {
33684
33643
  var n2, i2, r2, o2, s2 = { label: 0, sent: function() {
33685
33644
  if (1 & r2[0])
33686
33645
  throw r2[1];
@@ -33743,14 +33702,14 @@ void main(void){
33743
33702
  }([o3, a3]);
33744
33703
  };
33745
33704
  }
33746
- }, VP = function() {
33705
+ }, jP = function() {
33747
33706
  function t2(t3, e2, n2, i2, r2) {
33748
33707
  this.state = "idle", this.index = -1, this.slideIndex = -1, this.fn = n2, this.index = t3, this.slideIndex = e2, this.eventHub = i2, this.id = r2;
33749
33708
  }
33750
33709
  return t2.prototype.apply = function() {
33751
- return zP(this, void 0, void 0, function() {
33710
+ return HP(this, void 0, void 0, function() {
33752
33711
  var t3;
33753
- return jP(this, function(e2) {
33712
+ return zP(this, function(e2) {
33754
33713
  switch (e2.label) {
33755
33714
  case 0:
33756
33715
  this.eventHub.emit("task-start", this), e2.label = 1;
@@ -33766,7 +33725,7 @@ void main(void){
33766
33725
  });
33767
33726
  });
33768
33727
  }, t2;
33769
- }(), WP = function() {
33728
+ }(), VP = function() {
33770
33729
  function t2() {
33771
33730
  var t3 = this;
33772
33731
  this.eventHub = new a.a(), this.tasks = [], this.index = 0, this.eventHub.on("task-end", function(e2) {
@@ -33788,7 +33747,7 @@ void main(void){
33788
33747
  e2.tasks.splice(t4, 1);
33789
33748
  });
33790
33749
  }, t2.prototype.addTask = function(t3, e2, n2) {
33791
- var i2 = new VP(this.index++, e2, t3, this.eventHub, n2);
33750
+ var i2 = new jP(this.index++, e2, t3, this.eventHub, n2);
33792
33751
  this.tasks.push(i2), this.tasks.sort(function(t4, e3) {
33793
33752
  return t4.index - e3.index;
33794
33753
  }), this.replaceIdleTask(), this.tasks.length === 1 && i2.apply();
@@ -33800,7 +33759,7 @@ void main(void){
33800
33759
  this.eventHub.removeAllListeners();
33801
33760
  }, t2;
33802
33761
  }();
33803
- function XP(t2, e2) {
33762
+ function WP(t2, e2) {
33804
33763
  var n2 = t2.__state.conversionName.toString(), i2 = Math.round(t2.r), r2 = Math.round(t2.g), o2 = Math.round(t2.b), s2 = t2.a, a2 = Math.round(t2.h), l2 = t2.s.toFixed(1), u2 = t2.v.toFixed(1);
33805
33764
  if (e2 || n2 === "THREE_CHAR_HEX" || n2 === "SIX_CHAR_HEX") {
33806
33765
  for (var h2 = t2.hex.toString(16); h2.length < 6; )
@@ -33809,28 +33768,28 @@ void main(void){
33809
33768
  }
33810
33769
  return n2 === "CSS_RGB" ? "rgb(" + i2 + "," + r2 + "," + o2 + ")" : n2 === "CSS_RGBA" ? "rgba(" + i2 + "," + r2 + "," + o2 + "," + s2 + ")" : n2 === "HEX" ? "0x" + t2.hex.toString(16) : n2 === "RGB_ARRAY" ? "[" + i2 + "," + r2 + "," + o2 + "]" : n2 === "RGBA_ARRAY" ? "[" + i2 + "," + r2 + "," + o2 + "," + s2 + "]" : n2 === "RGB_OBJ" ? "{r:" + i2 + ",g:" + r2 + ",b:" + o2 + "}" : n2 === "RGBA_OBJ" ? "{r:" + i2 + ",g:" + r2 + ",b:" + o2 + ",a:" + s2 + "}" : n2 === "HSV_OBJ" ? "{h:" + a2 + ",s:" + l2 + ",v:" + u2 + "}" : n2 === "HSVA_OBJ" ? "{h:" + a2 + ",s:" + l2 + ",v:" + u2 + ",a:" + s2 + "}" : "unknown format";
33811
33770
  }
33812
- var qP = Array.prototype.forEach, YP = Array.prototype.slice, ZP = { BREAK: {}, extend: function(t2) {
33813
- return this.each(YP.call(arguments, 1), function(e2) {
33771
+ var XP = Array.prototype.forEach, qP = Array.prototype.slice, YP = { BREAK: {}, extend: function(t2) {
33772
+ return this.each(qP.call(arguments, 1), function(e2) {
33814
33773
  (this.isObject(e2) ? Object.keys(e2) : []).forEach(function(n2) {
33815
33774
  this.isUndefined(e2[n2]) || (t2[n2] = e2[n2]);
33816
33775
  }.bind(this));
33817
33776
  }, this), t2;
33818
33777
  }, defaults: function(t2) {
33819
- return this.each(YP.call(arguments, 1), function(e2) {
33778
+ return this.each(qP.call(arguments, 1), function(e2) {
33820
33779
  (this.isObject(e2) ? Object.keys(e2) : []).forEach(function(n2) {
33821
33780
  this.isUndefined(t2[n2]) && (t2[n2] = e2[n2]);
33822
33781
  }.bind(this));
33823
33782
  }, this), t2;
33824
33783
  }, compose: function() {
33825
- var t2 = YP.call(arguments);
33784
+ var t2 = qP.call(arguments);
33826
33785
  return function() {
33827
- for (var e2 = YP.call(arguments), n2 = t2.length - 1; n2 >= 0; n2--)
33786
+ for (var e2 = qP.call(arguments), n2 = t2.length - 1; n2 >= 0; n2--)
33828
33787
  e2 = [t2[n2].apply(this, e2)];
33829
33788
  return e2[0];
33830
33789
  };
33831
33790
  }, each: function(t2, e2, n2) {
33832
33791
  if (t2) {
33833
- if (qP && t2.forEach && t2.forEach === qP)
33792
+ if (XP && t2.forEach && t2.forEach === XP)
33834
33793
  t2.forEach(e2, n2);
33835
33794
  else if (t2.length === t2.length + 0) {
33836
33795
  var i2, r2 = void 0;
@@ -33855,7 +33814,7 @@ void main(void){
33855
33814
  clearTimeout(i2), i2 = setTimeout(s2, e2), a2 && t2.apply(r2, o2);
33856
33815
  };
33857
33816
  }, toArray: function(t2) {
33858
- return t2.toArray ? t2.toArray() : YP.call(t2);
33817
+ return t2.toArray ? t2.toArray() : qP.call(t2);
33859
33818
  }, isUndefined: function(t2) {
33860
33819
  return t2 === void 0;
33861
33820
  }, isNull: function(t2) {
@@ -33881,23 +33840,23 @@ void main(void){
33881
33840
  return t2 === false || t2 === true;
33882
33841
  }, isFunction: function(t2) {
33883
33842
  return t2 instanceof Function;
33884
- } }, JP = [{ litmus: ZP.isString, conversions: { THREE_CHAR_HEX: { read: function(t2) {
33843
+ } }, ZP = [{ litmus: YP.isString, conversions: { THREE_CHAR_HEX: { read: function(t2) {
33885
33844
  var e2 = t2.match(/^#([A-F0-9])([A-F0-9])([A-F0-9])$/i);
33886
33845
  return e2 !== null && { space: "HEX", hex: parseInt("0x" + e2[1].toString() + e2[1].toString() + e2[2].toString() + e2[2].toString() + e2[3].toString() + e2[3].toString(), 0) };
33887
- }, write: XP }, SIX_CHAR_HEX: { read: function(t2) {
33846
+ }, write: WP }, SIX_CHAR_HEX: { read: function(t2) {
33888
33847
  var e2 = t2.match(/^#([A-F0-9]{6})$/i);
33889
33848
  return e2 !== null && { space: "HEX", hex: parseInt("0x" + e2[1].toString(), 0) };
33890
- }, write: XP }, CSS_RGB: { read: function(t2) {
33849
+ }, write: WP }, CSS_RGB: { read: function(t2) {
33891
33850
  var e2 = t2.match(/^rgb\(\s*(.+)\s*,\s*(.+)\s*,\s*(.+)\s*\)/);
33892
33851
  return e2 !== null && { space: "RGB", r: parseFloat(e2[1]), g: parseFloat(e2[2]), b: parseFloat(e2[3]) };
33893
- }, write: XP }, CSS_RGBA: { read: function(t2) {
33852
+ }, write: WP }, CSS_RGBA: { read: function(t2) {
33894
33853
  var e2 = t2.match(/^rgba\(\s*(.+)\s*,\s*(.+)\s*,\s*(.+)\s*,\s*(.+)\s*\)/);
33895
33854
  return e2 !== null && { space: "RGB", r: parseFloat(e2[1]), g: parseFloat(e2[2]), b: parseFloat(e2[3]), a: parseFloat(e2[4]) };
33896
- }, write: XP } } }, { litmus: ZP.isNumber, conversions: { HEX: { read: function(t2) {
33855
+ }, write: WP } } }, { litmus: YP.isNumber, conversions: { HEX: { read: function(t2) {
33897
33856
  return { space: "HEX", hex: t2, conversionName: "HEX" };
33898
33857
  }, write: function(t2) {
33899
33858
  return t2.hex;
33900
- } } } }, { litmus: ZP.isArray, conversions: { RGB_ARRAY: { read: function(t2) {
33859
+ } } } }, { litmus: YP.isArray, conversions: { RGB_ARRAY: { read: function(t2) {
33901
33860
  return t2.length === 3 && { space: "RGB", r: t2[0], g: t2[1], b: t2[2] };
33902
33861
  }, write: function(t2) {
33903
33862
  return [t2.r, t2.g, t2.b];
@@ -33905,33 +33864,33 @@ void main(void){
33905
33864
  return t2.length === 4 && { space: "RGB", r: t2[0], g: t2[1], b: t2[2], a: t2[3] };
33906
33865
  }, write: function(t2) {
33907
33866
  return [t2.r, t2.g, t2.b, t2.a];
33908
- } } } }, { litmus: ZP.isObject, conversions: { RGBA_OBJ: { read: function(t2) {
33909
- return !!(ZP.isNumber(t2.r) && ZP.isNumber(t2.g) && ZP.isNumber(t2.b) && ZP.isNumber(t2.a)) && { space: "RGB", r: t2.r, g: t2.g, b: t2.b, a: t2.a };
33867
+ } } } }, { litmus: YP.isObject, conversions: { RGBA_OBJ: { read: function(t2) {
33868
+ return !!(YP.isNumber(t2.r) && YP.isNumber(t2.g) && YP.isNumber(t2.b) && YP.isNumber(t2.a)) && { space: "RGB", r: t2.r, g: t2.g, b: t2.b, a: t2.a };
33910
33869
  }, write: function(t2) {
33911
33870
  return { r: t2.r, g: t2.g, b: t2.b, a: t2.a };
33912
33871
  } }, RGB_OBJ: { read: function(t2) {
33913
- return !!(ZP.isNumber(t2.r) && ZP.isNumber(t2.g) && ZP.isNumber(t2.b)) && { space: "RGB", r: t2.r, g: t2.g, b: t2.b };
33872
+ return !!(YP.isNumber(t2.r) && YP.isNumber(t2.g) && YP.isNumber(t2.b)) && { space: "RGB", r: t2.r, g: t2.g, b: t2.b };
33914
33873
  }, write: function(t2) {
33915
33874
  return { r: t2.r, g: t2.g, b: t2.b };
33916
33875
  } }, HSVA_OBJ: { read: function(t2) {
33917
- return !!(ZP.isNumber(t2.h) && ZP.isNumber(t2.s) && ZP.isNumber(t2.v) && ZP.isNumber(t2.a)) && { space: "HSV", h: t2.h, s: t2.s, v: t2.v, a: t2.a };
33876
+ return !!(YP.isNumber(t2.h) && YP.isNumber(t2.s) && YP.isNumber(t2.v) && YP.isNumber(t2.a)) && { space: "HSV", h: t2.h, s: t2.s, v: t2.v, a: t2.a };
33918
33877
  }, write: function(t2) {
33919
33878
  return { h: t2.h, s: t2.s, v: t2.v, a: t2.a };
33920
33879
  } }, HSV_OBJ: { read: function(t2) {
33921
- return !!(ZP.isNumber(t2.h) && ZP.isNumber(t2.s) && ZP.isNumber(t2.v)) && { space: "HSV", h: t2.h, s: t2.s, v: t2.v };
33880
+ return !!(YP.isNumber(t2.h) && YP.isNumber(t2.s) && YP.isNumber(t2.v)) && { space: "HSV", h: t2.h, s: t2.s, v: t2.v };
33922
33881
  }, write: function(t2) {
33923
33882
  return { h: t2.h, s: t2.s, v: t2.v };
33924
- } } } }], $P = void 0, KP = void 0, QP = function() {
33925
- KP = false;
33926
- var t2 = arguments.length > 1 ? ZP.toArray(arguments) : arguments[0];
33927
- return ZP.each(JP, function(e2) {
33883
+ } } } }], JP = void 0, $P = void 0, KP = function() {
33884
+ $P = false;
33885
+ var t2 = arguments.length > 1 ? YP.toArray(arguments) : arguments[0];
33886
+ return YP.each(ZP, function(e2) {
33928
33887
  if (e2.litmus(t2))
33929
- return ZP.each(e2.conversions, function(e3, n2) {
33930
- if ($P = e3.read(t2), KP === false && $P !== false)
33931
- return KP = $P, $P.conversionName = n2, $P.conversion = e3, ZP.BREAK;
33932
- }), ZP.BREAK;
33933
- }), KP;
33934
- }, tC = void 0, eC = { hsv_to_rgb: function(t2, e2, n2) {
33888
+ return YP.each(e2.conversions, function(e3, n2) {
33889
+ if (JP = e3.read(t2), $P === false && JP !== false)
33890
+ return $P = JP, JP.conversionName = n2, JP.conversion = e3, YP.BREAK;
33891
+ }), YP.BREAK;
33892
+ }), $P;
33893
+ }, QP = void 0, tC = { hsv_to_rgb: function(t2, e2, n2) {
33935
33894
  var i2 = Math.floor(t2 / 60) % 6, r2 = t2 / 60 - Math.floor(t2 / 60), o2 = n2 * (1 - e2), s2 = n2 * (1 - r2 * e2), a2 = n2 * (1 - (1 - r2) * e2), l2 = [[n2, a2, o2], [s2, n2, o2], [o2, n2, a2], [o2, s2, n2], [a2, o2, n2], [n2, o2, s2]][i2];
33936
33895
  return { r: 255 * l2[0], g: 255 * l2[1], b: 255 * l2[2] };
33937
33896
  }, rgb_to_hsv: function(t2, e2, n2) {
@@ -33943,15 +33902,15 @@ void main(void){
33943
33902
  }, component_from_hex: function(t2, e2) {
33944
33903
  return t2 >> 8 * e2 & 255;
33945
33904
  }, hex_with_component: function(t2, e2, n2) {
33946
- return n2 << (tC = 8 * e2) | t2 & ~(255 << tC);
33947
- } }, nC = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t2) {
33905
+ return n2 << (QP = 8 * e2) | t2 & ~(255 << QP);
33906
+ } }, eC = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t2) {
33948
33907
  return typeof t2;
33949
33908
  } : function(t2) {
33950
33909
  return t2 && typeof Symbol == "function" && t2.constructor === Symbol && t2 !== Symbol.prototype ? "symbol" : typeof t2;
33951
- }, iC = function(t2, e2) {
33910
+ }, nC = function(t2, e2) {
33952
33911
  if (!(t2 instanceof e2))
33953
33912
  throw new TypeError("Cannot call a class as a function");
33954
- }, rC = function() {
33913
+ }, iC = function() {
33955
33914
  function t2(t3, e2) {
33956
33915
  for (var n2 = 0; n2 < e2.length; n2++) {
33957
33916
  var i2 = e2[n2];
@@ -33961,7 +33920,7 @@ void main(void){
33961
33920
  return function(e2, n2, i2) {
33962
33921
  return n2 && t2(e2.prototype, n2), i2 && t2(e2, i2), e2;
33963
33922
  };
33964
- }(), oC = function t2(e2, n2, i2) {
33923
+ }(), rC = function t2(e2, n2, i2) {
33965
33924
  e2 === null && (e2 = Function.prototype);
33966
33925
  var r2 = Object.getOwnPropertyDescriptor(e2, n2);
33967
33926
  if (r2 === void 0) {
@@ -33972,67 +33931,67 @@ void main(void){
33972
33931
  return r2.value;
33973
33932
  var s2 = r2.get;
33974
33933
  return s2 !== void 0 ? s2.call(i2) : void 0;
33975
- }, sC = function(t2, e2) {
33934
+ }, oC = function(t2, e2) {
33976
33935
  if (typeof e2 != "function" && e2 !== null)
33977
33936
  throw new TypeError("Super expression must either be null or a function, not " + typeof e2);
33978
33937
  t2.prototype = Object.create(e2 && e2.prototype, { constructor: { value: t2, enumerable: false, writable: true, configurable: true } }), e2 && (Object.setPrototypeOf ? Object.setPrototypeOf(t2, e2) : t2.__proto__ = e2);
33979
- }, aC = function(t2, e2) {
33938
+ }, sC = function(t2, e2) {
33980
33939
  if (!t2)
33981
33940
  throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
33982
33941
  return !e2 || typeof e2 != "object" && typeof e2 != "function" ? t2 : e2;
33983
- }, lC = function() {
33942
+ }, aC = function() {
33984
33943
  function t2() {
33985
- if (iC(this, t2), this.__state = QP.apply(this, arguments), this.__state === false)
33944
+ if (nC(this, t2), this.__state = KP.apply(this, arguments), this.__state === false)
33986
33945
  throw new Error("Failed to interpret color arguments");
33987
33946
  this.__state.a = this.__state.a || 1;
33988
33947
  }
33989
- return rC(t2, [{ key: "toString", value: function() {
33990
- return XP(this);
33948
+ return iC(t2, [{ key: "toString", value: function() {
33949
+ return WP(this);
33991
33950
  } }, { key: "toHexString", value: function() {
33992
- return XP(this, true);
33951
+ return WP(this, true);
33993
33952
  } }, { key: "toOriginal", value: function() {
33994
33953
  return this.__state.conversion.write(this);
33995
33954
  } }]), t2;
33996
33955
  }();
33997
- function uC(t2, e2, n2) {
33956
+ function lC(t2, e2, n2) {
33998
33957
  Object.defineProperty(t2, e2, { get: function() {
33999
- return this.__state.space === "RGB" || lC.recalculateRGB(this, e2, n2), this.__state[e2];
33958
+ return this.__state.space === "RGB" || aC.recalculateRGB(this, e2, n2), this.__state[e2];
34000
33959
  }, set: function(t3) {
34001
- this.__state.space !== "RGB" && (lC.recalculateRGB(this, e2, n2), this.__state.space = "RGB"), this.__state[e2] = t3;
33960
+ this.__state.space !== "RGB" && (aC.recalculateRGB(this, e2, n2), this.__state.space = "RGB"), this.__state[e2] = t3;
34002
33961
  } });
34003
33962
  }
34004
- function hC(t2, e2) {
33963
+ function uC(t2, e2) {
34005
33964
  Object.defineProperty(t2, e2, { get: function() {
34006
- return this.__state.space === "HSV" || lC.recalculateHSV(this), this.__state[e2];
33965
+ return this.__state.space === "HSV" || aC.recalculateHSV(this), this.__state[e2];
34007
33966
  }, set: function(t3) {
34008
- this.__state.space !== "HSV" && (lC.recalculateHSV(this), this.__state.space = "HSV"), this.__state[e2] = t3;
33967
+ this.__state.space !== "HSV" && (aC.recalculateHSV(this), this.__state.space = "HSV"), this.__state[e2] = t3;
34009
33968
  } });
34010
33969
  }
34011
- lC.recalculateRGB = function(t2, e2, n2) {
33970
+ aC.recalculateRGB = function(t2, e2, n2) {
34012
33971
  if (t2.__state.space === "HEX")
34013
- t2.__state[e2] = eC.component_from_hex(t2.__state.hex, n2);
33972
+ t2.__state[e2] = tC.component_from_hex(t2.__state.hex, n2);
34014
33973
  else {
34015
33974
  if (t2.__state.space !== "HSV")
34016
33975
  throw new Error("Corrupted color state");
34017
- ZP.extend(t2.__state, eC.hsv_to_rgb(t2.__state.h, t2.__state.s, t2.__state.v));
33976
+ YP.extend(t2.__state, tC.hsv_to_rgb(t2.__state.h, t2.__state.s, t2.__state.v));
34018
33977
  }
34019
- }, lC.recalculateHSV = function(t2) {
34020
- var e2 = eC.rgb_to_hsv(t2.r, t2.g, t2.b);
34021
- ZP.extend(t2.__state, { s: e2.s, v: e2.v }), ZP.isNaN(e2.h) ? ZP.isUndefined(t2.__state.h) && (t2.__state.h = 0) : t2.__state.h = e2.h;
34022
- }, lC.COMPONENTS = ["r", "g", "b", "h", "s", "v", "hex", "a"], uC(lC.prototype, "r", 2), uC(lC.prototype, "g", 1), uC(lC.prototype, "b", 0), hC(lC.prototype, "h"), hC(lC.prototype, "s"), hC(lC.prototype, "v"), Object.defineProperty(lC.prototype, "a", { get: function() {
33978
+ }, aC.recalculateHSV = function(t2) {
33979
+ var e2 = tC.rgb_to_hsv(t2.r, t2.g, t2.b);
33980
+ YP.extend(t2.__state, { s: e2.s, v: e2.v }), YP.isNaN(e2.h) ? YP.isUndefined(t2.__state.h) && (t2.__state.h = 0) : t2.__state.h = e2.h;
33981
+ }, aC.COMPONENTS = ["r", "g", "b", "h", "s", "v", "hex", "a"], lC(aC.prototype, "r", 2), lC(aC.prototype, "g", 1), lC(aC.prototype, "b", 0), uC(aC.prototype, "h"), uC(aC.prototype, "s"), uC(aC.prototype, "v"), Object.defineProperty(aC.prototype, "a", { get: function() {
34023
33982
  return this.__state.a;
34024
33983
  }, set: function(t2) {
34025
33984
  this.__state.a = t2;
34026
- } }), Object.defineProperty(lC.prototype, "hex", { get: function() {
34027
- return this.__state.space !== "HEX" && (this.__state.hex = eC.rgb_to_hex(this.r, this.g, this.b), this.__state.space = "HEX"), this.__state.hex;
33985
+ } }), Object.defineProperty(aC.prototype, "hex", { get: function() {
33986
+ return this.__state.space !== "HEX" && (this.__state.hex = tC.rgb_to_hex(this.r, this.g, this.b), this.__state.space = "HEX"), this.__state.hex;
34028
33987
  }, set: function(t2) {
34029
33988
  this.__state.space = "HEX", this.__state.hex = t2;
34030
33989
  } });
34031
- var cC = function() {
33990
+ var hC = function() {
34032
33991
  function t2(e2, n2) {
34033
- iC(this, t2), this.initialValue = e2[n2], this.domElement = document.createElement("div"), this.object = e2, this.property = n2, this.__onChange = void 0, this.__onFinishChange = void 0;
33992
+ nC(this, t2), this.initialValue = e2[n2], this.domElement = document.createElement("div"), this.object = e2, this.property = n2, this.__onChange = void 0, this.__onFinishChange = void 0;
34034
33993
  }
34035
- return rC(t2, [{ key: "onChange", value: function(t3) {
33994
+ return iC(t2, [{ key: "onChange", value: function(t3) {
34036
33995
  return this.__onChange = t3, this;
34037
33996
  } }, { key: "onFinishChange", value: function(t3) {
34038
33997
  return this.__onFinishChange = t3, this;
@@ -34045,29 +34004,29 @@ void main(void){
34045
34004
  } }, { key: "isModified", value: function() {
34046
34005
  return this.initialValue !== this.getValue();
34047
34006
  } }]), t2;
34048
- }(), dC = {};
34049
- ZP.each({ HTMLEvents: ["change"], MouseEvents: ["click", "mousemove", "mousedown", "mouseup", "mouseover"], KeyboardEvents: ["keydown"] }, function(t2, e2) {
34050
- ZP.each(t2, function(t3) {
34051
- dC[t3] = e2;
34007
+ }(), cC = {};
34008
+ YP.each({ HTMLEvents: ["change"], MouseEvents: ["click", "mousemove", "mousedown", "mouseup", "mouseover"], KeyboardEvents: ["keydown"] }, function(t2, e2) {
34009
+ YP.each(t2, function(t3) {
34010
+ cC[t3] = e2;
34052
34011
  });
34053
34012
  });
34054
- var pC = /(\d+(\.\d+)?)px/;
34055
- function fC(t2) {
34056
- if (t2 === "0" || ZP.isUndefined(t2))
34013
+ var dC = /(\d+(\.\d+)?)px/;
34014
+ function pC(t2) {
34015
+ if (t2 === "0" || YP.isUndefined(t2))
34057
34016
  return 0;
34058
- var e2 = t2.match(pC);
34059
- return ZP.isNull(e2) ? 0 : parseFloat(e2[1]);
34017
+ var e2 = t2.match(dC);
34018
+ return YP.isNull(e2) ? 0 : parseFloat(e2[1]);
34060
34019
  }
34061
- var mC = { makeSelectable: function(t2, e2) {
34020
+ var fC = { makeSelectable: function(t2, e2) {
34062
34021
  t2 !== void 0 && t2.style !== void 0 && (t2.onselectstart = e2 ? function() {
34063
34022
  return false;
34064
34023
  } : function() {
34065
34024
  }, t2.style.MozUserSelect = e2 ? "auto" : "none", t2.style.KhtmlUserSelect = e2 ? "auto" : "none", t2.unselectable = e2 ? "on" : "off");
34066
34025
  }, makeFullscreen: function(t2, e2, n2) {
34067
34026
  var i2 = n2, r2 = e2;
34068
- ZP.isUndefined(r2) && (r2 = true), ZP.isUndefined(i2) && (i2 = true), t2.style.position = "absolute", r2 && (t2.style.left = 0, t2.style.right = 0), i2 && (t2.style.top = 0, t2.style.bottom = 0);
34027
+ YP.isUndefined(r2) && (r2 = true), YP.isUndefined(i2) && (i2 = true), t2.style.position = "absolute", r2 && (t2.style.left = 0, t2.style.right = 0), i2 && (t2.style.top = 0, t2.style.bottom = 0);
34069
34028
  }, fakeEvent: function(t2, e2, n2, i2) {
34070
- var r2 = n2 || {}, o2 = dC[e2];
34029
+ var r2 = n2 || {}, o2 = cC[e2];
34071
34030
  if (!o2)
34072
34031
  throw new Error("Event type " + e2 + " not supported.");
34073
34032
  var s2 = document.createEvent(o2);
@@ -34078,18 +34037,18 @@ void main(void){
34078
34037
  break;
34079
34038
  case "KeyboardEvents":
34080
34039
  var u2 = s2.initKeyboardEvent || s2.initKeyEvent;
34081
- ZP.defaults(r2, { cancelable: true, ctrlKey: false, altKey: false, shiftKey: false, metaKey: false, keyCode: void 0, charCode: void 0 }), u2(e2, r2.bubbles || false, r2.cancelable, window, r2.ctrlKey, r2.altKey, r2.shiftKey, r2.metaKey, r2.keyCode, r2.charCode);
34040
+ YP.defaults(r2, { cancelable: true, ctrlKey: false, altKey: false, shiftKey: false, metaKey: false, keyCode: void 0, charCode: void 0 }), u2(e2, r2.bubbles || false, r2.cancelable, window, r2.ctrlKey, r2.altKey, r2.shiftKey, r2.metaKey, r2.keyCode, r2.charCode);
34082
34041
  break;
34083
34042
  default:
34084
34043
  s2.initEvent(e2, r2.bubbles || false, r2.cancelable || true);
34085
34044
  }
34086
- ZP.defaults(s2, i2), t2.dispatchEvent(s2);
34045
+ YP.defaults(s2, i2), t2.dispatchEvent(s2);
34087
34046
  }, bind: function(t2, e2, n2, i2) {
34088
34047
  var r2 = i2 || false;
34089
- return t2.addEventListener ? t2.addEventListener(e2, n2, r2) : t2.attachEvent && t2.attachEvent("on" + e2, n2), mC;
34048
+ return t2.addEventListener ? t2.addEventListener(e2, n2, r2) : t2.attachEvent && t2.attachEvent("on" + e2, n2), fC;
34090
34049
  }, unbind: function(t2, e2, n2, i2) {
34091
34050
  var r2 = i2 || false;
34092
- return t2.removeEventListener ? t2.removeEventListener(e2, n2, r2) : t2.detachEvent && t2.detachEvent("on" + e2, n2), mC;
34051
+ return t2.removeEventListener ? t2.removeEventListener(e2, n2, r2) : t2.detachEvent && t2.detachEvent("on" + e2, n2), fC;
34093
34052
  }, addClass: function(t2, e2) {
34094
34053
  if (t2.className === void 0)
34095
34054
  t2.className = e2;
@@ -34097,7 +34056,7 @@ void main(void){
34097
34056
  var n2 = t2.className.split(/ +/);
34098
34057
  n2.indexOf(e2) === -1 && (n2.push(e2), t2.className = n2.join(" ").replace(/^\s+/, "").replace(/\s+$/, ""));
34099
34058
  }
34100
- return mC;
34059
+ return fC;
34101
34060
  }, removeClass: function(t2, e2) {
34102
34061
  if (e2)
34103
34062
  if (t2.className === e2)
@@ -34108,15 +34067,15 @@ void main(void){
34108
34067
  }
34109
34068
  else
34110
34069
  t2.className = void 0;
34111
- return mC;
34070
+ return fC;
34112
34071
  }, hasClass: function(t2, e2) {
34113
34072
  return new RegExp("(?:^|\\s+)" + e2 + "(?:\\s+|$)").test(t2.className) || false;
34114
34073
  }, getWidth: function(t2) {
34115
34074
  var e2 = getComputedStyle(t2);
34116
- return fC(e2["border-left-width"]) + fC(e2["border-right-width"]) + fC(e2["padding-left"]) + fC(e2["padding-right"]) + fC(e2.width);
34075
+ return pC(e2["border-left-width"]) + pC(e2["border-right-width"]) + pC(e2["padding-left"]) + pC(e2["padding-right"]) + pC(e2.width);
34117
34076
  }, getHeight: function(t2) {
34118
34077
  var e2 = getComputedStyle(t2);
34119
- return fC(e2["border-top-width"]) + fC(e2["border-bottom-width"]) + fC(e2["padding-top"]) + fC(e2["padding-bottom"]) + fC(e2.height);
34078
+ return pC(e2["border-top-width"]) + pC(e2["border-bottom-width"]) + pC(e2["padding-top"]) + pC(e2["padding-bottom"]) + pC(e2.height);
34120
34079
  }, getOffset: function(t2) {
34121
34080
  var e2 = t2, n2 = { left: 0, top: 0 };
34122
34081
  if (e2.offsetParent)
@@ -34126,86 +34085,86 @@ void main(void){
34126
34085
  return n2;
34127
34086
  }, isActive: function(t2) {
34128
34087
  return t2 === document.activeElement && (t2.type || t2.href);
34129
- } }, gC = function(t2) {
34088
+ } }, mC = function(t2) {
34130
34089
  function e2(t3, n2) {
34131
- iC(this, e2);
34132
- var i2 = aC(this, (e2.__proto__ || Object.getPrototypeOf(e2)).call(this, t3, n2)), r2 = i2;
34133
- return i2.__prev = i2.getValue(), i2.__checkbox = document.createElement("input"), i2.__checkbox.setAttribute("type", "checkbox"), mC.bind(i2.__checkbox, "change", function() {
34090
+ nC(this, e2);
34091
+ var i2 = sC(this, (e2.__proto__ || Object.getPrototypeOf(e2)).call(this, t3, n2)), r2 = i2;
34092
+ return i2.__prev = i2.getValue(), i2.__checkbox = document.createElement("input"), i2.__checkbox.setAttribute("type", "checkbox"), fC.bind(i2.__checkbox, "change", function() {
34134
34093
  r2.setValue(!r2.__prev);
34135
34094
  }, false), i2.domElement.appendChild(i2.__checkbox), i2.updateDisplay(), i2;
34136
34095
  }
34137
- return sC(e2, t2), rC(e2, [{ key: "setValue", value: function(t3) {
34138
- var n2 = oC(e2.prototype.__proto__ || Object.getPrototypeOf(e2.prototype), "setValue", this).call(this, t3);
34096
+ return oC(e2, t2), iC(e2, [{ key: "setValue", value: function(t3) {
34097
+ var n2 = rC(e2.prototype.__proto__ || Object.getPrototypeOf(e2.prototype), "setValue", this).call(this, t3);
34139
34098
  return this.__onFinishChange && this.__onFinishChange.call(this, this.getValue()), this.__prev = this.getValue(), n2;
34140
34099
  } }, { key: "updateDisplay", value: function() {
34141
- return this.getValue() === true ? (this.__checkbox.setAttribute("checked", "checked"), this.__checkbox.checked = true, this.__prev = true) : (this.__checkbox.checked = false, this.__prev = false), oC(e2.prototype.__proto__ || Object.getPrototypeOf(e2.prototype), "updateDisplay", this).call(this);
34100
+ return this.getValue() === true ? (this.__checkbox.setAttribute("checked", "checked"), this.__checkbox.checked = true, this.__prev = true) : (this.__checkbox.checked = false, this.__prev = false), rC(e2.prototype.__proto__ || Object.getPrototypeOf(e2.prototype), "updateDisplay", this).call(this);
34142
34101
  } }]), e2;
34143
- }(cC), vC = function(t2) {
34102
+ }(hC), gC = function(t2) {
34144
34103
  function e2(t3, n2, i2) {
34145
- iC(this, e2);
34146
- var r2 = aC(this, (e2.__proto__ || Object.getPrototypeOf(e2)).call(this, t3, n2)), o2 = i2, s2 = r2;
34147
- if (r2.__select = document.createElement("select"), ZP.isArray(o2)) {
34104
+ nC(this, e2);
34105
+ var r2 = sC(this, (e2.__proto__ || Object.getPrototypeOf(e2)).call(this, t3, n2)), o2 = i2, s2 = r2;
34106
+ if (r2.__select = document.createElement("select"), YP.isArray(o2)) {
34148
34107
  var a2 = {};
34149
- ZP.each(o2, function(t4) {
34108
+ YP.each(o2, function(t4) {
34150
34109
  a2[t4] = t4;
34151
34110
  }), o2 = a2;
34152
34111
  }
34153
- return ZP.each(o2, function(t4, e3) {
34112
+ return YP.each(o2, function(t4, e3) {
34154
34113
  var n3 = document.createElement("option");
34155
34114
  n3.innerHTML = e3, n3.setAttribute("value", t4), s2.__select.appendChild(n3);
34156
- }), r2.updateDisplay(), mC.bind(r2.__select, "change", function() {
34115
+ }), r2.updateDisplay(), fC.bind(r2.__select, "change", function() {
34157
34116
  var t4 = this.options[this.selectedIndex].value;
34158
34117
  s2.setValue(t4);
34159
34118
  }), r2.domElement.appendChild(r2.__select), r2;
34160
34119
  }
34161
- return sC(e2, t2), rC(e2, [{ key: "setValue", value: function(t3) {
34162
- var n2 = oC(e2.prototype.__proto__ || Object.getPrototypeOf(e2.prototype), "setValue", this).call(this, t3);
34120
+ return oC(e2, t2), iC(e2, [{ key: "setValue", value: function(t3) {
34121
+ var n2 = rC(e2.prototype.__proto__ || Object.getPrototypeOf(e2.prototype), "setValue", this).call(this, t3);
34163
34122
  return this.__onFinishChange && this.__onFinishChange.call(this, this.getValue()), n2;
34164
34123
  } }, { key: "updateDisplay", value: function() {
34165
- return mC.isActive(this.__select) ? this : (this.__select.value = this.getValue(), oC(e2.prototype.__proto__ || Object.getPrototypeOf(e2.prototype), "updateDisplay", this).call(this));
34124
+ return fC.isActive(this.__select) ? this : (this.__select.value = this.getValue(), rC(e2.prototype.__proto__ || Object.getPrototypeOf(e2.prototype), "updateDisplay", this).call(this));
34166
34125
  } }]), e2;
34167
- }(cC), _C = function(t2) {
34126
+ }(hC), vC = function(t2) {
34168
34127
  function e2(t3, n2) {
34169
- iC(this, e2);
34170
- var i2 = aC(this, (e2.__proto__ || Object.getPrototypeOf(e2)).call(this, t3, n2)), r2 = i2;
34128
+ nC(this, e2);
34129
+ var i2 = sC(this, (e2.__proto__ || Object.getPrototypeOf(e2)).call(this, t3, n2)), r2 = i2;
34171
34130
  function o2() {
34172
34131
  r2.setValue(r2.__input.value);
34173
34132
  }
34174
- return i2.__input = document.createElement("input"), i2.__input.setAttribute("type", "text"), mC.bind(i2.__input, "keyup", o2), mC.bind(i2.__input, "change", o2), mC.bind(i2.__input, "blur", function() {
34133
+ return i2.__input = document.createElement("input"), i2.__input.setAttribute("type", "text"), fC.bind(i2.__input, "keyup", o2), fC.bind(i2.__input, "change", o2), fC.bind(i2.__input, "blur", function() {
34175
34134
  r2.__onFinishChange && r2.__onFinishChange.call(r2, r2.getValue());
34176
- }), mC.bind(i2.__input, "keydown", function(t4) {
34135
+ }), fC.bind(i2.__input, "keydown", function(t4) {
34177
34136
  t4.keyCode === 13 && this.blur();
34178
34137
  }), i2.updateDisplay(), i2.domElement.appendChild(i2.__input), i2;
34179
34138
  }
34180
- return sC(e2, t2), rC(e2, [{ key: "updateDisplay", value: function() {
34181
- return mC.isActive(this.__input) || (this.__input.value = this.getValue()), oC(e2.prototype.__proto__ || Object.getPrototypeOf(e2.prototype), "updateDisplay", this).call(this);
34139
+ return oC(e2, t2), iC(e2, [{ key: "updateDisplay", value: function() {
34140
+ return fC.isActive(this.__input) || (this.__input.value = this.getValue()), rC(e2.prototype.__proto__ || Object.getPrototypeOf(e2.prototype), "updateDisplay", this).call(this);
34182
34141
  } }]), e2;
34183
- }(cC);
34184
- function yC(t2) {
34142
+ }(hC);
34143
+ function _C(t2) {
34185
34144
  var e2 = t2.toString();
34186
34145
  return e2.indexOf(".") > -1 ? e2.length - e2.indexOf(".") - 1 : 0;
34187
34146
  }
34188
- var xC = function(t2) {
34147
+ var yC = function(t2) {
34189
34148
  function e2(t3, n2, i2) {
34190
- iC(this, e2);
34191
- var r2 = aC(this, (e2.__proto__ || Object.getPrototypeOf(e2)).call(this, t3, n2)), o2 = i2 || {};
34192
- return r2.__min = o2.min, r2.__max = o2.max, r2.__step = o2.step, ZP.isUndefined(r2.__step) ? r2.initialValue === 0 ? r2.__impliedStep = 1 : r2.__impliedStep = Math.pow(10, Math.floor(Math.log(Math.abs(r2.initialValue)) / Math.LN10)) / 10 : r2.__impliedStep = r2.__step, r2.__precision = yC(r2.__impliedStep), r2;
34149
+ nC(this, e2);
34150
+ var r2 = sC(this, (e2.__proto__ || Object.getPrototypeOf(e2)).call(this, t3, n2)), o2 = i2 || {};
34151
+ return r2.__min = o2.min, r2.__max = o2.max, r2.__step = o2.step, YP.isUndefined(r2.__step) ? r2.initialValue === 0 ? r2.__impliedStep = 1 : r2.__impliedStep = Math.pow(10, Math.floor(Math.log(Math.abs(r2.initialValue)) / Math.LN10)) / 10 : r2.__impliedStep = r2.__step, r2.__precision = _C(r2.__impliedStep), r2;
34193
34152
  }
34194
- return sC(e2, t2), rC(e2, [{ key: "setValue", value: function(t3) {
34153
+ return oC(e2, t2), iC(e2, [{ key: "setValue", value: function(t3) {
34195
34154
  var n2 = t3;
34196
- return this.__min !== void 0 && n2 < this.__min ? n2 = this.__min : this.__max !== void 0 && n2 > this.__max && (n2 = this.__max), this.__step !== void 0 && n2 % this.__step != 0 && (n2 = Math.round(n2 / this.__step) * this.__step), oC(e2.prototype.__proto__ || Object.getPrototypeOf(e2.prototype), "setValue", this).call(this, n2);
34155
+ return this.__min !== void 0 && n2 < this.__min ? n2 = this.__min : this.__max !== void 0 && n2 > this.__max && (n2 = this.__max), this.__step !== void 0 && n2 % this.__step != 0 && (n2 = Math.round(n2 / this.__step) * this.__step), rC(e2.prototype.__proto__ || Object.getPrototypeOf(e2.prototype), "setValue", this).call(this, n2);
34197
34156
  } }, { key: "min", value: function(t3) {
34198
34157
  return this.__min = t3, this;
34199
34158
  } }, { key: "max", value: function(t3) {
34200
34159
  return this.__max = t3, this;
34201
34160
  } }, { key: "step", value: function(t3) {
34202
- return this.__step = t3, this.__impliedStep = t3, this.__precision = yC(t3), this;
34161
+ return this.__step = t3, this.__impliedStep = t3, this.__precision = _C(t3), this;
34203
34162
  } }]), e2;
34204
- }(cC);
34205
- var bC = function(t2) {
34163
+ }(hC);
34164
+ var xC = function(t2) {
34206
34165
  function e2(t3, n2, i2) {
34207
- iC(this, e2);
34208
- var r2 = aC(this, (e2.__proto__ || Object.getPrototypeOf(e2)).call(this, t3, n2, i2));
34166
+ nC(this, e2);
34167
+ var r2 = sC(this, (e2.__proto__ || Object.getPrototypeOf(e2)).call(this, t3, n2, i2));
34209
34168
  r2.__truncationSuspended = false;
34210
34169
  var o2 = r2, s2 = void 0;
34211
34170
  function a2() {
@@ -34216,101 +34175,101 @@ void main(void){
34216
34175
  o2.setValue(o2.getValue() + e3 * o2.__impliedStep), s2 = t4.clientY;
34217
34176
  }
34218
34177
  function u2() {
34219
- mC.unbind(window, "mousemove", l2), mC.unbind(window, "mouseup", u2), a2();
34178
+ fC.unbind(window, "mousemove", l2), fC.unbind(window, "mouseup", u2), a2();
34220
34179
  }
34221
- return r2.__input = document.createElement("input"), r2.__input.setAttribute("type", "text"), mC.bind(r2.__input, "change", function() {
34180
+ return r2.__input = document.createElement("input"), r2.__input.setAttribute("type", "text"), fC.bind(r2.__input, "change", function() {
34222
34181
  var t4 = parseFloat(o2.__input.value);
34223
- ZP.isNaN(t4) || o2.setValue(t4);
34224
- }), mC.bind(r2.__input, "blur", function() {
34182
+ YP.isNaN(t4) || o2.setValue(t4);
34183
+ }), fC.bind(r2.__input, "blur", function() {
34225
34184
  a2();
34226
- }), mC.bind(r2.__input, "mousedown", function(t4) {
34227
- mC.bind(window, "mousemove", l2), mC.bind(window, "mouseup", u2), s2 = t4.clientY;
34228
- }), mC.bind(r2.__input, "keydown", function(t4) {
34185
+ }), fC.bind(r2.__input, "mousedown", function(t4) {
34186
+ fC.bind(window, "mousemove", l2), fC.bind(window, "mouseup", u2), s2 = t4.clientY;
34187
+ }), fC.bind(r2.__input, "keydown", function(t4) {
34229
34188
  t4.keyCode === 13 && (o2.__truncationSuspended = true, this.blur(), o2.__truncationSuspended = false, a2());
34230
34189
  }), r2.updateDisplay(), r2.domElement.appendChild(r2.__input), r2;
34231
34190
  }
34232
- return sC(e2, t2), rC(e2, [{ key: "updateDisplay", value: function() {
34191
+ return oC(e2, t2), iC(e2, [{ key: "updateDisplay", value: function() {
34233
34192
  var t3, n2, i2;
34234
- return this.__input.value = this.__truncationSuspended ? this.getValue() : (t3 = this.getValue(), n2 = this.__precision, i2 = Math.pow(10, n2), Math.round(t3 * i2) / i2), oC(e2.prototype.__proto__ || Object.getPrototypeOf(e2.prototype), "updateDisplay", this).call(this);
34193
+ return this.__input.value = this.__truncationSuspended ? this.getValue() : (t3 = this.getValue(), n2 = this.__precision, i2 = Math.pow(10, n2), Math.round(t3 * i2) / i2), rC(e2.prototype.__proto__ || Object.getPrototypeOf(e2.prototype), "updateDisplay", this).call(this);
34235
34194
  } }]), e2;
34236
- }(xC);
34237
- function TC(t2, e2, n2, i2, r2) {
34195
+ }(yC);
34196
+ function bC(t2, e2, n2, i2, r2) {
34238
34197
  return i2 + (t2 - e2) / (n2 - e2) * (r2 - i2);
34239
34198
  }
34240
- var wC = function(t2) {
34199
+ var TC = function(t2) {
34241
34200
  function e2(t3, n2, i2, r2, o2) {
34242
- iC(this, e2);
34243
- var s2 = aC(this, (e2.__proto__ || Object.getPrototypeOf(e2)).call(this, t3, n2, { min: i2, max: r2, step: o2 })), a2 = s2;
34201
+ nC(this, e2);
34202
+ var s2 = sC(this, (e2.__proto__ || Object.getPrototypeOf(e2)).call(this, t3, n2, { min: i2, max: r2, step: o2 })), a2 = s2;
34244
34203
  function l2(t4) {
34245
34204
  t4.preventDefault();
34246
34205
  var e3 = a2.__background.getBoundingClientRect();
34247
- return a2.setValue(TC(t4.clientX, e3.left, e3.right, a2.__min, a2.__max)), false;
34206
+ return a2.setValue(bC(t4.clientX, e3.left, e3.right, a2.__min, a2.__max)), false;
34248
34207
  }
34249
34208
  function u2() {
34250
- mC.unbind(window, "mousemove", l2), mC.unbind(window, "mouseup", u2), a2.__onFinishChange && a2.__onFinishChange.call(a2, a2.getValue());
34209
+ fC.unbind(window, "mousemove", l2), fC.unbind(window, "mouseup", u2), a2.__onFinishChange && a2.__onFinishChange.call(a2, a2.getValue());
34251
34210
  }
34252
34211
  function h2(t4) {
34253
34212
  var e3 = t4.touches[0].clientX, n3 = a2.__background.getBoundingClientRect();
34254
- a2.setValue(TC(e3, n3.left, n3.right, a2.__min, a2.__max));
34213
+ a2.setValue(bC(e3, n3.left, n3.right, a2.__min, a2.__max));
34255
34214
  }
34256
34215
  function c2() {
34257
- mC.unbind(window, "touchmove", h2), mC.unbind(window, "touchend", c2), a2.__onFinishChange && a2.__onFinishChange.call(a2, a2.getValue());
34216
+ fC.unbind(window, "touchmove", h2), fC.unbind(window, "touchend", c2), a2.__onFinishChange && a2.__onFinishChange.call(a2, a2.getValue());
34258
34217
  }
34259
- return s2.__background = document.createElement("div"), s2.__foreground = document.createElement("div"), mC.bind(s2.__background, "mousedown", function(t4) {
34260
- document.activeElement.blur(), mC.bind(window, "mousemove", l2), mC.bind(window, "mouseup", u2), l2(t4);
34261
- }), mC.bind(s2.__background, "touchstart", function(t4) {
34218
+ return s2.__background = document.createElement("div"), s2.__foreground = document.createElement("div"), fC.bind(s2.__background, "mousedown", function(t4) {
34219
+ document.activeElement.blur(), fC.bind(window, "mousemove", l2), fC.bind(window, "mouseup", u2), l2(t4);
34220
+ }), fC.bind(s2.__background, "touchstart", function(t4) {
34262
34221
  if (t4.touches.length !== 1)
34263
34222
  return;
34264
- mC.bind(window, "touchmove", h2), mC.bind(window, "touchend", c2), h2(t4);
34265
- }), mC.addClass(s2.__background, "slider"), mC.addClass(s2.__foreground, "slider-fg"), s2.updateDisplay(), s2.__background.appendChild(s2.__foreground), s2.domElement.appendChild(s2.__background), s2;
34223
+ fC.bind(window, "touchmove", h2), fC.bind(window, "touchend", c2), h2(t4);
34224
+ }), fC.addClass(s2.__background, "slider"), fC.addClass(s2.__foreground, "slider-fg"), s2.updateDisplay(), s2.__background.appendChild(s2.__foreground), s2.domElement.appendChild(s2.__background), s2;
34266
34225
  }
34267
- return sC(e2, t2), rC(e2, [{ key: "updateDisplay", value: function() {
34226
+ return oC(e2, t2), iC(e2, [{ key: "updateDisplay", value: function() {
34268
34227
  var t3 = (this.getValue() - this.__min) / (this.__max - this.__min);
34269
- return this.__foreground.style.width = 100 * t3 + "%", oC(e2.prototype.__proto__ || Object.getPrototypeOf(e2.prototype), "updateDisplay", this).call(this);
34228
+ return this.__foreground.style.width = 100 * t3 + "%", rC(e2.prototype.__proto__ || Object.getPrototypeOf(e2.prototype), "updateDisplay", this).call(this);
34270
34229
  } }]), e2;
34271
- }(xC), SC = function(t2) {
34230
+ }(yC), wC = function(t2) {
34272
34231
  function e2(t3, n2, i2) {
34273
- iC(this, e2);
34274
- var r2 = aC(this, (e2.__proto__ || Object.getPrototypeOf(e2)).call(this, t3, n2)), o2 = r2;
34275
- return r2.__button = document.createElement("div"), r2.__button.innerHTML = i2 === void 0 ? "Fire" : i2, mC.bind(r2.__button, "click", function(t4) {
34232
+ nC(this, e2);
34233
+ var r2 = sC(this, (e2.__proto__ || Object.getPrototypeOf(e2)).call(this, t3, n2)), o2 = r2;
34234
+ return r2.__button = document.createElement("div"), r2.__button.innerHTML = i2 === void 0 ? "Fire" : i2, fC.bind(r2.__button, "click", function(t4) {
34276
34235
  return t4.preventDefault(), o2.fire(), false;
34277
- }), mC.addClass(r2.__button, "button"), r2.domElement.appendChild(r2.__button), r2;
34236
+ }), fC.addClass(r2.__button, "button"), r2.domElement.appendChild(r2.__button), r2;
34278
34237
  }
34279
- return sC(e2, t2), rC(e2, [{ key: "fire", value: function() {
34238
+ return oC(e2, t2), iC(e2, [{ key: "fire", value: function() {
34280
34239
  this.__onChange && this.__onChange.call(this), this.getValue().call(this.object), this.__onFinishChange && this.__onFinishChange.call(this, this.getValue());
34281
34240
  } }]), e2;
34282
- }(cC), EC = function(t2) {
34241
+ }(hC), SC = function(t2) {
34283
34242
  function e2(t3, n2) {
34284
- iC(this, e2);
34285
- var i2 = aC(this, (e2.__proto__ || Object.getPrototypeOf(e2)).call(this, t3, n2));
34286
- i2.__color = new lC(i2.getValue()), i2.__temp = new lC(0);
34243
+ nC(this, e2);
34244
+ var i2 = sC(this, (e2.__proto__ || Object.getPrototypeOf(e2)).call(this, t3, n2));
34245
+ i2.__color = new aC(i2.getValue()), i2.__temp = new aC(0);
34287
34246
  var r2 = i2;
34288
- i2.domElement = document.createElement("div"), mC.makeSelectable(i2.domElement, false), i2.__selector = document.createElement("div"), i2.__selector.className = "selector", i2.__saturation_field = document.createElement("div"), i2.__saturation_field.className = "saturation-field", i2.__field_knob = document.createElement("div"), i2.__field_knob.className = "field-knob", i2.__field_knob_border = "2px solid ", i2.__hue_knob = document.createElement("div"), i2.__hue_knob.className = "hue-knob", i2.__hue_field = document.createElement("div"), i2.__hue_field.className = "hue-field", i2.__input = document.createElement("input"), i2.__input.type = "text", i2.__input_textShadow = "0 1px 1px ", mC.bind(i2.__input, "keydown", function(t4) {
34247
+ i2.domElement = document.createElement("div"), fC.makeSelectable(i2.domElement, false), i2.__selector = document.createElement("div"), i2.__selector.className = "selector", i2.__saturation_field = document.createElement("div"), i2.__saturation_field.className = "saturation-field", i2.__field_knob = document.createElement("div"), i2.__field_knob.className = "field-knob", i2.__field_knob_border = "2px solid ", i2.__hue_knob = document.createElement("div"), i2.__hue_knob.className = "hue-knob", i2.__hue_field = document.createElement("div"), i2.__hue_field.className = "hue-field", i2.__input = document.createElement("input"), i2.__input.type = "text", i2.__input_textShadow = "0 1px 1px ", fC.bind(i2.__input, "keydown", function(t4) {
34289
34248
  t4.keyCode === 13 && c2.call(this);
34290
- }), mC.bind(i2.__input, "blur", c2), mC.bind(i2.__selector, "mousedown", function() {
34291
- mC.addClass(this, "drag").bind(window, "mouseup", function() {
34292
- mC.removeClass(r2.__selector, "drag");
34249
+ }), fC.bind(i2.__input, "blur", c2), fC.bind(i2.__selector, "mousedown", function() {
34250
+ fC.addClass(this, "drag").bind(window, "mouseup", function() {
34251
+ fC.removeClass(r2.__selector, "drag");
34293
34252
  });
34294
- }), mC.bind(i2.__selector, "touchstart", function() {
34295
- mC.addClass(this, "drag").bind(window, "touchend", function() {
34296
- mC.removeClass(r2.__selector, "drag");
34253
+ }), fC.bind(i2.__selector, "touchstart", function() {
34254
+ fC.addClass(this, "drag").bind(window, "touchend", function() {
34255
+ fC.removeClass(r2.__selector, "drag");
34297
34256
  });
34298
34257
  });
34299
34258
  var o2, s2 = document.createElement("div");
34300
34259
  function a2(t4) {
34301
- p2(t4), mC.bind(window, "mousemove", p2), mC.bind(window, "touchmove", p2), mC.bind(window, "mouseup", u2), mC.bind(window, "touchend", u2);
34260
+ p2(t4), fC.bind(window, "mousemove", p2), fC.bind(window, "touchmove", p2), fC.bind(window, "mouseup", u2), fC.bind(window, "touchend", u2);
34302
34261
  }
34303
34262
  function l2(t4) {
34304
- f2(t4), mC.bind(window, "mousemove", f2), mC.bind(window, "touchmove", f2), mC.bind(window, "mouseup", h2), mC.bind(window, "touchend", h2);
34263
+ f2(t4), fC.bind(window, "mousemove", f2), fC.bind(window, "touchmove", f2), fC.bind(window, "mouseup", h2), fC.bind(window, "touchend", h2);
34305
34264
  }
34306
34265
  function u2() {
34307
- mC.unbind(window, "mousemove", p2), mC.unbind(window, "touchmove", p2), mC.unbind(window, "mouseup", u2), mC.unbind(window, "touchend", u2), d2();
34266
+ fC.unbind(window, "mousemove", p2), fC.unbind(window, "touchmove", p2), fC.unbind(window, "mouseup", u2), fC.unbind(window, "touchend", u2), d2();
34308
34267
  }
34309
34268
  function h2() {
34310
- mC.unbind(window, "mousemove", f2), mC.unbind(window, "touchmove", f2), mC.unbind(window, "mouseup", h2), mC.unbind(window, "touchend", h2), d2();
34269
+ fC.unbind(window, "mousemove", f2), fC.unbind(window, "touchmove", f2), fC.unbind(window, "mouseup", h2), fC.unbind(window, "touchend", h2), d2();
34311
34270
  }
34312
34271
  function c2() {
34313
- var t4 = QP(this.value);
34272
+ var t4 = KP(this.value);
34314
34273
  t4 !== false ? (r2.__color.__state = t4, r2.setValue(r2.__color.toOriginal())) : this.value = r2.__color.toString();
34315
34274
  }
34316
34275
  function d2() {
@@ -34326,28 +34285,28 @@ void main(void){
34326
34285
  var e3 = r2.__hue_field.getBoundingClientRect(), n3 = 1 - ((t4.touches && t4.touches[0] || t4).clientY - e3.top) / (e3.bottom - e3.top);
34327
34286
  return n3 > 1 ? n3 = 1 : n3 < 0 && (n3 = 0), r2.__color.h = 360 * n3, r2.setValue(r2.__color.toOriginal()), false;
34328
34287
  }
34329
- return ZP.extend(i2.__selector.style, { width: "122px", height: "102px", padding: "3px", backgroundColor: "#222", boxShadow: "0px 1px 3px rgba(0,0,0,0.3)" }), ZP.extend(i2.__field_knob.style, { position: "absolute", width: "12px", height: "12px", border: i2.__field_knob_border + (i2.__color.v < 0.5 ? "#fff" : "#000"), boxShadow: "0px 1px 3px rgba(0,0,0,0.5)", borderRadius: "12px", zIndex: 1 }), ZP.extend(i2.__hue_knob.style, { position: "absolute", width: "15px", height: "2px", borderRight: "4px solid #fff", zIndex: 1 }), ZP.extend(i2.__saturation_field.style, { width: "100px", height: "100px", border: "1px solid #555", marginRight: "3px", display: "inline-block", cursor: "pointer" }), ZP.extend(s2.style, { width: "100%", height: "100%", background: "none" }), AC(s2, "top", "rgba(0,0,0,0)", "#000"), ZP.extend(i2.__hue_field.style, { width: "15px", height: "100px", border: "1px solid #555", cursor: "ns-resize", position: "absolute", top: "3px", right: "3px" }), (o2 = i2.__hue_field).style.background = "", o2.style.cssText += "background: -moz-linear-gradient(top, #ff0000 0%, #ff00ff 17%, #0000ff 34%, #00ffff 50%, #00ff00 67%, #ffff00 84%, #ff0000 100%);", o2.style.cssText += "background: -webkit-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);", o2.style.cssText += "background: -o-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);", o2.style.cssText += "background: -ms-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);", o2.style.cssText += "background: linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);", ZP.extend(i2.__input.style, { outline: "none", textAlign: "center", color: "#fff", border: 0, fontWeight: "bold", textShadow: i2.__input_textShadow + "rgba(0,0,0,0.7)" }), mC.bind(i2.__saturation_field, "mousedown", a2), mC.bind(i2.__saturation_field, "touchstart", a2), mC.bind(i2.__field_knob, "mousedown", a2), mC.bind(i2.__field_knob, "touchstart", a2), mC.bind(i2.__hue_field, "mousedown", l2), mC.bind(i2.__hue_field, "touchstart", l2), i2.__saturation_field.appendChild(s2), i2.__selector.appendChild(i2.__field_knob), i2.__selector.appendChild(i2.__saturation_field), i2.__selector.appendChild(i2.__hue_field), i2.__hue_field.appendChild(i2.__hue_knob), i2.domElement.appendChild(i2.__input), i2.domElement.appendChild(i2.__selector), i2.updateDisplay(), i2;
34288
+ return YP.extend(i2.__selector.style, { width: "122px", height: "102px", padding: "3px", backgroundColor: "#222", boxShadow: "0px 1px 3px rgba(0,0,0,0.3)" }), YP.extend(i2.__field_knob.style, { position: "absolute", width: "12px", height: "12px", border: i2.__field_knob_border + (i2.__color.v < 0.5 ? "#fff" : "#000"), boxShadow: "0px 1px 3px rgba(0,0,0,0.5)", borderRadius: "12px", zIndex: 1 }), YP.extend(i2.__hue_knob.style, { position: "absolute", width: "15px", height: "2px", borderRight: "4px solid #fff", zIndex: 1 }), YP.extend(i2.__saturation_field.style, { width: "100px", height: "100px", border: "1px solid #555", marginRight: "3px", display: "inline-block", cursor: "pointer" }), YP.extend(s2.style, { width: "100%", height: "100%", background: "none" }), MC(s2, "top", "rgba(0,0,0,0)", "#000"), YP.extend(i2.__hue_field.style, { width: "15px", height: "100px", border: "1px solid #555", cursor: "ns-resize", position: "absolute", top: "3px", right: "3px" }), (o2 = i2.__hue_field).style.background = "", o2.style.cssText += "background: -moz-linear-gradient(top, #ff0000 0%, #ff00ff 17%, #0000ff 34%, #00ffff 50%, #00ff00 67%, #ffff00 84%, #ff0000 100%);", o2.style.cssText += "background: -webkit-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);", o2.style.cssText += "background: -o-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);", o2.style.cssText += "background: -ms-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);", o2.style.cssText += "background: linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);", YP.extend(i2.__input.style, { outline: "none", textAlign: "center", color: "#fff", border: 0, fontWeight: "bold", textShadow: i2.__input_textShadow + "rgba(0,0,0,0.7)" }), fC.bind(i2.__saturation_field, "mousedown", a2), fC.bind(i2.__saturation_field, "touchstart", a2), fC.bind(i2.__field_knob, "mousedown", a2), fC.bind(i2.__field_knob, "touchstart", a2), fC.bind(i2.__hue_field, "mousedown", l2), fC.bind(i2.__hue_field, "touchstart", l2), i2.__saturation_field.appendChild(s2), i2.__selector.appendChild(i2.__field_knob), i2.__selector.appendChild(i2.__saturation_field), i2.__selector.appendChild(i2.__hue_field), i2.__hue_field.appendChild(i2.__hue_knob), i2.domElement.appendChild(i2.__input), i2.domElement.appendChild(i2.__selector), i2.updateDisplay(), i2;
34330
34289
  }
34331
- return sC(e2, t2), rC(e2, [{ key: "updateDisplay", value: function() {
34332
- var t3 = QP(this.getValue());
34290
+ return oC(e2, t2), iC(e2, [{ key: "updateDisplay", value: function() {
34291
+ var t3 = KP(this.getValue());
34333
34292
  if (t3 !== false) {
34334
34293
  var e3 = false;
34335
- ZP.each(lC.COMPONENTS, function(n3) {
34336
- if (!ZP.isUndefined(t3[n3]) && !ZP.isUndefined(this.__color.__state[n3]) && t3[n3] !== this.__color.__state[n3])
34294
+ YP.each(aC.COMPONENTS, function(n3) {
34295
+ if (!YP.isUndefined(t3[n3]) && !YP.isUndefined(this.__color.__state[n3]) && t3[n3] !== this.__color.__state[n3])
34337
34296
  return e3 = true, {};
34338
- }, this), e3 && ZP.extend(this.__color.__state, t3);
34297
+ }, this), e3 && YP.extend(this.__color.__state, t3);
34339
34298
  }
34340
- ZP.extend(this.__temp.__state, this.__color.__state), this.__temp.a = 1;
34299
+ YP.extend(this.__temp.__state, this.__color.__state), this.__temp.a = 1;
34341
34300
  var n2 = this.__color.v < 0.5 || this.__color.s > 0.5 ? 255 : 0, i2 = 255 - n2;
34342
- ZP.extend(this.__field_knob.style, { marginLeft: 100 * this.__color.s - 7 + "px", marginTop: 100 * (1 - this.__color.v) - 7 + "px", backgroundColor: this.__temp.toHexString(), border: this.__field_knob_border + "rgb(" + n2 + "," + n2 + "," + n2 + ")" }), this.__hue_knob.style.marginTop = 100 * (1 - this.__color.h / 360) + "px", this.__temp.s = 1, this.__temp.v = 1, AC(this.__saturation_field, "left", "#fff", this.__temp.toHexString()), this.__input.value = this.__color.toString(), ZP.extend(this.__input.style, { backgroundColor: this.__color.toHexString(), color: "rgb(" + n2 + "," + n2 + "," + n2 + ")", textShadow: this.__input_textShadow + "rgba(" + i2 + "," + i2 + "," + i2 + ",.7)" });
34301
+ YP.extend(this.__field_knob.style, { marginLeft: 100 * this.__color.s - 7 + "px", marginTop: 100 * (1 - this.__color.v) - 7 + "px", backgroundColor: this.__temp.toHexString(), border: this.__field_knob_border + "rgb(" + n2 + "," + n2 + "," + n2 + ")" }), this.__hue_knob.style.marginTop = 100 * (1 - this.__color.h / 360) + "px", this.__temp.s = 1, this.__temp.v = 1, MC(this.__saturation_field, "left", "#fff", this.__temp.toHexString()), this.__input.value = this.__color.toString(), YP.extend(this.__input.style, { backgroundColor: this.__color.toHexString(), color: "rgb(" + n2 + "," + n2 + "," + n2 + ")", textShadow: this.__input_textShadow + "rgba(" + i2 + "," + i2 + "," + i2 + ",.7)" });
34343
34302
  } }]), e2;
34344
- }(cC), MC = ["-moz-", "-o-", "-webkit-", "-ms-", ""];
34345
- function AC(t2, e2, n2, i2) {
34346
- t2.style.background = "", ZP.each(MC, function(r2) {
34303
+ }(hC), EC = ["-moz-", "-o-", "-webkit-", "-ms-", ""];
34304
+ function MC(t2, e2, n2, i2) {
34305
+ t2.style.background = "", YP.each(EC, function(r2) {
34347
34306
  t2.style.cssText += "background: " + r2 + "linear-gradient(" + e2 + ", " + n2 + " 0%, " + i2 + " 100%); ";
34348
34307
  });
34349
34308
  }
34350
- var RC = function(t2, e2) {
34309
+ var AC = function(t2, e2) {
34351
34310
  var n2 = e2 || document, i2 = document.createElement("style");
34352
34311
  i2.type = "text/css", i2.innerHTML = t2;
34353
34312
  var r2 = n2.getElementsByTagName("head")[0];
@@ -34355,7 +34314,7 @@ void main(void){
34355
34314
  r2.appendChild(i2);
34356
34315
  } catch (t3) {
34357
34316
  }
34358
- }, PC = `<div id="dg-save" class="dg dialogue">
34317
+ }, RC = `<div id="dg-save" class="dg dialogue">
34359
34318
 
34360
34319
  Here's the new load parameter for your <code>GUI</code>'s constructor:
34361
34320
 
@@ -34375,50 +34334,50 @@ void main(void){
34375
34334
 
34376
34335
  </div>
34377
34336
 
34378
- </div>`, CC = function(t2, e2) {
34337
+ </div>`, PC = function(t2, e2) {
34379
34338
  var n2 = t2[e2];
34380
- return ZP.isArray(arguments[2]) || ZP.isObject(arguments[2]) ? new vC(t2, e2, arguments[2]) : ZP.isNumber(n2) ? ZP.isNumber(arguments[2]) && ZP.isNumber(arguments[3]) ? ZP.isNumber(arguments[4]) ? new wC(t2, e2, arguments[2], arguments[3], arguments[4]) : new wC(t2, e2, arguments[2], arguments[3]) : ZP.isNumber(arguments[4]) ? new bC(t2, e2, { min: arguments[2], max: arguments[3], step: arguments[4] }) : new bC(t2, e2, { min: arguments[2], max: arguments[3] }) : ZP.isString(n2) ? new _C(t2, e2) : ZP.isFunction(n2) ? new SC(t2, e2, "") : ZP.isBoolean(n2) ? new gC(t2, e2) : null;
34339
+ return YP.isArray(arguments[2]) || YP.isObject(arguments[2]) ? new gC(t2, e2, arguments[2]) : YP.isNumber(n2) ? YP.isNumber(arguments[2]) && YP.isNumber(arguments[3]) ? YP.isNumber(arguments[4]) ? new TC(t2, e2, arguments[2], arguments[3], arguments[4]) : new TC(t2, e2, arguments[2], arguments[3]) : YP.isNumber(arguments[4]) ? new xC(t2, e2, { min: arguments[2], max: arguments[3], step: arguments[4] }) : new xC(t2, e2, { min: arguments[2], max: arguments[3] }) : YP.isString(n2) ? new vC(t2, e2) : YP.isFunction(n2) ? new wC(t2, e2, "") : YP.isBoolean(n2) ? new mC(t2, e2) : null;
34381
34340
  };
34382
- var IC = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function(t2) {
34341
+ var CC = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function(t2) {
34383
34342
  setTimeout(t2, 1e3 / 60);
34384
- }, OC = function() {
34343
+ }, IC = function() {
34385
34344
  function t2() {
34386
- iC(this, t2), this.backgroundElement = document.createElement("div"), ZP.extend(this.backgroundElement.style, { backgroundColor: "rgba(0,0,0,0.8)", top: 0, left: 0, display: "none", zIndex: "1000", opacity: 0, WebkitTransition: "opacity 0.2s linear", transition: "opacity 0.2s linear" }), mC.makeFullscreen(this.backgroundElement), this.backgroundElement.style.position = "fixed", this.domElement = document.createElement("div"), ZP.extend(this.domElement.style, { position: "fixed", display: "none", zIndex: "1001", opacity: 0, WebkitTransition: "-webkit-transform 0.2s ease-out, opacity 0.2s linear", transition: "transform 0.2s ease-out, opacity 0.2s linear" }), document.body.appendChild(this.backgroundElement), document.body.appendChild(this.domElement);
34345
+ nC(this, t2), this.backgroundElement = document.createElement("div"), YP.extend(this.backgroundElement.style, { backgroundColor: "rgba(0,0,0,0.8)", top: 0, left: 0, display: "none", zIndex: "1000", opacity: 0, WebkitTransition: "opacity 0.2s linear", transition: "opacity 0.2s linear" }), fC.makeFullscreen(this.backgroundElement), this.backgroundElement.style.position = "fixed", this.domElement = document.createElement("div"), YP.extend(this.domElement.style, { position: "fixed", display: "none", zIndex: "1001", opacity: 0, WebkitTransition: "-webkit-transform 0.2s ease-out, opacity 0.2s linear", transition: "transform 0.2s ease-out, opacity 0.2s linear" }), document.body.appendChild(this.backgroundElement), document.body.appendChild(this.domElement);
34387
34346
  var e2 = this;
34388
- mC.bind(this.backgroundElement, "click", function() {
34347
+ fC.bind(this.backgroundElement, "click", function() {
34389
34348
  e2.hide();
34390
34349
  });
34391
34350
  }
34392
- return rC(t2, [{ key: "show", value: function() {
34351
+ return iC(t2, [{ key: "show", value: function() {
34393
34352
  var t3 = this;
34394
- this.backgroundElement.style.display = "block", this.domElement.style.display = "block", this.domElement.style.opacity = 0, this.domElement.style.webkitTransform = "scale(1.1)", this.layout(), ZP.defer(function() {
34353
+ this.backgroundElement.style.display = "block", this.domElement.style.display = "block", this.domElement.style.opacity = 0, this.domElement.style.webkitTransform = "scale(1.1)", this.layout(), YP.defer(function() {
34395
34354
  t3.backgroundElement.style.opacity = 1, t3.domElement.style.opacity = 1, t3.domElement.style.webkitTransform = "scale(1)";
34396
34355
  });
34397
34356
  } }, { key: "hide", value: function() {
34398
34357
  var t3 = this, e2 = function e3() {
34399
- t3.domElement.style.display = "none", t3.backgroundElement.style.display = "none", mC.unbind(t3.domElement, "webkitTransitionEnd", e3), mC.unbind(t3.domElement, "transitionend", e3), mC.unbind(t3.domElement, "oTransitionEnd", e3);
34358
+ t3.domElement.style.display = "none", t3.backgroundElement.style.display = "none", fC.unbind(t3.domElement, "webkitTransitionEnd", e3), fC.unbind(t3.domElement, "transitionend", e3), fC.unbind(t3.domElement, "oTransitionEnd", e3);
34400
34359
  };
34401
- mC.bind(this.domElement, "webkitTransitionEnd", e2), mC.bind(this.domElement, "transitionend", e2), mC.bind(this.domElement, "oTransitionEnd", e2), this.backgroundElement.style.opacity = 0, this.domElement.style.opacity = 0, this.domElement.style.webkitTransform = "scale(1.1)";
34360
+ fC.bind(this.domElement, "webkitTransitionEnd", e2), fC.bind(this.domElement, "transitionend", e2), fC.bind(this.domElement, "oTransitionEnd", e2), this.backgroundElement.style.opacity = 0, this.domElement.style.opacity = 0, this.domElement.style.webkitTransform = "scale(1.1)";
34402
34361
  } }, { key: "layout", value: function() {
34403
- this.domElement.style.left = window.innerWidth / 2 - mC.getWidth(this.domElement) / 2 + "px", this.domElement.style.top = window.innerHeight / 2 - mC.getHeight(this.domElement) / 2 + "px";
34362
+ this.domElement.style.left = window.innerWidth / 2 - fC.getWidth(this.domElement) / 2 + "px", this.domElement.style.top = window.innerHeight / 2 - fC.getHeight(this.domElement) / 2 + "px";
34404
34363
  } }]), t2;
34405
34364
  }();
34406
- RC(function(t2) {
34365
+ AC(function(t2) {
34407
34366
  if (t2 && typeof window != "undefined") {
34408
34367
  var e2 = document.createElement("style");
34409
34368
  return e2.setAttribute("type", "text/css"), e2.innerHTML = t2, document.head.appendChild(e2), t2;
34410
34369
  }
34411
34370
  }(".dg ul{list-style:none;margin:0;padding:0;width:100%;clear:both}.dg.ac{position:fixed;top:0;left:0;right:0;height:0;z-index:0}.dg:not(.ac) .main{overflow:hidden}.dg.main{-webkit-transition:opacity .1s linear;-o-transition:opacity .1s linear;-moz-transition:opacity .1s linear;transition:opacity .1s linear}.dg.main.taller-than-window{overflow-y:auto}.dg.main.taller-than-window .close-button{opacity:1;margin-top:-1px;border-top:1px solid #2c2c2c}.dg.main ul.closed .close-button{opacity:1 !important}.dg.main:hover .close-button,.dg.main .close-button.drag{opacity:1}.dg.main .close-button{-webkit-transition:opacity .1s linear;-o-transition:opacity .1s linear;-moz-transition:opacity .1s linear;transition:opacity .1s linear;border:0;line-height:19px;height:20px;cursor:pointer;text-align:center;background-color:#000}.dg.main .close-button.close-top{position:relative}.dg.main .close-button.close-bottom{position:absolute}.dg.main .close-button:hover{background-color:#111}.dg.a{float:right;margin-right:15px;overflow-y:visible}.dg.a.has-save>ul.close-top{margin-top:0}.dg.a.has-save>ul.close-bottom{margin-top:27px}.dg.a.has-save>ul.closed{margin-top:0}.dg.a .save-row{top:0;z-index:1002}.dg.a .save-row.close-top{position:relative}.dg.a .save-row.close-bottom{position:fixed}.dg li{-webkit-transition:height .1s ease-out;-o-transition:height .1s ease-out;-moz-transition:height .1s ease-out;transition:height .1s ease-out;-webkit-transition:overflow .1s linear;-o-transition:overflow .1s linear;-moz-transition:overflow .1s linear;transition:overflow .1s linear}.dg li:not(.folder){cursor:auto;height:27px;line-height:27px;padding:0 4px 0 5px}.dg li.folder{padding:0;border-left:4px solid rgba(0,0,0,0)}.dg li.title{cursor:pointer;margin-left:-4px}.dg .closed li:not(.title),.dg .closed ul li,.dg .closed ul li>*{height:0;overflow:hidden;border:0}.dg .cr{clear:both;padding-left:3px;height:27px;overflow:hidden}.dg .property-name{cursor:default;float:left;clear:left;width:40%;overflow:hidden;text-overflow:ellipsis}.dg .c{float:left;width:60%;position:relative}.dg .c input[type=text]{border:0;margin-top:4px;padding:3px;width:100%;float:right}.dg .has-slider input[type=text]{width:30%;margin-left:0}.dg .slider{float:left;width:66%;margin-left:-5px;margin-right:0;height:19px;margin-top:4px}.dg .slider-fg{height:100%}.dg .c input[type=checkbox]{margin-top:7px}.dg .c select{margin-top:5px}.dg .cr.function,.dg .cr.function .property-name,.dg .cr.function *,.dg .cr.boolean,.dg .cr.boolean *{cursor:pointer}.dg .cr.color{overflow:visible}.dg .selector{display:none;position:absolute;margin-left:-9px;margin-top:23px;z-index:10}.dg .c:hover .selector,.dg .selector.drag{display:block}.dg li.save-row{padding:0}.dg li.save-row .button{display:inline-block;padding:0px 6px}.dg.dialogue{background-color:#222;width:460px;padding:15px;font-size:13px;line-height:15px}#dg-new-constructor{padding:10px;color:#222;font-family:Monaco, monospace;font-size:10px;border:0;resize:none;box-shadow:inset 1px 1px 1px #888;word-wrap:break-word;margin:12px 0;display:block;width:440px;overflow-y:scroll;height:100px;position:relative}#dg-local-explain{display:none;font-size:11px;line-height:17px;border-radius:3px;background-color:#333;padding:8px;margin-top:10px}#dg-local-explain code{font-size:10px}#dat-gui-save-locally{display:none}.dg{color:#eee;font:11px 'Lucida Grande', sans-serif;text-shadow:0 -1px 0 #111}.dg.main::-webkit-scrollbar{width:5px;background:#1a1a1a}.dg.main::-webkit-scrollbar-corner{height:0;display:none}.dg.main::-webkit-scrollbar-thumb{border-radius:5px;background:#676767}.dg li:not(.folder){background:#1a1a1a;border-bottom:1px solid #2c2c2c}.dg li.save-row{line-height:25px;background:#dad5cb;border:0}.dg li.save-row select{margin-left:5px;width:108px}.dg li.save-row .button{margin-left:5px;margin-top:1px;border-radius:2px;font-size:9px;line-height:7px;padding:4px 4px 5px 4px;background:#c5bdad;color:#fff;text-shadow:0 1px 0 #b0a58f;box-shadow:0 -1px 0 #b0a58f;cursor:pointer}.dg li.save-row .button.gears{background:#c5bdad url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAANCAYAAAB/9ZQ7AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAQJJREFUeNpiYKAU/P//PwGIC/ApCABiBSAW+I8AClAcgKxQ4T9hoMAEUrxx2QSGN6+egDX+/vWT4e7N82AMYoPAx/evwWoYoSYbACX2s7KxCxzcsezDh3evFoDEBYTEEqycggWAzA9AuUSQQgeYPa9fPv6/YWm/Acx5IPb7ty/fw+QZblw67vDs8R0YHyQhgObx+yAJkBqmG5dPPDh1aPOGR/eugW0G4vlIoTIfyFcA+QekhhHJhPdQxbiAIguMBTQZrPD7108M6roWYDFQiIAAv6Aow/1bFwXgis+f2LUAynwoIaNcz8XNx3Dl7MEJUDGQpx9gtQ8YCueB+D26OECAAQDadt7e46D42QAAAABJRU5ErkJggg==) 2px 1px no-repeat;height:7px;width:8px}.dg li.save-row .button:hover{background-color:#bab19e;box-shadow:0 -1px 0 #b0a58f}.dg li.folder{border-bottom:0}.dg li.title{padding-left:16px;background:#000 url(data:image/gif;base64,R0lGODlhBQAFAJEAAP////Pz8////////yH5BAEAAAIALAAAAAAFAAUAAAIIlI+hKgFxoCgAOw==) 6px 10px no-repeat;cursor:pointer;border-bottom:1px solid rgba(255,255,255,0.2)}.dg .closed li.title{background-image:url(data:image/gif;base64,R0lGODlhBQAFAJEAAP////Pz8////////yH5BAEAAAIALAAAAAAFAAUAAAIIlGIWqMCbWAEAOw==)}.dg .cr.boolean{border-left:3px solid #806787}.dg .cr.color{border-left:3px solid}.dg .cr.function{border-left:3px solid #e61d5f}.dg .cr.number{border-left:3px solid #2FA1D6}.dg .cr.number input[type=text]{color:#2FA1D6}.dg .cr.string{border-left:3px solid #1ed36f}.dg .cr.string input[type=text]{color:#1ed36f}.dg .cr.function:hover,.dg .cr.boolean:hover{background:#111}.dg .c input[type=text]{background:#303030;outline:none}.dg .c input[type=text]:hover{background:#3c3c3c}.dg .c input[type=text]:focus{background:#494949;color:#fff}.dg .c .slider{background:#303030;cursor:ew-resize}.dg .c .slider-fg{background:#2FA1D6;max-width:100%}.dg .c .slider:hover{background:#3c3c3c}.dg .c .slider:hover .slider-fg{background:#44abda}\n"));
34412
- var LC = function() {
34371
+ var OC = function() {
34413
34372
  try {
34414
34373
  return !!window.localStorage;
34415
34374
  } catch (t2) {
34416
34375
  return false;
34417
34376
  }
34418
- }(), NC = void 0, DC = true, FC = void 0, BC = false, UC = [], kC = function t2(e2) {
34377
+ }(), LC = void 0, NC = true, DC = void 0, FC = false, BC = [], UC = function t2(e2) {
34419
34378
  var n2 = this, i2 = e2 || {};
34420
- this.domElement = document.createElement("div"), this.__ul = document.createElement("ul"), this.domElement.appendChild(this.__ul), mC.addClass(this.domElement, "dg"), this.__folders = {}, this.__controllers = [], this.__rememberedObjects = [], this.__rememberedObjectIndecesToControllers = [], this.__listening = [], i2 = ZP.defaults(i2, { closeOnTop: false, autoPlace: true, width: t2.DEFAULT_WIDTH }), i2 = ZP.defaults(i2, { resizable: i2.autoPlace, hideable: i2.autoPlace }), ZP.isUndefined(i2.load) ? i2.load = { preset: "Default" } : i2.preset && (i2.load.preset = i2.preset), ZP.isUndefined(i2.parent) && i2.hideable && UC.push(this), i2.resizable = ZP.isUndefined(i2.parent) && i2.resizable, i2.autoPlace && ZP.isUndefined(i2.scrollable) && (i2.scrollable = true);
34421
- var r2, o2 = LC && localStorage.getItem(WC(this, "isLocal")) === "true", s2 = void 0, a2 = void 0;
34379
+ this.domElement = document.createElement("div"), this.__ul = document.createElement("ul"), this.domElement.appendChild(this.__ul), fC.addClass(this.domElement, "dg"), this.__folders = {}, this.__controllers = [], this.__rememberedObjects = [], this.__rememberedObjectIndecesToControllers = [], this.__listening = [], i2 = YP.defaults(i2, { closeOnTop: false, autoPlace: true, width: t2.DEFAULT_WIDTH }), i2 = YP.defaults(i2, { resizable: i2.autoPlace, hideable: i2.autoPlace }), YP.isUndefined(i2.load) ? i2.load = { preset: "Default" } : i2.preset && (i2.load.preset = i2.preset), YP.isUndefined(i2.parent) && i2.hideable && BC.push(this), i2.resizable = YP.isUndefined(i2.parent) && i2.resizable, i2.autoPlace && YP.isUndefined(i2.scrollable) && (i2.scrollable = true);
34380
+ var r2, o2 = OC && localStorage.getItem(VC(this, "isLocal")) === "true", s2 = void 0, a2 = void 0;
34422
34381
  if (Object.defineProperties(this, { parent: { get: function() {
34423
34382
  return i2.parent;
34424
34383
  } }, scrollable: { get: function() {
@@ -34437,7 +34396,7 @@ void main(void){
34437
34396
  } }, width: { get: function() {
34438
34397
  return i2.width;
34439
34398
  }, set: function(t3) {
34440
- i2.width = t3, JC(n2, t3);
34399
+ i2.width = t3, ZC(n2, t3);
34441
34400
  } }, name: { get: function() {
34442
34401
  return i2.name;
34443
34402
  }, set: function(t3) {
@@ -34445,50 +34404,50 @@ void main(void){
34445
34404
  } }, closed: { get: function() {
34446
34405
  return i2.closed;
34447
34406
  }, set: function(e3) {
34448
- i2.closed = e3, i2.closed ? mC.addClass(n2.__ul, t2.CLASS_CLOSED) : mC.removeClass(n2.__ul, t2.CLASS_CLOSED), this.onResize(), n2.__closeButton && (n2.__closeButton.innerHTML = e3 ? t2.TEXT_OPEN : t2.TEXT_CLOSED);
34407
+ i2.closed = e3, i2.closed ? fC.addClass(n2.__ul, t2.CLASS_CLOSED) : fC.removeClass(n2.__ul, t2.CLASS_CLOSED), this.onResize(), n2.__closeButton && (n2.__closeButton.innerHTML = e3 ? t2.TEXT_OPEN : t2.TEXT_CLOSED);
34449
34408
  } }, load: { get: function() {
34450
34409
  return i2.load;
34451
34410
  } }, useLocalStorage: { get: function() {
34452
34411
  return o2;
34453
34412
  }, set: function(t3) {
34454
- LC && (o2 = t3, t3 ? mC.bind(window, "unload", s2) : mC.unbind(window, "unload", s2), localStorage.setItem(WC(n2, "isLocal"), t3));
34455
- } } }), ZP.isUndefined(i2.parent)) {
34456
- if (this.closed = i2.closed || false, mC.addClass(this.domElement, t2.CLASS_MAIN), mC.makeSelectable(this.domElement, false), LC && o2) {
34413
+ OC && (o2 = t3, t3 ? fC.bind(window, "unload", s2) : fC.unbind(window, "unload", s2), localStorage.setItem(VC(n2, "isLocal"), t3));
34414
+ } } }), YP.isUndefined(i2.parent)) {
34415
+ if (this.closed = i2.closed || false, fC.addClass(this.domElement, t2.CLASS_MAIN), fC.makeSelectable(this.domElement, false), OC && o2) {
34457
34416
  n2.useLocalStorage = true;
34458
- var l2 = localStorage.getItem(WC(this, "gui"));
34417
+ var l2 = localStorage.getItem(VC(this, "gui"));
34459
34418
  l2 && (i2.load = JSON.parse(l2));
34460
34419
  }
34461
- this.__closeButton = document.createElement("div"), this.__closeButton.innerHTML = t2.TEXT_CLOSED, mC.addClass(this.__closeButton, t2.CLASS_CLOSE_BUTTON), i2.closeOnTop ? (mC.addClass(this.__closeButton, t2.CLASS_CLOSE_TOP), this.domElement.insertBefore(this.__closeButton, this.domElement.childNodes[0])) : (mC.addClass(this.__closeButton, t2.CLASS_CLOSE_BOTTOM), this.domElement.appendChild(this.__closeButton)), mC.bind(this.__closeButton, "click", function() {
34420
+ this.__closeButton = document.createElement("div"), this.__closeButton.innerHTML = t2.TEXT_CLOSED, fC.addClass(this.__closeButton, t2.CLASS_CLOSE_BUTTON), i2.closeOnTop ? (fC.addClass(this.__closeButton, t2.CLASS_CLOSE_TOP), this.domElement.insertBefore(this.__closeButton, this.domElement.childNodes[0])) : (fC.addClass(this.__closeButton, t2.CLASS_CLOSE_BOTTOM), this.domElement.appendChild(this.__closeButton)), fC.bind(this.__closeButton, "click", function() {
34462
34421
  n2.closed = !n2.closed;
34463
34422
  });
34464
34423
  } else {
34465
34424
  i2.closed === void 0 && (i2.closed = true);
34466
34425
  var u2 = document.createTextNode(i2.name);
34467
- mC.addClass(u2, "controller-name"), a2 = GC(n2, u2);
34468
- mC.addClass(this.__ul, t2.CLASS_CLOSED), mC.addClass(a2, "title"), mC.bind(a2, "click", function(t3) {
34426
+ fC.addClass(u2, "controller-name"), a2 = kC(n2, u2);
34427
+ fC.addClass(this.__ul, t2.CLASS_CLOSED), fC.addClass(a2, "title"), fC.bind(a2, "click", function(t3) {
34469
34428
  return t3.preventDefault(), n2.closed = !n2.closed, false;
34470
34429
  }), i2.closed || (this.closed = false);
34471
34430
  }
34472
- i2.autoPlace && (ZP.isUndefined(i2.parent) && (DC && (FC = document.createElement("div"), mC.addClass(FC, "dg"), mC.addClass(FC, t2.CLASS_AUTO_PLACE_CONTAINER), document.body.appendChild(FC), DC = false), FC.appendChild(this.domElement), mC.addClass(this.domElement, t2.CLASS_AUTO_PLACE)), this.parent || JC(n2, i2.width)), this.__resizeHandler = function() {
34431
+ i2.autoPlace && (YP.isUndefined(i2.parent) && (NC && (DC = document.createElement("div"), fC.addClass(DC, "dg"), fC.addClass(DC, t2.CLASS_AUTO_PLACE_CONTAINER), document.body.appendChild(DC), NC = false), DC.appendChild(this.domElement), fC.addClass(this.domElement, t2.CLASS_AUTO_PLACE)), this.parent || ZC(n2, i2.width)), this.__resizeHandler = function() {
34473
34432
  n2.onResizeDebounced();
34474
- }, mC.bind(window, "resize", this.__resizeHandler), mC.bind(this.__ul, "webkitTransitionEnd", this.__resizeHandler), mC.bind(this.__ul, "transitionend", this.__resizeHandler), mC.bind(this.__ul, "oTransitionEnd", this.__resizeHandler), this.onResize(), i2.resizable && ZC(this), s2 = function() {
34475
- LC && localStorage.getItem(WC(n2, "isLocal")) === "true" && localStorage.setItem(WC(n2, "gui"), JSON.stringify(n2.getSaveObject()));
34476
- }, this.saveToLocalStorageIfPossible = s2, i2.parent || ((r2 = n2.getRoot()).width += 1, ZP.defer(function() {
34433
+ }, fC.bind(window, "resize", this.__resizeHandler), fC.bind(this.__ul, "webkitTransitionEnd", this.__resizeHandler), fC.bind(this.__ul, "transitionend", this.__resizeHandler), fC.bind(this.__ul, "oTransitionEnd", this.__resizeHandler), this.onResize(), i2.resizable && YC(this), s2 = function() {
34434
+ OC && localStorage.getItem(VC(n2, "isLocal")) === "true" && localStorage.setItem(VC(n2, "gui"), JSON.stringify(n2.getSaveObject()));
34435
+ }, this.saveToLocalStorageIfPossible = s2, i2.parent || ((r2 = n2.getRoot()).width += 1, YP.defer(function() {
34477
34436
  r2.width -= 1;
34478
34437
  }));
34479
34438
  };
34480
- function GC(t2, e2, n2) {
34439
+ function kC(t2, e2, n2) {
34481
34440
  var i2 = document.createElement("li");
34482
34441
  return e2 && i2.appendChild(e2), n2 ? t2.__ul.insertBefore(i2, n2) : t2.__ul.appendChild(i2), t2.onResize(), i2;
34483
34442
  }
34484
- function HC(t2) {
34485
- mC.unbind(window, "resize", t2.__resizeHandler), t2.saveToLocalStorageIfPossible && mC.unbind(window, "unload", t2.saveToLocalStorageIfPossible);
34443
+ function GC(t2) {
34444
+ fC.unbind(window, "resize", t2.__resizeHandler), t2.saveToLocalStorageIfPossible && fC.unbind(window, "unload", t2.saveToLocalStorageIfPossible);
34486
34445
  }
34487
- function zC(t2, e2) {
34446
+ function HC(t2, e2) {
34488
34447
  var n2 = t2.__preset_select[t2.__preset_select.selectedIndex];
34489
34448
  n2.innerHTML = e2 ? n2.value + "*" : n2.value;
34490
34449
  }
34491
- function jC(t2, e2) {
34450
+ function zC(t2, e2) {
34492
34451
  var n2 = t2.getRoot(), i2 = n2.__rememberedObjects.indexOf(e2.object);
34493
34452
  if (i2 !== -1) {
34494
34453
  var r2 = n2.__rememberedObjectIndecesToControllers[i2];
@@ -34508,31 +34467,31 @@ void main(void){
34508
34467
  }
34509
34468
  }
34510
34469
  }
34511
- function VC(t2, e2, n2, i2) {
34470
+ function jC(t2, e2, n2, i2) {
34512
34471
  if (e2[n2] === void 0)
34513
34472
  throw new Error('Object "' + e2 + '" has no property "' + n2 + '"');
34514
34473
  var r2 = void 0;
34515
34474
  if (i2.color)
34516
- r2 = new EC(e2, n2);
34475
+ r2 = new SC(e2, n2);
34517
34476
  else {
34518
34477
  var o2 = [e2, n2].concat(i2.factoryArgs);
34519
- r2 = CC.apply(t2, o2);
34478
+ r2 = PC.apply(t2, o2);
34520
34479
  }
34521
- i2.before instanceof cC && (i2.before = i2.before.__li), jC(t2, r2), mC.addClass(r2.domElement, "c");
34480
+ i2.before instanceof hC && (i2.before = i2.before.__li), zC(t2, r2), fC.addClass(r2.domElement, "c");
34522
34481
  var s2 = document.createElement("span");
34523
- mC.addClass(s2, "property-name"), s2.innerHTML = r2.property;
34482
+ fC.addClass(s2, "property-name"), s2.innerHTML = r2.property;
34524
34483
  var a2 = document.createElement("div");
34525
34484
  a2.appendChild(s2), a2.appendChild(r2.domElement);
34526
- var l2 = GC(t2, a2, i2.before);
34527
- return mC.addClass(l2, kC.CLASS_CONTROLLER_ROW), r2 instanceof EC ? mC.addClass(l2, "color") : mC.addClass(l2, nC(r2.getValue())), function(t3, e3, n3) {
34528
- if (n3.__li = e3, n3.__gui = t3, ZP.extend(n3, { options: function(e4) {
34485
+ var l2 = kC(t2, a2, i2.before);
34486
+ return fC.addClass(l2, UC.CLASS_CONTROLLER_ROW), r2 instanceof SC ? fC.addClass(l2, "color") : fC.addClass(l2, eC(r2.getValue())), function(t3, e3, n3) {
34487
+ if (n3.__li = e3, n3.__gui = t3, YP.extend(n3, { options: function(e4) {
34529
34488
  if (arguments.length > 1) {
34530
34489
  var i4 = n3.__li.nextElementSibling;
34531
- return n3.remove(), VC(t3, n3.object, n3.property, { before: i4, factoryArgs: [ZP.toArray(arguments)] });
34490
+ return n3.remove(), jC(t3, n3.object, n3.property, { before: i4, factoryArgs: [YP.toArray(arguments)] });
34532
34491
  }
34533
- if (ZP.isArray(e4) || ZP.isObject(e4)) {
34492
+ if (YP.isArray(e4) || YP.isObject(e4)) {
34534
34493
  var r4 = n3.__li.nextElementSibling;
34535
- return n3.remove(), VC(t3, n3.object, n3.property, { before: r4, factoryArgs: [e4] });
34494
+ return n3.remove(), jC(t3, n3.object, n3.property, { before: r4, factoryArgs: [e4] });
34536
34495
  }
34537
34496
  }, name: function(t4) {
34538
34497
  return n3.__li.firstElementChild.firstElementChild.innerHTML = t4, n3;
@@ -34540,157 +34499,157 @@ void main(void){
34540
34499
  return n3.__gui.listen(n3), n3;
34541
34500
  }, remove: function() {
34542
34501
  return n3.__gui.remove(n3), n3;
34543
- } }), n3 instanceof wC) {
34544
- var i3 = new bC(n3.object, n3.property, { min: n3.__min, max: n3.__max, step: n3.__step });
34545
- ZP.each(["updateDisplay", "onChange", "onFinishChange", "step", "min", "max"], function(t4) {
34502
+ } }), n3 instanceof TC) {
34503
+ var i3 = new xC(n3.object, n3.property, { min: n3.__min, max: n3.__max, step: n3.__step });
34504
+ YP.each(["updateDisplay", "onChange", "onFinishChange", "step", "min", "max"], function(t4) {
34546
34505
  var e4 = n3[t4], r4 = i3[t4];
34547
34506
  n3[t4] = i3[t4] = function() {
34548
34507
  var t5 = Array.prototype.slice.call(arguments);
34549
34508
  return r4.apply(i3, t5), e4.apply(n3, t5);
34550
34509
  };
34551
- }), mC.addClass(e3, "has-slider"), n3.domElement.insertBefore(i3.domElement, n3.domElement.firstElementChild);
34552
- } else if (n3 instanceof bC) {
34510
+ }), fC.addClass(e3, "has-slider"), n3.domElement.insertBefore(i3.domElement, n3.domElement.firstElementChild);
34511
+ } else if (n3 instanceof xC) {
34553
34512
  var r3 = function(e4) {
34554
- if (ZP.isNumber(n3.__min) && ZP.isNumber(n3.__max)) {
34513
+ if (YP.isNumber(n3.__min) && YP.isNumber(n3.__max)) {
34555
34514
  var i4 = n3.__li.firstElementChild.firstElementChild.innerHTML, r4 = n3.__gui.__listening.indexOf(n3) > -1;
34556
34515
  n3.remove();
34557
- var o3 = VC(t3, n3.object, n3.property, { before: n3.__li.nextElementSibling, factoryArgs: [n3.__min, n3.__max, n3.__step] });
34516
+ var o3 = jC(t3, n3.object, n3.property, { before: n3.__li.nextElementSibling, factoryArgs: [n3.__min, n3.__max, n3.__step] });
34558
34517
  return o3.name(i4), r4 && o3.listen(), o3;
34559
34518
  }
34560
34519
  return e4;
34561
34520
  };
34562
- n3.min = ZP.compose(r3, n3.min), n3.max = ZP.compose(r3, n3.max);
34521
+ n3.min = YP.compose(r3, n3.min), n3.max = YP.compose(r3, n3.max);
34563
34522
  } else
34564
- n3 instanceof gC ? (mC.bind(e3, "click", function() {
34565
- mC.fakeEvent(n3.__checkbox, "click");
34566
- }), mC.bind(n3.__checkbox, "click", function(t4) {
34523
+ n3 instanceof mC ? (fC.bind(e3, "click", function() {
34524
+ fC.fakeEvent(n3.__checkbox, "click");
34525
+ }), fC.bind(n3.__checkbox, "click", function(t4) {
34567
34526
  t4.stopPropagation();
34568
- })) : n3 instanceof SC ? (mC.bind(e3, "click", function() {
34569
- mC.fakeEvent(n3.__button, "click");
34570
- }), mC.bind(e3, "mouseover", function() {
34571
- mC.addClass(n3.__button, "hover");
34572
- }), mC.bind(e3, "mouseout", function() {
34573
- mC.removeClass(n3.__button, "hover");
34574
- })) : n3 instanceof EC && (mC.addClass(e3, "color"), n3.updateDisplay = ZP.compose(function(t4) {
34527
+ })) : n3 instanceof wC ? (fC.bind(e3, "click", function() {
34528
+ fC.fakeEvent(n3.__button, "click");
34529
+ }), fC.bind(e3, "mouseover", function() {
34530
+ fC.addClass(n3.__button, "hover");
34531
+ }), fC.bind(e3, "mouseout", function() {
34532
+ fC.removeClass(n3.__button, "hover");
34533
+ })) : n3 instanceof SC && (fC.addClass(e3, "color"), n3.updateDisplay = YP.compose(function(t4) {
34575
34534
  return e3.style.borderLeftColor = n3.__color.toString(), t4;
34576
34535
  }, n3.updateDisplay), n3.updateDisplay());
34577
- n3.setValue = ZP.compose(function(e4) {
34578
- return t3.getRoot().__preset_select && n3.isModified() && zC(t3.getRoot(), true), e4;
34536
+ n3.setValue = YP.compose(function(e4) {
34537
+ return t3.getRoot().__preset_select && n3.isModified() && HC(t3.getRoot(), true), e4;
34579
34538
  }, n3.setValue);
34580
34539
  }(t2, l2, r2), t2.__controllers.push(r2), r2;
34581
34540
  }
34582
- function WC(t2, e2) {
34541
+ function VC(t2, e2) {
34583
34542
  return document.location.href + "." + e2;
34584
34543
  }
34585
- function XC(t2, e2, n2) {
34544
+ function WC(t2, e2, n2) {
34586
34545
  var i2 = document.createElement("option");
34587
34546
  i2.innerHTML = e2, i2.value = e2, t2.__preset_select.appendChild(i2), n2 && (t2.__preset_select.selectedIndex = t2.__preset_select.length - 1);
34588
34547
  }
34589
- function qC(t2, e2) {
34548
+ function XC(t2, e2) {
34590
34549
  e2.style.display = t2.useLocalStorage ? "block" : "none";
34591
34550
  }
34592
- function YC(t2) {
34551
+ function qC(t2) {
34593
34552
  var e2 = t2.__save_row = document.createElement("li");
34594
- mC.addClass(t2.domElement, "has-save"), t2.__ul.insertBefore(e2, t2.__ul.firstChild), mC.addClass(e2, "save-row");
34553
+ fC.addClass(t2.domElement, "has-save"), t2.__ul.insertBefore(e2, t2.__ul.firstChild), fC.addClass(e2, "save-row");
34595
34554
  var n2 = document.createElement("span");
34596
- n2.innerHTML = "&nbsp;", mC.addClass(n2, "button gears");
34555
+ n2.innerHTML = "&nbsp;", fC.addClass(n2, "button gears");
34597
34556
  var i2 = document.createElement("span");
34598
- i2.innerHTML = "Save", mC.addClass(i2, "button"), mC.addClass(i2, "save");
34557
+ i2.innerHTML = "Save", fC.addClass(i2, "button"), fC.addClass(i2, "save");
34599
34558
  var r2 = document.createElement("span");
34600
- r2.innerHTML = "New", mC.addClass(r2, "button"), mC.addClass(r2, "save-as");
34559
+ r2.innerHTML = "New", fC.addClass(r2, "button"), fC.addClass(r2, "save-as");
34601
34560
  var o2 = document.createElement("span");
34602
- o2.innerHTML = "Revert", mC.addClass(o2, "button"), mC.addClass(o2, "revert");
34561
+ o2.innerHTML = "Revert", fC.addClass(o2, "button"), fC.addClass(o2, "revert");
34603
34562
  var s2 = t2.__preset_select = document.createElement("select");
34604
- if (t2.load && t2.load.remembered ? ZP.each(t2.load.remembered, function(e3, n3) {
34605
- XC(t2, n3, n3 === t2.preset);
34606
- }) : XC(t2, "Default", false), mC.bind(s2, "change", function() {
34563
+ if (t2.load && t2.load.remembered ? YP.each(t2.load.remembered, function(e3, n3) {
34564
+ WC(t2, n3, n3 === t2.preset);
34565
+ }) : WC(t2, "Default", false), fC.bind(s2, "change", function() {
34607
34566
  for (var e3 = 0; e3 < t2.__preset_select.length; e3++)
34608
34567
  t2.__preset_select[e3].innerHTML = t2.__preset_select[e3].value;
34609
34568
  t2.preset = this.value;
34610
- }), e2.appendChild(s2), e2.appendChild(n2), e2.appendChild(i2), e2.appendChild(r2), e2.appendChild(o2), LC) {
34569
+ }), e2.appendChild(s2), e2.appendChild(n2), e2.appendChild(i2), e2.appendChild(r2), e2.appendChild(o2), OC) {
34611
34570
  var a2 = document.getElementById("dg-local-explain"), l2 = document.getElementById("dg-local-storage");
34612
- document.getElementById("dg-save-locally").style.display = "block", localStorage.getItem(WC(0, "isLocal")) === "true" && l2.setAttribute("checked", "checked"), qC(t2, a2), mC.bind(l2, "change", function() {
34613
- t2.useLocalStorage = !t2.useLocalStorage, qC(t2, a2);
34571
+ document.getElementById("dg-save-locally").style.display = "block", localStorage.getItem(VC(0, "isLocal")) === "true" && l2.setAttribute("checked", "checked"), XC(t2, a2), fC.bind(l2, "change", function() {
34572
+ t2.useLocalStorage = !t2.useLocalStorage, XC(t2, a2);
34614
34573
  });
34615
34574
  }
34616
34575
  var u2 = document.getElementById("dg-new-constructor");
34617
- mC.bind(u2, "keydown", function(t3) {
34618
- !t3.metaKey || t3.which !== 67 && t3.keyCode !== 67 || NC.hide();
34619
- }), mC.bind(n2, "click", function() {
34620
- u2.innerHTML = JSON.stringify(t2.getSaveObject(), void 0, 2), NC.show(), u2.focus(), u2.select();
34621
- }), mC.bind(i2, "click", function() {
34576
+ fC.bind(u2, "keydown", function(t3) {
34577
+ !t3.metaKey || t3.which !== 67 && t3.keyCode !== 67 || LC.hide();
34578
+ }), fC.bind(n2, "click", function() {
34579
+ u2.innerHTML = JSON.stringify(t2.getSaveObject(), void 0, 2), LC.show(), u2.focus(), u2.select();
34580
+ }), fC.bind(i2, "click", function() {
34622
34581
  t2.save();
34623
- }), mC.bind(r2, "click", function() {
34582
+ }), fC.bind(r2, "click", function() {
34624
34583
  var e3 = prompt("Enter a new preset name.");
34625
34584
  e3 && t2.saveAs(e3);
34626
- }), mC.bind(o2, "click", function() {
34585
+ }), fC.bind(o2, "click", function() {
34627
34586
  t2.revert();
34628
34587
  });
34629
34588
  }
34630
- function ZC(t2) {
34589
+ function YC(t2) {
34631
34590
  var e2 = void 0;
34632
34591
  function n2(n3) {
34633
34592
  return n3.preventDefault(), t2.width += e2 - n3.clientX, t2.onResize(), e2 = n3.clientX, false;
34634
34593
  }
34635
34594
  function i2() {
34636
- mC.removeClass(t2.__closeButton, kC.CLASS_DRAG), mC.unbind(window, "mousemove", n2), mC.unbind(window, "mouseup", i2);
34595
+ fC.removeClass(t2.__closeButton, UC.CLASS_DRAG), fC.unbind(window, "mousemove", n2), fC.unbind(window, "mouseup", i2);
34637
34596
  }
34638
34597
  function r2(r3) {
34639
- return r3.preventDefault(), e2 = r3.clientX, mC.addClass(t2.__closeButton, kC.CLASS_DRAG), mC.bind(window, "mousemove", n2), mC.bind(window, "mouseup", i2), false;
34598
+ return r3.preventDefault(), e2 = r3.clientX, fC.addClass(t2.__closeButton, UC.CLASS_DRAG), fC.bind(window, "mousemove", n2), fC.bind(window, "mouseup", i2), false;
34640
34599
  }
34641
- t2.__resize_handle = document.createElement("div"), ZP.extend(t2.__resize_handle.style, { width: "6px", marginLeft: "-3px", height: "200px", cursor: "ew-resize", position: "absolute" }), mC.bind(t2.__resize_handle, "mousedown", r2), mC.bind(t2.__closeButton, "mousedown", r2), t2.domElement.insertBefore(t2.__resize_handle, t2.domElement.firstElementChild);
34600
+ t2.__resize_handle = document.createElement("div"), YP.extend(t2.__resize_handle.style, { width: "6px", marginLeft: "-3px", height: "200px", cursor: "ew-resize", position: "absolute" }), fC.bind(t2.__resize_handle, "mousedown", r2), fC.bind(t2.__closeButton, "mousedown", r2), t2.domElement.insertBefore(t2.__resize_handle, t2.domElement.firstElementChild);
34642
34601
  }
34643
- function JC(t2, e2) {
34602
+ function ZC(t2, e2) {
34644
34603
  t2.domElement.style.width = e2 + "px", t2.__save_row && t2.autoPlace && (t2.__save_row.style.width = e2 + "px"), t2.__closeButton && (t2.__closeButton.style.width = e2 + "px");
34645
34604
  }
34646
- function $C(t2, e2) {
34605
+ function JC(t2, e2) {
34647
34606
  var n2 = {};
34648
- return ZP.each(t2.__rememberedObjects, function(i2, r2) {
34607
+ return YP.each(t2.__rememberedObjects, function(i2, r2) {
34649
34608
  var o2 = {}, s2 = t2.__rememberedObjectIndecesToControllers[r2];
34650
- ZP.each(s2, function(t3, n3) {
34609
+ YP.each(s2, function(t3, n3) {
34651
34610
  o2[n3] = e2 ? t3.initialValue : t3.getValue();
34652
34611
  }), n2[r2] = o2;
34653
34612
  }), n2;
34654
34613
  }
34655
- kC.toggleHide = function() {
34656
- BC = !BC, ZP.each(UC, function(t2) {
34657
- t2.domElement.style.display = BC ? "none" : "";
34614
+ UC.toggleHide = function() {
34615
+ FC = !FC, YP.each(BC, function(t2) {
34616
+ t2.domElement.style.display = FC ? "none" : "";
34658
34617
  });
34659
- }, kC.CLASS_AUTO_PLACE = "a", kC.CLASS_AUTO_PLACE_CONTAINER = "ac", kC.CLASS_MAIN = "main", kC.CLASS_CONTROLLER_ROW = "cr", kC.CLASS_TOO_TALL = "taller-than-window", kC.CLASS_CLOSED = "closed", kC.CLASS_CLOSE_BUTTON = "close-button", kC.CLASS_CLOSE_TOP = "close-top", kC.CLASS_CLOSE_BOTTOM = "close-bottom", kC.CLASS_DRAG = "drag", kC.DEFAULT_WIDTH = 245, kC.TEXT_CLOSED = "Close Controls", kC.TEXT_OPEN = "Open Controls", kC._keydownHandler = function(t2) {
34660
- document.activeElement.type === "text" || t2.which !== 72 && t2.keyCode !== 72 || kC.toggleHide();
34661
- }, mC.bind(window, "keydown", kC._keydownHandler, false), ZP.extend(kC.prototype, { add: function(t2, e2) {
34662
- return VC(this, t2, e2, { factoryArgs: Array.prototype.slice.call(arguments, 2) });
34618
+ }, UC.CLASS_AUTO_PLACE = "a", UC.CLASS_AUTO_PLACE_CONTAINER = "ac", UC.CLASS_MAIN = "main", UC.CLASS_CONTROLLER_ROW = "cr", UC.CLASS_TOO_TALL = "taller-than-window", UC.CLASS_CLOSED = "closed", UC.CLASS_CLOSE_BUTTON = "close-button", UC.CLASS_CLOSE_TOP = "close-top", UC.CLASS_CLOSE_BOTTOM = "close-bottom", UC.CLASS_DRAG = "drag", UC.DEFAULT_WIDTH = 245, UC.TEXT_CLOSED = "Close Controls", UC.TEXT_OPEN = "Open Controls", UC._keydownHandler = function(t2) {
34619
+ document.activeElement.type === "text" || t2.which !== 72 && t2.keyCode !== 72 || UC.toggleHide();
34620
+ }, fC.bind(window, "keydown", UC._keydownHandler, false), YP.extend(UC.prototype, { add: function(t2, e2) {
34621
+ return jC(this, t2, e2, { factoryArgs: Array.prototype.slice.call(arguments, 2) });
34663
34622
  }, addColor: function(t2, e2) {
34664
- return VC(this, t2, e2, { color: true });
34623
+ return jC(this, t2, e2, { color: true });
34665
34624
  }, remove: function(t2) {
34666
34625
  this.__ul.removeChild(t2.__li), this.__controllers.splice(this.__controllers.indexOf(t2), 1);
34667
34626
  var e2 = this;
34668
- ZP.defer(function() {
34627
+ YP.defer(function() {
34669
34628
  e2.onResize();
34670
34629
  });
34671
34630
  }, destroy: function() {
34672
34631
  if (this.parent)
34673
34632
  throw new Error("Only the root GUI should be removed with .destroy(). For subfolders, use gui.removeFolder(folder) instead.");
34674
- this.autoPlace && FC.removeChild(this.domElement);
34633
+ this.autoPlace && DC.removeChild(this.domElement);
34675
34634
  var t2 = this;
34676
- ZP.each(this.__folders, function(e2) {
34635
+ YP.each(this.__folders, function(e2) {
34677
34636
  t2.removeFolder(e2);
34678
- }), mC.unbind(window, "keydown", kC._keydownHandler, false), HC(this);
34637
+ }), fC.unbind(window, "keydown", UC._keydownHandler, false), GC(this);
34679
34638
  }, addFolder: function(t2) {
34680
34639
  if (this.__folders[t2] !== void 0)
34681
34640
  throw new Error('You already have a folder in this GUI by the name "' + t2 + '"');
34682
34641
  var e2 = { name: t2, parent: this };
34683
34642
  e2.autoPlace = this.autoPlace, this.load && this.load.folders && this.load.folders[t2] && (e2.closed = this.load.folders[t2].closed, e2.load = this.load.folders[t2]);
34684
- var n2 = new kC(e2);
34643
+ var n2 = new UC(e2);
34685
34644
  this.__folders[t2] = n2;
34686
- var i2 = GC(this, n2.domElement);
34687
- return mC.addClass(i2, "folder"), n2;
34645
+ var i2 = kC(this, n2.domElement);
34646
+ return fC.addClass(i2, "folder"), n2;
34688
34647
  }, removeFolder: function(t2) {
34689
- this.__ul.removeChild(t2.domElement.parentElement), delete this.__folders[t2.name], this.load && this.load.folders && this.load.folders[t2.name] && delete this.load.folders[t2.name], HC(t2);
34648
+ this.__ul.removeChild(t2.domElement.parentElement), delete this.__folders[t2.name], this.load && this.load.folders && this.load.folders[t2.name] && delete this.load.folders[t2.name], GC(t2);
34690
34649
  var e2 = this;
34691
- ZP.each(t2.__folders, function(e3) {
34650
+ YP.each(t2.__folders, function(e3) {
34692
34651
  t2.removeFolder(e3);
34693
- }), ZP.defer(function() {
34652
+ }), YP.defer(function() {
34694
34653
  e2.onResize();
34695
34654
  });
34696
34655
  }, open: function() {
@@ -34704,60 +34663,60 @@ void main(void){
34704
34663
  }, onResize: function() {
34705
34664
  var t2 = this.getRoot();
34706
34665
  if (t2.scrollable) {
34707
- var e2 = mC.getOffset(t2.__ul).top, n2 = 0;
34708
- ZP.each(t2.__ul.childNodes, function(e3) {
34709
- t2.autoPlace && e3 === t2.__save_row || (n2 += mC.getHeight(e3));
34710
- }), window.innerHeight - e2 - 20 < n2 ? (mC.addClass(t2.domElement, kC.CLASS_TOO_TALL), t2.__ul.style.height = window.innerHeight - e2 - 20 + "px") : (mC.removeClass(t2.domElement, kC.CLASS_TOO_TALL), t2.__ul.style.height = "auto");
34666
+ var e2 = fC.getOffset(t2.__ul).top, n2 = 0;
34667
+ YP.each(t2.__ul.childNodes, function(e3) {
34668
+ t2.autoPlace && e3 === t2.__save_row || (n2 += fC.getHeight(e3));
34669
+ }), window.innerHeight - e2 - 20 < n2 ? (fC.addClass(t2.domElement, UC.CLASS_TOO_TALL), t2.__ul.style.height = window.innerHeight - e2 - 20 + "px") : (fC.removeClass(t2.domElement, UC.CLASS_TOO_TALL), t2.__ul.style.height = "auto");
34711
34670
  }
34712
- t2.__resize_handle && ZP.defer(function() {
34671
+ t2.__resize_handle && YP.defer(function() {
34713
34672
  t2.__resize_handle.style.height = t2.__ul.offsetHeight + "px";
34714
34673
  }), t2.__closeButton && (t2.__closeButton.style.width = t2.width + "px");
34715
- }, onResizeDebounced: ZP.debounce(function() {
34674
+ }, onResizeDebounced: YP.debounce(function() {
34716
34675
  this.onResize();
34717
34676
  }, 50), remember: function() {
34718
- if (ZP.isUndefined(NC) && ((NC = new OC()).domElement.innerHTML = PC), this.parent)
34677
+ if (YP.isUndefined(LC) && ((LC = new IC()).domElement.innerHTML = RC), this.parent)
34719
34678
  throw new Error("You can only call remember on a top level GUI.");
34720
34679
  var t2 = this;
34721
- ZP.each(Array.prototype.slice.call(arguments), function(e2) {
34722
- t2.__rememberedObjects.length === 0 && YC(t2), t2.__rememberedObjects.indexOf(e2) === -1 && t2.__rememberedObjects.push(e2);
34723
- }), this.autoPlace && JC(this, this.width);
34680
+ YP.each(Array.prototype.slice.call(arguments), function(e2) {
34681
+ t2.__rememberedObjects.length === 0 && qC(t2), t2.__rememberedObjects.indexOf(e2) === -1 && t2.__rememberedObjects.push(e2);
34682
+ }), this.autoPlace && ZC(this, this.width);
34724
34683
  }, getRoot: function() {
34725
34684
  for (var t2 = this; t2.parent; )
34726
34685
  t2 = t2.parent;
34727
34686
  return t2;
34728
34687
  }, getSaveObject: function() {
34729
34688
  var t2 = this.load;
34730
- return t2.closed = this.closed, this.__rememberedObjects.length > 0 && (t2.preset = this.preset, t2.remembered || (t2.remembered = {}), t2.remembered[this.preset] = $C(this)), t2.folders = {}, ZP.each(this.__folders, function(e2, n2) {
34689
+ return t2.closed = this.closed, this.__rememberedObjects.length > 0 && (t2.preset = this.preset, t2.remembered || (t2.remembered = {}), t2.remembered[this.preset] = JC(this)), t2.folders = {}, YP.each(this.__folders, function(e2, n2) {
34731
34690
  t2.folders[n2] = e2.getSaveObject();
34732
34691
  }), t2;
34733
34692
  }, save: function() {
34734
- this.load.remembered || (this.load.remembered = {}), this.load.remembered[this.preset] = $C(this), zC(this, false), this.saveToLocalStorageIfPossible();
34693
+ this.load.remembered || (this.load.remembered = {}), this.load.remembered[this.preset] = JC(this), HC(this, false), this.saveToLocalStorageIfPossible();
34735
34694
  }, saveAs: function(t2) {
34736
- this.load.remembered || (this.load.remembered = {}, this.load.remembered.Default = $C(this, true)), this.load.remembered[t2] = $C(this), this.preset = t2, XC(this, t2, true), this.saveToLocalStorageIfPossible();
34695
+ this.load.remembered || (this.load.remembered = {}, this.load.remembered.Default = JC(this, true)), this.load.remembered[t2] = JC(this), this.preset = t2, WC(this, t2, true), this.saveToLocalStorageIfPossible();
34737
34696
  }, revert: function(t2) {
34738
- ZP.each(this.__controllers, function(e2) {
34739
- this.getRoot().load.remembered ? jC(t2 || this.getRoot(), e2) : e2.setValue(e2.initialValue), e2.__onFinishChange && e2.__onFinishChange.call(e2, e2.getValue());
34740
- }, this), ZP.each(this.__folders, function(t3) {
34697
+ YP.each(this.__controllers, function(e2) {
34698
+ this.getRoot().load.remembered ? zC(t2 || this.getRoot(), e2) : e2.setValue(e2.initialValue), e2.__onFinishChange && e2.__onFinishChange.call(e2, e2.getValue());
34699
+ }, this), YP.each(this.__folders, function(t3) {
34741
34700
  t3.revert(t3);
34742
- }), t2 || zC(this.getRoot(), false);
34701
+ }), t2 || HC(this.getRoot(), false);
34743
34702
  }, listen: function(t2) {
34744
34703
  var e2 = this.__listening.length === 0;
34745
34704
  this.__listening.push(t2), e2 && function t3(e3) {
34746
- e3.length !== 0 && IC.call(window, function() {
34705
+ e3.length !== 0 && CC.call(window, function() {
34747
34706
  t3(e3);
34748
34707
  });
34749
- ZP.each(e3, function(t4) {
34708
+ YP.each(e3, function(t4) {
34750
34709
  t4.updateDisplay();
34751
34710
  });
34752
34711
  }(this.__listening);
34753
34712
  }, updateDisplay: function() {
34754
- ZP.each(this.__controllers, function(t2) {
34713
+ YP.each(this.__controllers, function(t2) {
34755
34714
  t2.updateDisplay();
34756
- }), ZP.each(this.__folders, function(t2) {
34715
+ }), YP.each(this.__folders, function(t2) {
34757
34716
  t2.updateDisplay();
34758
34717
  });
34759
34718
  } });
34760
- var KC = kC, QC = function() {
34719
+ var $C = UC, KC = function() {
34761
34720
  function t2(t3) {
34762
34721
  this.runTime = { fps: 0, resolution: "" }, this.target = t3.target, this.data = t3.params, this.player = t3.player, this.gui = this.createControllerGUI(), this.createStats(), this.addEventListener();
34763
34722
  }
@@ -34767,7 +34726,7 @@ void main(void){
34767
34726
  t3.player.view && (t3.controller.runTimeFps.setValue(t3.player.fps.value), t3.controller.drawCall.setValue(t3.player.runtime.drawCall), t3.controller.runTimeResolution.setValue(t3.player.view.width + "*" + t3.player.view.height));
34768
34727
  }, 500);
34769
34728
  }, t2.prototype.createControllerGUI = function() {
34770
- var t3, e2, n2, i2, r2, o2 = new KC({ autoPlace: true, closed: true });
34729
+ var t3, e2, n2, i2, r2, o2 = new $C({ autoPlace: true, closed: true });
34771
34730
  o2.domElement.style.opacity = ".6", o2.domElement.style.transformOrigin = "100% 0", o2.domElement.style.transform = "scale(1)", this.target.appendChild(o2.domElement), o2.domElement.style.position = "absolute", o2.domElement.style.right = "0", o2.domElement.style.top = "0", o2.domElement.style.zIndex = "2";
34772
34731
  var s2 = o2.add({ FPS: 0 }, "FPS", 0), a2 = o2.add({ drawCall: 0 }, "drawCall", 0), l2 = o2.add({ "\u5206\u8FA8\u7387": "" }, "\u5206\u8FA8\u7387", ""), u2 = o2.add({ "\u989D\u5916\u8BA1\u7B97": 0 }, "\u989D\u5916\u8BA1\u7B97", 0, 200), h2 = o2.addFolder("renderOptions");
34773
34732
  return this.controller = { runTimeResolution: l2, runTimeFps: s2, drawCall: a2, moreCalculation: u2, minFPS: h2.add({ "\u6700\u4F4Efps": (t3 = this.data.minFPS) !== null && t3 !== void 0 ? t3 : 40 }, "\u6700\u4F4Efps", 0, 60), maxFPS: h2.add({ "\u6700\u9AD8fps": (e2 = this.data.maxFPS) !== null && e2 !== void 0 ? e2 : 50 }, "\u6700\u9AD8fps", 0, 60), resolution: h2.add({ "\u76EE\u6807\u5206\u8FA8\u500D\u7387": (n2 = this.data.resolution) !== null && n2 !== void 0 ? n2 : window.devicePixelRatio }, "\u76EE\u6807\u5206\u8FA8\u500D\u7387", 0.5, 6), autoResolution: h2.add({ "\u81EA\u52A8\u5206\u8FA8\u7387": (i2 = this.data.autoResolution) !== null && i2 !== void 0 && i2 }, "\u81EA\u52A8\u5206\u8FA8\u7387", true), autoFps: h2.add({ "\u81EA\u52A8fps": (r2 = this.data.autoFPS) === null || r2 === void 0 || r2 }, "\u81EA\u52A8fps", true), transactionBgColor: h2.addColor({ "\u5207\u9875\u80CC\u666F\u8272": this.data.transactionBgColor }, "\u5207\u9875\u80CC\u666F\u8272") }, this.controller.runTimeFps.disabled = true, this.controller.runTimeResolution.disabled = true, o2;
@@ -34798,7 +34757,7 @@ void main(void){
34798
34757
  } catch (t3) {
34799
34758
  }
34800
34759
  }, t2;
34801
- }(), tI = function() {
34760
+ }(), QC = function() {
34802
34761
  function t2(t3) {
34803
34762
  var e2 = this;
34804
34763
  this.tasks = [], this.isDestroy = false, this.isScheduling = false, this.schedule = function() {
@@ -34814,7 +34773,7 @@ void main(void){
34814
34773
  }, t2.prototype.addTask = function(t3) {
34815
34774
  this.tasks.push(t3), this.isScheduling || this.schedule();
34816
34775
  }, t2;
34817
- }(), eI = function() {
34776
+ }(), tI = function() {
34818
34777
  function t2(t3) {
34819
34778
  this.autoUnlock = /* @__PURE__ */ Object.create(null), this.locks = /* @__PURE__ */ Object.create(null), this.available = false, this.available = t3;
34820
34779
  }
@@ -34828,7 +34787,7 @@ void main(void){
34828
34787
  }, t2.prototype.isLocked = function(t3) {
34829
34788
  return !!this.available && !!this.locks[t3];
34830
34789
  }, t2;
34831
- }(), nI = function() {
34790
+ }(), eI = function() {
34832
34791
  function t2() {
34833
34792
  var t3 = this;
34834
34793
  this.tasks = [], this.isDestroy = false, this.isScheduling = false, this.schedule = function() {
@@ -34851,7 +34810,120 @@ void main(void){
34851
34810
  }, t2.prototype.destroy = function() {
34852
34811
  this.isDestroy = true;
34853
34812
  }, t2;
34854
- }(), iI = function() {
34813
+ }(), nI = function(t2, e2, n2, i2) {
34814
+ return new (n2 || (n2 = Promise))(function(r2, o2) {
34815
+ function s2(t3) {
34816
+ try {
34817
+ l2(i2.next(t3));
34818
+ } catch (t4) {
34819
+ o2(t4);
34820
+ }
34821
+ }
34822
+ function a2(t3) {
34823
+ try {
34824
+ l2(i2.throw(t3));
34825
+ } catch (t4) {
34826
+ o2(t4);
34827
+ }
34828
+ }
34829
+ function l2(t3) {
34830
+ var e3;
34831
+ t3.done ? r2(t3.value) : (e3 = t3.value, e3 instanceof n2 ? e3 : new n2(function(t4) {
34832
+ t4(e3);
34833
+ })).then(s2, a2);
34834
+ }
34835
+ l2((i2 = i2.apply(t2, e2 || [])).next());
34836
+ });
34837
+ }, iI = function(t2, e2) {
34838
+ var n2, i2, r2, o2, s2 = { label: 0, sent: function() {
34839
+ if (1 & r2[0])
34840
+ throw r2[1];
34841
+ return r2[1];
34842
+ }, trys: [], ops: [] };
34843
+ return o2 = { next: a2(0), throw: a2(1), return: a2(2) }, typeof Symbol == "function" && (o2[Symbol.iterator] = function() {
34844
+ return this;
34845
+ }), o2;
34846
+ function a2(o3) {
34847
+ return function(a3) {
34848
+ return function(o4) {
34849
+ if (n2)
34850
+ throw new TypeError("Generator is already executing.");
34851
+ for (; s2; )
34852
+ try {
34853
+ if (n2 = 1, i2 && (r2 = 2 & o4[0] ? i2.return : o4[0] ? i2.throw || ((r2 = i2.return) && r2.call(i2), 0) : i2.next) && !(r2 = r2.call(i2, o4[1])).done)
34854
+ return r2;
34855
+ switch (i2 = 0, r2 && (o4 = [2 & o4[0], r2.value]), o4[0]) {
34856
+ case 0:
34857
+ case 1:
34858
+ r2 = o4;
34859
+ break;
34860
+ case 4:
34861
+ return s2.label++, { value: o4[1], done: false };
34862
+ case 5:
34863
+ s2.label++, i2 = o4[1], o4 = [0];
34864
+ continue;
34865
+ case 7:
34866
+ o4 = s2.ops.pop(), s2.trys.pop();
34867
+ continue;
34868
+ default:
34869
+ if (!(r2 = s2.trys, (r2 = r2.length > 0 && r2[r2.length - 1]) || o4[0] !== 6 && o4[0] !== 2)) {
34870
+ s2 = 0;
34871
+ continue;
34872
+ }
34873
+ if (o4[0] === 3 && (!r2 || o4[1] > r2[0] && o4[1] < r2[3])) {
34874
+ s2.label = o4[1];
34875
+ break;
34876
+ }
34877
+ if (o4[0] === 6 && s2.label < r2[1]) {
34878
+ s2.label = r2[1], r2 = o4;
34879
+ break;
34880
+ }
34881
+ if (r2 && s2.label < r2[2]) {
34882
+ s2.label = r2[2], s2.ops.push(o4);
34883
+ break;
34884
+ }
34885
+ r2[2] && s2.ops.pop(), s2.trys.pop();
34886
+ continue;
34887
+ }
34888
+ o4 = e2.call(t2, s2);
34889
+ } catch (t3) {
34890
+ o4 = [6, t3], i2 = 0;
34891
+ } finally {
34892
+ n2 = r2 = 0;
34893
+ }
34894
+ if (5 & o4[0])
34895
+ throw o4[1];
34896
+ return { value: o4[0] ? o4[1] : void 0, done: true };
34897
+ }([o3, a3]);
34898
+ };
34899
+ }
34900
+ };
34901
+ function rI(t2, e2, n2) {
34902
+ return nI(this, void 0, void 0, function() {
34903
+ var i2, r2, o2, s2;
34904
+ return iI(this, function(a2) {
34905
+ switch (a2.label) {
34906
+ case 0:
34907
+ return i2 = document.createElement("div"), (r2 = new vI({ anchor: i2, renderOptions: { minFPS: 1, maxFPS: 1, resolution: 1 }, mode: "local", interactive: false })).setResource(t2, e2), [4, r2.getSlideCountAsync()];
34908
+ case 1:
34909
+ if (o2 = a2.sent(), n2)
34910
+ return [3, 6];
34911
+ s2 = 1, a2.label = 2;
34912
+ case 2:
34913
+ return s2 <= o2 ? [4, r2.player.stagePool.preload(s2, true)] : [3, 5];
34914
+ case 3:
34915
+ a2.sent(), a2.label = 4;
34916
+ case 4:
34917
+ return s2++, [3, 2];
34918
+ case 5:
34919
+ return [3, 6];
34920
+ case 6:
34921
+ return r2.destroy(), [2];
34922
+ }
34923
+ });
34924
+ });
34925
+ }
34926
+ var oI = function() {
34855
34927
  var t2 = function(e2, n2) {
34856
34928
  return (t2 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(t3, e3) {
34857
34929
  t3.__proto__ = e3;
@@ -34868,14 +34940,14 @@ void main(void){
34868
34940
  }
34869
34941
  t2(e2, n2), e2.prototype = n2 === null ? Object.create(n2) : (i2.prototype = n2.prototype, new i2());
34870
34942
  };
34871
- }(), rI = function() {
34872
- return (rI = Object.assign || function(t2) {
34943
+ }(), sI = function() {
34944
+ return (sI = Object.assign || function(t2) {
34873
34945
  for (var e2, n2 = 1, i2 = arguments.length; n2 < i2; n2++)
34874
34946
  for (var r2 in e2 = arguments[n2])
34875
34947
  Object.prototype.hasOwnProperty.call(e2, r2) && (t2[r2] = e2[r2]);
34876
34948
  return t2;
34877
34949
  }).apply(this, arguments);
34878
- }, oI = function(t2, e2, n2, i2) {
34950
+ }, aI = function(t2, e2, n2, i2) {
34879
34951
  var r2, o2 = arguments.length, s2 = o2 < 3 ? e2 : i2 === null ? i2 = Object.getOwnPropertyDescriptor(e2, n2) : i2;
34880
34952
  if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
34881
34953
  s2 = Reflect.decorate(t2, e2, n2, i2);
@@ -34883,7 +34955,7 @@ void main(void){
34883
34955
  for (var a2 = t2.length - 1; a2 >= 0; a2--)
34884
34956
  (r2 = t2[a2]) && (s2 = (o2 < 3 ? r2(s2) : o2 > 3 ? r2(e2, n2, s2) : r2(e2, n2)) || s2);
34885
34957
  return o2 > 3 && s2 && Object.defineProperty(e2, n2, s2), s2;
34886
- }, sI = function(t2, e2, n2, i2) {
34958
+ }, lI = function(t2, e2, n2, i2) {
34887
34959
  return new (n2 || (n2 = Promise))(function(r2, o2) {
34888
34960
  function s2(t3) {
34889
34961
  try {
@@ -34907,7 +34979,7 @@ void main(void){
34907
34979
  }
34908
34980
  l2((i2 = i2.apply(t2, e2 || [])).next());
34909
34981
  });
34910
- }, aI = function(t2, e2) {
34982
+ }, uI = function(t2, e2) {
34911
34983
  var n2, i2, r2, o2, s2 = { label: 0, sent: function() {
34912
34984
  if (1 & r2[0])
34913
34985
  throw r2[1];
@@ -34970,20 +35042,20 @@ void main(void){
34970
35042
  }([o3, a3]);
34971
35043
  };
34972
35044
  }
34973
- }, lI = window.ResizeObserver || HP, uI = function(t2) {
35045
+ }, hI = window.ResizeObserver || GP, cI = function(t2) {
34974
35046
  return new Promise(function(e2) {
34975
35047
  return setTimeout(e2, t2);
34976
35048
  });
34977
35049
  };
34978
- function hI(t2, e2) {
34979
- return sI(this, void 0, void 0, function() {
35050
+ function dI(t2, e2) {
35051
+ return lI(this, void 0, void 0, function() {
34980
35052
  var n2;
34981
- return aI(this, function(i2) {
35053
+ return uI(this, function(i2) {
34982
35054
  switch (i2.label) {
34983
35055
  case 0:
34984
35056
  n2 = Date.now(), i2.label = 1;
34985
35057
  case 1:
34986
- return !t2() && Date.now() - n2 < e2 ? [4, uI(50)] : [3, 3];
35058
+ return !t2() && Date.now() - n2 < e2 ? [4, cI(50)] : [3, 3];
34987
35059
  case 2:
34988
35060
  return i2.sent(), [3, 1];
34989
35061
  case 3:
@@ -34992,25 +35064,25 @@ void main(void){
34992
35064
  });
34993
35065
  });
34994
35066
  }
34995
- var cI = { syncDispatch: "syncDispatch", syncReceive: "syncReceive", syncEventLag: "syncEventLag", renderStart: "renderStart", renderEnd: "renderEnd", renderError: "renderError", slideChange: "slideChange", mainSeqStepStart: "mainSeqStepStart", mainSeqStepEnd: "mainSeqStepEnd", animateStart: "animateStart", animateEnd: "animateEnd", stateChange: "stateChange" }, dI = { taskId: "", url: "", currentSlideIndex: -1, mainSeqStep: -1, mainSeqState: null, mediaState: /* @__PURE__ */ Object.create(null), interactiveSeqState: /* @__PURE__ */ Object.create(null) }, pI = "";
35067
+ var pI = { syncDispatch: "syncDispatch", syncReceive: "syncReceive", syncEventLag: "syncEventLag", renderStart: "renderStart", renderEnd: "renderEnd", renderError: "renderError", slideChange: "slideChange", mainSeqStepStart: "mainSeqStepStart", mainSeqStepEnd: "mainSeqStepEnd", animateStart: "animateStart", animateEnd: "animateEnd", stateChange: "stateChange" }, fI = { taskId: "", url: "", currentSlideIndex: -1, mainSeqStep: -1, mainSeqState: null, mediaState: /* @__PURE__ */ Object.create(null), interactiveSeqState: /* @__PURE__ */ Object.create(null) }, mI = "";
34996
35068
  try {
34997
- pI = "0.5.16-alpha.3";
35069
+ mI = "0.6.3";
34998
35070
  } catch (t2) {
34999
- pI = "development";
35071
+ mI = "development";
35000
35072
  }
35001
- var fI = null;
35073
+ var gI = null;
35002
35074
  try {
35003
- fI = o.createInstance({ name: "__slide_local_log__", driver: o.INDEXEDDB, version: 1 });
35075
+ gI = o.createInstance({ name: "__slide_local_log__", driver: o.INDEXEDDB, version: 1 });
35004
35076
  } catch (t2) {
35005
35077
  }
35006
- var mI = function(t2) {
35078
+ var vI = function(t2) {
35007
35079
  function e2(n3) {
35008
35080
  var i2 = t2.call(this) || this;
35009
- return i2.iosResetCache = [], i2.needClearCacheImage = false, i2.version = pI, i2.__slideState = Object(l.cloneDeep)(dI), i2.userInputTime = 0, i2.isSyncingSlideState = false, i2.frozenTaskManager = new nI(), i2.randomId = Math.random().toString(32).substr(2), i2.resize = false, i2.isAnimating = false, i2.renderingTaskManager = new WP(), i2.isLoading = false, i2.interactive = true, i2.renderingIndex = 0, i2.frameWidth = 1, i2.frameHeight = 1, i2.frame = document.createElement("div"), i2.medianController = document.createElement("div"), i2.frameResizeObserver = new lI(function() {
35081
+ return i2.iosResetCache = [], i2.needClearCacheImage = false, i2.version = mI, i2.__slideState = Object(l.cloneDeep)(fI), i2.userInputTime = 0, i2.isSyncingSlideState = false, i2.frozenTaskManager = new eI(), i2.randomId = Math.random().toString(32).substr(2), i2.resize = false, i2.isAnimating = false, i2.renderingTaskManager = new VP(), i2.isLoading = false, i2.interactive = true, i2.renderingIndex = 0, i2.frameWidth = 1, i2.frameHeight = 1, i2.frame = document.createElement("div"), i2.medianController = document.createElement("div"), i2.frameResizeObserver = new hI(function() {
35010
35082
  return i2.frameResizeHandler();
35011
35083
  }), i2.timestamp = function() {
35012
35084
  return Date.now();
35013
- }, i2.mode = "local", i2.enableGlobalClick = false, i2.lastEmitedState = null, i2.playerController = null, i2.isInitResized = false, i2.cacheImage = document.createElement("img"), i2.isTouchStart = false, i2.touchStartId = void 0, i2.taskId = "", i2.designWidth = 0, i2.designHeight = 0, i2._slideCount = 0, i2._dispatchIncrId = 0, i2._receiveIncrId = 0, i2.userInputHandle = function() {
35085
+ }, i2.mode = "local", i2.enableGlobalClick = false, i2.lastEmitedState = null, i2.playerController = null, i2.isInitResized = false, i2.cacheImage = document.createElement("img"), i2.isTouchStart = false, i2.touchStartId = void 0, i2.taskId = "", i2.volumeAdjuster = new YR(), i2.designWidth = 0, i2.designHeight = 0, i2._slideCount = 0, i2._dispatchIncrId = 0, i2._receiveIncrId = 0, i2.userInputHandle = function() {
35014
35086
  i2.userInputTime = Date.now();
35015
35087
  }, i2.handleViewClick = function() {
35016
35088
  setTimeout(function() {
@@ -35026,12 +35098,12 @@ void main(void){
35026
35098
  }, i2.handleSlideRef = function() {
35027
35099
  console.log(i2), window.__slide = i2;
35028
35100
  }, i2.receiveSyncHandler = function(t3) {
35029
- return sI(i2, void 0, void 0, function() {
35101
+ return lI(i2, void 0, void 0, function() {
35030
35102
  var e3, n4, i3, r2, o2 = this;
35031
- return aI(this, function(s2) {
35103
+ return uI(this, function(s2) {
35032
35104
  switch (s2.label) {
35033
35105
  case 0:
35034
- return Object(l.isNumber)(t3.incrId) && (t3.incrId && t3.incrId - this._receiveIncrId != 1 && this.emit(cI.syncEventLag), this._receiveIncrId = t3.incrId || 0), this.logger.info("sync receive " + JSON.stringify(t3), this.taskId), t3.type !== "nextStep" ? [3, 1] : (this.mainSeqStep !== t3.next - 1 && this.mainSeqStep + 1 !== this.mainSeqLength && this.player ? (this.setMainSeqStep(t3.next, "start"), this.player.nextTick(function() {
35106
+ return Object(l.isNumber)(t3.incrId) && (t3.incrId && t3.incrId - this._receiveIncrId != 1 && this.emit(pI.syncEventLag), this._receiveIncrId = t3.incrId || 0), this.logger.info("sync receive " + JSON.stringify(t3), this.taskId), t3.type !== "nextStep" ? [3, 1] : (this.mainSeqStep !== t3.next - 1 && this.mainSeqStep + 1 !== this.mainSeqLength && this.player ? (this.setMainSeqStep(t3.next, "start"), this.player.nextTick(function() {
35035
35107
  o2.doNextStep(true);
35036
35108
  })) : this.doNextStep(true), [3, 6]);
35037
35109
  case 1:
@@ -35052,9 +35124,9 @@ void main(void){
35052
35124
  });
35053
35125
  });
35054
35126
  }, i2.handlePrevSlide = function(t3) {
35055
- return t3 === void 0 && (t3 = false), sI(i2, void 0, void 0, function() {
35127
+ return t3 === void 0 && (t3 = false), lI(i2, void 0, void 0, function() {
35056
35128
  var e3, n4;
35057
- return aI(this, function(i3) {
35129
+ return uI(this, function(i3) {
35058
35130
  switch (i3.label) {
35059
35131
  case 0:
35060
35132
  return this.player ? [4, (n4 = this.player) === null || n4 === void 0 ? void 0 : n4.createSnapshotForNextSlide(true)] : [2];
@@ -35064,9 +35136,9 @@ void main(void){
35064
35136
  });
35065
35137
  });
35066
35138
  }, i2.handleNextSlide = function(t3) {
35067
- return t3 === void 0 && (t3 = false), sI(i2, void 0, void 0, function() {
35139
+ return t3 === void 0 && (t3 = false), lI(i2, void 0, void 0, function() {
35068
35140
  var e3, n4;
35069
- return aI(this, function(i3) {
35141
+ return uI(this, function(i3) {
35070
35142
  switch (i3.label) {
35071
35143
  case 0:
35072
35144
  return this.player ? [4, (n4 = this.player) === null || n4 === void 0 ? void 0 : n4.createSnapshotForNextSlide(false)] : [2];
@@ -35090,23 +35162,23 @@ void main(void){
35090
35162
  }, error: function(t3, n4) {
35091
35163
  var r2, o2;
35092
35164
  ((r2 = i2.config.logger) === null || r2 === void 0 ? void 0 : r2.error) && (e2._tempLog += "ERROR - " + new Date().toISOString() + " - {" + i2.randomId + "}[" + n4 + "] " + t3 + "\n\n", (o2 = i2.config.logger) === null || o2 === void 0 || o2.error("[" + n4 + "] " + t3));
35093
- } }, i2.anchor = i2.config.anchor, i2.syncQueue = new tI(i2.receiveSyncHandler), i2.lock = new eI(i2.mode === "interactive"), i2.cacheImage.style.position = "absolute", i2.cacheImage.style.zIndex = "100", i2.setMedianControllerAttribute(), i2.frame.appendChild(i2.medianController), i2.frameResizeObserver.observe(i2.frame), i2.on(cI.syncReceive, function(t3) {
35165
+ } }, i2.anchor = i2.config.anchor, i2.syncQueue = new QC(i2.receiveSyncHandler), i2.lock = new tI(i2.mode === "interactive"), i2.cacheImage.style.position = "absolute", i2.cacheImage.style.zIndex = "100", i2.setMedianControllerAttribute(), i2.frame.appendChild(i2.medianController), i2.frameResizeObserver.observe(i2.frame), i2.on(pI.syncReceive, function(t3) {
35094
35166
  i2.lock.unlock(t3.type, t3.uuid), i2.syncQueue.addTask(t3);
35095
35167
  }), i2.renderingTaskManager.eventHub.on("task-error", function(t3) {
35096
35168
  var e3 = t3.error, n4 = t3.task, r2 = qE.transform(e3);
35097
- r2.errorType === VE.RuntimeWarn ? i2.logger.warn(r2.message, i2.taskId) : i2.logger.error(r2.message, i2.taskId), i2.isLoading = false, i2.emit(cI.renderError, { error: r2, index: n4.slideIndex });
35169
+ r2.errorType === VE.RuntimeWarn ? i2.logger.warn(r2.message, i2.taskId) : i2.logger.error(r2.message, i2.taskId), i2.isLoading = false, i2.emit(pI.renderError, { error: r2, index: n4.slideIndex });
35098
35170
  }), window.addEventListener("__slide_ref__", i2.handleSlideRef), i2.resizeView = Object(l.debounce)(i2.resizeView.bind(i2), 50), i2.player = i2.initPlayer(i2.config), i2.config.controller && i2.createController(), i2.player.view && i2.frame.appendChild(i2.player.view), i2.handleViewClick = Object(l.debounce)(i2.handleViewClick, 300), i2.player.errorChannel.on("error", function(t3, e3) {
35099
35171
  var n4 = qE.transform(t3);
35100
- n4.errorType === VE.RuntimeWarn ? i2.logger.warn(n4.message, i2.taskId) : i2.logger.error(n4.message, i2.taskId), i2.isLoading = false, e3 === i2.renderingIndex && i2.emit(cI.renderError, { error: t3, index: e3 });
35172
+ n4.errorType === VE.RuntimeWarn ? i2.logger.warn(n4.message, i2.taskId) : i2.logger.error(n4.message, i2.taskId), i2.isLoading = false, e3 === i2.renderingIndex && i2.emit(pI.renderError, { error: t3, index: e3 });
35101
35173
  }), i2;
35102
35174
  }
35103
35175
  var n2;
35104
- return iI(e2, t2), e2.flushLog = function() {
35105
- return sI(this, void 0, void 0, function() {
35106
- return aI(this, function(t3) {
35176
+ return oI(e2, t2), e2.flushLog = function() {
35177
+ return lI(this, void 0, void 0, function() {
35178
+ return uI(this, function(t3) {
35107
35179
  switch (t3.label) {
35108
35180
  case 0:
35109
- return e2._tempLog.length > 0 ? [4, fI == null ? void 0 : fI.setItem("run_time_log_" + e2._tempLogIndex, e2._tempLog)] : [3, 2];
35181
+ return e2._tempLog.length > 0 ? [4, gI == null ? void 0 : gI.setItem("run_time_log_" + e2._tempLogIndex, e2._tempLog)] : [3, 2];
35110
35182
  case 1:
35111
35183
  t3.sent(), e2._tempLog = "", e2._tempLogIndex += 1, t3.label = 2;
35112
35184
  case 2:
@@ -35117,51 +35189,51 @@ void main(void){
35117
35189
  }, Object.defineProperty(e2.prototype, "dispatchIncrId", { get: function() {
35118
35190
  return this._dispatchIncrId++;
35119
35191
  }, enumerable: false, configurable: true }), e2.prototype.initSlideConfig = function(t3) {
35120
- return t3.timestamp && (this.timestamp = t3.timestamp), t3.rtcAudio && (QR.RtcAudioClazz = t3.rtcAudio), this.mode = t3.mode, this.anchor = t3.anchor, this.anchor.appendChild(this.frame), this.enableGlobalClick = !Object(l.isUndefined)(t3.enableGlobalClick) && t3.enableGlobalClick, this.resize = t3.resize || false, this.interactive = t3.interactive, this.frame.style.cssText = t3.fixedFrameSize ? "width:" + t3.fixedFrameSize.width + "px;height:" + t3.fixedFrameSize.height + "px;" : "width:100%;height:100%", this.frame.style.cssText += "display:flex;justify-content:center;align-items:center;visibility:hidden;position:relative;z-index:1;", t3.fixedFrameSize && (this.frameWidth = t3.fixedFrameSize.width, this.frameHeight = t3.fixedFrameSize.height), t3;
35192
+ return t3.timestamp && (this.timestamp = t3.timestamp), t3.rtcAudio && (KR.RtcAudioClazz = t3.rtcAudio), this.mode = t3.mode, this.anchor = t3.anchor, this.anchor.appendChild(this.frame), this.enableGlobalClick = !Object(l.isUndefined)(t3.enableGlobalClick) && t3.enableGlobalClick, this.resize = t3.resize || false, this.interactive = t3.interactive, this.frame.style.cssText = t3.fixedFrameSize ? "width:" + t3.fixedFrameSize.width + "px;height:" + t3.fixedFrameSize.height + "px;" : "width:100%;height:100%", this.frame.style.cssText += "display:flex;justify-content:center;align-items:center;visibility:hidden;position:relative;z-index:1;", t3.fixedFrameSize && (this.frameWidth = t3.fixedFrameSize.width, this.frameHeight = t3.fixedFrameSize.height), t3;
35121
35193
  }, e2.prototype.initPlayer = function(t3) {
35122
- var e3, n3, i2, r2 = this, o2 = new QR({ mode: this.mode, useLocalCache: !!Object(l.isUndefined)(this.config.useLocalCache) || this.config.useLocalCache, logger: this.logger, resourceTimeout: Object(l.isUndefined)(this.config.resourceTimeout) ? 15e3 : this.config.resourceTimeout, loadDelegate: this.config.loaderDelegate });
35123
- return o2.setInteractive(this.interactive), o2.updateConfig(t3.renderOptions || {}), o2.on(KR.renderStart, function(t4) {
35124
- r2.isLoading = true, r2.emit(cI.renderStart, t4);
35125
- }), o2.on(KR.renderEnd, function(t4) {
35126
- r2.isLoading = false, r2.player && (r2.designHeight = r2.player.designHeight, r2.designWidth = r2.player.designWidth, r2.cacheImage.style.width = r2.player.designWidth + "px", r2.cacheImage.style.height = r2.player.designHeight + "px", r2._slideCount = r2.player.slideCount), r2.emit(cI.renderEnd, t4);
35127
- }), o2.on(KR.slideChange, function(t4) {
35128
- r2.__slideState.currentSlideIndex = t4, r2.emitStateChange(), r2.emit(cI.slideChange, t4);
35129
- }), o2.on(KR.mainSeqStateChange, function(t4) {
35194
+ var e3, n3, i2, r2 = this, o2 = new KR({ mode: this.mode, useLocalCache: !!Object(l.isUndefined)(this.config.useLocalCache) || this.config.useLocalCache, logger: this.logger, resourceTimeout: Object(l.isUndefined)(this.config.resourceTimeout) ? 15e3 : this.config.resourceTimeout, loadDelegate: this.config.loaderDelegate, volumeAdjuster: this.volumeAdjuster });
35195
+ return o2.setInteractive(this.interactive), o2.updateConfig(t3.renderOptions || {}), o2.on($R.renderStart, function(t4) {
35196
+ r2.isLoading = true, r2.emit(pI.renderStart, t4);
35197
+ }), o2.on($R.renderEnd, function(t4) {
35198
+ r2.isLoading = false, r2.player && (r2.designHeight = r2.player.designHeight, r2.designWidth = r2.player.designWidth, r2.cacheImage.style.width = r2.player.designWidth + "px", r2.cacheImage.style.height = r2.player.designHeight + "px", r2._slideCount = r2.player.slideCount), r2.emit(pI.renderEnd, t4);
35199
+ }), o2.on($R.slideChange, function(t4) {
35200
+ r2.__slideState.currentSlideIndex = t4, r2.emitStateChange(), r2.emit(pI.slideChange, t4);
35201
+ }), o2.on($R.mainSeqStateChange, function(t4) {
35130
35202
  r2.__slideState.mainSeqState = t4, r2.emitStateChange();
35131
- }), o2.on(KR.mainSeqStepChange, function(t4) {
35203
+ }), o2.on($R.mainSeqStepChange, function(t4) {
35132
35204
  r2.__slideState.mainSeqStep = t4, r2.emitStateChange();
35133
- }), o2.on(KR.interactiveSeqStateChange, function(t4) {
35205
+ }), o2.on($R.interactiveSeqStateChange, function(t4) {
35134
35206
  var e4 = t4.id, n4 = t4.state;
35135
35207
  r2.__slideState.interactiveSeqState[e4] = n4, r2.emitStateChange();
35136
- }), o2.on(KR.animateStart, function() {
35137
- r2.isAnimating !== true && (r2.isAnimating = true, r2.emit(cI.animateStart));
35138
- }), o2.on(KR.animateEnd, function() {
35139
- r2.isAnimating !== false && (r2.isAnimating = false, r2.emit(cI.animateEnd));
35140
- }), o2.on(KR.interactiveSeqAction, function(t4) {
35208
+ }), o2.on($R.animateStart, function() {
35209
+ r2.isAnimating !== true && (r2.isAnimating = true, r2.emit(pI.animateStart));
35210
+ }), o2.on($R.animateEnd, function() {
35211
+ r2.isAnimating !== false && (r2.isAnimating = false, r2.emit(pI.animateEnd));
35212
+ }), o2.on($R.interactiveSeqAction, function(t4) {
35141
35213
  var e4 = t4.action, n4 = t4.seqId;
35142
35214
  r2.emitSyncDispatch({ slideIndex: r2.__slideState.currentSlideIndex, type: "interactiveAnim", action: e4, seqId: n4 }), r2.emitStateChange();
35143
- }), o2.on(KR.mainSeqStepStart, function(t4) {
35144
- r2.emit(cI.mainSeqStepStart, t4);
35145
- }), o2.on(KR.mainSeqStepEnd, function(t4) {
35146
- r2.emit(cI.mainSeqStepEnd, t4);
35147
- }), o2.on(KR.mediaPlay, function(t4) {
35215
+ }), o2.on($R.mainSeqStepStart, function(t4) {
35216
+ r2.emit(pI.mainSeqStepStart, t4);
35217
+ }), o2.on($R.mainSeqStepEnd, function(t4) {
35218
+ r2.emit(pI.mainSeqStepEnd, t4);
35219
+ }), o2.on($R.mediaPlay, function(t4) {
35148
35220
  var e4 = { type: "play", time: r2.timestamp() - 1e3 * t4.time };
35149
35221
  r2.__slideState.mediaState[t4.id] = e4, r2.emitSyncDispatch({ slideIndex: r2.__slideState.currentSlideIndex, type: "mediaPlay", id: t4.id, state: e4 }), r2.emitStateChange();
35150
- }), o2.on(KR.mediaPause, function(t4) {
35222
+ }), o2.on($R.mediaPause, function(t4) {
35151
35223
  var e4 = { type: "pause", time: t4.time };
35152
35224
  r2.__slideState.mediaState[t4.id] = e4, r2.emitSyncDispatch({ slideIndex: r2.__slideState.currentSlideIndex, type: "mediaPause", id: t4.id, state: e4 }), r2.emitStateChange();
35153
- }), o2.on(KR.mediaSeek, function(t4) {
35225
+ }), o2.on($R.mediaSeek, function(t4) {
35154
35226
  var e4 = { type: "pause", time: 0 };
35155
35227
  t4.isPlaying ? (e4.type = "play", r2.__slideState.mediaState[t4.id] ? e4.time = r2.__slideState.mediaState[t4.id].time - 1e3 * t4.time : e4.time = r2.timestamp() - 1e3 * t4.time, r2.__slideState.mediaState[t4.id] = e4) : (e4.type = "pause", e4.time = t4.time, r2.__slideState.mediaState[t4.id] = e4), r2.emitSyncDispatch({ slideIndex: r2.__slideState.currentSlideIndex, type: "mediaSeek", id: t4.id, time: t4.time, state: e4 }), r2.emitStateChange();
35156
- }), o2.on(KR.requestPrevSlide, function(t4) {
35228
+ }), o2.on($R.requestPrevSlide, function(t4) {
35157
35229
  r2.handlePrevSlide(t4);
35158
- }), o2.on(KR.requestNextSlide, function(t4) {
35230
+ }), o2.on($R.requestNextSlide, function(t4) {
35159
35231
  r2.handleNextSlide(t4);
35160
- }), o2.on(KR.requestGotoSlide, function(t4) {
35232
+ }), o2.on($R.requestGotoSlide, function(t4) {
35161
35233
  r2.config.navigatorDelegate ? r2.config.navigatorDelegate.gotoPage(t4) : r2.handleGotoSlide(t4);
35162
- }), (e3 = o2.view) === null || e3 === void 0 || e3.addEventListener("touchend", this.handleViewTouchEnd), (n3 = o2.view) === null || n3 === void 0 || n3.addEventListener("touchstart", this.handleViewTouchStart), (i2 = o2.view) === null || i2 === void 0 || i2.addEventListener("click", this.handleViewClick), o2.on(KR.userInput, this.userInputHandle), o2;
35234
+ }), (e3 = o2.view) === null || e3 === void 0 || e3.addEventListener("touchend", this.handleViewTouchEnd), (n3 = o2.view) === null || n3 === void 0 || n3.addEventListener("touchstart", this.handleViewTouchStart), (i2 = o2.view) === null || i2 === void 0 || i2.addEventListener("click", this.handleViewClick), o2.on($R.userInput, this.userInputHandle), o2;
35163
35235
  }, e2.prototype.createController = function() {
35164
- this.player && (this.playerController = new QC({ player: this.player, params: this.player.config || {}, target: this.frame }));
35236
+ this.player && (this.playerController = new KC({ player: this.player, params: this.player.config || {}, target: this.frame }));
35165
35237
  }, e2.prototype.setMedianControllerAttribute = function() {
35166
35238
  this.medianController.className = "median-container", this.medianController.style.position = "absolute", this.medianController.style.left = "0", this.medianController.style.top = "0", this.medianController.style.zIndex = "2";
35167
35239
  }, e2.prototype.frameResizeHandler = function() {
@@ -35181,9 +35253,9 @@ void main(void){
35181
35253
  }
35182
35254
  }, e2.prototype.setSlideState = function(t3) {
35183
35255
  var e3, n3, i2;
35184
- return sI(this, void 0, void 0, function() {
35256
+ return lI(this, void 0, void 0, function() {
35185
35257
  var r2, o2 = this;
35186
- return aI(this, function(s2) {
35258
+ return uI(this, function(s2) {
35187
35259
  switch (s2.label) {
35188
35260
  case 0:
35189
35261
  return this.isSyncingSlideState = true, this.logger.info("stateChange receive " + JSON.stringify(t3), this.taskId), t3.taskId && t3.taskId !== this.__slideState.taskId && (this.__slideState.taskId = t3.taskId, (e3 = this.player) === null || e3 === void 0 || e3.setResourceData(t3.taskId, this.__slideState.url)), t3.url && t3.url !== this.__slideState.url && (this.__slideState.url = t3.url, (n3 = this.player) === null || n3 === void 0 || n3.setResourceData(this.__slideState.taskId, t3.url)), Number.isInteger(t3.currentSlideIndex) && t3.currentSlideIndex !== this.__slideState.currentSlideIndex ? (this.__slideState.currentSlideIndex = t3.currentSlideIndex, [4, this.doRenderSlide(t3.currentSlideIndex)]) : [3, 2];
@@ -35223,9 +35295,9 @@ void main(void){
35223
35295
  }, Object.defineProperty(e2.prototype, "slideCount", { get: function() {
35224
35296
  return this._slideCount;
35225
35297
  }, enumerable: false, configurable: true }), e2.prototype.getSizeAsync = function() {
35226
- return sI(this, void 0, void 0, function() {
35298
+ return lI(this, void 0, void 0, function() {
35227
35299
  var t3;
35228
- return aI(this, function(e3) {
35300
+ return uI(this, function(e3) {
35229
35301
  switch (e3.label) {
35230
35302
  case 0:
35231
35303
  if (this.width > 0 && this.height > 0)
@@ -35245,8 +35317,8 @@ void main(void){
35245
35317
  });
35246
35318
  });
35247
35319
  }, e2.prototype.getSlideCountAsync = function() {
35248
- return sI(this, void 0, void 0, function() {
35249
- return aI(this, function(t3) {
35320
+ return lI(this, void 0, void 0, function() {
35321
+ return uI(this, function(t3) {
35250
35322
  switch (t3.label) {
35251
35323
  case 0:
35252
35324
  if (this._slideCount > 0)
@@ -35302,12 +35374,12 @@ void main(void){
35302
35374
  this.taskId = t3, (n3 = this.player) === null || n3 === void 0 || n3.setResourceData(t3, e3), this.__slideState.taskId = t3, this.__slideState.url = e3, this.emitSyncDispatch({ slideIndex: this.__slideState.currentSlideIndex, type: "setResource", taskId: t3, url: e3 });
35303
35375
  }, e2.prototype._renderSlide = function(t3) {
35304
35376
  var e3;
35305
- return sI(this, void 0, void 0, function() {
35377
+ return lI(this, void 0, void 0, function() {
35306
35378
  var n3 = this;
35307
- return aI(this, function(i2) {
35379
+ return uI(this, function(i2) {
35308
35380
  switch (i2.label) {
35309
35381
  case 0:
35310
- return this.renderingIndex = t3, this.player && t3 === this.player.currentIndex ? [2] : ((QR.platform.isIOS() || QR.platform.isAndroid()) && this.iosResetCache.indexOf(t3) < 0 && this.iosResetCache.push(t3), [4, (e3 = this.player) === null || e3 === void 0 ? void 0 : e3.renderSlide(t3)]);
35382
+ return this.renderingIndex = t3, this.player && t3 === this.player.currentIndex ? [2] : ((KR.platform.isIOS() || KR.platform.isAndroid()) && this.iosResetCache.indexOf(t3) < 0 && this.iosResetCache.push(t3), [4, (e3 = this.player) === null || e3 === void 0 ? void 0 : e3.renderSlide(t3)]);
35311
35383
  case 1:
35312
35384
  return i2.sent(), this.__slideState.currentSlideIndex = t3, this.resizeView(), this.__slideState.interactiveSeqState = {}, this.emitStateChange(), setTimeout(function() {
35313
35385
  var t4, e4;
@@ -35326,8 +35398,8 @@ void main(void){
35326
35398
  (n3 !== this.player.currentIndex || this.renderingTaskManager.hasStartTask()) && (n3 > this.slideCount && this.slideCount > 0 || this.poseRenderSlide(n3, e3));
35327
35399
  }
35328
35400
  }, e2.prototype.needCreateNewPlayer = function() {
35329
- var t3 = QR.platform.isLowGpuMemory() ? 15 : 30;
35330
- return (QR.platform.isIOS() || QR.platform.isAndroid()) && this.iosResetCache.length > t3;
35401
+ var t3 = KR.platform.isLowGpuMemory() ? 15 : 30;
35402
+ return (KR.platform.isIOS() || KR.platform.isAndroid()) && this.iosResetCache.length > t3;
35331
35403
  }, e2.prototype.poseRenderSlide = function(t3, e3) {
35332
35404
  this.mode === "interactive" ? this.emitSyncDispatch({ slideIndex: this.__slideState.currentSlideIndex, type: "renderSlide", index: t3, isForward: e3 }) : this.mode === "sync" ? (this.doRenderSlide(t3, e3), this.emitSyncDispatch({ slideIndex: this.__slideState.currentSlideIndex, type: "renderSlide", index: t3, isForward: e3 })) : this.doRenderSlide(t3, e3);
35333
35405
  }, e2.prototype.doRenderSlide = function(t3, e3) {
@@ -35365,14 +35437,14 @@ void main(void){
35365
35437
  }, e2.prototype.emitStateChange = function() {
35366
35438
  if (this.mode !== "local" && !this.isSyncingSlideState) {
35367
35439
  var t3 = this.slideState;
35368
- !Object(l.isEqual)(this.lastEmitedState, t3) && this.isSlideStateReady(t3) && (this.lastEmitedState = t3, this.emit(cI.stateChange, t3), this.logger.info("stateChange dispatch " + JSON.stringify(this.slideState), this.taskId));
35440
+ !Object(l.isEqual)(this.lastEmitedState, t3) && this.isSlideStateReady(t3) && (this.lastEmitedState = t3, this.emit(pI.stateChange, t3), this.logger.info("stateChange dispatch " + JSON.stringify(this.slideState), this.taskId));
35369
35441
  }
35370
35442
  }, e2.prototype.emitSyncDispatch = function(t3) {
35371
35443
  if (!this.lock.isLocked(t3.type)) {
35372
35444
  var e3 = Math.random().toString(32).substr(2);
35373
35445
  this.lock.addLock(t3.type, e3);
35374
- var n3 = rI(rI({}, t3), { uuid: e3 });
35375
- this.config.mode === "sync" && (n3.incrId = this.dispatchIncrId), this.emit(cI.syncDispatch, n3), this.logger.info("sync dispatch " + JSON.stringify(n3), this.taskId);
35446
+ var n3 = sI(sI({}, t3), { uuid: e3 });
35447
+ this.config.mode === "sync" && (n3.incrId = this.dispatchIncrId), this.emit(pI.syncDispatch, n3), this.logger.info("sync dispatch " + JSON.stringify(n3), this.taskId);
35376
35448
  }
35377
35449
  }, e2.prototype.setMainSeqStep = function(t3, e3) {
35378
35450
  var n3;
@@ -35388,9 +35460,9 @@ void main(void){
35388
35460
  (t3 = this.player) === null || t3 === void 0 || t3.resume();
35389
35461
  }, e2.prototype._doFrozen = function() {
35390
35462
  var t3;
35391
- return sI(this, void 0, void 0, function() {
35463
+ return lI(this, void 0, void 0, function() {
35392
35464
  var e3, n3, i2, r2 = this;
35393
- return aI(this, function(o2) {
35465
+ return uI(this, function(o2) {
35394
35466
  switch (o2.label) {
35395
35467
  case 0:
35396
35468
  return this.view && this.player ? [4, this.player.clock.waitUntil(function() {
@@ -35398,7 +35470,7 @@ void main(void){
35398
35470
  }, 6e4)] : [3, 2];
35399
35471
  case 1:
35400
35472
  for (n3 in o2.sent(), e3 = this.player.getSnapshot() || "", this.cacheImage.src = e3, this.frame.appendChild(this.cacheImage), this.player.destroy(), (t3 = this.playerController) === null || t3 === void 0 || t3.destroy(), this.player = void 0, this.__slideState.mediaState)
35401
- i2 = this.__slideState.mediaState[n3], this.__slideState.mediaState[n3] = rI(rI({}, i2), { frozenTime: this.timestamp() });
35473
+ i2 = this.__slideState.mediaState[n3], this.__slideState.mediaState[n3] = sI(sI({}, i2), { frozenTime: this.timestamp() });
35402
35474
  o2.label = 2;
35403
35475
  case 2:
35404
35476
  return [2];
@@ -35412,14 +35484,14 @@ void main(void){
35412
35484
  });
35413
35485
  }, e2.prototype._doRelease = function() {
35414
35486
  var t3, e3;
35415
- return sI(this, void 0, void 0, function() {
35487
+ return lI(this, void 0, void 0, function() {
35416
35488
  var n3, i2, r2, o2;
35417
- return aI(this, function(s2) {
35489
+ return uI(this, function(s2) {
35418
35490
  switch (s2.label) {
35419
35491
  case 0:
35420
35492
  if (this.player)
35421
35493
  return [2];
35422
- for (i2 in this.player = this.initPlayer(this.config), ((t3 = this.config) === null || t3 === void 0 ? void 0 : t3.controller) && this.createController(), this.player.view && (this.frame.appendChild(this.player.view), this.player.view.style.visibility = "hidden"), n3 = this.__slideState, this.__slideState = Object(l.cloneDeep)(dI), n3.mediaState)
35494
+ for (i2 in this.player = this.initPlayer(this.config), ((t3 = this.config) === null || t3 === void 0 ? void 0 : t3.controller) && this.createController(), this.player.view && (this.frame.appendChild(this.player.view), this.player.view.style.visibility = "hidden"), n3 = this.__slideState, this.__slideState = Object(l.cloneDeep)(fI), n3.mediaState)
35423
35495
  (r2 = n3.mediaState[i2]).type === "play" && (o2 = Math.max((e3 = r2.frozenTime) !== null && e3 !== void 0 ? e3 : 0, r2.time), r2.time = this.timestamp() - (o2 - r2.time), r2.frozenTime = void 0);
35424
35496
  return [4, this.setSlideState(n3)];
35425
35497
  case 1:
@@ -35453,14 +35525,14 @@ void main(void){
35453
35525
  } catch (t4) {
35454
35526
  }
35455
35527
  }, e2.prototype.waitLoadEnd = function() {
35456
- return sI(this, void 0, void 0, function() {
35528
+ return lI(this, void 0, void 0, function() {
35457
35529
  var t3;
35458
- return aI(this, function(e3) {
35530
+ return uI(this, function(e3) {
35459
35531
  switch (e3.label) {
35460
35532
  case 0:
35461
35533
  t3 = 0, e3.label = 1;
35462
35534
  case 1:
35463
- return this.isLoading && t3 < 10 ? [4, uI(100)] : [3, 3];
35535
+ return this.isLoading && t3 < 10 ? [4, cI(100)] : [3, 3];
35464
35536
  case 2:
35465
35537
  return e3.sent(), t3 += 1, [3, 1];
35466
35538
  case 3:
@@ -35468,6 +35540,8 @@ void main(void){
35468
35540
  }
35469
35541
  });
35470
35542
  });
35543
+ }, e2.prototype.preload = function(t3) {
35544
+ return this.player ? this.player.preload(t3) : Promise.resolve();
35471
35545
  }, e2.prototype.destroy = function() {
35472
35546
  var t3 = this;
35473
35547
  this.logger.info("pre destroy slide", ""), this.isLoading ? this.waitLoadEnd().then(function() {
@@ -35487,24 +35561,25 @@ void main(void){
35487
35561
  var t3 = this.player.currentIndex === 1, e3 = this.mainSeqLength === 0 || this.mainSeqStep === 0, n3 = this.mainSeqState === "idle" || this.mainSeqState === null;
35488
35562
  return !(t3 && e3 && n3);
35489
35563
  }, e2.prototype.updateGlobalVolume = function(t3) {
35490
- var e3;
35491
- (e3 = this.player) === null || e3 === void 0 || e3.updateGlobalVolume(t3);
35564
+ this.volumeAdjuster.volume = t3;
35565
+ }, e2.prototype.getGlobalVolume = function() {
35566
+ return this.volumeAdjuster.volume;
35492
35567
  }, e2.clearLocalCache = function() {
35493
- QR.clearLocalCache();
35568
+ KR.clearLocalCache();
35494
35569
  }, e2.disposeLocalCache = function() {
35495
- }, e2._tempLog = "", e2._tempLogIndex = 1, e2.usePlugin = eP, e2.handleLogDownload = function() {
35496
- return sI(void 0, void 0, void 0, function() {
35570
+ }, e2._tempLog = "", e2._tempLogIndex = 1, e2.usePlugin = tP, e2.handleLogDownload = function() {
35571
+ return lI(void 0, void 0, void 0, function() {
35497
35572
  var t3, e3, n3, i2, r2, o2, s2;
35498
- return aI(this, function(a2) {
35573
+ return uI(this, function(a2) {
35499
35574
  switch (a2.label) {
35500
35575
  case 0:
35501
- return t3 = "", fI ? [4, fI.keys()] : [3, 5];
35576
+ return t3 = "", gI ? [4, gI.keys()] : [3, 5];
35502
35577
  case 1:
35503
35578
  e3 = (a2.sent() || []).sort(function(t4, e4) {
35504
35579
  return parseInt(t4.replace("run_time_log_", "")) - parseInt(e4.replace("run_time_log_", ""));
35505
35580
  }), n3 = 0, i2 = e3, a2.label = 2;
35506
35581
  case 2:
35507
- return n3 < i2.length ? (r2 = i2[n3], o2 = t3, [4, fI.getItem(r2)]) : [3, 5];
35582
+ return n3 < i2.length ? (r2 = i2[n3], o2 = t3, [4, gI.getItem(r2)]) : [3, 5];
35508
35583
  case 3:
35509
35584
  t3 = o2 + (a2.sent() || ""), a2.label = 4;
35510
35585
  case 4:
@@ -35514,12 +35589,12 @@ void main(void){
35514
35589
  }
35515
35590
  });
35516
35591
  });
35517
- }, oI([(n2 = "Slide.initConfig", function(t3, e3, i2) {
35592
+ }, aI([(n2 = "Slide.initConfig", function(t3, e3, i2) {
35518
35593
  var r2 = i2.value;
35519
35594
  i2.value = function() {
35520
35595
  for (var t4 = [], e4 = 0; e4 < arguments.length; e4++)
35521
35596
  t4[e4] = arguments[e4];
35522
- for (var i3 = tP.get(n2) || [], o2 = t4, s2 = 0, a2 = i3; s2 < a2.length; s2++) {
35597
+ for (var i3 = QR.get(n2) || [], o2 = t4, s2 = 0, a2 = i3; s2 < a2.length; s2++) {
35523
35598
  var l2 = a2[s2];
35524
35599
  try {
35525
35600
  o2 = l2.before(o2);
@@ -35541,15 +35616,15 @@ void main(void){
35541
35616
  };
35542
35617
  })], e2.prototype, "initSlideConfig", null), e2;
35543
35618
  }(a.a);
35544
- fI == null || fI.clear(), window.addEventListener("__slide_log__", mI.handleLogDownload), window.setInterval(function() {
35545
- mI.flushLog().catch(function() {
35619
+ gI == null || gI.clear(), window.addEventListener("__slide_log__", vI.handleLogDownload), window.setInterval(function() {
35620
+ vI.flushLog().catch(function() {
35546
35621
  });
35547
35622
  }, 9e3);
35548
35623
  }]);
35549
35624
  const SOUP = "!#%()*+,-./:;=?@[]^_`{|}~ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
35550
- const SOUP_LEN = SOUP.length;
35625
+ const SOUP_LEN = 87;
35551
35626
  const ID_LEN = 20;
35552
- const reusedIdCarrier = Array(ID_LEN);
35627
+ const reusedIdCarrier = [];
35553
35628
  const genUID = () => {
35554
35629
  for (let i = 0; i < ID_LEN; i++) {
35555
35630
  reusedIdCarrier[i] = SOUP.charAt(Math.random() * SOUP_LEN);
@@ -35570,7 +35645,7 @@ class SideEffectManager {
35570
35645
  }
35571
35646
  addDisposer(disposer, disposerID = this.genUID()) {
35572
35647
  this.flush(disposerID);
35573
- this.disposers.set(disposerID, Array.isArray(disposer) ? () => disposer.forEach(invoke) : disposer);
35648
+ this.disposers.set(disposerID, Array.isArray(disposer) ? joinDisposers(disposer) : disposer);
35574
35649
  return disposerID;
35575
35650
  }
35576
35651
  add(executor, disposerID = this.genUID()) {
@@ -35601,11 +35676,7 @@ class SideEffectManager {
35601
35676
  flush(disposerID) {
35602
35677
  const disposer = this.remove(disposerID);
35603
35678
  if (disposer) {
35604
- try {
35605
- disposer();
35606
- } catch (e) {
35607
- console.error(e);
35608
- }
35679
+ disposer();
35609
35680
  }
35610
35681
  }
35611
35682
  flushAll() {
@@ -35620,6 +35691,9 @@ class SideEffectManager {
35620
35691
  return uid;
35621
35692
  }
35622
35693
  }
35694
+ function joinDisposers(disposers) {
35695
+ return () => disposers.forEach(invoke);
35696
+ }
35623
35697
  function clamp$1(value, min, max) {
35624
35698
  return Math.min(Math.max(value, min), max);
35625
35699
  }
@@ -37367,9 +37441,15 @@ class SlideDocsViewer {
37367
37441
  this.slideController = null;
37368
37442
  this.isViewMounted = false;
37369
37443
  this.onError = ({ error }) => {
37444
+ var _a;
37370
37445
  this.viewer.setPaused();
37446
+ this.$overlay.textContent = `Error on slide[page=${(_a = this.slideController) == null ? void 0 : _a.page}]: ${error.message}`;
37447
+ this.$overlay.style.opacity = "1";
37371
37448
  logger.warn("[Slide] render error", error);
37372
37449
  };
37450
+ this.onRenderEnd = () => {
37451
+ this.$overlay.style.opacity = "";
37452
+ };
37373
37453
  this.refreshPages = () => {
37374
37454
  if (this.slideController) {
37375
37455
  this.viewer.pages = createDocsViewerPages(this.slideController.slide);
@@ -37438,6 +37518,7 @@ class SlideDocsViewer {
37438
37518
  render() {
37439
37519
  this.viewer.$content.appendChild(this.renderSlideContainer());
37440
37520
  this.viewer.$content.appendChild(this.renderWhiteboardView());
37521
+ this.viewer.$content.appendChild(this.renderOverlay());
37441
37522
  this.sideEffect.addEventListener(window, "keydown", (ev) => {
37442
37523
  if (this.box.focus && this.slideController) {
37443
37524
  switch (ev.key) {
@@ -37455,6 +37536,14 @@ class SlideDocsViewer {
37455
37536
  }
37456
37537
  });
37457
37538
  }
37539
+ renderOverlay() {
37540
+ if (!this.$overlay) {
37541
+ const $overlay = document.createElement("div");
37542
+ $overlay.className = this.wrapClassName("overlay");
37543
+ this.$overlay = $overlay;
37544
+ }
37545
+ return this.$overlay;
37546
+ }
37458
37547
  renderSlideContainer() {
37459
37548
  if (!this.$slide) {
37460
37549
  const $slide = document.createElement("div");
@@ -37476,6 +37565,7 @@ class SlideDocsViewer {
37476
37565
  this.box.mountFooter(this.viewer.$footer);
37477
37566
  this.slideController = this.mountSlideController({
37478
37567
  anchor: this.$slide,
37568
+ onRenderEnd: this.onRenderEnd,
37479
37569
  onTransitionStart: this.viewer.setPlaying,
37480
37570
  onTransitionEnd: this.viewer.setPaused,
37481
37571
  onReady: this.refreshPages,
@@ -37566,7 +37656,7 @@ const addHooks = (emitter) => {
37566
37656
  apps.focus(appId);
37567
37657
  });
37568
37658
  };
37569
- var styles = /* @__PURE__ */ (() => ".netless-app-slide-content{position:relative;height:100%;overflow:hidden}.netless-app-slide-preview-mask{display:none;position:absolute;z-index:200;top:0;left:0;width:100%;height:100%}.netless-app-slide-preview{display:flex;flex-direction:column;align-items:center;position:absolute;z-index:300;top:0;left:0;width:33%;max-width:200px;height:100%;padding-top:10px;transform:translate(-100%);background:rgba(237,237,240,.9);box-shadow:inset -1px 0 #0000001c;transition:transform .4s}.netless-app-slide-preview-active .netless-app-slide-preview-mask{display:block}.netless-app-slide-preview-active .netless-app-slide-preview{transform:translate(0)}.netless-app-slide-preview-page{position:relative;display:block;width:55%;margin-bottom:10px;font-size:0;color:transparent;outline:none;border:7px solid transparent;border-radius:4px;transition:border-color .3s;user-select:none}.netless-app-slide-preview-page:hover,.netless-app-slide-preview-page.netless-app-slide-preview-page-active{border-color:#444e601a}.netless-app-slide-preview-page>img{width:100%;height:auto;box-sizing:border-box;border:1px solid rgba(0,0,0,.5);border-radius:1px;background-color:#fff;box-shadow:0 2px 8px #0000004d}.netless-app-slide-preview-page-name{position:absolute;top:1px;left:-10px;transform:translate(-100%);text-align:right;font-size:12px;color:#5f5f5f;user-select:none}.netless-app-slide-footer{box-sizing:border-box;height:26px;display:flex;align-items:center;padding:0 16px;border-top:1px solid #eeeef7;color:#191919}.netless-app-slide-float-footer{width:100%;min-height:26px;position:absolute;left:0;bottom:0;z-index:2000;background:rgba(249,249,252,.9);transition:opacity .4s}.netless-app-slide-footer-btn{box-sizing:border-box;width:26px;height:26px;font-size:0;margin:0;padding:3px;border:none;border-radius:1px;outline:none;color:currentColor;background:transparent;transition:background .4s;cursor:pointer;user-select:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}.netless-app-slide-footer-btn:hover{background:rgba(237,237,240,.9)}@media (hover: none){.netless-app-slide-footer-btn:hover{background:transparent!important}}.netless-app-slide-footer-btn>svg{width:100%;height:100%}.netless-app-slide-footer-btn>svg:nth-of-type(2){display:none}.netless-app-slide-footer-btn.netless-app-slide-footer-btn-playing>svg:nth-of-type(1){display:none}.netless-app-slide-footer-btn.netless-app-slide-footer-btn-playing>svg:nth-of-type(2){display:initial}.netless-app-slide-footer-btn~.netless-app-slide-footer-btn{margin-left:15px}.netless-app-slide-page-jumps{flex:1;display:flex;justify-content:center;align-items:center}.netless-app-slide-page-number{margin-left:auto;font-size:13px;user-select:none;white-space:nowrap;word-break:keep-all}.netless-app-slide-page-number-input{border:none;outline:none;width:3em;margin:0;padding:0 2px;text-align:right;font-size:13px;line-height:1;font-weight:400;font-family:inherit;border-radius:2px;color:currentColor;background:transparent;transition:background .4s;user-select:text;-webkit-tap-highlight-color:rgba(0,0,0,0)}.netless-app-slide-page-number-input:hover,.netless-app-slide-page-number-input:focus,.netless-app-slide-page-number-input:active{background:#fff;box-shadow:#63636333 0 2px 8px}.netless-app-slide-readonly.netless-app-slide-footer{display:none}.telebox-color-scheme-dark .netless-app-slide-page-number-input{color:#a6a6a8}.telebox-color-scheme-dark .netless-app-slide-page-number-input:active,.telebox-color-scheme-dark .netless-app-slide-page-number-input:focus,.telebox-color-scheme-dark .netless-app-slide-page-number-input:hover{color:#222}.telebox-color-scheme-dark .netless-app-slide-footer{color:#a6a6a8;background:#2d2d33;border-top:none}.telebox-color-scheme-dark .netless-app-slide-footer-btn:hover{background:#212126}.telebox-color-scheme-dark .netless-app-slide-preview{background:rgba(50,50,50,.9)}.netless-app-slide-wb-view{position:absolute;top:0;left:0;width:100%;height:100%;z-index:100;overflow:hidden}.netless-app-slide-slide{width:100%;height:100%;display:flex;align-items:center;justify-content:center}.netless-app-slide-slide canvas{transform:scale(var(--netless-app-slide-scale, 1))}\n")();
37659
+ var styles = /* @__PURE__ */ (() => ".netless-app-slide-content{position:relative;height:100%;overflow:hidden}.netless-app-slide-preview-mask{display:none;position:absolute;z-index:200;top:0;left:0;width:100%;height:100%}.netless-app-slide-preview{display:flex;flex-direction:column;align-items:center;position:absolute;z-index:300;top:0;left:0;width:33%;max-width:200px;height:100%;padding-top:10px;transform:translate(-100%);background:rgba(237,237,240,.9);box-shadow:inset -1px 0 #0000001c;transition:transform .4s}.netless-app-slide-preview-active .netless-app-slide-preview-mask{display:block}.netless-app-slide-preview-active .netless-app-slide-preview{transform:translate(0)}.netless-app-slide-preview-page{position:relative;display:block;width:55%;margin-bottom:10px;font-size:0;color:transparent;outline:none;border:7px solid transparent;border-radius:4px;transition:border-color .3s;user-select:none}.netless-app-slide-preview-page:hover,.netless-app-slide-preview-page.netless-app-slide-preview-page-active{border-color:#444e601a}.netless-app-slide-preview-page>img{width:100%;height:auto;box-sizing:border-box;border:1px solid rgba(0,0,0,.5);border-radius:1px;background-color:#fff;box-shadow:0 2px 8px #0000004d}.netless-app-slide-preview-page-name{position:absolute;top:1px;left:-10px;transform:translate(-100%);text-align:right;font-size:12px;color:#5f5f5f;user-select:none}.netless-app-slide-footer{box-sizing:border-box;height:26px;display:flex;align-items:center;padding:0 16px;border-top:1px solid #eeeef7;color:#191919}.netless-app-slide-float-footer{width:100%;min-height:26px;position:absolute;left:0;bottom:0;z-index:2000;background:rgba(249,249,252,.9);transition:opacity .4s}.netless-app-slide-footer-btn{box-sizing:border-box;width:26px;height:26px;font-size:0;margin:0;padding:3px;border:none;border-radius:1px;outline:none;color:currentColor;background:transparent;transition:background .4s;cursor:pointer;user-select:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}.netless-app-slide-footer-btn:hover{background:rgba(237,237,240,.9)}@media (hover: none){.netless-app-slide-footer-btn:hover{background:transparent!important}}.netless-app-slide-footer-btn>svg{width:100%;height:100%}.netless-app-slide-footer-btn>svg:nth-of-type(2){display:none}.netless-app-slide-footer-btn.netless-app-slide-footer-btn-playing>svg:nth-of-type(1){display:none}.netless-app-slide-footer-btn.netless-app-slide-footer-btn-playing>svg:nth-of-type(2){display:initial}.netless-app-slide-footer-btn~.netless-app-slide-footer-btn{margin-left:15px}.netless-app-slide-page-jumps{flex:1;display:flex;justify-content:center;align-items:center}.netless-app-slide-page-number{margin-left:auto;font-size:13px;user-select:none;white-space:nowrap;word-break:keep-all}.netless-app-slide-page-number-input{border:none;outline:none;width:3em;margin:0;padding:0 2px;text-align:right;font-size:13px;line-height:1;font-weight:400;font-family:inherit;border-radius:2px;color:currentColor;background:transparent;transition:background .4s;user-select:text;-webkit-tap-highlight-color:rgba(0,0,0,0)}.netless-app-slide-page-number-input:hover,.netless-app-slide-page-number-input:focus,.netless-app-slide-page-number-input:active{background:#fff;box-shadow:#63636333 0 2px 8px}.netless-app-slide-readonly.netless-app-slide-footer{display:none}.telebox-color-scheme-dark .netless-app-slide-page-number-input{color:#a6a6a8}.telebox-color-scheme-dark .netless-app-slide-page-number-input:active,.telebox-color-scheme-dark .netless-app-slide-page-number-input:focus,.telebox-color-scheme-dark .netless-app-slide-page-number-input:hover{color:#222}.telebox-color-scheme-dark .netless-app-slide-footer{color:#a6a6a8;background:#2d2d33;border-top:none}.telebox-color-scheme-dark .netless-app-slide-footer-btn:hover{background:#212126}.telebox-color-scheme-dark .netless-app-slide-preview{background:rgba(50,50,50,.9)}.netless-app-slide-wb-view{position:absolute;top:0;left:0;width:100%;height:100%;z-index:100;overflow:hidden}.netless-app-slide-overlay{display:flex;align-items:center;justify-content:center;position:absolute;z-index:200;top:0;left:0;width:100%;height:100%;background:rgba(255,0,0,.25);transition:opacity .3s;opacity:0;pointer-events:none}.netless-app-slide-slide{width:100%;height:100%;display:flex;align-items:center;justify-content:center}.netless-app-slide-slide canvas{transform:scale(var(--netless-app-slide-scale, 1))}\n")();
37570
37660
  function previewSlide({
37571
37661
  container,
37572
37662
  taskId,
@@ -37723,7 +37813,7 @@ class SlidePreviewer {
37723
37813
  }
37724
37814
  }
37725
37815
  const usePlugin = /* @__PURE__ */ Slide.Slide.usePlugin.bind(Slide.Slide);
37726
- const version = "0.2.6";
37816
+ const version = "0.2.9";
37727
37817
  const SlideApp = {
37728
37818
  kind: "Slide",
37729
37819
  setup(context) {
@@ -37777,6 +37867,7 @@ const SlideApp = {
37777
37867
  }
37778
37868
  const page = slideController.slide.slideState.currentSlideIndex;
37779
37869
  log("[Slide] page to", page, synced ? "(synced)" : "", "(on ready)");
37870
+ slideController.slide.on("renderEnd", options.onRenderEnd);
37780
37871
  });
37781
37872
  return slideController;
37782
37873
  };