ywana-core8 0.2.10 → 0.2.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.umd.js CHANGED
@@ -6155,7 +6155,7 @@
6155
6155
  }
6156
6156
  return /* @__PURE__ */ React.createElement("div", { className: `uploader ${className}` }, state === UPLOAD_STATES.IDLE ? renderView() : /* @__PURE__ */ React.createElement(UploadProgress, { files }));
6157
6157
  };
6158
- const isFunction$4 = (value) => value && (Object.prototype.toString.call(value) === "[object Function]" || "function" === typeof value || value instanceof Function);
6158
+ const isFunction$5 = (value) => value && (Object.prototype.toString.call(value) === "[object Function]" || "function" === typeof value || value instanceof Function);
6159
6159
  const DataTable = (props) => {
6160
6160
  const { columns = [], rows = [], onRowSelection, onSort, onCheckAll, editable, outlined, expanded = false, className, emptyMessage = "No Results Found", emptyIcon = "search_off", multisort = false, filterable = false, onClearFilters } = props;
6161
6161
  const [sortDir, setSortDir] = React.useState({});
@@ -6248,7 +6248,7 @@
6248
6248
  const infoIcon = isInfoOpen ? "expand_less" : "expand_more";
6249
6249
  let style = isInfoOpen ? "expanded" : "";
6250
6250
  if (selected) style += " selected";
6251
- return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("tr", { className: `${style} ${className}`, onClick: (ev) => onSelect2(row, ev) }, columns.map((column, cindex) => /* @__PURE__ */ React.createElement(DataTableCell$1, { key: `${column.id}_${cindex}`, index, row, column, cell: row[column.id], editable: editable || column.editable })), hasInfoRows ? row.info ? /* @__PURE__ */ React.createElement("td", null, /* @__PURE__ */ React.createElement(Icon, { icon: infoIcon, clickable: true, action: () => toggleInfo(!isInfoOpen) })) : /* @__PURE__ */ React.createElement("td", null) : null), row.info && isInfoOpen ? /* @__PURE__ */ React.createElement("tr", { className: "table-row-info" }, /* @__PURE__ */ React.createElement("td", { colSpan: columns.length + (hasInfoRows ? 1 : 0) }, isFunction$4(row.info) ? row.info() : row.info)) : null);
6251
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("tr", { className: `${style} ${className}`, onClick: (ev) => onSelect2(row, ev) }, columns.map((column, cindex) => /* @__PURE__ */ React.createElement(DataTableCell$1, { key: `${column.id}_${cindex}`, index, row, column, cell: row[column.id], editable: editable || column.editable })), hasInfoRows ? row.info ? /* @__PURE__ */ React.createElement("td", null, /* @__PURE__ */ React.createElement(Icon, { icon: infoIcon, clickable: true, action: () => toggleInfo(!isInfoOpen) })) : /* @__PURE__ */ React.createElement("td", null) : null), row.info && isInfoOpen ? /* @__PURE__ */ React.createElement("tr", { className: "table-row-info" }, /* @__PURE__ */ React.createElement("td", { colSpan: columns.length + (hasInfoRows ? 1 : 0) }, isFunction$5(row.info) ? row.info() : row.info)) : null);
6252
6252
  };
6253
6253
  const DataTableCell$1 = ({ index, row, column, cell, editable }) => {
6254
6254
  const render = (type2) => {
@@ -6984,7 +6984,7 @@
6984
6984
  extension: ".xml"
6985
6985
  }
6986
6986
  };
