@rebilly/instruments 9.58.1 → 9.58.3

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
@@ -779,32 +779,6 @@ var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof win
779
779
  function getDefaultExportFromCjs(x2) {
780
780
  return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
781
781
  }
782
- function getAugmentedNamespace(n2) {
783
- if (n2.__esModule)
784
- return n2;
785
- var f = n2.default;
786
- if (typeof f == "function") {
787
- var a = function a2() {
788
- if (this instanceof a2) {
789
- return Reflect.construct(f, arguments, this.constructor);
790
- }
791
- return f.apply(this, arguments);
792
- };
793
- a.prototype = f.prototype;
794
- } else
795
- a = {};
796
- Object.defineProperty(a, "__esModule", { value: true });
797
- Object.keys(n2).forEach(function(k2) {
798
- var d2 = Object.getOwnPropertyDescriptor(n2, k2);
799
- Object.defineProperty(a, k2, d2.get ? d2 : {
800
- enumerable: true,
801
- get: function() {
802
- return n2[k2];
803
- }
804
- });
805
- });
806
- return a;
807
- }
808
782
  function listCacheClear$1() {
809
783
  this.__data__ = [];
810
784
  this.size = 0;
@@ -3735,7 +3709,7 @@ const toJSONObject = (obj) => {
3735
3709
  };
3736
3710
  const isAsyncFn = kindOfTest("AsyncFunction");
3737
3711
  const isThenable = (thing) => thing && (isObject$1(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);
3738
- const utils$2 = {
3712
+ const utils$1 = {
3739
3713
  isArray,
3740
3714
  isArrayBuffer,
3741
3715
  isBuffer,
@@ -3807,7 +3781,7 @@ function AxiosError(message, code2, config, request, response) {
3807
3781
  request && (this.request = request);
3808
3782
  response && (this.response = response);
3809
3783
  }
3810
- utils$2.inherits(AxiosError, Error, {
3784
+ utils$1.inherits(AxiosError, Error, {
3811
3785
  toJSON: function toJSON() {
3812
3786
  return {
3813
3787
  // Standard
@@ -3822,7 +3796,7 @@ utils$2.inherits(AxiosError, Error, {
3822
3796
  columnNumber: this.columnNumber,
3823
3797
  stack: this.stack,
3824
3798
  // Axios
3825
- config: utils$2.toJSONObject(this.config),
3799
+ config: utils$1.toJSONObject(this.config),
3826
3800
  code: this.code,
3827
3801
  status: this.response && this.response.status ? this.response.status : null
3828
3802
  };
@@ -3851,7 +3825,7 @@ Object.defineProperties(AxiosError, descriptors);
3851
3825
  Object.defineProperty(prototype$1, "isAxiosError", { value: true });
3852
3826
  AxiosError.from = (error2, code2, config, request, response, customProps) => {
3853
3827
  const axiosError = Object.create(prototype$1);
3854
- utils$2.toFlatObject(error2, axiosError, function filter2(obj) {
3828
+ utils$1.toFlatObject(error2, axiosError, function filter2(obj) {
3855
3829
  return obj !== Error.prototype;
3856
3830
  }, (prop) => {
3857
3831
  return prop !== "isAxiosError";
@@ -3864,10 +3838,10 @@ AxiosError.from = (error2, code2, config, request, response, customProps) => {
3864
3838
  };
3865
3839
  const httpAdapter = null;
3866
3840
  function isVisitable(thing) {
3867
- return utils$2.isPlainObject(thing) || utils$2.isArray(thing);
3841
+ return utils$1.isPlainObject(thing) || utils$1.isArray(thing);
3868
3842
  }
3869
3843
  function removeBrackets(key) {
3870
- return utils$2.endsWith(key, "[]") ? key.slice(0, -2) : key;
3844
+ return utils$1.endsWith(key, "[]") ? key.slice(0, -2) : key;
3871
3845
  }
3872
3846
  function renderKey(path, key, dots) {
3873
3847
  if (!path)
@@ -3878,42 +3852,42 @@ function renderKey(path, key, dots) {
3878
3852
  }).join(dots ? "." : "");
3879
3853
  }
3880
3854
  function isFlatArray(arr) {
3881
- return utils$2.isArray(arr) && !arr.some(isVisitable);
3855
+ return utils$1.isArray(arr) && !arr.some(isVisitable);
3882
3856
  }
3883
- const predicates = utils$2.toFlatObject(utils$2, {}, null, function filter(prop) {
3857
+ const predicates = utils$1.toFlatObject(utils$1, {}, null, function filter(prop) {
3884
3858
  return /^is[A-Z]/.test(prop);
3885
3859
  });
3886
3860
  function toFormData(obj, formData, options) {
3887
- if (!utils$2.isObject(obj)) {
3861
+ if (!utils$1.isObject(obj)) {
3888
3862
  throw new TypeError("target must be an object");
3889
3863
  }
3890
3864
  formData = formData || new FormData();
3891
- options = utils$2.toFlatObject(options, {
3865
+ options = utils$1.toFlatObject(options, {
3892
3866
  metaTokens: true,
3893
3867
  dots: false,
3894
3868
  indexes: false
3895
3869
  }, false, function defined(option, source) {
3896
- return !utils$2.isUndefined(source[option]);
3870
+ return !utils$1.isUndefined(source[option]);
3897
3871
  });
3898
3872
  const metaTokens = options.metaTokens;
3899
3873
  const visitor = options.visitor || defaultVisitor;
3900
3874
  const dots = options.dots;
3901
3875
  const indexes = options.indexes;
3902
3876
  const _Blob = options.Blob || typeof Blob !== "undefined" && Blob;
3903
- const useBlob = _Blob && utils$2.isSpecCompliantForm(formData);
3904
- if (!utils$2.isFunction(visitor)) {
3877
+ const useBlob = _Blob && utils$1.isSpecCompliantForm(formData);
3878
+ if (!utils$1.isFunction(visitor)) {
3905
3879
  throw new TypeError("visitor must be a function");
3906
3880
  }
3907
3881
  function convertValue(value) {
3908
3882
  if (value === null)
3909
3883
  return "";
3910
- if (utils$2.isDate(value)) {
3884
+ if (utils$1.isDate(value)) {
3911
3885
  return value.toISOString();
3912
3886
  }
3913
- if (!useBlob && utils$2.isBlob(value)) {
3887
+ if (!useBlob && utils$1.isBlob(value)) {
3914
3888
  throw new AxiosError("Blob is not supported. Use a Buffer instead.");
3915
3889
  }
3916
- if (utils$2.isArrayBuffer(value) || utils$2.isTypedArray(value)) {
3890
+ if (utils$1.isArrayBuffer(value) || utils$1.isTypedArray(value)) {
3917
3891
  return useBlob && typeof Blob === "function" ? new Blob([value]) : Buffer.from(value);
3918
3892
  }
3919
3893
  return value;
@@ -3921,13 +3895,13 @@ function toFormData(obj, formData, options) {
3921
3895
  function defaultVisitor(value, key, path) {
3922
3896
  let arr = value;
3923
3897
  if (value && !path && typeof value === "object") {
3924
- if (utils$2.endsWith(key, "{}")) {
3898
+ if (utils$1.endsWith(key, "{}")) {
3925
3899
  key = metaTokens ? key : key.slice(0, -2);
3926
3900
  value = JSON.stringify(value);
3927
- } else if (utils$2.isArray(value) && isFlatArray(value) || (utils$2.isFileList(value) || utils$2.endsWith(key, "[]")) && (arr = utils$2.toArray(value))) {
3901
+ } else if (utils$1.isArray(value) && isFlatArray(value) || (utils$1.isFileList(value) || utils$1.endsWith(key, "[]")) && (arr = utils$1.toArray(value))) {
3928
3902
  key = removeBrackets(key);
3929
3903
  arr.forEach(function each(el, index2) {
3930
- !(utils$2.isUndefined(el) || el === null) && formData.append(
3904
+ !(utils$1.isUndefined(el) || el === null) && formData.append(
3931
3905
  // eslint-disable-next-line no-nested-ternary
3932
3906
  indexes === true ? renderKey([key], index2, dots) : indexes === null ? key : key + "[]",
3933
3907
  convertValue(el)
@@ -3949,17 +3923,17 @@ function toFormData(obj, formData, options) {
3949
3923
  isVisitable
3950
3924
  });
3951
3925
  function build(value, path) {
3952
- if (utils$2.isUndefined(value))
3926
+ if (utils$1.isUndefined(value))
3953
3927
  return;
3954
3928
  if (stack.indexOf(value) !== -1) {
3955
3929
  throw Error("Circular reference detected in " + path.join("."));
3956
3930
  }
3957
3931
  stack.push(value);
3958
- utils$2.forEach(value, function each(el, key) {
3959
- const result = !(utils$2.isUndefined(el) || el === null) && visitor.call(
3932
+ utils$1.forEach(value, function each(el, key) {
3933
+ const result = !(utils$1.isUndefined(el) || el === null) && visitor.call(
3960
3934
  formData,
3961
3935
  el,
3962
- utils$2.isString(key) ? key.trim() : key,
3936
+ utils$1.isString(key) ? key.trim() : key,
3963
3937
  path,
3964
3938
  exposedHelpers
3965
3939
  );
@@ -3969,7 +3943,7 @@ function toFormData(obj, formData, options) {
3969
3943
  });
3970
3944
  stack.pop();
3971
3945
  }
3972
- if (!utils$2.isObject(obj)) {
3946
+ if (!utils$1.isObject(obj)) {
3973
3947
  throw new TypeError("data must be an object");
3974
3948
  }
3975
3949
  build(obj);
@@ -4018,7 +3992,7 @@ function buildURL(url, params, options) {
4018
3992
  if (serializeFn) {
4019
3993
  serializedParams = serializeFn(params, options);
4020
3994
  } else {
4021
- serializedParams = utils$2.isURLSearchParams(params) ? params.toString() : new AxiosURLSearchParams(params, options).toString(_encode);
3995
+ serializedParams = utils$1.isURLSearchParams(params) ? params.toString() : new AxiosURLSearchParams(params, options).toString(_encode);
4022
3996
  }
4023
3997
  if (serializedParams) {
4024
3998
  const hashmarkIndex = url.indexOf("#");
@@ -4083,7 +4057,7 @@ class InterceptorManager {
4083
4057
  * @returns {void}
4084
4058
  */
4085
4059
  forEach(fn) {
4086
- utils$2.forEach(this.handlers, function forEachHandler(h) {
4060
+ utils$1.forEach(this.handlers, function forEachHandler(h) {
4087
4061
  if (h !== null) {
4088
4062
  fn(h);
4089
4063
  }
@@ -4116,7 +4090,7 @@ const hasStandardBrowserWebWorkerEnv = (() => {
4116
4090
  self instanceof WorkerGlobalScope && typeof self.importScripts === "function";
4117
4091
  })();
4118
4092
  const origin = hasBrowserEnv && window.location.href || "http://localhost";
4119
- const utils$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4093
+ const utils = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4120
4094
  __proto__: null,
4121
4095
  hasBrowserEnv,
4122
4096
  hasStandardBrowserEnv,
@@ -4124,13 +4098,13 @@ const utils$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePrope
4124
4098
  origin
4125
4099
  }, Symbol.toStringTag, { value: "Module" }));
4126
4100
  const platform = {
4127
- ...utils$1,
4101
+ ...utils,
4128
4102
  ...platform$1
4129
4103
  };
4130
4104
  function toURLEncodedForm(data, options) {
4131
4105
  return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({
4132
4106
  visitor: function(value, key, path, helpers) {
4133
- if (platform.isNode && utils$2.isBuffer(value)) {
4107
+ if (platform.isNode && utils$1.isBuffer(value)) {
4134
4108
  this.append(key, value.toString("base64"));
4135
4109
  return false;
4136
4110
  }
@@ -4139,7 +4113,7 @@ function toURLEncodedForm(data, options) {
4139
4113
  }, options));
4140
4114
  }
4141
4115
  function parsePropPath(name) {
4142
- return utils$2.matchAll(/\w+|\[(\w*)]/g, name).map((match) => {
4116
+ return utils$1.matchAll(/\w+|\[(\w*)]/g, name).map((match) => {
4143
4117
  return match[0] === "[]" ? "" : match[1] || match[0];
4144
4118
  });
4145
4119
  }
@@ -4162,27 +4136,27 @@ function formDataToJSON(formData) {
4162
4136
  return true;
4163
4137
  const isNumericKey = Number.isFinite(+name);
4164
4138
  const isLast = index2 >= path.length;
4165
- name = !name && utils$2.isArray(target) ? target.length : name;
4139
+ name = !name && utils$1.isArray(target) ? target.length : name;
4166
4140
  if (isLast) {
4167
- if (utils$2.hasOwnProp(target, name)) {
4141
+ if (utils$1.hasOwnProp(target, name)) {
4168
4142
  target[name] = [target[name], value];
4169
4143
  } else {
4170
4144
  target[name] = value;
4171
4145
  }
4172
4146
  return !isNumericKey;
4173
4147
  }
4174
- if (!target[name] || !utils$2.isObject(target[name])) {
4148
+ if (!target[name] || !utils$1.isObject(target[name])) {
4175
4149
  target[name] = [];
4176
4150
  }
4177
4151
  const result = buildPath(path, value, target[name], index2);
4178
- if (result && utils$2.isArray(target[name])) {
4152
+ if (result && utils$1.isArray(target[name])) {
4179
4153
  target[name] = arrayToObject(target[name]);
4180
4154
  }
4181
4155
  return !isNumericKey;
4182
4156
  }
4183
- if (utils$2.isFormData(formData) && utils$2.isFunction(formData.entries)) {
4157
+ if (utils$1.isFormData(formData) && utils$1.isFunction(formData.entries)) {
4184
4158
  const obj = {};
4185
- utils$2.forEachEntry(formData, (name, value) => {
4159
+ utils$1.forEachEntry(formData, (name, value) => {
4186
4160
  buildPath(parsePropPath(name), value, obj, 0);
4187
4161
  });
4188
4162
  return obj;
@@ -4190,10 +4164,10 @@ function formDataToJSON(formData) {
4190
4164
  return null;
4191
4165
  }
4192
4166
  function stringifySafely(rawValue, parser, encoder) {
4193
- if (utils$2.isString(rawValue)) {
4167
+ if (utils$1.isString(rawValue)) {
4194
4168
  try {
4195
4169
  (parser || JSON.parse)(rawValue);
4196
- return utils$2.trim(rawValue);
4170
+ return utils$1.trim(rawValue);
4197
4171
  } catch (e2) {
4198
4172
  if (e2.name !== "SyntaxError") {
4199
4173
  throw e2;
@@ -4208,21 +4182,21 @@ const defaults$1 = {
4208
4182
  transformRequest: [function transformRequest(data, headers) {
4209
4183
  const contentType = headers.getContentType() || "";
4210
4184
  const hasJSONContentType = contentType.indexOf("application/json") > -1;
4211
- const isObjectPayload = utils$2.isObject(data);
4212
- if (isObjectPayload && utils$2.isHTMLForm(data)) {
4185
+ const isObjectPayload = utils$1.isObject(data);
4186
+ if (isObjectPayload && utils$1.isHTMLForm(data)) {
4213
4187
  data = new FormData(data);
4214
4188
  }
4215
- const isFormData2 = utils$2.isFormData(data);
4189
+ const isFormData2 = utils$1.isFormData(data);
4216
4190
  if (isFormData2) {
4217
4191
  return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;
4218
4192
  }
4219
- if (utils$2.isArrayBuffer(data) || utils$2.isBuffer(data) || utils$2.isStream(data) || utils$2.isFile(data) || utils$2.isBlob(data) || utils$2.isReadableStream(data)) {
4193
+ if (utils$1.isArrayBuffer(data) || utils$1.isBuffer(data) || utils$1.isStream(data) || utils$1.isFile(data) || utils$1.isBlob(data) || utils$1.isReadableStream(data)) {
4220
4194
  return data;
4221
4195
  }
4222
- if (utils$2.isArrayBufferView(data)) {
4196
+ if (utils$1.isArrayBufferView(data)) {
4223
4197
  return data.buffer;
4224
4198
  }
4225
- if (utils$2.isURLSearchParams(data)) {
4199
+ if (utils$1.isURLSearchParams(data)) {
4226
4200
  headers.setContentType("application/x-www-form-urlencoded;charset=utf-8", false);
4227
4201
  return data.toString();
4228
4202
  }
@@ -4231,7 +4205,7 @@ const defaults$1 = {
4231
4205
  if (contentType.indexOf("application/x-www-form-urlencoded") > -1) {
4232
4206
  return toURLEncodedForm(data, this.formSerializer).toString();
4233
4207
  }
4234
- if ((isFileList2 = utils$2.isFileList(data)) || contentType.indexOf("multipart/form-data") > -1) {
4208
+ if ((isFileList2 = utils$1.isFileList(data)) || contentType.indexOf("multipart/form-data") > -1) {
4235
4209
  const _FormData = this.env && this.env.FormData;
4236
4210
  return toFormData(
4237
4211
  isFileList2 ? { "files[]": data } : data,
@@ -4250,10 +4224,10 @@ const defaults$1 = {
4250
4224
  const transitional2 = this.transitional || defaults$1.transitional;
4251
4225
  const forcedJSONParsing = transitional2 && transitional2.forcedJSONParsing;
4252
4226
  const JSONRequested = this.responseType === "json";
4253
- if (utils$2.isResponse(data) || utils$2.isReadableStream(data)) {
4227
+ if (utils$1.isResponse(data) || utils$1.isReadableStream(data)) {
4254
4228
  return data;
4255
4229
  }
4256
- if (data && utils$2.isString(data) && (forcedJSONParsing && !this.responseType || JSONRequested)) {
4230
+ if (data && utils$1.isString(data) && (forcedJSONParsing && !this.responseType || JSONRequested)) {
4257
4231
  const silentJSONParsing = transitional2 && transitional2.silentJSONParsing;
4258
4232
  const strictJSONParsing = !silentJSONParsing && JSONRequested;
4259
4233
  try {
@@ -4292,11 +4266,11 @@ const defaults$1 = {
4292
4266
  }
4293
4267
  }
4294
4268
  };
4295
- utils$2.forEach(["delete", "get", "head", "post", "put", "patch"], (method) => {
4269
+ utils$1.forEach(["delete", "get", "head", "post", "put", "patch"], (method) => {
4296
4270
  defaults$1.headers[method] = {};
4297
4271
  });
4298
4272
  const defaults$2 = defaults$1;
4299
- const ignoreDuplicateOf = utils$2.toObjectSet([
4273
+ const ignoreDuplicateOf = utils$1.toObjectSet([
4300
4274
  "age",
4301
4275
  "authorization",
4302
4276
  "content-length",
@@ -4347,7 +4321,7 @@ function normalizeValue(value) {
4347
4321
  if (value === false || value == null) {
4348
4322
  return value;
4349
4323
  }
4350
- return utils$2.isArray(value) ? value.map(normalizeValue) : String(value);
4324
+ return utils$1.isArray(value) ? value.map(normalizeValue) : String(value);
4351
4325
  }
4352
4326
  function parseTokens(str) {
4353
4327
  const tokens = /* @__PURE__ */ Object.create(null);
@@ -4360,18 +4334,18 @@ function parseTokens(str) {
4360
4334
  }
4361
4335
  const isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
4362
4336
  function matchHeaderValue(context, value, header, filter2, isHeaderNameFilter) {
4363
- if (utils$2.isFunction(filter2)) {
4337
+ if (utils$1.isFunction(filter2)) {
4364
4338
  return filter2.call(this, value, header);
4365
4339
  }
4366
4340
  if (isHeaderNameFilter) {
4367
4341
  value = header;
4368
4342
  }
4369
- if (!utils$2.isString(value))
4343
+ if (!utils$1.isString(value))
4370
4344
  return;
4371
- if (utils$2.isString(filter2)) {
4345
+ if (utils$1.isString(filter2)) {
4372
4346
  return value.indexOf(filter2) !== -1;
4373
4347
  }
4374
- if (utils$2.isRegExp(filter2)) {
4348
+ if (utils$1.isRegExp(filter2)) {
4375
4349
  return filter2.test(value);
4376
4350
  }
4377
4351
  }
@@ -4381,7 +4355,7 @@ function formatHeader(header) {
4381
4355
  });
4382
4356
  }
4383
4357
  function buildAccessors(obj, header) {
4384
- const accessorName = utils$2.toCamelCase(" " + header);
4358
+ const accessorName = utils$1.toCamelCase(" " + header);
4385
4359
  ["get", "set", "has"].forEach((methodName) => {
4386
4360
  Object.defineProperty(obj, methodName + accessorName, {
4387
4361
  value: function(arg1, arg2, arg3) {
@@ -4402,17 +4376,17 @@ class AxiosHeaders {
4402
4376
  if (!lHeader) {
4403
4377
  throw new Error("header name must be a non-empty string");
4404
4378
  }
4405
- const key = utils$2.findKey(self2, lHeader);
4379
+ const key = utils$1.findKey(self2, lHeader);
4406
4380
  if (!key || self2[key] === void 0 || _rewrite === true || _rewrite === void 0 && self2[key] !== false) {
4407
4381
  self2[key || _header] = normalizeValue(_value);
4408
4382
  }
4409
4383
  }
4410
- const setHeaders = (headers, _rewrite) => utils$2.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
4411
- if (utils$2.isPlainObject(header) || header instanceof this.constructor) {
4384
+ const setHeaders = (headers, _rewrite) => utils$1.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
4385
+ if (utils$1.isPlainObject(header) || header instanceof this.constructor) {
4412
4386
  setHeaders(header, valueOrRewrite);
4413
- } else if (utils$2.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
4387
+ } else if (utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
4414
4388
  setHeaders(parseHeaders(header), valueOrRewrite);
4415
- } else if (utils$2.isHeaders(header)) {
4389
+ } else if (utils$1.isHeaders(header)) {
4416
4390
  for (const [key, value] of header.entries()) {
4417
4391
  setHeader(value, key, rewrite);
4418
4392
  }
@@ -4424,7 +4398,7 @@ class AxiosHeaders {
4424
4398
  get(header, parser) {
4425
4399
  header = normalizeHeader(header);
4426
4400
  if (header) {
4427
- const key = utils$2.findKey(this, header);
4401
+ const key = utils$1.findKey(this, header);
4428
4402
  if (key) {
4429
4403
  const value = this[key];
4430
4404
  if (!parser) {
@@ -4433,10 +4407,10 @@ class AxiosHeaders {
4433
4407
  if (parser === true) {
4434
4408
  return parseTokens(value);
4435
4409
  }
4436
- if (utils$2.isFunction(parser)) {
4410
+ if (utils$1.isFunction(parser)) {
4437
4411
  return parser.call(this, value, key);
4438
4412
  }
4439
- if (utils$2.isRegExp(parser)) {
4413
+ if (utils$1.isRegExp(parser)) {
4440
4414
  return parser.exec(value);
4441
4415
  }
4442
4416
  throw new TypeError("parser must be boolean|regexp|function");
@@ -4446,7 +4420,7 @@ class AxiosHeaders {
4446
4420
  has(header, matcher) {
4447
4421
  header = normalizeHeader(header);
4448
4422
  if (header) {
4449
- const key = utils$2.findKey(this, header);
4423
+ const key = utils$1.findKey(this, header);
4450
4424
  return !!(key && this[key] !== void 0 && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
4451
4425
  }
4452
4426
  return false;
@@ -4457,14 +4431,14 @@ class AxiosHeaders {
4457
4431
  function deleteHeader(_header) {
4458
4432
  _header = normalizeHeader(_header);
4459
4433
  if (_header) {
4460
- const key = utils$2.findKey(self2, _header);
4434
+ const key = utils$1.findKey(self2, _header);
4461
4435
  if (key && (!matcher || matchHeaderValue(self2, self2[key], key, matcher))) {
4462
4436
  delete self2[key];
4463
4437
  deleted = true;
4464
4438
  }
4465
4439
  }
4466
4440
  }
4467
- if (utils$2.isArray(header)) {
4441
+ if (utils$1.isArray(header)) {
4468
4442
  header.forEach(deleteHeader);
4469
4443
  } else {
4470
4444
  deleteHeader(header);
@@ -4487,8 +4461,8 @@ class AxiosHeaders {
4487
4461
  normalize(format2) {
4488
4462
  const self2 = this;
4489
4463
  const headers = {};
4490
- utils$2.forEach(this, (value, header) => {
4491
- const key = utils$2.findKey(headers, header);
4464
+ utils$1.forEach(this, (value, header) => {
4465
+ const key = utils$1.findKey(headers, header);
4492
4466
  if (key) {
4493
4467
  self2[key] = normalizeValue(value);
4494
4468
  delete self2[header];
@@ -4508,8 +4482,8 @@ class AxiosHeaders {
4508
4482
  }
4509
4483
  toJSON(asStrings) {
4510
4484
  const obj = /* @__PURE__ */ Object.create(null);
4511
- utils$2.forEach(this, (value, header) => {
4512
- value != null && value !== false && (obj[header] = asStrings && utils$2.isArray(value) ? value.join(", ") : value);
4485
+ utils$1.forEach(this, (value, header) => {
4486
+ value != null && value !== false && (obj[header] = asStrings && utils$1.isArray(value) ? value.join(", ") : value);
4513
4487
  });
4514
4488
  return obj;
4515
4489
  }
@@ -4543,12 +4517,12 @@ class AxiosHeaders {
4543
4517
  accessors[lHeader] = true;
4544
4518
  }
4545
4519
  }
4546
- utils$2.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
4520
+ utils$1.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
4547
4521
  return this;
4548
4522
  }
4549
4523
  }
4550
4524
  AxiosHeaders.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
4551
- utils$2.reduceDescriptors(AxiosHeaders.prototype, ({ value }, key) => {
4525
+ utils$1.reduceDescriptors(AxiosHeaders.prototype, ({ value }, key) => {
4552
4526
  let mapped = key[0].toUpperCase() + key.slice(1);
4553
4527
  return {
4554
4528
  get: () => value,
@@ -4557,14 +4531,14 @@ utils$2.reduceDescriptors(AxiosHeaders.prototype, ({ value }, key) => {
4557
4531
  }
4558
4532
  };
4559
4533
  });
4560
- utils$2.freezeMethods(AxiosHeaders);
4534
+ utils$1.freezeMethods(AxiosHeaders);
4561
4535
  const AxiosHeaders$1 = AxiosHeaders;
4562
4536
  function transformData(fns, response) {
4563
4537
  const config = this || defaults$2;
4564
4538
  const context = response || config;
4565
4539
  const headers = AxiosHeaders$1.from(context.headers);
4566
4540
  let data = context.data;
4567
- utils$2.forEach(fns, function transform(fn) {
4541
+ utils$1.forEach(fns, function transform(fn) {
4568
4542
  data = fn.call(config, data, headers.normalize(), response ? response.status : void 0);
4569
4543
  });
4570
4544
  headers.normalize();
@@ -4577,7 +4551,7 @@ function CanceledError(message, config, request) {
4577
4551
  AxiosError.call(this, message == null ? "canceled" : message, AxiosError.ERR_CANCELED, config, request);
4578
4552
  this.name = "CanceledError";
4579
4553
  }
4580
- utils$2.inherits(CanceledError, AxiosError, {
4554
+ utils$1.inherits(CanceledError, AxiosError, {
4581
4555
  __CANCEL__: true
4582
4556
  });
4583
4557
  function settle(resolve2, reject, response) {
@@ -4706,7 +4680,7 @@ const isURLSameOrigin = platform.hasStandardBrowserEnv ? (
4706
4680
  }
4707
4681
  originURL = resolveURL(window.location.href);
4708
4682
  return function isURLSameOrigin2(requestURL) {
4709
- const parsed = utils$2.isString(requestURL) ? resolveURL(requestURL) : requestURL;
4683
+ const parsed = utils$1.isString(requestURL) ? resolveURL(requestURL) : requestURL;
4710
4684
  return parsed.protocol === originURL.protocol && parsed.host === originURL.host;
4711
4685
  };
4712
4686
  }()
@@ -4723,9 +4697,9 @@ const cookies = platform.hasStandardBrowserEnv ? (
4723
4697
  {
4724
4698
  write(name, value, expires, path, domain, secure) {
4725
4699
  const cookie = [name + "=" + encodeURIComponent(value)];
4726
- utils$2.isNumber(expires) && cookie.push("expires=" + new Date(expires).toGMTString());
4727
- utils$2.isString(path) && cookie.push("path=" + path);
4728
- utils$2.isString(domain) && cookie.push("domain=" + domain);
4700
+ utils$1.isNumber(expires) && cookie.push("expires=" + new Date(expires).toGMTString());
4701
+ utils$1.isString(path) && cookie.push("path=" + path);
4702
+ utils$1.isString(domain) && cookie.push("domain=" + domain);
4729
4703
  secure === true && cookie.push("secure");
4730
4704
  document.cookie = cookie.join("; ");
4731
4705
  },
@@ -4766,31 +4740,31 @@ function mergeConfig(config1, config2) {
4766
4740
  config2 = config2 || {};
4767
4741
  const config = {};
4768
4742
  function getMergedValue(target, source, caseless) {
4769
- if (utils$2.isPlainObject(target) && utils$2.isPlainObject(source)) {
4770
- return utils$2.merge.call({ caseless }, target, source);
4771
- } else if (utils$2.isPlainObject(source)) {
4772
- return utils$2.merge({}, source);
4773
- } else if (utils$2.isArray(source)) {
4743
+ if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) {
4744
+ return utils$1.merge.call({ caseless }, target, source);
4745
+ } else if (utils$1.isPlainObject(source)) {
4746
+ return utils$1.merge({}, source);
4747
+ } else if (utils$1.isArray(source)) {
4774
4748
  return source.slice();
4775
4749
  }
4776
4750
  return source;
4777
4751
  }
4778
4752
  function mergeDeepProperties(a, b2, caseless) {
4779
- if (!utils$2.isUndefined(b2)) {
4753
+ if (!utils$1.isUndefined(b2)) {
4780
4754
  return getMergedValue(a, b2, caseless);
4781
- } else if (!utils$2.isUndefined(a)) {
4755
+ } else if (!utils$1.isUndefined(a)) {
4782
4756
  return getMergedValue(void 0, a, caseless);
4783
4757
  }
4784
4758
  }
4785
4759
  function valueFromConfig2(a, b2) {
4786
- if (!utils$2.isUndefined(b2)) {
4760
+ if (!utils$1.isUndefined(b2)) {
4787
4761
  return getMergedValue(void 0, b2);
4788
4762
  }
4789
4763
  }
4790
4764
  function defaultToConfig2(a, b2) {
4791
- if (!utils$2.isUndefined(b2)) {
4765
+ if (!utils$1.isUndefined(b2)) {
4792
4766
  return getMergedValue(void 0, b2);
4793
- } else if (!utils$2.isUndefined(a)) {
4767
+ } else if (!utils$1.isUndefined(a)) {
4794
4768
  return getMergedValue(void 0, a);
4795
4769
  }
4796
4770
  }
@@ -4832,10 +4806,10 @@ function mergeConfig(config1, config2) {
4832
4806
  validateStatus: mergeDirectKeys,
4833
4807
  headers: (a, b2) => mergeDeepProperties(headersToObject(a), headersToObject(b2), true)
4834
4808
  };
4835
- utils$2.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
4809
+ utils$1.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
4836
4810
  const merge2 = mergeMap[prop] || mergeDeepProperties;
4837
4811
  const configValue = merge2(config1[prop], config2[prop], prop);
4838
- utils$2.isUndefined(configValue) && merge2 !== mergeDirectKeys || (config[prop] = configValue);
4812
+ utils$1.isUndefined(configValue) && merge2 !== mergeDirectKeys || (config[prop] = configValue);
4839
4813
  });
4840
4814
  return config;
4841
4815
  }
@@ -4851,7 +4825,7 @@ const resolveConfig = (config) => {
4851
4825
  );
4852
4826
  }
4853
4827
  let contentType;
4854
- if (utils$2.isFormData(data)) {
4828
+ if (utils$1.isFormData(data)) {
4855
4829
  if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {
4856
4830
  headers.setContentType(void 0);
4857
4831
  } else if ((contentType = headers.getContentType()) !== false) {
@@ -4860,7 +4834,7 @@ const resolveConfig = (config) => {
4860
4834
  }
4861
4835
  }
4862
4836
  if (platform.hasStandardBrowserEnv) {
4863
- withXSRFToken && utils$2.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig));
4837
+ withXSRFToken && utils$1.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig));
4864
4838
  if (withXSRFToken || withXSRFToken !== false && isURLSameOrigin(newConfig.url)) {
4865
4839
  const xsrfValue = xsrfHeaderName && xsrfCookieName && cookies.read(xsrfCookieName);
4866
4840
  if (xsrfValue) {
@@ -4954,11 +4928,11 @@ const xhrAdapter = isXHRAdapterSupported && function(config) {
4954
4928
  };
4955
4929
  requestData === void 0 && requestHeaders.setContentType(null);
4956
4930
  if ("setRequestHeader" in request) {
4957
- utils$2.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
4931
+ utils$1.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
4958
4932
  request.setRequestHeader(key, val);
4959
4933
  });
4960
4934
  }
4961
- if (!utils$2.isUndefined(_config.withCredentials)) {
4935
+ if (!utils$1.isUndefined(_config.withCredentials)) {
4962
4936
  request.withCredentials = !!_config.withCredentials;
4963
4937
  }
4964
4938
  if (responseType && responseType !== "json") {
@@ -5093,7 +5067,7 @@ const supportsRequestStream = isReadableStreamSupported && (() => {
5093
5067
  const DEFAULT_CHUNK_SIZE = 64 * 1024;
5094
5068
  const supportsResponseStream = isReadableStreamSupported && !!(() => {
5095
5069
  try {
5096
- return utils$2.isReadableStream(new Response("").body);
5070
+ return utils$1.isReadableStream(new Response("").body);
5097
5071
  } catch (err) {
5098
5072
  }
5099
5073
  })();
@@ -5102,7 +5076,7 @@ const resolvers = {
5102
5076
  };
5103
5077
  isFetchSupported && ((res) => {
5104
5078
  ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((type2) => {
5105
- !resolvers[type2] && (resolvers[type2] = utils$2.isFunction(res[type2]) ? (res2) => res2[type2]() : (_2, config) => {
5079
+ !resolvers[type2] && (resolvers[type2] = utils$1.isFunction(res[type2]) ? (res2) => res2[type2]() : (_2, config) => {
5106
5080
  throw new AxiosError(`Response type '${type2}' is not supported`, AxiosError.ERR_NOT_SUPPORT, config);
5107
5081
  });
5108
5082
  });
@@ -5111,24 +5085,24 @@ const getBodyLength = async (body) => {
5111
5085
  if (body == null) {
5112
5086
  return 0;
5113
5087
  }
5114
- if (utils$2.isBlob(body)) {
5088
+ if (utils$1.isBlob(body)) {
5115
5089
  return body.size;
5116
5090
  }
5117
- if (utils$2.isSpecCompliantForm(body)) {
5091
+ if (utils$1.isSpecCompliantForm(body)) {
5118
5092
  return (await new Request(body).arrayBuffer()).byteLength;
5119
5093
  }
5120
- if (utils$2.isArrayBufferView(body)) {
5094
+ if (utils$1.isArrayBufferView(body)) {
5121
5095
  return body.byteLength;
5122
5096
  }
5123
- if (utils$2.isURLSearchParams(body)) {
5097
+ if (utils$1.isURLSearchParams(body)) {
5124
5098
  body = body + "";
5125
5099
  }
5126
- if (utils$2.isString(body)) {
5100
+ if (utils$1.isString(body)) {
5127
5101
  return (await encodeText(body)).byteLength;
5128
5102
  }
5129
5103
  };
5130
5104
  const resolveBodyLength = async (headers, body) => {
5131
- const length = utils$2.toFiniteNumber(headers.getContentLength());
5105
+ const length = utils$1.toFiniteNumber(headers.getContentLength());
5132
5106
  return length == null ? getBodyLength(body) : length;
5133
5107
  };
5134
5108
  const fetchAdapter = isFetchSupported && (async (config) => {
@@ -5164,7 +5138,7 @@ const fetchAdapter = isFetchSupported && (async (config) => {
5164
5138
  duplex: "half"
5165
5139
  });
5166
5140
  let contentTypeHeader;
5167
- if (utils$2.isFormData(data) && (contentTypeHeader = _request.headers.get("content-type"))) {
5141
+ if (utils$1.isFormData(data) && (contentTypeHeader = _request.headers.get("content-type"))) {
5168
5142
  headers.setContentType(contentTypeHeader);
5169
5143
  }
5170
5144
  if (_request.body) {
@@ -5174,7 +5148,7 @@ const fetchAdapter = isFetchSupported && (async (config) => {
5174
5148
  ), null, encodeText);
5175
5149
  }
5176
5150
  }
5177
- if (!utils$2.isString(withCredentials)) {
5151
+ if (!utils$1.isString(withCredentials)) {
5178
5152
  withCredentials = withCredentials ? "cors" : "omit";
5179
5153
  }
5180
5154
  request = new Request(url, {
@@ -5193,7 +5167,7 @@ const fetchAdapter = isFetchSupported && (async (config) => {
5193
5167
  ["status", "statusText", "headers"].forEach((prop) => {
5194
5168
  options[prop] = response[prop];
5195
5169
  });
5196
- const responseContentLength = utils$2.toFiniteNumber(response.headers.get("content-length"));
5170
+ const responseContentLength = utils$1.toFiniteNumber(response.headers.get("content-length"));
5197
5171
  response = new Response(
5198
5172
  trackStream(response.body, DEFAULT_CHUNK_SIZE, onDownloadProgress && fetchProgressDecorator(
5199
5173
  responseContentLength,
@@ -5203,7 +5177,7 @@ const fetchAdapter = isFetchSupported && (async (config) => {
5203
5177
  );
5204
5178
  }
5205
5179
  responseType = responseType || "text";
5206
- let responseData = await resolvers[utils$2.findKey(resolvers, responseType) || "text"](response, config);
5180
+ let responseData = await resolvers[utils$1.findKey(resolvers, responseType) || "text"](response, config);
5207
5181
  !isStreamResponse && onFinish();
5208
5182
  stopTimeout && stopTimeout();
5209
5183
  return await new Promise((resolve2, reject) => {
@@ -5234,7 +5208,7 @@ const knownAdapters = {
5234
5208
  xhr: xhrAdapter,
5235
5209
  fetch: fetchAdapter
5236
5210
  };
5237
- utils$2.forEach(knownAdapters, (fn, value) => {
5211
+ utils$1.forEach(knownAdapters, (fn, value) => {
5238
5212
  if (fn) {
5239
5213
  try {
5240
5214
  Object.defineProperty(fn, "name", { value });
@@ -5244,10 +5218,10 @@ utils$2.forEach(knownAdapters, (fn, value) => {
5244
5218
  }
5245
5219
  });
5246
5220
  const renderReason = (reason) => `- ${reason}`;
5247
- const isResolvedHandle = (adapter) => utils$2.isFunction(adapter) || adapter === null || adapter === false;
5221
+ const isResolvedHandle = (adapter) => utils$1.isFunction(adapter) || adapter === null || adapter === false;
5248
5222
  const adapters = {
5249
5223
  getAdapter: (adapters2) => {
5250
- adapters2 = utils$2.isArray(adapters2) ? adapters2 : [adapters2];
5224
+ adapters2 = utils$1.isArray(adapters2) ? adapters2 : [adapters2];
5251
5225
  const { length } = adapters2;
5252
5226
  let nameOrAdapter;
5253
5227
  let adapter;
@@ -5435,7 +5409,7 @@ class Axios {
5435
5409
  }, false);
5436
5410
  }
5437
5411
  if (paramsSerializer != null) {
5438
- if (utils$2.isFunction(paramsSerializer)) {
5412
+ if (utils$1.isFunction(paramsSerializer)) {
5439
5413
  config.paramsSerializer = {
5440
5414
  serialize: paramsSerializer
5441
5415
  };
@@ -5447,11 +5421,11 @@ class Axios {
5447
5421
  }
5448
5422
  }
5449
5423
  config.method = (config.method || this.defaults.method || "get").toLowerCase();
5450
- let contextHeaders = headers && utils$2.merge(
5424
+ let contextHeaders = headers && utils$1.merge(
5451
5425
  headers.common,
5452
5426
  headers[config.method]
5453
5427
  );
5454
- headers && utils$2.forEach(
5428
+ headers && utils$1.forEach(
5455
5429
  ["delete", "get", "head", "post", "put", "patch", "common"],
5456
5430
  (method) => {
5457
5431
  delete headers[method];
@@ -5516,7 +5490,7 @@ class Axios {
5516
5490
  return buildURL(fullPath, config.params, config.paramsSerializer);
5517
5491
  }
5518
5492
  }
5519
- utils$2.forEach(["delete", "get", "head", "options"], function forEachMethodNoData(method) {
5493
+ utils$1.forEach(["delete", "get", "head", "options"], function forEachMethodNoData(method) {
5520
5494
  Axios.prototype[method] = function(url, config) {
5521
5495
  return this.request(mergeConfig(config || {}, {
5522
5496
  method,
@@ -5525,7 +5499,7 @@ utils$2.forEach(["delete", "get", "head", "options"], function forEachMethodNoDa
5525
5499
  }));
5526
5500
  };
5527
5501
  });
5528
- utils$2.forEach(["post", "put", "patch"], function forEachMethodWithData(method) {
5502
+ utils$1.forEach(["post", "put", "patch"], function forEachMethodWithData(method) {
5529
5503
  function generateHTTPMethod(isForm) {
5530
5504
  return function httpMethod(url, data, config) {
5531
5505
  return this.request(mergeConfig(config || {}, {
@@ -5636,7 +5610,7 @@ function spread(callback) {
5636
5610
  };
5637
5611
  }
5638
5612
  function isAxiosError(payload) {
5639
- return utils$2.isObject(payload) && payload.isAxiosError === true;
5613
+ return utils$1.isObject(payload) && payload.isAxiosError === true;
5640
5614
  }
5641
5615
  const HttpStatusCode = {
5642
5616
  Continue: 100,
@@ -5710,8 +5684,8 @@ const HttpStatusCode$1 = HttpStatusCode;
5710
5684
  function createInstance(defaultConfig) {
5711
5685
  const context = new Axios$1(defaultConfig);
5712
5686
  const instance = bind(Axios$1.prototype.request, context);
5713
- utils$2.extend(instance, Axios$1.prototype, context, { allOwnKeys: true });
5714
- utils$2.extend(instance, context, null, { allOwnKeys: true });
5687
+ utils$1.extend(instance, Axios$1.prototype, context, { allOwnKeys: true });
5688
+ utils$1.extend(instance, context, null, { allOwnKeys: true });
5715
5689
  instance.create = function create(instanceConfig) {
5716
5690
  return createInstance(mergeConfig(defaultConfig, instanceConfig));
5717
5691
  };
@@ -5733,7 +5707,7 @@ axios.spread = spread;
5733
5707
  axios.isAxiosError = isAxiosError;
5734
5708
  axios.mergeConfig = mergeConfig;
5735
5709
  axios.AxiosHeaders = AxiosHeaders$1;
5736
- axios.formToJSON = (thing) => formDataToJSON(utils$2.isHTMLForm(thing) ? new FormData(thing) : thing);
5710
+ axios.formToJSON = (thing) => formDataToJSON(utils$1.isHTMLForm(thing) ? new FormData(thing) : thing);
5737
5711
  axios.getAdapter = adapters.getAdapter;
5738
5712
  axios.HttpStatusCode = HttpStatusCode$1;
5739
5713
  axios.default = axios;
@@ -9622,7 +9596,7 @@ function bs({ apiHandler: e2 }) {
9622
9596
  }
9623
9597
  };
9624
9598
  }
9625
- function ws$1({ apiHandler: e2 }) {
9599
+ function ws({ apiHandler: e2 }) {
9626
9600
  return {
9627
9601
  /**
9628
9602
  * @param { rebilly.GetWebsiteCollectionRequest } request
@@ -9674,7 +9648,7 @@ class ks {
9674
9648
  apiHandler: t2
9675
9649
  }), this.subscriptionPauses = as({ apiHandler: t2 }), this.subscriptionReactivations = ms({
9676
9650
  apiHandler: t2
9677
- }), this.subscriptions = fs({ apiHandler: t2 }), this.tags = $s({ apiHandler: t2 }), this.tagsRules = ps({ apiHandler: t2 }), this.tracking = hs({ apiHandler: t2 }), this.transactions = ys({ apiHandler: t2 }), this.usages = As({ apiHandler: t2 }), this.users = Rs({ apiHandler: t2 }), this.webhooks = bs({ apiHandler: t2 }), this.websites = ws$1({ apiHandler: t2 }), this.addRequestInterceptor = t2.addRequestInterceptor, this.removeRequestInterceptor = t2.removeRequestInterceptor, this.addResponseInterceptor = t2.addResponseInterceptor, this.removeResponseInterceptor = t2.removeResponseInterceptor, this.setTimeout = t2.setTimeout, this.setProxyAgent = t2.setProxyAgent, this.setSessionToken = t2.setSessionToken, this.setPublishableKey = t2.setPublishableKey, this.setEndpoints = t2.setEndpoints, this.getCancellationToken = t2.getCancellationToken, this.generateSignature = t2.generateSignature;
9651
+ }), this.subscriptions = fs({ apiHandler: t2 }), this.tags = $s({ apiHandler: t2 }), this.tagsRules = ps({ apiHandler: t2 }), this.tracking = hs({ apiHandler: t2 }), this.transactions = ys({ apiHandler: t2 }), this.usages = As({ apiHandler: t2 }), this.users = Rs({ apiHandler: t2 }), this.webhooks = bs({ apiHandler: t2 }), this.websites = ws({ apiHandler: t2 }), this.addRequestInterceptor = t2.addRequestInterceptor, this.removeRequestInterceptor = t2.removeRequestInterceptor, this.addResponseInterceptor = t2.addResponseInterceptor, this.removeResponseInterceptor = t2.removeResponseInterceptor, this.setTimeout = t2.setTimeout, this.setProxyAgent = t2.setProxyAgent, this.setSessionToken = t2.setSessionToken, this.setPublishableKey = t2.setPublishableKey, this.setEndpoints = t2.setEndpoints, this.getCancellationToken = t2.getCancellationToken, this.generateSignature = t2.generateSignature;
9678
9652
  }
9679
9653
  }
9680
9654
  function vs({ apiHandler: e2 }) {
@@ -19620,7 +19594,7 @@ function extendSubschemaMode(subschema2, { jtdDiscriminator, jtdMetadata, compos
19620
19594
  subschema2.jtdMetadata = jtdMetadata;
19621
19595
  }
19622
19596
  subschema.extendSubschemaMode = extendSubschemaMode;
19623
- var resolve$2 = {};
19597
+ var resolve$1 = {};
19624
19598
  var fastDeepEqual = function equal(a, b2) {
19625
19599
  if (a === b2)
19626
19600
  return true;
@@ -19742,10 +19716,10 @@ function escapeJsonPtr(str) {
19742
19716
  return str.replace(/~/g, "~0").replace(/\//g, "~1");
19743
19717
  }
19744
19718
  var jsonSchemaTraverseExports = jsonSchemaTraverse.exports;
19745
- Object.defineProperty(resolve$2, "__esModule", { value: true });
19746
- resolve$2.getSchemaRefs = resolve$2.resolveUrl = resolve$2.normalizeId = resolve$2._getFullPath = resolve$2.getFullPath = resolve$2.inlineRef = void 0;
19719
+ Object.defineProperty(resolve$1, "__esModule", { value: true });
19720
+ resolve$1.getSchemaRefs = resolve$1.resolveUrl = resolve$1.normalizeId = resolve$1._getFullPath = resolve$1.getFullPath = resolve$1.inlineRef = void 0;
19747
19721
  const util_1$q = util;
19748
- const equal$3 = fastDeepEqual;
19722
+ const equal$2 = fastDeepEqual;
19749
19723
  const traverse = jsonSchemaTraverseExports;
19750
19724
  const SIMPLE_INLINED = /* @__PURE__ */ new Set([
19751
19725
  "type",
@@ -19774,7 +19748,7 @@ function inlineRef(schema2, limit = true) {
19774
19748
  return false;
19775
19749
  return countKeys(schema2) <= limit;
19776
19750
  }
19777
- resolve$2.inlineRef = inlineRef;
19751
+ resolve$1.inlineRef = inlineRef;
19778
19752
  const REF_KEYWORDS = /* @__PURE__ */ new Set([
19779
19753
  "$ref",
19780
19754
  "$recursiveRef",
@@ -19810,28 +19784,28 @@ function countKeys(schema2) {
19810
19784
  }
19811
19785
  return count;
19812
19786
  }
19813
- function getFullPath(resolver, id2 = "", normalize2) {
19814
- if (normalize2 !== false)
19787
+ function getFullPath(resolver, id2 = "", normalize) {
19788
+ if (normalize !== false)
19815
19789
  id2 = normalizeId(id2);
19816
19790
  const p2 = resolver.parse(id2);
19817
19791
  return _getFullPath(resolver, p2);
19818
19792
  }
19819
- resolve$2.getFullPath = getFullPath;
19793
+ resolve$1.getFullPath = getFullPath;
19820
19794
  function _getFullPath(resolver, p2) {
19821
19795
  const serialized = resolver.serialize(p2);
19822
19796
  return serialized.split("#")[0] + "#";
19823
19797
  }
19824
- resolve$2._getFullPath = _getFullPath;
19798
+ resolve$1._getFullPath = _getFullPath;
19825
19799
  const TRAILING_SLASH_HASH = /#\/?$/;
19826
19800
  function normalizeId(id2) {
19827
19801
  return id2 ? id2.replace(TRAILING_SLASH_HASH, "") : "";
19828
19802
  }
19829
- resolve$2.normalizeId = normalizeId;
19803
+ resolve$1.normalizeId = normalizeId;
19830
19804
  function resolveUrl(resolver, baseId, id2) {
19831
19805
  id2 = normalizeId(id2);
19832
19806
  return resolver.resolve(baseId, id2);
19833
19807
  }
19834
- resolve$2.resolveUrl = resolveUrl;
19808
+ resolve$1.resolveUrl = resolveUrl;
19835
19809
  const ANCHOR = /^[a-z_][-a-z0-9._]*$/i;
19836
19810
  function getSchemaRefs(schema2, baseId) {
19837
19811
  if (typeof schema2 == "boolean")
@@ -19883,14 +19857,14 @@ function getSchemaRefs(schema2, baseId) {
19883
19857
  });
19884
19858
  return localRefs;
19885
19859
  function checkAmbiguosRef(sch1, sch2, ref2) {
19886
- if (sch2 !== void 0 && !equal$3(sch1, sch2))
19860
+ if (sch2 !== void 0 && !equal$2(sch1, sch2))
19887
19861
  throw ambiguos(ref2);
19888
19862
  }
19889
19863
  function ambiguos(ref2) {
19890
19864
  return new Error(`reference "${ref2}" resolves to more than one schema`);
19891
19865
  }
19892
19866
  }
19893
- resolve$2.getSchemaRefs = getSchemaRefs;
19867
+ resolve$1.getSchemaRefs = getSchemaRefs;
19894
19868
  Object.defineProperty(validate$1, "__esModule", { value: true });
19895
19869
  validate$1.getData = validate$1.KeywordCxt = validate$1.validateFunctionCode = void 0;
19896
19870
  const boolSchema_1 = boolSchema;
@@ -19902,7 +19876,7 @@ const keyword_1 = keyword;
19902
19876
  const subschema_1 = subschema;
19903
19877
  const codegen_1$r = codegen;
19904
19878
  const names_1$6 = names$1;
19905
- const resolve_1$2 = resolve$2;
19879
+ const resolve_1$2 = resolve$1;
19906
19880
  const util_1$p = util;
19907
19881
  const errors_1 = errors;
19908
19882
  function validateFunctionCode(it2) {
@@ -20403,7 +20377,7 @@ class ValidationError extends Error {
20403
20377
  validation_error.default = ValidationError;
20404
20378
  var ref_error = {};
20405
20379
  Object.defineProperty(ref_error, "__esModule", { value: true });
20406
- const resolve_1$1 = resolve$2;
20380
+ const resolve_1$1 = resolve$1;
20407
20381
  class MissingRefError extends Error {
20408
20382
  constructor(resolver, baseId, ref2, msg) {
20409
20383
  super(msg || `can't resolve reference ${ref2} from id ${baseId}`);
@@ -20418,7 +20392,7 @@ compile.resolveSchema = compile.getCompilingSchema = compile.resolveRef = compil
20418
20392
  const codegen_1$q = codegen;
20419
20393
  const validation_error_1 = validation_error;
20420
20394
  const names_1$5 = names$1;
20421
- const resolve_1 = resolve$2;
20395
+ const resolve_1 = resolve$1;
20422
20396
  const util_1$o = util;
20423
20397
  const validate_1$1 = validate$1;
20424
20398
  class SchemaEnv {
@@ -20533,7 +20507,7 @@ function resolveRef(root2, baseId, ref2) {
20533
20507
  const schOrFunc = root2.refs[ref2];
20534
20508
  if (schOrFunc)
20535
20509
  return schOrFunc;
20536
- let _sch = resolve$1.call(this, root2, ref2);
20510
+ let _sch = resolve.call(this, root2, ref2);
20537
20511
  if (_sch === void 0) {
20538
20512
  const schema2 = (_a = root2.localRefs) === null || _a === void 0 ? void 0 : _a[ref2];
20539
20513
  const { schemaId } = this.opts;
@@ -20560,7 +20534,7 @@ compile.getCompilingSchema = getCompilingSchema;
20560
20534
  function sameSchemaEnv(s1, s2) {
20561
20535
  return s1.schema === s2.schema && s1.root === s2.root && s1.baseId === s2.baseId;
20562
20536
  }
20563
- function resolve$1(root2, ref2) {
20537
+ function resolve(root2, ref2) {
20564
20538
  let sch;
20565
20539
  while (typeof (sch = this.refs[ref2]) == "string")
20566
20540
  ref2 = sch;
@@ -20659,662 +20633,1050 @@ const require$$9 = {
20659
20633
  additionalProperties: additionalProperties$1
20660
20634
  };
20661
20635
  var uri$1 = {};
20662
- var fastUri$1 = { exports: {} };
20663
- const __viteBrowserExternal = {};
20664
- const __viteBrowserExternal$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
20665
- __proto__: null,
20666
- default: __viteBrowserExternal
20667
- }, Symbol.toStringTag, { value: "Module" }));
20668
- const require$$0$1 = /* @__PURE__ */ getAugmentedNamespace(__viteBrowserExternal$1);
20669
- const HEX$1 = {
20670
- 0: 0,
20671
- 1: 1,
20672
- 2: 2,
20673
- 3: 3,
20674
- 4: 4,
20675
- 5: 5,
20676
- 6: 6,
20677
- 7: 7,
20678
- 8: 8,
20679
- 9: 9,
20680
- a: 10,
20681
- A: 10,
20682
- b: 11,
20683
- B: 11,
20684
- c: 12,
20685
- C: 12,
20686
- d: 13,
20687
- D: 13,
20688
- e: 14,
20689
- E: 14,
20690
- f: 15,
20691
- F: 15
20692
- };
20693
- var scopedChars = {
20694
- HEX: HEX$1
20695
- };
20696
- const { HEX } = scopedChars;
20697
- function normalizeIPv4$1(host) {
20698
- if (findToken(host, ".") < 3) {
20699
- return { host, isIPV4: false };
20700
- }
20701
- const matches = host.match(/^(\b[01]?\d{1,2}|\b2[0-4]\d|\b25[0-5])(\.([01]?\d{1,2}|2[0-4]\d|25[0-5])){3}$/u) || [];
20702
- const [address] = matches;
20703
- if (address) {
20704
- return { host: stripLeadingZeros(address, "."), isIPV4: true };
20705
- } else {
20706
- return { host, isIPV4: false };
20707
- }
20708
- }
20709
- function stringToHexStripped(input) {
20710
- let acc = "";
20711
- let strip = true;
20712
- for (const c of input) {
20713
- if (c !== "0" && strip === true)
20714
- strip = false;
20715
- if (HEX[c] === void 0)
20716
- return void 0;
20717
- if (!strip)
20718
- acc += c;
20719
- }
20720
- return acc;
20721
- }
20722
- function getIPV6(input) {
20723
- let tokenCount = 0;
20724
- const output = { error: false, address: "", zone: "" };
20725
- const address = [];
20726
- const buffer = [];
20727
- let isZone = false;
20728
- let endipv6Encountered = false;
20729
- let endIpv6 = false;
20730
- function consume() {
20731
- if (buffer.length) {
20732
- if (isZone === false) {
20733
- const hex = stringToHexStripped(buffer.join(""));
20734
- if (hex !== void 0) {
20735
- address.push(hex);
20736
- } else {
20737
- output.error = true;
20738
- return false;
20636
+ var uri_all = { exports: {} };
20637
+ /** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */
20638
+ (function(module, exports) {
20639
+ (function(global2, factory) {
20640
+ factory(exports);
20641
+ })(commonjsGlobal, function(exports2) {
20642
+ function merge2() {
20643
+ for (var _len = arguments.length, sets = Array(_len), _key = 0; _key < _len; _key++) {
20644
+ sets[_key] = arguments[_key];
20645
+ }
20646
+ if (sets.length > 1) {
20647
+ sets[0] = sets[0].slice(0, -1);
20648
+ var xl = sets.length - 1;
20649
+ for (var x2 = 1; x2 < xl; ++x2) {
20650
+ sets[x2] = sets[x2].slice(1, -1);
20739
20651
  }
20652
+ sets[xl] = sets[xl].slice(1);
20653
+ return sets.join("");
20654
+ } else {
20655
+ return sets[0];
20740
20656
  }
20741
- buffer.length = 0;
20742
20657
  }
20743
- return true;
20744
- }
20745
- for (let i = 0; i < input.length; i++) {
20746
- const cursor = input[i];
20747
- if (cursor === "[" || cursor === "]") {
20748
- continue;
20658
+ function subexp(str) {
20659
+ return "(?:" + str + ")";
20749
20660
  }
20750
- if (cursor === ":") {
20751
- if (endipv6Encountered === true) {
20752
- endIpv6 = true;
20753
- }
20754
- if (!consume()) {
20755
- break;
20756
- }
20757
- tokenCount++;
20758
- address.push(":");
20759
- if (tokenCount > 7) {
20760
- output.error = true;
20761
- break;
20762
- }
20763
- if (i - 1 >= 0 && input[i - 1] === ":") {
20764
- endipv6Encountered = true;
20765
- }
20766
- continue;
20767
- } else if (cursor === "%") {
20768
- if (!consume()) {
20769
- break;
20770
- }
20771
- isZone = true;
20772
- } else {
20773
- buffer.push(cursor);
20774
- continue;
20661
+ function typeOf(o2) {
20662
+ return o2 === void 0 ? "undefined" : o2 === null ? "null" : Object.prototype.toString.call(o2).split(" ").pop().split("]").shift().toLowerCase();
20775
20663
  }
20776
- }
20777
- if (buffer.length) {
20778
- if (isZone) {
20779
- output.zone = buffer.join("");
20780
- } else if (endIpv6) {
20781
- address.push(buffer.join(""));
20782
- } else {
20783
- address.push(stringToHexStripped(buffer.join("")));
20664
+ function toUpperCase(str) {
20665
+ return str.toUpperCase();
20784
20666
  }
20785
- }
20786
- output.address = address.join("");
20787
- return output;
20788
- }
20789
- function normalizeIPv6$1(host, opts = {}) {
20790
- if (findToken(host, ":") < 2) {
20791
- return { host, isIPV6: false };
20792
- }
20793
- const ipv6 = getIPV6(host);
20794
- if (!ipv6.error) {
20795
- let newHost = ipv6.address;
20796
- let escapedHost = ipv6.address;
20797
- if (ipv6.zone) {
20798
- newHost += "%" + ipv6.zone;
20799
- escapedHost += "%25" + ipv6.zone;
20667
+ function toArray2(obj) {
20668
+ return obj !== void 0 && obj !== null ? obj instanceof Array ? obj : typeof obj.length !== "number" || obj.split || obj.setInterval || obj.call ? [obj] : Array.prototype.slice.call(obj) : [];
20800
20669
  }
20801
- return { host: newHost, escapedHost, isIPV6: true };
20802
- } else {
20803
- return { host, isIPV6: false };
20804
- }
20805
- }
20806
- function stripLeadingZeros(str, token) {
20807
- let out = "";
20808
- let skip = true;
20809
- const l = str.length;
20810
- for (let i = 0; i < l; i++) {
20811
- const c = str[i];
20812
- if (c === "0" && skip) {
20813
- if (i + 1 <= l && str[i + 1] === token || i + 1 === l) {
20814
- out += c;
20815
- skip = false;
20816
- }
20817
- } else {
20818
- if (c === token) {
20819
- skip = true;
20820
- } else {
20821
- skip = false;
20822
- }
20823
- out += c;
20824
- }
20825
- }
20826
- return out;
20827
- }
20828
- function findToken(str, token) {
20829
- let ind = 0;
20830
- for (let i = 0; i < str.length; i++) {
20831
- if (str[i] === token)
20832
- ind++;
20833
- }
20834
- return ind;
20835
- }
20836
- const RDS1 = /^\.\.?\//u;
20837
- const RDS2 = /^\/\.(?:\/|$)/u;
20838
- const RDS3 = /^\/\.\.(?:\/|$)/u;
20839
- const RDS5 = /^\/?(?:.|\n)*?(?=\/|$)/u;
20840
- function removeDotSegments$1(input) {
20841
- const output = [];
20842
- while (input.length) {
20843
- if (input.match(RDS1)) {
20844
- input = input.replace(RDS1, "");
20845
- } else if (input.match(RDS2)) {
20846
- input = input.replace(RDS2, "/");
20847
- } else if (input.match(RDS3)) {
20848
- input = input.replace(RDS3, "/");
20849
- output.pop();
20850
- } else if (input === "." || input === "..") {
20851
- input = "";
20852
- } else {
20853
- const im = input.match(RDS5);
20854
- if (im) {
20855
- const s = im[0];
20856
- input = input.slice(s.length);
20857
- output.push(s);
20858
- } else {
20859
- throw new Error("Unexpected dot segment condition");
20670
+ function assign(target, source) {
20671
+ var obj = target;
20672
+ if (source) {
20673
+ for (var key in source) {
20674
+ obj[key] = source[key];
20675
+ }
20860
20676
  }
20677
+ return obj;
20678
+ }
20679
+ function buildExps(isIRI) {
20680
+ var ALPHA$$ = "[A-Za-z]", DIGIT$$ = "[0-9]", HEXDIG$$2 = merge2(DIGIT$$, "[A-Fa-f]"), PCT_ENCODED$2 = subexp(subexp("%[EFef]" + HEXDIG$$2 + "%" + HEXDIG$$2 + HEXDIG$$2 + "%" + HEXDIG$$2 + HEXDIG$$2) + "|" + subexp("%[89A-Fa-f]" + HEXDIG$$2 + "%" + HEXDIG$$2 + HEXDIG$$2) + "|" + subexp("%" + HEXDIG$$2 + HEXDIG$$2)), GEN_DELIMS$$ = "[\\:\\/\\?\\#\\[\\]\\@]", SUB_DELIMS$$ = "[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]", RESERVED$$ = merge2(GEN_DELIMS$$, SUB_DELIMS$$), UCSCHAR$$ = isIRI ? "[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]" : "[]", IPRIVATE$$ = isIRI ? "[\\uE000-\\uF8FF]" : "[]", UNRESERVED$$2 = merge2(ALPHA$$, DIGIT$$, "[\\-\\.\\_\\~]", UCSCHAR$$);
20681
+ subexp(ALPHA$$ + merge2(ALPHA$$, DIGIT$$, "[\\+\\-\\.]") + "*");
20682
+ subexp(subexp(PCT_ENCODED$2 + "|" + merge2(UNRESERVED$$2, SUB_DELIMS$$, "[\\:]")) + "*");
20683
+ var DEC_OCTET_RELAXED$ = subexp(subexp("25[0-5]") + "|" + subexp("2[0-4]" + DIGIT$$) + "|" + subexp("1" + DIGIT$$ + DIGIT$$) + "|" + subexp("0?[1-9]" + DIGIT$$) + "|0?0?" + DIGIT$$), IPV4ADDRESS$ = subexp(DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$), H16$ = subexp(HEXDIG$$2 + "{1,4}"), LS32$ = subexp(subexp(H16$ + "\\:" + H16$) + "|" + IPV4ADDRESS$), IPV6ADDRESS1$ = subexp(subexp(H16$ + "\\:") + "{6}" + LS32$), IPV6ADDRESS2$ = subexp("\\:\\:" + subexp(H16$ + "\\:") + "{5}" + LS32$), IPV6ADDRESS3$ = subexp(subexp(H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{4}" + LS32$), IPV6ADDRESS4$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,1}" + H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{3}" + LS32$), IPV6ADDRESS5$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,2}" + H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{2}" + LS32$), IPV6ADDRESS6$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,3}" + H16$) + "?\\:\\:" + H16$ + "\\:" + LS32$), IPV6ADDRESS7$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,4}" + H16$) + "?\\:\\:" + LS32$), IPV6ADDRESS8$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,5}" + H16$) + "?\\:\\:" + H16$), IPV6ADDRESS9$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,6}" + H16$) + "?\\:\\:"), IPV6ADDRESS$ = subexp([IPV6ADDRESS1$, IPV6ADDRESS2$, IPV6ADDRESS3$, IPV6ADDRESS4$, IPV6ADDRESS5$, IPV6ADDRESS6$, IPV6ADDRESS7$, IPV6ADDRESS8$, IPV6ADDRESS9$].join("|")), ZONEID$ = subexp(subexp(UNRESERVED$$2 + "|" + PCT_ENCODED$2) + "+");
20684
+ subexp("[vV]" + HEXDIG$$2 + "+\\." + merge2(UNRESERVED$$2, SUB_DELIMS$$, "[\\:]") + "+");
20685
+ subexp(subexp(PCT_ENCODED$2 + "|" + merge2(UNRESERVED$$2, SUB_DELIMS$$)) + "*");
20686
+ var PCHAR$ = subexp(PCT_ENCODED$2 + "|" + merge2(UNRESERVED$$2, SUB_DELIMS$$, "[\\:\\@]"));
20687
+ subexp(subexp(PCT_ENCODED$2 + "|" + merge2(UNRESERVED$$2, SUB_DELIMS$$, "[\\@]")) + "+");
20688
+ subexp(subexp(PCHAR$ + "|" + merge2("[\\/\\?]", IPRIVATE$$)) + "*");
20689
+ return {
20690
+ NOT_SCHEME: new RegExp(merge2("[^]", ALPHA$$, DIGIT$$, "[\\+\\-\\.]"), "g"),
20691
+ NOT_USERINFO: new RegExp(merge2("[^\\%\\:]", UNRESERVED$$2, SUB_DELIMS$$), "g"),
20692
+ NOT_HOST: new RegExp(merge2("[^\\%\\[\\]\\:]", UNRESERVED$$2, SUB_DELIMS$$), "g"),
20693
+ NOT_PATH: new RegExp(merge2("[^\\%\\/\\:\\@]", UNRESERVED$$2, SUB_DELIMS$$), "g"),
20694
+ NOT_PATH_NOSCHEME: new RegExp(merge2("[^\\%\\/\\@]", UNRESERVED$$2, SUB_DELIMS$$), "g"),
20695
+ NOT_QUERY: new RegExp(merge2("[^\\%]", UNRESERVED$$2, SUB_DELIMS$$, "[\\:\\@\\/\\?]", IPRIVATE$$), "g"),
20696
+ NOT_FRAGMENT: new RegExp(merge2("[^\\%]", UNRESERVED$$2, SUB_DELIMS$$, "[\\:\\@\\/\\?]"), "g"),
20697
+ ESCAPE: new RegExp(merge2("[^]", UNRESERVED$$2, SUB_DELIMS$$), "g"),
20698
+ UNRESERVED: new RegExp(UNRESERVED$$2, "g"),
20699
+ OTHER_CHARS: new RegExp(merge2("[^\\%]", UNRESERVED$$2, RESERVED$$), "g"),
20700
+ PCT_ENCODED: new RegExp(PCT_ENCODED$2, "g"),
20701
+ IPV4ADDRESS: new RegExp("^(" + IPV4ADDRESS$ + ")$"),
20702
+ IPV6ADDRESS: new RegExp("^\\[?(" + IPV6ADDRESS$ + ")" + subexp(subexp("\\%25|\\%(?!" + HEXDIG$$2 + "{2})") + "(" + ZONEID$ + ")") + "?\\]?$")
20703
+ //RFC 6874, with relaxed parsing rules
20704
+ };
20861
20705
  }
20862
- }
20863
- return output.join("");
20864
- }
20865
- function normalizeComponentEncoding$1(components, esc) {
20866
- const func = esc !== true ? escape : unescape;
20867
- if (components.scheme !== void 0) {
20868
- components.scheme = func(components.scheme);
20869
- }
20870
- if (components.userinfo !== void 0) {
20871
- components.userinfo = func(components.userinfo);
20872
- }
20873
- if (components.host !== void 0) {
20874
- components.host = func(components.host);
20875
- }
20876
- if (components.path !== void 0) {
20877
- components.path = func(components.path);
20878
- }
20879
- if (components.query !== void 0) {
20880
- components.query = func(components.query);
20881
- }
20882
- if (components.fragment !== void 0) {
20883
- components.fragment = func(components.fragment);
20884
- }
20885
- return components;
20886
- }
20887
- function recomposeAuthority$1(components, options) {
20888
- const uriTokens = [];
20889
- if (components.userinfo !== void 0) {
20890
- uriTokens.push(components.userinfo);
20891
- uriTokens.push("@");
20892
- }
20893
- if (components.host !== void 0) {
20894
- let host = unescape(components.host);
20895
- const ipV4res = normalizeIPv4$1(host);
20896
- if (ipV4res.isIPV4) {
20897
- host = ipV4res.host;
20898
- } else {
20899
- const ipV6res = normalizeIPv6$1(ipV4res.host, { isIPV4: false });
20900
- if (ipV6res.isIPV6 === true) {
20901
- host = `[${ipV6res.escapedHost}]`;
20706
+ var URI_PROTOCOL = buildExps(false);
20707
+ var IRI_PROTOCOL = buildExps(true);
20708
+ var slicedToArray = /* @__PURE__ */ function() {
20709
+ function sliceIterator(arr, i) {
20710
+ var _arr = [];
20711
+ var _n = true;
20712
+ var _d = false;
20713
+ var _e2 = void 0;
20714
+ try {
20715
+ for (var _i = arr[Symbol.iterator](), _s2; !(_n = (_s2 = _i.next()).done); _n = true) {
20716
+ _arr.push(_s2.value);
20717
+ if (i && _arr.length === i)
20718
+ break;
20719
+ }
20720
+ } catch (err) {
20721
+ _d = true;
20722
+ _e2 = err;
20723
+ } finally {
20724
+ try {
20725
+ if (!_n && _i["return"])
20726
+ _i["return"]();
20727
+ } finally {
20728
+ if (_d)
20729
+ throw _e2;
20730
+ }
20731
+ }
20732
+ return _arr;
20733
+ }
20734
+ return function(arr, i) {
20735
+ if (Array.isArray(arr)) {
20736
+ return arr;
20737
+ } else if (Symbol.iterator in Object(arr)) {
20738
+ return sliceIterator(arr, i);
20739
+ } else {
20740
+ throw new TypeError("Invalid attempt to destructure non-iterable instance");
20741
+ }
20742
+ };
20743
+ }();
20744
+ var toConsumableArray = function(arr) {
20745
+ if (Array.isArray(arr)) {
20746
+ for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++)
20747
+ arr2[i] = arr[i];
20748
+ return arr2;
20902
20749
  } else {
20903
- host = components.host;
20750
+ return Array.from(arr);
20751
+ }
20752
+ };
20753
+ var maxInt = 2147483647;
20754
+ var base = 36;
20755
+ var tMin = 1;
20756
+ var tMax = 26;
20757
+ var skew = 38;
20758
+ var damp = 700;
20759
+ var initialBias = 72;
20760
+ var initialN = 128;
20761
+ var delimiter = "-";
20762
+ var regexPunycode = /^xn--/;
20763
+ var regexNonASCII = /[^\0-\x7E]/;
20764
+ var regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g;
20765
+ var errors2 = {
20766
+ "overflow": "Overflow: input needs wider integers to process",
20767
+ "not-basic": "Illegal input >= 0x80 (not a basic code point)",
20768
+ "invalid-input": "Invalid input"
20769
+ };
20770
+ var baseMinusTMin = base - tMin;
20771
+ var floor = Math.floor;
20772
+ var stringFromCharCode = String.fromCharCode;
20773
+ function error$12(type2) {
20774
+ throw new RangeError(errors2[type2]);
20775
+ }
20776
+ function map(array, fn) {
20777
+ var result = [];
20778
+ var length = array.length;
20779
+ while (length--) {
20780
+ result[length] = fn(array[length]);
20781
+ }
20782
+ return result;
20783
+ }
20784
+ function mapDomain(string, fn) {
20785
+ var parts = string.split("@");
20786
+ var result = "";
20787
+ if (parts.length > 1) {
20788
+ result = parts[0] + "@";
20789
+ string = parts[1];
20790
+ }
20791
+ string = string.replace(regexSeparators, ".");
20792
+ var labels = string.split(".");
20793
+ var encoded = map(labels, fn).join(".");
20794
+ return result + encoded;
20795
+ }
20796
+ function ucs2decode(string) {
20797
+ var output = [];
20798
+ var counter = 0;
20799
+ var length = string.length;
20800
+ while (counter < length) {
20801
+ var value = string.charCodeAt(counter++);
20802
+ if (value >= 55296 && value <= 56319 && counter < length) {
20803
+ var extra = string.charCodeAt(counter++);
20804
+ if ((extra & 64512) == 56320) {
20805
+ output.push(((value & 1023) << 10) + (extra & 1023) + 65536);
20806
+ } else {
20807
+ output.push(value);
20808
+ counter--;
20809
+ }
20810
+ } else {
20811
+ output.push(value);
20812
+ }
20904
20813
  }
20814
+ return output;
20905
20815
  }
20906
- uriTokens.push(host);
20907
- }
20908
- if (typeof components.port === "number" || typeof components.port === "string") {
20909
- uriTokens.push(":");
20910
- uriTokens.push(String(components.port));
20911
- }
20912
- return uriTokens.length ? uriTokens.join("") : void 0;
20913
- }
20914
- var utils = {
20915
- recomposeAuthority: recomposeAuthority$1,
20916
- normalizeComponentEncoding: normalizeComponentEncoding$1,
20917
- removeDotSegments: removeDotSegments$1,
20918
- normalizeIPv4: normalizeIPv4$1,
20919
- normalizeIPv6: normalizeIPv6$1,
20920
- stringToHexStripped
20921
- };
20922
- const UUID_REG = /^[\da-f]{8}\b-[\da-f]{4}\b-[\da-f]{4}\b-[\da-f]{4}\b-[\da-f]{12}$/iu;
20923
- const URN_REG = /([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;
20924
- function isSecure(wsComponents) {
20925
- return typeof wsComponents.secure === "boolean" ? wsComponents.secure : String(wsComponents.scheme).toLowerCase() === "wss";
20926
- }
20927
- function httpParse(components) {
20928
- if (!components.host) {
20929
- components.error = components.error || "HTTP URIs must have a host.";
20930
- }
20931
- return components;
20932
- }
20933
- function httpSerialize(components) {
20934
- const secure = String(components.scheme).toLowerCase() === "https";
20935
- if (components.port === (secure ? 443 : 80) || components.port === "") {
20936
- components.port = void 0;
20937
- }
20938
- if (!components.path) {
20939
- components.path = "/";
20940
- }
20941
- return components;
20942
- }
20943
- function wsParse(wsComponents) {
20944
- wsComponents.secure = isSecure(wsComponents);
20945
- wsComponents.resourceName = (wsComponents.path || "/") + (wsComponents.query ? "?" + wsComponents.query : "");
20946
- wsComponents.path = void 0;
20947
- wsComponents.query = void 0;
20948
- return wsComponents;
20949
- }
20950
- function wsSerialize(wsComponents) {
20951
- if (wsComponents.port === (isSecure(wsComponents) ? 443 : 80) || wsComponents.port === "") {
20952
- wsComponents.port = void 0;
20953
- }
20954
- if (typeof wsComponents.secure === "boolean") {
20955
- wsComponents.scheme = wsComponents.secure ? "wss" : "ws";
20956
- wsComponents.secure = void 0;
20957
- }
20958
- if (wsComponents.resourceName) {
20959
- const [path, query] = wsComponents.resourceName.split("?");
20960
- wsComponents.path = path && path !== "/" ? path : void 0;
20961
- wsComponents.query = query;
20962
- wsComponents.resourceName = void 0;
20963
- }
20964
- wsComponents.fragment = void 0;
20965
- return wsComponents;
20966
- }
20967
- function urnParse(urnComponents, options) {
20968
- if (!urnComponents.path) {
20969
- urnComponents.error = "URN can not be parsed";
20970
- return urnComponents;
20971
- }
20972
- const matches = urnComponents.path.match(URN_REG);
20973
- if (matches) {
20974
- const scheme = options.scheme || urnComponents.scheme || "urn";
20975
- urnComponents.nid = matches[1].toLowerCase();
20976
- urnComponents.nss = matches[2];
20977
- const urnScheme = `${scheme}:${options.nid || urnComponents.nid}`;
20978
- const schemeHandler = SCHEMES$1[urnScheme];
20979
- urnComponents.path = void 0;
20980
- if (schemeHandler) {
20981
- urnComponents = schemeHandler.parse(urnComponents, options);
20816
+ var ucs2encode = function ucs2encode2(array) {
20817
+ return String.fromCodePoint.apply(String, toConsumableArray(array));
20818
+ };
20819
+ var basicToDigit = function basicToDigit2(codePoint) {
20820
+ if (codePoint - 48 < 10) {
20821
+ return codePoint - 22;
20822
+ }
20823
+ if (codePoint - 65 < 26) {
20824
+ return codePoint - 65;
20825
+ }
20826
+ if (codePoint - 97 < 26) {
20827
+ return codePoint - 97;
20828
+ }
20829
+ return base;
20830
+ };
20831
+ var digitToBasic = function digitToBasic2(digit, flag) {
20832
+ return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);
20833
+ };
20834
+ var adapt = function adapt2(delta, numPoints, firstTime) {
20835
+ var k2 = 0;
20836
+ delta = firstTime ? floor(delta / damp) : delta >> 1;
20837
+ delta += floor(delta / numPoints);
20838
+ for (
20839
+ ;
20840
+ /* no initialization */
20841
+ delta > baseMinusTMin * tMax >> 1;
20842
+ k2 += base
20843
+ ) {
20844
+ delta = floor(delta / baseMinusTMin);
20845
+ }
20846
+ return floor(k2 + (baseMinusTMin + 1) * delta / (delta + skew));
20847
+ };
20848
+ var decode = function decode2(input) {
20849
+ var output = [];
20850
+ var inputLength = input.length;
20851
+ var i = 0;
20852
+ var n2 = initialN;
20853
+ var bias = initialBias;
20854
+ var basic = input.lastIndexOf(delimiter);
20855
+ if (basic < 0) {
20856
+ basic = 0;
20857
+ }
20858
+ for (var j2 = 0; j2 < basic; ++j2) {
20859
+ if (input.charCodeAt(j2) >= 128) {
20860
+ error$12("not-basic");
20861
+ }
20862
+ output.push(input.charCodeAt(j2));
20863
+ }
20864
+ for (var index2 = basic > 0 ? basic + 1 : 0; index2 < inputLength; ) {
20865
+ var oldi = i;
20866
+ for (
20867
+ var w2 = 1, k2 = base;
20868
+ ;
20869
+ /* no condition */
20870
+ k2 += base
20871
+ ) {
20872
+ if (index2 >= inputLength) {
20873
+ error$12("invalid-input");
20874
+ }
20875
+ var digit = basicToDigit(input.charCodeAt(index2++));
20876
+ if (digit >= base || digit > floor((maxInt - i) / w2)) {
20877
+ error$12("overflow");
20878
+ }
20879
+ i += digit * w2;
20880
+ var t2 = k2 <= bias ? tMin : k2 >= bias + tMax ? tMax : k2 - bias;
20881
+ if (digit < t2) {
20882
+ break;
20883
+ }
20884
+ var baseMinusT = base - t2;
20885
+ if (w2 > floor(maxInt / baseMinusT)) {
20886
+ error$12("overflow");
20887
+ }
20888
+ w2 *= baseMinusT;
20889
+ }
20890
+ var out = output.length + 1;
20891
+ bias = adapt(i - oldi, out, oldi == 0);
20892
+ if (floor(i / out) > maxInt - n2) {
20893
+ error$12("overflow");
20894
+ }
20895
+ n2 += floor(i / out);
20896
+ i %= out;
20897
+ output.splice(i++, 0, n2);
20898
+ }
20899
+ return String.fromCodePoint.apply(String, output);
20900
+ };
20901
+ var encode2 = function encode3(input) {
20902
+ var output = [];
20903
+ input = ucs2decode(input);
20904
+ var inputLength = input.length;
20905
+ var n2 = initialN;
20906
+ var delta = 0;
20907
+ var bias = initialBias;
20908
+ var _iteratorNormalCompletion = true;
20909
+ var _didIteratorError = false;
20910
+ var _iteratorError = void 0;
20911
+ try {
20912
+ for (var _iterator = input[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
20913
+ var _currentValue2 = _step.value;
20914
+ if (_currentValue2 < 128) {
20915
+ output.push(stringFromCharCode(_currentValue2));
20916
+ }
20917
+ }
20918
+ } catch (err) {
20919
+ _didIteratorError = true;
20920
+ _iteratorError = err;
20921
+ } finally {
20922
+ try {
20923
+ if (!_iteratorNormalCompletion && _iterator.return) {
20924
+ _iterator.return();
20925
+ }
20926
+ } finally {
20927
+ if (_didIteratorError) {
20928
+ throw _iteratorError;
20929
+ }
20930
+ }
20931
+ }
20932
+ var basicLength = output.length;
20933
+ var handledCPCount = basicLength;
20934
+ if (basicLength) {
20935
+ output.push(delimiter);
20936
+ }
20937
+ while (handledCPCount < inputLength) {
20938
+ var m2 = maxInt;
20939
+ var _iteratorNormalCompletion2 = true;
20940
+ var _didIteratorError2 = false;
20941
+ var _iteratorError2 = void 0;
20942
+ try {
20943
+ for (var _iterator2 = input[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
20944
+ var currentValue = _step2.value;
20945
+ if (currentValue >= n2 && currentValue < m2) {
20946
+ m2 = currentValue;
20947
+ }
20948
+ }
20949
+ } catch (err) {
20950
+ _didIteratorError2 = true;
20951
+ _iteratorError2 = err;
20952
+ } finally {
20953
+ try {
20954
+ if (!_iteratorNormalCompletion2 && _iterator2.return) {
20955
+ _iterator2.return();
20956
+ }
20957
+ } finally {
20958
+ if (_didIteratorError2) {
20959
+ throw _iteratorError2;
20960
+ }
20961
+ }
20962
+ }
20963
+ var handledCPCountPlusOne = handledCPCount + 1;
20964
+ if (m2 - n2 > floor((maxInt - delta) / handledCPCountPlusOne)) {
20965
+ error$12("overflow");
20966
+ }
20967
+ delta += (m2 - n2) * handledCPCountPlusOne;
20968
+ n2 = m2;
20969
+ var _iteratorNormalCompletion3 = true;
20970
+ var _didIteratorError3 = false;
20971
+ var _iteratorError3 = void 0;
20972
+ try {
20973
+ for (var _iterator3 = input[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {
20974
+ var _currentValue = _step3.value;
20975
+ if (_currentValue < n2 && ++delta > maxInt) {
20976
+ error$12("overflow");
20977
+ }
20978
+ if (_currentValue == n2) {
20979
+ var q2 = delta;
20980
+ for (
20981
+ var k2 = base;
20982
+ ;
20983
+ /* no condition */
20984
+ k2 += base
20985
+ ) {
20986
+ var t2 = k2 <= bias ? tMin : k2 >= bias + tMax ? tMax : k2 - bias;
20987
+ if (q2 < t2) {
20988
+ break;
20989
+ }
20990
+ var qMinusT = q2 - t2;
20991
+ var baseMinusT = base - t2;
20992
+ output.push(stringFromCharCode(digitToBasic(t2 + qMinusT % baseMinusT, 0)));
20993
+ q2 = floor(qMinusT / baseMinusT);
20994
+ }
20995
+ output.push(stringFromCharCode(digitToBasic(q2, 0)));
20996
+ bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);
20997
+ delta = 0;
20998
+ ++handledCPCount;
20999
+ }
21000
+ }
21001
+ } catch (err) {
21002
+ _didIteratorError3 = true;
21003
+ _iteratorError3 = err;
21004
+ } finally {
21005
+ try {
21006
+ if (!_iteratorNormalCompletion3 && _iterator3.return) {
21007
+ _iterator3.return();
21008
+ }
21009
+ } finally {
21010
+ if (_didIteratorError3) {
21011
+ throw _iteratorError3;
21012
+ }
21013
+ }
21014
+ }
21015
+ ++delta;
21016
+ ++n2;
21017
+ }
21018
+ return output.join("");
21019
+ };
21020
+ var toUnicode = function toUnicode2(input) {
21021
+ return mapDomain(input, function(string) {
21022
+ return regexPunycode.test(string) ? decode(string.slice(4).toLowerCase()) : string;
21023
+ });
21024
+ };
21025
+ var toASCII = function toASCII2(input) {
21026
+ return mapDomain(input, function(string) {
21027
+ return regexNonASCII.test(string) ? "xn--" + encode2(string) : string;
21028
+ });
21029
+ };
21030
+ var punycode = {
21031
+ /**
21032
+ * A string representing the current Punycode.js version number.
21033
+ * @memberOf punycode
21034
+ * @type String
21035
+ */
21036
+ "version": "2.1.0",
21037
+ /**
21038
+ * An object of methods to convert from JavaScript's internal character
21039
+ * representation (UCS-2) to Unicode code points, and back.
21040
+ * @see <https://mathiasbynens.be/notes/javascript-encoding>
21041
+ * @memberOf punycode
21042
+ * @type Object
21043
+ */
21044
+ "ucs2": {
21045
+ "decode": ucs2decode,
21046
+ "encode": ucs2encode
21047
+ },
21048
+ "decode": decode,
21049
+ "encode": encode2,
21050
+ "toASCII": toASCII,
21051
+ "toUnicode": toUnicode
21052
+ };
21053
+ var SCHEMES = {};
21054
+ function pctEncChar(chr) {
21055
+ var c = chr.charCodeAt(0);
21056
+ var e2 = void 0;
21057
+ if (c < 16)
21058
+ e2 = "%0" + c.toString(16).toUpperCase();
21059
+ else if (c < 128)
21060
+ e2 = "%" + c.toString(16).toUpperCase();
21061
+ else if (c < 2048)
21062
+ e2 = "%" + (c >> 6 | 192).toString(16).toUpperCase() + "%" + (c & 63 | 128).toString(16).toUpperCase();
21063
+ else
21064
+ e2 = "%" + (c >> 12 | 224).toString(16).toUpperCase() + "%" + (c >> 6 & 63 | 128).toString(16).toUpperCase() + "%" + (c & 63 | 128).toString(16).toUpperCase();
21065
+ return e2;
20982
21066
  }
20983
- } else {
20984
- urnComponents.error = urnComponents.error || "URN can not be parsed.";
20985
- }
20986
- return urnComponents;
20987
- }
20988
- function urnSerialize(urnComponents, options) {
20989
- const scheme = options.scheme || urnComponents.scheme || "urn";
20990
- const nid = urnComponents.nid.toLowerCase();
20991
- const urnScheme = `${scheme}:${options.nid || nid}`;
20992
- const schemeHandler = SCHEMES$1[urnScheme];
20993
- if (schemeHandler) {
20994
- urnComponents = schemeHandler.serialize(urnComponents, options);
20995
- }
20996
- const uriComponents = urnComponents;
20997
- const nss = urnComponents.nss;
20998
- uriComponents.path = `${nid || options.nid}:${nss}`;
20999
- options.skipEscape = true;
21000
- return uriComponents;
21001
- }
21002
- function urnuuidParse(urnComponents, options) {
21003
- const uuidComponents = urnComponents;
21004
- uuidComponents.uuid = uuidComponents.nss;
21005
- uuidComponents.nss = void 0;
21006
- if (!options.tolerant && (!uuidComponents.uuid || !UUID_REG.test(uuidComponents.uuid))) {
21007
- uuidComponents.error = uuidComponents.error || "UUID is not valid.";
21008
- }
21009
- return uuidComponents;
21010
- }
21011
- function urnuuidSerialize(uuidComponents) {
21012
- const urnComponents = uuidComponents;
21013
- urnComponents.nss = (uuidComponents.uuid || "").toLowerCase();
21014
- return urnComponents;
21015
- }
21016
- const http = {
21017
- scheme: "http",
21018
- domainHost: true,
21019
- parse: httpParse,
21020
- serialize: httpSerialize
21021
- };
21022
- const https = {
21023
- scheme: "https",
21024
- domainHost: http.domainHost,
21025
- parse: httpParse,
21026
- serialize: httpSerialize
21027
- };
21028
- const ws = {
21029
- scheme: "ws",
21030
- domainHost: true,
21031
- parse: wsParse,
21032
- serialize: wsSerialize
21033
- };
21034
- const wss = {
21035
- scheme: "wss",
21036
- domainHost: ws.domainHost,
21037
- parse: ws.parse,
21038
- serialize: ws.serialize
21039
- };
21040
- const urn = {
21041
- scheme: "urn",
21042
- parse: urnParse,
21043
- serialize: urnSerialize,
21044
- skipNormalize: true
21045
- };
21046
- const urnuuid = {
21047
- scheme: "urn:uuid",
21048
- parse: urnuuidParse,
21049
- serialize: urnuuidSerialize,
21050
- skipNormalize: true
21051
- };
21052
- const SCHEMES$1 = {
21053
- http,
21054
- https,
21055
- ws,
21056
- wss,
21057
- urn,
21058
- "urn:uuid": urnuuid
21059
- };
21060
- var schemes = SCHEMES$1;
21061
- const URL$1 = require$$0$1;
21062
- const { normalizeIPv6, normalizeIPv4, removeDotSegments, recomposeAuthority, normalizeComponentEncoding } = utils;
21063
- const SCHEMES = schemes;
21064
- function normalize(uri2, options) {
21065
- if (typeof uri2 === "string") {
21066
- uri2 = serialize(parse(uri2, options), options);
21067
- } else if (typeof uri2 === "object") {
21068
- uri2 = parse(serialize(uri2, options), options);
21069
- }
21070
- return uri2;
21071
- }
21072
- function resolve(baseURI, relativeURI, options) {
21073
- const schemelessOptions = Object.assign({ scheme: "null" }, options);
21074
- const resolved = resolveComponents(parse(baseURI, schemelessOptions), parse(relativeURI, schemelessOptions), schemelessOptions, true);
21075
- return serialize(resolved, { ...schemelessOptions, skipEscape: true });
21076
- }
21077
- function resolveComponents(base, relative, options, skipNormalization) {
21078
- const target = {};
21079
- if (!skipNormalization) {
21080
- base = parse(serialize(base, options), options);
21081
- relative = parse(serialize(relative, options), options);
21082
- }
21083
- options = options || {};
21084
- if (!options.tolerant && relative.scheme) {
21085
- target.scheme = relative.scheme;
21086
- target.userinfo = relative.userinfo;
21087
- target.host = relative.host;
21088
- target.port = relative.port;
21089
- target.path = removeDotSegments(relative.path || "");
21090
- target.query = relative.query;
21091
- } else {
21092
- if (relative.userinfo !== void 0 || relative.host !== void 0 || relative.port !== void 0) {
21093
- target.userinfo = relative.userinfo;
21094
- target.host = relative.host;
21095
- target.port = relative.port;
21096
- target.path = removeDotSegments(relative.path || "");
21097
- target.query = relative.query;
21098
- } else {
21099
- if (!relative.path) {
21100
- target.path = base.path;
21101
- if (relative.query !== void 0) {
21102
- target.query = relative.query;
21067
+ function pctDecChars(str) {
21068
+ var newStr = "";
21069
+ var i = 0;
21070
+ var il = str.length;
21071
+ while (i < il) {
21072
+ var c = parseInt(str.substr(i + 1, 2), 16);
21073
+ if (c < 128) {
21074
+ newStr += String.fromCharCode(c);
21075
+ i += 3;
21076
+ } else if (c >= 194 && c < 224) {
21077
+ if (il - i >= 6) {
21078
+ var c2 = parseInt(str.substr(i + 4, 2), 16);
21079
+ newStr += String.fromCharCode((c & 31) << 6 | c2 & 63);
21080
+ } else {
21081
+ newStr += str.substr(i, 6);
21082
+ }
21083
+ i += 6;
21084
+ } else if (c >= 224) {
21085
+ if (il - i >= 9) {
21086
+ var _c = parseInt(str.substr(i + 4, 2), 16);
21087
+ var c3 = parseInt(str.substr(i + 7, 2), 16);
21088
+ newStr += String.fromCharCode((c & 15) << 12 | (_c & 63) << 6 | c3 & 63);
21089
+ } else {
21090
+ newStr += str.substr(i, 9);
21091
+ }
21092
+ i += 9;
21093
+ } else {
21094
+ newStr += str.substr(i, 3);
21095
+ i += 3;
21096
+ }
21097
+ }
21098
+ return newStr;
21099
+ }
21100
+ function _normalizeComponentEncoding(components, protocol) {
21101
+ function decodeUnreserved2(str) {
21102
+ var decStr = pctDecChars(str);
21103
+ return !decStr.match(protocol.UNRESERVED) ? str : decStr;
21104
+ }
21105
+ if (components.scheme)
21106
+ components.scheme = String(components.scheme).replace(protocol.PCT_ENCODED, decodeUnreserved2).toLowerCase().replace(protocol.NOT_SCHEME, "");
21107
+ if (components.userinfo !== void 0)
21108
+ components.userinfo = String(components.userinfo).replace(protocol.PCT_ENCODED, decodeUnreserved2).replace(protocol.NOT_USERINFO, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);
21109
+ if (components.host !== void 0)
21110
+ components.host = String(components.host).replace(protocol.PCT_ENCODED, decodeUnreserved2).toLowerCase().replace(protocol.NOT_HOST, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);
21111
+ if (components.path !== void 0)
21112
+ components.path = String(components.path).replace(protocol.PCT_ENCODED, decodeUnreserved2).replace(components.scheme ? protocol.NOT_PATH : protocol.NOT_PATH_NOSCHEME, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);
21113
+ if (components.query !== void 0)
21114
+ components.query = String(components.query).replace(protocol.PCT_ENCODED, decodeUnreserved2).replace(protocol.NOT_QUERY, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);
21115
+ if (components.fragment !== void 0)
21116
+ components.fragment = String(components.fragment).replace(protocol.PCT_ENCODED, decodeUnreserved2).replace(protocol.NOT_FRAGMENT, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);
21117
+ return components;
21118
+ }
21119
+ function _stripLeadingZeros(str) {
21120
+ return str.replace(/^0*(.*)/, "$1") || "0";
21121
+ }
21122
+ function _normalizeIPv4(host, protocol) {
21123
+ var matches = host.match(protocol.IPV4ADDRESS) || [];
21124
+ var _matches = slicedToArray(matches, 2), address = _matches[1];
21125
+ if (address) {
21126
+ return address.split(".").map(_stripLeadingZeros).join(".");
21127
+ } else {
21128
+ return host;
21129
+ }
21130
+ }
21131
+ function _normalizeIPv6(host, protocol) {
21132
+ var matches = host.match(protocol.IPV6ADDRESS) || [];
21133
+ var _matches2 = slicedToArray(matches, 3), address = _matches2[1], zone = _matches2[2];
21134
+ if (address) {
21135
+ var _address$toLowerCase$ = address.toLowerCase().split("::").reverse(), _address$toLowerCase$2 = slicedToArray(_address$toLowerCase$, 2), last = _address$toLowerCase$2[0], first = _address$toLowerCase$2[1];
21136
+ var firstFields = first ? first.split(":").map(_stripLeadingZeros) : [];
21137
+ var lastFields = last.split(":").map(_stripLeadingZeros);
21138
+ var isLastFieldIPv4Address = protocol.IPV4ADDRESS.test(lastFields[lastFields.length - 1]);
21139
+ var fieldCount = isLastFieldIPv4Address ? 7 : 8;
21140
+ var lastFieldsStart = lastFields.length - fieldCount;
21141
+ var fields = Array(fieldCount);
21142
+ for (var x2 = 0; x2 < fieldCount; ++x2) {
21143
+ fields[x2] = firstFields[x2] || lastFields[lastFieldsStart + x2] || "";
21144
+ }
21145
+ if (isLastFieldIPv4Address) {
21146
+ fields[fieldCount - 1] = _normalizeIPv4(fields[fieldCount - 1], protocol);
21147
+ }
21148
+ var allZeroFields = fields.reduce(function(acc, field, index2) {
21149
+ if (!field || field === "0") {
21150
+ var lastLongest = acc[acc.length - 1];
21151
+ if (lastLongest && lastLongest.index + lastLongest.length === index2) {
21152
+ lastLongest.length++;
21153
+ } else {
21154
+ acc.push({ index: index2, length: 1 });
21155
+ }
21156
+ }
21157
+ return acc;
21158
+ }, []);
21159
+ var longestZeroFields = allZeroFields.sort(function(a, b2) {
21160
+ return b2.length - a.length;
21161
+ })[0];
21162
+ var newHost = void 0;
21163
+ if (longestZeroFields && longestZeroFields.length > 1) {
21164
+ var newFirst = fields.slice(0, longestZeroFields.index);
21165
+ var newLast = fields.slice(longestZeroFields.index + longestZeroFields.length);
21166
+ newHost = newFirst.join(":") + "::" + newLast.join(":");
21167
+ } else {
21168
+ newHost = fields.join(":");
21169
+ }
21170
+ if (zone) {
21171
+ newHost += "%" + zone;
21172
+ }
21173
+ return newHost;
21174
+ } else {
21175
+ return host;
21176
+ }
21177
+ }
21178
+ var URI_PARSE = /^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i;
21179
+ var NO_MATCH_IS_UNDEFINED = "".match(/(){0}/)[1] === void 0;
21180
+ function parse(uriString) {
21181
+ var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
21182
+ var components = {};
21183
+ var protocol = options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL;
21184
+ if (options.reference === "suffix")
21185
+ uriString = (options.scheme ? options.scheme + ":" : "") + "//" + uriString;
21186
+ var matches = uriString.match(URI_PARSE);
21187
+ if (matches) {
21188
+ if (NO_MATCH_IS_UNDEFINED) {
21189
+ components.scheme = matches[1];
21190
+ components.userinfo = matches[3];
21191
+ components.host = matches[4];
21192
+ components.port = parseInt(matches[5], 10);
21193
+ components.path = matches[6] || "";
21194
+ components.query = matches[7];
21195
+ components.fragment = matches[8];
21196
+ if (isNaN(components.port)) {
21197
+ components.port = matches[5];
21198
+ }
21199
+ } else {
21200
+ components.scheme = matches[1] || void 0;
21201
+ components.userinfo = uriString.indexOf("@") !== -1 ? matches[3] : void 0;
21202
+ components.host = uriString.indexOf("//") !== -1 ? matches[4] : void 0;
21203
+ components.port = parseInt(matches[5], 10);
21204
+ components.path = matches[6] || "";
21205
+ components.query = uriString.indexOf("?") !== -1 ? matches[7] : void 0;
21206
+ components.fragment = uriString.indexOf("#") !== -1 ? matches[8] : void 0;
21207
+ if (isNaN(components.port)) {
21208
+ components.port = uriString.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/) ? matches[4] : void 0;
21209
+ }
21210
+ }
21211
+ if (components.host) {
21212
+ components.host = _normalizeIPv6(_normalizeIPv4(components.host, protocol), protocol);
21213
+ }
21214
+ if (components.scheme === void 0 && components.userinfo === void 0 && components.host === void 0 && components.port === void 0 && !components.path && components.query === void 0) {
21215
+ components.reference = "same-document";
21216
+ } else if (components.scheme === void 0) {
21217
+ components.reference = "relative";
21218
+ } else if (components.fragment === void 0) {
21219
+ components.reference = "absolute";
21103
21220
  } else {
21104
- target.query = base.query;
21221
+ components.reference = "uri";
21222
+ }
21223
+ if (options.reference && options.reference !== "suffix" && options.reference !== components.reference) {
21224
+ components.error = components.error || "URI is not a " + options.reference + " reference.";
21225
+ }
21226
+ var schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()];
21227
+ if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) {
21228
+ if (components.host && (options.domainHost || schemeHandler && schemeHandler.domainHost)) {
21229
+ try {
21230
+ components.host = punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase());
21231
+ } catch (e2) {
21232
+ components.error = components.error || "Host's domain name can not be converted to ASCII via punycode: " + e2;
21233
+ }
21234
+ }
21235
+ _normalizeComponentEncoding(components, URI_PROTOCOL);
21236
+ } else {
21237
+ _normalizeComponentEncoding(components, protocol);
21238
+ }
21239
+ if (schemeHandler && schemeHandler.parse) {
21240
+ schemeHandler.parse(components, options);
21105
21241
  }
21106
21242
  } else {
21107
- if (relative.path.charAt(0) === "/") {
21108
- target.path = removeDotSegments(relative.path);
21243
+ components.error = components.error || "URI can not be parsed.";
21244
+ }
21245
+ return components;
21246
+ }
21247
+ function _recomposeAuthority(components, options) {
21248
+ var protocol = options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL;
21249
+ var uriTokens = [];
21250
+ if (components.userinfo !== void 0) {
21251
+ uriTokens.push(components.userinfo);
21252
+ uriTokens.push("@");
21253
+ }
21254
+ if (components.host !== void 0) {
21255
+ uriTokens.push(_normalizeIPv6(_normalizeIPv4(String(components.host), protocol), protocol).replace(protocol.IPV6ADDRESS, function(_2, $1, $2) {
21256
+ return "[" + $1 + ($2 ? "%25" + $2 : "") + "]";
21257
+ }));
21258
+ }
21259
+ if (typeof components.port === "number" || typeof components.port === "string") {
21260
+ uriTokens.push(":");
21261
+ uriTokens.push(String(components.port));
21262
+ }
21263
+ return uriTokens.length ? uriTokens.join("") : void 0;
21264
+ }
21265
+ var RDS1 = /^\.\.?\//;
21266
+ var RDS2 = /^\/\.(\/|$)/;
21267
+ var RDS3 = /^\/\.\.(\/|$)/;
21268
+ var RDS5 = /^\/?(?:.|\n)*?(?=\/|$)/;
21269
+ function removeDotSegments(input) {
21270
+ var output = [];
21271
+ while (input.length) {
21272
+ if (input.match(RDS1)) {
21273
+ input = input.replace(RDS1, "");
21274
+ } else if (input.match(RDS2)) {
21275
+ input = input.replace(RDS2, "/");
21276
+ } else if (input.match(RDS3)) {
21277
+ input = input.replace(RDS3, "/");
21278
+ output.pop();
21279
+ } else if (input === "." || input === "..") {
21280
+ input = "";
21109
21281
  } else {
21110
- if ((base.userinfo !== void 0 || base.host !== void 0 || base.port !== void 0) && !base.path) {
21111
- target.path = "/" + relative.path;
21112
- } else if (!base.path) {
21113
- target.path = relative.path;
21282
+ var im = input.match(RDS5);
21283
+ if (im) {
21284
+ var s = im[0];
21285
+ input = input.slice(s.length);
21286
+ output.push(s);
21114
21287
  } else {
21115
- target.path = base.path.slice(0, base.path.lastIndexOf("/") + 1) + relative.path;
21288
+ throw new Error("Unexpected dot segment condition");
21116
21289
  }
21117
- target.path = removeDotSegments(target.path);
21118
21290
  }
21119
- target.query = relative.query;
21120
21291
  }
21121
- target.userinfo = base.userinfo;
21122
- target.host = base.host;
21123
- target.port = base.port;
21124
- }
21125
- target.scheme = base.scheme;
21126
- }
21127
- target.fragment = relative.fragment;
21128
- return target;
21129
- }
21130
- function equal$2(uriA, uriB, options) {
21131
- if (typeof uriA === "string") {
21132
- uriA = unescape(uriA);
21133
- uriA = serialize(normalizeComponentEncoding(parse(uriA, options), true), { ...options, skipEscape: true });
21134
- } else if (typeof uriA === "object") {
21135
- uriA = serialize(normalizeComponentEncoding(uriA, true), { ...options, skipEscape: true });
21136
- }
21137
- if (typeof uriB === "string") {
21138
- uriB = unescape(uriB);
21139
- uriB = serialize(normalizeComponentEncoding(parse(uriB, options), true), { ...options, skipEscape: true });
21140
- } else if (typeof uriB === "object") {
21141
- uriB = serialize(normalizeComponentEncoding(uriB, true), { ...options, skipEscape: true });
21142
- }
21143
- return uriA.toLowerCase() === uriB.toLowerCase();
21144
- }
21145
- function serialize(cmpts, opts) {
21146
- const components = {
21147
- host: cmpts.host,
21148
- scheme: cmpts.scheme,
21149
- userinfo: cmpts.userinfo,
21150
- port: cmpts.port,
21151
- path: cmpts.path,
21152
- query: cmpts.query,
21153
- nid: cmpts.nid,
21154
- nss: cmpts.nss,
21155
- uuid: cmpts.uuid,
21156
- fragment: cmpts.fragment,
21157
- reference: cmpts.reference,
21158
- resourceName: cmpts.resourceName,
21159
- secure: cmpts.secure,
21160
- error: ""
21161
- };
21162
- const options = Object.assign({}, opts);
21163
- const uriTokens = [];
21164
- const schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()];
21165
- if (schemeHandler && schemeHandler.serialize)
21166
- schemeHandler.serialize(components, options);
21167
- if (components.path !== void 0) {
21168
- if (!options.skipEscape) {
21169
- components.path = escape(components.path);
21170
- if (components.scheme !== void 0) {
21171
- components.path = components.path.split("%3A").join(":");
21292
+ return output.join("");
21293
+ }
21294
+ function serialize(components) {
21295
+ var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
21296
+ var protocol = options.iri ? IRI_PROTOCOL : URI_PROTOCOL;
21297
+ var uriTokens = [];
21298
+ var schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()];
21299
+ if (schemeHandler && schemeHandler.serialize)
21300
+ schemeHandler.serialize(components, options);
21301
+ if (components.host) {
21302
+ if (protocol.IPV6ADDRESS.test(components.host))
21303
+ ;
21304
+ else if (options.domainHost || schemeHandler && schemeHandler.domainHost) {
21305
+ try {
21306
+ components.host = !options.iri ? punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase()) : punycode.toUnicode(components.host);
21307
+ } catch (e2) {
21308
+ components.error = components.error || "Host's domain name can not be converted to " + (!options.iri ? "ASCII" : "Unicode") + " via punycode: " + e2;
21309
+ }
21310
+ }
21172
21311
  }
21173
- } else {
21174
- components.path = unescape(components.path);
21175
- }
21176
- }
21177
- if (options.reference !== "suffix" && components.scheme) {
21178
- uriTokens.push(components.scheme);
21179
- uriTokens.push(":");
21180
- }
21181
- const authority = recomposeAuthority(components, options);
21182
- if (authority !== void 0) {
21183
- if (options.reference !== "suffix") {
21184
- uriTokens.push("//");
21185
- }
21186
- uriTokens.push(authority);
21187
- if (components.path && components.path.charAt(0) !== "/") {
21188
- uriTokens.push("/");
21189
- }
21190
- }
21191
- if (components.path !== void 0) {
21192
- let s = components.path;
21193
- if (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) {
21194
- s = removeDotSegments(s);
21312
+ _normalizeComponentEncoding(components, protocol);
21313
+ if (options.reference !== "suffix" && components.scheme) {
21314
+ uriTokens.push(components.scheme);
21315
+ uriTokens.push(":");
21316
+ }
21317
+ var authority = _recomposeAuthority(components, options);
21318
+ if (authority !== void 0) {
21319
+ if (options.reference !== "suffix") {
21320
+ uriTokens.push("//");
21321
+ }
21322
+ uriTokens.push(authority);
21323
+ if (components.path && components.path.charAt(0) !== "/") {
21324
+ uriTokens.push("/");
21325
+ }
21326
+ }
21327
+ if (components.path !== void 0) {
21328
+ var s = components.path;
21329
+ if (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) {
21330
+ s = removeDotSegments(s);
21331
+ }
21332
+ if (authority === void 0) {
21333
+ s = s.replace(/^\/\//, "/%2F");
21334
+ }
21335
+ uriTokens.push(s);
21336
+ }
21337
+ if (components.query !== void 0) {
21338
+ uriTokens.push("?");
21339
+ uriTokens.push(components.query);
21340
+ }
21341
+ if (components.fragment !== void 0) {
21342
+ uriTokens.push("#");
21343
+ uriTokens.push(components.fragment);
21344
+ }
21345
+ return uriTokens.join("");
21346
+ }
21347
+ function resolveComponents(base2, relative) {
21348
+ var options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
21349
+ var skipNormalization = arguments[3];
21350
+ var target = {};
21351
+ if (!skipNormalization) {
21352
+ base2 = parse(serialize(base2, options), options);
21353
+ relative = parse(serialize(relative, options), options);
21354
+ }
21355
+ options = options || {};
21356
+ if (!options.tolerant && relative.scheme) {
21357
+ target.scheme = relative.scheme;
21358
+ target.userinfo = relative.userinfo;
21359
+ target.host = relative.host;
21360
+ target.port = relative.port;
21361
+ target.path = removeDotSegments(relative.path || "");
21362
+ target.query = relative.query;
21363
+ } else {
21364
+ if (relative.userinfo !== void 0 || relative.host !== void 0 || relative.port !== void 0) {
21365
+ target.userinfo = relative.userinfo;
21366
+ target.host = relative.host;
21367
+ target.port = relative.port;
21368
+ target.path = removeDotSegments(relative.path || "");
21369
+ target.query = relative.query;
21370
+ } else {
21371
+ if (!relative.path) {
21372
+ target.path = base2.path;
21373
+ if (relative.query !== void 0) {
21374
+ target.query = relative.query;
21375
+ } else {
21376
+ target.query = base2.query;
21377
+ }
21378
+ } else {
21379
+ if (relative.path.charAt(0) === "/") {
21380
+ target.path = removeDotSegments(relative.path);
21381
+ } else {
21382
+ if ((base2.userinfo !== void 0 || base2.host !== void 0 || base2.port !== void 0) && !base2.path) {
21383
+ target.path = "/" + relative.path;
21384
+ } else if (!base2.path) {
21385
+ target.path = relative.path;
21386
+ } else {
21387
+ target.path = base2.path.slice(0, base2.path.lastIndexOf("/") + 1) + relative.path;
21388
+ }
21389
+ target.path = removeDotSegments(target.path);
21390
+ }
21391
+ target.query = relative.query;
21392
+ }
21393
+ target.userinfo = base2.userinfo;
21394
+ target.host = base2.host;
21395
+ target.port = base2.port;
21396
+ }
21397
+ target.scheme = base2.scheme;
21398
+ }
21399
+ target.fragment = relative.fragment;
21400
+ return target;
21195
21401
  }
21196
- if (authority === void 0) {
21197
- s = s.replace(/^\/\//u, "/%2F");
21402
+ function resolve2(baseURI, relativeURI, options) {
21403
+ var schemelessOptions = assign({ scheme: "null" }, options);
21404
+ return serialize(resolveComponents(parse(baseURI, schemelessOptions), parse(relativeURI, schemelessOptions), schemelessOptions, true), schemelessOptions);
21198
21405
  }
21199
- uriTokens.push(s);
21200
- }
21201
- if (components.query !== void 0) {
21202
- uriTokens.push("?");
21203
- uriTokens.push(components.query);
21204
- }
21205
- if (components.fragment !== void 0) {
21206
- uriTokens.push("#");
21207
- uriTokens.push(components.fragment);
21208
- }
21209
- return uriTokens.join("");
21210
- }
21211
- const hexLookUp = Array.from({ length: 127 }, (v2, k2) => /[^!"$&'()*+,\-.;=_`a-z{}~]/u.test(String.fromCharCode(k2)));
21212
- function nonSimpleDomain(value) {
21213
- let code2 = 0;
21214
- for (let i = 0, len = value.length; i < len; ++i) {
21215
- code2 = value.charCodeAt(i);
21216
- if (code2 > 126 || hexLookUp[code2]) {
21217
- return true;
21406
+ function normalize(uri2, options) {
21407
+ if (typeof uri2 === "string") {
21408
+ uri2 = serialize(parse(uri2, options), options);
21409
+ } else if (typeOf(uri2) === "object") {
21410
+ uri2 = parse(serialize(uri2, options), options);
21411
+ }
21412
+ return uri2;
21218
21413
  }
21219
- }
21220
- return false;
21221
- }
21222
- const URI_PARSE = /^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;
21223
- function parse(uri2, opts) {
21224
- const options = Object.assign({}, opts);
21225
- const parsed = {
21226
- scheme: void 0,
21227
- userinfo: void 0,
21228
- host: "",
21229
- port: void 0,
21230
- path: "",
21231
- query: void 0,
21232
- fragment: void 0
21233
- };
21234
- const gotEncoding = uri2.indexOf("%") !== -1;
21235
- if (options.reference === "suffix")
21236
- uri2 = (options.scheme ? options.scheme + ":" : "") + "//" + uri2;
21237
- const matches = uri2.match(URI_PARSE);
21238
- if (matches) {
21239
- parsed.scheme = matches[1];
21240
- parsed.userinfo = matches[3];
21241
- parsed.host = matches[4];
21242
- parsed.port = parseInt(matches[5], 10);
21243
- parsed.path = matches[6] || "";
21244
- parsed.query = matches[7];
21245
- parsed.fragment = matches[8];
21246
- if (isNaN(parsed.port)) {
21247
- parsed.port = matches[5];
21248
- }
21249
- if (parsed.host) {
21250
- const ipv4result = normalizeIPv4(parsed.host);
21251
- if (ipv4result.isIPV4 === false) {
21252
- parsed.host = normalizeIPv6(ipv4result.host, { isIPV4: false }).host.toLowerCase();
21253
- } else {
21254
- parsed.host = ipv4result.host;
21414
+ function equal3(uriA, uriB, options) {
21415
+ if (typeof uriA === "string") {
21416
+ uriA = serialize(parse(uriA, options), options);
21417
+ } else if (typeOf(uriA) === "object") {
21418
+ uriA = serialize(uriA, options);
21419
+ }
21420
+ if (typeof uriB === "string") {
21421
+ uriB = serialize(parse(uriB, options), options);
21422
+ } else if (typeOf(uriB) === "object") {
21423
+ uriB = serialize(uriB, options);
21255
21424
  }
21425
+ return uriA === uriB;
21256
21426
  }
21257
- if (parsed.scheme === void 0 && parsed.userinfo === void 0 && parsed.host === void 0 && parsed.port === void 0 && !parsed.path && parsed.query === void 0) {
21258
- parsed.reference = "same-document";
21259
- } else if (parsed.scheme === void 0) {
21260
- parsed.reference = "relative";
21261
- } else if (parsed.fragment === void 0) {
21262
- parsed.reference = "absolute";
21263
- } else {
21264
- parsed.reference = "uri";
21427
+ function escapeComponent(str, options) {
21428
+ return str && str.toString().replace(!options || !options.iri ? URI_PROTOCOL.ESCAPE : IRI_PROTOCOL.ESCAPE, pctEncChar);
21265
21429
  }
21266
- if (options.reference && options.reference !== "suffix" && options.reference !== parsed.reference) {
21267
- parsed.error = parsed.error || "URI is not a " + options.reference + " reference.";
21430
+ function unescapeComponent(str, options) {
21431
+ return str && str.toString().replace(!options || !options.iri ? URI_PROTOCOL.PCT_ENCODED : IRI_PROTOCOL.PCT_ENCODED, pctDecChars);
21268
21432
  }
21269
- const schemeHandler = SCHEMES[(options.scheme || parsed.scheme || "").toLowerCase()];
21270
- if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) {
21271
- if (parsed.host && (options.domainHost || schemeHandler && schemeHandler.domainHost) && nonSimpleDomain(parsed.host)) {
21272
- try {
21273
- parsed.host = URL$1.domainToASCII(parsed.host.toLowerCase());
21274
- } catch (e2) {
21275
- parsed.error = parsed.error || "Host's domain name can not be converted to ASCII: " + e2;
21433
+ var handler = {
21434
+ scheme: "http",
21435
+ domainHost: true,
21436
+ parse: function parse2(components, options) {
21437
+ if (!components.host) {
21438
+ components.error = components.error || "HTTP URIs must have a host.";
21276
21439
  }
21440
+ return components;
21441
+ },
21442
+ serialize: function serialize2(components, options) {
21443
+ var secure = String(components.scheme).toLowerCase() === "https";
21444
+ if (components.port === (secure ? 443 : 80) || components.port === "") {
21445
+ components.port = void 0;
21446
+ }
21447
+ if (!components.path) {
21448
+ components.path = "/";
21449
+ }
21450
+ return components;
21277
21451
  }
21278
- }
21279
- if (!schemeHandler || schemeHandler && !schemeHandler.skipNormalize) {
21280
- if (gotEncoding && parsed.scheme !== void 0) {
21281
- parsed.scheme = unescape(parsed.scheme);
21282
- }
21283
- if (gotEncoding && parsed.userinfo !== void 0) {
21284
- parsed.userinfo = unescape(parsed.userinfo);
21452
+ };
21453
+ var handler$1 = {
21454
+ scheme: "https",
21455
+ domainHost: handler.domainHost,
21456
+ parse: handler.parse,
21457
+ serialize: handler.serialize
21458
+ };
21459
+ function isSecure(wsComponents) {
21460
+ return typeof wsComponents.secure === "boolean" ? wsComponents.secure : String(wsComponents.scheme).toLowerCase() === "wss";
21461
+ }
21462
+ var handler$2 = {
21463
+ scheme: "ws",
21464
+ domainHost: true,
21465
+ parse: function parse2(components, options) {
21466
+ var wsComponents = components;
21467
+ wsComponents.secure = isSecure(wsComponents);
21468
+ wsComponents.resourceName = (wsComponents.path || "/") + (wsComponents.query ? "?" + wsComponents.query : "");
21469
+ wsComponents.path = void 0;
21470
+ wsComponents.query = void 0;
21471
+ return wsComponents;
21472
+ },
21473
+ serialize: function serialize2(wsComponents, options) {
21474
+ if (wsComponents.port === (isSecure(wsComponents) ? 443 : 80) || wsComponents.port === "") {
21475
+ wsComponents.port = void 0;
21476
+ }
21477
+ if (typeof wsComponents.secure === "boolean") {
21478
+ wsComponents.scheme = wsComponents.secure ? "wss" : "ws";
21479
+ wsComponents.secure = void 0;
21480
+ }
21481
+ if (wsComponents.resourceName) {
21482
+ var _wsComponents$resourc = wsComponents.resourceName.split("?"), _wsComponents$resourc2 = slicedToArray(_wsComponents$resourc, 2), path = _wsComponents$resourc2[0], query = _wsComponents$resourc2[1];
21483
+ wsComponents.path = path && path !== "/" ? path : void 0;
21484
+ wsComponents.query = query;
21485
+ wsComponents.resourceName = void 0;
21486
+ }
21487
+ wsComponents.fragment = void 0;
21488
+ return wsComponents;
21285
21489
  }
21286
- if (gotEncoding && parsed.host !== void 0) {
21287
- parsed.host = unescape(parsed.host);
21490
+ };
21491
+ var handler$3 = {
21492
+ scheme: "wss",
21493
+ domainHost: handler$2.domainHost,
21494
+ parse: handler$2.parse,
21495
+ serialize: handler$2.serialize
21496
+ };
21497
+ var O2 = {};
21498
+ var UNRESERVED$$ = "[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]";
21499
+ var HEXDIG$$ = "[0-9A-Fa-f]";
21500
+ var PCT_ENCODED$ = subexp(subexp("%[EFef]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%[89A-Fa-f]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%" + HEXDIG$$ + HEXDIG$$));
21501
+ var ATEXT$$ = "[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]";
21502
+ var QTEXT$$ = "[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]";
21503
+ var VCHAR$$ = merge2(QTEXT$$, '[\\"\\\\]');
21504
+ var SOME_DELIMS$$ = "[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]";
21505
+ var UNRESERVED = new RegExp(UNRESERVED$$, "g");
21506
+ var PCT_ENCODED = new RegExp(PCT_ENCODED$, "g");
21507
+ var NOT_LOCAL_PART = new RegExp(merge2("[^]", ATEXT$$, "[\\.]", '[\\"]', VCHAR$$), "g");
21508
+ var NOT_HFNAME = new RegExp(merge2("[^]", UNRESERVED$$, SOME_DELIMS$$), "g");
21509
+ var NOT_HFVALUE = NOT_HFNAME;
21510
+ function decodeUnreserved(str) {
21511
+ var decStr = pctDecChars(str);
21512
+ return !decStr.match(UNRESERVED) ? str : decStr;
21513
+ }
21514
+ var handler$4 = {
21515
+ scheme: "mailto",
21516
+ parse: function parse$$1(components, options) {
21517
+ var mailtoComponents = components;
21518
+ var to = mailtoComponents.to = mailtoComponents.path ? mailtoComponents.path.split(",") : [];
21519
+ mailtoComponents.path = void 0;
21520
+ if (mailtoComponents.query) {
21521
+ var unknownHeaders = false;
21522
+ var headers = {};
21523
+ var hfields = mailtoComponents.query.split("&");
21524
+ for (var x2 = 0, xl = hfields.length; x2 < xl; ++x2) {
21525
+ var hfield = hfields[x2].split("=");
21526
+ switch (hfield[0]) {
21527
+ case "to":
21528
+ var toAddrs = hfield[1].split(",");
21529
+ for (var _x = 0, _xl = toAddrs.length; _x < _xl; ++_x) {
21530
+ to.push(toAddrs[_x]);
21531
+ }
21532
+ break;
21533
+ case "subject":
21534
+ mailtoComponents.subject = unescapeComponent(hfield[1], options);
21535
+ break;
21536
+ case "body":
21537
+ mailtoComponents.body = unescapeComponent(hfield[1], options);
21538
+ break;
21539
+ default:
21540
+ unknownHeaders = true;
21541
+ headers[unescapeComponent(hfield[0], options)] = unescapeComponent(hfield[1], options);
21542
+ break;
21543
+ }
21544
+ }
21545
+ if (unknownHeaders)
21546
+ mailtoComponents.headers = headers;
21547
+ }
21548
+ mailtoComponents.query = void 0;
21549
+ for (var _x2 = 0, _xl2 = to.length; _x2 < _xl2; ++_x2) {
21550
+ var addr = to[_x2].split("@");
21551
+ addr[0] = unescapeComponent(addr[0]);
21552
+ if (!options.unicodeSupport) {
21553
+ try {
21554
+ addr[1] = punycode.toASCII(unescapeComponent(addr[1], options).toLowerCase());
21555
+ } catch (e2) {
21556
+ mailtoComponents.error = mailtoComponents.error || "Email address's domain name can not be converted to ASCII via punycode: " + e2;
21557
+ }
21558
+ } else {
21559
+ addr[1] = unescapeComponent(addr[1], options).toLowerCase();
21560
+ }
21561
+ to[_x2] = addr.join("@");
21562
+ }
21563
+ return mailtoComponents;
21564
+ },
21565
+ serialize: function serialize$$1(mailtoComponents, options) {
21566
+ var components = mailtoComponents;
21567
+ var to = toArray2(mailtoComponents.to);
21568
+ if (to) {
21569
+ for (var x2 = 0, xl = to.length; x2 < xl; ++x2) {
21570
+ var toAddr = String(to[x2]);
21571
+ var atIdx = toAddr.lastIndexOf("@");
21572
+ var localPart = toAddr.slice(0, atIdx).replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_LOCAL_PART, pctEncChar);
21573
+ var domain = toAddr.slice(atIdx + 1);
21574
+ try {
21575
+ domain = !options.iri ? punycode.toASCII(unescapeComponent(domain, options).toLowerCase()) : punycode.toUnicode(domain);
21576
+ } catch (e2) {
21577
+ components.error = components.error || "Email address's domain name can not be converted to " + (!options.iri ? "ASCII" : "Unicode") + " via punycode: " + e2;
21578
+ }
21579
+ to[x2] = localPart + "@" + domain;
21580
+ }
21581
+ components.path = to.join(",");
21582
+ }
21583
+ var headers = mailtoComponents.headers = mailtoComponents.headers || {};
21584
+ if (mailtoComponents.subject)
21585
+ headers["subject"] = mailtoComponents.subject;
21586
+ if (mailtoComponents.body)
21587
+ headers["body"] = mailtoComponents.body;
21588
+ var fields = [];
21589
+ for (var name in headers) {
21590
+ if (headers[name] !== O2[name]) {
21591
+ fields.push(name.replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFNAME, pctEncChar) + "=" + headers[name].replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFVALUE, pctEncChar));
21592
+ }
21593
+ }
21594
+ if (fields.length) {
21595
+ components.query = fields.join("&");
21596
+ }
21597
+ return components;
21288
21598
  }
21289
- if (parsed.path !== void 0 && parsed.path.length) {
21290
- parsed.path = encodeURI(parsed.path);
21599
+ };
21600
+ var URN_PARSE = /^([^\:]+)\:(.*)/;
21601
+ var handler$5 = {
21602
+ scheme: "urn",
21603
+ parse: function parse$$1(components, options) {
21604
+ var matches = components.path && components.path.match(URN_PARSE);
21605
+ var urnComponents = components;
21606
+ if (matches) {
21607
+ var scheme = options.scheme || urnComponents.scheme || "urn";
21608
+ var nid = matches[1].toLowerCase();
21609
+ var nss = matches[2];
21610
+ var urnScheme = scheme + ":" + (options.nid || nid);
21611
+ var schemeHandler = SCHEMES[urnScheme];
21612
+ urnComponents.nid = nid;
21613
+ urnComponents.nss = nss;
21614
+ urnComponents.path = void 0;
21615
+ if (schemeHandler) {
21616
+ urnComponents = schemeHandler.parse(urnComponents, options);
21617
+ }
21618
+ } else {
21619
+ urnComponents.error = urnComponents.error || "URN can not be parsed.";
21620
+ }
21621
+ return urnComponents;
21622
+ },
21623
+ serialize: function serialize$$1(urnComponents, options) {
21624
+ var scheme = options.scheme || urnComponents.scheme || "urn";
21625
+ var nid = urnComponents.nid;
21626
+ var urnScheme = scheme + ":" + (options.nid || nid);
21627
+ var schemeHandler = SCHEMES[urnScheme];
21628
+ if (schemeHandler) {
21629
+ urnComponents = schemeHandler.serialize(urnComponents, options);
21630
+ }
21631
+ var uriComponents = urnComponents;
21632
+ var nss = urnComponents.nss;
21633
+ uriComponents.path = (nid || options.nid) + ":" + nss;
21634
+ return uriComponents;
21291
21635
  }
21292
- if (parsed.fragment !== void 0 && parsed.fragment.length) {
21293
- parsed.fragment = encodeURI(decodeURI(parsed.fragment));
21636
+ };
21637
+ var UUID = /^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/;
21638
+ var handler$6 = {
21639
+ scheme: "urn:uuid",
21640
+ parse: function parse2(urnComponents, options) {
21641
+ var uuidComponents = urnComponents;
21642
+ uuidComponents.uuid = uuidComponents.nss;
21643
+ uuidComponents.nss = void 0;
21644
+ if (!options.tolerant && (!uuidComponents.uuid || !uuidComponents.uuid.match(UUID))) {
21645
+ uuidComponents.error = uuidComponents.error || "UUID is not valid.";
21646
+ }
21647
+ return uuidComponents;
21648
+ },
21649
+ serialize: function serialize2(uuidComponents, options) {
21650
+ var urnComponents = uuidComponents;
21651
+ urnComponents.nss = (uuidComponents.uuid || "").toLowerCase();
21652
+ return urnComponents;
21294
21653
  }
21295
- }
21296
- if (schemeHandler && schemeHandler.parse) {
21297
- schemeHandler.parse(parsed, options);
21298
- }
21299
- } else {
21300
- parsed.error = parsed.error || "URI can not be parsed.";
21301
- }
21302
- return parsed;
21303
- }
21304
- const fastUri = {
21305
- normalize,
21306
- resolve,
21307
- resolveComponents,
21308
- equal: equal$2,
21309
- serialize,
21310
- parse
21311
- };
21312
- fastUri$1.exports = fastUri;
21313
- fastUri$1.exports.default = fastUri;
21314
- fastUri$1.exports.fastUri = fastUri;
21315
- var fastUriExports = fastUri$1.exports;
21654
+ };
21655
+ SCHEMES[handler.scheme] = handler;
21656
+ SCHEMES[handler$1.scheme] = handler$1;
21657
+ SCHEMES[handler$2.scheme] = handler$2;
21658
+ SCHEMES[handler$3.scheme] = handler$3;
21659
+ SCHEMES[handler$4.scheme] = handler$4;
21660
+ SCHEMES[handler$5.scheme] = handler$5;
21661
+ SCHEMES[handler$6.scheme] = handler$6;
21662
+ exports2.SCHEMES = SCHEMES;
21663
+ exports2.pctEncChar = pctEncChar;
21664
+ exports2.pctDecChars = pctDecChars;
21665
+ exports2.parse = parse;
21666
+ exports2.removeDotSegments = removeDotSegments;
21667
+ exports2.serialize = serialize;
21668
+ exports2.resolveComponents = resolveComponents;
21669
+ exports2.resolve = resolve2;
21670
+ exports2.normalize = normalize;
21671
+ exports2.equal = equal3;
21672
+ exports2.escapeComponent = escapeComponent;
21673
+ exports2.unescapeComponent = unescapeComponent;
21674
+ Object.defineProperty(exports2, "__esModule", { value: true });
21675
+ });
21676
+ })(uri_all, uri_all.exports);
21677
+ var uri_allExports = uri_all.exports;
21316
21678
  Object.defineProperty(uri$1, "__esModule", { value: true });
21317
- const uri = fastUriExports;
21679
+ const uri = uri_allExports;
21318
21680
  uri.code = 'require("ajv/dist/runtime/uri").default';
21319
21681
  uri$1.default = uri;
21320
21682
  (function(exports) {
@@ -21348,7 +21710,7 @@ uri$1.default = uri;
21348
21710
  const rules_12 = rules;
21349
21711
  const compile_12 = compile;
21350
21712
  const codegen_2 = codegen;
21351
- const resolve_12 = resolve$2;
21713
+ const resolve_12 = resolve$1;
21352
21714
  const dataType_12 = dataType;
21353
21715
  const util_12 = util;
21354
21716
  const $dataRefSchema = require$$9;