indexeddbshim 15.0.0 → 15.0.2
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/dist/indexeddbshim-Key.js +24 -16
- package/dist/indexeddbshim-Key.js.map +1 -1
- package/dist/indexeddbshim-Key.min.js +1 -1
- package/dist/indexeddbshim-Key.min.js.map +1 -1
- package/dist/indexeddbshim-UnicodeIdentifiers-node.cjs +142 -114
- package/dist/indexeddbshim-UnicodeIdentifiers-node.cjs.map +1 -1
- package/dist/indexeddbshim-UnicodeIdentifiers.js +165 -129
- 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 +140 -112
- package/dist/indexeddbshim-node.cjs.map +1 -1
- package/dist/indexeddbshim-noninvasive.js +159 -123
- 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 +145 -117
- package/dist/indexeddbshim.js.map +1 -1
- package/dist/indexeddbshim.min.js +2 -2
- package/dist/indexeddbshim.min.js.map +1 -1
- package/package.json +85 -102
- package/src/DOMException.js +5 -4
- package/src/DOMStringList.js +4 -3
- package/src/IDBCursor.js +4 -4
- package/src/IDBDatabase.js +7 -2
- package/src/IDBFactory.js +25 -16
- package/src/IDBIndex.js +7 -6
- package/src/IDBKeyRange.js +3 -3
- package/src/IDBObjectStore.js +10 -9
- package/src/IDBTransaction.js +5 -5
- package/src/IDBVersionChangeEvent.js +1 -1
- package/src/Key.js +9 -2
- package/src/Sca.js +0 -1
- package/src/UnicodeIdentifiers.js +2 -2
- package/src/setGlobalVars.js +5 -2
- package/src/util.js +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! indexeddbshim -
|
|
1
|
+
/*! indexeddbshim - v15.0.1 - 9/5/2024 */
|
|
2
2
|
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
@@ -529,7 +529,7 @@ function EventTarget() {
|
|
|
529
529
|
* "addDefaultEventListener"|"removeDefaultEventListener"|"hasDefaultEventListener"
|
|
530
530
|
* } ListenerName
|
|
531
531
|
*/
|
|
532
|
-
Object.assign(EventTarget.prototype, ['Early', '', 'Late', 'Default'].reduce(function (
|
|
532
|
+
Object.assign(EventTarget.prototype, ['Early', '', 'Late', 'Default'].reduce(function (/** @type {{[key: string]: Function}} */
|
|
533
533
|
obj, listenerType) {
|
|
534
534
|
['add', 'remove', 'has'].forEach(function (method) {
|
|
535
535
|
var mainMethod = /** @type {ListenerName} */method + listenerType + 'EventListener';
|
|
@@ -1120,7 +1120,7 @@ const CFG = /** @type {ConfigValues} */{};
|
|
|
1120
1120
|
* @returns {void}
|
|
1121
1121
|
*/
|
|
1122
1122
|
val => {
|
|
1123
|
-
if (!/^(?::memory:|file::memory:(\?[^#]*)?(#.*)?)?$/u.test(
|
|
1123
|
+
if (!/^(?::memory:|file::memory:(\?[^#]*)?(#.*)?)?$/u.test(/** @type {string} */val)) {
|
|
1124
1124
|
throw new TypeError('`memoryDatabase` must be the empty string, ":memory:", or a ' + '"file::memory:[?queryString][#hash] URL".');
|
|
1125
1125
|
}
|
|
1126
1126
|
}],
|
|
@@ -1264,7 +1264,7 @@ function escapeDatabaseNameForSQLAndFiles(db) {
|
|
|
1264
1264
|
}
|
|
1265
1265
|
if (CFG.databaseCharacterEscapeList !== false) {
|
|
1266
1266
|
db = db.replace(CFG.databaseCharacterEscapeList ? new RegExp(CFG.databaseCharacterEscapeList, 'gu') : /[\u0000-\u001F\u007F"*/:<>?\\|]/gu,
|
|
1267
|
-
// eslint-disable-line no-control-regex
|
|
1267
|
+
// eslint-disable-line no-control-regex -- Controls needed
|
|
1268
1268
|
function (n0) {
|
|
1269
1269
|
// eslint-disable-next-line unicorn/prefer-code-point -- Switch to `codePointAt`?
|
|
1270
1270
|
return '^1' + n0.charCodeAt(0).toString(16).padStart(2, '0');
|
|
@@ -1600,7 +1600,7 @@ function convertToDOMString(v, treatNullAs) {
|
|
|
1600
1600
|
function ToString(o) {
|
|
1601
1601
|
// Todo: See `es-abstract/es7`
|
|
1602
1602
|
// `String()` will not throw with Symbols
|
|
1603
|
-
return '' + o; // eslint-disable-line no-implicit-coercion
|
|
1603
|
+
return '' + o; // eslint-disable-line no-implicit-coercion -- Need to throw with symbols
|
|
1604
1604
|
}
|
|
1605
1605
|
|
|
1606
1606
|
/**
|
|
@@ -1677,7 +1677,7 @@ function IDBVersionChangeEvent(type /* , eventInitDict */) {
|
|
|
1677
1677
|
this.toString = function () {
|
|
1678
1678
|
return '[object IDBVersionChangeEvent]';
|
|
1679
1679
|
};
|
|
1680
|
-
// eslint-disable-next-line prefer-rest-params
|
|
1680
|
+
// eslint-disable-next-line prefer-rest-params -- API
|
|
1681
1681
|
this.__eventInitDict = arguments[1] || {};
|
|
1682
1682
|
}
|
|
1683
1683
|
|
|
@@ -1842,10 +1842,10 @@ function createNonNativeDOMExceptionClass() {
|
|
|
1842
1842
|
function DOMException(message, name) {
|
|
1843
1843
|
// const err = Error.prototype.constructor.call(this, message); // Any use to this? Won't set this.message
|
|
1844
1844
|
this[Symbol.toStringTag] = 'DOMException';
|
|
1845
|
-
this._code = name in codes ? codes[(
|
|
1845
|
+
this._code = name in codes ? codes[(/** @type {Code} */name)] : legacyCodes[(/** @type {LegacyCode} */name)] || 0;
|
|
1846
1846
|
this._name = name || 'Error';
|
|
1847
1847
|
// We avoid `String()` in this next line as it converts Symbols
|
|
1848
|
-
this._message = message === undefined ? '' : '' + message; // eslint-disable-line no-implicit-coercion
|
|
1848
|
+
this._message = message === undefined ? '' : '' + message; // eslint-disable-line no-implicit-coercion -- Don't convert symbols
|
|
1849
1849
|
Object.defineProperty(this, 'code', {
|
|
1850
1850
|
configurable: true,
|
|
1851
1851
|
enumerable: true,
|
|
@@ -1873,12 +1873,12 @@ function createNonNativeDOMExceptionClass() {
|
|
|
1873
1873
|
// Necessary for W3C tests which complains if `DOMException` has properties on its "own" prototype
|
|
1874
1874
|
|
|
1875
1875
|
// class DummyDOMException extends Error {}; // Sometimes causing problems in Node
|
|
1876
|
-
/* eslint-disable func-name-matching */
|
|
1876
|
+
/* eslint-disable func-name-matching -- See above */
|
|
1877
1877
|
/**
|
|
1878
1878
|
* @class
|
|
1879
1879
|
*/
|
|
1880
1880
|
const DummyDOMException = function DOMException() {/* */};
|
|
1881
|
-
/* eslint-enable func-name-matching */
|
|
1881
|
+
/* eslint-enable func-name-matching -- See above */
|
|
1882
1882
|
DummyDOMException.prototype = Object.create(Error.prototype); // Intended for subclassing
|
|
1883
1883
|
/** @type {const} */
|
|
1884
1884
|
['name', 'message'].forEach(prop => {
|
|
@@ -1979,7 +1979,7 @@ function createNonNativeDOMException(name, message) {
|
|
|
1979
1979
|
*/
|
|
1980
1980
|
function logError(name, message, error) {
|
|
1981
1981
|
if (CFG.DEBUG) {
|
|
1982
|
-
const msg = error && typeof error === 'object' && error.message ? error.message : (
|
|
1982
|
+
const msg = error && typeof error === 'object' && error.message ? error.message : (/** @type {string} */error);
|
|
1983
1983
|
const method = typeof console.error === 'function' ? 'error' : 'log';
|
|
1984
1984
|
console[method](name + ': ' + message + '. ' + (msg || ''));
|
|
1985
1985
|
if (console.trace) {
|
|
@@ -2081,7 +2081,8 @@ try {
|
|
|
2081
2081
|
// Native DOMException works as expected
|
|
2082
2082
|
useNativeDOMException = true;
|
|
2083
2083
|
}
|
|
2084
|
-
|
|
2084
|
+
// eslint-disable-next-line no-unused-vars -- Problem with commonJS rollup
|
|
2085
|
+
} catch (err) {}
|
|
2085
2086
|
const createDOMException = useNativeDOMException
|
|
2086
2087
|
// eslint-disable-next-line @stylistic/operator-linebreak -- Need JSDoc
|
|
2087
2088
|
?
|
|
@@ -2389,7 +2390,7 @@ function SyncPromise(fn) {
|
|
|
2389
2390
|
// assume that we will resolve/reject (truly) synchronously
|
|
2390
2391
|
// and thus we avoid flagging checks about whether we've
|
|
2391
2392
|
// already resolved/rejected.
|
|
2392
|
-
if (
|
|
2393
|
+
if (/** @type {Callbacks} */that.c[state].length) {
|
|
2393
2394
|
that.c = null;
|
|
2394
2395
|
}
|
|
2395
2396
|
}
|
|
@@ -2427,7 +2428,7 @@ function SyncPromise(fn) {
|
|
|
2427
2428
|
SyncPromise.prototype.then = function (cb, errBack) {
|
|
2428
2429
|
/* eslint-enable unicorn/no-thenable -- Promise API */
|
|
2429
2430
|
const that = this;
|
|
2430
|
-
return new SyncPromise(
|
|
2431
|
+
return new SyncPromise(/** @type {ResolveReject} */
|
|
2431
2432
|
function (resolve, reject) {
|
|
2432
2433
|
const rej = typeof errBack === 'function' ? errBack : reject;
|
|
2433
2434
|
|
|
@@ -2457,7 +2458,7 @@ SyncPromise.prototype.then = function (cb, errBack) {
|
|
|
2457
2458
|
*/
|
|
2458
2459
|
SyncPromise.prototype.catch = function (cb) {
|
|
2459
2460
|
const that = this;
|
|
2460
|
-
return new SyncPromise(
|
|
2461
|
+
return new SyncPromise(/** @type {ResolveReject} */
|
|
2461
2462
|
function (resolve, reject) {
|
|
2462
2463
|
/**
|
|
2463
2464
|
* @returns {void}
|
|
@@ -2486,7 +2487,7 @@ SyncPromise.prototype.catch = function (cb) {
|
|
|
2486
2487
|
* @returns {SyncPromise}
|
|
2487
2488
|
*/
|
|
2488
2489
|
SyncPromise.all = function (promises) {
|
|
2489
|
-
return new SyncPromise(
|
|
2490
|
+
return new SyncPromise(/** @type {ResolveReject} */
|
|
2490
2491
|
(resolve, reject) => {
|
|
2491
2492
|
let l = promises.length;
|
|
2492
2493
|
/** @type {ArbitraryValue[]} */
|
|
@@ -2496,8 +2497,8 @@ SyncPromise.all = function (promises) {
|
|
|
2496
2497
|
return;
|
|
2497
2498
|
}
|
|
2498
2499
|
promises.forEach((p, i) => {
|
|
2499
|
-
if (isPromise(
|
|
2500
|
-
addReject(
|
|
2500
|
+
if (isPromise(/** @type {PromiseLike<any>} */p)) {
|
|
2501
|
+
addReject(/** @type {PromiseLike<any>} */p.then(/** @type {OnFulfilled} */
|
|
2501
2502
|
res => {
|
|
2502
2503
|
newPromises[i] = res;
|
|
2503
2504
|
--l || resolve(newPromises);
|
|
@@ -2516,11 +2517,11 @@ SyncPromise.all = function (promises) {
|
|
|
2516
2517
|
*/
|
|
2517
2518
|
SyncPromise.race = function (promises) {
|
|
2518
2519
|
let resolved = false;
|
|
2519
|
-
return new SyncPromise(
|
|
2520
|
+
return new SyncPromise(/** @type {ResolveReject} */
|
|
2520
2521
|
(resolve, reject) => {
|
|
2521
2522
|
promises.some((p, i) => {
|
|
2522
|
-
if (isPromise(
|
|
2523
|
-
addReject(
|
|
2523
|
+
if (isPromise(/** @type {PromiseLike<any>} */p)) {
|
|
2524
|
+
addReject(/** @type {PromiseLike<any>} */p.then(/** @type {OnFulfilled} */
|
|
2524
2525
|
res => {
|
|
2525
2526
|
if (resolved) {
|
|
2526
2527
|
return;
|
|
@@ -2542,7 +2543,7 @@ SyncPromise.race = function (promises) {
|
|
|
2542
2543
|
* @returns {SyncPromise}
|
|
2543
2544
|
*/
|
|
2544
2545
|
SyncPromise.resolve = function (val) {
|
|
2545
|
-
return new SyncPromise(
|
|
2546
|
+
return new SyncPromise(/** @type {ResolveReject} */
|
|
2546
2547
|
(resolve, reject) => {
|
|
2547
2548
|
resolve(val);
|
|
2548
2549
|
});
|
|
@@ -2553,7 +2554,7 @@ SyncPromise.resolve = function (val) {
|
|
|
2553
2554
|
* @returns {SyncPromise}
|
|
2554
2555
|
*/
|
|
2555
2556
|
SyncPromise.reject = function (val) {
|
|
2556
|
-
return new SyncPromise(
|
|
2557
|
+
return new SyncPromise(/** @type {ResolveReject} */
|
|
2557
2558
|
(resolve, reject) => {
|
|
2558
2559
|
reject(val);
|
|
2559
2560
|
});
|
|
@@ -2657,7 +2658,7 @@ const keyTypeToEncodedChar = {
|
|
|
2657
2658
|
};
|
|
2658
2659
|
const keyTypes = /** @type {(KeyType|"invalid")[]} */Object.keys(keyTypeToEncodedChar);
|
|
2659
2660
|
keyTypes.forEach(k => {
|
|
2660
|
-
keyTypeToEncodedChar[k] = String.fromCodePoint(
|
|
2661
|
+
keyTypeToEncodedChar[k] = String.fromCodePoint(/** @type {number} */keyTypeToEncodedChar[k]);
|
|
2661
2662
|
});
|
|
2662
2663
|
const encodedCharToKeyType = keyTypes.reduce((o, k) => {
|
|
2663
2664
|
o[keyTypeToEncodedChar[k]] = k;
|
|
@@ -2679,6 +2680,14 @@ const signValues = ['negativeInfinity', 'bigNegative', 'smallNegative', 'smallPo
|
|
|
2679
2680
|
* @typedef {any} AnyValue
|
|
2680
2681
|
*/
|
|
2681
2682
|
|
|
2683
|
+
/**
|
|
2684
|
+
* @type {{
|
|
2685
|
+
* [key: string]: {
|
|
2686
|
+
* encode: (param: any, inArray?: boolean) => string,
|
|
2687
|
+
* decode: (param: string, inArray?: boolean) => any
|
|
2688
|
+
* }
|
|
2689
|
+
* }}
|
|
2690
|
+
*/
|
|
2682
2691
|
const types$1 = {
|
|
2683
2692
|
invalid: {
|
|
2684
2693
|
/**
|
|
@@ -3013,7 +3022,7 @@ function getKeyType(key) {
|
|
|
3013
3022
|
return 'binary';
|
|
3014
3023
|
}
|
|
3015
3024
|
const keyType = typeof key;
|
|
3016
|
-
return ['string', 'number'].includes(keyType) ? (
|
|
3025
|
+
return ['string', 'number'].includes(keyType) ? (/** @type {"string"|"number"} */keyType) : 'invalid';
|
|
3017
3026
|
}
|
|
3018
3027
|
|
|
3019
3028
|
/**
|
|
@@ -3121,7 +3130,7 @@ function convertValueToKeyValueDecoded(input, seen, multiEntry, fullKeys) {
|
|
|
3121
3130
|
// May throw (if detached)
|
|
3122
3131
|
// Get a copy of the bytes held by the buffer source
|
|
3123
3132
|
// https://heycam.github.io/webidl/#ref-for-dfn-get-buffer-source-copy-2
|
|
3124
|
-
const octets = getCopyBytesHeldByBufferSource(
|
|
3133
|
+
const octets = getCopyBytesHeldByBufferSource(/** @type {BufferSource} */input);
|
|
3125
3134
|
return {
|
|
3126
3135
|
type: 'binary',
|
|
3127
3136
|
value: octets
|
|
@@ -3344,7 +3353,7 @@ function evaluateKeyPathOnValueToDecodedValue(value, keyPath, multiEntry, fullKe
|
|
|
3344
3353
|
value = /** @type {File} */value[idntfr];
|
|
3345
3354
|
break;
|
|
3346
3355
|
case 'lastModifiedDate':
|
|
3347
|
-
value = new Date(
|
|
3356
|
+
value = new Date(/** @type {File} */value.lastModified);
|
|
3348
3357
|
break;
|
|
3349
3358
|
}
|
|
3350
3359
|
} else if (!isObj(value) || !Object.hasOwn(value, idntfr)) {
|
|
@@ -3378,7 +3387,7 @@ function injectKeyIntoValueUsingKeyPath(value, key, keyPath) {
|
|
|
3378
3387
|
}
|
|
3379
3388
|
value = value[identifier];
|
|
3380
3389
|
});
|
|
3381
|
-
value[(
|
|
3390
|
+
value[(/** @type {string} */last)] = key; // key is already a `keyValue` in our processing so no need to convert
|
|
3382
3391
|
}
|
|
3383
3392
|
|
|
3384
3393
|
/**
|
|
@@ -3534,7 +3543,6 @@ function encode$1(key, inArray) {
|
|
|
3534
3543
|
return null;
|
|
3535
3544
|
}
|
|
3536
3545
|
// array, date, number, string, binary (should already have detected "invalid")
|
|
3537
|
-
// @ts-expect-error Argument may be ignored
|
|
3538
3546
|
return types$1[getKeyType(key)].encode(key, inArray);
|
|
3539
3547
|
}
|
|
3540
3548
|
|
|
@@ -3660,7 +3668,7 @@ function generateKeyForStore(tx, store, cb, sqlFailCb) {
|
|
|
3660
3668
|
getCurrentNumber(tx, store, function (key) {
|
|
3661
3669
|
if (key > MAX_ALLOWED_CURRENT_NUMBER) {
|
|
3662
3670
|
// 2 ^ 53 (See <https://github.com/w3c/IndexedDB/issues/147>)
|
|
3663
|
-
cb('failure');
|
|
3671
|
+
cb('failure');
|
|
3664
3672
|
return;
|
|
3665
3673
|
}
|
|
3666
3674
|
// Increment current number by 1 (we cannot leverage SQLite's
|
|
@@ -3786,7 +3794,7 @@ IDBKeyRange.__createInstance = function (lower, upper, lowerOpen, upperOpen) {
|
|
|
3786
3794
|
convertValueToKeyRethrowingAndIfInvalid(upper);
|
|
3787
3795
|
}
|
|
3788
3796
|
if (lower !== undefined && upper !== undefined && lower !== upper) {
|
|
3789
|
-
if (
|
|
3797
|
+
if (/** @type {string} */encode$1(lower) > (/** @type {string} */encode$1(upper))) {
|
|
3790
3798
|
throw createDOMException('DataError', '`lower` must not be greater than `upper` argument in `bound()` call.');
|
|
3791
3799
|
}
|
|
3792
3800
|
}
|
|
@@ -3837,7 +3845,7 @@ IDBKeyRange.lowerBound = function (value /* , open */) {
|
|
|
3837
3845
|
if (!arguments.length) {
|
|
3838
3846
|
throw new TypeError('IDBKeyRange.lowerBound requires a value argument');
|
|
3839
3847
|
}
|
|
3840
|
-
// eslint-disable-next-line prefer-rest-params
|
|
3848
|
+
// eslint-disable-next-line prefer-rest-params -- API
|
|
3841
3849
|
return IDBKeyRange.__createInstance(value, undefined, arguments[1], true);
|
|
3842
3850
|
};
|
|
3843
3851
|
|
|
@@ -3849,7 +3857,7 @@ IDBKeyRange.upperBound = function (value /* , open */) {
|
|
|
3849
3857
|
if (!arguments.length) {
|
|
3850
3858
|
throw new TypeError('IDBKeyRange.upperBound requires a value argument');
|
|
3851
3859
|
}
|
|
3852
|
-
// eslint-disable-next-line prefer-rest-params
|
|
3860
|
+
// eslint-disable-next-line prefer-rest-params -- API
|
|
3853
3861
|
return IDBKeyRange.__createInstance(undefined, value, true, arguments[1]);
|
|
3854
3862
|
};
|
|
3855
3863
|
|
|
@@ -3862,7 +3870,7 @@ IDBKeyRange.bound = function (lower, upper /* , lowerOpen, upperOpen */) {
|
|
|
3862
3870
|
if (arguments.length <= 1) {
|
|
3863
3871
|
throw new TypeError('IDBKeyRange.bound requires lower and upper arguments');
|
|
3864
3872
|
}
|
|
3865
|
-
// eslint-disable-next-line prefer-rest-params
|
|
3873
|
+
// eslint-disable-next-line prefer-rest-params -- API
|
|
3866
3874
|
return IDBKeyRange.__createInstance(lower, upper, arguments[2], arguments[3]);
|
|
3867
3875
|
};
|
|
3868
3876
|
IDBKeyRange.prototype[Symbol.toStringTag] = 'IDBKeyRangePrototype';
|
|
@@ -3927,7 +3935,7 @@ function setSQLForKeyRange(range, quotedKeyColumnName, sql, sqlValues, addAnd, c
|
|
|
3927
3935
|
encodedUpperKey = checkCached ? range.__upperCached : encode$1(range.upper);
|
|
3928
3936
|
}
|
|
3929
3937
|
if (hasLower) {
|
|
3930
|
-
sqlValues.push(escapeSQLiteStatement(
|
|
3938
|
+
sqlValues.push(escapeSQLiteStatement(/** @type {string} */encodedLowerKey));
|
|
3931
3939
|
if (hasUpper && encodedLowerKey === encodedUpperKey && !range.lowerOpen && !range.upperOpen) {
|
|
3932
3940
|
sql.push(quotedKeyColumnName, '=', '?');
|
|
3933
3941
|
return;
|
|
@@ -3939,7 +3947,7 @@ function setSQLForKeyRange(range, quotedKeyColumnName, sql, sqlValues, addAnd, c
|
|
|
3939
3947
|
}
|
|
3940
3948
|
if (hasUpper) {
|
|
3941
3949
|
sql.push(quotedKeyColumnName, range.upperOpen ? '<' : '<=', '?');
|
|
3942
|
-
sqlValues.push(escapeSQLiteStatement(
|
|
3950
|
+
sqlValues.push(escapeSQLiteStatement(/** @type {string} */encodedUpperKey));
|
|
3943
3951
|
}
|
|
3944
3952
|
}
|
|
3945
3953
|
}
|
|
@@ -4001,7 +4009,8 @@ if (Object.defineProperty) {
|
|
|
4001
4009
|
if (testObject.test) {
|
|
4002
4010
|
cleanInterface = true;
|
|
4003
4011
|
}
|
|
4004
|
-
|
|
4012
|
+
// eslint-disable-next-line no-unused-vars -- Problem with commonJS rollup
|
|
4013
|
+
} catch (err) {
|
|
4005
4014
|
// Object.defineProperty does not work as intended.
|
|
4006
4015
|
}
|
|
4007
4016
|
}
|
|
@@ -4084,7 +4093,7 @@ DOMStringList.prototype = {
|
|
|
4084
4093
|
* @returns {void}
|
|
4085
4094
|
*/
|
|
4086
4095
|
forEach(cb, thisArg) {
|
|
4087
|
-
// eslint-disable-next-line unicorn/no-array-callback-reference, unicorn/no-array-method-this-argument
|
|
4096
|
+
// eslint-disable-next-line unicorn/no-array-callback-reference, unicorn/no-array-method-this-argument -- Convenient
|
|
4088
4097
|
this._items.forEach(cb, thisArg);
|
|
4089
4098
|
},
|
|
4090
4099
|
/**
|
|
@@ -4093,7 +4102,7 @@ DOMStringList.prototype = {
|
|
|
4093
4102
|
* @returns {any[]}
|
|
4094
4103
|
*/
|
|
4095
4104
|
map(cb, thisArg) {
|
|
4096
|
-
// eslint-disable-next-line unicorn/no-array-callback-reference, unicorn/no-array-method-this-argument
|
|
4105
|
+
// eslint-disable-next-line unicorn/no-array-callback-reference, unicorn/no-array-method-this-argument -- Convenient
|
|
4097
4106
|
return this._items.map(cb, thisArg);
|
|
4098
4107
|
},
|
|
4099
4108
|
/**
|
|
@@ -4349,7 +4358,6 @@ IDBTransaction.__createInstance = function (db, storeNames, mode) {
|
|
|
4349
4358
|
|
|
4350
4359
|
// @ts-expect-error It's ok
|
|
4351
4360
|
IDBTransaction.prototype = EventTargetFactory.createInstance({
|
|
4352
|
-
// eslint-disable-next-line n/no-sync -- API
|
|
4353
4361
|
defaultSync: true,
|
|
4354
4362
|
// Ensure EventTarget preserves our properties
|
|
4355
4363
|
extraProperties: ['complete']
|
|
@@ -4504,7 +4512,7 @@ IDBTransaction.prototype.__executeRequests = function () {
|
|
|
4504
4512
|
}
|
|
4505
4513
|
q.op(tx, q.args, success, error, executeNextRequest);
|
|
4506
4514
|
} catch (e) {
|
|
4507
|
-
error(
|
|
4515
|
+
error(/** @type {Error} */e);
|
|
4508
4516
|
}
|
|
4509
4517
|
}
|
|
4510
4518
|
}
|
|
@@ -4515,7 +4523,7 @@ IDBTransaction.prototype.__executeRequests = function () {
|
|
|
4515
4523
|
// Not a genuine SQL error
|
|
4516
4524
|
return;
|
|
4517
4525
|
}
|
|
4518
|
-
const err = webSQLErrback(
|
|
4526
|
+
const err = webSQLErrback(/** @type {SQLError} */webSQLErr);
|
|
4519
4527
|
me.__abortTransaction(err);
|
|
4520
4528
|
}, function () {
|
|
4521
4529
|
// For Node, we don't need to try running here as we can keep
|
|
@@ -4716,7 +4724,7 @@ IDBTransaction.prototype.objectStore = function (objectStoreName) {
|
|
|
4716
4724
|
}
|
|
4717
4725
|
IDBTransaction.__assertNotFinished(me);
|
|
4718
4726
|
if (me.__objectStoreNames.indexOf(objectStoreName) === -1) {
|
|
4719
|
-
// eslint-disable-line unicorn/prefer-includes
|
|
4727
|
+
// eslint-disable-line unicorn/prefer-includes -- Not supported
|
|
4720
4728
|
throw createDOMException('NotFoundError', objectStoreName + ' is not participating in this transaction');
|
|
4721
4729
|
}
|
|
4722
4730
|
const store = me.db.__objectStores[objectStoreName];
|
|
@@ -4753,7 +4761,7 @@ IDBTransaction.prototype.__abortTransaction = function (err) {
|
|
|
4753
4761
|
me.__objectStoreNames = me.db.__oldObjectStoreNames;
|
|
4754
4762
|
Object.values(me.db.__objectStores).concat(Object.values(me.__storeHandles)).forEach(function (store) {
|
|
4755
4763
|
// Store was already created so we restore to name before the rename
|
|
4756
|
-
if ('__pendingName' in store && me.db.__oldObjectStoreNames.indexOf(store.__pendingName) > -1 // eslint-disable-line unicorn/prefer-includes
|
|
4764
|
+
if ('__pendingName' in store && me.db.__oldObjectStoreNames.indexOf(store.__pendingName) > -1 // eslint-disable-line unicorn/prefer-includes -- Not supported
|
|
4757
4765
|
) {
|
|
4758
4766
|
store.__name = store.__originalName;
|
|
4759
4767
|
}
|
|
@@ -4761,7 +4769,7 @@ IDBTransaction.prototype.__abortTransaction = function (err) {
|
|
|
4761
4769
|
delete store.__pendingDelete;
|
|
4762
4770
|
Object.values(store.__indexes).concat(Object.values(store.__indexHandles)).forEach(function (index) {
|
|
4763
4771
|
// Index was already created so we restore to name before the rename
|
|
4764
|
-
if ('__pendingName' in index && store.__oldIndexNames.indexOf(index.__pendingName) > -1 // eslint-disable-line unicorn/prefer-includes
|
|
4772
|
+
if ('__pendingName' in index && store.__oldIndexNames.indexOf(index.__pendingName) > -1 // eslint-disable-line unicorn/prefer-includes -- Not supported
|
|
4765
4773
|
) {
|
|
4766
4774
|
index.__name = index.__originalName;
|
|
4767
4775
|
}
|
|
@@ -4801,7 +4809,7 @@ IDBTransaction.prototype.__abortTransaction = function (err) {
|
|
|
4801
4809
|
}
|
|
4802
4810
|
me.dispatchEvent(createEvent('__preabort'));
|
|
4803
4811
|
me.__requests.filter(function (q, i, arr) {
|
|
4804
|
-
// eslint-disable-line promise/no-promise-in-callback
|
|
4812
|
+
// eslint-disable-line promise/no-promise-in-callback -- Sync promise
|
|
4805
4813
|
return q.req && !q.req.__done && [i, -1].includes(arr.map(q => q.req).lastIndexOf(q.req));
|
|
4806
4814
|
}).reduce(function (promises, q) {
|
|
4807
4815
|
// We reduce to a chain of promises to be queued in order, so we cannot
|
|
@@ -4820,7 +4828,7 @@ IDBTransaction.prototype.__abortTransaction = function (err) {
|
|
|
4820
4828
|
bubbles: true,
|
|
4821
4829
|
cancelable: true
|
|
4822
4830
|
});
|
|
4823
|
-
return new SyncPromise(
|
|
4831
|
+
return new SyncPromise(/** @type {() => void} */
|
|
4824
4832
|
resolve => {
|
|
4825
4833
|
setTimeout(() => {
|
|
4826
4834
|
if (!q.req) {
|
|
@@ -4865,6 +4873,7 @@ IDBTransaction.prototype.__abortTransaction = function (err) {
|
|
|
4865
4873
|
}
|
|
4866
4874
|
try {
|
|
4867
4875
|
me.__tx.executeSql('ROLLBACK', [], abort, /** @type {SQLStatementErrorCallback} */abort); // Not working in some circumstances, even in Node
|
|
4876
|
+
// eslint-disable-next-line no-unused-vars -- Problem with commonJS rollup
|
|
4868
4877
|
} catch (err) {
|
|
4869
4878
|
// Browser errs when transaction has ended and since it most likely already erred here,
|
|
4870
4879
|
// we call to abort
|
|
@@ -5077,7 +5086,7 @@ function _toPropertyKey(e) {
|
|
|
5077
5086
|
if ("object" != typeof e || null === e) return e;
|
|
5078
5087
|
var r = e[Symbol.toPrimitive];
|
|
5079
5088
|
if (void 0 !== r) {
|
|
5080
|
-
var n = r.call(e, t
|
|
5089
|
+
var n = r.call(e, t);
|
|
5081
5090
|
if ("object" != typeof n) return n;
|
|
5082
5091
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
5083
5092
|
}
|
|
@@ -5133,7 +5142,7 @@ e.__typeson__type__ = "TypesonPromise", "undefined" != typeof Symbol && Object.d
|
|
|
5133
5142
|
var t = Object.hasOwn,
|
|
5134
5143
|
r = Object.getPrototypeOf;
|
|
5135
5144
|
function isThenable(e, t) {
|
|
5136
|
-
return isObject(e) && "function" == typeof e.then && (!t
|
|
5145
|
+
return isObject(e) && "function" == typeof e.then && (!t);
|
|
5137
5146
|
}
|
|
5138
5147
|
function toStringTag(e) {
|
|
5139
5148
|
return Object.prototype.toString.call(e).slice(8, -1);
|
|
@@ -6178,7 +6187,7 @@ const E = {
|
|
|
6178
6187
|
},
|
|
6179
6188
|
BooleanObject: {
|
|
6180
6189
|
test: e => "Boolean" === toStringTag(e) && "object" == typeof e,
|
|
6181
|
-
replace:
|
|
6190
|
+
replace: e => e.valueOf(),
|
|
6182
6191
|
revive: e => new Boolean(e)
|
|
6183
6192
|
},
|
|
6184
6193
|
NumberObject: {
|
|
@@ -6328,7 +6337,6 @@ function register(func) {
|
|
|
6328
6337
|
function encode(obj, func) {
|
|
6329
6338
|
let ret;
|
|
6330
6339
|
try {
|
|
6331
|
-
// eslint-disable-next-line n/no-sync
|
|
6332
6340
|
ret = typeson.stringifySync(obj);
|
|
6333
6341
|
} catch (err) {
|
|
6334
6342
|
// SCA in typeson-registry using `DOMException` which is not defined (e.g., in Node)
|
|
@@ -6464,7 +6472,7 @@ IDBIndex.__createInstance = function (store, indexProperties) {
|
|
|
6464
6472
|
* @returns {string}
|
|
6465
6473
|
*/
|
|
6466
6474
|
get() {
|
|
6467
|
-
return '__pendingName' in me ? (
|
|
6475
|
+
return '__pendingName' in me ? (/** @type {string} */me.__pendingName) : me.name;
|
|
6468
6476
|
}
|
|
6469
6477
|
});
|
|
6470
6478
|
Object.defineProperty(me, 'name', {
|
|
@@ -6643,7 +6651,8 @@ IDBIndex.__createIndex = function (store, index) {
|
|
|
6643
6651
|
tx.executeSql('UPDATE ' + escapeStoreNameForSQL(storeName) + ' SET ' + escapeIndexNameForSQL(indexName) + ' = ? WHERE "key" = ?', [escapeSQLiteStatement(indexKeyStr), data.rows.item(i).key], function () {
|
|
6644
6652
|
addIndexEntry(i + 1);
|
|
6645
6653
|
}, /** @type {SQLStatementErrorCallback} */error);
|
|
6646
|
-
|
|
6654
|
+
// eslint-disable-next-line no-unused-vars -- Problem with commonJS rollup
|
|
6655
|
+
} catch (err) {
|
|
6647
6656
|
// Not a valid value to insert into index, so just continue
|
|
6648
6657
|
addIndexEntry(i + 1);
|
|
6649
6658
|
}
|
|
@@ -6832,7 +6841,7 @@ IDBIndex.prototype.__fetchIndexData = function (range, opType, nullDisallowed, c
|
|
|
6832
6841
|
IDBIndex.prototype.openCursor = function /* query, direction */
|
|
6833
6842
|
() {
|
|
6834
6843
|
const me = this;
|
|
6835
|
-
// eslint-disable-next-line prefer-rest-params
|
|
6844
|
+
// eslint-disable-next-line prefer-rest-params -- API
|
|
6836
6845
|
const [query, direction] = arguments;
|
|
6837
6846
|
const cursor = IDBCursorWithValue.__createInstance(query, direction, me.objectStore, me, escapeIndexNameForSQLKeyColumn(me.name), 'value');
|
|
6838
6847
|
me.__objectStore.__cursors.push(cursor);
|
|
@@ -6847,7 +6856,7 @@ IDBIndex.prototype.openCursor = function /* query, direction */
|
|
|
6847
6856
|
IDBIndex.prototype.openKeyCursor = function /* query, direction */
|
|
6848
6857
|
() {
|
|
6849
6858
|
const me = this;
|
|
6850
|
-
// eslint-disable-next-line prefer-rest-params
|
|
6859
|
+
// eslint-disable-next-line prefer-rest-params -- API
|
|
6851
6860
|
const [query, direction] = arguments;
|
|
6852
6861
|
const cursor = IDBCursor.__createInstance(query, direction, me.objectStore, me, escapeIndexNameForSQLKeyColumn(me.name), 'key');
|
|
6853
6862
|
me.__objectStore.__cursors.push(cursor);
|
|
@@ -6890,7 +6899,7 @@ IDBIndex.prototype.getKey = function (query) {
|
|
|
6890
6899
|
*/
|
|
6891
6900
|
IDBIndex.prototype.getAll = function /* query, count */
|
|
6892
6901
|
() {
|
|
6893
|
-
// eslint-disable-next-line prefer-rest-params
|
|
6902
|
+
// eslint-disable-next-line prefer-rest-params -- API
|
|
6894
6903
|
const [query, count] = arguments;
|
|
6895
6904
|
return this.__fetchIndexData(query, 'value', false, count);
|
|
6896
6905
|
};
|
|
@@ -6901,7 +6910,7 @@ IDBIndex.prototype.getAll = function /* query, count */
|
|
|
6901
6910
|
*/
|
|
6902
6911
|
IDBIndex.prototype.getAllKeys = function /* query, count */
|
|
6903
6912
|
() {
|
|
6904
|
-
// eslint-disable-next-line prefer-rest-params
|
|
6913
|
+
// eslint-disable-next-line prefer-rest-params -- API
|
|
6905
6914
|
const [query, count] = arguments;
|
|
6906
6915
|
return this.__fetchIndexData(query, 'key', false, count);
|
|
6907
6916
|
};
|
|
@@ -6913,7 +6922,7 @@ IDBIndex.prototype.getAllKeys = function /* query, count */
|
|
|
6913
6922
|
IDBIndex.prototype.count = function /* query */
|
|
6914
6923
|
() {
|
|
6915
6924
|
const me = this;
|
|
6916
|
-
// eslint-disable-next-line prefer-rest-params
|
|
6925
|
+
// eslint-disable-next-line prefer-rest-params -- API
|
|
6917
6926
|
const query = arguments[0];
|
|
6918
6927
|
// With the exception of needing to check whether the index has been
|
|
6919
6928
|
// deleted, we could, for greater spec parity (if not accuracy),
|
|
@@ -7140,7 +7149,7 @@ function executeFetchIndexData(count, unboundedDisallowed, index, hasKey, range,
|
|
|
7140
7149
|
*/
|
|
7141
7150
|
check => rowKey.includes(check)) ||
|
|
7142
7151
|
// More precise than our SQL
|
|
7143
|
-
isMultiEntryMatch(
|
|
7152
|
+
isMultiEntryMatch(/** @type {string} */
|
|
7144
7153
|
encodedKey, row[escapedIndexNameForKeyCol]))) {
|
|
7145
7154
|
recordCount++;
|
|
7146
7155
|
record = row;
|
|
@@ -7209,12 +7218,12 @@ function buildFetchIndexDataSQL(nullDisallowed, index, range, opType, multiCheck
|
|
|
7209
7218
|
sql.push('OR');
|
|
7210
7219
|
}
|
|
7211
7220
|
sql.push(escapeIndexNameForSQL(index.name), "LIKE ? ESCAPE '^' ");
|
|
7212
|
-
sqlValues.push('%' + sqlLIKEEscape(
|
|
7221
|
+
sqlValues.push('%' + sqlLIKEEscape(/** @type {string} */encode$1(innerKey, index.multiEntry)) + '%');
|
|
7213
7222
|
});
|
|
7214
7223
|
sql.push(')');
|
|
7215
7224
|
} else if (index.multiEntry) {
|
|
7216
7225
|
sql.push('AND', escapeIndexNameForSQL(index.name), "LIKE ? ESCAPE '^'");
|
|
7217
|
-
sqlValues.push('%' + sqlLIKEEscape(
|
|
7226
|
+
sqlValues.push('%' + sqlLIKEEscape(/** @type {string} */encode$1(range, index.multiEntry)) + '%');
|
|
7218
7227
|
} else {
|
|
7219
7228
|
const convertedRange = convertValueToKeyRange(range, nullDisallowed);
|
|
7220
7229
|
setSQLForKeyRange(convertedRange, escapeIndexNameForSQL(index.name), sql, sqlValues, true, false);
|
|
@@ -7721,6 +7730,7 @@ IDBObjectStore.prototype.__insertData = function (tx, encoded, value, clonedKeyO
|
|
|
7721
7730
|
if ('invalid' in indexKey && indexKey.invalid || 'failure' in indexKey && indexKey.failure) {
|
|
7722
7731
|
throw new Error('Go to catch');
|
|
7723
7732
|
}
|
|
7733
|
+
// eslint-disable-next-line no-unused-vars -- Problem with commonJS rollup
|
|
7724
7734
|
} catch (err) {
|
|
7725
7735
|
resolve(undefined);
|
|
7726
7736
|
return;
|
|
@@ -7762,7 +7772,7 @@ IDBObjectStore.prototype.__insertData = function (tx, encoded, value, clonedKeyO
|
|
|
7762
7772
|
// Key.convertValueToKey(primaryKey); // Already run
|
|
7763
7773
|
sqlStart.push(sqlQuote('key'), ',');
|
|
7764
7774
|
sqlEnd.push('?,');
|
|
7765
|
-
insertSqlValues.push(escapeSQLiteStatement(
|
|
7775
|
+
insertSqlValues.push(escapeSQLiteStatement(/** @type {string} */encode$1(clonedKeyOrCurrentNumber)));
|
|
7766
7776
|
}
|
|
7767
7777
|
Object.entries(paramMap).forEach(([key, stmt]) => {
|
|
7768
7778
|
sqlStart.push(escapeIndexNameForSQL(key) + ',');
|
|
@@ -7812,7 +7822,7 @@ IDBObjectStore.prototype.__insertData = function (tx, encoded, value, clonedKeyO
|
|
|
7812
7822
|
*/
|
|
7813
7823
|
IDBObjectStore.prototype.add = function (value /* , key */) {
|
|
7814
7824
|
const me = this;
|
|
7815
|
-
// eslint-disable-next-line prefer-rest-params
|
|
7825
|
+
// eslint-disable-next-line prefer-rest-params -- API
|
|
7816
7826
|
const key = arguments[1];
|
|
7817
7827
|
if (!(me instanceof IDBObjectStore)) {
|
|
7818
7828
|
throw new TypeError('Illegal invocation');
|
|
@@ -7839,7 +7849,7 @@ IDBObjectStore.prototype.add = function (value /* , key */) {
|
|
|
7839
7849
|
*/
|
|
7840
7850
|
IDBObjectStore.prototype.put = function (value /* , key */) {
|
|
7841
7851
|
const me = this;
|
|
7842
|
-
// eslint-disable-next-line prefer-rest-params
|
|
7852
|
+
// eslint-disable-next-line prefer-rest-params -- API
|
|
7843
7853
|
const key = arguments[1];
|
|
7844
7854
|
if (!(me instanceof IDBObjectStore)) {
|
|
7845
7855
|
throw new TypeError('Illegal invocation');
|
|
@@ -7893,7 +7903,7 @@ IDBObjectStore.prototype.__overwrite = function (tx, key, cb, error) {
|
|
|
7893
7903
|
* @returns {void}
|
|
7894
7904
|
*/
|
|
7895
7905
|
IDBObjectStore.__storingRecordObjectStore = function (request, store, invalidateCache, value, noOverwrite /* , key */) {
|
|
7896
|
-
// eslint-disable-next-line prefer-rest-params
|
|
7906
|
+
// eslint-disable-next-line prefer-rest-params -- API
|
|
7897
7907
|
const key = arguments[5];
|
|
7898
7908
|
/** @type {import('./IDBTransaction.js').IDBTransactionFull} */
|
|
7899
7909
|
store.transaction.__pushToQueue(request, function (tx, args, success, error) {
|
|
@@ -8038,7 +8048,7 @@ IDBObjectStore.prototype.getKey = function (query) {
|
|
|
8038
8048
|
*/
|
|
8039
8049
|
IDBObjectStore.prototype.getAll = function /* query, count */
|
|
8040
8050
|
() {
|
|
8041
|
-
// eslint-disable-next-line prefer-rest-params
|
|
8051
|
+
// eslint-disable-next-line prefer-rest-params -- API
|
|
8042
8052
|
const [query, count] = arguments;
|
|
8043
8053
|
return this.__get(query, false, true, count);
|
|
8044
8054
|
};
|
|
@@ -8049,7 +8059,7 @@ IDBObjectStore.prototype.getAll = function /* query, count */
|
|
|
8049
8059
|
*/
|
|
8050
8060
|
IDBObjectStore.prototype.getAllKeys = function /* query, count */
|
|
8051
8061
|
() {
|
|
8052
|
-
// eslint-disable-next-line prefer-rest-params
|
|
8062
|
+
// eslint-disable-next-line prefer-rest-params -- API
|
|
8053
8063
|
const [query, count] = arguments;
|
|
8054
8064
|
return this.__get(query, true, true, count);
|
|
8055
8065
|
};
|
|
@@ -8134,7 +8144,7 @@ IDBObjectStore.prototype.clear = function () {
|
|
|
8134
8144
|
IDBObjectStore.prototype.count = function /* query */
|
|
8135
8145
|
() {
|
|
8136
8146
|
const me = this;
|
|
8137
|
-
// eslint-disable-next-line prefer-rest-params
|
|
8147
|
+
// eslint-disable-next-line prefer-rest-params -- API
|
|
8138
8148
|
const query = arguments[0];
|
|
8139
8149
|
if (!(me instanceof IDBObjectStore)) {
|
|
8140
8150
|
throw new TypeError('Illegal invocation');
|
|
@@ -8153,7 +8163,7 @@ IDBObjectStore.prototype.count = function /* query */
|
|
|
8153
8163
|
IDBObjectStore.prototype.openCursor = function /* query, direction */
|
|
8154
8164
|
() {
|
|
8155
8165
|
const me = this;
|
|
8156
|
-
// eslint-disable-next-line prefer-rest-params
|
|
8166
|
+
// eslint-disable-next-line prefer-rest-params -- API
|
|
8157
8167
|
const [query, direction] = arguments;
|
|
8158
8168
|
if (!(me instanceof IDBObjectStore)) {
|
|
8159
8169
|
throw new TypeError('Illegal invocation');
|
|
@@ -8175,7 +8185,7 @@ IDBObjectStore.prototype.openKeyCursor = function /* query, direction */
|
|
|
8175
8185
|
throw new TypeError('Illegal invocation');
|
|
8176
8186
|
}
|
|
8177
8187
|
IDBObjectStore.__invalidStateIfDeleted(me);
|
|
8178
|
-
// eslint-disable-next-line prefer-rest-params
|
|
8188
|
+
// eslint-disable-next-line prefer-rest-params -- API
|
|
8179
8189
|
const [query, direction] = arguments;
|
|
8180
8190
|
const cursor = IDBCursor.__createInstance(query, direction, me, me, 'key', 'key');
|
|
8181
8191
|
me.__cursors.push(cursor);
|
|
@@ -8217,7 +8227,7 @@ IDBObjectStore.prototype.index = function (indexName) {
|
|
|
8217
8227
|
*/
|
|
8218
8228
|
IDBObjectStore.prototype.createIndex = function (indexName, keyPath /* , optionalParameters */) {
|
|
8219
8229
|
const me = this;
|
|
8220
|
-
// eslint-disable-next-line prefer-rest-params
|
|
8230
|
+
// eslint-disable-next-line prefer-rest-params -- API
|
|
8221
8231
|
let optionalParameters = arguments[2];
|
|
8222
8232
|
if (!(me instanceof IDBObjectStore)) {
|
|
8223
8233
|
throw new TypeError('Illegal invocation');
|
|
@@ -8310,6 +8320,8 @@ const readonlyProperties = ['name', 'version', 'objectStoreNames'];
|
|
|
8310
8320
|
function IDBDatabase() {
|
|
8311
8321
|
this.__versionTransaction = null;
|
|
8312
8322
|
this.__objectStores = null;
|
|
8323
|
+
/** @type {import('./IDBTransaction.js').IDBTransactionFull[]} */
|
|
8324
|
+
this.__transactions = [];
|
|
8313
8325
|
throw new TypeError('Illegal constructor');
|
|
8314
8326
|
}
|
|
8315
8327
|
const IDBDatabaseAlias = IDBDatabase;
|
|
@@ -8372,6 +8384,8 @@ IDBDatabase.__createInstance = function (db, name, oldVersion, version, storePro
|
|
|
8372
8384
|
this.__setOptions({
|
|
8373
8385
|
legacyOutputDidListenersThrowFlag: true // Event hook for IndexedB
|
|
8374
8386
|
});
|
|
8387
|
+
|
|
8388
|
+
/** @type {import('./IDBTransaction.js').IDBTransactionFull[]} */
|
|
8375
8389
|
this.__transactions = [];
|
|
8376
8390
|
|
|
8377
8391
|
/** @type {{[key: string]: IDBObjectStore}} */
|
|
@@ -8422,7 +8436,7 @@ IDBDatabase.prototype[Symbol.toStringTag] = 'IDBDatabasePrototype';
|
|
|
8422
8436
|
* @returns {IDBObjectStore}
|
|
8423
8437
|
*/
|
|
8424
8438
|
IDBDatabase.prototype.createObjectStore = function (storeName /* , createOptions */) {
|
|
8425
|
-
// eslint-disable-next-line prefer-rest-params
|
|
8439
|
+
// eslint-disable-next-line prefer-rest-params -- API
|
|
8426
8440
|
let createOptions = arguments[1];
|
|
8427
8441
|
storeName = String(storeName); // W3C test within IDBObjectStore.js seems to accept string conversion
|
|
8428
8442
|
if (!(this instanceof IDBDatabase)) {
|
|
@@ -8501,6 +8515,7 @@ IDBDatabase.prototype.close = function () {
|
|
|
8501
8515
|
if (this.__unblocking) {
|
|
8502
8516
|
this.__unblocking.check();
|
|
8503
8517
|
}
|
|
8518
|
+
this.__transactions = [];
|
|
8504
8519
|
};
|
|
8505
8520
|
|
|
8506
8521
|
/**
|
|
@@ -8513,7 +8528,7 @@ IDBDatabase.prototype.transaction = function (storeNames /* , mode */) {
|
|
|
8513
8528
|
if (arguments.length === 0) {
|
|
8514
8529
|
throw new TypeError('You must supply a valid `storeNames` to `IDBDatabase.transaction`');
|
|
8515
8530
|
}
|
|
8516
|
-
// eslint-disable-next-line prefer-rest-params
|
|
8531
|
+
// eslint-disable-next-line prefer-rest-params -- API
|
|
8517
8532
|
let mode = arguments[1];
|
|
8518
8533
|
storeNames = isIterable(storeNames)
|
|
8519
8534
|
// Creating new array also ensures sequence is passed by value: https://heycam.github.io/webidl/#idl-sequence
|
|
@@ -8598,6 +8613,7 @@ IDBDatabase.prototype.__forceClose = function (msg) {
|
|
|
8598
8613
|
};
|
|
8599
8614
|
trans.__abortTransaction(createDOMException('AbortError', 'The connection was force-closed: ' + (msg || '')));
|
|
8600
8615
|
});
|
|
8616
|
+
me.__transactions = [];
|
|
8601
8617
|
};
|
|
8602
8618
|
defineOuterInterface(IDBDatabase.prototype, listeners);
|
|
8603
8619
|
defineReadonlyOuterInterface(IDBDatabase.prototype, readonlyProperties);
|
|
@@ -8611,6 +8627,8 @@ Object.defineProperty(IDBDatabase, 'prototype', {
|
|
|
8611
8627
|
writable: false
|
|
8612
8628
|
});
|
|
8613
8629
|
|
|
8630
|
+
// eslint-disable-next-line no-restricted-imports -- Can be polyfilled
|
|
8631
|
+
|
|
8614
8632
|
/**
|
|
8615
8633
|
* @typedef {number} Integer
|
|
8616
8634
|
*/
|
|
@@ -8635,6 +8653,7 @@ const setFS = _fs => {
|
|
|
8635
8653
|
* @returns {string}
|
|
8636
8654
|
*/
|
|
8637
8655
|
const getOrigin = () => {
|
|
8656
|
+
// eslint-disable-next-line no-undef -- If browser/polyfilled
|
|
8638
8657
|
return typeof location !== 'object' || !location ? 'null' : location.origin;
|
|
8639
8658
|
};
|
|
8640
8659
|
const hasNullOrigin = () => CFG.checkOrigin !== false && getOrigin() === 'null';
|
|
@@ -8683,7 +8702,7 @@ function processNextInConnectionQueue(name, origin = getOrigin()) {
|
|
|
8683
8702
|
cb(req);
|
|
8684
8703
|
}
|
|
8685
8704
|
|
|
8686
|
-
/* eslint-disable default-param-last */
|
|
8705
|
+
/* eslint-disable default-param-last -- Keep cb at end */
|
|
8687
8706
|
/**
|
|
8688
8707
|
* @param {import('./IDBRequest.js').IDBOpenDBRequestFull} req
|
|
8689
8708
|
* @param {string} name
|
|
@@ -8692,7 +8711,7 @@ function processNextInConnectionQueue(name, origin = getOrigin()) {
|
|
|
8692
8711
|
* @returns {void}
|
|
8693
8712
|
*/
|
|
8694
8713
|
function addRequestToConnectionQueue(req, name, origin = getOrigin(), cb) {
|
|
8695
|
-
/* eslint-enable default-param-last */
|
|
8714
|
+
/* eslint-enable default-param-last -- Keep cb at end */
|
|
8696
8715
|
if (!connectionQueue[origin][name]) {
|
|
8697
8716
|
connectionQueue[origin][name] = [];
|
|
8698
8717
|
}
|
|
@@ -8921,7 +8940,7 @@ function createSysDB(__openDatabase, success, failure) {
|
|
|
8921
8940
|
* @returns {void}
|
|
8922
8941
|
*/
|
|
8923
8942
|
function sysDbCreateError(tx, err) {
|
|
8924
|
-
const er = webSQLErrback(
|
|
8943
|
+
const er = webSQLErrback(/** @type {SQLError} */err || tx);
|
|
8925
8944
|
if (CFG.DEBUG) {
|
|
8926
8945
|
console.log('Error in sysdb transaction - when creating dbVersions', err);
|
|
8927
8946
|
}
|
|
@@ -8997,7 +9016,7 @@ IDBFactory.prototype.open = function (name /* , version */) {
|
|
|
8997
9016
|
if (!(me instanceof IDBFactory)) {
|
|
8998
9017
|
throw new TypeError('Illegal invocation');
|
|
8999
9018
|
}
|
|
9000
|
-
// eslint-disable-next-line prefer-rest-params
|
|
9019
|
+
// eslint-disable-next-line prefer-rest-params -- API
|
|
9001
9020
|
let version = arguments[1];
|
|
9002
9021
|
if (arguments.length === 0) {
|
|
9003
9022
|
throw new TypeError('Database name is required');
|
|
@@ -9023,10 +9042,10 @@ IDBFactory.prototype.open = function (name /* , version */) {
|
|
|
9023
9042
|
|
|
9024
9043
|
/** @type {string} */
|
|
9025
9044
|
let escapedDatabaseName;
|
|
9026
|
-
// eslint-disable-next-line no-useless-catch
|
|
9045
|
+
// eslint-disable-next-line no-useless-catch -- Possible refactoring
|
|
9027
9046
|
try {
|
|
9028
9047
|
escapedDatabaseName = escapeDatabaseNameForSQLAndFiles(name);
|
|
9029
|
-
// eslint-disable-next-line sonarjs/no-useless-catch
|
|
9048
|
+
// eslint-disable-next-line sonarjs/no-useless-catch -- Possible refactoring
|
|
9030
9049
|
} catch (err) {
|
|
9031
9050
|
throw err; // 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.');
|
|
9032
9051
|
}
|
|
@@ -9041,7 +9060,7 @@ IDBFactory.prototype.open = function (name /* , version */) {
|
|
|
9041
9060
|
if (calledDbCreateError) {
|
|
9042
9061
|
return false;
|
|
9043
9062
|
}
|
|
9044
|
-
const er = err ? webSQLErrback(err) : (
|
|
9063
|
+
const er = err ? webSQLErrback(err) : (/** @type {Error} */tx);
|
|
9045
9064
|
calledDbCreateError = true;
|
|
9046
9065
|
// Re: why bubbling here (and how cancelable is only really relevant for `window.onerror`) see: https://github.com/w3c/IndexedDB/issues/86
|
|
9047
9066
|
const evt = createEvent('error', er, {
|
|
@@ -9091,7 +9110,8 @@ IDBFactory.prototype.open = function (name /* , version */) {
|
|
|
9091
9110
|
if (err) {
|
|
9092
9111
|
try {
|
|
9093
9112
|
systx.executeSql('ROLLBACK', [], cb, cb);
|
|
9094
|
-
|
|
9113
|
+
// eslint-disable-next-line no-unused-vars -- Problem with commonJS rollup
|
|
9114
|
+
} catch (err) {
|
|
9095
9115
|
// Browser may fail with expired transaction above so
|
|
9096
9116
|
// no choice but to manually revert
|
|
9097
9117
|
sysdb.transaction(function (systx) {
|
|
@@ -9109,7 +9129,7 @@ IDBFactory.prototype.open = function (name /* , version */) {
|
|
|
9109
9129
|
if (oldVersion === 0) {
|
|
9110
9130
|
systx.executeSql('DELETE FROM dbVersions WHERE "name" = ?', [sqlSafeName], function () {
|
|
9111
9131
|
// @ts-expect-error Force to work
|
|
9112
|
-
cb(reportError); // eslint-disable-line promise/no-callback-in-promise
|
|
9132
|
+
cb(reportError); // eslint-disable-line promise/no-callback-in-promise -- Convenient
|
|
9113
9133
|
},
|
|
9114
9134
|
// @ts-expect-error Force to work
|
|
9115
9135
|
reportError);
|
|
@@ -9123,7 +9143,7 @@ IDBFactory.prototype.open = function (name /* , version */) {
|
|
|
9123
9143
|
return;
|
|
9124
9144
|
}
|
|
9125
9145
|
// In browser, should auto-commit
|
|
9126
|
-
cb(); // eslint-disable-line promise/no-callback-in-promise
|
|
9146
|
+
cb(); // eslint-disable-line promise/no-callback-in-promise -- Convenient
|
|
9127
9147
|
};
|
|
9128
9148
|
sysdb.transaction(function (systx) {
|
|
9129
9149
|
/**
|
|
@@ -9197,7 +9217,11 @@ IDBFactory.prototype.open = function (name /* , version */) {
|
|
|
9197
9217
|
|
|
9198
9218
|
// eslint-disable-next-line camelcase -- Clear API
|
|
9199
9219
|
req.transaction.on__complete = function () {
|
|
9200
|
-
|
|
9220
|
+
const pos = connection.__transactions.indexOf(req.transaction);
|
|
9221
|
+
if (pos > -1) {
|
|
9222
|
+
connection.__transactions.splice(pos, 1);
|
|
9223
|
+
}
|
|
9224
|
+
if (/** @type {import('./IDBDatabase.js').IDBDatabaseFull} */req.__result.__closePending) {
|
|
9201
9225
|
req.__transaction = null;
|
|
9202
9226
|
const err = createDOMException('AbortError', 'The connection has been closed.');
|
|
9203
9227
|
dbCreateError(err);
|
|
@@ -9352,10 +9376,10 @@ IDBFactory.prototype.deleteDatabase = function (name) {
|
|
|
9352
9376
|
|
|
9353
9377
|
/** @type {string} */
|
|
9354
9378
|
let escapedDatabaseName;
|
|
9355
|
-
// eslint-disable-next-line no-useless-catch
|
|
9379
|
+
// eslint-disable-next-line no-useless-catch -- Possible refactoring
|
|
9356
9380
|
try {
|
|
9357
9381
|
escapedDatabaseName = escapeDatabaseNameForSQLAndFiles(name);
|
|
9358
|
-
// eslint-disable-next-line sonarjs/no-useless-catch
|
|
9382
|
+
// eslint-disable-next-line sonarjs/no-useless-catch -- Possible refactoring
|
|
9359
9383
|
} catch (err) {
|
|
9360
9384
|
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.');
|
|
9361
9385
|
}
|
|
@@ -9388,7 +9412,7 @@ IDBFactory.prototype.deleteDatabase = function (name) {
|
|
|
9388
9412
|
if (calledDBError || err === true) {
|
|
9389
9413
|
return false;
|
|
9390
9414
|
}
|
|
9391
|
-
const er = webSQLErrback(
|
|
9415
|
+
const er = webSQLErrback(/** @type {SQLError} */err || tx);
|
|
9392
9416
|
sysdbFinishedCbDelete(true, function () {
|
|
9393
9417
|
req.__done = true;
|
|
9394
9418
|
req.__error = er;
|
|
@@ -9443,7 +9467,7 @@ IDBFactory.prototype.deleteDatabase = function (name) {
|
|
|
9443
9467
|
} = data.rows.item(0));
|
|
9444
9468
|
const openConnections = me.__connections[name] || [];
|
|
9445
9469
|
triggerAnyVersionChangeAndBlockedEvents(openConnections, req, version, null).then(function () {
|
|
9446
|
-
// eslint-disable-line promise/catch-or-return
|
|
9470
|
+
// eslint-disable-line promise/catch-or-return -- Sync promise
|
|
9447
9471
|
// Since we need two databases which can't be in a single transaction, we
|
|
9448
9472
|
// do this deleting from `dbVersions` first since the `__sys__` deleting
|
|
9449
9473
|
// only impacts file memory whereas this one is critical for avoiding it
|
|
@@ -9515,7 +9539,7 @@ IDBFactory.prototype.databases = function () {
|
|
|
9515
9539
|
const me = this;
|
|
9516
9540
|
let calledDbCreateError = false;
|
|
9517
9541
|
return new Promise(function (resolve, reject) {
|
|
9518
|
-
// eslint-disable-line promise/avoid-new
|
|
9542
|
+
// eslint-disable-line promise/avoid-new -- Own polyfill
|
|
9519
9543
|
if (!(me instanceof IDBFactory)) {
|
|
9520
9544
|
throw new TypeError('Illegal invocation');
|
|
9521
9545
|
}
|
|
@@ -9532,7 +9556,7 @@ IDBFactory.prototype.databases = function () {
|
|
|
9532
9556
|
if (calledDbCreateError) {
|
|
9533
9557
|
return false;
|
|
9534
9558
|
}
|
|
9535
|
-
const er = err ? webSQLErrback(
|
|
9559
|
+
const er = err ? webSQLErrback(/** @type {SQLError} */err) : tx;
|
|
9536
9560
|
calledDbCreateError = true;
|
|
9537
9561
|
reject(er);
|
|
9538
9562
|
return false;
|
|
@@ -9581,9 +9605,10 @@ IDBFactory.prototype.__forceClose = function (dbName, connIdx, msg) {
|
|
|
9581
9605
|
conn.__forceClose(msg);
|
|
9582
9606
|
}
|
|
9583
9607
|
if (isNullish(dbName)) {
|
|
9584
|
-
Object.values(me.__connections).forEach(
|
|
9585
|
-
|
|
9586
|
-
|
|
9608
|
+
Object.values(me.__connections).forEach(connections => {
|
|
9609
|
+
connections.forEach(connection => {
|
|
9610
|
+
forceClose(connection);
|
|
9611
|
+
});
|
|
9587
9612
|
});
|
|
9588
9613
|
} else if (!me.__connections[dbName]) {
|
|
9589
9614
|
console.log('No database connections with that name to force close');
|
|
@@ -9592,7 +9617,7 @@ IDBFactory.prototype.__forceClose = function (dbName, connIdx, msg) {
|
|
|
9592
9617
|
forceClose(conn);
|
|
9593
9618
|
});
|
|
9594
9619
|
} else if (!Number.isInteger(connIdx) || connIdx < 0 || connIdx > me.__connections[dbName].length - 1) {
|
|
9595
|
-
throw new TypeError('If providing an argument, __forceClose must be called with a ' + 'numeric index to indicate a specific connection to
|
|
9620
|
+
throw new TypeError('If providing an argument, __forceClose must be called with a ' + 'numeric index to indicate a specific connection to close');
|
|
9596
9621
|
} else {
|
|
9597
9622
|
forceClose(me.__connections[dbName][connIdx]);
|
|
9598
9623
|
}
|
|
@@ -9666,7 +9691,7 @@ function IDBCursor() {
|
|
|
9666
9691
|
}
|
|
9667
9692
|
const IDBCursorAlias = IDBCursor;
|
|
9668
9693
|
|
|
9669
|
-
/* eslint-disable func-name-matching */
|
|
9694
|
+
/* eslint-disable func-name-matching -- API */
|
|
9670
9695
|
/**
|
|
9671
9696
|
* The IndexedDB Cursor Object.
|
|
9672
9697
|
* @see http://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#idl-def-IDBCursor
|
|
@@ -9682,14 +9707,14 @@ const IDBCursorAlias = IDBCursor;
|
|
|
9682
9707
|
* @returns {void}
|
|
9683
9708
|
*/
|
|
9684
9709
|
IDBCursor.__super = function IDBCursor(query, direction, store, source, keyColumnName, valueColumnName, count) {
|
|
9685
|
-
/* eslint-enable func-name-matching */
|
|
9710
|
+
/* eslint-enable func-name-matching -- API */
|
|
9686
9711
|
// @ts-expect-error Should be ok
|
|
9687
9712
|
this[Symbol.toStringTag] = 'IDBCursor';
|
|
9688
9713
|
defineReadonlyProperties(this, ['key', 'primaryKey', 'request']);
|
|
9689
9714
|
IDBObjectStore.__invalidStateIfDeleted(store);
|
|
9690
9715
|
this.__indexSource = instanceOf(source, IDBIndex);
|
|
9691
9716
|
if (this.__indexSource) {
|
|
9692
|
-
IDBIndex.__invalidStateIfDeleted(
|
|
9717
|
+
IDBIndex.__invalidStateIfDeleted(/** @type {import('./IDBIndex.js').IDBIndexFull} */source);
|
|
9693
9718
|
}
|
|
9694
9719
|
IDBTransaction.__assertActive(store.transaction);
|
|
9695
9720
|
const range = convertValueToKeyRange(query);
|
|
@@ -9803,16 +9828,16 @@ IDBCursor.prototype.__findBasic = function (key, primaryKey, tx, success, error,
|
|
|
9803
9828
|
if (primaryKey !== undefined) {
|
|
9804
9829
|
sql.push('AND', quotedKey, op + '= ?');
|
|
9805
9830
|
// Key.convertValueToKey(primaryKey); // Already checked by `continuePrimaryKey`
|
|
9806
|
-
sqlValues.push(
|
|
9831
|
+
sqlValues.push(/** @type {string} */encode$1(primaryKey));
|
|
9807
9832
|
}
|
|
9808
9833
|
if (key !== undefined) {
|
|
9809
9834
|
sql.push('AND', quotedKeyColumnName, op + '= ?');
|
|
9810
9835
|
// Key.convertValueToKey(key); // Already checked by `continue` or `continuePrimaryKey`
|
|
9811
|
-
sqlValues.push(
|
|
9836
|
+
sqlValues.push(/** @type {string} */encode$1(key));
|
|
9812
9837
|
} else if (continueCall && me.__key !== undefined) {
|
|
9813
9838
|
sql.push('AND', quotedKeyColumnName, op + ' ?');
|
|
9814
9839
|
// Key.convertValueToKey(me.__key); // Already checked when stored
|
|
9815
|
-
sqlValues.push(
|
|
9840
|
+
sqlValues.push(/** @type {string} */encode$1(me.__key));
|
|
9816
9841
|
}
|
|
9817
9842
|
if (!me.__count) {
|
|
9818
9843
|
// 1. Sort by key
|
|
@@ -9893,7 +9918,7 @@ IDBCursor.prototype.__findMultiEntry = function (key, primaryKey, tx, success, e
|
|
|
9893
9918
|
if (me.__range && me.__range.lower !== undefined && Array.isArray(me.__range.upper)) {
|
|
9894
9919
|
if (me.__range.upper.indexOf(me.__range.lower) === 0) {
|
|
9895
9920
|
sql.push('AND', quotedKeyColumnName, "LIKE ? ESCAPE '^'");
|
|
9896
|
-
sqlValues.push('%' + sqlLIKEEscape(
|
|
9921
|
+
sqlValues.push('%' + sqlLIKEEscape(/** @type {string} */me.__range.__lowerCached.slice(0, -1)) + '%');
|
|
9897
9922
|
}
|
|
9898
9923
|
}
|
|
9899
9924
|
|
|
@@ -9904,16 +9929,16 @@ IDBCursor.prototype.__findMultiEntry = function (key, primaryKey, tx, success, e
|
|
|
9904
9929
|
if (primaryKey !== undefined) {
|
|
9905
9930
|
sql.push('AND', quotedKey, op + '= ?');
|
|
9906
9931
|
// Key.convertValueToKey(primaryKey); // Already checked by `continuePrimaryKey`
|
|
9907
|
-
sqlValues.push(
|
|
9932
|
+
sqlValues.push(/** @type {string} */encode$1(primaryKey));
|
|
9908
9933
|
}
|
|
9909
9934
|
if (key !== undefined) {
|
|
9910
9935
|
sql.push('AND', quotedKeyColumnName, op + '= ?');
|
|
9911
9936
|
// Key.convertValueToKey(key); // Already checked by `continue` or `continuePrimaryKey`
|
|
9912
|
-
sqlValues.push(
|
|
9937
|
+
sqlValues.push(/** @type {string} */encode$1(key));
|
|
9913
9938
|
} else if (me.__key !== undefined) {
|
|
9914
9939
|
sql.push('AND', quotedKeyColumnName, op + ' ?');
|
|
9915
9940
|
// Key.convertValueToKey(me.__key); // Already checked when entered
|
|
9916
|
-
sqlValues.push(
|
|
9941
|
+
sqlValues.push(/** @type {string} */encode$1(me.__key));
|
|
9917
9942
|
}
|
|
9918
9943
|
if (!me.__count) {
|
|
9919
9944
|
// 1. Sort by key
|
|
@@ -9960,7 +9985,7 @@ IDBCursor.prototype.__findMultiEntry = function (key, primaryKey, tx, success, e
|
|
|
9960
9985
|
* @type {RowItemNonNull}
|
|
9961
9986
|
*/
|
|
9962
9987
|
const clone = {
|
|
9963
|
-
matchingKey: (
|
|
9988
|
+
matchingKey: (/** @type {string} */
|
|
9964
9989
|
encode$1(matchingKey, true)),
|
|
9965
9990
|
key: rowItem.key
|
|
9966
9991
|
};
|
|
@@ -10123,7 +10148,7 @@ IDBCursor.prototype.__decode = function (rowItem, callback) {
|
|
|
10123
10148
|
IDBCursor.prototype.__sourceOrEffectiveObjStoreDeleted = function () {
|
|
10124
10149
|
IDBObjectStore.__invalidStateIfDeleted(this.__store, "The cursor's effective object store has been deleted");
|
|
10125
10150
|
if (this.__indexSource) {
|
|
10126
|
-
IDBIndex.__invalidStateIfDeleted(
|
|
10151
|
+
IDBIndex.__invalidStateIfDeleted(/** @type {import('./IDBIndex.js').IDBIndexFull} */this.source, "The cursor's index source has been deleted");
|
|
10127
10152
|
}
|
|
10128
10153
|
};
|
|
10129
10154
|
|
|
@@ -10239,7 +10264,7 @@ IDBCursor.prototype.__continueFinish = function (key, primaryKey, advanceState)
|
|
|
10239
10264
|
*/
|
|
10240
10265
|
IDBCursor.prototype.continue = function /* key */
|
|
10241
10266
|
() {
|
|
10242
|
-
// eslint-disable-next-line prefer-rest-params
|
|
10267
|
+
// eslint-disable-next-line prefer-rest-params -- API
|
|
10243
10268
|
this.__continue(arguments[0]);
|
|
10244
10269
|
};
|
|
10245
10270
|
|
|
@@ -10382,7 +10407,7 @@ IDBCursor.prototype.delete = function () {
|
|
|
10382
10407
|
console.log(sql, key, primaryKey);
|
|
10383
10408
|
}
|
|
10384
10409
|
// Key.convertValueToKey(primaryKey); // Already checked when entered
|
|
10385
|
-
tx.executeSql(sql, [escapeSQLiteStatement(
|
|
10410
|
+
tx.executeSql(sql, [escapeSQLiteStatement(/** @type {string} */encode$1(primaryKey))], function (tx, data) {
|
|
10386
10411
|
if (data.rowsAffected === 1) {
|
|
10387
10412
|
// We don't invalidate the cache (as we don't access it anymore
|
|
10388
10413
|
// and it will set the index off)
|
|
@@ -10465,7 +10490,7 @@ Object.defineProperty(IDBCursorWithValue, 'prototype', {
|
|
|
10465
10490
|
function setConfig(prop, val) {
|
|
10466
10491
|
if (prop && typeof prop === 'object') {
|
|
10467
10492
|
Object.entries(prop).forEach(([p, val]) => {
|
|
10468
|
-
setConfig(
|
|
10493
|
+
setConfig(/** @type {import('./CFG.js').KeyofConfigValues} */
|
|
10469
10494
|
p, val);
|
|
10470
10495
|
});
|
|
10471
10496
|
return;
|
|
@@ -10586,14 +10611,15 @@ function setGlobalVars(idb, initialConfig) {
|
|
|
10586
10611
|
* @returns {AnyValue}
|
|
10587
10612
|
*/
|
|
10588
10613
|
get [name]() {
|
|
10589
|
-
return /** @type {AnyFunction} */(
|
|
10614
|
+
return /** @type {AnyFunction} */(/** @type {PropertyDescriptor} */propDesc.get).call(this);
|
|
10590
10615
|
}
|
|
10591
10616
|
};
|
|
10592
10617
|
desc = /** @type {PropertyDescriptor} */
|
|
10593
10618
|
Object.getOwnPropertyDescriptor(o, name);
|
|
10594
10619
|
}
|
|
10595
10620
|
Object.defineProperty(IDB, name, desc);
|
|
10596
|
-
|
|
10621
|
+
// eslint-disable-next-line no-unused-vars -- Problem with commonJS rollup
|
|
10622
|
+
} catch (err) {
|
|
10597
10623
|
// With `indexedDB`, PhantomJS fails here and below but
|
|
10598
10624
|
// not above, while Chrome is reverse (and Firefox doesn't
|
|
10599
10625
|
// get here since no WebSQL to use for shimming)
|
|
@@ -10759,7 +10785,9 @@ function setGlobalVars(idb, initialConfig) {
|
|
|
10759
10785
|
// Exclude genuine Safari: http://stackoverflow.com/a/7768006/271577
|
|
10760
10786
|
// Detect iOS: http://stackoverflow.com/questions/9038625/detect-if-device-is-ios/9039885#9039885
|
|
10761
10787
|
// and detect version 9: http://stackoverflow.com/a/26363560/271577
|
|
10762
|
-
/(iPad|iPhone|iPod).* os 9_/ui.test(navigator.userAgent) &&
|
|
10788
|
+
/(iPad|iPhone|iPod).* os 9_/ui.test(navigator.userAgent) && typeof window !== 'undefined' &&
|
|
10789
|
+
// eslint-disable-next-line no-undef -- Extra check
|
|
10790
|
+
!('MSStream' in window) // But avoid IE11
|
|
10763
10791
|
)) {
|
|
10764
10792
|
poorIndexedDbSupport = true;
|
|
10765
10793
|
}
|
|
@@ -11886,10 +11914,10 @@ function wrappedSQLiteDatabase(name) {
|
|
|
11886
11914
|
const nodeWebSQL = customOpenDatabase(wrappedSQLiteDatabase, {});
|
|
11887
11915
|
|
|
11888
11916
|
// ID_Start (includes Other_ID_Start)
|
|
11889
|
-
const UnicodeIDStart =
|
|
11917
|
+
const UnicodeIDStart = String.raw`(?:[$A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D])`;
|
|
11890
11918
|
|
|
11891
11919
|
// ID_Continue (includes Other_ID_Continue)
|
|
11892
|
-
const UnicodeIDContinue =
|
|
11920
|
+
const UnicodeIDContinue = String.raw`(?:[$0-9A-Z_a-z\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF])`;
|
|
11893
11921
|
|
|
11894
11922
|
var UnicodeIdentifiers = /*#__PURE__*/Object.freeze({
|
|
11895
11923
|
__proto__: null,
|