@bringg/dashboard-sdk 0.19.8 → 0.19.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/BringgDashboardSDK.d.ts +2 -0
- package/dist/BringgDashboardSDK.js +2 -0
- package/dist/BringgDashboardSDK.js.map +1 -1
- package/dist/Services/ServiceRequest.js +1 -1
- package/dist/Templates/Entity/TemplatesEntity.d.ts +8 -0
- package/dist/Templates/Entity/TemplatesEntity.js +81 -0
- package/dist/Templates/Entity/TemplatesEntity.js.map +1 -0
- package/dist/Templates/Templates.consts.d.ts +6 -0
- package/dist/Templates/Templates.consts.js +8 -0
- package/dist/Templates/Templates.consts.js.map +1 -0
- package/dist/Templates/TemplatesApi.d.ts +7 -0
- package/dist/Templates/TemplatesApi.js +14 -0
- package/dist/Templates/TemplatesApi.js.map +1 -0
- package/dist/bringg-dashboard-sdk-cjs2.js +20820 -22297
- package/dist/bringg-dashboard-sdk-cjs2.js.map +1 -1
- package/dist/bringg-dashboard-sdk.js +297 -335
- package/dist/bringg-dashboard-sdk.min.js +4 -4
- package/dist/bringg-dashboard-sdk.min.js.map +1 -1
- package/package.json +2 -2
|
@@ -330,7 +330,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexport
|
|
|
330
330
|
/***/ (function(module, exports, __webpack_require__) {
|
|
331
331
|
|
|
332
332
|
"use strict";
|
|
333
|
-
eval("\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n 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;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.BringgDashboardSDK = void 0;\nvar Session_1 = __webpack_require__(/*! ./Services/Identity/Session */ \"./dist/Services/Identity/Session.js\");\nvar MerchantApi_1 = __webpack_require__(/*! ./Merchant/MerchantApi */ \"./dist/Merchant/MerchantApi.js\");\nvar RolloutsApi_1 = __webpack_require__(/*! ./Rollouts/RolloutsApi */ \"./dist/Rollouts/RolloutsApi.js\");\nvar runs_1 = __webpack_require__(/*! ./Run/runs */ \"./dist/Run/runs.js\");\nvar Customer_1 = __webpack_require__(/*! ./Customer/Customer */ \"./dist/Customer/Customer.js\");\nvar dashboard_1 = __webpack_require__(/*! ./Dashboard/dashboard */ \"./dist/Dashboard/dashboard.js\");\nvar ReasonToChangeInventory_1 = __webpack_require__(/*! ./ReasonToChangeInventory/ReasonToChangeInventory */ \"./dist/ReasonToChangeInventory/ReasonToChangeInventory.js\");\nvar TaskInventory_1 = __webpack_require__(/*! ./TaskInventory/TaskInventory */ \"./dist/TaskInventory/TaskInventory.js\");\nvar ChatConversationApi_1 = __webpack_require__(/*! ./ChatConversation/ChatConversationApi */ \"./dist/ChatConversation/ChatConversationApi.js\");\nvar Crew_1 = __webpack_require__(/*! ./Crew/Crew */ \"./dist/Crew/Crew.js\");\nvar PlannedRoutesApi_1 = __webpack_require__(/*! ./PlannedRoutes/PlannedRoutesApi */ \"./dist/PlannedRoutes/PlannedRoutesApi.js\");\nvar PrivilegesApi_1 = __webpack_require__(/*! ./Privileges/PrivilegesApi */ \"./dist/Privileges/PrivilegesApi.js\");\nvar ConfigurationProvider_1 = __webpack_require__(/*! ./Core/ConfigurationProvider */ \"./dist/Core/ConfigurationProvider.js\");\nvar Language_1 = __webpack_require__(/*! ./Language/Language */ \"./dist/Language/Language.js\");\nvar NotificationType_1 = __webpack_require__(/*! ./NotificationType/NotificationType */ \"./dist/NotificationType/NotificationType.js\");\nvar Users_1 = __webpack_require__(/*! ./User/Users */ \"./dist/User/Users.js\");\nvar NotificationTemplate_1 = __webpack_require__(/*! ./NotificationTemplate/NotificationTemplate */ \"./dist/NotificationTemplate/NotificationTemplate.js\");\nvar customer_configuration_1 = __webpack_require__(/*! ./CustomerConfiguration/customer.configuration */ \"./dist/CustomerConfiguration/customer.configuration.js\");\nvar CrossAppTransport_1 = __webpack_require__(/*! ./CrossAppTranport/CrossAppTransport */ \"./dist/CrossAppTranport/CrossAppTransport.js\");\nvar Company_1 = __webpack_require__(/*! ./Company/Company */ \"./dist/Company/Company.js\");\nvar Tag_1 = __webpack_require__(/*! ./Tag/Tag */ \"./dist/Tag/Tag.js\");\nvar reports_1 = __webpack_require__(/*! ./Reports/reports */ \"./dist/Reports/reports.js\");\nvar VrpAutoDispatchAnalyticApi_1 = __webpack_require__(/*! ./VrpAutoDispatchAnalytic/VrpAutoDispatchAnalyticApi */ \"./dist/VrpAutoDispatchAnalytic/VrpAutoDispatchAnalyticApi.js\");\nvar TagCustomerConfiguration_1 = __webpack_require__(/*! ./TagCustomerConfiguration/TagCustomerConfiguration */ \"./dist/TagCustomerConfiguration/TagCustomerConfiguration.js\");\nvar TagMerchantConfiguration_1 = __webpack_require__(/*! ./TagMerchantConfiguration/TagMerchantConfiguration */ \"./dist/TagMerchantConfiguration/TagMerchantConfiguration.js\");\nvar InventoryActionsConfiguration_1 = __webpack_require__(/*! ./InventoryActionsConfiguration/InventoryActionsConfiguration */ \"./dist/InventoryActionsConfiguration/InventoryActionsConfiguration.js\");\nvar TaskConfiguration_1 = __webpack_require__(/*! ./TaskConfiguration/TaskConfiguration */ \"./dist/TaskConfiguration/TaskConfiguration.js\");\nvar UserConfiguration_1 = __webpack_require__(/*! ./UserConfiguration/UserConfiguration */ \"./dist/UserConfiguration/UserConfiguration.js\");\nvar UserTypeApi_1 = __webpack_require__(/*! ./UserType/UserTypeApi */ \"./dist/UserType/UserTypeApi.js\");\nvar DeliveryBlocksApi_1 = __webpack_require__(/*! ./DeliveryBlocks/DeliveryBlocksApi */ \"./dist/DeliveryBlocks/DeliveryBlocksApi.js\");\nvar ReportPreference_1 = __webpack_require__(/*! ./ReportPreference/ReportPreference */ \"./dist/ReportPreference/ReportPreference.js\");\nvar TeamApi_1 = __webpack_require__(/*! ./Team/TeamApi */ \"./dist/Team/TeamApi.js\");\nvar ResourceUploadApi_1 = __webpack_require__(/*! ./ResourceUpload/ResourceUploadApi */ \"./dist/ResourceUpload/ResourceUploadApi.js\");\nvar TeamConfigurationApi_1 = __webpack_require__(/*! ./TeamConfiguration/TeamConfigurationApi */ \"./dist/TeamConfiguration/TeamConfigurationApi.js\");\nvar ScanApi_1 = __webpack_require__(/*! ./Scan/ScanApi */ \"./dist/Scan/ScanApi.js\");\nvar Signature_1 = __webpack_require__(/*! ./Signature/Signature */ \"./dist/Signature/Signature.js\");\nvar Photo_1 = __webpack_require__(/*! ./Photo/Photo */ \"./dist/Photo/Photo.js\");\nvar MerchantConfigurationApi_1 = __webpack_require__(/*! ./MerchantConfiguration/MerchantConfigurationApi */ \"./dist/MerchantConfiguration/MerchantConfigurationApi.js\");\nvar VehicleTypeApi_1 = __webpack_require__(/*! ./VehicleType/VehicleTypeApi */ \"./dist/VehicleType/VehicleTypeApi.js\");\nvar ReasonToReassignTasksApi_1 = __webpack_require__(/*! ./ReasonToReassignTask/ReasonToReassignTasksApi */ \"./dist/ReasonToReassignTask/ReasonToReassignTasksApi.js\");\nvar SkillsApi_1 = __webpack_require__(/*! ./Skills/SkillsApi */ \"./dist/Skills/SkillsApi.js\");\nvar VehicleApi_1 = __webpack_require__(/*! ./Vehicle/VehicleApi */ \"./dist/Vehicle/VehicleApi.js\");\nvar WebApplicationConfigurationApi_1 = __webpack_require__(/*! ./WebApplicationConfiguration/WebApplicationConfigurationApi */ \"./dist/WebApplicationConfiguration/WebApplicationConfigurationApi.js\");\nvar FleetApi_1 = __webpack_require__(/*! ./Fleet/FleetApi */ \"./dist/Fleet/FleetApi.js\");\nvar RuleApi_1 = __webpack_require__(/*! ./Rule/RuleApi */ \"./dist/Rule/RuleApi.js\");\nvar PushTokenSubscriptionApi_1 = __webpack_require__(/*! ./PushTokenSubscription/PushTokenSubscriptionApi */ \"./dist/PushTokenSubscription/PushTokenSubscriptionApi.js\");\nvar TaskApi_1 = __webpack_require__(/*! ./Task/TaskApi */ \"./dist/Task/TaskApi.js\");\nvar ApplicationMerchantConfigurationApi_1 = __webpack_require__(/*! ./ApplicationMerchantConfiguration/ApplicationMerchantConfigurationApi */ \"./dist/ApplicationMerchantConfiguration/ApplicationMerchantConfigurationApi.js\");\nvar ApplicationTeamConfigurationApi_1 = __webpack_require__(/*! ./ApplicationTeamConfiguration/ApplicationTeamConfigurationApi */ \"./dist/ApplicationTeamConfiguration/ApplicationTeamConfigurationApi.js\");\nvar GoogleMapsHelperApi_1 = __webpack_require__(/*! ./GoogleMapsHelper/GoogleMapsHelperApi */ \"./dist/GoogleMapsHelper/GoogleMapsHelperApi.js\");\nvar OnboardingApi_1 = __webpack_require__(/*! ./Onboarding/OnboardingApi */ \"./dist/Onboarding/OnboardingApi.js\");\nvar FleetRouterApi_1 = __webpack_require__(/*! ./FleetRouter/FleetRouterApi */ \"./dist/FleetRouter/FleetRouterApi.js\");\nvar AlertConfigurationApi_1 = __webpack_require__(/*! ./AlertConfiguration/AlertConfigurationApi */ \"./dist/AlertConfiguration/AlertConfigurationApi.js\");\nvar WorkflowApi_1 = __webpack_require__(/*! ./Workflow/WorkflowApi */ \"./dist/Workflow/WorkflowApi.js\");\nvar AuthService_1 = __webpack_require__(/*! ./Services/Identity/AuthService */ \"./dist/Services/Identity/AuthService.js\");\nvar ServiceApi_1 = __webpack_require__(/*! ./Service/ServiceApi */ \"./dist/Service/ServiceApi.js\");\nvar FleetTemplateApi_1 = __webpack_require__(/*! ./FleetTemplate/FleetTemplateApi */ \"./dist/FleetTemplate/FleetTemplateApi.js\");\nvar OpenFleetApi_1 = __webpack_require__(/*! ./OpenFleet/OpenFleetApi */ \"./dist/OpenFleet/OpenFleetApi.js\");\nvar GeocodingApi_1 = __webpack_require__(/*! ./Geocoding/GeocodingApi */ \"./dist/Geocoding/GeocodingApi.js\");\nvar ApplicationApi_1 = __webpack_require__(/*! ./Application/ApplicationApi */ \"./dist/Application/ApplicationApi.js\");\nvar CustomerAvailabilityHourApi_1 = __webpack_require__(/*! ./CustomerAvailabilityHour/CustomerAvailabilityHourApi */ \"./dist/CustomerAvailabilityHour/CustomerAvailabilityHourApi.js\");\nvar ShiftsApi_1 = __webpack_require__(/*! ./Shifts/ShiftsApi */ \"./dist/Shifts/ShiftsApi.js\");\nvar ExclusionWindowApi_1 = __webpack_require__(/*! ./ExclusionWindow/ExclusionWindowApi */ \"./dist/ExclusionWindow/ExclusionWindowApi.js\");\nvar Country_1 = __webpack_require__(/*! ./Country/Country */ \"./dist/Country/Country.js\");\nvar OauthApplicationApi_1 = __webpack_require__(/*! ./OauthApplications/OauthApplicationApi */ \"./dist/OauthApplications/OauthApplicationApi.js\");\nvar Inventory_1 = __webpack_require__(/*! ./Inventory/Inventory */ \"./dist/Inventory/Inventory.js\");\nvar PushNotificationRegistration_1 = __webpack_require__(/*! ./PushNotificationRegistration/PushNotificationRegistration */ \"./dist/PushNotificationRegistration/PushNotificationRegistration.js\");\nvar ReasonToCancelTasksApi_1 = __webpack_require__(/*! ./ReasonToCancelTasks/ReasonToCancelTasksApi */ \"./dist/ReasonToCancelTasks/ReasonToCancelTasksApi.js\");\nvar CustomFilterApi_1 = __webpack_require__(/*! ./CustomFilter/CustomFilterApi */ \"./dist/CustomFilter/CustomFilterApi.js\");\nvar FloatingInventoryApi_1 = __webpack_require__(/*! ./FloatingInventory/FloatingInventoryApi */ \"./dist/FloatingInventory/FloatingInventoryApi.js\");\nvar ServiceAreaApi_1 = __webpack_require__(/*! ./ServiceArea/ServiceAreaApi */ \"./dist/ServiceArea/ServiceAreaApi.js\");\nvar BillingApi_1 = __webpack_require__(/*! ./Billing/BillingApi */ \"./dist/Billing/BillingApi.js\");\nvar PackageApi_1 = __webpack_require__(/*! ./Package/PackageApi */ \"./dist/Package/PackageApi.js\");\nvar UserAnalyticsApi_1 = __webpack_require__(/*! ./UserAnalytics/UserAnalyticsApi */ \"./dist/UserAnalytics/UserAnalyticsApi.js\");\nvar AnalyticsReportsApi_1 = __webpack_require__(/*! ./AnalyticsReports/AnalyticsReportsApi */ \"./dist/AnalyticsReports/AnalyticsReportsApi.js\");\nvar ServicePlansApi_1 = __webpack_require__(/*! ./ServicePlans/ServicePlansApi */ \"./dist/ServicePlans/ServicePlansApi.js\");\nvar AlertsApi_1 = __webpack_require__(/*! ./Alerts/AlertsApi */ \"./dist/Alerts/AlertsApi.js\");\nvar DeliveryCatalogApi_1 = __webpack_require__(/*! ./DeliveryCatalog/DeliveryCatalogApi */ \"./dist/DeliveryCatalog/DeliveryCatalogApi.js\");\nvar RouteOptimizationApi_1 = __webpack_require__(/*! ./RouteOptimization/RouteOptimizationApi */ \"./dist/RouteOptimization/RouteOptimizationApi.js\");\nvar RatesApi_1 = __webpack_require__(/*! ./Rates/RatesApi */ \"./dist/Rates/RatesApi.js\");\nvar RouteOptimizationService_1 = __webpack_require__(/*! ./RouteOptimization/RouteOptimizationService */ \"./dist/RouteOptimization/RouteOptimizationService.js\");\nvar ParkingSpotApi_1 = __webpack_require__(/*! ./ParkingSpot/ParkingSpotApi */ \"./dist/ParkingSpot/ParkingSpotApi.js\");\nvar BringgDashboardSDK = /** @class */ (function () {\n function BringgDashboardSDK(session) {\n this.applicationMerchantConfiguration = null;\n this.applicationTeamConfiguration = null;\n this.chat = null;\n this.companies = null;\n this.credentials = {};\n this.crews = null;\n this.crossAppTransport = null;\n this.customerConfiguration = null;\n this.customers = null;\n this.dashboard = null;\n this.deliveryBlocks = null;\n this.fleets = null;\n this.rules = null;\n this.floatingInventory = null;\n this.inventoryActionsConfigurations = null;\n this.languages = null;\n this.merchant = null;\n this.merchantConfiguration = null;\n this.notificationTemplates = null;\n this.notificationTypes = null;\n this.oauthApplication = null;\n this.plannedRoutes = null;\n this.privileges = null;\n this.reasonToChangeInventory = null;\n this.reasonToReassignTasks = null;\n this.reasonToCancelTasks = null;\n this.reportPreferences = null;\n this.reports = null;\n this.runs = null;\n this.rollouts = null;\n this.skills = null;\n this.taskConfigurations = null;\n this.taskInventory = null;\n this.inventory = null;\n this.tasks = null;\n this.teamConfiguration = null;\n this.teams = null;\n this.resourceUploads = null;\n this.userConfigurations = null;\n this.users = null;\n this.vehicleTypes = null;\n this.vehicles = null;\n this.session = session;\n }\n BringgDashboardSDK.init = function (session) {\n return __awaiter(this, void 0, void 0, function () {\n var bringg;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n bringg = new BringgDashboardSDK(session);\n bringg.application = new ApplicationApi_1.default(session);\n bringg.chat = new ChatConversationApi_1.default(session);\n bringg.companies = new Company_1.default(session);\n bringg.crossAppTransport = new CrossAppTransport_1.default();\n bringg.customerConfiguration = new customer_configuration_1.default(session);\n bringg.customers = new Customer_1.default(session);\n bringg.dashboard = new dashboard_1.default(session);\n bringg.deliveryBlocks = new DeliveryBlocksApi_1.DeliveryBlocksApi(session);\n bringg.fleets = new FleetApi_1.default(session);\n bringg.rules = new RuleApi_1.default(session);\n bringg.fleetRouterApi = new FleetRouterApi_1.default(session);\n bringg.alertConfiguration = new AlertConfigurationApi_1.default(session);\n bringg.workflow = new WorkflowApi_1.default(session);\n bringg.floatingInventory = new FloatingInventoryApi_1.default(session);\n bringg.geocoding = new GeocodingApi_1.default(session);\n bringg.googleMapsHelper = new GoogleMapsHelperApi_1.default(session);\n bringg.inventoryActionsConfigurations = new InventoryActionsConfiguration_1.default(session);\n bringg.languages = new Language_1.Language(session);\n bringg.merchant = new MerchantApi_1.default(session);\n bringg.merchantConfiguration = new MerchantConfigurationApi_1.MerchantConfigurationApi(session);\n bringg.notificationTemplates = new NotificationTemplate_1.NotificationTemplate(session);\n bringg.notificationTypes = new NotificationType_1.NotificationType(session);\n bringg.oauthApplication = new OauthApplicationApi_1.default(session);\n bringg.onboardings = new OnboardingApi_1.default(session);\n bringg.photos = new Photo_1.default(session);\n bringg.plannedRoutes = new PlannedRoutesApi_1.default(session);\n bringg.privileges = new PrivilegesApi_1.default(session);\n bringg.pushTokenSubscription = new PushTokenSubscriptionApi_1.default(session);\n bringg.pushNotificationRegistration = new PushNotificationRegistration_1.default(session);\n bringg.reasonToChangeInventory = new ReasonToChangeInventory_1.default(session);\n bringg.reasonToReassignTasks = new ReasonToReassignTasksApi_1.default(session);\n bringg.reasonToCancelTasks = new ReasonToCancelTasksApi_1.default(session);\n bringg.reportPreferences = new ReportPreference_1.default(session);\n bringg.reports = new reports_1.default(session);\n bringg.runs = new runs_1.default(session);\n bringg.scans = new ScanApi_1.default(session);\n bringg.rollouts = new RolloutsApi_1.default(session);\n bringg.service = new ServiceApi_1.default(session);\n bringg.signatures = new Signature_1.default(session);\n bringg.skills = new SkillsApi_1.default(session);\n bringg.tagCustomerConfigurations = new TagCustomerConfiguration_1.default(session);\n bringg.tagMerchantConfigurations = new TagMerchantConfiguration_1.default(session);\n bringg.tags = new Tag_1.default(session);\n bringg.taskConfigurations = new TaskConfiguration_1.default(session);\n bringg.taskInventory = new TaskInventory_1.default(session);\n bringg.inventory = new Inventory_1.default(session);\n bringg.tasks = new TaskApi_1.default(session);\n bringg.teamConfiguration = new TeamConfigurationApi_1.default(session);\n bringg.teams = new TeamApi_1.default(session);\n bringg.resourceUploads = new ResourceUploadApi_1.default(session);\n bringg.userConfigurations = new UserConfiguration_1.default(session);\n bringg.userTypes = new UserTypeApi_1.default(session);\n bringg.users = new Users_1.default(session);\n bringg.vehicleTypes = new VehicleTypeApi_1.default(session);\n bringg.vehicles = new VehicleApi_1.default(session);\n bringg.vrpAutoDispatchAnalytic = new VrpAutoDispatchAnalyticApi_1.default(session);\n bringg.webApplicationConfiguration = new WebApplicationConfigurationApi_1.default(session);\n bringg.fleetTemplates = new FleetTemplateApi_1.default(session);\n bringg.openFleets = new OpenFleetApi_1.default(session);\n bringg.customerAvailabilityHours = new CustomerAvailabilityHourApi_1.default(session);\n bringg.exclusionWindows = new ExclusionWindowApi_1.default(session);\n bringg.shifts = new ShiftsApi_1.default(session);\n bringg.customFilters = new CustomFilterApi_1.default(session);\n bringg.serviceAreas = new ServiceAreaApi_1.default(session);\n bringg.billing = new BillingApi_1.default(session);\n bringg.userAnalytics = new UserAnalyticsApi_1.default(session);\n bringg.analyticsReports = new AnalyticsReportsApi_1.default(session);\n bringg.servicePlans = new ServicePlansApi_1.default(session);\n bringg.alertsApi = new AlertsApi_1.default(session);\n bringg.deliveryCatalog = new DeliveryCatalogApi_1.default(session);\n bringg.packageApi = new PackageApi_1.default(session);\n bringg.routeOptimizationApi = new RouteOptimizationApi_1.default(session);\n bringg.ratesApi = new RatesApi_1.default(session);\n bringg.routeOptimizationService = new RouteOptimizationService_1.default(session);\n bringg.parkingSpotApi = new ParkingSpotApi_1.default(session);\n // dependent\n bringg.crews = new Crew_1.default(session, bringg.users);\n bringg.applicationMerchantConfiguration = new ApplicationMerchantConfigurationApi_1.default(session, bringg.merchantConfiguration);\n bringg.applicationTeamConfiguration = new ApplicationTeamConfigurationApi_1.default(session);\n return [4 /*yield*/, BringgDashboardSDK.initSessionConfiguration(bringg)];\n case 1:\n _a.sent();\n return [2 /*return*/, Object.freeze(bringg)];\n }\n });\n });\n };\n BringgDashboardSDK.initSessionConfiguration = function (bringg) {\n var _a, _b;\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_c) {\n switch (_c.label) {\n case 0: return [4 /*yield*/, Promise.all([bringg.merchantConfiguration.get(), bringg.webApplicationConfiguration.get()])];\n case 1:\n _c.sent();\n if (!((_b = (_a = this._configurationProvider) === null || _a === void 0 ? void 0 : _a.isUserAnalyticsEnabled) === null || _b === void 0 ? void 0 : _b.call(_a))) return [3 /*break*/, 5];\n return [4 /*yield*/, bringg.userAnalytics.addSnippet({\n apiKey: this._configurationProvider.getUserAnalyticsApiKey()\n })];\n case 2:\n _c.sent();\n return [4 /*yield*/, bringg.merchant.get()];\n case 3:\n _c.sent();\n return [4 /*yield*/, bringg.userAnalytics.run({\n environment: BringgDashboardSDK._environment\n })];\n case 4:\n _c.sent();\n _c.label = 5;\n case 5: return [2 /*return*/];\n }\n });\n });\n };\n BringgDashboardSDK.setConfigurations = function (apiEndpointURL, monitorEndpointURL) {\n this._configurationProvider.getApiEndpoint = function () { return apiEndpointURL; };\n this._configurationProvider.getAuthenticationEndpoint = function () { return apiEndpointURL; };\n this._configurationProvider.getRegionDiscoveryEndpoint = function () { return apiEndpointURL; };\n this._configurationProvider.getMonitoringEndpoint = function () { return monitorEndpointURL; };\n };\n Object.defineProperty(BringgDashboardSDK, \"configurationProvider\", {\n get: function () {\n return BringgDashboardSDK._configurationProvider;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(BringgDashboardSDK, \"environment\", {\n get: function () {\n return this._environment;\n },\n enumerable: false,\n configurable: true\n });\n BringgDashboardSDK.initWithSessionCode = function (code, session, region) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, BringgDashboardSDK.login({ code: code, session: session, region: region })];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n BringgDashboardSDK.initWithEmail = function (email, password, merchant_uuid, recaptchaToken, recaptcha_qa_token, region) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, BringgDashboardSDK.login({\n email: email,\n password: password,\n merchant_uuid: merchant_uuid,\n recaptchaToken: recaptchaToken,\n recaptcha_qa_token: recaptcha_qa_token,\n region: region\n })];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n BringgDashboardSDK.initWithAuthToken = function (region, authenticationToken) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, BringgDashboardSDK.login({ region: region, authenticationToken: authenticationToken })];\n case 1: return [2 /*return*/, (_a.sent())];\n }\n });\n });\n };\n BringgDashboardSDK.loginInternal = function (sdkInitialiser, params) {\n return __awaiter(this, void 0, void 0, function () {\n var response;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, Session_1.default.init(params)];\n case 1:\n response = _a.sent();\n return [2 /*return*/, sdkInitialiser(response)];\n }\n });\n });\n };\n BringgDashboardSDK.login = function (params) {\n return __awaiter(this, void 0, void 0, function () {\n var configuration;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (!(BringgDashboardSDK.configurationProvider === null)) return [3 /*break*/, 2];\n return [4 /*yield*/, ConfigurationProvider_1.ConfigurationProvider.fromUrl(ConfigurationProvider_1.ConfigurationProvider.getConfigUrl(this._environment))];\n case 1:\n configuration = _a.sent();\n BringgDashboardSDK.setConfigurationProvider(configuration);\n _a.label = 2;\n case 2: return [4 /*yield*/, this.loginInternal(function (a) { return BringgDashboardSDK.init(a); }, params)];\n case 3: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n BringgDashboardSDK.prototype.logout = function (keepServerSession) {\n if (keepServerSession === void 0) { keepServerSession = false; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.session.logout(keepServerSession)];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n BringgDashboardSDK.resendConfirmationEmail = function (params) {\n return __awaiter(this, void 0, void 0, function () {\n var authService, email, password, merchant_uuid, recaptchaToken, recaptcha_qa_token;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n authService = AuthService_1.default.init(params.region);\n email = params.email, password = params.password, merchant_uuid = params.merchant_uuid, recaptchaToken = params.recaptchaToken, recaptcha_qa_token = params.recaptcha_qa_token;\n return [4 /*yield*/, authService.resendConfirmationEmail(email, password, merchant_uuid, recaptchaToken, recaptcha_qa_token)];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n BringgDashboardSDK.getCountriesList = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, Country_1.default.getCountries()];\n });\n });\n };\n BringgDashboardSDK.prototype.switchAccounts = function () {\n return __awaiter(this, void 0, void 0, function () {\n var _a, _b;\n return __generator(this, function (_c) {\n switch (_c.label) {\n case 0:\n _b = (_a = BringgDashboardSDK).init;\n return [4 /*yield*/, this.session.switchAccounts()];\n case 1: return [2 /*return*/, _b.apply(_a, [_c.sent()])];\n }\n });\n });\n };\n BringgDashboardSDK.prototype.impersonate = function (user_id) {\n return __awaiter(this, void 0, void 0, function () {\n var _a, _b;\n return __generator(this, function (_c) {\n switch (_c.label) {\n case 0:\n _b = (_a = BringgDashboardSDK).init;\n return [4 /*yield*/, this.session.impersonate(user_id)];\n case 1: return [2 /*return*/, _b.apply(_a, [_c.sent()])];\n }\n });\n });\n };\n BringgDashboardSDK.prototype.impersonateByTeam = function (team_id) {\n return __awaiter(this, void 0, void 0, function () {\n var _a, _b;\n return __generator(this, function (_c) {\n switch (_c.label) {\n case 0:\n _b = (_a = BringgDashboardSDK).init;\n return [4 /*yield*/, this.session.impersonateByTeam(team_id)];\n case 1: return [2 /*return*/, _b.apply(_a, [_c.sent()])];\n }\n });\n });\n };\n BringgDashboardSDK.prototype.unwindImpersonation = function () {\n return __awaiter(this, void 0, void 0, function () {\n var _a, _b;\n return __generator(this, function (_c) {\n switch (_c.label) {\n case 0:\n _b = (_a = BringgDashboardSDK).init;\n return [4 /*yield*/, this.session.unwindImpersonation()];\n case 1: return [2 /*return*/, _b.apply(_a, [_c.sent()])];\n }\n });\n });\n };\n BringgDashboardSDK._environment = 'production';\n BringgDashboardSDK._configurationProvider = null;\n BringgDashboardSDK.setConfigurationProvider = function (configurationProvider) {\n BringgDashboardSDK._configurationProvider = configurationProvider;\n };\n BringgDashboardSDK.setEnvironment = function (environment) {\n BringgDashboardSDK._environment = environment;\n };\n return BringgDashboardSDK;\n}());\nexports.BringgDashboardSDK = BringgDashboardSDK;\n//# sourceMappingURL=BringgDashboardSDK.js.map\n\n//# sourceURL=webpack://BringgDashboardSDK/./dist/BringgDashboardSDK.js?");
|
|
333
|
+
eval("\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n 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;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.BringgDashboardSDK = void 0;\nvar Session_1 = __webpack_require__(/*! ./Services/Identity/Session */ \"./dist/Services/Identity/Session.js\");\nvar MerchantApi_1 = __webpack_require__(/*! ./Merchant/MerchantApi */ \"./dist/Merchant/MerchantApi.js\");\nvar RolloutsApi_1 = __webpack_require__(/*! ./Rollouts/RolloutsApi */ \"./dist/Rollouts/RolloutsApi.js\");\nvar runs_1 = __webpack_require__(/*! ./Run/runs */ \"./dist/Run/runs.js\");\nvar Customer_1 = __webpack_require__(/*! ./Customer/Customer */ \"./dist/Customer/Customer.js\");\nvar dashboard_1 = __webpack_require__(/*! ./Dashboard/dashboard */ \"./dist/Dashboard/dashboard.js\");\nvar ReasonToChangeInventory_1 = __webpack_require__(/*! ./ReasonToChangeInventory/ReasonToChangeInventory */ \"./dist/ReasonToChangeInventory/ReasonToChangeInventory.js\");\nvar TaskInventory_1 = __webpack_require__(/*! ./TaskInventory/TaskInventory */ \"./dist/TaskInventory/TaskInventory.js\");\nvar ChatConversationApi_1 = __webpack_require__(/*! ./ChatConversation/ChatConversationApi */ \"./dist/ChatConversation/ChatConversationApi.js\");\nvar Crew_1 = __webpack_require__(/*! ./Crew/Crew */ \"./dist/Crew/Crew.js\");\nvar PlannedRoutesApi_1 = __webpack_require__(/*! ./PlannedRoutes/PlannedRoutesApi */ \"./dist/PlannedRoutes/PlannedRoutesApi.js\");\nvar PrivilegesApi_1 = __webpack_require__(/*! ./Privileges/PrivilegesApi */ \"./dist/Privileges/PrivilegesApi.js\");\nvar ConfigurationProvider_1 = __webpack_require__(/*! ./Core/ConfigurationProvider */ \"./dist/Core/ConfigurationProvider.js\");\nvar Language_1 = __webpack_require__(/*! ./Language/Language */ \"./dist/Language/Language.js\");\nvar NotificationType_1 = __webpack_require__(/*! ./NotificationType/NotificationType */ \"./dist/NotificationType/NotificationType.js\");\nvar Users_1 = __webpack_require__(/*! ./User/Users */ \"./dist/User/Users.js\");\nvar NotificationTemplate_1 = __webpack_require__(/*! ./NotificationTemplate/NotificationTemplate */ \"./dist/NotificationTemplate/NotificationTemplate.js\");\nvar customer_configuration_1 = __webpack_require__(/*! ./CustomerConfiguration/customer.configuration */ \"./dist/CustomerConfiguration/customer.configuration.js\");\nvar CrossAppTransport_1 = __webpack_require__(/*! ./CrossAppTranport/CrossAppTransport */ \"./dist/CrossAppTranport/CrossAppTransport.js\");\nvar Company_1 = __webpack_require__(/*! ./Company/Company */ \"./dist/Company/Company.js\");\nvar Tag_1 = __webpack_require__(/*! ./Tag/Tag */ \"./dist/Tag/Tag.js\");\nvar reports_1 = __webpack_require__(/*! ./Reports/reports */ \"./dist/Reports/reports.js\");\nvar VrpAutoDispatchAnalyticApi_1 = __webpack_require__(/*! ./VrpAutoDispatchAnalytic/VrpAutoDispatchAnalyticApi */ \"./dist/VrpAutoDispatchAnalytic/VrpAutoDispatchAnalyticApi.js\");\nvar TagCustomerConfiguration_1 = __webpack_require__(/*! ./TagCustomerConfiguration/TagCustomerConfiguration */ \"./dist/TagCustomerConfiguration/TagCustomerConfiguration.js\");\nvar TagMerchantConfiguration_1 = __webpack_require__(/*! ./TagMerchantConfiguration/TagMerchantConfiguration */ \"./dist/TagMerchantConfiguration/TagMerchantConfiguration.js\");\nvar InventoryActionsConfiguration_1 = __webpack_require__(/*! ./InventoryActionsConfiguration/InventoryActionsConfiguration */ \"./dist/InventoryActionsConfiguration/InventoryActionsConfiguration.js\");\nvar TaskConfiguration_1 = __webpack_require__(/*! ./TaskConfiguration/TaskConfiguration */ \"./dist/TaskConfiguration/TaskConfiguration.js\");\nvar UserConfiguration_1 = __webpack_require__(/*! ./UserConfiguration/UserConfiguration */ \"./dist/UserConfiguration/UserConfiguration.js\");\nvar UserTypeApi_1 = __webpack_require__(/*! ./UserType/UserTypeApi */ \"./dist/UserType/UserTypeApi.js\");\nvar DeliveryBlocksApi_1 = __webpack_require__(/*! ./DeliveryBlocks/DeliveryBlocksApi */ \"./dist/DeliveryBlocks/DeliveryBlocksApi.js\");\nvar ReportPreference_1 = __webpack_require__(/*! ./ReportPreference/ReportPreference */ \"./dist/ReportPreference/ReportPreference.js\");\nvar TeamApi_1 = __webpack_require__(/*! ./Team/TeamApi */ \"./dist/Team/TeamApi.js\");\nvar ResourceUploadApi_1 = __webpack_require__(/*! ./ResourceUpload/ResourceUploadApi */ \"./dist/ResourceUpload/ResourceUploadApi.js\");\nvar TeamConfigurationApi_1 = __webpack_require__(/*! ./TeamConfiguration/TeamConfigurationApi */ \"./dist/TeamConfiguration/TeamConfigurationApi.js\");\nvar ScanApi_1 = __webpack_require__(/*! ./Scan/ScanApi */ \"./dist/Scan/ScanApi.js\");\nvar Signature_1 = __webpack_require__(/*! ./Signature/Signature */ \"./dist/Signature/Signature.js\");\nvar Photo_1 = __webpack_require__(/*! ./Photo/Photo */ \"./dist/Photo/Photo.js\");\nvar MerchantConfigurationApi_1 = __webpack_require__(/*! ./MerchantConfiguration/MerchantConfigurationApi */ \"./dist/MerchantConfiguration/MerchantConfigurationApi.js\");\nvar VehicleTypeApi_1 = __webpack_require__(/*! ./VehicleType/VehicleTypeApi */ \"./dist/VehicleType/VehicleTypeApi.js\");\nvar ReasonToReassignTasksApi_1 = __webpack_require__(/*! ./ReasonToReassignTask/ReasonToReassignTasksApi */ \"./dist/ReasonToReassignTask/ReasonToReassignTasksApi.js\");\nvar SkillsApi_1 = __webpack_require__(/*! ./Skills/SkillsApi */ \"./dist/Skills/SkillsApi.js\");\nvar VehicleApi_1 = __webpack_require__(/*! ./Vehicle/VehicleApi */ \"./dist/Vehicle/VehicleApi.js\");\nvar WebApplicationConfigurationApi_1 = __webpack_require__(/*! ./WebApplicationConfiguration/WebApplicationConfigurationApi */ \"./dist/WebApplicationConfiguration/WebApplicationConfigurationApi.js\");\nvar FleetApi_1 = __webpack_require__(/*! ./Fleet/FleetApi */ \"./dist/Fleet/FleetApi.js\");\nvar RuleApi_1 = __webpack_require__(/*! ./Rule/RuleApi */ \"./dist/Rule/RuleApi.js\");\nvar PushTokenSubscriptionApi_1 = __webpack_require__(/*! ./PushTokenSubscription/PushTokenSubscriptionApi */ \"./dist/PushTokenSubscription/PushTokenSubscriptionApi.js\");\nvar TaskApi_1 = __webpack_require__(/*! ./Task/TaskApi */ \"./dist/Task/TaskApi.js\");\nvar ApplicationMerchantConfigurationApi_1 = __webpack_require__(/*! ./ApplicationMerchantConfiguration/ApplicationMerchantConfigurationApi */ \"./dist/ApplicationMerchantConfiguration/ApplicationMerchantConfigurationApi.js\");\nvar ApplicationTeamConfigurationApi_1 = __webpack_require__(/*! ./ApplicationTeamConfiguration/ApplicationTeamConfigurationApi */ \"./dist/ApplicationTeamConfiguration/ApplicationTeamConfigurationApi.js\");\nvar GoogleMapsHelperApi_1 = __webpack_require__(/*! ./GoogleMapsHelper/GoogleMapsHelperApi */ \"./dist/GoogleMapsHelper/GoogleMapsHelperApi.js\");\nvar OnboardingApi_1 = __webpack_require__(/*! ./Onboarding/OnboardingApi */ \"./dist/Onboarding/OnboardingApi.js\");\nvar FleetRouterApi_1 = __webpack_require__(/*! ./FleetRouter/FleetRouterApi */ \"./dist/FleetRouter/FleetRouterApi.js\");\nvar AlertConfigurationApi_1 = __webpack_require__(/*! ./AlertConfiguration/AlertConfigurationApi */ \"./dist/AlertConfiguration/AlertConfigurationApi.js\");\nvar WorkflowApi_1 = __webpack_require__(/*! ./Workflow/WorkflowApi */ \"./dist/Workflow/WorkflowApi.js\");\nvar AuthService_1 = __webpack_require__(/*! ./Services/Identity/AuthService */ \"./dist/Services/Identity/AuthService.js\");\nvar ServiceApi_1 = __webpack_require__(/*! ./Service/ServiceApi */ \"./dist/Service/ServiceApi.js\");\nvar FleetTemplateApi_1 = __webpack_require__(/*! ./FleetTemplate/FleetTemplateApi */ \"./dist/FleetTemplate/FleetTemplateApi.js\");\nvar OpenFleetApi_1 = __webpack_require__(/*! ./OpenFleet/OpenFleetApi */ \"./dist/OpenFleet/OpenFleetApi.js\");\nvar GeocodingApi_1 = __webpack_require__(/*! ./Geocoding/GeocodingApi */ \"./dist/Geocoding/GeocodingApi.js\");\nvar ApplicationApi_1 = __webpack_require__(/*! ./Application/ApplicationApi */ \"./dist/Application/ApplicationApi.js\");\nvar CustomerAvailabilityHourApi_1 = __webpack_require__(/*! ./CustomerAvailabilityHour/CustomerAvailabilityHourApi */ \"./dist/CustomerAvailabilityHour/CustomerAvailabilityHourApi.js\");\nvar ShiftsApi_1 = __webpack_require__(/*! ./Shifts/ShiftsApi */ \"./dist/Shifts/ShiftsApi.js\");\nvar ExclusionWindowApi_1 = __webpack_require__(/*! ./ExclusionWindow/ExclusionWindowApi */ \"./dist/ExclusionWindow/ExclusionWindowApi.js\");\nvar Country_1 = __webpack_require__(/*! ./Country/Country */ \"./dist/Country/Country.js\");\nvar OauthApplicationApi_1 = __webpack_require__(/*! ./OauthApplications/OauthApplicationApi */ \"./dist/OauthApplications/OauthApplicationApi.js\");\nvar Inventory_1 = __webpack_require__(/*! ./Inventory/Inventory */ \"./dist/Inventory/Inventory.js\");\nvar PushNotificationRegistration_1 = __webpack_require__(/*! ./PushNotificationRegistration/PushNotificationRegistration */ \"./dist/PushNotificationRegistration/PushNotificationRegistration.js\");\nvar ReasonToCancelTasksApi_1 = __webpack_require__(/*! ./ReasonToCancelTasks/ReasonToCancelTasksApi */ \"./dist/ReasonToCancelTasks/ReasonToCancelTasksApi.js\");\nvar CustomFilterApi_1 = __webpack_require__(/*! ./CustomFilter/CustomFilterApi */ \"./dist/CustomFilter/CustomFilterApi.js\");\nvar FloatingInventoryApi_1 = __webpack_require__(/*! ./FloatingInventory/FloatingInventoryApi */ \"./dist/FloatingInventory/FloatingInventoryApi.js\");\nvar ServiceAreaApi_1 = __webpack_require__(/*! ./ServiceArea/ServiceAreaApi */ \"./dist/ServiceArea/ServiceAreaApi.js\");\nvar BillingApi_1 = __webpack_require__(/*! ./Billing/BillingApi */ \"./dist/Billing/BillingApi.js\");\nvar PackageApi_1 = __webpack_require__(/*! ./Package/PackageApi */ \"./dist/Package/PackageApi.js\");\nvar TemplatesApi_1 = __webpack_require__(/*! ./Templates/TemplatesApi */ \"./dist/Templates/TemplatesApi.js\");\nvar UserAnalyticsApi_1 = __webpack_require__(/*! ./UserAnalytics/UserAnalyticsApi */ \"./dist/UserAnalytics/UserAnalyticsApi.js\");\nvar AnalyticsReportsApi_1 = __webpack_require__(/*! ./AnalyticsReports/AnalyticsReportsApi */ \"./dist/AnalyticsReports/AnalyticsReportsApi.js\");\nvar ServicePlansApi_1 = __webpack_require__(/*! ./ServicePlans/ServicePlansApi */ \"./dist/ServicePlans/ServicePlansApi.js\");\nvar AlertsApi_1 = __webpack_require__(/*! ./Alerts/AlertsApi */ \"./dist/Alerts/AlertsApi.js\");\nvar DeliveryCatalogApi_1 = __webpack_require__(/*! ./DeliveryCatalog/DeliveryCatalogApi */ \"./dist/DeliveryCatalog/DeliveryCatalogApi.js\");\nvar RouteOptimizationApi_1 = __webpack_require__(/*! ./RouteOptimization/RouteOptimizationApi */ \"./dist/RouteOptimization/RouteOptimizationApi.js\");\nvar RatesApi_1 = __webpack_require__(/*! ./Rates/RatesApi */ \"./dist/Rates/RatesApi.js\");\nvar RouteOptimizationService_1 = __webpack_require__(/*! ./RouteOptimization/RouteOptimizationService */ \"./dist/RouteOptimization/RouteOptimizationService.js\");\nvar ParkingSpotApi_1 = __webpack_require__(/*! ./ParkingSpot/ParkingSpotApi */ \"./dist/ParkingSpot/ParkingSpotApi.js\");\nvar BringgDashboardSDK = /** @class */ (function () {\n function BringgDashboardSDK(session) {\n this.applicationMerchantConfiguration = null;\n this.applicationTeamConfiguration = null;\n this.chat = null;\n this.companies = null;\n this.credentials = {};\n this.crews = null;\n this.crossAppTransport = null;\n this.customerConfiguration = null;\n this.customers = null;\n this.dashboard = null;\n this.deliveryBlocks = null;\n this.fleets = null;\n this.rules = null;\n this.floatingInventory = null;\n this.inventoryActionsConfigurations = null;\n this.languages = null;\n this.merchant = null;\n this.merchantConfiguration = null;\n this.notificationTemplates = null;\n this.notificationTypes = null;\n this.oauthApplication = null;\n this.plannedRoutes = null;\n this.privileges = null;\n this.reasonToChangeInventory = null;\n this.reasonToReassignTasks = null;\n this.reasonToCancelTasks = null;\n this.reportPreferences = null;\n this.reports = null;\n this.runs = null;\n this.rollouts = null;\n this.skills = null;\n this.taskConfigurations = null;\n this.taskInventory = null;\n this.inventory = null;\n this.tasks = null;\n this.teamConfiguration = null;\n this.teams = null;\n this.resourceUploads = null;\n this.userConfigurations = null;\n this.users = null;\n this.vehicleTypes = null;\n this.vehicles = null;\n this.session = session;\n }\n BringgDashboardSDK.init = function (session) {\n return __awaiter(this, void 0, void 0, function () {\n var bringg;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n bringg = new BringgDashboardSDK(session);\n bringg.application = new ApplicationApi_1.default(session);\n bringg.chat = new ChatConversationApi_1.default(session);\n bringg.companies = new Company_1.default(session);\n bringg.crossAppTransport = new CrossAppTransport_1.default();\n bringg.customerConfiguration = new customer_configuration_1.default(session);\n bringg.customers = new Customer_1.default(session);\n bringg.dashboard = new dashboard_1.default(session);\n bringg.deliveryBlocks = new DeliveryBlocksApi_1.DeliveryBlocksApi(session);\n bringg.fleets = new FleetApi_1.default(session);\n bringg.rules = new RuleApi_1.default(session);\n bringg.fleetRouterApi = new FleetRouterApi_1.default(session);\n bringg.alertConfiguration = new AlertConfigurationApi_1.default(session);\n bringg.workflow = new WorkflowApi_1.default(session);\n bringg.floatingInventory = new FloatingInventoryApi_1.default(session);\n bringg.geocoding = new GeocodingApi_1.default(session);\n bringg.googleMapsHelper = new GoogleMapsHelperApi_1.default(session);\n bringg.inventoryActionsConfigurations = new InventoryActionsConfiguration_1.default(session);\n bringg.languages = new Language_1.Language(session);\n bringg.merchant = new MerchantApi_1.default(session);\n bringg.merchantConfiguration = new MerchantConfigurationApi_1.MerchantConfigurationApi(session);\n bringg.notificationTemplates = new NotificationTemplate_1.NotificationTemplate(session);\n bringg.notificationTypes = new NotificationType_1.NotificationType(session);\n bringg.oauthApplication = new OauthApplicationApi_1.default(session);\n bringg.onboardings = new OnboardingApi_1.default(session);\n bringg.photos = new Photo_1.default(session);\n bringg.plannedRoutes = new PlannedRoutesApi_1.default(session);\n bringg.privileges = new PrivilegesApi_1.default(session);\n bringg.pushTokenSubscription = new PushTokenSubscriptionApi_1.default(session);\n bringg.pushNotificationRegistration = new PushNotificationRegistration_1.default(session);\n bringg.reasonToChangeInventory = new ReasonToChangeInventory_1.default(session);\n bringg.reasonToReassignTasks = new ReasonToReassignTasksApi_1.default(session);\n bringg.reasonToCancelTasks = new ReasonToCancelTasksApi_1.default(session);\n bringg.reportPreferences = new ReportPreference_1.default(session);\n bringg.reports = new reports_1.default(session);\n bringg.runs = new runs_1.default(session);\n bringg.scans = new ScanApi_1.default(session);\n bringg.rollouts = new RolloutsApi_1.default(session);\n bringg.service = new ServiceApi_1.default(session);\n bringg.signatures = new Signature_1.default(session);\n bringg.skills = new SkillsApi_1.default(session);\n bringg.tagCustomerConfigurations = new TagCustomerConfiguration_1.default(session);\n bringg.tagMerchantConfigurations = new TagMerchantConfiguration_1.default(session);\n bringg.tags = new Tag_1.default(session);\n bringg.taskConfigurations = new TaskConfiguration_1.default(session);\n bringg.taskInventory = new TaskInventory_1.default(session);\n bringg.inventory = new Inventory_1.default(session);\n bringg.tasks = new TaskApi_1.default(session);\n bringg.teamConfiguration = new TeamConfigurationApi_1.default(session);\n bringg.teams = new TeamApi_1.default(session);\n bringg.resourceUploads = new ResourceUploadApi_1.default(session);\n bringg.userConfigurations = new UserConfiguration_1.default(session);\n bringg.userTypes = new UserTypeApi_1.default(session);\n bringg.users = new Users_1.default(session);\n bringg.vehicleTypes = new VehicleTypeApi_1.default(session);\n bringg.vehicles = new VehicleApi_1.default(session);\n bringg.vrpAutoDispatchAnalytic = new VrpAutoDispatchAnalyticApi_1.default(session);\n bringg.webApplicationConfiguration = new WebApplicationConfigurationApi_1.default(session);\n bringg.fleetTemplates = new FleetTemplateApi_1.default(session);\n bringg.openFleets = new OpenFleetApi_1.default(session);\n bringg.customerAvailabilityHours = new CustomerAvailabilityHourApi_1.default(session);\n bringg.exclusionWindows = new ExclusionWindowApi_1.default(session);\n bringg.shifts = new ShiftsApi_1.default(session);\n bringg.customFilters = new CustomFilterApi_1.default(session);\n bringg.serviceAreas = new ServiceAreaApi_1.default(session);\n bringg.billing = new BillingApi_1.default(session);\n bringg.userAnalytics = new UserAnalyticsApi_1.default(session);\n bringg.analyticsReports = new AnalyticsReportsApi_1.default(session);\n bringg.servicePlans = new ServicePlansApi_1.default(session);\n bringg.alertsApi = new AlertsApi_1.default(session);\n bringg.deliveryCatalog = new DeliveryCatalogApi_1.default(session);\n bringg.packageApi = new PackageApi_1.default(session);\n bringg.templatesApi = new TemplatesApi_1.default(session);\n bringg.routeOptimizationApi = new RouteOptimizationApi_1.default(session);\n bringg.ratesApi = new RatesApi_1.default(session);\n bringg.routeOptimizationService = new RouteOptimizationService_1.default(session);\n bringg.parkingSpotApi = new ParkingSpotApi_1.default(session);\n // dependent\n bringg.crews = new Crew_1.default(session, bringg.users);\n bringg.applicationMerchantConfiguration = new ApplicationMerchantConfigurationApi_1.default(session, bringg.merchantConfiguration);\n bringg.applicationTeamConfiguration = new ApplicationTeamConfigurationApi_1.default(session);\n return [4 /*yield*/, BringgDashboardSDK.initSessionConfiguration(bringg)];\n case 1:\n _a.sent();\n return [2 /*return*/, Object.freeze(bringg)];\n }\n });\n });\n };\n BringgDashboardSDK.initSessionConfiguration = function (bringg) {\n var _a, _b;\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_c) {\n switch (_c.label) {\n case 0: return [4 /*yield*/, Promise.all([bringg.merchantConfiguration.get(), bringg.webApplicationConfiguration.get()])];\n case 1:\n _c.sent();\n if (!((_b = (_a = this._configurationProvider) === null || _a === void 0 ? void 0 : _a.isUserAnalyticsEnabled) === null || _b === void 0 ? void 0 : _b.call(_a))) return [3 /*break*/, 5];\n return [4 /*yield*/, bringg.userAnalytics.addSnippet({\n apiKey: this._configurationProvider.getUserAnalyticsApiKey()\n })];\n case 2:\n _c.sent();\n return [4 /*yield*/, bringg.merchant.get()];\n case 3:\n _c.sent();\n return [4 /*yield*/, bringg.userAnalytics.run({\n environment: BringgDashboardSDK._environment\n })];\n case 4:\n _c.sent();\n _c.label = 5;\n case 5: return [2 /*return*/];\n }\n });\n });\n };\n BringgDashboardSDK.setConfigurations = function (apiEndpointURL, monitorEndpointURL) {\n this._configurationProvider.getApiEndpoint = function () { return apiEndpointURL; };\n this._configurationProvider.getAuthenticationEndpoint = function () { return apiEndpointURL; };\n this._configurationProvider.getRegionDiscoveryEndpoint = function () { return apiEndpointURL; };\n this._configurationProvider.getMonitoringEndpoint = function () { return monitorEndpointURL; };\n };\n Object.defineProperty(BringgDashboardSDK, \"configurationProvider\", {\n get: function () {\n return BringgDashboardSDK._configurationProvider;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(BringgDashboardSDK, \"environment\", {\n get: function () {\n return this._environment;\n },\n enumerable: false,\n configurable: true\n });\n BringgDashboardSDK.initWithSessionCode = function (code, session, region) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, BringgDashboardSDK.login({ code: code, session: session, region: region })];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n BringgDashboardSDK.initWithEmail = function (email, password, merchant_uuid, recaptchaToken, recaptcha_qa_token, region) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, BringgDashboardSDK.login({\n email: email,\n password: password,\n merchant_uuid: merchant_uuid,\n recaptchaToken: recaptchaToken,\n recaptcha_qa_token: recaptcha_qa_token,\n region: region\n })];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n BringgDashboardSDK.initWithAuthToken = function (region, authenticationToken) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, BringgDashboardSDK.login({ region: region, authenticationToken: authenticationToken })];\n case 1: return [2 /*return*/, (_a.sent())];\n }\n });\n });\n };\n BringgDashboardSDK.loginInternal = function (sdkInitialiser, params) {\n return __awaiter(this, void 0, void 0, function () {\n var response;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, Session_1.default.init(params)];\n case 1:\n response = _a.sent();\n return [2 /*return*/, sdkInitialiser(response)];\n }\n });\n });\n };\n BringgDashboardSDK.login = function (params) {\n return __awaiter(this, void 0, void 0, function () {\n var configuration;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (!(BringgDashboardSDK.configurationProvider === null)) return [3 /*break*/, 2];\n return [4 /*yield*/, ConfigurationProvider_1.ConfigurationProvider.fromUrl(ConfigurationProvider_1.ConfigurationProvider.getConfigUrl(this._environment))];\n case 1:\n configuration = _a.sent();\n BringgDashboardSDK.setConfigurationProvider(configuration);\n _a.label = 2;\n case 2: return [4 /*yield*/, this.loginInternal(function (a) { return BringgDashboardSDK.init(a); }, params)];\n case 3: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n BringgDashboardSDK.prototype.logout = function (keepServerSession) {\n if (keepServerSession === void 0) { keepServerSession = false; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.session.logout(keepServerSession)];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n BringgDashboardSDK.resendConfirmationEmail = function (params) {\n return __awaiter(this, void 0, void 0, function () {\n var authService, email, password, merchant_uuid, recaptchaToken, recaptcha_qa_token;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n authService = AuthService_1.default.init(params.region);\n email = params.email, password = params.password, merchant_uuid = params.merchant_uuid, recaptchaToken = params.recaptchaToken, recaptcha_qa_token = params.recaptcha_qa_token;\n return [4 /*yield*/, authService.resendConfirmationEmail(email, password, merchant_uuid, recaptchaToken, recaptcha_qa_token)];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n BringgDashboardSDK.getCountriesList = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, Country_1.default.getCountries()];\n });\n });\n };\n BringgDashboardSDK.prototype.switchAccounts = function () {\n return __awaiter(this, void 0, void 0, function () {\n var _a, _b;\n return __generator(this, function (_c) {\n switch (_c.label) {\n case 0:\n _b = (_a = BringgDashboardSDK).init;\n return [4 /*yield*/, this.session.switchAccounts()];\n case 1: return [2 /*return*/, _b.apply(_a, [_c.sent()])];\n }\n });\n });\n };\n BringgDashboardSDK.prototype.impersonate = function (user_id) {\n return __awaiter(this, void 0, void 0, function () {\n var _a, _b;\n return __generator(this, function (_c) {\n switch (_c.label) {\n case 0:\n _b = (_a = BringgDashboardSDK).init;\n return [4 /*yield*/, this.session.impersonate(user_id)];\n case 1: return [2 /*return*/, _b.apply(_a, [_c.sent()])];\n }\n });\n });\n };\n BringgDashboardSDK.prototype.impersonateByTeam = function (team_id) {\n return __awaiter(this, void 0, void 0, function () {\n var _a, _b;\n return __generator(this, function (_c) {\n switch (_c.label) {\n case 0:\n _b = (_a = BringgDashboardSDK).init;\n return [4 /*yield*/, this.session.impersonateByTeam(team_id)];\n case 1: return [2 /*return*/, _b.apply(_a, [_c.sent()])];\n }\n });\n });\n };\n BringgDashboardSDK.prototype.unwindImpersonation = function () {\n return __awaiter(this, void 0, void 0, function () {\n var _a, _b;\n return __generator(this, function (_c) {\n switch (_c.label) {\n case 0:\n _b = (_a = BringgDashboardSDK).init;\n return [4 /*yield*/, this.session.unwindImpersonation()];\n case 1: return [2 /*return*/, _b.apply(_a, [_c.sent()])];\n }\n });\n });\n };\n BringgDashboardSDK._environment = 'production';\n BringgDashboardSDK._configurationProvider = null;\n BringgDashboardSDK.setConfigurationProvider = function (configurationProvider) {\n BringgDashboardSDK._configurationProvider = configurationProvider;\n };\n BringgDashboardSDK.setEnvironment = function (environment) {\n BringgDashboardSDK._environment = environment;\n };\n return BringgDashboardSDK;\n}());\nexports.BringgDashboardSDK = BringgDashboardSDK;\n//# sourceMappingURL=BringgDashboardSDK.js.map\n\n//# sourceURL=webpack://BringgDashboardSDK/./dist/BringgDashboardSDK.js?");
|
|
334
334
|
|
|
335
335
|
/***/ }),
|
|
336
336
|
|
|
@@ -2254,7 +2254,7 @@ eval("\nvar __extends = (this && this.__extends) || (function () {\n var exte
|
|
|
2254
2254
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2255
2255
|
|
|
2256
2256
|
"use strict";
|
|
2257
|
-
eval("\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n 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;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RealtimeConnection = void 0;\nvar Logger_1 = __webpack_require__(/*! ../Core/Logger */ \"./dist/Core/Logger.js\");\nvar socket_io_client_1 = __webpack_require__(/*! socket.io-client */ \"./node_modules/socket.io-client/build/index.js\");\nvar RealtimeConnection = /** @class */ (function () {\n function RealtimeConnection(endpoint, notifiable) {\n this.endpoint = endpoint;\n this.notifiable = notifiable;\n }\n RealtimeConnection.connect = function (endpoint, notifiable) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, new RealtimeConnection(endpoint, notifiable).initInternal()];\n });\n });\n };\n RealtimeConnection.prototype.disconnect = function () {\n return __awaiter(this, void 0, void 0, function () {\n var _this_1 = this;\n return __generator(this, function (_a) {\n return [2 /*return*/, new Promise(function (resolve, reject) {\n _this_1._socket.on('disconnect', function () {\n _this_1._socket.off('disconnect');\n _this_1._socket.close();\n resolve();\n });\n _this_1._socket.disconnect();\n var id = setTimeout(function () {\n clearTimeout(id);\n _this_1._socket.close();\n resolve();\n }, 5000);\n })];\n });\n });\n };\n RealtimeConnection.prototype.initInternal = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.initSocket()];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n //'this' passed intentionally to support better testability\n RealtimeConnection.prototype.handleOnConnectAsync = function (_this) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, new Promise(function (resolve, reject) {\n _this.handleOnConnect(resolve);\n })];\n case 1:\n _a.sent();\n return [2 /*return*/];\n }\n });\n });\n };\n RealtimeConnection.prototype.handleOnConnect = function (resolve) {\n var _this_1 = this;\n if (resolve === void 0) { resolve = null; }\n this._socket.on('connect', function () { return __awaiter(_this_1, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n Logger_1.default.debug('connected to server');\n if (!this.notifiable) return [3 /*break*/, 2];\n return [4 /*yield*/, this.notifiable.onConnect(this)];\n case 1:\n _a.sent();\n _a.label = 2;\n case 2:\n if (resolve) {\n resolve();\n }\n return [2 /*return*/];\n }\n });\n }); });\n };\n RealtimeConnection.prototype.handleOnReconnect = function () {\n var _this_1 = this;\n this._socket.on('reconnect', function () { return __awaiter(_this_1, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n Logger_1.default.debug('reconnected to server');\n if (!this.notifiable) return [3 /*break*/, 2];\n return [4 /*yield*/, this.notifiable.onReconnect(this)];\n case 1:\n _a.sent();\n _a.label = 2;\n case 2: return [2 /*return*/];\n }\n });\n }); });\n };\n RealtimeConnection.prototype.handleOnDisconnect = function () {\n var _this_1 = this;\n this._socket.on('disconnect', function () { return __awaiter(_this_1, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n Logger_1.default.debug('disconnected from server');\n if (!this.notifiable) return [3 /*break*/, 2];\n return [4 /*yield*/, this.notifiable.onDisconnect(this)];\n case 1:\n _a.sent();\n _a.label = 2;\n case 2: return [2 /*return*/];\n }\n });\n }); });\n };\n RealtimeConnection.prototype.initSocket = function () {\n return __awaiter(this, void 0, void 0, function () {\n var options;\n return __generator(this, function (_a) {\n options = {\n forceNew: false,\n multiplex: false,\n reconnection: true,\n autoConnect: true,\n transports: ['websocket'],\n transportOptions: {\n websocket: {\n port: this.endpoint.port,\n secure: this.endpoint.protocol === \"https:\" /* Https */ ||\n this.endpoint.protocol === \"wss:\" /* SecureWebSocket */\n }\n }\n };\n this._socket = socket_io_client_1.io(this.endpoint.encode(), options);\n this.handleOnConnect();\n this.handleOnReconnect();\n this.handleOnDisconnect();\n return [2 /*return*/, this];\n });\n });\n };\n Object.defineProperty(RealtimeConnection.prototype, \"socket\", {\n get: function () {\n return this._socket;\n },\n enumerable: false,\n configurable: true\n });\n return RealtimeConnection;\n}());\nexports.RealtimeConnection = RealtimeConnection;\n//# sourceMappingURL=RealtimeConnection.js.map\n\n//# sourceURL=webpack://BringgDashboardSDK/./dist/Services/RealtimeConnection.js?");
|
|
2257
|
+
eval("\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n 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;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RealtimeConnection = void 0;\nvar Logger_1 = __webpack_require__(/*! ../Core/Logger */ \"./dist/Core/Logger.js\");\nvar socket_io_client_1 = __webpack_require__(/*! socket.io-client */ \"./node_modules/socket.io-client/build/esm/index.js\");\nvar RealtimeConnection = /** @class */ (function () {\n function RealtimeConnection(endpoint, notifiable) {\n this.endpoint = endpoint;\n this.notifiable = notifiable;\n }\n RealtimeConnection.connect = function (endpoint, notifiable) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, new RealtimeConnection(endpoint, notifiable).initInternal()];\n });\n });\n };\n RealtimeConnection.prototype.disconnect = function () {\n return __awaiter(this, void 0, void 0, function () {\n var _this_1 = this;\n return __generator(this, function (_a) {\n return [2 /*return*/, new Promise(function (resolve, reject) {\n _this_1._socket.on('disconnect', function () {\n _this_1._socket.off('disconnect');\n _this_1._socket.close();\n resolve();\n });\n _this_1._socket.disconnect();\n var id = setTimeout(function () {\n clearTimeout(id);\n _this_1._socket.close();\n resolve();\n }, 5000);\n })];\n });\n });\n };\n RealtimeConnection.prototype.initInternal = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.initSocket()];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n //'this' passed intentionally to support better testability\n RealtimeConnection.prototype.handleOnConnectAsync = function (_this) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, new Promise(function (resolve, reject) {\n _this.handleOnConnect(resolve);\n })];\n case 1:\n _a.sent();\n return [2 /*return*/];\n }\n });\n });\n };\n RealtimeConnection.prototype.handleOnConnect = function (resolve) {\n var _this_1 = this;\n if (resolve === void 0) { resolve = null; }\n this._socket.on('connect', function () { return __awaiter(_this_1, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n Logger_1.default.debug('connected to server');\n if (!this.notifiable) return [3 /*break*/, 2];\n return [4 /*yield*/, this.notifiable.onConnect(this)];\n case 1:\n _a.sent();\n _a.label = 2;\n case 2:\n if (resolve) {\n resolve();\n }\n return [2 /*return*/];\n }\n });\n }); });\n };\n RealtimeConnection.prototype.handleOnReconnect = function () {\n var _this_1 = this;\n this._socket.on('reconnect', function () { return __awaiter(_this_1, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n Logger_1.default.debug('reconnected to server');\n if (!this.notifiable) return [3 /*break*/, 2];\n return [4 /*yield*/, this.notifiable.onReconnect(this)];\n case 1:\n _a.sent();\n _a.label = 2;\n case 2: return [2 /*return*/];\n }\n });\n }); });\n };\n RealtimeConnection.prototype.handleOnDisconnect = function () {\n var _this_1 = this;\n this._socket.on('disconnect', function () { return __awaiter(_this_1, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n Logger_1.default.debug('disconnected from server');\n if (!this.notifiable) return [3 /*break*/, 2];\n return [4 /*yield*/, this.notifiable.onDisconnect(this)];\n case 1:\n _a.sent();\n _a.label = 2;\n case 2: return [2 /*return*/];\n }\n });\n }); });\n };\n RealtimeConnection.prototype.initSocket = function () {\n return __awaiter(this, void 0, void 0, function () {\n var options;\n return __generator(this, function (_a) {\n options = {\n forceNew: false,\n multiplex: false,\n reconnection: true,\n autoConnect: true,\n transports: ['websocket'],\n transportOptions: {\n websocket: {\n port: this.endpoint.port,\n secure: this.endpoint.protocol === \"https:\" /* Https */ ||\n this.endpoint.protocol === \"wss:\" /* SecureWebSocket */\n }\n }\n };\n this._socket = socket_io_client_1.io(this.endpoint.encode(), options);\n this.handleOnConnect();\n this.handleOnReconnect();\n this.handleOnDisconnect();\n return [2 /*return*/, this];\n });\n });\n };\n Object.defineProperty(RealtimeConnection.prototype, \"socket\", {\n get: function () {\n return this._socket;\n },\n enumerable: false,\n configurable: true\n });\n return RealtimeConnection;\n}());\nexports.RealtimeConnection = RealtimeConnection;\n//# sourceMappingURL=RealtimeConnection.js.map\n\n//# sourceURL=webpack://BringgDashboardSDK/./dist/Services/RealtimeConnection.js?");
|
|
2258
2258
|
|
|
2259
2259
|
/***/ }),
|
|
2260
2260
|
|
|
@@ -2280,7 +2280,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexport
|
|
|
2280
2280
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2281
2281
|
|
|
2282
2282
|
"use strict";
|
|
2283
|
-
eval("\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n 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;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AnonymousServiceRequest = exports.AuthorizedServiceRequest = exports.ResponseHandler = exports.RequestOptions = exports.logErrorResponse = void 0;\nvar axios_1 = __webpack_require__(/*! axios */ \"./node_modules/axios/index.js\");\nvar Logger_1 = __webpack_require__(/*! ../Core/Logger */ \"./dist/Core/Logger.js\");\nvar lodash_1 = __webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\");\nvar BringgException_1 = __webpack_require__(/*! ../Core/BringgException */ \"./dist/Core/BringgException.js\");\nvar version = '0.19.8';\nfunction logErrorResponse(response) {\n var data = response.data, status = response.status;\n try {\n Logger_1.default.error(response.config.method.toUpperCase(), response.config.url, status);\n }\n catch (e) { }\n try {\n Logger_1.default.info(response.config.method.toUpperCase(), response.config.url, status, data);\n }\n catch (e) { }\n try {\n Logger_1.default.debug(response);\n }\n catch (e) { }\n}\nexports.logErrorResponse = logErrorResponse;\nvar DEFAULT_TIMEOUT = 120000;\nvar RequestOptions = /** @class */ (function () {\n function RequestOptions(clientId, timeout, queryString, authenticationToken, headers) {\n // NiceToHave: move headers to HttpHeaders class\n this.headers = __assign(__assign({ 'Content-Type': 'application/json' }, headers), { 'sdk-version': version, Client: clientId });\n this.timeout = timeout;\n this.validateStatus = lodash_1.stubTrue;\n if (queryString) {\n this.params = queryString;\n }\n if (authenticationToken) {\n this.headers['Authorization'] = \"Token token=\" + authenticationToken;\n }\n }\n RequestOptions.new = function (_a) {\n var _b = _a === void 0 ? {} : _a, _c = _b.clientId, clientId = _c === void 0 ? 'Bringg Dashboard' : _c, _d = _b.timeout, timeout = _d === void 0 ? DEFAULT_TIMEOUT : _d, _e = _b.queryString, queryString = _e === void 0 ? undefined : _e, _f = _b.authenticationToken, authenticationToken = _f === void 0 ? undefined : _f, _g = _b.headers, headers = _g === void 0 ? undefined : _g;\n return new RequestOptions(clientId, timeout, queryString, authenticationToken, headers);\n };\n return RequestOptions;\n}());\nexports.RequestOptions = RequestOptions;\nvar ResponseHandler = /** @class */ (function () {\n function ResponseHandler(response) {\n this.axiosPromise = response;\n }\n ResponseHandler.prototype.handle = function (consumer) {\n return __awaiter(this, void 0, void 0, function () {\n var axiosResponse, e_1;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (lodash_1.isUndefined(consumer)) {\n throw new Error('consumer must be defined');\n }\n _a.label = 1;\n case 1:\n _a.trys.push([1, 3, , 4]);\n return [4 /*yield*/, this.axiosPromise];\n case 2:\n axiosResponse = _a.sent();\n return [2 /*return*/, consumer(axiosResponse)];\n case 3:\n e_1 = _a.sent();\n if (e_1 instanceof BringgException_1.BringgException) {\n throw e_1;\n }\n return [2 /*return*/, consumer(e_1)];\n case 4: return [2 /*return*/];\n }\n });\n });\n };\n return ResponseHandler;\n}());\nexports.ResponseHandler = ResponseHandler;\nfunction get(axiosInstance, host, uri, queryString) {\n return new ResponseHandler(axiosInstance.get(\"\" + host + uri, { params: queryString }));\n}\nfunction post(axiosInstance, host, uri, queryString, payload) {\n return new ResponseHandler(axiosInstance.post(\"\" + host + uri, payload, { params: queryString }));\n}\nfunction put(axiosInstance, host, uri, queryString, payload) {\n return new ResponseHandler(axiosInstance.put(\"\" + host + uri, payload, { params: queryString }));\n}\nfunction patch(axiosInstance, host, uri, queryString, payload) {\n return new ResponseHandler(axiosInstance.patch(\"\" + host + uri, payload, { params: queryString }));\n}\nfunction remove(axiosInstance, host, uri, queryString, payload) {\n return new ResponseHandler(axiosInstance.delete(\"\" + host + uri, { params: queryString, data: payload }));\n}\nfunction routify(axiosInstance, endpoint, route, routeParams, queryString, payload) {\n switch (route.httpMethod) {\n case 0 /* GET */:\n return get(axiosInstance, endpoint.encode(), route.applyParams(routeParams), queryString);\n case 1 /* POST */:\n return post(axiosInstance, endpoint.encode(), route.applyParams(routeParams), queryString, payload);\n case 2 /* PUT */:\n return put(axiosInstance, endpoint.encode(), route.applyParams(routeParams), queryString, payload);\n case 3 /* PATCH */:\n return patch(axiosInstance, endpoint.encode(), route.applyParams(routeParams), queryString, payload);\n case 4 /* DELETE */:\n return remove(axiosInstance, endpoint.encode(), route.applyParams(routeParams), queryString, payload);\n }\n}\nfunction wrapWithInterceptors(axios) {\n axios.interceptors.request.use(function (req) {\n var method = req.method, url = req.url, params = req.params, headers = req.headers, data = req.data;\n try {\n Logger_1.default.debug('REQUEST:', method.toUpperCase(), url);\n }\n catch (e) { }\n try {\n Logger_1.default.trace('REQUEST-query-string:', params);\n Logger_1.default.trace('REQUEST-headers:', headers);\n Logger_1.default.trace('REQUEST-data:', data);\n }\n catch (e) { }\n return req;\n });\n axios.interceptors.response.use(function (res) {\n var statusText = res.statusText, status = res.status, headers = res.headers, data = res.data;\n try {\n Logger_1.default.debug('RESPONSE:', res.config.url, status, statusText);\n }\n catch (e) { }\n try {\n Logger_1.default.trace('RESPONSE-headers:', headers);\n Logger_1.default.trace('RESPONSE-data:', data);\n }\n catch (e) { }\n return res;\n });\n return axios;\n}\nfunction axiosInstance(clientId, authenticationToken, headers) {\n return wrapWithInterceptors(axios_1.default.create(RequestOptions.new({ clientId: clientId, authenticationToken: authenticationToken, headers: headers })));\n}\nfunction anonymousAxiosInstance(clientId, headers) {\n return wrapWithInterceptors(axios_1.default.create(RequestOptions.new({ clientId: clientId, headers: headers })));\n}\nvar AuthorizedServiceRequest = /** @class */ (function () {\n function AuthorizedServiceRequest(clientId, authToken) {\n this.authToken = authToken;\n this.clientId = clientId;\n }\n AuthorizedServiceRequest.prototype.invoke = function (endpoint, route, routeParams, queryString, payload, headers) {\n return routify(axiosInstance(this.clientId, this.authToken, headers), endpoint, route, routeParams, queryString, payload);\n };\n return AuthorizedServiceRequest;\n}());\nexports.AuthorizedServiceRequest = AuthorizedServiceRequest;\nvar AnonymousServiceRequest = /** @class */ (function () {\n function AnonymousServiceRequest(clientId) {\n this.clientId = clientId;\n }\n AnonymousServiceRequest.prototype.invoke = function (endpoint, route, routeParams, queryString, payload) {\n return routify(anonymousAxiosInstance(this.clientId), endpoint, route, routeParams, queryString, payload);\n };\n return AnonymousServiceRequest;\n}());\nexports.AnonymousServiceRequest = AnonymousServiceRequest;\n//# sourceMappingURL=ServiceRequest.js.map\n\n//# sourceURL=webpack://BringgDashboardSDK/./dist/Services/ServiceRequest.js?");
|
|
2283
|
+
eval("\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n 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;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AnonymousServiceRequest = exports.AuthorizedServiceRequest = exports.ResponseHandler = exports.RequestOptions = exports.logErrorResponse = void 0;\nvar axios_1 = __webpack_require__(/*! axios */ \"./node_modules/axios/index.js\");\nvar Logger_1 = __webpack_require__(/*! ../Core/Logger */ \"./dist/Core/Logger.js\");\nvar lodash_1 = __webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\");\nvar BringgException_1 = __webpack_require__(/*! ../Core/BringgException */ \"./dist/Core/BringgException.js\");\nvar version = '0.19.10';\nfunction logErrorResponse(response) {\n var data = response.data, status = response.status;\n try {\n Logger_1.default.error(response.config.method.toUpperCase(), response.config.url, status);\n }\n catch (e) { }\n try {\n Logger_1.default.info(response.config.method.toUpperCase(), response.config.url, status, data);\n }\n catch (e) { }\n try {\n Logger_1.default.debug(response);\n }\n catch (e) { }\n}\nexports.logErrorResponse = logErrorResponse;\nvar DEFAULT_TIMEOUT = 120000;\nvar RequestOptions = /** @class */ (function () {\n function RequestOptions(clientId, timeout, queryString, authenticationToken, headers) {\n // NiceToHave: move headers to HttpHeaders class\n this.headers = __assign(__assign({ 'Content-Type': 'application/json' }, headers), { 'sdk-version': version, Client: clientId });\n this.timeout = timeout;\n this.validateStatus = lodash_1.stubTrue;\n if (queryString) {\n this.params = queryString;\n }\n if (authenticationToken) {\n this.headers['Authorization'] = \"Token token=\" + authenticationToken;\n }\n }\n RequestOptions.new = function (_a) {\n var _b = _a === void 0 ? {} : _a, _c = _b.clientId, clientId = _c === void 0 ? 'Bringg Dashboard' : _c, _d = _b.timeout, timeout = _d === void 0 ? DEFAULT_TIMEOUT : _d, _e = _b.queryString, queryString = _e === void 0 ? undefined : _e, _f = _b.authenticationToken, authenticationToken = _f === void 0 ? undefined : _f, _g = _b.headers, headers = _g === void 0 ? undefined : _g;\n return new RequestOptions(clientId, timeout, queryString, authenticationToken, headers);\n };\n return RequestOptions;\n}());\nexports.RequestOptions = RequestOptions;\nvar ResponseHandler = /** @class */ (function () {\n function ResponseHandler(response) {\n this.axiosPromise = response;\n }\n ResponseHandler.prototype.handle = function (consumer) {\n return __awaiter(this, void 0, void 0, function () {\n var axiosResponse, e_1;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (lodash_1.isUndefined(consumer)) {\n throw new Error('consumer must be defined');\n }\n _a.label = 1;\n case 1:\n _a.trys.push([1, 3, , 4]);\n return [4 /*yield*/, this.axiosPromise];\n case 2:\n axiosResponse = _a.sent();\n return [2 /*return*/, consumer(axiosResponse)];\n case 3:\n e_1 = _a.sent();\n if (e_1 instanceof BringgException_1.BringgException) {\n throw e_1;\n }\n return [2 /*return*/, consumer(e_1)];\n case 4: return [2 /*return*/];\n }\n });\n });\n };\n return ResponseHandler;\n}());\nexports.ResponseHandler = ResponseHandler;\nfunction get(axiosInstance, host, uri, queryString) {\n return new ResponseHandler(axiosInstance.get(\"\" + host + uri, { params: queryString }));\n}\nfunction post(axiosInstance, host, uri, queryString, payload) {\n return new ResponseHandler(axiosInstance.post(\"\" + host + uri, payload, { params: queryString }));\n}\nfunction put(axiosInstance, host, uri, queryString, payload) {\n return new ResponseHandler(axiosInstance.put(\"\" + host + uri, payload, { params: queryString }));\n}\nfunction patch(axiosInstance, host, uri, queryString, payload) {\n return new ResponseHandler(axiosInstance.patch(\"\" + host + uri, payload, { params: queryString }));\n}\nfunction remove(axiosInstance, host, uri, queryString, payload) {\n return new ResponseHandler(axiosInstance.delete(\"\" + host + uri, { params: queryString, data: payload }));\n}\nfunction routify(axiosInstance, endpoint, route, routeParams, queryString, payload) {\n switch (route.httpMethod) {\n case 0 /* GET */:\n return get(axiosInstance, endpoint.encode(), route.applyParams(routeParams), queryString);\n case 1 /* POST */:\n return post(axiosInstance, endpoint.encode(), route.applyParams(routeParams), queryString, payload);\n case 2 /* PUT */:\n return put(axiosInstance, endpoint.encode(), route.applyParams(routeParams), queryString, payload);\n case 3 /* PATCH */:\n return patch(axiosInstance, endpoint.encode(), route.applyParams(routeParams), queryString, payload);\n case 4 /* DELETE */:\n return remove(axiosInstance, endpoint.encode(), route.applyParams(routeParams), queryString, payload);\n }\n}\nfunction wrapWithInterceptors(axios) {\n axios.interceptors.request.use(function (req) {\n var method = req.method, url = req.url, params = req.params, headers = req.headers, data = req.data;\n try {\n Logger_1.default.debug('REQUEST:', method.toUpperCase(), url);\n }\n catch (e) { }\n try {\n Logger_1.default.trace('REQUEST-query-string:', params);\n Logger_1.default.trace('REQUEST-headers:', headers);\n Logger_1.default.trace('REQUEST-data:', data);\n }\n catch (e) { }\n return req;\n });\n axios.interceptors.response.use(function (res) {\n var statusText = res.statusText, status = res.status, headers = res.headers, data = res.data;\n try {\n Logger_1.default.debug('RESPONSE:', res.config.url, status, statusText);\n }\n catch (e) { }\n try {\n Logger_1.default.trace('RESPONSE-headers:', headers);\n Logger_1.default.trace('RESPONSE-data:', data);\n }\n catch (e) { }\n return res;\n });\n return axios;\n}\nfunction axiosInstance(clientId, authenticationToken, headers) {\n return wrapWithInterceptors(axios_1.default.create(RequestOptions.new({ clientId: clientId, authenticationToken: authenticationToken, headers: headers })));\n}\nfunction anonymousAxiosInstance(clientId, headers) {\n return wrapWithInterceptors(axios_1.default.create(RequestOptions.new({ clientId: clientId, headers: headers })));\n}\nvar AuthorizedServiceRequest = /** @class */ (function () {\n function AuthorizedServiceRequest(clientId, authToken) {\n this.authToken = authToken;\n this.clientId = clientId;\n }\n AuthorizedServiceRequest.prototype.invoke = function (endpoint, route, routeParams, queryString, payload, headers) {\n return routify(axiosInstance(this.clientId, this.authToken, headers), endpoint, route, routeParams, queryString, payload);\n };\n return AuthorizedServiceRequest;\n}());\nexports.AuthorizedServiceRequest = AuthorizedServiceRequest;\nvar AnonymousServiceRequest = /** @class */ (function () {\n function AnonymousServiceRequest(clientId) {\n this.clientId = clientId;\n }\n AnonymousServiceRequest.prototype.invoke = function (endpoint, route, routeParams, queryString, payload) {\n return routify(anonymousAxiosInstance(this.clientId), endpoint, route, routeParams, queryString, payload);\n };\n return AnonymousServiceRequest;\n}());\nexports.AnonymousServiceRequest = AnonymousServiceRequest;\n//# sourceMappingURL=ServiceRequest.js.map\n\n//# sourceURL=webpack://BringgDashboardSDK/./dist/Services/ServiceRequest.js?");
|
|
2284
2284
|
|
|
2285
2285
|
/***/ }),
|
|
2286
2286
|
|
|
@@ -2648,6 +2648,45 @@ eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Te
|
|
|
2648
2648
|
|
|
2649
2649
|
/***/ }),
|
|
2650
2650
|
|
|
2651
|
+
/***/ "./dist/Templates/Entity/TemplatesEntity.js":
|
|
2652
|
+
/*!**************************************************!*\
|
|
2653
|
+
!*** ./dist/Templates/Entity/TemplatesEntity.js ***!
|
|
2654
|
+
\**************************************************/
|
|
2655
|
+
/*! no static exports found */
|
|
2656
|
+
/*! all exports used */
|
|
2657
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
2658
|
+
|
|
2659
|
+
"use strict";
|
|
2660
|
+
eval("\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n 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;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Entity_1 = __webpack_require__(/*! ../../Core/Entity */ \"./dist/Core/Entity.js\");\nvar Templates_consts_1 = __webpack_require__(/*! ../Templates.consts */ \"./dist/Templates/Templates.consts.js\");\nvar TemplatesEntity = /** @class */ (function (_super) {\n __extends(TemplatesEntity, _super);\n function TemplatesEntity(session) {\n return _super.call(this, {\n session: session,\n entityName: 'templates'\n }) || this;\n }\n TemplatesEntity.prototype.printZPLPDF = function (body) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.service.routeGenerator\n .get(Templates_consts_1.Routes.ZPL_PRINTER)\n .withPayload(body)\n .setException('failed to print a PDF from ZPL')\n .invoke()];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n return TemplatesEntity;\n}(Entity_1.default));\nexports.default = TemplatesEntity;\n//# sourceMappingURL=TemplatesEntity.js.map\n\n//# sourceURL=webpack://BringgDashboardSDK/./dist/Templates/Entity/TemplatesEntity.js?");
|
|
2661
|
+
|
|
2662
|
+
/***/ }),
|
|
2663
|
+
|
|
2664
|
+
/***/ "./dist/Templates/Templates.consts.js":
|
|
2665
|
+
/*!********************************************!*\
|
|
2666
|
+
!*** ./dist/Templates/Templates.consts.js ***!
|
|
2667
|
+
\********************************************/
|
|
2668
|
+
/*! no static exports found */
|
|
2669
|
+
/*! all exports used */
|
|
2670
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
2671
|
+
|
|
2672
|
+
"use strict";
|
|
2673
|
+
eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Routes = void 0;\nvar baseRoute = 'templates-service/v1';\nexports.Routes = {\n ZPL_PRINTER: baseRoute + \"/printer/zpl\"\n};\n//# sourceMappingURL=Templates.consts.js.map\n\n//# sourceURL=webpack://BringgDashboardSDK/./dist/Templates/Templates.consts.js?");
|
|
2674
|
+
|
|
2675
|
+
/***/ }),
|
|
2676
|
+
|
|
2677
|
+
/***/ "./dist/Templates/TemplatesApi.js":
|
|
2678
|
+
/*!****************************************!*\
|
|
2679
|
+
!*** ./dist/Templates/TemplatesApi.js ***!
|
|
2680
|
+
\****************************************/
|
|
2681
|
+
/*! no static exports found */
|
|
2682
|
+
/*! all exports used */
|
|
2683
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
2684
|
+
|
|
2685
|
+
"use strict";
|
|
2686
|
+
eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar TemplatesEntity_1 = __webpack_require__(/*! ./Entity/TemplatesEntity */ \"./dist/Templates/Entity/TemplatesEntity.js\");\nvar TemplatesApi = /** @class */ (function () {\n function TemplatesApi(session) {\n this.templatesEntity = new TemplatesEntity_1.default(session);\n }\n TemplatesApi.prototype.printZPLPDF = function (body) {\n return this.templatesEntity.printZPLPDF(body);\n };\n return TemplatesApi;\n}());\nexports.default = TemplatesApi;\n//# sourceMappingURL=TemplatesApi.js.map\n\n//# sourceURL=webpack://BringgDashboardSDK/./dist/Templates/TemplatesApi.js?");
|
|
2687
|
+
|
|
2688
|
+
/***/ }),
|
|
2689
|
+
|
|
2651
2690
|
/***/ "./dist/User/Service/UsersService.js":
|
|
2652
2691
|
/*!*******************************************!*\
|
|
2653
2692
|
!*** ./dist/User/Service/UsersService.js ***!
|
|
@@ -4728,6 +4767,19 @@ eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexport
|
|
|
4728
4767
|
|
|
4729
4768
|
/***/ }),
|
|
4730
4769
|
|
|
4770
|
+
/***/ "./node_modules/@socket.io/component-emitter/index.mjs":
|
|
4771
|
+
/*!*************************************************************!*\
|
|
4772
|
+
!*** ./node_modules/@socket.io/component-emitter/index.mjs ***!
|
|
4773
|
+
\*************************************************************/
|
|
4774
|
+
/*! exports provided: Emitter */
|
|
4775
|
+
/*! exports used: Emitter */
|
|
4776
|
+
/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
4777
|
+
|
|
4778
|
+
"use strict";
|
|
4779
|
+
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Emitter; });\n/**\n * Initialize a new `Emitter`.\n *\n * @api public\n */\n\nfunction Emitter(obj) {\n if (obj) return mixin(obj);\n}\n\n/**\n * Mixin the emitter properties.\n *\n * @param {Object} obj\n * @return {Object}\n * @api private\n */\n\nfunction mixin(obj) {\n for (var key in Emitter.prototype) {\n obj[key] = Emitter.prototype[key];\n }\n return obj;\n}\n\n/**\n * Listen on the given `event` with `fn`.\n *\n * @param {String} event\n * @param {Function} fn\n * @return {Emitter}\n * @api public\n */\n\nEmitter.prototype.on =\nEmitter.prototype.addEventListener = function(event, fn){\n this._callbacks = this._callbacks || {};\n (this._callbacks['$' + event] = this._callbacks['$' + event] || [])\n .push(fn);\n return this;\n};\n\n/**\n * Adds an `event` listener that will be invoked a single\n * time then automatically removed.\n *\n * @param {String} event\n * @param {Function} fn\n * @return {Emitter}\n * @api public\n */\n\nEmitter.prototype.once = function(event, fn){\n function on() {\n this.off(event, on);\n fn.apply(this, arguments);\n }\n\n on.fn = fn;\n this.on(event, on);\n return this;\n};\n\n/**\n * Remove the given callback for `event` or all\n * registered callbacks.\n *\n * @param {String} event\n * @param {Function} fn\n * @return {Emitter}\n * @api public\n */\n\nEmitter.prototype.off =\nEmitter.prototype.removeListener =\nEmitter.prototype.removeAllListeners =\nEmitter.prototype.removeEventListener = function(event, fn){\n this._callbacks = this._callbacks || {};\n\n // all\n if (0 == arguments.length) {\n this._callbacks = {};\n return this;\n }\n\n // specific event\n var callbacks = this._callbacks['$' + event];\n if (!callbacks) return this;\n\n // remove all handlers\n if (1 == arguments.length) {\n delete this._callbacks['$' + event];\n return this;\n }\n\n // remove specific handler\n var cb;\n for (var i = 0; i < callbacks.length; i++) {\n cb = callbacks[i];\n if (cb === fn || cb.fn === fn) {\n callbacks.splice(i, 1);\n break;\n }\n }\n\n // Remove event specific arrays for event types that no\n // one is subscribed for to avoid memory leak.\n if (callbacks.length === 0) {\n delete this._callbacks['$' + event];\n }\n\n return this;\n};\n\n/**\n * Emit `event` with the given args.\n *\n * @param {String} event\n * @param {Mixed} ...\n * @return {Emitter}\n */\n\nEmitter.prototype.emit = function(event){\n this._callbacks = this._callbacks || {};\n\n var args = new Array(arguments.length - 1)\n , callbacks = this._callbacks['$' + event];\n\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n\n if (callbacks) {\n callbacks = callbacks.slice(0);\n for (var i = 0, len = callbacks.length; i < len; ++i) {\n callbacks[i].apply(this, args);\n }\n }\n\n return this;\n};\n\n// alias used for reserved events (protected method)\nEmitter.prototype.emitReserved = Emitter.prototype.emit;\n\n/**\n * Return array of callbacks for `event`.\n *\n * @param {String} event\n * @return {Array}\n * @api public\n */\n\nEmitter.prototype.listeners = function(event){\n this._callbacks = this._callbacks || {};\n return this._callbacks['$' + event] || [];\n};\n\n/**\n * Check if this emitter has `event` handlers.\n *\n * @param {String} event\n * @return {Boolean}\n * @api public\n */\n\nEmitter.prototype.hasListeners = function(event){\n return !! this.listeners(event).length;\n};\n\n\n//# sourceURL=webpack://BringgDashboardSDK/./node_modules/@socket.io/component-emitter/index.mjs?");
|
|
4780
|
+
|
|
4781
|
+
/***/ }),
|
|
4782
|
+
|
|
4731
4783
|
/***/ "./node_modules/axios/index.js":
|
|
4732
4784
|
/*!*************************************!*\
|
|
4733
4785
|
!*** ./node_modules/axios/index.js ***!
|
|
@@ -5078,30 +5130,6 @@ eval("\n\nvar bind = __webpack_require__(/*! ./helpers/bind */ \"./node_modules/
|
|
|
5078
5130
|
|
|
5079
5131
|
/***/ }),
|
|
5080
5132
|
|
|
5081
|
-
/***/ "./node_modules/backo2/index.js":
|
|
5082
|
-
/*!**************************************!*\
|
|
5083
|
-
!*** ./node_modules/backo2/index.js ***!
|
|
5084
|
-
\**************************************/
|
|
5085
|
-
/*! no static exports found */
|
|
5086
|
-
/*! all exports used */
|
|
5087
|
-
/***/ (function(module, exports) {
|
|
5088
|
-
|
|
5089
|
-
eval("\n/**\n * Expose `Backoff`.\n */\n\nmodule.exports = Backoff;\n\n/**\n * Initialize backoff timer with `opts`.\n *\n * - `min` initial timeout in milliseconds [100]\n * - `max` max timeout [10000]\n * - `jitter` [0]\n * - `factor` [2]\n *\n * @param {Object} opts\n * @api public\n */\n\nfunction Backoff(opts) {\n opts = opts || {};\n this.ms = opts.min || 100;\n this.max = opts.max || 10000;\n this.factor = opts.factor || 2;\n this.jitter = opts.jitter > 0 && opts.jitter <= 1 ? opts.jitter : 0;\n this.attempts = 0;\n}\n\n/**\n * Return the backoff duration.\n *\n * @return {Number}\n * @api public\n */\n\nBackoff.prototype.duration = function(){\n var ms = this.ms * Math.pow(this.factor, this.attempts++);\n if (this.jitter) {\n var rand = Math.random();\n var deviation = Math.floor(rand * this.jitter * ms);\n ms = (Math.floor(rand * 10) & 1) == 0 ? ms - deviation : ms + deviation;\n }\n return Math.min(ms, this.max) | 0;\n};\n\n/**\n * Reset the number of attempts.\n *\n * @api public\n */\n\nBackoff.prototype.reset = function(){\n this.attempts = 0;\n};\n\n/**\n * Set the minimum duration\n *\n * @api public\n */\n\nBackoff.prototype.setMin = function(min){\n this.ms = min;\n};\n\n/**\n * Set the maximum duration\n *\n * @api public\n */\n\nBackoff.prototype.setMax = function(max){\n this.max = max;\n};\n\n/**\n * Set the jitter\n *\n * @api public\n */\n\nBackoff.prototype.setJitter = function(jitter){\n this.jitter = jitter;\n};\n\n\n\n//# sourceURL=webpack://BringgDashboardSDK/./node_modules/backo2/index.js?");
|
|
5090
|
-
|
|
5091
|
-
/***/ }),
|
|
5092
|
-
|
|
5093
|
-
/***/ "./node_modules/base64-arraybuffer/lib/base64-arraybuffer.js":
|
|
5094
|
-
/*!*******************************************************************!*\
|
|
5095
|
-
!*** ./node_modules/base64-arraybuffer/lib/base64-arraybuffer.js ***!
|
|
5096
|
-
\*******************************************************************/
|
|
5097
|
-
/*! no static exports found */
|
|
5098
|
-
/*! all exports used */
|
|
5099
|
-
/***/ (function(module, exports) {
|
|
5100
|
-
|
|
5101
|
-
eval("/*\n * base64-arraybuffer\n * https://github.com/niklasvh/base64-arraybuffer\n *\n * Copyright (c) 2012 Niklas von Hertzen\n * Licensed under the MIT license.\n */\n(function(chars){\n \"use strict\";\n\n exports.encode = function(arraybuffer) {\n var bytes = new Uint8Array(arraybuffer),\n i, len = bytes.length, base64 = \"\";\n\n for (i = 0; i < len; i+=3) {\n base64 += chars[bytes[i] >> 2];\n base64 += chars[((bytes[i] & 3) << 4) | (bytes[i + 1] >> 4)];\n base64 += chars[((bytes[i + 1] & 15) << 2) | (bytes[i + 2] >> 6)];\n base64 += chars[bytes[i + 2] & 63];\n }\n\n if ((len % 3) === 2) {\n base64 = base64.substring(0, base64.length - 1) + \"=\";\n } else if (len % 3 === 1) {\n base64 = base64.substring(0, base64.length - 2) + \"==\";\n }\n\n return base64;\n };\n\n exports.decode = function(base64) {\n var bufferLength = base64.length * 0.75,\n len = base64.length, i, p = 0,\n encoded1, encoded2, encoded3, encoded4;\n\n if (base64[base64.length - 1] === \"=\") {\n bufferLength--;\n if (base64[base64.length - 2] === \"=\") {\n bufferLength--;\n }\n }\n\n var arraybuffer = new ArrayBuffer(bufferLength),\n bytes = new Uint8Array(arraybuffer);\n\n for (i = 0; i < len; i+=4) {\n encoded1 = chars.indexOf(base64[i]);\n encoded2 = chars.indexOf(base64[i+1]);\n encoded3 = chars.indexOf(base64[i+2]);\n encoded4 = chars.indexOf(base64[i+3]);\n\n bytes[p++] = (encoded1 << 2) | (encoded2 >> 4);\n bytes[p++] = ((encoded2 & 15) << 4) | (encoded3 >> 2);\n bytes[p++] = ((encoded3 & 3) << 6) | (encoded4 & 63);\n }\n\n return arraybuffer;\n };\n})(\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\");\n\n\n//# sourceURL=webpack://BringgDashboardSDK/./node_modules/base64-arraybuffer/lib/base64-arraybuffer.js?");
|
|
5102
|
-
|
|
5103
|
-
/***/ }),
|
|
5104
|
-
|
|
5105
5133
|
/***/ "./node_modules/base64-js/index.js":
|
|
5106
5134
|
/*!*****************************************!*\
|
|
5107
5135
|
!*** ./node_modules/base64-js/index.js ***!
|
|
@@ -5164,268 +5192,263 @@ eval("(function() {\n var base64map\n = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefg
|
|
|
5164
5192
|
|
|
5165
5193
|
/***/ }),
|
|
5166
5194
|
|
|
5167
|
-
/***/ "./node_modules/
|
|
5168
|
-
|
|
5169
|
-
!*** ./node_modules/
|
|
5170
|
-
|
|
5171
|
-
/*! no static exports found */
|
|
5172
|
-
/*! all exports used */
|
|
5173
|
-
/***/ (function(module, exports) {
|
|
5174
|
-
|
|
5175
|
-
eval("/**\n * Helpers.\n */\n\nvar s = 1000;\nvar m = s * 60;\nvar h = m * 60;\nvar d = h * 24;\nvar w = d * 7;\nvar y = d * 365.25;\n\n/**\n * Parse or format the given `val`.\n *\n * Options:\n *\n * - `long` verbose formatting [false]\n *\n * @param {String|Number} val\n * @param {Object} [options]\n * @throws {Error} throw an error if val is not a non-empty string or a number\n * @return {String|Number}\n * @api public\n */\n\nmodule.exports = function(val, options) {\n options = options || {};\n var type = typeof val;\n if (type === 'string' && val.length > 0) {\n return parse(val);\n } else if (type === 'number' && isFinite(val)) {\n return options.long ? fmtLong(val) : fmtShort(val);\n }\n throw new Error(\n 'val is not a non-empty string or a valid number. val=' +\n JSON.stringify(val)\n );\n};\n\n/**\n * Parse the given `str` and return milliseconds.\n *\n * @param {String} str\n * @return {Number}\n * @api private\n */\n\nfunction parse(str) {\n str = String(str);\n if (str.length > 100) {\n return;\n }\n var match = /^(-?(?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(\n str\n );\n if (!match) {\n return;\n }\n var n = parseFloat(match[1]);\n var type = (match[2] || 'ms').toLowerCase();\n switch (type) {\n case 'years':\n case 'year':\n case 'yrs':\n case 'yr':\n case 'y':\n return n * y;\n case 'weeks':\n case 'week':\n case 'w':\n return n * w;\n case 'days':\n case 'day':\n case 'd':\n return n * d;\n case 'hours':\n case 'hour':\n case 'hrs':\n case 'hr':\n case 'h':\n return n * h;\n case 'minutes':\n case 'minute':\n case 'mins':\n case 'min':\n case 'm':\n return n * m;\n case 'seconds':\n case 'second':\n case 'secs':\n case 'sec':\n case 's':\n return n * s;\n case 'milliseconds':\n case 'millisecond':\n case 'msecs':\n case 'msec':\n case 'ms':\n return n;\n default:\n return undefined;\n }\n}\n\n/**\n * Short format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtShort(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return Math.round(ms / d) + 'd';\n }\n if (msAbs >= h) {\n return Math.round(ms / h) + 'h';\n }\n if (msAbs >= m) {\n return Math.round(ms / m) + 'm';\n }\n if (msAbs >= s) {\n return Math.round(ms / s) + 's';\n }\n return ms + 'ms';\n}\n\n/**\n * Long format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtLong(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return plural(ms, msAbs, d, 'day');\n }\n if (msAbs >= h) {\n return plural(ms, msAbs, h, 'hour');\n }\n if (msAbs >= m) {\n return plural(ms, msAbs, m, 'minute');\n }\n if (msAbs >= s) {\n return plural(ms, msAbs, s, 'second');\n }\n return ms + ' ms';\n}\n\n/**\n * Pluralization helper.\n */\n\nfunction plural(ms, msAbs, n, name) {\n var isPlural = msAbs >= n * 1.5;\n return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');\n}\n\n\n//# sourceURL=webpack://BringgDashboardSDK/./node_modules/debug/node_modules/ms/index.js?");
|
|
5176
|
-
|
|
5177
|
-
/***/ }),
|
|
5178
|
-
|
|
5179
|
-
/***/ "./node_modules/debug/src/browser.js":
|
|
5180
|
-
/*!*******************************************!*\
|
|
5181
|
-
!*** ./node_modules/debug/src/browser.js ***!
|
|
5182
|
-
\*******************************************/
|
|
5195
|
+
/***/ "./node_modules/deepmerge/dist/cjs.js":
|
|
5196
|
+
/*!********************************************!*\
|
|
5197
|
+
!*** ./node_modules/deepmerge/dist/cjs.js ***!
|
|
5198
|
+
\********************************************/
|
|
5183
5199
|
/*! no static exports found */
|
|
5184
5200
|
/*! all exports used */
|
|
5185
5201
|
/***/ (function(module, exports, __webpack_require__) {
|
|
5186
5202
|
|
|
5187
|
-
|
|
5203
|
+
"use strict";
|
|
5204
|
+
eval("\n\nvar isMergeableObject = function isMergeableObject(value) {\n\treturn isNonNullObject(value)\n\t\t&& !isSpecial(value)\n};\n\nfunction isNonNullObject(value) {\n\treturn !!value && typeof value === 'object'\n}\n\nfunction isSpecial(value) {\n\tvar stringValue = Object.prototype.toString.call(value);\n\n\treturn stringValue === '[object RegExp]'\n\t\t|| stringValue === '[object Date]'\n\t\t|| isReactElement(value)\n}\n\n// see https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25\nvar canUseSymbol = typeof Symbol === 'function' && Symbol.for;\nvar REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for('react.element') : 0xeac7;\n\nfunction isReactElement(value) {\n\treturn value.$$typeof === REACT_ELEMENT_TYPE\n}\n\nfunction emptyTarget(val) {\n\treturn Array.isArray(val) ? [] : {}\n}\n\nfunction cloneUnlessOtherwiseSpecified(value, options) {\n\treturn (options.clone !== false && options.isMergeableObject(value))\n\t\t? deepmerge(emptyTarget(value), value, options)\n\t\t: value\n}\n\nfunction defaultArrayMerge(target, source, options) {\n\treturn target.concat(source).map(function(element) {\n\t\treturn cloneUnlessOtherwiseSpecified(element, options)\n\t})\n}\n\nfunction getMergeFunction(key, options) {\n\tif (!options.customMerge) {\n\t\treturn deepmerge\n\t}\n\tvar customMerge = options.customMerge(key);\n\treturn typeof customMerge === 'function' ? customMerge : deepmerge\n}\n\nfunction getEnumerableOwnPropertySymbols(target) {\n\treturn Object.getOwnPropertySymbols\n\t\t? Object.getOwnPropertySymbols(target).filter(function(symbol) {\n\t\t\treturn target.propertyIsEnumerable(symbol)\n\t\t})\n\t\t: []\n}\n\nfunction getKeys(target) {\n\treturn Object.keys(target).concat(getEnumerableOwnPropertySymbols(target))\n}\n\nfunction propertyIsOnObject(object, property) {\n\ttry {\n\t\treturn property in object\n\t} catch(_) {\n\t\treturn false\n\t}\n}\n\n// Protects from prototype poisoning and unexpected merging up the prototype chain.\nfunction propertyIsUnsafe(target, key) {\n\treturn propertyIsOnObject(target, key) // Properties are safe to merge if they don't exist in the target yet,\n\t\t&& !(Object.hasOwnProperty.call(target, key) // unsafe if they exist up the prototype chain,\n\t\t\t&& Object.propertyIsEnumerable.call(target, key)) // and also unsafe if they're nonenumerable.\n}\n\nfunction mergeObject(target, source, options) {\n\tvar destination = {};\n\tif (options.isMergeableObject(target)) {\n\t\tgetKeys(target).forEach(function(key) {\n\t\t\tdestination[key] = cloneUnlessOtherwiseSpecified(target[key], options);\n\t\t});\n\t}\n\tgetKeys(source).forEach(function(key) {\n\t\tif (propertyIsUnsafe(target, key)) {\n\t\t\treturn\n\t\t}\n\n\t\tif (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {\n\t\t\tdestination[key] = getMergeFunction(key, options)(target[key], source[key], options);\n\t\t} else {\n\t\t\tdestination[key] = cloneUnlessOtherwiseSpecified(source[key], options);\n\t\t}\n\t});\n\treturn destination\n}\n\nfunction deepmerge(target, source, options) {\n\toptions = options || {};\n\toptions.arrayMerge = options.arrayMerge || defaultArrayMerge;\n\toptions.isMergeableObject = options.isMergeableObject || isMergeableObject;\n\t// cloneUnlessOtherwiseSpecified is added to `options` so that custom arrayMerge()\n\t// implementations can use it. The caller may not replace it.\n\toptions.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;\n\n\tvar sourceIsArray = Array.isArray(source);\n\tvar targetIsArray = Array.isArray(target);\n\tvar sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;\n\n\tif (!sourceAndTargetTypesMatch) {\n\t\treturn cloneUnlessOtherwiseSpecified(source, options)\n\t} else if (sourceIsArray) {\n\t\treturn options.arrayMerge(target, source, options)\n\t} else {\n\t\treturn mergeObject(target, source, options)\n\t}\n}\n\ndeepmerge.all = function deepmergeAll(array, options) {\n\tif (!Array.isArray(array)) {\n\t\tthrow new Error('first argument should be an array')\n\t}\n\n\treturn array.reduce(function(prev, next) {\n\t\treturn deepmerge(prev, next, options)\n\t}, {})\n};\n\nvar deepmerge_1 = deepmerge;\n\nmodule.exports = deepmerge_1;\n\n\n//# sourceURL=webpack://BringgDashboardSDK/./node_modules/deepmerge/dist/cjs.js?");
|
|
5188
5205
|
|
|
5189
5206
|
/***/ }),
|
|
5190
5207
|
|
|
5191
|
-
/***/ "./node_modules/
|
|
5192
|
-
|
|
5193
|
-
!*** ./node_modules/
|
|
5194
|
-
|
|
5195
|
-
/*!
|
|
5196
|
-
/*!
|
|
5197
|
-
/***/ (function(module,
|
|
5208
|
+
/***/ "./node_modules/engine.io-client/build/esm/contrib/has-cors.js":
|
|
5209
|
+
/*!*********************************************************************!*\
|
|
5210
|
+
!*** ./node_modules/engine.io-client/build/esm/contrib/has-cors.js ***!
|
|
5211
|
+
\*********************************************************************/
|
|
5212
|
+
/*! exports provided: hasCORS */
|
|
5213
|
+
/*! exports used: hasCORS */
|
|
5214
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
5198
5215
|
|
|
5199
|
-
|
|
5216
|
+
"use strict";
|
|
5217
|
+
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return hasCORS; });\n// imported from https://github.com/component/has-cors\nlet value = false;\ntry {\n value = typeof XMLHttpRequest !== 'undefined' &&\n 'withCredentials' in new XMLHttpRequest();\n}\ncatch (err) {\n // if XMLHttp support is disabled in IE then it will throw\n // when trying to create\n}\nconst hasCORS = value;\n\n\n//# sourceURL=webpack://BringgDashboardSDK/./node_modules/engine.io-client/build/esm/contrib/has-cors.js?");
|
|
5200
5218
|
|
|
5201
5219
|
/***/ }),
|
|
5202
5220
|
|
|
5203
|
-
/***/ "./node_modules/
|
|
5204
|
-
|
|
5205
|
-
!*** ./node_modules/
|
|
5206
|
-
|
|
5207
|
-
/*!
|
|
5208
|
-
/*!
|
|
5209
|
-
/***/ (function(module,
|
|
5221
|
+
/***/ "./node_modules/engine.io-client/build/esm/contrib/parseqs.js":
|
|
5222
|
+
/*!********************************************************************!*\
|
|
5223
|
+
!*** ./node_modules/engine.io-client/build/esm/contrib/parseqs.js ***!
|
|
5224
|
+
\********************************************************************/
|
|
5225
|
+
/*! exports provided: encode, decode */
|
|
5226
|
+
/*! exports used: decode, encode */
|
|
5227
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
5210
5228
|
|
|
5211
5229
|
"use strict";
|
|
5212
|
-
eval("
|
|
5230
|
+
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return encode; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return decode; });\n// imported from https://github.com/galkn/querystring\n/**\n * Compiles a querystring\n * Returns string representation of the object\n *\n * @param {Object}\n * @api private\n */\nfunction encode(obj) {\n let str = '';\n for (let i in obj) {\n if (obj.hasOwnProperty(i)) {\n if (str.length)\n str += '&';\n str += encodeURIComponent(i) + '=' + encodeURIComponent(obj[i]);\n }\n }\n return str;\n}\n/**\n * Parses a simple querystring into an object\n *\n * @param {String} qs\n * @api private\n */\nfunction decode(qs) {\n let qry = {};\n let pairs = qs.split('&');\n for (let i = 0, l = pairs.length; i < l; i++) {\n let pair = pairs[i].split('=');\n qry[decodeURIComponent(pair[0])] = decodeURIComponent(pair[1]);\n }\n return qry;\n}\n\n\n//# sourceURL=webpack://BringgDashboardSDK/./node_modules/engine.io-client/build/esm/contrib/parseqs.js?");
|
|
5213
5231
|
|
|
5214
5232
|
/***/ }),
|
|
5215
5233
|
|
|
5216
|
-
/***/ "./node_modules/engine.io-client/
|
|
5217
|
-
|
|
5218
|
-
!*** ./node_modules/engine.io-client/
|
|
5219
|
-
|
|
5220
|
-
/*!
|
|
5221
|
-
/*!
|
|
5222
|
-
/***/ (function(module,
|
|
5234
|
+
/***/ "./node_modules/engine.io-client/build/esm/contrib/parseuri.js":
|
|
5235
|
+
/*!*********************************************************************!*\
|
|
5236
|
+
!*** ./node_modules/engine.io-client/build/esm/contrib/parseuri.js ***!
|
|
5237
|
+
\*********************************************************************/
|
|
5238
|
+
/*! exports provided: parse */
|
|
5239
|
+
/*! exports used: parse */
|
|
5240
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
5223
5241
|
|
|
5224
|
-
|
|
5242
|
+
"use strict";
|
|
5243
|
+
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return parse; });\n// imported from https://github.com/galkn/parseuri\n/**\n * Parses an URI\n *\n * @author Steven Levithan <stevenlevithan.com> (MIT license)\n * @api private\n */\nconst re = /^(?:(?![^:@]+:[^:@\\/]*@)(http|https|ws|wss):\\/\\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\\/?#]*)(?::(\\d*))?)(((\\/(?:[^?#](?![^?#\\/]*\\.[^?#\\/.]+(?:[?#]|$)))*\\/?)?([^?#\\/]*))(?:\\?([^#]*))?(?:#(.*))?)/;\nconst parts = [\n 'source', 'protocol', 'authority', 'userInfo', 'user', 'password', 'host', 'port', 'relative', 'path', 'directory', 'file', 'query', 'anchor'\n];\nfunction parse(str) {\n const src = str, b = str.indexOf('['), e = str.indexOf(']');\n if (b != -1 && e != -1) {\n str = str.substring(0, b) + str.substring(b, e).replace(/:/g, ';') + str.substring(e, str.length);\n }\n let m = re.exec(str || ''), uri = {}, i = 14;\n while (i--) {\n uri[parts[i]] = m[i] || '';\n }\n if (b != -1 && e != -1) {\n uri.source = src;\n uri.host = uri.host.substring(1, uri.host.length - 1).replace(/;/g, ':');\n uri.authority = uri.authority.replace('[', '').replace(']', '').replace(/;/g, ':');\n uri.ipv6uri = true;\n }\n uri.pathNames = pathNames(uri, uri['path']);\n uri.queryKey = queryKey(uri, uri['query']);\n return uri;\n}\nfunction pathNames(obj, path) {\n const regx = /\\/{2,9}/g, names = path.replace(regx, \"/\").split(\"/\");\n if (path.slice(0, 1) == '/' || path.length === 0) {\n names.splice(0, 1);\n }\n if (path.slice(-1) == '/') {\n names.splice(names.length - 1, 1);\n }\n return names;\n}\nfunction queryKey(uri, query) {\n const data = {};\n query.replace(/(?:^|&)([^&=]*)=?([^&]*)/g, function ($0, $1, $2) {\n if ($1) {\n data[$1] = $2;\n }\n });\n return data;\n}\n\n\n//# sourceURL=webpack://BringgDashboardSDK/./node_modules/engine.io-client/build/esm/contrib/parseuri.js?");
|
|
5225
5244
|
|
|
5226
5245
|
/***/ }),
|
|
5227
5246
|
|
|
5228
|
-
/***/ "./node_modules/engine.io-client/
|
|
5229
|
-
|
|
5230
|
-
!*** ./node_modules/engine.io-client/
|
|
5231
|
-
|
|
5232
|
-
/*!
|
|
5233
|
-
/*!
|
|
5234
|
-
/***/ (function(module,
|
|
5247
|
+
/***/ "./node_modules/engine.io-client/build/esm/contrib/yeast.js":
|
|
5248
|
+
/*!******************************************************************!*\
|
|
5249
|
+
!*** ./node_modules/engine.io-client/build/esm/contrib/yeast.js ***!
|
|
5250
|
+
\******************************************************************/
|
|
5251
|
+
/*! exports provided: encode, decode, yeast */
|
|
5252
|
+
/*! exports used: yeast */
|
|
5253
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
5235
5254
|
|
|
5236
|
-
|
|
5255
|
+
"use strict";
|
|
5256
|
+
eval("/* unused harmony export encode */\n/* unused harmony export decode */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return yeast; });\n// imported from https://github.com/unshiftio/yeast\n\nconst alphabet = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_'.split(''), length = 64, map = {};\nlet seed = 0, i = 0, prev;\n/**\n * Return a string representing the specified number.\n *\n * @param {Number} num The number to convert.\n * @returns {String} The string representation of the number.\n * @api public\n */\nfunction encode(num) {\n let encoded = '';\n do {\n encoded = alphabet[num % length] + encoded;\n num = Math.floor(num / length);\n } while (num > 0);\n return encoded;\n}\n/**\n * Return the integer value specified by the given string.\n *\n * @param {String} str The string to convert.\n * @returns {Number} The integer value represented by the string.\n * @api public\n */\nfunction decode(str) {\n let decoded = 0;\n for (i = 0; i < str.length; i++) {\n decoded = decoded * length + map[str.charAt(i)];\n }\n return decoded;\n}\n/**\n * Yeast: A tiny growing id generator.\n *\n * @returns {String} A unique id.\n * @api public\n */\nfunction yeast() {\n const now = encode(+new Date());\n if (now !== prev)\n return seed = 0, prev = now;\n return now + '.' + encode(seed++);\n}\n//\n// Map each character to its index.\n//\nfor (; i < length; i++)\n map[alphabet[i]] = i;\n\n\n//# sourceURL=webpack://BringgDashboardSDK/./node_modules/engine.io-client/build/esm/contrib/yeast.js?");
|
|
5237
5257
|
|
|
5238
5258
|
/***/ }),
|
|
5239
5259
|
|
|
5240
|
-
/***/ "./node_modules/engine.io-client/
|
|
5241
|
-
|
|
5242
|
-
!*** ./node_modules/engine.io-client/
|
|
5243
|
-
|
|
5244
|
-
/*!
|
|
5245
|
-
/*!
|
|
5246
|
-
/***/ (function(module,
|
|
5260
|
+
/***/ "./node_modules/engine.io-client/build/esm/globalThis.browser.js":
|
|
5261
|
+
/*!***********************************************************************!*\
|
|
5262
|
+
!*** ./node_modules/engine.io-client/build/esm/globalThis.browser.js ***!
|
|
5263
|
+
\***********************************************************************/
|
|
5264
|
+
/*! exports provided: globalThisShim */
|
|
5265
|
+
/*! exports used: globalThisShim */
|
|
5266
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
5247
5267
|
|
|
5248
|
-
eval("const transports = __webpack_require__(/*! ./transports/index */ \"./node_modules/engine.io-client/lib/transports/index.js\");\nconst Emitter = __webpack_require__(/*! component-emitter */ \"./node_modules/engine.io-client/node_modules/component-emitter/index.js\");\nconst debug = __webpack_require__(/*! debug */ \"./node_modules/debug/src/browser.js\")(\"engine.io-client:socket\");\nconst parser = __webpack_require__(/*! engine.io-parser */ \"./node_modules/engine.io-parser/lib/index.js\");\nconst parseuri = __webpack_require__(/*! parseuri */ \"./node_modules/parseuri/index.js\");\nconst parseqs = __webpack_require__(/*! parseqs */ \"./node_modules/parseqs/index.js\");\n\nclass Socket extends Emitter {\n /**\n * Socket constructor.\n *\n * @param {String|Object} uri or options\n * @param {Object} options\n * @api public\n */\n constructor(uri, opts = {}) {\n super();\n\n if (uri && \"object\" === typeof uri) {\n opts = uri;\n uri = null;\n }\n\n if (uri) {\n uri = parseuri(uri);\n opts.hostname = uri.host;\n opts.secure = uri.protocol === \"https\" || uri.protocol === \"wss\";\n opts.port = uri.port;\n if (uri.query) opts.query = uri.query;\n } else if (opts.host) {\n opts.hostname = parseuri(opts.host).host;\n }\n\n this.secure =\n null != opts.secure\n ? opts.secure\n : typeof location !== \"undefined\" && \"https:\" === location.protocol;\n\n if (opts.hostname && !opts.port) {\n // if no port is specified manually, use the protocol default\n opts.port = this.secure ? \"443\" : \"80\";\n }\n\n this.hostname =\n opts.hostname ||\n (typeof location !== \"undefined\" ? location.hostname : \"localhost\");\n this.port =\n opts.port ||\n (typeof location !== \"undefined\" && location.port\n ? location.port\n : this.secure\n ? 443\n : 80);\n\n this.transports = opts.transports || [\"polling\", \"websocket\"];\n this.readyState = \"\";\n this.writeBuffer = [];\n this.prevBufferLen = 0;\n\n this.opts = Object.assign(\n {\n path: \"/engine.io\",\n agent: false,\n withCredentials: false,\n upgrade: true,\n jsonp: true,\n timestampParam: \"t\",\n rememberUpgrade: false,\n rejectUnauthorized: true,\n perMessageDeflate: {\n threshold: 1024\n },\n transportOptions: {},\n closeOnBeforeunload: true\n },\n opts\n );\n\n this.opts.path = this.opts.path.replace(/\\/$/, \"\") + \"/\";\n\n if (typeof this.opts.query === \"string\") {\n this.opts.query = parseqs.decode(this.opts.query);\n }\n\n // set on handshake\n this.id = null;\n this.upgrades = null;\n this.pingInterval = null;\n this.pingTimeout = null;\n\n // set on heartbeat\n this.pingTimeoutTimer = null;\n\n if (typeof addEventListener === \"function\") {\n if (this.opts.closeOnBeforeunload) {\n // Firefox closes the connection when the \"beforeunload\" event is emitted but not Chrome. This event listener\n // ensures every browser behaves the same (no \"disconnect\" event at the Socket.IO level when the page is\n // closed/reloaded)\n addEventListener(\n \"beforeunload\",\n () => {\n if (this.transport) {\n // silently close the transport\n this.transport.removeAllListeners();\n this.transport.close();\n }\n },\n false\n );\n }\n if (this.hostname !== \"localhost\") {\n this.offlineEventListener = () => {\n this.onClose(\"transport close\");\n };\n addEventListener(\"offline\", this.offlineEventListener, false);\n }\n }\n\n this.open();\n }\n\n /**\n * Creates transport of the given type.\n *\n * @param {String} transport name\n * @return {Transport}\n * @api private\n */\n createTransport(name) {\n debug('creating transport \"%s\"', name);\n const query = clone(this.opts.query);\n\n // append engine.io protocol identifier\n query.EIO = parser.protocol;\n\n // transport name\n query.transport = name;\n\n // session id if we already have one\n if (this.id) query.sid = this.id;\n\n const opts = Object.assign(\n {},\n this.opts.transportOptions[name],\n this.opts,\n {\n query,\n socket: this,\n hostname: this.hostname,\n secure: this.secure,\n port: this.port\n }\n );\n\n debug(\"options: %j\", opts);\n\n return new transports[name](opts);\n }\n\n /**\n * Initializes transport to use and starts probe.\n *\n * @api private\n */\n open() {\n let transport;\n if (\n this.opts.rememberUpgrade &&\n Socket.priorWebsocketSuccess &&\n this.transports.indexOf(\"websocket\") !== -1\n ) {\n transport = \"websocket\";\n } else if (0 === this.transports.length) {\n // Emit error on next tick so it can be listened to\n setTimeout(() => {\n this.emit(\"error\", \"No transports available\");\n }, 0);\n return;\n } else {\n transport = this.transports[0];\n }\n this.readyState = \"opening\";\n\n // Retry with the next transport if the transport is disabled (jsonp: false)\n try {\n transport = this.createTransport(transport);\n } catch (e) {\n debug(\"error while creating transport: %s\", e);\n this.transports.shift();\n this.open();\n return;\n }\n\n transport.open();\n this.setTransport(transport);\n }\n\n /**\n * Sets the current transport. Disables the existing one (if any).\n *\n * @api private\n */\n setTransport(transport) {\n debug(\"setting transport %s\", transport.name);\n\n if (this.transport) {\n debug(\"clearing existing transport %s\", this.transport.name);\n this.transport.removeAllListeners();\n }\n\n // set up transport\n this.transport = transport;\n\n // set up transport listeners\n transport\n .on(\"drain\", this.onDrain.bind(this))\n .on(\"packet\", this.onPacket.bind(this))\n .on(\"error\", this.onError.bind(this))\n .on(\"close\", () => {\n this.onClose(\"transport close\");\n });\n }\n\n /**\n * Probes a transport.\n *\n * @param {String} transport name\n * @api private\n */\n probe(name) {\n debug('probing transport \"%s\"', name);\n let transport = this.createTransport(name, { probe: 1 });\n let failed = false;\n\n Socket.priorWebsocketSuccess = false;\n\n const onTransportOpen = () => {\n if (failed) return;\n\n debug('probe transport \"%s\" opened', name);\n transport.send([{ type: \"ping\", data: \"probe\" }]);\n transport.once(\"packet\", msg => {\n if (failed) return;\n if (\"pong\" === msg.type && \"probe\" === msg.data) {\n debug('probe transport \"%s\" pong', name);\n this.upgrading = true;\n this.emit(\"upgrading\", transport);\n if (!transport) return;\n Socket.priorWebsocketSuccess = \"websocket\" === transport.name;\n\n debug('pausing current transport \"%s\"', this.transport.name);\n this.transport.pause(() => {\n if (failed) return;\n if (\"closed\" === this.readyState) return;\n debug(\"changing transport and sending upgrade packet\");\n\n cleanup();\n\n this.setTransport(transport);\n transport.send([{ type: \"upgrade\" }]);\n this.emit(\"upgrade\", transport);\n transport = null;\n this.upgrading = false;\n this.flush();\n });\n } else {\n debug('probe transport \"%s\" failed', name);\n const err = new Error(\"probe error\");\n err.transport = transport.name;\n this.emit(\"upgradeError\", err);\n }\n });\n };\n\n function freezeTransport() {\n if (failed) return;\n\n // Any callback called by transport should be ignored since now\n failed = true;\n\n cleanup();\n\n transport.close();\n transport = null;\n }\n\n // Handle any error that happens while probing\n const onerror = err => {\n const error = new Error(\"probe error: \" + err);\n error.transport = transport.name;\n\n freezeTransport();\n\n debug('probe transport \"%s\" failed because of error: %s', name, err);\n\n this.emit(\"upgradeError\", error);\n };\n\n function onTransportClose() {\n onerror(\"transport closed\");\n }\n\n // When the socket is closed while we're probing\n function onclose() {\n onerror(\"socket closed\");\n }\n\n // When the socket is upgraded while we're probing\n function onupgrade(to) {\n if (transport && to.name !== transport.name) {\n debug('\"%s\" works - aborting \"%s\"', to.name, transport.name);\n freezeTransport();\n }\n }\n\n // Remove all listeners on the transport and on self\n const cleanup = () => {\n transport.removeListener(\"open\", onTransportOpen);\n transport.removeListener(\"error\", onerror);\n transport.removeListener(\"close\", onTransportClose);\n this.removeListener(\"close\", onclose);\n this.removeListener(\"upgrading\", onupgrade);\n };\n\n transport.once(\"open\", onTransportOpen);\n transport.once(\"error\", onerror);\n transport.once(\"close\", onTransportClose);\n\n this.once(\"close\", onclose);\n this.once(\"upgrading\", onupgrade);\n\n transport.open();\n }\n\n /**\n * Called when connection is deemed open.\n *\n * @api public\n */\n onOpen() {\n debug(\"socket open\");\n this.readyState = \"open\";\n Socket.priorWebsocketSuccess = \"websocket\" === this.transport.name;\n this.emit(\"open\");\n this.flush();\n\n // we check for `readyState` in case an `open`\n // listener already closed the socket\n if (\n \"open\" === this.readyState &&\n this.opts.upgrade &&\n this.transport.pause\n ) {\n debug(\"starting upgrade probes\");\n let i = 0;\n const l = this.upgrades.length;\n for (; i < l; i++) {\n this.probe(this.upgrades[i]);\n }\n }\n }\n\n /**\n * Handles a packet.\n *\n * @api private\n */\n onPacket(packet) {\n if (\n \"opening\" === this.readyState ||\n \"open\" === this.readyState ||\n \"closing\" === this.readyState\n ) {\n debug('socket receive: type \"%s\", data \"%s\"', packet.type, packet.data);\n\n this.emit(\"packet\", packet);\n\n // Socket is live - any packet counts\n this.emit(\"heartbeat\");\n\n switch (packet.type) {\n case \"open\":\n this.onHandshake(JSON.parse(packet.data));\n break;\n\n case \"ping\":\n this.resetPingTimeout();\n this.sendPacket(\"pong\");\n this.emit(\"ping\");\n this.emit(\"pong\");\n break;\n\n case \"error\":\n const err = new Error(\"server error\");\n err.code = packet.data;\n this.onError(err);\n break;\n\n case \"message\":\n this.emit(\"data\", packet.data);\n this.emit(\"message\", packet.data);\n break;\n }\n } else {\n debug('packet received with socket readyState \"%s\"', this.readyState);\n }\n }\n\n /**\n * Called upon handshake completion.\n *\n * @param {Object} handshake obj\n * @api private\n */\n onHandshake(data) {\n this.emit(\"handshake\", data);\n this.id = data.sid;\n this.transport.query.sid = data.sid;\n this.upgrades = this.filterUpgrades(data.upgrades);\n this.pingInterval = data.pingInterval;\n this.pingTimeout = data.pingTimeout;\n this.onOpen();\n // In case open handler closes socket\n if (\"closed\" === this.readyState) return;\n this.resetPingTimeout();\n }\n\n /**\n * Sets and resets ping timeout timer based on server pings.\n *\n * @api private\n */\n resetPingTimeout() {\n clearTimeout(this.pingTimeoutTimer);\n this.pingTimeoutTimer = setTimeout(() => {\n this.onClose(\"ping timeout\");\n }, this.pingInterval + this.pingTimeout);\n if (this.opts.autoUnref) {\n this.pingTimeoutTimer.unref();\n }\n }\n\n /**\n * Called on `drain` event\n *\n * @api private\n */\n onDrain() {\n this.writeBuffer.splice(0, this.prevBufferLen);\n\n // setting prevBufferLen = 0 is very important\n // for example, when upgrading, upgrade packet is sent over,\n // and a nonzero prevBufferLen could cause problems on `drain`\n this.prevBufferLen = 0;\n\n if (0 === this.writeBuffer.length) {\n this.emit(\"drain\");\n } else {\n this.flush();\n }\n }\n\n /**\n * Flush write buffers.\n *\n * @api private\n */\n flush() {\n if (\n \"closed\" !== this.readyState &&\n this.transport.writable &&\n !this.upgrading &&\n this.writeBuffer.length\n ) {\n debug(\"flushing %d packets in socket\", this.writeBuffer.length);\n this.transport.send(this.writeBuffer);\n // keep track of current length of writeBuffer\n // splice writeBuffer and callbackBuffer on `drain`\n this.prevBufferLen = this.writeBuffer.length;\n this.emit(\"flush\");\n }\n }\n\n /**\n * Sends a message.\n *\n * @param {String} message.\n * @param {Function} callback function.\n * @param {Object} options.\n * @return {Socket} for chaining.\n * @api public\n */\n write(msg, options, fn) {\n this.sendPacket(\"message\", msg, options, fn);\n return this;\n }\n\n send(msg, options, fn) {\n this.sendPacket(\"message\", msg, options, fn);\n return this;\n }\n\n /**\n * Sends a packet.\n *\n * @param {String} packet type.\n * @param {String} data.\n * @param {Object} options.\n * @param {Function} callback function.\n * @api private\n */\n sendPacket(type, data, options, fn) {\n if (\"function\" === typeof data) {\n fn = data;\n data = undefined;\n }\n\n if (\"function\" === typeof options) {\n fn = options;\n options = null;\n }\n\n if (\"closing\" === this.readyState || \"closed\" === this.readyState) {\n return;\n }\n\n options = options || {};\n options.compress = false !== options.compress;\n\n const packet = {\n type: type,\n data: data,\n options: options\n };\n this.emit(\"packetCreate\", packet);\n this.writeBuffer.push(packet);\n if (fn) this.once(\"flush\", fn);\n this.flush();\n }\n\n /**\n * Closes the connection.\n *\n * @api private\n */\n close() {\n const close = () => {\n this.onClose(\"forced close\");\n debug(\"socket closing - telling transport to close\");\n this.transport.close();\n };\n\n const cleanupAndClose = () => {\n this.removeListener(\"upgrade\", cleanupAndClose);\n this.removeListener(\"upgradeError\", cleanupAndClose);\n close();\n };\n\n const waitForUpgrade = () => {\n // wait for upgrade to finish since we can't send packets while pausing a transport\n this.once(\"upgrade\", cleanupAndClose);\n this.once(\"upgradeError\", cleanupAndClose);\n };\n\n if (\"opening\" === this.readyState || \"open\" === this.readyState) {\n this.readyState = \"closing\";\n\n if (this.writeBuffer.length) {\n this.once(\"drain\", () => {\n if (this.upgrading) {\n waitForUpgrade();\n } else {\n close();\n }\n });\n } else if (this.upgrading) {\n waitForUpgrade();\n } else {\n close();\n }\n }\n\n return this;\n }\n\n /**\n * Called upon transport error\n *\n * @api private\n */\n onError(err) {\n debug(\"socket error %j\", err);\n Socket.priorWebsocketSuccess = false;\n this.emit(\"error\", err);\n this.onClose(\"transport error\", err);\n }\n\n /**\n * Called upon transport close.\n *\n * @api private\n */\n onClose(reason, desc) {\n if (\n \"opening\" === this.readyState ||\n \"open\" === this.readyState ||\n \"closing\" === this.readyState\n ) {\n debug('socket close with reason: \"%s\"', reason);\n\n // clear timers\n clearTimeout(this.pingIntervalTimer);\n clearTimeout(this.pingTimeoutTimer);\n\n // stop event from firing again for transport\n this.transport.removeAllListeners(\"close\");\n\n // ensure transport won't stay open\n this.transport.close();\n\n // ignore further transport communication\n this.transport.removeAllListeners();\n\n if (typeof removeEventListener === \"function\") {\n removeEventListener(\"offline\", this.offlineEventListener, false);\n }\n\n // set ready state\n this.readyState = \"closed\";\n\n // clear session id\n this.id = null;\n\n // emit close event\n this.emit(\"close\", reason, desc);\n\n // clean buffers after, so users can still\n // grab the buffers on `close` event\n this.writeBuffer = [];\n this.prevBufferLen = 0;\n }\n }\n\n /**\n * Filters upgrades, returning only those matching client transports.\n *\n * @param {Array} server upgrades\n * @api private\n *\n */\n filterUpgrades(upgrades) {\n const filteredUpgrades = [];\n let i = 0;\n const j = upgrades.length;\n for (; i < j; i++) {\n if (~this.transports.indexOf(upgrades[i]))\n filteredUpgrades.push(upgrades[i]);\n }\n return filteredUpgrades;\n }\n}\n\nSocket.priorWebsocketSuccess = false;\n\n/**\n * Protocol version.\n *\n * @api public\n */\n\nSocket.protocol = parser.protocol; // this is an int\n\nfunction clone(obj) {\n const o = {};\n for (let i in obj) {\n if (obj.hasOwnProperty(i)) {\n o[i] = obj[i];\n }\n }\n return o;\n}\n\nmodule.exports = Socket;\n\n\n//# sourceURL=webpack://BringgDashboardSDK/./node_modules/engine.io-client/lib/socket.js?");
|
|
5268
|
+
"use strict";
|
|
5269
|
+
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return globalThisShim; });\nconst globalThisShim = (() => {\n if (typeof self !== \"undefined\") {\n return self;\n }\n else if (typeof window !== \"undefined\") {\n return window;\n }\n else {\n return Function(\"return this\")();\n }\n})();\n\n\n//# sourceURL=webpack://BringgDashboardSDK/./node_modules/engine.io-client/build/esm/globalThis.browser.js?");
|
|
5249
5270
|
|
|
5250
5271
|
/***/ }),
|
|
5251
5272
|
|
|
5252
|
-
/***/ "./node_modules/engine.io-client/
|
|
5253
|
-
|
|
5254
|
-
!*** ./node_modules/engine.io-client/
|
|
5255
|
-
|
|
5256
|
-
/*!
|
|
5257
|
-
/*!
|
|
5258
|
-
/***/ (function(module,
|
|
5273
|
+
/***/ "./node_modules/engine.io-client/build/esm/index.js":
|
|
5274
|
+
/*!**********************************************************!*\
|
|
5275
|
+
!*** ./node_modules/engine.io-client/build/esm/index.js ***!
|
|
5276
|
+
\**********************************************************/
|
|
5277
|
+
/*! exports provided: Socket, protocol, Transport, transports, installTimerFunctions, parse, nextTick */
|
|
5278
|
+
/*! exports used: Socket, installTimerFunctions, nextTick, parse */
|
|
5279
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
5259
5280
|
|
|
5260
|
-
|
|
5281
|
+
"use strict";
|
|
5282
|
+
eval("/* unused harmony export protocol */\n/* harmony import */ var _socket_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./socket.js */ \"./node_modules/engine.io-client/build/esm/socket.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return _socket_js__WEBPACK_IMPORTED_MODULE_0__[\"a\"]; });\n\n/* harmony import */ var _transport_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./transport.js */ \"./node_modules/engine.io-client/build/esm/transport.js\");\n/* harmony import */ var _transports_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./transports/index.js */ \"./node_modules/engine.io-client/build/esm/transports/index.js\");\n/* harmony import */ var _util_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./util.js */ \"./node_modules/engine.io-client/build/esm/util.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return _util_js__WEBPACK_IMPORTED_MODULE_3__[\"b\"]; });\n\n/* harmony import */ var _contrib_parseuri_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./contrib/parseuri.js */ \"./node_modules/engine.io-client/build/esm/contrib/parseuri.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return _contrib_parseuri_js__WEBPACK_IMPORTED_MODULE_4__[\"a\"]; });\n\n/* harmony import */ var _transports_websocket_constructor_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./transports/websocket-constructor.js */ \"./node_modules/engine.io-client/build/esm/transports/websocket-constructor.browser.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return _transports_websocket_constructor_js__WEBPACK_IMPORTED_MODULE_5__[\"c\"]; });\n\n\n\nconst protocol = _socket_js__WEBPACK_IMPORTED_MODULE_0__[/* Socket */ \"a\"].protocol;\n\n\n\n\n\n\n\n//# sourceURL=webpack://BringgDashboardSDK/./node_modules/engine.io-client/build/esm/index.js?");
|
|
5261
5283
|
|
|
5262
5284
|
/***/ }),
|
|
5263
5285
|
|
|
5264
|
-
/***/ "./node_modules/engine.io-client/
|
|
5265
|
-
|
|
5266
|
-
!*** ./node_modules/engine.io-client/
|
|
5267
|
-
|
|
5268
|
-
/*!
|
|
5269
|
-
/*!
|
|
5270
|
-
/***/ (function(module,
|
|
5286
|
+
/***/ "./node_modules/engine.io-client/build/esm/socket.js":
|
|
5287
|
+
/*!***********************************************************!*\
|
|
5288
|
+
!*** ./node_modules/engine.io-client/build/esm/socket.js ***!
|
|
5289
|
+
\***********************************************************/
|
|
5290
|
+
/*! exports provided: Socket */
|
|
5291
|
+
/*! exports used: Socket */
|
|
5292
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
5271
5293
|
|
|
5272
|
-
|
|
5294
|
+
"use strict";
|
|
5295
|
+
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Socket; });\n/* harmony import */ var _transports_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./transports/index.js */ \"./node_modules/engine.io-client/build/esm/transports/index.js\");\n/* harmony import */ var _util_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./util.js */ \"./node_modules/engine.io-client/build/esm/util.js\");\n/* harmony import */ var _contrib_parseqs_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./contrib/parseqs.js */ \"./node_modules/engine.io-client/build/esm/contrib/parseqs.js\");\n/* harmony import */ var _contrib_parseuri_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./contrib/parseuri.js */ \"./node_modules/engine.io-client/build/esm/contrib/parseuri.js\");\n/* harmony import */ var _socket_io_component_emitter__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @socket.io/component-emitter */ \"./node_modules/@socket.io/component-emitter/index.mjs\");\n/* harmony import */ var engine_io_parser__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! engine.io-parser */ \"./node_modules/engine.io-parser/build/esm/index.js\");\n\n\n\n\n\n\nclass Socket extends _socket_io_component_emitter__WEBPACK_IMPORTED_MODULE_4__[/* Emitter */ \"a\"] {\n /**\n * Socket constructor.\n *\n * @param {String|Object} uri or options\n * @param {Object} opts - options\n * @api public\n */\n constructor(uri, opts = {}) {\n super();\n if (uri && \"object\" === typeof uri) {\n opts = uri;\n uri = null;\n }\n if (uri) {\n uri = Object(_contrib_parseuri_js__WEBPACK_IMPORTED_MODULE_3__[/* parse */ \"a\"])(uri);\n opts.hostname = uri.host;\n opts.secure = uri.protocol === \"https\" || uri.protocol === \"wss\";\n opts.port = uri.port;\n if (uri.query)\n opts.query = uri.query;\n }\n else if (opts.host) {\n opts.hostname = Object(_contrib_parseuri_js__WEBPACK_IMPORTED_MODULE_3__[/* parse */ \"a\"])(opts.host).host;\n }\n Object(_util_js__WEBPACK_IMPORTED_MODULE_1__[/* installTimerFunctions */ \"b\"])(this, opts);\n this.secure =\n null != opts.secure\n ? opts.secure\n : typeof location !== \"undefined\" && \"https:\" === location.protocol;\n if (opts.hostname && !opts.port) {\n // if no port is specified manually, use the protocol default\n opts.port = this.secure ? \"443\" : \"80\";\n }\n this.hostname =\n opts.hostname ||\n (typeof location !== \"undefined\" ? location.hostname : \"localhost\");\n this.port =\n opts.port ||\n (typeof location !== \"undefined\" && location.port\n ? location.port\n : this.secure\n ? \"443\"\n : \"80\");\n this.transports = opts.transports || [\"polling\", \"websocket\"];\n this.readyState = \"\";\n this.writeBuffer = [];\n this.prevBufferLen = 0;\n this.opts = Object.assign({\n path: \"/engine.io\",\n agent: false,\n withCredentials: false,\n upgrade: true,\n timestampParam: \"t\",\n rememberUpgrade: false,\n rejectUnauthorized: true,\n perMessageDeflate: {\n threshold: 1024\n },\n transportOptions: {},\n closeOnBeforeunload: true\n }, opts);\n this.opts.path = this.opts.path.replace(/\\/$/, \"\") + \"/\";\n if (typeof this.opts.query === \"string\") {\n this.opts.query = Object(_contrib_parseqs_js__WEBPACK_IMPORTED_MODULE_2__[/* decode */ \"a\"])(this.opts.query);\n }\n // set on handshake\n this.id = null;\n this.upgrades = null;\n this.pingInterval = null;\n this.pingTimeout = null;\n // set on heartbeat\n this.pingTimeoutTimer = null;\n if (typeof addEventListener === \"function\") {\n if (this.opts.closeOnBeforeunload) {\n // Firefox closes the connection when the \"beforeunload\" event is emitted but not Chrome. This event listener\n // ensures every browser behaves the same (no \"disconnect\" event at the Socket.IO level when the page is\n // closed/reloaded)\n this.beforeunloadEventListener = () => {\n if (this.transport) {\n // silently close the transport\n this.transport.removeAllListeners();\n this.transport.close();\n }\n };\n addEventListener(\"beforeunload\", this.beforeunloadEventListener, false);\n }\n if (this.hostname !== \"localhost\") {\n this.offlineEventListener = () => {\n this.onClose(\"transport close\", {\n description: \"network connection lost\"\n });\n };\n addEventListener(\"offline\", this.offlineEventListener, false);\n }\n }\n this.open();\n }\n /**\n * Creates transport of the given type.\n *\n * @param {String} transport name\n * @return {Transport}\n * @api private\n */\n createTransport(name) {\n const query = Object.assign({}, this.opts.query);\n // append engine.io protocol identifier\n query.EIO = engine_io_parser__WEBPACK_IMPORTED_MODULE_5__[/* protocol */ \"e\"];\n // transport name\n query.transport = name;\n // session id if we already have one\n if (this.id)\n query.sid = this.id;\n const opts = Object.assign({}, this.opts.transportOptions[name], this.opts, {\n query,\n socket: this,\n hostname: this.hostname,\n secure: this.secure,\n port: this.port\n });\n return new _transports_index_js__WEBPACK_IMPORTED_MODULE_0__[/* transports */ \"a\"][name](opts);\n }\n /**\n * Initializes transport to use and starts probe.\n *\n * @api private\n */\n open() {\n let transport;\n if (this.opts.rememberUpgrade &&\n Socket.priorWebsocketSuccess &&\n this.transports.indexOf(\"websocket\") !== -1) {\n transport = \"websocket\";\n }\n else if (0 === this.transports.length) {\n // Emit error on next tick so it can be listened to\n this.setTimeoutFn(() => {\n this.emitReserved(\"error\", \"No transports available\");\n }, 0);\n return;\n }\n else {\n transport = this.transports[0];\n }\n this.readyState = \"opening\";\n // Retry with the next transport if the transport is disabled (jsonp: false)\n try {\n transport = this.createTransport(transport);\n }\n catch (e) {\n this.transports.shift();\n this.open();\n return;\n }\n transport.open();\n this.setTransport(transport);\n }\n /**\n * Sets the current transport. Disables the existing one (if any).\n *\n * @api private\n */\n setTransport(transport) {\n if (this.transport) {\n this.transport.removeAllListeners();\n }\n // set up transport\n this.transport = transport;\n // set up transport listeners\n transport\n .on(\"drain\", this.onDrain.bind(this))\n .on(\"packet\", this.onPacket.bind(this))\n .on(\"error\", this.onError.bind(this))\n .on(\"close\", reason => this.onClose(\"transport close\", reason));\n }\n /**\n * Probes a transport.\n *\n * @param {String} transport name\n * @api private\n */\n probe(name) {\n let transport = this.createTransport(name);\n let failed = false;\n Socket.priorWebsocketSuccess = false;\n const onTransportOpen = () => {\n if (failed)\n return;\n transport.send([{ type: \"ping\", data: \"probe\" }]);\n transport.once(\"packet\", msg => {\n if (failed)\n return;\n if (\"pong\" === msg.type && \"probe\" === msg.data) {\n this.upgrading = true;\n this.emitReserved(\"upgrading\", transport);\n if (!transport)\n return;\n Socket.priorWebsocketSuccess = \"websocket\" === transport.name;\n this.transport.pause(() => {\n if (failed)\n return;\n if (\"closed\" === this.readyState)\n return;\n cleanup();\n this.setTransport(transport);\n transport.send([{ type: \"upgrade\" }]);\n this.emitReserved(\"upgrade\", transport);\n transport = null;\n this.upgrading = false;\n this.flush();\n });\n }\n else {\n const err = new Error(\"probe error\");\n // @ts-ignore\n err.transport = transport.name;\n this.emitReserved(\"upgradeError\", err);\n }\n });\n };\n function freezeTransport() {\n if (failed)\n return;\n // Any callback called by transport should be ignored since now\n failed = true;\n cleanup();\n transport.close();\n transport = null;\n }\n // Handle any error that happens while probing\n const onerror = err => {\n const error = new Error(\"probe error: \" + err);\n // @ts-ignore\n error.transport = transport.name;\n freezeTransport();\n this.emitReserved(\"upgradeError\", error);\n };\n function onTransportClose() {\n onerror(\"transport closed\");\n }\n // When the socket is closed while we're probing\n function onclose() {\n onerror(\"socket closed\");\n }\n // When the socket is upgraded while we're probing\n function onupgrade(to) {\n if (transport && to.name !== transport.name) {\n freezeTransport();\n }\n }\n // Remove all listeners on the transport and on self\n const cleanup = () => {\n transport.removeListener(\"open\", onTransportOpen);\n transport.removeListener(\"error\", onerror);\n transport.removeListener(\"close\", onTransportClose);\n this.off(\"close\", onclose);\n this.off(\"upgrading\", onupgrade);\n };\n transport.once(\"open\", onTransportOpen);\n transport.once(\"error\", onerror);\n transport.once(\"close\", onTransportClose);\n this.once(\"close\", onclose);\n this.once(\"upgrading\", onupgrade);\n transport.open();\n }\n /**\n * Called when connection is deemed open.\n *\n * @api private\n */\n onOpen() {\n this.readyState = \"open\";\n Socket.priorWebsocketSuccess = \"websocket\" === this.transport.name;\n this.emitReserved(\"open\");\n this.flush();\n // we check for `readyState` in case an `open`\n // listener already closed the socket\n if (\"open\" === this.readyState &&\n this.opts.upgrade &&\n this.transport.pause) {\n let i = 0;\n const l = this.upgrades.length;\n for (; i < l; i++) {\n this.probe(this.upgrades[i]);\n }\n }\n }\n /**\n * Handles a packet.\n *\n * @api private\n */\n onPacket(packet) {\n if (\"opening\" === this.readyState ||\n \"open\" === this.readyState ||\n \"closing\" === this.readyState) {\n this.emitReserved(\"packet\", packet);\n // Socket is live - any packet counts\n this.emitReserved(\"heartbeat\");\n switch (packet.type) {\n case \"open\":\n this.onHandshake(JSON.parse(packet.data));\n break;\n case \"ping\":\n this.resetPingTimeout();\n this.sendPacket(\"pong\");\n this.emitReserved(\"ping\");\n this.emitReserved(\"pong\");\n break;\n case \"error\":\n const err = new Error(\"server error\");\n // @ts-ignore\n err.code = packet.data;\n this.onError(err);\n break;\n case \"message\":\n this.emitReserved(\"data\", packet.data);\n this.emitReserved(\"message\", packet.data);\n break;\n }\n }\n else {\n }\n }\n /**\n * Called upon handshake completion.\n *\n * @param {Object} data - handshake obj\n * @api private\n */\n onHandshake(data) {\n this.emitReserved(\"handshake\", data);\n this.id = data.sid;\n this.transport.query.sid = data.sid;\n this.upgrades = this.filterUpgrades(data.upgrades);\n this.pingInterval = data.pingInterval;\n this.pingTimeout = data.pingTimeout;\n this.maxPayload = data.maxPayload;\n this.onOpen();\n // In case open handler closes socket\n if (\"closed\" === this.readyState)\n return;\n this.resetPingTimeout();\n }\n /**\n * Sets and resets ping timeout timer based on server pings.\n *\n * @api private\n */\n resetPingTimeout() {\n this.clearTimeoutFn(this.pingTimeoutTimer);\n this.pingTimeoutTimer = this.setTimeoutFn(() => {\n this.onClose(\"ping timeout\");\n }, this.pingInterval + this.pingTimeout);\n if (this.opts.autoUnref) {\n this.pingTimeoutTimer.unref();\n }\n }\n /**\n * Called on `drain` event\n *\n * @api private\n */\n onDrain() {\n this.writeBuffer.splice(0, this.prevBufferLen);\n // setting prevBufferLen = 0 is very important\n // for example, when upgrading, upgrade packet is sent over,\n // and a nonzero prevBufferLen could cause problems on `drain`\n this.prevBufferLen = 0;\n if (0 === this.writeBuffer.length) {\n this.emitReserved(\"drain\");\n }\n else {\n this.flush();\n }\n }\n /**\n * Flush write buffers.\n *\n * @api private\n */\n flush() {\n if (\"closed\" !== this.readyState &&\n this.transport.writable &&\n !this.upgrading &&\n this.writeBuffer.length) {\n const packets = this.getWritablePackets();\n this.transport.send(packets);\n // keep track of current length of writeBuffer\n // splice writeBuffer and callbackBuffer on `drain`\n this.prevBufferLen = packets.length;\n this.emitReserved(\"flush\");\n }\n }\n /**\n * Ensure the encoded size of the writeBuffer is below the maxPayload value sent by the server (only for HTTP\n * long-polling)\n *\n * @private\n */\n getWritablePackets() {\n const shouldCheckPayloadSize = this.maxPayload &&\n this.transport.name === \"polling\" &&\n this.writeBuffer.length > 1;\n if (!shouldCheckPayloadSize) {\n return this.writeBuffer;\n }\n let payloadSize = 1; // first packet type\n for (let i = 0; i < this.writeBuffer.length; i++) {\n const data = this.writeBuffer[i].data;\n if (data) {\n payloadSize += Object(_util_js__WEBPACK_IMPORTED_MODULE_1__[/* byteLength */ \"a\"])(data);\n }\n if (i > 0 && payloadSize > this.maxPayload) {\n return this.writeBuffer.slice(0, i);\n }\n payloadSize += 2; // separator + packet type\n }\n return this.writeBuffer;\n }\n /**\n * Sends a message.\n *\n * @param {String} message.\n * @param {Function} callback function.\n * @param {Object} options.\n * @return {Socket} for chaining.\n * @api public\n */\n write(msg, options, fn) {\n this.sendPacket(\"message\", msg, options, fn);\n return this;\n }\n send(msg, options, fn) {\n this.sendPacket(\"message\", msg, options, fn);\n return this;\n }\n /**\n * Sends a packet.\n *\n * @param {String} packet type.\n * @param {String} data.\n * @param {Object} options.\n * @param {Function} callback function.\n * @api private\n */\n sendPacket(type, data, options, fn) {\n if (\"function\" === typeof data) {\n fn = data;\n data = undefined;\n }\n if (\"function\" === typeof options) {\n fn = options;\n options = null;\n }\n if (\"closing\" === this.readyState || \"closed\" === this.readyState) {\n return;\n }\n options = options || {};\n options.compress = false !== options.compress;\n const packet = {\n type: type,\n data: data,\n options: options\n };\n this.emitReserved(\"packetCreate\", packet);\n this.writeBuffer.push(packet);\n if (fn)\n this.once(\"flush\", fn);\n this.flush();\n }\n /**\n * Closes the connection.\n *\n * @api public\n */\n close() {\n const close = () => {\n this.onClose(\"forced close\");\n this.transport.close();\n };\n const cleanupAndClose = () => {\n this.off(\"upgrade\", cleanupAndClose);\n this.off(\"upgradeError\", cleanupAndClose);\n close();\n };\n const waitForUpgrade = () => {\n // wait for upgrade to finish since we can't send packets while pausing a transport\n this.once(\"upgrade\", cleanupAndClose);\n this.once(\"upgradeError\", cleanupAndClose);\n };\n if (\"opening\" === this.readyState || \"open\" === this.readyState) {\n this.readyState = \"closing\";\n if (this.writeBuffer.length) {\n this.once(\"drain\", () => {\n if (this.upgrading) {\n waitForUpgrade();\n }\n else {\n close();\n }\n });\n }\n else if (this.upgrading) {\n waitForUpgrade();\n }\n else {\n close();\n }\n }\n return this;\n }\n /**\n * Called upon transport error\n *\n * @api private\n */\n onError(err) {\n Socket.priorWebsocketSuccess = false;\n this.emitReserved(\"error\", err);\n this.onClose(\"transport error\", err);\n }\n /**\n * Called upon transport close.\n *\n * @api private\n */\n onClose(reason, description) {\n if (\"opening\" === this.readyState ||\n \"open\" === this.readyState ||\n \"closing\" === this.readyState) {\n // clear timers\n this.clearTimeoutFn(this.pingTimeoutTimer);\n // stop event from firing again for transport\n this.transport.removeAllListeners(\"close\");\n // ensure transport won't stay open\n this.transport.close();\n // ignore further transport communication\n this.transport.removeAllListeners();\n if (typeof removeEventListener === \"function\") {\n removeEventListener(\"beforeunload\", this.beforeunloadEventListener, false);\n removeEventListener(\"offline\", this.offlineEventListener, false);\n }\n // set ready state\n this.readyState = \"closed\";\n // clear session id\n this.id = null;\n // emit close event\n this.emitReserved(\"close\", reason, description);\n // clean buffers after, so users can still\n // grab the buffers on `close` event\n this.writeBuffer = [];\n this.prevBufferLen = 0;\n }\n }\n /**\n * Filters upgrades, returning only those matching client transports.\n *\n * @param {Array} server upgrades\n * @api private\n *\n */\n filterUpgrades(upgrades) {\n const filteredUpgrades = [];\n let i = 0;\n const j = upgrades.length;\n for (; i < j; i++) {\n if (~this.transports.indexOf(upgrades[i]))\n filteredUpgrades.push(upgrades[i]);\n }\n return filteredUpgrades;\n }\n}\nSocket.protocol = engine_io_parser__WEBPACK_IMPORTED_MODULE_5__[/* protocol */ \"e\"];\n\n\n//# sourceURL=webpack://BringgDashboardSDK/./node_modules/engine.io-client/build/esm/socket.js?");
|
|
5273
5296
|
|
|
5274
5297
|
/***/ }),
|
|
5275
5298
|
|
|
5276
|
-
/***/ "./node_modules/engine.io-client/
|
|
5277
|
-
|
|
5278
|
-
!*** ./node_modules/engine.io-client/
|
|
5279
|
-
|
|
5280
|
-
/*!
|
|
5281
|
-
/*!
|
|
5282
|
-
/***/ (function(module,
|
|
5299
|
+
/***/ "./node_modules/engine.io-client/build/esm/transport.js":
|
|
5300
|
+
/*!**************************************************************!*\
|
|
5301
|
+
!*** ./node_modules/engine.io-client/build/esm/transport.js ***!
|
|
5302
|
+
\**************************************************************/
|
|
5303
|
+
/*! exports provided: Transport */
|
|
5304
|
+
/*! exports used: Transport */
|
|
5305
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
5283
5306
|
|
|
5284
|
-
|
|
5307
|
+
"use strict";
|
|
5308
|
+
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Transport; });\n/* harmony import */ var engine_io_parser__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! engine.io-parser */ \"./node_modules/engine.io-parser/build/esm/index.js\");\n/* harmony import */ var _socket_io_component_emitter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @socket.io/component-emitter */ \"./node_modules/@socket.io/component-emitter/index.mjs\");\n/* harmony import */ var _util_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./util.js */ \"./node_modules/engine.io-client/build/esm/util.js\");\n\n\n\nclass TransportError extends Error {\n constructor(reason, description, context) {\n super(reason);\n this.description = description;\n this.context = context;\n this.type = \"TransportError\";\n }\n}\nclass Transport extends _socket_io_component_emitter__WEBPACK_IMPORTED_MODULE_1__[/* Emitter */ \"a\"] {\n /**\n * Transport abstract constructor.\n *\n * @param {Object} options.\n * @api private\n */\n constructor(opts) {\n super();\n this.writable = false;\n Object(_util_js__WEBPACK_IMPORTED_MODULE_2__[/* installTimerFunctions */ \"b\"])(this, opts);\n this.opts = opts;\n this.query = opts.query;\n this.readyState = \"\";\n this.socket = opts.socket;\n }\n /**\n * Emits an error.\n *\n * @param {String} reason\n * @param description\n * @param context - the error context\n * @return {Transport} for chaining\n * @api protected\n */\n onError(reason, description, context) {\n super.emitReserved(\"error\", new TransportError(reason, description, context));\n return this;\n }\n /**\n * Opens the transport.\n *\n * @api public\n */\n open() {\n if (\"closed\" === this.readyState || \"\" === this.readyState) {\n this.readyState = \"opening\";\n this.doOpen();\n }\n return this;\n }\n /**\n * Closes the transport.\n *\n * @api public\n */\n close() {\n if (\"opening\" === this.readyState || \"open\" === this.readyState) {\n this.doClose();\n this.onClose();\n }\n return this;\n }\n /**\n * Sends multiple packets.\n *\n * @param {Array} packets\n * @api public\n */\n send(packets) {\n if (\"open\" === this.readyState) {\n this.write(packets);\n }\n else {\n // this might happen if the transport was silently closed in the beforeunload event handler\n }\n }\n /**\n * Called upon open\n *\n * @api protected\n */\n onOpen() {\n this.readyState = \"open\";\n this.writable = true;\n super.emitReserved(\"open\");\n }\n /**\n * Called with data.\n *\n * @param {String} data\n * @api protected\n */\n onData(data) {\n const packet = Object(engine_io_parser__WEBPACK_IMPORTED_MODULE_0__[/* decodePacket */ \"a\"])(data, this.socket.binaryType);\n this.onPacket(packet);\n }\n /**\n * Called with a decoded packet.\n *\n * @api protected\n */\n onPacket(packet) {\n super.emitReserved(\"packet\", packet);\n }\n /**\n * Called upon close.\n *\n * @api protected\n */\n onClose(details) {\n this.readyState = \"closed\";\n super.emitReserved(\"close\", details);\n }\n}\n\n\n//# sourceURL=webpack://BringgDashboardSDK/./node_modules/engine.io-client/build/esm/transport.js?");
|
|
5285
5309
|
|
|
5286
5310
|
/***/ }),
|
|
5287
5311
|
|
|
5288
|
-
/***/ "./node_modules/engine.io-client/
|
|
5312
|
+
/***/ "./node_modules/engine.io-client/build/esm/transports/index.js":
|
|
5289
5313
|
/*!*********************************************************************!*\
|
|
5290
|
-
!*** ./node_modules/engine.io-client/
|
|
5314
|
+
!*** ./node_modules/engine.io-client/build/esm/transports/index.js ***!
|
|
5291
5315
|
\*********************************************************************/
|
|
5292
|
-
/*!
|
|
5293
|
-
/*!
|
|
5294
|
-
/***/ (function(module,
|
|
5295
|
-
|
|
5296
|
-
eval("/* global attachEvent */\n\nconst XMLHttpRequest = __webpack_require__(/*! ../../contrib/xmlhttprequest-ssl/XMLHttpRequest */ \"./node_modules/engine.io-client/lib/xmlhttprequest.js\");\nconst Polling = __webpack_require__(/*! ./polling */ \"./node_modules/engine.io-client/lib/transports/polling.js\");\nconst Emitter = __webpack_require__(/*! component-emitter */ \"./node_modules/engine.io-client/node_modules/component-emitter/index.js\");\nconst { pick } = __webpack_require__(/*! ../util */ \"./node_modules/engine.io-client/lib/util.js\");\nconst globalThis = __webpack_require__(/*! ../globalThis */ \"./node_modules/engine.io-client/lib/globalThis.browser.js\");\n\nconst debug = __webpack_require__(/*! debug */ \"./node_modules/debug/src/browser.js\")(\"engine.io-client:polling-xhr\");\n\n/**\n * Empty function\n */\n\nfunction empty() {}\n\nconst hasXHR2 = (function() {\n const xhr = new XMLHttpRequest({ xdomain: false });\n return null != xhr.responseType;\n})();\n\nclass XHR extends Polling {\n /**\n * XHR Polling constructor.\n *\n * @param {Object} opts\n * @api public\n */\n constructor(opts) {\n super(opts);\n\n if (typeof location !== \"undefined\") {\n const isSSL = \"https:\" === location.protocol;\n let port = location.port;\n\n // some user agents have empty `location.port`\n if (!port) {\n port = isSSL ? 443 : 80;\n }\n\n this.xd =\n (typeof location !== \"undefined\" &&\n opts.hostname !== location.hostname) ||\n port !== opts.port;\n this.xs = opts.secure !== isSSL;\n }\n /**\n * XHR supports binary\n */\n const forceBase64 = opts && opts.forceBase64;\n this.supportsBinary = hasXHR2 && !forceBase64;\n }\n\n /**\n * Creates a request.\n *\n * @param {String} method\n * @api private\n */\n request(opts = {}) {\n Object.assign(opts, { xd: this.xd, xs: this.xs }, this.opts);\n return new Request(this.uri(), opts);\n }\n\n /**\n * Sends data.\n *\n * @param {String} data to send.\n * @param {Function} called upon flush.\n * @api private\n */\n doWrite(data, fn) {\n const req = this.request({\n method: \"POST\",\n data: data\n });\n req.on(\"success\", fn);\n req.on(\"error\", err => {\n this.onError(\"xhr post error\", err);\n });\n }\n\n /**\n * Starts a poll cycle.\n *\n * @api private\n */\n doPoll() {\n debug(\"xhr poll\");\n const req = this.request();\n req.on(\"data\", this.onData.bind(this));\n req.on(\"error\", err => {\n this.onError(\"xhr poll error\", err);\n });\n this.pollXhr = req;\n }\n}\n\nclass Request extends Emitter {\n /**\n * Request constructor\n *\n * @param {Object} options\n * @api public\n */\n constructor(uri, opts) {\n super();\n this.opts = opts;\n\n this.method = opts.method || \"GET\";\n this.uri = uri;\n this.async = false !== opts.async;\n this.data = undefined !== opts.data ? opts.data : null;\n\n this.create();\n }\n\n /**\n * Creates the XHR object and sends the request.\n *\n * @api private\n */\n create() {\n const opts = pick(\n this.opts,\n \"agent\",\n \"enablesXDR\",\n \"pfx\",\n \"key\",\n \"passphrase\",\n \"cert\",\n \"ca\",\n \"ciphers\",\n \"rejectUnauthorized\",\n \"autoUnref\"\n );\n opts.xdomain = !!this.opts.xd;\n opts.xscheme = !!this.opts.xs;\n\n const xhr = (this.xhr = new XMLHttpRequest(opts));\n\n try {\n debug(\"xhr open %s: %s\", this.method, this.uri);\n xhr.open(this.method, this.uri, this.async);\n try {\n if (this.opts.extraHeaders) {\n xhr.setDisableHeaderCheck && xhr.setDisableHeaderCheck(true);\n for (let i in this.opts.extraHeaders) {\n if (this.opts.extraHeaders.hasOwnProperty(i)) {\n xhr.setRequestHeader(i, this.opts.extraHeaders[i]);\n }\n }\n }\n } catch (e) {}\n\n if (\"POST\" === this.method) {\n try {\n xhr.setRequestHeader(\"Content-type\", \"text/plain;charset=UTF-8\");\n } catch (e) {}\n }\n\n try {\n xhr.setRequestHeader(\"Accept\", \"*/*\");\n } catch (e) {}\n\n // ie6 check\n if (\"withCredentials\" in xhr) {\n xhr.withCredentials = this.opts.withCredentials;\n }\n\n if (this.opts.requestTimeout) {\n xhr.timeout = this.opts.requestTimeout;\n }\n\n if (this.hasXDR()) {\n xhr.onload = () => {\n this.onLoad();\n };\n xhr.onerror = () => {\n this.onError(xhr.responseText);\n };\n } else {\n xhr.onreadystatechange = () => {\n if (4 !== xhr.readyState) return;\n if (200 === xhr.status || 1223 === xhr.status) {\n this.onLoad();\n } else {\n // make sure the `error` event handler that's user-set\n // does not throw in the same tick and gets caught here\n setTimeout(() => {\n this.onError(typeof xhr.status === \"number\" ? xhr.status : 0);\n }, 0);\n }\n };\n }\n\n debug(\"xhr data %s\", this.data);\n xhr.send(this.data);\n } catch (e) {\n // Need to defer since .create() is called directly from the constructor\n // and thus the 'error' event can only be only bound *after* this exception\n // occurs. Therefore, also, we cannot throw here at all.\n setTimeout(() => {\n this.onError(e);\n }, 0);\n return;\n }\n\n if (typeof document !== \"undefined\") {\n this.index = Request.requestsCount++;\n Request.requests[this.index] = this;\n }\n }\n\n /**\n * Called upon successful response.\n *\n * @api private\n */\n onSuccess() {\n this.emit(\"success\");\n this.cleanup();\n }\n\n /**\n * Called if we have data.\n *\n * @api private\n */\n onData(data) {\n this.emit(\"data\", data);\n this.onSuccess();\n }\n\n /**\n * Called upon error.\n *\n * @api private\n */\n onError(err) {\n this.emit(\"error\", err);\n this.cleanup(true);\n }\n\n /**\n * Cleans up house.\n *\n * @api private\n */\n cleanup(fromError) {\n if (\"undefined\" === typeof this.xhr || null === this.xhr) {\n return;\n }\n // xmlhttprequest\n if (this.hasXDR()) {\n this.xhr.onload = this.xhr.onerror = empty;\n } else {\n this.xhr.onreadystatechange = empty;\n }\n\n if (fromError) {\n try {\n this.xhr.abort();\n } catch (e) {}\n }\n\n if (typeof document !== \"undefined\") {\n delete Request.requests[this.index];\n }\n\n this.xhr = null;\n }\n\n /**\n * Called upon load.\n *\n * @api private\n */\n onLoad() {\n const data = this.xhr.responseText;\n if (data !== null) {\n this.onData(data);\n }\n }\n\n /**\n * Check if it has XDomainRequest.\n *\n * @api private\n */\n hasXDR() {\n return typeof XDomainRequest !== \"undefined\" && !this.xs && this.enablesXDR;\n }\n\n /**\n * Aborts the request.\n *\n * @api public\n */\n abort() {\n this.cleanup();\n }\n}\n\n/**\n * Aborts pending requests when unloading the window. This is needed to prevent\n * memory leaks (e.g. when using IE) and to ensure that no spurious error is\n * emitted.\n */\n\nRequest.requestsCount = 0;\nRequest.requests = {};\n\nif (typeof document !== \"undefined\") {\n if (typeof attachEvent === \"function\") {\n attachEvent(\"onunload\", unloadHandler);\n } else if (typeof addEventListener === \"function\") {\n const terminationEvent = \"onpagehide\" in globalThis ? \"pagehide\" : \"unload\";\n addEventListener(terminationEvent, unloadHandler, false);\n }\n}\n\nfunction unloadHandler() {\n for (let i in Request.requests) {\n if (Request.requests.hasOwnProperty(i)) {\n Request.requests[i].abort();\n }\n }\n}\n\nmodule.exports = XHR;\nmodule.exports.Request = Request;\n\n\n//# sourceURL=webpack://BringgDashboardSDK/./node_modules/engine.io-client/lib/transports/polling-xhr.js?");
|
|
5297
|
-
|
|
5298
|
-
/***/ }),
|
|
5299
|
-
|
|
5300
|
-
/***/ "./node_modules/engine.io-client/lib/transports/polling.js":
|
|
5301
|
-
/*!*****************************************************************!*\
|
|
5302
|
-
!*** ./node_modules/engine.io-client/lib/transports/polling.js ***!
|
|
5303
|
-
\*****************************************************************/
|
|
5304
|
-
/*! no static exports found */
|
|
5305
|
-
/*! all exports used */
|
|
5306
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
5316
|
+
/*! exports provided: transports */
|
|
5317
|
+
/*! exports used: transports */
|
|
5318
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
5307
5319
|
|
|
5308
|
-
|
|
5320
|
+
"use strict";
|
|
5321
|
+
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return transports; });\n/* harmony import */ var _polling_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./polling.js */ \"./node_modules/engine.io-client/build/esm/transports/polling.js\");\n/* harmony import */ var _websocket_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./websocket.js */ \"./node_modules/engine.io-client/build/esm/transports/websocket.js\");\n\n\nconst transports = {\n websocket: _websocket_js__WEBPACK_IMPORTED_MODULE_1__[/* WS */ \"a\"],\n polling: _polling_js__WEBPACK_IMPORTED_MODULE_0__[/* Polling */ \"a\"]\n};\n\n\n//# sourceURL=webpack://BringgDashboardSDK/./node_modules/engine.io-client/build/esm/transports/index.js?");
|
|
5309
5322
|
|
|
5310
5323
|
/***/ }),
|
|
5311
5324
|
|
|
5312
|
-
/***/ "./node_modules/engine.io-client/
|
|
5313
|
-
|
|
5314
|
-
!*** ./node_modules/engine.io-client/
|
|
5315
|
-
|
|
5316
|
-
/*!
|
|
5317
|
-
/*!
|
|
5318
|
-
/***/ (function(module,
|
|
5325
|
+
/***/ "./node_modules/engine.io-client/build/esm/transports/polling.js":
|
|
5326
|
+
/*!***********************************************************************!*\
|
|
5327
|
+
!*** ./node_modules/engine.io-client/build/esm/transports/polling.js ***!
|
|
5328
|
+
\***********************************************************************/
|
|
5329
|
+
/*! exports provided: Polling, Request */
|
|
5330
|
+
/*! exports used: Polling */
|
|
5331
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
5319
5332
|
|
|
5320
|
-
|
|
5333
|
+
"use strict";
|
|
5334
|
+
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Polling; });\n/* unused harmony export Request */\n/* harmony import */ var _transport_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../transport.js */ \"./node_modules/engine.io-client/build/esm/transport.js\");\n/* harmony import */ var _contrib_yeast_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../contrib/yeast.js */ \"./node_modules/engine.io-client/build/esm/contrib/yeast.js\");\n/* harmony import */ var _contrib_parseqs_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../contrib/parseqs.js */ \"./node_modules/engine.io-client/build/esm/contrib/parseqs.js\");\n/* harmony import */ var engine_io_parser__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! engine.io-parser */ \"./node_modules/engine.io-parser/build/esm/index.js\");\n/* harmony import */ var _xmlhttprequest_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./xmlhttprequest.js */ \"./node_modules/engine.io-client/build/esm/transports/xmlhttprequest.browser.js\");\n/* harmony import */ var _socket_io_component_emitter__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @socket.io/component-emitter */ \"./node_modules/@socket.io/component-emitter/index.mjs\");\n/* harmony import */ var _util_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../util.js */ \"./node_modules/engine.io-client/build/esm/util.js\");\n/* harmony import */ var _globalThis_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../globalThis.js */ \"./node_modules/engine.io-client/build/esm/globalThis.browser.js\");\n\n\n\n\n\n\n\n\nfunction empty() { }\nconst hasXHR2 = (function () {\n const xhr = new _xmlhttprequest_js__WEBPACK_IMPORTED_MODULE_4__[/* XHR */ \"a\"]({\n xdomain: false\n });\n return null != xhr.responseType;\n})();\nclass Polling extends _transport_js__WEBPACK_IMPORTED_MODULE_0__[/* Transport */ \"a\"] {\n /**\n * XHR Polling constructor.\n *\n * @param {Object} opts\n * @api public\n */\n constructor(opts) {\n super(opts);\n this.polling = false;\n if (typeof location !== \"undefined\") {\n const isSSL = \"https:\" === location.protocol;\n let port = location.port;\n // some user agents have empty `location.port`\n if (!port) {\n port = isSSL ? \"443\" : \"80\";\n }\n this.xd =\n (typeof location !== \"undefined\" &&\n opts.hostname !== location.hostname) ||\n port !== opts.port;\n this.xs = opts.secure !== isSSL;\n }\n /**\n * XHR supports binary\n */\n const forceBase64 = opts && opts.forceBase64;\n this.supportsBinary = hasXHR2 && !forceBase64;\n }\n /**\n * Transport name.\n */\n get name() {\n return \"polling\";\n }\n /**\n * Opens the socket (triggers polling). We write a PING message to determine\n * when the transport is open.\n *\n * @api private\n */\n doOpen() {\n this.poll();\n }\n /**\n * Pauses polling.\n *\n * @param {Function} callback upon buffers are flushed and transport is paused\n * @api private\n */\n pause(onPause) {\n this.readyState = \"pausing\";\n const pause = () => {\n this.readyState = \"paused\";\n onPause();\n };\n if (this.polling || !this.writable) {\n let total = 0;\n if (this.polling) {\n total++;\n this.once(\"pollComplete\", function () {\n --total || pause();\n });\n }\n if (!this.writable) {\n total++;\n this.once(\"drain\", function () {\n --total || pause();\n });\n }\n }\n else {\n pause();\n }\n }\n /**\n * Starts polling cycle.\n *\n * @api public\n */\n poll() {\n this.polling = true;\n this.doPoll();\n this.emitReserved(\"poll\");\n }\n /**\n * Overloads onData to detect payloads.\n *\n * @api private\n */\n onData(data) {\n const callback = packet => {\n // if its the first message we consider the transport open\n if (\"opening\" === this.readyState && packet.type === \"open\") {\n this.onOpen();\n }\n // if its a close packet, we close the ongoing requests\n if (\"close\" === packet.type) {\n this.onClose({ description: \"transport closed by the server\" });\n return false;\n }\n // otherwise bypass onData and handle the message\n this.onPacket(packet);\n };\n // decode payload\n Object(engine_io_parser__WEBPACK_IMPORTED_MODULE_3__[/* decodePayload */ \"b\"])(data, this.socket.binaryType).forEach(callback);\n // if an event did not trigger closing\n if (\"closed\" !== this.readyState) {\n // if we got data we're not polling\n this.polling = false;\n this.emitReserved(\"pollComplete\");\n if (\"open\" === this.readyState) {\n this.poll();\n }\n else {\n }\n }\n }\n /**\n * For polling, send a close packet.\n *\n * @api private\n */\n doClose() {\n const close = () => {\n this.write([{ type: \"close\" }]);\n };\n if (\"open\" === this.readyState) {\n close();\n }\n else {\n // in case we're trying to close while\n // handshaking is in progress (GH-164)\n this.once(\"open\", close);\n }\n }\n /**\n * Writes a packets payload.\n *\n * @param {Array} data packets\n * @param {Function} drain callback\n * @api private\n */\n write(packets) {\n this.writable = false;\n Object(engine_io_parser__WEBPACK_IMPORTED_MODULE_3__[/* encodePayload */ \"d\"])(packets, data => {\n this.doWrite(data, () => {\n this.writable = true;\n this.emitReserved(\"drain\");\n });\n });\n }\n /**\n * Generates uri for connection.\n *\n * @api private\n */\n uri() {\n let query = this.query || {};\n const schema = this.opts.secure ? \"https\" : \"http\";\n let port = \"\";\n // cache busting is forced\n if (false !== this.opts.timestampRequests) {\n query[this.opts.timestampParam] = Object(_contrib_yeast_js__WEBPACK_IMPORTED_MODULE_1__[/* yeast */ \"a\"])();\n }\n if (!this.supportsBinary && !query.sid) {\n query.b64 = 1;\n }\n // avoid port if default for schema\n if (this.opts.port &&\n ((\"https\" === schema && Number(this.opts.port) !== 443) ||\n (\"http\" === schema && Number(this.opts.port) !== 80))) {\n port = \":\" + this.opts.port;\n }\n const encodedQuery = Object(_contrib_parseqs_js__WEBPACK_IMPORTED_MODULE_2__[/* encode */ \"b\"])(query);\n const ipv6 = this.opts.hostname.indexOf(\":\") !== -1;\n return (schema +\n \"://\" +\n (ipv6 ? \"[\" + this.opts.hostname + \"]\" : this.opts.hostname) +\n port +\n this.opts.path +\n (encodedQuery.length ? \"?\" + encodedQuery : \"\"));\n }\n /**\n * Creates a request.\n *\n * @param {String} method\n * @api private\n */\n request(opts = {}) {\n Object.assign(opts, { xd: this.xd, xs: this.xs }, this.opts);\n return new Request(this.uri(), opts);\n }\n /**\n * Sends data.\n *\n * @param {String} data to send.\n * @param {Function} called upon flush.\n * @api private\n */\n doWrite(data, fn) {\n const req = this.request({\n method: \"POST\",\n data: data\n });\n req.on(\"success\", fn);\n req.on(\"error\", (xhrStatus, context) => {\n this.onError(\"xhr post error\", xhrStatus, context);\n });\n }\n /**\n * Starts a poll cycle.\n *\n * @api private\n */\n doPoll() {\n const req = this.request();\n req.on(\"data\", this.onData.bind(this));\n req.on(\"error\", (xhrStatus, context) => {\n this.onError(\"xhr poll error\", xhrStatus, context);\n });\n this.pollXhr = req;\n }\n}\nclass Request extends _socket_io_component_emitter__WEBPACK_IMPORTED_MODULE_5__[/* Emitter */ \"a\"] {\n /**\n * Request constructor\n *\n * @param {Object} options\n * @api public\n */\n constructor(uri, opts) {\n super();\n Object(_util_js__WEBPACK_IMPORTED_MODULE_6__[/* installTimerFunctions */ \"b\"])(this, opts);\n this.opts = opts;\n this.method = opts.method || \"GET\";\n this.uri = uri;\n this.async = false !== opts.async;\n this.data = undefined !== opts.data ? opts.data : null;\n this.create();\n }\n /**\n * Creates the XHR object and sends the request.\n *\n * @api private\n */\n create() {\n const opts = Object(_util_js__WEBPACK_IMPORTED_MODULE_6__[/* pick */ \"c\"])(this.opts, \"agent\", \"pfx\", \"key\", \"passphrase\", \"cert\", \"ca\", \"ciphers\", \"rejectUnauthorized\", \"autoUnref\");\n opts.xdomain = !!this.opts.xd;\n opts.xscheme = !!this.opts.xs;\n const xhr = (this.xhr = new _xmlhttprequest_js__WEBPACK_IMPORTED_MODULE_4__[/* XHR */ \"a\"](opts));\n try {\n xhr.open(this.method, this.uri, this.async);\n try {\n if (this.opts.extraHeaders) {\n xhr.setDisableHeaderCheck && xhr.setDisableHeaderCheck(true);\n for (let i in this.opts.extraHeaders) {\n if (this.opts.extraHeaders.hasOwnProperty(i)) {\n xhr.setRequestHeader(i, this.opts.extraHeaders[i]);\n }\n }\n }\n }\n catch (e) { }\n if (\"POST\" === this.method) {\n try {\n xhr.setRequestHeader(\"Content-type\", \"text/plain;charset=UTF-8\");\n }\n catch (e) { }\n }\n try {\n xhr.setRequestHeader(\"Accept\", \"*/*\");\n }\n catch (e) { }\n // ie6 check\n if (\"withCredentials\" in xhr) {\n xhr.withCredentials = this.opts.withCredentials;\n }\n if (this.opts.requestTimeout) {\n xhr.timeout = this.opts.requestTimeout;\n }\n xhr.onreadystatechange = () => {\n if (4 !== xhr.readyState)\n return;\n if (200 === xhr.status || 1223 === xhr.status) {\n this.onLoad();\n }\n else {\n // make sure the `error` event handler that's user-set\n // does not throw in the same tick and gets caught here\n this.setTimeoutFn(() => {\n this.onError(typeof xhr.status === \"number\" ? xhr.status : 0);\n }, 0);\n }\n };\n xhr.send(this.data);\n }\n catch (e) {\n // Need to defer since .create() is called directly from the constructor\n // and thus the 'error' event can only be only bound *after* this exception\n // occurs. Therefore, also, we cannot throw here at all.\n this.setTimeoutFn(() => {\n this.onError(e);\n }, 0);\n return;\n }\n if (typeof document !== \"undefined\") {\n this.index = Request.requestsCount++;\n Request.requests[this.index] = this;\n }\n }\n /**\n * Called upon error.\n *\n * @api private\n */\n onError(err) {\n this.emitReserved(\"error\", err, this.xhr);\n this.cleanup(true);\n }\n /**\n * Cleans up house.\n *\n * @api private\n */\n cleanup(fromError) {\n if (\"undefined\" === typeof this.xhr || null === this.xhr) {\n return;\n }\n this.xhr.onreadystatechange = empty;\n if (fromError) {\n try {\n this.xhr.abort();\n }\n catch (e) { }\n }\n if (typeof document !== \"undefined\") {\n delete Request.requests[this.index];\n }\n this.xhr = null;\n }\n /**\n * Called upon load.\n *\n * @api private\n */\n onLoad() {\n const data = this.xhr.responseText;\n if (data !== null) {\n this.emitReserved(\"data\", data);\n this.emitReserved(\"success\");\n this.cleanup();\n }\n }\n /**\n * Aborts the request.\n *\n * @api public\n */\n abort() {\n this.cleanup();\n }\n}\nRequest.requestsCount = 0;\nRequest.requests = {};\n/**\n * Aborts pending requests when unloading the window. This is needed to prevent\n * memory leaks (e.g. when using IE) and to ensure that no spurious error is\n * emitted.\n */\nif (typeof document !== \"undefined\") {\n // @ts-ignore\n if (typeof attachEvent === \"function\") {\n // @ts-ignore\n attachEvent(\"onunload\", unloadHandler);\n }\n else if (typeof addEventListener === \"function\") {\n const terminationEvent = \"onpagehide\" in _globalThis_js__WEBPACK_IMPORTED_MODULE_7__[/* globalThisShim */ \"a\"] ? \"pagehide\" : \"unload\";\n addEventListener(terminationEvent, unloadHandler, false);\n }\n}\nfunction unloadHandler() {\n for (let i in Request.requests) {\n if (Request.requests.hasOwnProperty(i)) {\n Request.requests[i].abort();\n }\n }\n}\n\n\n//# sourceURL=webpack://BringgDashboardSDK/./node_modules/engine.io-client/build/esm/transports/polling.js?");
|
|
5321
5335
|
|
|
5322
5336
|
/***/ }),
|
|
5323
5337
|
|
|
5324
|
-
/***/ "./node_modules/engine.io-client/
|
|
5325
|
-
|
|
5326
|
-
!*** ./node_modules/engine.io-client/
|
|
5327
|
-
|
|
5328
|
-
/*!
|
|
5329
|
-
/*!
|
|
5330
|
-
/***/ (function(module,
|
|
5338
|
+
/***/ "./node_modules/engine.io-client/build/esm/transports/websocket-constructor.browser.js":
|
|
5339
|
+
/*!*********************************************************************************************!*\
|
|
5340
|
+
!*** ./node_modules/engine.io-client/build/esm/transports/websocket-constructor.browser.js ***!
|
|
5341
|
+
\*********************************************************************************************/
|
|
5342
|
+
/*! exports provided: nextTick, WebSocket, usingBrowserWebSocket, defaultBinaryType */
|
|
5343
|
+
/*! exports used: WebSocket, defaultBinaryType, nextTick, usingBrowserWebSocket */
|
|
5344
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
5331
5345
|
|
|
5332
|
-
|
|
5346
|
+
"use strict";
|
|
5347
|
+
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return nextTick; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return WebSocket; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return usingBrowserWebSocket; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return defaultBinaryType; });\n/* harmony import */ var _globalThis_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../globalThis.js */ \"./node_modules/engine.io-client/build/esm/globalThis.browser.js\");\n\nconst nextTick = (() => {\n const isPromiseAvailable = typeof Promise === \"function\" && typeof Promise.resolve === \"function\";\n if (isPromiseAvailable) {\n return cb => Promise.resolve().then(cb);\n }\n else {\n return (cb, setTimeoutFn) => setTimeoutFn(cb, 0);\n }\n})();\nconst WebSocket = _globalThis_js__WEBPACK_IMPORTED_MODULE_0__[/* globalThisShim */ \"a\"].WebSocket || _globalThis_js__WEBPACK_IMPORTED_MODULE_0__[/* globalThisShim */ \"a\"].MozWebSocket;\nconst usingBrowserWebSocket = true;\nconst defaultBinaryType = \"arraybuffer\";\n\n\n//# sourceURL=webpack://BringgDashboardSDK/./node_modules/engine.io-client/build/esm/transports/websocket-constructor.browser.js?");
|
|
5333
5348
|
|
|
5334
5349
|
/***/ }),
|
|
5335
5350
|
|
|
5336
|
-
/***/ "./node_modules/engine.io-client/
|
|
5337
|
-
|
|
5338
|
-
!*** ./node_modules/engine.io-client/
|
|
5339
|
-
|
|
5340
|
-
/*!
|
|
5341
|
-
/*!
|
|
5342
|
-
/***/ (function(module,
|
|
5351
|
+
/***/ "./node_modules/engine.io-client/build/esm/transports/websocket.js":
|
|
5352
|
+
/*!*************************************************************************!*\
|
|
5353
|
+
!*** ./node_modules/engine.io-client/build/esm/transports/websocket.js ***!
|
|
5354
|
+
\*************************************************************************/
|
|
5355
|
+
/*! exports provided: WS */
|
|
5356
|
+
/*! exports used: WS */
|
|
5357
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
5343
5358
|
|
|
5344
|
-
|
|
5359
|
+
"use strict";
|
|
5360
|
+
eval("/* WEBPACK VAR INJECTION */(function(Buffer) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return WS; });\n/* harmony import */ var _transport_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../transport.js */ \"./node_modules/engine.io-client/build/esm/transport.js\");\n/* harmony import */ var _contrib_parseqs_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../contrib/parseqs.js */ \"./node_modules/engine.io-client/build/esm/contrib/parseqs.js\");\n/* harmony import */ var _contrib_yeast_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../contrib/yeast.js */ \"./node_modules/engine.io-client/build/esm/contrib/yeast.js\");\n/* harmony import */ var _util_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util.js */ \"./node_modules/engine.io-client/build/esm/util.js\");\n/* harmony import */ var _websocket_constructor_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./websocket-constructor.js */ \"./node_modules/engine.io-client/build/esm/transports/websocket-constructor.browser.js\");\n/* harmony import */ var engine_io_parser__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! engine.io-parser */ \"./node_modules/engine.io-parser/build/esm/index.js\");\n\n\n\n\n\n\n// detect ReactNative environment\nconst isReactNative = typeof navigator !== \"undefined\" &&\n typeof navigator.product === \"string\" &&\n navigator.product.toLowerCase() === \"reactnative\";\nclass WS extends _transport_js__WEBPACK_IMPORTED_MODULE_0__[/* Transport */ \"a\"] {\n /**\n * WebSocket transport constructor.\n *\n * @api {Object} connection options\n * @api public\n */\n constructor(opts) {\n super(opts);\n this.supportsBinary = !opts.forceBase64;\n }\n /**\n * Transport name.\n *\n * @api public\n */\n get name() {\n return \"websocket\";\n }\n /**\n * Opens socket.\n *\n * @api private\n */\n doOpen() {\n if (!this.check()) {\n // let probe timeout\n return;\n }\n const uri = this.uri();\n const protocols = this.opts.protocols;\n // React Native only supports the 'headers' option, and will print a warning if anything else is passed\n const opts = isReactNative\n ? {}\n : Object(_util_js__WEBPACK_IMPORTED_MODULE_3__[/* pick */ \"c\"])(this.opts, \"agent\", \"perMessageDeflate\", \"pfx\", \"key\", \"passphrase\", \"cert\", \"ca\", \"ciphers\", \"rejectUnauthorized\", \"localAddress\", \"protocolVersion\", \"origin\", \"maxPayload\", \"family\", \"checkServerIdentity\");\n if (this.opts.extraHeaders) {\n opts.headers = this.opts.extraHeaders;\n }\n try {\n this.ws =\n _websocket_constructor_js__WEBPACK_IMPORTED_MODULE_4__[/* usingBrowserWebSocket */ \"d\"] && !isReactNative\n ? protocols\n ? new _websocket_constructor_js__WEBPACK_IMPORTED_MODULE_4__[/* WebSocket */ \"a\"](uri, protocols)\n : new _websocket_constructor_js__WEBPACK_IMPORTED_MODULE_4__[/* WebSocket */ \"a\"](uri)\n : new _websocket_constructor_js__WEBPACK_IMPORTED_MODULE_4__[/* WebSocket */ \"a\"](uri, protocols, opts);\n }\n catch (err) {\n return this.emitReserved(\"error\", err);\n }\n this.ws.binaryType = this.socket.binaryType || _websocket_constructor_js__WEBPACK_IMPORTED_MODULE_4__[/* defaultBinaryType */ \"b\"];\n this.addEventListeners();\n }\n /**\n * Adds event listeners to the socket\n *\n * @api private\n */\n addEventListeners() {\n this.ws.onopen = () => {\n if (this.opts.autoUnref) {\n this.ws._socket.unref();\n }\n this.onOpen();\n };\n this.ws.onclose = closeEvent => this.onClose({\n description: \"websocket connection closed\",\n context: closeEvent\n });\n this.ws.onmessage = ev => this.onData(ev.data);\n this.ws.onerror = e => this.onError(\"websocket error\", e);\n }\n /**\n * Writes data to socket.\n *\n * @param {Array} array of packets.\n * @api private\n */\n write(packets) {\n this.writable = false;\n // encodePacket efficient as it uses WS framing\n // no need for encodePayload\n for (let i = 0; i < packets.length; i++) {\n const packet = packets[i];\n const lastPacket = i === packets.length - 1;\n Object(engine_io_parser__WEBPACK_IMPORTED_MODULE_5__[/* encodePacket */ \"c\"])(packet, this.supportsBinary, data => {\n // always create a new object (GH-437)\n const opts = {};\n if (!_websocket_constructor_js__WEBPACK_IMPORTED_MODULE_4__[/* usingBrowserWebSocket */ \"d\"]) {\n if (packet.options) {\n opts.compress = packet.options.compress;\n }\n if (this.opts.perMessageDeflate) {\n const len = \n // @ts-ignore\n \"string\" === typeof data ? Buffer.byteLength(data) : data.length;\n if (len < this.opts.perMessageDeflate.threshold) {\n opts.compress = false;\n }\n }\n }\n // Sometimes the websocket has already been closed but the browser didn't\n // have a chance of informing us about it yet, in that case send will\n // throw an error\n try {\n if (_websocket_constructor_js__WEBPACK_IMPORTED_MODULE_4__[/* usingBrowserWebSocket */ \"d\"]) {\n // TypeError is thrown when passing the second argument on Safari\n this.ws.send(data);\n }\n else {\n this.ws.send(data, opts);\n }\n }\n catch (e) {\n }\n if (lastPacket) {\n // fake drain\n // defer to next tick to allow Socket to clear writeBuffer\n Object(_websocket_constructor_js__WEBPACK_IMPORTED_MODULE_4__[/* nextTick */ \"c\"])(() => {\n this.writable = true;\n this.emitReserved(\"drain\");\n }, this.setTimeoutFn);\n }\n });\n }\n }\n /**\n * Closes socket.\n *\n * @api private\n */\n doClose() {\n if (typeof this.ws !== \"undefined\") {\n this.ws.close();\n this.ws = null;\n }\n }\n /**\n * Generates uri for connection.\n *\n * @api private\n */\n uri() {\n let query = this.query || {};\n const schema = this.opts.secure ? \"wss\" : \"ws\";\n let port = \"\";\n // avoid port if default for schema\n if (this.opts.port &&\n ((\"wss\" === schema && Number(this.opts.port) !== 443) ||\n (\"ws\" === schema && Number(this.opts.port) !== 80))) {\n port = \":\" + this.opts.port;\n }\n // append timestamp to URI\n if (this.opts.timestampRequests) {\n query[this.opts.timestampParam] = Object(_contrib_yeast_js__WEBPACK_IMPORTED_MODULE_2__[/* yeast */ \"a\"])();\n }\n // communicate binary support capabilities\n if (!this.supportsBinary) {\n query.b64 = 1;\n }\n const encodedQuery = Object(_contrib_parseqs_js__WEBPACK_IMPORTED_MODULE_1__[/* encode */ \"b\"])(query);\n const ipv6 = this.opts.hostname.indexOf(\":\") !== -1;\n return (schema +\n \"://\" +\n (ipv6 ? \"[\" + this.opts.hostname + \"]\" : this.opts.hostname) +\n port +\n this.opts.path +\n (encodedQuery.length ? \"?\" + encodedQuery : \"\"));\n }\n /**\n * Feature detection for WebSocket.\n *\n * @return {Boolean} whether this transport is available.\n * @api public\n */\n check() {\n return !!_websocket_constructor_js__WEBPACK_IMPORTED_MODULE_4__[/* WebSocket */ \"a\"];\n }\n}\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../buffer/index.js */ \"./node_modules/buffer/index.js\").Buffer))\n\n//# sourceURL=webpack://BringgDashboardSDK/./node_modules/engine.io-client/build/esm/transports/websocket.js?");
|
|
5345
5361
|
|
|
5346
5362
|
/***/ }),
|
|
5347
5363
|
|
|
5348
|
-
/***/ "./node_modules/engine.io-client/
|
|
5349
|
-
|
|
5350
|
-
!*** ./node_modules/engine.io-client/
|
|
5351
|
-
|
|
5352
|
-
/*!
|
|
5353
|
-
/*!
|
|
5354
|
-
/***/ (function(module,
|
|
5364
|
+
/***/ "./node_modules/engine.io-client/build/esm/transports/xmlhttprequest.browser.js":
|
|
5365
|
+
/*!**************************************************************************************!*\
|
|
5366
|
+
!*** ./node_modules/engine.io-client/build/esm/transports/xmlhttprequest.browser.js ***!
|
|
5367
|
+
\**************************************************************************************/
|
|
5368
|
+
/*! exports provided: XHR */
|
|
5369
|
+
/*! exports used: XHR */
|
|
5370
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
5355
5371
|
|
|
5356
|
-
|
|
5372
|
+
"use strict";
|
|
5373
|
+
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return XHR; });\n/* harmony import */ var _contrib_has_cors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../contrib/has-cors.js */ \"./node_modules/engine.io-client/build/esm/contrib/has-cors.js\");\n/* harmony import */ var _globalThis_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../globalThis.js */ \"./node_modules/engine.io-client/build/esm/globalThis.browser.js\");\n// browser shim for xmlhttprequest module\n\n\nfunction XHR(opts) {\n const xdomain = opts.xdomain;\n // XMLHttpRequest can be disabled on IE\n try {\n if (\"undefined\" !== typeof XMLHttpRequest && (!xdomain || _contrib_has_cors_js__WEBPACK_IMPORTED_MODULE_0__[/* hasCORS */ \"a\"])) {\n return new XMLHttpRequest();\n }\n }\n catch (e) { }\n if (!xdomain) {\n try {\n return new _globalThis_js__WEBPACK_IMPORTED_MODULE_1__[/* globalThisShim */ \"a\"][[\"Active\"].concat(\"Object\").join(\"X\")](\"Microsoft.XMLHTTP\");\n }\n catch (e) { }\n }\n}\n\n\n//# sourceURL=webpack://BringgDashboardSDK/./node_modules/engine.io-client/build/esm/transports/xmlhttprequest.browser.js?");
|
|
5357
5374
|
|
|
5358
5375
|
/***/ }),
|
|
5359
5376
|
|
|
5360
|
-
/***/ "./node_modules/engine.io-client/
|
|
5361
|
-
|
|
5362
|
-
!*** ./node_modules/engine.io-client/
|
|
5363
|
-
|
|
5364
|
-
/*!
|
|
5365
|
-
/*!
|
|
5366
|
-
/***/ (function(module,
|
|
5377
|
+
/***/ "./node_modules/engine.io-client/build/esm/util.js":
|
|
5378
|
+
/*!*********************************************************!*\
|
|
5379
|
+
!*** ./node_modules/engine.io-client/build/esm/util.js ***!
|
|
5380
|
+
\*********************************************************/
|
|
5381
|
+
/*! exports provided: pick, installTimerFunctions, byteLength */
|
|
5382
|
+
/*! exports used: byteLength, installTimerFunctions, pick */
|
|
5383
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
5367
5384
|
|
|
5368
|
-
|
|
5385
|
+
"use strict";
|
|
5386
|
+
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return pick; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return installTimerFunctions; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return byteLength; });\n/* harmony import */ var _globalThis_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./globalThis.js */ \"./node_modules/engine.io-client/build/esm/globalThis.browser.js\");\n\nfunction pick(obj, ...attr) {\n return attr.reduce((acc, k) => {\n if (obj.hasOwnProperty(k)) {\n acc[k] = obj[k];\n }\n return acc;\n }, {});\n}\n// Keep a reference to the real timeout functions so they can be used when overridden\nconst NATIVE_SET_TIMEOUT = setTimeout;\nconst NATIVE_CLEAR_TIMEOUT = clearTimeout;\nfunction installTimerFunctions(obj, opts) {\n if (opts.useNativeTimers) {\n obj.setTimeoutFn = NATIVE_SET_TIMEOUT.bind(_globalThis_js__WEBPACK_IMPORTED_MODULE_0__[/* globalThisShim */ \"a\"]);\n obj.clearTimeoutFn = NATIVE_CLEAR_TIMEOUT.bind(_globalThis_js__WEBPACK_IMPORTED_MODULE_0__[/* globalThisShim */ \"a\"]);\n }\n else {\n obj.setTimeoutFn = setTimeout.bind(_globalThis_js__WEBPACK_IMPORTED_MODULE_0__[/* globalThisShim */ \"a\"]);\n obj.clearTimeoutFn = clearTimeout.bind(_globalThis_js__WEBPACK_IMPORTED_MODULE_0__[/* globalThisShim */ \"a\"]);\n }\n}\n// base64 encoded buffers are about 33% bigger (https://en.wikipedia.org/wiki/Base64)\nconst BASE64_OVERHEAD = 1.33;\n// we could also have used `new Blob([obj]).size`, but it isn't supported in IE9\nfunction byteLength(obj) {\n if (typeof obj === \"string\") {\n return utf8Length(obj);\n }\n // arraybuffer or blob\n return Math.ceil((obj.byteLength || obj.size) * BASE64_OVERHEAD);\n}\nfunction utf8Length(str) {\n let c = 0, length = 0;\n for (let i = 0, l = str.length; i < l; i++) {\n c = str.charCodeAt(i);\n if (c < 0x80) {\n length += 1;\n }\n else if (c < 0x800) {\n length += 2;\n }\n else if (c < 0xd800 || c >= 0xe000) {\n length += 3;\n }\n else {\n i++;\n length += 4;\n }\n }\n return length;\n}\n\n\n//# sourceURL=webpack://BringgDashboardSDK/./node_modules/engine.io-client/build/esm/util.js?");
|
|
5369
5387
|
|
|
5370
5388
|
/***/ }),
|
|
5371
5389
|
|
|
5372
|
-
/***/ "./node_modules/engine.io-parser/
|
|
5373
|
-
|
|
5374
|
-
!*** ./node_modules/engine.io-parser/
|
|
5375
|
-
|
|
5376
|
-
/*!
|
|
5377
|
-
/*!
|
|
5378
|
-
/***/ (function(module,
|
|
5390
|
+
/***/ "./node_modules/engine.io-parser/build/esm/commons.js":
|
|
5391
|
+
/*!************************************************************!*\
|
|
5392
|
+
!*** ./node_modules/engine.io-parser/build/esm/commons.js ***!
|
|
5393
|
+
\************************************************************/
|
|
5394
|
+
/*! exports provided: PACKET_TYPES, PACKET_TYPES_REVERSE, ERROR_PACKET */
|
|
5395
|
+
/*! exports used: ERROR_PACKET, PACKET_TYPES, PACKET_TYPES_REVERSE */
|
|
5396
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
5379
5397
|
|
|
5380
|
-
|
|
5398
|
+
"use strict";
|
|
5399
|
+
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return PACKET_TYPES; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return PACKET_TYPES_REVERSE; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return ERROR_PACKET; });\nconst PACKET_TYPES = Object.create(null); // no Map = no polyfill\nPACKET_TYPES[\"open\"] = \"0\";\nPACKET_TYPES[\"close\"] = \"1\";\nPACKET_TYPES[\"ping\"] = \"2\";\nPACKET_TYPES[\"pong\"] = \"3\";\nPACKET_TYPES[\"message\"] = \"4\";\nPACKET_TYPES[\"upgrade\"] = \"5\";\nPACKET_TYPES[\"noop\"] = \"6\";\nconst PACKET_TYPES_REVERSE = Object.create(null);\nObject.keys(PACKET_TYPES).forEach(key => {\n PACKET_TYPES_REVERSE[PACKET_TYPES[key]] = key;\n});\nconst ERROR_PACKET = { type: \"error\", data: \"parser error\" };\n\n\n\n//# sourceURL=webpack://BringgDashboardSDK/./node_modules/engine.io-parser/build/esm/commons.js?");
|
|
5381
5400
|
|
|
5382
5401
|
/***/ }),
|
|
5383
5402
|
|
|
5384
|
-
/***/ "./node_modules/engine.io-parser/
|
|
5385
|
-
|
|
5386
|
-
!*** ./node_modules/engine.io-parser/
|
|
5387
|
-
|
|
5388
|
-
/*!
|
|
5389
|
-
/*!
|
|
5390
|
-
/***/ (function(module,
|
|
5403
|
+
/***/ "./node_modules/engine.io-parser/build/esm/contrib/base64-arraybuffer.js":
|
|
5404
|
+
/*!*******************************************************************************!*\
|
|
5405
|
+
!*** ./node_modules/engine.io-parser/build/esm/contrib/base64-arraybuffer.js ***!
|
|
5406
|
+
\*******************************************************************************/
|
|
5407
|
+
/*! exports provided: encode, decode */
|
|
5408
|
+
/*! exports used: decode */
|
|
5409
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
5391
5410
|
|
|
5392
|
-
|
|
5411
|
+
"use strict";
|
|
5412
|
+
eval("/* unused harmony export encode */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return decode; });\nconst chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\n// Use a lookup table to find the index.\nconst lookup = typeof Uint8Array === 'undefined' ? [] : new Uint8Array(256);\nfor (let i = 0; i < chars.length; i++) {\n lookup[chars.charCodeAt(i)] = i;\n}\nconst encode = (arraybuffer) => {\n let bytes = new Uint8Array(arraybuffer), i, len = bytes.length, base64 = '';\n for (i = 0; i < len; i += 3) {\n base64 += chars[bytes[i] >> 2];\n base64 += chars[((bytes[i] & 3) << 4) | (bytes[i + 1] >> 4)];\n base64 += chars[((bytes[i + 1] & 15) << 2) | (bytes[i + 2] >> 6)];\n base64 += chars[bytes[i + 2] & 63];\n }\n if (len % 3 === 2) {\n base64 = base64.substring(0, base64.length - 1) + '=';\n }\n else if (len % 3 === 1) {\n base64 = base64.substring(0, base64.length - 2) + '==';\n }\n return base64;\n};\nconst decode = (base64) => {\n let bufferLength = base64.length * 0.75, len = base64.length, i, p = 0, encoded1, encoded2, encoded3, encoded4;\n if (base64[base64.length - 1] === '=') {\n bufferLength--;\n if (base64[base64.length - 2] === '=') {\n bufferLength--;\n }\n }\n const arraybuffer = new ArrayBuffer(bufferLength), bytes = new Uint8Array(arraybuffer);\n for (i = 0; i < len; i += 4) {\n encoded1 = lookup[base64.charCodeAt(i)];\n encoded2 = lookup[base64.charCodeAt(i + 1)];\n encoded3 = lookup[base64.charCodeAt(i + 2)];\n encoded4 = lookup[base64.charCodeAt(i + 3)];\n bytes[p++] = (encoded1 << 2) | (encoded2 >> 4);\n bytes[p++] = ((encoded2 & 15) << 4) | (encoded3 >> 2);\n bytes[p++] = ((encoded3 & 3) << 6) | (encoded4 & 63);\n }\n return arraybuffer;\n};\n\n\n//# sourceURL=webpack://BringgDashboardSDK/./node_modules/engine.io-parser/build/esm/contrib/base64-arraybuffer.js?");
|
|
5393
5413
|
|
|
5394
5414
|
/***/ }),
|
|
5395
5415
|
|
|
5396
|
-
/***/ "./node_modules/engine.io-parser/
|
|
5397
|
-
|
|
5398
|
-
!*** ./node_modules/engine.io-parser/
|
|
5399
|
-
|
|
5400
|
-
/*!
|
|
5401
|
-
/*!
|
|
5402
|
-
/***/ (function(module,
|
|
5416
|
+
/***/ "./node_modules/engine.io-parser/build/esm/decodePacket.browser.js":
|
|
5417
|
+
/*!*************************************************************************!*\
|
|
5418
|
+
!*** ./node_modules/engine.io-parser/build/esm/decodePacket.browser.js ***!
|
|
5419
|
+
\*************************************************************************/
|
|
5420
|
+
/*! exports provided: default */
|
|
5421
|
+
/*! exports used: default */
|
|
5422
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
5403
5423
|
|
|
5404
|
-
|
|
5424
|
+
"use strict";
|
|
5425
|
+
eval("/* harmony import */ var _commons_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./commons.js */ \"./node_modules/engine.io-parser/build/esm/commons.js\");\n/* harmony import */ var _contrib_base64_arraybuffer_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./contrib/base64-arraybuffer.js */ \"./node_modules/engine.io-parser/build/esm/contrib/base64-arraybuffer.js\");\n\n\nconst withNativeArrayBuffer = typeof ArrayBuffer === \"function\";\nconst decodePacket = (encodedPacket, binaryType) => {\n if (typeof encodedPacket !== \"string\") {\n return {\n type: \"message\",\n data: mapBinary(encodedPacket, binaryType)\n };\n }\n const type = encodedPacket.charAt(0);\n if (type === \"b\") {\n return {\n type: \"message\",\n data: decodeBase64Packet(encodedPacket.substring(1), binaryType)\n };\n }\n const packetType = _commons_js__WEBPACK_IMPORTED_MODULE_0__[/* PACKET_TYPES_REVERSE */ \"c\"][type];\n if (!packetType) {\n return _commons_js__WEBPACK_IMPORTED_MODULE_0__[/* ERROR_PACKET */ \"a\"];\n }\n return encodedPacket.length > 1\n ? {\n type: _commons_js__WEBPACK_IMPORTED_MODULE_0__[/* PACKET_TYPES_REVERSE */ \"c\"][type],\n data: encodedPacket.substring(1)\n }\n : {\n type: _commons_js__WEBPACK_IMPORTED_MODULE_0__[/* PACKET_TYPES_REVERSE */ \"c\"][type]\n };\n};\nconst decodeBase64Packet = (data, binaryType) => {\n if (withNativeArrayBuffer) {\n const decoded = Object(_contrib_base64_arraybuffer_js__WEBPACK_IMPORTED_MODULE_1__[/* decode */ \"a\"])(data);\n return mapBinary(decoded, binaryType);\n }\n else {\n return { base64: true, data }; // fallback for old browsers\n }\n};\nconst mapBinary = (data, binaryType) => {\n switch (binaryType) {\n case \"blob\":\n return data instanceof ArrayBuffer ? new Blob([data]) : data;\n case \"arraybuffer\":\n default:\n return data; // assuming the data is already an ArrayBuffer\n }\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (decodePacket);\n\n\n//# sourceURL=webpack://BringgDashboardSDK/./node_modules/engine.io-parser/build/esm/decodePacket.browser.js?");
|
|
5405
5426
|
|
|
5406
5427
|
/***/ }),
|
|
5407
5428
|
|
|
5408
|
-
/***/ "./node_modules/engine.io-parser/
|
|
5409
|
-
|
|
5410
|
-
!*** ./node_modules/engine.io-parser/
|
|
5411
|
-
|
|
5412
|
-
/*!
|
|
5413
|
-
/*!
|
|
5414
|
-
/***/ (function(module,
|
|
5429
|
+
/***/ "./node_modules/engine.io-parser/build/esm/encodePacket.browser.js":
|
|
5430
|
+
/*!*************************************************************************!*\
|
|
5431
|
+
!*** ./node_modules/engine.io-parser/build/esm/encodePacket.browser.js ***!
|
|
5432
|
+
\*************************************************************************/
|
|
5433
|
+
/*! exports provided: default */
|
|
5434
|
+
/*! exports used: default */
|
|
5435
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
5415
5436
|
|
|
5416
|
-
|
|
5437
|
+
"use strict";
|
|
5438
|
+
eval("/* harmony import */ var _commons_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./commons.js */ \"./node_modules/engine.io-parser/build/esm/commons.js\");\n\nconst withNativeBlob = typeof Blob === \"function\" ||\n (typeof Blob !== \"undefined\" &&\n Object.prototype.toString.call(Blob) === \"[object BlobConstructor]\");\nconst withNativeArrayBuffer = typeof ArrayBuffer === \"function\";\n// ArrayBuffer.isView method is not defined in IE10\nconst isView = obj => {\n return typeof ArrayBuffer.isView === \"function\"\n ? ArrayBuffer.isView(obj)\n : obj && obj.buffer instanceof ArrayBuffer;\n};\nconst encodePacket = ({ type, data }, supportsBinary, callback) => {\n if (withNativeBlob && data instanceof Blob) {\n if (supportsBinary) {\n return callback(data);\n }\n else {\n return encodeBlobAsBase64(data, callback);\n }\n }\n else if (withNativeArrayBuffer &&\n (data instanceof ArrayBuffer || isView(data))) {\n if (supportsBinary) {\n return callback(data);\n }\n else {\n return encodeBlobAsBase64(new Blob([data]), callback);\n }\n }\n // plain string\n return callback(_commons_js__WEBPACK_IMPORTED_MODULE_0__[/* PACKET_TYPES */ \"b\"][type] + (data || \"\"));\n};\nconst encodeBlobAsBase64 = (data, callback) => {\n const fileReader = new FileReader();\n fileReader.onload = function () {\n const content = fileReader.result.split(\",\")[1];\n callback(\"b\" + content);\n };\n return fileReader.readAsDataURL(data);\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (encodePacket);\n\n\n//# sourceURL=webpack://BringgDashboardSDK/./node_modules/engine.io-parser/build/esm/encodePacket.browser.js?");
|
|
5417
5439
|
|
|
5418
5440
|
/***/ }),
|
|
5419
5441
|
|
|
5420
|
-
/***/ "./node_modules/
|
|
5421
|
-
|
|
5422
|
-
!*** ./node_modules/
|
|
5423
|
-
|
|
5424
|
-
/*!
|
|
5425
|
-
/*!
|
|
5426
|
-
/***/ (function(module,
|
|
5442
|
+
/***/ "./node_modules/engine.io-parser/build/esm/index.js":
|
|
5443
|
+
/*!**********************************************************!*\
|
|
5444
|
+
!*** ./node_modules/engine.io-parser/build/esm/index.js ***!
|
|
5445
|
+
\**********************************************************/
|
|
5446
|
+
/*! exports provided: protocol, encodePacket, encodePayload, decodePacket, decodePayload */
|
|
5447
|
+
/*! exports used: decodePacket, decodePayload, encodePacket, encodePayload, protocol */
|
|
5448
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
5427
5449
|
|
|
5428
|
-
|
|
5450
|
+
"use strict";
|
|
5451
|
+
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"e\", function() { return protocol; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return encodePayload; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return decodePayload; });\n/* harmony import */ var _encodePacket_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./encodePacket.js */ \"./node_modules/engine.io-parser/build/esm/encodePacket.browser.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return _encodePacket_js__WEBPACK_IMPORTED_MODULE_0__[\"a\"]; });\n\n/* harmony import */ var _decodePacket_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./decodePacket.js */ \"./node_modules/engine.io-parser/build/esm/decodePacket.browser.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return _decodePacket_js__WEBPACK_IMPORTED_MODULE_1__[\"a\"]; });\n\n\n\nconst SEPARATOR = String.fromCharCode(30); // see https://en.wikipedia.org/wiki/Delimiter#ASCII_delimited_text\nconst encodePayload = (packets, callback) => {\n // some packets may be added to the array while encoding, so the initial length must be saved\n const length = packets.length;\n const encodedPackets = new Array(length);\n let count = 0;\n packets.forEach((packet, i) => {\n // force base64 encoding for binary packets\n Object(_encodePacket_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ \"a\"])(packet, false, encodedPacket => {\n encodedPackets[i] = encodedPacket;\n if (++count === length) {\n callback(encodedPackets.join(SEPARATOR));\n }\n });\n });\n};\nconst decodePayload = (encodedPayload, binaryType) => {\n const encodedPackets = encodedPayload.split(SEPARATOR);\n const packets = [];\n for (let i = 0; i < encodedPackets.length; i++) {\n const decodedPacket = Object(_decodePacket_js__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])(encodedPackets[i], binaryType);\n packets.push(decodedPacket);\n if (decodedPacket.type === \"error\") {\n break;\n }\n }\n return packets;\n};\nconst protocol = 4;\n\n\n\n//# sourceURL=webpack://BringgDashboardSDK/./node_modules/engine.io-parser/build/esm/index.js?");
|
|
5429
5452
|
|
|
5430
5453
|
/***/ }),
|
|
5431
5454
|
|
|
@@ -5478,30 +5501,6 @@ eval("\n\nconst pDefer = () => {\n\tconst deferred = {};\n\n\tdeferred.promise =
|
|
|
5478
5501
|
|
|
5479
5502
|
/***/ }),
|
|
5480
5503
|
|
|
5481
|
-
/***/ "./node_modules/parseqs/index.js":
|
|
5482
|
-
/*!***************************************!*\
|
|
5483
|
-
!*** ./node_modules/parseqs/index.js ***!
|
|
5484
|
-
\***************************************/
|
|
5485
|
-
/*! no static exports found */
|
|
5486
|
-
/*! all exports used */
|
|
5487
|
-
/***/ (function(module, exports) {
|
|
5488
|
-
|
|
5489
|
-
eval("/**\n * Compiles a querystring\n * Returns string representation of the object\n *\n * @param {Object}\n * @api private\n */\n\nexports.encode = function (obj) {\n var str = '';\n\n for (var i in obj) {\n if (obj.hasOwnProperty(i)) {\n if (str.length) str += '&';\n str += encodeURIComponent(i) + '=' + encodeURIComponent(obj[i]);\n }\n }\n\n return str;\n};\n\n/**\n * Parses a simple querystring into an object\n *\n * @param {String} qs\n * @api private\n */\n\nexports.decode = function(qs){\n var qry = {};\n var pairs = qs.split('&');\n for (var i = 0, l = pairs.length; i < l; i++) {\n var pair = pairs[i].split('=');\n qry[decodeURIComponent(pair[0])] = decodeURIComponent(pair[1]);\n }\n return qry;\n};\n\n\n//# sourceURL=webpack://BringgDashboardSDK/./node_modules/parseqs/index.js?");
|
|
5490
|
-
|
|
5491
|
-
/***/ }),
|
|
5492
|
-
|
|
5493
|
-
/***/ "./node_modules/parseuri/index.js":
|
|
5494
|
-
/*!****************************************!*\
|
|
5495
|
-
!*** ./node_modules/parseuri/index.js ***!
|
|
5496
|
-
\****************************************/
|
|
5497
|
-
/*! no static exports found */
|
|
5498
|
-
/*! all exports used */
|
|
5499
|
-
/***/ (function(module, exports) {
|
|
5500
|
-
|
|
5501
|
-
eval("/**\n * Parses an URI\n *\n * @author Steven Levithan <stevenlevithan.com> (MIT license)\n * @api private\n */\n\nvar re = /^(?:(?![^:@]+:[^:@\\/]*@)(http|https|ws|wss):\\/\\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\\/?#]*)(?::(\\d*))?)(((\\/(?:[^?#](?![^?#\\/]*\\.[^?#\\/.]+(?:[?#]|$)))*\\/?)?([^?#\\/]*))(?:\\?([^#]*))?(?:#(.*))?)/;\n\nvar parts = [\n 'source', 'protocol', 'authority', 'userInfo', 'user', 'password', 'host', 'port', 'relative', 'path', 'directory', 'file', 'query', 'anchor'\n];\n\nmodule.exports = function parseuri(str) {\n var src = str,\n b = str.indexOf('['),\n e = str.indexOf(']');\n\n if (b != -1 && e != -1) {\n str = str.substring(0, b) + str.substring(b, e).replace(/:/g, ';') + str.substring(e, str.length);\n }\n\n var m = re.exec(str || ''),\n uri = {},\n i = 14;\n\n while (i--) {\n uri[parts[i]] = m[i] || '';\n }\n\n if (b != -1 && e != -1) {\n uri.source = src;\n uri.host = uri.host.substring(1, uri.host.length - 1).replace(/;/g, ':');\n uri.authority = uri.authority.replace('[', '').replace(']', '').replace(/;/g, ':');\n uri.ipv6uri = true;\n }\n\n uri.pathNames = pathNames(uri, uri['path']);\n uri.queryKey = queryKey(uri, uri['query']);\n\n return uri;\n};\n\nfunction pathNames(obj, path) {\n var regx = /\\/{2,9}/g,\n names = path.replace(regx, \"/\").split(\"/\");\n\n if (path.substr(0, 1) == '/' || path.length === 0) {\n names.splice(0, 1);\n }\n if (path.substr(path.length - 1, 1) == '/') {\n names.splice(names.length - 1, 1);\n }\n\n return names;\n}\n\nfunction queryKey(uri, query) {\n var data = {};\n\n query.replace(/(?:^|&)([^&=]*)=?([^&]*)/g, function ($0, $1, $2) {\n if ($1) {\n data[$1] = $2;\n }\n });\n\n return data;\n}\n\n\n//# sourceURL=webpack://BringgDashboardSDK/./node_modules/parseuri/index.js?");
|
|
5502
|
-
|
|
5503
|
-
/***/ }),
|
|
5504
|
-
|
|
5505
5504
|
/***/ "./node_modules/process/browser.js":
|
|
5506
5505
|
/*!*****************************************!*\
|
|
5507
5506
|
!*** ./node_modules/process/browser.js ***!
|
|
@@ -8360,144 +8359,120 @@ eval("/* WEBPACK VAR INJECTION */(function(Buffer) {(function() {\n var crypt =
|
|
|
8360
8359
|
|
|
8361
8360
|
/***/ }),
|
|
8362
8361
|
|
|
8363
|
-
/***/ "./node_modules/socket.io-client/build/
|
|
8364
|
-
|
|
8365
|
-
!*** ./node_modules/socket.io-client/build/
|
|
8366
|
-
|
|
8367
|
-
/*!
|
|
8368
|
-
/*!
|
|
8369
|
-
/***/ (function(module,
|
|
8362
|
+
/***/ "./node_modules/socket.io-client/build/esm/contrib/backo2.js":
|
|
8363
|
+
/*!*******************************************************************!*\
|
|
8364
|
+
!*** ./node_modules/socket.io-client/build/esm/contrib/backo2.js ***!
|
|
8365
|
+
\*******************************************************************/
|
|
8366
|
+
/*! exports provided: Backoff */
|
|
8367
|
+
/*! exports used: Backoff */
|
|
8368
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
8370
8369
|
|
|
8371
8370
|
"use strict";
|
|
8372
|
-
eval("
|
|
8371
|
+
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Backoff; });\n/**\n * Initialize backoff timer with `opts`.\n *\n * - `min` initial timeout in milliseconds [100]\n * - `max` max timeout [10000]\n * - `jitter` [0]\n * - `factor` [2]\n *\n * @param {Object} opts\n * @api public\n */\nfunction Backoff(opts) {\n opts = opts || {};\n this.ms = opts.min || 100;\n this.max = opts.max || 10000;\n this.factor = opts.factor || 2;\n this.jitter = opts.jitter > 0 && opts.jitter <= 1 ? opts.jitter : 0;\n this.attempts = 0;\n}\n/**\n * Return the backoff duration.\n *\n * @return {Number}\n * @api public\n */\nBackoff.prototype.duration = function () {\n var ms = this.ms * Math.pow(this.factor, this.attempts++);\n if (this.jitter) {\n var rand = Math.random();\n var deviation = Math.floor(rand * this.jitter * ms);\n ms = (Math.floor(rand * 10) & 1) == 0 ? ms - deviation : ms + deviation;\n }\n return Math.min(ms, this.max) | 0;\n};\n/**\n * Reset the number of attempts.\n *\n * @api public\n */\nBackoff.prototype.reset = function () {\n this.attempts = 0;\n};\n/**\n * Set the minimum duration\n *\n * @api public\n */\nBackoff.prototype.setMin = function (min) {\n this.ms = min;\n};\n/**\n * Set the maximum duration\n *\n * @api public\n */\nBackoff.prototype.setMax = function (max) {\n this.max = max;\n};\n/**\n * Set the jitter\n *\n * @api public\n */\nBackoff.prototype.setJitter = function (jitter) {\n this.jitter = jitter;\n};\n\n\n//# sourceURL=webpack://BringgDashboardSDK/./node_modules/socket.io-client/build/esm/contrib/backo2.js?");
|
|
8373
8372
|
|
|
8374
8373
|
/***/ }),
|
|
8375
8374
|
|
|
8376
|
-
/***/ "./node_modules/socket.io-client/build/
|
|
8377
|
-
|
|
8378
|
-
!*** ./node_modules/socket.io-client/build/
|
|
8379
|
-
|
|
8380
|
-
/*!
|
|
8375
|
+
/***/ "./node_modules/socket.io-client/build/esm/index.js":
|
|
8376
|
+
/*!**********************************************************!*\
|
|
8377
|
+
!*** ./node_modules/socket.io-client/build/esm/index.js ***!
|
|
8378
|
+
\**********************************************************/
|
|
8379
|
+
/*! exports provided: protocol, Manager, Socket, io, connect, default */
|
|
8381
8380
|
/*! all exports used */
|
|
8382
|
-
/***/ (function(module,
|
|
8381
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
8383
8382
|
|
|
8384
8383
|
"use strict";
|
|
8385
|
-
eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Manager = void 0;\nconst eio = __webpack_require__(/*! engine.io-client */ \"./node_modules/engine.io-client/lib/index.js\");\nconst socket_1 = __webpack_require__(/*! ./socket */ \"./node_modules/socket.io-client/build/socket.js\");\nconst parser = __webpack_require__(/*! socket.io-parser */ \"./node_modules/socket.io-parser/dist/index.js\");\nconst on_1 = __webpack_require__(/*! ./on */ \"./node_modules/socket.io-client/build/on.js\");\nconst Backoff = __webpack_require__(/*! backo2 */ \"./node_modules/backo2/index.js\");\nconst typed_events_1 = __webpack_require__(/*! ./typed-events */ \"./node_modules/socket.io-client/build/typed-events.js\");\nconst debug = __webpack_require__(/*! debug */ \"./node_modules/debug/src/browser.js\")(\"socket.io-client:manager\");\nclass Manager extends typed_events_1.StrictEventEmitter {\n constructor(uri, opts) {\n super();\n this.nsps = {};\n this.subs = [];\n if (uri && \"object\" === typeof uri) {\n opts = uri;\n uri = undefined;\n }\n opts = opts || {};\n opts.path = opts.path || \"/socket.io\";\n this.opts = opts;\n this.reconnection(opts.reconnection !== false);\n this.reconnectionAttempts(opts.reconnectionAttempts || Infinity);\n this.reconnectionDelay(opts.reconnectionDelay || 1000);\n this.reconnectionDelayMax(opts.reconnectionDelayMax || 5000);\n this.randomizationFactor(opts.randomizationFactor || 0.5);\n this.backoff = new Backoff({\n min: this.reconnectionDelay(),\n max: this.reconnectionDelayMax(),\n jitter: this.randomizationFactor(),\n });\n this.timeout(null == opts.timeout ? 20000 : opts.timeout);\n this._readyState = \"closed\";\n this.uri = uri;\n const _parser = opts.parser || parser;\n this.encoder = new _parser.Encoder();\n this.decoder = new _parser.Decoder();\n this._autoConnect = opts.autoConnect !== false;\n if (this._autoConnect)\n this.open();\n }\n reconnection(v) {\n if (!arguments.length)\n return this._reconnection;\n this._reconnection = !!v;\n return this;\n }\n reconnectionAttempts(v) {\n if (v === undefined)\n return this._reconnectionAttempts;\n this._reconnectionAttempts = v;\n return this;\n }\n reconnectionDelay(v) {\n var _a;\n if (v === undefined)\n return this._reconnectionDelay;\n this._reconnectionDelay = v;\n (_a = this.backoff) === null || _a === void 0 ? void 0 : _a.setMin(v);\n return this;\n }\n randomizationFactor(v) {\n var _a;\n if (v === undefined)\n return this._randomizationFactor;\n this._randomizationFactor = v;\n (_a = this.backoff) === null || _a === void 0 ? void 0 : _a.setJitter(v);\n return this;\n }\n reconnectionDelayMax(v) {\n var _a;\n if (v === undefined)\n return this._reconnectionDelayMax;\n this._reconnectionDelayMax = v;\n (_a = this.backoff) === null || _a === void 0 ? void 0 : _a.setMax(v);\n return this;\n }\n timeout(v) {\n if (!arguments.length)\n return this._timeout;\n this._timeout = v;\n return this;\n }\n /**\n * Starts trying to reconnect if reconnection is enabled and we have not\n * started reconnecting yet\n *\n * @private\n */\n maybeReconnectOnOpen() {\n // Only try to reconnect if it's the first time we're connecting\n if (!this._reconnecting &&\n this._reconnection &&\n this.backoff.attempts === 0) {\n // keeps reconnection from firing twice for the same reconnection loop\n this.reconnect();\n }\n }\n /**\n * Sets the current transport `socket`.\n *\n * @param {Function} fn - optional, callback\n * @return self\n * @public\n */\n open(fn) {\n debug(\"readyState %s\", this._readyState);\n if (~this._readyState.indexOf(\"open\"))\n return this;\n debug(\"opening %s\", this.uri);\n this.engine = eio(this.uri, this.opts);\n const socket = this.engine;\n const self = this;\n this._readyState = \"opening\";\n this.skipReconnect = false;\n // emit `open`\n const openSubDestroy = on_1.on(socket, \"open\", function () {\n self.onopen();\n fn && fn();\n });\n // emit `error`\n const errorSub = on_1.on(socket, \"error\", (err) => {\n debug(\"error\");\n self.cleanup();\n self._readyState = \"closed\";\n this.emitReserved(\"error\", err);\n if (fn) {\n fn(err);\n }\n else {\n // Only do this if there is no fn to handle the error\n self.maybeReconnectOnOpen();\n }\n });\n if (false !== this._timeout) {\n const timeout = this._timeout;\n debug(\"connect attempt will timeout after %d\", timeout);\n if (timeout === 0) {\n openSubDestroy(); // prevents a race condition with the 'open' event\n }\n // set timer\n const timer = setTimeout(() => {\n debug(\"connect attempt timed out after %d\", timeout);\n openSubDestroy();\n socket.close();\n socket.emit(\"error\", new Error(\"timeout\"));\n }, timeout);\n if (this.opts.autoUnref) {\n timer.unref();\n }\n this.subs.push(function subDestroy() {\n clearTimeout(timer);\n });\n }\n this.subs.push(openSubDestroy);\n this.subs.push(errorSub);\n return this;\n }\n /**\n * Alias for open()\n *\n * @return self\n * @public\n */\n connect(fn) {\n return this.open(fn);\n }\n /**\n * Called upon transport open.\n *\n * @private\n */\n onopen() {\n debug(\"open\");\n // clear old subs\n this.cleanup();\n // mark as open\n this._readyState = \"open\";\n this.emitReserved(\"open\");\n // add new subs\n const socket = this.engine;\n this.subs.push(on_1.on(socket, \"ping\", this.onping.bind(this)), on_1.on(socket, \"data\", this.ondata.bind(this)), on_1.on(socket, \"error\", this.onerror.bind(this)), on_1.on(socket, \"close\", this.onclose.bind(this)), on_1.on(this.decoder, \"decoded\", this.ondecoded.bind(this)));\n }\n /**\n * Called upon a ping.\n *\n * @private\n */\n onping() {\n this.emitReserved(\"ping\");\n }\n /**\n * Called with data.\n *\n * @private\n */\n ondata(data) {\n this.decoder.add(data);\n }\n /**\n * Called when parser fully decodes a packet.\n *\n * @private\n */\n ondecoded(packet) {\n this.emitReserved(\"packet\", packet);\n }\n /**\n * Called upon socket error.\n *\n * @private\n */\n onerror(err) {\n debug(\"error\", err);\n this.emitReserved(\"error\", err);\n }\n /**\n * Creates a new socket for the given `nsp`.\n *\n * @return {Socket}\n * @public\n */\n socket(nsp, opts) {\n let socket = this.nsps[nsp];\n if (!socket) {\n socket = new socket_1.Socket(this, nsp, opts);\n this.nsps[nsp] = socket;\n }\n return socket;\n }\n /**\n * Called upon a socket close.\n *\n * @param socket\n * @private\n */\n _destroy(socket) {\n const nsps = Object.keys(this.nsps);\n for (const nsp of nsps) {\n const socket = this.nsps[nsp];\n if (socket.active) {\n debug(\"socket %s is still active, skipping close\", nsp);\n return;\n }\n }\n this._close();\n }\n /**\n * Writes a packet.\n *\n * @param packet\n * @private\n */\n _packet(packet) {\n debug(\"writing packet %j\", packet);\n const encodedPackets = this.encoder.encode(packet);\n for (let i = 0; i < encodedPackets.length; i++) {\n this.engine.write(encodedPackets[i], packet.options);\n }\n }\n /**\n * Clean up transport subscriptions and packet buffer.\n *\n * @private\n */\n cleanup() {\n debug(\"cleanup\");\n this.subs.forEach((subDestroy) => subDestroy());\n this.subs.length = 0;\n this.decoder.destroy();\n }\n /**\n * Close the current socket.\n *\n * @private\n */\n _close() {\n debug(\"disconnect\");\n this.skipReconnect = true;\n this._reconnecting = false;\n if (\"opening\" === this._readyState) {\n // `onclose` will not fire because\n // an open event never happened\n this.cleanup();\n }\n this.backoff.reset();\n this._readyState = \"closed\";\n if (this.engine)\n this.engine.close();\n }\n /**\n * Alias for close()\n *\n * @private\n */\n disconnect() {\n return this._close();\n }\n /**\n * Called upon engine close.\n *\n * @private\n */\n onclose(reason) {\n debug(\"onclose\");\n this.cleanup();\n this.backoff.reset();\n this._readyState = \"closed\";\n this.emitReserved(\"close\", reason);\n if (this._reconnection && !this.skipReconnect) {\n this.reconnect();\n }\n }\n /**\n * Attempt a reconnection.\n *\n * @private\n */\n reconnect() {\n if (this._reconnecting || this.skipReconnect)\n return this;\n const self = this;\n if (this.backoff.attempts >= this._reconnectionAttempts) {\n debug(\"reconnect failed\");\n this.backoff.reset();\n this.emitReserved(\"reconnect_failed\");\n this._reconnecting = false;\n }\n else {\n const delay = this.backoff.duration();\n debug(\"will wait %dms before reconnect attempt\", delay);\n this._reconnecting = true;\n const timer = setTimeout(() => {\n if (self.skipReconnect)\n return;\n debug(\"attempting reconnect\");\n this.emitReserved(\"reconnect_attempt\", self.backoff.attempts);\n // check again for the case socket closed in above events\n if (self.skipReconnect)\n return;\n self.open((err) => {\n if (err) {\n debug(\"reconnect attempt error\");\n self._reconnecting = false;\n self.reconnect();\n this.emitReserved(\"reconnect_error\", err);\n }\n else {\n debug(\"reconnect success\");\n self.onreconnect();\n }\n });\n }, delay);\n if (this.opts.autoUnref) {\n timer.unref();\n }\n this.subs.push(function subDestroy() {\n clearTimeout(timer);\n });\n }\n }\n /**\n * Called upon successful reconnect.\n *\n * @private\n */\n onreconnect() {\n const attempt = this.backoff.attempts;\n this._reconnecting = false;\n this.backoff.reset();\n this.emitReserved(\"reconnect\", attempt);\n }\n}\nexports.Manager = Manager;\n\n\n//# sourceURL=webpack://BringgDashboardSDK/./node_modules/socket.io-client/build/manager.js?");
|
|
8384
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"io\", function() { return lookup; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"connect\", function() { return lookup; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return lookup; });\n/* harmony import */ var _url_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./url.js */ \"./node_modules/socket.io-client/build/esm/url.js\");\n/* harmony import */ var _manager_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./manager.js */ \"./node_modules/socket.io-client/build/esm/manager.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Manager\", function() { return _manager_js__WEBPACK_IMPORTED_MODULE_1__[\"a\"]; });\n\n/* harmony import */ var _socket_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./socket.js */ \"./node_modules/socket.io-client/build/esm/socket.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Socket\", function() { return _socket_js__WEBPACK_IMPORTED_MODULE_2__[\"a\"]; });\n\n/* harmony import */ var socket_io_parser__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! socket.io-parser */ \"./node_modules/socket.io-parser/build/esm/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"protocol\", function() { return socket_io_parser__WEBPACK_IMPORTED_MODULE_3__[\"protocol\"]; });\n\n\n\n\n/**\n * Managers cache.\n */\nconst cache = {};\nfunction lookup(uri, opts) {\n if (typeof uri === \"object\") {\n opts = uri;\n uri = undefined;\n }\n opts = opts || {};\n const parsed = Object(_url_js__WEBPACK_IMPORTED_MODULE_0__[/* url */ \"a\"])(uri, opts.path || \"/socket.io\");\n const source = parsed.source;\n const id = parsed.id;\n const path = parsed.path;\n const sameNamespace = cache[id] && path in cache[id][\"nsps\"];\n const newConnection = opts.forceNew ||\n opts[\"force new connection\"] ||\n false === opts.multiplex ||\n sameNamespace;\n let io;\n if (newConnection) {\n io = new _manager_js__WEBPACK_IMPORTED_MODULE_1__[/* Manager */ \"a\"](source, opts);\n }\n else {\n if (!cache[id]) {\n cache[id] = new _manager_js__WEBPACK_IMPORTED_MODULE_1__[/* Manager */ \"a\"](source, opts);\n }\n io = cache[id];\n }\n if (parsed.query && !opts.query) {\n opts.query = parsed.queryKey;\n }\n return io.socket(parsed.path, opts);\n}\n// so that \"lookup\" can be used both as a function (e.g. `io(...)`) and as a\n// namespace (e.g. `io.connect(...)`), for backward compatibility\nObject.assign(lookup, {\n Manager: _manager_js__WEBPACK_IMPORTED_MODULE_1__[/* Manager */ \"a\"],\n Socket: _socket_js__WEBPACK_IMPORTED_MODULE_2__[/* Socket */ \"a\"],\n io: lookup,\n connect: lookup,\n});\n/**\n * Protocol version.\n *\n * @public\n */\n\n/**\n * Expose constructors for standalone build.\n *\n * @public\n */\n\n\n\n//# sourceURL=webpack://BringgDashboardSDK/./node_modules/socket.io-client/build/esm/index.js?");
|
|
8386
8385
|
|
|
8387
8386
|
/***/ }),
|
|
8388
8387
|
|
|
8389
|
-
/***/ "./node_modules/socket.io-client/build/
|
|
8390
|
-
|
|
8391
|
-
!*** ./node_modules/socket.io-client/build/
|
|
8392
|
-
|
|
8393
|
-
/*!
|
|
8394
|
-
/*!
|
|
8395
|
-
/***/ (function(module,
|
|
8388
|
+
/***/ "./node_modules/socket.io-client/build/esm/manager.js":
|
|
8389
|
+
/*!************************************************************!*\
|
|
8390
|
+
!*** ./node_modules/socket.io-client/build/esm/manager.js ***!
|
|
8391
|
+
\************************************************************/
|
|
8392
|
+
/*! exports provided: Manager */
|
|
8393
|
+
/*! exports used: Manager */
|
|
8394
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
8396
8395
|
|
|
8397
8396
|
"use strict";
|
|
8398
|
-
eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.on = void 0;\nfunction on(obj, ev, fn) {\n obj.on(ev, fn);\n return function subDestroy() {\n obj.off(ev, fn);\n };\n}\nexports.on = on;\n\n\n//# sourceURL=webpack://BringgDashboardSDK/./node_modules/socket.io-client/build/on.js?");
|
|
8397
|
+
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Manager; });\n/* harmony import */ var engine_io_client__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! engine.io-client */ \"./node_modules/engine.io-client/build/esm/index.js\");\n/* harmony import */ var _socket_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./socket.js */ \"./node_modules/socket.io-client/build/esm/socket.js\");\n/* harmony import */ var socket_io_parser__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! socket.io-parser */ \"./node_modules/socket.io-parser/build/esm/index.js\");\n/* harmony import */ var _on_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./on.js */ \"./node_modules/socket.io-client/build/esm/on.js\");\n/* harmony import */ var _contrib_backo2_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./contrib/backo2.js */ \"./node_modules/socket.io-client/build/esm/contrib/backo2.js\");\n/* harmony import */ var _socket_io_component_emitter__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @socket.io/component-emitter */ \"./node_modules/@socket.io/component-emitter/index.mjs\");\n\n\n\n\n\n\nclass Manager extends _socket_io_component_emitter__WEBPACK_IMPORTED_MODULE_5__[/* Emitter */ \"a\"] {\n constructor(uri, opts) {\n var _a;\n super();\n this.nsps = {};\n this.subs = [];\n if (uri && \"object\" === typeof uri) {\n opts = uri;\n uri = undefined;\n }\n opts = opts || {};\n opts.path = opts.path || \"/socket.io\";\n this.opts = opts;\n Object(engine_io_client__WEBPACK_IMPORTED_MODULE_0__[/* installTimerFunctions */ \"b\"])(this, opts);\n this.reconnection(opts.reconnection !== false);\n this.reconnectionAttempts(opts.reconnectionAttempts || Infinity);\n this.reconnectionDelay(opts.reconnectionDelay || 1000);\n this.reconnectionDelayMax(opts.reconnectionDelayMax || 5000);\n this.randomizationFactor((_a = opts.randomizationFactor) !== null && _a !== void 0 ? _a : 0.5);\n this.backoff = new _contrib_backo2_js__WEBPACK_IMPORTED_MODULE_4__[/* Backoff */ \"a\"]({\n min: this.reconnectionDelay(),\n max: this.reconnectionDelayMax(),\n jitter: this.randomizationFactor(),\n });\n this.timeout(null == opts.timeout ? 20000 : opts.timeout);\n this._readyState = \"closed\";\n this.uri = uri;\n const _parser = opts.parser || socket_io_parser__WEBPACK_IMPORTED_MODULE_2__;\n this.encoder = new _parser.Encoder();\n this.decoder = new _parser.Decoder();\n this._autoConnect = opts.autoConnect !== false;\n if (this._autoConnect)\n this.open();\n }\n reconnection(v) {\n if (!arguments.length)\n return this._reconnection;\n this._reconnection = !!v;\n return this;\n }\n reconnectionAttempts(v) {\n if (v === undefined)\n return this._reconnectionAttempts;\n this._reconnectionAttempts = v;\n return this;\n }\n reconnectionDelay(v) {\n var _a;\n if (v === undefined)\n return this._reconnectionDelay;\n this._reconnectionDelay = v;\n (_a = this.backoff) === null || _a === void 0 ? void 0 : _a.setMin(v);\n return this;\n }\n randomizationFactor(v) {\n var _a;\n if (v === undefined)\n return this._randomizationFactor;\n this._randomizationFactor = v;\n (_a = this.backoff) === null || _a === void 0 ? void 0 : _a.setJitter(v);\n return this;\n }\n reconnectionDelayMax(v) {\n var _a;\n if (v === undefined)\n return this._reconnectionDelayMax;\n this._reconnectionDelayMax = v;\n (_a = this.backoff) === null || _a === void 0 ? void 0 : _a.setMax(v);\n return this;\n }\n timeout(v) {\n if (!arguments.length)\n return this._timeout;\n this._timeout = v;\n return this;\n }\n /**\n * Starts trying to reconnect if reconnection is enabled and we have not\n * started reconnecting yet\n *\n * @private\n */\n maybeReconnectOnOpen() {\n // Only try to reconnect if it's the first time we're connecting\n if (!this._reconnecting &&\n this._reconnection &&\n this.backoff.attempts === 0) {\n // keeps reconnection from firing twice for the same reconnection loop\n this.reconnect();\n }\n }\n /**\n * Sets the current transport `socket`.\n *\n * @param {Function} fn - optional, callback\n * @return self\n * @public\n */\n open(fn) {\n if (~this._readyState.indexOf(\"open\"))\n return this;\n this.engine = new engine_io_client__WEBPACK_IMPORTED_MODULE_0__[/* Socket */ \"a\"](this.uri, this.opts);\n const socket = this.engine;\n const self = this;\n this._readyState = \"opening\";\n this.skipReconnect = false;\n // emit `open`\n const openSubDestroy = Object(_on_js__WEBPACK_IMPORTED_MODULE_3__[/* on */ \"a\"])(socket, \"open\", function () {\n self.onopen();\n fn && fn();\n });\n // emit `error`\n const errorSub = Object(_on_js__WEBPACK_IMPORTED_MODULE_3__[/* on */ \"a\"])(socket, \"error\", (err) => {\n self.cleanup();\n self._readyState = \"closed\";\n this.emitReserved(\"error\", err);\n if (fn) {\n fn(err);\n }\n else {\n // Only do this if there is no fn to handle the error\n self.maybeReconnectOnOpen();\n }\n });\n if (false !== this._timeout) {\n const timeout = this._timeout;\n if (timeout === 0) {\n openSubDestroy(); // prevents a race condition with the 'open' event\n }\n // set timer\n const timer = this.setTimeoutFn(() => {\n openSubDestroy();\n socket.close();\n // @ts-ignore\n socket.emit(\"error\", new Error(\"timeout\"));\n }, timeout);\n if (this.opts.autoUnref) {\n timer.unref();\n }\n this.subs.push(function subDestroy() {\n clearTimeout(timer);\n });\n }\n this.subs.push(openSubDestroy);\n this.subs.push(errorSub);\n return this;\n }\n /**\n * Alias for open()\n *\n * @return self\n * @public\n */\n connect(fn) {\n return this.open(fn);\n }\n /**\n * Called upon transport open.\n *\n * @private\n */\n onopen() {\n // clear old subs\n this.cleanup();\n // mark as open\n this._readyState = \"open\";\n this.emitReserved(\"open\");\n // add new subs\n const socket = this.engine;\n this.subs.push(Object(_on_js__WEBPACK_IMPORTED_MODULE_3__[/* on */ \"a\"])(socket, \"ping\", this.onping.bind(this)), Object(_on_js__WEBPACK_IMPORTED_MODULE_3__[/* on */ \"a\"])(socket, \"data\", this.ondata.bind(this)), Object(_on_js__WEBPACK_IMPORTED_MODULE_3__[/* on */ \"a\"])(socket, \"error\", this.onerror.bind(this)), Object(_on_js__WEBPACK_IMPORTED_MODULE_3__[/* on */ \"a\"])(socket, \"close\", this.onclose.bind(this)), Object(_on_js__WEBPACK_IMPORTED_MODULE_3__[/* on */ \"a\"])(this.decoder, \"decoded\", this.ondecoded.bind(this)));\n }\n /**\n * Called upon a ping.\n *\n * @private\n */\n onping() {\n this.emitReserved(\"ping\");\n }\n /**\n * Called with data.\n *\n * @private\n */\n ondata(data) {\n try {\n this.decoder.add(data);\n }\n catch (e) {\n this.onclose(\"parse error\", e);\n }\n }\n /**\n * Called when parser fully decodes a packet.\n *\n * @private\n */\n ondecoded(packet) {\n // the nextTick call prevents an exception in a user-provided event listener from triggering a disconnection due to a \"parse error\"\n Object(engine_io_client__WEBPACK_IMPORTED_MODULE_0__[/* nextTick */ \"c\"])(() => {\n this.emitReserved(\"packet\", packet);\n }, this.setTimeoutFn);\n }\n /**\n * Called upon socket error.\n *\n * @private\n */\n onerror(err) {\n this.emitReserved(\"error\", err);\n }\n /**\n * Creates a new socket for the given `nsp`.\n *\n * @return {Socket}\n * @public\n */\n socket(nsp, opts) {\n let socket = this.nsps[nsp];\n if (!socket) {\n socket = new _socket_js__WEBPACK_IMPORTED_MODULE_1__[/* Socket */ \"a\"](this, nsp, opts);\n this.nsps[nsp] = socket;\n }\n return socket;\n }\n /**\n * Called upon a socket close.\n *\n * @param socket\n * @private\n */\n _destroy(socket) {\n const nsps = Object.keys(this.nsps);\n for (const nsp of nsps) {\n const socket = this.nsps[nsp];\n if (socket.active) {\n return;\n }\n }\n this._close();\n }\n /**\n * Writes a packet.\n *\n * @param packet\n * @private\n */\n _packet(packet) {\n const encodedPackets = this.encoder.encode(packet);\n for (let i = 0; i < encodedPackets.length; i++) {\n this.engine.write(encodedPackets[i], packet.options);\n }\n }\n /**\n * Clean up transport subscriptions and packet buffer.\n *\n * @private\n */\n cleanup() {\n this.subs.forEach((subDestroy) => subDestroy());\n this.subs.length = 0;\n this.decoder.destroy();\n }\n /**\n * Close the current socket.\n *\n * @private\n */\n _close() {\n this.skipReconnect = true;\n this._reconnecting = false;\n this.onclose(\"forced close\");\n if (this.engine)\n this.engine.close();\n }\n /**\n * Alias for close()\n *\n * @private\n */\n disconnect() {\n return this._close();\n }\n /**\n * Called upon engine close.\n *\n * @private\n */\n onclose(reason, description) {\n this.cleanup();\n this.backoff.reset();\n this._readyState = \"closed\";\n this.emitReserved(\"close\", reason, description);\n if (this._reconnection && !this.skipReconnect) {\n this.reconnect();\n }\n }\n /**\n * Attempt a reconnection.\n *\n * @private\n */\n reconnect() {\n if (this._reconnecting || this.skipReconnect)\n return this;\n const self = this;\n if (this.backoff.attempts >= this._reconnectionAttempts) {\n this.backoff.reset();\n this.emitReserved(\"reconnect_failed\");\n this._reconnecting = false;\n }\n else {\n const delay = this.backoff.duration();\n this._reconnecting = true;\n const timer = this.setTimeoutFn(() => {\n if (self.skipReconnect)\n return;\n this.emitReserved(\"reconnect_attempt\", self.backoff.attempts);\n // check again for the case socket closed in above events\n if (self.skipReconnect)\n return;\n self.open((err) => {\n if (err) {\n self._reconnecting = false;\n self.reconnect();\n this.emitReserved(\"reconnect_error\", err);\n }\n else {\n self.onreconnect();\n }\n });\n }, delay);\n if (this.opts.autoUnref) {\n timer.unref();\n }\n this.subs.push(function subDestroy() {\n clearTimeout(timer);\n });\n }\n }\n /**\n * Called upon successful reconnect.\n *\n * @private\n */\n onreconnect() {\n const attempt = this.backoff.attempts;\n this._reconnecting = false;\n this.backoff.reset();\n this.emitReserved(\"reconnect\", attempt);\n }\n}\n\n\n//# sourceURL=webpack://BringgDashboardSDK/./node_modules/socket.io-client/build/esm/manager.js?");
|
|
8399
8398
|
|
|
8400
8399
|
/***/ }),
|
|
8401
8400
|
|
|
8402
|
-
/***/ "./node_modules/socket.io-client/build/
|
|
8401
|
+
/***/ "./node_modules/socket.io-client/build/esm/on.js":
|
|
8403
8402
|
/*!*******************************************************!*\
|
|
8404
|
-
!*** ./node_modules/socket.io-client/build/
|
|
8403
|
+
!*** ./node_modules/socket.io-client/build/esm/on.js ***!
|
|
8405
8404
|
\*******************************************************/
|
|
8406
|
-
/*!
|
|
8407
|
-
/*!
|
|
8408
|
-
/***/ (function(module,
|
|
8405
|
+
/*! exports provided: on */
|
|
8406
|
+
/*! exports used: on */
|
|
8407
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
8409
8408
|
|
|
8410
8409
|
"use strict";
|
|
8411
|
-
eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Socket = void 0;\nconst socket_io_parser_1 = __webpack_require__(/*! socket.io-parser */ \"./node_modules/socket.io-parser/dist/index.js\");\nconst on_1 = __webpack_require__(/*! ./on */ \"./node_modules/socket.io-client/build/on.js\");\nconst typed_events_1 = __webpack_require__(/*! ./typed-events */ \"./node_modules/socket.io-client/build/typed-events.js\");\nconst debug = __webpack_require__(/*! debug */ \"./node_modules/debug/src/browser.js\")(\"socket.io-client:socket\");\n/**\n * Internal events.\n * These events can't be emitted by the user.\n */\nconst RESERVED_EVENTS = Object.freeze({\n connect: 1,\n connect_error: 1,\n disconnect: 1,\n disconnecting: 1,\n // EventEmitter reserved events: https://nodejs.org/api/events.html#events_event_newlistener\n newListener: 1,\n removeListener: 1,\n});\nclass Socket extends typed_events_1.StrictEventEmitter {\n /**\n * `Socket` constructor.\n *\n * @public\n */\n constructor(io, nsp, opts) {\n super();\n this.receiveBuffer = [];\n this.sendBuffer = [];\n this.ids = 0;\n this.acks = {};\n this.flags = {};\n this.io = io;\n this.nsp = nsp;\n this.ids = 0;\n this.acks = {};\n this.receiveBuffer = [];\n this.sendBuffer = [];\n this.connected = false;\n this.disconnected = true;\n this.flags = {};\n if (opts && opts.auth) {\n this.auth = opts.auth;\n }\n if (this.io._autoConnect)\n this.open();\n }\n /**\n * Subscribe to open, close and packet events\n *\n * @private\n */\n subEvents() {\n if (this.subs)\n return;\n const io = this.io;\n this.subs = [\n on_1.on(io, \"open\", this.onopen.bind(this)),\n on_1.on(io, \"packet\", this.onpacket.bind(this)),\n on_1.on(io, \"error\", this.onerror.bind(this)),\n on_1.on(io, \"close\", this.onclose.bind(this)),\n ];\n }\n /**\n * Whether the Socket will try to reconnect when its Manager connects or reconnects\n */\n get active() {\n return !!this.subs;\n }\n /**\n * \"Opens\" the socket.\n *\n * @public\n */\n connect() {\n if (this.connected)\n return this;\n this.subEvents();\n if (!this.io[\"_reconnecting\"])\n this.io.open(); // ensure open\n if (\"open\" === this.io._readyState)\n this.onopen();\n return this;\n }\n /**\n * Alias for connect()\n */\n open() {\n return this.connect();\n }\n /**\n * Sends a `message` event.\n *\n * @return self\n * @public\n */\n send(...args) {\n args.unshift(\"message\");\n this.emit.apply(this, args);\n return this;\n }\n /**\n * Override `emit`.\n * If the event is in `events`, it's emitted normally.\n *\n * @return self\n * @public\n */\n emit(ev, ...args) {\n if (RESERVED_EVENTS.hasOwnProperty(ev)) {\n throw new Error('\"' + ev + '\" is a reserved event name');\n }\n args.unshift(ev);\n const packet = {\n type: socket_io_parser_1.PacketType.EVENT,\n data: args,\n };\n packet.options = {};\n packet.options.compress = this.flags.compress !== false;\n // event ack callback\n if (\"function\" === typeof args[args.length - 1]) {\n debug(\"emitting packet with ack id %d\", this.ids);\n this.acks[this.ids] = args.pop();\n packet.id = this.ids++;\n }\n const isTransportWritable = this.io.engine &&\n this.io.engine.transport &&\n this.io.engine.transport.writable;\n const discardPacket = this.flags.volatile && (!isTransportWritable || !this.connected);\n if (discardPacket) {\n debug(\"discard packet as the transport is not currently writable\");\n }\n else if (this.connected) {\n this.packet(packet);\n }\n else {\n this.sendBuffer.push(packet);\n }\n this.flags = {};\n return this;\n }\n /**\n * Sends a packet.\n *\n * @param packet\n * @private\n */\n packet(packet) {\n packet.nsp = this.nsp;\n this.io._packet(packet);\n }\n /**\n * Called upon engine `open`.\n *\n * @private\n */\n onopen() {\n debug(\"transport is open - connecting\");\n if (typeof this.auth == \"function\") {\n this.auth((data) => {\n this.packet({ type: socket_io_parser_1.PacketType.CONNECT, data });\n });\n }\n else {\n this.packet({ type: socket_io_parser_1.PacketType.CONNECT, data: this.auth });\n }\n }\n /**\n * Called upon engine or manager `error`.\n *\n * @param err\n * @private\n */\n onerror(err) {\n if (!this.connected) {\n this.emitReserved(\"connect_error\", err);\n }\n }\n /**\n * Called upon engine `close`.\n *\n * @param reason\n * @private\n */\n onclose(reason) {\n debug(\"close (%s)\", reason);\n this.connected = false;\n this.disconnected = true;\n delete this.id;\n this.emitReserved(\"disconnect\", reason);\n }\n /**\n * Called with socket packet.\n *\n * @param packet\n * @private\n */\n onpacket(packet) {\n const sameNamespace = packet.nsp === this.nsp;\n if (!sameNamespace)\n return;\n switch (packet.type) {\n case socket_io_parser_1.PacketType.CONNECT:\n if (packet.data && packet.data.sid) {\n const id = packet.data.sid;\n this.onconnect(id);\n }\n else {\n this.emitReserved(\"connect_error\", new Error(\"It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)\"));\n }\n break;\n case socket_io_parser_1.PacketType.EVENT:\n this.onevent(packet);\n break;\n case socket_io_parser_1.PacketType.BINARY_EVENT:\n this.onevent(packet);\n break;\n case socket_io_parser_1.PacketType.ACK:\n this.onack(packet);\n break;\n case socket_io_parser_1.PacketType.BINARY_ACK:\n this.onack(packet);\n break;\n case socket_io_parser_1.PacketType.DISCONNECT:\n this.ondisconnect();\n break;\n case socket_io_parser_1.PacketType.CONNECT_ERROR:\n const err = new Error(packet.data.message);\n // @ts-ignore\n err.data = packet.data.data;\n this.emitReserved(\"connect_error\", err);\n break;\n }\n }\n /**\n * Called upon a server event.\n *\n * @param packet\n * @private\n */\n onevent(packet) {\n const args = packet.data || [];\n debug(\"emitting event %j\", args);\n if (null != packet.id) {\n debug(\"attaching ack callback to event\");\n args.push(this.ack(packet.id));\n }\n if (this.connected) {\n this.emitEvent(args);\n }\n else {\n this.receiveBuffer.push(Object.freeze(args));\n }\n }\n emitEvent(args) {\n if (this._anyListeners && this._anyListeners.length) {\n const listeners = this._anyListeners.slice();\n for (const listener of listeners) {\n listener.apply(this, args);\n }\n }\n super.emit.apply(this, args);\n }\n /**\n * Produces an ack callback to emit with an event.\n *\n * @private\n */\n ack(id) {\n const self = this;\n let sent = false;\n return function (...args) {\n // prevent double callbacks\n if (sent)\n return;\n sent = true;\n debug(\"sending ack %j\", args);\n self.packet({\n type: socket_io_parser_1.PacketType.ACK,\n id: id,\n data: args,\n });\n };\n }\n /**\n * Called upon a server acknowlegement.\n *\n * @param packet\n * @private\n */\n onack(packet) {\n const ack = this.acks[packet.id];\n if (\"function\" === typeof ack) {\n debug(\"calling ack %s with %j\", packet.id, packet.data);\n ack.apply(this, packet.data);\n delete this.acks[packet.id];\n }\n else {\n debug(\"bad ack %s\", packet.id);\n }\n }\n /**\n * Called upon server connect.\n *\n * @private\n */\n onconnect(id) {\n debug(\"socket connected with id %s\", id);\n this.id = id;\n this.connected = true;\n this.disconnected = false;\n this.emitBuffered();\n this.emitReserved(\"connect\");\n }\n /**\n * Emit buffered events (received and emitted).\n *\n * @private\n */\n emitBuffered() {\n this.receiveBuffer.forEach((args) => this.emitEvent(args));\n this.receiveBuffer = [];\n this.sendBuffer.forEach((packet) => this.packet(packet));\n this.sendBuffer = [];\n }\n /**\n * Called upon server disconnect.\n *\n * @private\n */\n ondisconnect() {\n debug(\"server disconnect (%s)\", this.nsp);\n this.destroy();\n this.onclose(\"io server disconnect\");\n }\n /**\n * Called upon forced client/server side disconnections,\n * this method ensures the manager stops tracking us and\n * that reconnections don't get triggered for this.\n *\n * @private\n */\n destroy() {\n if (this.subs) {\n // clean subscriptions to avoid reconnections\n this.subs.forEach((subDestroy) => subDestroy());\n this.subs = undefined;\n }\n this.io[\"_destroy\"](this);\n }\n /**\n * Disconnects the socket manually.\n *\n * @return self\n * @public\n */\n disconnect() {\n if (this.connected) {\n debug(\"performing disconnect (%s)\", this.nsp);\n this.packet({ type: socket_io_parser_1.PacketType.DISCONNECT });\n }\n // remove socket from pool\n this.destroy();\n if (this.connected) {\n // fire events\n this.onclose(\"io client disconnect\");\n }\n return this;\n }\n /**\n * Alias for disconnect()\n *\n * @return self\n * @public\n */\n close() {\n return this.disconnect();\n }\n /**\n * Sets the compress flag.\n *\n * @param compress - if `true`, compresses the sending data\n * @return self\n * @public\n */\n compress(compress) {\n this.flags.compress = compress;\n return this;\n }\n /**\n * Sets a modifier for a subsequent event emission that the event message will be dropped when this socket is not\n * ready to send messages.\n *\n * @returns self\n * @public\n */\n get volatile() {\n this.flags.volatile = true;\n return this;\n }\n /**\n * Adds a listener that will be fired when any event is emitted. The event name is passed as the first argument to the\n * callback.\n *\n * @param listener\n * @public\n */\n onAny(listener) {\n this._anyListeners = this._anyListeners || [];\n this._anyListeners.push(listener);\n return this;\n }\n /**\n * Adds a listener that will be fired when any event is emitted. The event name is passed as the first argument to the\n * callback. The listener is added to the beginning of the listeners array.\n *\n * @param listener\n * @public\n */\n prependAny(listener) {\n this._anyListeners = this._anyListeners || [];\n this._anyListeners.unshift(listener);\n return this;\n }\n /**\n * Removes the listener that will be fired when any event is emitted.\n *\n * @param listener\n * @public\n */\n offAny(listener) {\n if (!this._anyListeners) {\n return this;\n }\n if (listener) {\n const listeners = this._anyListeners;\n for (let i = 0; i < listeners.length; i++) {\n if (listener === listeners[i]) {\n listeners.splice(i, 1);\n return this;\n }\n }\n }\n else {\n this._anyListeners = [];\n }\n return this;\n }\n /**\n * Returns an array of listeners that are listening for any event that is specified. This array can be manipulated,\n * e.g. to remove listeners.\n *\n * @public\n */\n listenersAny() {\n return this._anyListeners || [];\n }\n}\nexports.Socket = Socket;\n\n\n//# sourceURL=webpack://BringgDashboardSDK/./node_modules/socket.io-client/build/socket.js?");
|
|
8410
|
+
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return on; });\nfunction on(obj, ev, fn) {\n obj.on(ev, fn);\n return function subDestroy() {\n obj.off(ev, fn);\n };\n}\n\n\n//# sourceURL=webpack://BringgDashboardSDK/./node_modules/socket.io-client/build/esm/on.js?");
|
|
8412
8411
|
|
|
8413
8412
|
/***/ }),
|
|
8414
8413
|
|
|
8415
|
-
/***/ "./node_modules/socket.io-client/build/
|
|
8416
|
-
|
|
8417
|
-
!*** ./node_modules/socket.io-client/build/
|
|
8418
|
-
|
|
8419
|
-
/*!
|
|
8420
|
-
/*!
|
|
8421
|
-
/***/ (function(module,
|
|
8414
|
+
/***/ "./node_modules/socket.io-client/build/esm/socket.js":
|
|
8415
|
+
/*!***********************************************************!*\
|
|
8416
|
+
!*** ./node_modules/socket.io-client/build/esm/socket.js ***!
|
|
8417
|
+
\***********************************************************/
|
|
8418
|
+
/*! exports provided: Socket */
|
|
8419
|
+
/*! exports used: Socket */
|
|
8420
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
8422
8421
|
|
|
8423
8422
|
"use strict";
|
|
8424
|
-
eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.StrictEventEmitter = void 0;\nconst Emitter = __webpack_require__(/*! component-emitter */ \"./node_modules/socket.io-client/node_modules/component-emitter/index.js\");\n/**\n * Strictly typed version of an `EventEmitter`. A `TypedEventEmitter` takes type\n * parameters for mappings of event names to event data types, and strictly\n * types method calls to the `EventEmitter` according to these event maps.\n *\n * @typeParam ListenEvents - `EventsMap` of user-defined events that can be\n * listened to with `on` or `once`\n * @typeParam EmitEvents - `EventsMap` of user-defined events that can be\n * emitted with `emit`\n * @typeParam ReservedEvents - `EventsMap` of reserved events, that can be\n * emitted by socket.io with `emitReserved`, and can be listened to with\n * `listen`.\n */\nclass StrictEventEmitter extends Emitter {\n /**\n * Adds the `listener` function as an event listener for `ev`.\n *\n * @param ev Name of the event\n * @param listener Callback function\n */\n on(ev, listener) {\n super.on(ev, listener);\n return this;\n }\n /**\n * Adds a one-time `listener` function as an event listener for `ev`.\n *\n * @param ev Name of the event\n * @param listener Callback function\n */\n once(ev, listener) {\n super.once(ev, listener);\n return this;\n }\n /**\n * Emits an event.\n *\n * @param ev Name of the event\n * @param args Values to send to listeners of this event\n */\n emit(ev, ...args) {\n super.emit(ev, ...args);\n return this;\n }\n /**\n * Emits a reserved event.\n *\n * This method is `protected`, so that only a class extending\n * `StrictEventEmitter` can emit its own reserved events.\n *\n * @param ev Reserved event name\n * @param args Arguments to emit along with the event\n */\n emitReserved(ev, ...args) {\n super.emit(ev, ...args);\n return this;\n }\n /**\n * Returns the listeners listening to an event.\n *\n * @param event Event name\n * @returns Array of listeners subscribed to `event`\n */\n listeners(event) {\n return super.listeners(event);\n }\n}\nexports.StrictEventEmitter = StrictEventEmitter;\n\n\n//# sourceURL=webpack://BringgDashboardSDK/./node_modules/socket.io-client/build/typed-events.js?");
|
|
8423
|
+
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Socket; });\n/* harmony import */ var socket_io_parser__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! socket.io-parser */ \"./node_modules/socket.io-parser/build/esm/index.js\");\n/* harmony import */ var _on_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./on.js */ \"./node_modules/socket.io-client/build/esm/on.js\");\n/* harmony import */ var _socket_io_component_emitter__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @socket.io/component-emitter */ \"./node_modules/@socket.io/component-emitter/index.mjs\");\n\n\n\n/**\n * Internal events.\n * These events can't be emitted by the user.\n */\nconst RESERVED_EVENTS = Object.freeze({\n connect: 1,\n connect_error: 1,\n disconnect: 1,\n disconnecting: 1,\n // EventEmitter reserved events: https://nodejs.org/api/events.html#events_event_newlistener\n newListener: 1,\n removeListener: 1,\n});\n/**\n * A Socket is the fundamental class for interacting with the server.\n *\n * A Socket belongs to a certain Namespace (by default /) and uses an underlying {@link Manager} to communicate.\n *\n * @example\n * const socket = io();\n *\n * socket.on(\"connect\", () => {\n * console.log(\"connected\");\n * });\n *\n * // send an event to the server\n * socket.emit(\"foo\", \"bar\");\n *\n * socket.on(\"foobar\", () => {\n * // an event was received from the server\n * });\n *\n * // upon disconnection\n * socket.on(\"disconnect\", (reason) => {\n * console.log(`disconnected due to ${reason}`);\n * });\n */\nclass Socket extends _socket_io_component_emitter__WEBPACK_IMPORTED_MODULE_2__[/* Emitter */ \"a\"] {\n /**\n * `Socket` constructor.\n */\n constructor(io, nsp, opts) {\n super();\n /**\n * Whether the socket is currently connected to the server.\n *\n * @example\n * const socket = io();\n *\n * socket.on(\"connect\", () => {\n * console.log(socket.connected); // true\n * });\n *\n * socket.on(\"disconnect\", () => {\n * console.log(socket.connected); // false\n * });\n */\n this.connected = false;\n /**\n * Buffer for packets received before the CONNECT packet\n */\n this.receiveBuffer = [];\n /**\n * Buffer for packets that will be sent once the socket is connected\n */\n this.sendBuffer = [];\n this.ids = 0;\n this.acks = {};\n this.flags = {};\n this.io = io;\n this.nsp = nsp;\n if (opts && opts.auth) {\n this.auth = opts.auth;\n }\n if (this.io._autoConnect)\n this.open();\n }\n /**\n * Whether the socket is currently disconnected\n *\n * @example\n * const socket = io();\n *\n * socket.on(\"connect\", () => {\n * console.log(socket.disconnected); // false\n * });\n *\n * socket.on(\"disconnect\", () => {\n * console.log(socket.disconnected); // true\n * });\n */\n get disconnected() {\n return !this.connected;\n }\n /**\n * Subscribe to open, close and packet events\n *\n * @private\n */\n subEvents() {\n if (this.subs)\n return;\n const io = this.io;\n this.subs = [\n Object(_on_js__WEBPACK_IMPORTED_MODULE_1__[/* on */ \"a\"])(io, \"open\", this.onopen.bind(this)),\n Object(_on_js__WEBPACK_IMPORTED_MODULE_1__[/* on */ \"a\"])(io, \"packet\", this.onpacket.bind(this)),\n Object(_on_js__WEBPACK_IMPORTED_MODULE_1__[/* on */ \"a\"])(io, \"error\", this.onerror.bind(this)),\n Object(_on_js__WEBPACK_IMPORTED_MODULE_1__[/* on */ \"a\"])(io, \"close\", this.onclose.bind(this)),\n ];\n }\n /**\n * Whether the Socket will try to reconnect when its Manager connects or reconnects.\n *\n * @example\n * const socket = io();\n *\n * console.log(socket.active); // true\n *\n * socket.on(\"disconnect\", (reason) => {\n * if (reason === \"io server disconnect\") {\n * // the disconnection was initiated by the server, you need to manually reconnect\n * console.log(socket.active); // false\n * }\n * // else the socket will automatically try to reconnect\n * console.log(socket.active); // true\n * });\n */\n get active() {\n return !!this.subs;\n }\n /**\n * \"Opens\" the socket.\n *\n * @example\n * const socket = io({\n * autoConnect: false\n * });\n *\n * socket.connect();\n */\n connect() {\n if (this.connected)\n return this;\n this.subEvents();\n if (!this.io[\"_reconnecting\"])\n this.io.open(); // ensure open\n if (\"open\" === this.io._readyState)\n this.onopen();\n return this;\n }\n /**\n * Alias for {@link connect()}.\n */\n open() {\n return this.connect();\n }\n /**\n * Sends a `message` event.\n *\n * This method mimics the WebSocket.send() method.\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/send\n *\n * @example\n * socket.send(\"hello\");\n *\n * // this is equivalent to\n * socket.emit(\"message\", \"hello\");\n *\n * @return self\n */\n send(...args) {\n args.unshift(\"message\");\n this.emit.apply(this, args);\n return this;\n }\n /**\n * Override `emit`.\n * If the event is in `events`, it's emitted normally.\n *\n * @example\n * socket.emit(\"hello\", \"world\");\n *\n * // all serializable datastructures are supported (no need to call JSON.stringify)\n * socket.emit(\"hello\", 1, \"2\", { 3: [\"4\"], 5: Uint8Array.from([6]) });\n *\n * // with an acknowledgement from the server\n * socket.emit(\"hello\", \"world\", (val) => {\n * // ...\n * });\n *\n * @return self\n */\n emit(ev, ...args) {\n if (RESERVED_EVENTS.hasOwnProperty(ev)) {\n throw new Error('\"' + ev.toString() + '\" is a reserved event name');\n }\n args.unshift(ev);\n const packet = {\n type: socket_io_parser__WEBPACK_IMPORTED_MODULE_0__[\"PacketType\"].EVENT,\n data: args,\n };\n packet.options = {};\n packet.options.compress = this.flags.compress !== false;\n // event ack callback\n if (\"function\" === typeof args[args.length - 1]) {\n const id = this.ids++;\n const ack = args.pop();\n this._registerAckCallback(id, ack);\n packet.id = id;\n }\n const isTransportWritable = this.io.engine &&\n this.io.engine.transport &&\n this.io.engine.transport.writable;\n const discardPacket = this.flags.volatile && (!isTransportWritable || !this.connected);\n if (discardPacket) {\n }\n else if (this.connected) {\n this.notifyOutgoingListeners(packet);\n this.packet(packet);\n }\n else {\n this.sendBuffer.push(packet);\n }\n this.flags = {};\n return this;\n }\n /**\n * @private\n */\n _registerAckCallback(id, ack) {\n const timeout = this.flags.timeout;\n if (timeout === undefined) {\n this.acks[id] = ack;\n return;\n }\n // @ts-ignore\n const timer = this.io.setTimeoutFn(() => {\n delete this.acks[id];\n for (let i = 0; i < this.sendBuffer.length; i++) {\n if (this.sendBuffer[i].id === id) {\n this.sendBuffer.splice(i, 1);\n }\n }\n ack.call(this, new Error(\"operation has timed out\"));\n }, timeout);\n this.acks[id] = (...args) => {\n // @ts-ignore\n this.io.clearTimeoutFn(timer);\n ack.apply(this, [null, ...args]);\n };\n }\n /**\n * Sends a packet.\n *\n * @param packet\n * @private\n */\n packet(packet) {\n packet.nsp = this.nsp;\n this.io._packet(packet);\n }\n /**\n * Called upon engine `open`.\n *\n * @private\n */\n onopen() {\n if (typeof this.auth == \"function\") {\n this.auth((data) => {\n this.packet({ type: socket_io_parser__WEBPACK_IMPORTED_MODULE_0__[\"PacketType\"].CONNECT, data });\n });\n }\n else {\n this.packet({ type: socket_io_parser__WEBPACK_IMPORTED_MODULE_0__[\"PacketType\"].CONNECT, data: this.auth });\n }\n }\n /**\n * Called upon engine or manager `error`.\n *\n * @param err\n * @private\n */\n onerror(err) {\n if (!this.connected) {\n this.emitReserved(\"connect_error\", err);\n }\n }\n /**\n * Called upon engine `close`.\n *\n * @param reason\n * @param description\n * @private\n */\n onclose(reason, description) {\n this.connected = false;\n delete this.id;\n this.emitReserved(\"disconnect\", reason, description);\n }\n /**\n * Called with socket packet.\n *\n * @param packet\n * @private\n */\n onpacket(packet) {\n const sameNamespace = packet.nsp === this.nsp;\n if (!sameNamespace)\n return;\n switch (packet.type) {\n case socket_io_parser__WEBPACK_IMPORTED_MODULE_0__[\"PacketType\"].CONNECT:\n if (packet.data && packet.data.sid) {\n const id = packet.data.sid;\n this.onconnect(id);\n }\n else {\n this.emitReserved(\"connect_error\", new Error(\"It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)\"));\n }\n break;\n case socket_io_parser__WEBPACK_IMPORTED_MODULE_0__[\"PacketType\"].EVENT:\n case socket_io_parser__WEBPACK_IMPORTED_MODULE_0__[\"PacketType\"].BINARY_EVENT:\n this.onevent(packet);\n break;\n case socket_io_parser__WEBPACK_IMPORTED_MODULE_0__[\"PacketType\"].ACK:\n case socket_io_parser__WEBPACK_IMPORTED_MODULE_0__[\"PacketType\"].BINARY_ACK:\n this.onack(packet);\n break;\n case socket_io_parser__WEBPACK_IMPORTED_MODULE_0__[\"PacketType\"].DISCONNECT:\n this.ondisconnect();\n break;\n case socket_io_parser__WEBPACK_IMPORTED_MODULE_0__[\"PacketType\"].CONNECT_ERROR:\n this.destroy();\n const err = new Error(packet.data.message);\n // @ts-ignore\n err.data = packet.data.data;\n this.emitReserved(\"connect_error\", err);\n break;\n }\n }\n /**\n * Called upon a server event.\n *\n * @param packet\n * @private\n */\n onevent(packet) {\n const args = packet.data || [];\n if (null != packet.id) {\n args.push(this.ack(packet.id));\n }\n if (this.connected) {\n this.emitEvent(args);\n }\n else {\n this.receiveBuffer.push(Object.freeze(args));\n }\n }\n emitEvent(args) {\n if (this._anyListeners && this._anyListeners.length) {\n const listeners = this._anyListeners.slice();\n for (const listener of listeners) {\n listener.apply(this, args);\n }\n }\n super.emit.apply(this, args);\n }\n /**\n * Produces an ack callback to emit with an event.\n *\n * @private\n */\n ack(id) {\n const self = this;\n let sent = false;\n return function (...args) {\n // prevent double callbacks\n if (sent)\n return;\n sent = true;\n self.packet({\n type: socket_io_parser__WEBPACK_IMPORTED_MODULE_0__[\"PacketType\"].ACK,\n id: id,\n data: args,\n });\n };\n }\n /**\n * Called upon a server acknowlegement.\n *\n * @param packet\n * @private\n */\n onack(packet) {\n const ack = this.acks[packet.id];\n if (\"function\" === typeof ack) {\n ack.apply(this, packet.data);\n delete this.acks[packet.id];\n }\n else {\n }\n }\n /**\n * Called upon server connect.\n *\n * @private\n */\n onconnect(id) {\n this.id = id;\n this.connected = true;\n this.emitBuffered();\n this.emitReserved(\"connect\");\n }\n /**\n * Emit buffered events (received and emitted).\n *\n * @private\n */\n emitBuffered() {\n this.receiveBuffer.forEach((args) => this.emitEvent(args));\n this.receiveBuffer = [];\n this.sendBuffer.forEach((packet) => {\n this.notifyOutgoingListeners(packet);\n this.packet(packet);\n });\n this.sendBuffer = [];\n }\n /**\n * Called upon server disconnect.\n *\n * @private\n */\n ondisconnect() {\n this.destroy();\n this.onclose(\"io server disconnect\");\n }\n /**\n * Called upon forced client/server side disconnections,\n * this method ensures the manager stops tracking us and\n * that reconnections don't get triggered for this.\n *\n * @private\n */\n destroy() {\n if (this.subs) {\n // clean subscriptions to avoid reconnections\n this.subs.forEach((subDestroy) => subDestroy());\n this.subs = undefined;\n }\n this.io[\"_destroy\"](this);\n }\n /**\n * Disconnects the socket manually. In that case, the socket will not try to reconnect.\n *\n * If this is the last active Socket instance of the {@link Manager}, the low-level connection will be closed.\n *\n * @example\n * const socket = io();\n *\n * socket.on(\"disconnect\", (reason) => {\n * // console.log(reason); prints \"io client disconnect\"\n * });\n *\n * socket.disconnect();\n *\n * @return self\n */\n disconnect() {\n if (this.connected) {\n this.packet({ type: socket_io_parser__WEBPACK_IMPORTED_MODULE_0__[\"PacketType\"].DISCONNECT });\n }\n // remove socket from pool\n this.destroy();\n if (this.connected) {\n // fire events\n this.onclose(\"io client disconnect\");\n }\n return this;\n }\n /**\n * Alias for {@link disconnect()}.\n *\n * @return self\n */\n close() {\n return this.disconnect();\n }\n /**\n * Sets the compress flag.\n *\n * @example\n * socket.compress(false).emit(\"hello\");\n *\n * @param compress - if `true`, compresses the sending data\n * @return self\n */\n compress(compress) {\n this.flags.compress = compress;\n return this;\n }\n /**\n * Sets a modifier for a subsequent event emission that the event message will be dropped when this socket is not\n * ready to send messages.\n *\n * @example\n * socket.volatile.emit(\"hello\"); // the server may or may not receive it\n *\n * @returns self\n */\n get volatile() {\n this.flags.volatile = true;\n return this;\n }\n /**\n * Sets a modifier for a subsequent event emission that the callback will be called with an error when the\n * given number of milliseconds have elapsed without an acknowledgement from the server:\n *\n * @example\n * socket.timeout(5000).emit(\"my-event\", (err) => {\n * if (err) {\n * // the server did not acknowledge the event in the given delay\n * }\n * });\n *\n * @returns self\n */\n timeout(timeout) {\n this.flags.timeout = timeout;\n return this;\n }\n /**\n * Adds a listener that will be fired when any event is emitted. The event name is passed as the first argument to the\n * callback.\n *\n * @example\n * socket.onAny((event, ...args) => {\n * console.log(`got ${event}`);\n * });\n *\n * @param listener\n */\n onAny(listener) {\n this._anyListeners = this._anyListeners || [];\n this._anyListeners.push(listener);\n return this;\n }\n /**\n * Adds a listener that will be fired when any event is emitted. The event name is passed as the first argument to the\n * callback. The listener is added to the beginning of the listeners array.\n *\n * @example\n * socket.prependAny((event, ...args) => {\n * console.log(`got event ${event}`);\n * });\n *\n * @param listener\n */\n prependAny(listener) {\n this._anyListeners = this._anyListeners || [];\n this._anyListeners.unshift(listener);\n return this;\n }\n /**\n * Removes the listener that will be fired when any event is emitted.\n *\n * @example\n * const catchAllListener = (event, ...args) => {\n * console.log(`got event ${event}`);\n * }\n *\n * socket.onAny(catchAllListener);\n *\n * // remove a specific listener\n * socket.offAny(catchAllListener);\n *\n * // or remove all listeners\n * socket.offAny();\n *\n * @param listener\n */\n offAny(listener) {\n if (!this._anyListeners) {\n return this;\n }\n if (listener) {\n const listeners = this._anyListeners;\n for (let i = 0; i < listeners.length; i++) {\n if (listener === listeners[i]) {\n listeners.splice(i, 1);\n return this;\n }\n }\n }\n else {\n this._anyListeners = [];\n }\n return this;\n }\n /**\n * Returns an array of listeners that are listening for any event that is specified. This array can be manipulated,\n * e.g. to remove listeners.\n */\n listenersAny() {\n return this._anyListeners || [];\n }\n /**\n * Adds a listener that will be fired when any event is emitted. The event name is passed as the first argument to the\n * callback.\n *\n * Note: acknowledgements sent to the server are not included.\n *\n * @example\n * socket.onAnyOutgoing((event, ...args) => {\n * console.log(`sent event ${event}`);\n * });\n *\n * @param listener\n */\n onAnyOutgoing(listener) {\n this._anyOutgoingListeners = this._anyOutgoingListeners || [];\n this._anyOutgoingListeners.push(listener);\n return this;\n }\n /**\n * Adds a listener that will be fired when any event is emitted. The event name is passed as the first argument to the\n * callback. The listener is added to the beginning of the listeners array.\n *\n * Note: acknowledgements sent to the server are not included.\n *\n * @example\n * socket.prependAnyOutgoing((event, ...args) => {\n * console.log(`sent event ${event}`);\n * });\n *\n * @param listener\n */\n prependAnyOutgoing(listener) {\n this._anyOutgoingListeners = this._anyOutgoingListeners || [];\n this._anyOutgoingListeners.unshift(listener);\n return this;\n }\n /**\n * Removes the listener that will be fired when any event is emitted.\n *\n * @example\n * const catchAllListener = (event, ...args) => {\n * console.log(`sent event ${event}`);\n * }\n *\n * socket.onAnyOutgoing(catchAllListener);\n *\n * // remove a specific listener\n * socket.offAnyOutgoing(catchAllListener);\n *\n * // or remove all listeners\n * socket.offAnyOutgoing();\n *\n * @param [listener] - the catch-all listener (optional)\n */\n offAnyOutgoing(listener) {\n if (!this._anyOutgoingListeners) {\n return this;\n }\n if (listener) {\n const listeners = this._anyOutgoingListeners;\n for (let i = 0; i < listeners.length; i++) {\n if (listener === listeners[i]) {\n listeners.splice(i, 1);\n return this;\n }\n }\n }\n else {\n this._anyOutgoingListeners = [];\n }\n return this;\n }\n /**\n * Returns an array of listeners that are listening for any event that is specified. This array can be manipulated,\n * e.g. to remove listeners.\n */\n listenersAnyOutgoing() {\n return this._anyOutgoingListeners || [];\n }\n /**\n * Notify the listeners for each packet sent\n *\n * @param packet\n *\n * @private\n */\n notifyOutgoingListeners(packet) {\n if (this._anyOutgoingListeners && this._anyOutgoingListeners.length) {\n const listeners = this._anyOutgoingListeners.slice();\n for (const listener of listeners) {\n listener.apply(this, packet.data);\n }\n }\n }\n}\n\n\n//# sourceURL=webpack://BringgDashboardSDK/./node_modules/socket.io-client/build/esm/socket.js?");
|
|
8425
8424
|
|
|
8426
8425
|
/***/ }),
|
|
8427
8426
|
|
|
8428
|
-
/***/ "./node_modules/socket.io-client/build/url.js":
|
|
8429
|
-
|
|
8430
|
-
!*** ./node_modules/socket.io-client/build/url.js ***!
|
|
8431
|
-
|
|
8432
|
-
/*!
|
|
8433
|
-
/*!
|
|
8434
|
-
/***/ (function(module,
|
|
8427
|
+
/***/ "./node_modules/socket.io-client/build/esm/url.js":
|
|
8428
|
+
/*!********************************************************!*\
|
|
8429
|
+
!*** ./node_modules/socket.io-client/build/esm/url.js ***!
|
|
8430
|
+
\********************************************************/
|
|
8431
|
+
/*! exports provided: url */
|
|
8432
|
+
/*! exports used: url */
|
|
8433
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
8435
8434
|
|
|
8436
8435
|
"use strict";
|
|
8437
|
-
eval("
|
|
8438
|
-
|
|
8439
|
-
/***/ }),
|
|
8440
|
-
|
|
8441
|
-
/***/ "./node_modules/socket.io-client/node_modules/component-emitter/index.js":
|
|
8442
|
-
/*!*******************************************************************************!*\
|
|
8443
|
-
!*** ./node_modules/socket.io-client/node_modules/component-emitter/index.js ***!
|
|
8444
|
-
\*******************************************************************************/
|
|
8445
|
-
/*! no static exports found */
|
|
8446
|
-
/*! all exports used */
|
|
8447
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
8448
|
-
|
|
8449
|
-
eval("\r\n/**\r\n * Expose `Emitter`.\r\n */\r\n\r\nif (true) {\r\n module.exports = Emitter;\r\n}\r\n\r\n/**\r\n * Initialize a new `Emitter`.\r\n *\r\n * @api public\r\n */\r\n\r\nfunction Emitter(obj) {\r\n if (obj) return mixin(obj);\r\n};\r\n\r\n/**\r\n * Mixin the emitter properties.\r\n *\r\n * @param {Object} obj\r\n * @return {Object}\r\n * @api private\r\n */\r\n\r\nfunction mixin(obj) {\r\n for (var key in Emitter.prototype) {\r\n obj[key] = Emitter.prototype[key];\r\n }\r\n return obj;\r\n}\r\n\r\n/**\r\n * Listen on the given `event` with `fn`.\r\n *\r\n * @param {String} event\r\n * @param {Function} fn\r\n * @return {Emitter}\r\n * @api public\r\n */\r\n\r\nEmitter.prototype.on =\r\nEmitter.prototype.addEventListener = function(event, fn){\r\n this._callbacks = this._callbacks || {};\r\n (this._callbacks['$' + event] = this._callbacks['$' + event] || [])\r\n .push(fn);\r\n return this;\r\n};\r\n\r\n/**\r\n * Adds an `event` listener that will be invoked a single\r\n * time then automatically removed.\r\n *\r\n * @param {String} event\r\n * @param {Function} fn\r\n * @return {Emitter}\r\n * @api public\r\n */\r\n\r\nEmitter.prototype.once = function(event, fn){\r\n function on() {\r\n this.off(event, on);\r\n fn.apply(this, arguments);\r\n }\r\n\r\n on.fn = fn;\r\n this.on(event, on);\r\n return this;\r\n};\r\n\r\n/**\r\n * Remove the given callback for `event` or all\r\n * registered callbacks.\r\n *\r\n * @param {String} event\r\n * @param {Function} fn\r\n * @return {Emitter}\r\n * @api public\r\n */\r\n\r\nEmitter.prototype.off =\r\nEmitter.prototype.removeListener =\r\nEmitter.prototype.removeAllListeners =\r\nEmitter.prototype.removeEventListener = function(event, fn){\r\n this._callbacks = this._callbacks || {};\r\n\r\n // all\r\n if (0 == arguments.length) {\r\n this._callbacks = {};\r\n return this;\r\n }\r\n\r\n // specific event\r\n var callbacks = this._callbacks['$' + event];\r\n if (!callbacks) return this;\r\n\r\n // remove all handlers\r\n if (1 == arguments.length) {\r\n delete this._callbacks['$' + event];\r\n return this;\r\n }\r\n\r\n // remove specific handler\r\n var cb;\r\n for (var i = 0; i < callbacks.length; i++) {\r\n cb = callbacks[i];\r\n if (cb === fn || cb.fn === fn) {\r\n callbacks.splice(i, 1);\r\n break;\r\n }\r\n }\r\n\r\n // Remove event specific arrays for event types that no\r\n // one is subscribed for to avoid memory leak.\r\n if (callbacks.length === 0) {\r\n delete this._callbacks['$' + event];\r\n }\r\n\r\n return this;\r\n};\r\n\r\n/**\r\n * Emit `event` with the given args.\r\n *\r\n * @param {String} event\r\n * @param {Mixed} ...\r\n * @return {Emitter}\r\n */\r\n\r\nEmitter.prototype.emit = function(event){\r\n this._callbacks = this._callbacks || {};\r\n\r\n var args = new Array(arguments.length - 1)\r\n , callbacks = this._callbacks['$' + event];\r\n\r\n for (var i = 1; i < arguments.length; i++) {\r\n args[i - 1] = arguments[i];\r\n }\r\n\r\n if (callbacks) {\r\n callbacks = callbacks.slice(0);\r\n for (var i = 0, len = callbacks.length; i < len; ++i) {\r\n callbacks[i].apply(this, args);\r\n }\r\n }\r\n\r\n return this;\r\n};\r\n\r\n/**\r\n * Return array of callbacks for `event`.\r\n *\r\n * @param {String} event\r\n * @return {Array}\r\n * @api public\r\n */\r\n\r\nEmitter.prototype.listeners = function(event){\r\n this._callbacks = this._callbacks || {};\r\n return this._callbacks['$' + event] || [];\r\n};\r\n\r\n/**\r\n * Check if this emitter has `event` handlers.\r\n *\r\n * @param {String} event\r\n * @return {Boolean}\r\n * @api public\r\n */\r\n\r\nEmitter.prototype.hasListeners = function(event){\r\n return !! this.listeners(event).length;\r\n};\r\n\n\n//# sourceURL=webpack://BringgDashboardSDK/./node_modules/socket.io-client/node_modules/component-emitter/index.js?");
|
|
8436
|
+
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return url; });\n/* harmony import */ var engine_io_client__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! engine.io-client */ \"./node_modules/engine.io-client/build/esm/index.js\");\n\n/**\n * URL parser.\n *\n * @param uri - url\n * @param path - the request path of the connection\n * @param loc - An object meant to mimic window.location.\n * Defaults to window.location.\n * @public\n */\nfunction url(uri, path = \"\", loc) {\n let obj = uri;\n // default to window.location\n loc = loc || (typeof location !== \"undefined\" && location);\n if (null == uri)\n uri = loc.protocol + \"//\" + loc.host;\n // relative path support\n if (typeof uri === \"string\") {\n if (\"/\" === uri.charAt(0)) {\n if (\"/\" === uri.charAt(1)) {\n uri = loc.protocol + uri;\n }\n else {\n uri = loc.host + uri;\n }\n }\n if (!/^(https?|wss?):\\/\\//.test(uri)) {\n if (\"undefined\" !== typeof loc) {\n uri = loc.protocol + \"//\" + uri;\n }\n else {\n uri = \"https://\" + uri;\n }\n }\n // parse\n obj = Object(engine_io_client__WEBPACK_IMPORTED_MODULE_0__[/* parse */ \"d\"])(uri);\n }\n // make sure we treat `localhost:80` and `localhost` equally\n if (!obj.port) {\n if (/^(http|ws)$/.test(obj.protocol)) {\n obj.port = \"80\";\n }\n else if (/^(http|ws)s$/.test(obj.protocol)) {\n obj.port = \"443\";\n }\n }\n obj.path = obj.path || \"/\";\n const ipv6 = obj.host.indexOf(\":\") !== -1;\n const host = ipv6 ? \"[\" + obj.host + \"]\" : obj.host;\n // define unique id\n obj.id = obj.protocol + \"://\" + host + \":\" + obj.port + path;\n // define href\n obj.href =\n obj.protocol +\n \"://\" +\n host +\n (loc && loc.port === obj.port ? \"\" : \":\" + obj.port);\n return obj;\n}\n\n\n//# sourceURL=webpack://BringgDashboardSDK/./node_modules/socket.io-client/build/esm/url.js?");
|
|
8450
8437
|
|
|
8451
8438
|
/***/ }),
|
|
8452
8439
|
|
|
8453
|
-
/***/ "./node_modules/socket.io-parser/
|
|
8454
|
-
|
|
8455
|
-
!*** ./node_modules/socket.io-parser/
|
|
8456
|
-
|
|
8457
|
-
/*!
|
|
8458
|
-
/*!
|
|
8459
|
-
/***/ (function(module,
|
|
8440
|
+
/***/ "./node_modules/socket.io-parser/build/esm/binary.js":
|
|
8441
|
+
/*!***********************************************************!*\
|
|
8442
|
+
!*** ./node_modules/socket.io-parser/build/esm/binary.js ***!
|
|
8443
|
+
\***********************************************************/
|
|
8444
|
+
/*! exports provided: deconstructPacket, reconstructPacket */
|
|
8445
|
+
/*! exports used: deconstructPacket, reconstructPacket */
|
|
8446
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
8460
8447
|
|
|
8461
8448
|
"use strict";
|
|
8462
|
-
eval("
|
|
8449
|
+
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return deconstructPacket; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return reconstructPacket; });\n/* harmony import */ var _is_binary_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-binary.js */ \"./node_modules/socket.io-parser/build/esm/is-binary.js\");\n\n/**\n * Replaces every Buffer | ArrayBuffer | Blob | File in packet with a numbered placeholder.\n *\n * @param {Object} packet - socket.io event packet\n * @return {Object} with deconstructed packet and list of buffers\n * @public\n */\nfunction deconstructPacket(packet) {\n const buffers = [];\n const packetData = packet.data;\n const pack = packet;\n pack.data = _deconstructPacket(packetData, buffers);\n pack.attachments = buffers.length; // number of binary 'attachments'\n return { packet: pack, buffers: buffers };\n}\nfunction _deconstructPacket(data, buffers) {\n if (!data)\n return data;\n if (Object(_is_binary_js__WEBPACK_IMPORTED_MODULE_0__[/* isBinary */ \"b\"])(data)) {\n const placeholder = { _placeholder: true, num: buffers.length };\n buffers.push(data);\n return placeholder;\n }\n else if (Array.isArray(data)) {\n const newData = new Array(data.length);\n for (let i = 0; i < data.length; i++) {\n newData[i] = _deconstructPacket(data[i], buffers);\n }\n return newData;\n }\n else if (typeof data === \"object\" && !(data instanceof Date)) {\n const newData = {};\n for (const key in data) {\n if (Object.prototype.hasOwnProperty.call(data, key)) {\n newData[key] = _deconstructPacket(data[key], buffers);\n }\n }\n return newData;\n }\n return data;\n}\n/**\n * Reconstructs a binary packet from its placeholder packet and buffers\n *\n * @param {Object} packet - event packet with placeholders\n * @param {Array} buffers - binary buffers to put in placeholder positions\n * @return {Object} reconstructed packet\n * @public\n */\nfunction reconstructPacket(packet, buffers) {\n packet.data = _reconstructPacket(packet.data, buffers);\n packet.attachments = undefined; // no longer useful\n return packet;\n}\nfunction _reconstructPacket(data, buffers) {\n if (!data)\n return data;\n if (data && data._placeholder === true) {\n const isIndexValid = typeof data.num === \"number\" &&\n data.num >= 0 &&\n data.num < buffers.length;\n if (isIndexValid) {\n return buffers[data.num]; // appropriate buffer (should be natural order anyway)\n }\n else {\n throw new Error(\"illegal attachments\");\n }\n }\n else if (Array.isArray(data)) {\n for (let i = 0; i < data.length; i++) {\n data[i] = _reconstructPacket(data[i], buffers);\n }\n }\n else if (typeof data === \"object\") {\n for (const key in data) {\n if (Object.prototype.hasOwnProperty.call(data, key)) {\n data[key] = _reconstructPacket(data[key], buffers);\n }\n }\n }\n return data;\n}\n\n\n//# sourceURL=webpack://BringgDashboardSDK/./node_modules/socket.io-parser/build/esm/binary.js?");
|
|
8463
8450
|
|
|
8464
8451
|
/***/ }),
|
|
8465
8452
|
|
|
8466
|
-
/***/ "./node_modules/socket.io-parser/
|
|
8467
|
-
|
|
8468
|
-
!*** ./node_modules/socket.io-parser/
|
|
8469
|
-
|
|
8470
|
-
/*!
|
|
8453
|
+
/***/ "./node_modules/socket.io-parser/build/esm/index.js":
|
|
8454
|
+
/*!**********************************************************!*\
|
|
8455
|
+
!*** ./node_modules/socket.io-parser/build/esm/index.js ***!
|
|
8456
|
+
\**********************************************************/
|
|
8457
|
+
/*! exports provided: protocol, PacketType, Encoder, Decoder */
|
|
8471
8458
|
/*! all exports used */
|
|
8472
|
-
/***/ (function(module,
|
|
8459
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
8473
8460
|
|
|
8474
8461
|
"use strict";
|
|
8475
|
-
eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Decoder = exports.Encoder = exports.PacketType = exports.protocol = void 0;\nconst Emitter = __webpack_require__(/*! component-emitter */ \"./node_modules/socket.io-parser/node_modules/component-emitter/index.js\");\nconst binary_1 = __webpack_require__(/*! ./binary */ \"./node_modules/socket.io-parser/dist/binary.js\");\nconst is_binary_1 = __webpack_require__(/*! ./is-binary */ \"./node_modules/socket.io-parser/dist/is-binary.js\");\nconst debug = __webpack_require__(/*! debug */ \"./node_modules/debug/src/browser.js\")(\"socket.io-parser\");\n/**\n * Protocol version.\n *\n * @public\n */\nexports.protocol = 5;\nvar PacketType;\n(function (PacketType) {\n PacketType[PacketType[\"CONNECT\"] = 0] = \"CONNECT\";\n PacketType[PacketType[\"DISCONNECT\"] = 1] = \"DISCONNECT\";\n PacketType[PacketType[\"EVENT\"] = 2] = \"EVENT\";\n PacketType[PacketType[\"ACK\"] = 3] = \"ACK\";\n PacketType[PacketType[\"CONNECT_ERROR\"] = 4] = \"CONNECT_ERROR\";\n PacketType[PacketType[\"BINARY_EVENT\"] = 5] = \"BINARY_EVENT\";\n PacketType[PacketType[\"BINARY_ACK\"] = 6] = \"BINARY_ACK\";\n})(PacketType = exports.PacketType || (exports.PacketType = {}));\n/**\n * A socket.io Encoder instance\n */\nclass Encoder {\n /**\n * Encode a packet as a single string if non-binary, or as a\n * buffer sequence, depending on packet type.\n *\n * @param {Object} obj - packet object\n */\n encode(obj) {\n debug(\"encoding packet %j\", obj);\n if (obj.type === PacketType.EVENT || obj.type === PacketType.ACK) {\n if (is_binary_1.hasBinary(obj)) {\n obj.type =\n obj.type === PacketType.EVENT\n ? PacketType.BINARY_EVENT\n : PacketType.BINARY_ACK;\n return this.encodeAsBinary(obj);\n }\n }\n return [this.encodeAsString(obj)];\n }\n /**\n * Encode packet as string.\n */\n encodeAsString(obj) {\n // first is type\n let str = \"\" + obj.type;\n // attachments if we have them\n if (obj.type === PacketType.BINARY_EVENT ||\n obj.type === PacketType.BINARY_ACK) {\n str += obj.attachments + \"-\";\n }\n // if we have a namespace other than `/`\n // we append it followed by a comma `,`\n if (obj.nsp && \"/\" !== obj.nsp) {\n str += obj.nsp + \",\";\n }\n // immediately followed by the id\n if (null != obj.id) {\n str += obj.id;\n }\n // json data\n if (null != obj.data) {\n str += JSON.stringify(obj.data);\n }\n debug(\"encoded %j as %s\", obj, str);\n return str;\n }\n /**\n * Encode packet as 'buffer sequence' by removing blobs, and\n * deconstructing packet into object with placeholders and\n * a list of buffers.\n */\n encodeAsBinary(obj) {\n const deconstruction = binary_1.deconstructPacket(obj);\n const pack = this.encodeAsString(deconstruction.packet);\n const buffers = deconstruction.buffers;\n buffers.unshift(pack); // add packet info to beginning of data list\n return buffers; // write all the buffers\n }\n}\nexports.Encoder = Encoder;\n/**\n * A socket.io Decoder instance\n *\n * @return {Object} decoder\n */\nclass Decoder extends Emitter {\n constructor() {\n super();\n }\n /**\n * Decodes an encoded packet string into packet JSON.\n *\n * @param {String} obj - encoded packet\n */\n add(obj) {\n let packet;\n if (typeof obj === \"string\") {\n packet = this.decodeString(obj);\n if (packet.type === PacketType.BINARY_EVENT ||\n packet.type === PacketType.BINARY_ACK) {\n // binary packet's json\n this.reconstructor = new BinaryReconstructor(packet);\n // no attachments, labeled binary but no binary data to follow\n if (packet.attachments === 0) {\n super.emit(\"decoded\", packet);\n }\n }\n else {\n // non-binary full packet\n super.emit(\"decoded\", packet);\n }\n }\n else if (is_binary_1.isBinary(obj) || obj.base64) {\n // raw binary data\n if (!this.reconstructor) {\n throw new Error(\"got binary data when not reconstructing a packet\");\n }\n else {\n packet = this.reconstructor.takeBinaryData(obj);\n if (packet) {\n // received final buffer\n this.reconstructor = null;\n super.emit(\"decoded\", packet);\n }\n }\n }\n else {\n throw new Error(\"Unknown type: \" + obj);\n }\n }\n /**\n * Decode a packet String (JSON data)\n *\n * @param {String} str\n * @return {Object} packet\n */\n decodeString(str) {\n let i = 0;\n // look up type\n const p = {\n type: Number(str.charAt(0)),\n };\n if (PacketType[p.type] === undefined) {\n throw new Error(\"unknown packet type \" + p.type);\n }\n // look up attachments if type binary\n if (p.type === PacketType.BINARY_EVENT ||\n p.type === PacketType.BINARY_ACK) {\n const start = i + 1;\n while (str.charAt(++i) !== \"-\" && i != str.length) { }\n const buf = str.substring(start, i);\n if (buf != Number(buf) || str.charAt(i) !== \"-\") {\n throw new Error(\"Illegal attachments\");\n }\n p.attachments = Number(buf);\n }\n // look up namespace (if any)\n if (\"/\" === str.charAt(i + 1)) {\n const start = i + 1;\n while (++i) {\n const c = str.charAt(i);\n if (\",\" === c)\n break;\n if (i === str.length)\n break;\n }\n p.nsp = str.substring(start, i);\n }\n else {\n p.nsp = \"/\";\n }\n // look up id\n const next = str.charAt(i + 1);\n if (\"\" !== next && Number(next) == next) {\n const start = i + 1;\n while (++i) {\n const c = str.charAt(i);\n if (null == c || Number(c) != c) {\n --i;\n break;\n }\n if (i === str.length)\n break;\n }\n p.id = Number(str.substring(start, i + 1));\n }\n // look up json data\n if (str.charAt(++i)) {\n const payload = tryParse(str.substr(i));\n if (Decoder.isPayloadValid(p.type, payload)) {\n p.data = payload;\n }\n else {\n throw new Error(\"invalid payload\");\n }\n }\n debug(\"decoded %s as %j\", str, p);\n return p;\n }\n static isPayloadValid(type, payload) {\n switch (type) {\n case PacketType.CONNECT:\n return typeof payload === \"object\";\n case PacketType.DISCONNECT:\n return payload === undefined;\n case PacketType.CONNECT_ERROR:\n return typeof payload === \"string\" || typeof payload === \"object\";\n case PacketType.EVENT:\n case PacketType.BINARY_EVENT:\n return Array.isArray(payload) && payload.length > 0;\n case PacketType.ACK:\n case PacketType.BINARY_ACK:\n return Array.isArray(payload);\n }\n }\n /**\n * Deallocates a parser's resources\n */\n destroy() {\n if (this.reconstructor) {\n this.reconstructor.finishedReconstruction();\n }\n }\n}\nexports.Decoder = Decoder;\nfunction tryParse(str) {\n try {\n return JSON.parse(str);\n }\n catch (e) {\n return false;\n }\n}\n/**\n * A manager of a binary event's 'buffer sequence'. Should\n * be constructed whenever a packet of type BINARY_EVENT is\n * decoded.\n *\n * @param {Object} packet\n * @return {BinaryReconstructor} initialized reconstructor\n */\nclass BinaryReconstructor {\n constructor(packet) {\n this.packet = packet;\n this.buffers = [];\n this.reconPack = packet;\n }\n /**\n * Method to be called when binary data received from connection\n * after a BINARY_EVENT packet.\n *\n * @param {Buffer | ArrayBuffer} binData - the raw binary data received\n * @return {null | Object} returns null if more binary data is expected or\n * a reconstructed packet object if all buffers have been received.\n */\n takeBinaryData(binData) {\n this.buffers.push(binData);\n if (this.buffers.length === this.reconPack.attachments) {\n // done with buffer list\n const packet = binary_1.reconstructPacket(this.reconPack, this.buffers);\n this.finishedReconstruction();\n return packet;\n }\n return null;\n }\n /**\n * Cleans up binary packet reconstruction variables.\n */\n finishedReconstruction() {\n this.reconPack = null;\n this.buffers = [];\n }\n}\n\n\n//# sourceURL=webpack://BringgDashboardSDK/./node_modules/socket.io-parser/dist/index.js?");
|
|
8462
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"protocol\", function() { return protocol; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"PacketType\", function() { return PacketType; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Encoder\", function() { return Encoder; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Decoder\", function() { return Decoder; });\n/* harmony import */ var _socket_io_component_emitter__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @socket.io/component-emitter */ \"./node_modules/@socket.io/component-emitter/index.mjs\");\n/* harmony import */ var _binary_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./binary.js */ \"./node_modules/socket.io-parser/build/esm/binary.js\");\n/* harmony import */ var _is_binary_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./is-binary.js */ \"./node_modules/socket.io-parser/build/esm/is-binary.js\");\n\n\n\n/**\n * Protocol version.\n *\n * @public\n */\nconst protocol = 5;\nvar PacketType;\n(function (PacketType) {\n PacketType[PacketType[\"CONNECT\"] = 0] = \"CONNECT\";\n PacketType[PacketType[\"DISCONNECT\"] = 1] = \"DISCONNECT\";\n PacketType[PacketType[\"EVENT\"] = 2] = \"EVENT\";\n PacketType[PacketType[\"ACK\"] = 3] = \"ACK\";\n PacketType[PacketType[\"CONNECT_ERROR\"] = 4] = \"CONNECT_ERROR\";\n PacketType[PacketType[\"BINARY_EVENT\"] = 5] = \"BINARY_EVENT\";\n PacketType[PacketType[\"BINARY_ACK\"] = 6] = \"BINARY_ACK\";\n})(PacketType || (PacketType = {}));\n/**\n * A socket.io Encoder instance\n */\nclass Encoder {\n /**\n * Encoder constructor\n *\n * @param {function} replacer - custom replacer to pass down to JSON.parse\n */\n constructor(replacer) {\n this.replacer = replacer;\n }\n /**\n * Encode a packet as a single string if non-binary, or as a\n * buffer sequence, depending on packet type.\n *\n * @param {Object} obj - packet object\n */\n encode(obj) {\n if (obj.type === PacketType.EVENT || obj.type === PacketType.ACK) {\n if (Object(_is_binary_js__WEBPACK_IMPORTED_MODULE_2__[/* hasBinary */ \"a\"])(obj)) {\n obj.type =\n obj.type === PacketType.EVENT\n ? PacketType.BINARY_EVENT\n : PacketType.BINARY_ACK;\n return this.encodeAsBinary(obj);\n }\n }\n return [this.encodeAsString(obj)];\n }\n /**\n * Encode packet as string.\n */\n encodeAsString(obj) {\n // first is type\n let str = \"\" + obj.type;\n // attachments if we have them\n if (obj.type === PacketType.BINARY_EVENT ||\n obj.type === PacketType.BINARY_ACK) {\n str += obj.attachments + \"-\";\n }\n // if we have a namespace other than `/`\n // we append it followed by a comma `,`\n if (obj.nsp && \"/\" !== obj.nsp) {\n str += obj.nsp + \",\";\n }\n // immediately followed by the id\n if (null != obj.id) {\n str += obj.id;\n }\n // json data\n if (null != obj.data) {\n str += JSON.stringify(obj.data, this.replacer);\n }\n return str;\n }\n /**\n * Encode packet as 'buffer sequence' by removing blobs, and\n * deconstructing packet into object with placeholders and\n * a list of buffers.\n */\n encodeAsBinary(obj) {\n const deconstruction = Object(_binary_js__WEBPACK_IMPORTED_MODULE_1__[/* deconstructPacket */ \"a\"])(obj);\n const pack = this.encodeAsString(deconstruction.packet);\n const buffers = deconstruction.buffers;\n buffers.unshift(pack); // add packet info to beginning of data list\n return buffers; // write all the buffers\n }\n}\n/**\n * A socket.io Decoder instance\n *\n * @return {Object} decoder\n */\nclass Decoder extends _socket_io_component_emitter__WEBPACK_IMPORTED_MODULE_0__[/* Emitter */ \"a\"] {\n /**\n * Decoder constructor\n *\n * @param {function} reviver - custom reviver to pass down to JSON.stringify\n */\n constructor(reviver) {\n super();\n this.reviver = reviver;\n }\n /**\n * Decodes an encoded packet string into packet JSON.\n *\n * @param {String} obj - encoded packet\n */\n add(obj) {\n let packet;\n if (typeof obj === \"string\") {\n if (this.reconstructor) {\n throw new Error(\"got plaintext data when reconstructing a packet\");\n }\n packet = this.decodeString(obj);\n if (packet.type === PacketType.BINARY_EVENT ||\n packet.type === PacketType.BINARY_ACK) {\n // binary packet's json\n this.reconstructor = new BinaryReconstructor(packet);\n // no attachments, labeled binary but no binary data to follow\n if (packet.attachments === 0) {\n super.emitReserved(\"decoded\", packet);\n }\n }\n else {\n // non-binary full packet\n super.emitReserved(\"decoded\", packet);\n }\n }\n else if (Object(_is_binary_js__WEBPACK_IMPORTED_MODULE_2__[/* isBinary */ \"b\"])(obj) || obj.base64) {\n // raw binary data\n if (!this.reconstructor) {\n throw new Error(\"got binary data when not reconstructing a packet\");\n }\n else {\n packet = this.reconstructor.takeBinaryData(obj);\n if (packet) {\n // received final buffer\n this.reconstructor = null;\n super.emitReserved(\"decoded\", packet);\n }\n }\n }\n else {\n throw new Error(\"Unknown type: \" + obj);\n }\n }\n /**\n * Decode a packet String (JSON data)\n *\n * @param {String} str\n * @return {Object} packet\n */\n decodeString(str) {\n let i = 0;\n // look up type\n const p = {\n type: Number(str.charAt(0)),\n };\n if (PacketType[p.type] === undefined) {\n throw new Error(\"unknown packet type \" + p.type);\n }\n // look up attachments if type binary\n if (p.type === PacketType.BINARY_EVENT ||\n p.type === PacketType.BINARY_ACK) {\n const start = i + 1;\n while (str.charAt(++i) !== \"-\" && i != str.length) { }\n const buf = str.substring(start, i);\n if (buf != Number(buf) || str.charAt(i) !== \"-\") {\n throw new Error(\"Illegal attachments\");\n }\n p.attachments = Number(buf);\n }\n // look up namespace (if any)\n if (\"/\" === str.charAt(i + 1)) {\n const start = i + 1;\n while (++i) {\n const c = str.charAt(i);\n if (\",\" === c)\n break;\n if (i === str.length)\n break;\n }\n p.nsp = str.substring(start, i);\n }\n else {\n p.nsp = \"/\";\n }\n // look up id\n const next = str.charAt(i + 1);\n if (\"\" !== next && Number(next) == next) {\n const start = i + 1;\n while (++i) {\n const c = str.charAt(i);\n if (null == c || Number(c) != c) {\n --i;\n break;\n }\n if (i === str.length)\n break;\n }\n p.id = Number(str.substring(start, i + 1));\n }\n // look up json data\n if (str.charAt(++i)) {\n const payload = this.tryParse(str.substr(i));\n if (Decoder.isPayloadValid(p.type, payload)) {\n p.data = payload;\n }\n else {\n throw new Error(\"invalid payload\");\n }\n }\n return p;\n }\n tryParse(str) {\n try {\n return JSON.parse(str, this.reviver);\n }\n catch (e) {\n return false;\n }\n }\n static isPayloadValid(type, payload) {\n switch (type) {\n case PacketType.CONNECT:\n return typeof payload === \"object\";\n case PacketType.DISCONNECT:\n return payload === undefined;\n case PacketType.CONNECT_ERROR:\n return typeof payload === \"string\" || typeof payload === \"object\";\n case PacketType.EVENT:\n case PacketType.BINARY_EVENT:\n return Array.isArray(payload) && payload.length > 0;\n case PacketType.ACK:\n case PacketType.BINARY_ACK:\n return Array.isArray(payload);\n }\n }\n /**\n * Deallocates a parser's resources\n */\n destroy() {\n if (this.reconstructor) {\n this.reconstructor.finishedReconstruction();\n }\n }\n}\n/**\n * A manager of a binary event's 'buffer sequence'. Should\n * be constructed whenever a packet of type BINARY_EVENT is\n * decoded.\n *\n * @param {Object} packet\n * @return {BinaryReconstructor} initialized reconstructor\n */\nclass BinaryReconstructor {\n constructor(packet) {\n this.packet = packet;\n this.buffers = [];\n this.reconPack = packet;\n }\n /**\n * Method to be called when binary data received from connection\n * after a BINARY_EVENT packet.\n *\n * @param {Buffer | ArrayBuffer} binData - the raw binary data received\n * @return {null | Object} returns null if more binary data is expected or\n * a reconstructed packet object if all buffers have been received.\n */\n takeBinaryData(binData) {\n this.buffers.push(binData);\n if (this.buffers.length === this.reconPack.attachments) {\n // done with buffer list\n const packet = Object(_binary_js__WEBPACK_IMPORTED_MODULE_1__[/* reconstructPacket */ \"b\"])(this.reconPack, this.buffers);\n this.finishedReconstruction();\n return packet;\n }\n return null;\n }\n /**\n * Cleans up binary packet reconstruction variables.\n */\n finishedReconstruction() {\n this.reconPack = null;\n this.buffers = [];\n }\n}\n\n\n//# sourceURL=webpack://BringgDashboardSDK/./node_modules/socket.io-parser/build/esm/index.js?");
|
|
8476
8463
|
|
|
8477
8464
|
/***/ }),
|
|
8478
8465
|
|
|
8479
|
-
/***/ "./node_modules/socket.io-parser/
|
|
8480
|
-
|
|
8481
|
-
!*** ./node_modules/socket.io-parser/
|
|
8482
|
-
|
|
8483
|
-
/*!
|
|
8484
|
-
/*!
|
|
8485
|
-
/***/ (function(module,
|
|
8466
|
+
/***/ "./node_modules/socket.io-parser/build/esm/is-binary.js":
|
|
8467
|
+
/*!**************************************************************!*\
|
|
8468
|
+
!*** ./node_modules/socket.io-parser/build/esm/is-binary.js ***!
|
|
8469
|
+
\**************************************************************/
|
|
8470
|
+
/*! exports provided: isBinary, hasBinary */
|
|
8471
|
+
/*! exports used: hasBinary, isBinary */
|
|
8472
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
8486
8473
|
|
|
8487
8474
|
"use strict";
|
|
8488
|
-
eval("
|
|
8489
|
-
|
|
8490
|
-
/***/ }),
|
|
8491
|
-
|
|
8492
|
-
/***/ "./node_modules/socket.io-parser/node_modules/component-emitter/index.js":
|
|
8493
|
-
/*!*******************************************************************************!*\
|
|
8494
|
-
!*** ./node_modules/socket.io-parser/node_modules/component-emitter/index.js ***!
|
|
8495
|
-
\*******************************************************************************/
|
|
8496
|
-
/*! no static exports found */
|
|
8497
|
-
/*! all exports used */
|
|
8498
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
8499
|
-
|
|
8500
|
-
eval("\r\n/**\r\n * Expose `Emitter`.\r\n */\r\n\r\nif (true) {\r\n module.exports = Emitter;\r\n}\r\n\r\n/**\r\n * Initialize a new `Emitter`.\r\n *\r\n * @api public\r\n */\r\n\r\nfunction Emitter(obj) {\r\n if (obj) return mixin(obj);\r\n};\r\n\r\n/**\r\n * Mixin the emitter properties.\r\n *\r\n * @param {Object} obj\r\n * @return {Object}\r\n * @api private\r\n */\r\n\r\nfunction mixin(obj) {\r\n for (var key in Emitter.prototype) {\r\n obj[key] = Emitter.prototype[key];\r\n }\r\n return obj;\r\n}\r\n\r\n/**\r\n * Listen on the given `event` with `fn`.\r\n *\r\n * @param {String} event\r\n * @param {Function} fn\r\n * @return {Emitter}\r\n * @api public\r\n */\r\n\r\nEmitter.prototype.on =\r\nEmitter.prototype.addEventListener = function(event, fn){\r\n this._callbacks = this._callbacks || {};\r\n (this._callbacks['$' + event] = this._callbacks['$' + event] || [])\r\n .push(fn);\r\n return this;\r\n};\r\n\r\n/**\r\n * Adds an `event` listener that will be invoked a single\r\n * time then automatically removed.\r\n *\r\n * @param {String} event\r\n * @param {Function} fn\r\n * @return {Emitter}\r\n * @api public\r\n */\r\n\r\nEmitter.prototype.once = function(event, fn){\r\n function on() {\r\n this.off(event, on);\r\n fn.apply(this, arguments);\r\n }\r\n\r\n on.fn = fn;\r\n this.on(event, on);\r\n return this;\r\n};\r\n\r\n/**\r\n * Remove the given callback for `event` or all\r\n * registered callbacks.\r\n *\r\n * @param {String} event\r\n * @param {Function} fn\r\n * @return {Emitter}\r\n * @api public\r\n */\r\n\r\nEmitter.prototype.off =\r\nEmitter.prototype.removeListener =\r\nEmitter.prototype.removeAllListeners =\r\nEmitter.prototype.removeEventListener = function(event, fn){\r\n this._callbacks = this._callbacks || {};\r\n\r\n // all\r\n if (0 == arguments.length) {\r\n this._callbacks = {};\r\n return this;\r\n }\r\n\r\n // specific event\r\n var callbacks = this._callbacks['$' + event];\r\n if (!callbacks) return this;\r\n\r\n // remove all handlers\r\n if (1 == arguments.length) {\r\n delete this._callbacks['$' + event];\r\n return this;\r\n }\r\n\r\n // remove specific handler\r\n var cb;\r\n for (var i = 0; i < callbacks.length; i++) {\r\n cb = callbacks[i];\r\n if (cb === fn || cb.fn === fn) {\r\n callbacks.splice(i, 1);\r\n break;\r\n }\r\n }\r\n\r\n // Remove event specific arrays for event types that no\r\n // one is subscribed for to avoid memory leak.\r\n if (callbacks.length === 0) {\r\n delete this._callbacks['$' + event];\r\n }\r\n\r\n return this;\r\n};\r\n\r\n/**\r\n * Emit `event` with the given args.\r\n *\r\n * @param {String} event\r\n * @param {Mixed} ...\r\n * @return {Emitter}\r\n */\r\n\r\nEmitter.prototype.emit = function(event){\r\n this._callbacks = this._callbacks || {};\r\n\r\n var args = new Array(arguments.length - 1)\r\n , callbacks = this._callbacks['$' + event];\r\n\r\n for (var i = 1; i < arguments.length; i++) {\r\n args[i - 1] = arguments[i];\r\n }\r\n\r\n if (callbacks) {\r\n callbacks = callbacks.slice(0);\r\n for (var i = 0, len = callbacks.length; i < len; ++i) {\r\n callbacks[i].apply(this, args);\r\n }\r\n }\r\n\r\n return this;\r\n};\r\n\r\n/**\r\n * Return array of callbacks for `event`.\r\n *\r\n * @param {String} event\r\n * @return {Array}\r\n * @api public\r\n */\r\n\r\nEmitter.prototype.listeners = function(event){\r\n this._callbacks = this._callbacks || {};\r\n return this._callbacks['$' + event] || [];\r\n};\r\n\r\n/**\r\n * Check if this emitter has `event` handlers.\r\n *\r\n * @param {String} event\r\n * @return {Boolean}\r\n * @api public\r\n */\r\n\r\nEmitter.prototype.hasListeners = function(event){\r\n return !! this.listeners(event).length;\r\n};\r\n\n\n//# sourceURL=webpack://BringgDashboardSDK/./node_modules/socket.io-parser/node_modules/component-emitter/index.js?");
|
|
8475
|
+
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return isBinary; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return hasBinary; });\nconst withNativeArrayBuffer = typeof ArrayBuffer === \"function\";\nconst isView = (obj) => {\n return typeof ArrayBuffer.isView === \"function\"\n ? ArrayBuffer.isView(obj)\n : obj.buffer instanceof ArrayBuffer;\n};\nconst toString = Object.prototype.toString;\nconst withNativeBlob = typeof Blob === \"function\" ||\n (typeof Blob !== \"undefined\" &&\n toString.call(Blob) === \"[object BlobConstructor]\");\nconst withNativeFile = typeof File === \"function\" ||\n (typeof File !== \"undefined\" &&\n toString.call(File) === \"[object FileConstructor]\");\n/**\n * Returns true if obj is a Buffer, an ArrayBuffer, a Blob or a File.\n *\n * @private\n */\nfunction isBinary(obj) {\n return ((withNativeArrayBuffer && (obj instanceof ArrayBuffer || isView(obj))) ||\n (withNativeBlob && obj instanceof Blob) ||\n (withNativeFile && obj instanceof File));\n}\nfunction hasBinary(obj, toJSON) {\n if (!obj || typeof obj !== \"object\") {\n return false;\n }\n if (Array.isArray(obj)) {\n for (let i = 0, l = obj.length; i < l; i++) {\n if (hasBinary(obj[i])) {\n return true;\n }\n }\n return false;\n }\n if (isBinary(obj)) {\n return true;\n }\n if (obj.toJSON &&\n typeof obj.toJSON === \"function\" &&\n arguments.length === 1) {\n return hasBinary(obj.toJSON(), true);\n }\n for (const key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key) && hasBinary(obj[key])) {\n return true;\n }\n }\n return false;\n}\n\n\n//# sourceURL=webpack://BringgDashboardSDK/./node_modules/socket.io-parser/build/esm/is-binary.js?");
|
|
8501
8476
|
|
|
8502
8477
|
/***/ }),
|
|
8503
8478
|
|
|
@@ -8731,19 +8706,6 @@ eval("var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn th
|
|
|
8731
8706
|
|
|
8732
8707
|
eval("module.exports = function(module) {\n\tif (!module.webpackPolyfill) {\n\t\tmodule.deprecate = function() {};\n\t\tmodule.paths = [];\n\t\t// module.parent = undefined by default\n\t\tif (!module.children) module.children = [];\n\t\tObject.defineProperty(module, \"loaded\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.l;\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(module, \"id\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.i;\n\t\t\t}\n\t\t});\n\t\tmodule.webpackPolyfill = 1;\n\t}\n\treturn module;\n};\n\n\n//# sourceURL=webpack://BringgDashboardSDK/(webpack)/buildin/module.js?");
|
|
8733
8708
|
|
|
8734
|
-
/***/ }),
|
|
8735
|
-
|
|
8736
|
-
/***/ "./node_modules/yeast/index.js":
|
|
8737
|
-
/*!*************************************!*\
|
|
8738
|
-
!*** ./node_modules/yeast/index.js ***!
|
|
8739
|
-
\*************************************/
|
|
8740
|
-
/*! no static exports found */
|
|
8741
|
-
/*! all exports used */
|
|
8742
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
8743
|
-
|
|
8744
|
-
"use strict";
|
|
8745
|
-
eval("\n\nvar alphabet = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_'.split('')\n , length = 64\n , map = {}\n , seed = 0\n , i = 0\n , prev;\n\n/**\n * Return a string representing the specified number.\n *\n * @param {Number} num The number to convert.\n * @returns {String} The string representation of the number.\n * @api public\n */\nfunction encode(num) {\n var encoded = '';\n\n do {\n encoded = alphabet[num % length] + encoded;\n num = Math.floor(num / length);\n } while (num > 0);\n\n return encoded;\n}\n\n/**\n * Return the integer value specified by the given string.\n *\n * @param {String} str The string to convert.\n * @returns {Number} The integer value represented by the string.\n * @api public\n */\nfunction decode(str) {\n var decoded = 0;\n\n for (i = 0; i < str.length; i++) {\n decoded = decoded * length + map[str.charAt(i)];\n }\n\n return decoded;\n}\n\n/**\n * Yeast: A tiny growing id generator.\n *\n * @returns {String} A unique id.\n * @api public\n */\nfunction yeast() {\n var now = encode(+new Date());\n\n if (now !== prev) return seed = 0, prev = now;\n return now +'.'+ encode(seed++);\n}\n\n//\n// Map each character to its index.\n//\nfor (; i < length; i++) map[alphabet[i]] = i;\n\n//\n// Expose the `yeast`, `encode` and `decode` functions.\n//\nyeast.encode = encode;\nyeast.decode = decode;\nmodule.exports = yeast;\n\n\n//# sourceURL=webpack://BringgDashboardSDK/./node_modules/yeast/index.js?");
|
|
8746
|
-
|
|
8747
8709
|
/***/ })
|
|
8748
8710
|
|
|
8749
8711
|
/******/ });
|