{"version":3,"sources":["node_modules\\react-dom\\lib\\traverseAllChildren.js"],"names":["_prodInvariant","require","ReactCurrentOwner","REACT_ELEMENT_TYPE","getIteratorFn","invariant","KeyEscapeUtils","warning","SEPARATOR","SUBSEPARATOR","didWarnAboutMaps","getComponentKey","component","index","key","escape","toString","traverseAllChildrenImpl","children","nameSoFar","callback","traverseContext","type","$$typeof","child","nextName","subtreeCount","nextNamePrefix","Array","isArray","i","length","iteratorFn","iterator","call","step","entries","ii","next","done","value","process","env","NODE_ENV","mapsAsChildrenAddendum","current","mapsAsChildrenOwnerName","getName","entry","addendum","_isReactElement","name","childrenString","String","Object","keys","join","traverseAllChildren","module","exports"],"mappings":";;;;;;;;;;AAUA;;AAEA,GAAIA,gBAAiBC,QAAQ,sBAAR,CAArB;;AAEA,GAAIC,mBAAoBD,QAAQ,6BAAR,CAAxB;AACA,GAAIE,oBAAqBF,QAAQ,sBAAR,CAAzB;;AAEA,GAAIG,eAAgBH,QAAQ,iBAAR,CAApB;AACA,GAAII,WAAYJ,QAAQ,oBAAR,CAAhB;AACA,GAAIK,gBAAiBL,QAAQ,kBAAR,CAArB;AACA,GAAIM,SAAUN,QAAQ,kBAAR,CAAd;;AAEA,GAAIO,WAAY,GAAhB;AACA,GAAIC,cAAe,GAAnB;;;;;;;;;;;;;AAaA,GAAIC,kBAAmB,KAAvB;;;;;;;;;AASA,QAASC,gBAAT,CAAyBC,SAAzB,CAAoCC,KAApC,CAA2C;;;AAGzC,GAAID,WAAa,MAAOA,UAAP,GAAqB,QAAlC,EAA8CA,UAAUE,GAAV,EAAiB,IAAnE,CAAyE;;AAEvE,MAAOR,gBAAeS,MAAf,CAAsBH,UAAUE,GAAhC,CAAP;AACD;;AAED,MAAOD,OAAMG,QAAN,CAAe,EAAf,CAAP;AACD;;;;;;;;;;AAUD,QAASC,wBAAT,CAAiCC,QAAjC,CAA2CC,SAA3C,CAAsDC,QAAtD,CAAgEC,eAAhE,CAAiF;AAC/E,GAAIC,MAAO,MAAO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/C,kBAAkB2C,OAAtB,CAA+B;AAC7B,GAAIM,MAAOjD,kBAAkB2C,OAAlB,CAA0BE,OAA1B,EAAX;AACA,GAAII,IAAJ,CAAU;AACRF,UAAY,gCAAkCE,IAAlC,CAAyC,IAArD;AACD;AACF;AACF;AACD,GAAIC,gBAAiBC,OAAOnC,QAAP,CAArB;AACA,CAAC,KAAD,CAASuB,QAAQC,GAAR,CAAYC,QAAZ,GAAyB,YAAzB,CAAwCtC,UAAU,KAAV,CAAiB,uDAAjB,CAA0E+C,iBAAmB,iBAAnB,CAAuC,qBAAuBE,OAAOC,IAAP,CAAYrC,QAAZ,EAAsBsC,IAAtB,CAA2B,IAA3B,CAAvB,CAA0D,GAAjG,CAAuGJ,cAAjL,CAAiMH,QAAjM,CAAxC,CAAqPjD,eAAe,IAAf,CAAqBoD,iBAAmB,iBAAnB,CAAuC,qBAAuBE,OAAOC,IAAP,CAAYrC,QAAZ,EAAsBsC,IAAtB,CAA2B,IAA3B,CAAvB,CAA0D,GAAjG,CAAuGJ,cAA5H,CAA4IH,QAA5I,CAA9P,CAAsZ,IAAK,EAA3Z;AACD;AACF;;AAED,MAAOvB,aAAP;AACD;;;;;;;;;;;;;;;;;;AAkBD,QAAS+B,oBAAT,CAA6BvC,QAA7B,CAAuCE,QAAvC,CAAiDC,eAAjD,CAAkE;AAChE,GAAIH,UAAY,IAAhB,CAAsB;AACpB,MAAO,EAAP;AACD;;AAED,MAAOD,yBAAwBC,QAAxB,CAAkC,EAAlC,CAAsCE,QAAtC,CAAgDC,eAAhD,CAAP;AACD;;AAEDqC,OAAOC,OAAP,CAAiBF,mBAAjB","file":"traverseAllChildren.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 _prodInvariant = require('./reactProdInvariant');\n\nvar ReactCurrentOwner = require('react/lib/ReactCurrentOwner');\nvar REACT_ELEMENT_TYPE = require('./ReactElementSymbol');\n\nvar getIteratorFn = require('./getIteratorFn');\nvar invariant = require('fbjs/lib/invariant');\nvar KeyEscapeUtils = require('./KeyEscapeUtils');\nvar warning = require('fbjs/lib/warning');\n\nvar SEPARATOR = '.';\nvar SUBSEPARATOR = ':';\n\n/**\n * This is inlined from ReactElement since this file is shared between\n * isomorphic and renderers. We could extract this to a\n *\n */\n\n/**\n * TODO: Test that a single child and an array with one item have the same key\n * pattern.\n */\n\nvar didWarnAboutMaps = false;\n\n/**\n * Generate a key string that identifies a component within a set.\n *\n * @param {*} component A component that could contain a manual key.\n * @param {number} index Index that is used if a manual key is not provided.\n * @return {string}\n */\nfunction getComponentKey(component, index) {\n  // Do some typechecking here since we call this blindly. We want to ensure\n  // that we don't block potential future ES APIs.\n  if (component && typeof component === 'object' && component.key != null) {\n    // Explicit key\n    return KeyEscapeUtils.escape(component.key);\n  }\n  // Implicit key determined by the index in the set\n  return index.toString(36);\n}\n\n/**\n * @param {?*} children Children tree container.\n * @param {!string} nameSoFar Name of the key path so far.\n * @param {!function} callback Callback to invoke with each child found.\n * @param {?*} traverseContext Used to pass information throughout the traversal\n * process.\n * @return {!number} The number of children in this subtree.\n */\nfunction traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext) {\n  var type = typeof children;\n\n  if (type === 'undefined' || type === 'boolean') {\n    // All of the above are perceived as null.\n    children = null;\n  }\n\n  if (children === null || type === 'string' || type === 'number' ||\n  // The following is inlined from ReactElement. This means we can optimize\n  // some checks. React Fiber also inlines this logic for similar purposes.\n  type === 'object' && children.$$typeof === REACT_ELEMENT_TYPE) {\n    callback(traverseContext, children,\n    // If it's the only child, treat the name as if it was wrapped in an array\n    // so that it's consistent if the number of children grows.\n    nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar);\n    return 1;\n  }\n\n  var child;\n  var nextName;\n  var subtreeCount = 0; // Count of children found in the current subtree.\n  var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR;\n\n  if (Array.isArray(children)) {\n    for (var i = 0; i < children.length; i++) {\n      child = children[i];\n      nextName = nextNamePrefix + getComponentKey(child, i);\n      subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);\n    }\n  } else {\n    var iteratorFn = getIteratorFn(children);\n    if (iteratorFn) {\n      var iterator = iteratorFn.call(children);\n      var step;\n      if (iteratorFn !== children.entries) {\n        var ii = 0;\n        while (!(step = iterator.next()).done) {\n          child = step.value;\n          nextName = nextNamePrefix + getComponentKey(child, ii++);\n          subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);\n        }\n      } else {\n        if (process.env.NODE_ENV !== 'production') {\n          var mapsAsChildrenAddendum = '';\n          if (ReactCurrentOwner.current) {\n            var mapsAsChildrenOwnerName = ReactCurrentOwner.current.getName();\n            if (mapsAsChildrenOwnerName) {\n              mapsAsChildrenAddendum = ' Check the render method of `' + mapsAsChildrenOwnerName + '`.';\n            }\n          }\n          process.env.NODE_ENV !== 'production' ? warning(didWarnAboutMaps, 'Using Maps as children is not yet fully supported. It is an ' + 'experimental feature that might be removed. Convert it to a ' + 'sequence / iterable of keyed ReactElements instead.%s', mapsAsChildrenAddendum) : void 0;\n          didWarnAboutMaps = true;\n        }\n        // Iterator will provide entry [k,v] tuples rather than values.\n        while (!(step = iterator.next()).done) {\n          var entry = step.value;\n          if (entry) {\n            child = entry[1];\n            nextName = nextNamePrefix + KeyEscapeUtils.escape(entry[0]) + SUBSEPARATOR + getComponentKey(child, 0);\n            subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);\n          }\n        }\n      }\n    } else if (type === 'object') {\n      var addendum = '';\n      if (process.env.NODE_ENV !== 'production') {\n        addendum = ' If you meant to render a collection of children, use an array ' + 'instead or wrap the object using createFragment(object) from the ' + 'React add-ons.';\n        if (children._isReactElement) {\n          addendum = \" It looks like you're using an element created by a different \" + 'version of React. Make sure to use only one copy of React.';\n        }\n        if (ReactCurrentOwner.current) {\n          var name = ReactCurrentOwner.current.getName();\n          if (name) {\n            addendum += ' Check the render method of `' + name + '`.';\n          }\n        }\n      }\n      var childrenString = String(children);\n      !false ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Objects are not valid as a React child (found: %s).%s', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum) : _prodInvariant('31', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum) : void 0;\n    }\n  }\n\n  return subtreeCount;\n}\n\n/**\n * Traverses children that are typically specified as `props.children`, but\n * might also be specified through attributes:\n *\n * - `traverseAllChildren(this.props.children, ...)`\n * - `traverseAllChildren(this.props.leftPanelChildren, ...)`\n *\n * The `traverseContext` is an optional argument that is passed through the\n * entire traversal. It can be used to store accumulations or anything else that\n * the callback might find relevant.\n *\n * @param {?*} children Children tree object.\n * @param {!function} callback To invoke upon traversing each child.\n * @param {?*} traverseContext Context for traversal.\n * @return {!number} The number of children in this subtree.\n */\nfunction traverseAllChildren(children, callback, traverseContext) {\n  if (children == null) {\n    return 0;\n  }\n\n  return traverseAllChildrenImpl(children, '', callback, traverseContext);\n}\n\nmodule.exports = traverseAllChildren;"]}