6987
- const isFunction$3 = (value) => value && (Object.prototype.toString.call(value) === "[object Function]" || "function" === typeof value || value instanceof Function);
6987
+ const isFunction$4 = (value) => value && (Object.prototype.toString.call(value) === "[object Function]" || "function" === typeof value || value instanceof Function);
6988
6988
  const DataTable2 = (props) => {
6989
6989
  const {
6990
6990
  id,
@@ -7834,7 +7834,7 @@
7834
7834
  const rowClasses = [
7835
7835
  "datatable2__row",
7836
7836
  isSelected && "datatable2__row--selected",
7837
- rowClassName && isFunction$3(rowClassName) ? rowClassName(row, index) : rowClassName
7837
+ rowClassName && isFunction$4(rowClassName) ? rowClassName(row, index) : rowClassName
7838
7838
  ].filter(Boolean).join(" ");
7839
7839
  return /* @__PURE__ */ React.createElement(
7840
7840
  "tr",
@@ -7954,7 +7954,7 @@
7954
7954
  "datatable2__cell",
7955
7955
  editable && "datatable2__cell--editable",
7956
7956
  isEditing && "datatable2__cell--editing",
7957
- cellClassName && isFunction$3(cellClassName) ? cellClassName(column, row, value) : cellClassName
7957
+ cellClassName && isFunction$4(cellClassName) ? cellClassName(column, row, value) : cellClassName
7958
7958
  ].filter(Boolean).join(" ");
7959
7959
  const renderCellContent = () => {
7960
7960
  if (isEditing && editable) {
@@ -7986,7 +7986,7 @@
7986
7986
  );
7987
7987
  }
7988
7988
  }
7989
- if (column.render && isFunction$3(column.render)) {
7989
+ if (column.render && isFunction$4(column.render)) {
7990
7990
  return column.render(value, row, column);
7991
7991
  }
7992
7992
  return /* @__PURE__ */ React.createElement(Text, null, value);
@@ -14961,7 +14961,7 @@
14961
14961
  borderRadius: "8px",
14962
14962
  marginBottom: "2rem",
14963
14963
  border: "1px solid #e9ecef"
14964
- } }, /* @__PURE__ */ React.createElement("h3", null, "✅ Mejoras Implementadas:"), /* @__PURE__ */ React.createElement("ul", null, /* @__PURE__ */ React.createElement("li", null, "🛡️ ", /* @__PURE__ */ React.createElement("strong", null, "Validación de props"), " - Advertencias para props incorrectas"), /* @__PURE__ */ React.createElement("li", null, "♿ ", /* @__PURE__ */ React.createElement("strong", null, "Accesibilidad completa"), " - ARIA, soporte de teclado, focus"), /* @__PURE__ */ React.createElement("li", null, "📝 ", /* @__PURE__ */ React.createElement("strong", null, "PropTypes y documentación"), " - Validación y documentación completa"), /* @__PURE__ */ React.createElement("li", null, "🎯 ", /* @__PURE__ */ React.createElement("strong", null, "Estados avanzados"), " - disabled, readOnly, error"), /* @__PURE__ */ React.createElement("li", null, "🎨 ", /* @__PURE__ */ React.createElement("strong", null, "CSS mejorado"), " - Estados visuales consistentes y responsivos"), /* @__PURE__ */ React.createElement("li", null, "⌨️ ", /* @__PURE__ */ React.createElement("strong", null, "Soporte de teclado"), " - Enter y Espacio para alternar"), /* @__PURE__ */ React.createElement("li", null, "🔧 ", /* @__PURE__ */ React.createElement("strong", null, "Manejo de errores"), " - Mensajes de error integrados"), /* @__PURE__ */ React.createElement("li", null, "📏 ", /* @__PURE__ */ React.createElement("strong", null, "Tamaños múltiples"), " - small, normal, large"), /* @__PURE__ */ React.createElement("li", null, "🎨 ", /* @__PURE__ */ React.createElement("strong", null, "Colores personalizables"), " - Integración con sistema de temas"), /* @__PURE__ */ React.createElement("li", null, "🧪 ", /* @__PURE__ */ React.createElement("strong", null, "Pruebas unitarias"), " - 17 pruebas que cubren toda la funcionalidad"))), /* @__PURE__ */ React.createElement("section", { style: { marginBottom: "2rem" } }, /* @__PURE__ */ React.createElement("h3", null, "Switch Básicos (react-switch)"), /* @__PURE__ */ React.createElement("div", { style: {
14964
+ } }, /* @__PURE__ */ React.createElement("h3", null, "✅ Mejoras Implementadas:"), /* @__PURE__ */ React.createElement("ul", null, /* @__PURE__ */ React.createElement("li", null, "🛡️ ", /* @__PURE__ */ React.createElement("strong", null, "Validación de props"), " - Advertencias para props incorrectas"), /* @__PURE__ */ React.createElement("li", null, "♿ ", /* @__PURE__ */ React.createElement("strong", null, "Accesibilidad completa"), " - ARIA, soporte de teclado, focus"), /* @__PURE__ */ React.createElement("li", null, "📝 ", /* @__PURE__ */ React.createElement("strong", null, "PropTypes y documentación"), " - Validación y documentación completa"), /* @__PURE__ */ React.createElement("li", null, "🎯 ", /* @__PURE__ */ React.createElement("strong", null, "Estados avanzados"), " - disabled, readOnly, error"), /* @__PURE__ */ React.createElement("li", null, "🎨 ", /* @__PURE__ */ React.createElement("strong", null, "CSS mejorado"), " - Estados visuales consistentes y responsivos"), /* @__PURE__ */ React.createElement("li", null, "⌨️ ", /* @__PURE__ */ React.createElement("strong", null, "Soporte de teclado"), " - Enter y Espacio para alternar"), /* @__PURE__ */ React.createElement("li", null, "🔧 ", /* @__PURE__ */ React.createElement("strong", null, "Manejo de errores"), " - Mensajes de error integrados"), /* @__PURE__ */ React.createElement("li", null, "📏 ", /* @__PURE__ */ React.createElement("strong", null, "Tamaños múltiples"), " - small, normal, large"), /* @__PURE__ */ React.createElement("li", null, "🎨 ", /* @__PURE__ */ React.createElement("strong", null, "Colores personalizables"), " - Integración con sistema de temas"), /* @__PURE__ */ React.createElement("li", null, "🧪 ", /* @__PURE__ */ React.createElement("strong", null, "Pruebas unitarias"), " - 17 pruebas que cubren toda la funcionalidad"))), /* @__PURE__ */ React.createElement("section", { style: { marginBottom: "2rem" } }, /* @__PURE__ */ React.createElement("h3", null, "Switch Básicos"), /* @__PURE__ */ React.createElement("div", { style: {
14965
14965
  background: "#fff",
14966
14966
  padding: "1.5rem",
14967
14967
  borderRadius: "8px",
@@ -23036,7 +23036,7 @@ const rows = [
23036
23036
  }
23037
23037
  hooks.suppressDeprecationWarnings = false;
23038
23038
  hooks.deprecationHandler = null;
23039
- function isFunction$2(input) {
23039
+ function isFunction$3(input) {
23040
23040
  return typeof Function !== "undefined" && input instanceof Function || Object.prototype.toString.call(input) === "[object Function]";
23041
23041
  }
23042
23042
  function set(config) {
@@ -23044,7 +23044,7 @@ const rows = [
23044
23044
  for (i in config) {
23045
23045
  if (hasOwnProp(config, i)) {
23046
23046
  prop = config[i];
23047
- if (isFunction$2(prop)) {
23047
+ if (isFunction$3(prop)) {
23048
23048
  this[i] = prop;
23049
23049
  } else {
23050
23050
  this["_" + i] = prop;
@@ -23107,7 +23107,7 @@ const rows = [
23107
23107
  };
23108
23108
  function calendar(key, mom, now2) {
23109
23109
  var output = this._calendar[key] || this._calendar["sameElse"];
23110
- return isFunction$2(output) ? output.call(mom, now2) : output;
23110
+ return isFunction$3(output) ? output.call(mom, now2) : output;
23111
23111
  }
23112
23112
  function zeroFill(number, targetLength, forceSign) {
23113
23113
  var absNumber = "" + Math.abs(number), zerosToFill = targetLength - absNumber.length, sign2 = number >= 0;
@@ -23156,7 +23156,7 @@ const rows = [
23156
23156
  return function(mom) {
23157
23157
  var output = "", i2;
23158
23158
  for (i2 = 0; i2 < length; i2++) {
23159
- output += isFunction$2(array[i2]) ? array[i2].call(mom, format2) : array[i2];
23159
+ output += isFunction$3(array[i2]) ? array[i2].call(mom, format2) : array[i2];
23160
23160
  }
23161
23161
  return output;
23162
23162
  };
@@ -23234,11 +23234,11 @@ const rows = [
23234
23234
  };
23235
23235
  function relativeTime(number, withoutSuffix, string, isFuture) {
23236
23236
  var output = this._relativeTime[string];
23237
- return isFunction$2(output) ? output(number, withoutSuffix, string, isFuture) : output.replace(/%d/i, number);
23237
+ return isFunction$3(output) ? output(number, withoutSuffix, string, isFuture) : output.replace(/%d/i, number);
23238
23238
  }
23239
23239
  function pastFuture(diff2, output) {
23240
23240
  var format2 = this._relativeTime[diff2 > 0 ? "future" : "past"];
23241
- return isFunction$2(format2) ? format2(output) : format2.replace(/%s/i, output);
23241
+ return isFunction$3(format2) ? format2(output) : format2.replace(/%s/i, output);
23242
23242
  }
23243
23243
  var aliases = {
23244
23244
  D: "date",
@@ -23338,7 +23338,7 @@ const rows = [
23338
23338
  var match1 = /\d/, match2 = /\d\d/, match3 = /\d{3}/, match4 = /\d{4}/, match6 = /[+-]?\d{6}/, match1to2 = /\d\d?/, match3to4 = /\d\d\d\d?/, match5to6 = /\d\d\d\d\d\d?/, match1to3 = /\d{1,3}/, match1to4 = /\d{1,4}/, match1to6 = /[+-]?\d{1,6}/, matchUnsigned = /\d+/, matchSigned = /[+-]?\d+/, matchOffset = /Z|[+-]\d\d:?\d\d/gi, matchShortOffset = /Z|[+-]\d\d(?::?\d\d)?/gi, matchTimestamp = /[+-]?\d+(\.\d{1,3})?/, matchWord = /[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i, match1to2NoLeadingZero = /^[1-9]\d?/, match1to2HasZero = /^([1-9]\d|\d)/, regexes;
23339
23339
  regexes = {};
23340
23340
  function addRegexToken(token2, regex, strictRegex) {
23341
- regexes[token2] = isFunction$2(regex) ? regex : function(isStrict, localeData2) {
23341
+ regexes[token2] = isFunction$3(regex) ? regex : function(isStrict, localeData2) {
23342
23342
  return isStrict && strictRegex ? strictRegex : regex;
23343
23343
  };
23344
23344
  }
@@ -23514,7 +23514,7 @@ const rows = [
23514
23514
  }
23515
23515
  function stringGet(units) {
23516
23516
  units = normalizeUnits(units);
23517
- if (isFunction$2(this[units])) {
23517
+ if (isFunction$3(this[units])) {
23518
23518
  return this[units]();
23519
23519
  }
23520
23520
  return this;
@@ -23528,7 +23528,7 @@ const rows = [
23528
23528
  }
23529
23529
  } else {
23530
23530
  units = normalizeUnits(units);
23531
- if (isFunction$2(this[units])) {
23531
+ if (isFunction$3(this[units])) {
23532
23532
  return this[units](value);
23533
23533
  }
23534
23534
  }
@@ -25446,7 +25446,7 @@ const rows = [
25446
25446
  time = void 0;
25447
25447
  }
25448
25448
  }
25449
- var now2 = time || createLocal(), sod = cloneWithOffset(now2, this).startOf("day"), format2 = hooks.calendarFormat(this, sod) || "sameElse", output = formats && (isFunction$2(formats[format2]) ? formats[format2].call(this, now2) : formats[format2]);
25449
+ var now2 = time || createLocal(), sod = cloneWithOffset(now2, this).startOf("day"), format2 = hooks.calendarFormat(this, sod) || "sameElse", output = formats && (isFunction$3(formats[format2]) ? formats[format2].call(this, now2) : formats[format2]);
25450
25450
  return this.format(
25451
25451
  output || this.localeData().calendar(format2, this, createLocal(now2))
25452
25452
  );
@@ -25581,7 +25581,7 @@ const rows = [
25581
25581
  utc ? "YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]" : "YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"
25582
25582
  );
25583
25583
  }
25584
- if (isFunction$2(Date.prototype.toISOString)) {
25584
+ if (isFunction$3(Date.prototype.toISOString)) {
25585
25585
  if (utc) {
25586
25586
  return this.toDate().toISOString();
25587
25587
  } else {
@@ -27166,8 +27166,8 @@ const rows = [
27166
27166
  if (hasRequiredMoment) return moment$2.exports;
27167
27167
  hasRequiredMoment = 1;
27168
27168
  (function(module2, exports3) {
27169
- (function(global2, factory) {
27170
- module2.exports = factory();
27169
+ (function(global2, factory2) {
27170
+ module2.exports = factory2();
27171
27171
  })(moment$1, (function() {
27172
27172
  var hookCallback2;
27173
27173
  function hooks2() {
@@ -31169,8 +31169,8 @@ const rows = [
31169
31169
  if (hasRequiredEs) return es$1.exports;
31170
31170
  hasRequiredEs = 1;
31171
31171
  (function(module2, exports3) {
31172
- (function(global2, factory) {
31173
- typeof commonjsRequire === "function" ? factory(requireMoment()) : factory(global2.moment);
31172
+ (function(global2, factory2) {
31173
+ typeof commonjsRequire === "function" ? factory2(requireMoment()) : factory2(global2.moment);
31174
31174
  })(es, (function(moment2) {
31175
31175
  //! moment.js locale configuration
31176
31176
  var monthsShortDot = "ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split(
@@ -32332,11 +32332,14 @@ const rows = [
32332
32332
  height: maximized ? "calc(100% - 50px)" : size.height,
32333
32333
  // Leave space for taskbar
32334
32334
  zIndex,
32335
- display: minimized ? "none" : "block"
32335
+ // Removed display property - let CSS handle it
32336
+ ...minimized && { visibility: "hidden" }
32337
+ // Use visibility instead of display
32336
32338
  };
32337
32339
  const windowClasses = [
32338
32340
  "window",
32339
32341
  maximized && "window--maximized",
32342
+ minimized && "window--minimized",
32340
32343
  isDragging && "window--dragging",
32341
32344
  isResizing && "window--resizing",
32342
32345
  className
@@ -32967,7 +32970,7 @@ const rows = [
32967
32970
  toolbar: window2.toolbar,
32968
32971
  statusBar: window2.statusBar
32969
32972
  },
32970
- /* @__PURE__ */ React.createElement("div", { style: { padding: "16px" } }, window2.content)
32973
+ window2.content
32971
32974
  )));
32972
32975
  };
32973
32976
  const DesktopTaskbar = () => {
@@ -33472,7 +33475,7 @@ Middle click: Close`
33472
33475
  const { isArray } = Array;
33473
33476
  const isUndefined = typeOfTest("undefined");
33474
33477
  function isBuffer(val) {
33475
- return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor) && isFunction$1(val.constructor.isBuffer) && val.constructor.isBuffer(val);
33478
+ return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor) && isFunction$2(val.constructor.isBuffer) && val.constructor.isBuffer(val);
33476
33479
  }
33477
33480
  const isArrayBuffer$1 = kindOfTest("ArrayBuffer");
33478
33481
  function isArrayBufferView(val) {
@@ -33485,7 +33488,7 @@ Middle click: Close`
33485
33488
  return result;
33486
33489
  }
33487
33490
  const isString$1 = typeOfTest("string");
33488
- const isFunction$1 = typeOfTest("function");
33491
+ const isFunction$2 = typeOfTest("function");
33489
33492
  const isNumber = typeOfTest("number");
33490
33493
  const isObject = (thing) => thing !== null && typeof thing === "object";
33491
33494
  const isBoolean = (thing) => thing === true || thing === false;
@@ -33510,11 +33513,11 @@ Middle click: Close`
33510
33513
  const isFile = kindOfTest("File");
33511
33514
  const isBlob = kindOfTest("Blob");
33512
33515
  const isFileList = kindOfTest("FileList");
33513
- const isStream = (val) => isObject(val) && isFunction$1(val.pipe);
33516
+ const isStream = (val) => isObject(val) && isFunction$2(val.pipe);
33514
33517
  const isFormData = (thing) => {
33515
33518
  let kind;
33516
- return thing && (typeof FormData === "function" && thing instanceof FormData || isFunction$1(thing.append) && ((kind = kindOf(thing)) === "formdata" || // detect form-data instance
33517
- kind === "object" && isFunction$1(thing.toString) && thing.toString() === "[object FormData]"));
33519
+ return thing && (typeof FormData === "function" && thing instanceof FormData || isFunction$2(thing.append) && ((kind = kindOf(thing)) === "formdata" || // detect form-data instance
33520
+ kind === "object" && isFunction$2(thing.toString) && thing.toString() === "[object FormData]"));
33518
33521
  };
33519
33522
  const isURLSearchParams = kindOfTest("URLSearchParams");
33520
33523
  const [isReadableStream, isRequest, isResponse, isHeaders] = ["ReadableStream", "Request", "Response", "Headers"].map(kindOfTest);
@@ -33567,7 +33570,7 @@ Middle click: Close`
33567
33570
  })();
33568
33571
  const isContextDefined = (context) => !isUndefined(context) && context !== _global;
33569
33572
  function merge() {
33570
- const { caseless } = isContextDefined(this) && this || {};
33573
+ const { caseless, skipUndefined } = isContextDefined(this) && this || {};
33571
33574
  const result = {};
33572
33575
  const assignValue = (val, key) => {
33573
33576
  const targetKey = caseless && findKey(result, key) || key;
@@ -33577,7 +33580,7 @@ Middle click: Close`
33577
33580
  result[targetKey] = merge({}, val);
33578
33581
  } else if (isArray(val)) {
33579
33582
  result[targetKey] = val.slice();
33580
- } else {
33583
+ } else if (!skipUndefined || !isUndefined(val)) {
33581
33584
  result[targetKey] = val;
33582
33585
  }
33583
33586
  };
@@ -33588,7 +33591,7 @@ Middle click: Close`
33588
33591
  }
33589
33592
  const extend = (a, b, thisArg, { allOwnKeys } = {}) => {
33590
33593
  forEach$1(b, (val, key) => {
33591
- if (thisArg && isFunction$1(val)) {
33594
+ if (thisArg && isFunction$2(val)) {
33592
33595
  a[key] = bind(val, thisArg);
33593
33596
  } else {
33594
33597
  a[key] = val;
@@ -33697,11 +33700,11 @@ Middle click: Close`
33697
33700
  };
33698
33701
  const freezeMethods = (obj) => {
33699
33702
  reduceDescriptors(obj, (descriptor, name) => {
33700
- if (isFunction$1(obj) && ["arguments", "caller", "callee"].indexOf(name) !== -1) {
33703
+ if (isFunction$2(obj) && ["arguments", "caller", "callee"].indexOf(name) !== -1) {
33701
33704
  return false;
33702
33705
  }
33703
33706
  const value = obj[name];
33704
- if (!isFunction$1(value)) return;
33707
+ if (!isFunction$2(value)) return;
33705
33708
  descriptor.enumerable = false;
33706
33709
  if ("writable" in descriptor) {
33707
33710
  descriptor.writable = false;
@@ -33730,7 +33733,7 @@ Middle click: Close`
33730
33733
  return value != null && Number.isFinite(value = +value) ? value : defaultValue;
33731
33734
  };
33732
33735
  function isSpecCompliantForm(thing) {
33733
- return !!(thing && isFunction$1(thing.append) && thing[toStringTag] === "FormData" && thing[iterator]);
33736
+ return !!(thing && isFunction$2(thing.append) && thing[toStringTag] === "FormData" && thing[iterator]);
33734
33737
  }
33735
33738
  const toJSONObject = (obj) => {
33736
33739
  const stack = new Array(10);
@@ -33758,7 +33761,7 @@ Middle click: Close`
33758
33761
  return visit(obj, 0);
33759
33762
  };
33760
33763
  const isAsyncFn = kindOfTest("AsyncFunction");
33761
- const isThenable = (thing) => thing && (isObject(thing) || isFunction$1(thing)) && isFunction$1(thing.then) && isFunction$1(thing.catch);
33764
+ const isThenable = (thing) => thing && (isObject(thing) || isFunction$2(thing)) && isFunction$2(thing.then) && isFunction$2(thing.catch);
33762
33765
  const _setImmediate = ((setImmediateSupported, postMessageSupported) => {
33763
33766
  if (setImmediateSupported) {
33764
33767
  return setImmediate;
@@ -33776,10 +33779,10 @@ Middle click: Close`
33776
33779
  })(`axios@${Math.random()}`, []) : (cb) => setTimeout(cb);
33777
33780
  })(
33778
33781
  typeof setImmediate === "function",
33779
- isFunction$1(_global.postMessage)
33782
+ isFunction$2(_global.postMessage)
33780
33783
  );
33781
33784
  const asap = typeof queueMicrotask !== "undefined" ? queueMicrotask.bind(_global) : typeof process !== "undefined" && process.nextTick || _setImmediate;
33782
- const isIterable = (thing) => thing != null && isFunction$1(thing[iterator]);
33785
+ const isIterable = (thing) => thing != null && isFunction$2(thing[iterator]);
33783
33786
  const utils$1 = {
33784
33787
  isArray,
33785
33788
  isArrayBuffer: isArrayBuffer$1,
@@ -33801,7 +33804,7 @@ Middle click: Close`
33801
33804
  isFile,
33802
33805
  isBlob,
33803
33806
  isRegExp,
33804
- isFunction: isFunction$1,
33807
+ isFunction: isFunction$2,
33805
33808
  isStream,
33806
33809
  isURLSearchParams,
33807
33810
  isTypedArray,
@@ -33906,9 +33909,13 @@ Middle click: Close`
33906
33909
  }, (prop) => {
33907
33910
  return prop !== "isAxiosError";
33908
33911
  });
33909
- AxiosError$1.call(axiosError, error.message, code, config, request, response);
33910
- axiosError.cause = error;
33911
- axiosError.name = error.name;
33912
+ const msg = error && error.message ? error.message : "Error";
33913
+ const errCode = code == null && error ? error.code : code;
33914
+ AxiosError$1.call(axiosError, msg, errCode, config, request, response);
33915
+ if (error && axiosError.cause == null) {
33916
+ Object.defineProperty(axiosError, "cause", { value: error, configurable: true });
33917
+ }
33918
+ axiosError.name = error && error.name || "Error";
33912
33919
  customProps && Object.assign(axiosError, customProps);
33913
33920
  return axiosError;
33914
33921
  };
@@ -34056,7 +34063,7 @@ Middle click: Close`
34056
34063
  }, "").join("&");
34057
34064
  };
34058
34065
  function encode(val) {
34059
- return encodeURIComponent(val).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
34066
+ return encodeURIComponent(val).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
34060
34067
  }
34061
34068
  function buildURL(url, params, options) {
34062
34069
  if (!params) {
@@ -34312,7 +34319,7 @@ Middle click: Close`
34312
34319
  const silentJSONParsing = transitional && transitional.silentJSONParsing;
34313
34320
  const strictJSONParsing = !silentJSONParsing && JSONRequested;
34314
34321
  try {
34315
- return JSON.parse(data);
34322
+ return JSON.parse(data, this.parseReviver);
34316
34323
  } catch (e) {
34317
34324
  if (strictJSONParsing) {
34318
34325
  if (e.name === "SyntaxError") {
@@ -34896,13 +34903,17 @@ Middle click: Close`
34896
34903
  "Basic " + btoa((auth.username || "") + ":" + (auth.password ? unescape(encodeURIComponent(auth.password)) : ""))
34897
34904
  );
34898
34905
  }
34899
- let contentType;
34900
34906
  if (utils$1.isFormData(data)) {
34901
34907
  if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {
34902
34908
  headers.setContentType(void 0);
34903
- } else if ((contentType = headers.getContentType()) !== false) {
34904
- const [type2, ...tokens2] = contentType ? contentType.split(";").map((token2) => token2.trim()).filter(Boolean) : [];
34905
- headers.setContentType([type2 || "multipart/form-data", ...tokens2].join("; "));
34909
+ } else if (utils$1.isFunction(data.getHeaders)) {
34910
+ const formHeaders = data.getHeaders();
34911
+ const allowedHeaders = ["content-type", "content-length"];
34912
+ Object.entries(formHeaders).forEach(([key, val]) => {
34913
+ if (allowedHeaders.includes(key.toLowerCase())) {
34914
+ headers.set(key, val);
34915
+ }
34916
+ });
34906
34917
  }
34907
34918
  }
34908
34919
  if (platform.hasStandardBrowserEnv) {
@@ -34980,8 +34991,11 @@ Middle click: Close`
34980
34991
  reject(new AxiosError$1("Request aborted", AxiosError$1.ECONNABORTED, config, request));
34981
34992
  request = null;
34982
34993
  };
34983
- request.onerror = function handleError() {
34984
- reject(new AxiosError$1("Network Error", AxiosError$1.ERR_NETWORK, config, request));
34994
+ request.onerror = function handleError(event) {
34995
+ const msg = event && event.message ? event.message : "Network Error";
34996
+ const err = new AxiosError$1(msg, AxiosError$1.ERR_NETWORK, config, request);
34997
+ err.event = event || null;
34998
+ reject(err);
34985
34999
  request = null;
34986
35000
  };
34987
35001
  request.ontimeout = function handleTimeout() {
@@ -35149,9 +35163,16 @@ Middle click: Close`
35149
35163
  highWaterMark: 2
35150
35164
  });
35151
35165
  };
35152
- const isFetchSupported = typeof fetch === "function" && typeof Request === "function" && typeof Response === "function";
35153
- const isReadableStreamSupported = isFetchSupported && typeof ReadableStream === "function";
35154
- const encodeText = isFetchSupported && (typeof TextEncoder === "function" ? /* @__PURE__ */ ((encoder) => (str) => encoder.encode(str))(new TextEncoder()) : async (str) => new Uint8Array(await new Response(str).arrayBuffer()));
35166
+ const DEFAULT_CHUNK_SIZE = 64 * 1024;
35167
+ const { isFunction: isFunction$1 } = utils$1;
35168
+ const globalFetchAPI = (({ Request, Response }) => ({
35169
+ Request,
35170
+ Response
35171
+ }))(utils$1.global);
35172
+ const {
35173
+ ReadableStream: ReadableStream$1,
35174
+ TextEncoder
35175
+ } = utils$1.global;
35155
35176
  const test = (fn, ...args) => {
35156
35177
  try {
35157
35178
  return !!fn(...args);
@@ -35159,162 +35180,202 @@ Middle click: Close`
35159
35180
  return false;
35160
35181
  }
35161
35182
  };
35162
- const supportsRequestStream = isReadableStreamSupported && test(() => {
35163
- let duplexAccessed = false;
35164
- const hasContentType = new Request(platform.origin, {
35165
- body: new ReadableStream(),
35166
- method: "POST",
35167
- get duplex() {
35168
- duplexAccessed = true;
35169
- return "half";
35170
- }
35171
- }).headers.has("Content-Type");
35172
- return duplexAccessed && !hasContentType;
35173
- });
35174
- const DEFAULT_CHUNK_SIZE = 64 * 1024;
35175
- const supportsResponseStream = isReadableStreamSupported && test(() => utils$1.isReadableStream(new Response("").body));
35176
- const resolvers = {
35177
- stream: supportsResponseStream && ((res) => res.body)
35178
- };
35179
- isFetchSupported && ((res) => {
35180
- ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((type2) => {
35181
- !resolvers[type2] && (resolvers[type2] = utils$1.isFunction(res[type2]) ? (res2) => res2[type2]() : (_, config) => {
35182
- throw new AxiosError$1(`Response type '${type2}' is not supported`, AxiosError$1.ERR_NOT_SUPPORT, config);
35183
- });
35184
- });
35185
- })(new Response());
35186
- const getBodyLength = async (body) => {
35187
- if (body == null) {
35188
- return 0;
35189
- }
35190
- if (utils$1.isBlob(body)) {
35191
- return body.size;
35183
+ const factory = (env) => {
35184
+ env = utils$1.merge.call({
35185
+ skipUndefined: true
35186
+ }, globalFetchAPI, env);
35187
+ const { fetch: envFetch, Request, Response } = env;
35188
+ const isFetchSupported = envFetch ? isFunction$1(envFetch) : typeof fetch === "function";
35189
+ const isRequestSupported = isFunction$1(Request);
35190
+ const isResponseSupported = isFunction$1(Response);
35191
+ if (!isFetchSupported) {
35192
+ return false;
35192
35193
  }
35193
- if (utils$1.isSpecCompliantForm(body)) {
35194
- const _request = new Request(platform.origin, {
35194
+ const isReadableStreamSupported = isFetchSupported && isFunction$1(ReadableStream$1);
35195
+ const encodeText = isFetchSupported && (typeof TextEncoder === "function" ? /* @__PURE__ */ ((encoder) => (str) => encoder.encode(str))(new TextEncoder()) : async (str) => new Uint8Array(await new Request(str).arrayBuffer()));
35196
+ const supportsRequestStream = isRequestSupported && isReadableStreamSupported && test(() => {
35197
+ let duplexAccessed = false;
35198
+ const hasContentType = new Request(platform.origin, {
35199
+ body: new ReadableStream$1(),
35195
35200
  method: "POST",
35196
- body
35197
- });
35198
- return (await _request.arrayBuffer()).byteLength;
35199
- }
35200
- if (utils$1.isArrayBufferView(body) || utils$1.isArrayBuffer(body)) {
35201
- return body.byteLength;
35202
- }
35203
- if (utils$1.isURLSearchParams(body)) {
35204
- body = body + "";
35205
- }
35206
- if (utils$1.isString(body)) {
35207
- return (await encodeText(body)).byteLength;
35208
- }
35209
- };
35210
- const resolveBodyLength = async (headers, body) => {
35211
- const length = utils$1.toFiniteNumber(headers.getContentLength());
35212
- return length == null ? getBodyLength(body) : length;
35213
- };
35214
- const fetchAdapter = isFetchSupported && (async (config) => {
35215
- let {
35216
- url,
35217
- method,
35218
- data,
35219
- signal,
35220
- cancelToken,
35221
- timeout,
35222
- onDownloadProgress,
35223
- onUploadProgress,
35224
- responseType,
35225
- headers,
35226
- withCredentials = "same-origin",
35227
- fetchOptions
35228
- } = resolveConfig(config);
35229
- responseType = responseType ? (responseType + "").toLowerCase() : "text";
35230
- let composedSignal = composeSignals([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
35231
- let request;
35232
- const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {
35233
- composedSignal.unsubscribe();
35201
+ get duplex() {
35202
+ duplexAccessed = true;
35203
+ return "half";
35204
+ }
35205
+ }).headers.has("Content-Type");
35206
+ return duplexAccessed && !hasContentType;
35234
35207
  });
35235
- let requestContentLength;
35236
- try {
35237
- if (onUploadProgress && supportsRequestStream && method !== "get" && method !== "head" && (requestContentLength = await resolveBodyLength(headers, data)) !== 0) {
35238
- let _request = new Request(url, {
35239
- method: "POST",
35240
- body: data,
35241
- duplex: "half"
35208
+ const supportsResponseStream = isResponseSupported && isReadableStreamSupported && test(() => utils$1.isReadableStream(new Response("").body));
35209
+ const resolvers = {
35210
+ stream: supportsResponseStream && ((res) => res.body)
35211
+ };
35212
+ isFetchSupported && (() => {
35213
+ ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((type2) => {
35214
+ !resolvers[type2] && (resolvers[type2] = (res, config) => {
35215
+ let method = res && res[type2];
35216
+ if (method) {
35217
+ return method.call(res);
35218
+ }
35219
+ throw new AxiosError$1(`Response type '${type2}' is not supported`, AxiosError$1.ERR_NOT_SUPPORT, config);
35242
35220
  });
35243
- let contentTypeHeader;
35244
- if (utils$1.isFormData(data) && (contentTypeHeader = _request.headers.get("content-type"))) {
35245
- headers.setContentType(contentTypeHeader);
35246
- }
35247
- if (_request.body) {
35248
- const [onProgress, flush] = progressEventDecorator(
35249
- requestContentLength,
35250
- progressEventReducer(asyncDecorator(onUploadProgress))
35251
- );
35252
- data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);
35253
- }
35221
+ });
35222
+ })();
35223
+ const getBodyLength = async (body) => {
35224
+ if (body == null) {
35225
+ return 0;
35254
35226
  }
35255
- if (!utils$1.isString(withCredentials)) {
35256
- withCredentials = withCredentials ? "include" : "omit";
35227
+ if (utils$1.isBlob(body)) {
35228
+ return body.size;
35257
35229
  }
35258
- const isCredentialsSupported = "credentials" in Request.prototype;
35259
- request = new Request(url, {
35260
- ...fetchOptions,
35261
- signal: composedSignal,
35262
- method: method.toUpperCase(),
35263
- headers: headers.normalize().toJSON(),
35264
- body: data,
35265
- duplex: "half",
35266
- credentials: isCredentialsSupported ? withCredentials : void 0
35267
- });
35268
- let response = await fetch(request, fetchOptions);
35269
- const isStreamResponse = supportsResponseStream && (responseType === "stream" || responseType === "response");
35270
- if (supportsResponseStream && (onDownloadProgress || isStreamResponse && unsubscribe)) {
35271
- const options = {};
35272
- ["status", "statusText", "headers"].forEach((prop) => {
35273
- options[prop] = response[prop];
35230
+ if (utils$1.isSpecCompliantForm(body)) {
35231
+ const _request = new Request(platform.origin, {
35232
+ method: "POST",
35233
+ body
35274
35234
  });
35275
- const responseContentLength = utils$1.toFiniteNumber(response.headers.get("content-length"));
35276
- const [onProgress, flush] = onDownloadProgress && progressEventDecorator(
35277
- responseContentLength,
35278
- progressEventReducer(asyncDecorator(onDownloadProgress), true)
35279
- ) || [];
35280
- response = new Response(
35281
- trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
35282
- flush && flush();
35283
- unsubscribe && unsubscribe();
35284
- }),
35285
- options
35286
- );
35235
+ return (await _request.arrayBuffer()).byteLength;
35287
35236
  }
35288
- responseType = responseType || "text";
35289
- let responseData = await resolvers[utils$1.findKey(resolvers, responseType) || "text"](response, config);
35290
- !isStreamResponse && unsubscribe && unsubscribe();
35291
- return await new Promise((resolve, reject) => {
35292
- settle(resolve, reject, {
35293
- data: responseData,
35294
- headers: AxiosHeaders$1.from(response.headers),
35295
- status: response.status,
35296
- statusText: response.statusText,
35297
- config,
35298
- request
35299
- });
35237
+ if (utils$1.isArrayBufferView(body) || utils$1.isArrayBuffer(body)) {
35238
+ return body.byteLength;
35239
+ }
35240
+ if (utils$1.isURLSearchParams(body)) {
35241
+ body = body + "";
35242
+ }
35243
+ if (utils$1.isString(body)) {
35244
+ return (await encodeText(body)).byteLength;
35245
+ }
35246
+ };
35247
+ const resolveBodyLength = async (headers, body) => {
35248
+ const length = utils$1.toFiniteNumber(headers.getContentLength());
35249
+ return length == null ? getBodyLength(body) : length;
35250
+ };
35251
+ return async (config) => {
35252
+ let {
35253
+ url,
35254
+ method,
35255
+ data,
35256
+ signal,
35257
+ cancelToken,
35258
+ timeout,
35259
+ onDownloadProgress,
35260
+ onUploadProgress,
35261
+ responseType,
35262
+ headers,
35263
+ withCredentials = "same-origin",
35264
+ fetchOptions
35265
+ } = resolveConfig(config);
35266
+ let _fetch = envFetch || fetch;
35267
+ responseType = responseType ? (responseType + "").toLowerCase() : "text";
35268
+ let composedSignal = composeSignals([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
35269
+ let request = null;
35270
+ const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {
35271
+ composedSignal.unsubscribe();
35300
35272
  });
35301
- } catch (err) {
35302
- unsubscribe && unsubscribe();
35303
- if (err && err.name === "TypeError" && /Load failed|fetch/i.test(err.message)) {
35304
- throw Object.assign(
35305
- new AxiosError$1("Network Error", AxiosError$1.ERR_NETWORK, config, request),
35306
- {
35307
- cause: err.cause || err
35273
+ let requestContentLength;
35274
+ try {
35275
+ if (onUploadProgress && supportsRequestStream && method !== "get" && method !== "head" && (requestContentLength = await resolveBodyLength(headers, data)) !== 0) {
35276
+ let _request = new Request(url, {
35277
+ method: "POST",
35278
+ body: data,
35279
+ duplex: "half"
35280
+ });
35281
+ let contentTypeHeader;
35282
+ if (utils$1.isFormData(data) && (contentTypeHeader = _request.headers.get("content-type"))) {
35283
+ headers.setContentType(contentTypeHeader);
35284
+ }
35285
+ if (_request.body) {
35286
+ const [onProgress, flush] = progressEventDecorator(
35287
+ requestContentLength,
35288
+ progressEventReducer(asyncDecorator(onUploadProgress))
35289
+ );
35290
+ data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);
35308
35291
  }
35309
- );
35292
+ }
35293
+ if (!utils$1.isString(withCredentials)) {
35294
+ withCredentials = withCredentials ? "include" : "omit";
35295
+ }
35296
+ const isCredentialsSupported = isRequestSupported && "credentials" in Request.prototype;
35297
+ const resolvedOptions = {
35298
+ ...fetchOptions,
35299
+ signal: composedSignal,
35300
+ method: method.toUpperCase(),
35301
+ headers: headers.normalize().toJSON(),
35302
+ body: data,
35303
+ duplex: "half",
35304
+ credentials: isCredentialsSupported ? withCredentials : void 0
35305
+ };
35306
+ request = isRequestSupported && new Request(url, resolvedOptions);
35307
+ let response = await (isRequestSupported ? _fetch(request, fetchOptions) : _fetch(url, resolvedOptions));
35308
+ const isStreamResponse = supportsResponseStream && (responseType === "stream" || responseType === "response");
35309
+ if (supportsResponseStream && (onDownloadProgress || isStreamResponse && unsubscribe)) {
35310
+ const options = {};
35311
+ ["status", "statusText", "headers"].forEach((prop) => {
35312
+ options[prop] = response[prop];
35313
+ });
35314
+ const responseContentLength = utils$1.toFiniteNumber(response.headers.get("content-length"));
35315
+ const [onProgress, flush] = onDownloadProgress && progressEventDecorator(
35316
+ responseContentLength,
35317
+ progressEventReducer(asyncDecorator(onDownloadProgress), true)
35318
+ ) || [];
35319
+ response = new Response(
35320
+ trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
35321
+ flush && flush();
35322
+ unsubscribe && unsubscribe();
35323
+ }),
35324
+ options
35325
+ );
35326
+ }
35327
+ responseType = responseType || "text";
35328
+ let responseData = await resolvers[utils$1.findKey(resolvers, responseType) || "text"](response, config);
35329
+ !isStreamResponse && unsubscribe && unsubscribe();
35330
+ return await new Promise((resolve, reject) => {
35331
+ settle(resolve, reject, {
35332
+ data: responseData,
35333
+ headers: AxiosHeaders$1.from(response.headers),
35334
+ status: response.status,
35335
+ statusText: response.statusText,
35336
+ config,
35337
+ request
35338
+ });
35339
+ });
35340
+ } catch (err) {
35341
+ unsubscribe && unsubscribe();
35342
+ if (err && err.name === "TypeError" && /Load failed|fetch/i.test(err.message)) {
35343
+ throw Object.assign(
35344
+ new AxiosError$1("Network Error", AxiosError$1.ERR_NETWORK, config, request),
35345
+ {
35346
+ cause: err.cause || err
35347
+ }
35348
+ );
35349
+ }
35350
+ throw AxiosError$1.from(err, err && err.code, config, request);
35310
35351
  }
35311
- throw AxiosError$1.from(err, err && err.code, config, request);
35352
+ };
35353
+ };
35354
+ const seedCache = /* @__PURE__ */ new Map();
35355
+ const getFetch = (config) => {
35356
+ let env = config ? config.env : {};
35357
+ const { fetch: fetch2, Request, Response } = env;
35358
+ const seeds = [
35359
+ Request,
35360
+ Response,
35361
+ fetch2
35362
+ ];
35363
+ let len = seeds.length, i = len, seed, target, map2 = seedCache;
35364
+ while (i--) {
35365
+ seed = seeds[i];
35366
+ target = map2.get(seed);
35367
+ target === void 0 && map2.set(seed, target = i ? /* @__PURE__ */ new Map() : factory(env));
35368
+ map2 = target;
35312
35369
  }
35313
- });
35370
+ return target;
35371
+ };
35372
+ getFetch();
35314
35373
  const knownAdapters = {
35315
35374
  http: httpAdapter,
35316
35375
  xhr: xhrAdapter,
35317
- fetch: fetchAdapter
35376
+ fetch: {
35377
+ get: getFetch
35378
+ }
35318
35379
  };
35319
35380
  utils$1.forEach(knownAdapters, (fn, value) => {
35320
35381
  if (fn) {
@@ -35328,7 +35389,7 @@ Middle click: Close`
35328
35389
  const renderReason = (reason) => `- ${reason}`;
35329
35390
  const isResolvedHandle = (adapter) => utils$1.isFunction(adapter) || adapter === null || adapter === false;
35330
35391
  const adapters = {
35331
- getAdapter: (adapters2) => {
35392
+ getAdapter: (adapters2, config) => {
35332
35393
  adapters2 = utils$1.isArray(adapters2) ? adapters2 : [adapters2];
35333
35394
  const { length } = adapters2;
35334
35395
  let nameOrAdapter;
@@ -35344,7 +35405,7 @@ Middle click: Close`
35344
35405
  throw new AxiosError$1(`Unknown adapter '${id}'`);
35345
35406
  }
35346
35407
  }
35347
- if (adapter) {
35408
+ if (adapter && (utils$1.isFunction(adapter) || (adapter = adapter.get(config)))) {
35348
35409
  break;
35349
35410
  }
35350
35411
  rejectedReasons[id || "#" + i] = adapter;
@@ -35381,7 +35442,7 @@ Middle click: Close`
35381
35442
  if (["post", "put", "patch"].indexOf(config.method) !== -1) {
35382
35443
  config.headers.setContentType("application/x-www-form-urlencoded", false);
35383
35444
  }
35384
- const adapter = adapters.getAdapter(config.adapter || defaults.adapter);
35445
+ const adapter = adapters.getAdapter(config.adapter || defaults.adapter, config);
35385
35446
  return adapter(config).then(function onAdapterResolution(response) {
35386
35447
  throwIfCancellationRequested(config);
35387
35448
  response.data = transformData.call(
@@ -35406,7 +35467,7 @@ Middle click: Close`
35406
35467
  return Promise.reject(reason);
35407
35468
  });
35408
35469
  }
35409
- const VERSION$1 = "1.11.0";
35470
+ const VERSION$1 = "1.12.2";
35410
35471
  const validators$1 = {};
35411
35472
  ["object", "boolean", "number", "function", "string", "symbol"].forEach((type2, i) => {
35412
35473
  validators$1[type2] = function validator2(thing) {
@@ -35585,7 +35646,6 @@ Middle click: Close`
35585
35646
  }
35586
35647
  len = requestInterceptorChain.length;
35587
35648
  let newConfig = config;
35588
- i = 0;
35589
35649
  while (i < len) {
35590
35650
  const onFulfilled = requestInterceptorChain[i++];
35591
35651
  const onRejected = requestInterceptorChain[i++];