summaryrefslogtreecommitdiff
path: root/node_modules/@babel/runtime/helpers/applyDecs2301.js
diff options
context:
space:
mode:
authorlittleblack111 <littleblack11111@gmail.com>2023-12-21 22:46:53 +0800
committerlittleblack111 <littleblack11111@gmail.com>2023-12-21 22:46:53 +0800
commitf06956efd2dc4bf77244a9fcce2b883a00b925af (patch)
tree0123cb73ce67f1f4b17e1d6cbabff076ee44e31b /node_modules/@babel/runtime/helpers/applyDecs2301.js
parent8d980c13970c15b6d2312b6fc4ac51698dd0d220 (diff)
updated node modules
Diffstat (limited to 'node_modules/@babel/runtime/helpers/applyDecs2301.js')
-rw-r--r--node_modules/@babel/runtime/helpers/applyDecs2301.js76
1 files changed, 38 insertions, 38 deletions
diff --git a/node_modules/@babel/runtime/helpers/applyDecs2301.js b/node_modules/@babel/runtime/helpers/applyDecs2301.js
index 651fec56..85e1e3e3 100644
--- a/node_modules/@babel/runtime/helpers/applyDecs2301.js
+++ b/node_modules/@babel/runtime/helpers/applyDecs2301.js
@@ -1,11 +1,13 @@
var _typeof = require("./typeof.js")["default"];
var checkInRHS = require("./checkInRHS.js");
+var setFunctionName = require("./setFunctionName.js");
+var toPropertyKey = require("./toPropertyKey.js");
function applyDecs2301Factory() {
function createAddInitializerMethod(e, t) {
return function (r) {
!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 assertInstanceIfPrivate(e, t) {
@@ -33,7 +35,7 @@ function applyDecs2301Factory() {
f,
p = {
kind: u,
- name: s ? "#" + t : t,
+ name: s ? "#" + t : toPropertyKey(t),
"static": i,
"private": s
},
@@ -88,10 +90,7 @@ function applyDecs2301Factory() {
if (1 === e) {
if ("object" !== r || null === t) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 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 curryThis2(e) {
return function (t) {
@@ -106,54 +105,55 @@ function applyDecs2301Factory() {
d,
h,
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)));
}
if (0 === a || 1 === a) {
if (void 0 === l) l = function l(e, t) {
return t;
};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);
};
}
e.push(l);
}
- 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));
}
function applyMemberDecs(e, t, r) {
@@ -165,17 +165,17 @@ function applyDecs2301Factory() {
d = l[1],
h = l[2],
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;
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);
!b && d > 2 ? m.set(h, d) : m.set(h, !0);
}
- applyMemberDec(s, f, l, h, d, g, v, p, y);
+ applyMemberDec(s, f, l, h, d, y, v, p, g);
}
}
return pushInitializers(s, n), pushInitializers(s, a), s;