react-dom 16.3.3 → 16.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- /** @license React v16.3.3
1
+ /** @license React v16.4.0
2
2
  * react-dom-unstable-native-dependencies.development.js
3
3
  *
4
4
  * Copyright (c) 2013-present, Facebook, Inc.
@@ -215,17 +215,6 @@ var injection = {
215
215
  }
216
216
  };
217
217
 
218
- function isEndish(topLevelType) {
219
- return topLevelType === 'topMouseUp' || topLevelType === 'topTouchEnd' || topLevelType === 'topTouchCancel';
220
- }
221
-
222
- function isMoveish(topLevelType) {
223
- return topLevelType === 'topMouseMove' || topLevelType === 'topTouchMove';
224
- }
225
- function isStartish(topLevelType) {
226
- return topLevelType === 'topMouseDown' || topLevelType === 'topTouchStart';
227
- }
228
-
229
218
  var validateEventDispatches = void 0;
230
219
  {
231
220
  validateEventDispatches = function (event) {
@@ -329,7 +318,7 @@ var HostComponent = 5;
329
318
 
330
319
  function getParent(inst) {
331
320
  do {
332
- inst = inst['return'];
321
+ inst = inst.return;
333
322
  // TODO: If this is a HostRoot we might want to bail out.
334
323
  // That is depending on if we want nested subtrees (layers) to bubble
335
324
  // events to their parent. We could also go through parentNode on the
@@ -1013,6 +1002,35 @@ var ResponderSyntheticEvent = SyntheticEvent$1.extend({
1013
1002
  }
1014
1003
  });
1015
1004
 
1005
+ // Note: ideally these would be imported from DOMTopLevelEventTypes,
1006
+ // but our build system currently doesn't let us do that from a fork.
1007
+
1008
+ var TOP_TOUCH_START = 'touchstart';
1009
+ var TOP_TOUCH_MOVE = 'touchmove';
1010
+ var TOP_TOUCH_END = 'touchend';
1011
+ var TOP_TOUCH_CANCEL = 'touchcancel';
1012
+ var TOP_SCROLL = 'scroll';
1013
+ var TOP_SELECTION_CHANGE = 'selectionchange';
1014
+ var TOP_MOUSE_DOWN = 'mousedown';
1015
+ var TOP_MOUSE_MOVE = 'mousemove';
1016
+ var TOP_MOUSE_UP = 'mouseup';
1017
+
1018
+ function isStartish(topLevelType) {
1019
+ return topLevelType === TOP_TOUCH_START || topLevelType === TOP_MOUSE_DOWN;
1020
+ }
1021
+
1022
+ function isMoveish(topLevelType) {
1023
+ return topLevelType === TOP_TOUCH_MOVE || topLevelType === TOP_MOUSE_MOVE;
1024
+ }
1025
+
1026
+ function isEndish(topLevelType) {
1027
+ return topLevelType === TOP_TOUCH_END || topLevelType === TOP_TOUCH_CANCEL || topLevelType === TOP_MOUSE_UP;
1028
+ }
1029
+
1030
+ var startDependencies = [TOP_TOUCH_START, TOP_MOUSE_DOWN];
1031
+ var moveDependencies = [TOP_TOUCH_MOVE, TOP_MOUSE_MOVE];
1032
+ var endDependencies = [TOP_TOUCH_CANCEL, TOP_TOUCH_END, TOP_MOUSE_UP];
1033
+
1016
1034
  /**
1017
1035
  * Tracks the position and time of each active touch by `touch.identifier`. We
1018
1036
  * should typically only see IDs in the range of 1-20 because IDs get recycled
@@ -1213,11 +1231,6 @@ var responderInst = null;
1213
1231
  */
1214
1232
  var trackedTouchCount = 0;
1215
1233
 
1216
- /**
1217
- * Last reported number of active touches.
1218
- */
1219
- var previousActiveTouches = 0;
1220
-
1221
1234
  var changeResponder = function (nextResponderInst, blockHostResponder) {
1222
1235
  var oldResponderInst = responderInst;
1223
1236
  responderInst = nextResponderInst;
@@ -1235,7 +1248,8 @@ var eventTypes = {
1235
1248
  phasedRegistrationNames: {
1236
1249
  bubbled: 'onStartShouldSetResponder',
1237
1250
  captured: 'onStartShouldSetResponderCapture'
1238
- }
1251
+ },
1252
+ dependencies: startDependencies
1239
1253
  },
1240
1254
 
1241
1255
  /**
@@ -1251,7 +1265,8 @@ var eventTypes = {
1251
1265
  phasedRegistrationNames: {
1252
1266
  bubbled: 'onScrollShouldSetResponder',
1253
1267
  captured: 'onScrollShouldSetResponderCapture'
1254
- }
1268
+ },
1269
+ dependencies: [TOP_SCROLL]
1255
1270
  },
1256
1271
 
1257
1272
  /**
@@ -1265,7 +1280,8 @@ var eventTypes = {
1265
1280
  phasedRegistrationNames: {
1266
1281
  bubbled: 'onSelectionChangeShouldSetResponder',
1267
1282
  captured: 'onSelectionChangeShouldSetResponderCapture'
1268
- }
1283
+ },
1284
+ dependencies: [TOP_SELECTION_CHANGE]
1269
1285
  },
1270
1286
 
1271
1287
  /**
@@ -1276,22 +1292,45 @@ var eventTypes = {
1276
1292
  phasedRegistrationNames: {
1277
1293
  bubbled: 'onMoveShouldSetResponder',
1278
1294
  captured: 'onMoveShouldSetResponderCapture'
1279
- }
1295
+ },
1296
+ dependencies: moveDependencies
1280
1297
  },
1281
1298
 
1282
1299
  /**
1283
1300
  * Direct responder events dispatched directly to responder. Do not bubble.
1284
1301
  */
