vue-intergrall-plugins 0.0.160 → 0.0.163

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.
@@ -1,4 +1,4 @@
1
- 'use strict';var vue=require('vue'),axios=require('axios');function _interopDefaultLegacy(e){return e&&typeof e==='object'&&'default'in e?e:{'default':e}}var vue__default=/*#__PURE__*/_interopDefaultLegacy(vue);var axios__default=/*#__PURE__*/_interopDefaultLegacy(axios);function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
1
+ 'use strict';var vue=require('vue'),http=require('http'),https=require('https'),url=require('url'),stream=require('stream'),assert=require('assert'),tty=require('tty'),util=require('util'),os=require('os'),zlib=require('zlib');function _interopDefaultLegacy(e){return e&&typeof e==='object'&&'default'in e?e:{'default':e}}var vue__default=/*#__PURE__*/_interopDefaultLegacy(vue);var http__default=/*#__PURE__*/_interopDefaultLegacy(http);var https__default=/*#__PURE__*/_interopDefaultLegacy(https);var url__default=/*#__PURE__*/_interopDefaultLegacy(url);var stream__default=/*#__PURE__*/_interopDefaultLegacy(stream);var assert__default=/*#__PURE__*/_interopDefaultLegacy(assert);var tty__default=/*#__PURE__*/_interopDefaultLegacy(tty);var util__default=/*#__PURE__*/_interopDefaultLegacy(util);var os__default=/*#__PURE__*/_interopDefaultLegacy(os);var zlib__default=/*#__PURE__*/_interopDefaultLegacy(zlib);function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
2
2
  try {
3
3
  var info = gen[key](arg);
4
4
  var value = info.value;
@@ -235,29 +235,30 @@ var applyStyles$1 = {
235
235
  requires: ['computeStyles']
236
236
  };function getBasePlacement(placement) {
237
237
  return placement.split('-')[0];
238
- }// import { isHTMLElement } from './instanceOf';
239
- function getBoundingClientRect(element, // eslint-disable-next-line unused-imports/no-unused-vars
240
- includeScale) {
238
+ }var max = Math.max;
239
+ var min = Math.min;
240
+ var round = Math.round;function getBoundingClientRect(element, includeScale) {
241
+ if (includeScale === void 0) {
242
+ includeScale = false;
243
+ }
241
244
 
242
245
  var rect = element.getBoundingClientRect();
243
246
  var scaleX = 1;
244
- var scaleY = 1; // FIXME:
245
- // `offsetWidth` returns an integer while `getBoundingClientRect`
246
- // returns a float. This results in `scaleX` or `scaleY` being
247
- // non-1 when it should be for elements that aren't a full pixel in
248
- // width or height.
249
- // if (isHTMLElement(element) && includeScale) {
250
- // const offsetHeight = element.offsetHeight;
251
- // const offsetWidth = element.offsetWidth;
252
- // // Do not attempt to divide by 0, otherwise we get `Infinity` as scale
253
- // // Fallback to 1 in case both values are `0`
254
- // if (offsetWidth > 0) {
255
- // scaleX = rect.width / offsetWidth || 1;
256
- // }
257
- // if (offsetHeight > 0) {
258
- // scaleY = rect.height / offsetHeight || 1;
259
- // }
260
- // }
247
+ var scaleY = 1;
248
+
249
+ if (isHTMLElement(element) && includeScale) {
250
+ var offsetHeight = element.offsetHeight;
251
+ var offsetWidth = element.offsetWidth; // Do not attempt to divide by 0, otherwise we get `Infinity` as scale
252
+ // Fallback to 1 in case both values are `0`
253
+
254
+ if (offsetWidth > 0) {
255
+ scaleX = round(rect.width) / offsetWidth || 1;
256
+ }
257
+
258
+ if (offsetHeight > 0) {
259
+ scaleY = round(rect.height) / offsetHeight || 1;
260
+ }
261
+ }
261
262
 
262
263
  return {
263
264
  width: rect.width / scaleX,
@@ -394,10 +395,12 @@ function getOffsetParent(element) {
394
395
  return offsetParent || getContainingBlock(element) || window;
395
396
  }function getMainAxisFromPlacement(placement) {
396
397
  return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';
397
- }var max = Math.max;
398
- var min = Math.min;
399
- var round = Math.round;function within(min$1, value, max$1) {
398
+ }function within(min$1, value, max$1) {
400
399
  return max(min$1, min(value, max$1));
400
+ }
401
+ function withinMaxClamp(min, value, max) {
402
+ var v = within(min, value, max);
403
+ return v > max ? max : v;
401
404
  }function getFreshSideObject() {
402
405
  return {
403
406
  top: 0,
@@ -509,8 +512,8 @@ function roundOffsetsByDPR(_ref) {
509
512
  var win = window;
510
513
  var dpr = win.devicePixelRatio || 1;
511
514
  return {
512
- x: round(round(x * dpr) / dpr) || 0,
513
- y: round(round(y * dpr) / dpr) || 0
515
+ x: round(x * dpr) / dpr || 0,
516
+ y: round(y * dpr) / dpr || 0
514
517
  };
515
518
  }
516
519
 
@@ -525,14 +528,23 @@ function mapToStyles(_ref2) {
525
528
  position = _ref2.position,
526
529
  gpuAcceleration = _ref2.gpuAcceleration,
527
530
  adaptive = _ref2.adaptive,
528
- roundOffsets = _ref2.roundOffsets;
529
-
530
- var _ref3 = roundOffsets === true ? roundOffsetsByDPR(offsets) : typeof roundOffsets === 'function' ? roundOffsets(offsets) : offsets,
531
- _ref3$x = _ref3.x,
532
- x = _ref3$x === void 0 ? 0 : _ref3$x,
533
- _ref3$y = _ref3.y,
534
- y = _ref3$y === void 0 ? 0 : _ref3$y;
531
+ roundOffsets = _ref2.roundOffsets,
532
+ isFixed = _ref2.isFixed;
533
+ var _offsets$x = offsets.x,
534
+ x = _offsets$x === void 0 ? 0 : _offsets$x,
535
+ _offsets$y = offsets.y,
536
+ y = _offsets$y === void 0 ? 0 : _offsets$y;
537
+
538
+ var _ref3 = typeof roundOffsets === 'function' ? roundOffsets({
539
+ x: x,
540
+ y: y
541
+ }) : {
542
+ x: x,
543
+ y: y
544
+ };
535
545
 
546
+ x = _ref3.x;
547
+ y = _ref3.y;
536
548
  var hasX = offsets.hasOwnProperty('x');
537
549
  var hasY = offsets.hasOwnProperty('y');
538
550
  var sideX = left;
@@ -557,16 +569,18 @@ function mapToStyles(_ref2) {
557
569
  offsetParent = offsetParent;
558
570
 
559
571
  if (placement === top || (placement === left || placement === right) && variation === end) {
560
- sideY = bottom; // $FlowFixMe[prop-missing]
561
-
562
- y -= offsetParent[heightProp] - popperRect.height;
572
+ sideY = bottom;
573
+ var offsetY = isFixed && win.visualViewport ? win.visualViewport.height : // $FlowFixMe[prop-missing]
574
+ offsetParent[heightProp];
575
+ y -= offsetY - popperRect.height;
563
576
  y *= gpuAcceleration ? 1 : -1;
564
577
  }
565
578
 
566
579
  if (placement === left || (placement === top || placement === bottom) && variation === end) {
567
- sideX = right; // $FlowFixMe[prop-missing]
568
-
569
- x -= offsetParent[widthProp] - popperRect.width;
580
+ sideX = right;
581
+ var offsetX = isFixed && win.visualViewport ? win.visualViewport.width : // $FlowFixMe[prop-missing]
582
+ offsetParent[widthProp];
583
+ x -= offsetX - popperRect.width;
570
584
  x *= gpuAcceleration ? 1 : -1;
571
585
  }
572
586
  }
@@ -575,6 +589,17 @@ function mapToStyles(_ref2) {
575
589
  position: position
576
590
  }, adaptive && unsetSides);
577
591
 
592
+ var _ref4 = roundOffsets === true ? roundOffsetsByDPR({
593
+ x: x,
594
+ y: y
595
+ }) : {
596
+ x: x,
597
+ y: y
598
+ };
599
+
600
+ x = _ref4.x;
601
+ y = _ref4.y;
602
+
578
603
  if (gpuAcceleration) {
579
604
  var _Object$assign;
580
605
 
@@ -584,9 +609,9 @@ function mapToStyles(_ref2) {
584
609
  return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + "px" : '', _Object$assign2[sideX] = hasX ? x + "px" : '', _Object$assign2.transform = '', _Object$assign2));
585
610
  }
586
611
 
587
- function computeStyles(_ref4) {
588
- var state = _ref4.state,
589
- options = _ref4.options;
612
+ function computeStyles(_ref5) {
613
+ var state = _ref5.state,
614
+ options = _ref5.options;
590
615
  var _options$gpuAccelerat = options.gpuAcceleration,
591
616
  gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat,
592
617
  _options$adaptive = options.adaptive,
@@ -599,7 +624,8 @@ function computeStyles(_ref4) {
599
624
  variation: getVariation(state.placement),
600
625
  popper: state.elements.popper,
601
626
  popperRect: state.rects.popper,
602
- gpuAcceleration: gpuAcceleration
627
+ gpuAcceleration: gpuAcceleration,
628
+ isFixed: state.options.strategy === 'fixed'
603
629
  };
604
630
 
605
631
  if (state.modifiersData.popperOffsets != null) {
@@ -833,7 +859,7 @@ function listScrollParents(element, list) {
833
859
  }
834
860
 
835
861
  function getClientRectFromMixedType(element, clippingParent) {
836
- return clippingParent === viewport ? rectToClientRect(getViewportRect(element)) : isHTMLElement(clippingParent) ? getInnerBoundingClientRect(clippingParent) : rectToClientRect(getDocumentRect(getDocumentElement(element)));
862
+ return clippingParent === viewport ? rectToClientRect(getViewportRect(element)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent) : rectToClientRect(getDocumentRect(getDocumentElement(element)));
837
863
  } // A "clipping parent" is an overflowable container with the characteristic of
838
864
  // clipping (or hiding) overflowing elements with a position different from
839
865
  // `initial`
@@ -1328,6 +1354,14 @@ var popperOffsets$1 = {
1328
1354
  var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, {
1329
1355
  placement: state.placement
1330
1356
  })) : tetherOffset;
1357
+ var normalizedTetherOffsetValue = typeof tetherOffsetValue === 'number' ? {
1358
+ mainAxis: tetherOffsetValue,
1359
+ altAxis: tetherOffsetValue
1360
+ } : Object.assign({
1361
+ mainAxis: 0,
1362
+ altAxis: 0
1363
+ }, tetherOffsetValue);
1364
+ var offsetModifierState = state.modifiersData.offset ? state.modifiersData.offset[state.placement] : null;
1331
1365
  var data = {
1332
1366
  x: 0,
1333
1367
  y: 0
@@ -1337,13 +1371,15 @@ var popperOffsets$1 = {
1337
1371
  return;
1338
1372
  }
1339
1373
 
1340
- if (checkMainAxis || checkAltAxis) {
1374
+ if (checkMainAxis) {
1375
+ var _offsetModifierState$;
1376
+
1341
1377
  var mainSide = mainAxis === 'y' ? top : left;
1342
1378
  var altSide = mainAxis === 'y' ? bottom : right;
1343
1379
  var len = mainAxis === 'y' ? 'height' : 'width';
1344
1380
  var offset = popperOffsets[mainAxis];
1345
- var min$1 = popperOffsets[mainAxis] + overflow[mainSide];
1346
- var max$1 = popperOffsets[mainAxis] - overflow[altSide];
1381
+ var min$1 = offset + overflow[mainSide];
1382
+ var max$1 = offset - overflow[altSide];
1347
1383
  var additive = tether ? -popperRect[len] / 2 : 0;
1348
1384
  var minLen = variation === start ? referenceRect[len] : popperRect[len];
1349
1385
  var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go
@@ -1363,36 +1399,45 @@ var popperOffsets$1 = {
1363
1399
  // width or height)
1364
1400
 
1365
1401
  var arrowLen = within(0, referenceRect[len], arrowRect[len]);
1366
- var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - tetherOffsetValue : minLen - arrowLen - arrowPaddingMin - tetherOffsetValue;
1367
- var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + tetherOffsetValue : maxLen + arrowLen + arrowPaddingMax + tetherOffsetValue;
1402
+ var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis;
1403
+ var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis;
1368
1404
  var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow);
1369
1405
  var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0;
1370
- var offsetModifierValue = state.modifiersData.offset ? state.modifiersData.offset[state.placement][mainAxis] : 0;
1371
- var tetherMin = popperOffsets[mainAxis] + minOffset - offsetModifierValue - clientOffset;
1372
- var tetherMax = popperOffsets[mainAxis] + maxOffset - offsetModifierValue;
1406
+ var offsetModifierValue = (_offsetModifierState$ = offsetModifierState == null ? void 0 : offsetModifierState[mainAxis]) != null ? _offsetModifierState$ : 0;
1407
+ var tetherMin = offset + minOffset - offsetModifierValue - clientOffset;
1408
+ var tetherMax = offset + maxOffset - offsetModifierValue;
1409
+ var preventedOffset = within(tether ? min(min$1, tetherMin) : min$1, offset, tether ? max(max$1, tetherMax) : max$1);
1410
+ popperOffsets[mainAxis] = preventedOffset;
1411
+ data[mainAxis] = preventedOffset - offset;
1412
+ }
1373
1413
 
1374
- if (checkMainAxis) {
1375
- var preventedOffset = within(tether ? min(min$1, tetherMin) : min$1, offset, tether ? max(max$1, tetherMax) : max$1);
1376
- popperOffsets[mainAxis] = preventedOffset;
1377
- data[mainAxis] = preventedOffset - offset;
1378
- }
1414
+ if (checkAltAxis) {
1415
+ var _offsetModifierState$2;
1379
1416
 
1380
- if (checkAltAxis) {
1381
- var _mainSide = mainAxis === 'x' ? top : left;
1417
+ var _mainSide = mainAxis === 'x' ? top : left;
1382
1418
 
1383
- var _altSide = mainAxis === 'x' ? bottom : right;
1419
+ var _altSide = mainAxis === 'x' ? bottom : right;
1384
1420
 
1385
- var _offset = popperOffsets[altAxis];
1421
+ var _offset = popperOffsets[altAxis];
1386
1422
 
1387
- var _min = _offset + overflow[_mainSide];
1423
+ var _len = altAxis === 'y' ? 'height' : 'width';
1388
1424
 
1389
- var _max = _offset - overflow[_altSide];
1425
+ var _min = _offset + overflow[_mainSide];
1390
1426
 
1391
- var _preventedOffset = within(tether ? min(_min, tetherMin) : _min, _offset, tether ? max(_max, tetherMax) : _max);
1427
+ var _max = _offset - overflow[_altSide];
1392
1428
 
1393
- popperOffsets[altAxis] = _preventedOffset;
1394
- data[altAxis] = _preventedOffset - _offset;
1395
- }
1429
+ var isOriginSide = [top, left].indexOf(basePlacement) !== -1;
1430
+
1431
+ var _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState == null ? void 0 : offsetModifierState[altAxis]) != null ? _offsetModifierState$2 : 0;
1432
+
1433
+ var _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis;
1434
+
1435
+ var _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max;
1436
+
1437
+ var _preventedOffset = tether && isOriginSide ? withinMaxClamp(_tetherMin, _offset, _tetherMax) : within(tether ? _tetherMin : _min, _offset, tether ? _tetherMax : _max);
1438
+
1439
+ popperOffsets[altAxis] = _preventedOffset;
1440
+ data[altAxis] = _preventedOffset - _offset;
1396
1441
  }
1397
1442
 
1398
1443
  state.modifiersData[name] = data;
@@ -1418,8 +1463,8 @@ var preventOverflow$1 = {
1418
1463
  }
1419
1464
  }function isElementScaled(element) {
1420
1465
  var rect = element.getBoundingClientRect();
1421
- var scaleX = rect.width / element.offsetWidth || 1;
1422
- var scaleY = rect.height / element.offsetHeight || 1;
1466
+ var scaleX = round(rect.width) / element.offsetWidth || 1;
1467
+ var scaleY = round(rect.height) / element.offsetHeight || 1;
1423
1468
  return scaleX !== 1 || scaleY !== 1;
1424
1469
  } // Returns the composite rect of an element relative to its offsetParent.
1425
1470
  // Composite means it takes into account transforms as well as layout.
@@ -1431,9 +1476,9 @@ function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {
1431
1476
  }
1432
1477
 
1433
1478
  var isOffsetParentAnElement = isHTMLElement(offsetParent);
1434
- isHTMLElement(offsetParent) && isElementScaled(offsetParent);
1479
+ var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);
1435
1480
  var documentElement = getDocumentElement(offsetParent);
1436
- var rect = getBoundingClientRect(elementOrVirtualElement);
1481
+ var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled);
1437
1482
  var scroll = {
1438
1483
  scrollLeft: 0,
1439
1484
  scrollTop: 0
@@ -1450,7 +1495,7 @@ function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {
1450
1495
  }
1451
1496
 
1452
1497
  if (isHTMLElement(offsetParent)) {
1453
- offsets = getBoundingClientRect(offsetParent);
1498
+ offsets = getBoundingClientRect(offsetParent, true);
1454
1499
  offsets.x += offsetParent.clientLeft;
1455
1500
  offsets.y += offsetParent.clientTop;
1456
1501
  } else if (documentElement) {
@@ -2175,7 +2220,7 @@ if (!compatible) {
2175
2220
 
2176
2221
  var HANDLER = '_vue_clickaway_handler';
2177
2222
 
2178
- function bind(el, binding, vnode) {
2223
+ function bind$1(el, binding, vnode) {
2179
2224
  unbind(el);
2180
2225
 
2181
2226
  var vm = vnode.context;
@@ -2218,10 +2263,10 @@ function unbind(el) {
2218
2263
  }
2219
2264
 
2220
2265
  var directive = {
2221
- bind: bind,
2266
+ bind: bind$1,
2222
2267
  update: function(el, binding) {
2223
2268
  if (binding.value === binding.oldValue) return;
2224
- bind(el, binding);
2269
+ bind$1(el, binding);
2225
2270
  },
2226
2271
  unbind: unbind,
2227
2272
  };
@@ -3405,6 +3450,10 @@ var script$j = {
3405
3450
  hasButtonFiles: {
3406
3451
  type: Boolean,
3407
3452
  required: false
3453
+ },
3454
+ externalFiles: {
3455
+ type: Array,
3456
+ required: false
3408
3457
  }
3409
3458
  },
3410
3459
  data: function data() {
@@ -3428,6 +3477,13 @@ var script$j = {
3428
3477
  return "isMsg";
3429
3478
  }
3430
3479
  },
3480
+ watch: {
3481
+ externalFiles: function externalFiles() {
3482
+ this.file = this.externalFiles;
3483
+ this.fileSize = this.externalFiles.length;
3484
+ this.multipleFileUpload();
3485
+ }
3486
+ },
3431
3487
  methods: {
3432
3488
  openFilesByClip: function openFilesByClip() {
3433
3489
  if (this.fileSettings.multiple && !this.hasButtonFiles) {
@@ -3443,10 +3499,7 @@ var script$j = {
3443
3499
  this.openFiles = !this.openFiles;
3444
3500
  },
3445
3501
  openSelectFileHandler: function openSelectFileHandler(type) {
3446
- if (type == "system") {
3447
- this.$emit("open-file-system", true);
3448
- return false;
3449
- }
3502
+ if (type == "system") return this.$emit("open-file-system");
3450
3503
 
3451
3504
  if (this.fileSettings.multiple) {
3452
3505
  type = 'both';
@@ -3764,7 +3817,7 @@ var __vue_staticRenderFns__$j = [];
3764
3817
 
3765
3818
  var __vue_inject_styles__$j = function __vue_inject_styles__(inject) {
3766
3819
  if (!inject) return;
3767
- inject("data-v-797c22f2_0", {
3820
+ inject("data-v-275ded50_0", {
3768
3821
  source: ".fade-enter-active,.fade-leave-active{transition:opacity .3s}.fade-enter,.fade-leave-to{opacity:0}.files-counter{position:absolute;top:unset;transform:translate(17.5px,-15px);background-color:#888;z-index:1;font-size:.5rem;width:15px;height:15px;border-radius:50%;display:flex;justify-content:center;align-items:center;cursor:pointer;opacity:.9;transition:all .3s;color:#fff;font-weight:900}.files-counter:hover{opacity:1}",
3769
3822
  map: undefined,
3770
3823
  media: undefined
@@ -3776,7 +3829,7 @@ var __vue_inject_styles__$j = function __vue_inject_styles__(inject) {
3776
3829
  var __vue_scope_id__$j = undefined;
3777
3830
  /* module identifier */
3778
3831
 
3779
- var __vue_module_identifier__$j = "data-v-797c22f2";
3832
+ var __vue_module_identifier__$j = "data-v-275ded50";
3780
3833
  /* functional template */
3781
3834
 
3782
3835
  var __vue_is_functional_template__$j = false;
@@ -3919,212 +3972,4007 @@ var __vue_component__$o = /*#__PURE__*/normalizeComponent({
3919
3972
  staticRenderFns: __vue_staticRenderFns__$h
3920
3973
  }, __vue_inject_styles__$h, __vue_script__$h, __vue_scope_id__$h, __vue_is_functional_template__$h, __vue_module_identifier__$h, false, undefined, undefined, undefined);
3921
3974
 
3922
- var BtnStandardMessages = __vue_component__$o;vue__default["default"].prototype.$httpRequest = axios__default["default"];
3923
- var baseURL = window.location.hostname == 'localhost' ? "https://linux07/im/atdHumano/middleware/atd_api.php" : "https://".concat(window.location.hostname);
3924
- var dev = window.location.hostname == 'localhost' ? '&teste=levchat2' : '';
3925
- var standardMessages = {
3926
- methods: {
3927
- getStandardMessages: function getStandardMessages(type, token) {
3928
- var _this = this;
3975
+ var BtnStandardMessages = __vue_component__$o;var bind = function bind(fn, thisArg) {
3976
+ return function wrap() {
3977
+ var args = new Array(arguments.length);
3978
+ for (var i = 0; i < args.length; i++) {
3979
+ args[i] = arguments[i];
3980
+ }
3981
+ return fn.apply(thisArg, args);
3982
+ };
3983
+ };// utils is a library of generic helper functions non-specific to axios
3984
+
3985
+ var toString = Object.prototype.toString;
3986
+
3987
+ /**
3988
+ * Determine if a value is an Array
3989
+ *
3990
+ * @param {Object} val The value to test
3991
+ * @returns {boolean} True if value is an Array, otherwise false
3992
+ */
3993
+ function isArray(val) {
3994
+ return Array.isArray(val);
3995
+ }
3929
3996
 
3930
- return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
3931
- return regeneratorRuntime.wrap(function _callee$(_context) {
3932
- while (1) {
3933
- switch (_context.prev = _context.next) {
3934
- case 0:
3935
- _context.prev = 0;
3936
- return _context.abrupt("return", _this.$httpRequest({
3937
- method: 'get',
3938
- url: "".concat(baseURL, "/get-messages/").concat(type, "?token_cliente=").concat(token).concat(dev) // headers: {
3939
- // Authorization: "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdGQiOiJNS1VJNnhZdm1xSWVFaWpuMXJwMERkZzQ0ZjFzd3dpbTRsNXd3WWFrVUJtd3d4YjQ0YXd3ZVJ1U2lUeUxxVTEiLCJtYW5hZ2VyIjoiTUtVd0J6YzFnVkIzaWNlNE5yU01lbU5aekI1MkExTzdtNXdhdmQyYnd3eGI0NGF3d3d3eGI0NGF3d3FVU2NoIiwibnJvcyI6WyI0MSJdLCJhdXRoIjoiTUtVVnAxTWR3d2ltNGw1d3dYTnNjWDg5R3V4c1RsZUVqdGdpNjhoNk1JUzl6d0xBTGVRbjhUUCIsImlhdCI6MTY0NjMzOTkyOCwiZXhwIjoxNjQ2NDI2MzI4fQ.QNu0uO3qV-Lqvu8Xww1F_x8Bwnjlm175IVdM89EgPM0"
3940
- // }
3997
+ /**
3998
+ * Determine if a value is undefined
3999
+ *
4000
+ * @param {Object} val The value to test
4001
+ * @returns {boolean} True if the value is undefined, otherwise false
4002
+ */
4003
+ function isUndefined(val) {
4004
+ return typeof val === 'undefined';
4005
+ }
3941
4006
 
3942
- }).then(function (response) {
3943
- var data = response.data;
3944
- var tipo = data.tipo,
3945
- nivel = data.nivel,
3946
- msg_ret = data.msg_ret,
3947
- st_ret = data.st_ret;
3948
- if (tipo) _this.$emit('set-message-type', tipo);
3949
- return st_ret === 'OK' ? nivel : st_ret === 'AVISO' ? msg_ret : false;
3950
- }).catch(function (err) {
3951
- return console.error('Erro na requisicao para o servidor', err);
3952
- }));
4007
+ /**
4008
+ * Determine if a value is a Buffer
4009
+ *
4010
+ * @param {Object} val The value to test
4011
+ * @returns {boolean} True if value is a Buffer, otherwise false
4012
+ */
4013
+ function isBuffer(val) {
4014
+ return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)
4015
+ && typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val);
4016
+ }
3953
4017
 
3954
- case 4:
3955
- _context.prev = 4;
3956
- _context.t0 = _context["catch"](0);
3957
- console.error("Axios nao identificado");
3958
- console.error(_context.t0);
4018
+ /**
4019
+ * Determine if a value is an ArrayBuffer
4020
+ *
4021
+ * @param {Object} val The value to test
4022
+ * @returns {boolean} True if value is an ArrayBuffer, otherwise false
4023
+ */
4024
+ function isArrayBuffer(val) {
4025
+ return toString.call(val) === '[object ArrayBuffer]';
4026
+ }
3959
4027
 
3960
- case 8:
3961
- case "end":
3962
- return _context.stop();
3963
- }
3964
- }
3965
- }, _callee, null, [[0, 4]]);
3966
- }))();
3967
- }
4028
+ /**
4029
+ * Determine if a value is a FormData
4030
+ *
4031
+ * @param {Object} val The value to test
4032
+ * @returns {boolean} True if value is an FormData, otherwise false
4033
+ */
4034
+ function isFormData(val) {
4035
+ return toString.call(val) === '[object FormData]';
4036
+ }
4037
+
4038
+ /**
4039
+ * Determine if a value is a view on an ArrayBuffer
4040
+ *
4041
+ * @param {Object} val The value to test
4042
+ * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false
4043
+ */
4044
+ function isArrayBufferView(val) {
4045
+ var result;
4046
+ if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {
4047
+ result = ArrayBuffer.isView(val);
4048
+ } else {
4049
+ result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));
3968
4050
  }
3969
- };//
3970
- var script$g = {
3971
- mixins: [standardMessages],
3972
- props: {
3973
- dictionary: {
3974
- type: Object,
3975
- default: {},
3976
- required: false
3977
- },
3978
- backgroundColor: {
3979
- type: String,
3980
- default: '#fff',
3981
- required: false
3982
- },
3983
- token_cliente: {
3984
- type: String,
3985
- default: '',
3986
- required: false
3987
- },
3988
- message: {
3989
- type: String,
3990
- default: '',
3991
- required: false
3992
- },
3993
- messageType: {
3994
- type: [Number, String],
3995
- default: 1,
3996
- required: false
3997
- }
3998
- },
3999
- data: function data() {
4000
- return {
4001
- placement: "top",
4002
- formatted_messages_1: [{
4003
- cod: "T",
4004
- value: "Todos"
4005
- }],
4006
- key_1: "T",
4007
- formatted_messages_2: [],
4008
- key_2: "",
4009
- formatted_messages_3: [],
4010
- key_3: ""
4011
- };
4012
- },
4013
- mounted: function mounted() {
4014
- this.receiveValueFormattedMessage(this.key_1, 2);
4015
- },
4016
- methods: {
4017
- calculateSelectPosition: function calculateSelectPosition(dropdownList, component, sizes) {
4018
- dropdownList.style.width = sizes.width;
4019
- var popper = createPopper(component.$refs.toggle, dropdownList, {
4020
- placement: this.placement
4021
- });
4022
- return function () {
4023
- return popper.destroy();
4024
- };
4025
- },
4026
- inputSelectKey1: function inputSelectKey1() {
4027
- if (!this.key_1) {
4028
- if (this.formatted_messages_2.length) this.formatted_messages_2 = [];
4029
- if (this.key_2) this.key_2 = "";
4030
- return;
4031
- }
4051
+ return result;
4052
+ }
4032
4053
 
4033
- this.receiveValueFormattedMessage(this.key_1, 2);
4034
- },
4035
- inputSelectKey2: function inputSelectKey2() {
4036
- if (!this.key_2) {
4037
- if (this.formatted_messages_3.length) this.formatted_messages_3 = [];
4038
- if (this.key_3) this.key_3 = "";
4039
- return;
4040
- }
4054
+ /**
4055
+ * Determine if a value is a String
4056
+ *
4057
+ * @param {Object} val The value to test
4058
+ * @returns {boolean} True if value is a String, otherwise false
4059
+ */
4060
+ function isString(val) {
4061
+ return typeof val === 'string';
4062
+ }
4041
4063
 
4042
- this.receiveValueFormattedMessage("T/".concat(this.key_2), 3);
4043
- },
4044
- receiveValueFormattedMessage: function receiveValueFormattedMessage(cod, selectionIndex) {
4045
- var _this = this;
4064
+ /**
4065
+ * Determine if a value is a Number
4066
+ *
4067
+ * @param {Object} val The value to test
4068
+ * @returns {boolean} True if value is a Number, otherwise false
4069
+ */
4070
+ function isNumber(val) {
4071
+ return typeof val === 'number';
4072
+ }
4046
4073
 
4047
- try {
4048
- if (!this.token_cliente) throw new Error("Informe token_cliente como chave na propriedade formattedMessageSettings que ocorre na chamada componente TextFooter ");
4049
- this.getStandardMessages(cod, this.token_cliente).then(function (data) {
4050
- if (data && typeof data == 'string') return _this.$toasted.global.emConstrucao({
4051
- msg: data
4052
- });
4053
- if (data) return _this.showFormattedMessage(data, selectionIndex);
4074
+ /**
4075
+ * Determine if a value is an Object
4076
+ *
4077
+ * @param {Object} val The value to test
4078
+ * @returns {boolean} True if value is an Object, otherwise false
4079
+ */
4080
+ function isObject(val) {
4081
+ return val !== null && typeof val === 'object';
4082
+ }
4054
4083
 
4055
- _this.$toasted.global.defaultError();
4056
- }).catch(function (e) {
4057
- console.error("Error in getStandardMessages: ", e);
4058
- });
4059
- } catch (e) {
4060
- console.error("Error in receiveValueFormattedMessage: ", e);
4061
- }
4062
- },
4063
- showFormattedMessage: function showFormattedMessage(messageData, selectionIndex) {
4064
- try {
4065
- var success = false;
4066
- if (Array.isArray(messageData)) success = true;
4067
- if (!success) this.$toasted.global.emConstrucao({
4068
- msg: messageData ? messageData.msg : "Nao foi possível obter mensagens"
4069
- });
4084
+ /**
4085
+ * Determine if a value is a plain Object
4086
+ *
4087
+ * @param {Object} val The value to test
4088
+ * @return {boolean} True if value is a plain Object, otherwise false
4089
+ */
4090
+ function isPlainObject(val) {
4091
+ if (toString.call(val) !== '[object Object]') {
4092
+ return false;
4093
+ }
4070
4094
 
4071
- switch (selectionIndex) {
4072
- case 2:
4073
- if (!success) {
4074
- this.formatted_messages_2.push(messageData);
4075
- this.key_2 = this.formatted_messages_2[0];
4076
- } else {
4077
- this.formatted_messages_2 = messageData;
4095
+ var prototype = Object.getPrototypeOf(val);
4096
+ return prototype === null || prototype === Object.prototype;
4097
+ }
4078
4098
 
4079
- if (this.formatted_messages_2.length == 1) {
4080
- if (this.formatted_messages_2[0].cod) {
4081
- this.key_2 = this.formatted_messages_2[0].cod;
4082
- this.receiveValueFormattedMessage("T/".concat(this.key_2), 3);
4083
- }
4084
- }
4085
- }
4099
+ /**
4100
+ * Determine if a value is a Date
4101
+ *
4102
+ * @param {Object} val The value to test
4103
+ * @returns {boolean} True if value is a Date, otherwise false
4104
+ */
4105
+ function isDate(val) {
4106
+ return toString.call(val) === '[object Date]';
4107
+ }
4086
4108
 
4087
- break;
4109
+ /**
4110
+ * Determine if a value is a File
4111
+ *
4112
+ * @param {Object} val The value to test
4113
+ * @returns {boolean} True if value is a File, otherwise false
4114
+ */
4115
+ function isFile(val) {
4116
+ return toString.call(val) === '[object File]';
4117
+ }
4088
4118
 
4089
- case 3:
4090
- if (!success) {
4091
- this.formatted_messages_3.push(messageData);
4092
- this.$toasted.global.emConstrucao({
4093
- msg: this.dictionary.msg_erro_sem_msg_formatada
4094
- });
4095
- this.$emit("close-blocker-standard-message");
4096
- } else {
4097
- if (!messageData.length) {
4098
- this.formatted_messages_3.push(this.dictionary.msg_erro_sem_msg_formatada);
4099
- this.key_3 = this.formatted_messages_3[0];
4100
- } else {
4101
- this.formatted_messages_3 = messageData;
4119
+ /**
4120
+ * Determine if a value is a Blob
4121
+ *
4122
+ * @param {Object} val The value to test
4123
+ * @returns {boolean} True if value is a Blob, otherwise false
4124
+ */
4125
+ function isBlob(val) {
4126
+ return toString.call(val) === '[object Blob]';
4127
+ }
4102
4128
 
4103
- if (this.formatted_messages_3.length == 1) {
4104
- if (this.formatted_messages_3[0].cod) {
4105
- this.key_3 = this.formatted_messages_3[0];
4106
- }
4107
- }
4108
- }
4109
- }
4129
+ /**
4130
+ * Determine if a value is a Function
4131
+ *
4132
+ * @param {Object} val The value to test
4133
+ * @returns {boolean} True if value is a Function, otherwise false
4134
+ */
4135
+ function isFunction(val) {
4136
+ return toString.call(val) === '[object Function]';
4137
+ }
4110
4138
 
4111
- break;
4139
+ /**
4140
+ * Determine if a value is a Stream
4141
+ *
4142
+ * @param {Object} val The value to test
4143
+ * @returns {boolean} True if value is a Stream, otherwise false
4144
+ */
4145
+ function isStream(val) {
4146
+ return isObject(val) && isFunction(val.pipe);
4147
+ }
4112
4148
 
4113
- default:
4114
- console.error("Error in showFormattedMessage: selectionIndex not found");
4115
- break;
4116
- }
4117
- } catch (e) {
4118
- console.error("Error in showFormattedMessage: ", e);
4119
- }
4120
- },
4121
- openMsg: function openMsg() {
4122
- try {
4123
- this.messageType == 1 ? this.insertFormattedMessage(this.key_3) : this.openFormattedMsgType2(this.key_3);
4124
- } catch (e) {
4125
- console.error("Error in openMsg: ", e);
4126
- }
4127
- },
4149
+ /**
4150
+ * Determine if a value is a URLSearchParams object
4151
+ *
4152
+ * @param {Object} val The value to test
4153
+ * @returns {boolean} True if value is a URLSearchParams object, otherwise false
4154
+ */
4155
+ function isURLSearchParams(val) {
4156
+ return toString.call(val) === '[object URLSearchParams]';
4157
+ }
4158
+
4159
+ /**
4160
+ * Trim excess whitespace off the beginning and end of a string
4161
+ *
4162
+ * @param {String} str The String to trim
4163
+ * @returns {String} The String freed of excess whitespace
4164
+ */
4165
+ function trim(str) {
4166
+ return str.trim ? str.trim() : str.replace(/^\s+|\s+$/g, '');
4167
+ }
4168
+
4169
+ /**
4170
+ * Determine if we're running in a standard browser environment
4171
+ *
4172
+ * This allows axios to run in a web worker, and react-native.
4173
+ * Both environments support XMLHttpRequest, but not fully standard globals.
4174
+ *
4175
+ * web workers:
4176
+ * typeof window -> undefined
4177
+ * typeof document -> undefined
4178
+ *
4179
+ * react-native:
4180
+ * navigator.product -> 'ReactNative'
4181
+ * nativescript
4182
+ * navigator.product -> 'NativeScript' or 'NS'
4183
+ */
4184
+ function isStandardBrowserEnv() {
4185
+ if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' ||
4186
+ navigator.product === 'NativeScript' ||
4187
+ navigator.product === 'NS')) {
4188
+ return false;
4189
+ }
4190
+ return (
4191
+ typeof window !== 'undefined' &&
4192
+ typeof document !== 'undefined'
4193
+ );
4194
+ }
4195
+
4196
+ /**
4197
+ * Iterate over an Array or an Object invoking a function for each item.
4198
+ *
4199
+ * If `obj` is an Array callback will be called passing
4200
+ * the value, index, and complete array for each item.
4201
+ *
4202
+ * If 'obj' is an Object callback will be called passing
4203
+ * the value, key, and complete object for each property.
4204
+ *
4205
+ * @param {Object|Array} obj The object to iterate
4206
+ * @param {Function} fn The callback to invoke for each item
4207
+ */
4208
+ function forEach(obj, fn) {
4209
+ // Don't bother if no value provided
4210
+ if (obj === null || typeof obj === 'undefined') {
4211
+ return;
4212
+ }
4213
+
4214
+ // Force an array if not already something iterable
4215
+ if (typeof obj !== 'object') {
4216
+ /*eslint no-param-reassign:0*/
4217
+ obj = [obj];
4218
+ }
4219
+
4220
+ if (isArray(obj)) {
4221
+ // Iterate over array values
4222
+ for (var i = 0, l = obj.length; i < l; i++) {
4223
+ fn.call(null, obj[i], i, obj);
4224
+ }
4225
+ } else {
4226
+ // Iterate over object keys
4227
+ for (var key in obj) {
4228
+ if (Object.prototype.hasOwnProperty.call(obj, key)) {
4229
+ fn.call(null, obj[key], key, obj);
4230
+ }
4231
+ }
4232
+ }
4233
+ }
4234
+
4235
+ /**
4236
+ * Accepts varargs expecting each argument to be an object, then
4237
+ * immutably merges the properties of each object and returns result.
4238
+ *
4239
+ * When multiple objects contain the same key the later object in
4240
+ * the arguments list will take precedence.
4241
+ *
4242
+ * Example:
4243
+ *
4244
+ * ```js
4245
+ * var result = merge({foo: 123}, {foo: 456});
4246
+ * console.log(result.foo); // outputs 456
4247
+ * ```
4248
+ *
4249
+ * @param {Object} obj1 Object to merge
4250
+ * @returns {Object} Result of all merge properties
4251
+ */
4252
+ function merge(/* obj1, obj2, obj3, ... */) {
4253
+ var result = {};
4254
+ function assignValue(val, key) {
4255
+ if (isPlainObject(result[key]) && isPlainObject(val)) {
4256
+ result[key] = merge(result[key], val);
4257
+ } else if (isPlainObject(val)) {
4258
+ result[key] = merge({}, val);
4259
+ } else if (isArray(val)) {
4260
+ result[key] = val.slice();
4261
+ } else {
4262
+ result[key] = val;
4263
+ }
4264
+ }
4265
+
4266
+ for (var i = 0, l = arguments.length; i < l; i++) {
4267
+ forEach(arguments[i], assignValue);
4268
+ }
4269
+ return result;
4270
+ }
4271
+
4272
+ /**
4273
+ * Extends object a by mutably adding to it the properties of object b.
4274
+ *
4275
+ * @param {Object} a The object to be extended
4276
+ * @param {Object} b The object to copy properties from
4277
+ * @param {Object} thisArg The object to bind function to
4278
+ * @return {Object} The resulting value of object a
4279
+ */
4280
+ function extend(a, b, thisArg) {
4281
+ forEach(b, function assignValue(val, key) {
4282
+ if (thisArg && typeof val === 'function') {
4283
+ a[key] = bind(val, thisArg);
4284
+ } else {
4285
+ a[key] = val;
4286
+ }
4287
+ });
4288
+ return a;
4289
+ }
4290
+
4291
+ /**
4292
+ * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)
4293
+ *
4294
+ * @param {string} content with BOM
4295
+ * @return {string} content value without BOM
4296
+ */
4297
+ function stripBOM(content) {
4298
+ if (content.charCodeAt(0) === 0xFEFF) {
4299
+ content = content.slice(1);
4300
+ }
4301
+ return content;
4302
+ }
4303
+
4304
+ var utils = {
4305
+ isArray: isArray,
4306
+ isArrayBuffer: isArrayBuffer,
4307
+ isBuffer: isBuffer,
4308
+ isFormData: isFormData,
4309
+ isArrayBufferView: isArrayBufferView,
4310
+ isString: isString,
4311
+ isNumber: isNumber,
4312
+ isObject: isObject,
4313
+ isPlainObject: isPlainObject,
4314
+ isUndefined: isUndefined,
4315
+ isDate: isDate,
4316
+ isFile: isFile,
4317
+ isBlob: isBlob,
4318
+ isFunction: isFunction,
4319
+ isStream: isStream,
4320
+ isURLSearchParams: isURLSearchParams,
4321
+ isStandardBrowserEnv: isStandardBrowserEnv,
4322
+ forEach: forEach,
4323
+ merge: merge,
4324
+ extend: extend,
4325
+ trim: trim,
4326
+ stripBOM: stripBOM
4327
+ };function encode(val) {
4328
+ return encodeURIComponent(val).
4329
+ replace(/%3A/gi, ':').
4330
+ replace(/%24/g, '$').
4331
+ replace(/%2C/gi, ',').
4332
+ replace(/%20/g, '+').
4333
+ replace(/%5B/gi, '[').
4334
+ replace(/%5D/gi, ']');
4335
+ }
4336
+
4337
+ /**
4338
+ * Build a URL by appending params to the end
4339
+ *
4340
+ * @param {string} url The base of the url (e.g., http://www.google.com)
4341
+ * @param {object} [params] The params to be appended
4342
+ * @returns {string} The formatted url
4343
+ */
4344
+ var buildURL = function buildURL(url, params, paramsSerializer) {
4345
+ /*eslint no-param-reassign:0*/
4346
+ if (!params) {
4347
+ return url;
4348
+ }
4349
+
4350
+ var serializedParams;
4351
+ if (paramsSerializer) {
4352
+ serializedParams = paramsSerializer(params);
4353
+ } else if (utils.isURLSearchParams(params)) {
4354
+ serializedParams = params.toString();
4355
+ } else {
4356
+ var parts = [];
4357
+
4358
+ utils.forEach(params, function serialize(val, key) {
4359
+ if (val === null || typeof val === 'undefined') {
4360
+ return;
4361
+ }
4362
+
4363
+ if (utils.isArray(val)) {
4364
+ key = key + '[]';
4365
+ } else {
4366
+ val = [val];
4367
+ }
4368
+
4369
+ utils.forEach(val, function parseValue(v) {
4370
+ if (utils.isDate(v)) {
4371
+ v = v.toISOString();
4372
+ } else if (utils.isObject(v)) {
4373
+ v = JSON.stringify(v);
4374
+ }
4375
+ parts.push(encode(key) + '=' + encode(v));
4376
+ });
4377
+ });
4378
+
4379
+ serializedParams = parts.join('&');
4380
+ }
4381
+
4382
+ if (serializedParams) {
4383
+ var hashmarkIndex = url.indexOf('#');
4384
+ if (hashmarkIndex !== -1) {
4385
+ url = url.slice(0, hashmarkIndex);
4386
+ }
4387
+
4388
+ url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;
4389
+ }
4390
+
4391
+ return url;
4392
+ };function InterceptorManager() {
4393
+ this.handlers = [];
4394
+ }
4395
+
4396
+ /**
4397
+ * Add a new interceptor to the stack
4398
+ *
4399
+ * @param {Function} fulfilled The function to handle `then` for a `Promise`
4400
+ * @param {Function} rejected The function to handle `reject` for a `Promise`
4401
+ *
4402
+ * @return {Number} An ID used to remove interceptor later
4403
+ */
4404
+ InterceptorManager.prototype.use = function use(fulfilled, rejected, options) {
4405
+ this.handlers.push({
4406
+ fulfilled: fulfilled,
4407
+ rejected: rejected,
4408
+ synchronous: options ? options.synchronous : false,
4409
+ runWhen: options ? options.runWhen : null
4410
+ });
4411
+ return this.handlers.length - 1;
4412
+ };
4413
+
4414
+ /**
4415
+ * Remove an interceptor from the stack
4416
+ *
4417
+ * @param {Number} id The ID that was returned by `use`
4418
+ */
4419
+ InterceptorManager.prototype.eject = function eject(id) {
4420
+ if (this.handlers[id]) {
4421
+ this.handlers[id] = null;
4422
+ }
4423
+ };
4424
+
4425
+ /**
4426
+ * Iterate over all the registered interceptors
4427
+ *
4428
+ * This method is particularly useful for skipping over any
4429
+ * interceptors that may have become `null` calling `eject`.
4430
+ *
4431
+ * @param {Function} fn The function to call for each interceptor
4432
+ */
4433
+ InterceptorManager.prototype.forEach = function forEach(fn) {
4434
+ utils.forEach(this.handlers, function forEachHandler(h) {
4435
+ if (h !== null) {
4436
+ fn(h);
4437
+ }
4438
+ });
4439
+ };
4440
+
4441
+ var InterceptorManager_1 = InterceptorManager;var normalizeHeaderName = function normalizeHeaderName(headers, normalizedName) {
4442
+ utils.forEach(headers, function processHeader(value, name) {
4443
+ if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {
4444
+ headers[normalizedName] = value;
4445
+ delete headers[name];
4446
+ }
4447
+ });
4448
+ };/**
4449
+ * Update an Error with the specified config, error code, and response.
4450
+ *
4451
+ * @param {Error} error The error to update.
4452
+ * @param {Object} config The config.
4453
+ * @param {string} [code] The error code (for example, 'ECONNABORTED').
4454
+ * @param {Object} [request] The request.
4455
+ * @param {Object} [response] The response.
4456
+ * @returns {Error} The error.
4457
+ */
4458
+ var enhanceError = function enhanceError(error, config, code, request, response) {
4459
+ error.config = config;
4460
+ if (code) {
4461
+ error.code = code;
4462
+ }
4463
+
4464
+ error.request = request;
4465
+ error.response = response;
4466
+ error.isAxiosError = true;
4467
+
4468
+ error.toJSON = function toJSON() {
4469
+ return {
4470
+ // Standard
4471
+ message: this.message,
4472
+ name: this.name,
4473
+ // Microsoft
4474
+ description: this.description,
4475
+ number: this.number,
4476
+ // Mozilla
4477
+ fileName: this.fileName,
4478
+ lineNumber: this.lineNumber,
4479
+ columnNumber: this.columnNumber,
4480
+ stack: this.stack,
4481
+ // Axios
4482
+ config: this.config,
4483
+ code: this.code,
4484
+ status: this.response && this.response.status ? this.response.status : null
4485
+ };
4486
+ };
4487
+ return error;
4488
+ };/**
4489
+ * Create an Error with the specified message, config, error code, request and response.
4490
+ *
4491
+ * @param {string} message The error message.
4492
+ * @param {Object} config The config.
4493
+ * @param {string} [code] The error code (for example, 'ECONNABORTED').
4494
+ * @param {Object} [request] The request.
4495
+ * @param {Object} [response] The response.
4496
+ * @returns {Error} The created error.
4497
+ */
4498
+ var createError = function createError(message, config, code, request, response) {
4499
+ var error = new Error(message);
4500
+ return enhanceError(error, config, code, request, response);
4501
+ };/**
4502
+ * Resolve or reject a Promise based on response status.
4503
+ *
4504
+ * @param {Function} resolve A function that resolves the promise.
4505
+ * @param {Function} reject A function that rejects the promise.
4506
+ * @param {object} response The response.
4507
+ */
4508
+ var settle = function settle(resolve, reject, response) {
4509
+ var validateStatus = response.config.validateStatus;
4510
+ if (!response.status || !validateStatus || validateStatus(response.status)) {
4511
+ resolve(response);
4512
+ } else {
4513
+ reject(createError(
4514
+ 'Request failed with status code ' + response.status,
4515
+ response.config,
4516
+ null,
4517
+ response.request,
4518
+ response
4519
+ ));
4520
+ }
4521
+ };var cookies = (
4522
+ utils.isStandardBrowserEnv() ?
4523
+
4524
+ // Standard browser envs support document.cookie
4525
+ (function standardBrowserEnv() {
4526
+ return {
4527
+ write: function write(name, value, expires, path, domain, secure) {
4528
+ var cookie = [];
4529
+ cookie.push(name + '=' + encodeURIComponent(value));
4530
+
4531
+ if (utils.isNumber(expires)) {
4532
+ cookie.push('expires=' + new Date(expires).toGMTString());
4533
+ }
4534
+
4535
+ if (utils.isString(path)) {
4536
+ cookie.push('path=' + path);
4537
+ }
4538
+
4539
+ if (utils.isString(domain)) {
4540
+ cookie.push('domain=' + domain);
4541
+ }
4542
+
4543
+ if (secure === true) {
4544
+ cookie.push('secure');
4545
+ }
4546
+
4547
+ document.cookie = cookie.join('; ');
4548
+ },
4549
+
4550
+ read: function read(name) {
4551
+ var match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));
4552
+ return (match ? decodeURIComponent(match[3]) : null);
4553
+ },
4554
+
4555
+ remove: function remove(name) {
4556
+ this.write(name, '', Date.now() - 86400000);
4557
+ }
4558
+ };
4559
+ })() :
4560
+
4561
+ // Non standard browser env (web workers, react-native) lack needed support.
4562
+ (function nonStandardBrowserEnv() {
4563
+ return {
4564
+ write: function write() {},
4565
+ read: function read() { return null; },
4566
+ remove: function remove() {}
4567
+ };
4568
+ })()
4569
+ );/**
4570
+ * Determines whether the specified URL is absolute
4571
+ *
4572
+ * @param {string} url The URL to test
4573
+ * @returns {boolean} True if the specified URL is absolute, otherwise false
4574
+ */
4575
+ var isAbsoluteURL = function isAbsoluteURL(url) {
4576
+ // A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL).
4577
+ // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
4578
+ // by any combination of letters, digits, plus, period, or hyphen.
4579
+ return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
4580
+ };/**
4581
+ * Creates a new URL by combining the specified URLs
4582
+ *
4583
+ * @param {string} baseURL The base URL
4584
+ * @param {string} relativeURL The relative URL
4585
+ * @returns {string} The combined URL
4586
+ */
4587
+ var combineURLs = function combineURLs(baseURL, relativeURL) {
4588
+ return relativeURL
4589
+ ? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '')
4590
+ : baseURL;
4591
+ };/**
4592
+ * Creates a new URL by combining the baseURL with the requestedURL,
4593
+ * only when the requestedURL is not already an absolute URL.
4594
+ * If the requestURL is absolute, this function returns the requestedURL untouched.
4595
+ *
4596
+ * @param {string} baseURL The base URL
4597
+ * @param {string} requestedURL Absolute or relative URL to combine
4598
+ * @returns {string} The combined full path
4599
+ */
4600
+ var buildFullPath = function buildFullPath(baseURL, requestedURL) {
4601
+ if (baseURL && !isAbsoluteURL(requestedURL)) {
4602
+ return combineURLs(baseURL, requestedURL);
4603
+ }
4604
+ return requestedURL;
4605
+ };// Headers whose duplicates are ignored by node
4606
+ // c.f. https://nodejs.org/api/http.html#http_message_headers
4607
+ var ignoreDuplicateOf = [
4608
+ 'age', 'authorization', 'content-length', 'content-type', 'etag',
4609
+ 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',
4610
+ 'last-modified', 'location', 'max-forwards', 'proxy-authorization',
4611
+ 'referer', 'retry-after', 'user-agent'
4612
+ ];
4613
+
4614
+ /**
4615
+ * Parse headers into an object
4616
+ *
4617
+ * ```
4618
+ * Date: Wed, 27 Aug 2014 08:58:49 GMT
4619
+ * Content-Type: application/json
4620
+ * Connection: keep-alive
4621
+ * Transfer-Encoding: chunked
4622
+ * ```
4623
+ *
4624
+ * @param {String} headers Headers needing to be parsed
4625
+ * @returns {Object} Headers parsed into an object
4626
+ */
4627
+ var parseHeaders = function parseHeaders(headers) {
4628
+ var parsed = {};
4629
+ var key;
4630
+ var val;
4631
+ var i;
4632
+
4633
+ if (!headers) { return parsed; }
4634
+
4635
+ utils.forEach(headers.split('\n'), function parser(line) {
4636
+ i = line.indexOf(':');
4637
+ key = utils.trim(line.substr(0, i)).toLowerCase();
4638
+ val = utils.trim(line.substr(i + 1));
4639
+
4640
+ if (key) {
4641
+ if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {
4642
+ return;
4643
+ }
4644
+ if (key === 'set-cookie') {
4645
+ parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);
4646
+ } else {
4647
+ parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
4648
+ }
4649
+ }
4650
+ });
4651
+
4652
+ return parsed;
4653
+ };var isURLSameOrigin = (
4654
+ utils.isStandardBrowserEnv() ?
4655
+
4656
+ // Standard browser envs have full support of the APIs needed to test
4657
+ // whether the request URL is of the same origin as current location.
4658
+ (function standardBrowserEnv() {
4659
+ var msie = /(msie|trident)/i.test(navigator.userAgent);
4660
+ var urlParsingNode = document.createElement('a');
4661
+ var originURL;
4662
+
4663
+ /**
4664
+ * Parse a URL to discover it's components
4665
+ *
4666
+ * @param {String} url The URL to be parsed
4667
+ * @returns {Object}
4668
+ */
4669
+ function resolveURL(url) {
4670
+ var href = url;
4671
+
4672
+ if (msie) {
4673
+ // IE needs attribute set twice to normalize properties
4674
+ urlParsingNode.setAttribute('href', href);
4675
+ href = urlParsingNode.href;
4676
+ }
4677
+
4678
+ urlParsingNode.setAttribute('href', href);
4679
+
4680
+ // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils
4681
+ return {
4682
+ href: urlParsingNode.href,
4683
+ protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',
4684
+ host: urlParsingNode.host,
4685
+ search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '',
4686
+ hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',
4687
+ hostname: urlParsingNode.hostname,
4688
+ port: urlParsingNode.port,
4689
+ pathname: (urlParsingNode.pathname.charAt(0) === '/') ?
4690
+ urlParsingNode.pathname :
4691
+ '/' + urlParsingNode.pathname
4692
+ };
4693
+ }
4694
+
4695
+ originURL = resolveURL(window.location.href);
4696
+
4697
+ /**
4698
+ * Determine if a URL shares the same origin as the current location
4699
+ *
4700
+ * @param {String} requestURL The URL to test
4701
+ * @returns {boolean} True if URL shares the same origin, otherwise false
4702
+ */
4703
+ return function isURLSameOrigin(requestURL) {
4704
+ var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;
4705
+ return (parsed.protocol === originURL.protocol &&
4706
+ parsed.host === originURL.host);
4707
+ };
4708
+ })() :
4709
+
4710
+ // Non standard browser envs (web workers, react-native) lack needed support.
4711
+ (function nonStandardBrowserEnv() {
4712
+ return function isURLSameOrigin() {
4713
+ return true;
4714
+ };
4715
+ })()
4716
+ );/**
4717
+ * A `Cancel` is an object that is thrown when an operation is canceled.
4718
+ *
4719
+ * @class
4720
+ * @param {string=} message The message.
4721
+ */
4722
+ function Cancel(message) {
4723
+ this.message = message;
4724
+ }
4725
+
4726
+ Cancel.prototype.toString = function toString() {
4727
+ return 'Cancel' + (this.message ? ': ' + this.message : '');
4728
+ };
4729
+
4730
+ Cancel.prototype.__CANCEL__ = true;
4731
+
4732
+ var Cancel_1 = Cancel;var defaults$1 = defaults_1;var xhr = function xhrAdapter(config) {
4733
+ return new Promise(function dispatchXhrRequest(resolve, reject) {
4734
+ var requestData = config.data;
4735
+ var requestHeaders = config.headers;
4736
+ var responseType = config.responseType;
4737
+ var onCanceled;
4738
+ function done() {
4739
+ if (config.cancelToken) {
4740
+ config.cancelToken.unsubscribe(onCanceled);
4741
+ }
4742
+
4743
+ if (config.signal) {
4744
+ config.signal.removeEventListener('abort', onCanceled);
4745
+ }
4746
+ }
4747
+
4748
+ if (utils.isFormData(requestData)) {
4749
+ delete requestHeaders['Content-Type']; // Let the browser set it
4750
+ }
4751
+
4752
+ var request = new XMLHttpRequest();
4753
+
4754
+ // HTTP basic authentication
4755
+ if (config.auth) {
4756
+ var username = config.auth.username || '';
4757
+ var password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';
4758
+ requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);
4759
+ }
4760
+
4761
+ var fullPath = buildFullPath(config.baseURL, config.url);
4762
+ request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);
4763
+
4764
+ // Set the request timeout in MS
4765
+ request.timeout = config.timeout;
4766
+
4767
+ function onloadend() {
4768
+ if (!request) {
4769
+ return;
4770
+ }
4771
+ // Prepare the response
4772
+ var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;
4773
+ var responseData = !responseType || responseType === 'text' || responseType === 'json' ?
4774
+ request.responseText : request.response;
4775
+ var response = {
4776
+ data: responseData,
4777
+ status: request.status,
4778
+ statusText: request.statusText,
4779
+ headers: responseHeaders,
4780
+ config: config,
4781
+ request: request
4782
+ };
4783
+
4784
+ settle(function _resolve(value) {
4785
+ resolve(value);
4786
+ done();
4787
+ }, function _reject(err) {
4788
+ reject(err);
4789
+ done();
4790
+ }, response);
4791
+
4792
+ // Clean up request
4793
+ request = null;
4794
+ }
4795
+
4796
+ if ('onloadend' in request) {
4797
+ // Use onloadend if available
4798
+ request.onloadend = onloadend;
4799
+ } else {
4800
+ // Listen for ready state to emulate onloadend
4801
+ request.onreadystatechange = function handleLoad() {
4802
+ if (!request || request.readyState !== 4) {
4803
+ return;
4804
+ }
4805
+
4806
+ // The request errored out and we didn't get a response, this will be
4807
+ // handled by onerror instead
4808
+ // With one exception: request that using file: protocol, most browsers
4809
+ // will return status as 0 even though it's a successful request
4810
+ if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {
4811
+ return;
4812
+ }
4813
+ // readystate handler is calling before onerror or ontimeout handlers,
4814
+ // so we should call onloadend on the next 'tick'
4815
+ setTimeout(onloadend);
4816
+ };
4817
+ }
4818
+
4819
+ // Handle browser request cancellation (as opposed to a manual cancellation)
4820
+ request.onabort = function handleAbort() {
4821
+ if (!request) {
4822
+ return;
4823
+ }
4824
+
4825
+ reject(createError('Request aborted', config, 'ECONNABORTED', request));
4826
+
4827
+ // Clean up request
4828
+ request = null;
4829
+ };
4830
+
4831
+ // Handle low level network errors
4832
+ request.onerror = function handleError() {
4833
+ // Real errors are hidden from us by the browser
4834
+ // onerror should only fire if it's a network error
4835
+ reject(createError('Network Error', config, null, request));
4836
+
4837
+ // Clean up request
4838
+ request = null;
4839
+ };
4840
+
4841
+ // Handle timeout
4842
+ request.ontimeout = function handleTimeout() {
4843
+ var timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';
4844
+ var transitional = config.transitional || defaults$1.transitional;
4845
+ if (config.timeoutErrorMessage) {
4846
+ timeoutErrorMessage = config.timeoutErrorMessage;
4847
+ }
4848
+ reject(createError(
4849
+ timeoutErrorMessage,
4850
+ config,
4851
+ transitional.clarifyTimeoutError ? 'ETIMEDOUT' : 'ECONNABORTED',
4852
+ request));
4853
+
4854
+ // Clean up request
4855
+ request = null;
4856
+ };
4857
+
4858
+ // Add xsrf header
4859
+ // This is only done if running in a standard browser environment.
4860
+ // Specifically not if we're in a web worker, or react-native.
4861
+ if (utils.isStandardBrowserEnv()) {
4862
+ // Add xsrf header
4863
+ var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ?
4864
+ cookies.read(config.xsrfCookieName) :
4865
+ undefined;
4866
+
4867
+ if (xsrfValue) {
4868
+ requestHeaders[config.xsrfHeaderName] = xsrfValue;
4869
+ }
4870
+ }
4871
+
4872
+ // Add headers to the request
4873
+ if ('setRequestHeader' in request) {
4874
+ utils.forEach(requestHeaders, function setRequestHeader(val, key) {
4875
+ if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {
4876
+ // Remove Content-Type if data is undefined
4877
+ delete requestHeaders[key];
4878
+ } else {
4879
+ // Otherwise add header to the request
4880
+ request.setRequestHeader(key, val);
4881
+ }
4882
+ });
4883
+ }
4884
+
4885
+ // Add withCredentials to request if needed
4886
+ if (!utils.isUndefined(config.withCredentials)) {
4887
+ request.withCredentials = !!config.withCredentials;
4888
+ }
4889
+
4890
+ // Add responseType to request if needed
4891
+ if (responseType && responseType !== 'json') {
4892
+ request.responseType = config.responseType;
4893
+ }
4894
+
4895
+ // Handle progress if needed
4896
+ if (typeof config.onDownloadProgress === 'function') {
4897
+ request.addEventListener('progress', config.onDownloadProgress);
4898
+ }
4899
+
4900
+ // Not all browsers support upload events
4901
+ if (typeof config.onUploadProgress === 'function' && request.upload) {
4902
+ request.upload.addEventListener('progress', config.onUploadProgress);
4903
+ }
4904
+
4905
+ if (config.cancelToken || config.signal) {
4906
+ // Handle cancellation
4907
+ // eslint-disable-next-line func-names
4908
+ onCanceled = function(cancel) {
4909
+ if (!request) {
4910
+ return;
4911
+ }
4912
+ reject(!cancel || (cancel && cancel.type) ? new Cancel_1('canceled') : cancel);
4913
+ request.abort();
4914
+ request = null;
4915
+ };
4916
+
4917
+ config.cancelToken && config.cancelToken.subscribe(onCanceled);
4918
+ if (config.signal) {
4919
+ config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled);
4920
+ }
4921
+ }
4922
+
4923
+ if (!requestData) {
4924
+ requestData = null;
4925
+ }
4926
+
4927
+ // Send the request
4928
+ request.send(requestData);
4929
+ });
4930
+ };function createCommonjsModule(fn, basedir, module) {
4931
+ return module = {
4932
+ path: basedir,
4933
+ exports: {},
4934
+ require: function (path, base) {
4935
+ return commonjsRequire(path, (base === undefined || base === null) ? module.path : base);
4936
+ }
4937
+ }, fn(module, module.exports), module.exports;
4938
+ }
4939
+
4940
+ function commonjsRequire () {
4941
+ throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');
4942
+ }/**
4943
+ * Helpers.
4944
+ */
4945
+
4946
+ var s = 1000;
4947
+ var m = s * 60;
4948
+ var h = m * 60;
4949
+ var d = h * 24;
4950
+ var w = d * 7;
4951
+ var y = d * 365.25;
4952
+
4953
+ /**
4954
+ * Parse or format the given `val`.
4955
+ *
4956
+ * Options:
4957
+ *
4958
+ * - `long` verbose formatting [false]
4959
+ *
4960
+ * @param {String|Number} val
4961
+ * @param {Object} [options]
4962
+ * @throws {Error} throw an error if val is not a non-empty string or a number
4963
+ * @return {String|Number}
4964
+ * @api public
4965
+ */
4966
+
4967
+ var ms = function(val, options) {
4968
+ options = options || {};
4969
+ var type = typeof val;
4970
+ if (type === 'string' && val.length > 0) {
4971
+ return parse(val);
4972
+ } else if (type === 'number' && isFinite(val)) {
4973
+ return options.long ? fmtLong(val) : fmtShort(val);
4974
+ }
4975
+ throw new Error(
4976
+ 'val is not a non-empty string or a valid number. val=' +
4977
+ JSON.stringify(val)
4978
+ );
4979
+ };
4980
+
4981
+ /**
4982
+ * Parse the given `str` and return milliseconds.
4983
+ *
4984
+ * @param {String} str
4985
+ * @return {Number}
4986
+ * @api private
4987
+ */
4988
+
4989
+ function parse(str) {
4990
+ str = String(str);
4991
+ if (str.length > 100) {
4992
+ return;
4993
+ }
4994
+ var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
4995
+ str
4996
+ );
4997
+ if (!match) {
4998
+ return;
4999
+ }
5000
+ var n = parseFloat(match[1]);
5001
+ var type = (match[2] || 'ms').toLowerCase();
5002
+ switch (type) {
5003
+ case 'years':
5004
+ case 'year':
5005
+ case 'yrs':
5006
+ case 'yr':
5007
+ case 'y':
5008
+ return n * y;
5009
+ case 'weeks':
5010
+ case 'week':
5011
+ case 'w':
5012
+ return n * w;
5013
+ case 'days':
5014
+ case 'day':
5015
+ case 'd':
5016
+ return n * d;
5017
+ case 'hours':
5018
+ case 'hour':
5019
+ case 'hrs':
5020
+ case 'hr':
5021
+ case 'h':
5022
+ return n * h;
5023
+ case 'minutes':
5024
+ case 'minute':
5025
+ case 'mins':
5026
+ case 'min':
5027
+ case 'm':
5028
+ return n * m;
5029
+ case 'seconds':
5030
+ case 'second':
5031
+ case 'secs':
5032
+ case 'sec':
5033
+ case 's':
5034
+ return n * s;
5035
+ case 'milliseconds':
5036
+ case 'millisecond':
5037
+ case 'msecs':
5038
+ case 'msec':
5039
+ case 'ms':
5040
+ return n;
5041
+ default:
5042
+ return undefined;
5043
+ }
5044
+ }
5045
+
5046
+ /**
5047
+ * Short format for `ms`.
5048
+ *
5049
+ * @param {Number} ms
5050
+ * @return {String}
5051
+ * @api private
5052
+ */
5053
+
5054
+ function fmtShort(ms) {
5055
+ var msAbs = Math.abs(ms);
5056
+ if (msAbs >= d) {
5057
+ return Math.round(ms / d) + 'd';
5058
+ }
5059
+ if (msAbs >= h) {
5060
+ return Math.round(ms / h) + 'h';
5061
+ }
5062
+ if (msAbs >= m) {
5063
+ return Math.round(ms / m) + 'm';
5064
+ }
5065
+ if (msAbs >= s) {
5066
+ return Math.round(ms / s) + 's';
5067
+ }
5068
+ return ms + 'ms';
5069
+ }
5070
+
5071
+ /**
5072
+ * Long format for `ms`.
5073
+ *
5074
+ * @param {Number} ms
5075
+ * @return {String}
5076
+ * @api private
5077
+ */
5078
+
5079
+ function fmtLong(ms) {
5080
+ var msAbs = Math.abs(ms);
5081
+ if (msAbs >= d) {
5082
+ return plural(ms, msAbs, d, 'day');
5083
+ }
5084
+ if (msAbs >= h) {
5085
+ return plural(ms, msAbs, h, 'hour');
5086
+ }
5087
+ if (msAbs >= m) {
5088
+ return plural(ms, msAbs, m, 'minute');
5089
+ }
5090
+ if (msAbs >= s) {
5091
+ return plural(ms, msAbs, s, 'second');
5092
+ }
5093
+ return ms + ' ms';
5094
+ }
5095
+
5096
+ /**
5097
+ * Pluralization helper.
5098
+ */
5099
+
5100
+ function plural(ms, msAbs, n, name) {
5101
+ var isPlural = msAbs >= n * 1.5;
5102
+ return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');
5103
+ }/**
5104
+ * This is the common logic for both the Node.js and web browser
5105
+ * implementations of `debug()`.
5106
+ */
5107
+
5108
+ function setup(env) {
5109
+ createDebug.debug = createDebug;
5110
+ createDebug.default = createDebug;
5111
+ createDebug.coerce = coerce;
5112
+ createDebug.disable = disable;
5113
+ createDebug.enable = enable;
5114
+ createDebug.enabled = enabled;
5115
+ createDebug.humanize = ms;
5116
+ createDebug.destroy = destroy;
5117
+
5118
+ Object.keys(env).forEach(key => {
5119
+ createDebug[key] = env[key];
5120
+ });
5121
+
5122
+ /**
5123
+ * The currently active debug mode names, and names to skip.
5124
+ */
5125
+
5126
+ createDebug.names = [];
5127
+ createDebug.skips = [];
5128
+
5129
+ /**
5130
+ * Map of special "%n" handling functions, for the debug "format" argument.
5131
+ *
5132
+ * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
5133
+ */
5134
+ createDebug.formatters = {};
5135
+
5136
+ /**
5137
+ * Selects a color for a debug namespace
5138
+ * @param {String} namespace The namespace string for the for the debug instance to be colored
5139
+ * @return {Number|String} An ANSI color code for the given namespace
5140
+ * @api private
5141
+ */
5142
+ function selectColor(namespace) {
5143
+ let hash = 0;
5144
+
5145
+ for (let i = 0; i < namespace.length; i++) {
5146
+ hash = ((hash << 5) - hash) + namespace.charCodeAt(i);
5147
+ hash |= 0; // Convert to 32bit integer
5148
+ }
5149
+
5150
+ return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
5151
+ }
5152
+ createDebug.selectColor = selectColor;
5153
+
5154
+ /**
5155
+ * Create a debugger with the given `namespace`.
5156
+ *
5157
+ * @param {String} namespace
5158
+ * @return {Function}
5159
+ * @api public
5160
+ */
5161
+ function createDebug(namespace) {
5162
+ let prevTime;
5163
+ let enableOverride = null;
5164
+ let namespacesCache;
5165
+ let enabledCache;
5166
+
5167
+ function debug(...args) {
5168
+ // Disabled?
5169
+ if (!debug.enabled) {
5170
+ return;
5171
+ }
5172
+
5173
+ const self = debug;
5174
+
5175
+ // Set `diff` timestamp
5176
+ const curr = Number(new Date());
5177
+ const ms = curr - (prevTime || curr);
5178
+ self.diff = ms;
5179
+ self.prev = prevTime;
5180
+ self.curr = curr;
5181
+ prevTime = curr;
5182
+
5183
+ args[0] = createDebug.coerce(args[0]);
5184
+
5185
+ if (typeof args[0] !== 'string') {
5186
+ // Anything else let's inspect with %O
5187
+ args.unshift('%O');
5188
+ }
5189
+
5190
+ // Apply any `formatters` transformations
5191
+ let index = 0;
5192
+ args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {
5193
+ // If we encounter an escaped % then don't increase the array index
5194
+ if (match === '%%') {
5195
+ return '%';
5196
+ }
5197
+ index++;
5198
+ const formatter = createDebug.formatters[format];
5199
+ if (typeof formatter === 'function') {
5200
+ const val = args[index];
5201
+ match = formatter.call(self, val);
5202
+
5203
+ // Now we need to remove `args[index]` since it's inlined in the `format`
5204
+ args.splice(index, 1);
5205
+ index--;
5206
+ }
5207
+ return match;
5208
+ });
5209
+
5210
+ // Apply env-specific formatting (colors, etc.)
5211
+ createDebug.formatArgs.call(self, args);
5212
+
5213
+ const logFn = self.log || createDebug.log;
5214
+ logFn.apply(self, args);
5215
+ }
5216
+
5217
+ debug.namespace = namespace;
5218
+ debug.useColors = createDebug.useColors();
5219
+ debug.color = createDebug.selectColor(namespace);
5220
+ debug.extend = extend;
5221
+ debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.
5222
+
5223
+ Object.defineProperty(debug, 'enabled', {
5224
+ enumerable: true,
5225
+ configurable: false,
5226
+ get: () => {
5227
+ if (enableOverride !== null) {
5228
+ return enableOverride;
5229
+ }
5230
+ if (namespacesCache !== createDebug.namespaces) {
5231
+ namespacesCache = createDebug.namespaces;
5232
+ enabledCache = createDebug.enabled(namespace);
5233
+ }
5234
+
5235
+ return enabledCache;
5236
+ },
5237
+ set: v => {
5238
+ enableOverride = v;
5239
+ }
5240
+ });
5241
+
5242
+ // Env-specific initialization logic for debug instances
5243
+ if (typeof createDebug.init === 'function') {
5244
+ createDebug.init(debug);
5245
+ }
5246
+
5247
+ return debug;
5248
+ }
5249
+
5250
+ function extend(namespace, delimiter) {
5251
+ const newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);
5252
+ newDebug.log = this.log;
5253
+ return newDebug;
5254
+ }
5255
+
5256
+ /**
5257
+ * Enables a debug mode by namespaces. This can include modes
5258
+ * separated by a colon and wildcards.
5259
+ *
5260
+ * @param {String} namespaces
5261
+ * @api public
5262
+ */
5263
+ function enable(namespaces) {
5264
+ createDebug.save(namespaces);
5265
+ createDebug.namespaces = namespaces;
5266
+
5267
+ createDebug.names = [];
5268
+ createDebug.skips = [];
5269
+
5270
+ let i;
5271
+ const split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
5272
+ const len = split.length;
5273
+
5274
+ for (i = 0; i < len; i++) {
5275
+ if (!split[i]) {
5276
+ // ignore empty strings
5277
+ continue;
5278
+ }
5279
+
5280
+ namespaces = split[i].replace(/\*/g, '.*?');
5281
+
5282
+ if (namespaces[0] === '-') {
5283
+ createDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));
5284
+ } else {
5285
+ createDebug.names.push(new RegExp('^' + namespaces + '$'));
5286
+ }
5287
+ }
5288
+ }
5289
+
5290
+ /**
5291
+ * Disable debug output.
5292
+ *
5293
+ * @return {String} namespaces
5294
+ * @api public
5295
+ */
5296
+ function disable() {
5297
+ const namespaces = [
5298
+ ...createDebug.names.map(toNamespace),
5299
+ ...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace)
5300
+ ].join(',');
5301
+ createDebug.enable('');
5302
+ return namespaces;
5303
+ }
5304
+
5305
+ /**
5306
+ * Returns true if the given mode name is enabled, false otherwise.
5307
+ *
5308
+ * @param {String} name
5309
+ * @return {Boolean}
5310
+ * @api public
5311
+ */
5312
+ function enabled(name) {
5313
+ if (name[name.length - 1] === '*') {
5314
+ return true;
5315
+ }
5316
+
5317
+ let i;
5318
+ let len;
5319
+
5320
+ for (i = 0, len = createDebug.skips.length; i < len; i++) {
5321
+ if (createDebug.skips[i].test(name)) {
5322
+ return false;
5323
+ }
5324
+ }
5325
+
5326
+ for (i = 0, len = createDebug.names.length; i < len; i++) {
5327
+ if (createDebug.names[i].test(name)) {
5328
+ return true;
5329
+ }
5330
+ }
5331
+
5332
+ return false;
5333
+ }
5334
+
5335
+ /**
5336
+ * Convert regexp to namespace
5337
+ *
5338
+ * @param {RegExp} regxep
5339
+ * @return {String} namespace
5340
+ * @api private
5341
+ */
5342
+ function toNamespace(regexp) {
5343
+ return regexp.toString()
5344
+ .substring(2, regexp.toString().length - 2)
5345
+ .replace(/\.\*\?$/, '*');
5346
+ }
5347
+
5348
+ /**
5349
+ * Coerce `val`.
5350
+ *
5351
+ * @param {Mixed} val
5352
+ * @return {Mixed}
5353
+ * @api private
5354
+ */
5355
+ function coerce(val) {
5356
+ if (val instanceof Error) {
5357
+ return val.stack || val.message;
5358
+ }
5359
+ return val;
5360
+ }
5361
+
5362
+ /**
5363
+ * XXX DO NOT USE. This is a temporary stub function.
5364
+ * XXX It WILL be removed in the next major release.
5365
+ */
5366
+ function destroy() {
5367
+ console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
5368
+ }
5369
+
5370
+ createDebug.enable(createDebug.load());
5371
+
5372
+ return createDebug;
5373
+ }
5374
+
5375
+ var common = setup;var browser = createCommonjsModule(function (module, exports) {
5376
+ /* eslint-env browser */
5377
+
5378
+ /**
5379
+ * This is the web browser implementation of `debug()`.
5380
+ */
5381
+
5382
+ exports.formatArgs = formatArgs;
5383
+ exports.save = save;
5384
+ exports.load = load;
5385
+ exports.useColors = useColors;
5386
+ exports.storage = localstorage();
5387
+ exports.destroy = (() => {
5388
+ let warned = false;
5389
+
5390
+ return () => {
5391
+ if (!warned) {
5392
+ warned = true;
5393
+ console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
5394
+ }
5395
+ };
5396
+ })();
5397
+
5398
+ /**
5399
+ * Colors.
5400
+ */
5401
+
5402
+ exports.colors = [
5403
+ '#0000CC',
5404
+ '#0000FF',
5405
+ '#0033CC',
5406
+ '#0033FF',
5407
+ '#0066CC',
5408
+ '#0066FF',
5409
+ '#0099CC',
5410
+ '#0099FF',
5411
+ '#00CC00',
5412
+ '#00CC33',
5413
+ '#00CC66',
5414
+ '#00CC99',
5415
+ '#00CCCC',
5416
+ '#00CCFF',
5417
+ '#3300CC',
5418
+ '#3300FF',
5419
+ '#3333CC',
5420
+ '#3333FF',
5421
+ '#3366CC',
5422
+ '#3366FF',
5423
+ '#3399CC',
5424
+ '#3399FF',
5425
+ '#33CC00',
5426
+ '#33CC33',
5427
+ '#33CC66',
5428
+ '#33CC99',
5429
+ '#33CCCC',
5430
+ '#33CCFF',
5431
+ '#6600CC',
5432
+ '#6600FF',
5433
+ '#6633CC',
5434
+ '#6633FF',
5435
+ '#66CC00',
5436
+ '#66CC33',
5437
+ '#9900CC',
5438
+ '#9900FF',
5439
+ '#9933CC',
5440
+ '#9933FF',
5441
+ '#99CC00',
5442
+ '#99CC33',
5443
+ '#CC0000',
5444
+ '#CC0033',
5445
+ '#CC0066',
5446
+ '#CC0099',
5447
+ '#CC00CC',
5448
+ '#CC00FF',
5449
+ '#CC3300',
5450
+ '#CC3333',
5451
+ '#CC3366',
5452
+ '#CC3399',
5453
+ '#CC33CC',
5454
+ '#CC33FF',
5455
+ '#CC6600',
5456
+ '#CC6633',
5457
+ '#CC9900',
5458
+ '#CC9933',
5459
+ '#CCCC00',
5460
+ '#CCCC33',
5461
+ '#FF0000',
5462
+ '#FF0033',
5463
+ '#FF0066',
5464
+ '#FF0099',
5465
+ '#FF00CC',
5466
+ '#FF00FF',
5467
+ '#FF3300',
5468
+ '#FF3333',
5469
+ '#FF3366',
5470
+ '#FF3399',
5471
+ '#FF33CC',
5472
+ '#FF33FF',
5473
+ '#FF6600',
5474
+ '#FF6633',
5475
+ '#FF9900',
5476
+ '#FF9933',
5477
+ '#FFCC00',
5478
+ '#FFCC33'
5479
+ ];
5480
+
5481
+ /**
5482
+ * Currently only WebKit-based Web Inspectors, Firefox >= v31,
5483
+ * and the Firebug extension (any Firefox version) are known
5484
+ * to support "%c" CSS customizations.
5485
+ *
5486
+ * TODO: add a `localStorage` variable to explicitly enable/disable colors
5487
+ */
5488
+
5489
+ // eslint-disable-next-line complexity
5490
+ function useColors() {
5491
+ // NB: In an Electron preload script, document will be defined but not fully
5492
+ // initialized. Since we know we're in Chrome, we'll just detect this case
5493
+ // explicitly
5494
+ if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {
5495
+ return true;
5496
+ }
5497
+
5498
+ // Internet Explorer and Edge do not support colors.
5499
+ if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
5500
+ return false;
5501
+ }
5502
+
5503
+ // Is webkit? http://stackoverflow.com/a/16459606/376773
5504
+ // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
5505
+ return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||
5506
+ // Is firebug? http://stackoverflow.com/a/398120/376773
5507
+ (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||
5508
+ // Is firefox >= v31?
5509
+ // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
5510
+ (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||
5511
+ // Double check webkit in userAgent just in case we are in a worker
5512
+ (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
5513
+ }
5514
+
5515
+ /**
5516
+ * Colorize log arguments if enabled.
5517
+ *
5518
+ * @api public
5519
+ */
5520
+
5521
+ function formatArgs(args) {
5522
+ args[0] = (this.useColors ? '%c' : '') +
5523
+ this.namespace +
5524
+ (this.useColors ? ' %c' : ' ') +
5525
+ args[0] +
5526
+ (this.useColors ? '%c ' : ' ') +
5527
+ '+' + module.exports.humanize(this.diff);
5528
+
5529
+ if (!this.useColors) {
5530
+ return;
5531
+ }
5532
+
5533
+ const c = 'color: ' + this.color;
5534
+ args.splice(1, 0, c, 'color: inherit');
5535
+
5536
+ // The final "%c" is somewhat tricky, because there could be other
5537
+ // arguments passed either before or after the %c, so we need to
5538
+ // figure out the correct index to insert the CSS into
5539
+ let index = 0;
5540
+ let lastC = 0;
5541
+ args[0].replace(/%[a-zA-Z%]/g, match => {
5542
+ if (match === '%%') {
5543
+ return;
5544
+ }
5545
+ index++;
5546
+ if (match === '%c') {
5547
+ // We only are interested in the *last* %c
5548
+ // (the user may have provided their own)
5549
+ lastC = index;
5550
+ }
5551
+ });
5552
+
5553
+ args.splice(lastC, 0, c);
5554
+ }
5555
+
5556
+ /**
5557
+ * Invokes `console.debug()` when available.
5558
+ * No-op when `console.debug` is not a "function".
5559
+ * If `console.debug` is not available, falls back
5560
+ * to `console.log`.
5561
+ *
5562
+ * @api public
5563
+ */
5564
+ exports.log = console.debug || console.log || (() => {});
5565
+
5566
+ /**
5567
+ * Save `namespaces`.
5568
+ *
5569
+ * @param {String} namespaces
5570
+ * @api private
5571
+ */
5572
+ function save(namespaces) {
5573
+ try {
5574
+ if (namespaces) {
5575
+ exports.storage.setItem('debug', namespaces);
5576
+ } else {
5577
+ exports.storage.removeItem('debug');
5578
+ }
5579
+ } catch (error) {
5580
+ // Swallow
5581
+ // XXX (@Qix-) should we be logging these?
5582
+ }
5583
+ }
5584
+
5585
+ /**
5586
+ * Load `namespaces`.
5587
+ *
5588
+ * @return {String} returns the previously persisted debug modes
5589
+ * @api private
5590
+ */
5591
+ function load() {
5592
+ let r;
5593
+ try {
5594
+ r = exports.storage.getItem('debug');
5595
+ } catch (error) {
5596
+ // Swallow
5597
+ // XXX (@Qix-) should we be logging these?
5598
+ }
5599
+
5600
+ // If debug isn't set in LS, and we're in Electron, try to load $DEBUG
5601
+ if (!r && typeof process !== 'undefined' && 'env' in process) {
5602
+ r = process.env.DEBUG;
5603
+ }
5604
+
5605
+ return r;
5606
+ }
5607
+
5608
+ /**
5609
+ * Localstorage attempts to return the localstorage.
5610
+ *
5611
+ * This is necessary because safari throws
5612
+ * when a user disables cookies/localstorage
5613
+ * and you attempt to access it.
5614
+ *
5615
+ * @return {LocalStorage}
5616
+ * @api private
5617
+ */
5618
+
5619
+ function localstorage() {
5620
+ try {
5621
+ // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context
5622
+ // The Browser also has localStorage in the global context.
5623
+ return localStorage;
5624
+ } catch (error) {
5625
+ // Swallow
5626
+ // XXX (@Qix-) should we be logging these?
5627
+ }
5628
+ }
5629
+
5630
+ module.exports = common(exports);
5631
+
5632
+ const {formatters} = module.exports;
5633
+
5634
+ /**
5635
+ * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
5636
+ */
5637
+
5638
+ formatters.j = function (v) {
5639
+ try {
5640
+ return JSON.stringify(v);
5641
+ } catch (error) {
5642
+ return '[UnexpectedJSONParseError]: ' + error.message;
5643
+ }
5644
+ };
5645
+ });var hasFlag = (flag, argv) => {
5646
+ argv = argv || process.argv;
5647
+ const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--');
5648
+ const pos = argv.indexOf(prefix + flag);
5649
+ const terminatorPos = argv.indexOf('--');
5650
+ return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos);
5651
+ };const env = process.env;
5652
+
5653
+ let forceColor;
5654
+ if (hasFlag('no-color') ||
5655
+ hasFlag('no-colors') ||
5656
+ hasFlag('color=false')) {
5657
+ forceColor = false;
5658
+ } else if (hasFlag('color') ||
5659
+ hasFlag('colors') ||
5660
+ hasFlag('color=true') ||
5661
+ hasFlag('color=always')) {
5662
+ forceColor = true;
5663
+ }
5664
+ if ('FORCE_COLOR' in env) {
5665
+ forceColor = env.FORCE_COLOR.length === 0 || parseInt(env.FORCE_COLOR, 10) !== 0;
5666
+ }
5667
+
5668
+ function translateLevel(level) {
5669
+ if (level === 0) {
5670
+ return false;
5671
+ }
5672
+
5673
+ return {
5674
+ level,
5675
+ hasBasic: true,
5676
+ has256: level >= 2,
5677
+ has16m: level >= 3
5678
+ };
5679
+ }
5680
+
5681
+ function supportsColor(stream) {
5682
+ if (forceColor === false) {
5683
+ return 0;
5684
+ }
5685
+
5686
+ if (hasFlag('color=16m') ||
5687
+ hasFlag('color=full') ||
5688
+ hasFlag('color=truecolor')) {
5689
+ return 3;
5690
+ }
5691
+
5692
+ if (hasFlag('color=256')) {
5693
+ return 2;
5694
+ }
5695
+
5696
+ if (stream && !stream.isTTY && forceColor !== true) {
5697
+ return 0;
5698
+ }
5699
+
5700
+ const min = forceColor ? 1 : 0;
5701
+
5702
+ if (process.platform === 'win32') {
5703
+ // Node.js 7.5.0 is the first version of Node.js to include a patch to
5704
+ // libuv that enables 256 color output on Windows. Anything earlier and it
5705
+ // won't work. However, here we target Node.js 8 at minimum as it is an LTS
5706
+ // release, and Node.js 7 is not. Windows 10 build 10586 is the first Windows
5707
+ // release that supports 256 colors. Windows 10 build 14931 is the first release
5708
+ // that supports 16m/TrueColor.
5709
+ const osRelease = os__default["default"].release().split('.');
5710
+ if (
5711
+ Number(process.versions.node.split('.')[0]) >= 8 &&
5712
+ Number(osRelease[0]) >= 10 &&
5713
+ Number(osRelease[2]) >= 10586
5714
+ ) {
5715
+ return Number(osRelease[2]) >= 14931 ? 3 : 2;
5716
+ }
5717
+
5718
+ return 1;
5719
+ }
5720
+
5721
+ if ('CI' in env) {
5722
+ if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI'].some(sign => sign in env) || env.CI_NAME === 'codeship') {
5723
+ return 1;
5724
+ }
5725
+
5726
+ return min;
5727
+ }
5728
+
5729
+ if ('TEAMCITY_VERSION' in env) {
5730
+ return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
5731
+ }
5732
+
5733
+ if (env.COLORTERM === 'truecolor') {
5734
+ return 3;
5735
+ }
5736
+
5737
+ if ('TERM_PROGRAM' in env) {
5738
+ const version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);
5739
+
5740
+ switch (env.TERM_PROGRAM) {
5741
+ case 'iTerm.app':
5742
+ return version >= 3 ? 3 : 2;
5743
+ case 'Apple_Terminal':
5744
+ return 2;
5745
+ // No default
5746
+ }
5747
+ }
5748
+
5749
+ if (/-256(color)?$/i.test(env.TERM)) {
5750
+ return 2;
5751
+ }
5752
+
5753
+ if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
5754
+ return 1;
5755
+ }
5756
+
5757
+ if ('COLORTERM' in env) {
5758
+ return 1;
5759
+ }
5760
+
5761
+ if (env.TERM === 'dumb') {
5762
+ return min;
5763
+ }
5764
+
5765
+ return min;
5766
+ }
5767
+
5768
+ function getSupportLevel(stream) {
5769
+ const level = supportsColor(stream);
5770
+ return translateLevel(level);
5771
+ }
5772
+
5773
+ var supportsColor_1 = {
5774
+ supportsColor: getSupportLevel,
5775
+ stdout: getSupportLevel(process.stdout),
5776
+ stderr: getSupportLevel(process.stderr)
5777
+ };var node = createCommonjsModule(function (module, exports) {
5778
+ /**
5779
+ * Module dependencies.
5780
+ */
5781
+
5782
+
5783
+
5784
+
5785
+ /**
5786
+ * This is the Node.js implementation of `debug()`.
5787
+ */
5788
+
5789
+ exports.init = init;
5790
+ exports.log = log;
5791
+ exports.formatArgs = formatArgs;
5792
+ exports.save = save;
5793
+ exports.load = load;
5794
+ exports.useColors = useColors;
5795
+ exports.destroy = util__default["default"].deprecate(
5796
+ () => {},
5797
+ 'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'
5798
+ );
5799
+
5800
+ /**
5801
+ * Colors.
5802
+ */
5803
+
5804
+ exports.colors = [6, 2, 3, 4, 5, 1];
5805
+
5806
+ try {
5807
+ // Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json)
5808
+ // eslint-disable-next-line import/no-extraneous-dependencies
5809
+ const supportsColor = supportsColor_1;
5810
+
5811
+ if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
5812
+ exports.colors = [
5813
+ 20,
5814
+ 21,
5815
+ 26,
5816
+ 27,
5817
+ 32,
5818
+ 33,
5819
+ 38,
5820
+ 39,
5821
+ 40,
5822
+ 41,
5823
+ 42,
5824
+ 43,
5825
+ 44,
5826
+ 45,
5827
+ 56,
5828
+ 57,
5829
+ 62,
5830
+ 63,
5831
+ 68,
5832
+ 69,
5833
+ 74,
5834
+ 75,
5835
+ 76,
5836
+ 77,
5837
+ 78,
5838
+ 79,
5839
+ 80,
5840
+ 81,
5841
+ 92,
5842
+ 93,
5843
+ 98,
5844
+ 99,
5845
+ 112,
5846
+ 113,
5847
+ 128,
5848
+ 129,
5849
+ 134,
5850
+ 135,
5851
+ 148,
5852
+ 149,
5853
+ 160,
5854
+ 161,
5855
+ 162,
5856
+ 163,
5857
+ 164,
5858
+ 165,
5859
+ 166,
5860
+ 167,
5861
+ 168,
5862
+ 169,
5863
+ 170,
5864
+ 171,
5865
+ 172,
5866
+ 173,
5867
+ 178,
5868
+ 179,
5869
+ 184,
5870
+ 185,
5871
+ 196,
5872
+ 197,
5873
+ 198,
5874
+ 199,
5875
+ 200,
5876
+ 201,
5877
+ 202,
5878
+ 203,
5879
+ 204,
5880
+ 205,
5881
+ 206,
5882
+ 207,
5883
+ 208,
5884
+ 209,
5885
+ 214,
5886
+ 215,
5887
+ 220,
5888
+ 221
5889
+ ];
5890
+ }
5891
+ } catch (error) {
5892
+ // Swallow - we only care if `supports-color` is available; it doesn't have to be.
5893
+ }
5894
+
5895
+ /**
5896
+ * Build up the default `inspectOpts` object from the environment variables.
5897
+ *
5898
+ * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js
5899
+ */
5900
+
5901
+ exports.inspectOpts = Object.keys(process.env).filter(key => {
5902
+ return /^debug_/i.test(key);
5903
+ }).reduce((obj, key) => {
5904
+ // Camel-case
5905
+ const prop = key
5906
+ .substring(6)
5907
+ .toLowerCase()
5908
+ .replace(/_([a-z])/g, (_, k) => {
5909
+ return k.toUpperCase();
5910
+ });
5911
+
5912
+ // Coerce string value into JS value
5913
+ let val = process.env[key];
5914
+ if (/^(yes|on|true|enabled)$/i.test(val)) {
5915
+ val = true;
5916
+ } else if (/^(no|off|false|disabled)$/i.test(val)) {
5917
+ val = false;
5918
+ } else if (val === 'null') {
5919
+ val = null;
5920
+ } else {
5921
+ val = Number(val);
5922
+ }
5923
+
5924
+ obj[prop] = val;
5925
+ return obj;
5926
+ }, {});
5927
+
5928
+ /**
5929
+ * Is stdout a TTY? Colored output is enabled when `true`.
5930
+ */
5931
+
5932
+ function useColors() {
5933
+ return 'colors' in exports.inspectOpts ?
5934
+ Boolean(exports.inspectOpts.colors) :
5935
+ tty__default["default"].isatty(process.stderr.fd);
5936
+ }
5937
+
5938
+ /**
5939
+ * Adds ANSI color escape codes if enabled.
5940
+ *
5941
+ * @api public
5942
+ */
5943
+
5944
+ function formatArgs(args) {
5945
+ const {namespace: name, useColors} = this;
5946
+
5947
+ if (useColors) {
5948
+ const c = this.color;
5949
+ const colorCode = '\u001B[3' + (c < 8 ? c : '8;5;' + c);
5950
+ const prefix = ` ${colorCode};1m${name} \u001B[0m`;
5951
+
5952
+ args[0] = prefix + args[0].split('\n').join('\n' + prefix);
5953
+ args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\u001B[0m');
5954
+ } else {
5955
+ args[0] = getDate() + name + ' ' + args[0];
5956
+ }
5957
+ }
5958
+
5959
+ function getDate() {
5960
+ if (exports.inspectOpts.hideDate) {
5961
+ return '';
5962
+ }
5963
+ return new Date().toISOString() + ' ';
5964
+ }
5965
+
5966
+ /**
5967
+ * Invokes `util.format()` with the specified arguments and writes to stderr.
5968
+ */
5969
+
5970
+ function log(...args) {
5971
+ return process.stderr.write(util__default["default"].format(...args) + '\n');
5972
+ }
5973
+
5974
+ /**
5975
+ * Save `namespaces`.
5976
+ *
5977
+ * @param {String} namespaces
5978
+ * @api private
5979
+ */
5980
+ function save(namespaces) {
5981
+ if (namespaces) {
5982
+ process.env.DEBUG = namespaces;
5983
+ } else {
5984
+ // If you set a process.env field to null or undefined, it gets cast to the
5985
+ // string 'null' or 'undefined'. Just delete instead.
5986
+ delete process.env.DEBUG;
5987
+ }
5988
+ }
5989
+
5990
+ /**
5991
+ * Load `namespaces`.
5992
+ *
5993
+ * @return {String} returns the previously persisted debug modes
5994
+ * @api private
5995
+ */
5996
+
5997
+ function load() {
5998
+ return process.env.DEBUG;
5999
+ }
6000
+
6001
+ /**
6002
+ * Init logic for `debug` instances.
6003
+ *
6004
+ * Create a new `inspectOpts` object in case `useColors` is set
6005
+ * differently for a particular `debug` instance.
6006
+ */
6007
+
6008
+ function init(debug) {
6009
+ debug.inspectOpts = {};
6010
+
6011
+ const keys = Object.keys(exports.inspectOpts);
6012
+ for (let i = 0; i < keys.length; i++) {
6013
+ debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
6014
+ }
6015
+ }
6016
+
6017
+ module.exports = common(exports);
6018
+
6019
+ const {formatters} = module.exports;
6020
+
6021
+ /**
6022
+ * Map %o to `util.inspect()`, all on a single line.
6023
+ */
6024
+
6025
+ formatters.o = function (v) {
6026
+ this.inspectOpts.colors = this.useColors;
6027
+ return util__default["default"].inspect(v, this.inspectOpts)
6028
+ .split('\n')
6029
+ .map(str => str.trim())
6030
+ .join(' ');
6031
+ };
6032
+
6033
+ /**
6034
+ * Map %O to `util.inspect()`, allowing multiple lines if needed.
6035
+ */
6036
+
6037
+ formatters.O = function (v) {
6038
+ this.inspectOpts.colors = this.useColors;
6039
+ return util__default["default"].inspect(v, this.inspectOpts);
6040
+ };
6041
+ });var src = createCommonjsModule(function (module) {
6042
+ /**
6043
+ * Detect Electron renderer / nwjs process, which is node, but we should
6044
+ * treat as a browser.
6045
+ */
6046
+
6047
+ if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) {
6048
+ module.exports = browser;
6049
+ } else {
6050
+ module.exports = node;
6051
+ }
6052
+ });var debug;
6053
+
6054
+ var debug_1 = function () {
6055
+ if (!debug) {
6056
+ try {
6057
+ /* eslint global-require: off */
6058
+ debug = src("follow-redirects");
6059
+ }
6060
+ catch (error) { /* */ }
6061
+ if (typeof debug !== "function") {
6062
+ debug = function () { /* */ };
6063
+ }
6064
+ }
6065
+ debug.apply(null, arguments);
6066
+ };var URL = url__default["default"].URL;
6067
+
6068
+
6069
+ var Writable = stream__default["default"].Writable;
6070
+
6071
+
6072
+
6073
+ // Create handlers that pass events from native requests
6074
+ var events = ["abort", "aborted", "connect", "error", "socket", "timeout"];
6075
+ var eventHandlers = Object.create(null);
6076
+ events.forEach(function (event) {
6077
+ eventHandlers[event] = function (arg1, arg2, arg3) {
6078
+ this._redirectable.emit(event, arg1, arg2, arg3);
6079
+ };
6080
+ });
6081
+
6082
+ // Error types with codes
6083
+ var RedirectionError = createErrorType(
6084
+ "ERR_FR_REDIRECTION_FAILURE",
6085
+ "Redirected request failed"
6086
+ );
6087
+ var TooManyRedirectsError = createErrorType(
6088
+ "ERR_FR_TOO_MANY_REDIRECTS",
6089
+ "Maximum number of redirects exceeded"
6090
+ );
6091
+ var MaxBodyLengthExceededError = createErrorType(
6092
+ "ERR_FR_MAX_BODY_LENGTH_EXCEEDED",
6093
+ "Request body larger than maxBodyLength limit"
6094
+ );
6095
+ var WriteAfterEndError = createErrorType(
6096
+ "ERR_STREAM_WRITE_AFTER_END",
6097
+ "write after end"
6098
+ );
6099
+
6100
+ // An HTTP(S) request that can be redirected
6101
+ function RedirectableRequest(options, responseCallback) {
6102
+ // Initialize the request
6103
+ Writable.call(this);
6104
+ this._sanitizeOptions(options);
6105
+ this._options = options;
6106
+ this._ended = false;
6107
+ this._ending = false;
6108
+ this._redirectCount = 0;
6109
+ this._redirects = [];
6110
+ this._requestBodyLength = 0;
6111
+ this._requestBodyBuffers = [];
6112
+
6113
+ // Attach a callback if passed
6114
+ if (responseCallback) {
6115
+ this.on("response", responseCallback);
6116
+ }
6117
+
6118
+ // React to responses of native requests
6119
+ var self = this;
6120
+ this._onNativeResponse = function (response) {
6121
+ self._processResponse(response);
6122
+ };
6123
+
6124
+ // Perform the first request
6125
+ this._performRequest();
6126
+ }
6127
+ RedirectableRequest.prototype = Object.create(Writable.prototype);
6128
+
6129
+ RedirectableRequest.prototype.abort = function () {
6130
+ abortRequest(this._currentRequest);
6131
+ this.emit("abort");
6132
+ };
6133
+
6134
+ // Writes buffered data to the current native request
6135
+ RedirectableRequest.prototype.write = function (data, encoding, callback) {
6136
+ // Writing is not allowed if end has been called
6137
+ if (this._ending) {
6138
+ throw new WriteAfterEndError();
6139
+ }
6140
+
6141
+ // Validate input and shift parameters if necessary
6142
+ if (!(typeof data === "string" || typeof data === "object" && ("length" in data))) {
6143
+ throw new TypeError("data should be a string, Buffer or Uint8Array");
6144
+ }
6145
+ if (typeof encoding === "function") {
6146
+ callback = encoding;
6147
+ encoding = null;
6148
+ }
6149
+
6150
+ // Ignore empty buffers, since writing them doesn't invoke the callback
6151
+ // https://github.com/nodejs/node/issues/22066
6152
+ if (data.length === 0) {
6153
+ if (callback) {
6154
+ callback();
6155
+ }
6156
+ return;
6157
+ }
6158
+ // Only write when we don't exceed the maximum body length
6159
+ if (this._requestBodyLength + data.length <= this._options.maxBodyLength) {
6160
+ this._requestBodyLength += data.length;
6161
+ this._requestBodyBuffers.push({ data: data, encoding: encoding });
6162
+ this._currentRequest.write(data, encoding, callback);
6163
+ }
6164
+ // Error when we exceed the maximum body length
6165
+ else {
6166
+ this.emit("error", new MaxBodyLengthExceededError());
6167
+ this.abort();
6168
+ }
6169
+ };
6170
+
6171
+ // Ends the current native request
6172
+ RedirectableRequest.prototype.end = function (data, encoding, callback) {
6173
+ // Shift parameters if necessary
6174
+ if (typeof data === "function") {
6175
+ callback = data;
6176
+ data = encoding = null;
6177
+ }
6178
+ else if (typeof encoding === "function") {
6179
+ callback = encoding;
6180
+ encoding = null;
6181
+ }
6182
+
6183
+ // Write data if needed and end
6184
+ if (!data) {
6185
+ this._ended = this._ending = true;
6186
+ this._currentRequest.end(null, null, callback);
6187
+ }
6188
+ else {
6189
+ var self = this;
6190
+ var currentRequest = this._currentRequest;
6191
+ this.write(data, encoding, function () {
6192
+ self._ended = true;
6193
+ currentRequest.end(null, null, callback);
6194
+ });
6195
+ this._ending = true;
6196
+ }
6197
+ };
6198
+
6199
+ // Sets a header value on the current native request
6200
+ RedirectableRequest.prototype.setHeader = function (name, value) {
6201
+ this._options.headers[name] = value;
6202
+ this._currentRequest.setHeader(name, value);
6203
+ };
6204
+
6205
+ // Clears a header value on the current native request
6206
+ RedirectableRequest.prototype.removeHeader = function (name) {
6207
+ delete this._options.headers[name];
6208
+ this._currentRequest.removeHeader(name);
6209
+ };
6210
+
6211
+ // Global timeout for all underlying requests
6212
+ RedirectableRequest.prototype.setTimeout = function (msecs, callback) {
6213
+ var self = this;
6214
+
6215
+ // Destroys the socket on timeout
6216
+ function destroyOnTimeout(socket) {
6217
+ socket.setTimeout(msecs);
6218
+ socket.removeListener("timeout", socket.destroy);
6219
+ socket.addListener("timeout", socket.destroy);
6220
+ }
6221
+
6222
+ // Sets up a timer to trigger a timeout event
6223
+ function startTimer(socket) {
6224
+ if (self._timeout) {
6225
+ clearTimeout(self._timeout);
6226
+ }
6227
+ self._timeout = setTimeout(function () {
6228
+ self.emit("timeout");
6229
+ clearTimer();
6230
+ }, msecs);
6231
+ destroyOnTimeout(socket);
6232
+ }
6233
+
6234
+ // Stops a timeout from triggering
6235
+ function clearTimer() {
6236
+ // Clear the timeout
6237
+ if (self._timeout) {
6238
+ clearTimeout(self._timeout);
6239
+ self._timeout = null;
6240
+ }
6241
+
6242
+ // Clean up all attached listeners
6243
+ self.removeListener("abort", clearTimer);
6244
+ self.removeListener("error", clearTimer);
6245
+ self.removeListener("response", clearTimer);
6246
+ if (callback) {
6247
+ self.removeListener("timeout", callback);
6248
+ }
6249
+ if (!self.socket) {
6250
+ self._currentRequest.removeListener("socket", startTimer);
6251
+ }
6252
+ }
6253
+
6254
+ // Attach callback if passed
6255
+ if (callback) {
6256
+ this.on("timeout", callback);
6257
+ }
6258
+
6259
+ // Start the timer if or when the socket is opened
6260
+ if (this.socket) {
6261
+ startTimer(this.socket);
6262
+ }
6263
+ else {
6264
+ this._currentRequest.once("socket", startTimer);
6265
+ }
6266
+
6267
+ // Clean up on events
6268
+ this.on("socket", destroyOnTimeout);
6269
+ this.on("abort", clearTimer);
6270
+ this.on("error", clearTimer);
6271
+ this.on("response", clearTimer);
6272
+
6273
+ return this;
6274
+ };
6275
+
6276
+ // Proxy all other public ClientRequest methods
6277
+ [
6278
+ "flushHeaders", "getHeader",
6279
+ "setNoDelay", "setSocketKeepAlive",
6280
+ ].forEach(function (method) {
6281
+ RedirectableRequest.prototype[method] = function (a, b) {
6282
+ return this._currentRequest[method](a, b);
6283
+ };
6284
+ });
6285
+
6286
+ // Proxy all public ClientRequest properties
6287
+ ["aborted", "connection", "socket"].forEach(function (property) {
6288
+ Object.defineProperty(RedirectableRequest.prototype, property, {
6289
+ get: function () { return this._currentRequest[property]; },
6290
+ });
6291
+ });
6292
+
6293
+ RedirectableRequest.prototype._sanitizeOptions = function (options) {
6294
+ // Ensure headers are always present
6295
+ if (!options.headers) {
6296
+ options.headers = {};
6297
+ }
6298
+
6299
+ // Since http.request treats host as an alias of hostname,
6300
+ // but the url module interprets host as hostname plus port,
6301
+ // eliminate the host property to avoid confusion.
6302
+ if (options.host) {
6303
+ // Use hostname if set, because it has precedence
6304
+ if (!options.hostname) {
6305
+ options.hostname = options.host;
6306
+ }
6307
+ delete options.host;
6308
+ }
6309
+
6310
+ // Complete the URL object when necessary
6311
+ if (!options.pathname && options.path) {
6312
+ var searchPos = options.path.indexOf("?");
6313
+ if (searchPos < 0) {
6314
+ options.pathname = options.path;
6315
+ }
6316
+ else {
6317
+ options.pathname = options.path.substring(0, searchPos);
6318
+ options.search = options.path.substring(searchPos);
6319
+ }
6320
+ }
6321
+ };
6322
+
6323
+
6324
+ // Executes the next native request (initial or redirect)
6325
+ RedirectableRequest.prototype._performRequest = function () {
6326
+ // Load the native protocol
6327
+ var protocol = this._options.protocol;
6328
+ var nativeProtocol = this._options.nativeProtocols[protocol];
6329
+ if (!nativeProtocol) {
6330
+ this.emit("error", new TypeError("Unsupported protocol " + protocol));
6331
+ return;
6332
+ }
6333
+
6334
+ // If specified, use the agent corresponding to the protocol
6335
+ // (HTTP and HTTPS use different types of agents)
6336
+ if (this._options.agents) {
6337
+ var scheme = protocol.substr(0, protocol.length - 1);
6338
+ this._options.agent = this._options.agents[scheme];
6339
+ }
6340
+
6341
+ // Create the native request
6342
+ var request = this._currentRequest =
6343
+ nativeProtocol.request(this._options, this._onNativeResponse);
6344
+ this._currentUrl = url__default["default"].format(this._options);
6345
+
6346
+ // Set up event handlers
6347
+ request._redirectable = this;
6348
+ for (var e = 0; e < events.length; e++) {
6349
+ request.on(events[e], eventHandlers[events[e]]);
6350
+ }
6351
+
6352
+ // End a redirected request
6353
+ // (The first request must be ended explicitly with RedirectableRequest#end)
6354
+ if (this._isRedirect) {
6355
+ // Write the request entity and end.
6356
+ var i = 0;
6357
+ var self = this;
6358
+ var buffers = this._requestBodyBuffers;
6359
+ (function writeNext(error) {
6360
+ // Only write if this request has not been redirected yet
6361
+ /* istanbul ignore else */
6362
+ if (request === self._currentRequest) {
6363
+ // Report any write errors
6364
+ /* istanbul ignore if */
6365
+ if (error) {
6366
+ self.emit("error", error);
6367
+ }
6368
+ // Write the next buffer if there are still left
6369
+ else if (i < buffers.length) {
6370
+ var buffer = buffers[i++];
6371
+ /* istanbul ignore else */
6372
+ if (!request.finished) {
6373
+ request.write(buffer.data, buffer.encoding, writeNext);
6374
+ }
6375
+ }
6376
+ // End the request if `end` has been called on us
6377
+ else if (self._ended) {
6378
+ request.end();
6379
+ }
6380
+ }
6381
+ }());
6382
+ }
6383
+ };
6384
+
6385
+ // Processes a response from the current native request
6386
+ RedirectableRequest.prototype._processResponse = function (response) {
6387
+ // Store the redirected response
6388
+ var statusCode = response.statusCode;
6389
+ if (this._options.trackRedirects) {
6390
+ this._redirects.push({
6391
+ url: this._currentUrl,
6392
+ headers: response.headers,
6393
+ statusCode: statusCode,
6394
+ });
6395
+ }
6396
+
6397
+ // RFC7231§6.4: The 3xx (Redirection) class of status code indicates
6398
+ // that further action needs to be taken by the user agent in order to
6399
+ // fulfill the request. If a Location header field is provided,
6400
+ // the user agent MAY automatically redirect its request to the URI
6401
+ // referenced by the Location field value,
6402
+ // even if the specific status code is not understood.
6403
+
6404
+ // If the response is not a redirect; return it as-is
6405
+ var location = response.headers.location;
6406
+ if (!location || this._options.followRedirects === false ||
6407
+ statusCode < 300 || statusCode >= 400) {
6408
+ response.responseUrl = this._currentUrl;
6409
+ response.redirects = this._redirects;
6410
+ this.emit("response", response);
6411
+
6412
+ // Clean up
6413
+ this._requestBodyBuffers = [];
6414
+ return;
6415
+ }
6416
+
6417
+ // The response is a redirect, so abort the current request
6418
+ abortRequest(this._currentRequest);
6419
+ // Discard the remainder of the response to avoid waiting for data
6420
+ response.destroy();
6421
+
6422
+ // RFC7231§6.4: A client SHOULD detect and intervene
6423
+ // in cyclical redirections (i.e., "infinite" redirection loops).
6424
+ if (++this._redirectCount > this._options.maxRedirects) {
6425
+ this.emit("error", new TooManyRedirectsError());
6426
+ return;
6427
+ }
6428
+
6429
+ // RFC7231§6.4: Automatic redirection needs to done with
6430
+ // care for methods not known to be safe, […]
6431
+ // RFC7231§6.4.2–3: For historical reasons, a user agent MAY change
6432
+ // the request method from POST to GET for the subsequent request.
6433
+ if ((statusCode === 301 || statusCode === 302) && this._options.method === "POST" ||
6434
+ // RFC7231§6.4.4: The 303 (See Other) status code indicates that
6435
+ // the server is redirecting the user agent to a different resource […]
6436
+ // A user agent can perform a retrieval request targeting that URI
6437
+ // (a GET or HEAD request if using HTTP) […]
6438
+ (statusCode === 303) && !/^(?:GET|HEAD)$/.test(this._options.method)) {
6439
+ this._options.method = "GET";
6440
+ // Drop a possible entity and headers related to it
6441
+ this._requestBodyBuffers = [];
6442
+ removeMatchingHeaders(/^content-/i, this._options.headers);
6443
+ }
6444
+
6445
+ // Drop the Host header, as the redirect might lead to a different host
6446
+ var currentHostHeader = removeMatchingHeaders(/^host$/i, this._options.headers);
6447
+
6448
+ // If the redirect is relative, carry over the host of the last request
6449
+ var currentUrlParts = url__default["default"].parse(this._currentUrl);
6450
+ var currentHost = currentHostHeader || currentUrlParts.host;
6451
+ var currentUrl = /^\w+:/.test(location) ? this._currentUrl :
6452
+ url__default["default"].format(Object.assign(currentUrlParts, { host: currentHost }));
6453
+
6454
+ // Determine the URL of the redirection
6455
+ var redirectUrl;
6456
+ try {
6457
+ redirectUrl = url__default["default"].resolve(currentUrl, location);
6458
+ }
6459
+ catch (cause) {
6460
+ this.emit("error", new RedirectionError(cause));
6461
+ return;
6462
+ }
6463
+
6464
+ // Create the redirected request
6465
+ debug_1("redirecting to", redirectUrl);
6466
+ this._isRedirect = true;
6467
+ var redirectUrlParts = url__default["default"].parse(redirectUrl);
6468
+ Object.assign(this._options, redirectUrlParts);
6469
+
6470
+ // Drop confidential headers when redirecting to a less secure protocol
6471
+ // or to a different domain that is not a superdomain
6472
+ if (redirectUrlParts.protocol !== currentUrlParts.protocol &&
6473
+ redirectUrlParts.protocol !== "https:" ||
6474
+ redirectUrlParts.host !== currentHost &&
6475
+ !isSubdomain(redirectUrlParts.host, currentHost)) {
6476
+ removeMatchingHeaders(/^(?:authorization|cookie)$/i, this._options.headers);
6477
+ }
6478
+
6479
+ // Evaluate the beforeRedirect callback
6480
+ if (typeof this._options.beforeRedirect === "function") {
6481
+ var responseDetails = { headers: response.headers };
6482
+ try {
6483
+ this._options.beforeRedirect.call(null, this._options, responseDetails);
6484
+ }
6485
+ catch (err) {
6486
+ this.emit("error", err);
6487
+ return;
6488
+ }
6489
+ this._sanitizeOptions(this._options);
6490
+ }
6491
+
6492
+ // Perform the redirected request
6493
+ try {
6494
+ this._performRequest();
6495
+ }
6496
+ catch (cause) {
6497
+ this.emit("error", new RedirectionError(cause));
6498
+ }
6499
+ };
6500
+
6501
+ // Wraps the key/value object of protocols with redirect functionality
6502
+ function wrap(protocols) {
6503
+ // Default settings
6504
+ var exports = {
6505
+ maxRedirects: 21,
6506
+ maxBodyLength: 10 * 1024 * 1024,
6507
+ };
6508
+
6509
+ // Wrap each protocol
6510
+ var nativeProtocols = {};
6511
+ Object.keys(protocols).forEach(function (scheme) {
6512
+ var protocol = scheme + ":";
6513
+ var nativeProtocol = nativeProtocols[protocol] = protocols[scheme];
6514
+ var wrappedProtocol = exports[scheme] = Object.create(nativeProtocol);
6515
+
6516
+ // Executes a request, following redirects
6517
+ function request(input, options, callback) {
6518
+ // Parse parameters
6519
+ if (typeof input === "string") {
6520
+ var urlStr = input;
6521
+ try {
6522
+ input = urlToOptions(new URL(urlStr));
6523
+ }
6524
+ catch (err) {
6525
+ /* istanbul ignore next */
6526
+ input = url__default["default"].parse(urlStr);
6527
+ }
6528
+ }
6529
+ else if (URL && (input instanceof URL)) {
6530
+ input = urlToOptions(input);
6531
+ }
6532
+ else {
6533
+ callback = options;
6534
+ options = input;
6535
+ input = { protocol: protocol };
6536
+ }
6537
+ if (typeof options === "function") {
6538
+ callback = options;
6539
+ options = null;
6540
+ }
6541
+
6542
+ // Set defaults
6543
+ options = Object.assign({
6544
+ maxRedirects: exports.maxRedirects,
6545
+ maxBodyLength: exports.maxBodyLength,
6546
+ }, input, options);
6547
+ options.nativeProtocols = nativeProtocols;
6548
+
6549
+ assert__default["default"].equal(options.protocol, protocol, "protocol mismatch");
6550
+ debug_1("options", options);
6551
+ return new RedirectableRequest(options, callback);
6552
+ }
6553
+
6554
+ // Executes a GET request, following redirects
6555
+ function get(input, options, callback) {
6556
+ var wrappedRequest = wrappedProtocol.request(input, options, callback);
6557
+ wrappedRequest.end();
6558
+ return wrappedRequest;
6559
+ }
6560
+
6561
+ // Expose the properties on the wrapped protocol
6562
+ Object.defineProperties(wrappedProtocol, {
6563
+ request: { value: request, configurable: true, enumerable: true, writable: true },
6564
+ get: { value: get, configurable: true, enumerable: true, writable: true },
6565
+ });
6566
+ });
6567
+ return exports;
6568
+ }
6569
+
6570
+ /* istanbul ignore next */
6571
+ function noop() { /* empty */ }
6572
+
6573
+ // from https://github.com/nodejs/node/blob/master/lib/internal/url.js
6574
+ function urlToOptions(urlObject) {
6575
+ var options = {
6576
+ protocol: urlObject.protocol,
6577
+ hostname: urlObject.hostname.startsWith("[") ?
6578
+ /* istanbul ignore next */
6579
+ urlObject.hostname.slice(1, -1) :
6580
+ urlObject.hostname,
6581
+ hash: urlObject.hash,
6582
+ search: urlObject.search,
6583
+ pathname: urlObject.pathname,
6584
+ path: urlObject.pathname + urlObject.search,
6585
+ href: urlObject.href,
6586
+ };
6587
+ if (urlObject.port !== "") {
6588
+ options.port = Number(urlObject.port);
6589
+ }
6590
+ return options;
6591
+ }
6592
+
6593
+ function removeMatchingHeaders(regex, headers) {
6594
+ var lastValue;
6595
+ for (var header in headers) {
6596
+ if (regex.test(header)) {
6597
+ lastValue = headers[header];
6598
+ delete headers[header];
6599
+ }
6600
+ }
6601
+ return (lastValue === null || typeof lastValue === "undefined") ?
6602
+ undefined : String(lastValue).trim();
6603
+ }
6604
+
6605
+ function createErrorType(code, defaultMessage) {
6606
+ function CustomError(cause) {
6607
+ Error.captureStackTrace(this, this.constructor);
6608
+ if (!cause) {
6609
+ this.message = defaultMessage;
6610
+ }
6611
+ else {
6612
+ this.message = defaultMessage + ": " + cause.message;
6613
+ this.cause = cause;
6614
+ }
6615
+ }
6616
+ CustomError.prototype = new Error();
6617
+ CustomError.prototype.constructor = CustomError;
6618
+ CustomError.prototype.name = "Error [" + code + "]";
6619
+ CustomError.prototype.code = code;
6620
+ return CustomError;
6621
+ }
6622
+
6623
+ function abortRequest(request) {
6624
+ for (var e = 0; e < events.length; e++) {
6625
+ request.removeListener(events[e], eventHandlers[events[e]]);
6626
+ }
6627
+ request.on("error", noop);
6628
+ request.abort();
6629
+ }
6630
+
6631
+ function isSubdomain(subdomain, domain) {
6632
+ const dot = subdomain.length - domain.length - 1;
6633
+ return dot > 0 && subdomain[dot] === "." && subdomain.endsWith(domain);
6634
+ }
6635
+
6636
+ // Exports
6637
+ var followRedirects = wrap({ http: http__default["default"], https: https__default["default"] });
6638
+ var wrap_1 = wrap;
6639
+ followRedirects.wrap = wrap_1;var data = {
6640
+ "version": "0.26.0"
6641
+ };var httpFollow = followRedirects.http;
6642
+ var httpsFollow = followRedirects.https;
6643
+
6644
+
6645
+ var VERSION$1 = data.version;
6646
+
6647
+
6648
+
6649
+
6650
+
6651
+ var isHttps = /https:?/;
6652
+
6653
+ /**
6654
+ *
6655
+ * @param {http.ClientRequestArgs} options
6656
+ * @param {AxiosProxyConfig} proxy
6657
+ * @param {string} location
6658
+ */
6659
+ function setProxy(options, proxy, location) {
6660
+ options.hostname = proxy.host;
6661
+ options.host = proxy.host;
6662
+ options.port = proxy.port;
6663
+ options.path = location;
6664
+
6665
+ // Basic proxy authorization
6666
+ if (proxy.auth) {
6667
+ var base64 = Buffer.from(proxy.auth.username + ':' + proxy.auth.password, 'utf8').toString('base64');
6668
+ options.headers['Proxy-Authorization'] = 'Basic ' + base64;
6669
+ }
6670
+
6671
+ // If a proxy is used, any redirects must also pass through the proxy
6672
+ options.beforeRedirect = function beforeRedirect(redirection) {
6673
+ redirection.headers.host = redirection.host;
6674
+ setProxy(redirection, proxy, redirection.href);
6675
+ };
6676
+ }
6677
+
6678
+ /*eslint consistent-return:0*/
6679
+ var http_1 = function httpAdapter(config) {
6680
+ return new Promise(function dispatchHttpRequest(resolvePromise, rejectPromise) {
6681
+ var onCanceled;
6682
+ function done() {
6683
+ if (config.cancelToken) {
6684
+ config.cancelToken.unsubscribe(onCanceled);
6685
+ }
6686
+
6687
+ if (config.signal) {
6688
+ config.signal.removeEventListener('abort', onCanceled);
6689
+ }
6690
+ }
6691
+ var resolve = function resolve(value) {
6692
+ done();
6693
+ resolvePromise(value);
6694
+ };
6695
+ var rejected = false;
6696
+ var reject = function reject(value) {
6697
+ done();
6698
+ rejected = true;
6699
+ rejectPromise(value);
6700
+ };
6701
+ var data = config.data;
6702
+ var headers = config.headers;
6703
+ var headerNames = {};
6704
+
6705
+ Object.keys(headers).forEach(function storeLowerName(name) {
6706
+ headerNames[name.toLowerCase()] = name;
6707
+ });
6708
+
6709
+ // Set User-Agent (required by some servers)
6710
+ // See https://github.com/axios/axios/issues/69
6711
+ if ('user-agent' in headerNames) {
6712
+ // User-Agent is specified; handle case where no UA header is desired
6713
+ if (!headers[headerNames['user-agent']]) {
6714
+ delete headers[headerNames['user-agent']];
6715
+ }
6716
+ // Otherwise, use specified value
6717
+ } else {
6718
+ // Only set header if it hasn't been set in config
6719
+ headers['User-Agent'] = 'axios/' + VERSION$1;
6720
+ }
6721
+
6722
+ if (data && !utils.isStream(data)) {
6723
+ if (Buffer.isBuffer(data)) ; else if (utils.isArrayBuffer(data)) {
6724
+ data = Buffer.from(new Uint8Array(data));
6725
+ } else if (utils.isString(data)) {
6726
+ data = Buffer.from(data, 'utf-8');
6727
+ } else {
6728
+ return reject(createError(
6729
+ 'Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream',
6730
+ config
6731
+ ));
6732
+ }
6733
+
6734
+ if (config.maxBodyLength > -1 && data.length > config.maxBodyLength) {
6735
+ return reject(createError('Request body larger than maxBodyLength limit', config));
6736
+ }
6737
+
6738
+ // Add Content-Length header if data exists
6739
+ if (!headerNames['content-length']) {
6740
+ headers['Content-Length'] = data.length;
6741
+ }
6742
+ }
6743
+
6744
+ // HTTP basic authentication
6745
+ var auth = undefined;
6746
+ if (config.auth) {
6747
+ var username = config.auth.username || '';
6748
+ var password = config.auth.password || '';
6749
+ auth = username + ':' + password;
6750
+ }
6751
+
6752
+ // Parse url
6753
+ var fullPath = buildFullPath(config.baseURL, config.url);
6754
+ var parsed = url__default["default"].parse(fullPath);
6755
+ var protocol = parsed.protocol || 'http:';
6756
+
6757
+ if (!auth && parsed.auth) {
6758
+ var urlAuth = parsed.auth.split(':');
6759
+ var urlUsername = urlAuth[0] || '';
6760
+ var urlPassword = urlAuth[1] || '';
6761
+ auth = urlUsername + ':' + urlPassword;
6762
+ }
6763
+
6764
+ if (auth && headerNames.authorization) {
6765
+ delete headers[headerNames.authorization];
6766
+ }
6767
+
6768
+ var isHttpsRequest = isHttps.test(protocol);
6769
+ var agent = isHttpsRequest ? config.httpsAgent : config.httpAgent;
6770
+
6771
+ try {
6772
+ buildURL(parsed.path, config.params, config.paramsSerializer).replace(/^\?/, '');
6773
+ } catch (err) {
6774
+ var customErr = new Error(err.message);
6775
+ customErr.config = config;
6776
+ customErr.url = config.url;
6777
+ customErr.exists = true;
6778
+ reject(customErr);
6779
+ }
6780
+
6781
+ var options = {
6782
+ path: buildURL(parsed.path, config.params, config.paramsSerializer).replace(/^\?/, ''),
6783
+ method: config.method.toUpperCase(),
6784
+ headers: headers,
6785
+ agent: agent,
6786
+ agents: { http: config.httpAgent, https: config.httpsAgent },
6787
+ auth: auth
6788
+ };
6789
+
6790
+ if (config.socketPath) {
6791
+ options.socketPath = config.socketPath;
6792
+ } else {
6793
+ options.hostname = parsed.hostname;
6794
+ options.port = parsed.port;
6795
+ }
6796
+
6797
+ var proxy = config.proxy;
6798
+ if (!proxy && proxy !== false) {
6799
+ var proxyEnv = protocol.slice(0, -1) + '_proxy';
6800
+ var proxyUrl = process.env[proxyEnv] || process.env[proxyEnv.toUpperCase()];
6801
+ if (proxyUrl) {
6802
+ var parsedProxyUrl = url__default["default"].parse(proxyUrl);
6803
+ var noProxyEnv = process.env.no_proxy || process.env.NO_PROXY;
6804
+ var shouldProxy = true;
6805
+
6806
+ if (noProxyEnv) {
6807
+ var noProxy = noProxyEnv.split(',').map(function trim(s) {
6808
+ return s.trim();
6809
+ });
6810
+
6811
+ shouldProxy = !noProxy.some(function proxyMatch(proxyElement) {
6812
+ if (!proxyElement) {
6813
+ return false;
6814
+ }
6815
+ if (proxyElement === '*') {
6816
+ return true;
6817
+ }
6818
+ if (proxyElement[0] === '.' &&
6819
+ parsed.hostname.substr(parsed.hostname.length - proxyElement.length) === proxyElement) {
6820
+ return true;
6821
+ }
6822
+
6823
+ return parsed.hostname === proxyElement;
6824
+ });
6825
+ }
6826
+
6827
+ if (shouldProxy) {
6828
+ proxy = {
6829
+ host: parsedProxyUrl.hostname,
6830
+ port: parsedProxyUrl.port,
6831
+ protocol: parsedProxyUrl.protocol
6832
+ };
6833
+
6834
+ if (parsedProxyUrl.auth) {
6835
+ var proxyUrlAuth = parsedProxyUrl.auth.split(':');
6836
+ proxy.auth = {
6837
+ username: proxyUrlAuth[0],
6838
+ password: proxyUrlAuth[1]
6839
+ };
6840
+ }
6841
+ }
6842
+ }
6843
+ }
6844
+
6845
+ if (proxy) {
6846
+ options.headers.host = parsed.hostname + (parsed.port ? ':' + parsed.port : '');
6847
+ setProxy(options, proxy, protocol + '//' + parsed.hostname + (parsed.port ? ':' + parsed.port : '') + options.path);
6848
+ }
6849
+
6850
+ var transport;
6851
+ var isHttpsProxy = isHttpsRequest && (proxy ? isHttps.test(proxy.protocol) : true);
6852
+ if (config.transport) {
6853
+ transport = config.transport;
6854
+ } else if (config.maxRedirects === 0) {
6855
+ transport = isHttpsProxy ? https__default["default"] : http__default["default"];
6856
+ } else {
6857
+ if (config.maxRedirects) {
6858
+ options.maxRedirects = config.maxRedirects;
6859
+ }
6860
+ transport = isHttpsProxy ? httpsFollow : httpFollow;
6861
+ }
6862
+
6863
+ if (config.maxBodyLength > -1) {
6864
+ options.maxBodyLength = config.maxBodyLength;
6865
+ }
6866
+
6867
+ if (config.insecureHTTPParser) {
6868
+ options.insecureHTTPParser = config.insecureHTTPParser;
6869
+ }
6870
+
6871
+ // Create the request
6872
+ var req = transport.request(options, function handleResponse(res) {
6873
+ if (req.aborted) return;
6874
+
6875
+ // uncompress the response body transparently if required
6876
+ var stream = res;
6877
+
6878
+ // return the last request in case of redirects
6879
+ var lastRequest = res.req || req;
6880
+
6881
+
6882
+ // if no content, is HEAD request or decompress disabled we should not decompress
6883
+ if (res.statusCode !== 204 && lastRequest.method !== 'HEAD' && config.decompress !== false) {
6884
+ switch (res.headers['content-encoding']) {
6885
+ /*eslint default-case:0*/
6886
+ case 'gzip':
6887
+ case 'compress':
6888
+ case 'deflate':
6889
+ // add the unzipper to the body stream processing pipeline
6890
+ stream = stream.pipe(zlib__default["default"].createUnzip());
6891
+
6892
+ // remove the content-encoding in order to not confuse downstream operations
6893
+ delete res.headers['content-encoding'];
6894
+ break;
6895
+ }
6896
+ }
6897
+
6898
+ var response = {
6899
+ status: res.statusCode,
6900
+ statusText: res.statusMessage,
6901
+ headers: res.headers,
6902
+ config: config,
6903
+ request: lastRequest
6904
+ };
6905
+
6906
+ if (config.responseType === 'stream') {
6907
+ response.data = stream;
6908
+ settle(resolve, reject, response);
6909
+ } else {
6910
+ var responseBuffer = [];
6911
+ var totalResponseBytes = 0;
6912
+ stream.on('data', function handleStreamData(chunk) {
6913
+ responseBuffer.push(chunk);
6914
+ totalResponseBytes += chunk.length;
6915
+
6916
+ // make sure the content length is not over the maxContentLength if specified
6917
+ if (config.maxContentLength > -1 && totalResponseBytes > config.maxContentLength) {
6918
+ // stream.destoy() emit aborted event before calling reject() on Node.js v16
6919
+ rejected = true;
6920
+ stream.destroy();
6921
+ reject(createError('maxContentLength size of ' + config.maxContentLength + ' exceeded',
6922
+ config, null, lastRequest));
6923
+ }
6924
+ });
6925
+
6926
+ stream.on('aborted', function handlerStreamAborted() {
6927
+ if (rejected) {
6928
+ return;
6929
+ }
6930
+ stream.destroy();
6931
+ reject(createError('error request aborted', config, 'ERR_REQUEST_ABORTED', lastRequest));
6932
+ });
6933
+
6934
+ stream.on('error', function handleStreamError(err) {
6935
+ if (req.aborted) return;
6936
+ reject(enhanceError(err, config, null, lastRequest));
6937
+ });
6938
+
6939
+ stream.on('end', function handleStreamEnd() {
6940
+ try {
6941
+ var responseData = responseBuffer.length === 1 ? responseBuffer[0] : Buffer.concat(responseBuffer);
6942
+ if (config.responseType !== 'arraybuffer') {
6943
+ responseData = responseData.toString(config.responseEncoding);
6944
+ if (!config.responseEncoding || config.responseEncoding === 'utf8') {
6945
+ responseData = utils.stripBOM(responseData);
6946
+ }
6947
+ }
6948
+ response.data = responseData;
6949
+ } catch (err) {
6950
+ reject(enhanceError(err, config, err.code, response.request, response));
6951
+ }
6952
+ settle(resolve, reject, response);
6953
+ });
6954
+ }
6955
+ });
6956
+
6957
+ // Handle errors
6958
+ req.on('error', function handleRequestError(err) {
6959
+ if (req.aborted && err.code !== 'ERR_FR_TOO_MANY_REDIRECTS') return;
6960
+ reject(enhanceError(err, config, null, req));
6961
+ });
6962
+
6963
+ // set tcp keep alive to prevent drop connection by peer
6964
+ req.on('socket', function handleRequestSocket(socket) {
6965
+ // default interval of sending ack packet is 1 minute
6966
+ socket.setKeepAlive(true, 1000 * 60);
6967
+ });
6968
+
6969
+ // Handle request timeout
6970
+ if (config.timeout) {
6971
+ // This is forcing a int timeout to avoid problems if the `req` interface doesn't handle other types.
6972
+ var timeout = parseInt(config.timeout, 10);
6973
+
6974
+ if (isNaN(timeout)) {
6975
+ reject(createError(
6976
+ 'error trying to parse `config.timeout` to int',
6977
+ config,
6978
+ 'ERR_PARSE_TIMEOUT',
6979
+ req
6980
+ ));
6981
+
6982
+ return;
6983
+ }
6984
+
6985
+ // Sometime, the response will be very slow, and does not respond, the connect event will be block by event loop system.
6986
+ // And timer callback will be fired, and abort() will be invoked before connection, then get "socket hang up" and code ECONNRESET.
6987
+ // At this time, if we have a large number of request, nodejs will hang up some socket on background. and the number will up and up.
6988
+ // And then these socket which be hang up will devoring CPU little by little.
6989
+ // ClientRequest.setTimeout will be fired on the specify milliseconds, and can make sure that abort() will be fired after connect.
6990
+ req.setTimeout(timeout, function handleRequestTimeout() {
6991
+ req.abort();
6992
+ var timeoutErrorMessage = '';
6993
+ if (config.timeoutErrorMessage) {
6994
+ timeoutErrorMessage = config.timeoutErrorMessage;
6995
+ } else {
6996
+ timeoutErrorMessage = 'timeout of ' + config.timeout + 'ms exceeded';
6997
+ }
6998
+ var transitional = config.transitional || defaults$1.transitional;
6999
+ reject(createError(
7000
+ timeoutErrorMessage,
7001
+ config,
7002
+ transitional.clarifyTimeoutError ? 'ETIMEDOUT' : 'ECONNABORTED',
7003
+ req
7004
+ ));
7005
+ });
7006
+ }
7007
+
7008
+ if (config.cancelToken || config.signal) {
7009
+ // Handle cancellation
7010
+ // eslint-disable-next-line func-names
7011
+ onCanceled = function(cancel) {
7012
+ if (req.aborted) return;
7013
+
7014
+ req.abort();
7015
+ reject(!cancel || (cancel && cancel.type) ? new Cancel_1('canceled') : cancel);
7016
+ };
7017
+
7018
+ config.cancelToken && config.cancelToken.subscribe(onCanceled);
7019
+ if (config.signal) {
7020
+ config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled);
7021
+ }
7022
+ }
7023
+
7024
+
7025
+ // Send the request
7026
+ if (utils.isStream(data)) {
7027
+ data.on('error', function handleStreamError(err) {
7028
+ reject(enhanceError(err, config, null, req));
7029
+ }).pipe(req);
7030
+ } else {
7031
+ req.end(data);
7032
+ }
7033
+ });
7034
+ };var DEFAULT_CONTENT_TYPE = {
7035
+ 'Content-Type': 'application/x-www-form-urlencoded'
7036
+ };
7037
+
7038
+ function setContentTypeIfUnset(headers, value) {
7039
+ if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {
7040
+ headers['Content-Type'] = value;
7041
+ }
7042
+ }
7043
+
7044
+ function getDefaultAdapter() {
7045
+ var adapter;
7046
+ if (typeof XMLHttpRequest !== 'undefined') {
7047
+ // For browsers use XHR adapter
7048
+ adapter = xhr;
7049
+ } else if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') {
7050
+ // For node use HTTP adapter
7051
+ adapter = http_1;
7052
+ }
7053
+ return adapter;
7054
+ }
7055
+
7056
+ function stringifySafely(rawValue, parser, encoder) {
7057
+ if (utils.isString(rawValue)) {
7058
+ try {
7059
+ (parser || JSON.parse)(rawValue);
7060
+ return utils.trim(rawValue);
7061
+ } catch (e) {
7062
+ if (e.name !== 'SyntaxError') {
7063
+ throw e;
7064
+ }
7065
+ }
7066
+ }
7067
+
7068
+ return (encoder || JSON.stringify)(rawValue);
7069
+ }
7070
+
7071
+ var defaults = {
7072
+
7073
+ transitional: {
7074
+ silentJSONParsing: true,
7075
+ forcedJSONParsing: true,
7076
+ clarifyTimeoutError: false
7077
+ },
7078
+
7079
+ adapter: getDefaultAdapter(),
7080
+
7081
+ transformRequest: [function transformRequest(data, headers) {
7082
+ normalizeHeaderName(headers, 'Accept');
7083
+ normalizeHeaderName(headers, 'Content-Type');
7084
+
7085
+ if (utils.isFormData(data) ||
7086
+ utils.isArrayBuffer(data) ||
7087
+ utils.isBuffer(data) ||
7088
+ utils.isStream(data) ||
7089
+ utils.isFile(data) ||
7090
+ utils.isBlob(data)
7091
+ ) {
7092
+ return data;
7093
+ }
7094
+ if (utils.isArrayBufferView(data)) {
7095
+ return data.buffer;
7096
+ }
7097
+ if (utils.isURLSearchParams(data)) {
7098
+ setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');
7099
+ return data.toString();
7100
+ }
7101
+ if (utils.isObject(data) || (headers && headers['Content-Type'] === 'application/json')) {
7102
+ setContentTypeIfUnset(headers, 'application/json');
7103
+ return stringifySafely(data);
7104
+ }
7105
+ return data;
7106
+ }],
7107
+
7108
+ transformResponse: [function transformResponse(data) {
7109
+ var transitional = this.transitional || defaults.transitional;
7110
+ var silentJSONParsing = transitional && transitional.silentJSONParsing;
7111
+ var forcedJSONParsing = transitional && transitional.forcedJSONParsing;
7112
+ var strictJSONParsing = !silentJSONParsing && this.responseType === 'json';
7113
+
7114
+ if (strictJSONParsing || (forcedJSONParsing && utils.isString(data) && data.length)) {
7115
+ try {
7116
+ return JSON.parse(data);
7117
+ } catch (e) {
7118
+ if (strictJSONParsing) {
7119
+ if (e.name === 'SyntaxError') {
7120
+ throw enhanceError(e, this, 'E_JSON_PARSE');
7121
+ }
7122
+ throw e;
7123
+ }
7124
+ }
7125
+ }
7126
+
7127
+ return data;
7128
+ }],
7129
+
7130
+ /**
7131
+ * A timeout in milliseconds to abort a request. If set to 0 (default) a
7132
+ * timeout is not created.
7133
+ */
7134
+ timeout: 0,
7135
+
7136
+ xsrfCookieName: 'XSRF-TOKEN',
7137
+ xsrfHeaderName: 'X-XSRF-TOKEN',
7138
+
7139
+ maxContentLength: -1,
7140
+ maxBodyLength: -1,
7141
+
7142
+ validateStatus: function validateStatus(status) {
7143
+ return status >= 200 && status < 300;
7144
+ },
7145
+
7146
+ headers: {
7147
+ common: {
7148
+ 'Accept': 'application/json, text/plain, */*'
7149
+ }
7150
+ }
7151
+ };
7152
+
7153
+ utils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {
7154
+ defaults.headers[method] = {};
7155
+ });
7156
+
7157
+ utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
7158
+ defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);
7159
+ });
7160
+
7161
+ var defaults_1 = defaults;/**
7162
+ * Transform the data for a request or a response
7163
+ *
7164
+ * @param {Object|String} data The data to be transformed
7165
+ * @param {Array} headers The headers for the request or response
7166
+ * @param {Array|Function} fns A single function or Array of functions
7167
+ * @returns {*} The resulting transformed data
7168
+ */
7169
+ var transformData = function transformData(data, headers, fns) {
7170
+ var context = this || defaults$1;
7171
+ /*eslint no-param-reassign:0*/
7172
+ utils.forEach(fns, function transform(fn) {
7173
+ data = fn.call(context, data, headers);
7174
+ });
7175
+
7176
+ return data;
7177
+ };var isCancel = function isCancel(value) {
7178
+ return !!(value && value.__CANCEL__);
7179
+ };/**
7180
+ * Throws a `Cancel` if cancellation has been requested.
7181
+ */
7182
+ function throwIfCancellationRequested(config) {
7183
+ if (config.cancelToken) {
7184
+ config.cancelToken.throwIfRequested();
7185
+ }
7186
+
7187
+ if (config.signal && config.signal.aborted) {
7188
+ throw new Cancel_1('canceled');
7189
+ }
7190
+ }
7191
+
7192
+ /**
7193
+ * Dispatch a request to the server using the configured adapter.
7194
+ *
7195
+ * @param {object} config The config that is to be used for the request
7196
+ * @returns {Promise} The Promise to be fulfilled
7197
+ */
7198
+ var dispatchRequest = function dispatchRequest(config) {
7199
+ throwIfCancellationRequested(config);
7200
+
7201
+ // Ensure headers exist
7202
+ config.headers = config.headers || {};
7203
+
7204
+ // Transform request data
7205
+ config.data = transformData.call(
7206
+ config,
7207
+ config.data,
7208
+ config.headers,
7209
+ config.transformRequest
7210
+ );
7211
+
7212
+ // Flatten headers
7213
+ config.headers = utils.merge(
7214
+ config.headers.common || {},
7215
+ config.headers[config.method] || {},
7216
+ config.headers
7217
+ );
7218
+
7219
+ utils.forEach(
7220
+ ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],
7221
+ function cleanHeaderConfig(method) {
7222
+ delete config.headers[method];
7223
+ }
7224
+ );
7225
+
7226
+ var adapter = config.adapter || defaults$1.adapter;
7227
+
7228
+ return adapter(config).then(function onAdapterResolution(response) {
7229
+ throwIfCancellationRequested(config);
7230
+
7231
+ // Transform response data
7232
+ response.data = transformData.call(
7233
+ config,
7234
+ response.data,
7235
+ response.headers,
7236
+ config.transformResponse
7237
+ );
7238
+
7239
+ return response;
7240
+ }, function onAdapterRejection(reason) {
7241
+ if (!isCancel(reason)) {
7242
+ throwIfCancellationRequested(config);
7243
+
7244
+ // Transform response data
7245
+ if (reason && reason.response) {
7246
+ reason.response.data = transformData.call(
7247
+ config,
7248
+ reason.response.data,
7249
+ reason.response.headers,
7250
+ config.transformResponse
7251
+ );
7252
+ }
7253
+ }
7254
+
7255
+ return Promise.reject(reason);
7256
+ });
7257
+ };/**
7258
+ * Config-specific merge-function which creates a new config-object
7259
+ * by merging two configuration objects together.
7260
+ *
7261
+ * @param {Object} config1
7262
+ * @param {Object} config2
7263
+ * @returns {Object} New object resulting from merging config2 to config1
7264
+ */
7265
+ var mergeConfig = function mergeConfig(config1, config2) {
7266
+ // eslint-disable-next-line no-param-reassign
7267
+ config2 = config2 || {};
7268
+ var config = {};
7269
+
7270
+ function getMergedValue(target, source) {
7271
+ if (utils.isPlainObject(target) && utils.isPlainObject(source)) {
7272
+ return utils.merge(target, source);
7273
+ } else if (utils.isPlainObject(source)) {
7274
+ return utils.merge({}, source);
7275
+ } else if (utils.isArray(source)) {
7276
+ return source.slice();
7277
+ }
7278
+ return source;
7279
+ }
7280
+
7281
+ // eslint-disable-next-line consistent-return
7282
+ function mergeDeepProperties(prop) {
7283
+ if (!utils.isUndefined(config2[prop])) {
7284
+ return getMergedValue(config1[prop], config2[prop]);
7285
+ } else if (!utils.isUndefined(config1[prop])) {
7286
+ return getMergedValue(undefined, config1[prop]);
7287
+ }
7288
+ }
7289
+
7290
+ // eslint-disable-next-line consistent-return
7291
+ function valueFromConfig2(prop) {
7292
+ if (!utils.isUndefined(config2[prop])) {
7293
+ return getMergedValue(undefined, config2[prop]);
7294
+ }
7295
+ }
7296
+
7297
+ // eslint-disable-next-line consistent-return
7298
+ function defaultToConfig2(prop) {
7299
+ if (!utils.isUndefined(config2[prop])) {
7300
+ return getMergedValue(undefined, config2[prop]);
7301
+ } else if (!utils.isUndefined(config1[prop])) {
7302
+ return getMergedValue(undefined, config1[prop]);
7303
+ }
7304
+ }
7305
+
7306
+ // eslint-disable-next-line consistent-return
7307
+ function mergeDirectKeys(prop) {
7308
+ if (prop in config2) {
7309
+ return getMergedValue(config1[prop], config2[prop]);
7310
+ } else if (prop in config1) {
7311
+ return getMergedValue(undefined, config1[prop]);
7312
+ }
7313
+ }
7314
+
7315
+ var mergeMap = {
7316
+ 'url': valueFromConfig2,
7317
+ 'method': valueFromConfig2,
7318
+ 'data': valueFromConfig2,
7319
+ 'baseURL': defaultToConfig2,
7320
+ 'transformRequest': defaultToConfig2,
7321
+ 'transformResponse': defaultToConfig2,
7322
+ 'paramsSerializer': defaultToConfig2,
7323
+ 'timeout': defaultToConfig2,
7324
+ 'timeoutMessage': defaultToConfig2,
7325
+ 'withCredentials': defaultToConfig2,
7326
+ 'adapter': defaultToConfig2,
7327
+ 'responseType': defaultToConfig2,
7328
+ 'xsrfCookieName': defaultToConfig2,
7329
+ 'xsrfHeaderName': defaultToConfig2,
7330
+ 'onUploadProgress': defaultToConfig2,
7331
+ 'onDownloadProgress': defaultToConfig2,
7332
+ 'decompress': defaultToConfig2,
7333
+ 'maxContentLength': defaultToConfig2,
7334
+ 'maxBodyLength': defaultToConfig2,
7335
+ 'transport': defaultToConfig2,
7336
+ 'httpAgent': defaultToConfig2,
7337
+ 'httpsAgent': defaultToConfig2,
7338
+ 'cancelToken': defaultToConfig2,
7339
+ 'socketPath': defaultToConfig2,
7340
+ 'responseEncoding': defaultToConfig2,
7341
+ 'validateStatus': mergeDirectKeys
7342
+ };
7343
+
7344
+ utils.forEach(Object.keys(config1).concat(Object.keys(config2)), function computeConfigValue(prop) {
7345
+ var merge = mergeMap[prop] || mergeDeepProperties;
7346
+ var configValue = merge(prop);
7347
+ (utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
7348
+ });
7349
+
7350
+ return config;
7351
+ };var VERSION = data.version;
7352
+
7353
+ var validators$1 = {};
7354
+
7355
+ // eslint-disable-next-line func-names
7356
+ ['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach(function(type, i) {
7357
+ validators$1[type] = function validator(thing) {
7358
+ return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;
7359
+ };
7360
+ });
7361
+
7362
+ var deprecatedWarnings = {};
7363
+
7364
+ /**
7365
+ * Transitional option validator
7366
+ * @param {function|boolean?} validator - set to false if the transitional option has been removed
7367
+ * @param {string?} version - deprecated version / removed since version
7368
+ * @param {string?} message - some message with additional info
7369
+ * @returns {function}
7370
+ */
7371
+ validators$1.transitional = function transitional(validator, version, message) {
7372
+ function formatMessage(opt, desc) {
7373
+ return '[Axios v' + VERSION + '] Transitional option \'' + opt + '\'' + desc + (message ? '. ' + message : '');
7374
+ }
7375
+
7376
+ // eslint-disable-next-line func-names
7377
+ return function(value, opt, opts) {
7378
+ if (validator === false) {
7379
+ throw new Error(formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')));
7380
+ }
7381
+
7382
+ if (version && !deprecatedWarnings[opt]) {
7383
+ deprecatedWarnings[opt] = true;
7384
+ // eslint-disable-next-line no-console
7385
+ console.warn(
7386
+ formatMessage(
7387
+ opt,
7388
+ ' has been deprecated since v' + version + ' and will be removed in the near future'
7389
+ )
7390
+ );
7391
+ }
7392
+
7393
+ return validator ? validator(value, opt, opts) : true;
7394
+ };
7395
+ };
7396
+
7397
+ /**
7398
+ * Assert object's properties type
7399
+ * @param {object} options
7400
+ * @param {object} schema
7401
+ * @param {boolean?} allowUnknown
7402
+ */
7403
+
7404
+ function assertOptions(options, schema, allowUnknown) {
7405
+ if (typeof options !== 'object') {
7406
+ throw new TypeError('options must be an object');
7407
+ }
7408
+ var keys = Object.keys(options);
7409
+ var i = keys.length;
7410
+ while (i-- > 0) {
7411
+ var opt = keys[i];
7412
+ var validator = schema[opt];
7413
+ if (validator) {
7414
+ var value = options[opt];
7415
+ var result = value === undefined || validator(value, opt, options);
7416
+ if (result !== true) {
7417
+ throw new TypeError('option ' + opt + ' must be ' + result);
7418
+ }
7419
+ continue;
7420
+ }
7421
+ if (allowUnknown !== true) {
7422
+ throw Error('Unknown option ' + opt);
7423
+ }
7424
+ }
7425
+ }
7426
+
7427
+ var validator = {
7428
+ assertOptions: assertOptions,
7429
+ validators: validators$1
7430
+ };var validators = validator.validators;
7431
+ /**
7432
+ * Create a new instance of Axios
7433
+ *
7434
+ * @param {Object} instanceConfig The default config for the instance
7435
+ */
7436
+ function Axios(instanceConfig) {
7437
+ this.defaults = instanceConfig;
7438
+ this.interceptors = {
7439
+ request: new InterceptorManager_1(),
7440
+ response: new InterceptorManager_1()
7441
+ };
7442
+ }
7443
+
7444
+ /**
7445
+ * Dispatch a request
7446
+ *
7447
+ * @param {Object} config The config specific for this request (merged with this.defaults)
7448
+ */
7449
+ Axios.prototype.request = function request(configOrUrl, config) {
7450
+ /*eslint no-param-reassign:0*/
7451
+ // Allow for axios('example/url'[, config]) a la fetch API
7452
+ if (typeof configOrUrl === 'string') {
7453
+ config = config || {};
7454
+ config.url = configOrUrl;
7455
+ } else {
7456
+ config = configOrUrl || {};
7457
+ }
7458
+
7459
+ config = mergeConfig(this.defaults, config);
7460
+
7461
+ // Set config.method
7462
+ if (config.method) {
7463
+ config.method = config.method.toLowerCase();
7464
+ } else if (this.defaults.method) {
7465
+ config.method = this.defaults.method.toLowerCase();
7466
+ } else {
7467
+ config.method = 'get';
7468
+ }
7469
+
7470
+ var transitional = config.transitional;
7471
+
7472
+ if (transitional !== undefined) {
7473
+ validator.assertOptions(transitional, {
7474
+ silentJSONParsing: validators.transitional(validators.boolean),
7475
+ forcedJSONParsing: validators.transitional(validators.boolean),
7476
+ clarifyTimeoutError: validators.transitional(validators.boolean)
7477
+ }, false);
7478
+ }
7479
+
7480
+ // filter out skipped interceptors
7481
+ var requestInterceptorChain = [];
7482
+ var synchronousRequestInterceptors = true;
7483
+ this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
7484
+ if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {
7485
+ return;
7486
+ }
7487
+
7488
+ synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
7489
+
7490
+ requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
7491
+ });
7492
+
7493
+ var responseInterceptorChain = [];
7494
+ this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
7495
+ responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
7496
+ });
7497
+
7498
+ var promise;
7499
+
7500
+ if (!synchronousRequestInterceptors) {
7501
+ var chain = [dispatchRequest, undefined];
7502
+
7503
+ Array.prototype.unshift.apply(chain, requestInterceptorChain);
7504
+ chain = chain.concat(responseInterceptorChain);
7505
+
7506
+ promise = Promise.resolve(config);
7507
+ while (chain.length) {
7508
+ promise = promise.then(chain.shift(), chain.shift());
7509
+ }
7510
+
7511
+ return promise;
7512
+ }
7513
+
7514
+
7515
+ var newConfig = config;
7516
+ while (requestInterceptorChain.length) {
7517
+ var onFulfilled = requestInterceptorChain.shift();
7518
+ var onRejected = requestInterceptorChain.shift();
7519
+ try {
7520
+ newConfig = onFulfilled(newConfig);
7521
+ } catch (error) {
7522
+ onRejected(error);
7523
+ break;
7524
+ }
7525
+ }
7526
+
7527
+ try {
7528
+ promise = dispatchRequest(newConfig);
7529
+ } catch (error) {
7530
+ return Promise.reject(error);
7531
+ }
7532
+
7533
+ while (responseInterceptorChain.length) {
7534
+ promise = promise.then(responseInterceptorChain.shift(), responseInterceptorChain.shift());
7535
+ }
7536
+
7537
+ return promise;
7538
+ };
7539
+
7540
+ Axios.prototype.getUri = function getUri(config) {
7541
+ config = mergeConfig(this.defaults, config);
7542
+ return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\?/, '');
7543
+ };
7544
+
7545
+ // Provide aliases for supported request methods
7546
+ utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
7547
+ /*eslint func-names:0*/
7548
+ Axios.prototype[method] = function(url, config) {
7549
+ return this.request(mergeConfig(config || {}, {
7550
+ method: method,
7551
+ url: url,
7552
+ data: (config || {}).data
7553
+ }));
7554
+ };
7555
+ });
7556
+
7557
+ utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
7558
+ /*eslint func-names:0*/
7559
+ Axios.prototype[method] = function(url, data, config) {
7560
+ return this.request(mergeConfig(config || {}, {
7561
+ method: method,
7562
+ url: url,
7563
+ data: data
7564
+ }));
7565
+ };
7566
+ });
7567
+
7568
+ var Axios_1 = Axios;/**
7569
+ * A `CancelToken` is an object that can be used to request cancellation of an operation.
7570
+ *
7571
+ * @class
7572
+ * @param {Function} executor The executor function.
7573
+ */
7574
+ function CancelToken(executor) {
7575
+ if (typeof executor !== 'function') {
7576
+ throw new TypeError('executor must be a function.');
7577
+ }
7578
+
7579
+ var resolvePromise;
7580
+
7581
+ this.promise = new Promise(function promiseExecutor(resolve) {
7582
+ resolvePromise = resolve;
7583
+ });
7584
+
7585
+ var token = this;
7586
+
7587
+ // eslint-disable-next-line func-names
7588
+ this.promise.then(function(cancel) {
7589
+ if (!token._listeners) return;
7590
+
7591
+ var i;
7592
+ var l = token._listeners.length;
7593
+
7594
+ for (i = 0; i < l; i++) {
7595
+ token._listeners[i](cancel);
7596
+ }
7597
+ token._listeners = null;
7598
+ });
7599
+
7600
+ // eslint-disable-next-line func-names
7601
+ this.promise.then = function(onfulfilled) {
7602
+ var _resolve;
7603
+ // eslint-disable-next-line func-names
7604
+ var promise = new Promise(function(resolve) {
7605
+ token.subscribe(resolve);
7606
+ _resolve = resolve;
7607
+ }).then(onfulfilled);
7608
+
7609
+ promise.cancel = function reject() {
7610
+ token.unsubscribe(_resolve);
7611
+ };
7612
+
7613
+ return promise;
7614
+ };
7615
+
7616
+ executor(function cancel(message) {
7617
+ if (token.reason) {
7618
+ // Cancellation has already been requested
7619
+ return;
7620
+ }
7621
+
7622
+ token.reason = new Cancel_1(message);
7623
+ resolvePromise(token.reason);
7624
+ });
7625
+ }
7626
+
7627
+ /**
7628
+ * Throws a `Cancel` if cancellation has been requested.
7629
+ */
7630
+ CancelToken.prototype.throwIfRequested = function throwIfRequested() {
7631
+ if (this.reason) {
7632
+ throw this.reason;
7633
+ }
7634
+ };
7635
+
7636
+ /**
7637
+ * Subscribe to the cancel signal
7638
+ */
7639
+
7640
+ CancelToken.prototype.subscribe = function subscribe(listener) {
7641
+ if (this.reason) {
7642
+ listener(this.reason);
7643
+ return;
7644
+ }
7645
+
7646
+ if (this._listeners) {
7647
+ this._listeners.push(listener);
7648
+ } else {
7649
+ this._listeners = [listener];
7650
+ }
7651
+ };
7652
+
7653
+ /**
7654
+ * Unsubscribe from the cancel signal
7655
+ */
7656
+
7657
+ CancelToken.prototype.unsubscribe = function unsubscribe(listener) {
7658
+ if (!this._listeners) {
7659
+ return;
7660
+ }
7661
+ var index = this._listeners.indexOf(listener);
7662
+ if (index !== -1) {
7663
+ this._listeners.splice(index, 1);
7664
+ }
7665
+ };
7666
+
7667
+ /**
7668
+ * Returns an object that contains a new `CancelToken` and a function that, when called,
7669
+ * cancels the `CancelToken`.
7670
+ */
7671
+ CancelToken.source = function source() {
7672
+ var cancel;
7673
+ var token = new CancelToken(function executor(c) {
7674
+ cancel = c;
7675
+ });
7676
+ return {
7677
+ token: token,
7678
+ cancel: cancel
7679
+ };
7680
+ };
7681
+
7682
+ var CancelToken_1 = CancelToken;/**
7683
+ * Syntactic sugar for invoking a function and expanding an array for arguments.
7684
+ *
7685
+ * Common use case would be to use `Function.prototype.apply`.
7686
+ *
7687
+ * ```js
7688
+ * function f(x, y, z) {}
7689
+ * var args = [1, 2, 3];
7690
+ * f.apply(null, args);
7691
+ * ```
7692
+ *
7693
+ * With `spread` this example can be re-written.
7694
+ *
7695
+ * ```js
7696
+ * spread(function(x, y, z) {})([1, 2, 3]);
7697
+ * ```
7698
+ *
7699
+ * @param {Function} callback
7700
+ * @returns {Function}
7701
+ */
7702
+ var spread = function spread(callback) {
7703
+ return function wrap(arr) {
7704
+ return callback.apply(null, arr);
7705
+ };
7706
+ };/**
7707
+ * Determines whether the payload is an error thrown by Axios
7708
+ *
7709
+ * @param {*} payload The value to test
7710
+ * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false
7711
+ */
7712
+ var isAxiosError = function isAxiosError(payload) {
7713
+ return utils.isObject(payload) && (payload.isAxiosError === true);
7714
+ };/**
7715
+ * Create an instance of Axios
7716
+ *
7717
+ * @param {Object} defaultConfig The default config for the instance
7718
+ * @return {Axios} A new instance of Axios
7719
+ */
7720
+ function createInstance(defaultConfig) {
7721
+ var context = new Axios_1(defaultConfig);
7722
+ var instance = bind(Axios_1.prototype.request, context);
7723
+
7724
+ // Copy axios.prototype to instance
7725
+ utils.extend(instance, Axios_1.prototype, context);
7726
+
7727
+ // Copy context to instance
7728
+ utils.extend(instance, context);
7729
+
7730
+ // Factory for creating new instances
7731
+ instance.create = function create(instanceConfig) {
7732
+ return createInstance(mergeConfig(defaultConfig, instanceConfig));
7733
+ };
7734
+
7735
+ return instance;
7736
+ }
7737
+
7738
+ // Create the default instance to be exported
7739
+ var axios$1 = createInstance(defaults$1);
7740
+
7741
+ // Expose Axios class to allow class inheritance
7742
+ axios$1.Axios = Axios_1;
7743
+
7744
+ // Expose Cancel & CancelToken
7745
+ axios$1.Cancel = Cancel_1;
7746
+ axios$1.CancelToken = CancelToken_1;
7747
+ axios$1.isCancel = isCancel;
7748
+ axios$1.VERSION = data.version;
7749
+
7750
+ // Expose all/spread
7751
+ axios$1.all = function all(promises) {
7752
+ return Promise.all(promises);
7753
+ };
7754
+ axios$1.spread = spread;
7755
+
7756
+ // Expose isAxiosError
7757
+ axios$1.isAxiosError = isAxiosError;
7758
+
7759
+ var axios_1 = axios$1;
7760
+
7761
+ // Allow use of default import syntax in TypeScript
7762
+ var _default = axios$1;
7763
+ axios_1.default = _default;var axios = axios_1;vue__default["default"].prototype.$httpRequest = axios;
7764
+ var baseURL = window.location.hostname == 'localhost' ? "https://linux07/im/atdHumano/middleware/atd_api.php" : "https://".concat(window.location.hostname);
7765
+ var dev = window.location.hostname == 'localhost' ? '&teste=levchat2' : '';
7766
+ var standardMessages = {
7767
+ methods: {
7768
+ getStandardMessages: function getStandardMessages(type, token) {
7769
+ var _this = this;
7770
+
7771
+ return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
7772
+ return regeneratorRuntime.wrap(function _callee$(_context) {
7773
+ while (1) {
7774
+ switch (_context.prev = _context.next) {
7775
+ case 0:
7776
+ _context.prev = 0;
7777
+ return _context.abrupt("return", _this.$httpRequest({
7778
+ method: 'get',
7779
+ url: "".concat(baseURL, "/get-messages/").concat(type, "?token_cliente=").concat(token).concat(dev) // headers: {
7780
+ // Authorization: "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdGQiOiJNS1VJNnhZdm1xSWVFaWpuMXJwMERkZzQ0ZjFzd3dpbTRsNXd3WWFrVUJtd3d4YjQ0YXd3ZVJ1U2lUeUxxVTEiLCJtYW5hZ2VyIjoiTUtVd0J6YzFnVkIzaWNlNE5yU01lbU5aekI1MkExTzdtNXdhdmQyYnd3eGI0NGF3d3d3eGI0NGF3d3FVU2NoIiwibnJvcyI6WyI0MSJdLCJhdXRoIjoiTUtVVnAxTWR3d2ltNGw1d3dYTnNjWDg5R3V4c1RsZUVqdGdpNjhoNk1JUzl6d0xBTGVRbjhUUCIsImlhdCI6MTY0NjMzOTkyOCwiZXhwIjoxNjQ2NDI2MzI4fQ.QNu0uO3qV-Lqvu8Xww1F_x8Bwnjlm175IVdM89EgPM0"
7781
+ // }
7782
+
7783
+ }).then(function (response) {
7784
+ var data = response.data;
7785
+ var tipo = data.tipo,
7786
+ nivel = data.nivel,
7787
+ msg_ret = data.msg_ret,
7788
+ st_ret = data.st_ret;
7789
+ if (tipo) _this.$emit('set-message-type', tipo);
7790
+ return st_ret === 'OK' ? nivel : st_ret === 'AVISO' ? msg_ret : false;
7791
+ }).catch(function (err) {
7792
+ return console.error('Erro na requisicao para o servidor', err);
7793
+ }));
7794
+
7795
+ case 4:
7796
+ _context.prev = 4;
7797
+ _context.t0 = _context["catch"](0);
7798
+ console.error("Axios nao identificado");
7799
+ console.error(_context.t0);
7800
+
7801
+ case 8:
7802
+ case "end":
7803
+ return _context.stop();
7804
+ }
7805
+ }
7806
+ }, _callee, null, [[0, 4]]);
7807
+ }))();
7808
+ }
7809
+ }
7810
+ };//
7811
+ var script$g = {
7812
+ mixins: [standardMessages],
7813
+ props: {
7814
+ dictionary: {
7815
+ type: Object,
7816
+ default: {},
7817
+ required: false
7818
+ },
7819
+ backgroundColor: {
7820
+ type: String,
7821
+ default: '#fff',
7822
+ required: false
7823
+ },
7824
+ token_cliente: {
7825
+ type: String,
7826
+ default: '',
7827
+ required: false
7828
+ },
7829
+ message: {
7830
+ type: String,
7831
+ default: '',
7832
+ required: false
7833
+ },
7834
+ messageType: {
7835
+ type: [Number, String],
7836
+ default: 1,
7837
+ required: false
7838
+ }
7839
+ },
7840
+ data: function data() {
7841
+ return {
7842
+ placement: "top",
7843
+ formatted_messages_1: [{
7844
+ cod: "T",
7845
+ value: "Todos"
7846
+ }],
7847
+ key_1: "T",
7848
+ formatted_messages_2: [],
7849
+ key_2: "",
7850
+ formatted_messages_3: [],
7851
+ key_3: "",
7852
+ loadingReq: false
7853
+ };
7854
+ },
7855
+ mounted: function mounted() {
7856
+ this.receiveValueFormattedMessage(this.key_1, 2);
7857
+ },
7858
+ methods: {
7859
+ calculateSelectPosition: function calculateSelectPosition(dropdownList, component, sizes) {
7860
+ dropdownList.style.width = sizes.width;
7861
+ var popper = createPopper(component.$refs.toggle, dropdownList, {
7862
+ placement: this.placement
7863
+ });
7864
+ return function () {
7865
+ return popper.destroy();
7866
+ };
7867
+ },
7868
+ inputSelectKey1: function inputSelectKey1() {
7869
+ if (!this.key_1) {
7870
+ if (this.formatted_messages_2.length) this.formatted_messages_2 = [];
7871
+ if (this.key_2) this.key_2 = "";
7872
+ return;
7873
+ }
7874
+
7875
+ this.receiveValueFormattedMessage(this.key_1, 2);
7876
+ },
7877
+ inputSelectKey2: function inputSelectKey2() {
7878
+ if (!this.key_2) {
7879
+ if (this.formatted_messages_3.length) this.formatted_messages_3 = [];
7880
+ if (this.key_3) this.key_3 = "";
7881
+ return;
7882
+ }
7883
+
7884
+ if (this.formatted_messages_3.length) this.formatted_messages_3 = [];
7885
+ if (this.key_3) this.key_3 = "";
7886
+ this.receiveValueFormattedMessage("T/".concat(this.key_2), 3);
7887
+ },
7888
+ receiveValueFormattedMessage: function receiveValueFormattedMessage(cod, selectionIndex) {
7889
+ var _this = this;
7890
+
7891
+ try {
7892
+ if (!this.token_cliente) throw new Error("Informe token_cliente como chave na propriedade formattedMessageSettings que ocorre na chamada componente TextFooter ");
7893
+ this.loadingReq = true;
7894
+ this.getStandardMessages(cod, this.token_cliente).then(function (data) {
7895
+ _this.loadingReq = false;
7896
+ if (data && typeof data == 'string') return _this.$toasted.global.emConstrucao({
7897
+ msg: data
7898
+ });
7899
+ if (data) return _this.showFormattedMessage(data, selectionIndex);
7900
+
7901
+ _this.$toasted.global.defaultError();
7902
+ }).catch(function (e) {
7903
+ _this.loadingReq = false;
7904
+ console.error("Error in getStandardMessages: ", e);
7905
+ });
7906
+ } catch (e) {
7907
+ this.loadingReq = false;
7908
+ console.error("Error in receiveValueFormattedMessage: ", e);
7909
+ }
7910
+ },
7911
+ showFormattedMessage: function showFormattedMessage(messageData, selectionIndex) {
7912
+ try {
7913
+ var success = false;
7914
+ if (Array.isArray(messageData)) success = true;
7915
+ if (!success) this.$toasted.global.emConstrucao({
7916
+ msg: messageData ? messageData.msg : "Nao foi possível obter mensagens"
7917
+ });
7918
+
7919
+ switch (selectionIndex) {
7920
+ case 2:
7921
+ if (!success) {
7922
+ this.formatted_messages_2.push(messageData);
7923
+ this.key_2 = this.formatted_messages_2[0];
7924
+ } else {
7925
+ this.formatted_messages_2 = messageData;
7926
+
7927
+ if (this.formatted_messages_2.length == 1) {
7928
+ if (this.formatted_messages_2[0].cod) {
7929
+ this.key_2 = this.formatted_messages_2[0].cod;
7930
+ this.receiveValueFormattedMessage("T/".concat(this.key_2), 3);
7931
+ }
7932
+ }
7933
+ }
7934
+
7935
+ break;
7936
+
7937
+ case 3:
7938
+ if (!success) {
7939
+ this.formatted_messages_3.push(messageData);
7940
+ this.$toasted.global.emConstrucao({
7941
+ msg: this.dictionary.msg_erro_sem_msg_formatada
7942
+ });
7943
+ this.$emit("close-blocker-standard-message");
7944
+ } else {
7945
+ if (!messageData.length) {
7946
+ this.formatted_messages_3.push(this.dictionary.msg_erro_sem_msg_formatada);
7947
+ this.key_3 = this.formatted_messages_3[0];
7948
+ } else {
7949
+ this.formatted_messages_3 = messageData;
7950
+
7951
+ if (this.formatted_messages_3.length == 1) {
7952
+ if (this.formatted_messages_3[0].cod) {
7953
+ this.key_3 = this.formatted_messages_3[0];
7954
+ }
7955
+ }
7956
+ }
7957
+ }
7958
+
7959
+ break;
7960
+
7961
+ default:
7962
+ console.error("Error in showFormattedMessage: selectionIndex not found");
7963
+ break;
7964
+ }
7965
+ } catch (e) {
7966
+ console.error("Error in showFormattedMessage: ", e);
7967
+ }
7968
+ },
7969
+ openMsg: function openMsg() {
7970
+ try {
7971
+ this.messageType == 1 ? this.insertFormattedMessage(this.key_3) : this.openFormattedMsgType2(this.key_3);
7972
+ } catch (e) {
7973
+ console.error("Error in openMsg: ", e);
7974
+ }
7975
+ },
4128
7976
  openFormattedMsgType2: function openFormattedMsgType2(key) {
4129
7977
  try {
4130
7978
  if (!key || !this.key_2) return;
@@ -4194,7 +8042,12 @@ var __vue_render__$g = function __vue_render__() {
4194
8042
  "slot": "no-options"
4195
8043
  },
4196
8044
  slot: "no-options"
4197
- }, [_vm._v(" " + _vm._s(_vm.dictionary.msg_sem_resultados) + " ")])]), _vm._ssrNode(" "), _vm.formatted_messages_2.length && _vm.key_1 ? _c('v-select', {
8045
+ }, [_vm._v(" " + _vm._s(_vm.dictionary.msg_sem_resultados) + " ")])]), _vm._ssrNode(" "), _vm._ssrNode("<div class=\"transition-selects\">", "</div>", [_c('transition', {
8046
+ attrs: {
8047
+ "name": "fade",
8048
+ "mode": "out-in"
8049
+ }
8050
+ }, [_vm.formatted_messages_2.length && _vm.key_1 ? _c('div', [_c('v-select', {
4198
8051
  staticClass: "text-footer-v-select",
4199
8052
  style: "background-color: " + _vm.backgroundColor,
4200
8053
  attrs: {
@@ -4221,7 +8074,16 @@ var __vue_render__$g = function __vue_render__() {
4221
8074
  "slot": "no-options"
4222
8075
  },
4223
8076
  slot: "no-options"
4224
- }, [_vm._v(" " + _vm._s(_vm.dictionary.msg_sem_resultados) + " ")])]) : _vm._e(), _vm._ssrNode(" "), _vm.formatted_messages_3.length && _vm.key_2 ? _vm._ssrNode("<div class=\"text-footer-select-03\">", "</div>", [_c('v-select', {
8077
+ }, [_vm._v(" " + _vm._s(_vm.dictionary.msg_sem_resultados) + " ")])])], 1) : _vm.key_1 && _vm.loadingReq ? _c('div', {
8078
+ staticClass: "loader-select"
8079
+ }, [_c('VueLoader')], 1) : _vm._e()]), _vm._ssrNode(" "), _c('transition', {
8080
+ attrs: {
8081
+ "name": "fade",
8082
+ "mode": "out-in"
8083
+ }
8084
+ }, [_vm.formatted_messages_3.length && _vm.key_2 ? _c('div', {
8085
+ staticClass: "text-footer-select-03"
8086
+ }, [_c('v-select', {
4225
8087
  staticClass: "text-footer-v-select",
4226
8088
  style: "background-color: " + _vm.backgroundColor,
4227
8089
  attrs: {
@@ -4248,40 +8110,66 @@ var __vue_render__$g = function __vue_render__() {
4248
8110
  "slot": "no-options"
4249
8111
  },
4250
8112
  slot: "no-options"
4251
- }, [_vm._v(" " + _vm._s(_vm.dictionary.msg_sem_resultados) + " ")])]), _vm._ssrNode(" "), _vm.key_3.cod ? [_vm.messageType == 1 ? _vm._ssrNode("<span" + _vm._ssrAttr("title", _vm.dictionary.title_btn_preencher_msg_formatada) + " class=\"text-footer--btn-select-03\">", "</span>", [_c('fa-icon', {
8113
+ }, [_vm._v(" " + _vm._s(_vm.dictionary.msg_sem_resultados) + " ")])]), _vm._v(" "), _vm.key_3.cod ? [_vm.messageType == 1 ? _c('span', {
8114
+ staticClass: "text-footer--btn-select-03",
8115
+ attrs: {
8116
+ "title": _vm.dictionary.title_btn_preencher_msg_formatada
8117
+ },
8118
+ on: {
8119
+ "click": function click($event) {
8120
+ return _vm.insertFormattedMessage(_vm.key_3);
8121
+ }
8122
+ }
8123
+ }, [_c('fa-icon', {
4252
8124
  attrs: {
4253
8125
  "icon": ['fas', 'level-up-alt']
4254
8126
  }
4255
- })], 1) : _vm.messageType == 2 ? _vm._ssrNode("<span" + _vm._ssrAttr("title", _vm.dictionary.title_btn_abrir_msg_tipo_2) + " class=\"text-footer--btn-select-03\">", "</span>", [_c('fa-icon', {
8127
+ })], 1) : _vm.messageType == 2 ? _c('span', {
8128
+ staticClass: "text-footer--btn-select-03",
8129
+ attrs: {
8130
+ "title": _vm.dictionary.title_btn_abrir_msg_tipo_2
8131
+ },
8132
+ on: {
8133
+ "click": function click($event) {
8134
+ return _vm.openFormattedMsgType2(_vm.key_3);
8135
+ }
8136
+ }
8137
+ }, [_c('fa-icon', {
4256
8138
  attrs: {
4257
8139
  "icon": ['fas', 'file-alt']
4258
8140
  }
4259
- })], 1) : _vm._e()] : _vm._e()], 2) : _vm._e()], 2);
8141
+ })], 1) : _vm._e()] : _vm._e()], 2) : _vm.key_2 && _vm.loadingReq ? _c('div', {
8142
+ staticClass: "loader-select"
8143
+ }, [_c('VueLoader')], 1) : _vm._e()])], 2)], 2);
4260
8144
  };
