@bringg/dashboard-sdk 6.0.2 → 6.0.3-pre.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6026,7 +6026,7 @@ function __classPrivateFieldSet(receiver, privateMap, value) {
6026
6026
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Subscriber; });
6027
6027
  /* unused harmony export SafeSubscriber */
6028
6028
  /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
6029
- /* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(39);
6029
+ /* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(38);
6030
6030
  /* harmony import */ var _Observer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(85);
6031
6031
  /* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(7);
6032
6032
  /* harmony import */ var _internal_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(63);
@@ -6548,7 +6548,7 @@ var OuterSubscriber = /*@__PURE__*/ (function (_super) {
6548
6548
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Subscription; });
6549
6549
  /* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(10);
6550
6550
  /* harmony import */ var _util_isObject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(80);
6551
- /* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(39);
6551
+ /* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(38);
6552
6552
  /* harmony import */ var _util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(64);
6553
6553
  /** PURE_IMPORTS_START _util_isArray,_util_isObject,_util_isFunction,_util_UnsubscriptionError PURE_IMPORTS_END */
6554
6554
 
@@ -24343,8 +24343,8 @@ var isArray = /*@__PURE__*/ (function () { return Array.isArray || (function (x)
24343
24343
 
24344
24344
  "use strict";
24345
24345
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return async; });
24346
- /* harmony import */ var _AsyncAction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(48);
24347
- /* harmony import */ var _AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(45);
24346
+ /* harmony import */ var _AsyncAction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(47);
24347
+ /* harmony import */ var _AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(44);
24348
24348
  /** PURE_IMPORTS_START _AsyncAction,_AsyncScheduler PURE_IMPORTS_END */
24349
24349
 
24350
24350
 
@@ -25880,988 +25880,349 @@ const defaultBinaryType = "arraybuffer";
25880
25880
 
25881
25881
  /***/ }),
25882
25882
  /* 36 */
25883
- /***/ (function(module, exports, __webpack_require__) {
25883
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
25884
25884
 
25885
25885
  "use strict";
25886
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return mergeMap; });
25887
+ /* unused harmony export MergeMapOperator */
25888
+ /* unused harmony export MergeMapSubscriber */
25889
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
25890
+ /* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(5);
25891
+ /* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6);
25892
+ /* harmony import */ var _InnerSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(19);
25893
+ /* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(13);
25894
+ /* harmony import */ var _observable_from__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(17);
25895
+ /** PURE_IMPORTS_START tslib,_util_subscribeToResult,_OuterSubscriber,_InnerSubscriber,_map,_observable_from PURE_IMPORTS_END */
25886
25896
 
