{"version":3,"sources":["node_modules\\react-dom\\lib\\EventPluginRegistry.js"],"names":["_prodInvariant","require","invariant","eventPluginOrder","namesToPlugins","recomputePluginOrdering","pluginName","pluginModule","pluginIndex","indexOf","process","env","NODE_ENV","EventPluginRegistry","plugins","extractEvents","publishedEvents","eventTypes","eventName","publishEventForPlugin","dispatchConfig","eventNameDispatchConfigs","hasOwnProperty","phasedRegistrationNames","phaseName","phasedRegistrationName","publishRegistrationName","registrationName","registrationNameModules","registrationNameDependencies","dependencies","lowerCasedName","toLowerCase","possibleRegistrationNames","ondblclick","injectEventPluginOrder","injectedEventPluginOrder","Array","prototype","slice","call","injectEventPluginsByName","injectedNamesToPlugins","isOrderingDirty","getPluginModuleForEvent","event","undefined","phase","_resetEventPlugins","length","module","exports"],"mappings":";;;;;;;;;;;AAWA;;AAEA,GAAIA,gBAAiBC,QAAQ,sBAAR,CAArB;;AAEA,GAAIC,WAAYD,QAAQ,oBAAR,CAAhB;;;;;AAKA,GAAIE,kBAAmB,IAAvB;;;;;AAKA,GAAIC,gBAAiB,EAArB;;;;;;;AAOA,QAASC,wBAAT,EAAmC;AACjC,GAAI,CAACF,gBAAL,CAAuB;;AAErB;AACD;AACD,IAAK,GAAIG,WAAT,GAAuBF,eAAvB,CAAuC;AACrC,GAAIG,cAAeH,eAAeE,UAAf,CAAnB;AACA,GAAIE,aAAcL,iBAAiBM,OAAjB,CAAyBH,UAAzB,CAAlB;AACA,EAAEE,YAAc,CAAC,CAAjB,EAAsBE,QAAQC,GAAR,CAAYC,QAAZ,GAAyB,YAAzB,CAAwCV,UAAU,KAAV,CAAiB,kGAAjB,CAAqHI,UAArH,CAAxC,CAA2KN,eAAe,IAAf,CAAqBM,UAArB,CAAjM,CAAoO,IAAK,EAAzO;AACA,GAAIO,oBAAoBC,OAApB,CAA4BN,WAA5B,CAAJ,CAA8C;AAC5C;AACD;AACD,CAACD,aAAaQ,aAAd,CAA8BL,QAAQC,GAAR,CAAYC,QAAZ,GAAyB,YAAzB,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B,CAAP;AACD;AACF;AACF;AACF,CA3IuB,CAA1B;;;AA8IAmB,OAAOC,OAAP,CAAiBtC,mBAAjB","file":"EventPluginRegistry.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\n'use strict';\n\nvar _prodInvariant = require('./reactProdInvariant');\n\nvar invariant = require('fbjs/lib/invariant');\n\n/**\n * Injectable ordering of event plugins.\n */\nvar eventPluginOrder = null;\n\n/**\n * Injectable mapping from names to event plugin modules.\n */\nvar namesToPlugins = {};\n\n/**\n * Recomputes the plugin list using the injected plugins and plugin ordering.\n *\n * @private\n */\nfunction recomputePluginOrdering() {\n  if (!eventPluginOrder) {\n    // Wait until an `eventPluginOrder` is injected.\n    return;\n  }\n  for (var pluginName in namesToPlugins) {\n    var pluginModule = namesToPlugins[pluginName];\n    var pluginIndex = eventPluginOrder.indexOf(pluginName);\n    !(pluginIndex > -1) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : _prodInvariant('96', pluginName) : void 0;\n    if (EventPluginRegistry.plugins[pluginIndex]) {\n      continue;\n    }\n    !pluginModule.extractEvents ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : _prodInvariant('97', pluginName) : void 0;\n    EventPluginRegistry.plugins[pluginIndex] = pluginModule;\n    var publishedEvents = pluginModule.eventTypes;\n    for (var eventName in publishedEvents) {\n      !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : _prodInvariant('98', eventName, pluginName) : void 0;\n    }\n  }\n}\n\n/**\n * Publishes an event so that it can be dispatched by the supplied plugin.\n *\n * @param {object} dispatchConfig Dispatch configuration for the event.\n * @param {object} PluginModule Plugin publishing the event.\n * @return {boolean} True if the event was successfully published.\n * @private\n */\nfunction publishEventForPlugin(dispatchConfig, pluginModule, eventName) {\n  !!EventPluginRegistry.eventNameDispatchConfigs.hasOwnProperty(eventName) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginHub: More than one plugin attempted to publish the same event name, `%s`.', eventName) : _prodInvariant('99', eventName) : void 0;\n  EventPluginRegistry.eventNameDispatchConfigs[eventName] = dispatchConfig;\n\n  var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames;\n  if (phasedRegistrationNames) {\n    for (var phaseName in phasedRegistrationNames) {\n      if (phasedRegistrationNames.hasOwnProperty(phaseName)) {\n        var phasedRegistrationName = phasedRegistrationNames[phaseName];\n        publishRegistrationName(phasedRegistrationName, pluginModule, eventName);\n      }\n    }\n    return true;\n  } else if (dispatchConfig.registrationName) {\n    publishRegistrationName(dispatchConfig.registrationName, pluginModule, eventName);\n    return true;\n  }\n  return false;\n}\n\n/**\n * Publishes a registration name that is used to identify dispatched events and\n * can be used with `EventPluginHub.putListener` to register listeners.\n *\n * @param {string} registrationName Registration name to add.\n * @param {object} PluginModule Plugin publishing the event.\n * @private\n */\nfunction publishRegistrationName(registrationName, pluginModule, eventName) {\n  !!EventPluginRegistry.registrationNameModules[registrationName] ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginHub: More than one plugin attempted to publish the same registration name, `%s`.', registrationName) : _prodInvariant('100', registrationName) : void 0;\n  EventPluginRegistry.registrationNameModules[registrationName] = pluginModule;\n  EventPluginRegistry.registrationNameDependencies[registrationName] = pluginModule.eventTypes[eventName].dependencies;\n\n  if (process.env.NODE_ENV !== 'production') {\n    var lowerCasedName = registrationName.toLowerCase();\n    EventPluginRegistry.possibleRegistrationNames[lowerCasedName] = registrationName;\n\n    if (registrationName === 'onDoubleClick') {\n      EventPluginRegistry.possibleRegistrationNames.ondblclick = registrationName;\n    }\n  }\n}\n\n/**\n * Registers plugins so that they can extract and dispatch events.\n *\n * @see {EventPluginHub}\n */\nvar EventPluginRegistry = {\n  /**\n   * Ordered list of injected plugins.\n   */\n  plugins: [],\n\n  /**\n   * Mapping from event name to dispatch config\n   */\n  eventNameDispatchConfigs: {},\n\n  /**\n   * Mapping from registration name to plugin module\n   */\n  registrationNameModules: {},\n\n  /**\n   * Mapping from registration name to event name\n   */\n  registrationNameDependencies: {},\n\n  /**\n   * Mapping from lowercase registration names to the properly cased version,\n   * used to warn in the case of missing event handlers. Available\n   * only in __DEV__.\n   * @type {Object}\n   */\n  possibleRegistrationNames: process.env.NODE_ENV !== 'production' ? {} : null,\n  // Trust the developer to only use possibleRegistrationNames in __DEV__\n\n  /**\n   * Injects an ordering of plugins (by plugin name). This allows the ordering\n   * to be decoupled from injection of the actual plugins so that ordering is\n   * always deterministic regardless of packaging, on-the-fly injection, etc.\n   *\n   * @param {array} InjectedEventPluginOrder\n   * @internal\n   * @see {EventPluginHub.injection.injectEventPluginOrder}\n   */\n  injectEventPluginOrder: function (injectedEventPluginOrder) {\n    !!eventPluginOrder ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginRegistry: Cannot inject event plugin ordering more than once. You are likely trying to load more than one copy of React.') : _prodInvariant('101') : void 0;\n    // Clone the ordering so it cannot be dynamically mutated.\n    eventPluginOrder = Array.prototype.slice.call(injectedEventPluginOrder);\n    recomputePluginOrdering();\n  },\n\n  /**\n   * Injects plugins to be used by `EventPluginHub`. The plugin names must be\n   * in the ordering injected by `injectEventPluginOrder`.\n   *\n   * Plugins can be injected as part of page initialization or on-the-fly.\n   *\n   * @param {object} injectedNamesToPlugins Map from names to plugin modules.\n   * @internal\n   * @see {EventPluginHub.injection.injectEventPluginsByName}\n   */\n  injectEventPluginsByName: function (injectedNamesToPlugins) {\n    var isOrderingDirty = false;\n    for (var pluginName in injectedNamesToPlugins) {\n      if (!injectedNamesToPlugins.hasOwnProperty(pluginName)) {\n        continue;\n      }\n      var pluginModule = injectedNamesToPlugins[pluginName];\n      if (!namesToPlugins.hasOwnProperty(pluginName) || namesToPlugins[pluginName] !== pluginModule) {\n        !!namesToPlugins[pluginName] ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginRegistry: Cannot inject two different event plugins using the same name, `%s`.', pluginName) : _prodInvariant('102', pluginName) : void 0;\n        namesToPlugins[pluginName] = pluginModule;\n        isOrderingDirty = true;\n      }\n    }\n    if (isOrderingDirty) {\n      recomputePluginOrdering();\n    }\n  },\n\n  /**\n   * Looks up the plugin for the supplied event.\n   *\n   * @param {object} event A synthetic event.\n   * @return {?object} The plugin that created the supplied event.\n   * @internal\n   */\n  getPluginModuleForEvent: function (event) {\n    var dispatchConfig = event.dispatchConfig;\n    if (dispatchConfig.registrationName) {\n      return EventPluginRegistry.registrationNameModules[dispatchConfig.registrationName] || null;\n    }\n    if (dispatchConfig.phasedRegistrationNames !== undefined) {\n      // pulling phasedRegistrationNames out of dispatchConfig helps Flow see\n      // that it is not undefined.\n      var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames;\n\n      for (var phase in phasedRegistrationNames) {\n        if (!phasedRegistrationNames.hasOwnProperty(phase)) {\n          continue;\n        }\n        var pluginModule = EventPluginRegistry.registrationNameModules[phasedRegistrationNames[phase]];\n        if (pluginModule) {\n          return pluginModule;\n        }\n      }\n    }\n    return null;\n  },\n\n  /**\n   * Exposed for unit testing.\n   * @private\n   */\n  _resetEventPlugins: function () {\n    eventPluginOrder = null;\n    for (var pluginName in namesToPlugins) {\n      if (namesToPlugins.hasOwnProperty(pluginName)) {\n        delete namesToPlugins[pluginName];\n      }\n    }\n    EventPluginRegistry.plugins.length = 0;\n\n    var eventNameDispatchConfigs = EventPluginRegistry.eventNameDispatchConfigs;\n    for (var eventName in eventNameDispatchConfigs) {\n      if (eventNameDispatchConfigs.hasOwnProperty(eventName)) {\n        delete eventNameDispatchConfigs[eventName];\n      }\n    }\n\n    var registrationNameModules = EventPluginRegistry.registrationNameModules;\n    for (var registrationName in registrationNameModules) {\n      if (registrationNameModules.hasOwnProperty(registrationName)) {\n        delete registrationNameModules[registrationName];\n      }\n    }\n\n    if (process.env.NODE_ENV !== 'production') {\n      var possibleRegistrationNames = EventPluginRegistry.possibleRegistrationNames;\n      for (var lowerCasedName in possibleRegistrationNames) {\n        if (possibleRegistrationNames.hasOwnProperty(lowerCasedName)) {\n          delete possibleRegistrationNames[lowerCasedName];\n        }\n      }\n    }\n  }\n};\n\nmodule.exports = EventPluginRegistry;"]}