4261
8145
 
4262
8146
  var __vue_staticRenderFns__$g = [];
4263
8147
  /* style */
4264
8148
 
4265
- var __vue_inject_styles__$g = undefined;
8149
+ var __vue_inject_styles__$g = function __vue_inject_styles__(inject) {
8150
+ if (!inject) return;
8151
+ inject("data-v-9fe38344_0", {
8152
+ source: ".transition-selects{min-height:80px;display:flex;flex-direction:column;width:100%}.loader-select{position:relative;min-height:35px;background:#fff;width:100%;border:1px solid #ccc;border-radius:5px;z-index:1}",
8153
+ map: undefined,
8154
+ media: undefined
8155
+ });
8156
+ };
4266
8157
  /* scoped */
4267
8158
 
8159
+
4268
8160
  var __vue_scope_id__$g = undefined;
4269
8161
  /* module identifier */
4270
8162
 
4271
- var __vue_module_identifier__$g = "data-v-752386a2";
8163
+ var __vue_module_identifier__$g = "data-v-9fe38344";
4272
8164
  /* functional template */
4273
8165
 
4274
8166
  var __vue_is_functional_template__$g = false;
4275
- /* style inject */
4276
-
4277
- /* style inject SSR */
4278
-
4279
8167
  /* style inject shadow dom */
