@netless/app-slide 0.0.38 → 0.0.39

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
@@ -7890,7 +7890,7 @@ var Slide = function(t2) {
7890
7890
  }), n.d(e2, "SLIDE_EVENTS", function() {
7891
7891
  return hR;
7892
7892
  }), n.d(e2, "Slide", function() {
7893
- return dR;
7893
+ return pR;
7894
7894
  });
7895
7895
  var i = {};
7896
7896
  n.r(i), n.d(i, "ACESFilmicToneMapping", function() {
@@ -30996,14 +30996,14 @@ void main(void){
30996
30996
  if (!this.cache)
30997
30997
  return;
30998
30998
  const e3 = yield this.cache.getItem(t3), n2 = new iy(e3), i2 = yield this.cache.getItem(t3.replace("texture", "json")), r3 = yield this.cache.getItem(t3.replace("texture", "map"));
30999
- console.time("loadFromCache"), Object.keys(r3).forEach((t4) => {
30999
+ Object.keys(r3).forEach((t4) => {
31000
31000
  this.hashToIdMap[t4] = r3[t4], r3[t4].forEach((e4) => {
31001
31001
  this.idToHashMap[e4] = t4;
31002
31002
  });
31003
31003
  }), Object.keys(i2).forEach((t4) => {
31004
31004
  const e4 = i2[t4], r4 = new xy(n2, new d_(e4.x, e4.y, e4.w, e4.h));
31005
31005
  this.textures[t4] = { texture: r4, pivot: e4.pivot };
31006
- }), console.timeEnd("loadFromCache");
31006
+ });
31007
31007
  });
31008
31008
  }
