indexeddbshim 13.0.0-pre.1 → 14.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/badges/licenses-badge-dev.svg +1 -1
- package/badges/licenses-badge.svg +1 -1
- package/dist/indexeddbshim-Key.js +152 -151
- package/dist/indexeddbshim-Key.js.map +1 -1
- package/dist/indexeddbshim-Key.min.js +2 -2
- package/dist/indexeddbshim-Key.min.js.map +1 -1
- package/dist/indexeddbshim-UnicodeIdentifiers-node.cjs +872 -13041
- package/dist/indexeddbshim-UnicodeIdentifiers-node.cjs.map +1 -1
- package/dist/indexeddbshim-UnicodeIdentifiers.js +1165 -1024
- package/dist/indexeddbshim-UnicodeIdentifiers.js.map +1 -1
- package/dist/indexeddbshim-UnicodeIdentifiers.min.js +2 -2
- package/dist/indexeddbshim-UnicodeIdentifiers.min.js.map +1 -1
- package/dist/indexeddbshim-node.cjs +872 -13041
- package/dist/indexeddbshim-node.cjs.map +1 -1
- package/dist/indexeddbshim-noninvasive.js +1164 -1020
- package/dist/indexeddbshim-noninvasive.js.map +1 -1
- package/dist/indexeddbshim-noninvasive.min.js +2 -2
- package/dist/indexeddbshim-noninvasive.min.js.map +1 -1
- package/dist/indexeddbshim.js +1165 -1024
- package/dist/indexeddbshim.js.map +1 -1
- package/dist/indexeddbshim.min.js +2 -2
- package/dist/indexeddbshim.min.js.map +1 -1
- package/index.html +1 -1
- package/package.json +40 -39
- package/src/DOMException.js +3 -4
- package/src/DOMStringList.js +1 -1
- package/src/IDBCursor.js +19 -17
- package/src/IDBDatabase.js +1 -0
- package/src/IDBFactory.js +23 -16
- package/src/IDBIndex.js +17 -23
- package/src/IDBKeyRange.js +4 -4
- package/src/IDBObjectStore.js +29 -26
- package/src/IDBTransaction.js +7 -8
- package/src/Key.d.ts +1 -0
- package/src/Key.js +11 -12
- package/src/setGlobalVars.js +3 -1
- package/src/util.js +1 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! indexeddbshim -
|
|
1
|
+
/*! indexeddbshim - v13.0.0 - 7/7/2024 */
|
|
2
2
|
|
|
3
3
|
(function (factory) {
|
|
4
4
|
typeof define === 'function' && define.amd ? define(factory) :
|
|
@@ -17,568 +17,524 @@
|
|
|
17
17
|
UnicodeIDStart: UnicodeIDStart
|
|
18
18
|
});
|
|
19
19
|
|
|
20
|
-
function
|
|
21
|
-
|
|
20
|
+
function _arrayLikeToArray$1(r, a) {
|
|
21
|
+
(null == a || a > r.length) && (a = r.length);
|
|
22
|
+
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
23
|
+
return n;
|
|
24
|
+
}
|
|
25
|
+
function _arrayWithHoles(r) {
|
|
26
|
+
if (Array.isArray(r)) return r;
|
|
27
|
+
}
|
|
28
|
+
function _arrayWithoutHoles(r) {
|
|
29
|
+
if (Array.isArray(r)) return _arrayLikeToArray$1(r);
|
|
30
|
+
}
|
|
31
|
+
function asyncGeneratorStep(n, t, e, r, o, a, c) {
|
|
32
|
+
try {
|
|
33
|
+
var i = n[a](c),
|
|
34
|
+
u = i.value;
|
|
35
|
+
} catch (n) {
|
|
36
|
+
return void e(n);
|
|
37
|
+
}
|
|
38
|
+
i.done ? t(u) : Promise.resolve(u).then(r, o);
|
|
39
|
+
}
|
|
40
|
+
function _asyncToGenerator(n) {
|
|
41
|
+
return function () {
|
|
42
|
+
var t = this,
|
|
43
|
+
e = arguments;
|
|
44
|
+
return new Promise(function (r, o) {
|
|
45
|
+
var a = n.apply(t, e);
|
|
46
|
+
function _next(n) {
|
|
47
|
+
asyncGeneratorStep(a, r, o, _next, _throw, "next", n);
|
|
48
|
+
}
|
|
49
|
+
function _throw(n) {
|
|
50
|
+
asyncGeneratorStep(a, r, o, _next, _throw, "throw", n);
|
|
51
|
+
}
|
|
52
|
+
_next(void 0);
|
|
53
|
+
});
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
function _classCallCheck$1(a, n) {
|
|
57
|
+
if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
|
|
58
|
+
}
|
|
59
|
+
function _construct(t, e, r) {
|
|
60
|
+
if (_isNativeReflectConstruct()) return Reflect.construct.apply(null, arguments);
|
|
61
|
+
var o = [null];
|
|
62
|
+
o.push.apply(o, e);
|
|
63
|
+
var p = new (t.bind.apply(t, o))();
|
|
64
|
+
return p;
|
|
65
|
+
}
|
|
66
|
+
function _defineProperties(e, r) {
|
|
67
|
+
for (var t = 0; t < r.length; t++) {
|
|
68
|
+
var o = r[t];
|
|
69
|
+
o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey$1(o.key), o);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
function _createClass$1(e, r, t) {
|
|
73
|
+
return r && _defineProperties(e.prototype, r), Object.defineProperty(e, "prototype", {
|
|
74
|
+
writable: !1
|
|
75
|
+
}), e;
|
|
76
|
+
}
|
|
77
|
+
function _createForOfIteratorHelper(r, e) {
|
|
78
|
+
var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
79
|
+
if (!t) {
|
|
80
|
+
if (Array.isArray(r) || (t = _unsupportedIterableToArray$1(r)) || e ) {
|
|
81
|
+
t && (r = t);
|
|
82
|
+
var n = 0,
|
|
83
|
+
F = function () {};
|
|
84
|
+
return {
|
|
85
|
+
s: F,
|
|
86
|
+
n: function () {
|
|
87
|
+
return n >= r.length ? {
|
|
88
|
+
done: !0
|
|
89
|
+
} : {
|
|
90
|
+
done: !1,
|
|
91
|
+
value: r[n++]
|
|
92
|
+
};
|
|
93
|
+
},
|
|
94
|
+
e: function (r) {
|
|
95
|
+
throw r;
|
|
96
|
+
},
|
|
97
|
+
f: F
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
101
|
+
}
|
|
102
|
+
var o,
|
|
103
|
+
a = !0,
|
|
104
|
+
u = !1;
|
|
105
|
+
return {
|
|
106
|
+
s: function () {
|
|
107
|
+
t = t.call(r);
|
|
108
|
+
},
|
|
109
|
+
n: function () {
|
|
110
|
+
var r = t.next();
|
|
111
|
+
return a = r.done, r;
|
|
112
|
+
},
|
|
113
|
+
e: function (r) {
|
|
114
|
+
u = !0, o = r;
|
|
115
|
+
},
|
|
116
|
+
f: function () {
|
|
117
|
+
try {
|
|
118
|
+
a || null == t.return || t.return();
|
|
119
|
+
} finally {
|
|
120
|
+
if (u) throw o;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
function _defineAccessor(e, r, n, t) {
|
|
126
|
+
var c = {
|
|
22
127
|
configurable: !0,
|
|
23
128
|
enumerable: !0
|
|
24
129
|
};
|
|
25
|
-
return
|
|
26
|
-
}
|
|
27
|
-
function
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
130
|
+
return c[e] = t, Object.defineProperty(r, n, c);
|
|
131
|
+
}
|
|
132
|
+
function _defineProperty$1(e, r, t) {
|
|
133
|
+
return (r = _toPropertyKey$1(r)) in e ? Object.defineProperty(e, r, {
|
|
134
|
+
value: t,
|
|
135
|
+
enumerable: !0,
|
|
136
|
+
configurable: !0,
|
|
137
|
+
writable: !0
|
|
138
|
+
}) : e[r] = t, e;
|
|
139
|
+
}
|
|
140
|
+
function _isNativeReflectConstruct() {
|
|
141
|
+
try {
|
|
142
|
+
var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
143
|
+
} catch (t) {}
|
|
144
|
+
return (_isNativeReflectConstruct = function () {
|
|
145
|
+
return !!t;
|
|
146
|
+
})();
|
|
147
|
+
}
|
|
148
|
+
function _iterableToArray(r) {
|
|
149
|
+
if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
|
|
150
|
+
}
|
|
151
|
+
function _iterableToArrayLimit(r, l) {
|
|
152
|
+
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
153
|
+
if (null != t) {
|
|
154
|
+
var e,
|
|
155
|
+
n,
|
|
156
|
+
i,
|
|
157
|
+
u,
|
|
158
|
+
a = [],
|
|
159
|
+
f = !0,
|
|
160
|
+
o = !1;
|
|
37
161
|
try {
|
|
38
|
-
if (
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
} else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
|
|
42
|
-
} catch (err) {
|
|
43
|
-
_d = !0, _e = err;
|
|
162
|
+
if (i = (t = t.call(r)).next, 0 === l) ; else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
|
|
163
|
+
} catch (r) {
|
|
164
|
+
o = !0, n = r;
|
|
44
165
|
} finally {
|
|
45
166
|
try {
|
|
46
|
-
if (!
|
|
167
|
+
if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
|
|
47
168
|
} finally {
|
|
48
|
-
if (
|
|
169
|
+
if (o) throw n;
|
|
49
170
|
}
|
|
50
171
|
}
|
|
51
|
-
return
|
|
172
|
+
return a;
|
|
52
173
|
}
|
|
53
174
|
}
|
|
54
|
-
function
|
|
55
|
-
|
|
175
|
+
function _nonIterableRest() {
|
|
176
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
177
|
+
}
|
|
178
|
+
function _nonIterableSpread() {
|
|
179
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
180
|
+
}
|
|
181
|
+
function ownKeys$1(e, r) {
|
|
182
|
+
var t = Object.keys(e);
|
|
56
183
|
if (Object.getOwnPropertySymbols) {
|
|
57
|
-
var
|
|
58
|
-
|
|
59
|
-
return Object.getOwnPropertyDescriptor(
|
|
60
|
-
})),
|
|
61
|
-
}
|
|
62
|
-
return
|
|
63
|
-
}
|
|
64
|
-
function _objectSpread2$1(
|
|
65
|
-
for (var
|
|
66
|
-
var
|
|
67
|
-
|
|
68
|
-
_defineProperty$1(
|
|
69
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(
|
|
70
|
-
Object.defineProperty(
|
|
184
|
+
var o = Object.getOwnPropertySymbols(e);
|
|
185
|
+
r && (o = o.filter(function (r) {
|
|
186
|
+
return Object.getOwnPropertyDescriptor(e, r).enumerable;
|
|
187
|
+
})), t.push.apply(t, o);
|
|
188
|
+
}
|
|
189
|
+
return t;
|
|
190
|
+
}
|
|
191
|
+
function _objectSpread2$1(e) {
|
|
192
|
+
for (var r = 1; r < arguments.length; r++) {
|
|
193
|
+
var t = null != arguments[r] ? arguments[r] : {};
|
|
194
|
+
r % 2 ? ownKeys$1(Object(t), !0).forEach(function (r) {
|
|
195
|
+
_defineProperty$1(e, r, t[r]);
|
|
196
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(Object(t)).forEach(function (r) {
|
|
197
|
+
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
|
71
198
|
});
|
|
72
199
|
}
|
|
73
|
-
return
|
|
200
|
+
return e;
|
|
74
201
|
}
|
|
75
202
|
function _regeneratorRuntime() {
|
|
76
203
|
_regeneratorRuntime = function () {
|
|
77
|
-
return
|
|
204
|
+
return e;
|
|
78
205
|
};
|
|
79
|
-
var
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
206
|
+
var t,
|
|
207
|
+
e = {},
|
|
208
|
+
r = Object.prototype,
|
|
209
|
+
n = r.hasOwnProperty,
|
|
210
|
+
o = Object.defineProperty || function (t, e, r) {
|
|
211
|
+
t[e] = r.value;
|
|
84
212
|
},
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
function define(
|
|
90
|
-
return Object.defineProperty(
|
|
91
|
-
value:
|
|
213
|
+
i = "function" == typeof Symbol ? Symbol : {},
|
|
214
|
+
a = i.iterator || "@@iterator",
|
|
215
|
+
c = i.asyncIterator || "@@asyncIterator",
|
|
216
|
+
u = i.toStringTag || "@@toStringTag";
|
|
217
|
+
function define(t, e, r) {
|
|
218
|
+
return Object.defineProperty(t, e, {
|
|
219
|
+
value: r,
|
|
92
220
|
enumerable: !0,
|
|
93
221
|
configurable: !0,
|
|
94
222
|
writable: !0
|
|
95
|
-
}),
|
|
223
|
+
}), t[e];
|
|
96
224
|
}
|
|
97
225
|
try {
|
|
98
226
|
define({}, "");
|
|
99
|
-
} catch (
|
|
100
|
-
define = function (
|
|
101
|
-
return
|
|
227
|
+
} catch (t) {
|
|
228
|
+
define = function (t, e, r) {
|
|
229
|
+
return t[e] = r;
|
|
102
230
|
};
|
|
103
231
|
}
|
|
104
|
-
function wrap(
|
|
105
|
-
var
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
return
|
|
109
|
-
value: makeInvokeMethod(
|
|
110
|
-
}),
|
|
232
|
+
function wrap(t, e, r, n) {
|
|
233
|
+
var i = e && e.prototype instanceof Generator ? e : Generator,
|
|
234
|
+
a = Object.create(i.prototype),
|
|
235
|
+
c = new Context(n || []);
|
|
236
|
+
return o(a, "_invoke", {
|
|
237
|
+
value: makeInvokeMethod(t, r, c)
|
|
238
|
+
}), a;
|
|
111
239
|
}
|
|
112
|
-
function tryCatch(
|
|
240
|
+
function tryCatch(t, e, r) {
|
|
113
241
|
try {
|
|
114
242
|
return {
|
|
115
243
|
type: "normal",
|
|
116
|
-
arg:
|
|
244
|
+
arg: t.call(e, r)
|
|
117
245
|
};
|
|
118
|
-
} catch (
|
|
246
|
+
} catch (t) {
|
|
119
247
|
return {
|
|
120
248
|
type: "throw",
|
|
121
|
-
arg:
|
|
249
|
+
arg: t
|
|
122
250
|
};
|
|
123
251
|
}
|
|
124
252
|
}
|
|
125
|
-
|
|
126
|
-
var
|
|
253
|
+
e.wrap = wrap;
|
|
254
|
+
var h = "suspendedStart",
|
|
255
|
+
l = "suspendedYield",
|
|
256
|
+
f = "executing",
|
|
257
|
+
s = "completed",
|
|
258
|
+
y = {};
|
|
127
259
|
function Generator() {}
|
|
128
260
|
function GeneratorFunction() {}
|
|
129
261
|
function GeneratorFunctionPrototype() {}
|
|
130
|
-
var
|
|
131
|
-
define(
|
|
262
|
+
var p = {};
|
|
263
|
+
define(p, a, function () {
|
|
132
264
|
return this;
|
|
133
265
|
});
|
|
134
|
-
var
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
var
|
|
138
|
-
function defineIteratorMethods(
|
|
139
|
-
["next", "throw", "return"].forEach(function (
|
|
140
|
-
define(
|
|
141
|
-
return this._invoke(
|
|
266
|
+
var d = Object.getPrototypeOf,
|
|
267
|
+
v = d && d(d(values([])));
|
|
268
|
+
v && v !== r && n.call(v, a) && (p = v);
|
|
269
|
+
var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);
|
|
270
|
+
function defineIteratorMethods(t) {
|
|
271
|
+
["next", "throw", "return"].forEach(function (e) {
|
|
272
|
+
define(t, e, function (t) {
|
|
273
|
+
return this._invoke(e, t);
|
|
142
274
|
});
|
|
143
275
|
});
|
|
144
276
|
}
|
|
145
|
-
function AsyncIterator(
|
|
146
|
-
function invoke(
|
|
147
|
-
var
|
|
148
|
-
if ("throw" !==
|
|
149
|
-
var
|
|
150
|
-
|
|
151
|
-
return
|
|
152
|
-
invoke("next",
|
|
153
|
-
}, function (
|
|
154
|
-
invoke("throw",
|
|
155
|
-
}) :
|
|
156
|
-
|
|
157
|
-
}, function (
|
|
158
|
-
return invoke("throw",
|
|
277
|
+
function AsyncIterator(t, e) {
|
|
278
|
+
function invoke(r, o, i, a) {
|
|
279
|
+
var c = tryCatch(t[r], t, o);
|
|
280
|
+
if ("throw" !== c.type) {
|
|
281
|
+
var u = c.arg,
|
|
282
|
+
h = u.value;
|
|
283
|
+
return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) {
|
|
284
|
+
invoke("next", t, i, a);
|
|
285
|
+
}, function (t) {
|
|
286
|
+
invoke("throw", t, i, a);
|
|
287
|
+
}) : e.resolve(h).then(function (t) {
|
|
288
|
+
u.value = t, i(u);
|
|
289
|
+
}, function (t) {
|
|
290
|
+
return invoke("throw", t, i, a);
|
|
159
291
|
});
|
|
160
292
|
}
|
|
161
|
-
|
|
293
|
+
a(c.arg);
|
|
162
294
|
}
|
|
163
|
-
var
|
|
164
|
-
|
|
165
|
-
value: function (
|
|
295
|
+
var r;
|
|
296
|
+
o(this, "_invoke", {
|
|
297
|
+
value: function (t, n) {
|
|
166
298
|
function callInvokeWithMethodAndArg() {
|
|
167
|
-
return new
|
|
168
|
-
invoke(
|
|
299
|
+
return new e(function (e, r) {
|
|
300
|
+
invoke(t, n, e, r);
|
|
169
301
|
});
|
|
170
302
|
}
|
|
171
|
-
return
|
|
303
|
+
return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
|
|
172
304
|
}
|
|
173
305
|
});
|
|
174
306
|
}
|
|
175
|
-
function makeInvokeMethod(
|
|
176
|
-
var
|
|
177
|
-
return function (
|
|
178
|
-
if (
|
|
179
|
-
if (
|
|
180
|
-
if ("throw" ===
|
|
181
|
-
return
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
307
|
+
function makeInvokeMethod(e, r, n) {
|
|
308
|
+
var o = h;
|
|
309
|
+
return function (i, a) {
|
|
310
|
+
if (o === f) throw Error("Generator is already running");
|
|
311
|
+
if (o === s) {
|
|
312
|
+
if ("throw" === i) throw a;
|
|
313
|
+
return {
|
|
314
|
+
value: t,
|
|
315
|
+
done: !0
|
|
316
|
+
};
|
|
317
|
+
}
|
|
318
|
+
for (n.method = i, n.arg = a;;) {
|
|
319
|
+
var c = n.delegate;
|
|
320
|
+
if (c) {
|
|
321
|
+
var u = maybeInvokeDelegate(c, n);
|
|
322
|
+
if (u) {
|
|
323
|
+
if (u === y) continue;
|
|
324
|
+
return u;
|
|
190
325
|
}
|
|
191
326
|
}
|
|
192
|
-
if ("next" ===
|
|
193
|
-
if (
|
|
194
|
-
|
|
195
|
-
} else "return" ===
|
|
196
|
-
|
|
197
|
-
var
|
|
198
|
-
if ("normal" ===
|
|
199
|
-
if (
|
|
327
|
+
if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
|
|
328
|
+
if (o === h) throw o = s, n.arg;
|
|
329
|
+
n.dispatchException(n.arg);
|
|
330
|
+
} else "return" === n.method && n.abrupt("return", n.arg);
|
|
331
|
+
o = f;
|
|
332
|
+
var p = tryCatch(e, r, n);
|
|
333
|
+
if ("normal" === p.type) {
|
|
334
|
+
if (o = n.done ? s : l, p.arg === y) continue;
|
|
200
335
|
return {
|
|
201
|
-
value:
|
|
202
|
-
done:
|
|
336
|
+
value: p.arg,
|
|
337
|
+
done: n.done
|
|
203
338
|
};
|
|
204
339
|
}
|
|
205
|
-
"throw" ===
|
|
340
|
+
"throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
|
|
206
341
|
}
|
|
207
342
|
};
|
|
208
343
|
}
|
|
209
|
-
function maybeInvokeDelegate(
|
|
210
|
-
var
|
|
211
|
-
|
|
212
|
-
if (
|
|
213
|
-
var
|
|
214
|
-
if ("throw" ===
|
|
215
|
-
var
|
|
216
|
-
return
|
|
217
|
-
}
|
|
218
|
-
function pushTryEntry(
|
|
219
|
-
var
|
|
220
|
-
tryLoc:
|
|
344
|
+
function maybeInvokeDelegate(e, r) {
|
|
345
|
+
var n = r.method,
|
|
346
|
+
o = e.iterator[n];
|
|
347
|
+
if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y;
|
|
348
|
+
var i = tryCatch(o, e.iterator, r.arg);
|
|
349
|
+
if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y;
|
|
350
|
+
var a = i.arg;
|
|
351
|
+
return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y);
|
|
352
|
+
}
|
|
353
|
+
function pushTryEntry(t) {
|
|
354
|
+
var e = {
|
|
355
|
+
tryLoc: t[0]
|
|
221
356
|
};
|
|
222
|
-
1 in
|
|
357
|
+
1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
|
|
223
358
|
}
|
|
224
|
-
function resetTryEntry(
|
|
225
|
-
var
|
|
226
|
-
|
|
359
|
+
function resetTryEntry(t) {
|
|
360
|
+
var e = t.completion || {};
|
|
361
|
+
e.type = "normal", delete e.arg, t.completion = e;
|
|
227
362
|
}
|
|
228
|
-
function Context(
|
|
363
|
+
function Context(t) {
|
|
229
364
|
this.tryEntries = [{
|
|
230
365
|
tryLoc: "root"
|
|
231
|
-
}],
|
|
232
|
-
}
|
|
233
|
-
function values(
|
|
234
|
-
if (
|
|
235
|
-
var
|
|
236
|
-
if (
|
|
237
|
-
if ("function" == typeof
|
|
238
|
-
if (!isNaN(
|
|
239
|
-
var
|
|
240
|
-
|
|
241
|
-
for (; ++
|
|
242
|
-
return next.value =
|
|
366
|
+
}], t.forEach(pushTryEntry, this), this.reset(!0);
|
|
367
|
+
}
|
|
368
|
+
function values(e) {
|
|
369
|
+
if (e || "" === e) {
|
|
370
|
+
var r = e[a];
|
|
371
|
+
if (r) return r.call(e);
|
|
372
|
+
if ("function" == typeof e.next) return e;
|
|
373
|
+
if (!isNaN(e.length)) {
|
|
374
|
+
var o = -1,
|
|
375
|
+
i = function next() {
|
|
376
|
+
for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;
|
|
377
|
+
return next.value = t, next.done = !0, next;
|
|
243
378
|
};
|
|
244
|
-
return
|
|
379
|
+
return i.next = i;
|
|
245
380
|
}
|
|
246
381
|
}
|
|
247
|
-
|
|
248
|
-
next: doneResult
|
|
249
|
-
};
|
|
250
|
-
}
|
|
251
|
-
function doneResult() {
|
|
252
|
-
return {
|
|
253
|
-
value: undefined,
|
|
254
|
-
done: !0
|
|
255
|
-
};
|
|
382
|
+
throw new TypeError(typeof e + " is not iterable");
|
|
256
383
|
}
|
|
257
|
-
return GeneratorFunction.prototype = GeneratorFunctionPrototype,
|
|
384
|
+
return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
|
|
258
385
|
value: GeneratorFunctionPrototype,
|
|
259
386
|
configurable: !0
|
|
260
|
-
}),
|
|
387
|
+
}), o(GeneratorFunctionPrototype, "constructor", {
|
|
261
388
|
value: GeneratorFunction,
|
|
262
389
|
configurable: !0
|
|
263
|
-
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype,
|
|
264
|
-
var
|
|
265
|
-
return !!
|
|
266
|
-
},
|
|
267
|
-
return Object.setPrototypeOf ? Object.setPrototypeOf(
|
|
268
|
-
},
|
|
390
|
+
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
|
|
391
|
+
var e = "function" == typeof t && t.constructor;
|
|
392
|
+
return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
|
|
393
|
+
}, e.mark = function (t) {
|
|
394
|
+
return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t;
|
|
395
|
+
}, e.awrap = function (t) {
|
|
269
396
|
return {
|
|
270
|
-
__await:
|
|
397
|
+
__await: t
|
|
271
398
|
};
|
|
272
|
-
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype,
|
|
399
|
+
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
|
|
273
400
|
return this;
|
|
274
|
-
}),
|
|
275
|
-
void 0 ===
|
|
276
|
-
var
|
|
277
|
-
return
|
|
278
|
-
return
|
|
401
|
+
}), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
|
|
402
|
+
void 0 === i && (i = Promise);
|
|
403
|
+
var a = new AsyncIterator(wrap(t, r, n, o), i);
|
|
404
|
+
return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
|
|
405
|
+
return t.done ? t.value : a.next();
|
|
279
406
|
});
|
|
280
|
-
}, defineIteratorMethods(
|
|
407
|
+
}, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
|
|
281
408
|
return this;
|
|
282
|
-
}), define(
|
|
409
|
+
}), define(g, "toString", function () {
|
|
283
410
|
return "[object Generator]";
|
|
284
|
-
}),
|
|
285
|
-
var
|
|
286
|
-
|
|
287
|
-
for (var
|
|
288
|
-
return
|
|
289
|
-
for (;
|
|
290
|
-
var
|
|
291
|
-
if (
|
|
411
|
+
}), e.keys = function (t) {
|
|
412
|
+
var e = Object(t),
|
|
413
|
+
r = [];
|
|
414
|
+
for (var n in e) r.push(n);
|
|
415
|
+
return r.reverse(), function next() {
|
|
416
|
+
for (; r.length;) {
|
|
417
|
+
var t = r.pop();
|
|
418
|
+
if (t in e) return next.value = t, next.done = !1, next;
|
|
292
419
|
}
|
|
293
420
|
return next.done = !0, next;
|
|
294
421
|
};
|
|
295
|
-
},
|
|
422
|
+
}, e.values = values, Context.prototype = {
|
|
296
423
|
constructor: Context,
|
|
297
|
-
reset: function (
|
|
298
|
-
if (this.prev = 0, this.next = 0, this.sent = this._sent =
|
|
424
|
+
reset: function (e) {
|
|
425
|
+
if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);
|
|
299
426
|
},
|
|
300
427
|
stop: function () {
|
|
301
428
|
this.done = !0;
|
|
302
|
-
var
|
|
303
|
-
if ("throw" ===
|
|
429
|
+
var t = this.tryEntries[0].completion;
|
|
430
|
+
if ("throw" === t.type) throw t.arg;
|
|
304
431
|
return this.rval;
|
|
305
432
|
},
|
|
306
|
-
dispatchException: function (
|
|
307
|
-
if (this.done) throw
|
|
308
|
-
var
|
|
309
|
-
function handle(
|
|
310
|
-
return
|
|
311
|
-
}
|
|
312
|
-
for (var
|
|
313
|
-
var
|
|
314
|
-
|
|
315
|
-
if ("root" ===
|
|
316
|
-
if (
|
|
317
|
-
var
|
|
318
|
-
|
|
319
|
-
if (
|
|
320
|
-
if (this.prev <
|
|
321
|
-
if (this.prev <
|
|
322
|
-
} else if (
|
|
323
|
-
if (this.prev <
|
|
433
|
+
dispatchException: function (e) {
|
|
434
|
+
if (this.done) throw e;
|
|
435
|
+
var r = this;
|
|
436
|
+
function handle(n, o) {
|
|
437
|
+
return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o;
|
|
438
|
+
}
|
|
439
|
+
for (var o = this.tryEntries.length - 1; o >= 0; --o) {
|
|
440
|
+
var i = this.tryEntries[o],
|
|
441
|
+
a = i.completion;
|
|
442
|
+
if ("root" === i.tryLoc) return handle("end");
|
|
443
|
+
if (i.tryLoc <= this.prev) {
|
|
444
|
+
var c = n.call(i, "catchLoc"),
|
|
445
|
+
u = n.call(i, "finallyLoc");
|
|
446
|
+
if (c && u) {
|
|
447
|
+
if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
|
|
448
|
+
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
|
449
|
+
} else if (c) {
|
|
450
|
+
if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
|
|
324
451
|
} else {
|
|
325
|
-
if (!
|
|
326
|
-
if (this.prev <
|
|
452
|
+
if (!u) throw Error("try statement without catch or finally");
|
|
453
|
+
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
|
327
454
|
}
|
|
328
455
|
}
|
|
329
456
|
}
|
|
330
457
|
},
|
|
331
|
-
abrupt: function (
|
|
332
|
-
for (var
|
|
333
|
-
var
|
|
334
|
-
if (
|
|
335
|
-
var
|
|
458
|
+
abrupt: function (t, e) {
|
|
459
|
+
for (var r = this.tryEntries.length - 1; r >= 0; --r) {
|
|
460
|
+
var o = this.tryEntries[r];
|
|
461
|
+
if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
|
|
462
|
+
var i = o;
|
|
336
463
|
break;
|
|
337
464
|
}
|
|
338
465
|
}
|
|
339
|
-
|
|
340
|
-
var
|
|
341
|
-
return
|
|
466
|
+
i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
|
|
467
|
+
var a = i ? i.completion : {};
|
|
468
|
+
return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a);
|
|
342
469
|
},
|
|
343
|
-
complete: function (
|
|
344
|
-
if ("throw" ===
|
|
345
|
-
return "break" ===
|
|
470
|
+
complete: function (t, e) {
|
|
471
|
+
if ("throw" === t.type) throw t.arg;
|
|
472
|
+
return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y;
|
|
346
473
|
},
|
|
347
|
-
finish: function (
|
|
348
|
-
for (var
|
|
349
|
-
var
|
|
350
|
-
if (
|
|
474
|
+
finish: function (t) {
|
|
475
|
+
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
|
|
476
|
+
var r = this.tryEntries[e];
|
|
477
|
+
if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
|
|
351
478
|
}
|
|
352
479
|
},
|
|
353
|
-
catch: function (
|
|
354
|
-
for (var
|
|
355
|
-
var
|
|
356
|
-
if (
|
|
357
|
-
var
|
|
358
|
-
if ("throw" ===
|
|
359
|
-
var
|
|
360
|
-
resetTryEntry(
|
|
480
|
+
catch: function (t) {
|
|
481
|
+
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
|
|
482
|
+
var r = this.tryEntries[e];
|
|
483
|
+
if (r.tryLoc === t) {
|
|
484
|
+
var n = r.completion;
|
|
485
|
+
if ("throw" === n.type) {
|
|
486
|
+
var o = n.arg;
|
|
487
|
+
resetTryEntry(r);
|
|
361
488
|
}
|
|
362
|
-
return
|
|
489
|
+
return o;
|
|
363
490
|
}
|
|
364
491
|
}
|
|
365
|
-
throw
|
|
492
|
+
throw Error("illegal catch attempt");
|
|
366
493
|
},
|
|
367
|
-
delegateYield: function (
|
|
494
|
+
delegateYield: function (e, r, n) {
|
|
368
495
|
return this.delegate = {
|
|
369
|
-
iterator: values(
|
|
370
|
-
resultName:
|
|
371
|
-
nextLoc:
|
|
372
|
-
}, "next" === this.method && (this.arg =
|
|
496
|
+
iterator: values(e),
|
|
497
|
+
resultName: r,
|
|
498
|
+
nextLoc: n
|
|
499
|
+
}, "next" === this.method && (this.arg = t), y;
|
|
373
500
|
}
|
|
374
|
-
},
|
|
375
|
-
}
|
|
376
|
-
function _typeof$2(obj) {
|
|
377
|
-
"@babel/helpers - typeof";
|
|
378
|
-
|
|
379
|
-
return _typeof$2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
380
|
-
return typeof obj;
|
|
381
|
-
} : function (obj) {
|
|
382
|
-
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
383
|
-
}, _typeof$2(obj);
|
|
384
|
-
}
|
|
385
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
386
|
-
try {
|
|
387
|
-
var info = gen[key](arg);
|
|
388
|
-
var value = info.value;
|
|
389
|
-
} catch (error) {
|
|
390
|
-
reject(error);
|
|
391
|
-
return;
|
|
392
|
-
}
|
|
393
|
-
if (info.done) {
|
|
394
|
-
resolve(value);
|
|
395
|
-
} else {
|
|
396
|
-
Promise.resolve(value).then(_next, _throw);
|
|
397
|
-
}
|
|
398
|
-
}
|
|
399
|
-
function _asyncToGenerator(fn) {
|
|
400
|
-
return function () {
|
|
401
|
-
var self = this,
|
|
402
|
-
args = arguments;
|
|
403
|
-
return new Promise(function (resolve, reject) {
|
|
404
|
-
var gen = fn.apply(self, args);
|
|
405
|
-
function _next(value) {
|
|
406
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
|
407
|
-
}
|
|
408
|
-
function _throw(err) {
|
|
409
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
|
410
|
-
}
|
|
411
|
-
_next(undefined);
|
|
412
|
-
});
|
|
413
|
-
};
|
|
414
|
-
}
|
|
415
|
-
function _classCallCheck$1(instance, Constructor) {
|
|
416
|
-
if (!(instance instanceof Constructor)) {
|
|
417
|
-
throw new TypeError("Cannot call a class as a function");
|
|
418
|
-
}
|
|
419
|
-
}
|
|
420
|
-
function _defineProperties$1(target, props) {
|
|
421
|
-
for (var i = 0; i < props.length; i++) {
|
|
422
|
-
var descriptor = props[i];
|
|
423
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
424
|
-
descriptor.configurable = true;
|
|
425
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
426
|
-
Object.defineProperty(target, _toPropertyKey$1(descriptor.key), descriptor);
|
|
427
|
-
}
|
|
428
|
-
}
|
|
429
|
-
function _createClass$1(Constructor, protoProps, staticProps) {
|
|
430
|
-
if (protoProps) _defineProperties$1(Constructor.prototype, protoProps);
|
|
431
|
-
if (staticProps) _defineProperties$1(Constructor, staticProps);
|
|
432
|
-
Object.defineProperty(Constructor, "prototype", {
|
|
433
|
-
writable: false
|
|
434
|
-
});
|
|
435
|
-
return Constructor;
|
|
436
|
-
}
|
|
437
|
-
function _defineProperty$1(obj, key, value) {
|
|
438
|
-
key = _toPropertyKey$1(key);
|
|
439
|
-
if (key in obj) {
|
|
440
|
-
Object.defineProperty(obj, key, {
|
|
441
|
-
value: value,
|
|
442
|
-
enumerable: true,
|
|
443
|
-
configurable: true,
|
|
444
|
-
writable: true
|
|
445
|
-
});
|
|
446
|
-
} else {
|
|
447
|
-
obj[key] = value;
|
|
448
|
-
}
|
|
449
|
-
return obj;
|
|
501
|
+
}, e;
|
|
450
502
|
}
|
|
451
|
-
function
|
|
452
|
-
|
|
453
|
-
o.__proto__ = p;
|
|
454
|
-
return o;
|
|
455
|
-
};
|
|
456
|
-
return _setPrototypeOf(o, p);
|
|
503
|
+
function _slicedToArray$1(r, e) {
|
|
504
|
+
return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray$1(r, e) || _nonIterableRest();
|
|
457
505
|
}
|
|
458
|
-
function
|
|
459
|
-
|
|
460
|
-
if (Reflect.construct.sham) return false;
|
|
461
|
-
if (typeof Proxy === "function") return true;
|
|
462
|
-
try {
|
|
463
|
-
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
464
|
-
return true;
|
|
465
|
-
} catch (e) {
|
|
466
|
-
return false;
|
|
467
|
-
}
|
|
506
|
+
function _toConsumableArray(r) {
|
|
507
|
+
return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray$1(r) || _nonIterableSpread();
|
|
468
508
|
}
|
|
469
|
-
function
|
|
470
|
-
if (
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
var Constructor = Function.bind.apply(Parent, a);
|
|
477
|
-
var instance = new Constructor();
|
|
478
|
-
if (Class) _setPrototypeOf(instance, Class.prototype);
|
|
479
|
-
return instance;
|
|
480
|
-
};
|
|
509
|
+
function _toPrimitive(t, r) {
|
|
510
|
+
if ("object" != typeof t || !t) return t;
|
|
511
|
+
var e = t[Symbol.toPrimitive];
|
|
512
|
+
if (void 0 !== e) {
|
|
513
|
+
var i = e.call(t, r || "default");
|
|
514
|
+
if ("object" != typeof i) return i;
|
|
515
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
481
516
|
}
|
|
482
|
-
return
|
|
517
|
+
return ("string" === r ? String : Number)(t);
|
|
483
518
|
}
|
|
484
|
-
function
|
|
485
|
-
|
|
519
|
+
function _toPropertyKey$1(t) {
|
|
520
|
+
var i = _toPrimitive(t, "string");
|
|
521
|
+
return "symbol" == typeof i ? i : i + "";
|
|
486
522
|
}
|
|
487
|
-
function
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
}
|
|
496
|
-
function _iterableToArray(iter) {
|
|
497
|
-
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
498
|
-
}
|
|
499
|
-
function _unsupportedIterableToArray$1(o, minLen) {
|
|
500
|
-
if (!o) return;
|
|
501
|
-
if (typeof o === "string") return _arrayLikeToArray$1(o, minLen);
|
|
502
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
503
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
504
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
505
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$1(o, minLen);
|
|
506
|
-
}
|
|
507
|
-
function _arrayLikeToArray$1(arr, len) {
|
|
508
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
509
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
510
|
-
return arr2;
|
|
511
|
-
}
|
|
512
|
-
function _nonIterableSpread() {
|
|
513
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
514
|
-
}
|
|
515
|
-
function _nonIterableRest() {
|
|
516
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
517
|
-
}
|
|
518
|
-
function _createForOfIteratorHelper(o, allowArrayLike) {
|
|
519
|
-
var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
|
|
520
|
-
if (!it) {
|
|
521
|
-
if (Array.isArray(o) || (it = _unsupportedIterableToArray$1(o)) || allowArrayLike && o && typeof o.length === "number") {
|
|
522
|
-
if (it) o = it;
|
|
523
|
-
var i = 0;
|
|
524
|
-
var F = function () {};
|
|
525
|
-
return {
|
|
526
|
-
s: F,
|
|
527
|
-
n: function () {
|
|
528
|
-
if (i >= o.length) return {
|
|
529
|
-
done: true
|
|
530
|
-
};
|
|
531
|
-
return {
|
|
532
|
-
done: false,
|
|
533
|
-
value: o[i++]
|
|
534
|
-
};
|
|
535
|
-
},
|
|
536
|
-
e: function (e) {
|
|
537
|
-
throw e;
|
|
538
|
-
},
|
|
539
|
-
f: F
|
|
540
|
-
};
|
|
541
|
-
}
|
|
542
|
-
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
543
|
-
}
|
|
544
|
-
var normalCompletion = true,
|
|
545
|
-
didErr = false,
|
|
546
|
-
err;
|
|
547
|
-
return {
|
|
548
|
-
s: function () {
|
|
549
|
-
it = it.call(o);
|
|
550
|
-
},
|
|
551
|
-
n: function () {
|
|
552
|
-
var step = it.next();
|
|
553
|
-
normalCompletion = step.done;
|
|
554
|
-
return step;
|
|
555
|
-
},
|
|
556
|
-
e: function (e) {
|
|
557
|
-
didErr = true;
|
|
558
|
-
err = e;
|
|
559
|
-
},
|
|
560
|
-
f: function () {
|
|
561
|
-
try {
|
|
562
|
-
if (!normalCompletion && it.return != null) it.return();
|
|
563
|
-
} finally {
|
|
564
|
-
if (didErr) throw err;
|
|
565
|
-
}
|
|
566
|
-
}
|
|
567
|
-
};
|
|
523
|
+
function _typeof$2(o) {
|
|
524
|
+
"@babel/helpers - typeof";
|
|
525
|
+
|
|
526
|
+
return _typeof$2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
527
|
+
return typeof o;
|
|
528
|
+
} : function (o) {
|
|
529
|
+
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
530
|
+
}, _typeof$2(o);
|
|
568
531
|
}
|
|
569
|
-
function
|
|
570
|
-
if (
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
if (typeof res !== "object") return res;
|
|
575
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
532
|
+
function _unsupportedIterableToArray$1(r, a) {
|
|
533
|
+
if (r) {
|
|
534
|
+
if ("string" == typeof r) return _arrayLikeToArray$1(r, a);
|
|
535
|
+
var t = {}.toString.call(r).slice(8, -1);
|
|
536
|
+
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$1(r, a) : void 0;
|
|
576
537
|
}
|
|
577
|
-
return (hint === "string" ? String : Number)(input);
|
|
578
|
-
}
|
|
579
|
-
function _toPropertyKey$1(arg) {
|
|
580
|
-
var key = _toPrimitive(arg, "string");
|
|
581
|
-
return typeof key === "symbol" ? key : String(key);
|
|
582
538
|
}
|
|
583
539
|
|
|
584
540
|
function _typeof$1(obj) {
|
|
@@ -725,10 +681,9 @@
|
|
|
725
681
|
pr;
|
|
726
682
|
Object.defineProperty(_this, prop, {
|
|
727
683
|
get: function get() {
|
|
728
|
-
return
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
);
|
|
684
|
+
return /* prop in _evCfg && */_evCfg[prop] !== undefined ? _evCfg[prop] : prop in _ev ? _ev[prop] :
|
|
685
|
+
// Defaults
|
|
686
|
+
prop === 'eventPhase' ? 0 : prop === 'defaultPrevented' ? false : null;
|
|
732
687
|
}
|
|
733
688
|
});
|
|
734
689
|
});
|
|
@@ -1223,7 +1178,6 @@
|
|
|
1223
1178
|
}
|
|
1224
1179
|
});
|
|
1225
1180
|
}
|
|
1226
|
-
|
|
1227
1181
|
var _eventCopy = eventCopy,
|
|
1228
1182
|
type = _eventCopy.type;
|
|
1229
1183
|
|
|
@@ -1977,12 +1931,11 @@
|
|
|
1977
1931
|
*/
|
|
1978
1932
|
function defineOuterInterface(obj, props) {
|
|
1979
1933
|
props.forEach(function (prop) {
|
|
1980
|
-
var
|
|
1981
|
-
var o = (_o = {}, _defineAccessor("get", _o, prop, function () {
|
|
1934
|
+
var o = _defineAccessor("set", _defineAccessor("get", {}, prop, function () {
|
|
1982
1935
|
throw new TypeError('Illegal invocation');
|
|
1983
|
-
}),
|
|
1936
|
+
}), prop, function (val) {
|
|
1984
1937
|
throw new TypeError('Illegal invocation');
|
|
1985
|
-
})
|
|
1938
|
+
});
|
|
1986
1939
|
var desc = /** @type {PropertyDescriptor} */
|
|
1987
1940
|
Object.getOwnPropertyDescriptor(o, prop);
|
|
1988
1941
|
Object.defineProperty(obj, prop, desc);
|
|
@@ -2017,12 +1970,11 @@
|
|
|
2017
1970
|
function defineListenerProperties(obj, listeners) {
|
|
2018
1971
|
listeners = typeof listeners === 'string' ? [listeners] : listeners;
|
|
2019
1972
|
listeners.forEach(function (listener) {
|
|
2020
|
-
var
|
|
2021
|
-
var o = (_o3 = {}, _defineAccessor("get", _o3, listener, function () {
|
|
1973
|
+
var o = _defineAccessor("set", _defineAccessor("get", {}, listener, function () {
|
|
2022
1974
|
return obj['__' + listener];
|
|
2023
|
-
}),
|
|
1975
|
+
}), listener, function (val) {
|
|
2024
1976
|
obj['__' + listener] = val;
|
|
2025
|
-
})
|
|
1977
|
+
});
|
|
2026
1978
|
var desc = /** @type {PropertyDescriptor} */
|
|
2027
1979
|
Object.getOwnPropertyDescriptor(o, listener);
|
|
2028
1980
|
// desc.enumerable = true; // Default
|
|
@@ -2405,7 +2357,7 @@
|
|
|
2405
2357
|
function DOMException(message, name) {
|
|
2406
2358
|
// const err = Error.prototype.constructor.call(this, message); // Any use to this? Won't set this.message
|
|
2407
2359
|
this[Symbol.toStringTag] = 'DOMException';
|
|
2408
|
-
this._code = name in codes ? codes[/** @type {Code} */name] : legacyCodes[/** @type {LegacyCode} */name] || 0;
|
|
2360
|
+
this._code = name in codes ? codes[( /** @type {Code} */name)] : legacyCodes[( /** @type {LegacyCode} */name)] || 0;
|
|
2409
2361
|
this._name = name || 'Error';
|
|
2410
2362
|
// We avoid `String()` in this next line as it converts Symbols
|
|
2411
2363
|
this._message = message === undefined ? '' : '' + message; // eslint-disable-line no-implicit-coercion
|
|
@@ -2542,10 +2494,12 @@
|
|
|
2542
2494
|
*/
|
|
2543
2495
|
function logError(name, message, error) {
|
|
2544
2496
|
if (CFG.DEBUG) {
|
|
2545
|
-
var msg = error && _typeof$2(error) === 'object' && error.message ? error.message : /** @type {string} */error;
|
|
2497
|
+
var msg = error && _typeof$2(error) === 'object' && error.message ? error.message : ( /** @type {string} */error);
|
|
2546
2498
|
var method = typeof console.error === 'function' ? 'error' : 'log';
|
|
2547
2499
|
console[method](name + ': ' + message + '. ' + (msg || ''));
|
|
2548
|
-
|
|
2500
|
+
if (console.trace) {
|
|
2501
|
+
console.trace();
|
|
2502
|
+
}
|
|
2549
2503
|
}
|
|
2550
2504
|
}
|
|
2551
2505
|
|
|
@@ -2653,7 +2607,7 @@
|
|
|
2653
2607
|
}
|
|
2654
2608
|
} catch (e) {}
|
|
2655
2609
|
var createDOMException = useNativeDOMException
|
|
2656
|
-
// eslint-disable-next-line operator-linebreak -- Need JSDoc
|
|
2610
|
+
// eslint-disable-next-line @stylistic/operator-linebreak -- Need JSDoc
|
|
2657
2611
|
?
|
|
2658
2612
|
/**
|
|
2659
2613
|
* @param {string} name
|
|
@@ -2665,7 +2619,7 @@
|
|
|
2665
2619
|
logError(name, message, error);
|
|
2666
2620
|
return createNativeDOMException(name, message);
|
|
2667
2621
|
}
|
|
2668
|
-
// eslint-disable-next-line operator-linebreak -- Need JSDoc
|
|
2622
|
+
// eslint-disable-next-line @stylistic/operator-linebreak -- Need JSDoc
|
|
2669
2623
|
:
|
|
2670
2624
|
/**
|
|
2671
2625
|
* @param {string} name
|
|
@@ -2725,7 +2679,6 @@
|
|
|
2725
2679
|
this.__setOptions({
|
|
2726
2680
|
legacyOutputDidListenersThrowFlag: true // Event hook for IndexedB
|
|
2727
2681
|
});
|
|
2728
|
-
|
|
2729
2682
|
doneFlagGetters.forEach(function (prop) {
|
|
2730
2683
|
Object.defineProperty(_this, '__' + prop, {
|
|
2731
2684
|
enumerable: false,
|
|
@@ -3254,17 +3207,15 @@
|
|
|
3254
3207
|
var types = {
|
|
3255
3208
|
invalid: {
|
|
3256
3209
|
/**
|
|
3257
|
-
* @param {AnyValue} _key
|
|
3258
3210
|
* @returns {string}
|
|
3259
3211
|
*/
|
|
3260
|
-
encode: function encode(
|
|
3212
|
+
encode: function encode() {
|
|
3261
3213
|
return keyTypeToEncodedChar.invalid + '-';
|
|
3262
3214
|
},
|
|
3263
3215
|
/**
|
|
3264
|
-
* @param {string} _key
|
|
3265
3216
|
* @returns {undefined}
|
|
3266
3217
|
*/
|
|
3267
|
-
decode: function decode(
|
|
3218
|
+
decode: function decode() {
|
|
3268
3219
|
return undefined;
|
|
3269
3220
|
}
|
|
3270
3221
|
},
|
|
@@ -3602,11 +3553,17 @@
|
|
|
3602
3553
|
* @returns {KeyType|"invalid"}
|
|
3603
3554
|
*/
|
|
3604
3555
|
function getKeyType(key) {
|
|
3605
|
-
if (Array.isArray(key))
|
|
3606
|
-
|
|
3607
|
-
|
|
3556
|
+
if (Array.isArray(key)) {
|
|
3557
|
+
return 'array';
|
|
3558
|
+
}
|
|
3559
|
+
if (isDate(key)) {
|
|
3560
|
+
return 'date';
|
|
3561
|
+
}
|
|
3562
|
+
if (isBinary(key)) {
|
|
3563
|
+
return 'binary';
|
|
3564
|
+
}
|
|
3608
3565
|
var keyType = _typeof$2(key);
|
|
3609
|
-
return ['string', 'number'].includes(keyType) ? /** @type {"string"|"number"} */keyType : 'invalid';
|
|
3566
|
+
return ['string', 'number'].includes(keyType) ? ( /** @type {"string"|"number"} */keyType) : 'invalid';
|
|
3610
3567
|
}
|
|
3611
3568
|
|
|
3612
3569
|
/**
|
|
@@ -3703,13 +3660,11 @@
|
|
|
3703
3660
|
value: 0
|
|
3704
3661
|
};
|
|
3705
3662
|
}
|
|
3706
|
-
return
|
|
3707
|
-
);
|
|
3663
|
+
return /** @type {{type: KeyType; value: Value}} */ret;
|
|
3708
3664
|
}
|
|
3709
3665
|
case 'string':
|
|
3710
3666
|
{
|
|
3711
|
-
return
|
|
3712
|
-
);
|
|
3667
|
+
return /** @type {{type: KeyType; value: Value}} */ret;
|
|
3713
3668
|
}
|
|
3714
3669
|
case 'binary':
|
|
3715
3670
|
{
|
|
@@ -3732,48 +3687,49 @@
|
|
|
3732
3687
|
/** @type {(KeyValueObject|Value)[]} */
|
|
3733
3688
|
var keys = [];
|
|
3734
3689
|
var _loop = function _loop() {
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
return {
|
|
3738
|
-
v: {
|
|
3739
|
-
type: type,
|
|
3740
|
-
invalid: true,
|
|
3741
|
-
message: 'Does not have own index property'
|
|
3742
|
-
}
|
|
3743
|
-
};
|
|
3744
|
-
}
|
|
3745
|
-
try {
|
|
3746
|
-
var entry = arr[i];
|
|
3747
|
-
var key = convertValueToKeyValueDecoded(entry, seen, false, fullKeys); // Though steps do not list rethrowing, the next is returnifabrupt when not multiEntry
|
|
3748
|
-
if (key.invalid) {
|
|
3749
|
-
if (multiEntry) {
|
|
3750
|
-
return "continue";
|
|
3751
|
-
}
|
|
3690
|
+
// We cannot iterate here with array extras as we must ensure sparse arrays are invalidated
|
|
3691
|
+
if (!multiEntry && !Object.hasOwn(arr, i)) {
|
|
3752
3692
|
return {
|
|
3753
3693
|
v: {
|
|
3754
3694
|
type: type,
|
|
3755
3695
|
invalid: true,
|
|
3756
|
-
message: '
|
|
3696
|
+
message: 'Does not have own index property'
|
|
3757
3697
|
}
|
|
3758
3698
|
};
|
|
3759
3699
|
}
|
|
3760
|
-
|
|
3761
|
-
|
|
3762
|
-
|
|
3763
|
-
|
|
3764
|
-
|
|
3765
|
-
|
|
3766
|
-
|
|
3767
|
-
|
|
3768
|
-
|
|
3769
|
-
|
|
3700
|
+
try {
|
|
3701
|
+
var entry = arr[i];
|
|
3702
|
+
var key = convertValueToKeyValueDecoded(entry, seen, false, fullKeys); // Though steps do not list rethrowing, the next is returnifabrupt when not multiEntry
|
|
3703
|
+
if (key.invalid) {
|
|
3704
|
+
if (multiEntry) {
|
|
3705
|
+
return 0; // continue
|
|
3706
|
+
}
|
|
3707
|
+
return {
|
|
3708
|
+
v: {
|
|
3709
|
+
type: type,
|
|
3710
|
+
invalid: true,
|
|
3711
|
+
message: 'Bad array entry value-to-key conversion'
|
|
3712
|
+
}
|
|
3713
|
+
};
|
|
3714
|
+
}
|
|
3715
|
+
if (!multiEntry || !fullKeys && keys.every(function (k) {
|
|
3716
|
+
return cmp(k, key.value) !== 0;
|
|
3717
|
+
}) || fullKeys && keys.every(function (k) {
|
|
3718
|
+
return cmp(k, key) !== 0;
|
|
3719
|
+
})) {
|
|
3720
|
+
keys.push(fullKeys ? key : key.value);
|
|
3721
|
+
}
|
|
3722
|
+
} catch (err) {
|
|
3723
|
+
if (!multiEntry) {
|
|
3724
|
+
throw err;
|
|
3725
|
+
}
|
|
3770
3726
|
}
|
|
3771
|
-
}
|
|
3772
|
-
|
|
3727
|
+
},
|
|
3728
|
+
_ret;
|
|
3773
3729
|
for (var i = 0; i < len; i++) {
|
|
3774
|
-
|
|
3775
|
-
if (_ret ===
|
|
3776
|
-
if (
|
|
3730
|
+
_ret = _loop();
|
|
3731
|
+
if (_ret === 0) continue;
|
|
3732
|
+
if (_ret) return _ret.v;
|
|
3777
3733
|
}
|
|
3778
3734
|
return {
|
|
3779
3735
|
type: type,
|
|
@@ -3935,7 +3891,7 @@
|
|
|
3935
3891
|
};
|
|
3936
3892
|
}
|
|
3937
3893
|
var identifiers = keyPath.split('.');
|
|
3938
|
-
return identifiers.some(function (idntfr
|
|
3894
|
+
return identifiers.some(function (idntfr) {
|
|
3939
3895
|
if (idntfr === 'length' && (typeof value === 'string' || Array.isArray(value))) {
|
|
3940
3896
|
value = value.length;
|
|
3941
3897
|
} else if (isBlob(value)) {
|
|
@@ -3986,7 +3942,7 @@
|
|
|
3986
3942
|
}
|
|
3987
3943
|
value = value[identifier];
|
|
3988
3944
|
});
|
|
3989
|
-
value[/** @type {string} */last] = key; // key is already a `keyValue` in our processing so no need to convert
|
|
3945
|
+
value[( /** @type {string} */last)] = key; // key is already a `keyValue` in our processing so no need to convert
|
|
3990
3946
|
}
|
|
3991
3947
|
|
|
3992
3948
|
/**
|
|
@@ -4158,6 +4114,7 @@
|
|
|
4158
4114
|
return null;
|
|
4159
4115
|
}
|
|
4160
4116
|
// array, date, number, string, binary (should already have detected "invalid")
|
|
4117
|
+
// @ts-expect-error Argument may be ignored
|
|
4161
4118
|
return types[getKeyType(key)].encode(key, inArray);
|
|
4162
4119
|
}
|
|
4163
4120
|
|
|
@@ -4219,7 +4176,7 @@
|
|
|
4219
4176
|
}
|
|
4220
4177
|
}, function (tx, error) {
|
|
4221
4178
|
sqlFailCb(createDOMException('DataError', 'Could not get the auto increment value for key', error));
|
|
4222
|
-
return
|
|
4179
|
+
return false;
|
|
4223
4180
|
});
|
|
4224
4181
|
}
|
|
4225
4182
|
|
|
@@ -4235,12 +4192,14 @@
|
|
|
4235
4192
|
function assignCurrentNumber(tx, store, num, successCb, failCb) {
|
|
4236
4193
|
var sql = 'UPDATE __sys__ SET "currNum" = ? WHERE "name" = ?';
|
|
4237
4194
|
var sqlValues = [num, escapeSQLiteStatement(store.__currentName)];
|
|
4238
|
-
CFG.DEBUG
|
|
4239
|
-
|
|
4195
|
+
if (CFG.DEBUG) {
|
|
4196
|
+
console.log(sql, sqlValues);
|
|
4197
|
+
}
|
|
4198
|
+
tx.executeSql(sql, sqlValues, function () {
|
|
4240
4199
|
successCb(num);
|
|
4241
4200
|
}, function (tx, err) {
|
|
4242
4201
|
failCb(createDOMException('UnknownError', 'Could not set the auto increment value for key', err));
|
|
4243
|
-
return
|
|
4202
|
+
return false;
|
|
4244
4203
|
});
|
|
4245
4204
|
}
|
|
4246
4205
|
|
|
@@ -4407,7 +4366,7 @@
|
|
|
4407
4366
|
convertValueToKeyRethrowingAndIfInvalid(upper);
|
|
4408
4367
|
}
|
|
4409
4368
|
if (lower !== undefined && upper !== undefined && lower !== upper) {
|
|
4410
|
-
if ( /** @type {string} */_encode(lower) > /** @type {string} */_encode(upper)) {
|
|
4369
|
+
if ( /** @type {string} */_encode(lower) > ( /** @type {string} */_encode(upper))) {
|
|
4411
4370
|
throw createDOMException('DataError', '`lower` must not be greater than `upper` argument in `bound()` call.');
|
|
4412
4371
|
}
|
|
4413
4372
|
}
|
|
@@ -4454,7 +4413,7 @@
|
|
|
4454
4413
|
* @param {import('./Key.js').Value} value
|
|
4455
4414
|
* @returns {globalThis.IDBKeyRange}
|
|
4456
4415
|
*/
|
|
4457
|
-
IDBKeyRange.lowerBound = function (value
|
|
4416
|
+
IDBKeyRange.lowerBound = function (value /* , open */) {
|
|
4458
4417
|
if (!arguments.length) {
|
|
4459
4418
|
throw new TypeError('IDBKeyRange.lowerBound requires a value argument');
|
|
4460
4419
|
}
|
|
@@ -4466,7 +4425,7 @@
|
|
|
4466
4425
|
* @param {import('./Key.js').Value} value
|
|
4467
4426
|
* @returns {globalThis.IDBKeyRange}
|
|
4468
4427
|
*/
|
|
4469
|
-
IDBKeyRange.upperBound = function (value
|
|
4428
|
+
IDBKeyRange.upperBound = function (value /* , open */) {
|
|
4470
4429
|
if (!arguments.length) {
|
|
4471
4430
|
throw new TypeError('IDBKeyRange.upperBound requires a value argument');
|
|
4472
4431
|
}
|
|
@@ -4532,7 +4491,9 @@
|
|
|
4532
4491
|
*/
|
|
4533
4492
|
function setSQLForKeyRange(range, quotedKeyColumnName, sql, sqlValues, addAnd, checkCached) {
|
|
4534
4493
|
if (range && (range.lower !== undefined || range.upper !== undefined)) {
|
|
4535
|
-
if (addAnd)
|
|
4494
|
+
if (addAnd) {
|
|
4495
|
+
sql.push('AND');
|
|
4496
|
+
}
|
|
4536
4497
|
var encodedLowerKey, encodedUpperKey;
|
|
4537
4498
|
var hasLower = range.lower !== undefined;
|
|
4538
4499
|
var hasUpper = range.upper !== undefined;
|
|
@@ -4550,7 +4511,9 @@
|
|
|
4550
4511
|
}
|
|
4551
4512
|
sql.push(quotedKeyColumnName, range.lowerOpen ? '>' : '>=', '?');
|
|
4552
4513
|
}
|
|
4553
|
-
hasLower && hasUpper
|
|
4514
|
+
if (hasLower && hasUpper) {
|
|
4515
|
+
sql.push('AND');
|
|
4516
|
+
}
|
|
4554
4517
|
if (hasUpper) {
|
|
4555
4518
|
sql.push(quotedKeyColumnName, range.upperOpen ? '<' : '<=', '?');
|
|
4556
4519
|
sqlValues.push(escapeSQLiteStatement( /** @type {string} */encodedUpperKey));
|
|
@@ -4578,12 +4541,10 @@
|
|
|
4578
4541
|
}
|
|
4579
4542
|
return undefined; // Represents unbounded
|
|
4580
4543
|
}
|
|
4581
|
-
|
|
4582
4544
|
convertValueToKeyRethrowingAndIfInvalid(value);
|
|
4583
4545
|
return IDBKeyRange.only(value);
|
|
4584
4546
|
}
|
|
4585
4547
|
|
|
4586
|
-
var _DOMStringList$protot;
|
|
4587
4548
|
/**
|
|
4588
4549
|
* @typedef {number} Integer
|
|
4589
4550
|
*/
|
|
@@ -4636,7 +4597,7 @@
|
|
|
4636
4597
|
};
|
|
4637
4598
|
|
|
4638
4599
|
// @ts-expect-error It's ok
|
|
4639
|
-
DOMStringList.prototype = (
|
|
4600
|
+
DOMStringList.prototype = _defineProperty$1(_defineProperty$1({
|
|
4640
4601
|
constructor: DOMStringList,
|
|
4641
4602
|
// Interface.
|
|
4642
4603
|
/**
|
|
@@ -4747,7 +4708,7 @@
|
|
|
4747
4708
|
}
|
|
4748
4709
|
this.sortList();
|
|
4749
4710
|
}
|
|
4750
|
-
},
|
|
4711
|
+
}, Symbol.toStringTag, 'DOMStringListPrototype'), Symbol.iterator, /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
4751
4712
|
var i;
|
|
4752
4713
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
4753
4714
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -4768,7 +4729,7 @@
|
|
|
4768
4729
|
return _context.stop();
|
|
4769
4730
|
}
|
|
4770
4731
|
}, _callee, this);
|
|
4771
|
-
}))
|
|
4732
|
+
}));
|
|
4772
4733
|
|
|
4773
4734
|
/**
|
|
4774
4735
|
* @typedef {any} AnyValue
|
|
@@ -4807,8 +4768,7 @@
|
|
|
4807
4768
|
this._length = 0;
|
|
4808
4769
|
};
|
|
4809
4770
|
DOMStringList.prototype = DOMStringListAlias.prototype;
|
|
4810
|
-
return
|
|
4811
|
-
);
|
|
4771
|
+
return /** @type {DOMStringListFull} */new DOMStringList();
|
|
4812
4772
|
}
|
|
4813
4773
|
});
|
|
4814
4774
|
if (cleanInterface) {
|
|
@@ -4955,7 +4915,6 @@
|
|
|
4955
4915
|
me.__setOptions({
|
|
4956
4916
|
legacyOutputDidListenersThrowFlag: true // Event hook for IndexedB
|
|
4957
4917
|
});
|
|
4958
|
-
|
|
4959
4918
|
readonlyProperties$3.forEach(function (readonlyProp) {
|
|
4960
4919
|
Object.defineProperty(_this, readonlyProp, {
|
|
4961
4920
|
configurable: true
|
|
@@ -4977,6 +4936,7 @@
|
|
|
4977
4936
|
|
|
4978
4937
|
// @ts-expect-error It's ok
|
|
4979
4938
|
IDBTransaction.prototype = EventTargetFactory.createInstance({
|
|
4939
|
+
// eslint-disable-next-line n/no-sync -- API
|
|
4980
4940
|
defaultSync: true,
|
|
4981
4941
|
// Ensure EventTarget preserves our properties
|
|
4982
4942
|
extraProperties: ['complete']
|
|
@@ -4998,7 +4958,9 @@
|
|
|
4998
4958
|
IDBTransaction.prototype.__executeRequests = function () {
|
|
4999
4959
|
var me = this;
|
|
5000
4960
|
if (me.__running) {
|
|
5001
|
-
CFG.DEBUG
|
|
4961
|
+
if (CFG.DEBUG) {
|
|
4962
|
+
console.log('Looks like the request set is already running', me.mode);
|
|
4963
|
+
}
|
|
5002
4964
|
return;
|
|
5003
4965
|
}
|
|
5004
4966
|
me.__running = true;
|
|
@@ -5027,7 +4989,6 @@
|
|
|
5027
4989
|
if (req) {
|
|
5028
4990
|
q.req = req; // Need to do this in case of cursors
|
|
5029
4991
|
}
|
|
5030
|
-
|
|
5031
4992
|
if (!q.req) {
|
|
5032
4993
|
// TS guard
|
|
5033
4994
|
return;
|
|
@@ -5191,7 +5152,9 @@
|
|
|
5191
5152
|
*/
|
|
5192
5153
|
function complete() {
|
|
5193
5154
|
me.__completed = true;
|
|
5194
|
-
CFG.DEBUG
|
|
5155
|
+
if (CFG.DEBUG) {
|
|
5156
|
+
console.log('Transaction completed');
|
|
5157
|
+
}
|
|
5195
5158
|
var evt = createEvent('complete');
|
|
5196
5159
|
try {
|
|
5197
5160
|
me.__internal = true;
|
|
@@ -5416,11 +5379,15 @@
|
|
|
5416
5379
|
*/
|
|
5417
5380
|
function abort(tx, errOrResult) {
|
|
5418
5381
|
if (!tx) {
|
|
5419
|
-
CFG.DEBUG
|
|
5382
|
+
if (CFG.DEBUG) {
|
|
5383
|
+
console.log('Rollback not possible due to missing transaction', me);
|
|
5384
|
+
}
|
|
5420
5385
|
} else if (errOrResult && 'code' in errOrResult && typeof errOrResult.code === 'number') {
|
|
5421
|
-
CFG.DEBUG
|
|
5422
|
-
|
|
5423
|
-
|
|
5386
|
+
if (CFG.DEBUG) {
|
|
5387
|
+
console.log('Rollback erred; feature is probably not supported as per WebSQL', me);
|
|
5388
|
+
}
|
|
5389
|
+
} else if (CFG.DEBUG) {
|
|
5390
|
+
console.log('Rollback succeeded', me);
|
|
5424
5391
|
}
|
|
5425
5392
|
me.dispatchEvent(createEvent('__preabort'));
|
|
5426
5393
|
me.__requests.filter(function (q, i, arr) {
|
|
@@ -5512,7 +5479,9 @@
|
|
|
5512
5479
|
if (!(me instanceof IDBTransaction)) {
|
|
5513
5480
|
throw new TypeError('Illegal invocation');
|
|
5514
5481
|
}
|
|
5515
|
-
CFG.DEBUG
|
|
5482
|
+
if (CFG.DEBUG) {
|
|
5483
|
+
console.log('The transaction was aborted', me);
|
|
5484
|
+
}
|
|
5516
5485
|
IDBTransaction.__assertNotFinished(me);
|
|
5517
5486
|
me.__abortTransaction(null);
|
|
5518
5487
|
};
|
|
@@ -5632,14 +5601,13 @@
|
|
|
5632
5601
|
function _classCallCheck(e, t) {
|
|
5633
5602
|
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
|
|
5634
5603
|
}
|
|
5635
|
-
function _defineProperties(e, t) {
|
|
5636
|
-
for (var r = 0; r < t.length; r++) {
|
|
5637
|
-
var n = t[r];
|
|
5638
|
-
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, _toPropertyKey(n.key), n);
|
|
5639
|
-
}
|
|
5640
|
-
}
|
|
5641
5604
|
function _createClass(e, t, r) {
|
|
5642
|
-
return t && _defineProperties(e
|
|
5605
|
+
return t && function _defineProperties(e, t) {
|
|
5606
|
+
for (var r = 0; r < t.length; r++) {
|
|
5607
|
+
var n = t[r];
|
|
5608
|
+
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, _toPropertyKey(n.key), n);
|
|
5609
|
+
}
|
|
5610
|
+
}(e.prototype, t), Object.defineProperty(e, "prototype", {
|
|
5643
5611
|
writable: !1
|
|
5644
5612
|
}), e;
|
|
5645
5613
|
}
|
|
@@ -5658,24 +5626,24 @@
|
|
|
5658
5626
|
var r = null == e ? null : "undefined" != typeof Symbol && e[Symbol.iterator] || e["@@iterator"];
|
|
5659
5627
|
if (null != r) {
|
|
5660
5628
|
var n,
|
|
5661
|
-
o,
|
|
5662
5629
|
a,
|
|
5630
|
+
o,
|
|
5663
5631
|
i,
|
|
5664
5632
|
c = [],
|
|
5665
5633
|
s = !0,
|
|
5666
5634
|
u = !1;
|
|
5667
5635
|
try {
|
|
5668
|
-
if (
|
|
5636
|
+
if (o = (r = r.call(e)).next, 0 === t) {
|
|
5669
5637
|
if (Object(r) !== r) return;
|
|
5670
5638
|
s = !1;
|
|
5671
|
-
} else for (; !(s = (n =
|
|
5639
|
+
} else for (; !(s = (n = o.call(r)).done) && (c.push(n.value), c.length !== t); s = !0);
|
|
5672
5640
|
} catch (e) {
|
|
5673
|
-
u = !0,
|
|
5641
|
+
u = !0, a = e;
|
|
5674
5642
|
} finally {
|
|
5675
5643
|
try {
|
|
5676
5644
|
if (!s && null != r["return"] && (i = r["return"](), Object(i) !== i)) return;
|
|
5677
5645
|
} finally {
|
|
5678
|
-
if (u) throw
|
|
5646
|
+
if (u) throw a;
|
|
5679
5647
|
}
|
|
5680
5648
|
}
|
|
5681
5649
|
return c;
|
|
@@ -5701,11 +5669,11 @@
|
|
|
5701
5669
|
if ("object" != _typeof$2(e) || null === e) return e;
|
|
5702
5670
|
var r = e[Symbol.toPrimitive];
|
|
5703
5671
|
if (void 0 !== r) {
|
|
5704
|
-
var n = r.call(e, t
|
|
5672
|
+
var n = r.call(e, t );
|
|
5705
5673
|
if ("object" != _typeof$2(n)) return n;
|
|
5706
5674
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
5707
5675
|
}
|
|
5708
|
-
return (
|
|
5676
|
+
return (String )(e);
|
|
5709
5677
|
}(e, "string");
|
|
5710
5678
|
return "symbol" == _typeof$2(t) ? t : String(t);
|
|
5711
5679
|
}
|
|
@@ -5718,12 +5686,12 @@
|
|
|
5718
5686
|
}
|
|
5719
5687
|
}), e.prototype.then = function (t, r) {
|
|
5720
5688
|
var n = this;
|
|
5721
|
-
return new e(function (e,
|
|
5689
|
+
return new e(function (e, a) {
|
|
5722
5690
|
n.p.then(function (r) {
|
|
5723
5691
|
e(t ? t(r) : r);
|
|
5724
5692
|
})["catch"](function (e) {
|
|
5725
5693
|
return r ? r(e) : Promise.reject(e);
|
|
5726
|
-
}).then(e,
|
|
5694
|
+
}).then(e, a);
|
|
5727
5695
|
});
|
|
5728
5696
|
}, e.prototype["catch"] = function (e) {
|
|
5729
5697
|
return this.then(function () {}, e);
|
|
@@ -5757,17 +5725,17 @@
|
|
|
5757
5725
|
var t = Object.hasOwn,
|
|
5758
5726
|
r = Object.getPrototypeOf;
|
|
5759
5727
|
function isThenable(e, t) {
|
|
5760
|
-
return isObject(e) && "function" == typeof e.then && (!t
|
|
5728
|
+
return isObject(e) && "function" == typeof e.then && (!t );
|
|
5761
5729
|
}
|
|
5762
5730
|
function toStringTag(e) {
|
|
5763
5731
|
return Object.prototype.toString.call(e).slice(8, -1);
|
|
5764
5732
|
}
|
|
5765
5733
|
function hasConstructorOf(e, n) {
|
|
5766
5734
|
if (!e || "object" !== _typeof(e)) return !1;
|
|
5767
|
-
var
|
|
5768
|
-
if (!
|
|
5769
|
-
var
|
|
5770
|
-
return "function" != typeof
|
|
5735
|
+
var a = r(e);
|
|
5736
|
+
if (!a) return null === n;
|
|
5737
|
+
var o = t(a, "constructor") && a.constructor;
|
|
5738
|
+
return "function" != typeof o ? null === n : n === o || null !== n && Function.prototype.toString.call(o) === Function.prototype.toString.call(n) || "function" == typeof n && "string" == typeof o.__typeson__type__ && o.__typeson__type__ === n.__typeson__type__;
|
|
5771
5739
|
}
|
|
5772
5740
|
function isPlainObject(e) {
|
|
5773
5741
|
return !(!e || "Object" !== toStringTag(e)) && (!r(e) || hasConstructorOf(e, Object));
|
|
@@ -5781,10 +5749,10 @@
|
|
|
5781
5749
|
return null !== e && "object" === _typeof(e);
|
|
5782
5750
|
}
|
|
5783
5751
|
function escapeKeyPathComponent(e) {
|
|
5784
|
-
return e.
|
|
5752
|
+
return e.replaceAll("''", "''''").replace(/^$/, "''").replaceAll("~", "~0").replaceAll(".", "~1");
|
|
5785
5753
|
}
|
|
5786
5754
|
function unescapeKeyPathComponent(e) {
|
|
5787
|
-
return e.
|
|
5755
|
+
return e.replaceAll("~1", ".").replaceAll("~0", "~").replace(/^''$/, "").replaceAll("''''", "''");
|
|
5788
5756
|
}
|
|
5789
5757
|
function getByKeyPath(e, t) {
|
|
5790
5758
|
if ("" === t) return e;
|
|
@@ -5806,11 +5774,11 @@
|
|
|
5806
5774
|
return null === e ? "null" : Array.isArray(e) ? "array" : _typeof(e);
|
|
5807
5775
|
}
|
|
5808
5776
|
function _await(e, t, r) {
|
|
5809
|
-
return
|
|
5777
|
+
return e && e.then || (e = Promise.resolve(e)), t ? e.then(t) : e;
|
|
5810
5778
|
}
|
|
5811
5779
|
var n = Object.keys,
|
|
5812
|
-
|
|
5813
|
-
|
|
5780
|
+
a = Object.hasOwn,
|
|
5781
|
+
o = Array.isArray,
|
|
5814
5782
|
i = ["type", "replaced", "iterateIn", "iterateUnsetNumeric", "addLength"];
|
|
5815
5783
|
function _async(e) {
|
|
5816
5784
|
return function () {
|
|
@@ -5825,9 +5793,9 @@
|
|
|
5825
5793
|
function nestedPathsFirst(e, t) {
|
|
5826
5794
|
var r, n;
|
|
5827
5795
|
if ("" === e.keypath) return -1;
|
|
5828
|
-
var
|
|
5829
|
-
|
|
5830
|
-
return
|
|
5796
|
+
var a = null !== (r = e.keypath.match(/\./g)) && void 0 !== r ? r : 0,
|
|
5797
|
+
o = null !== (n = t.keypath.match(/\./g)) && void 0 !== n ? n : 0;
|
|
5798
|
+
return a && (a = a.length), o && (o = o.length), a > o ? -1 : a < o ? 1 : e.keypath < t.keypath ? -1 : e.keypath > t.keypath ? 1 : 0;
|
|
5831
5799
|
}
|
|
5832
5800
|
var c = function () {
|
|
5833
5801
|
function Typeson(e) {
|
|
@@ -5839,8 +5807,8 @@
|
|
|
5839
5807
|
n = _objectSpread2(_objectSpread2(_objectSpread2({}, this.options), n), {}, {
|
|
5840
5808
|
stringification: !0
|
|
5841
5809
|
});
|
|
5842
|
-
var
|
|
5843
|
-
return a
|
|
5810
|
+
var a = this.encapsulate(e, null, n);
|
|
5811
|
+
return o(a) ? JSON.stringify(a[0], t, r) : a.then(function (e) {
|
|
5844
5812
|
return JSON.stringify(e, t, r);
|
|
5845
5813
|
});
|
|
5846
5814
|
}
|
|
@@ -5912,8 +5880,8 @@
|
|
|
5912
5880
|
p = [],
|
|
5913
5881
|
d = [],
|
|
5914
5882
|
v = !("cyclic" in u) || u.cyclic,
|
|
5915
|
-
|
|
5916
|
-
|
|
5883
|
+
m = u.encapsulateObserver,
|
|
5884
|
+
b = function finish(e) {
|
|
5917
5885
|
var t = Object.values(f);
|
|
5918
5886
|
if (u.iterateNone) return t.length ? t[0] : getJSONType(e);
|
|
5919
5887
|
if (t.length) {
|
|
@@ -5926,25 +5894,25 @@
|
|
|
5926
5894
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
5927
5895
|
}();
|
|
5928
5896
|
}(new Set(t));
|
|
5929
|
-
e && isPlainObject(e) && !
|
|
5897
|
+
e && isPlainObject(e) && !a(e, "$types") ? e.$types = f : e = {
|
|
5930
5898
|
$: e,
|
|
5931
5899
|
$types: {
|
|
5932
5900
|
$: f
|
|
5933
5901
|
}
|
|
5934
5902
|
};
|
|
5935
|
-
} else isObject(e) &&
|
|
5903
|
+
} else isObject(e) && a(e, "$types") && (e = {
|
|
5936
5904
|
$: e,
|
|
5937
5905
|
$types: !0
|
|
5938
5906
|
});
|
|
5939
5907
|
return !u.returnTypeNames && e;
|
|
5940
5908
|
},
|
|
5941
|
-
|
|
5909
|
+
h = _async(function (t, r) {
|
|
5942
5910
|
return _await(Promise.all(r.map(function (e) {
|
|
5943
5911
|
return e[1].p;
|
|
5944
5912
|
})), function (n) {
|
|
5945
5913
|
return _await(Promise.all(n.map(_async(function (n) {
|
|
5946
|
-
var
|
|
5947
|
-
|
|
5914
|
+
var a = !1,
|
|
5915
|
+
o = [],
|
|
5948
5916
|
i = _slicedToArray(r.splice(0, 1), 1),
|
|
5949
5917
|
c = _slicedToArray(i[0], 7),
|
|
5950
5918
|
s = c[0],
|
|
@@ -5953,7 +5921,7 @@
|
|
|
5953
5921
|
f = c[4],
|
|
5954
5922
|
y = c[5],
|
|
5955
5923
|
p = c[6],
|
|
5956
|
-
d =
|
|
5924
|
+
d = O(s, n, u, l, o, !0, p),
|
|
5957
5925
|
v = hasConstructorOf(d, e);
|
|
5958
5926
|
return function _invoke(e, t) {
|
|
5959
5927
|
var r = e();
|
|
@@ -5961,18 +5929,18 @@
|
|
|
5961
5929
|
}(function () {
|
|
5962
5930
|
if (s && v) return _await(d.p, function (e) {
|
|
5963
5931
|
f[y] = e;
|
|
5964
|
-
var r =
|
|
5965
|
-
return
|
|
5932
|
+
var r = h(t, o);
|
|
5933
|
+
return a = !0, r;
|
|
5966
5934
|
});
|
|
5967
5935
|
}, function (e) {
|
|
5968
|
-
return
|
|
5936
|
+
return a ? e : (s ? f[y] = d : t = v ? d.p : d, h(t, o));
|
|
5969
5937
|
});
|
|
5970
5938
|
}))), function () {
|
|
5971
5939
|
return t;
|
|
5972
5940
|
});
|
|
5973
5941
|
});
|
|
5974
5942
|
}),
|
|
5975
|
-
|
|
5943
|
+
g = function _adaptBuiltinStateObjectProperties(e, t, r) {
|
|
5976
5944
|
Object.assign(e, t);
|
|
5977
5945
|
var n = i.map(function (t) {
|
|
5978
5946
|
var r = e[t];
|
|
@@ -5982,14 +5950,14 @@
|
|
|
5982
5950
|
e[t] = n[r];
|
|
5983
5951
|
});
|
|
5984
5952
|
},
|
|
5985
|
-
|
|
5986
|
-
var
|
|
5987
|
-
|
|
5988
|
-
|
|
5989
|
-
|
|
5990
|
-
var
|
|
5991
|
-
|
|
5992
|
-
|
|
5953
|
+
O = function _encapsulate(t, r, i, c, l, d, v) {
|
|
5954
|
+
var b,
|
|
5955
|
+
h = {},
|
|
5956
|
+
O = _typeof(r),
|
|
5957
|
+
_ = m ? function (n) {
|
|
5958
|
+
var a,
|
|
5959
|
+
o = null !== (a = null != v ? v : c.type) && void 0 !== a ? a : getJSONType(r);
|
|
5960
|
+
m(Object.assign(null != n ? n : h, {
|
|
5993
5961
|
keypath: t,
|
|
5994
5962
|
value: r,
|
|
5995
5963
|
cyclic: i,
|
|
@@ -5998,16 +5966,16 @@
|
|
|
5998
5966
|
resolvingTypesonPromise: d,
|
|
5999
5967
|
awaitingTypesonPromise: hasConstructorOf(r, e)
|
|
6000
5968
|
}, {
|
|
6001
|
-
type:
|
|
5969
|
+
type: o
|
|
6002
5970
|
}));
|
|
6003
5971
|
} : null;
|
|
6004
|
-
if (["string", "boolean", "number", "undefined"].includes(
|
|
6005
|
-
replaced:
|
|
6006
|
-
}) :
|
|
6007
|
-
if (null === r) return
|
|
5972
|
+
if (["string", "boolean", "number", "undefined"].includes(O)) return void 0 === r || Number.isNaN(r) || r === Number.NEGATIVE_INFINITY || r === Number.POSITIVE_INFINITY || 0 === r ? (b = c.replaced ? r : w(t, r, c, l, !1, d, _)) !== r && (h = {
|
|
5973
|
+
replaced: b
|
|
5974
|
+
}) : b = r, _ && _(), b;
|
|
5975
|
+
if (null === r) return _ && _(), r;
|
|
6008
5976
|
if (i && !c.iterateIn && !c.iterateUnsetNumeric && r && "object" === _typeof(r)) {
|
|
6009
5977
|
var A = y.indexOf(r);
|
|
6010
|
-
if (!(A < 0)) return f[t] = "#",
|
|
5978
|
+
if (!(A < 0)) return f[t] = "#", _ && _({
|
|
6011
5979
|
cyclicKeypath: p[A]
|
|
6012
5980
|
}), "#" + p[A];
|
|
6013
5981
|
!0 === i && (y.push(r), p.push(t));
|
|
@@ -6015,65 +5983,65 @@
|
|
|
6015
5983
|
var S,
|
|
6016
5984
|
j,
|
|
6017
5985
|
T = isPlainObject(r),
|
|
6018
|
-
I =
|
|
6019
|
-
N = (T || I) && (!s.plainObjectReplacers.length || c.replaced) || c.iterateIn ? r :
|
|
6020
|
-
if (N !== r ? (
|
|
5986
|
+
I = o(r),
|
|
5987
|
+
N = (T || I) && (!s.plainObjectReplacers.length || c.replaced) || c.iterateIn ? r : w(t, r, c, l, T || I, null, _);
|
|
5988
|
+
if (N !== r ? (b = N, h = {
|
|
6021
5989
|
replaced: N
|
|
6022
|
-
}) : "" === t && hasConstructorOf(r, e) ? (l.push([t, r, i, c, void 0, void 0, c.type]),
|
|
5990
|
+
}) : "" === t && hasConstructorOf(r, e) ? (l.push([t, r, i, c, void 0, void 0, c.type]), b = r) : I && "object" !== c.iterateIn || "array" === c.iterateIn ? (S = new Array(r.length), h = {
|
|
6023
5991
|
clone: S
|
|
6024
|
-
}) : (["function", "symbol"].includes(_typeof(r)) || "toJSON" in r || hasConstructorOf(r, e) || hasConstructorOf(r, Promise) || hasConstructorOf(r, ArrayBuffer)) && !T && "object" !== c.iterateIn ?
|
|
5992
|
+
}) : (["function", "symbol"].includes(_typeof(r)) || "toJSON" in r || hasConstructorOf(r, e) || hasConstructorOf(r, Promise) || hasConstructorOf(r, ArrayBuffer)) && !T && "object" !== c.iterateIn ? b = r : (S = {}, c.addLength && (S.length = r.length), h = {
|
|
6025
5993
|
clone: S
|
|
6026
|
-
}),
|
|
6027
|
-
if (!S) return
|
|
5994
|
+
}), _ && _(), u.iterateNone) return null !== (j = S) && void 0 !== j ? j : b;
|
|
5995
|
+
if (!S) return b;
|
|
6028
5996
|
if (c.iterateIn) {
|
|
6029
5997
|
var P = function _loop(n) {
|
|
6030
|
-
var
|
|
6031
|
-
ownKeys:
|
|
5998
|
+
var o = {
|
|
5999
|
+
ownKeys: a(r, n)
|
|
6032
6000
|
};
|
|
6033
|
-
|
|
6034
|
-
var
|
|
6035
|
-
|
|
6036
|
-
hasConstructorOf(
|
|
6001
|
+
g(c, o, function () {
|
|
6002
|
+
var a = t + (t ? "." : "") + escapeKeyPathComponent(n),
|
|
6003
|
+
o = _encapsulate(a, r[n], Boolean(i), c, l, d);
|
|
6004
|
+
hasConstructorOf(o, e) ? l.push([a, o, Boolean(i), c, S, n, c.type]) : void 0 !== o && (S[n] = o);
|
|
6037
6005
|
});
|
|
6038
6006
|
};
|
|
6039
|
-
for (var
|
|
6040
|
-
|
|
6007
|
+
for (var x in r) P(x);
|
|
6008
|
+
_ && _({
|
|
6041
6009
|
endIterateIn: !0,
|
|
6042
6010
|
end: !0
|
|
6043
6011
|
});
|
|
6044
6012
|
} else n(r).forEach(function (n) {
|
|
6045
|
-
var
|
|
6046
|
-
|
|
6013
|
+
var a = t + (t ? "." : "") + escapeKeyPathComponent(n);
|
|
6014
|
+
g(c, {
|
|
6047
6015
|
ownKeys: !0
|
|
6048
6016
|
}, function () {
|
|
6049
|
-
var t = _encapsulate(
|
|
6050
|
-
hasConstructorOf(t, e) ? l.push([
|
|
6017
|
+
var t = _encapsulate(a, r[n], Boolean(i), c, l, d);
|
|
6018
|
+
hasConstructorOf(t, e) ? l.push([a, t, Boolean(i), c, S, n, c.type]) : void 0 !== t && (S[n] = t);
|
|
6051
6019
|
});
|
|
6052
|
-
}),
|
|
6020
|
+
}), _ && _({
|
|
6053
6021
|
endIterateOwn: !0,
|
|
6054
6022
|
end: !0
|
|
6055
6023
|
});
|
|
6056
6024
|
if (c.iterateUnsetNumeric) {
|
|
6057
|
-
for (var
|
|
6025
|
+
for (var E = r.length, C = function _loop2(n) {
|
|
6058
6026
|
if (!(n in r)) {
|
|
6059
|
-
var
|
|
6060
|
-
|
|
6027
|
+
var a = "".concat(t).concat(t ? "." : "").concat(n);
|
|
6028
|
+
g(c, {
|
|
6061
6029
|
ownKeys: !1
|
|
6062
6030
|
}, function () {
|
|
6063
|
-
var t = _encapsulate(
|
|
6064
|
-
hasConstructorOf(t, e) ? l.push([
|
|
6031
|
+
var t = _encapsulate(a, void 0, Boolean(i), c, l, d);
|
|
6032
|
+
hasConstructorOf(t, e) ? l.push([a, t, Boolean(i), c, S, n, c.type]) : void 0 !== t && (S[n] = t);
|
|
6065
6033
|
});
|
|
6066
6034
|
}
|
|
6067
|
-
},
|
|
6068
|
-
|
|
6035
|
+
}, B = 0; B < E; B++) C(B);
|
|
6036
|
+
_ && _({
|
|
6069
6037
|
endIterateUnsetNumeric: !0,
|
|
6070
6038
|
end: !0
|
|
6071
6039
|
});
|
|
6072
6040
|
}
|
|
6073
6041
|
return S;
|
|
6074
6042
|
},
|
|
6075
|
-
|
|
6076
|
-
for (var c =
|
|
6043
|
+
w = function replace(e, t, r, n, a, o, i) {
|
|
6044
|
+
for (var c = a ? s.plainObjectReplacers : s.nonplainObjectReplacers, u = c.length; u--;) {
|
|
6077
6045
|
var y = c[u];
|
|
6078
6046
|
if (y.test(t, r)) {
|
|
6079
6047
|
var p = y.type;
|
|
@@ -6086,26 +6054,26 @@
|
|
|
6086
6054
|
replaced: !0
|
|
6087
6055
|
}), (l || !y.replaceAsync) && !y.replace) return i && i({
|
|
6088
6056
|
typeDetected: !0
|
|
6089
|
-
}),
|
|
6057
|
+
}), O(e, t, v && "readonly", r, n, o, p);
|
|
6090
6058
|
i && i({
|
|
6091
6059
|
replacing: !0
|
|
6092
6060
|
});
|
|
6093
|
-
var
|
|
6061
|
+
var m = void 0;
|
|
6094
6062
|
if (l || !y.replaceAsync) {
|
|
6095
6063
|
if (void 0 === y.replace) throw new TypeError("Missing replacer");
|
|
6096
|
-
|
|
6097
|
-
} else
|
|
6098
|
-
return
|
|
6064
|
+
m = y.replace(t, r);
|
|
6065
|
+
} else m = y.replaceAsync(t, r);
|
|
6066
|
+
return O(e, m, v && "readonly", r, n, o, p);
|
|
6099
6067
|
}
|
|
6100
6068
|
}
|
|
6101
6069
|
return t;
|
|
6102
6070
|
},
|
|
6103
|
-
|
|
6071
|
+
_ = O("", t, v, null != r ? r : {}, d);
|
|
6104
6072
|
if (d.length) return l && u.throwOnBadSyncType ? function () {
|
|
6105
6073
|
throw new TypeError("Sync method requested but async result obtained");
|
|
6106
|
-
}() : Promise.resolve(
|
|
6074
|
+
}() : Promise.resolve(h(_, d)).then(b);
|
|
6107
6075
|
if (!l && u.throwOnBadSyncType) throw new TypeError("Async method requested but sync result obtained");
|
|
6108
|
-
return u.stringification && l ? [
|
|
6076
|
+
return u.stringification && l ? [b(_)] : l ? b(_) : Promise.resolve(b(_));
|
|
6109
6077
|
}
|
|
6110
6078
|
}, {
|
|
6111
6079
|
key: "encapsulateSync",
|
|
@@ -6128,7 +6096,7 @@
|
|
|
6128
6096
|
}, {
|
|
6129
6097
|
key: "revive",
|
|
6130
6098
|
value: function revive(t, r) {
|
|
6131
|
-
var
|
|
6099
|
+
var a = this,
|
|
6132
6100
|
i = _objectSpread2(_objectSpread2({
|
|
6133
6101
|
sync: !0
|
|
6134
6102
|
}, this.options), r),
|
|
@@ -6148,7 +6116,7 @@
|
|
|
6148
6116
|
u.$ && isPlainObject(u.$) && (t = t.$, u = u.$, y = !1);
|
|
6149
6117
|
var p = function executeReviver(e, t) {
|
|
6150
6118
|
var r,
|
|
6151
|
-
n = _slicedToArray(null !== (r =
|
|
6119
|
+
n = _slicedToArray(null !== (r = a.revivers[e]) && void 0 !== r ? r : [], 1)[0];
|
|
6152
6120
|
if (!n) throw new Error("Unregistered type: " + e);
|
|
6153
6121
|
if (c && !("revive" in n)) return t;
|
|
6154
6122
|
if (!c && n.reviveAsync) return n.reviveAsync(t, f);
|
|
@@ -6160,69 +6128,69 @@
|
|
|
6160
6128
|
return hasConstructorOf(e, s) ? void 0 : e;
|
|
6161
6129
|
}
|
|
6162
6130
|
var v,
|
|
6163
|
-
|
|
6131
|
+
m = function revivePlainObjects() {
|
|
6164
6132
|
var r = [];
|
|
6165
6133
|
if (!u) throw new Error("Found bad `types`");
|
|
6166
6134
|
if (Object.entries(u).forEach(function (e) {
|
|
6167
6135
|
var t = _slicedToArray(e, 2),
|
|
6168
6136
|
n = t[0],
|
|
6169
|
-
|
|
6170
|
-
"#" !==
|
|
6137
|
+
o = t[1];
|
|
6138
|
+
"#" !== o && [].concat(o).forEach(function (e) {
|
|
6171
6139
|
var t;
|
|
6172
|
-
_slicedToArray(null !== (t =
|
|
6140
|
+
_slicedToArray(null !== (t = a.revivers[e]) && void 0 !== t ? t : [null, {}], 2)[1].plain && (r.push({
|
|
6173
6141
|
keypath: n,
|
|
6174
6142
|
type: e
|
|
6175
6143
|
}), delete u[n]);
|
|
6176
6144
|
});
|
|
6177
6145
|
}), r.length) return r.sort(nestedPathsFirst).reduce(function reducer(r, n) {
|
|
6178
|
-
var
|
|
6179
|
-
|
|
6146
|
+
var a = n.keypath,
|
|
6147
|
+
o = n.type;
|
|
6180
6148
|
if (isThenable(r)) return r.then(function (e) {
|
|
6181
6149
|
return reducer(e, {
|
|
6182
|
-
keypath:
|
|
6183
|
-
type:
|
|
6150
|
+
keypath: a,
|
|
6151
|
+
type: o
|
|
6184
6152
|
});
|
|
6185
6153
|
});
|
|
6186
|
-
var i = getByKeyPath(t,
|
|
6187
|
-
if (hasConstructorOf(i = p(
|
|
6188
|
-
var r = setAtKeyPath(t,
|
|
6154
|
+
var i = getByKeyPath(t, a);
|
|
6155
|
+
if (hasConstructorOf(i = p(o, i), e)) return i.then(function (e) {
|
|
6156
|
+
var r = setAtKeyPath(t, a, e);
|
|
6189
6157
|
r === e && (t = r);
|
|
6190
6158
|
});
|
|
6191
|
-
var c = setAtKeyPath(t,
|
|
6159
|
+
var c = setAtKeyPath(t, a, i);
|
|
6192
6160
|
c === i && (t = c);
|
|
6193
6161
|
}, void 0);
|
|
6194
6162
|
}();
|
|
6195
|
-
return hasConstructorOf(
|
|
6163
|
+
return hasConstructorOf(m, e) ? v = m.then(function () {
|
|
6196
6164
|
return t;
|
|
6197
|
-
}) : (v = function _revive(t, r,
|
|
6165
|
+
}) : (v = function _revive(t, r, a, i, c) {
|
|
6198
6166
|
if (!y || "$types" !== t) {
|
|
6199
6167
|
var f = u[t],
|
|
6200
|
-
v =
|
|
6168
|
+
v = o(r);
|
|
6201
6169
|
if (v || isPlainObject(r)) {
|
|
6202
|
-
var
|
|
6170
|
+
var m = v ? new Array(r.length) : {};
|
|
6203
6171
|
for (n(r).forEach(function (n) {
|
|
6204
|
-
var
|
|
6172
|
+
var o = _revive(t + (t ? "." : "") + escapeKeyPathComponent(n), r[n], null != a ? a : m, m, n),
|
|
6205
6173
|
i = function set(e) {
|
|
6206
|
-
return hasConstructorOf(e, s) ?
|
|
6174
|
+
return hasConstructorOf(e, s) ? m[n] = void 0 : void 0 !== e && (m[n] = e), e;
|
|
6207
6175
|
};
|
|
6208
|
-
hasConstructorOf(
|
|
6176
|
+
hasConstructorOf(o, e) ? d.push(o.then(function (e) {
|
|
6209
6177
|
return i(e);
|
|
6210
|
-
})) : i(
|
|
6211
|
-
}), r =
|
|
6212
|
-
var
|
|
6213
|
-
|
|
6214
|
-
|
|
6215
|
-
|
|
6216
|
-
|
|
6217
|
-
|
|
6218
|
-
if (void 0 ===
|
|
6219
|
-
|
|
6178
|
+
})) : i(o);
|
|
6179
|
+
}), r = m; l.length;) {
|
|
6180
|
+
var b = _slicedToArray(l[0], 4),
|
|
6181
|
+
h = b[0],
|
|
6182
|
+
g = b[1],
|
|
6183
|
+
O = b[2],
|
|
6184
|
+
w = b[3],
|
|
6185
|
+
_ = getByKeyPath(h, g);
|
|
6186
|
+
if (void 0 === _) break;
|
|
6187
|
+
O[w] = _, l.splice(0, 1);
|
|
6220
6188
|
}
|
|
6221
6189
|
}
|
|
6222
6190
|
if (!f) return r;
|
|
6223
6191
|
if ("#" === f) {
|
|
6224
|
-
var A = getByKeyPath(
|
|
6225
|
-
return void 0 === A && l.push([
|
|
6192
|
+
var A = getByKeyPath(a, r.slice(1));
|
|
6193
|
+
return void 0 === A && l.push([a, r.slice(1), i, c]), A;
|
|
6226
6194
|
}
|
|
6227
6195
|
return [].concat(f).reduce(function reducer(t, r) {
|
|
6228
6196
|
if (hasConstructorOf(t, e)) return t.then(function (e) {
|
|
@@ -6264,9 +6232,9 @@
|
|
|
6264
6232
|
key: "register",
|
|
6265
6233
|
value: function register(e, t) {
|
|
6266
6234
|
var r = this,
|
|
6267
|
-
|
|
6235
|
+
a = null != t ? t : {},
|
|
6268
6236
|
i = function R(e) {
|
|
6269
|
-
|
|
6237
|
+
o(e) ? e.forEach(function (e) {
|
|
6270
6238
|
return R(e);
|
|
6271
6239
|
}) : n(e).forEach(function (t) {
|
|
6272
6240
|
var n;
|
|
@@ -6290,7 +6258,7 @@
|
|
|
6290
6258
|
return Object.assign(Object.create(l.prototype), e);
|
|
6291
6259
|
}
|
|
6292
6260
|
};
|
|
6293
|
-
} else if (
|
|
6261
|
+
} else if (o(i)) {
|
|
6294
6262
|
var f = _slicedToArray(i, 3);
|
|
6295
6263
|
i = {
|
|
6296
6264
|
test: f[0],
|
|
@@ -6304,7 +6272,7 @@
|
|
|
6304
6272
|
test: i.test.bind(i)
|
|
6305
6273
|
};
|
|
6306
6274
|
i.replace && (y.replace = i.replace.bind(i)), i.replaceAsync && (y.replaceAsync = i.replaceAsync.bind(i));
|
|
6307
|
-
var p = "number" == typeof
|
|
6275
|
+
var p = "number" == typeof a.fallback ? a.fallback : a.fallback ? 0 : Number.POSITIVE_INFINITY;
|
|
6308
6276
|
if (i.testPlainObjects ? r.plainObjectReplacers.splice(p, 0, y) : r.nonplainObjectReplacers.splice(p, 0, y), i.revive || i.reviveAsync) {
|
|
6309
6277
|
var d = {};
|
|
6310
6278
|
i.revive && (d.revive = i.revive.bind(i)), i.reviveAsync && (d.reviveAsync = i.reviveAsync.bind(i)), r.revivers[t] = [d, {
|
|
@@ -6328,21 +6296,21 @@
|
|
|
6328
6296
|
for (var u = ["null", "boolean", "number", "string", "array", "object"], l = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", f = new Uint8Array(256), y = 0; y < 64; y++) f[l.codePointAt(y)] = y;
|
|
6329
6297
|
var p = function encode(e, t, r) {
|
|
6330
6298
|
null == r && (r = e.byteLength);
|
|
6331
|
-
for (var n = new Uint8Array(e,
|
|
6332
|
-
return
|
|
6299
|
+
for (var n = new Uint8Array(e, 0, r), a = n.length, o = "", i = 0; i < a; i += 3) o += l[n[i] >> 2], o += l[(3 & n[i]) << 4 | n[i + 1] >> 4], o += l[(15 & n[i + 1]) << 2 | n[i + 2] >> 6], o += l[63 & n[i + 2]];
|
|
6300
|
+
return a % 3 == 2 ? o = o.slice(0, -1) + "=" : a % 3 == 1 && (o = o.slice(0, -2) + "=="), o;
|
|
6333
6301
|
},
|
|
6334
|
-
d = function decode(e) {
|
|
6335
|
-
var
|
|
6336
|
-
if (
|
|
6337
|
-
var
|
|
6338
|
-
n,
|
|
6339
|
-
o,
|
|
6302
|
+
d = function decode(e, t) {
|
|
6303
|
+
var r = e.length;
|
|
6304
|
+
if (r % 4) throw new Error("Bad base64 length: not divisible by four");
|
|
6305
|
+
var n,
|
|
6340
6306
|
a,
|
|
6341
|
-
|
|
6342
|
-
|
|
6343
|
-
|
|
6344
|
-
|
|
6345
|
-
|
|
6307
|
+
o,
|
|
6308
|
+
i,
|
|
6309
|
+
c = .75 * e.length,
|
|
6310
|
+
s = 0;
|
|
6311
|
+
"=" === e[e.length - 1] && (c--, "=" === e[e.length - 2] && c--);
|
|
6312
|
+
for (var u = new ArrayBuffer(c, t), l = new Uint8Array(u), y = 0; y < r; y += 4) n = f[e.codePointAt(y)], a = f[e.codePointAt(y + 1)], o = f[e.codePointAt(y + 2)], i = f[e.codePointAt(y + 3)], l[s++] = n << 2 | a >> 4, l[s++] = (15 & a) << 4 | o >> 2, l[s++] = (3 & o) << 6 | 63 & i;
|
|
6313
|
+
return u;
|
|
6346
6314
|
};
|
|
6347
6315
|
var v = {
|
|
6348
6316
|
arraybuffer: {
|
|
@@ -6354,16 +6322,21 @@
|
|
|
6354
6322
|
var r = t.buffers.indexOf(e);
|
|
6355
6323
|
return r > -1 ? {
|
|
6356
6324
|
index: r
|
|
6357
|
-
} : (t.buffers.push(e),
|
|
6325
|
+
} : (t.buffers.push(e), {
|
|
6326
|
+
s: p(e),
|
|
6327
|
+
maxByteLength: e.maxByteLength
|
|
6328
|
+
});
|
|
6358
6329
|
},
|
|
6359
6330
|
revive: function revive(e, t) {
|
|
6360
|
-
if (t.buffers || (t.buffers = []), "
|
|
6361
|
-
var r = d(e
|
|
6331
|
+
if (t.buffers || (t.buffers = []), Object.hasOwn(e, "index")) return t.buffers[e.index];
|
|
6332
|
+
var r = d(e.s, {
|
|
6333
|
+
maxByteLength: e.maxByteLength
|
|
6334
|
+
});
|
|
6362
6335
|
return t.buffers.push(r), r;
|
|
6363
6336
|
}
|
|
6364
6337
|
}
|
|
6365
6338
|
},
|
|
6366
|
-
|
|
6339
|
+
m = {
|
|
6367
6340
|
bigintObject: {
|
|
6368
6341
|
test: function test(e) {
|
|
6369
6342
|
return "object" == _typeof$2(e) && hasConstructorOf(e, BigInt);
|
|
@@ -6374,7 +6347,7 @@
|
|
|
6374
6347
|
}
|
|
6375
6348
|
}
|
|
6376
6349
|
},
|
|
6377
|
-
|
|
6350
|
+
b = {
|
|
6378
6351
|
bigint: {
|
|
6379
6352
|
test: function test(e) {
|
|
6380
6353
|
return "bigint" == typeof e;
|
|
@@ -6390,7 +6363,7 @@
|
|
|
6390
6363
|
for (var _r = 0; _r < e.length; _r++) t[_r] = e.charCodeAt(_r);
|
|
6391
6364
|
return t.buffer;
|
|
6392
6365
|
}
|
|
6393
|
-
var
|
|
6366
|
+
var h = {
|
|
6394
6367
|
blob: {
|
|
6395
6368
|
test: function test(e) {
|
|
6396
6369
|
return "Blob" === toStringTag(e);
|
|
@@ -6425,7 +6398,7 @@
|
|
|
6425
6398
|
}
|
|
6426
6399
|
}
|
|
6427
6400
|
};
|
|
6428
|
-
var
|
|
6401
|
+
var w = {
|
|
6429
6402
|
cryptokey: {
|
|
6430
6403
|
test: function test(e) {
|
|
6431
6404
|
return "CryptoKey" === toStringTag(e) && e.extractable;
|
|
@@ -6473,7 +6446,7 @@
|
|
|
6473
6446
|
}
|
|
6474
6447
|
}
|
|
6475
6448
|
},
|
|
6476
|
-
|
|
6449
|
+
_ = {
|
|
6477
6450
|
dataview: {
|
|
6478
6451
|
test: function test(e) {
|
|
6479
6452
|
return "DataView" === toStringTag(e);
|
|
@@ -6483,13 +6456,14 @@
|
|
|
6483
6456
|
t = _ref2.byteOffset,
|
|
6484
6457
|
r = _ref2.byteLength;
|
|
6485
6458
|
n.buffers || (n.buffers = []);
|
|
6486
|
-
var
|
|
6487
|
-
return
|
|
6488
|
-
index:
|
|
6459
|
+
var a = n.buffers.indexOf(e);
|
|
6460
|
+
return a > -1 ? {
|
|
6461
|
+
index: a,
|
|
6489
6462
|
byteOffset: t,
|
|
6490
6463
|
byteLength: r
|
|
6491
6464
|
} : (n.buffers.push(e), {
|
|
6492
6465
|
encoded: p(e),
|
|
6466
|
+
maxByteLength: e.maxByteLength,
|
|
6493
6467
|
byteOffset: t,
|
|
6494
6468
|
byteLength: r
|
|
6495
6469
|
});
|
|
@@ -6498,10 +6472,13 @@
|
|
|
6498
6472
|
t.buffers || (t.buffers = []);
|
|
6499
6473
|
var r = e.byteOffset,
|
|
6500
6474
|
n = e.byteLength,
|
|
6501
|
-
|
|
6502
|
-
|
|
6503
|
-
|
|
6504
|
-
|
|
6475
|
+
a = e.encoded,
|
|
6476
|
+
o = e.index,
|
|
6477
|
+
i = e.maxByteLength;
|
|
6478
|
+
var c;
|
|
6479
|
+
return "index" in e ? c = t.buffers[o] : (c = d(a, void 0 === i ? i : {
|
|
6480
|
+
maxByteLength: i
|
|
6481
|
+
}), t.buffers.push(c)), new DataView(c, r, n);
|
|
6505
6482
|
}
|
|
6506
6483
|
}
|
|
6507
6484
|
},
|
|
@@ -6520,25 +6497,152 @@
|
|
|
6520
6497
|
}
|
|
6521
6498
|
},
|
|
6522
6499
|
S = {
|
|
6500
|
+
domexception: {
|
|
6501
|
+
test: function test(e) {
|
|
6502
|
+
return "DOMException" === toStringTag(e);
|
|
6503
|
+
},
|
|
6504
|
+
replace: function replace(e) {
|
|
6505
|
+
return {
|
|
6506
|
+
name: e.name,
|
|
6507
|
+
message: e.message
|
|
6508
|
+
};
|
|
6509
|
+
},
|
|
6510
|
+
revive: function revive(_ref3) {
|
|
6511
|
+
var e = _ref3.message,
|
|
6512
|
+
t = _ref3.name;
|
|
6513
|
+
return new DOMException(e, t);
|
|
6514
|
+
}
|
|
6515
|
+
}
|
|
6516
|
+
},
|
|
6517
|
+
j = {};
|
|
6518
|
+
function create$5(e) {
|
|
6519
|
+
j[e.name.toLowerCase()] = {
|
|
6520
|
+
test: function test(t) {
|
|
6521
|
+
return toStringTag(t) === e.name;
|
|
6522
|
+
},
|
|
6523
|
+
replace: function replace(e) {
|
|
6524
|
+
return e.is2D ? {
|
|
6525
|
+
a: e.a,
|
|
6526
|
+
b: e.b,
|
|
6527
|
+
c: e.c,
|
|
6528
|
+
d: e.d,
|
|
6529
|
+
e: e.e,
|
|
6530
|
+
f: e.f
|
|
6531
|
+
} : {
|
|
6532
|
+
m11: e.m11,
|
|
6533
|
+
m12: e.m12,
|
|
6534
|
+
m13: e.m13,
|
|
6535
|
+
m14: e.m14,
|
|
6536
|
+
m21: e.m21,
|
|
6537
|
+
m22: e.m22,
|
|
6538
|
+
m23: e.m23,
|
|
6539
|
+
m24: e.m24,
|
|
6540
|
+
m31: e.m31,
|
|
6541
|
+
m32: e.m32,
|
|
6542
|
+
m33: e.m33,
|
|
6543
|
+
m34: e.m34,
|
|
6544
|
+
m41: e.m41,
|
|
6545
|
+
m42: e.m42,
|
|
6546
|
+
m43: e.m43,
|
|
6547
|
+
m44: e.m44
|
|
6548
|
+
};
|
|
6549
|
+
},
|
|
6550
|
+
revive: function revive(t) {
|
|
6551
|
+
return Object.hasOwn(t, "a") ? new e([t.a, t.b, t.c, t.d, t.e, t.f]) : new e([t.m11, t.m12, t.m13, t.m14, t.m21, t.m22, t.m23, t.m24, t.m31, t.m32, t.m33, t.m34, t.m41, t.m42, t.m43, t.m44]);
|
|
6552
|
+
}
|
|
6553
|
+
};
|
|
6554
|
+
}
|
|
6555
|
+
"undefined" != typeof DOMMatrix && create$5(DOMMatrix), "undefined" != typeof DOMMatrixReadOnly && create$5(DOMMatrixReadOnly);
|
|
6556
|
+
var T = {};
|
|
6557
|
+
function create$4(e) {
|
|
6558
|
+
T[e.name.toLowerCase()] = {
|
|
6559
|
+
test: function test(t) {
|
|
6560
|
+
return toStringTag(t) === e.name;
|
|
6561
|
+
},
|
|
6562
|
+
replace: function replace(e) {
|
|
6563
|
+
return {
|
|
6564
|
+
x: e.x,
|
|
6565
|
+
y: e.y,
|
|
6566
|
+
z: e.z,
|
|
6567
|
+
w: e.w
|
|
6568
|
+
};
|
|
6569
|
+
},
|
|
6570
|
+
revive: function revive(_ref4) {
|
|
6571
|
+
var t = _ref4.x,
|
|
6572
|
+
r = _ref4.y,
|
|
6573
|
+
n = _ref4.z,
|
|
6574
|
+
a = _ref4.w;
|
|
6575
|
+
return new e(t, r, n, a);
|
|
6576
|
+
}
|
|
6577
|
+
};
|
|
6578
|
+
}
|
|
6579
|
+
"undefined" != typeof DOMPoint && create$4(DOMPoint), "undefined" != typeof DOMPointReadOnly && create$4(DOMPointReadOnly);
|
|
6580
|
+
var I = {
|
|
6581
|
+
domquad: {
|
|
6582
|
+
test: function test(e) {
|
|
6583
|
+
return "DOMQuad" === toStringTag(e);
|
|
6584
|
+
},
|
|
6585
|
+
replace: function replace(e) {
|
|
6586
|
+
return {
|
|
6587
|
+
p1: e.p1,
|
|
6588
|
+
p2: e.p2,
|
|
6589
|
+
p3: e.p3,
|
|
6590
|
+
p4: e.p4
|
|
6591
|
+
};
|
|
6592
|
+
},
|
|
6593
|
+
revive: function revive(_ref5) {
|
|
6594
|
+
var e = _ref5.p1,
|
|
6595
|
+
t = _ref5.p2,
|
|
6596
|
+
r = _ref5.p3,
|
|
6597
|
+
n = _ref5.p4;
|
|
6598
|
+
return new DOMQuad(e, t, r, n);
|
|
6599
|
+
}
|
|
6600
|
+
}
|
|
6601
|
+
},
|
|
6602
|
+
N = {};
|
|
6603
|
+
function create$3(e) {
|
|
6604
|
+
N[e.name.toLowerCase()] = {
|
|
6605
|
+
test: function test(t) {
|
|
6606
|
+
return toStringTag(t) === e.name;
|
|
6607
|
+
},
|
|
6608
|
+
replace: function replace(e) {
|
|
6609
|
+
return {
|
|
6610
|
+
x: e.x,
|
|
6611
|
+
y: e.y,
|
|
6612
|
+
width: e.width,
|
|
6613
|
+
height: e.height
|
|
6614
|
+
};
|
|
6615
|
+
},
|
|
6616
|
+
revive: function revive(_ref6) {
|
|
6617
|
+
var t = _ref6.x,
|
|
6618
|
+
r = _ref6.y,
|
|
6619
|
+
n = _ref6.width,
|
|
6620
|
+
a = _ref6.height;
|
|
6621
|
+
return new e(t, r, n, a);
|
|
6622
|
+
}
|
|
6623
|
+
};
|
|
6624
|
+
}
|
|
6625
|
+
"undefined" != typeof DOMRect && create$3(DOMRect), "undefined" != typeof DOMRectReadOnly && create$3(DOMRectReadOnly);
|
|
6626
|
+
var P = {
|
|
6523
6627
|
error: {
|
|
6524
6628
|
test: function test(e) {
|
|
6525
6629
|
return "Error" === toStringTag(e);
|
|
6526
6630
|
},
|
|
6527
|
-
replace: function replace(
|
|
6528
|
-
var e =
|
|
6529
|
-
t =
|
|
6530
|
-
r =
|
|
6531
|
-
n =
|
|
6532
|
-
|
|
6533
|
-
|
|
6534
|
-
i =
|
|
6631
|
+
replace: function replace(_ref7) {
|
|
6632
|
+
var e = _ref7.name,
|
|
6633
|
+
t = _ref7.message,
|
|
6634
|
+
r = _ref7.cause,
|
|
6635
|
+
n = _ref7.stack,
|
|
6636
|
+
a = _ref7.fileName,
|
|
6637
|
+
o = _ref7.lineNumber,
|
|
6638
|
+
i = _ref7.columnNumber;
|
|
6535
6639
|
return {
|
|
6536
6640
|
name: e,
|
|
6537
6641
|
message: t,
|
|
6538
6642
|
cause: r,
|
|
6539
6643
|
stack: n,
|
|
6540
|
-
fileName:
|
|
6541
|
-
lineNumber:
|
|
6644
|
+
fileName: a,
|
|
6645
|
+
lineNumber: o,
|
|
6542
6646
|
columnNumber: i
|
|
6543
6647
|
};
|
|
6544
6648
|
},
|
|
@@ -6548,43 +6652,42 @@
|
|
|
6548
6652
|
}
|
|
6549
6653
|
}
|
|
6550
6654
|
},
|
|
6551
|
-
|
|
6655
|
+
x = {};
|
|
6552
6656
|
function create$2(e) {
|
|
6553
|
-
|
|
6657
|
+
x[e.name.toLowerCase()] = {
|
|
6554
6658
|
test: function test(t) {
|
|
6555
6659
|
return hasConstructorOf(t, e);
|
|
6556
6660
|
},
|
|
6557
|
-
replace: function replace(
|
|
6558
|
-
var e =
|
|
6559
|
-
t =
|
|
6560
|
-
r =
|
|
6561
|
-
n =
|
|
6562
|
-
|
|
6563
|
-
|
|
6564
|
-
i =
|
|
6565
|
-
c =
|
|
6661
|
+
replace: function replace(_ref8) {
|
|
6662
|
+
var e = _ref8.name,
|
|
6663
|
+
t = _ref8.message,
|
|
6664
|
+
r = _ref8.cause,
|
|
6665
|
+
n = _ref8.stack,
|
|
6666
|
+
a = _ref8.fileName,
|
|
6667
|
+
o = _ref8.lineNumber,
|
|
6668
|
+
i = _ref8.columnNumber,
|
|
6669
|
+
c = _ref8.errors;
|
|
6566
6670
|
return {
|
|
6567
6671
|
name: e,
|
|
6568
6672
|
message: t,
|
|
6569
6673
|
cause: r,
|
|
6570
6674
|
stack: n,
|
|
6571
|
-
fileName:
|
|
6572
|
-
lineNumber:
|
|
6675
|
+
fileName: a,
|
|
6676
|
+
lineNumber: o,
|
|
6573
6677
|
columnNumber: i,
|
|
6574
6678
|
errors: c
|
|
6575
6679
|
};
|
|
6576
6680
|
},
|
|
6577
6681
|
revive: function revive(t) {
|
|
6578
|
-
var r = "undefined" != typeof AggregateError && e === AggregateError,
|
|
6579
|
-
|
|
6580
|
-
return n.name = t.name, n.cause = t.cause, n.stack = t.stack, n.fileName = t.fileName, n.lineNumber = t.lineNumber, n.columnNumber = t.columnNumber, r && (n.errors = t.errors), n;
|
|
6682
|
+
var r = "undefined" != typeof AggregateError && e === AggregateError ? new e(t.errors, t.message) : new e(t.message);
|
|
6683
|
+
return r.name = t.name, r.cause = t.cause, r.stack = t.stack, r.fileName = t.fileName, r.lineNumber = t.lineNumber, r.columnNumber = t.columnNumber, r;
|
|
6581
6684
|
}
|
|
6582
6685
|
};
|
|
6583
6686
|
}
|
|
6584
6687
|
[TypeError, RangeError, SyntaxError, ReferenceError, EvalError, URIError].forEach(function (e) {
|
|
6585
6688
|
return create$2(e);
|
|
6586
6689
|
}), "undefined" != typeof AggregateError && create$2(AggregateError), "function" == typeof InternalError && create$2(InternalError);
|
|
6587
|
-
var
|
|
6690
|
+
var E = {
|
|
6588
6691
|
file: {
|
|
6589
6692
|
test: function test(e) {
|
|
6590
6693
|
return "File" === toStringTag(e);
|
|
@@ -6599,11 +6702,11 @@
|
|
|
6599
6702
|
lastModified: e.lastModified
|
|
6600
6703
|
};
|
|
6601
6704
|
},
|
|
6602
|
-
revive: function revive(
|
|
6603
|
-
var e =
|
|
6604
|
-
t =
|
|
6605
|
-
r =
|
|
6606
|
-
n =
|
|
6705
|
+
revive: function revive(_ref9) {
|
|
6706
|
+
var e = _ref9.name,
|
|
6707
|
+
t = _ref9.type,
|
|
6708
|
+
r = _ref9.stringContents,
|
|
6709
|
+
n = _ref9.lastModified;
|
|
6607
6710
|
return new File([string2arraybuffer(r)], e, {
|
|
6608
6711
|
type: t,
|
|
6609
6712
|
lastModified: n
|
|
@@ -6626,8 +6729,8 @@
|
|
|
6626
6729
|
}
|
|
6627
6730
|
}
|
|
6628
6731
|
},
|
|
6629
|
-
|
|
6630
|
-
file:
|
|
6732
|
+
C = {
|
|
6733
|
+
file: E.file,
|
|
6631
6734
|
filelist: {
|
|
6632
6735
|
test: function test(e) {
|
|
6633
6736
|
return "FileList" === toStringTag(e);
|
|
@@ -6638,53 +6741,56 @@
|
|
|
6638
6741
|
return t;
|
|
6639
6742
|
},
|
|
6640
6743
|
revive: function revive(e) {
|
|
6641
|
-
var FileList = /*#__PURE__*/function (
|
|
6744
|
+
var FileList = /*#__PURE__*/function () {
|
|
6642
6745
|
function FileList() {
|
|
6643
6746
|
_classCallCheck$1(this, FileList);
|
|
6644
6747
|
this._files = arguments[0], this.length = this._files.length;
|
|
6645
6748
|
}
|
|
6646
|
-
_createClass$1(FileList, [{
|
|
6749
|
+
return _createClass$1(FileList, [{
|
|
6647
6750
|
key: "item",
|
|
6648
6751
|
value: function item(e) {
|
|
6649
6752
|
return this._files[e];
|
|
6650
6753
|
}
|
|
6651
6754
|
}, {
|
|
6652
|
-
key:
|
|
6755
|
+
key: Symbol.toStringTag,
|
|
6653
6756
|
get: function get() {
|
|
6654
6757
|
return "FileList";
|
|
6655
6758
|
}
|
|
6656
6759
|
}]);
|
|
6657
|
-
|
|
6658
|
-
}(Symbol.toStringTag);
|
|
6760
|
+
}();
|
|
6659
6761
|
return new FileList(e);
|
|
6660
6762
|
}
|
|
6661
6763
|
}
|
|
6662
6764
|
},
|
|
6663
|
-
|
|
6765
|
+
B = {
|
|
6664
6766
|
imagebitmap: {
|
|
6665
6767
|
test: function test(e) {
|
|
6666
6768
|
return "ImageBitmap" === toStringTag(e) || e && e.dataset && "ImageBitmap" === e.dataset.toStringTag;
|
|
6667
6769
|
},
|
|
6668
6770
|
replace: function replace(e) {
|
|
6669
6771
|
var t = document.createElement("canvas");
|
|
6670
|
-
return t.getContext("2d").drawImage(e, 0, 0),
|
|
6772
|
+
return t.getContext("2d").drawImage(e, 0, 0), {
|
|
6773
|
+
width: e.width,
|
|
6774
|
+
height: e.height,
|
|
6775
|
+
dataURL: t.toDataURL()
|
|
6776
|
+
};
|
|
6671
6777
|
},
|
|
6672
6778
|
revive: function revive(e) {
|
|
6673
|
-
var t = document.createElement("canvas"),
|
|
6779
|
+
var t = "undefined" == typeof OffscreenCanvas ? document.createElement("canvas") : new OffscreenCanvas(e.width, e.height),
|
|
6674
6780
|
r = t.getContext("2d"),
|
|
6675
6781
|
n = document.createElement("img");
|
|
6676
6782
|
return n.addEventListener("load", function () {
|
|
6677
6783
|
r.drawImage(n, 0, 0);
|
|
6678
|
-
}), n.src = e, t;
|
|
6784
|
+
}), n.src = e.dataURL, "undefined" == typeof OffscreenCanvas ? t : t.transferToImageBitmap();
|
|
6679
6785
|
},
|
|
6680
6786
|
reviveAsync: function reviveAsync(t) {
|
|
6681
6787
|
var r = document.createElement("canvas"),
|
|
6682
6788
|
n = r.getContext("2d"),
|
|
6683
|
-
|
|
6684
|
-
return
|
|
6685
|
-
n.drawImage(
|
|
6686
|
-
}),
|
|
6687
|
-
var
|
|
6789
|
+
a = document.createElement("img");
|
|
6790
|
+
return a.addEventListener("load", function () {
|
|
6791
|
+
n.drawImage(a, 0, 0);
|
|
6792
|
+
}), a.src = t.dataURL, new e( /*#__PURE__*/function () {
|
|
6793
|
+
var _ref10 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(e, t) {
|
|
6688
6794
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
6689
6795
|
while (1) switch (_context2.prev = _context2.next) {
|
|
6690
6796
|
case 0:
|
|
@@ -6708,13 +6814,13 @@
|
|
|
6708
6814
|
}, _callee2, null, [[0, 8]]);
|
|
6709
6815
|
}));
|
|
6710
6816
|
return function (_x3, _x4) {
|
|
6711
|
-
return
|
|
6817
|
+
return _ref10.apply(this, arguments);
|
|
6712
6818
|
};
|
|
6713
6819
|
}());
|
|
6714
6820
|
}
|
|
6715
6821
|
}
|
|
6716
6822
|
},
|
|
6717
|
-
|
|
6823
|
+
k = {
|
|
6718
6824
|
imagedata: {
|
|
6719
6825
|
test: function test(e) {
|
|
6720
6826
|
return "ImageData" === toStringTag(e);
|
|
@@ -6731,56 +6837,20 @@
|
|
|
6731
6837
|
}
|
|
6732
6838
|
}
|
|
6733
6839
|
},
|
|
6734
|
-
|
|
6840
|
+
U = {
|
|
6735
6841
|
infinity: {
|
|
6736
6842
|
test: function test(e) {
|
|
6737
6843
|
return e === Number.POSITIVE_INFINITY;
|
|
6738
6844
|
},
|
|
6739
|
-
replace: function replace(
|
|
6845
|
+
replace: function replace() {
|
|
6740
6846
|
return "Infinity";
|
|
6741
6847
|
},
|
|
6742
|
-
revive: function revive(
|
|
6848
|
+
revive: function revive() {
|
|
6743
6849
|
return Number.POSITIVE_INFINITY;
|
|
6744
6850
|
}
|
|
6745
6851
|
}
|
|
6746
6852
|
},
|
|
6747
|
-
|
|
6748
|
-
test: function test(e) {
|
|
6749
|
-
return hasConstructorOf(e, Intl.Collator);
|
|
6750
|
-
},
|
|
6751
|
-
replace: function replace(e) {
|
|
6752
|
-
return e.resolvedOptions();
|
|
6753
|
-
},
|
|
6754
|
-
revive: function revive(e) {
|
|
6755
|
-
return new Intl.Collator(e.locale, e);
|
|
6756
|
-
}
|
|
6757
|
-
},
|
|
6758
|
-
x = {
|
|
6759
|
-
IntlCollator: C,
|
|
6760
|
-
IntlDateTimeFormat: {
|
|
6761
|
-
test: function test(e) {
|
|
6762
|
-
return hasConstructorOf(e, Intl.DateTimeFormat);
|
|
6763
|
-
},
|
|
6764
|
-
replace: function replace(e) {
|
|
6765
|
-
return e.resolvedOptions();
|
|
6766
|
-
},
|
|
6767
|
-
revive: function revive(e) {
|
|
6768
|
-
return new Intl.DateTimeFormat(e.locale, e);
|
|
6769
|
-
}
|
|
6770
|
-
},
|
|
6771
|
-
IntlNumberFormat: {
|
|
6772
|
-
test: function test(e) {
|
|
6773
|
-
return hasConstructorOf(e, Intl.NumberFormat);
|
|
6774
|
-
},
|
|
6775
|
-
replace: function replace(e) {
|
|
6776
|
-
return e.resolvedOptions();
|
|
6777
|
-
},
|
|
6778
|
-
revive: function revive(e) {
|
|
6779
|
-
return new Intl.NumberFormat(e.locale, e);
|
|
6780
|
-
}
|
|
6781
|
-
}
|
|
6782
|
-
},
|
|
6783
|
-
k = {
|
|
6853
|
+
D = {
|
|
6784
6854
|
map: {
|
|
6785
6855
|
test: function test(e) {
|
|
6786
6856
|
return "Map" === toStringTag(e);
|
|
@@ -6793,46 +6863,46 @@
|
|
|
6793
6863
|
}
|
|
6794
6864
|
}
|
|
6795
6865
|
},
|
|
6796
|
-
|
|
6866
|
+
K = {
|
|
6797
6867
|
nan: {
|
|
6798
6868
|
test: function test(e) {
|
|
6799
6869
|
return Number.isNaN(e);
|
|
6800
6870
|
},
|
|
6801
|
-
replace: function replace(
|
|
6871
|
+
replace: function replace() {
|
|
6802
6872
|
return "NaN";
|
|
6803
6873
|
},
|
|
6804
|
-
revive: function revive(
|
|
6874
|
+
revive: function revive() {
|
|
6805
6875
|
return Number.NaN;
|
|
6806
6876
|
}
|
|
6807
6877
|
}
|
|
6808
6878
|
},
|
|
6809
|
-
|
|
6879
|
+
F = {
|
|
6810
6880
|
negativeInfinity: {
|
|
6811
6881
|
test: function test(e) {
|
|
6812
6882
|
return e === Number.NEGATIVE_INFINITY;
|
|
6813
6883
|
},
|
|
6814
|
-
replace: function replace(
|
|
6884
|
+
replace: function replace() {
|
|
6815
6885
|
return "-Infinity";
|
|
6816
6886
|
},
|
|
6817
|
-
revive: function revive(
|
|
6887
|
+
revive: function revive() {
|
|
6818
6888
|
return Number.NEGATIVE_INFINITY;
|
|
6819
6889
|
}
|
|
6820
6890
|
}
|
|
6821
6891
|
},
|
|
6822
|
-
|
|
6892
|
+
$ = {
|
|
6823
6893
|
negativeZero: {
|
|
6824
6894
|
test: function test(e) {
|
|
6825
6895
|
return Object.is(e, -0);
|
|
6826
6896
|
},
|
|
6827
|
-
replace: function replace(
|
|
6897
|
+
replace: function replace() {
|
|
6828
6898
|
return 0;
|
|
6829
6899
|
},
|
|
6830
|
-
revive: function revive(
|
|
6900
|
+
revive: function revive() {
|
|
6831
6901
|
return -0;
|
|
6832
6902
|
}
|
|
6833
6903
|
}
|
|
6834
6904
|
},
|
|
6835
|
-
|
|
6905
|
+
V = {
|
|
6836
6906
|
StringObject: {
|
|
6837
6907
|
test: function test(e) {
|
|
6838
6908
|
return "String" === toStringTag(e) && "object" == _typeof$2(e);
|
|
@@ -6861,7 +6931,7 @@
|
|
|
6861
6931
|
}
|
|
6862
6932
|
}
|
|
6863
6933
|
},
|
|
6864
|
-
|
|
6934
|
+
q = {
|
|
6865
6935
|
regexp: {
|
|
6866
6936
|
test: function test(e) {
|
|
6867
6937
|
return "RegExp" === toStringTag(e);
|
|
@@ -6872,14 +6942,14 @@
|
|
|
6872
6942
|
flags: (e.global ? "g" : "") + (e.ignoreCase ? "i" : "") + (e.multiline ? "m" : "") + (e.sticky ? "y" : "") + (e.unicode ? "u" : "")
|
|
6873
6943
|
};
|
|
6874
6944
|
},
|
|
6875
|
-
revive: function revive(
|
|
6876
|
-
var e =
|
|
6877
|
-
t =
|
|
6945
|
+
revive: function revive(_ref11) {
|
|
6946
|
+
var e = _ref11.source,
|
|
6947
|
+
t = _ref11.flags;
|
|
6878
6948
|
return new RegExp(e, t);
|
|
6879
6949
|
}
|
|
6880
6950
|
}
|
|
6881
6951
|
},
|
|
6882
|
-
|
|
6952
|
+
G = {
|
|
6883
6953
|
set: {
|
|
6884
6954
|
test: function test(e) {
|
|
6885
6955
|
return "Set" === toStringTag(e);
|
|
@@ -6892,11 +6962,11 @@
|
|
|
6892
6962
|
}
|
|
6893
6963
|
}
|
|
6894
6964
|
},
|
|
6895
|
-
|
|
6965
|
+
H = {};
|
|
6896
6966
|
"function" == typeof Int8Array && [Int8Array, Uint8Array, Uint8ClampedArray, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array].concat(_toConsumableArray("function" == typeof BigInt64Array ? [BigInt64Array, BigUint64Array] : [])).forEach(function (e) {
|
|
6897
6967
|
return function create$1(e) {
|
|
6898
6968
|
var t = e.name;
|
|
6899
|
-
|
|
6969
|
+
H[t.toLowerCase()] = {
|
|
6900
6970
|
test: function test(e) {
|
|
6901
6971
|
return toStringTag(e) === t;
|
|
6902
6972
|
},
|
|
@@ -6909,25 +6979,26 @@
|
|
|
6909
6979
|
};
|
|
6910
6980
|
}(e);
|
|
6911
6981
|
});
|
|
6912
|
-
var
|
|
6982
|
+
var z = {};
|
|
6913
6983
|
"function" == typeof Int8Array && [Int8Array, Uint8Array, Uint8ClampedArray, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array].concat(_toConsumableArray("function" == typeof BigInt64Array ? [BigInt64Array, BigUint64Array] : [])).forEach(function (e) {
|
|
6914
6984
|
return function create(e) {
|
|
6915
6985
|
var t = e.name;
|
|
6916
|
-
|
|
6986
|
+
z[t.toLowerCase()] = {
|
|
6917
6987
|
test: function test(e) {
|
|
6918
6988
|
return toStringTag(e) === t;
|
|
6919
6989
|
},
|
|
6920
|
-
replace: function replace(
|
|
6921
|
-
var e =
|
|
6922
|
-
t =
|
|
6923
|
-
r =
|
|
6990
|
+
replace: function replace(_ref12, n) {
|
|
6991
|
+
var e = _ref12.buffer,
|
|
6992
|
+
t = _ref12.byteOffset,
|
|
6993
|
+
r = _ref12.length;
|
|
6924
6994
|
n.buffers || (n.buffers = []);
|
|
6925
|
-
var
|
|
6926
|
-
return
|
|
6927
|
-
index:
|
|
6995
|
+
var a = n.buffers.indexOf(e);
|
|
6996
|
+
return a > -1 ? {
|
|
6997
|
+
index: a,
|
|
6928
6998
|
byteOffset: t,
|
|
6929
6999
|
length: r
|
|
6930
7000
|
} : (n.buffers.push(e), {
|
|
7001
|
+
maxByteLength: e.maxByteLength,
|
|
6931
7002
|
encoded: p(e),
|
|
6932
7003
|
byteOffset: t,
|
|
6933
7004
|
length: r
|
|
@@ -6936,31 +7007,34 @@
|
|
|
6936
7007
|
revive: function revive(t, r) {
|
|
6937
7008
|
r.buffers || (r.buffers = []);
|
|
6938
7009
|
var n = t.byteOffset,
|
|
6939
|
-
|
|
6940
|
-
|
|
6941
|
-
i = t.index
|
|
6942
|
-
|
|
6943
|
-
|
|
7010
|
+
a = t.length,
|
|
7011
|
+
o = t.encoded,
|
|
7012
|
+
i = t.index,
|
|
7013
|
+
c = t.maxByteLength;
|
|
7014
|
+
var s;
|
|
7015
|
+
return "index" in t ? s = r.buffers[i] : (s = d(o, void 0 === c ? void 0 : {
|
|
7016
|
+
maxByteLength: c
|
|
7017
|
+
}), r.buffers.push(s)), new e(s, n, a);
|
|
6944
7018
|
}
|
|
6945
7019
|
};
|
|
6946
7020
|
}(e);
|
|
6947
7021
|
});
|
|
6948
|
-
var
|
|
7022
|
+
var Q = {
|
|
6949
7023
|
undef: {
|
|
6950
7024
|
test: function test(e, t) {
|
|
6951
7025
|
return void 0 === e && (t.ownKeys || !("ownKeys" in t));
|
|
6952
7026
|
},
|
|
6953
|
-
replace: function replace(
|
|
7027
|
+
replace: function replace() {
|
|
6954
7028
|
return 0;
|
|
6955
7029
|
},
|
|
6956
|
-
revive: function revive(
|
|
7030
|
+
revive: function revive() {
|
|
6957
7031
|
return new s();
|
|
6958
7032
|
}
|
|
6959
7033
|
}
|
|
6960
7034
|
},
|
|
6961
|
-
|
|
7035
|
+
X = {
|
|
6962
7036
|
userObject: {
|
|
6963
|
-
test: function test(e
|
|
7037
|
+
test: function test(e) {
|
|
6964
7038
|
return isUserObject(e);
|
|
6965
7039
|
},
|
|
6966
7040
|
replace: function replace(e) {
|
|
@@ -6971,7 +7045,7 @@
|
|
|
6971
7045
|
}
|
|
6972
7046
|
}
|
|
6973
7047
|
},
|
|
6974
|
-
|
|
7048
|
+
Z = [{
|
|
6975
7049
|
arrayNonindexKeys: {
|
|
6976
7050
|
testPlainObjects: !0,
|
|
6977
7051
|
test: function test(e, t) {
|
|
@@ -6985,10 +7059,10 @@
|
|
|
6985
7059
|
revive: function revive(e) {
|
|
6986
7060
|
if (Array.isArray(e)) return e;
|
|
6987
7061
|
var t = [];
|
|
6988
|
-
return Object.entries(e).forEach(function (
|
|
6989
|
-
var
|
|
6990
|
-
e =
|
|
6991
|
-
r =
|
|
7062
|
+
return Object.entries(e).forEach(function (_ref13) {
|
|
7063
|
+
var _ref14 = _slicedToArray$1(_ref13, 2),
|
|
7064
|
+
e = _ref14[0],
|
|
7065
|
+
r = _ref14[1];
|
|
6992
7066
|
t[e] = r;
|
|
6993
7067
|
}), t;
|
|
6994
7068
|
}
|
|
@@ -6998,19 +7072,19 @@
|
|
|
6998
7072
|
test: function test(e, t) {
|
|
6999
7073
|
return void 0 === e && !1 === t.ownKeys;
|
|
7000
7074
|
},
|
|
7001
|
-
replace: function replace(
|
|
7075
|
+
replace: function replace() {
|
|
7002
7076
|
return 0;
|
|
7003
7077
|
},
|
|
7004
|
-
revive: function revive(
|
|
7078
|
+
revive: function revive() {}
|
|
7005
7079
|
}
|
|
7006
7080
|
}],
|
|
7007
|
-
|
|
7008
|
-
|
|
7009
|
-
|
|
7081
|
+
ee = [K, U, F, $],
|
|
7082
|
+
oe = [X, Q, Z, V, ee, A, q, k, B, E, C, h, P, x].concat("function" == typeof Map ? D : [], "function" == typeof Set ? G : [], "function" == typeof ArrayBuffer ? v : [], "function" == typeof Uint8Array ? z : [], "function" == typeof DataView ? _ : [], "undefined" != typeof crypto ? w : [], "undefined" != typeof BigInt ? [b, m] : [], "undefined" != typeof DOMException ? S : [], "undefined" != typeof DOMRect ? N : [], "undefined" != typeof DOMPoint ? T : [], "undefined" != typeof DOMQuad ? I : [], "undefined" != typeof DOMMatrix ? j : []),
|
|
7083
|
+
ie = oe.concat({
|
|
7010
7084
|
checkDataCloneException: {
|
|
7011
7085
|
test: function test(e) {
|
|
7012
7086
|
var t = {}.toString.call(e).slice(8, -1);
|
|
7013
|
-
if (["symbol", "function"].includes(_typeof$2(e)) || ["Arguments", "Module", "
|
|
7087
|
+
if (["symbol", "function"].includes(_typeof$2(e)) || ["Arguments", "Module", "Promise", "WeakMap", "WeakSet", "Event", "MessageChannel"].includes(t) || e && "object" == _typeof$2(e) && "number" == typeof e.nodeType && "function" == typeof e.insertBefore) throw new DOMException("The object cannot be cloned.", "DataCloneError");
|
|
7014
7088
|
return !1;
|
|
7015
7089
|
}
|
|
7016
7090
|
}
|
|
@@ -7018,7 +7092,7 @@
|
|
|
7018
7092
|
|
|
7019
7093
|
// See: http://stackoverflow.com/questions/42170826/categories-for-rejection-by-the-structured-cloning-algorithm
|
|
7020
7094
|
|
|
7021
|
-
var typeson = new c().register(
|
|
7095
|
+
var typeson = new c().register(ie);
|
|
7022
7096
|
|
|
7023
7097
|
/**
|
|
7024
7098
|
* @param {(preset: import('typeson-registry').Preset) =>
|
|
@@ -7026,7 +7100,7 @@
|
|
|
7026
7100
|
* @returns {void}
|
|
7027
7101
|
*/
|
|
7028
7102
|
function register(func) {
|
|
7029
|
-
typeson = new c().register(func(
|
|
7103
|
+
typeson = new c().register(func(ie));
|
|
7030
7104
|
}
|
|
7031
7105
|
|
|
7032
7106
|
/**
|
|
@@ -7175,7 +7249,7 @@
|
|
|
7175
7249
|
* @returns {string}
|
|
7176
7250
|
*/
|
|
7177
7251
|
get: function get() {
|
|
7178
|
-
return '__pendingName' in me ? /** @type {string} */me.__pendingName : me.name;
|
|
7252
|
+
return '__pendingName' in me ? ( /** @type {string} */me.__pendingName) : me.name;
|
|
7179
7253
|
}
|
|
7180
7254
|
});
|
|
7181
7255
|
Object.defineProperty(me, 'name', {
|
|
@@ -7323,7 +7397,9 @@
|
|
|
7323
7397
|
IDBIndex.__updateIndexList(store, tx, function () {
|
|
7324
7398
|
// Add index entries for all existing records
|
|
7325
7399
|
tx.executeSql('SELECT "key", "value" FROM ' + escapeStoreNameForSQL(storeName), [], function (tx, data) {
|
|
7326
|
-
CFG.DEBUG
|
|
7400
|
+
if (CFG.DEBUG) {
|
|
7401
|
+
console.log('Adding existing ' + storeName + ' records to the ' + indexName + ' index');
|
|
7402
|
+
}
|
|
7327
7403
|
addIndexEntry(0);
|
|
7328
7404
|
|
|
7329
7405
|
/**
|
|
@@ -7349,7 +7425,7 @@
|
|
|
7349
7425
|
}
|
|
7350
7426
|
indexValues[indexKeyStr] = true;
|
|
7351
7427
|
}
|
|
7352
|
-
tx.executeSql('UPDATE ' + escapeStoreNameForSQL(storeName) + ' SET ' + escapeIndexNameForSQL(indexName) + ' = ? WHERE "key" = ?', [escapeSQLiteStatement(indexKeyStr), data.rows.item(i).key], function (
|
|
7428
|
+
tx.executeSql('UPDATE ' + escapeStoreNameForSQL(storeName) + ' SET ' + escapeIndexNameForSQL(indexName) + ' = ? WHERE "key" = ?', [escapeSQLiteStatement(indexKeyStr), data.rows.item(i).key], function () {
|
|
7353
7429
|
addIndexEntry(i + 1);
|
|
7354
7430
|
}, /** @type {SQLStatementErrorCallback} */error);
|
|
7355
7431
|
} catch (e) {
|
|
@@ -7398,7 +7474,9 @@
|
|
|
7398
7474
|
} else {
|
|
7399
7475
|
// For a new index, add a new column to the object store, then apply the index
|
|
7400
7476
|
var sql = ['ALTER TABLE', escapedStoreNameSQL, 'ADD', escapedIndexNameSQL, 'BLOB'].join(' ');
|
|
7401
|
-
CFG.DEBUG
|
|
7477
|
+
if (CFG.DEBUG) {
|
|
7478
|
+
console.log(sql);
|
|
7479
|
+
}
|
|
7402
7480
|
tx.executeSql(sql, [], addIndexSQL, /** @type {SQLStatementErrorCallback} */error);
|
|
7403
7481
|
}
|
|
7404
7482
|
});
|
|
@@ -7486,7 +7564,9 @@
|
|
|
7486
7564
|
deleted: Boolean(idx.__deleted)
|
|
7487
7565
|
};
|
|
7488
7566
|
}
|
|
7489
|
-
CFG.DEBUG
|
|
7567
|
+
if (CFG.DEBUG) {
|
|
7568
|
+
console.log('Updating the index list for ' + store.__currentName, indexList);
|
|
7569
|
+
}
|
|
7490
7570
|
tx.executeSql('UPDATE __sys__ SET "indexList" = ? WHERE "name" = ?', [JSON.stringify(indexList), escapeSQLiteStatement(store.__currentName)], function () {
|
|
7491
7571
|
success(store);
|
|
7492
7572
|
}, /** @type {SQLStatementErrorCallback} */failure);
|
|
@@ -7520,13 +7600,12 @@
|
|
|
7520
7600
|
throw createDOMException('DataError', 'No key or range was specified');
|
|
7521
7601
|
}
|
|
7522
7602
|
var fetchArgs = buildFetchIndexDataSQL(nullDisallowed, me, range, opType, false);
|
|
7523
|
-
return
|
|
7524
|
-
|
|
7525
|
-
|
|
7526
|
-
|
|
7527
|
-
|
|
7528
|
-
|
|
7529
|
-
);
|
|
7603
|
+
return /** @type {import('./IDBTransaction.js').IDBTransactionFull} */me.objectStore.transaction.__addToTransactionQueue(function () {
|
|
7604
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
7605
|
+
args[_key] = arguments[_key];
|
|
7606
|
+
}
|
|
7607
|
+
executeFetchIndexData.apply(void 0, [count].concat(_toConsumableArray(fetchArgs), args));
|
|
7608
|
+
}, undefined, me);
|
|
7530
7609
|
};
|
|
7531
7610
|
|
|
7532
7611
|
/**
|
|
@@ -7697,17 +7776,25 @@
|
|
|
7697
7776
|
// We don't query for indexes as we already have the info
|
|
7698
7777
|
// This approach has the advantage of auto-deleting indexes via the DROP TABLE
|
|
7699
7778
|
var sql = 'CREATE TABLE ' + escapedTmpStoreNameSQL + '(' + listColInfoToPreserve + escapedNewIndexNameSQL + ' ' + newNameType + ')';
|
|
7700
|
-
CFG.DEBUG
|
|
7779
|
+
if (CFG.DEBUG) {
|
|
7780
|
+
console.log(sql);
|
|
7781
|
+
}
|
|
7701
7782
|
tx.executeSql(sql, [], function () {
|
|
7702
7783
|
var sql = 'INSERT INTO ' + escapedTmpStoreNameSQL + '(' + listColsToPreserve + escapedNewIndexNameSQL + ') SELECT ' + listColsToPreserve + escapeIndexNameForSQL(oldName) + ' FROM ' + escapedStoreNameSQL;
|
|
7703
|
-
CFG.DEBUG
|
|
7784
|
+
if (CFG.DEBUG) {
|
|
7785
|
+
console.log(sql);
|
|
7786
|
+
}
|
|
7704
7787
|
tx.executeSql(sql, [], function () {
|
|
7705
7788
|
var sql = 'DROP TABLE ' + escapedStoreNameSQL;
|
|
7706
|
-
CFG.DEBUG
|
|
7789
|
+
if (CFG.DEBUG) {
|
|
7790
|
+
console.log(sql);
|
|
7791
|
+
}
|
|
7707
7792
|
tx.executeSql(sql, [], function () {
|
|
7708
7793
|
var sql = 'ALTER TABLE ' + escapedTmpStoreNameSQL + ' RENAME TO ' + escapedStoreNameSQL;
|
|
7709
|
-
CFG.DEBUG
|
|
7710
|
-
|
|
7794
|
+
if (CFG.DEBUG) {
|
|
7795
|
+
console.log(sql);
|
|
7796
|
+
}
|
|
7797
|
+
tx.executeSql(sql, [], function (tx) {
|
|
7711
7798
|
if (!CFG.useSQLiteIndexes) {
|
|
7712
7799
|
finish();
|
|
7713
7800
|
return;
|
|
@@ -7717,40 +7804,39 @@
|
|
|
7717
7804
|
return new SyncPromise(function (resolve, reject) {
|
|
7718
7805
|
var escapedIndexToRecreate = sqlQuote(escapedStoreNameSQL.slice(1, -1) + '^5' + escapedIndexNameSQL.slice(1, -1));
|
|
7719
7806
|
// const sql = 'DROP INDEX IF EXISTS ' + escapedIndexToRecreate;
|
|
7720
|
-
// CFG.DEBUG
|
|
7807
|
+
// if (CFG.DEBUG) { console.log(sql); }
|
|
7721
7808
|
// tx.executeSql(sql, [], function () {
|
|
7722
7809
|
var sql = 'CREATE INDEX ' + escapedIndexToRecreate + ' ON ' + escapedStoreNameSQL + '(' + escapedIndexNameSQL + ')';
|
|
7723
|
-
CFG.DEBUG
|
|
7724
|
-
|
|
7725
|
-
|
|
7810
|
+
if (CFG.DEBUG) {
|
|
7811
|
+
console.log(sql);
|
|
7812
|
+
}
|
|
7813
|
+
tx.executeSql(sql, [], resolve, /** @type {SQLStatementErrorCallback} */
|
|
7726
7814
|
function (tx, err) {
|
|
7727
7815
|
reject(err);
|
|
7728
|
-
}
|
|
7729
|
-
/* eslint-enable no-extra-parens -- TS */);
|
|
7816
|
+
});
|
|
7730
7817
|
// }, function (tx, err) {
|
|
7731
7818
|
// reject(err);
|
|
7732
7819
|
// });
|
|
7733
7820
|
});
|
|
7734
7821
|
});
|
|
7735
|
-
|
|
7736
7822
|
indexCreations.push(new SyncPromise(function (resolve, reject) {
|
|
7737
7823
|
var escapedIndexToRecreate = sqlQuote('sk_' + escapedStoreNameSQL.slice(1, -1));
|
|
7738
7824
|
// Chrome erring here if not dropped first; Node does not
|
|
7739
7825
|
var sql = 'DROP INDEX IF EXISTS ' + escapedIndexToRecreate;
|
|
7740
|
-
CFG.DEBUG
|
|
7826
|
+
if (CFG.DEBUG) {
|
|
7827
|
+
console.log(sql);
|
|
7828
|
+
}
|
|
7741
7829
|
tx.executeSql(sql, [], function () {
|
|
7742
7830
|
var sql = 'CREATE INDEX ' + escapedIndexToRecreate + ' ON ' + escapedStoreNameSQL + '("key")';
|
|
7743
|
-
CFG.DEBUG
|
|
7744
|
-
|
|
7745
|
-
|
|
7831
|
+
if (CFG.DEBUG) {
|
|
7832
|
+
console.log(sql);
|
|
7833
|
+
}
|
|
7834
|
+
tx.executeSql(sql, [], resolve, /** @type {SQLStatementErrorCallback} */
|
|
7746
7835
|
function (tx, err) {
|
|
7747
|
-
/* eslint-enable no-extra-parens -- TS */
|
|
7748
7836
|
reject(err);
|
|
7749
7837
|
});
|
|
7750
|
-
},
|
|
7751
|
-
/** @type {SQLStatementErrorCallback} */
|
|
7838
|
+
}, /** @type {SQLStatementErrorCallback} */
|
|
7752
7839
|
function (tx, err) {
|
|
7753
|
-
/* eslint-enable no-extra-parens -- TS */
|
|
7754
7840
|
reject(err);
|
|
7755
7841
|
});
|
|
7756
7842
|
}));
|
|
@@ -7810,12 +7896,14 @@
|
|
|
7810
7896
|
sql.push('LIMIT', String(count));
|
|
7811
7897
|
}
|
|
7812
7898
|
var isCount = opType === 'count';
|
|
7813
|
-
CFG.DEBUG
|
|
7899
|
+
if (CFG.DEBUG) {
|
|
7900
|
+
console.log('Trying to fetch data for Index', sql.join(' '), sqlValues);
|
|
7901
|
+
}
|
|
7814
7902
|
tx.executeSql(sql.join(' '), sqlValues, function (tx, data) {
|
|
7815
7903
|
var records = [];
|
|
7816
7904
|
var recordCount = 0;
|
|
7817
7905
|
var decode$1 = isCount ? function () {/* */} : opType === 'key'
|
|
7818
|
-
// eslint-disable-next-line operator-linebreak -- JSDoc
|
|
7906
|
+
// eslint-disable-next-line @stylistic/operator-linebreak -- JSDoc
|
|
7819
7907
|
?
|
|
7820
7908
|
/**
|
|
7821
7909
|
* @param {{
|
|
@@ -7827,7 +7915,7 @@
|
|
|
7827
7915
|
// Key.convertValueToKey(record.key); // Already validated before storage
|
|
7828
7916
|
return _decode(unescapeSQLiteResponse(record.key));
|
|
7829
7917
|
}
|
|
7830
|
-
// eslint-disable-next-line operator-linebreak -- JSDoc
|
|
7918
|
+
// eslint-disable-next-line @stylistic/operator-linebreak -- JSDoc
|
|
7831
7919
|
:
|
|
7832
7920
|
/**
|
|
7833
7921
|
* @param {{
|
|
@@ -7869,13 +7957,12 @@
|
|
|
7869
7957
|
if (record) {
|
|
7870
7958
|
records.push(decode$1(record));
|
|
7871
7959
|
if (unboundedDisallowed) {
|
|
7872
|
-
return
|
|
7960
|
+
return 1; // break
|
|
7873
7961
|
}
|
|
7874
7962
|
}
|
|
7875
7963
|
};
|
|
7876
7964
|
for (var i = 0; i < data.rows.length; i++) {
|
|
7877
|
-
|
|
7878
|
-
if (_ret === "break") break;
|
|
7965
|
+
if (_loop()) break;
|
|
7879
7966
|
}
|
|
7880
7967
|
} else {
|
|
7881
7968
|
for (var _i = 0; _i < data.rows.length; _i++) {
|
|
@@ -7925,7 +8012,9 @@
|
|
|
7925
8012
|
sql.push('AND (');
|
|
7926
8013
|
/** @type {import('./Key.js').KeyPathArray} */
|
|
7927
8014
|
range.forEach(function (innerKey, i) {
|
|
7928
|
-
if (i > 0)
|
|
8015
|
+
if (i > 0) {
|
|
8016
|
+
sql.push('OR');
|
|
8017
|
+
}
|
|
7929
8018
|
sql.push(escapeIndexNameForSQL(index.name), "LIKE ? ESCAPE '^' ");
|
|
7930
8019
|
sqlValues.push('%' + sqlLIKEEscape( /** @type {string} */_encode(innerKey, index.multiEntry)) + '%');
|
|
7931
8020
|
});
|
|
@@ -8073,20 +8162,24 @@
|
|
|
8073
8162
|
me.__pendingName = oldName;
|
|
8074
8163
|
var sql = 'UPDATE __sys__ SET "name" = ? WHERE "name" = ?';
|
|
8075
8164
|
var sqlValues = [escapeSQLiteStatement(name), escapeSQLiteStatement(oldName)];
|
|
8076
|
-
CFG.DEBUG
|
|
8165
|
+
if (CFG.DEBUG) {
|
|
8166
|
+
console.log(sql, sqlValues);
|
|
8167
|
+
}
|
|
8077
8168
|
/** @type {import('./IDBTransaction.js').IDBTransactionFull} */
|
|
8078
8169
|
me.transaction.__addNonRequestToTransactionQueue(function objectStoreClear(tx, args, success, error) {
|
|
8079
|
-
tx.executeSql(sql, sqlValues, function (tx
|
|
8170
|
+
tx.executeSql(sql, sqlValues, function (tx) {
|
|
8080
8171
|
// This SQL preserves indexes per https://www.sqlite.org/lang_altertable.html
|
|
8081
8172
|
var sql = 'ALTER TABLE ' + escapeStoreNameForSQL(oldName) + ' RENAME TO ' + escapeStoreNameForSQL(name);
|
|
8082
|
-
CFG.DEBUG
|
|
8083
|
-
|
|
8173
|
+
if (CFG.DEBUG) {
|
|
8174
|
+
console.log(sql);
|
|
8175
|
+
}
|
|
8176
|
+
tx.executeSql(sql, [], function () {
|
|
8084
8177
|
delete me.__pendingName;
|
|
8085
8178
|
success();
|
|
8086
8179
|
});
|
|
8087
8180
|
}, function (tx, err) {
|
|
8088
8181
|
error(err);
|
|
8089
|
-
return
|
|
8182
|
+
return false;
|
|
8090
8183
|
});
|
|
8091
8184
|
});
|
|
8092
8185
|
}
|
|
@@ -8165,15 +8258,19 @@
|
|
|
8165
8258
|
* @returns {boolean}
|
|
8166
8259
|
*/
|
|
8167
8260
|
function error(tx, err) {
|
|
8168
|
-
CFG.DEBUG
|
|
8261
|
+
if (CFG.DEBUG) {
|
|
8262
|
+
console.log(err);
|
|
8263
|
+
}
|
|
8169
8264
|
failure(createDOMException('UnknownError', 'Could not create object store "' + storeName + '"', err));
|
|
8170
|
-
return
|
|
8265
|
+
return false;
|
|
8171
8266
|
}
|
|
8172
8267
|
var escapedStoreNameSQL = escapeStoreNameForSQL(storeName);
|
|
8173
8268
|
// key INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL UNIQUE
|
|
8174
8269
|
var sql = ['CREATE TABLE', escapedStoreNameSQL, '(key BLOB', store.autoIncrement ? 'UNIQUE, inc INTEGER PRIMARY KEY AUTOINCREMENT' : 'PRIMARY KEY', ', value BLOB)'].join(' ');
|
|
8175
|
-
CFG.DEBUG
|
|
8176
|
-
|
|
8270
|
+
if (CFG.DEBUG) {
|
|
8271
|
+
console.log(sql);
|
|
8272
|
+
}
|
|
8273
|
+
tx.executeSql(sql, [], function (tx) {
|
|
8177
8274
|
/**
|
|
8178
8275
|
* @returns {void}
|
|
8179
8276
|
*/
|
|
@@ -8227,9 +8324,11 @@
|
|
|
8227
8324
|
* @returns {boolean}
|
|
8228
8325
|
*/
|
|
8229
8326
|
function error(tx, err) {
|
|
8230
|
-
CFG.DEBUG
|
|
8327
|
+
if (CFG.DEBUG) {
|
|
8328
|
+
console.log(err);
|
|
8329
|
+
}
|
|
8231
8330
|
failure(createDOMException('UnknownError', 'Could not delete ObjectStore', err));
|
|
8232
|
-
return
|
|
8331
|
+
return false;
|
|
8233
8332
|
}
|
|
8234
8333
|
tx.executeSql('SELECT "name" FROM __sys__ WHERE "name" = ?', [escapeSQLiteStatement(store.__currentName)], function (tx, data) {
|
|
8235
8334
|
if (data.rows.length > 0) {
|
|
@@ -8346,6 +8445,7 @@
|
|
|
8346
8445
|
if (me.autoIncrement) {
|
|
8347
8446
|
// If auto-increment and no valid primaryKey found on the keyPath, get and set the new value, and use
|
|
8348
8447
|
if (key === undefined) {
|
|
8448
|
+
// @ts-expect-error Due to re-exporting `Key.d.ts` file (needed for `node_modules` imports)
|
|
8349
8449
|
generateKeyForStore(tx, me, function (failure, key, oldCn) {
|
|
8350
8450
|
if (failure) {
|
|
8351
8451
|
failCb(createDOMException('ConstraintError', 'The key generator\'s current number has reached the maximum safe integer limit'));
|
|
@@ -8359,6 +8459,7 @@
|
|
|
8359
8459
|
success(key, oldCn);
|
|
8360
8460
|
}, failCb);
|
|
8361
8461
|
} else {
|
|
8462
|
+
// @ts-expect-error Due to re-exporting `Key.d.ts` file (needed for `node_modules` imports)
|
|
8362
8463
|
possiblyUpdateKeyGenerator(tx, me, key, keyCloneThenSuccess, failCb);
|
|
8363
8464
|
}
|
|
8364
8465
|
// Not auto-increment
|
|
@@ -8481,13 +8582,15 @@
|
|
|
8481
8582
|
sqlEnd.push('?)');
|
|
8482
8583
|
insertSqlValues.push(escapeSQLiteStatement(encoded));
|
|
8483
8584
|
var insertSql = sqlStart.join(' ') + sqlEnd.join(' ');
|
|
8484
|
-
CFG.DEBUG
|
|
8485
|
-
|
|
8585
|
+
if (CFG.DEBUG) {
|
|
8586
|
+
console.log('SQL for adding', insertSql, insertSqlValues);
|
|
8587
|
+
}
|
|
8588
|
+
tx.executeSql(insertSql, insertSqlValues, function () {
|
|
8486
8589
|
success(clonedKeyOrCurrentNumber);
|
|
8487
8590
|
}, function (tx, err) {
|
|
8488
8591
|
// Should occur for `add` operation
|
|
8489
8592
|
error(createDOMException('ConstraintError', /** @type {string} */err.message, err));
|
|
8490
|
-
return
|
|
8593
|
+
return false;
|
|
8491
8594
|
});
|
|
8492
8595
|
return undefined;
|
|
8493
8596
|
})["catch"](function (err) {
|
|
@@ -8500,6 +8603,7 @@
|
|
|
8500
8603
|
error(err);
|
|
8501
8604
|
}
|
|
8502
8605
|
if (typeof oldCn === 'number') {
|
|
8606
|
+
// @ts-expect-error Due to re-exporting `Key.d.ts` file (needed for `node_modules` imports)
|
|
8503
8607
|
assignCurrentNumber(tx, me, oldCn, fail, fail);
|
|
8504
8608
|
return null;
|
|
8505
8609
|
}
|
|
@@ -8544,7 +8648,7 @@
|
|
|
8544
8648
|
* @this {IDBObjectStoreFull}
|
|
8545
8649
|
* @returns {import('./IDBRequest.js').IDBRequestFull}
|
|
8546
8650
|
*/
|
|
8547
|
-
IDBObjectStore.prototype.put = function (value
|
|
8651
|
+
IDBObjectStore.prototype.put = function (value /* , key */) {
|
|
8548
8652
|
var me = this;
|
|
8549
8653
|
// eslint-disable-next-line prefer-rest-params
|
|
8550
8654
|
var key = arguments[1];
|
|
@@ -8583,11 +8687,13 @@
|
|
|
8583
8687
|
var sql = 'DELETE FROM ' + escapeStoreNameForSQL(me.__currentName) + ' WHERE "key" = ?';
|
|
8584
8688
|
var encodedKey = /** @type {string} */_encode(key);
|
|
8585
8689
|
tx.executeSql(sql, [escapeSQLiteStatement(encodedKey)], function (tx, data) {
|
|
8586
|
-
CFG.DEBUG
|
|
8690
|
+
if (CFG.DEBUG) {
|
|
8691
|
+
console.log('Did the row with the', key, 'exist?', data.rowsAffected);
|
|
8692
|
+
}
|
|
8587
8693
|
cb(tx);
|
|
8588
8694
|
}, function (tx, err) {
|
|
8589
8695
|
error(err);
|
|
8590
|
-
return
|
|
8696
|
+
return false;
|
|
8591
8697
|
});
|
|
8592
8698
|
};
|
|
8593
8699
|
|
|
@@ -8666,46 +8772,51 @@
|
|
|
8666
8772
|
sql.push('LIMIT', String(count));
|
|
8667
8773
|
}
|
|
8668
8774
|
var sqlStr = sql.join(' ');
|
|
8669
|
-
return
|
|
8670
|
-
|
|
8671
|
-
|
|
8672
|
-
|
|
8673
|
-
|
|
8674
|
-
|
|
8675
|
-
|
|
8676
|
-
|
|
8677
|
-
|
|
8678
|
-
|
|
8679
|
-
|
|
8680
|
-
|
|
8681
|
-
|
|
8682
|
-
|
|
8683
|
-
}
|
|
8684
|
-
ret = [];
|
|
8685
|
-
if (getKey) {
|
|
8686
|
-
for (var i = 0; i < data.rows.length; i++) {
|
|
8687
|
-
// Key.convertValueToKey(data.rows.item(i).key); // Already validated before storage
|
|
8688
|
-
ret.push(_decode(unescapeSQLiteResponse(data.rows.item(i).key), false));
|
|
8689
|
-
}
|
|
8775
|
+
return /** @type {import('./IDBTransaction.js').IDBTransactionFull} */me.transaction.__addToTransactionQueue(function objectStoreGet(tx, args, success, error) {
|
|
8776
|
+
if (CFG.DEBUG) {
|
|
8777
|
+
console.log('Fetching', me.__currentName, sqlValues);
|
|
8778
|
+
}
|
|
8779
|
+
tx.executeSql(sqlStr, sqlValues, function (tx, data) {
|
|
8780
|
+
if (CFG.DEBUG) {
|
|
8781
|
+
console.log('Fetched data', data);
|
|
8782
|
+
}
|
|
8783
|
+
var ret;
|
|
8784
|
+
try {
|
|
8785
|
+
// Opera can't deal with the try-catch here.
|
|
8786
|
+
if (data.rows.length === 0) {
|
|
8787
|
+
if (getAll) {
|
|
8788
|
+
success([]);
|
|
8690
8789
|
} else {
|
|
8691
|
-
|
|
8692
|
-
ret.push(decode(unescapeSQLiteResponse(data.rows.item(_i).value)));
|
|
8693
|
-
}
|
|
8790
|
+
success();
|
|
8694
8791
|
}
|
|
8695
|
-
|
|
8696
|
-
|
|
8792
|
+
return;
|
|
8793
|
+
}
|
|
8794
|
+
ret = [];
|
|
8795
|
+
if (getKey) {
|
|
8796
|
+
for (var i = 0; i < data.rows.length; i++) {
|
|
8797
|
+
// Key.convertValueToKey(data.rows.item(i).key); // Already validated before storage
|
|
8798
|
+
ret.push(_decode(unescapeSQLiteResponse(data.rows.item(i).key), false));
|
|
8799
|
+
}
|
|
8800
|
+
} else {
|
|
8801
|
+
for (var _i = 0; _i < data.rows.length; _i++) {
|
|
8802
|
+
ret.push(decode(unescapeSQLiteResponse(data.rows.item(_i).value)));
|
|
8697
8803
|
}
|
|
8698
|
-
} catch (e) {
|
|
8699
|
-
// If no result is returned, or error occurs when parsing JSON
|
|
8700
|
-
CFG.DEBUG && console.log(e);
|
|
8701
8804
|
}
|
|
8702
|
-
|
|
8703
|
-
|
|
8704
|
-
|
|
8705
|
-
|
|
8706
|
-
|
|
8707
|
-
|
|
8708
|
-
|
|
8805
|
+
if (!getAll) {
|
|
8806
|
+
ret = ret[0];
|
|
8807
|
+
}
|
|
8808
|
+
} catch (e) {
|
|
8809
|
+
// If no result is returned, or error occurs when parsing JSON
|
|
8810
|
+
if (CFG.DEBUG) {
|
|
8811
|
+
console.log(e);
|
|
8812
|
+
}
|
|
8813
|
+
}
|
|
8814
|
+
success(ret);
|
|
8815
|
+
}, function (tx, err) {
|
|
8816
|
+
error(err);
|
|
8817
|
+
return false;
|
|
8818
|
+
});
|
|
8819
|
+
}, undefined, me);
|
|
8709
8820
|
};
|
|
8710
8821
|
|
|
8711
8822
|
/**
|
|
@@ -8786,21 +8897,23 @@
|
|
|
8786
8897
|
var sqlValues = [];
|
|
8787
8898
|
setSQLForKeyRange(range, sqlQuote('key'), sqlArr, sqlValues);
|
|
8788
8899
|
var sql = sqlArr.join(' ');
|
|
8789
|
-
return
|
|
8790
|
-
|
|
8791
|
-
|
|
8792
|
-
|
|
8793
|
-
|
|
8794
|
-
|
|
8795
|
-
|
|
8796
|
-
|
|
8797
|
-
|
|
8798
|
-
|
|
8799
|
-
error(err);
|
|
8800
|
-
return true;
|
|
8900
|
+
return /** @type {import('./IDBTransaction.js').IDBTransactionFull} */me.transaction.__addToTransactionQueue(function objectStoreDelete(tx, args, success, error) {
|
|
8901
|
+
if (CFG.DEBUG) {
|
|
8902
|
+
console.log('Deleting', me.__currentName, sqlValues);
|
|
8903
|
+
}
|
|
8904
|
+
tx.executeSql(sql, sqlValues, function (tx, data) {
|
|
8905
|
+
if (CFG.DEBUG) {
|
|
8906
|
+
console.log('Deleted from database', data.rowsAffected);
|
|
8907
|
+
}
|
|
8908
|
+
me.__cursors.forEach(function (cursor) {
|
|
8909
|
+
cursor.__invalidateCache(); // Delete
|
|
8801
8910
|
});
|
|
8802
|
-
|
|
8803
|
-
|
|
8911
|
+
success();
|
|
8912
|
+
}, function (tx, err) {
|
|
8913
|
+
error(err);
|
|
8914
|
+
return false;
|
|
8915
|
+
});
|
|
8916
|
+
}, undefined, me);
|
|
8804
8917
|
};
|
|
8805
8918
|
|
|
8806
8919
|
/**
|
|
@@ -8816,20 +8929,20 @@
|
|
|
8816
8929
|
IDBTransaction.__assertActive(me.transaction);
|
|
8817
8930
|
/** @type {import('./IDBTransaction.js').IDBTransactionFull} */
|
|
8818
8931
|
me.transaction.__assertWritable();
|
|
8819
|
-
return
|
|
8820
|
-
|
|
8821
|
-
|
|
8822
|
-
|
|
8823
|
-
|
|
8824
|
-
|
|
8825
|
-
|
|
8826
|
-
success();
|
|
8827
|
-
}, function (tx, err) {
|
|
8828
|
-
error(err);
|
|
8829
|
-
return true;
|
|
8932
|
+
return /** @type {import('./IDBTransaction.js').IDBTransactionFull} */me.transaction.__addToTransactionQueue(function objectStoreClear(tx, args, success, error) {
|
|
8933
|
+
tx.executeSql('DELETE FROM ' + escapeStoreNameForSQL(me.__currentName), [], function (tx, data) {
|
|
8934
|
+
if (CFG.DEBUG) {
|
|
8935
|
+
console.log('Cleared all records from database', data.rowsAffected);
|
|
8936
|
+
}
|
|
8937
|
+
me.__cursors.forEach(function (cursor) {
|
|
8938
|
+
cursor.__invalidateCache(); // Clear
|
|
8830
8939
|
});
|
|
8831
|
-
|
|
8832
|
-
|
|
8940
|
+
success();
|
|
8941
|
+
}, function (tx, err) {
|
|
8942
|
+
error(err);
|
|
8943
|
+
return false;
|
|
8944
|
+
});
|
|
8945
|
+
}, undefined, me);
|
|
8833
8946
|
};
|
|
8834
8947
|
|
|
8835
8948
|
/**
|
|
@@ -9292,7 +9405,6 @@
|
|
|
9292
9405
|
this.__setOptions({
|
|
9293
9406
|
legacyOutputDidListenersThrowFlag: true // Event hook for IndexedB
|
|
9294
9407
|
});
|
|
9295
|
-
|
|
9296
9408
|
this.__transactions = [];
|
|
9297
9409
|
|
|
9298
9410
|
/** @type {{[key: string]: IDBObjectStore}} */
|
|
@@ -9507,6 +9619,7 @@
|
|
|
9507
9619
|
me.close();
|
|
9508
9620
|
var ct = 0;
|
|
9509
9621
|
me.__transactions.forEach(function (trans) {
|
|
9622
|
+
// eslint-disable-next-line camelcase -- Clear API
|
|
9510
9623
|
trans.on__abort = function () {
|
|
9511
9624
|
ct++;
|
|
9512
9625
|
if (ct === me.__transactions.length) {
|
|
@@ -9818,14 +9931,14 @@
|
|
|
9818
9931
|
deleteTables(i + 1);
|
|
9819
9932
|
}, function () {
|
|
9820
9933
|
deleteTables(i + 1);
|
|
9821
|
-
return
|
|
9934
|
+
return false;
|
|
9822
9935
|
});
|
|
9823
9936
|
}
|
|
9824
9937
|
})(0);
|
|
9825
|
-
}, function (
|
|
9938
|
+
}, function () {
|
|
9826
9939
|
// __sys__ table does not exist, but that does not mean delete did not happen
|
|
9827
9940
|
databaseDeleted();
|
|
9828
|
-
return
|
|
9941
|
+
return false;
|
|
9829
9942
|
});
|
|
9830
9943
|
});
|
|
9831
9944
|
}
|
|
@@ -9851,7 +9964,9 @@
|
|
|
9851
9964
|
*/
|
|
9852
9965
|
function sysDbCreateError(tx, err) {
|
|
9853
9966
|
var er = webSQLErrback( /** @type {SQLError} */err || tx);
|
|
9854
|
-
CFG.DEBUG
|
|
9967
|
+
if (CFG.DEBUG) {
|
|
9968
|
+
console.log('Error in sysdb transaction - when creating dbVersions', err);
|
|
9969
|
+
}
|
|
9855
9970
|
failure(er);
|
|
9856
9971
|
}
|
|
9857
9972
|
if (sysdb) {
|
|
@@ -9966,9 +10081,9 @@
|
|
|
9966
10081
|
*/
|
|
9967
10082
|
function dbCreateError(tx, err) {
|
|
9968
10083
|
if (calledDbCreateError) {
|
|
9969
|
-
return
|
|
10084
|
+
return false;
|
|
9970
10085
|
}
|
|
9971
|
-
var er = err ? webSQLErrback(err) : /** @type {Error} */tx;
|
|
10086
|
+
var er = err ? webSQLErrback(err) : ( /** @type {Error} */tx);
|
|
9972
10087
|
calledDbCreateError = true;
|
|
9973
10088
|
// Re: why bubbling here (and how cancelable is only really relevant for `window.onerror`) see: https://github.com/w3c/IndexedDB/issues/86
|
|
9974
10089
|
var evt = createEvent('error', er, {
|
|
@@ -9979,7 +10094,7 @@
|
|
|
9979
10094
|
req.__error = er;
|
|
9980
10095
|
req.__result = undefined; // Must be undefined if an error per `result` getter
|
|
9981
10096
|
req.dispatchEvent(evt);
|
|
9982
|
-
return
|
|
10097
|
+
return false;
|
|
9983
10098
|
}
|
|
9984
10099
|
|
|
9985
10100
|
/**
|
|
@@ -10052,7 +10167,6 @@
|
|
|
10052
10167
|
// In browser, should auto-commit
|
|
10053
10168
|
cb(); // eslint-disable-line promise/no-callback-in-promise
|
|
10054
10169
|
};
|
|
10055
|
-
|
|
10056
10170
|
sysdb.transaction(function (systx) {
|
|
10057
10171
|
/**
|
|
10058
10172
|
* @returns {void}
|
|
@@ -10066,7 +10180,7 @@
|
|
|
10066
10180
|
req.__result = connection;
|
|
10067
10181
|
connection.__upgradeTransaction = req.__transaction = req.__result.__versionTransaction = IDBTransaction.__createInstance(req.__result, req.__result.objectStoreNames, 'versionchange');
|
|
10068
10182
|
req.__done = true;
|
|
10069
|
-
req.transaction.__addNonRequestToTransactionQueue(function onupgradeneeded(tx, args, finished, error) {
|
|
10183
|
+
req.transaction.__addNonRequestToTransactionQueue(function onupgradeneeded(tx, args, finished /* , error */) {
|
|
10070
10184
|
req.dispatchEvent(e);
|
|
10071
10185
|
if (e.__legacyOutputDidListenersThrowError) {
|
|
10072
10186
|
logError('Error', 'An error occurred in an upgradeneeded handler attached to request chain', /** @type {Error} */e.__legacyOutputDidListenersThrowError); // We do nothing else with this error as per spec
|
|
@@ -10075,6 +10189,8 @@
|
|
|
10075
10189
|
}
|
|
10076
10190
|
finished();
|
|
10077
10191
|
});
|
|
10192
|
+
|
|
10193
|
+
// eslint-disable-next-line camelcase -- Clear API
|
|
10078
10194
|
req.transaction.on__beforecomplete = function (ev) {
|
|
10079
10195
|
connection.__upgradeTransaction = null;
|
|
10080
10196
|
/** @type {import('./IDBDatabase.js').IDBDatabaseFull} */
|
|
@@ -10084,9 +10200,11 @@
|
|
|
10084
10200
|
ev.complete();
|
|
10085
10201
|
req.__transaction = null;
|
|
10086
10202
|
});
|
|
10087
|
-
return
|
|
10203
|
+
return false;
|
|
10088
10204
|
});
|
|
10089
10205
|
};
|
|
10206
|
+
|
|
10207
|
+
// eslint-disable-next-line camelcase -- Clear API
|
|
10090
10208
|
req.transaction.on__preabort = function () {
|
|
10091
10209
|
connection.__upgradeTransaction = null;
|
|
10092
10210
|
// We ensure any cache is deleted before any request error events fire and try to reopen
|
|
@@ -10096,6 +10214,8 @@
|
|
|
10096
10214
|
}
|
|
10097
10215
|
}
|
|
10098
10216
|
};
|
|
10217
|
+
|
|
10218
|
+
// eslint-disable-next-line camelcase -- Clear API
|
|
10099
10219
|
req.transaction.on__abort = function () {
|
|
10100
10220
|
req.__transaction = null;
|
|
10101
10221
|
// `readyState` and `result` will be reset anyways by `dbCreateError` but we follow spec.
|
|
@@ -10109,13 +10229,15 @@
|
|
|
10109
10229
|
cleanupDatabaseResources(me.__openDatabase, name, escapedDatabaseName, dbCreateError.bind(null, err),
|
|
10110
10230
|
// @ts-expect-error It's ok
|
|
10111
10231
|
reportError || dbCreateError);
|
|
10112
|
-
return
|
|
10232
|
+
return false;
|
|
10113
10233
|
}
|
|
10114
10234
|
dbCreateError(err);
|
|
10115
|
-
return
|
|
10235
|
+
return false;
|
|
10116
10236
|
});
|
|
10117
10237
|
});
|
|
10118
10238
|
};
|
|
10239
|
+
|
|
10240
|
+
// eslint-disable-next-line camelcase -- Clear API
|
|
10119
10241
|
req.transaction.on__complete = function () {
|
|
10120
10242
|
if ( /** @type {import('./IDBDatabase.js').IDBDatabaseFull} */req.__result.__closePending) {
|
|
10121
10243
|
req.__transaction = null;
|
|
@@ -10142,7 +10264,6 @@
|
|
|
10142
10264
|
// });
|
|
10143
10265
|
};
|
|
10144
10266
|
}
|
|
10145
|
-
|
|
10146
10267
|
if (oldVersion === 0) {
|
|
10147
10268
|
systx.executeSql('INSERT INTO dbVersions VALUES (?,?)', [sqlSafeName, version], versionSet, dbCreateError);
|
|
10148
10269
|
} else {
|
|
@@ -10223,7 +10344,7 @@
|
|
|
10223
10344
|
}, /** @type {SQLStatementErrorCallback} */dbCreateError);
|
|
10224
10345
|
}, dbCreateError);
|
|
10225
10346
|
}
|
|
10226
|
-
addRequestToConnectionQueue(req, name, /* origin */undefined, function (
|
|
10347
|
+
addRequestToConnectionQueue(req, name, /* origin */undefined, function () {
|
|
10227
10348
|
var latestCachedVersion;
|
|
10228
10349
|
if (useDatabaseCache) {
|
|
10229
10350
|
if (!(name in websqlDBCache)) {
|
|
@@ -10280,7 +10401,6 @@
|
|
|
10280
10401
|
} catch (err) {
|
|
10281
10402
|
throw err; // throw new TypeError('You have supplied a database name which does not match the currently supported configuration, possibly due to a length limit enforced for Node compatibility.');
|
|
10282
10403
|
}
|
|
10283
|
-
|
|
10284
10404
|
var useMemoryDatabase = typeof CFG.memoryDatabase === 'string';
|
|
10285
10405
|
var useDatabaseCache = CFG.cacheDatabaseInstances !== false || useMemoryDatabase;
|
|
10286
10406
|
var req = IDBOpenDBRequest.__createInstance();
|
|
@@ -10308,7 +10428,7 @@
|
|
|
10308
10428
|
*/
|
|
10309
10429
|
function dbError(tx, err) {
|
|
10310
10430
|
if (calledDBError || err === true) {
|
|
10311
|
-
return
|
|
10431
|
+
return false;
|
|
10312
10432
|
}
|
|
10313
10433
|
var er = webSQLErrback( /** @type {SQLError} */err || tx);
|
|
10314
10434
|
sysdbFinishedCbDelete(true, function () {
|
|
@@ -10323,7 +10443,7 @@
|
|
|
10323
10443
|
req.dispatchEvent(e);
|
|
10324
10444
|
calledDBError = true;
|
|
10325
10445
|
});
|
|
10326
|
-
return
|
|
10446
|
+
return false;
|
|
10327
10447
|
}
|
|
10328
10448
|
addRequestToConnectionQueue(req, name, /* origin */undefined, function (req) {
|
|
10329
10449
|
createSysDB(me.__openDatabase, function () {
|
|
@@ -10350,7 +10470,6 @@
|
|
|
10350
10470
|
if (useDatabaseCache && name in websqlDBCache) {
|
|
10351
10471
|
delete websqlDBCache[name]; // New calls will treat as though never existed
|
|
10352
10472
|
}
|
|
10353
|
-
|
|
10354
10473
|
delete me.__connections[name];
|
|
10355
10474
|
completeDatabaseDelete();
|
|
10356
10475
|
});
|
|
@@ -10452,12 +10571,12 @@
|
|
|
10452
10571
|
*/
|
|
10453
10572
|
function dbGetDatabaseNamesError(tx, err) {
|
|
10454
10573
|
if (calledDbCreateError) {
|
|
10455
|
-
return
|
|
10574
|
+
return false;
|
|
10456
10575
|
}
|
|
10457
10576
|
var er = err ? webSQLErrback( /** @type {SQLError} */err) : tx;
|
|
10458
10577
|
calledDbCreateError = true;
|
|
10459
10578
|
reject(er);
|
|
10460
|
-
return
|
|
10579
|
+
return false;
|
|
10461
10580
|
}
|
|
10462
10581
|
createSysDB(me.__openDatabase, function () {
|
|
10463
10582
|
sysdb.readTransaction(function (sysReadTx) {
|
|
@@ -10772,25 +10891,33 @@
|
|
|
10772
10891
|
sql.push('LIMIT', String(recordsToLoad));
|
|
10773
10892
|
}
|
|
10774
10893
|
var sqlStr = sql.join(' ');
|
|
10775
|
-
CFG.DEBUG
|
|
10894
|
+
if (CFG.DEBUG) {
|
|
10895
|
+
console.log(sqlStr, sqlValues);
|
|
10896
|
+
}
|
|
10776
10897
|
tx.executeSql(sqlStr, sqlValues, function (tx, data) {
|
|
10777
10898
|
if (me.__count) {
|
|
10778
10899
|
success(undefined, data.rows.length, undefined);
|
|
10779
10900
|
} else if (data.rows.length > 1) {
|
|
10780
10901
|
me.__prefetchedIndex = 0;
|
|
10781
10902
|
me.__prefetchedData = data.rows;
|
|
10782
|
-
CFG.DEBUG
|
|
10903
|
+
if (CFG.DEBUG) {
|
|
10904
|
+
console.log('Preloaded ' + me.__prefetchedData.length + ' records for cursor');
|
|
10905
|
+
}
|
|
10783
10906
|
me.__decode(data.rows.item(0), success);
|
|
10784
10907
|
} else if (data.rows.length === 1) {
|
|
10785
10908
|
me.__decode(data.rows.item(0), success);
|
|
10786
10909
|
} else {
|
|
10787
|
-
CFG.DEBUG
|
|
10910
|
+
if (CFG.DEBUG) {
|
|
10911
|
+
console.log('Reached end of cursors');
|
|
10912
|
+
}
|
|
10788
10913
|
success(undefined, undefined, undefined);
|
|
10789
10914
|
}
|
|
10790
10915
|
}, function (tx, err) {
|
|
10791
|
-
CFG.DEBUG
|
|
10916
|
+
if (CFG.DEBUG) {
|
|
10917
|
+
console.log('Could not execute Cursor.continue', sqlStr, sqlValues);
|
|
10918
|
+
}
|
|
10792
10919
|
error(err);
|
|
10793
|
-
return
|
|
10920
|
+
return false;
|
|
10794
10921
|
});
|
|
10795
10922
|
};
|
|
10796
10923
|
var leftBracketRegex = /\[/g;
|
|
@@ -10808,7 +10935,9 @@
|
|
|
10808
10935
|
IDBCursor.prototype.__findMultiEntry = function (key, primaryKey, tx, success, error) {
|
|
10809
10936
|
var me = this;
|
|
10810
10937
|
if (me.__prefetchedData && me.__prefetchedData.length === me.__prefetchedIndex) {
|
|
10811
|
-
CFG.DEBUG
|
|
10938
|
+
if (CFG.DEBUG) {
|
|
10939
|
+
console.log('Reached end of multiEntry cursor');
|
|
10940
|
+
}
|
|
10812
10941
|
success(undefined, undefined, undefined);
|
|
10813
10942
|
return;
|
|
10814
10943
|
}
|
|
@@ -10860,7 +10989,9 @@
|
|
|
10860
10989
|
}
|
|
10861
10990
|
}
|
|
10862
10991
|
var sqlStr = sql.join(' ');
|
|
10863
|
-
CFG.DEBUG
|
|
10992
|
+
if (CFG.DEBUG) {
|
|
10993
|
+
console.log(sqlStr, sqlValues);
|
|
10994
|
+
}
|
|
10864
10995
|
tx.executeSql(sqlStr, sqlValues, function (tx, data) {
|
|
10865
10996
|
if (data.rows.length > 0) {
|
|
10866
10997
|
if (me.__count) {
|
|
@@ -10889,8 +11020,8 @@
|
|
|
10889
11020
|
* @type {RowItemNonNull}
|
|
10890
11021
|
*/
|
|
10891
11022
|
var clone = {
|
|
10892
|
-
matchingKey: /** @type {string} */
|
|
10893
|
-
_encode(matchingKey, true),
|
|
11023
|
+
matchingKey: ( /** @type {string} */
|
|
11024
|
+
_encode(matchingKey, true)),
|
|
10894
11025
|
key: _rowItem.key
|
|
10895
11026
|
};
|
|
10896
11027
|
clone[me.__keyColumnName] = _rowItem[me.__keyColumnName];
|
|
@@ -10932,23 +11063,33 @@
|
|
|
10932
11063
|
return this.data[index];
|
|
10933
11064
|
}
|
|
10934
11065
|
};
|
|
10935
|
-
CFG.DEBUG
|
|
11066
|
+
if (CFG.DEBUG) {
|
|
11067
|
+
console.log('Preloaded ' + me.__prefetchedData.length + ' records for multiEntry cursor');
|
|
11068
|
+
}
|
|
10936
11069
|
me.__decode(rows[0], success);
|
|
10937
11070
|
} else if (rows.length === 1) {
|
|
10938
|
-
CFG.DEBUG
|
|
11071
|
+
if (CFG.DEBUG) {
|
|
11072
|
+
console.log('Reached end of multiEntry cursor');
|
|
11073
|
+
}
|
|
10939
11074
|
me.__decode(rows[0], success);
|
|
10940
11075
|
} else {
|
|
10941
|
-
CFG.DEBUG
|
|
11076
|
+
if (CFG.DEBUG) {
|
|
11077
|
+
console.log('Reached end of multiEntry cursor');
|
|
11078
|
+
}
|
|
10942
11079
|
success(undefined, undefined, undefined);
|
|
10943
11080
|
}
|
|
10944
11081
|
} else {
|
|
10945
|
-
CFG.DEBUG
|
|
11082
|
+
if (CFG.DEBUG) {
|
|
11083
|
+
console.log('Reached end of multiEntry cursor');
|
|
11084
|
+
}
|
|
10946
11085
|
success(undefined, undefined, undefined);
|
|
10947
11086
|
}
|
|
10948
11087
|
}, function (tx, err) {
|
|
10949
|
-
CFG.DEBUG
|
|
11088
|
+
if (CFG.DEBUG) {
|
|
11089
|
+
console.log('Could not execute Cursor.continue', sqlStr, sqlValues);
|
|
11090
|
+
}
|
|
10950
11091
|
error(err);
|
|
10951
|
-
return
|
|
11092
|
+
return false;
|
|
10952
11093
|
});
|
|
10953
11094
|
};
|
|
10954
11095
|
|
|
@@ -11037,7 +11178,7 @@
|
|
|
11037
11178
|
var key = _decode(encKey, me.__multiEntryIndex);
|
|
11038
11179
|
var val = me.__valueDecoder.decode(encVal);
|
|
11039
11180
|
var primaryKey = _decode(encPrimaryKey);
|
|
11040
|
-
callback(key, val, primaryKey, encKey
|
|
11181
|
+
callback(key, val, primaryKey, encKey /* , encVal, encPrimaryKey */);
|
|
11041
11182
|
};
|
|
11042
11183
|
|
|
11043
11184
|
/**
|
|
@@ -11249,7 +11390,9 @@
|
|
|
11249
11390
|
*/
|
|
11250
11391
|
IDBCursor.prototype.update = function (valueToUpdate) {
|
|
11251
11392
|
var me = this;
|
|
11252
|
-
if (!arguments.length)
|
|
11393
|
+
if (!arguments.length) {
|
|
11394
|
+
throw new TypeError('A value must be passed to update()');
|
|
11395
|
+
}
|
|
11253
11396
|
IDBTransaction.__assertActive(me.__store.transaction);
|
|
11254
11397
|
/** @type {import('./IDBTransaction.js').IDBTransactionFull} */
|
|
11255
11398
|
me.__store.transaction.__assertWritable();
|
|
@@ -11303,28 +11446,29 @@
|
|
|
11303
11446
|
if (me.__keyOnly) {
|
|
11304
11447
|
throw createDOMException('InvalidStateError', 'This cursor method cannot be called when the key only flag has been set.');
|
|
11305
11448
|
}
|
|
11306
|
-
return
|
|
11307
|
-
|
|
11308
|
-
|
|
11309
|
-
|
|
11310
|
-
|
|
11311
|
-
|
|
11312
|
-
|
|
11313
|
-
|
|
11314
|
-
|
|
11315
|
-
|
|
11316
|
-
|
|
11317
|
-
|
|
11318
|
-
|
|
11319
|
-
|
|
11320
|
-
|
|
11321
|
-
|
|
11322
|
-
|
|
11323
|
-
|
|
11324
|
-
|
|
11325
|
-
|
|
11326
|
-
|
|
11327
|
-
|
|
11449
|
+
return /** @type {import('./IDBTransaction.js').IDBTransactionFull} */this.__store.transaction.__addToTransactionQueue(function cursorDelete(tx, args, success, error) {
|
|
11450
|
+
me.__find(undefined, undefined, tx, /** @type {KeySuccess} */
|
|
11451
|
+
function (key, value, primaryKey) {
|
|
11452
|
+
var sql = 'DELETE FROM ' + escapeStoreNameForSQL(me.__store.__currentName) + ' WHERE "key" = ?';
|
|
11453
|
+
if (CFG.DEBUG) {
|
|
11454
|
+
console.log(sql, key, primaryKey);
|
|
11455
|
+
}
|
|
11456
|
+
// Key.convertValueToKey(primaryKey); // Already checked when entered
|
|
11457
|
+
tx.executeSql(sql, [escapeSQLiteStatement( /** @type {string} */_encode(primaryKey))], function (tx, data) {
|
|
11458
|
+
if (data.rowsAffected === 1) {
|
|
11459
|
+
// We don't invalidate the cache (as we don't access it anymore
|
|
11460
|
+
// and it will set the index off)
|
|
11461
|
+
success(undefined);
|
|
11462
|
+
} else {
|
|
11463
|
+
// @ts-expect-error Apparently ok
|
|
11464
|
+
error('No rows with key found' + key);
|
|
11465
|
+
}
|
|
11466
|
+
}, function (tx, data) {
|
|
11467
|
+
error(data);
|
|
11468
|
+
return false;
|
|
11469
|
+
});
|
|
11470
|
+
}, error);
|
|
11471
|
+
}, undefined, me);
|
|
11328
11472
|
};
|
|
11329
11473
|
IDBCursor.prototype[Symbol.toStringTag] = 'IDBCursorPrototype';
|
|
11330
11474
|
defineReadonlyOuterInterface(IDBCursor.prototype, ['source', 'direction', 'key', 'primaryKey', 'request']);
|
|
@@ -11476,10 +11620,7 @@
|
|
|
11476
11620
|
* @returns {ShimmedObject}
|
|
11477
11621
|
*/
|
|
11478
11622
|
function setGlobalVars(idb, initialConfig) {
|
|
11479
|
-
|
|
11480
|
-
setConfig(initialConfig);
|
|
11481
|
-
}
|
|
11482
|
-
var IDB = idb || globalThis || {};
|
|
11623
|
+
var IDB = globalThis || {};
|
|
11483
11624
|
/**
|
|
11484
11625
|
* @typedef {any} AnyClass
|
|
11485
11626
|
*/
|
|
@@ -11522,8 +11663,7 @@
|
|
|
11522
11663
|
}
|
|
11523
11664
|
} else {
|
|
11524
11665
|
var o = _defineAccessor("get", {}, name, function () {
|
|
11525
|
-
return
|
|
11526
|
-
);
|
|
11666
|
+
return /** @type {AnyFunction} */( /** @type {PropertyDescriptor} */propDesc.get).call(this);
|
|
11527
11667
|
});
|
|
11528
11668
|
desc = /** @type {PropertyDescriptor} */
|
|
11529
11669
|
Object.getOwnPropertyDescriptor(o, name);
|
|
@@ -11538,7 +11678,9 @@
|
|
|
11538
11678
|
|
|
11539
11679
|
// @ts-expect-error It's ok
|
|
11540
11680
|
if (IDB[name] !== value) {
|
|
11541
|
-
typeof console !== 'undefined' && console.warn
|
|
11681
|
+
if (typeof console !== 'undefined' && console.warn) {
|
|
11682
|
+
console.warn('Unable to shim ' + name);
|
|
11683
|
+
}
|
|
11542
11684
|
}
|
|
11543
11685
|
}
|
|
11544
11686
|
if (CFG.win.openDatabase !== undefined) {
|
|
@@ -11717,8 +11859,7 @@
|
|
|
11717
11859
|
IDB.IDBCursor = IDB.IDBCursor || 'webkitIDBCursor' in IDB && IDB.webkitIDBCursor;
|
|
11718
11860
|
IDB.IDBKeyRange = IDB.IDBKeyRange || 'webkitIDBKeyRange' in IDB && IDB.webkitIDBKeyRange;
|
|
11719
11861
|
}
|
|
11720
|
-
return
|
|
11721
|
-
);
|
|
11862
|
+
return /** @type {ShimmedObject} */IDB;
|
|
11722
11863
|
}
|
|
11723
11864
|
|
|
11724
11865
|
/* eslint-env browser, worker */
|