@designcombo/events
Advanced tools
Comparing version 1.0.1 to 1.0.2
export * from './dispatcher'; | ||
export * from './types'; | ||
export * from './events'; |
@@ -1,20 +0,20 @@ | ||
var P = function(e, r) { | ||
return P = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(t, n) { | ||
t.__proto__ = n; | ||
} || function(t, n) { | ||
for (var o in n) Object.prototype.hasOwnProperty.call(n, o) && (t[o] = n[o]); | ||
}, P(e, r); | ||
var E = function(e, t) { | ||
return E = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(r, n) { | ||
r.__proto__ = n; | ||
} || function(r, n) { | ||
for (var o in n) Object.prototype.hasOwnProperty.call(n, o) && (r[o] = n[o]); | ||
}, E(e, t); | ||
}; | ||
function y(e, r) { | ||
if (typeof r != "function" && r !== null) | ||
throw new TypeError("Class extends value " + String(r) + " is not a constructor or null"); | ||
P(e, r); | ||
function t() { | ||
function b(e, t) { | ||
if (typeof t != "function" && t !== null) | ||
throw new TypeError("Class extends value " + String(t) + " is not a constructor or null"); | ||
E(e, t); | ||
function r() { | ||
this.constructor = e; | ||
} | ||
e.prototype = r === null ? Object.create(r) : (t.prototype = r.prototype, new t()); | ||
e.prototype = t === null ? Object.create(t) : (r.prototype = t.prototype, new r()); | ||
} | ||
function $(e) { | ||
var r = typeof Symbol == "function" && Symbol.iterator, t = r && e[r], n = 0; | ||
if (t) return t.call(e); | ||
function g(e) { | ||
var t = typeof Symbol == "function" && Symbol.iterator, r = t && e[t], n = 0; | ||
if (r) return r.call(e); | ||
if (e && typeof e.length == "number") return { | ||
@@ -25,15 +25,15 @@ next: function() { | ||
}; | ||
throw new TypeError(r ? "Object is not iterable." : "Symbol.iterator is not defined."); | ||
throw new TypeError(t ? "Object is not iterable." : "Symbol.iterator is not defined."); | ||
} | ||
function O(e, r) { | ||
var t = typeof Symbol == "function" && e[Symbol.iterator]; | ||
if (!t) return e; | ||
var n = t.call(e), o, i = [], s; | ||
function O(e, t) { | ||
var r = typeof Symbol == "function" && e[Symbol.iterator]; | ||
if (!r) return e; | ||
var n = r.call(e), o, i = [], s; | ||
try { | ||
for (; (r === void 0 || r-- > 0) && !(o = n.next()).done; ) i.push(o.value); | ||
} catch (c) { | ||
s = { error: c }; | ||
for (; (t === void 0 || t-- > 0) && !(o = n.next()).done; ) i.push(o.value); | ||
} catch (u) { | ||
s = { error: u }; | ||
} finally { | ||
try { | ||
o && !o.done && (t = n.return) && t.call(n); | ||
o && !o.done && (r = n.return) && r.call(n); | ||
} finally { | ||
@@ -45,37 +45,37 @@ if (s) throw s.error; | ||
} | ||
function L(e, r, t) { | ||
if (t || arguments.length === 2) for (var n = 0, o = r.length, i; n < o; n++) | ||
(i || !(n in r)) && (i || (i = Array.prototype.slice.call(r, 0, n)), i[n] = r[n]); | ||
return e.concat(i || Array.prototype.slice.call(r)); | ||
function x(e, t, r) { | ||
if (r || arguments.length === 2) for (var n = 0, o = t.length, i; n < o; n++) | ||
(i || !(n in t)) && (i || (i = Array.prototype.slice.call(t, 0, n)), i[n] = t[n]); | ||
return e.concat(i || Array.prototype.slice.call(t)); | ||
} | ||
function f(e) { | ||
function l(e) { | ||
return typeof e == "function"; | ||
} | ||
function G(e) { | ||
var r = function(n) { | ||
function D(e) { | ||
var t = function(n) { | ||
Error.call(n), n.stack = new Error().stack; | ||
}, t = e(r); | ||
return t.prototype = Object.create(Error.prototype), t.prototype.constructor = t, t; | ||
}, r = e(t); | ||
return r.prototype = Object.create(Error.prototype), r.prototype.constructor = r, r; | ||
} | ||
var m = G(function(e) { | ||
return function(t) { | ||
e(this), this.message = t ? t.length + ` errors occurred during unsubscription: | ||
` + t.map(function(n, o) { | ||
var m = D(function(e) { | ||
return function(r) { | ||
e(this), this.message = r ? r.length + ` errors occurred during unsubscription: | ||
` + r.map(function(n, o) { | ||
return o + 1 + ") " + n.toString(); | ||
}).join(` | ||
`) : "", this.name = "UnsubscriptionError", this.errors = t; | ||
`) : "", this.name = "UnsubscriptionError", this.errors = r; | ||
}; | ||
}); | ||
function g(e, r) { | ||
function P(e, t) { | ||
if (e) { | ||
var t = e.indexOf(r); | ||
0 <= t && e.splice(t, 1); | ||
var r = e.indexOf(t); | ||
0 <= r && e.splice(r, 1); | ||
} | ||
} | ||
var I = function() { | ||
function e(r) { | ||
this.initialTeardown = r, this.closed = !1, this._parentage = null, this._finalizers = null; | ||
var S = function() { | ||
function e(t) { | ||
this.initialTeardown = t, this.closed = !1, this._parentage = null, this._finalizers = null; | ||
} | ||
return e.prototype.unsubscribe = function() { | ||
var r, t, n, o, i; | ||
var t, r, n, o, i; | ||
if (!this.closed) { | ||
@@ -87,13 +87,13 @@ this.closed = !0; | ||
try { | ||
for (var c = $(s), u = c.next(); !u.done; u = c.next()) { | ||
var h = u.value; | ||
h.remove(this); | ||
for (var u = g(s), c = u.next(); !c.done; c = u.next()) { | ||
var f = c.value; | ||
f.remove(this); | ||
} | ||
} catch (l) { | ||
r = { error: l }; | ||
} catch (a) { | ||
t = { error: a }; | ||
} finally { | ||
try { | ||
u && !u.done && (t = c.return) && t.call(c); | ||
c && !c.done && (r = u.return) && r.call(u); | ||
} finally { | ||
if (r) throw r.error; | ||
if (t) throw t.error; | ||
} | ||
@@ -103,26 +103,26 @@ } | ||
s.remove(this); | ||
var d = this.initialTeardown; | ||
if (f(d)) | ||
var p = this.initialTeardown; | ||
if (l(p)) | ||
try { | ||
d(); | ||
} catch (l) { | ||
i = l instanceof m ? l.errors : [l]; | ||
p(); | ||
} catch (a) { | ||
i = a instanceof m ? a.errors : [a]; | ||
} | ||
var M = this._finalizers; | ||
if (M) { | ||
var T = this._finalizers; | ||
if (T) { | ||
this._finalizers = null; | ||
try { | ||
for (var A = $(M), v = A.next(); !v.done; v = A.next()) { | ||
var J = v.value; | ||
for (var d = g(T), h = d.next(); !h.done; h = d.next()) { | ||
var z = h.value; | ||
try { | ||
x(J); | ||
} catch (l) { | ||
i = i ?? [], l instanceof m ? i = L(L([], O(i)), O(l.errors)) : i.push(l); | ||
U(z); | ||
} catch (a) { | ||
i = i ?? [], a instanceof m ? i = x(x([], O(i)), O(a.errors)) : i.push(a); | ||
} | ||
} | ||
} catch (l) { | ||
n = { error: l }; | ||
} catch (a) { | ||
n = { error: a }; | ||
} finally { | ||
try { | ||
v && !v.done && (o = A.return) && o.call(A); | ||
h && !h.done && (o = d.return) && o.call(d); | ||
} finally { | ||
@@ -136,39 +136,39 @@ if (n) throw n.error; | ||
} | ||
}, e.prototype.add = function(r) { | ||
var t; | ||
if (r && r !== this) | ||
}, e.prototype.add = function(t) { | ||
var r; | ||
if (t && t !== this) | ||
if (this.closed) | ||
x(r); | ||
U(t); | ||
else { | ||
if (r instanceof e) { | ||
if (r.closed || r._hasParent(this)) | ||
if (t instanceof e) { | ||
if (t.closed || t._hasParent(this)) | ||
return; | ||
r._addParent(this); | ||
t._addParent(this); | ||
} | ||
(this._finalizers = (t = this._finalizers) !== null && t !== void 0 ? t : []).push(r); | ||
(this._finalizers = (r = this._finalizers) !== null && r !== void 0 ? r : []).push(t); | ||
} | ||
}, e.prototype._hasParent = function(r) { | ||
var t = this._parentage; | ||
return t === r || Array.isArray(t) && t.includes(r); | ||
}, e.prototype._addParent = function(r) { | ||
var t = this._parentage; | ||
this._parentage = Array.isArray(t) ? (t.push(r), t) : t ? [t, r] : r; | ||
}, e.prototype._removeParent = function(r) { | ||
var t = this._parentage; | ||
t === r ? this._parentage = null : Array.isArray(t) && g(t, r); | ||
}, e.prototype.remove = function(r) { | ||
var t = this._finalizers; | ||
t && g(t, r), r instanceof e && r._removeParent(this); | ||
}, e.prototype._hasParent = function(t) { | ||
var r = this._parentage; | ||
return r === t || Array.isArray(r) && r.includes(t); | ||
}, e.prototype._addParent = function(t) { | ||
var r = this._parentage; | ||
this._parentage = Array.isArray(r) ? (r.push(t), r) : r ? [r, t] : t; | ||
}, e.prototype._removeParent = function(t) { | ||
var r = this._parentage; | ||
r === t ? this._parentage = null : Array.isArray(r) && P(r, t); | ||
}, e.prototype.remove = function(t) { | ||
var r = this._finalizers; | ||
r && P(r, t), t instanceof e && t._removeParent(this); | ||
}, e.EMPTY = function() { | ||
var r = new e(); | ||
return r.closed = !0, r; | ||
var t = new e(); | ||
return t.closed = !0, t; | ||
}(), e; | ||
}(), X = I.EMPTY; | ||
function H(e) { | ||
return e instanceof I || e && "closed" in e && f(e.remove) && f(e.add) && f(e.unsubscribe); | ||
}(), M = S.EMPTY; | ||
function R(e) { | ||
return e instanceof S || e && "closed" in e && l(e.remove) && l(e.add) && l(e.unsubscribe); | ||
} | ||
function x(e) { | ||
f(e) ? e() : e.unsubscribe(); | ||
function U(e) { | ||
l(e) ? e() : e.unsubscribe(); | ||
} | ||
var k = { | ||
var Y = { | ||
onUnhandledError: null, | ||
@@ -179,49 +179,49 @@ onStoppedNotification: null, | ||
useDeprecatedNextContext: !1 | ||
}, K = { | ||
setTimeout: function(e, r) { | ||
for (var t = [], n = 2; n < arguments.length; n++) | ||
t[n - 2] = arguments[n]; | ||
return setTimeout.apply(void 0, L([e, r], O(t))); | ||
}, B = { | ||
setTimeout: function(e, t) { | ||
for (var r = [], n = 2; n < arguments.length; n++) | ||
r[n - 2] = arguments[n]; | ||
return setTimeout.apply(void 0, x([e, t], O(r))); | ||
}, | ||
clearTimeout: function(e) { | ||
var r = K.delegate; | ||
return ((r == null ? void 0 : r.clearTimeout) || clearTimeout)(e); | ||
var t = B.delegate; | ||
return ((t == null ? void 0 : t.clearTimeout) || clearTimeout)(e); | ||
}, | ||
delegate: void 0 | ||
}; | ||
function Z(e) { | ||
K.setTimeout(function() { | ||
function L(e) { | ||
B.setTimeout(function() { | ||
throw e; | ||
}); | ||
} | ||
function F() { | ||
function I() { | ||
} | ||
function T(e) { | ||
function y(e) { | ||
e(); | ||
} | ||
var C = function(e) { | ||
y(r, e); | ||
function r(t) { | ||
var A = function(e) { | ||
b(t, e); | ||
function t(r) { | ||
var n = e.call(this) || this; | ||
return n.isStopped = !1, t ? (n.destination = t, H(t) && t.add(n)) : n.destination = tt, n; | ||
return n.isStopped = !1, r ? (n.destination = r, R(r) && r.add(n)) : n.destination = J, n; | ||
} | ||
return r.create = function(t, n, o) { | ||
return new w(t, n, o); | ||
}, r.prototype.next = function(t) { | ||
this.isStopped || this._next(t); | ||
}, r.prototype.error = function(t) { | ||
this.isStopped || (this.isStopped = !0, this._error(t)); | ||
}, r.prototype.complete = function() { | ||
return t.create = function(r, n, o) { | ||
return new j(r, n, o); | ||
}, t.prototype.next = function(r) { | ||
this.isStopped || this._next(r); | ||
}, t.prototype.error = function(r) { | ||
this.isStopped || (this.isStopped = !0, this._error(r)); | ||
}, t.prototype.complete = function() { | ||
this.isStopped || (this.isStopped = !0, this._complete()); | ||
}, r.prototype.unsubscribe = function() { | ||
}, t.prototype.unsubscribe = function() { | ||
this.closed || (this.isStopped = !0, e.prototype.unsubscribe.call(this), this.destination = null); | ||
}, r.prototype._next = function(t) { | ||
this.destination.next(t); | ||
}, r.prototype._error = function(t) { | ||
}, t.prototype._next = function(r) { | ||
this.destination.next(r); | ||
}, t.prototype._error = function(r) { | ||
try { | ||
this.destination.error(t); | ||
this.destination.error(r); | ||
} finally { | ||
this.unsubscribe(); | ||
} | ||
}, r.prototype._complete = function() { | ||
}, t.prototype._complete = function() { | ||
try { | ||
@@ -232,45 +232,45 @@ this.destination.complete(); | ||
} | ||
}, r; | ||
}(I), q = Function.prototype.bind; | ||
function D(e, r) { | ||
return q.call(e, r); | ||
}, t; | ||
}(S), V = Function.prototype.bind; | ||
function _(e, t) { | ||
return V.call(e, t); | ||
} | ||
var Q = function() { | ||
function e(r) { | ||
this.partialObserver = r; | ||
var q = function() { | ||
function e(t) { | ||
this.partialObserver = t; | ||
} | ||
return e.prototype.next = function(r) { | ||
var t = this.partialObserver; | ||
if (t.next) | ||
return e.prototype.next = function(t) { | ||
var r = this.partialObserver; | ||
if (r.next) | ||
try { | ||
t.next(r); | ||
r.next(t); | ||
} catch (n) { | ||
S(n); | ||
v(n); | ||
} | ||
}, e.prototype.error = function(r) { | ||
var t = this.partialObserver; | ||
if (t.error) | ||
}, e.prototype.error = function(t) { | ||
var r = this.partialObserver; | ||
if (r.error) | ||
try { | ||
t.error(r); | ||
r.error(t); | ||
} catch (n) { | ||
S(n); | ||
v(n); | ||
} | ||
else | ||
S(r); | ||
v(t); | ||
}, e.prototype.complete = function() { | ||
var r = this.partialObserver; | ||
if (r.complete) | ||
var t = this.partialObserver; | ||
if (t.complete) | ||
try { | ||
r.complete(); | ||
} catch (t) { | ||
S(t); | ||
t.complete(); | ||
} catch (r) { | ||
v(r); | ||
} | ||
}, e; | ||
}(), w = function(e) { | ||
y(r, e); | ||
function r(t, n, o) { | ||
}(), j = function(e) { | ||
b(t, e); | ||
function t(r, n, o) { | ||
var i = e.call(this) || this, s; | ||
if (f(t) || !t) | ||
if (l(r) || !r) | ||
s = { | ||
next: t ?? void 0, | ||
next: r ?? void 0, | ||
error: n ?? void 0, | ||
@@ -280,67 +280,67 @@ complete: o ?? void 0 | ||
else { | ||
var c; | ||
i && k.useDeprecatedNextContext ? (c = Object.create(t), c.unsubscribe = function() { | ||
var u; | ||
i && Y.useDeprecatedNextContext ? (u = Object.create(r), u.unsubscribe = function() { | ||
return i.unsubscribe(); | ||
}, s = { | ||
next: t.next && D(t.next, c), | ||
error: t.error && D(t.error, c), | ||
complete: t.complete && D(t.complete, c) | ||
}) : s = t; | ||
next: r.next && _(r.next, u), | ||
error: r.error && _(r.error, u), | ||
complete: r.complete && _(r.complete, u) | ||
}) : s = r; | ||
} | ||
return i.destination = new Q(s), i; | ||
return i.destination = new q(s), i; | ||
} | ||
return r; | ||
}(C); | ||
function S(e) { | ||
Z(e); | ||
return t; | ||
}(A); | ||
function v(e) { | ||
L(e); | ||
} | ||
function W(e) { | ||
function G(e) { | ||
throw e; | ||
} | ||
var tt = { | ||
var J = { | ||
closed: !0, | ||
next: F, | ||
error: W, | ||
complete: F | ||
}, rt = function() { | ||
next: I, | ||
error: G, | ||
complete: I | ||
}, K = function() { | ||
return typeof Symbol == "function" && Symbol.observable || "@@observable"; | ||
}(); | ||
function et(e) { | ||
function Q(e) { | ||
return e; | ||
} | ||
function nt(e) { | ||
return e.length === 0 ? et : e.length === 1 ? e[0] : function(t) { | ||
function W(e) { | ||
return e.length === 0 ? Q : e.length === 1 ? e[0] : function(r) { | ||
return e.reduce(function(n, o) { | ||
return o(n); | ||
}, t); | ||
}, r); | ||
}; | ||
} | ||
var j = function() { | ||
function e(r) { | ||
r && (this._subscribe = r); | ||
var C = function() { | ||
function e(t) { | ||
t && (this._subscribe = t); | ||
} | ||
return e.prototype.lift = function(r) { | ||
var t = new e(); | ||
return t.source = this, t.operator = r, t; | ||
}, e.prototype.subscribe = function(r, t, n) { | ||
var o = this, i = it(r) ? r : new w(r, t, n); | ||
return T(function() { | ||
var s = o, c = s.operator, u = s.source; | ||
i.add(c ? c.call(i, u) : u ? o._subscribe(i) : o._trySubscribe(i)); | ||
return e.prototype.lift = function(t) { | ||
var r = new e(); | ||
return r.source = this, r.operator = t, r; | ||
}, e.prototype.subscribe = function(t, r, n) { | ||
var o = this, i = Z(t) ? t : new j(t, r, n); | ||
return y(function() { | ||
var s = o, u = s.operator, c = s.source; | ||
i.add(u ? u.call(i, c) : c ? o._subscribe(i) : o._trySubscribe(i)); | ||
}), i; | ||
}, e.prototype._trySubscribe = function(r) { | ||
}, e.prototype._trySubscribe = function(t) { | ||
try { | ||
return this._subscribe(r); | ||
} catch (t) { | ||
r.error(t); | ||
return this._subscribe(t); | ||
} catch (r) { | ||
t.error(r); | ||
} | ||
}, e.prototype.forEach = function(r, t) { | ||
}, e.prototype.forEach = function(t, r) { | ||
var n = this; | ||
return t = N(t), new t(function(o, i) { | ||
var s = new w({ | ||
next: function(c) { | ||
return r = F(r), new r(function(o, i) { | ||
var s = new j({ | ||
next: function(u) { | ||
try { | ||
r(c); | ||
} catch (u) { | ||
i(u), s.unsubscribe(); | ||
t(u); | ||
} catch (c) { | ||
i(c), s.unsubscribe(); | ||
} | ||
@@ -353,16 +353,16 @@ }, | ||
}); | ||
}, e.prototype._subscribe = function(r) { | ||
var t; | ||
return (t = this.source) === null || t === void 0 ? void 0 : t.subscribe(r); | ||
}, e.prototype[rt] = function() { | ||
}, e.prototype._subscribe = function(t) { | ||
var r; | ||
return (r = this.source) === null || r === void 0 ? void 0 : r.subscribe(t); | ||
}, e.prototype[K] = function() { | ||
return this; | ||
}, e.prototype.pipe = function() { | ||
for (var r = [], t = 0; t < arguments.length; t++) | ||
r[t] = arguments[t]; | ||
return nt(r)(this); | ||
}, e.prototype.toPromise = function(r) { | ||
var t = this; | ||
return r = N(r), new r(function(n, o) { | ||
for (var t = [], r = 0; r < arguments.length; r++) | ||
t[r] = arguments[r]; | ||
return W(t)(this); | ||
}, e.prototype.toPromise = function(t) { | ||
var r = this; | ||
return t = F(t), new t(function(n, o) { | ||
var i; | ||
t.subscribe(function(s) { | ||
r.subscribe(function(s) { | ||
return i = s; | ||
@@ -375,25 +375,25 @@ }, function(s) { | ||
}); | ||
}, e.create = function(r) { | ||
return new e(r); | ||
}, e.create = function(t) { | ||
return new e(t); | ||
}, e; | ||
}(); | ||
function N(e) { | ||
var r; | ||
return (r = e ?? k.Promise) !== null && r !== void 0 ? r : Promise; | ||
function F(e) { | ||
var t; | ||
return (t = e ?? Y.Promise) !== null && t !== void 0 ? t : Promise; | ||
} | ||
function ot(e) { | ||
return e && f(e.next) && f(e.error) && f(e.complete); | ||
function X(e) { | ||
return e && l(e.next) && l(e.error) && l(e.complete); | ||
} | ||
function it(e) { | ||
return e && e instanceof C || ot(e) && H(e); | ||
function Z(e) { | ||
return e && e instanceof A || X(e) && R(e); | ||
} | ||
function st(e) { | ||
return f(e == null ? void 0 : e.lift); | ||
function $(e) { | ||
return l(e == null ? void 0 : e.lift); | ||
} | ||
function ct(e) { | ||
return function(r) { | ||
if (st(r)) | ||
return r.lift(function(t) { | ||
function N(e) { | ||
return function(t) { | ||
if ($(t)) | ||
return t.lift(function(r) { | ||
try { | ||
return e(t, this); | ||
return e(r, this); | ||
} catch (n) { | ||
@@ -406,59 +406,59 @@ this.error(n); | ||
} | ||
function ut(e, r, t, n, o) { | ||
return new at(e, r, t, n, o); | ||
function rr(e, t, r, n, o) { | ||
return new tr(e, t, r, n, o); | ||
} | ||
var at = function(e) { | ||
y(r, e); | ||
function r(t, n, o, i, s, c) { | ||
var u = e.call(this, t) || this; | ||
return u.onFinalize = s, u.shouldUnsubscribe = c, u._next = n ? function(h) { | ||
var tr = function(e) { | ||
b(t, e); | ||
function t(r, n, o, i, s, u) { | ||
var c = e.call(this, r) || this; | ||
return c.onFinalize = s, c.shouldUnsubscribe = u, c._next = n ? function(f) { | ||
try { | ||
n(h); | ||
} catch (d) { | ||
t.error(d); | ||
n(f); | ||
} catch (p) { | ||
r.error(p); | ||
} | ||
} : e.prototype._next, u._error = i ? function(h) { | ||
} : e.prototype._next, c._error = i ? function(f) { | ||
try { | ||
i(h); | ||
} catch (d) { | ||
t.error(d); | ||
i(f); | ||
} catch (p) { | ||
r.error(p); | ||
} finally { | ||
this.unsubscribe(); | ||
} | ||
} : e.prototype._error, u._complete = o ? function() { | ||
} : e.prototype._error, c._complete = o ? function() { | ||
try { | ||
o(); | ||
} catch (h) { | ||
t.error(h); | ||
} catch (f) { | ||
r.error(f); | ||
} finally { | ||
this.unsubscribe(); | ||
} | ||
} : e.prototype._complete, u; | ||
} : e.prototype._complete, c; | ||
} | ||
return r.prototype.unsubscribe = function() { | ||
var t; | ||
return t.prototype.unsubscribe = function() { | ||
var r; | ||
if (!this.shouldUnsubscribe || this.shouldUnsubscribe()) { | ||
var n = this.closed; | ||
e.prototype.unsubscribe.call(this), !n && ((t = this.onFinalize) === null || t === void 0 || t.call(this)); | ||
e.prototype.unsubscribe.call(this), !n && ((r = this.onFinalize) === null || r === void 0 || r.call(this)); | ||
} | ||
}, r; | ||
}(C), lt = G(function(e) { | ||
}, t; | ||
}(A), er = D(function(e) { | ||
return function() { | ||
e(this), this.name = "ObjectUnsubscribedError", this.message = "object unsubscribed"; | ||
}; | ||
}), V = function(e) { | ||
y(r, e); | ||
function r() { | ||
var t = e.call(this) || this; | ||
return t.closed = !1, t.currentObservers = null, t.observers = [], t.isStopped = !1, t.hasError = !1, t.thrownError = null, t; | ||
}), H = function(e) { | ||
b(t, e); | ||
function t() { | ||
var r = e.call(this) || this; | ||
return r.closed = !1, r.currentObservers = null, r.observers = [], r.isStopped = !1, r.hasError = !1, r.thrownError = null, r; | ||
} | ||
return r.prototype.lift = function(t) { | ||
var n = new U(this, this); | ||
return n.operator = t, n; | ||
}, r.prototype._throwIfClosed = function() { | ||
return t.prototype.lift = function(r) { | ||
var n = new k(this, this); | ||
return n.operator = r, n; | ||
}, t.prototype._throwIfClosed = function() { | ||
if (this.closed) | ||
throw new lt(); | ||
}, r.prototype.next = function(t) { | ||
throw new er(); | ||
}, t.prototype.next = function(r) { | ||
var n = this; | ||
T(function() { | ||
y(function() { | ||
var o, i; | ||
@@ -468,11 +468,11 @@ if (n._throwIfClosed(), !n.isStopped) { | ||
try { | ||
for (var s = $(n.currentObservers), c = s.next(); !c.done; c = s.next()) { | ||
var u = c.value; | ||
u.next(t); | ||
for (var s = g(n.currentObservers), u = s.next(); !u.done; u = s.next()) { | ||
var c = u.value; | ||
c.next(r); | ||
} | ||
} catch (h) { | ||
o = { error: h }; | ||
} catch (f) { | ||
o = { error: f }; | ||
} finally { | ||
try { | ||
c && !c.done && (i = s.return) && i.call(s); | ||
u && !u.done && (i = s.return) && i.call(s); | ||
} finally { | ||
@@ -484,156 +484,88 @@ if (o) throw o.error; | ||
}); | ||
}, r.prototype.error = function(t) { | ||
}, t.prototype.error = function(r) { | ||
var n = this; | ||
T(function() { | ||
y(function() { | ||
if (n._throwIfClosed(), !n.isStopped) { | ||
n.hasError = n.isStopped = !0, n.thrownError = t; | ||
n.hasError = n.isStopped = !0, n.thrownError = r; | ||
for (var o = n.observers; o.length; ) | ||
o.shift().error(t); | ||
o.shift().error(r); | ||
} | ||
}); | ||
}, r.prototype.complete = function() { | ||
var t = this; | ||
T(function() { | ||
if (t._throwIfClosed(), !t.isStopped) { | ||
t.isStopped = !0; | ||
for (var n = t.observers; n.length; ) | ||
}, t.prototype.complete = function() { | ||
var r = this; | ||
y(function() { | ||
if (r._throwIfClosed(), !r.isStopped) { | ||
r.isStopped = !0; | ||
for (var n = r.observers; n.length; ) | ||
n.shift().complete(); | ||
} | ||
}); | ||
}, r.prototype.unsubscribe = function() { | ||
}, t.prototype.unsubscribe = function() { | ||
this.isStopped = this.closed = !0, this.observers = this.currentObservers = null; | ||
}, Object.defineProperty(r.prototype, "observed", { | ||
}, Object.defineProperty(t.prototype, "observed", { | ||
get: function() { | ||
var t; | ||
return ((t = this.observers) === null || t === void 0 ? void 0 : t.length) > 0; | ||
var r; | ||
return ((r = this.observers) === null || r === void 0 ? void 0 : r.length) > 0; | ||
}, | ||
enumerable: !1, | ||
configurable: !0 | ||
}), r.prototype._trySubscribe = function(t) { | ||
return this._throwIfClosed(), e.prototype._trySubscribe.call(this, t); | ||
}, r.prototype._subscribe = function(t) { | ||
return this._throwIfClosed(), this._checkFinalizedStatuses(t), this._innerSubscribe(t); | ||
}, r.prototype._innerSubscribe = function(t) { | ||
var n = this, o = this, i = o.hasError, s = o.isStopped, c = o.observers; | ||
return i || s ? X : (this.currentObservers = null, c.push(t), new I(function() { | ||
n.currentObservers = null, g(c, t); | ||
}), t.prototype._trySubscribe = function(r) { | ||
return this._throwIfClosed(), e.prototype._trySubscribe.call(this, r); | ||
}, t.prototype._subscribe = function(r) { | ||
return this._throwIfClosed(), this._checkFinalizedStatuses(r), this._innerSubscribe(r); | ||
}, t.prototype._innerSubscribe = function(r) { | ||
var n = this, o = this, i = o.hasError, s = o.isStopped, u = o.observers; | ||
return i || s ? M : (this.currentObservers = null, u.push(r), new S(function() { | ||
n.currentObservers = null, P(u, r); | ||
})); | ||
}, r.prototype._checkFinalizedStatuses = function(t) { | ||
}, t.prototype._checkFinalizedStatuses = function(r) { | ||
var n = this, o = n.hasError, i = n.thrownError, s = n.isStopped; | ||
o ? t.error(i) : s && t.complete(); | ||
}, r.prototype.asObservable = function() { | ||
var t = new j(); | ||
return t.source = this, t; | ||
}, r.create = function(t, n) { | ||
return new U(t, n); | ||
}, r; | ||
}(j), U = function(e) { | ||
y(r, e); | ||
function r(t, n) { | ||
o ? r.error(i) : s && r.complete(); | ||
}, t.prototype.asObservable = function() { | ||
var r = new C(); | ||
return r.source = this, r; | ||
}, t.create = function(r, n) { | ||
return new k(r, n); | ||
}, t; | ||
}(C), k = function(e) { | ||
b(t, e); | ||
function t(r, n) { | ||
var o = e.call(this) || this; | ||
return o.destination = t, o.source = n, o; | ||
return o.destination = r, o.source = n, o; | ||
} | ||
return r.prototype.next = function(t) { | ||
return t.prototype.next = function(r) { | ||
var n, o; | ||
(o = (n = this.destination) === null || n === void 0 ? void 0 : n.next) === null || o === void 0 || o.call(n, t); | ||
}, r.prototype.error = function(t) { | ||
(o = (n = this.destination) === null || n === void 0 ? void 0 : n.next) === null || o === void 0 || o.call(n, r); | ||
}, t.prototype.error = function(r) { | ||
var n, o; | ||
(o = (n = this.destination) === null || n === void 0 ? void 0 : n.error) === null || o === void 0 || o.call(n, t); | ||
}, r.prototype.complete = function() { | ||
var t, n; | ||
(n = (t = this.destination) === null || t === void 0 ? void 0 : t.complete) === null || n === void 0 || n.call(t); | ||
}, r.prototype._subscribe = function(t) { | ||
(o = (n = this.destination) === null || n === void 0 ? void 0 : n.error) === null || o === void 0 || o.call(n, r); | ||
}, t.prototype.complete = function() { | ||
var r, n; | ||
(n = (r = this.destination) === null || r === void 0 ? void 0 : r.complete) === null || n === void 0 || n.call(r); | ||
}, t.prototype._subscribe = function(r) { | ||
var n, o; | ||
return (o = (n = this.source) === null || n === void 0 ? void 0 : n.subscribe(t)) !== null && o !== void 0 ? o : X; | ||
}, r; | ||
}(V); | ||
function vt(e, r) { | ||
return ct(function(t, n) { | ||
return (o = (n = this.source) === null || n === void 0 ? void 0 : n.subscribe(r)) !== null && o !== void 0 ? o : M; | ||
}, t; | ||
}(H); | ||
function or(e, t) { | ||
return N(function(r, n) { | ||
var o = 0; | ||
t.subscribe(ut(n, function(i) { | ||
return e.call(r, i, o++) && n.next(i); | ||
r.subscribe(rr(n, function(i) { | ||
return e.call(t, i, o++) && n.next(i); | ||
})); | ||
}); | ||
} | ||
let R = null; | ||
function ft() { | ||
if (!R) { | ||
const e = new V(); | ||
R = { subject: e, dispatch: (t, n) => e.next({ key: t, value: n }) }; | ||
let w = null; | ||
function nr() { | ||
if (!w) { | ||
const e = new H(); | ||
w = { subject: e, dispatch: (r, n) => e.next({ key: r, value: n }) }; | ||
} | ||
return R; | ||
return w; | ||
} | ||
const { subject: yt, dispatch: _t } = ft(), At = "add", pt = "track", ht = "trackItems", St = `${pt}:changed`, Tt = `${ht}:changed`, dt = "state", It = `${dt}:changed`, B = "design", mt = `${B}:load`, Dt = `${B}:resize`, p = "add", Rt = `${p}:text`, Pt = `${p}:video`, $t = `${p}:audio`, Ot = `${p}:placeholder`, Lt = `${p}:image`, gt = `${p}:mask`, wt = `${p}:transition`, Ct = `${p}:animation`, Yt = `${p}:caption`, Mt = `${p}:template`, E = "edit", xt = `${E}:object`, Ft = `${E}:replaceMedia`, jt = `${E}:text`, Nt = `${E}:shape`, Ut = `${E}:templateItem`, Gt = `${E}:deleteTemplateItem`, Xt = "enterEditMode", b = "player", Ht = `${b}:play`, kt = `${b}:pause`, Kt = `${b}:seek`, Vt = `${b}:seekTo`, Bt = `${b}:seekBy`, zt = `${b}:togglePlay`, _ = "active", Jt = `${_}:set`, Zt = `${_}:delete`, qt = `${_}:paste`, Qt = `${_}:clone`, Wt = `${_}:split`, a = "layer", tr = `${a}:locked`, rr = `${a}:hidden`, er = `${a}:move`, nr = `${a}:select`, or = `${a}:selection`, ir = `${a}:sendTo`, sr = `${a}:rename`, cr = `${a}:editingName`, ur = `${a}:copy`, ar = `${a}:paste`, lr = `${a}:clone`, fr = `${a}:split`, pr = `${a}:cut`, hr = `${a}:delete`, Y = "history", dr = `${Y}:undo`, Er = `${Y}:redo`, br = `${Y}:reset`, Et = "scale", vr = `${Et}:changed`, z = "drag", yr = `${z}:start`, _r = `${z}:end`, bt = "timeline", Ar = `${bt}:boundingChanged`; | ||
const { subject: ir, dispatch: sr } = nr(); | ||
export { | ||
Qt as ACTIVE_CLONE, | ||
Zt as ACTIVE_DELETE, | ||
qt as ACTIVE_PASTE, | ||
_ as ACTIVE_PREFIX, | ||
Jt as ACTIVE_SET, | ||
Wt as ACTIVE_SPLIT, | ||
Ct as ADD_ANIMATION, | ||
$t as ADD_AUDIO, | ||
Yt as ADD_CAPTION, | ||
Lt as ADD_IMAGE, | ||
gt as ADD_MASK, | ||
Ot as ADD_PLACEHOLDER, | ||
p as ADD_PREFIX, | ||
At as ADD_SUFFIX, | ||
Mt as ADD_TEMPLATE, | ||
Rt as ADD_TEXT, | ||
wt as ADD_TRANSITION, | ||
Pt as ADD_VIDEO, | ||
Gt as DELETE_TEMPLATE_ITEM, | ||
mt as DESIGN_LOAD, | ||
B as DESIGN_PREFIX, | ||
Dt as DESIGN_RESIZE, | ||
_r as DRAG_END, | ||
z as DRAG_PREFIX, | ||
yr as DRAG_START, | ||
xt as EDIT_OBJECT, | ||
E as EDIT_PREFIX, | ||
Nt as EDIT_SHAPE, | ||
Ut as EDIT_TEMPLATE_ITEM, | ||
jt as EDIT_TEXT, | ||
Xt as ENTER_EDIT_MODE, | ||
Y as HISTORY_PREFIX, | ||
Er as HISTORY_REDO, | ||
br as HISTORY_RESET, | ||
dr as HISTORY_UNDO, | ||
lr as LAYER_CLONE, | ||
ur as LAYER_COPY, | ||
pr as LAYER_CUT, | ||
hr as LAYER_DELETE, | ||
cr as LAYER_EDITING_NAME, | ||
rr as LAYER_HIDDEN, | ||
tr as LAYER_LOCKED, | ||
er as LAYER_MOVE, | ||
ar as LAYER_PASTE, | ||
a as LAYER_PREFIX, | ||
sr as LAYER_RENAME, | ||
nr as LAYER_SELECT, | ||
or as LAYER_SELECTION, | ||
ir as LAYER_SEND_TO, | ||
fr as LAYER_SPLIT, | ||
kt as PLAYER_PAUSE, | ||
Ht as PLAYER_PLAY, | ||
b as PLAYER_PREFIX, | ||
Kt as PLAYER_SEEK, | ||
Bt as PLAYER_SEEK_BY, | ||
Vt as PLAYER_SEEK_TO, | ||
zt as PLAYER_TOGGLE_PLAY, | ||
Ft as REPLACE_MEDIA, | ||
It as STATE_CHANGED, | ||
dt as STATE_PREFIX, | ||
Ar as TIMELINE_BOUNDING_CHANGED, | ||
bt as TIMELINE_PREFIX, | ||
vr as TIMELINE_SCALE_CHANGED, | ||
Et as TIMELINE_SCALE_PREFIX, | ||
St as TRACKS_CHANGED, | ||
Tt as TRACK_ITEMS_CHANGED, | ||
ht as TRACK_ITEMS_PREFIX, | ||
pt as TRACK_PREFIX, | ||
_t as dispatch, | ||
vt as filter, | ||
yt as subject | ||
sr as dispatch, | ||
or as filter, | ||
ir as subject | ||
}; |
@@ -1,3 +0,3 @@ | ||
(function(i,d){typeof exports=="object"&&typeof module<"u"?d(exports):typeof define=="function"&&define.amd?define(["exports"],d):(i=typeof globalThis<"u"?globalThis:i||self,d(i.events={}))})(this,function(i){"use strict";var d=function(n,r){return d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},d(n,r)};function v(n,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");d(n,r);function t(){this.constructor=n}n.prototype=r===null?Object.create(r):(t.prototype=r.prototype,new t)}function P(n){var r=typeof Symbol=="function"&&Symbol.iterator,t=r&&n[r],e=0;if(t)return t.call(n);if(n&&typeof n.length=="number")return{next:function(){return n&&e>=n.length&&(n=void 0),{value:n&&n[e++],done:!n}}};throw new TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")}function O(n,r){var t=typeof Symbol=="function"&&n[Symbol.iterator];if(!t)return n;var e=t.call(n),o,c=[],s;try{for(;(r===void 0||r-- >0)&&!(o=e.next()).done;)c.push(o.value)}catch(u){s={error:u}}finally{try{o&&!o.done&&(t=e.return)&&t.call(e)}finally{if(s)throw s.error}}return c}function m(n,r,t){if(t||arguments.length===2)for(var e=0,o=r.length,c;e<o;e++)(c||!(e in r))&&(c||(c=Array.prototype.slice.call(r,0,e)),c[e]=r[e]);return n.concat(c||Array.prototype.slice.call(r))}typeof SuppressedError=="function"&&SuppressedError;function h(n){return typeof n=="function"}function G(n){var r=function(e){Error.call(e),e.stack=new Error().stack},t=n(r);return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}var C=G(function(n){return function(t){n(this),this.message=t?t.length+` errors occurred during unsubscription: | ||
`+t.map(function(e,o){return o+1+") "+e.toString()}).join(` | ||
`):"",this.name="UnsubscriptionError",this.errors=t}});function Y(n,r){if(n){var t=n.indexOf(r);0<=t&&n.splice(t,1)}}var I=function(){function n(r){this.initialTeardown=r,this.closed=!1,this._parentage=null,this._finalizers=null}return n.prototype.unsubscribe=function(){var r,t,e,o,c;if(!this.closed){this.closed=!0;var s=this._parentage;if(s)if(this._parentage=null,Array.isArray(s))try{for(var u=P(s),a=u.next();!a.done;a=u.next()){var _=a.value;_.remove(this)}}catch(f){r={error:f}}finally{try{a&&!a.done&&(t=u.return)&&t.call(u)}finally{if(r)throw r.error}}else s.remove(this);var T=this.initialTeardown;if(h(T))try{T()}catch(f){c=f instanceof C?f.errors:[f]}var tt=this._finalizers;if(tt){this._finalizers=null;try{for(var L=P(tt),y=L.next();!y.done;y=L.next()){var yr=y.value;try{U(yr)}catch(f){c=c??[],f instanceof C?c=m(m([],O(c)),O(f.errors)):c.push(f)}}}catch(f){e={error:f}}finally{try{y&&!y.done&&(o=L.return)&&o.call(L)}finally{if(e)throw e.error}}}if(c)throw new C(c)}},n.prototype.add=function(r){var t;if(r&&r!==this)if(this.closed)U(r);else{if(r instanceof n){if(r.closed||r._hasParent(this))return;r._addParent(this)}(this._finalizers=(t=this._finalizers)!==null&&t!==void 0?t:[]).push(r)}},n.prototype._hasParent=function(r){var t=this._parentage;return t===r||Array.isArray(t)&&t.includes(r)},n.prototype._addParent=function(r){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(r),t):t?[t,r]:r},n.prototype._removeParent=function(r){var t=this._parentage;t===r?this._parentage=null:Array.isArray(t)&&Y(t,r)},n.prototype.remove=function(r){var t=this._finalizers;t&&Y(t,r),r instanceof n&&r._removeParent(this)},n.EMPTY=function(){var r=new n;return r.closed=!0,r}(),n}(),X=I.EMPTY;function H(n){return n instanceof I||n&&"closed"in n&&h(n.remove)&&h(n.add)&&h(n.unsubscribe)}function U(n){h(n)?n():n.unsubscribe()}var j={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},K={setTimeout:function(n,r){for(var t=[],e=2;e<arguments.length;e++)t[e-2]=arguments[e];return setTimeout.apply(void 0,m([n,r],O(t)))},clearTimeout:function(n){var r=K.delegate;return((r==null?void 0:r.clearTimeout)||clearTimeout)(n)},delegate:void 0};function rt(n){K.setTimeout(function(){throw n})}function V(){}function S(n){n()}var $=function(n){v(r,n);function r(t){var e=n.call(this)||this;return e.isStopped=!1,t?(e.destination=t,H(t)&&t.add(e)):e.destination=ot,e}return r.create=function(t,e,o){return new g(t,e,o)},r.prototype.next=function(t){this.isStopped||this._next(t)},r.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},r.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},r.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,n.prototype.unsubscribe.call(this),this.destination=null)},r.prototype._next=function(t){this.destination.next(t)},r.prototype._error=function(t){try{this.destination.error(t)}finally{this.unsubscribe()}},r.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},r}(I),nt=Function.prototype.bind;function N(n,r){return nt.call(n,r)}var et=function(){function n(r){this.partialObserver=r}return n.prototype.next=function(r){var t=this.partialObserver;if(t.next)try{t.next(r)}catch(e){D(e)}},n.prototype.error=function(r){var t=this.partialObserver;if(t.error)try{t.error(r)}catch(e){D(e)}else D(r)},n.prototype.complete=function(){var r=this.partialObserver;if(r.complete)try{r.complete()}catch(t){D(t)}},n}(),g=function(n){v(r,n);function r(t,e,o){var c=n.call(this)||this,s;if(h(t)||!t)s={next:t??void 0,error:e??void 0,complete:o??void 0};else{var u;c&&j.useDeprecatedNextContext?(u=Object.create(t),u.unsubscribe=function(){return c.unsubscribe()},s={next:t.next&&N(t.next,u),error:t.error&&N(t.error,u),complete:t.complete&&N(t.complete,u)}):s=t}return c.destination=new et(s),c}return r}($);function D(n){rt(n)}function it(n){throw n}var ot={closed:!0,next:V,error:it,complete:V},ct=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function st(n){return n}function ut(n){return n.length===0?st:n.length===1?n[0]:function(t){return n.reduce(function(e,o){return o(e)},t)}}var k=function(){function n(r){r&&(this._subscribe=r)}return n.prototype.lift=function(r){var t=new n;return t.source=this,t.operator=r,t},n.prototype.subscribe=function(r,t,e){var o=this,c=lt(r)?r:new g(r,t,e);return S(function(){var s=o,u=s.operator,a=s.source;c.add(u?u.call(c,a):a?o._subscribe(c):o._trySubscribe(c))}),c},n.prototype._trySubscribe=function(r){try{return this._subscribe(r)}catch(t){r.error(t)}},n.prototype.forEach=function(r,t){var e=this;return t=B(t),new t(function(o,c){var s=new g({next:function(u){try{r(u)}catch(a){c(a),s.unsubscribe()}},error:c,complete:o});e.subscribe(s)})},n.prototype._subscribe=function(r){var t;return(t=this.source)===null||t===void 0?void 0:t.subscribe(r)},n.prototype[ct]=function(){return this},n.prototype.pipe=function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return ut(r)(this)},n.prototype.toPromise=function(r){var t=this;return r=B(r),new r(function(e,o){var c;t.subscribe(function(s){return c=s},function(s){return o(s)},function(){return e(c)})})},n.create=function(r){return new n(r)},n}();function B(n){var r;return(r=n??j.Promise)!==null&&r!==void 0?r:Promise}function at(n){return n&&h(n.next)&&h(n.error)&&h(n.complete)}function lt(n){return n&&n instanceof $||at(n)&&H(n)}function Et(n){return h(n==null?void 0:n.lift)}function ft(n){return function(r){if(Et(r))return r.lift(function(t){try{return n(t,this)}catch(e){this.error(e)}});throw new TypeError("Unable to lift unknown Observable type")}}function ht(n,r,t,e,o){return new _t(n,r,t,e,o)}var _t=function(n){v(r,n);function r(t,e,o,c,s,u){var a=n.call(this,t)||this;return a.onFinalize=s,a.shouldUnsubscribe=u,a._next=e?function(_){try{e(_)}catch(T){t.error(T)}}:n.prototype._next,a._error=c?function(_){try{c(_)}catch(T){t.error(T)}finally{this.unsubscribe()}}:n.prototype._error,a._complete=o?function(){try{o()}catch(_){t.error(_)}finally{this.unsubscribe()}}:n.prototype._complete,a}return r.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var e=this.closed;n.prototype.unsubscribe.call(this),!e&&((t=this.onFinalize)===null||t===void 0||t.call(this))}},r}($),dt=G(function(n){return function(){n(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),z=function(n){v(r,n);function r(){var t=n.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return r.prototype.lift=function(t){var e=new J(this,this);return e.operator=t,e},r.prototype._throwIfClosed=function(){if(this.closed)throw new dt},r.prototype.next=function(t){var e=this;S(function(){var o,c;if(e._throwIfClosed(),!e.isStopped){e.currentObservers||(e.currentObservers=Array.from(e.observers));try{for(var s=P(e.currentObservers),u=s.next();!u.done;u=s.next()){var a=u.value;a.next(t)}}catch(_){o={error:_}}finally{try{u&&!u.done&&(c=s.return)&&c.call(s)}finally{if(o)throw o.error}}}})},r.prototype.error=function(t){var e=this;S(function(){if(e._throwIfClosed(),!e.isStopped){e.hasError=e.isStopped=!0,e.thrownError=t;for(var o=e.observers;o.length;)o.shift().error(t)}})},r.prototype.complete=function(){var t=this;S(function(){if(t._throwIfClosed(),!t.isStopped){t.isStopped=!0;for(var e=t.observers;e.length;)e.shift().complete()}})},r.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(r.prototype,"observed",{get:function(){var t;return((t=this.observers)===null||t===void 0?void 0:t.length)>0},enumerable:!1,configurable:!0}),r.prototype._trySubscribe=function(t){return this._throwIfClosed(),n.prototype._trySubscribe.call(this,t)},r.prototype._subscribe=function(t){return this._throwIfClosed(),this._checkFinalizedStatuses(t),this._innerSubscribe(t)},r.prototype._innerSubscribe=function(t){var e=this,o=this,c=o.hasError,s=o.isStopped,u=o.observers;return c||s?X:(this.currentObservers=null,u.push(t),new I(function(){e.currentObservers=null,Y(u,t)}))},r.prototype._checkFinalizedStatuses=function(t){var e=this,o=e.hasError,c=e.thrownError,s=e.isStopped;o?t.error(c):s&&t.complete()},r.prototype.asObservable=function(){var t=new k;return t.source=this,t},r.create=function(t,e){return new J(t,e)},r}(k),J=function(n){v(r,n);function r(t,e){var o=n.call(this)||this;return o.destination=t,o.source=e,o}return r.prototype.next=function(t){var e,o;(o=(e=this.destination)===null||e===void 0?void 0:e.next)===null||o===void 0||o.call(e,t)},r.prototype.error=function(t){var e,o;(o=(e=this.destination)===null||e===void 0?void 0:e.error)===null||o===void 0||o.call(e,t)},r.prototype.complete=function(){var t,e;(e=(t=this.destination)===null||t===void 0?void 0:t.complete)===null||e===void 0||e.call(t)},r.prototype._subscribe=function(t){var e,o;return(o=(e=this.source)===null||e===void 0?void 0:e.subscribe(t))!==null&&o!==void 0?o:X},r}(z);function pt(n,r){return ft(function(t,e){var o=0;t.subscribe(ht(e,function(c){return n.call(r,c,o++)&&e.next(c)}))})}let M=null;function At(){if(!M){const n=new z;M={subject:n,dispatch:(t,e)=>n.next({key:t,value:e})}}return M}const{subject:bt,dispatch:Tt}=At(),vt="add",Z="track",q="trackItems",yt=`${Z}:changed`,It=`${q}:changed`,Q="state",St=`${Q}:changed`,w="design",Dt=`${w}:load`,Rt=`${w}:resize`,E="add",Lt=`${E}:text`,Pt=`${E}:video`,Ot=`${E}:audio`,mt=`${E}:placeholder`,Ct=`${E}:image`,Yt=`${E}:mask`,$t=`${E}:transition`,Nt=`${E}:animation`,gt=`${E}:caption`,Mt=`${E}:template`,p="edit",wt=`${p}:object`,Ft=`${p}:replaceMedia`,Gt=`${p}:text`,Xt=`${p}:shape`,Ht=`${p}:templateItem`,Ut=`${p}:deleteTemplateItem`,jt="enterEditMode",A="player",Kt=`${A}:play`,Vt=`${A}:pause`,kt=`${A}:seek`,Bt=`${A}:seekTo`,zt=`${A}:seekBy`,Jt=`${A}:togglePlay`,b="active",Zt=`${b}:set`,qt=`${b}:delete`,Qt=`${b}:paste`,Wt=`${b}:clone`,xt=`${b}:split`,l="layer",tr=`${l}:locked`,rr=`${l}:hidden`,nr=`${l}:move`,er=`${l}:select`,ir=`${l}:selection`,or=`${l}:sendTo`,cr=`${l}:rename`,sr=`${l}:editingName`,ur=`${l}:copy`,ar=`${l}:paste`,lr=`${l}:clone`,Er=`${l}:split`,fr=`${l}:cut`,hr=`${l}:delete`,R="history",_r=`${R}:undo`,dr=`${R}:redo`,pr=`${R}:reset`,W="scale",Ar=`${W}:changed`,F="drag",br=`${F}:start`,Tr=`${F}:end`,x="timeline",vr=`${x}:boundingChanged`;i.ACTIVE_CLONE=Wt,i.ACTIVE_DELETE=qt,i.ACTIVE_PASTE=Qt,i.ACTIVE_PREFIX=b,i.ACTIVE_SET=Zt,i.ACTIVE_SPLIT=xt,i.ADD_ANIMATION=Nt,i.ADD_AUDIO=Ot,i.ADD_CAPTION=gt,i.ADD_IMAGE=Ct,i.ADD_MASK=Yt,i.ADD_PLACEHOLDER=mt,i.ADD_PREFIX=E,i.ADD_SUFFIX=vt,i.ADD_TEMPLATE=Mt,i.ADD_TEXT=Lt,i.ADD_TRANSITION=$t,i.ADD_VIDEO=Pt,i.DELETE_TEMPLATE_ITEM=Ut,i.DESIGN_LOAD=Dt,i.DESIGN_PREFIX=w,i.DESIGN_RESIZE=Rt,i.DRAG_END=Tr,i.DRAG_PREFIX=F,i.DRAG_START=br,i.EDIT_OBJECT=wt,i.EDIT_PREFIX=p,i.EDIT_SHAPE=Xt,i.EDIT_TEMPLATE_ITEM=Ht,i.EDIT_TEXT=Gt,i.ENTER_EDIT_MODE=jt,i.HISTORY_PREFIX=R,i.HISTORY_REDO=dr,i.HISTORY_RESET=pr,i.HISTORY_UNDO=_r,i.LAYER_CLONE=lr,i.LAYER_COPY=ur,i.LAYER_CUT=fr,i.LAYER_DELETE=hr,i.LAYER_EDITING_NAME=sr,i.LAYER_HIDDEN=rr,i.LAYER_LOCKED=tr,i.LAYER_MOVE=nr,i.LAYER_PASTE=ar,i.LAYER_PREFIX=l,i.LAYER_RENAME=cr,i.LAYER_SELECT=er,i.LAYER_SELECTION=ir,i.LAYER_SEND_TO=or,i.LAYER_SPLIT=Er,i.PLAYER_PAUSE=Vt,i.PLAYER_PLAY=Kt,i.PLAYER_PREFIX=A,i.PLAYER_SEEK=kt,i.PLAYER_SEEK_BY=zt,i.PLAYER_SEEK_TO=Bt,i.PLAYER_TOGGLE_PLAY=Jt,i.REPLACE_MEDIA=Ft,i.STATE_CHANGED=St,i.STATE_PREFIX=Q,i.TIMELINE_BOUNDING_CHANGED=vr,i.TIMELINE_PREFIX=x,i.TIMELINE_SCALE_CHANGED=Ar,i.TIMELINE_SCALE_PREFIX=W,i.TRACKS_CHANGED=yt,i.TRACK_ITEMS_CHANGED=It,i.TRACK_ITEMS_PREFIX=q,i.TRACK_PREFIX=Z,i.dispatch=Tt,i.filter=pt,i.subject=bt,Object.defineProperty(i,Symbol.toStringTag,{value:"Module"})}); | ||
(function(p,h){typeof exports=="object"&&typeof module<"u"?h(exports):typeof define=="function"&&define.amd?define(["exports"],h):(p=typeof globalThis<"u"?globalThis:p||self,h(p.events={}))})(this,function(p){"use strict";var h=function(e,t){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},h(e,t)};function b(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");h(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}function w(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function E(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],s;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){s={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(s)throw s.error}}return o}function g(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,o;n<i;n++)(o||!(n in t))&&(o||(o=Array.prototype.slice.call(t,0,n)),o[n]=t[n]);return e.concat(o||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;function l(e){return typeof e=="function"}function U(e){var t=function(n){Error.call(n),n.stack=new Error().stack},r=e(t);return r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,r}var O=U(function(e){return function(r){e(this),this.message=r?r.length+` errors occurred during unsubscription: | ||
`+r.map(function(n,i){return i+1+") "+n.toString()}).join(` | ||
`):"",this.name="UnsubscriptionError",this.errors=r}});function j(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}var y=function(){function e(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var t,r,n,i,o;if(!this.closed){this.closed=!0;var s=this._parentage;if(s)if(this._parentage=null,Array.isArray(s))try{for(var u=w(s),c=u.next();!c.done;c=u.next()){var f=c.value;f.remove(this)}}catch(a){t={error:a}}finally{try{c&&!c.done&&(r=u.return)&&r.call(u)}finally{if(t)throw t.error}}else s.remove(this);var d=this.initialTeardown;if(l(d))try{d()}catch(a){o=a instanceof O?a.errors:[a]}var z=this._finalizers;if(z){this._finalizers=null;try{for(var _=w(z),v=_.next();!v.done;v=_.next()){var ur=v.value;try{F(ur)}catch(a){o=o??[],a instanceof O?o=g(g([],E(o)),E(a.errors)):o.push(a)}}}catch(a){n={error:a}}finally{try{v&&!v.done&&(i=_.return)&&i.call(_)}finally{if(n)throw n.error}}}if(o)throw new O(o)}},e.prototype.add=function(t){var r;if(t&&t!==this)if(this.closed)F(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(r=this._finalizers)!==null&&r!==void 0?r:[]).push(t)}},e.prototype._hasParent=function(t){var r=this._parentage;return r===t||Array.isArray(r)&&r.includes(t)},e.prototype._addParent=function(t){var r=this._parentage;this._parentage=Array.isArray(r)?(r.push(t),r):r?[r,t]:t},e.prototype._removeParent=function(t){var r=this._parentage;r===t?this._parentage=null:Array.isArray(r)&&j(r,t)},e.prototype.remove=function(t){var r=this._finalizers;r&&j(r,t),t instanceof e&&t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}(),I=y.EMPTY;function C(e){return e instanceof y||e&&"closed"in e&&l(e.remove)&&l(e.add)&&l(e.unsubscribe)}function F(e){l(e)?e():e.unsubscribe()}var M={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},k={setTimeout:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];return setTimeout.apply(void 0,g([e,t],E(r)))},clearTimeout:function(e){var t=k.delegate;return((t==null?void 0:t.clearTimeout)||clearTimeout)(e)},delegate:void 0};function L(e){k.setTimeout(function(){throw e})}function D(){}function S(e){e()}var x=function(e){b(t,e);function t(r){var n=e.call(this)||this;return n.isStopped=!1,r?(n.destination=r,C(r)&&r.add(n)):n.destination=J,n}return t.create=function(r,n,i){return new T(r,n,i)},t.prototype.next=function(r){this.isStopped||this._next(r)},t.prototype.error=function(r){this.isStopped||(this.isStopped=!0,this._error(r))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(r){this.destination.next(r)},t.prototype._error=function(r){try{this.destination.error(r)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(y),V=Function.prototype.bind;function P(e,t){return V.call(e,t)}var q=function(){function e(t){this.partialObserver=t}return e.prototype.next=function(t){var r=this.partialObserver;if(r.next)try{r.next(t)}catch(n){m(n)}},e.prototype.error=function(t){var r=this.partialObserver;if(r.error)try{r.error(t)}catch(n){m(n)}else m(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(r){m(r)}},e}(),T=function(e){b(t,e);function t(r,n,i){var o=e.call(this)||this,s;if(l(r)||!r)s={next:r??void 0,error:n??void 0,complete:i??void 0};else{var u;o&&M.useDeprecatedNextContext?(u=Object.create(r),u.unsubscribe=function(){return o.unsubscribe()},s={next:r.next&&P(r.next,u),error:r.error&&P(r.error,u),complete:r.complete&&P(r.complete,u)}):s=r}return o.destination=new q(s),o}return t}(x);function m(e){L(e)}function G(e){throw e}var J={closed:!0,next:D,error:G,complete:D},K=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function Q(e){return e}function W(e){return e.length===0?Q:e.length===1?e[0]:function(r){return e.reduce(function(n,i){return i(n)},r)}}var R=function(){function e(t){t&&(this._subscribe=t)}return e.prototype.lift=function(t){var r=new e;return r.source=this,r.operator=t,r},e.prototype.subscribe=function(t,r,n){var i=this,o=Z(t)?t:new T(t,r,n);return S(function(){var s=i,u=s.operator,c=s.source;o.add(u?u.call(o,c):c?i._subscribe(o):i._trySubscribe(o))}),o},e.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(r){t.error(r)}},e.prototype.forEach=function(t,r){var n=this;return r=Y(r),new r(function(i,o){var s=new T({next:function(u){try{t(u)}catch(c){o(c),s.unsubscribe()}},error:o,complete:i});n.subscribe(s)})},e.prototype._subscribe=function(t){var r;return(r=this.source)===null||r===void 0?void 0:r.subscribe(t)},e.prototype[K]=function(){return this},e.prototype.pipe=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return W(t)(this)},e.prototype.toPromise=function(t){var r=this;return t=Y(t),new t(function(n,i){var o;r.subscribe(function(s){return o=s},function(s){return i(s)},function(){return n(o)})})},e.create=function(t){return new e(t)},e}();function Y(e){var t;return(t=e??M.Promise)!==null&&t!==void 0?t:Promise}function X(e){return e&&l(e.next)&&l(e.error)&&l(e.complete)}function Z(e){return e&&e instanceof x||X(e)&&C(e)}function $(e){return l(e==null?void 0:e.lift)}function N(e){return function(t){if($(t))return t.lift(function(r){try{return e(r,this)}catch(n){this.error(n)}});throw new TypeError("Unable to lift unknown Observable type")}}function rr(e,t,r,n,i){return new tr(e,t,r,n,i)}var tr=function(e){b(t,e);function t(r,n,i,o,s,u){var c=e.call(this,r)||this;return c.onFinalize=s,c.shouldUnsubscribe=u,c._next=n?function(f){try{n(f)}catch(d){r.error(d)}}:e.prototype._next,c._error=o?function(f){try{o(f)}catch(d){r.error(d)}finally{this.unsubscribe()}}:e.prototype._error,c._complete=i?function(){try{i()}catch(f){r.error(f)}finally{this.unsubscribe()}}:e.prototype._complete,c}return t.prototype.unsubscribe=function(){var r;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;e.prototype.unsubscribe.call(this),!n&&((r=this.onFinalize)===null||r===void 0||r.call(this))}},t}(x),er=U(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),B=function(e){b(t,e);function t(){var r=e.call(this)||this;return r.closed=!1,r.currentObservers=null,r.observers=[],r.isStopped=!1,r.hasError=!1,r.thrownError=null,r}return t.prototype.lift=function(r){var n=new H(this,this);return n.operator=r,n},t.prototype._throwIfClosed=function(){if(this.closed)throw new er},t.prototype.next=function(r){var n=this;S(function(){var i,o;if(n._throwIfClosed(),!n.isStopped){n.currentObservers||(n.currentObservers=Array.from(n.observers));try{for(var s=w(n.currentObservers),u=s.next();!u.done;u=s.next()){var c=u.value;c.next(r)}}catch(f){i={error:f}}finally{try{u&&!u.done&&(o=s.return)&&o.call(s)}finally{if(i)throw i.error}}}})},t.prototype.error=function(r){var n=this;S(function(){if(n._throwIfClosed(),!n.isStopped){n.hasError=n.isStopped=!0,n.thrownError=r;for(var i=n.observers;i.length;)i.shift().error(r)}})},t.prototype.complete=function(){var r=this;S(function(){if(r._throwIfClosed(),!r.isStopped){r.isStopped=!0;for(var n=r.observers;n.length;)n.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var r;return((r=this.observers)===null||r===void 0?void 0:r.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(r){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,r)},t.prototype._subscribe=function(r){return this._throwIfClosed(),this._checkFinalizedStatuses(r),this._innerSubscribe(r)},t.prototype._innerSubscribe=function(r){var n=this,i=this,o=i.hasError,s=i.isStopped,u=i.observers;return o||s?I:(this.currentObservers=null,u.push(r),new y(function(){n.currentObservers=null,j(u,r)}))},t.prototype._checkFinalizedStatuses=function(r){var n=this,i=n.hasError,o=n.thrownError,s=n.isStopped;i?r.error(o):s&&r.complete()},t.prototype.asObservable=function(){var r=new R;return r.source=this,r},t.create=function(r,n){return new H(r,n)},t}(R),H=function(e){b(t,e);function t(r,n){var i=e.call(this)||this;return i.destination=r,i.source=n,i}return t.prototype.next=function(r){var n,i;(i=(n=this.destination)===null||n===void 0?void 0:n.next)===null||i===void 0||i.call(n,r)},t.prototype.error=function(r){var n,i;(i=(n=this.destination)===null||n===void 0?void 0:n.error)===null||i===void 0||i.call(n,r)},t.prototype.complete=function(){var r,n;(n=(r=this.destination)===null||r===void 0?void 0:r.complete)===null||n===void 0||n.call(r)},t.prototype._subscribe=function(r){var n,i;return(i=(n=this.source)===null||n===void 0?void 0:n.subscribe(r))!==null&&i!==void 0?i:I},t}(B);function nr(e,t){return N(function(r,n){var i=0;r.subscribe(rr(n,function(o){return e.call(t,o,i++)&&n.next(o)}))})}let A=null;function ir(){if(!A){const e=new B;A={subject:e,dispatch:(r,n)=>e.next({key:r,value:n})}}return A}const{subject:or,dispatch:sr}=ir();p.dispatch=sr,p.filter=nr,p.subject=or,Object.defineProperty(p,Symbol.toStringTag,{value:"Module"})}); |
{ | ||
"name": "@designcombo/events", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"private": false, | ||
@@ -5,0 +5,0 @@ "files": [ |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
28269
6
625
1