UNPKG

@uva-glass/component-library

Version:

React components UvA

1,149 lines (1,147 loc) 42.7 kB
import { g as xt } from "./_commonjsHelpers-DaMA6jEr.js"; import lt from "react"; import ct from "react-dom"; function Nt(g, P) { for (var _ = 0; _ < P.length; _++) { const I = P[_]; if (typeof I != "string" && !Array.isArray(I)) { for (const R in I) if (R !== "default" && !(R in g)) { const m = Object.getOwnPropertyDescriptor(I, R); m && Object.defineProperty(g, R, m.get ? m : { enumerable: !0, get: () => I[R] }); } } } return Object.freeze(Object.defineProperty(g, Symbol.toStringTag, { value: "Module" })); } var De = { exports: {} }, v = {}; /** * @license React * react-dom-test-utils.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 it; function Kt() { if (it) return v; it = 1; var g = lt, P = ct; function _(t) { var i = t, o = t; if (t.alternate) for (; i.return; ) i = i.return; else { t = i; do i = t, (i.flags & 4098) !== 0 && (o = i.return), t = i.return; while (t); } return i.tag === 3 ? o : null; } function I(t) { if (_(t) !== t) throw Error("Unable to find node on an unmounted component."); } function R(t) { var i = t.alternate; if (!i) { if (i = _(t), i === null) throw Error("Unable to find node on an unmounted component."); return i !== t ? null : t; } for (var o = t, s = i; ; ) { var f = o.return; if (f === null) break; var d = f.alternate; if (d === null) { if (s = f.return, s !== null) { o = s; continue; } break; } if (f.child === d.child) { for (d = f.child; d; ) { if (d === o) return I(f), t; if (d === s) return I(f), i; d = d.sibling; } throw Error("Unable to find node on an unmounted component."); } if (o.return !== s.return) o = f, s = d; else { for (var l = !1, p = f.child; p; ) { if (p === o) { l = !0, o = f, s = d; break; } if (p === s) { l = !0, s = f, o = d; break; } p = p.sibling; } if (!l) { for (p = d.child; p; ) { if (p === o) { l = !0, o = d, s = f; break; } if (p === s) { l = !0, s = d, o = f; break; } p = p.sibling; } if (!l) throw Error("Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue."); } } if (o.alternate !== s) throw Error("Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue."); } if (o.tag !== 3) throw Error("Unable to find node on an unmounted component."); return o.stateNode.current === o ? t : i; } var m = Object.assign; function F(t) { var i = t.keyCode; return "charCode" in t ? (t = t.charCode, t === 0 && i === 13 && (t = 13)) : t = i, t === 10 && (t = 13), 32 <= t || t === 13 ? t : 0; } function B() { return !0; } function le() { return !1; } function w(t) { function i(o, s, f, d, l) { this._reactName = o, this._targetInst = f, this.type = s, this.nativeEvent = d, this.target = l, this.currentTarget = null; for (var p in t) t.hasOwnProperty(p) && (o = t[p], this[p] = o ? o(d) : d[p]); return this.isDefaultPrevented = (d.defaultPrevented != null ? d.defaultPrevented : d.returnValue === !1) ? B : le, this.isPropagationStopped = le, this; } return m(i.prototype, { preventDefault: function() { this.defaultPrevented = !0; var o = this.nativeEvent; o && (o.preventDefault ? o.preventDefault() : typeof o.returnValue != "unknown" && (o.returnValue = !1), this.isDefaultPrevented = B); }, stopPropagation: function() { var o = this.nativeEvent; o && (o.stopPropagation ? o.stopPropagation() : typeof o.cancelBubble != "unknown" && (o.cancelBubble = !0), this.isPropagationStopped = B); }, persist: function() { }, isPersistent: B }), i; } var U = { eventPhase: 0, bubbles: 0, cancelable: 0, timeStamp: function(t) { return t.timeStamp || Date.now(); }, defaultPrevented: 0, isTrusted: 0 }, ke = w(U), Y = m({}, U, { view: 0, detail: 0 }); w(Y); var ne, re, x, X = m({}, Y, { screenX: 0, screenY: 0, clientX: 0, clientY: 0, pageX: 0, pageY: 0, ctrlKey: 0, shiftKey: 0, altKey: 0, metaKey: 0, getModifierState: V, button: 0, buttons: 0, relatedTarget: function(t) { return t.relatedTarget === void 0 ? t.fromElement === t.srcElement ? t.toElement : t.fromElement : t.relatedTarget; }, movementX: function(t) { return "movementX" in t ? t.movementX : (t !== x && (x && t.type === "mousemove" ? (ne = t.screenX - x.screenX, re = t.screenY - x.screenY) : re = ne = 0, x = t), ne); }, movementY: function(t) { return "movementY" in t ? t.movementY : re; } }); w(X); var Te = m({}, X, { dataTransfer: 0 }); w(Te); var E = m({}, Y, { relatedTarget: 0 }); w(E); var oe = m({}, U, { animationName: 0, elapsedTime: 0, pseudoElement: 0 }); w(oe); var $ = m({}, U, { clipboardData: function(t) { return "clipboardData" in t ? t.clipboardData : window.clipboardData; } }); w($); var ce = m({}, U, { data: 0 }); w(ce); var b = { Esc: "Escape", Spacebar: " ", Left: "ArrowLeft", Up: "ArrowUp", Right: "ArrowRight", Down: "ArrowDown", Del: "Delete", Win: "OS", Menu: "ContextMenu", Apps: "ContextMenu", Scroll: "ScrollLock", MozPrintableKey: "Unidentified" }, N = { 8: "Backspace", 9: "Tab", 12: "Clear", 13: "Enter", 16: "Shift", 17: "Control", 18: "Alt", 19: "Pause", 20: "CapsLock", 27: "Escape", 32: " ", 33: "PageUp", 34: "PageDown", 35: "End", 36: "Home", 37: "ArrowLeft", 38: "ArrowUp", 39: "ArrowRight", 40: "ArrowDown", 45: "Insert", 46: "Delete", 112: "F1", 113: "F2", 114: "F3", 115: "F4", 116: "F5", 117: "F6", 118: "F7", 119: "F8", 120: "F9", 121: "F10", 122: "F11", 123: "F12", 144: "NumLock", 145: "ScrollLock", 224: "Meta" }, Me = { Alt: "altKey", Control: "ctrlKey", Meta: "metaKey", Shift: "shiftKey" }; function j(t) { var i = this.nativeEvent; return i.getModifierState ? i.getModifierState(t) : (t = Me[t]) ? !!i[t] : !1; } function V() { return j; } var ae = m({}, Y, { key: function(t) { if (t.key) { var i = b[t.key] || t.key; if (i !== "Unidentified") return i; } return t.type === "keypress" ? (t = F(t), t === 13 ? "Enter" : String.fromCharCode(t)) : t.type === "keydown" || t.type === "keyup" ? N[t.keyCode] || "Unidentified" : ""; }, code: 0, location: 0, ctrlKey: 0, shiftKey: 0, altKey: 0, metaKey: 0, repeat: 0, locale: 0, getModifierState: V, charCode: function(t) { return t.type === "keypress" ? F(t) : 0; }, keyCode: function(t) { return t.type === "keydown" || t.type === "keyup" ? t.keyCode : 0; }, which: function(t) { return t.type === "keypress" ? F(t) : t.type === "keydown" || t.type === "keyup" ? t.keyCode : 0; } }); w(ae); var q = m({}, X, { pointerId: 0, width: 0, height: 0, pressure: 0, tangentialPressure: 0, tiltX: 0, tiltY: 0, twist: 0, pointerType: 0, isPrimary: 0 }); w(q); var Re = m({}, Y, { touches: 0, targetTouches: 0, changedTouches: 0, altKey: 0, metaKey: 0, ctrlKey: 0, shiftKey: 0, getModifierState: V }); w(Re); var Z = m({}, U, { propertyName: 0, elapsedTime: 0, pseudoElement: 0 }); w(Z); var Oe = m({}, X, { deltaX: function(t) { return "deltaX" in t ? t.deltaX : "wheelDeltaX" in t ? -t.wheelDeltaX : 0; }, deltaY: function(t) { return "deltaY" in t ? t.deltaY : "wheelDeltaY" in t ? -t.wheelDeltaY : "wheelDelta" in t ? -t.wheelDelta : 0; }, deltaZ: 0, deltaMode: 0 }); w(Oe); function Se(t, i, o, s, f, d, l, p, D) { var S = Array.prototype.slice.call(arguments, 3); try { i.apply(o, S); } catch (Fe) { this.onError(Fe); } } var z = !1, J = null, Q = !1, ie = null, Pe = { onError: function(t) { z = !0, J = t; } }; function Ie(t, i, o, s, f, d, l, p, D) { z = !1, J = null, Se.apply(Pe, arguments); } function _e(t, i, o, s, f, d, l, p, D) { if (Ie.apply(this, arguments), z) { if (z) { var S = J; z = !1, J = null; } else throw Error("clearCaughtError was called but no error was captured. This error is likely caused by a bug in React. Please file an issue."); Q || (Q = !0, ie = S); } } var se = Array.isArray, L = P.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Events, Ue = L[0], Le = L[1], Ae = L[2], We = L[3], xe = L[4], fe = g.unstable_act; function de() { } function pe(t, i) { if (!t) return []; if (t = R(t), !t) return []; for (var o = t, s = []; ; ) { if (o.tag === 5 || o.tag === 6 || o.tag === 1 || o.tag === 0) { var f = o.stateNode; i(f) && s.push(f); } if (o.child) o.child.return = o, o = o.child; else { if (o === t) return s; for (; !o.sibling; ) { if (!o.return || o.return === t) return s; o = o.return; } o.sibling.return = o.return, o = o.sibling; } } } function O(t, i) { if (t && !t._reactInternals) { var o = String(t); throw t = se(t) ? "an array" : t && t.nodeType === 1 && t.tagName ? "a DOM node" : o === "[object Object]" ? "object with keys {" + Object.keys(t).join(", ") + "}" : o, Error(i + "(...): the first argument must be a React class instance. Instead received: " + (t + ".")); } } function ee(t) { return !(!t || t.nodeType !== 1 || !t.tagName); } function A(t) { return ee(t) ? !1 : t != null && typeof t.render == "function" && typeof t.setState == "function"; } function G(t, i) { return A(t) ? t._reactInternals.type === i : !1; } function W(t, i) { return O(t, "findAllInRenderedTree"), t ? pe(t._reactInternals, i) : []; } function te(t, i) { return O(t, "scryRenderedDOMComponentsWithClass"), W(t, function(o) { if (ee(o)) { var s = o.className; typeof s != "string" && (s = o.getAttribute("class") || ""); var f = s.split(/\s+/); if (!se(i)) { if (i === void 0) throw Error("TestUtils.scryRenderedDOMComponentsWithClass expects a className as a second argument."); i = i.split(/\s+/); } return i.every(function(d) { return f.indexOf(d) !== -1; }); } return !1; }); } function he(t, i) { return O(t, "scryRenderedDOMComponentsWithTag"), W(t, function(o) { return ee(o) && o.tagName.toUpperCase() === i.toUpperCase(); }); } function me(t, i) { return O(t, "scryRenderedComponentsWithType"), W(t, function(o) { return G(o, i); }); } function ve(t, i, o) { var s = t.type || "unknown-event"; t.currentTarget = Le(o), _e(s, i, void 0, t), t.currentTarget = null; } function ye(t, i, o) { for (var s = []; t; ) { s.push(t); do t = t.return; while (t && t.tag !== 5); t = t || null; } for (t = s.length; 0 < t--; ) i(s[t], "captured", o); for (t = 0; t < s.length; t++) i(s[t], "bubbled", o); } function ge(t, i) { var o = t.stateNode; if (!o) return null; var s = Ae(o); if (!s) return null; o = s[i]; e: switch (i) { case "onClick": case "onClickCapture": case "onDoubleClick": case "onDoubleClickCapture": case "onMouseDown": case "onMouseDownCapture": case "onMouseMove": case "onMouseMoveCapture": case "onMouseUp": case "onMouseUpCapture": case "onMouseEnter": (s = !s.disabled) || (t = t.type, s = !(t === "button" || t === "input" || t === "select" || t === "textarea")), t = !s; break e; default: t = !1; } if (t) return null; if (o && typeof o != "function") throw Error("Expected `" + i + "` listener to be a function, instead got a value of `" + typeof o + "` type."); return o; } function Ne(t, i, o) { t && o && o._reactName && (i = ge(t, o._reactName)) && (o._dispatchListeners == null && (o._dispatchListeners = []), o._dispatchInstances == null && (o._dispatchInstances = []), o._dispatchListeners.push(i), o._dispatchInstances.push(t)); } function ue(t, i, o) { var s = o._reactName; i === "captured" && (s += "Capture"), (i = ge(t, s)) && (o._dispatchListeners == null && (o._dispatchListeners = []), o._dispatchInstances == null && (o._dispatchInstances = []), o._dispatchListeners.push(i), o._dispatchInstances.push(t)); } var we = {}, H = /* @__PURE__ */ new Set(["mouseEnter", "mouseLeave", "pointerEnter", "pointerLeave"]); function Ke(t) { return function(i, o) { if (g.isValidElement(i)) throw Error("TestUtils.Simulate expected a DOM node as the first argument but received a React element. Pass the DOM node you wish to simulate the event on instead. Note that TestUtils.Simulate will not work if you are using shallow rendering."); if (A(i)) throw Error("TestUtils.Simulate expected a DOM node as the first argument but received a component instance. Pass the DOM node you wish to simulate the event on instead."); var s = "on" + t[0].toUpperCase() + t.slice(1), f = new de(); f.target = i, f.type = t.toLowerCase(); var d = Ue(i), l = new ke(s, f.type, d, f, i); l.persist(), m(l, o), H.has(t) ? l && l._reactName && Ne(l._targetInst, null, l) : l && l._reactName && ye(l._targetInst, ue, l), P.unstable_batchedUpdates(function() { if (We(i), l) { var p = l._dispatchListeners, D = l._dispatchInstances; if (se(p)) for (var S = 0; S < p.length && !l.isPropagationStopped(); S++) ve(l, p[S], D[S]); else p && ve(l, p, D); l._dispatchListeners = null, l._dispatchInstances = null, l.isPersistent() || l.constructor.release(l); } if (Q) throw p = ie, Q = !1, ie = null, p; }), xe(); }; } return "blur cancel click close contextMenu copy cut auxClick doubleClick dragEnd dragStart drop focus input invalid keyDown keyPress keyUp mouseDown mouseUp paste pause play pointerCancel pointerDown pointerUp rateChange reset resize seeked submit touchCancel touchEnd touchStart volumeChange drag dragEnter dragExit dragLeave dragOver mouseMove mouseOut mouseOver pointerMove pointerOut pointerOver scroll toggle touchMove wheel abort animationEnd animationIteration animationStart canPlay canPlayThrough durationChange emptied encrypted ended error gotPointerCapture load loadedData loadedMetadata loadStart lostPointerCapture playing progress seeking stalled suspend timeUpdate transitionEnd waiting mouseEnter mouseLeave pointerEnter pointerLeave change select beforeInput compositionEnd compositionStart compositionUpdate".split(" ").forEach(function(t) { we[t] = Ke(t); }), v.Simulate = we, v.act = fe, v.findAllInRenderedTree = W, v.findRenderedComponentWithType = function(t, i) { if (O(t, "findRenderedComponentWithType"), t = me(t, i), t.length !== 1) throw Error("Did not find exactly one match (found: " + t.length + ") for componentType:" + i); return t[0]; }, v.findRenderedDOMComponentWithClass = function(t, i) { if (O(t, "findRenderedDOMComponentWithClass"), t = te(t, i), t.length !== 1) throw Error("Did not find exactly one match (found: " + t.length + ") for class:" + i); return t[0]; }, v.findRenderedDOMComponentWithTag = function(t, i) { if (O(t, "findRenderedDOMComponentWithTag"), t = he(t, i), t.length !== 1) throw Error("Did not find exactly one match (found: " + t.length + ") for tag:" + i); return t[0]; }, v.isCompositeComponent = A, v.isCompositeComponentWithType = G, v.isDOMComponent = ee, v.isDOMComponentElement = function(t) { return !!(t && g.isValidElement(t) && t.tagName); }, v.isElement = function(t) { return g.isValidElement(t); }, v.isElementOfType = function(t, i) { return g.isValidElement(t) && t.type === i; }, v.mockComponent = function(t, i) { return i = i || t.mockTagName || "div", t.prototype.render.mockImplementation(function() { return g.createElement(i, null, this.props.children); }), this; }, v.nativeTouchData = function(t, i) { return { touches: [{ pageX: t, pageY: i }] }; }, v.renderIntoDocument = function(t) { var i = document.createElement("div"); return P.render(t, i); }, v.scryRenderedComponentsWithType = me, v.scryRenderedDOMComponentsWithClass = te, v.scryRenderedDOMComponentsWithTag = he, v.traverseTwoPhase = ye, v; } var y = {}; /** * @license React * react-dom-test-utils.development.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 st; function Ft() { return st || (st = 1, process.env.NODE_ENV !== "production" && function() { var g = lt, P = ct, _ = g.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; function I(e) { { for (var n = arguments.length, r = new Array(n > 1 ? n - 1 : 0), a = 1; a < n; a++) r[a - 1] = arguments[a]; m("warn", e, r); } } function R(e) { { for (var n = arguments.length, r = new Array(n > 1 ? n - 1 : 0), a = 1; a < n; a++) r[a - 1] = arguments[a]; m("error", e, r); } } function m(e, n, r) { { var a = _.ReactDebugCurrentFrame, u = a.getStackAddendum(); u !== "" && (n += "%s", r = r.concat([u])); var c = r.map(function(h) { return String(h); }); c.unshift("Warning: " + n), Function.prototype.apply.call(console[e], console, c); } } function F(e) { return e._reactInternals; } var B = 0, le = 1, w = 3, U = 5, ke = 6, Y = ( /* */ 0 ), ne = ( /* */ 2 ), re = ( /* */ 4096 ); _.ReactCurrentOwner; function x(e) { var n = e, r = e; if (e.alternate) for (; n.return; ) n = n.return; else { var a = n; do n = a, (n.flags & (ne | re)) !== Y && (r = n.return), a = n.return; while (a); } return n.tag === w ? r : null; } function X(e) { if (x(e) !== e) throw new Error("Unable to find node on an unmounted component."); } function Te(e) { var n = e.alternate; if (!n) { var r = x(e); if (r === null) throw new Error("Unable to find node on an unmounted component."); return r !== e ? null : e; } for (var a = e, u = n; ; ) { var c = a.return; if (c === null) break; var h = c.alternate; if (h === null) { var T = c.return; if (T !== null) { a = u = T; continue; } break; } if (c.child === h.child) { for (var M = c.child; M; ) { if (M === a) return X(c), e; if (M === u) return X(c), n; M = M.sibling; } throw new Error("Unable to find node on an unmounted component."); } if (a.return !== u.return) a = c, u = h; else { for (var k = !1, C = c.child; C; ) { if (C === a) { k = !0, a = c, u = h; break; } if (C === u) { k = !0, u = c, a = h; break; } C = C.sibling; } if (!k) { for (C = h.child; C; ) { if (C === a) { k = !0, a = h, u = c; break; } if (C === u) { k = !0, u = h, a = c; break; } C = C.sibling; } if (!k) 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."); } } if (a.alternate !== u) 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."); } if (a.tag !== w) throw new Error("Unable to find node on an unmounted component."); return a.stateNode.current === a ? e : n; } var E = Object.assign; function oe(e) { var n, r = e.keyCode; return "charCode" in e ? (n = e.charCode, n === 0 && r === 13 && (n = 13)) : n = r, n === 10 && (n = 13), n >= 32 || n === 13 ? n : 0; } function $() { return !0; } function ce() { return !1; } function b(e) { function n(r, a, u, c, h) { this._reactName = r, this._targetInst = u, this.type = a, this.nativeEvent = c, this.target = h, this.currentTarget = null; for (var T in e) if (e.hasOwnProperty(T)) { var M = e[T]; M ? this[T] = M(c) : this[T] = c[T]; } var k = c.defaultPrevented != null ? c.defaultPrevented : c.returnValue === !1; return k ? this.isDefaultPrevented = $ : this.isDefaultPrevented = ce, this.isPropagationStopped = ce, this; } return E(n.prototype, { preventDefault: function() { this.defaultPrevented = !0; var r = this.nativeEvent; r && (r.preventDefault ? r.preventDefault() : typeof r.returnValue != "unknown" && (r.returnValue = !1), this.isDefaultPrevented = $); }, stopPropagation: function() { var r = this.nativeEvent; r && (r.stopPropagation ? r.stopPropagation() : typeof r.cancelBubble != "unknown" && (r.cancelBubble = !0), this.isPropagationStopped = $); }, /** * We release all dispatched `SyntheticEvent`s after each event loop, adding * them back into the pool. This allows a way to hold onto a reference that * won't be added back into the pool. */ persist: function() { }, /** * Checks if this event should be released back into the pool. * * @return {boolean} True if this should not be released, false otherwise. */ isPersistent: $ }), n; } var N = { eventPhase: 0, bubbles: 0, cancelable: 0, timeStamp: function(e) { return e.timeStamp || Date.now(); }, defaultPrevented: 0, isTrusted: 0 }, Me = b(N), j = E({}, N, { view: 0, detail: 0 }); b(j); var V, ae, q; function Re(e) { e !== q && (q && e.type === "mousemove" ? (V = e.screenX - q.screenX, ae = e.screenY - q.screenY) : (V = 0, ae = 0), q = e); } var Z = E({}, j, { screenX: 0, screenY: 0, clientX: 0, clientY: 0, pageX: 0, pageY: 0, ctrlKey: 0, shiftKey: 0, altKey: 0, metaKey: 0, getModifierState: L, button: 0, buttons: 0, relatedTarget: function(e) { return e.relatedTarget === void 0 ? e.fromElement === e.srcElement ? e.toElement : e.fromElement : e.relatedTarget; }, movementX: function(e) { return "movementX" in e ? e.movementX : (Re(e), V); }, movementY: function(e) { return "movementY" in e ? e.movementY : ae; } }); b(Z); var Oe = E({}, Z, { dataTransfer: 0 }); b(Oe); var Se = E({}, j, { relatedTarget: 0 }); b(Se); var z = E({}, N, { animationName: 0, elapsedTime: 0, pseudoElement: 0 }); b(z); var J = E({}, N, { clipboardData: function(e) { return "clipboardData" in e ? e.clipboardData : window.clipboardData; } }); b(J); var Q = E({}, N, { data: 0 }); b(Q); var ie = { Esc: "Escape", Spacebar: " ", Left: "ArrowLeft", Up: "ArrowUp", Right: "ArrowRight", Down: "ArrowDown", Del: "Delete", Win: "OS", Menu: "ContextMenu", Apps: "ContextMenu", Scroll: "ScrollLock", MozPrintableKey: "Unidentified" }, Pe = { 8: "Backspace", 9: "Tab", 12: "Clear", 13: "Enter", 16: "Shift", 17: "Control", 18: "Alt", 19: "Pause", 20: "CapsLock", 27: "Escape", 32: " ", 33: "PageUp", 34: "PageDown", 35: "End", 36: "Home", 37: "ArrowLeft", 38: "ArrowUp", 39: "ArrowRight", 40: "ArrowDown", 45: "Insert", 46: "Delete", 112: "F1", 113: "F2", 114: "F3", 115: "F4", 116: "F5", 117: "F6", 118: "F7", 119: "F8", 120: "F9", 121: "F10", 122: "F11", 123: "F12", 144: "NumLock", 145: "ScrollLock", 224: "Meta" }; function Ie(e) { if (e.key) { var n = ie[e.key] || e.key; if (n !== "Unidentified") return n; } if (e.type === "keypress") { var r = oe(e); return r === 13 ? "Enter" : String.fromCharCode(r); } return e.type === "keydown" || e.type === "keyup" ? Pe[e.keyCode] || "Unidentified" : ""; } var _e = { Alt: "altKey", Control: "ctrlKey", Meta: "metaKey", Shift: "shiftKey" }; function se(e) { var n = this, r = n.nativeEvent; if (r.getModifierState) return r.getModifierState(e); var a = _e[e]; return a ? !!r[a] : !1; } function L(e) { return se; } var Ue = E({}, j, { key: Ie, code: 0, location: 0, ctrlKey: 0, shiftKey: 0, altKey: 0, metaKey: 0, repeat: 0, locale: 0, getModifierState: L, // Legacy Interface charCode: function(e) { return e.type === "keypress" ? oe(e) : 0; }, keyCode: function(e) { return e.type === "keydown" || e.type === "keyup" ? e.keyCode : 0; }, which: function(e) { return e.type === "keypress" ? oe(e) : e.type === "keydown" || e.type === "keyup" ? e.keyCode : 0; } }); b(Ue); var Le = E({}, Z, { pointerId: 0, width: 0, height: 0, pressure: 0, tangentialPressure: 0, tiltX: 0, tiltY: 0, twist: 0, pointerType: 0, isPrimary: 0 }); b(Le); var Ae = E({}, j, { touches: 0, targetTouches: 0, changedTouches: 0, altKey: 0, metaKey: 0, ctrlKey: 0, shiftKey: 0, getModifierState: L }); b(Ae); var We = E({}, N, { propertyName: 0, elapsedTime: 0, pseudoElement: 0 }); b(We); var xe = E({}, Z, { deltaX: function(e) { return "deltaX" in e ? e.deltaX : ( // Fallback to `wheelDeltaX` for Webkit and normalize (right is positive). "wheelDeltaX" in e ? -e.wheelDeltaX : 0 ); }, deltaY: function(e) { return "deltaY" in e ? e.deltaY : ( // Fallback to `wheelDeltaY` for Webkit and normalize (down is positive). "wheelDeltaY" in e ? -e.wheelDeltaY : ( // Fallback to `wheelDelta` for IE<9 and normalize (down is positive). "wheelDelta" in e ? -e.wheelDelta : 0 ) ); }, deltaZ: 0, // Browsers without "deltaMode" is reporting in raw wheel delta where one // notch on the scroll is always +/- 120, roughly equivalent to pixels. // A good approximation of DOM_DELTA_LINE (1) is 5% of viewport size or // ~40 pixels, for DOM_DELTA_SCREEN (2) it is 87.5% of viewport size. deltaMode: 0 }); b(xe); var fe = 1; function de(e, n, r, a, u, c, h, T, M) { var k = Array.prototype.slice.call(arguments, 3); try { n.apply(r, k); } catch (C) { this.onError(C); } } var pe = de; if (typeof window < "u" && typeof window.dispatchEvent == "function" && typeof document < "u" && typeof document.createEvent == "function") { var O = document.createElement("react"); pe = function(n, r, a, u, c, h, T, M, k) { if (typeof document > "u" || document === null) 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."); var C = document.createEvent("Event"), Xe = !1, Qe = !0, At = window.event, et = Object.getOwnPropertyDescriptor(window, "event"); function tt() { O.removeEventListener(je, nt, !1), typeof window.event < "u" && window.hasOwnProperty("event") && (window.event = At); } var Wt = Array.prototype.slice.call(arguments, 3); function nt() { Xe = !0, tt(), r.apply(a, Wt), Qe = !1; } var K, rt = !1, ot = !1; function at(be) { if (K = be.error, rt = !0, K === null && be.colno === 0 && be.lineno === 0 && (ot = !0), be.defaultPrevented && K != null && typeof K == "object") try { K._suppressLogging = !0; } catch { } } var je = "react-" + (n || "invokeguardedcallback"); if (window.addEventListener("error", at), O.addEventListener(je, nt, !1), C.initEvent(je, !1, !1), O.dispatchEvent(C), et && Object.defineProperty(window, "event", et), Xe && Qe && (rt ? ot && (K = 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.")) : K = 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.`), this.onError(K)), window.removeEventListener("error", at), !Xe) return tt(), de.apply(this, arguments); }; } var ee = pe, A = !1, G = null, W = !1, te = null, he = { onError: function(e) { A = !0, G = e; } }; function me(e, n, r, a, u, c, h, T, M) { A = !1, G = null, ee.apply(he, arguments); } function ve(e, n, r, a, u, c, h, T, M) { if (me.apply(this, arguments), A) { var k = ge(); W || (W = !0, te = k); } } function ye() { if (W) { var e = te; throw W = !1, te = null, e; } } function ge() { if (A) { var e = G; return A = !1, G = null, e; } else 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."); } var Ne = Array.isArray; function ue(e) { return Ne(e); } var we = P.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, H = we.Events, Ke = H[0], t = H[1], i = H[2], o = H[3], s = H[4], f = g.unstable_act; function d(e) { } var l = !1; function p(e, n) { if (!e) return []; var r = Te(e); if (!r) return []; for (var a = r, u = []; ; ) { if (a.tag === U || a.tag === ke || a.tag === le || a.tag === B) { var c = a.stateNode; n(c) && u.push(c); } if (a.child) { a.child.return = a, a = a.child; continue; } if (a === r) return u; for (; !a.sibling; ) { if (!a.return || a.return === r) return u; a = a.return; } a.sibling.return = a.return, a = a.sibling; } } function D(e, n) { if (e && !F(e)) { var r, a = String(e); throw ue(e) ? r = "an array" : e && e.nodeType === fe && e.tagName ? r = "a DOM node" : a === "[object Object]" ? r = "object with keys {" + Object.keys(e).join(", ") + "}" : r = a, new Error(n + "(...): the first argument must be a React class instance. " + ("Instead received: " + r + ".")); } } var S = !1; function Fe(e) { S || (S = !0, R("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.")); var n = document.createElement("div"); return P.render(e, n); } function dt(e) { return g.isValidElement(e); } function pt(e, n) { return g.isValidElement(e) && e.type === n; } function Ee(e) { return !!(e && e.nodeType === fe && e.tagName); } function ht(e) { return !!(e && g.isValidElement(e) && e.tagName); } function Ye(e) { return Ee(e) ? !1 : e != null && typeof e.render == "function" && typeof e.setState == "function"; } function Ve(e, n) { if (!Ye(e)) return !1; var r = F(e), a = r.type; return a === n; } function Ce(e, n) { if (D(e, "findAllInRenderedTree"), !e) return []; var r = F(e); return p(r, n); } function qe(e, n) { return D(e, "scryRenderedDOMComponentsWithClass"), Ce(e, function(r) { if (Ee(r)) { var a = r.className; typeof a != "string" && (a = r.getAttribute("class") || ""); var u = a.split(/\s+/); if (!ue(n)) { if (n === void 0) throw new Error("TestUtils.scryRenderedDOMComponentsWithClass expects a className as a second argument."); n = n.split(/\s+/); } return n.every(function(c) { return u.indexOf(c) !== -1; }); } return !1; }); } function mt(e, n) { D(e, "findRenderedDOMComponentWithClass"); var r = qe(e, n); if (r.length !== 1) throw new Error("Did not find exactly one match (found: " + r.length + ") for class:" + n); return r[0]; } function ze(e, n) { return D(e, "scryRenderedDOMComponentsWithTag"), Ce(e, function(r) { return Ee(r) && r.tagName.toUpperCase() === n.toUpperCase(); }); } function vt(e, n) { D(e, "findRenderedDOMComponentWithTag"); var r = ze(e, n); if (r.length !== 1) throw new Error("Did not find exactly one match (found: " + r.length + ") for tag:" + n); return r[0]; } function Ge(e, n) { return D(e, "scryRenderedComponentsWithType"), Ce(e, function(r) { return Ve(r, n); }); } function yt(e, n) { D(e, "findRenderedComponentWithType"); var r = Ge(e, n); if (r.length !== 1) throw new Error("Did not find exactly one match (found: " + r.length + ") for componentType:" + n); return r[0]; } function gt(e, n) { return l || (l = !0, I(`ReactTestUtils.mockComponent() is deprecated. Use shallow rendering or jest.mock() instead. See https://reactjs.org/link/test-utils-mock-component for more information.`)), n = n || e.mockTagName || "div", e.prototype.render.mockImplementation(function() { return g.createElement(n, null, this.props.children); }), this; } function wt(e, n) { return { touches: [{ pageX: e, pageY: n }] }; } function He(e, n, r) { var a = e.type || "unknown-event"; e.currentTarget = t(r), ve(a, n, void 0, e), e.currentTarget = null; } function Et(e) { var n = e._dispatchListeners, r = e._dispatchInstances; if (ue(n)) for (var a = 0; a < n.length && !e.isPropagationStopped(); a++) He(e, n[a], r[a]); else n && He(e, n, r); e._dispatchListeners = null, e._dispatchInstances = null; } var Ct = function(e) { e && (Et(e), e.isPersistent() || e.constructor.release(e)); }; function bt(e) { return e === "button" || e === "input" || e === "select" || e === "textarea"; } function Dt(e) { do e = e.return; while (e && e.tag !== U); return e || null; } function Be(e, n, r) { for (var a = []; e; ) a.push(e), e = Dt(e); var u; for (u = a.length; u-- > 0; ) n(a[u], "captured", r); for (u = 0; u < a.length; u++) n(a[u], "bubbled", r); } function kt(e, n, r) { switch (e) { case "onClick": case "onClickCapture": case "onDoubleClick": case "onDoubleClickCapture": case "onMouseDown": case "onMouseDownCapture": case "onMouseMove": case "onMouseMoveCapture": case "onMouseUp": case "onMouseUpCapture": case "onMouseEnter": return !!(r.disabled && bt(n)); default: return !1; } } function $e(e, n) { var r = e.stateNode; if (!r) return null; var a = i(r); if (!a) return null; var u = a[n]; if (kt(n, e.type, a)) return null; if (u && typeof u != "function") throw new Error("Expected `" + n + "` listener to be a function, instead got a value of `" + typeof u + "` type."); return u; } function Tt(e, n, r) { var a = n._reactName; return r === "captured" && (a += "Capture"), $e(e, a); } function Mt(e, n, r) { if (e && r && r._reactName) { var a = r._reactName, u = $e(e, a); u && (r._dispatchListeners == null && (r._dispatchListeners = []), r._dispatchInstances == null && (r._dispatchInstances = []), r._dispatchListeners.push(u), r._dispatchInstances.push(e)); } } function Rt(e, n, r) { e || R("Dispatching inst must not be null"); var a = Tt(e, r, n); a && (r._dispatchListeners == null && (r._dispatchListeners = []), r._dispatchInstances == null && (r._dispatchInstances = []), r._dispatchListeners.push(a), r._dispatchInstances.push(e)); } function Ot(e) { e && e._reactName && Mt(e._targetInst, null, e); } function St(e) { e && e._reactName && Be(e._targetInst, Rt, e); } var Ze = {}, Pt = /* @__PURE__ */ new Set(["mouseEnter", "mouseLeave", "pointerEnter", "pointerLeave"]); function It(e) { return function(n, r) { if (g.isValidElement(n)) throw new Error("TestUtils.Simulate expected a DOM node as the first argument but received a React element. Pass the DOM node you wish to simulate the event on instead. Note that TestUtils.Simulate will not work if you are using shallow rendering."); if (Ye(n)) throw new Error("TestUtils.Simulate expected a DOM node as the first argument but received a component instance. Pass the DOM node you wish to simulate the event on instead."); var a = "on" + e[0].toUpperCase() + e.slice(1), u = new d(); u.target = n, u.type = e.toLowerCase(); var c = Ke(n), h = new Me(a, u.type, c, u, n); h.persist(), E(h, r), Pt.has(e) ? Ot(h) : St(h), P.unstable_batchedUpdates(function() { o(n), Ct(h), ye(); }), s(); }; } var _t = ["blur", "cancel", "click", "close", "contextMenu", "copy", "cut", "auxClick", "doubleClick", "dragEnd", "dragStart", "drop", "focus", "input", "invalid", "keyDown", "keyPress", "keyUp", "mouseDown", "mouseUp", "paste", "pause", "play", "pointerCancel", "pointerDown", "pointerUp", "rateChange", "reset", "resize", "seeked", "submit", "touchCancel", "touchEnd", "touchStart", "volumeChange", "drag", "dragEnter", "dragExit", "dragLeave", "dragOver", "mouseMove", "mouseOut", "mouseOver", "pointerMove", "pointerOut", "pointerOver", "scroll", "toggle", "touchMove", "wheel", "abort", "animationEnd", "animationIteration", "animationStart", "canPlay", "canPlayThrough", "durationChange", "emptied", "encrypted", "ended", "error", "gotPointerCapture", "load", "loadedData", "loadedMetadata", "loadStart", "lostPointerCapture", "playing", "progress", "seeking", "stalled", "suspend", "timeUpdate", "transitionEnd", "waiting", "mouseEnter", "mouseLeave", "pointerEnter", "pointerLeave", "change", "select", "beforeInput", "compositionEnd", "compositionStart", "compositionUpdate"]; function Ut() { _t.forEach(function(e) { Ze[e] = It(e); }); } Ut(); var Je = !1, Lt = function(n) { return Je || (Je = !0, R("`ReactDOMTestUtils.act` is deprecated in favor of `React.act`. Import `act` from `react` instead of `react-dom/test-utils`. See https://react.dev/warnings/react-dom-test-utils for more info.")), f(n); }; y.Simulate = Ze, y.act = Lt, y.findAllInRenderedTree = Ce, y.findRenderedComponentWithType = yt, y.findRenderedDOMComponentWithClass = mt, y.findRenderedDOMComponentWithTag = vt, y.isCompositeComponent = Ye, y.isCompositeComponentWithType = Ve, y.isDOMComponent = Ee, y.isDOMComponentElement = ht, y.isElement = dt, y.isElementOfType = pt, y.mockComponent = gt, y.nativeTouchData = wt, y.renderIntoDocument = Fe, y.scryRenderedComponentsWithType = Ge, y.scryRenderedDOMComponentsWithClass = qe, y.scryRenderedDOMComponentsWithTag = ze, y.traverseTwoPhase = Be; }()), y; } var ut; function Yt() { return ut || (ut = 1, process.env.NODE_ENV === "production" ? De.exports = Kt() : De.exports = Ft()), De.exports; } var ft = Yt(); const Xt = /* @__PURE__ */ xt(ft), Gt = /* @__PURE__ */ Nt({ __proto__: null, default: Xt }, [ft]); export { ft as a, Gt as t }; //# sourceMappingURL=test-utils-B2AIdiiO.js.map