@nmshd/transport 1.0.6 → 1.1.1

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.
Files changed (70) hide show
  1. package/dist/buildInformation.js +5 -5
  2. package/dist/core/DependencyOverrides.d.ts +4 -0
  3. package/dist/core/DependencyOverrides.js +3 -0
  4. package/dist/core/DependencyOverrides.js.map +1 -0
  5. package/dist/core/Transport.d.ts +2 -3
  6. package/dist/core/Transport.js +26 -23
  7. package/dist/core/Transport.js.map +1 -1
  8. package/dist/core/TransportErrors.d.ts +4 -0
  9. package/dist/core/TransportErrors.js +12 -0
  10. package/dist/core/TransportErrors.js.map +1 -1
  11. package/dist/core/backbone/BackboneIds.d.ts +0 -1
  12. package/dist/core/backbone/BackboneIds.js +0 -1
  13. package/dist/core/backbone/BackboneIds.js.map +1 -1
  14. package/dist/core/backbone/RESTClient.js +1 -1
  15. package/dist/core/backbone/RESTClient.js.map +1 -1
  16. package/dist/core/backbone/index.d.ts +1 -0
  17. package/dist/core/backbone/index.js +1 -0
  18. package/dist/core/backbone/index.js.map +1 -1
  19. package/dist/core/index.d.ts +1 -0
  20. package/dist/core/index.js +1 -0
  21. package/dist/core/index.js.map +1 -1
  22. package/dist/modules/accounts/AccountController.d.ts +3 -2
  23. package/dist/modules/accounts/AccountController.js +9 -7
  24. package/dist/modules/accounts/AccountController.js.map +1 -1
  25. package/dist/modules/devices/DeviceController.d.ts +5 -1
  26. package/dist/modules/devices/DeviceController.js +9 -4
  27. package/dist/modules/devices/DeviceController.js.map +1 -1
  28. package/dist/modules/devices/local/Device.d.ts +2 -0
  29. package/dist/modules/devices/local/Device.js +7 -1
  30. package/dist/modules/devices/local/Device.js.map +1 -1
  31. package/dist/modules/index.d.ts +8 -0
  32. package/dist/modules/index.js +8 -0
  33. package/dist/modules/index.js.map +1 -1
  34. package/dist/modules/relationshipTemplates/RelationshipTemplateController.js +2 -2
  35. package/dist/modules/relationshipTemplates/RelationshipTemplateController.js.map +1 -1
  36. package/dist/modules/sync/DatawalletModificationMapper.d.ts +1 -1
  37. package/dist/modules/sync/DatawalletModificationMapper.js +6 -3
  38. package/dist/modules/sync/DatawalletModificationMapper.js.map +1 -1
  39. package/dist/modules/sync/SyncController.d.ts +17 -4
  40. package/dist/modules/sync/SyncController.js +154 -24
  41. package/dist/modules/sync/SyncController.js.map +1 -1
  42. package/dist/modules/sync/SynchronizedCollection.d.ts +2 -1
  43. package/dist/modules/sync/SynchronizedCollection.js +18 -9
  44. package/dist/modules/sync/SynchronizedCollection.js.map +1 -1
  45. package/dist/modules/sync/backbone/BackboneDatawalletModification.d.ts +1 -0
  46. package/dist/modules/sync/backbone/CreateDatawalletModifications.d.ts +1 -0
  47. package/dist/modules/sync/backbone/FinalizeSyncRun.d.ts +15 -9
  48. package/dist/modules/sync/backbone/GetDatawallet.d.ts +3 -0
  49. package/dist/modules/sync/backbone/GetDatawallet.js +3 -0
  50. package/dist/modules/sync/backbone/GetDatawallet.js.map +1 -0
  51. package/dist/modules/sync/backbone/StartSyncRun.d.ts +8 -0
  52. package/dist/modules/sync/backbone/StartSyncRun.js +6 -1
  53. package/dist/modules/sync/backbone/StartSyncRun.js.map +1 -1
  54. package/dist/modules/sync/backbone/SyncClient.d.ts +21 -6
  55. package/dist/modules/sync/backbone/SyncClient.js +19 -6
  56. package/dist/modules/sync/backbone/SyncClient.js.map +1 -1
  57. package/dist/modules/sync/local/DatawalletModification.d.ts +2 -0
  58. package/dist/modules/sync/local/DatawalletModification.js +5 -0
  59. package/dist/modules/sync/local/DatawalletModification.js.map +1 -1
  60. package/dist/modules/sync/migrations/DeviceMigrations.d.ts +6 -0
  61. package/dist/modules/sync/migrations/DeviceMigrations.js +24 -0
  62. package/dist/modules/sync/migrations/DeviceMigrations.js.map +1 -0
  63. package/dist/modules/sync/migrations/IdentityMigrations.d.ts +6 -0
  64. package/dist/modules/sync/migrations/IdentityMigrations.js +14 -0
  65. package/dist/modules/sync/migrations/IdentityMigrations.js.map +1 -0
  66. package/lib-web/nmshd.transport.js +826 -391
  67. package/lib-web/nmshd.transport.js.map +1 -1
  68. package/lib-web/nmshd.transport.min.js +1 -1
  69. package/lib-web/nmshd.transport.min.js.map +1 -1
  70. package/package.json +29 -29
@@ -15,11 +15,11 @@ exports.buildInformation = void 0;
15
15
  const ts_serval_1 = __webpack_require__(/*! @js-soft/ts-serval */ "@js-soft/ts-serval");
16
16
  const crypto_1 = __webpack_require__(/*! @nmshd/crypto */ "@nmshd/crypto");
17
17
  exports.buildInformation = {
18
- version: "1.0.6",
19
- build: "9",
20
- date: "2021-10-11T06:04:50+00:00",
21
- commit: "ee6b38d8aa591a8581846d8e660f75ec5eccdbb4",
22
- dependencies: {"@js-soft/docdb-access-abstractions":"1.0.1","@js-soft/logging-abstractions":"1.0.0","@js-soft/simple-logger":"1.0.0","@js-soft/ts-utils":"1.0.1","axios":"^0.22.0","deep-equal":"^2.0.5","fast-json-patch":"^3.1.0","form-data":"^4.0.0","json-stringify-safe":"^5.0.1","lodash":"^4.17.21","luxon":"^2.0.2","qs":"^6.10.1","reflect-metadata":"^0.1.13","ts-simple-nameof":"^1.3.1","uuid":"^8.3.2"},
18
+ version: "1.1.1",
19
+ build: "13",
20
+ date: "2021-12-16T08:03:23+00:00",
21
+ commit: "1ae50acab4b20e3bddc97b95c5505feebd54669e",
22
+ dependencies: {"@js-soft/docdb-access-abstractions":"1.0.1","@js-soft/logging-abstractions":"1.0.0","@js-soft/simple-logger":"1.0.0","@js-soft/ts-utils":"1.1.1","axios":"^0.24.0","deep-equal":"^2.0.5","fast-json-patch":"^3.1.0","form-data":"^4.0.0","json-stringify-safe":"^5.0.1","lodash":"^4.17.21","luxon":"^2.2.0","qs":"^6.10.2","reflect-metadata":"^0.1.13","ts-simple-nameof":"^1.3.1","uuid":"^8.3.2"},
23
23
  libraries: {
24
24
  crypto: crypto_1.buildInformation,
25
25
  serval: ts_serval_1.buildInformation
@@ -572,6 +572,19 @@ var DbCollectionName;
572
572
 
573
573
  /***/ }),
574
574
 
575
+ /***/ "./dist/core/DependencyOverrides.js":
576
+ /*!******************************************!*\
577
+ !*** ./dist/core/DependencyOverrides.js ***!
578
+ \******************************************/
579
+ /***/ ((__unused_webpack_module, exports) => {
580
+
581
+ "use strict";
582
+
583
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
584
+ //# sourceMappingURL=DependencyOverrides.js.map
585
+
586
+ /***/ }),
587
+
575
588
  /***/ "./dist/core/Transport.js":
576
589
  /*!********************************!*\
577
590
  !*** ./dist/core/Transport.js ***!
@@ -595,30 +608,8 @@ const TransportLoggerFactory_1 = __webpack_require__(/*! ./TransportLoggerFactor
595
608
  let log;
596
609
  class Transport {
597
610
  constructor(databaseConnection, customConfig, loggerFactory = new simple_logger_1.SimpleLoggerFactory()) {
598
- this.defaultConfig = {
599
- debug: false,
600
- platformClientId: "",
601
- platformClientSecret: "",
602
- platformTimeout: 60000,
603
- platformMaxRedirects: 10,
604
- platformMaxUnencryptedFileSize: 10 * 1024 * 1024,
605
- baseUrl: "",
606
- useGateway: true,
607
- realm: Identity_1.Realm.Prod,
608
- datawalletEnabled: false,
609
- httpAgent: {
610
- keepAlive: true,
611
- maxSockets: 5,
612
- maxFreeSockets: 2
613
- },
614
- httpsAgent: {
615
- keepAlive: true,
616
- maxSockets: 5,
617
- maxFreeSockets: 2
618
- }
619
- };
620
611
  this.databaseConnection = databaseConnection;
621
- this._config = lodash_1.default.defaultsDeep({}, customConfig, this.defaultConfig);
612
+ this._config = lodash_1.default.defaultsDeep({}, customConfig, Transport.defaultConfig);
622
613
  TransportLoggerFactory_1.TransportLoggerFactory.init(loggerFactory);
623
614
  log = TransportLoggerFactory_1.TransportLoggerFactory.getLogger(Transport);
624
615
  if (!this._config.platformClientId) {
@@ -630,6 +621,9 @@ class Transport {
630
621
  if (!this._config.baseUrl) {
631
622
  throw TransportErrors_1.TransportErrors.general.baseUrlNotSet().logWith(log);
632
623
  }
624
+ if (this._config.supportedDatawalletVersion < 1) {
625
+ throw TransportErrors_1.TransportErrors.general.invalidDatawalletVersion().logWith(log);
626
+ }
633
627
  }
634
628
  get config() {
635
629
  return this._config;
@@ -649,6 +643,28 @@ class Transport {
649
643
  }
650
644
  }
651
645
  exports.Transport = Transport;
646
+ Transport.defaultConfig = {
647
+ supportedDatawalletVersion: 1,
648
+ debug: false,
649
+ platformClientId: "",
650
+ platformClientSecret: "",
651
+ platformTimeout: 60000,
652
+ platformMaxRedirects: 10,
653
+ platformMaxUnencryptedFileSize: 10 * 1024 * 1024,
654
+ baseUrl: "",
655
+ realm: Identity_1.Realm.Prod,
656
+ datawalletEnabled: false,
657
+ httpAgent: {
658
+ keepAlive: true,
659
+ maxSockets: 5,
660
+ maxFreeSockets: 2
661
+ },
662
+ httpsAgent: {
663
+ keepAlive: true,
664
+ maxSockets: 5,
665
+ maxFreeSockets: 2
666
+ }
667
+ };
652
668
  //# sourceMappingURL=Transport.js.map
653
669
 
654
670
  /***/ }),
@@ -990,6 +1006,15 @@ class Datawallet {
990
1006
  throw new Error(`Given type '${type}' is not supported.`);
991
1007
  }
992
1008
  }
1009
+ insufficientSupportedDatawalletVersion(supportedVersion, requiredVersion) {
1010
+ return new CoreError_1.CoreError("error.transport.datawallet.insufficientSupportedDatawalletVersion", `The SupportedDatawalletVersion '${supportedVersion}' is too low. A minimum version of '${requiredVersion}' is required.`);
1011
+ }
1012
+ currentBiggerThanTarget(current, target) {
1013
+ return new CoreError_1.CoreError("error.transport.datawallet.currentBiggerThanTarget", `The current datawallet version '${current}' is bigger than the target version '${target}'.`);
1014
+ }
1015
+ noMigrationAvailable(version) {
1016
+ return new CoreError_1.CoreError("error.core.datawallet.noMigrationAvailable", `There is no migration available for the datawallet version '${version}'.`);
1017
+ }
993
1018
  }
