@babel/runtime-corejs2
Advanced tools
Comparing version 7.23.5 to 7.23.6
@@ -12,2 +12,4 @@ var _typeof = require("./typeof.js")["default"]; | ||
var _Array$isArray = require("core-js/library/fn/array/is-array.js"); | ||
var setFunctionName = require("./setFunctionName.js"); | ||
var toPropertyKey = require("./toPropertyKey.js"); | ||
function old_createMetadataMethodsForProperty(e, t, a, r) { | ||
@@ -88,3 +90,3 @@ return { | ||
kind: c, | ||
name: l ? "#" + t : t, | ||
name: l ? "#" + t : toPropertyKey(t), | ||
isStatic: n, | ||
@@ -127,6 +129,3 @@ isPrivate: l | ||
void 0 !== t.get && old_assertCallable(t.get, "accessor.get"), void 0 !== t.set && old_assertCallable(t.set, "accessor.set"), void 0 !== t.init && old_assertCallable(t.init, "accessor.init"), void 0 !== t.initializer && old_assertCallable(t.initializer, "accessor.initializer"); | ||
} else if ("function" !== a) { | ||
var r; | ||
throw r = 0 === e ? "field" : 10 === e ? "class" : "method", new TypeError(r + " decorators must return a function or void 0"); | ||
} | ||
} else if ("function" !== a) throw new TypeError((0 === e ? "field" : 10 === e ? "class" : "method") + " decorators must return a function or void 0"); | ||
} | ||
@@ -144,24 +143,25 @@ function old_getInit(e) { | ||
v, | ||
y, | ||
h = a[0]; | ||
if (n ? c = 0 === o || 1 === o ? { | ||
if (n ? (0 === o || 1 === o ? (c = { | ||
get: a[3], | ||
set: a[4] | ||
} : 3 === o ? { | ||
}, u = "get") : 3 === o ? (c = { | ||
get: a[3] | ||
} : 4 === o ? { | ||
}, u = "get") : 4 === o ? (c = { | ||
set: a[3] | ||
} : { | ||
}, u = "set") : c = { | ||
value: a[3] | ||
} : 0 !== o && (c = _Object$getOwnPropertyDescriptor(t, r)), 1 === o ? u = { | ||
}, 0 !== o && (1 === o && setFunctionName(a[4], "#" + r, "set"), setFunctionName(a[3], "#" + r, u))) : 0 !== o && (c = _Object$getOwnPropertyDescriptor(t, r)), 1 === o ? f = { | ||
get: c.get, | ||
set: c.set | ||
} : 2 === o ? u = c.value : 3 === o ? u = c.get : 4 === o && (u = c.set), "function" == typeof h) void 0 !== (f = old_memberDec(h, r, c, l, s, o, i, n, u)) && (old_assertValidReturnValue(o, f), 0 === o ? d = f : 1 === o ? (d = old_getInit(f), p = f.get || u.get, v = f.set || u.set, u = { | ||
get: p, | ||
set: v | ||
}) : u = f);else for (var y = h.length - 1; y >= 0; y--) { | ||
} : 2 === o ? f = c.value : 3 === o ? f = c.get : 4 === o && (f = c.set), "function" == typeof h) void 0 !== (p = old_memberDec(h, r, c, l, s, o, i, n, f)) && (old_assertValidReturnValue(o, p), 0 === o ? d = p : 1 === o ? (d = old_getInit(p), v = p.get || f.get, y = p.set || f.set, f = { | ||
get: v, | ||
set: y | ||
}) : f = p);else for (var m = h.length - 1; m >= 0; m--) { | ||
var b; | ||
if (void 0 !== (f = old_memberDec(h[y], r, c, l, s, o, i, n, u))) old_assertValidReturnValue(o, f), 0 === o ? b = f : 1 === o ? (b = old_getInit(f), p = f.get || u.get, v = f.set || u.set, u = { | ||
get: p, | ||
set: v | ||
}) : u = f, void 0 !== b && (void 0 === d ? d = b : "function" == typeof d ? d = [d, b] : d.push(b)); | ||
void 0 !== (p = old_memberDec(h[m], r, c, l, s, o, i, n, f)) && (old_assertValidReturnValue(o, p), 0 === o ? b = p : 1 === o ? (b = old_getInit(p), v = p.get || f.get, y = p.set || f.set, f = { | ||
get: v, | ||
set: y | ||
}) : f = p, void 0 !== b && (void 0 === d ? d = b : "function" == typeof d ? d = [d, b] : d.push(b))); | ||
} | ||
@@ -178,5 +178,5 @@ if (0 === o || 1 === o) { | ||
} else { | ||
var m = d; | ||
var _ = d; | ||
d = function d(e, t) { | ||
return m.call(e, t); | ||
return _.call(e, t); | ||
}; | ||
@@ -186,8 +186,8 @@ } | ||
} | ||
0 !== o && (1 === o ? (c.get = u.get, c.set = u.set) : 2 === o ? c.value = u : 3 === o ? c.get = u : 4 === o && (c.set = u), n ? 1 === o ? (e.push(function (e, t) { | ||
return u.get.call(e, t); | ||
0 !== o && (1 === o ? (c.get = f.get, c.set = f.set) : 2 === o ? c.value = f : 3 === o ? c.get = f : 4 === o && (c.set = f), n ? 1 === o ? (e.push(function (e, t) { | ||
return f.get.call(e, t); | ||
}), e.push(function (e, t) { | ||
return u.set.call(e, t); | ||
})) : 2 === o ? e.push(u) : e.push(function (e, t) { | ||
return u.call(e, t); | ||
return f.set.call(e, t); | ||
})) : 2 === o ? e.push(f) : e.push(function (e, t) { | ||
return f.call(e, t); | ||
}) : _Object$defineProperty(t, r, c)); | ||
@@ -203,12 +203,12 @@ } | ||
v = d[1], | ||
h = d[2], | ||
y = d.length > 3, | ||
b = v >= 5; | ||
if (b ? (u = t, f = r, 0 !== (v -= 5) && (p = n = n || [])) : (u = t.prototype, f = a, 0 !== v && (p = i = i || [])), 0 !== v && !y) { | ||
var g = b ? s : l, | ||
m = g.get(h) || 0; | ||
if (!0 === m || 3 === m && 4 !== v || 4 === m && 3 !== v) throw new Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + h); | ||
!m && v > 2 ? g.set(h, v) : g.set(h, !0); | ||
y = d[2], | ||
h = d.length > 3, | ||
m = v >= 5; | ||
if (m ? (u = t, f = r, 0 != (v -= 5) && (p = n = n || [])) : (u = t.prototype, f = a, 0 !== v && (p = i = i || [])), 0 !== v && !h) { | ||
var b = m ? s : l, | ||
g = b.get(y) || 0; | ||
if (!0 === g || 3 === g && 4 !== v || 4 === g && 3 !== v) throw new Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + y); | ||
!g && v > 2 ? b.set(y, v) : b.set(y, !0); | ||
} | ||
old_applyMemberDec(e, u, d, h, v, b, y, f, p); | ||
old_applyMemberDec(e, u, d, y, v, m, h, f, p); | ||
} | ||
@@ -215,0 +215,0 @@ } |
@@ -10,4 +10,4 @@ var _Object$getOwnPropertyDescriptor = require("core-js/library/fn/object/get-own-property-descriptor.js"); | ||
!function (e, t) { | ||
if (e.v) throw new Error("attempted to call " + t + " after decoration was finished"); | ||
}(t, "addInitializer"), assertCallable(r, "An initializer"), e.push(r); | ||
if (e.v) throw new Error("attempted to call addInitializer after decoration was finished"); | ||
}(t), assertCallable(r, "An initializer"), e.push(r); | ||
}; | ||
@@ -76,6 +76,3 @@ } | ||
void 0 !== t.get && assertCallable(t.get, "accessor.get"), void 0 !== t.set && assertCallable(t.set, "accessor.set"), void 0 !== t.init && assertCallable(t.init, "accessor.init"); | ||
} else if ("function" !== r) { | ||
var a; | ||
throw a = 0 === e ? "field" : 10 === e ? "class" : "method", new TypeError(a + " decorators must return a function or void 0"); | ||
} | ||
} else if ("function" !== r) throw new TypeError((0 === e ? "field" : 10 === e ? "class" : "method") + " decorators must return a function or void 0"); | ||
} | ||
@@ -107,6 +104,6 @@ function applyMemberDec(e, t, r, a, n, i, s, o) { | ||
var g; | ||
if (void 0 !== (f = memberDec(h[v], a, c, o, n, i, s, u))) assertValidReturnValue(n, f), 0 === n ? g = f : 1 === n ? (g = f.init, p = f.get || u.get, d = f.set || u.set, u = { | ||
void 0 !== (f = memberDec(h[v], a, c, o, n, i, s, u)) && (assertValidReturnValue(n, f), 0 === n ? g = f : 1 === n ? (g = f.init, p = f.get || u.get, d = f.set || u.set, u = { | ||
get: p, | ||
set: d | ||
}) : u = f, void 0 !== g && (void 0 === l ? l = g : "function" == typeof l ? l = [l, g] : l.push(g)); | ||
}) : u = f, void 0 !== g && (void 0 === l ? l = g : "function" == typeof l ? l = [l, g] : l.push(g))); | ||
} | ||
@@ -113,0 +110,0 @@ if (0 === n || 1 === n) { |
@@ -6,2 +6,4 @@ var _Object$getOwnPropertyDescriptor = require("core-js/library/fn/object/get-own-property-descriptor.js"); | ||
var _typeof = require("./typeof.js")["default"]; | ||
var setFunctionName = require("./setFunctionName.js"); | ||
var toPropertyKey = require("./toPropertyKey.js"); | ||
function applyDecs2203RFactory() { | ||
@@ -11,7 +13,7 @@ function createAddInitializerMethod(e, t) { | ||
!function (e, t) { | ||
if (e.v) throw new Error("attempted to call " + t + " after decoration was finished"); | ||
}(t, "addInitializer"), assertCallable(r, "An initializer"), e.push(r); | ||
if (e.v) throw new Error("attempted to call addInitializer after decoration was finished"); | ||
}(t), assertCallable(r, "An initializer"), e.push(r); | ||
}; | ||
} | ||
function memberDec(e, t, r, n, a, i, s, o) { | ||
function memberDec(e, t, r, n, a, i, o, s) { | ||
var c; | ||
@@ -38,5 +40,5 @@ switch (a) { | ||
kind: c, | ||
name: s ? "#" + t : t, | ||
name: o ? "#" + t : toPropertyKey(t), | ||
"static": i, | ||
"private": s | ||
"private": o | ||
}, | ||
@@ -46,3 +48,3 @@ p = { | ||
}; | ||
0 !== a && (f.addInitializer = createAddInitializerMethod(n, p)), 0 === a ? s ? (l = r.get, u = r.set) : (l = function l() { | ||
0 !== a && (f.addInitializer = createAddInitializerMethod(n, p)), 0 === a ? o ? (l = r.get, u = r.set) : (l = function l() { | ||
return this[t]; | ||
@@ -66,3 +68,3 @@ }, u = function u(e) { | ||
try { | ||
return e(o, f); | ||
return e(s, f); | ||
} finally { | ||
@@ -80,8 +82,5 @@ p.v = !0; | ||
void 0 !== t.get && assertCallable(t.get, "accessor.get"), void 0 !== t.set && assertCallable(t.set, "accessor.set"), void 0 !== t.init && assertCallable(t.init, "accessor.init"); | ||
} else if ("function" !== r) { | ||
var n; | ||
throw n = 0 === e ? "field" : 10 === e ? "class" : "method", new TypeError(n + " decorators must return a function or void 0"); | ||
} | ||
} else if ("function" !== r) throw new TypeError((0 === e ? "field" : 10 === e ? "class" : "method") + " decorators must return a function or void 0"); | ||
} | ||
function applyMemberDec(e, t, r, n, a, i, s, o) { | ||
function applyMemberDec(e, t, r, n, a, i, o, s) { | ||
var c, | ||
@@ -93,24 +92,25 @@ l, | ||
d, | ||
h = r[0]; | ||
if (s ? c = 0 === a || 1 === a ? { | ||
h, | ||
v = r[0]; | ||
if (o ? (0 === a || 1 === a ? (c = { | ||
get: r[3], | ||
set: r[4] | ||
} : 3 === a ? { | ||
}, u = "get") : 3 === a ? (c = { | ||
get: r[3] | ||
} : 4 === a ? { | ||
}, u = "get") : 4 === a ? (c = { | ||
set: r[3] | ||
} : { | ||
}, u = "set") : c = { | ||
value: r[3] | ||
} : 0 !== a && (c = _Object$getOwnPropertyDescriptor(t, n)), 1 === a ? u = { | ||
}, 0 !== a && (1 === a && setFunctionName(r[4], "#" + n, "set"), setFunctionName(r[3], "#" + n, u))) : 0 !== a && (c = _Object$getOwnPropertyDescriptor(t, n)), 1 === a ? f = { | ||
get: c.get, | ||
set: c.set | ||
} : 2 === a ? u = c.value : 3 === a ? u = c.get : 4 === a && (u = c.set), "function" == typeof h) void 0 !== (f = memberDec(h, n, c, o, a, i, s, u)) && (assertValidReturnValue(a, f), 0 === a ? l = f : 1 === a ? (l = f.init, p = f.get || u.get, d = f.set || u.set, u = { | ||
get: p, | ||
set: d | ||
}) : u = f);else for (var v = h.length - 1; v >= 0; v--) { | ||
var g; | ||
if (void 0 !== (f = memberDec(h[v], n, c, o, a, i, s, u))) assertValidReturnValue(a, f), 0 === a ? g = f : 1 === a ? (g = f.init, p = f.get || u.get, d = f.set || u.set, u = { | ||
get: p, | ||
set: d | ||
}) : u = f, void 0 !== g && (void 0 === l ? l = g : "function" == typeof l ? l = [l, g] : l.push(g)); | ||
} : 2 === a ? f = c.value : 3 === a ? f = c.get : 4 === a && (f = c.set), "function" == typeof v) void 0 !== (p = memberDec(v, n, c, s, a, i, o, f)) && (assertValidReturnValue(a, p), 0 === a ? l = p : 1 === a ? (l = p.init, d = p.get || f.get, h = p.set || f.set, f = { | ||
get: d, | ||
set: h | ||
}) : f = p);else for (var g = v.length - 1; g >= 0; g--) { | ||
var y; | ||
void 0 !== (p = memberDec(v[g], n, c, s, a, i, o, f)) && (assertValidReturnValue(a, p), 0 === a ? y = p : 1 === a ? (y = p.init, d = p.get || f.get, h = p.set || f.set, f = { | ||
get: d, | ||
set: h | ||
}) : f = p, void 0 !== y && (void 0 === l ? l = y : "function" == typeof l ? l = [l, y] : l.push(y))); | ||
} | ||
@@ -121,11 +121,11 @@ if (0 === a || 1 === a) { | ||
};else if ("function" != typeof l) { | ||
var y = l; | ||
var m = l; | ||
l = function l(e, t) { | ||
for (var r = t, n = 0; n < y.length; n++) r = y[n].call(e, r); | ||
for (var r = t, n = 0; n < m.length; n++) r = m[n].call(e, r); | ||
return r; | ||
}; | ||
} else { | ||
var m = l; | ||
var b = l; | ||
l = function l(e, t) { | ||
return m.call(e, t); | ||
return b.call(e, t); | ||
}; | ||
@@ -135,13 +135,13 @@ } | ||
} | ||
0 !== a && (1 === a ? (c.get = u.get, c.set = u.set) : 2 === a ? c.value = u : 3 === a ? c.get = u : 4 === a && (c.set = u), s ? 1 === a ? (e.push(function (e, t) { | ||
return u.get.call(e, t); | ||
0 !== a && (1 === a ? (c.get = f.get, c.set = f.set) : 2 === a ? c.value = f : 3 === a ? c.get = f : 4 === a && (c.set = f), o ? 1 === a ? (e.push(function (e, t) { | ||
return f.get.call(e, t); | ||
}), e.push(function (e, t) { | ||
return u.set.call(e, t); | ||
})) : 2 === a ? e.push(u) : e.push(function (e, t) { | ||
return u.call(e, t); | ||
return f.set.call(e, t); | ||
})) : 2 === a ? e.push(f) : e.push(function (e, t) { | ||
return f.call(e, t); | ||
}) : _Object$defineProperty(t, n, c)); | ||
} | ||
function applyMemberDecs(e, t) { | ||
for (var r, n, a = [], i = new _Map(), s = new _Map(), o = 0; o < t.length; o++) { | ||
var c = t[o]; | ||
for (var r, n, a = [], i = new _Map(), o = new _Map(), s = 0; s < t.length; s++) { | ||
var c = t[s]; | ||
if (_Array$isArray(c)) { | ||
@@ -154,4 +154,4 @@ var l, | ||
h = f >= 5; | ||
if (h ? (l = e, 0 !== (f -= 5) && (u = n = n || [])) : (l = e.prototype, 0 !== f && (u = r = r || [])), 0 !== f && !d) { | ||
var v = h ? s : i, | ||
if (h ? (l = e, 0 != (f -= 5) && (u = n = n || [])) : (l = e.prototype, 0 !== f && (u = r = r || [])), 0 !== f && !d) { | ||
var v = h ? o : i, | ||
g = v.get(p) || 0; | ||
@@ -179,15 +179,15 @@ if (!0 === g || 3 === g && 4 !== f || 4 === g && 3 !== f) throw new Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + p); | ||
for (var r = [], n = e, a = e.name, i = t.length - 1; i >= 0; i--) { | ||
var s = { | ||
var o = { | ||
v: !1 | ||
}; | ||
try { | ||
var o = t[i](n, { | ||
var s = t[i](n, { | ||
kind: "class", | ||
name: a, | ||
addInitializer: createAddInitializerMethod(r, s) | ||
addInitializer: createAddInitializerMethod(r, o) | ||
}); | ||
} finally { | ||
s.v = !0; | ||
o.v = !0; | ||
} | ||
void 0 !== o && (assertValidReturnValue(10, o), n = o); | ||
void 0 !== s && (assertValidReturnValue(10, s), n = s); | ||
} | ||
@@ -194,0 +194,0 @@ return [n, function () { |
@@ -7,2 +7,4 @@ var _Object$getOwnPropertyDescriptor = require("core-js/library/fn/object/get-own-property-descriptor.js"); | ||
var checkInRHS = require("./checkInRHS.js"); | ||
var setFunctionName = require("./setFunctionName.js"); | ||
var toPropertyKey = require("./toPropertyKey.js"); | ||
function applyDecs2301Factory() { | ||
@@ -12,4 +14,4 @@ function createAddInitializerMethod(e, t) { | ||
!function (e, t) { | ||
if (e.v) throw new Error("attempted to call " + t + " after decoration was finished"); | ||
}(t, "addInitializer"), assertCallable(r, "An initializer"), e.push(r); | ||
if (e.v) throw new Error("attempted to call addInitializer after decoration was finished"); | ||
}(t), assertCallable(r, "An initializer"), e.push(r); | ||
}; | ||
@@ -42,3 +44,3 @@ } | ||
kind: u, | ||
name: s ? "#" + t : t, | ||
name: s ? "#" + t : toPropertyKey(t), | ||
"static": i, | ||
@@ -98,6 +100,3 @@ "private": s | ||
void 0 !== t.get && assertCallable(t.get, "accessor.get"), void 0 !== t.set && assertCallable(t.set, "accessor.set"), void 0 !== t.init && assertCallable(t.init, "accessor.init"); | ||
} else if ("function" !== r) { | ||
var n; | ||
throw n = 0 === e ? "field" : 10 === e ? "class" : "method", new TypeError(n + " decorators must return a function or void 0"); | ||
} | ||
} else if ("function" !== r) throw new TypeError((0 === e ? "field" : 10 === e ? "class" : "method") + " decorators must return a function or void 0"); | ||
} | ||
@@ -117,26 +116,27 @@ function curryThis2(e) { | ||
v, | ||
y, | ||
g = r[0]; | ||
if (s ? u = 0 === a || 1 === a ? { | ||
get: (p = r[3], function () { | ||
return p(this); | ||
if (s ? (0 === a || 1 === a ? (u = { | ||
get: (d = r[3], function () { | ||
return d(this); | ||
}), | ||
set: curryThis2(r[4]) | ||
} : 3 === a ? { | ||
}, f = "get") : 3 === a ? (u = { | ||
get: r[3] | ||
} : 4 === a ? { | ||
}, f = "get") : 4 === a ? (u = { | ||
set: r[3] | ||
} : { | ||
}, f = "set") : u = { | ||
value: r[3] | ||
} : 0 !== a && (u = _Object$getOwnPropertyDescriptor(t, n)), 1 === a ? f = { | ||
}, 0 !== a && (1 === a && setFunctionName(u.set, "#" + n, "set"), setFunctionName(u[f || "value"], "#" + n, f))) : 0 !== a && (u = _Object$getOwnPropertyDescriptor(t, n)), 1 === a ? p = { | ||
get: u.get, | ||
set: u.set | ||
} : 2 === a ? f = u.value : 3 === a ? f = u.get : 4 === a && (f = u.set), "function" == typeof g) void 0 !== (d = memberDec(g, n, u, o, a, i, s, f, c)) && (assertValidReturnValue(a, d), 0 === a ? l = d : 1 === a ? (l = d.init, h = d.get || f.get, v = d.set || f.set, f = { | ||
get: h, | ||
set: v | ||
}) : f = d);else for (var y = g.length - 1; y >= 0; y--) { | ||
var m; | ||
if (void 0 !== (d = memberDec(g[y], n, u, o, a, i, s, f, c))) assertValidReturnValue(a, d), 0 === a ? m = d : 1 === a ? (m = d.init, h = d.get || f.get, v = d.set || f.set, f = { | ||
get: h, | ||
set: v | ||
}) : f = d, void 0 !== m && (void 0 === l ? l = m : "function" == typeof l ? l = [l, m] : l.push(m)); | ||
} : 2 === a ? p = u.value : 3 === a ? p = u.get : 4 === a && (p = u.set), "function" == typeof g) void 0 !== (h = memberDec(g, n, u, o, a, i, s, p, c)) && (assertValidReturnValue(a, h), 0 === a ? l = h : 1 === a ? (l = h.init, v = h.get || p.get, y = h.set || p.set, p = { | ||
get: v, | ||
set: y | ||
}) : p = h);else for (var m = g.length - 1; m >= 0; m--) { | ||
var b; | ||
void 0 !== (h = memberDec(g[m], n, u, o, a, i, s, p, c)) && (assertValidReturnValue(a, h), 0 === a ? b = h : 1 === a ? (b = h.init, v = h.get || p.get, y = h.set || p.set, p = { | ||
get: v, | ||
set: y | ||
}) : p = h, void 0 !== b && (void 0 === l ? l = b : "function" == typeof l ? l = [l, b] : l.push(b))); | ||
} | ||
@@ -147,11 +147,11 @@ if (0 === a || 1 === a) { | ||
};else if ("function" != typeof l) { | ||
var b = l; | ||
var I = l; | ||
l = function l(e, t) { | ||
for (var r = t, n = 0; n < b.length; n++) r = b[n].call(e, r); | ||
for (var r = t, n = 0; n < I.length; n++) r = I[n].call(e, r); | ||
return r; | ||
}; | ||
} else { | ||
var I = l; | ||
var w = l; | ||
l = function l(e, t) { | ||
return I.call(e, t); | ||
return w.call(e, t); | ||
}; | ||
@@ -161,8 +161,8 @@ } | ||
} | ||
0 !== a && (1 === a ? (u.get = f.get, u.set = f.set) : 2 === a ? u.value = f : 3 === a ? u.get = f : 4 === a && (u.set = f), s ? 1 === a ? (e.push(function (e, t) { | ||
return f.get.call(e, t); | ||
0 !== a && (1 === a ? (u.get = p.get, u.set = p.set) : 2 === a ? u.value = p : 3 === a ? u.get = p : 4 === a && (u.set = p), s ? 1 === a ? (e.push(function (e, t) { | ||
return p.get.call(e, t); | ||
}), e.push(function (e, t) { | ||
return f.set.call(e, t); | ||
})) : 2 === a ? e.push(f) : e.push(function (e, t) { | ||
return f.call(e, t); | ||
return p.set.call(e, t); | ||
})) : 2 === a ? e.push(p) : e.push(function (e, t) { | ||
return p.call(e, t); | ||
}) : _Object$defineProperty(t, n, u)); | ||
@@ -179,8 +179,8 @@ } | ||
v = l.length > 3, | ||
g = d >= 5, | ||
y = r; | ||
if (g ? (f = e, 0 !== (d -= 5) && (p = a = a || []), v && !i && (i = function i(t) { | ||
y = d >= 5, | ||
g = r; | ||
if (y ? (f = e, 0 != (d -= 5) && (p = a = a || []), v && !i && (i = function i(t) { | ||
return checkInRHS(t) === e; | ||
}), y = i) : (f = e.prototype, 0 !== d && (p = n = n || [])), 0 !== d && !v) { | ||
var m = g ? c : o, | ||
}), g = i) : (f = e.prototype, 0 !== d && (p = n = n || [])), 0 !== d && !v) { | ||
var m = y ? c : o, | ||
b = m.get(h) || 0; | ||
@@ -190,3 +190,3 @@ if (!0 === b || 3 === b && 4 !== d || 4 === b && 3 !== d) throw new Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + h); | ||
} | ||
applyMemberDec(s, f, l, h, d, g, v, p, y); | ||
applyMemberDec(s, f, l, h, d, y, v, p, g); | ||
} | ||
@@ -193,0 +193,0 @@ } |
@@ -0,199 +1,138 @@ | ||
var _typeof = require("./typeof.js")["default"]; | ||
var _Array$isArray = require("core-js/library/fn/array/is-array.js"); | ||
var _Object$getOwnPropertyDescriptor = require("core-js/library/fn/object/get-own-property-descriptor.js"); | ||
var _Object$defineProperty = require("core-js/library/fn/object/define-property.js"); | ||
var _Map = require("core-js/library/fn/map.js"); | ||
var _Symbol = require("core-js/library/fn/symbol/index.js"); | ||
var _Symbol$for = require("core-js/library/fn/symbol/for.js"); | ||
var _Object$create = require("core-js/library/fn/object/create.js"); | ||
var _typeof = require("./typeof.js")["default"]; | ||
var _Map = require("core-js/library/fn/map.js"); | ||
var checkInRHS = require("./checkInRHS.js"); | ||
function _bindPropCall(e, t) { | ||
return function (r, a) { | ||
return e[t].call(r, a); | ||
}; | ||
} | ||
function createAddInitializerMethod(e, t) { | ||
return function (r) { | ||
if (t.v) throw new Error("attempted to call addInitializer after decoration was finished"); | ||
assertCallable(r, "An initializer", !0), e.push(r); | ||
}; | ||
} | ||
function memberDec(e, t, r, a, n, i, o, s, l, c, u) { | ||
function assertInstanceIfPrivate(e) { | ||
return function (t, r) { | ||
if (!c(t)) throw new TypeError("Attempted to access private element on non-instance"); | ||
return e(t, r); | ||
var setFunctionName = require("./setFunctionName.js"); | ||
var toPropertyKey = require("./toPropertyKey.js"); | ||
function applyDecs2305(e, t, r, n, o, a) { | ||
function i(e, t, r) { | ||
return function (n, o) { | ||
return r && r(n), e[t].call(n, o); | ||
}; | ||
} | ||
var f, | ||
d, | ||
p = { | ||
v: !1 | ||
}, | ||
v = { | ||
kind: ["field", "accessor", "method", "getter", "setter", "field"][i], | ||
name: s ? "#" + r : r, | ||
"static": o, | ||
"private": s, | ||
metadata: u, | ||
addInitializer: createAddInitializerMethod(n, p) | ||
}; | ||
if (s || 0 !== i && 2 !== i) { | ||
if (2 === i) f = assertInstanceIfPrivate(function () { | ||
return a.value; | ||
});else { | ||
var h = 0 === i || 1 === i; | ||
(h || 3 === i) && (f = _bindPropCall(a, "get"), s && (f = assertInstanceIfPrivate(f))), (h || 4 === i) && (d = _bindPropCall(a, "set"), s && (d = assertInstanceIfPrivate(d))); | ||
} | ||
} else f = function f(e) { | ||
return e[r]; | ||
}, 0 === i && (d = function d(e, t) { | ||
e[r] = t; | ||
}); | ||
var m = s ? c.bind() : function (e) { | ||
return r in e; | ||
}, | ||
b = v.access = { | ||
has: m | ||
}; | ||
f && (b.get = f), d && (b.set = d); | ||
try { | ||
return e.call(t, l, v); | ||
} finally { | ||
p.v = !0; | ||
function c(e, t) { | ||
for (var r = 0; r < e.length; r++) e[r].call(t); | ||
return t; | ||
} | ||
} | ||
function assertCallable(e, t, r) { | ||
if ("function" != typeof e && (r || void 0 !== e)) throw new TypeError(t + " must be a function"); | ||
} | ||
function assertValidReturnValue(e, t) { | ||
var r = _typeof(t); | ||
if (1 === e) { | ||
if ("object" !== r || !t) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0"); | ||
assertCallable(t.get, "accessor.get"), assertCallable(t.set, "accessor.set"), assertCallable(t.init, "accessor.init"); | ||
} else if ("function" !== r) throw new TypeError((0 === e ? "field" : 5 === e ? "class" : "method") + " decorators must return a function or void 0"); | ||
} | ||
function applyMemberDec(e, t, r, a, n, i, o, s, l, c, u) { | ||
var f, | ||
d, | ||
p, | ||
v, | ||
h = r[0], | ||
m = r[3]; | ||
a || _Array$isArray(h) || (h = [h]), s ? f = 0 === i || 1 === i ? { | ||
get: function get() { | ||
return m(this); | ||
}, | ||
set: function set(e) { | ||
r[4](this, e); | ||
} | ||
} : 3 === i ? { | ||
get: m | ||
} : 4 === i ? { | ||
set: m | ||
} : { | ||
value: m | ||
} : 0 !== i && (f = _Object$getOwnPropertyDescriptor(t, n)), 1 === i ? p = { | ||
get: f.get, | ||
set: f.set | ||
} : 2 === i ? p = f.value : 3 === i ? p = f.get : 4 === i && (p = f.set); | ||
for (var b = a ? 2 : 1, y = h.length - 1; y >= 0; y -= b) { | ||
var g; | ||
if (void 0 !== (v = memberDec(h[y], a ? h[y - 1] : void 0, n, f, l, i, o, s, p, c, u))) assertValidReturnValue(i, v), 0 === i ? g = v : 1 === i ? (g = v.init, p = { | ||
get: v.get || p.get, | ||
set: v.set || p.set | ||
}) : p = v, void 0 !== g && (void 0 === d ? d = g : "function" == typeof d ? d = [d, g] : d.push(g)); | ||
function s(e, t, r, n) { | ||
if ("function" != typeof e && (n || void 0 !== e)) throw new TypeError(t + " must " + (r || "be") + " a function" + (n ? "" : " or undefined")); | ||
return e; | ||
} | ||
if (0 === i || 1 === i) { | ||
if (void 0 === d) d = function d(e, t) { | ||
return t; | ||
};else if ("function" != typeof d) { | ||
var I = d; | ||
d = function d(e, t) { | ||
for (var r = t, a = I.length - 1; a >= 0; a--) r = I[a].call(e, r); | ||
return r; | ||
}; | ||
} else { | ||
var w = d; | ||
d = d.call.bind(w); | ||
function applyDec(e, t, r, n, o, a, c, u, l, f, p, d, h) { | ||
function m(e) { | ||
if (!h(e)) throw new TypeError("Attempted to access private element on non-instance"); | ||
} | ||
e.push(d); | ||
} | ||
0 !== i && (1 === i ? (f.get = p.get, f.set = p.set) : 2 === i ? f.value = p : 3 === i ? f.get = p : 4 === i && (f.set = p), s ? 1 === i ? e.push(_bindPropCall(f, "get"), _bindPropCall(f, "set")) : e.push(2 === i ? p : Function.call.bind(p)) : _Object$defineProperty(t, n, f)); | ||
} | ||
function applyMemberDecs(e, t, r, a) { | ||
var n, | ||
i, | ||
o, | ||
s = [], | ||
l = new _Map(), | ||
c = new _Map(); | ||
function pushInitializers(e) { | ||
e && s.push(function (t) { | ||
for (var r = 0; r < e.length; r++) e[r].call(t); | ||
return t; | ||
}); | ||
} | ||
for (var u = 0; u < t.length; u++) { | ||
var f = t[u]; | ||
if (_Array$isArray(f)) { | ||
var d, | ||
p, | ||
v = f[1], | ||
h = f[2], | ||
m = f.length > 3, | ||
b = 16 & v, | ||
y = !!(8 & v), | ||
g = r; | ||
if (v &= 7, y ? (d = e, p = i = i || [], m && !o && (o = function o(t) { | ||
return checkInRHS(t) === e; | ||
}), g = o) : (d = e.prototype, p = n = n || []), 0 !== v && !m) { | ||
var I = y ? c : l, | ||
w = I.get(h) || 0; | ||
if (!0 === w || 3 === w && 4 !== v || 4 === w && 3 !== v) throw new Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + h); | ||
I.set(h, !(!w && v > 2) || v); | ||
} | ||
applyMemberDec(s, d, f, b, h, v, y, m, p, g, a); | ||
var y, | ||
v, | ||
g = t[0], | ||
b = t[3], | ||
w = !u; | ||
if (!w) { | ||
r || _Array$isArray(g) || (g = [g]); | ||
var S = {}, | ||
A = [], | ||
P = 3 === o ? "get" : 4 === o || d ? "set" : "value"; | ||
f ? (p || d ? S = { | ||
get: setFunctionName(function () { | ||
return b(this); | ||
}, n, "get"), | ||
set: function set(e) { | ||
t[4](this, e); | ||
} | ||
} : S[P] = b, p || setFunctionName(S[P], n, 2 === o ? "" : P)) : p || (S = _Object$getOwnPropertyDescriptor(e, n)); | ||
} | ||
} | ||
return pushInitializers(n), pushInitializers(i), s; | ||
} | ||
function applyClassDecs(e, t, r, a) { | ||
if (t.length) { | ||
for (var n = [], i = e, o = e.name, s = r ? 2 : 1, l = t.length - 1; l >= 0; l -= s) { | ||
var c = { | ||
v: !1 | ||
}; | ||
for (var j = g.length - 1; j >= 0; j -= r ? 2 : 1) { | ||
var D = g[j], | ||
E = r ? g[j - 1] : void 0, | ||
I = {}, | ||
O = { | ||
kind: ["field", "accessor", "method", "getter", "setter", "field", "class"][o], | ||
name: n, | ||
metadata: a, | ||
addInitializer: function (e, t) { | ||
if (e.v) throw new Error("attempted to call addInitializer after decoration was finished"); | ||
s(t, "An initializer", "be", !0), c.push(t); | ||
}.bind(null, I) | ||
}; | ||
try { | ||
var u = t[l].call(r ? t[l - 1] : void 0, i, { | ||
kind: "class", | ||
name: o, | ||
addInitializer: createAddInitializerMethod(n, c), | ||
metadata: a | ||
}); | ||
if (w) v = D.call(E, e, O);else { | ||
var k, F; | ||
O["static"] = l, O["private"] = f, f || !p && 2 !== o ? 2 === o ? k = function k(e) { | ||
return m(e), S.value; | ||
} : ((o < 2 || 3 === o) && (k = i(S, "get", f && m)), (o < 2 || 4 === o) && (F = i(S, "set", f && m))) : (k = function k(e) { | ||
return e[n]; | ||
}, p && (F = function F(e, t) { | ||
e[n] = t; | ||
})); | ||
var N = O.access = { | ||
has: f ? h.bind() : function (e) { | ||
return n in e; | ||
} | ||
}; | ||
if (k && (N.get = k), F && (N.set = F), v = D.call(E, d ? { | ||
get: S.get, | ||
set: S.set | ||
} : S[P], O), d) { | ||
if ("object" == _typeof(v) && v) (y = s(v.get, "accessor.get")) && (S.get = y), (y = s(v.set, "accessor.set")) && (S.set = y), (y = s(v.init, "accessor.init")) && A.push(y);else if (void 0 !== v) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0"); | ||
} else s(v, (p ? "field" : "method") + " decorators", "return") && (p ? A.push(v) : S[P] = v); | ||
} | ||
} finally { | ||
c.v = !0; | ||
I.v = !0; | ||
} | ||
void 0 !== u && (assertValidReturnValue(5, u), i = u); | ||
} | ||
return [defineMetadata(i, a), function () { | ||
for (var e = 0; e < n.length; e++) n[e].call(i); | ||
}]; | ||
return (p || d) && u.push(function (e, t) { | ||
for (var r = A.length - 1; r >= 0; r--) t = A[r].call(e, t); | ||
return t; | ||
}), p || w || (f ? d ? u.push(i(S, "get"), i(S, "set")) : u.push(2 === o ? S[P] : i.call.bind(S[P])) : _Object$defineProperty(e, n, S)), v; | ||
} | ||
} | ||
function defineMetadata(e, t) { | ||
return _Object$defineProperty(e, _Symbol.metadata || _Symbol$for("Symbol.metadata"), { | ||
configurable: !0, | ||
enumerable: !0, | ||
value: t | ||
}); | ||
} | ||
function applyDecs2305(e, t, r, a, n, i) { | ||
if (arguments.length >= 6) var o = i[_Symbol.metadata || _Symbol$for("Symbol.metadata")]; | ||
var s = _Object$create(void 0 === o ? null : o), | ||
l = applyMemberDecs(e, t, n, s); | ||
return r.length || defineMetadata(e, s), { | ||
e: l, | ||
function u(e, t) { | ||
return _Object$defineProperty(e, _Symbol.metadata || _Symbol$for("Symbol.metadata"), { | ||
configurable: !0, | ||
enumerable: !0, | ||
value: t | ||
}); | ||
} | ||
if (arguments.length >= 6) var l = a[_Symbol.metadata || _Symbol$for("Symbol.metadata")]; | ||
var f = _Object$create(null == l ? null : l), | ||
p = function (e, t, r, n) { | ||
var o, | ||
a, | ||
i = [], | ||
s = function s(t) { | ||
return checkInRHS(t) === e; | ||
}, | ||
u = new _Map(); | ||
function l(e) { | ||
e && i.push(c.bind(null, e)); | ||
} | ||
for (var f = 0; f < t.length; f++) { | ||
var p = t[f]; | ||
if (_Array$isArray(p)) { | ||
var d = p[1], | ||
h = p[2], | ||
m = p.length > 3, | ||
y = 16 & d, | ||
v = !!(8 & d), | ||
g = 0 == (d &= 7), | ||
b = h + "/" + v; | ||
if (!g && !m) { | ||
var w = u.get(b); | ||
if (!0 === w || 3 === w && 4 !== d || 4 === w && 3 !== d) throw new Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + h); | ||
u.set(b, !(d > 2) || d); | ||
} | ||
applyDec(v ? e : e.prototype, p, y, m ? "#" + h : toPropertyKey(h), d, n, v ? a = a || [] : o = o || [], i, v, m, g, 1 === d, v && m ? s : r); | ||
} | ||
} | ||
return l(o), l(a), i; | ||
}(e, t, o, f); | ||
return r.length || u(e, f), { | ||
e: p, | ||
get c() { | ||
return applyClassDecs(e, r, a, s); | ||
var t = []; | ||
return r.length && [u(s(applyDec(e, [r], n, e.name, 5, f, t), "class decorators", "return") || e, f), c.bind(null, t, e)]; | ||
} | ||
@@ -200,0 +139,0 @@ }; |
@@ -12,2 +12,4 @@ import _typeof from "./typeof.js"; | ||
import _Array$isArray from "core-js/library/fn/array/is-array.js"; | ||
import setFunctionName from "./setFunctionName.js"; | ||
import toPropertyKey from "./toPropertyKey.js"; | ||
function old_createMetadataMethodsForProperty(e, t, a, r) { | ||
@@ -88,3 +90,3 @@ return { | ||
kind: c, | ||
name: l ? "#" + t : t, | ||
name: l ? "#" + t : toPropertyKey(t), | ||
isStatic: n, | ||
@@ -127,6 +129,3 @@ isPrivate: l | ||
void 0 !== t.get && old_assertCallable(t.get, "accessor.get"), void 0 !== t.set && old_assertCallable(t.set, "accessor.set"), void 0 !== t.init && old_assertCallable(t.init, "accessor.init"), void 0 !== t.initializer && old_assertCallable(t.initializer, "accessor.initializer"); | ||
} else if ("function" !== a) { | ||
var r; | ||
throw r = 0 === e ? "field" : 10 === e ? "class" : "method", new TypeError(r + " decorators must return a function or void 0"); | ||
} | ||
} else if ("function" !== a) throw new TypeError((0 === e ? "field" : 10 === e ? "class" : "method") + " decorators must return a function or void 0"); | ||
} | ||
@@ -144,24 +143,25 @@ function old_getInit(e) { | ||
v, | ||
y, | ||
h = a[0]; | ||
if (n ? c = 0 === o || 1 === o ? { | ||
if (n ? (0 === o || 1 === o ? (c = { | ||
get: a[3], | ||
set: a[4] | ||
} : 3 === o ? { | ||
}, u = "get") : 3 === o ? (c = { | ||
get: a[3] | ||
} : 4 === o ? { | ||
}, u = "get") : 4 === o ? (c = { | ||
set: a[3] | ||
} : { | ||
}, u = "set") : c = { | ||
value: a[3] | ||
} : 0 !== o && (c = _Object$getOwnPropertyDescriptor(t, r)), 1 === o ? u = { | ||
}, 0 !== o && (1 === o && setFunctionName(a[4], "#" + r, "set"), setFunctionName(a[3], "#" + r, u))) : 0 !== o && (c = _Object$getOwnPropertyDescriptor(t, r)), 1 === o ? f = { | ||
get: c.get, | ||
set: c.set | ||
} : 2 === o ? u = c.value : 3 === o ? u = c.get : 4 === o && (u = c.set), "function" == typeof h) void 0 !== (f = old_memberDec(h, r, c, l, s, o, i, n, u)) && (old_assertValidReturnValue(o, f), 0 === o ? d = f : 1 === o ? (d = old_getInit(f), p = f.get || u.get, v = f.set || u.set, u = { | ||
get: p, | ||
set: v | ||
}) : u = f);else for (var y = h.length - 1; y >= 0; y--) { | ||
} : 2 === o ? f = c.value : 3 === o ? f = c.get : 4 === o && (f = c.set), "function" == typeof h) void 0 !== (p = old_memberDec(h, r, c, l, s, o, i, n, f)) && (old_assertValidReturnValue(o, p), 0 === o ? d = p : 1 === o ? (d = old_getInit(p), v = p.get || f.get, y = p.set || f.set, f = { | ||
get: v, | ||
set: y | ||
}) : f = p);else for (var m = h.length - 1; m >= 0; m--) { | ||
var b; | ||
if (void 0 !== (f = old_memberDec(h[y], r, c, l, s, o, i, n, u))) old_assertValidReturnValue(o, f), 0 === o ? b = f : 1 === o ? (b = old_getInit(f), p = f.get || u.get, v = f.set || u.set, u = { | ||
get: p, | ||
set: v | ||
}) : u = f, void 0 !== b && (void 0 === d ? d = b : "function" == typeof d ? d = [d, b] : d.push(b)); | ||
void 0 !== (p = old_memberDec(h[m], r, c, l, s, o, i, n, f)) && (old_assertValidReturnValue(o, p), 0 === o ? b = p : 1 === o ? (b = old_getInit(p), v = p.get || f.get, y = p.set || f.set, f = { | ||
get: v, | ||
set: y | ||
}) : f = p, void 0 !== b && (void 0 === d ? d = b : "function" == typeof d ? d = [d, b] : d.push(b))); | ||
} | ||
@@ -178,5 +178,5 @@ if (0 === o || 1 === o) { | ||
} else { | ||
var m = d; | ||
var _ = d; | ||
d = function d(e, t) { | ||
return m.call(e, t); | ||
return _.call(e, t); | ||
}; | ||
@@ -186,8 +186,8 @@ } | ||
} | ||
0 !== o && (1 === o ? (c.get = u.get, c.set = u.set) : 2 === o ? c.value = u : 3 === o ? c.get = u : 4 === o && (c.set = u), n ? 1 === o ? (e.push(function (e, t) { | ||
return u.get.call(e, t); | ||
0 !== o && (1 === o ? (c.get = f.get, c.set = f.set) : 2 === o ? c.value = f : 3 === o ? c.get = f : 4 === o && (c.set = f), n ? 1 === o ? (e.push(function (e, t) { | ||
return f.get.call(e, t); | ||
}), e.push(function (e, t) { | ||
return u.set.call(e, t); | ||
})) : 2 === o ? e.push(u) : e.push(function (e, t) { | ||
return u.call(e, t); | ||
return f.set.call(e, t); | ||
})) : 2 === o ? e.push(f) : e.push(function (e, t) { | ||
return f.call(e, t); | ||
}) : _Object$defineProperty(t, r, c)); | ||
@@ -203,12 +203,12 @@ } | ||
v = d[1], | ||
h = d[2], | ||
y = d.length > 3, | ||
b = v >= 5; | ||
if (b ? (u = t, f = r, 0 !== (v -= 5) && (p = n = n || [])) : (u = t.prototype, f = a, 0 !== v && (p = i = i || [])), 0 !== v && !y) { | ||
var g = b ? s : l, | ||
m = g.get(h) || 0; | ||
if (!0 === m || 3 === m && 4 !== v || 4 === m && 3 !== v) throw new Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + h); | ||
!m && v > 2 ? g.set(h, v) : g.set(h, !0); | ||
y = d[2], | ||
h = d.length > 3, | ||
m = v >= 5; | ||
if (m ? (u = t, f = r, 0 != (v -= 5) && (p = n = n || [])) : (u = t.prototype, f = a, 0 !== v && (p = i = i || [])), 0 !== v && !h) { | ||
var b = m ? s : l, | ||
g = b.get(y) || 0; | ||
if (!0 === g || 3 === g && 4 !== v || 4 === g && 3 !== v) throw new Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + y); | ||
!g && v > 2 ? b.set(y, v) : b.set(y, !0); | ||
} | ||
old_applyMemberDec(e, u, d, h, v, b, y, f, p); | ||
old_applyMemberDec(e, u, d, y, v, m, h, f, p); | ||
} | ||
@@ -215,0 +215,0 @@ } |
@@ -10,4 +10,4 @@ import _typeof from "./typeof.js"; | ||
!function (e, t) { | ||
if (e.v) throw new Error("attempted to call " + t + " after decoration was finished"); | ||
}(t, "addInitializer"), assertCallable(r, "An initializer"), e.push(r); | ||
if (e.v) throw new Error("attempted to call addInitializer after decoration was finished"); | ||
}(t), assertCallable(r, "An initializer"), e.push(r); | ||
}; | ||
@@ -76,6 +76,3 @@ } | ||
void 0 !== t.get && assertCallable(t.get, "accessor.get"), void 0 !== t.set && assertCallable(t.set, "accessor.set"), void 0 !== t.init && assertCallable(t.init, "accessor.init"); | ||
} else if ("function" !== r) { | ||
var a; | ||
throw a = 0 === e ? "field" : 10 === e ? "class" : "method", new TypeError(a + " decorators must return a function or void 0"); | ||
} | ||
} else if ("function" !== r) throw new TypeError((0 === e ? "field" : 10 === e ? "class" : "method") + " decorators must return a function or void 0"); | ||
} | ||
@@ -107,6 +104,6 @@ function applyMemberDec(e, t, r, a, n, i, s, o) { | ||
var g; | ||
if (void 0 !== (f = memberDec(h[v], a, c, o, n, i, s, u))) assertValidReturnValue(n, f), 0 === n ? g = f : 1 === n ? (g = f.init, p = f.get || u.get, d = f.set || u.set, u = { | ||
void 0 !== (f = memberDec(h[v], a, c, o, n, i, s, u)) && (assertValidReturnValue(n, f), 0 === n ? g = f : 1 === n ? (g = f.init, p = f.get || u.get, d = f.set || u.set, u = { | ||
get: p, | ||
set: d | ||
}) : u = f, void 0 !== g && (void 0 === l ? l = g : "function" == typeof l ? l = [l, g] : l.push(g)); | ||
}) : u = f, void 0 !== g && (void 0 === l ? l = g : "function" == typeof l ? l = [l, g] : l.push(g))); | ||
} | ||
@@ -113,0 +110,0 @@ if (0 === n || 1 === n) { |
@@ -6,2 +6,4 @@ import _typeof from "./typeof.js"; | ||
import _Array$isArray from "core-js/library/fn/array/is-array.js"; | ||
import setFunctionName from "./setFunctionName.js"; | ||
import toPropertyKey from "./toPropertyKey.js"; | ||
function applyDecs2203RFactory() { | ||
@@ -11,7 +13,7 @@ function createAddInitializerMethod(e, t) { | ||
!function (e, t) { | ||
if (e.v) throw new Error("attempted to call " + t + " after decoration was finished"); | ||
}(t, "addInitializer"), assertCallable(r, "An initializer"), e.push(r); | ||
if (e.v) throw new Error("attempted to call addInitializer after decoration was finished"); | ||
}(t), assertCallable(r, "An initializer"), e.push(r); | ||
}; | ||
} | ||
function memberDec(e, t, r, n, a, i, s, o) { | ||
function memberDec(e, t, r, n, a, i, o, s) { | ||
var c; | ||
@@ -38,5 +40,5 @@ switch (a) { | ||
kind: c, | ||
name: s ? "#" + t : t, | ||
name: o ? "#" + t : toPropertyKey(t), | ||
"static": i, | ||
"private": s | ||
"private": o | ||
}, | ||
@@ -46,3 +48,3 @@ p = { | ||
}; | ||
0 !== a && (f.addInitializer = createAddInitializerMethod(n, p)), 0 === a ? s ? (l = r.get, u = r.set) : (l = function l() { | ||
0 !== a && (f.addInitializer = createAddInitializerMethod(n, p)), 0 === a ? o ? (l = r.get, u = r.set) : (l = function l() { | ||
return this[t]; | ||
@@ -66,3 +68,3 @@ }, u = function u(e) { | ||
try { | ||
return e(o, f); | ||
return e(s, f); | ||
} finally { | ||
@@ -80,8 +82,5 @@ p.v = !0; | ||
void 0 !== t.get && assertCallable(t.get, "accessor.get"), void 0 !== t.set && assertCallable(t.set, "accessor.set"), void 0 !== t.init && assertCallable(t.init, "accessor.init"); | ||
} else if ("function" !== r) { | ||
var n; | ||
throw n = 0 === e ? "field" : 10 === e ? "class" : "method", new TypeError(n + " decorators must return a function or void 0"); | ||
} | ||
} else if ("function" !== r) throw new TypeError((0 === e ? "field" : 10 === e ? "class" : "method") + " decorators must return a function or void 0"); | ||
} | ||
function applyMemberDec(e, t, r, n, a, i, s, o) { | ||
function applyMemberDec(e, t, r, n, a, i, o, s) { | ||
var c, | ||
@@ -93,24 +92,25 @@ l, | ||
d, | ||
h = r[0]; | ||
if (s ? c = 0 === a || 1 === a ? { | ||
h, | ||
v = r[0]; | ||
if (o ? (0 === a || 1 === a ? (c = { | ||
get: r[3], | ||
set: r[4] | ||
} : 3 === a ? { | ||
}, u = "get") : 3 === a ? (c = { | ||
get: r[3] | ||
} : 4 === a ? { | ||
}, u = "get") : 4 === a ? (c = { | ||
set: r[3] | ||
} : { | ||
}, u = "set") : c = { | ||
value: r[3] | ||
} : 0 !== a && (c = _Object$getOwnPropertyDescriptor(t, n)), 1 === a ? u = { | ||
}, 0 !== a && (1 === a && setFunctionName(r[4], "#" + n, "set"), setFunctionName(r[3], "#" + n, u))) : 0 !== a && (c = _Object$getOwnPropertyDescriptor(t, n)), 1 === a ? f = { | ||
get: c.get, | ||
set: c.set | ||
} : 2 === a ? u = c.value : 3 === a ? u = c.get : 4 === a && (u = c.set), "function" == typeof h) void 0 !== (f = memberDec(h, n, c, o, a, i, s, u)) && (assertValidReturnValue(a, f), 0 === a ? l = f : 1 === a ? (l = f.init, p = f.get || u.get, d = f.set || u.set, u = { | ||
get: p, | ||
set: d | ||
}) : u = f);else for (var v = h.length - 1; v >= 0; v--) { | ||
var g; | ||
if (void 0 !== (f = memberDec(h[v], n, c, o, a, i, s, u))) assertValidReturnValue(a, f), 0 === a ? g = f : 1 === a ? (g = f.init, p = f.get || u.get, d = f.set || u.set, u = { | ||
get: p, | ||
set: d | ||
}) : u = f, void 0 !== g && (void 0 === l ? l = g : "function" == typeof l ? l = [l, g] : l.push(g)); | ||
} : 2 === a ? f = c.value : 3 === a ? f = c.get : 4 === a && (f = c.set), "function" == typeof v) void 0 !== (p = memberDec(v, n, c, s, a, i, o, f)) && (assertValidReturnValue(a, p), 0 === a ? l = p : 1 === a ? (l = p.init, d = p.get || f.get, h = p.set || f.set, f = { | ||
get: d, | ||
set: h | ||
}) : f = p);else for (var g = v.length - 1; g >= 0; g--) { | ||
var y; | ||
void 0 !== (p = memberDec(v[g], n, c, s, a, i, o, f)) && (assertValidReturnValue(a, p), 0 === a ? y = p : 1 === a ? (y = p.init, d = p.get || f.get, h = p.set || f.set, f = { | ||
get: d, | ||
set: h | ||
}) : f = p, void 0 !== y && (void 0 === l ? l = y : "function" == typeof l ? l = [l, y] : l.push(y))); | ||
} | ||
@@ -121,11 +121,11 @@ if (0 === a || 1 === a) { | ||
};else if ("function" != typeof l) { | ||
var y = l; | ||
var m = l; | ||
l = function l(e, t) { | ||
for (var r = t, n = 0; n < y.length; n++) r = y[n].call(e, r); | ||
for (var r = t, n = 0; n < m.length; n++) r = m[n].call(e, r); | ||
return r; | ||
}; | ||
} else { | ||
var m = l; | ||
var b = l; | ||
l = function l(e, t) { | ||
return m.call(e, t); | ||
return b.call(e, t); | ||
}; | ||
@@ -135,13 +135,13 @@ } | ||
} | ||
0 !== a && (1 === a ? (c.get = u.get, c.set = u.set) : 2 === a ? c.value = u : 3 === a ? c.get = u : 4 === a && (c.set = u), s ? 1 === a ? (e.push(function (e, t) { | ||
return u.get.call(e, t); | ||
0 !== a && (1 === a ? (c.get = f.get, c.set = f.set) : 2 === a ? c.value = f : 3 === a ? c.get = f : 4 === a && (c.set = f), o ? 1 === a ? (e.push(function (e, t) { | ||
return f.get.call(e, t); | ||
}), e.push(function (e, t) { | ||
return u.set.call(e, t); | ||
})) : 2 === a ? e.push(u) : e.push(function (e, t) { | ||
return u.call(e, t); | ||
return f.set.call(e, t); | ||
})) : 2 === a ? e.push(f) : e.push(function (e, t) { | ||
return f.call(e, t); | ||
}) : _Object$defineProperty(t, n, c)); | ||
} | ||
function applyMemberDecs(e, t) { | ||
for (var r, n, a = [], i = new _Map(), s = new _Map(), o = 0; o < t.length; o++) { | ||
var c = t[o]; | ||
for (var r, n, a = [], i = new _Map(), o = new _Map(), s = 0; s < t.length; s++) { | ||
var c = t[s]; | ||
if (_Array$isArray(c)) { | ||
@@ -154,4 +154,4 @@ var l, | ||
h = f >= 5; | ||
if (h ? (l = e, 0 !== (f -= 5) && (u = n = n || [])) : (l = e.prototype, 0 !== f && (u = r = r || [])), 0 !== f && !d) { | ||
var v = h ? s : i, | ||
if (h ? (l = e, 0 != (f -= 5) && (u = n = n || [])) : (l = e.prototype, 0 !== f && (u = r = r || [])), 0 !== f && !d) { | ||
var v = h ? o : i, | ||
g = v.get(p) || 0; | ||
@@ -179,15 +179,15 @@ if (!0 === g || 3 === g && 4 !== f || 4 === g && 3 !== f) throw new Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + p); | ||
for (var r = [], n = e, a = e.name, i = t.length - 1; i >= 0; i--) { | ||
var s = { | ||
var o = { | ||
v: !1 | ||
}; | ||
try { | ||
var o = t[i](n, { | ||
var s = t[i](n, { | ||
kind: "class", | ||
name: a, | ||
addInitializer: createAddInitializerMethod(r, s) | ||
addInitializer: createAddInitializerMethod(r, o) | ||
}); | ||
} finally { | ||
s.v = !0; | ||
o.v = !0; | ||
} | ||
void 0 !== o && (assertValidReturnValue(10, o), n = o); | ||
void 0 !== s && (assertValidReturnValue(10, s), n = s); | ||
} | ||
@@ -194,0 +194,0 @@ return [n, function () { |
@@ -7,2 +7,4 @@ import _typeof from "./typeof.js"; | ||
import checkInRHS from "./checkInRHS.js"; | ||
import setFunctionName from "./setFunctionName.js"; | ||
import toPropertyKey from "./toPropertyKey.js"; | ||
function applyDecs2301Factory() { | ||
@@ -12,4 +14,4 @@ function createAddInitializerMethod(e, t) { | ||
!function (e, t) { | ||
if (e.v) throw new Error("attempted to call " + t + " after decoration was finished"); | ||
}(t, "addInitializer"), assertCallable(r, "An initializer"), e.push(r); | ||
if (e.v) throw new Error("attempted to call addInitializer after decoration was finished"); | ||
}(t), assertCallable(r, "An initializer"), e.push(r); | ||
}; | ||
@@ -42,3 +44,3 @@ } | ||
kind: u, | ||
name: s ? "#" + t : t, | ||
name: s ? "#" + t : toPropertyKey(t), | ||
"static": i, | ||
@@ -98,6 +100,3 @@ "private": s | ||
void 0 !== t.get && assertCallable(t.get, "accessor.get"), void 0 !== t.set && assertCallable(t.set, "accessor.set"), void 0 !== t.init && assertCallable(t.init, "accessor.init"); | ||
} else if ("function" !== r) { | ||
var n; | ||
throw n = 0 === e ? "field" : 10 === e ? "class" : "method", new TypeError(n + " decorators must return a function or void 0"); | ||
} | ||
} else if ("function" !== r) throw new TypeError((0 === e ? "field" : 10 === e ? "class" : "method") + " decorators must return a function or void 0"); | ||
} | ||
@@ -117,26 +116,27 @@ function curryThis2(e) { | ||
v, | ||
y, | ||
g = r[0]; | ||
if (s ? u = 0 === a || 1 === a ? { | ||
get: (p = r[3], function () { | ||
return p(this); | ||
if (s ? (0 === a || 1 === a ? (u = { | ||
get: (d = r[3], function () { | ||
return d(this); | ||
}), | ||
set: curryThis2(r[4]) | ||
} : 3 === a ? { | ||
}, f = "get") : 3 === a ? (u = { | ||
get: r[3] | ||
} : 4 === a ? { | ||
}, f = "get") : 4 === a ? (u = { | ||
set: r[3] | ||
} : { | ||
}, f = "set") : u = { | ||
value: r[3] | ||
} : 0 !== a && (u = _Object$getOwnPropertyDescriptor(t, n)), 1 === a ? f = { | ||
}, 0 !== a && (1 === a && setFunctionName(u.set, "#" + n, "set"), setFunctionName(u[f || "value"], "#" + n, f))) : 0 !== a && (u = _Object$getOwnPropertyDescriptor(t, n)), 1 === a ? p = { | ||
get: u.get, | ||
set: u.set | ||
} : 2 === a ? f = u.value : 3 === a ? f = u.get : 4 === a && (f = u.set), "function" == typeof g) void 0 !== (d = memberDec(g, n, u, o, a, i, s, f, c)) && (assertValidReturnValue(a, d), 0 === a ? l = d : 1 === a ? (l = d.init, h = d.get || f.get, v = d.set || f.set, f = { | ||
get: h, | ||
set: v | ||
}) : f = d);else for (var y = g.length - 1; y >= 0; y--) { | ||
var m; | ||
if (void 0 !== (d = memberDec(g[y], n, u, o, a, i, s, f, c))) assertValidReturnValue(a, d), 0 === a ? m = d : 1 === a ? (m = d.init, h = d.get || f.get, v = d.set || f.set, f = { | ||
get: h, | ||
set: v | ||
}) : f = d, void 0 !== m && (void 0 === l ? l = m : "function" == typeof l ? l = [l, m] : l.push(m)); | ||
} : 2 === a ? p = u.value : 3 === a ? p = u.get : 4 === a && (p = u.set), "function" == typeof g) void 0 !== (h = memberDec(g, n, u, o, a, i, s, p, c)) && (assertValidReturnValue(a, h), 0 === a ? l = h : 1 === a ? (l = h.init, v = h.get || p.get, y = h.set || p.set, p = { | ||
get: v, | ||
set: y | ||
}) : p = h);else for (var m = g.length - 1; m >= 0; m--) { | ||
var b; | ||
void 0 !== (h = memberDec(g[m], n, u, o, a, i, s, p, c)) && (assertValidReturnValue(a, h), 0 === a ? b = h : 1 === a ? (b = h.init, v = h.get || p.get, y = h.set || p.set, p = { | ||
get: v, | ||
set: y | ||
}) : p = h, void 0 !== b && (void 0 === l ? l = b : "function" == typeof l ? l = [l, b] : l.push(b))); | ||
} | ||
@@ -147,11 +147,11 @@ if (0 === a || 1 === a) { | ||
};else if ("function" != typeof l) { | ||
var b = l; | ||
var I = l; | ||
l = function l(e, t) { | ||
for (var r = t, n = 0; n < b.length; n++) r = b[n].call(e, r); | ||
for (var r = t, n = 0; n < I.length; n++) r = I[n].call(e, r); | ||
return r; | ||
}; | ||
} else { | ||
var I = l; | ||
var w = l; | ||
l = function l(e, t) { | ||
return I.call(e, t); | ||
return w.call(e, t); | ||
}; | ||
@@ -161,8 +161,8 @@ } | ||
} | ||
0 !== a && (1 === a ? (u.get = f.get, u.set = f.set) : 2 === a ? u.value = f : 3 === a ? u.get = f : 4 === a && (u.set = f), s ? 1 === a ? (e.push(function (e, t) { | ||
return f.get.call(e, t); | ||
0 !== a && (1 === a ? (u.get = p.get, u.set = p.set) : 2 === a ? u.value = p : 3 === a ? u.get = p : 4 === a && (u.set = p), s ? 1 === a ? (e.push(function (e, t) { | ||
return p.get.call(e, t); | ||
}), e.push(function (e, t) { | ||
return f.set.call(e, t); | ||
})) : 2 === a ? e.push(f) : e.push(function (e, t) { | ||
return f.call(e, t); | ||
return p.set.call(e, t); | ||
})) : 2 === a ? e.push(p) : e.push(function (e, t) { | ||
return p.call(e, t); | ||
}) : _Object$defineProperty(t, n, u)); | ||
@@ -179,8 +179,8 @@ } | ||
v = l.length > 3, | ||
g = d >= 5, | ||
y = r; | ||
if (g ? (f = e, 0 !== (d -= 5) && (p = a = a || []), v && !i && (i = function i(t) { | ||
y = d >= 5, | ||
g = r; | ||
if (y ? (f = e, 0 != (d -= 5) && (p = a = a || []), v && !i && (i = function i(t) { | ||
return checkInRHS(t) === e; | ||
}), y = i) : (f = e.prototype, 0 !== d && (p = n = n || [])), 0 !== d && !v) { | ||
var m = g ? c : o, | ||
}), g = i) : (f = e.prototype, 0 !== d && (p = n = n || [])), 0 !== d && !v) { | ||
var m = y ? c : o, | ||
b = m.get(h) || 0; | ||
@@ -190,3 +190,3 @@ if (!0 === b || 3 === b && 4 !== d || 4 === b && 3 !== d) throw new Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + h); | ||
} | ||
applyMemberDec(s, f, l, h, d, g, v, p, y); | ||
applyMemberDec(s, f, l, h, d, y, v, p, g); | ||
} | ||
@@ -193,0 +193,0 @@ } |
@@ -5,198 +5,137 @@ import _typeof from "./typeof.js"; | ||
import _Object$defineProperty from "core-js/library/fn/object/define-property.js"; | ||
import _Map from "core-js/library/fn/map.js"; | ||
import _Symbol from "core-js/library/fn/symbol/index.js"; | ||
import _Symbol$for from "core-js/library/fn/symbol/for.js"; | ||
import _Object$create from "core-js/library/fn/object/create.js"; | ||
import _Map from "core-js/library/fn/map.js"; | ||
import checkInRHS from "./checkInRHS.js"; | ||
function _bindPropCall(e, t) { | ||
return function (r, a) { | ||
return e[t].call(r, a); | ||
}; | ||
} | ||
function createAddInitializerMethod(e, t) { | ||
return function (r) { | ||
if (t.v) throw new Error("attempted to call addInitializer after decoration was finished"); | ||
assertCallable(r, "An initializer", !0), e.push(r); | ||
}; | ||
} | ||
function memberDec(e, t, r, a, n, i, o, s, l, c, u) { | ||
function assertInstanceIfPrivate(e) { | ||
return function (t, r) { | ||
if (!c(t)) throw new TypeError("Attempted to access private element on non-instance"); | ||
return e(t, r); | ||
import setFunctionName from "./setFunctionName.js"; | ||
import toPropertyKey from "./toPropertyKey.js"; | ||
export default function applyDecs2305(e, t, r, n, o, a) { | ||
function i(e, t, r) { | ||
return function (n, o) { | ||
return r && r(n), e[t].call(n, o); | ||
}; | ||
} | ||
var f, | ||
d, | ||
p = { | ||
v: !1 | ||
}, | ||
v = { | ||
kind: ["field", "accessor", "method", "getter", "setter", "field"][i], | ||
name: s ? "#" + r : r, | ||
"static": o, | ||
"private": s, | ||
metadata: u, | ||
addInitializer: createAddInitializerMethod(n, p) | ||
}; | ||
if (s || 0 !== i && 2 !== i) { | ||
if (2 === i) f = assertInstanceIfPrivate(function () { | ||
return a.value; | ||
});else { | ||
var h = 0 === i || 1 === i; | ||
(h || 3 === i) && (f = _bindPropCall(a, "get"), s && (f = assertInstanceIfPrivate(f))), (h || 4 === i) && (d = _bindPropCall(a, "set"), s && (d = assertInstanceIfPrivate(d))); | ||
} | ||
} else f = function f(e) { | ||
return e[r]; | ||
}, 0 === i && (d = function d(e, t) { | ||
e[r] = t; | ||
}); | ||
var m = s ? c.bind() : function (e) { | ||
return r in e; | ||
}, | ||
b = v.access = { | ||
has: m | ||
}; | ||
f && (b.get = f), d && (b.set = d); | ||
try { | ||
return e.call(t, l, v); | ||
} finally { | ||
p.v = !0; | ||
function c(e, t) { | ||
for (var r = 0; r < e.length; r++) e[r].call(t); | ||
return t; | ||
} | ||
} | ||
function assertCallable(e, t, r) { | ||
if ("function" != typeof e && (r || void 0 !== e)) throw new TypeError(t + " must be a function"); | ||
} | ||
function assertValidReturnValue(e, t) { | ||
var r = _typeof(t); | ||
if (1 === e) { | ||
if ("object" !== r || !t) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0"); | ||
assertCallable(t.get, "accessor.get"), assertCallable(t.set, "accessor.set"), assertCallable(t.init, "accessor.init"); | ||
} else if ("function" !== r) throw new TypeError((0 === e ? "field" : 5 === e ? "class" : "method") + " decorators must return a function or void 0"); | ||
} | ||
function applyMemberDec(e, t, r, a, n, i, o, s, l, c, u) { | ||
var f, | ||
d, | ||
p, | ||
v, | ||
h = r[0], | ||
m = r[3]; | ||
a || _Array$isArray(h) || (h = [h]), s ? f = 0 === i || 1 === i ? { | ||
get: function get() { | ||
return m(this); | ||
}, | ||
set: function set(e) { | ||
r[4](this, e); | ||
} | ||
} : 3 === i ? { | ||
get: m | ||
} : 4 === i ? { | ||
set: m | ||
} : { | ||
value: m | ||
} : 0 !== i && (f = _Object$getOwnPropertyDescriptor(t, n)), 1 === i ? p = { | ||
get: f.get, | ||
set: f.set | ||
} : 2 === i ? p = f.value : 3 === i ? p = f.get : 4 === i && (p = f.set); | ||
for (var b = a ? 2 : 1, y = h.length - 1; y >= 0; y -= b) { | ||
var g; | ||
if (void 0 !== (v = memberDec(h[y], a ? h[y - 1] : void 0, n, f, l, i, o, s, p, c, u))) assertValidReturnValue(i, v), 0 === i ? g = v : 1 === i ? (g = v.init, p = { | ||
get: v.get || p.get, | ||
set: v.set || p.set | ||
}) : p = v, void 0 !== g && (void 0 === d ? d = g : "function" == typeof d ? d = [d, g] : d.push(g)); | ||
function s(e, t, r, n) { | ||
if ("function" != typeof e && (n || void 0 !== e)) throw new TypeError(t + " must " + (r || "be") + " a function" + (n ? "" : " or undefined")); | ||
return e; | ||
} | ||
if (0 === i || 1 === i) { | ||
if (void 0 === d) d = function d(e, t) { | ||
return t; | ||
};else if ("function" != typeof d) { | ||
var I = d; | ||
d = function d(e, t) { | ||
for (var r = t, a = I.length - 1; a >= 0; a--) r = I[a].call(e, r); | ||
return r; | ||
}; | ||
} else { | ||
var w = d; | ||
d = d.call.bind(w); | ||
function applyDec(e, t, r, n, o, a, c, u, l, f, p, d, h) { | ||
function m(e) { | ||
if (!h(e)) throw new TypeError("Attempted to access private element on non-instance"); | ||
} | ||
e.push(d); | ||
} | ||
0 !== i && (1 === i ? (f.get = p.get, f.set = p.set) : 2 === i ? f.value = p : 3 === i ? f.get = p : 4 === i && (f.set = p), s ? 1 === i ? e.push(_bindPropCall(f, "get"), _bindPropCall(f, "set")) : e.push(2 === i ? p : Function.call.bind(p)) : _Object$defineProperty(t, n, f)); | ||
} | ||
function applyMemberDecs(e, t, r, a) { | ||
var n, | ||
i, | ||
o, | ||
s = [], | ||
l = new _Map(), | ||
c = new _Map(); | ||
function pushInitializers(e) { | ||
e && s.push(function (t) { | ||
for (var r = 0; r < e.length; r++) e[r].call(t); | ||
return t; | ||
}); | ||
} | ||
for (var u = 0; u < t.length; u++) { | ||
var f = t[u]; | ||
if (_Array$isArray(f)) { | ||
var d, | ||
p, | ||
v = f[1], | ||
h = f[2], | ||
m = f.length > 3, | ||
b = 16 & v, | ||
y = !!(8 & v), | ||
g = r; | ||
if (v &= 7, y ? (d = e, p = i = i || [], m && !o && (o = function o(t) { | ||
return checkInRHS(t) === e; | ||
}), g = o) : (d = e.prototype, p = n = n || []), 0 !== v && !m) { | ||
var I = y ? c : l, | ||
w = I.get(h) || 0; | ||
if (!0 === w || 3 === w && 4 !== v || 4 === w && 3 !== v) throw new Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + h); | ||
I.set(h, !(!w && v > 2) || v); | ||
} | ||
applyMemberDec(s, d, f, b, h, v, y, m, p, g, a); | ||
var y, | ||
v, | ||
g = t[0], | ||
b = t[3], | ||
w = !u; | ||
if (!w) { | ||
r || _Array$isArray(g) || (g = [g]); | ||
var S = {}, | ||
A = [], | ||
P = 3 === o ? "get" : 4 === o || d ? "set" : "value"; | ||
f ? (p || d ? S = { | ||
get: setFunctionName(function () { | ||
return b(this); | ||
}, n, "get"), | ||
set: function set(e) { | ||
t[4](this, e); | ||
} | ||
} : S[P] = b, p || setFunctionName(S[P], n, 2 === o ? "" : P)) : p || (S = _Object$getOwnPropertyDescriptor(e, n)); | ||
} | ||
} | ||
return pushInitializers(n), pushInitializers(i), s; | ||
} | ||
function applyClassDecs(e, t, r, a) { | ||
if (t.length) { | ||
for (var n = [], i = e, o = e.name, s = r ? 2 : 1, l = t.length - 1; l >= 0; l -= s) { | ||
var c = { | ||
v: !1 | ||
}; | ||
for (var j = g.length - 1; j >= 0; j -= r ? 2 : 1) { | ||
var D = g[j], | ||
E = r ? g[j - 1] : void 0, | ||
I = {}, | ||
O = { | ||
kind: ["field", "accessor", "method", "getter", "setter", "field", "class"][o], | ||
name: n, | ||
metadata: a, | ||
addInitializer: function (e, t) { | ||
if (e.v) throw new Error("attempted to call addInitializer after decoration was finished"); | ||
s(t, "An initializer", "be", !0), c.push(t); | ||
}.bind(null, I) | ||
}; | ||
try { | ||
var u = t[l].call(r ? t[l - 1] : void 0, i, { | ||
kind: "class", | ||
name: o, | ||
addInitializer: createAddInitializerMethod(n, c), | ||
metadata: a | ||
}); | ||
if (w) v = D.call(E, e, O);else { | ||
var k, F; | ||
O["static"] = l, O["private"] = f, f || !p && 2 !== o ? 2 === o ? k = function k(e) { | ||
return m(e), S.value; | ||
} : ((o < 2 || 3 === o) && (k = i(S, "get", f && m)), (o < 2 || 4 === o) && (F = i(S, "set", f && m))) : (k = function k(e) { | ||
return e[n]; | ||
}, p && (F = function F(e, t) { | ||
e[n] = t; | ||
})); | ||
var N = O.access = { | ||
has: f ? h.bind() : function (e) { | ||
return n in e; | ||
} | ||
}; | ||
if (k && (N.get = k), F && (N.set = F), v = D.call(E, d ? { | ||
get: S.get, | ||
set: S.set | ||
} : S[P], O), d) { | ||
if ("object" == _typeof(v) && v) (y = s(v.get, "accessor.get")) && (S.get = y), (y = s(v.set, "accessor.set")) && (S.set = y), (y = s(v.init, "accessor.init")) && A.push(y);else if (void 0 !== v) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0"); | ||
} else s(v, (p ? "field" : "method") + " decorators", "return") && (p ? A.push(v) : S[P] = v); | ||
} | ||
} finally { | ||
c.v = !0; | ||
I.v = !0; | ||
} | ||
void 0 !== u && (assertValidReturnValue(5, u), i = u); | ||
} | ||
return [defineMetadata(i, a), function () { | ||
for (var e = 0; e < n.length; e++) n[e].call(i); | ||
}]; | ||
return (p || d) && u.push(function (e, t) { | ||
for (var r = A.length - 1; r >= 0; r--) t = A[r].call(e, t); | ||
return t; | ||
}), p || w || (f ? d ? u.push(i(S, "get"), i(S, "set")) : u.push(2 === o ? S[P] : i.call.bind(S[P])) : _Object$defineProperty(e, n, S)), v; | ||
} | ||
} | ||
function defineMetadata(e, t) { | ||
return _Object$defineProperty(e, _Symbol.metadata || _Symbol$for("Symbol.metadata"), { | ||
configurable: !0, | ||
enumerable: !0, | ||
value: t | ||
}); | ||
} | ||
export default function applyDecs2305(e, t, r, a, n, i) { | ||
if (arguments.length >= 6) var o = i[_Symbol.metadata || _Symbol$for("Symbol.metadata")]; | ||
var s = _Object$create(void 0 === o ? null : o), | ||
l = applyMemberDecs(e, t, n, s); | ||
return r.length || defineMetadata(e, s), { | ||
e: l, | ||
function u(e, t) { | ||
return _Object$defineProperty(e, _Symbol.metadata || _Symbol$for("Symbol.metadata"), { | ||
configurable: !0, | ||
enumerable: !0, | ||
value: t | ||
}); | ||
} | ||
if (arguments.length >= 6) var l = a[_Symbol.metadata || _Symbol$for("Symbol.metadata")]; | ||
var f = _Object$create(null == l ? null : l), | ||
p = function (e, t, r, n) { | ||
var o, | ||
a, | ||
i = [], | ||
s = function s(t) { | ||
return checkInRHS(t) === e; | ||
}, | ||
u = new _Map(); | ||
function l(e) { | ||
e && i.push(c.bind(null, e)); | ||
} | ||
for (var f = 0; f < t.length; f++) { | ||
var p = t[f]; | ||
if (_Array$isArray(p)) { | ||
var d = p[1], | ||
h = p[2], | ||
m = p.length > 3, | ||
y = 16 & d, | ||
v = !!(8 & d), | ||
g = 0 == (d &= 7), | ||
b = h + "/" + v; | ||
if (!g && !m) { | ||
var w = u.get(b); | ||
if (!0 === w || 3 === w && 4 !== d || 4 === w && 3 !== d) throw new Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + h); | ||
u.set(b, !(d > 2) || d); | ||
} | ||
applyDec(v ? e : e.prototype, p, y, m ? "#" + h : toPropertyKey(h), d, n, v ? a = a || [] : o = o || [], i, v, m, g, 1 === d, v && m ? s : r); | ||
} | ||
} | ||
return l(o), l(a), i; | ||
}(e, t, o, f); | ||
return r.length || u(e, f), { | ||
e: p, | ||
get c() { | ||
return applyClassDecs(e, r, a, s); | ||
var t = []; | ||
return r.length && [u(s(applyDec(e, [r], n, e.name, 5, f, t), "class decorators", "return") || e, f), c.bind(null, t, e)]; | ||
} | ||
}; | ||
} |
import _typeof from "./typeof.js"; | ||
import _Symbol$toPrimitive from "core-js/library/fn/symbol/to-primitive.js"; | ||
export default function _toPrimitive(input, hint) { | ||
if (_typeof(input) !== "object" || input === null) return input; | ||
var prim = input[_Symbol$toPrimitive]; | ||
if (prim !== undefined) { | ||
var res = prim.call(input, hint || "default"); | ||
if (_typeof(res) !== "object") return res; | ||
export default function toPrimitive(t, r) { | ||
if ("object" != _typeof(t) || !t) return t; | ||
var e = t[_Symbol$toPrimitive]; | ||
if (void 0 !== e) { | ||
var i = e.call(t, r || "default"); | ||
if ("object" != _typeof(i)) return i; | ||
throw new TypeError("@@toPrimitive must return a primitive value."); | ||
} | ||
return (hint === "string" ? String : Number)(input); | ||
return ("string" === r ? String : Number)(t); | ||
} |
import _typeof from "./typeof.js"; | ||
import toPrimitive from "./toPrimitive.js"; | ||
export default function _toPropertyKey(arg) { | ||
var key = toPrimitive(arg, "string"); | ||
return _typeof(key) === "symbol" ? key : String(key); | ||
export default function toPropertyKey(t) { | ||
var i = toPrimitive(t, "string"); | ||
return "symbol" == _typeof(i) ? i : String(i); | ||
} |
@@ -1,14 +0,13 @@ | ||
import _typeof from "./typeof.js"; | ||
import _Symbol from "core-js/library/fn/symbol/index.js"; | ||
import _Symbol$for from "core-js/library/fn/symbol/for.js"; | ||
export default function _using(o, e, n) { | ||
if (null == e) return e; | ||
if ("object" != _typeof(e)) throw new TypeError("using declarations can only be used with objects, null, or undefined."); | ||
if (n) var r = e[_Symbol.asyncDispose || _Symbol$for("Symbol.asyncDispose")]; | ||
if (null == r && (r = e[_Symbol.dispose || _Symbol$for("Symbol.dispose")]), "function" != typeof r) throw new TypeError("Property [Symbol.dispose] is not a function."); | ||
export default function _using(o, n, e) { | ||
if (null == n) return n; | ||
if (Object(n) !== n) throw new TypeError("using declarations can only be used with objects, functions, null, or undefined."); | ||
if (e) var r = n[_Symbol.asyncDispose || _Symbol$for("Symbol.asyncDispose")]; | ||
if (null == r && (r = n[_Symbol.dispose || _Symbol$for("Symbol.dispose")]), "function" != typeof r) throw new TypeError("Property [Symbol.dispose] is not a function."); | ||
return o.push({ | ||
v: e, | ||
v: n, | ||
d: r, | ||
a: n | ||
}), e; | ||
a: e | ||
}), n; | ||
} |
var _Symbol$toPrimitive = require("core-js/library/fn/symbol/to-primitive.js"); | ||
var _typeof = require("./typeof.js")["default"]; | ||
function _toPrimitive(input, hint) { | ||
if (_typeof(input) !== "object" || input === null) return input; | ||
var prim = input[_Symbol$toPrimitive]; | ||
if (prim !== undefined) { | ||
var res = prim.call(input, hint || "default"); | ||
if (_typeof(res) !== "object") return res; | ||
function toPrimitive(t, r) { | ||
if ("object" != _typeof(t) || !t) return t; | ||
var e = t[_Symbol$toPrimitive]; | ||
if (void 0 !== e) { | ||
var i = e.call(t, r || "default"); | ||
if ("object" != _typeof(i)) return i; | ||
throw new TypeError("@@toPrimitive must return a primitive value."); | ||
} | ||
return (hint === "string" ? String : Number)(input); | ||
return ("string" === r ? String : Number)(t); | ||
} | ||
module.exports = _toPrimitive, module.exports.__esModule = true, module.exports["default"] = module.exports; | ||
module.exports = toPrimitive, module.exports.__esModule = true, module.exports["default"] = module.exports; |
var _typeof = require("./typeof.js")["default"]; | ||
var toPrimitive = require("./toPrimitive.js"); | ||
function _toPropertyKey(arg) { | ||
var key = toPrimitive(arg, "string"); | ||
return _typeof(key) === "symbol" ? key : String(key); | ||
function toPropertyKey(t) { | ||
var i = toPrimitive(t, "string"); | ||
return "symbol" == _typeof(i) ? i : String(i); | ||
} | ||
module.exports = _toPropertyKey, module.exports.__esModule = true, module.exports["default"] = module.exports; | ||
module.exports = toPropertyKey, module.exports.__esModule = true, module.exports["default"] = module.exports; |
var _Symbol = require("core-js/library/fn/symbol/index.js"); | ||
var _Symbol$for = require("core-js/library/fn/symbol/for.js"); | ||
var _typeof = require("./typeof.js")["default"]; | ||
function _using(o, e, n) { | ||
if (null == e) return e; | ||
if ("object" != _typeof(e)) throw new TypeError("using declarations can only be used with objects, null, or undefined."); | ||
if (n) var r = e[_Symbol.asyncDispose || _Symbol$for("Symbol.asyncDispose")]; | ||
if (null == r && (r = e[_Symbol.dispose || _Symbol$for("Symbol.dispose")]), "function" != typeof r) throw new TypeError("Property [Symbol.dispose] is not a function."); | ||
function _using(o, n, e) { | ||
if (null == n) return n; | ||
if (Object(n) !== n) throw new TypeError("using declarations can only be used with objects, functions, null, or undefined."); | ||
if (e) var r = n[_Symbol.asyncDispose || _Symbol$for("Symbol.asyncDispose")]; | ||
if (null == r && (r = n[_Symbol.dispose || _Symbol$for("Symbol.dispose")]), "function" != typeof r) throw new TypeError("Property [Symbol.dispose] is not a function."); | ||
return o.push({ | ||
v: e, | ||
v: n, | ||
d: r, | ||
a: n | ||
}), e; | ||
a: e | ||
}), n; | ||
} | ||
module.exports = _using, module.exports.__esModule = true, module.exports["default"] = module.exports; |
{ | ||
"name": "@babel/runtime-corejs2", | ||
"version": "7.23.5", | ||
"version": "7.23.6", | ||
"description": "babel's modular runtime helpers with core-js@2 polyfilling", | ||
@@ -201,2 +201,29 @@ "license": "MIT", | ||
"./helpers/esm/regeneratorRuntime": "./helpers/esm/regeneratorRuntime.js", | ||
"./helpers/setFunctionName": [ | ||
{ | ||
"node": "./helpers/setFunctionName.js", | ||
"import": "./helpers/esm/setFunctionName.js", | ||
"default": "./helpers/setFunctionName.js" | ||
}, | ||
"./helpers/setFunctionName.js" | ||
], | ||
"./helpers/esm/setFunctionName": "./helpers/esm/setFunctionName.js", | ||
"./helpers/toPrimitive": [ | ||
{ | ||
"node": "./helpers/toPrimitive.js", | ||
"import": "./helpers/esm/toPrimitive.js", | ||
"default": "./helpers/toPrimitive.js" | ||
}, | ||
"./helpers/toPrimitive.js" | ||
], | ||
"./helpers/esm/toPrimitive": "./helpers/esm/toPrimitive.js", | ||
"./helpers/toPropertyKey": [ | ||
{ | ||
"node": "./helpers/toPropertyKey.js", | ||
"import": "./helpers/esm/toPropertyKey.js", | ||
"default": "./helpers/toPropertyKey.js" | ||
}, | ||
"./helpers/toPropertyKey.js" | ||
], | ||
"./helpers/esm/toPropertyKey": "./helpers/esm/toPropertyKey.js", | ||
"./helpers/typeof": [ | ||
@@ -706,20 +733,2 @@ { | ||
"./helpers/esm/skipFirstGeneratorNext": "./helpers/esm/skipFirstGeneratorNext.js", | ||
"./helpers/toPrimitive": [ | ||
{ | ||
"node": "./helpers/toPrimitive.js", | ||
"import": "./helpers/esm/toPrimitive.js", | ||
"default": "./helpers/toPrimitive.js" | ||
}, | ||
"./helpers/toPrimitive.js" | ||
], | ||
"./helpers/esm/toPrimitive": "./helpers/esm/toPrimitive.js", | ||
"./helpers/toPropertyKey": [ | ||
{ | ||
"node": "./helpers/toPropertyKey.js", | ||
"import": "./helpers/esm/toPropertyKey.js", | ||
"default": "./helpers/toPropertyKey.js" | ||
}, | ||
"./helpers/toPropertyKey.js" | ||
], | ||
"./helpers/esm/toPropertyKey": "./helpers/esm/toPropertyKey.js", | ||
"./helpers/initializerWarningHelper": [ | ||
@@ -726,0 +735,0 @@ { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
310
277259
5665