radar-sdk-js 3.6.1 → 3.6.2-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -2397,114 +2397,6 @@ var Navigator = /*#__PURE__*/function () {
2397
2397
  return Navigator;
2398
2398
  }();
2399
2399
 
2400
- // `IsArray` abstract operation
2401
- // https://tc39.es/ecma262/#sec-isarray
2402
- // eslint-disable-next-line es-x/no-array-isarray -- safe
2403
- var isArray = Array.isArray || function isArray(argument) {
2404
- return classofRaw(argument) == 'Array';
2405
- };
2406
-
2407
- var $TypeError$c = TypeError;
2408
- var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; // 2 ** 53 - 1 == 9007199254740991
2409
-
2410
- var doesNotExceedSafeInteger = function (it) {
2411
- if (it > MAX_SAFE_INTEGER) throw $TypeError$c('Maximum allowed index exceeded');
2412
- return it;
2413
- };
2414
-
2415
- var createProperty = function (object, key, value) {
2416
- var propertyKey = toPropertyKey(key);
2417
- if (propertyKey in object) objectDefineProperty.f(object, propertyKey, createPropertyDescriptor(0, value));
2418
- else object[propertyKey] = value;
2419
- };
2420
-
2421
- var SPECIES$3 = wellKnownSymbol('species');
2422
- var $Array = Array;
2423
-
2424
- // a part of `ArraySpeciesCreate` abstract operation
2425
- // https://tc39.es/ecma262/#sec-arrayspeciescreate
2426
- var arraySpeciesConstructor = function (originalArray) {
2427
- var C;
2428
- if (isArray(originalArray)) {
2429
- C = originalArray.constructor;
2430
- // cross-realm fallback
2431
- if (isConstructor(C) && (C === $Array || isArray(C.prototype))) C = undefined;
2432
- else if (isObject(C)) {
2433
- C = C[SPECIES$3];
2434
- if (C === null) C = undefined;
2435
- }
2436
- } return C === undefined ? $Array : C;
2437
- };
2438
-
2439
- // `ArraySpeciesCreate` abstract operation
2440
- // https://tc39.es/ecma262/#sec-arrayspeciescreate
2441
- var arraySpeciesCreate = function (originalArray, length) {
2442
- return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length);
2443
- };
2444
-
2445
- var SPECIES$4 = wellKnownSymbol('species');
2446
-
2447
- var arrayMethodHasSpeciesSupport = function (METHOD_NAME) {
2448
- // We can't use this feature detection in V8 since it causes
2449
- // deoptimization and serious performance degradation
2450
- // https://github.com/zloirock/core-js/issues/677
2451
- return engineV8Version >= 51 || !fails(function () {
2452
- var array = [];
2453
- var constructor = array.constructor = {};
2454
- constructor[SPECIES$4] = function () {
2455
- return { foo: 1 };
2456
- };
2457
- return array[METHOD_NAME](Boolean).foo !== 1;
2458
- });
2459
- };
2460
-
2461
- var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');
2462
-
2463
- // We can't use this feature detection in V8 since it causes
2464
- // deoptimization and serious performance degradation
2465
- // https://github.com/zloirock/core-js/issues/679
2466
- var IS_CONCAT_SPREADABLE_SUPPORT = engineV8Version >= 51 || !fails(function () {
2467
- var array = [];
2468
- array[IS_CONCAT_SPREADABLE] = false;
2469
- return array.concat()[0] !== array;
2470
- });
2471
-
2472
- var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat');
2473
-
2474
- var isConcatSpreadable = function (O) {
2475
- if (!isObject(O)) return false;
2476
- var spreadable = O[IS_CONCAT_SPREADABLE];
2477
- return spreadable !== undefined ? !!spreadable : isArray(O);
2478
- };
2479
-
2480
- var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;
2481
-
2482
- // `Array.prototype.concat` method
2483
- // https://tc39.es/ecma262/#sec-array.prototype.concat
2484
- // with adding support of @@isConcatSpreadable and @@species
2485
- _export({ target: 'Array', proto: true, arity: 1, forced: FORCED }, {
2486
- // eslint-disable-next-line no-unused-vars -- required for `.length`
2487
- concat: function concat(arg) {
2488
- var O = toObject(this);
2489
- var A = arraySpeciesCreate(O, 0);
2490
- var n = 0;
2491
- var i, k, length, len, E;
2492
- for (i = -1, length = arguments.length; i < length; i++) {
2493
- E = i === -1 ? O : arguments[i];
2494
- if (isConcatSpreadable(E)) {
2495
- len = lengthOfArrayLike(E);
2496
- doesNotExceedSafeInteger(n + len);
2497
- for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);
2498
- } else {
2499
- doesNotExceedSafeInteger(n + 1);
2500
- createProperty(A, n++, E);
2501
- }
2502
- }
2503
- A.length = n;
2504
- return A;
2505
- }
2506
- });
2507
-
2508
2400
  var runtime_1 = createCommonjsModule(function (module) {
2509
2401
  /**
2510
2402
  * Copyright (c) 2014-present, Facebook, Inc.
@@ -3236,6 +3128,114 @@ try {
3236
3128
  }
3237
3129
  });
3238
3130
 
3131
+ // `IsArray` abstract operation
3132
+ // https://tc39.es/ecma262/#sec-isarray
3133
+ // eslint-disable-next-line es-x/no-array-isarray -- safe
3134
+ var isArray = Array.isArray || function isArray(argument) {
3135
+ return classofRaw(argument) == 'Array';
3136
+ };
3137
+
3138
+ var $TypeError$c = TypeError;
3139
+ var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; // 2 ** 53 - 1 == 9007199254740991
3140
+
3141
+ var doesNotExceedSafeInteger = function (it) {
3142
+ if (it > MAX_SAFE_INTEGER) throw $TypeError$c('Maximum allowed index exceeded');
3143
+ return it;
3144
+ };
3145
+
3146
+ var createProperty = function (object, key, value) {
3147
+ var propertyKey = toPropertyKey(key);
3148
+ if (propertyKey in object) objectDefineProperty.f(object, propertyKey, createPropertyDescriptor(0, value));
3149
+ else object[propertyKey] = value;
3150
+ };
3151
+
3152
+ var SPECIES$3 = wellKnownSymbol('species');
3153
+ var $Array = Array;
3154
+
3155
+ // a part of `ArraySpeciesCreate` abstract operation
3156
+ // https://tc39.es/ecma262/#sec-arrayspeciescreate
3157
+ var arraySpeciesConstructor = function (originalArray) {
3158
+ var C;
3159
+ if (isArray(originalArray)) {
3160
+ C = originalArray.constructor;
3161
+ // cross-realm fallback
3162
+ if (isConstructor(C) && (C === $Array || isArray(C.prototype))) C = undefined;
3163
+ else if (isObject(C)) {
3164
+ C = C[SPECIES$3];
3165
+ if (C === null) C = undefined;
3166
+ }
3167
+ } return C === undefined ? $Array : C;
3168
+ };
3169
+
3170
+ // `ArraySpeciesCreate` abstract operation
3171
+ // https://tc39.es/ecma262/#sec-arrayspeciescreate
3172
+ var arraySpeciesCreate = function (originalArray, length) {
3173
+ return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length);
3174
+ };
3175
+
3176
+ var SPECIES$4 = wellKnownSymbol('species');
3177
+
3178
+ var arrayMethodHasSpeciesSupport = function (METHOD_NAME) {
3179
+ // We can't use this feature detection in V8 since it causes
3180
+ // deoptimization and serious performance degradation
3181
+ // https://github.com/zloirock/core-js/issues/677
3182
+ return engineV8Version >= 51 || !fails(function () {
3183
+ var array = [];
3184
+ var constructor = array.constructor = {};
3185
+ constructor[SPECIES$4] = function () {
3186
+ return { foo: 1 };
3187
+ };
3188
+ return array[METHOD_NAME](Boolean).foo !== 1;
3189
+ });
3190
+ };
3191
+
3192
+ var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');
3193
+
3194
+ // We can't use this feature detection in V8 since it causes
3195
+ // deoptimization and serious performance degradation
3196
+ // https://github.com/zloirock/core-js/issues/679
3197
+ var IS_CONCAT_SPREADABLE_SUPPORT = engineV8Version >= 51 || !fails(function () {
3198
+ var array = [];
3199
+ array[IS_CONCAT_SPREADABLE] = false;
3200
+ return array.concat()[0] !== array;
3201
+ });
3202
+
3203
+ var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat');
3204
+
3205
+ var isConcatSpreadable = function (O) {
3206
+ if (!isObject(O)) return false;
3207
+ var spreadable = O[IS_CONCAT_SPREADABLE];
3208
+ return spreadable !== undefined ? !!spreadable : isArray(O);
3209
+ };
3210
+
3211
+ var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;
3212
+
3213
+ // `Array.prototype.concat` method
3214
+ // https://tc39.es/ecma262/#sec-array.prototype.concat
3215
+ // with adding support of @@isConcatSpreadable and @@species
3216
+ _export({ target: 'Array', proto: true, arity: 1, forced: FORCED }, {
3217
+ // eslint-disable-next-line no-unused-vars -- required for `.length`
3218
+ concat: function concat(arg) {
3219
+ var O = toObject(this);
3220
+ var A = arraySpeciesCreate(O, 0);
3221
+ var n = 0;
3222
+ var i, k, length, len, E;
3223
+ for (i = -1, length = arguments.length; i < length; i++) {
3224
+ E = i === -1 ? O : arguments[i];
3225
+ if (isConcatSpreadable(E)) {
3226
+ len = lengthOfArrayLike(E);
3227
+ doesNotExceedSafeInteger(n + len);
3228
+ for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);
3229
+ } else {
3230
+ doesNotExceedSafeInteger(n + 1);
3231
+ createProperty(A, n++, E);
3232
+ }
3233
+ }
3234
+ A.length = n;
3235
+ return A;
3236
+ }
3237
+ });
3238
+
3239
3239
  var push$1 = functionUncurryThis([].push);
3240
3240
 
3241
3241
  // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterReject }` methods implementation
@@ -3436,7 +3436,7 @@ var API_HOST = /*#__PURE__*/function () {
3436
3436
  return API_HOST;
3437
3437
  }();
3438
3438
 
3439
- var SDK_VERSION = '3.6.1';
3439
+ var SDK_VERSION = '3.6.2-beta.2';
3440
3440
 
3441
3441
  var Http = /*#__PURE__*/function () {
3442
3442
  function Http() {
@@ -3567,6 +3567,63 @@ var Http = /*#__PURE__*/function () {
3567
3567
  return Http;
3568
3568
  }();
3569
3569
 
3570
+ var Addresses = /*#__PURE__*/function () {
3571
+ function Addresses() {
3572
+ _classCallCheck(this, Addresses);
3573
+ }
3574
+
3575
+ _createClass(Addresses, null, [{
3576
+ key: "validateAddress",
3577
+ value: function () {
3578
+ var _validateAddress = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
3579
+ var addressOptions,
3580
+ countryCode,
3581
+ stateCode,
3582
+ city,
3583
+ number,
3584
+ postalCode,
3585
+ street,
3586
+ unit,
3587
+ addressLabel,
3588
+ params,
3589
+ _args = arguments;
3590
+ return regeneratorRuntime.wrap(function _callee$(_context) {
3591
+ while (1) {
3592
+ switch (_context.prev = _context.next) {
3593
+ case 0:
3594
+ addressOptions = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
3595
+ countryCode = addressOptions.countryCode, stateCode = addressOptions.stateCode, city = addressOptions.city, number = addressOptions.number, postalCode = addressOptions.postalCode, street = addressOptions.street, unit = addressOptions.unit, addressLabel = addressOptions.addressLabel;
3596
+ params = {
3597
+ countryCode: countryCode,
3598
+ stateCode: stateCode,
3599
+ city: city,
3600
+ number: number,
3601
+ postalCode: postalCode,
3602
+ street: street,
3603
+ unit: unit,
3604
+ addressLabel: addressLabel
3605
+ };
3606
+ return _context.abrupt("return", Http.request('GET', 'addresses/validate', params));
3607
+
3608
+ case 4:
3609
+ case "end":
3610
+ return _context.stop();
3611
+ }
3612
+ }
3613
+ }, _callee);
3614
+ }));
3615
+
3616
+ function validateAddress() {
3617
+ return _validateAddress.apply(this, arguments);
3618
+ }
3619
+
3620
+ return validateAddress;
3621
+ }()
3622
+ }]);
3623
+
3624
+ return Addresses;
3625
+ }();
3626
+
3570
3627
  var Context = /*#__PURE__*/function () {
3571
3628
  function Context() {
3572
3629
  _classCallCheck(this, Context);
@@ -4083,6 +4140,8 @@ var Search = /*#__PURE__*/function () {
4083
4140
  limit,
4084
4141
  layers,
4085
4142
  country,
4143
+ countryCode,
4144
+ expandUnits,
4086
4145
  params,
4087
4146
  _args3 = arguments;
4088
4147
  return regeneratorRuntime.wrap(function _callee3$(_context3) {
@@ -4091,7 +4150,7 @@ var Search = /*#__PURE__*/function () {
4091
4150
  case 0:
4092
4151
  searchOptions = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {};
4093
4152
  // if near is not provided, server will use geoIP as fallback
4094
- query = searchOptions.query, near = searchOptions.near, limit = searchOptions.limit, layers = searchOptions.layers, country = searchOptions.country;
4153
+ query = searchOptions.query, near = searchOptions.near, limit = searchOptions.limit, layers = searchOptions.layers, country = searchOptions.country, countryCode = searchOptions.countryCode, expandUnits = searchOptions.expandUnits;
4095
4154
 
4096
4155
  if (((_near = near) === null || _near === void 0 ? void 0 : _near.latitude) && ((_near2 = near) === null || _near2 === void 0 ? void 0 : _near2.longitude)) {
4097
4156
  near = "".concat(near.latitude, ",").concat(near.longitude);
@@ -4102,7 +4161,9 @@ var Search = /*#__PURE__*/function () {
4102
4161
  near: near,
4103
4162
  limit: limit,
4104
4163
  layers: layers,
4105
- country: country
4164
+ country: country,
4165
+ countryCode: countryCode,
4166
+ expandUnits: expandUnits
4106
4167
  };
4107
4168
  return _context3.abrupt("return", Http.request('GET', 'search/autocomplete', params));
4108
4169
 
@@ -5366,6 +5427,18 @@ var Radar = /*#__PURE__*/function () {
5366
5427
  }, response);
5367
5428
  }).catch(handleError(callback));
5368
5429
  }
5430
+ }, {
5431
+ key: "validateAddress",
5432
+ value: function validateAddress(addressOptions) {
5433
+ var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : defaultCallback;
5434
+ Addresses.validateAddress(addressOptions).then(function (response) {
5435
+ callback(null, {
5436
+ address: response.address,
5437
+ result: response.result,
5438
+ status: STATUS.SUCCESS
5439
+ }, response);
5440
+ }).catch(handleError(callback));
5441
+ }
5369
5442
  }, {
5370
5443
  key: "geocode",
5371
5444
  value: function geocode(geocodeOptions) {
package/dist/radar.js CHANGED
@@ -2398,114 +2398,6 @@ var Radar = (function () {
2398
2398
  return Navigator;
2399
2399
  }();
2400
2400
 
2401
- // `IsArray` abstract operation
2402
- // https://tc39.es/ecma262/#sec-isarray
2403
- // eslint-disable-next-line es-x/no-array-isarray -- safe
2404
- var isArray = Array.isArray || function isArray(argument) {
2405
- return classofRaw(argument) == 'Array';
2406
- };
2407
-
2408
- var $TypeError$c = TypeError;
2409
- var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; // 2 ** 53 - 1 == 9007199254740991
2410
-
2411
- var doesNotExceedSafeInteger = function (it) {
2412
- if (it > MAX_SAFE_INTEGER) throw $TypeError$c('Maximum allowed index exceeded');
2413
- return it;
2414
- };
2415
-
2416
- var createProperty = function (object, key, value) {
2417
- var propertyKey = toPropertyKey(key);
2418
- if (propertyKey in object) objectDefineProperty.f(object, propertyKey, createPropertyDescriptor(0, value));
2419
- else object[propertyKey] = value;
2420
- };
2421
-
2422
- var SPECIES$3 = wellKnownSymbol('species');
2423
- var $Array = Array;
2424
-
2425
- // a part of `ArraySpeciesCreate` abstract operation
2426
- // https://tc39.es/ecma262/#sec-arrayspeciescreate
2427
- var arraySpeciesConstructor = function (originalArray) {
2428
- var C;
2429
- if (isArray(originalArray)) {
2430
- C = originalArray.constructor;
2431
- // cross-realm fallback
2432
- if (isConstructor(C) && (C === $Array || isArray(C.prototype))) C = undefined;
2433
- else if (isObject(C)) {
2434
- C = C[SPECIES$3];
2435
- if (C === null) C = undefined;
2436
- }
2437
- } return C === undefined ? $Array : C;
2438
- };
2439
-
2440
- // `ArraySpeciesCreate` abstract operation
2441
- // https://tc39.es/ecma262/#sec-arrayspeciescreate
2442
- var arraySpeciesCreate = function (originalArray, length) {
2443
- return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length);
2444
- };
2445
-
2446
- var SPECIES$4 = wellKnownSymbol('species');
2447
-
2448
- var arrayMethodHasSpeciesSupport = function (METHOD_NAME) {
2449
- // We can't use this feature detection in V8 since it causes
2450
- // deoptimization and serious performance degradation
2451
- // https://github.com/zloirock/core-js/issues/677
2452
- return engineV8Version >= 51 || !fails(function () {
2453
- var array = [];
2454
- var constructor = array.constructor = {};
2455
- constructor[SPECIES$4] = function () {
2456
- return { foo: 1 };
2457
- };
2458
- return array[METHOD_NAME](Boolean).foo !== 1;
2459
- });
2460
- };
2461
-
2462
- var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');
2463
-
2464
- // We can't use this feature detection in V8 since it causes
2465
- // deoptimization and serious performance degradation
2466
- // https://github.com/zloirock/core-js/issues/679
2467
- var IS_CONCAT_SPREADABLE_SUPPORT = engineV8Version >= 51 || !fails(function () {
2468
- var array = [];
2469
- array[IS_CONCAT_SPREADABLE] = false;
2470
- return array.concat()[0] !== array;
2471
- });
2472
-
2473
- var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat');
2474
-
2475
- var isConcatSpreadable = function (O) {
2476
- if (!isObject(O)) return false;
2477
- var spreadable = O[IS_CONCAT_SPREADABLE];
2478
- return spreadable !== undefined ? !!spreadable : isArray(O);
2479
- };
2480
-
2481
- var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;
2482
-
2483
- // `Array.prototype.concat` method
2484
- // https://tc39.es/ecma262/#sec-array.prototype.concat
2485
- // with adding support of @@isConcatSpreadable and @@species
2486
- _export({ target: 'Array', proto: true, arity: 1, forced: FORCED }, {
2487
- // eslint-disable-next-line no-unused-vars -- required for `.length`
2488
- concat: function concat(arg) {
2489
- var O = toObject(this);
2490
- var A = arraySpeciesCreate(O, 0);
2491
- var n = 0;
2492
- var i, k, length, len, E;
2493
- for (i = -1, length = arguments.length; i < length; i++) {
2494
- E = i === -1 ? O : arguments[i];
2495
- if (isConcatSpreadable(E)) {
2496
- len = lengthOfArrayLike(E);
2497
- doesNotExceedSafeInteger(n + len);
2498
- for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);
2499
- } else {
2500
- doesNotExceedSafeInteger(n + 1);
2501
- createProperty(A, n++, E);
2502
- }
2503
- }
2504
- A.length = n;
2505
- return A;
2506
- }
2507
- });
2508
-
2509
2401
  var runtime_1 = createCommonjsModule(function (module) {
2510
2402
  /**
2511
2403
  * Copyright (c) 2014-present, Facebook, Inc.
@@ -3237,6 +3129,114 @@ var Radar = (function () {
3237
3129
  }
3238
3130
  });
3239
3131
 
3132
+ // `IsArray` abstract operation
3133
+ // https://tc39.es/ecma262/#sec-isarray
3134
+ // eslint-disable-next-line es-x/no-array-isarray -- safe
3135
+ var isArray = Array.isArray || function isArray(argument) {
3136
+ return classofRaw(argument) == 'Array';
3137
+ };
3138
+
3139
+ var $TypeError$c = TypeError;
3140
+ var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; // 2 ** 53 - 1 == 9007199254740991
3141
+
3142
+ var doesNotExceedSafeInteger = function (it) {
3143
+ if (it > MAX_SAFE_INTEGER) throw $TypeError$c('Maximum allowed index exceeded');
3144
+ return it;
3145
+ };
3146
+
3147
+ var createProperty = function (object, key, value) {
3148
+ var propertyKey = toPropertyKey(key);
3149
+ if (propertyKey in object) objectDefineProperty.f(object, propertyKey, createPropertyDescriptor(0, value));
3150
+ else object[propertyKey] = value;
3151
+ };
3152
+
3153
+ var SPECIES$3 = wellKnownSymbol('species');
3154
+ var $Array = Array;
3155
+
3156
+ // a part of `ArraySpeciesCreate` abstract operation
3157
+ // https://tc39.es/ecma262/#sec-arrayspeciescreate
3158
+ var arraySpeciesConstructor = function (originalArray) {
3159
+ var C;
3160
+ if (isArray(originalArray)) {
3161
+ C = originalArray.constructor;
3162
+ // cross-realm fallback
3163
+ if (isConstructor(C) && (C === $Array || isArray(C.prototype))) C = undefined;
3164
+ else if (isObject(C)) {
3165
+ C = C[SPECIES$3];
3166
+ if (C === null) C = undefined;
3167
+ }
3168
+ } return C === undefined ? $Array : C;
3169
+ };
3170
+
3171
+ // `ArraySpeciesCreate` abstract operation
3172
+ // https://tc39.es/ecma262/#sec-arrayspeciescreate
3173
+ var arraySpeciesCreate = function (originalArray, length) {
3174
+ return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length);
3175
+ };
3176
+
3177
+ var SPECIES$4 = wellKnownSymbol('species');
3178
+
3179
+ var arrayMethodHasSpeciesSupport = function (METHOD_NAME) {
3180
+ // We can't use this feature detection in V8 since it causes
3181
+ // deoptimization and serious performance degradation
3182
+ // https://github.com/zloirock/core-js/issues/677
3183
+ return engineV8Version >= 51 || !fails(function () {
3184
+ var array = [];
3185
+ var constructor = array.constructor = {};
3186
+ constructor[SPECIES$4] = function () {
3187
+ return { foo: 1 };
3188
+ };
3189
+ return array[METHOD_NAME](Boolean).foo !== 1;
3190
+ });
3191
+ };
3192
+
3193
+ var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');
3194
+
3195
+ // We can't use this feature detection in V8 since it causes
3196
+ // deoptimization and serious performance degradation
3197
+ // https://github.com/zloirock/core-js/issues/679
3198
+ var IS_CONCAT_SPREADABLE_SUPPORT = engineV8Version >= 51 || !fails(function () {
3199
+ var array = [];
3200
+ array[IS_CONCAT_SPREADABLE] = false;
3201
+ return array.concat()[0] !== array;
3202
+ });
3203
+
3204
+ var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat');
3205
+
3206
+ var isConcatSpreadable = function (O) {
3207
+ if (!isObject(O)) return false;
3208
+ var spreadable = O[IS_CONCAT_SPREADABLE];
3209
+ return spreadable !== undefined ? !!spreadable : isArray(O);
3210
+ };
3211
+
3212
+ var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;
3213
+
3214
+ // `Array.prototype.concat` method
3215
+ // https://tc39.es/ecma262/#sec-array.prototype.concat
3216
+ // with adding support of @@isConcatSpreadable and @@species
3217
+ _export({ target: 'Array', proto: true, arity: 1, forced: FORCED }, {
3218
+ // eslint-disable-next-line no-unused-vars -- required for `.length`
3219
+ concat: function concat(arg) {
3220
+ var O = toObject(this);
3221
+ var A = arraySpeciesCreate(O, 0);
3222
+ var n = 0;
3223
+ var i, k, length, len, E;
3224
+ for (i = -1, length = arguments.length; i < length; i++) {
3225
+ E = i === -1 ? O : arguments[i];
3226
+ if (isConcatSpreadable(E)) {
3227
+ len = lengthOfArrayLike(E);
3228
+ doesNotExceedSafeInteger(n + len);
3229
+ for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);
3230
+ } else {
3231
+ doesNotExceedSafeInteger(n + 1);
3232
+ createProperty(A, n++, E);
3233
+ }
3234
+ }
3235
+ A.length = n;
3236
+ return A;
3237
+ }
3238
+ });
3239
+
3240
3240
  var push$1 = functionUncurryThis([].push);
3241
3241
 
3242
3242
  // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterReject }` methods implementation
@@ -3437,7 +3437,7 @@ var Radar = (function () {
3437
3437
  return API_HOST;
3438
3438
  }();
3439
3439
 
3440
- var SDK_VERSION = '3.6.1';
3440
+ var SDK_VERSION = '3.6.2-beta.2';
3441
3441
 
3442
3442
  var Http = /*#__PURE__*/function () {
3443
3443
  function Http() {
@@ -3568,6 +3568,63 @@ var Radar = (function () {
3568
3568
  return Http;
3569
3569
  }();
3570
3570
 
3571
+ var Addresses = /*#__PURE__*/function () {
3572
+ function Addresses() {
3573
+ _classCallCheck(this, Addresses);
3574
+ }
3575
+
3576
+ _createClass(Addresses, null, [{
3577
+ key: "validateAddress",
3578
+ value: function () {
3579
+ var _validateAddress = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
3580
+ var addressOptions,
3581
+ countryCode,
3582
+ stateCode,
3583
+ city,
3584
+ number,
3585
+ postalCode,
3586
+ street,
3587
+ unit,
3588
+ addressLabel,
3589
+ params,
3590
+ _args = arguments;
3591
+ return regeneratorRuntime.wrap(function _callee$(_context) {
3592
+ while (1) {
3593
+ switch (_context.prev = _context.next) {
3594
+ case 0:
3595
+ addressOptions = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
3596
+ countryCode = addressOptions.countryCode, stateCode = addressOptions.stateCode, city = addressOptions.city, number = addressOptions.number, postalCode = addressOptions.postalCode, street = addressOptions.street, unit = addressOptions.unit, addressLabel = addressOptions.addressLabel;
3597
+ params = {
3598
+ countryCode: countryCode,
3599
+ stateCode: stateCode,
3600
+ city: city,
3601
+ number: number,
3602
+ postalCode: postalCode,
3603
+ street: street,
3604
+ unit: unit,
3605
+ addressLabel: addressLabel
3606
+ };
3607
+ return _context.abrupt("return", Http.request('GET', 'addresses/validate', params));
3608
+
3609
+ case 4:
3610
+ case "end":
3611
+ return _context.stop();
3612
+ }
3613
+ }
3614
+ }, _callee);
3615
+ }));
3616
+
3617
+ function validateAddress() {
3618
+ return _validateAddress.apply(this, arguments);
3619
+ }
3620
+
3621
+ return validateAddress;
3622
+ }()
3623
+ }]);
3624
+
3625
+ return Addresses;
3626
+ }();
3627
+
3571
3628
  var Context = /*#__PURE__*/function () {
3572
3629
  function Context() {
3573
3630
  _classCallCheck(this, Context);
@@ -4084,6 +4141,8 @@ var Radar = (function () {
4084
4141
  limit,
4085
4142
  layers,
4086
4143
  country,
4144
+ countryCode,
4145
+ expandUnits,
4087
4146
  params,
4088
4147
  _args3 = arguments;
4089
4148
  return regeneratorRuntime.wrap(function _callee3$(_context3) {
@@ -4092,7 +4151,7 @@ var Radar = (function () {
4092
4151
  case 0:
4093
4152
  searchOptions = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {};
4094
4153
  // if near is not provided, server will use geoIP as fallback
4095
- query = searchOptions.query, near = searchOptions.near, limit = searchOptions.limit, layers = searchOptions.layers, country = searchOptions.country;
4154
+ query = searchOptions.query, near = searchOptions.near, limit = searchOptions.limit, layers = searchOptions.layers, country = searchOptions.country, countryCode = searchOptions.countryCode, expandUnits = searchOptions.expandUnits;
4096
4155
 
4097
4156
  if (((_near = near) === null || _near === void 0 ? void 0 : _near.latitude) && ((_near2 = near) === null || _near2 === void 0 ? void 0 : _near2.longitude)) {
4098
4157
  near = "".concat(near.latitude, ",").concat(near.longitude);
@@ -4103,7 +4162,9 @@ var Radar = (function () {
4103
4162
  near: near,
4104
4163
  limit: limit,
4105
4164
  layers: layers,
4106
- country: country
4165
+ country: country,
4166
+ countryCode: countryCode,
4167
+ expandUnits: expandUnits
4107
4168
  };
4108
4169
  return _context3.abrupt("return", Http.request('GET', 'search/autocomplete', params));
4109
4170
 
@@ -5367,6 +5428,18 @@ var Radar = (function () {
5367
5428
  }, response);
5368
5429
  }).catch(handleError(callback));
5369
5430
  }
5431
+ }, {
5432
+ key: "validateAddress",
5433
+ value: function validateAddress(addressOptions) {
5434
+ var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : defaultCallback;
5435
+ Addresses.validateAddress(addressOptions).then(function (response) {
5436
+ callback(null, {
5437
+ address: response.address,
5438
+ result: response.result,
5439
+ status: STATUS.SUCCESS
5440
+ }, response);
5441
+ }).catch(handleError(callback));
5442
+ }
5370
5443
  }, {
5371
5444
  key: "geocode",
5372
5445
  value: function geocode(geocodeOptions) {
package/dist/radar.min.js CHANGED
@@ -1 +1 @@
1
- var Radar=function(){"use strict";var s=function(t){try{return!!t()}catch(t){return!0}},f=!s(function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}),t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function e(t,e){return t(e={exports:{}},e.exports),e.exports}var r,n,o=function(t){return t&&t.Math==Math&&t},l=o("object"==typeof globalThis&&globalThis)||o("object"==typeof window&&window)||o("object"==typeof self&&self)||o("object"==typeof t&&t)||function(){return this}()||Function("return this")(),i=!s(function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}),a=Function.prototype,u=a.bind,c=a.call,p=i&&u.bind(c,c),d=i?function(t){return t&&p(t)}:function(t){return t&&function(){return c.apply(t,arguments)}},w=function(t){return"function"==typeof t},v=/#|\.prototype\./,h=function(t,e){var r=y[g(t)];return r==E||r!=m&&(w(e)?s(e):!!e)},g=h.normalize=function(t){return String(t).replace(v,".").toLowerCase()},y=h.data={},m=h.NATIVE="N",E=h.POLYFILL="P",R=h,S=function(t){return"object"==typeof t?null!==t:w(t)},O=l.document,b=S(O)&&S(O.createElement),I=function(t){return b?O.createElement(t):{}},T=!f&&!s(function(){return 7!=Object.defineProperty(I("div"),"a",{get:function(){return 7}}).a}),x=f&&s(function(){return 42!=Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype}),_=String,N=TypeError,A=function(t){if(S(t))return t;throw N(_(t)+" is not an object")},C=Function.prototype.call,P=i?C.bind(C):function(){return C.apply(C,arguments)},k=function(t,e){return arguments.length<2?(r=l[t],w(r)?r:void 0):l[t]&&l[t][e];var r},j=d({}.isPrototypeOf),L=k("navigator","userAgent")||"",D=l.process,U=l.Deno,M=D&&D.versions||U&&U.version,G=M&&M.v8;G&&(n=0<(r=G.split("."))[0]&&r[0]<4?1:+(r[0]+r[1])),!n&&L&&(!(r=L.match(/Edge\/(\d+)/))||74<=r[1])&&(r=L.match(/Chrome\/(\d+)/))&&(n=+r[1]);var F=n,H=!!Object.getOwnPropertySymbols&&!s(function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&F&&F<41}),V=H&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,B=Object,q=V?function(t){return"symbol"==typeof t}:function(t){var e=k("Symbol");return w(e)&&j(e.prototype,B(t))},K=String,Y=function(t){try{return K(t)}catch(t){return"Object"}},$=TypeError,J=function(t){if(w(t))return t;throw $(Y(t)+" is not a function")},W=function(t,e){var r=t[e];return null==r?void 0:J(r)},z=TypeError,X=Object.defineProperty,Q=function(e,r){try{X(l,e,{value:r,configurable:!0,writable:!0})}catch(t){l[e]=r}return r},Z="__core-js_shared__",tt=l[Z]||Q(Z,{}),et=e(function(t){(t.exports=function(t,e){return tt[t]||(tt[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.23.3",mode:"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.23.3/LICENSE",source:"https://github.com/zloirock/core-js"})}),rt=TypeError,nt=function(t){if(null==t)throw rt("Can't call method on "+t);return t},ot=Object,it=function(t){return ot(nt(t))},at=d({}.hasOwnProperty),ut=Object.hasOwn||function(t,e){return at(it(t),e)},ct=0,st=Math.random(),ft=d(1..toString),lt=function(t){return"Symbol("+(void 0===t?"":t)+")_"+ft(++ct+st,36)},pt=et("wks"),dt=l.Symbol,vt=dt&&dt.for,ht=V?dt:dt&&dt.withoutSetter||lt,gt=function(t){if(!ut(pt,t)||!H&&"string"!=typeof pt[t]){var e="Symbol."+t;H&&ut(dt,t)?pt[t]=dt[t]:pt[t]=V&&vt?vt(e):ht(e)}return pt[t]},yt=TypeError,mt=gt("toPrimitive"),Et=function(t,e){if(!S(t)||q(t))return t;var r,n=W(t,mt);if(n){if(void 0===e&&(e="default"),r=P(n,t,e),!S(r)||q(r))return r;throw yt("Can't convert object to primitive value")}return void 0===e&&(e="number"),function(t,e){var r,n;if("string"===e&&w(r=t.toString)&&!S(n=P(r,t)))return n;if(w(r=t.valueOf)&&!S(n=P(r,t)))return n;if("string"!==e&&w(r=t.toString)&&!S(n=P(r,t)))return n;throw z("Can't convert object to primitive value")}(t,e)},Rt=function(t){var e=Et(t,"string");return q(e)?e:e+""},St=TypeError,Ot=Object.defineProperty,bt=Object.getOwnPropertyDescriptor,It="enumerable",Tt="configurable",wt="writable",xt={f:f?x?function(t,e,r){if(A(t),e=Rt(e),A(r),"function"==typeof t&&"prototype"===e&&"value"in r&&wt in r&&!r[wt]){var n=bt(t,e);n&&n[wt]&&(t[e]=r.value,r={configurable:Tt in r?r[Tt]:n[Tt],enumerable:It in r?r[It]:n[It],writable:!1})}return Ot(t,e,r)}:Ot:function(t,e,r){if(A(t),e=Rt(e),A(r),T)try{return Ot(t,e,r)}catch(t){}if("get"in r||"set"in r)throw St("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},_t=Function.prototype,Nt=f&&Object.getOwnPropertyDescriptor,At=ut(_t,"name"),Ct={EXISTS:At,PROPER:At&&"something"===function(){}.name,CONFIGURABLE:At&&(!f||f&&Nt(_t,"name").configurable)},Pt=d(Function.toString);w(tt.inspectSource)||(tt.inspectSource=function(t){return Pt(t)});var kt,jt,Lt,Dt=tt.inspectSource,Ut=l.WeakMap,Mt=w(Ut)&&/native code/.test(Dt(Ut)),Gt=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},Ft=f?function(t,e,r){return xt.f(t,e,Gt(1,r))}:function(t,e,r){return t[e]=r,t},Ht=et("keys"),Vt=function(t){return Ht[t]||(Ht[t]=lt(t))},Bt={},qt="Object already initialized",Kt=l.TypeError,Yt=l.WeakMap;if(Mt||tt.state){var $t=tt.state||(tt.state=new Yt),Jt=d($t.get),Wt=d($t.has),zt=d($t.set);kt=function(t,e){if(Wt($t,t))throw new Kt(qt);return e.facade=t,zt($t,t,e),e},jt=function(t){return Jt($t,t)||{}},Lt=function(t){return Wt($t,t)}}else{var Xt=Vt("state");Bt[Xt]=!0,kt=function(t,e){if(ut(t,Xt))throw new Kt(qt);return e.facade=t,Ft(t,Xt,e),e},jt=function(t){return ut(t,Xt)?t[Xt]:{}},Lt=function(t){return ut(t,Xt)}}var Qt={set:kt,get:jt,has:Lt,enforce:function(t){return Lt(t)?jt(t):kt(t,{})},getterFor:function(r){return function(t){var e;if(!S(t)||(e=jt(t)).type!==r)throw Kt("Incompatible receiver, "+r+" required");return e}}},Zt=e(function(t){var o=Ct.CONFIGURABLE,i=Qt.enforce,e=Qt.get,a=Object.defineProperty,u=f&&!s(function(){return 8!==a(function(){},"length",{value:8}).length}),c=String(String).split("String"),r=t.exports=function(t,e,r){"Symbol("===String(e).slice(0,7)&&(e="["+String(e).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),r&&r.getter&&(e="get "+e),r&&r.setter&&(e="set "+e),(!ut(t,"name")||o&&t.name!==e)&&(f?a(t,"name",{value:e,configurable:!0}):t.name=e),u&&r&&ut(r,"arity")&&t.length!==r.arity&&a(t,"length",{value:r.arity});try{r&&ut(r,"constructor")&&r.constructor?f&&a(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var n=i(t);return ut(n,"source")||(n.source=c.join("string"==typeof e?e:"")),t};Function.prototype.toString=r(function(){return w(this)&&e(this).source||Dt(this)},"toString")}),te=function(t,e,r,n){n||(n={});var o=n.enumerable,i=void 0!==n.name?n.name:e;if(w(r)&&Zt(r,i,n),n.global)o?t[e]=r:Q(e,r);else{try{n.unsafe?t[e]&&(o=!0):delete t[e]}catch(t){}o?t[e]=r:xt.f(t,e,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return t},ee=String,re=TypeError,ne=Object.setPrototypeOf||("__proto__"in{}?function(){var r,n=!1,t={};try{(r=d(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(t,[]),n=t instanceof Array}catch(t){}return function(t,e){return A(t),function(t){if("object"==typeof t||w(t))return;throw re("Can't set "+ee(t)+" as a prototype")}(e),n?r(t,e):t.__proto__=e,t}}():void 0),oe=d({}.toString),ie=d("".slice),ae=function(t){return ie(oe(t),8,-1)},ue=Object,ce=d("".split),se=s(function(){return!ue("z").propertyIsEnumerable(0)})?function(t){return"String"==ae(t)?ce(t,""):ue(t)}:ue,fe=function(t){return se(nt(t))},le=Math.ceil,pe=Math.floor,de=Math.trunc||function(t){var e=+t;return(0<e?pe:le)(e)},ve=function(t){var e=+t;return e!=e||0===e?0:de(e)},he=Math.max,ge=Math.min,ye=Math.min,me=function(t){return 0<t?ye(ve(t),9007199254740991):0},Ee=function(t){return me(t.length)},Re=function(s){return function(t,e,r){var n,o,i,a=fe(t),u=Ee(a),c=(n=u,(o=ve(r))<0?he(o+n,0):ge(o,n));if(s&&e!=e){for(;c<u;)if((i=a[c++])!=i)return!0}else for(;c<u;c++)if((s||c in a)&&a[c]===e)return s||c||0;return!s&&-1}},Se={includes:Re(!0),indexOf:Re(!1)}.indexOf,Oe=d([].push),be=function(t,e){var r,n=fe(t),o=0,i=[];for(r in n)!ut(Bt,r)&&ut(n,r)&&Oe(i,r);for(;e.length>o;)ut(n,r=e[o++])&&(~Se(i,r)||Oe(i,r));return i},Ie=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Te=Ie.concat("length","prototype"),we={f:Object.getOwnPropertyNames||function(t){return be(t,Te)}},xe={}.propertyIsEnumerable,_e=Object.getOwnPropertyDescriptor,Ne={f:_e&&!xe.call({1:2},1)?function(t){var e=_e(this,t);return!!e&&e.enumerable}:xe},Ae=Object.getOwnPropertyDescriptor,Ce={f:f?Ae:function(t,e){if(t=fe(t),e=Rt(e),T)try{return Ae(t,e)}catch(t){}if(ut(t,e))return Gt(!P(Ne.f,t,e),t[e])}},Pe=d(1..valueOf),ke={};ke[gt("toStringTag")]="z";var je="[object z]"===String(ke),Le=gt("toStringTag"),De=Object,Ue="Arguments"==ae(function(){return arguments}()),Me=je?ae:function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=De(t),Le))?r:Ue?ae(e):"Object"==(n=ae(e))&&w(e.callee)?"Arguments":n},Ge=String,Fe=function(t){if("Symbol"===Me(t))throw TypeError("Cannot convert a Symbol value to a string");return Ge(t)},He="\t\n\v\f\r                 \u2028\u2029\ufeff",Ve=d("".replace),Be="["+He+"]",qe=RegExp("^"+Be+Be+"*"),Ke=RegExp(Be+Be+"*$"),Ye=function(r){return function(t){var e=Fe(nt(t));return 1&r&&(e=Ve(e,qe,"")),2&r&&(e=Ve(e,Ke,"")),e}},$e={start:Ye(1),end:Ye(2),trim:Ye(3)},Je=we.f,We=Ce.f,ze=xt.f,Xe=$e.trim,Qe="Number",Ze=l[Qe],tr=Ze.prototype,er=l.TypeError,rr=d("".slice),nr=d("".charCodeAt),or=function(t){var e,r,n,o,i,a,u,c,s=Et(t,"number");if(q(s))throw er("Cannot convert a Symbol value to a number");if("string"==typeof s&&2<s.length)if(s=Xe(s),43===(e=nr(s,0))||45===e){if(88===(r=nr(s,2))||120===r)return NaN}else if(48===e){switch(nr(s,1)){case 66:case 98:n=2,o=49;break;case 79:case 111:n=8,o=55;break;default:return+s}for(a=(i=rr(s,2)).length,u=0;u<a;u++)if((c=nr(i,u))<48||o<c)return NaN;return parseInt(i,n)}return+s};if(R(Qe,!Ze(" 0o1")||!Ze("0b1")||Ze("+0x1"))){for(var ir,ar=function(t){var e,r,n,o,i,a,u=arguments.length<1?0:Ze("bigint"==typeof(e=Et(t,"number"))?e:or(e)),c=this;return j(tr,c)&&s(function(){Pe(c)})?(r=Object(u),n=c,o=ar,ne&&w(i=n.constructor)&&i!==o&&S(a=i.prototype)&&a!==o.prototype&&ne(r,a),r):u},ur=f?Je(Ze):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),cr=0;ur.length>cr;cr++)ut(Ze,ir=ur[cr])&&!ut(ar,ir)&&ze(ar,ir,We(Ze,ir));(ar.prototype=tr).constructor=ar,te(l,Qe,ar,{constructor:!0})}var sr={f:Object.getOwnPropertySymbols},fr=d([].concat),lr=k("Reflect","ownKeys")||function(t){var e=we.f(A(t)),r=sr.f;return r?fr(e,r(t)):e},pr=function(t,e,r){for(var n=lr(e),o=xt.f,i=Ce.f,a=0;a<n.length;a++){var u=n[a];ut(t,u)||r&&ut(r,u)||o(t,u,i(e,u))}},dr=Ce.f,vr=function(t,e){var r,n,o,i,a,u=t.target,c=t.global,s=t.stat;if(r=c?l:s?l[u]||Q(u,{}):(l[u]||{}).prototype)for(n in e){if(i=e[n],o=t.dontCallGetSet?(a=dr(r,n))&&a.value:r[n],!R(c?n:u+(s?".":"#")+n,t.forced)&&void 0!==o){if(typeof i==typeof o)continue;pr(i,o)}(t.sham||o&&o.sham)&&Ft(i,"sham",!0),te(r,n,i,t)}};vr({target:"Number",stat:!0},{isNaN:function(t){return t!=t}});var hr=Object.keys||function(t){return be(t,Ie)};vr({target:"Object",stat:!0,forced:s(function(){hr(1)})},{keys:function(t){return hr(it(t))}});var gr,yr=Ct.PROPER,mr=$e.trim;function Er(t){return(Er="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Rr(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function Sr(u){return function(){var t=this,a=arguments;return new Promise(function(e,r){var n=u.apply(t,a);function o(t){Rr(n,e,r,o,i,"next",t)}function i(t){Rr(n,e,r,o,i,"throw",t)}o(void 0)})}}function Or(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function br(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Ir(t,e,r){return e&&br(t.prototype,e),r&&br(t,r),t}function Tr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function wr(o){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Tr(Object(i),!0).forEach(function(t){var e,r,n;e=o,n=i[r=t],r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(i)):Tr(Object(i)).forEach(function(t){Object.defineProperty(o,t,Object.getOwnPropertyDescriptor(i,t))})}return o}vr({target:"String",proto:!0,forced:(gr="trim",s(function(){return!!He[gr]()||"​…᠎"!=="​…᠎"[gr]()||yr&&He[gr].name!==gr}))},{trim:function(){return mr(this)}});var xr=je?{}.toString:function(){return"[object "+Me(this)+"]"};je||te(Object.prototype,"toString",xr,{unsafe:!0});var _r="process"==ae(l.process),Nr=xt.f,Ar=gt("toStringTag"),Cr=gt("species"),Pr=TypeError,kr=function(){},jr=[],Lr=k("Reflect","construct"),Dr=/^\s*(?:class|function)\b/,Ur=d(Dr.exec),Mr=!Dr.exec(kr),Gr=function(t){if(!w(t))return!1;try{return Lr(kr,jr,t),!0}catch(t){return!1}},Fr=function(t){if(!w(t))return!1;switch(Me(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Mr||!!Ur(Dr,Dt(t))}catch(t){return!0}};Fr.sham=!0;var Hr,Vr,Br,qr,Kr=!Lr||s(function(){var t;return Gr(Gr.call)||!Gr(Object)||!Gr(function(){t=!0})||t})?Fr:Gr,Yr=TypeError,$r=gt("species"),Jr=function(t,e){var r,n=A(t).constructor;return void 0===n||null==(r=A(n)[$r])?e:function(t){if(Kr(t))return t;throw Yr(Y(t)+" is not a constructor")}(r)},Wr=Function.prototype,zr=Wr.apply,Xr=Wr.call,Qr="object"==typeof Reflect&&Reflect.apply||(i?Xr.bind(zr):function(){return Xr.apply(zr,arguments)}),Zr=d(d.bind),tn=function(t,e){return J(t),void 0===e?t:i?Zr(t,e):function(){return t.apply(e,arguments)}},en=k("document","documentElement"),rn=d([].slice),nn=TypeError,on=/(?:ipad|iphone|ipod).*applewebkit/i.test(L),an=l.setImmediate,un=l.clearImmediate,cn=l.process,sn=l.Dispatch,fn=l.Function,ln=l.MessageChannel,pn=l.String,dn=0,vn={},hn="onreadystatechange";try{Hr=l.location}catch(t){}var gn=function(t){if(ut(vn,t)){var e=vn[t];delete vn[t],e()}},yn=function(t){return function(){gn(t)}},mn=function(t){gn(t.data)},En=function(t){l.postMessage(pn(t),Hr.protocol+"//"+Hr.host)};an&&un||(an=function(t){!function(t,e){if(t<e)throw nn("Not enough arguments")}(arguments.length,1);var e=w(t)?t:fn(t),r=rn(arguments,1);return vn[++dn]=function(){Qr(e,void 0,r)},Vr(dn),dn},un=function(t){delete vn[t]},_r?Vr=function(t){cn.nextTick(yn(t))}:sn&&sn.now?Vr=function(t){sn.now(yn(t))}:ln&&!on?(qr=(Br=new ln).port2,Br.port1.onmessage=mn,Vr=tn(qr.postMessage,qr)):l.addEventListener&&w(l.postMessage)&&!l.importScripts&&Hr&&"file:"!==Hr.protocol&&!s(En)?(Vr=En,l.addEventListener("message",mn,!1)):Vr=hn in I("script")?function(t){en.appendChild(I("script"))[hn]=function(){en.removeChild(this),gn(t)}}:function(t){setTimeout(yn(t),0)});var Rn,Sn,On,bn,In,Tn,wn,xn,_n={set:an,clear:un},Nn=/ipad|iphone|ipod/i.test(L)&&void 0!==l.Pebble,An=/web0s(?!.*chrome)/i.test(L),Cn=Ce.f,Pn=_n.set,kn=l.MutationObserver||l.WebKitMutationObserver,jn=l.document,Ln=l.process,Dn=l.Promise,Un=Cn(l,"queueMicrotask"),Mn=Un&&Un.value;Mn||(Rn=function(){var t,e;for(_r&&(t=Ln.domain)&&t.exit();Sn;){e=Sn.fn,Sn=Sn.next;try{e()}catch(t){throw Sn?bn():On=void 0,t}}On=void 0,t&&t.enter()},bn=on||_r||An||!kn||!jn?!Nn&&Dn&&Dn.resolve?((wn=Dn.resolve(void 0)).constructor=Dn,xn=tn(wn.then,wn),function(){xn(Rn)}):_r?function(){Ln.nextTick(Rn)}:(Pn=tn(Pn,l),function(){Pn(Rn)}):(In=!0,Tn=jn.createTextNode(""),new kn(Rn).observe(Tn,{characterData:!0}),function(){Tn.data=In=!In}));var Gn=Mn||function(t){var e={fn:t,next:void 0};On&&(On.next=e),Sn||(Sn=e,bn()),On=e},Fn=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}},Hn=function(){this.head=null,this.tail=null};Hn.prototype={add:function(t){var e={item:t,next:null};this.head?this.tail.next=e:this.head=e,this.tail=e},get:function(){var t=this.head;if(t)return this.head=t.next,this.tail===t&&(this.tail=null),t.item}};var Vn,Bn,qn,Kn,Yn,$n,Jn,Wn,zn=Hn,Xn=l.Promise,Qn="object"==typeof window&&"object"!=typeof Deno,Zn=(Xn&&Xn.prototype,gt("species")),to=!1,eo=w(l.PromiseRejectionEvent),ro={CONSTRUCTOR:R("Promise",function(){var t=Dt(Xn),e=t!==String(Xn);if(!e&&66===F)return!0;if(51<=F&&/native code/.test(t))return!1;var r=new Xn(function(t){t(1)}),n=function(t){t(function(){},function(){})};return(r.constructor={})[Zn]=n,!(to=r.then(function(){})instanceof n)||!e&&Qn&&!eo}),REJECTION_EVENT:eo,SUBCLASSING:to},no=function(t){var r,n;this.promise=new t(function(t,e){if(void 0!==r||void 0!==n)throw TypeError("Bad Promise constructor");r=t,n=e}),this.resolve=J(r),this.reject=J(n)},oo={f:function(t){return new no(t)}},io=_n.set,ao="Promise",uo=ro.CONSTRUCTOR,co=ro.REJECTION_EVENT,so=ro.SUBCLASSING,fo=Qt.getterFor(ao),lo=Qt.set,po=Xn&&Xn.prototype,vo=Xn,ho=po,go=l.TypeError,yo=l.document,mo=l.process,Eo=oo.f,Ro=Eo,So=!!(yo&&yo.createEvent&&l.dispatchEvent),Oo="unhandledrejection",bo=function(t){var e;return!(!S(t)||!w(e=t.then))&&e},Io=function(t,e){var r,n,o,i=e.value,a=1==e.state,u=a?t.ok:t.fail,c=t.resolve,s=t.reject,f=t.domain;try{u?(a||(2===e.rejection&&No(e),e.rejection=1),!0===u?r=i:(f&&f.enter(),r=u(i),f&&(f.exit(),o=!0)),r===t.promise?s(go("Promise-chain cycle")):(n=bo(r))?P(n,r,c,s):c(r)):s(i)}catch(t){f&&!o&&f.exit(),s(t)}},To=function(r,n){r.notified||(r.notified=!0,Gn(function(){for(var t,e=r.reactions;t=e.get();)Io(t,r);r.notified=!1,n&&!r.rejection&&xo(r)}))},wo=function(t,e,r){var n,o;So?((n=yo.createEvent("Event")).promise=e,n.reason=r,n.initEvent(t,!1,!0),l.dispatchEvent(n)):n={promise:e,reason:r},!co&&(o=l["on"+t])?o(n):t===Oo&&function(t,e){var r=l.console;r&&r.error&&(1==arguments.length?r.error(t):r.error(t,e))}("Unhandled promise rejection",r)},xo=function(n){P(io,l,function(){var t,e=n.facade,r=n.value;if(_o(n)&&(t=Fn(function(){_r?mo.emit("unhandledRejection",r,e):wo(Oo,e,r)}),n.rejection=_r||_o(n)?2:1,t.error))throw t.value})},_o=function(t){return 1!==t.rejection&&!t.parent},No=function(e){P(io,l,function(){var t=e.facade;_r?mo.emit("rejectionHandled",t):wo("rejectionhandled",t,e.value)})},Ao=function(e,r,n){return function(t){e(r,t,n)}},Co=function(t,e,r){t.done||(t.done=!0,r&&(t=r),t.value=e,t.state=2,To(t,!0))},Po=function(r,t,e){if(!r.done){r.done=!0,e&&(r=e);try{if(r.facade===t)throw go("Promise can't be resolved itself");var n=bo(t);n?Gn(function(){var e={done:!1};try{P(n,t,Ao(Po,e,r),Ao(Co,e,r))}catch(t){Co(e,t,r)}}):(r.value=t,r.state=1,To(r,!1))}catch(t){Co({done:!1},t,r)}}};if(uo&&(ho=(vo=function(t){!function(t,e){if(j(e,t))return;throw Pr("Incorrect invocation")}(this,ho),J(t),P(Vn,this);var e=fo(this);try{t(Ao(Po,e),Ao(Co,e))}catch(t){Co(e,t)}}).prototype,(Vn=function(t){lo(this,{type:ao,done:!1,notified:!1,parent:!1,reactions:new zn,rejection:!1,state:0,value:void 0})}).prototype=te(ho,"then",function(t,e){var r=fo(this),n=Eo(Jr(this,vo));return r.parent=!0,n.ok=!w(t)||t,n.fail=w(e)&&e,n.domain=_r?mo.domain:void 0,0==r.state?r.reactions.add(n):Gn(function(){Io(n,r)}),n.promise}),Bn=function(){var t=new Vn,e=fo(t);this.promise=t,this.resolve=Ao(Po,e),this.reject=Ao(Co,e)},oo.f=Eo=function(t){return t===vo||void 0===t?new Bn(t):Ro(t)},w(Xn)&&po!==Object.prototype)){qn=po.then,so||te(po,"then",function(t,e){var r=this;return new vo(function(t,e){P(qn,r,t,e)}).then(t,e)},{unsafe:!0});try{delete po.constructor}catch(t){}ne&&ne(po,ho)}vr({global:!0,constructor:!0,wrap:!0,forced:uo},{Promise:vo}),$n=!(Yn=ao),(Kn=vo)&&!$n&&(Kn=Kn.prototype),Kn&&!ut(Kn,Ar)&&Nr(Kn,Ar,{configurable:!0,value:Yn}),Jn=k(ao),Wn=xt.f,f&&Jn&&!Jn[Cr]&&Wn(Jn,Cr,{configurable:!0,get:function(){return this}});var ko={},jo=gt("iterator"),Lo=Array.prototype,Do=gt("iterator"),Uo=function(t){if(null!=t)return W(t,Do)||W(t,"@@iterator")||ko[Me(t)]},Mo=TypeError,Go=function(t,e,r){var n,o;A(t);try{if(!(n=W(t,"return"))){if("throw"===e)throw r;return r}n=P(n,t)}catch(t){o=!0,n=t}if("throw"===e)throw r;if(o)throw n;return A(n),r},Fo=TypeError,Ho=function(t,e){this.stopped=t,this.result=e},Vo=Ho.prototype,Bo=function(t,e,r){var n,o,i,a,u,c,s,f,l=r&&r.that,p=!(!r||!r.AS_ENTRIES),d=!(!r||!r.IS_ITERATOR),v=!(!r||!r.INTERRUPTED),h=tn(e,l),g=function(t){return n&&Go(n,"normal",t),new Ho(!0,t)},y=function(t){return p?(A(t),v?h(t[0],t[1],g):h(t[0],t[1])):v?h(t,g):h(t)};if(d)n=t;else{if(!(o=Uo(t)))throw Fo(Y(t)+" is not iterable");if(void 0!==(f=o)&&(ko.Array===f||Lo[jo]===f)){for(i=0,a=Ee(t);i<a;i++)if((u=y(t[i]))&&j(Vo,u))return u;return new Ho(!1)}n=function(t,e){var r=arguments.length<2?Uo(t):e;if(J(r))return A(P(r,t));throw Mo(Y(t)+" is not iterable")}(t,o)}for(c=n.next;!(s=P(c,n)).done;){try{u=y(s.value)}catch(t){Go(n,"throw",t)}if("object"==typeof u&&u&&j(Vo,u))return u}return new Ho(!1)},qo=gt("iterator"),Ko=!1;try{var Yo=0,$o={next:function(){return{done:!!Yo++}},return:function(){Ko=!0}};$o[qo]=function(){return this},Array.from($o,function(){throw 2})}catch(t){}var Jo=ro.CONSTRUCTOR||!function(t,e){if(!e&&!Ko)return!1;var r=!1;try{var n={};n[qo]=function(){return{next:function(){return{done:r=!0}}}},t(n)}catch(t){}return r}(function(t){Xn.all(t).then(void 0,function(){})});vr({target:"Promise",stat:!0,forced:Jo},{all:function(t){var u=this,e=oo.f(u),c=e.resolve,s=e.reject,r=Fn(function(){var n=J(u.resolve),o=[],i=0,a=1;Bo(t,function(t){var e=i++,r=!1;a++,P(n,u,t).then(function(t){r||(r=!0,o[e]=t,--a||c(o))},s)}),--a||c(o)});return r.error&&s(r.value),e.promise}});var Wo=ro.CONSTRUCTOR,zo=Xn&&Xn.prototype;if(vr({target:"Promise",proto:!0,forced:Wo,real:!0},{catch:function(t){return this.then(void 0,t)}}),w(Xn)){var Xo=k("Promise").prototype.catch;zo.catch!==Xo&&te(zo,"catch",Xo,{unsafe:!0})}vr({target:"Promise",stat:!0,forced:Jo},{race:function(t){var r=this,n=oo.f(r),o=n.reject,e=Fn(function(){var e=J(r.resolve);Bo(t,function(t){P(e,r,t).then(n.resolve,o)})});return e.error&&o(e.value),n.promise}}),vr({target:"Promise",stat:!0,forced:ro.CONSTRUCTOR},{reject:function(t){var e=oo.f(this);return P(e.reject,void 0,t),e.promise}});var Qo=ro.CONSTRUCTOR;k("Promise");vr({target:"Promise",stat:!0,forced:Qo},{resolve:function(t){return function(t,e){if(A(t),S(e)&&e.constructor===t)return e;var r=oo.f(t);return(0,r.resolve)(e),r.promise}(this,t)}});var Zo={SUCCESS:"SUCCESS",ERROR_PUBLISHABLE_KEY:"ERROR_PUBLISHABLE_KEY",ERROR_PERMISSIONS:"ERROR_PERMISSIONS",ERROR_LOCATION:"ERROR_LOCATION",ERROR_NETWORK:"ERROR_NETWORK",ERROR_BAD_REQUEST:"ERROR_BAD_REQUEST",ERROR_UNAUTHORIZED:"ERROR_UNAUTHORIZED",ERROR_PAYMENT_REQUIRED:"ERROR_PAYMENT_REQUIRED",ERROR_FORBIDDEN:"ERROR_FORBIDDEN",ERROR_NOT_FOUND:"ERROR_NOT_FOUND",ERROR_RATE_LIMIT:"ERROR_RATE_LIMIT",ERROR_SERVER:"ERROR_SERVER",ERROR_UNKNOWN:"ERROR_UNKNOWN"},ti=function(){function t(){Or(this,t)}return Ir(t,null,[{key:"getStorage",value:function(){return window&&window.localStorage||void 0}},{key:"setItem",value:function(t,e){var r=this.getStorage();r&&null!=e&&r.setItem(t,e)}},{key:"getItem",value:function(t){var e=this.getStorage();if(!e)return null;var r=e.getItem(t);return null!=r?r:null}},{key:"removeItem",value:function(t){var e=this.getStorage();if(!e)return null;e.removeItem(t)}},{key:"clear",value:function(){var t=this.getStorage();if(!t)return null;t.clear()}},{key:"DESCRIPTION",get:function(){return"radar-description"}},{key:"DEVICE_ID",get:function(){return"radar-deviceId"}},{key:"DEVICE_TYPE",get:function(){return"radar-deviceType"}},{key:"METADATA",get:function(){return"radar-metadata"}},{key:"HOST",get:function(){return"radar-host"}},{key:"PUBLISHABLE_KEY",get:function(){return"radar-publishableKey"}},{key:"USER_ID",get:function(){return"radar-userId"}},{key:"INSTALL_ID",get:function(){return"radar-installId"}},{key:"TRIP_OPTIONS",get:function(){return"radar-trip-options"}},{key:"CUSTOM_HEADERS",get:function(){return"radar-custom-headers"}},{key:"BASE_API_PATH",get:function(){return"radar-base-api-path"}},{key:"CACHE_LOCATION_MINUTES",get:function(){return"radar-cache-location-minutes"}},{key:"LAST_LOCATION",get:function(){return"radar-last-location"}}]),t}(),ei=function(){function t(){Or(this,t)}return Ir(t,null,[{key:"getCurrentPosition",value:function(){return new Promise(function(u,c){if(!navigator||!navigator.geolocation)return c(Zo.ERROR_LOCATION);var s=parseFloat(ti.getItem(ti.CACHE_LOCATION_MINUTES));if(s)try{var t=JSON.parse(ti.getItem(ti.LAST_LOCATION));if(t){var e=t.latitude,r=t.longitude,n=t.accuracy;if(Date.now()<parseInt(t.expiresAt)&&e&&r&&n)return u({latitude:e,longitude:r,accuracy:n})}}catch(t){console.warn("Radar SDK: could not load cached location.")}navigator.geolocation.getCurrentPosition(function(t){if(!t||!t.coords)return c(Zo.ERROR_LOCATION);var e=t.coords,r=e.latitude,n=e.longitude,o=e.accuracy;if(s){var i=Date.now(),a={latitude:r,longitude:n,accuracy:o,updatedAt:i,expiresAt:i+60*s*1e3};ti.setItem(ti.LAST_LOCATION,JSON.stringify(a))}return u({latitude:r,longitude:n,accuracy:o})},function(t){return t&&t.code&&1===t.code?c(Zo.ERROR_PERMISSIONS):c(Zo.ERROR_LOCATION)})})}}]),t}(),ri=Array.isArray||function(t){return"Array"==ae(t)},ni=TypeError,oi=function(t){if(9007199254740991<t)throw ni("Maximum allowed index exceeded");return t},ii=function(t,e,r){var n=Rt(e);n in t?xt.f(t,n,Gt(0,r)):t[n]=r},ai=gt("species"),ui=Array,ci=function(t,e){return ri(r=t)&&(n=r.constructor,Kr(n)&&(n===ui||ri(n.prototype))?n=void 0:S(n)&&null===(n=n[ai])&&(n=void 0)),new(void 0===n?ui:n)(0===e?0:e);var r,n},si=gt("species"),fi=function(e){return 51<=F||!s(function(){var t=[];return(t.constructor={})[si]=function(){return{foo:1}},1!==t[e](Boolean).foo})},li=gt("isConcatSpreadable"),pi=51<=F||!s(function(){var t=[];return t[li]=!1,t.concat()[0]!==t}),di=fi("concat"),vi=function(t){if(!S(t))return!1;var e=t[li];return void 0!==e?!!e:ri(t)};vr({target:"Array",proto:!0,arity:1,forced:!pi||!di},{concat:function(t){var e,r,n,o,i,a=it(this),u=ci(a,0),c=0;for(e=-1,n=arguments.length;e<n;e++)if(i=-1===e?a:arguments[e],vi(i))for(o=Ee(i),oi(c+o),r=0;r<o;r++,c++)r in i&&ii(u,c,i[r]);else oi(c+1),ii(u,c++,i);return u.length=c,u}});e(function(t){var e=function(a){var c,t=Object.prototype,f=t.hasOwnProperty,e="function"==typeof Symbol?Symbol:{},o=e.iterator||"@@iterator",r=e.asyncIterator||"@@asyncIterator",n=e.toStringTag||"@@toStringTag";function u(t,e,r,n){var i,a,u,c,o=e&&e.prototype instanceof y?e:y,s=Object.create(o.prototype),f=new x(n||[]);return s._invoke=(i=t,a=r,u=f,c=p,function(t,e){if(c===v)throw new Error("Generator is already running");if(c===h){if("throw"===t)throw e;return N()}for(u.method=t,u.arg=e;;){var r=u.delegate;if(r){var n=I(r,u);if(n){if(n===g)continue;return n}}if("next"===u.method)u.sent=u._sent=u.arg;else if("throw"===u.method){if(c===p)throw c=h,u.arg;u.dispatchException(u.arg)}else"return"===u.method&&u.abrupt("return",u.arg);c=v;var o=l(i,a,u);if("normal"===o.type){if(c=u.done?h:d,o.arg===g)continue;return{value:o.arg,done:u.done}}"throw"===o.type&&(c=h,u.method="throw",u.arg=o.arg)}}),s}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}a.wrap=u;var p="suspendedStart",d="suspendedYield",v="executing",h="completed",g={};function y(){}function i(){}function s(){}var m={};m[o]=function(){return this};var E=Object.getPrototypeOf,R=E&&E(E(_([])));R&&R!==t&&f.call(R,o)&&(m=R);var S=s.prototype=y.prototype=Object.create(m);function O(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function b(c,s){var e;this._invoke=function(r,n){function t(){return new s(function(t,e){!function e(t,r,n,o){var i=l(c[t],c,r);if("throw"!==i.type){var a=i.arg,u=a.value;return u&&"object"==typeof u&&f.call(u,"__await")?s.resolve(u.__await).then(function(t){e("next",t,n,o)},function(t){e("throw",t,n,o)}):s.resolve(u).then(function(t){a.value=t,n(a)},function(t){return e("throw",t,n,o)})}o(i.arg)}(r,n,t,e)})}return e=e?e.then(t,t):t()}}function I(t,e){var r=t.iterator[e.method];if(r===c){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=c,I(t,e),"throw"===e.method))return g;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return g}var n=l(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,g;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=c),e.delegate=null,g):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,g)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function w(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function _(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,n=function t(){for(;++r<e.length;)if(f.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=c,t.done=!0,t};return n.next=n}}return{next:N}}function N(){return{value:c,done:!0}}return i.prototype=S.constructor=s,s.constructor=i,s[n]=i.displayName="GeneratorFunction",a.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===i||"GeneratorFunction"===(e.displayName||e.name))},a.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,s):(t.__proto__=s,n in t||(t[n]="GeneratorFunction")),t.prototype=Object.create(S),t},a.awrap=function(t){return{__await:t}},O(b.prototype),b.prototype[r]=function(){return this},a.AsyncIterator=b,a.async=function(t,e,r,n,o){void 0===o&&(o=Promise);var i=new b(u(t,e,r,n),o);return a.isGeneratorFunction(e)?i:i.next().then(function(t){return t.done?t.value:i.next()})},O(S),S[n]="Generator",S[o]=function(){return this},S.toString=function(){return"[object Generator]"},a.keys=function(r){var n=[];for(var t in r)n.push(t);return n.reverse(),function t(){for(;n.length;){var e=n.pop();if(e in r)return t.value=e,t.done=!1,t}return t.done=!0,t}},a.values=_,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=c,this.done=!1,this.delegate=null,this.method="next",this.arg=c,this.tryEntries.forEach(w),!t)for(var e in this)"t"===e.charAt(0)&&f.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=c)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(r){if(this.done)throw r;var n=this;function t(t,e){return i.type="throw",i.arg=r,n.next=t,e&&(n.method="next",n.arg=c),!!e}for(var e=this.tryEntries.length-1;0<=e;--e){var o=this.tryEntries[e],i=o.completion;if("root"===o.tryLoc)return t("end");if(o.tryLoc<=this.prev){var a=f.call(o,"catchLoc"),u=f.call(o,"finallyLoc");if(a&&u){if(this.prev<o.catchLoc)return t(o.catchLoc,!0);if(this.prev<o.finallyLoc)return t(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return t(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return t(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;0<=r;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&f.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),w(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;w(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:_(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=c),g}},a}(t.exports);try{regeneratorRuntime=e}catch(t){Function("r","regeneratorRuntime = r")(e)}});var hi=d([].push),gi=function(d){var v=1==d,h=2==d,g=3==d,y=4==d,m=6==d,E=7==d,R=5==d||m;return function(t,e,r,n){for(var o,i,a=it(t),u=se(a),c=tn(e,r),s=Ee(u),f=0,l=n||ci,p=v?l(t,s):h||E?l(t,0):void 0;f<s;f++)if((R||f in u)&&(i=c(o=u[f],f,a),d))if(v)p[f]=i;else if(i)switch(d){case 3:return!0;case 5:return o;case 6:return f;case 2:hi(p,o)}else switch(d){case 4:return!1;case 7:hi(p,o)}return m?-1:g||y?y:p}},yi={forEach:gi(0),map:gi(1),filter:gi(2),some:gi(3),every:gi(4),find:gi(5),findIndex:gi(6),filterReject:gi(7)},mi=function(t,e){var r=[][t];return!!r&&s(function(){r.call(null,e||function(){return 1},1)})},Ei=yi.forEach,Ri=mi("forEach")?[].forEach:function(t){return Ei(this,t,1<arguments.length?arguments[1]:void 0)};vr({target:"Array",proto:!0,forced:[].forEach!=Ri},{forEach:Ri});var Si=d([].join),Oi=se!=Object,bi=mi("join",",");vr({target:"Array",proto:!0,forced:Oi||!bi},{join:function(t){return Si(fe(this),void 0===t?",":t)}});var Ii=yi.map;vr({target:"Array",proto:!0,forced:!fi("map")},{map:function(t){return Ii(this,t,1<arguments.length?arguments[1]:void 0)}});var Ti={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},wi=I("span").classList,xi=wi&&wi.constructor&&wi.constructor.prototype,_i=xi===Object.prototype?void 0:xi,Ni=function(e){if(e&&e.forEach!==Ri)try{Ft(e,"forEach",Ri)}catch(t){e.forEach=Ri}};for(var Ai in Ti)Ti[Ai]&&Ni(l[Ai]&&l[Ai].prototype);Ni(_i);var Ci,Pi=function(){function t(){Or(this,t)}return Ir(t,null,[{key:"getHost",value:function(){return ti.getItem(ti.HOST)||"https://api.radar.io"}}]),t}(),ki="3.6.1",ji=function(){function t(){Or(this,t)}return Ir(t,null,[{key:"request",value:function(l,p){var d=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};return new Promise(function(e,r){var n=new XMLHttpRequest,t=ti.getItem(ti.BASE_API_PATH)||"v1",o="".concat(Pi.getHost(),"/").concat(t,"/").concat(p),i={};if(Object.keys(d).forEach(function(t){var e=d[t];void 0!==e&&(i[t]=e)}),"GET"===l){var a=Object.keys(i).map(function(t){return"".concat(t,"=").concat(encodeURIComponent(i[t]))});if(0<a.length){var u=a.join("&");o="".concat(o,"?").concat(u)}i=void 0}n.open(l,o,!0);var c=ti.getItem(ti.PUBLISHABLE_KEY);if(c){n.setRequestHeader("Authorization",c),n.setRequestHeader("Content-Type","application/json"),n.setRequestHeader("X-Radar-Device-Type","Web"),n.setRequestHeader("X-Radar-SDK-Version",ki);var s=ti.getItem(ti.CUSTOM_HEADERS);if(s){var f=JSON.parse(s);Object.keys(f).forEach(function(t){n.setRequestHeader(t,f[t])})}n.onload=function(){var t;try{t=JSON.parse(n.response)}catch(t){r(Zo.ERROR_SERVER)}200==n.status?e(t):400===n.status?r({httpError:Zo.ERROR_BAD_REQUEST,response:t}):401===n.status?r({httpError:Zo.ERROR_UNAUTHORIZED,response:t}):402===n.status?r({httpError:Zo.ERROR_PAYMENT_REQUIRED,response:t}):403===n.status?r({httpError:Zo.ERROR_FORBIDDEN,response:t}):404===n.status?r({httpError:Zo.ERROR_NOT_FOUND,response:t}):429===n.status?r({httpError:Zo.ERROR_RATE_LIMIT,response:t}):500<=n.status&&n.status<600?r({httpError:Zo.ERROR_SERVER,response:t}):r({httpError:Zo.ERROR_UNKNOWN,response:t})},n.onerror=function(){r(Zo.ERROR_SERVER)},n.timeout=function(){r(Zo.ERROR_NETWORK)},n.send(JSON.stringify(i))}else r(Zo.ERROR_PUBLISHABLE_KEY)})}}]),t}(),Li=function(){function t(){Or(this,t)}var e;return Ir(t,null,[{key:"getContext",value:(e=Sr(regeneratorRuntime.mark(function t(){var e,r,n,o,i,a=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if((e=0<a.length&&void 0!==a[0]?a[0]:{}).latitude&&e.longitude){t.next=5;break}return t.next=4,ei.getCurrentPosition();case 4:e=t.sent;case 5:return n=(r=e).latitude,o=r.longitude,i={coordinates:"".concat(n,",").concat(o)},t.abrupt("return",ji.request("GET","context",i));case 8:case"end":return t.stop()}},t)})),function(){return e.apply(this,arguments)})}]),t}(),Di=function(){function t(){Or(this,t)}var e,r,n;return Ir(t,null,[{key:"geocode",value:(n=Sr(regeneratorRuntime.mark(function t(){var e,r,n,o,i=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=0<i.length&&void 0!==i[0]?i[0]:{},r=e.query,n=e.layers,o=e.country,t.abrupt("return",ji.request("GET","geocode/forward",{query:r,layers:n,country:o}));case 3:case"end":return t.stop()}},t)})),function(){return n.apply(this,arguments)})},{key:"reverseGeocode",value:(r=Sr(regeneratorRuntime.mark(function t(){var e,r,n,o,i,a,u,c,s=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if((e=0<s.length&&void 0!==s[0]?s[0]:{}).latitude&&e.longitude){t.next=9;break}return t.next=4,ei.getCurrentPosition();case 4:r=t.sent,n=r.latitude,o=r.longitude,e.latitude=n,e.longitude=o;case 9:return i=e.latitude,a=e.longitude,u=e.layers,c={coordinates:"".concat(i,",").concat(a),layers:u},t.abrupt("return",ji.request("GET","geocode/reverse",c));case 12:case"end":return t.stop()}},t)})),function(){return r.apply(this,arguments)})},{key:"ipGeocode",value:(e=Sr(regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",ji.request("GET","geocode/ip",{}));case 1:case"end":return t.stop()}},t)})),function(){return e.apply(this,arguments)})}]),t}(),Ui=function(){function t(){Or(this,t)}var e,r;return Ir(t,null,[{key:"getDistanceToDestination",value:(r=Sr(regeneratorRuntime.mark(function t(){var e,r,n,o,i,a,u,c,s,f,l,p=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if((e=0<p.length&&void 0!==p[0]?p[0]:{}).origin){t.next=8;break}return t.next=4,ei.getCurrentPosition();case 4:r=t.sent,n=r.latitude,o=r.longitude,e.origin={latitude:n,longitude:o};case 8:return i=e.origin,a=e.destination,u=e.modes,c=e.units,s=e.geometry,f=e.geometryPoints,i="".concat(i.latitude,",").concat(i.longitude),a&&(a="".concat(a.latitude,",").concat(a.longitude)),u&&(u=u.join(",")),l={origin:i,destination:a,modes:u,units:c,geometry:s,geometryPoints:f},t.abrupt("return",ji.request("GET","route/distance",l));case 14:case"end":return t.stop()}},t)})),function(){return r.apply(this,arguments)})},{key:"getMatrixDistances",value:(e=Sr(regeneratorRuntime.mark(function t(){var e,r,n,o,i,a,u,c,s,f,l=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if((e=0<l.length&&void 0!==l[0]?l[0]:{}).origins){t.next=8;break}return t.next=4,ei.getCurrentPosition();case 4:r=t.sent,n=r.latitude,o=r.longitude,e.origins=[{latitude:n,longitude:o}];case 8:return i=e.origins,a=e.destinations,u=e.mode,c=e.units,s=e.geometry,i=(i||[]).map(function(t){return"".concat(t.latitude,",").concat(t.longitude)}).join("|"),a=(a||[]).map(function(t){return"".concat(t.latitude,",").concat(t.longitude)}).join("|"),f={origins:i,destinations:a,mode:u,units:c,geometry:s},t.abrupt("return",ji.request("GET","route/matrix",f));case 13:case"end":return t.stop()}},t)})),function(){return e.apply(this,arguments)})}]),t}(),Mi=function(){function t(){Or(this,t)}var e,r,n;return Ir(t,null,[{key:"searchPlaces",value:(n=Sr(regeneratorRuntime.mark(function t(){var e,r,n,o,i,a,u,c,s,f,l,p=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if((e=0<p.length&&void 0!==p[0]?p[0]:{}).near){t.next=8;break}return t.next=4,ei.getCurrentPosition();case 4:r=t.sent,n=r.latitude,o=r.longitude,e.near={latitude:n,longitude:o};case 8:return i=e.near,a=e.radius,u=e.chains,c=e.categories,s=e.groups,f=e.limit,i="".concat(i.latitude,",").concat(i.longitude),u&&(u=u.join(",")),c&&(c=c.join(",")),s&&(s=s.join(",")),l={near:i,radius:a,chains:u,categories:c,groups:s,limit:f},t.abrupt("return",ji.request("GET","search/places",l));case 15:case"end":return t.stop()}},t)})),function(){return n.apply(this,arguments)})},{key:"searchGeofences",value:(r=Sr(regeneratorRuntime.mark(function t(){var e,r,n,o,i,a,u,c,s,f,l=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if((e=0<l.length&&void 0!==l[0]?l[0]:{}).near){t.next=8;break}return t.next=4,ei.getCurrentPosition();case 4:r=t.sent,n=r.latitude,o=r.longitude,e.near={latitude:n,longitude:o};case 8:return i=e.near,a=e.radius,u=e.tags,c=e.metadata,s=e.limit,i="".concat(i.latitude,",").concat(i.longitude),u&&(u=u.join(",")),f={near:i,radius:a,tags:u,limit:s},c&&Object.keys(c).forEach(function(t){var e="metadata[".concat(t,"]"),r=c[t];f[e]=r}),t.abrupt("return",ji.request("GET","search/geofences",f));case 14:case"end":return t.stop()}},t)})),function(){return r.apply(this,arguments)})},{key:"autocomplete",value:(e=Sr(regeneratorRuntime.mark(function t(){var e,r,n,o,i,a,u,c,s,f=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=0<f.length&&void 0!==f[0]?f[0]:{},o=n.query,i=n.near,a=n.limit,u=n.layers,c=n.country,(null===(e=i)||void 0===e?void 0:e.latitude)&&(null===(r=i)||void 0===r?void 0:r.longitude)&&(i="".concat(i.latitude,",").concat(i.longitude)),s={query:o,near:i,limit:a,layers:u,country:c},t.abrupt("return",ji.request("GET","search/autocomplete",s));case 5:case"end":return t.stop()}},t)})),function(){return e.apply(this,arguments)})}]),t}(),Gi=function(){var t=A(this),e="";return t.hasIndices&&(e+="d"),t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.unicodeSets&&(e+="v"),t.sticky&&(e+="y"),e},Fi=l.RegExp,Hi=s(function(){var t=Fi("a","y");return t.lastIndex=2,null!=t.exec("abcd")}),Vi=Hi||s(function(){return!Fi("a","y").sticky}),Bi={BROKEN_CARET:Hi||s(function(){var t=Fi("^r","gy");return t.lastIndex=2,null!=t.exec("str")}),MISSED_STICKY:Vi,UNSUPPORTED_Y:Hi},qi={f:f&&!x?Object.defineProperties:function(t,e){A(t);for(var r,n=fe(e),o=hr(e),i=o.length,a=0;a<i;)xt.f(t,r=o[a++],n[r]);return t}},Ki="prototype",Yi="script",$i=Vt("IE_PROTO"),Ji=function(){},Wi=function(t){return"<script>"+t+"</"+Yi+">"},zi=function(t){t.write(Wi("")),t.close();var e=t.parentWindow.Object;return t=null,e},Xi=function(){try{Ci=new ActiveXObject("htmlfile")}catch(t){}var t,e;Xi="undefined"!=typeof document?document.domain&&Ci?zi(Ci):((e=I("iframe")).style.display="none",en.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(Wi("document.F=Object")),t.close(),t.F):zi(Ci);for(var r=Ie.length;r--;)delete Xi[Ki][Ie[r]];return Xi()};Bt[$i]=!0;var Qi,Zi,ta=Object.create||function(t,e){var r;return null!==t?(Ji[Ki]=A(t),r=new Ji,Ji[Ki]=null,r[$i]=t):r=Xi(),void 0===e?r:qi.f(r,e)},ea=l.RegExp,ra=s(function(){var t=ea(".","s");return!(t.dotAll&&t.exec("\n")&&"s"===t.flags)}),na=l.RegExp,oa=s(function(){var t=na("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")}),ia=Qt.get,aa=et("native-string-replace",String.prototype.replace),ua=RegExp.prototype.exec,ca=ua,sa=d("".charAt),fa=d("".indexOf),la=d("".replace),pa=d("".slice),da=(Zi=/b*/g,P(ua,Qi=/a/,"a"),P(ua,Zi,"a"),0!==Qi.lastIndex||0!==Zi.lastIndex),va=Bi.BROKEN_CARET,ha=void 0!==/()??/.exec("")[1];(da||ha||va||ra||oa)&&(ca=function(t){var e,r,n,o,i,a,u,c=this,s=ia(c),f=Fe(t),l=s.raw;if(l)return l.lastIndex=c.lastIndex,e=P(ca,l,f),c.lastIndex=l.lastIndex,e;var p=s.groups,d=va&&c.sticky,v=P(Gi,c),h=c.source,g=0,y=f;if(d&&(v=la(v,"y",""),-1===fa(v,"g")&&(v+="g"),y=pa(f,c.lastIndex),0<c.lastIndex&&(!c.multiline||c.multiline&&"\n"!==sa(f,c.lastIndex-1))&&(h="(?: "+h+")",y=" "+y,g++),r=new RegExp("^(?:"+h+")",v)),ha&&(r=new RegExp("^"+h+"$(?!\\s)",v)),da&&(n=c.lastIndex),o=P(ua,d?r:c,y),d?o?(o.input=pa(o.input,g),o[0]=pa(o[0],g),o.index=c.lastIndex,c.lastIndex+=o[0].length):c.lastIndex=0:da&&o&&(c.lastIndex=c.global?o.index+o[0].length:n),ha&&o&&1<o.length&&P(aa,o[0],r,function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(o[i]=void 0)}),o&&p)for(o.groups=a=ta(null),i=0;i<p.length;i++)a[(u=p[i])[0]]=o[u[1]];return o});var ga=ca;vr({target:"RegExp",proto:!0,forced:/./.exec!==ga},{exec:ga});var ya=RegExp.prototype,ma=Ct.PROPER,Ea="toString",Ra=RegExp.prototype[Ea],Sa=s(function(){return"/a/b"!=Ra.call({source:"a",flags:"b"})}),Oa=ma&&Ra.name!=Ea;(Sa||Oa)&&te(RegExp.prototype,Ea,function(){var t,e,r=A(this);return"/"+Fe(r.source)+"/"+Fe(void 0!==(e=(t=r).flags)||"flags"in ya||ut(t,"flags")||!j(ya,t)?e:P(Gi,t))},{unsafe:!0});var ba=gt("species"),Ia=RegExp.prototype,Ta=d("".charAt),wa=d("".charCodeAt),xa=d("".slice),_a=function(u){return function(t,e){var r,n,o=Fe(nt(t)),i=ve(e),a=o.length;return i<0||a<=i?u?"":void 0:(r=wa(o,i))<55296||56319<r||i+1===a||(n=wa(o,i+1))<56320||57343<n?u?Ta(o,i):r:u?xa(o,i,i+2):n-56320+(r-55296<<10)+65536}},Na={codeAt:_a(!1),charAt:_a(!0)}.charAt,Aa=Math.floor,Ca=d("".charAt),Pa=d("".replace),ka=d("".slice),ja=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,La=/\$([$&'`]|\d{1,2})/g,Da=function(i,a,u,c,s,t){var f=u+i.length,l=c.length,e=La;return void 0!==s&&(s=it(s),e=ja),Pa(t,e,function(t,e){var r;switch(Ca(e,0)){case"$":return"$";case"&":return i;case"`":return ka(a,0,u);case"'":return ka(a,f);case"<":r=s[ka(e,1,-1)];break;default:var n=+e;if(0===n)return t;if(l<n){var o=Aa(n/10);return 0===o?t:o<=l?void 0===c[o-1]?Ca(e,1):c[o-1]+Ca(e,1):t}r=c[n-1]}return void 0===r?"":r})},Ua=TypeError,Ma=function(t,e){var r=t.exec;if(w(r)){var n=P(r,t,e);return null!==n&&A(n),n}if("RegExp"===ae(t))return P(ga,t,e);throw Ua("RegExp#exec called on incompatible receiver")},Ga=gt("replace"),Fa=Math.max,Ha=Math.min,Va=d([].concat),Ba=d([].push),qa=d("".indexOf),Ka=d("".slice),Ya="$0"==="a".replace(/./,"$0"),$a=!!/./[Ga]&&""===/./[Ga]("a","$0");!function(r,t,e,n){var o=gt(r),u=!s(function(){var t={};return t[o]=function(){return 7},7!=""[r](t)}),i=u&&!s(function(){var t=!1,e=/a/;return"split"===r&&((e={constructor:{}}).constructor[ba]=function(){return e},e.flags="",e[o]=/./[o]),e.exec=function(){return t=!0,null},e[o](""),!t});if(!u||!i||e){var c=d(/./[o]),a=t(o,""[r],function(t,e,r,n,o){var i=d(t),a=e.exec;return a===ga||a===Ia.exec?u&&!o?{done:!0,value:c(e,r,n)}:{done:!0,value:i(r,e,n)}:{done:!1}});te(String.prototype,r,a[0]),te(Ia,o,a[1])}n&&Ft(Ia[o],"sham",!0)}("replace",function(t,b,I){var T=$a?"$":"$0";return[function(t,e){var r=nt(this),n=null==t?void 0:W(t,Ga);return n?P(n,t,r,e):P(b,Fe(r),t,e)},function(t,e){var r=A(this),n=Fe(t);if("string"==typeof e&&-1===qa(e,T)&&-1===qa(e,"$<")){var o=I(b,r,n,e);if(o.done)return o.value}var i=w(e);i||(e=Fe(e));var a=r.global;if(a){var u=r.unicode;r.lastIndex=0}for(var c,s,f=[];;){var l=Ma(r,n);if(null===l)break;if(Ba(f,l),!a)break;""===Fe(l[0])&&(r.lastIndex=(c=n,(s=me(r.lastIndex))+(u?Na(c,s).length:1)))}for(var p,d="",v=0,h=0;h<f.length;h++){for(var g=Fe((l=f[h])[0]),y=Fa(Ha(ve(l.index),n.length),0),m=[],E=1;E<l.length;E++)Ba(m,void 0===(p=l[E])?p:String(p));var R=l.groups;if(i){var S=Va([g],m,y,n);void 0!==R&&Ba(S,R);var O=Fe(Qr(e,void 0,S))}else O=Da(g,n,y,m,R,e);v<=y&&(d+=Ka(n,v,y)+O,v=y+g.length)}return d+Ka(n,v)}]},!!s(function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")})||!Ya||$a);var Ja=function(){function t(){Or(this,t)}return Ir(t,null,[{key:"getId",value:function(){var t=ti.getItem(ti.DEVICE_ID);if(t)return t;var e="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)});return ti.setItem(ti.DEVICE_ID,e),e}}]),t}(),Wa=function(){function t(){Or(this,t)}var e;return Ir(t,null,[{key:"trackOnce",value:(e=Sr(regeneratorRuntime.mark(function t(){var e,r,n,o,i,a,u,c,s,f,l,p,d,v,h=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e=0<h.length&&void 0!==h[0]?h[0]:{},r=e.latitude,n=e.longitude,o=e.accuracy,r&&n){t.next=9;break}return t.next=5,ei.getCurrentPosition();case 5:i=t.sent,r=i.latitude,n=i.longitude,o=i.accuracy;case 9:return a=Ja.getId(),u=ti.getItem(ti.USER_ID),c=ti.getItem(ti.INSTALL_ID)||a,s=ti.getItem(ti.DEVICE_TYPE)||"Web",f=ti.getItem(ti.DESCRIPTION),(l=ti.getItem(ti.METADATA))&&(l=JSON.parse(l)),(p=ti.getItem(ti.TRIP_OPTIONS))&&((p=JSON.parse(p)).version="2"),d=wr({},e,{accuracy:o,description:f,deviceId:a,deviceType:s,foreground:!0,installId:c,latitude:r,longitude:n,metadata:l,sdkVersion:ki,stopped:!0,userId:u,tripOptions:p}),t.next=21,ji.request("POST","track",d);case 21:return(v=t.sent).location={latitude:r,longitude:n,accuracy:o},t.abrupt("return",v);case 24:case"end":return t.stop()}},t)})),function(){return e.apply(this,arguments)})}]),t}();vr({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return P(URL.prototype.toString,this)}});var za=function(t){return t&&"[object Date]"===Object.prototype.toString.call(t)&&!isNaN(t)},Xa=function(){function t(){Or(this,t)}var e,r;return Ir(t,null,[{key:"startTrip",value:(r=Sr(regeneratorRuntime.mark(function t(){var e,r,n,o,i,a,u,c,s,f,l=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=0<l.length&&void 0!==l[0]?l[0]:{},r=ti.getItem(ti.USER_ID),n=e.externalId,o=e.destinationGeofenceTag,i=e.destinationGeofenceExternalId,a=e.mode,u=e.metadata,c=e.approachingThreshold,s=e.scheduledArrivalAt,f={userId:r,externalId:n,destinationGeofenceTag:o,destinationGeofenceExternalId:i,mode:a,metadata:u,approachingThreshold:c},za(s)?f.scheduledArrivalAt=s.toJSON():f.scheduledArrivalAt=void 0,t.abrupt("return",ji.request("POST","trips",f));case 6:case"end":return t.stop()}},t)})),function(){return r.apply(this,arguments)})},{key:"updateTrip",value:(e=Sr(regeneratorRuntime.mark(function t(){var e,r,n,o,i,a,u,c,s,f,l,p=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=0<p.length&&void 0!==p[0]?p[0]:{},r=1<p.length?p[1]:void 0,n=ti.getItem(ti.USER_ID),o=e.externalId,i=e.destinationGeofenceTag,a=e.destinationGeofenceExternalId,u=e.mode,c=e.metadata,s=e.approachingThreshold,f=e.scheduledArrivalAt,l={userId:n,externalId:o,status:r,destinationGeofenceTag:i,destinationGeofenceExternalId:a,mode:u,metadata:c,approachingThreshold:s,scheduledArrivalAt:f},za(f)?l.scheduledArrivalAt=f.toJSON():l.scheduledArrivalAt=void 0,t.abrupt("return",ji.request("PATCH","trips/".concat(o,"/update"),l));case 7:case"end":return t.stop()}},t)})),function(){return e.apply(this,arguments)})}]),t}(),Qa=function(){function t(){Or(this,t)}var e;return Ir(t,null,[{key:"sendEvent",value:(e=Sr(regeneratorRuntime.mark(function t(){var e,r,n,o,i,a,u=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=0<u.length&&void 0!==u[0]?u[0]:{},r=e.type,n=e.metadata,o=e.createdAt,i=Ja.getId(),a=ti.getItem(ti.USER_ID),t.abrupt("return",ji.request("POST","events",{type:r,metadata:n,deviceId:i,userId:a,createdAt:o}));case 5:case"end":return t.stop()}},t)})),function(){return e.apply(this,arguments)})}]),t}(),Za="completed",tu="canceled",eu=function(){},ru=function(e){return function(t){"string"!=typeof t?"object"===Er(t)&&t.httpError?e(t.httpError,{},t.response):e(Zo.ERROR_UNKNOWN,{}):e(t,{})}};return function(){function n(){Or(this,n)}return Ir(n,null,[{key:"initialize",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};t||console.error('Radar "initialize" was called without a publishable key'),ti.setItem(ti.PUBLISHABLE_KEY,t);var r=e.cacheLocationMinutes;if(r){var n=Number(r);Number.isNaN(n)?console.warn('Radar SDK: invalid number for option "cacheLocationMinutes"'):ti.setItem(ti.CACHE_LOCATION_MINUTES,r)}else ti.removeItem(ti.CACHE_LOCATION_MINUTES)}},{key:"setHost",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"v1";ti.setItem(ti.HOST,t),ti.setItem(ti.BASE_API_PATH,e)}},{key:"setUserId",value:function(t){t?ti.setItem(ti.USER_ID,String(t).trim()):ti.removeItem(ti.USER_ID)}},{key:"setDeviceId",value:function(t,e){t?ti.setItem(ti.DEVICE_ID,String(t).trim()):ti.removeItem(ti.DEVICE_ID),e?ti.setItem(ti.INSTALL_ID,String(e).trim()):ti.removeItem(ti.INSTALL_ID)}},{key:"setDeviceType",value:function(t){t?ti.setItem(ti.DEVICE_TYPE,String(t).trim()):ti.removeItem(ti.DEVICE_TYPE)}},{key:"setDescription",value:function(t){t?ti.setItem(ti.DESCRIPTION,String(t).trim()):ti.removeItem(ti.DESCRIPTION)}},{key:"setMetadata",value:function(t){t?ti.setItem(ti.METADATA,JSON.stringify(t)):ti.removeItem(ti.METADATA)}},{key:"setRequestHeaders",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};Object.keys(t).length?ti.setItem(ti.CUSTOM_HEADERS,JSON.stringify(t)):ti.removeItem(ti.CUSTOM_HEADERS)}},{key:"getLocation",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:eu;ei.getCurrentPosition().then(function(t){e(null,{location:t,status:Zo.SUCCESS})}).catch(ru(e))}},{key:"trackOnce",value:function(t){var e,r,n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:eu;e="function"==typeof t?t:(r=t,n),Wa.trackOnce(r).then(function(t){e(null,{location:t.location,user:t.user,events:t.events,status:Zo.SUCCESS},t)}).catch(ru(e))}},{key:"getContext",value:function(t){var e,r,n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:eu;e="function"==typeof t?t:(r=t,n),Li.getContext(r).then(function(t){e(null,{context:t.context,status:Zo.SUCCESS},t)}).catch(ru(e))}},{key:"startTrip",value:function(e){var r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:eu;Xa.startTrip(e).then(function(t){n.setTripOptions(e),r(null,{trip:t.trip,events:t.events,status:Zo.SUCCESS},t)}).catch(ru(r))}},{key:"updateTrip",value:function(e,t){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:eu;Xa.updateTrip(e,t).then(function(t){n.setTripOptions(e),r(null,{trip:t.trip,events:t.events,status:Zo.SUCCESS},t)}).catch(ru(r))}},{key:"completeTrip",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:eu,t=n.getTripOptions();Xa.updateTrip(t,Za).then(function(t){n.clearTripOptions(),e(null,{trip:t.trip,events:t.events,status:Zo.SUCCESS},t)}).catch(ru(e))}},{key:"cancelTrip",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:eu,t=n.getTripOptions();Xa.updateTrip(t,tu).then(function(t){n.clearTripOptions(),e(null,{trip:t.trip,events:t.events,status:Zo.SUCCESS},t)}).catch(ru(e))}},{key:"setTripOptions",value:function(t){t?ti.setItem(ti.TRIP_OPTIONS,JSON.stringify(t)):n.clearTripOptions()}},{key:"clearTripOptions",value:function(){ti.removeItem(ti.TRIP_OPTIONS)}},{key:"getTripOptions",value:function(){var t=ti.getItem(ti.TRIP_OPTIONS);return t&&(t=JSON.parse(t)),t}},{key:"searchPlaces",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:eu;Mi.searchPlaces(t).then(function(t){e(null,{places:t.places,status:Zo.SUCCESS},t)}).catch(ru(e))}},{key:"searchGeofences",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:eu;Mi.searchGeofences(t).then(function(t){e(null,{geofences:t.geofences,status:Zo.SUCCESS},t)}).catch(ru(e))}},{key:"autocomplete",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:eu;Mi.autocomplete(t).then(function(t){e(null,{addresses:t.addresses,status:Zo.SUCCESS},t)}).catch(ru(e))}},{key:"geocode",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:eu;Di.geocode(t).then(function(t){e(null,{addresses:t.addresses,staus:Zo.SUCCESS},t)}).catch(ru(e))}},{key:"reverseGeocode",value:function(t){var e,r,n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:eu;e="function"==typeof t?t:(r=t,n),Di.reverseGeocode(r).then(function(t){e(null,{addresses:t.addresses,status:Zo.SUCCESS},t)}).catch(ru(e))}},{key:"ipGeocode",value:function(t){var e,r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:eu;"function"==typeof t?e=t:"object"===Er(t)&&(console.warn("Radar SDK: ipGeocode parameters have been deprecated."),e=r),Di.ipGeocode().then(function(t){e(null,{address:t.address,status:Zo.SUCCESS},t)}).catch(ru(e))}},{key:"getDistance",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:eu;Ui.getDistanceToDestination(t).then(function(t){e(null,{routes:t.routes,status:Zo.SUCCESS},t)}).catch(ru(e))}},{key:"getMatrix",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:eu;Ui.getMatrixDistances(t).then(function(t){e(null,{origins:t.origins,destinations:t.destinations,matrix:t.matrix,status:Zo.SUCCESS},t)}).catch(ru(e))}},{key:"sendEvent",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:eu;Qa.sendEvent(t).then(function(t){e(null,{event:t.event,status:Zo.SUCCESS},t)}).catch(ru(e))}},{key:"VERSION",get:function(){return ki}},{key:"STATUS",get:function(){return Zo}}]),n}()}();
1
+ var Radar=function(){"use strict";var s=function(t){try{return!!t()}catch(t){return!0}},f=!s(function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}),t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function e(t,e){return t(e={exports:{}},e.exports),e.exports}var r,n,o=function(t){return t&&t.Math==Math&&t},l=o("object"==typeof globalThis&&globalThis)||o("object"==typeof window&&window)||o("object"==typeof self&&self)||o("object"==typeof t&&t)||function(){return this}()||Function("return this")(),i=!s(function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}),a=Function.prototype,u=a.bind,c=a.call,p=i&&u.bind(c,c),d=i?function(t){return t&&p(t)}:function(t){return t&&function(){return c.apply(t,arguments)}},x=function(t){return"function"==typeof t},v=/#|\.prototype\./,h=function(t,e){var r=y[g(t)];return r==E||r!=m&&(x(e)?s(e):!!e)},g=h.normalize=function(t){return String(t).replace(v,".").toLowerCase()},y=h.data={},m=h.NATIVE="N",E=h.POLYFILL="P",R=h,S=function(t){return"object"==typeof t?null!==t:x(t)},O=l.document,b=S(O)&&S(O.createElement),I=function(t){return b?O.createElement(t):{}},T=!f&&!s(function(){return 7!=Object.defineProperty(I("div"),"a",{get:function(){return 7}}).a}),w=f&&s(function(){return 42!=Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype}),_=String,C=TypeError,N=function(t){if(S(t))return t;throw C(_(t)+" is not an object")},A=Function.prototype.call,k=i?A.bind(A):function(){return A.apply(A,arguments)},P=function(t,e){return arguments.length<2?(r=l[t],x(r)?r:void 0):l[t]&&l[t][e];var r},j=d({}.isPrototypeOf),L=P("navigator","userAgent")||"",D=l.process,U=l.Deno,M=D&&D.versions||U&&U.version,G=M&&M.v8;G&&(n=0<(r=G.split("."))[0]&&r[0]<4?1:+(r[0]+r[1])),!n&&L&&(!(r=L.match(/Edge\/(\d+)/))||74<=r[1])&&(r=L.match(/Chrome\/(\d+)/))&&(n=+r[1]);var F=n,H=!!Object.getOwnPropertySymbols&&!s(function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&F&&F<41}),V=H&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,B=Object,q=V?function(t){return"symbol"==typeof t}:function(t){var e=P("Symbol");return x(e)&&j(e.prototype,B(t))},K=String,Y=function(t){try{return K(t)}catch(t){return"Object"}},$=TypeError,J=function(t){if(x(t))return t;throw $(Y(t)+" is not a function")},W=function(t,e){var r=t[e];return null==r?void 0:J(r)},z=TypeError,X=Object.defineProperty,Q=function(e,r){try{X(l,e,{value:r,configurable:!0,writable:!0})}catch(t){l[e]=r}return r},Z="__core-js_shared__",tt=l[Z]||Q(Z,{}),et=e(function(t){(t.exports=function(t,e){return tt[t]||(tt[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.23.3",mode:"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.23.3/LICENSE",source:"https://github.com/zloirock/core-js"})}),rt=TypeError,nt=function(t){if(null==t)throw rt("Can't call method on "+t);return t},ot=Object,it=function(t){return ot(nt(t))},at=d({}.hasOwnProperty),ut=Object.hasOwn||function(t,e){return at(it(t),e)},ct=0,st=Math.random(),ft=d(1..toString),lt=function(t){return"Symbol("+(void 0===t?"":t)+")_"+ft(++ct+st,36)},pt=et("wks"),dt=l.Symbol,vt=dt&&dt.for,ht=V?dt:dt&&dt.withoutSetter||lt,gt=function(t){if(!ut(pt,t)||!H&&"string"!=typeof pt[t]){var e="Symbol."+t;H&&ut(dt,t)?pt[t]=dt[t]:pt[t]=V&&vt?vt(e):ht(e)}return pt[t]},yt=TypeError,mt=gt("toPrimitive"),Et=function(t,e){if(!S(t)||q(t))return t;var r,n=W(t,mt);if(n){if(void 0===e&&(e="default"),r=k(n,t,e),!S(r)||q(r))return r;throw yt("Can't convert object to primitive value")}return void 0===e&&(e="number"),function(t,e){var r,n;if("string"===e&&x(r=t.toString)&&!S(n=k(r,t)))return n;if(x(r=t.valueOf)&&!S(n=k(r,t)))return n;if("string"!==e&&x(r=t.toString)&&!S(n=k(r,t)))return n;throw z("Can't convert object to primitive value")}(t,e)},Rt=function(t){var e=Et(t,"string");return q(e)?e:e+""},St=TypeError,Ot=Object.defineProperty,bt=Object.getOwnPropertyDescriptor,It="enumerable",Tt="configurable",xt="writable",wt={f:f?w?function(t,e,r){if(N(t),e=Rt(e),N(r),"function"==typeof t&&"prototype"===e&&"value"in r&&xt in r&&!r[xt]){var n=bt(t,e);n&&n[xt]&&(t[e]=r.value,r={configurable:Tt in r?r[Tt]:n[Tt],enumerable:It in r?r[It]:n[It],writable:!1})}return Ot(t,e,r)}:Ot:function(t,e,r){if(N(t),e=Rt(e),N(r),T)try{return Ot(t,e,r)}catch(t){}if("get"in r||"set"in r)throw St("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},_t=Function.prototype,Ct=f&&Object.getOwnPropertyDescriptor,Nt=ut(_t,"name"),At={EXISTS:Nt,PROPER:Nt&&"something"===function(){}.name,CONFIGURABLE:Nt&&(!f||f&&Ct(_t,"name").configurable)},kt=d(Function.toString);x(tt.inspectSource)||(tt.inspectSource=function(t){return kt(t)});var Pt,jt,Lt,Dt=tt.inspectSource,Ut=l.WeakMap,Mt=x(Ut)&&/native code/.test(Dt(Ut)),Gt=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},Ft=f?function(t,e,r){return wt.f(t,e,Gt(1,r))}:function(t,e,r){return t[e]=r,t},Ht=et("keys"),Vt=function(t){return Ht[t]||(Ht[t]=lt(t))},Bt={},qt="Object already initialized",Kt=l.TypeError,Yt=l.WeakMap;if(Mt||tt.state){var $t=tt.state||(tt.state=new Yt),Jt=d($t.get),Wt=d($t.has),zt=d($t.set);Pt=function(t,e){if(Wt($t,t))throw new Kt(qt);return e.facade=t,zt($t,t,e),e},jt=function(t){return Jt($t,t)||{}},Lt=function(t){return Wt($t,t)}}else{var Xt=Vt("state");Bt[Xt]=!0,Pt=function(t,e){if(ut(t,Xt))throw new Kt(qt);return e.facade=t,Ft(t,Xt,e),e},jt=function(t){return ut(t,Xt)?t[Xt]:{}},Lt=function(t){return ut(t,Xt)}}var Qt={set:Pt,get:jt,has:Lt,enforce:function(t){return Lt(t)?jt(t):Pt(t,{})},getterFor:function(r){return function(t){var e;if(!S(t)||(e=jt(t)).type!==r)throw Kt("Incompatible receiver, "+r+" required");return e}}},Zt=e(function(t){var o=At.CONFIGURABLE,i=Qt.enforce,e=Qt.get,a=Object.defineProperty,u=f&&!s(function(){return 8!==a(function(){},"length",{value:8}).length}),c=String(String).split("String"),r=t.exports=function(t,e,r){"Symbol("===String(e).slice(0,7)&&(e="["+String(e).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),r&&r.getter&&(e="get "+e),r&&r.setter&&(e="set "+e),(!ut(t,"name")||o&&t.name!==e)&&(f?a(t,"name",{value:e,configurable:!0}):t.name=e),u&&r&&ut(r,"arity")&&t.length!==r.arity&&a(t,"length",{value:r.arity});try{r&&ut(r,"constructor")&&r.constructor?f&&a(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var n=i(t);return ut(n,"source")||(n.source=c.join("string"==typeof e?e:"")),t};Function.prototype.toString=r(function(){return x(this)&&e(this).source||Dt(this)},"toString")}),te=function(t,e,r,n){n||(n={});var o=n.enumerable,i=void 0!==n.name?n.name:e;if(x(r)&&Zt(r,i,n),n.global)o?t[e]=r:Q(e,r);else{try{n.unsafe?t[e]&&(o=!0):delete t[e]}catch(t){}o?t[e]=r:wt.f(t,e,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return t},ee=String,re=TypeError,ne=Object.setPrototypeOf||("__proto__"in{}?function(){var r,n=!1,t={};try{(r=d(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(t,[]),n=t instanceof Array}catch(t){}return function(t,e){return N(t),function(t){if("object"==typeof t||x(t))return;throw re("Can't set "+ee(t)+" as a prototype")}(e),n?r(t,e):t.__proto__=e,t}}():void 0),oe=d({}.toString),ie=d("".slice),ae=function(t){return ie(oe(t),8,-1)},ue=Object,ce=d("".split),se=s(function(){return!ue("z").propertyIsEnumerable(0)})?function(t){return"String"==ae(t)?ce(t,""):ue(t)}:ue,fe=function(t){return se(nt(t))},le=Math.ceil,pe=Math.floor,de=Math.trunc||function(t){var e=+t;return(0<e?pe:le)(e)},ve=function(t){var e=+t;return e!=e||0===e?0:de(e)},he=Math.max,ge=Math.min,ye=Math.min,me=function(t){return 0<t?ye(ve(t),9007199254740991):0},Ee=function(t){return me(t.length)},Re=function(s){return function(t,e,r){var n,o,i,a=fe(t),u=Ee(a),c=(n=u,(o=ve(r))<0?he(o+n,0):ge(o,n));if(s&&e!=e){for(;c<u;)if((i=a[c++])!=i)return!0}else for(;c<u;c++)if((s||c in a)&&a[c]===e)return s||c||0;return!s&&-1}},Se={includes:Re(!0),indexOf:Re(!1)}.indexOf,Oe=d([].push),be=function(t,e){var r,n=fe(t),o=0,i=[];for(r in n)!ut(Bt,r)&&ut(n,r)&&Oe(i,r);for(;e.length>o;)ut(n,r=e[o++])&&(~Se(i,r)||Oe(i,r));return i},Ie=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Te=Ie.concat("length","prototype"),xe={f:Object.getOwnPropertyNames||function(t){return be(t,Te)}},we={}.propertyIsEnumerable,_e=Object.getOwnPropertyDescriptor,Ce={f:_e&&!we.call({1:2},1)?function(t){var e=_e(this,t);return!!e&&e.enumerable}:we},Ne=Object.getOwnPropertyDescriptor,Ae={f:f?Ne:function(t,e){if(t=fe(t),e=Rt(e),T)try{return Ne(t,e)}catch(t){}if(ut(t,e))return Gt(!k(Ce.f,t,e),t[e])}},ke=d(1..valueOf),Pe={};Pe[gt("toStringTag")]="z";var je="[object z]"===String(Pe),Le=gt("toStringTag"),De=Object,Ue="Arguments"==ae(function(){return arguments}()),Me=je?ae:function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=De(t),Le))?r:Ue?ae(e):"Object"==(n=ae(e))&&x(e.callee)?"Arguments":n},Ge=String,Fe=function(t){if("Symbol"===Me(t))throw TypeError("Cannot convert a Symbol value to a string");return Ge(t)},He="\t\n\v\f\r                 \u2028\u2029\ufeff",Ve=d("".replace),Be="["+He+"]",qe=RegExp("^"+Be+Be+"*"),Ke=RegExp(Be+Be+"*$"),Ye=function(r){return function(t){var e=Fe(nt(t));return 1&r&&(e=Ve(e,qe,"")),2&r&&(e=Ve(e,Ke,"")),e}},$e={start:Ye(1),end:Ye(2),trim:Ye(3)},Je=xe.f,We=Ae.f,ze=wt.f,Xe=$e.trim,Qe="Number",Ze=l[Qe],tr=Ze.prototype,er=l.TypeError,rr=d("".slice),nr=d("".charCodeAt),or=function(t){var e,r,n,o,i,a,u,c,s=Et(t,"number");if(q(s))throw er("Cannot convert a Symbol value to a number");if("string"==typeof s&&2<s.length)if(s=Xe(s),43===(e=nr(s,0))||45===e){if(88===(r=nr(s,2))||120===r)return NaN}else if(48===e){switch(nr(s,1)){case 66:case 98:n=2,o=49;break;case 79:case 111:n=8,o=55;break;default:return+s}for(a=(i=rr(s,2)).length,u=0;u<a;u++)if((c=nr(i,u))<48||o<c)return NaN;return parseInt(i,n)}return+s};if(R(Qe,!Ze(" 0o1")||!Ze("0b1")||Ze("+0x1"))){for(var ir,ar=function(t){var e,r,n,o,i,a,u=arguments.length<1?0:Ze("bigint"==typeof(e=Et(t,"number"))?e:or(e)),c=this;return j(tr,c)&&s(function(){ke(c)})?(r=Object(u),n=c,o=ar,ne&&x(i=n.constructor)&&i!==o&&S(a=i.prototype)&&a!==o.prototype&&ne(r,a),r):u},ur=f?Je(Ze):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),cr=0;ur.length>cr;cr++)ut(Ze,ir=ur[cr])&&!ut(ar,ir)&&ze(ar,ir,We(Ze,ir));(ar.prototype=tr).constructor=ar,te(l,Qe,ar,{constructor:!0})}var sr={f:Object.getOwnPropertySymbols},fr=d([].concat),lr=P("Reflect","ownKeys")||function(t){var e=xe.f(N(t)),r=sr.f;return r?fr(e,r(t)):e},pr=function(t,e,r){for(var n=lr(e),o=wt.f,i=Ae.f,a=0;a<n.length;a++){var u=n[a];ut(t,u)||r&&ut(r,u)||o(t,u,i(e,u))}},dr=Ae.f,vr=function(t,e){var r,n,o,i,a,u=t.target,c=t.global,s=t.stat;if(r=c?l:s?l[u]||Q(u,{}):(l[u]||{}).prototype)for(n in e){if(i=e[n],o=t.dontCallGetSet?(a=dr(r,n))&&a.value:r[n],!R(c?n:u+(s?".":"#")+n,t.forced)&&void 0!==o){if(typeof i==typeof o)continue;pr(i,o)}(t.sham||o&&o.sham)&&Ft(i,"sham",!0),te(r,n,i,t)}};vr({target:"Number",stat:!0},{isNaN:function(t){return t!=t}});var hr=Object.keys||function(t){return be(t,Ie)};vr({target:"Object",stat:!0,forced:s(function(){hr(1)})},{keys:function(t){return hr(it(t))}});var gr,yr=At.PROPER,mr=$e.trim;function Er(t){return(Er="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Rr(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function Sr(u){return function(){var t=this,a=arguments;return new Promise(function(e,r){var n=u.apply(t,a);function o(t){Rr(n,e,r,o,i,"next",t)}function i(t){Rr(n,e,r,o,i,"throw",t)}o(void 0)})}}function Or(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function br(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Ir(t,e,r){return e&&br(t.prototype,e),r&&br(t,r),t}function Tr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function xr(o){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Tr(Object(i),!0).forEach(function(t){var e,r,n;e=o,n=i[r=t],r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(i)):Tr(Object(i)).forEach(function(t){Object.defineProperty(o,t,Object.getOwnPropertyDescriptor(i,t))})}return o}vr({target:"String",proto:!0,forced:(gr="trim",s(function(){return!!He[gr]()||"​…᠎"!=="​…᠎"[gr]()||yr&&He[gr].name!==gr}))},{trim:function(){return mr(this)}});var wr=je?{}.toString:function(){return"[object "+Me(this)+"]"};je||te(Object.prototype,"toString",wr,{unsafe:!0});var _r="process"==ae(l.process),Cr=wt.f,Nr=gt("toStringTag"),Ar=gt("species"),kr=TypeError,Pr=function(){},jr=[],Lr=P("Reflect","construct"),Dr=/^\s*(?:class|function)\b/,Ur=d(Dr.exec),Mr=!Dr.exec(Pr),Gr=function(t){if(!x(t))return!1;try{return Lr(Pr,jr,t),!0}catch(t){return!1}},Fr=function(t){if(!x(t))return!1;switch(Me(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Mr||!!Ur(Dr,Dt(t))}catch(t){return!0}};Fr.sham=!0;var Hr,Vr,Br,qr,Kr=!Lr||s(function(){var t;return Gr(Gr.call)||!Gr(Object)||!Gr(function(){t=!0})||t})?Fr:Gr,Yr=TypeError,$r=gt("species"),Jr=function(t,e){var r,n=N(t).constructor;return void 0===n||null==(r=N(n)[$r])?e:function(t){if(Kr(t))return t;throw Yr(Y(t)+" is not a constructor")}(r)},Wr=Function.prototype,zr=Wr.apply,Xr=Wr.call,Qr="object"==typeof Reflect&&Reflect.apply||(i?Xr.bind(zr):function(){return Xr.apply(zr,arguments)}),Zr=d(d.bind),tn=function(t,e){return J(t),void 0===e?t:i?Zr(t,e):function(){return t.apply(e,arguments)}},en=P("document","documentElement"),rn=d([].slice),nn=TypeError,on=/(?:ipad|iphone|ipod).*applewebkit/i.test(L),an=l.setImmediate,un=l.clearImmediate,cn=l.process,sn=l.Dispatch,fn=l.Function,ln=l.MessageChannel,pn=l.String,dn=0,vn={},hn="onreadystatechange";try{Hr=l.location}catch(t){}var gn=function(t){if(ut(vn,t)){var e=vn[t];delete vn[t],e()}},yn=function(t){return function(){gn(t)}},mn=function(t){gn(t.data)},En=function(t){l.postMessage(pn(t),Hr.protocol+"//"+Hr.host)};an&&un||(an=function(t){!function(t,e){if(t<e)throw nn("Not enough arguments")}(arguments.length,1);var e=x(t)?t:fn(t),r=rn(arguments,1);return vn[++dn]=function(){Qr(e,void 0,r)},Vr(dn),dn},un=function(t){delete vn[t]},_r?Vr=function(t){cn.nextTick(yn(t))}:sn&&sn.now?Vr=function(t){sn.now(yn(t))}:ln&&!on?(qr=(Br=new ln).port2,Br.port1.onmessage=mn,Vr=tn(qr.postMessage,qr)):l.addEventListener&&x(l.postMessage)&&!l.importScripts&&Hr&&"file:"!==Hr.protocol&&!s(En)?(Vr=En,l.addEventListener("message",mn,!1)):Vr=hn in I("script")?function(t){en.appendChild(I("script"))[hn]=function(){en.removeChild(this),gn(t)}}:function(t){setTimeout(yn(t),0)});var Rn,Sn,On,bn,In,Tn,xn,wn,_n={set:an,clear:un},Cn=/ipad|iphone|ipod/i.test(L)&&void 0!==l.Pebble,Nn=/web0s(?!.*chrome)/i.test(L),An=Ae.f,kn=_n.set,Pn=l.MutationObserver||l.WebKitMutationObserver,jn=l.document,Ln=l.process,Dn=l.Promise,Un=An(l,"queueMicrotask"),Mn=Un&&Un.value;Mn||(Rn=function(){var t,e;for(_r&&(t=Ln.domain)&&t.exit();Sn;){e=Sn.fn,Sn=Sn.next;try{e()}catch(t){throw Sn?bn():On=void 0,t}}On=void 0,t&&t.enter()},bn=on||_r||Nn||!Pn||!jn?!Cn&&Dn&&Dn.resolve?((xn=Dn.resolve(void 0)).constructor=Dn,wn=tn(xn.then,xn),function(){wn(Rn)}):_r?function(){Ln.nextTick(Rn)}:(kn=tn(kn,l),function(){kn(Rn)}):(In=!0,Tn=jn.createTextNode(""),new Pn(Rn).observe(Tn,{characterData:!0}),function(){Tn.data=In=!In}));var Gn=Mn||function(t){var e={fn:t,next:void 0};On&&(On.next=e),Sn||(Sn=e,bn()),On=e},Fn=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}},Hn=function(){this.head=null,this.tail=null};Hn.prototype={add:function(t){var e={item:t,next:null};this.head?this.tail.next=e:this.head=e,this.tail=e},get:function(){var t=this.head;if(t)return this.head=t.next,this.tail===t&&(this.tail=null),t.item}};var Vn,Bn,qn,Kn,Yn,$n,Jn,Wn,zn=Hn,Xn=l.Promise,Qn="object"==typeof window&&"object"!=typeof Deno,Zn=(Xn&&Xn.prototype,gt("species")),to=!1,eo=x(l.PromiseRejectionEvent),ro={CONSTRUCTOR:R("Promise",function(){var t=Dt(Xn),e=t!==String(Xn);if(!e&&66===F)return!0;if(51<=F&&/native code/.test(t))return!1;var r=new Xn(function(t){t(1)}),n=function(t){t(function(){},function(){})};return(r.constructor={})[Zn]=n,!(to=r.then(function(){})instanceof n)||!e&&Qn&&!eo}),REJECTION_EVENT:eo,SUBCLASSING:to},no=function(t){var r,n;this.promise=new t(function(t,e){if(void 0!==r||void 0!==n)throw TypeError("Bad Promise constructor");r=t,n=e}),this.resolve=J(r),this.reject=J(n)},oo={f:function(t){return new no(t)}},io=_n.set,ao="Promise",uo=ro.CONSTRUCTOR,co=ro.REJECTION_EVENT,so=ro.SUBCLASSING,fo=Qt.getterFor(ao),lo=Qt.set,po=Xn&&Xn.prototype,vo=Xn,ho=po,go=l.TypeError,yo=l.document,mo=l.process,Eo=oo.f,Ro=Eo,So=!!(yo&&yo.createEvent&&l.dispatchEvent),Oo="unhandledrejection",bo=function(t){var e;return!(!S(t)||!x(e=t.then))&&e},Io=function(t,e){var r,n,o,i=e.value,a=1==e.state,u=a?t.ok:t.fail,c=t.resolve,s=t.reject,f=t.domain;try{u?(a||(2===e.rejection&&Co(e),e.rejection=1),!0===u?r=i:(f&&f.enter(),r=u(i),f&&(f.exit(),o=!0)),r===t.promise?s(go("Promise-chain cycle")):(n=bo(r))?k(n,r,c,s):c(r)):s(i)}catch(t){f&&!o&&f.exit(),s(t)}},To=function(r,n){r.notified||(r.notified=!0,Gn(function(){for(var t,e=r.reactions;t=e.get();)Io(t,r);r.notified=!1,n&&!r.rejection&&wo(r)}))},xo=function(t,e,r){var n,o;So?((n=yo.createEvent("Event")).promise=e,n.reason=r,n.initEvent(t,!1,!0),l.dispatchEvent(n)):n={promise:e,reason:r},!co&&(o=l["on"+t])?o(n):t===Oo&&function(t,e){var r=l.console;r&&r.error&&(1==arguments.length?r.error(t):r.error(t,e))}("Unhandled promise rejection",r)},wo=function(n){k(io,l,function(){var t,e=n.facade,r=n.value;if(_o(n)&&(t=Fn(function(){_r?mo.emit("unhandledRejection",r,e):xo(Oo,e,r)}),n.rejection=_r||_o(n)?2:1,t.error))throw t.value})},_o=function(t){return 1!==t.rejection&&!t.parent},Co=function(e){k(io,l,function(){var t=e.facade;_r?mo.emit("rejectionHandled",t):xo("rejectionhandled",t,e.value)})},No=function(e,r,n){return function(t){e(r,t,n)}},Ao=function(t,e,r){t.done||(t.done=!0,r&&(t=r),t.value=e,t.state=2,To(t,!0))},ko=function(r,t,e){if(!r.done){r.done=!0,e&&(r=e);try{if(r.facade===t)throw go("Promise can't be resolved itself");var n=bo(t);n?Gn(function(){var e={done:!1};try{k(n,t,No(ko,e,r),No(Ao,e,r))}catch(t){Ao(e,t,r)}}):(r.value=t,r.state=1,To(r,!1))}catch(t){Ao({done:!1},t,r)}}};if(uo&&(ho=(vo=function(t){!function(t,e){if(j(e,t))return;throw kr("Incorrect invocation")}(this,ho),J(t),k(Vn,this);var e=fo(this);try{t(No(ko,e),No(Ao,e))}catch(t){Ao(e,t)}}).prototype,(Vn=function(t){lo(this,{type:ao,done:!1,notified:!1,parent:!1,reactions:new zn,rejection:!1,state:0,value:void 0})}).prototype=te(ho,"then",function(t,e){var r=fo(this),n=Eo(Jr(this,vo));return r.parent=!0,n.ok=!x(t)||t,n.fail=x(e)&&e,n.domain=_r?mo.domain:void 0,0==r.state?r.reactions.add(n):Gn(function(){Io(n,r)}),n.promise}),Bn=function(){var t=new Vn,e=fo(t);this.promise=t,this.resolve=No(ko,e),this.reject=No(Ao,e)},oo.f=Eo=function(t){return t===vo||void 0===t?new Bn(t):Ro(t)},x(Xn)&&po!==Object.prototype)){qn=po.then,so||te(po,"then",function(t,e){var r=this;return new vo(function(t,e){k(qn,r,t,e)}).then(t,e)},{unsafe:!0});try{delete po.constructor}catch(t){}ne&&ne(po,ho)}vr({global:!0,constructor:!0,wrap:!0,forced:uo},{Promise:vo}),$n=!(Yn=ao),(Kn=vo)&&!$n&&(Kn=Kn.prototype),Kn&&!ut(Kn,Nr)&&Cr(Kn,Nr,{configurable:!0,value:Yn}),Jn=P(ao),Wn=wt.f,f&&Jn&&!Jn[Ar]&&Wn(Jn,Ar,{configurable:!0,get:function(){return this}});var Po={},jo=gt("iterator"),Lo=Array.prototype,Do=gt("iterator"),Uo=function(t){if(null!=t)return W(t,Do)||W(t,"@@iterator")||Po[Me(t)]},Mo=TypeError,Go=function(t,e,r){var n,o;N(t);try{if(!(n=W(t,"return"))){if("throw"===e)throw r;return r}n=k(n,t)}catch(t){o=!0,n=t}if("throw"===e)throw r;if(o)throw n;return N(n),r},Fo=TypeError,Ho=function(t,e){this.stopped=t,this.result=e},Vo=Ho.prototype,Bo=function(t,e,r){var n,o,i,a,u,c,s,f,l=r&&r.that,p=!(!r||!r.AS_ENTRIES),d=!(!r||!r.IS_ITERATOR),v=!(!r||!r.INTERRUPTED),h=tn(e,l),g=function(t){return n&&Go(n,"normal",t),new Ho(!0,t)},y=function(t){return p?(N(t),v?h(t[0],t[1],g):h(t[0],t[1])):v?h(t,g):h(t)};if(d)n=t;else{if(!(o=Uo(t)))throw Fo(Y(t)+" is not iterable");if(void 0!==(f=o)&&(Po.Array===f||Lo[jo]===f)){for(i=0,a=Ee(t);i<a;i++)if((u=y(t[i]))&&j(Vo,u))return u;return new Ho(!1)}n=function(t,e){var r=arguments.length<2?Uo(t):e;if(J(r))return N(k(r,t));throw Mo(Y(t)+" is not iterable")}(t,o)}for(c=n.next;!(s=k(c,n)).done;){try{u=y(s.value)}catch(t){Go(n,"throw",t)}if("object"==typeof u&&u&&j(Vo,u))return u}return new Ho(!1)},qo=gt("iterator"),Ko=!1;try{var Yo=0,$o={next:function(){return{done:!!Yo++}},return:function(){Ko=!0}};$o[qo]=function(){return this},Array.from($o,function(){throw 2})}catch(t){}var Jo=ro.CONSTRUCTOR||!function(t,e){if(!e&&!Ko)return!1;var r=!1;try{var n={};n[qo]=function(){return{next:function(){return{done:r=!0}}}},t(n)}catch(t){}return r}(function(t){Xn.all(t).then(void 0,function(){})});vr({target:"Promise",stat:!0,forced:Jo},{all:function(t){var u=this,e=oo.f(u),c=e.resolve,s=e.reject,r=Fn(function(){var n=J(u.resolve),o=[],i=0,a=1;Bo(t,function(t){var e=i++,r=!1;a++,k(n,u,t).then(function(t){r||(r=!0,o[e]=t,--a||c(o))},s)}),--a||c(o)});return r.error&&s(r.value),e.promise}});var Wo=ro.CONSTRUCTOR,zo=Xn&&Xn.prototype;if(vr({target:"Promise",proto:!0,forced:Wo,real:!0},{catch:function(t){return this.then(void 0,t)}}),x(Xn)){var Xo=P("Promise").prototype.catch;zo.catch!==Xo&&te(zo,"catch",Xo,{unsafe:!0})}vr({target:"Promise",stat:!0,forced:Jo},{race:function(t){var r=this,n=oo.f(r),o=n.reject,e=Fn(function(){var e=J(r.resolve);Bo(t,function(t){k(e,r,t).then(n.resolve,o)})});return e.error&&o(e.value),n.promise}}),vr({target:"Promise",stat:!0,forced:ro.CONSTRUCTOR},{reject:function(t){var e=oo.f(this);return k(e.reject,void 0,t),e.promise}});var Qo=ro.CONSTRUCTOR;P("Promise");vr({target:"Promise",stat:!0,forced:Qo},{resolve:function(t){return function(t,e){if(N(t),S(e)&&e.constructor===t)return e;var r=oo.f(t);return(0,r.resolve)(e),r.promise}(this,t)}});var Zo={SUCCESS:"SUCCESS",ERROR_PUBLISHABLE_KEY:"ERROR_PUBLISHABLE_KEY",ERROR_PERMISSIONS:"ERROR_PERMISSIONS",ERROR_LOCATION:"ERROR_LOCATION",ERROR_NETWORK:"ERROR_NETWORK",ERROR_BAD_REQUEST:"ERROR_BAD_REQUEST",ERROR_UNAUTHORIZED:"ERROR_UNAUTHORIZED",ERROR_PAYMENT_REQUIRED:"ERROR_PAYMENT_REQUIRED",ERROR_FORBIDDEN:"ERROR_FORBIDDEN",ERROR_NOT_FOUND:"ERROR_NOT_FOUND",ERROR_RATE_LIMIT:"ERROR_RATE_LIMIT",ERROR_SERVER:"ERROR_SERVER",ERROR_UNKNOWN:"ERROR_UNKNOWN"},ti=function(){function t(){Or(this,t)}return Ir(t,null,[{key:"getStorage",value:function(){return window&&window.localStorage||void 0}},{key:"setItem",value:function(t,e){var r=this.getStorage();r&&null!=e&&r.setItem(t,e)}},{key:"getItem",value:function(t){var e=this.getStorage();if(!e)return null;var r=e.getItem(t);return null!=r?r:null}},{key:"removeItem",value:function(t){var e=this.getStorage();if(!e)return null;e.removeItem(t)}},{key:"clear",value:function(){var t=this.getStorage();if(!t)return null;t.clear()}},{key:"DESCRIPTION",get:function(){return"radar-description"}},{key:"DEVICE_ID",get:function(){return"radar-deviceId"}},{key:"DEVICE_TYPE",get:function(){return"radar-deviceType"}},{key:"METADATA",get:function(){return"radar-metadata"}},{key:"HOST",get:function(){return"radar-host"}},{key:"PUBLISHABLE_KEY",get:function(){return"radar-publishableKey"}},{key:"USER_ID",get:function(){return"radar-userId"}},{key:"INSTALL_ID",get:function(){return"radar-installId"}},{key:"TRIP_OPTIONS",get:function(){return"radar-trip-options"}},{key:"CUSTOM_HEADERS",get:function(){return"radar-custom-headers"}},{key:"BASE_API_PATH",get:function(){return"radar-base-api-path"}},{key:"CACHE_LOCATION_MINUTES",get:function(){return"radar-cache-location-minutes"}},{key:"LAST_LOCATION",get:function(){return"radar-last-location"}}]),t}(),ei=function(){function t(){Or(this,t)}return Ir(t,null,[{key:"getCurrentPosition",value:function(){return new Promise(function(u,c){if(!navigator||!navigator.geolocation)return c(Zo.ERROR_LOCATION);var s=parseFloat(ti.getItem(ti.CACHE_LOCATION_MINUTES));if(s)try{var t=JSON.parse(ti.getItem(ti.LAST_LOCATION));if(t){var e=t.latitude,r=t.longitude,n=t.accuracy;if(Date.now()<parseInt(t.expiresAt)&&e&&r&&n)return u({latitude:e,longitude:r,accuracy:n})}}catch(t){console.warn("Radar SDK: could not load cached location.")}navigator.geolocation.getCurrentPosition(function(t){if(!t||!t.coords)return c(Zo.ERROR_LOCATION);var e=t.coords,r=e.latitude,n=e.longitude,o=e.accuracy;if(s){var i=Date.now(),a={latitude:r,longitude:n,accuracy:o,updatedAt:i,expiresAt:i+60*s*1e3};ti.setItem(ti.LAST_LOCATION,JSON.stringify(a))}return u({latitude:r,longitude:n,accuracy:o})},function(t){return t&&t.code&&1===t.code?c(Zo.ERROR_PERMISSIONS):c(Zo.ERROR_LOCATION)})})}}]),t}(),ri=(e(function(t){var e=function(a){var c,t=Object.prototype,f=t.hasOwnProperty,e="function"==typeof Symbol?Symbol:{},o=e.iterator||"@@iterator",r=e.asyncIterator||"@@asyncIterator",n=e.toStringTag||"@@toStringTag";function u(t,e,r,n){var i,a,u,c,o=e&&e.prototype instanceof y?e:y,s=Object.create(o.prototype),f=new w(n||[]);return s._invoke=(i=t,a=r,u=f,c=p,function(t,e){if(c===v)throw new Error("Generator is already running");if(c===h){if("throw"===t)throw e;return C()}for(u.method=t,u.arg=e;;){var r=u.delegate;if(r){var n=I(r,u);if(n){if(n===g)continue;return n}}if("next"===u.method)u.sent=u._sent=u.arg;else if("throw"===u.method){if(c===p)throw c=h,u.arg;u.dispatchException(u.arg)}else"return"===u.method&&u.abrupt("return",u.arg);c=v;var o=l(i,a,u);if("normal"===o.type){if(c=u.done?h:d,o.arg===g)continue;return{value:o.arg,done:u.done}}"throw"===o.type&&(c=h,u.method="throw",u.arg=o.arg)}}),s}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}a.wrap=u;var p="suspendedStart",d="suspendedYield",v="executing",h="completed",g={};function y(){}function i(){}function s(){}var m={};m[o]=function(){return this};var E=Object.getPrototypeOf,R=E&&E(E(_([])));R&&R!==t&&f.call(R,o)&&(m=R);var S=s.prototype=y.prototype=Object.create(m);function O(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function b(c,s){var e;this._invoke=function(r,n){function t(){return new s(function(t,e){!function e(t,r,n,o){var i=l(c[t],c,r);if("throw"!==i.type){var a=i.arg,u=a.value;return u&&"object"==typeof u&&f.call(u,"__await")?s.resolve(u.__await).then(function(t){e("next",t,n,o)},function(t){e("throw",t,n,o)}):s.resolve(u).then(function(t){a.value=t,n(a)},function(t){return e("throw",t,n,o)})}o(i.arg)}(r,n,t,e)})}return e=e?e.then(t,t):t()}}function I(t,e){var r=t.iterator[e.method];if(r===c){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=c,I(t,e),"throw"===e.method))return g;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return g}var n=l(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,g;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=c),e.delegate=null,g):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,g)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function w(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function _(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,n=function t(){for(;++r<e.length;)if(f.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=c,t.done=!0,t};return n.next=n}}return{next:C}}function C(){return{value:c,done:!0}}return i.prototype=S.constructor=s,s.constructor=i,s[n]=i.displayName="GeneratorFunction",a.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===i||"GeneratorFunction"===(e.displayName||e.name))},a.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,s):(t.__proto__=s,n in t||(t[n]="GeneratorFunction")),t.prototype=Object.create(S),t},a.awrap=function(t){return{__await:t}},O(b.prototype),b.prototype[r]=function(){return this},a.AsyncIterator=b,a.async=function(t,e,r,n,o){void 0===o&&(o=Promise);var i=new b(u(t,e,r,n),o);return a.isGeneratorFunction(e)?i:i.next().then(function(t){return t.done?t.value:i.next()})},O(S),S[n]="Generator",S[o]=function(){return this},S.toString=function(){return"[object Generator]"},a.keys=function(r){var n=[];for(var t in r)n.push(t);return n.reverse(),function t(){for(;n.length;){var e=n.pop();if(e in r)return t.value=e,t.done=!1,t}return t.done=!0,t}},a.values=_,w.prototype={constructor:w,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=c,this.done=!1,this.delegate=null,this.method="next",this.arg=c,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&f.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=c)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(r){if(this.done)throw r;var n=this;function t(t,e){return i.type="throw",i.arg=r,n.next=t,e&&(n.method="next",n.arg=c),!!e}for(var e=this.tryEntries.length-1;0<=e;--e){var o=this.tryEntries[e],i=o.completion;if("root"===o.tryLoc)return t("end");if(o.tryLoc<=this.prev){var a=f.call(o,"catchLoc"),u=f.call(o,"finallyLoc");if(a&&u){if(this.prev<o.catchLoc)return t(o.catchLoc,!0);if(this.prev<o.finallyLoc)return t(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return t(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return t(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;0<=r;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&f.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),x(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;x(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:_(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=c),g}},a}(t.exports);try{regeneratorRuntime=e}catch(t){Function("r","regeneratorRuntime = r")(e)}}),Array.isArray||function(t){return"Array"==ae(t)}),ni=TypeError,oi=function(t){if(9007199254740991<t)throw ni("Maximum allowed index exceeded");return t},ii=function(t,e,r){var n=Rt(e);n in t?wt.f(t,n,Gt(0,r)):t[n]=r},ai=gt("species"),ui=Array,ci=function(t,e){return ri(r=t)&&(n=r.constructor,Kr(n)&&(n===ui||ri(n.prototype))?n=void 0:S(n)&&null===(n=n[ai])&&(n=void 0)),new(void 0===n?ui:n)(0===e?0:e);var r,n},si=gt("species"),fi=function(e){return 51<=F||!s(function(){var t=[];return(t.constructor={})[si]=function(){return{foo:1}},1!==t[e](Boolean).foo})},li=gt("isConcatSpreadable"),pi=51<=F||!s(function(){var t=[];return t[li]=!1,t.concat()[0]!==t}),di=fi("concat"),vi=function(t){if(!S(t))return!1;var e=t[li];return void 0!==e?!!e:ri(t)};vr({target:"Array",proto:!0,arity:1,forced:!pi||!di},{concat:function(t){var e,r,n,o,i,a=it(this),u=ci(a,0),c=0;for(e=-1,n=arguments.length;e<n;e++)if(i=-1===e?a:arguments[e],vi(i))for(o=Ee(i),oi(c+o),r=0;r<o;r++,c++)r in i&&ii(u,c,i[r]);else oi(c+1),ii(u,c++,i);return u.length=c,u}});var hi=d([].push),gi=function(d){var v=1==d,h=2==d,g=3==d,y=4==d,m=6==d,E=7==d,R=5==d||m;return function(t,e,r,n){for(var o,i,a=it(t),u=se(a),c=tn(e,r),s=Ee(u),f=0,l=n||ci,p=v?l(t,s):h||E?l(t,0):void 0;f<s;f++)if((R||f in u)&&(i=c(o=u[f],f,a),d))if(v)p[f]=i;else if(i)switch(d){case 3:return!0;case 5:return o;case 6:return f;case 2:hi(p,o)}else switch(d){case 4:return!1;case 7:hi(p,o)}return m?-1:g||y?y:p}},yi={forEach:gi(0),map:gi(1),filter:gi(2),some:gi(3),every:gi(4),find:gi(5),findIndex:gi(6),filterReject:gi(7)},mi=function(t,e){var r=[][t];return!!r&&s(function(){r.call(null,e||function(){return 1},1)})},Ei=yi.forEach,Ri=mi("forEach")?[].forEach:function(t){return Ei(this,t,1<arguments.length?arguments[1]:void 0)};vr({target:"Array",proto:!0,forced:[].forEach!=Ri},{forEach:Ri});var Si=d([].join),Oi=se!=Object,bi=mi("join",",");vr({target:"Array",proto:!0,forced:Oi||!bi},{join:function(t){return Si(fe(this),void 0===t?",":t)}});var Ii=yi.map;vr({target:"Array",proto:!0,forced:!fi("map")},{map:function(t){return Ii(this,t,1<arguments.length?arguments[1]:void 0)}});var Ti={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},xi=I("span").classList,wi=xi&&xi.constructor&&xi.constructor.prototype,_i=wi===Object.prototype?void 0:wi,Ci=function(e){if(e&&e.forEach!==Ri)try{Ft(e,"forEach",Ri)}catch(t){e.forEach=Ri}};for(var Ni in Ti)Ti[Ni]&&Ci(l[Ni]&&l[Ni].prototype);Ci(_i);var Ai,ki=function(){function t(){Or(this,t)}return Ir(t,null,[{key:"getHost",value:function(){return ti.getItem(ti.HOST)||"https://api.radar.io"}}]),t}(),Pi="3.6.2-beta.2",ji=function(){function t(){Or(this,t)}return Ir(t,null,[{key:"request",value:function(l,p){var d=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};return new Promise(function(e,r){var n=new XMLHttpRequest,t=ti.getItem(ti.BASE_API_PATH)||"v1",o="".concat(ki.getHost(),"/").concat(t,"/").concat(p),i={};if(Object.keys(d).forEach(function(t){var e=d[t];void 0!==e&&(i[t]=e)}),"GET"===l){var a=Object.keys(i).map(function(t){return"".concat(t,"=").concat(encodeURIComponent(i[t]))});if(0<a.length){var u=a.join("&");o="".concat(o,"?").concat(u)}i=void 0}n.open(l,o,!0);var c=ti.getItem(ti.PUBLISHABLE_KEY);if(c){n.setRequestHeader("Authorization",c),n.setRequestHeader("Content-Type","application/json"),n.setRequestHeader("X-Radar-Device-Type","Web"),n.setRequestHeader("X-Radar-SDK-Version",Pi);var s=ti.getItem(ti.CUSTOM_HEADERS);if(s){var f=JSON.parse(s);Object.keys(f).forEach(function(t){n.setRequestHeader(t,f[t])})}n.onload=function(){var t;try{t=JSON.parse(n.response)}catch(t){r(Zo.ERROR_SERVER)}200==n.status?e(t):400===n.status?r({httpError:Zo.ERROR_BAD_REQUEST,response:t}):401===n.status?r({httpError:Zo.ERROR_UNAUTHORIZED,response:t}):402===n.status?r({httpError:Zo.ERROR_PAYMENT_REQUIRED,response:t}):403===n.status?r({httpError:Zo.ERROR_FORBIDDEN,response:t}):404===n.status?r({httpError:Zo.ERROR_NOT_FOUND,response:t}):429===n.status?r({httpError:Zo.ERROR_RATE_LIMIT,response:t}):500<=n.status&&n.status<600?r({httpError:Zo.ERROR_SERVER,response:t}):r({httpError:Zo.ERROR_UNKNOWN,response:t})},n.onerror=function(){r(Zo.ERROR_SERVER)},n.timeout=function(){r(Zo.ERROR_NETWORK)},n.send(JSON.stringify(i))}else r(Zo.ERROR_PUBLISHABLE_KEY)})}}]),t}(),Li=function(){function t(){Or(this,t)}var e;return Ir(t,null,[{key:"validateAddress",value:(e=Sr(regeneratorRuntime.mark(function t(){var e,r,n,o,i,a,u,c,s,f,l=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=0<l.length&&void 0!==l[0]?l[0]:{},r=e.countryCode,n=e.stateCode,o=e.city,i=e.number,a=e.postalCode,u=e.street,c=e.unit,s=e.addressLabel,f={countryCode:r,stateCode:n,city:o,number:i,postalCode:a,street:u,unit:c,addressLabel:s},t.abrupt("return",ji.request("GET","addresses/validate",f));case 4:case"end":return t.stop()}},t)})),function(){return e.apply(this,arguments)})}]),t}(),Di=function(){function t(){Or(this,t)}var e;return Ir(t,null,[{key:"getContext",value:(e=Sr(regeneratorRuntime.mark(function t(){var e,r,n,o,i,a=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if((e=0<a.length&&void 0!==a[0]?a[0]:{}).latitude&&e.longitude){t.next=5;break}return t.next=4,ei.getCurrentPosition();case 4:e=t.sent;case 5:return n=(r=e).latitude,o=r.longitude,i={coordinates:"".concat(n,",").concat(o)},t.abrupt("return",ji.request("GET","context",i));case 8:case"end":return t.stop()}},t)})),function(){return e.apply(this,arguments)})}]),t}(),Ui=function(){function t(){Or(this,t)}var e,r,n;return Ir(t,null,[{key:"geocode",value:(n=Sr(regeneratorRuntime.mark(function t(){var e,r,n,o,i=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=0<i.length&&void 0!==i[0]?i[0]:{},r=e.query,n=e.layers,o=e.country,t.abrupt("return",ji.request("GET","geocode/forward",{query:r,layers:n,country:o}));case 3:case"end":return t.stop()}},t)})),function(){return n.apply(this,arguments)})},{key:"reverseGeocode",value:(r=Sr(regeneratorRuntime.mark(function t(){var e,r,n,o,i,a,u,c,s=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if((e=0<s.length&&void 0!==s[0]?s[0]:{}).latitude&&e.longitude){t.next=9;break}return t.next=4,ei.getCurrentPosition();case 4:r=t.sent,n=r.latitude,o=r.longitude,e.latitude=n,e.longitude=o;case 9:return i=e.latitude,a=e.longitude,u=e.layers,c={coordinates:"".concat(i,",").concat(a),layers:u},t.abrupt("return",ji.request("GET","geocode/reverse",c));case 12:case"end":return t.stop()}},t)})),function(){return r.apply(this,arguments)})},{key:"ipGeocode",value:(e=Sr(regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",ji.request("GET","geocode/ip",{}));case 1:case"end":return t.stop()}},t)})),function(){return e.apply(this,arguments)})}]),t}(),Mi=function(){function t(){Or(this,t)}var e,r;return Ir(t,null,[{key:"getDistanceToDestination",value:(r=Sr(regeneratorRuntime.mark(function t(){var e,r,n,o,i,a,u,c,s,f,l,p=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if((e=0<p.length&&void 0!==p[0]?p[0]:{}).origin){t.next=8;break}return t.next=4,ei.getCurrentPosition();case 4:r=t.sent,n=r.latitude,o=r.longitude,e.origin={latitude:n,longitude:o};case 8:return i=e.origin,a=e.destination,u=e.modes,c=e.units,s=e.geometry,f=e.geometryPoints,i="".concat(i.latitude,",").concat(i.longitude),a&&(a="".concat(a.latitude,",").concat(a.longitude)),u&&(u=u.join(",")),l={origin:i,destination:a,modes:u,units:c,geometry:s,geometryPoints:f},t.abrupt("return",ji.request("GET","route/distance",l));case 14:case"end":return t.stop()}},t)})),function(){return r.apply(this,arguments)})},{key:"getMatrixDistances",value:(e=Sr(regeneratorRuntime.mark(function t(){var e,r,n,o,i,a,u,c,s,f,l=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if((e=0<l.length&&void 0!==l[0]?l[0]:{}).origins){t.next=8;break}return t.next=4,ei.getCurrentPosition();case 4:r=t.sent,n=r.latitude,o=r.longitude,e.origins=[{latitude:n,longitude:o}];case 8:return i=e.origins,a=e.destinations,u=e.mode,c=e.units,s=e.geometry,i=(i||[]).map(function(t){return"".concat(t.latitude,",").concat(t.longitude)}).join("|"),a=(a||[]).map(function(t){return"".concat(t.latitude,",").concat(t.longitude)}).join("|"),f={origins:i,destinations:a,mode:u,units:c,geometry:s},t.abrupt("return",ji.request("GET","route/matrix",f));case 13:case"end":return t.stop()}},t)})),function(){return e.apply(this,arguments)})}]),t}(),Gi=function(){function t(){Or(this,t)}var e,r,n;return Ir(t,null,[{key:"searchPlaces",value:(n=Sr(regeneratorRuntime.mark(function t(){var e,r,n,o,i,a,u,c,s,f,l,p=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if((e=0<p.length&&void 0!==p[0]?p[0]:{}).near){t.next=8;break}return t.next=4,ei.getCurrentPosition();case 4:r=t.sent,n=r.latitude,o=r.longitude,e.near={latitude:n,longitude:o};case 8:return i=e.near,a=e.radius,u=e.chains,c=e.categories,s=e.groups,f=e.limit,i="".concat(i.latitude,",").concat(i.longitude),u&&(u=u.join(",")),c&&(c=c.join(",")),s&&(s=s.join(",")),l={near:i,radius:a,chains:u,categories:c,groups:s,limit:f},t.abrupt("return",ji.request("GET","search/places",l));case 15:case"end":return t.stop()}},t)})),function(){return n.apply(this,arguments)})},{key:"searchGeofences",value:(r=Sr(regeneratorRuntime.mark(function t(){var e,r,n,o,i,a,u,c,s,f,l=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if((e=0<l.length&&void 0!==l[0]?l[0]:{}).near){t.next=8;break}return t.next=4,ei.getCurrentPosition();case 4:r=t.sent,n=r.latitude,o=r.longitude,e.near={latitude:n,longitude:o};case 8:return i=e.near,a=e.radius,u=e.tags,c=e.metadata,s=e.limit,i="".concat(i.latitude,",").concat(i.longitude),u&&(u=u.join(",")),f={near:i,radius:a,tags:u,limit:s},c&&Object.keys(c).forEach(function(t){var e="metadata[".concat(t,"]"),r=c[t];f[e]=r}),t.abrupt("return",ji.request("GET","search/geofences",f));case 14:case"end":return t.stop()}},t)})),function(){return r.apply(this,arguments)})},{key:"autocomplete",value:(e=Sr(regeneratorRuntime.mark(function t(){var e,r,n,o,i,a,u,c,s,f,l,p=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=0<p.length&&void 0!==p[0]?p[0]:{},o=n.query,i=n.near,a=n.limit,u=n.layers,c=n.country,s=n.countryCode,f=n.expandUnits,(null===(e=i)||void 0===e?void 0:e.latitude)&&(null===(r=i)||void 0===r?void 0:r.longitude)&&(i="".concat(i.latitude,",").concat(i.longitude)),l={query:o,near:i,limit:a,layers:u,country:c,countryCode:s,expandUnits:f},t.abrupt("return",ji.request("GET","search/autocomplete",l));case 5:case"end":return t.stop()}},t)})),function(){return e.apply(this,arguments)})}]),t}(),Fi=function(){var t=N(this),e="";return t.hasIndices&&(e+="d"),t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.unicodeSets&&(e+="v"),t.sticky&&(e+="y"),e},Hi=l.RegExp,Vi=s(function(){var t=Hi("a","y");return t.lastIndex=2,null!=t.exec("abcd")}),Bi=Vi||s(function(){return!Hi("a","y").sticky}),qi={BROKEN_CARET:Vi||s(function(){var t=Hi("^r","gy");return t.lastIndex=2,null!=t.exec("str")}),MISSED_STICKY:Bi,UNSUPPORTED_Y:Vi},Ki={f:f&&!w?Object.defineProperties:function(t,e){N(t);for(var r,n=fe(e),o=hr(e),i=o.length,a=0;a<i;)wt.f(t,r=o[a++],n[r]);return t}},Yi="prototype",$i="script",Ji=Vt("IE_PROTO"),Wi=function(){},zi=function(t){return"<script>"+t+"</"+$i+">"},Xi=function(t){t.write(zi("")),t.close();var e=t.parentWindow.Object;return t=null,e},Qi=function(){try{Ai=new ActiveXObject("htmlfile")}catch(t){}var t,e;Qi="undefined"!=typeof document?document.domain&&Ai?Xi(Ai):((e=I("iframe")).style.display="none",en.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(zi("document.F=Object")),t.close(),t.F):Xi(Ai);for(var r=Ie.length;r--;)delete Qi[Yi][Ie[r]];return Qi()};Bt[Ji]=!0;var Zi,ta,ea=Object.create||function(t,e){var r;return null!==t?(Wi[Yi]=N(t),r=new Wi,Wi[Yi]=null,r[Ji]=t):r=Qi(),void 0===e?r:Ki.f(r,e)},ra=l.RegExp,na=s(function(){var t=ra(".","s");return!(t.dotAll&&t.exec("\n")&&"s"===t.flags)}),oa=l.RegExp,ia=s(function(){var t=oa("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")}),aa=Qt.get,ua=et("native-string-replace",String.prototype.replace),ca=RegExp.prototype.exec,sa=ca,fa=d("".charAt),la=d("".indexOf),pa=d("".replace),da=d("".slice),va=(ta=/b*/g,k(ca,Zi=/a/,"a"),k(ca,ta,"a"),0!==Zi.lastIndex||0!==ta.lastIndex),ha=qi.BROKEN_CARET,ga=void 0!==/()??/.exec("")[1];(va||ga||ha||na||ia)&&(sa=function(t){var e,r,n,o,i,a,u,c=this,s=aa(c),f=Fe(t),l=s.raw;if(l)return l.lastIndex=c.lastIndex,e=k(sa,l,f),c.lastIndex=l.lastIndex,e;var p=s.groups,d=ha&&c.sticky,v=k(Fi,c),h=c.source,g=0,y=f;if(d&&(v=pa(v,"y",""),-1===la(v,"g")&&(v+="g"),y=da(f,c.lastIndex),0<c.lastIndex&&(!c.multiline||c.multiline&&"\n"!==fa(f,c.lastIndex-1))&&(h="(?: "+h+")",y=" "+y,g++),r=new RegExp("^(?:"+h+")",v)),ga&&(r=new RegExp("^"+h+"$(?!\\s)",v)),va&&(n=c.lastIndex),o=k(ca,d?r:c,y),d?o?(o.input=da(o.input,g),o[0]=da(o[0],g),o.index=c.lastIndex,c.lastIndex+=o[0].length):c.lastIndex=0:va&&o&&(c.lastIndex=c.global?o.index+o[0].length:n),ga&&o&&1<o.length&&k(ua,o[0],r,function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(o[i]=void 0)}),o&&p)for(o.groups=a=ea(null),i=0;i<p.length;i++)a[(u=p[i])[0]]=o[u[1]];return o});var ya=sa;vr({target:"RegExp",proto:!0,forced:/./.exec!==ya},{exec:ya});var ma=RegExp.prototype,Ea=At.PROPER,Ra="toString",Sa=RegExp.prototype[Ra],Oa=s(function(){return"/a/b"!=Sa.call({source:"a",flags:"b"})}),ba=Ea&&Sa.name!=Ra;(Oa||ba)&&te(RegExp.prototype,Ra,function(){var t,e,r=N(this);return"/"+Fe(r.source)+"/"+Fe(void 0!==(e=(t=r).flags)||"flags"in ma||ut(t,"flags")||!j(ma,t)?e:k(Fi,t))},{unsafe:!0});var Ia=gt("species"),Ta=RegExp.prototype,xa=d("".charAt),wa=d("".charCodeAt),_a=d("".slice),Ca=function(u){return function(t,e){var r,n,o=Fe(nt(t)),i=ve(e),a=o.length;return i<0||a<=i?u?"":void 0:(r=wa(o,i))<55296||56319<r||i+1===a||(n=wa(o,i+1))<56320||57343<n?u?xa(o,i):r:u?_a(o,i,i+2):n-56320+(r-55296<<10)+65536}},Na={codeAt:Ca(!1),charAt:Ca(!0)}.charAt,Aa=Math.floor,ka=d("".charAt),Pa=d("".replace),ja=d("".slice),La=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Da=/\$([$&'`]|\d{1,2})/g,Ua=function(i,a,u,c,s,t){var f=u+i.length,l=c.length,e=Da;return void 0!==s&&(s=it(s),e=La),Pa(t,e,function(t,e){var r;switch(ka(e,0)){case"$":return"$";case"&":return i;case"`":return ja(a,0,u);case"'":return ja(a,f);case"<":r=s[ja(e,1,-1)];break;default:var n=+e;if(0===n)return t;if(l<n){var o=Aa(n/10);return 0===o?t:o<=l?void 0===c[o-1]?ka(e,1):c[o-1]+ka(e,1):t}r=c[n-1]}return void 0===r?"":r})},Ma=TypeError,Ga=function(t,e){var r=t.exec;if(x(r)){var n=k(r,t,e);return null!==n&&N(n),n}if("RegExp"===ae(t))return k(ya,t,e);throw Ma("RegExp#exec called on incompatible receiver")},Fa=gt("replace"),Ha=Math.max,Va=Math.min,Ba=d([].concat),qa=d([].push),Ka=d("".indexOf),Ya=d("".slice),$a="$0"==="a".replace(/./,"$0"),Ja=!!/./[Fa]&&""===/./[Fa]("a","$0");!function(r,t,e,n){var o=gt(r),u=!s(function(){var t={};return t[o]=function(){return 7},7!=""[r](t)}),i=u&&!s(function(){var t=!1,e=/a/;return"split"===r&&((e={constructor:{}}).constructor[Ia]=function(){return e},e.flags="",e[o]=/./[o]),e.exec=function(){return t=!0,null},e[o](""),!t});if(!u||!i||e){var c=d(/./[o]),a=t(o,""[r],function(t,e,r,n,o){var i=d(t),a=e.exec;return a===ya||a===Ta.exec?u&&!o?{done:!0,value:c(e,r,n)}:{done:!0,value:i(r,e,n)}:{done:!1}});te(String.prototype,r,a[0]),te(Ta,o,a[1])}n&&Ft(Ta[o],"sham",!0)}("replace",function(t,b,I){var T=Ja?"$":"$0";return[function(t,e){var r=nt(this),n=null==t?void 0:W(t,Fa);return n?k(n,t,r,e):k(b,Fe(r),t,e)},function(t,e){var r=N(this),n=Fe(t);if("string"==typeof e&&-1===Ka(e,T)&&-1===Ka(e,"$<")){var o=I(b,r,n,e);if(o.done)return o.value}var i=x(e);i||(e=Fe(e));var a=r.global;if(a){var u=r.unicode;r.lastIndex=0}for(var c,s,f=[];;){var l=Ga(r,n);if(null===l)break;if(qa(f,l),!a)break;""===Fe(l[0])&&(r.lastIndex=(c=n,(s=me(r.lastIndex))+(u?Na(c,s).length:1)))}for(var p,d="",v=0,h=0;h<f.length;h++){for(var g=Fe((l=f[h])[0]),y=Ha(Va(ve(l.index),n.length),0),m=[],E=1;E<l.length;E++)qa(m,void 0===(p=l[E])?p:String(p));var R=l.groups;if(i){var S=Ba([g],m,y,n);void 0!==R&&qa(S,R);var O=Fe(Qr(e,void 0,S))}else O=Ua(g,n,y,m,R,e);v<=y&&(d+=Ya(n,v,y)+O,v=y+g.length)}return d+Ya(n,v)}]},!!s(function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")})||!$a||Ja);var Wa=function(){function t(){Or(this,t)}return Ir(t,null,[{key:"getId",value:function(){var t=ti.getItem(ti.DEVICE_ID);if(t)return t;var e="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)});return ti.setItem(ti.DEVICE_ID,e),e}}]),t}(),za=function(){function t(){Or(this,t)}var e;return Ir(t,null,[{key:"trackOnce",value:(e=Sr(regeneratorRuntime.mark(function t(){var e,r,n,o,i,a,u,c,s,f,l,p,d,v,h=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e=0<h.length&&void 0!==h[0]?h[0]:{},r=e.latitude,n=e.longitude,o=e.accuracy,r&&n){t.next=9;break}return t.next=5,ei.getCurrentPosition();case 5:i=t.sent,r=i.latitude,n=i.longitude,o=i.accuracy;case 9:return a=Wa.getId(),u=ti.getItem(ti.USER_ID),c=ti.getItem(ti.INSTALL_ID)||a,s=ti.getItem(ti.DEVICE_TYPE)||"Web",f=ti.getItem(ti.DESCRIPTION),(l=ti.getItem(ti.METADATA))&&(l=JSON.parse(l)),(p=ti.getItem(ti.TRIP_OPTIONS))&&((p=JSON.parse(p)).version="2"),d=xr({},e,{accuracy:o,description:f,deviceId:a,deviceType:s,foreground:!0,installId:c,latitude:r,longitude:n,metadata:l,sdkVersion:Pi,stopped:!0,userId:u,tripOptions:p}),t.next=21,ji.request("POST","track",d);case 21:return(v=t.sent).location={latitude:r,longitude:n,accuracy:o},t.abrupt("return",v);case 24:case"end":return t.stop()}},t)})),function(){return e.apply(this,arguments)})}]),t}();vr({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return k(URL.prototype.toString,this)}});var Xa=function(t){return t&&"[object Date]"===Object.prototype.toString.call(t)&&!isNaN(t)},Qa=function(){function t(){Or(this,t)}var e,r;return Ir(t,null,[{key:"startTrip",value:(r=Sr(regeneratorRuntime.mark(function t(){var e,r,n,o,i,a,u,c,s,f,l=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=0<l.length&&void 0!==l[0]?l[0]:{},r=ti.getItem(ti.USER_ID),n=e.externalId,o=e.destinationGeofenceTag,i=e.destinationGeofenceExternalId,a=e.mode,u=e.metadata,c=e.approachingThreshold,s=e.scheduledArrivalAt,f={userId:r,externalId:n,destinationGeofenceTag:o,destinationGeofenceExternalId:i,mode:a,metadata:u,approachingThreshold:c},Xa(s)?f.scheduledArrivalAt=s.toJSON():f.scheduledArrivalAt=void 0,t.abrupt("return",ji.request("POST","trips",f));case 6:case"end":return t.stop()}},t)})),function(){return r.apply(this,arguments)})},{key:"updateTrip",value:(e=Sr(regeneratorRuntime.mark(function t(){var e,r,n,o,i,a,u,c,s,f,l,p=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=0<p.length&&void 0!==p[0]?p[0]:{},r=1<p.length?p[1]:void 0,n=ti.getItem(ti.USER_ID),o=e.externalId,i=e.destinationGeofenceTag,a=e.destinationGeofenceExternalId,u=e.mode,c=e.metadata,s=e.approachingThreshold,f=e.scheduledArrivalAt,l={userId:n,externalId:o,status:r,destinationGeofenceTag:i,destinationGeofenceExternalId:a,mode:u,metadata:c,approachingThreshold:s,scheduledArrivalAt:f},Xa(f)?l.scheduledArrivalAt=f.toJSON():l.scheduledArrivalAt=void 0,t.abrupt("return",ji.request("PATCH","trips/".concat(o,"/update"),l));case 7:case"end":return t.stop()}},t)})),function(){return e.apply(this,arguments)})}]),t}(),Za=function(){function t(){Or(this,t)}var e;return Ir(t,null,[{key:"sendEvent",value:(e=Sr(regeneratorRuntime.mark(function t(){var e,r,n,o,i,a,u=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=0<u.length&&void 0!==u[0]?u[0]:{},r=e.type,n=e.metadata,o=e.createdAt,i=Wa.getId(),a=ti.getItem(ti.USER_ID),t.abrupt("return",ji.request("POST","events",{type:r,metadata:n,deviceId:i,userId:a,createdAt:o}));case 5:case"end":return t.stop()}},t)})),function(){return e.apply(this,arguments)})}]),t}(),tu="completed",eu="canceled",ru=function(){},nu=function(e){return function(t){"string"!=typeof t?"object"===Er(t)&&t.httpError?e(t.httpError,{},t.response):e(Zo.ERROR_UNKNOWN,{}):e(t,{})}};return function(){function n(){Or(this,n)}return Ir(n,null,[{key:"initialize",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};t||console.error('Radar "initialize" was called without a publishable key'),ti.setItem(ti.PUBLISHABLE_KEY,t);var r=e.cacheLocationMinutes;if(r){var n=Number(r);Number.isNaN(n)?console.warn('Radar SDK: invalid number for option "cacheLocationMinutes"'):ti.setItem(ti.CACHE_LOCATION_MINUTES,r)}else ti.removeItem(ti.CACHE_LOCATION_MINUTES)}},{key:"setHost",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"v1";ti.setItem(ti.HOST,t),ti.setItem(ti.BASE_API_PATH,e)}},{key:"setUserId",value:function(t){t?ti.setItem(ti.USER_ID,String(t).trim()):ti.removeItem(ti.USER_ID)}},{key:"setDeviceId",value:function(t,e){t?ti.setItem(ti.DEVICE_ID,String(t).trim()):ti.removeItem(ti.DEVICE_ID),e?ti.setItem(ti.INSTALL_ID,String(e).trim()):ti.removeItem(ti.INSTALL_ID)}},{key:"setDeviceType",value:function(t){t?ti.setItem(ti.DEVICE_TYPE,String(t).trim()):ti.removeItem(ti.DEVICE_TYPE)}},{key:"setDescription",value:function(t){t?ti.setItem(ti.DESCRIPTION,String(t).trim()):ti.removeItem(ti.DESCRIPTION)}},{key:"setMetadata",value:function(t){t?ti.setItem(ti.METADATA,JSON.stringify(t)):ti.removeItem(ti.METADATA)}},{key:"setRequestHeaders",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};Object.keys(t).length?ti.setItem(ti.CUSTOM_HEADERS,JSON.stringify(t)):ti.removeItem(ti.CUSTOM_HEADERS)}},{key:"getLocation",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:ru;ei.getCurrentPosition().then(function(t){e(null,{location:t,status:Zo.SUCCESS})}).catch(nu(e))}},{key:"trackOnce",value:function(t){var e,r,n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:ru;e="function"==typeof t?t:(r=t,n),za.trackOnce(r).then(function(t){e(null,{location:t.location,user:t.user,events:t.events,status:Zo.SUCCESS},t)}).catch(nu(e))}},{key:"getContext",value:function(t){var e,r,n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:ru;e="function"==typeof t?t:(r=t,n),Di.getContext(r).then(function(t){e(null,{context:t.context,status:Zo.SUCCESS},t)}).catch(nu(e))}},{key:"startTrip",value:function(e){var r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:ru;Qa.startTrip(e).then(function(t){n.setTripOptions(e),r(null,{trip:t.trip,events:t.events,status:Zo.SUCCESS},t)}).catch(nu(r))}},{key:"updateTrip",value:function(e,t){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:ru;Qa.updateTrip(e,t).then(function(t){n.setTripOptions(e),r(null,{trip:t.trip,events:t.events,status:Zo.SUCCESS},t)}).catch(nu(r))}},{key:"completeTrip",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:ru,t=n.getTripOptions();Qa.updateTrip(t,tu).then(function(t){n.clearTripOptions(),e(null,{trip:t.trip,events:t.events,status:Zo.SUCCESS},t)}).catch(nu(e))}},{key:"cancelTrip",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:ru,t=n.getTripOptions();Qa.updateTrip(t,eu).then(function(t){n.clearTripOptions(),e(null,{trip:t.trip,events:t.events,status:Zo.SUCCESS},t)}).catch(nu(e))}},{key:"setTripOptions",value:function(t){t?ti.setItem(ti.TRIP_OPTIONS,JSON.stringify(t)):n.clearTripOptions()}},{key:"clearTripOptions",value:function(){ti.removeItem(ti.TRIP_OPTIONS)}},{key:"getTripOptions",value:function(){var t=ti.getItem(ti.TRIP_OPTIONS);return t&&(t=JSON.parse(t)),t}},{key:"searchPlaces",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:ru;Gi.searchPlaces(t).then(function(t){e(null,{places:t.places,status:Zo.SUCCESS},t)}).catch(nu(e))}},{key:"searchGeofences",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:ru;Gi.searchGeofences(t).then(function(t){e(null,{geofences:t.geofences,status:Zo.SUCCESS},t)}).catch(nu(e))}},{key:"autocomplete",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:ru;Gi.autocomplete(t).then(function(t){e(null,{addresses:t.addresses,status:Zo.SUCCESS},t)}).catch(nu(e))}},{key:"validateAddress",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:ru;Li.validateAddress(t).then(function(t){e(null,{address:t.address,result:t.result,status:Zo.SUCCESS},t)}).catch(nu(e))}},{key:"geocode",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:ru;Ui.geocode(t).then(function(t){e(null,{addresses:t.addresses,staus:Zo.SUCCESS},t)}).catch(nu(e))}},{key:"reverseGeocode",value:function(t){var e,r,n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:ru;e="function"==typeof t?t:(r=t,n),Ui.reverseGeocode(r).then(function(t){e(null,{addresses:t.addresses,status:Zo.SUCCESS},t)}).catch(nu(e))}},{key:"ipGeocode",value:function(t){var e,r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:ru;"function"==typeof t?e=t:"object"===Er(t)&&(console.warn("Radar SDK: ipGeocode parameters have been deprecated."),e=r),Ui.ipGeocode().then(function(t){e(null,{address:t.address,status:Zo.SUCCESS},t)}).catch(nu(e))}},{key:"getDistance",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:ru;Mi.getDistanceToDestination(t).then(function(t){e(null,{routes:t.routes,status:Zo.SUCCESS},t)}).catch(nu(e))}},{key:"getMatrix",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:ru;Mi.getMatrixDistances(t).then(function(t){e(null,{origins:t.origins,destinations:t.destinations,matrix:t.matrix,status:Zo.SUCCESS},t)}).catch(nu(e))}},{key:"sendEvent",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:ru;Za.sendEvent(t).then(function(t){e(null,{event:t.event,status:Zo.SUCCESS},t)}).catch(nu(e))}},{key:"VERSION",get:function(){return Pi}},{key:"STATUS",get:function(){return Zo}}]),n}()}();
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Web JavaScript SDK for Radar, the location context platform",
4
4
  "homepage": "https://radar.com",
5
5
  "license": "Apache-2.0",
6
- "version": "3.6.1",
6
+ "version": "3.6.2-beta.2",
7
7
  "main": "dist/index.js",
8
8
  "files": [
9
9
  "dist",
@@ -0,0 +1,31 @@
1
+ import Http from '../http';
2
+
3
+ class Addresses {
4
+ static async validateAddress(addressOptions={}) {
5
+ const {
6
+ countryCode,
7
+ stateCode,
8
+ city,
9
+ number,
10
+ postalCode,
11
+ street,
12
+ unit,
13
+ addressLabel,
14
+ } = addressOptions;
15
+
16
+ const params = {
17
+ countryCode,
18
+ stateCode,
19
+ city,
20
+ number,
21
+ postalCode,
22
+ street,
23
+ unit,
24
+ addressLabel,
25
+ };
26
+
27
+ return Http.request('GET', 'addresses/validate', params);
28
+ }
29
+ }
30
+
31
+ export default Addresses;
package/src/api/search.js CHANGED
@@ -88,7 +88,9 @@ class Search {
88
88
  near,
89
89
  limit,
90
90
  layers,
91
- country,
91
+ country, // deprecated, recommended to use countryCode
92
+ countryCode,
93
+ expandUnits, // optional
92
94
  } = searchOptions;
93
95
 
94
96
  if (near?.latitude && near?.longitude) {
@@ -101,6 +103,8 @@ class Search {
101
103
  limit,
102
104
  layers,
103
105
  country,
106
+ countryCode,
107
+ expandUnits,
104
108
  };
105
109
 
106
110
  return Http.request('GET', 'search/autocomplete', params);
package/src/index.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import Navigator from './navigator';
2
2
 
3
+ import Addresses from './api/addresses';
3
4
  import Context from './api/context';
4
5
  import Geocoding from './api/geocoding';
5
6
  import Routing from './api/routing';
@@ -259,6 +260,14 @@ class Radar {
259
260
  .catch(handleError(callback));
260
261
  }
261
262
 
263
+ static validateAddress(addressOptions, callback=defaultCallback) {
264
+ Addresses.validateAddress(addressOptions)
265
+ .then((response) => {
266
+ callback(null, { address: response.address, result: response.result, status: STATUS.SUCCESS }, response);
267
+ })
268
+ .catch(handleError(callback));
269
+ }
270
+
262
271
  static geocode(geocodeOptions, callback=defaultCallback) {
263
272
  Geocoding.geocode(geocodeOptions)
264
273
  .then((response) => {
package/src/version.js CHANGED
@@ -1 +1 @@
1
- export default '3.6.1';
1
+ export default '3.6.2-beta.2';