@netless/app-slide 0.0.25 → 0.0.26
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.cjs.js +275 -139
- package/dist/main.cjs.js.map +1 -1
- package/dist/main.es.js +722 -619
- package/dist/main.es.js.map +1 -1
- package/dist/main.iife.js +271 -135
- package/dist/main.iife.js.map +1 -1
- package/package.json +2 -2
- package/src/SlideController/index.ts +5 -1
package/dist/main.es.js
CHANGED
|
@@ -21987,9 +21987,9 @@ var Slide = function(t2) {
|
|
|
21987
21987
|
} }, t2.exports = n;
|
|
21988
21988
|
}, function(t2, e2, n) {
|
|
21989
21989
|
n.r(e2), n.d(e2, "SLIDE_EVENTS", function() {
|
|
21990
|
-
return
|
|
21990
|
+
return qd;
|
|
21991
21991
|
}), n.d(e2, "Slide", function() {
|
|
21992
|
-
return
|
|
21992
|
+
return Zd;
|
|
21993
21993
|
});
|
|
21994
21994
|
var i = {};
|
|
21995
21995
|
n.r(i), n.d(i, "isMobile", function() {
|
|
@@ -29814,26 +29814,26 @@ void main() {
|
|
|
29814
29814
|
return this.object.hitArea ? this.object.hitArea : new ve(0, 0, this.object.width, this.object.height);
|
|
29815
29815
|
}
|
|
29816
29816
|
handleAction(t3, e3 = false) {
|
|
29817
|
-
this.proxy && !e3 || (this.ctx.eventHub.emit(
|
|
29817
|
+
this.proxy && !e3 || (this.ctx.eventHub.emit(Uh.hyperlinkTrigger, t3), this.execAction(t3));
|
|
29818
29818
|
}
|
|
29819
29819
|
execAction(t3) {
|
|
29820
29820
|
var e3;
|
|
29821
29821
|
if (t3.action === "ppaction://hlinksldjump") {
|
|
29822
29822
|
const n2 = ((e3 = t3 == null ? void 0 : t3.target) !== null && e3 !== void 0 ? e3 : "").match(/slide(\d+)\.xml/);
|
|
29823
|
-
n2 && n2[1] && this.ctx.eventHub.emit(
|
|
29823
|
+
n2 && n2[1] && this.ctx.eventHub.emit(Uh.requestGotoSlide, Number(n2[1]));
|
|
29824
29824
|
} else if (t3.action === "ppaction://hlinkshowjump?jump=nextslide")
|
|
29825
|
-
this.ctx.eventHub.emit(
|
|
29825
|
+
this.ctx.eventHub.emit(Uh.requestNextSlide);
|
|
29826
29826
|
else if (t3.action === "ppaction://hlinkshowjump?jump=previousslide")
|
|
29827
|
-
this.ctx.eventHub.emit(
|
|
29827
|
+
this.ctx.eventHub.emit(Uh.requestPrevSlide);
|
|
29828
29828
|
else if (t3.action === "ppaction://hlinkshowjump?jump=firstslide")
|
|
29829
|
-
this.ctx.eventHub.emit(
|
|
29829
|
+
this.ctx.eventHub.emit(Uh.requestGotoSlide, 1);
|
|
29830
29830
|
else if (t3.action === "ppaction://hlinkshowjump?jump=lastslide")
|
|
29831
|
-
this.ctx.eventHub.emit(
|
|
29831
|
+
this.ctx.eventHub.emit(Uh.requestGotoSlide, -1);
|
|
29832
29832
|
else if (t3.action === "ppaction://hlinkshowjump?jump=lastslideviewed") {
|
|
29833
29833
|
const t4 = this.ctx.lastViewedIndex;
|
|
29834
|
-
this.ctx.eventHub.emit(
|
|
29834
|
+
this.ctx.eventHub.emit(Uh.requestGotoSlide, t4);
|
|
29835
29835
|
} else
|
|
29836
|
-
t3.action === "ppaction://hlinkshowjump?jump=endshow" && this.ctx.eventHub.emit(
|
|
29836
|
+
t3.action === "ppaction://hlinkshowjump?jump=endshow" && this.ctx.eventHub.emit(Uh.requestGotoSlide, -1);
|
|
29837
29837
|
}
|
|
29838
29838
|
}
|
|
29839
29839
|
function hu(t3, e3, n2 = 5) {
|
|
@@ -30278,8 +30278,8 @@ void main() {
|
|
|
30278
30278
|
t3.position = { x: o3 && (n2 = (e3 = t3.position) === null || e3 === void 0 ? void 0 : e3.x) !== null && n2 !== void 0 ? n2 : 0, y: o3 ? 0 : (r3 = (i2 = t3.position) === null || i2 === void 0 ? void 0 : i2.y) !== null && r3 !== void 0 ? r3 : 0 }, t3.width = o3 ? this.json.width : this.json.lineWidth, t3.height = o3 ? this.json.lineHeight : this.json.height, super.updateTransform(t3);
|
|
30279
30279
|
}
|
|
30280
30280
|
preRender() {
|
|
30281
|
-
const { fill: t3, stroke: e3, lineWidth: n2, lineHeight: i2 } = this.json;
|
|
30282
|
-
t3 && (this.fillTextureId = this.ctx.fillTexture.addFill({ fillType: "blipFill", src: t3.key, filters: [] }, t3.width, t3.height), t3.fill && t3.fill.fillType !== "noFill" && (this.fillBgId = this.ctx.fillTexture.addFill(t3.fill, n2, i2))), e3 && (this.strokeTextureId = this.ctx.fillTexture.addFill({ fillType: "blipFill", src: e3.key, filters: [] }, e3.width, e3.height), e3.fill && e3.fill.fillType !== "noFill" && (this.strokeBgId = this.ctx.fillTexture.addFill(e3.fill, n2, i2))), this.underline && this.underline.preRender();
|
|
30281
|
+
const { fill: t3, stroke: e3, lineWidth: n2, lineHeight: i2, content: r3 } = this.json;
|
|
30282
|
+
t3 && (this.fillTextureId = this.ctx.fillTexture.addFill({ fillType: "blipFill", src: t3.key, filters: [{ type: "changeBulletColor", args: ["#000000", "#FFA500"] }] }, t3.width, t3.height, void 0, r3 === "\u25FE"), t3.fill && t3.fill.fillType !== "noFill" && (this.fillBgId = this.ctx.fillTexture.addFill(t3.fill, n2, i2))), e3 && (this.strokeTextureId = this.ctx.fillTexture.addFill({ fillType: "blipFill", src: e3.key, filters: [] }, e3.width, e3.height), e3.fill && e3.fill.fillType !== "noFill" && (this.strokeBgId = this.ctx.fillTexture.addFill(e3.fill, n2, i2))), this.underline && this.underline.preRender();
|
|
30283
30283
|
}
|
|
30284
30284
|
render() {
|
|
30285
30285
|
var t3;
|
|
@@ -30747,10 +30747,10 @@ void main() {
|
|
|
30747
30747
|
class el {
|
|
30748
30748
|
constructor(t3) {
|
|
30749
30749
|
var e3, n2;
|
|
30750
|
-
this.progress = document.createElement("div"), this.totalTime = document.createElement("span"), this.playButton = document.createElement("div"), this.pauseButton = document.createElement("div"), this.currentTime = document.createElement("span"), this.mediaController = document.createElement("div"), this.currentProgress = document.createElement("div"), this.playCallBackList = [], this.duration = 0, this.start = 0, this.end = 0, this.changeMediaProgress = (t4) => {
|
|
30750
|
+
this.progress = document.createElement("div"), this.totalTime = document.createElement("span"), this.playButton = document.createElement("div"), this.pauseButton = document.createElement("div"), this.currentTime = document.createElement("span"), this.mediaController = document.createElement("div"), this.currentProgress = document.createElement("div"), this.medianIsEnd = false, this.playCallBackList = [], this.duration = 0, this.start = 0, this.end = 0, this.changeMediaProgress = (t4) => {
|
|
30751
30751
|
t4.stopPropagation();
|
|
30752
30752
|
const e4 = t4.offsetX / this.progress.clientWidth * this.duration;
|
|
30753
|
-
this.jumpToTime(e4), this.ctx.eventHub.emit(
|
|
30753
|
+
this.jumpToTime(e4), this.medianIsEnd = false, this.ctx.eventHub.emit(Uh.mediaSeek, { id: this.targetId, time: this.media.currentTime - this.start, isPlaying: this.media.isPlaying });
|
|
30754
30754
|
}, this.jumpToTime = (t4 = 0) => {
|
|
30755
30755
|
const e4 = Math.floor(t4) + this.start;
|
|
30756
30756
|
this.media.currentTime !== e4 && (this.media.currentTime = e4, (this.media.paused || this.media.ended) && this.ctx.clock.setTimeout(() => {
|
|
@@ -30761,7 +30761,7 @@ void main() {
|
|
|
30761
30761
|
}, this.getMediaDuration = () => {
|
|
30762
30762
|
this.duration && !Number.isNaN(this.duration) || (this.duration = this.media.duration, this.start && (this.duration -= this.start, this.jumpToTime()), this.end && (this.duration -= this.end)), this.totalTime.innerText = el.formatTime(this.duration);
|
|
30763
30763
|
}, this.playMedia = () => Qu(this, void 0, void 0, function* () {
|
|
30764
|
-
this.playButton.style.display = "none", this.pauseButton.style.display = "block", yield this.media.play(), this.playCallBackList.forEach((t4) => {
|
|
30764
|
+
this.playButton.style.display = "none", this.pauseButton.style.display = "block", yield this.media.play(), this.medianIsEnd && (this.medianIsEnd = false, this.jumpToTime()), this.playCallBackList.forEach((t4) => {
|
|
30765
30765
|
t4();
|
|
30766
30766
|
});
|
|
30767
30767
|
}), this.pauseMedia = () => Qu(this, void 0, void 0, function* () {
|
|
@@ -30770,7 +30770,7 @@ void main() {
|
|
|
30770
30770
|
t4.stopPropagation(), this.mediaController.style.display = "none";
|
|
30771
30771
|
}, this.mediaTimeUpdate = () => Qu(this, void 0, void 0, function* () {
|
|
30772
30772
|
const t4 = this.media.currentTime - this.start;
|
|
30773
|
-
this.duration > 0 && (t4 > this.duration || this.media.ended) && (yield this.pauseMedia(), this.
|
|
30773
|
+
this.duration > 0 && (t4 > this.duration || this.media.ended) && (yield this.pauseMedia(), this.medianIsEnd = true), this.currentTime.innerText = el.formatTime(t4), this.currentProgress.style.flex = (t4 / this.duration).toString();
|
|
30774
30774
|
}), this.onPauseMedia = () => {
|
|
30775
30775
|
this.playButton.style.display = "block", this.pauseButton.style.display = "none";
|
|
30776
30776
|
}, this.onPlayMedia = () => {
|
|
@@ -30778,9 +30778,9 @@ void main() {
|
|
|
30778
30778
|
t4();
|
|
30779
30779
|
});
|
|
30780
30780
|
}, this.playMediaFromCtrl = () => {
|
|
30781
|
-
this.ctx.eventHub.emit(
|
|
30781
|
+
this.ctx.eventHub.emit(Uh.mediaPlay, { id: this.targetId, time: this.media.currentTime }), this.playMedia();
|
|
30782
30782
|
}, this.pauseMediaFromCtrl = () => {
|
|
30783
|
-
this.ctx.eventHub.emit(
|
|
30783
|
+
this.ctx.eventHub.emit(Uh.mediaPause, { id: this.targetId, time: this.media.currentTime }), this.pauseMedia();
|
|
30784
30784
|
}, this.targetId = t3.targetId, this.ctx = t3.ctx, this.height = t3.height, this.width = t3.width, this.sprite = t3.sprite, this.media = t3.media, this.info = t3.info, this.canvasElement = t3.canvasElement, this.getMedianContainer(), this.createMediaController(), this.info.cut && (this.start = (e3 = this.info.cut.start) !== null && e3 !== void 0 ? e3 : 0, this.end = (n2 = this.info.cut.end) !== null && n2 !== void 0 ? n2 : 0);
|
|
30785
30785
|
}
|
|
30786
30786
|
getMedianContainer() {
|
|
@@ -31236,12 +31236,12 @@ void main() {
|
|
|
31236
31236
|
this.currentSeqIndex = 0, this.currentSeqState = "idle";
|
|
31237
31237
|
}), this.commonTimeNode.on("childTimeNodeStart", (t4) => {
|
|
31238
31238
|
const e4 = this.commonTimeNode.children.findIndex((e5) => e5.commonTimeNode.uuid === t4.id);
|
|
31239
|
-
e4 >= 0 && (this.currentSeqIndex = e4), this.currentSeqState = "running", this.isMainSeq && this.ctx.eventHub.emit(
|
|
31239
|
+
e4 >= 0 && (this.currentSeqIndex = e4), this.currentSeqState = "running", this.isMainSeq && this.ctx.eventHub.emit(Uh.mainSeqStepStart, e4);
|
|
31240
31240
|
}), this.commonTimeNode.on("childTimeNodeEnd", (t4) => {
|
|
31241
31241
|
const e4 = this.commonTimeNode.children.findIndex((e5) => e5.commonTimeNode.uuid === t4.id);
|
|
31242
31242
|
e4 >= 0 && (this.currentSeqIndex = e4), this.currentSeqState = "end", this.autoPlay && this.ctx.clock.setTimeout(() => {
|
|
31243
31243
|
this.handleNext();
|
|
31244
|
-
}), this.isMainSeq && this.ctx.eventHub.emit(
|
|
31244
|
+
}), this.isMainSeq && this.ctx.eventHub.emit(Uh.mainSeqStepEnd, e4);
|
|
31245
31245
|
}), this.commonTimeNode.on("timeNodeEndSync", () => {
|
|
31246
31246
|
this.commonTimeNode.resetForRepeat(), this.ctx.clock.setTimeout(() => {
|
|
31247
31247
|
this.currentSeqState = "idle", this.currentSeqIndex = 0;
|
|
@@ -31249,7 +31249,7 @@ void main() {
|
|
|
31249
31249
|
}), this.nextConds.on("active", () => {
|
|
31250
31250
|
if (this.isInteractiveSeq) {
|
|
31251
31251
|
const { mode: t4 } = this.ctx;
|
|
31252
|
-
t4 !== "interactive" && t4 !== "sync" || this.ctx.eventHub.emit(
|
|
31252
|
+
t4 !== "interactive" && t4 !== "sync" || this.ctx.eventHub.emit(Uh.interactiveSeqNext, this.json.ctn.id), t4 !== "sync" && t4 !== "local" || this.handleNext();
|
|
31253
31253
|
} else
|
|
31254
31254
|
this.handleNext();
|
|
31255
31255
|
}), this.prevConds.on("active", this.handlePrev);
|
|
@@ -31258,13 +31258,13 @@ void main() {
|
|
|
31258
31258
|
return this._currentSeqIndex;
|
|
31259
31259
|
}
|
|
31260
31260
|
set currentSeqIndex(t3) {
|
|
31261
|
-
this._currentSeqIndex = t3, this.isMainSeq ? this.ctx.eventHub.emit(
|
|
31261
|
+
this._currentSeqIndex = t3, this.isMainSeq ? this.ctx.eventHub.emit(Uh.mainSeqStepChange, t3) : this.isInteractiveSeq && this.ctx.eventHub.emit(Uh.interactiveSeqStateChange, { id: this.json.ctn.id, state: { step: t3, state: this._currentSeqState } });
|
|
31262
31262
|
}
|
|
31263
31263
|
get currentSeqState() {
|
|
31264
31264
|
return this._currentSeqState;
|
|
31265
31265
|
}
|
|
31266
31266
|
set currentSeqState(t3) {
|
|
31267
|
-
this._currentSeqState = t3, this.isMainSeq ? this.ctx.eventHub.emit(
|
|
31267
|
+
this._currentSeqState = t3, this.isMainSeq ? this.ctx.eventHub.emit(Uh.mainSeqStateChange, t3) : this.isInteractiveSeq && this.ctx.eventHub.emit(Uh.interactiveSeqStateChange, { id: this.json.ctn.id, state: { step: this._currentSeqIndex, state: t3 } });
|
|
31268
31268
|
}
|
|
31269
31269
|
get stepLength() {
|
|
31270
31270
|
return this.commonTimeNode.children.length;
|
|
@@ -31614,14 +31614,16 @@ void main() {
|
|
|
31614
31614
|
super(t3), this.isConflict = true, this.activeWhenConflict = "next", this.startVal = null, this.onTimelineStart = (t4) => {
|
|
31615
31615
|
t4.isReverse || this.updateCurrentValue();
|
|
31616
31616
|
}, this.onTimeUpdate = ({ duration: t4, delta: e3 }) => {
|
|
31617
|
-
|
|
31618
|
-
|
|
31619
|
-
|
|
31620
|
-
|
|
31617
|
+
var n2, i2, r3, o3, s3;
|
|
31618
|
+
const a2 = e3 / t4, u2 = { x: 1, y: 1 };
|
|
31619
|
+
if (this.to) {
|
|
31620
|
+
const t5 = (n2 = this.from) !== null && n2 !== void 0 ? n2 : { x: (r3 = (i2 = this.startVal) === null || i2 === void 0 ? void 0 : i2.x) !== null && r3 !== void 0 ? r3 : 1, y: (s3 = (o3 = this.startVal) === null || o3 === void 0 ? void 0 : o3.y) !== null && s3 !== void 0 ? s3 : 1 };
|
|
31621
|
+
u2.x = t5.x + (this.to.x - t5.x) * a2, u2.y = t5.y + (this.to.y - t5.y) * a2;
|
|
31622
|
+
} else if (this.by) {
|
|
31621
31623
|
const t5 = { x: this.by.x, y: this.by.y };
|
|
31622
|
-
|
|
31624
|
+
u2.x = 1 + (t5.x - 1) * a2, u2.y = 1 + (t5.y - 1) * a2;
|
|
31623
31625
|
}
|
|
31624
|
-
this.timingTarget && (this.timingTarget.scale =
|
|
31626
|
+
this.timingTarget && (this.timingTarget.scale = u2);
|
|
31625
31627
|
}, this.onTimeNodeStart = () => {
|
|
31626
31628
|
this.timingTarget && (this.startVal = { x: this.timingTarget.scale.x, y: this.timingTarget.scale.y });
|
|
31627
31629
|
}, this.onSeekToStart = () => {
|
|
@@ -31899,7 +31901,7 @@ void main() {
|
|
|
31899
31901
|
startReverseTimeLine() {
|
|
31900
31902
|
this.timeDelta = 0;
|
|
31901
31903
|
const t3 = 1e3 / this.ctx.ticker.maxFPS;
|
|
31902
|
-
this.duration <= t3 && this.duration > 0 ? (this.emit("timeUpdate", { delta: this.duration, duration: this.duration, isReverse: this.isReverse }), this.ctx.eventHub.emit(
|
|
31904
|
+
this.duration <= t3 && this.duration > 0 ? (this.emit("timeUpdate", { delta: this.duration, duration: this.duration, isReverse: this.isReverse }), this.ctx.eventHub.emit(Uh.animateEnd), this.ctx.ticker.remove(this.updateTimeLine)) : this.duration > t3 && (this.ctx.eventHub.emit(Uh.animateStart), this.ctx.ticker.add(this.updateTimeLine));
|
|
31903
31905
|
}
|
|
31904
31906
|
startTimeLine(t3 = true) {
|
|
31905
31907
|
if (t3 && (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)
|
|
@@ -31908,7 +31910,7 @@ void main() {
|
|
|
31908
31910
|
const e3 = 1e3 / this.ctx.ticker.maxFPS;
|
|
31909
31911
|
this.duration <= e3 && 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(() => {
|
|
31910
31912
|
this.onTimeLineEnd();
|
|
31911
|
-
})) : this.duration > e3 && (this.ctx.eventHub.emit(
|
|
31913
|
+
})) : this.duration > e3 && (this.ctx.eventHub.emit(Uh.animateStart), this.updateTimeLine(0), this.ctx.ticker.add(this.updateTimeLine));
|
|
31912
31914
|
}
|
|
31913
31915
|
startIterate() {
|
|
31914
31916
|
return Gl(this, void 0, void 0, function* () {
|
|
@@ -31916,7 +31918,7 @@ void main() {
|
|
|
31916
31918
|
this.isIterateEnd = false;
|
|
31917
31919
|
for (const t3 of this.iterateShadows) {
|
|
31918
31920
|
if (this.isIterateEnd)
|
|
31919
|
-
|
|
31921
|
+
break;
|
|
31920
31922
|
t3.children.forEach((t4) => {
|
|
31921
31923
|
t4.commonTimeNode.startTimeNode();
|
|
31922
31924
|
}), t3.applyCount += 1, yield this.ctx.clock.delay(this.json.iterate.interval);
|
|
@@ -31998,7 +32000,7 @@ void main() {
|
|
|
31998
32000
|
}
|
|
31999
32001
|
}
|
|
32000
32002
|
dispose(t3 = false) {
|
|
32001
|
-
this.isConflictDispose = t3, this.ctx.clock.clearTimeout(this.repeatTimeoutId), this.ctx.eventHub.emit(
|
|
32003
|
+
this.isConflictDispose = t3, this.ctx.clock.clearTimeout(this.repeatTimeoutId), this.ctx.eventHub.emit(Uh.animateEnd), this.ctx.ticker.remove(this.updateTimeLine), this.startConds.reset(), this.endConds.reset();
|
|
32002
32004
|
}
|
|
32003
32005
|
seekToEnd(t3, e3 = false) {
|
|
32004
32006
|
if (this.isInfiniteRepeat())
|
|
@@ -32040,7 +32042,32 @@ void main() {
|
|
|
32040
32042
|
});
|
|
32041
32043
|
}
|
|
32042
32044
|
}
|
|
32043
|
-
|
|
32045
|
+
var jl = function(t3, e3, n2, i2) {
|
|
32046
|
+
return new (n2 || (n2 = Promise))(function(r3, o3) {
|
|
32047
|
+
function s3(t4) {
|
|
32048
|
+
try {
|
|
32049
|
+
u2(i2.next(t4));
|
|
32050
|
+
} catch (t5) {
|
|
32051
|
+
o3(t5);
|
|
32052
|
+
}
|
|
32053
|
+
}
|
|
32054
|
+
function a2(t4) {
|
|
32055
|
+
try {
|
|
32056
|
+
u2(i2.throw(t4));
|
|
32057
|
+
} catch (t5) {
|
|
32058
|
+
o3(t5);
|
|
32059
|
+
}
|
|
32060
|
+
}
|
|
32061
|
+
function u2(t4) {
|
|
32062
|
+
var e4;
|
|
32063
|
+
t4.done ? r3(t4.value) : (e4 = t4.value, e4 instanceof n2 ? e4 : new n2(function(t5) {
|
|
32064
|
+
t5(e4);
|
|
32065
|
+
})).then(s3, a2);
|
|
32066
|
+
}
|
|
32067
|
+
u2((i2 = i2.apply(t3, e3 || [])).next());
|
|
32068
|
+
});
|
|
32069
|
+
};
|
|
32070
|
+
class Vl {
|
|
32044
32071
|
constructor(t3, e3, n2) {
|
|
32045
32072
|
this.json = t3, this.ctx = n2;
|
|
32046
32073
|
const i2 = t3.timeNodeList.find((t4) => t4.type === "par" && t4.ctn.nodeType === "tmRoot");
|
|
@@ -32057,11 +32084,10 @@ void main() {
|
|
|
32057
32084
|
});
|
|
32058
32085
|
}
|
|
32059
32086
|
start() {
|
|
32060
|
-
var t3;
|
|
32061
|
-
this
|
|
32062
|
-
|
|
32063
|
-
|
|
32064
|
-
}, 16) : (t3 = this.mainSeq) === null || t3 === void 0 || t3.commonTimeNode.startTimeNode();
|
|
32087
|
+
var t3, e3;
|
|
32088
|
+
return jl(this, void 0, void 0, function* () {
|
|
32089
|
+
this.json.autoPlayMainSeq ? (yield this.ctx.clock.delay(16), (t3 = this.mainSeq) === null || t3 === void 0 || t3.commonTimeNode.startTimeNode()) : (e3 = this.mainSeq) === null || e3 === void 0 || e3.commonTimeNode.startTimeNode();
|
|
32090
|
+
});
|
|
32065
32091
|
}
|
|
32066
32092
|
setMainSeqApplied() {
|
|
32067
32093
|
this.mainSeq && (this.mainSeq.commonTimeNode.applyCount = 1);
|
|
@@ -32109,7 +32135,7 @@ void main() {
|
|
|
32109
32135
|
e3 && e3.handleNext();
|
|
32110
32136
|
}
|
|
32111
32137
|
}
|
|
32112
|
-
var
|
|
32138
|
+
var Wl = function(t3, e3, n2, i2) {
|
|
32113
32139
|
return new (n2 || (n2 = Promise))(function(r3, o3) {
|
|
32114
32140
|
function s3(t4) {
|
|
32115
32141
|
try {
|
|
@@ -32134,12 +32160,12 @@ void main() {
|
|
|
32134
32160
|
u2((i2 = i2.apply(t3, e3 || [])).next());
|
|
32135
32161
|
});
|
|
32136
32162
|
};
|
|
32137
|
-
class
|
|
32163
|
+
class Xl extends ll {
|
|
32138
32164
|
constructor(t3, e3, n2) {
|
|
32139
32165
|
super({ id: "stage", width: t3.width, height: t3.height, type: "Container", children: t3.children }, e3, n2), this.globalEventHub = new s2.a(), this.json = t3, this.container.visible = false, this.ctx = e3, this.globalEventHub.on("c:prev slide", () => {
|
|
32140
|
-
this.ctx.eventHub.emit(
|
|
32166
|
+
this.ctx.eventHub.emit(Uh.requestPrevSlide);
|
|
32141
32167
|
}), this.globalEventHub.on("c:next slide", () => {
|
|
32142
|
-
this.ctx.eventHub.emit(
|
|
32168
|
+
this.ctx.eventHub.emit(Uh.requestNextSlide);
|
|
32143
32169
|
});
|
|
32144
32170
|
const i2 = new hs();
|
|
32145
32171
|
i2.drawRect(0, 0, t3.width, t3.height), this.container.addChild(i2);
|
|
@@ -32149,16 +32175,16 @@ void main() {
|
|
|
32149
32175
|
}
|
|
32150
32176
|
render() {
|
|
32151
32177
|
const t3 = Object.create(null, { render: { get: () => super.render } });
|
|
32152
|
-
return
|
|
32178
|
+
return Wl(this, void 0, void 0, function* () {
|
|
32153
32179
|
yield t3.render.call(this), this.ctx.eventHub.emit("StageRenderEnd");
|
|
32154
32180
|
});
|
|
32155
32181
|
}
|
|
32156
32182
|
createTiming() {
|
|
32157
|
-
this.json.timing && (this.timing = new
|
|
32183
|
+
this.json.timing && (this.timing = new Vl(this.json.timing, this.globalEventHub, this.ctx));
|
|
32158
32184
|
}
|
|
32159
32185
|
startTiming() {
|
|
32160
32186
|
var t3;
|
|
32161
|
-
(t3 = this.timing) === null || t3 === void 0
|
|
32187
|
+
return ((t3 = this.timing) === null || t3 === void 0 ? void 0 : t3.start()) || Promise.resolve();
|
|
32162
32188
|
}
|
|
32163
32189
|
setMainSeqApplied() {
|
|
32164
32190
|
var t3;
|
|
@@ -32200,11 +32226,11 @@ void main() {
|
|
|
32200
32226
|
}
|
|
32201
32227
|
nextStep() {
|
|
32202
32228
|
var t3;
|
|
32203
|
-
this.hasTiming() && ((t3 = this.timing) === null || t3 === void 0 ? void 0 : t3.hasMainSeq()) ? this.globalEventHub.emit("shape slide onNext") : this.ctx.eventHub.emit(
|
|
32229
|
+
this.hasTiming() && ((t3 = this.timing) === null || t3 === void 0 ? void 0 : t3.hasMainSeq()) ? this.globalEventHub.emit("shape slide onNext") : this.ctx.eventHub.emit(Uh.requestNextSlide);
|
|
32204
32230
|
}
|
|
32205
32231
|
prevStep() {
|
|
32206
32232
|
var t3;
|
|
32207
|
-
this.hasTiming() && ((t3 = this.timing) === null || t3 === void 0 ? void 0 : t3.hasMainSeq()) ? this.globalEventHub.emit("shape slide onPrev") : this.ctx.eventHub.emit(
|
|
32233
|
+
this.hasTiming() && ((t3 = this.timing) === null || t3 === void 0 ? void 0 : t3.hasMainSeq()) ? this.globalEventHub.emit("shape slide onPrev") : this.ctx.eventHub.emit(Uh.requestPrevSlide);
|
|
32208
32234
|
}
|
|
32209
32235
|
applyInteractiveAction(t3) {
|
|
32210
32236
|
var e3;
|
|
@@ -32219,7 +32245,7 @@ void main() {
|
|
|
32219
32245
|
(i2 = this.timing) === null || i2 === void 0 || i2.setInteractiveSeqState(t3, e3, n2);
|
|
32220
32246
|
}
|
|
32221
32247
|
setMediaState(t3, e3) {
|
|
32222
|
-
return
|
|
32248
|
+
return Wl(this, void 0, void 0, function* () {
|
|
32223
32249
|
const n2 = this.ctx.medias[t3];
|
|
32224
32250
|
n2 && (e3 ? yield n2.play() : yield n2.pause());
|
|
32225
32251
|
});
|
|
@@ -32229,8 +32255,8 @@ void main() {
|
|
|
32229
32255
|
n2 && n2.seek(e3);
|
|
32230
32256
|
}
|
|
32231
32257
|
}
|
|
32232
|
-
const
|
|
32233
|
-
function
|
|
32258
|
+
const ql = 134217729;
|
|
32259
|
+
function Yl(t3, e3, n2, i2, r3) {
|
|
32234
32260
|
let o3, s3, a2, u2, l2 = e3[0], h2 = i2[0], c2 = 0, d2 = 0;
|
|
32235
32261
|
h2 > l2 == h2 > -l2 ? (o3 = l2, l2 = e3[++c2]) : (o3 = h2, h2 = i2[++d2]);
|
|
32236
32262
|
let p2 = 0;
|
|
@@ -32243,17 +32269,17 @@ void main() {
|
|
|
32243
32269
|
s3 = o3 + h2, u2 = s3 - o3, a2 = o3 - (s3 - u2) + (h2 - u2), h2 = i2[++d2], o3 = s3, a2 !== 0 && (r3[p2++] = a2);
|
|
32244
32270
|
return o3 === 0 && p2 !== 0 || (r3[p2++] = o3), p2;
|
|
32245
32271
|
}
|
|
32246
|
-
function
|
|
32272
|
+
function Zl(t3, e3) {
|
|
32247
32273
|
let n2 = e3[0];
|
|
32248
32274
|
for (let i2 = 1; i2 < t3; i2++)
|
|
32249
32275
|
n2 += e3[i2];
|
|
32250
32276
|
return n2;
|
|
32251
32277
|
}
|
|
32252
|
-
function
|
|
32278
|
+
function Jl(t3) {
|
|
32253
32279
|
return new Float64Array(t3);
|
|
32254
32280
|
}
|
|
32255
|
-
const
|
|
32256
|
-
function
|
|
32281
|
+
const Kl = Jl(4), $l = Jl(8), Ql = Jl(12), th = Jl(16), eh = Jl(4);
|
|
32282
|
+
function nh(t3, e3, n2, i2, r3, o3) {
|
|
32257
32283
|
const s3 = (e3 - o3) * (n2 - r3), a2 = (t3 - r3) * (i2 - o3), u2 = s3 - a2;
|
|
32258
32284
|
if (s3 === 0 || a2 === 0 || s3 > 0 != a2 > 0)
|
|
32259
32285
|
return u2;
|
|
@@ -32261,32 +32287,32 @@ void main() {
|
|
|
32261
32287
|
return Math.abs(u2) >= 33306690738754716e-32 * l2 ? u2 : -function(t4, e4, n3, i3, r4, o4, s4) {
|
|
32262
32288
|
let a3, u3, l3, h2, c2, d2, p2, f2, m2, g2, v2, _2, y2, x2, b2, w2, S2, T2;
|
|
32263
32289
|
const E2 = t4 - r4, M2 = n3 - r4, A2 = e4 - o4, P2 = i3 - o4;
|
|
32264
|
-
x2 = E2 * P2, d2 =
|
|
32265
|
-
let C2 =
|
|
32290
|
+
x2 = E2 * P2, d2 = ql * E2, p2 = d2 - (d2 - E2), f2 = E2 - p2, d2 = ql * P2, m2 = d2 - (d2 - P2), g2 = P2 - m2, b2 = f2 * g2 - (x2 - p2 * m2 - f2 * m2 - p2 * g2), w2 = A2 * M2, d2 = ql * A2, p2 = d2 - (d2 - A2), f2 = A2 - p2, d2 = ql * M2, m2 = d2 - (d2 - M2), g2 = M2 - m2, S2 = f2 * g2 - (w2 - p2 * m2 - f2 * m2 - p2 * g2), v2 = b2 - S2, c2 = b2 - v2, Kl[0] = b2 - (v2 + c2) + (c2 - S2), _2 = x2 + v2, c2 = _2 - x2, y2 = x2 - (_2 - c2) + (v2 - c2), v2 = y2 - w2, c2 = y2 - v2, Kl[1] = y2 - (v2 + c2) + (c2 - w2), T2 = _2 + v2, c2 = T2 - _2, Kl[2] = _2 - (T2 - c2) + (v2 - c2), Kl[3] = T2;
|
|
32291
|
+
let C2 = Zl(4, Kl), R2 = 22204460492503146e-32 * s4;
|
|
32266
32292
|
if (C2 >= R2 || -C2 >= R2)
|
|
32267
32293
|
return C2;
|
|
32268
32294
|
if (c2 = t4 - E2, a3 = t4 - (E2 + c2) + (c2 - r4), c2 = n3 - M2, l3 = n3 - (M2 + c2) + (c2 - r4), c2 = e4 - A2, u3 = e4 - (A2 + c2) + (c2 - o4), c2 = i3 - P2, h2 = i3 - (P2 + c2) + (c2 - o4), a3 === 0 && u3 === 0 && l3 === 0 && h2 === 0)
|
|
32269
32295
|
return C2;
|
|
32270
32296
|
if (R2 = 11093356479670487e-47 * s4 + 33306690738754706e-32 * Math.abs(C2), C2 += E2 * h2 + P2 * a3 - (A2 * l3 + M2 * u3), C2 >= R2 || -C2 >= R2)
|
|
32271
32297
|
return C2;
|
|
32272
|
-
x2 = a3 * P2, d2 =
|
|
32273
|
-
const I2 =
|
|
32274
|
-
x2 = E2 * h2, d2 =
|
|
32275
|
-
const L2 =
|
|
32276
|
-
x2 = a3 * h2, d2 =
|
|
32277
|
-
const O2 =
|
|
32278
|
-
return
|
|
32298
|
+
x2 = a3 * P2, d2 = ql * a3, p2 = d2 - (d2 - a3), f2 = a3 - p2, d2 = ql * P2, m2 = d2 - (d2 - P2), g2 = P2 - m2, b2 = f2 * g2 - (x2 - p2 * m2 - f2 * m2 - p2 * g2), w2 = u3 * M2, d2 = ql * u3, p2 = d2 - (d2 - u3), f2 = u3 - p2, d2 = ql * M2, m2 = d2 - (d2 - M2), g2 = M2 - m2, S2 = f2 * g2 - (w2 - p2 * m2 - f2 * m2 - p2 * g2), v2 = b2 - S2, c2 = b2 - v2, eh[0] = b2 - (v2 + c2) + (c2 - S2), _2 = x2 + v2, c2 = _2 - x2, y2 = x2 - (_2 - c2) + (v2 - c2), v2 = y2 - w2, c2 = y2 - v2, eh[1] = y2 - (v2 + c2) + (c2 - w2), T2 = _2 + v2, c2 = T2 - _2, eh[2] = _2 - (T2 - c2) + (v2 - c2), eh[3] = T2;
|
|
32299
|
+
const I2 = Yl(4, Kl, 4, eh, $l);
|
|
32300
|
+
x2 = E2 * h2, d2 = ql * E2, p2 = d2 - (d2 - E2), f2 = E2 - p2, d2 = ql * h2, m2 = d2 - (d2 - h2), g2 = h2 - m2, b2 = f2 * g2 - (x2 - p2 * m2 - f2 * m2 - p2 * g2), w2 = A2 * l3, d2 = ql * A2, p2 = d2 - (d2 - A2), f2 = A2 - p2, d2 = ql * l3, m2 = d2 - (d2 - l3), g2 = l3 - m2, S2 = f2 * g2 - (w2 - p2 * m2 - f2 * m2 - p2 * g2), v2 = b2 - S2, c2 = b2 - v2, eh[0] = b2 - (v2 + c2) + (c2 - S2), _2 = x2 + v2, c2 = _2 - x2, y2 = x2 - (_2 - c2) + (v2 - c2), v2 = y2 - w2, c2 = y2 - v2, eh[1] = y2 - (v2 + c2) + (c2 - w2), T2 = _2 + v2, c2 = T2 - _2, eh[2] = _2 - (T2 - c2) + (v2 - c2), eh[3] = T2;
|
|
32301
|
+
const L2 = Yl(I2, $l, 4, eh, Ql);
|
|
32302
|
+
x2 = a3 * h2, d2 = ql * a3, p2 = d2 - (d2 - a3), f2 = a3 - p2, d2 = ql * h2, m2 = d2 - (d2 - h2), g2 = h2 - m2, b2 = f2 * g2 - (x2 - p2 * m2 - f2 * m2 - p2 * g2), w2 = u3 * l3, d2 = ql * u3, p2 = d2 - (d2 - u3), f2 = u3 - p2, d2 = ql * l3, m2 = d2 - (d2 - l3), g2 = l3 - m2, S2 = f2 * g2 - (w2 - p2 * m2 - f2 * m2 - p2 * g2), v2 = b2 - S2, c2 = b2 - v2, eh[0] = b2 - (v2 + c2) + (c2 - S2), _2 = x2 + v2, c2 = _2 - x2, y2 = x2 - (_2 - c2) + (v2 - c2), v2 = y2 - w2, c2 = y2 - v2, eh[1] = y2 - (v2 + c2) + (c2 - w2), T2 = _2 + v2, c2 = T2 - _2, eh[2] = _2 - (T2 - c2) + (v2 - c2), eh[3] = T2;
|
|
32303
|
+
const O2 = Yl(L2, Ql, 4, eh, th);
|
|
32304
|
+
return th[O2 - 1];
|
|
32279
32305
|
}(t3, e3, n2, i2, r3, o3, l2);
|
|
32280
32306
|
}
|
|
32281
|
-
const
|
|
32282
|
-
class
|
|
32283
|
-
static from(t3, e3 =
|
|
32307
|
+
const ih = Math.pow(2, -52), rh = new Uint32Array(512);
|
|
32308
|
+
class oh {
|
|
32309
|
+
static from(t3, e3 = ch, n2 = dh) {
|
|
32284
32310
|
const i2 = t3.length, r3 = new Float64Array(2 * i2);
|
|
32285
32311
|
for (let o3 = 0; o3 < i2; o3++) {
|
|
32286
32312
|
const i3 = t3[o3];
|
|
32287
32313
|
r3[2 * o3] = e3(i3), r3[2 * o3 + 1] = n2(i3);
|
|
32288
32314
|
}
|
|
32289
|
-
return new
|
|
32315
|
+
return new oh(r3);
|
|
32290
32316
|
}
|
|
32291
32317
|
constructor(t3) {
|
|
32292
32318
|
const e3 = t3.length >> 1;
|
|
@@ -32306,7 +32332,7 @@ void main() {
|
|
|
32306
32332
|
const h2 = (s3 + u2) / 2, c2 = (a2 + l2) / 2;
|
|
32307
32333
|
let d2, p2, f2, m2 = 1 / 0;
|
|
32308
32334
|
for (let e4 = 0; e4 < o3; e4++) {
|
|
32309
|
-
const n3 =
|
|
32335
|
+
const n3 = sh(h2, c2, t3[2 * e4], t3[2 * e4 + 1]);
|
|
32310
32336
|
n3 < m2 && (d2 = e4, m2 = n3);
|
|
32311
32337
|
}
|
|
32312
32338
|
const g2 = t3[2 * d2], v2 = t3[2 * d2 + 1];
|
|
@@ -32314,21 +32340,21 @@ void main() {
|
|
|
32314
32340
|
for (let e4 = 0; e4 < o3; e4++) {
|
|
32315
32341
|
if (e4 === d2)
|
|
32316
32342
|
continue;
|
|
32317
|
-
const n3 =
|
|
32343
|
+
const n3 = sh(g2, v2, t3[2 * e4], t3[2 * e4 + 1]);
|
|
32318
32344
|
n3 < m2 && n3 > 0 && (p2 = e4, m2 = n3);
|
|
32319
32345
|
}
|
|
32320
32346
|
let _2 = t3[2 * p2], y2 = t3[2 * p2 + 1], x2 = 1 / 0;
|
|
32321
32347
|
for (let e4 = 0; e4 < o3; e4++) {
|
|
32322
32348
|
if (e4 === d2 || e4 === p2)
|
|
32323
32349
|
continue;
|
|
32324
|
-
const n3 =
|
|
32350
|
+
const n3 = uh(g2, v2, _2, y2, t3[2 * e4], t3[2 * e4 + 1]);
|
|
32325
32351
|
n3 < x2 && (f2 = e4, x2 = n3);
|
|
32326
32352
|
}
|
|
32327
32353
|
let b2 = t3[2 * f2], w2 = t3[2 * f2 + 1];
|
|
32328
32354
|
if (x2 === 1 / 0) {
|
|
32329
32355
|
for (let e5 = 0; e5 < o3; e5++)
|
|
32330
32356
|
this._dists[e5] = t3[2 * e5] - t3[0] || t3[2 * e5 + 1] - t3[1];
|
|
32331
|
-
|
|
32357
|
+
lh(this._ids, this._dists, 0, o3 - 1);
|
|
32332
32358
|
const e4 = new Uint32Array(o3);
|
|
32333
32359
|
let n3 = 0;
|
|
32334
32360
|
for (let t4 = 0, i3 = -1 / 0; t4 < o3; t4++) {
|
|
@@ -32337,7 +32363,7 @@ void main() {
|
|
|
32337
32363
|
}
|
|
32338
32364
|
return this.hull = e4.subarray(0, n3), this.triangles = new Uint32Array(0), void (this.halfedges = new Uint32Array(0));
|
|
32339
32365
|
}
|
|
32340
|
-
if (
|
|
32366
|
+
if (nh(g2, v2, _2, y2, b2, w2) < 0) {
|
|
32341
32367
|
const t4 = p2, e4 = _2, n3 = y2;
|
|
32342
32368
|
p2 = f2, _2 = b2, y2 = w2, f2 = t4, b2 = e4, w2 = n3;
|
|
32343
32369
|
}
|
|
@@ -32347,13 +32373,13 @@ void main() {
|
|
|
32347
32373
|
}(g2, v2, _2, y2, b2, w2);
|
|
32348
32374
|
this._cx = S2.x, this._cy = S2.y;
|
|
32349
32375
|
for (let e4 = 0; e4 < o3; e4++)
|
|
32350
|
-
this._dists[e4] =
|
|
32351
|
-
|
|
32376
|
+
this._dists[e4] = sh(t3[2 * e4], t3[2 * e4 + 1], S2.x, S2.y);
|
|
32377
|
+
lh(this._ids, this._dists, 0, o3 - 1), this._hullStart = d2;
|
|
32352
32378
|
let T2 = 3;
|
|
32353
32379
|
n2[d2] = e3[f2] = p2, n2[p2] = e3[d2] = f2, n2[f2] = e3[p2] = d2, i2[d2] = 0, i2[p2] = 1, i2[f2] = 2, r3.fill(-1), r3[this._hashKey(g2, v2)] = d2, r3[this._hashKey(_2, y2)] = p2, r3[this._hashKey(b2, w2)] = f2, this.trianglesLen = 0, this._addTriangle(d2, p2, f2, -1, -1, -1);
|
|
32354
32380
|
for (let o4, s4, a3 = 0; a3 < this._ids.length; a3++) {
|
|
32355
32381
|
const u3 = this._ids[a3], l3 = t3[2 * u3], h3 = t3[2 * u3 + 1];
|
|
32356
|
-
if (a3 > 0 && Math.abs(l3 - o4) <=
|
|
32382
|
+
if (a3 > 0 && Math.abs(l3 - o4) <= ih && Math.abs(h3 - s4) <= ih)
|
|
32357
32383
|
continue;
|
|
32358
32384
|
if (o4 = l3, s4 = h3, u3 === d2 || u3 === p2 || u3 === f2)
|
|
32359
32385
|
continue;
|
|
@@ -32362,7 +32388,7 @@ void main() {
|
|
|
32362
32388
|
;
|
|
32363
32389
|
c3 = e3[c3];
|
|
32364
32390
|
let m3, g3 = c3;
|
|
32365
|
-
for (; m3 = n2[g3],
|
|
32391
|
+
for (; m3 = n2[g3], nh(l3, h3, t3[2 * g3], t3[2 * g3 + 1], t3[2 * m3], t3[2 * m3 + 1]) >= 0; )
|
|
32366
32392
|
if (g3 = m3, g3 === c3) {
|
|
32367
32393
|
g3 = -1;
|
|
32368
32394
|
break;
|
|
@@ -32372,10 +32398,10 @@ void main() {
|
|
|
32372
32398
|
let v3 = this._addTriangle(g3, u3, n2[g3], -1, -1, i2[g3]);
|
|
32373
32399
|
i2[u3] = this._legalize(v3 + 2), i2[g3] = v3, T2++;
|
|
32374
32400
|
let _3 = n2[g3];
|
|
32375
|
-
for (; m3 = n2[_3],
|
|
32401
|
+
for (; m3 = n2[_3], nh(l3, h3, t3[2 * _3], t3[2 * _3 + 1], t3[2 * m3], t3[2 * m3 + 1]) < 0; )
|
|
32376
32402
|
v3 = this._addTriangle(_3, u3, m3, i2[u3], -1, i2[_3]), i2[u3] = this._legalize(v3 + 2), n2[_3] = _3, T2--, _3 = m3;
|
|
32377
32403
|
if (g3 === c3)
|
|
32378
|
-
for (; m3 = e3[g3],
|
|
32404
|
+
for (; m3 = e3[g3], nh(l3, h3, t3[2 * m3], t3[2 * m3 + 1], t3[2 * g3], t3[2 * g3 + 1]) < 0; )
|
|
32379
32405
|
v3 = this._addTriangle(m3, u3, g3, -1, i2[g3], i2[m3]), this._legalize(v3 + 2), i2[m3] = v3, n2[g3] = g3, T2--, g3 = m3;
|
|
32380
32406
|
this._hullStart = e3[u3] = g3, n2[g3] = e3[_3] = u3, n2[u3] = _3, r3[this._hashKey(l3, h3)] = u3, r3[this._hashKey(t3[2 * g3], t3[2 * g3 + 1])] = g3;
|
|
32381
32407
|
}
|
|
@@ -32398,11 +32424,11 @@ void main() {
|
|
|
32398
32424
|
if (o3 = a2 + (t3 + 2) % 3, s3 === -1) {
|
|
32399
32425
|
if (r3 === 0)
|
|
32400
32426
|
break;
|
|
32401
|
-
t3 =
|
|
32427
|
+
t3 = rh[--r3];
|
|
32402
32428
|
continue;
|
|
32403
32429
|
}
|
|
32404
32430
|
const u2 = s3 - s3 % 3, l2 = a2 + (t3 + 1) % 3, h2 = u2 + (s3 + 2) % 3, c2 = e3[o3], d2 = e3[t3], p2 = e3[l2], f2 = e3[h2];
|
|
32405
|
-
if (
|
|
32431
|
+
if (ah(i2[2 * c2], i2[2 * c2 + 1], i2[2 * d2], i2[2 * d2 + 1], i2[2 * p2], i2[2 * p2 + 1], i2[2 * f2], i2[2 * f2 + 1])) {
|
|
32406
32432
|
e3[t3] = f2, e3[s3] = c2;
|
|
32407
32433
|
const i3 = n2[h2];
|
|
32408
32434
|
if (i3 === -1) {
|
|
@@ -32417,11 +32443,11 @@ void main() {
|
|
|
32417
32443
|
}
|
|
32418
32444
|
this._link(t3, i3), this._link(s3, n2[o3]), this._link(o3, h2);
|
|
32419
32445
|
const a3 = u2 + (s3 + 1) % 3;
|
|
32420
|
-
r3 <
|
|
32446
|
+
r3 < rh.length && (rh[r3++] = a3);
|
|
32421
32447
|
} else {
|
|
32422
32448
|
if (r3 === 0)
|
|
32423
32449
|
break;
|
|
32424
|
-
t3 =
|
|
32450
|
+
t3 = rh[--r3];
|
|
32425
32451
|
}
|
|
32426
32452
|
}
|
|
32427
32453
|
return o3;
|
|
@@ -32434,19 +32460,19 @@ void main() {
|
|
|
32434
32460
|
return this._triangles[s3] = t3, this._triangles[s3 + 1] = e3, this._triangles[s3 + 2] = n2, this._link(s3, i2), this._link(s3 + 1, r3), this._link(s3 + 2, o3), this.trianglesLen += 3, s3;
|
|
32435
32461
|
}
|
|
32436
32462
|
}
|
|
32437
|
-
function
|
|
32463
|
+
function sh(t3, e3, n2, i2) {
|
|
32438
32464
|
const r3 = t3 - n2, o3 = e3 - i2;
|
|
32439
32465
|
return r3 * r3 + o3 * o3;
|
|
32440
32466
|
}
|
|
32441
|
-
function
|
|
32467
|
+
function ah(t3, e3, n2, i2, r3, o3, s3, a2) {
|
|
32442
32468
|
const u2 = t3 - s3, l2 = e3 - a2, h2 = n2 - s3, c2 = i2 - a2, d2 = r3 - s3, p2 = o3 - a2, f2 = h2 * h2 + c2 * c2, m2 = d2 * d2 + p2 * p2;
|
|
32443
32469
|
return u2 * (c2 * m2 - f2 * p2) - l2 * (h2 * m2 - f2 * d2) + (u2 * u2 + l2 * l2) * (h2 * p2 - c2 * d2) < 0;
|
|
32444
32470
|
}
|
|
32445
|
-
function
|
|
32471
|
+
function uh(t3, e3, n2, i2, r3, o3) {
|
|
32446
32472
|
const s3 = n2 - t3, a2 = i2 - e3, u2 = r3 - t3, l2 = o3 - e3, h2 = s3 * s3 + a2 * a2, c2 = u2 * u2 + l2 * l2, d2 = 0.5 / (s3 * l2 - a2 * u2), p2 = (l2 * h2 - a2 * c2) * d2, f2 = (s3 * c2 - u2 * h2) * d2;
|
|
32447
32473
|
return p2 * p2 + f2 * f2;
|
|
32448
32474
|
}
|
|
32449
|
-
function
|
|
32475
|
+
function lh(t3, e3, n2, i2) {
|
|
32450
32476
|
if (i2 - n2 <= 20)
|
|
32451
32477
|
for (let r3 = n2 + 1; r3 <= i2; r3++) {
|
|
32452
32478
|
const i3 = t3[r3], o3 = e3[i3];
|
|
@@ -32457,7 +32483,7 @@ void main() {
|
|
|
32457
32483
|
}
|
|
32458
32484
|
else {
|
|
32459
32485
|
let r3 = n2 + 1, o3 = i2;
|
|
32460
|
-
|
|
32486
|
+
hh(t3, n2 + i2 >> 1, r3), e3[t3[n2]] > e3[t3[i2]] && hh(t3, n2, i2), e3[t3[r3]] > e3[t3[i2]] && hh(t3, r3, i2), e3[t3[n2]] > e3[t3[r3]] && hh(t3, n2, r3);
|
|
32461
32487
|
const s3 = t3[r3], a2 = e3[s3];
|
|
32462
32488
|
for (; ; ) {
|
|
32463
32489
|
do {
|
|
@@ -32468,22 +32494,22 @@ void main() {
|
|
|
32468
32494
|
} while (e3[t3[o3]] > a2);
|
|
32469
32495
|
if (o3 < r3)
|
|
32470
32496
|
break;
|
|
32471
|
-
|
|
32497
|
+
hh(t3, r3, o3);
|
|
32472
32498
|
}
|
|
32473
|
-
t3[n2 + 1] = t3[o3], t3[o3] = s3, i2 - r3 + 1 >= o3 - n2 ? (
|
|
32499
|
+
t3[n2 + 1] = t3[o3], t3[o3] = s3, i2 - r3 + 1 >= o3 - n2 ? (lh(t3, e3, r3, i2), lh(t3, e3, n2, o3 - 1)) : (lh(t3, e3, n2, o3 - 1), lh(t3, e3, r3, i2));
|
|
32474
32500
|
}
|
|
32475
32501
|
}
|
|
32476
|
-
function
|
|
32502
|
+
function hh(t3, e3, n2) {
|
|
32477
32503
|
const i2 = t3[e3];
|
|
32478
32504
|
t3[e3] = t3[n2], t3[n2] = i2;
|
|
32479
32505
|
}
|
|
32480
|
-
function
|
|
32506
|
+
function ch(t3) {
|
|
32481
32507
|
return t3[0];
|
|
32482
32508
|
}
|
|
32483
|
-
function
|
|
32509
|
+
function dh(t3) {
|
|
32484
32510
|
return t3[1];
|
|
32485
32511
|
}
|
|
32486
|
-
function
|
|
32512
|
+
function ph(t3, e3, n2) {
|
|
32487
32513
|
return t3.fillType === "solidFill" ? function(t4, e4, n3) {
|
|
32488
32514
|
const i2 = new hs(), [r3, o3] = gu(t4.color);
|
|
32489
32515
|
return i2.beginFill(r3, o3), i2.drawRect(0, 0, e4, n3), i2.endFill(), i2;
|
|
@@ -32506,7 +32532,7 @@ void main() {
|
|
|
32506
32532
|
}
|
|
32507
32533
|
return e5;
|
|
32508
32534
|
};
|
|
32509
|
-
t4.stopList = o3(t4.stopList), t4.stopList = o3(t4.stopList), i2 = t4.line ?
|
|
32535
|
+
t4.stopList = o3(t4.stopList), t4.stopList = o3(t4.stopList), i2 = t4.line ? fh(t4, e4, n3) : t4.path ? function(t5, e5, n4) {
|
|
32510
32536
|
var i3, r4, o4;
|
|
32511
32537
|
const s3 = [], a2 = { x: 0, y: 0 };
|
|
32512
32538
|
if (((i3 = t5.path) === null || i3 === void 0 ? void 0 : i3.path) === "circle" || ((r4 = t5.path) === null || r4 === void 0 ? void 0 : r4.path) === "rect" || ((o4 = t5.path) === null || o4 === void 0 ? void 0 : o4.path) === "shape") {
|
|
@@ -32524,9 +32550,9 @@ void main() {
|
|
|
32524
32550
|
});
|
|
32525
32551
|
}
|
|
32526
32552
|
return { points: s3, position: a2 };
|
|
32527
|
-
}(t4, e4, n3) :
|
|
32553
|
+
}(t4, e4, n3) : fh(t4, e4, n3);
|
|
32528
32554
|
if (i2) {
|
|
32529
|
-
const t5 = [], o4 = [], { position: s3, points: a2 } = i2, u2 =
|
|
32555
|
+
const t5 = [], o4 = [], { position: s3, points: a2 } = i2, u2 = oh.from(a2, (t6) => t6.point.x, (t6) => t6.point.y);
|
|
32530
32556
|
for (let e5 = 0; e5 < u2.triangles.length; e5 += 3)
|
|
32531
32557
|
t5.push(a2[u2.triangles[e5]].point.x, a2[u2.triangles[e5]].point.y), t5.push(a2[u2.triangles[e5 + 1]].point.x, a2[u2.triangles[e5 + 1]].point.y), t5.push(a2[u2.triangles[e5 + 2]].point.x, a2[u2.triangles[e5 + 2]].point.y), o4.push(...vu(a2[u2.triangles[e5]].color)), o4.push(...vu(a2[u2.triangles[e5 + 1]].color)), o4.push(...vu(a2[u2.triangles[e5 + 2]].color));
|
|
32532
32558
|
const l2 = new Dn();
|
|
@@ -32539,7 +32565,7 @@ void main() {
|
|
|
32539
32565
|
return r3;
|
|
32540
32566
|
}(t3, e3, n2) : null;
|
|
32541
32567
|
}
|
|
32542
|
-
function
|
|
32568
|
+
function fh(t3, e3, n2) {
|
|
32543
32569
|
const i2 = e3 / 2, r3 = n2 / 2, o3 = [{ x: -i2, y: r3 }, { x: -i2, y: -r3 }, { x: i2, y: r3 }, { x: i2, y: -r3 }], s3 = [du.fromPointSlope({ x: -i2, y: 0 }, Math.PI / 2), du.fromPointSlope({ x: 0, y: r3 }, 0), du.fromPointSlope({ x: i2, y: 0 }, Math.PI / 2), du.fromPointSlope({ x: 0, y: -r3 }, 0)], a2 = [], u2 = t3.stopList.slice(1, t3.stopList.length - 1).map((o4) => {
|
|
32544
32570
|
var u3, l3, h3;
|
|
32545
32571
|
const c3 = 2 * Math.PI;
|
|
@@ -32596,7 +32622,72 @@ void main() {
|
|
|
32596
32622
|
p2[t4].point.x += i2, p2[t4].point.y = -p2[t4].point.y + r3;
|
|
32597
32623
|
return { points: p2, position: { x: 0, y: 0 } };
|
|
32598
32624
|
}
|
|
32599
|
-
|
|
32625
|
+
const mh = "\nvec3 rgb2hsl(vec3 rgb) {\n float cMax = max(max(rgb.r, rgb.g), rgb.b);\n float cMin = min(min(rgb.r, rgb.g), rgb.b);\n float delta = cMax - cMin;\n \n float h = 0.0;\n if (delta == 0.0) {\n h = 0.0;\n } else if (cMax == rgb.r) {\n h = 60.0 * mod(((rgb.g - rgb.b) / delta), 6.0);\n } else if (cMax == rgb.g ) {\n h = 60.0 * ((rgb.b - rgb.r) / delta + 2.0);\n } else if (cMax == rgb.b) {\n h = 60.0 * ((rgb.r - rgb.g) / delta + 4.0);\n }\n \n float l = (cMax + cMin) / 2.0;\n \n float s = 0.0;\n if (delta == 0.0) {\n s = 0.0;\n } else {\n s = delta / (1.0 - abs(2.0 * l - 1.0));\n }\n \n return vec3(h, s, l);\n}\n", gh = [mh], vh = { biLevel: "\nvec4 transform(vec4 texColor, float arg) {\n vec3 hsl = rgb2hsl(texColor.rgb);\n mat3 rgb2yuv = mat3(\n 0.2126, 0.7152, 0.0722,\n -0.09991, -0.33609, 0.43600,\n 0.615, -0.5586, -0.05639\n );\n vec3 yuv = texColor.rgb * rgb2yuv;\n if (yuv.x >= 0.49 || texColor.a < 0.9) {\n return vec4(1.0, 1.0, 1.0, 1.0) * texColor.a;\n } else {\n return vec4(0.0, 0.0, 0.0, 1.0) * texColor.a;\n }\n}\n", alphaModFix: "\nvec4 transform(vec4 texColor, float arg) {\n return texColor * arg;\n}\n" };
|
|
32626
|
+
class _h extends Ei {
|
|
32627
|
+
constructor(t3, e3) {
|
|
32628
|
+
var n2;
|
|
32629
|
+
super(void 0, (n2 = vh[t3], `
|
|
32630
|
+
varying vec2 vTextureCoord;
|
|
32631
|
+
|
|
32632
|
+
uniform float arg;
|
|
32633
|
+
uniform sampler2D uSampler;
|
|
32634
|
+
|
|
32635
|
+
${gh.map((t4) => t4 + "\n").join("\n")}
|
|
32636
|
+
|
|
32637
|
+
${n2}
|
|
32638
|
+
|
|
32639
|
+
void main(void){
|
|
32640
|
+
vec4 texColor = texture2D(uSampler, vTextureCoord);
|
|
32641
|
+
gl_FragColor = transform(texColor, arg);
|
|
32642
|
+
}
|
|
32643
|
+
`), { arg: e3 });
|
|
32644
|
+
}
|
|
32645
|
+
}
|
|
32646
|
+
const yh = [mh], xh = { clrChange: "\nvec4 transform(vec4 texColor, vec4 arg1, vec4 arg2) {\n float epsilon = 0.001;\n vec3 colorDiff = arg1.rgb - (texColor.rgb / max(texColor.a, 0.0000000001));\n float colorDistance = length(colorDiff);\n if (colorDistance < epsilon) {\n arg2.rgb *= arg2.a;\n return arg2;\n } else {\n return texColor;\n }\n}\n", changeBulletColor: "\nvec4 transform(vec4 texColor, vec4 arg1, vec4 arg2) {\n float epsilon = 0.4;\n vec3 colorDiff = arg1.rgb - (texColor.rgb / max(texColor.a, 0.0000000001));\n float colorDistance = length(colorDiff);\n if (colorDistance < epsilon) {\n arg2.rgb *= ceil(texColor.a);\n return arg2;\n } else {\n return texColor;\n }\n}\n" };
|
|
32647
|
+
class bh extends Ei {
|
|
32648
|
+
constructor(t3, e3, n2) {
|
|
32649
|
+
var i2;
|
|
32650
|
+
super(void 0, (i2 = xh[t3], `
|
|
32651
|
+
varying vec2 vTextureCoord;
|
|
32652
|
+
|
|
32653
|
+
uniform vec4 arg1;
|
|
32654
|
+
uniform vec4 arg2;
|
|
32655
|
+
uniform sampler2D uSampler;
|
|
32656
|
+
|
|
32657
|
+
${yh.map((t4) => t4 + "\n").join("\n")}
|
|
32658
|
+
|
|
32659
|
+
${i2}
|
|
32660
|
+
|
|
32661
|
+
void main(void){
|
|
32662
|
+
vec4 texColor = texture2D(uSampler, vTextureCoord);
|
|
32663
|
+
gl_FragColor = transform(texColor, arg1, arg2);
|
|
32664
|
+
}
|
|
32665
|
+
`), { arg1: Float32Array.from(e3), arg2: Float32Array.from(n2) });
|
|
32666
|
+
}
|
|
32667
|
+
}
|
|
32668
|
+
const wh = [mh], Sh = { lum: "\nvec4 transform(vec4 texColor, float arg1, float arg2) {\n if (arg1 > 0.0) {\n texColor.r += (1.0 - texColor.r) * arg1;\n texColor.g += (1.0 - texColor.g) * arg1;\n texColor.b += (1.0 - texColor.b) * arg1;\n } else if (arg1 < 0.0) {\n texColor.r -= texColor.r * arg1;\n texColor.g -= texColor.g * arg1;\n texColor.b -= texColor.b * arg1;\n }\n // todo \u5BF9\u6BD4\u5EA6\n texColor.rgb *= texColor.a;\n return texColor;\n}\n" };
|
|
32669
|
+
class Th extends Ei {
|
|
32670
|
+
constructor(t3, e3, n2) {
|
|
32671
|
+
var i2;
|
|
32672
|
+
super(void 0, (i2 = Sh[t3], `
|
|
32673
|
+
varying vec2 vTextureCoord;
|
|
32674
|
+
|
|
32675
|
+
uniform float arg1;
|
|
32676
|
+
uniform float arg2;
|
|
32677
|
+
uniform sampler2D uSampler;
|
|
32678
|
+
|
|
32679
|
+
${wh.map((t4) => t4 + "\n").join("\n")}
|
|
32680
|
+
|
|
32681
|
+
${i2}
|
|
32682
|
+
|
|
32683
|
+
void main(void){
|
|
32684
|
+
vec4 texColor = texture2D(uSampler, vTextureCoord);
|
|
32685
|
+
gl_FragColor = transform(texColor, arg1, arg2);
|
|
32686
|
+
}
|
|
32687
|
+
`), { arg1: e3, arg2: n2 });
|
|
32688
|
+
}
|
|
32689
|
+
}
|
|
32690
|
+
class Eh {
|
|
32600
32691
|
constructor(t3, e3) {
|
|
32601
32692
|
this.renderContainers = [], this.renderTextures = [], this.textures = Object.create(null), this.fillStyles = [], this.renderer = t3, this.spriteTextures = e3;
|
|
32602
32693
|
}
|
|
@@ -32610,7 +32701,7 @@ void main() {
|
|
|
32610
32701
|
const { width: e4, height: n3 } = t4;
|
|
32611
32702
|
t4.item.blipFillObject.position.x += t4.x + e4 / 2, t4.item.blipFillObject.position.y += t4.y + n3 / 2, t4.item.blipFillObject.anchor.x = 0.5, t4.item.blipFillObject.anchor.y = 0.5, t4.item.blipFillObject.rotation = t4.item.rotate / 180 * Math.PI, r3.addChild(t4.item.blipFillObject);
|
|
32612
32703
|
} else {
|
|
32613
|
-
const e4 =
|
|
32704
|
+
const e4 = ph(t4.item.fill, t4.width - 4, t4.height - 4);
|
|
32614
32705
|
if (e4)
|
|
32615
32706
|
e4.position.x += t4.x + 2, e4.position.y += t4.y + 2, r3.addChild(e4);
|
|
32616
32707
|
else {
|
|
@@ -32638,24 +32729,35 @@ void main() {
|
|
|
32638
32729
|
getGifFrames(t3) {
|
|
32639
32730
|
return this.spriteTextures.getGifFrames(t3);
|
|
32640
32731
|
}
|
|
32641
|
-
addFill(t3, e3, n2, i2) {
|
|
32642
|
-
var
|
|
32643
|
-
const
|
|
32644
|
-
if (this.textures[
|
|
32645
|
-
return
|
|
32646
|
-
if (this.fillStyles.findIndex((t4) => t4.id ===
|
|
32647
|
-
return
|
|
32732
|
+
addFill(t3, e3, n2, i2, r3 = false) {
|
|
32733
|
+
var o3;
|
|
32734
|
+
const s3 = JSON.stringify(t3) + e3 + n2, a2 = Au()(s3);
|
|
32735
|
+
if (this.textures[a2])
|
|
32736
|
+
return a2;
|
|
32737
|
+
if (this.fillStyles.findIndex((t4) => t4.id === a2) >= 0)
|
|
32738
|
+
return a2;
|
|
32648
32739
|
if (t3.fillType !== "blipFill") {
|
|
32649
32740
|
const r4 = { x: 0, y: 0 };
|
|
32650
|
-
t3.fillType === "solidFill" && (e3 += 2, n2 += 2, r4.x = 1, r4.y = 1), this.fillStyles.push({ fill: t3, width: e3, height: n2, id:
|
|
32741
|
+
t3.fillType === "solidFill" && (e3 += 2, n2 += 2, r4.x = 1, r4.y = 1), this.fillStyles.push({ fill: t3, width: e3, height: n2, id: a2, name: i2, pivot: r4 });
|
|
32651
32742
|
} else {
|
|
32652
32743
|
const e4 = this.spriteTextures.getTexture(t3.src), n3 = this.spriteTextures.getFrameData(t3.src);
|
|
32653
32744
|
if (e4) {
|
|
32654
32745
|
const i3 = new ms();
|
|
32655
|
-
i3.texture = e4, t3.filters.length
|
|
32746
|
+
i3.texture = e4, t3.filters.length > 0 && r3 && (i3.filters = function(t4) {
|
|
32747
|
+
const e5 = [];
|
|
32748
|
+
return t4.forEach((t5) => {
|
|
32749
|
+
if (t5.type === "biLevel")
|
|
32750
|
+
e5.push(new _h("biLevel", t5.args[0]));
|
|
32751
|
+
else if (t5.type === "clrChange" || t5.type === "changeBulletColor") {
|
|
32752
|
+
const n4 = vu(t5.args[0]), i4 = vu(t5.args[1]);
|
|
32753
|
+
e5.push(new bh(t5.type, n4, i4));
|
|
32754
|
+
} else
|
|
32755
|
+
t5.type === "alphaModFix" ? e5.push(new _h(t5.type, t5.args[0])) : t5.type === "lum" && e5.push(new Th(t5.type, t5.args[0], t5.args[1]));
|
|
32756
|
+
}), e5;
|
|
32757
|
+
}(t3.filters)), this.fillStyles.push({ fill: t3, width: (n3 == null ? void 0 : n3.rotate) ? e4.height : e4.width, height: (n3 == null ? void 0 : n3.rotate) ? e4.width : e4.height, id: a2, blipFillObject: i3, pivot: { x: 0, y: 0 }, rotate: (o3 = n3 == null ? void 0 : n3.rotate) !== null && o3 !== void 0 ? o3 : 0 });
|
|
32656
32758
|
}
|
|
32657
32759
|
}
|
|
32658
|
-
return
|
|
32760
|
+
return a2;
|
|
32659
32761
|
}
|
|
32660
32762
|
pack() {
|
|
32661
32763
|
const t3 = this.fillStyles.filter((t4) => !(!t4.fill.fillType || t4.fill.fillType === "noFill" || t4.width === 0 || t4.height === 0) || (this.textures[t4.id] = { texture: null, pivot: { x: 0, y: 0 } }, false));
|
|
@@ -32672,7 +32774,7 @@ void main() {
|
|
|
32672
32774
|
this.textures = Object.create(null), this.fillStyles = [], this.renderTextures.forEach((t3) => t3.destroy(true)), this.renderContainers.forEach((t3) => t3.destroy({ children: true })), this.spriteTextures.destroy();
|
|
32673
32775
|
}
|
|
32674
32776
|
}
|
|
32675
|
-
class
|
|
32777
|
+
class Mh {
|
|
32676
32778
|
constructor(t3) {
|
|
32677
32779
|
this.renderContainers = [], this.renderTextures = [], this.idTidMap = Object.create(null), this.textures = Object.create(null), this.graphics = [], this.renderer = t3;
|
|
32678
32780
|
}
|
|
@@ -32754,7 +32856,7 @@ void main() {
|
|
|
32754
32856
|
}), this.textures = Object.create(null), this.graphics = [], this.renderContainers.forEach((t3) => t3.destroy({ children: true, baseTexture: true, texture: true })), this.renderTextures.forEach((t3) => t3.destroy(true));
|
|
32755
32857
|
}
|
|
32756
32858
|
}
|
|
32757
|
-
var
|
|
32859
|
+
var Ah = function(t3, e3, n2, i2) {
|
|
32758
32860
|
return new (n2 || (n2 = Promise))(function(r3, o3) {
|
|
32759
32861
|
function s3(t4) {
|
|
32760
32862
|
try {
|
|
@@ -32779,7 +32881,7 @@ void main() {
|
|
|
32779
32881
|
u2((i2 = i2.apply(t3, e3 || [])).next());
|
|
32780
32882
|
});
|
|
32781
32883
|
};
|
|
32782
|
-
class
|
|
32884
|
+
class Ph {
|
|
32783
32885
|
constructor(t3) {
|
|
32784
32886
|
this.gifs = Object.create(null), this.textures = Object.create(null), this.frames = Object.create(null), this.spriteSheets = [], this.isLoaded = false, this.loader = t3;
|
|
32785
32887
|
}
|
|
@@ -32793,7 +32895,7 @@ void main() {
|
|
|
32793
32895
|
return this.gifs[t3] ? this.gifs[t3].filter((t4) => !!t4) : [];
|
|
32794
32896
|
}
|
|
32795
32897
|
loadSpriteSheetItem(t3, e3, n2) {
|
|
32796
|
-
return
|
|
32898
|
+
return Ah(this, void 0, void 0, function* () {
|
|
32797
32899
|
const i2 = yield this.loader.fetchJson(`${t3}/${e3}/jsonOutput/${n2}.json`), r3 = yield this.loader.fetchPng(`${t3}/${e3}/jsonOutput/${n2}.png`), o3 = document.createElement("img");
|
|
32798
32900
|
o3.src = r3, yield new Promise((t4, e4) => {
|
|
32799
32901
|
o3.onload = () => t4(""), o3.onerror = () => e4();
|
|
@@ -32820,7 +32922,7 @@ void main() {
|
|
|
32820
32922
|
this.isLoaded = false, this.spriteSheets.forEach((t3) => t3.destroy(true));
|
|
32821
32923
|
}
|
|
32822
32924
|
}
|
|
32823
|
-
class
|
|
32925
|
+
class Ch extends s2.a {
|
|
32824
32926
|
constructor() {
|
|
32825
32927
|
super(), this.prevTime = -1, this.times = 0, this.valueTotal = 0, this.destroyed = false, this.value = 0, this.calcFps();
|
|
32826
32928
|
}
|
|
@@ -32834,7 +32936,7 @@ void main() {
|
|
|
32834
32936
|
this.destroyed = true;
|
|
32835
32937
|
}
|
|
32836
32938
|
}
|
|
32837
|
-
var
|
|
32939
|
+
var Rh = n(10), Ih = function(t3, e3, n2, i2) {
|
|
32838
32940
|
return new (n2 || (n2 = Promise))(function(r3, o3) {
|
|
32839
32941
|
function s3(t4) {
|
|
32840
32942
|
try {
|
|
@@ -32859,24 +32961,24 @@ void main() {
|
|
|
32859
32961
|
u2((i2 = i2.apply(t3, e3 || [])).next());
|
|
32860
32962
|
});
|
|
32861
32963
|
};
|
|
32862
|
-
class
|
|
32964
|
+
class Lh {
|
|
32863
32965
|
constructor(t3) {
|
|
32864
32966
|
this.useCache = false, this.useCache = t3;
|
|
32865
32967
|
}
|
|
32866
32968
|
bindTask(t3) {
|
|
32867
|
-
this.taskId = t3, this.useCache && (this.cache =
|
|
32969
|
+
this.taskId = t3, this.useCache && (this.cache = Rh.createInstance({ name: "_slide_local_cache_", storeName: this.taskId, driver: Rh.INDEXEDDB, version: 1 }), this.cache.clear().catch(() => {
|
|
32868
32970
|
}));
|
|
32869
32971
|
}
|
|
32870
32972
|
fetchJson(t3) {
|
|
32871
32973
|
var e3, n2;
|
|
32872
|
-
return
|
|
32974
|
+
return Ih(this, void 0, void 0, function* () {
|
|
32873
32975
|
let i2 = yield (e3 = this.cache) === null || e3 === void 0 ? void 0 : e3.getItem(t3);
|
|
32874
32976
|
return i2 && this.useCache || (i2 = yield (yield fetch(t3)).json(), this.useCache && (yield (n2 = this.cache) === null || n2 === void 0 ? void 0 : n2.setItem(t3, i2))), i2;
|
|
32875
32977
|
});
|
|
32876
32978
|
}
|
|
32877
32979
|
fetchPng(t3) {
|
|
32878
32980
|
var e3, n2;
|
|
32879
|
-
return
|
|
32981
|
+
return Ih(this, void 0, void 0, function* () {
|
|
32880
32982
|
let i2 = yield (e3 = this.cache) === null || e3 === void 0 ? void 0 : e3.getItem(t3);
|
|
32881
32983
|
if (i2 && this.useCache)
|
|
32882
32984
|
return i2;
|
|
@@ -32898,7 +33000,7 @@ void main() {
|
|
|
32898
33000
|
});
|
|
32899
33001
|
}
|
|
32900
33002
|
}
|
|
32901
|
-
class
|
|
33003
|
+
class Oh {
|
|
32902
33004
|
constructor() {
|
|
32903
33005
|
this.runningTimeNodes = {};
|
|
32904
33006
|
}
|
|
@@ -32912,7 +33014,7 @@ void main() {
|
|
|
32912
33014
|
this.runningTimeNodes[i2] = n2;
|
|
32913
33015
|
}
|
|
32914
33016
|
}
|
|
32915
|
-
var
|
|
33017
|
+
var Dh = function(t3, e3, n2, i2) {
|
|
32916
33018
|
return new (n2 || (n2 = Promise))(function(r3, o3) {
|
|
32917
33019
|
function s3(t4) {
|
|
32918
33020
|
try {
|
|
@@ -32937,26 +33039,26 @@ void main() {
|
|
|
32937
33039
|
u2((i2 = i2.apply(t3, e3 || [])).next());
|
|
32938
33040
|
});
|
|
32939
33041
|
};
|
|
32940
|
-
class
|
|
33042
|
+
class Nh {
|
|
32941
33043
|
constructor(t3) {
|
|
32942
33044
|
this.isPaused = false, this.timestamp = 0, this.callbackList = [], this.onTimeUpdate = (t4) => {
|
|
32943
33045
|
const e3 = t4 / (gt.TARGET_FPMS || 0.06);
|
|
32944
|
-
let n2 = -1;
|
|
32945
33046
|
if (!this.isPaused) {
|
|
32946
|
-
this.timestamp += e3;
|
|
33047
|
+
this.timestamp += e3, this.callbackList = this.callbackList.filter((t5) => t5 && !t5.applied);
|
|
32947
33048
|
for (let t5 = 0, e4 = this.callbackList.length; t5 < e4; t5++) {
|
|
32948
33049
|
const e5 = this.callbackList[t5];
|
|
32949
|
-
if (!
|
|
32950
|
-
|
|
32951
|
-
|
|
33050
|
+
if (!e5.applied) {
|
|
33051
|
+
if (!(e5.triggerTime <= this.timestamp))
|
|
33052
|
+
break;
|
|
33053
|
+
e5.fn(), e5.applied = true;
|
|
33054
|
+
}
|
|
32952
33055
|
}
|
|
32953
|
-
this.callbackList = this.callbackList.slice(n2 + 1);
|
|
32954
33056
|
}
|
|
32955
33057
|
}, this.ticker = t3, this.ticker.add(this.onTimeUpdate);
|
|
32956
33058
|
}
|
|
32957
33059
|
setTimeout(t3, e3) {
|
|
32958
33060
|
const n2 = Lu(), i2 = this.timestamp + Math.max(e3 || 16, 16);
|
|
32959
|
-
return this.callbackList.push({ fn: t3, triggerTime: i2, id: n2 }), this.callbackList.sort((t4, e4) => t4.triggerTime - e4.triggerTime), n2;
|
|
33061
|
+
return this.callbackList.push({ fn: t3, triggerTime: i2, id: n2, applied: false }), this.callbackList.sort((t4, e4) => t4.triggerTime - e4.triggerTime), n2;
|
|
32960
33062
|
}
|
|
32961
33063
|
clearTimeout(t3) {
|
|
32962
33064
|
const e3 = this.callbackList.findIndex((e4) => e4.id === t3);
|
|
@@ -32968,7 +33070,7 @@ void main() {
|
|
|
32968
33070
|
});
|
|
32969
33071
|
}
|
|
32970
33072
|
waitUntil(t3, e3) {
|
|
32971
|
-
return
|
|
33073
|
+
return Dh(this, void 0, void 0, function* () {
|
|
32972
33074
|
const n2 = this.timestamp;
|
|
32973
33075
|
for (; !t3() && this.timestamp - n2 < e3; )
|
|
32974
33076
|
yield this.delay(50);
|
|
@@ -32981,7 +33083,7 @@ void main() {
|
|
|
32981
33083
|
this.isPaused = false;
|
|
32982
33084
|
}
|
|
32983
33085
|
}
|
|
32984
|
-
var
|
|
33086
|
+
var Fh = function(t3, e3, n2, i2) {
|
|
32985
33087
|
return new (n2 || (n2 = Promise))(function(r3, o3) {
|
|
32986
33088
|
function s3(t4) {
|
|
32987
33089
|
try {
|
|
@@ -33007,8 +33109,8 @@ void main() {
|
|
|
33007
33109
|
});
|
|
33008
33110
|
};
|
|
33009
33111
|
i.skipHello();
|
|
33010
|
-
const
|
|
33011
|
-
class
|
|
33112
|
+
const Bh = { 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" };
|
|
33113
|
+
class kh {
|
|
33012
33114
|
constructor(t3) {
|
|
33013
33115
|
this.eventHub = t3, this.targets = Object.create(null);
|
|
33014
33116
|
}
|
|
@@ -33027,10 +33129,10 @@ void main() {
|
|
|
33027
33129
|
this.targets = Object.create(null);
|
|
33028
33130
|
}
|
|
33029
33131
|
}
|
|
33030
|
-
const
|
|
33031
|
-
class
|
|
33132
|
+
const Uh = { 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" };
|
|
33133
|
+
class Gh extends s2.a {
|
|
33032
33134
|
constructor(t3, e3 = {}) {
|
|
33033
|
-
super(), this.loader = new
|
|
33135
|
+
super(), this.loader = new Lh(false), this.transactionPlayer = new u.TransactionPlayer(), this.transactionSprite = new ms(), this.isForward = true, this.dynamicResolution = 1, this.drawCall = 0, this.scale = 1, this.fps = new Ch(), this.designWidth = 0, this.designHeight = 0, this.currentIndex = 0, this.slideCount = 0, this.runtime = { drawCall: 0, fps: 0 }, this.mode = t3, this.config = { minFPS: Object(a.isUndefined)(e3.minFPS) ? 30 : e3.minFPS, maxFPS: Object(a.isUndefined)(e3.maxFPS) ? 40 : e3.maxFPS, resolution: Object(a.isUndefined)(e3.resolution) ? window.devicePixelRatio : e3.resolution, autoFPS: !Object(a.isUndefined)(e3.autoFPS) && e3.autoFPS, autoResolution: !Object(a.isUndefined)(e3.autoResolution) && e3.autoResolution, transactionBgColor: Object(a.isUndefined)(e3.transactionBgColor) ? 0 : e3.transactionBgColor }, this.app = new lr({ antialias: true, autoDensity: true, backgroundColor: 16777215 }), this.updateConfig(this.config), this.app.view.style.zIndex = "1", this.app.stage.sortableChildren = true;
|
|
33034
33136
|
const n2 = this.app.renderer, { drawElements: i2 } = n2.gl;
|
|
33035
33137
|
n2.gl.drawElements = (...t4) => {
|
|
33036
33138
|
i2.call(n2.gl, ...t4), this.drawCall += 1;
|
|
@@ -33056,7 +33158,7 @@ void main() {
|
|
|
33056
33158
|
}
|
|
33057
33159
|
}), this.app.ticker.add(() => {
|
|
33058
33160
|
this.runtime.drawCall = this.drawCall, this.runtime.fps = Math.floor(this.app.ticker.minFPS), this.drawCall = 0;
|
|
33059
|
-
}, null, Be.LOW), this.clock = new
|
|
33161
|
+
}, null, Be.LOW), this.clock = new Nh(this.app.ticker);
|
|
33060
33162
|
}
|
|
33061
33163
|
get view() {
|
|
33062
33164
|
return this.app.renderer ? this.app.view : null;
|
|
@@ -33065,7 +33167,7 @@ void main() {
|
|
|
33065
33167
|
Object(a.isUndefined)(t3.minFPS) || (this.config.minFPS = t3.minFPS, this.app.ticker.minFPS = t3.minFPS), Object(a.isUndefined)(t3.maxFPS) || (this.config.maxFPS = t3.maxFPS, this.app.ticker.maxFPS = t3.maxFPS), Object(a.isUndefined)(t3.resolution) || (this.config.resolution = t3.resolution, this.updateResolution(this.scale * this.config.resolution)), Object(a.isUndefined)(t3.autoFPS) || (this.config.autoFPS = t3.autoFPS), Object(a.isUndefined)(t3.autoResolution) || (this.config.autoResolution = t3.autoResolution), Object(a.isUndefined)(t3.transactionBgColor) || (this.config.transactionBgColor = t3.transactionBgColor);
|
|
33066
33168
|
}
|
|
33067
33169
|
preload(t3) {
|
|
33068
|
-
return
|
|
33170
|
+
return Fh(this, void 0, void 0, function* () {
|
|
33069
33171
|
if (t3 < 1 || t3 > this.slideCount || !this.loader.cache)
|
|
33070
33172
|
return;
|
|
33071
33173
|
const e3 = yield this.loader.fetchJson(`${this.url}/${this.taskId}/jsonOutput/slide-${t3}.json`), { sheets: n2 } = e3;
|
|
@@ -33080,11 +33182,11 @@ void main() {
|
|
|
33080
33182
|
this.app.stage.interactive = t3, this.app.stage.interactiveChildren = t3;
|
|
33081
33183
|
}
|
|
33082
33184
|
loadSlide(t3) {
|
|
33083
|
-
return
|
|
33084
|
-
const e3 = new
|
|
33185
|
+
return Fh(this, void 0, void 0, function* () {
|
|
33186
|
+
const e3 = new Ph(this.loader), n2 = new s2.a(), i2 = { mode: this.mode, renderer: this.app.renderer, graphicsTexture: new Mh(this.app.renderer), fillTexture: new Eh(this.app.renderer, e3), stageWidth: 0, stageHeight: 0, ticker: this.app.ticker, timingTargets: new kh(n2), eventHub: n2, view: this.app.view, medias: Object.create(null), lastViewedIndex: this.currentIndex, conflictTimeNodeManager: new Oh(), clock: this.clock }, r3 = yield this.loader.fetchJson(`${this.url}/${this.taskId}/jsonOutput/slide-${t3}.json`), { width: o3, height: a2, sheets: u2 } = r3;
|
|
33085
33187
|
yield e3.loadSpriteSheets(u2, this.url, this.taskId), i2.stageWidth = o3, i2.stageHeight = a2;
|
|
33086
|
-
const l2 = new
|
|
33087
|
-
return this.translateEvent(i2.eventHub, [
|
|
33188
|
+
const l2 = new Xl(r3, i2, { x: 0, y: 0 });
|
|
33189
|
+
return this.translateEvent(i2.eventHub, [Uh.mainSeqStepChange, Uh.mainSeqStateChange, Uh.hyperlinkTrigger, Uh.interactiveSeqNext, Uh.mainSeqStepStart, Uh.mainSeqStepEnd, Uh.animateStart, Uh.animateEnd, Uh.mediaPlay, Uh.mediaPause, Uh.mediaSeek, Uh.requestGotoSlide, Uh.requestNextSlide, Uh.requestPrevSlide, Uh.interactiveSeqStateChange]), l2.preRender(), i2.fillTexture.pack(), i2.graphicsTexture.pack(), { stage: l2, json: r3 };
|
|
33088
33190
|
});
|
|
33089
33191
|
}
|
|
33090
33192
|
translateEvent(t3, e3) {
|
|
@@ -33095,15 +33197,15 @@ void main() {
|
|
|
33095
33197
|
});
|
|
33096
33198
|
}
|
|
33097
33199
|
renderSlide(t3) {
|
|
33098
|
-
return
|
|
33099
|
-
this.emit(
|
|
33200
|
+
return Fh(this, void 0, void 0, function* () {
|
|
33201
|
+
this.emit(Uh.renderStart, t3);
|
|
33100
33202
|
const e3 = yield this.loadSlide(t3);
|
|
33101
33203
|
this.currentIndex = Number(t3);
|
|
33102
33204
|
const { width: n2, height: i2, slideCount: r3 } = e3.json;
|
|
33103
33205
|
let o3;
|
|
33104
33206
|
this.slideCount = r3, this.designWidth = n2, this.designHeight = i2, this.currentStage && (e3.json.transition && e3.json.transition.type && (o3 = this.getBase64(this.currentStage)), this.prevStage = this.currentStage), this.currentStage = e3, yield e3.stage.render(), e3.stage.createTiming(), e3.stage.container.visible = true, e3.stage.collectMainSeqStartValue(), this.isForward ? e3.stage.setMainSeqStep(0, "start") : e3.stage.setMainSeqStep(-1, "end");
|
|
33105
33207
|
const s3 = this.getBase64(this.currentStage);
|
|
33106
|
-
e3.stage.container.visible = false, this.app.stage.addChild(e3.stage.container), o3 && s3 && e3.json.transition && e3.json.transition.type && (yield this.playTransaction(o3, s3, e3.json.transition)), this.prevStage && (this.app.stage.removeChild(this.prevStage.stage.container), this.prevStage.stage.destroy(), this.prevStage = void 0), this.isForward ? e3.stage.startTiming() : e3.stage.setMainSeqApplied(), this.updateResolution(this.config.resolution), e3.stage.container.visible = true, this.emit(
|
|
33208
|
+
e3.stage.container.visible = false, this.app.stage.addChild(e3.stage.container), o3 && s3 && e3.json.transition && e3.json.transition.type && (yield this.playTransaction(o3, s3, e3.json.transition)), this.prevStage && (this.app.stage.removeChild(this.prevStage.stage.container), this.prevStage.stage.destroy(), this.prevStage = void 0), this.isForward ? yield e3.stage.startTiming() : e3.stage.setMainSeqApplied(), this.updateResolution(this.config.resolution), e3.stage.container.visible = true, this.emit(Uh.renderEnd, t3), this.emit(Uh.slideChange, t3), this.preload(t3 + 1).catch(() => {
|
|
33107
33209
|
}), this.preload(t3 - 1).catch(() => {
|
|
33108
33210
|
});
|
|
33109
33211
|
});
|
|
@@ -33115,7 +33217,7 @@ void main() {
|
|
|
33115
33217
|
return e3.destroy(), n2;
|
|
33116
33218
|
}
|
|
33117
33219
|
getPreviewImage(t3) {
|
|
33118
|
-
return
|
|
33220
|
+
return Fh(this, void 0, void 0, function* () {
|
|
33119
33221
|
if (t3 < 1 || t3 > this.slideCount)
|
|
33120
33222
|
return null;
|
|
33121
33223
|
const e3 = yield this.loadSlide(t3);
|
|
@@ -33125,16 +33227,16 @@ void main() {
|
|
|
33125
33227
|
});
|
|
33126
33228
|
}
|
|
33127
33229
|
playTransaction(t3, e3, n2) {
|
|
33128
|
-
return
|
|
33230
|
+
return Fh(this, void 0, void 0, function* () {
|
|
33129
33231
|
const i2 = this.app.view.parentElement;
|
|
33130
|
-
if (t3 && e3 && i2 &&
|
|
33232
|
+
if (t3 && e3 && i2 && Bh[n2.type] && this.transactionPlayer) {
|
|
33131
33233
|
this.transactionSprite.zIndex = 999, this.app.stage.addChild(this.transactionSprite);
|
|
33132
33234
|
const i3 = this.transactionPlayer.renderer.domElement, r3 = wn.from(i3), o3 = () => r3.update();
|
|
33133
33235
|
return setTimeout(() => {
|
|
33134
33236
|
this.app.ticker.add(o3);
|
|
33135
33237
|
}), this.transactionSprite.texture = r3, new Promise((i4) => {
|
|
33136
33238
|
var r4, s3, a2;
|
|
33137
|
-
(r4 = this.transactionPlayer) === null || r4 === void 0 || r4.play({ reverse: !this.isForward, prevTextureUrl: t3, nextTextureUrl: e3, textureWidth: this.designWidth, textureHeight: this.designHeight, presetType:
|
|
33239
|
+
(r4 = this.transactionPlayer) === null || r4 === void 0 || r4.play({ reverse: !this.isForward, prevTextureUrl: t3, nextTextureUrl: e3, textureWidth: this.designWidth, textureHeight: this.designHeight, presetType: Bh[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: () => {
|
|
33138
33240
|
i4(), this.app.stage.removeChild(this.transactionSprite), this.app.ticker.remove(o3);
|
|
33139
33241
|
} });
|
|
33140
33242
|
});
|
|
@@ -33203,7 +33305,7 @@ void main() {
|
|
|
33203
33305
|
}
|
|
33204
33306
|
setMediaState(t3, e3) {
|
|
33205
33307
|
var n2;
|
|
33206
|
-
return
|
|
33308
|
+
return Fh(this, void 0, void 0, function* () {
|
|
33207
33309
|
yield (n2 = this.currentStage) === null || n2 === void 0 ? void 0 : n2.stage.setMediaState(t3, e3);
|
|
33208
33310
|
});
|
|
33209
33311
|
}
|
|
@@ -33230,17 +33332,17 @@ void main() {
|
|
|
33230
33332
|
this.app.destroy(true, { children: false, texture: true, baseTexture: true });
|
|
33231
33333
|
}
|
|
33232
33334
|
}
|
|
33233
|
-
var
|
|
33335
|
+
var Hh, zh = [], jh = "ResizeObserver loop completed with undelivered notifications.";
|
|
33234
33336
|
!function(t3) {
|
|
33235
33337
|
t3.BORDER_BOX = "border-box", t3.CONTENT_BOX = "content-box", t3.DEVICE_PIXEL_CONTENT_BOX = "device-pixel-content-box";
|
|
33236
|
-
}(
|
|
33237
|
-
var
|
|
33338
|
+
}(Hh || (Hh = {}));
|
|
33339
|
+
var Vh, Wh = function(t3) {
|
|
33238
33340
|
return Object.freeze(t3);
|
|
33239
|
-
},
|
|
33240
|
-
this.inlineSize = t3, this.blockSize = e3,
|
|
33241
|
-
},
|
|
33341
|
+
}, Xh = function(t3, e3) {
|
|
33342
|
+
this.inlineSize = t3, this.blockSize = e3, Wh(this);
|
|
33343
|
+
}, qh = function() {
|
|
33242
33344
|
function t3(t4, e3, n2, i2) {
|
|
33243
|
-
return this.x = t4, this.y = e3, this.width = n2, this.height = i2, this.top = this.y, this.left = this.x, this.bottom = this.top + this.height, this.right = this.left + this.width,
|
|
33345
|
+
return this.x = t4, this.y = e3, this.width = n2, this.height = i2, this.top = this.y, this.left = this.x, this.bottom = this.top + this.height, this.right = this.left + this.width, Wh(this);
|
|
33244
33346
|
}
|
|
33245
33347
|
return t3.prototype.toJSON = function() {
|
|
33246
33348
|
var t4 = this;
|
|
@@ -33248,59 +33350,59 @@ void main() {
|
|
|
33248
33350
|
}, t3.fromRect = function(e3) {
|
|
33249
33351
|
return new t3(e3.x, e3.y, e3.width, e3.height);
|
|
33250
33352
|
}, t3;
|
|
33251
|
-
}(),
|
|
33353
|
+
}(), Yh = function(t3) {
|
|
33252
33354
|
return t3 instanceof SVGElement && "getBBox" in t3;
|
|
33253
|
-
},
|
|
33254
|
-
if (
|
|
33355
|
+
}, Zh = function(t3) {
|
|
33356
|
+
if (Yh(t3)) {
|
|
33255
33357
|
var e3 = t3.getBBox(), n2 = e3.width, i2 = e3.height;
|
|
33256
33358
|
return !n2 && !i2;
|
|
33257
33359
|
}
|
|
33258
33360
|
var r3 = t3, o3 = r3.offsetWidth, s3 = r3.offsetHeight;
|
|
33259
33361
|
return !(o3 || s3 || t3.getClientRects().length);
|
|
33260
|
-
},
|
|
33362
|
+
}, Jh = function(t3) {
|
|
33261
33363
|
var e3, n2;
|
|
33262
33364
|
if (t3 instanceof Element)
|
|
33263
33365
|
return true;
|
|
33264
33366
|
var i2 = (n2 = (e3 = t3) === null || e3 === void 0 ? void 0 : e3.ownerDocument) === null || n2 === void 0 ? void 0 : n2.defaultView;
|
|
33265
33367
|
return !!(i2 && t3 instanceof i2.Element);
|
|
33266
|
-
},
|
|
33368
|
+
}, Kh = typeof window != "undefined" ? window : {}, $h = new WeakMap(), Qh = /auto|scroll/, tc = /^tb|vertical/, ec = /msie|trident/i.test(Kh.navigator && Kh.navigator.userAgent), nc = function(t3) {
|
|
33267
33369
|
return parseFloat(t3 || "0");
|
|
33268
|
-
},
|
|
33269
|
-
return t3 === void 0 && (t3 = 0), e3 === void 0 && (e3 = 0), n2 === void 0 && (n2 = false), new
|
|
33270
|
-
},
|
|
33271
|
-
if (e3 === void 0 && (e3 = false),
|
|
33272
|
-
return
|
|
33273
|
-
if (
|
|
33274
|
-
return
|
|
33275
|
-
var n2 = getComputedStyle(t3), i2 =
|
|
33276
|
-
return
|
|
33277
|
-
},
|
|
33278
|
-
var i2 =
|
|
33370
|
+
}, ic = function(t3, e3, n2) {
|
|
33371
|
+
return t3 === void 0 && (t3 = 0), e3 === void 0 && (e3 = 0), n2 === void 0 && (n2 = false), new Xh((n2 ? e3 : t3) || 0, (n2 ? t3 : e3) || 0);
|
|
33372
|
+
}, rc = Wh({ devicePixelContentBoxSize: ic(), borderBoxSize: ic(), contentBoxSize: ic(), contentRect: new qh(0, 0, 0, 0) }), oc = function(t3, e3) {
|
|
33373
|
+
if (e3 === void 0 && (e3 = false), $h.has(t3) && !e3)
|
|
33374
|
+
return $h.get(t3);
|
|
33375
|
+
if (Zh(t3))
|
|
33376
|
+
return $h.set(t3, rc), rc;
|
|
33377
|
+
var n2 = getComputedStyle(t3), i2 = Yh(t3) && t3.ownerSVGElement && t3.getBBox(), r3 = !ec && n2.boxSizing === "border-box", o3 = tc.test(n2.writingMode || ""), s3 = !i2 && Qh.test(n2.overflowY || ""), a2 = !i2 && Qh.test(n2.overflowX || ""), u2 = i2 ? 0 : nc(n2.paddingTop), l2 = i2 ? 0 : nc(n2.paddingRight), h2 = i2 ? 0 : nc(n2.paddingBottom), c2 = i2 ? 0 : nc(n2.paddingLeft), d2 = i2 ? 0 : nc(n2.borderTopWidth), p2 = i2 ? 0 : nc(n2.borderRightWidth), f2 = i2 ? 0 : nc(n2.borderBottomWidth), m2 = c2 + l2, g2 = u2 + h2, v2 = (i2 ? 0 : nc(n2.borderLeftWidth)) + p2, _2 = d2 + f2, y2 = a2 ? t3.offsetHeight - _2 - t3.clientHeight : 0, x2 = s3 ? t3.offsetWidth - v2 - t3.clientWidth : 0, b2 = r3 ? m2 + v2 : 0, w2 = r3 ? g2 + _2 : 0, S2 = i2 ? i2.width : nc(n2.width) - b2 - x2, T2 = i2 ? i2.height : nc(n2.height) - w2 - y2, E2 = S2 + m2 + x2 + v2, M2 = T2 + g2 + y2 + _2, A2 = Wh({ devicePixelContentBoxSize: ic(Math.round(S2 * devicePixelRatio), Math.round(T2 * devicePixelRatio), o3), borderBoxSize: ic(E2, M2, o3), contentBoxSize: ic(S2, T2, o3), contentRect: new qh(c2, u2, S2, T2) });
|
|
33378
|
+
return $h.set(t3, A2), A2;
|
|
33379
|
+
}, sc = function(t3, e3, n2) {
|
|
33380
|
+
var i2 = oc(t3, n2), r3 = i2.borderBoxSize, o3 = i2.contentBoxSize, s3 = i2.devicePixelContentBoxSize;
|
|
33279
33381
|
switch (e3) {
|
|
33280
|
-
case
|
|
33382
|
+
case Hh.DEVICE_PIXEL_CONTENT_BOX:
|
|
33281
33383
|
return s3;
|
|
33282
|
-
case
|
|
33384
|
+
case Hh.BORDER_BOX:
|
|
33283
33385
|
return r3;
|
|
33284
33386
|
default:
|
|
33285
33387
|
return o3;
|
|
33286
33388
|
}
|
|
33287
|
-
},
|
|
33288
|
-
var e3 =
|
|
33289
|
-
this.target = t3, this.contentRect = e3.contentRect, this.borderBoxSize =
|
|
33290
|
-
},
|
|
33291
|
-
if (
|
|
33389
|
+
}, ac = function(t3) {
|
|
33390
|
+
var e3 = oc(t3);
|
|
33391
|
+
this.target = t3, this.contentRect = e3.contentRect, this.borderBoxSize = Wh([e3.borderBoxSize]), this.contentBoxSize = Wh([e3.contentBoxSize]), this.devicePixelContentBoxSize = Wh([e3.devicePixelContentBoxSize]);
|
|
33392
|
+
}, uc = function(t3) {
|
|
33393
|
+
if (Zh(t3))
|
|
33292
33394
|
return 1 / 0;
|
|
33293
33395
|
for (var e3 = 0, n2 = t3.parentNode; n2; )
|
|
33294
33396
|
e3 += 1, n2 = n2.parentNode;
|
|
33295
33397
|
return e3;
|
|
33296
|
-
},
|
|
33398
|
+
}, lc = function() {
|
|
33297
33399
|
var t3 = 1 / 0, e3 = [];
|
|
33298
|
-
|
|
33400
|
+
zh.forEach(function(n3) {
|
|
33299
33401
|
if (n3.activeTargets.length !== 0) {
|
|
33300
33402
|
var i3 = [];
|
|
33301
33403
|
n3.activeTargets.forEach(function(e4) {
|
|
33302
|
-
var n4 = new
|
|
33303
|
-
i3.push(n4), e4.lastReportedSize =
|
|
33404
|
+
var n4 = new ac(e4.target), r3 = uc(e4.target);
|
|
33405
|
+
i3.push(n4), e4.lastReportedSize = sc(e4.target, e4.observedBox), r3 < t3 && (t3 = r3);
|
|
33304
33406
|
}), e3.push(function() {
|
|
33305
33407
|
n3.callback.call(n3.observer, i3, n3.observer);
|
|
33306
33408
|
}), n3.activeTargets.splice(0, n3.activeTargets.length);
|
|
@@ -33310,36 +33412,36 @@ void main() {
|
|
|
33310
33412
|
(0, i2[n2])();
|
|
33311
33413
|
}
|
|
33312
33414
|
return t3;
|
|
33313
|
-
},
|
|
33314
|
-
|
|
33415
|
+
}, hc = function(t3) {
|
|
33416
|
+
zh.forEach(function(e3) {
|
|
33315
33417
|
e3.activeTargets.splice(0, e3.activeTargets.length), e3.skippedTargets.splice(0, e3.skippedTargets.length), e3.observationTargets.forEach(function(n2) {
|
|
33316
|
-
n2.isActive() && (
|
|
33418
|
+
n2.isActive() && (uc(n2.target) > t3 ? e3.activeTargets.push(n2) : e3.skippedTargets.push(n2));
|
|
33317
33419
|
});
|
|
33318
33420
|
});
|
|
33319
|
-
},
|
|
33421
|
+
}, cc = function() {
|
|
33320
33422
|
var t3, e3 = 0;
|
|
33321
|
-
for (
|
|
33423
|
+
for (hc(e3); zh.some(function(t4) {
|
|
33322
33424
|
return t4.activeTargets.length > 0;
|
|
33323
33425
|
}); )
|
|
33324
|
-
e3 =
|
|
33325
|
-
return
|
|
33426
|
+
e3 = lc(), hc(e3);
|
|
33427
|
+
return zh.some(function(t4) {
|
|
33326
33428
|
return t4.skippedTargets.length > 0;
|
|
33327
|
-
}) && (typeof ErrorEvent == "function" ? t3 = new ErrorEvent("error", { message:
|
|
33328
|
-
},
|
|
33329
|
-
if (!
|
|
33429
|
+
}) && (typeof ErrorEvent == "function" ? t3 = new ErrorEvent("error", { message: jh }) : ((t3 = document.createEvent("Event")).initEvent("error", false, false), t3.message = jh), window.dispatchEvent(t3)), e3 > 0;
|
|
33430
|
+
}, dc = [], pc = function(t3) {
|
|
33431
|
+
if (!Vh) {
|
|
33330
33432
|
var e3 = 0, n2 = document.createTextNode("");
|
|
33331
33433
|
new MutationObserver(function() {
|
|
33332
|
-
return
|
|
33434
|
+
return dc.splice(0).forEach(function(t4) {
|
|
33333
33435
|
return t4();
|
|
33334
33436
|
});
|
|
33335
|
-
}).observe(n2, { characterData: true }),
|
|
33437
|
+
}).observe(n2, { characterData: true }), Vh = function() {
|
|
33336
33438
|
n2.textContent = "" + (e3 ? e3-- : e3++);
|
|
33337
33439
|
};
|
|
33338
33440
|
}
|
|
33339
|
-
|
|
33340
|
-
},
|
|
33441
|
+
dc.push(t3), Vh();
|
|
33442
|
+
}, fc = 0, mc = { attributes: true, characterData: true, childList: true, subtree: true }, gc = ["resize", "load", "transitionend", "animationend", "animationstart", "animationiteration", "keyup", "keydown", "mouseup", "mousedown", "mouseover", "mouseout", "blur", "focus"], vc = function(t3) {
|
|
33341
33443
|
return t3 === void 0 && (t3 = 0), Date.now() + t3;
|
|
33342
|
-
},
|
|
33444
|
+
}, _c = false, yc = new (function() {
|
|
33343
33445
|
function t3() {
|
|
33344
33446
|
var t4 = this;
|
|
33345
33447
|
this.stopped = true, this.listener = function() {
|
|
@@ -33348,19 +33450,19 @@ void main() {
|
|
|
33348
33450
|
}
|
|
33349
33451
|
return t3.prototype.run = function(t4) {
|
|
33350
33452
|
var e3 = this;
|
|
33351
|
-
if (t4 === void 0 && (t4 = 250), !
|
|
33352
|
-
|
|
33353
|
-
var n2, i2 =
|
|
33453
|
+
if (t4 === void 0 && (t4 = 250), !_c) {
|
|
33454
|
+
_c = true;
|
|
33455
|
+
var n2, i2 = vc(t4);
|
|
33354
33456
|
n2 = function() {
|
|
33355
33457
|
var n3 = false;
|
|
33356
33458
|
try {
|
|
33357
|
-
n3 =
|
|
33459
|
+
n3 = cc();
|
|
33358
33460
|
} finally {
|
|
33359
|
-
if (
|
|
33461
|
+
if (_c = false, t4 = i2 - vc(), !fc)
|
|
33360
33462
|
return;
|
|
33361
33463
|
n3 ? e3.run(1e3) : t4 > 0 ? e3.run(t4) : e3.start();
|
|
33362
33464
|
}
|
|
33363
|
-
},
|
|
33465
|
+
}, pc(function() {
|
|
33364
33466
|
requestAnimationFrame(n2);
|
|
33365
33467
|
});
|
|
33366
33468
|
}
|
|
@@ -33368,29 +33470,29 @@ void main() {
|
|
|
33368
33470
|
this.stop(), this.run();
|
|
33369
33471
|
}, t3.prototype.observe = function() {
|
|
33370
33472
|
var t4 = this, e3 = function() {
|
|
33371
|
-
return t4.observer && t4.observer.observe(document.body,
|
|
33473
|
+
return t4.observer && t4.observer.observe(document.body, mc);
|
|
33372
33474
|
};
|
|
33373
|
-
document.body ? e3() :
|
|
33475
|
+
document.body ? e3() : Kh.addEventListener("DOMContentLoaded", e3);
|
|
33374
33476
|
}, t3.prototype.start = function() {
|
|
33375
33477
|
var t4 = this;
|
|
33376
|
-
this.stopped && (this.stopped = false, this.observer = new MutationObserver(this.listener), this.observe(),
|
|
33377
|
-
return
|
|
33478
|
+
this.stopped && (this.stopped = false, this.observer = new MutationObserver(this.listener), this.observe(), gc.forEach(function(e3) {
|
|
33479
|
+
return Kh.addEventListener(e3, t4.listener, true);
|
|
33378
33480
|
}));
|
|
33379
33481
|
}, t3.prototype.stop = function() {
|
|
33380
33482
|
var t4 = this;
|
|
33381
|
-
this.stopped || (this.observer && this.observer.disconnect(),
|
|
33382
|
-
return
|
|
33483
|
+
this.stopped || (this.observer && this.observer.disconnect(), gc.forEach(function(e3) {
|
|
33484
|
+
return Kh.removeEventListener(e3, t4.listener, true);
|
|
33383
33485
|
}), this.stopped = true);
|
|
33384
33486
|
}, t3;
|
|
33385
|
-
}())(),
|
|
33386
|
-
!
|
|
33387
|
-
},
|
|
33487
|
+
}())(), xc = function(t3) {
|
|
33488
|
+
!fc && t3 > 0 && yc.start(), !(fc += t3) && yc.stop();
|
|
33489
|
+
}, bc = function() {
|
|
33388
33490
|
function t3(t4, e3) {
|
|
33389
|
-
this.target = t4, this.observedBox = e3 ||
|
|
33491
|
+
this.target = t4, this.observedBox = e3 || Hh.CONTENT_BOX, this.lastReportedSize = { inlineSize: 0, blockSize: 0 };
|
|
33390
33492
|
}
|
|
33391
33493
|
return t3.prototype.isActive = function() {
|
|
33392
|
-
var t4, e3 =
|
|
33393
|
-
return t4 = this.target,
|
|
33494
|
+
var t4, e3 = sc(this.target, this.observedBox, true);
|
|
33495
|
+
return t4 = this.target, Yh(t4) || function(t5) {
|
|
33394
33496
|
switch (t5.tagName) {
|
|
33395
33497
|
case "INPUT":
|
|
33396
33498
|
if (t5.type !== "image")
|
|
@@ -33407,57 +33509,57 @@ void main() {
|
|
|
33407
33509
|
return false;
|
|
33408
33510
|
}(t4) || getComputedStyle(t4).display !== "inline" || (this.lastReportedSize = e3), this.lastReportedSize.inlineSize !== e3.inlineSize || this.lastReportedSize.blockSize !== e3.blockSize;
|
|
33409
33511
|
}, t3;
|
|
33410
|
-
}(),
|
|
33512
|
+
}(), wc = function(t3, e3) {
|
|
33411
33513
|
this.activeTargets = [], this.skippedTargets = [], this.observationTargets = [], this.observer = t3, this.callback = e3;
|
|
33412
|
-
},
|
|
33514
|
+
}, Sc = new WeakMap(), Tc = function(t3, e3) {
|
|
33413
33515
|
for (var n2 = 0; n2 < t3.length; n2 += 1)
|
|
33414
33516
|
if (t3[n2].target === e3)
|
|
33415
33517
|
return n2;
|
|
33416
33518
|
return -1;
|
|
33417
|
-
},
|
|
33519
|
+
}, Ec = function() {
|
|
33418
33520
|
function t3() {
|
|
33419
33521
|
}
|
|
33420
33522
|
return t3.connect = function(t4, e3) {
|
|
33421
|
-
var n2 = new
|
|
33422
|
-
|
|
33523
|
+
var n2 = new wc(t4, e3);
|
|
33524
|
+
Sc.set(t4, n2);
|
|
33423
33525
|
}, t3.observe = function(t4, e3, n2) {
|
|
33424
|
-
var i2 =
|
|
33425
|
-
|
|
33526
|
+
var i2 = Sc.get(t4), r3 = i2.observationTargets.length === 0;
|
|
33527
|
+
Tc(i2.observationTargets, e3) < 0 && (r3 && zh.push(i2), i2.observationTargets.push(new bc(e3, n2 && n2.box)), xc(1), yc.schedule());
|
|
33426
33528
|
}, t3.unobserve = function(t4, e3) {
|
|
33427
|
-
var n2 =
|
|
33428
|
-
i2 >= 0 && (r3 &&
|
|
33529
|
+
var n2 = Sc.get(t4), i2 = Tc(n2.observationTargets, e3), r3 = n2.observationTargets.length === 1;
|
|
33530
|
+
i2 >= 0 && (r3 && zh.splice(zh.indexOf(n2), 1), n2.observationTargets.splice(i2, 1), xc(-1));
|
|
33429
33531
|
}, t3.disconnect = function(t4) {
|
|
33430
|
-
var e3 = this, n2 =
|
|
33532
|
+
var e3 = this, n2 = Sc.get(t4);
|
|
33431
33533
|
n2.observationTargets.slice().forEach(function(n3) {
|
|
33432
33534
|
return e3.unobserve(t4, n3.target);
|
|
33433
33535
|
}), n2.activeTargets.splice(0, n2.activeTargets.length);
|
|
33434
33536
|
}, t3;
|
|
33435
|
-
}(),
|
|
33537
|
+
}(), Mc = function() {
|
|
33436
33538
|
function t3(t4) {
|
|
33437
33539
|
if (arguments.length === 0)
|
|
33438
33540
|
throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");
|
|
33439
33541
|
if (typeof t4 != "function")
|
|
33440
33542
|
throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");
|
|
33441
|
-
|
|
33543
|
+
Ec.connect(this, t4);
|
|
33442
33544
|
}
|
|
33443
33545
|
return t3.prototype.observe = function(t4, e3) {
|
|
33444
33546
|
if (arguments.length === 0)
|
|
33445
33547
|
throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");
|
|
33446
|
-
if (!
|
|
33548
|
+
if (!Jh(t4))
|
|
33447
33549
|
throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");
|
|
33448
|
-
|
|
33550
|
+
Ec.observe(this, t4, e3);
|
|
33449
33551
|
}, t3.prototype.unobserve = function(t4) {
|
|
33450
33552
|
if (arguments.length === 0)
|
|
33451
33553
|
throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");
|
|
33452
|
-
if (!
|
|
33554
|
+
if (!Jh(t4))
|
|
33453
33555
|
throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");
|
|
33454
|
-
|
|
33556
|
+
Ec.unobserve(this, t4);
|
|
33455
33557
|
}, t3.prototype.disconnect = function() {
|
|
33456
|
-
|
|
33558
|
+
Ec.disconnect(this);
|
|
33457
33559
|
}, t3.toString = function() {
|
|
33458
33560
|
return "function ResizeObserver () { [polyfill code] }";
|
|
33459
33561
|
}, t3;
|
|
33460
|
-
}(),
|
|
33562
|
+
}(), Ac = function(t3, e3, n2, i2) {
|
|
33461
33563
|
return new (n2 || (n2 = Promise))(function(r3, o3) {
|
|
33462
33564
|
function s3(t4) {
|
|
33463
33565
|
try {
|
|
@@ -33481,7 +33583,7 @@ void main() {
|
|
|
33481
33583
|
}
|
|
33482
33584
|
u2((i2 = i2.apply(t3, e3 || [])).next());
|
|
33483
33585
|
});
|
|
33484
|
-
},
|
|
33586
|
+
}, Pc = function(t3, e3) {
|
|
33485
33587
|
var n2, i2, r3, o3, s3 = { label: 0, sent: function() {
|
|
33486
33588
|
if (1 & r3[0])
|
|
33487
33589
|
throw r3[1];
|
|
@@ -33544,14 +33646,14 @@ void main() {
|
|
|
33544
33646
|
}([o4, a3]);
|
|
33545
33647
|
};
|
|
33546
33648
|
}
|
|
33547
|
-
},
|
|
33649
|
+
}, Cc = function() {
|
|
33548
33650
|
function t3(t4, e3, n2, i2, r3) {
|
|
33549
33651
|
this.state = "idle", this.index = -1, this.slideIndex = -1, this.fn = n2, this.index = t4, this.slideIndex = e3, this.eventHub = i2, this.id = r3;
|
|
33550
33652
|
}
|
|
33551
33653
|
return t3.prototype.apply = function() {
|
|
33552
|
-
return
|
|
33654
|
+
return Ac(this, void 0, void 0, function() {
|
|
33553
33655
|
var t4;
|
|
33554
|
-
return
|
|
33656
|
+
return Pc(this, function(e3) {
|
|
33555
33657
|
switch (e3.label) {
|
|
33556
33658
|
case 0:
|
|
33557
33659
|
this.eventHub.emit("task-start", this), e3.label = 1;
|
|
@@ -33567,7 +33669,7 @@ void main() {
|
|
|
33567
33669
|
});
|
|
33568
33670
|
});
|
|
33569
33671
|
}, t3;
|
|
33570
|
-
}(),
|
|
33672
|
+
}(), Rc = function() {
|
|
33571
33673
|
function t3() {
|
|
33572
33674
|
var t4 = this;
|
|
33573
33675
|
this.eventHub = new s2.a(), this.tasks = [], this.index = 0, this.eventHub.on("task-end", function(e3) {
|
|
@@ -33589,7 +33691,7 @@ void main() {
|
|
|
33589
33691
|
e3.tasks.splice(t5, 1);
|
|
33590
33692
|
});
|
|
33591
33693
|
}, t3.prototype.addTask = function(t4, e3, n2) {
|
|
33592
|
-
var i2 = new
|
|
33694
|
+
var i2 = new Cc(this.index++, e3, t4, this.eventHub, n2);
|
|
33593
33695
|
this.tasks.push(i2), this.tasks.sort(function(t5, e4) {
|
|
33594
33696
|
return t5.index - e4.index;
|
|
33595
33697
|
}), this.replaceIdleTask(), this.tasks.length === 1 && i2.apply();
|
|
@@ -33599,7 +33701,7 @@ void main() {
|
|
|
33599
33701
|
});
|
|
33600
33702
|
}, t3;
|
|
33601
33703
|
}();
|
|
33602
|
-
function
|
|
33704
|
+
function Ic(t3, e3) {
|
|
33603
33705
|
var n2 = t3.__state.conversionName.toString(), i2 = Math.round(t3.r), r3 = Math.round(t3.g), o3 = Math.round(t3.b), s3 = t3.a, a2 = Math.round(t3.h), u2 = t3.s.toFixed(1), l2 = t3.v.toFixed(1);
|
|
33604
33706
|
if (e3 || n2 === "THREE_CHAR_HEX" || n2 === "SIX_CHAR_HEX") {
|
|
33605
33707
|
for (var h2 = t3.hex.toString(16); h2.length < 6; )
|
|
@@ -33608,28 +33710,28 @@ void main() {
|
|
|
33608
33710
|
}
|
|
33609
33711
|
return n2 === "CSS_RGB" ? "rgb(" + i2 + "," + r3 + "," + o3 + ")" : n2 === "CSS_RGBA" ? "rgba(" + i2 + "," + r3 + "," + o3 + "," + s3 + ")" : n2 === "HEX" ? "0x" + t3.hex.toString(16) : n2 === "RGB_ARRAY" ? "[" + i2 + "," + r3 + "," + o3 + "]" : n2 === "RGBA_ARRAY" ? "[" + i2 + "," + r3 + "," + o3 + "," + s3 + "]" : n2 === "RGB_OBJ" ? "{r:" + i2 + ",g:" + r3 + ",b:" + o3 + "}" : n2 === "RGBA_OBJ" ? "{r:" + i2 + ",g:" + r3 + ",b:" + o3 + ",a:" + s3 + "}" : n2 === "HSV_OBJ" ? "{h:" + a2 + ",s:" + u2 + ",v:" + l2 + "}" : n2 === "HSVA_OBJ" ? "{h:" + a2 + ",s:" + u2 + ",v:" + l2 + ",a:" + s3 + "}" : "unknown format";
|
|
33610
33712
|
}
|
|
33611
|
-
var
|
|
33612
|
-
return this.each(
|
|
33713
|
+
var Lc = Array.prototype.forEach, Oc = Array.prototype.slice, Dc = { BREAK: {}, extend: function(t3) {
|
|
33714
|
+
return this.each(Oc.call(arguments, 1), function(e3) {
|
|
33613
33715
|
(this.isObject(e3) ? Object.keys(e3) : []).forEach(function(n2) {
|
|
33614
33716
|
this.isUndefined(e3[n2]) || (t3[n2] = e3[n2]);
|
|
33615
33717
|
}.bind(this));
|
|
33616
33718
|
}, this), t3;
|
|
33617
33719
|
}, defaults: function(t3) {
|
|
33618
|
-
return this.each(
|
|
33720
|
+
return this.each(Oc.call(arguments, 1), function(e3) {
|
|
33619
33721
|
(this.isObject(e3) ? Object.keys(e3) : []).forEach(function(n2) {
|
|
33620
33722
|
this.isUndefined(t3[n2]) && (t3[n2] = e3[n2]);
|
|
33621
33723
|
}.bind(this));
|
|
33622
33724
|
}, this), t3;
|
|
33623
33725
|
}, compose: function() {
|
|
33624
|
-
var t3 =
|
|
33726
|
+
var t3 = Oc.call(arguments);
|
|
33625
33727
|
return function() {
|
|
33626
|
-
for (var e3 =
|
|
33728
|
+
for (var e3 = Oc.call(arguments), n2 = t3.length - 1; n2 >= 0; n2--)
|
|
33627
33729
|
e3 = [t3[n2].apply(this, e3)];
|
|
33628
33730
|
return e3[0];
|
|
33629
33731
|
};
|
|
33630
33732
|
}, each: function(t3, e3, n2) {
|
|
33631
33733
|
if (t3) {
|
|
33632
|
-
if (
|
|
33734
|
+
if (Lc && t3.forEach && t3.forEach === Lc)
|
|
33633
33735
|
t3.forEach(e3, n2);
|
|
33634
33736
|
else if (t3.length === t3.length + 0) {
|
|
33635
33737
|
var i2, r3 = void 0;
|
|
@@ -33654,7 +33756,7 @@ void main() {
|
|
|
33654
33756
|
clearTimeout(i2), i2 = setTimeout(s3, e3), a2 && t3.apply(r3, o3);
|
|
33655
33757
|
};
|
|
33656
33758
|
}, toArray: function(t3) {
|
|
33657
|
-
return t3.toArray ? t3.toArray() :
|
|
33759
|
+
return t3.toArray ? t3.toArray() : Oc.call(t3);
|
|
33658
33760
|
}, isUndefined: function(t3) {
|
|
33659
33761
|
return t3 === void 0;
|
|
33660
33762
|
}, isNull: function(t3) {
|
|
@@ -33680,23 +33782,23 @@ void main() {
|
|
|
33680
33782
|
return t3 === false || t3 === true;
|
|
33681
33783
|
}, isFunction: function(t3) {
|
|
33682
33784
|
return t3 instanceof Function;
|
|
33683
|
-
} },
|
|
33785
|
+
} }, Nc = [{ litmus: Dc.isString, conversions: { THREE_CHAR_HEX: { read: function(t3) {
|
|
33684
33786
|
var e3 = t3.match(/^#([A-F0-9])([A-F0-9])([A-F0-9])$/i);
|
|
33685
33787
|
return e3 !== null && { space: "HEX", hex: parseInt("0x" + e3[1].toString() + e3[1].toString() + e3[2].toString() + e3[2].toString() + e3[3].toString() + e3[3].toString(), 0) };
|
|
33686
|
-
}, write:
|
|
33788
|
+
}, write: Ic }, SIX_CHAR_HEX: { read: function(t3) {
|
|
33687
33789
|
var e3 = t3.match(/^#([A-F0-9]{6})$/i);
|
|
33688
33790
|
return e3 !== null && { space: "HEX", hex: parseInt("0x" + e3[1].toString(), 0) };
|
|
33689
|
-
}, write:
|
|
33791
|
+
}, write: Ic }, CSS_RGB: { read: function(t3) {
|
|
33690
33792
|
var e3 = t3.match(/^rgb\(\s*(.+)\s*,\s*(.+)\s*,\s*(.+)\s*\)/);
|
|
33691
33793
|
return e3 !== null && { space: "RGB", r: parseFloat(e3[1]), g: parseFloat(e3[2]), b: parseFloat(e3[3]) };
|
|
33692
|
-
}, write:
|
|
33794
|
+
}, write: Ic }, CSS_RGBA: { read: function(t3) {
|
|
33693
33795
|
var e3 = t3.match(/^rgba\(\s*(.+)\s*,\s*(.+)\s*,\s*(.+)\s*,\s*(.+)\s*\)/);
|
|
33694
33796
|
return e3 !== null && { space: "RGB", r: parseFloat(e3[1]), g: parseFloat(e3[2]), b: parseFloat(e3[3]), a: parseFloat(e3[4]) };
|
|
33695
|
-
}, write:
|
|
33797
|
+
}, write: Ic } } }, { litmus: Dc.isNumber, conversions: { HEX: { read: function(t3) {
|
|
33696
33798
|
return { space: "HEX", hex: t3, conversionName: "HEX" };
|
|
33697
33799
|
}, write: function(t3) {
|
|
33698
33800
|
return t3.hex;
|
|
33699
|
-
} } } }, { litmus:
|
|
33801
|
+
} } } }, { litmus: Dc.isArray, conversions: { RGB_ARRAY: { read: function(t3) {
|
|
33700
33802
|
return t3.length === 3 && { space: "RGB", r: t3[0], g: t3[1], b: t3[2] };
|
|
33701
33803
|
}, write: function(t3) {
|
|
33702
33804
|
return [t3.r, t3.g, t3.b];
|
|
@@ -33704,33 +33806,33 @@ void main() {
|
|
|
33704
33806
|
return t3.length === 4 && { space: "RGB", r: t3[0], g: t3[1], b: t3[2], a: t3[3] };
|
|
33705
33807
|
}, write: function(t3) {
|
|
33706
33808
|
return [t3.r, t3.g, t3.b, t3.a];
|
|
33707
|
-
} } } }, { litmus:
|
|
33708
|
-
return !!(
|
|
33809
|
+
} } } }, { litmus: Dc.isObject, conversions: { RGBA_OBJ: { read: function(t3) {
|
|
33810
|
+
return !!(Dc.isNumber(t3.r) && Dc.isNumber(t3.g) && Dc.isNumber(t3.b) && Dc.isNumber(t3.a)) && { space: "RGB", r: t3.r, g: t3.g, b: t3.b, a: t3.a };
|
|
33709
33811
|
}, write: function(t3) {
|
|
33710
33812
|
return { r: t3.r, g: t3.g, b: t3.b, a: t3.a };
|
|
33711
33813
|
} }, RGB_OBJ: { read: function(t3) {
|
|
33712
|
-
return !!(
|
|
33814
|
+
return !!(Dc.isNumber(t3.r) && Dc.isNumber(t3.g) && Dc.isNumber(t3.b)) && { space: "RGB", r: t3.r, g: t3.g, b: t3.b };
|
|
33713
33815
|
}, write: function(t3) {
|
|
33714
33816
|
return { r: t3.r, g: t3.g, b: t3.b };
|
|
33715
33817
|
} }, HSVA_OBJ: { read: function(t3) {
|
|
33716
|
-
return !!(
|
|
33818
|
+
return !!(Dc.isNumber(t3.h) && Dc.isNumber(t3.s) && Dc.isNumber(t3.v) && Dc.isNumber(t3.a)) && { space: "HSV", h: t3.h, s: t3.s, v: t3.v, a: t3.a };
|
|
33717
33819
|
}, write: function(t3) {
|
|
33718
33820
|
return { h: t3.h, s: t3.s, v: t3.v, a: t3.a };
|
|
33719
33821
|
} }, HSV_OBJ: { read: function(t3) {
|
|
33720
|
-
return !!(
|
|
33822
|
+
return !!(Dc.isNumber(t3.h) && Dc.isNumber(t3.s) && Dc.isNumber(t3.v)) && { space: "HSV", h: t3.h, s: t3.s, v: t3.v };
|
|
33721
33823
|
}, write: function(t3) {
|
|
33722
33824
|
return { h: t3.h, s: t3.s, v: t3.v };
|
|
33723
|
-
} } } }],
|
|
33724
|
-
|
|
33725
|
-
var t3 = arguments.length > 1 ?
|
|
33726
|
-
return
|
|
33825
|
+
} } } }], Fc = void 0, Bc = void 0, kc = function() {
|
|
33826
|
+
Bc = false;
|
|
33827
|
+
var t3 = arguments.length > 1 ? Dc.toArray(arguments) : arguments[0];
|
|
33828
|
+
return Dc.each(Nc, function(e3) {
|
|
33727
33829
|
if (e3.litmus(t3))
|
|
33728
|
-
return
|
|
33729
|
-
if (
|
|
33730
|
-
return
|
|
33731
|
-
}),
|
|
33732
|
-
}),
|
|
33733
|
-
},
|
|
33830
|
+
return Dc.each(e3.conversions, function(e4, n2) {
|
|
33831
|
+
if (Fc = e4.read(t3), Bc === false && Fc !== false)
|
|
33832
|
+
return Bc = Fc, Fc.conversionName = n2, Fc.conversion = e4, Dc.BREAK;
|
|
33833
|
+
}), Dc.BREAK;
|
|
33834
|
+
}), Bc;
|
|
33835
|
+
}, Uc = void 0, Gc = { hsv_to_rgb: function(t3, e3, n2) {
|
|
33734
33836
|
var i2 = Math.floor(t3 / 60) % 6, r3 = t3 / 60 - Math.floor(t3 / 60), o3 = n2 * (1 - e3), s3 = n2 * (1 - r3 * e3), a2 = n2 * (1 - (1 - r3) * e3), u2 = [[n2, a2, o3], [s3, n2, o3], [o3, n2, a2], [o3, s3, n2], [a2, o3, n2], [n2, o3, s3]][i2];
|
|
33735
33837
|
return { r: 255 * u2[0], g: 255 * u2[1], b: 255 * u2[2] };
|
|
33736
33838
|
}, rgb_to_hsv: function(t3, e3, n2) {
|
|
@@ -33742,15 +33844,15 @@ void main() {
|
|
|
33742
33844
|
}, component_from_hex: function(t3, e3) {
|
|
33743
33845
|
return t3 >> 8 * e3 & 255;
|
|
33744
33846
|
}, hex_with_component: function(t3, e3, n2) {
|
|
33745
|
-
return n2 << (
|
|
33746
|
-
} },
|
|
33847
|
+
return n2 << (Uc = 8 * e3) | t3 & ~(255 << Uc);
|
|
33848
|
+
} }, Hc = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t3) {
|
|
33747
33849
|
return typeof t3;
|
|
33748
33850
|
} : function(t3) {
|
|
33749
33851
|
return t3 && typeof Symbol == "function" && t3.constructor === Symbol && t3 !== Symbol.prototype ? "symbol" : typeof t3;
|
|
33750
|
-
},
|
|
33852
|
+
}, zc = function(t3, e3) {
|
|
33751
33853
|
if (!(t3 instanceof e3))
|
|
33752
33854
|
throw new TypeError("Cannot call a class as a function");
|
|
33753
|
-
},
|
|
33855
|
+
}, jc = function() {
|
|
33754
33856
|
function t3(t4, e3) {
|
|
33755
33857
|
for (var n2 = 0; n2 < e3.length; n2++) {
|
|
33756
33858
|
var i2 = e3[n2];
|
|
@@ -33760,7 +33862,7 @@ void main() {
|
|
|
33760
33862
|
return function(e3, n2, i2) {
|
|
33761
33863
|
return n2 && t3(e3.prototype, n2), i2 && t3(e3, i2), e3;
|
|
33762
33864
|
};
|
|
33763
|
-
}(),
|
|
33865
|
+
}(), Vc = function t3(e3, n2, i2) {
|
|
33764
33866
|
e3 === null && (e3 = Function.prototype);
|
|
33765
33867
|
var r3 = Object.getOwnPropertyDescriptor(e3, n2);
|
|
33766
33868
|
if (r3 === void 0) {
|
|
@@ -33771,67 +33873,67 @@ void main() {
|
|
|
33771
33873
|
return r3.value;
|
|
33772
33874
|
var s3 = r3.get;
|
|
33773
33875
|
return s3 !== void 0 ? s3.call(i2) : void 0;
|
|
33774
|
-
},
|
|
33876
|
+
}, Wc = function(t3, e3) {
|
|
33775
33877
|
if (typeof e3 != "function" && e3 !== null)
|
|
33776
33878
|
throw new TypeError("Super expression must either be null or a function, not " + typeof e3);
|
|
33777
33879
|
t3.prototype = Object.create(e3 && e3.prototype, { constructor: { value: t3, enumerable: false, writable: true, configurable: true } }), e3 && (Object.setPrototypeOf ? Object.setPrototypeOf(t3, e3) : t3.__proto__ = e3);
|
|
33778
|
-
},
|
|
33880
|
+
}, Xc = function(t3, e3) {
|
|
33779
33881
|
if (!t3)
|
|
33780
33882
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
33781
33883
|
return !e3 || typeof e3 != "object" && typeof e3 != "function" ? t3 : e3;
|
|
33782
|
-
},
|
|
33884
|
+
}, qc = function() {
|
|
33783
33885
|
function t3() {
|
|
33784
|
-
if (
|
|
33886
|
+
if (zc(this, t3), this.__state = kc.apply(this, arguments), this.__state === false)
|
|
33785
33887
|
throw new Error("Failed to interpret color arguments");
|
|
33786
33888
|
this.__state.a = this.__state.a || 1;
|
|
33787
33889
|
}
|
|
33788
|
-
return
|
|
33789
|
-
return
|
|
33890
|
+
return jc(t3, [{ key: "toString", value: function() {
|
|
33891
|
+
return Ic(this);
|
|
33790
33892
|
} }, { key: "toHexString", value: function() {
|
|
33791
|
-
return
|
|
33893
|
+
return Ic(this, true);
|
|
33792
33894
|
} }, { key: "toOriginal", value: function() {
|
|
33793
33895
|
return this.__state.conversion.write(this);
|
|
33794
33896
|
} }]), t3;
|
|
33795
33897
|
}();
|
|
33796
|
-
function
|
|
33898
|
+
function Yc(t3, e3, n2) {
|
|
33797
33899
|
Object.defineProperty(t3, e3, { get: function() {
|
|
33798
|
-
return this.__state.space === "RGB" ||
|
|
33900
|
+
return this.__state.space === "RGB" || qc.recalculateRGB(this, e3, n2), this.__state[e3];
|
|
33799
33901
|
}, set: function(t4) {
|
|
33800
|
-
this.__state.space !== "RGB" && (
|
|
33902
|
+
this.__state.space !== "RGB" && (qc.recalculateRGB(this, e3, n2), this.__state.space = "RGB"), this.__state[e3] = t4;
|
|
33801
33903
|
} });
|
|
33802
33904
|
}
|
|
33803
|
-
function
|
|
33905
|
+
function Zc(t3, e3) {
|
|
33804
33906
|
Object.defineProperty(t3, e3, { get: function() {
|
|
33805
|
-
return this.__state.space === "HSV" ||
|
|
33907
|
+
return this.__state.space === "HSV" || qc.recalculateHSV(this), this.__state[e3];
|
|
33806
33908
|
}, set: function(t4) {
|
|
33807
|
-
this.__state.space !== "HSV" && (
|
|
33909
|
+
this.__state.space !== "HSV" && (qc.recalculateHSV(this), this.__state.space = "HSV"), this.__state[e3] = t4;
|
|
33808
33910
|
} });
|
|
33809
33911
|
}
|
|
33810
|
-
|
|
33912
|
+
qc.recalculateRGB = function(t3, e3, n2) {
|
|
33811
33913
|
if (t3.__state.space === "HEX")
|
|
33812
|
-
t3.__state[e3] =
|
|
33914
|
+
t3.__state[e3] = Gc.component_from_hex(t3.__state.hex, n2);
|
|
33813
33915
|
else {
|
|
33814
33916
|
if (t3.__state.space !== "HSV")
|
|
33815
33917
|
throw new Error("Corrupted color state");
|
|
33816
|
-
|
|
33918
|
+
Dc.extend(t3.__state, Gc.hsv_to_rgb(t3.__state.h, t3.__state.s, t3.__state.v));
|
|
33817
33919
|
}
|
|
33818
|
-
},
|
|
33819
|
-
var e3 =
|
|
33820
|
-
|
|
33821
|
-
},
|
|
33920
|
+
}, qc.recalculateHSV = function(t3) {
|
|
33921
|
+
var e3 = Gc.rgb_to_hsv(t3.r, t3.g, t3.b);
|
|
33922
|
+
Dc.extend(t3.__state, { s: e3.s, v: e3.v }), Dc.isNaN(e3.h) ? Dc.isUndefined(t3.__state.h) && (t3.__state.h = 0) : t3.__state.h = e3.h;
|
|
33923
|
+
}, qc.COMPONENTS = ["r", "g", "b", "h", "s", "v", "hex", "a"], Yc(qc.prototype, "r", 2), Yc(qc.prototype, "g", 1), Yc(qc.prototype, "b", 0), Zc(qc.prototype, "h"), Zc(qc.prototype, "s"), Zc(qc.prototype, "v"), Object.defineProperty(qc.prototype, "a", { get: function() {
|
|
33822
33924
|
return this.__state.a;
|
|
33823
33925
|
}, set: function(t3) {
|
|
33824
33926
|
this.__state.a = t3;
|
|
33825
|
-
} }), Object.defineProperty(
|
|
33826
|
-
return this.__state.space !== "HEX" && (this.__state.hex =
|
|
33927
|
+
} }), Object.defineProperty(qc.prototype, "hex", { get: function() {
|
|
33928
|
+
return this.__state.space !== "HEX" && (this.__state.hex = Gc.rgb_to_hex(this.r, this.g, this.b), this.__state.space = "HEX"), this.__state.hex;
|
|
33827
33929
|
}, set: function(t3) {
|
|
33828
33930
|
this.__state.space = "HEX", this.__state.hex = t3;
|
|
33829
33931
|
} });
|
|
33830
|
-
var
|
|
33932
|
+
var Jc = function() {
|
|
33831
33933
|
function t3(e3, n2) {
|
|
33832
|
-
|
|
33934
|
+
zc(this, t3), this.initialValue = e3[n2], this.domElement = document.createElement("div"), this.object = e3, this.property = n2, this.__onChange = void 0, this.__onFinishChange = void 0;
|
|
33833
33935
|
}
|
|
33834
|
-
return
|
|
33936
|
+
return jc(t3, [{ key: "onChange", value: function(t4) {
|
|
33835
33937
|
return this.__onChange = t4, this;
|
|
33836
33938
|
} }, { key: "onFinishChange", value: function(t4) {
|
|
33837
33939
|
return this.__onFinishChange = t4, this;
|
|
@@ -33844,29 +33946,29 @@ void main() {
|
|
|
33844
33946
|
} }, { key: "isModified", value: function() {
|
|
33845
33947
|
return this.initialValue !== this.getValue();
|
|
33846
33948
|
} }]), t3;
|
|
33847
|
-
}(),
|
|
33848
|
-
|
|
33849
|
-
|
|
33850
|
-
|
|
33949
|
+
}(), Kc = {};
|
|
33950
|
+
Dc.each({ HTMLEvents: ["change"], MouseEvents: ["click", "mousemove", "mousedown", "mouseup", "mouseover"], KeyboardEvents: ["keydown"] }, function(t3, e3) {
|
|
33951
|
+
Dc.each(t3, function(t4) {
|
|
33952
|
+
Kc[t4] = e3;
|
|
33851
33953
|
});
|
|
33852
33954
|
});
|
|
33853
|
-
var
|
|
33854
|
-
function
|
|
33855
|
-
if (t3 === "0" ||
|
|
33955
|
+
var $c = /(\d+(\.\d+)?)px/;
|
|
33956
|
+
function Qc(t3) {
|
|
33957
|
+
if (t3 === "0" || Dc.isUndefined(t3))
|
|
33856
33958
|
return 0;
|
|
33857
|
-
var e3 = t3.match(
|
|
33858
|
-
return
|
|
33959
|
+
var e3 = t3.match($c);
|
|
33960
|
+
return Dc.isNull(e3) ? 0 : parseFloat(e3[1]);
|
|
33859
33961
|
}
|
|
33860
|
-
var
|
|
33962
|
+
var td = { makeSelectable: function(t3, e3) {
|
|
33861
33963
|
t3 !== void 0 && t3.style !== void 0 && (t3.onselectstart = e3 ? function() {
|
|
33862
33964
|
return false;
|
|
33863
33965
|
} : function() {
|
|
33864
33966
|
}, t3.style.MozUserSelect = e3 ? "auto" : "none", t3.style.KhtmlUserSelect = e3 ? "auto" : "none", t3.unselectable = e3 ? "on" : "off");
|
|
33865
33967
|
}, makeFullscreen: function(t3, e3, n2) {
|
|
33866
33968
|
var i2 = n2, r3 = e3;
|
|
33867
|
-
|
|
33969
|
+
Dc.isUndefined(r3) && (r3 = true), Dc.isUndefined(i2) && (i2 = true), t3.style.position = "absolute", r3 && (t3.style.left = 0, t3.style.right = 0), i2 && (t3.style.top = 0, t3.style.bottom = 0);
|
|
33868
33970
|
}, fakeEvent: function(t3, e3, n2, i2) {
|
|
33869
|
-
var r3 = n2 || {}, o3 =
|
|
33971
|
+
var r3 = n2 || {}, o3 = Kc[e3];
|
|
33870
33972
|
if (!o3)
|
|
33871
33973
|
throw new Error("Event type " + e3 + " not supported.");
|
|
33872
33974
|
var s3 = document.createEvent(o3);
|
|
@@ -33877,18 +33979,18 @@ void main() {
|
|
|
33877
33979
|
break;
|
|
33878
33980
|
case "KeyboardEvents":
|
|
33879
33981
|
var l2 = s3.initKeyboardEvent || s3.initKeyEvent;
|
|
33880
|
-
|
|
33982
|
+
Dc.defaults(r3, { cancelable: true, ctrlKey: false, altKey: false, shiftKey: false, metaKey: false, keyCode: void 0, charCode: void 0 }), l2(e3, r3.bubbles || false, r3.cancelable, window, r3.ctrlKey, r3.altKey, r3.shiftKey, r3.metaKey, r3.keyCode, r3.charCode);
|
|
33881
33983
|
break;
|
|
33882
33984
|
default:
|
|
33883
33985
|
s3.initEvent(e3, r3.bubbles || false, r3.cancelable || true);
|
|
33884
33986
|
}
|
|
33885
|
-
|
|
33987
|
+
Dc.defaults(s3, i2), t3.dispatchEvent(s3);
|
|
33886
33988
|
}, bind: function(t3, e3, n2, i2) {
|
|
33887
33989
|
var r3 = i2 || false;
|
|
33888
|
-
return t3.addEventListener ? t3.addEventListener(e3, n2, r3) : t3.attachEvent && t3.attachEvent("on" + e3, n2),
|
|
33990
|
+
return t3.addEventListener ? t3.addEventListener(e3, n2, r3) : t3.attachEvent && t3.attachEvent("on" + e3, n2), td;
|
|
33889
33991
|
}, unbind: function(t3, e3, n2, i2) {
|
|
33890
33992
|
var r3 = i2 || false;
|
|
33891
|
-
return t3.removeEventListener ? t3.removeEventListener(e3, n2, r3) : t3.detachEvent && t3.detachEvent("on" + e3, n2),
|
|
33993
|
+
return t3.removeEventListener ? t3.removeEventListener(e3, n2, r3) : t3.detachEvent && t3.detachEvent("on" + e3, n2), td;
|
|
33892
33994
|
}, addClass: function(t3, e3) {
|
|
33893
33995
|
if (t3.className === void 0)
|
|
33894
33996
|
t3.className = e3;
|
|
@@ -33896,7 +33998,7 @@ void main() {
|
|
|
33896
33998
|
var n2 = t3.className.split(/ +/);
|
|
33897
33999
|
n2.indexOf(e3) === -1 && (n2.push(e3), t3.className = n2.join(" ").replace(/^\s+/, "").replace(/\s+$/, ""));
|
|
33898
34000
|
}
|
|
33899
|
-
return
|
|
34001
|
+
return td;
|
|
33900
34002
|
}, removeClass: function(t3, e3) {
|
|
33901
34003
|
if (e3)
|
|
33902
34004
|
if (t3.className === e3)
|
|
@@ -33907,15 +34009,15 @@ void main() {
|
|
|
33907
34009
|
}
|
|
33908
34010
|
else
|
|
33909
34011
|
t3.className = void 0;
|
|
33910
|
-
return
|
|
34012
|
+
return td;
|
|
33911
34013
|
}, hasClass: function(t3, e3) {
|
|
33912
34014
|
return new RegExp("(?:^|\\s+)" + e3 + "(?:\\s+|$)").test(t3.className) || false;
|
|
33913
34015
|
}, getWidth: function(t3) {
|
|
33914
34016
|
var e3 = getComputedStyle(t3);
|
|
33915
|
-
return
|
|
34017
|
+
return Qc(e3["border-left-width"]) + Qc(e3["border-right-width"]) + Qc(e3["padding-left"]) + Qc(e3["padding-right"]) + Qc(e3.width);
|
|
33916
34018
|
}, getHeight: function(t3) {
|
|
33917
34019
|
var e3 = getComputedStyle(t3);
|
|
33918
|
-
return
|
|
34020
|
+
return Qc(e3["border-top-width"]) + Qc(e3["border-bottom-width"]) + Qc(e3["padding-top"]) + Qc(e3["padding-bottom"]) + Qc(e3.height);
|
|
33919
34021
|
}, getOffset: function(t3) {
|
|
33920
34022
|
var e3 = t3, n2 = { left: 0, top: 0 };
|
|
33921
34023
|
if (e3.offsetParent)
|
|
@@ -33925,86 +34027,86 @@ void main() {
|
|
|
33925
34027
|
return n2;
|
|
33926
34028
|
}, isActive: function(t3) {
|
|
33927
34029
|
return t3 === document.activeElement && (t3.type || t3.href);
|
|
33928
|
-
} },
|
|
34030
|
+
} }, ed = function(t3) {
|
|
33929
34031
|
function e3(t4, n2) {
|
|
33930
|
-
|
|
33931
|
-
var i2 =
|
|
33932
|
-
return i2.__prev = i2.getValue(), i2.__checkbox = document.createElement("input"), i2.__checkbox.setAttribute("type", "checkbox"),
|
|
34032
|
+
zc(this, e3);
|
|
34033
|
+
var i2 = Xc(this, (e3.__proto__ || Object.getPrototypeOf(e3)).call(this, t4, n2)), r3 = i2;
|
|
34034
|
+
return i2.__prev = i2.getValue(), i2.__checkbox = document.createElement("input"), i2.__checkbox.setAttribute("type", "checkbox"), td.bind(i2.__checkbox, "change", function() {
|
|
33933
34035
|
r3.setValue(!r3.__prev);
|
|
33934
34036
|
}, false), i2.domElement.appendChild(i2.__checkbox), i2.updateDisplay(), i2;
|
|
33935
34037
|
}
|
|
33936
|
-
return
|
|
33937
|
-
var n2 =
|
|
34038
|
+
return Wc(e3, t3), jc(e3, [{ key: "setValue", value: function(t4) {
|
|
34039
|
+
var n2 = Vc(e3.prototype.__proto__ || Object.getPrototypeOf(e3.prototype), "setValue", this).call(this, t4);
|
|
33938
34040
|
return this.__onFinishChange && this.__onFinishChange.call(this, this.getValue()), this.__prev = this.getValue(), n2;
|
|
33939
34041
|
} }, { key: "updateDisplay", value: function() {
|
|
33940
|
-
return this.getValue() === true ? (this.__checkbox.setAttribute("checked", "checked"), this.__checkbox.checked = true, this.__prev = true) : (this.__checkbox.checked = false, this.__prev = false),
|
|
34042
|
+
return this.getValue() === true ? (this.__checkbox.setAttribute("checked", "checked"), this.__checkbox.checked = true, this.__prev = true) : (this.__checkbox.checked = false, this.__prev = false), Vc(e3.prototype.__proto__ || Object.getPrototypeOf(e3.prototype), "updateDisplay", this).call(this);
|
|
33941
34043
|
} }]), e3;
|
|
33942
|
-
}(
|
|
34044
|
+
}(Jc), nd = function(t3) {
|
|
33943
34045
|
function e3(t4, n2, i2) {
|
|
33944
|
-
|
|
33945
|
-
var r3 =
|
|
33946
|
-
if (r3.__select = document.createElement("select"),
|
|
34046
|
+
zc(this, e3);
|
|
34047
|
+
var r3 = Xc(this, (e3.__proto__ || Object.getPrototypeOf(e3)).call(this, t4, n2)), o3 = i2, s3 = r3;
|
|
34048
|
+
if (r3.__select = document.createElement("select"), Dc.isArray(o3)) {
|
|
33947
34049
|
var a2 = {};
|
|
33948
|
-
|
|
34050
|
+
Dc.each(o3, function(t5) {
|
|
33949
34051
|
a2[t5] = t5;
|
|
33950
34052
|
}), o3 = a2;
|
|
33951
34053
|
}
|
|
33952
|
-
return
|
|
34054
|
+
return Dc.each(o3, function(t5, e4) {
|
|
33953
34055
|
var n3 = document.createElement("option");
|
|
33954
34056
|
n3.innerHTML = e4, n3.setAttribute("value", t5), s3.__select.appendChild(n3);
|
|
33955
|
-
}), r3.updateDisplay(),
|
|
34057
|
+
}), r3.updateDisplay(), td.bind(r3.__select, "change", function() {
|
|
33956
34058
|
var t5 = this.options[this.selectedIndex].value;
|
|
33957
34059
|
s3.setValue(t5);
|
|
33958
34060
|
}), r3.domElement.appendChild(r3.__select), r3;
|
|
33959
34061
|
}
|
|
33960
|
-
return
|
|
33961
|
-
var n2 =
|
|
34062
|
+
return Wc(e3, t3), jc(e3, [{ key: "setValue", value: function(t4) {
|
|
34063
|
+
var n2 = Vc(e3.prototype.__proto__ || Object.getPrototypeOf(e3.prototype), "setValue", this).call(this, t4);
|
|
33962
34064
|
return this.__onFinishChange && this.__onFinishChange.call(this, this.getValue()), n2;
|
|
33963
34065
|
} }, { key: "updateDisplay", value: function() {
|
|
33964
|
-
return
|
|
34066
|
+
return td.isActive(this.__select) ? this : (this.__select.value = this.getValue(), Vc(e3.prototype.__proto__ || Object.getPrototypeOf(e3.prototype), "updateDisplay", this).call(this));
|
|
33965
34067
|
} }]), e3;
|
|
33966
|
-
}(
|
|
34068
|
+
}(Jc), id = function(t3) {
|
|
33967
34069
|
function e3(t4, n2) {
|
|
33968
|
-
|
|
33969
|
-
var i2 =
|
|
34070
|
+
zc(this, e3);
|
|
34071
|
+
var i2 = Xc(this, (e3.__proto__ || Object.getPrototypeOf(e3)).call(this, t4, n2)), r3 = i2;
|
|
33970
34072
|
function o3() {
|
|
33971
34073
|
r3.setValue(r3.__input.value);
|
|
33972
34074
|
}
|
|
33973
|
-
return i2.__input = document.createElement("input"), i2.__input.setAttribute("type", "text"),
|
|
34075
|
+
return i2.__input = document.createElement("input"), i2.__input.setAttribute("type", "text"), td.bind(i2.__input, "keyup", o3), td.bind(i2.__input, "change", o3), td.bind(i2.__input, "blur", function() {
|
|
33974
34076
|
r3.__onFinishChange && r3.__onFinishChange.call(r3, r3.getValue());
|
|
33975
|
-
}),
|
|
34077
|
+
}), td.bind(i2.__input, "keydown", function(t5) {
|
|
33976
34078
|
t5.keyCode === 13 && this.blur();
|
|
33977
34079
|
}), i2.updateDisplay(), i2.domElement.appendChild(i2.__input), i2;
|
|
33978
34080
|
}
|
|
33979
|
-
return
|
|
33980
|
-
return
|
|
34081
|
+
return Wc(e3, t3), jc(e3, [{ key: "updateDisplay", value: function() {
|
|
34082
|
+
return td.isActive(this.__input) || (this.__input.value = this.getValue()), Vc(e3.prototype.__proto__ || Object.getPrototypeOf(e3.prototype), "updateDisplay", this).call(this);
|
|
33981
34083
|
} }]), e3;
|
|
33982
|
-
}(
|
|
33983
|
-
function
|
|
34084
|
+
}(Jc);
|
|
34085
|
+
function rd(t3) {
|
|
33984
34086
|
var e3 = t3.toString();
|
|
33985
34087
|
return e3.indexOf(".") > -1 ? e3.length - e3.indexOf(".") - 1 : 0;
|
|
33986
34088
|
}
|
|
33987
|
-
var
|
|
34089
|
+
var od = function(t3) {
|
|
33988
34090
|
function e3(t4, n2, i2) {
|
|
33989
|
-
|
|
33990
|
-
var r3 =
|
|
33991
|
-
return r3.__min = o3.min, r3.__max = o3.max, r3.__step = o3.step,
|
|
34091
|
+
zc(this, e3);
|
|
34092
|
+
var r3 = Xc(this, (e3.__proto__ || Object.getPrototypeOf(e3)).call(this, t4, n2)), o3 = i2 || {};
|
|
34093
|
+
return r3.__min = o3.min, r3.__max = o3.max, r3.__step = o3.step, Dc.isUndefined(r3.__step) ? r3.initialValue === 0 ? r3.__impliedStep = 1 : r3.__impliedStep = Math.pow(10, Math.floor(Math.log(Math.abs(r3.initialValue)) / Math.LN10)) / 10 : r3.__impliedStep = r3.__step, r3.__precision = rd(r3.__impliedStep), r3;
|
|
33992
34094
|
}
|
|
33993
|
-
return
|
|
34095
|
+
return Wc(e3, t3), jc(e3, [{ key: "setValue", value: function(t4) {
|
|
33994
34096
|
var n2 = t4;
|
|
33995
|
-
return this.__min !== void 0 && n2 < this.__min ? n2 = this.__min : this.__max !== void 0 && n2 > this.__max && (n2 = this.__max), this.__step !== void 0 && n2 % this.__step != 0 && (n2 = Math.round(n2 / this.__step) * this.__step),
|
|
34097
|
+
return this.__min !== void 0 && n2 < this.__min ? n2 = this.__min : this.__max !== void 0 && n2 > this.__max && (n2 = this.__max), this.__step !== void 0 && n2 % this.__step != 0 && (n2 = Math.round(n2 / this.__step) * this.__step), Vc(e3.prototype.__proto__ || Object.getPrototypeOf(e3.prototype), "setValue", this).call(this, n2);
|
|
33996
34098
|
} }, { key: "min", value: function(t4) {
|
|
33997
34099
|
return this.__min = t4, this;
|
|
33998
34100
|
} }, { key: "max", value: function(t4) {
|
|
33999
34101
|
return this.__max = t4, this;
|
|
34000
34102
|
} }, { key: "step", value: function(t4) {
|
|
34001
|
-
return this.__step = t4, this.__impliedStep = t4, this.__precision =
|
|
34103
|
+
return this.__step = t4, this.__impliedStep = t4, this.__precision = rd(t4), this;
|
|
34002
34104
|
} }]), e3;
|
|
34003
|
-
}(
|
|
34004
|
-
var
|
|
34105
|
+
}(Jc);
|
|
34106
|
+
var sd = function(t3) {
|
|
34005
34107
|
function e3(t4, n2, i2) {
|
|
34006
|
-
|
|
34007
|
-
var r3 =
|
|
34108
|
+
zc(this, e3);
|
|
34109
|
+
var r3 = Xc(this, (e3.__proto__ || Object.getPrototypeOf(e3)).call(this, t4, n2, i2));
|
|
34008
34110
|
r3.__truncationSuspended = false;
|
|
34009
34111
|
var o3 = r3, s3 = void 0;
|
|
34010
34112
|
function a2() {
|
|
@@ -34015,101 +34117,101 @@ void main() {
|
|
|
34015
34117
|
o3.setValue(o3.getValue() + e4 * o3.__impliedStep), s3 = t5.clientY;
|
|
34016
34118
|
}
|
|
34017
34119
|
function l2() {
|
|
34018
|
-
|
|
34120
|
+
td.unbind(window, "mousemove", u2), td.unbind(window, "mouseup", l2), a2();
|
|
34019
34121
|
}
|
|
34020
|
-
return r3.__input = document.createElement("input"), r3.__input.setAttribute("type", "text"),
|
|
34122
|
+
return r3.__input = document.createElement("input"), r3.__input.setAttribute("type", "text"), td.bind(r3.__input, "change", function() {
|
|
34021
34123
|
var t5 = parseFloat(o3.__input.value);
|
|
34022
|
-
|
|
34023
|
-
}),
|
|
34124
|
+
Dc.isNaN(t5) || o3.setValue(t5);
|
|
34125
|
+
}), td.bind(r3.__input, "blur", function() {
|
|
34024
34126
|
a2();
|
|
34025
|
-
}),
|
|
34026
|
-
|
|
34027
|
-
}),
|
|
34127
|
+
}), td.bind(r3.__input, "mousedown", function(t5) {
|
|
34128
|
+
td.bind(window, "mousemove", u2), td.bind(window, "mouseup", l2), s3 = t5.clientY;
|
|
34129
|
+
}), td.bind(r3.__input, "keydown", function(t5) {
|
|
34028
34130
|
t5.keyCode === 13 && (o3.__truncationSuspended = true, this.blur(), o3.__truncationSuspended = false, a2());
|
|
34029
34131
|
}), r3.updateDisplay(), r3.domElement.appendChild(r3.__input), r3;
|
|
34030
34132
|
}
|
|
34031
|
-
return
|
|
34133
|
+
return Wc(e3, t3), jc(e3, [{ key: "updateDisplay", value: function() {
|
|
34032
34134
|
var t4, n2, i2;
|
|
34033
|
-
return this.__input.value = this.__truncationSuspended ? this.getValue() : (t4 = this.getValue(), n2 = this.__precision, i2 = Math.pow(10, n2), Math.round(t4 * i2) / i2),
|
|
34135
|
+
return this.__input.value = this.__truncationSuspended ? this.getValue() : (t4 = this.getValue(), n2 = this.__precision, i2 = Math.pow(10, n2), Math.round(t4 * i2) / i2), Vc(e3.prototype.__proto__ || Object.getPrototypeOf(e3.prototype), "updateDisplay", this).call(this);
|
|
34034
34136
|
} }]), e3;
|
|
34035
|
-
}(
|
|
34036
|
-
function
|
|
34137
|
+
}(od);
|
|
34138
|
+
function ad(t3, e3, n2, i2, r3) {
|
|
34037
34139
|
return i2 + (t3 - e3) / (n2 - e3) * (r3 - i2);
|
|
34038
34140
|
}
|
|
34039
|
-
var
|
|
34141
|
+
var ud = function(t3) {
|
|
34040
34142
|
function e3(t4, n2, i2, r3, o3) {
|
|
34041
|
-
|
|
34042
|
-
var s3 =
|
|
34143
|
+
zc(this, e3);
|
|
34144
|
+
var s3 = Xc(this, (e3.__proto__ || Object.getPrototypeOf(e3)).call(this, t4, n2, { min: i2, max: r3, step: o3 })), a2 = s3;
|
|
34043
34145
|
function u2(t5) {
|
|
34044
34146
|
t5.preventDefault();
|
|
34045
34147
|
var e4 = a2.__background.getBoundingClientRect();
|
|
34046
|
-
return a2.setValue(
|
|
34148
|
+
return a2.setValue(ad(t5.clientX, e4.left, e4.right, a2.__min, a2.__max)), false;
|
|
34047
34149
|
}
|
|
34048
34150
|
function l2() {
|
|
34049
|
-
|
|
34151
|
+
td.unbind(window, "mousemove", u2), td.unbind(window, "mouseup", l2), a2.__onFinishChange && a2.__onFinishChange.call(a2, a2.getValue());
|
|
34050
34152
|
}
|
|
34051
34153
|
function h2(t5) {
|
|
34052
34154
|
var e4 = t5.touches[0].clientX, n3 = a2.__background.getBoundingClientRect();
|
|
34053
|
-
a2.setValue(
|
|
34155
|
+
a2.setValue(ad(e4, n3.left, n3.right, a2.__min, a2.__max));
|
|
34054
34156
|
}
|
|
34055
34157
|
function c2() {
|
|
34056
|
-
|
|
34158
|
+
td.unbind(window, "touchmove", h2), td.unbind(window, "touchend", c2), a2.__onFinishChange && a2.__onFinishChange.call(a2, a2.getValue());
|
|
34057
34159
|
}
|
|
34058
|
-
return s3.__background = document.createElement("div"), s3.__foreground = document.createElement("div"),
|
|
34059
|
-
document.activeElement.blur(),
|
|
34060
|
-
}),
|
|
34160
|
+
return s3.__background = document.createElement("div"), s3.__foreground = document.createElement("div"), td.bind(s3.__background, "mousedown", function(t5) {
|
|
34161
|
+
document.activeElement.blur(), td.bind(window, "mousemove", u2), td.bind(window, "mouseup", l2), u2(t5);
|
|
34162
|
+
}), td.bind(s3.__background, "touchstart", function(t5) {
|
|
34061
34163
|
if (t5.touches.length !== 1)
|
|
34062
34164
|
return;
|
|
34063
|
-
|
|
34064
|
-
}),
|
|
34165
|
+
td.bind(window, "touchmove", h2), td.bind(window, "touchend", c2), h2(t5);
|
|
34166
|
+
}), td.addClass(s3.__background, "slider"), td.addClass(s3.__foreground, "slider-fg"), s3.updateDisplay(), s3.__background.appendChild(s3.__foreground), s3.domElement.appendChild(s3.__background), s3;
|
|
34065
34167
|
}
|
|
34066
|
-
return
|
|
34168
|
+
return Wc(e3, t3), jc(e3, [{ key: "updateDisplay", value: function() {
|
|
34067
34169
|
var t4 = (this.getValue() - this.__min) / (this.__max - this.__min);
|
|
34068
|
-
return this.__foreground.style.width = 100 * t4 + "%",
|
|
34170
|
+
return this.__foreground.style.width = 100 * t4 + "%", Vc(e3.prototype.__proto__ || Object.getPrototypeOf(e3.prototype), "updateDisplay", this).call(this);
|
|
34069
34171
|
} }]), e3;
|
|
34070
|
-
}(
|
|
34172
|
+
}(od), ld = function(t3) {
|
|
34071
34173
|
function e3(t4, n2, i2) {
|
|
34072
|
-
|
|
34073
|
-
var r3 =
|
|
34074
|
-
return r3.__button = document.createElement("div"), r3.__button.innerHTML = i2 === void 0 ? "Fire" : i2,
|
|
34174
|
+
zc(this, e3);
|
|
34175
|
+
var r3 = Xc(this, (e3.__proto__ || Object.getPrototypeOf(e3)).call(this, t4, n2)), o3 = r3;
|
|
34176
|
+
return r3.__button = document.createElement("div"), r3.__button.innerHTML = i2 === void 0 ? "Fire" : i2, td.bind(r3.__button, "click", function(t5) {
|
|
34075
34177
|
return t5.preventDefault(), o3.fire(), false;
|
|
34076
|
-
}),
|
|
34178
|
+
}), td.addClass(r3.__button, "button"), r3.domElement.appendChild(r3.__button), r3;
|
|
34077
34179
|
}
|
|
34078
|
-
return
|
|
34180
|
+
return Wc(e3, t3), jc(e3, [{ key: "fire", value: function() {
|
|
34079
34181
|
this.__onChange && this.__onChange.call(this), this.getValue().call(this.object), this.__onFinishChange && this.__onFinishChange.call(this, this.getValue());
|
|
34080
34182
|
} }]), e3;
|
|
34081
|
-
}(
|
|
34183
|
+
}(Jc), hd = function(t3) {
|
|
34082
34184
|
function e3(t4, n2) {
|
|
34083
|
-
|
|
34084
|
-
var i2 =
|
|
34085
|
-
i2.__color = new
|
|
34185
|
+
zc(this, e3);
|
|
34186
|
+
var i2 = Xc(this, (e3.__proto__ || Object.getPrototypeOf(e3)).call(this, t4, n2));
|
|
34187
|
+
i2.__color = new qc(i2.getValue()), i2.__temp = new qc(0);
|
|
34086
34188
|
var r3 = i2;
|
|
34087
|
-
i2.domElement = document.createElement("div"),
|
|
34189
|
+
i2.domElement = document.createElement("div"), td.makeSelectable(i2.domElement, false), i2.__selector = document.createElement("div"), i2.__selector.className = "selector", i2.__saturation_field = document.createElement("div"), i2.__saturation_field.className = "saturation-field", i2.__field_knob = document.createElement("div"), i2.__field_knob.className = "field-knob", i2.__field_knob_border = "2px solid ", i2.__hue_knob = document.createElement("div"), i2.__hue_knob.className = "hue-knob", i2.__hue_field = document.createElement("div"), i2.__hue_field.className = "hue-field", i2.__input = document.createElement("input"), i2.__input.type = "text", i2.__input_textShadow = "0 1px 1px ", td.bind(i2.__input, "keydown", function(t5) {
|
|
34088
34190
|
t5.keyCode === 13 && c2.call(this);
|
|
34089
|
-
}),
|
|
34090
|
-
|
|
34091
|
-
|
|
34191
|
+
}), td.bind(i2.__input, "blur", c2), td.bind(i2.__selector, "mousedown", function() {
|
|
34192
|
+
td.addClass(this, "drag").bind(window, "mouseup", function() {
|
|
34193
|
+
td.removeClass(r3.__selector, "drag");
|
|
34092
34194
|
});
|
|
34093
|
-
}),
|
|
34094
|
-
|
|
34095
|
-
|
|
34195
|
+
}), td.bind(i2.__selector, "touchstart", function() {
|
|
34196
|
+
td.addClass(this, "drag").bind(window, "touchend", function() {
|
|
34197
|
+
td.removeClass(r3.__selector, "drag");
|
|
34096
34198
|
});
|
|
34097
34199
|
});
|
|
34098
34200
|
var o3, s3 = document.createElement("div");
|
|
34099
34201
|
function a2(t5) {
|
|
34100
|
-
p2(t5),
|
|
34202
|
+
p2(t5), td.bind(window, "mousemove", p2), td.bind(window, "touchmove", p2), td.bind(window, "mouseup", l2), td.bind(window, "touchend", l2);
|
|
34101
34203
|
}
|
|
34102
34204
|
function u2(t5) {
|
|
34103
|
-
f2(t5),
|
|
34205
|
+
f2(t5), td.bind(window, "mousemove", f2), td.bind(window, "touchmove", f2), td.bind(window, "mouseup", h2), td.bind(window, "touchend", h2);
|
|
34104
34206
|
}
|
|
34105
34207
|
function l2() {
|
|
34106
|
-
|
|
34208
|
+
td.unbind(window, "mousemove", p2), td.unbind(window, "touchmove", p2), td.unbind(window, "mouseup", l2), td.unbind(window, "touchend", l2), d2();
|
|
34107
34209
|
}
|
|
34108
34210
|
function h2() {
|
|
34109
|
-
|
|
34211
|
+
td.unbind(window, "mousemove", f2), td.unbind(window, "touchmove", f2), td.unbind(window, "mouseup", h2), td.unbind(window, "touchend", h2), d2();
|
|
34110
34212
|
}
|
|
34111
34213
|
function c2() {
|
|
34112
|
-
var t5 =
|
|
34214
|
+
var t5 = kc(this.value);
|
|
34113
34215
|
t5 !== false ? (r3.__color.__state = t5, r3.setValue(r3.__color.toOriginal())) : this.value = r3.__color.toString();
|
|
34114
34216
|
}
|
|
34115
34217
|
function d2() {
|
|
@@ -34125,28 +34227,28 @@ void main() {
|
|
|
34125
34227
|
var e4 = r3.__hue_field.getBoundingClientRect(), n3 = 1 - ((t5.touches && t5.touches[0] || t5).clientY - e4.top) / (e4.bottom - e4.top);
|
|
34126
34228
|
return n3 > 1 ? n3 = 1 : n3 < 0 && (n3 = 0), r3.__color.h = 360 * n3, r3.setValue(r3.__color.toOriginal()), false;
|
|
34127
34229
|
}
|
|
34128
|
-
return
|
|
34230
|
+
return Dc.extend(i2.__selector.style, { width: "122px", height: "102px", padding: "3px", backgroundColor: "#222", boxShadow: "0px 1px 3px rgba(0,0,0,0.3)" }), Dc.extend(i2.__field_knob.style, { position: "absolute", width: "12px", height: "12px", border: i2.__field_knob_border + (i2.__color.v < 0.5 ? "#fff" : "#000"), boxShadow: "0px 1px 3px rgba(0,0,0,0.5)", borderRadius: "12px", zIndex: 1 }), Dc.extend(i2.__hue_knob.style, { position: "absolute", width: "15px", height: "2px", borderRight: "4px solid #fff", zIndex: 1 }), Dc.extend(i2.__saturation_field.style, { width: "100px", height: "100px", border: "1px solid #555", marginRight: "3px", display: "inline-block", cursor: "pointer" }), Dc.extend(s3.style, { width: "100%", height: "100%", background: "none" }), dd(s3, "top", "rgba(0,0,0,0)", "#000"), Dc.extend(i2.__hue_field.style, { width: "15px", height: "100px", border: "1px solid #555", cursor: "ns-resize", position: "absolute", top: "3px", right: "3px" }), (o3 = i2.__hue_field).style.background = "", o3.style.cssText += "background: -moz-linear-gradient(top, #ff0000 0%, #ff00ff 17%, #0000ff 34%, #00ffff 50%, #00ff00 67%, #ffff00 84%, #ff0000 100%);", o3.style.cssText += "background: -webkit-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);", o3.style.cssText += "background: -o-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);", o3.style.cssText += "background: -ms-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);", o3.style.cssText += "background: linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);", Dc.extend(i2.__input.style, { outline: "none", textAlign: "center", color: "#fff", border: 0, fontWeight: "bold", textShadow: i2.__input_textShadow + "rgba(0,0,0,0.7)" }), td.bind(i2.__saturation_field, "mousedown", a2), td.bind(i2.__saturation_field, "touchstart", a2), td.bind(i2.__field_knob, "mousedown", a2), td.bind(i2.__field_knob, "touchstart", a2), td.bind(i2.__hue_field, "mousedown", u2), td.bind(i2.__hue_field, "touchstart", u2), i2.__saturation_field.appendChild(s3), i2.__selector.appendChild(i2.__field_knob), i2.__selector.appendChild(i2.__saturation_field), i2.__selector.appendChild(i2.__hue_field), i2.__hue_field.appendChild(i2.__hue_knob), i2.domElement.appendChild(i2.__input), i2.domElement.appendChild(i2.__selector), i2.updateDisplay(), i2;
|
|
34129
34231
|
}
|
|
34130
|
-
return
|
|
34131
|
-
var t4 =
|
|
34232
|
+
return Wc(e3, t3), jc(e3, [{ key: "updateDisplay", value: function() {
|
|
34233
|
+
var t4 = kc(this.getValue());
|
|
34132
34234
|
if (t4 !== false) {
|
|
34133
34235
|
var e4 = false;
|
|
34134
|
-
|
|
34135
|
-
if (!
|
|
34236
|
+
Dc.each(qc.COMPONENTS, function(n3) {
|
|
34237
|
+
if (!Dc.isUndefined(t4[n3]) && !Dc.isUndefined(this.__color.__state[n3]) && t4[n3] !== this.__color.__state[n3])
|
|
34136
34238
|
return e4 = true, {};
|
|
34137
|
-
}, this), e4 &&
|
|
34239
|
+
}, this), e4 && Dc.extend(this.__color.__state, t4);
|
|
34138
34240
|
}
|
|
34139
|
-
|
|
34241
|
+
Dc.extend(this.__temp.__state, this.__color.__state), this.__temp.a = 1;
|
|
34140
34242
|
var n2 = this.__color.v < 0.5 || this.__color.s > 0.5 ? 255 : 0, i2 = 255 - n2;
|
|
34141
|
-
|
|
34243
|
+
Dc.extend(this.__field_knob.style, { marginLeft: 100 * this.__color.s - 7 + "px", marginTop: 100 * (1 - this.__color.v) - 7 + "px", backgroundColor: this.__temp.toHexString(), border: this.__field_knob_border + "rgb(" + n2 + "," + n2 + "," + n2 + ")" }), this.__hue_knob.style.marginTop = 100 * (1 - this.__color.h / 360) + "px", this.__temp.s = 1, this.__temp.v = 1, dd(this.__saturation_field, "left", "#fff", this.__temp.toHexString()), this.__input.value = this.__color.toString(), Dc.extend(this.__input.style, { backgroundColor: this.__color.toHexString(), color: "rgb(" + n2 + "," + n2 + "," + n2 + ")", textShadow: this.__input_textShadow + "rgba(" + i2 + "," + i2 + "," + i2 + ",.7)" });
|
|
34142
34244
|
} }]), e3;
|
|
34143
|
-
}(
|
|
34144
|
-
function
|
|
34145
|
-
t3.style.background = "",
|
|
34245
|
+
}(Jc), cd = ["-moz-", "-o-", "-webkit-", "-ms-", ""];
|
|
34246
|
+
function dd(t3, e3, n2, i2) {
|
|
34247
|
+
t3.style.background = "", Dc.each(cd, function(r3) {
|
|
34146
34248
|
t3.style.cssText += "background: " + r3 + "linear-gradient(" + e3 + ", " + n2 + " 0%, " + i2 + " 100%); ";
|
|
34147
34249
|
});
|
|
34148
34250
|
}
|
|
34149
|
-
var
|
|
34251
|
+
var pd = function(t3, e3) {
|
|
34150
34252
|
var n2 = e3 || document, i2 = document.createElement("style");
|
|
34151
34253
|
i2.type = "text/css", i2.innerHTML = t3;
|
|
34152
34254
|
var r3 = n2.getElementsByTagName("head")[0];
|
|
@@ -34154,7 +34256,7 @@ void main() {
|
|
|
34154
34256
|
r3.appendChild(i2);
|
|
34155
34257
|
} catch (t4) {
|
|
34156
34258
|
}
|
|
34157
|
-
},
|
|
34259
|
+
}, fd = `<div id="dg-save" class="dg dialogue">
|
|
34158
34260
|
|
|
34159
34261
|
Here's the new load parameter for your <code>GUI</code>'s constructor:
|
|
34160
34262
|
|
|
@@ -34174,50 +34276,50 @@ void main() {
|
|
|
34174
34276
|
|
|
34175
34277
|
</div>
|
|
34176
34278
|
|
|
34177
|
-
</div>`,
|
|
34279
|
+
</div>`, md = function(t3, e3) {
|
|
34178
34280
|
var n2 = t3[e3];
|
|
34179
|
-
return
|
|
34281
|
+
return Dc.isArray(arguments[2]) || Dc.isObject(arguments[2]) ? new nd(t3, e3, arguments[2]) : Dc.isNumber(n2) ? Dc.isNumber(arguments[2]) && Dc.isNumber(arguments[3]) ? Dc.isNumber(arguments[4]) ? new ud(t3, e3, arguments[2], arguments[3], arguments[4]) : new ud(t3, e3, arguments[2], arguments[3]) : Dc.isNumber(arguments[4]) ? new sd(t3, e3, { min: arguments[2], max: arguments[3], step: arguments[4] }) : new sd(t3, e3, { min: arguments[2], max: arguments[3] }) : Dc.isString(n2) ? new id(t3, e3) : Dc.isFunction(n2) ? new ld(t3, e3, "") : Dc.isBoolean(n2) ? new ed(t3, e3) : null;
|
|
34180
34282
|
};
|
|
34181
|
-
var
|
|
34283
|
+
var gd = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function(t3) {
|
|
34182
34284
|
setTimeout(t3, 1e3 / 60);
|
|
34183
|
-
},
|
|
34285
|
+
}, vd = function() {
|
|
34184
34286
|
function t3() {
|
|
34185
|
-
|
|
34287
|
+
zc(this, t3), this.backgroundElement = document.createElement("div"), Dc.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" }), td.makeFullscreen(this.backgroundElement), this.backgroundElement.style.position = "fixed", this.domElement = document.createElement("div"), Dc.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);
|
|
34186
34288
|
var e3 = this;
|
|
34187
|
-
|
|
34289
|
+
td.bind(this.backgroundElement, "click", function() {
|
|
34188
34290
|
e3.hide();
|
|
34189
34291
|
});
|
|
34190
34292
|
}
|
|
34191
|
-
return
|
|
34293
|
+
return jc(t3, [{ key: "show", value: function() {
|
|
34192
34294
|
var t4 = this;
|
|
34193
|
-
this.backgroundElement.style.display = "block", this.domElement.style.display = "block", this.domElement.style.opacity = 0, this.domElement.style.webkitTransform = "scale(1.1)", this.layout(),
|
|
34295
|
+
this.backgroundElement.style.display = "block", this.domElement.style.display = "block", this.domElement.style.opacity = 0, this.domElement.style.webkitTransform = "scale(1.1)", this.layout(), Dc.defer(function() {
|
|
34194
34296
|
t4.backgroundElement.style.opacity = 1, t4.domElement.style.opacity = 1, t4.domElement.style.webkitTransform = "scale(1)";
|
|
34195
34297
|
});
|
|
34196
34298
|
} }, { key: "hide", value: function() {
|
|
34197
34299
|
var t4 = this, e3 = function e4() {
|
|
34198
|
-
t4.domElement.style.display = "none", t4.backgroundElement.style.display = "none",
|
|
34300
|
+
t4.domElement.style.display = "none", t4.backgroundElement.style.display = "none", td.unbind(t4.domElement, "webkitTransitionEnd", e4), td.unbind(t4.domElement, "transitionend", e4), td.unbind(t4.domElement, "oTransitionEnd", e4);
|
|
34199
34301
|
};
|
|
34200
|
-
|
|
34302
|
+
td.bind(this.domElement, "webkitTransitionEnd", e3), td.bind(this.domElement, "transitionend", e3), td.bind(this.domElement, "oTransitionEnd", e3), this.backgroundElement.style.opacity = 0, this.domElement.style.opacity = 0, this.domElement.style.webkitTransform = "scale(1.1)";
|
|
34201
34303
|
} }, { key: "layout", value: function() {
|
|
34202
|
-
this.domElement.style.left = window.innerWidth / 2 -
|
|
34304
|
+
this.domElement.style.left = window.innerWidth / 2 - td.getWidth(this.domElement) / 2 + "px", this.domElement.style.top = window.innerHeight / 2 - td.getHeight(this.domElement) / 2 + "px";
|
|
34203
34305
|
} }]), t3;
|
|
34204
34306
|
}();
|
|
34205
|
-
|
|
34307
|
+
pd(function(t3) {
|
|
34206
34308
|
if (t3 && typeof window != "undefined") {
|
|
34207
34309
|
var e3 = document.createElement("style");
|
|
34208
34310
|
return e3.setAttribute("type", "text/css"), e3.innerHTML = t3, document.head.appendChild(e3), t3;
|
|
34209
34311
|
}
|
|
34210
34312
|
}(".dg ul{list-style:none;margin:0;padding:0;width:100%;clear:both}.dg.ac{position:fixed;top:0;left:0;right:0;height:0;z-index:0}.dg:not(.ac) .main{overflow:hidden}.dg.main{-webkit-transition:opacity .1s linear;-o-transition:opacity .1s linear;-moz-transition:opacity .1s linear;transition:opacity .1s linear}.dg.main.taller-than-window{overflow-y:auto}.dg.main.taller-than-window .close-button{opacity:1;margin-top:-1px;border-top:1px solid #2c2c2c}.dg.main ul.closed .close-button{opacity:1 !important}.dg.main:hover .close-button,.dg.main .close-button.drag{opacity:1}.dg.main .close-button{-webkit-transition:opacity .1s linear;-o-transition:opacity .1s linear;-moz-transition:opacity .1s linear;transition:opacity .1s linear;border:0;line-height:19px;height:20px;cursor:pointer;text-align:center;background-color:#000}.dg.main .close-button.close-top{position:relative}.dg.main .close-button.close-bottom{position:absolute}.dg.main .close-button:hover{background-color:#111}.dg.a{float:right;margin-right:15px;overflow-y:visible}.dg.a.has-save>ul.close-top{margin-top:0}.dg.a.has-save>ul.close-bottom{margin-top:27px}.dg.a.has-save>ul.closed{margin-top:0}.dg.a .save-row{top:0;z-index:1002}.dg.a .save-row.close-top{position:relative}.dg.a .save-row.close-bottom{position:fixed}.dg li{-webkit-transition:height .1s ease-out;-o-transition:height .1s ease-out;-moz-transition:height .1s ease-out;transition:height .1s ease-out;-webkit-transition:overflow .1s linear;-o-transition:overflow .1s linear;-moz-transition:overflow .1s linear;transition:overflow .1s linear}.dg li:not(.folder){cursor:auto;height:27px;line-height:27px;padding:0 4px 0 5px}.dg li.folder{padding:0;border-left:4px solid rgba(0,0,0,0)}.dg li.title{cursor:pointer;margin-left:-4px}.dg .closed li:not(.title),.dg .closed ul li,.dg .closed ul li>*{height:0;overflow:hidden;border:0}.dg .cr{clear:both;padding-left:3px;height:27px;overflow:hidden}.dg .property-name{cursor:default;float:left;clear:left;width:40%;overflow:hidden;text-overflow:ellipsis}.dg .c{float:left;width:60%;position:relative}.dg .c input[type=text]{border:0;margin-top:4px;padding:3px;width:100%;float:right}.dg .has-slider input[type=text]{width:30%;margin-left:0}.dg .slider{float:left;width:66%;margin-left:-5px;margin-right:0;height:19px;margin-top:4px}.dg .slider-fg{height:100%}.dg .c input[type=checkbox]{margin-top:7px}.dg .c select{margin-top:5px}.dg .cr.function,.dg .cr.function .property-name,.dg .cr.function *,.dg .cr.boolean,.dg .cr.boolean *{cursor:pointer}.dg .cr.color{overflow:visible}.dg .selector{display:none;position:absolute;margin-left:-9px;margin-top:23px;z-index:10}.dg .c:hover .selector,.dg .selector.drag{display:block}.dg li.save-row{padding:0}.dg li.save-row .button{display:inline-block;padding:0px 6px}.dg.dialogue{background-color:#222;width:460px;padding:15px;font-size:13px;line-height:15px}#dg-new-constructor{padding:10px;color:#222;font-family:Monaco, monospace;font-size:10px;border:0;resize:none;box-shadow:inset 1px 1px 1px #888;word-wrap:break-word;margin:12px 0;display:block;width:440px;overflow-y:scroll;height:100px;position:relative}#dg-local-explain{display:none;font-size:11px;line-height:17px;border-radius:3px;background-color:#333;padding:8px;margin-top:10px}#dg-local-explain code{font-size:10px}#dat-gui-save-locally{display:none}.dg{color:#eee;font:11px 'Lucida Grande', sans-serif;text-shadow:0 -1px 0 #111}.dg.main::-webkit-scrollbar{width:5px;background:#1a1a1a}.dg.main::-webkit-scrollbar-corner{height:0;display:none}.dg.main::-webkit-scrollbar-thumb{border-radius:5px;background:#676767}.dg li:not(.folder){background:#1a1a1a;border-bottom:1px solid #2c2c2c}.dg li.save-row{line-height:25px;background:#dad5cb;border:0}.dg li.save-row select{margin-left:5px;width:108px}.dg li.save-row .button{margin-left:5px;margin-top:1px;border-radius:2px;font-size:9px;line-height:7px;padding:4px 4px 5px 4px;background:#c5bdad;color:#fff;text-shadow:0 1px 0 #b0a58f;box-shadow:0 -1px 0 #b0a58f;cursor:pointer}.dg li.save-row .button.gears{background:#c5bdad url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAANCAYAAAB/9ZQ7AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAQJJREFUeNpiYKAU/P//PwGIC/ApCABiBSAW+I8AClAcgKxQ4T9hoMAEUrxx2QSGN6+egDX+/vWT4e7N82AMYoPAx/evwWoYoSYbACX2s7KxCxzcsezDh3evFoDEBYTEEqycggWAzA9AuUSQQgeYPa9fPv6/YWm/Acx5IPb7ty/fw+QZblw67vDs8R0YHyQhgObx+yAJkBqmG5dPPDh1aPOGR/eugW0G4vlIoTIfyFcA+QekhhHJhPdQxbiAIguMBTQZrPD7108M6roWYDFQiIAAv6Aow/1bFwXgis+f2LUAynwoIaNcz8XNx3Dl7MEJUDGQpx9gtQ8YCueB+D26OECAAQDadt7e46D42QAAAABJRU5ErkJggg==) 2px 1px no-repeat;height:7px;width:8px}.dg li.save-row .button:hover{background-color:#bab19e;box-shadow:0 -1px 0 #b0a58f}.dg li.folder{border-bottom:0}.dg li.title{padding-left:16px;background:#000 url(data:image/gif;base64,R0lGODlhBQAFAJEAAP////Pz8////////yH5BAEAAAIALAAAAAAFAAUAAAIIlI+hKgFxoCgAOw==) 6px 10px no-repeat;cursor:pointer;border-bottom:1px solid rgba(255,255,255,0.2)}.dg .closed li.title{background-image:url(data:image/gif;base64,R0lGODlhBQAFAJEAAP////Pz8////////yH5BAEAAAIALAAAAAAFAAUAAAIIlGIWqMCbWAEAOw==)}.dg .cr.boolean{border-left:3px solid #806787}.dg .cr.color{border-left:3px solid}.dg .cr.function{border-left:3px solid #e61d5f}.dg .cr.number{border-left:3px solid #2FA1D6}.dg .cr.number input[type=text]{color:#2FA1D6}.dg .cr.string{border-left:3px solid #1ed36f}.dg .cr.string input[type=text]{color:#1ed36f}.dg .cr.function:hover,.dg .cr.boolean:hover{background:#111}.dg .c input[type=text]{background:#303030;outline:none}.dg .c input[type=text]:hover{background:#3c3c3c}.dg .c input[type=text]:focus{background:#494949;color:#fff}.dg .c .slider{background:#303030;cursor:ew-resize}.dg .c .slider-fg{background:#2FA1D6;max-width:100%}.dg .c .slider:hover{background:#3c3c3c}.dg .c .slider:hover .slider-fg{background:#44abda}\n"));
|
|
34211
|
-
var
|
|
34313
|
+
var _d = function() {
|
|
34212
34314
|
try {
|
|
34213
34315
|
return !!window.localStorage;
|
|
34214
34316
|
} catch (t3) {
|
|
34215
34317
|
return false;
|
|
34216
34318
|
}
|
|
34217
|
-
}(),
|
|
34319
|
+
}(), yd = void 0, xd = true, bd = void 0, wd = false, Sd = [], Td = function t3(e3) {
|
|
34218
34320
|
var n2 = this, i2 = e3 || {};
|
|
34219
|
-
this.domElement = document.createElement("div"), this.__ul = document.createElement("ul"), this.domElement.appendChild(this.__ul),
|
|
34220
|
-
var r3, o3 =
|
|
34321
|
+
this.domElement = document.createElement("div"), this.__ul = document.createElement("ul"), this.domElement.appendChild(this.__ul), td.addClass(this.domElement, "dg"), this.__folders = {}, this.__controllers = [], this.__rememberedObjects = [], this.__rememberedObjectIndecesToControllers = [], this.__listening = [], i2 = Dc.defaults(i2, { closeOnTop: false, autoPlace: true, width: t3.DEFAULT_WIDTH }), i2 = Dc.defaults(i2, { resizable: i2.autoPlace, hideable: i2.autoPlace }), Dc.isUndefined(i2.load) ? i2.load = { preset: "Default" } : i2.preset && (i2.load.preset = i2.preset), Dc.isUndefined(i2.parent) && i2.hideable && Sd.push(this), i2.resizable = Dc.isUndefined(i2.parent) && i2.resizable, i2.autoPlace && Dc.isUndefined(i2.scrollable) && (i2.scrollable = true);
|
|
34322
|
+
var r3, o3 = _d && localStorage.getItem(Rd(this, "isLocal")) === "true", s3 = void 0, a2 = void 0;
|
|
34221
34323
|
if (Object.defineProperties(this, { parent: { get: function() {
|
|
34222
34324
|
return i2.parent;
|
|
34223
34325
|
} }, scrollable: { get: function() {
|
|
@@ -34236,7 +34338,7 @@ void main() {
|
|
|
34236
34338
|
} }, width: { get: function() {
|
|
34237
34339
|
return i2.width;
|
|
34238
34340
|
}, set: function(t4) {
|
|
34239
|
-
i2.width = t4,
|
|
34341
|
+
i2.width = t4, Nd(n2, t4);
|
|
34240
34342
|
} }, name: { get: function() {
|
|
34241
34343
|
return i2.name;
|
|
34242
34344
|
}, set: function(t4) {
|
|
@@ -34244,50 +34346,50 @@ void main() {
|
|
|
34244
34346
|
} }, closed: { get: function() {
|
|
34245
34347
|
return i2.closed;
|
|
34246
34348
|
}, set: function(e4) {
|
|
34247
|
-
i2.closed = e4, i2.closed ?
|
|
34349
|
+
i2.closed = e4, i2.closed ? td.addClass(n2.__ul, t3.CLASS_CLOSED) : td.removeClass(n2.__ul, t3.CLASS_CLOSED), this.onResize(), n2.__closeButton && (n2.__closeButton.innerHTML = e4 ? t3.TEXT_OPEN : t3.TEXT_CLOSED);
|
|
34248
34350
|
} }, load: { get: function() {
|
|
34249
34351
|
return i2.load;
|
|
34250
34352
|
} }, useLocalStorage: { get: function() {
|
|
34251
34353
|
return o3;
|
|
34252
34354
|
}, set: function(t4) {
|
|
34253
|
-
|
|
34254
|
-
} } }),
|
|
34255
|
-
if (this.closed = i2.closed || false,
|
|
34355
|
+
_d && (o3 = t4, t4 ? td.bind(window, "unload", s3) : td.unbind(window, "unload", s3), localStorage.setItem(Rd(n2, "isLocal"), t4));
|
|
34356
|
+
} } }), Dc.isUndefined(i2.parent)) {
|
|
34357
|
+
if (this.closed = i2.closed || false, td.addClass(this.domElement, t3.CLASS_MAIN), td.makeSelectable(this.domElement, false), _d && o3) {
|
|
34256
34358
|
n2.useLocalStorage = true;
|
|
34257
|
-
var u2 = localStorage.getItem(
|
|
34359
|
+
var u2 = localStorage.getItem(Rd(this, "gui"));
|
|
34258
34360
|
u2 && (i2.load = JSON.parse(u2));
|
|
34259
34361
|
}
|
|
34260
|
-
this.__closeButton = document.createElement("div"), this.__closeButton.innerHTML = t3.TEXT_CLOSED,
|
|
34362
|
+
this.__closeButton = document.createElement("div"), this.__closeButton.innerHTML = t3.TEXT_CLOSED, td.addClass(this.__closeButton, t3.CLASS_CLOSE_BUTTON), i2.closeOnTop ? (td.addClass(this.__closeButton, t3.CLASS_CLOSE_TOP), this.domElement.insertBefore(this.__closeButton, this.domElement.childNodes[0])) : (td.addClass(this.__closeButton, t3.CLASS_CLOSE_BOTTOM), this.domElement.appendChild(this.__closeButton)), td.bind(this.__closeButton, "click", function() {
|
|
34261
34363
|
n2.closed = !n2.closed;
|
|
34262
34364
|
});
|
|
34263
34365
|
} else {
|
|
34264
34366
|
i2.closed === void 0 && (i2.closed = true);
|
|
34265
34367
|
var l2 = document.createTextNode(i2.name);
|
|
34266
|
-
|
|
34267
|
-
|
|
34368
|
+
td.addClass(l2, "controller-name"), a2 = Ed(n2, l2);
|
|
34369
|
+
td.addClass(this.__ul, t3.CLASS_CLOSED), td.addClass(a2, "title"), td.bind(a2, "click", function(t4) {
|
|
34268
34370
|
return t4.preventDefault(), n2.closed = !n2.closed, false;
|
|
34269
34371
|
}), i2.closed || (this.closed = false);
|
|
34270
34372
|
}
|
|
34271
|
-
i2.autoPlace && (
|
|
34373
|
+
i2.autoPlace && (Dc.isUndefined(i2.parent) && (xd && (bd = document.createElement("div"), td.addClass(bd, "dg"), td.addClass(bd, t3.CLASS_AUTO_PLACE_CONTAINER), document.body.appendChild(bd), xd = false), bd.appendChild(this.domElement), td.addClass(this.domElement, t3.CLASS_AUTO_PLACE)), this.parent || Nd(n2, i2.width)), this.__resizeHandler = function() {
|
|
34272
34374
|
n2.onResizeDebounced();
|
|
34273
|
-
},
|
|
34274
|
-
|
|
34275
|
-
}, this.saveToLocalStorageIfPossible = s3, i2.parent || ((r3 = n2.getRoot()).width += 1,
|
|
34375
|
+
}, td.bind(window, "resize", this.__resizeHandler), td.bind(this.__ul, "webkitTransitionEnd", this.__resizeHandler), td.bind(this.__ul, "transitionend", this.__resizeHandler), td.bind(this.__ul, "oTransitionEnd", this.__resizeHandler), this.onResize(), i2.resizable && Dd(this), s3 = function() {
|
|
34376
|
+
_d && localStorage.getItem(Rd(n2, "isLocal")) === "true" && localStorage.setItem(Rd(n2, "gui"), JSON.stringify(n2.getSaveObject()));
|
|
34377
|
+
}, this.saveToLocalStorageIfPossible = s3, i2.parent || ((r3 = n2.getRoot()).width += 1, Dc.defer(function() {
|
|
34276
34378
|
r3.width -= 1;
|
|
34277
34379
|
}));
|
|
34278
34380
|
};
|
|
34279
|
-
function
|
|
34381
|
+
function Ed(t3, e3, n2) {
|
|
34280
34382
|
var i2 = document.createElement("li");
|
|
34281
34383
|
return e3 && i2.appendChild(e3), n2 ? t3.__ul.insertBefore(i2, n2) : t3.__ul.appendChild(i2), t3.onResize(), i2;
|
|
34282
34384
|
}
|
|
34283
|
-
function
|
|
34284
|
-
|
|
34385
|
+
function Md(t3) {
|
|
34386
|
+
td.unbind(window, "resize", t3.__resizeHandler), t3.saveToLocalStorageIfPossible && td.unbind(window, "unload", t3.saveToLocalStorageIfPossible);
|
|
34285
34387
|
}
|
|
34286
|
-
function
|
|
34388
|
+
function Ad(t3, e3) {
|
|
34287
34389
|
var n2 = t3.__preset_select[t3.__preset_select.selectedIndex];
|
|
34288
34390
|
n2.innerHTML = e3 ? n2.value + "*" : n2.value;
|
|
34289
34391
|
}
|
|
34290
|
-
function
|
|
34392
|
+
function Pd(t3, e3) {
|
|
34291
34393
|
var n2 = t3.getRoot(), i2 = n2.__rememberedObjects.indexOf(e3.object);
|
|
34292
34394
|
if (i2 !== -1) {
|
|
34293
34395
|
var r3 = n2.__rememberedObjectIndecesToControllers[i2];
|
|
@@ -34307,31 +34409,31 @@ void main() {
|
|
|
34307
34409
|
}
|
|
34308
34410
|
}
|
|
34309
34411
|
}
|
|
34310
|
-
function
|
|
34412
|
+
function Cd(t3, e3, n2, i2) {
|
|
34311
34413
|
if (e3[n2] === void 0)
|
|
34312
34414
|
throw new Error('Object "' + e3 + '" has no property "' + n2 + '"');
|
|
34313
34415
|
var r3 = void 0;
|
|
34314
34416
|
if (i2.color)
|
|
34315
|
-
r3 = new
|
|
34417
|
+
r3 = new hd(e3, n2);
|
|
34316
34418
|
else {
|
|
34317
34419
|
var o3 = [e3, n2].concat(i2.factoryArgs);
|
|
34318
|
-
r3 =
|
|
34420
|
+
r3 = md.apply(t3, o3);
|
|
34319
34421
|
}
|
|
34320
|
-
i2.before instanceof
|
|
34422
|
+
i2.before instanceof Jc && (i2.before = i2.before.__li), Pd(t3, r3), td.addClass(r3.domElement, "c");
|
|
34321
34423
|
var s3 = document.createElement("span");
|
|
34322
|
-
|
|
34424
|
+
td.addClass(s3, "property-name"), s3.innerHTML = r3.property;
|
|
34323
34425
|
var a2 = document.createElement("div");
|
|
34324
34426
|
a2.appendChild(s3), a2.appendChild(r3.domElement);
|
|
34325
|
-
var u2 =
|
|
34326
|
-
return
|
|
34327
|
-
if (n3.__li = e4, n3.__gui = t4,
|
|
34427
|
+
var u2 = Ed(t3, a2, i2.before);
|
|
34428
|
+
return td.addClass(u2, Td.CLASS_CONTROLLER_ROW), r3 instanceof hd ? td.addClass(u2, "color") : td.addClass(u2, Hc(r3.getValue())), function(t4, e4, n3) {
|
|
34429
|
+
if (n3.__li = e4, n3.__gui = t4, Dc.extend(n3, { options: function(e5) {
|
|
34328
34430
|
if (arguments.length > 1) {
|
|
34329
34431
|
var i4 = n3.__li.nextElementSibling;
|
|
34330
|
-
return n3.remove(),
|
|
34432
|
+
return n3.remove(), Cd(t4, n3.object, n3.property, { before: i4, factoryArgs: [Dc.toArray(arguments)] });
|
|
34331
34433
|
}
|
|
34332
|
-
if (
|
|
34434
|
+
if (Dc.isArray(e5) || Dc.isObject(e5)) {
|
|
34333
34435
|
var r5 = n3.__li.nextElementSibling;
|
|
34334
|
-
return n3.remove(),
|
|
34436
|
+
return n3.remove(), Cd(t4, n3.object, n3.property, { before: r5, factoryArgs: [e5] });
|
|
34335
34437
|
}
|
|
34336
34438
|
}, name: function(t5) {
|
|
34337
34439
|
return n3.__li.firstElementChild.firstElementChild.innerHTML = t5, n3;
|
|
@@ -34339,157 +34441,157 @@ void main() {
|
|
|
34339
34441
|
return n3.__gui.listen(n3), n3;
|
|
34340
34442
|
}, remove: function() {
|
|
34341
34443
|
return n3.__gui.remove(n3), n3;
|
|
34342
|
-
} }), n3 instanceof
|
|
34343
|
-
var i3 = new
|
|
34344
|
-
|
|
34444
|
+
} }), n3 instanceof ud) {
|
|
34445
|
+
var i3 = new sd(n3.object, n3.property, { min: n3.__min, max: n3.__max, step: n3.__step });
|
|
34446
|
+
Dc.each(["updateDisplay", "onChange", "onFinishChange", "step", "min", "max"], function(t5) {
|
|
34345
34447
|
var e5 = n3[t5], r5 = i3[t5];
|
|
34346
34448
|
n3[t5] = i3[t5] = function() {
|
|
34347
34449
|
var t6 = Array.prototype.slice.call(arguments);
|
|
34348
34450
|
return r5.apply(i3, t6), e5.apply(n3, t6);
|
|
34349
34451
|
};
|
|
34350
|
-
}),
|
|
34351
|
-
} else if (n3 instanceof
|
|
34452
|
+
}), td.addClass(e4, "has-slider"), n3.domElement.insertBefore(i3.domElement, n3.domElement.firstElementChild);
|
|
34453
|
+
} else if (n3 instanceof sd) {
|
|
34352
34454
|
var r4 = function(e5) {
|
|
34353
|
-
if (
|
|
34455
|
+
if (Dc.isNumber(n3.__min) && Dc.isNumber(n3.__max)) {
|
|
34354
34456
|
var i4 = n3.__li.firstElementChild.firstElementChild.innerHTML, r5 = n3.__gui.__listening.indexOf(n3) > -1;
|
|
34355
34457
|
n3.remove();
|
|
34356
|
-
var o4 =
|
|
34458
|
+
var o4 = Cd(t4, n3.object, n3.property, { before: n3.__li.nextElementSibling, factoryArgs: [n3.__min, n3.__max, n3.__step] });
|
|
34357
34459
|
return o4.name(i4), r5 && o4.listen(), o4;
|
|
34358
34460
|
}
|
|
34359
34461
|
return e5;
|
|
34360
34462
|
};
|
|
34361
|
-
n3.min =
|
|
34463
|
+
n3.min = Dc.compose(r4, n3.min), n3.max = Dc.compose(r4, n3.max);
|
|
34362
34464
|
} else
|
|
34363
|
-
n3 instanceof
|
|
34364
|
-
|
|
34365
|
-
}),
|
|
34465
|
+
n3 instanceof ed ? (td.bind(e4, "click", function() {
|
|
34466
|
+
td.fakeEvent(n3.__checkbox, "click");
|
|
34467
|
+
}), td.bind(n3.__checkbox, "click", function(t5) {
|
|
34366
34468
|
t5.stopPropagation();
|
|
34367
|
-
})) : n3 instanceof
|
|
34368
|
-
|
|
34369
|
-
}),
|
|
34370
|
-
|
|
34371
|
-
}),
|
|
34372
|
-
|
|
34373
|
-
})) : n3 instanceof
|
|
34469
|
+
})) : n3 instanceof ld ? (td.bind(e4, "click", function() {
|
|
34470
|
+
td.fakeEvent(n3.__button, "click");
|
|
34471
|
+
}), td.bind(e4, "mouseover", function() {
|
|
34472
|
+
td.addClass(n3.__button, "hover");
|
|
34473
|
+
}), td.bind(e4, "mouseout", function() {
|
|
34474
|
+
td.removeClass(n3.__button, "hover");
|
|
34475
|
+
})) : n3 instanceof hd && (td.addClass(e4, "color"), n3.updateDisplay = Dc.compose(function(t5) {
|
|
34374
34476
|
return e4.style.borderLeftColor = n3.__color.toString(), t5;
|
|
34375
34477
|
}, n3.updateDisplay), n3.updateDisplay());
|
|
34376
|
-
n3.setValue =
|
|
34377
|
-
return t4.getRoot().__preset_select && n3.isModified() &&
|
|
34478
|
+
n3.setValue = Dc.compose(function(e5) {
|
|
34479
|
+
return t4.getRoot().__preset_select && n3.isModified() && Ad(t4.getRoot(), true), e5;
|
|
34378
34480
|
}, n3.setValue);
|
|
34379
34481
|
}(t3, u2, r3), t3.__controllers.push(r3), r3;
|
|
34380
34482
|
}
|
|
34381
|
-
function
|
|
34483
|
+
function Rd(t3, e3) {
|
|
34382
34484
|
return document.location.href + "." + e3;
|
|
34383
34485
|
}
|
|
34384
|
-
function
|
|
34486
|
+
function Id(t3, e3, n2) {
|
|
34385
34487
|
var i2 = document.createElement("option");
|
|
34386
34488
|
i2.innerHTML = e3, i2.value = e3, t3.__preset_select.appendChild(i2), n2 && (t3.__preset_select.selectedIndex = t3.__preset_select.length - 1);
|
|
34387
34489
|
}
|
|
34388
|
-
function
|
|
34490
|
+
function Ld(t3, e3) {
|
|
34389
34491
|
e3.style.display = t3.useLocalStorage ? "block" : "none";
|
|
34390
34492
|
}
|
|
34391
|
-
function
|
|
34493
|
+
function Od(t3) {
|
|
34392
34494
|
var e3 = t3.__save_row = document.createElement("li");
|
|
34393
|
-
|
|
34495
|
+
td.addClass(t3.domElement, "has-save"), t3.__ul.insertBefore(e3, t3.__ul.firstChild), td.addClass(e3, "save-row");
|
|
34394
34496
|
var n2 = document.createElement("span");
|
|
34395
|
-
n2.innerHTML = " ",
|
|
34497
|
+
n2.innerHTML = " ", td.addClass(n2, "button gears");
|
|
34396
34498
|
var i2 = document.createElement("span");
|
|
34397
|
-
i2.innerHTML = "Save",
|
|
34499
|
+
i2.innerHTML = "Save", td.addClass(i2, "button"), td.addClass(i2, "save");
|
|
34398
34500
|
var r3 = document.createElement("span");
|
|
34399
|
-
r3.innerHTML = "New",
|
|
34501
|
+
r3.innerHTML = "New", td.addClass(r3, "button"), td.addClass(r3, "save-as");
|
|
34400
34502
|
var o3 = document.createElement("span");
|
|
34401
|
-
o3.innerHTML = "Revert",
|
|
34503
|
+
o3.innerHTML = "Revert", td.addClass(o3, "button"), td.addClass(o3, "revert");
|
|
34402
34504
|
var s3 = t3.__preset_select = document.createElement("select");
|
|
34403
|
-
if (t3.load && t3.load.remembered ?
|
|
34404
|
-
|
|
34405
|
-
}) :
|
|
34505
|
+
if (t3.load && t3.load.remembered ? Dc.each(t3.load.remembered, function(e4, n3) {
|
|
34506
|
+
Id(t3, n3, n3 === t3.preset);
|
|
34507
|
+
}) : Id(t3, "Default", false), td.bind(s3, "change", function() {
|
|
34406
34508
|
for (var e4 = 0; e4 < t3.__preset_select.length; e4++)
|
|
34407
34509
|
t3.__preset_select[e4].innerHTML = t3.__preset_select[e4].value;
|
|
34408
34510
|
t3.preset = this.value;
|
|
34409
|
-
}), e3.appendChild(s3), e3.appendChild(n2), e3.appendChild(i2), e3.appendChild(r3), e3.appendChild(o3),
|
|
34511
|
+
}), e3.appendChild(s3), e3.appendChild(n2), e3.appendChild(i2), e3.appendChild(r3), e3.appendChild(o3), _d) {
|
|
34410
34512
|
var a2 = document.getElementById("dg-local-explain"), u2 = document.getElementById("dg-local-storage");
|
|
34411
|
-
document.getElementById("dg-save-locally").style.display = "block", localStorage.getItem(
|
|
34412
|
-
t3.useLocalStorage = !t3.useLocalStorage,
|
|
34513
|
+
document.getElementById("dg-save-locally").style.display = "block", localStorage.getItem(Rd(0, "isLocal")) === "true" && u2.setAttribute("checked", "checked"), Ld(t3, a2), td.bind(u2, "change", function() {
|
|
34514
|
+
t3.useLocalStorage = !t3.useLocalStorage, Ld(t3, a2);
|
|
34413
34515
|
});
|
|
34414
34516
|
}
|
|
34415
34517
|
var l2 = document.getElementById("dg-new-constructor");
|
|
34416
|
-
|
|
34417
|
-
!t4.metaKey || t4.which !== 67 && t4.keyCode !== 67 ||
|
|
34418
|
-
}),
|
|
34419
|
-
l2.innerHTML = JSON.stringify(t3.getSaveObject(), void 0, 2),
|
|
34420
|
-
}),
|
|
34518
|
+
td.bind(l2, "keydown", function(t4) {
|
|
34519
|
+
!t4.metaKey || t4.which !== 67 && t4.keyCode !== 67 || yd.hide();
|
|
34520
|
+
}), td.bind(n2, "click", function() {
|
|
34521
|
+
l2.innerHTML = JSON.stringify(t3.getSaveObject(), void 0, 2), yd.show(), l2.focus(), l2.select();
|
|
34522
|
+
}), td.bind(i2, "click", function() {
|
|
34421
34523
|
t3.save();
|
|
34422
|
-
}),
|
|
34524
|
+
}), td.bind(r3, "click", function() {
|
|
34423
34525
|
var e4 = prompt("Enter a new preset name.");
|
|
34424
34526
|
e4 && t3.saveAs(e4);
|
|
34425
|
-
}),
|
|
34527
|
+
}), td.bind(o3, "click", function() {
|
|
34426
34528
|
t3.revert();
|
|
34427
34529
|
});
|
|
34428
34530
|
}
|
|
34429
|
-
function
|
|
34531
|
+
function Dd(t3) {
|
|
34430
34532
|
var e3 = void 0;
|
|
34431
34533
|
function n2(n3) {
|
|
34432
34534
|
return n3.preventDefault(), t3.width += e3 - n3.clientX, t3.onResize(), e3 = n3.clientX, false;
|
|
34433
34535
|
}
|
|
34434
34536
|
function i2() {
|
|
34435
|
-
|
|
34537
|
+
td.removeClass(t3.__closeButton, Td.CLASS_DRAG), td.unbind(window, "mousemove", n2), td.unbind(window, "mouseup", i2);
|
|
34436
34538
|
}
|
|
34437
34539
|
function r3(r4) {
|
|
34438
|
-
return r4.preventDefault(), e3 = r4.clientX,
|
|
34540
|
+
return r4.preventDefault(), e3 = r4.clientX, td.addClass(t3.__closeButton, Td.CLASS_DRAG), td.bind(window, "mousemove", n2), td.bind(window, "mouseup", i2), false;
|
|
34439
34541
|
}
|
|
34440
|
-
t3.__resize_handle = document.createElement("div"),
|
|
34542
|
+
t3.__resize_handle = document.createElement("div"), Dc.extend(t3.__resize_handle.style, { width: "6px", marginLeft: "-3px", height: "200px", cursor: "ew-resize", position: "absolute" }), td.bind(t3.__resize_handle, "mousedown", r3), td.bind(t3.__closeButton, "mousedown", r3), t3.domElement.insertBefore(t3.__resize_handle, t3.domElement.firstElementChild);
|
|
34441
34543
|
}
|
|
34442
|
-
function
|
|
34544
|
+
function Nd(t3, e3) {
|
|
34443
34545
|
t3.domElement.style.width = e3 + "px", t3.__save_row && t3.autoPlace && (t3.__save_row.style.width = e3 + "px"), t3.__closeButton && (t3.__closeButton.style.width = e3 + "px");
|
|
34444
34546
|
}
|
|
34445
|
-
function
|
|
34547
|
+
function Fd(t3, e3) {
|
|
34446
34548
|
var n2 = {};
|
|
34447
|
-
return
|
|
34549
|
+
return Dc.each(t3.__rememberedObjects, function(i2, r3) {
|
|
34448
34550
|
var o3 = {}, s3 = t3.__rememberedObjectIndecesToControllers[r3];
|
|
34449
|
-
|
|
34551
|
+
Dc.each(s3, function(t4, n3) {
|
|
34450
34552
|
o3[n3] = e3 ? t4.initialValue : t4.getValue();
|
|
34451
34553
|
}), n2[r3] = o3;
|
|
34452
34554
|
}), n2;
|
|
34453
34555
|
}
|
|
34454
|
-
|
|
34455
|
-
|
|
34456
|
-
t3.domElement.style.display =
|
|
34556
|
+
Td.toggleHide = function() {
|
|
34557
|
+
wd = !wd, Dc.each(Sd, function(t3) {
|
|
34558
|
+
t3.domElement.style.display = wd ? "none" : "";
|
|
34457
34559
|
});
|
|
34458
|
-
},
|
|
34459
|
-
document.activeElement.type === "text" || t3.which !== 72 && t3.keyCode !== 72 ||
|
|
34460
|
-
},
|
|
34461
|
-
return
|
|
34560
|
+
}, Td.CLASS_AUTO_PLACE = "a", Td.CLASS_AUTO_PLACE_CONTAINER = "ac", Td.CLASS_MAIN = "main", Td.CLASS_CONTROLLER_ROW = "cr", Td.CLASS_TOO_TALL = "taller-than-window", Td.CLASS_CLOSED = "closed", Td.CLASS_CLOSE_BUTTON = "close-button", Td.CLASS_CLOSE_TOP = "close-top", Td.CLASS_CLOSE_BOTTOM = "close-bottom", Td.CLASS_DRAG = "drag", Td.DEFAULT_WIDTH = 245, Td.TEXT_CLOSED = "Close Controls", Td.TEXT_OPEN = "Open Controls", Td._keydownHandler = function(t3) {
|
|
34561
|
+
document.activeElement.type === "text" || t3.which !== 72 && t3.keyCode !== 72 || Td.toggleHide();
|
|
34562
|
+
}, td.bind(window, "keydown", Td._keydownHandler, false), Dc.extend(Td.prototype, { add: function(t3, e3) {
|
|
34563
|
+
return Cd(this, t3, e3, { factoryArgs: Array.prototype.slice.call(arguments, 2) });
|
|
34462
34564
|
}, addColor: function(t3, e3) {
|
|
34463
|
-
return
|
|
34565
|
+
return Cd(this, t3, e3, { color: true });
|
|
34464
34566
|
}, remove: function(t3) {
|
|
34465
34567
|
this.__ul.removeChild(t3.__li), this.__controllers.splice(this.__controllers.indexOf(t3), 1);
|
|
34466
34568
|
var e3 = this;
|
|
34467
|
-
|
|
34569
|
+
Dc.defer(function() {
|
|
34468
34570
|
e3.onResize();
|
|
34469
34571
|
});
|
|
34470
34572
|
}, destroy: function() {
|
|
34471
34573
|
if (this.parent)
|
|
34472
34574
|
throw new Error("Only the root GUI should be removed with .destroy(). For subfolders, use gui.removeFolder(folder) instead.");
|
|
34473
|
-
this.autoPlace &&
|
|
34575
|
+
this.autoPlace && bd.removeChild(this.domElement);
|
|
34474
34576
|
var t3 = this;
|
|
34475
|
-
|
|
34577
|
+
Dc.each(this.__folders, function(e3) {
|
|
34476
34578
|
t3.removeFolder(e3);
|
|
34477
|
-
}),
|
|
34579
|
+
}), td.unbind(window, "keydown", Td._keydownHandler, false), Md(this);
|
|
34478
34580
|
}, addFolder: function(t3) {
|
|
34479
34581
|
if (this.__folders[t3] !== void 0)
|
|
34480
34582
|
throw new Error('You already have a folder in this GUI by the name "' + t3 + '"');
|
|
34481
34583
|
var e3 = { name: t3, parent: this };
|
|
34482
34584
|
e3.autoPlace = this.autoPlace, this.load && this.load.folders && this.load.folders[t3] && (e3.closed = this.load.folders[t3].closed, e3.load = this.load.folders[t3]);
|
|
34483
|
-
var n2 = new
|
|
34585
|
+
var n2 = new Td(e3);
|
|
34484
34586
|
this.__folders[t3] = n2;
|
|
34485
|
-
var i2 =
|
|
34486
|
-
return
|
|
34587
|
+
var i2 = Ed(this, n2.domElement);
|
|
34588
|
+
return td.addClass(i2, "folder"), n2;
|
|
34487
34589
|
}, removeFolder: function(t3) {
|
|
34488
|
-
this.__ul.removeChild(t3.domElement.parentElement), delete this.__folders[t3.name], this.load && this.load.folders && this.load.folders[t3.name] && delete this.load.folders[t3.name],
|
|
34590
|
+
this.__ul.removeChild(t3.domElement.parentElement), delete this.__folders[t3.name], this.load && this.load.folders && this.load.folders[t3.name] && delete this.load.folders[t3.name], Md(t3);
|
|
34489
34591
|
var e3 = this;
|
|
34490
|
-
|
|
34592
|
+
Dc.each(t3.__folders, function(e4) {
|
|
34491
34593
|
t3.removeFolder(e4);
|
|
34492
|
-
}),
|
|
34594
|
+
}), Dc.defer(function() {
|
|
34493
34595
|
e3.onResize();
|
|
34494
34596
|
});
|
|
34495
34597
|
}, open: function() {
|
|
@@ -34503,60 +34605,60 @@ void main() {
|
|
|
34503
34605
|
}, onResize: function() {
|
|
34504
34606
|
var t3 = this.getRoot();
|
|
34505
34607
|
if (t3.scrollable) {
|
|
34506
|
-
var e3 =
|
|
34507
|
-
|
|
34508
|
-
t3.autoPlace && e4 === t3.__save_row || (n2 +=
|
|
34509
|
-
}), window.innerHeight - e3 - 20 < n2 ? (
|
|
34608
|
+
var e3 = td.getOffset(t3.__ul).top, n2 = 0;
|
|
34609
|
+
Dc.each(t3.__ul.childNodes, function(e4) {
|
|
34610
|
+
t3.autoPlace && e4 === t3.__save_row || (n2 += td.getHeight(e4));
|
|
34611
|
+
}), window.innerHeight - e3 - 20 < n2 ? (td.addClass(t3.domElement, Td.CLASS_TOO_TALL), t3.__ul.style.height = window.innerHeight - e3 - 20 + "px") : (td.removeClass(t3.domElement, Td.CLASS_TOO_TALL), t3.__ul.style.height = "auto");
|
|
34510
34612
|
}
|
|
34511
|
-
t3.__resize_handle &&
|
|
34613
|
+
t3.__resize_handle && Dc.defer(function() {
|
|
34512
34614
|
t3.__resize_handle.style.height = t3.__ul.offsetHeight + "px";
|
|
34513
34615
|
}), t3.__closeButton && (t3.__closeButton.style.width = t3.width + "px");
|
|
34514
|
-
}, onResizeDebounced:
|
|
34616
|
+
}, onResizeDebounced: Dc.debounce(function() {
|
|
34515
34617
|
this.onResize();
|
|
34516
34618
|
}, 50), remember: function() {
|
|
34517
|
-
if (
|
|
34619
|
+
if (Dc.isUndefined(yd) && ((yd = new vd()).domElement.innerHTML = fd), this.parent)
|
|
34518
34620
|
throw new Error("You can only call remember on a top level GUI.");
|
|
34519
34621
|
var t3 = this;
|
|
34520
|
-
|
|
34521
|
-
t3.__rememberedObjects.length === 0 &&
|
|
34522
|
-
}), this.autoPlace &&
|
|
34622
|
+
Dc.each(Array.prototype.slice.call(arguments), function(e3) {
|
|
34623
|
+
t3.__rememberedObjects.length === 0 && Od(t3), t3.__rememberedObjects.indexOf(e3) === -1 && t3.__rememberedObjects.push(e3);
|
|
34624
|
+
}), this.autoPlace && Nd(this, this.width);
|
|
34523
34625
|
}, getRoot: function() {
|
|
34524
34626
|
for (var t3 = this; t3.parent; )
|
|
34525
34627
|
t3 = t3.parent;
|
|
34526
34628
|
return t3;
|
|
34527
34629
|
}, getSaveObject: function() {
|
|
34528
34630
|
var t3 = this.load;
|
|
34529
|
-
return t3.closed = this.closed, this.__rememberedObjects.length > 0 && (t3.preset = this.preset, t3.remembered || (t3.remembered = {}), t3.remembered[this.preset] =
|
|
34631
|
+
return t3.closed = this.closed, this.__rememberedObjects.length > 0 && (t3.preset = this.preset, t3.remembered || (t3.remembered = {}), t3.remembered[this.preset] = Fd(this)), t3.folders = {}, Dc.each(this.__folders, function(e3, n2) {
|
|
34530
34632
|
t3.folders[n2] = e3.getSaveObject();
|
|
34531
34633
|
}), t3;
|
|
34532
34634
|
}, save: function() {
|
|
34533
|
-
this.load.remembered || (this.load.remembered = {}), this.load.remembered[this.preset] =
|
|
34635
|
+
this.load.remembered || (this.load.remembered = {}), this.load.remembered[this.preset] = Fd(this), Ad(this, false), this.saveToLocalStorageIfPossible();
|
|
34534
34636
|
}, saveAs: function(t3) {
|
|
34535
|
-
this.load.remembered || (this.load.remembered = {}, this.load.remembered.Default =
|
|
34637
|
+
this.load.remembered || (this.load.remembered = {}, this.load.remembered.Default = Fd(this, true)), this.load.remembered[t3] = Fd(this), this.preset = t3, Id(this, t3, true), this.saveToLocalStorageIfPossible();
|
|
34536
34638
|
}, revert: function(t3) {
|
|
34537
|
-
|
|
34538
|
-
this.getRoot().load.remembered ?
|
|
34539
|
-
}, this),
|
|
34639
|
+
Dc.each(this.__controllers, function(e3) {
|
|
34640
|
+
this.getRoot().load.remembered ? Pd(t3 || this.getRoot(), e3) : e3.setValue(e3.initialValue), e3.__onFinishChange && e3.__onFinishChange.call(e3, e3.getValue());
|
|
34641
|
+
}, this), Dc.each(this.__folders, function(t4) {
|
|
34540
34642
|
t4.revert(t4);
|
|
34541
|
-
}), t3 ||
|
|
34643
|
+
}), t3 || Ad(this.getRoot(), false);
|
|
34542
34644
|
}, listen: function(t3) {
|
|
34543
34645
|
var e3 = this.__listening.length === 0;
|
|
34544
34646
|
this.__listening.push(t3), e3 && function t4(e4) {
|
|
34545
|
-
e4.length !== 0 &&
|
|
34647
|
+
e4.length !== 0 && gd.call(window, function() {
|
|
34546
34648
|
t4(e4);
|
|
34547
34649
|
});
|
|
34548
|
-
|
|
34650
|
+
Dc.each(e4, function(t5) {
|
|
34549
34651
|
t5.updateDisplay();
|
|
34550
34652
|
});
|
|
34551
34653
|
}(this.__listening);
|
|
34552
34654
|
}, updateDisplay: function() {
|
|
34553
|
-
|
|
34655
|
+
Dc.each(this.__controllers, function(t3) {
|
|
34554
34656
|
t3.updateDisplay();
|
|
34555
|
-
}),
|
|
34657
|
+
}), Dc.each(this.__folders, function(t3) {
|
|
34556
34658
|
t3.updateDisplay();
|
|
34557
34659
|
});
|
|
34558
34660
|
} });
|
|
34559
|
-
var
|
|
34661
|
+
var Bd = Td, kd = function() {
|
|
34560
34662
|
function t3(t4) {
|
|
34561
34663
|
this.runTime = { fps: 0, resolution: "" }, this.target = t4.target, this.data = t4.params, this.player = t4.player, this.gui = this.createControllerGUI(), this.createStats(), this.addEventListener();
|
|
34562
34664
|
}
|
|
@@ -34566,7 +34668,7 @@ void main() {
|
|
|
34566
34668
|
t4.player.view && (t4.controller.runTimeFps.setValue(t4.player.runtime.fps), t4.controller.runTimeResolution.setValue(t4.player.view.width + "*" + t4.player.view.height));
|
|
34567
34669
|
}, 500);
|
|
34568
34670
|
}, t3.prototype.createControllerGUI = function() {
|
|
34569
|
-
var t4, e3, n2, i2, r3, o3 = new
|
|
34671
|
+
var t4, e3, n2, i2, r3, o3 = new Bd({ autoPlace: true, closed: true });
|
|
34570
34672
|
return o3.domElement.style.opacity = ".6", o3.domElement.style.transformOrigin = "100% 0", o3.domElement.style.transform = "scale(1.4)", this.target.appendChild(o3.domElement), o3.domElement.style.position = "absolute", o3.domElement.style.right = "0", o3.domElement.style.top = "0", o3.domElement.style.zIndex = "2", this.controller = { runTimeFps: o3.add({ FPS: 0 }, "FPS", 0), runTimeResolution: o3.add({ "\u5206\u8FA8\u7387": "" }, "\u5206\u8FA8\u7387", ""), autoResolution: o3.add({ "\u81EA\u52A8\u5206\u8FA8\u7387": (t4 = this.data.autoResolution) !== null && t4 !== void 0 && t4 }, "\u81EA\u52A8\u5206\u8FA8\u7387", true), autoFps: o3.add({ "\u81EA\u52A8fps": (e3 = this.data.autoFPS) === null || e3 === void 0 || e3 }, "\u81EA\u52A8fps", true), moreCalculation: o3.add({ "\u989D\u5916\u8BA1\u7B97": 0 }, "\u989D\u5916\u8BA1\u7B97", 0, 100), minFPS: o3.add({ "\u6700\u4F4Efps": (n2 = this.data.minFPS) !== null && n2 !== void 0 ? n2 : 40 }, "\u6700\u4F4Efps", 0, 60), maxFPS: o3.add({ "\u6700\u9AD8fps": (i2 = this.data.maxFPS) !== null && i2 !== void 0 ? i2 : 50 }, "\u6700\u9AD8fps", 0, 60), resolution: o3.add({ "\u76EE\u6807\u5206\u8FA8\u500D\u7387": (r3 = this.data.resolution) !== null && r3 !== void 0 ? r3 : window.devicePixelRatio }, "\u76EE\u6807\u5206\u8FA8\u500D\u7387", 0.5, 4) }, this.controller.runTimeFps.disabled = true, this.controller.runTimeResolution.disabled = true, o3;
|
|
34571
34673
|
}, t3.prototype.addEventListener = function() {
|
|
34572
34674
|
var t4, e3 = this;
|
|
@@ -34593,7 +34695,7 @@ void main() {
|
|
|
34593
34695
|
} catch (t4) {
|
|
34594
34696
|
}
|
|
34595
34697
|
}, t3;
|
|
34596
|
-
}(),
|
|
34698
|
+
}(), Ud = function() {
|
|
34597
34699
|
function t3(t4) {
|
|
34598
34700
|
var e3 = this;
|
|
34599
34701
|
this.tasks = [], this.schedule = function() {
|
|
@@ -34606,7 +34708,7 @@ void main() {
|
|
|
34606
34708
|
return t3.prototype.addTask = function(t4) {
|
|
34607
34709
|
this.tasks.push(t4);
|
|
34608
34710
|
}, t3;
|
|
34609
|
-
}(),
|
|
34711
|
+
}(), Gd = function() {
|
|
34610
34712
|
function t3() {
|
|
34611
34713
|
this.autoUnlock = Object.create(null), this.locks = Object.create(null);
|
|
34612
34714
|
}
|
|
@@ -34620,7 +34722,7 @@ void main() {
|
|
|
34620
34722
|
}, t3.prototype.isLocked = function(t4) {
|
|
34621
34723
|
return !!this.locks[t4];
|
|
34622
34724
|
}, t3;
|
|
34623
|
-
}(),
|
|
34725
|
+
}(), Hd = function() {
|
|
34624
34726
|
var t3 = function(e3, n2) {
|
|
34625
34727
|
return (t3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(t4, e4) {
|
|
34626
34728
|
t4.__proto__ = e4;
|
|
@@ -34637,14 +34739,14 @@ void main() {
|
|
|
34637
34739
|
}
|
|
34638
34740
|
t3(e3, n2), e3.prototype = n2 === null ? Object.create(n2) : (i2.prototype = n2.prototype, new i2());
|
|
34639
34741
|
};
|
|
34640
|
-
}(),
|
|
34641
|
-
return (
|
|
34742
|
+
}(), zd = function() {
|
|
34743
|
+
return (zd = Object.assign || function(t3) {
|
|
34642
34744
|
for (var e3, n2 = 1, i2 = arguments.length; n2 < i2; n2++)
|
|
34643
34745
|
for (var r3 in e3 = arguments[n2])
|
|
34644
34746
|
Object.prototype.hasOwnProperty.call(e3, r3) && (t3[r3] = e3[r3]);
|
|
34645
34747
|
return t3;
|
|
34646
34748
|
}).apply(this, arguments);
|
|
34647
|
-
},
|
|
34749
|
+
}, jd = function(t3, e3, n2, i2) {
|
|
34648
34750
|
return new (n2 || (n2 = Promise))(function(r3, o3) {
|
|
34649
34751
|
function s3(t4) {
|
|
34650
34752
|
try {
|
|
@@ -34668,7 +34770,7 @@ void main() {
|
|
|
34668
34770
|
}
|
|
34669
34771
|
u2((i2 = i2.apply(t3, e3 || [])).next());
|
|
34670
34772
|
});
|
|
34671
|
-
},
|
|
34773
|
+
}, Vd = function(t3, e3) {
|
|
34672
34774
|
var n2, i2, r3, o3, s3 = { label: 0, sent: function() {
|
|
34673
34775
|
if (1 & r3[0])
|
|
34674
34776
|
throw r3[1];
|
|
@@ -34733,26 +34835,26 @@ void main() {
|
|
|
34733
34835
|
}
|
|
34734
34836
|
};
|
|
34735
34837
|
window.__slide_local_logger__ || (window.__slide_local_logger__ = r2.createInstance({ name: "_slide_local_log_", driver: r2.INDEXEDDB, version: 1 }));
|
|
34736
|
-
var
|
|
34838
|
+
var Wd = window.__slide_local_logger__, Xd = window.ResizeObserver || Mc, qd = { syncDispatch: "syncDispatch", syncReceive: "syncReceive", renderStart: "renderStart", renderEnd: "renderEnd", renderError: "renderError", slideChange: "slideChange", mainSeqStepStart: "mainSeqStepStart", mainSeqStepEnd: "mainSeqStepEnd", animateStart: "animateStart", animateEnd: "animateEnd", stateChange: "stateChange" }, Yd = { taskId: "", url: "", currentSlideIndex: -1, mainSeqStep: -1, mainSeqState: null, mediaState: Object.create(null), interactiveSeqState: Object.create(null) }, Zd = function(t3) {
|
|
34737
34839
|
function e3(e4) {
|
|
34738
34840
|
var n2 = t3.call(this) || this;
|
|
34739
|
-
return n2.__slideState = Object(a.cloneDeep)(
|
|
34841
|
+
return n2.__slideState = Object(a.cloneDeep)(Yd), n2.resize = false, n2.isAnimating = false, n2.renderingTaskManager = new Rc(), 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 Xd(function() {
|
|
34740
34842
|
return n2.frameResizeHandler();
|
|
34741
34843
|
}), n2.timestamp = function() {
|
|
34742
34844
|
return Date.now();
|
|
34743
|
-
}, n2.mode = "local", n2.log = "", n2.logId = "", n2.lastEmitedState = null, n2.playerController = null, n2.lock = new
|
|
34744
|
-
return
|
|
34845
|
+
}, n2.mode = "local", n2.log = "", n2.logId = "", n2.lastEmitedState = null, n2.playerController = null, n2.lock = new Gd(), n2.isInitResized = false, n2.cacheImage = document.createElement("img"), n2.persistLog = function() {
|
|
34846
|
+
return jd(n2, void 0, void 0, function() {
|
|
34745
34847
|
var t4, e5;
|
|
34746
|
-
return
|
|
34848
|
+
return Vd(this, function(n3) {
|
|
34747
34849
|
switch (n3.label) {
|
|
34748
34850
|
case 0:
|
|
34749
|
-
if (!
|
|
34851
|
+
if (!Wd || !this.logId)
|
|
34750
34852
|
return [3, 5];
|
|
34751
34853
|
n3.label = 1;
|
|
34752
34854
|
case 1:
|
|
34753
|
-
return n3.trys.push([1, 4, , 5]), t4 = this.log, [4,
|
|
34855
|
+
return n3.trys.push([1, 4, , 5]), t4 = this.log, [4, Wd.getItem(this.logId)];
|
|
34754
34856
|
case 2:
|
|
34755
|
-
return e5 = n3.sent() || "", [4,
|
|
34857
|
+
return e5 = n3.sent() || "", [4, Wd.setItem(this.logId, e5 + t4)];
|
|
34756
34858
|
case 3:
|
|
34757
34859
|
return n3.sent(), this.log = "", [3, 5];
|
|
34758
34860
|
case 4:
|
|
@@ -34767,12 +34869,12 @@ void main() {
|
|
|
34767
34869
|
}, n2.handleSlideStateLog = function() {
|
|
34768
34870
|
console.log(n2.logId), console.log(JSON.stringify(n2.slideState, null, 2));
|
|
34769
34871
|
}, n2.handleLogDownload = function() {
|
|
34770
|
-
return
|
|
34872
|
+
return jd(n2, void 0, void 0, function() {
|
|
34771
34873
|
var t4, e5, n3;
|
|
34772
|
-
return
|
|
34874
|
+
return Vd(this, function(i2) {
|
|
34773
34875
|
switch (i2.label) {
|
|
34774
34876
|
case 0:
|
|
34775
|
-
return t4 = "",
|
|
34877
|
+
return t4 = "", Wd ? (e5 = t4, [4, Wd.getItem(this.logId)]) : [3, 2];
|
|
34776
34878
|
case 1:
|
|
34777
34879
|
t4 = e5 + (i2.sent() || ""), i2.label = 2;
|
|
34778
34880
|
case 2:
|
|
@@ -34781,9 +34883,9 @@ void main() {
|
|
|
34781
34883
|
});
|
|
34782
34884
|
});
|
|
34783
34885
|
}, n2.receiveSyncHandler = function(t4) {
|
|
34784
|
-
return
|
|
34886
|
+
return jd(n2, void 0, void 0, function() {
|
|
34785
34887
|
var e5, n3, i2, r3, o3 = this;
|
|
34786
|
-
return
|
|
34888
|
+
return Vd(this, function(s3) {
|
|
34787
34889
|
switch (s3.label) {
|
|
34788
34890
|
case 0:
|
|
34789
34891
|
return this.log += "=== sync receive [" + new Date().toISOString() + "] ===\n", this.log += JSON.stringify(t4, null, 2), this.log += "\n\n", t4.type !== "nextStep" ? [3, 1] : (this.mainSeqStep !== t4.next - 1 && this.mainSeqStep + 1 !== this.mainSeqLength && this.player ? (this.setMainSeqStep(t4.next, "start"), this.player.nextTick(function() {
|
|
@@ -34807,16 +34909,16 @@ void main() {
|
|
|
34807
34909
|
});
|
|
34808
34910
|
});
|
|
34809
34911
|
}, n2.handlePrevSlide = function() {
|
|
34810
|
-
return
|
|
34912
|
+
return jd(n2, void 0, void 0, function() {
|
|
34811
34913
|
var t4;
|
|
34812
|
-
return
|
|
34914
|
+
return Vd(this, function(e5) {
|
|
34813
34915
|
return this.player ? ((t4 = this.player.currentIndex - 1) >= 1 && this.renderSlide(t4, false), [2]) : [2];
|
|
34814
34916
|
});
|
|
34815
34917
|
});
|
|
34816
34918
|
}, n2.handleNextSlide = function() {
|
|
34817
|
-
return
|
|
34919
|
+
return jd(n2, void 0, void 0, function() {
|
|
34818
34920
|
var t4;
|
|
34819
|
-
return
|
|
34921
|
+
return Vd(this, function(e5) {
|
|
34820
34922
|
return this.player ? ((t4 = this.player.currentIndex + 1) <= this.slideCount && this.renderSlide(t4, true), [2]) : [2];
|
|
34821
34923
|
});
|
|
34822
34924
|
});
|
|
@@ -34826,50 +34928,50 @@ void main() {
|
|
|
34826
34928
|
n2.renderSlide(t4, e5);
|
|
34827
34929
|
} else
|
|
34828
34930
|
t4 === -1 && n2.renderSlide(n2.slideCount, true);
|
|
34829
|
-
}, e4.timestamp && (n2.timestamp = e4.timestamp), n2.config = e4, n2.syncQueue = new
|
|
34931
|
+
}, e4.timestamp && (n2.timestamp = e4.timestamp), n2.config = e4, n2.syncQueue = new Ud(n2.receiveSyncHandler), n2.mode = e4.mode, n2.anchor = e4.anchor, n2.resize = e4.resize || false, n2.interactive = e4.interactive, n2.frame.style.cssText = "width:100%;height:100%;display:flex;justify-content:center;align-items:center;visibility:hidden;", n2.setMedianControllerAttribute(), n2.frame.appendChild(n2.medianController), n2.anchor.appendChild(n2.frame), n2.frameResizeObserver.observe(n2.frame), n2.on(qd.syncReceive, function(t4) {
|
|
34830
34932
|
n2.lock.unlock(t4.type, t4.uuid), n2.syncQueue.addTask(t4);
|
|
34831
34933
|
}), n2.renderingTaskManager.eventHub.on("task-error", function(t4) {
|
|
34832
34934
|
var e5 = t4.error, i2 = t4.task;
|
|
34833
|
-
n2.emit(
|
|
34935
|
+
n2.emit(qd.renderError, { error: e5, index: i2.slideIndex });
|
|
34834
34936
|
}), window.addEventListener("__slide_log__", n2.handleLogDownload), window.addEventListener("__slide_state__", n2.handleSlideStateLog), window.addEventListener("__slide_ref__", n2.handleSlideRef), n2.persistLogId = window.setInterval(n2.persistLog, 5e3), n2.resizeView = Object(a.debounce)(n2.resizeView.bind(n2), 50), n2.initPlayer(e4), n2;
|
|
34835
34937
|
}
|
|
34836
|
-
return
|
|
34938
|
+
return Hd(e3, t3), e3.prototype.initPlayer = function(t4) {
|
|
34837
34939
|
var e4 = this;
|
|
34838
|
-
this.player = new
|
|
34839
|
-
e4.isLoading = true, e4.emit(
|
|
34840
|
-
}), this.player.on(
|
|
34841
|
-
e4.isLoading = false, e4.emit(
|
|
34842
|
-
}), this.player.on(
|
|
34843
|
-
e4.__slideState.currentSlideIndex = t5, e4.emit(
|
|
34844
|
-
}), this.player.on(
|
|
34940
|
+
this.player = new Gh(this.mode), this.player.setInteractive(this.interactive), this.player.updateConfig(t4.renderOptions || {}), this.player.view && this.frame.appendChild(this.player.view), this.player.on(Uh.renderStart, function(t5) {
|
|
34941
|
+
e4.isLoading = true, e4.emit(qd.renderStart, t5);
|
|
34942
|
+
}), this.player.on(Uh.renderEnd, function(t5) {
|
|
34943
|
+
e4.isLoading = false, e4.emit(qd.renderEnd, t5);
|
|
34944
|
+
}), this.player.on(Uh.slideChange, function(t5) {
|
|
34945
|
+
e4.__slideState.currentSlideIndex = t5, e4.emit(qd.slideChange, t5);
|
|
34946
|
+
}), this.player.on(Uh.mainSeqStateChange, function(t5) {
|
|
34845
34947
|
e4.__slideState.mainSeqState = t5, e4.emitStateChange();
|
|
34846
|
-
}), this.player.on(
|
|
34948
|
+
}), this.player.on(Uh.mainSeqStepChange, function(t5) {
|
|
34847
34949
|
e4.__slideState.mainSeqStep = t5, e4.emitStateChange();
|
|
34848
|
-
}), this.player.on(
|
|
34950
|
+
}), this.player.on(Uh.interactiveSeqStateChange, function(t5) {
|
|
34849
34951
|
var n2 = t5.id, i2 = t5.state;
|
|
34850
34952
|
e4.__slideState.interactiveSeqState[n2] = i2, e4.emitStateChange();
|
|
34851
|
-
}), this.player.on(
|
|
34852
|
-
e4.isAnimating !== true && (e4.isAnimating = true, e4.emit(
|
|
34853
|
-
}), this.player.on(
|
|
34854
|
-
e4.isAnimating !== false && (e4.isAnimating = false, e4.emit(
|
|
34855
|
-
}), this.player.on(
|
|
34953
|
+
}), this.player.on(Uh.animateStart, function() {
|
|
34954
|
+
e4.isAnimating !== true && (e4.isAnimating = true, e4.emit(qd.animateStart));
|
|
34955
|
+
}), this.player.on(Uh.animateEnd, function() {
|
|
34956
|
+
e4.isAnimating !== false && (e4.isAnimating = false, e4.emit(qd.animateEnd));
|
|
34957
|
+
}), this.player.on(Uh.interactiveSeqNext, function(t5) {
|
|
34856
34958
|
e4.emitSyncDispatch({ slideIndex: e4.__slideState.currentSlideIndex, type: "interactiveAnim", seqId: t5 }), e4.emitStateChange();
|
|
34857
|
-
}), this.player.on(
|
|
34858
|
-
e4.emit(
|
|
34859
|
-
}), this.player.on(
|
|
34860
|
-
e4.emit(
|
|
34861
|
-
}), this.player.on(
|
|
34959
|
+
}), this.player.on(Uh.mainSeqStepStart, function(t5) {
|
|
34960
|
+
e4.emit(qd.mainSeqStepStart, t5);
|
|
34961
|
+
}), this.player.on(Uh.mainSeqStepEnd, function(t5) {
|
|
34962
|
+
e4.emit(qd.mainSeqStepEnd, t5);
|
|
34963
|
+
}), this.player.on(Uh.mediaPlay, function(t5) {
|
|
34862
34964
|
var n2 = { type: "play", time: e4.timestamp() - 1e3 * t5.time };
|
|
34863
34965
|
e4.__slideState.mediaState[t5.id] = n2, e4.emitSyncDispatch({ slideIndex: e4.__slideState.currentSlideIndex, type: "mediaPlay", id: t5.id, state: n2 }), e4.emitStateChange();
|
|
34864
|
-
}), this.player.on(
|
|
34966
|
+
}), this.player.on(Uh.mediaPause, function(t5) {
|
|
34865
34967
|
var n2 = { type: "pause", time: t5.time };
|
|
34866
34968
|
e4.__slideState.mediaState[t5.id] = n2, e4.emitSyncDispatch({ slideIndex: e4.__slideState.currentSlideIndex, type: "mediaPause", id: t5.id, state: n2 }), e4.emitStateChange();
|
|
34867
|
-
}), this.player.on(
|
|
34969
|
+
}), this.player.on(Uh.mediaSeek, function(t5) {
|
|
34868
34970
|
var n2 = { type: "pause", time: 0 };
|
|
34869
34971
|
t5.isPlaying ? (n2.type = "play", e4.__slideState.mediaState[t5.id] ? n2.time = e4.__slideState.mediaState[t5.id].time - 1e3 * t5.time : n2.time = e4.timestamp() - 1e3 * t5.time, e4.__slideState.mediaState[t5.id] = n2) : (n2.type = "pause", n2.time = t5.time, e4.__slideState.mediaState[t5.id] = n2), e4.emitSyncDispatch({ slideIndex: e4.__slideState.currentSlideIndex, type: "mediaSeek", id: t5.id, time: t5.time, state: n2 }), e4.emitStateChange();
|
|
34870
|
-
}), this.player.on(
|
|
34972
|
+
}), this.player.on(Uh.requestPrevSlide, this.handlePrevSlide), this.player.on(Uh.requestNextSlide, this.handleNextSlide), this.player.on(Uh.requestGotoSlide, this.handleGotoSlide), (t4 == null ? void 0 : t4.controller) && this.createController();
|
|
34871
34973
|
}, e3.prototype.createController = function() {
|
|
34872
|
-
this.player && (this.playerController = new
|
|
34974
|
+
this.player && (this.playerController = new kd({ player: this.player, params: this.player.config || {}, target: this.frame }));
|
|
34873
34975
|
}, e3.prototype.setMedianControllerAttribute = function() {
|
|
34874
34976
|
this.medianController.id = "median-container", this.medianController.style.position = "absolute", this.medianController.style.left = "0", this.medianController.style.top = "0", this.medianController.style.zIndex = "2";
|
|
34875
34977
|
}, e3.prototype.frameResizeHandler = function() {
|
|
@@ -34885,9 +34987,9 @@ void main() {
|
|
|
34885
34987
|
}
|
|
34886
34988
|
}, e3.prototype.setSlideState = function(t4) {
|
|
34887
34989
|
var e4, n2;
|
|
34888
|
-
return
|
|
34990
|
+
return jd(this, void 0, void 0, function() {
|
|
34889
34991
|
var i2, r3 = this;
|
|
34890
|
-
return
|
|
34992
|
+
return Vd(this, function(o3) {
|
|
34891
34993
|
switch (o3.label) {
|
|
34892
34994
|
case 0:
|
|
34893
34995
|
return this.log += "=== stateChange receive [" + new Date().toISOString() + "] ===\n", this.log += JSON.stringify(t4, null, 2), this.log += "\n\n", t4.taskId && t4.taskId !== this.__slideState.taskId && (this.__slideState.taskId = t4.taskId, (e4 = this.player) === null || e4 === void 0 || e4.setResourceData(t4.taskId, this.__slideState.url)), t4.url && t4.url !== this.__slideState.url && (this.__slideState.url = t4.url, (n2 = this.player) === null || n2 === void 0 || n2.setResourceData(this.__slideState.taskId, t4.url)), Number.isInteger(t4.currentSlideIndex) && t4.currentSlideIndex !== this.__slideState.currentSlideIndex ? (this.__slideState.currentSlideIndex = t4.currentSlideIndex, [4, this.doRenderSlide(t4.currentSlideIndex)]) : [3, 2];
|
|
@@ -34965,8 +35067,8 @@ void main() {
|
|
|
34965
35067
|
(n2 = this.player) === null || n2 === void 0 || n2.setResourceData(t4, e4), this.__slideState.taskId = t4, this.__slideState.url = e4, this.emitSyncDispatch({ slideIndex: this.__slideState.currentSlideIndex, type: "setResource", taskId: t4, url: e4 }), this.logId = t4 + "-" + Math.random().toString(32).substr(2);
|
|
34966
35068
|
}, e3.prototype._renderSlide = function(t4) {
|
|
34967
35069
|
var e4;
|
|
34968
|
-
return
|
|
34969
|
-
return
|
|
35070
|
+
return jd(this, void 0, void 0, function() {
|
|
35071
|
+
return Vd(this, function(n2) {
|
|
34970
35072
|
switch (n2.label) {
|
|
34971
35073
|
case 0:
|
|
34972
35074
|
return this.isLoading = true, [4, (e4 = this.player) === null || e4 === void 0 ? void 0 : e4.renderSlide(t4)];
|
|
@@ -35012,12 +35114,12 @@ void main() {
|
|
|
35012
35114
|
}, e3.prototype.emitStateChange = function() {
|
|
35013
35115
|
if (this.mode !== "local") {
|
|
35014
35116
|
var t4 = this.slideState;
|
|
35015
|
-
!Object(a.isEqual)(this.lastEmitedState, t4) && this.isSlideStateReady(t4) && (this.lastEmitedState = t4, this.emit(
|
|
35117
|
+
!Object(a.isEqual)(this.lastEmitedState, t4) && this.isSlideStateReady(t4) && (this.lastEmitedState = t4, this.emit(qd.stateChange, t4), this.log += "=== stateChange dispatch [" + new Date().toISOString() + "] ===\n", this.log += JSON.stringify(this.slideState, null, 2), this.log += "\n\n");
|
|
35016
35118
|
}
|
|
35017
35119
|
}, e3.prototype.emitSyncDispatch = function(t4) {
|
|
35018
35120
|
if (!this.lock.isLocked(t4.type)) {
|
|
35019
35121
|
var e4 = Math.random().toString(32).substr(2);
|
|
35020
|
-
this.lock.addLock(t4.type, e4), this.emit(
|
|
35122
|
+
this.lock.addLock(t4.type, e4), this.emit(qd.syncDispatch, zd(zd({}, t4), { uuid: e4 })), this.log += "=== sync dispatch [" + new Date().toISOString() + "] ===\n", this.log += JSON.stringify(t4, null, 2), this.log += "\n\n";
|
|
35021
35123
|
}
|
|
35022
35124
|
}, e3.prototype.setMainSeqStep = function(t4, e4) {
|
|
35023
35125
|
var n2;
|
|
@@ -35033,8 +35135,8 @@ void main() {
|
|
|
35033
35135
|
(t4 = this.player) === null || t4 === void 0 || t4.resume();
|
|
35034
35136
|
}, e3.prototype.getPreviewImage = function(t4) {
|
|
35035
35137
|
var e4;
|
|
35036
|
-
return
|
|
35037
|
-
return
|
|
35138
|
+
return jd(this, void 0, void 0, function() {
|
|
35139
|
+
return Vd(this, function(n2) {
|
|
35038
35140
|
return [2, ((e4 = this.player) === null || e4 === void 0 ? void 0 : e4.getPreviewImage(t4)) || null];
|
|
35039
35141
|
});
|
|
35040
35142
|
});
|
|
@@ -35044,17 +35146,17 @@ void main() {
|
|
|
35044
35146
|
var e4 = this.view.getBoundingClientRect(), n2 = this.player.getSnapshot() || "";
|
|
35045
35147
|
for (var i2 in this.cacheImage.src = n2, this.cacheImage.style.width = e4.width + "px", this.cacheImage.style.height = e4.height + "px", this.cacheImage.style.position = "absolute", this.cacheImage.style.zIndex = "999", this.frame.appendChild(this.cacheImage), this.player.destroy(), (t4 = this.playerController) === null || t4 === void 0 || t4.destroy(), this.player = void 0, this.__slideState.mediaState) {
|
|
35046
35148
|
var r3 = this.__slideState.mediaState[i2];
|
|
35047
|
-
this.__slideState.mediaState[i2] =
|
|
35149
|
+
this.__slideState.mediaState[i2] = zd(zd({}, r3), { frozenTime: this.timestamp() });
|
|
35048
35150
|
}
|
|
35049
35151
|
}
|
|
35050
35152
|
}, e3.prototype.release = function() {
|
|
35051
35153
|
var t4;
|
|
35052
|
-
return
|
|
35154
|
+
return jd(this, void 0, void 0, function() {
|
|
35053
35155
|
var e4, n2, i2, r3;
|
|
35054
|
-
return
|
|
35156
|
+
return Vd(this, function(o3) {
|
|
35055
35157
|
switch (o3.label) {
|
|
35056
35158
|
case 0:
|
|
35057
|
-
for (n2 in this.initPlayer(this.config), this.player.view && (this.player.view.style.visibility = "hidden"), e4 = this.__slideState, this.__slideState = Object(a.cloneDeep)(
|
|
35159
|
+
for (n2 in this.initPlayer(this.config), this.player.view && (this.player.view.style.visibility = "hidden"), e4 = this.__slideState, this.__slideState = Object(a.cloneDeep)(Yd), e4.mediaState)
|
|
35058
35160
|
(i2 = e4.mediaState[n2]).type === "play" && (r3 = Math.max((t4 = i2.frozenTime) !== null && t4 !== void 0 ? t4 : 0, i2.time), i2.time = this.timestamp() - (r3 - i2.time), i2.frozenTime = void 0);
|
|
35059
35161
|
return [4, this.setSlideState(e4)];
|
|
35060
35162
|
case 1:
|
|
@@ -35071,7 +35173,7 @@ void main() {
|
|
|
35071
35173
|
});
|
|
35072
35174
|
}, e3.prototype.destroy = function() {
|
|
35073
35175
|
var t4, e4, n2, i2;
|
|
35074
|
-
this.playerController && this.playerController.destroy(), this.frameResizeObserver.disconnect(), (t4 = this.player) === null || t4 === void 0 || t4.removeAllListeners(), (e4 = this.player) === null || e4 === void 0 || e4.destroy(), (n2 = this.player) === null || n2 === void 0 || n2.removeAllListeners(), window.removeEventListener("__slide_log__", this.handleLogDownload), window.removeEventListener("__slide_state__", this.handleSlideStateLog), window.removeEventListener("__slide_ref__", this.handleSlideRef), window.clearInterval(this.persistLogId),
|
|
35176
|
+
this.playerController && this.playerController.destroy(), this.frameResizeObserver.disconnect(), (t4 = this.player) === null || t4 === void 0 || t4.removeAllListeners(), (e4 = this.player) === null || e4 === void 0 || e4.destroy(), (n2 = this.player) === null || n2 === void 0 || n2.removeAllListeners(), window.removeEventListener("__slide_log__", this.handleLogDownload), window.removeEventListener("__slide_state__", this.handleSlideStateLog), window.removeEventListener("__slide_ref__", this.handleSlideRef), window.clearInterval(this.persistLogId), Wd && Wd.removeItem(this.logId).catch(function() {
|
|
35075
35177
|
});
|
|
35076
35178
|
try {
|
|
35077
35179
|
((i2 = this.player) === null || i2 === void 0 ? void 0 : i2.view) && this.anchor.removeChild(this.player.view);
|
|
@@ -35230,6 +35332,7 @@ class SlideController {
|
|
|
35230
35332
|
if (this.debug) {
|
|
35231
35333
|
console.log("[Slide] init with state", deepClone(state));
|
|
35232
35334
|
}
|
|
35335
|
+
this.syncStateOnceFlag = false;
|
|
35233
35336
|
slide.setSlideState(deepClone(state));
|
|
35234
35337
|
} else if (context.isAddApp) {
|
|
35235
35338
|
if (this.debug) {
|
|
@@ -35286,7 +35389,7 @@ class SlideController {
|
|
|
35286
35389
|
return this.slide.slideState.currentSlideIndex;
|
|
35287
35390
|
}
|
|
35288
35391
|
createSlide(anchor) {
|
|
35289
|
-
var _a;
|
|
35392
|
+
var _a, _b;
|
|
35290
35393
|
const slide = new Slide.Slide({
|
|
35291
35394
|
anchor,
|
|
35292
35395
|
interactive: true,
|
|
@@ -35299,7 +35402,7 @@ class SlideController {
|
|
|
35299
35402
|
autoFPS: true,
|
|
35300
35403
|
autoResolution: true,
|
|
35301
35404
|
resolution: (_a = this.context.getAppOptions()) == null ? void 0 : _a.resolution,
|
|
35302
|
-
transactionBgColor: "#f9f9fc"
|
|
35405
|
+
transactionBgColor: ((_b = this.context.getAppOptions()) == null ? void 0 : _b.bgColor) || "#f9f9fc"
|
|
35303
35406
|
},
|
|
35304
35407
|
timestamp: this.timestamp
|
|
35305
35408
|
});
|