25887
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
25888
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
25889
- return new (P || (P = Promise))(function (resolve, reject) {
25890
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
25891
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
25892
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
25893
- step((generator = generator.apply(thisArg, _arguments || [])).next());
25894
- });
25895
- };
25896
- var __generator = (this && this.__generator) || function (thisArg, body) {
25897
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
25898
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
25899
- function verb(n) { return function (v) { return step([n, v]); }; }
25900
- function step(op) {
25901
- if (f) throw new TypeError("Generator is already executing.");
25902
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
25903
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
25904
- if (y = 0, t) op = [op[0] & 2, t.value];
25905
- switch (op[0]) {
25906
- case 0: case 1: t = op; break;
25907
- case 4: _.label++; return { value: op[1], done: false };
25908
- case 5: _.label++; y = op[1]; op = [0]; continue;
25909
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
25910
- default:
25911
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
25912
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
25913
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
25914
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
25915
- if (t[2]) _.ops.pop();
25916
- _.trys.pop(); continue;
25917
- }
25918
- op = body.call(thisArg, _);
25919
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
25920
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
25897
+
25898
+
25899
+
25900
+
25901
+
25902
+ function mergeMap(project, resultSelector, concurrent) {
25903
+ if (concurrent === void 0) {
25904
+ concurrent = Number.POSITIVE_INFINITY;
25921
25905
  }
25922
- };
25923
- var __read = (this && this.__read) || function (o, n) {
25924
- var m = typeof Symbol === "function" && o[Symbol.iterator];
25925
- if (!m) return o;
25926
- var i = m.call(o), r, ar = [], e;
25927
- try {
25928
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
25906
+ if (typeof resultSelector === 'function') {
25907
+ return function (source) { return source.pipe(mergeMap(function (a, i) { return Object(_observable_from__WEBPACK_IMPORTED_MODULE_5__[/* from */ "a"])(project(a, i)).pipe(Object(_map__WEBPACK_IMPORTED_MODULE_4__[/* map */ "a"])(function (b, ii) { return resultSelector(a, b, i, ii); })); }, concurrent)); };
25929
25908
  }
25930
- catch (error) { e = { error: error }; }
25931
- finally {
25909
+ else if (typeof resultSelector === 'number') {
25910
+ concurrent = resultSelector;
25911
+ }
25912
+ return function (source) { return source.lift(new MergeMapOperator(project, concurrent)); };
25913
+ }
25914
+ var MergeMapOperator = /*@__PURE__*/ (function () {
25915
+ function MergeMapOperator(project, concurrent) {
25916
+ if (concurrent === void 0) {
25917
+ concurrent = Number.POSITIVE_INFINITY;
25918
+ }
25919
+ this.project = project;
25920
+ this.concurrent = concurrent;
25921
+ }
25922
+ MergeMapOperator.prototype.call = function (observer, source) {
25923
+ return source.subscribe(new MergeMapSubscriber(observer, this.project, this.concurrent));
25924
+ };
25925
+ return MergeMapOperator;
25926
+ }());
25927
+
25928
+ var MergeMapSubscriber = /*@__PURE__*/ (function (_super) {
25929
+ tslib__WEBPACK_IMPORTED_MODULE_0__[/* __extends */ "a"](MergeMapSubscriber, _super);
25930
+ function MergeMapSubscriber(destination, project, concurrent) {
25931
+ if (concurrent === void 0) {
25932
+ concurrent = Number.POSITIVE_INFINITY;
25933
+ }
25934
+ var _this = _super.call(this, destination) || this;
25935
+ _this.project = project;
25936
+ _this.concurrent = concurrent;
25937
+ _this.hasCompleted = false;
25938
+ _this.buffer = [];
25939
+ _this.active = 0;
25940
+ _this.index = 0;
25941
+ return _this;
25942
+ }
25943
+ MergeMapSubscriber.prototype._next = function (value) {
25944
+ if (this.active < this.concurrent) {
25945
+ this._tryNext(value);
25946
+ }
25947
+ else {
25948
+ this.buffer.push(value);
25949
+ }
25950
+ };
25951
+ MergeMapSubscriber.prototype._tryNext = function (value) {
25952
+ var result;
25953
+ var index = this.index++;
25932
25954
  try {
25933
- if (r && !r.done && (m = i["return"])) m.call(i);
25955
+ result = this.project(value, index);
25934
25956
  }
25935
- finally { if (e) throw e.error; }
25957
+ catch (err) {
25958
+ this.destination.error(err);
25959
+ return;
25960
+ }
25961
+ this.active++;
25962
+ this._innerSub(result, value, index);
25963
+ };
25964
+ MergeMapSubscriber.prototype._innerSub = function (ish, value, index) {
25965
+ var innerSubscriber = new _InnerSubscriber__WEBPACK_IMPORTED_MODULE_3__[/* InnerSubscriber */ "a"](this, value, index);
25966
+ var destination = this.destination;
25967
+ destination.add(innerSubscriber);
25968
+ var innerSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__[/* subscribeToResult */ "a"])(this, ish, undefined, undefined, innerSubscriber);
25969
+ if (innerSubscription !== innerSubscriber) {
25970
+ destination.add(innerSubscription);
25971
+ }
25972
+ };
25973
+ MergeMapSubscriber.prototype._complete = function () {
25974
+ this.hasCompleted = true;
25975
+ if (this.active === 0 && this.buffer.length === 0) {
25976
+ this.destination.complete();
25977
+ }
25978
+ this.unsubscribe();
25979
+ };
25980
+ MergeMapSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
25981
+ this.destination.next(innerValue);
25982
+ };
25983
+ MergeMapSubscriber.prototype.notifyComplete = function (innerSub) {
25984
+ var buffer = this.buffer;
25985
+ this.remove(innerSub);
25986
+ this.active--;
25987
+ if (buffer.length > 0) {
25988
+ this._next(buffer.shift());
25989
+ }
25990
+ else if (this.active === 0 && this.hasCompleted) {
25991
+ this.destination.complete();
25992
+ }
25993
+ };
25994
+ return MergeMapSubscriber;
25995
+ }(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__[/* OuterSubscriber */ "a"]));
25996
+
25997
+ //# sourceMappingURL=mergeMap.js.map
25998
+
25999
+
26000
+ /***/ }),
26001
+ /* 37 */
26002
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
26003
+
26004
+ "use strict";
26005
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ArgumentOutOfRangeError; });
26006
+ /** PURE_IMPORTS_START PURE_IMPORTS_END */
26007
+ var ArgumentOutOfRangeErrorImpl = /*@__PURE__*/ (function () {
26008
+ function ArgumentOutOfRangeErrorImpl() {
26009
+ Error.call(this);
26010
+ this.message = 'argument out of range';
26011
+ this.name = 'ArgumentOutOfRangeError';
26012
+ return this;
25936
26013
  }
25937
- return ar;
26014
+ ArgumentOutOfRangeErrorImpl.prototype = /*@__PURE__*/ Object.create(Error.prototype);
26015
+ return ArgumentOutOfRangeErrorImpl;
26016
+ })();
26017
+ var ArgumentOutOfRangeError = ArgumentOutOfRangeErrorImpl;
26018
+ //# sourceMappingURL=ArgumentOutOfRangeError.js.map
26019
+
26020
+
26021
+ /***/ }),
26022
+ /* 38 */
26023
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
26024
+
26025
+ "use strict";
26026
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return isFunction; });
26027
+ /** PURE_IMPORTS_START PURE_IMPORTS_END */
26028
+ function isFunction(x) {
26029
+ return typeof x === 'function';
26030
+ }
26031
+ //# sourceMappingURL=isFunction.js.map
26032
+
26033
+
26034
+ /***/ }),
26035
+ /* 39 */
26036
+ /***/ (function(module, exports, __webpack_require__) {
26037
+
26038
+ "use strict";
26039
+
26040
+ var __assign = (this && this.__assign) || function () {
26041
+ __assign = Object.assign || function(t) {
26042
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
26043
+ s = arguments[i];
26044
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
26045
+ t[p] = s[p];
26046
+ }
26047
+ return t;
26048
+ };
26049
+ return __assign.apply(this, arguments);
25938
26050
  };
25939
- var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
25940
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
25941
- if (ar || !(i in from)) {
25942
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
25943
- ar[i] = from[i];
26051
+ var __values = (this && this.__values) || function(o) {
26052
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
26053
+ if (m) return m.call(o);
26054
+ if (o && typeof o.length === "number") return {
26055
+ next: function () {
26056
+ if (o && i >= o.length) o = void 0;
26057
+ return { value: o && o[i++], done: !o };
25944
26058
  }
25945
- }
25946
- return to.concat(ar || Array.prototype.slice.call(from));
26059
+ };
26060
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
25947
26061
  };
25948
26062
  Object.defineProperty(exports, "__esModule", { value: true });
25949
- exports.newConfigurationProvider = exports.getFullConfiguration = exports.setEnvironment = exports.getEnvironment = exports.getGlobals = exports.setGlobals = exports.setConfigurationProvider = exports.getConfigurationProvider = exports.resendConfirmationEmail = exports.login = exports.loginInternal = exports.initWithAuthToken = exports.initWithEmail = exports.initWithSessionCode = exports.setConfigurations = exports.BringgDashboardSDK = void 0;
25950
- // eslint-disable-next-line no-restricted-imports
25951
- var mobx = __webpack_require__(383);
25952
- var AlertConfigurationApi_1 = __webpack_require__(384);
25953
- var AlertsApi_1 = __webpack_require__(421);
25954
- var AnalyticsReportsApi_1 = __webpack_require__(424);
25955
- var ApplicationApi_1 = __webpack_require__(426);
25956
- var ApplicationMerchantConfigurationApi_1 = __webpack_require__(429);
25957
- var ApplicationTeamConfigurationApi_1 = __webpack_require__(431);
25958
- var BillingApi_1 = __webpack_require__(433);
25959
- var ChatConversationApi_1 = __webpack_require__(435);
25960
- var Company_1 = __webpack_require__(439);
25961
- var ConfigurationProvider_1 = __webpack_require__(179);
25962
- var Crew_1 = __webpack_require__(441);
25963
- var CrossAppTransport_1 = __webpack_require__(444);
25964
- var CustomAttributesApi_1 = __webpack_require__(445);
25965
- var Customer_1 = __webpack_require__(448);
25966
- var customers_api_1 = __webpack_require__(450);
25967
- var CustomerAvailabilityHourApi_1 = __webpack_require__(453);
25968
- var customer_configuration_1 = __webpack_require__(455);
25969
- var dashboard_1 = __webpack_require__(457);
25970
- var DeliveryBlocksApi_1 = __webpack_require__(459);
25971
- var DeliveryCatalogApi_1 = __webpack_require__(461);
25972
- var DeliveryCatalogApi_2 = __webpack_require__(463);
25973
- var delivery_windows_api_1 = __webpack_require__(183);
25974
- var ExclusionWindowApi_1 = __webpack_require__(468);
25975
- var exclusion_window_api_1 = __webpack_require__(184);
25976
- var FleetApi_1 = __webpack_require__(471);
25977
- var FleetRouterApi_1 = __webpack_require__(473);
25978
- var FleetTemplateApi_1 = __webpack_require__(475);
25979
- var FloatingInventoryApi_1 = __webpack_require__(477);
25980
- var floating_inventories_api_1 = __webpack_require__(479);
25981
- var GeocodingApi_1 = __webpack_require__(481);
25982
- var GoogleMapsHelperApi_1 = __webpack_require__(483);
25983
- var Inventory_1 = __webpack_require__(485);
25984
- var InventoryActionsConfiguration_1 = __webpack_require__(487);
25985
- var Language_1 = __webpack_require__(489);
25986
- var lookup_api_1 = __webpack_require__(492);
25987
- var MerchantApi_1 = __webpack_require__(494);
25988
- var MerchantConfigurationApi_1 = __webpack_require__(497);
25989
- var NotificationTemplate_1 = __webpack_require__(500);
25990
- var NotificationType_1 = __webpack_require__(503);
25991
- var OauthApplicationApi_1 = __webpack_require__(506);
25992
- var OnboardingApi_1 = __webpack_require__(508);
25993
- var OpenFleetApi_1 = __webpack_require__(510);
25994
- var OptimizationConfiguration_1 = __webpack_require__(512);
25995
- var PackageApi_1 = __webpack_require__(514);
25996
- var ParkingSpotApi_1 = __webpack_require__(517);
25997
- var Photo_1 = __webpack_require__(519);
25998
- var planned_delivery_windows_api_1 = __webpack_require__(190);
25999
- var PlannedRoutesApi_1 = __webpack_require__(522);
26000
- var PrivilegesApi_1 = __webpack_require__(524);
26001
- var PushNotificationRegistration_1 = __webpack_require__(527);
26002
- var PushTokenSubscriptionApi_1 = __webpack_require__(529);
26003
- var RatesApi_1 = __webpack_require__(531);
26004
- var ReasonToCancelTasksApi_1 = __webpack_require__(534);
26005
- var ReasonToChangeInventory_1 = __webpack_require__(536);
26006
- var ReasonToReassignTasksApi_1 = __webpack_require__(538);
26007
- var ReportPreference_1 = __webpack_require__(540);
26008
- var reports_1 = __webpack_require__(542);
26009
- var ResourceUploadApi_1 = __webpack_require__(544);
26010
- var RolloutsApi_1 = __webpack_require__(545);
26011
- var RouteOptimizationApi_1 = __webpack_require__(548);
26012
- var RouteOptimizationService_1 = __webpack_require__(549);
26013
- var RuleApi_1 = __webpack_require__(551);
26014
- var runs_1 = __webpack_require__(553);
26015
- var runs_api_1 = __webpack_require__(194);
26016
- var ScanApi_1 = __webpack_require__(716);
26017
- var ServiceApi_1 = __webpack_require__(718);
26018
- var ServiceAreaApi_1 = __webpack_require__(720);
26019
- var service_area_api_1 = __webpack_require__(195);
26020
- var ServicePlansApi_1 = __webpack_require__(723);
26021
- var AuthService_1 = __webpack_require__(198);
26022
- var Session_1 = __webpack_require__(731);
26023
- var ShiftsApi_1 = __webpack_require__(736);
26024
- var Signature_1 = __webpack_require__(738);
26025
- var SkillsApi_1 = __webpack_require__(740);
26026
- var Tag_1 = __webpack_require__(743);
26027
- var TagCustomerConfiguration_1 = __webpack_require__(745);
26028
- var TagMerchantConfiguration_1 = __webpack_require__(747);
26029
- var TaskApi_1 = __webpack_require__(749);
26030
- var tasks_api_1 = __webpack_require__(202);
26031
- var TaskConfiguration_1 = __webpack_require__(891);
26032
- var TaskInventory_1 = __webpack_require__(893);
26033
- var TaskManagedAttributes_1 = __webpack_require__(373);
26034
- var task_reject_reasons_api_1 = __webpack_require__(374);
26035
- var TeamApi_1 = __webpack_require__(901);
26036
- var TeamConfigurationApi_1 = __webpack_require__(903);
26037
- var TeamServiceAreaApi_1 = __webpack_require__(905);
26038
- var TemplatesApi_1 = __webpack_require__(907);
26039
- var upload_api_1 = __webpack_require__(375);
26040
- var Users_1 = __webpack_require__(911);
26041
- var UserAnalyticsApi_1 = __webpack_require__(915);
26042
- var UserConfiguration_1 = __webpack_require__(923);
26043
- var UserTypeApi_1 = __webpack_require__(925);
26044
- var vehicles_api_1 = __webpack_require__(378);
26045
- var VehicleApi_1 = __webpack_require__(929);
26046
- var VehicleCategoryApi_1 = __webpack_require__(930);
26047
- var VehicleTypeApi_1 = __webpack_require__(932);
26048
- var VrpAutoDispatchAnalyticApi_1 = __webpack_require__(934);
26049
- var WebApplicationConfigurationApi_1 = __webpack_require__(937);
26050
- var WebhookAuthenticationConfiguration_1 = __webpack_require__(939);
26051
- var workflows_api_1 = __webpack_require__(380);
26052
- var environment = 'production';
26053
- var configurationProvider = null;
26054
- var globals = null;
26055
- var BringgDashboardSDK = /** @class */ (function () {
26056
- function BringgDashboardSDK(session) {
26057
- this.applicationMerchantConfiguration = null;
26058
- this.applicationTeamConfiguration = null;
26059
- this.chat = null;
26060
- this.companies = null;
26061
- // eslint-disable-next-line @typescript-eslint/ban-types
26062
- this.credentials = {};
26063
- this.crews = null;
26064
- this.crossAppTransport = null;
26065
- this.customerConfiguration = null;
26066
- this.customers = null;
26067
- this.dashboard = null;
26068
- this.deliveryBlocks = null;
26069
- this.fleets = null;
26070
- this.rules = null;
26071
- this.floatingInventory = null;
26072
- this.inventoryActionsConfigurations = null;
26073
- this.languages = null;
26074
- this.lookup = null;
26075
- this.merchant = null;
26076
- this.merchantConfiguration = null;
26077
- this.notificationTemplates = null;
26078
- this.notificationTypes = null;
26079
- this.oauthApplication = null;
26080
- this.plannedRoutes = null;
26081
- this.privileges = null;
26082
- this.reasonToChangeInventory = null;
26083
- this.reasonToReassignTasks = null;
26084
- this.reasonToCancelTasks = null;
26085
- this.reportPreferences = null;
26086
- this.reports = null;
26087
- this.runs = null;
26088
- this.rollouts = null;
26089
- this.skills = null;
26090
- this.taskConfigurations = null;
26091
- this.taskInventory = null;
26092
- this.inventory = null;
26093
- this.tasks = null;
26094
- this.teamConfiguration = null;
26095
- this.teams = null;
26096
- this.resourceUploads = null;
26097
- this.userConfigurations = null;
26098
- this.users = null;
26099
- this.vehicleCategories = null;
26100
- this.vehicleTypes = null;
26101
- this.vehicles = null;
26102
- this.session = session;
26063
+ var BringgDashboardSDK_1 = __webpack_require__(50);
26064
+ var DataStore = /** @class */ (function () {
26065
+ function DataStore(groupFilters) {
26066
+ var e_1, _a;
26067
+ if (groupFilters === void 0) { groupFilters = []; }
26068
+ this.itemsByGroups = new Map();
26069
+ (0, BringgDashboardSDK_1.getGlobals)().mobx.makeAutoObservable(this);
26070
+ this.groupFilters = [{ groupType: DataStore.ALL_GROUP, keyFunc: function (item) { return DataStore.ALL_GROUP; } }].concat(groupFilters);
26071
+ this.initializedGroups = new Set();
26072
+ try {
26073
+ for (var _b = __values(this.groupFilters), _c = _b.next(); !_c.done; _c = _b.next()) {
26074
+ var groupFilter = _c.value;
26075
+ this.itemsByGroups.set(groupFilter.groupType, new Map());
26076
+ }
26077
+ }
26078
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
26079
+ finally {
26080
+ try {
26081
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
26082
+ }
26083
+ finally { if (e_1) throw e_1.error; }
26084
+ }
26085
+ this.itemsByGroups.get(DataStore.ALL_GROUP).set(DataStore.ALL_GROUP, {});
26103
26086
  }
26104
- BringgDashboardSDK.setConfigurations = function (apiEndpointURL, monitorEndpointURL, generalEnvApiEndpoint) {
26105
- configurationProvider.getApiEndpoint = function () { return apiEndpointURL; };
26106
- configurationProvider.getAuthenticationEndpoint = function () { return apiEndpointURL; };
26107
- configurationProvider.getRegionDiscoveryEndpoint = function () { return apiEndpointURL; };
26108
- configurationProvider.getMonitoringEndpoint = function () { return monitorEndpointURL; };
26109
- configurationProvider.getGeneralEnvApiEndpoint = function () { return generalEnvApiEndpoint; };
26087
+ DataStore.prototype.isGroupInitialized = function (groupType, groupValue) {
26088
+ return (this.initializedGroups.has(this.getGroupKey(DataStore.ALL_GROUP, DataStore.ALL_GROUP)) ||
26089
+ this.initializedGroups.has(this.getGroupKey(groupType, groupValue)));
26110
26090
  };
26111
- BringgDashboardSDK.initWithSessionCode = function (code, session, region, globals) {
26112
- return __awaiter(this, void 0, void 0, function () {
26113
- return __generator(this, function (_a) {
26114
- switch (_a.label) {
26115
- case 0: return [4 /*yield*/, BringgDashboardSDK.login({ code: code, session: session, region: region, globals: globals })];
26116
- case 1: return [2 /*return*/, _a.sent()];
26117
- }
26118
- });
26119
- });
26091
+ DataStore.prototype.get = function (id) {
26092
+ return this.getGroupItems(DataStore.ALL_GROUP, DataStore.ALL_GROUP)[id];
26120
26093
  };
26121
- BringgDashboardSDK.initWithEmail = function (email, password, merchant_uuid, recaptchaToken, recaptcha_qa_token, region, globals) {
26122
- return __awaiter(this, void 0, void 0, function () {
26123
- return __generator(this, function (_a) {
26124
- switch (_a.label) {
26125
- case 0: return [4 /*yield*/, BringgDashboardSDK.login({
26126
- email: email,
26127
- password: password,
26128
- merchant_uuid: merchant_uuid,
26129
- recaptchaToken: recaptchaToken,
26130
- recaptcha_qa_token: recaptcha_qa_token,
26131
- region: region,
26132
- globals: globals
26133
- })];
26134
- case 1: return [2 /*return*/, _a.sent()];
26135
- }
26136
- });
26137
- });
26094
+ DataStore.prototype.getMany = function (ids) {
26095
+ var all = this.getAllById();
26096
+ return ids.reduce(function (acc, id) {
26097
+ acc[id] = all[id];
26098
+ return acc;
26099
+ }, {});
26138
26100
  };
26139
- BringgDashboardSDK.initWithAuthToken = function (region, authenticationToken, globals) {
26140
- return __awaiter(this, void 0, void 0, function () {
26141
- return __generator(this, function (_a) {
26142
- switch (_a.label) {
26143
- case 0: return [4 /*yield*/, BringgDashboardSDK.login({ region: region, authenticationToken: authenticationToken, globals: globals })];
26144
- case 1: return [2 /*return*/, (_a.sent())];
26145
- }
26146
- });
26147
- });
26101
+ DataStore.prototype.getAll = function () {
26102
+ return this.getGroup(DataStore.ALL_GROUP, DataStore.ALL_GROUP);
26148
26103
  };
26149
- BringgDashboardSDK.loginInternal = function (sdkInitialiser, params) {
26150
- return __awaiter(this, void 0, void 0, function () {
26151
- var response;
26152
- return __generator(this, function (_a) {
26153
- switch (_a.label) {
26154
- case 0: return [4 /*yield*/, Session_1.default.init(params)];
26155
- case 1:
26156
- response = _a.sent();
26157
- return [2 /*return*/, sdkInitialiser(response)];
26158
- }
26159
- });
26160
- });
26104
+ DataStore.prototype.getAllById = function () {
26105
+ return this.getGroupItems(DataStore.ALL_GROUP, DataStore.ALL_GROUP);
26161
26106
  };
26162
- BringgDashboardSDK.login = function (params) {
26163
- var _a;
26164
- return __awaiter(this, void 0, void 0, function () {
26165
- var env, configuration;
26166
- return __generator(this, function (_b) {
26167
- switch (_b.label) {
26168
- case 0:
26169
- setGlobals(params.globals);
26170
- env = getEnvironment();
26171
- if (!(['production', 'staging', 'edge'].includes(env) && !((_a = getConfigurationProvider()) === null || _a === void 0 ? void 0 : _a.isLoadedFromEndpoint))) return [3 /*break*/, 2];
26172
- return [4 /*yield*/, ConfigurationProvider_1.ConfigurationProvider.fromUrl({
26173
- urlReceived: ConfigurationProvider_1.ConfigurationProvider.getConfigUrl(env),
26174
- fallbackConfig: getFullConfiguration(),
26175
- commonRegionConfigKeys: getConfigurationProvider().getCommonRegionConfigKeys(),
26176
- specificRegionConfigkeys: getConfigurationProvider().getRegionSpecificConfigKeys(),
26177
- clientId: getConfigurationProvider().getClientId()
26178
- })];
26179
- case 1:
26180
- configuration = _b.sent();
26181
- if (configuration) {
26182
- BringgDashboardSDK.setConfigurationProvider(configuration);
26183
- }
26184
- _b.label = 2;
26185
- case 2: return [4 /*yield*/, this.loginInternal(function (a) { return init(a); }, params)];
26186
- case 3: return [2 /*return*/, _b.sent()];
26187
- }
26188
- });
26189
- });
26107
+ DataStore.prototype.getGroup = function (group, groupValue) {
26108
+ return Object.values(this.getGroupItems(group, groupValue));
26190
26109
  };
26191
- BringgDashboardSDK.prototype.logout = function (keepServerSession) {
26192
- if (keepServerSession === void 0) { keepServerSession = false; }
26193
- return __awaiter(this, void 0, void 0, function () {
26194
- return __generator(this, function (_a) {
26195
- switch (_a.label) {
26196
- case 0: return [4 /*yield*/, this.session.logout(keepServerSession)];
26197
- case 1: return [2 /*return*/, _a.sent()];
26198
- }
26199
- });
26200
- });
26110
+ DataStore.prototype.set = function (item) {
26111
+ var previousItem = this.get(item.id);
26112
+ this.itemsByGroups.get(DataStore.ALL_GROUP).get(DataStore.ALL_GROUP)[item.id] = item;
26113
+ this.updateItemInGroups(item, previousItem);
26201
26114
  };
26202
- BringgDashboardSDK.resendConfirmationEmail = function (params) {
26203
- return __awaiter(this, void 0, void 0, function () {
26204
- var authService, email, password, merchant_uuid, recaptchaToken, recaptcha_qa_token;
26205
- return __generator(this, function (_a) {
26206
- switch (_a.label) {
26207
- case 0:
26208
- authService = AuthService_1.default.init(params.region);
26209
- email = params.email, password = params.password, merchant_uuid = params.merchant_uuid, recaptchaToken = params.recaptchaToken, recaptcha_qa_token = params.recaptcha_qa_token;
26210
- return [4 /*yield*/, authService.resendConfirmationEmail(email, password, merchant_uuid, recaptchaToken, recaptcha_qa_token)];
26211
- case 1: return [2 /*return*/, _a.sent()];
26212
- }
26213
- });
26214
- });
26215
- };
26216
- BringgDashboardSDK.prototype.switchAccounts = function () {
26217
- return __awaiter(this, void 0, void 0, function () {
26218
- var _a;
26219
- return __generator(this, function (_b) {
26220
- switch (_b.label) {
26221
- case 0:
26222
- _a = init;
26223
- return [4 /*yield*/, this.session.switchAccounts()];
26224
- case 1: return [2 /*return*/, _a.apply(void 0, [_b.sent()])];
26225
- }
26226
- });
26227
- });
26228
- };
26229
- BringgDashboardSDK.prototype.impersonate = function (user_id) {
26230
- return __awaiter(this, void 0, void 0, function () {
26231
- var _a;
26232
- return __generator(this, function (_b) {
26233
- switch (_b.label) {
26234
- case 0:
26235
- _a = init;
26236
- return [4 /*yield*/, this.session.impersonate(user_id)];
26237
- case 1: return [2 /*return*/, _a.apply(void 0, [_b.sent()])];
26238
- }
26239
- });
26240
- });
26241
- };
26242
- BringgDashboardSDK.prototype.impersonateByTeam = function (team_id) {
26243
- return __awaiter(this, void 0, void 0, function () {
26244
- var _a;
26245
- return __generator(this, function (_b) {
26246
- switch (_b.label) {
26247
- case 0:
26248
- _a = init;
26249
- return [4 /*yield*/, this.session.impersonateByTeam(team_id)];
26250
- case 1: return [2 /*return*/, _a.apply(void 0, [_b.sent()])];
26251
- }
26252
- });
26253
- });
26254
- };
26255
- BringgDashboardSDK.prototype.unwindImpersonation = function () {
26256
- return __awaiter(this, void 0, void 0, function () {
26257
- var _a;
26258
- return __generator(this, function (_b) {
26259
- switch (_b.label) {
26260
- case 0:
26261
- _a = init;
26262
- return [4 /*yield*/, this.session.unwindImpersonation()];
26263
- case 1: return [2 /*return*/, _a.apply(void 0, [_b.sent()])];
26264
- }
26265
- });
26266
- });
26115
+ DataStore.prototype.remove = function (id) {
26116
+ var item = this.get(id);
26117
+ delete this.itemsByGroups.get(DataStore.ALL_GROUP).get(DataStore.ALL_GROUP)[id];
26118
+ this.updateItemInGroups(undefined, item);
26267
26119
  };
26268
- BringgDashboardSDK.setConfigurationProvider = setConfigurationProvider;
26269
- BringgDashboardSDK.setEnvironment = setEnvironment;
26270
- BringgDashboardSDK.getFullConfiguration = getFullConfiguration;
26271
- BringgDashboardSDK.newConfigurationProvider = newConfigurationProvider;
26272
- return BringgDashboardSDK;
26273
- }());
26274
- exports.BringgDashboardSDK = BringgDashboardSDK;
26275
- function init(session) {
26276
- return __awaiter(this, void 0, void 0, function () {
26277
- var bringg, workflows, taskRejectReasons;
26278
- return __generator(this, function (_a) {
26279
- switch (_a.label) {
26280
- case 0:
26281
- bringg = new BringgDashboardSDK(session);
26282
- bringg.v2 = {
26283
- vehicles: new vehicles_api_1.default(session),
26284
- tasks: new tasks_api_1.default(session),
26285
- customers: new customers_api_1.default(session),
26286
- plannedDeliveryWindows: new planned_delivery_windows_api_1.default(session),
26287
- exclusionWindow: new exclusion_window_api_1.ExclusionWindowApi(session),
26288
- serviceAreas: new service_area_api_1.ServiceAreaApi(session),
26289
- lookup: new lookup_api_1.default(session),
26290
- createWorkflows: function (mapper) {
26291
- workflows = new workflows_api_1.default(session, mapper);
26292
- return workflows;
26293
- },
26294
- workflows: function () {
26295
- return workflows;
26296
- },
26297
- createTaskRejectReasons: function (mapper) {
26298
- taskRejectReasons = new task_reject_reasons_api_1.default(session, mapper);
26299
- return taskRejectReasons;
26300
- },
26301
- taskRejectReasons: function () {
26302
- return taskRejectReasons;
26303
- },
26304
- runs: new runs_api_1.default(session),
26305
- uploads: new upload_api_1.default(session),
26306
- floatingInventories: new floating_inventories_api_1.FloatingInventoriesApi(session),
26307
- deliveryWindows: new delivery_windows_api_1.default(session),
26308
- taskManagedAttributes: new TaskManagedAttributes_1.TaskManagedAttributesApi(session)
26309
- };
26310
- bringg.application = new ApplicationApi_1.default(session);
26311
- bringg.chat = new ChatConversationApi_1.default(session);
26312
- bringg.companies = new Company_1.default(session);
26313
- bringg.crossAppTransport = new CrossAppTransport_1.default();
26314
- bringg.customerConfiguration = new customer_configuration_1.default(session);
26315
- bringg.customers = new Customer_1.default(session);
26316
- bringg.dashboard = new dashboard_1.default(session);
26317
- bringg.deliveryBlocks = new DeliveryBlocksApi_1.DeliveryBlocksApi(session);
26318
- bringg.fleets = new FleetApi_1.default(session);
26319
- bringg.rules = new RuleApi_1.default(session);
26320
- bringg.fleetRouterApi = new FleetRouterApi_1.default(session);
26321
- bringg.alertConfiguration = new AlertConfigurationApi_1.default(session);
26322
- bringg.floatingInventory = new FloatingInventoryApi_1.default(session);
26323
- bringg.geocoding = new GeocodingApi_1.default(session);
26324
- bringg.googleMapsHelper = new GoogleMapsHelperApi_1.default(session);
26325
- bringg.inventoryActionsConfigurations = new InventoryActionsConfiguration_1.default(session);
26326
- bringg.languages = new Language_1.Language(session);
26327
- bringg.merchant = new MerchantApi_1.default(session);
26328
- bringg.merchantConfiguration = new MerchantConfigurationApi_1.MerchantConfigurationApi(session);
26329
- bringg.notificationTemplates = new NotificationTemplate_1.NotificationTemplate(session);
26330
- bringg.notificationTypes = new NotificationType_1.NotificationType(session);
26331
- bringg.oauthApplication = new OauthApplicationApi_1.default(session);
26332
- bringg.onboardings = new OnboardingApi_1.default(session);
26333
- bringg.photos = new Photo_1.default(session);
26334
- bringg.plannedRoutes = new PlannedRoutesApi_1.default(session);
26335
- bringg.privileges = new PrivilegesApi_1.default(session);
26336
- bringg.pushTokenSubscription = new PushTokenSubscriptionApi_1.default(session);
26337
- bringg.pushNotificationRegistration = new PushNotificationRegistration_1.default(session);
26338
- bringg.reasonToChangeInventory = new ReasonToChangeInventory_1.default(session);
26339
- bringg.reasonToReassignTasks = new ReasonToReassignTasksApi_1.default(session);
26340
- bringg.reasonToCancelTasks = new ReasonToCancelTasksApi_1.default(session);
26341
- bringg.reportPreferences = new ReportPreference_1.default(session);
26342
- bringg.reports = new reports_1.default(session);
26343
- bringg.runs = new runs_1.default(session);
26344
- bringg.scans = new ScanApi_1.default(session);
26345
- bringg.rollouts = new RolloutsApi_1.default(session);
26346
- bringg.service = new ServiceApi_1.default(session);
26347
- bringg.signatures = new Signature_1.default(session);
26348
- bringg.skills = new SkillsApi_1.default(session);
26349
- bringg.tagCustomerConfigurations = new TagCustomerConfiguration_1.default(session);
26350
- bringg.tagMerchantConfigurations = new TagMerchantConfiguration_1.default(session);
26351
- bringg.tags = new Tag_1.default(session);
26352
- bringg.taskConfigurations = new TaskConfiguration_1.default(session);
26353
- bringg.taskInventory = new TaskInventory_1.default(session);
26354
- bringg.inventory = new Inventory_1.default(session);
26355
- bringg.tasks = new TaskApi_1.default(session);
26356
- bringg.teamConfiguration = new TeamConfigurationApi_1.default(session);
26357
- bringg.teams = new TeamApi_1.default(session);
26358
- bringg.resourceUploads = new ResourceUploadApi_1.default(session);
26359
- bringg.userConfigurations = new UserConfiguration_1.default(session);
26360
- bringg.userTypes = new UserTypeApi_1.default(session);
26361
- bringg.users = new Users_1.default(session);
26362
- bringg.vehicleCategories = new VehicleCategoryApi_1.default(session);
26363
- bringg.vehicleTypes = new VehicleTypeApi_1.default(session);
26364
- bringg.vehicles = new VehicleApi_1.default(session);
26365
- bringg.vrpAutoDispatchAnalytic = new VrpAutoDispatchAnalyticApi_1.default(session);
26366
- bringg.webApplicationConfiguration = new WebApplicationConfigurationApi_1.default(session);
26367
- bringg.webhookAuthenticationConfiguration = new WebhookAuthenticationConfiguration_1.default(session);
26368
- bringg.optimizationConfiguration = new OptimizationConfiguration_1.default(session);
26369
- bringg.fleetTemplates = new FleetTemplateApi_1.default(session);
26370
- bringg.openFleets = new OpenFleetApi_1.default(session);
26371
- bringg.customerAvailabilityHours = new CustomerAvailabilityHourApi_1.default(session);
26372
- bringg.exclusionWindows = new ExclusionWindowApi_1.default(session);
26373
- bringg.shifts = new ShiftsApi_1.default(session);
26374
- bringg.serviceAreas = new ServiceAreaApi_1.default(session);
26375
- bringg.teamServiceAreas = new TeamServiceAreaApi_1.default(session);
26376
- bringg.billing = new BillingApi_1.default(session);
26377
- bringg.userAnalytics = new UserAnalyticsApi_1.default(session);
26378
- bringg.analyticsReports = new AnalyticsReportsApi_1.default(session);
26379
- bringg.servicePlans = new ServicePlansApi_1.default(session);
26380
- bringg.alertsApi = new AlertsApi_1.default(session);
26381
- bringg.deliveryCatalog = new DeliveryCatalogApi_1.default(session);
26382
- bringg.deliveryCatalogGeneralEnv = new DeliveryCatalogApi_2.default(session);
26383
- bringg.packageApi = new PackageApi_1.default(session);
26384
- bringg.templatesApi = new TemplatesApi_1.default(session);
26385
- bringg.routeOptimizationApi = new RouteOptimizationApi_1.default(session);
26386
- bringg.ratesApi = new RatesApi_1.default(session);
26387
- bringg.routeOptimizationService = new RouteOptimizationService_1.default(session);
26388
- bringg.parkingSpotApi = new ParkingSpotApi_1.default(session);
26389
- bringg.customAttributesApi = new CustomAttributesApi_1.default(session);
26390
- // dependent
26391
- bringg.crews = new Crew_1.default(session, bringg.users);
26392
- bringg.applicationMerchantConfiguration = new ApplicationMerchantConfigurationApi_1.default(session, bringg.merchantConfiguration);
26393
- bringg.applicationTeamConfiguration = new ApplicationTeamConfigurationApi_1.default(session);
26394
- return [4 /*yield*/, initSessionConfiguration(bringg)];
26395
- case 1:
26396
- _a.sent();
26397
- return [2 /*return*/, Object.freeze(bringg)];
26120
+ DataStore.prototype.setMany = function (items) {
26121
+ var e_2, _a;
26122
+ try {
26123
+ for (var items_1 = __values(items), items_1_1 = items_1.next(); !items_1_1.done; items_1_1 = items_1.next()) {
26124
+ var item = items_1_1.value;
26125
+ this.itemsByGroups.get(DataStore.ALL_GROUP).get(DataStore.ALL_GROUP)[item.current.id] = item.current;
26126
+ this.updateItemInGroups(item.current, item.diff);
26398
26127
  }
26399
- });
26400
- });
26401
- }
26402
- function initSessionConfiguration(bringg) {
26403
- var _a;
26404
- return __awaiter(this, void 0, void 0, function () {
26405
- var apiKey;
26406
- return __generator(this, function (_b) {
26407
- switch (_b.label) {
26408
- case 0: return [4 /*yield*/, Promise.all([bringg.merchantConfiguration.get(), bringg.webApplicationConfiguration.get()])];
26409
- case 1:
26410
- _b.sent();
26411
- if (!((_a = configurationProvider === null || configurationProvider === void 0 ? void 0 : configurationProvider.isUserAnalyticsEnabled) === null || _a === void 0 ? void 0 : _a.call(configurationProvider))) return [3 /*break*/, 5];
26412
- apiKey = configurationProvider.getUserAnalyticsApiKey();
26413
- return [4 /*yield*/, bringg.userAnalytics.addSnippet({ apiKey: apiKey })];
26414
- case 2:
26415
- _b.sent();
26416
- return [4 /*yield*/, bringg.merchant.get()];
26417
- case 3:
26418
- _b.sent();
26419
- return [4 /*yield*/, bringg.userAnalytics.run({
26420
- apiKey: apiKey,
26421
- environment: environment
26422
- })];
26423
- case 4:
26424
- _b.sent();
26425
- _b.label = 5;
26426
- case 5: return [2 /*return*/];
26128
+ }
26129
+ catch (e_2_1) { e_2 = { error: e_2_1 }; }
26130
+ finally {
26131
+ try {
26132
+ if (items_1_1 && !items_1_1.done && (_a = items_1.return)) _a.call(items_1);
26427
26133
  }
26428
- });
26429
- });
26430
- }
26431
- function setConfigurations() {
26432
- var args = [];
26433
- for (var _i = 0; _i < arguments.length; _i++) {
26434
- args[_i] = arguments[_i];
26435
- }
26436
- return BringgDashboardSDK.setConfigurations.apply(BringgDashboardSDK, __spreadArray([], __read(args), false));
26437
- }
26438
- exports.setConfigurations = setConfigurations;
26439
- function initWithSessionCode() {
26440
- var args = [];
26441
- for (var _i = 0; _i < arguments.length; _i++) {
26442
- args[_i] = arguments[_i];
26443
- }
26444
- return BringgDashboardSDK.initWithSessionCode.apply(BringgDashboardSDK, __spreadArray([], __read(args), false));
26445
- }
26446
- exports.initWithSessionCode = initWithSessionCode;
26447
- function initWithEmail() {
26448
- var args = [];
26449
- for (var _i = 0; _i < arguments.length; _i++) {
26450
- args[_i] = arguments[_i];
26451
- }
26452
- return BringgDashboardSDK.initWithEmail.apply(BringgDashboardSDK, __spreadArray([], __read(args), false));
26453
- }
26454
- exports.initWithEmail = initWithEmail;
26455
- function initWithAuthToken() {
26456
- var args = [];
26457
- for (var _i = 0; _i < arguments.length; _i++) {
26458
- args[_i] = arguments[_i];
26459
- }
26460
- return BringgDashboardSDK.initWithAuthToken.apply(BringgDashboardSDK, __spreadArray([], __read(args), false));
26461
- }
26462
- exports.initWithAuthToken = initWithAuthToken;
26463
- function loginInternal() {
26464
- var args = [];
26465
- for (var _i = 0; _i < arguments.length; _i++) {
26466
- args[_i] = arguments[_i];
26467
- }
26468
- return BringgDashboardSDK.loginInternal.apply(BringgDashboardSDK, __spreadArray([], __read(args), false));
26469
- }
26470
- exports.loginInternal = loginInternal;
26471
- function login() {
26472
- var args = [];
26473
- for (var _i = 0; _i < arguments.length; _i++) {
26474
- args[_i] = arguments[_i];
26475
- }
26476
- return BringgDashboardSDK.login.apply(BringgDashboardSDK, __spreadArray([], __read(args), false));
26477
- }
26478
- exports.login = login;
26479
- function resendConfirmationEmail() {
26480
- var args = [];
26481
- for (var _i = 0; _i < arguments.length; _i++) {
26482
- args[_i] = arguments[_i];
26483
- }
26484
- return BringgDashboardSDK.resendConfirmationEmail.apply(BringgDashboardSDK, __spreadArray([], __read(args), false));
26485
- }
26486
- exports.resendConfirmationEmail = resendConfirmationEmail;
26487
- function getConfigurationProvider() {
26488
- return configurationProvider;
26489
- }
26490
- exports.getConfigurationProvider = getConfigurationProvider;
26491
- function setConfigurationProvider(provider) {
26492
- configurationProvider = provider;
26493
- }
26494
- exports.setConfigurationProvider = setConfigurationProvider;
26495
- function setGlobals(bringgGlobals) {
26496
- var withDefaults = bringgGlobals || { mobx: mobx };
26497
- withDefaults.mobx = withDefaults.mobx || mobx;
26498
- globals = withDefaults;
26499
- }
26500
- exports.setGlobals = setGlobals;
26501
- function getGlobals() {
26502
- return globals;
26503
- }
26504
- exports.getGlobals = getGlobals;
26505
- function getEnvironment() {
26506
- return environment;
26507
- }
26508
- exports.getEnvironment = getEnvironment;
26509
- function setEnvironment(env) {
26510
- environment = env;
26511
- }
26512
- exports.setEnvironment = setEnvironment;
26513
- function getFullConfiguration() {
26514
- return getConfigurationProvider().getFullConfig();
26515
- }
26516
- exports.getFullConfiguration = getFullConfiguration;
26517
- function newConfigurationProvider(_a) {
26518
- var config = _a.config, fallbackConfig = _a.fallbackConfig, clientId = _a.clientId, commonRegionConfigKeys = _a.commonRegionConfigKeys, specificRegionConfigkeys = _a.specificRegionConfigkeys, isLoadedFromEndpoint = _a.isLoadedFromEndpoint;
26519
- return new ConfigurationProvider_1.ConfigurationProvider({
26520
- config: config,
26521
- fallbackConfig: fallbackConfig,
26522
- clientId: clientId,
26523
- commonRegionConfigKeys: commonRegionConfigKeys,
26524
- specificRegionConfigkeys: specificRegionConfigkeys,
26525
- isLoadedFromEndpoint: isLoadedFromEndpoint
26526
- });
26527
- }
26528
- exports.newConfigurationProvider = newConfigurationProvider;
26529
- //# sourceMappingURL=BringgDashboardSDK.js.map
26530
-
26531
- /***/ }),
26532
- /* 37 */
26533
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
26534
-
26535
- "use strict";
26536
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return mergeMap; });
26537
- /* unused harmony export MergeMapOperator */
26538
- /* unused harmony export MergeMapSubscriber */
26539
- /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
26540
- /* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(5);
26541
- /* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6);
26542
- /* harmony import */ var _InnerSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(19);
26543
- /* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(13);
26544
- /* harmony import */ var _observable_from__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(17);
26545
- /** PURE_IMPORTS_START tslib,_util_subscribeToResult,_OuterSubscriber,_InnerSubscriber,_map,_observable_from PURE_IMPORTS_END */
26546
-
26547
-
26548
-
26549
-
26550
-
26551
-
26552
- function mergeMap(project, resultSelector, concurrent) {
26553
- if (concurrent === void 0) {
26554
- concurrent = Number.POSITIVE_INFINITY;
26555
- }
26556
- if (typeof resultSelector === 'function') {
26557
- return function (source) { return source.pipe(mergeMap(function (a, i) { return Object(_observable_from__WEBPACK_IMPORTED_MODULE_5__[/* from */ "a"])(project(a, i)).pipe(Object(_map__WEBPACK_IMPORTED_MODULE_4__[/* map */ "a"])(function (b, ii) { return resultSelector(a, b, i, ii); })); }, concurrent)); };
26558
- }
26559
- else if (typeof resultSelector === 'number') {
26560
- concurrent = resultSelector;
26561
- }
26562
- return function (source) { return source.lift(new MergeMapOperator(project, concurrent)); };
26563
- }
26564
- var MergeMapOperator = /*@__PURE__*/ (function () {
26565
- function MergeMapOperator(project, concurrent) {
26566
- if (concurrent === void 0) {
26567
- concurrent = Number.POSITIVE_INFINITY;
26134
+ finally { if (e_2) throw e_2.error; }
26568
26135
  }
26569
- this.project = project;
26570
- this.concurrent = concurrent;
26571
- }
26572
- MergeMapOperator.prototype.call = function (observer, source) {
26573
- return source.subscribe(new MergeMapSubscriber(observer, this.project, this.concurrent));
26574
26136
  };
26575
- return MergeMapOperator;
26576
- }());
26577
-
26578
- var MergeMapSubscriber = /*@__PURE__*/ (function (_super) {
26579
- tslib__WEBPACK_IMPORTED_MODULE_0__[/* __extends */ "a"](MergeMapSubscriber, _super);
26580
- function MergeMapSubscriber(destination, project, concurrent) {
26581
- if (concurrent === void 0) {
26582
- concurrent = Number.POSITIVE_INFINITY;
26137
+ DataStore.prototype.setAll = function (items) {
26138
+ this.setGroup(DataStore.ALL_GROUP, DataStore.ALL_GROUP, items);
26139
+ };
26140
+ DataStore.prototype.setGroup = function (groupType, groupValue, items) {
26141
+ var _this = this;
26142
+ var previousItems = this.getGroup(groupType, groupValue);
26143
+ this.removeMany(previousItems);
26144
+ if (Array.isArray(groupValue)) {
26145
+ groupValue.forEach(function (group) {
26146
+ _this.itemsByGroups.get(groupType).set(group, {});
26147
+ });
26583
26148
  }
26584
- var _this = _super.call(this, destination) || this;
26585
- _this.project = project;
26586
- _this.concurrent = concurrent;
26587
- _this.hasCompleted = false;
26588
- _this.buffer = [];
26589
- _this.active = 0;
26590
- _this.index = 0;
26591
- return _this;
26592
- }
26593
- MergeMapSubscriber.prototype._next = function (value) {
26594
- if (this.active < this.concurrent) {
26595
- this._tryNext(value);
26149
+ else {
26150
+ this.itemsByGroups.get(groupType).set(groupValue, {});
26151
+ }
26152
+ this.setAllItems(items);
26153
+ this.setGroupInitialized(groupType, groupValue);
26154
+ };
26155
+ DataStore.prototype.setGroupInitialized = function (groupType, groupValue) {
26156
+ var _this = this;
26157
+ if (Array.isArray(groupValue)) {
26158
+ groupValue.forEach(function (group) {
26159
+ _this.initializedGroups.add(_this.getGroupKey(groupType, group));
26160
+ });
26596
26161
  }
26597
26162
  else {
26598
- this.buffer.push(value);
26163
+ this.initializedGroups.add(this.getGroupKey(groupType, groupValue));
26599
26164
  }
26600
26165
  };
26601
- MergeMapSubscriber.prototype._tryNext = function (value) {
26602
- var result;
26603
- var index = this.index++;
26166
+ DataStore.prototype.setAllItems = function (items) {
26167
+ var e_3, _a;
26168
+ var allItems = this.itemsByGroups.get(DataStore.ALL_GROUP).get(DataStore.ALL_GROUP);
26604
26169
  try {
26605
- result = this.project(value, index);
26170
+ for (var items_2 = __values(items), items_2_1 = items_2.next(); !items_2_1.done; items_2_1 = items_2.next()) {
26171
+ var item = items_2_1.value;
26172
+ allItems[item.current.id] = item.current;
26173
+ this.updateItemInGroups(item.current, item.diff);
26174
+ }
26606
26175
  }
26607
- catch (err) {
26608
- this.destination.error(err);
26609
- return;
26176
+ catch (e_3_1) { e_3 = { error: e_3_1 }; }
26177
+ finally {
26178
+ try {
26179
+ if (items_2_1 && !items_2_1.done && (_a = items_2.return)) _a.call(items_2);
26180
+ }
26181
+ finally { if (e_3) throw e_3.error; }
26610
26182
  }
26611
- this.active++;
26612
- this._innerSub(result, value, index);
26613
26183
  };
26614
- MergeMapSubscriber.prototype._innerSub = function (ish, value, index) {
26615
- var innerSubscriber = new _InnerSubscriber__WEBPACK_IMPORTED_MODULE_3__[/* InnerSubscriber */ "a"](this, value, index);
26616
- var destination = this.destination;
26617
- destination.add(innerSubscriber);
26618
- var innerSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__[/* subscribeToResult */ "a"])(this, ish, undefined, undefined, innerSubscriber);
26619
- if (innerSubscription !== innerSubscriber) {
26620
- destination.add(innerSubscription);
26184
+ DataStore.prototype.removeMany = function (items) {
26185
+ var e_4, _a;
26186
+ var allItemsLength = Object.keys(this.itemsByGroups.get(DataStore.ALL_GROUP).get(DataStore.ALL_GROUP)).length;
26187
+ if (items.length === allItemsLength) {
26188
+ this.itemsByGroups.get(DataStore.ALL_GROUP).set(DataStore.ALL_GROUP, {});
26189
+ return;
26621
26190
  }
26622
- };
26623
- MergeMapSubscriber.prototype._complete = function () {
26624
- this.hasCompleted = true;
26625
- if (this.active === 0 && this.buffer.length === 0) {
26626
- this.destination.complete();
26191
+ try {
26192
+ for (var items_3 = __values(items), items_3_1 = items_3.next(); !items_3_1.done; items_3_1 = items_3.next()) {
26193
+ var item = items_3_1.value;
26194
+ delete this.itemsByGroups.get(DataStore.ALL_GROUP).get(DataStore.ALL_GROUP)[item.id];
26195
+ }
26196
+ }
26197
+ catch (e_4_1) { e_4 = { error: e_4_1 }; }
26198
+ finally {
26199
+ try {
26200
+ if (items_3_1 && !items_3_1.done && (_a = items_3.return)) _a.call(items_3);
26201
+ }
26202
+ finally { if (e_4) throw e_4.error; }
26627
26203
  }
26628
- this.unsubscribe();
26629
- };
26630
- MergeMapSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
26631
- this.destination.next(innerValue);
26632
26204
  };
26633
- MergeMapSubscriber.prototype.notifyComplete = function (innerSub) {
26634
- var buffer = this.buffer;
26635
- this.remove(innerSub);
26636
- this.active--;
26637
- if (buffer.length > 0) {
26638
- this._next(buffer.shift());
26205
+ DataStore.prototype.removeAll = function () {
26206
+ var e_5, _a;
26207
+ this.removeMany(this.getAll());
26208
+ try {
26209
+ for (var _b = __values(this.groupFilters), _c = _b.next(); !_c.done; _c = _b.next()) {
26210
+ var groupFilter = _c.value;
26211
+ if (groupFilter.groupType !== DataStore.ALL_GROUP) {
26212
+ this.itemsByGroups.get(groupFilter.groupType).clear();
26213
+ }
26214
+ }
26639
26215
  }
26640
- else if (this.active === 0 && this.hasCompleted) {
26641
- this.destination.complete();
26216
+ catch (e_5_1) { e_5 = { error: e_5_1 }; }
26217
+ finally {
26218
+ try {
26219
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
26220
+ }
26221
+ finally { if (e_5) throw e_5.error; }
26642
26222
  }
26223
+ this.initializedGroups.clear();
26643
26224
  };
26644
- return MergeMapSubscriber;
26645
- }(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__[/* OuterSubscriber */ "a"]));
26646
-
26647
- //# sourceMappingURL=mergeMap.js.map
26648
-
26649
-
26650
- /***/ }),
26651
- /* 38 */
26652
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
26653
-
26654
- "use strict";
26655
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ArgumentOutOfRangeError; });
26656
- /** PURE_IMPORTS_START PURE_IMPORTS_END */
26657
- var ArgumentOutOfRangeErrorImpl = /*@__PURE__*/ (function () {
26658
- function ArgumentOutOfRangeErrorImpl() {
26659
- Error.call(this);
26660
- this.message = 'argument out of range';
26661
- this.name = 'ArgumentOutOfRangeError';
26662
- return this;
26663
- }
26664
- ArgumentOutOfRangeErrorImpl.prototype = /*@__PURE__*/ Object.create(Error.prototype);
26665
- return ArgumentOutOfRangeErrorImpl;
26666
- })();
26667
- var ArgumentOutOfRangeError = ArgumentOutOfRangeErrorImpl;
26668
- //# sourceMappingURL=ArgumentOutOfRangeError.js.map
26669
-
26670
-
26671
- /***/ }),
26672
- /* 39 */
26673
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
26674
-
26675
- "use strict";
26676
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return isFunction; });
26677
- /** PURE_IMPORTS_START PURE_IMPORTS_END */
26678
- function isFunction(x) {
26679
- return typeof x === 'function';
26680
- }
26681
- //# sourceMappingURL=isFunction.js.map
26682
-
26683
-
26684
- /***/ }),
26685
- /* 40 */
26686
- /***/ (function(module, exports, __webpack_require__) {
26687
-
26688
- "use strict";
26689
-
26690
- var __values = (this && this.__values) || function(o) {
26691
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
26692
- if (m) return m.call(o);
26693
- if (o && typeof o.length === "number") return {
26694
- next: function () {
26695
- if (o && i >= o.length) o = void 0;
26696
- return { value: o && o[i++], done: !o };
26697
- }
26698
- };
26699
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
26700
- };
26701
- Object.defineProperty(exports, "__esModule", { value: true });
26702
- var BringgDashboardSDK_1 = __webpack_require__(36);
26703
- var DataStore = /** @class */ (function () {
26704
- function DataStore(groupFilters) {
26705
- var e_1, _a;
26706
- if (groupFilters === void 0) { groupFilters = []; }
26707
- this.itemsByGroups = new Map();
26708
- (0, BringgDashboardSDK_1.getGlobals)().mobx.makeAutoObservable(this);
26709
- this.groupFilters = [{ groupType: DataStore.ALL_GROUP, keyFunc: function (item) { return DataStore.ALL_GROUP; } }].concat(groupFilters);
26710
- this.initializedGroups = new Set();
26711
- try {
26712
- for (var _b = __values(this.groupFilters), _c = _b.next(); !_c.done; _c = _b.next()) {
26713
- var groupFilter = _c.value;
26714
- this.itemsByGroups.set(groupFilter.groupType, new Map());
26715
- }
26716
- }
26717
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
26718
- finally {
26719
- try {
26720
- if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
26721
- }
26722
- finally { if (e_1) throw e_1.error; }
26723
- }
26724
- this.itemsByGroups.get(DataStore.ALL_GROUP).set(DataStore.ALL_GROUP, {});
26725
- }
26726
- DataStore.prototype.isGroupInitialized = function (groupType, groupValue) {
26727
- return (this.initializedGroups.has(this.getGroupKey(DataStore.ALL_GROUP, DataStore.ALL_GROUP)) ||
26728
- this.initializedGroups.has(this.getGroupKey(groupType, groupValue)));
26729
- };
26730
- DataStore.prototype.get = function (id) {
26731
- return this.getGroupItems(DataStore.ALL_GROUP, DataStore.ALL_GROUP)[id];
26732
- };
26733
- DataStore.prototype.getMany = function (ids) {
26734
- var all = this.getAllById();
26735
- return ids.reduce(function (acc, id) {
26736
- acc[id] = all[id];
26737
- return acc;
26738
- }, {});
26739
- };
26740
- DataStore.prototype.getAll = function () {
26741
- return this.getGroup(DataStore.ALL_GROUP, DataStore.ALL_GROUP);
26742
- };
26743
- DataStore.prototype.getAllById = function () {
26744
- return this.getGroupItems(DataStore.ALL_GROUP, DataStore.ALL_GROUP);
26745
- };
26746
- DataStore.prototype.getGroup = function (group, groupValue) {
26747
- return Object.values(this.getGroupItems(group, groupValue));
26748
- };
26749
- DataStore.prototype.set = function (item) {
26750
- var previousItem = this.get(item.id);
26751
- this.itemsByGroups.get(DataStore.ALL_GROUP).get(DataStore.ALL_GROUP)[item.id] = item;
26752
- this.updateItemInGroups(item, previousItem);
26753
- };
26754
- DataStore.prototype.remove = function (id) {
26755
- var item = this.get(id);
26756
- delete this.itemsByGroups.get(DataStore.ALL_GROUP).get(DataStore.ALL_GROUP)[id];
26757
- this.updateItemInGroups(undefined, item);
26758
- };
26759
- DataStore.prototype.setMany = function (items) {
26760
- var e_2, _a;
26761
- try {
26762
- for (var items_1 = __values(items), items_1_1 = items_1.next(); !items_1_1.done; items_1_1 = items_1.next()) {
26763
- var item = items_1_1.value;
26764
- this.itemsByGroups.get(DataStore.ALL_GROUP).get(DataStore.ALL_GROUP)[item.current.id] = item.current;
26765
- this.updateItemInGroups(item.current, item.previous);
26766
- }
26767
- }
26768
- catch (e_2_1) { e_2 = { error: e_2_1 }; }
26769
- finally {
26770
- try {
26771
- if (items_1_1 && !items_1_1.done && (_a = items_1.return)) _a.call(items_1);
26772
- }
26773
- finally { if (e_2) throw e_2.error; }
26774
- }
26775
- };
26776
- DataStore.prototype.setAll = function (items) {
26777
- this.setGroup(DataStore.ALL_GROUP, DataStore.ALL_GROUP, items);
26778
- };
26779
- DataStore.prototype.setGroup = function (groupType, groupValue, items) {
26780
- var _this = this;
26781
- var previousItems = this.getGroup(groupType, groupValue);
26782
- this.removeMany(previousItems);
26783
- if (Array.isArray(groupValue)) {
26784
- groupValue.forEach(function (group) {
26785
- _this.itemsByGroups.get(groupType).set(group, {});
26786
- });
26787
- }
26788
- else {
26789
- this.itemsByGroups.get(groupType).set(groupValue, {});
26790
- }
26791
- this.setAllItems(items);
26792
- this.setGroupInitialized(groupType, groupValue);
26793
- };
26794
- DataStore.prototype.setGroupInitialized = function (groupType, groupValue) {
26795
- var _this = this;
26796
- if (Array.isArray(groupValue)) {
26797
- groupValue.forEach(function (group) {
26798
- _this.initializedGroups.add(_this.getGroupKey(groupType, group));
26799
- });
26800
- }
26801
- else {
26802
- this.initializedGroups.add(this.getGroupKey(groupType, groupValue));
26803
- }
26804
- };
26805
- DataStore.prototype.setAllItems = function (items) {
26806
- var e_3, _a;
26807
- var allItems = this.itemsByGroups.get(DataStore.ALL_GROUP).get(DataStore.ALL_GROUP);
26808
- try {
26809
- for (var items_2 = __values(items), items_2_1 = items_2.next(); !items_2_1.done; items_2_1 = items_2.next()) {
26810
- var item = items_2_1.value;
26811
- allItems[item.current.id] = item.current;
26812
- this.updateItemInGroups(item.current, item.previous);
26813
- }
26814
- }
26815
- catch (e_3_1) { e_3 = { error: e_3_1 }; }
26816
- finally {
26817
- try {
26818
- if (items_2_1 && !items_2_1.done && (_a = items_2.return)) _a.call(items_2);
26819
- }
26820
- finally { if (e_3) throw e_3.error; }
26821
- }
26822
- };
26823
- DataStore.prototype.removeMany = function (items) {
26824
- var e_4, _a;
26825
- var allItemsLength = Object.keys(this.itemsByGroups.get(DataStore.ALL_GROUP).get(DataStore.ALL_GROUP)).length;
26826
- if (items.length === allItemsLength) {
26827
- this.itemsByGroups.get(DataStore.ALL_GROUP).set(DataStore.ALL_GROUP, {});
26828
- return;
26829
- }
26830
- try {
26831
- for (var items_3 = __values(items), items_3_1 = items_3.next(); !items_3_1.done; items_3_1 = items_3.next()) {
26832
- var item = items_3_1.value;
26833
- delete this.itemsByGroups.get(DataStore.ALL_GROUP).get(DataStore.ALL_GROUP)[item.id];
26834
- }
26835
- }
26836
- catch (e_4_1) { e_4 = { error: e_4_1 }; }
26837
- finally {
26838
- try {
26839
- if (items_3_1 && !items_3_1.done && (_a = items_3.return)) _a.call(items_3);
26840
- }
26841
- finally { if (e_4) throw e_4.error; }
26842
- }
26843
- };
26844
- DataStore.prototype.removeAll = function () {
26845
- var e_5, _a;
26846
- this.removeMany(this.getAll());
26847
- try {
26848
- for (var _b = __values(this.groupFilters), _c = _b.next(); !_c.done; _c = _b.next()) {
26849
- var groupFilter = _c.value;
26850
- if (groupFilter.groupType !== DataStore.ALL_GROUP) {
26851
- this.itemsByGroups.get(groupFilter.groupType).clear();
26852
- }
26853
- }
26854
- }
26855
- catch (e_5_1) { e_5 = { error: e_5_1 }; }
26856
- finally {
26857
- try {
26858
- if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
26859
- }
26860
- finally { if (e_5) throw e_5.error; }
26861
- }
26862
- this.initializedGroups.clear();
26863
- };
26864
- DataStore.prototype.updateItemInGroups = function (item, previousItem) {
26225
+ DataStore.prototype.updateItemInGroups = function (item, diff) {
26865
26226
  var e_6, _a;
26866
26227
  var _this = this;
26867
26228
  var _loop_1 = function (groupFilter) {
@@ -26877,15 +26238,15 @@ var DataStore = /** @class */ (function () {
26877
26238
  groupItems_1.get(group)[item.id] = observableItem;
26878
26239
  });
26879
26240
  }
26880
- if (previousItem) {
26881
- var previousGroupValue = groupFilter.keyFunc(previousItem);
26241
+ if (diff) {
26242
+ var previousGroupValue = groupFilter.keyFunc(__assign(__assign({}, item), diff));
26882
26243
  previousGroupValue = Array.isArray(previousGroupValue) ? previousGroupValue : [previousGroupValue];
26883
26244
  previousGroupValue
26884
- .filter(function (previous) { return groupValue.indexOf(previous) === -1; })
26885
- .forEach(function (previous) {
26245
+ .filter(function (diffItem) { return groupValue.indexOf(diffItem) === -1; })
26246
+ .forEach(function (diffItem) {
26886
26247
  var _a;
26887
26248
  var previousGroupItems = _this.itemsByGroups.get(groupFilter.groupType);
26888
- (_a = previousGroupItems.get(previous)) === null || _a === void 0 ? true : delete _a[previousItem.id];
26249
+ (_a = previousGroupItems.get(diffItem)) === null || _a === void 0 ? true : delete _a[(item === null || item === void 0 ? void 0 : item.id) || diff.id];
26889
26250
  });
26890
26251
  }
26891
26252
  };
@@ -26926,7 +26287,7 @@ exports.default = DataStore;
26926
26287
  //# sourceMappingURL=data-store.js.map
26927
26288
 
26928
26289
  /***/ }),
26929
- /* 41 */
26290
+ /* 40 */
26930
26291
  /***/ (function(module, exports, __webpack_require__) {
26931
26292
 
26932
26293
  "use strict";
@@ -26974,7 +26335,7 @@ var ActionKey;
26974
26335
  //# sourceMappingURL=action.js.map
26975
26336
 
26976
26337
  /***/ }),
26977
- /* 42 */
26338
+ /* 41 */
26978
26339
  /***/ (function(module, exports, __webpack_require__) {
26979
26340
 
26980
26341
  var freeGlobal = __webpack_require__(207);
@@ -26989,7 +26350,7 @@ module.exports = root;
26989
26350
 
26990
26351
 
26991
26352
  /***/ }),
26992
- /* 43 */
26353
+ /* 42 */
26993
26354
  /***/ (function(module, exports) {
26994
26355
 
26995
26356
  /**
@@ -27024,7 +26385,7 @@ module.exports = isObjectLike;
27024
26385
 
27025
26386
 
27026
26387
  /***/ }),
27027
- /* 44 */
26388
+ /* 43 */
27028
26389
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
27029
26390
 
27030
26391
  "use strict";
@@ -27045,7 +26406,7 @@ var EmptyError = EmptyErrorImpl;
27045
26406
 
27046
26407
 
27047
26408
  /***/ }),
27048
- /* 45 */
26409
+ /* 44 */
27049
26410
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
27050
26411
 
27051
26412
  "use strict";
@@ -27113,7 +26474,7 @@ var AsyncScheduler = /*@__PURE__*/ (function (_super) {
27113
26474
 
27114
26475
 
27115
26476
  /***/ }),
27116
- /* 46 */
26477
+ /* 45 */
27117
26478
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
27118
26479
 
27119
26480
  "use strict";
@@ -27137,7 +26498,7 @@ function fromArray(input, scheduler) {
27137
26498
 
27138
26499
 
27139
26500
  /***/ }),
27140
- /* 47 */
26501
+ /* 46 */
27141
26502
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
27142
26503
 
27143
26504
  "use strict";
@@ -27195,7 +26556,7 @@ var AsyncSubject = /*@__PURE__*/ (function (_super) {
27195
26556
 
27196
26557
 
27197
26558
  /***/ }),
27198
- /* 48 */
26559
+ /* 47 */
27199
26560
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
27200
26561
 
27201
26562
  "use strict";
@@ -27302,244 +26663,894 @@ var AsyncAction_AsyncAction = /*@__PURE__*/ (function (_super) {
27302
26663
  return errorValue;
27303
26664
  }
27304
26665
  };
27305
- AsyncAction.prototype._unsubscribe = function () {
27306
- var id = this.id;
27307
- var scheduler = this.scheduler;
27308
- var actions = scheduler.actions;
27309
- var index = actions.indexOf(this);
27310
- this.work = null;
27311
- this.state = null;
27312
- this.pending = false;
27313
- this.scheduler = null;
27314
- if (index !== -1) {
27315
- actions.splice(index, 1);
27316
- }
27317
- if (id != null) {
27318
- this.id = this.recycleAsyncId(scheduler, id, null);
27319
- }
27320
- this.delay = null;
26666
+ AsyncAction.prototype._unsubscribe = function () {
26667
+ var id = this.id;
26668
+ var scheduler = this.scheduler;
26669
+ var actions = scheduler.actions;
26670
+ var index = actions.indexOf(this);
26671
+ this.work = null;
26672
+ this.state = null;
26673
+ this.pending = false;
26674
+ this.scheduler = null;
26675
+ if (index !== -1) {
26676
+ actions.splice(index, 1);
26677
+ }
26678
+ if (id != null) {
26679
+ this.id = this.recycleAsyncId(scheduler, id, null);
26680
+ }
26681
+ this.delay = null;
26682
+ };
26683
+ return AsyncAction;
26684
+ }(Action_Action));
26685
+
26686
+ //# sourceMappingURL=AsyncAction.js.map
26687
+
26688
+
26689
+ /***/ }),
26690
+ /* 48 */
26691
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
26692
+
26693
+ "use strict";
26694
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return isNumeric; });
26695
+ /* harmony import */ var _isArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(10);
26696
+ /** PURE_IMPORTS_START _isArray PURE_IMPORTS_END */
26697
+
26698
+ function isNumeric(val) {
26699
+ return !Object(_isArray__WEBPACK_IMPORTED_MODULE_0__[/* isArray */ "a"])(val) && (val - parseFloat(val) + 1) >= 0;
26700
+ }
26701
+ //# sourceMappingURL=isNumeric.js.map
26702
+
26703
+
26704
+ /***/ }),
26705
+ /* 49 */
26706
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
26707
+
26708
+ "use strict";
26709
+
26710
+ // CONCATENATED MODULE: ./node_modules/engine.io-parser/build/esm/commons.js
26711
+ const PACKET_TYPES = Object.create(null); // no Map = no polyfill
26712
+ PACKET_TYPES["open"] = "0";
26713
+ PACKET_TYPES["close"] = "1";
26714
+ PACKET_TYPES["ping"] = "2";
26715
+ PACKET_TYPES["pong"] = "3";
26716
+ PACKET_TYPES["message"] = "4";
26717
+ PACKET_TYPES["upgrade"] = "5";
26718
+ PACKET_TYPES["noop"] = "6";
26719
+ const PACKET_TYPES_REVERSE = Object.create(null);
26720
+ Object.keys(PACKET_TYPES).forEach(key => {
26721
+ PACKET_TYPES_REVERSE[PACKET_TYPES[key]] = key;
26722
+ });
26723
+ const ERROR_PACKET = { type: "error", data: "parser error" };
26724
+
26725
+
26726
+ // CONCATENATED MODULE: ./node_modules/engine.io-parser/build/esm/encodePacket.browser.js
26727
+
26728
+ const withNativeBlob = typeof Blob === "function" ||
26729
+ (typeof Blob !== "undefined" &&
26730
+ Object.prototype.toString.call(Blob) === "[object BlobConstructor]");
26731
+ const withNativeArrayBuffer = typeof ArrayBuffer === "function";
26732
+ // ArrayBuffer.isView method is not defined in IE10
26733
+ const isView = obj => {
26734
+ return typeof ArrayBuffer.isView === "function"
26735
+ ? ArrayBuffer.isView(obj)
26736
+ : obj && obj.buffer instanceof ArrayBuffer;
26737
+ };
26738
+ const encodePacket = ({ type, data }, supportsBinary, callback) => {
26739
+ if (withNativeBlob && data instanceof Blob) {
26740
+ if (supportsBinary) {
26741
+ return callback(data);
26742
+ }
26743
+ else {
26744
+ return encodeBlobAsBase64(data, callback);
26745
+ }
26746
+ }
26747
+ else if (withNativeArrayBuffer &&
26748
+ (data instanceof ArrayBuffer || isView(data))) {
26749
+ if (supportsBinary) {
26750
+ return callback(data);
26751
+ }
26752
+ else {
26753
+ return encodeBlobAsBase64(new Blob([data]), callback);
26754
+ }
26755
+ }
26756
+ // plain string
26757
+ return callback(PACKET_TYPES[type] + (data || ""));
26758
+ };
26759
+ const encodeBlobAsBase64 = (data, callback) => {
26760
+ const fileReader = new FileReader();
26761
+ fileReader.onload = function () {
26762
+ const content = fileReader.result.split(",")[1];
26763
+ callback("b" + (content || ""));
26764
+ };
26765
+ return fileReader.readAsDataURL(data);
26766
+ };
26767
+ /* harmony default export */ var encodePacket_browser = (encodePacket);
26768
+
26769
+ // CONCATENATED MODULE: ./node_modules/engine.io-parser/build/esm/contrib/base64-arraybuffer.js
26770
+ // imported from https://github.com/socketio/base64-arraybuffer
26771
+ const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
26772
+ // Use a lookup table to find the index.
26773
+ const lookup = typeof Uint8Array === 'undefined' ? [] : new Uint8Array(256);
26774
+ for (let i = 0; i < chars.length; i++) {
26775
+ lookup[chars.charCodeAt(i)] = i;
26776
+ }
26777
+ const encode = (arraybuffer) => {
26778
+ let bytes = new Uint8Array(arraybuffer), i, len = bytes.length, base64 = '';
26779
+ for (i = 0; i < len; i += 3) {
26780
+ base64 += chars[bytes[i] >> 2];
26781
+ base64 += chars[((bytes[i] & 3) << 4) | (bytes[i + 1] >> 4)];
26782
+ base64 += chars[((bytes[i + 1] & 15) << 2) | (bytes[i + 2] >> 6)];
26783
+ base64 += chars[bytes[i + 2] & 63];
26784
+ }
26785
+ if (len % 3 === 2) {
26786
+ base64 = base64.substring(0, base64.length - 1) + '=';
26787
+ }
26788
+ else if (len % 3 === 1) {
26789
+ base64 = base64.substring(0, base64.length - 2) + '==';
26790
+ }
26791
+ return base64;
26792
+ };
26793
+ const decode = (base64) => {
26794
+ let bufferLength = base64.length * 0.75, len = base64.length, i, p = 0, encoded1, encoded2, encoded3, encoded4;
26795
+ if (base64[base64.length - 1] === '=') {
26796
+ bufferLength--;
26797
+ if (base64[base64.length - 2] === '=') {
26798
+ bufferLength--;
26799
+ }
26800
+ }
26801
+ const arraybuffer = new ArrayBuffer(bufferLength), bytes = new Uint8Array(arraybuffer);
26802
+ for (i = 0; i < len; i += 4) {
26803
+ encoded1 = lookup[base64.charCodeAt(i)];
26804
+ encoded2 = lookup[base64.charCodeAt(i + 1)];
26805
+ encoded3 = lookup[base64.charCodeAt(i + 2)];
26806
+ encoded4 = lookup[base64.charCodeAt(i + 3)];
26807
+ bytes[p++] = (encoded1 << 2) | (encoded2 >> 4);
26808
+ bytes[p++] = ((encoded2 & 15) << 4) | (encoded3 >> 2);
26809
+ bytes[p++] = ((encoded3 & 3) << 6) | (encoded4 & 63);
26810
+ }
26811
+ return arraybuffer;
26812
+ };
26813
+
26814
+ // CONCATENATED MODULE: ./node_modules/engine.io-parser/build/esm/decodePacket.browser.js
26815
+
26816
+
26817
+ const decodePacket_browser_withNativeArrayBuffer = typeof ArrayBuffer === "function";
26818
+ const decodePacket = (encodedPacket, binaryType) => {
26819
+ if (typeof encodedPacket !== "string") {
26820
+ return {
26821
+ type: "message",
26822
+ data: mapBinary(encodedPacket, binaryType)
26823
+ };
26824
+ }
26825
+ const type = encodedPacket.charAt(0);
26826
+ if (type === "b") {
26827
+ return {
26828
+ type: "message",
26829
+ data: decodeBase64Packet(encodedPacket.substring(1), binaryType)
26830
+ };
26831
+ }
26832
+ const packetType = PACKET_TYPES_REVERSE[type];
26833
+ if (!packetType) {
26834
+ return ERROR_PACKET;
26835
+ }
26836
+ return encodedPacket.length > 1
26837
+ ? {
26838
+ type: PACKET_TYPES_REVERSE[type],
26839
+ data: encodedPacket.substring(1)
26840
+ }
26841
+ : {
26842
+ type: PACKET_TYPES_REVERSE[type]
26843
+ };
26844
+ };
26845
+ const decodeBase64Packet = (data, binaryType) => {
26846
+ if (decodePacket_browser_withNativeArrayBuffer) {
26847
+ const decoded = decode(data);
26848
+ return mapBinary(decoded, binaryType);
26849
+ }
26850
+ else {
26851
+ return { base64: true, data }; // fallback for old browsers
26852
+ }
26853
+ };
26854
+ const mapBinary = (data, binaryType) => {
26855
+ switch (binaryType) {
26856
+ case "blob":
26857
+ return data instanceof ArrayBuffer ? new Blob([data]) : data;
26858
+ case "arraybuffer":
26859
+ default:
26860
+ return data; // assuming the data is already an ArrayBuffer
26861
+ }
26862
+ };
26863
+ /* harmony default export */ var decodePacket_browser = (decodePacket);
26864
+
26865
+ // CONCATENATED MODULE: ./node_modules/engine.io-parser/build/esm/index.js
26866
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return protocol; });
26867
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return encodePayload; });
26868
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return decodePayload; });
26869
+ /* concated harmony reexport encodePacket */__webpack_require__.d(__webpack_exports__, "c", function() { return encodePacket_browser; });
26870
+ /* concated harmony reexport decodePacket */__webpack_require__.d(__webpack_exports__, "a", function() { return decodePacket_browser; });
26871
+
26872
+
26873
+ const SEPARATOR = String.fromCharCode(30); // see https://en.wikipedia.org/wiki/Delimiter#ASCII_delimited_text
26874
+ const encodePayload = (packets, callback) => {
26875
+ // some packets may be added to the array while encoding, so the initial length must be saved
26876
+ const length = packets.length;
26877
+ const encodedPackets = new Array(length);
26878
+ let count = 0;
26879
+ packets.forEach((packet, i) => {
26880
+ // force base64 encoding for binary packets
26881
+ encodePacket_browser(packet, false, encodedPacket => {
26882
+ encodedPackets[i] = encodedPacket;
26883
+ if (++count === length) {
26884
+ callback(encodedPackets.join(SEPARATOR));
26885
+ }
26886
+ });
26887
+ });
26888
+ };
26889
+ const decodePayload = (encodedPayload, binaryType) => {
26890
+ const encodedPackets = encodedPayload.split(SEPARATOR);
26891
+ const packets = [];
26892
+ for (let i = 0; i < encodedPackets.length; i++) {
26893
+ const decodedPacket = decodePacket_browser(encodedPackets[i], binaryType);
26894
+ packets.push(decodedPacket);
26895
+ if (decodedPacket.type === "error") {
26896
+ break;
26897
+ }
26898
+ }
26899
+ return packets;
26900
+ };
26901
+ const protocol = 4;
26902
+
26903
+
26904
+
26905
+ /***/ }),
26906
+ /* 50 */
26907
+ /***/ (function(module, exports, __webpack_require__) {
26908
+
26909
+ "use strict";
26910
+
26911
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
26912
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
26913
+ return new (P || (P = Promise))(function (resolve, reject) {
26914
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
26915
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
26916
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
26917
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
26918
+ });
26919
+ };
26920
+ var __generator = (this && this.__generator) || function (thisArg, body) {
26921
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
26922
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
26923
+ function verb(n) { return function (v) { return step([n, v]); }; }
26924
+ function step(op) {
26925
+ if (f) throw new TypeError("Generator is already executing.");
26926
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
26927
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
26928
+ if (y = 0, t) op = [op[0] & 2, t.value];
26929
+ switch (op[0]) {
26930
+ case 0: case 1: t = op; break;
26931
+ case 4: _.label++; return { value: op[1], done: false };
26932
+ case 5: _.label++; y = op[1]; op = [0]; continue;
26933
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
26934
+ default:
26935
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
26936
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
26937
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
26938
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
26939
+ if (t[2]) _.ops.pop();
26940
+ _.trys.pop(); continue;
26941
+ }
26942
+ op = body.call(thisArg, _);
26943
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
26944
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
26945
+ }
26946
+ };
26947
+ var __read = (this && this.__read) || function (o, n) {
26948
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
26949
+ if (!m) return o;
26950
+ var i = m.call(o), r, ar = [], e;
26951
+ try {
26952
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
26953
+ }
26954
+ catch (error) { e = { error: error }; }
26955
+ finally {
26956
+ try {
26957
+ if (r && !r.done && (m = i["return"])) m.call(i);
26958
+ }
26959
+ finally { if (e) throw e.error; }
26960
+ }
26961
+ return ar;
26962
+ };
26963
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
26964
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
26965
+ if (ar || !(i in from)) {
26966
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
26967
+ ar[i] = from[i];
26968
+ }
26969
+ }
26970
+ return to.concat(ar || Array.prototype.slice.call(from));
26971
+ };
26972
+ Object.defineProperty(exports, "__esModule", { value: true });
26973
+ exports.newConfigurationProvider = exports.getFullConfiguration = exports.setEnvironment = exports.getEnvironment = exports.getGlobals = exports.setGlobals = exports.setConfigurationProvider = exports.getConfigurationProvider = exports.resendConfirmationEmail = exports.login = exports.loginInternal = exports.initWithAuthToken = exports.initWithEmail = exports.initWithSessionCode = exports.setConfigurations = exports.BringgDashboardSDK = void 0;
26974
+ // eslint-disable-next-line no-restricted-imports
26975
+ var mobx = __webpack_require__(383);
26976
+ var AlertConfigurationApi_1 = __webpack_require__(384);
26977
+ var AlertsApi_1 = __webpack_require__(421);
26978
+ var AnalyticsReportsApi_1 = __webpack_require__(424);
26979
+ var ApplicationApi_1 = __webpack_require__(426);
26980
+ var ApplicationMerchantConfigurationApi_1 = __webpack_require__(429);
26981
+ var ApplicationTeamConfigurationApi_1 = __webpack_require__(431);
26982
+ var BillingApi_1 = __webpack_require__(433);
26983
+ var ChatConversationApi_1 = __webpack_require__(435);
26984
+ var Company_1 = __webpack_require__(439);
26985
+ var ConfigurationProvider_1 = __webpack_require__(179);
26986
+ var Crew_1 = __webpack_require__(441);
26987
+ var CrossAppTransport_1 = __webpack_require__(444);
26988
+ var CustomAttributesApi_1 = __webpack_require__(445);
26989
+ var Customer_1 = __webpack_require__(448);
26990
+ var customers_api_1 = __webpack_require__(450);
26991
+ var CustomerAvailabilityHourApi_1 = __webpack_require__(453);
26992
+ var customer_configuration_1 = __webpack_require__(455);
26993
+ var dashboard_1 = __webpack_require__(457);
26994
+ var DeliveryBlocksApi_1 = __webpack_require__(459);
26995
+ var DeliveryCatalogApi_1 = __webpack_require__(461);
26996
+ var DeliveryCatalogApi_2 = __webpack_require__(463);
26997
+ var delivery_windows_api_1 = __webpack_require__(183);
26998
+ var ExclusionWindowApi_1 = __webpack_require__(468);
26999
+ var exclusion_window_api_1 = __webpack_require__(184);
27000
+ var FleetApi_1 = __webpack_require__(471);
27001
+ var FleetRouterApi_1 = __webpack_require__(473);
27002
+ var FleetTemplateApi_1 = __webpack_require__(475);
27003
+ var FloatingInventoryApi_1 = __webpack_require__(477);
27004
+ var floating_inventories_api_1 = __webpack_require__(479);
27005
+ var GeocodingApi_1 = __webpack_require__(481);
27006
+ var GoogleMapsHelperApi_1 = __webpack_require__(483);
27007
+ var Inventory_1 = __webpack_require__(485);
27008
+ var InventoryActionsConfiguration_1 = __webpack_require__(487);
27009
+ var Language_1 = __webpack_require__(489);
27010
+ var lookup_api_1 = __webpack_require__(492);
27011
+ var MerchantApi_1 = __webpack_require__(494);
27012
+ var MerchantConfigurationApi_1 = __webpack_require__(497);
27013
+ var NotificationTemplate_1 = __webpack_require__(500);
27014
+ var NotificationType_1 = __webpack_require__(503);
27015
+ var OauthApplicationApi_1 = __webpack_require__(506);
27016
+ var OnboardingApi_1 = __webpack_require__(508);
27017
+ var OpenFleetApi_1 = __webpack_require__(510);
27018
+ var OptimizationConfiguration_1 = __webpack_require__(512);
27019
+ var PackageApi_1 = __webpack_require__(514);
27020
+ var ParkingSpotApi_1 = __webpack_require__(517);
27021
+ var Photo_1 = __webpack_require__(519);
27022
+ var planned_delivery_windows_api_1 = __webpack_require__(190);
27023
+ var PlannedRoutesApi_1 = __webpack_require__(522);
27024
+ var PrivilegesApi_1 = __webpack_require__(524);
27025
+ var PushNotificationRegistration_1 = __webpack_require__(527);
27026
+ var PushTokenSubscriptionApi_1 = __webpack_require__(529);
27027
+ var RatesApi_1 = __webpack_require__(531);
27028
+ var ReasonToCancelTasksApi_1 = __webpack_require__(534);
27029
+ var ReasonToChangeInventory_1 = __webpack_require__(536);
27030
+ var ReasonToReassignTasksApi_1 = __webpack_require__(538);
27031
+ var ReportPreference_1 = __webpack_require__(540);
27032
+ var reports_1 = __webpack_require__(542);
27033
+ var ResourceUploadApi_1 = __webpack_require__(544);
27034
+ var RolloutsApi_1 = __webpack_require__(545);
27035
+ var RouteOptimizationApi_1 = __webpack_require__(548);
27036
+ var RouteOptimizationService_1 = __webpack_require__(549);
27037
+ var RuleApi_1 = __webpack_require__(551);
27038
+ var runs_1 = __webpack_require__(553);
27039
+ var runs_api_1 = __webpack_require__(194);
27040
+ var ScanApi_1 = __webpack_require__(716);
27041
+ var ServiceApi_1 = __webpack_require__(718);
27042
+ var ServiceAreaApi_1 = __webpack_require__(720);
27043
+ var service_area_api_1 = __webpack_require__(195);
27044
+ var ServicePlansApi_1 = __webpack_require__(723);
27045
+ var AuthService_1 = __webpack_require__(198);
27046
+ var Session_1 = __webpack_require__(731);
27047
+ var ShiftsApi_1 = __webpack_require__(736);
27048
+ var Signature_1 = __webpack_require__(738);
27049
+ var SkillsApi_1 = __webpack_require__(740);
27050
+ var Tag_1 = __webpack_require__(743);
27051
+ var TagCustomerConfiguration_1 = __webpack_require__(745);
27052
+ var TagMerchantConfiguration_1 = __webpack_require__(747);
27053
+ var TaskApi_1 = __webpack_require__(749);
27054
+ var tasks_api_1 = __webpack_require__(202);
27055
+ var TaskConfiguration_1 = __webpack_require__(891);
27056
+ var TaskInventory_1 = __webpack_require__(893);
27057
+ var TaskManagedAttributes_1 = __webpack_require__(373);
27058
+ var task_reject_reasons_api_1 = __webpack_require__(374);
27059
+ var TeamApi_1 = __webpack_require__(901);
27060
+ var TeamConfigurationApi_1 = __webpack_require__(903);
27061
+ var TeamServiceAreaApi_1 = __webpack_require__(905);
27062
+ var TemplatesApi_1 = __webpack_require__(907);
27063
+ var upload_api_1 = __webpack_require__(375);
27064
+ var Users_1 = __webpack_require__(911);
27065
+ var UserAnalyticsApi_1 = __webpack_require__(915);
27066
+ var UserConfiguration_1 = __webpack_require__(923);
27067
+ var UserTypeApi_1 = __webpack_require__(925);
27068
+ var vehicles_api_1 = __webpack_require__(378);
27069
+ var VehicleApi_1 = __webpack_require__(929);
27070
+ var VehicleCategoryApi_1 = __webpack_require__(930);
27071
+ var VehicleTypeApi_1 = __webpack_require__(932);
27072
+ var VrpAutoDispatchAnalyticApi_1 = __webpack_require__(934);
27073
+ var WebApplicationConfigurationApi_1 = __webpack_require__(937);
27074
+ var WebhookAuthenticationConfiguration_1 = __webpack_require__(939);
27075
+ var workflows_api_1 = __webpack_require__(380);
27076
+ var environment = 'production';
27077
+ var configurationProvider = null;
27078
+ var globals = null;
27079
+ var BringgDashboardSDK = /** @class */ (function () {
27080
+ function BringgDashboardSDK(session) {
27081
+ this.applicationMerchantConfiguration = null;
27082
+ this.applicationTeamConfiguration = null;
27083
+ this.chat = null;
27084
+ this.companies = null;
27085
+ // eslint-disable-next-line @typescript-eslint/ban-types
27086
+ this.credentials = {};
27087
+ this.crews = null;
27088
+ this.crossAppTransport = null;
27089
+ this.customerConfiguration = null;
27090
+ this.customers = null;
27091
+ this.dashboard = null;
27092
+ this.deliveryBlocks = null;
27093
+ this.fleets = null;
27094
+ this.rules = null;
27095
+ this.floatingInventory = null;
27096
+ this.inventoryActionsConfigurations = null;
27097
+ this.languages = null;
27098
+ this.lookup = null;
27099
+ this.merchant = null;
27100
+ this.merchantConfiguration = null;
27101
+ this.notificationTemplates = null;
27102
+ this.notificationTypes = null;
27103
+ this.oauthApplication = null;
27104
+ this.plannedRoutes = null;
27105
+ this.privileges = null;
27106
+ this.reasonToChangeInventory = null;
27107
+ this.reasonToReassignTasks = null;
27108
+ this.reasonToCancelTasks = null;
27109
+ this.reportPreferences = null;
27110
+ this.reports = null;
27111
+ this.runs = null;
27112
+ this.rollouts = null;
27113
+ this.skills = null;
27114
+ this.taskConfigurations = null;
27115
+ this.taskInventory = null;
27116
+ this.inventory = null;
27117
+ this.tasks = null;
27118
+ this.teamConfiguration = null;
27119
+ this.teams = null;
27120
+ this.resourceUploads = null;
27121
+ this.userConfigurations = null;
27122
+ this.users = null;
27123
+ this.vehicleCategories = null;
27124
+ this.vehicleTypes = null;
27125
+ this.vehicles = null;
27126
+ this.session = session;
27127
+ }
27128
+ BringgDashboardSDK.setConfigurations = function (apiEndpointURL, monitorEndpointURL, generalEnvApiEndpoint) {
27129
+ configurationProvider.getApiEndpoint = function () { return apiEndpointURL; };
27130
+ configurationProvider.getAuthenticationEndpoint = function () { return apiEndpointURL; };
27131
+ configurationProvider.getRegionDiscoveryEndpoint = function () { return apiEndpointURL; };
27132
+ configurationProvider.getMonitoringEndpoint = function () { return monitorEndpointURL; };
27133
+ configurationProvider.getGeneralEnvApiEndpoint = function () { return generalEnvApiEndpoint; };
27134
+ };
27135
+ BringgDashboardSDK.initWithSessionCode = function (code, session, region, globals) {
27136
+ return __awaiter(this, void 0, void 0, function () {
27137
+ return __generator(this, function (_a) {
27138
+ switch (_a.label) {
27139
+ case 0: return [4 /*yield*/, BringgDashboardSDK.login({ code: code, session: session, region: region, globals: globals })];
27140
+ case 1: return [2 /*return*/, _a.sent()];
27141
+ }
27142
+ });
27143
+ });
27144
+ };
27145
+ BringgDashboardSDK.initWithEmail = function (email, password, merchant_uuid, recaptchaToken, recaptcha_qa_token, region, globals) {
27146
+ return __awaiter(this, void 0, void 0, function () {
27147
+ return __generator(this, function (_a) {
27148
+ switch (_a.label) {
27149
+ case 0: return [4 /*yield*/, BringgDashboardSDK.login({
27150
+ email: email,
27151
+ password: password,
27152
+ merchant_uuid: merchant_uuid,
27153
+ recaptchaToken: recaptchaToken,
27154
+ recaptcha_qa_token: recaptcha_qa_token,
27155
+ region: region,
27156
+ globals: globals
27157
+ })];
27158
+ case 1: return [2 /*return*/, _a.sent()];
27159
+ }
27160
+ });
27161
+ });
27162
+ };
27163
+ BringgDashboardSDK.initWithAuthToken = function (region, authenticationToken, globals) {
27164
+ return __awaiter(this, void 0, void 0, function () {
27165
+ return __generator(this, function (_a) {
27166
+ switch (_a.label) {
27167
+ case 0: return [4 /*yield*/, BringgDashboardSDK.login({ region: region, authenticationToken: authenticationToken, globals: globals })];
27168
+ case 1: return [2 /*return*/, (_a.sent())];
27169
+ }
27170
+ });
27171
+ });
27172
+ };
27173
+ BringgDashboardSDK.loginInternal = function (sdkInitialiser, params) {
27174
+ return __awaiter(this, void 0, void 0, function () {
27175
+ var response;
27176
+ return __generator(this, function (_a) {
27177
+ switch (_a.label) {
27178
+ case 0: return [4 /*yield*/, Session_1.default.init(params)];
27179
+ case 1:
27180
+ response = _a.sent();
27181
+ return [2 /*return*/, sdkInitialiser(response)];
27182
+ }
27183
+ });
27184
+ });
27185
+ };
27186
+ BringgDashboardSDK.login = function (params) {
27187
+ var _a;
27188
+ return __awaiter(this, void 0, void 0, function () {
27189
+ var env, configuration;
27190
+ return __generator(this, function (_b) {
27191
+ switch (_b.label) {
27192
+ case 0:
27193
+ setGlobals(params.globals);
27194
+ env = getEnvironment();
27195
+ if (!(['production', 'staging', 'edge'].includes(env) && !((_a = getConfigurationProvider()) === null || _a === void 0 ? void 0 : _a.isLoadedFromEndpoint))) return [3 /*break*/, 2];
27196
+ return [4 /*yield*/, ConfigurationProvider_1.ConfigurationProvider.fromUrl({
27197
+ urlReceived: ConfigurationProvider_1.ConfigurationProvider.getConfigUrl(env),
27198
+ fallbackConfig: getFullConfiguration(),
27199
+ commonRegionConfigKeys: getConfigurationProvider().getCommonRegionConfigKeys(),
27200
+ specificRegionConfigkeys: getConfigurationProvider().getRegionSpecificConfigKeys(),
27201
+ clientId: getConfigurationProvider().getClientId()
27202
+ })];
27203
+ case 1:
27204
+ configuration = _b.sent();
27205
+ if (configuration) {
27206
+ BringgDashboardSDK.setConfigurationProvider(configuration);
27207
+ }
27208
+ _b.label = 2;
27209
+ case 2: return [4 /*yield*/, this.loginInternal(function (a) { return init(a); }, params)];
27210
+ case 3: return [2 /*return*/, _b.sent()];
27211
+ }
27212
+ });
27213
+ });
27214
+ };
27215
+ BringgDashboardSDK.prototype.logout = function (keepServerSession) {
27216
+ if (keepServerSession === void 0) { keepServerSession = false; }
27217
+ return __awaiter(this, void 0, void 0, function () {
27218
+ return __generator(this, function (_a) {
27219
+ switch (_a.label) {
27220
+ case 0: return [4 /*yield*/, this.session.logout(keepServerSession)];
27221
+ case 1: return [2 /*return*/, _a.sent()];
27222
+ }
27223
+ });
27224
+ });
27225
+ };
27226
+ BringgDashboardSDK.resendConfirmationEmail = function (params) {
27227
+ return __awaiter(this, void 0, void 0, function () {
27228
+ var authService, email, password, merchant_uuid, recaptchaToken, recaptcha_qa_token;
27229
+ return __generator(this, function (_a) {
27230
+ switch (_a.label) {
27231
+ case 0:
27232
+ authService = AuthService_1.default.init(params.region);
27233
+ email = params.email, password = params.password, merchant_uuid = params.merchant_uuid, recaptchaToken = params.recaptchaToken, recaptcha_qa_token = params.recaptcha_qa_token;
27234
+ return [4 /*yield*/, authService.resendConfirmationEmail(email, password, merchant_uuid, recaptchaToken, recaptcha_qa_token)];
27235
+ case 1: return [2 /*return*/, _a.sent()];
27236
+ }
27237
+ });
27238
+ });
27239
+ };
27240
+ BringgDashboardSDK.prototype.switchAccounts = function () {
27241
+ return __awaiter(this, void 0, void 0, function () {
27242
+ var _a;
27243
+ return __generator(this, function (_b) {
27244
+ switch (_b.label) {
27245
+ case 0:
27246
+ _a = init;
27247
+ return [4 /*yield*/, this.session.switchAccounts()];
27248
+ case 1: return [2 /*return*/, _a.apply(void 0, [_b.sent()])];
27249
+ }
27250
+ });
27251
+ });
27252
+ };
27253
+ BringgDashboardSDK.prototype.impersonate = function (user_id) {
27254
+ return __awaiter(this, void 0, void 0, function () {
27255
+ var _a;
27256
+ return __generator(this, function (_b) {
27257
+ switch (_b.label) {
27258
+ case 0:
27259
+ _a = init;
27260
+ return [4 /*yield*/, this.session.impersonate(user_id)];
27261
+ case 1: return [2 /*return*/, _a.apply(void 0, [_b.sent()])];
27262
+ }
27263
+ });
27264
+ });
27265
+ };
27266
+ BringgDashboardSDK.prototype.impersonateByTeam = function (team_id) {
27267
+ return __awaiter(this, void 0, void 0, function () {
27268
+ var _a;
27269
+ return __generator(this, function (_b) {
27270
+ switch (_b.label) {
27271
+ case 0:
27272
+ _a = init;
27273
+ return [4 /*yield*/, this.session.impersonateByTeam(team_id)];
27274
+ case 1: return [2 /*return*/, _a.apply(void 0, [_b.sent()])];
27275
+ }
27276
+ });
27277
+ });
27321
27278
  };
27322
- return AsyncAction;
27323
- }(Action_Action));
27324
-
27325
- //# sourceMappingURL=AsyncAction.js.map
27326
-
27327
-
27328
- /***/ }),
27329
- /* 49 */
27330
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
27331
-
27332
- "use strict";
27333
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return isNumeric; });
27334
- /* harmony import */ var _isArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(10);
27335
- /** PURE_IMPORTS_START _isArray PURE_IMPORTS_END */
27336
-
27337
- function isNumeric(val) {
27338
- return !Object(_isArray__WEBPACK_IMPORTED_MODULE_0__[/* isArray */ "a"])(val) && (val - parseFloat(val) + 1) >= 0;
27339
- }
27340
- //# sourceMappingURL=isNumeric.js.map
27341
-
27342
-
27343
- /***/ }),
27344
- /* 50 */
27345
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
27346
-
27347
- "use strict";
27348
-
27349
- // CONCATENATED MODULE: ./node_modules/engine.io-parser/build/esm/commons.js
27350
- const PACKET_TYPES = Object.create(null); // no Map = no polyfill
27351
- PACKET_TYPES["open"] = "0";
27352
- PACKET_TYPES["close"] = "1";
27353
- PACKET_TYPES["ping"] = "2";
27354
- PACKET_TYPES["pong"] = "3";
27355
- PACKET_TYPES["message"] = "4";
27356
- PACKET_TYPES["upgrade"] = "5";
27357
- PACKET_TYPES["noop"] = "6";
27358
- const PACKET_TYPES_REVERSE = Object.create(null);
27359
- Object.keys(PACKET_TYPES).forEach(key => {
27360
- PACKET_TYPES_REVERSE[PACKET_TYPES[key]] = key;
27361
- });
27362
- const ERROR_PACKET = { type: "error", data: "parser error" };
27363
-
27364
-
27365
- // CONCATENATED MODULE: ./node_modules/engine.io-parser/build/esm/encodePacket.browser.js
27366
-
27367
- const withNativeBlob = typeof Blob === "function" ||
27368
- (typeof Blob !== "undefined" &&
27369
- Object.prototype.toString.call(Blob) === "[object BlobConstructor]");
27370
- const withNativeArrayBuffer = typeof ArrayBuffer === "function";
27371
- // ArrayBuffer.isView method is not defined in IE10
27372
- const isView = obj => {
27373
- return typeof ArrayBuffer.isView === "function"
27374
- ? ArrayBuffer.isView(obj)
27375
- : obj && obj.buffer instanceof ArrayBuffer;
27376
- };
27377
- const encodePacket = ({ type, data }, supportsBinary, callback) => {
27378
- if (withNativeBlob && data instanceof Blob) {
27379
- if (supportsBinary) {
27380
- return callback(data);
27381
- }
27382
- else {
27383
- return encodeBlobAsBase64(data, callback);
27384
- }
27385
- }
27386
- else if (withNativeArrayBuffer &&
27387
- (data instanceof ArrayBuffer || isView(data))) {
27388
- if (supportsBinary) {
27389
- return callback(data);
27390
- }
27391
- else {
27392
- return encodeBlobAsBase64(new Blob([data]), callback);
27393
- }
27394
- }
27395
- // plain string
27396
- return callback(PACKET_TYPES[type] + (data || ""));
27397
- };
27398
- const encodeBlobAsBase64 = (data, callback) => {
27399
- const fileReader = new FileReader();
27400
- fileReader.onload = function () {
27401
- const content = fileReader.result.split(",")[1];
27402
- callback("b" + (content || ""));
27279
+ BringgDashboardSDK.prototype.unwindImpersonation = function () {
27280
+ return __awaiter(this, void 0, void 0, function () {
27281
+ var _a;
27282
+ return __generator(this, function (_b) {
27283
+ switch (_b.label) {
27284
+ case 0:
27285
+ _a = init;
27286
+ return [4 /*yield*/, this.session.unwindImpersonation()];
27287
+ case 1: return [2 /*return*/, _a.apply(void 0, [_b.sent()])];
27288
+ }
27289
+ });
27290
+ });
27403
27291
  };
27404
- return fileReader.readAsDataURL(data);
27405
- };
27406
- /* harmony default export */ var encodePacket_browser = (encodePacket);
27407
-
27408
- // CONCATENATED MODULE: ./node_modules/engine.io-parser/build/esm/contrib/base64-arraybuffer.js
27409
- // imported from https://github.com/socketio/base64-arraybuffer
27410
- const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
27411
- // Use a lookup table to find the index.
27412
- const lookup = typeof Uint8Array === 'undefined' ? [] : new Uint8Array(256);
27413
- for (let i = 0; i < chars.length; i++) {
27414
- lookup[chars.charCodeAt(i)] = i;
27292
+ BringgDashboardSDK.setConfigurationProvider = setConfigurationProvider;
27293
+ BringgDashboardSDK.setEnvironment = setEnvironment;
27294
+ BringgDashboardSDK.getFullConfiguration = getFullConfiguration;
27295
+ BringgDashboardSDK.newConfigurationProvider = newConfigurationProvider;
27296
+ return BringgDashboardSDK;
27297
+ }());
27298
+ exports.BringgDashboardSDK = BringgDashboardSDK;
27299
+ function init(session) {
27300
+ return __awaiter(this, void 0, void 0, function () {
27301
+ var bringg, workflows, taskRejectReasons;
27302
+ return __generator(this, function (_a) {
27303
+ switch (_a.label) {
27304
+ case 0:
27305
+ bringg = new BringgDashboardSDK(session);
27306
+ bringg.v2 = {
27307
+ vehicles: new vehicles_api_1.default(session),
27308
+ tasks: new tasks_api_1.default(session),
27309
+ customers: new customers_api_1.default(session),
27310
+ plannedDeliveryWindows: new planned_delivery_windows_api_1.default(session),
27311
+ exclusionWindow: new exclusion_window_api_1.ExclusionWindowApi(session),
27312
+ serviceAreas: new service_area_api_1.ServiceAreaApi(session),
27313
+ lookup: new lookup_api_1.default(session),
27314
+ createWorkflows: function (mapper) {
27315
+ workflows = new workflows_api_1.default(session, mapper);
27316
+ return workflows;
27317
+ },
27318
+ workflows: function () {
27319
+ return workflows;
27320
+ },
27321
+ createTaskRejectReasons: function (mapper) {
27322
+ taskRejectReasons = new task_reject_reasons_api_1.default(session, mapper);
27323
+ return taskRejectReasons;
27324
+ },
27325
+ taskRejectReasons: function () {
27326
+ return taskRejectReasons;
27327
+ },
27328
+ runs: new runs_api_1.default(session),
27329
+ uploads: new upload_api_1.default(session),
27330
+ floatingInventories: new floating_inventories_api_1.FloatingInventoriesApi(session),
27331
+ deliveryWindows: new delivery_windows_api_1.default(session),
27332
+ taskManagedAttributes: new TaskManagedAttributes_1.TaskManagedAttributesApi(session)
27333
+ };
27334
+ bringg.application = new ApplicationApi_1.default(session);
27335
+ bringg.chat = new ChatConversationApi_1.default(session);
27336
+ bringg.companies = new Company_1.default(session);
27337
+ bringg.crossAppTransport = new CrossAppTransport_1.default();
27338
+ bringg.customerConfiguration = new customer_configuration_1.default(session);
27339
+ bringg.customers = new Customer_1.default(session);
27340
+ bringg.dashboard = new dashboard_1.default(session);
27341
+ bringg.deliveryBlocks = new DeliveryBlocksApi_1.DeliveryBlocksApi(session);
27342
+ bringg.fleets = new FleetApi_1.default(session);
27343
+ bringg.rules = new RuleApi_1.default(session);
27344
+ bringg.fleetRouterApi = new FleetRouterApi_1.default(session);
27345
+ bringg.alertConfiguration = new AlertConfigurationApi_1.default(session);
27346
+ bringg.floatingInventory = new FloatingInventoryApi_1.default(session);
27347
+ bringg.geocoding = new GeocodingApi_1.default(session);
27348
+ bringg.googleMapsHelper = new GoogleMapsHelperApi_1.default(session);
27349
+ bringg.inventoryActionsConfigurations = new InventoryActionsConfiguration_1.default(session);
27350
+ bringg.languages = new Language_1.Language(session);
27351
+ bringg.merchant = new MerchantApi_1.default(session);
27352
+ bringg.merchantConfiguration = new MerchantConfigurationApi_1.MerchantConfigurationApi(session);
27353
+ bringg.notificationTemplates = new NotificationTemplate_1.NotificationTemplate(session);
27354
+ bringg.notificationTypes = new NotificationType_1.NotificationType(session);
27355
+ bringg.oauthApplication = new OauthApplicationApi_1.default(session);
27356
+ bringg.onboardings = new OnboardingApi_1.default(session);
27357
+ bringg.photos = new Photo_1.default(session);
27358
+ bringg.plannedRoutes = new PlannedRoutesApi_1.default(session);
27359
+ bringg.privileges = new PrivilegesApi_1.default(session);
27360
+ bringg.pushTokenSubscription = new PushTokenSubscriptionApi_1.default(session);
27361
+ bringg.pushNotificationRegistration = new PushNotificationRegistration_1.default(session);
27362
+ bringg.reasonToChangeInventory = new ReasonToChangeInventory_1.default(session);
27363
+ bringg.reasonToReassignTasks = new ReasonToReassignTasksApi_1.default(session);
27364
+ bringg.reasonToCancelTasks = new ReasonToCancelTasksApi_1.default(session);
27365
+ bringg.reportPreferences = new ReportPreference_1.default(session);
27366
+ bringg.reports = new reports_1.default(session);
27367
+ bringg.runs = new runs_1.default(session);
27368
+ bringg.scans = new ScanApi_1.default(session);
27369
+ bringg.rollouts = new RolloutsApi_1.default(session);
27370
+ bringg.service = new ServiceApi_1.default(session);
27371
+ bringg.signatures = new Signature_1.default(session);
27372
+ bringg.skills = new SkillsApi_1.default(session);
27373
+ bringg.tagCustomerConfigurations = new TagCustomerConfiguration_1.default(session);
27374
+ bringg.tagMerchantConfigurations = new TagMerchantConfiguration_1.default(session);
27375
+ bringg.tags = new Tag_1.default(session);
27376
+ bringg.taskConfigurations = new TaskConfiguration_1.default(session);
27377
+ bringg.taskInventory = new TaskInventory_1.default(session);
27378
+ bringg.inventory = new Inventory_1.default(session);
27379
+ bringg.tasks = new TaskApi_1.default(session);
27380
+ bringg.teamConfiguration = new TeamConfigurationApi_1.default(session);
27381
+ bringg.teams = new TeamApi_1.default(session);
27382
+ bringg.resourceUploads = new ResourceUploadApi_1.default(session);
27383
+ bringg.userConfigurations = new UserConfiguration_1.default(session);
27384
+ bringg.userTypes = new UserTypeApi_1.default(session);
27385
+ bringg.users = new Users_1.default(session);
27386
+ bringg.vehicleCategories = new VehicleCategoryApi_1.default(session);
27387
+ bringg.vehicleTypes = new VehicleTypeApi_1.default(session);
27388
+ bringg.vehicles = new VehicleApi_1.default(session);
27389
+ bringg.vrpAutoDispatchAnalytic = new VrpAutoDispatchAnalyticApi_1.default(session);
27390
+ bringg.webApplicationConfiguration = new WebApplicationConfigurationApi_1.default(session);
27391
+ bringg.webhookAuthenticationConfiguration = new WebhookAuthenticationConfiguration_1.default(session);
27392
+ bringg.optimizationConfiguration = new OptimizationConfiguration_1.default(session);
27393
+ bringg.fleetTemplates = new FleetTemplateApi_1.default(session);
27394
+ bringg.openFleets = new OpenFleetApi_1.default(session);
27395
+ bringg.customerAvailabilityHours = new CustomerAvailabilityHourApi_1.default(session);
27396
+ bringg.exclusionWindows = new ExclusionWindowApi_1.default(session);
27397
+ bringg.shifts = new ShiftsApi_1.default(session);
27398
+ bringg.serviceAreas = new ServiceAreaApi_1.default(session);
27399
+ bringg.teamServiceAreas = new TeamServiceAreaApi_1.default(session);
27400
+ bringg.billing = new BillingApi_1.default(session);
27401
+ bringg.userAnalytics = new UserAnalyticsApi_1.default(session);
27402
+ bringg.analyticsReports = new AnalyticsReportsApi_1.default(session);
27403
+ bringg.servicePlans = new ServicePlansApi_1.default(session);
27404
+ bringg.alertsApi = new AlertsApi_1.default(session);
27405
+ bringg.deliveryCatalog = new DeliveryCatalogApi_1.default(session);
27406
+ bringg.deliveryCatalogGeneralEnv = new DeliveryCatalogApi_2.default(session);
27407
+ bringg.packageApi = new PackageApi_1.default(session);
27408
+ bringg.templatesApi = new TemplatesApi_1.default(session);
27409
+ bringg.routeOptimizationApi = new RouteOptimizationApi_1.default(session);
27410
+ bringg.ratesApi = new RatesApi_1.default(session);
27411
+ bringg.routeOptimizationService = new RouteOptimizationService_1.default(session);
27412
+ bringg.parkingSpotApi = new ParkingSpotApi_1.default(session);
27413
+ bringg.customAttributesApi = new CustomAttributesApi_1.default(session);
27414
+ // dependent
27415
+ bringg.crews = new Crew_1.default(session, bringg.users);
27416
+ bringg.applicationMerchantConfiguration = new ApplicationMerchantConfigurationApi_1.default(session, bringg.merchantConfiguration);
27417
+ bringg.applicationTeamConfiguration = new ApplicationTeamConfigurationApi_1.default(session);
27418
+ return [4 /*yield*/, initSessionConfiguration(bringg)];
27419
+ case 1:
27420
+ _a.sent();
27421
+ return [2 /*return*/, Object.freeze(bringg)];
27422
+ }
27423
+ });
27424
+ });
27415
27425
  }
