{"version":3,"sources":["node_modules\\react-dom\\lib\\ReactErrorUtils.js"],"names":["caughtError","invokeGuardedCallback","name","func","a","x","ReactErrorUtils","invokeGuardedCallbackWithCatch","rethrowCaughtError","error","process","env","NODE_ENV","window","dispatchEvent","document","createEvent","fakeNode","createElement","boundFunc","bind","evtType","addEventListener","evt","initEvent","removeEventListener","module","exports"],"mappings":";;;;;;;;;;;AAWA;;AAEA,GAAIA,aAAc,IAAlB;;;;;;;;;;AAUA,QAASC,sBAAT,CAA+BC,IAA/B,CAAqCC,IAArC,CAA2CC,CAA3C,CAA8C;AAC5C,GAAI;AACFD,KAAKC,CAAL;AACD,CAAC,MAAOC,CAAP,CAAU;AACV,GAAIL,cAAgB,IAApB,CAA0B;AACxBA,YAAcK,CAAd;AACD;AACF;AACF;;AAED,GAAIC,iBAAkB;AACpBL,sBAAuBA,qBADH;;;;;;AAOpBM,+BAAgCN,qBAPZ;;;;;;AAapBO,mBAAoB,6BAAY;AAC9B,GAAIR,WAAJ,CAAiB;AACf,GAAIS,OAAQT,WAAZ;AACAA,YAAc,IAAd;AACA,KAAMS,MAAN;AACD;AACF,CAnBmB,CAAtB;;;AAsBA,GAAIC,QAAQC,GAAR,CAAYC,QAAZ,GAAyB,YAA7B,CAA2C;;;;;AAKzC,GAAI,MAAOC,OAAP,GAAkB,WAAlB,EAAiC,MAAOA,QAAOC,aAAd,GAAgC,UAAjE,EAA+E,MAAOC,SAAP,GAAoB,WAAnG,EAAkH,MAAOA,UAASC,WAAhB,GAAgC,UAAtJ,CAAkK;AAChK,GAAIC,UAAWF,SAASG,aAAT,CAAuB,OAAvB,CAAf;AACAZ,gBAAgBL,qBAAhB,CAAwC,SAAUC,IAAV,CAAgBC,IAAhB,CAAsBC,CAAtB,CAAyB;AAC/D,GAAIe,WAAYhB,KAAKiB,IAAL,CAAU,IAAV,CAAgBhB,CAAhB,CAAhB;AACA,GAAIiB,SAAU,SAAWnB,IAAzB;AACAe,SAASK,gBAAT,CAA0BD,OAA1B,CAAmCF,SAAnC,CAA8C,KAA9C;AACA,GAAII,KAAMR,SAASC,WAAT,CAAqB,OAArB,CAAV;AACAO,IAAIC,SAAJ,CAAcH,OAAd,CAAuB,KAAvB,CAA8B,KAA9B;AACAJ,SAASH,aAAT,CAAuBS,GAAvB;AACAN,SAASQ,mBAAT,CAA6BJ,OAA7B,CAAsCF,SAAtC,CAAiD,KAAjD;AACD,CARD;AASD;AACF;;AAEDO,OAAOC,OAAP,CAAiBrB,eAAjB","file":"ReactErrorUtils.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 caughtError = null;\n\n/**\n * Call a function while guarding against errors that happens within it.\n *\n * @param {String} name of the guard to use for logging or debugging\n * @param {Function} func The function to invoke\n * @param {*} a First argument\n * @param {*} b Second argument\n */\nfunction invokeGuardedCallback(name, func, a) {\n  try {\n    func(a);\n  } catch (x) {\n    if (caughtError === null) {\n      caughtError = x;\n    }\n  }\n}\n\nvar ReactErrorUtils = {\n  invokeGuardedCallback: invokeGuardedCallback,\n\n  /**\n   * Invoked by ReactTestUtils.Simulate so that any errors thrown by the event\n   * handler are sure to be rethrown by rethrowCaughtError.\n   */\n  invokeGuardedCallbackWithCatch: invokeGuardedCallback,\n\n  /**\n   * During execution of guarded functions we will capture the first error which\n   * we will rethrow to be handled by the top level error handler.\n   */\n  rethrowCaughtError: function () {\n    if (caughtError) {\n      var error = caughtError;\n      caughtError = null;\n      throw error;\n    }\n  }\n};\n\nif (process.env.NODE_ENV !== 'production') {\n  /**\n   * To help development we can get better devtools integration by simulating a\n   * real browser event.\n   */\n  if (typeof window !== 'undefined' && typeof window.dispatchEvent === 'function' && typeof document !== 'undefined' && typeof document.createEvent === 'function') {\n    var fakeNode = document.createElement('react');\n    ReactErrorUtils.invokeGuardedCallback = function (name, func, a) {\n      var boundFunc = func.bind(null, a);\n      var evtType = 'react-' + name;\n      fakeNode.addEventListener(evtType, boundFunc, false);\n      var evt = document.createEvent('Event');\n      evt.initEvent(evtType, false, false);\n      fakeNode.dispatchEvent(evt);\n      fakeNode.removeEventListener(evtType, boundFunc, false);\n    };\n  }\n}\n\nmodule.exports = ReactErrorUtils;"]}