UNPKG

@shopify/create-app

Version:

A CLI tool to create a new Shopify app.

1,057 lines (1,050 loc) • 1.57 MB
import { require_ansi_styles, require_brace_expansion, require_lib, require_semver, require_source_map } from "./chunk-H3GWNOGA.js"; import { require_has_flag } from "./chunk-UMUTXITN.js"; import { cwd, delimiter, dirname, joinPath, normalizePath, relativizePath, sniffForPath } from "./chunk-Y2JP6WFP.js"; import { require_graceful_fs } from "./chunk-75LV6AQS.js"; import { __commonJS, __esm, __export, __require, __toCommonJS, __toESM, init_cjs_shims } from "./chunk-PKR7KJ6P.js"; // ../../node_modules/.pnpm/node-abort-controller@3.1.1/node_modules/node-abort-controller/index.js var require_node_abort_controller = __commonJS({ "../../node_modules/.pnpm/node-abort-controller@3.1.1/node_modules/node-abort-controller/index.js"(exports, module) { init_cjs_shims(); var { EventEmitter: EventEmitter4 } = __require("events"), AbortSignal2 = class { constructor() { this.eventEmitter = new EventEmitter4(), this.onabort = null, this.aborted = !1, this.reason = void 0; } toString() { return "[object AbortSignal]"; } get [Symbol.toStringTag]() { return "AbortSignal"; } removeEventListener(name, handler2) { this.eventEmitter.removeListener(name, handler2); } addEventListener(name, handler2) { this.eventEmitter.on(name, handler2); } dispatchEvent(type) { let event = { type, target: this }, handlerName = `on${type}`; typeof this[handlerName] == "function" && this[handlerName](event), this.eventEmitter.emit(type, event); } throwIfAborted() { if (this.aborted) throw this.reason; } static abort(reason) { let controller = new AbortController2(); return controller.abort(), controller.signal; } static timeout(time) { let controller = new AbortController2(); return setTimeout(() => controller.abort(new Error("TimeoutError")), time), controller.signal; } }, AbortController2 = class { constructor() { this.signal = new AbortSignal2(); } abort(reason) { this.signal.aborted || (this.signal.aborted = !0, reason ? this.signal.reason = reason : this.signal.reason = new Error("AbortError"), this.signal.dispatchEvent("abort")); } toString() { return "[object AbortController]"; } get [Symbol.toStringTag]() { return "AbortController"; } }; module.exports = { AbortController: AbortController2, AbortSignal: AbortSignal2 }; } }); // ../../node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react.production.min.js var require_react_production_min = __commonJS({ "../../node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react.production.min.js"(exports) { "use strict"; init_cjs_shims(); var l = Symbol.for("react.element"), n = Symbol.for("react.portal"), p = Symbol.for("react.fragment"), q = Symbol.for("react.strict_mode"), r = Symbol.for("react.profiler"), t = Symbol.for("react.provider"), u = Symbol.for("react.context"), v = Symbol.for("react.forward_ref"), w = Symbol.for("react.suspense"), x = Symbol.for("react.memo"), y = Symbol.for("react.lazy"), z = Symbol.iterator; function A(a) { return a === null || typeof a != "object" ? null : (a = z && a[z] || a["@@iterator"], typeof a == "function" ? a : null); } var B = { isMounted: function() { return !1; }, enqueueForceUpdate: function() { }, enqueueReplaceState: function() { }, enqueueSetState: function() { } }, C = Object.assign, D = {}; function E2(a, b, e) { this.props = a, this.context = b, this.refs = D, this.updater = e || B; } E2.prototype.isReactComponent = {}; E2.prototype.setState = function(a, b) { if (typeof a != "object" && typeof a != "function" && a != null) throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables."); this.updater.enqueueSetState(this, a, b, "setState"); }; E2.prototype.forceUpdate = function(a) { this.updater.enqueueForceUpdate(this, a, "forceUpdate"); }; function F() { } F.prototype = E2.prototype; function G(a, b, e) { this.props = a, this.context = b, this.refs = D, this.updater = e || B; } var H = G.prototype = new F(); H.constructor = G; C(H, E2.prototype); H.isPureReactComponent = !0; var I = Array.isArray, J = Object.prototype.hasOwnProperty, K = { current: null }, L = { key: !0, ref: !0, __self: !0, __source: !0 }; function M(a, b, e) { var d, c = {}, k = null, h = null; if (b != null) for (d in b.ref !== void 0 && (h = b.ref), b.key !== void 0 && (k = "" + b.key), b) J.call(b, d) && !L.hasOwnProperty(d) && (c[d] = b[d]); var g = arguments.length - 2; if (g === 1) c.children = e; else if (1 < g) { for (var f = Array(g), m = 0; m < g; m++) f[m] = arguments[m + 2]; c.children = f; } if (a && a.defaultProps) for (d in g = a.defaultProps, g) c[d] === void 0 && (c[d] = g[d]); return { $$typeof: l, type: a, key: k, ref: h, props: c, _owner: K.current }; } function N(a, b) { return { $$typeof: l, type: a.type, key: b, ref: a.ref, props: a.props, _owner: a._owner }; } function O(a) { return typeof a == "object" && a !== null && a.$$typeof === l; } function escape3(a) { var b = { "=": "=0", ":": "=2" }; return "$" + a.replace(/[=:]/g, function(a2) { return b[a2]; }); } var P = /\/+/g; function Q(a, b) { return typeof a == "object" && a !== null && a.key != null ? escape3("" + a.key) : b.toString(36); } function R(a, b, e, d, c) { var k = typeof a; (k === "undefined" || k === "boolean") && (a = null); var h = !1; if (a === null) h = !0; else switch (k) { case "string": case "number": h = !0; break; case "object": switch (a.$$typeof) { case l: case n: h = !0; } } if (h) return h = a, c = c(h), a = d === "" ? "." + Q(h, 0) : d, I(c) ? (e = "", a != null && (e = a.replace(P, "$&/") + "/"), R(c, b, e, "", function(a2) { return a2; })) : c != null && (O(c) && (c = N(c, e + (!c.key || h && h.key === c.key ? "" : ("" + c.key).replace(P, "$&/") + "/") + a)), b.push(c)), 1; if (h = 0, d = d === "" ? "." : d + ":", I(a)) for (var g = 0; g < a.length; g++) { k = a[g]; var f = d + Q(k, g); h += R(k, b, e, f, c); } else if (f = A(a), typeof f == "function") for (a = f.call(a), g = 0; !(k = a.next()).done; ) k = k.value, f = d + Q(k, g++), h += R(k, b, e, f, c); else if (k === "object") throw b = String(a), Error("Objects are not valid as a React child (found: " + (b === "[object Object]" ? "object with keys {" + Object.keys(a).join(", ") + "}" : b) + "). If you meant to render a collection of children, use an array instead."); return h; } function S(a, b, e) { if (a == null) return a; var d = [], c = 0; return R(a, d, "", "", function(a2) { return b.call(e, a2, c++); }), d; } function T(a) { if (a._status === -1) { var b = a._result; b = b(), b.then(function(b2) { (a._status === 0 || a._status === -1) && (a._status = 1, a._result = b2); }, function(b2) { (a._status === 0 || a._status === -1) && (a._status = 2, a._result = b2); }), a._status === -1 && (a._status = 0, a._result = b); } if (a._status === 1) return a._result.default; throw a._result; } var U = { current: null }, V = { transition: null }, W = { ReactCurrentDispatcher: U, ReactCurrentBatchConfig: V, ReactCurrentOwner: K }; function X() { throw Error("act(...) is not supported in production builds of React."); } exports.Children = { map: S, forEach: function(a, b, e) { S(a, function() { b.apply(this, arguments); }, e); }, count: function(a) { var b = 0; return S(a, function() { b++; }), b; }, toArray: function(a) { return S(a, function(a2) { return a2; }) || []; }, only: function(a) { if (!O(a)) throw Error("React.Children.only expected to receive a single React element child."); return a; } }; exports.Component = E2; exports.Fragment = p; exports.Profiler = r; exports.PureComponent = G; exports.StrictMode = q; exports.Suspense = w; exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = W; exports.act = X; exports.cloneElement = function(a, b, e) { if (a == null) throw Error("React.cloneElement(...): The argument must be a React element, but you passed " + a + "."); var d = C({}, a.props), c = a.key, k = a.ref, h = a._owner; if (b != null) { if (b.ref !== void 0 && (k = b.ref, h = K.current), b.key !== void 0 && (c = "" + b.key), a.type && a.type.defaultProps) var g = a.type.defaultProps; for (f in b) J.call(b, f) && !L.hasOwnProperty(f) && (d[f] = b[f] === void 0 && g !== void 0 ? g[f] : b[f]); } var f = arguments.length - 2; if (f === 1) d.children = e; else if (1 < f) { g = Array(f); for (var m = 0; m < f; m++) g[m] = arguments[m + 2]; d.children = g; } return { $$typeof: l, type: a.type, key: c, ref: k, props: d, _owner: h }; }; exports.createContext = function(a) { return a = { $$typeof: u, _currentValue: a, _currentValue2: a, _threadCount: 0, Provider: null, Consumer: null, _defaultValue: null, _globalName: null }, a.Provider = { $$typeof: t, _context: a }, a.Consumer = a; }; exports.createElement = M; exports.createFactory = function(a) { var b = M.bind(null, a); return b.type = a, b; }; exports.createRef = function() { return { current: null }; }; exports.forwardRef = function(a) { return { $$typeof: v, render: a }; }; exports.isValidElement = O; exports.lazy = function(a) { return { $$typeof: y, _payload: { _status: -1, _result: a }, _init: T }; }; exports.memo = function(a, b) { return { $$typeof: x, type: a, compare: b === void 0 ? null : b }; }; exports.startTransition = function(a) { var b = V.transition; V.transition = {}; try { a(); } finally { V.transition = b; } }; exports.unstable_act = X; exports.useCallback = function(a, b) { return U.current.useCallback(a, b); }; exports.useContext = function(a) { return U.current.useContext(a); }; exports.useDebugValue = function() { }; exports.useDeferredValue = function(a) { return U.current.useDeferredValue(a); }; exports.useEffect = function(a, b) { return U.current.useEffect(a, b); }; exports.useId = function() { return U.current.useId(); }; exports.useImperativeHandle = function(a, b, e) { return U.current.useImperativeHandle(a, b, e); }; exports.useInsertionEffect = function(a, b) { return U.current.useInsertionEffect(a, b); }; exports.useLayoutEffect = function(a, b) { return U.current.useLayoutEffect(a, b); }; exports.useMemo = function(a, b) { return U.current.useMemo(a, b); }; exports.useReducer = function(a, b, e) { return U.current.useReducer(a, b, e); }; exports.useRef = function(a) { return U.current.useRef(a); }; exports.useState = function(a) { return U.current.useState(a); }; exports.useSyncExternalStore = function(a, b, e) { return U.current.useSyncExternalStore(a, b, e); }; exports.useTransition = function() { return U.current.useTransition(); }; exports.version = "18.3.1"; } }); // ../../node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react.development.js var require_react_development = __commonJS({ "../../node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react.development.js"(exports, module) { "use strict"; init_cjs_shims(); process.env.NODE_ENV !== "production" && function() { "use strict"; typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error()); var ReactVersion = "18.3.1", REACT_ELEMENT_TYPE = Symbol.for("react.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler"), REACT_PROVIDER_TYPE = Symbol.for("react.provider"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy"), REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen"), MAYBE_ITERATOR_SYMBOL = Symbol.iterator, FAUX_ITERATOR_SYMBOL = "@@iterator"; function getIteratorFn(maybeIterable) { if (maybeIterable === null || typeof maybeIterable != "object") return null; var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]; return typeof maybeIterator == "function" ? maybeIterator : null; } var ReactCurrentDispatcher = { /** * @internal * @type {ReactComponent} */ current: null }, ReactCurrentBatchConfig = { transition: null }, ReactCurrentActQueue = { current: null, // Used to reproduce behavior of `batchedUpdates` in legacy mode. isBatchingLegacy: !1, didScheduleLegacyUpdate: !1 }, ReactCurrentOwner = { /** * @internal * @type {ReactComponent} */ current: null }, ReactDebugCurrentFrame = {}, currentExtraStackFrame = null; function setExtraStackFrame(stack) { currentExtraStackFrame = stack; } ReactDebugCurrentFrame.setExtraStackFrame = function(stack) { currentExtraStackFrame = stack; }, ReactDebugCurrentFrame.getCurrentStack = null, ReactDebugCurrentFrame.getStackAddendum = function() { var stack = ""; currentExtraStackFrame && (stack += currentExtraStackFrame); var impl = ReactDebugCurrentFrame.getCurrentStack; return impl && (stack += impl() || ""), stack; }; var enableScopeAPI = !1, enableCacheElement = !1, enableTransitionTracing = !1, enableLegacyHidden = !1, enableDebugTracing = !1, ReactSharedInternals = { ReactCurrentDispatcher, ReactCurrentBatchConfig, ReactCurrentOwner }; ReactSharedInternals.ReactDebugCurrentFrame = ReactDebugCurrentFrame, ReactSharedInternals.ReactCurrentActQueue = ReactCurrentActQueue; function warn(format) { { for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) args[_key - 1] = arguments[_key]; printWarning("warn", format, args); } } function error(format) { { for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) args[_key2 - 1] = arguments[_key2]; printWarning("error", format, args); } } function printWarning(level, format, args) { { var ReactDebugCurrentFrame2 = ReactSharedInternals.ReactDebugCurrentFrame, stack = ReactDebugCurrentFrame2.getStackAddendum(); stack !== "" && (format += "%s", args = args.concat([stack])); var argsWithFormat = args.map(function(item) { return String(item); }); argsWithFormat.unshift("Warning: " + format), Function.prototype.apply.call(console[level], console, argsWithFormat); } } var didWarnStateUpdateForUnmountedComponent = {}; function warnNoop(publicInstance, callerName) { { var _constructor = publicInstance.constructor, componentName = _constructor && (_constructor.displayName || _constructor.name) || "ReactClass", warningKey = componentName + "." + callerName; if (didWarnStateUpdateForUnmountedComponent[warningKey]) return; error("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.", callerName, componentName), didWarnStateUpdateForUnmountedComponent[warningKey] = !0; } } var ReactNoopUpdateQueue = { /** * Checks whether or not this composite component is mounted. * @param {ReactClass} publicInstance The instance we want to test. * @return {boolean} True if mounted, false otherwise. * @protected * @final */ isMounted: function(publicInstance) { return !1; }, /** * Forces an update. This should only be invoked when it is known with * certainty that we are **not** in a DOM transaction. * * You may want to call this when you know that some deeper aspect of the * component's state has changed but `setState` was not called. * * This will not invoke `shouldComponentUpdate`, but it will invoke * `componentWillUpdate` and `componentDidUpdate`. * * @param {ReactClass} publicInstance The instance that should rerender. * @param {?function} callback Called after component is updated. * @param {?string} callerName name of the calling function in the public API. * @internal */ enqueueForceUpdate: function(publicInstance, callback, callerName) { warnNoop(publicInstance, "forceUpdate"); }, /** * Replaces all of the state. Always use this or `setState` to mutate state. * You should treat `this.state` as immutable. * * There is no guarantee that `this.state` will be immediately updated, so * accessing `this.state` after calling this method may return the old value. * * @param {ReactClass} publicInstance The instance that should rerender. * @param {object} completeState Next state. * @param {?function} callback Called after component is updated. * @param {?string} callerName name of the calling function in the public API. * @internal */ enqueueReplaceState: function(publicInstance, completeState, callback, callerName) { warnNoop(publicInstance, "replaceState"); }, /** * Sets a subset of the state. This only exists because _pendingState is * internal. This provides a merging strategy that is not available to deep * properties which is confusing. TODO: Expose pendingState or don't use it * during the merge. * * @param {ReactClass} publicInstance The instance that should rerender. * @param {object} partialState Next partial state to be merged with state. * @param {?function} callback Called after component is updated. * @param {?string} Name of the calling function in the public API. * @internal */ enqueueSetState: function(publicInstance, partialState, callback, callerName) { warnNoop(publicInstance, "setState"); } }, assign = Object.assign, emptyObject = {}; Object.freeze(emptyObject); function Component(props, context, updater) { this.props = props, this.context = context, this.refs = emptyObject, this.updater = updater || ReactNoopUpdateQueue; } Component.prototype.isReactComponent = {}, Component.prototype.setState = function(partialState, callback) { if (typeof partialState != "object" && typeof partialState != "function" && partialState != null) throw new Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables."); this.updater.enqueueSetState(this, partialState, callback, "setState"); }, Component.prototype.forceUpdate = function(callback) { this.updater.enqueueForceUpdate(this, callback, "forceUpdate"); }; { var deprecatedAPIs = { isMounted: ["isMounted", "Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."], replaceState: ["replaceState", "Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."] }, defineDeprecationWarning = function(methodName, info) { Object.defineProperty(Component.prototype, methodName, { get: function() { warn("%s(...) is deprecated in plain JavaScript React classes. %s", info[0], info[1]); } }); }; for (var fnName in deprecatedAPIs) deprecatedAPIs.hasOwnProperty(fnName) && defineDeprecationWarning(fnName, deprecatedAPIs[fnName]); } function ComponentDummy() { } ComponentDummy.prototype = Component.prototype; function PureComponent2(props, context, updater) { this.props = props, this.context = context, this.refs = emptyObject, this.updater = updater || ReactNoopUpdateQueue; } var pureComponentPrototype = PureComponent2.prototype = new ComponentDummy(); pureComponentPrototype.constructor = PureComponent2, assign(pureComponentPrototype, Component.prototype), pureComponentPrototype.isPureReactComponent = !0; function createRef() { var refObject = { current: null }; return Object.seal(refObject), refObject; } var isArrayImpl = Array.isArray; function isArray(a) { return isArrayImpl(a); } function typeName(value) { { var hasToStringTag = typeof Symbol == "function" && Symbol.toStringTag, type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object"; return type; } } function willCoercionThrow(value) { try { return testStringCoercion(value), !1; } catch { return !0; } } function testStringCoercion(value) { return "" + value; } function checkKeyStringCoercion(value) { if (willCoercionThrow(value)) return error("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", typeName(value)), testStringCoercion(value); } function getWrappedName(outerType, innerType, wrapperName) { var displayName = outerType.displayName; if (displayName) return displayName; var functionName = innerType.displayName || innerType.name || ""; return functionName !== "" ? wrapperName + "(" + functionName + ")" : wrapperName; } function getContextName(type) { return type.displayName || "Context"; } function getComponentNameFromType(type) { if (type == null) return null; if (typeof type.tag == "number" && error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof type == "function") return type.displayName || type.name || null; if (typeof type == "string") return type; switch (type) { case REACT_FRAGMENT_TYPE: return "Fragment"; case REACT_PORTAL_TYPE: return "Portal"; case REACT_PROFILER_TYPE: return "Profiler"; case REACT_STRICT_MODE_TYPE: return "StrictMode"; case REACT_SUSPENSE_TYPE: return "Suspense"; case REACT_SUSPENSE_LIST_TYPE: return "SuspenseList"; } if (typeof type == "object") switch (type.$$typeof) { case REACT_CONTEXT_TYPE: var context = type; return getContextName(context) + ".Consumer"; case REACT_PROVIDER_TYPE: var provider = type; return getContextName(provider._context) + ".Provider"; case REACT_FORWARD_REF_TYPE: return getWrappedName(type, type.render, "ForwardRef"); case REACT_MEMO_TYPE: var outerName = type.displayName || null; return outerName !== null ? outerName : getComponentNameFromType(type.type) || "Memo"; case REACT_LAZY_TYPE: { var lazyComponent = type, payload = lazyComponent._payload, init = lazyComponent._init; try { return getComponentNameFromType(init(payload)); } catch { return null; } } } return null; } var hasOwnProperty = Object.prototype.hasOwnProperty, RESERVED_PROPS = { key: !0, ref: !0, __self: !0, __source: !0 }, specialPropKeyWarningShown, specialPropRefWarningShown, didWarnAboutStringRefs; didWarnAboutStringRefs = {}; function hasValidRef(config) { if (hasOwnProperty.call(config, "ref")) { var getter = Object.getOwnPropertyDescriptor(config, "ref").get; if (getter && getter.isReactWarning) return !1; } return config.ref !== void 0; } function hasValidKey(config) { if (hasOwnProperty.call(config, "key")) { var getter = Object.getOwnPropertyDescriptor(config, "key").get; if (getter && getter.isReactWarning) return !1; } return config.key !== void 0; } function defineKeyPropWarningGetter(props, displayName) { var warnAboutAccessingKey = function() { specialPropKeyWarningShown || (specialPropKeyWarningShown = !0, error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", displayName)); }; warnAboutAccessingKey.isReactWarning = !0, Object.defineProperty(props, "key", { get: warnAboutAccessingKey, configurable: !0 }); } function defineRefPropWarningGetter(props, displayName) { var warnAboutAccessingRef = function() { specialPropRefWarningShown || (specialPropRefWarningShown = !0, error("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", displayName)); }; warnAboutAccessingRef.isReactWarning = !0, Object.defineProperty(props, "ref", { get: warnAboutAccessingRef, configurable: !0 }); } function warnIfStringRefCannotBeAutoConverted(config) { if (typeof config.ref == "string" && ReactCurrentOwner.current && config.__self && ReactCurrentOwner.current.stateNode !== config.__self) { var componentName = getComponentNameFromType(ReactCurrentOwner.current.type); didWarnAboutStringRefs[componentName] || (error('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', componentName, config.ref), didWarnAboutStringRefs[componentName] = !0); } } var ReactElement = function(type, key, ref, self2, source, owner, props) { var element = { // This tag allows us to uniquely identify this as a React Element $$typeof: REACT_ELEMENT_TYPE, // Built-in properties that belong on the element type, key, ref, props, // Record the component responsible for creating this element. _owner: owner }; return element._store = {}, Object.defineProperty(element._store, "validated", { configurable: !1, enumerable: !1, writable: !0, value: !1 }), Object.defineProperty(element, "_self", { configurable: !1, enumerable: !1, writable: !1, value: self2 }), Object.defineProperty(element, "_source", { configurable: !1, enumerable: !1, writable: !1, value: source }), Object.freeze && (Object.freeze(element.props), Object.freeze(element)), element; }; function createElement(type, config, children) { var propName, props = {}, key = null, ref = null, self2 = null, source = null; if (config != null) { hasValidRef(config) && (ref = config.ref, warnIfStringRefCannotBeAutoConverted(config)), hasValidKey(config) && (checkKeyStringCoercion(config.key), key = "" + config.key), self2 = config.__self === void 0 ? null : config.__self, source = config.__source === void 0 ? null : config.__source; for (propName in config) hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName) && (props[propName] = config[propName]); } var childrenLength = arguments.length - 2; if (childrenLength === 1) props.children = children; else if (childrenLength > 1) { for (var childArray = Array(childrenLength), i = 0; i < childrenLength; i++) childArray[i] = arguments[i + 2]; Object.freeze && Object.freeze(childArray), props.children = childArray; } if (type && type.defaultProps) { var defaultProps = type.defaultProps; for (propName in defaultProps) props[propName] === void 0 && (props[propName] = defaultProps[propName]); } if (key || ref) { var displayName = typeof type == "function" ? type.displayName || type.name || "Unknown" : type; key && defineKeyPropWarningGetter(props, displayName), ref && defineRefPropWarningGetter(props, displayName); } return ReactElement(type, key, ref, self2, source, ReactCurrentOwner.current, props); } function cloneAndReplaceKey(oldElement, newKey) { var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props); return newElement; } function cloneElement2(element, config, children) { if (element == null) throw new Error("React.cloneElement(...): The argument must be a React element, but you passed " + element + "."); var propName, props = assign({}, element.props), key = element.key, ref = element.ref, self2 = element._self, source = element._source, owner = element._owner; if (config != null) { hasValidRef(config) && (ref = config.ref, owner = ReactCurrentOwner.current), hasValidKey(config) && (checkKeyStringCoercion(config.key), key = "" + config.key); var defaultProps; element.type && element.type.defaultProps && (defaultProps = element.type.defaultProps); for (propName in config) hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName) && (config[propName] === void 0 && defaultProps !== void 0 ? props[propName] = defaultProps[propName] : props[propName] = config[propName]); } var childrenLength = arguments.length - 2; if (childrenLength === 1) props.children = children; else if (childrenLength > 1) { for (var childArray = Array(childrenLength), i = 0; i < childrenLength; i++) childArray[i] = arguments[i + 2]; props.children = childArray; } return ReactElement(element.type, key, ref, self2, source, owner, props); } function isValidElement(object) { return typeof object == "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; } var SEPARATOR = ".", SUBSEPARATOR = ":"; function escape3(key) { var escapeRegex = /[=:]/g, escaperLookup = { "=": "=0", ":": "=2" }, escapedString = key.replace(escapeRegex, function(match2) { return escaperLookup[match2]; }); return "$" + escapedString; } var didWarnAboutMaps = !1, userProvidedKeyEscapeRegex = /\/+/g; function escapeUserProvidedKey(text) { return text.replace(userProvidedKeyEscapeRegex, "$&/"); } function getElementKey(element, index) { return typeof element == "object" && element !== null && element.key != null ? (checkKeyStringCoercion(element.key), escape3("" + element.key)) : index.toString(36); } function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) { var type = typeof children; (type === "undefined" || type === "boolean") && (children = null); var invokeCallback = !1; if (children === null) invokeCallback = !0; else switch (type) { case "string": case "number": invokeCallback = !0; break; case "object": switch (children.$$typeof) { case REACT_ELEMENT_TYPE: case REACT_PORTAL_TYPE: invokeCallback = !0; } } if (invokeCallback) { var _child = children, mappedChild = callback(_child), childKey = nameSoFar === "" ? SEPARATOR + getElementKey(_child, 0) : nameSoFar; if (isArray(mappedChild)) { var escapedChildKey = ""; childKey != null && (escapedChildKey = escapeUserProvidedKey(childKey) + "/"), mapIntoArray(mappedChild, array, escapedChildKey, "", function(c) { return c; }); } else mappedChild != null && (isValidElement(mappedChild) && (mappedChild.key && (!_child || _child.key !== mappedChild.key) && checkKeyStringCoercion(mappedChild.key), mappedChild = cloneAndReplaceKey( mappedChild, // Keep both the (mapped) and old keys if they differ, just as // traverseAllChildren used to do for objects as children escapedPrefix + // $FlowFixMe Flow incorrectly thinks React.Portal doesn't have a key (mappedChild.key && (!_child || _child.key !== mappedChild.key) ? ( // $FlowFixMe Flow incorrectly thinks existing element's key can be a number // eslint-disable-next-line react-internal/safe-string-coercion escapeUserProvidedKey("" + mappedChild.key) + "/" ) : "") + childKey )), array.push(mappedChild)); return 1; } var child, nextName, subtreeCount = 0, nextNamePrefix = nameSoFar === "" ? SEPARATOR : nameSoFar + SUBSEPARATOR; if (isArray(children)) for (var i = 0; i < children.length; i++) child = children[i], nextName = nextNamePrefix + getElementKey(child, i), subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback); else { var iteratorFn = getIteratorFn(children); if (typeof iteratorFn == "function") { var iterableChildren = children; iteratorFn === iterableChildren.entries && (didWarnAboutMaps || warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead."), didWarnAboutMaps = !0); for (var iterator = iteratorFn.call(iterableChildren), step, ii = 0; !(step = iterator.next()).done; ) child = step.value, nextName = nextNamePrefix + getElementKey(child, ii++), subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback); } else if (type === "object") { var childrenString = String(children); throw new Error("Objects are not valid as a React child (found: " + (childrenString === "[object Object]" ? "object with keys {" + Object.keys(children).join(", ") + "}" : childrenString) + "). If you meant to render a collection of children, use an array instead."); } } return subtreeCount; } function mapChildren(children, func, context) { if (children == null) return children; var result = [], count = 0; return mapIntoArray(children, result, "", "", function(child) { return func.call(context, child, count++); }), result; } function countChildren(children) { var n = 0; return mapChildren(children, function() { n++; }), n; } function forEachChildren(children, forEachFunc, forEachContext) { mapChildren(children, function() { forEachFunc.apply(this, arguments); }, forEachContext); } function toArray(children) { return mapChildren(children, function(child) { return child; }) || []; } function onlyChild(children) { if (!isValidElement(children)) throw new Error("React.Children.only expected to receive a single React element child."); return children; } function createContext6(defaultValue) { var context = { $$typeof: REACT_CONTEXT_TYPE, // As a workaround to support multiple concurrent renderers, we categorize // some renderers as primary and others as secondary. We only expect // there to be two concurrent renderers at most: React Native (primary) and // Fabric (secondary); React DOM (primary) and React ART (secondary). // Secondary renderers store their context values on separate fields. _currentValue: defaultValue, _currentValue2: defaultValue, // Used to track how many concurrent renderers this context currently // supports within in a single renderer. Such as parallel server rendering. _threadCount: 0, // These are circular Provider: null, Consumer: null, // Add these to use same hidden class in VM as ServerContext _defaultValue: null, _globalName: null }; context.Provider = { $$typeof: REACT_PROVIDER_TYPE, _context: context }; var hasWarnedAboutUsingNestedContextConsumers = !1, hasWarnedAboutUsingConsumerProvider = !1, hasWarnedAboutDisplayNameOnConsumer = !1; { var Consumer = { $$typeof: REACT_CONTEXT_TYPE, _context: context }; Object.defineProperties(Consumer, { Provider: { get: function() { return hasWarnedAboutUsingConsumerProvider || (hasWarnedAboutUsingConsumerProvider = !0, error("Rendering <Context.Consumer.Provider> is not supported and will be removed in a future major release. Did you mean to render <Context.Provider> instead?")), context.Provider; }, set: function(_Provider) { context.Provider = _Provider; } }, _currentValue: { get: function() { return context._currentValue; }, set: function(_currentValue) { context._currentValue = _currentValue; } }, _currentValue2: { get: function() { return context._currentValue2; }, set: function(_currentValue2) { context._currentValue2 = _currentValue2; } }, _threadCount: { get: function() { return context._threadCount; }, set: function(_threadCount) { context._threadCount = _threadCount; } }, Consumer: { get: function() { return hasWarnedAboutUsingNestedContextConsumers || (hasWarnedAboutUsingNestedContextConsumers = !0, error("Rendering <Context.Consumer.Consumer> is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?")), context.Consumer; } }, displayName: { get: function() { return context.displayName; }, set: function(displayName) { hasWarnedAboutDisplayNameOnConsumer || (warn("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.", displayName), hasWarnedAboutDisplayNameOnConsumer = !0); } } }), context.Consumer = Consumer; } return context._currentRenderer = null, context._currentRenderer2 = null, context; } var Uninitialized = -1, Pending = 0, Resolved = 1, Rejected = 2; function lazyInitializer(payload) { if (payload._status === Uninitialized) { var ctor = payload._result, thenable = ctor(); if (thenable.then(function(moduleObject2) { if (payload._status === Pending || payload._status === Uninitialized) { var resolved = payload; resolved._status = Resolved, resolved._result = moduleObject2; } }, function(error2) { if (payload._status === Pending || payload._status === Uninitialized) { var rejected = payload; rejected._status = Rejected, rejected._result = error2; } }), payload._status === Uninitialized) { var pending = payload; pending._status = Pending, pending._result = thenable; } } if (payload._status === Resolved) { var moduleObject = payload._result; return moduleObject === void 0 && error(`lazy: Expected the result of a dynamic import() call. Instead received: %s Your code should look like: const MyComponent = lazy(() => import('./MyComponent')) Did you accidentally put curly braces around the import?`, moduleObject), "default" in moduleObject || error(`lazy: Expected the result of a dynamic import() call. Instead received: %s Your code should look like: const MyComponent = lazy(() => import('./MyComponent'))`, moduleObject), moduleObject.default; } else throw payload._result; } function lazy(ctor) { var payload = { // We use these fields to store the result. _status: Uninitialized, _result: ctor }, lazyType = { $$typeof: REACT_LAZY_TYPE, _payload: payload, _init: lazyInitializer }; { var defaultProps, propTypes; Object.defineProperties(lazyType, { defaultProps: { configurable: !0, get: function() { return defaultProps; }, set: function(newDefaultProps) { error("React.lazy(...): It is not supported to assign `defaultProps` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."), defaultProps = newDefaultProps, Object.defineProperty(lazyType, "defaultProps", { enumerable: !0 }); } }, propTypes: { configurable: !0, get: function() { return propTypes; }, set: function(newPropTypes) { error("React.lazy(...): It is not supported to assign `propTypes` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."), propTypes = newPropTypes, Object.defineProperty(lazyType, "propTypes", { enumerable: !0 }); } } }); } return lazyType; } function forwardRef3(render3) { render3 != null && render3.$$typeof === REACT_MEMO_TYPE ? error("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...)).") : typeof render3 != "function" ? error("forwardRef requires a render function but was given %s.", render3 === null ? "null" : typeof render3) : render3.length !== 0 && render3.length !== 2 && error("forwardRef render functions accept exactly two parameters: props and ref. %s", render3.length === 1 ? "Did you forget to use the ref parameter?" : "Any additional parameter will be undefined."), render3 != null && (render3.defaultProps != null || render3.propTypes != null) && error("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?"); var elementType = { $$typeof: REACT_FORWARD_REF_TYPE, render: render3 }; { var ownName; Object.defineProperty(elementType, "displayName", { enumerable: !1, configurable: !0, get: function() { return ownName; }, set: function(name) { ownName = name, !render3.name && !render3.displayName && (render3.displayName = name); } }); } return elementType; } var REACT_MODULE_REFERENCE; REACT_MODULE_REFERENCE = Symbol.for("react.module.reference"); function isValidElementType(type) { return !!(typeof type == "string" || typeof type == "function" || type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing || typeof type == "object" && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object // types supported by any Flight configuration anywhere since // we don't know which Flight build this will end up being used // with. type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== void 0)); } function memo2(type, compare) { isValidElementType(type) || error("memo: The first argument must be a component. Instead received: %s", type === null ? "null" : typeof type); var elementType = { $$typeof: REACT_MEMO_TYPE, type, compare: compare === void 0 ? null : compare }; { var ownName; Object.defineProperty(elementType, "displayName", { enumerable: !1, configurable: !0, get: function() { return ownName; }, set: function(name) { ownName = name, !type.name && !type.displayName && (type.displayName = name); } }); } return elementType; } function resolveDispatcher() { var dispatcher = ReactCurrentDispatcher.current; return dispatcher === null && error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons: 1. You might have mismatching versions of React and the renderer (such as React DOM) 2. You might be breaking the Rules of Hooks 3. You might have more than one copy of React in the same app See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.`), dispatcher; } function useContext9(Context) { var dispatcher = resolveDispatcher(); if (Context._context !== void 0) { var realContext = Context._context; realContext.Consumer === Context ? error("Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be removed in a future major release. Did you mean to call useContext(Context) instead?") : realContext.Provider === Context && error("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?"); } return dispatcher.useContext(Context); } function useState14(initialState) { var dispatcher = resolveDispatcher(); return dispatcher.useState(initialState); } function useReducer2(reducer2, initialArg, init) { var dispatcher = resolveDispatcher(); return dispatcher.useReducer(reducer2, initialArg, init); } function useRef5(initialValue) { var dispatcher = resolveDispatcher(); return dispatcher.useRef(initialValue); } function useEffect11(create2, deps) { var dispatcher = resolveDispatcher(); return dispatcher.useEffect(create2, deps); }