/** @license React v16.2.0 * react-dom-test-utils.production.min.js * * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ 'use strict';var f=require("object-assign"),h=require("react"),m=require("react-dom"),n=require("fbjs/lib/emptyFunction"),p=require("fbjs/lib/ExecutionEnvironment"); function q(a){for(var b=arguments.length-1,c="Minified React error #"+a+"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant\x3d"+a,d=0;dthis.eventPool.length&&this.eventPool.push(a)}function y(a){a.eventPool=[];a.getPooled=z;a.release=A}function B(a,b){var c={};c[a.toLowerCase()]=b.toLowerCase();c["Webkit"+a]="webkit"+b;c["Moz"+a]="moz"+b;c["ms"+a]="MS"+b;c["O"+a]="o"+b.toLowerCase();return c} var C={animationend:B("Animation","AnimationEnd"),animationiteration:B("Animation","AnimationIteration"),animationstart:B("Animation","AnimationStart"),transitionend:B("Transition","TransitionEnd")},D={},E={};p.canUseDOM&&(E=document.createElement("div").style,"AnimationEvent"in window||(delete C.animationend.animation,delete C.animationiteration.animation,delete C.animationstart.animation),"TransitionEvent"in window||delete C.transitionend.transition); function F(a){if(D[a])return D[a];if(!C[a])return a;var b=C[a],c;for(c in b)if(b.hasOwnProperty(c)&&c in E)return D[a]=b[c];return""} var G={topLevelTypes:{topAbort:"abort",topAnimationEnd:F("animationend")||"animationend",topAnimationIteration:F("animationiteration")||"animationiteration",topAnimationStart:F("animationstart")||"animationstart",topBlur:"blur",topCancel:"cancel",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topChange:"change",topClick:"click",topClose:"close",topCompositionEnd:"compositionend",topCompositionStart:"compositionstart",topCompositionUpdate:"compositionupdate",topContextMenu:"contextmenu",topCopy:"copy", topCut:"cut",topDoubleClick:"dblclick",topDrag:"drag",topDragEnd:"dragend",topDragEnter:"dragenter",topDragExit:"dragexit",topDragLeave:"dragleave",topDragOver:"dragover",topDragStart:"dragstart",topDrop:"drop",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topFocus:"focus",topInput:"input",topKeyDown:"keydown",topKeyPress:"keypress",topKeyUp:"keyup",topLoadedData:"loadeddata",topLoad:"load",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart", topMouseDown:"mousedown",topMouseMove:"mousemove",topMouseOut:"mouseout",topMouseOver:"mouseover",topMouseUp:"mouseup",topPaste:"paste",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topScroll:"scroll",topSeeked:"seeked",topSeeking:"seeking",topSelectionChange:"selectionchange",topStalled:"stalled",topSuspend:"suspend",topTextInput:"textInput",topTimeUpdate:"timeupdate",topToggle:"toggle",topTouchCancel:"touchcancel",topTouchEnd:"touchend",topTouchMove:"touchmove", topTouchStart:"touchstart",topTransitionEnd:F("transitionend")||"transitionend",topVolumeChange:"volumechange",topWaiting:"waiting",topWheel:"wheel"}},H=m.findDOMNode,I=m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,J=I.EventPluginHub,K=I.EventPluginRegistry,L=I.EventPropagators,M=I.ReactControlledComponent,N=I.ReactDOMComponentTree,O=I.ReactDOMEventListener,P=G.topLevelTypes;function Q(){} function R(a,b){if(!a)return[];a=u(a);if(!a)return[];for(var c=a,d=[];;){if(5===c.tag||6===c.tag||2===c.tag||1===c.tag){var e=c.stateNode;b(e)&&d.push(e)}if(c.child)c.child["return"]=c,c=c.child;else{if(c===a)return d;for(;!c.sibling;){if(!c["return"]||c["return"]===a)return d;c=c["return"]}c.sibling["return"]=c["return"];c=c.sibling}}} var S={renderIntoDocument:function(a){var b=document.createElement("div");return m.render(a,b)},isElement:function(a){return h.isValidElement(a)},isElementOfType:function(a,b){return h.isValidElement(a)&&a.type===b},isDOMComponent:function(a){return!(!a||1!==a.nodeType||!a.tagName)},isDOMComponentElement:function(a){return!!(a&&h.isValidElement(a)&&a.tagName)},isCompositeComponent:function(a){return S.isDOMComponent(a)?!1:null!=a&&"function"===typeof a.render&&"function"===typeof a.setState},isCompositeComponentWithType:function(a, b){return S.isCompositeComponent(a)?a._reactInternalFiber.type===b:!1},findAllInRenderedTree:function(a,b){if(!a)return[];S.isCompositeComponent(a)?void 0:q("10");return R(a._reactInternalFiber,b)},scryRenderedDOMComponentsWithClass:function(a,b){return S.findAllInRenderedTree(a,function(a){if(S.isDOMComponent(a)){var c=a.className;"string"!==typeof c&&(c=a.getAttribute("class")||"");var e=c.split(/\s+/);Array.isArray(b)||(void 0===b?q("11"):void 0,b=b.split(/\s+/));return b.every(function(a){return-1!== e.indexOf(a)})}return!1})},findRenderedDOMComponentWithClass:function(a,b){a=S.scryRenderedDOMComponentsWithClass(a,b);if(1!==a.length)throw Error("Did not find exactly one match (found: "+a.length+") for class:"+b);return a[0]},scryRenderedDOMComponentsWithTag:function(a,b){return S.findAllInRenderedTree(a,function(a){return S.isDOMComponent(a)&&a.tagName.toUpperCase()===b.toUpperCase()})},findRenderedDOMComponentWithTag:function(a,b){a=S.scryRenderedDOMComponentsWithTag(a,b);if(1!==a.length)throw Error("Did not find exactly one match (found: "+ a.length+") for tag:"+b);return a[0]},scryRenderedComponentsWithType:function(a,b){return S.findAllInRenderedTree(a,function(a){return S.isCompositeComponentWithType(a,b)})},findRenderedComponentWithType:function(a,b){a=S.scryRenderedComponentsWithType(a,b);if(1!==a.length)throw Error("Did not find exactly one match (found: "+a.length+") for componentType:"+b);return a[0]},mockComponent:function(a,b){b=b||a.mockTagName||"div";a.prototype.render.mockImplementation(function(){return h.createElement(b, null,this.props.children)});return this},simulateNativeEventOnNode:function(a,b,c){c.target=b;O.dispatchEvent(a,c)},simulateNativeEventOnDOMComponent:function(a,b,c){S.simulateNativeEventOnNode(a,H(b),c)},nativeTouchData:function(a,b){return{touches:[{pageX:a,pageY:b}]}},Simulate:null,SimulateNative:{}}; function T(a){return function(b,c){h.isValidElement(b)?q("228"):void 0;S.isCompositeComponent(b)?q("229"):void 0;var d=K.eventNameDispatchConfigs[a],e=new Q;e.target=b;e.type=a.toLowerCase();var l=N.getInstanceFromNode(b),g=new x(d,l,e,b);g.persist();f(g,c);d.phasedRegistrationNames?L.accumulateTwoPhaseDispatches(g):L.accumulateDirectDispatches(g);m.unstable_batchedUpdates(function(){M.enqueueStateRestore(b);J.enqueueEvents(g);J.processEventQueue(!0)})}} function U(){S.Simulate={};for(var a in K.eventNameDispatchConfigs)S.Simulate[a]=T(a)}var V=J.injection.injectEventPluginOrder;J.injection.injectEventPluginOrder=function(){V.apply(this,arguments);U()};var W=J.injection.injectEventPluginsByName;J.injection.injectEventPluginsByName=function(){W.apply(this,arguments);U()};U();function X(a){return function(b,c){var d=new Q(a);f(d,c);S.isDOMComponent(b)?S.simulateNativeEventOnDOMComponent(a,b,d):b.tagName&&S.simulateNativeEventOnNode(a,b,d)}} Object.keys(P).forEach(function(a){var b=0===a.indexOf("top")?a.charAt(3).toLowerCase()+a.substr(4):a;S.SimulateNative[b]=X(a)});var Y=Object.freeze({default:S}),Z=Y&&S||Y;module.exports=Z["default"]?Z["default"]:Z;