@rebilly/instruments 8.6.0 → 8.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -3880,7 +3880,7 @@ const toJSONObject = (obj) => {
3880
3880
  };
3881
3881
  const isAsyncFn = kindOfTest("AsyncFunction");
3882
3882
  const isThenable = (thing) => thing && (isObject$1(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);
3883
- const utils = {
3883
+ const utils$1 = {
3884
3884
  isArray: isArray$1,
3885
3885
  isArrayBuffer,
3886
3886
  isBuffer: isBuffer$1,
@@ -3948,7 +3948,7 @@ function AxiosError(message, code2, config, request, response) {
3948
3948
  request && (this.request = request);
3949
3949
  response && (this.response = response);
3950
3950
  }
3951
- utils.inherits(AxiosError, Error, {
3951
+ utils$1.inherits(AxiosError, Error, {
3952
3952
  toJSON: function toJSON() {
3953
3953
  return {
3954
3954
  // Standard
@@ -3963,7 +3963,7 @@ utils.inherits(AxiosError, Error, {
3963
3963
  columnNumber: this.columnNumber,
3964
3964
  stack: this.stack,
3965
3965
  // Axios
3966
- config: utils.toJSONObject(this.config),
3966
+ config: utils$1.toJSONObject(this.config),
3967
3967
  code: this.code,
3968
3968
  status: this.response && this.response.status ? this.response.status : null
3969
3969
  };
@@ -3992,7 +3992,7 @@ Object.defineProperties(AxiosError, descriptors);
3992
3992
  Object.defineProperty(prototype$1, "isAxiosError", { value: true });
3993
3993
  AxiosError.from = (error2, code2, config, request, response, customProps) => {
3994
3994
  const axiosError = Object.create(prototype$1);
3995
- utils.toFlatObject(error2, axiosError, function filter2(obj) {
3995
+ utils$1.toFlatObject(error2, axiosError, function filter2(obj) {
3996
3996
  return obj !== Error.prototype;
3997
3997
  }, (prop) => {
3998
3998
  return prop !== "isAxiosError";
@@ -4005,10 +4005,10 @@ AxiosError.from = (error2, code2, config, request, response, customProps) => {
4005
4005
  };
4006
4006
  const httpAdapter = null;
4007
4007
  function isVisitable(thing) {
4008
- return utils.isPlainObject(thing) || utils.isArray(thing);
4008
+ return utils$1.isPlainObject(thing) || utils$1.isArray(thing);
4009
4009
  }
4010
4010
  function removeBrackets(key) {
4011
- return utils.endsWith(key, "[]") ? key.slice(0, -2) : key;
4011
+ return utils$1.endsWith(key, "[]") ? key.slice(0, -2) : key;
4012
4012
  }
4013
4013
  function renderKey(path, key, dots) {
4014
4014
  if (!path)
@@ -4019,42 +4019,42 @@ function renderKey(path, key, dots) {
4019
4019
  }).join(dots ? "." : "");
4020
4020
  }
4021
4021
  function isFlatArray(arr) {
4022
- return utils.isArray(arr) && !arr.some(isVisitable);
4022
+ return utils$1.isArray(arr) && !arr.some(isVisitable);
4023
4023
  }
4024
- const predicates = utils.toFlatObject(utils, {}, null, function filter(prop) {
4024
+ const predicates = utils$1.toFlatObject(utils$1, {}, null, function filter(prop) {
4025
4025
  return /^is[A-Z]/.test(prop);
4026
4026
  });
4027
4027
  function toFormData(obj, formData, options) {
4028
- if (!utils.isObject(obj)) {
4028
+ if (!utils$1.isObject(obj)) {
4029
4029
  throw new TypeError("target must be an object");
4030
4030
  }
4031
4031
  formData = formData || new FormData();
4032
- options = utils.toFlatObject(options, {
4032
+ options = utils$1.toFlatObject(options, {
4033
4033
  metaTokens: true,
4034
4034
  dots: false,
4035
4035
  indexes: false
4036
4036
  }, false, function defined(option, source) {
4037
- return !utils.isUndefined(source[option]);
4037
+ return !utils$1.isUndefined(source[option]);
4038
4038
  });
4039
4039
  const metaTokens = options.metaTokens;
4040
4040
  const visitor = options.visitor || defaultVisitor;
4041
4041
  const dots = options.dots;
4042
4042
  const indexes = options.indexes;
4043
4043
  const _Blob = options.Blob || typeof Blob !== "undefined" && Blob;
4044
- const useBlob = _Blob && utils.isSpecCompliantForm(formData);
4045
- if (!utils.isFunction(visitor)) {
4044
+ const useBlob = _Blob && utils$1.isSpecCompliantForm(formData);
4045
+ if (!utils$1.isFunction(visitor)) {
4046
4046
  throw new TypeError("visitor must be a function");
4047
4047
  }
4048
4048
  function convertValue(value) {
4049
4049
  if (value === null)
4050
4050
  return "";
4051
- if (utils.isDate(value)) {
4051
+ if (utils$1.isDate(value)) {
4052
4052
  return value.toISOString();
4053
4053
  }
4054
- if (!useBlob && utils.isBlob(value)) {
4054
+ if (!useBlob && utils$1.isBlob(value)) {
4055
4055
  throw new AxiosError("Blob is not supported. Use a Buffer instead.");
4056
4056
  }
4057
- if (utils.isArrayBuffer(value) || utils.isTypedArray(value)) {
4057
+ if (utils$1.isArrayBuffer(value) || utils$1.isTypedArray(value)) {
4058
4058
  return useBlob && typeof Blob === "function" ? new Blob([value]) : Buffer.from(value);
4059
4059
  }
4060
4060
  return value;
@@ -4062,13 +4062,13 @@ function toFormData(obj, formData, options) {
4062
4062
  function defaultVisitor(value, key, path) {
4063
4063
  let arr = value;
4064
4064
  if (value && !path && typeof value === "object") {
4065
- if (utils.endsWith(key, "{}")) {
4065
+ if (utils$1.endsWith(key, "{}")) {
4066
4066
  key = metaTokens ? key : key.slice(0, -2);
4067
4067
  value = JSON.stringify(value);
4068
- } else if (utils.isArray(value) && isFlatArray(value) || (utils.isFileList(value) || utils.endsWith(key, "[]")) && (arr = utils.toArray(value))) {
4068
+ } else if (utils$1.isArray(value) && isFlatArray(value) || (utils$1.isFileList(value) || utils$1.endsWith(key, "[]")) && (arr = utils$1.toArray(value))) {
4069
4069
  key = removeBrackets(key);
4070
4070
  arr.forEach(function each(el, index2) {
4071
- !(utils.isUndefined(el) || el === null) && formData.append(
4071
+ !(utils$1.isUndefined(el) || el === null) && formData.append(
4072
4072
  // eslint-disable-next-line no-nested-ternary
4073
4073
  indexes === true ? renderKey([key], index2, dots) : indexes === null ? key : key + "[]",
4074
4074
  convertValue(el)
@@ -4090,17 +4090,17 @@ function toFormData(obj, formData, options) {
4090
4090
  isVisitable
4091
4091
  });
4092
4092
  function build(value, path) {
4093
- if (utils.isUndefined(value))
4093
+ if (utils$1.isUndefined(value))
4094
4094
  return;
4095
4095
  if (stack.indexOf(value) !== -1) {
4096
4096
  throw Error("Circular reference detected in " + path.join("."));
4097
4097
  }
4098
4098
  stack.push(value);
4099
- utils.forEach(value, function each(el, key) {
4100
- const result = !(utils.isUndefined(el) || el === null) && visitor.call(
4099
+ utils$1.forEach(value, function each(el, key) {
4100
+ const result = !(utils$1.isUndefined(el) || el === null) && visitor.call(
4101
4101
  formData,
4102
4102
  el,
4103
- utils.isString(key) ? key.trim() : key,
4103
+ utils$1.isString(key) ? key.trim() : key,
4104
4104
  path,
4105
4105
  exposedHelpers
4106
4106
  );
@@ -4110,7 +4110,7 @@ function toFormData(obj, formData, options) {
4110
4110
  });
4111
4111
  stack.pop();
4112
4112
  }
4113
- if (!utils.isObject(obj)) {
4113
+ if (!utils$1.isObject(obj)) {
4114
4114
  throw new TypeError("data must be an object");
4115
4115
  }
4116
4116
  build(obj);
@@ -4159,7 +4159,7 @@ function buildURL(url, params, options) {
4159
4159
  if (serializeFn) {
4160
4160
  serializedParams = serializeFn(params, options);
4161
4161
  } else {
4162
- serializedParams = utils.isURLSearchParams(params) ? params.toString() : new AxiosURLSearchParams(params, options).toString(_encode);
4162
+ serializedParams = utils$1.isURLSearchParams(params) ? params.toString() : new AxiosURLSearchParams(params, options).toString(_encode);
4163
4163
  }
4164
4164
  if (serializedParams) {
4165
4165
  const hashmarkIndex = url.indexOf("#");
@@ -4224,7 +4224,7 @@ class InterceptorManager {
4224
4224
  * @returns {void}
4225
4225
  */
4226
4226
  forEach(fn) {
4227
- utils.forEach(this.handlers, function forEachHandler(h2) {
4227
+ utils$1.forEach(this.handlers, function forEachHandler(h2) {
4228
4228
  if (h2 !== null) {
4229
4229
  fn(h2);
4230
4230
  }
@@ -4240,32 +4240,37 @@ const transitionalDefaults = {
4240
4240
  const URLSearchParams$1 = typeof URLSearchParams !== "undefined" ? URLSearchParams : AxiosURLSearchParams;
4241
4241
  const FormData$1 = typeof FormData !== "undefined" ? FormData : null;
4242
4242
  const Blob$1 = typeof Blob !== "undefined" ? Blob : null;
4243
- const isStandardBrowserEnv = (() => {
4244
- let product;
4245
- if (typeof navigator !== "undefined" && ((product = navigator.product) === "ReactNative" || product === "NativeScript" || product === "NS")) {
4246
- return false;
4247
- }
4248
- return typeof window !== "undefined" && typeof document !== "undefined";
4249
- })();
4250
- const isStandardBrowserWebWorkerEnv = (() => {
4251
- return typeof WorkerGlobalScope !== "undefined" && // eslint-disable-next-line no-undef
4252
- self instanceof WorkerGlobalScope && typeof self.importScripts === "function";
4253
- })();
4254
- const platform = {
4243
+ const platform$1 = {
4255
4244
  isBrowser: true,
4256
4245
  classes: {
4257
4246
  URLSearchParams: URLSearchParams$1,
4258
4247
  FormData: FormData$1,
4259
4248
  Blob: Blob$1
4260
4249
  },
4261
- isStandardBrowserEnv,
4262
- isStandardBrowserWebWorkerEnv,
4263
4250
  protocols: ["http", "https", "file", "blob", "url", "data"]
4264
4251
  };
4252
+ const hasBrowserEnv = typeof window !== "undefined" && typeof document !== "undefined";
4253
+ const hasStandardBrowserEnv = ((product) => {
4254
+ return hasBrowserEnv && ["ReactNative", "NativeScript", "NS"].indexOf(product) < 0;
4255
+ })(typeof navigator !== "undefined" && navigator.product);
4256
+ const hasStandardBrowserWebWorkerEnv = (() => {
4257
+ return typeof WorkerGlobalScope !== "undefined" && // eslint-disable-next-line no-undef
4258
+ self instanceof WorkerGlobalScope && typeof self.importScripts === "function";
4259
+ })();
4260
+ const utils = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4261
+ __proto__: null,
4262
+ hasBrowserEnv,
4263
+ hasStandardBrowserEnv,
4264
+ hasStandardBrowserWebWorkerEnv
4265
+ }, Symbol.toStringTag, { value: "Module" }));
4266
+ const platform = {
4267
+ ...utils,
4268
+ ...platform$1
4269
+ };
4265
4270
  function toURLEncodedForm(data, options) {
4266
4271
  return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({
4267
4272
  visitor: function(value, key, path, helpers) {
4268
- if (platform.isNode && utils.isBuffer(value)) {
4273
+ if (platform.isNode && utils$1.isBuffer(value)) {
4269
4274
  this.append(key, value.toString("base64"));
4270
4275
  return false;
4271
4276
  }
@@ -4274,7 +4279,7 @@ function toURLEncodedForm(data, options) {
4274
4279
  }, options));
4275
4280
  }
4276
4281
  function parsePropPath(name) {
4277
- return utils.matchAll(/\w+|\[(\w*)]/g, name).map((match) => {
4282
+ return utils$1.matchAll(/\w+|\[(\w*)]/g, name).map((match) => {
4278
4283
  return match[0] === "[]" ? "" : match[1] || match[0];
4279
4284
  });
4280
4285
  }
@@ -4295,27 +4300,27 @@ function formDataToJSON(formData) {
4295
4300
  let name = path[index2++];
4296
4301
  const isNumericKey = Number.isFinite(+name);
4297
4302
  const isLast = index2 >= path.length;
4298
- name = !name && utils.isArray(target) ? target.length : name;
4303
+ name = !name && utils$1.isArray(target) ? target.length : name;
4299
4304
  if (isLast) {
4300
- if (utils.hasOwnProp(target, name)) {
4305
+ if (utils$1.hasOwnProp(target, name)) {
4301
4306
  target[name] = [target[name], value];
4302
4307
  } else {
4303
4308
  target[name] = value;
4304
4309
  }
4305
4310
  return !isNumericKey;
4306
4311
  }
4307
- if (!target[name] || !utils.isObject(target[name])) {
4312
+ if (!target[name] || !utils$1.isObject(target[name])) {
4308
4313
  target[name] = [];
4309
4314
  }
4310
4315
  const result = buildPath(path, value, target[name], index2);
4311
- if (result && utils.isArray(target[name])) {
4316
+ if (result && utils$1.isArray(target[name])) {
4312
4317
  target[name] = arrayToObject(target[name]);
4313
4318
  }
4314
4319
  return !isNumericKey;
4315
4320
  }
4316
- if (utils.isFormData(formData) && utils.isFunction(formData.entries)) {
4321
+ if (utils$1.isFormData(formData) && utils$1.isFunction(formData.entries)) {
4317
4322
  const obj = {};
4318
- utils.forEachEntry(formData, (name, value) => {
4323
+ utils$1.forEachEntry(formData, (name, value) => {
4319
4324
  buildPath(parsePropPath(name), value, obj, 0);
4320
4325
  });
4321
4326
  return obj;
@@ -4323,10 +4328,10 @@ function formDataToJSON(formData) {
4323
4328
  return null;
4324
4329
  }
4325
4330
  function stringifySafely(rawValue, parser, encoder) {
4326
- if (utils.isString(rawValue)) {
4331
+ if (utils$1.isString(rawValue)) {
4327
4332
  try {
4328
4333
  (parser || JSON.parse)(rawValue);
4329
- return utils.trim(rawValue);
4334
+ return utils$1.trim(rawValue);
4330
4335
  } catch (e2) {
4331
4336
  if (e2.name !== "SyntaxError") {
4332
4337
  throw e2;
@@ -4341,24 +4346,24 @@ const defaults$1 = {
4341
4346
  transformRequest: [function transformRequest(data, headers) {
4342
4347
  const contentType = headers.getContentType() || "";
4343
4348
  const hasJSONContentType = contentType.indexOf("application/json") > -1;
4344
- const isObjectPayload = utils.isObject(data);
4345
- if (isObjectPayload && utils.isHTMLForm(data)) {
4349
+ const isObjectPayload = utils$1.isObject(data);
4350
+ if (isObjectPayload && utils$1.isHTMLForm(data)) {
4346
4351
  data = new FormData(data);
4347
4352
  }
4348
- const isFormData2 = utils.isFormData(data);
4353
+ const isFormData2 = utils$1.isFormData(data);
4349
4354
  if (isFormData2) {
4350
4355
  if (!hasJSONContentType) {
4351
4356
  return data;
4352
4357
  }
4353
4358
  return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;
4354
4359
  }
4355
- if (utils.isArrayBuffer(data) || utils.isBuffer(data) || utils.isStream(data) || utils.isFile(data) || utils.isBlob(data)) {
4360
+ if (utils$1.isArrayBuffer(data) || utils$1.isBuffer(data) || utils$1.isStream(data) || utils$1.isFile(data) || utils$1.isBlob(data)) {
4356
4361
  return data;
4357
4362
  }
4358
- if (utils.isArrayBufferView(data)) {
4363
+ if (utils$1.isArrayBufferView(data)) {
4359
4364
  return data.buffer;
4360
4365
  }
4361
- if (utils.isURLSearchParams(data)) {
4366
+ if (utils$1.isURLSearchParams(data)) {
4362
4367
  headers.setContentType("application/x-www-form-urlencoded;charset=utf-8", false);
4363
4368
  return data.toString();
4364
4369
  }
@@ -4367,7 +4372,7 @@ const defaults$1 = {
4367
4372
  if (contentType.indexOf("application/x-www-form-urlencoded") > -1) {
4368
4373
  return toURLEncodedForm(data, this.formSerializer).toString();
4369
4374
  }
4370
- if ((isFileList2 = utils.isFileList(data)) || contentType.indexOf("multipart/form-data") > -1) {
4375
+ if ((isFileList2 = utils$1.isFileList(data)) || contentType.indexOf("multipart/form-data") > -1) {
4371
4376
  const _FormData = this.env && this.env.FormData;
4372
4377
  return toFormData(
4373
4378
  isFileList2 ? { "files[]": data } : data,
@@ -4386,7 +4391,7 @@ const defaults$1 = {
4386
4391
  const transitional2 = this.transitional || defaults$1.transitional;
4387
4392
  const forcedJSONParsing = transitional2 && transitional2.forcedJSONParsing;
4388
4393
  const JSONRequested = this.responseType === "json";
4389
- if (data && utils.isString(data) && (forcedJSONParsing && !this.responseType || JSONRequested)) {
4394
+ if (data && utils$1.isString(data) && (forcedJSONParsing && !this.responseType || JSONRequested)) {
4390
4395
  const silentJSONParsing = transitional2 && transitional2.silentJSONParsing;
4391
4396
  const strictJSONParsing = !silentJSONParsing && JSONRequested;
4392
4397
  try {
@@ -4425,11 +4430,11 @@ const defaults$1 = {
4425
4430
  }
4426
4431
  }
4427
4432
  };
4428
- utils.forEach(["delete", "get", "head", "post", "put", "patch"], (method) => {
4433
+ utils$1.forEach(["delete", "get", "head", "post", "put", "patch"], (method) => {
4429
4434
  defaults$1.headers[method] = {};
4430
4435
  });
4431
4436
  const defaults$2 = defaults$1;
4432
- const ignoreDuplicateOf = utils.toObjectSet([
4437
+ const ignoreDuplicateOf = utils$1.toObjectSet([
4433
4438
  "age",
4434
4439
  "authorization",
4435
4440
  "content-length",
@@ -4480,7 +4485,7 @@ function normalizeValue(value) {
4480
4485
  if (value === false || value == null) {
4481
4486
  return value;
4482
4487
  }
4483
- return utils.isArray(value) ? value.map(normalizeValue) : String(value);
4488
+ return utils$1.isArray(value) ? value.map(normalizeValue) : String(value);
4484
4489
  }
4485
4490
  function parseTokens(str) {
4486
4491
  const tokens = /* @__PURE__ */ Object.create(null);
@@ -4493,18 +4498,18 @@ function parseTokens(str) {
4493
4498
  }
4494
4499
  const isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
4495
4500
  function matchHeaderValue(context, value, header, filter2, isHeaderNameFilter) {
4496
- if (utils.isFunction(filter2)) {
4501
+ if (utils$1.isFunction(filter2)) {
4497
4502
  return filter2.call(this, value, header);
4498
4503
  }
4499
4504
  if (isHeaderNameFilter) {
4500
4505
  value = header;
4501
4506
  }
4502
- if (!utils.isString(value))
4507
+ if (!utils$1.isString(value))
4503
4508
  return;
4504
- if (utils.isString(filter2)) {
4509
+ if (utils$1.isString(filter2)) {
4505
4510
  return value.indexOf(filter2) !== -1;
4506
4511
  }
4507
- if (utils.isRegExp(filter2)) {
4512
+ if (utils$1.isRegExp(filter2)) {
4508
4513
  return filter2.test(value);
4509
4514
  }
4510
4515
  }
@@ -4514,7 +4519,7 @@ function formatHeader(header) {
4514
4519
  });
4515
4520
  }
4516
4521
  function buildAccessors(obj, header) {
4517
- const accessorName = utils.toCamelCase(" " + header);
4522
+ const accessorName = utils$1.toCamelCase(" " + header);
4518
4523
  ["get", "set", "has"].forEach((methodName) => {
4519
4524
  Object.defineProperty(obj, methodName + accessorName, {
4520
4525
  value: function(arg1, arg2, arg3) {
@@ -4535,15 +4540,15 @@ class AxiosHeaders {
4535
4540
  if (!lHeader) {
4536
4541
  throw new Error("header name must be a non-empty string");
4537
4542
  }
4538
- const key = utils.findKey(self2, lHeader);
4543
+ const key = utils$1.findKey(self2, lHeader);
4539
4544
  if (!key || self2[key] === void 0 || _rewrite === true || _rewrite === void 0 && self2[key] !== false) {
4540
4545
  self2[key || _header] = normalizeValue(_value);
4541
4546
  }
4542
4547
  }
4543
- const setHeaders = (headers, _rewrite) => utils.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
4544
- if (utils.isPlainObject(header) || header instanceof this.constructor) {
4548
+ const setHeaders = (headers, _rewrite) => utils$1.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
4549
+ if (utils$1.isPlainObject(header) || header instanceof this.constructor) {
4545
4550
  setHeaders(header, valueOrRewrite);
4546
- } else if (utils.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
4551
+ } else if (utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
4547
4552
  setHeaders(parseHeaders(header), valueOrRewrite);
4548
4553
  } else {
4549
4554
  header != null && setHeader(valueOrRewrite, header, rewrite);
@@ -4553,7 +4558,7 @@ class AxiosHeaders {
4553
4558
  get(header, parser) {
4554
4559
  header = normalizeHeader(header);
4555
4560
  if (header) {
4556
- const key = utils.findKey(this, header);
4561
+ const key = utils$1.findKey(this, header);
4557
4562
  if (key) {
4558
4563
  const value = this[key];
4559
4564
  if (!parser) {
@@ -4562,10 +4567,10 @@ class AxiosHeaders {
4562
4567
  if (parser === true) {
4563
4568
  return parseTokens(value);
4564
4569
  }
4565
- if (utils.isFunction(parser)) {
4570
+ if (utils$1.isFunction(parser)) {
4566
4571
  return parser.call(this, value, key);
4567
4572
  }
4568
- if (utils.isRegExp(parser)) {
4573
+ if (utils$1.isRegExp(parser)) {
4569
4574
  return parser.exec(value);
4570
4575
  }
4571
4576
  throw new TypeError("parser must be boolean|regexp|function");
@@ -4575,7 +4580,7 @@ class AxiosHeaders {
4575
4580
  has(header, matcher) {
4576
4581
  header = normalizeHeader(header);
4577
4582
  if (header) {
4578
- const key = utils.findKey(this, header);
4583
+ const key = utils$1.findKey(this, header);
4579
4584
  return !!(key && this[key] !== void 0 && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
4580
4585
  }
4581
4586
  return false;
@@ -4586,14 +4591,14 @@ class AxiosHeaders {
4586
4591
  function deleteHeader(_header) {
4587
4592
  _header = normalizeHeader(_header);
4588
4593
  if (_header) {
4589
- const key = utils.findKey(self2, _header);
4594
+ const key = utils$1.findKey(self2, _header);
4590
4595
  if (key && (!matcher || matchHeaderValue(self2, self2[key], key, matcher))) {
4591
4596
  delete self2[key];
4592
4597
  deleted = true;
4593
4598
  }
4594
4599
  }
4595
4600
  }
4596
- if (utils.isArray(header)) {
4601
+ if (utils$1.isArray(header)) {
4597
4602
  header.forEach(deleteHeader);
4598
4603
  } else {
4599
4604
  deleteHeader(header);
@@ -4616,8 +4621,8 @@ class AxiosHeaders {
4616
4621
  normalize(format2) {
4617
4622
  const self2 = this;
4618
4623
  const headers = {};
4619
- utils.forEach(this, (value, header) => {
4620
- const key = utils.findKey(headers, header);
4624
+ utils$1.forEach(this, (value, header) => {
4625
+ const key = utils$1.findKey(headers, header);
4621
4626
  if (key) {
4622
4627
  self2[key] = normalizeValue(value);
4623
4628
  delete self2[header];
@@ -4637,8 +4642,8 @@ class AxiosHeaders {
4637
4642
  }
4638
4643
  toJSON(asStrings) {
4639
4644
  const obj = /* @__PURE__ */ Object.create(null);
4640
- utils.forEach(this, (value, header) => {
4641
- value != null && value !== false && (obj[header] = asStrings && utils.isArray(value) ? value.join(", ") : value);
4645
+ utils$1.forEach(this, (value, header) => {
4646
+ value != null && value !== false && (obj[header] = asStrings && utils$1.isArray(value) ? value.join(", ") : value);
4642
4647
  });
4643
4648
  return obj;
4644
4649
  }
@@ -4672,12 +4677,12 @@ class AxiosHeaders {
4672
4677
  accessors[lHeader] = true;
4673
4678
  }
4674
4679
  }
4675
- utils.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
4680
+ utils$1.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
4676
4681
  return this;
4677
4682
  }
4678
4683
  }
4679
4684
  AxiosHeaders.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
4680
- utils.reduceDescriptors(AxiosHeaders.prototype, ({ value }, key) => {
4685
+ utils$1.reduceDescriptors(AxiosHeaders.prototype, ({ value }, key) => {
4681
4686
  let mapped = key[0].toUpperCase() + key.slice(1);
4682
4687
  return {
4683
4688
  get: () => value,
@@ -4686,14 +4691,14 @@ utils.reduceDescriptors(AxiosHeaders.prototype, ({ value }, key) => {
4686
4691
  }
4687
4692
  };
4688
4693
  });
4689
- utils.freezeMethods(AxiosHeaders);
4694
+ utils$1.freezeMethods(AxiosHeaders);
4690
4695
  const AxiosHeaders$1 = AxiosHeaders;
4691
4696
  function transformData(fns, response) {
4692
4697
  const config = this || defaults$2;
4693
4698
  const context = response || config;
4694
4699
  const headers = AxiosHeaders$1.from(context.headers);
4695
4700
  let data = context.data;
4696
- utils.forEach(fns, function transform(fn) {
4701
+ utils$1.forEach(fns, function transform(fn) {
4697
4702
  data = fn.call(config, data, headers.normalize(), response ? response.status : void 0);
4698
4703
  });
4699
4704
  headers.normalize();
@@ -4706,7 +4711,7 @@ function CanceledError(message, config, request) {
4706
4711
  AxiosError.call(this, message == null ? "canceled" : message, AxiosError.ERR_CANCELED, config, request);
4707
4712
  this.name = "CanceledError";
4708
4713
  }
4709
- utils.inherits(CanceledError, AxiosError, {
4714
+ utils$1.inherits(CanceledError, AxiosError, {
4710
4715
  __CANCEL__: true
4711
4716
  });
4712
4717
  function settle(resolve2, reject, response) {
@@ -4723,49 +4728,36 @@ function settle(resolve2, reject, response) {
4723
4728
  ));
4724
4729
  }
4725
4730
  }
4726
- const cookies = platform.isStandardBrowserEnv ? (
4731
+ const cookies = platform.hasStandardBrowserEnv ? (
4727
4732
  // Standard browser envs support document.cookie
4728
- function standardBrowserEnv() {
4729
- return {
4730
- write: function write(name, value, expires, path, domain, secure) {
4731
- const cookie = [];
4732
- cookie.push(name + "=" + encodeURIComponent(value));
4733
- if (utils.isNumber(expires)) {
4734
- cookie.push("expires=" + new Date(expires).toGMTString());
4735
- }
4736
- if (utils.isString(path)) {
4737
- cookie.push("path=" + path);
4738
- }
4739
- if (utils.isString(domain)) {
4740
- cookie.push("domain=" + domain);
4741
- }
4742
- if (secure === true) {
4743
- cookie.push("secure");
4744
- }
4745
- document.cookie = cookie.join("; ");
4746
- },
4747
- read: function read(name) {
4748
- const match = document.cookie.match(new RegExp("(^|;\\s*)(" + name + ")=([^;]*)"));
4749
- return match ? decodeURIComponent(match[3]) : null;
4750
- },
4751
- remove: function remove(name) {
4752
- this.write(name, "", Date.now() - 864e5);
4753
- }
4754
- };
4755
- }()
4733
+ {
4734
+ write(name, value, expires, path, domain, secure) {
4735
+ const cookie = [name + "=" + encodeURIComponent(value)];
4736
+ utils$1.isNumber(expires) && cookie.push("expires=" + new Date(expires).toGMTString());
4737
+ utils$1.isString(path) && cookie.push("path=" + path);
4738
+ utils$1.isString(domain) && cookie.push("domain=" + domain);
4739
+ secure === true && cookie.push("secure");
4740
+ document.cookie = cookie.join("; ");
4741
+ },
4742
+ read(name) {
4743
+ const match = document.cookie.match(new RegExp("(^|;\\s*)(" + name + ")=([^;]*)"));
4744
+ return match ? decodeURIComponent(match[3]) : null;
4745
+ },
4746
+ remove(name) {
4747
+ this.write(name, "", Date.now() - 864e5);
4748
+ }
4749
+ }
4756
4750
  ) : (
4757
- // Non standard browser env (web workers, react-native) lack needed support.
4758
- function nonStandardBrowserEnv() {
4759
- return {
4760
- write: function write() {
4761
- },
4762
- read: function read() {
4763
- return null;
4764
- },
4765
- remove: function remove() {
4766
- }
4767
- };
4768
- }()
4751
+ // Non-standard browser env (web workers, react-native) lack needed support.
4752
+ {
4753
+ write() {
4754
+ },
4755
+ read() {
4756
+ return null;
4757
+ },
4758
+ remove() {
4759
+ }
4760
+ }
4769
4761
  );
4770
4762
  function isAbsoluteURL(url) {
4771
4763
  return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
@@ -4779,10 +4771,10 @@ function buildFullPath(baseURL, requestedURL) {
4779
4771
  }
4780
4772
  return requestedURL;
4781
4773
  }
4782
- const isURLSameOrigin = platform.isStandardBrowserEnv ? (
4774
+ const isURLSameOrigin = platform.hasStandardBrowserEnv ? (
4783
4775
  // Standard browser envs have full support of the APIs needed to test
4784
4776
  // whether the request URL is of the same origin as current location.
4785
- function standardBrowserEnv2() {
4777
+ function standardBrowserEnv() {
4786
4778
  const msie = /(msie|trident)/i.test(navigator.userAgent);
4787
4779
  const urlParsingNode = document.createElement("a");
4788
4780
  let originURL;
@@ -4806,13 +4798,13 @@ const isURLSameOrigin = platform.isStandardBrowserEnv ? (
4806
4798
  }
4807
4799
  originURL = resolveURL(window.location.href);
4808
4800
  return function isURLSameOrigin2(requestURL) {
4809
- const parsed = utils.isString(requestURL) ? resolveURL(requestURL) : requestURL;
4801
+ const parsed = utils$1.isString(requestURL) ? resolveURL(requestURL) : requestURL;
4810
4802
  return parsed.protocol === originURL.protocol && parsed.host === originURL.host;
4811
4803
  };
4812
4804
  }()
4813
4805
  ) : (
4814
4806
  // Non standard browser envs (web workers, react-native) lack needed support.
4815
- function nonStandardBrowserEnv2() {
4807
+ function nonStandardBrowserEnv() {
4816
4808
  return function isURLSameOrigin2() {
4817
4809
  return true;
4818
4810
  };
@@ -4883,7 +4875,7 @@ const xhrAdapter = isXHRAdapterSupported && function(config) {
4883
4875
  return new Promise(function dispatchXhrRequest(resolve2, reject) {
4884
4876
  let requestData = config.data;
4885
4877
  const requestHeaders = AxiosHeaders$1.from(config.headers).normalize();
4886
- const responseType = config.responseType;
4878
+ let { responseType, withXSRFToken } = config;
4887
4879
  let onCanceled;
4888
4880
  function done() {
4889
4881
  if (config.cancelToken) {
@@ -4894,13 +4886,12 @@ const xhrAdapter = isXHRAdapterSupported && function(config) {
4894
4886
  }
4895
4887
  }
4896
4888
  let contentType;
4897
- if (utils.isFormData(requestData)) {
4898
- if (platform.isStandardBrowserEnv || platform.isStandardBrowserWebWorkerEnv) {
4889
+ if (utils$1.isFormData(requestData)) {
4890
+ if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {
4899
4891
  requestHeaders.setContentType(false);
4900
- } else if (!requestHeaders.getContentType(/^\s*multipart\/form-data/)) {
4901
- requestHeaders.setContentType("multipart/form-data");
4902
- } else if (utils.isString(contentType = requestHeaders.getContentType())) {
4903
- requestHeaders.setContentType(contentType.replace(/^\s*(multipart\/form-data);+/, "$1"));
4892
+ } else if ((contentType = requestHeaders.getContentType()) !== false) {
4893
+ const [type2, ...tokens] = contentType ? contentType.split(";").map((token) => token.trim()).filter(Boolean) : [];
4894
+ requestHeaders.setContentType([type2 || "multipart/form-data", ...tokens].join("; "));
4904
4895
  }
4905
4896
  }
4906
4897
  let request = new XMLHttpRequest();
@@ -4975,19 +4966,22 @@ const xhrAdapter = isXHRAdapterSupported && function(config) {
4975
4966
  ));
4976
4967
  request = null;
4977
4968
  };
4978
- if (platform.isStandardBrowserEnv) {
4979
- const xsrfValue = isURLSameOrigin(fullPath) && config.xsrfCookieName && cookies.read(config.xsrfCookieName);
4980
- if (xsrfValue) {
4981
- requestHeaders.set(config.xsrfHeaderName, xsrfValue);
4969
+ if (platform.hasStandardBrowserEnv) {
4970
+ withXSRFToken && utils$1.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(config));
4971
+ if (withXSRFToken || withXSRFToken !== false && isURLSameOrigin(fullPath)) {
4972
+ const xsrfValue = config.xsrfHeaderName && config.xsrfCookieName && cookies.read(config.xsrfCookieName);
4973
+ if (xsrfValue) {
4974
+ requestHeaders.set(config.xsrfHeaderName, xsrfValue);
4975
+ }
4982
4976
  }
4983
4977
  }
4984
4978
  requestData === void 0 && requestHeaders.setContentType(null);
4985
4979
  if ("setRequestHeader" in request) {
4986
- utils.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
4980
+ utils$1.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
4987
4981
  request.setRequestHeader(key, val);
4988
4982
  });
4989
4983
  }
4990
- if (!utils.isUndefined(config.withCredentials)) {
4984
+ if (!utils$1.isUndefined(config.withCredentials)) {
4991
4985
  request.withCredentials = !!config.withCredentials;
4992
4986
  }
4993
4987
  if (responseType && responseType !== "json") {
@@ -5025,7 +5019,7 @@ const knownAdapters = {
5025
5019
  http: httpAdapter,
5026
5020
  xhr: xhrAdapter
5027
5021
  };
5028
- utils.forEach(knownAdapters, (fn, value) => {
5022
+ utils$1.forEach(knownAdapters, (fn, value) => {
5029
5023
  if (fn) {
5030
5024
  try {
5031
5025
  Object.defineProperty(fn, "name", { value });
@@ -5035,10 +5029,10 @@ utils.forEach(knownAdapters, (fn, value) => {
5035
5029
  }
5036
5030
  });
5037
5031
  const renderReason = (reason) => `- ${reason}`;
5038
- const isResolvedHandle = (adapter) => utils.isFunction(adapter) || adapter === null || adapter === false;
5032
+ const isResolvedHandle = (adapter) => utils$1.isFunction(adapter) || adapter === null || adapter === false;
5039
5033
  const adapters = {
5040
5034
  getAdapter: (adapters2) => {
5041
- adapters2 = utils.isArray(adapters2) ? adapters2 : [adapters2];
5035
+ adapters2 = utils$1.isArray(adapters2) ? adapters2 : [adapters2];
5042
5036
  const { length } = adapters2;
5043
5037
  let nameOrAdapter;
5044
5038
  let adapter;
@@ -5120,31 +5114,31 @@ function mergeConfig(config1, config2) {
5120
5114
  config2 = config2 || {};
5121
5115
  const config = {};
5122
5116
  function getMergedValue(target, source, caseless) {
5123
- if (utils.isPlainObject(target) && utils.isPlainObject(source)) {
5124
- return utils.merge.call({ caseless }, target, source);
5125
- } else if (utils.isPlainObject(source)) {
5126
- return utils.merge({}, source);
5127
- } else if (utils.isArray(source)) {
5117
+ if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) {
5118
+ return utils$1.merge.call({ caseless }, target, source);
5119
+ } else if (utils$1.isPlainObject(source)) {
5120
+ return utils$1.merge({}, source);
5121
+ } else if (utils$1.isArray(source)) {
5128
5122
  return source.slice();
5129
5123
  }
5130
5124
  return source;
5131
5125
  }
5132
5126
  function mergeDeepProperties(a2, b2, caseless) {
5133
- if (!utils.isUndefined(b2)) {
5127
+ if (!utils$1.isUndefined(b2)) {
5134
5128
  return getMergedValue(a2, b2, caseless);
5135
- } else if (!utils.isUndefined(a2)) {
5129
+ } else if (!utils$1.isUndefined(a2)) {
5136
5130
  return getMergedValue(void 0, a2, caseless);
5137
5131
  }
5138
5132
  }
5139
5133
  function valueFromConfig2(a2, b2) {
5140
- if (!utils.isUndefined(b2)) {
5134
+ if (!utils$1.isUndefined(b2)) {
5141
5135
  return getMergedValue(void 0, b2);
5142
5136
  }
5143
5137
  }
5144
5138
  function defaultToConfig2(a2, b2) {
5145
- if (!utils.isUndefined(b2)) {
5139
+ if (!utils$1.isUndefined(b2)) {
5146
5140
  return getMergedValue(void 0, b2);
5147
- } else if (!utils.isUndefined(a2)) {
5141
+ } else if (!utils$1.isUndefined(a2)) {
5148
5142
  return getMergedValue(void 0, a2);
5149
5143
  }
5150
5144
  }
@@ -5166,6 +5160,7 @@ function mergeConfig(config1, config2) {
5166
5160
  timeout: defaultToConfig2,
5167
5161
  timeoutMessage: defaultToConfig2,
5168
5162
  withCredentials: defaultToConfig2,
5163
+ withXSRFToken: defaultToConfig2,
5169
5164
  adapter: defaultToConfig2,
5170
5165
  responseType: defaultToConfig2,
5171
5166
  xsrfCookieName: defaultToConfig2,
@@ -5185,14 +5180,14 @@ function mergeConfig(config1, config2) {
5185
5180
  validateStatus: mergeDirectKeys,
5186
5181
  headers: (a2, b2) => mergeDeepProperties(headersToObject(a2), headersToObject(b2), true)
5187
5182
  };
5188
- utils.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
5183
+ utils$1.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
5189
5184
  const merge2 = mergeMap[prop] || mergeDeepProperties;
5190
5185
  const configValue = merge2(config1[prop], config2[prop], prop);
5191
- utils.isUndefined(configValue) && merge2 !== mergeDirectKeys || (config[prop] = configValue);
5186
+ utils$1.isUndefined(configValue) && merge2 !== mergeDirectKeys || (config[prop] = configValue);
5192
5187
  });
5193
5188
  return config;
5194
5189
  }
5195
- const VERSION = "1.6.0";
5190
+ const VERSION = "1.6.2";
5196
5191
  const validators$1 = {};
5197
5192
  ["object", "boolean", "number", "function", "string", "symbol"].forEach((type2, i2) => {
5198
5193
  validators$1[type2] = function validator2(thing) {
@@ -5283,7 +5278,7 @@ class Axios {
5283
5278
  }, false);
5284
5279
  }
5285
5280
  if (paramsSerializer != null) {
5286
- if (utils.isFunction(paramsSerializer)) {
5281
+ if (utils$1.isFunction(paramsSerializer)) {
5287
5282
  config.paramsSerializer = {
5288
5283
  serialize: paramsSerializer
5289
5284
  };
@@ -5295,11 +5290,11 @@ class Axios {
5295
5290
  }
5296
5291
  }
5297
5292
  config.method = (config.method || this.defaults.method || "get").toLowerCase();
5298
- let contextHeaders = headers && utils.merge(
5293
+ let contextHeaders = headers && utils$1.merge(
5299
5294
  headers.common,
5300
5295
  headers[config.method]
5301
5296
  );
5302
- headers && utils.forEach(
5297
+ headers && utils$1.forEach(
5303
5298
  ["delete", "get", "head", "post", "put", "patch", "common"],
5304
5299
  (method) => {
5305
5300
  delete headers[method];
@@ -5364,7 +5359,7 @@ class Axios {
5364
5359
  return buildURL(fullPath, config.params, config.paramsSerializer);
5365
5360
  }
5366
5361
  }
5367
- utils.forEach(["delete", "get", "head", "options"], function forEachMethodNoData(method) {
5362
+ utils$1.forEach(["delete", "get", "head", "options"], function forEachMethodNoData(method) {
5368
5363
  Axios.prototype[method] = function(url, config) {
5369
5364
  return this.request(mergeConfig(config || {}, {
5370
5365
  method,
@@ -5373,7 +5368,7 @@ utils.forEach(["delete", "get", "head", "options"], function forEachMethodNoData
5373
5368
  }));
5374
5369
  };
5375
5370
  });
5376
- utils.forEach(["post", "put", "patch"], function forEachMethodWithData(method) {
5371
+ utils$1.forEach(["post", "put", "patch"], function forEachMethodWithData(method) {
5377
5372
  function generateHTTPMethod(isForm) {
5378
5373
  return function httpMethod(url, data, config) {
5379
5374
  return this.request(mergeConfig(config || {}, {
@@ -5484,7 +5479,7 @@ function spread(callback) {
5484
5479
  };
5485
5480
  }
5486
5481
  function isAxiosError(payload) {
5487
- return utils.isObject(payload) && payload.isAxiosError === true;
5482
+ return utils$1.isObject(payload) && payload.isAxiosError === true;
5488
5483
  }
5489
5484
  const HttpStatusCode = {
5490
5485
  Continue: 100,
@@ -5558,8 +5553,8 @@ const HttpStatusCode$1 = HttpStatusCode;
5558
5553
  function createInstance(defaultConfig) {
5559
5554
  const context = new Axios$1(defaultConfig);
5560
5555
  const instance = bind(Axios$1.prototype.request, context);
5561
- utils.extend(instance, Axios$1.prototype, context, { allOwnKeys: true });
5562
- utils.extend(instance, context, null, { allOwnKeys: true });
5556
+ utils$1.extend(instance, Axios$1.prototype, context, { allOwnKeys: true });
5557
+ utils$1.extend(instance, context, null, { allOwnKeys: true });
5563
5558
  instance.create = function create(instanceConfig) {
5564
5559
  return createInstance(mergeConfig(defaultConfig, instanceConfig));
5565
5560
  };
@@ -5581,7 +5576,7 @@ axios.spread = spread;
5581
5576
  axios.isAxiosError = isAxiosError;
5582
5577
  axios.mergeConfig = mergeConfig;
5583
5578
  axios.AxiosHeaders = AxiosHeaders$1;
5584
- axios.formToJSON = (thing) => formDataToJSON(utils.isHTMLForm(thing) ? new FormData(thing) : thing);
5579
+ axios.formToJSON = (thing) => formDataToJSON(utils$1.isHTMLForm(thing) ? new FormData(thing) : thing);
5585
5580
  axios.getAdapter = adapters.getAdapter;
5586
5581
  axios.HttpStatusCode = HttpStatusCode$1;
5587
5582
  axios.default = axios;
@@ -5982,7 +5977,7 @@ function cloneArrayDeep(val, instanceClone) {
5982
5977
  return res;
5983
5978
  }
5984
5979
  var cloneDeep_1 = cloneDeep;
5985
- const version = "55.5.0";
5980
+ const version = "55.7.0";
5986
5981
  let urlAlphabet = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
5987
5982
  let nanoid = (size2 = 21) => {
5988
5983
  let id2 = "";
@@ -23160,7 +23155,7 @@ function handleComputedProperty(options) {
23160
23155
  var _a;
23161
23156
  return Object.assign({}, options, {
23162
23157
  _computed: {
23163
- version: "8.5.0",
23158
+ version: "8.7.0",
23164
23159
  paymentMethodsUrl: ((_a = options._dev) == null ? void 0 : _a.paymentMethodsUrl) ?? "https://forms.secure-payments.app"
23165
23160
  }
23166
23161
  });
@@ -26309,7 +26304,7 @@ class RebillyInstrumentsInstance {
26309
26304
  await show({ componentName, payload });
26310
26305
  }
26311
26306
  get version() {
26312
- return `RebillyInstruments Ver.${"8.5.0"}`;
26307
+ return `RebillyInstruments Ver.${"8.7.0"}`;
26313
26308
  }
26314
26309
  on(eventName, callback) {
26315
26310
  on({ eventName, callback });