@rebilly/instruments 16.168.2 → 16.168.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -220,7 +220,7 @@ const arrayInstrumentations = {
220
220
  return apply(this, "every", fn, thisArg, void 0, arguments);
221
221
  },
222
222
  filter(fn, thisArg) {
223
- return apply(this, "filter", fn, thisArg, (v2) => v2.map(toReactive), arguments);
223
+ return apply(this, "filter", fn, thisArg, (v) => v.map(toReactive), arguments);
224
224
  },
225
225
  find(fn, thisArg) {
226
226
  return apply(this, "find", fn, thisArg, toReactive, arguments);
@@ -510,7 +510,7 @@ class ReadonlyReactiveHandler extends BaseReactiveHandler {
510
510
  const mutableHandlers = /* @__PURE__ */ new MutableReactiveHandler();
511
511
  const readonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler();
512
512
  const toShallow = (value) => value;
513
- const getProto = (v2) => Reflect.getPrototypeOf(v2);
513
+ const getProto = (v) => Reflect.getPrototypeOf(v);
514
514
  function createIterableMethod(method, isReadonly2, isShallow2) {
515
515
  return function(...args) {
516
516
  const target = this["__v_raw"];
@@ -2266,6 +2266,23 @@ function bind(fn, thisArg) {
2266
2266
  const { toString } = Object.prototype;
2267
2267
  const { getPrototypeOf } = Object;
2268
2268
  const { iterator, toStringTag } = Symbol;
2269
+ const hasOwnProperty = (({ hasOwnProperty: hasOwnProperty2 }) => (obj, prop) => hasOwnProperty2.call(obj, prop))(Object.prototype);
2270
+ const hasOwnInPrototypeChain = (thing, prop) => {
2271
+ let obj = thing;
2272
+ const seen = [];
2273
+ while (obj != null && obj !== Object.prototype) {
2274
+ if (seen.indexOf(obj) !== -1) {
2275
+ return false;
2276
+ }
2277
+ seen.push(obj);
2278
+ if (hasOwnProperty(obj, prop)) {
2279
+ return true;
2280
+ }
2281
+ obj = getPrototypeOf(obj);
2282
+ }
2283
+ return false;
2284
+ };
2285
+ const getSafeProp = (obj, prop) => obj != null && hasOwnInPrototypeChain(obj, prop) ? obj[prop] : void 0;
2269
2286
  const kindOf = /* @__PURE__ */ ((cache) => (thing) => {
2270
2287
  const str = toString.call(thing);
2271
2288
  return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
@@ -2296,11 +2313,14 @@ const isNumber = typeOfTest("number");
2296
2313
  const isObject$1 = (thing) => thing !== null && typeof thing === "object";
2297
2314
  const isBoolean = (thing) => thing === true || thing === false;
2298
2315
  const isPlainObject = (val) => {
2299
- if (kindOf(val) !== "object") {
2316
+ if (!isObject$1(val)) {
2300
2317
  return false;
2301
2318
  }
2302
2319
  const prototype2 = getPrototypeOf(val);
2303
- return (prototype2 === null || prototype2 === Object.prototype || Object.getPrototypeOf(prototype2) === null) && !(toStringTag in val) && !(iterator in val);
2320
+ return (prototype2 === null || prototype2 === Object.prototype || getPrototypeOf(prototype2) === null) && // Treat any genuine (non-Object.prototype-polluted) Symbol.toStringTag or
2321
+ // Symbol.iterator as evidence the value is a tagged/iterable type rather
2322
+ // than a plain object, while ignoring keys injected onto Object.prototype.
2323
+ !hasOwnInPrototypeChain(val, toStringTag) && !hasOwnInPrototypeChain(val, iterator);
2304
2324
  };
2305
2325
  const isEmptyObject = (val) => {
2306
2326
  if (!isObject$1(val) || isBuffer(val)) {
@@ -2328,8 +2348,8 @@ function getGlobal() {
2328
2348
  if (typeof global !== "undefined") return global;
2329
2349
  return {};
2330
2350
  }
2331
- const G$2 = getGlobal();
2332
- const FormDataCtor = typeof G$2.FormData !== "undefined" ? G$2.FormData : void 0;
2351
+ const G$1 = getGlobal();
2352
+ const FormDataCtor = typeof G$1.FormData !== "undefined" ? G$1.FormData : void 0;
2333
2353
  const isFormData = (thing) => {
2334
2354
  if (!thing) return false;
2335
2355
  if (FormDataCtor && thing instanceof FormDataCtor) return true;
@@ -2553,7 +2573,6 @@ const toCamelCase = (str) => {
2553
2573
  return p1.toUpperCase() + p2;
2554
2574
  });
2555
2575
  };
2556
- const hasOwnProperty = (({ hasOwnProperty: hasOwnProperty2 }) => (obj, prop) => hasOwnProperty2.call(obj, prop))(Object.prototype);
2557
2576
  const { propertyIsEnumerable } = Object.prototype;
2558
2577
  const isRegExp = kindOfTest("RegExp");
2559
2578
  const reduceDescriptors = (obj, reducer) => {
@@ -2653,6 +2672,7 @@ const _setImmediate = ((setImmediateSupported, postMessageSupported) => {
2653
2672
  })(typeof setImmediate === "function", isFunction$1(_global.postMessage));
2654
2673
  const asap = typeof queueMicrotask !== "undefined" ? queueMicrotask.bind(_global) : typeof process !== "undefined" && process.nextTick || _setImmediate;
2655
2674
  const isIterable = (thing) => thing != null && isFunction$1(thing[iterator]);
2675
+ const isSafeIterable = (thing) => thing != null && hasOwnInPrototypeChain(thing, iterator) && isIterable(thing);
2656
2676
  const utils$1 = {
2657
2677
  isArray,
2658
2678
  isArrayBuffer,
@@ -2698,6 +2718,8 @@ const utils$1 = {
2698
2718
  hasOwnProperty,
2699
2719
  hasOwnProp: hasOwnProperty,
2700
2720
  // an alias to avoid ESLint no-prototype-builtins detection
2721
+ hasOwnInPrototypeChain,
2722
+ getSafeProp,
2701
2723
  reduceDescriptors,
2702
2724
  freezeMethods,
2703
2725
  toObjectSet,
@@ -2713,7 +2735,8 @@ const utils$1 = {
2713
2735
  isThenable,
2714
2736
  setImmediate: _setImmediate,
2715
2737
  asap,
2716
- isIterable
2738
+ isIterable,
2739
+ isSafeIterable
2717
2740
  };
2718
2741
  const ignoreDuplicateOf = utils$1.toObjectSet([
2719
2742
  "age",
@@ -2830,7 +2853,7 @@ function matchHeaderValue(context, value, header, filter2, isHeaderNameFilter) {
2830
2853
  }
2831
2854
  }
2832
2855
  function formatHeader(header) {
2833
- return header.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (w, char, str) => {
2856
+ return header.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (w2, char, str) => {
2834
2857
  return char.toUpperCase() + str;
2835
2858
  });
2836
2859
  }
@@ -2869,13 +2892,19 @@ let AxiosHeaders$1 = class AxiosHeaders {
2869
2892
  setHeaders(header, valueOrRewrite);
2870
2893
  } else if (utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
2871
2894
  setHeaders(parseHeaders(header), valueOrRewrite);
2872
- } else if (utils$1.isObject(header) && utils$1.isIterable(header)) {
2873
- let obj = {}, dest, key;
2895
+ } else if (utils$1.isObject(header) && utils$1.isSafeIterable(header)) {
2896
+ let obj = /* @__PURE__ */ Object.create(null), dest, key;
2874
2897
  for (const entry of header) {
2875
2898
  if (!utils$1.isArray(entry)) {
2876
2899
  throw new TypeError("Object iterator must return a key-value pair");
2877
2900
  }
2878
- obj[key = entry[0]] = (dest = obj[key]) ? utils$1.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]] : entry[1];
2901
+ key = entry[0];
2902
+ if (utils$1.hasOwnProp(obj, key)) {
2903
+ dest = obj[key];
2904
+ obj[key] = utils$1.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]];
2905
+ } else {
2906
+ obj[key] = entry[1];
2907
+ }
2879
2908
  }
2880
2909
  setHeaders(obj, valueOrRewrite);
2881
2910
  } else {
@@ -3058,8 +3087,8 @@ function redactConfig(config, redactKeys) {
3058
3087
  let result;
3059
3088
  if (utils$1.isArray(source)) {
3060
3089
  result = [];
3061
- source.forEach((v2, i) => {
3062
- const reducedValue = visit(v2);
3090
+ source.forEach((v, i) => {
3091
+ const reducedValue = visit(v);
3063
3092
  if (!utils$1.isUndefined(reducedValue)) {
3064
3093
  result[i] = reducedValue;
3065
3094
  }
@@ -3163,6 +3192,7 @@ AxiosError$1.ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT";
3163
3192
  AxiosError$1.ERR_INVALID_URL = "ERR_INVALID_URL";
3164
3193
  AxiosError$1.ERR_FORM_DATA_DEPTH_EXCEEDED = "ERR_FORM_DATA_DEPTH_EXCEEDED";
3165
3194
  const httpAdapter = null;
3195
+ const DEFAULT_FORM_DATA_MAX_DEPTH = 100;
3166
3196
  function isVisitable(thing) {
3167
3197
  return utils$1.isPlainObject(thing) || utils$1.isArray(thing);
3168
3198
  }
@@ -3204,8 +3234,9 @@ function toFormData$1(obj, formData, options) {
3204
3234
  const dots = options.dots;
3205
3235
  const indexes = options.indexes;
3206
3236
  const _Blob = options.Blob || typeof Blob !== "undefined" && Blob;
3207
- const maxDepth = options.maxDepth === void 0 ? 100 : options.maxDepth;
3237
+ const maxDepth = options.maxDepth === void 0 ? DEFAULT_FORM_DATA_MAX_DEPTH : options.maxDepth;
3208
3238
  const useBlob = _Blob && utils$1.isSpecCompliantForm(formData);
3239
+ const stack = [];
3209
3240
  if (!utils$1.isFunction(visitor)) {
3210
3241
  throw new TypeError("visitor must be a function");
3211
3242
  }
@@ -3225,6 +3256,31 @@ function toFormData$1(obj, formData, options) {
3225
3256
  }
3226
3257
  return value;
3227
3258
  }
3259
+ function throwIfMaxDepthExceeded(depth) {
3260
+ if (depth > maxDepth) {
3261
+ throw new AxiosError$1(
3262
+ "Object is too deeply nested (" + depth + " levels). Max depth: " + maxDepth,
3263
+ AxiosError$1.ERR_FORM_DATA_DEPTH_EXCEEDED
3264
+ );
3265
+ }
3266
+ }
3267
+ function stringifyWithDepthLimit(value, depth) {
3268
+ if (maxDepth === Infinity) {
3269
+ return JSON.stringify(value);
3270
+ }
3271
+ const ancestors = [];
3272
+ return JSON.stringify(value, function limitDepth(_key, currentValue) {
3273
+ if (!utils$1.isObject(currentValue)) {
3274
+ return currentValue;
3275
+ }
3276
+ while (ancestors.length && ancestors[ancestors.length - 1] !== this) {
3277
+ ancestors.pop();
3278
+ }
3279
+ ancestors.push(currentValue);
3280
+ throwIfMaxDepthExceeded(depth + ancestors.length - 1);
3281
+ return currentValue;
3282
+ });
3283
+ }
3228
3284
  function defaultVisitor(value, key, path) {
3229
3285
  let arr = value;
3230
3286
  if (utils$1.isReactNative(formData) && utils$1.isReactNativeBlob(value)) {
@@ -3234,7 +3290,7 @@ function toFormData$1(obj, formData, options) {
3234
3290
  if (value && !path && typeof value === "object") {
3235
3291
  if (utils$1.endsWith(key, "{}")) {
3236
3292
  key = metaTokens ? key : key.slice(0, -2);
3237
- value = JSON.stringify(value);
3293
+ value = stringifyWithDepthLimit(value, 1);
3238
3294
  } else if (utils$1.isArray(value) && isFlatArray(value) || (utils$1.isFileList(value) || utils$1.endsWith(key, "[]")) && (arr = utils$1.toArray(value))) {
3239
3295
  key = removeBrackets(key);
3240
3296
  arr.forEach(function each(el, index2) {
@@ -3253,7 +3309,6 @@ function toFormData$1(obj, formData, options) {
3253
3309
  formData.append(renderKey(path, key, dots), convertValue(value));
3254
3310
  return false;
3255
3311
  }
3256
- const stack = [];
3257
3312
  const exposedHelpers = Object.assign(predicates, {
3258
3313
  defaultVisitor,
3259
3314
  convertValue,
@@ -3261,12 +3316,7 @@ function toFormData$1(obj, formData, options) {
3261
3316
  });
3262
3317
  function build(value, path, depth = 0) {
3263
3318
  if (utils$1.isUndefined(value)) return;
3264
- if (depth > maxDepth) {
3265
- throw new AxiosError$1(
3266
- "Object is too deeply nested (" + depth + " levels). Max depth: " + maxDepth,
3267
- AxiosError$1.ERR_FORM_DATA_DEPTH_EXCEEDED
3268
- );
3269
- }
3319
+ throwIfMaxDepthExceeded(depth);
3270
3320
  if (stack.indexOf(value) !== -1) {
3271
3321
  throw new Error("Circular reference detected in " + path.join("."));
3272
3322
  }
@@ -3321,11 +3371,11 @@ function buildURL(url, params, options) {
3321
3371
  if (!params) {
3322
3372
  return url;
3323
3373
  }
3324
- const _encode = options && options.encode || encode;
3325
3374
  const _options = utils$1.isFunction(options) ? {
3326
3375
  serialize: options
3327
3376
  } : options;
3328
- const serializeFn = _options && _options.serialize;
3377
+ const _encode = utils$1.getSafeProp(_options, "encode") || encode;
3378
+ const serializeFn = utils$1.getSafeProp(_options, "serialize");
3329
3379
  let serializedParams;
3330
3380
  if (serializeFn) {
3331
3381
  serializedParams = serializeFn(params, _options);
@@ -3408,7 +3458,8 @@ const transitionalDefaults = {
3408
3458
  forcedJSONParsing: true,
3409
3459
  clarifyTimeoutError: false,
3410
3460
  legacyInterceptorReqResOrdering: true,
3411
- advertiseZstdAcceptEncoding: false
3461
+ advertiseZstdAcceptEncoding: false,
3462
+ validateStatusUndefinedResolves: true
3412
3463
  };
3413
3464
  const URLSearchParams$1 = typeof URLSearchParams !== "undefined" ? URLSearchParams : AxiosURLSearchParams;
3414
3465
  const FormData$1 = typeof FormData !== "undefined" ? FormData : null;
@@ -3454,10 +3505,24 @@ function toURLEncodedForm(data, options) {
3454
3505
  ...options
3455
3506
  });
3456
3507
  }
3508
+ const MAX_DEPTH = DEFAULT_FORM_DATA_MAX_DEPTH;
3509
+ function throwIfDepthExceeded(index2) {
3510
+ if (index2 > MAX_DEPTH) {
3511
+ throw new AxiosError$1(
3512
+ "FormData field is too deeply nested (" + index2 + " levels). Max depth: " + MAX_DEPTH,
3513
+ AxiosError$1.ERR_FORM_DATA_DEPTH_EXCEEDED
3514
+ );
3515
+ }
3516
+ }
3457
3517
  function parsePropPath(name) {
3458
- return utils$1.matchAll(/\w+|\[(\w*)]/g, name).map((match) => {
3459
- return match[0] === "[]" ? "" : match[1] || match[0];
3460
- });
3518
+ const path = [];
3519
+ const pattern2 = /\w+|\[(\w*)]/g;
3520
+ let match;
3521
+ while ((match = pattern2.exec(name)) !== null) {
3522
+ throwIfDepthExceeded(path.length);
3523
+ path.push(match[0] === "[]" ? "" : match[1] || match[0]);
3524
+ }
3525
+ return path;
3461
3526
  }
3462
3527
  function arrayToObject(arr) {
3463
3528
  const obj = {};
@@ -3473,6 +3538,7 @@ function arrayToObject(arr) {
3473
3538
  }
3474
3539
  function formDataToJSON(formData) {
3475
3540
  function buildPath(path, value, target, index2) {
3541
+ throwIfDepthExceeded(index2);
3476
3542
  let name = path[index2++];
3477
3543
  if (name === "__proto__") return true;
3478
3544
  const isNumericKey = Number.isFinite(+name);
@@ -3837,9 +3903,32 @@ function isAbsoluteURL(url) {
3837
3903
  function combineURLs(baseURL, relativeURL) {
3838
3904
  return relativeURL ? baseURL.replace(/\/?\/$/, "") + "/" + relativeURL.replace(/^\/+/, "") : baseURL;
3839
3905
  }
3840
- function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
3906
+ const malformedHttpProtocol = /^https?:(?!\/\/)/i;
3907
+ const httpProtocolControlCharacters = /[\t\n\r]/g;
3908
+ function stripLeadingC0ControlOrSpace(url) {
3909
+ let i = 0;
3910
+ while (i < url.length && url.charCodeAt(i) <= 32) {
3911
+ i++;
3912
+ }
3913
+ return url.slice(i);
3914
+ }
3915
+ function normalizeURLForProtocolCheck(url) {
3916
+ return stripLeadingC0ControlOrSpace(url).replace(httpProtocolControlCharacters, "");
3917
+ }
3918
+ function assertValidHttpProtocolURL(url, config) {
3919
+ if (typeof url === "string" && malformedHttpProtocol.test(normalizeURLForProtocolCheck(url))) {
3920
+ throw new AxiosError$1(
3921
+ 'Invalid URL: missing "//" after protocol',
3922
+ AxiosError$1.ERR_INVALID_URL,
3923
+ config
3924
+ );
3925
+ }
3926
+ }
3927
+ function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls, config) {
3928
+ assertValidHttpProtocolURL(requestedURL, config);
3841
3929
  let isRelativeUrl = !isAbsoluteURL(requestedURL);
3842
3930
  if (baseURL && (isRelativeUrl || allowAbsoluteUrls === false)) {
3931
+ assertValidHttpProtocolURL(baseURL, config);
3843
3932
  return combineURLs(baseURL, requestedURL);
3844
3933
  }
3845
3934
  return requestedURL;
@@ -3886,6 +3975,23 @@ function mergeConfig$1(config1, config2) {
3886
3975
  return getMergedValue(void 0, a);
3887
3976
  }
3888
3977
  }
3978
+ function getMergedTransitionalOption(prop) {
3979
+ const transitional2 = utils$1.hasOwnProp(config2, "transitional") ? config2.transitional : void 0;
3980
+ if (!utils$1.isUndefined(transitional2)) {
3981
+ if (utils$1.isPlainObject(transitional2)) {
3982
+ if (utils$1.hasOwnProp(transitional2, prop)) {
3983
+ return transitional2[prop];
3984
+ }
3985
+ } else {
3986
+ return void 0;
3987
+ }
3988
+ }
3989
+ const transitional1 = utils$1.hasOwnProp(config1, "transitional") ? config1.transitional : void 0;
3990
+ if (utils$1.isPlainObject(transitional1) && utils$1.hasOwnProp(transitional1, prop)) {
3991
+ return transitional1[prop];
3992
+ }
3993
+ return void 0;
3994
+ }
3889
3995
  function mergeDirectKeys(a, b, prop) {
3890
3996
  if (utils$1.hasOwnProp(config2, prop)) {
3891
3997
  return getMergedValue(a, b);
@@ -3933,6 +4039,13 @@ function mergeConfig$1(config1, config2) {
3933
4039
  const configValue = merge2(a, b, prop);
3934
4040
  utils$1.isUndefined(configValue) && merge2 !== mergeDirectKeys || (config[prop] = configValue);
3935
4041
  });
4042
+ if (utils$1.hasOwnProp(config2, "validateStatus") && utils$1.isUndefined(config2.validateStatus) && getMergedTransitionalOption("validateStatusUndefinedResolves") === false) {
4043
+ if (utils$1.hasOwnProp(config1, "validateStatus")) {
4044
+ config.validateStatus = getMergedValue(void 0, config1.validateStatus);
4045
+ } else {
4046
+ delete config.validateStatus;
4047
+ }
4048
+ }
3936
4049
  return config;
3937
4050
  }
3938
4051
  const FORM_DATA_CONTENT_HEADERS = ["content-type", "content-length"];
@@ -3965,14 +4078,16 @@ function resolveConfig(config) {
3965
4078
  const url = own2("url");
3966
4079
  newConfig.headers = headers = AxiosHeaders$1.from(headers);
3967
4080
  newConfig.url = buildURL(
3968
- buildFullPath(baseURL, url, allowAbsoluteUrls),
4081
+ buildFullPath(baseURL, url, allowAbsoluteUrls, newConfig),
3969
4082
  own2("params"),
3970
4083
  own2("paramsSerializer")
3971
4084
  );
3972
4085
  if (auth) {
4086
+ const username = utils$1.getSafeProp(auth, "username") || "";
4087
+ const password = utils$1.getSafeProp(auth, "password") || "";
3973
4088
  headers.set(
3974
4089
  "Authorization",
3975
- "Basic " + btoa((auth.username || "") + ":" + (auth.password ? encodeUTF8$1(auth.password) : ""))
4090
+ "Basic " + btoa(username + ":" + (password ? encodeUTF8$1(password) : ""))
3976
4091
  );
3977
4092
  }
3978
4093
  if (utils$1.isFormData(data)) {
@@ -4255,6 +4370,8 @@ const trackStream = (stream, chunkSize, onProgress, onFinish) => {
4255
4370
  }
4256
4371
  );
4257
4372
  };
4373
+ const isHexDigit = (charCode) => charCode >= 48 && charCode <= 57 || charCode >= 65 && charCode <= 70 || charCode >= 97 && charCode <= 102;
4374
+ const isPercentEncodedByte = (str, i, len) => i + 2 < len && isHexDigit(str.charCodeAt(i + 1)) && isHexDigit(str.charCodeAt(i + 2));
4258
4375
  function estimateDataURLDecodedBytes(url) {
4259
4376
  if (!url || typeof url !== "string") return 0;
4260
4377
  if (!url.startsWith("data:")) return 0;
@@ -4270,7 +4387,7 @@ function estimateDataURLDecodedBytes(url) {
4270
4387
  if (body.charCodeAt(i) === 37 && i + 2 < len) {
4271
4388
  const a = body.charCodeAt(i + 1);
4272
4389
  const b = body.charCodeAt(i + 2);
4273
- const isHex = (a >= 48 && a <= 57 || a >= 65 && a <= 70 || a >= 97 && a <= 102) && (b >= 48 && b <= 57 || b >= 65 && b <= 70 || b >= 97 && b <= 102);
4390
+ const isHex = isHexDigit(a) && isHexDigit(b);
4274
4391
  if (isHex) {
4275
4392
  effectiveLen -= 2;
4276
4393
  i += 2;
@@ -4302,13 +4419,13 @@ function estimateDataURLDecodedBytes(url) {
4302
4419
  const bytes2 = groups * 3 - (pad || 0);
4303
4420
  return bytes2 > 0 ? bytes2 : 0;
4304
4421
  }
4305
- if (typeof Buffer !== "undefined" && typeof Buffer.byteLength === "function") {
4306
- return Buffer.byteLength(body, "utf8");
4307
- }
4308
4422
  let bytes = 0;
4309
4423
  for (let i = 0, len = body.length; i < len; i++) {
4310
4424
  const c = body.charCodeAt(i);
4311
- if (c < 128) {
4425
+ if (c === 37 && isPercentEncodedByte(body, i, len)) {
4426
+ bytes += 1;
4427
+ i += 2;
4428
+ } else if (c < 128) {
4312
4429
  bytes += 1;
4313
4430
  } else if (c < 2048) {
4314
4431
  bytes += 2;
@@ -4326,7 +4443,7 @@ function estimateDataURLDecodedBytes(url) {
4326
4443
  }
4327
4444
  return bytes;
4328
4445
  }
4329
- const VERSION$1 = "1.17.0";
4446
+ const VERSION$1 = "1.18.0";
4330
4447
  const DEFAULT_CHUNK_SIZE = 64 * 1024;
4331
4448
  const { isFunction } = utils$1;
4332
4449
  const encodeUTF8 = (str) => encodeURIComponent(str).replace(
@@ -4474,12 +4591,19 @@ const factory = (env) => {
4474
4591
  composedSignal.unsubscribe();
4475
4592
  });
4476
4593
  let requestContentLength;
4594
+ let pendingBodyError = null;
4595
+ const maxBodyLengthError = () => new AxiosError$1(
4596
+ "Request body larger than maxBodyLength limit",
4597
+ AxiosError$1.ERR_BAD_REQUEST,
4598
+ config,
4599
+ request
4600
+ );
4477
4601
  try {
4478
4602
  let auth = void 0;
4479
4603
  const configAuth = own2("auth");
4480
4604
  if (configAuth) {
4481
- const username = configAuth.username || "";
4482
- const password = configAuth.password || "";
4605
+ const username = utils$1.getSafeProp(configAuth, "username") || "";
4606
+ const password = utils$1.getSafeProp(configAuth, "password") || "";
4483
4607
  auth = {
4484
4608
  username,
4485
4609
  password
@@ -4520,33 +4644,55 @@ const factory = (env) => {
4520
4644
  }
4521
4645
  }
4522
4646
  if (hasMaxBodyLength && method !== "get" && method !== "head") {
4523
- const outboundLength = await resolveBodyLength(headers, data);
4524
- if (typeof outboundLength === "number" && isFinite(outboundLength) && outboundLength > maxBodyLength) {
4525
- throw new AxiosError$1(
4526
- "Request body larger than maxBodyLength limit",
4527
- AxiosError$1.ERR_BAD_REQUEST,
4528
- config,
4529
- request
4530
- );
4647
+ const outboundLength = await getBodyLength(data);
4648
+ if (typeof outboundLength === "number" && isFinite(outboundLength)) {
4649
+ requestContentLength = outboundLength;
4650
+ if (outboundLength > maxBodyLength) {
4651
+ throw maxBodyLengthError();
4652
+ }
4531
4653
  }
4532
4654
  }
4533
- if (onUploadProgress && supportsRequestStream && method !== "get" && method !== "head" && (requestContentLength = await resolveBodyLength(headers, data)) !== 0) {
4534
- let _request = new Request(url, {
4535
- method: "POST",
4536
- body: data,
4537
- duplex: "half"
4538
- });
4539
- let contentTypeHeader;
4540
- if (utils$1.isFormData(data) && (contentTypeHeader = _request.headers.get("content-type"))) {
4541
- headers.setContentType(contentTypeHeader);
4542
- }
4543
- if (_request.body) {
4544
- const [onProgress, flush] = progressEventDecorator(
4545
- requestContentLength,
4546
- progressEventReducer(asyncDecorator(onUploadProgress))
4547
- );
4548
- data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);
4655
+ const mustEnforceStreamBody = hasMaxBodyLength && (utils$1.isReadableStream(data) || utils$1.isStream(data));
4656
+ const trackRequestStream = (stream, onProgress, flush) => trackStream(
4657
+ stream,
4658
+ DEFAULT_CHUNK_SIZE,
4659
+ (loadedBytes) => {
4660
+ if (hasMaxBodyLength && loadedBytes > maxBodyLength) {
4661
+ throw pendingBodyError = maxBodyLengthError();
4662
+ }
4663
+ onProgress && onProgress(loadedBytes);
4664
+ },
4665
+ flush
4666
+ );
4667
+ if (supportsRequestStream && method !== "get" && method !== "head" && (onUploadProgress || mustEnforceStreamBody)) {
4668
+ requestContentLength = requestContentLength == null ? await resolveBodyLength(headers, data) : requestContentLength;
4669
+ if (requestContentLength !== 0 || mustEnforceStreamBody) {
4670
+ let _request = new Request(url, {
4671
+ method: "POST",
4672
+ body: data,
4673
+ duplex: "half"
4674
+ });
4675
+ let contentTypeHeader;
4676
+ if (utils$1.isFormData(data) && (contentTypeHeader = _request.headers.get("content-type"))) {
4677
+ headers.setContentType(contentTypeHeader);
4678
+ }
4679
+ if (_request.body) {
4680
+ const [onProgress, flush] = onUploadProgress && progressEventDecorator(
4681
+ requestContentLength,
4682
+ progressEventReducer(asyncDecorator(onUploadProgress))
4683
+ ) || [];
4684
+ data = trackRequestStream(_request.body, onProgress, flush);
4685
+ }
4549
4686
  }
4687
+ } else if (mustEnforceStreamBody && !isRequestSupported && isReadableStreamSupported && method !== "get" && method !== "head") {
4688
+ data = trackRequestStream(data);
4689
+ } else if (mustEnforceStreamBody && isRequestSupported && !supportsRequestStream && method !== "get" && method !== "head") {
4690
+ throw new AxiosError$1(
4691
+ "Stream request bodies are not supported by the current fetch implementation",
4692
+ AxiosError$1.ERR_NOT_SUPPORT,
4693
+ config,
4694
+ request
4695
+ );
4550
4696
  }
4551
4697
  if (!utils$1.isString(withCredentials)) {
4552
4698
  withCredentials = withCredentials ? "include" : "omit";
@@ -4570,8 +4716,9 @@ const factory = (env) => {
4570
4716
  };
4571
4717
  request = isRequestSupported && new Request(url, resolvedOptions);
4572
4718
  let response = await (isRequestSupported ? _fetch(request, fetchOptions) : _fetch(url, resolvedOptions));
4719
+ const responseHeaders = AxiosHeaders$1.from(response.headers);
4573
4720
  if (hasMaxContentLength) {
4574
- const declaredLength = utils$1.toFiniteNumber(response.headers.get("content-length"));
4721
+ const declaredLength = utils$1.toFiniteNumber(responseHeaders.getContentLength());
4575
4722
  if (declaredLength != null && declaredLength > maxContentLength) {
4576
4723
  throw new AxiosError$1(
4577
4724
  "maxContentLength size of " + maxContentLength + " exceeded",
@@ -4587,7 +4734,7 @@ const factory = (env) => {
4587
4734
  ["status", "statusText", "headers"].forEach((prop) => {
4588
4735
  options[prop] = response[prop];
4589
4736
  });
4590
- const responseContentLength = utils$1.toFiniteNumber(response.headers.get("content-length"));
4737
+ const responseContentLength = utils$1.toFiniteNumber(responseHeaders.getContentLength());
4591
4738
  const [onProgress, flush] = onDownloadProgress && progressEventDecorator(
4592
4739
  responseContentLength,
4593
4740
  progressEventReducer(asyncDecorator(onDownloadProgress), true)
@@ -4660,6 +4807,14 @@ const factory = (env) => {
4660
4807
  err !== canceledError && (canceledError.cause = err);
4661
4808
  throw canceledError;
4662
4809
  }
4810
+ if (pendingBodyError) {
4811
+ request && !pendingBodyError.request && (pendingBodyError.request = request);
4812
+ throw pendingBodyError;
4813
+ }
4814
+ if (err instanceof AxiosError$1) {
4815
+ request && !err.request && (err.request = request);
4816
+ throw err;
4817
+ }
4663
4818
  if (err && err.name === "TypeError" && /Load failed|fetch/i.test(err.message)) {
4664
4819
  throw Object.assign(
4665
4820
  new AxiosError$1(
@@ -4935,7 +5090,8 @@ let Axios$1 = class Axios {
4935
5090
  forcedJSONParsing: validators.transitional(validators.boolean),
4936
5091
  clarifyTimeoutError: validators.transitional(validators.boolean),
4937
5092
  legacyInterceptorReqResOrdering: validators.transitional(validators.boolean),
4938
- advertiseZstdAcceptEncoding: validators.transitional(validators.boolean)
5093
+ advertiseZstdAcceptEncoding: validators.transitional(validators.boolean),
5094
+ validateStatusUndefinedResolves: validators.transitional(validators.boolean)
4939
5095
  },
4940
5096
  false
4941
5097
  );
@@ -5035,7 +5191,7 @@ let Axios$1 = class Axios {
5035
5191
  }
5036
5192
  getUri(config) {
5037
5193
  config = mergeConfig$1(this.defaults, config);
5038
- const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls);
5194
+ const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls, config);
5039
5195
  return buildURL(fullPath, config.params, config.paramsSerializer);
5040
5196
  }
5041
5197
  };
@@ -5045,7 +5201,7 @@ utils$1.forEach(["delete", "get", "head", "options"], function forEachMethodNoDa
5045
5201
  mergeConfig$1(config || {}, {
5046
5202
  method,
5047
5203
  url,
5048
- data: (config || {}).data
5204
+ data: config && utils$1.hasOwnProp(config, "data") ? config.data : void 0
5049
5205
  })
5050
5206
  );
5051
5207
  };
@@ -5306,7 +5462,7 @@ function S$1(t2, { exclude: e2 = [] } = {}) {
5306
5462
  (!s || r2 !== "caller" && r2 !== "callee" && r2 !== "arguments") && t2[r2] !== null && !e2.includes(r2) && (typeof t2[r2] == "object" || typeof t2[r2] == "function") && !Object.isFrozen(t2[r2]) && S$1(t2[r2], { exclude: e2 });
5307
5463
  }), t2;
5308
5464
  }
5309
- let ee$1 = class ee {
5465
+ let te$1 = class te {
5310
5466
  constructor({ data: e2, status: s, statusText: r2, headers: n2 }, u = {}) {
5311
5467
  this.response = { status: s, statusText: r2, headers: n2 }, this.fields = { ...e2 }, this.config = u, S$1(this, { exclude: ["cancelToken"] });
5312
5468
  }
@@ -5318,7 +5474,7 @@ let ee$1 = class ee {
5318
5474
  return JSON.parse(JSON.stringify({ fields: this.fields }));
5319
5475
  }
5320
5476
  };
5321
- const G$1 = {
5477
+ const Y$1 = {
5322
5478
  /**
5323
5479
  * Amount of records requested at once
5324
5480
  */
@@ -5334,11 +5490,11 @@ const G$1 = {
5334
5490
  };
5335
5491
  let ye$1 = class ye {
5336
5492
  constructor({ data: e2, status: s, statusText: r2, headers: n2 }, u = {}) {
5337
- this.limit = null, this.offset = null, this.total = null, Object.keys(G$1).forEach((o2) => {
5338
- const l = n2[G$1[o2]];
5493
+ this.limit = null, this.offset = null, this.total = null, Object.keys(Y$1).forEach((o2) => {
5494
+ const l = n2[Y$1[o2]];
5339
5495
  this[o2] = l ? Number(l) : null;
5340
5496
  }), this.response = { status: s, statusText: r2, headers: n2 }, this.items = e2.map(
5341
- (o2) => new ee$1({ data: o2, status: s, statusText: r2, headers: n2 })
5497
+ (o2) => new te$1({ data: o2, status: s, statusText: r2, headers: n2 })
5342
5498
  ), this.config = u, S$1(this, { exclude: ["cancelToken"] });
5343
5499
  }
5344
5500
  /**
@@ -5419,10 +5575,10 @@ const y = {
5419
5575
  function Ie$1(t2) {
5420
5576
  return t2 && t2.__esModule && Object.prototype.hasOwnProperty.call(t2, "default") ? t2.default : t2;
5421
5577
  }
5422
- var x$1, Y$1;
5423
- function te$1() {
5424
- if (Y$1) return x$1;
5425
- Y$1 = 1;
5578
+ var x$1, Q$1;
5579
+ function se$1() {
5580
+ if (Q$1) return x$1;
5581
+ Q$1 = 1;
5426
5582
  var t2 = Object.prototype.toString;
5427
5583
  x$1 = function(p) {
5428
5584
  if (p === void 0) return "undefined";
@@ -5493,30 +5649,30 @@ function te$1() {
5493
5649
  }
5494
5650
  return h2.slice(8, -1).toLowerCase().replace(/\s/g, "");
5495
5651
  };
5496
- function e2(g) {
5497
- return typeof g.constructor == "function" ? g.constructor.name : null;
5652
+ function e2(a) {
5653
+ return typeof a.constructor == "function" ? a.constructor.name : null;
5498
5654
  }
5499
- function s(g) {
5500
- return Array.isArray ? Array.isArray(g) : g instanceof Array;
5655
+ function s(a) {
5656
+ return Array.isArray ? Array.isArray(a) : a instanceof Array;
5501
5657
  }
5502
- function r2(g) {
5503
- return g instanceof Error || typeof g.message == "string" && g.constructor && typeof g.constructor.stackTraceLimit == "number";
5658
+ function r2(a) {
5659
+ return a instanceof Error || typeof a.message == "string" && a.constructor && typeof a.constructor.stackTraceLimit == "number";
5504
5660
  }
5505
- function n2(g) {
5506
- return g instanceof Date ? true : typeof g.toDateString == "function" && typeof g.getDate == "function" && typeof g.setDate == "function";
5661
+ function n2(a) {
5662
+ return a instanceof Date ? true : typeof a.toDateString == "function" && typeof a.getDate == "function" && typeof a.setDate == "function";
5507
5663
  }
5508
- function u(g) {
5509
- return g instanceof RegExp ? true : typeof g.flags == "string" && typeof g.ignoreCase == "boolean" && typeof g.multiline == "boolean" && typeof g.global == "boolean";
5664
+ function u(a) {
5665
+ return a instanceof RegExp ? true : typeof a.flags == "string" && typeof a.ignoreCase == "boolean" && typeof a.multiline == "boolean" && typeof a.global == "boolean";
5510
5666
  }
5511
- function o2(g, p) {
5512
- return e2(g) === "GeneratorFunction";
5667
+ function o2(a, p) {
5668
+ return e2(a) === "GeneratorFunction";
5513
5669
  }
5514
- function l(g) {
5515
- return typeof g.throw == "function" && typeof g.return == "function" && typeof g.next == "function";
5670
+ function l(a) {
5671
+ return typeof a.throw == "function" && typeof a.return == "function" && typeof a.next == "function";
5516
5672
  }
5517
- function i(g) {
5673
+ function i(a) {
5518
5674
  try {
5519
- if (typeof g.length == "number" && typeof g.callee == "function")
5675
+ if (typeof a.length == "number" && typeof a.callee == "function")
5520
5676
  return true;
5521
5677
  } catch (p) {
5522
5678
  if (p.message.indexOf("callee") !== -1)
@@ -5524,8 +5680,8 @@ function te$1() {
5524
5680
  }
5525
5681
  return false;
5526
5682
  }
5527
- function f(g) {
5528
- return g.constructor && typeof g.constructor.isBuffer == "function" ? g.constructor.isBuffer(g) : false;
5683
+ function f(a) {
5684
+ return a.constructor && typeof a.constructor.isBuffer == "function" ? a.constructor.isBuffer(a) : false;
5529
5685
  }
5530
5686
  return x$1;
5531
5687
  }
@@ -5535,11 +5691,11 @@ function te$1() {
5535
5691
  * Copyright (c) 2015-present, Jon Schlinkert.
5536
5692
  * Released under the MIT License.
5537
5693
  */
5538
- var P, Q$1;
5694
+ var P, X$1;
5539
5695
  function Se$1() {
5540
- if (Q$1) return P;
5541
- Q$1 = 1;
5542
- const t2 = Symbol.prototype.valueOf, e2 = te$1();
5696
+ if (X$1) return P;
5697
+ X$1 = 1;
5698
+ const t2 = Symbol.prototype.valueOf, e2 = se$1();
5543
5699
  function s(i, f) {
5544
5700
  switch (e2(i)) {
5545
5701
  case "array":
@@ -5577,8 +5733,8 @@ function Se$1() {
5577
5733
  }
5578
5734
  }
5579
5735
  function r2(i) {
5580
- const f = i.flags !== void 0 ? i.flags : /\w+$/.exec(i) || void 0, g = new i.constructor(i.source, f);
5581
- return g.lastIndex = i.lastIndex, g;
5736
+ const f = i.flags !== void 0 ? i.flags : /\w+$/.exec(i) || void 0, a = new i.constructor(i.source, f);
5737
+ return a.lastIndex = i.lastIndex, a;
5582
5738
  }
5583
5739
  function n2(i) {
5584
5740
  const f = new i.constructor(i.byteLength);
@@ -5588,8 +5744,8 @@ function Se$1() {
5588
5744
  return new i.constructor(i.buffer, i.byteOffset, i.length);
5589
5745
  }
5590
5746
  function o2(i) {
5591
- const f = i.length, g = Buffer.allocUnsafe ? Buffer.allocUnsafe(f) : Buffer.from(f);
5592
- return i.copy(g), g;
5747
+ const f = i.length, a = Buffer.allocUnsafe ? Buffer.allocUnsafe(f) : Buffer.from(f);
5748
+ return i.copy(a), a;
5593
5749
  }
5594
5750
  function l(i) {
5595
5751
  return t2 ? Object(t2.call(i)) : {};
@@ -5602,9 +5758,9 @@ function Se$1() {
5602
5758
  * Copyright (c) 2014-2017, Jon Schlinkert.
5603
5759
  * Released under the MIT License.
5604
5760
  */
5605
- var C$1, X$1;
5761
+ var C$1, Z$1;
5606
5762
  function Ee$1() {
5607
- return X$1 || (X$1 = 1, C$1 = function(e2) {
5763
+ return Z$1 || (Z$1 = 1, C$1 = function(e2) {
5608
5764
  return e2 != null && typeof e2 == "object" && Array.isArray(e2) === false;
5609
5765
  }), C$1;
5610
5766
  }
@@ -5614,10 +5770,10 @@ function Ee$1() {
5614
5770
  * Copyright (c) 2014-2017, Jon Schlinkert.
5615
5771
  * Released under the MIT License.
5616
5772
  */
5617
- var D, Z$1;
5773
+ var D, _$1;
5618
5774
  function xe$1() {
5619
- if (Z$1) return D;
5620
- Z$1 = 1;
5775
+ if (_$1) return D;
5776
+ _$1 = 1;
5621
5777
  var t2 = Ee$1();
5622
5778
  function e2(s) {
5623
5779
  return t2(s) === true && Object.prototype.toString.call(s) === "[object Object]";
@@ -5627,11 +5783,11 @@ function xe$1() {
5627
5783
  return !(e2(r2) === false || (n2 = r2.constructor, typeof n2 != "function") || (u = n2.prototype, e2(u) === false) || u.hasOwnProperty("isPrototypeOf") === false);
5628
5784
  }, D;
5629
5785
  }
5630
- var j$1, _$1;
5786
+ var j$1, H$1;
5631
5787
  function Pe$1() {
5632
- if (_$1) return j$1;
5633
- _$1 = 1;
5634
- const t2 = Se$1(), e2 = te$1(), s = xe$1();
5788
+ if (H$1) return j$1;
5789
+ H$1 = 1;
5790
+ const t2 = Se$1(), e2 = se$1(), s = xe$1();
5635
5791
  function r2(o2, l) {
5636
5792
  switch (e2(o2)) {
5637
5793
  case "object":
@@ -5750,11 +5906,11 @@ const tr = {
5750
5906
  * @type Cancellation.cancelAll
5751
5907
  */
5752
5908
  cancelAll: async (...t2) => await I$1.cancelAll(...t2)
5753
- }, v = {
5909
+ }, k$1 = {
5754
5910
  request: "request",
5755
5911
  response: "response"
5756
- }, H$1 = (t2) => {
5757
- if (!Object.values(v).includes(t2))
5912
+ }, ee$1 = (t2) => {
5913
+ if (!Object.values(k$1).includes(t2))
5758
5914
  throw new Error(`There is no such interceptor type as "${t2}"`);
5759
5915
  return true;
5760
5916
  };
@@ -5778,10 +5934,10 @@ function O$1({ options: t2 }) {
5778
5934
  return t2.apiVersion && (c = `${c}/${t2.apiVersion}`), t2.organizationId && (c = `${c}/organizations/${t2.organizationId}`), `${c}`;
5779
5935
  }
5780
5936
  function o2() {
5781
- const a = {
5782
- "REB-API-CONSUMER": `${["Rebilly", t2.appName, "js-sdk"].filter((m2) => m2).join("/")}@1e851cb`
5937
+ const g = {
5938
+ "REB-API-CONSUMER": `${["Rebilly", t2.appName, "js-sdk"].filter((m2) => m2).join("/")}@1dd4e3f`
5783
5939
  };
5784
- return t2.apiKey && (a["REB-APIKEY"] = t2.apiKey), a;
5940
+ return t2.apiKey && (g["REB-APIKEY"] = t2.apiKey), g;
5785
5941
  }
5786
5942
  function l() {
5787
5943
  return De$1(e2.defaults.headers);
@@ -5790,65 +5946,65 @@ function O$1({ options: t2 }) {
5790
5946
  t2.requestTimeout = Number(c), e2.defaults.timeout = t2.requestTimeout;
5791
5947
  }
5792
5948
  function f(c = t2.jwt) {
5793
- const a = l();
5794
- t2.apiKey = null, t2.jwt = c, delete a.common["REB-APIKEY"], a.common.Authorization = `Bearer ${c}`, e2.defaults.headers = a;
5949
+ const g = l();
5950
+ t2.apiKey = null, t2.jwt = c, delete g.common["REB-APIKEY"], g.common.Authorization = `Bearer ${c}`, e2.defaults.headers = g;
5795
5951
  }
5796
- function g(c = t2.publishableKey) {
5797
- const a = l();
5798
- t2.publishableKey = c, a.common.Authorization = `${c}`, e2.defaults.headers = a;
5952
+ function a(c = t2.publishableKey) {
5953
+ const g = l();
5954
+ t2.publishableKey = c, g.common.Authorization = `${c}`, e2.defaults.headers = g;
5799
5955
  }
5800
- function p({ host: c, port: a, auth: m2 }) {
5956
+ function p({ host: c, port: g, auth: m2 }) {
5801
5957
  e2.defaults.proxy = {
5802
5958
  host: c,
5803
- port: a,
5959
+ port: g,
5804
5960
  auth: m2
5805
5961
  };
5806
5962
  }
5807
- function h2({ live: c = null, sandbox: a = null }) {
5808
- c && (t2.apiEndpoints.live = c), a && (t2.apiEndpoints.sandbox = a), e2.defaults.baseURL = u();
5963
+ function h2({ live: c = null, sandbox: g = null }) {
5964
+ c && (t2.apiEndpoints.live = c), g && (t2.apiEndpoints.sandbox = g), e2.defaults.baseURL = u();
5809
5965
  }
5810
- function K2(c, { thenDelegate: a, catchDelegate: m2 = () => {
5966
+ function K2(c, { thenDelegate: g, catchDelegate: m2 = () => {
5811
5967
  } }) {
5812
- return H$1(c) && e2.interceptors[v[c]].use(
5813
- a,
5968
+ return ee$1(c) && e2.interceptors[k$1[c]].use(
5969
+ g,
5814
5970
  m2
5815
5971
  );
5816
5972
  }
5817
- function N2(c, a) {
5818
- return H$1(c) && e2.interceptors[v[c]].eject(a);
5973
+ function N2(c, g) {
5974
+ return ee$1(c) && e2.interceptors[k$1[c]].eject(g);
5819
5975
  }
5820
- function se2({ thenDelegate: c, catchDelegate: a = () => {
5976
+ function re2({ thenDelegate: c, catchDelegate: g = () => {
5821
5977
  } }) {
5822
- return K2(v.request, {
5978
+ return K2(k$1.request, {
5823
5979
  thenDelegate: c,
5824
- catchDelegate: a
5980
+ catchDelegate: g
5825
5981
  });
5826
5982
  }
5827
- function re2(c) {
5828
- N2(v.request, c);
5983
+ function ne2(c) {
5984
+ N2(k$1.request, c);
5829
5985
  }
5830
- function ne2({
5986
+ function ue2({
5831
5987
  thenDelegate: c,
5832
- catchDelegate: a = () => {
5988
+ catchDelegate: g = () => {
5833
5989
  }
5834
5990
  }) {
5835
- return K2(v.response, {
5991
+ return K2(k$1.response, {
5836
5992
  thenDelegate: c,
5837
- catchDelegate: a
5993
+ catchDelegate: g
5838
5994
  });
5839
5995
  }
5840
- function ue2(c) {
5841
- N2(v.response, c);
5996
+ function oe2(c) {
5997
+ N2(k$1.response, c);
5842
5998
  }
5843
- function w({ request: c, isCollection: a, config: m2 }) {
5999
+ function v({ request: c, isCollection: g, config: m2 }) {
5844
6000
  const $2 = z2(m2), { id: b, cancelToken: $e2 } = q$1.save();
5845
6001
  $2.cancelToken = $e2;
5846
- const W2 = (async function() {
6002
+ const G2 = (async function() {
5847
6003
  try {
5848
6004
  const d = await c($2);
5849
- return oe2({
6005
+ return le2({
5850
6006
  response: d,
5851
- isCollection: a,
6007
+ isCollection: g,
5852
6008
  config: $2
5853
6009
  });
5854
6010
  } catch (d) {
@@ -5857,10 +6013,10 @@ function O$1({ options: t2 }) {
5857
6013
  q$1.deleteById(b);
5858
6014
  }
5859
6015
  })();
5860
- return W2.cancel = (d) => I$1.cancelById(b, d), W2;
6016
+ return G2.cancel = (d) => I$1.cancelById(b, d), G2;
5861
6017
  }
5862
- function oe2({ response: c, isCollection: a, config: m2 }) {
5863
- return a ? new ye$1(c, m2) : new ee$1(c, m2);
6018
+ function le2({ response: c, isCollection: g, config: m2 }) {
6019
+ return g ? new ye$1(c, m2) : new te$1(c, m2);
5864
6020
  }
5865
6021
  function L2({ error: c }) {
5866
6022
  if (axios.isCancel(c))
@@ -5882,66 +6038,63 @@ function O$1({ options: t2 }) {
5882
6038
  }
5883
6039
  throw c.code === "ECONNABORTED" ? new y.RebillyTimeoutError(c) : new y.RebillyRequestError(c);
5884
6040
  }
5885
- function le2(c) {
6041
+ function ce2(c) {
5886
6042
  return c.params !== void 0 && (c.params = Object.keys(c.params).filter(
5887
- (a) => {
6043
+ (g) => {
5888
6044
  var m2;
5889
- return c.params[a] !== null && c.params[a] !== "" && !(a === "sort" && ((m2 = c.params[a]) == null ? void 0 : m2.length) === 0);
6045
+ return c.params[g] !== null && c.params[g] !== "" && !(g === "sort" && ((m2 = c.params[g]) == null ? void 0 : m2.length) === 0);
5890
6046
  }
5891
- ).reduce((a, m2) => {
6047
+ ).reduce((g, m2) => {
5892
6048
  const $2 = c.params[m2];
5893
- return a[m2] = m2 === "sort" && Array.isArray($2) ? $2.join(",") : $2, a;
6049
+ return g[m2] = m2 === "sort" && Array.isArray($2) ? $2.join(",") : $2, g;
5894
6050
  }, {})), c;
5895
6051
  }
5896
6052
  function z2(c = {}) {
5897
- return { ...le2(c) };
6053
+ return { ...ce2(c) };
5898
6054
  }
5899
- function U2(c, a = {}) {
5900
- return w({
6055
+ function U2(c, g = {}) {
6056
+ return v({
5901
6057
  request: (m2) => e2.get(c, m2),
5902
- config: { params: a }
6058
+ config: { params: g }
5903
6059
  });
5904
6060
  }
5905
- function ce2(c, a) {
5906
- return w({
6061
+ function ie2(c, g) {
6062
+ return v({
5907
6063
  request: (m2) => e2.get(c, m2),
5908
- config: { params: a },
6064
+ config: { params: g },
5909
6065
  isCollection: true
5910
6066
  });
5911
6067
  }
5912
- function V2(c, a, m2 = {}) {
6068
+ function V2(c, g, m2 = {}) {
5913
6069
  let $2 = {};
5914
- return m2.authenticate === false && ($2 = { headers: l() }, delete $2.headers.common["REB-APIKEY"], delete $2.headers.common.Authorization), m2.params && ($2.params = { ...m2.params }), w({
5915
- request: (b) => e2.post(c, a, b),
6070
+ return m2.authenticate === false && ($2 = { headers: l() }, delete $2.headers.common["REB-APIKEY"], delete $2.headers.common.Authorization), m2.params && ($2.params = { ...m2.params }), v({
6071
+ request: (b) => e2.post(c, g, b),
5916
6072
  config: $2
5917
6073
  });
5918
6074
  }
5919
- function J2(c, a, m2 = {}) {
5920
- return w({
5921
- request: ($2) => e2.put(c, a, $2),
6075
+ function J2(c, g, m2 = {}) {
6076
+ return v({
6077
+ request: ($2) => e2.put(c, g, $2),
5922
6078
  config: { params: m2 }
5923
6079
  });
5924
6080
  }
5925
- function ie2(c, a) {
5926
- return w({
5927
- request: (m2) => e2.patch(c, a, m2),
6081
+ function ge(c, g) {
6082
+ return v({
6083
+ request: (m2) => e2.patch(c, g, m2),
5928
6084
  config: {}
5929
6085
  });
5930
6086
  }
5931
- function ae2(c) {
5932
- return w({
5933
- request: (a) => e2.delete(c, a),
5934
- config: {}
5935
- });
5936
- }
5937
- function ge(c, a) {
5938
- return w({
6087
+ function W2(c, g = null) {
6088
+ return v({
5939
6089
  request: (m2) => e2.delete(c, m2),
5940
- config: { data: { ...a } }
6090
+ config: g != null ? { data: g } : {}
5941
6091
  });
5942
6092
  }
5943
- async function me2(c, a, m2, $2 = {}) {
5944
- if (a === "")
6093
+ function ae2(c, g) {
6094
+ return W2(c, g);
6095
+ }
6096
+ async function me2(c, g, m2, $2 = {}) {
6097
+ if (g === "")
5945
6098
  return V2(c, m2, { params: $2 });
5946
6099
  try {
5947
6100
  if ((await U2(c)).response.status === 200)
@@ -5954,8 +6107,8 @@ function O$1({ options: t2 }) {
5954
6107
  throw b;
5955
6108
  }
5956
6109
  }
5957
- async function fe2(c, a) {
5958
- const m2 = z2(a);
6110
+ async function fe2(c, g) {
6111
+ const m2 = z2(g);
5959
6112
  try {
5960
6113
  const $2 = await e2.get(c, m2);
5961
6114
  return new Ae$1($2, m2);
@@ -5965,22 +6118,22 @@ function O$1({ options: t2 }) {
5965
6118
  }
5966
6119
  return {
5967
6120
  getInstance: r2,
5968
- addRequestInterceptor: se2,
5969
- removeRequestInterceptor: re2,
5970
- addResponseInterceptor: ne2,
5971
- removeResponseInterceptor: ue2,
6121
+ addRequestInterceptor: re2,
6122
+ removeRequestInterceptor: ne2,
6123
+ addResponseInterceptor: ue2,
6124
+ removeResponseInterceptor: oe2,
5972
6125
  setTimeout: i,
5973
6126
  setProxyAgent: p,
5974
6127
  setSessionToken: f,
5975
- setPublishableKey: g,
6128
+ setPublishableKey: a,
5976
6129
  setEndpoints: h2,
5977
6130
  get: U2,
5978
- getAll: ce2,
6131
+ getAll: ie2,
5979
6132
  post: V2,
5980
6133
  put: J2,
5981
- patch: ie2,
5982
- delete: ae2,
5983
- deleteAll: ge,
6134
+ patch: ge,
6135
+ delete: W2,
6136
+ deleteAll: ae2,
5984
6137
  create: me2,
5985
6138
  download: fe2
5986
6139
  };
@@ -7022,7 +7175,7 @@ function it$1({ apiHandler: t2 }) {
7022
7175
  }
7023
7176
  };
7024
7177
  }
7025
- function at$1({ apiHandler: t2 }) {
7178
+ function gt$1({ apiHandler: t2 }) {
7026
7179
  return {
7027
7180
  /**
7028
7181
  * @param { rebilly.GetEmailNotificationCollectionRequest } request
@@ -7034,7 +7187,7 @@ function at$1({ apiHandler: t2 }) {
7034
7187
  }
7035
7188
  };
7036
7189
  }
7037
- function gt$1({ apiHandler: t2 }) {
7190
+ function at$1({ apiHandler: t2 }) {
7038
7191
  return {
7039
7192
  /**
7040
7193
  * @param { rebilly.GetEventCollectionRequest } request
@@ -7339,7 +7492,7 @@ function pt$1({ apiHandler: t2 }) {
7339
7492
  const o2 = this.getAllAttachments(s);
7340
7493
  r2.push(o2);
7341
7494
  const i = (await o2).items.map(
7342
- (g) => this.detach({ id: g.fields.id })
7495
+ (a) => this.detach({ id: a.fields.id })
7343
7496
  );
7344
7497
  r2 = [...r2, i], await Promise.all(i);
7345
7498
  const f = t2.delete(`files/${e2}`);
@@ -9409,7 +9562,7 @@ function is({ apiHandler: t2 }) {
9409
9562
  }
9410
9563
  };
9411
9564
  }
9412
- function as({ apiHandler: t2 }) {
9565
+ function gs({ apiHandler: t2 }) {
9413
9566
  return {
9414
9567
  /**
9415
9568
  * @param { rebilly.GetUsageCollectionRequest } request
@@ -9439,7 +9592,7 @@ function as({ apiHandler: t2 }) {
9439
9592
  }
9440
9593
  };
9441
9594
  }
9442
- function gs({ apiHandler: t2 }) {
9595
+ function as({ apiHandler: t2 }) {
9443
9596
  return {
9444
9597
  /**
9445
9598
  * @param { rebilly.GetUserCollectionRequest } request
@@ -9562,7 +9715,7 @@ class $s {
9562
9715
  apiHandler: e2
9563
9716
  }), this.account = Be$1({ apiHandler: e2 }), this.allowlists = Ke$1({ apiHandler: e2 }), this.amlChecks = Ne$1({ apiHandler: e2 }), this.amlSettings = Le$1({ apiHandler: e2 }), this.apiKeys = ze$1({ apiHandler: e2 }), this.applicationInstances = Ue$1({ apiHandler: e2 }), this.applications = Ve$1({ apiHandler: e2 }), this.balanceTransactions = Je$1({ apiHandler: e2 }), this.billingPortals = We$1({ apiHandler: e2 }), this.blocklists = Ge$1({ apiHandler: e2 }), this.broadcastMessages = Ye$1({ apiHandler: e2 }), this.cashiers = Qe$1({ apiHandler: e2 }), this.checkoutForms = Xe$1({ apiHandler: e2 }), this.coupons = Ze$1({ apiHandler: e2 }), this.creditMemos = _e$1({ apiHandler: e2 }), this.customDomains = He$1({ apiHandler: e2 }), this.customFields = et$1({ apiHandler: e2 }), this.customerAuthentication = tt$1({ apiHandler: e2 }), this.customers = st$1({ apiHandler: e2 }), this.depositCustomPropertySets = rt$1({
9564
9717
  apiHandler: e2
9565
- }), this.depositRequests = nt$1({ apiHandler: e2 }), this.depositStrategies = ut$1({ apiHandler: e2 }), this.digitalWallets = ot$1({ apiHandler: e2 }), this.disputes = lt$1({ apiHandler: e2 }), this.emailDeliverySettings = ct$1({ apiHandler: e2 }), this.emailMessages = it$1({ apiHandler: e2 }), this.emailNotifications = at$1({ apiHandler: e2 }), this.events = gt$1({ apiHandler: e2 }), this.externalIdentifiers = mt$1({ apiHandler: e2 }), this.externalServicesSettings = ft$1({
9718
+ }), this.depositRequests = nt$1({ apiHandler: e2 }), this.depositStrategies = ut$1({ apiHandler: e2 }), this.digitalWallets = ot$1({ apiHandler: e2 }), this.disputes = lt$1({ apiHandler: e2 }), this.emailDeliverySettings = ct$1({ apiHandler: e2 }), this.emailMessages = it$1({ apiHandler: e2 }), this.emailNotifications = gt$1({ apiHandler: e2 }), this.events = at$1({ apiHandler: e2 }), this.externalIdentifiers = mt$1({ apiHandler: e2 }), this.externalServicesSettings = ft$1({
9566
9719
  apiHandler: e2
9567
9720
  }), this.fees = $t$1({ apiHandler: e2 }), this.files = pt$1({ apiHandler: e2 }), this.gatewayAccounts = ht$1({ apiHandler: e2 }), this.integrations = yt$1({ apiHandler: e2 }), this.invoices = At$1({ apiHandler: e2 }), this.journalAccounts = bt$1({ apiHandler: e2 }), this.journalEntries = Rt$1({ apiHandler: e2 }), this.journalRecords = wt$1({ apiHandler: e2 }), this.kycDocuments = kt$1({ apiHandler: e2 }), this.kycRequests = vt$1({ apiHandler: e2 }), this.kycSettings = qt$1({ apiHandler: e2 }), this.lists = dt$1({ apiHandler: e2 }), this.memberships = Tt$1({ apiHandler: e2 }), this.orderCancellations = It$1({ apiHandler: e2 }), this.orderPauses = St$1({ apiHandler: e2 }), this.orderReactivations = Et$1({ apiHandler: e2 }), this.orders = xt$1({ apiHandler: e2 }), this.organizationExports = Pt$1({ apiHandler: e2 }), this.organizations = Ct$1({ apiHandler: e2 }), this.paymentCardsBankNames = Dt$1({ apiHandler: e2 }), this.paymentInstruments = jt$1({ apiHandler: e2 }), this.paymentMethods = Mt$1({ apiHandler: e2 }), this.paymentTokens = Ot$1({ apiHandler: e2 }), this.payoutRequestAllocations = Ft$1({
9568
9721
  apiHandler: e2
@@ -9570,7 +9723,7 @@ class $s {
9570
9723
  apiHandler: e2
9571
9724
  }), this.subscriptionPauses = rs({ apiHandler: e2 }), this.subscriptionReactivations = ns({
9572
9725
  apiHandler: e2
9573
- }), this.subscriptions = us({ apiHandler: e2 }), this.tags = os({ apiHandler: e2 }), this.tagsRules = ls({ apiHandler: e2 }), this.tracking = cs({ apiHandler: e2 }), this.transactions = is({ apiHandler: e2 }), this.usages = as({ apiHandler: e2 }), this.users = gs({ apiHandler: e2 }), this.webhooks = ms({ apiHandler: e2 }), this.websites = fs({ apiHandler: e2 }), this.addRequestInterceptor = e2.addRequestInterceptor, this.removeRequestInterceptor = e2.removeRequestInterceptor, this.addResponseInterceptor = e2.addResponseInterceptor, this.removeResponseInterceptor = e2.removeResponseInterceptor, this.setTimeout = e2.setTimeout, this.setProxyAgent = e2.setProxyAgent, this.setSessionToken = e2.setSessionToken, this.setPublishableKey = e2.setPublishableKey, this.setEndpoints = e2.setEndpoints, this.getCancellationToken = e2.getCancellationToken, this.generateSignature = e2.generateSignature;
9726
+ }), this.subscriptions = us({ apiHandler: e2 }), this.tags = os({ apiHandler: e2 }), this.tagsRules = ls({ apiHandler: e2 }), this.tracking = cs({ apiHandler: e2 }), this.transactions = is({ apiHandler: e2 }), this.usages = gs({ apiHandler: e2 }), this.users = as({ apiHandler: e2 }), this.webhooks = ms({ apiHandler: e2 }), this.websites = fs({ apiHandler: e2 }), this.addRequestInterceptor = e2.addRequestInterceptor, this.removeRequestInterceptor = e2.removeRequestInterceptor, this.addResponseInterceptor = e2.addResponseInterceptor, this.removeResponseInterceptor = e2.removeResponseInterceptor, this.setTimeout = e2.setTimeout, this.setProxyAgent = e2.setProxyAgent, this.setSessionToken = e2.setSessionToken, this.setPublishableKey = e2.setPublishableKey, this.setEndpoints = e2.setEndpoints, this.getCancellationToken = e2.getCancellationToken, this.generateSignature = e2.generateSignature;
9574
9727
  }
9575
9728
  }
9576
9729
  function ps({ apiHandler: t2 }) {
@@ -9977,7 +10130,7 @@ function As({ apiHandler: t2 }) {
9977
10130
  filter: i = null,
9978
10131
  criteria: f = null
9979
10132
  }) {
9980
- const g = {
10133
+ const a = {
9981
10134
  aggregationField: e2,
9982
10135
  aggregationPeriod: s,
9983
10136
  includeSwitchedSubscriptions: r2,
@@ -9988,7 +10141,7 @@ function As({ apiHandler: t2 }) {
9988
10141
  filter: i,
9989
10142
  criteria: f
9990
10143
  };
9991
- return t2.get("reports/retention-percentage", g);
10144
+ return t2.get("reports/retention-percentage", a);
9992
10145
  },
9993
10146
  /**
9994
10147
  * @returns { rebilly.GetRetentionValueReportResponsePromise } response
@@ -10003,7 +10156,7 @@ function As({ apiHandler: t2 }) {
10003
10156
  limit: l = null,
10004
10157
  offset: i = null,
10005
10158
  filter: f = null,
10006
- sort: g = null,
10159
+ sort: a = null,
10007
10160
  criteria: p = null
10008
10161
  }) {
10009
10162
  const h2 = {
@@ -10016,7 +10169,7 @@ function As({ apiHandler: t2 }) {
10016
10169
  limit: l,
10017
10170
  offset: i,
10018
10171
  filter: f,
10019
- sort: g,
10172
+ sort: a,
10020
10173
  criteria: p
10021
10174
  };
10022
10175
  return t2.get("reports/retention-value", h2);
@@ -10189,7 +10342,7 @@ function ws({ apiHandler: t2 }) {
10189
10342
  }
10190
10343
  };
10191
10344
  }
10192
- const k$1 = {
10345
+ const w = {
10193
10346
  CustomersResource: ps,
10194
10347
  DataExportsResource: hs,
10195
10348
  HistogramsResource: ys,
@@ -10200,11 +10353,11 @@ const k$1 = {
10200
10353
  };
10201
10354
  class ks {
10202
10355
  constructor({ apiHandler: e2 }) {
10203
- this.customers = k$1.CustomersResource({ apiHandler: e2 }), this.dataExports = k$1.DataExportsResource({
10356
+ this.customers = w.CustomersResource({ apiHandler: e2 }), this.dataExports = w.DataExportsResource({
10204
10357
  apiHandler: e2
10205
- }), this.histograms = k$1.HistogramsResource({ apiHandler: e2 }), this.reports = k$1.ReportsResource({ apiHandler: e2 }), this.subscriptions = k$1.SubscriptionsResource({
10358
+ }), this.histograms = w.HistogramsResource({ apiHandler: e2 }), this.reports = w.ReportsResource({ apiHandler: e2 }), this.subscriptions = w.SubscriptionsResource({
10206
10359
  apiHandler: e2
10207
- }), this.timelines = k$1.TimelinesResource({ apiHandler: e2 }), this.location = k$1.LocationResource({ apiHandler: e2 }), this.addRequestInterceptor = e2.addRequestInterceptor, this.removeRequestInterceptor = e2.removeRequestInterceptor, this.addResponseInterceptor = e2.addResponseInterceptor, this.removeResponseInterceptor = e2.removeResponseInterceptor, this.setTimeout = e2.setTimeout, this.setProxyAgent = e2.setProxyAgent, this.setSessionToken = e2.setSessionToken, this.setEndpoints = e2.setEndpoints, this.getCancellationToken = e2.getCancellationToken;
10360
+ }), this.timelines = w.TimelinesResource({ apiHandler: e2 }), this.location = w.LocationResource({ apiHandler: e2 }), this.addRequestInterceptor = e2.addRequestInterceptor, this.removeRequestInterceptor = e2.removeRequestInterceptor, this.addResponseInterceptor = e2.addResponseInterceptor, this.removeResponseInterceptor = e2.removeResponseInterceptor, this.setTimeout = e2.setTimeout, this.setProxyAgent = e2.setProxyAgent, this.setSessionToken = e2.setSessionToken, this.setEndpoints = e2.setEndpoints, this.getCancellationToken = e2.getCancellationToken;
10208
10361
  }
10209
10362
  }
10210
10363
  function vs({ apiHandler: t2 }) {
@@ -11568,7 +11721,7 @@ function Pe(e2) {
11568
11721
  };
11569
11722
  var d = function() {
11570
11723
  setTimeout(function() {
11571
- return l(ee2(
11724
+ return l(ee(
11572
11725
  "timeout"
11573
11726
  /* InnerErrorName.Timeout */
11574
11727
  ));
@@ -11581,7 +11734,7 @@ function Pe(e2) {
11581
11734
  f = Date.now(), s && d();
11582
11735
  break;
11583
11736
  case "suspended":
11584
- document.hidden || u++, s && u >= t2 ? l(ee2(
11737
+ document.hidden || u++, s && u >= t2 ? l(ee(
11585
11738
  "suspended"
11586
11739
  /* InnerErrorName.Suspended */
11587
11740
  )) : setTimeout(p, n2);
@@ -11602,7 +11755,7 @@ function Xe(e2) {
11602
11755
  t2 += Math.abs(e2[n2]);
11603
11756
  return t2;
11604
11757
  }
11605
- function ee2(e2) {
11758
+ function ee(e2) {
11606
11759
  var t2 = new Error(e2);
11607
11760
  return t2.name = e2, t2;
11608
11761
  }
@@ -11631,8 +11784,8 @@ function ve2(e2, t2, n2) {
11631
11784
  var g = c.style;
11632
11785
  g.setProperty("display", "block", "important"), g.position = "absolute", g.top = "0", g.left = "0", g.visibility = "hidden", t2 && "srcdoc" in c ? c.srcdoc = t2 : c.src = "about:blank", o2.body.appendChild(c);
11633
11786
  var y2 = function() {
11634
- var b, w;
11635
- f || (((w = (b = c.contentWindow) === null || b === void 0 ? void 0 : b.document) === null || w === void 0 ? void 0 : w.readyState) === "complete" ? d() : setTimeout(y2, 10));
11787
+ var b, w2;
11788
+ f || (((w2 = (b = c.contentWindow) === null || b === void 0 ? void 0 : b.document) === null || w2 === void 0 ? void 0 : w2.readyState) === "complete" ? d() : setTimeout(y2, 10));
11636
11789
  };
11637
11790
  y2();
11638
11791
  })];
@@ -11676,7 +11829,7 @@ function Te2(e2, t2) {
11676
11829
  }
11677
11830
  }
11678
11831
  }
11679
- var Ee = "mmMwWLliI0O&1", He = "48px", M = ["monospace", "sans-serif", "serif"], te = [
11832
+ var Ee = "mmMwWLliI0O&1", He = "48px", M = ["monospace", "sans-serif", "serif"], te2 = [
11680
11833
  // This is android-specific font from "Roboto" family
11681
11834
  "sans-serif-thin",
11682
11835
  "ARNO PRO",
@@ -11736,8 +11889,8 @@ function Je() {
11736
11889
  var n2 = t2.document, a = n2.body;
11737
11890
  a.style.fontSize = He;
11738
11891
  var i = n2.createElement("div"), r2 = {}, o2 = {}, c = function(y2) {
11739
- var b = n2.createElement("span"), w = b.style;
11740
- return w.position = "absolute", w.top = "0", w.left = "0", w.fontFamily = y2, b.textContent = Ee, i.appendChild(b), b;
11892
+ var b = n2.createElement("span"), w2 = b.style;
11893
+ return w2.position = "absolute", w2.top = "0", w2.left = "0", w2.fontFamily = y2, b.textContent = Ee, i.appendChild(b), b;
11741
11894
  }, l = function(y2, b) {
11742
11895
  return c("'".concat(y2, "',").concat(b));
11743
11896
  }, s = function() {
@@ -11747,20 +11900,20 @@ function Je() {
11747
11900
  y2[P2] = M.map(function(T2) {
11748
11901
  return l(P2, T2);
11749
11902
  });
11750
- }, w = 0, R2 = te; w < R2.length; w++) {
11751
- var D2 = R2[w];
11903
+ }, w2 = 0, R2 = te2; w2 < R2.length; w2++) {
11904
+ var D2 = R2[w2];
11752
11905
  b(D2);
11753
11906
  }
11754
11907
  return y2;
11755
11908
  }, f = function(y2) {
11756
- return M.some(function(b, w) {
11757
- return y2[w].offsetWidth !== r2[b] || y2[w].offsetHeight !== o2[b];
11909
+ return M.some(function(b, w2) {
11910
+ return y2[w2].offsetWidth !== r2[b] || y2[w2].offsetHeight !== o2[b];
11758
11911
  });
11759
11912
  }, d = s(), p = u();
11760
11913
  a.appendChild(i);
11761
11914
  for (var g = 0; g < M.length; g++)
11762
11915
  r2[M[g]] = d[g].offsetWidth, o2[M[g]] = d[g].offsetHeight;
11763
- return te.filter(function(y2) {
11916
+ return te2.filter(function(y2) {
11764
11917
  return f(p[y2]);
11765
11918
  });
11766
11919
  });
@@ -12434,24 +12587,24 @@ var m = Math, S = function() {
12434
12587
  return 0;
12435
12588
  };
12436
12589
  function It() {
12437
- var e2 = m.acos || S, t2 = m.acosh || S, n2 = m.asin || S, a = m.asinh || S, i = m.atanh || S, r2 = m.atan || S, o2 = m.sin || S, c = m.sinh || S, l = m.cos || S, s = m.cosh || S, u = m.tan || S, f = m.tanh || S, d = m.exp || S, p = m.expm1 || S, g = m.log1p || S, y2 = function(v2) {
12438
- return m.pow(m.PI, v2);
12439
- }, b = function(v2) {
12440
- return m.log(v2 + m.sqrt(v2 * v2 - 1));
12441
- }, w = function(v2) {
12442
- return m.log(v2 + m.sqrt(v2 * v2 + 1));
12443
- }, R2 = function(v2) {
12444
- return m.log((1 + v2) / (1 - v2)) / 2;
12445
- }, D2 = function(v2) {
12446
- return m.exp(v2) - 1 / m.exp(v2) / 2;
12447
- }, P2 = function(v2) {
12448
- return (m.exp(v2) + 1 / m.exp(v2)) / 2;
12449
- }, T2 = function(v2) {
12450
- return m.exp(v2) - 1;
12451
- }, ge = function(v2) {
12452
- return (m.exp(2 * v2) - 1) / (m.exp(2 * v2) + 1);
12453
- }, be2 = function(v2) {
12454
- return m.log(1 + v2);
12590
+ var e2 = m.acos || S, t2 = m.acosh || S, n2 = m.asin || S, a = m.asinh || S, i = m.atanh || S, r2 = m.atan || S, o2 = m.sin || S, c = m.sinh || S, l = m.cos || S, s = m.cosh || S, u = m.tan || S, f = m.tanh || S, d = m.exp || S, p = m.expm1 || S, g = m.log1p || S, y2 = function(v) {
12591
+ return m.pow(m.PI, v);
12592
+ }, b = function(v) {
12593
+ return m.log(v + m.sqrt(v * v - 1));
12594
+ }, w2 = function(v) {
12595
+ return m.log(v + m.sqrt(v * v + 1));
12596
+ }, R2 = function(v) {
12597
+ return m.log((1 + v) / (1 - v)) / 2;
12598
+ }, D2 = function(v) {
12599
+ return m.exp(v) - 1 / m.exp(v) / 2;
12600
+ }, P2 = function(v) {
12601
+ return (m.exp(v) + 1 / m.exp(v)) / 2;
12602
+ }, T2 = function(v) {
12603
+ return m.exp(v) - 1;
12604
+ }, ge = function(v) {
12605
+ return (m.exp(2 * v) - 1) / (m.exp(2 * v) + 1);
12606
+ }, be2 = function(v) {
12607
+ return m.log(1 + v);
12455
12608
  };
12456
12609
  return {
12457
12610
  acos: e2(0.12312423423423424),
@@ -12459,7 +12612,7 @@ function It() {
12459
12612
  acoshPf: b(1e154),
12460
12613
  asin: n2(0.12312423423423424),
12461
12614
  asinh: a(1),
12462
- asinhPf: w(1),
12615
+ asinhPf: w2(1),
12463
12616
  atanh: i(0.5),
12464
12617
  atanhPf: R2(0.5),
12465
12618
  atan: r2(0.5),
@@ -12513,8 +12666,8 @@ function Yt() {
12513
12666
  }
12514
12667
  n2[o2] = d, t2.appendChild(e2.createElement("br")), t2.appendChild(d);
12515
12668
  }
12516
- for (var w = 0, R2 = Object.keys(J); w < R2.length; w++) {
12517
- var o2 = R2[w];
12669
+ for (var w2 = 0, R2 = Object.keys(J); w2 < R2.length; w2++) {
12670
+ var o2 = R2[w2];
12518
12671
  a[o2] = n2[o2].getBoundingClientRect().width;
12519
12672
  }
12520
12673
  return a;
@@ -13687,7 +13840,7 @@ async function fetchData({
13687
13840
  (_i = (_h = state.options) == null ? void 0 : _h.paymentInstruments) == null ? void 0 : _i.allowDeactivate,
13688
13841
  (_k = (_j = state.options) == null ? void 0 : _j.paymentInstruments) == null ? void 0 : _k.allowUpdate,
13689
13842
  (_m = (_l = state.options) == null ? void 0 : _l.paymentInstruments) == null ? void 0 : _m.allowMakeDefault
13690
- ].some((v2) => v2);
13843
+ ].some((v) => v);
13691
13844
  let readyToPayPromise = Promise.resolve(null);
13692
13845
  let readyToPayoutPromise = Promise.resolve(null);
13693
13846
  let fetchAccountAndWebsitePromise = Promise.resolve();
@@ -15145,11 +15298,11 @@ function mix(color1, color2, percentage2 = 50) {
15145
15298
  const c2 = parseColor(color2);
15146
15299
  if (!c1 || !c2) return null;
15147
15300
  const p = Math.min(Math.max(0, percentage2), 100) / 100;
15148
- const w = p * 2 - 1;
15301
+ const w2 = p * 2 - 1;
15149
15302
  const a = c1.alpha - c2.alpha;
15150
- const w1 = ((w * a === -1 ? w : (w + a) / (1 + w * a)) + 1) / 2;
15151
- const w2 = 1 - w1;
15152
- const [r2, g, b] = c1.values.map((c, i) => Math.round(c1.values[i] * w1 + c2.values[i] * w2));
15303
+ const w1 = ((w2 * a === -1 ? w2 : (w2 + a) / (1 + w2 * a)) + 1) / 2;
15304
+ const w22 = 1 - w1;
15305
+ const [r2, g, b] = c1.values.map((c, i) => Math.round(c1.values[i] * w1 + c2.values[i] * w22));
15153
15306
  const alpha = parseFloat((c1.alpha * p + c2.alpha * (1 - p)).toFixed(8));
15154
15307
  return {
15155
15308
  hex: rgb2hex([r2, g, b]),
@@ -15289,7 +15442,7 @@ const parseCSSColor = (str) => {
15289
15442
  * @link http://noeldelgado.github.io/values.js/
15290
15443
  * @license MIT
15291
15444
  */
15292
- const defaultNumberParam = (v2, d) => v2 === null || isNaN(v2) || typeof v2 === "string" ? d : v2;
15445
+ const defaultNumberParam = (v, d) => v === null || isNaN(v) || typeof v === "string" ? d : v;
15293
15446
  class Values {
15294
15447
  constructor(color = "#000", type = "base", weight = 0) {
15295
15448
  [this.rgb, this.alpha, this.type, this.weight] = [[0, 0, 0], 1, type, weight];
@@ -15307,17 +15460,17 @@ class Values {
15307
15460
  if (!parsed) return null;
15308
15461
  return this[`_setFrom${parsed.type.toUpperCase()}`]([...parsed.values, parsed.alpha]);
15309
15462
  }
15310
- tint(weight, w = defaultNumberParam(weight, 50)) {
15311
- return new Values(`rgb(${mix("#fff", this.rgbString(), w).rgba})`, "tint", w);
15463
+ tint(weight, w2 = defaultNumberParam(weight, 50)) {
15464
+ return new Values(`rgb(${mix("#fff", this.rgbString(), w2).rgba})`, "tint", w2);
15312
15465
  }
15313
- shade(weight, w = defaultNumberParam(weight, 50)) {
15314
- return new Values(`rgb(${mix("#000", this.rgbString(), w).rgba})`, "shade", w);
15466
+ shade(weight, w2 = defaultNumberParam(weight, 50)) {
15467
+ return new Values(`rgb(${mix("#000", this.rgbString(), w2).rgba})`, "shade", w2);
15315
15468
  }
15316
- tints(weight, w = defaultNumberParam(weight, 10)) {
15317
- return Array.from({ length: 100 / w }, (_2, i) => this.tint((i + 1) * w));
15469
+ tints(weight, w2 = defaultNumberParam(weight, 10)) {
15470
+ return Array.from({ length: 100 / w2 }, (_2, i) => this.tint((i + 1) * w2));
15318
15471
  }
15319
- shades(weight, w = defaultNumberParam(weight, 10)) {
15320
- return Array.from({ length: 100 / w }, (_2, i) => this.shade((i + 1) * w));
15472
+ shades(weight, w2 = defaultNumberParam(weight, 10)) {
15473
+ return Array.from({ length: 100 / w2 }, (_2, i) => this.shade((i + 1) * w2));
15321
15474
  }
15322
15475
  all(weight = 10) {
15323
15476
  return [...this.tints(weight).reverse(), Object.assign(this), ...this.shades(weight)];
@@ -16478,7 +16631,7 @@ const _Theme = class _Theme {
16478
16631
  });
16479
16632
  }
16480
16633
  get cssVars() {
16481
- return Object.keys(this.theme).filter((v2) => !_Theme.nonCssProperties.includes(v2)).map((p, i) => `${!i ? "" : " "}--rebilly-${p}: ${this.theme[p]};`).join("\n");
16634
+ return Object.keys(this.theme).filter((v) => !_Theme.nonCssProperties.includes(v)).map((p, i) => `${!i ? "" : " "}--rebilly-${p}: ${this.theme[p]};`).join("\n");
16482
16635
  }
16483
16636
  build() {
16484
16637
  this.overrideTheme();