27416
- const encode = (arraybuffer) => {
27417
- let bytes = new Uint8Array(arraybuffer), i, len = bytes.length, base64 = '';
27418
- for (i = 0; i < len; i += 3) {
27419
- base64 += chars[bytes[i] >> 2];
27420
- base64 += chars[((bytes[i] & 3) << 4) | (bytes[i + 1] >> 4)];
27421
- base64 += chars[((bytes[i + 1] & 15) << 2) | (bytes[i + 2] >> 6)];
27422
- base64 += chars[bytes[i + 2] & 63];
27423
- }
27424
- if (len % 3 === 2) {
27425
- base64 = base64.substring(0, base64.length - 1) + '=';
27426
- }
27427
- else if (len % 3 === 1) {
27428
- base64 = base64.substring(0, base64.length - 2) + '==';
27429
- }
27430
- return base64;
27431
- };
27432
- const decode = (base64) => {
27433
- let bufferLength = base64.length * 0.75, len = base64.length, i, p = 0, encoded1, encoded2, encoded3, encoded4;
27434
- if (base64[base64.length - 1] === '=') {
27435
- bufferLength--;
27436
- if (base64[base64.length - 2] === '=') {
27437
- bufferLength--;
27438
- }
27439
- }
27440
- const arraybuffer = new ArrayBuffer(bufferLength), bytes = new Uint8Array(arraybuffer);
27441
- for (i = 0; i < len; i += 4) {
27442
- encoded1 = lookup[base64.charCodeAt(i)];
27443
- encoded2 = lookup[base64.charCodeAt(i + 1)];
27444
- encoded3 = lookup[base64.charCodeAt(i + 2)];
27445
- encoded4 = lookup[base64.charCodeAt(i + 3)];
27446
- bytes[p++] = (encoded1 << 2) | (encoded2 >> 4);
27447
- bytes[p++] = ((encoded2 & 15) << 4) | (encoded3 >> 2);
27448
- bytes[p++] = ((encoded3 & 3) << 6) | (encoded4 & 63);
27426
+ function initSessionConfiguration(bringg) {
27427
+ var _a;
27428
+ return __awaiter(this, void 0, void 0, function () {
27429
+ var apiKey;
27430
+ return __generator(this, function (_b) {
27431
+ switch (_b.label) {
27432
+ case 0: return [4 /*yield*/, Promise.all([bringg.merchantConfiguration.get(), bringg.webApplicationConfiguration.get()])];
27433
+ case 1:
27434
+ _b.sent();
27435
+ if (!((_a = configurationProvider === null || configurationProvider === void 0 ? void 0 : configurationProvider.isUserAnalyticsEnabled) === null || _a === void 0 ? void 0 : _a.call(configurationProvider))) return [3 /*break*/, 5];
27436
+ apiKey = configurationProvider.getUserAnalyticsApiKey();
27437
+ return [4 /*yield*/, bringg.userAnalytics.addSnippet({ apiKey: apiKey })];
27438
+ case 2:
27439
+ _b.sent();
27440
+ return [4 /*yield*/, bringg.merchant.get()];
27441
+ case 3:
27442
+ _b.sent();
27443
+ return [4 /*yield*/, bringg.userAnalytics.run({
27444
+ apiKey: apiKey,
27445
+ environment: environment
27446
+ })];
27447
+ case 4:
27448
+ _b.sent();
27449
+ _b.label = 5;
27450
+ case 5: return [2 /*return*/];
27451
+ }
27452
+ });
27453
+ });
27454
+ }
27455
+ function setConfigurations() {
27456
+ var args = [];
27457
+ for (var _i = 0; _i < arguments.length; _i++) {
27458
+ args[_i] = arguments[_i];
27449
27459
  }
27450
- return arraybuffer;
27451
- };
27452
-
27453
- // CONCATENATED MODULE: ./node_modules/engine.io-parser/build/esm/decodePacket.browser.js
27454
-
27455
-
27456
- const decodePacket_browser_withNativeArrayBuffer = typeof ArrayBuffer === "function";
27457
- const decodePacket = (encodedPacket, binaryType) => {
27458
- if (typeof encodedPacket !== "string") {
27459
- return {
27460
- type: "message",
27461
- data: mapBinary(encodedPacket, binaryType)
27462
- };
27460
+ return BringgDashboardSDK.setConfigurations.apply(BringgDashboardSDK, __spreadArray([], __read(args), false));
27461
+ }
27462
+ exports.setConfigurations = setConfigurations;
27463
+ function initWithSessionCode() {
27464
+ var args = [];
27465
+ for (var _i = 0; _i < arguments.length; _i++) {
27466
+ args[_i] = arguments[_i];
27463
27467
  }
27464
- const type = encodedPacket.charAt(0);
27465
- if (type === "b") {
27466
- return {
27467
- type: "message",
27468
- data: decodeBase64Packet(encodedPacket.substring(1), binaryType)
27469
- };
27468
+ return BringgDashboardSDK.initWithSessionCode.apply(BringgDashboardSDK, __spreadArray([], __read(args), false));
27469
+ }
27470
+ exports.initWithSessionCode = initWithSessionCode;
27471
+ function initWithEmail() {
27472
+ var args = [];
27473
+ for (var _i = 0; _i < arguments.length; _i++) {
27474
+ args[_i] = arguments[_i];
27470
27475
  }
27471
- const packetType = PACKET_TYPES_REVERSE[type];
27472
- if (!packetType) {
27473
- return ERROR_PACKET;
27476
+ return BringgDashboardSDK.initWithEmail.apply(BringgDashboardSDK, __spreadArray([], __read(args), false));
27477
+ }
27478
+ exports.initWithEmail = initWithEmail;
27479
+ function initWithAuthToken() {
27480
+ var args = [];
27481
+ for (var _i = 0; _i < arguments.length; _i++) {
27482
+ args[_i] = arguments[_i];
27474
27483
  }
27475
- return encodedPacket.length > 1
27476
- ? {
27477
- type: PACKET_TYPES_REVERSE[type],
27478
- data: encodedPacket.substring(1)
27479
- }
27480
- : {
27481
- type: PACKET_TYPES_REVERSE[type]
27482
- };
27483
- };
27484
- const decodeBase64Packet = (data, binaryType) => {
27485
- if (decodePacket_browser_withNativeArrayBuffer) {
27486
- const decoded = decode(data);
27487
- return mapBinary(decoded, binaryType);
27484
+ return BringgDashboardSDK.initWithAuthToken.apply(BringgDashboardSDK, __spreadArray([], __read(args), false));
27485
+ }
27486
+ exports.initWithAuthToken = initWithAuthToken;
27487
+ function loginInternal() {
27488
+ var args = [];
27489
+ for (var _i = 0; _i < arguments.length; _i++) {
27490
+ args[_i] = arguments[_i];
27488
27491
  }
27489
- else {
27490
- return { base64: true, data }; // fallback for old browsers
27492
+ return BringgDashboardSDK.loginInternal.apply(BringgDashboardSDK, __spreadArray([], __read(args), false));
27493
+ }
27494
+ exports.loginInternal = loginInternal;
27495
+ function login() {
27496
+ var args = [];
27497
+ for (var _i = 0; _i < arguments.length; _i++) {
27498
+ args[_i] = arguments[_i];
27491
27499
  }
27492
- };
27493
- const mapBinary = (data, binaryType) => {
27494
- switch (binaryType) {
27495
- case "blob":
27496
- return data instanceof ArrayBuffer ? new Blob([data]) : data;
27497
- case "arraybuffer":
27498
- default:
27499
- return data; // assuming the data is already an ArrayBuffer
27500
+ return BringgDashboardSDK.login.apply(BringgDashboardSDK, __spreadArray([], __read(args), false));
27501
+ }
27502
+ exports.login = login;
27503
+ function resendConfirmationEmail() {
27504
+ var args = [];
27505
+ for (var _i = 0; _i < arguments.length; _i++) {
27506
+ args[_i] = arguments[_i];
27500
27507
  }
27501
- };
27502
- /* harmony default export */ var decodePacket_browser = (decodePacket);
27503
-
27504
- // CONCATENATED MODULE: ./node_modules/engine.io-parser/build/esm/index.js
27505
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return protocol; });
27506
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return encodePayload; });
27507
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return decodePayload; });
27508
- /* concated harmony reexport encodePacket */__webpack_require__.d(__webpack_exports__, "c", function() { return encodePacket_browser; });
27509
- /* concated harmony reexport decodePacket */__webpack_require__.d(__webpack_exports__, "a", function() { return decodePacket_browser; });
27510
-
27511
-
27512
- const SEPARATOR = String.fromCharCode(30); // see https://en.wikipedia.org/wiki/Delimiter#ASCII_delimited_text
27513
- const encodePayload = (packets, callback) => {
27514
- // some packets may be added to the array while encoding, so the initial length must be saved
27515
- const length = packets.length;
27516
- const encodedPackets = new Array(length);
27517
- let count = 0;
27518
- packets.forEach((packet, i) => {
27519
- // force base64 encoding for binary packets
27520
- encodePacket_browser(packet, false, encodedPacket => {
27521
- encodedPackets[i] = encodedPacket;
27522
- if (++count === length) {
27523
- callback(encodedPackets.join(SEPARATOR));
27524
- }
27525
- });
27508
+ return BringgDashboardSDK.resendConfirmationEmail.apply(BringgDashboardSDK, __spreadArray([], __read(args), false));
27509
+ }
27510
+ exports.resendConfirmationEmail = resendConfirmationEmail;
27511
+ function getConfigurationProvider() {
27512
+ return configurationProvider;
27513
+ }
27514
+ exports.getConfigurationProvider = getConfigurationProvider;
27515
+ function setConfigurationProvider(provider) {
27516
+ configurationProvider = provider;
27517
+ }
27518
+ exports.setConfigurationProvider = setConfigurationProvider;
27519
+ function setGlobals(bringgGlobals) {
27520
+ var withDefaults = bringgGlobals || { mobx: mobx };
27521
+ withDefaults.mobx = withDefaults.mobx || mobx;
27522
+ globals = withDefaults;
27523
+ }
27524
+ exports.setGlobals = setGlobals;
27525
+ function getGlobals() {
27526
+ return globals;
27527
+ }
27528
+ exports.getGlobals = getGlobals;
27529
+ function getEnvironment() {
27530
+ return environment;
27531
+ }
27532
+ exports.getEnvironment = getEnvironment;
27533
+ function setEnvironment(env) {
27534
+ environment = env;
27535
+ }
27536
+ exports.setEnvironment = setEnvironment;
27537
+ function getFullConfiguration() {
27538
+ return getConfigurationProvider().getFullConfig();
27539
+ }
27540
+ exports.getFullConfiguration = getFullConfiguration;
27541
+ function newConfigurationProvider(_a) {
27542
+ var config = _a.config, fallbackConfig = _a.fallbackConfig, clientId = _a.clientId, commonRegionConfigKeys = _a.commonRegionConfigKeys, specificRegionConfigkeys = _a.specificRegionConfigkeys, isLoadedFromEndpoint = _a.isLoadedFromEndpoint;
27543
+ return new ConfigurationProvider_1.ConfigurationProvider({
27544
+ config: config,
27545
+ fallbackConfig: fallbackConfig,
27546
+ clientId: clientId,
27547
+ commonRegionConfigKeys: commonRegionConfigKeys,
27548
+ specificRegionConfigkeys: specificRegionConfigkeys,
27549
+ isLoadedFromEndpoint: isLoadedFromEndpoint
27526
27550
  });
27527
- };
27528
- const decodePayload = (encodedPayload, binaryType) => {
27529
- const encodedPackets = encodedPayload.split(SEPARATOR);
27530
- const packets = [];
27531
- for (let i = 0; i < encodedPackets.length; i++) {
27532
- const decodedPacket = decodePacket_browser(encodedPackets[i], binaryType);
27533
- packets.push(decodedPacket);
27534
- if (decodedPacket.type === "error") {
27535
- break;
27536
- }
27537
- }
27538
- return packets;
27539
- };
27540
- const protocol = 4;
27541
-
27542
-
27551
+ }
27552
+ exports.newConfigurationProvider = newConfigurationProvider;
27553
+ //# sourceMappingURL=BringgDashboardSDK.js.map
27543
27554
 
27544
27555
  /***/ }),
27545
27556
  /* 51 */
@@ -27685,15 +27696,14 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
27685
27696
  }