31009
31009
  pack() {
@@ -32349,7 +32349,7 @@ void main(void){
32349
32349
  }
32350
32350
  class oA extends a.a {
32351
32351
  constructor(t3) {
32352
- super(), this.runtimeNodeEventHub = new a.a(), this._currentSeqIndex = 0, this._currentSeqState = "idle", this.isForward = true, this.autoPlay = false, this.handlePrev = () => {
32352
+ super(), this.interactiveListeners = [], this.runtimeNodeEventHub = new a.a(), this._currentSeqIndex = 0, this._currentSeqState = "idle", this.isForward = true, this.autoPlay = false, this.handlePrev = () => {
32353
32353
  var t4, e4, n3, i3, r4, o4;
32354
32354
  this.hasPrev() || !this.isMainSeq ? this.currentSeqState === "idle" ? (this.decrSeqIndex(), (t4 = this.commonTimeNode.children[this.currentSeqIndex]) === null || t4 === void 0 || t4.commonTimeNode.seekToStart(), (e4 = this.commonTimeNode.children[this.currentSeqIndex]) === null || e4 === void 0 || e4.commonTimeNode.clearSubList(), this.currentSeqState = "idle") : this.currentSeqState === "running" ? ((n3 = this.commonTimeNode.children[this.currentSeqIndex]) === null || n3 === void 0 || n3.commonTimeNode.seekToStart(), (i3 = this.commonTimeNode.children[this.currentSeqIndex]) === null || i3 === void 0 || i3.commonTimeNode.clearSubList(), this.currentSeqState = "idle") : this.currentSeqState === "end" && (this.currentSeqIndex >= this.commonTimeNode.children.length && (this.currentSeqIndex = this.commonTimeNode.children.length - 1), (r4 = this.commonTimeNode.children[this.currentSeqIndex]) === null || r4 === void 0 || r4.commonTimeNode.seekToStart(), (o4 = this.commonTimeNode.children[this.currentSeqIndex]) === null || o4 === void 0 || o4.commonTimeNode.clearSubList(), this.currentSeqState = "idle") : this.globalEventHub.emit("c:prev slide");
32355
32355
  }, this.handleNext = () => {
@@ -32371,12 +32371,12 @@ void main(void){
32371
32371
  this.commonTimeNode.resetForRepeat(), this.ctx.clock.setTimeout(() => {
32372
32372
  this.currentSeqState = "idle", this.currentSeqIndex = 0;
32373
32373
  });
32374
+ }), this.commonTimeNode.on("timeNodeDestroy", () => {
32375
+ this.interactiveListeners.forEach(([t4, e4]) => {
32376
+ t4 && e4 && t4.container.removeListener("pointerdown", e4);
32377
+ }), this.interactiveListeners = [];
32374
32378
  }), this.nextConds.on("active", () => {
32375
- if (this.isInteractiveSeq) {
32376
- const { mode: t4 } = this.ctx;
32377
- t4 !== "interactive" && t4 !== "sync" || this.ctx.eventHub.emit(tC.interactiveSeqNext, this.json.ctn.id), t4 !== "sync" && t4 !== "local" || this.handleNext();
32378
- } else
32379
- this.handleNext();
32379
+ this.handleNext();
32380
32380
  }), this.prevConds.on("active", this.handlePrev);
32381
32381
  }
32382
32382
  get currentSeqIndex() {
@@ -32421,10 +32421,14 @@ void main(void){
32421
32421
  const e3 = t3.event.split(" ")[1];
32422
32422
  if (e3) {
32423
32423
  const t4 = this.ctx.timingTargets.getTargetById(e3);
32424
- t4 && (t4.interactiveContainer.interactive = true, t4.interactiveContainer.cursor = "pointer", t4.interactiveContainer.on("pointerdown", () => {
32425
- const t5 = `shape ${e3} onClick`;
32426
- this.globalEventHub.emit(t5);
32427
- }));
32424
+ if (t4) {
32425
+ t4.interactiveContainer.interactive = true, t4.interactiveContainer.cursor = "pointer";
32426
+ const n2 = () => {
32427
+ const t5 = `shape ${e3} onClick`, { mode: n3 } = this.ctx;
32428
+ n3 !== "interactive" && n3 !== "sync" || this.ctx.eventHub.emit(tC.interactiveSeqAction, { action: t5, seqId: this.json.ctn.id }), n3 !== "sync" && n3 !== "local" || this.globalEventHub.emit(t5);
32429
+ };
32430
+ t4.interactiveContainer.on("pointerdown", n2), this.interactiveListeners.push([t4, n2]);
32431
+ }
32428
32432
  }
32429
32433
  }
32430
32434
  });
@@ -33201,7 +33205,7 @@ void main(void){
33201
33205
  };
33202
33206
  class BA {
33203
33207
  constructor(t3, e3, n2) {
33204
- this.json = t3, this.ctx = n2;
33208
+ this.json = t3, this.ctx = n2, this.globalEventHub = e3;
33205
33209
  const i2 = t3.timeNodeList.find((t4) => t4.type === "par" && t4.ctn.nodeType === "tmRoot");
33206
33210
  i2 && (this.tmRoot = new NA({ json: i2, isSub: false, isIterate: false, eventHub: e3, ctx: n2, parent: null, iterateType: "el", iterateIndex: 0, iterateId: "" }), this.mainSeq = this.tmRoot.commonTimeNode.children.find((t4) => {
33207
33211
  var e4, n3, i3;
@@ -33262,9 +33266,17 @@ void main(void){
33262
33266
  const i2 = this.findSeq(t3);
33263
33267
  i2 && i2.setCurrentStep(e3, n2);
33264
33268
  }
33269
+ resetAllInteractiveSeq() {
33270
+ var t3;
33271
+ ((t3 = this.tmRoot) === null || t3 === void 0 ? void 0 : t3.commonTimeNode.children.filter((t4) => {
33272
+ var e3, n2, i2;
33273
+ return ((e3 = t4.json) === null || e3 === void 0 ? void 0 : e3.type) === "seq" && ((i2 = (n2 = t4.json) === null || n2 === void 0 ? void 0 : n2.ctn) === null || i2 === void 0 ? void 0 : i2.nodeType) === "interactiveSeq";
33274
+ })).forEach((t4) => {
33275
+ t4.setCurrentStep(0, "start");
33276
+ });
33277
+ }
33265
33278
  applyInteractiveAction(t3) {
33266
- const e3 = this.findSeq(t3);
33267
- e3 && e3.handleNext();
33279
+ this.globalEventHub.emit(t3);
33268
33280
  }
33269
33281
  }
33270
33282
  var kA = function(t3, e3, n2, i2) {
@@ -33309,7 +33321,7 @@ void main(void){
33309
33321
  return this.container;
33310
33322
  }
33311
33323
  render(t3) {
33312
- this.isRendered || (console.log("render ", this.json.index), this.isRendered = true, super.render(t3), t3.push(() => kA(this, void 0, void 0, function* () {
33324
+ this.isRendered || (this.isRendered = true, super.render(t3), t3.push(() => kA(this, void 0, void 0, function* () {
33313
33325
  this.ctx.eventHub.emit("StageRenderEnd");
33314
33326
  })));
33315
33327
  }
@@ -33336,8 +33348,8 @@ void main(void){
33336
33348
  return !!this.timing;
33337
33349
  }
33338
33350
  clearOnSlideChange() {
33339
- var t3;
33340
- this.ctx.eventHub.removeAllListeners(), this.globalEventHub.removeAllListeners(), (t3 = this.timing) === null || t3 === void 0 || t3.destroy(), this.timing = void 0, super.clearOnSlideChange();
33351
+ var t3, e3, n2;
33352
+ this.ctx.eventHub.removeAllListeners(), this.globalEventHub.removeAllListeners(), (t3 = this.timing) === null || t3 === void 0 || t3.setMainSeqStep(0, "start"), (e3 = this.timing) === null || e3 === void 0 || e3.resetAllInteractiveSeq(), (n2 = this.timing) === null || n2 === void 0 || n2.destroy(), this.timing = void 0, super.clearOnSlideChange();
33341
33353
  }
33342
33354
  destroy() {
33343
33355
  var t3;
@@ -33573,7 +33585,7 @@ void main(void){
33573
33585
  e3.addMTask(() => XA(this, void 0, void 0, function* () {
33574
33586
  const n2 = this.stageJsons[t3], i2 = this.stageCtxs[t3];
33575
33587
  if (yield i2.fillTexture.hasLocalCache())
33576
- return void console.log("cache hit", t3);
33588
+ return;
33577
33589
  const r3 = [];
33578
33590
  this.collectChildren(n2, r3);
33579
33591
  const o3 = Math.ceil(r3.length / 10), s3 = [];
@@ -33591,7 +33603,7 @@ void main(void){
33591
33603
  e3.addMTask(() => XA(this, void 0, void 0, function* () {
33592
33604
  const n2 = this.stageJsons[t3], i2 = this.stageCtxs[t3];
33593
33605
  if (yield i2.graphicsTexture.hasLocalCache())
33594
- return void console.log("cache hit", t3);
33606
+ return;
33595
33607
  const r3 = [];
33596
33608
  this.collectChildren(n2, r3);
33597
33609
  const o3 = Math.ceil(r3.length / 10), s3 = [];
@@ -33609,9 +33621,8 @@ void main(void){
33609
33621
  e3.addMTask(() => XA(this, void 0, void 0, function* () {
33610
33622
  const n2 = this.stageCtxs[t3];
33611
33623
  if (yield n2.fillTexture.hasLocalCache()) {
33612
- console.log("cache hit", t3);
33613
- const i3 = (yield n2.fillTexture.getTextureKeys()).map((t4) => () => n2.fillTexture.loadFromCache(t4));
33614
- return void e3.addSubMTask(i3);
33624
+ const t4 = (yield n2.fillTexture.getTextureKeys()).map((t5) => () => n2.fillTexture.loadFromCache(t5));
33625
+ return void e3.addSubMTask(t4);
33615
33626
  }
33616
33627
  const i2 = n2.fillTexture.pack();
33617
33628
  yield n2.fillTexture.setCacheLength(i2.length);
@@ -33624,9 +33635,8 @@ void main(void){
33624
33635
  e3.addMTask(() => XA(this, void 0, void 0, function* () {
33625
33636
  const n2 = this.stageCtxs[t3];
33626
33637
  if (yield n2.graphicsTexture.hasLocalCache()) {
33627
- console.log("cache hit", t3);
33628
- const i3 = (yield n2.graphicsTexture.getTextureKeys()).map((t4) => () => n2.graphicsTexture.loadFromCache(t4));
33629
- return void e3.addSubMTask(i3);
33638
+ const t4 = (yield n2.graphicsTexture.getTextureKeys()).map((t5) => () => n2.graphicsTexture.loadFromCache(t5));
33639
+ return void e3.addSubMTask(t4);
33630
33640
  }
33631
33641
  const i2 = n2.graphicsTexture.pack();
33632
33642
  yield n2.graphicsTexture.setCacheLength(i2.length);
@@ -33637,7 +33647,6 @@ void main(void){
33637
33647
  renderStage(t3) {
33638
33648
  const { task: e3 } = this.stageStates[t3];
33639
33649
  e3.addMTask(() => XA(this, void 0, void 0, function* () {
33640
- console.time("render stage");
33641
33650
  const n2 = this.stageImpls[t3], i2 = this.stageCtxs[t3], r3 = [];
33642
33651
  yield n2.render(r3);
33643
33652
  const o3 = Math.ceil(r3.length / 10), s3 = [];
@@ -33657,7 +33666,7 @@ void main(void){
33657
33666
  const o4 = i2.renderer.plugins.extract.base64(e5, "image/jpeg");
33658
33667
  yield (r4 = this.snapshotCache) === null || r4 === void 0 ? void 0 : r4.setItem(t3.toString() + "-start", o4), n2.container.visible = false, e5.destroy(), n2.timing && (n2.timing.destroy(), n2.timing = void 0);
33659
33668
  }
33660
- })), e3.addSubMTask(s3), console.timeEnd("render stage");
33669
+ })), e3.addSubMTask(s3);
33661
33670
  }));
33662
33671
  }
33663
33672
  destroyStageByIndex(t3) {
@@ -33718,10 +33727,10 @@ void main(void){
33718
33727
  });
33719
33728
  };
33720
33729
  r2.skipHello();
33721
- const KA = new h.a().getDevice(), QA = { 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" }, tC = { mainSeqStepChange: "mainSeqStepChange", mainSeqStateChange: "mainSeqStateChange", interactiveSeqStateChange: "interactiveSeqStateChange", interactiveSeqNext: "interactiveSeqNext", mainSeqStepStart: "mainSeqStepStart", mainSeqStepEnd: "mainSeqStepEnd", slideChange: "slideChange", renderStart: "renderStart", renderEnd: "renderEnd", hyperlinkTrigger: "hyperlinkTrigger", animateStart: "animateStart", animateEnd: "animateEnd", mediaSeek: "mediaSeek", mediaPlay: "mediaPlay", mediaPause: "mediaPause", requestNextSlide: "requestNextSlide", requestPrevSlide: "requestPrevSlide", requestGotoSlide: "requestGotoSlide" };
33730
+ const KA = new h.a().getDevice(), QA = { 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" }, tC = { mainSeqStepChange: "mainSeqStepChange", mainSeqStateChange: "mainSeqStateChange", interactiveSeqStateChange: "interactiveSeqStateChange", interactiveSeqAction: "interactiveSeqAction", mainSeqStepStart: "mainSeqStepStart", mainSeqStepEnd: "mainSeqStepEnd", slideChange: "slideChange", renderStart: "renderStart", renderEnd: "renderEnd", hyperlinkTrigger: "hyperlinkTrigger", animateStart: "animateStart", animateEnd: "animateEnd", mediaSeek: "mediaSeek", mediaPlay: "mediaPlay", mediaPause: "mediaPause", requestNextSlide: "requestNextSlide", requestPrevSlide: "requestPrevSlide", requestGotoSlide: "requestGotoSlide" };
33722
33731
  class eC extends a.a {
33723
33732
  constructor(t3, e3 = {}) {
33724
- super(), this.loader = new lE(true), this.transactionPlayer = new ag(), this.transactionSprite = new dS(), this.isForward = true, this.drawCall = 0, this.scale = 1, this.prevSlideBase64 = null, this.fps = new rE(), this.designWidth = 0, this.designHeight = 0, this.currentIndex = 0, this.slideCount = 0, this.runtime = { drawCall: 0, fps: 0 }, this.mode = t3;
33733
+ super(), this.devive = KA, this.loader = new lE(true), this.transactionPlayer = new ag(), this.transactionSprite = new dS(), this.isForward = true, this.drawCall = 0, this.scale = 1, this.prevSlideBase64 = null, this.fps = new rE(), this.designWidth = 0, this.designHeight = 0, this.currentIndex = 0, this.slideCount = 0, this.runtime = { drawCall: 0, fps: 0 }, this.mode = t3;
33725
33734
  let n2 = Math.max(window.devicePixelRatio, 2);
33726
33735
  KA.type === "mobile" && (n2 = 1), this.config = { minFPS: Object(l.isUndefined)(e3.minFPS) ? 30 : e3.minFPS, maxFPS: Object(l.isUndefined)(e3.maxFPS) ? 40 : e3.maxFPS, resolution: Object(l.isUndefined)(e3.resolution) ? n2 : e3.resolution, autoFPS: !Object(l.isUndefined)(e3.autoFPS) && e3.autoFPS, autoResolution: !Object(l.isUndefined)(e3.autoResolution) && e3.autoResolution, transactionBgColor: Object(l.isUndefined)(e3.transactionBgColor) ? 0 : e3.transactionBgColor }, this.app = new ab({ antialias: true, autoDensity: false, backgroundColor: 16777215 }), this.updateConfig(this.config), this.app.view.style.zIndex = "1", this.app.stage.sortableChildren = true;
33727
33736
  const i2 = this.app.renderer, { drawElements: r3 } = i2.gl;
@@ -33791,7 +33800,7 @@ void main(void){
33791
33800
  return $A(this, void 0, void 0, function* () {
33792
33801
  this.emit(tC.renderStart, t3);
33793
33802
  const r3 = yield this.stagePool.getStage(t3);
33794
- this.translateEvent(r3.ctx.eventHub, [tC.mainSeqStepChange, tC.mainSeqStateChange, tC.hyperlinkTrigger, tC.interactiveSeqNext, tC.mainSeqStepStart, tC.mainSeqStepEnd, tC.animateStart, tC.animateEnd, tC.mediaPlay, tC.mediaPause, tC.mediaSeek, tC.requestGotoSlide, tC.requestNextSlide, tC.requestPrevSlide, tC.interactiveSeqStateChange]), this.currentIndex = Number(t3);
33803
+ this.translateEvent(r3.ctx.eventHub, [tC.mainSeqStepChange, tC.mainSeqStateChange, tC.hyperlinkTrigger, tC.interactiveSeqAction, tC.mainSeqStepStart, tC.mainSeqStepEnd, tC.animateStart, tC.animateEnd, tC.mediaPlay, tC.mediaPause, tC.mediaSeek, tC.requestGotoSlide, tC.requestNextSlide, tC.requestPrevSlide, tC.interactiveSeqStateChange]), this.currentIndex = Number(t3);
33795
33804
  const { width: o3, height: s3, slideCount: a2 } = r3.json;
33796
33805
  this.slideCount = a2, this.designWidth = o3, this.designHeight = s3, (n2 = this.currentStage) === null || n2 === void 0 || n2.clearOnSlideChange();
33797
33806
  const l2 = this.currentStage;
@@ -33801,7 +33810,7 @@ void main(void){
33801
33810
  const n3 = t3.toString() + (this.isForward || e3 ? "-start" : "-end"), r4 = yield (i2 = this.snapshotCache) === null || i2 === void 0 ? void 0 : i2.getItem(n3);
33802
33811
  u2 = r4 || this.getBase64(this.currentStage);
33803
33812
  }
33804
- r3.container.visible = false, this.app.stage.addChild(r3.container), this.prevSlideBase64 && u2 && r3.json.transition && r3.json.transition.type && (console.log("playTransaction ", Date.now()), yield this.playTransaction(this.prevSlideBase64, u2, r3.json.transition), this.prevSlideBase64 = null), this.isForward ? yield r3.startTiming() : r3.setMainSeqApplied(), this.updateResolution(this.config.resolution * this.scale), r3.container.visible = true, l2 && this.app.stage.removeChild(l2.container), this.emit(tC.renderEnd, t3), this.emit(tC.slideChange, t3), this.preload(t3 + 1).catch(() => {
33813
+ r3.container.visible = false, this.app.stage.addChild(r3.container), this.prevSlideBase64 && u2 && r3.json.transition && r3.json.transition.type && l2 && r3 && (yield this.playTransaction(this.prevSlideBase64, u2, r3.json.transition, l2, r3), this.prevSlideBase64 = null), this.isForward ? yield r3.startTiming() : r3.setMainSeqApplied(), this.updateResolution(this.config.resolution * this.scale), r3.container.visible = true, l2 && this.app.stage.removeChild(l2.container), this.emit(tC.renderEnd, t3), this.emit(tC.slideChange, t3), this.preload(t3 + 1).catch(() => {
33805
33814
  }), this.preload(t3 - 1).catch(() => {
33806
33815
  });
33807
33816
  });
@@ -33812,18 +33821,18 @@ void main(void){
33812
33821
  const n2 = this.app.renderer.plugins.extract.base64(e3, "image/jpeg");
33813
33822
  return e3.destroy(), n2;
33814
33823
  }
33815
- playTransaction(t3, e3, n2) {
33824
+ playTransaction(t3, e3, n2, i2, r3) {
33816
33825
  return $A(this, void 0, void 0, function* () {
33817
- const i2 = this.app.view.parentElement;
33818
- if (t3 && e3 && i2 && QA[n2.type] && this.transactionPlayer) {
33826
+ const o3 = this.app.view.parentElement;
33827
+ if (t3 && e3 && o3 && QA[n2.type] && this.transactionPlayer) {
33819
33828
  this.transactionSprite.zIndex = 999, this.transactionSprite.visible = false, this.app.stage.addChild(this.transactionSprite);
33820
- const i3 = this.transactionPlayer.renderer.domElement, r3 = xy.from(i3), o3 = () => r3.update();
33821
- return this.app.ticker.add(o3), this.transactionSprite.texture = r3, setTimeout(() => {
33829
+ const o4 = this.transactionPlayer.renderer.domElement, s3 = xy.from(o4), a2 = () => s3.update();
33830
+ return this.app.ticker.add(a2), this.transactionSprite.texture = s3, setTimeout(() => {
33822
33831
  this.transactionSprite.visible = true;
33823
- }, 100), new Promise((i4) => {
33824
- var r4, s3, a2;
33825
- (r4 = this.transactionPlayer) === null || r4 === void 0 || r4.play({ reverse: !this.isForward, prevTextureUrl: t3, nextTextureUrl: e3, textureWidth: this.designWidth, textureHeight: this.designHeight, presetType: QA[n2.type], stageWidth: this.designWidth, stageHeight: this.designHeight, duration: (a2 = (s3 = this.currentStage) === null || s3 === void 0 ? void 0 : s3.json.transition) === null || a2 === void 0 ? void 0 : a2.dur, delay: 0, clearColor: this.config.transactionBgColor, onTransactionEnd: () => {
33826
- i4(), this.app.stage.removeChild(this.transactionSprite), this.app.ticker.remove(o3);
33832
+ }, 100), new Promise((o5) => {
33833
+ var s4, l2, u2;
33834
+ (s4 = this.transactionPlayer) === null || s4 === void 0 || s4.play({ reverse: !this.isForward, prevTextureUrl: t3, nextTextureUrl: e3, textureWidth: this.designWidth, textureHeight: this.designHeight, presetType: QA[n2.type], stageWidth: this.designWidth, stageHeight: this.designHeight, duration: (u2 = (l2 = this.currentStage) === null || l2 === void 0 ? void 0 : l2.json.transition) === null || u2 === void 0 ? void 0 : u2.dur, delay: 0, clearColor: this.config.transactionBgColor, onTransactionEnd: () => {
33835
+ o5(), i2.container.visible = false, r3.container.visible = true, this.app.stage.removeChild(this.transactionSprite), this.app.ticker.remove(a2);
33827
33836
  } });
33828
33837
  });
33829
33838
  }
@@ -33837,7 +33846,7 @@ void main(void){
33837
33846
  }
33838
33847
  updateResolution(t3) {
33839
33848
  this.app.ticker.addOnce(() => {
33840
- this.app.renderer.resolution = t3, this.app.renderer.plugins.interaction.resolution = this.app.renderer.resolution, this.app.renderer.resize(this.designWidth, this.designHeight);
33849
+ KA.type !== "mobile" && (this.app.renderer.resolution = t3, this.app.renderer.plugins.interaction.resolution = this.app.renderer.resolution, this.app.renderer.resize(this.designWidth, this.designHeight));
33841
33850
  });
33842
33851
  }
33843
33852
  nextStep() {
@@ -35448,10 +35457,16 @@ void main(void){
35448
35457
  });
35449
35458
  });
35450
35459
  }
35451
- var hR = { syncDispatch: "syncDispatch", syncReceive: "syncReceive", renderStart: "renderStart", renderEnd: "renderEnd", renderError: "renderError", slideChange: "slideChange", mainSeqStepStart: "mainSeqStepStart", mainSeqStepEnd: "mainSeqStepEnd", animateStart: "animateStart", animateEnd: "animateEnd", stateChange: "stateChange" }, cR = { taskId: "", url: "", currentSlideIndex: -1, mainSeqStep: -1, mainSeqState: null, mediaState: Object.create(null), interactiveSeqState: Object.create(null) }, dR = function(t3) {
35460
+ var hR = { syncDispatch: "syncDispatch", syncReceive: "syncReceive", renderStart: "renderStart", renderEnd: "renderEnd", renderError: "renderError", slideChange: "slideChange", mainSeqStepStart: "mainSeqStepStart", mainSeqStepEnd: "mainSeqStepEnd", animateStart: "animateStart", animateEnd: "animateEnd", stateChange: "stateChange" }, cR = { taskId: "", url: "", currentSlideIndex: -1, mainSeqStep: -1, mainSeqState: null, mediaState: Object.create(null), interactiveSeqState: Object.create(null) }, dR = "";
35461
+ try {
35462
+ dR = "0.1.41";
35463
+ } catch (t3) {
35464
+ dR = "dev";
35465
+ }
35466
+ var pR = function(t3) {
35452
35467
  function e3(e4) {
35453
35468
  var n2 = t3.call(this) || this;
35454
- return n2.__slideState = Object(l.cloneDeep)(cR), n2.resize = false, n2.isAnimating = false, n2.renderingTaskManager = new WC(), n2.isLoading = false, n2.interactive = true, n2.frameWidth = 1, n2.frameHeight = 1, n2.frame = document.createElement("div"), n2.medianController = document.createElement("div"), n2.frameResizeObserver = new aR(function() {
35469
+ return n2.version = dR, n2.__slideState = Object(l.cloneDeep)(cR), n2.resize = false, n2.isAnimating = false, n2.renderingTaskManager = new WC(), n2.isLoading = false, n2.interactive = true, n2.frameWidth = 1, n2.frameHeight = 1, n2.frame = document.createElement("div"), n2.medianController = document.createElement("div"), n2.frameResizeObserver = new aR(function() {
35455
35470
  return n2.frameResizeHandler();
35456
35471
  }), n2.timestamp = function() {
35457
35472
  return Date.now();
@@ -35509,7 +35524,7 @@ void main(void){
35509
35524
  o3.doPrevStep();
35510
35525
  })), [3, 6]);
35511
35526
  case 2:
35512
- return t4.type !== "interactiveAnim" ? [3, 3] : (this.player ? this.player.applyInteractiveAction(t4.seqId) : this.__slideState.interactiveSeqState[t4.seqId].step += 1, [3, 6]);
35527
+ return t4.type !== "interactiveAnim" ? [3, 3] : (this.player ? this.player.applyInteractiveAction(t4.action) : this.__slideState.interactiveSeqState[t4.seqId].step += 1, [3, 6]);
35513
35528
  case 3:
35514
35529
  return t4.type !== "renderSlide" ? [3, 5] : [4, this.doRenderSlide(t4.index, t4.isForward)];
35515
35530
  case 4:
@@ -35573,8 +35588,9 @@ void main(void){
35573
35588
  e4.isAnimating !== true && (e4.isAnimating = true, e4.emit(hR.animateStart));
35574
35589
  }), this.player.on(tC.animateEnd, function() {
35575
35590
  e4.isAnimating !== false && (e4.isAnimating = false, e4.emit(hR.animateEnd));
35576
- }), this.player.on(tC.interactiveSeqNext, function(t5) {
35577
- e4.emitSyncDispatch({ slideIndex: e4.__slideState.currentSlideIndex, type: "interactiveAnim", seqId: t5 }), e4.emitStateChange();
35591
+ }), this.player.on(tC.interactiveSeqAction, function(t5) {
35592
+ var n2 = t5.action, i2 = t5.seqId;
35593
+ e4.emitSyncDispatch({ slideIndex: e4.__slideState.currentSlideIndex, type: "interactiveAnim", action: n2, seqId: i2 }), e4.emitStateChange();
35578
35594
  }), this.player.on(tC.mainSeqStepStart, function(t5) {
35579
35595
  e4.emit(hR.mainSeqStepStart, t5);
35580
35596
  }), this.player.on(tC.mainSeqStepEnd, function(t5) {
@@ -35711,7 +35727,7 @@ void main(void){
35711
35727
  n2.renderingTaskManager.eventHub.once("task-end-" + i2, t5);
35712
35728
  });
35713
35729
  }, e3.prototype.nextStep = function() {
35714
- console.log("nextStep: ", Date.now()), !this.isLoading && this.player && (this.player.mainSeqHasNextStep() ? this.mode === "interactive" ? this.emitSyncDispatch({ slideIndex: this.__slideState.currentSlideIndex, type: "nextStep", next: this.player.mainSeqStep() + 1 }) : this.mode === "sync" ? (this.doNextStep(), this.emitSyncDispatch({ slideIndex: this.__slideState.currentSlideIndex, type: "nextStep", next: this.player.mainSeqStep() })) : this.doNextStep() : this.handleNextSlide());
35730
+ !this.isLoading && this.player && (this.player.mainSeqHasNextStep() ? this.mode === "interactive" ? this.emitSyncDispatch({ slideIndex: this.__slideState.currentSlideIndex, type: "nextStep", next: this.player.mainSeqStep() + 1 }) : this.mode === "sync" ? (this.doNextStep(), this.emitSyncDispatch({ slideIndex: this.__slideState.currentSlideIndex, type: "nextStep", next: this.player.mainSeqStep() })) : this.doNextStep() : this.handleNextSlide());
35715
35731
  }, e3.prototype.doNextStep = function() {
35716
35732
  if (this.player) {
35717
35733
  this.player.nextStep();
@@ -37814,7 +37830,7 @@ class SlidePreviewer {
37814
37830
  return `${this.namespace}-${className}`;
37815
37831
  }
37816
37832
  }
37817
- const version = "0.0.37";
37833
+ const version = "0.0.39";
37818
37834
  const SlideApp = {
37819
37835
  kind: "Slide",
37820
37836
  setup(context) {