994
1019
  class Files {
995
1020
  plaintextHashMismatch() {
@@ -1020,6 +1045,9 @@ class Tokens {
1020
1045
  }
1021
1046
  }
1022
1047
  class General {
1048
+ invalidDatawalletVersion() {
1049
+ return new CoreError_1.CoreError("error.transport.general.invalidDatawalletVersion", "The given identity version is invalid. The value must be 0 or higher.");
1050
+ }
1023
1051
  baseUrlNotSet() {
1024
1052
  return new CoreError_1.CoreError("error.transport.general.baseUrlNotSet", "The baseUrl was not set.");
1025
1053
  }
@@ -1282,7 +1310,6 @@ class BackboneIds {
1282
1310
  exports.BackboneIds = BackboneIds;
1283
1311
  BackboneIds.file = new CoreIdHelper_1.CoreIdHelper("FIL", true);
1284
1312
  BackboneIds.relationship = new CoreIdHelper_1.CoreIdHelper("REL", true);
1285
- BackboneIds.relationshipRequest = new CoreIdHelper_1.CoreIdHelper("RRQ", true);
1286
1313
  BackboneIds.message = new CoreIdHelper_1.CoreIdHelper("MSG", true);
1287
1314
  BackboneIds.relationshipTemplate = new CoreIdHelper_1.CoreIdHelper("RLT", true);
1288
1315
  BackboneIds.token = new CoreIdHelper_1.CoreIdHelper("TOK", true);
@@ -1479,7 +1506,7 @@ class RESTClient {
1479
1506
  }
1480
1507
  };
1481
1508
  if (this.config.platformAdditionalHeaders) {
1482
- defaults.headers = this.config.platformAdditionalHeaders;
1509
+ defaults.headers = lodash_1.default.defaultsDeep({}, defaults.headers, this.config.platformAdditionalHeaders);
1483
1510
  }
1484
1511
  if (typeof http_1.Agent !== "undefined" && typeof https_1.Agent !== "undefined") {
1485
1512
  defaults.httpAgent = this.createHTTPAgent();
@@ -2060,6 +2087,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
2060
2087
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
2061
2088
  };
2062
2089
  Object.defineProperty(exports, "__esModule", ({ value: true }));
2090
+ __exportStar(__webpack_require__(/*! ./Authenticator */ "./dist/core/backbone/Authenticator.js"), exports);
2063
2091
  __exportStar(__webpack_require__(/*! ./BackboneIds */ "./dist/core/backbone/BackboneIds.js"), exports);
2064
2092
  __exportStar(__webpack_require__(/*! ./ClientResult */ "./dist/core/backbone/ClientResult.js"), exports);
2065
2093
  __exportStar(__webpack_require__(/*! ./Paginator */ "./dist/core/backbone/Paginator.js"), exports);
@@ -2097,6 +2125,7 @@ __exportStar(__webpack_require__(/*! ./CoreSerializable */ "./dist/core/CoreSeri
2097
2125
  __exportStar(__webpack_require__(/*! ./CoreSerializableAsync */ "./dist/core/CoreSerializableAsync.js"), exports);
2098
2126
  __exportStar(__webpack_require__(/*! ./CoreSynchronizable */ "./dist/core/CoreSynchronizable.js"), exports);
2099
2127
  __exportStar(__webpack_require__(/*! ./CoreUtil */ "./dist/core/CoreUtil.js"), exports);
2128
+ __exportStar(__webpack_require__(/*! ./DependencyOverrides */ "./dist/core/DependencyOverrides.js"), exports);
2100
2129
  __exportStar(__webpack_require__(/*! ./Transport */ "./dist/core/Transport.js"), exports);
2101
2130
  __exportStar(__webpack_require__(/*! ./TransportContext */ "./dist/core/TransportContext.js"), exports);
2102
2131
  __exportStar(__webpack_require__(/*! ./TransportController */ "./dist/core/TransportController.js"), exports);
@@ -2608,11 +2637,11 @@ const Identity_1 = __webpack_require__(/*! ./data/Identity */ "./dist/modules/ac
2608
2637
  const IdentityController_1 = __webpack_require__(/*! ./IdentityController */ "./dist/modules/accounts/IdentityController.js");
2609
2638
  const IdentityUtil_1 = __webpack_require__(/*! ./IdentityUtil */ "./dist/modules/accounts/IdentityUtil.js");
2610
2639
  class AccountController {
2611
- constructor(_transport, _realm, _db, _config) {
2640
+ constructor(_transport, _db, _config, dependencyOverrides = {}) {
2612
2641
  this._transport = _transport;
2613
- this._realm = _realm;
2614
2642
  this._db = _db;
2615
2643
  this._config = _config;
2644
+ this.dependencyOverrides = dependencyOverrides;
2616
2645
  this._dbClosed = false;
2617
2646
  this.autoSync = true;
2618
2647
  this._authenticator = new Authenticator_1.Authenticator(this);
@@ -2663,7 +2692,7 @@ class AccountController {
2663
2692
  if (!deviceSharedSecret) {
2664
2693
  // Identity creation
2665
2694
  this._log.trace("No account information found. Creating new account...");
2666
- const result = await this.createIdentityAndDevice(this._realm);
2695
+ const result = await this.createIdentityAndDevice(this.config.realm);
2667
2696
  identityCreated = true;
2668
2697
  device = result.device;
2669
2698
  this.deviceAuthClient = new DeviceAuthClient_1.DeviceAuthClient(this.config, this.authenticator);
@@ -2697,6 +2726,7 @@ class AccountController {
2697
2726
  await this.initControllers();
2698
2727
  if (identityCreated) {
2699
2728
  await this.devices.addExistingDevice(device);
2729
+ await this.synchronization.setInititalDatawalletVersion(this._config.supportedDatawalletVersion);
2700
2730
  }
2701
2731
  else if (deviceUpdated) {
2702
2732
  await this.syncDatawallet();
@@ -2714,7 +2744,6 @@ class AccountController {
2714
2744
  }
2715
2745
  async initControllers() {
2716
2746
  this._log.trace("Initializing controllers...");
2717
- this.synchronization = await new SyncController_1.SyncController(this, this.unpushedDatawalletModifications, this.config.datawalletEnabled).init();
2718
2747
  this.relationshipSecrets = await new RelationshipSecretController_1.RelationshipSecretController(this).init();
2719
2748
  this.devices = await new DevicesController_1.DevicesController(this).init();
2720
2749
  this.certificates = await new CertificateController_1.CertificateController(this).init();
@@ -2725,6 +2754,7 @@ class AccountController {
2725
2754
  this.relationshipTemplates = await new RelationshipTemplateController_1.RelationshipTemplateController(this, this.relationshipSecrets).init();
2726
2755
  this.messages = await new MessageController_1.MessageController(this).init();
2727
2756
  this.tokens = await new TokenController_1.TokenController(this).init();
2757
+ this.synchronization = await new SyncController_1.SyncController(this, this.dependencyOverrides, this.unpushedDatawalletModifications, this.config.datawalletEnabled).init();
2728
2758
  this._log.trace("Initialization of controllers finished.");
2729
2759
  }
2730
2760
  disableAutoSync() {
@@ -2817,7 +2847,8 @@ class AccountController {
2817
2847
  publicKey: deviceKeypair.publicKey,
2818
2848
  type: deviceInfo.type,
2819
2849
  certificate: "",
2820
- username: deviceResponse.device.username
2850
+ username: deviceResponse.device.username,
2851
+ datawalletVersion: this._config.supportedDatawalletVersion
2821
2852
  });
2822
2853
  // Initialize required controllers
2823
2854
  await Promise.all([this.identity.init(identity), this.activeDevice.init(privBaseDevice, device)]);
@@ -2903,9 +2934,9 @@ class AccountController {
2903
2934
  async getSynchronizedCollection(collectionName) {
2904
2935
  const collection = await this.db.getCollection(collectionName);
2905
2936
  if (!this.config.datawalletEnabled) {
2906
- return new SynchronizedCollection_1.SynchronizedCollection(collection);
2937
+ return new SynchronizedCollection_1.SynchronizedCollection(collection, this.config.supportedDatawalletVersion);
2907
2938
  }
2908
- return new SynchronizedCollection_1.SynchronizedCollection(collection, this.unpushedDatawalletModifications);
2939
+ return new SynchronizedCollection_1.SynchronizedCollection(collection, this.config.supportedDatawalletVersion, this.unpushedDatawalletModifications);
2909
2940
  }
2910
2941
  }
2911
2942
  exports.AccountController = AccountController;
@@ -4445,10 +4476,15 @@ class DeviceController extends core_1.TransportController {
4445
4476
  throw e;
4446
4477
  }
4447
4478
  }
4448
- async update(name, description) {
4449
- this.device.name = name;
4450
- this.device.description = description;
4451
- await this.parent.info.set("device", this.device);
4479
+ async update(update) {
4480
+ if (update.name)
4481
+ this.device.name = update.name;
4482
+ if (update.description)
4483
+ this.device.description = update.description;
4484
+ if (update.datawalletVersion)
4485
+ this.device.datawalletVersion = update.datawalletVersion;
4486
+ await this.parent.devices.update(this.device);
4487
+ await this.parent.info.set("device", this.device.toJSON());
4452
4488
  }
4453
4489
  async sign(content) {
4454
4490
  const privateKeyContainer = await this.secrets.loadSecret(DeviceSecretController_1.DeviceSecretType.DeviceSignature);
@@ -4886,7 +4922,8 @@ let Device = Device_1 = class Device extends core_1.CoreSynchronizable {
4886
4922
  (0, ts_simple_nameof_1.nameof)((d) => d.createdByDevice),
4887
4923
  (0, ts_simple_nameof_1.nameof)((d) => d.lastLoginAt),
4888
4924
  (0, ts_simple_nameof_1.nameof)((d) => d.username),
4889
- (0, ts_simple_nameof_1.nameof)((d) => d.initialPassword)
4925
+ (0, ts_simple_nameof_1.nameof)((d) => d.initialPassword),
4926
+ (0, ts_simple_nameof_1.nameof)((d) => d.datawalletVersion)
4890
4927
  ];
4891
4928
  this.userdataProperties = [(0, ts_simple_nameof_1.nameof)((d) => d.name), (0, ts_simple_nameof_1.nameof)((d) => d.description)];
4892
4929
  }
@@ -4954,6 +4991,11 @@ __decorate([
4954
4991
  (0, ts_serval_1.serialize)(),
4955
4992
  __metadata("design:type", Boolean)
4956
4993
  ], Device.prototype, "isAdmin", void 0);
4994
+ __decorate([
4995
+ (0, ts_serval_1.validate)({ nullable: true }),
4996
+ (0, ts_serval_1.serialize)(),
4997
+ __metadata("design:type", Number)
4998
+ ], Device.prototype, "datawalletVersion", void 0);
4957
4999
  Device = Device_1 = __decorate([
4958
5000
  (0, ts_serval_1.type)("Device")
4959
5001
  ], Device);
@@ -6034,6 +6076,14 @@ __exportStar(__webpack_require__(/*! ./relationshipTemplates/transmission/Relati
6034
6076
  __exportStar(__webpack_require__(/*! ./secrets/data/SecretContainerCipher */ "./dist/modules/secrets/data/SecretContainerCipher.js"), exports);
6035
6077
  __exportStar(__webpack_require__(/*! ./secrets/data/SecretContainerPlain */ "./dist/modules/secrets/data/SecretContainerPlain.js"), exports);
6036
6078
  __exportStar(__webpack_require__(/*! ./secrets/SecretController */ "./dist/modules/secrets/SecretController.js"), exports);
6079
+ __exportStar(__webpack_require__(/*! ./sync/backbone/BackboneDatawalletModification */ "./dist/modules/sync/backbone/BackboneDatawalletModification.js"), exports);
6080
+ __exportStar(__webpack_require__(/*! ./sync/backbone/BackboneExternalEvent */ "./dist/modules/sync/backbone/BackboneExternalEvent.js"), exports);
6081
+ __exportStar(__webpack_require__(/*! ./sync/backbone/CreateDatawalletModifications */ "./dist/modules/sync/backbone/CreateDatawalletModifications.js"), exports);
6082
+ __exportStar(__webpack_require__(/*! ./sync/backbone/FinalizeSyncRun */ "./dist/modules/sync/backbone/FinalizeSyncRun.js"), exports);
6083
+ __exportStar(__webpack_require__(/*! ./sync/backbone/GetDatawallet */ "./dist/modules/sync/backbone/GetDatawallet.js"), exports);
6084
+ __exportStar(__webpack_require__(/*! ./sync/backbone/GetDatawalletModifications */ "./dist/modules/sync/backbone/GetDatawalletModifications.js"), exports);
6085
+ __exportStar(__webpack_require__(/*! ./sync/backbone/StartSyncRun */ "./dist/modules/sync/backbone/StartSyncRun.js"), exports);
6086
+ __exportStar(__webpack_require__(/*! ./sync/backbone/SyncClient */ "./dist/modules/sync/backbone/SyncClient.js"), exports);
6037
6087
  __exportStar(__webpack_require__(/*! ./sync/ChangedItems */ "./dist/modules/sync/ChangedItems.js"), exports);
6038
6088
  __exportStar(__webpack_require__(/*! ./sync/DatawalletModificationsProcessor */ "./dist/modules/sync/DatawalletModificationsProcessor.js"), exports);
6039
6089
  __exportStar(__webpack_require__(/*! ./sync/ExternalEventsProcessor */ "./dist/modules/sync/ExternalEventsProcessor.js"), exports);
@@ -7044,7 +7094,7 @@ class RelationshipTemplateController extends TransportController_1.TransportCont
7044
7094
  const templateKey = await this.secrets.createTemplateKey();
7045
7095
  const templateContent = await RelationshipTemplateContent_1.RelationshipTemplateContent.from({
7046
7096
  content: parameters.content,
7047
- identity: this.parent.identity,
7097
+ identity: this.parent.identity.identity,
7048
7098
  templateKey: templateKey
7049
7099
  });
7050
7100
  const secretKey = await core_1.CoreCrypto.generateSecretKey();
@@ -7068,7 +7118,7 @@ class RelationshipTemplateController extends TransportController_1.TransportCont
7068
7118
  createdBy: this.parent.identity.address,
7069
7119
  createdByDevice: this.parent.activeDevice.id,
7070
7120
  expiresAt: parameters.expiresAt,
7071
- identity: this.parent.identity,
7121
+ identity: this.parent.identity.identity,
7072
7122
  maxNumberOfRelationships: (_a = parameters.maxNumberOfRelationships) !== null && _a !== void 0 ? _a : undefined,
7073
7123
  templateKey: templateKey
7074
7124
  });
@@ -9669,7 +9719,7 @@ exports.DatawalletModificationMapper = void 0;
9669
9719
  const core_1 = __webpack_require__(/*! ../../core */ "./dist/core/index.js");
9670
9720
  const DatawalletModification_1 = __webpack_require__(/*! ./local/DatawalletModification */ "./dist/modules/sync/local/DatawalletModification.js");
9671
9721
  class DatawalletModificationMapper {
9672
- static async fromBackboneDatawalletModification(backboneDatawalletModification, decryptedPayload) {
9722
+ static async fromBackboneDatawalletModification(backboneDatawalletModification, decryptedPayload, datawalletVersion) {
9673
9723
  let type;
9674
9724
  switch (backboneDatawalletModification.type) {
9675
9725
  case "Create":
@@ -9710,16 +9760,19 @@ class DatawalletModificationMapper {
9710
9760
  payloadCategory: payloadCategory,
9711
9761
  collection: backboneDatawalletModification.collection,
9712
9762
  type: type,
9713
- payload: decryptedPayload
9763
+ payload: decryptedPayload,
9764
+ datawalletVersion: datawalletVersion
9714
9765
  });
9715
9766
  }
9716
9767
  static toCreateDatawalletModificationsRequestItem(datawalletModification, encryptedPayload) {
9768
+ var _a;
9717
9769
  return {
9718
9770
  objectIdentifier: datawalletModification.objectIdentifier.toString(),
9719
9771
  payloadCategory: datawalletModification.payloadCategory,
9720
9772
  collection: datawalletModification.collection,
9721
9773
  type: datawalletModification.type,
9722
- encryptedPayload: encryptedPayload
9774
+ encryptedPayload: encryptedPayload,
9775
+ datawalletVersion: (_a = datawalletModification.datawalletVersion) !== null && _a !== void 0 ? _a : 0
9723
9776
  };
9724
9777
  }
9725
9778
  }
@@ -10034,15 +10087,26 @@ const DatawalletModificationMapper_1 = __webpack_require__(/*! ./DatawalletModif
10034
10087
  const DatawalletModificationsProcessor_1 = __webpack_require__(/*! ./DatawalletModificationsProcessor */ "./dist/modules/sync/DatawalletModificationsProcessor.js");
10035
10088
  const ExternalEventsProcessor_1 = __webpack_require__(/*! ./ExternalEventsProcessor */ "./dist/modules/sync/ExternalEventsProcessor.js");
10036
10089
  const DatawalletModification_1 = __webpack_require__(/*! ./local/DatawalletModification */ "./dist/modules/sync/local/DatawalletModification.js");
10090
+ const DeviceMigrations_1 = __webpack_require__(/*! ./migrations/DeviceMigrations */ "./dist/modules/sync/migrations/DeviceMigrations.js");
10091
+ const IdentityMigrations_1 = __webpack_require__(/*! ./migrations/IdentityMigrations */ "./dist/modules/sync/migrations/IdentityMigrations.js");
10037
10092
  class SyncController extends core_1.TransportController {
10038
- constructor(parent, unpushedDatawalletModifications, datawalletEnabled) {
10093
+ constructor(parent, dependencyOverrides, unpushedDatawalletModifications, datawalletEnabled) {
10094
+ var _a;
10039
10095
  super(core_1.ControllerName.Sync, parent);
10040
10096
  this.unpushedDatawalletModifications = unpushedDatawalletModifications;
10041
10097
  this.datawalletEnabled = datawalletEnabled;
10098
+ this.client = (_a = dependencyOverrides.syncClient) !== null && _a !== void 0 ? _a : new SyncClient_1.SyncClient(this.config, this.parent.authenticator);
10099
+ this.identityMigrations = new IdentityMigrations_1.IdentityMigrations(this.parent);
10100
+ this.deviceMigrations = new DeviceMigrations_1.DeviceMigrations(this.parent);
10101
+ }
10102
+ get cacheFetcher() {
10103
+ if (!this._cacheFetcher) {
10104
+ this._cacheFetcher = new DatawalletModificationsProcessor_1.CacheFetcher(this.parent.files, this.parent.messages, this.parent.relationshipTemplates, this.parent.relationships, this.parent.tokens);
10105
+ }
10106
+ return this._cacheFetcher;
10042
10107
  }
10043
10108
  async init() {
10044
10109
  await super.init();
10045
- this.client = new SyncClient_1.SyncClient(this.config, this.parent.authenticator);
10046
10110
  this.syncInfo = await this.db.getMap("SyncInfo");
10047
10111
  return this;
10048
10112
  }
@@ -10071,33 +10135,120 @@ class SyncController extends core_1.TransportController {
10071
10135
  if (whatToSync === "OnlyDatawallet") {
10072
10136
  return await this.syncDatawallet();
10073
10137
  }
10074
- const syncRunWasStarted = await this.startSyncRun();
10075
- if (!syncRunWasStarted) {
10076
- await this.syncDatawallet();
10077
- await this.setLastCompletedSyncTime();
10078
- return new ChangedItems_1.ChangedItems();
10079
- }
10080
- await this.applyIncomingDatawalletModifications();
10081
- const result = await this.applyIncomingExternalEvents();
10082
- await this.finalizeSyncRun(result.results);
10138
+ const externalEventSyncResult = await this.syncExternalEvents();
10083
10139
  await this.setLastCompletedSyncTime();
10084
- if (result.results.some((r) => r.errorCode !== undefined)) {
10085
- throw new core_1.CoreError("error.transport.errorWhileApplyingExternalEvents", result.results
10140
+ if (externalEventSyncResult.externalEventResults.some((r) => r.errorCode !== undefined)) {
10141
+ throw new core_1.CoreError("error.transport.errorWhileApplyingExternalEvents", externalEventSyncResult.externalEventResults
10086
10142
  .filter((r) => r.errorCode !== undefined)
10087
10143
  .map((r) => r.errorCode)
10088
10144
  .join(" | ")).logWith(this.log);
10089
10145
  }
10090
- return result.changedItems;
10146
+ return externalEventSyncResult.changedItems;
10147
+ }
10148
+ async syncExternalEvents() {
10149
+ const syncRunWasStarted = await this.startExternalEventsSyncRun();
10150
+ if (!syncRunWasStarted) {
10151
+ await this.syncDatawallet();
10152
+ return {
10153
+ changedItems: new ChangedItems_1.ChangedItems(),
10154
+ externalEventResults: []
10155
+ };
10156
+ }
10157
+ await this.applyIncomingDatawalletModifications();
10158
+ const result = await this.applyIncomingExternalEvents();
10159
+ await this.finalizeExternalEventsSyncRun(result.externalEventResults);
10160
+ return result;
10091
10161
  }
10092
10162
  async syncDatawallet() {
10093
10163
  if (!this.datawalletEnabled) {
10094
10164
  return;
10095
10165
  }
10166
+ const identityDatawalletVersion = await this.getIdentityDatawalletVersion();
10167
+ if (this.config.supportedDatawalletVersion < identityDatawalletVersion) {
10168
+ // This means that the datawallet of the identity was upgraded by another device with a higher version.
10169
+ // It is necesssary to update the current device.
10170
+ throw core_1.TransportErrors.datawallet
10171
+ .insufficientSupportedDatawalletVersion(this.config.supportedDatawalletVersion, identityDatawalletVersion)
10172
+ .logWith(this.log);
10173
+ }
10096
10174
  this.log.trace("Synchronization of Datawallet events started...");
10097
- await this.applyIncomingDatawalletModifications();
10098
- await this.pushLocalDatawalletModifications();
10099
- await this.setLastCompletedDatawalletSyncTime();
10175
+ try {
10176
+ await this.applyIncomingDatawalletModifications();
10177
+ await this.pushLocalDatawalletModifications();
10178
+ await this.setLastCompletedDatawalletSyncTime();
10179
+ }
10180
+ catch (e) {
10181
+ const outdatedErrorCode = "error.platform.validation.datawallet.insufficientSupportedDatawalletVersion";
10182
+ if (!(e instanceof core_1.RequestError) || e.code !== outdatedErrorCode)
10183
+ throw e;
10184
+ throw core_1.TransportErrors.datawallet
10185
+ .insufficientSupportedDatawalletVersion(this.config.supportedDatawalletVersion, identityDatawalletVersion)
10186
+ .logWith(this.log);
10187
+ }
10100
10188
  this.log.trace("Synchronization of Datawallet events ended...");
10189
+ await this.checkDatawalletVersion(identityDatawalletVersion);
10190
+ }
10191
+ async checkDatawalletVersion(identityDatawalletVersion) {
10192
+ var _a;
10193
+ if (this.config.supportedDatawalletVersion < identityDatawalletVersion) {
10194
+ throw core_1.TransportErrors.datawallet
10195
+ .insufficientSupportedDatawalletVersion(this.config.supportedDatawalletVersion, identityDatawalletVersion)
10196
+ .logWith(this.log);
10197
+ }
10198
+ if (this.config.supportedDatawalletVersion > identityDatawalletVersion) {
10199
+ await this.upgradeIdentityDatawalletVersion(identityDatawalletVersion, this.config.supportedDatawalletVersion);
10200
+ }
10201
+ const deviceDatawalletVersion = (_a = this.parent.activeDevice.device.datawalletVersion) !== null && _a !== void 0 ? _a : 0;
10202
+ if (deviceDatawalletVersion < identityDatawalletVersion) {
10203
+ await this.upgradeDeviceDatawalletVersion(deviceDatawalletVersion, this.config.supportedDatawalletVersion);
10204
+ }
10205
+ }
10206
+ async upgradeIdentityDatawalletVersion(identityDatawalletVersion, targetDatawalletVersion) {
10207
+ if (identityDatawalletVersion === targetDatawalletVersion)
10208
+ return;
10209
+ if (this.config.supportedDatawalletVersion < targetDatawalletVersion) {
10210
+ throw core_1.TransportErrors.datawallet
10211
+ .insufficientSupportedDatawalletVersion(targetDatawalletVersion, identityDatawalletVersion)
10212
+ .logWith(this.log);
10213
+ }
10214
+ if (identityDatawalletVersion > targetDatawalletVersion) {
10215
+ throw core_1.TransportErrors.datawallet
10216
+ .currentBiggerThanTarget(identityDatawalletVersion, targetDatawalletVersion)
10217
+ .logWith(this.log);
10218
+ }
10219
+ while (identityDatawalletVersion < targetDatawalletVersion) {
10220
+ identityDatawalletVersion++;
10221
+ await this.startDatawalletVersionUpgradeSyncRun();
10222
+ const migrationFunction = this.identityMigrations[`v${identityDatawalletVersion}`];
10223
+ if (!migrationFunction) {
10224
+ throw core_1.TransportErrors.datawallet.noMigrationAvailable(identityDatawalletVersion).logWith(this.log);
10225
+ }
10226
+ await migrationFunction.call(this.identityMigrations);
10227
+ await this.finalizeDatawalletVersionUpgradeSyncRun(identityDatawalletVersion);
10228
+ }
10229
+ }
10230
+ async upgradeDeviceDatawalletVersion(deviceDatawalletVersion, targetDatawalletVersion) {
10231
+ if (deviceDatawalletVersion === targetDatawalletVersion)
10232
+ return;
10233
+ if (this.config.supportedDatawalletVersion < targetDatawalletVersion) {
10234
+ throw core_1.TransportErrors.datawallet
10235
+ .insufficientSupportedDatawalletVersion(targetDatawalletVersion, deviceDatawalletVersion)
10236
+ .logWith(this.log);
10237
+ }
10238
+ if (deviceDatawalletVersion > targetDatawalletVersion) {
10239
+ throw core_1.TransportErrors.datawallet
10240
+ .currentBiggerThanTarget(deviceDatawalletVersion, targetDatawalletVersion)
10241
+ .logWith(this.log);
10242
+ }
10243
+ while (deviceDatawalletVersion < targetDatawalletVersion) {
10244
+ deviceDatawalletVersion++;
10245
+ const migrationFunction = this.deviceMigrations[`v${deviceDatawalletVersion}`];
10246
+ if (!migrationFunction) {
10247
+ throw core_1.TransportErrors.datawallet.noMigrationAvailable(deviceDatawalletVersion).logWith(this.log);
10248
+ }
10249
+ await migrationFunction.call(this.deviceMigrations);
10250
+ await this.parent.activeDevice.update({ datawalletVersion: deviceDatawalletVersion });
10251
+ }
10101
10252
  }
10102
10253
  async applyIncomingDatawalletModifications() {
10103
10254
  const getDatawalletModificationsResult = await this.client.getDatawalletModifications({
@@ -10109,7 +10260,7 @@ class SyncController extends core_1.TransportController {
10109
10260
  }
10110
10261
  const incomingModifications = await this.decryptDatawalletModifications(encryptedIncomingModifications);
10111
10262
  this.log.trace(`${incomingModifications.length} incoming modifications found`);
10112
- const datawalletModificationsProcessor = new DatawalletModificationsProcessor_1.DatawalletModificationsProcessor(incomingModifications, new DatawalletModificationsProcessor_1.CacheFetcher(this.parent.files, this.parent.messages, this.parent.relationshipTemplates, this.parent.relationships, this.parent.tokens), this._db, core_1.TransportLoggerFactory.getLogger(DatawalletModificationsProcessor_1.DatawalletModificationsProcessor));
10263
+ const datawalletModificationsProcessor = new DatawalletModificationsProcessor_1.DatawalletModificationsProcessor(incomingModifications, this.cacheFetcher, this._db, core_1.TransportLoggerFactory.getLogger(DatawalletModificationsProcessor_1.DatawalletModificationsProcessor));
10113
10264
  await datawalletModificationsProcessor.execute();
10114
10265
  this.log.trace(`${incomingModifications.length} incoming modifications executed`, incomingModifications);
10115
10266
  await this.updateLocalDatawalletModificationIndex(encryptedIncomingModifications.sort(descending)[0].index);
@@ -10118,7 +10269,7 @@ class SyncController extends core_1.TransportController {
10118
10269
  const decryptedModifications = [];
10119
10270
  for (const encryptedModification of encryptedModifications) {
10120
10271
  const decryptedPayload = await this.parent.activeDevice.secrets.decryptDatawalletModificationPayload(encryptedModification.encryptedPayload, encryptedModification.index);
10121
- const decryptedModification = await DatawalletModificationMapper_1.DatawalletModificationMapper.fromBackboneDatawalletModification(encryptedModification, decryptedPayload);
10272
+ const decryptedModification = await DatawalletModificationMapper_1.DatawalletModificationMapper.fromBackboneDatawalletModification(encryptedModification, decryptedPayload, this.config.supportedDatawalletVersion);
10122
10273
  decryptedModifications.push(decryptedModification);
10123
10274
  }
10124
10275
  return decryptedModifications;
@@ -10157,15 +10308,29 @@ class SyncController extends core_1.TransportController {
10157
10308
  await this.unpushedDatawalletModifications.delete({ localId: localModificationId.toString() });
10158
10309
  }
10159
10310
  }
10160
- async startSyncRun() {
10311
+ async setInititalDatawalletVersion(version) {
10312
+ await this.startDatawalletVersionUpgradeSyncRun();
10313
+ await this.finalizeDatawalletVersionUpgradeSyncRun(version);
10314
+ }
10315
+ async getIdentityDatawalletVersion() {
10316
+ const datawalletInfo = (await this.client.getDatawallet()).value;
10317
+ return datawalletInfo.version;
10318
+ }
10319
+ async startExternalEventsSyncRun() {
10161
10320
  var _a;
10162
- const result = await this.client.startSyncRun();
10321
+ const result = await this.client.startSyncRun({ type: StartSyncRun_1.SyncRunType.ExternalEventSync });
10163
10322
  if (result.value.status === StartSyncRun_1.StartSyncRunStatus.NoNewEvents) {
10164
10323
  return false;
10165
10324
  }
10166
10325
  this.currentSyncRun = (_a = result.value.syncRun) !== null && _a !== void 0 ? _a : undefined;
10167
10326
  return this.currentSyncRun !== undefined;
10168
10327
  }
10328
+ async startDatawalletVersionUpgradeSyncRun() {
10329
+ var _a;
10330
+ const result = await this.client.startSyncRun({ type: StartSyncRun_1.SyncRunType.DatawalletVersionUpgrade });
10331
+ this.currentSyncRun = (_a = result.value.syncRun) !== null && _a !== void 0 ? _a : undefined;
10332
+ return this.currentSyncRun !== undefined;
10333
+ }
10169
10334
  async applyIncomingExternalEvents() {
10170
10335
  const getExternalEventsResult = await this.client.getExternalEventsOfSyncRun(this.currentSyncRun.id.toString());
10171
10336
  if (getExternalEventsResult.isError) {
@@ -10174,14 +10339,17 @@ class SyncController extends core_1.TransportController {
10174
10339
  const externalEvents = await getExternalEventsResult.value.collect();
10175
10340
  const externalEventProcessor = new ExternalEventsProcessor_1.ExternalEventsProcessor(this.parent.messages, this.parent.relationships, externalEvents);
10176
10341
  await externalEventProcessor.execute();
10177
- return { results: externalEventProcessor.results, changedItems: externalEventProcessor.changedItems };
10342
+ return {
10343
+ externalEventResults: externalEventProcessor.results,
10344
+ changedItems: externalEventProcessor.changedItems
10345
+ };
10178
10346
  }
10179
- async finalizeSyncRun(externalEventResults) {
10347
+ async finalizeExternalEventsSyncRun(externalEventResults) {
10180
10348
  if (!this.currentSyncRun) {
10181
10349
  throw new Error("There is no active sync run to finalize");
10182
10350
  }
10183
10351
  const { backboneModifications, localModificationIds } = await this.prepareLocalDatawalletModificationsForPush();
10184
- await this.client.finalizeSyncRun(this.currentSyncRun.id.toString(), {
10352
+ await this.client.finalizeExternalEventSync(this.currentSyncRun.id.toString(), {
10185
10353
  datawalletModifications: backboneModifications,
10186
10354
  externalEventResults: externalEventResults
10187
10355
  });
@@ -10191,6 +10359,21 @@ class SyncController extends core_1.TransportController {
10191
10359
  await this.updateLocalDatawalletModificationIndex(newDatawalletModificationIndex);
10192
10360
  this.currentSyncRun = undefined;
10193
10361
  }
10362
+ async finalizeDatawalletVersionUpgradeSyncRun(newDatawalletVersion) {
10363
+ if (!this.currentSyncRun) {
10364
+ throw new Error("There is no active sync run to finalize");
10365
+ }
10366
+ const { backboneModifications, localModificationIds } = await this.prepareLocalDatawalletModificationsForPush();
10367
+ await this.client.finalizeDatawalletVersionUpgrade(this.currentSyncRun.id.toString(), {
10368
+ newDatawalletVersion,
10369
+ datawalletModifications: backboneModifications
10370
+ });
10371
+ await this.deleteUnpushedDatawalletModifications(localModificationIds);
10372
+ const oldDatawalletModificationIndex = await this.getLocalDatawalletModificationIndex();
10373
+ const newDatawalletModificationIndex = (oldDatawalletModificationIndex || -1) + backboneModifications.length;
10374
+ await this.updateLocalDatawalletModificationIndex(newDatawalletModificationIndex);
10375
+ this.currentSyncRun = undefined;
10376
+ }
10194
10377
  async getLocalDatawalletModificationIndex() {
10195
10378
  const index = await this.syncInfo.get("localDatawalletModificationIndex");
10196
10379
  return index;
@@ -10260,8 +10443,9 @@ const CoreSerializableAsync_1 = __webpack_require__(/*! ../../core/CoreSerializa
10260
10443
  const TransportIds_1 = __webpack_require__(/*! ../../core/TransportIds */ "./dist/core/TransportIds.js");
10261
10444
  const DatawalletModification_1 = __webpack_require__(/*! ../sync/local/DatawalletModification */ "./dist/modules/sync/local/DatawalletModification.js");
10262
10445
  class SynchronizedCollection {
10263
- constructor(parent, datawalletModifications) {
10446
+ constructor(parent, datawalletVersion, datawalletModifications) {
10264
10447
  this.parent = parent;
10448
+ this.datawalletVersion = datawalletVersion;
10265
10449
  this.datawalletModifications = datawalletModifications;
10266
10450
  this.name = parent.name;
10267
10451
  this.databaseType = parent.databaseType;
@@ -10282,7 +10466,8 @@ class SynchronizedCollection {
10282
10466
  collection: this.name,
10283
10467
  objectIdentifier: objectIdentifier,
10284
10468
  payloadCategory: DatawalletModification_1.DatawalletModificationCategory.TechnicalData,
10285
- payload: technicalModificationPayload
10469
+ payload: technicalModificationPayload,
10470
+ datawalletVersion: this.datawalletVersion
10286
10471
  }));
10287
10472
  }
10288
10473
  if (Object.getOwnPropertyNames(metadataModificationPayload).length !== 0) {
@@ -10292,7 +10477,8 @@ class SynchronizedCollection {
10292
10477
  collection: this.name,
10293
10478
  objectIdentifier: objectIdentifier,
10294
10479
  payloadCategory: DatawalletModification_1.DatawalletModificationCategory.Metadata,
10295
- payload: metadataModificationPayload
10480
+ payload: metadataModificationPayload,
10481
+ datawalletVersion: this.datawalletVersion
10296
10482
  }));
10297
10483
  }
10298
10484
  if (Object.getOwnPropertyNames(userdataModificationPayload).length !== 0) {
@@ -10302,7 +10488,8 @@ class SynchronizedCollection {
10302
10488
  collection: this.name,
10303
10489
  objectIdentifier: objectIdentifier,
10304
10490
  payloadCategory: DatawalletModification_1.DatawalletModificationCategory.Userdata,
10305
- payload: userdataModificationPayload
10491
+ payload: userdataModificationPayload,
10492
+ datawalletVersion: this.datawalletVersion
10306
10493
  }));
10307
10494
  }
10308
10495
  await this.parent.create(newObject);
@@ -10336,7 +10523,8 @@ class SynchronizedCollection {
10336
10523
  collection: this.name,
10337
10524
  objectIdentifier: objectIdentifier,
10338
10525
  payloadCategory: DatawalletModification_1.DatawalletModificationCategory.TechnicalData,
10339
- payload: payload
10526
+ payload: payload,
10527
+ datawalletVersion: this.datawalletVersion
10340
10528
  }));
10341
10529
  }
10342
10530
  if (haveMetadataPropertiesChanged) {
@@ -10347,7 +10535,8 @@ class SynchronizedCollection {
10347
10535
  collection: this.name,
10348
10536
  objectIdentifier: objectIdentifier,
10349
10537
  payloadCategory: DatawalletModification_1.DatawalletModificationCategory.Metadata,
10350
- payload: payload
10538
+ payload: payload,
10539
+ datawalletVersion: this.datawalletVersion
10351
10540
  }));
10352
10541
  }
10353
10542
  if (haveUserdataPropertiesChanged) {
@@ -10358,7 +10547,8 @@ class SynchronizedCollection {
10358
10547
  collection: this.name,
10359
10548
  objectIdentifier: objectIdentifier,
10360
10549
  payloadCategory: DatawalletModification_1.DatawalletModificationCategory.Userdata,
10361
- payload: payload
10550
+ payload: payload,
10551
+ datawalletVersion: this.datawalletVersion
10362
10552
  }));
10363
10553
  }
10364
10554
  if (hasCacheChanged) {
@@ -10366,7 +10556,8 @@ class SynchronizedCollection {
10366
10556
  localId: await TransportIds_1.TransportIds.datawalletModification.generate(),
10367
10557
  type: DatawalletModification_1.DatawalletModificationType.CacheChanged,
10368
10558
  collection: this.name,
10369
- objectIdentifier: objectIdentifier
10559
+ objectIdentifier: objectIdentifier,
10560
+ datawalletVersion: this.datawalletVersion
10370
10561
  }));
10371
10562
  }
10372
10563
  return await this.parent.update(oldDoc, newObject);
@@ -10379,7 +10570,8 @@ class SynchronizedCollection {
10379
10570
  localId: await TransportIds_1.TransportIds.datawalletModification.generate(),
10380
10571
  type: DatawalletModification_1.DatawalletModificationType.Delete,
10381
10572
  collection: this.name,
10382
- objectIdentifier: object.id
10573
+ objectIdentifier: object.id,
10574
+ datawalletVersion: this.datawalletVersion
10383
10575
  }));
10384
10576
  return await this.parent.delete({ id: object.id.toString() });
10385
10577
  }
@@ -10404,6 +10596,84 @@ exports.SynchronizedCollection = SynchronizedCollection;
10404
10596
 
10405
10597
  /***/ }),
10406
10598
 
10599
+ /***/ "./dist/modules/sync/backbone/BackboneDatawalletModification.js":
10600
+ /*!**********************************************************************!*\
10601
+ !*** ./dist/modules/sync/backbone/BackboneDatawalletModification.js ***!
10602
+ \**********************************************************************/
10603
+ /***/ ((__unused_webpack_module, exports) => {
10604
+
10605
+ "use strict";
10606
+
10607
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
10608
+ //# sourceMappingURL=BackboneDatawalletModification.js.map
10609
+
10610
+ /***/ }),
10611
+
10612
+ /***/ "./dist/modules/sync/backbone/BackboneExternalEvent.js":
10613
+ /*!*************************************************************!*\
10614
+ !*** ./dist/modules/sync/backbone/BackboneExternalEvent.js ***!
10615
+ \*************************************************************/
10616
+ /***/ ((__unused_webpack_module, exports) => {
10617
+
10618
+ "use strict";
10619
+
10620
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
10621
+ //# sourceMappingURL=BackboneExternalEvent.js.map
10622
+
10623
+ /***/ }),
10624
+
10625
+ /***/ "./dist/modules/sync/backbone/CreateDatawalletModifications.js":
10626
+ /*!*********************************************************************!*\
10627
+ !*** ./dist/modules/sync/backbone/CreateDatawalletModifications.js ***!
10628
+ \*********************************************************************/
10629
+ /***/ ((__unused_webpack_module, exports) => {
10630
+
10631
+ "use strict";
10632
+
10633
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
10634
+ //# sourceMappingURL=CreateDatawalletModifications.js.map
10635
+
10636
+ /***/ }),
10637
+
10638
+ /***/ "./dist/modules/sync/backbone/FinalizeSyncRun.js":
10639
+ /*!*******************************************************!*\
10640
+ !*** ./dist/modules/sync/backbone/FinalizeSyncRun.js ***!
10641
+ \*******************************************************/
10642
+ /***/ ((__unused_webpack_module, exports) => {
10643
+
10644
+ "use strict";
10645
+
10646
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
10647
+ //# sourceMappingURL=FinalizeSyncRun.js.map
10648
+
10649
+ /***/ }),
10650
+
10651
+ /***/ "./dist/modules/sync/backbone/GetDatawallet.js":
10652
+ /*!*****************************************************!*\
10653
+ !*** ./dist/modules/sync/backbone/GetDatawallet.js ***!
10654
+ \*****************************************************/
10655
+ /***/ ((__unused_webpack_module, exports) => {
10656
+
10657
+ "use strict";
10658
+
10659
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
10660
+ //# sourceMappingURL=GetDatawallet.js.map
10661
+
10662
+ /***/ }),
10663
+
10664
+ /***/ "./dist/modules/sync/backbone/GetDatawalletModifications.js":
10665
+ /*!******************************************************************!*\
10666
+ !*** ./dist/modules/sync/backbone/GetDatawalletModifications.js ***!
10667
+ \******************************************************************/
10668
+ /***/ ((__unused_webpack_module, exports) => {
10669
+
10670
+ "use strict";
10671
+
10672
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
10673
+ //# sourceMappingURL=GetDatawalletModifications.js.map
10674
+
10675
+ /***/ }),
10676
+
10407
10677
  /***/ "./dist/modules/sync/backbone/StartSyncRun.js":
10408
10678
  /*!****************************************************!*\
10409
10679
  !*** ./dist/modules/sync/backbone/StartSyncRun.js ***!
@@ -10413,7 +10683,12 @@ exports.SynchronizedCollection = SynchronizedCollection;
10413
10683
  "use strict";
10414
10684
 
10415
10685
  Object.defineProperty(exports, "__esModule", ({ value: true }));
10416
- exports.StartSyncRunStatus = void 0;
10686
+ exports.StartSyncRunStatus = exports.SyncRunType = void 0;
10687
+ var SyncRunType;
10688
+ (function (SyncRunType) {
10689
+ SyncRunType["ExternalEventSync"] = "ExternalEventSync";
10690
+ SyncRunType["DatawalletVersionUpgrade"] = "DatawalletVersionUpgrade";
10691
+ })(SyncRunType = exports.SyncRunType || (exports.SyncRunType = {}));
10417
10692
  var StartSyncRunStatus;
10418
10693
  (function (StartSyncRunStatus) {
10419
10694
  StartSyncRunStatus["Created"] = "Created";
@@ -10435,20 +10710,33 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
10435
10710
  exports.SyncClient = void 0;
10436
10711
  const core_1 = __webpack_require__(/*! ../../../core */ "./dist/core/index.js");
10437
10712
  class SyncClient extends core_1.RESTClientAuthenticate {
10438
- async startSyncRun() {
10439
- return await this.post("/api/v1/SyncRuns", {});
10713
+ constructor(config, authenticator) {
10714
+ super(config, authenticator, {
10715
+ headers: {
10716
+ "x-supported-datawallet-version": config.supportedDatawalletVersion.toString()
10717
+ }
10718
+ });
10440
10719
  }
10441
- async finalizeSyncRun(id, request) {
10442
- return await this.put(`/api/v1/SyncRuns/${id}/Finalize`, request);
10720
+ async startSyncRun(request) {
10721
+ return await this.post("/api/v1/SyncRuns", request);
10722
+ }
10723
+ async finalizeExternalEventSync(id, request) {
10724
+ return await this.put(`/api/v1/SyncRuns/${id}/FinalizeExternalEventSync`, request);
10725
+ }
10726
+ async finalizeDatawalletVersionUpgrade(id, request) {
10727
+ return await this.put(`/api/v1/SyncRuns/${id}/FinalizeDatawalletVersionUpgrade`, request);
10443
10728
  }
10444
10729
  async getExternalEventsOfSyncRun(syncRunId) {
10445
10730
  return await this.getPaged(`/api/v1/SyncRuns/${syncRunId}/ExternalEvents`, {});
10446
10731
  }
10732
+ async getDatawallet() {
10733
+ return await this.get("/api/v1/Datawallet");
10734
+ }
10447
10735
  async getDatawalletModifications(request) {
10448
- return await this.getPaged("/api/v1/DatawalletModifications", request);
10736
+ return await this.getPaged("/api/v1/Datawallet/Modifications", request);
10449
10737
  }
10450
10738
  async createDatawalletModifications(request) {
10451
- return await this.post("/api/v1/DatawalletModifications", request);
10739
+ return await this.post("/api/v1/Datawallet/Modifications", request);
10452
10740
  }
10453
10741
  }
10454
10742
  exports.SyncClient = SyncClient;
@@ -10529,6 +10817,11 @@ __decorate([
10529
10817
  (0, ts_serval_1.serialize)(),
10530
10818
  __metadata("design:type", Object)
10531
10819
  ], DatawalletModification.prototype, "payload", void 0);
10820
+ __decorate([
10821
+ (0, ts_serval_1.validate)({ nullable: true }),
10822
+ (0, ts_serval_1.serialize)(),
10823
+ __metadata("design:type", Number)
10824
+ ], DatawalletModification.prototype, "datawalletVersion", void 0);
10532
10825
  DatawalletModification = DatawalletModification_1 = __decorate([
10533
10826
  (0, ts_serval_1.type)("DatawalletModification")
10534
10827
  ], DatawalletModification);
@@ -10537,6 +10830,64 @@ exports.DatawalletModification = DatawalletModification;
10537
10830
 
10538
10831
  /***/ }),
10539
10832
 
10833
+ /***/ "./dist/modules/sync/migrations/DeviceMigrations.js":
10834
+ /*!**********************************************************!*\
10835
+ !*** ./dist/modules/sync/migrations/DeviceMigrations.js ***!
10836
+ \**********************************************************/
10837
+ /***/ ((__unused_webpack_module, exports) => {
10838
+
10839
+ "use strict";
10840
+
10841
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
10842
+ exports.DeviceMigrations = void 0;
10843
+ class DeviceMigrations {
10844
+ constructor(accountController) {
10845
+ this.accountController = accountController;
10846
+ }
10847
+ async v1() {
10848
+ const query = { cache: { $exists: false } };
10849
+ const synchronizableToId = (c) => c.id.toString();
10850
+ const files = await this.accountController.files.getFiles(query);
10851
+ await this.accountController.files.updateCache(files.map(synchronizableToId));
10852
+ const messages = await this.accountController.messages.getMessages(query);
10853
+ await this.accountController.messages.updateCache(messages.map(synchronizableToId));
10854
+ const relationships = await this.accountController.relationships.getRelationships(query);
10855
+ await this.accountController.relationships.updateCache(relationships.map(synchronizableToId));
10856
+ const templates = await this.accountController.relationshipTemplates.getRelationshipTemplates(query);
10857
+ await this.accountController.relationshipTemplates.updateCache(templates.map(synchronizableToId));
10858
+ const tokens = await this.accountController.tokens.getTokens(query);
10859
+ await this.accountController.tokens.updateCache(tokens.map(synchronizableToId));
10860
+ }
10861
+ }
10862
+ exports.DeviceMigrations = DeviceMigrations;
10863
+ //# sourceMappingURL=DeviceMigrations.js.map
10864
+
10865
+ /***/ }),
10866
+
10867
+ /***/ "./dist/modules/sync/migrations/IdentityMigrations.js":
10868
+ /*!************************************************************!*\
10869
+ !*** ./dist/modules/sync/migrations/IdentityMigrations.js ***!
10870
+ \************************************************************/
10871
+ /***/ ((__unused_webpack_module, exports) => {
10872
+
10873
+ "use strict";
10874
+
10875
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
10876
+ exports.IdentityMigrations = void 0;
10877
+ class IdentityMigrations {
10878
+ constructor(accountController) {
10879
+ this.accountController = accountController;
10880
+ }
10881
+ v1() {
10882
+ // no upgrade steps necessary for v1
10883
+ return Promise.resolve();
10884
+ }
10885
+ }
10886
+ exports.IdentityMigrations = IdentityMigrations;
10887
+ //# sourceMappingURL=IdentityMigrations.js.map
10888
+
10889
+ /***/ }),
10890
+
10540
10891
  /***/ "./dist/modules/tokens/AnonymousTokenController.js":
10541
10892
  /*!*********************************************************!*\
10542
10893
  !*** ./dist/modules/tokens/AnonymousTokenController.js ***!
@@ -11748,95 +12099,33 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
11748
12099
  /*!******************************************************************!*\
11749
12100
  !*** ./node_modules/@js-soft/ts-utils/dist/eventBus/EventBus.js ***!
11750
12101
  \******************************************************************/
11751
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
12102
+ /***/ ((__unused_webpack_module, exports) => {
11752
12103
 
11753
12104
  "use strict";
11754
12105
 
11755
12106
  Object.defineProperty(exports, "__esModule", ({ value: true }));
11756
- exports.EventBus = void 0;
11757
- __webpack_require__(/*! reflect-metadata */ "./node_modules/reflect-metadata/Reflect.js");
11758
- const eventemitter2_1 = __webpack_require__(/*! eventemitter2 */ "./node_modules/eventemitter2/lib/eventemitter2.js");
11759
- const Reflection_1 = __webpack_require__(/*! ./reflection/Reflection */ "./node_modules/@js-soft/ts-utils/dist/eventBus/reflection/Reflection.js");
11760
- const SubscriptionTargetInfo_1 = __webpack_require__(/*! ./SubscriptionTargetInfo */ "./node_modules/@js-soft/ts-utils/dist/eventBus/SubscriptionTargetInfo.js");
12107
+ exports.getEventNamespaceFromObject = exports.EventBus = void 0;
11761
12108
  class EventBus {
11762
- emitter;
11763
- constructor() {
11764
- this.emitter = new eventemitter2_1.EventEmitter2({ wildcard: true, maxListeners: 50, verboseMemoryLeak: true });
11765
- }
11766
- subscribe(subscriptionTarget, handler) {
11767
- this.registerHandler(subscriptionTarget, handler);
11768
- }
11769
- subscribeOnce(subscriptionTarget, handler) {
11770
- this.registerHandler(subscriptionTarget, handler, true);
11771
- }
11772
- registerHandler(subscriptionTarget, handler, isOneTimeHandler = false) {
11773
- const subscriptionTargetInfo = SubscriptionTargetInfo_1.SubscriptionTargetInfo.from(subscriptionTarget);
11774
- const handlerWrapper = (event) => {
11775
- if (!subscriptionTargetInfo.isCompatibleWith(event)) {
11776
- return;
11777
- }
11778
- handler(event);
11779
- if (isOneTimeHandler) {
11780
- this.emitter.off(subscriptionTargetInfo.namespace, handlerWrapper);
11781
- }
11782
- };
11783
- this.emitter.on(subscriptionTargetInfo.namespace, handlerWrapper);
11784
- }
11785
- async publish(event) {
11786
- let namespace = getEventNamespaceFromObject(event);
11787
- if (!namespace) {
11788
- throw Error("The event needs a namespace. Use the EventNamespaceDecorator in order to define a namespace for a event.");
11789
- }
11790
- this.emitter.emit(namespace, event);
11791
- }
11792
12109
  }
11793
12110
  exports.EventBus = EventBus;
11794
12111
  function getEventNamespaceFromObject(targetObject) {
11795
- var namespaceDecorator = (0, Reflection_1.getCustomClassDecoratorValue)("namespace", targetObject.constructor);
11796
- if (!namespaceDecorator) {
11797
- throw new Error("Event Type is not defined");
11798
- }
11799
- return namespaceDecorator;
12112
+ return targetObject.namespace;
11800
12113
  }
12114
+ exports.getEventNamespaceFromObject = getEventNamespaceFromObject;
11801
12115
  //# sourceMappingURL=EventBus.js.map
11802
12116
 
11803
12117
  /***/ }),
11804
12118
 
11805
- /***/ "./node_modules/@js-soft/ts-utils/dist/eventBus/EventNamespaceDecorator.js":
11806
- /*!*********************************************************************************!*\
11807
- !*** ./node_modules/@js-soft/ts-utils/dist/eventBus/EventNamespaceDecorator.js ***!
11808
- \*********************************************************************************/
11809
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
11810
-
11811
- "use strict";
11812
-
11813
- Object.defineProperty(exports, "__esModule", ({ value: true }));
11814
- exports.EventNamespace = void 0;
11815
- const Constants_1 = __webpack_require__(/*! ./reflection/Constants */ "./node_modules/@js-soft/ts-utils/dist/eventBus/reflection/Constants.js");
11816
- function EventNamespace(name) {
11817
- return (target) => {
11818
- if (!name) {
11819
- name = target.name;
11820
- }
11821
- Reflect.defineMetadata(`${Constants_1.CUSTOM_METADATA_NAMESPACE}:namespace`, name, target);
11822
- };
11823
- }
11824
- exports.EventNamespace = EventNamespace;
11825
- //# sourceMappingURL=EventNamespaceDecorator.js.map
11826
-
11827
- /***/ }),
11828
-
11829
12119
  /***/ "./node_modules/@js-soft/ts-utils/dist/eventBus/SubscriptionTargetInfo.js":
11830
12120
  /*!********************************************************************************!*\
11831
12121
  !*** ./node_modules/@js-soft/ts-utils/dist/eventBus/SubscriptionTargetInfo.js ***!
11832
12122
  \********************************************************************************/
11833
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
12123
+ /***/ ((__unused_webpack_module, exports) => {
11834
12124
 
11835
12125
  "use strict";
11836
12126
 
11837
12127
  Object.defineProperty(exports, "__esModule", ({ value: true }));
11838
12128
  exports.SubscriptionTargetInfo = void 0;
11839
- const Reflection_1 = __webpack_require__(/*! ./reflection/Reflection */ "./node_modules/@js-soft/ts-utils/dist/eventBus/reflection/Reflection.js");
11840
12129
  class SubscriptionTargetInfo {
11841
12130
  namespace;
11842
12131
  constructor(namespace) {
@@ -11846,9 +12135,7 @@ class SubscriptionTargetInfo {
11846
12135
  if (target instanceof Function) {
11847
12136
  return new ConstructorSubscriptionTargetInfo(target);
11848
12137
  }
11849
- else {
11850
- return new NamespaceSubscriptionTargetInfo(target);
11851
- }
12138
+ return new NamespaceSubscriptionTargetInfo(target);
11852
12139
  }
11853
12140
  }
11854
12141
  exports.SubscriptionTargetInfo = SubscriptionTargetInfo;
@@ -11866,21 +12153,86 @@ class NamespaceSubscriptionTargetInfo extends SubscriptionTargetInfo {
11866
12153
  constructor(namespace) {
11867
12154
  super(namespace);
11868
12155
  }
11869
- isCompatibleWith(event) {
12156
+ isCompatibleWith(_event) {
11870
12157
  return true;
11871
12158
  }
11872
12159
  }
11873
12160
  function getEventNamespaceFromClass(targetClass) {
11874
- var namespaceDecorator = (0, Reflection_1.getCustomClassDecoratorValue)("namespace", targetClass);
11875
- if (!namespaceDecorator) {
11876
- throw new Error("Event Type is not defined");
11877
- }
11878
- return namespaceDecorator;
12161
+ return targetClass.namespace;
11879
12162
  }
11880
12163
  //# sourceMappingURL=SubscriptionTargetInfo.js.map
11881
12164
 
11882
12165
  /***/ }),
11883
12166
 
12167
+ /***/ "./node_modules/@js-soft/ts-utils/dist/eventBus/eventEmitter2/EventEmitter2EventBus.js":
12168
+ /*!*********************************************************************************************!*\
12169
+ !*** ./node_modules/@js-soft/ts-utils/dist/eventBus/eventEmitter2/EventEmitter2EventBus.js ***!
12170
+ \*********************************************************************************************/
12171
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
12172
+
12173
+ "use strict";
12174
+
12175
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
12176
+ exports.EventEmitter2EventBus = void 0;
12177
+ const eventemitter2_1 = __webpack_require__(/*! eventemitter2 */ "./node_modules/eventemitter2/lib/eventemitter2.js");
12178
+ __webpack_require__(/*! reflect-metadata */ "./node_modules/reflect-metadata/Reflect.js");
12179
+ const EventBus_1 = __webpack_require__(/*! ../EventBus */ "./node_modules/@js-soft/ts-utils/dist/eventBus/EventBus.js");
12180
+ const SubscriptionTargetInfo_1 = __webpack_require__(/*! ../SubscriptionTargetInfo */ "./node_modules/@js-soft/ts-utils/dist/eventBus/SubscriptionTargetInfo.js");
12181
+ class EventEmitter2EventBus {
12182
+ emitter;
12183
+ wrappers = new Map();
12184
+ nextId = 0;
12185
+ constructor() {
12186
+ this.emitter = new eventemitter2_1.EventEmitter2({ wildcard: true, maxListeners: 50, verboseMemoryLeak: true });
12187
+ }
12188
+ subscribe(subscriptionTarget, handler) {
12189
+ return this.registerHandler(subscriptionTarget, handler);
12190
+ }
12191
+ subscribeOnce(subscriptionTarget, handler) {
12192
+ return this.registerHandler(subscriptionTarget, handler, true);
12193
+ }
12194
+ unsubscribe(subscriptionTarget, subscriptionId) {
12195
+ return this.unregisterHandler(subscriptionTarget, subscriptionId);
12196
+ }
12197
+ registerHandler(subscriptionTarget, handler, isOneTimeHandler = false) {
12198
+ const subscriptionTargetInfo = SubscriptionTargetInfo_1.SubscriptionTargetInfo.from(subscriptionTarget);
12199
+ const handlerId = this.nextId++;
12200
+ const handlerWrapper = (event) => {
12201
+ if (!subscriptionTargetInfo.isCompatibleWith(event)) {
12202
+ return;
12203
+ }
12204
+ handler(event);
12205
+ if (isOneTimeHandler) {
12206
+ this.unsubscribe(subscriptionTarget, handlerId);
12207
+ }
12208
+ };
12209
+ this.wrappers.set(handlerId, handlerWrapper);
12210
+ this.emitter.on(subscriptionTargetInfo.namespace, handlerWrapper);
12211
+ return handlerId;
12212
+ }
12213
+ unregisterHandler(subscriptionTarget, handlerId) {
12214
+ const subscriptionTargetInfo = SubscriptionTargetInfo_1.SubscriptionTargetInfo.from(subscriptionTarget);
12215
+ const handlerWrapper = this.wrappers.get(handlerId);
12216
+ if (!handlerWrapper) {
12217
+ return false;
12218
+ }
12219
+ this.emitter.off(subscriptionTargetInfo.namespace, handlerWrapper);
12220
+ this.wrappers.delete(handlerId);
12221
+ return true;
12222
+ }
12223
+ publish(event) {
12224
+ const namespace = (0, EventBus_1.getEventNamespaceFromObject)(event);
12225
+ if (!namespace) {
12226
+ throw Error("The event needs a namespace. Use the EventNamespace-decorator in order to define a namespace for a event.");
12227
+ }
12228
+ this.emitter.emit(namespace, event);
12229
+ }
12230
+ }
12231
+ exports.EventEmitter2EventBus = EventEmitter2EventBus;
12232
+ //# sourceMappingURL=EventEmitter2EventBus.js.map
12233
+
12234
+ /***/ }),
12235
+
11884
12236
  /***/ "./node_modules/@js-soft/ts-utils/dist/eventBus/index.js":
11885
12237
  /*!***************************************************************!*\
11886
12238
  !*** ./node_modules/@js-soft/ts-utils/dist/eventBus/index.js ***!
@@ -11901,52 +12253,77 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
11901
12253
  };
11902
12254
  Object.defineProperty(exports, "__esModule", ({ value: true }));
11903
12255
  __exportStar(__webpack_require__(/*! ./EventBus */ "./node_modules/@js-soft/ts-utils/dist/eventBus/EventBus.js"), exports);
11904
- __exportStar(__webpack_require__(/*! ./EventNamespaceDecorator */ "./node_modules/@js-soft/ts-utils/dist/eventBus/EventNamespaceDecorator.js"), exports);
12256
+ __exportStar(__webpack_require__(/*! ./eventEmitter2/EventEmitter2EventBus */ "./node_modules/@js-soft/ts-utils/dist/eventBus/eventEmitter2/EventEmitter2EventBus.js"), exports);
11905
12257
  //# sourceMappingURL=index.js.map
11906
12258
 
11907
12259
  /***/ }),
11908
12260
 
11909
- /***/ "./node_modules/@js-soft/ts-utils/dist/eventBus/reflection/Constants.js":
11910
- /*!******************************************************************************!*\
11911
- !*** ./node_modules/@js-soft/ts-utils/dist/eventBus/reflection/Constants.js ***!
11912
- \******************************************************************************/
11913
- /***/ ((__unused_webpack_module, exports) => {
12261
+ /***/ "./node_modules/@js-soft/ts-utils/dist/events/DataEvent.js":
12262
+ /*!*****************************************************************!*\
12263
+ !*** ./node_modules/@js-soft/ts-utils/dist/events/DataEvent.js ***!
12264
+ \*****************************************************************/
12265
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
11914
12266
 
11915
12267
  "use strict";
11916
12268
 
11917
12269
  Object.defineProperty(exports, "__esModule", ({ value: true }));
11918
- exports.CUSTOM_METADATA_NAMESPACE = void 0;
11919
- exports.CUSTOM_METADATA_NAMESPACE = "custom:annotations";
11920
- //# sourceMappingURL=Constants.js.map
12270
+ exports.DataEvent = void 0;
12271
+ const Event_1 = __webpack_require__(/*! ./Event */ "./node_modules/@js-soft/ts-utils/dist/events/Event.js");
12272
+ class DataEvent extends Event_1.Event {
12273
+ data;
12274
+ constructor(namespace, data) {
12275
+ super(namespace);
12276
+ this.data = data;
12277
+ }
12278
+ }
12279
+ exports.DataEvent = DataEvent;
12280
+ //# sourceMappingURL=DataEvent.js.map
11921
12281
 
11922
12282
  /***/ }),
11923
12283
 
11924
- /***/ "./node_modules/@js-soft/ts-utils/dist/eventBus/reflection/Reflection.js":
11925
- /*!*******************************************************************************!*\
11926
- !*** ./node_modules/@js-soft/ts-utils/dist/eventBus/reflection/Reflection.js ***!
11927
- \*******************************************************************************/
11928
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
12284
+ /***/ "./node_modules/@js-soft/ts-utils/dist/events/Event.js":
12285
+ /*!*************************************************************!*\
12286
+ !*** ./node_modules/@js-soft/ts-utils/dist/events/Event.js ***!
12287
+ \*************************************************************/
12288
+ /***/ ((__unused_webpack_module, exports) => {
11929
12289
 
11930
12290
  "use strict";
11931
12291
 
11932
12292
  Object.defineProperty(exports, "__esModule", ({ value: true }));
11933
- exports.getCustomClassDecorators = exports.getCustomClassDecoratorValue = void 0;
11934
- const Constants_1 = __webpack_require__(/*! ./Constants */ "./node_modules/@js-soft/ts-utils/dist/eventBus/reflection/Constants.js");
11935
- function getCustomClassDecoratorValue(decoratorKey, targetClass) {
11936
- var decorators = getCustomClassDecorators(targetClass);
11937
- var decorator = decorators.find(d => d.key.endsWith(decoratorKey));
11938
- return decorator ? decorator.value : undefined;
11939
- }
11940
- exports.getCustomClassDecoratorValue = getCustomClassDecoratorValue;
11941
- function getCustomClassDecorators(targetClass) {
11942
- const keys = Reflect.getMetadataKeys(targetClass);
11943
- let decorators = keys
11944
- .filter(key => key.toString().startsWith(Constants_1.CUSTOM_METADATA_NAMESPACE))
11945
- .map(key => { return { key: key, value: Reflect.getMetadata(key, targetClass) }; });
11946
- return decorators;
12293
+ exports.Event = void 0;
12294
+ class Event {
12295
+ namespace;
12296
+ constructor(namespace) {
12297
+ this.namespace = namespace;
12298
+ }
11947
12299
  }
11948
- exports.getCustomClassDecorators = getCustomClassDecorators;
11949
- //# sourceMappingURL=Reflection.js.map
12300
+ exports.Event = Event;
12301
+ //# sourceMappingURL=Event.js.map
12302
+
12303
+ /***/ }),
12304
+
12305
+ /***/ "./node_modules/@js-soft/ts-utils/dist/events/index.js":
12306
+ /*!*************************************************************!*\
12307
+ !*** ./node_modules/@js-soft/ts-utils/dist/events/index.js ***!
12308
+ \*************************************************************/
12309
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
12310
+
12311
+ "use strict";
12312
+
12313
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
12314
+ if (k2 === undefined) k2 = k;
12315
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
12316
+ }) : (function(o, m, k, k2) {
12317
+ if (k2 === undefined) k2 = k;
12318
+ o[k2] = m[k];
12319
+ }));
12320
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
12321
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
12322
+ };
12323
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
12324
+ __exportStar(__webpack_require__(/*! ./DataEvent */ "./node_modules/@js-soft/ts-utils/dist/events/DataEvent.js"), exports);
12325
+ __exportStar(__webpack_require__(/*! ./Event */ "./node_modules/@js-soft/ts-utils/dist/events/Event.js"), exports);
12326
+ //# sourceMappingURL=index.js.map
11950
12327
 
