{"ast":null,"code":"/**\n * @license React\n * react-dom-test-utils.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nif (process.env.NODE_ENV !== \"production\") {\n (function () {\n 'use strict';\n\n var React = require('react');\n var ReactDOM = require('react-dom');\n var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n\n // by calls to these methods by a Babel plugin.\n //\n // In PROD (or in packages without access to React internals),\n // they are left as they are instead.\n\n function warn(format) {\n {\n {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n printWarning('warn', format, args);\n }\n }\n }\n function error(format) {\n {\n {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n printWarning('error', format, args);\n }\n }\n }\n function printWarning(level, format, args) {\n // When changing this logic, you might want to also\n // update consoleWithStackDev.www.js as well.\n {\n var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n var stack = ReactDebugCurrentFrame.getStackAddendum();\n if (stack !== '') {\n format += '%s';\n args = args.concat([stack]);\n } // eslint-disable-next-line react-internal/safe-string-coercion\n\n var argsWithFormat = args.map(function (item) {\n return String(item);\n }); // Careful: RN currently depends on this prefix\n\n argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it\n // breaks IE9: https://github.com/facebook/react/issues/13610\n // eslint-disable-next-line react-internal/no-production-logging\n\n Function.prototype.apply.call(console[level], console, argsWithFormat);\n }\n }\n\n /**\n * `ReactInstanceMap` maintains a mapping from a public facing stateful\n * instance (key) and the internal representation (value). This allows public\n * methods to accept the user facing instance as an argument and map them back\n * to internal methods.\n *\n * Note that this module is currently shared and assumed to be stateless.\n * If this becomes an actual Map, that will break.\n */\n function get(key) {\n return key._reactInternals;\n }\n var FunctionComponent = 0;\n var ClassComponent = 1;\n var HostRoot = 3; // Root of a host tree. Could be nested inside another node.\n\n var HostComponent = 5;\n var HostText = 6;\n\n // Don't change these two values. They're used by React Dev Tools.\n var NoFlags = /* */\n 0;\n var Placement = /* */\n 2;\n var Hydrating = /* */\n 4096;\n var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;\n function getNearestMountedFiber(fiber) {\n var node = fiber;\n var nearestMounted = fiber;\n if (!fiber.alternate) {\n // If there is no alternate, this might be a new tree that isn't inserted\n // yet. If it is, then it will have a pending insertion effect on it.\n var nextNode = node;\n do {\n node = nextNode;\n if ((node.flags & (Placement | Hydrating)) !== NoFlags) {\n // This is an insertion or in-progress hydration. The nearest possible\n // mounted fiber is the parent but we need to continue to figure out\n // if that one is still mounted.\n nearestMounted = node.return;\n }\n nextNode = node.return;\n } while (nextNode);\n } else {\n while (node.return) {\n node = node.return;\n }\n }\n if (node.tag === HostRoot) {\n // TODO: Check if this was a nested HostRoot when used with\n // renderContainerIntoSubtree.\n return nearestMounted;\n } // If we didn't hit the root, that means that we're in an disconnected tree\n // that has been unmounted.\n\n return null;\n }\n function assertIsMounted(fiber) {\n if (getNearestMountedFiber(fiber) !== fiber) {\n throw new Error('Unable to find node on an unmounted component.');\n }\n }\n function findCurrentFiberUsingSlowPath(fiber) {\n var alternate = fiber.alternate;\n if (!alternate) {\n // If there is no alternate, then we only need to check if it is mounted.\n var nearestMounted = getNearestMountedFiber(fiber);\n if (nearestMounted === null) {\n throw new Error('Unable to find node on an unmounted component.');\n }\n if (nearestMounted !== fiber) {\n return null;\n }\n return fiber;\n } // If we have two possible branches, we'll walk backwards up to the root\n // to see what path the root points to. On the way we may hit one of the\n // special cases and we'll deal with them.\n\n var a = fiber;\n var b = alternate;\n while (true) {\n var parentA = a.return;\n if (parentA === null) {\n // We're at the root.\n break;\n }\n var parentB = parentA.alternate;\n if (parentB === null) {\n // There is no alternate. This is an unusual case. Currently, it only\n // happens when a Suspense component is hidden. An extra fragment fiber\n // is inserted in between the Suspense fiber and its children. Skip\n // over this extra fragment fiber and proceed to the next parent.\n var nextParent = parentA.return;\n if (nextParent !== null) {\n a = b = nextParent;\n continue;\n } // If there's no parent, we're at the root.\n\n break;\n } // If both copies of the parent fiber point to the same child, we can\n // assume that the child is current. This happens when we bailout on low\n // priority: the bailed out fiber's child reuses the current child.\n\n if (parentA.child === parentB.child) {\n var child = parentA.child;\n while (child) {\n if (child === a) {\n // We've determined that A is the current branch.\n assertIsMounted(parentA);\n return fiber;\n }\n if (child === b) {\n // We've determined that B is the current branch.\n assertIsMounted(parentA);\n return alternate;\n }\n child = child.sibling;\n } // We should never have an alternate for any mounting node. So the only\n // way this could possibly happen is if this was unmounted, if at all.\n\n throw new Error('Unable to find node on an unmounted component.');\n }\n if (a.return !== b.return) {\n // The return pointer of A and the return pointer of B point to different\n // fibers. We assume that return pointers never criss-cross, so A must\n // belong to the child set of A.return, and B must belong to the child\n // set of B.return.\n a = parentA;\n b = parentB;\n } else {\n // The return pointers point to the same fiber. We'll have to use the\n // default, slow path: scan the child sets of each parent alternate to see\n // which child belongs to which set.\n //\n // Search parent A's child set\n var didFindChild = false;\n var _child = parentA.child;\n while (_child) {\n if (_child === a) {\n didFindChild = true;\n a = parentA;\n b = parentB;\n break;\n }\n if (_child === b) {\n didFindChild = true;\n b = parentA;\n a = parentB;\n break;\n }\n _child = _child.sibling;\n }\n if (!didFindChild) {\n // Search parent B's child set\n _child = parentB.child;\n while (_child) {\n if (_child === a) {\n didFindChild = true;\n a = parentB;\n b = parentA;\n break;\n }\n if (_child === b) {\n didFindChild = true;\n b = parentB;\n a = parentA;\n break;\n }\n _child = _child.sibling;\n }\n if (!didFindChild) {\n throw new Error('Child was not found in either parent set. This indicates a bug ' + 'in React related to the return pointer. Please file an issue.');\n }\n }\n }\n if (a.alternate !== b) {\n throw new Error(\"Return fibers should always be each others' alternates. \" + 'This error is likely caused by a bug in React. Please file an issue.');\n }\n } // If the root is not a host container, we're in a disconnected tree. I.e.\n // unmounted.\n\n if (a.tag !== HostRoot) {\n throw new Error('Unable to find node on an unmounted component.');\n }\n if (a.stateNode.current === a) {\n // We've determined that A is the current branch.\n return fiber;\n } // Otherwise B has to be current branch.\n\n return alternate;\n }\n var assign = Object.assign;\n\n /**\n * `charCode` represents the actual \"character code\" and is safe to use with\n * `String.fromCharCode`. As such, only keys that correspond to printable\n * characters produce a valid `charCode`, the only exception to this is Enter.\n * The Tab-key is considered non-printable and does not have a `charCode`,\n * presumably because it does not produce a tab-character in browsers.\n *\n * @param {object} nativeEvent Native browser event.\n * @return {number} Normalized `charCode` property.\n */\n function getEventCharCode(nativeEvent) {\n var charCode;\n var keyCode = nativeEvent.keyCode;\n if ('charCode' in nativeEvent) {\n charCode = nativeEvent.charCode; // FF does not set `charCode` for the Enter-key, check against `keyCode`.\n\n if (charCode === 0 && keyCode === 13) {\n charCode = 13;\n }\n } else {\n // IE8 does not implement `charCode`, but `keyCode` has the correct value.\n charCode = keyCode;\n } // IE and Edge (on Windows) and Chrome / Safari (on Windows and Linux)\n // report Enter as charCode 10 when ctrl is pressed.\n\n if (charCode === 10) {\n charCode = 13;\n } // Some non-printable keys are reported in `charCode`/`keyCode`, discard them.\n // Must not discard the (non-)printable Enter-key.\n\n if (charCode >= 32 || charCode === 13) {\n return charCode;\n }\n return 0;\n }\n function functionThatReturnsTrue() {\n return true;\n }\n function functionThatReturnsFalse() {\n return false;\n } // This is intentionally a factory so that we have different returned constructors.\n // If we had a single constructor, it would be megamorphic and engines would deopt.\n\n function createSyntheticEvent(Interface) {\n /**\n * Synthetic events are dispatched by event plugins, typically in response to a\n * top-level event delegation handler.\n *\n * These systems should generally use pooling to reduce the frequency of garbage\n * collection. The system should check `isPersistent` to determine whether the\n * event should be released into the pool after being dispatched. Users that\n * need a persisted event should invoke `persist`.\n *\n * Synthetic events (and subclasses) implement the DOM Level 3 Events API by\n * normalizing browser quirks. Subclasses do not necessarily have to implement a\n * DOM interface; custom application-specific events can also subclass this.\n */\n function SyntheticBaseEvent(reactName, reactEventType, targetInst, nativeEvent, nativeEventTarget) {\n this._reactName = reactName;\n this._targetInst = targetInst;\n this.type = reactEventType;\n this.nativeEvent = nativeEvent;\n this.target = nativeEventTarget;\n this.currentTarget = null;\n for (var _propName in Interface) {\n if (!Interface.hasOwnProperty(_propName)) {\n continue;\n }\n var normalize = Interface[_propName];\n if (normalize) {\n this[_propName] = normalize(nativeEvent);\n } else {\n this[_propName] = nativeEvent[_propName];\n }\n }\n var defaultPrevented = nativeEvent.defaultPrevented != null ? nativeEvent.defaultPrevented : nativeEvent.returnValue === false;\n if (defaultPrevented) {\n this.isDefaultPrevented = functionThatReturnsTrue;\n } else {\n this.isDefaultPrevented = functionThatReturnsFalse;\n }\n this.isPropagationStopped = functionThatReturnsFalse;\n return this;\n }\n assign(SyntheticBaseEvent.prototype, {\n preventDefault: function () {\n this.defaultPrevented = true;\n var event = this.nativeEvent;\n if (!event) {\n return;\n }\n if (event.preventDefault) {\n event.preventDefault(); // $FlowFixMe - flow is not aware of `unknown` in IE\n } else if (typeof event.returnValue !== 'unknown') {\n event.returnValue = false;\n }\n this.isDefaultPrevented = functionThatReturnsTrue;\n },\n stopPropagation: function () {\n var event = this.nativeEvent;\n if (!event) {\n return;\n }\n if (event.stopPropagation) {\n event.stopPropagation(); // $FlowFixMe - flow is not aware of `unknown` in IE\n } else if (typeof event.cancelBubble !== 'unknown') {\n // The ChangeEventPlugin registers a \"propertychange\" event for\n // IE. This event does not support bubbling or cancelling, and\n // any references to cancelBubble throw \"Member not found\". A\n // typeof check of \"unknown\" circumvents this issue (and is also\n // IE specific).\n event.cancelBubble = true;\n }\n this.isPropagationStopped = functionThatReturnsTrue;\n },\n /**\n * We release all dispatched `SyntheticEvent`s after each event loop, adding\n * them back into the pool. This allows a way to hold onto a reference that\n * won't be added back into the pool.\n */\n persist: function () {// Modern event system doesn't use pooling.\n },\n /**\n * Checks if this event should be released back into the pool.\n *\n * @return {boolean} True if this should not be released, false otherwise.\n */\n isPersistent: functionThatReturnsTrue\n });\n return SyntheticBaseEvent;\n }\n /**\n * @interface Event\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\n\n var EventInterface = {\n eventPhase: 0,\n bubbles: 0,\n cancelable: 0,\n timeStamp: function (event) {\n return event.timeStamp || Date.now();\n },\n defaultPrevented: 0,\n isTrusted: 0\n };\n var SyntheticEvent = createSyntheticEvent(EventInterface);\n var UIEventInterface = assign({}, EventInterface, {\n view: 0,\n detail: 0\n });\n var SyntheticUIEvent = createSyntheticEvent(UIEventInterface);\n var lastMovementX;\n var lastMovementY;\n var lastMouseEvent;\n function updateMouseMovementPolyfillState(event) {\n if (event !== lastMouseEvent) {\n if (lastMouseEvent && event.type === 'mousemove') {\n lastMovementX = event.screenX - lastMouseEvent.screenX;\n lastMovementY = event.screenY - lastMouseEvent.screenY;\n } else {\n lastMovementX = 0;\n lastMovementY = 0;\n }\n lastMouseEvent = event;\n }\n }\n /**\n * @interface MouseEvent\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\n\n var MouseEventInterface = assign({}, UIEventInterface, {\n screenX: 0,\n screenY: 0,\n clientX: 0,\n clientY: 0,\n pageX: 0,\n pageY: 0,\n ctrlKey: 0,\n shiftKey: 0,\n altKey: 0,\n metaKey: 0,\n getModifierState: getEventModifierState,\n button: 0,\n buttons: 0,\n relatedTarget: function (event) {\n if (event.relatedTarget === undefined) return event.fromElement === event.srcElement ? event.toElement : event.fromElement;\n return event.relatedTarget;\n },\n movementX: function (event) {\n if ('movementX' in event) {\n return event.movementX;\n }\n updateMouseMovementPolyfillState(event);\n return lastMovementX;\n },\n movementY: function (event) {\n if ('movementY' in event) {\n return event.movementY;\n } // Don't need to call updateMouseMovementPolyfillState() here\n // because it's guaranteed to have already run when movementX\n // was copied.\n\n return lastMovementY;\n }\n });\n var SyntheticMouseEvent = createSyntheticEvent(MouseEventInterface);\n /**\n * @interface DragEvent\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\n\n var DragEventInterface = assign({}, MouseEventInterface, {\n dataTransfer: 0\n });\n var SyntheticDragEvent = createSyntheticEvent(DragEventInterface);\n /**\n * @interface FocusEvent\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\n\n var FocusEventInterface = assign({}, UIEventInterface, {\n relatedTarget: 0\n });\n var SyntheticFocusEvent = createSyntheticEvent(FocusEventInterface);\n /**\n * @interface Event\n * @see http://www.w3.org/TR/css3-animations/#AnimationEvent-interface\n * @see https://developer.mozilla.org/en-US/docs/Web/API/AnimationEvent\n */\n\n var AnimationEventInterface = assign({}, EventInterface, {\n animationName: 0,\n elapsedTime: 0,\n pseudoElement: 0\n });\n var SyntheticAnimationEvent = createSyntheticEvent(AnimationEventInterface);\n /**\n * @interface Event\n * @see http://www.w3.org/TR/clipboard-apis/\n */\n\n var ClipboardEventInterface = assign({}, EventInterface, {\n clipboardData: function (event) {\n return 'clipboardData' in event ? event.clipboardData : window.clipboardData;\n }\n });\n var SyntheticClipboardEvent = createSyntheticEvent(ClipboardEventInterface);\n /**\n * @interface Event\n * @see http://www.w3.org/TR/DOM-Level-3-Events/#events-compositionevents\n */\n\n var CompositionEventInterface = assign({}, EventInterface, {\n data: 0\n });\n var SyntheticCompositionEvent = createSyntheticEvent(CompositionEventInterface);\n /**\n * Normalization of deprecated HTML5 `key` values\n * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names\n */\n\n var normalizeKey = {\n Esc: 'Escape',\n Spacebar: ' ',\n Left: 'ArrowLeft',\n Up: 'ArrowUp',\n Right: 'ArrowRight',\n Down: 'ArrowDown',\n Del: 'Delete',\n Win: 'OS',\n Menu: 'ContextMenu',\n Apps: 'ContextMenu',\n Scroll: 'ScrollLock',\n MozPrintableKey: 'Unidentified'\n };\n /**\n * Translation from legacy `keyCode` to HTML5 `key`\n * Only special keys supported, all others depend on keyboard layout or browser\n * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names\n */\n\n var translateToKey = {\n '8': 'Backspace',\n '9': 'Tab',\n '12': 'Clear',\n '13': 'Enter',\n '16': 'Shift',\n '17': 'Control',\n '18': 'Alt',\n '19': 'Pause',\n '20': 'CapsLock',\n '27': 'Escape',\n '32': ' ',\n '33': 'PageUp',\n '34': 'PageDown',\n '35': 'End',\n '36': 'Home',\n '37': 'ArrowLeft',\n '38': 'ArrowUp',\n '39': 'ArrowRight',\n '40': 'ArrowDown',\n '45': 'Insert',\n '46': 'Delete',\n '112': 'F1',\n '113': 'F2',\n '114': 'F3',\n '115': 'F4',\n '116': 'F5',\n '117': 'F6',\n '118': 'F7',\n '119': 'F8',\n '120': 'F9',\n '121': 'F10',\n '122': 'F11',\n '123': 'F12',\n '144': 'NumLock',\n '145': 'ScrollLock',\n '224': 'Meta'\n };\n /**\n * @param {object} nativeEvent Native browser event.\n * @return {string} Normalized `key` property.\n */\n\n function getEventKey(nativeEvent) {\n if (nativeEvent.key) {\n // Normalize inconsistent values reported by browsers due to\n // implementations of a working draft specification.\n // FireFox implements `key` but returns `MozPrintableKey` for all\n // printable characters (normalized to `Unidentified`), ignore it.\n var key = normalizeKey[nativeEvent.key] || nativeEvent.key;\n if (key !== 'Unidentified') {\n return key;\n }\n } // Browser does not implement `key`, polyfill as much of it as we can.\n\n if (nativeEvent.type === 'keypress') {\n var charCode = getEventCharCode(nativeEvent); // The enter-key is technically both printable and non-printable and can\n // thus be captured by `keypress`, no other non-printable key should.\n\n return charCode === 13 ? 'Enter' : String.fromCharCode(charCode);\n }\n if (nativeEvent.type === 'keydown' || nativeEvent.type === 'keyup') {\n // While user keyboard layout determines the actual meaning of each\n // `keyCode` value, almost all function keys have a universal value.\n return translateToKey[nativeEvent.keyCode] || 'Unidentified';\n }\n return '';\n }\n /**\n * Translation from modifier key to the associated property in the event.\n * @see http://www.w3.org/TR/DOM-Level-3-Events/#keys-Modifiers\n */\n\n var modifierKeyToProp = {\n Alt: 'altKey',\n Control: 'ctrlKey',\n Meta: 'metaKey',\n Shift: 'shiftKey'\n }; // Older browsers (Safari <= 10, iOS Safari <= 10.2) do not support\n // getModifierState. If getModifierState is not supported, we map it to a set of\n // modifier keys exposed by the event. In this case, Lock-keys are not supported.\n\n function modifierStateGetter(keyArg) {\n var syntheticEvent = this;\n var nativeEvent = syntheticEvent.nativeEvent;\n if (nativeEvent.getModifierState) {\n return nativeEvent.getModifierState(keyArg);\n }\n var keyProp = modifierKeyToProp[keyArg];\n return keyProp ? !!nativeEvent[keyProp] : false;\n }\n function getEventModifierState(nativeEvent) {\n return modifierStateGetter;\n }\n /**\n * @interface KeyboardEvent\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\n\n var KeyboardEventInterface = assign({}, UIEventInterface, {\n key: getEventKey,\n code: 0,\n location: 0,\n ctrlKey: 0,\n shiftKey: 0,\n altKey: 0,\n metaKey: 0,\n repeat: 0,\n locale: 0,\n getModifierState: getEventModifierState,\n // Legacy Interface\n charCode: function (event) {\n // `charCode` is the result of a KeyPress event and represents the value of\n // the actual printable character.\n // KeyPress is deprecated, but its replacement is not yet final and not\n // implemented in any major browser. Only KeyPress has charCode.\n if (event.type === 'keypress') {\n return getEventCharCode(event);\n }\n return 0;\n },\n keyCode: function (event) {\n // `keyCode` is the result of a KeyDown/Up event and represents the value of\n // physical keyboard key.\n // The actual meaning of the value depends on the users' keyboard layout\n // which cannot be detected. Assuming that it is a US keyboard layout\n // provides a surprisingly accurate mapping for US and European users.\n // Due to this, it is left to the user to implement at this time.\n if (event.type === 'keydown' || event.type === 'keyup') {\n return event.keyCode;\n }\n return 0;\n },\n which: function (event) {\n // `which` is an alias for either `keyCode` or `charCode` depending on the\n // type of the event.\n if (event.type === 'keypress') {\n return getEventCharCode(event);\n }\n if (event.type === 'keydown' || event.type === 'keyup') {\n return event.keyCode;\n }\n return 0;\n }\n });\n var SyntheticKeyboardEvent = createSyntheticEvent(KeyboardEventInterface);\n /**\n * @interface PointerEvent\n * @see http://www.w3.org/TR/pointerevents/\n */\n\n var PointerEventInterface = assign({}, MouseEventInterface, {\n pointerId: 0,\n width: 0,\n height: 0,\n pressure: 0,\n tangentialPressure: 0,\n tiltX: 0,\n tiltY: 0,\n twist: 0,\n pointerType: 0,\n isPrimary: 0\n });\n var SyntheticPointerEvent = createSyntheticEvent(PointerEventInterface);\n /**\n * @interface TouchEvent\n * @see http://www.w3.org/TR/touch-events/\n */\n\n var TouchEventInterface = assign({}, UIEventInterface, {\n touches: 0,\n targetTouches: 0,\n changedTouches: 0,\n altKey: 0,\n metaKey: 0,\n ctrlKey: 0,\n shiftKey: 0,\n getModifierState: getEventModifierState\n });\n var SyntheticTouchEvent = createSyntheticEvent(TouchEventInterface);\n /**\n * @interface Event\n * @see http://www.w3.org/TR/2009/WD-css3-transitions-20090320/#transition-events-\n * @see https://developer.mozilla.org/en-US/docs/Web/API/TransitionEvent\n */\n\n var TransitionEventInterface = assign({}, EventInterface, {\n propertyName: 0,\n elapsedTime: 0,\n pseudoElement: 0\n });\n var SyntheticTransitionEvent = createSyntheticEvent(TransitionEventInterface);\n /**\n * @interface WheelEvent\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\n\n var WheelEventInterface = assign({}, MouseEventInterface, {\n deltaX: function (event) {\n return 'deltaX' in event ? event.deltaX :\n // Fallback to `wheelDeltaX` for Webkit and normalize (right is positive).\n 'wheelDeltaX' in event ? -event.wheelDeltaX : 0;\n },\n deltaY: function (event) {\n return 'deltaY' in event ? event.deltaY :\n // Fallback to `wheelDeltaY` for Webkit and normalize (down is positive).\n 'wheelDeltaY' in event ? -event.wheelDeltaY :\n // Fallback to `wheelDelta` for IE<9 and normalize (down is positive).\n 'wheelDelta' in event ? -event.wheelDelta : 0;\n },\n deltaZ: 0,\n // Browsers without \"deltaMode\" is reporting in raw wheel delta where one\n // notch on the scroll is always +/- 120, roughly equivalent to pixels.\n // A good approximation of DOM_DELTA_LINE (1) is 5% of viewport size or\n // ~40 pixels, for DOM_DELTA_SCREEN (2) it is 87.5% of viewport size.\n deltaMode: 0\n });\n var SyntheticWheelEvent = createSyntheticEvent(WheelEventInterface);\n\n /**\n * HTML nodeType values that represent the type of the node\n */\n var ELEMENT_NODE = 1;\n function invokeGuardedCallbackProd(name, func, context, a, b, c, d, e, f) {\n var funcArgs = Array.prototype.slice.call(arguments, 3);\n try {\n func.apply(context, funcArgs);\n } catch (error) {\n this.onError(error);\n }\n }\n var invokeGuardedCallbackImpl = invokeGuardedCallbackProd;\n {\n // In DEV mode, we swap out invokeGuardedCallback for a special version\n // that plays more nicely with the browser's DevTools. The idea is to preserve\n // \"Pause on exceptions\" behavior. Because React wraps all user-provided\n // functions in invokeGuardedCallback, and the production version of\n // invokeGuardedCallback uses a try-catch, all user exceptions are treated\n // like caught exceptions, and the DevTools won't pause unless the developer\n // takes the extra step of enabling pause on caught exceptions. This is\n // unintuitive, though, because even though React has caught the error, from\n // the developer's perspective, the error is uncaught.\n //\n // To preserve the expected \"Pause on exceptions\" behavior, we don't use a\n // try-catch in DEV. Instead, we synchronously dispatch a fake event to a fake\n // DOM node, and call the user-provided callback from inside an event handler\n // for that fake event. If the callback throws, the error is \"captured\" using\n // a global event handler. But because the error happens in a different\n // event loop context, it does not interrupt the normal program flow.\n // Effectively, this gives us try-catch behavior without actually using\n // try-catch. Neat!\n // Check that the browser supports the APIs we need to implement our special\n // DEV version of invokeGuardedCallback\n if (typeof window !== 'undefined' && typeof window.dispatchEvent === 'function' && typeof document !== 'undefined' && typeof document.createEvent === 'function') {\n var fakeNode = document.createElement('react');\n invokeGuardedCallbackImpl = function invokeGuardedCallbackDev(name, func, context, a, b, c, d, e, f) {\n // If document doesn't exist we know for sure we will crash in this method\n // when we call document.createEvent(). However this can cause confusing\n // errors: https://github.com/facebook/create-react-app/issues/3482\n // So we preemptively throw with a better message instead.\n if (typeof document === 'undefined' || document === null) {\n throw new Error('The `document` global was defined when React was initialized, but is not ' + 'defined anymore. This can happen in a test environment if a component ' + 'schedules an update from an asynchronous callback, but the test has already ' + 'finished running. To solve this, you can either unmount the component at ' + 'the end of your test (and ensure that any asynchronous operations get ' + 'canceled in `componentWillUnmount`), or you can change the test itself ' + 'to be asynchronous.');\n }\n var evt = document.createEvent('Event');\n var didCall = false; // Keeps track of whether the user-provided callback threw an error. We\n // set this to true at the beginning, then set it to false right after\n // calling the function. If the function errors, `didError` will never be\n // set to false. This strategy works even if the browser is flaky and\n // fails to call our global error handler, because it doesn't rely on\n // the error event at all.\n\n var didError = true; // Keeps track of the value of window.event so that we can reset it\n // during the callback to let user code access window.event in the\n // browsers that support it.\n\n var windowEvent = window.event; // Keeps track of the descriptor of window.event to restore it after event\n // dispatching: https://github.com/facebook/react/issues/13688\n\n var windowEventDescriptor = Object.getOwnPropertyDescriptor(window, 'event');\n function restoreAfterDispatch() {\n // We immediately remove the callback from event listeners so that\n // nested `invokeGuardedCallback` calls do not clash. Otherwise, a\n // nested call would trigger the fake event handlers of any call higher\n // in the stack.\n fakeNode.removeEventListener(evtType, callCallback, false); // We check for window.hasOwnProperty('event') to prevent the\n // window.event assignment in both IE <= 10 as they throw an error\n // \"Member not found\" in strict mode, and in Firefox which does not\n // support window.event.\n\n if (typeof window.event !== 'undefined' && window.hasOwnProperty('event')) {\n window.event = windowEvent;\n }\n } // Create an event handler for our fake event. We will synchronously\n // dispatch our fake event using `dispatchEvent`. Inside the handler, we\n // call the user-provided callback.\n\n var funcArgs = Array.prototype.slice.call(arguments, 3);\n function callCallback() {\n didCall = true;\n restoreAfterDispatch();\n func.apply(context, funcArgs);\n didError = false;\n } // Create a global error event handler. We use this to capture the value\n // that was thrown. It's possible that this error handler will fire more\n // than once; for example, if non-React code also calls `dispatchEvent`\n // and a handler for that event throws. We should be resilient to most of\n // those cases. Even if our error event handler fires more than once, the\n // last error event is always used. If the callback actually does error,\n // we know that the last error event is the correct one, because it's not\n // possible for anything else to have happened in between our callback\n // erroring and the code that follows the `dispatchEvent` call below. If\n // the callback doesn't error, but the error event was fired, we know to\n // ignore it because `didError` will be false, as described above.\n\n var error; // Use this to track whether the error event is ever called.\n\n var didSetError = false;\n var isCrossOriginError = false;\n function handleWindowError(event) {\n error = event.error;\n didSetError = true;\n if (error === null && event.colno === 0 && event.lineno === 0) {\n isCrossOriginError = true;\n }\n if (event.defaultPrevented) {\n // Some other error handler has prevented default.\n // Browsers silence the error report if this happens.\n // We'll remember this to later decide whether to log it or not.\n if (error != null && typeof error === 'object') {\n try {\n error._suppressLogging = true;\n } catch (inner) {// Ignore.\n }\n }\n }\n } // Create a fake event type.\n\n var evtType = \"react-\" + (name ? name : 'invokeguardedcallback'); // Attach our event handlers\n\n window.addEventListener('error', handleWindowError);\n fakeNode.addEventListener(evtType, callCallback, false); // Synchronously dispatch our fake event. If the user-provided function\n // errors, it will trigger our global error handler.\n\n evt.initEvent(evtType, false, false);\n fakeNode.dispatchEvent(evt);\n if (windowEventDescriptor) {\n Object.defineProperty(window, 'event', windowEventDescriptor);\n }\n if (didCall && didError) {\n if (!didSetError) {\n // The callback errored, but the error event never fired.\n // eslint-disable-next-line react-internal/prod-error-codes\n error = new Error('An error was thrown inside one of your components, but React ' + \"doesn't know what it was. This is likely due to browser \" + 'flakiness. React does its best to preserve the \"Pause on ' + 'exceptions\" behavior of the DevTools, which requires some ' + \"DEV-mode only tricks. It's possible that these don't work in \" + 'your browser. Try triggering the error in production mode, ' + 'or switching to a modern browser. If you suspect that this is ' + 'actually an issue with React, please file an issue.');\n } else if (isCrossOriginError) {\n // eslint-disable-next-line react-internal/prod-error-codes\n error = new Error(\"A cross-origin error was thrown. React doesn't have access to \" + 'the actual error object in development. ' + 'See https://reactjs.org/link/crossorigin-error for more information.');\n }\n this.onError(error);\n } // Remove our event listeners\n\n window.removeEventListener('error', handleWindowError);\n if (!didCall) {\n // Something went really wrong, and our event was not dispatched.\n // https://github.com/facebook/react/issues/16734\n // https://github.com/facebook/react/issues/16585\n // Fall back to the production implementation.\n restoreAfterDispatch();\n return invokeGuardedCallbackProd.apply(this, arguments);\n }\n };\n }\n }\n var invokeGuardedCallbackImpl$1 = invokeGuardedCallbackImpl;\n var hasError = false;\n var caughtError = null; // Used by event system to capture/rethrow the first error.\n\n var hasRethrowError = false;\n var rethrowError = null;\n var reporter = {\n onError: function (error) {\n hasError = true;\n caughtError = error;\n }\n };\n /**\n * Call a function while guarding against errors that happens within it.\n * Returns an error if it throws, otherwise null.\n *\n * In production, this is implemented using a try-catch. The reason we don't\n * use a try-catch directly is so that we can swap out a different\n * implementation in DEV mode.\n *\n * @param {String} name of the guard to use for logging or debugging\n * @param {Function} func The function to invoke\n * @param {*} context The context to use when calling the function\n * @param {...*} args Arguments for function\n */\n\n function invokeGuardedCallback(name, func, context, a, b, c, d, e, f) {\n hasError = false;\n caughtError = null;\n invokeGuardedCallbackImpl$1.apply(reporter, arguments);\n }\n /**\n * Same as invokeGuardedCallback, but instead of returning an error, it stores\n * it in a global so it can be rethrown by `rethrowCaughtError` later.\n * TODO: See if caughtError and rethrowError can be unified.\n *\n * @param {String} name of the guard to use for logging or debugging\n * @param {Function} func The function to invoke\n * @param {*} context The context to use when calling the function\n * @param {...*} args Arguments for function\n */\n\n function invokeGuardedCallbackAndCatchFirstError(name, func, context, a, b, c, d, e, f) {\n invokeGuardedCallback.apply(this, arguments);\n if (hasError) {\n var error = clearCaughtError();\n if (!hasRethrowError) {\n hasRethrowError = true;\n rethrowError = error;\n }\n }\n }\n /**\n * During execution of guarded functions we will capture the first error which\n * we will rethrow to be handled by the top level error handler.\n */\n\n function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n }\n function clearCaughtError() {\n if (hasError) {\n var error = caughtError;\n hasError = false;\n caughtError = null;\n return error;\n } else {\n throw new Error('clearCaughtError was called but no error was captured. This error ' + 'is likely caused by a bug in React. Please file an issue.');\n }\n }\n var isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare\n\n function isArray(a) {\n return isArrayImpl(a);\n }\n var SecretInternals = ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n var EventInternals = SecretInternals.Events;\n var getInstanceFromNode = EventInternals[0];\n var getNodeFromInstance = EventInternals[1];\n var getFiberCurrentPropsFromNode = EventInternals[2];\n var enqueueStateRestore = EventInternals[3];\n var restoreStateIfNeeded = EventInternals[4];\n var reactAct = React.unstable_act;\n function Event(suffix) {}\n var hasWarnedAboutDeprecatedMockComponent = false;\n /**\n * @class ReactTestUtils\n */\n\n function findAllInRenderedFiberTreeInternal(fiber, test) {\n if (!fiber) {\n return [];\n }\n var currentParent = findCurrentFiberUsingSlowPath(fiber);\n if (!currentParent) {\n return [];\n }\n var node = currentParent;\n var ret = [];\n while (true) {\n if (node.tag === HostComponent || node.tag === HostText || node.tag === ClassComponent || node.tag === FunctionComponent) {\n var publicInst = node.stateNode;\n if (test(publicInst)) {\n ret.push(publicInst);\n }\n }\n if (node.child) {\n node.child.return = node;\n node = node.child;\n continue;\n }\n if (node === currentParent) {\n return ret;\n }\n while (!node.sibling) {\n if (!node.return || node.return === currentParent) {\n return ret;\n }\n node = node.return;\n }\n node.sibling.return = node.return;\n node = node.sibling;\n }\n }\n function validateClassInstance(inst, methodName) {\n if (!inst) {\n // This is probably too relaxed but it's existing behavior.\n return;\n }\n if (get(inst)) {\n // This is a public instance indeed.\n return;\n }\n var received;\n var stringified = String(inst);\n if (isArray(inst)) {\n received = 'an array';\n } else if (inst && inst.nodeType === ELEMENT_NODE && inst.tagName) {\n received = 'a DOM node';\n } else if (stringified === '[object Object]') {\n received = 'object with keys {' + Object.keys(inst).join(', ') + '}';\n } else {\n received = stringified;\n }\n throw new Error(methodName + \"(...): the first argument must be a React class instance. \" + (\"Instead received: \" + received + \".\"));\n }\n /**\n * Utilities for making it easy to test React components.\n *\n * See https://reactjs.org/docs/test-utils.html\n *\n * Todo: Support the entire DOM.scry query syntax. For now, these simple\n * utilities will suffice for testing purposes.\n * @lends ReactTestUtils\n */\n\n var didWarnAboutReactTestUtilsDeprecation = false;\n function renderIntoDocument(element) {\n {\n if (!didWarnAboutReactTestUtilsDeprecation) {\n didWarnAboutReactTestUtilsDeprecation = true;\n error('ReactDOMTestUtils is deprecated and will be removed in a future ' + 'major release, because it exposes internal implementation details ' + 'that are highly likely to change between releases. Upgrade to a ' + 'modern testing library, such as @testing-library/react. See ' + 'https://react.dev/warnings/react-dom-test-utils for more info.');\n }\n }\n var div = document.createElement('div'); // None of our tests actually require attaching the container to the\n // DOM, and doing so creates a mess that we rely on test isolation to\n // clean up, so we're going to stop honoring the name of this method\n // (and probably rename it eventually) if no problems arise.\n // document.documentElement.appendChild(div);\n\n return ReactDOM.render(element, div);\n }\n function isElement(element) {\n return React.isValidElement(element);\n }\n function isElementOfType(inst, convenienceConstructor) {\n return React.isValidElement(inst) && inst.type === convenienceConstructor;\n }\n function isDOMComponent(inst) {\n return !!(inst && inst.nodeType === ELEMENT_NODE && inst.tagName);\n }\n function isDOMComponentElement(inst) {\n return !!(inst && React.isValidElement(inst) && !!inst.tagName);\n }\n function isCompositeComponent(inst) {\n if (isDOMComponent(inst)) {\n // Accessing inst.setState warns; just return false as that'll be what\n // this returns when we have DOM nodes as refs directly\n return false;\n }\n return inst != null && typeof inst.render === 'function' && typeof inst.setState === 'function';\n }\n function isCompositeComponentWithType(inst, type) {\n if (!isCompositeComponent(inst)) {\n return false;\n }\n var internalInstance = get(inst);\n var constructor = internalInstance.type;\n return constructor === type;\n }\n function findAllInRenderedTree(inst, test) {\n validateClassInstance(inst, 'findAllInRenderedTree');\n if (!inst) {\n return [];\n }\n var internalInstance = get(inst);\n return findAllInRenderedFiberTreeInternal(internalInstance, test);\n }\n /**\n * Finds all instances of components in the rendered tree that are DOM\n * components with the class name matching `className`.\n * @return {array} an array of all the matches.\n */\n\n function scryRenderedDOMComponentsWithClass(root, classNames) {\n validateClassInstance(root, 'scryRenderedDOMComponentsWithClass');\n return findAllInRenderedTree(root, function (inst) {\n if (isDOMComponent(inst)) {\n var className = inst.className;\n if (typeof className !== 'string') {\n // SVG, probably.\n className = inst.getAttribute('class') || '';\n }\n var classList = className.split(/\\s+/);\n if (!isArray(classNames)) {\n if (classNames === undefined) {\n throw new Error('TestUtils.scryRenderedDOMComponentsWithClass expects a ' + 'className as a second argument.');\n }\n classNames = classNames.split(/\\s+/);\n }\n return classNames.every(function (name) {\n return classList.indexOf(name) !== -1;\n });\n }\n return false;\n });\n }\n /**\n * Like scryRenderedDOMComponentsWithClass but expects there to be one result,\n * and returns that one result, or throws exception if there is any other\n * number of matches besides one.\n * @return {!ReactDOMComponent} The one match.\n */\n\n function findRenderedDOMComponentWithClass(root, className) {\n validateClassInstance(root, 'findRenderedDOMComponentWithClass');\n var all = scryRenderedDOMComponentsWithClass(root, className);\n if (all.length !== 1) {\n throw new Error('Did not find exactly one match (found: ' + all.length + ') ' + 'for class:' + className);\n }\n return all[0];\n }\n /**\n * Finds all instances of components in the rendered tree that are DOM\n * components with the tag name matching `tagName`.\n * @return {array} an array of all the matches.\n */\n\n function scryRenderedDOMComponentsWithTag(root, tagName) {\n validateClassInstance(root, 'scryRenderedDOMComponentsWithTag');\n return findAllInRenderedTree(root, function (inst) {\n return isDOMComponent(inst) && inst.tagName.toUpperCase() === tagName.toUpperCase();\n });\n }\n /**\n * Like scryRenderedDOMComponentsWithTag but expects there to be one result,\n * and returns that one result, or throws exception if there is any other\n * number of matches besides one.\n * @return {!ReactDOMComponent} The one match.\n */\n\n function findRenderedDOMComponentWithTag(root, tagName) {\n validateClassInstance(root, 'findRenderedDOMComponentWithTag');\n var all = scryRenderedDOMComponentsWithTag(root, tagName);\n if (all.length !== 1) {\n throw new Error('Did not find exactly one match (found: ' + all.length + ') ' + 'for tag:' + tagName);\n }\n return all[0];\n }\n /**\n * Finds all instances of components with type equal to `componentType`.\n * @return {array} an array of all the matches.\n */\n\n function scryRenderedComponentsWithType(root, componentType) {\n validateClassInstance(root, 'scryRenderedComponentsWithType');\n return findAllInRenderedTree(root, function (inst) {\n return isCompositeComponentWithType(inst, componentType);\n });\n }\n /**\n * Same as `scryRenderedComponentsWithType` but expects there to be one result\n * and returns that one result, or throws exception if there is any other\n * number of matches besides one.\n * @return {!ReactComponent} The one match.\n */\n\n function findRenderedComponentWithType(root, componentType) {\n validateClassInstance(root, 'findRenderedComponentWithType');\n var all = scryRenderedComponentsWithType(root, componentType);\n if (all.length !== 1) {\n throw new Error('Did not find exactly one match (found: ' + all.length + ') ' + 'for componentType:' + componentType);\n }\n return all[0];\n }\n /**\n * Pass a mocked component module to this method to augment it with\n * useful methods that allow it to be used as a dummy React component.\n * Instead of rendering as usual, the component will become a simple\n *