@netless/app-slide 0.2.100-alpha.0 → 0.2.100-alpha.2

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
@@ -12613,13 +12613,13 @@ var Slide = function(t) {
12613
12613
  }), i.d(e, "PreloadCancelledError", function() {
12614
12614
  return Om;
12615
12615
  }), i.d(e, "delay", function() {
12616
- return OT;
12616
+ return RT;
12617
12617
  }), i.d(e, "waitUntil", function() {
12618
- return LT;
12618
+ return IT;
12619
12619
  }), i.d(e, "SLIDE_EVENTS", function() {
12620
- return NT;
12620
+ return PT;
12621
12621
  }), i.d(e, "Slide", function() {
12622
- return kT;
12622
+ return DT;
12623
12623
  });
12624
12624
  const n = [];
12625
12625
  for (let t2 = 0; t2 < 256; t2++)
@@ -29443,26 +29443,26 @@ Caused by: ${n2.stack}`), r2;
29443
29443
  return this.object.hitArea ? this.object.hitArea : new Nh.k(0, 0, this.object.width, this.object.height);
29444
29444
  }
29445
29445
  handleAction(t2) {
29446
- this.ctx.eventHub.emit(ox.hyperlinkTrigger, t2), this.execAction(t2);
29446
+ this.ctx.eventHub.emit(ix.hyperlinkTrigger, t2), this.execAction(t2);
29447
29447
  }
29448
29448
  execAction(t2) {
29449
29449
  var e2;
29450
- if (this.ctx.eventHub.emit(ox.userInput), "ppaction://hlinksldjump" === t2.action) {
29450
+ if (this.ctx.eventHub.emit(ix.userInput), "ppaction://hlinksldjump" === t2.action) {
29451
29451
  const i2 = (null !== (e2 = null == t2 ? void 0 : t2.target) && void 0 !== e2 ? e2 : "").match(/slide(\d+)\.xml/);
29452
- i2 && i2[1] && this.ctx.eventHub.emit(ox.requestGotoSlide, Number(i2[1]));
29452
+ i2 && i2[1] && this.ctx.eventHub.emit(ix.requestGotoSlide, Number(i2[1]));
29453
29453
  } else if ("ppaction://hlinkshowjump?jump=nextslide" === t2.action)
29454
- this.ctx.eventHub.emit(ox.requestNextSlide);
29454
+ this.ctx.eventHub.emit(ix.requestNextSlide);
29455
29455
  else if ("ppaction://hlinkshowjump?jump=previousslide" === t2.action)
29456
- this.ctx.eventHub.emit(ox.requestPrevSlide);
29456
+ this.ctx.eventHub.emit(ix.requestPrevSlide);
29457
29457
  else if ("ppaction://hlinkshowjump?jump=firstslide" === t2.action)
29458
- this.ctx.eventHub.emit(ox.requestGotoSlide, 1);
29458
+ this.ctx.eventHub.emit(ix.requestGotoSlide, 1);
29459
29459
  else if ("ppaction://hlinkshowjump?jump=lastslide" === t2.action)
29460
- this.ctx.eventHub.emit(ox.requestGotoSlide, -1);
29460
+ this.ctx.eventHub.emit(ix.requestGotoSlide, -1);
29461
29461
  else if ("ppaction://hlinkshowjump?jump=lastslideviewed" === t2.action) {
29462
29462
  const t3 = this.ctx.lastViewedIndex;
29463
- this.ctx.eventHub.emit(ox.requestGotoSlide, t3);
29463
+ this.ctx.eventHub.emit(ix.requestGotoSlide, t3);
29464
29464
  } else
29465
- "ppaction://hlinkshowjump?jump=endshow" === t2.action ? this.ctx.eventHub.emit(ox.requestGotoSlide, -1) : ("" === t2.action || "ppaction://hlinkfile" === t2.action) && this.ctx.eventHub.emit(ox.requestOpenUrl, t2.target);
29465
+ "ppaction://hlinkshowjump?jump=endshow" === t2.action ? this.ctx.eventHub.emit(ix.requestGotoSlide, -1) : ("" === t2.action || "ppaction://hlinkfile" === t2.action) && this.ctx.eventHub.emit(ix.requestOpenUrl, t2.target);
29466
29466
  }
29467
29467
  }
29468
29468
  function cg(t2, e2, i2 = 5) {
@@ -31605,7 +31605,7 @@ void main(void){
31605
31605
  return void this.ctx.logger.info("Media controller prevent seek event with paused state", this.ctx.taskId);
31606
31606
  t3.stopPropagation();
31607
31607
  const e3 = t3.offsetX / this.progress.clientWidth * this.duration;
31608
- this.medianIsEnd = false, "interactive" !== this.ctx.mode && this.jumpToTime(e3), "local" !== this.ctx.mode && this.ctx.eventHub.emit(ox.mediaSeek, { id: this.targetId, time: e3, isPlaying: this.media.isPlaying }), this.delayHide();
31608
+ this.medianIsEnd = false, "interactive" !== this.ctx.mode && this.jumpToTime(e3), "local" !== this.ctx.mode && this.ctx.eventHub.emit(ix.mediaSeek, { id: this.targetId, time: e3, isPlaying: this.media.isPlaying }), this.delayHide();
31609
31609
  }, this.jumpToTime = (t3 = 0) => p_(this, void 0, void 0, function* () {
31610
31610
  yield Pm(() => !!this.duration, 3e3);
31611
31611
  const e3 = Math.floor(t3) + this.start;
@@ -31624,7 +31624,7 @@ void main(void){
31624
31624
  t3.stopPropagation(), this.hide();
31625
31625
  }, this.mediaTimeUpdate = () => p_(this, void 0, void 0, function* () {
31626
31626
  const t3 = this.media.currentTime - this.start;
31627
- if (this.duration < 0.5 ? this.duration > 0 && t3 >= this.duration && (yield this.pauseMedia(), this.medianIsEnd = true, this.jumpToTime(), this.ctx.eventHub.emit(ox.mediaStop, { id: this.targetId }), this.onClickCancelFullScreenButtonHandle()) : this.duration > 0 && (Math.abs(t3 - this.duration) < 0.3 || t3 > this.duration) && (yield this.pauseMedia(), this.medianIsEnd = true, this.jumpToTime(), this.ctx.eventHub.emit(ox.mediaStop, { id: this.targetId }), this.onClickCancelFullScreenButtonHandle()), this.currentTime.innerText = g_.formatTime(t3), this.currentProgress.style.flex = (t3 / this.duration).toString(), this.bookmarkList && this.bookmarkList.length > 0) {
31627
+ if (this.duration < 0.5 ? this.duration > 0 && t3 >= this.duration && (yield this.pauseMedia(), this.medianIsEnd = true, this.jumpToTime(), this.ctx.eventHub.emit(ix.mediaStop, { id: this.targetId }), this.onClickCancelFullScreenButtonHandle()) : this.duration > 0 && (Math.abs(t3 - this.duration) < 0.3 || t3 > this.duration) && (yield this.pauseMedia(), this.medianIsEnd = true, this.jumpToTime(), this.ctx.eventHub.emit(ix.mediaStop, { id: this.targetId }), this.onClickCancelFullScreenButtonHandle()), this.currentTime.innerText = g_.formatTime(t3), this.currentProgress.style.flex = (t3 / this.duration).toString(), this.bookmarkList && this.bookmarkList.length > 0) {
31628
31628
  const t4 = this.bookmarkList[this.pickBookmarkIndex];
31629
31629
  t4 && t4.time.toFixed(0) === this.media.currentTime.toFixed(0) && (this.ctx.timingEventHub.emit(`shape ${this.shapeId} onMediaBookmark ${t4.name}`), this.pickBookmarkIndex += 1);
31630
31630
  }
@@ -31642,7 +31642,7 @@ void main(void){
31642
31642
  }, this.onClickFullScreenButtonHandle = () => {
31643
31643
  this.fullscreenPlay();
31644
31644
  }, this.onClickCancelFullScreenButtonHandle = () => {
31645
- this.fullscreenStatus = false, this.media.requestCancelFullscreen(), this.ctx.eventHub.emit(ox.fullscreenChange, { targetId: this.targetId, state: false }), this.delayHide();
31645
+ this.fullscreenStatus = false, this.media.requestCancelFullscreen(), this.ctx.eventHub.emit(ix.fullscreenChange, { targetId: this.targetId, state: false }), this.delayHide();
31646
31646
  }, this.onFullScreenChange = (t3) => {
31647
31647
  const { status: e3, targetId: i3, slideIndex: n2 } = t3;
31648
31648
  this.changeFullScreenState(e3, i3, n2), this.delayHide();
@@ -31756,10 +31756,10 @@ void main(void){
31756
31756
  }
31757
31757
  }
31758
31758
  playMediaFromCtrl(t2) {
31759
- this.ctx.isPlayerPaused() ? this.ctx.logger.info("Media controller prevent play event with paused state", this.ctx.taskId) : ("interactive" !== this.ctx.mode && this.playMedia(), "local" !== this.ctx.mode && this.ctx.eventHub.emit(ox.mediaPlay, { id: this.targetId, time: this.media.currentTime - this.start, _stateOnly: t2 }));
31759
+ this.ctx.isPlayerPaused() ? this.ctx.logger.info("Media controller prevent play event with paused state", this.ctx.taskId) : ("interactive" !== this.ctx.mode && this.playMedia(), "local" !== this.ctx.mode && this.ctx.eventHub.emit(ix.mediaPlay, { id: this.targetId, time: this.media.currentTime - this.start, _stateOnly: t2 }));
31760
31760
  }
31761
31761
  pauseMediaFromCtrl(t2) {
31762
- this.ctx.isPlayerPaused() ? this.ctx.logger.info("Media controller prevent pause event with paused state", this.ctx.taskId) : ("interactive" !== this.ctx.mode && this.pauseMedia(), "local" === this.ctx.mode || this.ctx.isRendering || this.ctx.eventHub.emit(ox.mediaPause, { id: this.targetId, time: this.media.currentTime - this.start, _stateOnly: t2 }));
31762
+ this.ctx.isPlayerPaused() ? this.ctx.logger.info("Media controller prevent pause event with paused state", this.ctx.taskId) : ("interactive" !== this.ctx.mode && this.pauseMedia(), "local" === this.ctx.mode || this.ctx.isRendering || this.ctx.eventHub.emit(ix.mediaPause, { id: this.targetId, time: this.media.currentTime - this.start, _stateOnly: t2 }));
31763
31763
  }
31764
31764
  setControllerPosition() {
31765
31765
  var t2;
@@ -31775,7 +31775,7 @@ void main(void){
31775
31775
  this.playCallBackList.push(t2);
31776
31776
  }
31777
31777
  fullscreenPlay() {
31778
- this.fullscreenStatus = true, "interactive" !== this.ctx.mode && this.media.requestFullscreen(), "local" !== this.ctx.mode && this.ctx.eventHub.emit(ox.fullscreenChange, { targetId: this.targetId, state: true }), this.delayHide();
31778
+ this.fullscreenStatus = true, "interactive" !== this.ctx.mode && this.media.requestFullscreen(), "local" !== this.ctx.mode && this.ctx.eventHub.emit(ix.fullscreenChange, { targetId: this.targetId, state: true }), this.delayHide();
31779
31779
  }
31780
31780
  changeFullScreenState(t2, e2, i2) {
31781
31781
  i2 === this.ctx.slideIndex && (t2 && this.targetId === e2 ? this.fullscreenStatus = t2 : this.fullscreenStatus = false, this.fullscreenStatus ? (this.fullScreenButton.style.display = "none", this.exitFullScreenButton.style.display = "block") : (this.fullScreenButton.style.display = "block", this.exitFullScreenButton.style.display = "none"), this.setControllerPosition());
@@ -31807,7 +31807,7 @@ void main(void){
31807
31807
  class __ extends Za.a {
31808
31808
  constructor(t2, e2, i2, n2) {
31809
31809
  var r2, o2;
31810
- super(), this.isGlobalPause = false, this.lastTime = -1, this.howl = null, this.rctClient = null, this.domAudio = null, this.pcmSource = null, this.isHowlEnd = false, this.isHowlLoadEmit = false, this.staticEventId = 1001, this._catParams = void 0, this.isDomAudioPlayed = false, this.domAudioRemainSeek = [], this.url = t2, this.runningAudio = e2, i2 && (this._catParams = i2), sx.RtcAudioClazz ? (this.rctClient = new sx.RtcAudioClazz(t2, null === (r2 = this._catParams) || void 0 === r2 ? void 0 : r2.start, null === (o2 = this._catParams) || void 0 === o2 ? void 0 : o2.end), this.rctClient.on("load", () => this.emit("load")), this.rctClient.on("pause", () => this.emit("pause")), this.rctClient.on("play", () => {
31810
+ super(), this.isGlobalPause = false, this.lastTime = -1, this.howl = null, this.rctClient = null, this.domAudio = null, this.pcmSource = null, this.isHowlEnd = false, this.isHowlLoadEmit = false, this.staticEventId = 1001, this._catParams = void 0, this.isDomAudioPlayed = false, this.domAudioRemainSeek = [], this.url = t2, this.runningAudio = e2, i2 && (this._catParams = i2), nx.RtcAudioClazz ? (this.rctClient = new nx.RtcAudioClazz(t2, null === (r2 = this._catParams) || void 0 === r2 ? void 0 : r2.start, null === (o2 = this._catParams) || void 0 === o2 ? void 0 : o2.end), this.rctClient.on("load", () => this.emit("load")), this.rctClient.on("pause", () => this.emit("pause")), this.rctClient.on("play", () => {
31811
31811
  this.startTimeChangeEmit(), this.emit("play");
31812
31812
  }), this.rctClient.on("resumeAllAudioInterruptByAudioSessionChanged", () => {
31813
31813
  this.emit("resumeAllAudioInterruptByAudioSessionChanged");
@@ -32012,11 +32012,11 @@ void main(void){
32012
32012
  this.isPlaying ? this.pause() : this.play();
32013
32013
  }
32014
32014
  seek(t2) {
32015
- return this.controller.jumpToTime(t2);
32015
+ this.controller.jumpToTime(t2);
32016
32016
  }
32017
32017
  stop() {
32018
32018
  var t2;
32019
- null === (t2 = this.rtcAudio) || void 0 === t2 || t2.stop(), this.seek(0), this.pause(), this.ctx.eventHub.emit(ox.mediaStop, { id: this.id });
32019
+ null === (t2 = this.rtcAudio) || void 0 === t2 || t2.stop(), this.seek(0), this.pause(), this.ctx.eventHub.emit(ix.mediaStop, { id: this.id });
32020
32020
  }
32021
32021
  requestFullscreen() {
32022
32022
  return y_(this, void 0, void 0, function* () {
@@ -32126,10 +32126,10 @@ void main(void){
32126
32126
  this.isPlaying ? this.pause() : this.play();
32127
32127
  }
32128
32128
  seek(t2) {
32129
- return this.ctx.isPlayerPaused() ? (this.ctx.logger.info("Audio player prevent seek event with paused state", this.ctx.taskId), Promise.resolve()) : this.controller.jumpToTime(t2);
32129
+ this.ctx.isPlayerPaused() ? this.ctx.logger.info("Audio player prevent seek event with paused state", this.ctx.taskId) : this.controller.jumpToTime(t2);
32130
32130
  }
32131
32131
  stop() {
32132
- this.audioPlayer.stop(), this.seek(0), this.pause(), this.ctx.eventHub.emit(ox.mediaStop, { id: this.id });
32132
+ this.audioPlayer.stop(), this.seek(0), this.pause(), this.ctx.eventHub.emit(ix.mediaStop, { id: this.id });
32133
32133
  }
32134
32134
  requestFullscreen() {
32135
32135
  }
@@ -32419,12 +32419,12 @@ void main(void){
32419
32419
  this.currentSeqIndex = 0, this.currentSeqState = "idle";
32420
32420
  }), this.commonTimeNode.on("childTimeNodeStart", (t3) => {
32421
32421
  const e3 = this.commonTimeNode.children.findIndex((e4) => e4.commonTimeNode.uuid === t3.id);
32422
- e3 >= 0 && (this.currentSeqIndex = e3), this.currentSeqState = "running", this.isMainSeq && this.ctx.eventHub.emit(ox.mainSeqStepStart, e3);
32422
+ e3 >= 0 && (this.currentSeqIndex = e3), this.currentSeqState = "running", this.isMainSeq && this.ctx.eventHub.emit(ix.mainSeqStepStart, e3);
32423
32423
  }), this.commonTimeNode.on("childTimeNodeEnd", (t3) => {
32424
32424
  const e3 = this.commonTimeNode.children.findIndex((e4) => e4.commonTimeNode.uuid === t3.id);
32425
32425
  e3 >= 0 && (this.currentSeqIndex = e3), this.currentSeqState = "end", this.autoPlay && this.ctx.clock.setTimeout(() => {
32426
32426
  this.handleNext(false, true);
32427
- }), this.isMainSeq && this.ctx.eventHub.emit(ox.mainSeqStepEnd, e3);
32427
+ }), this.isMainSeq && this.ctx.eventHub.emit(ix.mainSeqStepEnd, e3);
32428
32428
  }), this.commonTimeNode.on("timeNodeEndSync", () => {
32429
32429
  this.isTimeNodeEndSync = true, this.commonTimeNode.resetForRepeat();
32430
32430
  }), this.commonTimeNode.on("timeNodeDestroy", () => {
@@ -32441,13 +32441,13 @@ void main(void){
32441
32441
  return this._currentSeqIndex;
32442
32442
  }
32443
32443
  set currentSeqIndex(t2) {
32444
- this._currentSeqIndex = t2, this.isMainSeq ? this.ctx.eventHub.emit(ox.mainSeqStepChange, t2) : this.isInteractiveSeq && this.ctx.eventHub.emit(ox.interactiveSeqStateChange, { id: this.json.ctn.id, state: { step: t2, state: this._currentSeqState } });
32444
+ this._currentSeqIndex = t2, this.isMainSeq ? this.ctx.eventHub.emit(ix.mainSeqStepChange, t2) : this.isInteractiveSeq && this.ctx.eventHub.emit(ix.interactiveSeqStateChange, { id: this.json.ctn.id, state: { step: t2, state: this._currentSeqState } });
32445
32445
  }
32446
32446
  get currentSeqState() {
32447
32447
  return this._currentSeqState;
32448
32448
  }
32449
32449
  set currentSeqState(t2) {
32450
- this._currentSeqState = t2, this.isMainSeq ? this.ctx.eventHub.emit(ox.mainSeqStateChange, t2) : this.isInteractiveSeq && this.ctx.eventHub.emit(ox.interactiveSeqStateChange, { id: this.json.ctn.id, state: { step: this._currentSeqIndex, state: t2 } });
32450
+ this._currentSeqState = t2, this.isMainSeq ? this.ctx.eventHub.emit(ix.mainSeqStateChange, t2) : this.isInteractiveSeq && this.ctx.eventHub.emit(ix.interactiveSeqStateChange, { id: this.json.ctn.id, state: { step: this._currentSeqIndex, state: t2 } });
32451
32451
  }
32452
32452
  get stepLength() {
32453
32453
  return this.commonTimeNode.children.length;
@@ -32485,9 +32485,9 @@ void main(void){
32485
32485
  if (t3) {
32486
32486
  t3.interactiveContainer.interactive = true, t3.interactiveContainer.cursor = "pointer";
32487
32487
  const i2 = () => {
32488
- this.ctx.eventHub.emit(ox.userInput);
32488
+ this.ctx.eventHub.emit(ix.userInput);
32489
32489
  const t4 = `shape ${e2} onClick`, { mode: i3 } = this.ctx;
32490
- "interactive" !== i3 && "sync" !== i3 || this.ctx.eventHub.emit(ox.interactiveSeqAction, { action: t4, seqId: this.json.ctn.id }), "sync" !== i3 && "local" !== i3 || this.globalEventHub.emit(t4);
32490
+ "interactive" !== i3 && "sync" !== i3 || this.ctx.eventHub.emit(ix.interactiveSeqAction, { action: t4, seqId: this.json.ctn.id }), "sync" !== i3 && "local" !== i3 || this.globalEventHub.emit(t4);
32491
32491
  };
32492
32492
  t3.interactiveContainer.on("pointerdown", i2), this.interactiveListeners.push([t3, i2]);
32493
32493
  }
@@ -33231,7 +33231,7 @@ void main(void){
33231
33231
  startReverseTimeLine() {
33232
33232
  this.isEndEventsEmitted = false, this.timeDelta = 0;
33233
33233
  const t2 = 1e3 / this.ctx.ticker.maxFPS;
33234
- this.duration <= t2 && this.duration > 0 ? (this.emit("timeUpdate", { delta: this.duration, duration: this.duration, isReverse: this.isReverse }), this.ctx.eventHub.emit(ox.animateEnd), this.ctx.ticker.remove(this.updateTimeLine)) : this.duration > t2 && (this.ctx.eventHub.emit(ox.animateStart), this.ctx.ticker.add(this.updateTimeLine));
33234
+ this.duration <= t2 && this.duration > 0 ? (this.emit("timeUpdate", { delta: this.duration, duration: this.duration, isReverse: this.isReverse }), this.ctx.eventHub.emit(ix.animateEnd), this.ctx.ticker.remove(this.updateTimeLine)) : this.duration > t2 && (this.ctx.eventHub.emit(ix.animateStart), this.ctx.ticker.add(this.updateTimeLine));
33235
33235
  }
33236
33236
  startTimeLine(t2 = true) {
33237
33237
  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)
@@ -33240,7 +33240,7 @@ void main(void){
33240
33240
  const e2 = 1e3 / this.ctx.ticker.maxFPS;
33241
33241
  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(() => {
33242
33242
  this.onTimeLineEnd();
33243
- })) : this.duration > e2 && (this.ctx.eventHub.emit(ox.animateStart), this.updateTimeLine(0), this.ctx.ticker.add(this.updateTimeLine));
33243
+ })) : this.duration > e2 && (this.ctx.eventHub.emit(ix.animateStart), this.updateTimeLine(0), this.ctx.ticker.add(this.updateTimeLine));
33244
33244
  }
33245
33245
  startIterate() {
33246
33246
  return Ry(this, void 0, void 0, function* () {
@@ -33349,7 +33349,7 @@ void main(void){
33349
33349
  });
33350
33350
  }
33351
33351
  dispose(t2 = false) {
33352
- this.isConflictDispose = t2, this.ctx.clock.clearTimeout(this.repeatTimeoutId), this.ctx.eventHub.emit(ox.animateEnd);
33352
+ this.isConflictDispose = t2, this.ctx.clock.clearTimeout(this.repeatTimeoutId), this.ctx.eventHub.emit(ix.animateEnd);
33353
33353
  try {
33354
33354
  this.ctx.ticker.remove(this.updateTimeLine);
33355
33355
  } catch (t3) {
@@ -33530,56 +33530,7 @@ void main(void){
33530
33530
  l2((n2 = n2.apply(t2, e2 || [])).next());
33531
33531
  });
33532
33532
  };
33533
- const Dy = /* @__PURE__ */ new WeakMap();
33534
- function Fy(t2, e2, i2) {
33535
- return Ny(this, void 0, void 0, function* () {
33536
- if (function(t3) {
33537
- const e3 = Dy.get(t3);
33538
- e3 && (t3.off("play", e3), Dy.delete(t3));
33539
- }(t2), e2)
33540
- if (i2) {
33541
- if (yield Pm(() => t2.clippedDuration > 0, 5e3), i2 < t2.clippedDuration)
33542
- if (t2.isPlaying)
33543
- yield t2.seek(i2);
33544
- else {
33545
- const e3 = () => {
33546
- Dy.delete(t2), t2.seek(i2).catch(() => {
33547
- });
33548
- };
33549
- Dy.set(t2, e3), t2.once("play", e3), yield t2.play();
33550
- }
33551
- } else
33552
- yield t2.play();
33553
- else
33554
- i2 && (yield t2.seek(i2)), yield t2.pause();
33555
- });
33556
- }
33557
- var By = function(t2, e2, i2, n2) {
33558
- return new (i2 || (i2 = Promise))(function(r2, o2) {
33559
- function s2(t3) {
33560
- try {
33561
- l2(n2.next(t3));
33562
- } catch (t4) {
33563
- o2(t4);
33564
- }
33565
- }
33566
- function a2(t3) {
33567
- try {
33568
- l2(n2.throw(t3));
33569
- } catch (t4) {
33570
- o2(t4);
33571
- }
33572
- }
33573
- function l2(t3) {
33574
- var e3;
33575
- t3.done ? r2(t3.value) : (e3 = t3.value, e3 instanceof i2 ? e3 : new i2(function(t4) {
33576
- t4(e3);
33577
- })).then(s2, a2);
33578
- }
33579
- l2((n2 = n2.apply(t2, e2 || [])).next());
33580
- });
33581
- };
33582
- class ky extends A_ {
33533
+ class Dy extends A_ {
33583
33534
  constructor(t2, e2, i2, n2) {
33584
33535
  super({ id: "stage", width: t2.width, height: t2.height, type: "Container", children: t2.children }, e2, { parentGlobalPos: i2 }, n2), this.isRendered = false, this.isTimingStartValueCollected = false, this.json = t2, this.json.smartArtShapeList && (e2.smartArtShapeList = this.json.smartArtShapeList), e2.hasBackgroundFillShape = this.detectUseBackgroundFill(this.json), this.container.visible = false, this.ctx = e2;
33585
33536
  const r2 = new Jd();
@@ -33590,9 +33541,9 @@ void main(void){
33590
33541
  }
33591
33542
  initOnReuse() {
33592
33543
  super.initOnReuse(), this.ctx.timingEventHub.on("c:prev slide", (t2) => {
33593
- this.ctx.eventHub.emit(ox.requestPrevSlide, t2);
33544
+ this.ctx.eventHub.emit(ix.requestPrevSlide, t2);
33594
33545
  }), this.ctx.timingEventHub.on("c:next slide", (t2, e2) => {
33595
- this.ctx.eventHub.emit(ox.requestNextSlide, t2, e2);
33546
+ this.ctx.eventHub.emit(ix.requestNextSlide, t2, e2);
33596
33547
  });
33597
33548
  }
33598
33549
  get interactiveContainer() {
@@ -33604,7 +33555,7 @@ void main(void){
33604
33555
  render(t2) {
33605
33556
  if (this.isRendered)
33606
33557
  return;
33607
- this.collectAnimatedIds().forEach((t3) => this.ctx.animatedIds.add(t3)), this.isRendered = true, super.render(t2), t2.addSubMTask(() => By(this, void 0, void 0, function* () {
33558
+ this.collectAnimatedIds().forEach((t3) => this.ctx.animatedIds.add(t3)), this.isRendered = true, super.render(t2), t2.addSubMTask(() => Ny(this, void 0, void 0, function* () {
33608
33559
  this.ctx.eventHub.emit("StageRenderEnd");
33609
33560
  }), "@StageImpl[emit.StageRenderEnd]");
33610
33561
  }
@@ -33682,11 +33633,11 @@ void main(void){
33682
33633
  }
33683
33634
  nextStep(t2, e2) {
33684
33635
  var i2;
33685
- this.hasTiming() && (null === (i2 = this.timing) || void 0 === i2 ? void 0 : i2.hasMainSeq()) ? (this.ctx.timingEventHub.emit("shape slide onStopAudio"), this.ctx.timingEventHub.emit("shape slide onNext", t2, e2)) : this.ctx.eventHub.emit(ox.requestNextSlide, t2, e2);
33636
+ this.hasTiming() && (null === (i2 = this.timing) || void 0 === i2 ? void 0 : i2.hasMainSeq()) ? (this.ctx.timingEventHub.emit("shape slide onStopAudio"), this.ctx.timingEventHub.emit("shape slide onNext", t2, e2)) : this.ctx.eventHub.emit(ix.requestNextSlide, t2, e2);
33686
33637
  }
33687
33638
  prevStep(t2 = false) {
33688
33639
  var e2;
33689
- this.hasTiming() && (null === (e2 = this.timing) || void 0 === e2 ? void 0 : e2.hasMainSeq()) ? (this.ctx.timingEventHub.emit("shape slide onStopAudio"), this.ctx.timingEventHub.emit("shape slide onPrev", t2)) : this.ctx.eventHub.emit(ox.requestPrevSlide, t2);
33640
+ this.hasTiming() && (null === (e2 = this.timing) || void 0 === e2 ? void 0 : e2.hasMainSeq()) ? (this.ctx.timingEventHub.emit("shape slide onStopAudio"), this.ctx.timingEventHub.emit("shape slide onPrev", t2)) : this.ctx.eventHub.emit(ix.requestPrevSlide, t2);
33690
33641
  }
33691
33642
  applyInteractiveAction(t2) {
33692
33643
  var e2;
@@ -33701,9 +33652,11 @@ void main(void){
33701
33652
  null === (n2 = this.timing) || void 0 === n2 || n2.setInteractiveSeqState(t2, e2, i2);
33702
33653
  }
33703
33654
  setMediaState(t2, e2, i2) {
33704
- return By(this, void 0, void 0, function* () {
33655
+ return Ny(this, void 0, void 0, function* () {
33705
33656
  const n2 = this.ctx.medias[t2];
33706
- n2 && (yield Fy(n2, e2, i2));
33657
+ n2 && (e2 ? i2 ? (yield Pm(() => n2.clippedDuration > 0, 5e3), i2 < n2.clippedDuration && (n2.once("play", () => {
33658
+ n2.seek(i2);
33659
+ }), yield n2.play())) : yield n2.play() : (i2 && n2.seek(i2), yield n2.pause()));
33707
33660
  });
33708
33661
  }
33709
33662
  setMediaCurrentTime(t2, e2) {
@@ -33711,7 +33664,7 @@ void main(void){
33711
33664
  i2 && i2.seek(e2);
33712
33665
  }
33713
33666
  }
33714
- class Uy {
33667
+ class Fy {
33715
33668
  constructor(t2) {
33716
33669
  this.ticker = t2, this.tasks = [], this.taskCleanupHandlers = /* @__PURE__ */ new Map(), this.couldRunning = false, this.applyNext = () => {
33717
33670
  this.tasks = this.tasks.filter((t4) => !t4.isEmpty());
@@ -33742,7 +33695,7 @@ void main(void){
33742
33695
  this.couldRunning = false;
33743
33696
  }
33744
33697
  }
33745
- var Gy = function(t2, e2, i2, n2) {
33698
+ var By = function(t2, e2, i2, n2) {
33746
33699
  return new (i2 || (i2 = Promise))(function(r2, o2) {
33747
33700
  function s2(t3) {
33748
33701
  try {
@@ -33767,12 +33720,12 @@ void main(void){
33767
33720
  l2((n2 = n2.apply(t2, e2 || [])).next());
33768
33721
  });
33769
33722
  };
33770
- const Hy = (t2) => new Promise((e2) => setTimeout(e2, t2)), jy = Symbol("task-cancelled"), zy = Symbol("task-timeout");
33771
- function Vy(t2) {
33723
+ const ky = (t2) => new Promise((e2) => setTimeout(e2, t2)), Uy = Symbol("task-cancelled"), Gy = Symbol("task-timeout");
33724
+ function Hy(t2) {
33772
33725
  if ("number" == typeof t2 && Number.isFinite(t2) && !(t2 <= 0))
33773
33726
  return Math.floor(t2);
33774
33727
  }
33775
- function Wy() {
33728
+ function jy() {
33776
33729
  return "undefined" != typeof AbortController ? new AbortController() : function() {
33777
33730
  const t2 = { aborted: false, listeners: /* @__PURE__ */ new Set() }, e2 = { get aborted() {
33778
33731
  return t2.aborted;
@@ -33792,10 +33745,10 @@ void main(void){
33792
33745
  } };
33793
33746
  }();
33794
33747
  }
33795
- class Xy extends Za.a {
33748
+ class zy extends Za.a {
33796
33749
  constructor(t2, e2, i2, n2 = 6e4) {
33797
33750
  var r2;
33798
- super(), this.slideIndex = t2, this.taskId = e2, this.logger = i2, this.isCancel = false, this.tasks = [], this.runningTaskPromises = /* @__PURE__ */ new Set(), this.defaultTimeoutMs = null !== (r2 = Vy(n2)) && void 0 !== r2 ? r2 : 6e4;
33751
+ super(), this.slideIndex = t2, this.taskId = e2, this.logger = i2, this.isCancel = false, this.tasks = [], this.runningTaskPromises = /* @__PURE__ */ new Set(), this.defaultTimeoutMs = null !== (r2 = Hy(n2)) && void 0 !== r2 ? r2 : 6e4;
33799
33752
  }
33800
33753
  isEmpty() {
33801
33754
  return 0 === this.tasks.length;
@@ -33817,8 +33770,8 @@ void main(void){
33817
33770
  }), this.tasks = [], this.emit("task-cancel", this.cancelError, this.slideIndex));
33818
33771
  }
33819
33772
  whenIdle(t2) {
33820
- return Gy(this, void 0, void 0, function* () {
33821
- const e2 = Vy(t2);
33773
+ return By(this, void 0, void 0, function* () {
33774
+ const e2 = Hy(t2);
33822
33775
  if (void 0 === e2)
33823
33776
  return yield this.waitForRunningTasks(), true;
33824
33777
  let i2;
@@ -33829,7 +33782,7 @@ void main(void){
33829
33782
  });
33830
33783
  }
33831
33784
  waitForRunningTasks() {
33832
- return Gy(this, void 0, void 0, function* () {
33785
+ return By(this, void 0, void 0, function* () {
33833
33786
  for (; this.runningTaskPromises.size > 0; ) {
33834
33787
  const t2 = Array.from(this.runningTaskPromises);
33835
33788
  yield Promise.all(t2.map((t3) => t3.catch(() => {
@@ -33850,10 +33803,10 @@ void main(void){
33850
33803
  }));
33851
33804
  }
33852
33805
  applyAll() {
33853
- return Gy(this, void 0, void 0, function* () {
33806
+ return By(this, void 0, void 0, function* () {
33854
33807
  for (; !this.tasks.every((t2) => "finish" === t2.state); )
33855
33808
  if (this.tasks.some((t2) => "running" === t2.state))
33856
- yield Hy(16);
33809
+ yield ky(16);
33857
33810
  else {
33858
33811
  if (this.tasks.some((t2) => "error" === t2.state)) {
33859
33812
  if (this.lastError)
@@ -33880,12 +33833,12 @@ void main(void){
33880
33833
  });
33881
33834
  }
33882
33835
  createTaskData(t2, e2, i2) {
33883
- return { fn: t2, state: "wait", sub: [], name: e2, timeoutMs: Vy(null == i2 ? void 0 : i2.timeoutMs), cancelled: false };
33836
+ return { fn: t2, state: "wait", sub: [], name: e2, timeoutMs: Hy(null == i2 ? void 0 : i2.timeoutMs), cancelled: false };
33884
33837
  }
33885
33838
  runTask(t2, e2) {
33886
33839
  var i2;
33887
- return Gy(this, void 0, void 0, function* () {
33888
- const n2 = null !== (i2 = t2.timeoutMs) && void 0 !== i2 ? i2 : e2, r2 = Wy();
33840
+ return By(this, void 0, void 0, function* () {
33841
+ const n2 = null !== (i2 = t2.timeoutMs) && void 0 !== i2 ? i2 : e2, r2 = jy();
33889
33842
  let o2;
33890
33843
  t2.abortController = r2;
33891
33844
  try {
@@ -33893,21 +33846,21 @@ void main(void){
33893
33846
  this.trackRunningTask(e3);
33894
33847
  const i3 = [e3];
33895
33848
  if (i3.push(new Promise((e4) => {
33896
- t2.cancelTask = () => e4(jy);
33849
+ t2.cancelTask = () => e4(Uy);
33897
33850
  })), void 0 !== n2) {
33898
33851
  const t3 = new Promise((t4) => {
33899
33852
  o2 = setTimeout(() => {
33900
- t4(zy), r2.abort();
33853
+ t4(Gy), r2.abort();
33901
33854
  }, n2);
33902
33855
  });
33903
33856
  i3.push(t3);
33904
33857
  }
33905
33858
  const s2 = yield Promise.race(i3);
33906
- if (s2 === jy && t2.cancelled)
33859
+ if (s2 === Uy && t2.cancelled)
33907
33860
  return;
33908
- if (s2 === jy)
33861
+ if (s2 === Uy)
33909
33862
  throw new Tm(gm.RuntimeError, `subtask ${t2.name} aborted unexpectedly`);
33910
- if (s2 === zy)
33863
+ if (s2 === Gy)
33911
33864
  throw new Tm(gm.RuntimeError, `subtask ${t2.name} apply timeout after ${n2}ms`);
33912
33865
  } catch (e3) {
33913
33866
  if (t2.cancelled)
@@ -33934,7 +33887,7 @@ void main(void){
33934
33887
  return e2 instanceof Tm ? e2 : e2 instanceof Error ? new Tm(gm.RuntimeError, `subtask ${t2.name} error. ${e2.message}`) : new Tm(gm.RuntimeError, `subtask ${t2.name} error. ${String(e2)}`);
33935
33888
  }
33936
33889
  }
33937
- var Yy = function(t2, e2, i2, n2) {
33890
+ var Vy = function(t2, e2, i2, n2) {
33938
33891
  return new (i2 || (i2 = Promise))(function(r2, o2) {
33939
33892
  function s2(t3) {
33940
33893
  try {
@@ -33959,7 +33912,7 @@ void main(void){
33959
33912
  l2((n2 = n2.apply(t2, e2 || [])).next());
33960
33913
  });
33961
33914
  };
33962
- class qy {
33915
+ class Wy {
33963
33916
  constructor(t2, e2) {
33964
33917
  this.renderer = t2, this.localStorage = e2, this.worker = null, this.outputData = /* @__PURE__ */ new Map(), this.loadingSdfKeys = /* @__PURE__ */ new Set();
33965
33918
  const i2 = new Blob(['\nself.onmessage = function(e) {\n var data = e.data.data;\n var key = e.data.key;\n var height = Math.ceil(e.data.height);\n var width = Math.ceil(e.data.width);\n if (!data || !key) {\n return;\n }\n var maxDis = 0;\n var d = [];\n var p = [];\n var maxInt = Number.MAX_SAFE_INTEGER || 255 * 255 * 255;\n var setD = function(x, y, v) { d[y * width + x] = v; };\n var getD = function(x, y) { return d[y * width + x]; };\n var setP = function(x, y, v) { p[y * width + x] = v; };\n var getP = function(x, y) { return p[y * width + x]; };\n var isContains = function(x, y) { return x >= 0 && x < width && y >= 0 && y < height; };\n var isInterior = function(x, y) { return data[(y * width + x) * 4 + 3] > 10; };\n for (var y = 0; y < height; ++ y) {\n for (var x = 0; x < width; ++ x) {\n var c = isInterior(x, y);\n var t = isContains(x, y - 1) ? isInterior(x, y - 1) : false;\n var b = isContains(x, y + 1) ? isInterior(x, y + 1) : false;\n var l = isContains(x - 1, y) ? isInterior(x - 1, y) : false;\n var r = isContains(x + 1, y) ? isInterior(x + 1, y) : false;\n if (c !== t || c !== b || c !== l || c !== r) {\n setD(x, y, 0);\n setP(x, y, [x, y]);\n } else {\n setD(x, y, maxInt);\n setP(x, y, [-1, -1]);\n }\n }\n }\n \n var f = function (x, y, dir) {\n var d1 = 1;\n var d2 = Math.sqrt(2);\n var dx;\n var dy;\n var od;\n switch (dir) {\n case "TL": dx = -1; dy = -1; od = d2; break;\n case "T": dx = 0; dy = -1; od = d1; break;\n case "TR": dx = 1; dy = -1; od = d2; break;\n case "L": dx = -1; dy = 0; od = d1; break;\n case "R": dx = 1; dy = 0; od = d1; break;\n case "BL": dx = -1; dy = 1; od = d2; break;\n case "B": dx = 0; dy = 1; od = d1; break;\n case "BR": dx = 1; dy = 1; od = d2; break;\n }\n var b = isContains(x + dx, y + dy);\n var cb = b ? getD(x + dx, y + dy) : maxInt;\n if (cb + od < getD(x, y)) {\n var p = b ? getP(x + dx, y + dy) : [-1, -1];\n var dis = Math.sqrt(Math.pow(x - p[0], 2) + Math.pow(y - p[1], 2));\n setP(x, y, p);\n setD(x, y, dis);\n if (dis > maxDis) {\n maxDis = dis;\n }\n }\n };\n \n for (var y = 0; y < height; ++ y) {\n for (var x = 0; x < width; ++ x) {\n var dirs = ["TL", "T", "TR", "L"];\n for (var i = 0; i < dirs.length; ++ i) {\n var dir = dirs[i];\n f(x, y, dir);\n }\n }\n }\n\n for (var y = height - 1; y >= 0; -- y) {\n for (var x = width - 1; x >= 0; -- x) {\n var dirs = ["R", "BL", "B", "BR"];\n for (var i = 0; i < dirs.length; ++ i) {\n var dir = dirs[i];\n f(x, y, dir);\n }\n }\n }\n\n var outputData = [];\n for (var y = 0; y < height; ++ y) {\n for (var x = 0; x < width; ++ x) {\n outputData.push(isInterior(x, y) ? 255: 0);\n outputData.push(0);\n outputData.push(0);\n outputData.push(Math.ceil(getD(x, y) / maxDis * 255));\n }\n }\n self.postMessage({\n key, outputData, maxDis\n });\n};\n'], { type: "text/javascript" });
@@ -34056,7 +34009,7 @@ void main(void){
34056
34009
  return r2.putImageData(new ImageData(Uint8ClampedArray.from(g2), t2, e2), 0, 0), { src: n2.toDataURL("image/png"), maxDis: o2 };
34057
34010
  }
34058
34011
  getSdf(t2, e2, i2) {
34059
- return Yy(this, void 0, void 0, function* () {
34012
+ return Vy(this, void 0, void 0, function* () {
34060
34013
  const n2 = Math.ceil(e2.width), r2 = Math.ceil(e2.height), o2 = Math.ceil(e2.width - t2.width) / 2, s2 = Math.ceil(e2.height - t2.height) / 2;
34061
34014
  let a2 = yield this.localStorage.getItem(`sdf-${i2}-src`), l2 = yield this.localStorage.getItem(`sdf-${i2}-maxDis`);
34062
34015
  if (!(a2 && l2 || this.loadingSdfKeys.has(i2))) {
@@ -34088,7 +34041,7 @@ void main(void){
34088
34041
  null === (t2 = this.worker) || void 0 === t2 || t2.terminate(), this.worker = null;
34089
34042
  }
34090
34043
  }
34091
- var Zy = function(t2, e2, i2, n2) {
34044
+ var Xy = function(t2, e2, i2, n2) {
34092
34045
  return new (i2 || (i2 = Promise))(function(r2, o2) {
34093
34046
  function s2(t3) {
34094
34047
  try {
@@ -34113,23 +34066,23 @@ void main(void){
34113
34066
  l2((n2 = n2.apply(t2, e2 || [])).next());
34114
34067
  });
34115
34068
  };
34116
- class Jy {
34069
+ class Yy {
34117
34070
  constructor(t2, e2, i2, n2, r2, o2, s2, a2, l2, h2, u2, c2, d2, p2, f2, m2, g2, v2, _2) {
34118
- this.loader = t2, this.mode = e2, this.renderer = i2, this.ticker = n2, this.view = r2, this.clock = o2, this.objPoolGroup = s2, this.errorChannel = a2, this.localstorage = l2, this.logger = h2, this.loaderDelegate = u2, this.urlInterrupter = c2, this.isPlayerPaused = d2, this.maxResolution = p2, this.volumeAdjuster = f2, this.forceCanvas = m2, this.globalEventHub = g2, this.enableWebAudio = v2, this.customLinks = _2, this.currentStageIndex = 0, this.cacheCount = d_.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 Uy(n2), this.sdfManager = new qy(i2, l2);
34071
+ this.loader = t2, this.mode = e2, this.renderer = i2, this.ticker = n2, this.view = r2, this.clock = o2, this.objPoolGroup = s2, this.errorChannel = a2, this.localstorage = l2, this.logger = h2, this.loaderDelegate = u2, this.urlInterrupter = c2, this.isPlayerPaused = d2, this.maxResolution = p2, this.volumeAdjuster = f2, this.forceCanvas = m2, this.globalEventHub = g2, this.enableWebAudio = v2, this.customLinks = _2, this.currentStageIndex = 0, this.cacheCount = d_.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 Fy(n2), this.sdfManager = new Wy(i2, l2);
34119
34072
  }
34120
34073
  setResourceData(t2, e2) {
34121
34074
  this.taskId = t2, this.url = e2;
34122
34075
  }
34123
34076
  createCtx(t2) {
34124
34077
  const { task: e2 } = this.stageStates[t2];
34125
- e2.addMTask(() => Zy(this, void 0, void 0, function* () {
34078
+ e2.addMTask(() => Xy(this, void 0, void 0, function* () {
34126
34079
  const e3 = new Xm(this.loader), i2 = new Za.a(), n2 = { taskId: this.taskId, prefix: this.url, mode: this.mode, renderer: this.renderer, graphicsTexture: new ig(this.maxResolution), stageWidth: 0, stageHeight: 0, ticker: this.ticker, timingTargets: new rg(i2), eventHub: i2, view: this.view, medias: /* @__PURE__ */ Object.create(null), lastViewedIndex: 0, conflictTimeNodeManager: new ng(), clock: this.clock, spriteTexture: e3, slideIndex: t2, objectPoolGroup: this.objPoolGroup, hasBackgroundFillShape: false, slideScopeEventHub: new Za.a(), logger: this.logger, sdfManager: this.sdfManager, loaderDelegate: this.loaderDelegate, runningAudio: this.runningAudio, activeMedia: this.activeMedia, isPlayerPaused: this.isPlayerPaused, timingEventHub: new Za.a(), maxResolution: this.maxResolution, animatedIds: /* @__PURE__ */ new Set(), volumeAdjuster: this.volumeAdjuster, forceCanvas: this.forceCanvas, globalEventHub: this.globalEventHub, latestChangeFullscreenTargetId: "", isRendering: false, urlInterrupter: this.urlInterrupter, enableWebAudio: this.enableWebAudio };
34127
34080
  this.stageCtxs[t2] = n2;
34128
34081
  }), "@StagePool[createCtx]");
34129
34082
  }
34130
34083
  loadStageJson(t2) {
34131
34084
  const { task: e2 } = this.stageStates[t2];
34132
- e2.addMTask((i2) => Zy(this, void 0, void 0, function* () {
34085
+ e2.addMTask((i2) => Xy(this, void 0, void 0, function* () {
34133
34086
  var n2;
34134
34087
  const r2 = yield this.loader.fetchJson(`${this.url}/${this.taskId}/jsonOutput/slide-${t2}.json`, i2);
34135
34088
  if ((null === (n2 = this.stageStates[t2]) || void 0 === n2 ? void 0 : n2.task) !== e2)
@@ -34194,7 +34147,7 @@ void main(void){
34194
34147
  let n2 = this.stageJsons[t2];
34195
34148
  const r2 = this.stageCtxs[t2], o2 = null === (i2 = this.customLinks) || void 0 === i2 ? void 0 : i2.filter((e3) => e3.pageIndex === t2);
34196
34149
  n2 = this.insertCustomLinks(n2, o2);
34197
- const s2 = new ky(n2, r2, { x: 0, y: 0 }, e2);
34150
+ const s2 = new Dy(n2, r2, { x: 0, y: 0 }, e2);
34198
34151
  return this.stageImpls[t2] = s2, Promise.resolve();
34199
34152
  }, "@StagePool[createStage]");
34200
34153
  }
@@ -34204,7 +34157,7 @@ void main(void){
34204
34157
  }
34205
34158
  createGraphicsTexture(t2) {
34206
34159
  const { task: e2 } = this.stageStates[t2];
34207
- e2.addMTask(() => Zy(this, void 0, void 0, function* () {
34160
+ e2.addMTask(() => Xy(this, void 0, void 0, function* () {
34208
34161
  const i2 = this.stageCtxs[t2];
34209
34162
  i2.graphicsTexture.pack().forEach((t3, n2) => {
34210
34163
  e2.addSubMTask((e3) => i2.graphicsTexture.render(t3, n2, this.objPoolGroup, 1, e3), "@StagePool[graphicsTexture.render]");
@@ -34213,7 +34166,7 @@ void main(void){
34213
34166
  }
34214
34167
  renderStage(t2) {
34215
34168
  const { task: e2 } = this.stageStates[t2];
34216
- e2.addMTask(() => Zy(this, void 0, void 0, function* () {
34169
+ e2.addMTask(() => Xy(this, void 0, void 0, function* () {
34217
34170
  const i2 = this.stageImpls[t2];
34218
34171
  yield i2.render(e2);
34219
34172
  }), "@StagePool[renderStage]");
@@ -34232,7 +34185,7 @@ void main(void){
34232
34185
  });
34233
34186
  }
34234
34187
  preloadResource(t2) {
34235
- return Zy(this, void 0, void 0, function* () {
34188
+ return Xy(this, void 0, void 0, function* () {
34236
34189
  const e2 = yield this.loader.fetchJson(`${this.url}/${this.taskId}/jsonOutput/slide-${t2}.json`), { coloredSheets: i2, sheets: n2 } = e2, r2 = i2 || n2;
34237
34190
  for (const t3 of r2) {
34238
34191
  yield this.loader.fetchJson(`${this.url}/${this.taskId}/jsonOutput/${t3}.json`);
@@ -34253,7 +34206,7 @@ void main(void){
34253
34206
  });
34254
34207
  let s2;
34255
34208
  try {
34256
- s2 = new Xy(t2, this.taskId, this.logger, this.getStageTaskTimeoutMs());
34209
+ s2 = new zy(t2, this.taskId, this.logger, this.getStageTaskTimeoutMs());
34257
34210
  } catch (t3) {
34258
34211
  return r2(t3), o2;
34259
34212
  }
@@ -34302,7 +34255,7 @@ void main(void){
34302
34255
  return this.stageJsons[t2] || null;
34303
34256
  }
34304
34257
  getStage(t2) {
34305
- return Zy(this, void 0, void 0, function* () {
34258
+ return Xy(this, void 0, void 0, function* () {
34306
34259
  this.currentStageIndex = t2;
34307
34260
  const e2 = this.stageStates[t2];
34308
34261
  return "finish" === (null == e2 ? void 0 : e2.state) && this.stageImpls[t2] ? this.stageImpls[t2] : "load" === (null == e2 ? void 0 : e2.state) ? (yield e2.task.applyAll(), this.stageImpls[t2]) : (yield this.preload(t2, true), this.stageImpls[t2]);
@@ -34312,7 +34265,7 @@ void main(void){
34312
34265
  this.microTaskManager.destroy(), this.runningAudio.clear(), this.sdfManager.destroy();
34313
34266
  }
34314
34267
  }
34315
- const Ky = new class extends $m {
34268
+ const qy = new class extends $m {
34316
34269
  createObject() {
34317
34270
  return document.createElement("img");
34318
34271
  }
@@ -34320,7 +34273,7 @@ void main(void){
34320
34273
  t2.removeAttribute("src");
34321
34274
  }
34322
34275
  }();
34323
- var Qy = function(t2, e2, i2, n2) {
34276
+ var Zy = function(t2, e2, i2, n2) {
34324
34277
  return new (i2 || (i2 = Promise))(function(r2, o2) {
34325
34278
  function s2(t3) {
34326
34279
  try {
@@ -34345,10 +34298,10 @@ void main(void){
34345
34298
  l2((n2 = n2.apply(t2, e2 || [])).next());
34346
34299
  });
34347
34300
  };
34348
- class $y {
34301
+ class Jy {
34349
34302
  constructor(t2) {
34350
34303
  var e2;
34351
- this.logger = t2, this.taskId = "", this.isIndexDBReady = false, this.memoryCache = /* @__PURE__ */ new Map(), null === (e2 = $y.localCache) || void 0 === e2 || e2.ready((t3) => {
34304
+ this.logger = t2, this.taskId = "", this.isIndexDBReady = false, this.memoryCache = /* @__PURE__ */ new Map(), null === (e2 = Jy.localCache) || void 0 === e2 || e2.ready((t3) => {
34352
34305
  t3 || (this.isIndexDBReady = true);
34353
34306
  }).catch(() => {
34354
34307
  t2.warn("local storage not ready", this.taskId);
@@ -34361,24 +34314,24 @@ void main(void){
34361
34314
  this.taskId = t2;
34362
34315
  }
34363
34316
  getItem(t2) {
34364
- return Qy(this, void 0, void 0, function* () {
34317
+ return Zy(this, void 0, void 0, function* () {
34365
34318
  let e2 = null;
34366
- if (this.couldUseIndexDBCache && $y.localCache)
34319
+ if (this.couldUseIndexDBCache && Jy.localCache)
34367
34320
  try {
34368
- e2 = yield Im(() => $y.localCache.getItem(`${this.taskId}/${t2}`), 500);
34321
+ e2 = yield Im(() => Jy.localCache.getItem(`${this.taskId}/${t2}`), 500);
34369
34322
  } catch (t3) {
34370
34323
  }
34371
34324
  return e2 = e2 === Cm ? null : e2, e2 || this.memoryCache.get(t2) || null;
34372
34325
  });
34373
34326
  }
34374
34327
  setItem(t2, e2, i2 = false) {
34375
- return Qy(this, void 0, void 0, function* () {
34328
+ return Zy(this, void 0, void 0, function* () {
34376
34329
  if (!this.couldUseIndexDBCache)
34377
34330
  return i2 && this.memoryCache.set(t2, e2), Promise.resolve();
34378
- if ($y.localCache) {
34331
+ if (Jy.localCache) {
34379
34332
  let n2 = null;
34380
34333
  try {
34381
- n2 = yield Im(() => $y.localCache.setItem(`${this.taskId}/${t2}`, e2).catch(() => {
34334
+ n2 = yield Im(() => Jy.localCache.setItem(`${this.taskId}/${t2}`, e2).catch(() => {
34382
34335
  i2 && this.memoryCache.set(t2, e2);
34383
34336
  }), 500);
34384
34337
  } catch (t3) {
@@ -34389,29 +34342,29 @@ void main(void){
34389
34342
  }
34390
34343
  dispose() {
34391
34344
  var t2;
34392
- this.memoryCache = /* @__PURE__ */ new Map(), this.couldUseIndexDBCache && (null === (t2 = $y.localCache) || void 0 === t2 || t2.keys().then((t3) => {
34345
+ this.memoryCache = /* @__PURE__ */ new Map(), this.couldUseIndexDBCache && (null === (t2 = Jy.localCache) || void 0 === t2 || t2.keys().then((t3) => {
34393
34346
  t3.filter((t4) => t4.indexOf(this.taskId) >= 0).forEach((t4) => {
34394
34347
  var e2;
34395
- null === (e2 = $y.localCache) || void 0 === e2 || e2.removeItem(t4).catch(() => {
34348
+ null === (e2 = Jy.localCache) || void 0 === e2 || e2.removeItem(t4).catch(() => {
34396
34349
  });
34397
34350
  });
34398
34351
  }).catch(() => {
34399
34352
  }));
34400
34353
  }
34401
34354
  }
34402
- $y.localCache = null;
34355
+ Jy.localCache = null;
34403
34356
  try {
34404
- $y.localCache = o.createInstance({ name: "slide_local_cache", driver: o.INDEXEDDB, version: 1 });
34357
+ Jy.localCache = o.createInstance({ name: "slide_local_cache", driver: o.INDEXEDDB, version: 1 });
34405
34358
  } catch (t2) {
34406
34359
  }
34407
- const tx = new Nh.j();
34408
- class ex {
34360
+ const Ky = new Nh.j();
34361
+ class Qy {
34409
34362
  constructor(t2) {
34410
34363
  this.localStorage = t2;
34411
34364
  }
34412
34365
  canvas(t2, e2, i2, n2) {
34413
34366
  let r2, o2, s2, a2 = false, l2 = false;
34414
- t2 && (t2 instanceof Vh.p ? s2 = t2 : (s2 = e2.generateTexture(t2), l2 = true)), s2 ? (r2 = s2.baseTexture.resolution, o2 = s2.frame, a2 = false) : (r2 = e2.resolution, a2 = true, o2 = tx, o2.width = e2.width, o2.height = e2.height, e2.renderTexture.bind(null));
34367
+ t2 && (t2 instanceof Vh.p ? s2 = t2 : (s2 = e2.generateTexture(t2), l2 = true)), s2 ? (r2 = s2.baseTexture.resolution, o2 = s2.frame, a2 = false) : (r2 = e2.resolution, a2 = true, o2 = Ky, o2.width = e2.width, o2.height = e2.height, e2.renderTexture.bind(null));
34415
34368
  const h2 = Math.floor(o2.width * r2 + 1e-4), u2 = Math.floor(o2.height * r2 + 1e-4);
34416
34369
  let c2 = document.createElement("canvas");
34417
34370
  c2.width = h2, c2.height = u2;
@@ -34422,7 +34375,7 @@ void main(void){
34422
34375
  d2.putImageData(i2, 0, 0);
34423
34376
  else {
34424
34377
  const t3 = d2.getImageData(0, 0, h2, u2), i3 = new Uint8Array(4 * h2 * u2), { gl: s3 } = e2;
34425
- s3.readPixels(o2.x * r2, o2.y * r2, h2, u2, s3.RGBA, s3.UNSIGNED_BYTE, i3), ex.arrayPostDivide(i3, t3.data), d2.putImageData(t3, 0, 0), n2 && this.localStorage.setItem(n2, t3).catch(() => {
34378
+ s3.readPixels(o2.x * r2, o2.y * r2, h2, u2, s3.RGBA, s3.UNSIGNED_BYTE, i3), Qy.arrayPostDivide(i3, t3.data), d2.putImageData(t3, 0, 0), n2 && this.localStorage.setItem(n2, t3).catch(() => {
34426
34379
  });
34427
34380
  }
34428
34381
  if (a2) {
@@ -34440,7 +34393,7 @@ void main(void){
34440
34393
  }
34441
34394
  }
34442
34395
  }
34443
- class ix extends Za.a {
34396
+ class $y extends Za.a {
34444
34397
  constructor() {
34445
34398
  super(...arguments), this._volume = 0.5;
34446
34399
  }
@@ -34451,7 +34404,7 @@ void main(void){
34451
34404
  t2 < 0 && (t2 = 0), t2 > 1 && (t2 = 1), this._volume = t2, this.emit("update", this._volume);
34452
34405
  }
34453
34406
  }
34454
- var nx = function(t2, e2, i2, n2) {
34407
+ var tx = function(t2, e2, i2, n2) {
34455
34408
  return new (i2 || (i2 = Promise))(function(r2, o2) {
34456
34409
  function s2(t3) {
34457
34410
  try {
@@ -34477,8 +34430,8 @@ void main(void){
34477
34430
  });
34478
34431
  };
34479
34432
  Ph.skipHello();
34480
- const rx = { 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", gallery: "Gallery", switch: "Switch", prism: "Prism", doors: "Doors" }, ox = { 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", mediaStop: "mediaStop", requestNextStep: "requestNextStep", requestNextSlide: "requestNextSlide", requestPrevSlide: "requestPrevSlide", requestGotoSlide: "requestGotoSlide", requestOpenUrl: "requestOpenUrl", userInput: "userInput", fullscreenChange: "fullscreenChange", changeLocalFullscreenState: "changeLocalFullscreenState", useraddLink: "useraddLink" };
34481
- class sx extends Za.a {
34433
+ const ex = { 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", gallery: "Gallery", switch: "Switch", prism: "Prism", doors: "Doors" }, ix = { 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", mediaStop: "mediaStop", requestNextStep: "requestNextStep", requestNextSlide: "requestNextSlide", requestPrevSlide: "requestPrevSlide", requestGotoSlide: "requestGotoSlide", requestOpenUrl: "requestOpenUrl", userInput: "userInput", fullscreenChange: "fullscreenChange", changeLocalFullscreenState: "changeLocalFullscreenState", useraddLink: "useraddLink" };
34434
+ class nx extends Za.a {
34482
34435
  constructor(t2, e2 = {}) {
34483
34436
  super(), this.errorChannel = new Za.a(), this.transactionPlayer = null, this.isForward = true, this.drawCall = 0, this.scale = 1, this._isPaused = false, this.maxResolution = new Nh.g(0, 0), this.transitionResolution = new Nh.g(0, 0), this.isNVIDIA = false, this.fps = new bm(), this.designWidth = 0, this.designHeight = 0, this.currentIndex = 0, this.slideCount = 0, this.runtime = { drawCall: 0, fps: 0 }, this.globalEventHub = new Za.a(), this.globalVideoBackground = new Jd(), this.globalVideoSprite = new ep(), this.onMousemoveTimeout = null, this.cacheFunctionMap = /* @__PURE__ */ new Map(), this.enableAutoForward = false, this.isPlayerPaused = () => this._isPaused, this.onWebGLLost = () => {
34484
34437
  this.errorChannel.emit("error", new Tm(gm.CanvasCrash, "webgl context lost."));
@@ -34500,7 +34453,7 @@ void main(void){
34500
34453
  this.globalVideoSprite.texture = e3, this.globalVideoSprite.width = s2, this.globalVideoSprite.height = a2, this.globalVideoSprite.position.x = r2, this.globalVideoSprite.position.y = o2, this.globalVideoBackground.addChild(this.globalVideoSprite), this.globalEventHub.emit("onFullscreenChange", { status: true, targetId: n3, slideIndex: this.currentIndex }), this.clearFullscreenEventListenersWithAppView();
34501
34454
  const l2 = { handleEvent: () => {
34502
34455
  var t4;
34503
- null === (t4 = this.currentStage) || void 0 === t4 || t4.ctx.eventHub.emit(ox.userInput);
34456
+ null === (t4 = this.currentStage) || void 0 === t4 || t4.ctx.eventHub.emit(ix.userInput);
34504
34457
  } };
34505
34458
  if (this.app.view.addEventListener("pointerdown", l2, false), this.cacheFunctionMap.set("pointerdown", l2), d_.isDesktop()) {
34506
34459
  const t4 = { handleEvent: () => {
@@ -34538,8 +34491,8 @@ void main(void){
34538
34491
  } catch (t4) {
34539
34492
  this.logger.error("removeChild error: PPTPlayer:1062", this.taskId);
34540
34493
  }
34541
- this.globalEventHub.emit("onFullscreenChange", { status: false, slideIndex: this.currentIndex, targetId: null === (e3 = this.currentStage) || void 0 === e3 ? void 0 : e3.ctx.latestChangeFullscreenTargetId }), this.clearFullscreenEventListenersWithAppView(), t3 && this.emit(ox.changeLocalFullscreenState, { status: false, slideIndex: this.currentIndex, targetId: null === (i3 = this.currentStage) || void 0 === i3 ? void 0 : i3.ctx.latestChangeFullscreenTargetId });
34542
- }, this.logger = t2.logger, this.tracker = t2.tracker, this.mode = t2.mode, this.volumeAdjuster = t2.volumeAdjuster, this.localStorage = new $y(this.logger), this.cachedExtract = new ex(this.localStorage), this.enableWebAudio = !!$a()(t2.enableWebAudio) || t2.enableWebAudio, this.enableAutoForward = !$a()(t2.enableAutoForward) && t2.enableAutoForward, this.config = { minFPS: $a()(e2.minFPS) ? 30 : e2.minFPS, maxFPS: $a()(e2.maxFPS) ? 40 : e2.maxFPS, resolution: $a()(e2.resolution) ? 1 : e2.resolution, autoFPS: !$a()(e2.autoFPS) && e2.autoFPS, autoResolution: !$a()(e2.autoResolution) && e2.autoResolution, transactionBgColor: $a()(e2.transactionBgColor) ? 0 : e2.transactionBgColor, maxResolutionLevel: this.getMaxResolution(e2.maxResolutionLevel), forceCanvas: !$a()(e2.forceCanvas) && e2.forceCanvas, enableNvidiaDetect: !$a()(e2.enableNvidiaDetect) && e2.enableNvidiaDetect, transitionResolutionLevel: this.getMaxResolution(e2.transitionResolutionLevel), antialias: !!$a()(e2.antialias) || e2.antialias }, this.updateMaxResolutionLevel(this.config.maxResolutionLevel), this.updateTransitionResolutionLevel(this.config.transitionResolutionLevel), this.loader = new Um(this.localStorage, t2.useLocalCache, this.logger, this.tracker, t2.resourceTimeout, t2.loadDelegate, t2.urlInterrupter, t2.resourceMaxRetries, t2.onResourceMaxRetries);
34494
+ this.globalEventHub.emit("onFullscreenChange", { status: false, slideIndex: this.currentIndex, targetId: null === (e3 = this.currentStage) || void 0 === e3 ? void 0 : e3.ctx.latestChangeFullscreenTargetId }), this.clearFullscreenEventListenersWithAppView(), t3 && this.emit(ix.changeLocalFullscreenState, { status: false, slideIndex: this.currentIndex, targetId: null === (i3 = this.currentStage) || void 0 === i3 ? void 0 : i3.ctx.latestChangeFullscreenTargetId });
34495
+ }, this.logger = t2.logger, this.tracker = t2.tracker, this.mode = t2.mode, this.volumeAdjuster = t2.volumeAdjuster, this.localStorage = new Jy(this.logger), this.cachedExtract = new Qy(this.localStorage), this.enableWebAudio = !!$a()(t2.enableWebAudio) || t2.enableWebAudio, this.enableAutoForward = !$a()(t2.enableAutoForward) && t2.enableAutoForward, this.config = { minFPS: $a()(e2.minFPS) ? 30 : e2.minFPS, maxFPS: $a()(e2.maxFPS) ? 40 : e2.maxFPS, resolution: $a()(e2.resolution) ? 1 : e2.resolution, autoFPS: !$a()(e2.autoFPS) && e2.autoFPS, autoResolution: !$a()(e2.autoResolution) && e2.autoResolution, transactionBgColor: $a()(e2.transactionBgColor) ? 0 : e2.transactionBgColor, maxResolutionLevel: this.getMaxResolution(e2.maxResolutionLevel), forceCanvas: !$a()(e2.forceCanvas) && e2.forceCanvas, enableNvidiaDetect: !$a()(e2.enableNvidiaDetect) && e2.enableNvidiaDetect, transitionResolutionLevel: this.getMaxResolution(e2.transitionResolutionLevel), antialias: !!$a()(e2.antialias) || e2.antialias }, this.updateMaxResolutionLevel(this.config.maxResolutionLevel), this.updateTransitionResolutionLevel(this.config.transitionResolutionLevel), this.loader = new Um(this.localStorage, t2.useLocalCache, this.logger, this.tracker, t2.resourceTimeout, t2.loadDelegate, t2.urlInterrupter, t2.resourceMaxRetries, t2.onResourceMaxRetries);
34543
34496
  const i2 = Ph.isWebGLSupported();
34544
34497
  this.app = new Wh({ antialias: this.config.antialias, autoDensity: false, backgroundColor: 16777215, forceCanvas: this.config.forceCanvas || !i2 }), globalThis.__PIXI_APP__ = this.app, this.tracker({ name: "slidePlayerCreate", result: "", reason: "", payload: { webgl: i2, resolution: this.config.resolution, minFPS: this.config.minFPS, maxFPS: this.config.maxFPS, maxResolutionLevel: this.config.maxResolutionLevel, forceCanvas: this.config.forceCanvas } }), this.updateConfig(this.config), this.app.ticker.maxFPS = 60, this.app.ticker.minFPS = this.config.minFPS, this.app.ticker.maxFPS = this.config.maxFPS, this.app.view.style.zIndex = "1", this.app.stage.sortableChildren = true;
34545
34498
  const n2 = this.app.renderer;
@@ -34561,15 +34514,15 @@ void main(void){
34561
34514
  }
34562
34515
  }), this.app.ticker.add(() => {
34563
34516
  this.runtime.drawCall = this.drawCall, this.runtime.fps = Math.floor(this.app.ticker.minFPS), this.drawCall = 0;
34564
- }, null, Dh.c.LOW), this.clock = new Hm(this.app.ticker), this.objPoolGroup = Mm(), this.stagePool = new Jy(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, t2.urlInterrupter, this.isPlayerPaused, this.maxResolution, this.volumeAdjuster, this.config.forceCanvas, this.globalEventHub, this.enableWebAudio, t2.customLinks), this.app.view.addEventListener("webglcontextlost", this.onWebGLLost);
34517
+ }, null, Dh.c.LOW), this.clock = new Hm(this.app.ticker), this.objPoolGroup = Mm(), this.stagePool = new Yy(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, t2.urlInterrupter, this.isPlayerPaused, this.maxResolution, this.volumeAdjuster, this.config.forceCanvas, this.globalEventHub, this.enableWebAudio, t2.customLinks), this.app.view.addEventListener("webglcontextlost", this.onWebGLLost);
34565
34518
  try {
34566
34519
  this.config.forceCanvas || (this.transactionPlayer = new Ih());
34567
34520
  } catch (t3) {
34568
34521
  /Error creating WebGL context/.test(t3.message) ? this.errorChannel.emit("error", new Tm(gm.CanvasCrash, "webgl context lost.")) : this.errorChannel.emit("error", new Tm(gm.RuntimeWarn, t3.message));
34569
34522
  }
34570
34523
  this.globalEventHub.on("requestFullscreen", this.onRequestFullscreenVideo), this.globalEventHub.on("requestCancelFullscreen", this.onRequestCancelFullscreenVideo), "addLink" === this.mode && this.globalEventHub.on("user-add-click", (t3) => {
34571
- this.emit(ox.useraddLink, t3);
34572
- }), this.enableAutoForward && this.on(ox.mainSeqStepEnd, () => {
34524
+ this.emit(ix.useraddLink, t3);
34525
+ }), this.enableAutoForward && this.on(ix.mainSeqStepEnd, () => {
34573
34526
  this.startAutoForwardTimer(this.currentStage);
34574
34527
  });
34575
34528
  }
@@ -34585,7 +34538,7 @@ void main(void){
34585
34538
  return (null === (t2 = this.currentStage) || void 0 === t2 ? void 0 : t2.json.prevIndex) ? this.currentStage.json.prevIndex : this.currentIndex - 1;
34586
34539
  }
34587
34540
  getMaxResolution(t2) {
34588
- return !$a()(t2) && Number.isInteger(t2) ? (t2 < 1 && (t2 = 1), t2 > 4 && (t2 = 4), t2) : sx.platform.isAndroid() || sx.platform.isIOS() ? 2 : 4;
34541
+ return !$a()(t2) && Number.isInteger(t2) ? (t2 < 1 && (t2 = 1), t2 > 4 && (t2 = 4), t2) : nx.platform.isAndroid() || nx.platform.isIOS() ? 2 : 4;
34589
34542
  }
34590
34543
  updateMaxResolutionLevel(t2) {
34591
34544
  t2 < 0 && (t2 = 0), t2 > 4 && (t2 = 4);
@@ -34601,7 +34554,7 @@ void main(void){
34601
34554
  $a()(t2.maxFPS) || $a()(t2.minFPS) || (this.config.maxFPS = t2.maxFPS, this.app.ticker.maxFPS = t2.maxFPS, this.config.minFPS = t2.minFPS, this.app.ticker.minFPS = t2.minFPS), $a()(t2.resolution) || (this.config.resolution = t2.resolution, this.updateResolution(this.scale * this.config.resolution)), $a()(t2.autoFPS) || (this.config.autoFPS = t2.autoFPS), $a()(t2.autoResolution) || (this.config.autoResolution = t2.autoResolution), $a()(t2.transactionBgColor) || (this.config.transactionBgColor = t2.transactionBgColor), this.taskId && this.logger.info("ppt player update config: " + JSON.stringify(this.config), this.taskId), $a()(t2.maxResolutionLevel) || (this.config.maxResolutionLevel = t2.maxResolutionLevel, this.updateMaxResolutionLevel(this.config.maxResolutionLevel)), $a()(t2.transitionResolutionLevel) || (this.config.transitionResolutionLevel = t2.transitionResolutionLevel, this.updateTransitionResolutionLevel(this.config.transitionResolutionLevel));
34602
34555
  }
34603
34556
  preload(t2) {
34604
- return nx(this, void 0, void 0, function* () {
34557
+ return tx(this, void 0, void 0, function* () {
34605
34558
  if (t2 < 1 || t2 > this.slideCount)
34606
34559
  return;
34607
34560
  const e2 = Date.now();
@@ -34609,7 +34562,7 @@ void main(void){
34609
34562
  });
34610
34563
  }
34611
34564
  preloadResource(t2) {
34612
- return nx(this, void 0, void 0, function* () {
34565
+ return tx(this, void 0, void 0, function* () {
34613
34566
  if (t2 < 1 || t2 > this.slideCount)
34614
34567
  return;
34615
34568
  const e2 = Date.now();
@@ -34626,7 +34579,7 @@ void main(void){
34626
34579
  e2.forEach((e3) => {
34627
34580
  t2.on(e3, (...t3) => {
34628
34581
  var i2, n2, r2, o2;
34629
- e3 === ox.requestGotoSlide && t3[0] !== this.currentIndex && (null === (n2 = null === (i2 = this.currentStage) || void 0 === i2 ? void 0 : i2.timing) || void 0 === n2 || n2.setMainSeqStep(0, "start"), null === (o2 = null === (r2 = this.currentStage) || void 0 === r2 ? void 0 : r2.timing) || void 0 === o2 || o2.destroy()), this.emit(e3, ...t3);
34582
+ e3 === ix.requestGotoSlide && t3[0] !== this.currentIndex && (null === (n2 = null === (i2 = this.currentStage) || void 0 === i2 ? void 0 : i2.timing) || void 0 === n2 || n2.setMainSeqStep(0, "start"), null === (o2 = null === (r2 = this.currentStage) || void 0 === r2 ? void 0 : r2.timing) || void 0 === o2 || o2.destroy()), this.emit(e3, ...t3);
34630
34583
  });
34631
34584
  });
34632
34585
  }
@@ -34640,20 +34593,20 @@ void main(void){
34640
34593
  this.clearAutoForwardTimer();
34641
34594
  const i2 = null === (e2 = t2.json.transition) || void 0 === e2 ? void 0 : e2.advTm;
34642
34595
  $a()(i2) || (this.autoForwardTimer = this.clock.setTimeout(() => {
34643
- this.view && "running" !== this.mainSeqState() && (this.mainSeqHasNextStep() ? this.emit(ox.requestNextStep) : this.currentIndex < this.slideCount ? this.emit(ox.requestNextSlide, false) : this.clearAutoForwardTimer());
34596
+ this.view && "running" !== this.mainSeqState() && (this.mainSeqHasNextStep() ? this.emit(ix.requestNextStep) : this.currentIndex < this.slideCount ? this.emit(ix.requestNextSlide, false) : this.clearAutoForwardTimer());
34644
34597
  }, i2 / (this.mainSeqLength() + 1)));
34645
34598
  }
34646
34599
  renderSlide(t2) {
34647
34600
  var e2, i2, n2;
34648
- return nx(this, void 0, void 0, function* () {
34601
+ return tx(this, void 0, void 0, function* () {
34649
34602
  if (this.clearAutoForwardTimer(), this._isPaused)
34650
34603
  return void this.logger.info("ppt play prevent render slide with paused state", this.taskId);
34651
34604
  const r2 = this.currentIndex, o2 = Date.now();
34652
- this.logger.info("render slide " + t2, this.taskId), this.emit(ox.renderStart, t2);
34605
+ this.logger.info("render slide " + t2, this.taskId), this.emit(ix.renderStart, t2);
34653
34606
  const s2 = yield this.stagePool.getStage(t2), a2 = `snapshot-${t2}-${this.isForward ? "start" : "end"}`, l2 = yield this.localStorage.getItem(a2);
34654
34607
  if (!s2)
34655
34608
  return;
34656
- s2.ctx.isRendering = true, this.translateEvent(s2.ctx.eventHub, [ox.mainSeqStepChange, ox.mainSeqStateChange, ox.hyperlinkTrigger, ox.interactiveSeqAction, ox.mainSeqStepStart, ox.mainSeqStepEnd, ox.animateStart, ox.animateEnd, ox.mediaPlay, ox.mediaPause, ox.mediaSeek, ox.mediaStop, ox.requestGotoSlide, ox.requestOpenUrl, ox.requestNextSlide, ox.requestPrevSlide, ox.interactiveSeqStateChange, ox.userInput, ox.fullscreenChange, ox.changeLocalFullscreenState]), this.currentIndex = Number(t2);
34609
+ s2.ctx.isRendering = true, this.translateEvent(s2.ctx.eventHub, [ix.mainSeqStepChange, ix.mainSeqStateChange, ix.hyperlinkTrigger, ix.interactiveSeqAction, ix.mainSeqStepStart, ix.mainSeqStepEnd, ix.animateStart, ix.animateEnd, ix.mediaPlay, ix.mediaPause, ix.mediaSeek, ix.mediaStop, ix.requestGotoSlide, ix.requestOpenUrl, ix.requestNextSlide, ix.requestPrevSlide, ix.interactiveSeqStateChange, ix.userInput, ix.fullscreenChange, ix.changeLocalFullscreenState]), this.currentIndex = Number(t2);
34657
34610
  const { width: h2, height: u2, slideCount: c2 } = s2.json;
34658
34611
  this.slideCount = c2, this.designWidth = h2, this.designHeight = u2, null === (e2 = this.currentStage) || void 0 === e2 || e2.clearOnSlideChange();
34659
34612
  const d2 = this.currentStage;
@@ -34686,7 +34639,7 @@ void main(void){
34686
34639
  }
34687
34640
  null === (n2 = this.transactionPlayer) || void 0 === n2 || n2.dispose();
34688
34641
  }
34689
- this.isForward ? yield s2.startTiming() : s2.setMainSeqApplied(), s2.ctx.slideScopeEventHub.emit("slide-render", s2.ctx.slideIndex, this.isForward), this.emit(ox.renderEnd, t2), this.emit(ox.slideChange, t2), s2.ctx.isRendering = false, this.preload(t2 + 1).catch((e3) => {
34642
+ this.isForward ? yield s2.startTiming() : s2.setMainSeqApplied(), s2.ctx.slideScopeEventHub.emit("slide-render", s2.ctx.slideIndex, this.isForward), this.emit(ix.renderEnd, t2), this.emit(ix.slideChange, t2), s2.ctx.isRendering = false, this.preload(t2 + 1).catch((e3) => {
34690
34643
  e3 instanceof Om || this.errorChannel.emit("error", Tm.transform(e3), t2 + 1);
34691
34644
  }), this.preload(t2 - 1).catch((e3) => {
34692
34645
  e3 instanceof Om || this.errorChannel.emit("error", Tm.transform(e3), t2 - 1);
@@ -34702,7 +34655,7 @@ void main(void){
34702
34655
  return new b(a2);
34703
34656
  }
34704
34657
  renderToBase64(t2, e2, i2) {
34705
- return nx(this, void 0, void 0, function* () {
34658
+ return tx(this, void 0, void 0, function* () {
34706
34659
  const n2 = yield this.stagePool.getStage(t2);
34707
34660
  if (n2) {
34708
34661
  const { width: r2, height: o2 } = n2.json;
@@ -34716,7 +34669,7 @@ void main(void){
34716
34669
  });
34717
34670
  }
34718
34671
  renderMainSeqToBase64(t2, e2, i2) {
34719
- return nx(this, void 0, void 0, function* () {
34672
+ return tx(this, void 0, void 0, function* () {
34720
34673
  const n2 = [], r2 = yield this.stagePool.getStage(t2);
34721
34674
  if (r2.createTiming(), r2) {
34722
34675
  const { width: t3, height: o2 } = r2.json;
@@ -34737,7 +34690,7 @@ void main(void){
34737
34690
  });
34738
34691
  }
34739
34692
  snapshotWithTimingEnd(t2) {
34740
- return nx(this, void 0, void 0, function* () {
34693
+ return tx(this, void 0, void 0, function* () {
34741
34694
  const e2 = yield this.stagePool.getStage(t2);
34742
34695
  if (e2) {
34743
34696
  const { width: i2, height: n2 } = e2.json;
@@ -34761,9 +34714,9 @@ void main(void){
34761
34714
  initTransactionPlayer(t2) {
34762
34715
  var e2, i2, n2, r2, o2;
34763
34716
  const s2 = null === (e2 = this.view) || void 0 === e2 ? void 0 : e2.parentElement;
34764
- if (this.view && s2 && rx[t2.type] && this.transactionPlayer) {
34717
+ if (this.view && s2 && ex[t2.type] && this.transactionPlayer) {
34765
34718
  const e3 = null === (i2 = this.transactionPlayer) || void 0 === i2 ? void 0 : i2.renderer.domElement;
34766
- this.transactionPlayer.initPlayer({ reverse: !this.isForward, stageWidth: this.view.width, stageHeight: this.view.height, presetType: rx[t2.type], duration: null === (r2 = null === (n2 = this.currentStage) || void 0 === n2 ? void 0 : n2.json.transition) || void 0 === r2 ? void 0 : r2.dur, delay: 0, clearColor: this.config.transactionBgColor, maxFPS: Math.ceil(null !== (o2 = this.config.maxFPS) && void 0 !== o2 ? o2 : 60), options: t2.options }), e3 && (e3.style.position = "absolute", e3.style.zIndex = "9", e3.style.left = "0", e3.style.top = "0", e3.style.width = this.view.style.width, e3.style.height = this.view.style.height), s2.appendChild(e3);
34719
+ this.transactionPlayer.initPlayer({ reverse: !this.isForward, stageWidth: this.view.width, stageHeight: this.view.height, presetType: ex[t2.type], duration: null === (r2 = null === (n2 = this.currentStage) || void 0 === n2 ? void 0 : n2.json.transition) || void 0 === r2 ? void 0 : r2.dur, delay: 0, clearColor: this.config.transactionBgColor, maxFPS: Math.ceil(null !== (o2 = this.config.maxFPS) && void 0 !== o2 ? o2 : 60), options: t2.options }), e3 && (e3.style.position = "absolute", e3.style.zIndex = "9", e3.style.left = "0", e3.style.top = "0", e3.style.width = this.view.style.width, e3.style.height = this.view.style.height), s2.appendChild(e3);
34767
34720
  }
34768
34721
  }
34769
34722
  scaleView(t2, e2, i2) {
@@ -34853,7 +34806,7 @@ void main(void){
34853
34806
  }
34854
34807
  setMediaState(t2, e2, i2) {
34855
34808
  var n2;
34856
- return nx(this, void 0, void 0, function* () {
34809
+ return tx(this, void 0, void 0, function* () {
34857
34810
  yield null === (n2 = this.currentStage) || void 0 === n2 ? void 0 : n2.setMediaState(t2, e2, i2);
34858
34811
  });
34859
34812
  }
@@ -34881,7 +34834,7 @@ void main(void){
34881
34834
  }
34882
34835
  static clearLocalCache() {
34883
34836
  var t2;
34884
- null === (t2 = $y.localCache) || void 0 === t2 || t2.clear().catch(() => {
34837
+ null === (t2 = Jy.localCache) || void 0 === t2 || t2.clear().catch(() => {
34885
34838
  });
34886
34839
  }
34887
34840
  clearFullscreenEventListenersWithAppView() {
@@ -34895,24 +34848,24 @@ void main(void){
34895
34848
  destroy() {
34896
34849
  var t2;
34897
34850
  try {
34898
- this.clearAutoForwardTimer(), this.app.view.removeEventListener("webglcontextlost", this.onWebGLLost), this.app.renderer.filter.texturePool.clear(true), tg.collectObjectByGroup(this.objPoolGroup), Ky.collectObjectByGroup(this.objPoolGroup), null === (t2 = this.transactionPlayer) || void 0 === t2 || t2.destroy(), this.loader.destroy(), this.fps.destroy(), this.stagePool.destroyAllStage(), this.stagePool.destroy(), this.app.renderer.gl.getExtension("WEBGL_lose_context").loseContext(), this.app.destroy(true, { children: true, texture: true, baseTexture: true }), this.tracker({ name: "slidePlayerDestroy", result: "", reason: "", payload: {} });
34851
+ this.clearAutoForwardTimer(), this.app.view.removeEventListener("webglcontextlost", this.onWebGLLost), this.app.renderer.filter.texturePool.clear(true), tg.collectObjectByGroup(this.objPoolGroup), qy.collectObjectByGroup(this.objPoolGroup), null === (t2 = this.transactionPlayer) || void 0 === t2 || t2.destroy(), this.loader.destroy(), this.fps.destroy(), this.stagePool.destroyAllStage(), this.stagePool.destroy(), this.app.renderer.gl.getExtension("WEBGL_lose_context").loseContext(), this.app.destroy(true, { children: true, texture: true, baseTexture: true }), this.tracker({ name: "slidePlayerDestroy", result: "", reason: "", payload: {} });
34899
34852
  } catch (t3) {
34900
34853
  }
34901
34854
  }
34902
34855
  }
34903
- sx.platform = d_, sx.RtcAudioClazz = null;
34904
- var ax = /* @__PURE__ */ new Map();
34905
- var lx, hx = i(136), ux = i.n(hx), cx = i(24), dx = i.n(cx), px = i(50), fx = i.n(px), mx = [], gx = "ResizeObserver loop completed with undelivered notifications.";
34856
+ nx.platform = d_, nx.RtcAudioClazz = null;
34857
+ var rx = /* @__PURE__ */ new Map();
34858
+ var ox, sx = i(136), ax = i.n(sx), lx = i(24), hx = i.n(lx), ux = i(50), cx = i.n(ux), dx = [], px = "ResizeObserver loop completed with undelivered notifications.";
34906
34859
  !function(t2) {
34907
34860
  t2.BORDER_BOX = "border-box", t2.CONTENT_BOX = "content-box", t2.DEVICE_PIXEL_CONTENT_BOX = "device-pixel-content-box";
34908
- }(lx || (lx = {}));
34909
- var vx, _x = function(t2) {
34861
+ }(ox || (ox = {}));
34862
+ var fx, mx = function(t2) {
34910
34863
  return Object.freeze(t2);
34911
- }, yx = function(t2, e2) {
34912
- this.inlineSize = t2, this.blockSize = e2, _x(this);
34913
- }, xx = function() {
34864
+ }, gx = function(t2, e2) {
34865
+ this.inlineSize = t2, this.blockSize = e2, mx(this);
34866
+ }, vx = function() {
34914
34867
  function t2(t3, e2, i2, n2) {
34915
- return this.x = t3, this.y = e2, this.width = i2, this.height = n2, this.top = this.y, this.left = this.x, this.bottom = this.top + this.height, this.right = this.left + this.width, _x(this);
34868
+ return this.x = t3, this.y = e2, this.width = i2, this.height = n2, this.top = this.y, this.left = this.x, this.bottom = this.top + this.height, this.right = this.left + this.width, mx(this);
34916
34869
  }
34917
34870
  return t2.prototype.toJSON = function() {
34918
34871
  var t3 = this;
@@ -34920,59 +34873,59 @@ void main(void){
34920
34873
  }, t2.fromRect = function(e2) {
34921
34874
  return new t2(e2.x, e2.y, e2.width, e2.height);
34922
34875
  }, t2;
34923
- }(), bx = function(t2) {
34876
+ }(), _x = function(t2) {
34924
34877
  return t2 instanceof SVGElement && "getBBox" in t2;
34925
- }, Tx = function(t2) {
34926
- if (bx(t2)) {
34878
+ }, yx = function(t2) {
34879
+ if (_x(t2)) {
34927
34880
  var e2 = t2.getBBox(), i2 = e2.width, n2 = e2.height;
34928
34881
  return !i2 && !n2;
34929
34882
  }
34930
34883
  var r2 = t2, o2 = r2.offsetWidth, s2 = r2.offsetHeight;
34931
34884
  return !(o2 || s2 || t2.getClientRects().length);
34932
- }, Sx = function(t2) {
34885
+ }, xx = function(t2) {
34933
34886
  var e2;
34934
34887
  if (t2 instanceof Element)
34935
34888
  return true;
34936
34889
  var i2 = null === (e2 = null == t2 ? void 0 : t2.ownerDocument) || void 0 === e2 ? void 0 : e2.defaultView;
34937
34890
  return !!(i2 && t2 instanceof i2.Element);
34938
- }, Ex = "undefined" != typeof window ? window : {}, wx = /* @__PURE__ */ new WeakMap(), Ax = /auto|scroll/, Mx = /^tb|vertical/, Cx = /msie|trident/i.test(Ex.navigator && Ex.navigator.userAgent), Rx = function(t2) {
34891
+ }, bx = "undefined" != typeof window ? window : {}, Tx = /* @__PURE__ */ new WeakMap(), Sx = /auto|scroll/, Ex = /^tb|vertical/, wx = /msie|trident/i.test(bx.navigator && bx.navigator.userAgent), Ax = function(t2) {
34939
34892
  return parseFloat(t2 || "0");
34893
+ }, Mx = function(t2, e2, i2) {
34894
+ return void 0 === t2 && (t2 = 0), void 0 === e2 && (e2 = 0), void 0 === i2 && (i2 = false), new gx((i2 ? e2 : t2) || 0, (i2 ? t2 : e2) || 0);
34895
+ }, Cx = mx({ devicePixelContentBoxSize: Mx(), borderBoxSize: Mx(), contentBoxSize: Mx(), contentRect: new vx(0, 0, 0, 0) }), Rx = function(t2, e2) {
34896
+ if (void 0 === e2 && (e2 = false), Tx.has(t2) && !e2)
34897
+ return Tx.get(t2);
34898
+ if (yx(t2))
34899
+ return Tx.set(t2, Cx), Cx;
34900
+ var i2 = getComputedStyle(t2), n2 = _x(t2) && t2.ownerSVGElement && t2.getBBox(), r2 = !wx && "border-box" === i2.boxSizing, o2 = Ex.test(i2.writingMode || ""), s2 = !n2 && Sx.test(i2.overflowY || ""), a2 = !n2 && Sx.test(i2.overflowX || ""), l2 = n2 ? 0 : Ax(i2.paddingTop), h2 = n2 ? 0 : Ax(i2.paddingRight), u2 = n2 ? 0 : Ax(i2.paddingBottom), c2 = n2 ? 0 : Ax(i2.paddingLeft), d2 = n2 ? 0 : Ax(i2.borderTopWidth), p2 = n2 ? 0 : Ax(i2.borderRightWidth), f2 = n2 ? 0 : Ax(i2.borderBottomWidth), m2 = c2 + h2, g2 = l2 + u2, v2 = (n2 ? 0 : Ax(i2.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, S2 = n2 ? n2.width : Ax(i2.width) - b2 - x2, E2 = n2 ? n2.height : Ax(i2.height) - T2 - y2, w2 = S2 + m2 + x2 + v2, A2 = E2 + g2 + y2 + _2, M2 = mx({ devicePixelContentBoxSize: Mx(Math.round(S2 * devicePixelRatio), Math.round(E2 * devicePixelRatio), o2), borderBoxSize: Mx(w2, A2, o2), contentBoxSize: Mx(S2, E2, o2), contentRect: new vx(c2, l2, S2, E2) });
34901
+ return Tx.set(t2, M2), M2;
34940
34902
  }, Ix = function(t2, e2, i2) {
34941
- return void 0 === t2 && (t2 = 0), void 0 === e2 && (e2 = 0), void 0 === i2 && (i2 = false), new yx((i2 ? e2 : t2) || 0, (i2 ? t2 : e2) || 0);
34942
- }, Px = _x({ devicePixelContentBoxSize: Ix(), borderBoxSize: Ix(), contentBoxSize: Ix(), contentRect: new xx(0, 0, 0, 0) }), Ox = function(t2, e2) {
34943
- if (void 0 === e2 && (e2 = false), wx.has(t2) && !e2)
34944
- return wx.get(t2);
34945
- if (Tx(t2))
34946
- return wx.set(t2, Px), Px;
34947
- var i2 = getComputedStyle(t2), n2 = bx(t2) && t2.ownerSVGElement && t2.getBBox(), r2 = !Cx && "border-box" === i2.boxSizing, o2 = Mx.test(i2.writingMode || ""), s2 = !n2 && Ax.test(i2.overflowY || ""), a2 = !n2 && Ax.test(i2.overflowX || ""), l2 = n2 ? 0 : Rx(i2.paddingTop), h2 = n2 ? 0 : Rx(i2.paddingRight), u2 = n2 ? 0 : Rx(i2.paddingBottom), c2 = n2 ? 0 : Rx(i2.paddingLeft), d2 = n2 ? 0 : Rx(i2.borderTopWidth), p2 = n2 ? 0 : Rx(i2.borderRightWidth), f2 = n2 ? 0 : Rx(i2.borderBottomWidth), m2 = c2 + h2, g2 = l2 + u2, v2 = (n2 ? 0 : Rx(i2.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, S2 = n2 ? n2.width : Rx(i2.width) - b2 - x2, E2 = n2 ? n2.height : Rx(i2.height) - T2 - y2, w2 = S2 + m2 + x2 + v2, A2 = E2 + g2 + y2 + _2, M2 = _x({ devicePixelContentBoxSize: Ix(Math.round(S2 * devicePixelRatio), Math.round(E2 * devicePixelRatio), o2), borderBoxSize: Ix(w2, A2, o2), contentBoxSize: Ix(S2, E2, o2), contentRect: new xx(c2, l2, S2, E2) });
34948
- return wx.set(t2, M2), M2;
34949
- }, Lx = function(t2, e2, i2) {
34950
- var n2 = Ox(t2, i2), r2 = n2.borderBoxSize, o2 = n2.contentBoxSize, s2 = n2.devicePixelContentBoxSize;
34903
+ var n2 = Rx(t2, i2), r2 = n2.borderBoxSize, o2 = n2.contentBoxSize, s2 = n2.devicePixelContentBoxSize;
34951
34904
  switch (e2) {
34952
- case lx.DEVICE_PIXEL_CONTENT_BOX:
34905
+ case ox.DEVICE_PIXEL_CONTENT_BOX:
34953
34906
  return s2;
34954
- case lx.BORDER_BOX:
34907
+ case ox.BORDER_BOX:
34955
34908
  return r2;
34956
34909
  default:
34957
34910
  return o2;
34958
34911
  }
34959
- }, Nx = function(t2) {
34960
- var e2 = Ox(t2);
34961
- this.target = t2, this.contentRect = e2.contentRect, this.borderBoxSize = _x([e2.borderBoxSize]), this.contentBoxSize = _x([e2.contentBoxSize]), this.devicePixelContentBoxSize = _x([e2.devicePixelContentBoxSize]);
34962
- }, Dx = function(t2) {
34963
- if (Tx(t2))
34912
+ }, Px = function(t2) {
34913
+ var e2 = Rx(t2);
34914
+ this.target = t2, this.contentRect = e2.contentRect, this.borderBoxSize = mx([e2.borderBoxSize]), this.contentBoxSize = mx([e2.contentBoxSize]), this.devicePixelContentBoxSize = mx([e2.devicePixelContentBoxSize]);
34915
+ }, Ox = function(t2) {
34916
+ if (yx(t2))
34964
34917
  return 1 / 0;
34965
34918
  for (var e2 = 0, i2 = t2.parentNode; i2; )
34966
34919
  e2 += 1, i2 = i2.parentNode;
34967
34920
  return e2;
34968
- }, Fx = function() {
34921
+ }, Lx = function() {
34969
34922
  var t2 = 1 / 0, e2 = [];
34970
- mx.forEach(function(i3) {
34923
+ dx.forEach(function(i3) {
34971
34924
  if (0 !== i3.activeTargets.length) {
34972
34925
  var n3 = [];
34973
34926
  i3.activeTargets.forEach(function(e3) {
34974
- var i4 = new Nx(e3.target), r2 = Dx(e3.target);
34975
- n3.push(i4), e3.lastReportedSize = Lx(e3.target, e3.observedBox), r2 < t2 && (t2 = r2);
34927
+ var i4 = new Px(e3.target), r2 = Ox(e3.target);
34928
+ n3.push(i4), e3.lastReportedSize = Ix(e3.target, e3.observedBox), r2 < t2 && (t2 = r2);
34976
34929
  }), e2.push(function() {
34977
34930
  i3.callback.call(i3.observer, n3, i3.observer);
34978
34931
  }), i3.activeTargets.splice(0, i3.activeTargets.length);
@@ -34982,36 +34935,36 @@ void main(void){
34982
34935
  (0, n2[i2])();
34983
34936
  }
34984
34937
  return t2;
34985
- }, Bx = function(t2) {
34986
- mx.forEach(function(e2) {
34938
+ }, Nx = function(t2) {
34939
+ dx.forEach(function(e2) {
34987
34940
  e2.activeTargets.splice(0, e2.activeTargets.length), e2.skippedTargets.splice(0, e2.skippedTargets.length), e2.observationTargets.forEach(function(i2) {
34988
- i2.isActive() && (Dx(i2.target) > t2 ? e2.activeTargets.push(i2) : e2.skippedTargets.push(i2));
34941
+ i2.isActive() && (Ox(i2.target) > t2 ? e2.activeTargets.push(i2) : e2.skippedTargets.push(i2));
34989
34942
  });
34990
34943
  });
34991
- }, kx = function() {
34944
+ }, Dx = function() {
34992
34945
  var t2, e2 = 0;
34993
- for (Bx(e2); mx.some(function(t3) {
34946
+ for (Nx(e2); dx.some(function(t3) {
34994
34947
  return t3.activeTargets.length > 0;
34995
34948
  }); )
34996
- e2 = Fx(), Bx(e2);
34997
- return mx.some(function(t3) {
34949
+ e2 = Lx(), Nx(e2);
34950
+ return dx.some(function(t3) {
34998
34951
  return t3.skippedTargets.length > 0;
34999
- }) && ("function" == typeof ErrorEvent ? t2 = new ErrorEvent("error", { message: gx }) : ((t2 = document.createEvent("Event")).initEvent("error", false, false), t2.message = gx), window.dispatchEvent(t2)), e2 > 0;
35000
- }, Ux = [], Gx = function(t2) {
35001
- if (!vx) {
34952
+ }) && ("function" == typeof ErrorEvent ? t2 = new ErrorEvent("error", { message: px }) : ((t2 = document.createEvent("Event")).initEvent("error", false, false), t2.message = px), window.dispatchEvent(t2)), e2 > 0;
34953
+ }, Fx = [], Bx = function(t2) {
34954
+ if (!fx) {
35002
34955
  var e2 = 0, i2 = document.createTextNode("");
35003
34956
  new MutationObserver(function() {
35004
- return Ux.splice(0).forEach(function(t3) {
34957
+ return Fx.splice(0).forEach(function(t3) {
35005
34958
  return t3();
35006
34959
  });
35007
- }).observe(i2, { characterData: true }), vx = function() {
34960
+ }).observe(i2, { characterData: true }), fx = function() {
35008
34961
  i2.textContent = "".concat(e2 ? e2-- : e2++);
35009
34962
  };
35010
34963
  }
35011
- Ux.push(t2), vx();
35012
- }, Hx = 0, jx = { attributes: true, characterData: true, childList: true, subtree: true }, zx = ["resize", "load", "transitionend", "animationend", "animationstart", "animationiteration", "keyup", "keydown", "mouseup", "mousedown", "mouseover", "mouseout", "blur", "focus"], Vx = function(t2) {
34964
+ Fx.push(t2), fx();
34965
+ }, kx = 0, Ux = { attributes: true, characterData: true, childList: true, subtree: true }, Gx = ["resize", "load", "transitionend", "animationend", "animationstart", "animationiteration", "keyup", "keydown", "mouseup", "mousedown", "mouseover", "mouseout", "blur", "focus"], Hx = function(t2) {
35013
34966
  return void 0 === t2 && (t2 = 0), Date.now() + t2;
35014
- }, Wx = false, Xx = new (function() {
34967
+ }, jx = false, zx = new (function() {
35015
34968
  function t2() {
35016
34969
  var t3 = this;
35017
34970
  this.stopped = true, this.listener = function() {
@@ -35020,19 +34973,19 @@ void main(void){
35020
34973
  }
35021
34974
  return t2.prototype.run = function(t3) {
35022
34975
  var e2 = this;
35023
- if (void 0 === t3 && (t3 = 250), !Wx) {
35024
- Wx = true;
35025
- var i2, n2 = Vx(t3);
34976
+ if (void 0 === t3 && (t3 = 250), !jx) {
34977
+ jx = true;
34978
+ var i2, n2 = Hx(t3);
35026
34979
  i2 = function() {
35027
34980
  var i3 = false;
35028
34981
  try {
35029
- i3 = kx();
34982
+ i3 = Dx();
35030
34983
  } finally {
35031
- if (Wx = false, t3 = n2 - Vx(), !Hx)
34984
+ if (jx = false, t3 = n2 - Hx(), !kx)
35032
34985
  return;
35033
34986
  i3 ? e2.run(1e3) : t3 > 0 ? e2.run(t3) : e2.start();
35034
34987
  }
35035
- }, Gx(function() {
34988
+ }, Bx(function() {
35036
34989
  requestAnimationFrame(i2);
35037
34990
  });
35038
34991
  }
@@ -35040,29 +34993,29 @@ void main(void){
35040
34993
  this.stop(), this.run();
35041
34994
  }, t2.prototype.observe = function() {
35042
34995
  var t3 = this, e2 = function() {
35043
- return t3.observer && t3.observer.observe(document.body, jx);
34996
+ return t3.observer && t3.observer.observe(document.body, Ux);
35044
34997
  };
35045
- document.body ? e2() : Ex.addEventListener("DOMContentLoaded", e2);
34998
+ document.body ? e2() : bx.addEventListener("DOMContentLoaded", e2);
35046
34999
  }, t2.prototype.start = function() {
35047
35000
  var t3 = this;
35048
- this.stopped && (this.stopped = false, this.observer = new MutationObserver(this.listener), this.observe(), zx.forEach(function(e2) {
35049
- return Ex.addEventListener(e2, t3.listener, true);
35001
+ this.stopped && (this.stopped = false, this.observer = new MutationObserver(this.listener), this.observe(), Gx.forEach(function(e2) {
35002
+ return bx.addEventListener(e2, t3.listener, true);
35050
35003
  }));
35051
35004
  }, t2.prototype.stop = function() {
35052
35005
  var t3 = this;
35053
- this.stopped || (this.observer && this.observer.disconnect(), zx.forEach(function(e2) {
35054
- return Ex.removeEventListener(e2, t3.listener, true);
35006
+ this.stopped || (this.observer && this.observer.disconnect(), Gx.forEach(function(e2) {
35007
+ return bx.removeEventListener(e2, t3.listener, true);
35055
35008
  }), this.stopped = true);
35056
35009
  }, t2;
35057
- }())(), Yx = function(t2) {
35058
- !Hx && t2 > 0 && Xx.start(), !(Hx += t2) && Xx.stop();
35059
- }, qx = function() {
35010
+ }())(), Vx = function(t2) {
35011
+ !kx && t2 > 0 && zx.start(), !(kx += t2) && zx.stop();
35012
+ }, Wx = function() {
35060
35013
  function t2(t3, e2) {
35061
- this.target = t3, this.observedBox = e2 || lx.CONTENT_BOX, this.lastReportedSize = { inlineSize: 0, blockSize: 0 };
35014
+ this.target = t3, this.observedBox = e2 || ox.CONTENT_BOX, this.lastReportedSize = { inlineSize: 0, blockSize: 0 };
35062
35015
  }
35063
35016
  return t2.prototype.isActive = function() {
35064
- var t3, e2 = Lx(this.target, this.observedBox, true);
35065
- return t3 = this.target, bx(t3) || function(t4) {
35017
+ var t3, e2 = Ix(this.target, this.observedBox, true);
35018
+ return t3 = this.target, _x(t3) || function(t4) {
35066
35019
  switch (t4.tagName) {
35067
35020
  case "INPUT":
35068
35021
  if ("image" !== t4.type)
@@ -35079,57 +35032,57 @@ void main(void){
35079
35032
  return false;
35080
35033
  }(t3) || "inline" !== getComputedStyle(t3).display || (this.lastReportedSize = e2), this.lastReportedSize.inlineSize !== e2.inlineSize || this.lastReportedSize.blockSize !== e2.blockSize;
35081
35034
  }, t2;
35082
- }(), Zx = function(t2, e2) {
35035
+ }(), Xx = function(t2, e2) {
35083
35036
  this.activeTargets = [], this.skippedTargets = [], this.observationTargets = [], this.observer = t2, this.callback = e2;
35084
- }, Jx = /* @__PURE__ */ new WeakMap(), Kx = function(t2, e2) {
35037
+ }, Yx = /* @__PURE__ */ new WeakMap(), qx = function(t2, e2) {
35085
35038
  for (var i2 = 0; i2 < t2.length; i2 += 1)
35086
35039
  if (t2[i2].target === e2)
35087
35040
  return i2;
35088
35041
  return -1;
35089
- }, Qx = function() {
35042
+ }, Zx = function() {
35090
35043
  function t2() {
35091
35044
  }
35092
35045
  return t2.connect = function(t3, e2) {
35093
- var i2 = new Zx(t3, e2);
35094
- Jx.set(t3, i2);
35046
+ var i2 = new Xx(t3, e2);
35047
+ Yx.set(t3, i2);
35095
35048
  }, t2.observe = function(t3, e2, i2) {
35096
- var n2 = Jx.get(t3), r2 = 0 === n2.observationTargets.length;
35097
- Kx(n2.observationTargets, e2) < 0 && (r2 && mx.push(n2), n2.observationTargets.push(new qx(e2, i2 && i2.box)), Yx(1), Xx.schedule());
35049
+ var n2 = Yx.get(t3), r2 = 0 === n2.observationTargets.length;
35050
+ qx(n2.observationTargets, e2) < 0 && (r2 && dx.push(n2), n2.observationTargets.push(new Wx(e2, i2 && i2.box)), Vx(1), zx.schedule());
35098
35051
  }, t2.unobserve = function(t3, e2) {
35099
- var i2 = Jx.get(t3), n2 = Kx(i2.observationTargets, e2), r2 = 1 === i2.observationTargets.length;
35100
- n2 >= 0 && (r2 && mx.splice(mx.indexOf(i2), 1), i2.observationTargets.splice(n2, 1), Yx(-1));
35052
+ var i2 = Yx.get(t3), n2 = qx(i2.observationTargets, e2), r2 = 1 === i2.observationTargets.length;
35053
+ n2 >= 0 && (r2 && dx.splice(dx.indexOf(i2), 1), i2.observationTargets.splice(n2, 1), Vx(-1));
35101
35054
  }, t2.disconnect = function(t3) {
35102
- var e2 = this, i2 = Jx.get(t3);
35055
+ var e2 = this, i2 = Yx.get(t3);
35103
35056
  i2.observationTargets.slice().forEach(function(i3) {
35104
35057
  return e2.unobserve(t3, i3.target);
35105
35058
  }), i2.activeTargets.splice(0, i2.activeTargets.length);
35106
35059
  }, t2;
35107
- }(), $x = function() {
35060
+ }(), Jx = function() {
35108
35061
  function t2(t3) {
35109
35062
  if (0 === arguments.length)
35110
35063
  throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");
35111
35064
  if ("function" != typeof t3)
35112
35065
  throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");
35113
- Qx.connect(this, t3);
35066
+ Zx.connect(this, t3);
35114
35067
  }
35115
35068
  return t2.prototype.observe = function(t3, e2) {
35116
35069
  if (0 === arguments.length)
35117
35070
  throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");
35118
- if (!Sx(t3))
35071
+ if (!xx(t3))
35119
35072
  throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");
35120
- Qx.observe(this, t3, e2);
35073
+ Zx.observe(this, t3, e2);
35121
35074
  }, t2.prototype.unobserve = function(t3) {
35122
35075
  if (0 === arguments.length)
35123
35076
  throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");
35124
- if (!Sx(t3))
35077
+ if (!xx(t3))
35125
35078
  throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");
35126
- Qx.unobserve(this, t3);
35079
+ Zx.unobserve(this, t3);
35127
35080
  }, t2.prototype.disconnect = function() {
35128
- Qx.disconnect(this);
35081
+ Zx.disconnect(this);
35129
35082
  }, t2.toString = function() {
35130
35083
  return "function ResizeObserver () { [polyfill code] }";
35131
35084
  }, t2;
35132
- }(), tb = function(t2, e2, i2, n2) {
35085
+ }(), Kx = function(t2, e2, i2, n2) {
35133
35086
  return new (i2 || (i2 = Promise))(function(r2, o2) {
35134
35087
  function s2(t3) {
35135
35088
  try {
@@ -35153,7 +35106,7 @@ void main(void){
35153
35106
  }
35154
35107
  l2((n2 = n2.apply(t2, e2 || [])).next());
35155
35108
  });
35156
- }, eb = function(t2, e2) {
35109
+ }, Qx = function(t2, e2) {
35157
35110
  var i2, n2, r2, o2, s2 = { label: 0, sent: function() {
35158
35111
  if (1 & r2[0])
35159
35112
  throw r2[1];
@@ -35216,14 +35169,14 @@ void main(void){
35216
35169
  }([o3, a3]);
35217
35170
  };
35218
35171
  }
35219
- }, ib = function() {
35172
+ }, $x = function() {
35220
35173
  function t2(t3, e2, i2, n2, r2) {
35221
35174
  this.state = "idle", this.index = -1, this.slideIndex = -1, this.fn = i2, this.index = t3, this.slideIndex = e2, this.eventHub = n2, this.id = r2;
35222
35175
  }
35223
35176
  return t2.prototype.apply = function() {
35224
- return tb(this, void 0, void 0, function() {
35177
+ return Kx(this, void 0, void 0, function() {
35225
35178
  var t3;
35226
- return eb(this, function(e2) {
35179
+ return Qx(this, function(e2) {
35227
35180
  switch (e2.label) {
35228
35181
  case 0:
35229
35182
  this.eventHub.emit("task-start", this), e2.label = 1;
@@ -35239,7 +35192,7 @@ void main(void){
35239
35192
  });
35240
35193
  });
35241
35194
  }, t2;
35242
- }(), nb = function() {
35195
+ }(), tb = function() {
35243
35196
  function t2() {
35244
35197
  var t3 = this;
35245
35198
  this.eventHub = new Za.a(), this.tasks = [], this.index = 0, this.eventHub.on("task-end", function(e2) {
@@ -35261,7 +35214,7 @@ void main(void){
35261
35214
  e2.tasks.splice(t4, 1);
35262
35215
  });
35263
35216
  }, t2.prototype.addTask = function(t3, e2, i2) {
35264
- var n2 = new ib(this.index++, e2, t3, this.eventHub, i2);
35217
+ var n2 = new $x(this.index++, e2, t3, this.eventHub, i2);
35265
35218
  this.tasks.push(n2), this.tasks.sort(function(t4, e3) {
35266
35219
  return t4.index - e3.index;
35267
35220
  }), this.replaceIdleTask(), 1 === this.tasks.length && n2.apply();
@@ -35273,7 +35226,7 @@ void main(void){
35273
35226
  this.eventHub.removeAllListeners();
35274
35227
  }, t2;
35275
35228
  }();
35276
- function rb(t2, e2) {
35229
+ function eb(t2, e2) {
35277
35230
  var i2 = t2.__state.conversionName.toString(), n2 = 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), h2 = t2.v.toFixed(1);
35278
35231
  if (e2 || "THREE_CHAR_HEX" === i2 || "SIX_CHAR_HEX" === i2) {
35279
35232
  for (var u2 = t2.hex.toString(16); u2.length < 6; )
@@ -35282,28 +35235,28 @@ void main(void){
35282
35235
  }
35283
35236
  return "CSS_RGB" === i2 ? "rgb(" + n2 + "," + r2 + "," + o2 + ")" : "CSS_RGBA" === i2 ? "rgba(" + n2 + "," + r2 + "," + o2 + "," + s2 + ")" : "HEX" === i2 ? "0x" + t2.hex.toString(16) : "RGB_ARRAY" === i2 ? "[" + n2 + "," + r2 + "," + o2 + "]" : "RGBA_ARRAY" === i2 ? "[" + n2 + "," + r2 + "," + o2 + "," + s2 + "]" : "RGB_OBJ" === i2 ? "{r:" + n2 + ",g:" + r2 + ",b:" + o2 + "}" : "RGBA_OBJ" === i2 ? "{r:" + n2 + ",g:" + r2 + ",b:" + o2 + ",a:" + s2 + "}" : "HSV_OBJ" === i2 ? "{h:" + a2 + ",s:" + l2 + ",v:" + h2 + "}" : "HSVA_OBJ" === i2 ? "{h:" + a2 + ",s:" + l2 + ",v:" + h2 + ",a:" + s2 + "}" : "unknown format";
35284
35237
  }
35285
- var ob = Array.prototype.forEach, sb = Array.prototype.slice, ab = { BREAK: {}, extend: function(t2) {
35286
- return this.each(sb.call(arguments, 1), function(e2) {
35238
+ var ib = Array.prototype.forEach, nb = Array.prototype.slice, rb = { BREAK: {}, extend: function(t2) {
35239
+ return this.each(nb.call(arguments, 1), function(e2) {
35287
35240
  (this.isObject(e2) ? Object.keys(e2) : []).forEach(function(i2) {
35288
35241
  this.isUndefined(e2[i2]) || (t2[i2] = e2[i2]);
35289
35242
  }.bind(this));
35290
35243
  }, this), t2;
35291
35244
  }, defaults: function(t2) {
35292
- return this.each(sb.call(arguments, 1), function(e2) {
35245
+ return this.each(nb.call(arguments, 1), function(e2) {
35293
35246
  (this.isObject(e2) ? Object.keys(e2) : []).forEach(function(i2) {
35294
35247
  this.isUndefined(t2[i2]) && (t2[i2] = e2[i2]);
35295
35248
  }.bind(this));
35296
35249
  }, this), t2;
35297
35250
  }, compose: function() {
35298
- var t2 = sb.call(arguments);
35251
+ var t2 = nb.call(arguments);
35299
35252
  return function() {
35300
- for (var e2 = sb.call(arguments), i2 = t2.length - 1; i2 >= 0; i2--)
35253
+ for (var e2 = nb.call(arguments), i2 = t2.length - 1; i2 >= 0; i2--)
35301
35254
  e2 = [t2[i2].apply(this, e2)];
35302
35255
  return e2[0];
35303
35256
  };
35304
35257
  }, each: function(t2, e2, i2) {
35305
35258
  if (t2) {
35306
- if (ob && t2.forEach && t2.forEach === ob)
35259
+ if (ib && t2.forEach && t2.forEach === ib)
35307
35260
  t2.forEach(e2, i2);
35308
35261
  else if (t2.length === t2.length + 0) {
35309
35262
  var n2, r2 = void 0;
@@ -35328,7 +35281,7 @@ void main(void){
35328
35281
  clearTimeout(n2), n2 = setTimeout(s2, e2), a2 && t2.apply(r2, o2);
35329
35282
  };
35330
35283
  }, toArray: function(t2) {
35331
- return t2.toArray ? t2.toArray() : sb.call(t2);
35284
+ return t2.toArray ? t2.toArray() : nb.call(t2);
35332
35285
  }, isUndefined: function(t2) {
35333
35286
  return void 0 === t2;
35334
35287
  }, isNull: function(t2) {
@@ -35354,23 +35307,23 @@ void main(void){
35354
35307
  return false === t2 || true === t2;
35355
35308
  }, isFunction: function(t2) {
35356
35309
  return t2 instanceof Function;
35357
- } }, lb = [{ litmus: ab.isString, conversions: { THREE_CHAR_HEX: { read: function(t2) {
35310
+ } }, ob = [{ litmus: rb.isString, conversions: { THREE_CHAR_HEX: { read: function(t2) {
35358
35311
  var e2 = t2.match(/^#([A-F0-9])([A-F0-9])([A-F0-9])$/i);
35359
35312
  return null !== e2 && { space: "HEX", hex: parseInt("0x" + e2[1].toString() + e2[1].toString() + e2[2].toString() + e2[2].toString() + e2[3].toString() + e2[3].toString(), 0) };
35360
- }, write: rb }, SIX_CHAR_HEX: { read: function(t2) {
35313
+ }, write: eb }, SIX_CHAR_HEX: { read: function(t2) {
35361
35314
  var e2 = t2.match(/^#([A-F0-9]{6})$/i);
35362
35315
  return null !== e2 && { space: "HEX", hex: parseInt("0x" + e2[1].toString(), 0) };
35363
- }, write: rb }, CSS_RGB: { read: function(t2) {
35316
+ }, write: eb }, CSS_RGB: { read: function(t2) {
35364
35317
  var e2 = t2.match(/^rgb\(\s*(\S+)\s*,\s*(\S+)\s*,\s*(\S+)\s*\)/);
35365
35318
  return null !== e2 && { space: "RGB", r: parseFloat(e2[1]), g: parseFloat(e2[2]), b: parseFloat(e2[3]) };
35366
- }, write: rb }, CSS_RGBA: { read: function(t2) {
35319
+ }, write: eb }, CSS_RGBA: { read: function(t2) {
35367
35320
  var e2 = t2.match(/^rgba\(\s*(\S+)\s*,\s*(\S+)\s*,\s*(\S+)\s*,\s*(\S+)\s*\)/);
35368
35321
  return null !== e2 && { space: "RGB", r: parseFloat(e2[1]), g: parseFloat(e2[2]), b: parseFloat(e2[3]), a: parseFloat(e2[4]) };
35369
- }, write: rb } } }, { litmus: ab.isNumber, conversions: { HEX: { read: function(t2) {
35322
+ }, write: eb } } }, { litmus: rb.isNumber, conversions: { HEX: { read: function(t2) {
35370
35323
  return { space: "HEX", hex: t2, conversionName: "HEX" };
35371
35324
  }, write: function(t2) {
35372
35325
  return t2.hex;
35373
- } } } }, { litmus: ab.isArray, conversions: { RGB_ARRAY: { read: function(t2) {
35326
+ } } } }, { litmus: rb.isArray, conversions: { RGB_ARRAY: { read: function(t2) {
35374
35327
  return 3 === t2.length && { space: "RGB", r: t2[0], g: t2[1], b: t2[2] };
35375
35328
  }, write: function(t2) {
35376
35329
  return [t2.r, t2.g, t2.b];
@@ -35378,33 +35331,33 @@ void main(void){
35378
35331
  return 4 === t2.length && { space: "RGB", r: t2[0], g: t2[1], b: t2[2], a: t2[3] };
35379
35332
  }, write: function(t2) {
35380
35333
  return [t2.r, t2.g, t2.b, t2.a];
35381
- } } } }, { litmus: ab.isObject, conversions: { RGBA_OBJ: { read: function(t2) {
35382
- return !!(ab.isNumber(t2.r) && ab.isNumber(t2.g) && ab.isNumber(t2.b) && ab.isNumber(t2.a)) && { space: "RGB", r: t2.r, g: t2.g, b: t2.b, a: t2.a };
35334
+ } } } }, { litmus: rb.isObject, conversions: { RGBA_OBJ: { read: function(t2) {
35335
+ return !!(rb.isNumber(t2.r) && rb.isNumber(t2.g) && rb.isNumber(t2.b) && rb.isNumber(t2.a)) && { space: "RGB", r: t2.r, g: t2.g, b: t2.b, a: t2.a };
35383
35336
  }, write: function(t2) {
35384
35337
  return { r: t2.r, g: t2.g, b: t2.b, a: t2.a };
35385
35338
  } }, RGB_OBJ: { read: function(t2) {
35386
- return !!(ab.isNumber(t2.r) && ab.isNumber(t2.g) && ab.isNumber(t2.b)) && { space: "RGB", r: t2.r, g: t2.g, b: t2.b };
35339
+ return !!(rb.isNumber(t2.r) && rb.isNumber(t2.g) && rb.isNumber(t2.b)) && { space: "RGB", r: t2.r, g: t2.g, b: t2.b };
35387
35340
  }, write: function(t2) {
35388
35341
  return { r: t2.r, g: t2.g, b: t2.b };
35389
35342
  } }, HSVA_OBJ: { read: function(t2) {
35390
- return !!(ab.isNumber(t2.h) && ab.isNumber(t2.s) && ab.isNumber(t2.v) && ab.isNumber(t2.a)) && { space: "HSV", h: t2.h, s: t2.s, v: t2.v, a: t2.a };
35343
+ return !!(rb.isNumber(t2.h) && rb.isNumber(t2.s) && rb.isNumber(t2.v) && rb.isNumber(t2.a)) && { space: "HSV", h: t2.h, s: t2.s, v: t2.v, a: t2.a };
35391
35344
  }, write: function(t2) {
35392
35345
  return { h: t2.h, s: t2.s, v: t2.v, a: t2.a };
35393
35346
  } }, HSV_OBJ: { read: function(t2) {
35394
- return !!(ab.isNumber(t2.h) && ab.isNumber(t2.s) && ab.isNumber(t2.v)) && { space: "HSV", h: t2.h, s: t2.s, v: t2.v };
35347
+ return !!(rb.isNumber(t2.h) && rb.isNumber(t2.s) && rb.isNumber(t2.v)) && { space: "HSV", h: t2.h, s: t2.s, v: t2.v };
35395
35348
  }, write: function(t2) {
35396
35349
  return { h: t2.h, s: t2.s, v: t2.v };
35397
- } } } }], hb = void 0, ub = void 0, cb = function() {
35398
- ub = false;
35399
- var t2 = arguments.length > 1 ? ab.toArray(arguments) : arguments[0];
35400
- return ab.each(lb, function(e2) {
35350
+ } } } }], sb = void 0, ab = void 0, lb = function() {
35351
+ ab = false;
35352
+ var t2 = arguments.length > 1 ? rb.toArray(arguments) : arguments[0];
35353
+ return rb.each(ob, function(e2) {
35401
35354
  if (e2.litmus(t2))
35402
- return ab.each(e2.conversions, function(e3, i2) {
35403
- if (hb = e3.read(t2), false === ub && false !== hb)
35404
- return ub = hb, hb.conversionName = i2, hb.conversion = e3, ab.BREAK;
35405
- }), ab.BREAK;
35406
- }), ub;
35407
- }, db = void 0, pb = { hsv_to_rgb: function(t2, e2, i2) {
35355
+ return rb.each(e2.conversions, function(e3, i2) {
35356
+ if (sb = e3.read(t2), false === ab && false !== sb)
35357
+ return ab = sb, sb.conversionName = i2, sb.conversion = e3, rb.BREAK;
35358
+ }), rb.BREAK;
35359
+ }), ab;
35360
+ }, hb = void 0, ub = { hsv_to_rgb: function(t2, e2, i2) {
35408
35361
  var n2 = Math.floor(t2 / 60) % 6, r2 = t2 / 60 - Math.floor(t2 / 60), o2 = i2 * (1 - e2), s2 = i2 * (1 - r2 * e2), a2 = i2 * (1 - (1 - r2) * e2), l2 = [[i2, a2, o2], [s2, i2, o2], [o2, i2, a2], [o2, s2, i2], [a2, o2, i2], [i2, o2, s2]][n2];
35409
35362
  return { r: 255 * l2[0], g: 255 * l2[1], b: 255 * l2[2] };
35410
35363
  }, rgb_to_hsv: function(t2, e2, i2) {
@@ -35416,15 +35369,15 @@ void main(void){
35416
35369
  }, component_from_hex: function(t2, e2) {
35417
35370
  return t2 >> 8 * e2 & 255;
35418
35371
  }, hex_with_component: function(t2, e2, i2) {
35419
- return i2 << (db = 8 * e2) | t2 & ~(255 << db);
35420
- } }, fb = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t2) {
35372
+ return i2 << (hb = 8 * e2) | t2 & ~(255 << hb);
35373
+ } }, cb = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t2) {
35421
35374
  return typeof t2;
35422
35375
  } : function(t2) {
35423
35376
  return t2 && "function" == typeof Symbol && t2.constructor === Symbol && t2 !== Symbol.prototype ? "symbol" : typeof t2;
35424
- }, mb = function(t2, e2) {
35377
+ }, db = function(t2, e2) {
35425
35378
  if (!(t2 instanceof e2))
35426
35379
  throw new TypeError("Cannot call a class as a function");
35427
- }, gb = function() {
35380
+ }, pb = function() {
35428
35381
  function t2(t3, e2) {
35429
35382
  for (var i2 = 0; i2 < e2.length; i2++) {
35430
35383
  var n2 = e2[i2];
@@ -35434,7 +35387,7 @@ void main(void){
35434
35387
  return function(e2, i2, n2) {
35435
35388
  return i2 && t2(e2.prototype, i2), n2 && t2(e2, n2), e2;
35436
35389
  };
35437
- }(), vb = function t2(e2, i2, n2) {
35390
+ }(), fb = function t2(e2, i2, n2) {
35438
35391
  null === e2 && (e2 = Function.prototype);
35439
35392
  var r2 = Object.getOwnPropertyDescriptor(e2, i2);
35440
35393
  if (void 0 === r2) {
@@ -35445,67 +35398,67 @@ void main(void){
35445
35398
  return r2.value;
35446
35399
  var s2 = r2.get;
35447
35400
  return void 0 !== s2 ? s2.call(n2) : void 0;
35448
- }, _b = function(t2, e2) {
35401
+ }, mb = function(t2, e2) {
35449
35402
  if ("function" != typeof e2 && null !== e2)
35450
35403
  throw new TypeError("Super expression must either be null or a function, not " + typeof e2);
35451
35404
  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);
35452
- }, yb = function(t2, e2) {
35405
+ }, gb = function(t2, e2) {
35453
35406
  if (!t2)
35454
35407
  throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
35455
35408
  return !e2 || "object" != typeof e2 && "function" != typeof e2 ? t2 : e2;
35456
- }, xb = function() {
35409
+ }, vb = function() {
35457
35410
  function t2() {
35458
- if (mb(this, t2), this.__state = cb.apply(this, arguments), false === this.__state)
35411
+ if (db(this, t2), this.__state = lb.apply(this, arguments), false === this.__state)
35459
35412
  throw new Error("Failed to interpret color arguments");
35460
35413
  this.__state.a = this.__state.a || 1;
35461
35414
  }
35462
- return gb(t2, [{ key: "toString", value: function() {
35463
- return rb(this);
35415
+ return pb(t2, [{ key: "toString", value: function() {
35416
+ return eb(this);
35464
35417
  } }, { key: "toHexString", value: function() {
35465
- return rb(this, true);
35418
+ return eb(this, true);
35466
35419
  } }, { key: "toOriginal", value: function() {
35467
35420
  return this.__state.conversion.write(this);
35468
35421
  } }]), t2;
35469
35422
  }();
35470
- function bb(t2, e2, i2) {
35423
+ function _b(t2, e2, i2) {
35471
35424
  Object.defineProperty(t2, e2, { get: function() {
35472
- return "RGB" === this.__state.space || xb.recalculateRGB(this, e2, i2), this.__state[e2];
35425
+ return "RGB" === this.__state.space || vb.recalculateRGB(this, e2, i2), this.__state[e2];
35473
35426
  }, set: function(t3) {
35474
- "RGB" !== this.__state.space && (xb.recalculateRGB(this, e2, i2), this.__state.space = "RGB"), this.__state[e2] = t3;
35427
+ "RGB" !== this.__state.space && (vb.recalculateRGB(this, e2, i2), this.__state.space = "RGB"), this.__state[e2] = t3;
35475
35428
  } });
35476
35429
  }
35477
- function Tb(t2, e2) {
35430
+ function yb(t2, e2) {
35478
35431
  Object.defineProperty(t2, e2, { get: function() {
35479
- return "HSV" === this.__state.space || xb.recalculateHSV(this), this.__state[e2];
35432
+ return "HSV" === this.__state.space || vb.recalculateHSV(this), this.__state[e2];
35480
35433
  }, set: function(t3) {
35481
- "HSV" !== this.__state.space && (xb.recalculateHSV(this), this.__state.space = "HSV"), this.__state[e2] = t3;
35434
+ "HSV" !== this.__state.space && (vb.recalculateHSV(this), this.__state.space = "HSV"), this.__state[e2] = t3;
35482
35435
  } });
35483
35436
  }
35484
- xb.recalculateRGB = function(t2, e2, i2) {
35437
+ vb.recalculateRGB = function(t2, e2, i2) {
35485
35438
  if ("HEX" === t2.__state.space)
35486
- t2.__state[e2] = pb.component_from_hex(t2.__state.hex, i2);
35439
+ t2.__state[e2] = ub.component_from_hex(t2.__state.hex, i2);
35487
35440
  else {
35488
35441
  if ("HSV" !== t2.__state.space)
35489
35442
  throw new Error("Corrupted color state");
35490
- ab.extend(t2.__state, pb.hsv_to_rgb(t2.__state.h, t2.__state.s, t2.__state.v));
35443
+ rb.extend(t2.__state, ub.hsv_to_rgb(t2.__state.h, t2.__state.s, t2.__state.v));
35491
35444
  }
35492
- }, xb.recalculateHSV = function(t2) {
35493
- var e2 = pb.rgb_to_hsv(t2.r, t2.g, t2.b);
35494
- ab.extend(t2.__state, { s: e2.s, v: e2.v }), ab.isNaN(e2.h) ? ab.isUndefined(t2.__state.h) && (t2.__state.h = 0) : t2.__state.h = e2.h;
35495
- }, xb.COMPONENTS = ["r", "g", "b", "h", "s", "v", "hex", "a"], bb(xb.prototype, "r", 2), bb(xb.prototype, "g", 1), bb(xb.prototype, "b", 0), Tb(xb.prototype, "h"), Tb(xb.prototype, "s"), Tb(xb.prototype, "v"), Object.defineProperty(xb.prototype, "a", { get: function() {
35445
+ }, vb.recalculateHSV = function(t2) {
35446
+ var e2 = ub.rgb_to_hsv(t2.r, t2.g, t2.b);
35447
+ rb.extend(t2.__state, { s: e2.s, v: e2.v }), rb.isNaN(e2.h) ? rb.isUndefined(t2.__state.h) && (t2.__state.h = 0) : t2.__state.h = e2.h;
35448
+ }, vb.COMPONENTS = ["r", "g", "b", "h", "s", "v", "hex", "a"], _b(vb.prototype, "r", 2), _b(vb.prototype, "g", 1), _b(vb.prototype, "b", 0), yb(vb.prototype, "h"), yb(vb.prototype, "s"), yb(vb.prototype, "v"), Object.defineProperty(vb.prototype, "a", { get: function() {
35496
35449
  return this.__state.a;
35497
35450
  }, set: function(t2) {
35498
35451
  this.__state.a = t2;
35499
- } }), Object.defineProperty(xb.prototype, "hex", { get: function() {
35500
- return "HEX" !== this.__state.space && (this.__state.hex = pb.rgb_to_hex(this.r, this.g, this.b), this.__state.space = "HEX"), this.__state.hex;
35452
+ } }), Object.defineProperty(vb.prototype, "hex", { get: function() {
35453
+ return "HEX" !== this.__state.space && (this.__state.hex = ub.rgb_to_hex(this.r, this.g, this.b), this.__state.space = "HEX"), this.__state.hex;
35501
35454
  }, set: function(t2) {
35502
35455
  this.__state.space = "HEX", this.__state.hex = t2;
35503
35456
  } });
35504
- var Sb = function() {
35457
+ var xb = function() {
35505
35458
  function t2(e2, i2) {
35506
- mb(this, t2), this.initialValue = e2[i2], this.domElement = document.createElement("div"), this.object = e2, this.property = i2, this.__onChange = void 0, this.__onFinishChange = void 0;
35459
+ db(this, t2), this.initialValue = e2[i2], this.domElement = document.createElement("div"), this.object = e2, this.property = i2, this.__onChange = void 0, this.__onFinishChange = void 0;
35507
35460
  }
35508
- return gb(t2, [{ key: "onChange", value: function(t3) {
35461
+ return pb(t2, [{ key: "onChange", value: function(t3) {
35509
35462
  return this.__onChange = t3, this;
35510
35463
  } }, { key: "onFinishChange", value: function(t3) {
35511
35464
  return this.__onFinishChange = t3, this;
@@ -35518,29 +35471,29 @@ void main(void){
35518
35471
  } }, { key: "isModified", value: function() {
35519
35472
  return this.initialValue !== this.getValue();
35520
35473
  } }]), t2;
35521
- }(), Eb = {};
35522
- ab.each({ HTMLEvents: ["change"], MouseEvents: ["click", "mousemove", "mousedown", "mouseup", "mouseover"], KeyboardEvents: ["keydown"] }, function(t2, e2) {
35523
- ab.each(t2, function(t3) {
35524
- Eb[t3] = e2;
35474
+ }(), bb = {};
35475
+ rb.each({ HTMLEvents: ["change"], MouseEvents: ["click", "mousemove", "mousedown", "mouseup", "mouseover"], KeyboardEvents: ["keydown"] }, function(t2, e2) {
35476
+ rb.each(t2, function(t3) {
35477
+ bb[t3] = e2;
35525
35478
  });
35526
35479
  });
35527
- var wb = /(\d+(\.\d+)?)px/;
35528
- function Ab(t2) {
35529
- if ("0" === t2 || ab.isUndefined(t2))
35480
+ var Tb = /(\d+(\.\d+)?)px/;
35481
+ function Sb(t2) {
35482
+ if ("0" === t2 || rb.isUndefined(t2))
35530
35483
  return 0;
35531
- var e2 = t2.match(wb);
35532
- return ab.isNull(e2) ? 0 : parseFloat(e2[1]);
35484
+ var e2 = t2.match(Tb);
35485
+ return rb.isNull(e2) ? 0 : parseFloat(e2[1]);
35533
35486
  }
35534
- var Mb = { makeSelectable: function(t2, e2) {
35487
+ var Eb = { makeSelectable: function(t2, e2) {
35535
35488
  void 0 !== t2 && void 0 !== t2.style && (t2.onselectstart = e2 ? function() {
35536
35489
  return false;
35537
35490
  } : function() {
35538
35491
  }, t2.style.MozUserSelect = e2 ? "auto" : "none", t2.style.KhtmlUserSelect = e2 ? "auto" : "none", t2.unselectable = e2 ? "on" : "off");
35539
35492
  }, makeFullscreen: function(t2, e2, i2) {
35540
35493
  var n2 = i2, r2 = e2;
35541
- ab.isUndefined(r2) && (r2 = true), ab.isUndefined(n2) && (n2 = true), t2.style.position = "absolute", r2 && (t2.style.left = 0, t2.style.right = 0), n2 && (t2.style.top = 0, t2.style.bottom = 0);
35494
+ rb.isUndefined(r2) && (r2 = true), rb.isUndefined(n2) && (n2 = true), t2.style.position = "absolute", r2 && (t2.style.left = 0, t2.style.right = 0), n2 && (t2.style.top = 0, t2.style.bottom = 0);
35542
35495
  }, fakeEvent: function(t2, e2, i2, n2) {
35543
- var r2 = i2 || {}, o2 = Eb[e2];
35496
+ var r2 = i2 || {}, o2 = bb[e2];
35544
35497
  if (!o2)
35545
35498
  throw new Error("Event type " + e2 + " not supported.");
35546
35499
  var s2 = document.createEvent(o2);
@@ -35551,18 +35504,18 @@ void main(void){
35551
35504
  break;
35552
35505
  case "KeyboardEvents":
35553
35506
  var h2 = s2.initKeyboardEvent || s2.initKeyEvent;
35554
- ab.defaults(r2, { cancelable: true, ctrlKey: false, altKey: false, shiftKey: false, metaKey: false, keyCode: void 0, charCode: void 0 }), h2(e2, r2.bubbles || false, r2.cancelable, window, r2.ctrlKey, r2.altKey, r2.shiftKey, r2.metaKey, r2.keyCode, r2.charCode);
35507
+ rb.defaults(r2, { cancelable: true, ctrlKey: false, altKey: false, shiftKey: false, metaKey: false, keyCode: void 0, charCode: void 0 }), h2(e2, r2.bubbles || false, r2.cancelable, window, r2.ctrlKey, r2.altKey, r2.shiftKey, r2.metaKey, r2.keyCode, r2.charCode);
35555
35508
  break;
35556
35509
  default:
35557
35510
  s2.initEvent(e2, r2.bubbles || false, r2.cancelable || true);
35558
35511
  }
35559
- ab.defaults(s2, n2), t2.dispatchEvent(s2);
35512
+ rb.defaults(s2, n2), t2.dispatchEvent(s2);
35560
35513
  }, bind: function(t2, e2, i2, n2) {
35561
35514
  var r2 = n2 || false;
35562
- return t2.addEventListener ? t2.addEventListener(e2, i2, r2) : t2.attachEvent && t2.attachEvent("on" + e2, i2), Mb;
35515
+ return t2.addEventListener ? t2.addEventListener(e2, i2, r2) : t2.attachEvent && t2.attachEvent("on" + e2, i2), Eb;
35563
35516
  }, unbind: function(t2, e2, i2, n2) {
35564
35517
  var r2 = n2 || false;
35565
- return t2.removeEventListener ? t2.removeEventListener(e2, i2, r2) : t2.detachEvent && t2.detachEvent("on" + e2, i2), Mb;
35518
+ return t2.removeEventListener ? t2.removeEventListener(e2, i2, r2) : t2.detachEvent && t2.detachEvent("on" + e2, i2), Eb;
35566
35519
  }, addClass: function(t2, e2) {
35567
35520
  if (void 0 === t2.className)
35568
35521
  t2.className = e2;
@@ -35570,7 +35523,7 @@ void main(void){
35570
35523
  var i2 = t2.className.split(/ +/);
35571
35524
  -1 === i2.indexOf(e2) && (i2.push(e2), t2.className = i2.join(" ").replace(/^\s+/, "").replace(/\s+$/, ""));
35572
35525
  }
35573
- return Mb;
35526
+ return Eb;
35574
35527
  }, removeClass: function(t2, e2) {
35575
35528
  if (e2)
35576
35529
  if (t2.className === e2)
@@ -35581,15 +35534,15 @@ void main(void){
35581
35534
  }
35582
35535
  else
35583
35536
  t2.className = void 0;
35584
- return Mb;
35537
+ return Eb;
35585
35538
  }, hasClass: function(t2, e2) {
35586
35539
  return new RegExp("(?:^|\\s+)" + e2 + "(?:\\s+|$)").test(t2.className) || false;
35587
35540
  }, getWidth: function(t2) {
35588
35541
  var e2 = getComputedStyle(t2);
35589
- return Ab(e2["border-left-width"]) + Ab(e2["border-right-width"]) + Ab(e2["padding-left"]) + Ab(e2["padding-right"]) + Ab(e2.width);
35542
+ return Sb(e2["border-left-width"]) + Sb(e2["border-right-width"]) + Sb(e2["padding-left"]) + Sb(e2["padding-right"]) + Sb(e2.width);
35590
35543
  }, getHeight: function(t2) {
35591
35544
  var e2 = getComputedStyle(t2);
35592
- return Ab(e2["border-top-width"]) + Ab(e2["border-bottom-width"]) + Ab(e2["padding-top"]) + Ab(e2["padding-bottom"]) + Ab(e2.height);
35545
+ return Sb(e2["border-top-width"]) + Sb(e2["border-bottom-width"]) + Sb(e2["padding-top"]) + Sb(e2["padding-bottom"]) + Sb(e2.height);
35593
35546
  }, getOffset: function(t2) {
35594
35547
  var e2 = t2, i2 = { left: 0, top: 0 };
35595
35548
  if (e2.offsetParent)
@@ -35599,86 +35552,86 @@ void main(void){
35599
35552
  return i2;
35600
35553
  }, isActive: function(t2) {
35601
35554
  return t2 === document.activeElement && (t2.type || t2.href);
35602
- } }, Cb = function(t2) {
35555
+ } }, wb = function(t2) {
35603
35556
  function e2(t3, i2) {
35604
- mb(this, e2);
35605
- var n2 = yb(this, (e2.__proto__ || Object.getPrototypeOf(e2)).call(this, t3, i2)), r2 = n2;
35606
- return n2.__prev = n2.getValue(), n2.__checkbox = document.createElement("input"), n2.__checkbox.setAttribute("type", "checkbox"), Mb.bind(n2.__checkbox, "change", function() {
35557
+ db(this, e2);
35558
+ var n2 = gb(this, (e2.__proto__ || Object.getPrototypeOf(e2)).call(this, t3, i2)), r2 = n2;
35559
+ return n2.__prev = n2.getValue(), n2.__checkbox = document.createElement("input"), n2.__checkbox.setAttribute("type", "checkbox"), Eb.bind(n2.__checkbox, "change", function() {
35607
35560
  r2.setValue(!r2.__prev);
35608
35561
  }, false), n2.domElement.appendChild(n2.__checkbox), n2.updateDisplay(), n2;
35609
35562
  }
35610
- return _b(e2, t2), gb(e2, [{ key: "setValue", value: function(t3) {
35611
- var i2 = vb(e2.prototype.__proto__ || Object.getPrototypeOf(e2.prototype), "setValue", this).call(this, t3);
35563
+ return mb(e2, t2), pb(e2, [{ key: "setValue", value: function(t3) {
35564
+ var i2 = fb(e2.prototype.__proto__ || Object.getPrototypeOf(e2.prototype), "setValue", this).call(this, t3);
35612
35565
  return this.__onFinishChange && this.__onFinishChange.call(this, this.getValue()), this.__prev = this.getValue(), i2;
35613
35566
  } }, { key: "updateDisplay", value: function() {
35614
- return true === this.getValue() ? (this.__checkbox.setAttribute("checked", "checked"), this.__checkbox.checked = true, this.__prev = true) : (this.__checkbox.checked = false, this.__prev = false), vb(e2.prototype.__proto__ || Object.getPrototypeOf(e2.prototype), "updateDisplay", this).call(this);
35567
+ return true === this.getValue() ? (this.__checkbox.setAttribute("checked", "checked"), this.__checkbox.checked = true, this.__prev = true) : (this.__checkbox.checked = false, this.__prev = false), fb(e2.prototype.__proto__ || Object.getPrototypeOf(e2.prototype), "updateDisplay", this).call(this);
35615
35568
  } }]), e2;
35616
- }(Sb), Rb = function(t2) {
35569
+ }(xb), Ab = function(t2) {
35617
35570
  function e2(t3, i2, n2) {
35618
- mb(this, e2);
35619
- var r2 = yb(this, (e2.__proto__ || Object.getPrototypeOf(e2)).call(this, t3, i2)), o2 = n2, s2 = r2;
35620
- if (r2.__select = document.createElement("select"), ab.isArray(o2)) {
35571
+ db(this, e2);
35572
+ var r2 = gb(this, (e2.__proto__ || Object.getPrototypeOf(e2)).call(this, t3, i2)), o2 = n2, s2 = r2;
35573
+ if (r2.__select = document.createElement("select"), rb.isArray(o2)) {
35621
35574
  var a2 = {};
35622
- ab.each(o2, function(t4) {
35575
+ rb.each(o2, function(t4) {
35623
35576
  a2[t4] = t4;
35624
35577
  }), o2 = a2;
35625
35578
  }
35626
- return ab.each(o2, function(t4, e3) {
35579
+ return rb.each(o2, function(t4, e3) {
35627
35580
  var i3 = document.createElement("option");
35628
35581
  i3.innerHTML = e3, i3.setAttribute("value", t4), s2.__select.appendChild(i3);
35629
- }), r2.updateDisplay(), Mb.bind(r2.__select, "change", function() {
35582
+ }), r2.updateDisplay(), Eb.bind(r2.__select, "change", function() {
35630
35583
  var t4 = this.options[this.selectedIndex].value;
35631
35584
  s2.setValue(t4);
35632
35585
  }), r2.domElement.appendChild(r2.__select), r2;
35633
35586
  }
35634
- return _b(e2, t2), gb(e2, [{ key: "setValue", value: function(t3) {
35635
- var i2 = vb(e2.prototype.__proto__ || Object.getPrototypeOf(e2.prototype), "setValue", this).call(this, t3);
35587
+ return mb(e2, t2), pb(e2, [{ key: "setValue", value: function(t3) {
35588
+ var i2 = fb(e2.prototype.__proto__ || Object.getPrototypeOf(e2.prototype), "setValue", this).call(this, t3);
35636
35589
  return this.__onFinishChange && this.__onFinishChange.call(this, this.getValue()), i2;
35637
35590
  } }, { key: "updateDisplay", value: function() {
35638
- return Mb.isActive(this.__select) ? this : (this.__select.value = this.getValue(), vb(e2.prototype.__proto__ || Object.getPrototypeOf(e2.prototype), "updateDisplay", this).call(this));
35591
+ return Eb.isActive(this.__select) ? this : (this.__select.value = this.getValue(), fb(e2.prototype.__proto__ || Object.getPrototypeOf(e2.prototype), "updateDisplay", this).call(this));
35639
35592
  } }]), e2;
35640
- }(Sb), Ib = function(t2) {
35593
+ }(xb), Mb = function(t2) {
35641
35594
  function e2(t3, i2) {
35642
- mb(this, e2);
35643
- var n2 = yb(this, (e2.__proto__ || Object.getPrototypeOf(e2)).call(this, t3, i2)), r2 = n2;
35595
+ db(this, e2);
35596
+ var n2 = gb(this, (e2.__proto__ || Object.getPrototypeOf(e2)).call(this, t3, i2)), r2 = n2;
35644
35597
  function o2() {
35645
35598
  r2.setValue(r2.__input.value);
35646
35599
  }
35647
- return n2.__input = document.createElement("input"), n2.__input.setAttribute("type", "text"), Mb.bind(n2.__input, "keyup", o2), Mb.bind(n2.__input, "change", o2), Mb.bind(n2.__input, "blur", function() {
35600
+ return n2.__input = document.createElement("input"), n2.__input.setAttribute("type", "text"), Eb.bind(n2.__input, "keyup", o2), Eb.bind(n2.__input, "change", o2), Eb.bind(n2.__input, "blur", function() {
35648
35601
  r2.__onFinishChange && r2.__onFinishChange.call(r2, r2.getValue());
35649
- }), Mb.bind(n2.__input, "keydown", function(t4) {
35602
+ }), Eb.bind(n2.__input, "keydown", function(t4) {
35650
35603
  13 === t4.keyCode && this.blur();
35651
35604
  }), n2.updateDisplay(), n2.domElement.appendChild(n2.__input), n2;
35652
35605
  }
35653
- return _b(e2, t2), gb(e2, [{ key: "updateDisplay", value: function() {
35654
- return Mb.isActive(this.__input) || (this.__input.value = this.getValue()), vb(e2.prototype.__proto__ || Object.getPrototypeOf(e2.prototype), "updateDisplay", this).call(this);
35606
+ return mb(e2, t2), pb(e2, [{ key: "updateDisplay", value: function() {
35607
+ return Eb.isActive(this.__input) || (this.__input.value = this.getValue()), fb(e2.prototype.__proto__ || Object.getPrototypeOf(e2.prototype), "updateDisplay", this).call(this);
35655
35608
  } }]), e2;
35656
- }(Sb);
35657
- function Pb(t2) {
35609
+ }(xb);
35610
+ function Cb(t2) {
35658
35611
  var e2 = t2.toString();
35659
35612
  return e2.indexOf(".") > -1 ? e2.length - e2.indexOf(".") - 1 : 0;
35660
35613
  }
35661
- var Ob = function(t2) {
35614
+ var Rb = function(t2) {
35662
35615
  function e2(t3, i2, n2) {
35663
- mb(this, e2);
35664
- var r2 = yb(this, (e2.__proto__ || Object.getPrototypeOf(e2)).call(this, t3, i2)), o2 = n2 || {};
35665
- return r2.__min = o2.min, r2.__max = o2.max, r2.__step = o2.step, ab.isUndefined(r2.__step) ? 0 === r2.initialValue ? 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 = Pb(r2.__impliedStep), r2;
35616
+ db(this, e2);
35617
+ var r2 = gb(this, (e2.__proto__ || Object.getPrototypeOf(e2)).call(this, t3, i2)), o2 = n2 || {};
35618
+ return r2.__min = o2.min, r2.__max = o2.max, r2.__step = o2.step, rb.isUndefined(r2.__step) ? 0 === r2.initialValue ? 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 = Cb(r2.__impliedStep), r2;
35666
35619
  }
35667
- return _b(e2, t2), gb(e2, [{ key: "setValue", value: function(t3) {
35620
+ return mb(e2, t2), pb(e2, [{ key: "setValue", value: function(t3) {
35668
35621
  var i2 = t3;
35669
- return void 0 !== this.__min && i2 < this.__min ? i2 = this.__min : void 0 !== this.__max && i2 > this.__max && (i2 = this.__max), void 0 !== this.__step && i2 % this.__step != 0 && (i2 = Math.round(i2 / this.__step) * this.__step), vb(e2.prototype.__proto__ || Object.getPrototypeOf(e2.prototype), "setValue", this).call(this, i2);
35622
+ return void 0 !== this.__min && i2 < this.__min ? i2 = this.__min : void 0 !== this.__max && i2 > this.__max && (i2 = this.__max), void 0 !== this.__step && i2 % this.__step != 0 && (i2 = Math.round(i2 / this.__step) * this.__step), fb(e2.prototype.__proto__ || Object.getPrototypeOf(e2.prototype), "setValue", this).call(this, i2);
35670
35623
  } }, { key: "min", value: function(t3) {
35671
35624
  return this.__min = t3, this;
35672
35625
  } }, { key: "max", value: function(t3) {
35673
35626
  return this.__max = t3, this;
35674
35627
  } }, { key: "step", value: function(t3) {
35675
- return this.__step = t3, this.__impliedStep = t3, this.__precision = Pb(t3), this;
35628
+ return this.__step = t3, this.__impliedStep = t3, this.__precision = Cb(t3), this;
35676
35629
  } }]), e2;
35677
- }(Sb);
35678
- var Lb = function(t2) {
35630
+ }(xb);
35631
+ var Ib = function(t2) {
35679
35632
  function e2(t3, i2, n2) {
35680
- mb(this, e2);
35681
- var r2 = yb(this, (e2.__proto__ || Object.getPrototypeOf(e2)).call(this, t3, i2, n2));
35633
+ db(this, e2);
35634
+ var r2 = gb(this, (e2.__proto__ || Object.getPrototypeOf(e2)).call(this, t3, i2, n2));
35682
35635
  r2.__truncationSuspended = false;
35683
35636
  var o2 = r2, s2 = void 0;
35684
35637
  function a2() {
@@ -35689,101 +35642,101 @@ void main(void){
35689
35642
  o2.setValue(o2.getValue() + e3 * o2.__impliedStep), s2 = t4.clientY;
35690
35643
  }
35691
35644
  function h2() {
35692
- Mb.unbind(window, "mousemove", l2), Mb.unbind(window, "mouseup", h2), a2();
35645
+ Eb.unbind(window, "mousemove", l2), Eb.unbind(window, "mouseup", h2), a2();
35693
35646
  }
35694
- return r2.__input = document.createElement("input"), r2.__input.setAttribute("type", "text"), Mb.bind(r2.__input, "change", function() {
35647
+ return r2.__input = document.createElement("input"), r2.__input.setAttribute("type", "text"), Eb.bind(r2.__input, "change", function() {
35695
35648
  var t4 = parseFloat(o2.__input.value);
35696
- ab.isNaN(t4) || o2.setValue(t4);
35697
- }), Mb.bind(r2.__input, "blur", function() {
35649
+ rb.isNaN(t4) || o2.setValue(t4);
35650
+ }), Eb.bind(r2.__input, "blur", function() {
35698
35651
  a2();
35699
- }), Mb.bind(r2.__input, "mousedown", function(t4) {
35700
- Mb.bind(window, "mousemove", l2), Mb.bind(window, "mouseup", h2), s2 = t4.clientY;
35701
- }), Mb.bind(r2.__input, "keydown", function(t4) {
35652
+ }), Eb.bind(r2.__input, "mousedown", function(t4) {
35653
+ Eb.bind(window, "mousemove", l2), Eb.bind(window, "mouseup", h2), s2 = t4.clientY;
35654
+ }), Eb.bind(r2.__input, "keydown", function(t4) {
35702
35655
  13 === t4.keyCode && (o2.__truncationSuspended = true, this.blur(), o2.__truncationSuspended = false, a2());
35703
35656
  }), r2.updateDisplay(), r2.domElement.appendChild(r2.__input), r2;
35704
35657
  }
35705
- return _b(e2, t2), gb(e2, [{ key: "updateDisplay", value: function() {
35658
+ return mb(e2, t2), pb(e2, [{ key: "updateDisplay", value: function() {
35706
35659
  var t3, i2, n2;
35707
- return this.__input.value = this.__truncationSuspended ? this.getValue() : (t3 = this.getValue(), i2 = this.__precision, n2 = Math.pow(10, i2), Math.round(t3 * n2) / n2), vb(e2.prototype.__proto__ || Object.getPrototypeOf(e2.prototype), "updateDisplay", this).call(this);
35660
+ return this.__input.value = this.__truncationSuspended ? this.getValue() : (t3 = this.getValue(), i2 = this.__precision, n2 = Math.pow(10, i2), Math.round(t3 * n2) / n2), fb(e2.prototype.__proto__ || Object.getPrototypeOf(e2.prototype), "updateDisplay", this).call(this);
35708
35661
  } }]), e2;
35709
- }(Ob);
35710
- function Nb(t2, e2, i2, n2, r2) {
35662
+ }(Rb);
35663
+ function Pb(t2, e2, i2, n2, r2) {
35711
35664
  return n2 + (t2 - e2) / (i2 - e2) * (r2 - n2);
35712
35665
  }
35713
- var Db = function(t2) {
35666
+ var Ob = function(t2) {
35714
35667
  function e2(t3, i2, n2, r2, o2) {
35715
- mb(this, e2);
35716
- var s2 = yb(this, (e2.__proto__ || Object.getPrototypeOf(e2)).call(this, t3, i2, { min: n2, max: r2, step: o2 })), a2 = s2;
35668
+ db(this, e2);
35669
+ var s2 = gb(this, (e2.__proto__ || Object.getPrototypeOf(e2)).call(this, t3, i2, { min: n2, max: r2, step: o2 })), a2 = s2;
35717
35670
  function l2(t4) {
35718
35671
  t4.preventDefault();
35719
35672
  var e3 = a2.__background.getBoundingClientRect();
35720
- return a2.setValue(Nb(t4.clientX, e3.left, e3.right, a2.__min, a2.__max)), false;
35673
+ return a2.setValue(Pb(t4.clientX, e3.left, e3.right, a2.__min, a2.__max)), false;
35721
35674
  }
35722
35675
  function h2() {
35723
- Mb.unbind(window, "mousemove", l2), Mb.unbind(window, "mouseup", h2), a2.__onFinishChange && a2.__onFinishChange.call(a2, a2.getValue());
35676
+ Eb.unbind(window, "mousemove", l2), Eb.unbind(window, "mouseup", h2), a2.__onFinishChange && a2.__onFinishChange.call(a2, a2.getValue());
35724
35677
  }
35725
35678
  function u2(t4) {
35726
35679
  var e3 = t4.touches[0].clientX, i3 = a2.__background.getBoundingClientRect();
35727
- a2.setValue(Nb(e3, i3.left, i3.right, a2.__min, a2.__max));
35680
+ a2.setValue(Pb(e3, i3.left, i3.right, a2.__min, a2.__max));
35728
35681
  }
35729
35682
  function c2() {
35730
- Mb.unbind(window, "touchmove", u2), Mb.unbind(window, "touchend", c2), a2.__onFinishChange && a2.__onFinishChange.call(a2, a2.getValue());
35683
+ Eb.unbind(window, "touchmove", u2), Eb.unbind(window, "touchend", c2), a2.__onFinishChange && a2.__onFinishChange.call(a2, a2.getValue());
35731
35684
  }
35732
- return s2.__background = document.createElement("div"), s2.__foreground = document.createElement("div"), Mb.bind(s2.__background, "mousedown", function(t4) {
35733
- document.activeElement.blur(), Mb.bind(window, "mousemove", l2), Mb.bind(window, "mouseup", h2), l2(t4);
35734
- }), Mb.bind(s2.__background, "touchstart", function(t4) {
35685
+ return s2.__background = document.createElement("div"), s2.__foreground = document.createElement("div"), Eb.bind(s2.__background, "mousedown", function(t4) {
35686
+ document.activeElement.blur(), Eb.bind(window, "mousemove", l2), Eb.bind(window, "mouseup", h2), l2(t4);
35687
+ }), Eb.bind(s2.__background, "touchstart", function(t4) {
35735
35688
  if (1 !== t4.touches.length)
35736
35689
  return;
35737
- Mb.bind(window, "touchmove", u2), Mb.bind(window, "touchend", c2), u2(t4);
35738
- }), Mb.addClass(s2.__background, "slider"), Mb.addClass(s2.__foreground, "slider-fg"), s2.updateDisplay(), s2.__background.appendChild(s2.__foreground), s2.domElement.appendChild(s2.__background), s2;
35690
+ Eb.bind(window, "touchmove", u2), Eb.bind(window, "touchend", c2), u2(t4);
35691
+ }), Eb.addClass(s2.__background, "slider"), Eb.addClass(s2.__foreground, "slider-fg"), s2.updateDisplay(), s2.__background.appendChild(s2.__foreground), s2.domElement.appendChild(s2.__background), s2;
35739
35692
  }
35740
- return _b(e2, t2), gb(e2, [{ key: "updateDisplay", value: function() {
35693
+ return mb(e2, t2), pb(e2, [{ key: "updateDisplay", value: function() {
35741
35694
  var t3 = (this.getValue() - this.__min) / (this.__max - this.__min);
35742
- return this.__foreground.style.width = 100 * t3 + "%", vb(e2.prototype.__proto__ || Object.getPrototypeOf(e2.prototype), "updateDisplay", this).call(this);
35695
+ return this.__foreground.style.width = 100 * t3 + "%", fb(e2.prototype.__proto__ || Object.getPrototypeOf(e2.prototype), "updateDisplay", this).call(this);
35743
35696
  } }]), e2;
35744
- }(Ob), Fb = function(t2) {
35697
+ }(Rb), Lb = function(t2) {
35745
35698
  function e2(t3, i2, n2) {
35746
- mb(this, e2);
35747
- var r2 = yb(this, (e2.__proto__ || Object.getPrototypeOf(e2)).call(this, t3, i2)), o2 = r2;
35748
- return r2.__button = document.createElement("div"), r2.__button.innerHTML = void 0 === n2 ? "Fire" : n2, Mb.bind(r2.__button, "click", function(t4) {
35699
+ db(this, e2);
35700
+ var r2 = gb(this, (e2.__proto__ || Object.getPrototypeOf(e2)).call(this, t3, i2)), o2 = r2;
35701
+ return r2.__button = document.createElement("div"), r2.__button.innerHTML = void 0 === n2 ? "Fire" : n2, Eb.bind(r2.__button, "click", function(t4) {
35749
35702
  return t4.preventDefault(), o2.fire(), false;
35750
- }), Mb.addClass(r2.__button, "button"), r2.domElement.appendChild(r2.__button), r2;
35703
+ }), Eb.addClass(r2.__button, "button"), r2.domElement.appendChild(r2.__button), r2;
35751
35704
  }
35752
- return _b(e2, t2), gb(e2, [{ key: "fire", value: function() {
35705
+ return mb(e2, t2), pb(e2, [{ key: "fire", value: function() {
35753
35706
  this.__onChange && this.__onChange.call(this), this.getValue().call(this.object), this.__onFinishChange && this.__onFinishChange.call(this, this.getValue());
35754
35707
  } }]), e2;
35755
- }(Sb), Bb = function(t2) {
35708
+ }(xb), Nb = function(t2) {
35756
35709
  function e2(t3, i2) {
35757
- mb(this, e2);
35758
- var n2 = yb(this, (e2.__proto__ || Object.getPrototypeOf(e2)).call(this, t3, i2));
35759
- n2.__color = new xb(n2.getValue()), n2.__temp = new xb(0);
35710
+ db(this, e2);
35711
+ var n2 = gb(this, (e2.__proto__ || Object.getPrototypeOf(e2)).call(this, t3, i2));
35712
+ n2.__color = new vb(n2.getValue()), n2.__temp = new vb(0);
35760
35713
  var r2 = n2;
35761
- n2.domElement = document.createElement("div"), Mb.makeSelectable(n2.domElement, false), n2.__selector = document.createElement("div"), n2.__selector.className = "selector", n2.__saturation_field = document.createElement("div"), n2.__saturation_field.className = "saturation-field", n2.__field_knob = document.createElement("div"), n2.__field_knob.className = "field-knob", n2.__field_knob_border = "2px solid ", n2.__hue_knob = document.createElement("div"), n2.__hue_knob.className = "hue-knob", n2.__hue_field = document.createElement("div"), n2.__hue_field.className = "hue-field", n2.__input = document.createElement("input"), n2.__input.type = "text", n2.__input_textShadow = "0 1px 1px ", Mb.bind(n2.__input, "keydown", function(t4) {
35714
+ n2.domElement = document.createElement("div"), Eb.makeSelectable(n2.domElement, false), n2.__selector = document.createElement("div"), n2.__selector.className = "selector", n2.__saturation_field = document.createElement("div"), n2.__saturation_field.className = "saturation-field", n2.__field_knob = document.createElement("div"), n2.__field_knob.className = "field-knob", n2.__field_knob_border = "2px solid ", n2.__hue_knob = document.createElement("div"), n2.__hue_knob.className = "hue-knob", n2.__hue_field = document.createElement("div"), n2.__hue_field.className = "hue-field", n2.__input = document.createElement("input"), n2.__input.type = "text", n2.__input_textShadow = "0 1px 1px ", Eb.bind(n2.__input, "keydown", function(t4) {
35762
35715
  13 === t4.keyCode && c2.call(this);
35763
- }), Mb.bind(n2.__input, "blur", c2), Mb.bind(n2.__selector, "mousedown", function() {
35764
- Mb.addClass(this, "drag").bind(window, "mouseup", function() {
35765
- Mb.removeClass(r2.__selector, "drag");
35716
+ }), Eb.bind(n2.__input, "blur", c2), Eb.bind(n2.__selector, "mousedown", function() {
35717
+ Eb.addClass(this, "drag").bind(window, "mouseup", function() {
35718
+ Eb.removeClass(r2.__selector, "drag");
35766
35719
  });
35767
- }), Mb.bind(n2.__selector, "touchstart", function() {
35768
- Mb.addClass(this, "drag").bind(window, "touchend", function() {
35769
- Mb.removeClass(r2.__selector, "drag");
35720
+ }), Eb.bind(n2.__selector, "touchstart", function() {
35721
+ Eb.addClass(this, "drag").bind(window, "touchend", function() {
35722
+ Eb.removeClass(r2.__selector, "drag");
35770
35723
  });
35771
35724
  });
35772
35725
  var o2, s2 = document.createElement("div");
35773
35726
  function a2(t4) {
35774
- p2(t4), Mb.bind(window, "mousemove", p2), Mb.bind(window, "touchmove", p2), Mb.bind(window, "mouseup", h2), Mb.bind(window, "touchend", h2);
35727
+ p2(t4), Eb.bind(window, "mousemove", p2), Eb.bind(window, "touchmove", p2), Eb.bind(window, "mouseup", h2), Eb.bind(window, "touchend", h2);
35775
35728
  }
35776
35729
  function l2(t4) {
35777
- f2(t4), Mb.bind(window, "mousemove", f2), Mb.bind(window, "touchmove", f2), Mb.bind(window, "mouseup", u2), Mb.bind(window, "touchend", u2);
35730
+ f2(t4), Eb.bind(window, "mousemove", f2), Eb.bind(window, "touchmove", f2), Eb.bind(window, "mouseup", u2), Eb.bind(window, "touchend", u2);
35778
35731
  }
35779
35732
  function h2() {
35780
- Mb.unbind(window, "mousemove", p2), Mb.unbind(window, "touchmove", p2), Mb.unbind(window, "mouseup", h2), Mb.unbind(window, "touchend", h2), d2();
35733
+ Eb.unbind(window, "mousemove", p2), Eb.unbind(window, "touchmove", p2), Eb.unbind(window, "mouseup", h2), Eb.unbind(window, "touchend", h2), d2();
35781
35734
  }
35782
35735
  function u2() {
35783
- Mb.unbind(window, "mousemove", f2), Mb.unbind(window, "touchmove", f2), Mb.unbind(window, "mouseup", u2), Mb.unbind(window, "touchend", u2), d2();
35736
+ Eb.unbind(window, "mousemove", f2), Eb.unbind(window, "touchmove", f2), Eb.unbind(window, "mouseup", u2), Eb.unbind(window, "touchend", u2), d2();
35784
35737
  }
35785
35738
  function c2() {
35786
- var t4 = cb(this.value);
35739
+ var t4 = lb(this.value);
35787
35740
  false !== t4 ? (r2.__color.__state = t4, r2.setValue(r2.__color.toOriginal())) : this.value = r2.__color.toString();
35788
35741
  }
35789
35742
  function d2() {
@@ -35799,28 +35752,28 @@ void main(void){
35799
35752
  var e3 = r2.__hue_field.getBoundingClientRect(), i3 = 1 - ((t4.touches && t4.touches[0] || t4).clientY - e3.top) / (e3.bottom - e3.top);
35800
35753
  return i3 > 1 ? i3 = 1 : i3 < 0 && (i3 = 0), r2.__color.h = 360 * i3, r2.setValue(r2.__color.toOriginal()), false;
35801
35754
  }
35802
- return ab.extend(n2.__selector.style, { width: "122px", height: "102px", padding: "3px", backgroundColor: "#222", boxShadow: "0px 1px 3px rgba(0,0,0,0.3)" }), ab.extend(n2.__field_knob.style, { position: "absolute", width: "12px", height: "12px", border: n2.__field_knob_border + (n2.__color.v < 0.5 ? "#fff" : "#000"), boxShadow: "0px 1px 3px rgba(0,0,0,0.5)", borderRadius: "12px", zIndex: 1 }), ab.extend(n2.__hue_knob.style, { position: "absolute", width: "15px", height: "2px", borderRight: "4px solid #fff", zIndex: 1 }), ab.extend(n2.__saturation_field.style, { width: "100px", height: "100px", border: "1px solid #555", marginRight: "3px", display: "inline-block", cursor: "pointer" }), ab.extend(s2.style, { width: "100%", height: "100%", background: "none" }), Ub(s2, "top", "rgba(0,0,0,0)", "#000"), ab.extend(n2.__hue_field.style, { width: "15px", height: "100px", border: "1px solid #555", cursor: "ns-resize", position: "absolute", top: "3px", right: "3px" }), (o2 = n2.__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%);", ab.extend(n2.__input.style, { outline: "none", textAlign: "center", color: "#fff", border: 0, fontWeight: "bold", textShadow: n2.__input_textShadow + "rgba(0,0,0,0.7)" }), Mb.bind(n2.__saturation_field, "mousedown", a2), Mb.bind(n2.__saturation_field, "touchstart", a2), Mb.bind(n2.__field_knob, "mousedown", a2), Mb.bind(n2.__field_knob, "touchstart", a2), Mb.bind(n2.__hue_field, "mousedown", l2), Mb.bind(n2.__hue_field, "touchstart", l2), n2.__saturation_field.appendChild(s2), n2.__selector.appendChild(n2.__field_knob), n2.__selector.appendChild(n2.__saturation_field), n2.__selector.appendChild(n2.__hue_field), n2.__hue_field.appendChild(n2.__hue_knob), n2.domElement.appendChild(n2.__input), n2.domElement.appendChild(n2.__selector), n2.updateDisplay(), n2;
35755
+ return rb.extend(n2.__selector.style, { width: "122px", height: "102px", padding: "3px", backgroundColor: "#222", boxShadow: "0px 1px 3px rgba(0,0,0,0.3)" }), rb.extend(n2.__field_knob.style, { position: "absolute", width: "12px", height: "12px", border: n2.__field_knob_border + (n2.__color.v < 0.5 ? "#fff" : "#000"), boxShadow: "0px 1px 3px rgba(0,0,0,0.5)", borderRadius: "12px", zIndex: 1 }), rb.extend(n2.__hue_knob.style, { position: "absolute", width: "15px", height: "2px", borderRight: "4px solid #fff", zIndex: 1 }), rb.extend(n2.__saturation_field.style, { width: "100px", height: "100px", border: "1px solid #555", marginRight: "3px", display: "inline-block", cursor: "pointer" }), rb.extend(s2.style, { width: "100%", height: "100%", background: "none" }), Fb(s2, "top", "rgba(0,0,0,0)", "#000"), rb.extend(n2.__hue_field.style, { width: "15px", height: "100px", border: "1px solid #555", cursor: "ns-resize", position: "absolute", top: "3px", right: "3px" }), (o2 = n2.__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%);", rb.extend(n2.__input.style, { outline: "none", textAlign: "center", color: "#fff", border: 0, fontWeight: "bold", textShadow: n2.__input_textShadow + "rgba(0,0,0,0.7)" }), Eb.bind(n2.__saturation_field, "mousedown", a2), Eb.bind(n2.__saturation_field, "touchstart", a2), Eb.bind(n2.__field_knob, "mousedown", a2), Eb.bind(n2.__field_knob, "touchstart", a2), Eb.bind(n2.__hue_field, "mousedown", l2), Eb.bind(n2.__hue_field, "touchstart", l2), n2.__saturation_field.appendChild(s2), n2.__selector.appendChild(n2.__field_knob), n2.__selector.appendChild(n2.__saturation_field), n2.__selector.appendChild(n2.__hue_field), n2.__hue_field.appendChild(n2.__hue_knob), n2.domElement.appendChild(n2.__input), n2.domElement.appendChild(n2.__selector), n2.updateDisplay(), n2;
35803
35756
  }
35804
- return _b(e2, t2), gb(e2, [{ key: "updateDisplay", value: function() {
35805
- var t3 = cb(this.getValue());
35757
+ return mb(e2, t2), pb(e2, [{ key: "updateDisplay", value: function() {
35758
+ var t3 = lb(this.getValue());
35806
35759
  if (false !== t3) {
35807
35760
  var e3 = false;
35808
- ab.each(xb.COMPONENTS, function(i3) {
35809
- if (!ab.isUndefined(t3[i3]) && !ab.isUndefined(this.__color.__state[i3]) && t3[i3] !== this.__color.__state[i3])
35761
+ rb.each(vb.COMPONENTS, function(i3) {
35762
+ if (!rb.isUndefined(t3[i3]) && !rb.isUndefined(this.__color.__state[i3]) && t3[i3] !== this.__color.__state[i3])
35810
35763
  return e3 = true, {};
35811
- }, this), e3 && ab.extend(this.__color.__state, t3);
35764
+ }, this), e3 && rb.extend(this.__color.__state, t3);
35812
35765
  }
35813
- ab.extend(this.__temp.__state, this.__color.__state), this.__temp.a = 1;
35766
+ rb.extend(this.__temp.__state, this.__color.__state), this.__temp.a = 1;
35814
35767
  var i2 = this.__color.v < 0.5 || this.__color.s > 0.5 ? 255 : 0, n2 = 255 - i2;
35815
- ab.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(" + i2 + "," + i2 + "," + i2 + ")" }), this.__hue_knob.style.marginTop = 100 * (1 - this.__color.h / 360) + "px", this.__temp.s = 1, this.__temp.v = 1, Ub(this.__saturation_field, "left", "#fff", this.__temp.toHexString()), this.__input.value = this.__color.toString(), ab.extend(this.__input.style, { backgroundColor: this.__color.toHexString(), color: "rgb(" + i2 + "," + i2 + "," + i2 + ")", textShadow: this.__input_textShadow + "rgba(" + n2 + "," + n2 + "," + n2 + ",.7)" });
35768
+ rb.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(" + i2 + "," + i2 + "," + i2 + ")" }), this.__hue_knob.style.marginTop = 100 * (1 - this.__color.h / 360) + "px", this.__temp.s = 1, this.__temp.v = 1, Fb(this.__saturation_field, "left", "#fff", this.__temp.toHexString()), this.__input.value = this.__color.toString(), rb.extend(this.__input.style, { backgroundColor: this.__color.toHexString(), color: "rgb(" + i2 + "," + i2 + "," + i2 + ")", textShadow: this.__input_textShadow + "rgba(" + n2 + "," + n2 + "," + n2 + ",.7)" });
35816
35769
  } }]), e2;
35817
- }(Sb), kb = ["-moz-", "-o-", "-webkit-", "-ms-", ""];
35818
- function Ub(t2, e2, i2, n2) {
35819
- t2.style.background = "", ab.each(kb, function(r2) {
35770
+ }(xb), Db = ["-moz-", "-o-", "-webkit-", "-ms-", ""];
35771
+ function Fb(t2, e2, i2, n2) {
35772
+ t2.style.background = "", rb.each(Db, function(r2) {
35820
35773
  t2.style.cssText += "background: " + r2 + "linear-gradient(" + e2 + ", " + i2 + " 0%, " + n2 + " 100%); ";
35821
35774
  });
35822
35775
  }
35823
- var Gb = function(t2, e2) {
35776
+ var Bb = function(t2, e2) {
35824
35777
  var i2 = e2 || document, n2 = document.createElement("style");
35825
35778
  n2.type = "text/css", n2.innerHTML = t2;
35826
35779
  var r2 = i2.getElementsByTagName("head")[0];
@@ -35828,7 +35781,7 @@ void main(void){
35828
35781
  r2.appendChild(n2);
35829
35782
  } catch (t3) {
35830
35783
  }
35831
- }, Hb = `<div id="dg-save" class="dg dialogue">
35784
+ }, kb = `<div id="dg-save" class="dg dialogue">
35832
35785
 
35833
35786
  Here's the new load parameter for your <code>GUI</code>'s constructor:
35834
35787
 
@@ -35848,50 +35801,50 @@ void main(void){
35848
35801
 
35849
35802
  </div>
35850
35803
 
35851
- </div>`, jb = function(t2, e2) {
35804
+ </div>`, Ub = function(t2, e2) {
35852
35805
  var i2 = t2[e2];
35853
- return ab.isArray(arguments[2]) || ab.isObject(arguments[2]) ? new Rb(t2, e2, arguments[2]) : ab.isNumber(i2) ? ab.isNumber(arguments[2]) && ab.isNumber(arguments[3]) ? ab.isNumber(arguments[4]) ? new Db(t2, e2, arguments[2], arguments[3], arguments[4]) : new Db(t2, e2, arguments[2], arguments[3]) : ab.isNumber(arguments[4]) ? new Lb(t2, e2, { min: arguments[2], max: arguments[3], step: arguments[4] }) : new Lb(t2, e2, { min: arguments[2], max: arguments[3] }) : ab.isString(i2) ? new Ib(t2, e2) : ab.isFunction(i2) ? new Fb(t2, e2, "") : ab.isBoolean(i2) ? new Cb(t2, e2) : null;
35806
+ return rb.isArray(arguments[2]) || rb.isObject(arguments[2]) ? new Ab(t2, e2, arguments[2]) : rb.isNumber(i2) ? rb.isNumber(arguments[2]) && rb.isNumber(arguments[3]) ? rb.isNumber(arguments[4]) ? new Ob(t2, e2, arguments[2], arguments[3], arguments[4]) : new Ob(t2, e2, arguments[2], arguments[3]) : rb.isNumber(arguments[4]) ? new Ib(t2, e2, { min: arguments[2], max: arguments[3], step: arguments[4] }) : new Ib(t2, e2, { min: arguments[2], max: arguments[3] }) : rb.isString(i2) ? new Mb(t2, e2) : rb.isFunction(i2) ? new Lb(t2, e2, "") : rb.isBoolean(i2) ? new wb(t2, e2) : null;
35854
35807
  };
35855
- var zb = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function(t2) {
35808
+ var Gb = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function(t2) {
35856
35809
  setTimeout(t2, 1e3 / 60);
35857
- }, Vb = function() {
35810
+ }, Hb = function() {
35858
35811
  function t2() {
35859
- mb(this, t2), this.backgroundElement = document.createElement("div"), ab.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" }), Mb.makeFullscreen(this.backgroundElement), this.backgroundElement.style.position = "fixed", this.domElement = document.createElement("div"), ab.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);
35812
+ db(this, t2), this.backgroundElement = document.createElement("div"), rb.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" }), Eb.makeFullscreen(this.backgroundElement), this.backgroundElement.style.position = "fixed", this.domElement = document.createElement("div"), rb.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);
35860
35813
  var e2 = this;
35861
- Mb.bind(this.backgroundElement, "click", function() {
35814
+ Eb.bind(this.backgroundElement, "click", function() {
35862
35815
  e2.hide();
35863
35816
  });
35864
35817
  }
35865
- return gb(t2, [{ key: "show", value: function() {
35818
+ return pb(t2, [{ key: "show", value: function() {
35866
35819
  var t3 = this;
35867
- this.backgroundElement.style.display = "block", this.domElement.style.display = "block", this.domElement.style.opacity = 0, this.domElement.style.webkitTransform = "scale(1.1)", this.layout(), ab.defer(function() {
35820
+ this.backgroundElement.style.display = "block", this.domElement.style.display = "block", this.domElement.style.opacity = 0, this.domElement.style.webkitTransform = "scale(1.1)", this.layout(), rb.defer(function() {
35868
35821
  t3.backgroundElement.style.opacity = 1, t3.domElement.style.opacity = 1, t3.domElement.style.webkitTransform = "scale(1)";
35869
35822
  });
35870
35823
  } }, { key: "hide", value: function() {
35871
35824
  var t3 = this, e2 = function e3() {
35872
- t3.domElement.style.display = "none", t3.backgroundElement.style.display = "none", Mb.unbind(t3.domElement, "webkitTransitionEnd", e3), Mb.unbind(t3.domElement, "transitionend", e3), Mb.unbind(t3.domElement, "oTransitionEnd", e3);
35825
+ t3.domElement.style.display = "none", t3.backgroundElement.style.display = "none", Eb.unbind(t3.domElement, "webkitTransitionEnd", e3), Eb.unbind(t3.domElement, "transitionend", e3), Eb.unbind(t3.domElement, "oTransitionEnd", e3);
35873
35826
  };
35874
- Mb.bind(this.domElement, "webkitTransitionEnd", e2), Mb.bind(this.domElement, "transitionend", e2), Mb.bind(this.domElement, "oTransitionEnd", e2), this.backgroundElement.style.opacity = 0, this.domElement.style.opacity = 0, this.domElement.style.webkitTransform = "scale(1.1)";
35827
+ Eb.bind(this.domElement, "webkitTransitionEnd", e2), Eb.bind(this.domElement, "transitionend", e2), Eb.bind(this.domElement, "oTransitionEnd", e2), this.backgroundElement.style.opacity = 0, this.domElement.style.opacity = 0, this.domElement.style.webkitTransform = "scale(1.1)";
35875
35828
  } }, { key: "layout", value: function() {
35876
- this.domElement.style.left = window.innerWidth / 2 - Mb.getWidth(this.domElement) / 2 + "px", this.domElement.style.top = window.innerHeight / 2 - Mb.getHeight(this.domElement) / 2 + "px";
35829
+ this.domElement.style.left = window.innerWidth / 2 - Eb.getWidth(this.domElement) / 2 + "px", this.domElement.style.top = window.innerHeight / 2 - Eb.getHeight(this.domElement) / 2 + "px";
35877
35830
  } }]), t2;
35878
35831
  }();
35879
- Gb(function(t2) {
35832
+ Bb(function(t2) {
35880
35833
  if (t2 && "undefined" != typeof window) {
35881
35834
  var e2 = document.createElement("style");
35882
35835
  return e2.setAttribute("type", "text/css"), e2.innerHTML = t2, document.head.appendChild(e2), t2;
35883
35836
  }
35884
35837
  }(".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 .cr.function .property-name{width:100%}.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"));
35885
- var Wb = function() {
35838
+ var jb = function() {
35886
35839
  try {
35887
35840
  return !!window.localStorage;
35888
35841
  } catch (t2) {
35889
35842
  return false;
35890
35843
  }
35891
- }(), Xb = void 0, Yb = true, qb = void 0, Zb = false, Jb = [], Kb = function t2(e2) {
35844
+ }(), zb = void 0, Vb = true, Wb = void 0, Xb = false, Yb = [], qb = function t2(e2) {
35892
35845
  var i2 = this, n2 = e2 || {};
35893
- this.domElement = document.createElement("div"), this.__ul = document.createElement("ul"), this.domElement.appendChild(this.__ul), Mb.addClass(this.domElement, "dg"), this.__folders = {}, this.__controllers = [], this.__rememberedObjects = [], this.__rememberedObjectIndecesToControllers = [], this.__listening = [], n2 = ab.defaults(n2, { closeOnTop: false, autoPlace: true, width: t2.DEFAULT_WIDTH }), n2 = ab.defaults(n2, { resizable: n2.autoPlace, hideable: n2.autoPlace }), ab.isUndefined(n2.load) ? n2.load = { preset: "Default" } : n2.preset && (n2.load.preset = n2.preset), ab.isUndefined(n2.parent) && n2.hideable && Jb.push(this), n2.resizable = ab.isUndefined(n2.parent) && n2.resizable, n2.autoPlace && ab.isUndefined(n2.scrollable) && (n2.scrollable = true);
35894
- var r2, o2 = Wb && "true" === localStorage.getItem(nT(this, "isLocal")), s2 = void 0, a2 = void 0;
35846
+ this.domElement = document.createElement("div"), this.__ul = document.createElement("ul"), this.domElement.appendChild(this.__ul), Eb.addClass(this.domElement, "dg"), this.__folders = {}, this.__controllers = [], this.__rememberedObjects = [], this.__rememberedObjectIndecesToControllers = [], this.__listening = [], n2 = rb.defaults(n2, { closeOnTop: false, autoPlace: true, width: t2.DEFAULT_WIDTH }), n2 = rb.defaults(n2, { resizable: n2.autoPlace, hideable: n2.autoPlace }), rb.isUndefined(n2.load) ? n2.load = { preset: "Default" } : n2.preset && (n2.load.preset = n2.preset), rb.isUndefined(n2.parent) && n2.hideable && Yb.push(this), n2.resizable = rb.isUndefined(n2.parent) && n2.resizable, n2.autoPlace && rb.isUndefined(n2.scrollable) && (n2.scrollable = true);
35847
+ var r2, o2 = jb && "true" === localStorage.getItem(tT(this, "isLocal")), s2 = void 0, a2 = void 0;
35895
35848
  if (Object.defineProperties(this, { parent: { get: function() {
35896
35849
  return n2.parent;
35897
35850
  } }, scrollable: { get: function() {
@@ -35910,7 +35863,7 @@ void main(void){
35910
35863
  } }, width: { get: function() {
35911
35864
  return n2.width;
35912
35865
  }, set: function(t3) {
35913
- n2.width = t3, lT(i2, t3);
35866
+ n2.width = t3, oT(i2, t3);
35914
35867
  } }, name: { get: function() {
35915
35868
  return n2.name;
35916
35869
  }, set: function(t3) {
@@ -35918,50 +35871,50 @@ void main(void){
35918
35871
  } }, closed: { get: function() {
35919
35872
  return n2.closed;
35920
35873
  }, set: function(e3) {
35921
- n2.closed = e3, n2.closed ? Mb.addClass(i2.__ul, t2.CLASS_CLOSED) : Mb.removeClass(i2.__ul, t2.CLASS_CLOSED), this.onResize(), i2.__closeButton && (i2.__closeButton.innerHTML = e3 ? t2.TEXT_OPEN : t2.TEXT_CLOSED);
35874
+ n2.closed = e3, n2.closed ? Eb.addClass(i2.__ul, t2.CLASS_CLOSED) : Eb.removeClass(i2.__ul, t2.CLASS_CLOSED), this.onResize(), i2.__closeButton && (i2.__closeButton.innerHTML = e3 ? t2.TEXT_OPEN : t2.TEXT_CLOSED);
35922
35875
  } }, load: { get: function() {
35923
35876
  return n2.load;
35924
35877
  } }, useLocalStorage: { get: function() {
35925
35878
  return o2;
35926
35879
  }, set: function(t3) {
35927
- Wb && (o2 = t3, t3 ? Mb.bind(window, "unload", s2) : Mb.unbind(window, "unload", s2), localStorage.setItem(nT(i2, "isLocal"), t3));
35928
- } } }), ab.isUndefined(n2.parent)) {
35929
- if (this.closed = n2.closed || false, Mb.addClass(this.domElement, t2.CLASS_MAIN), Mb.makeSelectable(this.domElement, false), Wb && o2) {
35880
+ jb && (o2 = t3, t3 ? Eb.bind(window, "unload", s2) : Eb.unbind(window, "unload", s2), localStorage.setItem(tT(i2, "isLocal"), t3));
35881
+ } } }), rb.isUndefined(n2.parent)) {
35882
+ if (this.closed = n2.closed || false, Eb.addClass(this.domElement, t2.CLASS_MAIN), Eb.makeSelectable(this.domElement, false), jb && o2) {
35930
35883
  i2.useLocalStorage = true;
35931
- var l2 = localStorage.getItem(nT(this, "gui"));
35884
+ var l2 = localStorage.getItem(tT(this, "gui"));
35932
35885
  l2 && (n2.load = JSON.parse(l2));
35933
35886
  }
35934
- this.__closeButton = document.createElement("div"), this.__closeButton.innerHTML = t2.TEXT_CLOSED, Mb.addClass(this.__closeButton, t2.CLASS_CLOSE_BUTTON), n2.closeOnTop ? (Mb.addClass(this.__closeButton, t2.CLASS_CLOSE_TOP), this.domElement.insertBefore(this.__closeButton, this.domElement.childNodes[0])) : (Mb.addClass(this.__closeButton, t2.CLASS_CLOSE_BOTTOM), this.domElement.appendChild(this.__closeButton)), Mb.bind(this.__closeButton, "click", function() {
35887
+ this.__closeButton = document.createElement("div"), this.__closeButton.innerHTML = t2.TEXT_CLOSED, Eb.addClass(this.__closeButton, t2.CLASS_CLOSE_BUTTON), n2.closeOnTop ? (Eb.addClass(this.__closeButton, t2.CLASS_CLOSE_TOP), this.domElement.insertBefore(this.__closeButton, this.domElement.childNodes[0])) : (Eb.addClass(this.__closeButton, t2.CLASS_CLOSE_BOTTOM), this.domElement.appendChild(this.__closeButton)), Eb.bind(this.__closeButton, "click", function() {
35935
35888
  i2.closed = !i2.closed;
35936
35889
  });
35937
35890
  } else {
35938
35891
  void 0 === n2.closed && (n2.closed = true);
35939
35892
  var h2 = document.createTextNode(n2.name);
35940
- Mb.addClass(h2, "controller-name"), a2 = Qb(i2, h2);
35941
- Mb.addClass(this.__ul, t2.CLASS_CLOSED), Mb.addClass(a2, "title"), Mb.bind(a2, "click", function(t3) {
35893
+ Eb.addClass(h2, "controller-name"), a2 = Zb(i2, h2);
35894
+ Eb.addClass(this.__ul, t2.CLASS_CLOSED), Eb.addClass(a2, "title"), Eb.bind(a2, "click", function(t3) {
35942
35895
  return t3.preventDefault(), i2.closed = !i2.closed, false;
35943
35896
  }), n2.closed || (this.closed = false);
35944
35897
  }
35945
- n2.autoPlace && (ab.isUndefined(n2.parent) && (Yb && (qb = document.createElement("div"), Mb.addClass(qb, "dg"), Mb.addClass(qb, t2.CLASS_AUTO_PLACE_CONTAINER), document.body.appendChild(qb), Yb = false), qb.appendChild(this.domElement), Mb.addClass(this.domElement, t2.CLASS_AUTO_PLACE)), this.parent || lT(i2, n2.width)), this.__resizeHandler = function() {
35898
+ n2.autoPlace && (rb.isUndefined(n2.parent) && (Vb && (Wb = document.createElement("div"), Eb.addClass(Wb, "dg"), Eb.addClass(Wb, t2.CLASS_AUTO_PLACE_CONTAINER), document.body.appendChild(Wb), Vb = false), Wb.appendChild(this.domElement), Eb.addClass(this.domElement, t2.CLASS_AUTO_PLACE)), this.parent || oT(i2, n2.width)), this.__resizeHandler = function() {
35946
35899
  i2.onResizeDebounced();
35947
- }, Mb.bind(window, "resize", this.__resizeHandler), Mb.bind(this.__ul, "webkitTransitionEnd", this.__resizeHandler), Mb.bind(this.__ul, "transitionend", this.__resizeHandler), Mb.bind(this.__ul, "oTransitionEnd", this.__resizeHandler), this.onResize(), n2.resizable && aT(this), s2 = function() {
35948
- Wb && "true" === localStorage.getItem(nT(i2, "isLocal")) && localStorage.setItem(nT(i2, "gui"), JSON.stringify(i2.getSaveObject()));
35949
- }, this.saveToLocalStorageIfPossible = s2, n2.parent || ((r2 = i2.getRoot()).width += 1, ab.defer(function() {
35900
+ }, Eb.bind(window, "resize", this.__resizeHandler), Eb.bind(this.__ul, "webkitTransitionEnd", this.__resizeHandler), Eb.bind(this.__ul, "transitionend", this.__resizeHandler), Eb.bind(this.__ul, "oTransitionEnd", this.__resizeHandler), this.onResize(), n2.resizable && rT(this), s2 = function() {
35901
+ jb && "true" === localStorage.getItem(tT(i2, "isLocal")) && localStorage.setItem(tT(i2, "gui"), JSON.stringify(i2.getSaveObject()));
35902
+ }, this.saveToLocalStorageIfPossible = s2, n2.parent || ((r2 = i2.getRoot()).width += 1, rb.defer(function() {
35950
35903
  r2.width -= 1;
35951
35904
  }));
35952
35905
  };
35953
- function Qb(t2, e2, i2) {
35906
+ function Zb(t2, e2, i2) {
35954
35907
  var n2 = document.createElement("li");
35955
35908
  return e2 && n2.appendChild(e2), i2 ? t2.__ul.insertBefore(n2, i2) : t2.__ul.appendChild(n2), t2.onResize(), n2;
35956
35909
  }
35957
- function $b(t2) {
35958
- Mb.unbind(window, "resize", t2.__resizeHandler), t2.saveToLocalStorageIfPossible && Mb.unbind(window, "unload", t2.saveToLocalStorageIfPossible);
35910
+ function Jb(t2) {
35911
+ Eb.unbind(window, "resize", t2.__resizeHandler), t2.saveToLocalStorageIfPossible && Eb.unbind(window, "unload", t2.saveToLocalStorageIfPossible);
35959
35912
  }
35960
- function tT(t2, e2) {
35913
+ function Kb(t2, e2) {
35961
35914
  var i2 = t2.__preset_select[t2.__preset_select.selectedIndex];
35962
35915
  i2.innerHTML = e2 ? i2.value + "*" : i2.value;
35963
35916
  }
35964
- function eT(t2, e2) {
35917
+ function Qb(t2, e2) {
35965
35918
  var i2 = t2.getRoot(), n2 = i2.__rememberedObjects.indexOf(e2.object);
35966
35919
  if (-1 !== n2) {
35967
35920
  var r2 = i2.__rememberedObjectIndecesToControllers[n2];
@@ -35981,31 +35934,31 @@ void main(void){
35981
35934
  }
35982
35935
  }
35983
35936
  }
35984
- function iT(t2, e2, i2, n2) {
35937
+ function $b(t2, e2, i2, n2) {
35985
35938
  if (void 0 === e2[i2])
35986
35939
  throw new Error('Object "' + e2 + '" has no property "' + i2 + '"');
35987
35940
  var r2 = void 0;
35988
35941
  if (n2.color)
35989
- r2 = new Bb(e2, i2);
35942
+ r2 = new Nb(e2, i2);
35990
35943
  else {
35991
35944
  var o2 = [e2, i2].concat(n2.factoryArgs);
35992
- r2 = jb.apply(t2, o2);
35945
+ r2 = Ub.apply(t2, o2);
35993
35946
  }
35994
- n2.before instanceof Sb && (n2.before = n2.before.__li), eT(t2, r2), Mb.addClass(r2.domElement, "c");
35947
+ n2.before instanceof xb && (n2.before = n2.before.__li), Qb(t2, r2), Eb.addClass(r2.domElement, "c");
35995
35948
  var s2 = document.createElement("span");
35996
- Mb.addClass(s2, "property-name"), s2.innerHTML = r2.property;
35949
+ Eb.addClass(s2, "property-name"), s2.innerHTML = r2.property;
35997
35950
  var a2 = document.createElement("div");
35998
35951
  a2.appendChild(s2), a2.appendChild(r2.domElement);
35999
- var l2 = Qb(t2, a2, n2.before);
36000
- return Mb.addClass(l2, Kb.CLASS_CONTROLLER_ROW), r2 instanceof Bb ? Mb.addClass(l2, "color") : Mb.addClass(l2, fb(r2.getValue())), function(t3, e3, i3) {
36001
- if (i3.__li = e3, i3.__gui = t3, ab.extend(i3, { options: function(e4) {
35952
+ var l2 = Zb(t2, a2, n2.before);
35953
+ return Eb.addClass(l2, qb.CLASS_CONTROLLER_ROW), r2 instanceof Nb ? Eb.addClass(l2, "color") : Eb.addClass(l2, cb(r2.getValue())), function(t3, e3, i3) {
35954
+ if (i3.__li = e3, i3.__gui = t3, rb.extend(i3, { options: function(e4) {
36002
35955
  if (arguments.length > 1) {
36003
35956
  var n4 = i3.__li.nextElementSibling;
36004
- return i3.remove(), iT(t3, i3.object, i3.property, { before: n4, factoryArgs: [ab.toArray(arguments)] });
35957
+ return i3.remove(), $b(t3, i3.object, i3.property, { before: n4, factoryArgs: [rb.toArray(arguments)] });
36005
35958
  }
36006
- if (ab.isArray(e4) || ab.isObject(e4)) {
35959
+ if (rb.isArray(e4) || rb.isObject(e4)) {
36007
35960
  var r4 = i3.__li.nextElementSibling;
36008
- return i3.remove(), iT(t3, i3.object, i3.property, { before: r4, factoryArgs: [e4] });
35961
+ return i3.remove(), $b(t3, i3.object, i3.property, { before: r4, factoryArgs: [e4] });
36009
35962
  }
36010
35963
  }, name: function(t4) {
36011
35964
  return i3.__li.firstElementChild.firstElementChild.innerHTML = t4, i3;
@@ -36013,157 +35966,157 @@ void main(void){
36013
35966
  return i3.__gui.listen(i3), i3;
36014
35967
  }, remove: function() {
36015
35968
  return i3.__gui.remove(i3), i3;
36016
- } }), i3 instanceof Db) {
36017
- var n3 = new Lb(i3.object, i3.property, { min: i3.__min, max: i3.__max, step: i3.__step });
36018
- ab.each(["updateDisplay", "onChange", "onFinishChange", "step", "min", "max"], function(t4) {
35969
+ } }), i3 instanceof Ob) {
35970
+ var n3 = new Ib(i3.object, i3.property, { min: i3.__min, max: i3.__max, step: i3.__step });
35971
+ rb.each(["updateDisplay", "onChange", "onFinishChange", "step", "min", "max"], function(t4) {
36019
35972
  var e4 = i3[t4], r4 = n3[t4];
36020
35973
  i3[t4] = n3[t4] = function() {
36021
35974
  var t5 = Array.prototype.slice.call(arguments);
36022
35975
  return r4.apply(n3, t5), e4.apply(i3, t5);
36023
35976
  };
36024
- }), Mb.addClass(e3, "has-slider"), i3.domElement.insertBefore(n3.domElement, i3.domElement.firstElementChild);
36025
- } else if (i3 instanceof Lb) {
35977
+ }), Eb.addClass(e3, "has-slider"), i3.domElement.insertBefore(n3.domElement, i3.domElement.firstElementChild);
35978
+ } else if (i3 instanceof Ib) {
36026
35979
  var r3 = function(e4) {
36027
- if (ab.isNumber(i3.__min) && ab.isNumber(i3.__max)) {
35980
+ if (rb.isNumber(i3.__min) && rb.isNumber(i3.__max)) {
36028
35981
  var n4 = i3.__li.firstElementChild.firstElementChild.innerHTML, r4 = i3.__gui.__listening.indexOf(i3) > -1;
36029
35982
  i3.remove();
36030
- var o3 = iT(t3, i3.object, i3.property, { before: i3.__li.nextElementSibling, factoryArgs: [i3.__min, i3.__max, i3.__step] });
35983
+ var o3 = $b(t3, i3.object, i3.property, { before: i3.__li.nextElementSibling, factoryArgs: [i3.__min, i3.__max, i3.__step] });
36031
35984
  return o3.name(n4), r4 && o3.listen(), o3;
36032
35985
  }
36033
35986
  return e4;
36034
35987
  };
36035
- i3.min = ab.compose(r3, i3.min), i3.max = ab.compose(r3, i3.max);
35988
+ i3.min = rb.compose(r3, i3.min), i3.max = rb.compose(r3, i3.max);
36036
35989
  } else
36037
- i3 instanceof Cb ? (Mb.bind(e3, "click", function() {
36038
- Mb.fakeEvent(i3.__checkbox, "click");
36039
- }), Mb.bind(i3.__checkbox, "click", function(t4) {
35990
+ i3 instanceof wb ? (Eb.bind(e3, "click", function() {
35991
+ Eb.fakeEvent(i3.__checkbox, "click");
35992
+ }), Eb.bind(i3.__checkbox, "click", function(t4) {
36040
35993
  t4.stopPropagation();
36041
- })) : i3 instanceof Fb ? (Mb.bind(e3, "click", function() {
36042
- Mb.fakeEvent(i3.__button, "click");
36043
- }), Mb.bind(e3, "mouseover", function() {
36044
- Mb.addClass(i3.__button, "hover");
36045
- }), Mb.bind(e3, "mouseout", function() {
36046
- Mb.removeClass(i3.__button, "hover");
36047
- })) : i3 instanceof Bb && (Mb.addClass(e3, "color"), i3.updateDisplay = ab.compose(function(t4) {
35994
+ })) : i3 instanceof Lb ? (Eb.bind(e3, "click", function() {
35995
+ Eb.fakeEvent(i3.__button, "click");
35996
+ }), Eb.bind(e3, "mouseover", function() {
35997
+ Eb.addClass(i3.__button, "hover");
35998
+ }), Eb.bind(e3, "mouseout", function() {
35999
+ Eb.removeClass(i3.__button, "hover");
36000
+ })) : i3 instanceof Nb && (Eb.addClass(e3, "color"), i3.updateDisplay = rb.compose(function(t4) {
36048
36001
  return e3.style.borderLeftColor = i3.__color.toString(), t4;
36049
36002
  }, i3.updateDisplay), i3.updateDisplay());
36050
- i3.setValue = ab.compose(function(e4) {
36051
- return t3.getRoot().__preset_select && i3.isModified() && tT(t3.getRoot(), true), e4;
36003
+ i3.setValue = rb.compose(function(e4) {
36004
+ return t3.getRoot().__preset_select && i3.isModified() && Kb(t3.getRoot(), true), e4;
36052
36005
  }, i3.setValue);
36053
36006
  }(t2, l2, r2), t2.__controllers.push(r2), r2;
36054
36007
  }
36055
- function nT(t2, e2) {
36008
+ function tT(t2, e2) {
36056
36009
  return document.location.href + "." + e2;
36057
36010
  }
36058
- function rT(t2, e2, i2) {
36011
+ function eT(t2, e2, i2) {
36059
36012
  var n2 = document.createElement("option");
36060
36013
  n2.innerHTML = e2, n2.value = e2, t2.__preset_select.appendChild(n2), i2 && (t2.__preset_select.selectedIndex = t2.__preset_select.length - 1);
36061
36014
  }
36062
- function oT(t2, e2) {
36015
+ function iT(t2, e2) {
36063
36016
  e2.style.display = t2.useLocalStorage ? "block" : "none";
36064
36017
  }
36065
- function sT(t2) {
36018
+ function nT(t2) {
36066
36019
  var e2 = t2.__save_row = document.createElement("li");
36067
- Mb.addClass(t2.domElement, "has-save"), t2.__ul.insertBefore(e2, t2.__ul.firstChild), Mb.addClass(e2, "save-row");
36020
+ Eb.addClass(t2.domElement, "has-save"), t2.__ul.insertBefore(e2, t2.__ul.firstChild), Eb.addClass(e2, "save-row");
36068
36021
  var i2 = document.createElement("span");
36069
- i2.innerHTML = "&nbsp;", Mb.addClass(i2, "button gears");
36022
+ i2.innerHTML = "&nbsp;", Eb.addClass(i2, "button gears");
36070
36023
  var n2 = document.createElement("span");
36071
- n2.innerHTML = "Save", Mb.addClass(n2, "button"), Mb.addClass(n2, "save");
36024
+ n2.innerHTML = "Save", Eb.addClass(n2, "button"), Eb.addClass(n2, "save");
36072
36025
  var r2 = document.createElement("span");
36073
- r2.innerHTML = "New", Mb.addClass(r2, "button"), Mb.addClass(r2, "save-as");
36026
+ r2.innerHTML = "New", Eb.addClass(r2, "button"), Eb.addClass(r2, "save-as");
36074
36027
  var o2 = document.createElement("span");
36075
- o2.innerHTML = "Revert", Mb.addClass(o2, "button"), Mb.addClass(o2, "revert");
36028
+ o2.innerHTML = "Revert", Eb.addClass(o2, "button"), Eb.addClass(o2, "revert");
36076
36029
  var s2 = t2.__preset_select = document.createElement("select");
36077
- if (t2.load && t2.load.remembered ? ab.each(t2.load.remembered, function(e3, i3) {
36078
- rT(t2, i3, i3 === t2.preset);
36079
- }) : rT(t2, "Default", false), Mb.bind(s2, "change", function() {
36030
+ if (t2.load && t2.load.remembered ? rb.each(t2.load.remembered, function(e3, i3) {
36031
+ eT(t2, i3, i3 === t2.preset);
36032
+ }) : eT(t2, "Default", false), Eb.bind(s2, "change", function() {
36080
36033
  for (var e3 = 0; e3 < t2.__preset_select.length; e3++)
36081
36034
  t2.__preset_select[e3].innerHTML = t2.__preset_select[e3].value;
36082
36035
  t2.preset = this.value;
36083
- }), e2.appendChild(s2), e2.appendChild(i2), e2.appendChild(n2), e2.appendChild(r2), e2.appendChild(o2), Wb) {
36036
+ }), e2.appendChild(s2), e2.appendChild(i2), e2.appendChild(n2), e2.appendChild(r2), e2.appendChild(o2), jb) {
36084
36037
  var a2 = document.getElementById("dg-local-explain"), l2 = document.getElementById("dg-local-storage");
36085
- document.getElementById("dg-save-locally").style.display = "block", "true" === localStorage.getItem(nT(0, "isLocal")) && l2.setAttribute("checked", "checked"), oT(t2, a2), Mb.bind(l2, "change", function() {
36086
- t2.useLocalStorage = !t2.useLocalStorage, oT(t2, a2);
36038
+ document.getElementById("dg-save-locally").style.display = "block", "true" === localStorage.getItem(tT(0, "isLocal")) && l2.setAttribute("checked", "checked"), iT(t2, a2), Eb.bind(l2, "change", function() {
36039
+ t2.useLocalStorage = !t2.useLocalStorage, iT(t2, a2);
36087
36040
  });
36088
36041
  }
36089
36042
  var h2 = document.getElementById("dg-new-constructor");
36090
- Mb.bind(h2, "keydown", function(t3) {
36091
- !t3.metaKey || 67 !== t3.which && 67 !== t3.keyCode || Xb.hide();
36092
- }), Mb.bind(i2, "click", function() {
36093
- h2.innerHTML = JSON.stringify(t2.getSaveObject(), void 0, 2), Xb.show(), h2.focus(), h2.select();
36094
- }), Mb.bind(n2, "click", function() {
36043
+ Eb.bind(h2, "keydown", function(t3) {
36044
+ !t3.metaKey || 67 !== t3.which && 67 !== t3.keyCode || zb.hide();
36045
+ }), Eb.bind(i2, "click", function() {
36046
+ h2.innerHTML = JSON.stringify(t2.getSaveObject(), void 0, 2), zb.show(), h2.focus(), h2.select();
36047
+ }), Eb.bind(n2, "click", function() {
36095
36048
  t2.save();
36096
- }), Mb.bind(r2, "click", function() {
36049
+ }), Eb.bind(r2, "click", function() {
36097
36050
  var e3 = prompt("Enter a new preset name.");
36098
36051
  e3 && t2.saveAs(e3);
36099
- }), Mb.bind(o2, "click", function() {
36052
+ }), Eb.bind(o2, "click", function() {
36100
36053
  t2.revert();
36101
36054
  });
36102
36055
  }
36103
- function aT(t2) {
36056
+ function rT(t2) {
36104
36057
  var e2 = void 0;
36105
36058
  function i2(i3) {
36106
36059
  return i3.preventDefault(), t2.width += e2 - i3.clientX, t2.onResize(), e2 = i3.clientX, false;
36107
36060
  }
36108
36061
  function n2() {
36109
- Mb.removeClass(t2.__closeButton, Kb.CLASS_DRAG), Mb.unbind(window, "mousemove", i2), Mb.unbind(window, "mouseup", n2);
36062
+ Eb.removeClass(t2.__closeButton, qb.CLASS_DRAG), Eb.unbind(window, "mousemove", i2), Eb.unbind(window, "mouseup", n2);
36110
36063
  }
36111
36064
  function r2(r3) {
36112
- return r3.preventDefault(), e2 = r3.clientX, Mb.addClass(t2.__closeButton, Kb.CLASS_DRAG), Mb.bind(window, "mousemove", i2), Mb.bind(window, "mouseup", n2), false;
36065
+ return r3.preventDefault(), e2 = r3.clientX, Eb.addClass(t2.__closeButton, qb.CLASS_DRAG), Eb.bind(window, "mousemove", i2), Eb.bind(window, "mouseup", n2), false;
36113
36066
  }
36114
- t2.__resize_handle = document.createElement("div"), ab.extend(t2.__resize_handle.style, { width: "6px", marginLeft: "-3px", height: "200px", cursor: "ew-resize", position: "absolute" }), Mb.bind(t2.__resize_handle, "mousedown", r2), Mb.bind(t2.__closeButton, "mousedown", r2), t2.domElement.insertBefore(t2.__resize_handle, t2.domElement.firstElementChild);
36067
+ t2.__resize_handle = document.createElement("div"), rb.extend(t2.__resize_handle.style, { width: "6px", marginLeft: "-3px", height: "200px", cursor: "ew-resize", position: "absolute" }), Eb.bind(t2.__resize_handle, "mousedown", r2), Eb.bind(t2.__closeButton, "mousedown", r2), t2.domElement.insertBefore(t2.__resize_handle, t2.domElement.firstElementChild);
36115
36068
  }
36116
- function lT(t2, e2) {
36069
+ function oT(t2, e2) {
36117
36070
  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");
36118
36071
  }
36119
- function hT(t2, e2) {
36072
+ function sT(t2, e2) {
36120
36073
  var i2 = {};
36121
- return ab.each(t2.__rememberedObjects, function(n2, r2) {
36074
+ return rb.each(t2.__rememberedObjects, function(n2, r2) {
36122
36075
  var o2 = {}, s2 = t2.__rememberedObjectIndecesToControllers[r2];
36123
- ab.each(s2, function(t3, i3) {
36076
+ rb.each(s2, function(t3, i3) {
36124
36077
  o2[i3] = e2 ? t3.initialValue : t3.getValue();
36125
36078
  }), i2[r2] = o2;
36126
36079
  }), i2;
36127
36080
  }
36128
- Kb.toggleHide = function() {
36129
- Zb = !Zb, ab.each(Jb, function(t2) {
36130
- t2.domElement.style.display = Zb ? "none" : "";
36081
+ qb.toggleHide = function() {
36082
+ Xb = !Xb, rb.each(Yb, function(t2) {
36083
+ t2.domElement.style.display = Xb ? "none" : "";
36131
36084
  });
36132
- }, Kb.CLASS_AUTO_PLACE = "a", Kb.CLASS_AUTO_PLACE_CONTAINER = "ac", Kb.CLASS_MAIN = "main", Kb.CLASS_CONTROLLER_ROW = "cr", Kb.CLASS_TOO_TALL = "taller-than-window", Kb.CLASS_CLOSED = "closed", Kb.CLASS_CLOSE_BUTTON = "close-button", Kb.CLASS_CLOSE_TOP = "close-top", Kb.CLASS_CLOSE_BOTTOM = "close-bottom", Kb.CLASS_DRAG = "drag", Kb.DEFAULT_WIDTH = 245, Kb.TEXT_CLOSED = "Close Controls", Kb.TEXT_OPEN = "Open Controls", Kb._keydownHandler = function(t2) {
36133
- "text" === document.activeElement.type || 72 !== t2.which && 72 !== t2.keyCode || Kb.toggleHide();
36134
- }, Mb.bind(window, "keydown", Kb._keydownHandler, false), ab.extend(Kb.prototype, { add: function(t2, e2) {
36135
- return iT(this, t2, e2, { factoryArgs: Array.prototype.slice.call(arguments, 2) });
36085
+ }, qb.CLASS_AUTO_PLACE = "a", qb.CLASS_AUTO_PLACE_CONTAINER = "ac", qb.CLASS_MAIN = "main", qb.CLASS_CONTROLLER_ROW = "cr", qb.CLASS_TOO_TALL = "taller-than-window", qb.CLASS_CLOSED = "closed", qb.CLASS_CLOSE_BUTTON = "close-button", qb.CLASS_CLOSE_TOP = "close-top", qb.CLASS_CLOSE_BOTTOM = "close-bottom", qb.CLASS_DRAG = "drag", qb.DEFAULT_WIDTH = 245, qb.TEXT_CLOSED = "Close Controls", qb.TEXT_OPEN = "Open Controls", qb._keydownHandler = function(t2) {
36086
+ "text" === document.activeElement.type || 72 !== t2.which && 72 !== t2.keyCode || qb.toggleHide();
36087
+ }, Eb.bind(window, "keydown", qb._keydownHandler, false), rb.extend(qb.prototype, { add: function(t2, e2) {
36088
+ return $b(this, t2, e2, { factoryArgs: Array.prototype.slice.call(arguments, 2) });
36136
36089
  }, addColor: function(t2, e2) {
36137
- return iT(this, t2, e2, { color: true });
36090
+ return $b(this, t2, e2, { color: true });
36138
36091
  }, remove: function(t2) {
36139
36092
  this.__ul.removeChild(t2.__li), this.__controllers.splice(this.__controllers.indexOf(t2), 1);
36140
36093
  var e2 = this;
36141
- ab.defer(function() {
36094
+ rb.defer(function() {
36142
36095
  e2.onResize();
36143
36096
  });
36144
36097
  }, destroy: function() {
36145
36098
  if (this.parent)
36146
36099
  throw new Error("Only the root GUI should be removed with .destroy(). For subfolders, use gui.removeFolder(folder) instead.");
36147
- this.autoPlace && qb.removeChild(this.domElement);
36100
+ this.autoPlace && Wb.removeChild(this.domElement);
36148
36101
  var t2 = this;
36149
- ab.each(this.__folders, function(e2) {
36102
+ rb.each(this.__folders, function(e2) {
36150
36103
  t2.removeFolder(e2);
36151
- }), Mb.unbind(window, "keydown", Kb._keydownHandler, false), $b(this);
36104
+ }), Eb.unbind(window, "keydown", qb._keydownHandler, false), Jb(this);
36152
36105
  }, addFolder: function(t2) {
36153
36106
  if (void 0 !== this.__folders[t2])
36154
36107
  throw new Error('You already have a folder in this GUI by the name "' + t2 + '"');
36155
36108
  var e2 = { name: t2, parent: this };
36156
36109
  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]);
36157
- var i2 = new Kb(e2);
36110
+ var i2 = new qb(e2);
36158
36111
  this.__folders[t2] = i2;
36159
- var n2 = Qb(this, i2.domElement);
36160
- return Mb.addClass(n2, "folder"), i2;
36112
+ var n2 = Zb(this, i2.domElement);
36113
+ return Eb.addClass(n2, "folder"), i2;
36161
36114
  }, removeFolder: function(t2) {
36162
- 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], $b(t2);
36115
+ 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], Jb(t2);
36163
36116
  var e2 = this;
36164
- ab.each(t2.__folders, function(e3) {
36117
+ rb.each(t2.__folders, function(e3) {
36165
36118
  t2.removeFolder(e3);
36166
- }), ab.defer(function() {
36119
+ }), rb.defer(function() {
36167
36120
  e2.onResize();
36168
36121
  });
36169
36122
  }, open: function() {
@@ -36177,60 +36130,60 @@ void main(void){
36177
36130
  }, onResize: function() {
36178
36131
  var t2 = this.getRoot();
36179
36132
  if (t2.scrollable) {
36180
- var e2 = Mb.getOffset(t2.__ul).top, i2 = 0;
36181
- ab.each(t2.__ul.childNodes, function(e3) {
36182
- t2.autoPlace && e3 === t2.__save_row || (i2 += Mb.getHeight(e3));
36183
- }), window.innerHeight - e2 - 20 < i2 ? (Mb.addClass(t2.domElement, Kb.CLASS_TOO_TALL), t2.__ul.style.height = window.innerHeight - e2 - 20 + "px") : (Mb.removeClass(t2.domElement, Kb.CLASS_TOO_TALL), t2.__ul.style.height = "auto");
36133
+ var e2 = Eb.getOffset(t2.__ul).top, i2 = 0;
36134
+ rb.each(t2.__ul.childNodes, function(e3) {
36135
+ t2.autoPlace && e3 === t2.__save_row || (i2 += Eb.getHeight(e3));
36136
+ }), window.innerHeight - e2 - 20 < i2 ? (Eb.addClass(t2.domElement, qb.CLASS_TOO_TALL), t2.__ul.style.height = window.innerHeight - e2 - 20 + "px") : (Eb.removeClass(t2.domElement, qb.CLASS_TOO_TALL), t2.__ul.style.height = "auto");
36184
36137
  }
36185
- t2.__resize_handle && ab.defer(function() {
36138
+ t2.__resize_handle && rb.defer(function() {
36186
36139
  t2.__resize_handle.style.height = t2.__ul.offsetHeight + "px";
36187
36140
  }), t2.__closeButton && (t2.__closeButton.style.width = t2.width + "px");
36188
- }, onResizeDebounced: ab.debounce(function() {
36141
+ }, onResizeDebounced: rb.debounce(function() {
36189
36142
  this.onResize();
36190
36143
  }, 50), remember: function() {
36191
- if (ab.isUndefined(Xb) && ((Xb = new Vb()).domElement.innerHTML = Hb), this.parent)
36144
+ if (rb.isUndefined(zb) && ((zb = new Hb()).domElement.innerHTML = kb), this.parent)
36192
36145
  throw new Error("You can only call remember on a top level GUI.");
36193
36146
  var t2 = this;
36194
- ab.each(Array.prototype.slice.call(arguments), function(e2) {
36195
- 0 === t2.__rememberedObjects.length && sT(t2), -1 === t2.__rememberedObjects.indexOf(e2) && t2.__rememberedObjects.push(e2);
36196
- }), this.autoPlace && lT(this, this.width);
36147
+ rb.each(Array.prototype.slice.call(arguments), function(e2) {
36148
+ 0 === t2.__rememberedObjects.length && nT(t2), -1 === t2.__rememberedObjects.indexOf(e2) && t2.__rememberedObjects.push(e2);
36149
+ }), this.autoPlace && oT(this, this.width);
36197
36150
  }, getRoot: function() {
36198
36151
  for (var t2 = this; t2.parent; )
36199
36152
  t2 = t2.parent;
36200
36153
  return t2;
36201
36154
  }, getSaveObject: function() {
36202
36155
  var t2 = this.load;
36203
- return t2.closed = this.closed, this.__rememberedObjects.length > 0 && (t2.preset = this.preset, t2.remembered || (t2.remembered = {}), t2.remembered[this.preset] = hT(this)), t2.folders = {}, ab.each(this.__folders, function(e2, i2) {
36156
+ return t2.closed = this.closed, this.__rememberedObjects.length > 0 && (t2.preset = this.preset, t2.remembered || (t2.remembered = {}), t2.remembered[this.preset] = sT(this)), t2.folders = {}, rb.each(this.__folders, function(e2, i2) {
36204
36157
  t2.folders[i2] = e2.getSaveObject();
36205
36158
  }), t2;
36206
36159
  }, save: function() {
36207
- this.load.remembered || (this.load.remembered = {}), this.load.remembered[this.preset] = hT(this), tT(this, false), this.saveToLocalStorageIfPossible();
36160
+ this.load.remembered || (this.load.remembered = {}), this.load.remembered[this.preset] = sT(this), Kb(this, false), this.saveToLocalStorageIfPossible();
36208
36161
  }, saveAs: function(t2) {
36209
- this.load.remembered || (this.load.remembered = {}, this.load.remembered.Default = hT(this, true)), this.load.remembered[t2] = hT(this), this.preset = t2, rT(this, t2, true), this.saveToLocalStorageIfPossible();
36162
+ this.load.remembered || (this.load.remembered = {}, this.load.remembered.Default = sT(this, true)), this.load.remembered[t2] = sT(this), this.preset = t2, eT(this, t2, true), this.saveToLocalStorageIfPossible();
36210
36163
  }, revert: function(t2) {
36211
- ab.each(this.__controllers, function(e2) {
36212
- this.getRoot().load.remembered ? eT(t2 || this.getRoot(), e2) : e2.setValue(e2.initialValue), e2.__onFinishChange && e2.__onFinishChange.call(e2, e2.getValue());
36213
- }, this), ab.each(this.__folders, function(t3) {
36164
+ rb.each(this.__controllers, function(e2) {
36165
+ this.getRoot().load.remembered ? Qb(t2 || this.getRoot(), e2) : e2.setValue(e2.initialValue), e2.__onFinishChange && e2.__onFinishChange.call(e2, e2.getValue());
36166
+ }, this), rb.each(this.__folders, function(t3) {
36214
36167
  t3.revert(t3);
36215
- }), t2 || tT(this.getRoot(), false);
36168
+ }), t2 || Kb(this.getRoot(), false);
36216
36169
  }, listen: function(t2) {
36217
36170
  var e2 = 0 === this.__listening.length;
36218
36171
  this.__listening.push(t2), e2 && function t3(e3) {
36219
- 0 !== e3.length && zb.call(window, function() {
36172
+ 0 !== e3.length && Gb.call(window, function() {
36220
36173
  t3(e3);
36221
36174
  });
36222
- ab.each(e3, function(t4) {
36175
+ rb.each(e3, function(t4) {
36223
36176
  t4.updateDisplay();
36224
36177
  });
36225
36178
  }(this.__listening);
36226
36179
  }, updateDisplay: function() {
36227
- ab.each(this.__controllers, function(t2) {
36180
+ rb.each(this.__controllers, function(t2) {
36228
36181
  t2.updateDisplay();
36229
- }), ab.each(this.__folders, function(t2) {
36182
+ }), rb.each(this.__folders, function(t2) {
36230
36183
  t2.updateDisplay();
36231
36184
  });
36232
36185
  } });
36233
- var uT = Kb, cT = function() {
36186
+ var aT = qb, lT = function() {
36234
36187
  function t2(t3) {
36235
36188
  this.player = t3;
36236
36189
  }
@@ -36276,10 +36229,10 @@ void main(void){
36276
36229
  }, set: function(t3) {
36277
36230
  this.player.updateConfig({ maxResolutionLevel: t3 });
36278
36231
  }, enumerable: false, configurable: true }), t2;
36279
- }(), dT = function() {
36232
+ }(), hT = function() {
36280
36233
  function t2(t3, e2) {
36281
36234
  var i2;
36282
- this.config = new cT(t3), this.anchor = e2, i2 = this.createControllerGUI(), this.gui = i2[0], this.controller = i2[1], this.createStats();
36235
+ this.config = new lT(t3), this.anchor = e2, i2 = this.createControllerGUI(), this.gui = i2[0], this.controller = i2[1], this.createStats();
36283
36236
  }
36284
36237
  return t2.prototype.createStats = function() {
36285
36238
  var t3 = this;
@@ -36287,7 +36240,7 @@ void main(void){
36287
36240
  t3.controller.frameRate.updateDisplay(), t3.controller.size.updateDisplay(), t3.controller.minFPS.updateDisplay(), t3.controller.drawFrames.updateDisplay(), t3.controller.maxFPS.updateDisplay(), t3.controller.resolution.updateDisplay(), t3.controller.autoFps.updateDisplay(), t3.controller.autoResolution.updateDisplay(), t3.controller.drawCall.updateDisplay();
36288
36241
  }, 16);
36289
36242
  }, t2.prototype.createControllerGUI = function() {
36290
- var t3 = new uT({ autoPlace: true, closed: true });
36243
+ var t3 = new aT({ autoPlace: true, closed: true });
36291
36244
  t3.domElement.style.opacity = ".6", t3.domElement.style.transformOrigin = "100% 0", t3.domElement.style.transform = "scale(1)", this.anchor.appendChild(t3.domElement), t3.domElement.style.position = "absolute", t3.domElement.style.right = "0", t3.domElement.style.top = "0", t3.domElement.style.zIndex = "2";
36292
36245
  var e2 = { frameRate: t3.add(this.config, "frameRate"), drawFrames: t3.add(this.config, "drawFrames"), drawCall: t3.add(this.config, "drawCall"), size: t3.add(this.config, "size"), minFPS: t3.add(this.config, "minFPS", 0, 60), maxFPS: t3.add(this.config, "maxFPS", 0, 60), resolution: t3.add(this.config, "resolution", 0.5, 8, 0.5), autoResolution: t3.add(this.config, "autoResolution"), autoFps: t3.add(this.config, "autoFPS"), maxResolutionLevel: t3.add(this.config, "maxResolutionLevel", 0, 4, 1), transactionBgColor: t3.addColor(this.config, "backgroundColor") };
36293
36246
  return [t3, e2];
@@ -36298,14 +36251,14 @@ void main(void){
36298
36251
  }
36299
36252
  }, t2;
36300
36253
  }();
36301
- function pT(t2) {
36254
+ function uT(t2) {
36302
36255
  if ("fifo" !== t2 && "latest-pending-render" !== t2)
36303
36256
  throw new Error("Invalid sync event queue policy: " + t2);
36304
36257
  }
36305
- function fT(t2, e2) {
36306
- return void 0 === e2 && (e2 = "fifo"), pT(e2), "interactive" === t2 ? e2 : "fifo";
36258
+ function cT(t2, e2) {
36259
+ return void 0 === e2 && (e2 = "fifo"), uT(e2), "interactive" === t2 ? e2 : "fifo";
36307
36260
  }
36308
- function mT(t2) {
36261
+ function dT(t2) {
36309
36262
  switch (t2.type) {
36310
36263
  case "renderSlide":
36311
36264
  case "nextStep":
@@ -36320,7 +36273,7 @@ void main(void){
36320
36273
  return false;
36321
36274
  }
36322
36275
  }
36323
- var gT = function() {
36276
+ var pT = function() {
36324
36277
  function t2(t3, e2) {
36325
36278
  var i2 = this;
36326
36279
  void 0 === e2 && (e2 = {}), this.tasks = [], this.isDestroy = false, this.isScheduling = false, this.isTaskRunning = false, this.isCatchingUp = false, this.compactedTasks = /* @__PURE__ */ new WeakMap(), this.finishTask = function() {
@@ -36350,12 +36303,12 @@ void main(void){
36350
36303
  }
36351
36304
  } else
36352
36305
  i2.isScheduling = false;
36353
- }, this.fn = t3, this.policy = e2.policy || "fifo", this.onCompact = e2.onCompact, this.onCompactedRenderComplete = e2.onCompactedRenderComplete, this.onCatchUpStateChange = e2.onCatchUpStateChange, this.shouldTrackCatchUpEvent = e2.shouldTrackCatchUpEvent, pT(this.policy);
36306
+ }, this.fn = t3, this.policy = e2.policy || "fifo", this.onCompact = e2.onCompact, this.onCompactedRenderComplete = e2.onCompactedRenderComplete, this.onCatchUpStateChange = e2.onCatchUpStateChange, this.shouldTrackCatchUpEvent = e2.shouldTrackCatchUpEvent, uT(this.policy);
36354
36307
  }
36355
36308
  return t2.prototype.destroy = function() {
36356
36309
  this.isDestroy = true, this.isCatchingUp = false, this.runningTask = void 0, this.tasks.length = 0;
36357
36310
  }, t2.prototype.setPolicy = function(t3) {
36358
- pT(t3), this.policy = t3;
36311
+ uT(t3), this.policy = t3;
36359
36312
  }, t2.prototype.setCatchUpState = function(t3) {
36360
36313
  var e2;
36361
36314
  if (this.isCatchingUp !== t3) {
@@ -36375,7 +36328,7 @@ void main(void){
36375
36328
  }, t2.prototype.compactForRender = function(t3) {
36376
36329
  for (var e2 = {}, i2 = 0, n2 = 0, r2 = 0, o2 = 0, s2 = 0; this.tasks.length > 0; ) {
36377
36330
  var a2 = this.tasks[this.tasks.length - 1];
36378
- if (!mT(a2))
36331
+ if (!dT(a2))
36379
36332
  break;
36380
36333
  this.tasks.pop(), this.compactedTasks.delete(a2), i2 += 1, e2[a2.type] = (e2[a2.type] || 0) + 1, "renderSlide" === a2.type ? n2 += 1 : "nextStep" === a2.type || "prevStep" === a2.type ? r2 += 1 : "interactiveAnim" === a2.type ? o2 += 1 : s2 += 1;
36381
36334
  }
@@ -36399,7 +36352,7 @@ void main(void){
36399
36352
  return this.isScheduling || this.schedule(), s2;
36400
36353
  }
36401
36354
  }, t2;
36402
- }(), vT = function() {
36355
+ }(), fT = function() {
36403
36356
  function t2(t3) {
36404
36357
  this.autoUnlock = /* @__PURE__ */ Object.create(null), this.localKeyAutoRemove = /* @__PURE__ */ Object.create(null), this.localKeys = /* @__PURE__ */ Object.create(null), this.locks = /* @__PURE__ */ Object.create(null), this.available = false, this.available = t3;
36405
36358
  }
@@ -36418,7 +36371,7 @@ void main(void){
36418
36371
  }, t2.prototype.isLocked = function(t3) {
36419
36372
  return !!this.available && !!this.locks[t3];
36420
36373
  }, t2;
36421
- }(), _T = function() {
36374
+ }(), mT = function() {
36422
36375
  function t2() {
36423
36376
  var t3 = this;
36424
36377
  this.tasks = [], this.isDestroy = false, this.isScheduling = false, this.schedule = function() {
@@ -36441,15 +36394,14 @@ void main(void){
36441
36394
  }, t2.prototype.destroy = function() {
36442
36395
  this.isDestroy = true;
36443
36396
  }, t2;
36444
- }();
36445
- var yT = function() {
36446
- return (yT = Object.assign || function(t2) {
36397
+ }(), gT = function() {
36398
+ return (gT = Object.assign || function(t2) {
36447
36399
  for (var e2, i2 = 1, n2 = arguments.length; i2 < n2; i2++)
36448
36400
  for (var r2 in e2 = arguments[i2])
36449
36401
  Object.prototype.hasOwnProperty.call(e2, r2) && (t2[r2] = e2[r2]);
36450
36402
  return t2;
36451
36403
  }).apply(this, arguments);
36452
- }, xT = function(t2, e2, i2, n2) {
36404
+ }, vT = function(t2, e2, i2, n2) {
36453
36405
  return new (i2 || (i2 = Promise))(function(r2, o2) {
36454
36406
  function s2(t3) {
36455
36407
  try {
@@ -36473,7 +36425,7 @@ void main(void){
36473
36425
  }
36474
36426
  l2((n2 = n2.apply(t2, e2 || [])).next());
36475
36427
  });
36476
- }, bT = function(t2, e2) {
36428
+ }, _T = function(t2, e2) {
36477
36429
  var i2, n2, r2, o2, s2 = { label: 0, sent: function() {
36478
36430
  if (1 & r2[0])
36479
36431
  throw r2[1];
@@ -36536,7 +36488,7 @@ void main(void){
36536
36488
  }([o3, a3]);
36537
36489
  };
36538
36490
  }
36539
- }, TT = function() {
36491
+ }, yT = function() {
36540
36492
  function t2() {
36541
36493
  var t3 = this;
36542
36494
  this.logList = [], this.checkTimer = null, this.retryTimes = 0, this.enable = false, this.db = null, this.useIndexedDB = false, this.DB_NAME = "__slide_logs_report__", this.STORE_NAME = "logs", this.BATCH_SIZE = 1e3, this.uploadLoggerGlobalEvent = function(e2) {
@@ -36544,9 +36496,9 @@ void main(void){
36544
36496
  }, this.config = { checkTime: 5e3, buffer: 300 }, window.addEventListener("message", this.uploadLoggerGlobalEvent), this.initIndexedDB();
36545
36497
  }
36546
36498
  return t2.prototype.initIndexedDB = function() {
36547
- return xT(this, void 0, void 0, function() {
36499
+ return vT(this, void 0, void 0, function() {
36548
36500
  var t3, e2 = this;
36549
- return bT(this, function(i2) {
36501
+ return _T(this, function(i2) {
36550
36502
  if (!("indexedDB" in window))
36551
36503
  return this.useIndexedDB = false, this.start(), [2];
36552
36504
  try {
@@ -36565,9 +36517,9 @@ void main(void){
36565
36517
  });
36566
36518
  });
36567
36519
  }, t2.prototype.storeLogInIndexedDB = function(t3) {
36568
- return xT(this, void 0, void 0, function() {
36520
+ return vT(this, void 0, void 0, function() {
36569
36521
  var e2, i2 = this;
36570
- return bT(this, function(n2) {
36522
+ return _T(this, function(n2) {
36571
36523
  switch (n2.label) {
36572
36524
  case 0:
36573
36525
  if (!this.useIndexedDB)
@@ -36615,9 +36567,9 @@ void main(void){
36615
36567
  });
36616
36568
  });
36617
36569
  }, t2.prototype.getLogsFromIndexedDB = function(t3) {
36618
- return xT(this, void 0, void 0, function() {
36570
+ return vT(this, void 0, void 0, function() {
36619
36571
  var e2 = this;
36620
- return bT(this, function(i2) {
36572
+ return _T(this, function(i2) {
36621
36573
  switch (i2.label) {
36622
36574
  case 0:
36623
36575
  if (!this.useIndexedDB)
@@ -36643,7 +36595,7 @@ void main(void){
36643
36595
  var n3 = e3.target.result;
36644
36596
  n3 && s2.length < t3 ? (s2.push(n3.value), n3.continue()) : i3(s2.map(function(t4) {
36645
36597
  var e4;
36646
- return yT(yT({}, t4), { id: null === (e4 = t4.id) || void 0 === e4 ? void 0 : e4.toString() });
36598
+ return gT(gT({}, t4), { id: null === (e4 = t4.id) || void 0 === e4 ? void 0 : e4.toString() });
36647
36599
  }));
36648
36600
  }, o2.onerror = function() {
36649
36601
  var t4, r3;
@@ -36662,9 +36614,9 @@ void main(void){
36662
36614
  });
36663
36615
  });
36664
36616
  }, t2.prototype.deleteLogsFromIndexedDB = function(t3) {
36665
- return xT(this, void 0, void 0, function() {
36617
+ return vT(this, void 0, void 0, function() {
36666
36618
  var e2 = this;
36667
- return bT(this, function(i2) {
36619
+ return _T(this, function(i2) {
36668
36620
  switch (i2.label) {
36669
36621
  case 0:
36670
36622
  if (!this.useIndexedDB || 0 === t3.length)
@@ -36712,12 +36664,12 @@ void main(void){
36712
36664
  });
36713
36665
  });
36714
36666
  }, t2.prototype.start = function() {
36715
- return xT(this, void 0, void 0, function() {
36667
+ return vT(this, void 0, void 0, function() {
36716
36668
  var t3 = this;
36717
- return bT(this, function(e2) {
36669
+ return _T(this, function(e2) {
36718
36670
  return clearInterval(this.checkTimer), this.checkTimer = setInterval(function() {
36719
- return xT(t3, void 0, void 0, function() {
36720
- return bT(this, function(t4) {
36671
+ return vT(t3, void 0, void 0, function() {
36672
+ return _T(this, function(t4) {
36721
36673
  switch (t4.label) {
36722
36674
  case 0:
36723
36675
  return [4, this.uploadLog()];
@@ -36732,9 +36684,9 @@ void main(void){
36732
36684
  }, t2.prototype.pause = function() {
36733
36685
  clearInterval(this.checkTimer);
36734
36686
  }, t2.prototype.addLog = function(t3, e2, i2, n2) {
36735
- return xT(this, void 0, void 0, function() {
36687
+ return vT(this, void 0, void 0, function() {
36736
36688
  var r2;
36737
- return bT(this, function(o2) {
36689
+ return _T(this, function(o2) {
36738
36690
  switch (o2.label) {
36739
36691
  case 0:
36740
36692
  if (r2 = { level: e2, taskId: i2, message: t3, randomId: n2, timestamp: Date.now().toString() }, !this.useIndexedDB)
@@ -36765,9 +36717,9 @@ void main(void){
36765
36717
  return console.warn("Database health check failed:", t3), false;
36766
36718
  }
36767
36719
  }, t2.prototype.recreateDatabase = function() {
36768
- return xT(this, void 0, void 0, function() {
36720
+ return vT(this, void 0, void 0, function() {
36769
36721
  var t3 = this;
36770
- return bT(this, function(e2) {
36722
+ return _T(this, function(e2) {
36771
36723
  return [2, new Promise(function(e3, i2) {
36772
36724
  try {
36773
36725
  t3.db && (t3.db.close(), t3.db = null);
@@ -36789,9 +36741,9 @@ void main(void){
36789
36741
  }, t2.prototype.destroy = function() {
36790
36742
  clearInterval(this.checkTimer), window.removeEventListener("message", this.uploadLoggerGlobalEvent), this.db && (this.db.close(), this.db = null);
36791
36743
  }, t2.prototype.uploadLog = function(t3) {
36792
- return void 0 === t3 && (t3 = false), xT(this, void 0, void 0, function() {
36744
+ return void 0 === t3 && (t3 = false), vT(this, void 0, void 0, function() {
36793
36745
  var e2, i2, n2, r2 = this;
36794
- return bT(this, function(o2) {
36746
+ return _T(this, function(o2) {
36795
36747
  switch (o2.label) {
36796
36748
  case 0:
36797
36749
  return e2 = [], this.useIndexedDB ? [4, this.getLogsFromIndexedDB(this.BATCH_SIZE)] : [3, 2];
@@ -36827,7 +36779,7 @@ void main(void){
36827
36779
  }, t2.prototype.setEnable = function(t3) {
36828
36780
  this.enable !== t3 && (t3 ? this.start() : this.pause());
36829
36781
  }, t2;
36830
- }(), ST = function(t2, e2, i2, n2) {
36782
+ }(), xT = function(t2, e2, i2, n2) {
36831
36783
  return new (i2 || (i2 = Promise))(function(r2, o2) {
36832
36784
  function s2(t3) {
36833
36785
  try {
@@ -36851,7 +36803,7 @@ void main(void){
36851
36803
  }
36852
36804
  l2((n2 = n2.apply(t2, e2 || [])).next());
36853
36805
  });
36854
- }, ET = function(t2, e2) {
36806
+ }, bT = function(t2, e2) {
36855
36807
  var i2, n2, r2, o2, s2 = { label: 0, sent: function() {
36856
36808
  if (1 & r2[0])
36857
36809
  throw r2[1];
@@ -36915,13 +36867,13 @@ void main(void){
36915
36867
  };
36916
36868
  }
36917
36869
  };
36918
- function wT(t2, e2, i2, n2, r2) {
36919
- return ST(this, void 0, void 0, function() {
36870
+ function TT(t2, e2, i2, n2, r2) {
36871
+ return xT(this, void 0, void 0, function() {
36920
36872
  var o2, s2, a2, l2, h2, u2;
36921
- return ET(this, function(c2) {
36873
+ return bT(this, function(c2) {
36922
36874
  switch (c2.label) {
36923
36875
  case 0:
36924
- return o2 = document.createElement("div"), (s2 = new kT({ anchor: o2, renderOptions: { minFPS: 1, maxFPS: 1, resolution: 1, maxResolutionLevel: i2, forceCanvas: true }, mode: "local", interactive: false, useLocalCache: true })).setResource(t2, e2), [4, s2.getSlideCountAsync()];
36876
+ return o2 = document.createElement("div"), (s2 = new DT({ anchor: o2, renderOptions: { minFPS: 1, maxFPS: 1, resolution: 1, maxResolutionLevel: i2, forceCanvas: true }, mode: "local", interactive: false, useLocalCache: true })).setResource(t2, e2), [4, s2.getSlideCountAsync()];
36925
36877
  case 1:
36926
36878
  a2 = c2.sent(), c2.label = 2;
36927
36879
  case 2:
@@ -36958,7 +36910,7 @@ void main(void){
36958
36910
  });
36959
36911
  });
36960
36912
  }
36961
- var AT = function() {
36913
+ var ST = function() {
36962
36914
  var t2 = function(e2, i2) {
36963
36915
  return (t2 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(t3, e3) {
36964
36916
  t3.__proto__ = e3;
@@ -36975,14 +36927,14 @@ void main(void){
36975
36927
  }
36976
36928
  t2(e2, i2), e2.prototype = null === i2 ? Object.create(i2) : (n2.prototype = i2.prototype, new n2());
36977
36929
  };
36978
- }(), MT = function() {
36979
- return (MT = Object.assign || function(t2) {
36930
+ }(), ET = function() {
36931
+ return (ET = Object.assign || function(t2) {
36980
36932
  for (var e2, i2 = 1, n2 = arguments.length; i2 < n2; i2++)
36981
36933
  for (var r2 in e2 = arguments[i2])
36982
36934
  Object.prototype.hasOwnProperty.call(e2, r2) && (t2[r2] = e2[r2]);
36983
36935
  return t2;
36984
36936
  }).apply(this, arguments);
36985
- }, CT = function(t2, e2, i2, n2) {
36937
+ }, wT = function(t2, e2, i2, n2) {
36986
36938
  var r2, o2 = arguments.length, s2 = o2 < 3 ? e2 : null === n2 ? n2 = Object.getOwnPropertyDescriptor(e2, i2) : n2;
36987
36939
  if ("object" == typeof Reflect && "function" == typeof Reflect.decorate)
36988
36940
  s2 = Reflect.decorate(t2, e2, i2, n2);
@@ -36990,7 +36942,7 @@ void main(void){
36990
36942
  for (var a2 = t2.length - 1; a2 >= 0; a2--)
36991
36943
  (r2 = t2[a2]) && (s2 = (o2 < 3 ? r2(s2) : o2 > 3 ? r2(e2, i2, s2) : r2(e2, i2)) || s2);
36992
36944
  return o2 > 3 && s2 && Object.defineProperty(e2, i2, s2), s2;
36993
- }, RT = function(t2, e2, i2, n2) {
36945
+ }, AT = function(t2, e2, i2, n2) {
36994
36946
  return new (i2 || (i2 = Promise))(function(r2, o2) {
36995
36947
  function s2(t3) {
36996
36948
  try {
@@ -37014,7 +36966,7 @@ void main(void){
37014
36966
  }
37015
36967
  l2((n2 = n2.apply(t2, e2 || [])).next());
37016
36968
  });
37017
- }, IT = function(t2, e2) {
36969
+ }, MT = function(t2, e2) {
37018
36970
  var i2, n2, r2, o2, s2 = { label: 0, sent: function() {
37019
36971
  if (1 & r2[0])
37020
36972
  throw r2[1];
@@ -37077,20 +37029,20 @@ void main(void){
37077
37029
  }([o3, a3]);
37078
37030
  };
37079
37031
  }
37080
- }, PT = window.ResizeObserver || $x, OT = function(t2) {
37032
+ }, CT = window.ResizeObserver || Jx, RT = function(t2) {
37081
37033
  return new Promise(function(e2) {
37082
37034
  return setTimeout(e2, t2);
37083
37035
  });
37084
37036
  };
37085
- function LT(t2, e2) {
37086
- return RT(this, void 0, void 0, function() {
37037
+ function IT(t2, e2) {
37038
+ return AT(this, void 0, void 0, function() {
37087
37039
  var i2;
37088
- return IT(this, function(n2) {
37040
+ return MT(this, function(n2) {
37089
37041
  switch (n2.label) {
37090
37042
  case 0:
37091
37043
  i2 = Date.now(), n2.label = 1;
37092
37044
  case 1:
37093
- return !t2() && Date.now() - i2 < e2 ? [4, OT(50)] : [3, 3];
37045
+ return !t2() && Date.now() - i2 < e2 ? [4, RT(50)] : [3, 3];
37094
37046
  case 2:
37095
37047
  return n2.sent(), i2 = Date.now(), [3, 1];
37096
37048
  case 3:
@@ -37099,28 +37051,28 @@ void main(void){
37099
37051
  });
37100
37052
  });
37101
37053
  }
37102
- var NT = { syncDispatch: "syncDispatch", syncReceive: "syncReceive", syncEventLag: "syncEventLag", renderStart: "renderStart", renderEnd: "renderEnd", renderError: "renderError", slideChange: "slideChange", mainSeqStepStart: "mainSeqStepStart", mainSeqStepEnd: "mainSeqStepEnd", animateStart: "animateStart", animateEnd: "animateEnd", stateChange: "stateChange", slideStepEnd: "slideEnd", slideStepStart: "slideStart", useraddLink: "useraddLink" }, DT = { taskId: "", url: "", currentSlideIndex: -1, mainSeqStep: -1, mainSeqState: null, mediaState: /* @__PURE__ */ Object.create(null), interactiveSeqState: /* @__PURE__ */ Object.create(null) }, FT = "";
37054
+ var PT = { syncDispatch: "syncDispatch", syncReceive: "syncReceive", syncEventLag: "syncEventLag", renderStart: "renderStart", renderEnd: "renderEnd", renderError: "renderError", slideChange: "slideChange", mainSeqStepStart: "mainSeqStepStart", mainSeqStepEnd: "mainSeqStepEnd", animateStart: "animateStart", animateEnd: "animateEnd", stateChange: "stateChange", slideStepEnd: "slideEnd", slideStepStart: "slideStart", useraddLink: "useraddLink" }, OT = { taskId: "", url: "", currentSlideIndex: -1, mainSeqStep: -1, mainSeqState: null, mediaState: /* @__PURE__ */ Object.create(null), interactiveSeqState: /* @__PURE__ */ Object.create(null) }, LT = "";
37103
37055
  try {
37104
- FT = "1.4.55-alpha.2";
37056
+ LT = "1.4.55-alpha.5";
37105
37057
  } catch (t2) {
37106
- FT = "-dev-";
37058
+ LT = "-dev-";
37107
37059
  }
37108
- var BT = null;
37060
+ var NT = null;
37109
37061
  try {
37110
- (BT = o.createInstance({ name: "__slide_local_log__", driver: o.INDEXEDDB, version: 1 })).ready(function(t2) {
37062
+ (NT = o.createInstance({ name: "__slide_local_log__", driver: o.INDEXEDDB, version: 1 })).ready(function(t2) {
37111
37063
  }).catch(function(t2) {
37112
37064
  });
37113
37065
  } catch (t2) {
37114
37066
  }
37115
37067
  navigator.userAgent.toUpperCase().includes("HUAWEI") && document.createElement("canvas").getContext("2d").fillText("\u9065\u9065\u9886\u5148", 0, 10);
37116
- var kT = function(t2) {
37068
+ var DT = function(t2) {
37117
37069
  function e2(i3) {
37118
37070
  var n3 = t2.call(this) || this;
37119
- n3.iosResetCache = [], n3.version = FT, n3.__slideState = fx()(DT), n3.userInputTime = 0, n3.isSyncingSlideState = false, n3.frozenTaskManager = new _T(), n3.frozenMediaTimes = /* @__PURE__ */ Object.create(null), n3.randomId = r(), n3.resize = false, n3.isAnimating = false, n3.renderingTaskManager = new nb(), n3.isLoading = false, n3.interactive = true, n3.syncCatchUpInputBlocked = false, n3.renderingIndex = 0, n3.frameWidth = 1, n3.frameHeight = 1, n3.frame = document.createElement("div"), n3.canvasContainer = document.createElement("div"), n3.medianController = document.createElement("div"), n3.frameResizeObserver = new PT(function() {
37071
+ n3.iosResetCache = [], n3.version = LT, n3.__slideState = cx()(OT), n3.userInputTime = 0, n3.isSyncingSlideState = false, n3.frozenTaskManager = new mT(), n3.randomId = r(), n3.resize = false, n3.isAnimating = false, n3.renderingTaskManager = new tb(), n3.isLoading = false, n3.interactive = true, n3.syncCatchUpInputBlocked = false, n3.renderingIndex = 0, n3.frameWidth = 1, n3.frameHeight = 1, n3.frame = document.createElement("div"), n3.canvasContainer = document.createElement("div"), n3.medianController = document.createElement("div"), n3.frameResizeObserver = new CT(function() {
37120
37072
  return n3.frameResizeHandler();
37121
37073
  }), n3.timestamp = function() {
37122
37074
  return Date.now();
37123
- }, n3.mode = "local", n3.enableGlobalClick = false, n3.lastEmitedState = null, n3.selfSyncEvents = /* @__PURE__ */ new WeakSet(), n3.playerController = null, n3.isInitResized = false, n3.cacheImage = document.createElement("img"), n3.isTouchStart = false, n3.touchStartId = void 0, n3.taskId = "", n3.volumeAdjuster = new ix(), n3.designWidth = 0, n3.designHeight = 0, n3._slideCount = 0, n3._dispatchIncrId = 0, n3._receiveIncrId = 0, n3.resizeView = dx()(n3._resizeView.bind(n3), 50), n3.handleViewClick = dx()(n3._handleViewClick.bind(n3), 300, { leading: true }), n3.slideNots = null, n3.resourceList = [], n3._updateVolumeByStaticAdjuster = function(t3) {
37075
+ }, n3.mode = "local", n3.enableGlobalClick = false, n3.lastEmitedState = null, n3.selfSyncEvents = /* @__PURE__ */ new WeakSet(), n3.playerController = null, n3.isInitResized = false, n3.cacheImage = document.createElement("img"), n3.isTouchStart = false, n3.touchStartId = void 0, n3.taskId = "", n3.volumeAdjuster = new $y(), n3.designWidth = 0, n3.designHeight = 0, n3._slideCount = 0, n3._dispatchIncrId = 0, n3._receiveIncrId = 0, n3.resizeView = hx()(n3._resizeView.bind(n3), 50), n3.handleViewClick = hx()(n3._handleViewClick.bind(n3), 300, { leading: true }), n3.slideNots = null, n3.resourceList = [], n3._updateVolumeByStaticAdjuster = function(t3) {
37124
37076
  n3.volumeAdjuster.volume = t3;
37125
37077
  }, n3.handleSyncQueueCompact = function(t3) {
37126
37078
  var e3 = { policy: t3.policy, droppedEventCount: t3.droppedEventCount, droppedRenderCount: t3.droppedRenderCount, droppedStepCount: t3.droppedStepCount, droppedAnimationCount: t3.droppedAnimationCount, droppedMediaCount: t3.droppedMediaCount, droppedOperationCount: t3.droppedOperationCount, droppedEventTypes: t3.droppedEventTypes, retainedSlideIndex: t3.retainedSlideIndex, retainedRenderReceivedAt: t3.retainedRenderReceivedAt, hasRunningTask: t3.hasRunningTask, resourceBoundaryHit: "setResource" === t3.hardBoundaryType, unknownBoundaryHit: !!t3.hardBoundaryType && "setResource" !== t3.hardBoundaryType };
@@ -37144,9 +37096,9 @@ void main(void){
37144
37096
  });
37145
37097
  }
37146
37098
  }, n3.urlInterrupter = function(t3) {
37147
- return RT(n3, void 0, void 0, function() {
37099
+ return AT(n3, void 0, void 0, function() {
37148
37100
  var e3, i4;
37149
- return IT(this, function(n4) {
37101
+ return MT(this, function(n4) {
37150
37102
  return e3 = t3, this.resourceList.length > 0 && (i4 = t3.replace(/^.*__internal__/, ""), e3 = this.resourceList.find(function(t4) {
37151
37103
  return t4.indexOf(i4) >= 0;
37152
37104
  }) || t3), this.config.urlInterrupter ? [2, this.config.urlInterrupter(e3)] : [2, Promise.resolve(e3)];
@@ -37166,12 +37118,12 @@ void main(void){
37166
37118
  var i4 = Number(t3.detail.value);
37167
37119
  i4 > 0 && Number.isInteger(i4) && (e2.__stageCountLimit = i4);
37168
37120
  }, n3.receiveSyncHandler = function(t3) {
37169
- return RT(n3, void 0, void 0, function() {
37121
+ return AT(n3, void 0, void 0, function() {
37170
37122
  var e3, i4, n4, r2, o3, s2, a2, l2 = this;
37171
- return IT(this, function(h2) {
37123
+ return MT(this, function(h2) {
37172
37124
  switch (h2.label) {
37173
37125
  case 0:
37174
- return Jm()(t3.incrId) && (t3.incrId && t3.incrId - this._receiveIncrId != 1 && this.emit(NT.syncEventLag), this._receiveIncrId = t3.incrId || 0), this.logger.info("sync receive " + JSON.stringify(t3), this.taskId), "nextStep" !== t3.type ? [3, 1] : (this.mainSeqStep !== t3.next - 1 && this.mainSeqStep + 1 !== this.mainSeqLength && this.player ? (this.setMainSeqStep(t3.next, "start"), this.player.nextTick(function() {
37126
+ return Jm()(t3.incrId) && (t3.incrId && t3.incrId - this._receiveIncrId != 1 && this.emit(PT.syncEventLag), this._receiveIncrId = t3.incrId || 0), this.logger.info("sync receive " + JSON.stringify(t3), this.taskId), "nextStep" !== t3.type ? [3, 1] : (this.mainSeqStep !== t3.next - 1 && this.mainSeqStep + 1 !== this.mainSeqLength && this.player ? (this.setMainSeqStep(t3.next, "start"), this.player.nextTick(function() {
37175
37127
  l2.doNextStep(true, t3.clientId || "");
37176
37128
  })) : this.doNextStep(true, t3.clientId || ""), [3, 6]);
37177
37129
  case 1:
@@ -37194,16 +37146,16 @@ void main(void){
37194
37146
  }, n3.flushDebounce = function() {
37195
37147
  n3.resizeView.flush(), n3.config.disableClickDebounce || n3.handleViewClick.flush();
37196
37148
  }, n3.handlePrevSlide = function(t3) {
37197
- return void 0 === t3 && (t3 = false), RT(n3, void 0, void 0, function() {
37149
+ return void 0 === t3 && (t3 = false), AT(n3, void 0, void 0, function() {
37198
37150
  var e3, i4;
37199
- return IT(this, function(n4) {
37151
+ return MT(this, function(n4) {
37200
37152
  return !t3 && this.syncCatchUpInputBlocked ? [2] : this.player ? ((e3 = this.player.prevSlideIndex) >= 1 && ((null === (i4 = this.config.navigatorDelegate) || void 0 === i4 ? void 0 : i4.gotoPage) ? this.config.navigatorDelegate.gotoPage(e3) : t3 ? this.enqueueRenderSlide(e3, false) : this.renderSlide(e3, false)), [2]) : [2];
37201
37153
  });
37202
37154
  });
37203
37155
  }, n3.handleNextSlide = function(t3) {
37204
- return void 0 === t3 && (t3 = false), RT(n3, void 0, void 0, function() {
37156
+ return void 0 === t3 && (t3 = false), AT(n3, void 0, void 0, function() {
37205
37157
  var e3, i4;
37206
- return IT(this, function(n4) {
37158
+ return MT(this, function(n4) {
37207
37159
  return !t3 && this.syncCatchUpInputBlocked ? [2] : this.player ? ((e3 = this.player.nextSlideIndex) <= this.slideCount && ((null === (i4 = this.config.navigatorDelegate) || void 0 === i4 ? void 0 : i4.gotoPage) ? this.config.navigatorDelegate.gotoPage(e3) : t3 ? this.enqueueRenderSlide(e3, true) : this.renderSlide(e3, true)), [2]) : [2];
37208
37160
  });
37209
37161
  });
@@ -37215,7 +37167,7 @@ void main(void){
37215
37167
  } else
37216
37168
  -1 === t3 && n3.renderSlide(n3.slideCount, true);
37217
37169
  }, e2.instances.push(n3), n3.config = n3.initSlideConfig(i3), n3.config.disableClickDebounce && (n3.handleViewClick = n3._handleViewClick.bind(n3)), n3.tracker = function(t3) {
37218
- i3.whiteTracker && i3.whiteTracker.commit({ name: t3.name, reason: t3.reason, result: t3.result, payload: MT(MT({}, t3.payload), { slideId: n3.randomId, taskId: n3.taskId }) }, { slideVersion: n3.version || "" });
37170
+ i3.whiteTracker && i3.whiteTracker.commit({ name: t3.name, reason: t3.reason, result: t3.result, payload: ET(ET({}, t3.payload), { slideId: n3.randomId, taskId: n3.taskId }) }, { slideVersion: n3.version || "" });
37219
37171
  }, e2.trackLogger.setEnable(!!n3.config.enableTracking), n3.logger = { info: function(t3, i4) {
37220
37172
  var r2;
37221
37173
  e2.appendLogString("INFO - " + new Date().toISOString() + " - {" + n3.randomId + "}[" + i4 + "] " + t3 + "\n"), e2.trackLogger.addLog(t3, "info", i4, n3.randomId);
@@ -37232,30 +37184,30 @@ void main(void){
37232
37184
  var o3 = null === (r2 = n3.config.logger) || void 0 === r2 ? void 0 : r2.error;
37233
37185
  o3 && o3("[" + i4 + "] " + t3);
37234
37186
  } }, n3.logger.info("new slide with clientId: " + n3.config.clientId + ", version: " + n3.version, n3.taskId), n3.tracker({ name: "initSlide", result: "", reason: "", payload: { taskId: n3.taskId } }), n3.anchor = n3.config.anchor;
37235
- var o2 = fT(n3.mode, n3.config.syncEventQueuePolicy);
37236
- return n3.config.syncEventQueuePolicy = o2, n3.syncQueue = new gT(n3.receiveSyncHandler, { policy: o2, onCompact: n3.handleSyncQueueCompact, onCompactedRenderComplete: n3.handleSyncQueueCompactRenderComplete, onCatchUpStateChange: n3.handleSyncQueueCatchUpStateChange, shouldTrackCatchUpEvent: function(t3) {
37187
+ var o2 = cT(n3.mode, n3.config.syncEventQueuePolicy);
37188
+ return n3.config.syncEventQueuePolicy = o2, n3.syncQueue = new pT(n3.receiveSyncHandler, { policy: o2, onCompact: n3.handleSyncQueueCompact, onCompactedRenderComplete: n3.handleSyncQueueCompactRenderComplete, onCatchUpStateChange: n3.handleSyncQueueCatchUpStateChange, shouldTrackCatchUpEvent: function(t3) {
37237
37189
  return !n3.selfSyncEvents.has(t3);
37238
- } }), n3.lock = new vT("interactive" === n3.mode), n3.cacheImage.style.position = "absolute", n3.cacheImage.style.display = "block", n3.cacheImage.style.zIndex = "100", n3.setMedianControllerAttribute(), n3.canvasContainer.style.position = "relative", n3.canvasContainer.style.fontSize = "0", n3.canvasContainer.appendChild(n3.medianController), n3.frame.appendChild(n3.canvasContainer), n3.frame.appendChild(n3.cacheImage), n3.config.disableFrameResizeObserver || n3.frameResizeObserver.observe(n3.frame), n3.on(NT.syncReceive, function(t3) {
37190
+ } }), n3.lock = new fT("interactive" === n3.mode), n3.cacheImage.style.position = "absolute", n3.cacheImage.style.display = "block", n3.cacheImage.style.zIndex = "100", n3.setMedianControllerAttribute(), n3.canvasContainer.style.position = "relative", n3.canvasContainer.style.fontSize = "0", n3.canvasContainer.appendChild(n3.medianController), n3.frame.appendChild(n3.canvasContainer), n3.frame.appendChild(n3.cacheImage), n3.config.disableFrameResizeObserver || n3.frameResizeObserver.observe(n3.frame), n3.on(PT.syncReceive, function(t3) {
37239
37191
  (n3.lock.unlock(t3.type, t3.uuid) || !!n3.config.clientId && t3.clientId === n3.config.clientId) && n3.selfSyncEvents.add(t3), !n3.player && n3.config.skipActionWhenFrozen || "sync" === n3.mode && n3.config.clientId === t3.clientId || n3.syncQueue.addTask(t3);
37240
37192
  }), n3.renderingTaskManager.eventHub.on("task-error", function(t3) {
37241
37193
  var e3 = t3.error, i4 = t3.task, r2 = Tm.transform(e3);
37242
37194
  r2.errorType === gm.RuntimeWarn ? n3.logger.warn(r2.message, n3.taskId) : n3.logger.error(r2.message, n3.taskId), n3.isLoading = false, n3.reportError(r2, i4.slideIndex);
37243
- }), window.addEventListener("__slide_ref__", n3.handleSlideRef), window.addEventListener("__slide_updateStageCountLimit", n3.updateStageCountLimit), n3.resizeView = dx()(n3.resizeView.bind(n3), 50), n3.player = n3.initPlayer(n3.config), n3.config.controller && n3.createController(), n3.player.view && n3.canvasContainer.appendChild(n3.player.view), n3.config.disableClickDebounce || (n3.handleViewClick = dx()(n3.handleViewClick, 300)), n3.player.errorChannel.on("error", function(t3, e3) {
37195
+ }), window.addEventListener("__slide_ref__", n3.handleSlideRef), window.addEventListener("__slide_updateStageCountLimit", n3.updateStageCountLimit), n3.resizeView = hx()(n3.resizeView.bind(n3), 50), n3.player = n3.initPlayer(n3.config), n3.config.controller && n3.createController(), n3.player.view && n3.canvasContainer.appendChild(n3.player.view), n3.config.disableClickDebounce || (n3.handleViewClick = hx()(n3.handleViewClick, 300)), n3.player.errorChannel.on("error", function(t3, e3) {
37244
37196
  var i4 = Tm.transform(t3);
37245
37197
  i4.errorType === gm.RuntimeWarn ? n3.logger.warn(i4.message, n3.taskId) : n3.logger.error(i4.message, n3.taskId), n3.isLoading = false, n3.reportError(t3, e3), n3.tracker({ name: "slideError", reason: i4.errorMsg, result: "", payload: { code: i4.errorType } });
37246
37198
  }), window.addEventListener("message", n3.recoverHandler), e2.volumeAdjuster.on("update", n3._updateVolumeByStaticAdjuster), n3.volumeAdjuster.volume = e2.volumeAdjuster.volume, n3;
37247
37199
  }
37248
37200
  var i2, n2;
37249
- return AT(e2, t2), e2.flushLog = function(t3) {
37250
- return void 0 === t3 && (t3 = false), RT(this, void 0, void 0, function() {
37251
- return IT(this, function(i3) {
37201
+ return ST(e2, t2), e2.flushLog = function(t3) {
37202
+ return void 0 === t3 && (t3 = false), AT(this, void 0, void 0, function() {
37203
+ return MT(this, function(i3) {
37252
37204
  switch (i3.label) {
37253
37205
  case 0:
37254
37206
  if (!(e2._tempLog.length > 131072 || t3 && e2._tempLog.length > 0))
37255
37207
  return [3, 5];
37256
37208
  i3.label = 1;
37257
37209
  case 1:
37258
- return i3.trys.push([1, 3, , 4]), [4, null == BT ? void 0 : BT.setItem("run_time_log_" + e2._tempLogIndex, e2._tempLog)];
37210
+ return i3.trys.push([1, 3, , 4]), [4, null == NT ? void 0 : NT.setItem("run_time_log_" + e2._tempLogIndex, e2._tempLog)];
37259
37211
  case 2:
37260
37212
  return i3.sent(), [3, 4];
37261
37213
  case 3:
@@ -37270,18 +37222,18 @@ void main(void){
37270
37222
  }, e2.stopRemoteLog = function() {
37271
37223
  e2.remoteLogAddress = null;
37272
37224
  }, e2.startRemoteLog = function(t3) {
37273
- return RT(this, void 0, void 0, function() {
37225
+ return AT(this, void 0, void 0, function() {
37274
37226
  var i3, n3, r2, o2, s2;
37275
- return IT(this, function(a2) {
37227
+ return MT(this, function(a2) {
37276
37228
  switch (a2.label) {
37277
37229
  case 0:
37278
37230
  return e2.remoteLogAddress = t3, [4, e2.flushLog(true)];
37279
37231
  case 1:
37280
- if (a2.sent(), !BT)
37232
+ if (a2.sent(), !NT)
37281
37233
  return [3, 13];
37282
37234
  i3 = [], a2.label = 2;
37283
37235
  case 2:
37284
- return a2.trys.push([2, 4, , 5]), [4, BT.keys()];
37236
+ return a2.trys.push([2, 4, , 5]), [4, NT.keys()];
37285
37237
  case 3:
37286
37238
  return i3 = (a2.sent() || []).sort(function(t4, e3) {
37287
37239
  return parseInt(t4.replace("run_time_log_", "")) - parseInt(e3.replace("run_time_log_", ""));
@@ -37295,7 +37247,7 @@ void main(void){
37295
37247
  return [3, 13];
37296
37248
  o2 = r2[n3], o2.replace("run_time_log_", ""), s2 = "", a2.label = 7;
37297
37249
  case 7:
37298
- return a2.trys.push([7, 9, , 10]), [4, BT.getItem(o2)];
37250
+ return a2.trys.push([7, 9, , 10]), [4, NT.getItem(o2)];
37299
37251
  case 8:
37300
37252
  return s2 = a2.sent() || "", [3, 10];
37301
37253
  case 9:
@@ -37324,72 +37276,72 @@ void main(void){
37324
37276
  var t3;
37325
37277
  null === (t3 = this.player) || void 0 === t3 || t3.setInteractive(this.interactive && !this.syncCatchUpInputBlocked);
37326
37278
  }, e2.prototype.reportError = function(t3, i3) {
37327
- this.emit(NT.renderError, { error: t3, index: i3 }), window.postMessage({ type: "@slide/_error_", errorType: t3.errorType, errorMsg: t3.errorMsg, slideId: this.randomId, slideIndex: i3 || -1, customMessage: "@slide/_error_" }, "*"), e2.trackLogger.uploadLog(true);
37279
+ this.emit(PT.renderError, { error: t3, index: i3 }), window.postMessage({ type: "@slide/_error_", errorType: t3.errorType, errorMsg: t3.errorMsg, slideId: this.randomId, slideIndex: i3 || -1, customMessage: "@slide/_error_" }, "*"), e2.trackLogger.uploadLog(true);
37328
37280
  }, e2.prototype.initSlideConfig = function(t3) {
37329
- return t3.timestamp && (this.timestamp = t3.timestamp), t3.rtcAudio && (sx.RtcAudioClazz = t3.rtcAudio), false !== t3.enableWebAudio && (t3.enableWebAudio = true), this.mode = t3.mode, this.anchor = t3.anchor, this.anchor.appendChild(this.frame), this.enableGlobalClick = !$a()(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.disableClickDebounce = t3.disableClickDebounce || false, t3;
37281
+ return t3.timestamp && (this.timestamp = t3.timestamp), t3.rtcAudio && (nx.RtcAudioClazz = t3.rtcAudio), false !== t3.enableWebAudio && (t3.enableWebAudio = true), this.mode = t3.mode, this.anchor = t3.anchor, this.anchor.appendChild(this.frame), this.enableGlobalClick = !$a()(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.disableClickDebounce = t3.disableClickDebounce || false, t3;
37330
37282
  }, e2.prototype.initPlayer = function(t3) {
37331
- var e3, i3, n3, r2 = this, o2 = new sx({ mode: this.mode, useLocalCache: !!$a()(this.config.useLocalCache) || this.config.useLocalCache, logger: this.logger, resourceTimeout: $a()(this.config.resourceTimeout) ? 15e3 : this.config.resourceTimeout, loadDelegate: this.config.loaderDelegate, volumeAdjuster: this.volumeAdjuster, urlInterrupter: this.urlInterrupter, tracker: this.tracker, enableWebAudio: this.config.enableWebAudio, enableAutoForward: this.config.enableAutoForward, customLinks: this.config.customLinks, resourceMaxRetries: this.config.resourceMaxRetries, onResourceMaxRetries: this.config.onResourceMaxRetries }, t3.renderOptions);
37332
- return o2.setInteractive(this.interactive && !this.syncCatchUpInputBlocked), o2.updateConfig(t3.renderOptions || {}), o2.on(ox.renderStart, function(t4) {
37333
- r2.isLoading = true, r2.emit(NT.renderStart, t4), window.postMessage({ type: "@slide/_render_start_", taskId: r2.taskId, index: t4 }, "*");
37334
- }), o2.on(ox.renderEnd, function(t4) {
37335
- 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.cacheImage.style.maxWidth = r2.player.designWidth + "px", r2.cacheImage.style.minWidth = r2.player.designHeight + "px", r2._slideCount = r2.player.slideCount), r2.emit(NT.renderEnd, t4), window.postMessage({ type: "@slide/_render_end_", taskId: r2.taskId, index: t4 }, "*");
37336
- }), o2.on(ox.slideChange, function(t4) {
37337
- r2.__slideState.currentSlideIndex = t4, r2.emitStateChange(), r2.emit(NT.slideChange, t4);
37338
- }), o2.on(ox.mainSeqStateChange, function(t4) {
37283
+ var e3, i3, n3, r2 = this, o2 = new nx({ mode: this.mode, useLocalCache: !!$a()(this.config.useLocalCache) || this.config.useLocalCache, logger: this.logger, resourceTimeout: $a()(this.config.resourceTimeout) ? 15e3 : this.config.resourceTimeout, loadDelegate: this.config.loaderDelegate, volumeAdjuster: this.volumeAdjuster, urlInterrupter: this.urlInterrupter, tracker: this.tracker, enableWebAudio: this.config.enableWebAudio, enableAutoForward: this.config.enableAutoForward, customLinks: this.config.customLinks, resourceMaxRetries: this.config.resourceMaxRetries, onResourceMaxRetries: this.config.onResourceMaxRetries }, t3.renderOptions);
37284
+ return o2.setInteractive(this.interactive && !this.syncCatchUpInputBlocked), o2.updateConfig(t3.renderOptions || {}), o2.on(ix.renderStart, function(t4) {
37285
+ r2.isLoading = true, r2.emit(PT.renderStart, t4), window.postMessage({ type: "@slide/_render_start_", taskId: r2.taskId, index: t4 }, "*");
37286
+ }), o2.on(ix.renderEnd, function(t4) {
37287
+ 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.cacheImage.style.maxWidth = r2.player.designWidth + "px", r2.cacheImage.style.minWidth = r2.player.designHeight + "px", r2._slideCount = r2.player.slideCount), r2.emit(PT.renderEnd, t4), window.postMessage({ type: "@slide/_render_end_", taskId: r2.taskId, index: t4 }, "*");
37288
+ }), o2.on(ix.slideChange, function(t4) {
37289
+ r2.__slideState.currentSlideIndex = t4, r2.emitStateChange(), r2.emit(PT.slideChange, t4);
37290
+ }), o2.on(ix.mainSeqStateChange, function(t4) {
37339
37291
  r2.__slideState.mainSeqState = t4, r2.emitStateChange();
37340
- }), o2.on(ox.mainSeqStepChange, function(t4) {
37292
+ }), o2.on(ix.mainSeqStepChange, function(t4) {
37341
37293
  r2.__slideState.mainSeqStep = t4, r2.emitStateChange();
37342
- }), o2.on(ox.interactiveSeqStateChange, function(t4) {
37294
+ }), o2.on(ix.interactiveSeqStateChange, function(t4) {
37343
37295
  var e4 = t4.id, i4 = t4.state;
37344
37296
  r2.__slideState.interactiveSeqState[e4] = i4, r2.emitStateChange();
37345
- }), o2.on(ox.animateStart, function() {
37346
- true !== r2.isAnimating && (r2.isAnimating = true, r2.emit(NT.animateStart));
37347
- }), o2.on(ox.animateEnd, function() {
37348
- false !== r2.isAnimating && (r2.isAnimating = false, r2.emit(NT.animateEnd));
37349
- }), o2.on(ox.interactiveSeqAction, function(t4) {
37297
+ }), o2.on(ix.animateStart, function() {
37298
+ true !== r2.isAnimating && (r2.isAnimating = true, r2.emit(PT.animateStart));
37299
+ }), o2.on(ix.animateEnd, function() {
37300
+ false !== r2.isAnimating && (r2.isAnimating = false, r2.emit(PT.animateEnd));
37301
+ }), o2.on(ix.interactiveSeqAction, function(t4) {
37350
37302
  var e4 = t4.action, i4 = t4.seqId;
37351
37303
  r2.emitSyncDispatch({ slideIndex: r2.__slideState.currentSlideIndex, type: "interactiveAnim", action: e4, seqId: i4 }), r2.emitStateChange();
37352
- }), o2.on(ox.mainSeqStepStart, function(t4) {
37353
- r2.emit(NT.mainSeqStepStart, t4);
37354
- }), o2.on(ox.mainSeqStepEnd, function(t4) {
37355
- r2.emit(NT.mainSeqStepEnd, t4);
37356
- }), o2.on(ox.mediaPlay, function(t4) {
37304
+ }), o2.on(ix.mainSeqStepStart, function(t4) {
37305
+ r2.emit(PT.mainSeqStepStart, t4);
37306
+ }), o2.on(ix.mainSeqStepEnd, function(t4) {
37307
+ r2.emit(PT.mainSeqStepEnd, t4);
37308
+ }), o2.on(ix.mediaPlay, function(t4) {
37357
37309
  var e4, i4 = null !== (e4 = r2.__slideState.mediaState[t4.id]) && void 0 !== e4 ? e4 : {};
37358
37310
  i4.type = "play", i4.time = r2.timestamp() - 1e3 * t4.time, r2.__slideState.mediaState[t4.id] = i4, t4._stateOnly ? "interactive" === r2.config.mode && r2.receiveSyncHandler({ slideIndex: r2.__slideState.currentSlideIndex, type: "mediaPlay", id: t4.id, state: i4 }).catch(function(t5) {
37359
37311
  r2.logger.error(null == t5 ? void 0 : t5.message, r2.taskId);
37360
37312
  }) : r2.emitSyncDispatch({ slideIndex: r2.__slideState.currentSlideIndex, type: "mediaPlay", id: t4.id, state: i4 }), r2.emitStateChange();
37361
- }), o2.on(ox.mediaStop, function(t4) {
37313
+ }), o2.on(ix.mediaStop, function(t4) {
37362
37314
  delete r2.__slideState.mediaState[t4.id], r2.emitStateChange();
37363
- }), o2.on(ox.mediaPause, function(t4) {
37315
+ }), o2.on(ix.mediaPause, function(t4) {
37364
37316
  var e4, i4 = null !== (e4 = r2.__slideState.mediaState[t4.id]) && void 0 !== e4 ? e4 : {};
37365
37317
  i4.type = "pause", i4.time = t4.time, r2.__slideState.mediaState[t4.id] = i4, t4._stateOnly ? "interactive" === r2.config.mode && r2.receiveSyncHandler({ slideIndex: r2.__slideState.currentSlideIndex, type: "mediaPause", id: t4.id, state: i4 }).catch(function(t5) {
37366
37318
  r2.logger.error(null == t5 ? void 0 : t5.message, r2.taskId);
37367
37319
  }) : r2.emitSyncDispatch({ slideIndex: r2.__slideState.currentSlideIndex, type: "mediaPause", id: t4.id, state: i4 }), r2.emitStateChange();
37368
- }), o2.on(ox.mediaSeek, function(t4) {
37320
+ }), o2.on(ix.mediaSeek, function(t4) {
37369
37321
  var e4, i4 = null !== (e4 = r2.__slideState.mediaState[t4.id]) && void 0 !== e4 ? e4 : {};
37370
37322
  t4.isPlaying ? (i4.type = "play", i4.time = r2.timestamp() - 1e3 * t4.time) : (i4.type = "pause", i4.time = t4.time), r2.__slideState.mediaState[t4.id] = i4, r2.emitSyncDispatch({ slideIndex: r2.__slideState.currentSlideIndex, type: "mediaSeek", id: t4.id, time: t4.time, state: i4 }), r2.emitStateChange();
37371
- }), o2.on(ox.requestNextStep, function() {
37323
+ }), o2.on(ix.requestNextStep, function() {
37372
37324
  r2.nextStep();
37373
- }), o2.on(ox.requestPrevSlide, function(t4) {
37325
+ }), o2.on(ix.requestPrevSlide, function(t4) {
37374
37326
  r2.handlePrevSlide(t4);
37375
- }), o2.on(ox.requestNextSlide, function(t4) {
37327
+ }), o2.on(ix.requestNextSlide, function(t4) {
37376
37328
  r2.handleNextSlide(t4);
37377
- }), o2.on(ox.useraddLink, function(t4) {
37378
- r2.emit(NT.useraddLink, r2.taskId, r2.renderingIndex, t4);
37379
- }), o2.on(ox.requestGotoSlide, function(t4) {
37329
+ }), o2.on(ix.useraddLink, function(t4) {
37330
+ r2.emit(PT.useraddLink, r2.taskId, r2.renderingIndex, t4);
37331
+ }), o2.on(ix.requestGotoSlide, function(t4) {
37380
37332
  var e4;
37381
37333
  r2.syncCatchUpInputBlocked || ((null === (e4 = r2.config.navigatorDelegate) || void 0 === e4 ? void 0 : e4.gotoPage) ? r2.config.navigatorDelegate.gotoPage(t4) : r2.handleGotoSlide(t4));
37382
- }), o2.on(ox.requestOpenUrl, function(t4) {
37334
+ }), o2.on(ix.requestOpenUrl, function(t4) {
37383
37335
  var e4;
37384
37336
  (null === (e4 = r2.config.navigatorDelegate) || void 0 === e4 ? void 0 : e4.openUrl) && r2.config.navigatorDelegate.openUrl(t4);
37385
- }), o2.on(ox.fullscreenChange, function(t4) {
37337
+ }), o2.on(ix.fullscreenChange, function(t4) {
37386
37338
  var e4, i4 = t4.targetId, n4 = t4.state;
37387
37339
  r2.emitSyncDispatch({ slideIndex: r2.__slideState.currentSlideIndex, type: "mediaFullscreen", targetId: i4, state: n4 });
37388
37340
  var o3 = null !== (e4 = r2.__slideState.mediaState[i4]) && void 0 !== e4 ? e4 : {};
37389
37341
  o3.fullscreen = n4, r2.__slideState.mediaState[i4] = o3, r2.emitStateChange();
37390
- }), o2.on(ox.changeLocalFullscreenState, function(t4) {
37342
+ }), o2.on(ix.changeLocalFullscreenState, function(t4) {
37391
37343
  t4.slideIndex === r2.__slideState.currentSlideIndex ? (t4.targetId && r2.__slideState.mediaState[t4.targetId] && (r2.__slideState.mediaState[t4.targetId].fullscreen = t4.status), r2.emitStateChange()) : r2.logger.info("event slideIndex: " + t4.slideIndex + ", current slideIndex: " + r2.__slideState.currentSlideIndex, r2.taskId);
37392
- }), null === (e3 = o2.view) || void 0 === e3 || e3.addEventListener("touchend", this.handleViewTouchEnd), null === (i3 = o2.view) || void 0 === i3 || i3.addEventListener("touchstart", this.handleViewTouchStart), null === (n3 = o2.view) || void 0 === n3 || n3.addEventListener("click", this.handleViewClick), o2.on(ox.userInput, this.userInputHandle), o2;
37344
+ }), null === (e3 = o2.view) || void 0 === e3 || e3.addEventListener("touchend", this.handleViewTouchEnd), null === (i3 = o2.view) || void 0 === i3 || i3.addEventListener("touchstart", this.handleViewTouchStart), null === (n3 = o2.view) || void 0 === n3 || n3.addEventListener("click", this.handleViewClick), o2.on(ix.userInput, this.userInputHandle), o2;
37393
37345
  }, e2.prototype._handleViewClick = function() {
37394
37346
  var t3 = this;
37395
37347
  setTimeout(function() {
@@ -37397,7 +37349,7 @@ void main(void){
37397
37349
  Math.abs(e3 - t3.userInputTime) > 500 && t3.enableGlobalClick && t3.nextStep();
37398
37350
  });
37399
37351
  }, e2.prototype.createController = function() {
37400
- this.player && (this.playerController = new dT(this.player, this.frame));
37352
+ this.player && (this.playerController = new hT(this.player, this.frame));
37401
37353
  }, e2.prototype.setMedianControllerAttribute = function() {
37402
37354
  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", this.medianController.style.fontSize = "16px";
37403
37355
  }, e2.prototype.frameResizeHandler = function() {
@@ -37419,33 +37371,23 @@ void main(void){
37419
37371
  }
37420
37372
  }, e2.prototype.setSlideState = function(t3) {
37421
37373
  var e3, i3, n3;
37422
- return RT(this, void 0, void 0, function() {
37374
+ return AT(this, void 0, void 0, function() {
37423
37375
  var r2, o2 = this;
37424
- return IT(this, function(s2) {
37376
+ return MT(this, function(s2) {
37425
37377
  switch (s2.label) {
37426
37378
  case 0:
37427
- this.isSyncingSlideState = true, s2.label = 1;
37379
+ 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, null === (e3 = this.player) || void 0 === e3 || e3.setResourceData(t3.taskId, this.__slideState.url)), t3.url && t3.url !== this.__slideState.url && (this.__slideState.url = t3.url, null === (i3 = this.player) || void 0 === i3 || i3.setResourceData(this.__slideState.taskId, t3.url)), Number.isInteger(t3.currentSlideIndex) && t3.currentSlideIndex !== this.__slideState.currentSlideIndex ? (this.__slideState.currentSlideIndex = t3.currentSlideIndex, [4, this.enqueueRenderSlide(t3.currentSlideIndex)]) : [3, 2];
37428
37380
  case 1:
37429
- return s2.trys.push([1, , 8, 9]), this.logger.info("stateChange receive " + JSON.stringify(t3), this.taskId), t3.taskId && t3.taskId !== this.__slideState.taskId && (this.__slideState.taskId = t3.taskId, null === (e3 = this.player) || void 0 === e3 || e3.setResourceData(t3.taskId, this.__slideState.url)), t3.url && t3.url !== this.__slideState.url && (this.__slideState.url = t3.url, null === (i3 = this.player) || void 0 === i3 || i3.setResourceData(this.__slideState.taskId, t3.url)), Number.isInteger(t3.currentSlideIndex) && t3.currentSlideIndex !== this.__slideState.currentSlideIndex ? (this.__slideState.currentSlideIndex = t3.currentSlideIndex, [4, this.enqueueRenderSlide(t3.currentSlideIndex)]) : [3, 3];
37381
+ s2.sent(), s2.label = 2;
37430
37382
  case 2:
37431
- s2.sent(), s2.label = 3;
37432
- case 3:
37433
37383
  return [4, null === (n3 = this.player) || void 0 === n3 ? void 0 : n3.clock.waitUntil(function() {
37434
37384
  var e4, i4;
37435
37385
  return (null === (e4 = o2.player) || void 0 === e4 ? void 0 : e4.currentIndex) === t3.currentSlideIndex && (null === (i4 = o2.player) || void 0 === i4 ? void 0 : i4.currentStage);
37436
37386
  }, 3e3)];
37387
+ case 3:
37388
+ return s2.sent(), r2 = false, Number.isInteger(t3.mainSeqStep) && t3.mainSeqStep !== this.__slideState.mainSeqStep && (r2 = true, this.__slideState.mainSeqStep = t3.mainSeqStep), t3.mainSeqState && t3.mainSeqState !== this.__slideState.mainSeqState && (r2 = true, this.__slideState.mainSeqState = t3.mainSeqState), r2 && this.setMainSeqStep(this.__slideState.mainSeqStep, "idle" === this.__slideState.mainSeqState ? "start" : "end"), t3.interactiveSeqState && (this.initInteractiveSeq(t3), this.__slideState.interactiveSeqState = t3.interactiveSeqState), [4, RT(1500)];
37437
37389
  case 4:
37438
- return s2.sent(), r2 = false, Number.isInteger(t3.mainSeqStep) && t3.mainSeqStep !== this.__slideState.mainSeqStep && (r2 = true, this.__slideState.mainSeqStep = t3.mainSeqStep), t3.mainSeqState && t3.mainSeqState !== this.__slideState.mainSeqState && (r2 = true, this.__slideState.mainSeqState = t3.mainSeqState), r2 && this.setMainSeqStep(this.__slideState.mainSeqStep, "idle" === this.__slideState.mainSeqState ? "start" : "end"), t3.interactiveSeqState && (this.initInteractiveSeq(t3), this.__slideState.interactiveSeqState = t3.interactiveSeqState), [4, OT(1500)];
37439
- case 5:
37440
- return s2.sent(), t3.mediaState ? [4, this.initMedia(t3)] : [3, 7];
37441
- case 6:
37442
- s2.sent(), this.__slideState.mediaState = t3.mediaState, s2.label = 7;
37443
- case 7:
37444
- return [3, 9];
37445
- case 8:
37446
- return this.isSyncingSlideState = false, [7];
37447
- case 9:
37448
- return [2];
37390
+ return s2.sent(), t3.mediaState && (this.initMedia(t3), this.__slideState.mediaState = t3.mediaState), this.isSyncingSlideState = false, [2];
37449
37391
  }
37450
37392
  });
37451
37393
  });
@@ -37457,35 +37399,21 @@ void main(void){
37457
37399
  }
37458
37400
  }, e2.prototype.initMedia = function(t3) {
37459
37401
  var e3, i3, n3;
37460
- return RT(this, void 0, void 0, function() {
37461
- var r2, o2, s2, a2, l2, h2, u2;
37462
- return IT(this, function(c2) {
37463
- switch (c2.label) {
37464
- case 0:
37465
- for (o2 in r2 = [], t3.mediaState)
37466
- r2.push(o2);
37467
- s2 = 0, c2.label = 1;
37468
- case 1:
37469
- return s2 < r2.length ? (a2 = r2[s2], l2 = t3.mediaState[a2], h2 = this.__slideState.mediaState[a2], null === (e3 = this.player) || void 0 === e3 || e3.syncFullscreenVideoState({ targetId: a2, state: !!l2.fullscreen, slideIndex: this.slideState.currentSlideIndex }), h2 && l2.type === h2.type && l2.time === h2.time ? [3, 5] : "play" !== l2.type ? [3, 3] : (u2 = (this.timestamp() - l2.time) / 1e3, [4, null === (i3 = this.player) || void 0 === i3 ? void 0 : i3.setMediaState(a2, true, u2)])) : [3, 6];
37470
- case 2:
37471
- return c2.sent(), [3, 5];
37472
- case 3:
37473
- return [4, null === (n3 = this.player) || void 0 === n3 ? void 0 : n3.setMediaState(a2, false, l2.time)];
37474
- case 4:
37475
- c2.sent(), c2.label = 5;
37476
- case 5:
37477
- return s2++, [3, 1];
37478
- case 6:
37479
- return [2];
37480
- }
37481
- });
37482
- });
37402
+ for (var r2 in t3.mediaState) {
37403
+ var o2 = t3.mediaState[r2], s2 = this.__slideState.mediaState[r2];
37404
+ if (null === (e3 = this.player) || void 0 === e3 || e3.syncFullscreenVideoState({ targetId: r2, state: !!o2.fullscreen, slideIndex: this.slideState.currentSlideIndex }), !s2 || o2.type !== s2.type || o2.time !== s2.time)
37405
+ if ("play" === o2.type) {
37406
+ var a2 = (this.timestamp() - o2.time) / 1e3;
37407
+ null === (i3 = this.player) || void 0 === i3 || i3.setMediaState(r2, true, a2);
37408
+ } else
37409
+ null === (n3 = this.player) || void 0 === n3 || n3.setMediaState(r2, false, o2.time);
37410
+ }
37483
37411
  }, Object.defineProperty(e2.prototype, "slideCount", { get: function() {
37484
37412
  return this._slideCount;
37485
37413
  }, enumerable: false, configurable: true }), e2.prototype.getSizeAsync = function() {
37486
- return RT(this, void 0, void 0, function() {
37414
+ return AT(this, void 0, void 0, function() {
37487
37415
  var t3;
37488
- return IT(this, function(e3) {
37416
+ return MT(this, function(e3) {
37489
37417
  switch (e3.label) {
37490
37418
  case 0:
37491
37419
  if (this.width > 0 && this.height > 0)
@@ -37505,8 +37433,8 @@ void main(void){
37505
37433
  });
37506
37434
  });
37507
37435
  }, e2.prototype.getSlideCountAsync = function() {
37508
- return RT(this, void 0, void 0, function() {
37509
- return IT(this, function(t3) {
37436
+ return AT(this, void 0, void 0, function() {
37437
+ return MT(this, function(t3) {
37510
37438
  switch (t3.label) {
37511
37439
  case 0:
37512
37440
  if (this._slideCount > 0)
@@ -37565,12 +37493,12 @@ void main(void){
37565
37493
  this.taskId = t3, this.resourceList = e3, null === (i3 = this.player) || void 0 === i3 || i3.setResourceData(t3, "__internal__"), this.__slideState.taskId = t3, this.__slideState.url = "__internal__";
37566
37494
  }, e2.prototype._renderSlide = function(t3) {
37567
37495
  var e3;
37568
- return RT(this, void 0, void 0, function() {
37496
+ return AT(this, void 0, void 0, function() {
37569
37497
  var i3 = this;
37570
- return IT(this, function(n3) {
37498
+ return MT(this, function(n3) {
37571
37499
  switch (n3.label) {
37572
37500
  case 0:
37573
- return this.renderingIndex = t3, this.player && t3 === this.player.currentIndex ? [2] : ((sx.platform.isIOS() || sx.platform.isAndroid()) && this.iosResetCache.indexOf(t3) < 0 && this.iosResetCache.push(t3), this.flushDebounce(), [4, null === (e3 = this.player) || void 0 === e3 ? void 0 : e3.renderSlide(t3)]);
37501
+ return this.renderingIndex = t3, this.player && t3 === this.player.currentIndex ? [2] : ((nx.platform.isIOS() || nx.platform.isAndroid()) && this.iosResetCache.indexOf(t3) < 0 && this.iosResetCache.push(t3), this.flushDebounce(), [4, null === (e3 = this.player) || void 0 === e3 ? void 0 : e3.renderSlide(t3)]);
37574
37502
  case 1:
37575
37503
  return n3.sent(), this.__slideState.currentSlideIndex = t3, this._resizeView(), this.__slideState.interactiveSeqState = {}, this.__slideState.mediaState = {}, this.emitStateChange(), setTimeout(function() {
37576
37504
  var t4, e4;
@@ -37588,8 +37516,8 @@ void main(void){
37588
37516
  }
37589
37517
  }, e2.prototype.needCreateNewPlayer = function() {
37590
37518
  var t3 = e2.__stageCountLimit;
37591
- t3 <= 0 && (t3 = sx.platform.isLowGpuMemory() ? 15 : 30);
37592
- return (sx.platform.isIOS() || sx.platform.isAndroid()) && this.iosResetCache.length > t3;
37519
+ t3 <= 0 && (t3 = nx.platform.isLowGpuMemory() ? 15 : 30);
37520
+ return (nx.platform.isIOS() || nx.platform.isAndroid()) && this.iosResetCache.length > t3;
37593
37521
  }, e2.prototype.poseRenderSlide = function(t3, e3) {
37594
37522
  "interactive" === this.mode ? this.emitSyncDispatch({ slideIndex: this.__slideState.currentSlideIndex, type: "renderSlide", index: t3, isForward: e3 }) : "sync" === this.mode ? (this.doRenderSlide(t3, e3), this.emitSyncDispatch({ slideIndex: this.__slideState.currentSlideIndex, type: "renderSlide", index: t3, isForward: e3 })) : this.doRenderSlide(t3, e3);
37595
37523
  }, e2.prototype.doRenderSlide = function(t3, e3) {
@@ -37612,7 +37540,7 @@ void main(void){
37612
37540
  var t3, e3;
37613
37541
  return null !== (e3 = null === (t3 = this.player) || void 0 === t3 ? void 0 : t3.getSnapshot()) && void 0 !== e3 ? e3 : null;
37614
37542
  }, e2.prototype.nextStep = function() {
37615
- !this.isLoading && this.player && this.interactive && !this.syncCatchUpInputBlocked ? (this.hasNextStep() || this.emit(NT.slideStepEnd), this.player.mainSeqHasNextStep() ? "interactive" === this.mode ? this.emitSyncDispatch({ slideIndex: this.__slideState.currentSlideIndex, type: "nextStep", next: this.player.mainSeqStep() + 1 }) : "sync" === this.mode ? (this.doNextStep(false, ""), this.emitSyncDispatch({ slideIndex: this.__slideState.currentSlideIndex, type: "nextStep", next: this.player.mainSeqStep() })) : this.doNextStep(false, "") : this.handleNextSlide()) : this.logger.info("prevent nextStep. isLoading: " + this.isLoading + ", player: " + !!this.player + ", interactive: " + this.interactive + ", syncCatchUpInputBlocked: " + this.syncCatchUpInputBlocked, this.taskId);
37543
+ !this.isLoading && this.player && this.interactive && !this.syncCatchUpInputBlocked ? (this.hasNextStep() || this.emit(PT.slideStepEnd), this.player.mainSeqHasNextStep() ? "interactive" === this.mode ? this.emitSyncDispatch({ slideIndex: this.__slideState.currentSlideIndex, type: "nextStep", next: this.player.mainSeqStep() + 1 }) : "sync" === this.mode ? (this.doNextStep(false, ""), this.emitSyncDispatch({ slideIndex: this.__slideState.currentSlideIndex, type: "nextStep", next: this.player.mainSeqStep() })) : this.doNextStep(false, "") : this.handleNextSlide()) : this.logger.info("prevent nextStep. isLoading: " + this.isLoading + ", player: " + !!this.player + ", interactive: " + this.interactive + ", syncCatchUpInputBlocked: " + this.syncCatchUpInputBlocked, this.taskId);
37616
37544
  }, e2.prototype.doNextStep = function(t3, e3) {
37617
37545
  if (this.player) {
37618
37546
  var i3 = !this.config.clientId || e3 === this.config.clientId;
@@ -37621,7 +37549,7 @@ void main(void){
37621
37549
  this.__slideState.mainSeqStep = n3, this.emitStateChange();
37622
37550
  }
37623
37551
  }, e2.prototype.prevStep = function() {
37624
- !this.isLoading && this.player && this.interactive && !this.syncCatchUpInputBlocked ? (this.hasPrevStep() || this.emit(NT.slideStepStart), this.player.mainSeqHasPrevStep() ? "interactive" === this.mode ? this.emitSyncDispatch({ type: "prevStep", slideIndex: this.__slideState.currentSlideIndex, next: this.player.mainSeqStep() - 1 }) : "sync" === this.mode ? (this.doPrevStep(), this.emitSyncDispatch({ slideIndex: this.__slideState.currentSlideIndex, type: "prevStep", next: this.player.mainSeqStep() })) : this.doPrevStep() : this.handlePrevSlide()) : this.logger.info("prevent prevStep. isLoading: " + this.isLoading + ", player: " + !!this.player + ", interactive: " + this.interactive + ", syncCatchUpInputBlocked: " + this.syncCatchUpInputBlocked, this.taskId);
37552
+ !this.isLoading && this.player && this.interactive && !this.syncCatchUpInputBlocked ? (this.hasPrevStep() || this.emit(PT.slideStepStart), this.player.mainSeqHasPrevStep() ? "interactive" === this.mode ? this.emitSyncDispatch({ type: "prevStep", slideIndex: this.__slideState.currentSlideIndex, next: this.player.mainSeqStep() - 1 }) : "sync" === this.mode ? (this.doPrevStep(), this.emitSyncDispatch({ slideIndex: this.__slideState.currentSlideIndex, type: "prevStep", next: this.player.mainSeqStep() })) : this.doPrevStep() : this.handlePrevSlide()) : this.logger.info("prevent prevStep. isLoading: " + this.isLoading + ", player: " + !!this.player + ", interactive: " + this.interactive + ", syncCatchUpInputBlocked: " + this.syncCatchUpInputBlocked, this.taskId);
37625
37553
  }, e2.prototype.doPrevStep = function(t3) {
37626
37554
  if (void 0 === t3 && (t3 = false), this.player) {
37627
37555
  this.player.prevStep(t3);
@@ -37633,14 +37561,14 @@ void main(void){
37633
37561
  }, e2.prototype.emitStateChange = function() {
37634
37562
  if ("local" !== this.mode && !this.isSyncingSlideState) {
37635
37563
  var t3 = this.slideState;
37636
- !ux()(this.lastEmitedState, t3) && this.isSlideStateReady(t3) && (this.lastEmitedState = t3, this.emit(NT.stateChange, t3), this.logger.info("stateChange dispatch " + JSON.stringify(this.slideState), this.taskId));
37564
+ !ax()(this.lastEmitedState, t3) && this.isSlideStateReady(t3) && (this.lastEmitedState = t3, this.emit(PT.stateChange, t3), this.logger.info("stateChange dispatch " + JSON.stringify(this.slideState), this.taskId));
37637
37565
  }
37638
37566
  }, e2.prototype.emitSyncDispatch = function(t3) {
37639
37567
  if (!this.lock.isLocked(t3.type)) {
37640
37568
  var e3 = Math.random().toString(32).substr(2);
37641
37569
  this.lock.addLock(t3.type, e3);
37642
- var i3 = MT(MT({}, t3), { uuid: e3, clientId: this.config.clientId });
37643
- "sync" === this.config.mode && (i3.incrId = this.dispatchIncrId), this.emit(NT.syncDispatch, i3), this.logger.info("sync dispatch " + JSON.stringify(i3), this.taskId);
37570
+ var i3 = ET(ET({}, t3), { uuid: e3, clientId: this.config.clientId });
37571
+ "sync" === this.config.mode && (i3.incrId = this.dispatchIncrId), this.emit(PT.syncDispatch, i3), this.logger.info("sync dispatch " + JSON.stringify(i3), this.taskId);
37644
37572
  }
37645
37573
  }, e2.prototype.setMainSeqStep = function(t3, e3) {
37646
37574
  var i3;
@@ -37648,7 +37576,7 @@ void main(void){
37648
37576
  }, e2.prototype.setInteractive = function(t3) {
37649
37577
  this.interactive = t3, this.updatePlayerInteractive();
37650
37578
  }, e2.prototype.setSyncEventQueuePolicy = function(t3) {
37651
- var e3 = fT(this.mode, t3);
37579
+ var e3 = cT(this.mode, t3);
37652
37580
  this.syncQueue.setPolicy(e3), this.config.syncEventQueuePolicy = e3;
37653
37581
  }, e2.prototype.pause = function() {
37654
37582
  var t3;
@@ -37658,23 +37586,20 @@ void main(void){
37658
37586
  null === (t3 = this.player) || void 0 === t3 || t3.resume();
37659
37587
  }, e2.prototype._doFrozen = function(t3) {
37660
37588
  var e3;
37661
- return RT(this, void 0, void 0, function() {
37662
- var i3, n3 = this;
37663
- return IT(this, function(r2) {
37664
- switch (r2.label) {
37589
+ return AT(this, void 0, void 0, function() {
37590
+ var i3, n3, r2, o2 = this;
37591
+ return MT(this, function(s2) {
37592
+ switch (s2.label) {
37665
37593
  case 0:
37666
37594
  return this.logger.info("do frozen with player[" + !!this.player + "]", this.taskId), this.tracker({ name: "frozenSlide", reason: "", result: "", payload: { taskId: this.taskId } }), this.view && this.player ? [4, this.player.clock.waitUntil(function() {
37667
- return !n3.isLoading;
37595
+ return !o2.isLoading;
37668
37596
  }, 6e4)] : [3, 2];
37669
37597
  case 1:
37670
- r2.sent(), i3 = this.player.getSnapshot() || "", this.cacheImage.src = i3, this.cacheImage.style.display = "block", this.player.destroy(), null === (e3 = this.playerController) || void 0 === e3 || e3.destroy(), this.player = void 0, this.frozenMediaTimes = function(t4, e4) {
37671
- var i4 = /* @__PURE__ */ Object.create(null);
37672
- for (var n4 in t4)
37673
- "play" === t4[n4].type && (i4[n4] = e4);
37674
- return i4;
37675
- }(this.__slideState.mediaState, this.timestamp()), r2.label = 2;
37598
+ for (n3 in s2.sent(), i3 = this.player.getSnapshot() || "", this.cacheImage.src = i3, this.cacheImage.style.display = "block", this.player.destroy(), null === (e3 = this.playerController) || void 0 === e3 || e3.destroy(), this.player = void 0, this.__slideState.mediaState)
37599
+ r2 = this.__slideState.mediaState[n3], this.__slideState.mediaState[n3] = ET(ET({}, r2), { frozenTime: this.timestamp() });
37600
+ s2.label = 2;
37676
37601
  case 2:
37677
- return null == t3 || t3(), [2];
37602
+ return t3 && t3(), [2];
37678
37603
  }
37679
37604
  });
37680
37605
  });
@@ -37685,29 +37610,20 @@ void main(void){
37685
37610
  });
37686
37611
  }, e2.prototype._doRelease = function(t3) {
37687
37612
  var e3, i3;
37688
- return RT(this, void 0, void 0, function() {
37689
- var n3, r2;
37690
- return IT(this, function(o2) {
37691
- switch (o2.label) {
37613
+ return AT(this, void 0, void 0, function() {
37614
+ var n3, r2, o2, s2;
37615
+ return MT(this, function(a2) {
37616
+ switch (a2.label) {
37692
37617
  case 0:
37693
37618
  if (this.logger.info("do release slide", this.taskId), this.tracker({ name: "releaseSlide", reason: "", result: "", payload: { taskId: this.taskId } }), this.player)
37694
- return null == t3 || t3(), [2];
37695
- o2.label = 1;
37619
+ return [2];
37620
+ for (r2 in this.player = this.initPlayer(this.config), (null === (e3 = this.config) || void 0 === e3 ? void 0 : e3.controller) && this.createController(), this.player.view && (this.canvasContainer.appendChild(this.player.view), this.player.view.style.visibility = "hidden"), n3 = this.__slideState, this.__slideState = cx()(OT), n3.mediaState)
37621
+ "play" === (o2 = n3.mediaState[r2]).type && (s2 = Math.max(null !== (i3 = o2.frozenTime) && void 0 !== i3 ? i3 : 0, o2.time), o2.time = this.timestamp() - (s2 - o2.time), o2.frozenTime = void 0);
37622
+ return [4, this.setSlideState(n3)];
37696
37623
  case 1:
37697
- return o2.trys.push([1, , 4, 5]), this.player = this.initPlayer(this.config), (null === (e3 = this.config) || void 0 === e3 ? void 0 : e3.controller) && this.createController(), this.player.view && (this.canvasContainer.appendChild(this.player.view), this.player.view.style.visibility = "hidden"), n3 = this.__slideState, this.__slideState = fx()(DT), r2 = this.frozenMediaTimes, this.frozenMediaTimes = /* @__PURE__ */ Object.create(null), function(t4, e4, i4) {
37698
- for (var n4 in t4) {
37699
- var r3 = t4[n4], o3 = e4[n4];
37700
- "play" === r3.type && void 0 !== o3 && (r3.time = i4 - (Math.max(o3, r3.time) - r3.time));
37701
- }
37702
- }(n3.mediaState, r2, this.timestamp()), [4, this.setSlideState(n3)];
37624
+ return a2.sent(), [4, this.player.clock.delay(333)];
37703
37625
  case 2:
37704
- return o2.sent(), [4, this.player.clock.delay(333)];
37705
- case 3:
37706
- return o2.sent(), [3, 5];
37707
- case 4:
37708
- return (null === (i3 = this.player) || void 0 === i3 ? void 0 : i3.view) && (this.player.view.style.visibility = "visible"), this.cacheImage.style.display = "none", null == t3 || t3(), [7];
37709
- case 5:
37710
- return [2];
37626
+ return a2.sent(), this.player.view && (this.player.view.style.visibility = "visible"), this.cacheImage.style.display = "none", t3 && t3(), [2];
37711
37627
  }
37712
37628
  });
37713
37629
  });
@@ -37741,14 +37657,14 @@ void main(void){
37741
37657
  }
37742
37658
  e2.volumeAdjuster.off("update", this._updateVolumeByStaticAdjuster);
37743
37659
  }, e2.prototype.waitLoadEnd = function() {
37744
- return RT(this, void 0, void 0, function() {
37660
+ return AT(this, void 0, void 0, function() {
37745
37661
  var t3;
37746
- return IT(this, function(e3) {
37662
+ return MT(this, function(e3) {
37747
37663
  switch (e3.label) {
37748
37664
  case 0:
37749
37665
  t3 = 0, e3.label = 1;
37750
37666
  case 1:
37751
- return this.isLoading && t3 < 10 ? [4, OT(100)] : [3, 3];
37667
+ return this.isLoading && t3 < 10 ? [4, RT(100)] : [3, 3];
37752
37668
  case 2:
37753
37669
  return e3.sent(), t3 += 1, [3, 1];
37754
37670
  case 3:
@@ -37779,14 +37695,14 @@ void main(void){
37779
37695
  var t3 = 1 === this.player.currentIndex, e3 = 0 === this.mainSeqLength || 0 === this.mainSeqStep, i3 = "idle" === this.mainSeqState || null === this.mainSeqState;
37780
37696
  return !(t3 && e3 && i3);
37781
37697
  }, e2.prototype.snapshot = function() {
37782
- return RT(this, void 0, void 0, function() {
37783
- return IT(this, function(t3) {
37698
+ return AT(this, void 0, void 0, function() {
37699
+ return MT(this, function(t3) {
37784
37700
  return this.player ? [2, this.player.getSnapshot()] : [2, null];
37785
37701
  });
37786
37702
  });
37787
37703
  }, e2.prototype.snapshotWithTimingEnd = function(t3) {
37788
- return RT(this, void 0, void 0, function() {
37789
- return IT(this, function(e3) {
37704
+ return AT(this, void 0, void 0, function() {
37705
+ return MT(this, function(e3) {
37790
37706
  return this.player ? [2, this.player.snapshotWithTimingEnd(t3)] : [2, null];
37791
37707
  });
37792
37708
  });
@@ -37795,12 +37711,12 @@ void main(void){
37795
37711
  }, e2.prototype.getGlobalVolume = function() {
37796
37712
  return this.volumeAdjuster.volume;
37797
37713
  }, e2.clearLocalCache = function() {
37798
- sx.clearLocalCache();
37714
+ nx.clearLocalCache();
37799
37715
  }, e2.disposeLocalCache = function() {
37800
37716
  }, e2.prototype.getNoteForCurrentSlide = function(t3) {
37801
- return RT(this, void 0, void 0, function() {
37717
+ return AT(this, void 0, void 0, function() {
37802
37718
  var e3, i3;
37803
- return IT(this, function(n3) {
37719
+ return MT(this, function(n3) {
37804
37720
  switch (n3.label) {
37805
37721
  case 0:
37806
37722
  if (!this.player)
@@ -37821,7 +37737,7 @@ void main(void){
37821
37737
  }
37822
37738
  });
37823
37739
  });
37824
- }, i2 = e2, e2.preloadResource = wT, e2.instances = [], e2._tempFrozenIds = [], e2._tempLog = "", e2._tempLogIndex = 1, e2.remoteLogAddress = null, e2.usePlugin = function(t3) {
37740
+ }, i2 = e2, e2.preloadResource = TT, e2.instances = [], e2._tempFrozenIds = [], e2._tempLog = "", e2._tempLogIndex = 1, e2.remoteLogAddress = null, e2.usePlugin = function(t3) {
37825
37741
  t3.context({ logger: { info: function(t4) {
37826
37742
  e2.appendLogString("INFO - " + new Date().toISOString() + " - " + t4 + "\n");
37827
37743
  }, warn: function(t4) {
@@ -37829,10 +37745,10 @@ void main(void){
37829
37745
  }, error: function(t4) {
37830
37746
  e2.appendLogString("ERROR - " + new Date().toISOString() + " - " + t4 + "\n");
37831
37747
  } } }), function(t4) {
37832
- var e3 = ax.get(t4.hookPoint) || [];
37833
- e3.push(t4), ax.set(t4.hookPoint, e3);
37748
+ var e3 = rx.get(t4.hookPoint) || [];
37749
+ e3.push(t4), rx.set(t4.hookPoint, e3);
37834
37750
  }(t3);
37835
- }, e2.volumeAdjuster = new ix(), e2.__stageCountLimit = -1, e2.trackLogger = new TT(), e2.handleFrozenAllSlide = function() {
37751
+ }, e2.volumeAdjuster = new $y(), e2.__stageCountLimit = -1, e2.trackLogger = new yT(), e2.handleFrozenAllSlide = function() {
37836
37752
  e2.instances.forEach(function(t3) {
37837
37753
  t3.player && (e2._tempFrozenIds.push(t3.randomId), t3.frozen());
37838
37754
  });
@@ -37844,18 +37760,18 @@ void main(void){
37844
37760
  i3 && i3.release();
37845
37761
  }), e2._tempFrozenIds = [];
37846
37762
  }, e2.handleLogReport = function(t3) {
37847
- return RT(void 0, void 0, void 0, function() {
37763
+ return AT(void 0, void 0, void 0, function() {
37848
37764
  var n3, r2, o2, s2, a2, l2;
37849
- return IT(i2, function(i3) {
37765
+ return MT(i2, function(i3) {
37850
37766
  switch (i3.label) {
37851
37767
  case 0:
37852
37768
  return [4, e2.flushLog(true)];
37853
37769
  case 1:
37854
- if (i3.sent(), !BT)
37770
+ if (i3.sent(), !NT)
37855
37771
  return [3, 12];
37856
37772
  n3 = [], i3.label = 2;
37857
37773
  case 2:
37858
- return i3.trys.push([2, 4, , 5]), [4, BT.keys()];
37774
+ return i3.trys.push([2, 4, , 5]), [4, NT.keys()];
37859
37775
  case 3:
37860
37776
  return n3 = (i3.sent() || []).sort(function(t4, e3) {
37861
37777
  return parseInt(t4.replace("run_time_log_", "")) - parseInt(e3.replace("run_time_log_", ""));
@@ -37871,7 +37787,7 @@ void main(void){
37871
37787
  return [3, 12];
37872
37788
  s2 = o2[r2], a2 = s2.replace("run_time_log_", ""), l2 = "", i3.label = 7;
37873
37789
  case 7:
37874
- return i3.trys.push([7, 9, , 10]), [4, BT.getItem(s2)];
37790
+ return i3.trys.push([7, 9, , 10]), [4, NT.getItem(s2)];
37875
37791
  case 8:
37876
37792
  return l2 = i3.sent() || "", [3, 10];
37877
37793
  case 9:
@@ -37886,20 +37802,20 @@ void main(void){
37886
37802
  });
37887
37803
  });
37888
37804
  }, e2.handleLogDownload = function() {
37889
- return RT(void 0, void 0, void 0, function() {
37805
+ return AT(void 0, void 0, void 0, function() {
37890
37806
  var t3, n3, r2, o2, s2, a2, l2;
37891
- return IT(i2, function(i3) {
37807
+ return MT(i2, function(i3) {
37892
37808
  switch (i3.label) {
37893
37809
  case 0:
37894
37810
  return i3.trys.push([0, 7, , 8]), [4, e2.flushLog(true)];
37895
37811
  case 1:
37896
- return i3.sent(), t3 = "", BT ? [4, BT.keys()] : [3, 6];
37812
+ return i3.sent(), t3 = "", NT ? [4, NT.keys()] : [3, 6];
37897
37813
  case 2:
37898
37814
  n3 = (i3.sent() || []).sort(function(t4, e3) {
37899
37815
  return parseInt(t4.replace("run_time_log_", "")) - parseInt(e3.replace("run_time_log_", ""));
37900
37816
  }), r2 = 0, o2 = n3, i3.label = 3;
37901
37817
  case 3:
37902
- return r2 < o2.length ? (s2 = o2[r2], a2 = t3, [4, BT.getItem(s2)]) : [3, 6];
37818
+ return r2 < o2.length ? (s2 = o2[r2], a2 = t3, [4, NT.getItem(s2)]) : [3, 6];
37903
37819
  case 4:
37904
37820
  t3 = a2 + (i3.sent() || ""), i3.label = 5;
37905
37821
  case 5:
@@ -37913,12 +37829,12 @@ void main(void){
37913
37829
  }
37914
37830
  });
37915
37831
  });
37916
- }, CT([(n2 = "Slide.initConfig", function(t3, e3, i3) {
37832
+ }, wT([(n2 = "Slide.initConfig", function(t3, e3, i3) {
37917
37833
  var r2 = i3.value;
37918
37834
  i3.value = function() {
37919
37835
  for (var t4 = [], e4 = 0; e4 < arguments.length; e4++)
37920
37836
  t4[e4] = arguments[e4];
37921
- for (var i4 = ax.get(n2) || [], o2 = t4, s2 = 0, a2 = i4; s2 < a2.length; s2++) {
37837
+ for (var i4 = rx.get(n2) || [], o2 = t4, s2 = 0, a2 = i4; s2 < a2.length; s2++) {
37922
37838
  var l2 = a2[s2];
37923
37839
  try {
37924
37840
  o2 = l2.before(o2);
@@ -37940,35 +37856,35 @@ void main(void){
37940
37856
  };
37941
37857
  })], e2.prototype, "initSlideConfig", null), e2;
37942
37858
  }(Za.a);
37943
- null == BT || BT.clear().catch(function() {
37944
- }), window.addEventListener("__slide_log__", kT.handleLogDownload), window.addEventListener("message", function(t2) {
37859
+ null == NT || NT.clear().catch(function() {
37860
+ }), window.addEventListener("__slide_log__", DT.handleLogDownload), window.addEventListener("message", function(t2) {
37945
37861
  var e2;
37946
37862
  if ("@slide/_request_log_" === t2.data.type)
37947
- kT.handleLogReport(t2.data.sessionId).catch(function() {
37863
+ DT.handleLogReport(t2.data.sessionId).catch(function() {
37948
37864
  });
37949
37865
  else if ("@slide/_request_frozen_" === t2.data.type)
37950
- kT.handleFrozenAllSlide();
37866
+ DT.handleFrozenAllSlide();
37951
37867
  else if ("@slide/_request_release_" === t2.data.type)
37952
- kT.handleReleaseAllSlide();
37868
+ DT.handleReleaseAllSlide();
37953
37869
  else if ("@slide/_update_volume_" === t2.data.type) {
37954
37870
  var i2 = 0.5;
37955
37871
  try {
37956
37872
  i2 = parseFloat(t2.data.volume.toString());
37957
37873
  } catch (t3) {
37958
37874
  }
37959
- kT.volumeAdjuster.volume = i2;
37875
+ DT.volumeAdjuster.volume = i2;
37960
37876
  } else if ("@slide/_get_volume_" === t2.data.type)
37961
- window.postMessage({ type: "@slide/_report_volume_", volume: kT.volumeAdjuster.volume, customMessage: "@slide/_report_volume_" }, "*");
37877
+ window.postMessage({ type: "@slide/_report_volume_", volume: DT.volumeAdjuster.volume, customMessage: "@slide/_report_volume_" }, "*");
37962
37878
  else if ("@slide/_preload_slide_" === t2.data.type) {
37963
37879
  var n2 = null !== (e2 = t2.data.sessionId) && void 0 !== e2 ? e2 : Math.random().toString(32).substr(2);
37964
- kT.preloadResource(t2.data.taskId, t2.data.prefix, t2.data.maxResolutionLevel, function(e3) {
37880
+ DT.preloadResource(t2.data.taskId, t2.data.prefix, t2.data.maxResolutionLevel, function(e3) {
37965
37881
  window.postMessage({ type: "@slide/_preload_slide_progress_", sessionId: n2, taskId: t2.data.taskId, progress: e3 }, "*");
37966
37882
  }, t2.data.pages).catch(function(e3) {
37967
37883
  window.postMessage({ type: "@slide/_preload_slide_error_", sessionId: n2, taskId: t2.data.taskId, error: e3 }, "*");
37968
37884
  });
37969
37885
  }
37970
37886
  }), window.setInterval(function() {
37971
- kT.flushLog().catch(function() {
37887
+ DT.flushLog().catch(function() {
37972
37888
  });
37973
37889
  }, 2e3);
37974
37890
  }]);
@@ -38530,14 +38446,6 @@ function cachedGetBgColor(el) {
38530
38446
  const getRoomTracker = (displayer) => {
38531
38447
  return displayer.tracker;
38532
38448
  };
38533
- async function releaseAndRestoreSlide(slide, getLatestState, onRestore) {
38534
- await new Promise((resolve) => slide.release(resolve));
38535
- const state = getLatestState();
38536
- if (state) {
38537
- onRestore == null ? void 0 : onRestore(state);
38538
- await slide.setSlideState(state);
38539
- }
38540
- }
38541
38449
  function createDocsViewerPages(slide, previewUrls = []) {
38542
38450
  const { width, height, slideCount, slideState } = slide;
38543
38451
  const { taskId, url } = slideState;
@@ -38679,19 +38587,20 @@ class SlideControllerBase {
38679
38587
  return;
38680
38588
  this.isFrozen = false;
38681
38589
  if (this.ready) {
38590
+ let isNeedSyncState = false;
38682
38591
  log("[Slide] unfreeze", this.context.appId);
38683
- try {
38684
- if (this.invisibleBehavior !== "frozen") {
38685
- this.slide.resume();
38686
- return;
38592
+ if (this.invisibleBehavior === "frozen") {
38593
+ this.slide.release();
38594
+ isNeedSyncState = true;
38595
+ } else {
38596
+ this.slide.resume();
38597
+ }
38598
+ if (isNeedSyncState) {
38599
+ const state = this.context.storage.state.state;
38600
+ if (state) {
38601
+ log("[Slide] sync storage", JSON.stringify(state));
38602
+ this.slide.setSlideState(state);
38687
38603
  }
38688
- await releaseAndRestoreSlide(
38689
- this.slide,
38690
- () => this.context.storage.state.state,
38691
- (state) => log("[Slide] sync storage", JSON.stringify(state))
38692
- );
38693
- } catch (error) {
38694
- log("[Slide] unfreeze failed", error);
38695
38604
  }
38696
38605
  } else {
38697
38606
  this._toFreeze = -1;
@@ -41608,7 +41517,7 @@ class SlidePreviewer {
41608
41517
  }
41609
41518
  }
41610
41519
  const usePlugin = /* @__PURE__ */ Slide.Slide.usePlugin.bind(Slide.Slide);
41611
- const version = "0.2.100-alpha.0";
41520
+ const version = "0.2.100-alpha.2";
41612
41521
  const SlideApp = {
41613
41522
  kind: "Slide",
41614
41523
  setup(context) {