11951
12328
  /***/ }),
11952
12329
 
@@ -11970,11 +12347,12 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
11970
12347
  };
11971
12348
  Object.defineProperty(exports, "__esModule", ({ value: true }));
11972
12349
  __exportStar(__webpack_require__(/*! ./eventBus */ "./node_modules/@js-soft/ts-utils/dist/eventBus/index.js"), exports);
11973
- __exportStar(__webpack_require__(/*! ./result */ "./node_modules/@js-soft/ts-utils/dist/result/index.js"), exports);
12350
+ __exportStar(__webpack_require__(/*! ./events */ "./node_modules/@js-soft/ts-utils/dist/events/index.js"), exports);
11974
12351
  __exportStar(__webpack_require__(/*! ./logDecorator */ "./node_modules/@js-soft/ts-utils/dist/logDecorator.js"), exports);
11975
12352
  __exportStar(__webpack_require__(/*! ./measureExcecutionTime */ "./node_modules/@js-soft/ts-utils/dist/measureExcecutionTime.js"), exports);
11976
12353
  __exportStar(__webpack_require__(/*! ./randomString */ "./node_modules/@js-soft/ts-utils/dist/randomString.js"), exports);
11977
12354
  __exportStar(__webpack_require__(/*! ./Range */ "./node_modules/@js-soft/ts-utils/dist/Range.js"), exports);
