UNPKG

tdesign-vue

Version:
1,227 lines (1,218 loc) 805 kB
/** * tdesign v1.14.1 * (c) 2025 tdesign * @license MIT */ import { t } from '../../../js/global-config/t.js'; import _typeof from '@babel/runtime/helpers/typeof'; import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray'; import _slicedToArray from '@babel/runtime/helpers/slicedToArray'; import _asyncToGenerator from '@babel/runtime/helpers/asyncToGenerator'; import _createClass from '@babel/runtime/helpers/createClass'; import _classCallCheck from '@babel/runtime/helpers/classCallCheck'; import _possibleConstructorReturn from '@babel/runtime/helpers/possibleConstructorReturn'; import _getPrototypeOf from '@babel/runtime/helpers/getPrototypeOf'; import _inherits from '@babel/runtime/helpers/inherits'; import _wrapNativeSuper from '@babel/runtime/helpers/wrapNativeSuper'; import _defineProperty from '@babel/runtime/helpers/defineProperty'; import _regeneratorRuntime from '@babel/runtime/regenerator'; import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties'; import _construct from '@babel/runtime/helpers/construct'; import 'lodash-es'; function _createForOfIteratorHelper$7(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$7(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; } function _unsupportedIterableToArray$7(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$7(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$7(r, a) : void 0; } } function _arrayLikeToArray$7(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } // src/index.ts var f$3 = { reset: [0, 0], bold: [1, 22, "\x1B[22m\x1B[1m"], dim: [2, 22, "\x1B[22m\x1B[2m"], italic: [3, 23], underline: [4, 24], inverse: [7, 27], hidden: [8, 28], strikethrough: [9, 29], black: [30, 39], red: [31, 39], green: [32, 39], yellow: [33, 39], blue: [34, 39], magenta: [35, 39], cyan: [36, 39], white: [37, 39], gray: [90, 39], bgBlack: [40, 49], bgRed: [41, 49], bgGreen: [42, 49], bgYellow: [43, 49], bgBlue: [44, 49], bgMagenta: [45, 49], bgCyan: [46, 49], bgWhite: [47, 49], blackBright: [90, 39], redBright: [91, 39], greenBright: [92, 39], yellowBright: [93, 39], blueBright: [94, 39], magentaBright: [95, 39], cyanBright: [96, 39], whiteBright: [97, 39], bgBlackBright: [100, 49], bgRedBright: [101, 49], bgGreenBright: [102, 49], bgYellowBright: [103, 49], bgBlueBright: [104, 49], bgMagentaBright: [105, 49], bgCyanBright: [106, 49], bgWhiteBright: [107, 49] }, h$1 = Object.entries(f$3); function a$1(n) { return String(n); } a$1.open = ""; a$1.close = ""; function C$2() { var n = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !1; var e = typeof process != "undefined" ? process : void 0, i = (e == null ? void 0 : e.env) || {}, g = (e == null ? void 0 : e.argv) || []; return !("NO_COLOR" in i || g.includes("--no-color")) && ("FORCE_COLOR" in i || g.includes("--color") || (e == null ? void 0 : e.platform) === "win32" || n && i.TERM !== "dumb" || "CI" in i) || typeof window != "undefined" && !!window.chrome; } function p$1() { var n = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !1; var e = C$2(n), i = function i(r, t, c, o) { var l = "", s = 0; do l += r.substring(s, o) + c, s = o + t.length, o = r.indexOf(t, s); while (~o); return l + r.substring(s); }, g = function g(r, t) { var c = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : r; var o = function o(l) { var s = String(l), b = s.indexOf(t, r.length); return ~b ? r + i(s, t, c, b) + t : r + s + t; }; return o.open = r, o.close = t, o; }, u = { isColorSupported: e }, d = function d(r) { return "\x1B[".concat(r, "m"); }; var _iterator = _createForOfIteratorHelper$7(h$1), _step; try { for (_iterator.s(); !(_step = _iterator.n()).done;) { var _step$value = _slicedToArray(_step.value, 2), r = _step$value[0], t = _step$value[1]; u[r] = e ? g(d(t[0]), d(t[1]), t[2]) : a$1; } } catch (err) { _iterator.e(err); } finally { _iterator.f(); } return u; } // src/browser.ts var f$2 = p$1(!1); function _callSuper$4(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$4() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); } function _isNativeReflectConstruct$4() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct$4 = function _isNativeReflectConstruct() { return !!t; })(); } function ownKeys$a(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } function _objectSpread$a(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$a(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$a(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } function _createForOfIteratorHelper$6(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$6(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; } function _unsupportedIterableToArray$6(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$6(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$6(r, a) : void 0; } } function _arrayLikeToArray$6(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } function getKeysOfEnumerableProperties(object, compareKeys) { var rawKeys = Object.keys(object); var keys = compareKeys === null ? rawKeys : rawKeys.sort(compareKeys); if (Object.getOwnPropertySymbols) { var _iterator = _createForOfIteratorHelper$6(Object.getOwnPropertySymbols(object)), _step; try { for (_iterator.s(); !(_step = _iterator.n()).done;) { var symbol = _step.value; if (Object.getOwnPropertyDescriptor(object, symbol).enumerable) { keys.push(symbol); } } } catch (err) { _iterator.e(err); } finally { _iterator.f(); } } return keys; } function printIteratorEntries(iterator, config, indentation, depth, refs, printer) { var separator = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : ": "; var result = ""; var width = 0; var current = iterator.next(); if (!current.done) { result += config.spacingOuter; var indentationNext = indentation + config.indent; while (!current.done) { result += indentationNext; if (width++ === config.maxWidth) { result += "\u2026"; break; } var name = printer(current.value[0], config, indentationNext, depth, refs); var value = printer(current.value[1], config, indentationNext, depth, refs); result += name + separator + value; current = iterator.next(); if (!current.done) { result += ",".concat(config.spacingInner); } else if (!config.min) { result += ","; } } result += config.spacingOuter + indentation; } return result; } function printIteratorValues(iterator, config, indentation, depth, refs, printer) { var result = ""; var width = 0; var current = iterator.next(); if (!current.done) { result += config.spacingOuter; var indentationNext = indentation + config.indent; while (!current.done) { result += indentationNext; if (width++ === config.maxWidth) { result += "\u2026"; break; } result += printer(current.value, config, indentationNext, depth, refs); current = iterator.next(); if (!current.done) { result += ",".concat(config.spacingInner); } else if (!config.min) { result += ","; } } result += config.spacingOuter + indentation; } return result; } function printListItems(list, config, indentation, depth, refs, printer) { var result = ""; list = list instanceof ArrayBuffer ? new DataView(list) : list; var isDataView = function isDataView(l) { return l instanceof DataView; }; var length = isDataView(list) ? list.byteLength : list.length; if (length > 0) { result += config.spacingOuter; var indentationNext = indentation + config.indent; for (var i = 0; i < length; i++) { result += indentationNext; if (i === config.maxWidth) { result += "\u2026"; break; } if (isDataView(list) || i in list) { result += printer(isDataView(list) ? list.getInt8(i) : list[i], config, indentationNext, depth, refs); } if (i < length - 1) { result += ",".concat(config.spacingInner); } else if (!config.min) { result += ","; } } result += config.spacingOuter + indentation; } return result; } function printObjectProperties(val, config, indentation, depth, refs, printer) { var result = ""; var keys = getKeysOfEnumerableProperties(val, config.compareKeys); if (keys.length > 0) { result += config.spacingOuter; var indentationNext = indentation + config.indent; for (var i = 0; i < keys.length; i++) { var key = keys[i]; var name = printer(key, config, indentationNext, depth, refs); var value = printer(val[key], config, indentationNext, depth, refs); result += "".concat(indentationNext + name, ": ").concat(value); if (i < keys.length - 1) { result += ",".concat(config.spacingInner); } else if (!config.min) { result += ","; } } result += config.spacingOuter + indentation; } return result; } var asymmetricMatcher = typeof Symbol === "function" && Symbol["for"] ? Symbol["for"]("jest.asymmetricMatcher") : 1267621; var SPACE$2 = " "; var serialize$5 = function serialize$5(val, config, indentation, depth, refs, printer) { var stringedValue = val.toString(); if (stringedValue === "ArrayContaining" || stringedValue === "ArrayNotContaining") { if (++depth > config.maxDepth) { return "[".concat(stringedValue, "]"); } return "".concat(stringedValue + SPACE$2, "[").concat(printListItems(val.sample, config, indentation, depth, refs, printer), "]"); } if (stringedValue === "ObjectContaining" || stringedValue === "ObjectNotContaining") { if (++depth > config.maxDepth) { return "[".concat(stringedValue, "]"); } return "".concat(stringedValue + SPACE$2, "{").concat(printObjectProperties(val.sample, config, indentation, depth, refs, printer), "}"); } if (stringedValue === "StringMatching" || stringedValue === "StringNotMatching") { return stringedValue + SPACE$2 + printer(val.sample, config, indentation, depth, refs); } if (stringedValue === "StringContaining" || stringedValue === "StringNotContaining") { return stringedValue + SPACE$2 + printer(val.sample, config, indentation, depth, refs); } if (typeof val.toAsymmetricMatcher !== "function") { throw new TypeError("Asymmetric matcher ".concat(val.constructor.name, " does not implement toAsymmetricMatcher()")); } return val.toAsymmetricMatcher(); }; var test$5 = function test$5(val) { return val && val.$$typeof === asymmetricMatcher; }; var plugin$5 = { serialize: serialize$5, test: test$5 }; var SPACE$1 = " "; var OBJECT_NAMES = /* @__PURE__ */new Set(["DOMStringMap", "NamedNodeMap"]); var ARRAY_REGEXP = /^(?:HTML\w*Collection|NodeList)$/; function testName(name) { return OBJECT_NAMES.has(name) || ARRAY_REGEXP.test(name); } var test$4 = function test$4(val) { return val && val.constructor && !!val.constructor.name && testName(val.constructor.name); }; function isNamedNodeMap(collection) { return collection.constructor.name === "NamedNodeMap"; } var serialize$4 = function serialize$4(collection, config, indentation, depth, refs, printer) { var name = collection.constructor.name; if (++depth > config.maxDepth) { return "[".concat(name, "]"); } return (config.min ? "" : name + SPACE$1) + (OBJECT_NAMES.has(name) ? "{".concat(printObjectProperties(isNamedNodeMap(collection) ? _toConsumableArray(collection).reduce(function (props, attribute) { props[attribute.name] = attribute.value; return props; }, {}) : _objectSpread$a({}, collection), config, indentation, depth, refs, printer), "}") : "[".concat(printListItems(_toConsumableArray(collection), config, indentation, depth, refs, printer), "]")); }; var plugin$4 = { serialize: serialize$4, test: test$4 }; function escapeHTML(str) { return str.replaceAll("<", "&lt;").replaceAll(">", "&gt;"); } function printProps(keys, props, config, indentation, depth, refs, printer) { var indentationNext = indentation + config.indent; var colors = config.colors; return keys.map(function (key) { var value = props[key]; var printed = printer(value, config, indentationNext, depth, refs); if (typeof value !== "string") { if (printed.includes("\n")) { printed = config.spacingOuter + indentationNext + printed + config.spacingOuter + indentation; } printed = "{".concat(printed, "}"); } return "".concat(config.spacingInner + indentation + colors.prop.open + key + colors.prop.close, "=").concat(colors.value.open).concat(printed).concat(colors.value.close); }).join(""); } function printChildren(children, config, indentation, depth, refs, printer) { return children.map(function (child) { return config.spacingOuter + indentation + (typeof child === "string" ? printText(child, config) : printer(child, config, indentation, depth, refs)); }).join(""); } function printText(text, config) { var contentColor = config.colors.content; return contentColor.open + escapeHTML(text) + contentColor.close; } function printComment(comment, config) { var commentColor = config.colors.comment; return "".concat(commentColor.open, "<!--").concat(escapeHTML(comment), "-->").concat(commentColor.close); } function printElement(type, printedProps, printedChildren, config, indentation) { var tagColor = config.colors.tag; return "".concat(tagColor.open, "<").concat(type).concat(printedProps && tagColor.close + printedProps + config.spacingOuter + indentation + tagColor.open).concat(printedChildren ? ">".concat(tagColor.close).concat(printedChildren).concat(config.spacingOuter).concat(indentation).concat(tagColor.open, "</").concat(type) : "".concat(printedProps && !config.min ? "" : " ", "/"), ">").concat(tagColor.close); } function printElementAsLeaf(type, config) { var tagColor = config.colors.tag; return "".concat(tagColor.open, "<").concat(type).concat(tagColor.close, " \u2026").concat(tagColor.open, " />").concat(tagColor.close); } var ELEMENT_NODE = 1; var TEXT_NODE = 3; var COMMENT_NODE = 8; var FRAGMENT_NODE = 11; var ELEMENT_REGEXP = /^(?:(?:HTML|SVG)\w*)?Element$/; function testHasAttribute(val) { try { return typeof val.hasAttribute === "function" && val.hasAttribute("is"); } catch (_unused) { return false; } } function testNode(val) { var constructorName = val.constructor.name; var nodeType = val.nodeType, tagName = val.tagName; var isCustomElement = typeof tagName === "string" && tagName.includes("-") || testHasAttribute(val); return nodeType === ELEMENT_NODE && (ELEMENT_REGEXP.test(constructorName) || isCustomElement) || nodeType === TEXT_NODE && constructorName === "Text" || nodeType === COMMENT_NODE && constructorName === "Comment" || nodeType === FRAGMENT_NODE && constructorName === "DocumentFragment"; } var test$3 = function test$3(val) { var _a; return ((_a = val == null ? void 0 : val.constructor) == null ? void 0 : _a.name) && testNode(val); }; function nodeIsText(node) { return node.nodeType === TEXT_NODE; } function nodeIsComment(node) { return node.nodeType === COMMENT_NODE; } function nodeIsFragment(node) { return node.nodeType === FRAGMENT_NODE; } var serialize$3 = function serialize$3(node, config, indentation, depth, refs, printer) { if (nodeIsText(node)) { return printText(node.data, config); } if (nodeIsComment(node)) { return printComment(node.data, config); } var type = nodeIsFragment(node) ? "DocumentFragment" : node.tagName.toLowerCase(); if (++depth > config.maxDepth) { return printElementAsLeaf(type, config); } return printElement(type, printProps(nodeIsFragment(node) ? [] : Array.from(node.attributes, function (attr) { return attr.name; }).sort(), nodeIsFragment(node) ? {} : _toConsumableArray(node.attributes).reduce(function (props, attribute) { props[attribute.name] = attribute.value; return props; }, {}), config, indentation + config.indent, depth, refs, printer), printChildren(Array.prototype.slice.call(node.childNodes || node.children), config, indentation + config.indent, depth, refs, printer), config, indentation); }; var plugin$3 = { serialize: serialize$3, test: test$3 }; var IS_ITERABLE_SENTINEL = "@@__IMMUTABLE_ITERABLE__@@"; var IS_LIST_SENTINEL$1 = "@@__IMMUTABLE_LIST__@@"; var IS_KEYED_SENTINEL$1 = "@@__IMMUTABLE_KEYED__@@"; var IS_MAP_SENTINEL = "@@__IMMUTABLE_MAP__@@"; var IS_ORDERED_SENTINEL$1 = "@@__IMMUTABLE_ORDERED__@@"; var IS_RECORD_SENTINEL = "@@__IMMUTABLE_RECORD__@@"; var IS_SEQ_SENTINEL = "@@__IMMUTABLE_SEQ__@@"; var IS_SET_SENTINEL$1 = "@@__IMMUTABLE_SET__@@"; var IS_STACK_SENTINEL = "@@__IMMUTABLE_STACK__@@"; var getImmutableName = function getImmutableName(name) { return "Immutable.".concat(name); }; var printAsLeaf = function printAsLeaf(name) { return "[".concat(name, "]"); }; var SPACE = " "; var LAZY = "\u2026"; function printImmutableEntries(val, config, indentation, depth, refs, printer, type) { return ++depth > config.maxDepth ? printAsLeaf(getImmutableName(type)) : "".concat(getImmutableName(type) + SPACE, "{").concat(printIteratorEntries(val.entries(), config, indentation, depth, refs, printer), "}"); } function getRecordEntries(val) { var i = 0; return { next: function next() { if (i < val._keys.length) { var key = val._keys[i++]; return { done: false, value: [key, val.get(key)] }; } return { done: true, value: void 0 }; } }; } function printImmutableRecord(val, config, indentation, depth, refs, printer) { var name = getImmutableName(val._name || "Record"); return ++depth > config.maxDepth ? printAsLeaf(name) : "".concat(name + SPACE, "{").concat(printIteratorEntries(getRecordEntries(val), config, indentation, depth, refs, printer), "}"); } function printImmutableSeq(val, config, indentation, depth, refs, printer) { var name = getImmutableName("Seq"); if (++depth > config.maxDepth) { return printAsLeaf(name); } if (val[IS_KEYED_SENTINEL$1]) { return "".concat(name + SPACE, "{").concat( // from Immutable collection of entries or from ECMAScript object val._iter || val._object ? printIteratorEntries(val.entries(), config, indentation, depth, refs, printer) : LAZY, "}"); } return "".concat(name + SPACE, "[").concat(val._iter || val._array || val._collection || val._iterable ? printIteratorValues(val.values(), config, indentation, depth, refs, printer) : LAZY, "]"); } function printImmutableValues(val, config, indentation, depth, refs, printer, type) { return ++depth > config.maxDepth ? printAsLeaf(getImmutableName(type)) : "".concat(getImmutableName(type) + SPACE, "[").concat(printIteratorValues(val.values(), config, indentation, depth, refs, printer), "]"); } var serialize$2 = function serialize$2(val, config, indentation, depth, refs, printer) { if (val[IS_MAP_SENTINEL]) { return printImmutableEntries(val, config, indentation, depth, refs, printer, val[IS_ORDERED_SENTINEL$1] ? "OrderedMap" : "Map"); } if (val[IS_LIST_SENTINEL$1]) { return printImmutableValues(val, config, indentation, depth, refs, printer, "List"); } if (val[IS_SET_SENTINEL$1]) { return printImmutableValues(val, config, indentation, depth, refs, printer, val[IS_ORDERED_SENTINEL$1] ? "OrderedSet" : "Set"); } if (val[IS_STACK_SENTINEL]) { return printImmutableValues(val, config, indentation, depth, refs, printer, "Stack"); } if (val[IS_SEQ_SENTINEL]) { return printImmutableSeq(val, config, indentation, depth, refs, printer); } return printImmutableRecord(val, config, indentation, depth, refs, printer); }; var test$2 = function test$2(val) { return val && (val[IS_ITERABLE_SENTINEL] === true || val[IS_RECORD_SENTINEL] === true); }; var plugin$2 = { serialize: serialize$2, test: test$2 }; var reactIs = { exports: {} }; var reactIs_production_min = {}; /** * @license React * react-is.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var hasRequiredReactIs_production_min; function requireReactIs_production_min() { if (hasRequiredReactIs_production_min) return reactIs_production_min; hasRequiredReactIs_production_min = 1; var b = Symbol["for"]("react.element"), c = Symbol["for"]("react.portal"), d = Symbol["for"]("react.fragment"), e = Symbol["for"]("react.strict_mode"), f = Symbol["for"]("react.profiler"), g = Symbol["for"]("react.provider"), h = Symbol["for"]("react.context"), k = Symbol["for"]("react.server_context"), l = Symbol["for"]("react.forward_ref"), m = Symbol["for"]("react.suspense"), n = Symbol["for"]("react.suspense_list"), p = Symbol["for"]("react.memo"), q = Symbol["for"]("react.lazy"), t = Symbol["for"]("react.offscreen"), u; u = Symbol["for"]("react.module.reference"); function v(a) { if ("object" === _typeof(a) && null !== a) { var r = a.$$typeof; switch (r) { case b: switch (a = a.type, a) { case d: case f: case e: case m: case n: return a; default: switch (a = a && a.$$typeof, a) { case k: case h: case l: case q: case p: case g: return a; default: return r; } } case c: return r; } } } reactIs_production_min.ContextConsumer = h; reactIs_production_min.ContextProvider = g; reactIs_production_min.Element = b; reactIs_production_min.ForwardRef = l; reactIs_production_min.Fragment = d; reactIs_production_min.Lazy = q; reactIs_production_min.Memo = p; reactIs_production_min.Portal = c; reactIs_production_min.Profiler = f; reactIs_production_min.StrictMode = e; reactIs_production_min.Suspense = m; reactIs_production_min.SuspenseList = n; reactIs_production_min.isAsyncMode = function () { return !1; }; reactIs_production_min.isConcurrentMode = function () { return !1; }; reactIs_production_min.isContextConsumer = function (a) { return v(a) === h; }; reactIs_production_min.isContextProvider = function (a) { return v(a) === g; }; reactIs_production_min.isElement = function (a) { return "object" === _typeof(a) && null !== a && a.$$typeof === b; }; reactIs_production_min.isForwardRef = function (a) { return v(a) === l; }; reactIs_production_min.isFragment = function (a) { return v(a) === d; }; reactIs_production_min.isLazy = function (a) { return v(a) === q; }; reactIs_production_min.isMemo = function (a) { return v(a) === p; }; reactIs_production_min.isPortal = function (a) { return v(a) === c; }; reactIs_production_min.isProfiler = function (a) { return v(a) === f; }; reactIs_production_min.isStrictMode = function (a) { return v(a) === e; }; reactIs_production_min.isSuspense = function (a) { return v(a) === m; }; reactIs_production_min.isSuspenseList = function (a) { return v(a) === n; }; reactIs_production_min.isValidElementType = function (a) { return "string" === typeof a || "function" === typeof a || a === d || a === f || a === e || a === m || a === n || a === t || "object" === _typeof(a) && null !== a && (a.$$typeof === q || a.$$typeof === p || a.$$typeof === g || a.$$typeof === h || a.$$typeof === l || a.$$typeof === u || void 0 !== a.getModuleId) ? !0 : !1; }; reactIs_production_min.typeOf = v; return reactIs_production_min; } var hasRequiredReactIs; function requireReactIs() { if (hasRequiredReactIs) return reactIs.exports; hasRequiredReactIs = 1; { reactIs.exports = requireReactIs_production_min(); } return reactIs.exports; } var reactIsExports = requireReactIs(); function getChildren(arg) { var children = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; if (Array.isArray(arg)) { var _iterator2 = _createForOfIteratorHelper$6(arg), _step2; try { for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) { var item = _step2.value; getChildren(item, children); } } catch (err) { _iterator2.e(err); } finally { _iterator2.f(); } } else if (arg != null && arg !== false && arg !== "") { children.push(arg); } return children; } function getType$2(element) { var type = element.type; if (typeof type === "string") { return type; } if (typeof type === "function") { return type.displayName || type.name || "Unknown"; } if (reactIsExports.isFragment(element)) { return "React.Fragment"; } if (reactIsExports.isSuspense(element)) { return "React.Suspense"; } if (_typeof(type) === "object" && type !== null) { if (reactIsExports.isContextProvider(element)) { return "Context.Provider"; } if (reactIsExports.isContextConsumer(element)) { return "Context.Consumer"; } if (reactIsExports.isForwardRef(element)) { if (type.displayName) { return type.displayName; } var functionName = type.render.displayName || type.render.name || ""; return functionName === "" ? "ForwardRef" : "ForwardRef(".concat(functionName, ")"); } if (reactIsExports.isMemo(element)) { var _functionName = type.displayName || type.type.displayName || type.type.name || ""; return _functionName === "" ? "Memo" : "Memo(".concat(_functionName, ")"); } } return "UNDEFINED"; } function getPropKeys$1(element) { var props = element.props; return Object.keys(props).filter(function (key) { return key !== "children" && props[key] !== void 0; }).sort(); } var serialize$1$1 = function serialize$1(element, config, indentation, depth, refs, printer) { return ++depth > config.maxDepth ? printElementAsLeaf(getType$2(element), config) : printElement(getType$2(element), printProps(getPropKeys$1(element), element.props, config, indentation + config.indent, depth, refs, printer), printChildren(getChildren(element.props.children), config, indentation + config.indent, depth, refs, printer), config, indentation); }; var test$1$1 = function test$1(val) { return val != null && reactIsExports.isElement(val); }; var plugin$1 = { serialize: serialize$1$1, test: test$1$1 }; var testSymbol = typeof Symbol === "function" && Symbol["for"] ? Symbol["for"]("react.test.json") : 245830487; function getPropKeys(object) { var props = object.props; return props ? Object.keys(props).filter(function (key) { return props[key] !== void 0; }).sort() : []; } var serialize$6 = function serialize(object, config, indentation, depth, refs, printer) { return ++depth > config.maxDepth ? printElementAsLeaf(object.type, config) : printElement(object.type, object.props ? printProps(getPropKeys(object), object.props, config, indentation + config.indent, depth, refs, printer) : "", object.children ? printChildren(object.children, config, indentation + config.indent, depth, refs, printer) : "", config, indentation); }; var test$6 = function test(val) { return val && val.$$typeof === testSymbol; }; var plugin$6 = { serialize: serialize$6, test: test$6 }; var toString$2 = Object.prototype.toString; var toISOString = Date.prototype.toISOString; var errorToString = Error.prototype.toString; var regExpToString = RegExp.prototype.toString; function getConstructorName(val) { return typeof val.constructor === "function" && val.constructor.name || "Object"; } function isWindow(val) { return typeof window !== "undefined" && val === window; } var SYMBOL_REGEXP = /^Symbol\((.*)\)(.*)$/; var NEWLINE_REGEXP = /\n/g; var PrettyFormatPluginError = /*#__PURE__*/function (_Error) { function PrettyFormatPluginError(message, stack) { var _this; _classCallCheck(this, PrettyFormatPluginError); _this = _callSuper$4(this, PrettyFormatPluginError, [message]); _this.stack = stack; _this.name = _this.constructor.name; return _this; } _inherits(PrettyFormatPluginError, _Error); return _createClass(PrettyFormatPluginError); }(/*#__PURE__*/_wrapNativeSuper(Error)); function isToStringedArrayType(toStringed) { return toStringed === "[object Array]" || toStringed === "[object ArrayBuffer]" || toStringed === "[object DataView]" || toStringed === "[object Float32Array]" || toStringed === "[object Float64Array]" || toStringed === "[object Int8Array]" || toStringed === "[object Int16Array]" || toStringed === "[object Int32Array]" || toStringed === "[object Uint8Array]" || toStringed === "[object Uint8ClampedArray]" || toStringed === "[object Uint16Array]" || toStringed === "[object Uint32Array]"; } function printNumber(val) { return Object.is(val, -0) ? "-0" : String(val); } function printBigInt(val) { return String("".concat(val, "n")); } function printFunction(val, printFunctionName) { if (!printFunctionName) { return "[Function]"; } return "[Function ".concat(val.name || "anonymous", "]"); } function printSymbol(val) { return String(val).replace(SYMBOL_REGEXP, "Symbol($1)"); } function printError(val) { return "[".concat(errorToString.call(val), "]"); } function printBasicValue(val, printFunctionName, escapeRegex, escapeString) { if (val === true || val === false) { return "".concat(val); } if (val === void 0) { return "undefined"; } if (val === null) { return "null"; } var typeOf = _typeof(val); if (typeOf === "number") { return printNumber(val); } if (typeOf === "bigint") { return printBigInt(val); } if (typeOf === "string") { if (escapeString) { return "\"".concat(val.replaceAll(/"|\\/g, "\\$&"), "\""); } return "\"".concat(val, "\""); } if (typeOf === "function") { return printFunction(val, printFunctionName); } if (typeOf === "symbol") { return printSymbol(val); } var toStringed = toString$2.call(val); if (toStringed === "[object WeakMap]") { return "WeakMap {}"; } if (toStringed === "[object WeakSet]") { return "WeakSet {}"; } if (toStringed === "[object Function]" || toStringed === "[object GeneratorFunction]") { return printFunction(val, printFunctionName); } if (toStringed === "[object Symbol]") { return printSymbol(val); } if (toStringed === "[object Date]") { return Number.isNaN(+val) ? "Date { NaN }" : toISOString.call(val); } if (toStringed === "[object Error]") { return printError(val); } if (toStringed === "[object RegExp]") { if (escapeRegex) { return regExpToString.call(val).replaceAll(/[$()*+.?[\\\]^{|}]/g, "\\$&"); } return regExpToString.call(val); } if (val instanceof Error) { return printError(val); } return null; } function printComplexValue(val, config, indentation, depth, refs, hasCalledToJSON) { if (refs.includes(val)) { return "[Circular]"; } refs = _toConsumableArray(refs); refs.push(val); var hitMaxDepth = ++depth > config.maxDepth; var min = config.min; if (config.callToJSON && !hitMaxDepth && val.toJSON && typeof val.toJSON === "function" && !hasCalledToJSON) { return printer(val.toJSON(), config, indentation, depth, refs, true); } var toStringed = toString$2.call(val); if (toStringed === "[object Arguments]") { return hitMaxDepth ? "[Arguments]" : "".concat(min ? "" : "Arguments ", "[").concat(printListItems(val, config, indentation, depth, refs, printer), "]"); } if (isToStringedArrayType(toStringed)) { return hitMaxDepth ? "[".concat(val.constructor.name, "]") : "".concat(min ? "" : !config.printBasicPrototype && val.constructor.name === "Array" ? "" : "".concat(val.constructor.name, " "), "[").concat(printListItems(val, config, indentation, depth, refs, printer), "]"); } if (toStringed === "[object Map]") { return hitMaxDepth ? "[Map]" : "Map {".concat(printIteratorEntries(val.entries(), config, indentation, depth, refs, printer, " => "), "}"); } if (toStringed === "[object Set]") { return hitMaxDepth ? "[Set]" : "Set {".concat(printIteratorValues(val.values(), config, indentation, depth, refs, printer), "}"); } return hitMaxDepth || isWindow(val) ? "[".concat(getConstructorName(val), "]") : "".concat(min ? "" : !config.printBasicPrototype && getConstructorName(val) === "Object" ? "" : "".concat(getConstructorName(val), " "), "{").concat(printObjectProperties(val, config, indentation, depth, refs, printer), "}"); } function isNewPlugin(plugin) { return plugin.serialize != null; } function printPlugin(plugin, val, config, indentation, depth, refs) { var printed; try { printed = isNewPlugin(plugin) ? plugin.serialize(val, config, indentation, depth, refs, printer) : plugin.print(val, function (valChild) { return printer(valChild, config, indentation, depth, refs); }, function (str) { var indentationNext = indentation + config.indent; return indentationNext + str.replaceAll(NEWLINE_REGEXP, "\n".concat(indentationNext)); }, { edgeSpacing: config.spacingOuter, min: config.min, spacing: config.spacingInner }, config.colors); } catch (error) { throw new PrettyFormatPluginError(error.message, error.stack); } if (typeof printed !== "string") { throw new TypeError("pretty-format: Plugin must return type \"string\" but instead returned \"".concat(_typeof(printed), "\".")); } return printed; } function findPlugin(plugins2, val) { var _iterator3 = _createForOfIteratorHelper$6(plugins2), _step3; try { for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) { var _plugin = _step3.value; try { if (_plugin.test(val)) { return _plugin; } } catch (error) { throw new PrettyFormatPluginError(error.message, error.stack); } } } catch (err) { _iterator3.e(err); } finally { _iterator3.f(); } return null; } function printer(val, config, indentation, depth, refs, hasCalledToJSON) { var plugin = findPlugin(config.plugins, val); if (plugin !== null) { return printPlugin(plugin, val, config, indentation, depth, refs); } var basicResult = printBasicValue(val, config.printFunctionName, config.escapeRegex, config.escapeString); if (basicResult !== null) { return basicResult; } return printComplexValue(val, config, indentation, depth, refs, hasCalledToJSON); } var DEFAULT_THEME = { comment: "gray", content: "reset", prop: "yellow", tag: "cyan", value: "green" }; var DEFAULT_THEME_KEYS = Object.keys(DEFAULT_THEME); var DEFAULT_OPTIONS = { callToJSON: true, compareKeys: void 0, escapeRegex: false, escapeString: true, highlight: false, indent: 2, maxDepth: Number.POSITIVE_INFINITY, maxWidth: Number.POSITIVE_INFINITY, min: false, plugins: [], printBasicPrototype: true, printFunctionName: true, theme: DEFAULT_THEME }; function validateOptions(options) { for (var _i = 0, _Object$keys = Object.keys(options); _i < _Object$keys.length; _i++) { var key = _Object$keys[_i]; if (!Object.prototype.hasOwnProperty.call(DEFAULT_OPTIONS, key)) { throw new Error("pretty-format: Unknown option \"".concat(key, "\".")); } } if (options.min && options.indent !== void 0 && options.indent !== 0) { throw new Error('pretty-format: Options "min" and "indent" cannot be used together.'); } } function getColorsHighlight() { return DEFAULT_THEME_KEYS.reduce(function (colors, key) { var value = DEFAULT_THEME[key]; var color = value && f$2[value]; if (color && typeof color.close === "string" && typeof color.open === "string") { colors[key] = color; } else { throw new Error("pretty-format: Option \"theme\" has a key \"".concat(key, "\" whose value \"").concat(value, "\" is undefined in ansi-styles.")); } return colors; }, /* @__PURE__ */Object.create(null)); } function getColorsEmpty() { return DEFAULT_THEME_KEYS.reduce(function (colors, key) { colors[key] = { close: "", open: "" }; return colors; }, /* @__PURE__ */Object.create(null)); } function getPrintFunctionName(options) { var _ref; return (_ref = options == null ? void 0 : options.printFunctionName) !== null && _ref !== void 0 ? _ref : DEFAULT_OPTIONS.printFunctionName; } function getEscapeRegex(options) { var _ref2; return (_ref2 = options == null ? void 0 : options.escapeRegex) !== null && _ref2 !== void 0 ? _ref2 : DEFAULT_OPTIONS.escapeRegex; } function getEscapeString(options) { var _ref3; return (_ref3 = options == null ? void 0 : options.escapeString) !== null && _ref3 !== void 0 ? _ref3 : DEFAULT_OPTIONS.escapeString; } function getConfig(options) { var _ref4, _ref5, _ref6, _ref7, _ref8, _ref9, _ref0; return { callToJSON: (_ref4 = options == null ? void 0 : options.callToJSON) !== null && _ref4 !== void 0 ? _ref4 : DEFAULT_OPTIONS.callToJSON, colors: (options == null ? void 0 : options.highlight) ? getColorsHighlight() : getColorsEmpty(), compareKeys: typeof (options == null ? void 0 : options.compareKeys) === "function" || (options == null ? void 0 : options.compareKeys) === null ? options.compareKeys : DEFAULT_OPTIONS.compareKeys, escapeRegex: getEscapeRegex(options), escapeString: getEscapeString(options), indent: (options == null ? void 0 : options.min) ? "" : createIndent((_ref5 = options == null ? void 0 : options.indent) !== null && _ref5 !== void 0 ? _ref5 : DEFAULT_OPTIONS.indent), maxDepth: (_ref6 = options == null ? void 0 : options.maxDepth) !== null && _ref6 !== void 0 ? _ref6 : DEFAULT_OPTIONS.maxDepth, maxWidth: (_ref7 = options == null ? void 0 : options.maxWidth) !== null && _ref7 !== void 0 ? _ref7 : DEFAULT_OPTIONS.maxWidth, min: (_ref8 = options == null ? void 0 : options.min) !== null && _ref8 !== void 0 ? _ref8 : DEFAULT_OPTIONS.min, plugins: (_ref9 = options == null ? void 0 : options.plugins) !== null && _ref9 !== void 0 ? _ref9 : DEFAULT_OPTIONS.plugins, printBasicPrototype: (_ref0 = options == null ? void 0 : options.printBasicPrototype) !== null && _ref0 !== void 0 ? _ref0 : true, printFunctionName: getPrintFunctionName(options), spacingInner: (options == null ? void 0 : options.min) ? " " : "\n", spacingOuter: (options == null ? void 0 : options.min) ? "" : "\n" }; } function createIndent(indent) { return Array.from({ length: indent + 1 }).join(" "); } function format$1(val, options) { if (options) { validateOptions(options); if (options.plugins) { var _plugin2 = findPlugin(options.plugins, val); if (_plugin2 !== null) { return printPlugin(_plugin2, val, getConfig(options), "", 0, []); } } } var basicResult = printBasicValue(val, getPrintFunctionName(options), getEscapeRegex(options), getEscapeString(options)); if (basicResult !== null) { return basicResult; } return printComplexValue(val, getConfig(options), "", 0, []); } var plugins = { AsymmetricMatcher: plugin$5, DOMCollection: plugin$4, DOMElement: plugin$3, Immutable: plugin$2, ReactElement: plugin$1, ReactTestComponent: plugin$6 }; var ansiColors$1 = { bold: ['1', '22'], dim: ['2', '22'], italic: ['3', '23'], underline: ['4', '24'], // 5 & 6 are blinking inverse: ['7', '27'], hidden: ['8', '28'], strike: ['9', '29'], // 10-20 are fonts // 21-29 are resets for 1-9 black: ['30', '39'], red: ['31', '39'], green: ['32', '39'], yellow: ['33', '39'], blue: ['34', '39'], magenta: ['35', '39'], cyan: ['36', '39'], white: ['37', '39'], brightblack: ['30;1', '39'], brightred: ['31;1', '39'], brightgreen: ['32;1', '39'], brightyellow: ['33;1', '39'], brightblue: ['34;1', '39'], brightmagenta: ['35;1', '39'], brightcyan: ['36;1', '39'], brightwhite: ['37;1', '39'], grey: ['90', '39'] }; var styles$1 = { special: 'cyan', number: 'yellow', bigint: 'yellow', "boolean": 'yellow', undefined: 'grey', "null": 'bold', string: 'green', symbol: 'green', date: 'magenta', regexp: 'red' }; var truncator$1 = '…'; function colorise$1(value, styleType) { var color = ansiColors$1[styles$1[styleType]] || ansiColors$1[styleType] || ''; if (!color) { return String(value); } return "\x1B[".concat(color[0], "m").concat(String(value), "\x1B[").concat(color[1], "m"); } function normaliseOptions$1() { var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, _ref$showHidden = _ref.showHidden, showHidden = _ref$showHidden === void 0 ? false : _ref$showHidden, _ref$depth = _ref.depth, depth = _ref$depth === void 0 ? 2 : _ref$depth, _ref$colors = _ref.colors, colors = _ref$colors === void 0 ? false : _ref$colors, _ref$customInspect = _ref.customInspect, customInspect = _ref$customInspect === void 0 ? true : _ref$customInspect, _ref$showProxy = _ref.showProxy, showProxy = _ref$showProxy === void 0 ? false : _ref$showProxy, _ref$maxArrayLength = _ref.maxArrayLength, maxArrayLength = _ref$maxArrayLength === void 0 ? Infinity : _ref$maxArrayLength, _ref$breakLength = _ref.breakLength, breakLength = _ref$breakLength === void 0 ? Infinity : _ref$breakLength, _ref$seen = _ref.seen, seen = _ref$seen === void 0 ? [] : _ref$seen, _ref$truncate = _ref.truncate, truncate = _ref$truncate === void 0 ? Infinity : _ref$truncate, _ref$stylize = _ref.stylize, stylize = _ref$stylize === void 0 ? String : _ref$stylize; var inspect = arguments.length > 1 ? arguments[1] : undefined; var options = { showHidden: Boolean(showHidden), depth: Number(depth), colors: Boolean(colors), customInspect: Boolean(customInspect), showProxy: Boolean(showProxy), maxArrayLength: Number(maxArrayLength), breakLength: Number(breakLength), truncate: Number(truncate), seen: seen, inspect: inspect, stylize: stylize }; if (options.colors) { options.stylize = colorise$1; } return options; } function isHighSurrogate$1(_char) { return _char >= "\uD800" && _char <= "\uDBFF"; } function truncate$1(string, length) { var tail = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : truncator$1; string = String(string); var tailLength = tail.length; var stringLength = string.length; if (tailLength > length && stringLength > tailLength) { return tail; } if (stringLength > length && stringLength > tailLength) { var end = length - tailLength; if (end > 0 && isHighSurrogate$1(string[end - 1])) { end = end - 1; } return "".concat(string.slice(0, end)).concat(tail); } return string; } // eslint-disable-next-line complexity function inspectList$1(list, options, inspectItem) { var separator = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : ', '; inspectItem = inspectItem || options.inspect; var size = list.length; if (size === 0) return ''; var originalLength = options.truncate; var output = ''; var peek = ''; var truncated = ''; for (var i = 0; i < size; i += 1) { var last = i + 1 === list.length; var secondToLast = i + 2 === list.length; truncated = "".concat(truncator$1, "(").concat(list.length - i, ")"); var value = list[i]; // If there is more than one remaining we need to account for a separator of `, ` options.truncate = originalLength - output.length - (last ? 0 : separator.length); var string = peek || inspectItem(value, options) + (last ? '' : separator); var nextLength = output.length + string.length; var truncatedLength = nextLength + truncated.length; // If this is the last element, and adding it would // take us over length, but adding the truncator wouldn't - then break now if (last && nextLength > originalLength && output.length + truncated.length <= originalLength) { break; } // If this isn't the last or second to last element to scan, // but the string is already over length then break here if (!last && !secondToLast && truncatedLength > originalLength) { break; } // Peek at the next string to determine if we should // break early before adding this item to the output peek = last ? '' : inspectItem(list[i + 1], options) + (secondToLast ? '' : separator); // If we have one element left, but this element and // the next takes over length, the break early if (!last && secondToLast && truncatedLength > originalLength && nextLength + peek.length > originalLength) { break; } output += string; // If the next element takes us to length - // but there are more after that, then we should truncate now if (!last && !secondToLast && nextLength + peek.length >= originalLength) { truncated = "".concat(truncator$1, "(").concat(list.length - i - 1, ")"); break; } truncated = ''; } return "".concat(output).concat(truncated); } function quoteComplexKey$1(key) { if (key.match(/^[a-zA-Z_][a-zA-Z_0-9]*$/)) { return key; } return JSON.stringify(key).replace(/'/g, "\\'").replace(/\\"/g, '"').replace(/(^"|"$)/g, "'"); } function inspectProperty$1(_ref2, options) { var _ref3 = _slicedToArray(_ref2, 2), key = _ref3[0], value = _ref3[1]; options.truncate -= 2; if (typeof key === 'string') { key = quoteComplexKey$1(key); } else if (typeof key !== 'number') { key = "[".concat(options.inspect(key, options), "]"); } options.truncate -= key.length; value = options.inspect(value, options); return "".concat(key, ": ").concat(value); } function inspectArray$1(array, options) { // Object.keys will always output the Array indices first, so we can slice by // `array.length` to get non-index properties var nonIndexProperties = Object.keys(array).slice(array.length); if (!array.length && !nonIndexProperties.length) return '[]'; options.truncate -= 4; var listContents = inspectList$1(array, options); options.truncate -= listContents.length; var propertyContents = ''; if (nonIndexProperties.length) { propertyContents = inspectList$1(nonIndexProperties.map(function (key) { return [key, array[key]]; }), options, inspectProperty$1); } return "[ ".concat(listContents).concat(propertyContents ? ", ".concat(propertyContents) : '', " ]"); } var getArrayName$1 = function getArrayName(array) { // We need to special case Node.js' Buffers, which report to be Uint8Array // @ts-ignore if (typeof Buffer === 'function' && array instanceof Buffer) { return 'Buffer'; } if (array[Symbol.toStringTag]) { return array[Symbol.toStringTag]; } return array.constructor.name; }; function inspectType