{"version":3,"sources":["node_modules\\react-dom\\lib\\flattenChildren.js"],"names":["KeyEscapeUtils","require","traverseAllChildren","warning","ReactComponentTreeHook","process","env","NODE_ENV","flattenSingleChildIntoContext","traverseContext","child","name","selfDebugID","result","keyUnique","undefined","unescape","getStackAddendumByID","flattenChildren","children","module","exports"],"mappings":";;;;;;;;;;;AAWA;;AAEA,GAAIA,gBAAiBC,QAAQ,kBAAR,CAArB;AACA,GAAIC,qBAAsBD,QAAQ,uBAAR,CAA1B;AACA,GAAIE,SAAUF,QAAQ,kBAAR,CAAd;;AAEA,GAAIG,uBAAJ;;AAEA,GAAI,MAAOC,QAAP,GAAmB,WAAnB,EAAkCA,QAAQC,GAA1C,EAAiDD,QAAQC,GAAR,CAAYC,QAAZ,GAAyB,MAA9E,CAAsF;;;;;;AAMpFH,uBAAyBH,QAAQ,kCAAR,CAAzB;AACD;;;;;;;;AAQD,QAASO,8BAAT,CAAuCC,eAAvC,CAAwDC,KAAxD,CAA+DC,IAA/D,CAAqEC,WAArE,CAAkF;;AAEhF,GAAIH,iBAAmB,MAAOA,gBAAP,GAA2B,QAAlD,CAA4D;AAC1D,GAAII,QAASJ,eAAb;AACA,GAAIK,WAAYD,OAAOF,IAAP,IAAiBI,SAAjC;AACA,GAAIV,QAAQC,GAAR,CAAYC,QAAZ,GAAyB,YAA7B,CAA2C;AACzC,GAAI,CAACH,sBAAL,CAA6B;AAC3BA,uBAAyBH,QAAQ,kCAAR,CAAzB;AACD;AACD,GAAI,CAACa,SAAL,CAAgB;AACdT,QAAQC,GAAR,CAAYC,QAAZ,GAAyB,YAAzB,CAAwCJ,QAAQ,KAAR,CAAe,qEAAuE,uEAAvE,CAAiJ,iCAAhK,CAAmMH,eAAegB,QAAf,CAAwBL,IAAxB,CAAnM,CAAkOP,uBAAuBa,oBAAvB,CAA4CL,WAA5C,CAAlO,CAAxC,CAAsU,IAAK,EAA3U;AACD;AACF;AACD,GAAIE,WAAaJ,OAAS,IAA1B,CAAgC;AAC9BG,OAAOF,IAAP,EAAeD,KAAf;AACD;AACF;AACF;;;;;;;AAOD,QAASQ,gBAAT,CAAyBC,QAAzB,CAAmCP,WAAnC,CAAgD;AAC9C,GAAIO,UAAY,IAAhB,CAAsB;AACpB,MAAOA,SAAP;AACD;AACD,GAAIN,QAAS,EAAb;;AAEA,GAAIR,QAAQC,GAAR,CAAYC,QAAZ,GAAyB,YAA7B,CAA2C;AACzCL,oBAAoBiB,QAApB,CAA8B,SAAUV,eAAV,CAA2BC,KAA3B,CAAkCC,IAAlC,CAAwC;AACpE,MAAOH,+BAA8BC,eAA9B,CAA+CC,KAA/C,CAAsDC,IAAtD,CAA4DC,WAA5D,CAAP;AACD,CAFD,CAEGC,MAFH;AAGD,CAJD,IAIO;AACLX,oBAAoBiB,QAApB,CAA8BX,6BAA9B,CAA6DK,MAA7D;AACD;AACD,MAAOA,OAAP;AACD;;AAEDO,OAAOC,OAAP,CAAiBH,eAAjB","file":"flattenChildren.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 KeyEscapeUtils = require('./KeyEscapeUtils');\nvar traverseAllChildren = require('./traverseAllChildren');\nvar warning = require('fbjs/lib/warning');\n\nvar ReactComponentTreeHook;\n\nif (typeof process !== 'undefined' && process.env && process.env.NODE_ENV === 'test') {\n  // Temporary hack.\n  // Inline requires don't work well with Jest:\n  // https://github.com/facebook/react/issues/7240\n  // Remove the inline requires when we don't need them anymore:\n  // https://github.com/facebook/react/pull/7178\n  ReactComponentTreeHook = require('react/lib/ReactComponentTreeHook');\n}\n\n/**\n * @param {function} traverseContext Context passed through traversal.\n * @param {?ReactComponent} child React child component.\n * @param {!string} name String name of key path to child.\n * @param {number=} selfDebugID Optional debugID of the current internal instance.\n */\nfunction flattenSingleChildIntoContext(traverseContext, child, name, selfDebugID) {\n  // We found a component instance.\n  if (traverseContext && typeof traverseContext === 'object') {\n    var result = traverseContext;\n    var keyUnique = result[name] === undefined;\n    if (process.env.NODE_ENV !== 'production') {\n      if (!ReactComponentTreeHook) {\n        ReactComponentTreeHook = require('react/lib/ReactComponentTreeHook');\n      }\n      if (!keyUnique) {\n        process.env.NODE_ENV !== 'production' ? warning(false, 'flattenChildren(...): Encountered two children with the same key, ' + '`%s`. Child keys must be unique; when two children share a key, only ' + 'the first child will be used.%s', KeyEscapeUtils.unescape(name), ReactComponentTreeHook.getStackAddendumByID(selfDebugID)) : void 0;\n      }\n    }\n    if (keyUnique && child != null) {\n      result[name] = child;\n    }\n  }\n}\n\n/**\n * Flattens children that are typically specified as `props.children`. Any null\n * children will not be included in the resulting object.\n * @return {!object} flattened children keyed by name.\n */\nfunction flattenChildren(children, selfDebugID) {\n  if (children == null) {\n    return children;\n  }\n  var result = {};\n\n  if (process.env.NODE_ENV !== 'production') {\n    traverseAllChildren(children, function (traverseContext, child, name) {\n      return flattenSingleChildIntoContext(traverseContext, child, name, selfDebugID);\n    }, result);\n  } else {\n    traverseAllChildren(children, flattenSingleChildIntoContext, result);\n  }\n  return result;\n}\n\nmodule.exports = flattenChildren;"]}