1285
- responderStart: { registrationName: 'onResponderStart' },
1286
- responderMove: { registrationName: 'onResponderMove' },
1287
- responderEnd: { registrationName: 'onResponderEnd' },
1288
- responderRelease: { registrationName: 'onResponderRelease' },
1302
+ responderStart: {
1303
+ registrationName: 'onResponderStart',
1304
+ dependencies: startDependencies
1305
+ },
1306
+ responderMove: {
1307
+ registrationName: 'onResponderMove',
1308
+ dependencies: moveDependencies
1309
+ },
1310
+ responderEnd: {
1311
+ registrationName: 'onResponderEnd',
1312
+ dependencies: endDependencies
1313
+ },
1314
+ responderRelease: {
1315
+ registrationName: 'onResponderRelease',
1316
+ dependencies: endDependencies
1317
+ },
1289
1318
  responderTerminationRequest: {
1290
- registrationName: 'onResponderTerminationRequest'
1319
+ registrationName: 'onResponderTerminationRequest',
1320
+ dependencies: []
1321
+ },
1322
+ responderGrant: {
1323
+ registrationName: 'onResponderGrant',
1324
+ dependencies: []
1291
1325
  },
1292
- responderGrant: { registrationName: 'onResponderGrant' },
1293
- responderReject: { registrationName: 'onResponderReject' },
1294
- responderTerminate: { registrationName: 'onResponderTerminate' }
1326
+ responderReject: {
1327
+ registrationName: 'onResponderReject',
1328
+ dependencies: []
1329
+ },
1330
+ responderTerminate: {
1331
+ registrationName: 'onResponderTerminate',
1332
+ dependencies: []
1333
+ }
1295
1334
  };
1296
1335
 
1297
1336
  /**
@@ -1485,7 +1524,7 @@ to return true:wantsResponderID| |
1485
1524
  */
1486
1525
 
1487
1526
  function setResponderAndExtractTransfer(topLevelType, targetInst, nativeEvent, nativeEventTarget) {
1488
- var shouldSetEventType = isStartish(topLevelType) ? eventTypes.startShouldSetResponder : isMoveish(topLevelType) ? eventTypes.moveShouldSetResponder : topLevelType === 'topSelectionChange' ? eventTypes.selectionChangeShouldSetResponder : eventTypes.scrollShouldSetResponder;
1527
+ var shouldSetEventType = isStartish(topLevelType) ? eventTypes.startShouldSetResponder : isMoveish(topLevelType) ? eventTypes.moveShouldSetResponder : topLevelType === TOP_SELECTION_CHANGE ? eventTypes.selectionChangeShouldSetResponder : eventTypes.scrollShouldSetResponder;
1489
1528
 
1490
1529
  // TODO: stop one short of the current responder.
1491
1530
  var bubbleShouldSetFrom = !responderInst ? targetInst : getLowestCommonAncestor(responderInst, targetInst);
@@ -1557,7 +1596,7 @@ function canTriggerTransfer(topLevelType, topLevelInst, nativeEvent) {
1557
1596
  // responderIgnoreScroll: We are trying to migrate away from specifically
1558
1597
  // tracking native scroll events here and responderIgnoreScroll indicates we
1559
1598
  // will send topTouchCancel to handle canceling touch events instead
1560
- topLevelType === 'topScroll' && !nativeEvent.responderIgnoreScroll || trackedTouchCount > 0 && topLevelType === 'topSelectionChange' || isStartish(topLevelType) || isMoveish(topLevelType));
1599
+ topLevelType === TOP_SCROLL && !nativeEvent.responderIgnoreScroll || trackedTouchCount > 0 && topLevelType === TOP_SELECTION_CHANGE || isStartish(topLevelType) || isMoveish(topLevelType));
1561
1600
  }
1562
1601
 
