@membranehq/sdk 0.18.1 → 0.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/dist/bundle.d.ts +203 -9
  2. package/dist/bundle.js +1078 -765
  3. package/dist/bundle.js.map +1 -1
  4. package/dist/dts/accessors/connections-accessors.d.ts +8 -1
  5. package/dist/dts/accessors/integrations-accessors.d.ts +7 -0
  6. package/dist/dts/agent/session.d.ts +12 -2
  7. package/dist/dts/agent/worker-contracts.d.ts +4 -0
  8. package/dist/dts/auth/auth-context-permissions.d.ts +2 -0
  9. package/dist/dts/client-tokens/types.d.ts +1 -1
  10. package/dist/dts/functions/base.d.ts +1 -0
  11. package/dist/dts/functions/function-types/index.d.ts +2 -2
  12. package/dist/dts/functions/function-types/rest-api-mapping.d.ts +6 -6
  13. package/dist/dts/oauth/types.d.ts +1 -0
  14. package/dist/dts/oauth/types.test.d.ts +1 -0
  15. package/dist/dts/orgs/types.d.ts +5 -1
  16. package/dist/dts/ui.d.ts +5 -0
  17. package/dist/dts/validation/types.d.ts +1 -0
  18. package/dist/dts/workspace-elements/api/action-run-log-records-api.d.ts +32 -0
  19. package/dist/dts/workspace-elements/api/actions-api.d.ts +34 -0
  20. package/dist/dts/workspace-elements/api/app-data-schema-instances-api.d.ts +1 -0
  21. package/dist/dts/workspace-elements/api/connections-api.d.ts +52 -6
  22. package/dist/dts/workspace-elements/api/data-link-table-instances-api.d.ts +11 -0
  23. package/dist/dts/workspace-elements/api/data-sources-api.d.ts +44 -0
  24. package/dist/dts/workspace-elements/api/external-api-logs-api.d.ts +10 -0
  25. package/dist/dts/workspace-elements/api/external-event-log-records-api.d.ts +10 -0
  26. package/dist/dts/workspace-elements/api/external-event-pulls-api.d.ts +10 -0
  27. package/dist/dts/workspace-elements/api/external-event-subscriptions-api.d.ts +10 -0
  28. package/dist/dts/workspace-elements/api/field-mappings-api.d.ts +50 -0
  29. package/dist/dts/workspace-elements/api/flow-runs-api.d.ts +26 -0
  30. package/dist/dts/workspace-elements/api/flows-api.d.ts +44 -0
  31. package/dist/dts/workspace-elements/api/incoming-webhooks-api.d.ts +10 -0
  32. package/dist/dts/workspace-elements/api/integrations-api.d.ts +10 -0
  33. package/dist/dts/workspace-elements/api/packages-api.d.ts +12 -4
  34. package/dist/dts/workspace-elements/base/action-instances/index.d.ts +3 -0
  35. package/dist/dts/workspace-elements/base/actions/index.d.ts +10 -0
  36. package/dist/dts/workspace-elements/base/connection-requests/index.d.ts +8 -1
  37. package/dist/dts/workspace-elements/base/connections/index.d.ts +27 -0
  38. package/dist/dts/workspace-elements/base/connectors/index.d.ts +1 -1
  39. package/dist/dts/workspace-elements/base/data-sources/index.d.ts +13 -0
  40. package/dist/dts/workspace-elements/base/field-mappings/index.d.ts +10 -0
  41. package/dist/dts/workspace-elements/base/flows/index.d.ts +10 -0
  42. package/dist/dts/workspace-elements/base/integrations/index.d.ts +1 -1
  43. package/dist/dts/workspace-elements/base/packages/index.d.ts +7 -2
  44. package/dist/dts/workspace-elements/types.d.ts +13 -0
  45. package/dist/dts/workspace-elements-catalog/index.d.ts +3 -0
  46. package/dist/dts/workspaces/types.d.ts +6 -0
  47. package/dist/index.browser.d.mts +601 -100
  48. package/dist/index.browser.d.ts +601 -100
  49. package/dist/index.browser.js +244 -107
  50. package/dist/index.browser.js.map +1 -1
  51. package/dist/index.browser.mjs +236 -108
  52. package/dist/index.browser.mjs.map +1 -1
  53. package/dist/index.node.d.mts +601 -100
  54. package/dist/index.node.d.ts +601 -100
  55. package/dist/index.node.js +244 -107
  56. package/dist/index.node.js.map +1 -1
  57. package/dist/index.node.mjs +236 -108
  58. package/dist/index.node.mjs.map +1 -1
  59. package/package.json +1 -1
package/dist/bundle.js CHANGED
@@ -22138,14 +22138,14 @@
22138
22138
  }, boolean$1());
22139
22139
 
22140
22140
  const PaginationQuery = object({
22141
- limit: number().int().min(1).max(1000).optional(),
22142
- cursor: string$1().optional(),
22141
+ limit: number().int().min(1).max(1000).optional().describe('Maximum number of items to return (1-1000)'),
22142
+ cursor: string$1().optional().describe('Pagination cursor from a previous response'),
22143
22143
  });
22144
22144
  const IncludeArchivedQuery = object({
22145
22145
  includeArchived: zodBooleanCoercion().optional(),
22146
22146
  });
22147
22147
  const SearchQuery = object({
22148
- search: string$1().optional(),
22148
+ search: string$1().optional().describe('Text search query to filter results'),
22149
22149
  });
22150
22150
  const CommonListElementsQuery = SearchQuery.merge(PaginationQuery).merge(IncludeArchivedQuery);
22151
22151
  const CommonFindElementsQuery = CommonListElementsQuery;
@@ -22217,6 +22217,8 @@
22217
22217
  })(WorkspaceEventType || (WorkspaceEventType = {}));
22218
22218
  var WorkspaceElementState;
22219
22219
  (function (WorkspaceElementState) {
22220
+ WorkspaceElementState["BUILDING"] = "BUILDING";
22221
+ WorkspaceElementState["CLIENT_ACTION_REQUIRED"] = "CLIENT_ACTION_REQUIRED";
22220
22222
  WorkspaceElementState["CONFIGURATION_ERROR"] = "CONFIGURATION_ERROR";
22221
22223
  WorkspaceElementState["SETUP_FAILED"] = "SETUP_FAILED";
22222
22224
  WorkspaceElementState["READY"] = "READY";
@@ -22245,7 +22247,7 @@
22245
22247
  name: string$1().describe('Display name. Always present in API responses (filled by API if not set on create).'),
22246
22248
  state: _enum(WorkspaceElementState)
22247
22249
  .optional()
22248
- .describe('Current lifecycle or health state (e.g. READY, SETUP_FAILED, CONFIGURATION_ERROR). Set by the engine during setup and validation.'),
22250
+ .describe('Current lifecycle or health state (e.g. READY, SETUP_FAILED, CONFIGURATION_ERROR, BUILDING). Set by the engine during setup and validation.'),
22249
22251
  errors: array(ErrorDataSchema).optional().describe('Validation or setup errors when state is not READY.'),
22250
22252
  revision: string$1()
22251
22253
  .optional()
@@ -22263,6 +22265,11 @@
22263
22265
  .describe('When true, the element cannot be modified (e.g. published package elements or elements from another workspace).'),
22264
22266
  });
22265
22267
  const BaseMembraneInterface = BaseWorkspaceElement.merge(BaseMembraneInterfaceEditableProperties).merge(BaseMembraneInterfaceReadOnlyProperties);
22268
+ const IntentProperties = object({
22269
+ intent: string$1()
22270
+ .optional()
22271
+ .describe('[Experimental] Intent-based instruction for an agent to configure this element.'),
22272
+ });
22266
22273
  const BaseIntegrationLevelMembraneInterfaceEditableProperties = BaseMembraneInterfaceEditableProperties.extend({
22267
22274
  integrationId: string$1()
22268
22275
  .optional()
@@ -22291,6 +22298,15 @@
22291
22298
  isUniversal: boolean$1()
22292
22299
  .optional()
22293
22300
  .describe('When true, the element is universal (shared across all integrations). Requires universal-element access. Omit or false for integration-specific elements.'),
22301
+ externalAppId: string$1()
22302
+ .optional()
22303
+ .describe('Internal ID of the external app this element belongs to. Auto-populated from the integration when integrationId is set and the integration has an externalAppId.'),
22304
+ externalAppUuid: string$1()
22305
+ .optional()
22306
+ .describe('UUID of the external app; alternative to externalAppId when creating from export. Resolved to externalAppId by the API.'),
22307
+ externalAppKey: string$1()
22308
+ .optional()
22309
+ .describe('Key of the external app; alternative to externalAppId. Resolved to externalAppId by the API.'),
22294
22310
  });
22295
22311
  const BaseIntegrationLevelMembraneInterfaceReadOnlyProperties = BaseMembraneInterfaceReadOnlyProperties.extend({
22296
22312
  isCustomized: boolean$1().optional(),
@@ -22298,6 +22314,7 @@
22298
22314
  BaseMembraneInterfaceEditableProperties.extend({
22299
22315
  integrationUuid: string$1().optional(),
22300
22316
  parentUuid: string$1().optional(),
22317
+ externalAppUuid: string$1().optional(),
22301
22318
  isCustomized: boolean$1().optional(),
22302
22319
  isUniversal: boolean$1().optional(),
22303
22320
  });
@@ -22803,7 +22820,7 @@
22803
22820
  onPopupClosed,
22804
22821
  });
22805
22822
  }
