dexie-cloud-addon 4.0.0-beta.13 → 4.0.0-beta.14
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/dist/modern/dexie-cloud-addon.js +56 -15
- package/dist/modern/dexie-cloud-addon.js.map +1 -1
- package/dist/modern/dexie-cloud-addon.min.js +1 -1
- package/dist/modern/dexie-cloud-addon.min.js.map +1 -1
- package/dist/modern/service-worker.js +54 -12
- package/dist/modern/service-worker.js.map +1 -1
- package/dist/modern/service-worker.min.js +1 -1
- package/dist/modern/service-worker.min.js.map +1 -1
- package/dist/module-es5/dexie-cloud-addon.js +13 -15
- package/dist/module-es5/dexie-cloud-addon.js.map +1 -1
- package/dist/module-es5/dexie-cloud-addon.min.js +1 -1
- package/dist/module-es5/dexie-cloud-addon.min.js.map +1 -1
- package/dist/types/Invite.d.ts +1 -1
- package/dist/types/dexie-cloud-client.d.ts +1 -0
- package/dist/umd/dexie-cloud-addon.js +33 -34
- package/dist/umd/dexie-cloud-addon.js.map +1 -1
- package/dist/umd/dexie-cloud-addon.min.js +1 -1
- package/dist/umd/dexie-cloud-addon.min.js.map +1 -1
- package/dist/umd/service-worker.js +77 -35
- package/dist/umd/service-worker.js.map +1 -1
- package/dist/umd/service-worker.min.js +1 -1
- package/dist/umd/service-worker.min.js.map +1 -1
- package/dist/umd-modern/dexie-cloud-addon.js +74 -32
- package/dist/umd-modern/dexie-cloud-addon.js.map +1 -1
- package/package.json +5 -3
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('dexie'), require('rxjs')) :
|
|
21
21
|
typeof define === 'function' && define.amd ? define(['exports', 'dexie', 'rxjs'], factory) :
|
|
22
22
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.DexieCloud = {}, global.Dexie, global.rxjs));
|
|
23
|
-
}(this, (function (exports, Dexie, rxjs) { 'use strict';
|
|
23
|
+
})(this, (function (exports, Dexie, rxjs) { 'use strict';
|
|
24
24
|
|
|
25
25
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
26
26
|
|
|
@@ -660,10 +660,12 @@
|
|
|
660
660
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
661
661
|
args[_i] = arguments[_i];
|
|
662
662
|
}
|
|
663
|
-
|
|
663
|
+
var delegate = timeoutProvider.delegate;
|
|
664
|
+
return ((delegate === null || delegate === void 0 ? void 0 : delegate.setTimeout) || setTimeout).apply(void 0, __spreadArray([], __read(args)));
|
|
664
665
|
},
|
|
665
666
|
clearTimeout: function (handle) {
|
|
666
|
-
|
|
667
|
+
var delegate = timeoutProvider.delegate;
|
|
668
|
+
return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearTimeout) || clearTimeout)(handle);
|
|
667
669
|
},
|
|
668
670
|
delegate: undefined,
|
|
669
671
|
};
|
|
@@ -678,11 +680,33 @@
|
|
|
678
680
|
|
|
679
681
|
function noop() { }
|
|
680
682
|
|
|
683
|
+
var COMPLETE_NOTIFICATION = (function () { return createNotification('C', undefined, undefined); })();
|
|
684
|
+
function errorNotification(error) {
|
|
685
|
+
return createNotification('E', undefined, error);
|
|
686
|
+
}
|
|
687
|
+
function nextNotification(value) {
|
|
688
|
+
return createNotification('N', value, undefined);
|
|
689
|
+
}
|
|
690
|
+
function createNotification(kind, value, error) {
|
|
691
|
+
return {
|
|
692
|
+
kind: kind,
|
|
693
|
+
value: value,
|
|
694
|
+
error: error,
|
|
695
|
+
};
|
|
696
|
+
}
|
|
697
|
+
|
|
698
|
+
var context = null;
|
|
681
699
|
function errorContext(cb) {
|
|
682
700
|
{
|
|
683
701
|
cb();
|
|
684
702
|
}
|
|
685
703
|
}
|
|
704
|
+
function captureError(err) {
|
|
705
|
+
if (config.useDeprecatedSynchronousErrorHandling && context) {
|
|
706
|
+
context.errorThrown = true;
|
|
707
|
+
context.error = err;
|
|
708
|
+
}
|
|
709
|
+
}
|
|
686
710
|
|
|
687
711
|
var Subscriber = (function (_super) {
|
|
688
712
|
__extends(Subscriber, _super);
|
|
@@ -704,20 +728,26 @@
|
|
|
704
728
|
return new SafeSubscriber(next, error, complete);
|
|
705
729
|
};
|
|
706
730
|
Subscriber.prototype.next = function (value) {
|
|
707
|
-
if (this.isStopped)
|
|
731
|
+
if (this.isStopped) {
|
|
732
|
+
handleStoppedNotification(nextNotification(value), this);
|
|
733
|
+
}
|
|
708
734
|
else {
|
|
709
735
|
this._next(value);
|
|
710
736
|
}
|
|
711
737
|
};
|
|
712
738
|
Subscriber.prototype.error = function (err) {
|
|
713
|
-
if (this.isStopped)
|
|
739
|
+
if (this.isStopped) {
|
|
740
|
+
handleStoppedNotification(errorNotification(err), this);
|
|
741
|
+
}
|
|
714
742
|
else {
|
|
715
743
|
this.isStopped = true;
|
|
716
744
|
this._error(err);
|
|
717
745
|
}
|
|
718
746
|
};
|
|
719
747
|
Subscriber.prototype.complete = function () {
|
|
720
|
-
if (this.isStopped)
|
|
748
|
+
if (this.isStopped) {
|
|
749
|
+
handleStoppedNotification(COMPLETE_NOTIFICATION, this);
|
|
750
|
+
}
|
|
721
751
|
else {
|
|
722
752
|
this.isStopped = true;
|
|
723
753
|
this._complete();
|
|
@@ -792,7 +822,10 @@
|
|
|
792
822
|
handler.apply(void 0, __spreadArray([], __read(args)));
|
|
793
823
|
}
|
|
794
824
|
catch (err) {
|
|
795
|
-
{
|
|
825
|
+
if (config.useDeprecatedSynchronousErrorHandling) {
|
|
826
|
+
captureError(err);
|
|
827
|
+
}
|
|
828
|
+
else {
|
|
796
829
|
reportUnhandledError(err);
|
|
797
830
|
}
|
|
798
831
|
}
|
|
@@ -801,6 +834,10 @@
|
|
|
801
834
|
function defaultErrorHandler(err) {
|
|
802
835
|
throw err;
|
|
803
836
|
}
|
|
837
|
+
function handleStoppedNotification(notification, subscriber) {
|
|
838
|
+
var onStoppedNotification = config.onStoppedNotification;
|
|
839
|
+
onStoppedNotification && timeoutProvider.setTimeout(function () { return onStoppedNotification(notification, subscriber); });
|
|
840
|
+
}
|
|
804
841
|
var EMPTY_OBSERVER = {
|
|
805
842
|
closed: true,
|
|
806
843
|
next: noop,
|
|
@@ -1176,10 +1213,12 @@
|
|
|
1176
1213
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
1177
1214
|
args[_i] = arguments[_i];
|
|
1178
1215
|
}
|
|
1179
|
-
|
|
1216
|
+
var delegate = intervalProvider.delegate;
|
|
1217
|
+
return ((delegate === null || delegate === void 0 ? void 0 : delegate.setInterval) || setInterval).apply(void 0, __spreadArray([], __read(args)));
|
|
1180
1218
|
},
|
|
1181
1219
|
clearInterval: function (handle) {
|
|
1182
|
-
|
|
1220
|
+
var delegate = intervalProvider.delegate;
|
|
1221
|
+
return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearInterval) || clearInterval)(handle);
|
|
1183
1222
|
},
|
|
1184
1223
|
delegate: undefined,
|
|
1185
1224
|
};
|
|
@@ -1268,7 +1307,7 @@
|
|
|
1268
1307
|
|
|
1269
1308
|
var dateTimestampProvider = {
|
|
1270
1309
|
now: function () {
|
|
1271
|
-
return (Date).now();
|
|
1310
|
+
return (dateTimestampProvider.delegate || Date).now();
|
|
1272
1311
|
},
|
|
1273
1312
|
delegate: undefined,
|
|
1274
1313
|
};
|
|
@@ -1948,16 +1987,19 @@
|
|
|
1948
1987
|
: (b) => btoa(String.fromCharCode.apply(null, b));
|
|
1949
1988
|
|
|
1950
1989
|
function interactWithUser(userInteraction, req) {
|
|
1990
|
+
let done = false;
|
|
1951
1991
|
return new Promise((resolve, reject) => {
|
|
1952
1992
|
const interactionProps = {
|
|
1953
1993
|
...req,
|
|
1954
1994
|
onSubmit: (res) => {
|
|
1955
1995
|
userInteraction.next(undefined);
|
|
1996
|
+
done = true;
|
|
1956
1997
|
resolve(res);
|
|
1957
1998
|
},
|
|
1958
1999
|
onCancel: () => {
|
|
1959
2000
|
userInteraction.next(undefined);
|
|
1960
|
-
|
|
2001
|
+
done = true;
|
|
2002
|
+
reject(new Dexie__default["default"].AbortError("User cancelled"));
|
|
1961
2003
|
},
|
|
1962
2004
|
};
|
|
1963
2005
|
userInteraction.next(interactionProps);
|
|
@@ -3187,7 +3229,7 @@
|
|
|
3187
3229
|
const rewrittenKey = JSON.stringify(key);
|
|
3188
3230
|
mutClone.keys[keyIndex] = rewrittenKey;
|
|
3189
3231
|
if (rewriteValues) {
|
|
3190
|
-
Dexie__default[
|
|
3232
|
+
Dexie__default["default"].setByKeyPath(mutClone.values[keyIndex], primaryKey.keyPath, rewrittenKey);
|
|
3191
3233
|
}
|
|
3192
3234
|
}
|
|
3193
3235
|
else if (key[0] === '#') {
|
|
@@ -3200,7 +3242,7 @@
|
|
|
3200
3242
|
const rewrittenKey = `${key}:${currentUser.userId}`;
|
|
3201
3243
|
mutClone.keys[keyIndex] = rewrittenKey;
|
|
3202
3244
|
if (rewriteValues) {
|
|
3203
|
-
Dexie__default[
|
|
3245
|
+
Dexie__default["default"].setByKeyPath(mutClone.values[keyIndex], primaryKey.keyPath, rewrittenKey);
|
|
3204
3246
|
}
|
|
3205
3247
|
}
|
|
3206
3248
|
});
|
|
@@ -3315,7 +3357,7 @@
|
|
|
3315
3357
|
|
|
3316
3358
|
function throwIfCancelled(cancelToken) {
|
|
3317
3359
|
if (cancelToken?.cancelled)
|
|
3318
|
-
throw new Dexie__default[
|
|
3360
|
+
throw new Dexie__default["default"].AbortError(`Operation was cancelled`);
|
|
3319
3361
|
}
|
|
3320
3362
|
|
|
3321
3363
|
/* Need this because navigator.onLine seems to say "false" when it is actually online.
|
|
@@ -3361,7 +3403,7 @@
|
|
|
3361
3403
|
}
|
|
3362
3404
|
}
|
|
3363
3405
|
else {
|
|
3364
|
-
Dexie__default[
|
|
3406
|
+
Dexie__default["default"].setByKeyPath(obj, keyPath, value);
|
|
3365
3407
|
}
|
|
3366
3408
|
}
|
|
3367
3409
|
resultKeys.push(key);
|
|
@@ -3374,7 +3416,7 @@
|
|
|
3374
3416
|
}
|
|
3375
3417
|
|
|
3376
3418
|
async function applyServerChanges(changes, db) {
|
|
3377
|
-
console.debug('Applying server changes', changes, Dexie__default[
|
|
3419
|
+
console.debug('Applying server changes', changes, Dexie__default["default"].currentTransaction);
|
|
3378
3420
|
for (const { table: tableName, muts } of changes) {
|
|
3379
3421
|
const table = db.table(tableName);
|
|
3380
3422
|
if (!table)
|
|
@@ -3411,7 +3453,7 @@
|
|
|
3411
3453
|
else {
|
|
3412
3454
|
keys.forEach((key, i) => {
|
|
3413
3455
|
// Make sure inbound keys are consistent
|
|
3414
|
-
Dexie__default[
|
|
3456
|
+
Dexie__default["default"].setByKeyPath(mut.values[i], primaryKey.keyPath, key);
|
|
3415
3457
|
});
|
|
3416
3458
|
await table.bulkAdd(mut.values);
|
|
3417
3459
|
}
|
|
@@ -3423,7 +3465,7 @@
|
|
|
3423
3465
|
else {
|
|
3424
3466
|
keys.forEach((key, i) => {
|
|
3425
3467
|
// Make sure inbound keys are consistent
|
|
3426
|
-
Dexie__default[
|
|
3468
|
+
Dexie__default["default"].setByKeyPath(mut.values[i], primaryKey.keyPath, key);
|
|
3427
3469
|
});
|
|
3428
3470
|
await table.bulkPut(mut.values);
|
|
3429
3471
|
}
|
|
@@ -3872,7 +3914,7 @@
|
|
|
3872
3914
|
return; // Ignore message
|
|
3873
3915
|
}
|
|
3874
3916
|
// Verify also that the message is based on the exact same set of realms
|
|
3875
|
-
const ourRealmSetHash = await Dexie__default[
|
|
3917
|
+
const ourRealmSetHash = await Dexie__default["default"].waitFor(
|
|
3876
3918
|
// Keep TX in non-IDB work
|
|
3877
3919
|
computeRealmSetHash(syncState));
|
|
3878
3920
|
console.debug('ourRealmSetHash', ourRealmSetHash);
|
|
@@ -4056,7 +4098,7 @@
|
|
|
4056
4098
|
const IS_SERVICE_WORKER = typeof self !== "undefined" && "clients" in self && !self.document;
|
|
4057
4099
|
|
|
4058
4100
|
function throwVersionIncrementNeeded() {
|
|
4059
|
-
throw new Dexie__default[
|
|
4101
|
+
throw new Dexie__default["default"].SchemaError(`Version increment needed to allow dexie-cloud change tracking`);
|
|
4060
4102
|
}
|
|
4061
4103
|
|
|
4062
4104
|
const { toString } = {};
|
|
@@ -4173,14 +4215,14 @@
|
|
|
4173
4215
|
if (!table.schema.primaryKey.outbound) {
|
|
4174
4216
|
if (!valueClones)
|
|
4175
4217
|
valueClones = req.values.slice();
|
|
4176
|
-
valueClones[idx] = Dexie__default[
|
|
4177
|
-
Dexie__default[
|
|
4218
|
+
valueClones[idx] = Dexie__default["default"].deepClone(valueClones[idx]);
|
|
4219
|
+
Dexie__default["default"].setByKeyPath(valueClones[idx], table.schema.primaryKey.keyPath, keys[idx]);
|
|
4178
4220
|
}
|
|
4179
4221
|
}
|
|
4180
4222
|
else if (typeof key !== 'string' ||
|
|
4181
4223
|
(!key.startsWith(idPrefix) && !key.startsWith('#' + idPrefix))) {
|
|
4182
4224
|
// Key was specified by caller. Verify it complies with id prefix.
|
|
4183
|
-
throw new Dexie__default[
|
|
4225
|
+
throw new Dexie__default["default"].ConstraintError(`The ID "${key}" is not valid for table "${tableName}". ` +
|
|
4184
4226
|
`Primary '@' keys requires the key to be prefixed with "${idPrefix}" (or "#${idPrefix}).\n` +
|
|
4185
4227
|
`If you want to generate IDs programmatically, remove '@' from the schema to get rid of this constraint. Dexie Cloud supports custom IDs as long as they are random and globally unique.`);
|
|
4186
4228
|
}
|
|
@@ -4210,7 +4252,7 @@
|
|
|
4210
4252
|
const type = Array.isArray(key)
|
|
4211
4253
|
? key.map(toStringTag).join(',')
|
|
4212
4254
|
: toStringTag(key);
|
|
4213
|
-
throw new Dexie__default[
|
|
4255
|
+
throw new Dexie__default["default"].ConstraintError(`Invalid primary key type ${type} for table ${tableName}. Tables marked for sync has primary keys of type string or Array of string (and optional numbers)`);
|
|
4214
4256
|
}
|
|
4215
4257
|
});
|
|
4216
4258
|
}
|
|
@@ -5199,18 +5241,18 @@
|
|
|
5199
5241
|
for (const table of db.tables) {
|
|
5200
5242
|
if (db.cloud.schema?.[table.name]?.markedForSync) {
|
|
5201
5243
|
if (table.schema.primKey.auto) {
|
|
5202
|
-
throw new Dexie__default[
|
|
5244
|
+
throw new Dexie__default["default"].SchemaError(`Table ${table.name} is both autoIncremented and synced. ` +
|
|
5203
5245
|
`Use db.cloud.configure({unsyncedTables: [${JSON.stringify(table.name)}]}) to blacklist it from sync`);
|
|
5204
5246
|
}
|
|
5205
5247
|
if (!table.schema.primKey.keyPath) {
|
|
5206
|
-
throw new Dexie__default[
|
|
5248
|
+
throw new Dexie__default["default"].SchemaError(`Table ${table.name} cannot be both synced and outbound. ` +
|
|
5207
5249
|
`Use db.cloud.configure({unsyncedTables: [${JSON.stringify(table.name)}]}) to blacklist it from sync`);
|
|
5208
5250
|
}
|
|
5209
5251
|
}
|
|
5210
5252
|
}
|
|
5211
5253
|
}
|
|
5212
5254
|
|
|
5213
|
-
var n,u$1,i$1,t$1,r$1={},f$1=[],e$1=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function c$1(n,l){for(var u in l)n[u]=l[u];return n}function s$1(n){var l=n.parentNode;l&&l.removeChild(n);}function a$1(n,l,u){var i,t,o,r=arguments,f={};for(o in l)"key"==o?i=l[o]:"ref"==o?t=l[o]:f[o]=l[o];if(arguments.length>3)for(u=[u],o=3;o<arguments.length;o++)u.push(r[o]);if(null!=u&&(f.children=u),"function"==typeof n&&null!=n.defaultProps)for(o in n.defaultProps)void 0===f[o]&&(f[o]=n.defaultProps[o]);return v$1(n,f,i,t,null)}function v$1(l,u,i,t,o){var r={type:l,props:u,key:i,ref:t,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==o?++n.__v:o};return null!=n.vnode&&n.vnode(r),r}function y(n){return n.children}function p$1(n,l){this.props=n,this.context=l;}function d$1(n,l){if(null==l)return n.__?d$1(n.__,n.__.__k.indexOf(n)+1):null;for(var u;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e)return u.__e;return "function"==typeof n.type?d$1(n):null}function _(n){var l,u;if(null!=(n=n.__)&&null!=n.__c){for(n.__e=n.__c.base=null,l=0;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e){n.__e=n.__c.base=u.__e;break}return _(n)}}function k$1(l){(!l.__d&&(l.__d=!0)&&u$1.push(l)&&!b$1.__r++||t$1!==n.debounceRendering)&&((t$1=n.debounceRendering)||i$1)(b$1);}function b$1(){for(var n;b$1.__r=u$1.length;)n=u$1.sort(function(n,l){return n.__v.__b-l.__v.__b}),u$1=[],n.some(function(n){var l,u,i,t,o,r;n.__d&&(o=(t=(l=n).__v).__e,(r=l.__P)&&(u=[],(i=c$1({},t)).__v=t.__v+1,I(r,t,i,l.__n,void 0!==r.ownerSVGElement,null!=t.__h?[o]:null,u,null==o?d$1(t):o,t.__h),T(u,t),t.__e!=o&&_(t)));});}function m$1(n,l,u,i,t,o,e,c,s,a){var h,p,_,k,b,m,w,A=i&&i.__k||f$1,P=A.length;for(u.__k=[],h=0;h<l.length;h++)if(null!=(k=u.__k[h]=null==(k=l[h])||"boolean"==typeof k?null:"string"==typeof k||"number"==typeof k||"bigint"==typeof k?v$1(null,k,null,null,k):Array.isArray(k)?v$1(y,{children:k},null,null,null):k.__b>0?v$1(k.type,k.props,k.key,null,k.__v):k)){if(k.__=u,k.__b=u.__b+1,null===(_=A[h])||_&&k.key==_.key&&k.type===_.type)A[h]=void 0;else for(p=0;p<P;p++){if((_=A[p])&&k.key==_.key&&k.type===_.type){A[p]=void 0;break}_=null;}I(n,k,_=_||r$1,t,o,e,c,s,a),b=k.__e,(p=k.ref)&&_.ref!=p&&(w||(w=[]),_.ref&&w.push(_.ref,null,k),w.push(p,k.__c||b,k)),null!=b?(null==m&&(m=b),"function"==typeof k.type&&null!=k.__k&&k.__k===_.__k?k.__d=s=g$1(k,s,n):s=x$1(n,k,_,A,b,s),a||"option"!==u.type?"function"==typeof u.type&&(u.__d=s):n.value=""):s&&_.__e==s&&s.parentNode!=n&&(s=d$1(_));}for(u.__e=m,h=P;h--;)null!=A[h]&&("function"==typeof u.type&&null!=A[h].__e&&A[h].__e==u.__d&&(u.__d=d$1(i,h+1)),L(A[h],A[h]));if(w)for(h=0;h<w.length;h++)z(w[h],w[++h],w[++h]);}function g$1(n,l,u){var i,t;for(i=0;i<n.__k.length;i++)(t=n.__k[i])&&(t.__=n,l="function"==typeof t.type?g$1(t,l,u):x$1(u,t,t,n.__k,t.__e,l));return l}function x$1(n,l,u,i,t,o){var r,f,e;if(void 0!==l.__d)r=l.__d,l.__d=void 0;else if(null==u||t!=o||null==t.parentNode)n:if(null==o||o.parentNode!==n)n.appendChild(t),r=null;else {for(f=o,e=0;(f=f.nextSibling)&&e<i.length;e+=2)if(f==t)break n;n.insertBefore(t,o),r=o;}return void 0!==r?r:t.nextSibling}function A(n,l,u,i,t){var o;for(o in u)"children"===o||"key"===o||o in l||C(n,o,null,u[o],i);for(o in l)t&&"function"!=typeof l[o]||"children"===o||"key"===o||"value"===o||"checked"===o||u[o]===l[o]||C(n,o,l[o],u[o],i);}function P(n,l,u){"-"===l[0]?n.setProperty(l,u):n[l]=null==u?"":"number"!=typeof u||e$1.test(l)?u:u+"px";}function C(n,l,u,i,t){var o;n:if("style"===l)if("string"==typeof u)n.style.cssText=u;else {if("string"==typeof i&&(n.style.cssText=i=""),i)for(l in i)u&&l in u||P(n.style,l,"");if(u)for(l in u)i&&u[l]===i[l]||P(n.style,l,u[l]);}else if("o"===l[0]&&"n"===l[1])o=l!==(l=l.replace(/Capture$/,"")),l=l.toLowerCase()in n?l.toLowerCase().slice(2):l.slice(2),n.l||(n.l={}),n.l[l+o]=u,u?i||n.addEventListener(l,o?H:$,o):n.removeEventListener(l,o?H:$,o);else if("dangerouslySetInnerHTML"!==l){if(t)l=l.replace(/xlink[H:h]/,"h").replace(/sName$/,"s");else if("href"!==l&&"list"!==l&&"form"!==l&&"tabIndex"!==l&&"download"!==l&&l in n)try{n[l]=null==u?"":u;break n}catch(n){}"function"==typeof u||(null!=u&&(!1!==u||"a"===l[0]&&"r"===l[1])?n.setAttribute(l,u):n.removeAttribute(l));}}function $(l){this.l[l.type+!1](n.event?n.event(l):l);}function H(l){this.l[l.type+!0](n.event?n.event(l):l);}function I(l,u,i,t,o,r,f,e,s){var a,v,h,d,_,k,b,g,w,x,A,P=u.type;if(void 0!==u.constructor)return null;null!=i.__h&&(s=i.__h,e=u.__e=i.__e,u.__h=null,r=[e]),(a=n.__b)&&a(u);try{n:if("function"==typeof P){if(g=u.props,w=(a=P.contextType)&&t[a.__c],x=a?w?w.props.value:a.__:t,i.__c?b=(v=u.__c=i.__c).__=v.__E:("prototype"in P&&P.prototype.render?u.__c=v=new P(g,x):(u.__c=v=new p$1(g,x),v.constructor=P,v.render=M),w&&w.sub(v),v.props=g,v.state||(v.state={}),v.context=x,v.__n=t,h=v.__d=!0,v.__h=[]),null==v.__s&&(v.__s=v.state),null!=P.getDerivedStateFromProps&&(v.__s==v.state&&(v.__s=c$1({},v.__s)),c$1(v.__s,P.getDerivedStateFromProps(g,v.__s))),d=v.props,_=v.state,h)null==P.getDerivedStateFromProps&&null!=v.componentWillMount&&v.componentWillMount(),null!=v.componentDidMount&&v.__h.push(v.componentDidMount);else {if(null==P.getDerivedStateFromProps&&g!==d&&null!=v.componentWillReceiveProps&&v.componentWillReceiveProps(g,x),!v.__e&&null!=v.shouldComponentUpdate&&!1===v.shouldComponentUpdate(g,v.__s,x)||u.__v===i.__v){v.props=g,v.state=v.__s,u.__v!==i.__v&&(v.__d=!1),v.__v=u,u.__e=i.__e,u.__k=i.__k,u.__k.forEach(function(n){n&&(n.__=u);}),v.__h.length&&f.push(v);break n}null!=v.componentWillUpdate&&v.componentWillUpdate(g,v.__s,x),null!=v.componentDidUpdate&&v.__h.push(function(){v.componentDidUpdate(d,_,k);});}v.context=x,v.props=g,v.state=v.__s,(a=n.__r)&&a(u),v.__d=!1,v.__v=u,v.__P=l,a=v.render(v.props,v.state,v.context),v.state=v.__s,null!=v.getChildContext&&(t=c$1(c$1({},t),v.getChildContext())),h||null==v.getSnapshotBeforeUpdate||(k=v.getSnapshotBeforeUpdate(d,_)),A=null!=a&&a.type===y&&null==a.key?a.props.children:a,m$1(l,Array.isArray(A)?A:[A],u,i,t,o,r,f,e,s),v.base=u.__e,u.__h=null,v.__h.length&&f.push(v),b&&(v.__E=v.__=null),v.__e=!1;}else null==r&&u.__v===i.__v?(u.__k=i.__k,u.__e=i.__e):u.__e=j$1(i.__e,u,i,t,o,r,f,s);(a=n.diffed)&&a(u);}catch(l){u.__v=null,(s||null!=r)&&(u.__e=e,u.__h=!!s,r[r.indexOf(e)]=null),n.__e(l,u,i);}}function T(l,u){n.__c&&n.__c(u,l),l.some(function(u){try{l=u.__h,u.__h=[],l.some(function(n){n.call(u);});}catch(l){n.__e(l,u.__v);}});}function j$1(n,l,u,i,t,o,e,c){var a,v,h,y,p=u.props,d=l.props,_=l.type,k=0;if("svg"===_&&(t=!0),null!=o)for(;k<o.length;k++)if((a=o[k])&&(a===n||(_?a.localName==_:3==a.nodeType))){n=a,o[k]=null;break}if(null==n){if(null===_)return document.createTextNode(d);n=t?document.createElementNS("http://www.w3.org/2000/svg",_):document.createElement(_,d.is&&d),o=null,c=!1;}if(null===_)p===d||c&&n.data===d||(n.data=d);else {if(o=o&&f$1.slice.call(n.childNodes),v=(p=u.props||r$1).dangerouslySetInnerHTML,h=d.dangerouslySetInnerHTML,!c){if(null!=o)for(p={},y=0;y<n.attributes.length;y++)p[n.attributes[y].name]=n.attributes[y].value;(h||v)&&(h&&(v&&h.__html==v.__html||h.__html===n.innerHTML)||(n.innerHTML=h&&h.__html||""));}if(A(n,d,p,t,c),h)l.__k=[];else if(k=l.props.children,m$1(n,Array.isArray(k)?k:[k],l,u,i,t&&"foreignObject"!==_,o,e,n.firstChild,c),null!=o)for(k=o.length;k--;)null!=o[k]&&s$1(o[k]);c||("value"in d&&void 0!==(k=d.value)&&(k!==n.value||"progress"===_&&!k)&&C(n,"value",k,p.value,!1),"checked"in d&&void 0!==(k=d.checked)&&k!==n.checked&&C(n,"checked",k,p.checked,!1));}return n}function z(l,u,i){try{"function"==typeof l?l(u):l.current=u;}catch(l){n.__e(l,i);}}function L(l,u,i){var t,o,r;if(n.unmount&&n.unmount(l),(t=l.ref)&&(t.current&&t.current!==l.__e||z(t,null,u)),i||"function"==typeof l.type||(i=null!=(o=l.__e)),l.__e=l.__d=void 0,null!=(t=l.__c)){if(t.componentWillUnmount)try{t.componentWillUnmount();}catch(l){n.__e(l,u);}t.base=t.__P=null;}if(t=l.__k)for(r=0;r<t.length;r++)t[r]&&L(t[r],u,i);null!=o&&s$1(o);}function M(n,l,u){return this.constructor(n,u)}function N(l,u,i){var t,o,e;n.__&&n.__(l,u),o=(t="function"==typeof i)?null:i&&i.__k||u.__k,e=[],I(u,l=(!t&&i||u).__k=a$1(y,null,[l]),o||r$1,r$1,void 0!==u.ownerSVGElement,!t&&i?[i]:o?null:u.firstChild?f$1.slice.call(u.childNodes):null,e,!t&&i?i:o?o.__e:u.firstChild,t),T(e,l);}n={__e:function(n,l){for(var u,i,t;l=l.__;)if((u=l.__c)&&!u.__)try{if((i=u.constructor)&&null!=i.getDerivedStateFromError&&(u.setState(i.getDerivedStateFromError(n)),t=u.__d),null!=u.componentDidCatch&&(u.componentDidCatch(n),t=u.__d),t)return u.__E=u}catch(l){n=l;}throw n},__v:0},p$1.prototype.setState=function(n,l){var u;u=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=c$1({},this.state),"function"==typeof n&&(n=n(c$1({},u),this.props)),n&&c$1(u,n),null!=n&&this.__v&&(l&&this.__h.push(l),k$1(this));},p$1.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),k$1(this));},p$1.prototype.render=y,u$1=[],i$1="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,b$1.__r=0
|
|
5255
|
+
var n,u$1,i$1,t$1,r$1={},f$1=[],e$1=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function c$1(n,l){for(var u in l)n[u]=l[u];return n}function s$1(n){var l=n.parentNode;l&&l.removeChild(n);}function a$1(n,l,u){var i,t,o,r=arguments,f={};for(o in l)"key"==o?i=l[o]:"ref"==o?t=l[o]:f[o]=l[o];if(arguments.length>3)for(u=[u],o=3;o<arguments.length;o++)u.push(r[o]);if(null!=u&&(f.children=u),"function"==typeof n&&null!=n.defaultProps)for(o in n.defaultProps)void 0===f[o]&&(f[o]=n.defaultProps[o]);return v$1(n,f,i,t,null)}function v$1(l,u,i,t,o){var r={type:l,props:u,key:i,ref:t,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==o?++n.__v:o};return null!=n.vnode&&n.vnode(r),r}function y(n){return n.children}function p$1(n,l){this.props=n,this.context=l;}function d$1(n,l){if(null==l)return n.__?d$1(n.__,n.__.__k.indexOf(n)+1):null;for(var u;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e)return u.__e;return "function"==typeof n.type?d$1(n):null}function _(n){var l,u;if(null!=(n=n.__)&&null!=n.__c){for(n.__e=n.__c.base=null,l=0;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e){n.__e=n.__c.base=u.__e;break}return _(n)}}function k$1(l){(!l.__d&&(l.__d=!0)&&u$1.push(l)&&!b$1.__r++||t$1!==n.debounceRendering)&&((t$1=n.debounceRendering)||i$1)(b$1);}function b$1(){for(var n;b$1.__r=u$1.length;)n=u$1.sort(function(n,l){return n.__v.__b-l.__v.__b}),u$1=[],n.some(function(n){var l,u,i,t,o,r;n.__d&&(o=(t=(l=n).__v).__e,(r=l.__P)&&(u=[],(i=c$1({},t)).__v=t.__v+1,I(r,t,i,l.__n,void 0!==r.ownerSVGElement,null!=t.__h?[o]:null,u,null==o?d$1(t):o,t.__h),T(u,t),t.__e!=o&&_(t)));});}function m$1(n,l,u,i,t,o,e,c,s,a){var h,p,_,k,b,m,w,A=i&&i.__k||f$1,P=A.length;for(u.__k=[],h=0;h<l.length;h++)if(null!=(k=u.__k[h]=null==(k=l[h])||"boolean"==typeof k?null:"string"==typeof k||"number"==typeof k||"bigint"==typeof k?v$1(null,k,null,null,k):Array.isArray(k)?v$1(y,{children:k},null,null,null):k.__b>0?v$1(k.type,k.props,k.key,null,k.__v):k)){if(k.__=u,k.__b=u.__b+1,null===(_=A[h])||_&&k.key==_.key&&k.type===_.type)A[h]=void 0;else for(p=0;p<P;p++){if((_=A[p])&&k.key==_.key&&k.type===_.type){A[p]=void 0;break}_=null;}I(n,k,_=_||r$1,t,o,e,c,s,a),b=k.__e,(p=k.ref)&&_.ref!=p&&(w||(w=[]),_.ref&&w.push(_.ref,null,k),w.push(p,k.__c||b,k)),null!=b?(null==m&&(m=b),"function"==typeof k.type&&null!=k.__k&&k.__k===_.__k?k.__d=s=g$1(k,s,n):s=x$1(n,k,_,A,b,s),a||"option"!==u.type?"function"==typeof u.type&&(u.__d=s):n.value=""):s&&_.__e==s&&s.parentNode!=n&&(s=d$1(_));}for(u.__e=m,h=P;h--;)null!=A[h]&&("function"==typeof u.type&&null!=A[h].__e&&A[h].__e==u.__d&&(u.__d=d$1(i,h+1)),L(A[h],A[h]));if(w)for(h=0;h<w.length;h++)z(w[h],w[++h],w[++h]);}function g$1(n,l,u){var i,t;for(i=0;i<n.__k.length;i++)(t=n.__k[i])&&(t.__=n,l="function"==typeof t.type?g$1(t,l,u):x$1(u,t,t,n.__k,t.__e,l));return l}function x$1(n,l,u,i,t,o){var r,f,e;if(void 0!==l.__d)r=l.__d,l.__d=void 0;else if(null==u||t!=o||null==t.parentNode)n:if(null==o||o.parentNode!==n)n.appendChild(t),r=null;else {for(f=o,e=0;(f=f.nextSibling)&&e<i.length;e+=2)if(f==t)break n;n.insertBefore(t,o),r=o;}return void 0!==r?r:t.nextSibling}function A(n,l,u,i,t){var o;for(o in u)"children"===o||"key"===o||o in l||C(n,o,null,u[o],i);for(o in l)t&&"function"!=typeof l[o]||"children"===o||"key"===o||"value"===o||"checked"===o||u[o]===l[o]||C(n,o,l[o],u[o],i);}function P(n,l,u){"-"===l[0]?n.setProperty(l,u):n[l]=null==u?"":"number"!=typeof u||e$1.test(l)?u:u+"px";}function C(n,l,u,i,t){var o;n:if("style"===l)if("string"==typeof u)n.style.cssText=u;else {if("string"==typeof i&&(n.style.cssText=i=""),i)for(l in i)u&&l in u||P(n.style,l,"");if(u)for(l in u)i&&u[l]===i[l]||P(n.style,l,u[l]);}else if("o"===l[0]&&"n"===l[1])o=l!==(l=l.replace(/Capture$/,"")),l=l.toLowerCase()in n?l.toLowerCase().slice(2):l.slice(2),n.l||(n.l={}),n.l[l+o]=u,u?i||n.addEventListener(l,o?H:$,o):n.removeEventListener(l,o?H:$,o);else if("dangerouslySetInnerHTML"!==l){if(t)l=l.replace(/xlink[H:h]/,"h").replace(/sName$/,"s");else if("href"!==l&&"list"!==l&&"form"!==l&&"tabIndex"!==l&&"download"!==l&&l in n)try{n[l]=null==u?"":u;break n}catch(n){}"function"==typeof u||(null!=u&&(!1!==u||"a"===l[0]&&"r"===l[1])?n.setAttribute(l,u):n.removeAttribute(l));}}function $(l){this.l[l.type+!1](n.event?n.event(l):l);}function H(l){this.l[l.type+!0](n.event?n.event(l):l);}function I(l,u,i,t,o,r,f,e,s){var a,v,h,d,_,k,b,g,w,x,A,P=u.type;if(void 0!==u.constructor)return null;null!=i.__h&&(s=i.__h,e=u.__e=i.__e,u.__h=null,r=[e]),(a=n.__b)&&a(u);try{n:if("function"==typeof P){if(g=u.props,w=(a=P.contextType)&&t[a.__c],x=a?w?w.props.value:a.__:t,i.__c?b=(v=u.__c=i.__c).__=v.__E:("prototype"in P&&P.prototype.render?u.__c=v=new P(g,x):(u.__c=v=new p$1(g,x),v.constructor=P,v.render=M),w&&w.sub(v),v.props=g,v.state||(v.state={}),v.context=x,v.__n=t,h=v.__d=!0,v.__h=[]),null==v.__s&&(v.__s=v.state),null!=P.getDerivedStateFromProps&&(v.__s==v.state&&(v.__s=c$1({},v.__s)),c$1(v.__s,P.getDerivedStateFromProps(g,v.__s))),d=v.props,_=v.state,h)null==P.getDerivedStateFromProps&&null!=v.componentWillMount&&v.componentWillMount(),null!=v.componentDidMount&&v.__h.push(v.componentDidMount);else {if(null==P.getDerivedStateFromProps&&g!==d&&null!=v.componentWillReceiveProps&&v.componentWillReceiveProps(g,x),!v.__e&&null!=v.shouldComponentUpdate&&!1===v.shouldComponentUpdate(g,v.__s,x)||u.__v===i.__v){v.props=g,v.state=v.__s,u.__v!==i.__v&&(v.__d=!1),v.__v=u,u.__e=i.__e,u.__k=i.__k,u.__k.forEach(function(n){n&&(n.__=u);}),v.__h.length&&f.push(v);break n}null!=v.componentWillUpdate&&v.componentWillUpdate(g,v.__s,x),null!=v.componentDidUpdate&&v.__h.push(function(){v.componentDidUpdate(d,_,k);});}v.context=x,v.props=g,v.state=v.__s,(a=n.__r)&&a(u),v.__d=!1,v.__v=u,v.__P=l,a=v.render(v.props,v.state,v.context),v.state=v.__s,null!=v.getChildContext&&(t=c$1(c$1({},t),v.getChildContext())),h||null==v.getSnapshotBeforeUpdate||(k=v.getSnapshotBeforeUpdate(d,_)),A=null!=a&&a.type===y&&null==a.key?a.props.children:a,m$1(l,Array.isArray(A)?A:[A],u,i,t,o,r,f,e,s),v.base=u.__e,u.__h=null,v.__h.length&&f.push(v),b&&(v.__E=v.__=null),v.__e=!1;}else null==r&&u.__v===i.__v?(u.__k=i.__k,u.__e=i.__e):u.__e=j$1(i.__e,u,i,t,o,r,f,s);(a=n.diffed)&&a(u);}catch(l){u.__v=null,(s||null!=r)&&(u.__e=e,u.__h=!!s,r[r.indexOf(e)]=null),n.__e(l,u,i);}}function T(l,u){n.__c&&n.__c(u,l),l.some(function(u){try{l=u.__h,u.__h=[],l.some(function(n){n.call(u);});}catch(l){n.__e(l,u.__v);}});}function j$1(n,l,u,i,t,o,e,c){var a,v,h,y,p=u.props,d=l.props,_=l.type,k=0;if("svg"===_&&(t=!0),null!=o)for(;k<o.length;k++)if((a=o[k])&&(a===n||(_?a.localName==_:3==a.nodeType))){n=a,o[k]=null;break}if(null==n){if(null===_)return document.createTextNode(d);n=t?document.createElementNS("http://www.w3.org/2000/svg",_):document.createElement(_,d.is&&d),o=null,c=!1;}if(null===_)p===d||c&&n.data===d||(n.data=d);else {if(o=o&&f$1.slice.call(n.childNodes),v=(p=u.props||r$1).dangerouslySetInnerHTML,h=d.dangerouslySetInnerHTML,!c){if(null!=o)for(p={},y=0;y<n.attributes.length;y++)p[n.attributes[y].name]=n.attributes[y].value;(h||v)&&(h&&(v&&h.__html==v.__html||h.__html===n.innerHTML)||(n.innerHTML=h&&h.__html||""));}if(A(n,d,p,t,c),h)l.__k=[];else if(k=l.props.children,m$1(n,Array.isArray(k)?k:[k],l,u,i,t&&"foreignObject"!==_,o,e,n.firstChild,c),null!=o)for(k=o.length;k--;)null!=o[k]&&s$1(o[k]);c||("value"in d&&void 0!==(k=d.value)&&(k!==n.value||"progress"===_&&!k)&&C(n,"value",k,p.value,!1),"checked"in d&&void 0!==(k=d.checked)&&k!==n.checked&&C(n,"checked",k,p.checked,!1));}return n}function z(l,u,i){try{"function"==typeof l?l(u):l.current=u;}catch(l){n.__e(l,i);}}function L(l,u,i){var t,o,r;if(n.unmount&&n.unmount(l),(t=l.ref)&&(t.current&&t.current!==l.__e||z(t,null,u)),i||"function"==typeof l.type||(i=null!=(o=l.__e)),l.__e=l.__d=void 0,null!=(t=l.__c)){if(t.componentWillUnmount)try{t.componentWillUnmount();}catch(l){n.__e(l,u);}t.base=t.__P=null;}if(t=l.__k)for(r=0;r<t.length;r++)t[r]&&L(t[r],u,i);null!=o&&s$1(o);}function M(n,l,u){return this.constructor(n,u)}function N(l,u,i){var t,o,e;n.__&&n.__(l,u),o=(t="function"==typeof i)?null:i&&i.__k||u.__k,e=[],I(u,l=(!t&&i||u).__k=a$1(y,null,[l]),o||r$1,r$1,void 0!==u.ownerSVGElement,!t&&i?[i]:o?null:u.firstChild?f$1.slice.call(u.childNodes):null,e,!t&&i?i:o?o.__e:u.firstChild,t),T(e,l);}n={__e:function(n,l){for(var u,i,t;l=l.__;)if((u=l.__c)&&!u.__)try{if((i=u.constructor)&&null!=i.getDerivedStateFromError&&(u.setState(i.getDerivedStateFromError(n)),t=u.__d),null!=u.componentDidCatch&&(u.componentDidCatch(n),t=u.__d),t)return u.__E=u}catch(l){n=l;}throw n},__v:0},p$1.prototype.setState=function(n,l){var u;u=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=c$1({},this.state),"function"==typeof n&&(n=n(c$1({},u),this.props)),n&&c$1(u,n),null!=n&&this.__v&&(l&&this.__h.push(l),k$1(this));},p$1.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),k$1(this));},p$1.prototype.render=y,u$1=[],i$1="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,b$1.__r=0;
|
|
5214
5256
|
|
|
5215
5257
|
const Styles = {
|
|
5216
5258
|
Error: {
|
|
@@ -5707,7 +5749,7 @@
|
|
|
5707
5749
|
let closed = false;
|
|
5708
5750
|
function throwIfClosed() {
|
|
5709
5751
|
if (closed)
|
|
5710
|
-
throw new Dexie__default[
|
|
5752
|
+
throw new Dexie__default["default"].DatabaseClosedError();
|
|
5711
5753
|
}
|
|
5712
5754
|
dbOnClosed(dexie, () => {
|
|
5713
5755
|
subscriptions.forEach((subscription) => subscription.unsubscribe());
|
|
@@ -5787,7 +5829,7 @@
|
|
|
5787
5829
|
return permissions(dexie._novip, obj, tableName);
|
|
5788
5830
|
},
|
|
5789
5831
|
};
|
|
5790
|
-
dexie.Version.prototype['_parseStoresSpec'] = Dexie__default[
|
|
5832
|
+
dexie.Version.prototype['_parseStoresSpec'] = Dexie__default["default"].override(dexie.Version.prototype['_parseStoresSpec'], (origFunc) => overrideParseStoresSpec(origFunc, dexie));
|
|
5791
5833
|
dexie.Table.prototype.newId = function ({ colocateWith } = {}) {
|
|
5792
5834
|
const shardKey = colocateWith && colocateWith.substr(colocateWith.length - 3);
|
|
5793
5835
|
return generateKey(dexie.cloud.schema[this.name].idPrefix || '', shardKey);
|
|
@@ -5956,14 +5998,14 @@
|
|
|
5956
5998
|
}
|
|
5957
5999
|
}
|
|
5958
6000
|
dexieCloud.version = '{version}';
|
|
5959
|
-
Dexie__default[
|
|
6001
|
+
Dexie__default["default"].Cloud = dexieCloud;
|
|
5960
6002
|
|
|
5961
|
-
exports
|
|
6003
|
+
exports["default"] = dexieCloud;
|
|
5962
6004
|
exports.dexieCloud = dexieCloud;
|
|
5963
6005
|
exports.getTiedObjectId = getTiedObjectId;
|
|
5964
6006
|
exports.getTiedRealmId = getTiedRealmId;
|
|
5965
6007
|
|
|
5966
6008
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5967
6009
|
|
|
5968
|
-
}))
|
|
6010
|
+
}));
|
|
5969
6011
|
//# sourceMappingURL=dexie-cloud-addon.js.map
|