1563
1602
  /**
@@ -1636,7 +1675,7 @@ var ResponderEventPlugin = {
1636
1675
  extracted = accumulate(extracted, gesture);
1637
1676
  }
1638
1677
 
1639
- var isResponderTerminate = responderInst && topLevelType === 'topTouchCancel';
1678
+ var isResponderTerminate = responderInst && topLevelType === TOP_TOUCH_CANCEL;
1640
1679
  var isResponderRelease = responderInst && !isResponderTerminate && isEndish(topLevelType) && noResponderTouches(nativeEvent);
1641
1680
  var finalTouch = isResponderTerminate ? eventTypes.responderTerminate : isResponderRelease ? eventTypes.responderRelease : null;
1642
1681
  if (finalTouch) {
@@ -1647,17 +1686,10 @@ var ResponderEventPlugin = {
1647
1686
  changeResponder(null);
1648
1687
  }
1649
1688
 
1650
- var numberActiveTouches = ResponderTouchHistoryStore.touchHistory.numberActiveTouches;
1651
- if (ResponderEventPlugin.GlobalInteractionHandler && numberActiveTouches !== previousActiveTouches) {
1652
- ResponderEventPlugin.GlobalInteractionHandler.onChange(numberActiveTouches);
1653
- }
1654
- previousActiveTouches = numberActiveTouches;
1655
-
1656
1689
  return extracted;
1657
1690
  },
1658
1691
 
1659
1692
  GlobalResponderHandler: null,
1660
- GlobalInteractionHandler: null,
1661
1693
 
1662
1694
  injection: {
1663
1695
  /**
@@ -1667,14 +1699,6 @@ var ResponderEventPlugin = {
1667
1699
  */
1668
1700
  injectGlobalResponderHandler: function (GlobalResponderHandler) {
1669
1701
  ResponderEventPlugin.GlobalResponderHandler = GlobalResponderHandler;
1670
- },
1671
-
1672
- /**
1673
- * @param {{onChange: (numberActiveTouches) => void} GlobalInteractionHandler
1674
- * Object that handles any change in the number of active touches.
1675
- */
1676
- injectGlobalInteractionHandler: function (GlobalInteractionHandler) {
1677
- ResponderEventPlugin.GlobalInteractionHandler = GlobalInteractionHandler;
1678
1702
  }
1679
1703
  }
1680
1704
  };
@@ -1,4 +1,4 @@
1
- /** @license React v16.3.3
1
+ /** @license React v16.4.0
2
2
  * react-dom-unstable-native-dependencies.production.min.js
3
3
  *
4
4
  * Copyright (c) 2013-present, Facebook, Inc.
@@ -6,25 +6,25 @@
6
6
  * This source code is licensed under the MIT license found in the
7
7
  * LICENSE file in the root directory of this source tree.
8
8
  */