22806
- async openReconnectUI({} = {}) {
22823
+ async openReconnectUI(_options = {}) {
22807
22824
  const uri = await this.client.getEmbedUri(`connections/${this.connectionSelector}/refresh`);
22808
22825
  return new Promise((resolve) => {
22809
22826
  void openIframe(uri, {
@@ -23472,7 +23489,7 @@
23472
23489
  }
23473
23490
  }
23474
23491
 
23475
- /*! Axios v1.13.5 Copyright (c) 2026 Matt Zabriskie and contributors */
23492
+ /*! Axios v1.13.6 Copyright (c) 2026 Matt Zabriskie and contributors */
23476
23493
  /**
23477
23494
  * Create a bound version of a function with a specified `this` context
23478
23495
  *
@@ -23520,7 +23537,7 @@
23520
23537
  *
23521
23538
  * @returns {boolean} True if the value is undefined, otherwise false
23522
23539
  */
23523
- const isUndefined = typeOfTest("undefined");
23540
+ const isUndefined = typeOfTest('undefined');
23524
23541
 
23525
23542
  /**
23526
23543
  * Determine if a value is a Buffer
@@ -23547,7 +23564,7 @@
23547
23564
  *
23548
23565
  * @returns {boolean} True if value is an ArrayBuffer, otherwise false
23549
23566
  */
23550
- const isArrayBuffer = kindOfTest("ArrayBuffer");
23567
+ const isArrayBuffer = kindOfTest('ArrayBuffer');
23551
23568
 
23552
23569
  /**
23553
23570
  * Determine if a value is a view on an ArrayBuffer
@@ -23558,7 +23575,7 @@
23558
23575
  */
23559
23576
  function isArrayBufferView(val) {
23560
23577
  let result;
23561
- if (typeof ArrayBuffer !== "undefined" && ArrayBuffer.isView) {
23578
+ if (typeof ArrayBuffer !== 'undefined' && ArrayBuffer.isView) {
23562
23579
  result = ArrayBuffer.isView(val);
23563
23580
  } else {
23564
23581
  result = val && val.buffer && isArrayBuffer(val.buffer);
@@ -23573,7 +23590,7 @@
23573
23590
  *
23574
23591
  * @returns {boolean} True if value is a String, otherwise false
23575
23592
  */
23576
- const isString = typeOfTest("string");
23593
+ const isString = typeOfTest('string');
23577
23594
 
23578
23595
  /**
23579
23596
  * Determine if a value is a Function
@@ -23581,7 +23598,7 @@
23581
23598
  * @param {*} val The value to test
23582
23599
  * @returns {boolean} True if value is a Function, otherwise false
23583
23600
  */
23584
- const isFunction$1 = typeOfTest("function");
23601
+ const isFunction$1 = typeOfTest('function');
23585
23602
 
23586
23603
  /**
23587
23604
  * Determine if a value is a Number
@@ -23590,7 +23607,7 @@
23590
23607
  *
23591
23608
  * @returns {boolean} True if value is a Number, otherwise false
23592
23609
  */
23593
- const isNumber = typeOfTest("number");
23610
+ const isNumber = typeOfTest('number');
23594
23611
 
23595
23612
  /**
23596
23613
  * Determine if a value is an Object
@@ -23599,7 +23616,7 @@
23599
23616
  *
23600
23617
  * @returns {boolean} True if value is an Object, otherwise false
23601
23618
  */
23602
- const isObject = (thing) => thing !== null && typeof thing === "object";
23619
+ const isObject = (thing) => thing !== null && typeof thing === 'object';
23603
23620
 
23604
23621
  /**
23605
23622
  * Determine if a value is a Boolean
@@ -23617,7 +23634,7 @@
23617
23634
  * @returns {boolean} True if value is a plain Object, otherwise false
23618
23635
  */
23619
23636
  const isPlainObject = (val) => {
23620
- if (kindOf(val) !== "object") {
23637
+ if (kindOf(val) !== 'object') {
23621
23638
  return false;
23622
23639
  }
23623
23640
 
@@ -23645,10 +23662,7 @@
23645
23662
  }
23646
23663
 
23647
23664
  try {
23648
- return (
23649
- Object.keys(val).length === 0 &&
23650
- Object.getPrototypeOf(val) === Object.prototype
23651
- );
23665
+ return Object.keys(val).length === 0 && Object.getPrototypeOf(val) === Object.prototype;
23652
23666
  } catch (e) {
23653
23667
  // Fallback for any other objects that might cause RangeError with Object.keys()
23654
23668
  return false;
@@ -23662,7 +23676,7 @@
23662
23676
  *
23663
23677
  * @returns {boolean} True if value is a Date, otherwise false
23664
23678
  */
23665
- const isDate = kindOfTest("Date");
23679
+ const isDate = kindOfTest('Date');
23666
23680
 
23667
23681
  /**
23668
23682
  * Determine if a value is a File
@@ -23671,7 +23685,32 @@
23671
23685
  *
23672
23686
  * @returns {boolean} True if value is a File, otherwise false
23673
23687
  */
23674
- const isFile = kindOfTest("File");
23688
+ const isFile = kindOfTest('File');
23689
+
23690
+ /**
23691
+ * Determine if a value is a React Native Blob
23692
+ * React Native "blob": an object with a `uri` attribute. Optionally, it can
23693
+ * also have a `name` and `type` attribute to specify filename and content type
23694
+ *
23695
+ * @see https://github.com/facebook/react-native/blob/26684cf3adf4094eb6c405d345a75bf8c7c0bf88/Libraries/Network/FormData.js#L68-L71
23696
+ *
23697
+ * @param {*} value The value to test
23698
+ *
23699
+ * @returns {boolean} True if value is a React Native Blob, otherwise false
23700
+ */
23701
+ const isReactNativeBlob = (value) => {
23702
+ return !!(value && typeof value.uri !== 'undefined');
23703
+ };
23704
+
23705
+ /**
23706
+ * Determine if environment is React Native
23707
+ * ReactNative `FormData` has a non-standard `getParts()` method
23708
+ *
23709
+ * @param {*} formData The formData to test
23710
+ *
23711
+ * @returns {boolean} True if environment is React Native, otherwise false
23712
+ */
23713
+ const isReactNative = (formData) => formData && typeof formData.getParts !== 'undefined';
23675
23714
 
23676
23715
  /**
23677
23716
  * Determine if a value is a Blob
@@ -23680,7 +23719,7 @@
23680
23719
  *
23681
23720
  * @returns {boolean} True if value is a Blob, otherwise false
23682
23721
  */
23683
- const isBlob$1 = kindOfTest("Blob");
23722
+ const isBlob$1 = kindOfTest('Blob');
23684
23723
 
23685
23724
  /**
23686
23725
  * Determine if a value is a FileList
@@ -23689,7 +23728,7 @@
23689
23728
  *
23690
23729
  * @returns {boolean} True if value is a File, otherwise false
23691
23730
  */
23692
- const isFileList = kindOfTest("FileList");
23731
+ const isFileList = kindOfTest('FileList');
23693
23732
 
23694
23733
  /**
23695
23734
  * Determine if a value is a Stream
@@ -23707,17 +23746,27 @@
23707
23746
  *
23708
23747
  * @returns {boolean} True if value is an FormData, otherwise false
23709
23748
  */
23749
+ function getGlobal() {
23750
+ if (typeof globalThis !== 'undefined') return globalThis;
23751
+ if (typeof self !== 'undefined') return self;
23752
+ if (typeof window !== 'undefined') return window;
23753
+ if (typeof global !== 'undefined') return global;
23754
+ return {};
23755
+ }
23756
+
23757
+ const G = getGlobal();
23758
+ const FormDataCtor = typeof G.FormData !== 'undefined' ? G.FormData : undefined;
23759
+
23710
23760
  const isFormData = (thing) => {
23711
23761
  let kind;
23712
- return (
23713
- thing &&
23714
- ((typeof FormData === "function" && thing instanceof FormData) ||
23715
- (isFunction$1(thing.append) &&
23716
- ((kind = kindOf(thing)) === "formdata" ||
23717
- // detect form-data instance
23718
- (kind === "object" &&
23719
- isFunction$1(thing.toString) &&
23720
- thing.toString() === "[object FormData]"))))
23762
+ return thing && (
23763
+ (FormDataCtor && thing instanceof FormDataCtor) || (
23764
+ isFunction$1(thing.append) && (
23765
+ (kind = kindOf(thing)) === 'formdata' ||
23766
+ // detect form-data instance
23767
+ (kind === 'object' && isFunction$1(thing.toString) && thing.toString() === '[object FormData]')
23768
+ )
23769
+ )
23721
23770
  );
23722
23771
  };
23723
23772
 
@@ -23728,13 +23777,13 @@
23728
23777
  *
23729
23778
  * @returns {boolean} True if value is a URLSearchParams object, otherwise false
23730
23779
  */
23731
- const isURLSearchParams = kindOfTest("URLSearchParams");
23780
+ const isURLSearchParams = kindOfTest('URLSearchParams');
23732
23781
 
23733
23782
  const [isReadableStream, isRequest, isResponse, isHeaders] = [
23734
- "ReadableStream",
23735
- "Request",
23736
- "Response",
23737
- "Headers",
23783
+ 'ReadableStream',
23784
+ 'Request',
23785
+ 'Response',
23786
+ 'Headers',
23738
23787
  ].map(kindOfTest);
23739
23788
 
23740
23789
  /**
@@ -23744,9 +23793,9 @@
23744
23793
  *
23745
23794
  * @returns {String} The String freed of excess whitespace
23746
23795
  */
23747
- const trim = (str) =>
23748
- str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
23749
-
23796
+ const trim = (str) => {
23797
+ return str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, '');
23798
+ };
23750
23799
  /**
23751
23800
  * Iterate over an Array or an Object invoking a function for each item.
23752
23801
  *
@@ -23765,7 +23814,7 @@
23765
23814
  */
23766
23815
  function forEach(obj, fn, { allOwnKeys = false } = {}) {
23767
23816
  // Don't bother if no value provided
23768
- if (obj === null || typeof obj === "undefined") {
23817
+ if (obj === null || typeof obj === 'undefined') {
23769
23818
  return;
23770
23819
  }
23771
23820
 
@@ -23773,7 +23822,7 @@
23773
23822
  let l;
23774
23823
 
23775
23824
  // Force an array if not already something iterable
23776
- if (typeof obj !== "object") {
23825
+ if (typeof obj !== 'object') {
23777
23826
  /*eslint no-param-reassign:0*/
23778
23827
  obj = [obj];
23779
23828
  }
@@ -23790,9 +23839,7 @@
23790
23839
  }
23791
23840
 
23792
23841
  // Iterate over object keys
23793
- const keys = allOwnKeys
23794
- ? Object.getOwnPropertyNames(obj)
23795
- : Object.keys(obj);
23842
+ const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);
23796
23843
  const len = keys.length;
23797
23844
  let key;
23798
23845
 
@@ -23803,6 +23850,14 @@
23803
23850
  }
23804
23851
  }
23805
23852
 
23853
+ /**
23854
+ * Finds a key in an object, case-insensitive, returning the actual key name.
23855
+ * Returns null if the object is a Buffer or if no match is found.
23856
+ *
23857
+ * @param {Object} obj - The object to search.
23858
+ * @param {string} key - The key to find (case-insensitive).
23859
+ * @returns {?string} The actual key name if found, otherwise null.
23860
+ */
23806
23861
  function findKey(obj, key) {
23807
23862
  if (isBuffer(obj)) {
23808
23863
  return null;
@@ -23823,16 +23878,11 @@
23823
23878
 
23824
23879
  const _global = (() => {
23825
23880
  /*eslint no-undef:0*/
23826
- if (typeof globalThis !== "undefined") return globalThis;
23827
- return typeof self !== "undefined"
23828
- ? self
23829
- : typeof window !== "undefined"
23830
- ? window
23831
- : global;
23881
+ if (typeof globalThis !== 'undefined') return globalThis;
23882
+ return typeof self !== 'undefined' ? self : typeof window !== 'undefined' ? window : global;
23832
23883
  })();
23833
23884
 
23834
- const isContextDefined = (context) =>
23835
- !isUndefined(context) && context !== _global;
23885
+ const isContextDefined = (context) => !isUndefined(context) && context !== _global;
23836
23886
 
23837
23887
  /**
23838
23888
  * Accepts varargs expecting each argument to be an object, then
@@ -23857,7 +23907,7 @@
23857
23907
  const result = {};
23858
23908
  const assignValue = (val, key) => {
23859
23909
  // Skip dangerous property names to prevent prototype pollution
23860
- if (key === "__proto__" || key === "constructor" || key === "prototype") {
23910
+ if (key === '__proto__' || key === 'constructor' || key === 'prototype') {
23861
23911
  return;
23862
23912
  }
23863
23913
 
@@ -23910,7 +23960,7 @@
23910
23960
  });
23911
23961
  }
23912
23962
  },
23913
- { allOwnKeys },
23963
+ { allOwnKeys }
23914
23964
  );
23915
23965
  return a;
23916
23966
  };
@@ -23939,17 +23989,14 @@
23939
23989
  * @returns {void}
23940
23990
  */
23941
23991
  const inherits = (constructor, superConstructor, props, descriptors) => {
23942
- constructor.prototype = Object.create(
23943
- superConstructor.prototype,
23944
- descriptors,
23945
- );
23946
- Object.defineProperty(constructor.prototype, "constructor", {
23992
+ constructor.prototype = Object.create(superConstructor.prototype, descriptors);
23993
+ Object.defineProperty(constructor.prototype, 'constructor', {
23947
23994
  value: constructor,
23948
23995
  writable: true,
23949
23996
  enumerable: false,
23950
23997
  configurable: true,
23951
23998
  });
23952
- Object.defineProperty(constructor, "super", {
23999
+ Object.defineProperty(constructor, 'super', {
23953
24000
  value: superConstructor.prototype,
23954
24001
  });
23955
24002
  props && Object.assign(constructor.prototype, props);
@@ -23979,20 +24026,13 @@
23979
24026
  i = props.length;
23980
24027
  while (i-- > 0) {
23981
24028
  prop = props[i];
23982
- if (
23983
- (!propFilter || propFilter(prop, sourceObj, destObj)) &&
23984
- !merged[prop]
23985
- ) {
24029
+ if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {
23986
24030
  destObj[prop] = sourceObj[prop];
23987
24031
  merged[prop] = true;
23988
24032
  }
23989
24033
  }
23990
24034
  sourceObj = filter !== false && getPrototypeOf(sourceObj);
23991
- } while (
23992
- sourceObj &&
23993
- (!filter || filter(sourceObj, destObj)) &&
23994
- sourceObj !== Object.prototype
23995
- );
24035
+ } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);
23996
24036
 
23997
24037
  return destObj;
23998
24038
  };
@@ -24049,7 +24089,7 @@
24049
24089
  return (thing) => {
24050
24090
  return TypedArray && thing instanceof TypedArray;
24051
24091
  };
24052
- })(typeof Uint8Array !== "undefined" && getPrototypeOf(Uint8Array));
24092
+ })(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));
24053
24093
 
24054
24094
  /**
24055
24095
  * For each entry in the object, call the function with the key and value.
@@ -24092,14 +24132,12 @@
24092
24132
  };
24093
24133
 
24094
24134
  /* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */
24095
- const isHTMLForm = kindOfTest("HTMLFormElement");
24135
+ const isHTMLForm = kindOfTest('HTMLFormElement');
24096
24136
 
24097
24137
  const toCamelCase = (str) => {
24098
- return str
24099
- .toLowerCase()
24100
- .replace(/[-_\s]([a-z\d])(\w*)/g, function replacer(m, p1, p2) {
24101
- return p1.toUpperCase() + p2;
24102
- });
24138
+ return str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function replacer(m, p1, p2) {
24139
+ return p1.toUpperCase() + p2;
24140
+ });
24103
24141
  };
24104
24142
 
24105
24143
  /* Creating a function that will check if an object has a property. */
@@ -24116,7 +24154,7 @@
24116
24154
  *
24117
24155
  * @returns {boolean} True if value is a RegExp object, otherwise false
24118
24156
  */
24119
- const isRegExp = kindOfTest("RegExp");
24157
+ const isRegExp = kindOfTest('RegExp');
24120
24158
 
24121
24159
  const reduceDescriptors = (obj, reducer) => {
24122
24160
  const descriptors = Object.getOwnPropertyDescriptors(obj);
@@ -24140,10 +24178,7 @@
24140
24178
  const freezeMethods = (obj) => {
24141
24179
  reduceDescriptors(obj, (descriptor, name) => {
24142
24180
  // skip restricted props in strict mode
24143
- if (
24144
- isFunction$1(obj) &&
24145
- ["arguments", "caller", "callee"].indexOf(name) !== -1
24146
- ) {
24181
+ if (isFunction$1(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {
24147
24182
  return false;
24148
24183
  }
24149
24184
 
@@ -24153,7 +24188,7 @@
24153
24188
 
24154
24189
  descriptor.enumerable = false;
24155
24190
 
24156
- if ("writable" in descriptor) {
24191
+ if ('writable' in descriptor) {
24157
24192
  descriptor.writable = false;
24158
24193
  return;
24159
24194
  }
@@ -24166,6 +24201,14 @@
24166
24201
  });
24167
24202
  };
24168
24203
 
24204
+ /**
24205
+ * Converts an array or a delimited string into an object set with values as keys and true as values.
24206
+ * Useful for fast membership checks.
24207
+ *
24208
+ * @param {Array|string} arrayOrString - The array or string to convert.
24209
+ * @param {string} delimiter - The delimiter to use if input is a string.
24210
+ * @returns {Object} An object with keys from the array or string, values set to true.
24211
+ */
24169
24212
  const toObjectSet = (arrayOrString, delimiter) => {
24170
24213
  const obj = {};
24171
24214
 
@@ -24175,9 +24218,7 @@
24175
24218
  });
24176
24219
  };
24177
24220
 
24178
- isArray(arrayOrString)
24179
- ? define(arrayOrString)
24180
- : define(String(arrayOrString).split(delimiter));
24221
+ isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));
24181
24222
 
24182
24223
  return obj;
24183
24224
  };
@@ -24185,9 +24226,7 @@
24185
24226
  const noop = () => {};
24186
24227
 
24187
24228
  const toFiniteNumber = (value, defaultValue) => {
24188
- return value != null && Number.isFinite((value = +value))
24189
- ? value
24190
- : defaultValue;
24229
+ return value != null && Number.isFinite((value = +value)) ? value : defaultValue;
24191
24230
  };
24192
24231
 
24193
24232
  /**
@@ -24201,11 +24240,17 @@
24201
24240
  return !!(
24202
24241
  thing &&
24203
24242
  isFunction$1(thing.append) &&
24204
- thing[toStringTag] === "FormData" &&
24243
+ thing[toStringTag] === 'FormData' &&
24205
24244
  thing[iterator]
24206
24245
  );
24207
24246
  }
24208
24247
 
24248
+ /**
24249
+ * Recursively converts an object to a JSON-compatible object, handling circular references and Buffers.
24250
+ *
24251
+ * @param {Object} obj - The object to convert.
24252
+ * @returns {Object} The JSON-compatible object.
24253
+ */
24209
24254
  const toJSONObject = (obj) => {
24210
24255
  const stack = new Array(10);
24211
24256
 
@@ -24220,7 +24265,7 @@
24220
24265
  return source;
24221
24266
  }
24222
24267
 
24223
- if (!("toJSON" in source)) {
24268
+ if (!('toJSON' in source)) {
24224
24269
  stack[i] = source;
24225
24270
  const target = isArray(source) ? [] : {};
24226
24271
 
@@ -24241,8 +24286,20 @@
24241
24286
  return visit(obj, 0);
24242
24287
  };
24243
24288
 
24244
- const isAsyncFn = kindOfTest("AsyncFunction");
24289
+ /**
24290
+ * Determines if a value is an async function.
24291
+ *
24292
+ * @param {*} thing - The value to test.
24293
+ * @returns {boolean} True if value is an async function, otherwise false.
24294
+ */
24295
+ const isAsyncFn = kindOfTest('AsyncFunction');
24245
24296
 
24297
+ /**
24298
+ * Determines if a value is thenable (has then and catch methods).
24299
+ *
24300
+ * @param {*} thing - The value to test.
24301
+ * @returns {boolean} True if value is thenable, otherwise false.
24302
+ */
24246
24303
  const isThenable = (thing) =>
24247
24304
  thing &&
24248
24305
  (isObject(thing) || isFunction$1(thing)) &&
@@ -24252,6 +24309,14 @@
24252
24309
  // original code
24253
24310
  // https://github.com/DigitalBrainJS/AxiosPromise/blob/16deab13710ec09779922131f3fa5954320f83ab/lib/utils.js#L11-L34
24254
24311
 
24312
+ /**
24313
+ * Provides a cross-platform setImmediate implementation.
24314
+ * Uses native setImmediate if available, otherwise falls back to postMessage or setTimeout.
24315
+ *
24316
+ * @param {boolean} setImmediateSupported - Whether setImmediate is supported.
24317
+ * @param {boolean} postMessageSupported - Whether postMessage is supported.
24318
+ * @returns {Function} A function to schedule a callback asynchronously.
24319
+ */
24255
24320
  const _setImmediate = ((setImmediateSupported, postMessageSupported) => {
24256
24321
  if (setImmediateSupported) {
24257
24322
  return setImmediate;
@@ -24260,27 +24325,33 @@
24260
24325
  return postMessageSupported
24261
24326
  ? ((token, callbacks) => {
24262
24327
  _global.addEventListener(
24263
- "message",
24328
+ 'message',
24264
24329
  ({ source, data }) => {
24265
24330
  if (source === _global && data === token) {
24266
24331
  callbacks.length && callbacks.shift()();
24267
24332
  }
24268
24333
  },
24269
- false,
24334
+ false
24270
24335
  );
24271
24336
 
24272
24337
  return (cb) => {
24273
24338
  callbacks.push(cb);
24274
- _global.postMessage(token, "*");
24339
+ _global.postMessage(token, '*');
24275
24340
  };
24276
24341
  })(`axios@${Math.random()}`, [])
24277
24342
  : (cb) => setTimeout(cb);
24278
- })(typeof setImmediate === "function", isFunction$1(_global.postMessage));
24343
+ })(typeof setImmediate === 'function', isFunction$1(_global.postMessage));
24279
24344
 
24345
+ /**
24346
+ * Schedules a microtask or asynchronous callback as soon as possible.
24347
+ * Uses queueMicrotask if available, otherwise falls back to process.nextTick or _setImmediate.
24348
+ *
24349
+ * @type {Function}
24350
+ */
24280
24351
  const asap =
24281
- typeof queueMicrotask !== "undefined"
24352
+ typeof queueMicrotask !== 'undefined'
24282
24353
  ? queueMicrotask.bind(_global)
24283
- : (typeof process !== "undefined" && process.nextTick) || _setImmediate;
24354
+ : (typeof process !== 'undefined' && process.nextTick) || _setImmediate;
24284
24355
 
24285
24356
  // *********************
24286
24357
 
@@ -24305,6 +24376,8 @@
24305
24376
  isUndefined,
24306
24377
  isDate,
24307
24378
  isFile,
24379
+ isReactNativeBlob,
24380
+ isReactNative,
24308
24381
  isBlob: isBlob$1,
24309
24382
  isRegExp,
24310
24383
  isFunction: isFunction$1,
@@ -24347,14 +24420,20 @@
24347
24420
  };
24348
24421
 
24349
24422
  class AxiosError$1 extends Error {
24350
- static from(error, code, config, request, response, customProps) {
24351
- const axiosError = new AxiosError$1(error.message, code || error.code, config, request, response);
24352
- axiosError.cause = error;
24353
- axiosError.name = error.name;
24354
- customProps && Object.assign(axiosError, customProps);
24355
- return axiosError;
24423
+ static from(error, code, config, request, response, customProps) {
24424
+ const axiosError = new AxiosError$1(error.message, code || error.code, config, request, response);
24425
+ axiosError.cause = error;
24426
+ axiosError.name = error.name;
24427
+
24428
+ // Preserve status from the original error if not already set from response
24429
+ if (error.status != null && axiosError.status == null) {
24430
+ axiosError.status = error.status;
24356
24431
  }
24357
24432
 
24433
+ customProps && Object.assign(axiosError, customProps);
24434
+ return axiosError;
24435
+ }
24436
+
24358
24437
  /**
24359
24438
  * Create an Error with the specified message, config, error code, request and response.
24360
24439
  *
@@ -24367,37 +24446,48 @@
24367
24446
  * @returns {Error} The created error.
24368
24447
  */
24369
24448
  constructor(message, code, config, request, response) {
24370
- super(message);
24371
- this.name = 'AxiosError';
24372
- this.isAxiosError = true;
24373
- code && (this.code = code);
24374
- config && (this.config = config);
24375
- request && (this.request = request);
24376
- if (response) {
24377
- this.response = response;
24378
- this.status = response.status;
24379
- }
24449
+ super(message);
24450
+
24451
+ // Make message enumerable to maintain backward compatibility
24452
+ // The native Error constructor sets message as non-enumerable,
24453
+ // but axios < v1.13.3 had it as enumerable
24454
+ Object.defineProperty(this, 'message', {
24455
+ value: message,
24456
+ enumerable: true,
24457
+ writable: true,
24458
+ configurable: true
24459
+ });
24460
+
24461
+ this.name = 'AxiosError';
24462
+ this.isAxiosError = true;
24463
+ code && (this.code = code);
24464
+ config && (this.config = config);
24465
+ request && (this.request = request);
24466
+ if (response) {
24467
+ this.response = response;
24468
+ this.status = response.status;
24469
+ }
24380
24470
  }
24381
24471
 
24382
- toJSON() {
24383
- return {
24384
- // Standard
24385
- message: this.message,
24386
- name: this.name,
24387
- // Microsoft
24388
- description: this.description,
24389
- number: this.number,
24390
- // Mozilla
24391
- fileName: this.fileName,
24392
- lineNumber: this.lineNumber,
24393
- columnNumber: this.columnNumber,
24394
- stack: this.stack,
24395
- // Axios
24396
- config: utils$1.toJSONObject(this.config),
24397
- code: this.code,
24398
- status: this.status,
24399
- };
24400
- }
24472
+ toJSON() {
24473
+ return {
24474
+ // Standard
24475
+ message: this.message,
24476
+ name: this.name,
24477
+ // Microsoft
24478
+ description: this.description,
24479
+ number: this.number,
24480
+ // Mozilla
24481
+ fileName: this.fileName,
24482
+ lineNumber: this.lineNumber,
24483
+ columnNumber: this.columnNumber,
24484
+ stack: this.stack,
24485
+ // Axios
24486
+ config: utils$1.toJSONObject(this.config),
24487
+ code: this.code,
24488
+ status: this.status,
24489
+ };
24490
+ }
24401
24491
  }
24402
24492
 
24403
24493
  // This can be changed to static properties as soon as the parser options in .eslint.cjs are updated.
@@ -24452,11 +24542,14 @@
24452
24542
  */
24453
24543
  function renderKey(path, key, dots) {
24454
24544
  if (!path) return key;
24455
- return path.concat(key).map(function each(token, i) {
24456
- // eslint-disable-next-line no-param-reassign
24457
- token = removeBrackets(token);
24458
- return !dots && i ? '[' + token + ']' : token;
24459
- }).join(dots ? '.' : '');
24545
+ return path
24546
+ .concat(key)
24547
+ .map(function each(token, i) {
24548
+ // eslint-disable-next-line no-param-reassign
24549
+ token = removeBrackets(token);
24550
+ return !dots && i ? '[' + token + ']' : token;
24551
+ })
24552
+ .join(dots ? '.' : '');
24460
24553
  }
24461
24554
 
24462
24555
  /**
@@ -24506,21 +24599,26 @@
24506
24599
  formData = formData || new (FormData)();
24507
24600
 
24508
24601
  // eslint-disable-next-line no-param-reassign
24509
- options = utils$1.toFlatObject(options, {
24510
- metaTokens: true,
24511
- dots: false,
24512
- indexes: false
24513
- }, false, function defined(option, source) {
24514
- // eslint-disable-next-line no-eq-null,eqeqeq
24515
- return !utils$1.isUndefined(source[option]);
24516
- });
24602
+ options = utils$1.toFlatObject(
24603
+ options,
24604
+ {
24605
+ metaTokens: true,
24606
+ dots: false,
24607
+ indexes: false,
24608
+ },
24609
+ false,
24610
+ function defined(option, source) {
24611
+ // eslint-disable-next-line no-eq-null,eqeqeq
24612
+ return !utils$1.isUndefined(source[option]);
24613
+ }
24614
+ );
24517
24615
 
24518
24616
  const metaTokens = options.metaTokens;
24519
24617
  // eslint-disable-next-line no-use-before-define
24520
24618
  const visitor = options.visitor || defaultVisitor;
24521
24619
  const dots = options.dots;
24522
24620
  const indexes = options.indexes;
24523
- const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;
24621
+ const _Blob = options.Blob || (typeof Blob !== 'undefined' && Blob);
24524
24622
  const useBlob = _Blob && utils$1.isSpecCompliantForm(formData);
24525
24623
 
24526
24624
  if (!utils$1.isFunction(visitor)) {
@@ -24562,6 +24660,11 @@
24562
24660
  function defaultVisitor(value, key, path) {
24563
24661
  let arr = value;
24564
24662
 
24663
+ if (utils$1.isReactNative(formData) && utils$1.isReactNativeBlob(value)) {
24664
+ formData.append(renderKey(path, key, dots), convertValue(value));
24665
+ return false;
24666
+ }
24667
+
24565
24668
  if (value && !path && typeof value === 'object') {
24566
24669
  if (utils$1.endsWith(key, '{}')) {
24567
24670
  // eslint-disable-next-line no-param-reassign
@@ -24570,17 +24673,22 @@
24570
24673
  value = JSON.stringify(value);
24571
24674
  } else if (
24572
24675
  (utils$1.isArray(value) && isFlatArray(value)) ||
24573
- ((utils$1.isFileList(value) || utils$1.endsWith(key, '[]')) && (arr = utils$1.toArray(value))
24574
- )) {
24676
+ ((utils$1.isFileList(value) || utils$1.endsWith(key, '[]')) && (arr = utils$1.toArray(value)))
24677
+ ) {
24575
24678
  // eslint-disable-next-line no-param-reassign
24576
24679
  key = removeBrackets(key);
24577
24680
 
24578
24681
  arr.forEach(function each(el, index) {
24579
- !(utils$1.isUndefined(el) || el === null) && formData.append(
24580
- // eslint-disable-next-line no-nested-ternary
24581
- indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'),
24582
- convertValue(el)
24583
- );
24682
+ !(utils$1.isUndefined(el) || el === null) &&
24683
+ formData.append(
24684
+ // eslint-disable-next-line no-nested-ternary
24685
+ indexes === true
24686
+ ? renderKey([key], index, dots)
24687
+ : indexes === null
24688
+ ? key
24689
+ : key + '[]',
24690
+ convertValue(el)
24691
+ );
24584
24692
  });
24585
24693
  return false;
24586
24694
  }
@@ -24600,7 +24708,7 @@
24600
24708
  const exposedHelpers = Object.assign(predicates, {
24601
24709
  defaultVisitor,
24602
24710
  convertValue,
24603
- isVisitable
24711
+ isVisitable,
24604
24712
  });
24605
24713
 
24606
24714
  function build(value, path) {
@@ -24613,9 +24721,9 @@
24613
24721
  stack.push(value);
24614
24722
 
24615
24723
  utils$1.forEach(value, function each(el, key) {
24616
- const result = !(utils$1.isUndefined(el) || el === null) && visitor.call(
24617
- formData, el, utils$1.isString(key) ? key.trim() : key, path, exposedHelpers
24618
- );
24724
+ const result =
24725
+ !(utils$1.isUndefined(el) || el === null) &&
24726
+ visitor.call(formData, el, utils$1.isString(key) ? key.trim() : key, path, exposedHelpers);
24619
24727
 
24620
24728
  if (result === true) {
24621
24729
  build(el, path ? path.concat(key) : [key]);
@@ -24650,7 +24758,7 @@
24650
24758
  ')': '%29',
24651
24759
  '~': '%7E',
24652
24760
  '%20': '+',
24653
- '%00': '\x00'
24761
+ '%00': '\x00',
24654
24762
  };
24655
24763
  return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {
24656
24764
  return charMap[match];
@@ -24678,13 +24786,17 @@
24678
24786
  };
24679
24787
 
24680
24788
  prototype.toString = function toString(encoder) {
24681
- const _encode = encoder ? function(value) {
24682
- return encoder.call(this, value, encode$1);
24683
- } : encode$1;
24789
+ const _encode = encoder
24790
+ ? function (value) {
24791
+ return encoder.call(this, value, encode$1);
24792
+ }
24793
+ : encode$1;
24684
24794
 
24685
- return this._pairs.map(function each(pair) {
24686
- return _encode(pair[0]) + '=' + _encode(pair[1]);
24687
- }, '').join('&');
24795
+ return this._pairs
24796
+ .map(function each(pair) {
24797
+ return _encode(pair[0]) + '=' + _encode(pair[1]);
24798
+ }, '')
24799
+ .join('&');
24688
24800
  };
24689
24801
 
24690
24802
  /**
@@ -24696,11 +24808,11 @@
24696
24808
  * @returns {string} The encoded value.
24697
24809
  */
24698
24810
  function encode(val) {
24699
- return encodeURIComponent(val).
24700
- replace(/%3A/gi, ':').
24701
- replace(/%24/g, '$').
24702
- replace(/%2C/gi, ',').
24703
- replace(/%20/g, '+');
24811
+ return encodeURIComponent(val)
24812
+ .replace(/%3A/gi, ':')
24813
+ .replace(/%24/g, '$')
24814
+ .replace(/%2C/gi, ',')
24815
+ .replace(/%20/g, '+');
24704
24816
  }
24705
24817
 
24706
24818
  /**
@@ -24717,11 +24829,13 @@
24717
24829
  return url;
24718
24830
  }
24719
24831
 
24720
- const _encode = options && options.encode || encode;
24832
+ const _encode = (options && options.encode) || encode;
24721
24833
 
24722
- const _options = utils$1.isFunction(options) ? {
24723
- serialize: options
24724
- } : options;
24834
+ const _options = utils$1.isFunction(options)
24835
+ ? {
24836
+ serialize: options,
24837
+ }
24838
+ : options;
24725
24839
 
24726
24840
  const serializeFn = _options && _options.serialize;
24727
24841
 
@@ -24730,13 +24844,13 @@
24730
24844
  if (serializeFn) {
24731
24845
  serializedParams = serializeFn(params, _options);
24732
24846
  } else {
24733
- serializedParams = utils$1.isURLSearchParams(params) ?
24734
- params.toString() :
24735
- new AxiosURLSearchParams(params, _options).toString(_encode);
24847
+ serializedParams = utils$1.isURLSearchParams(params)
24848
+ ? params.toString()
24849
+ : new AxiosURLSearchParams(params, _options).toString(_encode);
24736
24850
  }
24737
24851
 
24738
24852
  if (serializedParams) {
24739
- const hashmarkIndex = url.indexOf("#");
24853
+ const hashmarkIndex = url.indexOf('#');
24740
24854
 
24741
24855
  if (hashmarkIndex !== -1) {
24742
24856
  url = url.slice(0, hashmarkIndex);
@@ -24766,7 +24880,7 @@
24766
24880
  fulfilled,
24767
24881
  rejected,
24768
24882
  synchronous: options ? options.synchronous : false,
24769
- runWhen: options ? options.runWhen : null
24883
+ runWhen: options ? options.runWhen : null,
24770
24884
  });
24771
24885
  return this.handlers.length - 1;
24772
24886
  }
@@ -24820,7 +24934,7 @@
24820
24934
  silentJSONParsing: true,
24821
24935
  forcedJSONParsing: true,
24822
24936
  clarifyTimeoutError: false,
24823
- legacyInterceptorReqResOrdering: true
24937
+ legacyInterceptorReqResOrdering: true,
24824
24938
  };
24825
24939
 
24826
24940
  const URLSearchParams$1 = typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;
@@ -24834,14 +24948,14 @@
24834
24948
  classes: {
24835
24949
  URLSearchParams: URLSearchParams$1,
24836
24950
  FormData: FormData$1,
24837
- Blob: Blob$1
24951
+ Blob: Blob$1,
24838
24952
  },
24839
- protocols: ['http', 'https', 'file', 'blob', 'url', 'data']
24953
+ protocols: ['http', 'https', 'file', 'blob', 'url', 'data'],
24840
24954
  };
24841
24955
 
24842
24956
  const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';
24843
24957
 
24844
- const _navigator = typeof navigator === 'object' && navigator || undefined;
24958
+ const _navigator = (typeof navigator === 'object' && navigator) || undefined;
24845
24959
 
24846
24960
  /**
24847
24961
  * Determine if we're running in a standard browser environment
@@ -24860,7 +24974,8 @@
24860
24974
  *
24861
24975
  * @returns {boolean}
24862
24976
  */
24863
- const hasStandardBrowserEnv = hasBrowserEnv &&
24977
+ const hasStandardBrowserEnv =
24978
+ hasBrowserEnv &&
24864
24979
  (!_navigator || ['ReactNative', 'NativeScript', 'NS'].indexOf(_navigator.product) < 0);
24865
24980
 
24866
24981
  /**
@@ -24881,7 +24996,7 @@
24881
24996
  );
24882
24997
  })();
24883
24998
 
24884
- const origin = hasBrowserEnv && window.location.href || 'http://localhost';
24999
+ const origin = (hasBrowserEnv && window.location.href) || 'http://localhost';
24885
25000
 
24886
25001
  const utils$2 = /*#__PURE__*/Object.freeze({
24887
25002
  __proto__: null,
@@ -24894,12 +25009,12 @@
24894
25009
 
24895
25010
  const platform = {
24896
25011
  ...utils$2,
24897
- ...platform$1
25012
+ ...platform$1,
24898
25013
  };
24899
25014
 
24900
25015
  function toURLEncodedForm(data, options) {
24901
25016
  return toFormData$1(data, new platform.classes.URLSearchParams(), {
24902
- visitor: function(value, key, path, helpers) {
25017
+ visitor: function (value, key, path, helpers) {
24903
25018
  if (platform.isNode && utils$1.isBuffer(value)) {
24904
25019
  this.append(key, value.toString('base64'));
24905
25020
  return false;
@@ -24907,7 +25022,7 @@
24907
25022
 
24908
25023
  return helpers.defaultVisitor.apply(this, arguments);
24909
25024
  },
24910
- ...options
25025
+ ...options,
24911
25026
  });
24912
25027
  }
24913
25028
 
@@ -24923,7 +25038,7 @@
24923
25038
  // foo.x.y.z
24924
25039
  // foo-x-y-z
24925
25040
  // foo x y z
24926
- return utils$1.matchAll(/\w+|\[(\w*)]/g, name).map(match => {
25041
+ return utils$1.matchAll(/\w+|\[(\w*)]/g, name).map((match) => {
24927
25042
  return match[0] === '[]' ? '' : match[1] || match[0];
24928
25043
  });
24929
25044
  }
@@ -25027,96 +25142,107 @@
25027
25142
  }
25028
25143
 
25029
25144
  const defaults = {
25030
-
25031
25145
  transitional: transitionalDefaults,
25032
25146
 
25033
25147
  adapter: ['xhr', 'http', 'fetch'],
25034
25148
 
25035
- transformRequest: [function transformRequest(data, headers) {
25036
- const contentType = headers.getContentType() || '';
25037
- const hasJSONContentType = contentType.indexOf('application/json') > -1;
25038
- const isObjectPayload = utils$1.isObject(data);
25149
+ transformRequest: [
25150
+ function transformRequest(data, headers) {
25151
+ const contentType = headers.getContentType() || '';
25152
+ const hasJSONContentType = contentType.indexOf('application/json') > -1;
25153
+ const isObjectPayload = utils$1.isObject(data);
25039
25154
 
25040
- if (isObjectPayload && utils$1.isHTMLForm(data)) {
25041
- data = new FormData(data);
25042
- }
25155
+ if (isObjectPayload && utils$1.isHTMLForm(data)) {
25156
+ data = new FormData(data);
25157
+ }
25043
25158
 
25044
- const isFormData = utils$1.isFormData(data);
25159
+ const isFormData = utils$1.isFormData(data);
25045
25160
 
25046
- if (isFormData) {
25047
- return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;
25048
- }
25161
+ if (isFormData) {
25162
+ return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;
25163
+ }
25049
25164
 
25050
- if (utils$1.isArrayBuffer(data) ||
25051
- utils$1.isBuffer(data) ||
25052
- utils$1.isStream(data) ||
25053
- utils$1.isFile(data) ||
25054
- utils$1.isBlob(data) ||
25055
- utils$1.isReadableStream(data)
25056
- ) {
25057
- return data;
25058
- }
25059
- if (utils$1.isArrayBufferView(data)) {
25060
- return data.buffer;
25061
- }
25062
- if (utils$1.isURLSearchParams(data)) {
25063
- headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);
25064
- return data.toString();
25065
- }
25165
+ if (
25166
+ utils$1.isArrayBuffer(data) ||
25167
+ utils$1.isBuffer(data) ||
25168
+ utils$1.isStream(data) ||
25169
+ utils$1.isFile(data) ||
25170
+ utils$1.isBlob(data) ||
25171
+ utils$1.isReadableStream(data)
25172
+ ) {
25173
+ return data;
25174
+ }
25175
+ if (utils$1.isArrayBufferView(data)) {
25176
+ return data.buffer;
25177
+ }
25178
+ if (utils$1.isURLSearchParams(data)) {
25179
+ headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);
25180
+ return data.toString();
25181
+ }
25066
25182
 
25067
- let isFileList;
25183
+ let isFileList;
25068
25184
 
25069
- if (isObjectPayload) {
25070
- if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {
25071
- return toURLEncodedForm(data, this.formSerializer).toString();
25072
- }
25185
+ if (isObjectPayload) {
25186
+ if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {
25187
+ return toURLEncodedForm(data, this.formSerializer).toString();
25188
+ }
25073
25189
 
25074
- if ((isFileList = utils$1.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {
25075
- const _FormData = this.env && this.env.FormData;
25190
+ if (
25191
+ (isFileList = utils$1.isFileList(data)) ||
25192
+ contentType.indexOf('multipart/form-data') > -1
25193
+ ) {
25194
+ const _FormData = this.env && this.env.FormData;
25076
25195
 
25077
- return toFormData$1(
25078
- isFileList ? {'files[]': data} : data,
25079
- _FormData && new _FormData(),
25080
- this.formSerializer
25081
- );
25196
+ return toFormData$1(
25197
+ isFileList ? { 'files[]': data } : data,
25198
+ _FormData && new _FormData(),
25199
+ this.formSerializer
25200
+ );
25201
+ }
25082
25202
  }
25083
- }
25084
25203
 
25085
- if (isObjectPayload || hasJSONContentType ) {
25086
- headers.setContentType('application/json', false);
25087
- return stringifySafely(data);
25088
- }
25204
+ if (isObjectPayload || hasJSONContentType) {
25205
+ headers.setContentType('application/json', false);
25206
+ return stringifySafely(data);
25207
+ }
25089
25208
 
25090
- return data;
25091
- }],
25209
+ return data;
25210
+ },
25211
+ ],
25092
25212
 
25093
- transformResponse: [function transformResponse(data) {
25094
- const transitional = this.transitional || defaults.transitional;
25095
- const forcedJSONParsing = transitional && transitional.forcedJSONParsing;
25096
- const JSONRequested = this.responseType === 'json';
25213
+ transformResponse: [
25214
+ function transformResponse(data) {
25215
+ const transitional = this.transitional || defaults.transitional;
25216
+ const forcedJSONParsing = transitional && transitional.forcedJSONParsing;
25217
+ const JSONRequested = this.responseType === 'json';
25097
25218
 
25098
- if (utils$1.isResponse(data) || utils$1.isReadableStream(data)) {
25099
- return data;
25100
- }
25219
+ if (utils$1.isResponse(data) || utils$1.isReadableStream(data)) {
25220
+ return data;
25221
+ }
25101
25222
 
25102
- if (data && utils$1.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {
25103
- const silentJSONParsing = transitional && transitional.silentJSONParsing;
25104
- const strictJSONParsing = !silentJSONParsing && JSONRequested;
25223
+ if (
25224
+ data &&
25225
+ utils$1.isString(data) &&
25226
+ ((forcedJSONParsing && !this.responseType) || JSONRequested)
25227
+ ) {
25228
+ const silentJSONParsing = transitional && transitional.silentJSONParsing;
25229
+ const strictJSONParsing = !silentJSONParsing && JSONRequested;
25105
25230
 
25106
- try {
25107
- return JSON.parse(data, this.parseReviver);
25108
- } catch (e) {
25109
- if (strictJSONParsing) {
25110
- if (e.name === 'SyntaxError') {
25111
- throw AxiosError$2.from(e, AxiosError$2.ERR_BAD_RESPONSE, this, null, this.response);
25231
+ try {
25232
+ return JSON.parse(data, this.parseReviver);
25233
+ } catch (e) {
25234
+ if (strictJSONParsing) {
25235
+ if (e.name === 'SyntaxError') {
25236
+ throw AxiosError$2.from(e, AxiosError$2.ERR_BAD_RESPONSE, this, null, this.response);
25237
+ }
25238
+ throw e;
25112
25239
  }
25113
- throw e;
25114
25240
  }
25115
25241
  }
25116
- }
25117
25242
 
25118
- return data;
25119
- }],
25243
+ return data;
25244
+ },
25245
+ ],
25120
25246
 
25121
25247
  /**
25122
25248
  * A timeout in milliseconds to abort a request. If set to 0 (default) a
@@ -25132,7 +25258,7 @@
25132
25258
 
25133
25259
  env: {
25134
25260
  FormData: platform.classes.FormData,
25135
- Blob: platform.classes.Blob
25261
+ Blob: platform.classes.Blob,
25136
25262
  },
25137
25263
 
25138
25264
  validateStatus: function validateStatus(status) {
@@ -25141,10 +25267,10 @@
25141
25267
 
25142
25268
  headers: {
25143
25269
  common: {
25144
- 'Accept': 'application/json, text/plain, */*',
25145
- 'Content-Type': undefined
25146
- }
25147
- }
25270
+ Accept: 'application/json, text/plain, */*',
25271
+ 'Content-Type': undefined,
25272
+ },
25273
+ },
25148
25274
  };
25149
25275
 
25150
25276
  utils$1.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {
@@ -25156,10 +25282,23 @@
25156
25282
  // RawAxiosHeaders whose duplicates are ignored by node
25157
25283
  // c.f. https://nodejs.org/api/http.html#http_message_headers
25158
25284
  const ignoreDuplicateOf = utils$1.toObjectSet([
25159
- 'age', 'authorization', 'content-length', 'content-type', 'etag',
25160
- 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',
25161
- 'last-modified', 'location', 'max-forwards', 'proxy-authorization',
25162
- 'referer', 'retry-after', 'user-agent'
25285
+ 'age',
25286
+ 'authorization',
25287
+ 'content-length',
25288
+ 'content-type',
25289
+ 'etag',
25290
+ 'expires',
25291
+ 'from',
25292
+ 'host',
25293
+ 'if-modified-since',
25294
+ 'if-unmodified-since',
25295
+ 'last-modified',
25296
+ 'location',
25297
+ 'max-forwards',
25298
+ 'proxy-authorization',
25299
+ 'referer',
25300
+ 'retry-after',
25301
+ 'user-agent',
25163
25302
  ]);
25164
25303
 
25165
25304
  /**
@@ -25176,31 +25315,32 @@
25176
25315
  *
25177
25316
  * @returns {Object} Headers parsed into an object
25178
25317
  */
25179
- const parseHeaders = rawHeaders => {
25318
+ const parseHeaders = (rawHeaders) => {
25180
25319
  const parsed = {};
25181
25320
  let key;
25182
25321
  let val;
25183
25322
  let i;
25184
25323
 
25185
- rawHeaders && rawHeaders.split('\n').forEach(function parser(line) {
25186
- i = line.indexOf(':');
25187
- key = line.substring(0, i).trim().toLowerCase();
25188
- val = line.substring(i + 1).trim();
25324
+ rawHeaders &&
25325
+ rawHeaders.split('\n').forEach(function parser(line) {
25326
+ i = line.indexOf(':');
25327
+ key = line.substring(0, i).trim().toLowerCase();
25328
+ val = line.substring(i + 1).trim();
25189
25329
 
25190
- if (!key || (parsed[key] && ignoreDuplicateOf[key])) {
25191
- return;
25192
- }
25330
+ if (!key || (parsed[key] && ignoreDuplicateOf[key])) {
25331
+ return;
25332
+ }
25193
25333
 
25194
- if (key === 'set-cookie') {
25195
- if (parsed[key]) {
25196
- parsed[key].push(val);
25334
+ if (key === 'set-cookie') {
25335
+ if (parsed[key]) {
25336
+ parsed[key].push(val);
25337
+ } else {
25338
+ parsed[key] = [val];
25339
+ }
25197
25340
  } else {
25198
- parsed[key] = [val];
25341
+ parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
25199
25342
  }
25200
- } else {
25201
- parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
25202
- }
25203
- });
25343
+ });
25204
25344
 
25205
25345
  return parsed;
25206
25346
  };
@@ -25254,8 +25394,10 @@
25254
25394
  }
25255
25395
 
25256
25396
  function formatHeader(header) {
25257
- return header.trim()
25258
- .toLowerCase().replace(/([a-z\d])(\w*)/g, (w, char, str) => {
25397
+ return header
25398
+ .trim()
25399
+ .toLowerCase()
25400
+ .replace(/([a-z\d])(\w*)/g, (w, char, str) => {
25259
25401
  return char.toUpperCase() + str;
25260
25402
  });
25261
25403
  }
@@ -25263,12 +25405,12 @@
25263
25405
  function buildAccessors(obj, header) {
25264
25406
  const accessorName = utils$1.toCamelCase(' ' + header);
25265
25407
 
25266
- ['get', 'set', 'has'].forEach(methodName => {
25408
+ ['get', 'set', 'has'].forEach((methodName) => {
25267
25409
  Object.defineProperty(obj, methodName + accessorName, {
25268
- value: function(arg1, arg2, arg3) {
25410
+ value: function (arg1, arg2, arg3) {
25269
25411
  return this[methodName].call(this, header, arg1, arg2, arg3);
25270
25412
  },
25271
- configurable: true
25413
+ configurable: true,
25272
25414
  });
25273
25415
  });
25274
25416
  }
@@ -25290,7 +25432,12 @@
25290
25432
 
25291
25433
  const key = utils$1.findKey(self, lHeader);
25292
25434
 
25293
- if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) {
25435
+ if (
25436
+ !key ||
25437
+ self[key] === undefined ||
25438
+ _rewrite === true ||
25439
+ (_rewrite === undefined && self[key] !== false)
25440
+ ) {
25294
25441
  self[key || _header] = normalizeValue(_value);
25295
25442
  }
25296
25443
  }
@@ -25300,17 +25447,22 @@
25300
25447
 
25301
25448
  if (utils$1.isPlainObject(header) || header instanceof this.constructor) {
25302
25449
  setHeaders(header, valueOrRewrite);
25303
- } else if(utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
25450
+ } else if (utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
25304
25451
  setHeaders(parseHeaders(header), valueOrRewrite);
25305
25452
  } else if (utils$1.isObject(header) && utils$1.isIterable(header)) {
25306
- let obj = {}, dest, key;
25453
+ let obj = {},
25454
+ dest,
25455
+ key;
25307
25456
  for (const entry of header) {
25308
25457
  if (!utils$1.isArray(entry)) {
25309
25458
  throw TypeError('Object iterator must return a key-value pair');
25310
25459
  }
25311
25460
 
25312
- obj[key = entry[0]] = (dest = obj[key]) ?
25313
- (utils$1.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]]) : entry[1];
25461
+ obj[(key = entry[0])] = (dest = obj[key])
25462
+ ? utils$1.isArray(dest)
25463
+ ? [...dest, entry[1]]
25464
+ : [dest, entry[1]]
25465
+ : entry[1];
25314
25466
  }
25315
25467
 
25316
25468
  setHeaders(obj, valueOrRewrite);
@@ -25357,7 +25509,11 @@
25357
25509
  if (header) {
25358
25510
  const key = utils$1.findKey(this, header);
25359
25511
 
25360
- return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
25512
+ return !!(
25513
+ key &&
25514
+ this[key] !== undefined &&
25515
+ (!matcher || matchHeaderValue(this, this[key], key, matcher))
25516
+ );
25361
25517
  }
25362
25518
 
25363
25519
  return false;
@@ -25397,7 +25553,7 @@
25397
25553
 
25398
25554
  while (i--) {
25399
25555
  const key = keys[i];
25400
- if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
25556
+ if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
25401
25557
  delete this[key];
25402
25558
  deleted = true;
25403
25559
  }
@@ -25441,7 +25597,9 @@
25441
25597
  const obj = Object.create(null);
25442
25598
 
25443
25599
  utils$1.forEach(this, (value, header) => {
25444
- value != null && value !== false && (obj[header] = asStrings && utils$1.isArray(value) ? value.join(', ') : value);
25600
+ value != null &&
25601
+ value !== false &&
25602
+ (obj[header] = asStrings && utils$1.isArray(value) ? value.join(', ') : value);
25445
25603
  });
25446
25604
 
25447
25605
  return obj;
@@ -25452,11 +25610,13 @@
25452
25610
  }
25453
25611
 
25454
25612
  toString() {
25455
- return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\n');
25613
+ return Object.entries(this.toJSON())
25614
+ .map(([header, value]) => header + ': ' + value)
25615
+ .join('\n');
25456
25616
  }
25457
25617
 
25458
25618
  getSetCookie() {
25459
- return this.get("set-cookie") || [];
25619
+ return this.get('set-cookie') || [];
25460
25620
  }
25461
25621
 
25462
25622
  get [Symbol.toStringTag]() {
@@ -25476,9 +25636,12 @@
25476
25636
  }
25477
25637
 
25478
25638
  static accessor(header) {
25479
- const internals = this[$internals] = (this[$internals] = {
25480
- accessors: {}
25481
- });
25639
+ const internals =
25640
+ (this[$internals] =
25641
+ this[$internals] =
25642
+ {
25643
+ accessors: {},
25644
+ });
25482
25645
 
25483
25646
  const accessors = internals.accessors;
25484
25647
  const prototype = this.prototype;
@@ -25498,17 +25661,24 @@
25498
25661
  }
25499
25662
  }
25500
25663
 
25501
- AxiosHeaders$1.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);
25664
+ AxiosHeaders$1.accessor([
25665
+ 'Content-Type',
25666
+ 'Content-Length',
25667
+ 'Accept',
25668
+ 'Accept-Encoding',
25669
+ 'User-Agent',
25670
+ 'Authorization',
25671
+ ]);
25502
25672
 
25503
25673
  // reserved names hotfix
25504
- utils$1.reduceDescriptors(AxiosHeaders$1.prototype, ({value}, key) => {
25674
+ utils$1.reduceDescriptors(AxiosHeaders$1.prototype, ({ value }, key) => {
25505
25675
  let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`
25506
25676
  return {
25507
25677
  get: () => value,
25508
25678
  set(headerValue) {
25509
25679
  this[mapped] = headerValue;
25510
- }
25511
- }
25680
+ },
25681
+ };
25512
25682
  });
25513
25683
 
25514
25684
  utils$1.freezeMethods(AxiosHeaders$1);
@@ -25575,19 +25745,23 @@
25575
25745
  if (!response.status || !validateStatus || validateStatus(response.status)) {
25576
25746
  resolve(response);
25577
25747
  } else {
25578
- reject(new AxiosError$2(
25579
- 'Request failed with status code ' + response.status,
25580
- [AxiosError$2.ERR_BAD_REQUEST, AxiosError$2.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],
25581
- response.config,
25582
- response.request,
25583
- response
25584
- ));
25748
+ reject(
25749
+ new AxiosError$2(
25750
+ 'Request failed with status code ' + response.status,
25751
+ [AxiosError$2.ERR_BAD_REQUEST, AxiosError$2.ERR_BAD_RESPONSE][
25752
+ Math.floor(response.status / 100) - 4
25753
+ ],
25754
+ response.config,
25755
+ response.request,
25756
+ response
25757
+ )
25758
+ );
25585
25759
  }
25586
25760
  }
25587
25761
 
25588
25762
  function parseProtocol(url) {
25589
25763
  const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
25590
- return match && match[1] || '';
25764
+ return (match && match[1]) || '';
25591
25765
  }
25592
25766
 
25593
25767
  /**
@@ -25638,7 +25812,7 @@
25638
25812
 
25639
25813
  const passed = startedAt && now - startedAt;
25640
25814
 
25641
- return passed ? Math.round(bytesCount * 1000 / passed) : undefined;
25815
+ return passed ? Math.round((bytesCount * 1000) / passed) : undefined;
25642
25816
  };
25643
25817
  }
25644
25818
 
@@ -25667,7 +25841,7 @@
25667
25841
  const throttled = (...args) => {
25668
25842
  const now = Date.now();
25669
25843
  const passed = now - timestamp;
25670
- if ( passed >= threshold) {
25844
+ if (passed >= threshold) {
25671
25845
  invoke(args, now);
25672
25846
  } else {
25673
25847
  lastArgs = args;
@@ -25689,7 +25863,7 @@
25689
25863
  let bytesNotified = 0;
25690
25864
  const _speedometer = speedometer(50, 250);
25691
25865
 
25692
- return throttle(e => {
25866
+ return throttle((e) => {
25693
25867
  const loaded = e.loaded;
25694
25868
  const total = e.lengthComputable ? e.total : undefined;
25695
25869
  const progressBytes = loaded - bytesNotified;
@@ -25701,13 +25875,13 @@
25701
25875
  const data = {
25702
25876
  loaded,
25703
25877
  total,
25704
- progress: total ? (loaded / total) : undefined,
25878
+ progress: total ? loaded / total : undefined,
25705
25879
  bytes: progressBytes,
25706
25880
  rate: rate ? rate : undefined,
25707
25881
  estimated: rate && total && inRange ? (total - loaded) / rate : undefined,
25708
25882
  event: e,
25709
25883
  lengthComputable: total != null,
25710
- [isDownloadStream ? 'download' : 'upload']: true
25884
+ [isDownloadStream ? 'download' : 'upload']: true,
25711
25885
  };
25712
25886
 
25713
25887
  listener(data);
@@ -25717,77 +25891,82 @@
25717
25891
  const progressEventDecorator = (total, throttled) => {
25718
25892
  const lengthComputable = total != null;
25719
25893
 
25720
- return [(loaded) => throttled[0]({
25721
- lengthComputable,
25722
- total,
25723
- loaded
25724
- }), throttled[1]];
25894
+ return [
25895
+ (loaded) =>
25896
+ throttled[0]({
25897
+ lengthComputable,
25898
+ total,
25899
+ loaded,
25900
+ }),
25901
+ throttled[1],
25902
+ ];
25725
25903
  };
25726
25904
 
25727
- const asyncDecorator = (fn) => (...args) => utils$1.asap(() => fn(...args));
25905
+ const asyncDecorator =
25906
+ (fn) =>
25907
+ (...args) =>
25908
+ utils$1.asap(() => fn(...args));
25728
25909
 
25729
- const isURLSameOrigin = platform.hasStandardBrowserEnv ? ((origin, isMSIE) => (url) => {
25730
- url = new URL(url, platform.origin);
25731
-
25732
- return (
25733
- origin.protocol === url.protocol &&
25734
- origin.host === url.host &&
25735
- (isMSIE || origin.port === url.port)
25736
- );
25737
- })(
25738
- new URL(platform.origin),
25739
- platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent)
25740
- ) : () => true;
25910
+ const isURLSameOrigin = platform.hasStandardBrowserEnv
25911
+ ? ((origin, isMSIE) => (url) => {
25912
+ url = new URL(url, platform.origin);
25741
25913
 
25742
- const cookies = platform.hasStandardBrowserEnv ?
25914
+ return (
25915
+ origin.protocol === url.protocol &&
25916
+ origin.host === url.host &&
25917
+ (isMSIE || origin.port === url.port)
25918
+ );
25919
+ })(
25920
+ new URL(platform.origin),
25921
+ platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent)
25922
+ )
25923
+ : () => true;
25743
25924
 
25744
- // Standard browser envs support document.cookie
25745
- {
25746
- write(name, value, expires, path, domain, secure, sameSite) {
25747
- if (typeof document === 'undefined') return;
25925
+ const cookies = platform.hasStandardBrowserEnv
25926
+ ? // Standard browser envs support document.cookie
25927
+ {
25928
+ write(name, value, expires, path, domain, secure, sameSite) {
25929
+ if (typeof document === 'undefined') return;
25748
25930
 
25749
- const cookie = [`${name}=${encodeURIComponent(value)}`];
25931
+ const cookie = [`${name}=${encodeURIComponent(value)}`];
25750
25932
 
25751
- if (utils$1.isNumber(expires)) {
25752
- cookie.push(`expires=${new Date(expires).toUTCString()}`);
25753
- }
25754
- if (utils$1.isString(path)) {
25755
- cookie.push(`path=${path}`);
25756
- }
25757
- if (utils$1.isString(domain)) {
25758
- cookie.push(`domain=${domain}`);
25759
- }
25760
- if (secure === true) {
25761
- cookie.push('secure');
25762
- }
25763
- if (utils$1.isString(sameSite)) {
25764
- cookie.push(`SameSite=${sameSite}`);
25765
- }
25933
+ if (utils$1.isNumber(expires)) {
25934
+ cookie.push(`expires=${new Date(expires).toUTCString()}`);
25935
+ }
25936
+ if (utils$1.isString(path)) {
25937
+ cookie.push(`path=${path}`);
25938
+ }
25939
+ if (utils$1.isString(domain)) {
25940
+ cookie.push(`domain=${domain}`);
25941
+ }
25942
+ if (secure === true) {
25943
+ cookie.push('secure');
25944
+ }
25945
+ if (utils$1.isString(sameSite)) {
25946
+ cookie.push(`SameSite=${sameSite}`);
25947
+ }
25766
25948
 
25767
- document.cookie = cookie.join('; ');
25768
- },
25949
+ document.cookie = cookie.join('; ');
25950
+ },
25769
25951
 
25770
- read(name) {
25771
- if (typeof document === 'undefined') return null;
25772
- const match = document.cookie.match(new RegExp('(?:^|; )' + name + '=([^;]*)'));
25773
- return match ? decodeURIComponent(match[1]) : null;
25774
- },
25952
+ read(name) {
25953
+ if (typeof document === 'undefined') return null;
25954
+ const match = document.cookie.match(new RegExp('(?:^|; )' + name + '=([^;]*)'));
25955
+ return match ? decodeURIComponent(match[1]) : null;
25956
+ },
25775
25957
 
25776
- remove(name) {
25777
- this.write(name, '', Date.now() - 86400000, '/');
25958
+ remove(name) {
25959
+ this.write(name, '', Date.now() - 86400000, '/');
25960
+ },
25778
25961
  }
25779
- }
25780
-
25781
- :
25782
-
25783
- // Non-standard browser env (web workers, react-native) lack needed support.
25784
- {
25785
- write() {},
25786
- read() {
25787
- return null;
25788
- },
25789
- remove() {}
25790
- };
25962
+ : // Non-standard browser env (web workers, react-native) lack needed support.
25963
+ {
25964
+ write() {},
25965
+ read() {
25966
+ return null;
25967
+ },
25968
+ remove() {},
25969
+ };
25791
25970
 
25792
25971
  /**
25793
25972
  * Determines whether the specified URL is absolute
@@ -25839,8 +26018,7 @@
25839
26018
  return requestedURL;
25840
26019
  }
25841
26020
 
25842
- const headersToObject = (thing) =>
25843
- thing instanceof AxiosHeaders$2 ? { ...thing } : thing;
26021
+ const headersToObject = (thing) => (thing instanceof AxiosHeaders$2 ? { ...thing } : thing);
25844
26022
 
25845
26023
  /**
25846
26024
  * Config-specific merge-function which creates a new config-object
@@ -25933,23 +26111,12 @@
25933
26111
  mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true),
25934
26112
  };
25935
26113
 
25936
- utils$1.forEach(
25937
- Object.keys({ ...config1, ...config2 }),
25938
- function computeConfigValue(prop) {
25939
- if (
25940
- prop === "__proto__" ||
25941
- prop === "constructor" ||
25942
- prop === "prototype"
25943
- )
25944
- return;
25945
- const merge = utils$1.hasOwnProp(mergeMap, prop)
25946
- ? mergeMap[prop]
25947
- : mergeDeepProperties;
25948
- const configValue = merge(config1[prop], config2[prop], prop);
25949
- (utils$1.isUndefined(configValue) && merge !== mergeDirectKeys) ||
25950
- (config[prop] = configValue);
25951
- },
25952
- );
26114
+ utils$1.forEach(Object.keys({ ...config1, ...config2 }), function computeConfigValue(prop) {
26115
+ if (prop === '__proto__' || prop === 'constructor' || prop === 'prototype') return;
26116
+ const merge = utils$1.hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties;
26117
+ const configValue = merge(config1[prop], config2[prop], prop);
26118
+ (utils$1.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
26119
+ });
25953
26120
 
25954
26121
  return config;
25955
26122
  }
@@ -25961,12 +26128,22 @@
25961
26128
 
25962
26129
  newConfig.headers = headers = AxiosHeaders$2.from(headers);
25963
26130
 
25964
- newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls), config.params, config.paramsSerializer);
26131
+ newConfig.url = buildURL(
26132
+ buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls),
26133
+ config.params,
26134
+ config.paramsSerializer
26135
+ );
25965
26136
 
25966
26137
  // HTTP basic authentication
25967
26138
  if (auth) {
25968
- headers.set('Authorization', 'Basic ' +
25969
- btoa((auth.username || '') + ':' + (auth.password ? unescape(encodeURIComponent(auth.password)) : ''))
26139
+ headers.set(
26140
+ 'Authorization',
26141
+ 'Basic ' +
26142
+ btoa(
26143
+ (auth.username || '') +
26144
+ ':' +
26145
+ (auth.password ? unescape(encodeURIComponent(auth.password)) : '')
26146
+ )
25970
26147
  );
25971
26148
  }
25972
26149
 
@@ -25984,7 +26161,7 @@
25984
26161
  }
25985
26162
  });
25986
26163
  }
25987
- }
26164
+ }
25988
26165
 
25989
26166
  // Add xsrf header
25990
26167
  // This is only done if running in a standard browser environment.
@@ -26008,196 +26185,218 @@
26008
26185
 
26009
26186
  const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
26010
26187
 
26011
- const xhrAdapter = isXHRAdapterSupported && function (config) {
26012
- return new Promise(function dispatchXhrRequest(resolve, reject) {
26013
- const _config = resolveConfig(config);
26014
- let requestData = _config.data;
26015
- const requestHeaders = AxiosHeaders$2.from(_config.headers).normalize();
26016
- let {responseType, onUploadProgress, onDownloadProgress} = _config;
26017
- let onCanceled;
26018
- let uploadThrottled, downloadThrottled;
26019
- let flushUpload, flushDownload;
26188
+ const xhrAdapter = isXHRAdapterSupported &&
26189
+ function (config) {
26190
+ return new Promise(function dispatchXhrRequest(resolve, reject) {
26191
+ const _config = resolveConfig(config);
26192
+ let requestData = _config.data;
26193
+ const requestHeaders = AxiosHeaders$2.from(_config.headers).normalize();
26194
+ let { responseType, onUploadProgress, onDownloadProgress } = _config;
26195
+ let onCanceled;
26196
+ let uploadThrottled, downloadThrottled;
26197
+ let flushUpload, flushDownload;
26020
26198
 
26021
- function done() {
26022
- flushUpload && flushUpload(); // flush events
26023
- flushDownload && flushDownload(); // flush events
26199
+ function done() {
26200
+ flushUpload && flushUpload(); // flush events
26201
+ flushDownload && flushDownload(); // flush events
26024
26202
 
26025
- _config.cancelToken && _config.cancelToken.unsubscribe(onCanceled);
26203
+ _config.cancelToken && _config.cancelToken.unsubscribe(onCanceled);
26026
26204
 
26027
- _config.signal && _config.signal.removeEventListener('abort', onCanceled);
26028
- }
26205
+ _config.signal && _config.signal.removeEventListener('abort', onCanceled);
26206
+ }
26029
26207
 
26030
- let request = new XMLHttpRequest();
26208
+ let request = new XMLHttpRequest();
26031
26209
 
26032
- request.open(_config.method.toUpperCase(), _config.url, true);
26210
+ request.open(_config.method.toUpperCase(), _config.url, true);
26033
26211
 
26034
- // Set the request timeout in MS
26035
- request.timeout = _config.timeout;
26212
+ // Set the request timeout in MS
26213
+ request.timeout = _config.timeout;
26036
26214
 
26037
- function onloadend() {
26038
- if (!request) {
26039
- return;
26215
+ function onloadend() {
26216
+ if (!request) {
26217
+ return;
26218
+ }
26219
+ // Prepare the response
26220
+ const responseHeaders = AxiosHeaders$2.from(
26221
+ 'getAllResponseHeaders' in request && request.getAllResponseHeaders()
26222
+ );
26223
+ const responseData =
26224
+ !responseType || responseType === 'text' || responseType === 'json'
26225
+ ? request.responseText
26226
+ : request.response;
26227
+ const response = {
26228
+ data: responseData,
26229
+ status: request.status,
26230
+ statusText: request.statusText,
26231
+ headers: responseHeaders,
26232
+ config,
26233
+ request,
26234
+ };
26235
+
26236
+ settle(
26237
+ function _resolve(value) {
26238
+ resolve(value);
26239
+ done();
26240
+ },
26241
+ function _reject(err) {
26242
+ reject(err);
26243
+ done();
26244
+ },
26245
+ response
26246
+ );
26247
+
26248
+ // Clean up request
26249
+ request = null;
26040
26250
  }
26041
- // Prepare the response
26042
- const responseHeaders = AxiosHeaders$2.from(
26043
- 'getAllResponseHeaders' in request && request.getAllResponseHeaders()
26044
- );
26045
- const responseData = !responseType || responseType === 'text' || responseType === 'json' ?
26046
- request.responseText : request.response;
26047
- const response = {
26048
- data: responseData,
26049
- status: request.status,
26050
- statusText: request.statusText,
26051
- headers: responseHeaders,
26052
- config,
26053
- request
26054
- };
26055
26251
 
26056
- settle(function _resolve(value) {
26057
- resolve(value);
26058
- done();
26059
- }, function _reject(err) {
26060
- reject(err);
26061
- done();
26062
- }, response);
26252
+ if ('onloadend' in request) {
26253
+ // Use onloadend if available
26254
+ request.onloadend = onloadend;
26255
+ } else {
26256
+ // Listen for ready state to emulate onloadend
26257
+ request.onreadystatechange = function handleLoad() {
26258
+ if (!request || request.readyState !== 4) {
26259
+ return;
26260
+ }
26063
26261
 
26064
- // Clean up request
26065
- request = null;
26066
- }
26262
+ // The request errored out and we didn't get a response, this will be
26263
+ // handled by onerror instead
26264
+ // With one exception: request that using file: protocol, most browsers
26265
+ // will return status as 0 even though it's a successful request
26266
+ if (
26267
+ request.status === 0 &&
26268
+ !(request.responseURL && request.responseURL.indexOf('file:') === 0)
26269
+ ) {
26270
+ return;
26271
+ }
26272
+ // readystate handler is calling before onerror or ontimeout handlers,
26273
+ // so we should call onloadend on the next 'tick'
26274
+ setTimeout(onloadend);
26275
+ };
26276
+ }
26067
26277
 
26068
- if ('onloadend' in request) {
26069
- // Use onloadend if available
26070
- request.onloadend = onloadend;
26071
- } else {
26072
- // Listen for ready state to emulate onloadend
26073
- request.onreadystatechange = function handleLoad() {
26074
- if (!request || request.readyState !== 4) {
26278
+ // Handle browser request cancellation (as opposed to a manual cancellation)
26279
+ request.onabort = function handleAbort() {
26280
+ if (!request) {
26075
26281
  return;
26076
26282
  }
26077
26283
 
26078
- // The request errored out and we didn't get a response, this will be
26079
- // handled by onerror instead
26080
- // With one exception: request that using file: protocol, most browsers
26081
- // will return status as 0 even though it's a successful request
26082
- if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {
26083
- return;
26084
- }
26085
- // readystate handler is calling before onerror or ontimeout handlers,
26086
- // so we should call onloadend on the next 'tick'
26087
- setTimeout(onloadend);
26284
+ reject(new AxiosError$2('Request aborted', AxiosError$2.ECONNABORTED, config, request));
26285
+
26286
+ // Clean up request
26287
+ request = null;
26088
26288
  };
26089
- }
26090
26289
 
26091
- // Handle browser request cancellation (as opposed to a manual cancellation)
26092
- request.onabort = function handleAbort() {
26093
- if (!request) {
26094
- return;
26095
- }
26290
+ // Handle low level network errors
26291
+ request.onerror = function handleError(event) {
26292
+ // Browsers deliver a ProgressEvent in XHR onerror
26293
+ // (message may be empty; when present, surface it)
26294
+ // See https://developer.mozilla.org/docs/Web/API/XMLHttpRequest/error_event
26295
+ const msg = event && event.message ? event.message : 'Network Error';
26296
+ const err = new AxiosError$2(msg, AxiosError$2.ERR_NETWORK, config, request);
26297
+ // attach the underlying event for consumers who want details
26298
+ err.event = event || null;
26299
+ reject(err);
26300
+ request = null;
26301
+ };
26096
26302
 
26097
- reject(new AxiosError$2('Request aborted', AxiosError$2.ECONNABORTED, config, request));
26098
-
26099
- // Clean up request
26100
- request = null;
26101
- };
26102
-
26103
- // Handle low level network errors
26104
- request.onerror = function handleError(event) {
26105
- // Browsers deliver a ProgressEvent in XHR onerror
26106
- // (message may be empty; when present, surface it)
26107
- // See https://developer.mozilla.org/docs/Web/API/XMLHttpRequest/error_event
26108
- const msg = event && event.message ? event.message : 'Network Error';
26109
- const err = new AxiosError$2(msg, AxiosError$2.ERR_NETWORK, config, request);
26110
- // attach the underlying event for consumers who want details
26111
- err.event = event || null;
26112
- reject(err);
26113
- request = null;
26114
- };
26115
-
26116
- // Handle timeout
26117
- request.ontimeout = function handleTimeout() {
26118
- let timeoutErrorMessage = _config.timeout ? 'timeout of ' + _config.timeout + 'ms exceeded' : 'timeout exceeded';
26119
- const transitional = _config.transitional || transitionalDefaults;
26120
- if (_config.timeoutErrorMessage) {
26121
- timeoutErrorMessage = _config.timeoutErrorMessage;
26122
- }
26123
- reject(new AxiosError$2(
26124
- timeoutErrorMessage,
26125
- transitional.clarifyTimeoutError ? AxiosError$2.ETIMEDOUT : AxiosError$2.ECONNABORTED,
26126
- config,
26127
- request));
26303
+ // Handle timeout
26304
+ request.ontimeout = function handleTimeout() {
26305
+ let timeoutErrorMessage = _config.timeout
26306
+ ? 'timeout of ' + _config.timeout + 'ms exceeded'
26307
+ : 'timeout exceeded';
26308
+ const transitional = _config.transitional || transitionalDefaults;
26309
+ if (_config.timeoutErrorMessage) {
26310
+ timeoutErrorMessage = _config.timeoutErrorMessage;
26311
+ }
26312
+ reject(
26313
+ new AxiosError$2(
26314
+ timeoutErrorMessage,
26315
+ transitional.clarifyTimeoutError ? AxiosError$2.ETIMEDOUT : AxiosError$2.ECONNABORTED,
26316
+ config,
26317
+ request
26318
+ )
26319
+ );
26128
26320
 
26129
- // Clean up request
26130
- request = null;
26131
- };
26321
+ // Clean up request
26322
+ request = null;
26323
+ };
26132
26324
 
26133
- // Remove Content-Type if data is undefined
26134
- requestData === undefined && requestHeaders.setContentType(null);
26325
+ // Remove Content-Type if data is undefined
26326
+ requestData === undefined && requestHeaders.setContentType(null);
26135
26327
 
26136
- // Add headers to the request
26137
- if ('setRequestHeader' in request) {
26138
- utils$1.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
26139
- request.setRequestHeader(key, val);
26140
- });
26141
- }
26328
+ // Add headers to the request
26329
+ if ('setRequestHeader' in request) {
26330
+ utils$1.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
26331
+ request.setRequestHeader(key, val);
26332
+ });
26333
+ }
26142
26334
 
26143
- // Add withCredentials to request if needed
26144
- if (!utils$1.isUndefined(_config.withCredentials)) {
26145
- request.withCredentials = !!_config.withCredentials;
26146
- }
26335
+ // Add withCredentials to request if needed
26336
+ if (!utils$1.isUndefined(_config.withCredentials)) {
26337
+ request.withCredentials = !!_config.withCredentials;
26338
+ }
26147
26339
 
26148
- // Add responseType to request if needed
26149
- if (responseType && responseType !== 'json') {
26150
- request.responseType = _config.responseType;
26151
- }
26340
+ // Add responseType to request if needed
26341
+ if (responseType && responseType !== 'json') {
26342
+ request.responseType = _config.responseType;
26343
+ }
26152
26344
 
26153
- // Handle progress if needed
26154
- if (onDownloadProgress) {
26155
- ([downloadThrottled, flushDownload] = progressEventReducer(onDownloadProgress, true));
26156
- request.addEventListener('progress', downloadThrottled);
26157
- }
26345
+ // Handle progress if needed
26346
+ if (onDownloadProgress) {
26347
+ [downloadThrottled, flushDownload] = progressEventReducer(onDownloadProgress, true);
26348
+ request.addEventListener('progress', downloadThrottled);
26349
+ }
26158
26350
 
26159
- // Not all browsers support upload events
26160
- if (onUploadProgress && request.upload) {
26161
- ([uploadThrottled, flushUpload] = progressEventReducer(onUploadProgress));
26351
+ // Not all browsers support upload events
26352
+ if (onUploadProgress && request.upload) {
26353
+ [uploadThrottled, flushUpload] = progressEventReducer(onUploadProgress);
26162
26354
 
26163
- request.upload.addEventListener('progress', uploadThrottled);
26355
+ request.upload.addEventListener('progress', uploadThrottled);
26164
26356
 
26165
- request.upload.addEventListener('loadend', flushUpload);
26166
- }
26357
+ request.upload.addEventListener('loadend', flushUpload);
26358
+ }
26167
26359
 
26168
- if (_config.cancelToken || _config.signal) {
26169
- // Handle cancellation
26170
- // eslint-disable-next-line func-names
26171
- onCanceled = cancel => {
26172
- if (!request) {
26173
- return;
26174
- }
26175
- reject(!cancel || cancel.type ? new CanceledError$2(null, config, request) : cancel);
26176
- request.abort();
26177
- request = null;
26178
- };
26360
+ if (_config.cancelToken || _config.signal) {
26361
+ // Handle cancellation
26362
+ // eslint-disable-next-line func-names
26363
+ onCanceled = (cancel) => {
26364
+ if (!request) {
26365
+ return;
26366
+ }
26367
+ reject(!cancel || cancel.type ? new CanceledError$2(null, config, request) : cancel);
26368
+ request.abort();
26369
+ request = null;
26370
+ };
26179
26371
 
26180
- _config.cancelToken && _config.cancelToken.subscribe(onCanceled);
26181
- if (_config.signal) {
26182
- _config.signal.aborted ? onCanceled() : _config.signal.addEventListener('abort', onCanceled);
26372
+ _config.cancelToken && _config.cancelToken.subscribe(onCanceled);
26373
+ if (_config.signal) {
26374
+ _config.signal.aborted
26375
+ ? onCanceled()
26376
+ : _config.signal.addEventListener('abort', onCanceled);
26377
+ }
26183
26378
  }
26184
- }
26185
-
26186
- const protocol = parseProtocol(_config.url);
26187
26379
 
26188
- if (protocol && platform.protocols.indexOf(protocol) === -1) {
26189
- reject(new AxiosError$2('Unsupported protocol ' + protocol + ':', AxiosError$2.ERR_BAD_REQUEST, config));
26190
- return;
26191
- }
26380
+ const protocol = parseProtocol(_config.url);
26192
26381
 
26382
+ if (protocol && platform.protocols.indexOf(protocol) === -1) {
26383
+ reject(
26384
+ new AxiosError$2(
26385
+ 'Unsupported protocol ' + protocol + ':',
26386
+ AxiosError$2.ERR_BAD_REQUEST,
26387
+ config
26388
+ )
26389
+ );
26390
+ return;
26391
+ }
26193
26392
 
26194
- // Send the request
26195
- request.send(requestData || null);
26196
- });
26197
- };
26393
+ // Send the request
26394
+ request.send(requestData || null);
26395
+ });
26396
+ };
26198
26397
 
26199
26398
  const composeSignals = (signals, timeout) => {
26200
- const {length} = (signals = signals ? signals.filter(Boolean) : []);
26399
+ const { length } = (signals = signals ? signals.filter(Boolean) : []);
26201
26400
 
26202
26401
  if (timeout || length) {
26203
26402
  let controller = new AbortController();
@@ -26209,21 +26408,29 @@
26209
26408
  aborted = true;
26210
26409
  unsubscribe();
26211
26410
  const err = reason instanceof Error ? reason : this.reason;
26212
- controller.abort(err instanceof AxiosError$2 ? err : new CanceledError$2(err instanceof Error ? err.message : err));
26411
+ controller.abort(
26412
+ err instanceof AxiosError$2
26413
+ ? err
26414
+ : new CanceledError$2(err instanceof Error ? err.message : err)
26415
+ );
26213
26416
  }
26214
26417
  };
26215
26418
 
26216
- let timer = timeout && setTimeout(() => {
26217
- timer = null;
26218
- onabort(new AxiosError$2(`timeout of ${timeout}ms exceeded`, AxiosError$2.ETIMEDOUT));
26219
- }, timeout);
26419
+ let timer =
26420
+ timeout &&
26421
+ setTimeout(() => {
26422
+ timer = null;
26423
+ onabort(new AxiosError$2(`timeout of ${timeout}ms exceeded`, AxiosError$2.ETIMEDOUT));
26424
+ }, timeout);
26220
26425
 
26221
26426
  const unsubscribe = () => {
26222
26427
  if (signals) {
26223
26428
  timer && clearTimeout(timer);
26224
26429
  timer = null;
26225
- signals.forEach(signal => {
26226
- signal.unsubscribe ? signal.unsubscribe(onabort) : signal.removeEventListener('abort', onabort);
26430
+ signals.forEach((signal) => {
26431
+ signal.unsubscribe
26432
+ ? signal.unsubscribe(onabort)
26433
+ : signal.removeEventListener('abort', onabort);
26227
26434
  });
26228
26435
  signals = null;
26229
26436
  }
@@ -26231,7 +26438,7 @@
26231
26438
 
26232
26439
  signals.forEach((signal) => signal.addEventListener('abort', onabort));
26233
26440
 
26234
- const {signal} = controller;
26441
+ const { signal } = controller;
26235
26442
 
26236
26443
  signal.unsubscribe = () => utils$1.asap(unsubscribe);
26237
26444
 
@@ -26274,7 +26481,7 @@
26274
26481
  const reader = stream.getReader();
26275
26482
  try {
26276
26483
  for (;;) {
26277
- const {done, value} = await reader.read();
26484
+ const { done, value } = await reader.read();
26278
26485
  if (done) {
26279
26486
  break;
26280
26487
  }
@@ -26297,64 +26504,69 @@
26297
26504
  }
26298
26505
  };
26299
26506
 
26300
- return new ReadableStream({
26301
- async pull(controller) {
26302
- try {
26303
- const {done, value} = await iterator.next();
26507
+ return new ReadableStream(
26508
+ {
26509
+ async pull(controller) {
26510
+ try {
26511
+ const { done, value } = await iterator.next();
26304
26512
 
26305
- if (done) {
26306
- _onFinish();
26307
- controller.close();
26308
- return;
26309
- }
26513
+ if (done) {
26514
+ _onFinish();
26515
+ controller.close();
26516
+ return;
26517
+ }
26310
26518
 
26311
- let len = value.byteLength;
26312
- if (onProgress) {
26313
- let loadedBytes = bytes += len;
26314
- onProgress(loadedBytes);
26519
+ let len = value.byteLength;
26520
+ if (onProgress) {
26521
+ let loadedBytes = (bytes += len);
26522
+ onProgress(loadedBytes);
26523
+ }
26524
+ controller.enqueue(new Uint8Array(value));
26525
+ } catch (err) {
26526
+ _onFinish(err);
26527
+ throw err;
26315
26528
  }
26316
- controller.enqueue(new Uint8Array(value));
26317
- } catch (err) {
26318
- _onFinish(err);
26319
- throw err;
26320
- }
26529
+ },
26530
+ cancel(reason) {
26531
+ _onFinish(reason);
26532
+ return iterator.return();
26533
+ },
26321
26534
  },
26322
- cancel(reason) {
26323
- _onFinish(reason);
26324
- return iterator.return();
26535
+ {
26536
+ highWaterMark: 2,
26325
26537
  }
26326
- }, {
26327
- highWaterMark: 2
26328
- })
26538
+ );
26329
26539
  };
26330
26540
 
26331
26541
  const DEFAULT_CHUNK_SIZE = 64 * 1024;
26332
26542
 
26333
- const {isFunction} = utils$1;
26543
+ const { isFunction } = utils$1;
26334
26544
 
26335
- const globalFetchAPI = (({Request, Response}) => ({
26336
- Request, Response
26545
+ const globalFetchAPI = (({ Request, Response }) => ({
26546
+ Request,
26547
+ Response,
26337
26548
  }))(utils$1.global);
26338
26549
 
26339
- const {
26340
- ReadableStream: ReadableStream$1, TextEncoder
26341
- } = utils$1.global;
26342
-
26550
+ const { ReadableStream: ReadableStream$1, TextEncoder } = utils$1.global;
26343
26551
 
26344
26552
  const test = (fn, ...args) => {
26345
26553
  try {
26346
26554
  return !!fn(...args);
26347
26555
  } catch (e) {
26348
- return false
26556
+ return false;
26349
26557
  }
26350
26558
  };
26351
26559
 
26352
26560
  const factory = (env) => {
26353
- env = utils$1.merge.call({
26354
- skipUndefined: true
26355
- }, globalFetchAPI, env);
26561
+ env = utils$1.merge.call(
26562
+ {
26563
+ skipUndefined: true,
26564
+ },
26565
+ globalFetchAPI,
26566
+ env
26567
+ );
26356
26568
 
26357
- const {fetch: envFetch, Request, Response} = env;
26569
+ const { fetch: envFetch, Request, Response } = env;
26358
26570
  const isFetchSupported = envFetch ? isFunction(envFetch) : typeof fetch === 'function';
26359
26571
  const isRequestSupported = isFunction(Request);
26360
26572
  const isResponseSupported = isFunction(Response);
@@ -26365,46 +26577,61 @@
26365
26577
 
26366
26578
  const isReadableStreamSupported = isFetchSupported && isFunction(ReadableStream$1);
26367
26579
 
26368
- const encodeText = isFetchSupported && (typeof TextEncoder === 'function' ?
26369
- ((encoder) => (str) => encoder.encode(str))(new TextEncoder()) :
26370
- async (str) => new Uint8Array(await new Request(str).arrayBuffer())
26371
- );
26372
-
26373
- const supportsRequestStream = isRequestSupported && isReadableStreamSupported && test(() => {
26374
- let duplexAccessed = false;
26375
-
26376
- const hasContentType = new Request(platform.origin, {
26377
- body: new ReadableStream$1(),
26378
- method: 'POST',
26379
- get duplex() {
26380
- duplexAccessed = true;
26381
- return 'half';
26382
- },
26383
- }).headers.has('Content-Type');
26580
+ const encodeText =
26581
+ isFetchSupported &&
26582
+ (typeof TextEncoder === 'function'
26583
+ ? (
26584
+ (encoder) => (str) =>
26585
+ encoder.encode(str)
26586
+ )(new TextEncoder())
26587
+ : async (str) => new Uint8Array(await new Request(str).arrayBuffer()));
26588
+
26589
+ const supportsRequestStream =
26590
+ isRequestSupported &&
26591
+ isReadableStreamSupported &&
26592
+ test(() => {
26593
+ let duplexAccessed = false;
26594
+
26595
+ const hasContentType = new Request(platform.origin, {
26596
+ body: new ReadableStream$1(),
26597
+ method: 'POST',
26598
+ get duplex() {
26599
+ duplexAccessed = true;
26600
+ return 'half';
26601
+ },
26602
+ }).headers.has('Content-Type');
26384
26603
 
26385
- return duplexAccessed && !hasContentType;
26386
- });
26604
+ return duplexAccessed && !hasContentType;
26605
+ });
26387
26606
 
26388
- const supportsResponseStream = isResponseSupported && isReadableStreamSupported &&
26607
+ const supportsResponseStream =
26608
+ isResponseSupported &&
26609
+ isReadableStreamSupported &&
26389
26610
  test(() => utils$1.isReadableStream(new Response('').body));
26390
26611
 
26391
26612
  const resolvers = {
26392
- stream: supportsResponseStream && ((res) => res.body)
26613
+ stream: supportsResponseStream && ((res) => res.body),
26393
26614
  };
26394
26615
 
26395
- isFetchSupported && ((() => {
26396
- ['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach(type => {
26397
- !resolvers[type] && (resolvers[type] = (res, config) => {
26398
- let method = res && res[type];
26616
+ isFetchSupported &&
26617
+ (() => {
26618
+ ['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach((type) => {
26619
+ !resolvers[type] &&
26620
+ (resolvers[type] = (res, config) => {
26621
+ let method = res && res[type];
26399
26622
 
26400
- if (method) {
26401
- return method.call(res);
26402
- }
26623
+ if (method) {
26624
+ return method.call(res);
26625
+ }
26403
26626
 
26404
- throw new AxiosError$2(`Response type '${type}' is not supported`, AxiosError$2.ERR_NOT_SUPPORT, config);
26627
+ throw new AxiosError$2(
26628
+ `Response type '${type}' is not supported`,
26629
+ AxiosError$2.ERR_NOT_SUPPORT,
26630
+ config
26631
+ );
26632
+ });
26405
26633
  });
26406
- });
26407
- })());
26634
+ })();
26408
26635
 
26409
26636
  const getBodyLength = async (body) => {
26410
26637
  if (body == null) {
@@ -26455,32 +26682,41 @@
26455
26682
  responseType,
26456
26683
  headers,
26457
26684
  withCredentials = 'same-origin',
26458
- fetchOptions
26685
+ fetchOptions,
26459
26686
  } = resolveConfig(config);
26460
26687
 
26461
26688
  let _fetch = envFetch || fetch;
26462
26689
 
26463
26690
  responseType = responseType ? (responseType + '').toLowerCase() : 'text';
26464
26691
 
26465
- let composedSignal = composeSignals$1([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
26692
+ let composedSignal = composeSignals$1(
26693
+ [signal, cancelToken && cancelToken.toAbortSignal()],
26694
+ timeout
26695
+ );
26466
26696
 
26467
26697
  let request = null;
26468
26698
 
26469
- const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {
26470
- composedSignal.unsubscribe();
26471
- });
26699
+ const unsubscribe =
26700
+ composedSignal &&
26701
+ composedSignal.unsubscribe &&
26702
+ (() => {
26703
+ composedSignal.unsubscribe();
26704
+ });
26472
26705
 
26473
26706
  let requestContentLength;
26474
26707
 
26475
26708
  try {
26476
26709
  if (
26477
- onUploadProgress && supportsRequestStream && method !== 'get' && method !== 'head' &&
26710
+ onUploadProgress &&
26711
+ supportsRequestStream &&
26712
+ method !== 'get' &&
26713
+ method !== 'head' &&
26478
26714
  (requestContentLength = await resolveBodyLength(headers, data)) !== 0
26479
26715
  ) {
26480
26716
  let _request = new Request(url, {
26481
26717
  method: 'POST',
26482
26718
  body: data,
26483
- duplex: "half"
26719
+ duplex: 'half',
26484
26720
  });
26485
26721
 
26486
26722
  let contentTypeHeader;
@@ -26505,7 +26741,7 @@
26505
26741
 
26506
26742
  // Cloudflare Workers throws when credentials are defined
26507
26743
  // see https://github.com/cloudflare/workerd/issues/902
26508
- const isCredentialsSupported = isRequestSupported && "credentials" in Request.prototype;
26744
+ const isCredentialsSupported = isRequestSupported && 'credentials' in Request.prototype;
26509
26745
 
26510
26746
  const resolvedOptions = {
26511
26747
  ...fetchOptions,
@@ -26513,29 +26749,35 @@
26513
26749
  method: method.toUpperCase(),
26514
26750
  headers: headers.normalize().toJSON(),
26515
26751
  body: data,
26516
- duplex: "half",
26517
- credentials: isCredentialsSupported ? withCredentials : undefined
26752
+ duplex: 'half',
26753
+ credentials: isCredentialsSupported ? withCredentials : undefined,
26518
26754
  };
26519
26755
 
26520
26756
  request = isRequestSupported && new Request(url, resolvedOptions);
26521
26757
 
26522
- let response = await (isRequestSupported ? _fetch(request, fetchOptions) : _fetch(url, resolvedOptions));
26758
+ let response = await (isRequestSupported
26759
+ ? _fetch(request, fetchOptions)
26760
+ : _fetch(url, resolvedOptions));
26523
26761
 
26524
- const isStreamResponse = supportsResponseStream && (responseType === 'stream' || responseType === 'response');
26762
+ const isStreamResponse =
26763
+ supportsResponseStream && (responseType === 'stream' || responseType === 'response');
26525
26764
 
26526
26765
  if (supportsResponseStream && (onDownloadProgress || (isStreamResponse && unsubscribe))) {
26527
26766
  const options = {};
26528
26767
 
26529
- ['status', 'statusText', 'headers'].forEach(prop => {
26768
+ ['status', 'statusText', 'headers'].forEach((prop) => {
26530
26769
  options[prop] = response[prop];
26531
26770
  });
26532
26771
 
26533
26772
  const responseContentLength = utils$1.toFiniteNumber(response.headers.get('content-length'));
26534
26773
 
26535
- const [onProgress, flush] = onDownloadProgress && progressEventDecorator(
26536
- responseContentLength,
26537
- progressEventReducer(asyncDecorator(onDownloadProgress), true)
26538
- ) || [];
26774
+ const [onProgress, flush] =
26775
+ (onDownloadProgress &&
26776
+ progressEventDecorator(
26777
+ responseContentLength,
26778
+ progressEventReducer(asyncDecorator(onDownloadProgress), true)
26779
+ )) ||
26780
+ [];
26539
26781
 
26540
26782
  response = new Response(
26541
26783
  trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
@@ -26548,7 +26790,10 @@
26548
26790
 
26549
26791
  responseType = responseType || 'text';
26550
26792
 
26551
- let responseData = await resolvers[utils$1.findKey(resolvers, responseType) || 'text'](response, config);
26793
+ let responseData = await resolvers[utils$1.findKey(resolvers, responseType) || 'text'](
26794
+ response,
26795
+ config
26796
+ );
26552
26797
 
26553
26798
  !isStreamResponse && unsubscribe && unsubscribe();
26554
26799
 
@@ -26559,43 +26804,50 @@
26559
26804
  status: response.status,
26560
26805
  statusText: response.statusText,
26561
26806
  config,
26562
- request
26807
+ request,
26563
26808
  });
26564
- })
26809
+ });
26565
26810
  } catch (err) {
26566
26811
  unsubscribe && unsubscribe();
26567
26812
 
26568
26813
  if (err && err.name === 'TypeError' && /Load failed|fetch/i.test(err.message)) {
26569
26814
  throw Object.assign(
26570
- new AxiosError$2('Network Error', AxiosError$2.ERR_NETWORK, config, request, err && err.response),
26815
+ new AxiosError$2(
26816
+ 'Network Error',
26817
+ AxiosError$2.ERR_NETWORK,
26818
+ config,
26819
+ request,
26820
+ err && err.response
26821
+ ),
26571
26822
  {
26572
- cause: err.cause || err
26823
+ cause: err.cause || err,
26573
26824
  }
26574
- )
26825
+ );
26575
26826
  }
26576
26827
 
26577
26828
  throw AxiosError$2.from(err, err && err.code, config, request, err && err.response);
26578
26829
  }
26579
- }
26830
+ };
26580
26831
  };
26581
26832
 
26582
26833
  const seedCache = new Map();
26583
26834
 
26584
26835
  const getFetch = (config) => {
26585
26836
  let env = (config && config.env) || {};
26586
- const {fetch, Request, Response} = env;
26587
- const seeds = [
26588
- Request, Response, fetch
26589
- ];
26837
+ const { fetch, Request, Response } = env;
26838
+ const seeds = [Request, Response, fetch];
26590
26839
 
26591
- let len = seeds.length, i = len,
26592
- seed, target, map = seedCache;
26840
+ let len = seeds.length,
26841
+ i = len,
26842
+ seed,
26843
+ target,
26844
+ map = seedCache;
26593
26845
 
26594
26846
  while (i--) {
26595
26847
  seed = seeds[i];
26596
26848
  target = map.get(seed);
26597
26849
 
26598
- target === undefined && map.set(seed, target = (i ? new Map() : factory(env)));
26850
+ target === undefined && map.set(seed, (target = i ? new Map() : factory(env)));
26599
26851
 
26600
26852
  map = target;
26601
26853
  }
@@ -26611,7 +26863,7 @@
26611
26863
  * - `http` for Node.js
26612
26864
  * - `xhr` for browsers
26613
26865
  * - `fetch` for fetch API-based requests
26614
- *
26866
+ *
26615
26867
  * @type {Object<string, Function|Object>}
26616
26868
  */
26617
26869
  const knownAdapters = {
@@ -26619,7 +26871,7 @@
26619
26871
  xhr: xhrAdapter,
26620
26872
  fetch: {
26621
26873
  get: getFetch,
26622
- }
26874
+ },
26623
26875
  };
26624
26876
 
26625
26877
  // Assign adapter names for easier debugging and identification
@@ -26636,7 +26888,7 @@
26636
26888
 
26637
26889
  /**
26638
26890
  * Render a rejection reason string for unknown or unsupported adapters
26639
- *
26891
+ *
26640
26892
  * @param {string} reason
26641
26893
  * @returns {string}
26642
26894
  */
@@ -26644,17 +26896,18 @@
26644
26896
 
26645
26897
  /**
26646
26898
  * Check if the adapter is resolved (function, null, or false)
26647
- *
26899
+ *
26648
26900
  * @param {Function|null|false} adapter
26649
26901
  * @returns {boolean}
26650
26902
  */
26651
- const isResolvedHandle = (adapter) => utils$1.isFunction(adapter) || adapter === null || adapter === false;
26903
+ const isResolvedHandle = (adapter) =>
26904
+ utils$1.isFunction(adapter) || adapter === null || adapter === false;
26652
26905
 
26653
26906
  /**
26654
26907
  * Get the first suitable adapter from the provided list.
26655
26908
  * Tries each adapter in order until a supported one is found.
26656
26909
  * Throws an AxiosError if no adapter is suitable.
26657
- *
26910
+ *
26658
26911
  * @param {Array<string|Function>|string|Function} adapters - Adapter(s) by name or function.
26659
26912
  * @param {Object} config - Axios request configuration
26660
26913
  * @throws {AxiosError} If no suitable adapter is available
@@ -26691,14 +26944,17 @@
26691
26944
  }
26692
26945
 
26693
26946
  if (!adapter) {
26694
- const reasons = Object.entries(rejectedReasons)
26695
- .map(([id, state]) => `adapter ${id} ` +
26947
+ const reasons = Object.entries(rejectedReasons).map(
26948
+ ([id, state]) =>
26949
+ `adapter ${id} ` +
26696
26950
  (state === false ? 'is not supported by the environment' : 'is not available in the build')
26697
- );
26951
+ );
26698
26952
 
26699
- let s = length ?
26700
- (reasons.length > 1 ? 'since :\n' + reasons.map(renderReason).join('\n') : ' ' + renderReason(reasons[0])) :
26701
- 'as no adapter specified';
26953
+ let s = length
26954
+ ? reasons.length > 1
26955
+ ? 'since :\n' + reasons.map(renderReason).join('\n')
26956
+ : ' ' + renderReason(reasons[0])
26957
+ : 'as no adapter specified';
26702
26958
 
26703
26959
  throw new AxiosError$2(
26704
26960
  `There is no suitable adapter to dispatch the request ` + s,
@@ -26723,7 +26979,7 @@
26723
26979
  * Exposes all known adapters
26724
26980
  * @type {Object<string, Function|Object>}
26725
26981
  */
26726
- adapters: knownAdapters
26982
+ adapters: knownAdapters,
26727
26983
  };
26728
26984
 
26729
26985
  /**
@@ -26756,10 +27012,7 @@
26756
27012
  config.headers = AxiosHeaders$2.from(config.headers);
26757
27013
 
26758
27014
  // Transform request data
26759
- config.data = transformData.call(
26760
- config,
26761
- config.transformRequest
26762
- );
27015
+ config.data = transformData.call(config, config.transformRequest);
26763
27016
 
26764
27017
  if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {
26765
27018
  config.headers.setContentType('application/x-www-form-urlencoded', false);
@@ -26767,39 +27020,38 @@
26767
27020
 
26768
27021
  const adapter = adapters.getAdapter(config.adapter || defaults$1.adapter, config);
26769
27022
 
26770
- return adapter(config).then(function onAdapterResolution(response) {
26771
- throwIfCancellationRequested(config);
26772
-
26773
- // Transform response data
26774
- response.data = transformData.call(
26775
- config,
26776
- config.transformResponse,
26777
- response
26778
- );
26779
-
26780
- response.headers = AxiosHeaders$2.from(response.headers);
26781
-
26782
- return response;
26783
- }, function onAdapterRejection(reason) {
26784
- if (!isCancel$1(reason)) {
27023
+ return adapter(config).then(
27024
+ function onAdapterResolution(response) {
26785
27025
  throwIfCancellationRequested(config);
26786
27026
 
26787
27027
  // Transform response data
26788
- if (reason && reason.response) {
26789
- reason.response.data = transformData.call(
26790
- config,
26791
- config.transformResponse,
26792
- reason.response
26793
- );
26794
- reason.response.headers = AxiosHeaders$2.from(reason.response.headers);
27028
+ response.data = transformData.call(config, config.transformResponse, response);
27029
+
27030
+ response.headers = AxiosHeaders$2.from(response.headers);
27031
+
27032
+ return response;
27033
+ },
27034
+ function onAdapterRejection(reason) {
27035
+ if (!isCancel$1(reason)) {
27036
+ throwIfCancellationRequested(config);
27037
+
27038
+ // Transform response data
27039
+ if (reason && reason.response) {
27040
+ reason.response.data = transformData.call(
27041
+ config,
27042
+ config.transformResponse,
27043
+ reason.response
27044
+ );
27045
+ reason.response.headers = AxiosHeaders$2.from(reason.response.headers);
27046
+ }
26795
27047
  }
26796
- }
26797
27048
 
26798
- return Promise.reject(reason);
26799
- });
27049
+ return Promise.reject(reason);
27050
+ }
27051
+ );
26800
27052
  }
26801
27053
 
26802
- const VERSION$1 = "1.13.5";
27054
+ const VERSION$1 = "1.13.6";
26803
27055
 
26804
27056
  const validators$1 = {};
26805
27057
 
@@ -26823,7 +27075,15 @@
26823
27075
  */
26824
27076
  validators$1.transitional = function transitional(validator, version, message) {
26825
27077
  function formatMessage(opt, desc) {
26826
- return '[Axios v' + VERSION$1 + '] Transitional option \'' + opt + '\'' + desc + (message ? '. ' + message : '');
27078
+ return (
27079
+ '[Axios v' +
27080
+ VERSION$1 +
27081
+ "] Transitional option '" +
27082
+ opt +
27083
+ "'" +
27084
+ desc +
27085
+ (message ? '. ' + message : '')
27086
+ );
26827
27087
  }
26828
27088
 
26829
27089
  // eslint-disable-next-line func-names
@@ -26855,7 +27115,7 @@
26855
27115
  // eslint-disable-next-line no-console
26856
27116
  console.warn(`${opt} is likely a misspelling of ${correctSpelling}`);
26857
27117
  return true;
26858
- }
27118
+ };
26859
27119
  };
26860
27120
 
26861
27121
  /**
@@ -26881,7 +27141,10 @@
26881
27141
  const value = options[opt];
26882
27142
  const result = value === undefined || validator(value, opt, options);
26883
27143
  if (result !== true) {
26884
- throw new AxiosError$2('option ' + opt + ' must be ' + result, AxiosError$2.ERR_BAD_OPTION_VALUE);
27144
+ throw new AxiosError$2(
27145
+ 'option ' + opt + ' must be ' + result,
27146
+ AxiosError$2.ERR_BAD_OPTION_VALUE
27147
+ );
26885
27148
  }
26886
27149
  continue;
26887
27150
  }
@@ -26893,7 +27156,7 @@
26893
27156
 
26894
27157
  const validator = {
26895
27158
  assertOptions,
26896
- validators: validators$1
27159
+ validators: validators$1,
26897
27160
  };
26898
27161
 
26899
27162
  const validators = validator.validators;
@@ -26910,7 +27173,7 @@
26910
27173
  this.defaults = instanceConfig || {};
26911
27174
  this.interceptors = {
26912
27175
  request: new InterceptorManager$1(),
26913
- response: new InterceptorManager$1()
27176
+ response: new InterceptorManager$1(),
26914
27177
  };
26915
27178
  }
26916
27179
 
@@ -26961,27 +27224,35 @@
26961
27224
 
26962
27225
  config = mergeConfig$1(this.defaults, config);
26963
27226
 
26964
- const {transitional, paramsSerializer, headers} = config;
27227
+ const { transitional, paramsSerializer, headers } = config;
26965
27228
 
26966
27229
  if (transitional !== undefined) {
26967
- validator.assertOptions(transitional, {
26968
- silentJSONParsing: validators.transitional(validators.boolean),
26969
- forcedJSONParsing: validators.transitional(validators.boolean),
26970
- clarifyTimeoutError: validators.transitional(validators.boolean),
26971
- legacyInterceptorReqResOrdering: validators.transitional(validators.boolean)
26972
- }, false);
27230
+ validator.assertOptions(
27231
+ transitional,
27232
+ {
27233
+ silentJSONParsing: validators.transitional(validators.boolean),
27234
+ forcedJSONParsing: validators.transitional(validators.boolean),
27235
+ clarifyTimeoutError: validators.transitional(validators.boolean),
27236
+ legacyInterceptorReqResOrdering: validators.transitional(validators.boolean),
27237
+ },
27238
+ false
27239
+ );
26973
27240
  }
26974
27241
 
26975
27242
  if (paramsSerializer != null) {
26976
27243
  if (utils$1.isFunction(paramsSerializer)) {
26977
27244
  config.paramsSerializer = {
26978
- serialize: paramsSerializer
27245
+ serialize: paramsSerializer,
26979
27246
  };
26980
27247
  } else {
26981
- validator.assertOptions(paramsSerializer, {
26982
- encode: validators.function,
26983
- serialize: validators.function
26984
- }, true);
27248
+ validator.assertOptions(
27249
+ paramsSerializer,
27250
+ {
27251
+ encode: validators.function,
27252
+ serialize: validators.function,
27253
+ },
27254
+ true
27255
+ );
26985
27256
  }
26986
27257
  }
26987
27258
 
@@ -26992,26 +27263,25 @@
26992
27263
  config.allowAbsoluteUrls = true;
26993
27264
  }
26994
27265
 
26995
- validator.assertOptions(config, {
26996
- baseUrl: validators.spelling('baseURL'),
26997
- withXsrfToken: validators.spelling('withXSRFToken')
26998
- }, true);
27266
+ validator.assertOptions(
27267
+ config,
27268
+ {
27269
+ baseUrl: validators.spelling('baseURL'),
27270
+ withXsrfToken: validators.spelling('withXSRFToken'),
27271
+ },
27272
+ true
27273
+ );
26999
27274
 
27000
27275
  // Set config.method
27001
27276
  config.method = (config.method || this.defaults.method || 'get').toLowerCase();
27002
27277
 
27003
27278
  // Flatten headers
27004
- let contextHeaders = headers && utils$1.merge(
27005
- headers.common,
27006
- headers[config.method]
27007
- );
27279
+ let contextHeaders = headers && utils$1.merge(headers.common, headers[config.method]);
27008
27280
 
27009
- headers && utils$1.forEach(
27010
- ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],
27011
- (method) => {
27281
+ headers &&
27282
+ utils$1.forEach(['delete', 'get', 'head', 'post', 'put', 'patch', 'common'], (method) => {
27012
27283
  delete headers[method];
27013
- }
27014
- );
27284
+ });
27015
27285
 
27016
27286
  config.headers = AxiosHeaders$2.concat(contextHeaders, headers);
27017
27287
 
@@ -27026,7 +27296,8 @@
27026
27296
  synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
27027
27297
 
27028
27298
  const transitional = config.transitional || transitionalDefaults;
27029
- const legacyInterceptorReqResOrdering = transitional && transitional.legacyInterceptorReqResOrdering;
27299
+ const legacyInterceptorReqResOrdering =
27300
+ transitional && transitional.legacyInterceptorReqResOrdering;
27030
27301
 
27031
27302
  if (legacyInterceptorReqResOrdering) {
27032
27303
  requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
@@ -27100,12 +27371,14 @@
27100
27371
  // Provide aliases for supported request methods
27101
27372
  utils$1.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
27102
27373
  /*eslint func-names:0*/
27103
- Axios$1.prototype[method] = function(url, config) {
27104
- return this.request(mergeConfig$1(config || {}, {
27105
- method,
27106
- url,
27107
- data: (config || {}).data
27108
- }));
27374
+ Axios$1.prototype[method] = function (url, config) {
27375
+ return this.request(
27376
+ mergeConfig$1(config || {}, {
27377
+ method,
27378
+ url,
27379
+ data: (config || {}).data,
27380
+ })
27381
+ );
27109
27382
  };
27110
27383
  });
27111
27384
 
@@ -27114,14 +27387,18 @@
27114
27387
 
27115
27388
  function generateHTTPMethod(isForm) {
27116
27389
  return function httpMethod(url, data, config) {
27117
- return this.request(mergeConfig$1(config || {}, {
27118
- method,
27119
- headers: isForm ? {
27120
- 'Content-Type': 'multipart/form-data'
27121
- } : {},
27122
- url,
27123
- data
27124
- }));
27390
+ return this.request(
27391
+ mergeConfig$1(config || {}, {
27392
+ method,
27393
+ headers: isForm
27394
+ ? {
27395
+ 'Content-Type': 'multipart/form-data',
27396
+ }
27397
+ : {},
27398
+ url,
27399
+ data,
27400
+ })
27401
+ );
27125
27402
  };
27126
27403
  }
27127
27404
 
@@ -27154,7 +27431,7 @@
27154
27431
  const token = this;
27155
27432
 
27156
27433
  // eslint-disable-next-line func-names
27157
- this.promise.then(cancel => {
27434
+ this.promise.then((cancel) => {
27158
27435
  if (!token._listeners) return;
27159
27436
 
27160
27437
  let i = token._listeners.length;
@@ -27166,10 +27443,10 @@
27166
27443
  });
27167
27444
 
27168
27445
  // eslint-disable-next-line func-names
27169
- this.promise.then = onfulfilled => {
27446
+ this.promise.then = (onfulfilled) => {
27170
27447
  let _resolve;
27171
27448
  // eslint-disable-next-line func-names
27172
- const promise = new Promise(resolve => {
27449
+ const promise = new Promise((resolve) => {
27173
27450
  token.subscribe(resolve);
27174
27451
  _resolve = resolve;
27175
27452
  }).then(onfulfilled);
@@ -27257,7 +27534,7 @@
27257
27534
  });
27258
27535
  return {
27259
27536
  token,
27260
- cancel
27537
+ cancel,
27261
27538
  };
27262
27539
  }
27263
27540
  }
@@ -27299,7 +27576,7 @@
27299
27576
  * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false
27300
27577
  */
27301
27578
  function isAxiosError$1(payload) {
27302
- return utils$1.isObject(payload) && (payload.isAxiosError === true);
27579
+ return utils$1.isObject(payload) && payload.isAxiosError === true;
27303
27580
  }
27304
27581
 
27305
27582
  const HttpStatusCode$1 = {
@@ -27392,10 +27669,10 @@
27392
27669
  const instance = bind(Axios$2.prototype.request, context);
27393
27670
 
27394
27671
  // Copy axios.prototype to instance
27395
- utils$1.extend(instance, Axios$2.prototype, context, {allOwnKeys: true});
27672
+ utils$1.extend(instance, Axios$2.prototype, context, { allOwnKeys: true });
27396
27673
 
27397
27674
  // Copy context to instance
27398
- utils$1.extend(instance, context, null, {allOwnKeys: true});
27675
+ utils$1.extend(instance, context, null, { allOwnKeys: true });
27399
27676
 
27400
27677
  // Factory for creating new instances
27401
27678
  instance.create = function create(instanceConfig) {
@@ -27439,7 +27716,7 @@
27439
27716
 
27440
27717
  axios$1.AxiosHeaders = AxiosHeaders$2;
27441
27718
 
27442
- axios$1.formToJSON = thing => formDataToJSON(utils$1.isHTMLForm(thing) ? new FormData(thing) : thing);
27719
+ axios$1.formToJSON = (thing) => formDataToJSON(utils$1.isHTMLForm(thing) ? new FormData(thing) : thing);
27443
27720
 
27444
27721
  axios$1.getAdapter = adapters.getAdapter;
27445
27722
 
@@ -27469,7 +27746,7 @@
27469
27746
  HttpStatusCode,
27470
27747
  formToJSON,
27471
27748
  getAdapter,
27472
- mergeConfig
27749
+ mergeConfig,
27473
27750
  } = axios$1$1;
27474
27751
 
27475
27752
  // lib/v4/isZodErrorLike.ts
@@ -28054,6 +28331,7 @@
28054
28331
  const WorkspacePermissionsSchema = object({
28055
28332
  workspaceId: string$1().optional(),
28056
28333
  isWorkspaceManager: boolean$1(),
28334
+ isReadOnly: boolean$1().default(false),
28057
28335
  scopes: array(string$1()),
28058
28336
  });
28059
28337
  const TenantPermissionsSchema = object({
@@ -28089,12 +28367,25 @@
28089
28367
  name: string$1().optional(),
28090
28368
  meta: record(string$1(), any()).optional(),
28091
28369
  authOptionKey: string$1().optional(),
28370
+ integrationId: string$1().optional(),
28371
+ integrationUuid: string$1().optional(),
28372
+ integrationKey: string$1().optional(),
28373
+ connectorId: string$1().optional(),
28374
+ connectorUuid: string$1().optional(),
28375
+ connectorKey: string$1().optional(),
28376
+ connectorVersion: string$1().optional(),
28092
28377
  externalAppId: string$1().optional(),
28093
28378
  externalAppUuid: string$1().optional(),
28094
28379
  credentials: unknown().optional(),
28095
28380
  connectorParameters: unknown().optional(),
28096
28381
  input: unknown().optional(),
28097
28382
  });
28383
+ const ConnectionClientAction = object({
28384
+ type: _enum(['connect', 'provide-input']),
28385
+ description: string$1(),
28386
+ uiUrl: string$1().optional(),
28387
+ agentInstructions: string$1().optional(),
28388
+ });
28098
28389
  const BaseConnection = BaseWorkspaceElement.extend({
28099
28390
  ...TenantLayerElement.shape,
28100
28391
  name: string$1(),
@@ -28119,6 +28410,10 @@
28119
28410
  archivedAt: string$1().optional(),
28120
28411
  isDeactivated: boolean$1().optional(),
28121
28412
  meta: record(string$1(), any()).optional(),
28413
+ buildingAgentSessionId: string$1()
28414
+ .optional()
28415
+ .describe('Session ID for building the element via intent-based endpoints (create/update with intent). Present when state is BUILDING.'),
28416
+ clientAction: ConnectionClientAction.optional().describe('Action the client must perform to advance this connection. Present if and only if state is CLIENT_ACTION_REQUIRED.'),
28122
28417
  });
28123
28418
 
28124
28419
  const BaseCustomer = object({
@@ -29132,12 +29427,14 @@
29132
29427
  }),
29133
29428
  integrationId: string$1()
29134
29429
  .optional()
29430
+ .describe('Filter by integration ID')
29135
29431
  .meta({
29136
29432
  filterTitle: 'Integration',
29137
29433
  referenceElementType: WorkspaceElementType.Integration,
29138
29434
  }),
29139
29435
  connectorId: string$1()
29140
29436
  .optional()
29437
+ .describe('Filter by connector ID')
29141
29438
  .meta({
29142
29439
  filterTitle: 'Connector',
29143
29440
  }),
@@ -29172,19 +29469,23 @@
29172
29469
  .optional()
29173
29470
  .meta({ hidden: true }),
29174
29471
  });
29175
- ConnectionEditableProperties.extend({
29176
- integrationId: string$1().optional(),
29177
- integrationUuid: string$1().optional(),
29178
- integrationKey: string$1().optional(),
29179
- connectorId: string$1().optional(),
29180
- connectorUuid: string$1().optional(),
29181
- connectorKey: string$1().optional(),
29182
- connectorVersion: string$1().optional(),
29472
+ object({
29473
+ intent: string$1().min(1).max(200),
29474
+ name: string$1()
29475
+ .optional()
29476
+ .describe('Custom name for the connection. Only used when a new connection is created; ignored if an existing one is returned.'),
29183
29477
  });
29478
+ ConnectionEditableProperties.merge(IntentProperties);
29479
+ ConnectionEditableProperties.merge(IntentProperties);
29184
29480
  ConnectionEditableProperties.omit({
29185
29481
  credentials: true,
29186
29482
  connectorParameters: true,
29187
29483
  input: true,
29484
+ integrationId: true,
29485
+ integrationKey: true,
29486
+ connectorId: true,
29487
+ connectorKey: true,
29488
+ connectorVersion: true,
29188
29489
  externalAppId: true,
29189
29490
  });
29190
29491
  object({
@@ -29284,6 +29585,18 @@
29284
29585
  });
29285
29586
  });
29286
29587
  }
29588
+ async connection(options) {
29589
+ const { url, postData } = await this.client.getScreensPostData('connection', {
29590
+ connectionId: options.connectionId,
29591
+ theme: options.theme,
29592
+ });
29593
+ return new Promise((resolve) => {
29594
+ return openIframeWithPost(url, postData, {
29595
+ onClose: () => resolve(null),
29596
+ onSuccess: (connection) => resolve(connection),
29597
+ });
29598
+ });
29599
+ }
29287
29600
  async UNSAFE_agentSession(options) {
29288
29601
  const { url, postData } = await this.client.getScreensPostData('agent-session', {
29289
29602
  sessionId: options.sessionId,