crmbonus-component-wake 0.0.20 → 0.0.21
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/crmbonus-component-wake/app-modal.entry.js +23 -0
- package/dist/crmbonus-component-wake/app-modal.entry.js.map +1 -0
- package/dist/{esm/app-modal_2.entry.js → crmbonus-component-wake/crm-bonus-form.entry.js} +13 -26
- package/dist/crmbonus-component-wake/crm-bonus-form.entry.js.map +1 -0
- package/dist/{esm → crmbonus-component-wake}/crm-bonus.entry.js +16 -8
- package/dist/crmbonus-component-wake/crm-bonus.entry.js.map +1 -0
- package/dist/crmbonus-component-wake/crmbonus-component-wake.esm.js +48 -1
- package/dist/crmbonus-component-wake/crmbonus-component-wake.esm.js.map +1 -1
- package/dist/{cjs/crmbonus.service-a626c034.js → crmbonus-component-wake/crmbonus.service-5e579e1c.js} +165 -92
- package/dist/crmbonus-component-wake/crmbonus.service-5e579e1c.js.map +1 -0
- package/dist/{components/p-629fcb5b.js → crmbonus-component-wake/crmbonus.service-72c64bc3.js} +166 -91
- package/dist/crmbonus-component-wake/crmbonus.service-72c64bc3.js.map +1 -0
- package/dist/crmbonus-component-wake/crmbonus.service-a0dea046.js +3868 -0
- package/dist/crmbonus-component-wake/crmbonus.service-a0dea046.js.map +1 -0
- package/dist/{esm/crmbonus.service-83f67708.js → crmbonus-component-wake/crmbonus.service-ce105f62.js} +165 -90
- package/dist/crmbonus-component-wake/crmbonus.service-ce105f62.js.map +1 -0
- package/dist/crmbonus-component-wake/giftback-finish.entry.js +19 -0
- package/dist/crmbonus-component-wake/giftback-finish.entry.js.map +1 -0
- package/dist/crmbonus-component-wake/giftback-pin.entry.js +44 -0
- package/dist/crmbonus-component-wake/giftback-pin.entry.js.map +1 -0
- package/dist/crmbonus-component-wake/giftback-progress.entry.js +40 -0
- package/dist/crmbonus-component-wake/giftback-progress.entry.js.map +1 -0
- package/dist/crmbonus-component-wake/index-f557ce7c.js +3039 -0
- package/dist/crmbonus-component-wake/index-f557ce7c.js.map +1 -0
- package/dist/crmbonus-component-wake/index.esm.js +16 -1
- package/dist/crmbonus-component-wake/index.esm.js.map +1 -1
- package/dist/{esm → crmbonus-component-wake}/loading-spinner.entry.js +3 -4
- package/dist/crmbonus-component-wake/loading-spinner.entry.js.map +1 -0
- package/dist/{esm → crmbonus-component-wake}/pedido-finalizado.entry.js +3 -3
- package/dist/crmbonus-component-wake/pedido-finalizado.entry.js.map +1 -0
- package/dist/{components/p-2dbfb2c7.js → crmbonus-component-wake/phone-input-mask.entry.js} +9 -30
- package/dist/crmbonus-component-wake/phone-input-mask.entry.js.map +1 -0
- package/dist/crmbonus-component-wake/phone-input.entry.js +21 -0
- package/dist/crmbonus-component-wake/phone-input.entry.js.map +1 -0
- package/dist/crmbonus-component-wake/shadow-css-7ad5caf8.js +334 -0
- package/dist/crmbonus-component-wake/shadow-css-7ad5caf8.js.map +1 -0
- package/dist/types/components/crm-bonus/crm-bonus.d.ts +1 -0
- package/dist/types/components/crm-bonus-form/crm-bonus-form.d.ts +2 -0
- package/dist/types/components/crm-bonus-form/subcomponents/giftback-pin/giftback-pin.d.ts +1 -0
- package/dist/types/components/crm-bonus-form/subcomponents/giftback-progress/giftback-progress.d.ts +1 -0
- package/dist/types/components.d.ts +6 -0
- package/package.json +1 -1
- package/dist/cjs/app-globals-3a1e7e63.js +0 -7
- package/dist/cjs/app-globals-3a1e7e63.js.map +0 -1
- package/dist/cjs/app-modal_2.cjs.entry.js +0 -127
- package/dist/cjs/app-modal_2.cjs.entry.js.map +0 -1
- package/dist/cjs/crm-bonus.cjs.entry.js +0 -46
- package/dist/cjs/crm-bonus.cjs.entry.js.map +0 -1
- package/dist/cjs/crmbonus-component-wake.cjs.js +0 -27
- package/dist/cjs/crmbonus-component-wake.cjs.js.map +0 -1
- package/dist/cjs/crmbonus.service-a626c034.js.map +0 -1
- package/dist/cjs/giftback-finish_5.cjs.entry.js +0 -153
- package/dist/cjs/giftback-finish_5.cjs.entry.js.map +0 -1
- package/dist/cjs/index-52d8a075.js +0 -1248
- package/dist/cjs/index-52d8a075.js.map +0 -1
- package/dist/cjs/index.cjs.js +0 -11
- package/dist/cjs/index.cjs.js.map +0 -1
- package/dist/cjs/loader.cjs.js +0 -17
- package/dist/cjs/loader.cjs.js.map +0 -1
- package/dist/cjs/loading-spinner.cjs.entry.js +0 -24
- package/dist/cjs/loading-spinner.cjs.entry.js.map +0 -1
- package/dist/cjs/pedido-finalizado.cjs.entry.js +0 -28
- package/dist/cjs/pedido-finalizado.cjs.entry.js.map +0 -1
- package/dist/collection/collection-manifest.json +0 -21
- package/dist/collection/components/crm-bonus/assets/logo.svg +0 -18
- package/dist/collection/components/crm-bonus/assets/success-svgrepo-com.svg +0 -8
- package/dist/collection/components/crm-bonus/assets/svg/logo.svg +0 -18
- package/dist/collection/components/crm-bonus/assets/svg/success-svgrepo-com.svg +0 -8
- package/dist/collection/components/crm-bonus/crm-bonus.css +0 -20
- package/dist/collection/components/crm-bonus/crm-bonus.js +0 -123
- package/dist/collection/components/crm-bonus/crm-bonus.js.map +0 -1
- package/dist/collection/components/crm-bonus-form/crm-bonus-form.css +0 -32
- package/dist/collection/components/crm-bonus-form/crm-bonus-form.js +0 -194
- package/dist/collection/components/crm-bonus-form/crm-bonus-form.js.map +0 -1
- package/dist/collection/components/crm-bonus-form/subcomponents/giftback-finish/giftback-finish.css +0 -10
- package/dist/collection/components/crm-bonus-form/subcomponents/giftback-finish/giftback-finish.js +0 -20
- package/dist/collection/components/crm-bonus-form/subcomponents/giftback-finish/giftback-finish.js.map +0 -1
- package/dist/collection/components/crm-bonus-form/subcomponents/giftback-pin/giftback-pin.css +0 -54
- package/dist/collection/components/crm-bonus-form/subcomponents/giftback-pin/giftback-pin.js +0 -111
- package/dist/collection/components/crm-bonus-form/subcomponents/giftback-pin/giftback-pin.js.map +0 -1
- package/dist/collection/components/crm-bonus-form/subcomponents/giftback-progress/giftback-progress.css +0 -95
- package/dist/collection/components/crm-bonus-form/subcomponents/giftback-progress/giftback-progress.js +0 -111
- package/dist/collection/components/crm-bonus-form/subcomponents/giftback-progress/giftback-progress.js.map +0 -1
- package/dist/collection/components/crm-bonus-form/subcomponents/phone/phone.input.js +0 -75
- package/dist/collection/components/crm-bonus-form/subcomponents/phone/phone.input.js.map +0 -1
- package/dist/collection/components/loading-spinner/loading-spinner.css +0 -17
- package/dist/collection/components/loading-spinner/loading-spinner.js +0 -63
- package/dist/collection/components/loading-spinner/loading-spinner.js.map +0 -1
- package/dist/collection/components/modal/app-modal.css +0 -45
- package/dist/collection/components/modal/app-modal.js +0 -83
- package/dist/collection/components/modal/app-modal.js.map +0 -1
- package/dist/collection/components/pedido/pedido.js +0 -58
- package/dist/collection/components/pedido/pedido.js.map +0 -1
- package/dist/collection/components/phone/phone-input-mask.css +0 -47
- package/dist/collection/components/phone/phone-input-mask.js +0 -90
- package/dist/collection/components/phone/phone-input-mask.js.map +0 -1
- package/dist/collection/contants/index.js +0 -8
- package/dist/collection/contants/index.js.map +0 -1
- package/dist/collection/contants/mocks.js +0 -28
- package/dist/collection/contants/mocks.js.map +0 -1
- package/dist/collection/dto/pin.sent.js +0 -2
- package/dist/collection/dto/pin.sent.js.map +0 -1
- package/dist/collection/dto/validate.pin.bonus.js +0 -2
- package/dist/collection/dto/validate.pin.bonus.js.map +0 -1
- package/dist/collection/index.js +0 -11
- package/dist/collection/index.js.map +0 -1
- package/dist/collection/services/crmbonus.service.js +0 -39
- package/dist/collection/services/crmbonus.service.js.map +0 -1
- package/dist/collection/utils/utils.js +0 -4
- package/dist/collection/utils/utils.js.map +0 -1
- package/dist/components/app-modal.js +0 -8
- package/dist/components/app-modal.js.map +0 -1
- package/dist/components/crm-bonus-form.js +0 -8
- package/dist/components/crm-bonus-form.js.map +0 -1
- package/dist/components/crm-bonus.js +0 -117
- package/dist/components/crm-bonus.js.map +0 -1
- package/dist/components/giftback-finish.js +0 -8
- package/dist/components/giftback-finish.js.map +0 -1
- package/dist/components/giftback-pin.js +0 -8
- package/dist/components/giftback-pin.js.map +0 -1
- package/dist/components/giftback-progress.js +0 -8
- package/dist/components/giftback-progress.js.map +0 -1
- package/dist/components/index.js +0 -9
- package/dist/components/index.js.map +0 -1
- package/dist/components/loading-spinner.js +0 -8
- package/dist/components/loading-spinner.js.map +0 -1
- package/dist/components/p-17ee9996.js +0 -52
- package/dist/components/p-17ee9996.js.map +0 -1
- package/dist/components/p-2dbfb2c7.js.map +0 -1
- package/dist/components/p-563ea4c5.js +0 -166
- package/dist/components/p-563ea4c5.js.map +0 -1
- package/dist/components/p-629fcb5b.js.map +0 -1
- package/dist/components/p-7294e43f.js +0 -36
- package/dist/components/p-7294e43f.js.map +0 -1
- package/dist/components/p-78529eea.js +0 -39
- package/dist/components/p-78529eea.js.map +0 -1
- package/dist/components/p-8e0ed8dd.js +0 -43
- package/dist/components/p-8e0ed8dd.js.map +0 -1
- package/dist/components/p-a1781d03.js +0 -72
- package/dist/components/p-a1781d03.js.map +0 -1
- package/dist/components/p-a88bc337.js +0 -67
- package/dist/components/p-a88bc337.js.map +0 -1
- package/dist/components/p-faf7103e.js +0 -1064
- package/dist/components/p-faf7103e.js.map +0 -1
- package/dist/components/pedido-finalizado.js +0 -45
- package/dist/components/pedido-finalizado.js.map +0 -1
- package/dist/components/phone-input-mask.js +0 -8
- package/dist/components/phone-input-mask.js.map +0 -1
- package/dist/components/phone-input.js +0 -8
- package/dist/components/phone-input.js.map +0 -1
- package/dist/crmbonus-component-wake/p-54e51298.entry.js +0 -2
- package/dist/crmbonus-component-wake/p-54e51298.entry.js.map +0 -1
- package/dist/crmbonus-component-wake/p-629fcb5b.js +0 -2
- package/dist/crmbonus-component-wake/p-629fcb5b.js.map +0 -1
- package/dist/crmbonus-component-wake/p-6b075110.entry.js +0 -2
- package/dist/crmbonus-component-wake/p-6b075110.entry.js.map +0 -1
- package/dist/crmbonus-component-wake/p-72510682.js +0 -3
- package/dist/crmbonus-component-wake/p-72510682.js.map +0 -1
- package/dist/crmbonus-component-wake/p-ba53f0f3.entry.js +0 -2
- package/dist/crmbonus-component-wake/p-ba53f0f3.entry.js.map +0 -1
- package/dist/crmbonus-component-wake/p-bf4b486e.entry.js +0 -2
- package/dist/crmbonus-component-wake/p-bf4b486e.entry.js.map +0 -1
- package/dist/crmbonus-component-wake/p-e1255160.js +0 -2
- package/dist/crmbonus-component-wake/p-e1255160.js.map +0 -1
- package/dist/crmbonus-component-wake/p-f0d68c31.entry.js +0 -2
- package/dist/crmbonus-component-wake/p-f0d68c31.entry.js.map +0 -1
- package/dist/env.js +0 -5
- package/dist/env.js.map +0 -1
- package/dist/esm/app-modal_2.entry.js.map +0 -1
- package/dist/esm/crm-bonus.entry.js.map +0 -1
- package/dist/esm/crmbonus-component-wake.js +0 -22
- package/dist/esm/crmbonus-component-wake.js.map +0 -1
- package/dist/esm/crmbonus.service-83f67708.js.map +0 -1
- package/dist/esm/giftback-finish_5.entry.js +0 -145
- package/dist/esm/giftback-finish_5.entry.js.map +0 -1
- package/dist/esm/index-9f7bde48.js +0 -1220
- package/dist/esm/index-9f7bde48.js.map +0 -1
- package/dist/esm/index.js +0 -7
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/loader.js +0 -13
- package/dist/esm/loader.js.map +0 -1
- package/dist/esm/loading-spinner.entry.js.map +0 -1
- package/dist/esm/pedido-finalizado.entry.js.map +0 -1
- package/dist/index.cjs.js +0 -1
- package/dist/index.js +0 -1
- /package/dist/{esm → crmbonus-component-wake}/app-globals-0f993ce5.js +0 -0
- /package/dist/{esm → crmbonus-component-wake}/app-globals-0f993ce5.js.map +0 -0
package/dist/{components/p-629fcb5b.js → crmbonus-component-wake/crmbonus.service-72c64bc3.js}
RENAMED
@@ -1,9 +1,13 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
1
3
|
function bind(fn, thisArg) {
|
2
4
|
return function wrap() {
|
3
5
|
return fn.apply(thisArg, arguments);
|
4
6
|
};
|
5
7
|
}
|
6
8
|
|
9
|
+
'use strict';
|
10
|
+
|
7
11
|
// utils is a library of generic helper functions non-specific to axios
|
8
12
|
|
9
13
|
const {toString} = Object.prototype;
|
@@ -761,6 +765,8 @@ const utils$1 = {
|
|
761
765
|
asap
|
762
766
|
};
|
763
767
|
|
768
|
+
'use strict';
|
769
|
+
|
764
770
|
/**
|
765
771
|
* Create an Error with the specified message, config, error code, request and response.
|
766
772
|
*
|
@@ -772,7 +778,7 @@ const utils$1 = {
|
|
772
778
|
*
|
773
779
|
* @returns {Error} The created error.
|
774
780
|
*/
|
775
|
-
function AxiosError(message, code, config, request, response) {
|
781
|
+
function AxiosError$1(message, code, config, request, response) {
|
776
782
|
Error.call(this);
|
777
783
|
|
778
784
|
if (Error.captureStackTrace) {
|
@@ -792,7 +798,7 @@ function AxiosError(message, code, config, request, response) {
|
|
792
798
|
}
|
793
799
|
}
|
794
800
|
|
795
|
-
utils$1.inherits(AxiosError, Error, {
|
801
|
+
utils$1.inherits(AxiosError$1, Error, {
|
796
802
|
toJSON: function toJSON() {
|
797
803
|
return {
|
798
804
|
// Standard
|
@@ -814,7 +820,7 @@ utils$1.inherits(AxiosError, Error, {
|
|
814
820
|
}
|
815
821
|
});
|
816
822
|
|
817
|
-
const prototype$1 = AxiosError.prototype;
|
823
|
+
const prototype$1 = AxiosError$1.prototype;
|
818
824
|
const descriptors = {};
|
819
825
|
|
820
826
|
[
|
@@ -835,11 +841,11 @@ const descriptors = {};
|
|
835
841
|
descriptors[code] = {value: code};
|
836
842
|
});
|
837
843
|
|
838
|
-
Object.defineProperties(AxiosError, descriptors);
|
844
|
+
Object.defineProperties(AxiosError$1, descriptors);
|
839
845
|
Object.defineProperty(prototype$1, 'isAxiosError', {value: true});
|
840
846
|
|
841
847
|
// eslint-disable-next-line func-names
|
842
|
-
AxiosError.from = (error, code, config, request, response, customProps) => {
|
848
|
+
AxiosError$1.from = (error, code, config, request, response, customProps) => {
|
843
849
|
const axiosError = Object.create(prototype$1);
|
844
850
|
|
845
851
|
utils$1.toFlatObject(error, axiosError, function filter(obj) {
|
@@ -848,7 +854,7 @@ AxiosError.from = (error, code, config, request, response, customProps) => {
|
|
848
854
|
return prop !== 'isAxiosError';
|
849
855
|
});
|
850
856
|
|
851
|
-
AxiosError.call(axiosError, error.message, code, config, request, response);
|
857
|
+
AxiosError$1.call(axiosError, error.message, code, config, request, response);
|
852
858
|
|
853
859
|
axiosError.cause = error;
|
854
860
|
|
@@ -862,6 +868,8 @@ AxiosError.from = (error, code, config, request, response, customProps) => {
|
|
862
868
|
// eslint-disable-next-line strict
|
863
869
|
const httpAdapter = null;
|
864
870
|
|
871
|
+
'use strict';
|
872
|
+
|
865
873
|
/**
|
866
874
|
* Determines if the given thing is a array or js object.
|
867
875
|
*
|
@@ -940,13 +948,13 @@ const predicates = utils$1.toFlatObject(utils$1, {}, null, function filter(prop)
|
|
940
948
|
*
|
941
949
|
* @returns
|
942
950
|
*/
|
943
|
-
function toFormData(obj, formData, options) {
|
951
|
+
function toFormData$1(obj, formData, options) {
|
944
952
|
if (!utils$1.isObject(obj)) {
|
945
953
|
throw new TypeError('target must be an object');
|
946
954
|
}
|
947
955
|
|
948
956
|
// eslint-disable-next-line no-param-reassign
|
949
|
-
formData = formData || new (FormData)();
|
957
|
+
formData = formData || new (httpAdapter || FormData)();
|
950
958
|
|
951
959
|
// eslint-disable-next-line no-param-reassign
|
952
960
|
options = utils$1.toFlatObject(options, {
|
@@ -978,7 +986,7 @@ function toFormData(obj, formData, options) {
|
|
978
986
|
}
|
979
987
|
|
980
988
|
if (!useBlob && utils$1.isBlob(value)) {
|
981
|
-
throw new AxiosError('Blob is not supported. Use a Buffer instead.');
|
989
|
+
throw new AxiosError$1('Blob is not supported. Use a Buffer instead.');
|
982
990
|
}
|
983
991
|
|
984
992
|
if (utils$1.isArrayBuffer(value) || utils$1.isTypedArray(value)) {
|
@@ -1073,6 +1081,8 @@ function toFormData(obj, formData, options) {
|
|
1073
1081
|
return formData;
|
1074
1082
|
}
|
1075
1083
|
|
1084
|
+
'use strict';
|
1085
|
+
|
1076
1086
|
/**
|
1077
1087
|
* It encodes a string by replacing all characters that are not in the unreserved set with
|
1078
1088
|
* their percent-encoded equivalents
|
@@ -1107,7 +1117,7 @@ function encode$1(str) {
|
|
1107
1117
|
function AxiosURLSearchParams(params, options) {
|
1108
1118
|
this._pairs = [];
|
1109
1119
|
|
1110
|
-
params && toFormData(params, this, options);
|
1120
|
+
params && toFormData$1(params, this, options);
|
1111
1121
|
}
|
1112
1122
|
|
1113
1123
|
const prototype = AxiosURLSearchParams.prototype;
|
@@ -1126,6 +1136,8 @@ prototype.toString = function toString(encoder) {
|
|
1126
1136
|
}, '').join('&');
|
1127
1137
|
};
|
1128
1138
|
|
1139
|
+
'use strict';
|
1140
|
+
|
1129
1141
|
/**
|
1130
1142
|
* It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their
|
1131
1143
|
* URI encoded counterparts
|
@@ -1185,6 +1197,8 @@ function buildURL(url, params, options) {
|
|
1185
1197
|
return url;
|
1186
1198
|
}
|
1187
1199
|
|
1200
|
+
'use strict';
|
1201
|
+
|
1188
1202
|
class InterceptorManager {
|
1189
1203
|
constructor() {
|
1190
1204
|
this.handlers = [];
|
@@ -1251,7 +1265,7 @@ class InterceptorManager {
|
|
1251
1265
|
}
|
1252
1266
|
}
|
1253
1267
|
|
1254
|
-
|
1268
|
+
'use strict';
|
1255
1269
|
|
1256
1270
|
const transitionalDefaults = {
|
1257
1271
|
silentJSONParsing: true,
|
@@ -1259,10 +1273,15 @@ const transitionalDefaults = {
|
|
1259
1273
|
clarifyTimeoutError: false
|
1260
1274
|
};
|
1261
1275
|
|
1276
|
+
'use strict';
|
1262
1277
|
const URLSearchParams$1 = typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;
|
1263
1278
|
|
1279
|
+
'use strict';
|
1280
|
+
|
1264
1281
|
const FormData$1 = typeof FormData !== 'undefined' ? FormData : null;
|
1265
1282
|
|
1283
|
+
'use strict';
|
1284
|
+
|
1266
1285
|
const Blob$1 = typeof Blob !== 'undefined' ? Blob : null;
|
1267
1286
|
|
1268
1287
|
const platform$1 = {
|
@@ -1333,8 +1352,10 @@ const platform = {
|
|
1333
1352
|
...platform$1
|
1334
1353
|
};
|
1335
1354
|
|
1355
|
+
'use strict';
|
1356
|
+
|
1336
1357
|
function toURLEncodedForm(data, options) {
|
1337
|
-
return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({
|
1358
|
+
return toFormData$1(data, new platform.classes.URLSearchParams(), Object.assign({
|
1338
1359
|
visitor: function(value, key, path, helpers) {
|
1339
1360
|
if (platform.isNode && utils$1.isBuffer(value)) {
|
1340
1361
|
this.append(key, value.toString('base64'));
|
@@ -1346,6 +1367,8 @@ function toURLEncodedForm(data, options) {
|
|
1346
1367
|
}, options));
|
1347
1368
|
}
|
1348
1369
|
|
1370
|
+
'use strict';
|
1371
|
+
|
1349
1372
|
/**
|
1350
1373
|
* It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']
|
1351
1374
|
*
|
@@ -1436,6 +1459,8 @@ function formDataToJSON(formData) {
|
|
1436
1459
|
return null;
|
1437
1460
|
}
|
1438
1461
|
|
1462
|
+
'use strict';
|
1463
|
+
|
1439
1464
|
/**
|
1440
1465
|
* It takes a string, tries to parse it, and if it fails, it returns the stringified version
|
1441
1466
|
* of the input
|
@@ -1509,7 +1534,7 @@ const defaults = {
|
|
1509
1534
|
if ((isFileList = utils$1.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {
|
1510
1535
|
const _FormData = this.env && this.env.FormData;
|
1511
1536
|
|
1512
|
-
return toFormData(
|
1537
|
+
return toFormData$1(
|
1513
1538
|
isFileList ? {'files[]': data} : data,
|
1514
1539
|
_FormData && new _FormData(),
|
1515
1540
|
this.formSerializer
|
@@ -1543,7 +1568,7 @@ const defaults = {
|
|
1543
1568
|
} catch (e) {
|
1544
1569
|
if (strictJSONParsing) {
|
1545
1570
|
if (e.name === 'SyntaxError') {
|
1546
|
-
throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);
|
1571
|
+
throw AxiosError$1.from(e, AxiosError$1.ERR_BAD_RESPONSE, this, null, this.response);
|
1547
1572
|
}
|
1548
1573
|
throw e;
|
1549
1574
|
}
|
@@ -1586,7 +1611,7 @@ utils$1.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {
|
|
1586
1611
|
defaults.headers[method] = {};
|
1587
1612
|
});
|
1588
1613
|
|
1589
|
-
|
1614
|
+
'use strict';
|
1590
1615
|
|
1591
1616
|
// RawAxiosHeaders whose duplicates are ignored by node
|
1592
1617
|
// c.f. https://nodejs.org/api/http.html#http_message_headers
|
@@ -1640,6 +1665,8 @@ const parseHeaders = rawHeaders => {
|
|
1640
1665
|
return parsed;
|
1641
1666
|
};
|
1642
1667
|
|
1668
|
+
'use strict';
|
1669
|
+
|
1643
1670
|
const $internals = Symbol('internals');
|
1644
1671
|
|
1645
1672
|
function normalizeHeader(header) {
|
@@ -1708,7 +1735,7 @@ function buildAccessors(obj, header) {
|
|
1708
1735
|
});
|
1709
1736
|
}
|
1710
1737
|
|
1711
|
-
class AxiosHeaders {
|
1738
|
+
class AxiosHeaders$1 {
|
1712
1739
|
constructor(headers) {
|
1713
1740
|
headers && this.set(headers);
|
1714
1741
|
}
|
@@ -1921,10 +1948,10 @@ class AxiosHeaders {
|
|
1921
1948
|
}
|
1922
1949
|
}
|
1923
1950
|
|
1924
|
-
AxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);
|
1951
|
+
AxiosHeaders$1.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);
|
1925
1952
|
|
1926
1953
|
// reserved names hotfix
|
1927
|
-
utils$1.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {
|
1954
|
+
utils$1.reduceDescriptors(AxiosHeaders$1.prototype, ({value}, key) => {
|
1928
1955
|
let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`
|
1929
1956
|
return {
|
1930
1957
|
get: () => value,
|
@@ -1934,9 +1961,9 @@ utils$1.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {
|
|
1934
1961
|
}
|
1935
1962
|
});
|
1936
1963
|
|
1937
|
-
utils$1.freezeMethods(AxiosHeaders);
|
1964
|
+
utils$1.freezeMethods(AxiosHeaders$1);
|
1938
1965
|
|
1939
|
-
|
1966
|
+
'use strict';
|
1940
1967
|
|
1941
1968
|
/**
|
1942
1969
|
* Transform the data for a request or a response
|
@@ -1947,7 +1974,7 @@ const AxiosHeaders$1 = AxiosHeaders;
|
|
1947
1974
|
* @returns {*} The resulting transformed data
|
1948
1975
|
*/
|
1949
1976
|
function transformData(fns, response) {
|
1950
|
-
const config = this || defaults
|
1977
|
+
const config = this || defaults;
|
1951
1978
|
const context = response || config;
|
1952
1979
|
const headers = AxiosHeaders$1.from(context.headers);
|
1953
1980
|
let data = context.data;
|
@@ -1961,10 +1988,14 @@ function transformData(fns, response) {
|
|
1961
1988
|
return data;
|
1962
1989
|
}
|
1963
1990
|
|
1964
|
-
|
1991
|
+
'use strict';
|
1992
|
+
|
1993
|
+
function isCancel$1(value) {
|
1965
1994
|
return !!(value && value.__CANCEL__);
|
1966
1995
|
}
|
1967
1996
|
|
1997
|
+
'use strict';
|
1998
|
+
|
1968
1999
|
/**
|
1969
2000
|
* A `CanceledError` is an object that is thrown when an operation is canceled.
|
1970
2001
|
*
|
@@ -1974,16 +2005,18 @@ function isCancel(value) {
|
|
1974
2005
|
*
|
1975
2006
|
* @returns {CanceledError} The created error.
|
1976
2007
|
*/
|
1977
|
-
function CanceledError(message, config, request) {
|
2008
|
+
function CanceledError$1(message, config, request) {
|
1978
2009
|
// eslint-disable-next-line no-eq-null,eqeqeq
|
1979
|
-
AxiosError.call(this, message == null ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request);
|
2010
|
+
AxiosError$1.call(this, message == null ? 'canceled' : message, AxiosError$1.ERR_CANCELED, config, request);
|
1980
2011
|
this.name = 'CanceledError';
|
1981
2012
|
}
|
1982
2013
|
|
1983
|
-
utils$1.inherits(CanceledError, AxiosError, {
|
2014
|
+
utils$1.inherits(CanceledError$1, AxiosError$1, {
|
1984
2015
|
__CANCEL__: true
|
1985
2016
|
});
|
1986
2017
|
|
2018
|
+
'use strict';
|
2019
|
+
|
1987
2020
|
/**
|
1988
2021
|
* Resolve or reject a Promise based on response status.
|
1989
2022
|
*
|
@@ -1998,9 +2031,9 @@ function settle(resolve, reject, response) {
|
|
1998
2031
|
if (!response.status || !validateStatus || validateStatus(response.status)) {
|
1999
2032
|
resolve(response);
|
2000
2033
|
} else {
|
2001
|
-
reject(new AxiosError(
|
2034
|
+
reject(new AxiosError$1(
|
2002
2035
|
'Request failed with status code ' + response.status,
|
2003
|
-
[AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],
|
2036
|
+
[AxiosError$1.ERR_BAD_REQUEST, AxiosError$1.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],
|
2004
2037
|
response.config,
|
2005
2038
|
response.request,
|
2006
2039
|
response
|
@@ -2008,11 +2041,15 @@ function settle(resolve, reject, response) {
|
|
2008
2041
|
}
|
2009
2042
|
}
|
2010
2043
|
|
2044
|
+
'use strict';
|
2045
|
+
|
2011
2046
|
function parseProtocol(url) {
|
2012
2047
|
const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
|
2013
2048
|
return match && match[1] || '';
|
2014
2049
|
}
|
2015
2050
|
|
2051
|
+
'use strict';
|
2052
|
+
|
2016
2053
|
/**
|
2017
2054
|
* Calculate data maxRate
|
2018
2055
|
* @param {Number} [samplesCount= 10]
|
@@ -2149,6 +2186,8 @@ const progressEventDecorator = (total, throttled) => {
|
|
2149
2186
|
|
2150
2187
|
const asyncDecorator = (fn) => (...args) => utils$1.asap(() => fn(...args));
|
2151
2188
|
|
2189
|
+
'use strict';
|
2190
|
+
|
2152
2191
|
const isURLSameOrigin = platform.hasStandardBrowserEnv ?
|
2153
2192
|
|
2154
2193
|
// Standard browser envs have full support of the APIs needed to test
|
@@ -2251,6 +2290,8 @@ const cookies = platform.hasStandardBrowserEnv ?
|
|
2251
2290
|
remove() {}
|
2252
2291
|
};
|
2253
2292
|
|
2293
|
+
'use strict';
|
2294
|
+
|
2254
2295
|
/**
|
2255
2296
|
* Determines whether the specified URL is absolute
|
2256
2297
|
*
|
@@ -2265,6 +2306,8 @@ function isAbsoluteURL(url) {
|
|
2265
2306
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
|
2266
2307
|
}
|
2267
2308
|
|
2309
|
+
'use strict';
|
2310
|
+
|
2268
2311
|
/**
|
2269
2312
|
* Creates a new URL by combining the specified URLs
|
2270
2313
|
*
|
@@ -2279,6 +2322,8 @@ function combineURLs(baseURL, relativeURL) {
|
|
2279
2322
|
: baseURL;
|
2280
2323
|
}
|
2281
2324
|
|
2325
|
+
'use strict';
|
2326
|
+
|
2282
2327
|
/**
|
2283
2328
|
* Creates a new URL by combining the baseURL with the requestedURL,
|
2284
2329
|
* only when the requestedURL is not already an absolute URL.
|
@@ -2296,6 +2341,8 @@ function buildFullPath(baseURL, requestedURL) {
|
|
2296
2341
|
return requestedURL;
|
2297
2342
|
}
|
2298
2343
|
|
2344
|
+
'use strict';
|
2345
|
+
|
2299
2346
|
const headersToObject = (thing) => thing instanceof AxiosHeaders$1 ? { ...thing } : thing;
|
2300
2347
|
|
2301
2348
|
/**
|
@@ -2307,7 +2354,7 @@ const headersToObject = (thing) => thing instanceof AxiosHeaders$1 ? { ...thing
|
|
2307
2354
|
*
|
2308
2355
|
* @returns {Object} New object resulting from merging config2 to config1
|
2309
2356
|
*/
|
2310
|
-
function mergeConfig(config1, config2) {
|
2357
|
+
function mergeConfig$1(config1, config2) {
|
2311
2358
|
// eslint-disable-next-line no-param-reassign
|
2312
2359
|
config2 = config2 || {};
|
2313
2360
|
const config = {};
|
@@ -2399,7 +2446,7 @@ function mergeConfig(config1, config2) {
|
|
2399
2446
|
}
|
2400
2447
|
|
2401
2448
|
const resolveConfig = (config) => {
|
2402
|
-
const newConfig = mergeConfig({}, config);
|
2449
|
+
const newConfig = mergeConfig$1({}, config);
|
2403
2450
|
|
2404
2451
|
let {data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth} = newConfig;
|
2405
2452
|
|
@@ -2534,7 +2581,7 @@ const xhrAdapter = isXHRAdapterSupported && function (config) {
|
|
2534
2581
|
return;
|
2535
2582
|
}
|
2536
2583
|
|
2537
|
-
reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));
|
2584
|
+
reject(new AxiosError$1('Request aborted', AxiosError$1.ECONNABORTED, config, request));
|
2538
2585
|
|
2539
2586
|
// Clean up request
|
2540
2587
|
request = null;
|
@@ -2544,7 +2591,7 @@ const xhrAdapter = isXHRAdapterSupported && function (config) {
|
|
2544
2591
|
request.onerror = function handleError() {
|
2545
2592
|
// Real errors are hidden from us by the browser
|
2546
2593
|
// onerror should only fire if it's a network error
|
2547
|
-
reject(new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request));
|
2594
|
+
reject(new AxiosError$1('Network Error', AxiosError$1.ERR_NETWORK, config, request));
|
2548
2595
|
|
2549
2596
|
// Clean up request
|
2550
2597
|
request = null;
|
@@ -2557,9 +2604,9 @@ const xhrAdapter = isXHRAdapterSupported && function (config) {
|
|
2557
2604
|
if (_config.timeoutErrorMessage) {
|
2558
2605
|
timeoutErrorMessage = _config.timeoutErrorMessage;
|
2559
2606
|
}
|
2560
|
-
reject(new AxiosError(
|
2607
|
+
reject(new AxiosError$1(
|
2561
2608
|
timeoutErrorMessage,
|
2562
|
-
transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,
|
2609
|
+
transitional.clarifyTimeoutError ? AxiosError$1.ETIMEDOUT : AxiosError$1.ECONNABORTED,
|
2563
2610
|
config,
|
2564
2611
|
request));
|
2565
2612
|
|
@@ -2609,7 +2656,7 @@ const xhrAdapter = isXHRAdapterSupported && function (config) {
|
|
2609
2656
|
if (!request) {
|
2610
2657
|
return;
|
2611
2658
|
}
|
2612
|
-
reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);
|
2659
|
+
reject(!cancel || cancel.type ? new CanceledError$1(null, config, request) : cancel);
|
2613
2660
|
request.abort();
|
2614
2661
|
request = null;
|
2615
2662
|
};
|
@@ -2623,7 +2670,7 @@ const xhrAdapter = isXHRAdapterSupported && function (config) {
|
|
2623
2670
|
const protocol = parseProtocol(_config.url);
|
2624
2671
|
|
2625
2672
|
if (protocol && platform.protocols.indexOf(protocol) === -1) {
|
2626
|
-
reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config));
|
2673
|
+
reject(new AxiosError$1('Unsupported protocol ' + protocol + ':', AxiosError$1.ERR_BAD_REQUEST, config));
|
2627
2674
|
return;
|
2628
2675
|
}
|
2629
2676
|
|
@@ -2646,13 +2693,13 @@ const composeSignals = (signals, timeout) => {
|
|
2646
2693
|
aborted = true;
|
2647
2694
|
unsubscribe();
|
2648
2695
|
const err = reason instanceof Error ? reason : this.reason;
|
2649
|
-
controller.abort(err instanceof AxiosError ? err : new CanceledError(err instanceof Error ? err.message : err));
|
2696
|
+
controller.abort(err instanceof AxiosError$1 ? err : new CanceledError$1(err instanceof Error ? err.message : err));
|
2650
2697
|
}
|
2651
2698
|
};
|
2652
2699
|
|
2653
2700
|
let timer = timeout && setTimeout(() => {
|
2654
2701
|
timer = null;
|
2655
|
-
onabort(new AxiosError(`timeout ${timeout} of ms exceeded`, AxiosError.ETIMEDOUT));
|
2702
|
+
onabort(new AxiosError$1(`timeout ${timeout} of ms exceeded`, AxiosError$1.ETIMEDOUT));
|
2656
2703
|
}, timeout);
|
2657
2704
|
|
2658
2705
|
const unsubscribe = () => {
|
@@ -2676,8 +2723,6 @@ const composeSignals = (signals, timeout) => {
|
|
2676
2723
|
}
|
2677
2724
|
};
|
2678
2725
|
|
2679
|
-
const composeSignals$1 = composeSignals;
|
2680
|
-
|
2681
2726
|
const streamChunk = function* (chunk, chunkSize) {
|
2682
2727
|
let len = chunk.byteLength;
|
2683
2728
|
|
@@ -2811,7 +2856,7 @@ isFetchSupported && (((res) => {
|
|
2811
2856
|
['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach(type => {
|
2812
2857
|
!resolvers[type] && (resolvers[type] = utils$1.isFunction(res[type]) ? (res) => res[type]() :
|
2813
2858
|
(_, config) => {
|
2814
|
-
throw new AxiosError(`Response type '${type}' is not supported`, AxiosError.ERR_NOT_SUPPORT, config);
|
2859
|
+
throw new AxiosError$1(`Response type '${type}' is not supported`, AxiosError$1.ERR_NOT_SUPPORT, config);
|
2815
2860
|
});
|
2816
2861
|
});
|
2817
2862
|
})(new Response));
|
@@ -2870,7 +2915,7 @@ const fetchAdapter = isFetchSupported && (async (config) => {
|
|
2870
2915
|
|
2871
2916
|
responseType = responseType ? (responseType + '').toLowerCase() : 'text';
|
2872
2917
|
|
2873
|
-
let composedSignal = composeSignals
|
2918
|
+
let composedSignal = composeSignals([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
|
2874
2919
|
|
2875
2920
|
let request;
|
2876
2921
|
|
@@ -2972,14 +3017,14 @@ const fetchAdapter = isFetchSupported && (async (config) => {
|
|
2972
3017
|
|
2973
3018
|
if (err && err.name === 'TypeError' && /fetch/i.test(err.message)) {
|
2974
3019
|
throw Object.assign(
|
2975
|
-
new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request),
|
3020
|
+
new AxiosError$1('Network Error', AxiosError$1.ERR_NETWORK, config, request),
|
2976
3021
|
{
|
2977
3022
|
cause: err.cause || err
|
2978
3023
|
}
|
2979
3024
|
)
|
2980
3025
|
}
|
2981
3026
|
|
2982
|
-
throw AxiosError.from(err, err && err.code, config, request);
|
3027
|
+
throw AxiosError$1.from(err, err && err.code, config, request);
|
2983
3028
|
}
|
2984
3029
|
});
|
2985
3030
|
|
@@ -3024,7 +3069,7 @@ const adapters = {
|
|
3024
3069
|
adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
|
3025
3070
|
|
3026
3071
|
if (adapter === undefined) {
|
3027
|
-
throw new AxiosError(`Unknown adapter '${id}'`);
|
3072
|
+
throw new AxiosError$1(`Unknown adapter '${id}'`);
|
3028
3073
|
}
|
3029
3074
|
}
|
3030
3075
|
|
@@ -3046,7 +3091,7 @@ const adapters = {
|
|
3046
3091
|
(reasons.length > 1 ? 'since :\n' + reasons.map(renderReason).join('\n') : ' ' + renderReason(reasons[0])) :
|
3047
3092
|
'as no adapter specified';
|
3048
3093
|
|
3049
|
-
throw new AxiosError(
|
3094
|
+
throw new AxiosError$1(
|
3050
3095
|
`There is no suitable adapter to dispatch the request ` + s,
|
3051
3096
|
'ERR_NOT_SUPPORT'
|
3052
3097
|
);
|
@@ -3057,6 +3102,8 @@ const adapters = {
|
|
3057
3102
|
adapters: knownAdapters
|
3058
3103
|
};
|
3059
3104
|
|
3105
|
+
'use strict';
|
3106
|
+
|
3060
3107
|
/**
|
3061
3108
|
* Throws a `CanceledError` if cancellation has been requested.
|
3062
3109
|
*
|
@@ -3070,7 +3117,7 @@ function throwIfCancellationRequested(config) {
|
|
3070
3117
|
}
|
3071
3118
|
|
3072
3119
|
if (config.signal && config.signal.aborted) {
|
3073
|
-
throw new CanceledError(null, config);
|
3120
|
+
throw new CanceledError$1(null, config);
|
3074
3121
|
}
|
3075
3122
|
}
|
3076
3123
|
|
@@ -3096,7 +3143,7 @@ function dispatchRequest(config) {
|
|
3096
3143
|
config.headers.setContentType('application/x-www-form-urlencoded', false);
|
3097
3144
|
}
|
3098
3145
|
|
3099
|
-
const adapter = adapters.getAdapter(config.adapter || defaults
|
3146
|
+
const adapter = adapters.getAdapter(config.adapter || defaults.adapter);
|
3100
3147
|
|
3101
3148
|
return adapter(config).then(function onAdapterResolution(response) {
|
3102
3149
|
throwIfCancellationRequested(config);
|
@@ -3112,7 +3159,7 @@ function dispatchRequest(config) {
|
|
3112
3159
|
|
3113
3160
|
return response;
|
3114
3161
|
}, function onAdapterRejection(reason) {
|
3115
|
-
if (!isCancel(reason)) {
|
3162
|
+
if (!isCancel$1(reason)) {
|
3116
3163
|
throwIfCancellationRequested(config);
|
3117
3164
|
|
3118
3165
|
// Transform response data
|
@@ -3130,7 +3177,9 @@ function dispatchRequest(config) {
|
|
3130
3177
|
});
|
3131
3178
|
}
|
3132
3179
|
|
3133
|
-
const VERSION = "1.7.7";
|
3180
|
+
const VERSION$1 = "1.7.7";
|
3181
|
+
|
3182
|
+
'use strict';
|
3134
3183
|
|
3135
3184
|
const validators$1 = {};
|
3136
3185
|
|
@@ -3154,15 +3203,15 @@ const deprecatedWarnings = {};
|
|
3154
3203
|
*/
|
3155
3204
|
validators$1.transitional = function transitional(validator, version, message) {
|
3156
3205
|
function formatMessage(opt, desc) {
|
3157
|
-
return '[Axios v' + VERSION + '] Transitional option \'' + opt + '\'' + desc + (message ? '. ' + message : '');
|
3206
|
+
return '[Axios v' + VERSION$1 + '] Transitional option \'' + opt + '\'' + desc + (message ? '. ' + message : '');
|
3158
3207
|
}
|
3159
3208
|
|
3160
3209
|
// eslint-disable-next-line func-names
|
3161
3210
|
return (value, opt, opts) => {
|
3162
3211
|
if (validator === false) {
|
3163
|
-
throw new AxiosError(
|
3212
|
+
throw new AxiosError$1(
|
3164
3213
|
formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),
|
3165
|
-
AxiosError.ERR_DEPRECATED
|
3214
|
+
AxiosError$1.ERR_DEPRECATED
|
3166
3215
|
);
|
3167
3216
|
}
|
3168
3217
|
|
@@ -3193,7 +3242,7 @@ validators$1.transitional = function transitional(validator, version, message) {
|
|
3193
3242
|
|
3194
3243
|
function assertOptions(options, schema, allowUnknown) {
|
3195
3244
|
if (typeof options !== 'object') {
|
3196
|
-
throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE);
|
3245
|
+
throw new AxiosError$1('options must be an object', AxiosError$1.ERR_BAD_OPTION_VALUE);
|
3197
3246
|
}
|
3198
3247
|
const keys = Object.keys(options);
|
3199
3248
|
let i = keys.length;
|
@@ -3204,12 +3253,12 @@ function assertOptions(options, schema, allowUnknown) {
|
|
3204
3253
|
const value = options[opt];
|
3205
3254
|
const result = value === undefined || validator(value, opt, options);
|
3206
3255
|
if (result !== true) {
|
3207
|
-
throw new AxiosError('option ' + opt + ' must be ' + result, AxiosError.ERR_BAD_OPTION_VALUE);
|
3256
|
+
throw new AxiosError$1('option ' + opt + ' must be ' + result, AxiosError$1.ERR_BAD_OPTION_VALUE);
|
3208
3257
|
}
|
3209
3258
|
continue;
|
3210
3259
|
}
|
3211
3260
|
if (allowUnknown !== true) {
|
3212
|
-
throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION);
|
3261
|
+
throw new AxiosError$1('Unknown option ' + opt, AxiosError$1.ERR_BAD_OPTION);
|
3213
3262
|
}
|
3214
3263
|
}
|
3215
3264
|
}
|
@@ -3219,6 +3268,8 @@ const validator = {
|
|
3219
3268
|
validators: validators$1
|
3220
3269
|
};
|
3221
3270
|
|
3271
|
+
'use strict';
|
3272
|
+
|
3222
3273
|
const validators = validator.validators;
|
3223
3274
|
|
3224
3275
|
/**
|
@@ -3228,12 +3279,12 @@ const validators = validator.validators;
|
|
3228
3279
|
*
|
3229
3280
|
* @return {Axios} A new instance of Axios
|
3230
3281
|
*/
|
3231
|
-
class Axios {
|
3282
|
+
class Axios$1 {
|
3232
3283
|
constructor(instanceConfig) {
|
3233
3284
|
this.defaults = instanceConfig;
|
3234
3285
|
this.interceptors = {
|
3235
|
-
request: new InterceptorManager
|
3236
|
-
response: new InterceptorManager
|
3286
|
+
request: new InterceptorManager(),
|
3287
|
+
response: new InterceptorManager()
|
3237
3288
|
};
|
3238
3289
|
}
|
3239
3290
|
|
@@ -3282,7 +3333,7 @@ class Axios {
|
|
3282
3333
|
config = configOrUrl || {};
|
3283
3334
|
}
|
3284
3335
|
|
3285
|
-
config = mergeConfig(this.defaults, config);
|
3336
|
+
config = mergeConfig$1(this.defaults, config);
|
3286
3337
|
|
3287
3338
|
const {transitional, paramsSerializer, headers} = config;
|
3288
3339
|
|
@@ -3396,7 +3447,7 @@ class Axios {
|
|
3396
3447
|
}
|
3397
3448
|
|
3398
3449
|
getUri(config) {
|
3399
|
-
config = mergeConfig(this.defaults, config);
|
3450
|
+
config = mergeConfig$1(this.defaults, config);
|
3400
3451
|
const fullPath = buildFullPath(config.baseURL, config.url);
|
3401
3452
|
return buildURL(fullPath, config.params, config.paramsSerializer);
|
3402
3453
|
}
|
@@ -3405,8 +3456,8 @@ class Axios {
|
|
3405
3456
|
// Provide aliases for supported request methods
|
3406
3457
|
utils$1.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
|
3407
3458
|
/*eslint func-names:0*/
|
3408
|
-
Axios.prototype[method] = function(url, config) {
|
3409
|
-
return this.request(mergeConfig(config || {}, {
|
3459
|
+
Axios$1.prototype[method] = function(url, config) {
|
3460
|
+
return this.request(mergeConfig$1(config || {}, {
|
3410
3461
|
method,
|
3411
3462
|
url,
|
3412
3463
|
data: (config || {}).data
|
@@ -3419,7 +3470,7 @@ utils$1.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method)
|
|
3419
3470
|
|
3420
3471
|
function generateHTTPMethod(isForm) {
|
3421
3472
|
return function httpMethod(url, data, config) {
|
3422
|
-
return this.request(mergeConfig(config || {}, {
|
3473
|
+
return this.request(mergeConfig$1(config || {}, {
|
3423
3474
|
method,
|
3424
3475
|
headers: isForm ? {
|
3425
3476
|
'Content-Type': 'multipart/form-data'
|
@@ -3430,12 +3481,12 @@ utils$1.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method)
|
|
3430
3481
|
};
|
3431
3482
|
}
|
3432
3483
|
|
3433
|
-
Axios.prototype[method] = generateHTTPMethod();
|
3484
|
+
Axios$1.prototype[method] = generateHTTPMethod();
|
3434
3485
|
|
3435
|
-
Axios.prototype[method + 'Form'] = generateHTTPMethod(true);
|
3486
|
+
Axios$1.prototype[method + 'Form'] = generateHTTPMethod(true);
|
3436
3487
|
});
|
3437
3488
|
|
3438
|
-
|
3489
|
+
'use strict';
|
3439
3490
|
|
3440
3491
|
/**
|
3441
3492
|
* A `CancelToken` is an object that can be used to request cancellation of an operation.
|
@@ -3444,7 +3495,7 @@ const Axios$1 = Axios;
|
|
3444
3495
|
*
|
3445
3496
|
* @returns {CancelToken}
|
3446
3497
|
*/
|
3447
|
-
class CancelToken {
|
3498
|
+
class CancelToken$1 {
|
3448
3499
|
constructor(executor) {
|
3449
3500
|
if (typeof executor !== 'function') {
|
3450
3501
|
throw new TypeError('executor must be a function.');
|
@@ -3492,7 +3543,7 @@ class CancelToken {
|
|
3492
3543
|
return;
|
3493
3544
|
}
|
3494
3545
|
|
3495
|
-
token.reason = new CanceledError(message, config, request);
|
3546
|
+
token.reason = new CanceledError$1(message, config, request);
|
3496
3547
|
resolvePromise(token.reason);
|
3497
3548
|
});
|
3498
3549
|
}
|
@@ -3557,7 +3608,7 @@ class CancelToken {
|
|
3557
3608
|
*/
|
3558
3609
|
static source() {
|
3559
3610
|
let cancel;
|
3560
|
-
const token = new CancelToken(function executor(c) {
|
3611
|
+
const token = new CancelToken$1(function executor(c) {
|
3561
3612
|
cancel = c;
|
3562
3613
|
});
|
3563
3614
|
return {
|
@@ -3567,7 +3618,7 @@ class CancelToken {
|
|
3567
3618
|
}
|
3568
3619
|
}
|
3569
3620
|
|
3570
|
-
|
3621
|
+
'use strict';
|
3571
3622
|
|
3572
3623
|
/**
|
3573
3624
|
* Syntactic sugar for invoking a function and expanding an array for arguments.
|
@@ -3590,12 +3641,14 @@ const CancelToken$1 = CancelToken;
|
|
3590
3641
|
*
|
3591
3642
|
* @returns {Function}
|
3592
3643
|
*/
|
3593
|
-
function spread(callback) {
|
3644
|
+
function spread$1(callback) {
|
3594
3645
|
return function wrap(arr) {
|
3595
3646
|
return callback.apply(null, arr);
|
3596
3647
|
};
|
3597
3648
|
}
|
3598
3649
|
|
3650
|
+
'use strict';
|
3651
|
+
|
3599
3652
|
/**
|
3600
3653
|
* Determines whether the payload is an error thrown by Axios
|
3601
3654
|
*
|
@@ -3603,11 +3656,11 @@ function spread(callback) {
|
|
3603
3656
|
*
|
3604
3657
|
* @returns {boolean} True if the payload is an error thrown by Axios, otherwise false
|
3605
3658
|
*/
|
3606
|
-
function isAxiosError(payload) {
|
3659
|
+
function isAxiosError$1(payload) {
|
3607
3660
|
return utils$1.isObject(payload) && (payload.isAxiosError === true);
|
3608
3661
|
}
|
3609
3662
|
|
3610
|
-
const HttpStatusCode = {
|
3663
|
+
const HttpStatusCode$1 = {
|
3611
3664
|
Continue: 100,
|
3612
3665
|
SwitchingProtocols: 101,
|
3613
3666
|
Processing: 102,
|
@@ -3673,11 +3726,11 @@ const HttpStatusCode = {
|
|
3673
3726
|
NetworkAuthenticationRequired: 511,
|
3674
3727
|
};
|
3675
3728
|
|
3676
|
-
Object.entries(HttpStatusCode).forEach(([key, value]) => {
|
3677
|
-
HttpStatusCode[value] = key;
|
3729
|
+
Object.entries(HttpStatusCode$1).forEach(([key, value]) => {
|
3730
|
+
HttpStatusCode$1[value] = key;
|
3678
3731
|
});
|
3679
3732
|
|
3680
|
-
|
3733
|
+
'use strict';
|
3681
3734
|
|
3682
3735
|
/**
|
3683
3736
|
* Create an instance of Axios
|
@@ -3698,27 +3751,27 @@ function createInstance(defaultConfig) {
|
|
3698
3751
|
|
3699
3752
|
// Factory for creating new instances
|
3700
3753
|
instance.create = function create(instanceConfig) {
|
3701
|
-
return createInstance(mergeConfig(defaultConfig, instanceConfig));
|
3754
|
+
return createInstance(mergeConfig$1(defaultConfig, instanceConfig));
|
3702
3755
|
};
|
3703
3756
|
|
3704
3757
|
return instance;
|
3705
3758
|
}
|
3706
3759
|
|
3707
3760
|
// Create the default instance to be exported
|
3708
|
-
const axios = createInstance(defaults
|
3761
|
+
const axios = createInstance(defaults);
|
3709
3762
|
|
3710
3763
|
// Expose Axios class to allow class inheritance
|
3711
3764
|
axios.Axios = Axios$1;
|
3712
3765
|
|
3713
3766
|
// Expose Cancel & CancelToken
|
3714
|
-
axios.CanceledError = CanceledError;
|
3767
|
+
axios.CanceledError = CanceledError$1;
|
3715
3768
|
axios.CancelToken = CancelToken$1;
|
3716
|
-
axios.isCancel = isCancel;
|
3717
|
-
axios.VERSION = VERSION;
|
3718
|
-
axios.toFormData = toFormData;
|
3769
|
+
axios.isCancel = isCancel$1;
|
3770
|
+
axios.VERSION = VERSION$1;
|
3771
|
+
axios.toFormData = toFormData$1;
|
3719
3772
|
|
3720
3773
|
// Expose AxiosError class
|
3721
|
-
axios.AxiosError = AxiosError;
|
3774
|
+
axios.AxiosError = AxiosError$1;
|
3722
3775
|
|
3723
3776
|
// alias for CanceledError for backward compatibility
|
3724
3777
|
axios.Cancel = axios.CanceledError;
|
@@ -3728,13 +3781,13 @@ axios.all = function all(promises) {
|
|
3728
3781
|
return Promise.all(promises);
|
3729
3782
|
};
|
3730
3783
|
|
3731
|
-
axios.spread = spread;
|
3784
|
+
axios.spread = spread$1;
|
3732
3785
|
|
3733
3786
|
// Expose isAxiosError
|
3734
|
-
axios.isAxiosError = isAxiosError;
|
3787
|
+
axios.isAxiosError = isAxiosError$1;
|
3735
3788
|
|
3736
3789
|
// Expose mergeConfig
|
3737
|
-
axios.mergeConfig = mergeConfig;
|
3790
|
+
axios.mergeConfig = mergeConfig$1;
|
3738
3791
|
|
3739
3792
|
axios.AxiosHeaders = AxiosHeaders$1;
|
3740
3793
|
|
@@ -3746,14 +3799,36 @@ axios.HttpStatusCode = HttpStatusCode$1;
|
|
3746
3799
|
|
3747
3800
|
axios.default = axios;
|
3748
3801
|
|
3749
|
-
//
|
3750
|
-
|
3802
|
+
// This module is intended to unwrap Axios default export as named.
|
3803
|
+
// Keep top-level export same with static properties
|
3804
|
+
// so that it can keep same with es module or cjs
|
3805
|
+
const {
|
3806
|
+
Axios,
|
3807
|
+
AxiosError,
|
3808
|
+
CanceledError,
|
3809
|
+
isCancel,
|
3810
|
+
CancelToken,
|
3811
|
+
VERSION,
|
3812
|
+
all,
|
3813
|
+
Cancel,
|
3814
|
+
isAxiosError,
|
3815
|
+
spread,
|
3816
|
+
toFormData,
|
3817
|
+
AxiosHeaders,
|
3818
|
+
HttpStatusCode,
|
3819
|
+
formToJSON,
|
3820
|
+
getAdapter,
|
3821
|
+
mergeConfig
|
3822
|
+
} = axios;
|
3751
3823
|
|
3752
3824
|
const CRM_BONUS_API_URL = "https://crmbonus-service-staging-d15ba5377115.herokuapp.com"; //"https://typically-workable-perch.ngrok-free.app"; // "http://localhost:3500";
|
3825
|
+
const CRM_BONUS_ID_LOJA = "undefined";
|
3826
|
+
const CRM_BONUS_CODEMPRESA = "undefined";
|
3827
|
+
const CRM_BONUS_AUTHORIZATION = "undefined";
|
3753
3828
|
|
3754
3829
|
class CrmBonusService {
|
3755
3830
|
constructor() {
|
3756
|
-
this.axiosInstance = axios
|
3831
|
+
this.axiosInstance = axios.create({
|
3757
3832
|
baseURL: CRM_BONUS_API_URL,
|
3758
3833
|
headers: {
|
3759
3834
|
'Content-Type': 'application/json',
|
@@ -3767,7 +3842,7 @@ class CrmBonusService {
|
|
3767
3842
|
return response.data;
|
3768
3843
|
}
|
3769
3844
|
async updateOrder(cartId, orderId) {
|
3770
|
-
const response = await this.axiosInstance.
|
3845
|
+
const response = await this.axiosInstance.put(`/api/update_cart/${cartId}`, { orderId }, { headers: { 'Content-Type': 'application/json' } });
|
3771
3846
|
console.log('response', response.data);
|
3772
3847
|
}
|
3773
3848
|
async sendPin(phone, store) {
|
@@ -3790,4 +3865,4 @@ class CrmBonusService {
|
|
3790
3865
|
|
3791
3866
|
export { CrmBonusService as C };
|
3792
3867
|
|
3793
|
-
//# sourceMappingURL=
|
3868
|
+
//# sourceMappingURL=crmbonus.service-72c64bc3.js.map
|