comprodls-sdk 2.25.0 → 2.28.0
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/comprodls-sdk.js +426 -342
- package/dist/comprodls-sdk.min.js +18 -18
- package/lib/config/index.js +1 -0
- package/lib/services/auth/index.js +40 -3
- package/lib/services/spaces/index.js +63 -0
- package/package.json +1 -1
package/dist/comprodls-sdk.js
CHANGED
|
@@ -307,6 +307,7 @@ exports.AUTH_API_URLS = {
|
|
|
307
307
|
provisionBulkSpaces: '/org/{orgId}/provision-spaces/bulk',
|
|
308
308
|
entitleUserToProduct: '/accounts/{accountId}/entitle-user',
|
|
309
309
|
microEntitleUserToProduct: '/accounts/{accountId}/entitle-user/micro',
|
|
310
|
+
bulkMicroEntitleProductToUser: '/accounts/{accountId}/entitle-user/micro/bulk',
|
|
310
311
|
enrollUserInClass: '/accounts/{accountId}/enroll-with-classcode',
|
|
311
312
|
getExtProductAPI: '/accounts/{accountId}/products/{extProductId}',
|
|
312
313
|
getSpaceDetails: '/accounts/{accountId}/spaces/{spacekey}',
|
|
@@ -762,7 +763,7 @@ function addClassIdQueryParam(url, classId) {
|
|
|
762
763
|
function setupAPIToken(request, token) {
|
|
763
764
|
return request.set('Authorization', token.access_token);
|
|
764
765
|
};
|
|
765
|
-
},{"../../../config":2,"../../../helpers":3,"../errors":7,"./validations":6,"q":
|
|
766
|
+
},{"../../../config":2,"../../../helpers":3,"../errors":7,"./validations":6,"q":90,"string-template":131,"superagent":133}],6:[function(require,module,exports){
|
|
766
767
|
/*************************************************************************
|
|
767
768
|
*
|
|
768
769
|
* COMPRO CONFIDENTIAL
|
|
@@ -1094,7 +1095,7 @@ validator.validators.contains = function(value, options) {
|
|
|
1094
1095
|
}
|
|
1095
1096
|
}
|
|
1096
1097
|
};
|
|
1097
|
-
},{"./errors":7,"validate.js":
|
|
1098
|
+
},{"./errors":7,"validate.js":141}],10:[function(require,module,exports){
|
|
1098
1099
|
/*************************************************************************
|
|
1099
1100
|
*
|
|
1100
1101
|
* COMPRO CONFIDENTIAL
|
|
@@ -1217,7 +1218,7 @@ function getSingleInvitation(organizationId, options) {
|
|
|
1217
1218
|
}
|
|
1218
1219
|
|
|
1219
1220
|
|
|
1220
|
-
},{"../helpers":3,"q":
|
|
1221
|
+
},{"../helpers":3,"q":90,"superagent":133}],11:[function(require,module,exports){
|
|
1221
1222
|
/*************************************************************************
|
|
1222
1223
|
*
|
|
1223
1224
|
* COMPRO CONFIDENTIAL
|
|
@@ -1428,7 +1429,7 @@ Activity.prototype.getQuestionsCount = function () {
|
|
|
1428
1429
|
return dfd.promise;
|
|
1429
1430
|
}
|
|
1430
1431
|
|
|
1431
|
-
},{"../../helpers":3,"./attempt":12,"extend":
|
|
1432
|
+
},{"../../helpers":3,"./attempt":12,"extend":68,"q":90,"superagent":133}],12:[function(require,module,exports){
|
|
1432
1433
|
/*************************************************************************
|
|
1433
1434
|
*
|
|
1434
1435
|
* COMPRO CONFIDENTIAL
|
|
@@ -1861,7 +1862,7 @@ Attempt.prototype.submit = function (userresponse) {
|
|
|
1861
1862
|
return dfd.promise;
|
|
1862
1863
|
};
|
|
1863
1864
|
|
|
1864
|
-
},{"../../helpers":3,"extend":
|
|
1865
|
+
},{"../../helpers":3,"extend":68,"q":90,"superagent":133}],13:[function(require,module,exports){
|
|
1865
1866
|
/*************************************************************************
|
|
1866
1867
|
*
|
|
1867
1868
|
* COMPRO CONFIDENTIAL
|
|
@@ -3500,7 +3501,7 @@ function getTimeseriesAnalytics(options) {
|
|
|
3500
3501
|
}
|
|
3501
3502
|
return dfd.promise;
|
|
3502
3503
|
}
|
|
3503
|
-
},{"../../helpers":3,"agentkeepalive":37,"q":
|
|
3504
|
+
},{"../../helpers":3,"agentkeepalive":37,"q":90,"superagent":133}],15:[function(require,module,exports){
|
|
3504
3505
|
/*************************************************************************
|
|
3505
3506
|
*
|
|
3506
3507
|
* COMPRO CONFIDENTIAL
|
|
@@ -3844,7 +3845,7 @@ function getUserLastAttemptForActivity(options) {
|
|
|
3844
3845
|
return dfd.promise;
|
|
3845
3846
|
}
|
|
3846
3847
|
|
|
3847
|
-
},{"../../helpers":3,"q":
|
|
3848
|
+
},{"../../helpers":3,"q":90,"superagent":133}],16:[function(require,module,exports){
|
|
3848
3849
|
/*************************************************************************
|
|
3849
3850
|
*
|
|
3850
3851
|
* COMPRO CONFIDENTIAL
|
|
@@ -4755,7 +4756,9 @@ function getAllClasses(options) {
|
|
|
4755
4756
|
description: classEntity.description,
|
|
4756
4757
|
provision_method: classEntity.class.provision_method,
|
|
4757
4758
|
title: classEntity.title,
|
|
4758
|
-
analyticsharingmodel: classEntity.analyticsharingmodel
|
|
4759
|
+
analyticsharingmodel: classEntity.analyticsharingmodel,
|
|
4760
|
+
studentCount: classEntity.studentCount,
|
|
4761
|
+
teacherCount: classEntity.teacherCount
|
|
4759
4762
|
};
|
|
4760
4763
|
|
|
4761
4764
|
/**
|
|
@@ -5599,6 +5602,39 @@ function updateClass(options) {
|
|
|
5599
5602
|
}
|
|
5600
5603
|
]
|
|
5601
5604
|
}
|
|
5605
|
+
],
|
|
5606
|
+
"clone_classes": [
|
|
5607
|
+
{
|
|
5608
|
+
"title": "string",
|
|
5609
|
+
"startdate": 0,
|
|
5610
|
+
"enddate": 0,
|
|
5611
|
+
"instructor": "string",
|
|
5612
|
+
"rowId": "string",
|
|
5613
|
+
"classid": "string",
|
|
5614
|
+
"clone_settings": {
|
|
5615
|
+
"students": true,
|
|
5616
|
+
"teachers": true,
|
|
5617
|
+
"products": true,
|
|
5618
|
+
"groups": true,
|
|
5619
|
+
"assigned_paths": true,
|
|
5620
|
+
"tags": true,
|
|
5621
|
+
"analyticsharingmodel": true,
|
|
5622
|
+
"ext_data": true,
|
|
5623
|
+
"advanced": {
|
|
5624
|
+
"students": [ { "ext_user_id": "string" } ],
|
|
5625
|
+
"teachers": [ { "ext_user_id": "string" } ],
|
|
5626
|
+
"groups": [ { "groupid": "string" } ],
|
|
5627
|
+
"assigned_paths": [
|
|
5628
|
+
{
|
|
5629
|
+
"assigned_path_id": "string",
|
|
5630
|
+
"startdate": 0,
|
|
5631
|
+
"duedate": 0
|
|
5632
|
+
}
|
|
5633
|
+
],
|
|
5634
|
+
"products": [ { "productcode": "string" } ]
|
|
5635
|
+
}
|
|
5636
|
+
}
|
|
5637
|
+
}
|
|
5602
5638
|
]
|
|
5603
5639
|
}
|
|
5604
5640
|
*/
|
|
@@ -5612,7 +5648,8 @@ function createMultipleClasses(options) {
|
|
|
5612
5648
|
var err = helpers.validations.isAuthenticated(self.orgId, self.token);
|
|
5613
5649
|
if (err) { dfd.reject(err); }
|
|
5614
5650
|
else {
|
|
5615
|
-
if (options.classes.length > 0)
|
|
5651
|
+
if ((options.classes && options.classes.length > 0) ||
|
|
5652
|
+
(options.clone_classes && options.clone_classes.length > 0)) {
|
|
5616
5653
|
|
|
5617
5654
|
//Passed all validations, Contruct API url
|
|
5618
5655
|
var url = self.config.DEFAULT_HOSTS.AUTH + self.config.AUTH_API_URLS.createMultipleClasses;
|
|
@@ -5637,7 +5674,8 @@ function createMultipleClasses(options) {
|
|
|
5637
5674
|
}
|
|
5638
5675
|
else {
|
|
5639
5676
|
err = {};
|
|
5640
|
-
err.message = err.description = 'Mandatory
|
|
5677
|
+
err.message = err.description = 'Mandatory parameters - [classes, clone_classes], ' +
|
|
5678
|
+
'not found in request options';
|
|
5641
5679
|
err = new DLSError(helpers.errors.ERROR_TYPES.SDK_ERROR, err);
|
|
5642
5680
|
dfd.reject(err);
|
|
5643
5681
|
}
|
|
@@ -6567,7 +6605,7 @@ function cloneClass(options) {
|
|
|
6567
6605
|
return dfd.promise;
|
|
6568
6606
|
}
|
|
6569
6607
|
|
|
6570
|
-
},{"../../helpers":3,"../../helpers/lib/api/converter":4,"agentkeepalive":37,"q":
|
|
6608
|
+
},{"../../helpers":3,"../../helpers/lib/api/converter":4,"agentkeepalive":37,"q":90,"superagent":133}],17:[function(require,module,exports){
|
|
6571
6609
|
/*************************************************************************
|
|
6572
6610
|
*
|
|
6573
6611
|
* COMPRO CONFIDENTIAL
|
|
@@ -7037,7 +7075,7 @@ function updateConnectionForUser(orgid, token, config, options, action) {
|
|
|
7037
7075
|
return dfd.promise;
|
|
7038
7076
|
}
|
|
7039
7077
|
|
|
7040
|
-
},{"../../helpers":3,"q":
|
|
7078
|
+
},{"../../helpers":3,"q":90,"superagent":133}],18:[function(require,module,exports){
|
|
7041
7079
|
/*************************************************************************
|
|
7042
7080
|
*
|
|
7043
7081
|
* COMPRO CONFIDENTIAL
|
|
@@ -7183,7 +7221,7 @@ function getAllDocumentsInAFolder(options) {
|
|
|
7183
7221
|
return dfd.promise;
|
|
7184
7222
|
}
|
|
7185
7223
|
|
|
7186
|
-
},{"../../helpers":3,"q":
|
|
7224
|
+
},{"../../helpers":3,"q":90,"superagent":133}],19:[function(require,module,exports){
|
|
7187
7225
|
/*************************************************************************
|
|
7188
7226
|
*
|
|
7189
7227
|
* COMPRO CONFIDENTIAL
|
|
@@ -7521,7 +7559,7 @@ function publishCustomEvents(options) {
|
|
|
7521
7559
|
return deferred.promise;
|
|
7522
7560
|
}
|
|
7523
7561
|
|
|
7524
|
-
},{"../../helpers":3,"../../helpers/lib/api/converter":4,"q":
|
|
7562
|
+
},{"../../helpers":3,"../../helpers/lib/api/converter":4,"q":90,"superagent":133}],20:[function(require,module,exports){
|
|
7525
7563
|
/*************************************************************************
|
|
7526
7564
|
*
|
|
7527
7565
|
* COMPRO CONFIDENTIAL
|
|
@@ -7846,7 +7884,7 @@ function resendSingleInvitation(options) {
|
|
|
7846
7884
|
return dfd.promise;
|
|
7847
7885
|
}
|
|
7848
7886
|
|
|
7849
|
-
},{"../../helpers":3,"q":
|
|
7887
|
+
},{"../../helpers":3,"q":90,"superagent":133}],21:[function(require,module,exports){
|
|
7850
7888
|
/*************************************************************************
|
|
7851
7889
|
*
|
|
7852
7890
|
* COMPRO CONFIDENTIAL
|
|
@@ -8307,7 +8345,7 @@ function createStatement(options) {
|
|
|
8307
8345
|
}*/
|
|
8308
8346
|
|
|
8309
8347
|
|
|
8310
|
-
},{"../../helpers":3,"q":
|
|
8348
|
+
},{"../../helpers":3,"q":90,"tincanjs":135}],22:[function(require,module,exports){
|
|
8311
8349
|
/*************************************************************************
|
|
8312
8350
|
*
|
|
8313
8351
|
* COMPRO CONFIDENTIAL
|
|
@@ -8655,7 +8693,7 @@ function getSingleProductFamily(options) {
|
|
|
8655
8693
|
return dfd.promise;
|
|
8656
8694
|
}
|
|
8657
8695
|
|
|
8658
|
-
},{"../../helpers":3,"q":
|
|
8696
|
+
},{"../../helpers":3,"q":90,"superagent":133}],23:[function(require,module,exports){
|
|
8659
8697
|
/*************************************************************************
|
|
8660
8698
|
*
|
|
8661
8699
|
* COMPRO CONFIDENTIAL
|
|
@@ -9255,7 +9293,7 @@ function getAllProductFamilies(options) {
|
|
|
9255
9293
|
return dfd.promise;
|
|
9256
9294
|
}
|
|
9257
9295
|
|
|
9258
|
-
},{"../../helpers":3,"q":
|
|
9296
|
+
},{"../../helpers":3,"q":90,"superagent":133}],24:[function(require,module,exports){
|
|
9259
9297
|
/*************************************************************************
|
|
9260
9298
|
*
|
|
9261
9299
|
* COMPRO CONFIDENTIAL
|
|
@@ -9447,7 +9485,7 @@ function grantByAccountIdOnExtUserId(options) {
|
|
|
9447
9485
|
}
|
|
9448
9486
|
|
|
9449
9487
|
|
|
9450
|
-
},{"../../helpers":3,"./pubnubClientWrapper":25,"q":
|
|
9488
|
+
},{"../../helpers":3,"./pubnubClientWrapper":25,"q":90,"superagent":133}],25:[function(require,module,exports){
|
|
9451
9489
|
var pubNub = require("pubnub");
|
|
9452
9490
|
var EventEmitter = require("events").EventEmitter;
|
|
9453
9491
|
var helpers = require('../../helpers');
|
|
@@ -9660,7 +9698,7 @@ module.exports = function () {
|
|
|
9660
9698
|
|
|
9661
9699
|
}; //End of Client Wrapper module
|
|
9662
9700
|
|
|
9663
|
-
},{"../../helpers":3,"events":
|
|
9701
|
+
},{"../../helpers":3,"events":67,"pubnub":88}],26:[function(require,module,exports){
|
|
9664
9702
|
/*************************************************************************
|
|
9665
9703
|
*
|
|
9666
9704
|
* COMPRO CONFIDENTIAL
|
|
@@ -9849,7 +9887,7 @@ function _setup(orgId, userId) {
|
|
|
9849
9887
|
return dfd.promise;
|
|
9850
9888
|
}
|
|
9851
9889
|
|
|
9852
|
-
},{"../../helpers":3,"events":
|
|
9890
|
+
},{"../../helpers":3,"events":67,"q":90,"socket.io-client":109}],27:[function(require,module,exports){
|
|
9853
9891
|
/*************************************************************************
|
|
9854
9892
|
*
|
|
9855
9893
|
* COMPRO CONFIDENTIAL
|
|
@@ -10316,7 +10354,7 @@ function deleteRule(options) {
|
|
|
10316
10354
|
return dfd.promise;
|
|
10317
10355
|
}
|
|
10318
10356
|
|
|
10319
|
-
},{"../../helpers":3,"q":
|
|
10357
|
+
},{"../../helpers":3,"q":90,"superagent":133}],28:[function(require,module,exports){
|
|
10320
10358
|
/*************************************************************************
|
|
10321
10359
|
*
|
|
10322
10360
|
* COMPRO CONFIDENTIAL
|
|
@@ -10431,7 +10469,7 @@ function postSISEvent(options) {
|
|
|
10431
10469
|
return dfd.promise;
|
|
10432
10470
|
}
|
|
10433
10471
|
|
|
10434
|
-
},{"../../helpers":3,"q":
|
|
10472
|
+
},{"../../helpers":3,"q":90,"superagent":133,"underscore":137}],29:[function(require,module,exports){
|
|
10435
10473
|
/*************************************************************************
|
|
10436
10474
|
*
|
|
10437
10475
|
* COMPRO CONFIDENTIAL
|
|
@@ -10487,6 +10525,7 @@ function spaces(accountId) {
|
|
|
10487
10525
|
unentitleUserToProduct: unentitleUserToProduct.bind(this),
|
|
10488
10526
|
revokeMicroEntitlementOfAUser: revokeMicroEntitlementOfAUser.bind(this),
|
|
10489
10527
|
microEntitleUserToProduct: microEntitleUserToProduct.bind(this),
|
|
10528
|
+
bulkMicroEntitleProductToUser: bulkMicroEntitleProductToUser.bind(this),
|
|
10490
10529
|
enrollUserInClass: enrollUserInClass.bind(this),
|
|
10491
10530
|
getExtProduct: getExtProduct.bind(this),
|
|
10492
10531
|
getSpaceDetails: getSpaceDetails.bind(this),
|
|
@@ -11155,6 +11194,68 @@ function microEntitleUserToProduct(options) {
|
|
|
11155
11194
|
return dfd.promise;
|
|
11156
11195
|
}
|
|
11157
11196
|
|
|
11197
|
+
/* This function calls the ComproDLS API to micro entitle user to product.
|
|
11198
|
+
options = {
|
|
11199
|
+
"micro-entitlements": [{ // Mandatory, Min: 1
|
|
11200
|
+
"ext_user_id": "string", // Mandatory
|
|
11201
|
+
|
|
11202
|
+
"productcode": "string",
|
|
11203
|
+
"ext_product_id": "string",
|
|
11204
|
+
|
|
11205
|
+
"context": "string",
|
|
11206
|
+
"feature_key": "string",
|
|
11207
|
+
"feature_id": "string",,
|
|
11208
|
+
"data": {},
|
|
11209
|
+
"ext_entitlement_meta": {
|
|
11210
|
+
"startdate": 0,
|
|
11211
|
+
"enddate": 0
|
|
11212
|
+
},
|
|
11213
|
+
|
|
11214
|
+
"ext_actor_id": "string", // Mandatory if 'audit' is true
|
|
11215
|
+
"audit": true
|
|
11216
|
+
},
|
|
11217
|
+
…
|
|
11218
|
+
]
|
|
11219
|
+
}
|
|
11220
|
+
*/
|
|
11221
|
+
function bulkMicroEntitleProductToUser(options) {
|
|
11222
|
+
var self = this;
|
|
11223
|
+
// Initializing promise
|
|
11224
|
+
var dfd = q.defer();
|
|
11225
|
+
|
|
11226
|
+
if(options && options['micro-entitlements'])
|
|
11227
|
+
{
|
|
11228
|
+
// Passed all validations, Contruct API url
|
|
11229
|
+
var url = self.config.DEFAULT_HOSTS.AUTH +
|
|
11230
|
+
self.config.AUTH_API_URLS.bulkMicroEntitleProductToUser;
|
|
11231
|
+
url = helpers.api.constructAPIUrl(url, { accountId : self.accountId });
|
|
11232
|
+
|
|
11233
|
+
// Setup request with URL and Params
|
|
11234
|
+
var requestAPI = request.post(url)
|
|
11235
|
+
.set('Content-Type', 'application/json')
|
|
11236
|
+
.set('Accept', 'application/json')
|
|
11237
|
+
.send(options);
|
|
11238
|
+
if(self.traceid) { requestAPI.set('X-Amzn-Trace-Id', self.traceid); }
|
|
11239
|
+
|
|
11240
|
+
requestAPI.end(function(error, response) {
|
|
11241
|
+
if(error) {
|
|
11242
|
+
err = new DLSError(helpers.errors.ERROR_TYPES.API_ERROR, error);
|
|
11243
|
+
dfd.reject(err);
|
|
11244
|
+
}
|
|
11245
|
+
else { dfd.resolve(response.body); }
|
|
11246
|
+
});
|
|
11247
|
+
} else {
|
|
11248
|
+
var err = {};
|
|
11249
|
+
err.description = 'Missing mandatory keys in request options.' +
|
|
11250
|
+
' \'micro-entitlements\' must be present.'
|
|
11251
|
+
err.message = err.description;
|
|
11252
|
+
err = new DLSError(helpers.errors.ERROR_TYPES.SDK_ERROR, err);
|
|
11253
|
+
dfd.reject(err);
|
|
11254
|
+
}
|
|
11255
|
+
|
|
11256
|
+
return dfd.promise;
|
|
11257
|
+
}
|
|
11258
|
+
|
|
11158
11259
|
/* This function calls the ComproDLS API to revoke micro entitlement of a user.
|
|
11159
11260
|
options = {
|
|
11160
11261
|
"ext_user_id": "string", // Mandatory
|
|
@@ -11468,7 +11569,7 @@ function updateInstituteTitle(options){
|
|
|
11468
11569
|
return dfd.promise;
|
|
11469
11570
|
}
|
|
11470
11571
|
|
|
11471
|
-
},{"../../helpers":3,"q":
|
|
11572
|
+
},{"../../helpers":3,"q":90,"superagent":133}],30:[function(require,module,exports){
|
|
11472
11573
|
/*************************************************************************
|
|
11473
11574
|
*
|
|
11474
11575
|
* COMPRO CONFIDENTIAL
|
|
@@ -11645,7 +11746,7 @@ function provisionSpacesToSuperAdmin(options) {
|
|
|
11645
11746
|
return dfd.promise;
|
|
11646
11747
|
}
|
|
11647
11748
|
|
|
11648
|
-
},{"../../helpers":3,"q":
|
|
11749
|
+
},{"../../helpers":3,"q":90,"superagent":133}],31:[function(require,module,exports){
|
|
11649
11750
|
/*************************************************************************
|
|
11650
11751
|
*
|
|
11651
11752
|
* COMPRO CONFIDENTIAL
|
|
@@ -12082,7 +12183,7 @@ function getAllTags(options) {
|
|
|
12082
12183
|
return dfd.promise;
|
|
12083
12184
|
}
|
|
12084
12185
|
|
|
12085
|
-
},{"../../helpers":3,"q":
|
|
12186
|
+
},{"../../helpers":3,"q":90,"superagent":133}],32:[function(require,module,exports){
|
|
12086
12187
|
/*************************************************************************
|
|
12087
12188
|
*
|
|
12088
12189
|
* COMPRO CONFIDENTIAL
|
|
@@ -12548,7 +12649,7 @@ function updateWorkflowRequest(options) {
|
|
|
12548
12649
|
}
|
|
12549
12650
|
return dfd.promise;
|
|
12550
12651
|
}
|
|
12551
|
-
},{"./../../helpers":3,"q":
|
|
12652
|
+
},{"./../../helpers":3,"q":90,"superagent":133}],33:[function(require,module,exports){
|
|
12552
12653
|
/*************************************************************************
|
|
12553
12654
|
*
|
|
12554
12655
|
* COMPRO CONFIDENTIAL
|
|
@@ -12825,7 +12926,7 @@ function resetUserProductProgress(options) {
|
|
|
12825
12926
|
return dfd.promise;
|
|
12826
12927
|
}
|
|
12827
12928
|
|
|
12828
|
-
},{"../../helpers":3,"q":
|
|
12929
|
+
},{"../../helpers":3,"q":90,"superagent":133}],34:[function(require,module,exports){
|
|
12829
12930
|
/*************************************************************************
|
|
12830
12931
|
*
|
|
12831
12932
|
* COMPRO CONFIDENTIAL
|
|
@@ -12941,7 +13042,7 @@ function authWithToken(organizationId, token, options) {
|
|
|
12941
13042
|
return dfd.promise;
|
|
12942
13043
|
};
|
|
12943
13044
|
|
|
12944
|
-
},{"../helpers":3,"./validations":35,"q":
|
|
13045
|
+
},{"../helpers":3,"./validations":35,"q":90,"superagent":133}],35:[function(require,module,exports){
|
|
12945
13046
|
/*************************************************************************
|
|
12946
13047
|
*
|
|
12947
13048
|
* COMPRO CONFIDENTIAL
|
|
@@ -13480,7 +13581,7 @@ module.exports = (function() {
|
|
|
13480
13581
|
/*!
|
|
13481
13582
|
* The buffer module from node.js, for the browser.
|
|
13482
13583
|
*
|
|
13483
|
-
* @author Feross Aboukhadijeh <
|
|
13584
|
+
* @author Feross Aboukhadijeh <http://feross.org>
|
|
13484
13585
|
* @license MIT
|
|
13485
13586
|
*/
|
|
13486
13587
|
/* eslint-disable no-proto */
|
|
@@ -15027,7 +15128,7 @@ function blitBuffer (src, dst, offset, length) {
|
|
|
15027
15128
|
}
|
|
15028
15129
|
|
|
15029
15130
|
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
|
15030
|
-
},{"base64-js":41,"ieee754":
|
|
15131
|
+
},{"base64-js":41,"ieee754":74,"isarray":77}],45:[function(require,module,exports){
|
|
15031
15132
|
module.exports = {
|
|
15032
15133
|
"100": "Continue",
|
|
15033
15134
|
"101": "Switching Protocols",
|
|
@@ -15114,171 +15215,6 @@ module.exports = function(obj, fn){
|
|
|
15114
15215
|
};
|
|
15115
15216
|
|
|
15116
15217
|
},{}],47:[function(require,module,exports){
|
|
15117
|
-
|
|
15118
|
-
/**
|
|
15119
|
-
* Expose `Emitter`.
|
|
15120
|
-
*/
|
|
15121
|
-
|
|
15122
|
-
if (typeof module !== 'undefined') {
|
|
15123
|
-
module.exports = Emitter;
|
|
15124
|
-
}
|
|
15125
|
-
|
|
15126
|
-
/**
|
|
15127
|
-
* Initialize a new `Emitter`.
|
|
15128
|
-
*
|
|
15129
|
-
* @api public
|
|
15130
|
-
*/
|
|
15131
|
-
|
|
15132
|
-
function Emitter(obj) {
|
|
15133
|
-
if (obj) return mixin(obj);
|
|
15134
|
-
};
|
|
15135
|
-
|
|
15136
|
-
/**
|
|
15137
|
-
* Mixin the emitter properties.
|
|
15138
|
-
*
|
|
15139
|
-
* @param {Object} obj
|
|
15140
|
-
* @return {Object}
|
|
15141
|
-
* @api private
|
|
15142
|
-
*/
|
|
15143
|
-
|
|
15144
|
-
function mixin(obj) {
|
|
15145
|
-
for (var key in Emitter.prototype) {
|
|
15146
|
-
obj[key] = Emitter.prototype[key];
|
|
15147
|
-
}
|
|
15148
|
-
return obj;
|
|
15149
|
-
}
|
|
15150
|
-
|
|
15151
|
-
/**
|
|
15152
|
-
* Listen on the given `event` with `fn`.
|
|
15153
|
-
*
|
|
15154
|
-
* @param {String} event
|
|
15155
|
-
* @param {Function} fn
|
|
15156
|
-
* @return {Emitter}
|
|
15157
|
-
* @api public
|
|
15158
|
-
*/
|
|
15159
|
-
|
|
15160
|
-
Emitter.prototype.on =
|
|
15161
|
-
Emitter.prototype.addEventListener = function(event, fn){
|
|
15162
|
-
this._callbacks = this._callbacks || {};
|
|
15163
|
-
(this._callbacks['$' + event] = this._callbacks['$' + event] || [])
|
|
15164
|
-
.push(fn);
|
|
15165
|
-
return this;
|
|
15166
|
-
};
|
|
15167
|
-
|
|
15168
|
-
/**
|
|
15169
|
-
* Adds an `event` listener that will be invoked a single
|
|
15170
|
-
* time then automatically removed.
|
|
15171
|
-
*
|
|
15172
|
-
* @param {String} event
|
|
15173
|
-
* @param {Function} fn
|
|
15174
|
-
* @return {Emitter}
|
|
15175
|
-
* @api public
|
|
15176
|
-
*/
|
|
15177
|
-
|
|
15178
|
-
Emitter.prototype.once = function(event, fn){
|
|
15179
|
-
function on() {
|
|
15180
|
-
this.off(event, on);
|
|
15181
|
-
fn.apply(this, arguments);
|
|
15182
|
-
}
|
|
15183
|
-
|
|
15184
|
-
on.fn = fn;
|
|
15185
|
-
this.on(event, on);
|
|
15186
|
-
return this;
|
|
15187
|
-
};
|
|
15188
|
-
|
|
15189
|
-
/**
|
|
15190
|
-
* Remove the given callback for `event` or all
|
|
15191
|
-
* registered callbacks.
|
|
15192
|
-
*
|
|
15193
|
-
* @param {String} event
|
|
15194
|
-
* @param {Function} fn
|
|
15195
|
-
* @return {Emitter}
|
|
15196
|
-
* @api public
|
|
15197
|
-
*/
|
|
15198
|
-
|
|
15199
|
-
Emitter.prototype.off =
|
|
15200
|
-
Emitter.prototype.removeListener =
|
|
15201
|
-
Emitter.prototype.removeAllListeners =
|
|
15202
|
-
Emitter.prototype.removeEventListener = function(event, fn){
|
|
15203
|
-
this._callbacks = this._callbacks || {};
|
|
15204
|
-
|
|
15205
|
-
// all
|
|
15206
|
-
if (0 == arguments.length) {
|
|
15207
|
-
this._callbacks = {};
|
|
15208
|
-
return this;
|
|
15209
|
-
}
|
|
15210
|
-
|
|
15211
|
-
// specific event
|
|
15212
|
-
var callbacks = this._callbacks['$' + event];
|
|
15213
|
-
if (!callbacks) return this;
|
|
15214
|
-
|
|
15215
|
-
// remove all handlers
|
|
15216
|
-
if (1 == arguments.length) {
|
|
15217
|
-
delete this._callbacks['$' + event];
|
|
15218
|
-
return this;
|
|
15219
|
-
}
|
|
15220
|
-
|
|
15221
|
-
// remove specific handler
|
|
15222
|
-
var cb;
|
|
15223
|
-
for (var i = 0; i < callbacks.length; i++) {
|
|
15224
|
-
cb = callbacks[i];
|
|
15225
|
-
if (cb === fn || cb.fn === fn) {
|
|
15226
|
-
callbacks.splice(i, 1);
|
|
15227
|
-
break;
|
|
15228
|
-
}
|
|
15229
|
-
}
|
|
15230
|
-
return this;
|
|
15231
|
-
};
|
|
15232
|
-
|
|
15233
|
-
/**
|
|
15234
|
-
* Emit `event` with the given args.
|
|
15235
|
-
*
|
|
15236
|
-
* @param {String} event
|
|
15237
|
-
* @param {Mixed} ...
|
|
15238
|
-
* @return {Emitter}
|
|
15239
|
-
*/
|
|
15240
|
-
|
|
15241
|
-
Emitter.prototype.emit = function(event){
|
|
15242
|
-
this._callbacks = this._callbacks || {};
|
|
15243
|
-
var args = [].slice.call(arguments, 1)
|
|
15244
|
-
, callbacks = this._callbacks['$' + event];
|
|
15245
|
-
|
|
15246
|
-
if (callbacks) {
|
|
15247
|
-
callbacks = callbacks.slice(0);
|
|
15248
|
-
for (var i = 0, len = callbacks.length; i < len; ++i) {
|
|
15249
|
-
callbacks[i].apply(this, args);
|
|
15250
|
-
}
|
|
15251
|
-
}
|
|
15252
|
-
|
|
15253
|
-
return this;
|
|
15254
|
-
};
|
|
15255
|
-
|
|
15256
|
-
/**
|
|
15257
|
-
* Return array of callbacks for `event`.
|
|
15258
|
-
*
|
|
15259
|
-
* @param {String} event
|
|
15260
|
-
* @return {Array}
|
|
15261
|
-
* @api public
|
|
15262
|
-
*/
|
|
15263
|
-
|
|
15264
|
-
Emitter.prototype.listeners = function(event){
|
|
15265
|
-
this._callbacks = this._callbacks || {};
|
|
15266
|
-
return this._callbacks['$' + event] || [];
|
|
15267
|
-
};
|
|
15268
|
-
|
|
15269
|
-
/**
|
|
15270
|
-
* Check if this emitter has `event` handlers.
|
|
15271
|
-
*
|
|
15272
|
-
* @param {String} event
|
|
15273
|
-
* @return {Boolean}
|
|
15274
|
-
* @api public
|
|
15275
|
-
*/
|
|
15276
|
-
|
|
15277
|
-
Emitter.prototype.hasListeners = function(event){
|
|
15278
|
-
return !! this.listeners(event).length;
|
|
15279
|
-
};
|
|
15280
|
-
|
|
15281
|
-
},{}],48:[function(require,module,exports){
|
|
15282
15218
|
|
|
15283
15219
|
module.exports = function(a, b){
|
|
15284
15220
|
var fn = function(){};
|
|
@@ -15286,8 +15222,7 @@ module.exports = function(a, b){
|
|
|
15286
15222
|
a.prototype = new fn;
|
|
15287
15223
|
a.prototype.constructor = a;
|
|
15288
15224
|
};
|
|
15289
|
-
},{}],
|
|
15290
|
-
(function (Buffer){
|
|
15225
|
+
},{}],48:[function(require,module,exports){
|
|
15291
15226
|
// Copyright Joyent, Inc. and other Node contributors.
|
|
15292
15227
|
//
|
|
15293
15228
|
// Permission is hereby granted, free of charge, to any person obtaining a
|
|
@@ -15390,18 +15325,17 @@ function isPrimitive(arg) {
|
|
|
15390
15325
|
}
|
|
15391
15326
|
exports.isPrimitive = isPrimitive;
|
|
15392
15327
|
|
|
15393
|
-
exports.isBuffer = Buffer.isBuffer;
|
|
15328
|
+
exports.isBuffer = require('buffer').Buffer.isBuffer;
|
|
15394
15329
|
|
|
15395
15330
|
function objectToString(o) {
|
|
15396
15331
|
return Object.prototype.toString.call(o);
|
|
15397
15332
|
}
|
|
15398
15333
|
|
|
15399
|
-
}
|
|
15400
|
-
},{"../../is-buffer/index.js":78}],50:[function(require,module,exports){
|
|
15334
|
+
},{"buffer":44}],49:[function(require,module,exports){
|
|
15401
15335
|
|
|
15402
15336
|
module.exports = require('./lib/');
|
|
15403
15337
|
|
|
15404
|
-
},{"./lib/":
|
|
15338
|
+
},{"./lib/":50}],50:[function(require,module,exports){
|
|
15405
15339
|
|
|
15406
15340
|
module.exports = require('./socket');
|
|
15407
15341
|
|
|
@@ -15413,7 +15347,7 @@ module.exports = require('./socket');
|
|
|
15413
15347
|
*/
|
|
15414
15348
|
module.exports.parser = require('engine.io-parser');
|
|
15415
15349
|
|
|
15416
|
-
},{"./socket":
|
|
15350
|
+
},{"./socket":51,"engine.io-parser":63}],51:[function(require,module,exports){
|
|
15417
15351
|
(function (global){
|
|
15418
15352
|
/**
|
|
15419
15353
|
* Module dependencies.
|
|
@@ -16145,7 +16079,7 @@ Socket.prototype.filterUpgrades = function (upgrades) {
|
|
|
16145
16079
|
};
|
|
16146
16080
|
|
|
16147
16081
|
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
|
16148
|
-
},{"./transport":
|
|
16082
|
+
},{"./transport":52,"./transports":53,"component-emitter":59,"debug":60,"engine.io-parser":63,"indexof":75,"parsejson":83,"parseqs":84,"parseuri":85}],52:[function(require,module,exports){
|
|
16149
16083
|
/**
|
|
16150
16084
|
* Module dependencies.
|
|
16151
16085
|
*/
|
|
@@ -16302,7 +16236,7 @@ Transport.prototype.onClose = function () {
|
|
|
16302
16236
|
this.emit('close');
|
|
16303
16237
|
};
|
|
16304
16238
|
|
|
16305
|
-
},{"component-emitter":
|
|
16239
|
+
},{"component-emitter":59,"engine.io-parser":63}],53:[function(require,module,exports){
|
|
16306
16240
|
(function (global){
|
|
16307
16241
|
/**
|
|
16308
16242
|
* Module dependencies
|
|
@@ -16359,7 +16293,7 @@ function polling(opts){
|
|
|
16359
16293
|
}
|
|
16360
16294
|
|
|
16361
16295
|
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
|
16362
|
-
},{"./polling-jsonp":
|
|
16296
|
+
},{"./polling-jsonp":54,"./polling-xhr":55,"./websocket":57,"xmlhttprequest-ssl":58}],54:[function(require,module,exports){
|
|
16363
16297
|
(function (global){
|
|
16364
16298
|
|
|
16365
16299
|
/**
|
|
@@ -16601,7 +16535,7 @@ JSONPPolling.prototype.doWrite = function (data, fn) {
|
|
|
16601
16535
|
};
|
|
16602
16536
|
|
|
16603
16537
|
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
|
16604
|
-
},{"./polling":
|
|
16538
|
+
},{"./polling":56,"component-inherit":47}],55:[function(require,module,exports){
|
|
16605
16539
|
(function (global){
|
|
16606
16540
|
/**
|
|
16607
16541
|
* Module requirements.
|
|
@@ -17017,7 +16951,7 @@ function unloadHandler() {
|
|
|
17017
16951
|
}
|
|
17018
16952
|
|
|
17019
16953
|
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
|
17020
|
-
},{"./polling":
|
|
16954
|
+
},{"./polling":56,"component-emitter":59,"component-inherit":47,"debug":60,"xmlhttprequest-ssl":58}],56:[function(require,module,exports){
|
|
17021
16955
|
/**
|
|
17022
16956
|
* Module dependencies.
|
|
17023
16957
|
*/
|
|
@@ -17266,7 +17200,7 @@ Polling.prototype.uri = function(){
|
|
|
17266
17200
|
return schema + '://' + (ipv6 ? '[' + this.hostname + ']' : this.hostname) + port + this.path + query;
|
|
17267
17201
|
};
|
|
17268
17202
|
|
|
17269
|
-
},{"../transport":
|
|
17203
|
+
},{"../transport":52,"component-inherit":47,"debug":60,"engine.io-parser":63,"parseqs":84,"xmlhttprequest-ssl":58,"yeast":144}],57:[function(require,module,exports){
|
|
17270
17204
|
(function (global){
|
|
17271
17205
|
/**
|
|
17272
17206
|
* Module dependencies.
|
|
@@ -17558,7 +17492,7 @@ WS.prototype.check = function(){
|
|
|
17558
17492
|
};
|
|
17559
17493
|
|
|
17560
17494
|
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
|
17561
|
-
},{"../transport":
|
|
17495
|
+
},{"../transport":52,"component-inherit":47,"debug":60,"engine.io-parser":63,"parseqs":84,"ws":43,"yeast":144}],58:[function(require,module,exports){
|
|
17562
17496
|
// browser shim for xmlhttprequest module
|
|
17563
17497
|
var hasCORS = require('has-cors');
|
|
17564
17498
|
|
|
@@ -17596,7 +17530,7 @@ module.exports = function(opts) {
|
|
|
17596
17530
|
}
|
|
17597
17531
|
}
|
|
17598
17532
|
|
|
17599
|
-
},{"has-cors":
|
|
17533
|
+
},{"has-cors":72}],59:[function(require,module,exports){
|
|
17600
17534
|
|
|
17601
17535
|
/**
|
|
17602
17536
|
* Expose `Emitter`.
|
|
@@ -17762,7 +17696,7 @@ Emitter.prototype.hasListeners = function(event){
|
|
|
17762
17696
|
return !! this.listeners(event).length;
|
|
17763
17697
|
};
|
|
17764
17698
|
|
|
17765
|
-
},{}],
|
|
17699
|
+
},{}],60:[function(require,module,exports){
|
|
17766
17700
|
|
|
17767
17701
|
/**
|
|
17768
17702
|
* This is the web browser implementation of `debug()`.
|
|
@@ -17932,7 +17866,7 @@ function localstorage(){
|
|
|
17932
17866
|
} catch (e) {}
|
|
17933
17867
|
}
|
|
17934
17868
|
|
|
17935
|
-
},{"./debug":
|
|
17869
|
+
},{"./debug":61}],61:[function(require,module,exports){
|
|
17936
17870
|
|
|
17937
17871
|
/**
|
|
17938
17872
|
* This is the common logic for both the Node.js and web browser
|
|
@@ -18131,7 +18065,7 @@ function coerce(val) {
|
|
|
18131
18065
|
return val;
|
|
18132
18066
|
}
|
|
18133
18067
|
|
|
18134
|
-
},{"ms":
|
|
18068
|
+
},{"ms":62}],62:[function(require,module,exports){
|
|
18135
18069
|
/**
|
|
18136
18070
|
* Helpers.
|
|
18137
18071
|
*/
|
|
@@ -18258,7 +18192,7 @@ function plural(ms, n, name) {
|
|
|
18258
18192
|
return Math.ceil(ms / n) + ' ' + name + 's';
|
|
18259
18193
|
}
|
|
18260
18194
|
|
|
18261
|
-
},{}],
|
|
18195
|
+
},{}],63:[function(require,module,exports){
|
|
18262
18196
|
(function (global){
|
|
18263
18197
|
/**
|
|
18264
18198
|
* Module dependencies.
|
|
@@ -18856,7 +18790,7 @@ exports.decodePayloadAsBinary = function (data, binaryType, callback) {
|
|
|
18856
18790
|
};
|
|
18857
18791
|
|
|
18858
18792
|
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
|
18859
|
-
},{"./keys":
|
|
18793
|
+
},{"./keys":64,"after":36,"arraybuffer.slice":38,"base64-arraybuffer":40,"blob":42,"has-binary":65,"utf8":139}],64:[function(require,module,exports){
|
|
18860
18794
|
|
|
18861
18795
|
/**
|
|
18862
18796
|
* Gets the keys for an object.
|
|
@@ -18877,7 +18811,7 @@ module.exports = Object.keys || function keys (obj){
|
|
|
18877
18811
|
return arr;
|
|
18878
18812
|
};
|
|
18879
18813
|
|
|
18880
|
-
},{}],
|
|
18814
|
+
},{}],65:[function(require,module,exports){
|
|
18881
18815
|
(function (global){
|
|
18882
18816
|
|
|
18883
18817
|
/*
|
|
@@ -18939,12 +18873,12 @@ function hasBinary(data) {
|
|
|
18939
18873
|
}
|
|
18940
18874
|
|
|
18941
18875
|
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
|
18942
|
-
},{"isarray":
|
|
18876
|
+
},{"isarray":66}],66:[function(require,module,exports){
|
|
18943
18877
|
module.exports = Array.isArray || function (arr) {
|
|
18944
18878
|
return Object.prototype.toString.call(arr) == '[object Array]';
|
|
18945
18879
|
};
|
|
18946
18880
|
|
|
18947
|
-
},{}],
|
|
18881
|
+
},{}],67:[function(require,module,exports){
|
|
18948
18882
|
// Copyright Joyent, Inc. and other Node contributors.
|
|
18949
18883
|
//
|
|
18950
18884
|
// Permission is hereby granted, free of charge, to any person obtaining a
|
|
@@ -19247,7 +19181,7 @@ function isUndefined(arg) {
|
|
|
19247
19181
|
return arg === void 0;
|
|
19248
19182
|
}
|
|
19249
19183
|
|
|
19250
|
-
},{}],
|
|
19184
|
+
},{}],68:[function(require,module,exports){
|
|
19251
19185
|
var hasOwn = Object.prototype.hasOwnProperty;
|
|
19252
19186
|
var toStr = Object.prototype.toString;
|
|
19253
19187
|
var defineProperty = Object.defineProperty;
|
|
@@ -19368,7 +19302,7 @@ module.exports = function extend() {
|
|
|
19368
19302
|
return target;
|
|
19369
19303
|
};
|
|
19370
19304
|
|
|
19371
|
-
},{}],
|
|
19305
|
+
},{}],69:[function(require,module,exports){
|
|
19372
19306
|
|
|
19373
19307
|
var hasOwn = Object.prototype.hasOwnProperty;
|
|
19374
19308
|
var toString = Object.prototype.toString;
|
|
@@ -19392,7 +19326,7 @@ module.exports = function forEach (obj, fn, ctx) {
|
|
|
19392
19326
|
};
|
|
19393
19327
|
|
|
19394
19328
|
|
|
19395
|
-
},{}],
|
|
19329
|
+
},{}],70:[function(require,module,exports){
|
|
19396
19330
|
(function (global){
|
|
19397
19331
|
|
|
19398
19332
|
/*
|
|
@@ -19455,9 +19389,9 @@ function hasBinary(data) {
|
|
|
19455
19389
|
}
|
|
19456
19390
|
|
|
19457
19391
|
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
|
19458
|
-
},{"isarray":
|
|
19459
|
-
arguments[4][
|
|
19460
|
-
},{"dup":
|
|
19392
|
+
},{"isarray":71}],71:[function(require,module,exports){
|
|
19393
|
+
arguments[4][66][0].apply(exports,arguments)
|
|
19394
|
+
},{"dup":66}],72:[function(require,module,exports){
|
|
19461
19395
|
|
|
19462
19396
|
/**
|
|
19463
19397
|
* Module exports.
|
|
@@ -19476,7 +19410,7 @@ try {
|
|
|
19476
19410
|
module.exports = false;
|
|
19477
19411
|
}
|
|
19478
19412
|
|
|
19479
|
-
},{}],
|
|
19413
|
+
},{}],73:[function(require,module,exports){
|
|
19480
19414
|
var http = require('http');
|
|
19481
19415
|
|
|
19482
19416
|
var https = module.exports;
|
|
@@ -19492,7 +19426,8 @@ https.request = function (params, cb) {
|
|
|
19492
19426
|
return http.request.call(this, params, cb);
|
|
19493
19427
|
}
|
|
19494
19428
|
|
|
19495
|
-
},{"http":
|
|
19429
|
+
},{"http":127}],74:[function(require,module,exports){
|
|
19430
|
+
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
19496
19431
|
exports.read = function (buffer, offset, isLE, mLen, nBytes) {
|
|
19497
19432
|
var e, m
|
|
19498
19433
|
var eLen = (nBytes * 8) - mLen - 1
|
|
@@ -19578,7 +19513,7 @@ exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
|
|
|
19578
19513
|
buffer[offset + i - d] |= s * 128
|
|
19579
19514
|
}
|
|
19580
19515
|
|
|
19581
|
-
},{}],
|
|
19516
|
+
},{}],75:[function(require,module,exports){
|
|
19582
19517
|
|
|
19583
19518
|
var indexOf = [].indexOf;
|
|
19584
19519
|
|
|
@@ -19589,62 +19524,43 @@ module.exports = function(arr, obj){
|
|
|
19589
19524
|
}
|
|
19590
19525
|
return -1;
|
|
19591
19526
|
};
|
|
19592
|
-
},{}],
|
|
19527
|
+
},{}],76:[function(require,module,exports){
|
|
19593
19528
|
if (typeof Object.create === 'function') {
|
|
19594
19529
|
// implementation from standard node.js 'util' module
|
|
19595
19530
|
module.exports = function inherits(ctor, superCtor) {
|
|
19596
|
-
|
|
19597
|
-
|
|
19598
|
-
|
|
19599
|
-
|
|
19600
|
-
|
|
19601
|
-
|
|
19602
|
-
|
|
19603
|
-
|
|
19604
|
-
|
|
19531
|
+
if (superCtor) {
|
|
19532
|
+
ctor.super_ = superCtor
|
|
19533
|
+
ctor.prototype = Object.create(superCtor.prototype, {
|
|
19534
|
+
constructor: {
|
|
19535
|
+
value: ctor,
|
|
19536
|
+
enumerable: false,
|
|
19537
|
+
writable: true,
|
|
19538
|
+
configurable: true
|
|
19539
|
+
}
|
|
19540
|
+
})
|
|
19541
|
+
}
|
|
19605
19542
|
};
|
|
19606
19543
|
} else {
|
|
19607
19544
|
// old school shim for old browsers
|
|
19608
19545
|
module.exports = function inherits(ctor, superCtor) {
|
|
19609
|
-
|
|
19610
|
-
|
|
19611
|
-
|
|
19612
|
-
|
|
19613
|
-
|
|
19546
|
+
if (superCtor) {
|
|
19547
|
+
ctor.super_ = superCtor
|
|
19548
|
+
var TempCtor = function () {}
|
|
19549
|
+
TempCtor.prototype = superCtor.prototype
|
|
19550
|
+
ctor.prototype = new TempCtor()
|
|
19551
|
+
ctor.prototype.constructor = ctor
|
|
19552
|
+
}
|
|
19614
19553
|
}
|
|
19615
19554
|
}
|
|
19616
19555
|
|
|
19617
|
-
},{}],
|
|
19618
|
-
/*!
|
|
19619
|
-
* Determine if an object is a Buffer
|
|
19620
|
-
*
|
|
19621
|
-
* @author Feross Aboukhadijeh <https://feross.org>
|
|
19622
|
-
* @license MIT
|
|
19623
|
-
*/
|
|
19624
|
-
|
|
19625
|
-
// The _isBuffer check is for Safari 5-7 support, because it's missing
|
|
19626
|
-
// Object.prototype.constructor. Remove this eventually
|
|
19627
|
-
module.exports = function (obj) {
|
|
19628
|
-
return obj != null && (isBuffer(obj) || isSlowBuffer(obj) || !!obj._isBuffer)
|
|
19629
|
-
}
|
|
19630
|
-
|
|
19631
|
-
function isBuffer (obj) {
|
|
19632
|
-
return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj)
|
|
19633
|
-
}
|
|
19634
|
-
|
|
19635
|
-
// For Node v0.10 support. Remove this eventually.
|
|
19636
|
-
function isSlowBuffer (obj) {
|
|
19637
|
-
return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0))
|
|
19638
|
-
}
|
|
19639
|
-
|
|
19640
|
-
},{}],79:[function(require,module,exports){
|
|
19556
|
+
},{}],77:[function(require,module,exports){
|
|
19641
19557
|
var toString = {}.toString;
|
|
19642
19558
|
|
|
19643
19559
|
module.exports = Array.isArray || function (arr) {
|
|
19644
19560
|
return toString.call(arr) == '[object Array]';
|
|
19645
19561
|
};
|
|
19646
19562
|
|
|
19647
|
-
},{}],
|
|
19563
|
+
},{}],78:[function(require,module,exports){
|
|
19648
19564
|
(function (global){
|
|
19649
19565
|
/*! JSON v3.3.2 | http://bestiejs.github.io/json3 | Copyright 2012-2014, Kit Cambridge | http://kit.mit-license.org */
|
|
19650
19566
|
;(function () {
|
|
@@ -20550,7 +20466,7 @@ module.exports = Array.isArray || function (arr) {
|
|
|
20550
20466
|
}).call(this);
|
|
20551
20467
|
|
|
20552
20468
|
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
|
20553
|
-
},{}],
|
|
20469
|
+
},{}],79:[function(require,module,exports){
|
|
20554
20470
|
'use strict';
|
|
20555
20471
|
|
|
20556
20472
|
var keysShim;
|
|
@@ -20584,6 +20500,8 @@ if (!Object.keys) {
|
|
|
20584
20500
|
$frames: true,
|
|
20585
20501
|
$innerHeight: true,
|
|
20586
20502
|
$innerWidth: true,
|
|
20503
|
+
$onmozfullscreenchange: true,
|
|
20504
|
+
$onmozfullscreenerror: true,
|
|
20587
20505
|
$outerHeight: true,
|
|
20588
20506
|
$outerWidth: true,
|
|
20589
20507
|
$pageXOffset: true,
|
|
@@ -20672,7 +20590,7 @@ if (!Object.keys) {
|
|
|
20672
20590
|
}
|
|
20673
20591
|
module.exports = keysShim;
|
|
20674
20592
|
|
|
20675
|
-
},{"./isArguments":
|
|
20593
|
+
},{"./isArguments":81}],80:[function(require,module,exports){
|
|
20676
20594
|
'use strict';
|
|
20677
20595
|
|
|
20678
20596
|
var slice = Array.prototype.slice;
|
|
@@ -20706,7 +20624,7 @@ keysShim.shim = function shimObjectKeys() {
|
|
|
20706
20624
|
|
|
20707
20625
|
module.exports = keysShim;
|
|
20708
20626
|
|
|
20709
|
-
},{"./implementation":
|
|
20627
|
+
},{"./implementation":79,"./isArguments":81}],81:[function(require,module,exports){
|
|
20710
20628
|
'use strict';
|
|
20711
20629
|
|
|
20712
20630
|
var toStr = Object.prototype.toString;
|
|
@@ -20725,7 +20643,7 @@ module.exports = function isArguments(value) {
|
|
|
20725
20643
|
return isArgs;
|
|
20726
20644
|
};
|
|
20727
20645
|
|
|
20728
|
-
},{}],
|
|
20646
|
+
},{}],82:[function(require,module,exports){
|
|
20729
20647
|
exports.endianness = function () { return 'LE' };
|
|
20730
20648
|
|
|
20731
20649
|
exports.hostname = function () {
|
|
@@ -20772,7 +20690,7 @@ exports.tmpdir = exports.tmpDir = function () {
|
|
|
20772
20690
|
|
|
20773
20691
|
exports.EOL = '\n';
|
|
20774
20692
|
|
|
20775
|
-
},{}],
|
|
20693
|
+
},{}],83:[function(require,module,exports){
|
|
20776
20694
|
(function (global){
|
|
20777
20695
|
/**
|
|
20778
20696
|
* JSON parse.
|
|
@@ -20807,7 +20725,7 @@ module.exports = function parsejson(data) {
|
|
|
20807
20725
|
}
|
|
20808
20726
|
};
|
|
20809
20727
|
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
|
20810
|
-
},{}],
|
|
20728
|
+
},{}],84:[function(require,module,exports){
|
|
20811
20729
|
/**
|
|
20812
20730
|
* Compiles a querystring
|
|
20813
20731
|
* Returns string representation of the object
|
|
@@ -20846,7 +20764,7 @@ exports.decode = function(qs){
|
|
|
20846
20764
|
return qry;
|
|
20847
20765
|
};
|
|
20848
20766
|
|
|
20849
|
-
},{}],
|
|
20767
|
+
},{}],85:[function(require,module,exports){
|
|
20850
20768
|
/**
|
|
20851
20769
|
* Parses an URI
|
|
20852
20770
|
*
|
|
@@ -20887,11 +20805,12 @@ module.exports = function parseuri(str) {
|
|
|
20887
20805
|
return uri;
|
|
20888
20806
|
};
|
|
20889
20807
|
|
|
20890
|
-
},{}],
|
|
20808
|
+
},{}],86:[function(require,module,exports){
|
|
20891
20809
|
(function (process){
|
|
20892
20810
|
'use strict';
|
|
20893
20811
|
|
|
20894
|
-
if (
|
|
20812
|
+
if (typeof process === 'undefined' ||
|
|
20813
|
+
!process.version ||
|
|
20895
20814
|
process.version.indexOf('v0.') === 0 ||
|
|
20896
20815
|
process.version.indexOf('v1.') === 0 && process.version.indexOf('v1.8.') !== 0) {
|
|
20897
20816
|
module.exports = { nextTick: nextTick };
|
|
@@ -20935,7 +20854,7 @@ function nextTick(fn, arg1, arg2, arg3) {
|
|
|
20935
20854
|
|
|
20936
20855
|
|
|
20937
20856
|
}).call(this,require('_process'))
|
|
20938
|
-
},{"_process":
|
|
20857
|
+
},{"_process":87}],87:[function(require,module,exports){
|
|
20939
20858
|
// shim for using process in browser
|
|
20940
20859
|
var process = module.exports = {};
|
|
20941
20860
|
|
|
@@ -21121,11 +21040,11 @@ process.chdir = function (dir) {
|
|
|
21121
21040
|
};
|
|
21122
21041
|
process.umask = function() { return 0; };
|
|
21123
21042
|
|
|
21124
|
-
},{}],
|
|
21043
|
+
},{}],88:[function(require,module,exports){
|
|
21125
21044
|
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.PubNub=t():e.PubNub=t()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function a(e){if(!navigator||!navigator.sendBeacon)return!1;navigator.sendBeacon(e)}Object.defineProperty(t,"__esModule",{value:!0});var u=n(1),c=r(u),l=n(40),h=r(l),f=n(41),p=r(f),d=n(42),y=(n(5),function(e){function t(e){i(this,t);var n=e.listenToBrowserNetworkEvents,r=void 0===n||n;e.db=p.default,e.sdkFamily="Web",e.networking=new h.default({del:d.del,get:d.get,post:d.post,sendBeacon:a});var o=s(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r&&(window.addEventListener("offline",function(){o.networkDownDetected()}),window.addEventListener("online",function(){o.networkUpDetected()})),o}return o(t,e),t}(c.default));t.default=y,e.exports=t.default},function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n(2),u=i(a),c=n(6),l=i(c),h=n(8),f=i(h),p=n(9),d=i(p),y=n(16),g=i(y),b=n(17),v=r(b),_=n(18),m=r(_),k=n(19),P=r(k),O=n(20),T=r(O),S=n(21),w=r(S),C=n(22),M=r(C),E=n(23),x=r(E),N=n(24),R=r(N),A=n(25),D=r(A),K=n(26),j=r(K),G=n(27),U=r(G),I=n(28),H=r(I),B=n(29),L=r(B),q=n(30),F=r(q),z=n(31),X=r(z),W=n(32),J=r(W),V=n(33),$=r(V),Q=n(34),Y=r(Q),Z=n(35),ee=r(Z),te=n(36),ne=r(te),re=n(37),ie=r(re),se=n(38),oe=r(se),ae=n(12),ue=r(ae),ce=n(39),le=r(ce),he=n(13),fe=i(he),pe=n(10),de=i(pe),ye=(n(5),n(3)),ge=i(ye),be=function(){function e(t){var n=this;s(this,e);var r=t.db,i=t.networking,o=this._config=new u.default({setup:t,db:r}),a=new l.default({config:o});i.init(o);var c={config:o,networking:i,crypto:a},h=g.default.bind(this,c,ue),p=g.default.bind(this,c,j),y=g.default.bind(this,c,H),b=g.default.bind(this,c,F),_=g.default.bind(this,c,le),k=this._listenerManager=new d.default,O=new f.default({timeEndpoint:h,leaveEndpoint:p,heartbeatEndpoint:y,setStateEndpoint:b,subscribeEndpoint:_,crypto:c.crypto,config:c.config,listenerManager:k});this.addListener=k.addListener.bind(k),this.removeListener=k.removeListener.bind(k),this.removeAllListeners=k.removeAllListeners.bind(k),this.channelGroups={listGroups:g.default.bind(this,c,T),listChannels:g.default.bind(this,c,w),addChannels:g.default.bind(this,c,v),removeChannels:g.default.bind(this,c,m),deleteGroup:g.default.bind(this,c,P)},this.push={addChannels:g.default.bind(this,c,M),removeChannels:g.default.bind(this,c,x),deleteDevice:g.default.bind(this,c,D),listChannels:g.default.bind(this,c,R)},this.hereNow=g.default.bind(this,c,X),this.whereNow=g.default.bind(this,c,U),this.getState=g.default.bind(this,c,L),this.setState=O.adaptStateChange.bind(O),this.grant=g.default.bind(this,c,$),this.audit=g.default.bind(this,c,J),this.publish=g.default.bind(this,c,Y),this.fire=function(e,t){return e.replicate=!1,e.storeInHistory=!1,n.publish(e,t)},this.history=g.default.bind(this,c,ee),this.deleteMessages=g.default.bind(this,c,ne),this.messageCounts=g.default.bind(this,c,ie),this.fetchMessages=g.default.bind(this,c,oe),this.time=h,this.subscribe=O.adaptSubscribeChange.bind(O),this.presence=O.adaptPresenceChange.bind(O),this.unsubscribe=O.adaptUnsubscribeChange.bind(O),this.disconnect=O.disconnect.bind(O),this.reconnect=O.reconnect.bind(O),this.destroy=function(e){O.unsubscribeAll(e),O.disconnect()},this.stop=this.destroy,this.unsubscribeAll=O.unsubscribeAll.bind(O),this.getSubscribedChannels=O.getSubscribedChannels.bind(O),this.getSubscribedChannelGroups=O.getSubscribedChannelGroups.bind(O),this.encrypt=a.encrypt.bind(a),this.decrypt=a.decrypt.bind(a),this.getAuthKey=c.config.getAuthKey.bind(c.config),this.setAuthKey=c.config.setAuthKey.bind(c.config),this.setCipherKey=c.config.setCipherKey.bind(c.config),this.getUUID=c.config.getUUID.bind(c.config),this.setUUID=c.config.setUUID.bind(c.config),this.getFilterExpression=c.config.getFilterExpression.bind(c.config),this.setFilterExpression=c.config.setFilterExpression.bind(c.config),this.setHeartbeatInterval=c.config.setHeartbeatInterval.bind(c.config),i.hasModule("proxy")&&(this.setProxy=function(e){c.config.setProxy(e),n.reconnect()})}return o(e,[{key:"getVersion",value:function(){return this._config.getVersion()}},{key:"networkDownDetected",value:function(){this._listenerManager.announceNetworkDown(),this._config.restore?this.disconnect():this.destroy(!0)}},{key:"networkUpDetected",value:function(){this._listenerManager.announceNetworkUp(),this.reconnect()}}],[{key:"generateUUID",value:function(){return ge.default.createUUID()}}]),e}();be.OPERATIONS=fe.default,be.CATEGORIES=de.default,t.default=be,e.exports=t.default},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(3),o=function(e){return e&&e.__esModule?e:{default:e}}(s),a=(n(5),function(){function e(t){var n=t.setup,i=t.db;r(this,e),this._db=i,this.instanceId="pn-"+o.default.createUUID(),this.secretKey=n.secretKey||n.secret_key,this.subscribeKey=n.subscribeKey||n.subscribe_key,this.publishKey=n.publishKey||n.publish_key,this.sdkName=n.sdkName,this.sdkFamily=n.sdkFamily,this.partnerId=n.partnerId,this.setAuthKey(n.authKey),this.setCipherKey(n.cipherKey),this.setFilterExpression(n.filterExpression),this.origin=n.origin||"ps.pndsn.com",this.secure=n.ssl||!1,this.restore=n.restore||!1,this.proxy=n.proxy,this.keepAlive=n.keepAlive,this.keepAliveSettings=n.keepAliveSettings,this.autoNetworkDetection=n.autoNetworkDetection||!1,this.dedupeOnSubscribe=n.dedupeOnSubscribe||!1,this.maximumCacheSize=n.maximumCacheSize||100,this.customEncrypt=n.customEncrypt,this.customDecrypt=n.customDecrypt,"undefined"!=typeof location&&"https:"===location.protocol&&(this.secure=!0),this.logVerbosity=n.logVerbosity||!1,this.suppressLeaveEvents=n.suppressLeaveEvents||!1,this.announceFailedHeartbeats=n.announceFailedHeartbeats||!0,this.announceSuccessfulHeartbeats=n.announceSuccessfulHeartbeats||!1,this.useInstanceId=n.useInstanceId||!1,this.useRequestId=n.useRequestId||!1,this.requestMessageCountThreshold=n.requestMessageCountThreshold,this.setTransactionTimeout(n.transactionalRequestTimeout||15e3),this.setSubscribeTimeout(n.subscribeRequestTimeout||31e4),this.setSendBeaconConfig(n.useSendBeacon||!0),this.setPresenceTimeout(n.presenceTimeout||300),null!=n.heartbeatInterval&&this.setHeartbeatInterval(n.heartbeatInterval),this.setUUID(this._decideUUID(n.uuid))}return i(e,[{key:"getAuthKey",value:function(){return this.authKey}},{key:"setAuthKey",value:function(e){return this.authKey=e,this}},{key:"setCipherKey",value:function(e){return this.cipherKey=e,this}},{key:"getUUID",value:function(){return this.UUID}},{key:"setUUID",value:function(e){return this._db&&this._db.set&&this._db.set(this.subscribeKey+"uuid",e),this.UUID=e,this}},{key:"getFilterExpression",value:function(){return this.filterExpression}},{key:"setFilterExpression",value:function(e){return this.filterExpression=e,this}},{key:"getPresenceTimeout",value:function(){return this._presenceTimeout}},{key:"setPresenceTimeout",value:function(e){return this._presenceTimeout=e,this.setHeartbeatInterval(this._presenceTimeout/2-1),this}},{key:"setProxy",value:function(e){this.proxy=e}},{key:"getHeartbeatInterval",value:function(){return this._heartbeatInterval}},{key:"setHeartbeatInterval",value:function(e){return this._heartbeatInterval=e,this}},{key:"getSubscribeTimeout",value:function(){return this._subscribeRequestTimeout}},{key:"setSubscribeTimeout",value:function(e){return this._subscribeRequestTimeout=e,this}},{key:"getTransactionTimeout",value:function(){return this._transactionalRequestTimeout}},{key:"setTransactionTimeout",value:function(e){return this._transactionalRequestTimeout=e,this}},{key:"isSendBeaconEnabled",value:function(){return this._useSendBeacon}},{key:"setSendBeaconConfig",value:function(e){return this._useSendBeacon=e,this}},{key:"getVersion",value:function(){return"4.24.2"}},{key:"_decideUUID",value:function(e){return e||(this._db&&this._db.get&&this._db.get(this.subscribeKey+"uuid")?this._db.get(this.subscribeKey+"uuid"):"pn-"+o.default.createUUID())}}]),e}());t.default=a,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4),i=function(e){return e&&e.__esModule?e:{default:e}}(r);t.default={createUUID:function(){return i.default.uuid?i.default.uuid():(0,i.default)()}},e.exports=t.default},function(e,t,n){var r,i,s;!function(n,o){i=[t],r=o,void 0!==(s="function"==typeof r?r.apply(t,i):r)&&(e.exports=s)}(0,function(e){function t(){var e,t,n="";for(e=0;e<32;e++)t=16*Math.random()|0,8!==e&&12!==e&&16!==e&&20!==e||(n+="-"),n+=(12===e?4:16===e?3&t|8:t).toString(16);return n}function n(e,t){var n=r[t||"all"];return n&&n.test(e)||!1}var r={3:/^[0-9A-F]{8}-[0-9A-F]{4}-3[0-9A-F]{3}-[0-9A-F]{4}-[0-9A-F]{12}$/i,4:/^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,5:/^[0-9A-F]{8}-[0-9A-F]{4}-5[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,all:/^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i};t.isUUID=n,t.VERSION="0.1.0",e.uuid=t,e.isUUID=n})},function(e,t){"use strict";e.exports={}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=n(2),a=(r(o),n(7)),u=r(a),c=function(){function e(t){var n=t.config;i(this,e),this._config=n,this._iv="0123456789012345",this._allowedKeyEncodings=["hex","utf8","base64","binary"],this._allowedKeyLengths=[128,256],this._allowedModes=["ecb","cbc"],this._defaultOptions={encryptKey:!0,keyEncoding:"utf8",keyLength:256,mode:"cbc"}}return s(e,[{key:"HMACSHA256",value:function(e){return u.default.HmacSHA256(e,this._config.secretKey).toString(u.default.enc.Base64)}},{key:"SHA256",value:function(e){return u.default.SHA256(e).toString(u.default.enc.Hex)}},{key:"_parseOptions",value:function(e){var t=e||{};return t.hasOwnProperty("encryptKey")||(t.encryptKey=this._defaultOptions.encryptKey),t.hasOwnProperty("keyEncoding")||(t.keyEncoding=this._defaultOptions.keyEncoding),t.hasOwnProperty("keyLength")||(t.keyLength=this._defaultOptions.keyLength),t.hasOwnProperty("mode")||(t.mode=this._defaultOptions.mode),-1===this._allowedKeyEncodings.indexOf(t.keyEncoding.toLowerCase())&&(t.keyEncoding=this._defaultOptions.keyEncoding),-1===this._allowedKeyLengths.indexOf(parseInt(t.keyLength,10))&&(t.keyLength=this._defaultOptions.keyLength),-1===this._allowedModes.indexOf(t.mode.toLowerCase())&&(t.mode=this._defaultOptions.mode),t}},{key:"_decodeKey",value:function(e,t){return"base64"===t.keyEncoding?u.default.enc.Base64.parse(e):"hex"===t.keyEncoding?u.default.enc.Hex.parse(e):e}},{key:"_getPaddedKey",value:function(e,t){return e=this._decodeKey(e,t),t.encryptKey?u.default.enc.Utf8.parse(this.SHA256(e).slice(0,32)):e}},{key:"_getMode",value:function(e){return"ecb"===e.mode?u.default.mode.ECB:u.default.mode.CBC}},{key:"_getIV",value:function(e){return"cbc"===e.mode?u.default.enc.Utf8.parse(this._iv):null}},{key:"encrypt",value:function(e,t,n){return this._config.customEncrypt?this._config.customEncrypt(e):this.pnEncrypt(e,t,n)}},{key:"decrypt",value:function(e,t,n){return this._config.customDecrypt?this._config.customDecrypt(e):this.pnDecrypt(e,t,n)}},{key:"pnEncrypt",value:function(e,t,n){if(!t&&!this._config.cipherKey)return e;n=this._parseOptions(n);var r=this._getIV(n),i=this._getMode(n),s=this._getPaddedKey(t||this._config.cipherKey,n);return u.default.AES.encrypt(e,s,{iv:r,mode:i}).ciphertext.toString(u.default.enc.Base64)||e}},{key:"pnDecrypt",value:function(e,t,n){if(!t&&!this._config.cipherKey)return e;n=this._parseOptions(n);var r=this._getIV(n),i=this._getMode(n),s=this._getPaddedKey(t||this._config.cipherKey,n);try{var o=u.default.enc.Base64.parse(e),a=u.default.AES.decrypt({ciphertext:o},s,{iv:r,mode:i}).toString(u.default.enc.Utf8);return JSON.parse(a)}catch(e){return null}}}]),e}();t.default=c,e.exports=t.default},function(e,t){"use strict";var n=n||function(e,t){var n={},r=n.lib={},i=function(){},s=r.Base={extend:function(e){i.prototype=this;var t=new i;return e&&t.mixIn(e),t.hasOwnProperty("init")||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},o=r.WordArray=s.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=void 0!=t?t:4*e.length},toString:function(e){return(e||u).stringify(this)},concat:function(e){var t=this.words,n=e.words,r=this.sigBytes;if(e=e.sigBytes,this.clamp(),r%4)for(var i=0;i<e;i++)t[r+i>>>2]|=(n[i>>>2]>>>24-i%4*8&255)<<24-(r+i)%4*8;else if(65535<n.length)for(i=0;i<e;i+=4)t[r+i>>>2]=n[i>>>2];else t.push.apply(t,n);return this.sigBytes+=e,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=s.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var n=[],r=0;r<t;r+=4)n.push(4294967296*e.random()|0);return new o.init(n,t)}}),a=n.enc={},u=a.Hex={stringify:function(e){var t=e.words;e=e.sigBytes;for(var n=[],r=0;r<e;r++){var i=t[r>>>2]>>>24-r%4*8&255;n.push((i>>>4).toString(16)),n.push((15&i).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r+=2)n[r>>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new o.init(n,t/2)}},c=a.Latin1={stringify:function(e){var t=e.words;e=e.sigBytes;for(var n=[],r=0;r<e;r++)n.push(String.fromCharCode(t[r>>>2]>>>24-r%4*8&255));return n.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r++)n[r>>>2]|=(255&e.charCodeAt(r))<<24-r%4*8;return new o.init(n,t)}},l=a.Utf8={stringify:function(e){try{return decodeURIComponent(escape(c.stringify(e)))}catch(e){throw Error("Malformed UTF-8 data")}},parse:function(e){return c.parse(unescape(encodeURIComponent(e)))}},h=r.BufferedBlockAlgorithm=s.extend({reset:function(){this._data=new o.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=l.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n=this._data,r=n.words,i=n.sigBytes,s=this.blockSize,a=i/(4*s),a=t?e.ceil(a):e.max((0|a)-this._minBufferSize,0);if(t=a*s,i=e.min(4*t,i),t){for(var u=0;u<t;u+=s)this._doProcessBlock(r,u);u=r.splice(0,t),n.sigBytes-=i}return new o.init(u,i)},clone:function(){var e=s.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});r.Hasher=h.extend({cfg:s.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){h.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,n){return new e.init(n).finalize(t)}},_createHmacHelper:function(e){return function(t,n){return new f.HMAC.init(e,n).finalize(t)}}});var f=n.algo={};return n}(Math);!function(e){for(var t=n,r=t.lib,i=r.WordArray,s=r.Hasher,r=t.algo,o=[],a=[],u=function(e){return 4294967296*(e-(0|e))|0},c=2,l=0;64>l;){var h;e:{h=c;for(var f=e.sqrt(h),p=2;p<=f;p++)if(!(h%p)){h=!1;break e}h=!0}h&&(8>l&&(o[l]=u(e.pow(c,.5))),a[l]=u(e.pow(c,1/3)),l++),c++}var d=[],r=r.SHA256=s.extend({_doReset:function(){this._hash=new i.init(o.slice(0))},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],i=n[1],s=n[2],o=n[3],u=n[4],c=n[5],l=n[6],h=n[7],f=0;64>f;f++){if(16>f)d[f]=0|e[t+f];else{var p=d[f-15],y=d[f-2];d[f]=((p<<25|p>>>7)^(p<<14|p>>>18)^p>>>3)+d[f-7]+((y<<15|y>>>17)^(y<<13|y>>>19)^y>>>10)+d[f-16]}p=h+((u<<26|u>>>6)^(u<<21|u>>>11)^(u<<7|u>>>25))+(u&c^~u&l)+a[f]+d[f],y=((r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22))+(r&i^r&s^i&s),h=l,l=c,c=u,u=o+p|0,o=s,s=i,i=r,r=p+y|0}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+s|0,n[3]=n[3]+o|0,n[4]=n[4]+u|0,n[5]=n[5]+c|0,n[6]=n[6]+l|0,n[7]=n[7]+h|0},_doFinalize:function(){var t=this._data,n=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;return n[i>>>5]|=128<<24-i%32,n[14+(i+64>>>9<<4)]=e.floor(r/4294967296),n[15+(i+64>>>9<<4)]=r,t.sigBytes=4*n.length,this._process(),this._hash},clone:function(){var e=s.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA256=s._createHelper(r),t.HmacSHA256=s._createHmacHelper(r)}(Math),function(){var e=n,t=e.enc.Utf8;e.algo.HMAC=e.lib.Base.extend({init:function(e,n){e=this._hasher=new e.init,"string"==typeof n&&(n=t.parse(n));var r=e.blockSize,i=4*r;n.sigBytes>i&&(n=e.finalize(n)),n.clamp();for(var s=this._oKey=n.clone(),o=this._iKey=n.clone(),a=s.words,u=o.words,c=0;c<r;c++)a[c]^=1549556828,u[c]^=909522486;s.sigBytes=o.sigBytes=i,this.reset()},reset:function(){var e=this._hasher;e.reset(),e.update(this._iKey)},update:function(e){return this._hasher.update(e),this},finalize:function(e){var t=this._hasher;return e=t.finalize(e),t.reset(),t.finalize(this._oKey.clone().concat(e))}})}(),function(){var e=n,t=e.lib.WordArray;e.enc.Base64={stringify:function(e){var t=e.words,n=e.sigBytes,r=this._map;e.clamp(),e=[];for(var i=0;i<n;i+=3)for(var s=(t[i>>>2]>>>24-i%4*8&255)<<16|(t[i+1>>>2]>>>24-(i+1)%4*8&255)<<8|t[i+2>>>2]>>>24-(i+2)%4*8&255,o=0;4>o&&i+.75*o<n;o++)e.push(r.charAt(s>>>6*(3-o)&63));if(t=r.charAt(64))for(;e.length%4;)e.push(t);return e.join("")},parse:function(e){var n=e.length,r=this._map,i=r.charAt(64);i&&-1!=(i=e.indexOf(i))&&(n=i);for(var i=[],s=0,o=0;o<n;o++)if(o%4){var a=r.indexOf(e.charAt(o-1))<<o%4*2,u=r.indexOf(e.charAt(o))>>>6-o%4*2;i[s>>>2]|=(a|u)<<24-s%4*8,s++}return t.create(i,s)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),function(e){function t(e,t,n,r,i,s,o){return((e=e+(t&n|~t&r)+i+o)<<s|e>>>32-s)+t}function r(e,t,n,r,i,s,o){return((e=e+(t&r|n&~r)+i+o)<<s|e>>>32-s)+t}function i(e,t,n,r,i,s,o){return((e=e+(t^n^r)+i+o)<<s|e>>>32-s)+t}function s(e,t,n,r,i,s,o){return((e=e+(n^(t|~r))+i+o)<<s|e>>>32-s)+t}for(var o=n,a=o.lib,u=a.WordArray,c=a.Hasher,a=o.algo,l=[],h=0;64>h;h++)l[h]=4294967296*e.abs(e.sin(h+1))|0;a=a.MD5=c.extend({_doReset:function(){this._hash=new u.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,n){for(var o=0;16>o;o++){var a=n+o,u=e[a];e[a]=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8)}var o=this._hash.words,a=e[n+0],u=e[n+1],c=e[n+2],h=e[n+3],f=e[n+4],p=e[n+5],d=e[n+6],y=e[n+7],g=e[n+8],b=e[n+9],v=e[n+10],_=e[n+11],m=e[n+12],k=e[n+13],P=e[n+14],O=e[n+15],T=o[0],S=o[1],w=o[2],C=o[3],T=t(T,S,w,C,a,7,l[0]),C=t(C,T,S,w,u,12,l[1]),w=t(w,C,T,S,c,17,l[2]),S=t(S,w,C,T,h,22,l[3]),T=t(T,S,w,C,f,7,l[4]),C=t(C,T,S,w,p,12,l[5]),w=t(w,C,T,S,d,17,l[6]),S=t(S,w,C,T,y,22,l[7]),T=t(T,S,w,C,g,7,l[8]),C=t(C,T,S,w,b,12,l[9]),w=t(w,C,T,S,v,17,l[10]),S=t(S,w,C,T,_,22,l[11]),T=t(T,S,w,C,m,7,l[12]),C=t(C,T,S,w,k,12,l[13]),w=t(w,C,T,S,P,17,l[14]),S=t(S,w,C,T,O,22,l[15]),T=r(T,S,w,C,u,5,l[16]),C=r(C,T,S,w,d,9,l[17]),w=r(w,C,T,S,_,14,l[18]),S=r(S,w,C,T,a,20,l[19]),T=r(T,S,w,C,p,5,l[20]),C=r(C,T,S,w,v,9,l[21]),w=r(w,C,T,S,O,14,l[22]),S=r(S,w,C,T,f,20,l[23]),T=r(T,S,w,C,b,5,l[24]),C=r(C,T,S,w,P,9,l[25]),w=r(w,C,T,S,h,14,l[26]),S=r(S,w,C,T,g,20,l[27]),T=r(T,S,w,C,k,5,l[28]),C=r(C,T,S,w,c,9,l[29]),w=r(w,C,T,S,y,14,l[30]),S=r(S,w,C,T,m,20,l[31]),T=i(T,S,w,C,p,4,l[32]),C=i(C,T,S,w,g,11,l[33]),w=i(w,C,T,S,_,16,l[34]),S=i(S,w,C,T,P,23,l[35]),T=i(T,S,w,C,u,4,l[36]),C=i(C,T,S,w,f,11,l[37]),w=i(w,C,T,S,y,16,l[38]),S=i(S,w,C,T,v,23,l[39]),T=i(T,S,w,C,k,4,l[40]),C=i(C,T,S,w,a,11,l[41]),w=i(w,C,T,S,h,16,l[42]),S=i(S,w,C,T,d,23,l[43]),T=i(T,S,w,C,b,4,l[44]),C=i(C,T,S,w,m,11,l[45]),w=i(w,C,T,S,O,16,l[46]),S=i(S,w,C,T,c,23,l[47]),T=s(T,S,w,C,a,6,l[48]),C=s(C,T,S,w,y,10,l[49]),w=s(w,C,T,S,P,15,l[50]),S=s(S,w,C,T,p,21,l[51]),T=s(T,S,w,C,m,6,l[52]),C=s(C,T,S,w,h,10,l[53]),w=s(w,C,T,S,v,15,l[54]),S=s(S,w,C,T,u,21,l[55]),T=s(T,S,w,C,g,6,l[56]),C=s(C,T,S,w,O,10,l[57]),w=s(w,C,T,S,d,15,l[58]),S=s(S,w,C,T,k,21,l[59]),T=s(T,S,w,C,f,6,l[60]),C=s(C,T,S,w,_,10,l[61]),w=s(w,C,T,S,c,15,l[62]),S=s(S,w,C,T,b,21,l[63]);o[0]=o[0]+T|0,o[1]=o[1]+S|0,o[2]=o[2]+w|0,o[3]=o[3]+C|0},_doFinalize:function(){var t=this._data,n=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;n[i>>>5]|=128<<24-i%32;var s=e.floor(r/4294967296);for(n[15+(i+64>>>9<<4)]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),n[14+(i+64>>>9<<4)]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),t.sigBytes=4*(n.length+1),this._process(),t=this._hash,n=t.words,r=0;4>r;r++)i=n[r],n[r]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8);return t},clone:function(){var e=c.clone.call(this);return e._hash=this._hash.clone(),e}}),o.MD5=c._createHelper(a),o.HmacMD5=c._createHmacHelper(a)}(Math),function(){var e=n,t=e.lib,r=t.Base,i=t.WordArray,t=e.algo,s=t.EvpKDF=r.extend({cfg:r.extend({keySize:4,hasher:t.MD5,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var n=this.cfg,r=n.hasher.create(),s=i.create(),o=s.words,a=n.keySize,n=n.iterations;o.length<a;){u&&r.update(u);var u=r.update(e).finalize(t);r.reset();for(var c=1;c<n;c++)u=r.finalize(u),r.reset();s.concat(u)}return s.sigBytes=4*a,s}});e.EvpKDF=function(e,t,n){return s.create(n).compute(e,t)}}(),n.lib.Cipher||function(e){var t=n,r=t.lib,i=r.Base,s=r.WordArray,o=r.BufferedBlockAlgorithm,a=t.enc.Base64,u=t.algo.EvpKDF,c=r.Cipher=o.extend({cfg:i.extend(),createEncryptor:function(e,t){return this.create(this._ENC_XFORM_MODE,e,t)},createDecryptor:function(e,t){return this.create(this._DEC_XFORM_MODE,e,t)},init:function(e,t,n){this.cfg=this.cfg.extend(n),this._xformMode=e,this._key=t,this.reset()},reset:function(){o.reset.call(this),this._doReset()},process:function(e){return this._append(e),this._process()},finalize:function(e){return e&&this._append(e),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(e){return{encrypt:function(t,n,r){return("string"==typeof n?y:d).encrypt(e,t,n,r)},decrypt:function(t,n,r){return("string"==typeof n?y:d).decrypt(e,t,n,r)}}}});r.StreamCipher=c.extend({_doFinalize:function(){return this._process(!0)},blockSize:1});var l=t.mode={},h=function(e,t,n){var r=this._iv;r?this._iv=void 0:r=this._prevBlock;for(var i=0;i<n;i++)e[t+i]^=r[i]},f=(r.BlockCipherMode=i.extend({createEncryptor:function(e,t){return this.Encryptor.create(e,t)},createDecryptor:function(e,t){return this.Decryptor.create(e,t)},init:function(e,t){this._cipher=e,this._iv=t}})).extend();f.Encryptor=f.extend({processBlock:function(e,t){var n=this._cipher,r=n.blockSize;h.call(this,e,t,r),n.encryptBlock(e,t),this._prevBlock=e.slice(t,t+r)}}),f.Decryptor=f.extend({processBlock:function(e,t){var n=this._cipher,r=n.blockSize,i=e.slice(t,t+r);n.decryptBlock(e,t),h.call(this,e,t,r),this._prevBlock=i}}),l=l.CBC=f,f=(t.pad={}).Pkcs7={pad:function(e,t){for(var n=4*t,n=n-e.sigBytes%n,r=n<<24|n<<16|n<<8|n,i=[],o=0;o<n;o+=4)i.push(r);n=s.create(i,n),e.concat(n)},unpad:function(e){e.sigBytes-=255&e.words[e.sigBytes-1>>>2]}},r.BlockCipher=c.extend({cfg:c.cfg.extend({mode:l,padding:f}),reset:function(){c.reset.call(this);var e=this.cfg,t=e.iv,e=e.mode;if(this._xformMode==this._ENC_XFORM_MODE)var n=e.createEncryptor;else n=e.createDecryptor,this._minBufferSize=1;this._mode=n.call(e,this,t&&t.words)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){e.pad(this._data,this.blockSize);var t=this._process(!0)}else t=this._process(!0),e.unpad(t);return t},blockSize:4});var p=r.CipherParams=i.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}}),l=(t.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext;return e=e.salt,(e?s.create([1398893684,1701076831]).concat(e).concat(t):t).toString(a)},parse:function(e){e=a.parse(e);var t=e.words;if(1398893684==t[0]&&1701076831==t[1]){var n=s.create(t.slice(2,4));t.splice(0,4),e.sigBytes-=16}return p.create({ciphertext:e,salt:n})}},d=r.SerializableCipher=i.extend({cfg:i.extend({format:l}),encrypt:function(e,t,n,r){r=this.cfg.extend(r);var i=e.createEncryptor(n,r);return t=i.finalize(t),i=i.cfg,p.create({ciphertext:t,key:n,iv:i.iv,algorithm:e,mode:i.mode,padding:i.padding,blockSize:e.blockSize,formatter:r.format})},decrypt:function(e,t,n,r){return r=this.cfg.extend(r),t=this._parse(t,r.format),e.createDecryptor(n,r).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),t=(t.kdf={}).OpenSSL={execute:function(e,t,n,r){return r||(r=s.random(8)),e=u.create({keySize:t+n}).compute(e,r),n=s.create(e.words.slice(t),4*n),e.sigBytes=4*t,p.create({key:e,iv:n,salt:r})}},y=r.PasswordBasedCipher=d.extend({cfg:d.cfg.extend({kdf:t}),encrypt:function(e,t,n,r){return r=this.cfg.extend(r),n=r.kdf.execute(n,e.keySize,e.ivSize),r.iv=n.iv,e=d.encrypt.call(this,e,t,n.key,r),e.mixIn(n),e},decrypt:function(e,t,n,r){return r=this.cfg.extend(r),t=this._parse(t,r.format),n=r.kdf.execute(n,e.keySize,e.ivSize,t.salt),r.iv=n.iv,d.decrypt.call(this,e,t,n.key,r)}})}(),function(){for(var e=n,t=e.lib.BlockCipher,r=e.algo,i=[],s=[],o=[],a=[],u=[],c=[],l=[],h=[],f=[],p=[],d=[],y=0;256>y;y++)d[y]=128>y?y<<1:y<<1^283;for(var g=0,b=0,y=0;256>y;y++){var v=b^b<<1^b<<2^b<<3^b<<4,v=v>>>8^255&v^99;i[g]=v,s[v]=g;var _=d[g],m=d[_],k=d[m],P=257*d[v]^16843008*v;o[g]=P<<24|P>>>8,a[g]=P<<16|P>>>16,u[g]=P<<8|P>>>24,c[g]=P,P=16843009*k^65537*m^257*_^16843008*g,l[v]=P<<24|P>>>8,h[v]=P<<16|P>>>16,f[v]=P<<8|P>>>24,p[v]=P,g?(g=_^d[d[d[k^_]]],b^=d[d[b]]):g=b=1}var O=[0,1,2,4,8,16,32,64,128,27,54],r=r.AES=t.extend({_doReset:function(){for(var e=this._key,t=e.words,n=e.sigBytes/4,e=4*((this._nRounds=n+6)+1),r=this._keySchedule=[],s=0;s<e;s++)if(s<n)r[s]=t[s];else{var o=r[s-1];s%n?6<n&&4==s%n&&(o=i[o>>>24]<<24|i[o>>>16&255]<<16|i[o>>>8&255]<<8|i[255&o]):(o=o<<8|o>>>24,o=i[o>>>24]<<24|i[o>>>16&255]<<16|i[o>>>8&255]<<8|i[255&o],o^=O[s/n|0]<<24),r[s]=r[s-n]^o}for(t=this._invKeySchedule=[],n=0;n<e;n++)s=e-n,o=n%4?r[s]:r[s-4],t[n]=4>n||4>=s?o:l[i[o>>>24]]^h[i[o>>>16&255]]^f[i[o>>>8&255]]^p[i[255&o]]},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,o,a,u,c,i)},decryptBlock:function(e,t){var n=e[t+1];e[t+1]=e[t+3],e[t+3]=n,this._doCryptBlock(e,t,this._invKeySchedule,l,h,f,p,s),n=e[t+1],e[t+1]=e[t+3],e[t+3]=n},_doCryptBlock:function(e,t,n,r,i,s,o,a){for(var u=this._nRounds,c=e[t]^n[0],l=e[t+1]^n[1],h=e[t+2]^n[2],f=e[t+3]^n[3],p=4,d=1;d<u;d++)var y=r[c>>>24]^i[l>>>16&255]^s[h>>>8&255]^o[255&f]^n[p++],g=r[l>>>24]^i[h>>>16&255]^s[f>>>8&255]^o[255&c]^n[p++],b=r[h>>>24]^i[f>>>16&255]^s[c>>>8&255]^o[255&l]^n[p++],f=r[f>>>24]^i[c>>>16&255]^s[l>>>8&255]^o[255&h]^n[p++],c=y,l=g,h=b;y=(a[c>>>24]<<24|a[l>>>16&255]<<16|a[h>>>8&255]<<8|a[255&f])^n[p++],g=(a[l>>>24]<<24|a[h>>>16&255]<<16|a[f>>>8&255]<<8|a[255&c])^n[p++],b=(a[h>>>24]<<24|a[f>>>16&255]<<16|a[c>>>8&255]<<8|a[255&l])^n[p++],f=(a[f>>>24]<<24|a[c>>>16&255]<<16|a[l>>>8&255]<<8|a[255&h])^n[p++],e[t]=y,e[t+1]=g,e[t+2]=b,e[t+3]=f},keySize:8});e.AES=t._createHelper(r)}(),n.mode.ECB=function(){var e=n.lib.BlockCipherMode.extend();return e.Encryptor=e.extend({processBlock:function(e,t){this._cipher.encryptBlock(e,t)}}),e.Decryptor=e.extend({processBlock:function(e,t){this._cipher.decryptBlock(e,t)}}),e}(),e.exports=n},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=n(6),a=(r(o),n(2)),u=(r(a),n(9)),c=(r(u),n(11)),l=r(c),h=n(14),f=r(h),p=n(15),d=r(p),y=(n(5),n(10)),g=r(y),b=function(){function e(t){var n=t.subscribeEndpoint,r=t.leaveEndpoint,s=t.heartbeatEndpoint,o=t.setStateEndpoint,a=t.timeEndpoint,u=t.config,c=t.crypto,h=t.listenerManager;i(this,e),this._listenerManager=h,this._config=u,this._leaveEndpoint=r,this._heartbeatEndpoint=s,this._setStateEndpoint=o,this._subscribeEndpoint=n,this._crypto=c,this._channels={},this._presenceChannels={},this._heartbeatChannels={},this._heartbeatChannelGroups={},this._channelGroups={},this._presenceChannelGroups={},this._pendingChannelSubscriptions=[],this._pendingChannelGroupSubscriptions=[],this._currentTimetoken=0,this._lastTimetoken=0,this._storedTimetoken=null,this._subscriptionStatusAnnounced=!1,this._isOnline=!0,this._reconnectionManager=new l.default({timeEndpoint:a}),this._dedupingManager=new f.default({config:u})}return s(e,[{key:"adaptStateChange",value:function(e,t){var n=this,r=e.state,i=e.channels,s=void 0===i?[]:i,o=e.channelGroups,a=void 0===o?[]:o;return s.forEach(function(e){e in n._channels&&(n._channels[e].state=r)}),a.forEach(function(e){e in n._channelGroups&&(n._channelGroups[e].state=r)}),this._setStateEndpoint({state:r,channels:s,channelGroups:a},t)}},{key:"adaptPresenceChange",value:function(e){var t=this,n=e.connected,r=e.channels,i=void 0===r?[]:r,s=e.channelGroups,o=void 0===s?[]:s;n?(i.forEach(function(e){t._heartbeatChannels[e]={state:{}}}),o.forEach(function(e){t._heartbeatChannelGroups[e]={state:{}}})):(i.forEach(function(e){e in t._heartbeatChannels&&delete t._heartbeatChannels[e]}),o.forEach(function(e){e in t._heartbeatChannelGroups&&delete t._heartbeatChannelGroups[e]}),!1===this._config.suppressLeaveEvents&&this._leaveEndpoint({channels:i,channelGroups:o},function(e){t._listenerManager.announceStatus(e)})),this.reconnect()}},{key:"adaptSubscribeChange",value:function(e){var t=this,n=e.timetoken,r=e.channels,i=void 0===r?[]:r,s=e.channelGroups,o=void 0===s?[]:s,a=e.withPresence,u=void 0!==a&&a,c=e.withHeartbeats,l=void 0!==c&&c;if(!this._config.subscribeKey||""===this._config.subscribeKey)return void(console&&console.log&&console.log("subscribe key missing; aborting subscribe"));n&&(this._lastTimetoken=this._currentTimetoken,
|
|
21126
21045
|
this._currentTimetoken=n),"0"!==this._currentTimetoken&&0!==this._currentTimetoken&&(this._storedTimetoken=this._currentTimetoken,this._currentTimetoken=0),i.forEach(function(e){t._channels[e]={state:{}},u&&(t._presenceChannels[e]={}),l&&(t._heartbeatChannels[e]={}),t._pendingChannelSubscriptions.push(e)}),o.forEach(function(e){t._channelGroups[e]={state:{}},u&&(t._presenceChannelGroups[e]={}),l&&(t._heartbeatChannelGroups[e]={}),t._pendingChannelGroupSubscriptions.push(e)}),this._subscriptionStatusAnnounced=!1,this.reconnect()}},{key:"adaptUnsubscribeChange",value:function(e,t){var n=this,r=e.channels,i=void 0===r?[]:r,s=e.channelGroups,o=void 0===s?[]:s,a=[],u=[];i.forEach(function(e){e in n._channels&&(delete n._channels[e],a.push(e),e in n._heartbeatChannels&&delete n._heartbeatChannels[e]),e in n._presenceChannels&&(delete n._presenceChannels[e],a.push(e))}),o.forEach(function(e){e in n._channelGroups&&(delete n._channelGroups[e],u.push(e),e in n._heartbeatChannelGroups&&delete n._heartbeatChannelGroups[e]),e in n._presenceChannelGroups&&(delete n._channelGroups[e],u.push(e))}),0===a.length&&0===u.length||(!1!==this._config.suppressLeaveEvents||t||this._leaveEndpoint({channels:a,channelGroups:u},function(e){e.affectedChannels=a,e.affectedChannelGroups=u,e.currentTimetoken=n._currentTimetoken,e.lastTimetoken=n._lastTimetoken,n._listenerManager.announceStatus(e)}),0===Object.keys(this._channels).length&&0===Object.keys(this._presenceChannels).length&&0===Object.keys(this._channelGroups).length&&0===Object.keys(this._presenceChannelGroups).length&&(this._lastTimetoken=0,this._currentTimetoken=0,this._storedTimetoken=null,this._region=null,this._reconnectionManager.stopPolling()),this.reconnect())}},{key:"unsubscribeAll",value:function(e){this.adaptUnsubscribeChange({channels:this.getSubscribedChannels(),channelGroups:this.getSubscribedChannelGroups()},e)}},{key:"getHeartbeatChannels",value:function(){return Object.keys(this._heartbeatChannels)}},{key:"getHeartbeatChannelGroups",value:function(){return Object.keys(this._heartbeatChannelGroups)}},{key:"getSubscribedChannels",value:function(){return Object.keys(this._channels)}},{key:"getSubscribedChannelGroups",value:function(){return Object.keys(this._channelGroups)}},{key:"reconnect",value:function(){this._startSubscribeLoop(),this._registerHeartbeatTimer()}},{key:"disconnect",value:function(){this._stopSubscribeLoop(),this._stopHeartbeatTimer(),this._reconnectionManager.stopPolling()}},{key:"_registerHeartbeatTimer",value:function(){this._stopHeartbeatTimer(),0!==this._config.getHeartbeatInterval()&&(this._performHeartbeatLoop(),this._heartbeatTimer=setInterval(this._performHeartbeatLoop.bind(this),1e3*this._config.getHeartbeatInterval()))}},{key:"_stopHeartbeatTimer",value:function(){this._heartbeatTimer&&(clearInterval(this._heartbeatTimer),this._heartbeatTimer=null)}},{key:"_performHeartbeatLoop",value:function(){var e=this,t=this.getHeartbeatChannels(),n=this.getHeartbeatChannelGroups(),r={};if(0!==t.length||0!==n.length){this.getSubscribedChannels().forEach(function(t){var n=e._channels[t].state;Object.keys(n).length&&(r[t]=n)}),this.getSubscribedChannelGroups().forEach(function(t){var n=e._channelGroups[t].state;Object.keys(n).length&&(r[t]=n)});var i=function(t){t.error&&e._config.announceFailedHeartbeats&&e._listenerManager.announceStatus(t),t.error&&e._config.autoNetworkDetection&&e._isOnline&&(e._isOnline=!1,e.disconnect(),e._listenerManager.announceNetworkDown(),e.reconnect()),!t.error&&e._config.announceSuccessfulHeartbeats&&e._listenerManager.announceStatus(t)};this._heartbeatEndpoint({channels:t,channelGroups:n,state:r},i.bind(this))}}},{key:"_startSubscribeLoop",value:function(){var e=this;this._stopSubscribeLoop();var t={},n=[],r=[];if(Object.keys(this._channels).forEach(function(r){var i=e._channels[r].state;Object.keys(i).length&&(t[r]=i),n.push(r)}),Object.keys(this._presenceChannels).forEach(function(e){n.push(e+"-pnpres")}),Object.keys(this._channelGroups).forEach(function(n){var i=e._channelGroups[n].state;Object.keys(i).length&&(t[n]=i),r.push(n)}),Object.keys(this._presenceChannelGroups).forEach(function(e){r.push(e+"-pnpres")}),0!==n.length||0!==r.length){var i={channels:n,channelGroups:r,state:t,timetoken:this._currentTimetoken,filterExpression:this._config.filterExpression,region:this._region};this._subscribeCall=this._subscribeEndpoint(i,this._processSubscribeResponse.bind(this))}}},{key:"_processSubscribeResponse",value:function(e,t){var n=this;if(e.error)return void(e.category===g.default.PNTimeoutCategory?this._startSubscribeLoop():e.category===g.default.PNNetworkIssuesCategory?(this.disconnect(),e.error&&this._config.autoNetworkDetection&&this._isOnline&&(this._isOnline=!1,this._listenerManager.announceNetworkDown()),this._reconnectionManager.onReconnection(function(){n._config.autoNetworkDetection&&!n._isOnline&&(n._isOnline=!0,n._listenerManager.announceNetworkUp()),n.reconnect(),n._subscriptionStatusAnnounced=!0;var t={category:g.default.PNReconnectedCategory,operation:e.operation,lastTimetoken:n._lastTimetoken,currentTimetoken:n._currentTimetoken};n._listenerManager.announceStatus(t)}),this._reconnectionManager.startPolling(),this._listenerManager.announceStatus(e)):e.category===g.default.PNBadRequestCategory?(this._stopHeartbeatTimer(),this._listenerManager.announceStatus(e)):this._listenerManager.announceStatus(e));if(this._storedTimetoken?(this._currentTimetoken=this._storedTimetoken,this._storedTimetoken=null):(this._lastTimetoken=this._currentTimetoken,this._currentTimetoken=t.metadata.timetoken),!this._subscriptionStatusAnnounced){var r={};r.category=g.default.PNConnectedCategory,r.operation=e.operation,r.affectedChannels=this._pendingChannelSubscriptions,r.subscribedChannels=this.getSubscribedChannels(),r.affectedChannelGroups=this._pendingChannelGroupSubscriptions,r.lastTimetoken=this._lastTimetoken,r.currentTimetoken=this._currentTimetoken,this._subscriptionStatusAnnounced=!0,this._listenerManager.announceStatus(r),this._pendingChannelSubscriptions=[],this._pendingChannelGroupSubscriptions=[]}var i=t.messages||[],s=this._config,o=s.requestMessageCountThreshold,a=s.dedupeOnSubscribe;if(o&&i.length>=o){var u={};u.category=g.default.PNRequestMessageCountExceededCategory,u.operation=e.operation,this._listenerManager.announceStatus(u)}i.forEach(function(e){var t=e.channel,r=e.subscriptionMatch,i=e.publishMetaData;if(t===r&&(r=null),a){if(n._dedupingManager.isDuplicate(e))return;n._dedupingManager.addEntry(e)}if(d.default.endsWith(e.channel,"-pnpres")){var s={};s.channel=null,s.subscription=null,s.actualChannel=null!=r?t:null,s.subscribedChannel=null!=r?r:t,t&&(s.channel=t.substring(0,t.lastIndexOf("-pnpres"))),r&&(s.subscription=r.substring(0,r.lastIndexOf("-pnpres"))),s.action=e.payload.action,s.state=e.payload.data,s.timetoken=i.publishTimetoken,s.occupancy=e.payload.occupancy,s.uuid=e.payload.uuid,s.timestamp=e.payload.timestamp,e.payload.join&&(s.join=e.payload.join),e.payload.leave&&(s.leave=e.payload.leave),e.payload.timeout&&(s.timeout=e.payload.timeout),n._listenerManager.announcePresence(s)}else{var o={};o.channel=null,o.subscription=null,o.actualChannel=null!=r?t:null,o.subscribedChannel=null!=r?r:t,o.channel=t,o.subscription=r,o.timetoken=i.publishTimetoken,o.publisher=e.issuingClientId,e.userMetadata&&(o.userMetadata=e.userMetadata),n._config.cipherKey?o.message=n._crypto.decrypt(e.payload):o.message=e.payload,n._listenerManager.announceMessage(o)}}),this._region=t.metadata.region,this._startSubscribeLoop()}},{key:"_stopSubscribeLoop",value:function(){this._subscribeCall&&("function"==typeof this._subscribeCall.abort&&this._subscribeCall.abort(),this._subscribeCall=null)}}]),e}();t.default=b,e.exports=t.default},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=(n(5),n(10)),o=function(e){return e&&e.__esModule?e:{default:e}}(s),a=function(){function e(){r(this,e),this._listeners=[]}return i(e,[{key:"addListener",value:function(e){this._listeners.push(e)}},{key:"removeListener",value:function(e){var t=[];this._listeners.forEach(function(n){n!==e&&t.push(n)}),this._listeners=t}},{key:"removeAllListeners",value:function(){this._listeners=[]}},{key:"announcePresence",value:function(e){this._listeners.forEach(function(t){t.presence&&t.presence(e)})}},{key:"announceStatus",value:function(e){this._listeners.forEach(function(t){t.status&&t.status(e)})}},{key:"announceMessage",value:function(e){this._listeners.forEach(function(t){t.message&&t.message(e)})}},{key:"announceNetworkUp",value:function(){var e={};e.category=o.default.PNNetworkUpCategory,this.announceStatus(e)}},{key:"announceNetworkDown",value:function(){var e={};e.category=o.default.PNNetworkDownCategory,this.announceStatus(e)}}]),e}();t.default=a,e.exports=t.default},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={PNNetworkUpCategory:"PNNetworkUpCategory",PNNetworkDownCategory:"PNNetworkDownCategory",PNNetworkIssuesCategory:"PNNetworkIssuesCategory",PNTimeoutCategory:"PNTimeoutCategory",PNBadRequestCategory:"PNBadRequestCategory",PNAccessDeniedCategory:"PNAccessDeniedCategory",PNUnknownCategory:"PNUnknownCategory",PNReconnectedCategory:"PNReconnectedCategory",PNConnectedCategory:"PNConnectedCategory",PNRequestMessageCountExceededCategory:"PNRequestMessageCountExceededCategory"},e.exports=t.default},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(12),o=(function(e){e&&e.__esModule}(s),n(5),function(){function e(t){var n=t.timeEndpoint;r(this,e),this._timeEndpoint=n}return i(e,[{key:"onReconnection",value:function(e){this._reconnectionCallback=e}},{key:"startPolling",value:function(){this._timeTimer=setInterval(this._performTimeLoop.bind(this),3e3)}},{key:"stopPolling",value:function(){clearInterval(this._timeTimer)}},{key:"_performTimeLoop",value:function(){var e=this;this._timeEndpoint(function(t){t.error||(clearInterval(e._timeTimer),e._reconnectionCallback())})}}]),e}());t.default=o,e.exports=t.default},function(e,t,n){"use strict";function r(){return h.default.PNTimeOperation}function i(){return"/time/0"}function s(e){return e.config.getTransactionTimeout()}function o(){return{}}function a(){return!1}function u(e,t){return{timetoken:t[0]}}function c(){}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=r,t.getURL=i,t.getRequestTimeout=s,t.prepareParams=o,t.isAuthSupported=a,t.handleResponse=u,t.validateParams=c;var l=(n(5),n(13)),h=function(e){return e&&e.__esModule?e:{default:e}}(l)},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={PNTimeOperation:"PNTimeOperation",PNHistoryOperation:"PNHistoryOperation",PNDeleteMessagesOperation:"PNDeleteMessagesOperation",PNFetchMessagesOperation:"PNFetchMessagesOperation",PNMessageCounts:"PNMessageCountsOperation",PNSubscribeOperation:"PNSubscribeOperation",PNUnsubscribeOperation:"PNUnsubscribeOperation",PNPublishOperation:"PNPublishOperation",PNPushNotificationEnabledChannelsOperation:"PNPushNotificationEnabledChannelsOperation",PNRemoveAllPushNotificationsOperation:"PNRemoveAllPushNotificationsOperation",PNWhereNowOperation:"PNWhereNowOperation",PNSetStateOperation:"PNSetStateOperation",PNHereNowOperation:"PNHereNowOperation",PNGetStateOperation:"PNGetStateOperation",PNHeartbeatOperation:"PNHeartbeatOperation",PNChannelGroupsOperation:"PNChannelGroupsOperation",PNRemoveGroupOperation:"PNRemoveGroupOperation",PNChannelsForGroupOperation:"PNChannelsForGroupOperation",PNAddChannelsToGroupOperation:"PNAddChannelsToGroupOperation",PNRemoveChannelsFromGroupOperation:"PNRemoveChannelsFromGroupOperation",PNAccessManagerGrant:"PNAccessManagerGrant",PNAccessManagerAudit:"PNAccessManagerAudit"},e.exports=t.default},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(2),o=(function(e){e&&e.__esModule}(s),n(5),function(e){var t=0;if(0===e.length)return t;for(var n=0;n<e.length;n+=1){t=(t<<5)-t+e.charCodeAt(n),t&=t}return t}),a=function(){function e(t){var n=t.config;r(this,e),this.hashHistory=[],this._config=n}return i(e,[{key:"getKey",value:function(e){var t=o(JSON.stringify(e.payload)).toString();return e.publishMetaData.publishTimetoken+"-"+t}},{key:"isDuplicate",value:function(e){return this.hashHistory.includes(this.getKey(e))}},{key:"addEntry",value:function(e){this.hashHistory.length>=this._config.maximumCacheSize&&this.hashHistory.shift(),this.hashHistory.push(this.getKey(e))}},{key:"clearHistory",value:function(){this.hashHistory=[]}}]),e}();t.default=a,e.exports=t.default},function(e,t){"use strict";function n(e){var t=[];return Object.keys(e).forEach(function(e){return t.push(e)}),t}function r(e){return encodeURIComponent(e).replace(/[!~*'()]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}function i(e){return n(e).sort()}function s(e){return i(e).map(function(t){return t+"="+r(e[t])}).join("&")}function o(e,t){return-1!==e.indexOf(t,this.length-t.length)}function a(){var e=void 0,t=void 0;return{promise:new Promise(function(n,r){e=n,t=r}),reject:t,fulfill:e}}e.exports={signPamFromParams:s,endsWith:o,createPromise:a,encodeString:r}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function a(e,t){return e.type=t,e.error=!0,e}function u(e){return a({message:e},"validationError")}function c(e,t,n){return e.usePost&&e.usePost(t,n)?e.postURL(t,n):e.getURL(t,n)}function l(e){if(e.sdkName)return e.sdkName;var t="PubNub-JS-"+e.sdkFamily;return e.partnerId&&(t+="-"+e.partnerId),t+="/"+e.getVersion()}function h(e,t,n){var r=e.config,i=e.crypto;n.timestamp=Math.floor((new Date).getTime()/1e3);var s=r.subscribeKey+"\n"+r.publishKey+"\n"+t+"\n";s+=y.default.signPamFromParams(n);var o=i.HMACSHA256(s);o=o.replace(/\+/g,"-"),o=o.replace(/\//g,"_"),n.signature=o}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=e.networking,r=e.config,i=null,s=null,o={};t.getOperation()===v.default.PNTimeOperation||t.getOperation()===v.default.PNChannelGroupsOperation?i=arguments.length<=2?void 0:arguments[2]:(o=arguments.length<=2?void 0:arguments[2],i=arguments.length<=3?void 0:arguments[3]),"undefined"==typeof Promise||i||(s=y.default.createPromise());var a=t.validateParams(e,o);if(!a){var f=t.prepareParams(e,o),d=c(t,e,o),g=void 0,b={url:d,operation:t.getOperation(),timeout:t.getRequestTimeout(e)};f.uuid=r.UUID,f.pnsdk=l(r),r.useInstanceId&&(f.instanceid=r.instanceId),r.useRequestId&&(f.requestid=p.default.createUUID()),t.isAuthSupported()&&r.getAuthKey()&&(f.auth=r.getAuthKey()),r.secretKey&&h(e,d,f);var m=function(n,r){if(n.error)return void(i?i(n):s&&s.reject(new _("PubNub call failed, check status for details",n)));var a=t.handleResponse(e,r,o);i?i(n,a):s&&s.fulfill(a)};if(t.usePost&&t.usePost(e,o)){var k=t.postPayload(e,o);g=n.POST(f,k,b,m)}else g=t.useDelete&&t.useDelete()?n.DELETE(f,b,m):n.GET(f,b,m);return t.getOperation()===v.default.PNSubscribeOperation?g:s?s.promise:void 0}return i?i(u(a)):s?(s.reject(new _("Validation failed, check status for details",u(a))),s.promise):void 0};var f=n(3),p=r(f),d=(n(5),n(15)),y=r(d),g=n(2),b=(r(g),n(13)),v=r(b),_=function(e){function t(e,n){i(this,t);var r=s(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.name=r.constructor.name,r.status=n,r.message=e,r}return o(t,e),t}(Error);e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(){return f.default.PNAddChannelsToGroupOperation}function s(e,t){var n=t.channels,r=t.channelGroup,i=e.config;return r?n&&0!==n.length?i.subscribeKey?void 0:"Missing Subscribe Key":"Missing Channels":"Missing Channel Group"}function o(e,t){var n=t.channelGroup;return"/v1/channel-registration/sub-key/"+e.config.subscribeKey+"/channel-group/"+d.default.encodeString(n)}function a(e){return e.config.getTransactionTimeout()}function u(){return!0}function c(e,t){var n=t.channels;return{add:(void 0===n?[]:n).join(",")}}function l(){return{}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=i,t.validateParams=s,t.getURL=o,t.getRequestTimeout=a,t.isAuthSupported=u,t.prepareParams=c,t.handleResponse=l;var h=(n(5),n(13)),f=r(h),p=n(15),d=r(p)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(){return f.default.PNRemoveChannelsFromGroupOperation}function s(e,t){var n=t.channels,r=t.channelGroup,i=e.config;return r?n&&0!==n.length?i.subscribeKey?void 0:"Missing Subscribe Key":"Missing Channels":"Missing Channel Group"}function o(e,t){var n=t.channelGroup;return"/v1/channel-registration/sub-key/"+e.config.subscribeKey+"/channel-group/"+d.default.encodeString(n)}function a(e){return e.config.getTransactionTimeout()}function u(){return!0}function c(e,t){var n=t.channels;return{remove:(void 0===n?[]:n).join(",")}}function l(){return{}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=i,t.validateParams=s,t.getURL=o,t.getRequestTimeout=a,t.isAuthSupported=u,t.prepareParams=c,t.handleResponse=l;var h=(n(5),n(13)),f=r(h),p=n(15),d=r(p)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(){return f.default.PNRemoveGroupOperation}function s(e,t){var n=t.channelGroup,r=e.config;return n?r.subscribeKey?void 0:"Missing Subscribe Key":"Missing Channel Group"}function o(e,t){var n=t.channelGroup;return"/v1/channel-registration/sub-key/"+e.config.subscribeKey+"/channel-group/"+d.default.encodeString(n)+"/remove"}function a(){return!0}function u(e){return e.config.getTransactionTimeout()}function c(){return{}}function l(){return{}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=i,t.validateParams=s,t.getURL=o,t.isAuthSupported=a,t.getRequestTimeout=u,t.prepareParams=c,t.handleResponse=l;var h=(n(5),n(13)),f=r(h),p=n(15),d=r(p)},function(e,t,n){"use strict";function r(){return h.default.PNChannelGroupsOperation}function i(e){if(!e.config.subscribeKey)return"Missing Subscribe Key"}function s(e){return"/v1/channel-registration/sub-key/"+e.config.subscribeKey+"/channel-group"}function o(e){return e.config.getTransactionTimeout()}function a(){return!0}function u(){return{}}function c(e,t){return{groups:t.payload.groups}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=r,t.validateParams=i,t.getURL=s,t.getRequestTimeout=o,t.isAuthSupported=a,t.prepareParams=u,t.handleResponse=c;var l=(n(5),n(13)),h=function(e){return e&&e.__esModule?e:{default:e}}(l)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(){return f.default.PNChannelsForGroupOperation}function s(e,t){var n=t.channelGroup,r=e.config;return n?r.subscribeKey?void 0:"Missing Subscribe Key":"Missing Channel Group"}function o(e,t){var n=t.channelGroup;return"/v1/channel-registration/sub-key/"+e.config.subscribeKey+"/channel-group/"+d.default.encodeString(n)}function a(e){return e.config.getTransactionTimeout()}function u(){return!0}function c(){return{}}function l(e,t){return{channels:t.payload.channels}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=i,t.validateParams=s,t.getURL=o,t.getRequestTimeout=a,t.isAuthSupported=u,t.prepareParams=c,t.handleResponse=l;var h=(n(5),n(13)),f=r(h),p=n(15),d=r(p)},function(e,t,n){"use strict";function r(){return h.default.PNPushNotificationEnabledChannelsOperation}function i(e,t){var n=t.device,r=t.pushGateway,i=t.channels,s=e.config;return n?r?i&&0!==i.length?s.subscribeKey?void 0:"Missing Subscribe Key":"Missing Channels":"Missing GW Type (pushGateway: gcm or apns)":"Missing Device ID (device)"}function s(e,t){var n=t.device;return"/v1/push/sub-key/"+e.config.subscribeKey+"/devices/"+n}function o(e){return e.config.getTransactionTimeout()}function a(){return!0}function u(e,t){var n=t.pushGateway,r=t.channels;return{type:n,add:(void 0===r?[]:r).join(",")}}function c(){return{}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=r,t.validateParams=i,t.getURL=s,t.getRequestTimeout=o,t.isAuthSupported=a,t.prepareParams=u,t.handleResponse=c;var l=(n(5),n(13)),h=function(e){return e&&e.__esModule?e:{default:e}}(l)},function(e,t,n){"use strict";function r(){return h.default.PNPushNotificationEnabledChannelsOperation}function i(e,t){var n=t.device,r=t.pushGateway,i=t.channels,s=e.config;return n?r?i&&0!==i.length?s.subscribeKey?void 0:"Missing Subscribe Key":"Missing Channels":"Missing GW Type (pushGateway: gcm or apns)":"Missing Device ID (device)"}function s(e,t){var n=t.device;return"/v1/push/sub-key/"+e.config.subscribeKey+"/devices/"+n}function o(e){return e.config.getTransactionTimeout()}function a(){return!0}function u(e,t){var n=t.pushGateway,r=t.channels;return{type:n,remove:(void 0===r?[]:r).join(",")}}function c(){return{}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=r,t.validateParams=i,t.getURL=s,t.getRequestTimeout=o,t.isAuthSupported=a,t.prepareParams=u,t.handleResponse=c;var l=(n(5),n(13)),h=function(e){return e&&e.__esModule?e:{default:e}}(l)},function(e,t,n){"use strict";function r(){return h.default.PNPushNotificationEnabledChannelsOperation}function i(e,t){var n=t.device,r=t.pushGateway,i=e.config;return n?r?i.subscribeKey?void 0:"Missing Subscribe Key":"Missing GW Type (pushGateway: gcm or apns)":"Missing Device ID (device)"}function s(e,t){var n=t.device;return"/v1/push/sub-key/"+e.config.subscribeKey+"/devices/"+n}function o(e){return e.config.getTransactionTimeout()}function a(){return!0}function u(e,t){return{type:t.pushGateway}}function c(e,t){return{channels:t}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=r,t.validateParams=i,t.getURL=s,t.getRequestTimeout=o,t.isAuthSupported=a,t.prepareParams=u,t.handleResponse=c;var l=(n(5),n(13)),h=function(e){return e&&e.__esModule?e:{default:e}}(l)},function(e,t,n){"use strict";function r(){return h.default.PNRemoveAllPushNotificationsOperation}function i(e,t){var n=t.device,r=t.pushGateway,i=e.config;return n?r?i.subscribeKey?void 0:"Missing Subscribe Key":"Missing GW Type (pushGateway: gcm or apns)":"Missing Device ID (device)"}function s(e,t){var n=t.device;return"/v1/push/sub-key/"+e.config.subscribeKey+"/devices/"+n+"/remove"}function o(e){return e.config.getTransactionTimeout()}function a(){return!0}function u(e,t){return{type:t.pushGateway}}function c(){return{}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=r,t.validateParams=i,t.getURL=s,t.getRequestTimeout=o,t.isAuthSupported=a,t.prepareParams=u,t.handleResponse=c;var l=(n(5),n(13)),h=function(e){return e&&e.__esModule?e:{default:e}}(l)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(){return f.default.PNUnsubscribeOperation}function s(e){if(!e.config.subscribeKey)return"Missing Subscribe Key"}function o(e,t){var n=e.config,r=t.channels,i=void 0===r?[]:r,s=i.length>0?i.join(","):",";return"/v2/presence/sub-key/"+n.subscribeKey+"/channel/"+d.default.encodeString(s)+"/leave"}function a(e){return e.config.getTransactionTimeout()}function u(){return!0}function c(e,t){var n=t.channelGroups,r=void 0===n?[]:n,i={};return r.length>0&&(i["channel-group"]=r.join(",")),i}function l(){return{}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=i,t.validateParams=s,t.getURL=o,t.getRequestTimeout=a,t.isAuthSupported=u,t.prepareParams=c,t.handleResponse=l;var h=(n(5),n(13)),f=r(h),p=n(15),d=r(p)},function(e,t,n){"use strict";function r(){return h.default.PNWhereNowOperation}function i(e){if(!e.config.subscribeKey)return"Missing Subscribe Key"}function s(e,t){var n=e.config,r=t.uuid,i=void 0===r?n.UUID:r;return"/v2/presence/sub-key/"+n.subscribeKey+"/uuid/"+i}function o(e){return e.config.getTransactionTimeout()}function a(){return!0}function u(){return{}}function c(e,t){return t.payload?{channels:t.payload.channels}:{channels:[]}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=r,t.validateParams=i,t.getURL=s,t.getRequestTimeout=o,t.isAuthSupported=a,t.prepareParams=u,t.handleResponse=c;var l=(n(5),n(13)),h=function(e){return e&&e.__esModule?e:{default:e}}(l)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(){return f.default.PNHeartbeatOperation}function s(e){if(!e.config.subscribeKey)return"Missing Subscribe Key"}function o(e,t){var n=e.config,r=t.channels,i=void 0===r?[]:r,s=i.length>0?i.join(","):",";return"/v2/presence/sub-key/"+n.subscribeKey+"/channel/"+d.default.encodeString(s)+"/heartbeat"}function a(){return!0}function u(e){return e.config.getTransactionTimeout()}function c(e,t){var n=t.channelGroups,r=void 0===n?[]:n,i=t.state,s=void 0===i?{}:i,o=e.config,a={};return r.length>0&&(a["channel-group"]=r.join(",")),a.state=JSON.stringify(s),a.heartbeat=o.getPresenceTimeout(),a}function l(){return{}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=i,t.validateParams=s,t.getURL=o,t.isAuthSupported=a,t.getRequestTimeout=u,t.prepareParams=c,t.handleResponse=l;var h=(n(5),n(13)),f=r(h),p=n(15),d=r(p)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(){return f.default.PNGetStateOperation}function s(e){if(!e.config.subscribeKey)return"Missing Subscribe Key"}function o(e,t){var n=e.config,r=t.uuid,i=void 0===r?n.UUID:r,s=t.channels,o=void 0===s?[]:s,a=o.length>0?o.join(","):",";return"/v2/presence/sub-key/"+n.subscribeKey+"/channel/"+d.default.encodeString(a)+"/uuid/"+i}function a(e){return e.config.getTransactionTimeout()}function u(){return!0}function c(e,t){var n=t.channelGroups,r=void 0===n?[]:n,i={};return r.length>0&&(i["channel-group"]=r.join(",")),i}function l(e,t,n){var r=n.channels,i=void 0===r?[]:r,s=n.channelGroups,o=void 0===s?[]:s,a={};return 1===i.length&&0===o.length?a[i[0]]=t.payload:a=t.payload,{channels:a}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=i,t.validateParams=s,t.getURL=o,t.getRequestTimeout=a,t.isAuthSupported=u,t.prepareParams=c,t.handleResponse=l;var h=(n(5),n(13)),f=r(h),p=n(15),d=r(p)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(){return f.default.PNSetStateOperation}function s(e,t){var n=e.config,r=t.state,i=t.channels,s=void 0===i?[]:i,o=t.channelGroups,a=void 0===o?[]:o;return r?n.subscribeKey?0===s.length&&0===a.length?"Please provide a list of channels and/or channel-groups":void 0:"Missing Subscribe Key":"Missing State"}function o(e,t){var n=e.config,r=t.channels,i=void 0===r?[]:r,s=i.length>0?i.join(","):",";return"/v2/presence/sub-key/"+n.subscribeKey+"/channel/"+d.default.encodeString(s)+"/uuid/"+n.UUID+"/data"}function a(e){return e.config.getTransactionTimeout()}function u(){return!0}function c(e,t){var n=t.state,r=t.channelGroups,i=void 0===r?[]:r,s={};return s.state=JSON.stringify(n),i.length>0&&(s["channel-group"]=i.join(",")),s}function l(e,t){return{state:t.payload}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=i,t.validateParams=s,t.getURL=o,t.getRequestTimeout=a,t.isAuthSupported=u,t.prepareParams=c,t.handleResponse=l;var h=(n(5),n(13)),f=r(h),p=n(15),d=r(p)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(){return f.default.PNHereNowOperation}function s(e){if(!e.config.subscribeKey)return"Missing Subscribe Key"}function o(e,t){var n=e.config,r=t.channels,i=void 0===r?[]:r,s=t.channelGroups,o=void 0===s?[]:s,a="/v2/presence/sub-key/"+n.subscribeKey;if(i.length>0||o.length>0){var u=i.length>0?i.join(","):",";a+="/channel/"+d.default.encodeString(u)}return a}function a(e){return e.config.getTransactionTimeout()}function u(){return!0}function c(e,t){var n=t.channelGroups,r=void 0===n?[]:n,i=t.includeUUIDs,s=void 0===i||i,o=t.includeState,a=void 0!==o&&o,u={};return s||(u.disable_uuids=1),a&&(u.state=1),r.length>0&&(u["channel-group"]=r.join(",")),u}function l(e,t,n){var r=n.channels,i=void 0===r?[]:r,s=n.channelGroups,o=void 0===s?[]:s,a=n.includeUUIDs,u=void 0===a||a,c=n.includeState,l=void 0!==c&&c;return i.length>1||o.length>0||0===o.length&&0===i.length?function(){var e={};return e.totalChannels=t.payload.total_channels,e.totalOccupancy=t.payload.total_occupancy,e.channels={},Object.keys(t.payload.channels).forEach(function(n){var r=t.payload.channels[n],i=[];return e.channels[n]={occupants:i,name:n,occupancy:r.occupancy},u&&r.uuids.forEach(function(e){l?i.push({state:e.state,uuid:e.uuid}):i.push({state:null,uuid:e})}),e}),e}():function(){var e={},n=[];return e.totalChannels=1,e.totalOccupancy=t.occupancy,e.channels={},e.channels[i[0]]={occupants:n,name:i[0],occupancy:t.occupancy},u&&t.uuids&&t.uuids.forEach(function(e){l?n.push({state:e.state,uuid:e.uuid}):n.push({state:null,uuid:e})}),e}()}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=i,t.validateParams=s,t.getURL=o,t.getRequestTimeout=a,t.isAuthSupported=u,t.prepareParams=c,t.handleResponse=l;var h=(n(5),n(13)),f=r(h),p=n(15),d=r(p)},function(e,t,n){"use strict";function r(){return h.default.PNAccessManagerAudit}function i(e){if(!e.config.subscribeKey)return"Missing Subscribe Key"}function s(e){return"/v2/auth/audit/sub-key/"+e.config.subscribeKey}function o(e){return e.config.getTransactionTimeout()}function a(){return!1}function u(e,t){var n=t.channel,r=t.channelGroup,i=t.authKeys,s=void 0===i?[]:i,o={};return n&&(o.channel=n),r&&(o["channel-group"]=r),s.length>0&&(o.auth=s.join(",")),o}function c(e,t){return t.payload}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=r,t.validateParams=i,t.getURL=s,t.getRequestTimeout=o,t.isAuthSupported=a,t.prepareParams=u,t.handleResponse=c;var l=(n(5),n(13)),h=function(e){return e&&e.__esModule?e:{default:e}}(l)},function(e,t,n){"use strict";function r(){return h.default.PNAccessManagerGrant}function i(e){var t=e.config;return t.subscribeKey?t.publishKey?t.secretKey?void 0:"Missing Secret Key":"Missing Publish Key":"Missing Subscribe Key"}function s(e){return"/v2/auth/grant/sub-key/"+e.config.subscribeKey}function o(e){return e.config.getTransactionTimeout()}function a(){return!1}function u(e,t){var n=t.channels,r=void 0===n?[]:n,i=t.channelGroups,s=void 0===i?[]:i,o=t.ttl,a=t.read,u=void 0!==a&&a,c=t.write,l=void 0!==c&&c,h=t.manage,f=void 0!==h&&h,p=t.authKeys,d=void 0===p?[]:p,y={};return y.r=u?"1":"0",y.w=l?"1":"0",y.m=f?"1":"0",r.length>0&&(y.channel=r.join(",")),s.length>0&&(y["channel-group"]=s.join(",")),
|
|
21127
21046
|
d.length>0&&(y.auth=d.join(",")),(o||0===o)&&(y.ttl=o),y}function c(){return{}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=r,t.validateParams=i,t.getURL=s,t.getRequestTimeout=o,t.isAuthSupported=a,t.prepareParams=u,t.handleResponse=c;var l=(n(5),n(13)),h=function(e){return e&&e.__esModule?e:{default:e}}(l)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){var n=e.crypto,r=e.config,i=JSON.stringify(t);return r.cipherKey&&(i=n.encrypt(i),i=JSON.stringify(i)),i}function s(){return b.default.PNPublishOperation}function o(e,t){var n=e.config,r=t.message;return t.channel?r?n.subscribeKey?void 0:"Missing Subscribe Key":"Missing Message":"Missing Channel"}function a(e,t){var n=t.sendByPost;return void 0!==n&&n}function u(e,t){var n=e.config,r=t.channel,s=t.message,o=i(e,s);return"/publish/"+n.publishKey+"/"+n.subscribeKey+"/0/"+_.default.encodeString(r)+"/0/"+_.default.encodeString(o)}function c(e,t){var n=e.config,r=t.channel;return"/publish/"+n.publishKey+"/"+n.subscribeKey+"/0/"+_.default.encodeString(r)+"/0"}function l(e){return e.config.getTransactionTimeout()}function h(){return!0}function f(e,t){return i(e,t.message)}function p(e,t){var n=t.meta,r=t.replicate,i=void 0===r||r,s=t.storeInHistory,o=t.ttl,a={};return null!=s&&(a.store=s?"1":"0"),o&&(a.ttl=o),!1===i&&(a.norep="true"),n&&"object"===(void 0===n?"undefined":y(n))&&(a.meta=JSON.stringify(n)),a}function d(e,t){return{timetoken:t[2]}}Object.defineProperty(t,"__esModule",{value:!0});var y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.getOperation=s,t.validateParams=o,t.usePost=a,t.getURL=u,t.postURL=c,t.getRequestTimeout=l,t.isAuthSupported=h,t.postPayload=f,t.prepareParams=p,t.handleResponse=d;var g=(n(5),n(13)),b=r(g),v=n(15),_=r(v)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){var n=e.config,r=e.crypto;if(!n.cipherKey)return t;try{return r.decrypt(t)}catch(e){return t}}function s(){return p.default.PNHistoryOperation}function o(e,t){var n=t.channel,r=e.config;return n?r.subscribeKey?void 0:"Missing Subscribe Key":"Missing channel"}function a(e,t){var n=t.channel;return"/v2/history/sub-key/"+e.config.subscribeKey+"/channel/"+y.default.encodeString(n)}function u(e){return e.config.getTransactionTimeout()}function c(){return!0}function l(e,t){var n=t.start,r=t.end,i=t.reverse,s=t.count,o=void 0===s?100:s,a=t.stringifiedTimeToken,u=void 0!==a&&a,c={include_token:"true"};return c.count=o,n&&(c.start=n),r&&(c.end=r),u&&(c.string_message_token="true"),null!=i&&(c.reverse=i.toString()),c}function h(e,t){var n={messages:[],startTimeToken:t[1],endTimeToken:t[2]};return t[0].forEach(function(t){var r={timetoken:t.timetoken,entry:i(e,t.message)};n.messages.push(r)}),n}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=s,t.validateParams=o,t.getURL=a,t.getRequestTimeout=u,t.isAuthSupported=c,t.prepareParams=l,t.handleResponse=h;var f=(n(5),n(13)),p=r(f),d=n(15),y=r(d)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(){return p.default.PNDeleteMessagesOperation}function s(e,t){var n=t.channel,r=e.config;return n?r.subscribeKey?void 0:"Missing Subscribe Key":"Missing channel"}function o(){return!0}function a(e,t){var n=t.channel;return"/v3/history/sub-key/"+e.config.subscribeKey+"/channel/"+y.default.encodeString(n)}function u(e){return e.config.getTransactionTimeout()}function c(){return!0}function l(e,t){var n=t.start,r=t.end,i={};return n&&(i.start=n),r&&(i.end=r),i}function h(e,t){return t.payload}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=i,t.validateParams=s,t.useDelete=o,t.getURL=a,t.getRequestTimeout=u,t.isAuthSupported=c,t.prepareParams=l,t.handleResponse=h;var f=(n(5),n(13)),p=r(f),d=n(15),y=r(d)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(){return p.default.PNMessageCounts}function s(e,t){var n=t.channels,r=t.timetoken,i=t.channelTimetokens,s=e.config;return n?r&&i?"timetoken and channelTimetokens are incompatible together":r&&i&&i.length>1&&n.length!==i.length?"Length of channelTimetokens and channels do not match":s.subscribeKey?void 0:"Missing Subscribe Key":"Missing channel"}function o(e,t){var n=t.channels,r=e.config,i=n.join(",");return"/v3/history/sub-key/"+r.subscribeKey+"/message-counts/"+y.default.encodeString(i)}function a(e){return e.config.getTransactionTimeout()}function u(){return!0}function c(e,t){var n=t.timetoken,r=t.channelTimetokens,i={};if(r&&1===r.length){var s=h(r,1),o=s[0];i.timetoken=o}else r?i.channelsTimetoken=r.join(","):n&&(i.timetoken=n);return i}function l(e,t){return{channels:t.channels}}Object.defineProperty(t,"__esModule",{value:!0});var h=function(){function e(e,t){var n=[],r=!0,i=!1,s=void 0;try{for(var o,a=e[Symbol.iterator]();!(r=(o=a.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,s=e}finally{try{!r&&a.return&&a.return()}finally{if(i)throw s}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();t.getOperation=i,t.validateParams=s,t.getURL=o,t.getRequestTimeout=a,t.isAuthSupported=u,t.prepareParams=c,t.handleResponse=l;var f=n(13),p=r(f),d=n(15),y=r(d)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){var n=e.config,r=e.crypto;if(!n.cipherKey)return t;try{return r.decrypt(t)}catch(e){return t}}function s(){return p.default.PNFetchMessagesOperation}function o(e,t){var n=t.channels,r=e.config;return n&&0!==n.length?r.subscribeKey?void 0:"Missing Subscribe Key":"Missing channels"}function a(e,t){var n=t.channels,r=void 0===n?[]:n,i=e.config,s=r.length>0?r.join(","):",";return"/v3/history/sub-key/"+i.subscribeKey+"/channel/"+y.default.encodeString(s)}function u(e){return e.config.getTransactionTimeout()}function c(){return!0}function l(e,t){var n=t.start,r=t.end,i=t.count,s=t.stringifiedTimeToken,o=void 0!==s&&s,a={};return i&&(a.max=i),n&&(a.start=n),r&&(a.end=r),o&&(a.string_message_token="true"),a}function h(e,t){var n={channels:{}};return Object.keys(t.channels||{}).forEach(function(r){n.channels[r]=[],(t.channels[r]||[]).forEach(function(t){var s={};s.channel=r,s.subscription=null,s.timetoken=t.timetoken,s.message=i(e,t.message),n.channels[r].push(s)})}),n}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=s,t.validateParams=o,t.getURL=a,t.getRequestTimeout=u,t.isAuthSupported=c,t.prepareParams=l,t.handleResponse=h;var f=(n(5),n(13)),p=r(f),d=n(15),y=r(d)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(){return f.default.PNSubscribeOperation}function s(e){if(!e.config.subscribeKey)return"Missing Subscribe Key"}function o(e,t){var n=e.config,r=t.channels,i=void 0===r?[]:r,s=i.length>0?i.join(","):",";return"/v2/subscribe/"+n.subscribeKey+"/"+d.default.encodeString(s)+"/0"}function a(e){return e.config.getSubscribeTimeout()}function u(){return!0}function c(e,t){var n=e.config,r=t.state,i=t.channelGroups,s=void 0===i?[]:i,o=t.timetoken,a=t.filterExpression,u=t.region,c={heartbeat:n.getPresenceTimeout()};return s.length>0&&(c["channel-group"]=s.join(",")),a&&a.length>0&&(c["filter-expr"]=a),Object.keys(r).length&&(c.state=JSON.stringify(r)),o&&(c.tt=o),u&&(c.tr=u),c}function l(e,t){var n=[];t.m.forEach(function(e){var t={publishTimetoken:e.p.t,region:e.p.r},r={shard:parseInt(e.a,10),subscriptionMatch:e.b,channel:e.c,payload:e.d,flags:e.f,issuingClientId:e.i,subscribeKey:e.k,originationTimetoken:e.o,userMetadata:e.u,publishMetaData:t};n.push(r)});var r={timetoken:t.t.t,region:t.t.r};return{messages:n,metadata:r}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=i,t.validateParams=s,t.getURL=o,t.getRequestTimeout=a,t.isAuthSupported=u,t.prepareParams=c,t.handleResponse=l;var h=(n(5),n(13)),f=r(h),p=n(15),d=r(p)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=n(2),a=(r(o),n(10)),u=r(a),c=(n(5),function(){function e(t){var n=this;i(this,e),this._modules={},Object.keys(t).forEach(function(e){n._modules[e]=t[e].bind(n)})}return s(e,[{key:"init",value:function(e){this._config=e,this._maxSubDomain=20,this._currentSubDomain=Math.floor(Math.random()*this._maxSubDomain),this._providedFQDN=(this._config.secure?"https://":"http://")+this._config.origin,this._coreParams={},this.shiftStandardOrigin()}},{key:"nextOrigin",value:function(){if(-1===this._providedFQDN.indexOf("ps."))return this._providedFQDN;var e=void 0;return this._currentSubDomain=this._currentSubDomain+1,this._currentSubDomain>=this._maxSubDomain&&(this._currentSubDomain=1),e=this._currentSubDomain.toString(),this._providedFQDN.replace("ps.","ps"+e+".")}},{key:"hasModule",value:function(e){return e in this._modules}},{key:"shiftStandardOrigin",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this._standardOrigin=this.nextOrigin(e),this._standardOrigin}},{key:"getStandardOrigin",value:function(){return this._standardOrigin}},{key:"POST",value:function(e,t,n,r){return this._modules.post(e,t,n,r)}},{key:"GET",value:function(e,t,n){return this._modules.get(e,t,n)}},{key:"DELETE",value:function(e,t,n){return this._modules.del(e,t,n)}},{key:"_detectErrorCategory",value:function(e){if("ENOTFOUND"===e.code)return u.default.PNNetworkIssuesCategory;if("ECONNREFUSED"===e.code)return u.default.PNNetworkIssuesCategory;if("ECONNRESET"===e.code)return u.default.PNNetworkIssuesCategory;if("EAI_AGAIN"===e.code)return u.default.PNNetworkIssuesCategory;if(0===e.status||e.hasOwnProperty("status")&&void 0===e.status)return u.default.PNNetworkIssuesCategory;if(e.timeout)return u.default.PNTimeoutCategory;if("ETIMEDOUT"===e.code)return u.default.PNNetworkIssuesCategory;if(e.response){if(e.response.badRequest)return u.default.PNBadRequestCategory;if(e.response.forbidden)return u.default.PNAccessDeniedCategory}return u.default.PNUnknownCategory}}]),e}());t.default=c,e.exports=t.default},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={get:function(e){try{return localStorage.getItem(e)}catch(e){return null}},set:function(e,t){try{return localStorage.setItem(e,t)}catch(e){return null}}},e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=(new Date).getTime(),n=(new Date).toISOString(),r=function(){return console&&console.log?console:window&&window.console&&window.console.log?window.console:console}();r.log("<<<<<"),r.log("["+n+"]","\n",e.url,"\n",e.qs),r.log("-----"),e.on("response",function(n){var i=(new Date).getTime(),s=i-t,o=(new Date).toISOString();r.log(">>>>>>"),r.log("["+o+" / "+s+"]","\n",e.url,"\n",e.qs,"\n",n.text),r.log("-----")})}function i(e,t,n){var i=this;return this._config.logVerbosity&&(e=e.use(r)),this._config.proxy&&this._modules.proxy&&(e=this._modules.proxy.call(this,e)),this._config.keepAlive&&this._modules.keepAlive&&(e=this._modules.keepAlive(e)),e.timeout(t.timeout).end(function(e,r){var s=void 0,o={};if(o.error=null!==e,o.operation=t.operation,r&&r.status&&(o.statusCode=r.status),e){if(e.response&&e.response.text&&!i._config.logVerbosity)try{o.errorData=JSON.parse(e.response.text)}catch(t){o.errorData=e}else o.errorData=e;return o.category=i._detectErrorCategory(e),n(o,null)}try{s=JSON.parse(r.text)}catch(e){return o.errorData=r,o.error=!0,n(o,null)}return s.error&&1===s.error&&s.status&&s.message&&s.service?(o.errorData=s,o.statusCode=s.status,o.error=!0,o.category=i._detectErrorCategory(o),n(o,null)):n(o,s)})}function s(e,t,n){var r=c.default.get(this.getStandardOrigin()+t.url).query(e);return i.call(this,r,t,n)}function o(e,t,n,r){var s=c.default.post(this.getStandardOrigin()+n.url).query(e).send(t);return i.call(this,s,n,r)}function a(e,t,n){var r=c.default.delete(this.getStandardOrigin()+t.url).query(e);return i.call(this,r,t,n)}Object.defineProperty(t,"__esModule",{value:!0}),t.get=s,t.post=o,t.del=a;var u=n(43),c=function(e){return e&&e.__esModule?e:{default:e}}(u);n(5)},function(e,t,n){function r(){}function i(e){if(!y(e))return e;var t=[];for(var n in e)s(t,n,e[n]);return t.join("&")}function s(e,t,n){if(null!=n)if(Array.isArray(n))n.forEach(function(n){s(e,t,n)});else if(y(n))for(var r in n)s(e,t+"["+r+"]",n[r]);else e.push(encodeURIComponent(t)+"="+encodeURIComponent(n));else null===n&&e.push(encodeURIComponent(t))}function o(e){for(var t,n,r={},i=e.split("&"),s=0,o=i.length;s<o;++s)t=i[s],n=t.indexOf("="),-1==n?r[decodeURIComponent(t)]="":r[decodeURIComponent(t.slice(0,n))]=decodeURIComponent(t.slice(n+1));return r}function a(e){for(var t,n,r,i,s=e.split(/\r?\n/),o={},a=0,u=s.length;a<u;++a)n=s[a],-1!==(t=n.indexOf(":"))&&(r=n.slice(0,t).toLowerCase(),i=_(n.slice(t+1)),o[r]=i);return o}function u(e){return/[\/+]json($|[^-\w])/.test(e)}function c(e){this.req=e,this.xhr=this.req.xhr,this.text="HEAD"!=this.req.method&&(""===this.xhr.responseType||"text"===this.xhr.responseType)||void 0===this.xhr.responseType?this.xhr.responseText:null,this.statusText=this.req.xhr.statusText;var t=this.xhr.status;1223===t&&(t=204),this._setStatusProperties(t),this.header=this.headers=a(this.xhr.getAllResponseHeaders()),this.header["content-type"]=this.xhr.getResponseHeader("content-type"),this._setHeaderProperties(this.header),null===this.text&&e._responseType?this.body=this.xhr.response:this.body="HEAD"!=this.req.method?this._parseBody(this.text?this.text:this.xhr.response):null}function l(e,t){var n=this;this._query=this._query||[],this.method=e,this.url=t,this.header={},this._header={},this.on("end",function(){var e=null,t=null;try{t=new c(n)}catch(t){return e=new Error("Parser is unable to parse the response"),e.parse=!0,e.original=t,n.xhr?(e.rawResponse=void 0===n.xhr.responseType?n.xhr.responseText:n.xhr.response,e.status=n.xhr.status?n.xhr.status:null,e.statusCode=e.status):(e.rawResponse=null,e.status=null),n.callback(e)}n.emit("response",t);var r;try{n._isResponseOK(t)||(r=new Error(t.statusText||"Unsuccessful HTTP response"))}catch(e){r=e}r?(r.original=e,r.response=t,r.status=t.status,n.callback(r,t)):n.callback(null,t)})}function h(e,t,n){var r=v("DELETE",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r}var f;"undefined"!=typeof window?f=window:"undefined"!=typeof self?f=self:(console.warn("Using browser-only version of superagent in non-browser environment"),f=this);var p=n(44),d=n(45),y=n(46),g=n(47),b=n(49),v=t=e.exports=function(e,n){return"function"==typeof n?new t.Request("GET",e).end(n):1==arguments.length?new t.Request("GET",e):new t.Request(e,n)};t.Request=l,v.getXHR=function(){if(!(!f.XMLHttpRequest||f.location&&"file:"==f.location.protocol&&f.ActiveXObject))return new XMLHttpRequest;try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(e){}throw Error("Browser-only version of superagent could not find XHR")};var _="".trim?function(e){return e.trim()}:function(e){return e.replace(/(^\s*|\s*$)/g,"")};v.serializeObject=i,v.parseString=o,v.types={html:"text/html",json:"application/json",xml:"text/xml",urlencoded:"application/x-www-form-urlencoded",form:"application/x-www-form-urlencoded","form-data":"application/x-www-form-urlencoded"},v.serialize={"application/x-www-form-urlencoded":i,"application/json":JSON.stringify},v.parse={"application/x-www-form-urlencoded":o,"application/json":JSON.parse},g(c.prototype),c.prototype._parseBody=function(e){var t=v.parse[this.type];return this.req._parser?this.req._parser(this,e):(!t&&u(this.type)&&(t=v.parse["application/json"]),t&&e&&(e.length||e instanceof Object)?t(e):null)},c.prototype.toError=function(){var e=this.req,t=e.method,n=e.url,r="cannot "+t+" "+n+" ("+this.status+")",i=new Error(r);return i.status=this.status,i.method=t,i.url=n,i},v.Response=c,p(l.prototype),d(l.prototype),l.prototype.type=function(e){return this.set("Content-Type",v.types[e]||e),this},l.prototype.accept=function(e){return this.set("Accept",v.types[e]||e),this},l.prototype.auth=function(e,t,n){1===arguments.length&&(t=""),"object"==typeof t&&null!==t&&(n=t,t=""),n||(n={type:"function"==typeof btoa?"basic":"auto"});var r=function(e){if("function"==typeof btoa)return btoa(e);throw new Error("Cannot use basic auth, btoa is not a function")};return this._auth(e,t,n,r)},l.prototype.query=function(e){return"string"!=typeof e&&(e=i(e)),e&&this._query.push(e),this},l.prototype.attach=function(e,t,n){if(t){if(this._data)throw Error("superagent can't mix .send() and .attach()");this._getFormData().append(e,t,n||t.name)}return this},l.prototype._getFormData=function(){return this._formData||(this._formData=new f.FormData),this._formData},l.prototype.callback=function(e,t){if(this._shouldRetry(e,t))return this._retry();var n=this._callback;this.clearTimeout(),e&&(this._maxRetries&&(e.retries=this._retries-1),this.emit("error",e)),n(e,t)},l.prototype.crossDomainError=function(){var e=new Error("Request has been terminated\nPossible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.");e.crossDomain=!0,e.status=this.status,e.method=this.method,e.url=this.url,this.callback(e)},l.prototype.buffer=l.prototype.ca=l.prototype.agent=function(){return console.warn("This is not supported in browser version of superagent"),this},l.prototype.pipe=l.prototype.write=function(){throw Error("Streaming is not supported in browser version of superagent")},l.prototype._isHost=function(e){return e&&"object"==typeof e&&!Array.isArray(e)&&"[object Object]"!==Object.prototype.toString.call(e)},l.prototype.end=function(e){return this._endCalled&&console.warn("Warning: .end() was called twice. This is not supported in superagent"),this._endCalled=!0,this._callback=e||r,this._finalizeQueryString(),this._end()},l.prototype._end=function(){var e=this,t=this.xhr=v.getXHR(),n=this._formData||this._data;this._setTimeouts(),t.onreadystatechange=function(){var n=t.readyState;if(n>=2&&e._responseTimeoutTimer&&clearTimeout(e._responseTimeoutTimer),4==n){var r;try{r=t.status}catch(e){r=0}if(!r){if(e.timedout||e._aborted)return;return e.crossDomainError()}e.emit("end")}};var r=function(t,n){n.total>0&&(n.percent=n.loaded/n.total*100),n.direction=t,e.emit("progress",n)};if(this.hasListeners("progress"))try{t.onprogress=r.bind(null,"download"),t.upload&&(t.upload.onprogress=r.bind(null,"upload"))}catch(e){}try{this.username&&this.password?t.open(this.method,this.url,!0,this.username,this.password):t.open(this.method,this.url,!0)}catch(e){return this.callback(e)}if(this._withCredentials&&(t.withCredentials=!0),!this._formData&&"GET"!=this.method&&"HEAD"!=this.method&&"string"!=typeof n&&!this._isHost(n)){var i=this._header["content-type"],s=this._serializer||v.serialize[i?i.split(";")[0]:""];!s&&u(i)&&(s=v.serialize["application/json"]),s&&(n=s(n))}for(var o in this.header)null!=this.header[o]&&this.header.hasOwnProperty(o)&&t.setRequestHeader(o,this.header[o]);return this._responseType&&(t.responseType=this._responseType),this.emit("request",this),t.send(void 0!==n?n:null),this},v.agent=function(){return new b},["GET","POST","OPTIONS","PATCH","PUT","DELETE"].forEach(function(e){b.prototype[e.toLowerCase()]=function(t,n){var r=new v.Request(e,t);return this._setDefaults(r),n&&r.end(n),r}}),b.prototype.del=b.prototype.delete,v.get=function(e,t,n){var r=v("GET",e);return"function"==typeof t&&(n=t,t=null),t&&r.query(t),n&&r.end(n),r},v.head=function(e,t,n){var r=v("HEAD",e);return"function"==typeof t&&(n=t,t=null),t&&r.query(t),n&&r.end(n),r},v.options=function(e,t,n){var r=v("OPTIONS",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r},v.del=h,v.delete=h,v.patch=function(e,t,n){var r=v("PATCH",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r},v.post=function(e,t,n){var r=v("POST",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r},v.put=function(e,t,n){var r=v("PUT",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r}},function(e,t,n){function r(e){if(e)return i(e)}function i(e){for(var t in r.prototype)e[t]=r.prototype[t];return e}e.exports=r,r.prototype.on=r.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},r.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},r.prototype.off=r.prototype.removeListener=r.prototype.removeAllListeners=r.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var r,i=0;i<n.length;i++)if((r=n[i])===t||r.fn===t){n.splice(i,1);break}return this},r.prototype.emit=function(e){this._callbacks=this._callbacks||{};var t=[].slice.call(arguments,1),n=this._callbacks["$"+e];if(n){n=n.slice(0);for(var r=0,i=n.length;r<i;++r)n[r].apply(this,t)}return this},r.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},r.prototype.hasListeners=function(e){return!!this.listeners(e).length}},function(e,t,n){"use strict";function r(e){if(e)return i(e)}function i(e){for(var t in r.prototype)e[t]=r.prototype[t];return e}var s=n(46);e.exports=r,r.prototype.clearTimeout=function(){return clearTimeout(this._timer),clearTimeout(this._responseTimeoutTimer),delete this._timer,delete this._responseTimeoutTimer,this},r.prototype.parse=function(e){return this._parser=e,this},r.prototype.responseType=function(e){return this._responseType=e,this},r.prototype.serialize=function(e){return this._serializer=e,this},r.prototype.timeout=function(e){if(!e||"object"!=typeof e)return this._timeout=e,this._responseTimeout=0,this;for(var t in e)switch(t){case"deadline":this._timeout=e.deadline;break;case"response":this._responseTimeout=e.response;break;default:console.warn("Unknown timeout option",t)}return this},r.prototype.retry=function(e,t){return 0!==arguments.length&&!0!==e||(e=1),e<=0&&(e=0),this._maxRetries=e,this._retries=0,this._retryCallback=t,this};var o=["ECONNRESET","ETIMEDOUT","EADDRINFO","ESOCKETTIMEDOUT"];r.prototype._shouldRetry=function(e,t){if(!this._maxRetries||this._retries++>=this._maxRetries)return!1;if(this._retryCallback)try{var n=this._retryCallback(e,t);if(!0===n)return!0;if(!1===n)return!1}catch(e){console.error(e)}if(t&&t.status&&t.status>=500&&501!=t.status)return!0;if(e){if(e.code&&~o.indexOf(e.code))return!0;if(e.timeout&&"ECONNABORTED"==e.code)return!0;if(e.crossDomain)return!0}return!1},r.prototype._retry=function(){return this.clearTimeout(),this.req&&(this.req=null,this.req=this.request()),this._aborted=!1,this.timedout=!1,this._end()},r.prototype.then=function(e,t){if(!this._fullfilledPromise){var n=this;this._endCalled&&console.warn("Warning: superagent request was sent twice, because both .end() and .then() were called. Never call .end() if you use promises"),this._fullfilledPromise=new Promise(function(e,t){n.end(function(n,r){n?t(n):e(r)})})}return this._fullfilledPromise.then(e,t)},r.prototype.catch=function(e){return this.then(void 0,e)},r.prototype.use=function(e){return e(this),this},r.prototype.ok=function(e){if("function"!=typeof e)throw Error("Callback required");return this._okCallback=e,this},r.prototype._isResponseOK=function(e){return!!e&&(this._okCallback?this._okCallback(e):e.status>=200&&e.status<300)},r.prototype.get=function(e){return this._header[e.toLowerCase()]},r.prototype.getHeader=r.prototype.get,r.prototype.set=function(e,t){if(s(e)){for(var n in e)this.set(n,e[n]);return this}return this._header[e.toLowerCase()]=t,this.header[e]=t,this},r.prototype.unset=function(e){return delete this._header[e.toLowerCase()],delete this.header[e],this},r.prototype.field=function(e,t){if(null===e||void 0===e)throw new Error(".field(name, val) name can not be empty");if(this._data&&console.error(".field() can't be used if .send() is used. Please use only .send() or only .field() & .attach()"),s(e)){for(var n in e)this.field(n,e[n]);return this}if(Array.isArray(t)){for(var r in t)this.field(e,t[r]);return this}if(null===t||void 0===t)throw new Error(".field(name, val) val can not be empty");return"boolean"==typeof t&&(t=""+t),this._getFormData().append(e,t),this},r.prototype.abort=function(){return this._aborted?this:(this._aborted=!0,this.xhr&&this.xhr.abort(),this.req&&this.req.abort(),this.clearTimeout(),this.emit("abort"),this)},r.prototype._auth=function(e,t,n,r){switch(n.type){case"basic":this.set("Authorization","Basic "+r(e+":"+t));break;case"auto":this.username=e,this.password=t;break;case"bearer":this.set("Authorization","Bearer "+e)}return this},r.prototype.withCredentials=function(e){return void 0==e&&(e=!0),this._withCredentials=e,this},r.prototype.redirects=function(e){return this._maxRedirects=e,this},r.prototype.maxResponseSize=function(e){if("number"!=typeof e)throw TypeError("Invalid argument");return this._maxResponseSize=e,this},r.prototype.toJSON=function(){return{method:this.method,url:this.url,data:this._data,headers:this._header}},r.prototype.send=function(e){var t=s(e),n=this._header["content-type"];if(this._formData&&console.error(".send() can't be used if .attach() or .field() is used. Please use only .send() or only .field() & .attach()"),t&&!this._data)Array.isArray(e)?this._data=[]:this._isHost(e)||(this._data={});else if(e&&this._data&&this._isHost(this._data))throw Error("Can't merge these send calls");if(t&&s(this._data))for(var r in e)this._data[r]=e[r];else"string"==typeof e?(n||this.type("form"),n=this._header["content-type"],this._data="application/x-www-form-urlencoded"==n?this._data?this._data+"&"+e:e:(this._data||"")+e):this._data=e;return!t||this._isHost(e)?this:(n||this.type("json"),this)},r.prototype.sortQuery=function(e){return this._sort=void 0===e||e,this},r.prototype._finalizeQueryString=function(){var e=this._query.join("&");if(e&&(this.url+=(this.url.indexOf("?")>=0?"&":"?")+e),this._query.length=0,this._sort){var t=this.url.indexOf("?");if(t>=0){var n=this.url.substring(t+1).split("&");"function"==typeof this._sort?n.sort(this._sort):n.sort(),this.url=this.url.substring(0,t)+"?"+n.join("&")}}},r.prototype._appendQueryString=function(){console.trace("Unsupported")},r.prototype._timeoutError=function(e,t,n){if(!this._aborted){var r=new Error(e+t+"ms exceeded");r.timeout=t,r.code="ECONNABORTED",r.errno=n,this.timedout=!0,this.abort(),this.callback(r)}},r.prototype._setTimeouts=function(){var e=this;this._timeout&&!this._timer&&(this._timer=setTimeout(function(){e._timeoutError("Timeout of ",e._timeout,"ETIME")},this._timeout)),this._responseTimeout&&!this._responseTimeoutTimer&&(this._responseTimeoutTimer=setTimeout(function(){e._timeoutError("Response timeout of ",e._responseTimeout,"ETIMEDOUT")},this._responseTimeout))}},function(e,t){"use strict";function n(e){return null!==e&&"object"==typeof e}e.exports=n},function(e,t,n){"use strict";function r(e){if(e)return i(e)}function i(e){for(var t in r.prototype)e[t]=r.prototype[t];return e}var s=n(48);e.exports=r,r.prototype.get=function(e){return this.header[e.toLowerCase()]},r.prototype._setHeaderProperties=function(e){var t=e["content-type"]||"";this.type=s.type(t);var n=s.params(t);for(var r in n)this[r]=n[r];this.links={};try{e.link&&(this.links=s.parseLinks(e.link))}catch(e){}},r.prototype._setStatusProperties=function(e){var t=e/100|0;this.status=this.statusCode=e,this.statusType=t,this.info=1==t,this.ok=2==t,this.redirect=3==t,this.clientError=4==t,this.serverError=5==t,this.error=(4==t||5==t)&&this.toError(),this.created=201==e,this.accepted=202==e,this.noContent=204==e,this.badRequest=400==e,this.unauthorized=401==e,this.notAcceptable=406==e,this.forbidden=403==e,this.notFound=404==e,this.unprocessableEntity=422==e}},function(e,t){"use strict";t.type=function(e){return e.split(/ *; */).shift()},t.params=function(e){return e.split(/ *; */).reduce(function(e,t){var n=t.split(/ *= */),r=n.shift(),i=n.shift();return r&&i&&(e[r]=i),e},{})},t.parseLinks=function(e){return e.split(/ *, */).reduce(function(e,t){var n=t.split(/ *; */),r=n[0].slice(1,-1);return e[n[1].split(/ *= */)[1].slice(1,-1)]=r,e},{})},t.cleanHeader=function(e,t){return delete e["content-type"],delete e["content-length"],delete e["transfer-encoding"],delete e.host,t&&(delete e.authorization,delete e.cookie),e}},function(e,t){function n(){this._defaults=[]}["use","on","once","set","query","type","accept","auth","withCredentials","sortQuery","retry","ok","redirects","timeout","buffer","serialize","parse","ca","key","pfx","cert"].forEach(function(e){n.prototype[e]=function(){return this._defaults.push({fn:e,arguments:arguments}),this}}),n.prototype._setDefaults=function(e){this._defaults.forEach(function(t){e[t.fn].apply(e,t.arguments)})},e.exports=n}])});
|
|
21128
|
-
},{}],
|
|
21047
|
+
},{}],89:[function(require,module,exports){
|
|
21129
21048
|
(function (global){
|
|
21130
21049
|
/*! https://mths.be/punycode v1.4.1 by @mathias */
|
|
21131
21050
|
;(function(root) {
|
|
@@ -21662,7 +21581,7 @@ d.length>0&&(y.auth=d.join(",")),(o||0===o)&&(y.ttl=o),y}function c(){return{}}O
|
|
|
21662
21581
|
}(this));
|
|
21663
21582
|
|
|
21664
21583
|
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
|
21665
|
-
},{}],
|
|
21584
|
+
},{}],90:[function(require,module,exports){
|
|
21666
21585
|
(function (process){
|
|
21667
21586
|
// vim:ts=4:sts=4:sw=4:
|
|
21668
21587
|
/*!
|
|
@@ -23714,7 +23633,7 @@ return Q;
|
|
|
23714
23633
|
});
|
|
23715
23634
|
|
|
23716
23635
|
}).call(this,require('_process'))
|
|
23717
|
-
},{"_process":
|
|
23636
|
+
},{"_process":87}],91:[function(require,module,exports){
|
|
23718
23637
|
// Copyright Joyent, Inc. and other Node contributors.
|
|
23719
23638
|
//
|
|
23720
23639
|
// Permission is hereby granted, free of charge, to any person obtaining a
|
|
@@ -23800,7 +23719,7 @@ var isArray = Array.isArray || function (xs) {
|
|
|
23800
23719
|
return Object.prototype.toString.call(xs) === '[object Array]';
|
|
23801
23720
|
};
|
|
23802
23721
|
|
|
23803
|
-
},{}],
|
|
23722
|
+
},{}],92:[function(require,module,exports){
|
|
23804
23723
|
// Copyright Joyent, Inc. and other Node contributors.
|
|
23805
23724
|
//
|
|
23806
23725
|
// Permission is hereby granted, free of charge, to any person obtaining a
|
|
@@ -23887,16 +23806,16 @@ var objectKeys = Object.keys || function (obj) {
|
|
|
23887
23806
|
return res;
|
|
23888
23807
|
};
|
|
23889
23808
|
|
|
23890
|
-
},{}],
|
|
23809
|
+
},{}],93:[function(require,module,exports){
|
|
23891
23810
|
'use strict';
|
|
23892
23811
|
|
|
23893
23812
|
exports.decode = exports.parse = require('./decode');
|
|
23894
23813
|
exports.encode = exports.stringify = require('./encode');
|
|
23895
23814
|
|
|
23896
|
-
},{"./decode":
|
|
23815
|
+
},{"./decode":91,"./encode":92}],94:[function(require,module,exports){
|
|
23897
23816
|
module.exports = require('./lib/_stream_duplex.js');
|
|
23898
23817
|
|
|
23899
|
-
},{"./lib/_stream_duplex.js":
|
|
23818
|
+
},{"./lib/_stream_duplex.js":95}],95:[function(require,module,exports){
|
|
23900
23819
|
// Copyright Joyent, Inc. and other Node contributors.
|
|
23901
23820
|
//
|
|
23902
23821
|
// Permission is hereby granted, free of charge, to any person obtaining a
|
|
@@ -23942,7 +23861,7 @@ var objectKeys = Object.keys || function (obj) {
|
|
|
23942
23861
|
module.exports = Duplex;
|
|
23943
23862
|
|
|
23944
23863
|
/*<replacement>*/
|
|
23945
|
-
var util = require('core-util-is');
|
|
23864
|
+
var util = Object.create(require('core-util-is'));
|
|
23946
23865
|
util.inherits = require('inherits');
|
|
23947
23866
|
/*</replacement>*/
|
|
23948
23867
|
|
|
@@ -24028,7 +23947,7 @@ Duplex.prototype._destroy = function (err, cb) {
|
|
|
24028
23947
|
|
|
24029
23948
|
pna.nextTick(cb, err);
|
|
24030
23949
|
};
|
|
24031
|
-
},{"./_stream_readable":
|
|
23950
|
+
},{"./_stream_readable":97,"./_stream_writable":99,"core-util-is":48,"inherits":76,"process-nextick-args":86}],96:[function(require,module,exports){
|
|
24032
23951
|
// Copyright Joyent, Inc. and other Node contributors.
|
|
24033
23952
|
//
|
|
24034
23953
|
// Permission is hereby granted, free of charge, to any person obtaining a
|
|
@@ -24061,7 +23980,7 @@ module.exports = PassThrough;
|
|
|
24061
23980
|
var Transform = require('./_stream_transform');
|
|
24062
23981
|
|
|
24063
23982
|
/*<replacement>*/
|
|
24064
|
-
var util = require('core-util-is');
|
|
23983
|
+
var util = Object.create(require('core-util-is'));
|
|
24065
23984
|
util.inherits = require('inherits');
|
|
24066
23985
|
/*</replacement>*/
|
|
24067
23986
|
|
|
@@ -24076,7 +23995,7 @@ function PassThrough(options) {
|
|
|
24076
23995
|
PassThrough.prototype._transform = function (chunk, encoding, cb) {
|
|
24077
23996
|
cb(null, chunk);
|
|
24078
23997
|
};
|
|
24079
|
-
},{"./_stream_transform":
|
|
23998
|
+
},{"./_stream_transform":98,"core-util-is":48,"inherits":76}],97:[function(require,module,exports){
|
|
24080
23999
|
(function (process,global){
|
|
24081
24000
|
// Copyright Joyent, Inc. and other Node contributors.
|
|
24082
24001
|
//
|
|
@@ -24144,7 +24063,7 @@ function _isUint8Array(obj) {
|
|
|
24144
24063
|
/*</replacement>*/
|
|
24145
24064
|
|
|
24146
24065
|
/*<replacement>*/
|
|
24147
|
-
var util = require('core-util-is');
|
|
24066
|
+
var util = Object.create(require('core-util-is'));
|
|
24148
24067
|
util.inherits = require('inherits');
|
|
24149
24068
|
/*</replacement>*/
|
|
24150
24069
|
|
|
@@ -25098,7 +25017,7 @@ function indexOf(xs, x) {
|
|
|
25098
25017
|
return -1;
|
|
25099
25018
|
}
|
|
25100
25019
|
}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
|
25101
|
-
},{"./_stream_duplex":
|
|
25020
|
+
},{"./_stream_duplex":95,"./internal/streams/BufferList":100,"./internal/streams/destroy":101,"./internal/streams/stream":102,"_process":87,"core-util-is":48,"events":67,"inherits":76,"isarray":77,"process-nextick-args":86,"safe-buffer":108,"string_decoder/":132,"util":43}],98:[function(require,module,exports){
|
|
25102
25021
|
// Copyright Joyent, Inc. and other Node contributors.
|
|
25103
25022
|
//
|
|
25104
25023
|
// Permission is hereby granted, free of charge, to any person obtaining a
|
|
@@ -25169,7 +25088,7 @@ module.exports = Transform;
|
|
|
25169
25088
|
var Duplex = require('./_stream_duplex');
|
|
25170
25089
|
|
|
25171
25090
|
/*<replacement>*/
|
|
25172
|
-
var util = require('core-util-is');
|
|
25091
|
+
var util = Object.create(require('core-util-is'));
|
|
25173
25092
|
util.inherits = require('inherits');
|
|
25174
25093
|
/*</replacement>*/
|
|
25175
25094
|
|
|
@@ -25313,7 +25232,7 @@ function done(stream, er, data) {
|
|
|
25313
25232
|
|
|
25314
25233
|
return stream.push(null);
|
|
25315
25234
|
}
|
|
25316
|
-
},{"./_stream_duplex":
|
|
25235
|
+
},{"./_stream_duplex":95,"core-util-is":48,"inherits":76}],99:[function(require,module,exports){
|
|
25317
25236
|
(function (process,global){
|
|
25318
25237
|
// Copyright Joyent, Inc. and other Node contributors.
|
|
25319
25238
|
//
|
|
@@ -25381,7 +25300,7 @@ var Duplex;
|
|
|
25381
25300
|
Writable.WritableState = WritableState;
|
|
25382
25301
|
|
|
25383
25302
|
/*<replacement>*/
|
|
25384
|
-
var util = require('core-util-is');
|
|
25303
|
+
var util = Object.create(require('core-util-is'));
|
|
25385
25304
|
util.inherits = require('inherits');
|
|
25386
25305
|
/*</replacement>*/
|
|
25387
25306
|
|
|
@@ -26003,7 +25922,7 @@ Writable.prototype._destroy = function (err, cb) {
|
|
|
26003
25922
|
cb(err);
|
|
26004
25923
|
};
|
|
26005
25924
|
}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
|
26006
|
-
},{"./_stream_duplex":
|
|
25925
|
+
},{"./_stream_duplex":95,"./internal/streams/destroy":101,"./internal/streams/stream":102,"_process":87,"core-util-is":48,"inherits":76,"process-nextick-args":86,"safe-buffer":108,"util-deprecate":140}],100:[function(require,module,exports){
|
|
26007
25926
|
'use strict';
|
|
26008
25927
|
|
|
26009
25928
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
@@ -26083,7 +26002,7 @@ if (util && util.inspect && util.inspect.custom) {
|
|
|
26083
26002
|
return this.constructor.name + ' ' + obj;
|
|
26084
26003
|
};
|
|
26085
26004
|
}
|
|
26086
|
-
},{"safe-buffer":
|
|
26005
|
+
},{"safe-buffer":108,"util":43}],101:[function(require,module,exports){
|
|
26087
26006
|
'use strict';
|
|
26088
26007
|
|
|
26089
26008
|
/*<replacement>*/
|
|
@@ -26158,13 +26077,13 @@ module.exports = {
|
|
|
26158
26077
|
destroy: destroy,
|
|
26159
26078
|
undestroy: undestroy
|
|
26160
26079
|
};
|
|
26161
|
-
},{"process-nextick-args":
|
|
26080
|
+
},{"process-nextick-args":86}],102:[function(require,module,exports){
|
|
26162
26081
|
module.exports = require('events').EventEmitter;
|
|
26163
26082
|
|
|
26164
|
-
},{"events":
|
|
26083
|
+
},{"events":67}],103:[function(require,module,exports){
|
|
26165
26084
|
module.exports = require('./readable').PassThrough
|
|
26166
26085
|
|
|
26167
|
-
},{"./readable":
|
|
26086
|
+
},{"./readable":104}],104:[function(require,module,exports){
|
|
26168
26087
|
exports = module.exports = require('./lib/_stream_readable.js');
|
|
26169
26088
|
exports.Stream = exports;
|
|
26170
26089
|
exports.Readable = exports;
|
|
@@ -26173,13 +26092,13 @@ exports.Duplex = require('./lib/_stream_duplex.js');
|
|
|
26173
26092
|
exports.Transform = require('./lib/_stream_transform.js');
|
|
26174
26093
|
exports.PassThrough = require('./lib/_stream_passthrough.js');
|
|
26175
26094
|
|
|
26176
|
-
},{"./lib/_stream_duplex.js":
|
|
26095
|
+
},{"./lib/_stream_duplex.js":95,"./lib/_stream_passthrough.js":96,"./lib/_stream_readable.js":97,"./lib/_stream_transform.js":98,"./lib/_stream_writable.js":99}],105:[function(require,module,exports){
|
|
26177
26096
|
module.exports = require('./readable').Transform
|
|
26178
26097
|
|
|
26179
|
-
},{"./readable":
|
|
26098
|
+
},{"./readable":104}],106:[function(require,module,exports){
|
|
26180
26099
|
module.exports = require('./lib/_stream_writable.js');
|
|
26181
26100
|
|
|
26182
|
-
},{"./lib/_stream_writable.js":
|
|
26101
|
+
},{"./lib/_stream_writable.js":99}],107:[function(require,module,exports){
|
|
26183
26102
|
|
|
26184
26103
|
/**
|
|
26185
26104
|
* Reduce `arr` with `fn`.
|
|
@@ -26204,7 +26123,7 @@ module.exports = function(arr, fn, initial){
|
|
|
26204
26123
|
|
|
26205
26124
|
return curr;
|
|
26206
26125
|
};
|
|
26207
|
-
},{}],
|
|
26126
|
+
},{}],108:[function(require,module,exports){
|
|
26208
26127
|
/* eslint-disable node/no-deprecated-api */
|
|
26209
26128
|
var buffer = require('buffer')
|
|
26210
26129
|
var Buffer = buffer.Buffer
|
|
@@ -26268,7 +26187,7 @@ SafeBuffer.allocUnsafeSlow = function (size) {
|
|
|
26268
26187
|
return buffer.SlowBuffer(size)
|
|
26269
26188
|
}
|
|
26270
26189
|
|
|
26271
|
-
},{"buffer":44}],
|
|
26190
|
+
},{"buffer":44}],109:[function(require,module,exports){
|
|
26272
26191
|
|
|
26273
26192
|
/**
|
|
26274
26193
|
* Module dependencies.
|
|
@@ -26362,7 +26281,7 @@ exports.connect = lookup;
|
|
|
26362
26281
|
exports.Manager = require('./manager');
|
|
26363
26282
|
exports.Socket = require('./socket');
|
|
26364
26283
|
|
|
26365
|
-
},{"./manager":
|
|
26284
|
+
},{"./manager":110,"./socket":112,"./url":113,"debug":115,"socket.io-parser":119}],110:[function(require,module,exports){
|
|
26366
26285
|
|
|
26367
26286
|
/**
|
|
26368
26287
|
* Module dependencies.
|
|
@@ -26921,7 +26840,7 @@ Manager.prototype.onreconnect = function(){
|
|
|
26921
26840
|
this.emitAll('reconnect', attempt);
|
|
26922
26841
|
};
|
|
26923
26842
|
|
|
26924
|
-
},{"./on":
|
|
26843
|
+
},{"./on":111,"./socket":112,"backo2":39,"component-bind":46,"component-emitter":114,"debug":115,"engine.io-client":49,"indexof":75,"socket.io-parser":119}],111:[function(require,module,exports){
|
|
26925
26844
|
|
|
26926
26845
|
/**
|
|
26927
26846
|
* Module exports.
|
|
@@ -26947,7 +26866,7 @@ function on(obj, ev, fn) {
|
|
|
26947
26866
|
};
|
|
26948
26867
|
}
|
|
26949
26868
|
|
|
26950
|
-
},{}],
|
|
26869
|
+
},{}],112:[function(require,module,exports){
|
|
26951
26870
|
|
|
26952
26871
|
/**
|
|
26953
26872
|
* Module dependencies.
|
|
@@ -27361,7 +27280,7 @@ Socket.prototype.compress = function(compress){
|
|
|
27361
27280
|
return this;
|
|
27362
27281
|
};
|
|
27363
27282
|
|
|
27364
|
-
},{"./on":
|
|
27283
|
+
},{"./on":111,"component-bind":46,"component-emitter":114,"debug":115,"has-binary":70,"socket.io-parser":119,"to-array":136}],113:[function(require,module,exports){
|
|
27365
27284
|
(function (global){
|
|
27366
27285
|
|
|
27367
27286
|
/**
|
|
@@ -27441,7 +27360,7 @@ function url(uri, loc){
|
|
|
27441
27360
|
}
|
|
27442
27361
|
|
|
27443
27362
|
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
|
27444
|
-
},{"debug":
|
|
27363
|
+
},{"debug":115,"parseuri":85}],114:[function(require,module,exports){
|
|
27445
27364
|
|
|
27446
27365
|
/**
|
|
27447
27366
|
* Expose `Emitter`.
|
|
@@ -27604,13 +27523,13 @@ Emitter.prototype.hasListeners = function(event){
|
|
|
27604
27523
|
return !! this.listeners(event).length;
|
|
27605
27524
|
};
|
|
27606
27525
|
|
|
27607
|
-
},{}],
|
|
27526
|
+
},{}],115:[function(require,module,exports){
|
|
27527
|
+
arguments[4][60][0].apply(exports,arguments)
|
|
27528
|
+
},{"./debug":116,"dup":60}],116:[function(require,module,exports){
|
|
27608
27529
|
arguments[4][61][0].apply(exports,arguments)
|
|
27609
|
-
},{"
|
|
27530
|
+
},{"dup":61,"ms":117}],117:[function(require,module,exports){
|
|
27610
27531
|
arguments[4][62][0].apply(exports,arguments)
|
|
27611
|
-
},{"dup":62
|
|
27612
|
-
arguments[4][63][0].apply(exports,arguments)
|
|
27613
|
-
},{"dup":63}],120:[function(require,module,exports){
|
|
27532
|
+
},{"dup":62}],118:[function(require,module,exports){
|
|
27614
27533
|
(function (global){
|
|
27615
27534
|
/*global Blob,File*/
|
|
27616
27535
|
|
|
@@ -27755,7 +27674,7 @@ exports.removeBlobs = function(data, callback) {
|
|
|
27755
27674
|
};
|
|
27756
27675
|
|
|
27757
27676
|
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
|
27758
|
-
},{"./is-buffer":
|
|
27677
|
+
},{"./is-buffer":120,"isarray":124}],119:[function(require,module,exports){
|
|
27759
27678
|
|
|
27760
27679
|
/**
|
|
27761
27680
|
* Module dependencies.
|
|
@@ -28157,7 +28076,7 @@ function error(data){
|
|
|
28157
28076
|
};
|
|
28158
28077
|
}
|
|
28159
28078
|
|
|
28160
|
-
},{"./binary":
|
|
28079
|
+
},{"./binary":118,"./is-buffer":120,"component-emitter":121,"debug":122,"isarray":124,"json3":78}],120:[function(require,module,exports){
|
|
28161
28080
|
(function (global){
|
|
28162
28081
|
|
|
28163
28082
|
module.exports = isBuf;
|
|
@@ -28174,17 +28093,17 @@ function isBuf(obj) {
|
|
|
28174
28093
|
}
|
|
28175
28094
|
|
|
28176
28095
|
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
|
28177
|
-
},{}],
|
|
28096
|
+
},{}],121:[function(require,module,exports){
|
|
28097
|
+
arguments[4][59][0].apply(exports,arguments)
|
|
28098
|
+
},{"dup":59}],122:[function(require,module,exports){
|
|
28178
28099
|
arguments[4][60][0].apply(exports,arguments)
|
|
28179
|
-
},{"dup":60}],
|
|
28100
|
+
},{"./debug":123,"dup":60}],123:[function(require,module,exports){
|
|
28180
28101
|
arguments[4][61][0].apply(exports,arguments)
|
|
28181
|
-
},{"
|
|
28102
|
+
},{"dup":61,"ms":125}],124:[function(require,module,exports){
|
|
28103
|
+
arguments[4][66][0].apply(exports,arguments)
|
|
28104
|
+
},{"dup":66}],125:[function(require,module,exports){
|
|
28182
28105
|
arguments[4][62][0].apply(exports,arguments)
|
|
28183
|
-
},{"dup":62
|
|
28184
|
-
arguments[4][67][0].apply(exports,arguments)
|
|
28185
|
-
},{"dup":67}],127:[function(require,module,exports){
|
|
28186
|
-
arguments[4][63][0].apply(exports,arguments)
|
|
28187
|
-
},{"dup":63}],128:[function(require,module,exports){
|
|
28106
|
+
},{"dup":62}],126:[function(require,module,exports){
|
|
28188
28107
|
// Copyright Joyent, Inc. and other Node contributors.
|
|
28189
28108
|
//
|
|
28190
28109
|
// Permission is hereby granted, free of charge, to any person obtaining a
|
|
@@ -28313,7 +28232,7 @@ Stream.prototype.pipe = function(dest, options) {
|
|
|
28313
28232
|
return dest;
|
|
28314
28233
|
};
|
|
28315
28234
|
|
|
28316
|
-
},{"events":
|
|
28235
|
+
},{"events":67,"inherits":76,"readable-stream/duplex.js":94,"readable-stream/passthrough.js":103,"readable-stream/readable.js":104,"readable-stream/transform.js":105,"readable-stream/writable.js":106}],127:[function(require,module,exports){
|
|
28317
28236
|
var ClientRequest = require('./lib/request')
|
|
28318
28237
|
var extend = require('xtend')
|
|
28319
28238
|
var statusCodes = require('builtin-status-codes')
|
|
@@ -28388,7 +28307,7 @@ http.METHODS = [
|
|
|
28388
28307
|
'UNLOCK',
|
|
28389
28308
|
'UNSUBSCRIBE'
|
|
28390
28309
|
]
|
|
28391
|
-
},{"./lib/request":
|
|
28310
|
+
},{"./lib/request":129,"builtin-status-codes":45,"url":138,"xtend":143}],128:[function(require,module,exports){
|
|
28392
28311
|
(function (global){
|
|
28393
28312
|
exports.fetch = isFunction(global.fetch) && isFunction(global.ReadableByteStream)
|
|
28394
28313
|
|
|
@@ -28432,7 +28351,7 @@ function isFunction (value) {
|
|
|
28432
28351
|
xhr = null // Help gc
|
|
28433
28352
|
|
|
28434
28353
|
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
|
28435
|
-
},{}],
|
|
28354
|
+
},{}],129:[function(require,module,exports){
|
|
28436
28355
|
(function (process,global,Buffer){
|
|
28437
28356
|
// var Base64 = require('Base64')
|
|
28438
28357
|
var capability = require('./capability')
|
|
@@ -28714,7 +28633,7 @@ var unsafeHeaders = [
|
|
|
28714
28633
|
]
|
|
28715
28634
|
|
|
28716
28635
|
}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {},require("buffer").Buffer)
|
|
28717
|
-
},{"./capability":
|
|
28636
|
+
},{"./capability":128,"./response":130,"_process":87,"buffer":44,"foreach":69,"indexof":75,"inherits":76,"object-keys":80,"stream":126}],130:[function(require,module,exports){
|
|
28718
28637
|
(function (process,global,Buffer){
|
|
28719
28638
|
var capability = require('./capability')
|
|
28720
28639
|
var foreach = require('foreach')
|
|
@@ -28891,7 +28810,7 @@ IncomingMessage.prototype._onXHRProgress = function () {
|
|
|
28891
28810
|
}
|
|
28892
28811
|
|
|
28893
28812
|
}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {},require("buffer").Buffer)
|
|
28894
|
-
},{"./capability":
|
|
28813
|
+
},{"./capability":128,"_process":87,"buffer":44,"foreach":69,"inherits":76,"stream":126}],131:[function(require,module,exports){
|
|
28895
28814
|
var nargs = /\{([0-9a-zA-Z_]+)\}/g
|
|
28896
28815
|
|
|
28897
28816
|
module.exports = template
|
|
@@ -28929,7 +28848,7 @@ function template(string) {
|
|
|
28929
28848
|
})
|
|
28930
28849
|
}
|
|
28931
28850
|
|
|
28932
|
-
},{}],
|
|
28851
|
+
},{}],132:[function(require,module,exports){
|
|
28933
28852
|
// Copyright Joyent, Inc. and other Node contributors.
|
|
28934
28853
|
//
|
|
28935
28854
|
// Permission is hereby granted, free of charge, to any person obtaining a
|
|
@@ -29226,7 +29145,7 @@ function simpleWrite(buf) {
|
|
|
29226
29145
|
function simpleEnd(buf) {
|
|
29227
29146
|
return buf && buf.length ? this.write(buf) : '';
|
|
29228
29147
|
}
|
|
29229
|
-
},{"safe-buffer":
|
|
29148
|
+
},{"safe-buffer":108}],133:[function(require,module,exports){
|
|
29230
29149
|
/**
|
|
29231
29150
|
* Module dependencies.
|
|
29232
29151
|
*/
|
|
@@ -30419,7 +30338,172 @@ request.put = function(url, data, fn){
|
|
|
30419
30338
|
|
|
30420
30339
|
module.exports = request;
|
|
30421
30340
|
|
|
30422
|
-
},{"emitter":
|
|
30341
|
+
},{"emitter":134,"reduce":107}],134:[function(require,module,exports){
|
|
30342
|
+
|
|
30343
|
+
/**
|
|
30344
|
+
* Expose `Emitter`.
|
|
30345
|
+
*/
|
|
30346
|
+
|
|
30347
|
+
if (typeof module !== 'undefined') {
|
|
30348
|
+
module.exports = Emitter;
|
|
30349
|
+
}
|
|
30350
|
+
|
|
30351
|
+
/**
|
|
30352
|
+
* Initialize a new `Emitter`.
|
|
30353
|
+
*
|
|
30354
|
+
* @api public
|
|
30355
|
+
*/
|
|
30356
|
+
|
|
30357
|
+
function Emitter(obj) {
|
|
30358
|
+
if (obj) return mixin(obj);
|
|
30359
|
+
};
|
|
30360
|
+
|
|
30361
|
+
/**
|
|
30362
|
+
* Mixin the emitter properties.
|
|
30363
|
+
*
|
|
30364
|
+
* @param {Object} obj
|
|
30365
|
+
* @return {Object}
|
|
30366
|
+
* @api private
|
|
30367
|
+
*/
|
|
30368
|
+
|
|
30369
|
+
function mixin(obj) {
|
|
30370
|
+
for (var key in Emitter.prototype) {
|
|
30371
|
+
obj[key] = Emitter.prototype[key];
|
|
30372
|
+
}
|
|
30373
|
+
return obj;
|
|
30374
|
+
}
|
|
30375
|
+
|
|
30376
|
+
/**
|
|
30377
|
+
* Listen on the given `event` with `fn`.
|
|
30378
|
+
*
|
|
30379
|
+
* @param {String} event
|
|
30380
|
+
* @param {Function} fn
|
|
30381
|
+
* @return {Emitter}
|
|
30382
|
+
* @api public
|
|
30383
|
+
*/
|
|
30384
|
+
|
|
30385
|
+
Emitter.prototype.on =
|
|
30386
|
+
Emitter.prototype.addEventListener = function(event, fn){
|
|
30387
|
+
this._callbacks = this._callbacks || {};
|
|
30388
|
+
(this._callbacks['$' + event] = this._callbacks['$' + event] || [])
|
|
30389
|
+
.push(fn);
|
|
30390
|
+
return this;
|
|
30391
|
+
};
|
|
30392
|
+
|
|
30393
|
+
/**
|
|
30394
|
+
* Adds an `event` listener that will be invoked a single
|
|
30395
|
+
* time then automatically removed.
|
|
30396
|
+
*
|
|
30397
|
+
* @param {String} event
|
|
30398
|
+
* @param {Function} fn
|
|
30399
|
+
* @return {Emitter}
|
|
30400
|
+
* @api public
|
|
30401
|
+
*/
|
|
30402
|
+
|
|
30403
|
+
Emitter.prototype.once = function(event, fn){
|
|
30404
|
+
function on() {
|
|
30405
|
+
this.off(event, on);
|
|
30406
|
+
fn.apply(this, arguments);
|
|
30407
|
+
}
|
|
30408
|
+
|
|
30409
|
+
on.fn = fn;
|
|
30410
|
+
this.on(event, on);
|
|
30411
|
+
return this;
|
|
30412
|
+
};
|
|
30413
|
+
|
|
30414
|
+
/**
|
|
30415
|
+
* Remove the given callback for `event` or all
|
|
30416
|
+
* registered callbacks.
|
|
30417
|
+
*
|
|
30418
|
+
* @param {String} event
|
|
30419
|
+
* @param {Function} fn
|
|
30420
|
+
* @return {Emitter}
|
|
30421
|
+
* @api public
|
|
30422
|
+
*/
|
|
30423
|
+
|
|
30424
|
+
Emitter.prototype.off =
|
|
30425
|
+
Emitter.prototype.removeListener =
|
|
30426
|
+
Emitter.prototype.removeAllListeners =
|
|
30427
|
+
Emitter.prototype.removeEventListener = function(event, fn){
|
|
30428
|
+
this._callbacks = this._callbacks || {};
|
|
30429
|
+
|
|
30430
|
+
// all
|
|
30431
|
+
if (0 == arguments.length) {
|
|
30432
|
+
this._callbacks = {};
|
|
30433
|
+
return this;
|
|
30434
|
+
}
|
|
30435
|
+
|
|
30436
|
+
// specific event
|
|
30437
|
+
var callbacks = this._callbacks['$' + event];
|
|
30438
|
+
if (!callbacks) return this;
|
|
30439
|
+
|
|
30440
|
+
// remove all handlers
|
|
30441
|
+
if (1 == arguments.length) {
|
|
30442
|
+
delete this._callbacks['$' + event];
|
|
30443
|
+
return this;
|
|
30444
|
+
}
|
|
30445
|
+
|
|
30446
|
+
// remove specific handler
|
|
30447
|
+
var cb;
|
|
30448
|
+
for (var i = 0; i < callbacks.length; i++) {
|
|
30449
|
+
cb = callbacks[i];
|
|
30450
|
+
if (cb === fn || cb.fn === fn) {
|
|
30451
|
+
callbacks.splice(i, 1);
|
|
30452
|
+
break;
|
|
30453
|
+
}
|
|
30454
|
+
}
|
|
30455
|
+
return this;
|
|
30456
|
+
};
|
|
30457
|
+
|
|
30458
|
+
/**
|
|
30459
|
+
* Emit `event` with the given args.
|
|
30460
|
+
*
|
|
30461
|
+
* @param {String} event
|
|
30462
|
+
* @param {Mixed} ...
|
|
30463
|
+
* @return {Emitter}
|
|
30464
|
+
*/
|
|
30465
|
+
|
|
30466
|
+
Emitter.prototype.emit = function(event){
|
|
30467
|
+
this._callbacks = this._callbacks || {};
|
|
30468
|
+
var args = [].slice.call(arguments, 1)
|
|
30469
|
+
, callbacks = this._callbacks['$' + event];
|
|
30470
|
+
|
|
30471
|
+
if (callbacks) {
|
|
30472
|
+
callbacks = callbacks.slice(0);
|
|
30473
|
+
for (var i = 0, len = callbacks.length; i < len; ++i) {
|
|
30474
|
+
callbacks[i].apply(this, args);
|
|
30475
|
+
}
|
|
30476
|
+
}
|
|
30477
|
+
|
|
30478
|
+
return this;
|
|
30479
|
+
};
|
|
30480
|
+
|
|
30481
|
+
/**
|
|
30482
|
+
* Return array of callbacks for `event`.
|
|
30483
|
+
*
|
|
30484
|
+
* @param {String} event
|
|
30485
|
+
* @return {Array}
|
|
30486
|
+
* @api public
|
|
30487
|
+
*/
|
|
30488
|
+
|
|
30489
|
+
Emitter.prototype.listeners = function(event){
|
|
30490
|
+
this._callbacks = this._callbacks || {};
|
|
30491
|
+
return this._callbacks['$' + event] || [];
|
|
30492
|
+
};
|
|
30493
|
+
|
|
30494
|
+
/**
|
|
30495
|
+
* Check if this emitter has `event` handlers.
|
|
30496
|
+
*
|
|
30497
|
+
* @param {String} event
|
|
30498
|
+
* @return {Boolean}
|
|
30499
|
+
* @api public
|
|
30500
|
+
*/
|
|
30501
|
+
|
|
30502
|
+
Emitter.prototype.hasListeners = function(event){
|
|
30503
|
+
return !! this.listeners(event).length;
|
|
30504
|
+
};
|
|
30505
|
+
|
|
30506
|
+
},{}],135:[function(require,module,exports){
|
|
30423
30507
|
(function (Buffer){
|
|
30424
30508
|
"0.50.0";
|
|
30425
30509
|
/*
|
|
@@ -38616,7 +38700,7 @@ TinCan client library
|
|
|
38616
38700
|
}());
|
|
38617
38701
|
|
|
38618
38702
|
}).call(this,require("buffer").Buffer)
|
|
38619
|
-
},{"buffer":44,"querystring":
|
|
38703
|
+
},{"buffer":44,"querystring":93,"xhr2":142}],136:[function(require,module,exports){
|
|
38620
38704
|
module.exports = toArray
|
|
38621
38705
|
|
|
38622
38706
|
function toArray(list, index) {
|
|
@@ -38631,7 +38715,7 @@ function toArray(list, index) {
|
|
|
38631
38715
|
return array
|
|
38632
38716
|
}
|
|
38633
38717
|
|
|
38634
|
-
},{}],
|
|
38718
|
+
},{}],137:[function(require,module,exports){
|
|
38635
38719
|
// Underscore.js 1.8.3
|
|
38636
38720
|
// http://underscorejs.org
|
|
38637
38721
|
// (c) 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
@@ -40181,7 +40265,7 @@ function toArray(list, index) {
|
|
|
40181
40265
|
}
|
|
40182
40266
|
}.call(this));
|
|
40183
40267
|
|
|
40184
|
-
},{}],
|
|
40268
|
+
},{}],138:[function(require,module,exports){
|
|
40185
40269
|
// Copyright Joyent, Inc. and other Node contributors.
|
|
40186
40270
|
//
|
|
40187
40271
|
// Permission is hereby granted, free of charge, to any person obtaining a
|
|
@@ -40890,7 +40974,7 @@ function isNullOrUndefined(arg) {
|
|
|
40890
40974
|
return arg == null;
|
|
40891
40975
|
}
|
|
40892
40976
|
|
|
40893
|
-
},{"punycode":
|
|
40977
|
+
},{"punycode":89,"querystring":93}],139:[function(require,module,exports){
|
|
40894
40978
|
(function (global){
|
|
40895
40979
|
/*! https://mths.be/utf8js v2.0.0 by @mathias */
|
|
40896
40980
|
;(function(root) {
|
|
@@ -41138,7 +41222,7 @@ function isNullOrUndefined(arg) {
|
|
|
41138
41222
|
}(this));
|
|
41139
41223
|
|
|
41140
41224
|
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
|
41141
|
-
},{}],
|
|
41225
|
+
},{}],140:[function(require,module,exports){
|
|
41142
41226
|
(function (global){
|
|
41143
41227
|
|
|
41144
41228
|
/**
|
|
@@ -41209,7 +41293,7 @@ function config (name) {
|
|
|
41209
41293
|
}
|
|
41210
41294
|
|
|
41211
41295
|
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
|
41212
|
-
},{}],
|
|
41296
|
+
},{}],141:[function(require,module,exports){
|
|
41213
41297
|
/*!
|
|
41214
41298
|
* validate.js 0.9.0
|
|
41215
41299
|
*
|
|
@@ -42297,7 +42381,7 @@ function config (name) {
|
|
|
42297
42381
|
typeof module !== 'undefined' ? /* istanbul ignore next */ module : null,
|
|
42298
42382
|
typeof define !== 'undefined' ? /* istanbul ignore next */ define : null);
|
|
42299
42383
|
|
|
42300
|
-
},{}],
|
|
42384
|
+
},{}],142:[function(require,module,exports){
|
|
42301
42385
|
(function (process,Buffer){
|
|
42302
42386
|
// Generated by CoffeeScript 1.6.3
|
|
42303
42387
|
(function() {
|
|
@@ -43135,7 +43219,7 @@ function config (name) {
|
|
|
43135
43219
|
}).call(this);
|
|
43136
43220
|
|
|
43137
43221
|
}).call(this,require('_process'),require("buffer").Buffer)
|
|
43138
|
-
},{"_process":
|
|
43222
|
+
},{"_process":87,"buffer":44,"http":127,"https":73,"os":82,"url":138}],143:[function(require,module,exports){
|
|
43139
43223
|
module.exports = extend
|
|
43140
43224
|
|
|
43141
43225
|
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
@@ -43156,7 +43240,7 @@ function extend() {
|
|
|
43156
43240
|
return target
|
|
43157
43241
|
}
|
|
43158
43242
|
|
|
43159
|
-
},{}],
|
|
43243
|
+
},{}],144:[function(require,module,exports){
|
|
43160
43244
|
'use strict';
|
|
43161
43245
|
|
|
43162
43246
|
var alphabet = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_'.split('')
|