9
- 'use strict';(function(B,n){"object"===typeof exports&&"undefined"!==typeof module?module.exports=n(require("react-dom"),require("react")):"function"===typeof define&&define.amd?define(["react-dom","react"],n):B.ReactDOMUnstableNativeDependencies=n(B.ReactDOM,B.React)})(this,function(B,n){function z(a){for(var b=arguments.length-1,c="http://reactjs.org/docs/error-decoder.html?invariant\x3d"+a,f=0;f<b;f++)c+="\x26args[]\x3d"+encodeURIComponent(arguments[f+1]);Z(!1,"Minified React error #"+a+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",
10
- c)}function F(a){return function(){return a}}function G(a){return"topMouseUp"===a||"topTouchEnd"===a||"topTouchCancel"===a}function H(a){return"topMouseMove"===a||"topTouchMove"===a}function C(a){return"topMouseDown"===a||"topTouchStart"===a}function N(a){var b=a._dispatchListeners,c=a._dispatchInstances;Array.isArray(b)?z("103"):void 0;a.currentTarget=b?O(c):null;b=b?b(a):null;a.currentTarget=null;a._dispatchListeners=null;a._dispatchInstances=null;return b}function t(a){do a=a["return"];while(a&&
11
- 5!==a.tag);return a?a:null}function P(a,b,c){for(var f=[];a;)f.push(a),a=t(a);for(a=f.length;0<a--;)b(f[a],"captured",c);for(a=0;a<f.length;a++)b(f[a],"bubbled",c)}function I(a,b){null==b?z("30"):void 0;if(null==a)return b;if(Array.isArray(a)){if(Array.isArray(b))return a.push.apply(a,b),a;a.push(b);return a}return Array.isArray(b)?[a].concat(b):[a,b]}function u(a,b,c){Array.isArray(a)?a.forEach(b,c):a&&b.call(c,a)}function Q(a,b){var c=a.stateNode;if(!c)return null;var f=R(c);if(!f)return null;c=
12
- f[b];a:switch(b){case "onClick":case "onClickCapture":case "onDoubleClick":case "onDoubleClickCapture":case "onMouseDown":case "onMouseDownCapture":case "onMouseMove":case "onMouseMoveCapture":case "onMouseUp":case "onMouseUpCapture":(f=!f.disabled)||(a=a.type,f=!("button"===a||"input"===a||"select"===a||"textarea"===a));a=!f;break a;default:a=!1}if(a)return null;c&&"function"!==typeof c?z("231",b,typeof c):void 0;return c}function S(a,b,c){if(b=Q(a,c.dispatchConfig.phasedRegistrationNames[b]))c._dispatchListeners=
13
- I(c._dispatchListeners,b),c._dispatchInstances=I(c._dispatchInstances,a)}function aa(a){a&&a.dispatchConfig.phasedRegistrationNames&&P(a._targetInst,S,a)}function ba(a){if(a&&a.dispatchConfig.phasedRegistrationNames){var b=a._targetInst;b=b?t(b):null;P(b,S,a)}}function A(a){if(a&&a.dispatchConfig.registrationName){var b=a._targetInst;if(b&&a&&a.dispatchConfig.registrationName){var c=Q(b,a.dispatchConfig.registrationName);c&&(a._dispatchListeners=I(a._dispatchListeners,c),a._dispatchInstances=I(a._dispatchInstances,
14
- b))}}}function D(a,b,c,f){this.dispatchConfig=a;this._targetInst=b;this.nativeEvent=c;a=this.constructor.Interface;for(var e in a)a.hasOwnProperty(e)&&((b=a[e])?this[e]=b(c):"target"===e?this.target=f:this[e]=c[e]);this.isDefaultPrevented=(null!=c.defaultPrevented?c.defaultPrevented:!1===c.returnValue)?v.thatReturnsTrue:v.thatReturnsFalse;this.isPropagationStopped=v.thatReturnsFalse;return this}function ca(a,b,c,f){if(this.eventPool.length){var e=this.eventPool.pop();this.call(e,a,b,c,f);return e}return new this(a,
15
- b,c,f)}function da(a){a instanceof this?void 0:z("223");a.destructor();10>this.eventPool.length&&this.eventPool.push(a)}function T(a){a.eventPool=[];a.getPooled=ca;a.release=da}function l(a){return a.timeStamp||a.timestamp}function K(a){a=a.identifier;null==a?z("138"):void 0;return a}function ea(a){var b=K(a),c=p[b];c?(c.touchActive=!0,c.startPageX=a.pageX,c.startPageY=a.pageY,c.startTimeStamp=l(a),c.currentPageX=a.pageX,c.currentPageY=a.pageY,c.currentTimeStamp=l(a),c.previousPageX=a.pageX,c.previousPageY=
16
- a.pageY,c.previousTimeStamp=l(a)):(c={touchActive:!0,startPageX:a.pageX,startPageY:a.pageY,startTimeStamp:l(a),currentPageX:a.pageX,currentPageY:a.pageY,currentTimeStamp:l(a),previousPageX:a.pageX,previousPageY:a.pageY,previousTimeStamp:l(a)},p[b]=c);q.mostRecentTimeStamp=l(a)}function fa(a){var b=p[K(a)];b?(b.touchActive=!0,b.previousPageX=b.currentPageX,b.previousPageY=b.currentPageY,b.previousTimeStamp=b.currentTimeStamp,b.currentPageX=a.pageX,b.currentPageY=a.pageY,b.currentTimeStamp=l(a),q.mostRecentTimeStamp=
17
- l(a)):console.error("Cannot record touch move without a touch start.\nTouch Move: %s\n","Touch Bank: %s",U(a),V())}function ha(a){var b=p[K(a)];b?(b.touchActive=!1,b.previousPageX=b.currentPageX,b.previousPageY=b.currentPageY,b.previousTimeStamp=b.currentTimeStamp,b.currentPageX=a.pageX,b.currentPageY=a.pageY,b.currentTimeStamp=l(a),q.mostRecentTimeStamp=l(a)):console.error("Cannot record touch end without a touch start.\nTouch End: %s\n","Touch Bank: %s",U(a),V())}function U(a){return JSON.stringify({identifier:a.identifier,
18
- pageX:a.pageX,pageY:a.pageY,timestamp:l(a)})}function V(){var a=JSON.stringify(p.slice(0,20));20<p.length&&(a+=" (original size: "+p.length+")");return a}function E(a,b){null==b?z("29"):void 0;return null==a?b:Array.isArray(a)?a.concat(b):Array.isArray(b)?[a].concat(b):[a,b]}var Z=function(a,b,c,f,e,d,g,h){if(!a){if(void 0===b)a=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var k=[c,f,e,d,g,h],m=0;a=Error(b.replace(/%s/g,
19
- function(){return k[m++]}));a.name="Invariant Violation"}a.framesToPop=1;throw a;}},w=function(){};w.thatReturns=F;w.thatReturnsFalse=F(!1);w.thatReturnsTrue=F(!0);w.thatReturnsNull=F(null);w.thatReturnsThis=function(){return this};w.thatReturnsArgument=function(a){return a};var v=w,R=null,W=null,O=null,L=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.assign,X="dispatchConfig _targetInst nativeEvent isDefaultPrevented isPropagationStopped _dispatchListeners _dispatchInstances".split(" ");n=
20
- {type:null,target:null,currentTarget:v.thatReturnsNull,eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null};L(D.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():"unknown"!==typeof a.returnValue&&(a.returnValue=!1),this.isDefaultPrevented=v.thatReturnsTrue)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():
21
- "unknown"!==typeof a.cancelBubble&&(a.cancelBubble=!0),this.isPropagationStopped=v.thatReturnsTrue)},persist:function(){this.isPersistent=v.thatReturnsTrue},isPersistent:v.thatReturnsFalse,destructor:function(){var a=this.constructor.Interface,b;for(b in a)this[b]=null;for(a=0;a<X.length;a++)this[X[a]]=null}});D.Interface=n;D.extend=function(a){function b(){return c.apply(this,arguments)}var c=this,f=function(){};f.prototype=c.prototype;f=new f;L(f,b.prototype);b.prototype=f;b.prototype.constructor=
22
- b;b.Interface=L({},c.Interface,a);b.extend=c.extend;T(b);return b};T(D);var x=D.extend({touchHistory:function(a){return null}}),p=[],q={touchBank:p,numberActiveTouches:0,indexOfSingleActiveTouch:-1,mostRecentTimeStamp:0},r={recordTouchTrack:function(a,b){if(H(a))b.changedTouches.forEach(fa);else if(C(a))b.changedTouches.forEach(ea),q.numberActiveTouches=b.touches.length,1===q.numberActiveTouches&&(q.indexOfSingleActiveTouch=b.touches[0].identifier);else if(G(a)&&(b.changedTouches.forEach(ha),q.numberActiveTouches=
23
- b.touches.length,1===q.numberActiveTouches))for(a=0;a<p.length;a++)if(b=p[a],null!=b&&b.touchActive){q.indexOfSingleActiveTouch=a;break}},touchHistory:q},k=null,J=0,Y=0,M=function(a,b){var c=k;k=a;if(null!==y.GlobalResponderHandler)y.GlobalResponderHandler.onChange(c,a,b)},m={startShouldSetResponder:{phasedRegistrationNames:{bubbled:"onStartShouldSetResponder",captured:"onStartShouldSetResponderCapture"}},scrollShouldSetResponder:{phasedRegistrationNames:{bubbled:"onScrollShouldSetResponder",captured:"onScrollShouldSetResponderCapture"}},
24
- selectionChangeShouldSetResponder:{phasedRegistrationNames:{bubbled:"onSelectionChangeShouldSetResponder",captured:"onSelectionChangeShouldSetResponderCapture"}},moveShouldSetResponder:{phasedRegistrationNames:{bubbled:"onMoveShouldSetResponder",captured:"onMoveShouldSetResponderCapture"}},responderStart:{registrationName:"onResponderStart"},responderMove:{registrationName:"onResponderMove"},responderEnd:{registrationName:"onResponderEnd"},responderRelease:{registrationName:"onResponderRelease"},
25
- responderTerminationRequest:{registrationName:"onResponderTerminationRequest"},responderGrant:{registrationName:"onResponderGrant"},responderReject:{registrationName:"onResponderReject"},responderTerminate:{registrationName:"onResponderTerminate"}},y={_getResponder:function(){return k},eventTypes:m,extractEvents:function(a,b,c,f){if(C(a))J+=1;else if(G(a))if(0<=J)--J;else return console.error("Ended a touch event which was not counted in `trackedTouchCount`."),null;r.recordTouchTrack(a,c);if(b&&("topScroll"===
26
- a&&!c.responderIgnoreScroll||0<J&&"topSelectionChange"===a||C(a)||H(a))){var e=C(a)?m.startShouldSetResponder:H(a)?m.moveShouldSetResponder:"topSelectionChange"===a?m.selectionChangeShouldSetResponder:m.scrollShouldSetResponder;if(k)b:{var d=k;for(var g=0,h=d;h;h=t(h))g++;h=0;for(var l=b;l;l=t(l))h++;for(;0<g-h;)d=t(d),g--;for(;0<h-g;)b=t(b),h--;for(;g--;){if(d===b||d===b.alternate)break b;d=t(d);b=t(b)}d=null}else d=b;b=d===k;d=x.getPooled(e,d,c,f);d.touchHistory=r.touchHistory;b?u(d,ba):u(d,aa);
27
- b:{e=d._dispatchListeners;b=d._dispatchInstances;if(Array.isArray(e))for(g=0;g<e.length&&!d.isPropagationStopped();g++){if(e[g](d,b[g])){e=b[g];break b}}else if(e&&e(d,b)){e=b;break b}e=null}d._dispatchInstances=null;d._dispatchListeners=null;d.isPersistent()||d.constructor.release(d);e&&e!==k?(d=void 0,b=x.getPooled(m.responderGrant,e,c,f),b.touchHistory=r.touchHistory,u(b,A),g=!0===N(b),k?(h=x.getPooled(m.responderTerminationRequest,k,c,f),h.touchHistory=r.touchHistory,u(h,A),l=!h._dispatchListeners||
28
- N(h),h.isPersistent()||h.constructor.release(h),l?(h=x.getPooled(m.responderTerminate,k,c,f),h.touchHistory=r.touchHistory,u(h,A),d=E(d,[b,h]),M(e,g)):(e=x.getPooled(m.responderReject,e,c,f),e.touchHistory=r.touchHistory,u(e,A),d=E(d,e))):(d=E(d,b),M(e,g)),e=d):e=null}else e=null;d=k&&C(a);b=k&&H(a);g=k&&G(a);if(d=d?m.responderStart:b?m.responderMove:g?m.responderEnd:null)d=x.getPooled(d,k,c,f),d.touchHistory=r.touchHistory,u(d,A),e=E(e,d);d=k&&"topTouchCancel"===a;if(a=k&&!d&&G(a))a:{if((a=c.touches)&&
29
- 0!==a.length)for(b=0;b<a.length;b++)if(g=a[b].target,null!==g&&void 0!==g&&0!==g){h=W(g);b:{for(g=k;h;){if(g===h||g===h.alternate){g=!0;break b}h=t(h)}g=!1}if(g){a=!1;break a}}a=!0}if(a=d?m.responderTerminate:a?m.responderRelease:null)c=x.getPooled(a,k,c,f),c.touchHistory=r.touchHistory,u(c,A),e=E(e,c),M(null);c=r.touchHistory.numberActiveTouches;if(y.GlobalInteractionHandler&&c!==Y)y.GlobalInteractionHandler.onChange(c);Y=c;return e},GlobalResponderHandler:null,GlobalInteractionHandler:null,injection:{injectGlobalResponderHandler:function(a){y.GlobalResponderHandler=
30
- a},injectGlobalInteractionHandler:function(a){y.GlobalInteractionHandler=a}}};n=function(a){R=a.getFiberCurrentPropsFromNode;W=a.getInstanceFromNode;O=a.getNodeFromInstance};n(B.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactDOMComponentTree);return Object.freeze({injectComponentTree:n,ResponderEventPlugin:y,ResponderTouchHistoryStore:r})});
9
+ 'use strict';(function(A,l){"object"===typeof exports&&"undefined"!==typeof module?module.exports=l(require("react-dom"),require("react")):"function"===typeof define&&define.amd?define(["react-dom","react"],l):A.ReactDOMUnstableNativeDependencies=l(A.ReactDOM,A.React)})(this,function(A,l){function y(a){for(var b=arguments.length-1,c="https://reactjs.org/docs/error-decoder.html?invariant="+a,f=0;f<b;f++)c+="&args[]="+encodeURIComponent(arguments[f+1]);Z(!1,"Minified React error #"+a+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",
10
+ c)}function E(a){return function(){return a}}function N(a){var b=a._dispatchListeners,c=a._dispatchInstances;Array.isArray(b)?y("103"):void 0;a.currentTarget=b?O(c):null;b=b?b(a):null;a.currentTarget=null;a._dispatchListeners=null;a._dispatchInstances=null;return b}function t(a){do a=a.return;while(a&&5!==a.tag);return a?a:null}function P(a,b,c){for(var f=[];a;)f.push(a),a=t(a);for(a=f.length;0<a--;)b(f[a],"captured",c);for(a=0;a<f.length;a++)b(f[a],"bubbled",c)}function F(a,b){null==b?y("30"):void 0;
11
+ if(null==a)return b;if(Array.isArray(a)){if(Array.isArray(b))return a.push.apply(a,b),a;a.push(b);return a}return Array.isArray(b)?[a].concat(b):[a,b]}function v(a,b,c){Array.isArray(a)?a.forEach(b,c):a&&b.call(c,a)}function Q(a,b){var c=a.stateNode;if(!c)return null;var f=R(c);if(!f)return null;c=f[b];a:switch(b){case "onClick":case "onClickCapture":case "onDoubleClick":case "onDoubleClickCapture":case "onMouseDown":case "onMouseDownCapture":case "onMouseMove":case "onMouseMoveCapture":case "onMouseUp":case "onMouseUpCapture":(f=
12
+ !f.disabled)||(a=a.type,f=!("button"===a||"input"===a||"select"===a||"textarea"===a));a=!f;break a;default:a=!1}if(a)return null;c&&"function"!==typeof c?y("231",b,typeof c):void 0;return c}function S(a,b,c){if(b=Q(a,c.dispatchConfig.phasedRegistrationNames[b]))c._dispatchListeners=F(c._dispatchListeners,b),c._dispatchInstances=F(c._dispatchInstances,a)}function aa(a){a&&a.dispatchConfig.phasedRegistrationNames&&P(a._targetInst,S,a)}function ba(a){if(a&&a.dispatchConfig.phasedRegistrationNames){var b=
13
+ a._targetInst;b=b?t(b):null;P(b,S,a)}}function z(a){if(a&&a.dispatchConfig.registrationName){var b=a._targetInst;if(b&&a&&a.dispatchConfig.registrationName){var c=Q(b,a.dispatchConfig.registrationName);c&&(a._dispatchListeners=F(a._dispatchListeners,c),a._dispatchInstances=F(a._dispatchInstances,b))}}}function B(a,b,c,f){this.dispatchConfig=a;this._targetInst=b;this.nativeEvent=c;a=this.constructor.Interface;for(var e in a)a.hasOwnProperty(e)&&((b=a[e])?this[e]=b(c):"target"===e?this.target=f:this[e]=
14
+ c[e]);this.isDefaultPrevented=(null!=c.defaultPrevented?c.defaultPrevented:!1===c.returnValue)?w.thatReturnsTrue:w.thatReturnsFalse;this.isPropagationStopped=w.thatReturnsFalse;return this}function ca(a,b,c,f){if(this.eventPool.length){var e=this.eventPool.pop();this.call(e,a,b,c,f);return e}return new this(a,b,c,f)}function da(a){a instanceof this?void 0:y("223");a.destructor();10>this.eventPool.length&&this.eventPool.push(a)}function T(a){a.eventPool=[];a.getPooled=ca;a.release=da}function C(a){return"touchstart"===
15
+ a||"mousedown"===a}function G(a){return"touchmove"===a||"mousemove"===a}function H(a){return"touchend"===a||"touchcancel"===a||"mouseup"===a}function n(a){return a.timeStamp||a.timestamp}function K(a){a=a.identifier;null==a?y("138"):void 0;return a}function ea(a){var b=K(a),c=p[b];c?(c.touchActive=!0,c.startPageX=a.pageX,c.startPageY=a.pageY,c.startTimeStamp=n(a),c.currentPageX=a.pageX,c.currentPageY=a.pageY,c.currentTimeStamp=n(a),c.previousPageX=a.pageX,c.previousPageY=a.pageY,c.previousTimeStamp=
16
+ n(a)):(c={touchActive:!0,startPageX:a.pageX,startPageY:a.pageY,startTimeStamp:n(a),currentPageX:a.pageX,currentPageY:a.pageY,currentTimeStamp:n(a),previousPageX:a.pageX,previousPageY:a.pageY,previousTimeStamp:n(a)},p[b]=c);q.mostRecentTimeStamp=n(a)}function fa(a){var b=p[K(a)];b?(b.touchActive=!0,b.previousPageX=b.currentPageX,b.previousPageY=b.currentPageY,b.previousTimeStamp=b.currentTimeStamp,b.currentPageX=a.pageX,b.currentPageY=a.pageY,b.currentTimeStamp=n(a),q.mostRecentTimeStamp=n(a)):console.error("Cannot record touch move without a touch start.\nTouch Move: %s\n",
17
+ "Touch Bank: %s",U(a),V())}function ha(a){var b=p[K(a)];b?(b.touchActive=!1,b.previousPageX=b.currentPageX,b.previousPageY=b.currentPageY,b.previousTimeStamp=b.currentTimeStamp,b.currentPageX=a.pageX,b.currentPageY=a.pageY,b.currentTimeStamp=n(a),q.mostRecentTimeStamp=n(a)):console.error("Cannot record touch end without a touch start.\nTouch End: %s\n","Touch Bank: %s",U(a),V())}function U(a){return JSON.stringify({identifier:a.identifier,pageX:a.pageX,pageY:a.pageY,timestamp:n(a)})}function V(){var a=
18
+ JSON.stringify(p.slice(0,20));20<p.length&&(a+=" (original size: "+p.length+")");return a}function D(a,b){null==b?y("29"):void 0;return null==a?b:Array.isArray(a)?a.concat(b):Array.isArray(b)?[a].concat(b):[a,b]}var Z=function(a,b,c,f,e,d,g,h){if(!a){if(void 0===b)a=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var k=[c,f,e,d,g,h],m=0;a=Error(b.replace(/%s/g,function(){return k[m++]}));a.name="Invariant Violation"}a.framesToPop=
19
+ 1;throw a;}},r=function(){};r.thatReturns=E;r.thatReturnsFalse=E(!1);r.thatReturnsTrue=E(!0);r.thatReturnsNull=E(null);r.thatReturnsThis=function(){return this};r.thatReturnsArgument=function(a){return a};var w=r,R=null,W=null,O=null,L=l.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.assign,X="dispatchConfig _targetInst nativeEvent isDefaultPrevented isPropagationStopped _dispatchListeners _dispatchInstances".split(" ");l={type:null,target:null,currentTarget:w.thatReturnsNull,eventPhase:null,
20
+ bubbles:null,cancelable:null,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null};L(B.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():"unknown"!==typeof a.returnValue&&(a.returnValue=!1),this.isDefaultPrevented=w.thatReturnsTrue)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():"unknown"!==typeof a.cancelBubble&&(a.cancelBubble=!0),this.isPropagationStopped=
21
+ w.thatReturnsTrue)},persist:function(){this.isPersistent=w.thatReturnsTrue},isPersistent:w.thatReturnsFalse,destructor:function(){var a=this.constructor.Interface,b;for(b in a)this[b]=null;for(a=0;a<X.length;a++)this[X[a]]=null}});B.Interface=l;B.extend=function(a){function b(){return c.apply(this,arguments)}var c=this,f=function(){};f.prototype=c.prototype;f=new f;L(f,b.prototype);b.prototype=f;b.prototype.constructor=b;b.Interface=L({},c.Interface,a);b.extend=c.extend;T(b);return b};T(B);var x=
22
+ B.extend({touchHistory:function(a){return null}});l=["touchstart","mousedown"];r=["touchmove","mousemove"];var Y=["touchcancel","touchend","mouseup"],p=[],q={touchBank:p,numberActiveTouches:0,indexOfSingleActiveTouch:-1,mostRecentTimeStamp:0},u={recordTouchTrack:function(a,b){if(G(a))b.changedTouches.forEach(fa);else if(C(a))b.changedTouches.forEach(ea),q.numberActiveTouches=b.touches.length,1===q.numberActiveTouches&&(q.indexOfSingleActiveTouch=b.touches[0].identifier);else if(H(a)&&(b.changedTouches.forEach(ha),
23
+ q.numberActiveTouches=b.touches.length,1===q.numberActiveTouches))for(a=0;a<p.length;a++)if(b=p[a],null!=b&&b.touchActive){q.indexOfSingleActiveTouch=a;break}},touchHistory:q},k=null,I=0,M=function(a,b){var c=k;k=a;if(null!==J.GlobalResponderHandler)J.GlobalResponderHandler.onChange(c,a,b)},m={startShouldSetResponder:{phasedRegistrationNames:{bubbled:"onStartShouldSetResponder",captured:"onStartShouldSetResponderCapture"},dependencies:l},scrollShouldSetResponder:{phasedRegistrationNames:{bubbled:"onScrollShouldSetResponder",
24
+ captured:"onScrollShouldSetResponderCapture"},dependencies:["scroll"]},selectionChangeShouldSetResponder:{phasedRegistrationNames:{bubbled:"onSelectionChangeShouldSetResponder",captured:"onSelectionChangeShouldSetResponderCapture"},dependencies:["selectionchange"]},moveShouldSetResponder:{phasedRegistrationNames:{bubbled:"onMoveShouldSetResponder",captured:"onMoveShouldSetResponderCapture"},dependencies:r},responderStart:{registrationName:"onResponderStart",dependencies:l},responderMove:{registrationName:"onResponderMove",
25
+ dependencies:r},responderEnd:{registrationName:"onResponderEnd",dependencies:Y},responderRelease:{registrationName:"onResponderRelease",dependencies:Y},responderTerminationRequest:{registrationName:"onResponderTerminationRequest",dependencies:[]},responderGrant:{registrationName:"onResponderGrant",dependencies:[]},responderReject:{registrationName:"onResponderReject",dependencies:[]},responderTerminate:{registrationName:"onResponderTerminate",dependencies:[]}},J={_getResponder:function(){return k},
26
+ eventTypes:m,extractEvents:function(a,b,c,f){if(C(a))I+=1;else if(H(a))if(0<=I)--I;else return console.error("Ended a touch event which was not counted in `trackedTouchCount`."),null;u.recordTouchTrack(a,c);if(b&&("scroll"===a&&!c.responderIgnoreScroll||0<I&&"selectionchange"===a||C(a)||G(a))){var e=C(a)?m.startShouldSetResponder:G(a)?m.moveShouldSetResponder:"selectionchange"===a?m.selectionChangeShouldSetResponder:m.scrollShouldSetResponder;if(k)b:{var d=k;for(var g=0,h=d;h;h=t(h))g++;h=0;for(var l=
27
+ b;l;l=t(l))h++;for(;0<g-h;)d=t(d),g--;for(;0<h-g;)b=t(b),h--;for(;g--;){if(d===b||d===b.alternate)break b;d=t(d);b=t(b)}d=null}else d=b;b=d===k;d=x.getPooled(e,d,c,f);d.touchHistory=u.touchHistory;b?v(d,ba):v(d,aa);b:{e=d._dispatchListeners;b=d._dispatchInstances;if(Array.isArray(e))for(g=0;g<e.length&&!d.isPropagationStopped();g++){if(e[g](d,b[g])){e=b[g];break b}}else if(e&&e(d,b)){e=b;break b}e=null}d._dispatchInstances=null;d._dispatchListeners=null;d.isPersistent()||d.constructor.release(d);
28
+ e&&e!==k?(d=void 0,b=x.getPooled(m.responderGrant,e,c,f),b.touchHistory=u.touchHistory,v(b,z),g=!0===N(b),k?(h=x.getPooled(m.responderTerminationRequest,k,c,f),h.touchHistory=u.touchHistory,v(h,z),l=!h._dispatchListeners||N(h),h.isPersistent()||h.constructor.release(h),l?(h=x.getPooled(m.responderTerminate,k,c,f),h.touchHistory=u.touchHistory,v(h,z),d=D(d,[b,h]),M(e,g)):(e=x.getPooled(m.responderReject,e,c,f),e.touchHistory=u.touchHistory,v(e,z),d=D(d,e))):(d=D(d,b),M(e,g)),e=d):e=null}else e=null;
29
+ d=k&&C(a);b=k&&G(a);g=k&&H(a);if(d=d?m.responderStart:b?m.responderMove:g?m.responderEnd:null)d=x.getPooled(d,k,c,f),d.touchHistory=u.touchHistory,v(d,z),e=D(e,d);d=k&&"touchcancel"===a;if(a=k&&!d&&H(a))a:{if((a=c.touches)&&0!==a.length)for(b=0;b<a.length;b++)if(g=a[b].target,null!==g&&void 0!==g&&0!==g){h=W(g);b:{for(g=k;h;){if(g===h||g===h.alternate){g=!0;break b}h=t(h)}g=!1}if(g){a=!1;break a}}a=!0}if(a=d?m.responderTerminate:a?m.responderRelease:null)c=x.getPooled(a,k,c,f),c.touchHistory=u.touchHistory,
30
+ v(c,z),e=D(e,c),M(null);return e},GlobalResponderHandler:null,injection:{injectGlobalResponderHandler:function(a){J.GlobalResponderHandler=a}}};l=function(a){R=a.getFiberCurrentPropsFromNode;W=a.getInstanceFromNode;O=a.getNodeFromInstance};l(A.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactDOMComponentTree);return{injectComponentTree:l,ResponderEventPlugin:J,ResponderTouchHistoryStore:u}});