27686
27697
  };
27687
27698
  Object.defineProperty(exports, "__esModule", { value: true });
27688
- var BringgDashboardSDK_1 = __webpack_require__(36);
27699
+ var BringgDashboardSDK_1 = __webpack_require__(50);
27689
27700
  var data_entity_1 = __webpack_require__(90);
27690
27701
  var StorableDataService = /** @class */ (function () {
27691
27702
  function StorableDataService(dataStore, mapper, extraDataStores) {
27692
27703
  var _this = this;
27693
27704
  this.dataStore = dataStore;
27694
27705
  this.extraDataStores = extraDataStores || [];
27695
- this.mapper =
27696
- mapper || (function (item) { return ({ current: item, previous: _this.dataStore.get(item.id) }); });
27706
+ this.mapper = mapper || (function (item) { return ({ current: item, diff: _this.dataStore.get(item.id) }); });
27697
27707
  }
27698
27708
  StorableDataService.prototype.loadAll = function (action, loadFunc, options) {
27699
27709
  if (options === void 0) { options = data_entity_1.DEFAULT_OPTIONS; }
@@ -28075,7 +28085,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
28075
28085
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
28076
28086
  };
28077
28087
  exports.__esModule = true;
28078
- __exportStar(__webpack_require__(41), exports);
28088
+ __exportStar(__webpack_require__(40), exports);
28079
28089
  __exportStar(__webpack_require__(555), exports);
28080
28090
  __exportStar(__webpack_require__(556), exports);
28081
28091
  __exportStar(__webpack_require__(557), exports);
@@ -28251,7 +28261,7 @@ module.exports = baseGetTag;
28251
28261
  "use strict";
28252
28262
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return of; });
28253
28263
  /* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(14);
28254
- /* harmony import */ var _fromArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(46);
28264
+ /* harmony import */ var _fromArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(45);
28255
28265
  /* harmony import */ var _scheduled_scheduleArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(82);