12355
+ __exportStar(__webpack_require__(/*! ./result */ "./node_modules/@js-soft/ts-utils/dist/result/index.js"), exports);
11978
12356
  __exportStar(__webpack_require__(/*! ./sleep */ "./node_modules/@js-soft/ts-utils/dist/sleep.js"), exports);
11979
12357
  //# sourceMappingURL=index.js.map
11980
12358
 
@@ -11990,10 +12368,11 @@ __exportStar(__webpack_require__(/*! ./sleep */ "./node_modules/@js-soft/ts-util
11990
12368
 
11991
12369
  Object.defineProperty(exports, "__esModule", ({ value: true }));
11992
12370
  exports.log = void 0;
11993
- function log(target, propertyName, propertyDesciptor) {
12371
+ /* eslint-disable no-console */
12372
+ function log(_target, propertyName, propertyDesciptor) {
11994
12373
  const method = propertyDesciptor.value;
11995
12374
  propertyDesciptor.value = function (...args) {
11996
- const params = args.map(a => JSON.stringify(a)).join();
12375
+ const params = args.map((a) => JSON.stringify(a)).join();
11997
12376
  try {
11998
12377
  const result = method.apply(this, args);
11999
12378
  const r = JSON.stringify(result);
@@ -12008,7 +12387,6 @@ function log(target, propertyName, propertyDesciptor) {
12008
12387
  return propertyDesciptor;
12009
12388
  }
12010
12389
  exports.log = log;
12011
- ;
12012
12390
  //# sourceMappingURL=logDecorator.js.map
12013
12391
 
12014
12392
  /***/ }),
@@ -12023,7 +12401,8 @@ exports.log = log;
12023
12401
 
12024
12402
  Object.defineProperty(exports, "__esModule", ({ value: true }));
12025
12403
  exports.measureExcecutionTime = void 0;
12026
- function measureExcecutionTime(target, propertyName, propertyDesciptor) {
12404
+ /* eslint-disable no-console */
12405
+ function measureExcecutionTime(_target, _propertyName, propertyDesciptor) {
12027
12406
  const method = propertyDesciptor.value;
12028
12407
  propertyDesciptor.value = async function (...args) {
12029
12408
  const t0 = Date.now();
@@ -12035,7 +12414,6 @@ function measureExcecutionTime(target, propertyName, propertyDesciptor) {
12035
12414
  return propertyDesciptor;
12036
12415
  }
12037
12416
  exports.measureExcecutionTime = measureExcecutionTime;
12038
- ;
12039
12417
  //# sourceMappingURL=measureExcecutionTime.js.map
12040
12418
 
12041
12419
  /***/ }),
@@ -12053,13 +12431,12 @@ exports.randomString = void 0;
12053
12431
  function randomString(length, characters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789") {
12054
12432
  let result = "";
12055
12433
  const charactersLength = characters.length;
12056
- for (var i = 0; i < length; i++) {
12434
+ for (let i = 0; i < length; i++) {
12057
12435
  result += characters.charAt(Math.floor(Math.random() * charactersLength));
12058
12436
  }
12059
12437
  return result;
12060
12438
  }
12061
12439
  exports.randomString = randomString;
12062
- ;
12063
12440
  //# sourceMappingURL=randomString.js.map
12064
12441
 
12065
12442
  /***/ }),
@@ -12332,7 +12709,7 @@ module.exports = function xhrAdapter(config) {
12332
12709
 
12333
12710
  // Handle timeout
12334
12711
  request.ontimeout = function handleTimeout() {
12335
- var timeoutErrorMessage = 'timeout of ' + config.timeout + 'ms exceeded';
12712
+ var timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';
12336
12713
  var transitional = config.transitional || defaults.transitional;
12337
12714
  if (config.timeoutErrorMessage) {
12338
12715
  timeoutErrorMessage = config.timeoutErrorMessage;
@@ -12473,7 +12850,7 @@ axios.Axios = Axios;
12473
12850
  axios.Cancel = __webpack_require__(/*! ./cancel/Cancel */ "./node_modules/axios/lib/cancel/Cancel.js");
12474
12851
  axios.CancelToken = __webpack_require__(/*! ./cancel/CancelToken */ "./node_modules/axios/lib/cancel/CancelToken.js");
12475
12852
  axios.isCancel = __webpack_require__(/*! ./cancel/isCancel */ "./node_modules/axios/lib/cancel/isCancel.js");
12476
- axios.VERSION = __webpack_require__(/*! ./env/data */ "./node_modules/axios/lib/env/data.js").version;
12853
+ axios.VERSION = (__webpack_require__(/*! ./env/data */ "./node_modules/axios/lib/env/data.js").version);
12477
12854
 
12478
12855
  // Expose all/spread
12479
12856
  axios.all = function all(promises) {
@@ -13435,7 +13812,7 @@ module.exports = defaults;
13435
13812
  /***/ ((module) => {
13436
13813
 
13437
13814
  module.exports = {
13438
- "version": "0.22.0"
13815
+ "version": "0.24.0"
13439
13816
  };
13440
13817
 
13441
13818
  /***/ }),
@@ -13892,7 +14269,7 @@ module.exports = function spread(callback) {
13892
14269
  "use strict";
13893
14270
 
13894
14271
 
13895
- var VERSION = __webpack_require__(/*! ../env/data */ "./node_modules/axios/lib/env/data.js").version;
14272
+ var VERSION = (__webpack_require__(/*! ../env/data */ "./node_modules/axios/lib/env/data.js").version);
13896
14273
 
13897
14274
  var validators = {};
13898
14275
 
@@ -15127,83 +15504,87 @@ var __WEBPACK_AMD_DEFINE_RESULT__;/*!
15127
15504
  var listeners= null, branch, xTree, xxTree, isolatedBranch, endReached, currentType = type[i],
15128
15505
  nextType = type[i + 1], branches, _listeners;
15129
15506
 
15130
- if (i === typeLength && tree._listeners) {
15507
+ if (i === typeLength) {
15131
15508
  //
15132
15509
  // If at the end of the event(s) list and the tree has listeners
15133
15510
  // invoke those listeners.
15134
15511
  //
15135
- if (typeof tree._listeners === 'function') {
15136
- handlers && handlers.push(tree._listeners);
15137
- return [tree];
15138
- } else {
15139
- handlers && handlers.push.apply(handlers, tree._listeners);
15140
- return [tree];
15512
+
15513
+ if(tree._listeners) {
15514
+ if (typeof tree._listeners === 'function') {
15515
+ handlers && handlers.push(tree._listeners);
15516
+ listeners = [tree];
15517
+ } else {
15518
+ handlers && handlers.push.apply(handlers, tree._listeners);
15519
+ listeners = [tree];
15520
+ }
15141
15521
  }
15142
- }
15522
+ } else {
15143
15523
 
15144
- if (currentType === '*') {
15145
- //
15146
- // If the event emitted is '*' at this part
15147
- // or there is a concrete match at this patch
15148
- //
15149
- branches= ownKeys(tree);
15150
- n= branches.length;
15151
- while(n-->0){
15152
- branch= branches[n];
15153
- if (branch !== '_listeners') {
15154
- _listeners = searchListenerTree(handlers, type, tree[branch], i + 1, typeLength);
15155
- if(_listeners){
15156
- if(listeners){
15157
- listeners.push.apply(listeners, _listeners);
15158
- }else{
15159
- listeners = _listeners;
15524
+ if (currentType === '*') {
15525
+ //
15526
+ // If the event emitted is '*' at this part
15527
+ // or there is a concrete match at this patch
15528
+ //
15529
+ branches = ownKeys(tree);
15530
+ n = branches.length;
15531
+ while (n-- > 0) {
15532
+ branch = branches[n];
15533
+ if (branch !== '_listeners') {
15534
+ _listeners = searchListenerTree(handlers, type, tree[branch], i + 1, typeLength);
15535
+ if (_listeners) {
15536
+ if (listeners) {
15537
+ listeners.push.apply(listeners, _listeners);
15538
+ } else {
15539
+ listeners = _listeners;
15540
+ }
15160
15541
  }
15161
15542
  }
15162
15543
  }
15163
- }
15164
- return listeners;
15165
- } else if (currentType === '**') {
15166
- endReached = (i + 1 === typeLength || (i + 2 === typeLength && nextType === '*'));
15167
- if (endReached && tree._listeners) {
15168
- // The next element has a _listeners, add it to the handlers.
15169
- listeners = searchListenerTree(handlers, type, tree, typeLength, typeLength);
15170
- }
15171
-
15172
- branches= ownKeys(tree);
15173
- n= branches.length;
15174
- while(n-->0){
15175
- branch= branches[n];
15176
- if (branch !== '_listeners') {
15177
- if (branch === '*' || branch === '**') {
15178
- if (tree[branch]._listeners && !endReached) {
15179
- _listeners = searchListenerTree(handlers, type, tree[branch], typeLength, typeLength);
15180
- if(_listeners){
15181
- if(listeners){
15182
- listeners.push.apply(listeners, _listeners);
15183
- }else{
15184
- listeners = _listeners;
15544
+ return listeners;
15545
+ } else if (currentType === '**') {
15546
+ endReached = (i + 1 === typeLength || (i + 2 === typeLength && nextType === '*'));
15547
+ if (endReached && tree._listeners) {
15548
+ // The next element has a _listeners, add it to the handlers.
15549
+ listeners = searchListenerTree(handlers, type, tree, typeLength, typeLength);
15550
+ }
15551
+
15552
+ branches = ownKeys(tree);
15553
+ n = branches.length;
15554
+ while (n-- > 0) {
15555
+ branch = branches[n];
15556
+ if (branch !== '_listeners') {
15557
+ if (branch === '*' || branch === '**') {
15558
+ if (tree[branch]._listeners && !endReached) {
15559
+ _listeners = searchListenerTree(handlers, type, tree[branch], typeLength, typeLength);
15560
+ if (_listeners) {
15561
+ if (listeners) {
15562
+ listeners.push.apply(listeners, _listeners);
15563
+ } else {
15564
+ listeners = _listeners;
15565
+ }
15185
15566
  }
15186
15567
  }
15568
+ _listeners = searchListenerTree(handlers, type, tree[branch], i, typeLength);
15569
+ } else if (branch === nextType) {
15570
+ _listeners = searchListenerTree(handlers, type, tree[branch], i + 2, typeLength);
15571
+ } else {
15572
+ // No match on this one, shift into the tree but not in the type array.
15573
+ _listeners = searchListenerTree(handlers, type, tree[branch], i, typeLength);
15187
15574
  }
15188
- _listeners = searchListenerTree(handlers, type, tree[branch], i, typeLength);
15189
- } else if (branch === nextType) {
15190
- _listeners = searchListenerTree(handlers, type, tree[branch], i + 2, typeLength);
15191
- } else {
15192
- // No match on this one, shift into the tree but not in the type array.
15193
- _listeners = searchListenerTree(handlers, type, tree[branch], i, typeLength);
15194
- }
15195
- if(_listeners){
15196
- if(listeners){
15197
- listeners.push.apply(listeners, _listeners);
15198
- }else{
15199
- listeners = _listeners;
15575
+ if (_listeners) {
15576
+ if (listeners) {
15577
+ listeners.push.apply(listeners, _listeners);
15578
+ } else {
15579
+ listeners = _listeners;
15580
+ }
15200
15581
  }
15201
15582
  }
15202
15583
  }
15584
+ return listeners;
15585
+ } else if (tree[currentType]) {
15586
+ listeners = searchListenerTree(handlers, type, tree[currentType], i + 1, typeLength);
15203
15587
  }
15204
- return listeners;
15205
- }else if (tree[currentType]) {
15206
- listeners= searchListenerTree(handlers, type, tree[currentType], i + 1, typeLength);
15207
15588
  }
15208
15589
 
15209
15590
  xTree = tree['*'];
@@ -34588,6 +34969,13 @@ function parseInteger(string) {
34588
34969
  return parseInt(string, 10);
34589
34970
  }
34590
34971
  }
34972
+ function parseFloating(string) {
34973
+ if (isUndefined(string) || string === null || string === "") {
34974
+ return undefined;
34975
+ } else {
34976
+ return parseFloat(string);
34977
+ }
34978
+ }
34591
34979
  function parseMillis(fraction) {
34592
34980
  // Return undefined (instead of 0) in these cases, where fraction is not set
34593
34981
  if (isUndefined(fraction) || fraction === null || fraction === "") {
@@ -34727,7 +35115,7 @@ function formatOffset(offset, format) {
34727
35115
  function timeObject(obj) {
34728
35116
  return pick(obj, ["hour", "minute", "second", "millisecond"]);
34729
35117
  }
34730
- var ianaRegex = /[A-Za-z_+-]{1,256}(:?\/[A-Za-z_+-]{1,256}(\/[A-Za-z_+-]{1,256})?)?/;
35118
+ var ianaRegex = /[A-Za-z_+-]{1,256}(:?\/[A-Za-z0-9_+-]{1,256}(\/[A-Za-z0-9_+-]{1,256})?)?/;
34731
35119
 
34732
35120
  /**
34733
35121
  * @private
@@ -35090,6 +35478,13 @@ var Formatter = /*#__PURE__*/function () {
35090
35478
 
35091
35479
  case "ss":
35092
35480
  return _this.num(dt.second, 2);
35481
+ // fractional seconds
35482
+
35483
+ case "uu":
35484
+ return _this.num(Math.floor(dt.millisecond / 10), 2);
35485
+
35486
+ case "uuu":
35487
+ return _this.num(Math.floor(dt.millisecond / 100));
35093
35488
  // minutes
35094
35489
 
35095
35490
  case "m":
@@ -35605,7 +36000,7 @@ var dtfCache = {};
35605
36000
  function makeDTF(zone) {
35606
36001
  if (!dtfCache[zone]) {
35607
36002
  dtfCache[zone] = new Intl.DateTimeFormat("en-US", {
35608
- hourCycle: "h23",
36003
+ hour12: false,
35609
36004
  timeZone: zone,
35610
36005
  year: "numeric",
35611
36006
  month: "2-digit",
@@ -35712,6 +36107,10 @@ var IANAZone = /*#__PURE__*/function (_Zone) {
35712
36107
  ;
35713
36108
 
35714
36109
  IANAZone.isValidZone = function isValidZone(zone) {
36110
+ if (!zone) {
36111
+ return false;
36112
+ }
36113
+
35715
36114
  try {
35716
36115
  new Intl.DateTimeFormat("en-US", {
35717
36116
  timeZone: zone
@@ -35720,21 +36119,6 @@ var IANAZone = /*#__PURE__*/function (_Zone) {
35720
36119
  } catch (e) {
35721
36120
  return false;
35722
36121
  }
35723
- } // Etc/GMT+8 -> -480
35724
-
35725
- /** @ignore */
35726
- ;
35727
-
35728
- IANAZone.parseGMTOffset = function parseGMTOffset(specifier) {
35729
- if (specifier) {
35730
- var match = specifier.match(/^Etc\/GMT(0|[+-]\d{1,2})$/i);
35731
-
35732
- if (match) {
35733
- return -60 * parseInt(match[1]);
35734
- }
35735
- }
35736
-
35737
- return null;
35738
36122
  };
35739
36123
 
35740
36124
  function IANAZone(name) {
@@ -35780,13 +36164,15 @@ var IANAZone = /*#__PURE__*/function (_Zone) {
35780
36164
  day = _ref2[2],
35781
36165
  hour = _ref2[3],
35782
36166
  minute = _ref2[4],
35783
- second = _ref2[5];
36167
+ second = _ref2[5]; // because we're using hour12 and https://bugs.chromium.org/p/chromium/issues/detail?id=1025564&can=2&q=%2224%3A00%22%20datetimeformat
36168
+
35784
36169
 
36170
+ var adjustedHour = hour === 24 ? 0 : hour;
35785
36171
  var asUTC = objToLocalTS({
35786
36172
  year: year,
35787
36173
  month: month,
35788
36174
  day: day,
35789
- hour: hour,
36175
+ hour: adjustedHour,
35790
36176
  minute: minute,
35791
36177
  second: second,
35792
36178
  millisecond: 0
@@ -36034,7 +36420,6 @@ var InvalidZone = /*#__PURE__*/function (_Zone) {
36034
36420
  * @private
36035
36421
  */
36036
36422
  function normalizeZone(input, defaultZone) {
36037
- var offset;
36038
36423
 
36039
36424
  if (isUndefined(input) || input === null) {
36040
36425
  return defaultZone;
@@ -36042,10 +36427,7 @@ function normalizeZone(input, defaultZone) {
36042
36427
  return input;
36043
36428
  } else if (isString(input)) {
36044
36429
  var lowered = input.toLowerCase();
36045
- if (lowered === "local" || lowered === "system") return defaultZone;else if (lowered === "utc" || lowered === "gmt") return FixedOffsetZone.utcInstance;else if ((offset = IANAZone.parseGMTOffset(input)) != null) {
36046
- // handle Etc/GMT-4, which V8 chokes on
36047
- return FixedOffsetZone.instance(offset);
36048
- } else if (IANAZone.isValidSpecifier(lowered)) return IANAZone.create(input);else return FixedOffsetZone.parseSpecifier(lowered) || new InvalidZone(input);
36430
+ if (lowered === "local" || lowered === "system") return defaultZone;else if (lowered === "utc" || lowered === "gmt") return FixedOffsetZone.utcInstance;else if (IANAZone.isValidSpecifier(lowered)) return IANAZone.create(input);else return FixedOffsetZone.parseSpecifier(lowered) || new InvalidZone(input);
36049
36431
  } else if (isNumber(input)) {
36050
36432
  return FixedOffsetZone.instance(input);
36051
36433
  } else if (typeof input === "object" && input.offset && typeof input.offset === "number") {
@@ -36413,9 +36795,8 @@ var PolyDateFormatter = /*#__PURE__*/function () {
36413
36795
  // - < Etc/GMT-14, > Etc/GMT+12, and 30-minute or 45-minute offsets are not part of tzdata
36414
36796
  var gmtOffset = -1 * (dt.offset / 60);
36415
36797
  var offsetZ = gmtOffset >= 0 ? "Etc/GMT+" + gmtOffset : "Etc/GMT" + gmtOffset;
36416
- var isOffsetZoneSupported = IANAZone.isValidZone(offsetZ);
36417
36798
 
36418
- if (dt.offset !== 0 && isOffsetZoneSupported) {
36799
+ if (dt.offset !== 0 && IANAZone.create(offsetZ).valid) {
36419
36800
  z = offsetZ;
36420
36801
  this.dt = dt;
36421
36802
  } else {
@@ -36906,7 +37287,7 @@ function extractIANAZone(match, cursor) {
36906
37287
 
36907
37288
  var isoTimeOnly = RegExp("^T?" + isoTimeBaseRegex.source + "$"); // ISO duration parsing
36908
37289
 
36909
- var isoDuration = /^-?P(?:(?:(-?\d{1,9})Y)?(?:(-?\d{1,9})M)?(?:(-?\d{1,9})W)?(?:(-?\d{1,9})D)?(?:T(?:(-?\d{1,9})H)?(?:(-?\d{1,9})M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,9}))?S)?)?)$/;
37290
+ var isoDuration = /^-?P(?:(?:(-?\d{1,9}(?:\.\d{1,9})?)Y)?(?:(-?\d{1,9}(?:\.\d{1,9})?)M)?(?:(-?\d{1,9}(?:\.\d{1,9})?)W)?(?:(-?\d{1,9}(?:\.\d{1,9})?)D)?(?:T(?:(-?\d{1,9}(?:\.\d{1,9})?)H)?(?:(-?\d{1,9}(?:\.\d{1,9})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,9}))?S)?)?)$/;
36910
37291
 
36911
37292
  function extractISODuration(match) {
36912
37293
  var s = match[0],
@@ -36930,13 +37311,13 @@ function extractISODuration(match) {
36930
37311
  };
36931
37312
 
36932
37313
  return [{
36933
- years: maybeNegate(parseInteger(yearStr)),
36934
- months: maybeNegate(parseInteger(monthStr)),
36935
- weeks: maybeNegate(parseInteger(weekStr)),
36936
- days: maybeNegate(parseInteger(dayStr)),
36937
- hours: maybeNegate(parseInteger(hourStr)),
36938
- minutes: maybeNegate(parseInteger(minuteStr)),
36939
- seconds: maybeNegate(parseInteger(secondStr), secondStr === "-0"),
37314
+ years: maybeNegate(parseFloating(yearStr)),
37315
+ months: maybeNegate(parseFloating(monthStr)),
37316
+ weeks: maybeNegate(parseFloating(weekStr)),
37317
+ days: maybeNegate(parseFloating(dayStr)),
37318
+ hours: maybeNegate(parseFloating(hourStr)),
37319
+ minutes: maybeNegate(parseFloating(minuteStr)),
37320
+ seconds: maybeNegate(parseFloating(secondStr), secondStr === "-0"),
36940
37321
  milliseconds: maybeNegate(parseMillis(millisecondsStr), negativeSeconds)
36941
37322
  }];
36942
37323
  } // These are a little braindead. EDT *should* tell us that we're in, say, America/New_York
@@ -37162,7 +37543,6 @@ var lowOrderMatrix = {
37162
37543
  }
37163
37544
  }, lowOrderMatrix); // units ordered by size
37164
37545
 
37165
-
37166
37546
  var orderedUnits$1 = ["years", "quarters", "months", "weeks", "days", "hours", "minutes", "seconds", "milliseconds"];
37167
37547
  var reverseUnits = orderedUnits$1.slice(0).reverse(); // clone really means "create another instance just like this one, but with these changes"
37168
37548
 
@@ -37210,11 +37590,11 @@ function normalizeValues(matrix, vals) {
37210
37590
  }, null);
37211
37591
  }
37212
37592
  /**
37213
- * A Duration object represents a period of time, like "2 months" or "1 day, 1 hour". Conceptually, it's just a map of units to their quantities, accompanied by some additional configuration and methods for creating, parsing, interrogating, transforming, and formatting them. They can be used on their own or in conjunction with other Luxon types; for example, you can use {@link DateTime.plus} to add a Duration object to a DateTime, producing another DateTime.
37593
+ * A Duration object represents a period of time, like "2 months" or "1 day, 1 hour". Conceptually, it's just a map of units to their quantities, accompanied by some additional configuration and methods for creating, parsing, interrogating, transforming, and formatting them. They can be used on their own or in conjunction with other Luxon types; for example, you can use {@link DateTime#plus} to add a Duration object to a DateTime, producing another DateTime.
37214
37594
  *
37215
37595
  * Here is a brief overview of commonly used methods and getters in Duration:
37216
37596
  *
37217
- * * **Creation** To create a Duration, use {@link Duration.fromMillis}, {@link Duration.fromObject}, or {@link Duration.fromISO}.
37597
+ * * **Creation** To create a Duration, use {@link Duration#fromMillis}, {@link Duration#fromObject}, or {@link Duration#fromISO}.
37218
37598
  * * **Unit values** See the {@link Duration#years}, {@link Duration.months}, {@link Duration#weeks}, {@link Duration#days}, {@link Duration#hours}, {@link Duration#minutes}, {@link Duration#seconds}, {@link Duration#milliseconds} accessors.
37219
37599
  * * **Configuration** See {@link Duration#locale} and {@link Duration#numberingSystem} accessors.
37220
37600
  * * **Transformation** To create new Durations out of old ones use {@link Duration#plus}, {@link Duration#minus}, {@link Duration#normalize}, {@link Duration#set}, {@link Duration#reconfigure}, {@link Duration#shiftTo}, and {@link Duration#negate}.
@@ -37313,6 +37693,29 @@ var Duration = /*#__PURE__*/function () {
37313
37693
  conversionAccuracy: opts.conversionAccuracy
37314
37694
  });
37315
37695
  }
37696
+ /**
37697
+ * Create a Duration from DurationLike.
37698
+ *
37699
+ * @param {Object | number | Duration} durationLike
37700
+ * One of:
37701
+ * - object with keys like 'years' and 'hours'.
37702
+ * - number representing milliseconds
37703
+ * - Duration instance
37704
+ * @return {Duration}
37705
+ */
37706
+ ;
37707
+
37708
+ Duration.fromDurationLike = function fromDurationLike(durationLike) {
37709
+ if (isNumber(durationLike)) {
37710
+ return Duration.fromMillis(durationLike);
37711
+ } else if (Duration.isDuration(durationLike)) {
37712
+ return durationLike;
37713
+ } else if (typeof durationLike === "object") {
37714
+ return Duration.fromObject(durationLike);
37715
+ } else {
37716
+ throw new InvalidArgumentError("Unknown duration argument " + durationLike + " of type " + typeof durationLike);
37717
+ }
37718
+ }
37316
37719
  /**
37317
37720
  * Create a Duration from an ISO 8601 duration string.
37318
37721
  * @param {string} text - text to parse
@@ -37450,7 +37853,7 @@ var Duration = /*#__PURE__*/function () {
37450
37853
  * * `y` for years
37451
37854
  * Notes:
37452
37855
  * * Add padding by repeating the token, e.g. "yy" pads the years to two digits, "hhhh" pads the hours out to four digits
37453
- * * The duration will be converted to the set of units in the format string using {@link Duration.shiftTo} and the Durations's conversion accuracy setting.
37856
+ * * The duration will be converted to the set of units in the format string using {@link Duration#shiftTo} and the Durations's conversion accuracy setting.
37454
37857
  * @param {string} fmt - the format string
37455
37858
  * @param {Object} opts - options
37456
37859
  * @param {boolean} [opts.floor=true] - floor numerical values
@@ -37607,7 +38010,7 @@ var Duration = /*#__PURE__*/function () {
37607
38010
 
37608
38011
  _proto.plus = function plus(duration) {
37609
38012
  if (!this.isValid) return this;
37610
- var dur = friendlyDuration(duration),
38013
+ var dur = Duration.fromDurationLike(duration),
37611
38014
  result = {};
37612
38015
 
37613
38016
  for (var _iterator = _createForOfIteratorHelperLoose(orderedUnits$1), _step; !(_step = _iterator()).done;) {
@@ -37631,7 +38034,7 @@ var Duration = /*#__PURE__*/function () {
37631
38034
 
37632
38035
  _proto.minus = function minus(duration) {
37633
38036
  if (!this.isValid) return this;
37634
- var dur = friendlyDuration(duration);
38037
+ var dur = Duration.fromDurationLike(duration);
37635
38038
  return this.plus(dur.negate());
37636
38039
  }
37637
38040
  /**
@@ -37788,8 +38191,7 @@ var Duration = /*#__PURE__*/function () {
37788
38191
 
37789
38192
  var i = Math.trunc(own);
37790
38193
  built[k] = i;
37791
- accumulated[k] = own - i; // we'd like to absorb these fractions in another unit
37792
- // plus anything further down the chain that should be rolled up in to this
38194
+ accumulated[k] = (own * 1000 - i * 1000) / 1000; // plus anything further down the chain that should be rolled up in to this
37793
38195
 
37794
38196
  for (var down in vals) {
37795
38197
  if (orderedUnits$1.indexOf(down) > orderedUnits$1.indexOf(k)) {
@@ -38008,17 +38410,6 @@ var Duration = /*#__PURE__*/function () {
38008
38410
 
38009
38411
  return Duration;
38010
38412
  }();
38011
- function friendlyDuration(durationish) {
38012
- if (isNumber(durationish)) {
38013
- return Duration.fromMillis(durationish);
38014
- } else if (Duration.isDuration(durationish)) {
38015
- return durationish;
38016
- } else if (typeof durationish === "object") {
38017
- return Duration.fromObject(durationish);
38018
- } else {
38019
- throw new InvalidArgumentError("Unknown duration argument " + durationish + " of type " + typeof durationish);
38020
- }
38021
- }
38022
38413
 
38023
38414
  var INVALID$1 = "Invalid Interval"; // checks if the start is equal to or before the end
38024
38415
 
@@ -38038,7 +38429,7 @@ function validateStartEnd(start, end) {
38038
38429
  *
38039
38430
  * Here is a brief overview of the most commonly used methods and getters in Interval:
38040
38431
  *
38041
- * * **Creation** To create an Interval, use {@link Interval.fromDateTimes}, {@link Interval.after}, {@link Interval.before}, or {@link Interval.fromISO}.
38432
+ * * **Creation** To create an Interval, use {@link Interval#fromDateTimes}, {@link Interval#after}, {@link Interval#before}, or {@link Interval#fromISO}.
38042
38433
  * * **Accessors** Use {@link Interval#start} and {@link Interval#end} to get the start and end.
38043
38434
  * * **Interrogation** To analyze the Interval, use {@link Interval#count}, {@link Interval#length}, {@link Interval#hasSame}, {@link Interval#contains}, {@link Interval#isAfter}, or {@link Interval#isBefore}.
38044
38435
  * * **Transformation** To create other Intervals out of this one, use {@link Interval#set}, {@link Interval#splitAt}, {@link Interval#splitBy}, {@link Interval#divideEqually}, {@link Interval#merge}, {@link Interval#xor}, {@link Interval#union}, {@link Interval#intersection}, or {@link Interval#difference}.
@@ -38130,7 +38521,7 @@ var Interval = /*#__PURE__*/function () {
38130
38521
  ;
38131
38522
 
38132
38523
  Interval.after = function after(start, duration) {
38133
- var dur = friendlyDuration(duration),
38524
+ var dur = Duration.fromDurationLike(duration),
38134
38525
  dt = friendlyDateTime(start);
38135
38526
  return Interval.fromDateTimes(dt, dt.plus(dur));
38136
38527
  }
@@ -38143,7 +38534,7 @@ var Interval = /*#__PURE__*/function () {
38143
38534
  ;
38144
38535
 
38145
38536
  Interval.before = function before(end, duration) {
38146
- var dur = friendlyDuration(duration),
38537
+ var dur = Duration.fromDurationLike(duration),
38147
38538
  dt = friendlyDateTime(end);
38148
38539
  return Interval.fromDateTimes(dt.minus(dur), dt);
38149
38540
  }
@@ -38151,7 +38542,7 @@ var Interval = /*#__PURE__*/function () {
38151
38542
  * Create an Interval from an ISO 8601 string.
38152
38543
  * Accepts `<start>/<end>`, `<start>/<duration>`, and `<duration>/<end>` formats.
38153
38544
  * @param {string} text - the ISO string to parse
38154
- * @param {Object} [opts] - options to pass {@link DateTime.fromISO} and optionally {@link Duration.fromISO}
38545
+ * @param {Object} [opts] - options to pass {@link DateTime#fromISO} and optionally {@link Duration#fromISO}
38155
38546
  * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals
38156
38547
  * @return {Interval}
38157
38548
  */
@@ -38362,7 +38753,7 @@ var Interval = /*#__PURE__*/function () {
38362
38753
  ;
38363
38754
 
38364
38755
  _proto.splitBy = function splitBy(duration) {
38365
- var dur = friendlyDuration(duration);
38756
+ var dur = Duration.fromDurationLike(duration);
38366
38757
 
38367
38758
  if (!this.isValid || !dur.isValid || dur.as("milliseconds") === 0) {
38368
38759
  return [];
@@ -38622,7 +39013,7 @@ var Interval = /*#__PURE__*/function () {
38622
39013
  * Returns an ISO 8601-compliant string representation of time of this Interval.
38623
39014
  * The date components are ignored.
38624
39015
  * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals
38625
- * @param {Object} opts - The same options as {@link DateTime.toISO}
39016
+ * @param {Object} opts - The same options as {@link DateTime#toISO}
38626
39017
  * @return {string}
38627
39018
  */
38628
39019
  ;
@@ -38633,7 +39024,7 @@ var Interval = /*#__PURE__*/function () {
38633
39024
  }
38634
39025
  /**
38635
39026
  * Returns a string representation of this Interval formatted according to the specified format string.
38636
- * @param {string} dateFormat - the format string. This string formats the start and end time. See {@link DateTime.toFormat} for details.
39027
+ * @param {string} dateFormat - the format string. This string formats the start and end time. See {@link DateTime#toFormat} for details.
38637
39028
  * @param {Object} opts - options
38638
39029
  * @param {string} [opts.separator = ' – '] - a separator to place between the start and end representations
38639
39030
  * @return {string}
@@ -38773,7 +39164,7 @@ var Info = /*#__PURE__*/function () {
38773
39164
  * * If `input` is a string containing a valid time zone name, a Zone instance
38774
39165
  * with that name is returned.
38775
39166
  * * If `input` is a string that doesn't refer to a known time zone, a Zone
38776
- * instance with {@link Zone.isValid} == false is returned.
39167
+ * instance with {@link Zone#isValid} == false is returned.
38777
39168
  * * If `input is a number, a Zone instance with the specified fixed offset
38778
39169
  * in minutes is returned.
38779
39170
  * * If `input` is `null` or `undefined`, the default zone is returned.
@@ -38955,10 +39346,10 @@ var Info = /*#__PURE__*/function () {
38955
39346
  }
38956
39347
  /**
38957
39348
  * Return the set of available features in this environment.
38958
- * Some features of Luxon are not available in all environments. For example, on older browsers, timezone support is not available. Use this function to figure out if that's the case.
39349
+ * Some features of Luxon are not available in all environments. For example, on older browsers, relative time formatting support is not available. Use this function to figure out if that's the case.
38959
39350
  * Keys:
38960
39351
  * * `relative`: whether this environment supports relative time formatting
38961
- * @example Info.features() //=> { intl: true, intlTokens: false, zones: true, relative: false }
39352
+ * @example Info.features() //=> { relative: false }
38962
39353
  * @return {Object}
38963
39354
  */
38964
39355
  ;
@@ -39349,6 +39740,12 @@ function unitForToken(token, loc) {
39349
39740
 
39350
39741
  case "u":
39351
39742
  return simple(oneToNine);
39743
+
39744
+ case "uu":
39745
+ return simple(oneOrTwo);
39746
+
39747
+ case "uuu":
39748
+ return intUnit(one);
39352
39749
  // meridiem
39353
39750
 
39354
39751
  case "a":
@@ -39555,14 +39952,19 @@ function dateTimeFromMatches(matches) {
39555
39952
  }
39556
39953
  };
39557
39954
 
39558
- var zone;
39955
+ var zone = null;
39956
+ var specificOffset;
39559
39957
 
39560
- if (!isUndefined(matches.Z)) {
39561
- zone = new FixedOffsetZone(matches.Z);
39562
- } else if (!isUndefined(matches.z)) {
39958
+ if (!isUndefined(matches.z)) {
39563
39959
  zone = IANAZone.create(matches.z);
39564
- } else {
39565
- zone = null;
39960
+ }
39961
+
39962
+ if (!isUndefined(matches.Z)) {
39963
+ if (!zone) {
39964
+ zone = new FixedOffsetZone(matches.Z);
39965
+ }
39966
+
39967
+ specificOffset = matches.Z;
39566
39968
  }
39567
39969
 
39568
39970
  if (!isUndefined(matches.q)) {
@@ -39594,7 +39996,7 @@ function dateTimeFromMatches(matches) {
39594
39996
 
39595
39997
  return r;
39596
39998
  }, {});
39597
- return [vals, zone];
39999
+ return [vals, zone, specificOffset];
39598
40000
  }
39599
40001
 
39600
40002
  var dummyDateTimeCache = null;
@@ -39666,9 +40068,10 @@ function explainFromTokens(locale, input, format) {
39666
40068
  _match = match(input, regex, handlers),
39667
40069
  rawMatches = _match[0],
39668
40070
  matches = _match[1],
39669
- _ref6 = matches ? dateTimeFromMatches(matches) : [null, null],
40071
+ _ref6 = matches ? dateTimeFromMatches(matches) : [null, null, undefined],
39670
40072
  result = _ref6[0],
39671
- zone = _ref6[1];
40073
+ zone = _ref6[1],
40074
+ specificOffset = _ref6[2];
39672
40075
 
39673
40076
  if (hasOwnProperty(matches, "a") && hasOwnProperty(matches, "H")) {
39674
40077
  throw new ConflictingSpecificationError("Can't include meridiem when specifying 24-hour format");
@@ -39681,7 +40084,8 @@ function explainFromTokens(locale, input, format) {
39681
40084
  rawMatches: rawMatches,
39682
40085
  matches: matches,
39683
40086
  result: result,
39684
- zone: zone
40087
+ zone: zone,
40088
+ specificOffset: specificOffset
39685
40089
  };
39686
40090
  }
39687
40091
  }
@@ -39689,9 +40093,10 @@ function parseFromTokens(locale, input, format) {
39689
40093
  var _explainFromTokens = explainFromTokens(locale, input, format),
39690
40094
  result = _explainFromTokens.result,
39691
40095
  zone = _explainFromTokens.zone,
40096
+ specificOffset = _explainFromTokens.specificOffset,
39692
40097
  invalidReason = _explainFromTokens.invalidReason;
39693
40098
 
39694
- return [result, zone, invalidReason];
40099
+ return [result, zone, specificOffset, invalidReason];
39695
40100
  }
39696
40101
 
39697
40102
  var nonLeapLadder = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334],
@@ -39979,14 +40384,15 @@ function adjustTime(inst, dur) {
39979
40384
  // by handling the zone options
39980
40385
 
39981
40386
 
39982
- function parseDataToDateTime(parsed, parsedZone, opts, format, text) {
40387
+ function parseDataToDateTime(parsed, parsedZone, opts, format, text, specificOffset) {
39983
40388
  var setZone = opts.setZone,
39984
40389
  zone = opts.zone;
39985
40390
 
39986
40391
  if (parsed && Object.keys(parsed).length !== 0) {
39987
40392
  var interpretationZone = parsedZone || zone,
39988
40393
  inst = DateTime.fromObject(parsed, _extends({}, opts, {
39989
- zone: interpretationZone
40394
+ zone: interpretationZone,
40395
+ specificOffset: specificOffset
39990
40396
  }));
39991
40397
  return setZone ? inst : inst.setZone(zone);
39992
40398
  } else {
@@ -40213,7 +40619,7 @@ function lastOpts(argList) {
40213
40619
  *
40214
40620
  * Here is a brief overview of the most commonly used functionality it provides:
40215
40621
  *
40216
- * * **Creation**: To create a DateTime from its components, use one of its factory class methods: {@link DateTime.local}, {@link DateTime.utc}, and (most flexibly) {@link DateTime.fromObject}. To create one from a standard string format, use {@link DateTime.fromISO}, {@link DateTime.fromHTTP}, and {@link DateTime.fromRFC2822}. To create one from a custom string format, use {@link DateTime.fromFormat}. To create one from a native JS date, use {@link DateTime.fromJSDate}.
40622
+ * * **Creation**: To create a DateTime from its components, use one of its factory class methods: {@link DateTime#local}, {@link DateTime#utc}, and (most flexibly) {@link DateTime#fromObject}. To create one from a standard string format, use {@link DateTime#fromISO}, {@link DateTime#fromHTTP}, and {@link DateTime#fromRFC2822}. To create one from a custom string format, use {@link DateTime#fromFormat}. To create one from a native JS date, use {@link DateTime#fromJSDate}.
40217
40623
  * * **Gregorian calendar and time**: To examine the Gregorian properties of a DateTime individually (i.e as opposed to collectively through {@link DateTime#toObject}), use the {@link DateTime#year}, {@link DateTime#month},
40218
40624
  * {@link DateTime#day}, {@link DateTime#hour}, {@link DateTime#minute}, {@link DateTime#second}, {@link DateTime#millisecond} accessors.
40219
40625
  * * **Week calendar**: For ISO week calendar attributes, see the {@link DateTime#weekYear}, {@link DateTime#weekNumber}, and {@link DateTime#weekday} accessors.
@@ -40531,7 +40937,7 @@ var DateTime = /*#__PURE__*/function () {
40531
40937
  }
40532
40938
 
40533
40939
  var tsNow = Settings.now(),
40534
- offsetProvis = zoneToUse.offset(tsNow),
40940
+ offsetProvis = !isUndefined(opts.specificOffset) ? opts.specificOffset : zoneToUse.offset(tsNow),
40535
40941
  normalized = normalizeObject(obj, normalizeUnit),
40536
40942
  containsOrdinal = !isUndefined(normalized.ordinal),
40537
40943
  containsGregorYear = !isUndefined(normalized.year),
@@ -40735,12 +41141,13 @@ var DateTime = /*#__PURE__*/function () {
40735
41141
  _parseFromTokens = parseFromTokens(localeToUse, text, fmt),
40736
41142
  vals = _parseFromTokens[0],
40737
41143
  parsedZone = _parseFromTokens[1],
40738
- invalid = _parseFromTokens[2];
41144
+ specificOffset = _parseFromTokens[2],
41145
+ invalid = _parseFromTokens[3];
40739
41146
 
40740
41147
  if (invalid) {
40741
41148
  return DateTime.invalid(invalid);
40742
41149
  } else {
40743
- return parseDataToDateTime(vals, parsedZone, opts, "format " + fmt, text);
41150
+ return parseDataToDateTime(vals, parsedZone, opts, "format " + fmt, text, specificOffset);
40744
41151
  }
40745
41152
  }
40746
41153
  /**
@@ -40874,7 +41281,7 @@ var DateTime = /*#__PURE__*/function () {
40874
41281
  /**
40875
41282
  * "Set" the DateTime's zone to UTC. Returns a newly-constructed DateTime.
40876
41283
  *
40877
- * Equivalent to {@link DateTime.setZone}('utc')
41284
+ * Equivalent to {@link DateTime#setZone}('utc')
40878
41285
  * @param {number} [offset=0] - optionally, an offset from UTC in minutes
40879
41286
  * @param {Object} [opts={}] - options to pass to `setZone()`
40880
41287
  * @return {DateTime}
@@ -40906,8 +41313,8 @@ var DateTime = /*#__PURE__*/function () {
40906
41313
  /**
40907
41314
  * "Set" the DateTime's zone to specified zone. Returns a newly-constructed DateTime.
40908
41315
  *
40909
- * By default, the setter keeps the underlying time the same (as in, the same timestamp), but the new instance will report different local times and consider DSTs when making computations, as with {@link DateTime.plus}. You may wish to use {@link DateTime.toLocal} and {@link DateTime.toUTC} which provide simple convenience wrappers for commonly used zones.
40910
- * @param {string|Zone} [zone='local'] - a zone identifier. As a string, that can be any IANA zone supported by the host environment, or a fixed-offset name of the form 'UTC+3', or the strings 'local' or 'utc'. You may also supply an instance of a {@link DateTime.Zone} class.
41316
+ * By default, the setter keeps the underlying time the same (as in, the same timestamp), but the new instance will report different local times and consider DSTs when making computations, as with {@link DateTime#plus}. You may wish to use {@link DateTime#toLocal} and {@link DateTime#toUTC} which provide simple convenience wrappers for commonly used zones.
41317
+ * @param {string|Zone} [zone='local'] - a zone identifier. As a string, that can be any IANA zone supported by the host environment, or a fixed-offset name of the form 'UTC+3', or the strings 'local' or 'utc'. You may also supply an instance of a {@link DateTime#Zone} class.
40911
41318
  * @param {Object} opts - options
40912
41319
  * @param {boolean} [opts.keepLocalTime=false] - If true, adjust the underlying time so that the local time stays the same, but in the target zone. You should rarely need this.
40913
41320
  * @return {DateTime}
@@ -40983,7 +41390,7 @@ var DateTime = /*#__PURE__*/function () {
40983
41390
  }
40984
41391
  /**
40985
41392
  * "Set" the values of specified units. Returns a newly-constructed DateTime.
40986
- * You can only set units with this method; for "setting" metadata, see {@link DateTime.reconfigure} and {@link DateTime.setZone}.
41393
+ * You can only set units with this method; for "setting" metadata, see {@link DateTime#reconfigure} and {@link DateTime#setZone}.
40987
41394
  * @param {Object} values - a mapping of units to numbers
40988
41395
  * @example dt.set({ year: 2017 })
40989
41396
  * @example dt.set({ hour: 8, minute: 30 })
@@ -41052,12 +41459,12 @@ var DateTime = /*#__PURE__*/function () {
41052
41459
 
41053
41460
  _proto.plus = function plus(duration) {
41054
41461
  if (!this.isValid) return this;
41055
- var dur = friendlyDuration(duration);
41462
+ var dur = Duration.fromDurationLike(duration);
41056
41463
  return clone(this, adjustTime(this, dur));
41057
41464
  }
41058
41465
  /**
41059
41466
  * Subtract a period of time to this DateTime and return the resulting DateTime
41060
- * See {@link DateTime.plus}
41467
+ * See {@link DateTime#plus}
41061
41468
  * @param {Duration|Object|number} duration - The amount to subtract. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject()
41062
41469
  @return {DateTime}
41063
41470
  */
@@ -41065,7 +41472,7 @@ var DateTime = /*#__PURE__*/function () {
41065
41472
 
41066
41473
  _proto.minus = function minus(duration) {
41067
41474
  if (!this.isValid) return this;
41068
- var dur = friendlyDuration(duration).negate();
41475
+ var dur = Duration.fromDurationLike(duration).negate();
41069
41476
  return clone(this, adjustTime(this, dur));
41070
41477
  }
41071
41478
  /**
@@ -41145,7 +41552,7 @@ var DateTime = /*#__PURE__*/function () {
41145
41552
 
41146
41553
  /**
41147
41554
  * Returns a string representation of this DateTime formatted according to the specified format string.
41148
- * **You may not want this.** See {@link DateTime.toLocaleString} for a more flexible formatting tool. For a table of tokens and their interpretations, see [here](https://moment.github.io/luxon/#/formatting?id=table-of-tokens).
41555
+ * **You may not want this.** See {@link DateTime#toLocaleString} for a more flexible formatting tool. For a table of tokens and their interpretations, see [here](https://moment.github.io/luxon/#/formatting?id=table-of-tokens).
41149
41556
  * Defaults to en-US if no locale has been specified, regardless of the system's locale.
41150
41557
  * @param {string} fmt - the format string
41151
41558
  * @param {Object} opts - opts to override the configuration options on this DateTime
@@ -41408,7 +41815,7 @@ var DateTime = /*#__PURE__*/function () {
41408
41815
  return this.isValid ? this.toISO() : INVALID;
41409
41816
  }
41410
41817
  /**
41411
- * Returns the epoch milliseconds of this DateTime. Alias of {@link DateTime.toMillis}
41818
+ * Returns the epoch milliseconds of this DateTime. Alias of {@link DateTime#toMillis}
41412
41819
  * @return {number}
41413
41820
  */
41414
41821
  ;
@@ -41533,7 +41940,7 @@ var DateTime = /*#__PURE__*/function () {
41533
41940
  }
41534
41941
  /**
41535
41942
  * Return the difference between this DateTime and right now.
41536
- * See {@link DateTime.diff}
41943
+ * See {@link DateTime#diff}
41537
41944
  * @param {string|string[]} [unit=['milliseconds']] - the unit or units units (such as 'hours' or 'days') to include in the duration
41538
41945
  * @param {Object} opts - options that affect the creation of the Duration
41539
41946
  * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use
@@ -41565,7 +41972,7 @@ var DateTime = /*#__PURE__*/function () {
41565
41972
  /**
41566
41973
  * Return whether this DateTime is in the same unit of time as another DateTime.
41567
41974
  * Higher-order units must also be identical for this function to return `true`.
41568
- * Note that time zones are **ignored** in this comparison, which compares the **local** calendar time. Use {@link DateTime.setZone} to convert one of the dates if needed.
41975
+ * Note that time zones are **ignored** in this comparison, which compares the **local** calendar time. Use {@link DateTime#setZone} to convert one of the dates if needed.
41569
41976
  * @param {DateTime} otherDateTime - the other DateTime
41570
41977
  * @param {string} unit - the unit of time to check sameness on
41571
41978
  * @example DateTime.now().hasSame(otherDT, 'day'); //~> true if otherDT is in the same current calendar day
@@ -41747,7 +42154,7 @@ var DateTime = /*#__PURE__*/function () {
41747
42154
  } // FORMAT PRESETS
41748
42155
 
41749
42156
  /**
41750
- * {@link DateTime.toLocaleString} format like 10/14/1983
42157
+ * {@link DateTime#toLocaleString} format like 10/14/1983
41751
42158
  * @type {Object}
41752
42159
  */
41753
42160
  ;
@@ -42153,7 +42560,7 @@ var DateTime = /*#__PURE__*/function () {
42153
42560
  return DATE_SHORT;
42154
42561
  }
42155
42562
  /**
42156
- * {@link DateTime.toLocaleString} format like 'Oct 14, 1983'
42563
+ * {@link DateTime#toLocaleString} format like 'Oct 14, 1983'
42157
42564
  * @type {Object}
42158
42565
  */
42159
42566
 
@@ -42163,7 +42570,7 @@ var DateTime = /*#__PURE__*/function () {
42163
42570
  return DATE_MED;
42164
42571
  }
42165
42572
  /**
42166
- * {@link DateTime.toLocaleString} format like 'Fri, Oct 14, 1983'
42573
+ * {@link DateTime#toLocaleString} format like 'Fri, Oct 14, 1983'
42167
42574
  * @type {Object}
42168
42575
  */
42169
42576
 
@@ -42173,7 +42580,7 @@ var DateTime = /*#__PURE__*/function () {
42173
42580
  return DATE_MED_WITH_WEEKDAY;
42174
42581
  }
42175
42582
  /**
42176
- * {@link DateTime.toLocaleString} format like 'October 14, 1983'
42583
+ * {@link DateTime#toLocaleString} format like 'October 14, 1983'
42177
42584
  * @type {Object}
42178
42585
  */
42179
42586
 
@@ -42183,7 +42590,7 @@ var DateTime = /*#__PURE__*/function () {
42183
42590
  return DATE_FULL;
42184
42591
  }
42185
42592
  /**
42186
- * {@link DateTime.toLocaleString} format like 'Tuesday, October 14, 1983'
42593
+ * {@link DateTime#toLocaleString} format like 'Tuesday, October 14, 1983'
42187
42594
  * @type {Object}
42188
42595
  */
42189
42596
 
@@ -42193,7 +42600,7 @@ var DateTime = /*#__PURE__*/function () {
42193
42600
  return DATE_HUGE;
42194
42601
  }
42195
42602
  /**
42196
- * {@link DateTime.toLocaleString} format like '09:30 AM'. Only 12-hour if the locale is.
42603
+ * {@link DateTime#toLocaleString} format like '09:30 AM'. Only 12-hour if the locale is.
42197
42604
  * @type {Object}
42198
42605
  */
42199
42606
 
@@ -42203,7 +42610,7 @@ var DateTime = /*#__PURE__*/function () {
42203
42610
  return TIME_SIMPLE;
42204
42611
  }
42205
42612
  /**
42206
- * {@link DateTime.toLocaleString} format like '09:30:23 AM'. Only 12-hour if the locale is.
42613
+ * {@link DateTime#toLocaleString} format like '09:30:23 AM'. Only 12-hour if the locale is.
42207
42614
  * @type {Object}
42208
42615
  */
42209
42616
 
@@ -42213,7 +42620,7 @@ var DateTime = /*#__PURE__*/function () {
42213
42620
  return TIME_WITH_SECONDS;
42214
42621
  }
42215
42622
  /**
42216
- * {@link DateTime.toLocaleString} format like '09:30:23 AM EDT'. Only 12-hour if the locale is.
42623
+ * {@link DateTime#toLocaleString} format like '09:30:23 AM EDT'. Only 12-hour if the locale is.
42217
42624
  * @type {Object}
42218
42625
  */
42219
42626
 
@@ -42223,7 +42630,7 @@ var DateTime = /*#__PURE__*/function () {
42223
42630
  return TIME_WITH_SHORT_OFFSET;
42224
42631
  }
42225
42632
  /**
42226
- * {@link DateTime.toLocaleString} format like '09:30:23 AM Eastern Daylight Time'. Only 12-hour if the locale is.
42633
+ * {@link DateTime#toLocaleString} format like '09:30:23 AM Eastern Daylight Time'. Only 12-hour if the locale is.
42227
42634
  * @type {Object}
42228
42635
  */
42229
42636
 
@@ -42233,7 +42640,7 @@ var DateTime = /*#__PURE__*/function () {
42233
42640
  return TIME_WITH_LONG_OFFSET;
42234
42641
  }
42235
42642
  /**
42236
- * {@link DateTime.toLocaleString} format like '09:30', always 24-hour.
42643
+ * {@link DateTime#toLocaleString} format like '09:30', always 24-hour.
42237
42644
  * @type {Object}
42238
42645
  */
42239
42646
 
@@ -42243,7 +42650,7 @@ var DateTime = /*#__PURE__*/function () {
42243
42650
  return TIME_24_SIMPLE;
42244
42651
  }
42245
42652
  /**
42246
- * {@link DateTime.toLocaleString} format like '09:30:23', always 24-hour.
42653
+ * {@link DateTime#toLocaleString} format like '09:30:23', always 24-hour.
42247
42654
  * @type {Object}
42248
42655
  */
42249
42656
 
@@ -42253,7 +42660,7 @@ var DateTime = /*#__PURE__*/function () {
42253
42660
  return TIME_24_WITH_SECONDS;
42254
42661
  }
42255
42662
  /**
42256
- * {@link DateTime.toLocaleString} format like '09:30:23 EDT', always 24-hour.
42663
+ * {@link DateTime#toLocaleString} format like '09:30:23 EDT', always 24-hour.
42257
42664
  * @type {Object}
42258
42665
  */
42259
42666
 
@@ -42263,7 +42670,7 @@ var DateTime = /*#__PURE__*/function () {
42263
42670
  return TIME_24_WITH_SHORT_OFFSET;
42264
42671
  }
42265
42672
  /**
42266
- * {@link DateTime.toLocaleString} format like '09:30:23 Eastern Daylight Time', always 24-hour.
42673
+ * {@link DateTime#toLocaleString} format like '09:30:23 Eastern Daylight Time', always 24-hour.
42267
42674
  * @type {Object}
42268
42675
  */
42269
42676
 
@@ -42273,7 +42680,7 @@ var DateTime = /*#__PURE__*/function () {
42273
42680
  return TIME_24_WITH_LONG_OFFSET;
42274
42681
  }
42275
42682
  /**
42276
- * {@link DateTime.toLocaleString} format like '10/14/1983, 9:30 AM'. Only 12-hour if the locale is.
42683
+ * {@link DateTime#toLocaleString} format like '10/14/1983, 9:30 AM'. Only 12-hour if the locale is.
42277
42684
  * @type {Object}
42278
42685
  */
42279
42686
 
@@ -42283,7 +42690,7 @@ var DateTime = /*#__PURE__*/function () {
42283
42690
  return DATETIME_SHORT;
42284
42691
  }
42285
42692
  /**
42286
- * {@link DateTime.toLocaleString} format like '10/14/1983, 9:30:33 AM'. Only 12-hour if the locale is.
42693
+ * {@link DateTime#toLocaleString} format like '10/14/1983, 9:30:33 AM'. Only 12-hour if the locale is.
42287
42694
  * @type {Object}
42288
42695
  */
42289
42696
 
@@ -42293,7 +42700,7 @@ var DateTime = /*#__PURE__*/function () {
42293
42700
  return DATETIME_SHORT_WITH_SECONDS;
42294
42701
  }
42295
42702
  /**
42296
- * {@link DateTime.toLocaleString} format like 'Oct 14, 1983, 9:30 AM'. Only 12-hour if the locale is.
42703
+ * {@link DateTime#toLocaleString} format like 'Oct 14, 1983, 9:30 AM'. Only 12-hour if the locale is.
42297
42704
  * @type {Object}
42298
42705
  */
42299
42706
 
@@ -42303,7 +42710,7 @@ var DateTime = /*#__PURE__*/function () {
42303
42710
  return DATETIME_MED;
42304
42711
  }
42305
42712
  /**
42306
- * {@link DateTime.toLocaleString} format like 'Oct 14, 1983, 9:30:33 AM'. Only 12-hour if the locale is.
42713
+ * {@link DateTime#toLocaleString} format like 'Oct 14, 1983, 9:30:33 AM'. Only 12-hour if the locale is.
42307
42714
  * @type {Object}
42308
42715
  */
42309
42716
 
@@ -42313,7 +42720,7 @@ var DateTime = /*#__PURE__*/function () {
42313
42720
  return DATETIME_MED_WITH_SECONDS;
42314
42721
  }
42315
42722
  /**
42316
- * {@link DateTime.toLocaleString} format like 'Fri, 14 Oct 1983, 9:30 AM'. Only 12-hour if the locale is.
42723
+ * {@link DateTime#toLocaleString} format like 'Fri, 14 Oct 1983, 9:30 AM'. Only 12-hour if the locale is.
42317
42724
  * @type {Object}
42318
42725
  */
42319
42726
 
@@ -42323,7 +42730,7 @@ var DateTime = /*#__PURE__*/function () {
42323
42730
  return DATETIME_MED_WITH_WEEKDAY;
42324
42731
  }
42325
42732
  /**
42326
- * {@link DateTime.toLocaleString} format like 'October 14, 1983, 9:30 AM EDT'. Only 12-hour if the locale is.
42733
+ * {@link DateTime#toLocaleString} format like 'October 14, 1983, 9:30 AM EDT'. Only 12-hour if the locale is.
42327
42734
  * @type {Object}
42328
42735
  */
42329
42736
 
@@ -42333,7 +42740,7 @@ var DateTime = /*#__PURE__*/function () {
42333
42740
  return DATETIME_FULL;
42334
42741
  }
42335
42742
  /**
42336
- * {@link DateTime.toLocaleString} format like 'October 14, 1983, 9:30:33 AM EDT'. Only 12-hour if the locale is.
42743
+ * {@link DateTime#toLocaleString} format like 'October 14, 1983, 9:30:33 AM EDT'. Only 12-hour if the locale is.
42337
42744
  * @type {Object}
42338
42745
  */
42339
42746
 
@@ -42343,7 +42750,7 @@ var DateTime = /*#__PURE__*/function () {
42343
42750
  return DATETIME_FULL_WITH_SECONDS;
42344
42751
  }
42345
42752
  /**
42346
- * {@link DateTime.toLocaleString} format like 'Friday, October 14, 1983, 9:30 AM Eastern Daylight Time'. Only 12-hour if the locale is.
42753
+ * {@link DateTime#toLocaleString} format like 'Friday, October 14, 1983, 9:30 AM Eastern Daylight Time'. Only 12-hour if the locale is.
42347
42754
  * @type {Object}
42348
42755
  */
42349
42756
 
@@ -42353,7 +42760,7 @@ var DateTime = /*#__PURE__*/function () {
42353
42760
  return DATETIME_HUGE;
42354
42761
  }
42355
42762
  /**
42356
- * {@link DateTime.toLocaleString} format like 'Friday, October 14, 1983, 9:30:33 AM Eastern Daylight Time'. Only 12-hour if the locale is.
42763
+ * {@link DateTime#toLocaleString} format like 'Friday, October 14, 1983, 9:30:33 AM Eastern Daylight Time'. Only 12-hour if the locale is.
42357
42764
  * @type {Object}
42358
42765
  */
42359
42766
 
@@ -42378,7 +42785,7 @@ function friendlyDateTime(dateTimeish) {
42378
42785
  }
42379
42786
  }
42380
42787
 
42381
- var VERSION = "2.0.2";
42788
+ var VERSION = "2.2.0";
42382
42789
 
42383
42790
  exports.DateTime = DateTime;
42384
42791
  exports.Duration = Duration;
@@ -42434,7 +42841,7 @@ var gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPr
42434
42841
  : null
42435
42842
  );
42436
42843
 
42437
- var inspectCustom = __webpack_require__(/*! ./util.inspect */ "?4f7e").custom;
42844
+ var inspectCustom = (__webpack_require__(/*! ./util.inspect */ "?4f7e").custom);
42438
42845
  var inspectSymbol = inspectCustom && isSymbol(inspectCustom) ? inspectCustom : null;
42439
42846
  var toStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag !== 'undefined' ? Symbol.toStringTag : null;
42440
42847
 
@@ -43232,6 +43639,7 @@ var arrayPrefixGenerators = {
43232
43639
  };
43233
43640
 
43234
43641
  var isArray = Array.isArray;
43642
+ var split = String.prototype.split;
43235
43643
  var push = Array.prototype.push;
43236
43644
  var pushToArray = function (arr, valueOrArray) {
43237
43645
  push.apply(arr, isArray(valueOrArray) ? valueOrArray : [valueOrArray]);
@@ -43268,6 +43676,8 @@ var isNonNullishPrimitive = function isNonNullishPrimitive(v) {
43268
43676
  || typeof v === 'bigint';
43269
43677
  };
43270
43678
 
43679
+ var sentinel = {};
43680
+
43271
43681
  var stringify = function stringify(
43272
43682
  object,
43273
43683
  prefix,
@@ -43287,8 +43697,23 @@ var stringify = function stringify(
43287
43697
  ) {
43288
43698
  var obj = object;
43289
43699
 
43290
- if (sideChannel.has(object)) {
43291
- throw new RangeError('Cyclic object value');
43700
+ var tmpSc = sideChannel;
43701
+ var step = 0;
43702
+ var findFlag = false;
43703
+ while ((tmpSc = tmpSc.get(sentinel)) !== undefined && !findFlag) {
43704
+ // Where object last appeared in the ref tree
43705
+ var pos = tmpSc.get(object);
43706
+ step += 1;
43707
+ if (typeof pos !== 'undefined') {
43708
+ if (pos === step) {
43709
+ throw new RangeError('Cyclic object value');
43710
+ } else {
43711
+ findFlag = true; // Break while
43712
+ }
43713
+ }
43714
+ if (typeof tmpSc.get(sentinel) === 'undefined') {
43715
+ step = 0;
43716
+ }
43292
43717
  }
43293
43718
 
43294
43719
  if (typeof filter === 'function') {
@@ -43315,6 +43740,14 @@ var stringify = function stringify(
43315
43740
  if (isNonNullishPrimitive(obj) || utils.isBuffer(obj)) {
43316
43741
  if (encoder) {
43317
43742
  var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder, charset, 'key', format);
43743
+ if (generateArrayPrefix === 'comma' && encodeValuesOnly) {
43744
+ var valuesArray = split.call(String(obj), ',');
43745
+ var valuesJoined = '';
43746
+ for (var i = 0; i < valuesArray.length; ++i) {
43747
+ valuesJoined += (i === 0 ? '' : ',') + formatter(encoder(valuesArray[i], defaults.encoder, charset, 'value', format));
43748
+ }
43749
+ return [formatter(keyValue) + '=' + valuesJoined];
43750
+ }
43318
43751
  return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults.encoder, charset, 'value', format))];
43319
43752
  }
43320
43753
  return [formatter(prefix) + '=' + formatter(String(obj))];
@@ -43337,8 +43770,8 @@ var stringify = function stringify(
43337
43770
  objKeys = sort ? keys.sort(sort) : keys;
43338
43771
  }
43339
43772
 
43340
- for (var i = 0; i < objKeys.length; ++i) {
43341
- var key = objKeys[i];
43773
+ for (var j = 0; j < objKeys.length; ++j) {
43774
+ var key = objKeys[j];
43342
43775
  var value = typeof key === 'object' && key.value !== undefined ? key.value : obj[key];
43343
43776
 
43344
43777
  if (skipNulls && value === null) {
@@ -43349,8 +43782,9 @@ var stringify = function stringify(
43349
43782
  ? typeof generateArrayPrefix === 'function' ? generateArrayPrefix(prefix, key) : prefix
43350
43783
  : prefix + (allowDots ? '.' + key : '[' + key + ']');
43351
43784
 
43352
- sideChannel.set(object, true);
43785
+ sideChannel.set(object, step);
43353
43786
  var valueSideChannel = getSideChannel();
43787
+ valueSideChannel.set(sentinel, sideChannel);
43354
43788
  pushToArray(values, stringify(
43355
43789
  value,
43356
43790
  keyPrefix,
@@ -43691,6 +44125,7 @@ var encode = function encode(str, defaultEncoder, charset, kind, format) {
43691
44125
 
43692
44126
  i += 1;
43693
44127
  c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF));
44128
+ /* eslint operator-linebreak: [2, "before"] */
43694
44129
  out += hexTable[0xF0 | (c >> 18)]
43695
44130
  + hexTable[0x80 | ((c >> 12) & 0x3F)]
43696
44131
  + hexTable[0x80 | ((c >> 6) & 0x3F)]
@@ -46055,9 +46490,9 @@ exports.quickSort = function (ary, comparator) {
46055
46490
 
46056
46491
  var util = __webpack_require__(/*! ./util */ "./node_modules/stacktrace-gps/node_modules/source-map/lib/util.js");
46057
46492
  var binarySearch = __webpack_require__(/*! ./binary-search */ "./node_modules/stacktrace-gps/node_modules/source-map/lib/binary-search.js");
46058
- var ArraySet = __webpack_require__(/*! ./array-set */ "./node_modules/stacktrace-gps/node_modules/source-map/lib/array-set.js").ArraySet;
46493
+ var ArraySet = (__webpack_require__(/*! ./array-set */ "./node_modules/stacktrace-gps/node_modules/source-map/lib/array-set.js").ArraySet);
46059
46494
  var base64VLQ = __webpack_require__(/*! ./base64-vlq */ "./node_modules/stacktrace-gps/node_modules/source-map/lib/base64-vlq.js");
46060
- var quickSort = __webpack_require__(/*! ./quick-sort */ "./node_modules/stacktrace-gps/node_modules/source-map/lib/quick-sort.js").quickSort;
46495
+ var quickSort = (__webpack_require__(/*! ./quick-sort */ "./node_modules/stacktrace-gps/node_modules/source-map/lib/quick-sort.js").quickSort);
46061
46496
 
46062
46497
  function SourceMapConsumer(aSourceMap) {
46063
46498
  var sourceMap = aSourceMap;
@@ -47147,8 +47582,8 @@ exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer;
47147
47582
 
47148
47583
  var base64VLQ = __webpack_require__(/*! ./base64-vlq */ "./node_modules/stacktrace-gps/node_modules/source-map/lib/base64-vlq.js");
47149
47584
  var util = __webpack_require__(/*! ./util */ "./node_modules/stacktrace-gps/node_modules/source-map/lib/util.js");
47150
- var ArraySet = __webpack_require__(/*! ./array-set */ "./node_modules/stacktrace-gps/node_modules/source-map/lib/array-set.js").ArraySet;
47151
- var MappingList = __webpack_require__(/*! ./mapping-list */ "./node_modules/stacktrace-gps/node_modules/source-map/lib/mapping-list.js").MappingList;
47585
+ var ArraySet = (__webpack_require__(/*! ./array-set */ "./node_modules/stacktrace-gps/node_modules/source-map/lib/array-set.js").ArraySet);
47586
+ var MappingList = (__webpack_require__(/*! ./mapping-list */ "./node_modules/stacktrace-gps/node_modules/source-map/lib/mapping-list.js").MappingList);
47152
47587
 
47153
47588
  /**
47154
47589
  * An instance of the SourceMapGenerator represents a source map which is
@@ -47559,7 +47994,7 @@ exports.SourceMapGenerator = SourceMapGenerator;
47559
47994
  * http://opensource.org/licenses/BSD-3-Clause
47560
47995
  */
47561
47996
 
47562
- var SourceMapGenerator = __webpack_require__(/*! ./source-map-generator */ "./node_modules/stacktrace-gps/node_modules/source-map/lib/source-map-generator.js").SourceMapGenerator;
47997
+ var SourceMapGenerator = (__webpack_require__(/*! ./source-map-generator */ "./node_modules/stacktrace-gps/node_modules/source-map/lib/source-map-generator.js").SourceMapGenerator);
47563
47998
  var util = __webpack_require__(/*! ./util */ "./node_modules/stacktrace-gps/node_modules/source-map/lib/util.js");
47564
47999
 
47565
48000
  // Matches a Windows-style `\r\n` newline or a `\n` newline used by all other