{"version":3,"sources":["node_modules\\react-dom\\lib\\EventPropagators.js"],"names":["EventPluginHub","require","EventPluginUtils","accumulateInto","forEachAccumulated","warning","getListener","listenerAtPhase","inst","event","propagationPhase","registrationName","dispatchConfig","phasedRegistrationNames","accumulateDirectionalDispatches","phase","process","env","NODE_ENV","listener","_dispatchListeners","_dispatchInstances","accumulateTwoPhaseDispatchesSingle","traverseTwoPhase","_targetInst","accumulateTwoPhaseDispatchesSingleSkipTarget","targetInst","parentInst","getParentInstance","accumulateDispatches","ignoredDirection","accumulateDirectDispatchesSingle","accumulateTwoPhaseDispatches","events","accumulateTwoPhaseDispatchesSkipTarget","accumulateEnterLeaveDispatches","leave","enter","from","to","traverseEnterLeave","accumulateDirectDispatches","EventPropagators","module","exports"],"mappings":";;;;;;;;;;AAUA;;AAEA,GAAIA,gBAAiBC,QAAQ,kBAAR,CAArB;AACA,GAAIC,kBAAmBD,QAAQ,oBAAR,CAAvB;;AAEA,GAAIE,gBAAiBF,QAAQ,kBAAR,CAArB;AACA,GAAIG,oBAAqBH,QAAQ,sBAAR,CAAzB;AACA,GAAII,SAAUJ,QAAQ,kBAAR,CAAd;;AAEA,GAAIK,aAAcN,eAAeM,WAAjC;;;;;;AAMA,QAASC,gBAAT,CAAyBC,IAAzB,CAA+BC,KAA/B,CAAsCC,gBAAtC,CAAwD;AACtD,GAAIC,kBAAmBF,MAAMG,cAAN,CAAqBC,uBAArB,CAA6CH,gBAA7C,CAAvB;AACA,MAAOJ,aAAYE,IAAZ,CAAkBG,gBAAlB,CAAP;AACD;;;;;;;;AAQD,QAASG,gCAAT,CAAyCN,IAAzC,CAA+CO,KAA/C,CAAsDN,KAAtD,CAA6D;AAC3D,GAAIO,QAAQC,GAAR,CAAYC,QAAZ,GAAyB,YAA7B,CAA2C;AACzCF,QAAQC,GAAR,CAAYC,QAAZ,GAAyB,YAAzB,CAAwCb,QAAQG,IAAR,CAAc,mCAAd,CAAxC,CAA6F,IAAK,EAAlG;AACD;AACD,GAAIW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CtB,KAA1C,CAAiD;AAC/C,GAAIA,OAASA,MAAMG,cAAN,CAAqBD,gBAAlC,CAAoD;AAClDkB,qBAAqBpB,MAAMe,WAA3B,CAAwC,IAAxC,CAA8Cf,KAA9C;AACD;AACF;;AAED,QAASuB,6BAAT,CAAsCC,MAAtC,CAA8C;AAC5C7B,mBAAmB6B,MAAnB,CAA2BX,kCAA3B;AACD;;AAED,QAASY,uCAAT,CAAgDD,MAAhD,CAAwD;AACtD7B,mBAAmB6B,MAAnB,CAA2BR,4CAA3B;AACD;;AAED,QAASU,+BAAT,CAAwCC,KAAxC,CAA+CC,KAA/C,CAAsDC,IAAtD,CAA4DC,EAA5D,CAAgE;AAC9DrC,iBAAiBsC,kBAAjB,CAAoCF,IAApC,CAA0CC,EAA1C,CAA8CV,oBAA9C,CAAoEO,KAApE,CAA2EC,KAA3E;AACD;;AAED,QAASI,2BAAT,CAAoCR,MAApC,CAA4C;AAC1C7B,mBAAmB6B,MAAnB,CAA2BF,gCAA3B;AACD;;;;;;;;;;;;;AAaD,GAAIW,kBAAmB;AACrBV,6BAA8BA,4BADT;AAErBE,uCAAwCA,sCAFnB;AAGrBO,2BAA4BA,0BAHP;AAIrBN,+BAAgCA,8BAJX,CAAvB;;;AAOAQ,OAAOC,OAAP,CAAiBF,gBAAjB","file":"EventPropagators.js","sourceRoot":"D:/Work/Office/react-native-on-web/cli/tmpl/project","sourcesContent":["/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar EventPluginHub = require('./EventPluginHub');\nvar EventPluginUtils = require('./EventPluginUtils');\n\nvar accumulateInto = require('./accumulateInto');\nvar forEachAccumulated = require('./forEachAccumulated');\nvar warning = require('fbjs/lib/warning');\n\nvar getListener = EventPluginHub.getListener;\n\n/**\n * Some event types have a notion of different registration names for different\n * \"phases\" of propagation. This finds listeners by a given phase.\n */\nfunction listenerAtPhase(inst, event, propagationPhase) {\n  var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n  return getListener(inst, registrationName);\n}\n\n/**\n * Tags a `SyntheticEvent` with dispatched listeners. Creating this function\n * here, allows us to not have to bind or create functions for each event.\n * Mutating the event's members allows us to not have to create a wrapping\n * \"dispatch\" object that pairs the event with the listener.\n */\nfunction accumulateDirectionalDispatches(inst, phase, event) {\n  if (process.env.NODE_ENV !== 'production') {\n    process.env.NODE_ENV !== 'production' ? warning(inst, 'Dispatching inst must not be null') : void 0;\n  }\n  var listener = listenerAtPhase(inst, event, phase);\n  if (listener) {\n    event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n    event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n  }\n}\n\n/**\n * Collect dispatches (must be entirely collected before dispatching - see unit\n * tests). Lazily allocate the array to conserve memory.  We must loop through\n * each event and perform the traversal for each one. We cannot perform a\n * single traversal for the entire collection of events because each event may\n * have a different target.\n */\nfunction accumulateTwoPhaseDispatchesSingle(event) {\n  if (event && event.dispatchConfig.phasedRegistrationNames) {\n    EventPluginUtils.traverseTwoPhase(event._targetInst, accumulateDirectionalDispatches, event);\n  }\n}\n\n/**\n * Same as `accumulateTwoPhaseDispatchesSingle`, but skips over the targetID.\n */\nfunction accumulateTwoPhaseDispatchesSingleSkipTarget(event) {\n  if (event && event.dispatchConfig.phasedRegistrationNames) {\n    var targetInst = event._targetInst;\n    var parentInst = targetInst ? EventPluginUtils.getParentInstance(targetInst) : null;\n    EventPluginUtils.traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);\n  }\n}\n\n/**\n * Accumulates without regard to direction, does not look for phased\n * registration names. Same as `accumulateDirectDispatchesSingle` but without\n * requiring that the `dispatchMarker` be the same as the dispatched ID.\n */\nfunction accumulateDispatches(inst, ignoredDirection, event) {\n  if (event && event.dispatchConfig.registrationName) {\n    var registrationName = event.dispatchConfig.registrationName;\n    var listener = getListener(inst, registrationName);\n    if (listener) {\n      event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n      event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n    }\n  }\n}\n\n/**\n * Accumulates dispatches on an `SyntheticEvent`, but only for the\n * `dispatchMarker`.\n * @param {SyntheticEvent} event\n */\nfunction accumulateDirectDispatchesSingle(event) {\n  if (event && event.dispatchConfig.registrationName) {\n    accumulateDispatches(event._targetInst, null, event);\n  }\n}\n\nfunction accumulateTwoPhaseDispatches(events) {\n  forEachAccumulated(events, accumulateTwoPhaseDispatchesSingle);\n}\n\nfunction accumulateTwoPhaseDispatchesSkipTarget(events) {\n  forEachAccumulated(events, accumulateTwoPhaseDispatchesSingleSkipTarget);\n}\n\nfunction accumulateEnterLeaveDispatches(leave, enter, from, to) {\n  EventPluginUtils.traverseEnterLeave(from, to, accumulateDispatches, leave, enter);\n}\n\nfunction accumulateDirectDispatches(events) {\n  forEachAccumulated(events, accumulateDirectDispatchesSingle);\n}\n\n/**\n * A small set of propagation patterns, each of which will accept a small amount\n * of information, and generate a set of \"dispatch ready event objects\" - which\n * are sets of events that have already been annotated with a set of dispatched\n * listener functions/ids. The API is designed this way to discourage these\n * propagation strategies from actually executing the dispatches, since we\n * always want to collect the entire set of dispatches before executing event a\n * single one.\n *\n * @constructor EventPropagators\n */\nvar EventPropagators = {\n  accumulateTwoPhaseDispatches: accumulateTwoPhaseDispatches,\n  accumulateTwoPhaseDispatchesSkipTarget: accumulateTwoPhaseDispatchesSkipTarget,\n  accumulateDirectDispatches: accumulateDirectDispatches,\n  accumulateEnterLeaveDispatches: accumulateEnterLeaveDispatches\n};\n\nmodule.exports = EventPropagators;"]}