28256
28266
  /** PURE_IMPORTS_START _util_isScheduler,_fromArray,_scheduled_scheduleArray PURE_IMPORTS_END */
28257
28267
 
@@ -28985,7 +28995,7 @@ exports.default = { build: build };
28985
28995
  /* 70 */
28986
28996
  /***/ (function(module, exports, __webpack_require__) {
28987
28997
 
28988
- var root = __webpack_require__(42);
28998
+ var root = __webpack_require__(41);
28989
28999
 
28990
29000
  /** Built-in value references. */
28991
29001
  var Symbol = root.Symbol;
@@ -29049,7 +29059,7 @@ module.exports = keys;
29049
29059
  /* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(10);
29050
29060
  /* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(6);
29051
29061
  /* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(5);
29052
- /* harmony import */ var _fromArray__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(46);
29062
+ /* harmony import */ var _fromArray__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(45);
29053
29063
  /** PURE_IMPORTS_START tslib,_util_isScheduler,_util_isArray,_OuterSubscriber,_util_subscribeToResult,_fromArray PURE_IMPORTS_END */
29054
29064
 
29055
29065
 
@@ -29159,7 +29169,7 @@ var CombineLatestSubscriber = /*@__PURE__*/ (function (_super) {
29159
29169
 
29160
29170
  "use strict";
29161
29171
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return mergeAll; });
29162
- /* harmony import */ var _mergeMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(37);
29172
+ /* harmony import */ var _mergeMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
29163
29173
  /* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(28);
29164
29174
  /** PURE_IMPORTS_START _mergeMap,_util_identity PURE_IMPORTS_END */
29165
29175
 
@@ -29436,7 +29446,7 @@ function defer(observableFactory) {
29436
29446
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ZipOperator; });
29437
29447
  /* unused harmony export ZipSubscriber */
29438
29448
  /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
29439
- /* harmony import */ var _fromArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(46);
29449
+ /* harmony import */ var _fromArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(45);
29440
29450
  /* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(10);
29441
29451
  /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(2);
29442
29452
  /* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(6);
@@ -29668,7 +29678,7 @@ var ZipBufferIterator = /*@__PURE__*/ (function (_super) {
29668
29678
 
29669
29679
  "use strict";
29670
29680
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Transport; });
29671
- /* harmony import */ var engine_io_parser__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(50);
29681
+ /* harmony import */ var engine_io_parser__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(49);
29672
29682
  /* harmony import */ var _socket_io_component_emitter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(32);
29673
29683
  /* harmony import */ var _util_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(33);
29674
29684
 
@@ -29941,7 +29951,7 @@ var TestTools = {
29941
29951
  //# sourceMappingURL=Immediate.js.map
29942
29952
 
29943
29953
  // EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/scheduler/AsyncAction.js + 1 modules
29944
- var AsyncAction = __webpack_require__(48);
29954
+ var AsyncAction = __webpack_require__(47);
29945
29955
 
29946
29956
  // CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/scheduler/AsapAction.js
29947
29957
  /** PURE_IMPORTS_START tslib,_util_Immediate,_AsyncAction PURE_IMPORTS_END */
@@ -29985,7 +29995,7 @@ var AsapAction_AsapAction = /*@__PURE__*/ (function (_super) {
29985
29995
  //# sourceMappingURL=AsapAction.js.map
29986
29996
 
29987
29997
  // EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/scheduler/AsyncScheduler.js
29988
- var AsyncScheduler = __webpack_require__(45);
29998
+ var AsyncScheduler = __webpack_require__(44);
29989
29999
 
29990
30000
  // CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/scheduler/AsapScheduler.js
29991
30001
  /** PURE_IMPORTS_START tslib,_AsyncScheduler PURE_IMPORTS_END */
@@ -31304,7 +31314,7 @@ function concat_concat() {
31304
31314
  var concatAll = __webpack_require__(118);
31305
31315
 
31306
31316
  // EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/operators/mergeMap.js
31307
- var mergeMap = __webpack_require__(37);
31317
+ var mergeMap = __webpack_require__(36);
31308
31318
 
31309
31319
  // CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/operators/concatMap.js
31310
31320
  /** PURE_IMPORTS_START _mergeMap PURE_IMPORTS_END */
@@ -31972,13 +31982,13 @@ function distinctUntilKeyChanged(key, compare) {
31972
31982
  //# sourceMappingURL=distinctUntilKeyChanged.js.map
31973
31983
 
31974
31984
  // EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/util/ArgumentOutOfRangeError.js
31975
- var ArgumentOutOfRangeError = __webpack_require__(38);
31985
+ var ArgumentOutOfRangeError = __webpack_require__(37);
31976
31986
 
31977
31987
  // EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/operators/filter.js
31978
31988
  var filter = __webpack_require__(23);
31979
31989
 
31980
31990
  // EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/util/EmptyError.js
31981
- var EmptyError = __webpack_require__(44);
31991
+ var EmptyError = __webpack_require__(43);
31982
31992
 
31983
31993
  // CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/operators/throwIfEmpty.js
31984
31994
  /** PURE_IMPORTS_START tslib,_util_EmptyError,_Subscriber PURE_IMPORTS_END */
@@ -33247,7 +33257,7 @@ function publishBehavior(value) {
33247
33257
  //# sourceMappingURL=publishBehavior.js.map
33248
33258
 
33249
33259
  // EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/AsyncSubject.js
33250
- var AsyncSubject = __webpack_require__(47);
33260
+ var AsyncSubject = __webpack_require__(46);
33251
33261
 
33252
33262
  // CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/operators/publishLast.js
33253
33263
  /** PURE_IMPORTS_START _AsyncSubject,_multicast PURE_IMPORTS_END */
@@ -34115,7 +34125,7 @@ function startWith() {
34115
34125
  var asap = __webpack_require__(84);
34116
34126
 
34117
34127
  // EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/util/isNumeric.js
34118
- var isNumeric = __webpack_require__(49);
34128
+ var isNumeric = __webpack_require__(48);
34119
34129
 
34120
34130
  // CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/observable/SubscribeOnObservable.js
34121
34131
  /** PURE_IMPORTS_START tslib,_Observable,_scheduler_asap,_util_isNumeric PURE_IMPORTS_END */
@@ -34394,7 +34404,7 @@ var takeWhile_TakeWhileSubscriber = /*@__PURE__*/ (function (_super) {
34394
34404
  var noop = __webpack_require__(22);
34395
34405
 
34396
34406
  // EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/util/isFunction.js
34397
- var isFunction = __webpack_require__(39);
34407
+ var isFunction = __webpack_require__(38);
34398
34408
 
34399
34409
  // CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/operators/tap.js
34400
34410
  /** PURE_IMPORTS_START tslib,_Subscriber,_util_noop,_util_isFunction PURE_IMPORTS_END */
@@ -35772,7 +35782,7 @@ var lodash_1 = __webpack_require__(11);
35772
35782
  var BringgException_1 = __webpack_require__(15);
35773
35783
  var Logger_1 = __webpack_require__(51);
35774
35784
  var abort_1 = __webpack_require__(173);
35775
- var version = '6.0.2';
35785
+ var version = '6.0.3-pre.2';
35776
35786
  function logErrorResponse(response) {
35777
35787
  var data = response.data, status = response.status;
35778
35788
  try {
@@ -36769,7 +36779,7 @@ var BehaviorSubject = __webpack_require__(122);
36769
36779
  var ReplaySubject = __webpack_require__(76);
36770
36780
 
36771
36781
  // EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/AsyncSubject.js
36772
- var AsyncSubject = __webpack_require__(47);
36782
+ var AsyncSubject = __webpack_require__(46);
36773
36783
 
36774
36784
  // EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/scheduler/asap.js + 3 modules
36775
36785
  var asap = __webpack_require__(84);
@@ -36784,7 +36794,7 @@ var queue = __webpack_require__(126);
36784
36794
  var tslib_es6 = __webpack_require__(0);
36785
36795
 
36786
36796
  // EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/scheduler/AsyncAction.js + 1 modules
36787
- var AsyncAction = __webpack_require__(48);
36797
+ var AsyncAction = __webpack_require__(47);
36788
36798
 
36789
36799
  // CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/scheduler/AnimationFrameAction.js
36790
36800
  /** PURE_IMPORTS_START tslib,_AsyncAction PURE_IMPORTS_END */
@@ -36827,7 +36837,7 @@ var AnimationFrameAction_AnimationFrameAction = /*@__PURE__*/ (function (_super)
36827
36837
  //# sourceMappingURL=AnimationFrameAction.js.map
36828
36838
 
36829
36839
  // EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/scheduler/AsyncScheduler.js
36830
- var AsyncScheduler = __webpack_require__(45);
36840
+ var AsyncScheduler = __webpack_require__(44);
36831
36841
 
36832
36842
  // CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/scheduler/AnimationFrameScheduler.js
36833
36843
  /** PURE_IMPORTS_START tslib,_AsyncScheduler PURE_IMPORTS_END */
@@ -37013,10 +37023,10 @@ function isObservable(obj) {
37013
37023
  //# sourceMappingURL=isObservable.js.map
37014
37024
 
37015
37025
  // EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/util/ArgumentOutOfRangeError.js
37016
- var ArgumentOutOfRangeError = __webpack_require__(38);
37026
+ var ArgumentOutOfRangeError = __webpack_require__(37);
37017
37027
 
37018
37028
  // EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/util/EmptyError.js
37019
- var EmptyError = __webpack_require__(44);
37029
+ var EmptyError = __webpack_require__(43);
37020
37030
 
37021
37031
  // EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/util/ObjectUnsubscribedError.js
37022
37032
  var ObjectUnsubscribedError = __webpack_require__(34);
@@ -37351,7 +37361,7 @@ function forkJoinInternal(sources, keys) {
37351
37361
  //# sourceMappingURL=forkJoin.js.map
37352
37362
 
37353
37363
  // EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/util/isFunction.js
37354
- var isFunction = __webpack_require__(39);
37364
+ var isFunction = __webpack_require__(38);
37355
37365
 
37356
37366
  // CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/observable/fromEvent.js
37357
37367
  /** PURE_IMPORTS_START _Observable,_util_isArray,_util_isFunction,_operators_map PURE_IMPORTS_END */
@@ -37595,7 +37605,7 @@ function iif(condition, trueResult, falseResult) {
37595
37605
  //# sourceMappingURL=iif.js.map
37596
37606
 
37597
37607
  // EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/util/isNumeric.js
37598
- var isNumeric = __webpack_require__(49);
37608
+ var isNumeric = __webpack_require__(48);
37599
37609
 
37600
37610
  // CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/observable/interval.js
37601
37611
  /** PURE_IMPORTS_START _Observable,_scheduler_async,_util_isNumeric PURE_IMPORTS_END */
@@ -37964,7 +37974,7 @@ var config = __webpack_require__(20);
37964
37974
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return timer; });
37965
37975
  /* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3);
37966
37976
  /* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(12);
37967
- /* harmony import */ var _util_isNumeric__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(49);
37977
+ /* harmony import */ var _util_isNumeric__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(48);
37968
37978
  /* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(14);
37969
37979
  /** PURE_IMPORTS_START _Observable,_scheduler_async,_util_isNumeric,_util_isScheduler PURE_IMPORTS_END */
37970
37980
 
@@ -38033,7 +38043,7 @@ function concatAll() {
38033
38043
  /* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3);
38034
38044
  /* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(14);
38035
38045
  /* harmony import */ var _operators_mergeAll__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(73);
38036
- /* harmony import */ var _fromArray__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(46);
38046
+ /* harmony import */ var _fromArray__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(45);
38037
38047
  /** PURE_IMPORTS_START _Observable,_util_isScheduler,_operators_mergeAll,_fromArray PURE_IMPORTS_END */
38038
38048
 
38039
38049
 
@@ -38368,7 +38378,7 @@ var BehaviorSubject = /*@__PURE__*/ (function (_super) {
38368
38378
  /* unused harmony export RaceSubscriber */
38369
38379
  /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
38370
38380
  /* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(10);
38371
- /* harmony import */ var _fromArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(46);
38381
+ /* harmony import */ var _fromArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(45);
38372
38382
  /* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(6);
38373
38383
  /* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(5);
38374
38384
  /** PURE_IMPORTS_START tslib,_util_isArray,_fromArray,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
@@ -38647,7 +38657,7 @@ function scheduled(input, scheduler) {
38647
38657
  var tslib_es6 = __webpack_require__(0);
38648
38658
 
38649
38659
  // EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/scheduler/AsyncAction.js + 1 modules
38650
- var AsyncAction = __webpack_require__(48);
38660
+ var AsyncAction = __webpack_require__(47);
38651
38661
 
38652
38662
  // CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/scheduler/QueueAction.js
38653
38663
  /** PURE_IMPORTS_START tslib,_AsyncAction PURE_IMPORTS_END */
@@ -38693,7 +38703,7 @@ var QueueAction_QueueAction = /*@__PURE__*/ (function (_super) {
38693
38703
  //# sourceMappingURL=QueueAction.js.map
38694
38704
 
38695
38705
  // EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/scheduler/AsyncScheduler.js
38696
- var AsyncScheduler = __webpack_require__(45);
38706
+ var AsyncScheduler = __webpack_require__(44);
38697
38707
 
38698
38708
  // CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/scheduler/QueueScheduler.js
38699
38709
  /** PURE_IMPORTS_START tslib,_AsyncScheduler PURE_IMPORTS_END */
@@ -39324,14 +39334,12 @@ exports.$$rxSubscriber = exports.rxSubscriber;
39324
39334
 
39325
39335
  Object.defineProperty(exports, "__esModule", { value: true });
39326
39336
  exports.mergeMapper = void 0;
39327
- var BringgDashboardSDK_1 = __webpack_require__(36);
39328
39337
  var object_merger_1 = __webpack_require__(180);
39329
39338
  function mergeIntoExisting(dataStore, item) {
39330
39339
  var existing = dataStore.get(item.id);
39331
39340
  if (existing) {
39332
- var previous = (0, BringgDashboardSDK_1.getGlobals)().mobx.toJS(existing);
39333
- object_merger_1.objectMerger.deepMerge(existing, item);
39334
- return { current: existing, previous: previous };
39341
+ var diff = object_merger_1.objectMerger.deepMerge(existing, item);
39342
+ return { current: existing, diff: diff };
39335
39343
  }
39336
39344
  return { current: item };
39337
39345
  }
@@ -39441,7 +39449,7 @@ module.exports = Stack;
39441
39449
  /***/ (function(module, exports, __webpack_require__) {
39442
39450
 
39443
39451
  var getNative = __webpack_require__(60),
39444
- root = __webpack_require__(42);
39452
+ root = __webpack_require__(41);
39445
39453
 
39446
39454
  /* Built-in method references that are verified to be native. */
39447
39455
  var Map = getNative(root, 'Map');
@@ -39523,7 +39531,7 @@ module.exports = baseAssignValue;
39523
39531
  /***/ (function(module, exports, __webpack_require__) {
39524
39532
 
39525
39533
  var baseIsArguments = __webpack_require__(787),
39526
- isObjectLike = __webpack_require__(43);
39534
+ isObjectLike = __webpack_require__(42);
39527
39535
 
39528
39536
  /** Used for built-in method references. */
39529
39537
  var objectProto = Object.prototype;
@@ -39564,7 +39572,7 @@ module.exports = isArguments;
39564
39572
  /* 145 */
39565
39573
  /***/ (function(module, exports, __webpack_require__) {
39566
39574
 
39567
- /* WEBPACK VAR INJECTION */(function(module) {var root = __webpack_require__(42),
39575
+ /* WEBPACK VAR INJECTION */(function(module) {var root = __webpack_require__(41),
39568
39576
  stubFalse = __webpack_require__(788);
39569
39577
 
39570
39578
  /** Detect free variable `exports`. */
@@ -39956,7 +39964,7 @@ module.exports = isKey;
39956
39964
  /***/ (function(module, exports, __webpack_require__) {
39957
39965
 
39958
39966
  var baseGetTag = __webpack_require__(57),
39959
- isObjectLike = __webpack_require__(43);
39967
+ isObjectLike = __webpack_require__(42);
39960
39968
 
39961
39969
  /** `Object#toString` result references. */
39962
39970
  var symbolTag = '[object Symbol]';
@@ -40962,7 +40970,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
40962
40970
  };
40963
40971
  Object.defineProperty(exports, "__esModule", { value: true });
40964
40972
  exports.ConfigurationProvider = void 0;
40965
- var BringgDashboardSDK_1 = __webpack_require__(36);
40973
+ var BringgDashboardSDK_1 = __webpack_require__(50);
40966
40974
  var URLEndpoint_1 = __webpack_require__(89);
40967
40975
  var Logger_1 = __webpack_require__(51);
40968
40976
  var ConfigurationProvider = /** @class */ (function () {
@@ -41134,21 +41142,34 @@ var __values = (this && this.__values) || function(o) {
41134
41142
  Object.defineProperty(exports, "__esModule", { value: true });
41135
41143
  exports.objectMerger = void 0;
41136
41144
  function deepMerge(target, source) {
41145
+ var diff = {};
41146
+ innerDeepMerge(target, source, diff);
41147
+ return diff;
41148
+ }
41149
+ function innerDeepMerge(target, source, diff) {
41137
41150
  var e_1, _a, e_2, _b;
41138
41151
  try {
41139
41152
  for (var _c = __values(Object.keys(source)), _d = _c.next(); !_d.done; _d = _c.next()) {
41140
41153
  var key = _d.value;
41141
41154
  if (Array.isArray(source[key])) {
41142
41155
  target[key] = target[key] || [];
41156
+ diff[key] = diff[key] || [];
41143
41157
  var targetItems = [];
41158
+ var sourceItemIndex = 0;
41144
41159
  var _loop_1 = function (sourceItem) {
41145
41160
  var targetItem = sourceItem;
41161
+ var targetItemIndex = target[key].findIndex(function (item) { return compare(item, sourceItem); });
41146
41162
  if (sourceItem && typeof sourceItem === 'object') {
41147
- var targetItemIndex = target[key].findIndex(function (item) { return compare(item, sourceItem); });
41148
41163
  targetItem = targetItemIndex > -1 ? target[key][targetItemIndex] : {};
41149
- deepMerge(targetItem, sourceItem);
41164
+ var diffItem = {};
41165
+ innerDeepMerge(targetItem, sourceItem, diffItem);
41166
+ diff[key].push(targetItemIndex === sourceItemIndex ? diffItem : targetItem);
41167
+ }
41168
+ else {
41169
+ diff[key].push(targetItemIndex === sourceItemIndex ? null : targetItem);
41150
41170
  }
41151
41171
  targetItems.push(targetItem);
41172
+ sourceItemIndex++;
41152
41173
  };
41153
41174
  try {
41154
41175
  for (var _e = (e_2 = void 0, __values(source[key])), _f = _e.next(); !_f.done; _f = _e.next()) {
@@ -41167,9 +41188,13 @@ function deepMerge(target, source) {
41167
41188
  }
41168
41189
  else if (source[key] && typeof source[key] === 'object') {
41169
41190
  target[key] = target[key] || {};
41170
- deepMerge(target[key], source[key]);
41191
+ diff[key] = diff[key] || {};
41192
+ innerDeepMerge(target[key], source[key], diff[key]);
41171
41193
  }
41172
41194
  else {
41195
+ if (source[key] !== target[key]) {
41196
+ diff[key] = target[key];
41197
+ }
41173
41198
  target[key] = source[key];
41174
41199
  }
41175
41200
  }
@@ -41327,7 +41352,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
41327
41352
  };
41328
41353
  Object.defineProperty(exports, "__esModule", { value: true });
41329
41354
  exports.ExclusionWindowApi = void 0;
41330
- var data_store_1 = __webpack_require__(40);
41355
+ var data_store_1 = __webpack_require__(39);
41331
41356
  var storable_api_builder_1 = __webpack_require__(69);
41332
41357
  var storable_data_service_1 = __webpack_require__(52);
41333
41358
  var exclusion_window_consts_1 = __webpack_require__(185);
@@ -41472,7 +41497,7 @@ exports.defaultExtractor = defaultExtractor;
41472
41497
  "use strict";
41473
41498
 
41474
41499
  Object.defineProperty(exports, "__esModule", { value: true });
41475
- var data_store_1 = __webpack_require__(40);
41500
+ var data_store_1 = __webpack_require__(39);
41476
41501
  var storable_api_builder_1 = __webpack_require__(69);
41477
41502
  var storable_data_service_1 = __webpack_require__(52);
41478
41503
  var planned_delivery_windows_consts_1 = __webpack_require__(191);
@@ -42065,7 +42090,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
42065
42090
  }
42066
42091
  };
42067
42092
  Object.defineProperty(exports, "__esModule", { value: true });
42068
- var data_store_1 = __webpack_require__(40);
42093
+ var data_store_1 = __webpack_require__(39);
42069
42094
  var realtime_subscriptions_1 = __webpack_require__(91);
42070
42095
  var runs_consts_1 = __webpack_require__(92);
42071
42096
  var runs_service_1 = __webpack_require__(193);
@@ -42190,7 +42215,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
42190
42215
  Object.defineProperty(exports, "__esModule", { value: true });
42191
42216
  exports.ServiceAreaApi = void 0;
42192
42217
  var data_entity_1 = __webpack_require__(90);
42193
- var data_store_1 = __webpack_require__(40);
42218
+ var data_store_1 = __webpack_require__(39);
42194
42219
  var storable_api_builder_1 = __webpack_require__(69);
42195
42220
  var storable_data_service_1 = __webpack_require__(52);
42196
42221
  var service_area_consts_1 = __webpack_require__(196);
@@ -42336,7 +42361,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
42336
42361
  exports.RESEND_CONFIRMATION_EMAIL_ROUTE = exports.UNWIND_ROUTE = exports.IMPERSONATE_BY_TEAM_ROUTE = exports.IMPERSONATE_ROUTE = exports.SWITCH_ROUTE = exports.LOGOUT_ROUTE = exports.GET_USER_ROUTE = exports.CREATE_TOKEN_ROUTE = void 0;
42337
42362
  var lodash_1 = __webpack_require__(11);
42338
42363
  var sha1 = __webpack_require__(725);
42339
- var BringgDashboardSDK_1 = __webpack_require__(36);
42364
+ var BringgDashboardSDK_1 = __webpack_require__(50);
42340
42365
  var BringgException_1 = __webpack_require__(15);
42341
42366
  var ExceptionReason_1 = __webpack_require__(59);
42342
42367
  var Enums_1 = __webpack_require__(67);
@@ -44663,7 +44688,7 @@ var types_1 = __webpack_require__(56);
44663
44688
  var light_data_store_1 = __webpack_require__(203);
44664
44689
  var merge_mapper_1 = __webpack_require__(137);
44665
44690
  var data_entity_1 = __webpack_require__(90);
44666
- var data_store_1 = __webpack_require__(40);
44691
+ var data_store_1 = __webpack_require__(39);
44667
44692
  var storable_data_service_1 = __webpack_require__(52);
44668
44693
  var keyset_pagination_consts_1 = __webpack_require__(106);
44669
44694
  var Tasks_consts_1 = __webpack_require__(55);
@@ -45494,7 +45519,7 @@ module.exports = baseGetAllKeys;
45494
45519
  /* 218 */
45495
45520
  /***/ (function(module, exports, __webpack_require__) {
45496
45521
 
45497
- var root = __webpack_require__(42);
45522
+ var root = __webpack_require__(41);
45498
45523
 
45499
45524
  /** Built-in value references. */
45500
45525
  var Uint8Array = root.Uint8Array;
@@ -45544,7 +45569,7 @@ module.exports = baseIteratee;
45544
45569
  /***/ (function(module, exports, __webpack_require__) {
45545
45570
 
45546
45571
  var baseIsEqualDeep = __webpack_require__(822),
45547
- isObjectLike = __webpack_require__(43);
45572
+ isObjectLike = __webpack_require__(42);
45548
45573
 
45549
45574
  /**
45550
45575
  * The base implementation of `_.isEqual` which supports partial comparisons
@@ -60960,7 +60985,7 @@ module.exports = isIterateeCall;
60960
60985
  /***/ (function(module, exports, __webpack_require__) {
60961
60986
 
60962
60987
  var baseGetTag = __webpack_require__(57),
60963
- isObjectLike = __webpack_require__(43),
60988
+ isObjectLike = __webpack_require__(42),
60964
60989
  isPlainObject = __webpack_require__(865);
60965
60990
 
60966
60991
  /** `Object#toString` result references. */
@@ -61283,7 +61308,7 @@ __exportStar(__webpack_require__(899), exports);
61283
61308
  "use strict";
61284
61309
 
61285
61310
  Object.defineProperty(exports, "__esModule", { value: true });
61286
- var data_store_1 = __webpack_require__(40);
61311
+ var data_store_1 = __webpack_require__(39);
61287
61312
  var storable_api_builder_1 = __webpack_require__(69);
61288
61313
  var storable_data_service_1 = __webpack_require__(52);
61289
61314
  var task_reject_reasons_service_1 = __webpack_require__(900);
@@ -61535,7 +61560,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
61535
61560
  }
61536
61561
  };
61537
61562
  Object.defineProperty(exports, "__esModule", { value: true });
61538
- var data_store_1 = __webpack_require__(40);
61563
+ var data_store_1 = __webpack_require__(39);
61539
61564
  var realtime_subscriptions_1 = __webpack_require__(91);
61540
61565
  var storable_api_builder_1 = __webpack_require__(69);
61541
61566
  var storable_data_service_1 = __webpack_require__(52);
@@ -61853,7 +61878,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
61853
61878
  }
61854
61879
  };
61855
61880
  Object.defineProperty(exports, "__esModule", { value: true });
61856
- var data_store_1 = __webpack_require__(40);
61881
+ var data_store_1 = __webpack_require__(39);
61857
61882
  var storable_api_builder_1 = __webpack_require__(69);
61858
61883
  var storable_data_service_1 = __webpack_require__(52);
61859
61884
  var workflows_service_1 = __webpack_require__(941);
@@ -61924,7 +61949,7 @@ exports.default = WorkflowsApi;
61924
61949
  /* harmony import */ var _contrib_yeast_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(132);
61925
61950
  /* harmony import */ var _util_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(33);
61926
61951
  /* harmony import */ var _websocket_constructor_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(35);
61927
- /* harmony import */ var engine_io_parser__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(50);
61952
+ /* harmony import */ var engine_io_parser__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(49);
61928
61953
 
61929
61954
 
61930
61955
 
@@ -62117,8 +62142,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
62117
62142
  };
62118
62143
  Object.defineProperty(exports, "__esModule", { value: true });
62119
62144
  exports.WorkflowsApi = exports.VehicleTypeConsts = exports.VehicleCategoryConsts = exports.VehicleGroup = exports.VehiclesApi = exports.AbortUtils = exports.UploadApi = exports.UploadConsts = exports.TaskRejectReasonsApi = exports.TaskInventoryConsts = exports.TasksApi = exports.TaskGroupValues = exports.TaskGroupTypes = exports.TagConsts = exports.ServiceAreaApi = exports.ServiceAreaFilterGroups = exports.RunsApi = exports.RunStatus = exports.RunConsts = exports.ResourceUploadType = exports.ReasonToChangeInventory = exports.PlannedRoutesConsts = exports.PlannedDeliveryWindowsApi = exports.RecurrenceType = exports.PlannedDeliveryWindowsFilterGroups = exports.NotificationTypesConsts = exports.NotificationTemplateConsts = exports.LookupConsts = exports.LanguageConsts = exports.ExclusionWindowApiV2 = exports.ExclusionWindowsFilterGroups = exports.DeliveryWindowsApi = exports.DeliveryBlockConsts = exports.DashboardConsts = exports.CrewConsts = exports.Responses = exports.ChatMessageConsts = exports.ChatConversationConsts = exports.BringgDashboardSDK = void 0;
62120
- __exportStar(__webpack_require__(36), exports);
62121
- var BringgDashboardSDK_1 = __webpack_require__(36);
62145
+ __exportStar(__webpack_require__(50), exports);
62146
+ var BringgDashboardSDK_1 = __webpack_require__(50);
62122
62147
  Object.defineProperty(exports, "BringgDashboardSDK", { enumerable: true, get: function () { return BringgDashboardSDK_1.BringgDashboardSDK; } });
62123
62148
  exports.ChatConversationConsts = __webpack_require__(178);
62124
62149
  exports.ChatMessageConsts = __webpack_require__(177);
@@ -72760,7 +72785,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
72760
72785
  var _ = __webpack_require__(11);
72761
72786
  var merge_mapper_1 = __webpack_require__(137);
72762
72787
  var data_entity_1 = __webpack_require__(90);
72763
- var data_store_1 = __webpack_require__(40);
72788
+ var data_store_1 = __webpack_require__(39);
72764
72789
  var realtime_subscriptions_1 = __webpack_require__(91);
72765
72790
  var storable_data_service_1 = __webpack_require__(52);
72766
72791
  var array_utils_1 = __webpack_require__(181);
@@ -74891,7 +74916,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
74891
74916
  };
74892
74917
  Object.defineProperty(exports, "__esModule", { value: true });
74893
74918
  exports.ROUTES = exports.defaultExtractor = void 0;
74894
- var BringgDashboardSDK_1 = __webpack_require__(36);
74919
+ var BringgDashboardSDK_1 = __webpack_require__(50);
74895
74920
  var BringgException_1 = __webpack_require__(15);
74896
74921
  var URLEndpoint_1 = __webpack_require__(89);
74897
74922
  var AnonymousRequestService_1 = __webpack_require__(466);
@@ -85907,7 +85932,7 @@ __exportStar(__webpack_require__(715), exports);
85907
85932
  "use strict";
85908
85933
 
85909
85934
  exports.__esModule = true;
85910
- var action_1 = __webpack_require__(41);
85935
+ var action_1 = __webpack_require__(40);
85911
85936
  //# sourceMappingURL=alert-action-types.js.map
85912
85937
 
85913
85938
  /***/ }),
@@ -85967,7 +85992,7 @@ var Views;
85967
85992
  "use strict";
85968
85993
 
85969
85994
  exports.__esModule = true;
85970
- var action_1 = __webpack_require__(41);
85995
+ var action_1 = __webpack_require__(40);
85971
85996
  //# sourceMappingURL=calculate_availability_state_types.js.map
85972
85997
 
85973
85998
  /***/ }),
@@ -85977,7 +86002,7 @@ var action_1 = __webpack_require__(41);
85977
86002
  "use strict";
85978
86003
 
85979
86004
  exports.__esModule = true;
85980
- var action_1 = __webpack_require__(41);
86005
+ var action_1 = __webpack_require__(40);
85981
86006
  //# sourceMappingURL=cancel_task_types.js.map
85982
86007
 
85983
86008
  /***/ }),
@@ -85987,7 +86012,7 @@ var action_1 = __webpack_require__(41);
85987
86012
  "use strict";
85988
86013
 
85989
86014
  exports.__esModule = true;
85990
- var action_1 = __webpack_require__(41);
86015
+ var action_1 = __webpack_require__(40);
85991
86016
  //# sourceMappingURL=generic-action-types.js.map
85992
86017
 
85993
86018
  /***/ }),
@@ -85997,7 +86022,7 @@ var action_1 = __webpack_require__(41);
85997
86022
  "use strict";
85998
86023
 
85999
86024
  exports.__esModule = true;
86000
- var action_1 = __webpack_require__(41);
86025
+ var action_1 = __webpack_require__(40);
86001
86026
  //# sourceMappingURL=lean_copy_types.js.map
86002
86027
 
86003
86028
  /***/ }),
@@ -86007,7 +86032,7 @@ var action_1 = __webpack_require__(41);
86007
86032
  "use strict";
86008
86033
 
86009
86034
  exports.__esModule = true;
86010
- var action_1 = __webpack_require__(41);
86035
+ var action_1 = __webpack_require__(40);
86011
86036
  //# sourceMappingURL=narrow_actionable_wp_types.js.map
86012
86037
 
86013
86038
  /***/ }),
@@ -86017,7 +86042,7 @@ var action_1 = __webpack_require__(41);
86017
86042
  "use strict";
86018
86043
 
86019
86044
  exports.__esModule = true;
86020
- var action_1 = __webpack_require__(41);
86045
+ var action_1 = __webpack_require__(40);
86021
86046
  //# sourceMappingURL=optimization_types.js.map
86022
86047
 
86023
86048
  /***/ }),
@@ -86122,7 +86147,7 @@ var DisplayFact;
86122
86147
  "use strict";
86123
86148
 
86124
86149
  exports.__esModule = true;
86125
- var action_1 = __webpack_require__(41);
86150
+ var action_1 = __webpack_require__(40);
86126
86151
  //# sourceMappingURL=share_location_types.js.map
86127
86152
 
86128
86153
  /***/ }),
@@ -86133,7 +86158,7 @@ var action_1 = __webpack_require__(41);
86133
86158
 
86134
86159
  exports.__esModule = true;
86135
86160
  exports.MathOperator = exports.ChangeType = void 0;
86136
- var action_1 = __webpack_require__(41);
86161
+ var action_1 = __webpack_require__(40);
86137
86162
  var ChangeType;
86138
86163
  (function (ChangeType) {
86139
86164
  ChangeType["SPECIFIC_VALUE"] = "specific";
@@ -87405,7 +87430,7 @@ var __values = (this && this.__values) || function(o) {
87405
87430
  };
87406
87431
  Object.defineProperty(exports, "__esModule", { value: true });
87407
87432
  var deepmerge = __webpack_require__(732);
87408
- var BringgDashboardSDK_1 = __webpack_require__(36);
87433
+ var BringgDashboardSDK_1 = __webpack_require__(50);
87409
87434
  var BringgDashboardSDK_consts_1 = __webpack_require__(733);
87410
87435
  var ConfigurationProvider_1 = __webpack_require__(179);
87411
87436
  var Enums_1 = __webpack_require__(67);
@@ -90529,7 +90554,7 @@ module.exports = isMasked;
90529
90554
  /* 770 */
90530
90555
  /***/ (function(module, exports, __webpack_require__) {
90531
90556
 
90532
- var root = __webpack_require__(42);
90557
+ var root = __webpack_require__(41);
90533
90558
 
90534
90559
  /** Used to detect overreaching core-js shims. */
90535
90560
  var coreJsData = root['__core-js_shared__'];
@@ -90958,7 +90983,7 @@ module.exports = baseTimes;
90958
90983
  /***/ (function(module, exports, __webpack_require__) {
90959
90984
 
90960
90985
  var baseGetTag = __webpack_require__(57),
90961
- isObjectLike = __webpack_require__(43);
90986
+ isObjectLike = __webpack_require__(42);
90962
90987
 
90963
90988
  /** `Object#toString` result references. */
90964
90989
  var argsTag = '[object Arguments]';
@@ -91007,7 +91032,7 @@ module.exports = stubFalse;
91007
91032
 
91008
91033
  var baseGetTag = __webpack_require__(57),
91009
91034
  isLength = __webpack_require__(147),
91010
- isObjectLike = __webpack_require__(43);
91035
+ isObjectLike = __webpack_require__(42);
91011
91036
 
91012
91037
  /** `Object#toString` result references. */
91013
91038
  var argsTag = '[object Arguments]',
@@ -91207,7 +91232,7 @@ module.exports = nativeKeysIn;
91207
91232
  /* 795 */
91208
91233
  /***/ (function(module, exports, __webpack_require__) {
91209
91234
 
91210
- /* WEBPACK VAR INJECTION */(function(module) {var root = __webpack_require__(42);
91235
+ /* WEBPACK VAR INJECTION */(function(module) {var root = __webpack_require__(41);
91211
91236
 
91212
91237
  /** Detect free variable `exports`. */
91213
91238
  var freeExports = true && exports && !exports.nodeType && exports;
@@ -91374,7 +91399,7 @@ module.exports = getAllKeysIn;
91374
91399
  /***/ (function(module, exports, __webpack_require__) {
91375
91400
 
91376
91401
  var getNative = __webpack_require__(60),
91377
- root = __webpack_require__(42);
91402
+ root = __webpack_require__(41);
91378
91403
 
91379
91404
  /* Built-in method references that are verified to be native. */
91380
91405
  var DataView = getNative(root, 'DataView');
@@ -91387,7 +91412,7 @@ module.exports = DataView;
91387
91412
  /***/ (function(module, exports, __webpack_require__) {
91388
91413
 
91389
91414
  var getNative = __webpack_require__(60),
91390
- root = __webpack_require__(42);
91415
+ root = __webpack_require__(41);
91391
91416
 
91392
91417
  /* Built-in method references that are verified to be native. */
91393
91418
  var Promise = getNative(root, 'Promise');
@@ -91400,7 +91425,7 @@ module.exports = Promise;
91400
91425
  /***/ (function(module, exports, __webpack_require__) {
91401
91426
 
91402
91427
  var getNative = __webpack_require__(60),
91403
- root = __webpack_require__(42);
91428
+ root = __webpack_require__(41);
91404
91429
 
91405
91430
  /* Built-in method references that are verified to be native. */
91406
91431
  var Set = getNative(root, 'Set');
@@ -91413,7 +91438,7 @@ module.exports = Set;
91413
91438
  /***/ (function(module, exports, __webpack_require__) {
91414
91439
 
91415
91440
  var getNative = __webpack_require__(60),
91416
- root = __webpack_require__(42);
91441
+ root = __webpack_require__(41);
91417
91442
 
91418
91443
  /* Built-in method references that are verified to be native. */
91419
91444
  var WeakMap = getNative(root, 'WeakMap');
@@ -91725,7 +91750,7 @@ module.exports = isMap;
91725
91750
  /***/ (function(module, exports, __webpack_require__) {
91726
91751
 
91727
91752
  var getTag = __webpack_require__(112),
91728
- isObjectLike = __webpack_require__(43);
91753
+ isObjectLike = __webpack_require__(42);
91729
91754
 
91730
91755
  /** `Object#toString` result references. */
91731
91756
  var mapTag = '[object Map]';
@@ -91782,7 +91807,7 @@ module.exports = isSet;
91782
91807
  /***/ (function(module, exports, __webpack_require__) {
91783
91808
 
91784
91809
  var getTag = __webpack_require__(112),
91785
- isObjectLike = __webpack_require__(43);
91810
+ isObjectLike = __webpack_require__(42);
91786
91811
 
91787
91812
  /** `Object#toString` result references. */
91788
91813
  var setTag = '[object Set]';
@@ -93089,7 +93114,7 @@ module.exports = createBaseEach;
93089
93114
  /***/ (function(module, exports, __webpack_require__) {
93090
93115
 
93091
93116
  var baseGetTag = __webpack_require__(57),
93092
- isObjectLike = __webpack_require__(43);
93117
+ isObjectLike = __webpack_require__(42);
93093
93118
 
93094
93119
  /** `Object#toString` result references. */
93095
93120
  var numberTag = '[object Number]';
@@ -94896,7 +94921,7 @@ module.exports = attempt;
94896
94921
 
94897
94922
  var baseGetTag = __webpack_require__(57),
94898
94923
  getPrototype = __webpack_require__(153),
94899
- isObjectLike = __webpack_require__(43);
94924
+ isObjectLike = __webpack_require__(42);
94900
94925
 
94901
94926
  /** `Object#toString` result references. */
94902
94927
  var objectTag = '[object Object]';
@@ -95828,7 +95853,6 @@ var __values = (this && this.__values) || function(o) {
95828
95853
  throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
95829
95854
  };
95830
95855
  Object.defineProperty(exports, "__esModule", { value: true });
95831
- var BringgDashboardSDK_1 = __webpack_require__(36);
95832
95856
  var object_merger_1 = __webpack_require__(180);
95833
95857
  var realtime_subscriptions_1 = __webpack_require__(91);
95834
95858
  var Tasks_consts_1 = __webpack_require__(55);
@@ -95855,8 +95879,8 @@ var TaskRealtimeSubscriptions = /** @class */ (function () {
95855
95879
  _this.runEventCallbacks(Tasks_consts_1.TaskRealTimeEvents.NEW_TASK, mappedStorableItem);
95856
95880
  });
95857
95881
  this.realtimeSubscriptions.subscribe(Tasks_consts_1.TaskRealTimeEvents.TASK_DELETED, function (task) {
95858
- var previous = _this.storableDataService.removeFromStores(task.id);
95859
- _this.runEventCallbacks(Tasks_consts_1.TaskRealTimeEvents.TASK_DELETED, { previous: previous });
95882
+ var deletedTasks = _this.storableDataService.removeFromStores(task.id);
95883
+ _this.runEventCallbacks(Tasks_consts_1.TaskRealTimeEvents.TASK_DELETED, { diff: deletedTasks });
95860
95884
  });
95861
95885
  [
95862
95886
  { event: Tasks_consts_1.TaskRealTimeEvents.NEW_SCAN, field: 'scans', isDelete: false },
@@ -95921,9 +95945,10 @@ var TaskRealtimeSubscriptions = /** @class */ (function () {
95921
95945
  (this.eventCallbacks[event] || []).forEach(function (callback) { return callback(data); });
95922
95946
  };
95923
95947
  TaskRealtimeSubscriptions.prototype.changeSubEntity = function (subEntity, containerField, isDelete) {
95948
+ var _a, _b, _c;
95924
95949
  if (isDelete === void 0) { isDelete = false; }
95925
95950
  var task = this.tasksStore.get(subEntity.task_id);
95926
- var previous = (0, BringgDashboardSDK_1.getGlobals)().mobx.toJS(task);
95951
+ var diff;
95927
95952
  if (task) {
95928
95953
  if (!task[containerField]) {
95929
95954
  task[containerField] = [];
@@ -95931,17 +95956,32 @@ var TaskRealtimeSubscriptions = /** @class */ (function () {
95931
95956
  var existingIndex = task[containerField].findIndex(function (taskSubEntity) { return taskSubEntity.id === subEntity.id; });
95932
95957
  if (existingIndex > -1) {
95933
95958
  if (isDelete) {
95959
+ diff = (_a = { id: task.id }, _a[containerField] = this.createArrayOfEmptyObjects(existingIndex), _a);
95960
+ for (var i = existingIndex + 1; i < task[containerField].length; i++) {
95961
+ diff[containerField].push(task[containerField][i]);
95962
+ }
95934
95963
  task[containerField].splice(existingIndex, 1);
95935
95964
  }
95936
95965
  else {
95937
- object_merger_1.objectMerger.deepMerge(task[containerField][existingIndex], subEntity);
95966
+ var subEntityDiff = object_merger_1.objectMerger.deepMerge(task[containerField][existingIndex], subEntity);
95967
+ diff = (_b = {
95968
+ id: task.id
95969
+ },
95970
+ _b[containerField] = this.createArrayOfEmptyObjects(task[containerField].length),
95971
+ _b);
95972
+ diff[containerField][existingIndex] = subEntityDiff;
95938
95973
  }
95939
95974
  }
95940
95975
  else if (!isDelete) {
95976
+ diff = (_c = { id: task.id }, _c[containerField] = this.createArrayOfEmptyObjects(task[containerField].length), _c);
95977
+ diff[containerField].push(subEntity);
95941
95978
  task[containerField].push(subEntity);
95942
95979
  }
95943
95980
  }
95944
- return { current: task, previous: previous };
95981
+ return { current: task, diff: diff };
95982
+ };
95983
+ TaskRealtimeSubscriptions.prototype.createArrayOfEmptyObjects = function (length) {
95984
+ return Array.from({ length: length }, function () { return ({}); });
95945
95985
  };
95946
95986
  return TaskRealtimeSubscriptions;
95947
95987
  }());
@@ -96619,7 +96659,7 @@ var __read = (this && this.__read) || function (o, n) {
96619
96659
  Object.defineProperty(exports, "__esModule", { value: true });
96620
96660
  var light_data_store_1 = __webpack_require__(203);
96621
96661
  var merge_mapper_1 = __webpack_require__(137);
96622
- var data_store_1 = __webpack_require__(40);
96662
+ var data_store_1 = __webpack_require__(39);
96623
96663
  var storable_data_service_1 = __webpack_require__(52);
96624
96664
  var task_managed_attributes_realtime_subscriptions_1 = __webpack_require__(896);
96625
96665
  var task_managed_attributes_service_1 = __webpack_require__(898);
@@ -97562,7 +97602,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
97562
97602
  }
97563
97603
  };
97564
97604
  Object.defineProperty(exports, "__esModule", { value: true });
97565
- var BringgDashboardSDK_1 = __webpack_require__(36);
97605
+ var BringgDashboardSDK_1 = __webpack_require__(50);
97566
97606
  var BaseService_1 = __webpack_require__(66);
97567
97607
  var BringgException_1 = __webpack_require__(15);
97568
97608
  var ExceptionReason_1 = __webpack_require__(59);
@@ -101151,7 +101191,7 @@ var yeast = __webpack_require__(132);
101151
101191
  var parseqs = __webpack_require__(83);
101152
101192
 
101153
101193
  // EXTERNAL MODULE: ./node_modules/engine.io-parser/build/esm/index.js + 4 modules
101154
- var esm = __webpack_require__(50);
101194
+ var esm = __webpack_require__(49);
101155
101195
 
101156
101196
  // CONCATENATED MODULE: ./node_modules/engine.io-client/build/esm/contrib/has-cors.js
101157
101197
  // imported from https://github.com/component/has-cors