4280
8168
 
4281
8169
  var __vue_component__$n = /*#__PURE__*/normalizeComponent({
4282
8170
  render: __vue_render__$g,
4283
8171
  staticRenderFns: __vue_staticRenderFns__$g
4284
- }, __vue_inject_styles__$g, __vue_script__$g, __vue_scope_id__$g, __vue_is_functional_template__$g, __vue_module_identifier__$g, false, undefined, undefined, undefined);
8172
+ }, __vue_inject_styles__$g, __vue_script__$g, __vue_scope_id__$g, __vue_is_functional_template__$g, __vue_module_identifier__$g, false, undefined, createInjectorSSR, undefined);
4285
8173
 
4286
8174
  var StandardMessages = __vue_component__$n;//
4287
8175
  var script$f = {
@@ -4387,6 +8275,10 @@ var script$f = {
4387
8275
  hasButtonFiles: {
4388
8276
  type: Boolean,
4389
8277
  required: false
8278
+ },
8279
+ externalFiles: {
8280
+ type: Array,
8281
+ require: false
4390
8282
  }
4391
8283
  },
4392
8284
  data: function data() {
@@ -4571,8 +8463,8 @@ var script$f = {
4571
8463
  openImage: function openImage(imagePreview) {
4572
8464
  this.$emit("open-image", imagePreview);
4573
8465
  },
4574
- openFileSystem: function openFileSystem(status) {
4575
- this.$emit("open-file-system", status);
8466
+ openFileSystem: function openFileSystem() {
8467
+ this.$emit("open-file-system");
4576
8468
  },
4577
8469
  setAudio: function setAudio(audioObj) {
4578
8470
  var audioFile = audioObj.audioFile,
@@ -4808,7 +8700,8 @@ var __vue_render__$f = function __vue_render__() {
4808
8700
  "dictionary": _vm.dictionary,
4809
8701
  "fileSettings": _vm.fileSettings,
4810
8702
  "cssStyle": _vm.cssStyle,
4811
- "hasButtonFiles": _vm.hasButtonFiles
8703
+ "hasButtonFiles": _vm.hasButtonFiles,
8704
+ "externalFiles": _vm.externalFiles
4812
8705
  },
4813
8706
  on: {
4814
8707
  "set-file-vars": _vm.setFileVars,
@@ -4859,7 +8752,7 @@ var __vue_staticRenderFns__$f = [];
4859
8752
 
4860
8753
  var __vue_inject_styles__$f = function __vue_inject_styles__(inject) {
4861
8754
  if (!inject) return;
4862
- inject("data-v-6d9479b5_0", {
8755
+ inject("data-v-35ab0f5c_0", {
4863
8756
  source: ".toasted svg{margin-right:10px}.d-none{display:none}ul{list-style-type:none}.text-footer-container{display:flex;justify-content:center;align-items:center;flex-direction:column;width:100%;position:relative}.text-footer-container .text-footer{min-height:48px;box-shadow:0 3px 7px -2px rgba(0,0,0,.45);position:relative;display:flex;justify-content:center;align-items:center;border:1px solid #ccc;padding:5px 2px 5px 5px;border-radius:5px}.text-footer-container .text-footer.full{width:100%}.text-footer-container .text-footer.almostFull{width:95%}.text-footer-container .text-footer.medium{width:75%}.text-footer-container.bigger .text-footer{height:80px}.text-footer-container.bigger .text-footer>textarea{font-size:.875rem;height:75px;max-height:75px;min-height:75px}.text-footer-container textarea{margin:0 5px;border:unset;flex:1;resize:none;min-height:30px;max-height:60px;font-size:.875rem;font-family:inherit;background:inherit}.text-footer-container textarea:focus{outline:unset}.text-footer-container textarea::placeholder{font-size:.75rem}.text-footer-container .text-footer-audio{flex:1;display:flex;justify-content:center;align-items:center}.text-footer-container audio{flex:1;outline:unset;width:auto;height:38px}.text-footer-container .delete-audio{display:flex;justify-content:center;align-items:center;color:#e74c3c;transition:background .3s;border-radius:50%;font-size:1rem;padding:10px;cursor:pointer;margin:0 5px;width:31px;height:31px}.text-footer-container .delete-audio:hover{background-color:rgba(208,0,0,.2)}.text-footer-container .max-characters{font-size:.575rem;z-index:1;color:#444;position:relative;top:30px;left:-30px}.text-footer-container .max-characters.no-width{width:0}.text-footer-container .text-footer-actions{display:flex}.text-footer-container .text-footer-actions.outside-buttons{display:flex;align-items:center;justify-content:flex-end;position:absolute;top:-42px;right:2px;background-color:#ddd;box-shadow:inset 0 -10px 5px -11px rgba(0,0,0,.5)}.text-footer-container .text-footer-actions .text-footer-actions--btn{display:flex;justify-content:center;align-items:center;color:#777;border-radius:50%;transition:background .3s;padding:10px;font-size:1rem;width:36px;height:36px;cursor:pointer;margin-right:2.5px}.text-footer-container .text-footer-actions .text-footer-actions--btn:last-child{margin-right:unset}.text-footer-container .text-footer-actions .text-footer-actions--btn:hover{background-color:rgba(0,0,0,.1)}.text-footer-container .text-footer-actions .text-footer-actions--btn.files-activated{background-color:rgba(0,0,0,.1)}.text-footer-container .text-footer-actions .text-footer-actions--btn.audio-activated{background-color:rgba(208,0,0,.7);color:#fff}.text-footer-container .text-footer-actions .text-footer-actions--btn.left-button{position:absolute;left:0}.text-footer-container .text-footer-hsm-container{margin:12px 0 7px 0}.text-footer-container .text-footer-hsm-container.full{width:100%}.text-footer-container .text-footer-hsm-container.almostFull{width:95%}.text-footer-container .text-footer-hsm-container.medium{width:75%}.text-footer-container .text-footer-hsm-container .text-footer-v-select{border-radius:5px;margin-bottom:5px}.text-footer-container .text-footer-hsm-container .text-footer-select-03{display:flex;align-items:center;flex:1;width:100%}.text-footer-container .text-footer-hsm-container .text-footer-select-03 .text-footer-v-select{flex:1}.text-footer-container .text-footer-hsm-container .text-footer-select-03 .text-footer--btn-select-03{transition-duration:.3s;user-select:none;cursor:pointer;box-shadow:inset 0 -3px rgba(0,0,0,.2);opacity:.9;border-radius:2.5px;display:flex;justify-content:center;align-items:center;margin-left:5px;margin-bottom:5px;background-color:#f7fe72;width:32px;height:32px}.text-footer-container .text-footer-hsm-container .text-footer-select-03 .text-footer--btn-select-03:hover{opacity:1}.text-footer-container .text-footer-hsm-container .text-footer-select-03 .text-footer--btn-select-03:active{opacity:1;box-shadow:inset 0 -1px rgba(0,0,0,.2);-webkit-transform:translateY(1px);-moz-transform:translateY(1px);-o-transform:translateY(1px);-ms-transform:translateY(1px);transform:translateY(1px)}.text-footer-container .text-footer-hsm-container .text-footer-select-03 .text-footer--btn-select-03 svg{font-size:1rem}.text-footer-container .text-footer-files-container{position:absolute;right:0;top:-55px;padding:5px;background-color:rgba(0,0,0,.4);border-radius:5px;display:flex;align-items:center;justify-content:space-between;z-index:1}.text-footer-container .text-footer-files-container.horizontal{right:-55px;flex-direction:column}.text-footer-container .text-footer-files-container .files-btn{transition-duration:.3s;transition-property:opacity;opacity:.8;cursor:pointer;display:flex;justify-content:center;align-items:center;border-radius:10px;padding:3px;width:40px;height:40px;font-size:1rem;color:#fff}.text-footer-container .text-footer-files-container .files-btn:hover{opacity:1}.text-footer-container .text-footer-files-container .files-btn svg{color:#fff}.text-footer-container .text-footer-files-container .files-btn.images{background-color:#9575cd;margin-right:5px}.text-footer-container .text-footer-files-container .files-btn.images.margin-bottom{margin-right:unset;margin-bottom:5px}.text-footer-container .text-footer-files-container .files-btn.docs{background-color:#7986cb;margin-right:5px}.text-footer-container .text-footer-files-container .files-btn.system{background-color:#49a349}.text-footer-container .text-footer-preview-container{cursor:default;position:absolute;left:0;background-color:#f1f1f1;border:2px solid #ccc;border-bottom:unset;border-top-left-radius:2.5px;border-top-right-radius:2.5px}.text-footer-container .text-footer-preview-container.isDoc{top:-50px;width:100%;height:45px}.text-footer-container .text-footer-preview-container.isImg,.text-footer-container .text-footer-preview-container.isMultiple{top:-205px;width:100%;height:200px}.text-footer-container .text-footer-preview-container.isImg .text-footer-image-preview{height:170px}.text-footer-container .text-footer-preview-container.isError{top:-80px;width:100%;height:75px}.text-footer-container .text-footer-alt{margin-top:-12px;width:100%;padding:0 10px}.text-footer-container .text-footer-alt .text-footer-out-session{margin-top:12px}.text-footer-container .text-footer-alt .text-footer-sem-24h{font-size:.8rem;text-align:right;font-weight:600;letter-spacing:-.5px;color:#dd7f0c;margin-top:5px;position:absolute;right:0}.text-footer-container .text-footer-alt .sem-templates{margin-top:10px;font-size:.8rem;text-align:right;font-weight:600;letter-spacing:-.5px;color:#921e12}.text-footer-container .text-footer-alt .text-footer-templates{position:relative;width:100%}.text-footer-container .text-footer-alt .text-footer-templates .text-footer-group-selection{width:100%;display:flex;align-items:center}.text-footer-container .text-footer-alt .text-footer-templates .text-footer-group-selection h4{margin-right:5px}.text-footer-container .text-footer-alt .text-footer-templates .text-footer-group-selection .sm__select{flex:1}.vs__dropdown-menu{font-size:.85rem!important}.emoji-mart-anchor,.emoji-mart-emoji span{cursor:pointer!important}.emoji-mart{z-index:2!important}.emoji-mart-scroll{overflow-x:hidden}",
4864
8757
  map: undefined,
4865
8758
  media: undefined
@@ -4871,7 +8764,7 @@ var __vue_inject_styles__$f = function __vue_inject_styles__(inject) {
4871
8764
  var __vue_scope_id__$f = undefined;
4872
8765
  /* module identifier */
4873
8766
 
4874
- var __vue_module_identifier__$f = "data-v-6d9479b5";
8767
+ var __vue_module_identifier__$f = "data-v-35ab0f5c";
4875
8768
  /* functional template */
4876
8769
 
4877
8770
  var __vue_is_functional_template__$f = false;