1 line
653 KiB
Plaintext
1 line
653 KiB
Plaintext
{"version":3,"sources":["webpack://ReactDevToolsBackend/webpack/universalModuleDefinition","webpack://ReactDevToolsBackend/webpack/bootstrap","webpack://ReactDevToolsBackend//Users/bvaughn/Documents/git/react.alt2/build/node_modules/react-is/index.js","webpack://ReactDevToolsBackend//Users/bvaughn/Documents/git/react.alt2/node_modules/object-assign/index.js","webpack://ReactDevToolsBackend/../react-devtools-shared/node_modules/semver/semver.js","webpack://ReactDevToolsBackend//Users/bvaughn/Documents/git/react.alt2/node_modules/lodash.throttle/index.js","webpack://ReactDevToolsBackend/(webpack)/buildin/global.js","webpack://ReactDevToolsBackend//Users/bvaughn/Documents/git/react.alt2/node_modules/process/browser.js","webpack://ReactDevToolsBackend//Users/bvaughn/Documents/git/react.alt2/node_modules/lru-cache/index.js","webpack://ReactDevToolsBackend//Users/bvaughn/Documents/git/react.alt2/node_modules/clipboard-js/clipboard.js","webpack://ReactDevToolsBackend//Users/bvaughn/Documents/git/react.alt2/build/node_modules/react-debug-tools/index.js","webpack://ReactDevToolsBackend/../react-devtools-shared/src/devtools/views/root.css","webpack://ReactDevToolsBackend//Users/bvaughn/Documents/git/react.alt2/node_modules/lru-cache/node_modules/yallist/yallist.js","webpack://ReactDevToolsBackend//Users/bvaughn/Documents/git/react.alt2/node_modules/lru-cache/node_modules/yallist/iterator.js","webpack://ReactDevToolsBackend//Users/bvaughn/Documents/git/react.alt2/build/node_modules/react-is/cjs/react-is.production.min.js","webpack://ReactDevToolsBackend//Users/bvaughn/Documents/git/react.alt2/node_modules/timers-browserify/main.js","webpack://ReactDevToolsBackend//Users/bvaughn/Documents/git/react.alt2/node_modules/setimmediate/setImmediate.js","webpack://ReactDevToolsBackend//Users/bvaughn/Documents/git/react.alt2/build/node_modules/react-debug-tools/cjs/react-debug-tools.production.min.js","webpack://ReactDevToolsBackend//Users/bvaughn/Documents/git/react.alt2/node_modules/error-stack-parser/error-stack-parser.js","webpack://ReactDevToolsBackend//Users/bvaughn/Documents/git/react.alt2/node_modules/stackframe/stackframe.js","webpack://ReactDevToolsBackend//Users/bvaughn/Documents/git/react.alt2/build/node_modules/react/index.js","webpack://ReactDevToolsBackend//Users/bvaughn/Documents/git/react.alt2/build/node_modules/react/cjs/react.production.min.js","webpack://ReactDevToolsBackend/../react-devtools-shared/src/events.js","webpack://ReactDevToolsBackend/../react-devtools-shared/src/constants.js","webpack://ReactDevToolsBackend/../react-devtools-shared/src/storage.js","webpack://ReactDevToolsBackend//Users/bvaughn/Documents/git/react.alt2/node_modules/memoize-one/esm/index.js","webpack://ReactDevToolsBackend/../react-devtools-shared/src/backend/views/utils.js","webpack://ReactDevToolsBackend/../react-devtools-shared/src/backend/views/Highlighter/Overlay.js","webpack://ReactDevToolsBackend/../react-devtools-shared/src/backend/views/Highlighter/Highlighter.js","webpack://ReactDevToolsBackend/../react-devtools-shared/src/backend/views/Highlighter/index.js","webpack://ReactDevToolsBackend/../react-devtools-shared/src/backend/views/TraceUpdates/canvas.js","webpack://ReactDevToolsBackend/../react-devtools-shared/src/backend/views/TraceUpdates/index.js","webpack://ReactDevToolsBackend/../shared/ReactSymbols.js","webpack://ReactDevToolsBackend/../react-devtools-shared/src/hydration.js","webpack://ReactDevToolsBackend/../react-devtools-shared/src/utils.js","webpack://ReactDevToolsBackend/../react-devtools-shared/src/backend/utils.js","webpack://ReactDevToolsBackend/../react-devtools-shared/src/backend/renderer.js","webpack://ReactDevToolsBackend/../react-devtools-shared/src/backend/ReactSymbols.js","webpack://ReactDevToolsBackend/../react-devtools-shared/src/types.js","webpack://ReactDevToolsBackend/../shared/ConsolePatchingDev.js","webpack://ReactDevToolsBackend/../react-devtools-shared/src/backend/DevToolsComponentStackFrame.js","webpack://ReactDevToolsBackend/../react-devtools-shared/src/backend/DevToolsFiberComponentStack.js","webpack://ReactDevToolsBackend/../react-devtools-shared/src/backend/console.js","webpack://ReactDevToolsBackend/../react-devtools-shared/src/backend/agent.js","webpack://ReactDevToolsBackend/../react-devtools-shared/src/bridge.js","webpack://ReactDevToolsBackend/../react-devtools-shared/src/backend/legacy/utils.js","webpack://ReactDevToolsBackend/../react-devtools-shared/src/backend/legacy/renderer.js","webpack://ReactDevToolsBackend/../react-devtools-shared/src/backend/NativeStyleEditor/resolveBoxStyle.js","webpack://ReactDevToolsBackend/../react-devtools-shared/src/backend/NativeStyleEditor/setupNativeStyleEditor.js","webpack://ReactDevToolsBackend/../react-devtools-shared/src/hook.js","webpack://ReactDevToolsBackend/./src/backend.js","webpack://ReactDevToolsBackend/../react-devtools-shared/src/backend/index.js"],"names":["root","factory","exports","module","define","amd","window","installedModules","__webpack_require__","moduleId","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","require","getOwnPropertySymbols","propIsEnumerable","propertyIsEnumerable","toObject","val","TypeError","assign","test1","String","getOwnPropertyNames","test2","fromCharCode","map","join","test3","split","forEach","letter","keys","err","shouldUseNative","target","source","from","symbols","to","arguments","length","debug","SemVer","process","env","NODE_DEBUG","test","args","Array","slice","unshift","console","log","apply","SEMVER_SPEC_VERSION","MAX_SAFE_INTEGER","Number","re","src","tokens","R","tok","NUMERICIDENTIFIER","NUMERICIDENTIFIERLOOSE","NONNUMERICIDENTIFIER","MAINVERSION","MAINVERSIONLOOSE","PRERELEASEIDENTIFIER","PRERELEASEIDENTIFIERLOOSE","PRERELEASE","PRERELEASELOOSE","BUILDIDENTIFIER","BUILD","FULLPLAIN","FULL","LOOSEPLAIN","LOOSE","GTLT","XRANGEIDENTIFIERLOOSE","XRANGEIDENTIFIER","XRANGEPLAIN","XRANGEPLAINLOOSE","XRANGE","XRANGELOOSE","COERCE","COERCERTL","RegExp","LONETILDE","TILDETRIM","TILDE","TILDELOOSE","LONECARET","CARETTRIM","CARET","CARETLOOSE","COMPARATORLOOSE","COMPARATOR","COMPARATORTRIM","HYPHENRANGE","HYPHENRANGELOOSE","STAR","parse","version","options","loose","includePrerelease","er","this","trim","match","raw","major","minor","patch","prerelease","id","num","build","format","valid","v","clean","replace","toString","compare","other","compareMain","comparePre","compareIdentifiers","a","b","undefined","compareBuild","inc","release","identifier","push","isNaN","Error","diff","version1","version2","eq","v1","v2","prefix","defaultResult","numeric","anum","bnum","gt","lt","neq","gte","lte","cmp","op","Comparator","comp","semver","ANY","operator","rcompareIdentifiers","compareLoose","versionA","versionB","rcompare","sort","list","rsort","Range","range","set","parseRange","filter","isSatisfiable","comparators","result","remainingComparators","testComparator","pop","every","otherComparator","intersects","isX","toLowerCase","hyphenReplace","$0","fM","fm","fp","fpr","fb","tM","tm","tp","tpr","tb","testSet","allowed","satisfies","outside","hilo","gtfn","ltefn","ltfn","ecomp","high","low","comparator","rangeTmp","sameDirectionIncreasing","sameDirectionDecreasing","sameSemVer","differentDirectionsInclusive","oppositeDirectionsLessThan","oppositeDirectionsGreaterThan","comps","hr","compRe","_","M","pr","ret","replaceCaret","replaceCarets","replaceTilde","replaceTildes","gtlt","xM","xm","xp","anyX","replaceXRange","replaceXRanges","replaceStars","parseComparator","some","thisComparators","rangeComparators","thisComparator","rangeComparator","toComparators","maxSatisfying","versions","max","maxSV","rangeObj","minSatisfying","min","minSV","minVersion","minver","compver","validRange","ltr","gtr","parsed","r1","r2","coerce","rtl","next","exec","index","lastIndex","reTrim","reIsBadHex","reIsBinary","reIsOctal","freeParseInt","parseInt","freeGlobal","global","freeSelf","self","Function","objectToString","nativeMax","Math","nativeMin","now","Date","debounce","func","wait","lastArgs","lastThis","maxWait","timerId","lastCallTime","lastInvokeTime","leading","maxing","trailing","invokeFunc","time","thisArg","leadingEdge","setTimeout","timerExpired","shouldInvoke","timeSinceLastCall","trailingEdge","remainingWait","debounced","isInvoking","toNumber","isObject","cancel","clearTimeout","flush","type","isSymbol","isObjectLike","valueOf","isBinary","g","e","cachedSetTimeout","cachedClearTimeout","defaultSetTimout","defaultClearTimeout","runTimeout","fun","currentQueue","queue","draining","queueIndex","cleanUpNextTick","concat","drainQueue","timeout","len","run","marker","runClearTimeout","Item","array","noop","nextTick","title","browser","argv","on","addListener","once","off","removeListener","removeAllListeners","emit","prependListener","prependOnceListener","listeners","binding","cwd","chdir","dir","umask","Yallist","MAX","LENGTH","LENGTH_CALCULATOR","ALLOW_STALE","MAX_AGE","DISPOSE","NO_DISPOSE_ON_SET","LRU_LIST","CACHE","UPDATE_AGE_ON_GET","naiveLength","LRUCache","Infinity","lc","stale","maxAge","dispose","noDisposeOnSet","updateAgeOnGet","reset","fn","thisp","walker","tail","prev","forEachStep","head","toArray","k","hit","Map","isStale","h","has","del","item","Entry","node","arr","expiresAt","mL","allowStale","mA","lC","doUse","unshiftNode","delete","removeNode","document","addEventListener","_resolve","_dataType","_intercept","clipboard","copy","_data","_bogusSelection","cleanup","getSelection","removeAllRanges","clipboardData","setData","preventDefault","data","Promise","resolve","reject","Node","XMLSerializer","serializeToString","triggerCopy","tryBogusSelect","execCommand","sel","queryCommandEnabled","isCollapsed","createRange","selectNodeContents","body","addRange","bogusSelect","paste","getData","dataType","ClipboardEvent","_state","_value","_deferreds","f","j","onFulfilled","onRejected","then","immediateFn","setImmediate","isArray","all","constructor","race","strData","definition","insert","inserted","pushNode","res","shift","forEachReverse","getReverse","mapReverse","reduce","initial","acc","reduceReverse","toArrayReverse","sliceReverse","splice","start","deleteCount","reverse","iterator","q","u","for","w","x","$$typeof","y","z","A","B","C","D","E","F","G","H","ContextConsumer","ContextProvider","Element","ForwardRef","Fragment","Lazy","Memo","Portal","Profiler","StrictMode","Suspense","isAsyncMode","isConcurrentMode","isContextConsumer","isContextProvider","isElement","isForwardRef","isFragment","isLazy","isMemo","isPortal","isProfiler","isStrictMode","isSuspense","isValidElementType","getModuleId","typeOf","scope","Timeout","clearFn","_id","_clearFn","setInterval","clearInterval","close","unref","ref","enroll","msecs","_idleTimeoutId","_idleTimeout","unenroll","_unrefActive","active","_onTimeout","clearImmediate","registerImmediate","html","channel","messagePrefix","onGlobalMessage","nextHandle","tasksByHandle","currentlyRunningATask","doc","attachTo","getPrototypeOf","handle","runIfPresent","postMessage","importScripts","postMessageIsAsynchronous","oldOnMessage","onmessage","canUsePostMessage","MessageChannel","port1","event","port2","createElement","documentElement","script","onreadystatechange","removeChild","appendChild","random","indexOf","attachEvent","callback","task","__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED","useContext","_currentValue","useState","useReducer","useRef","useLayoutEffect","useEffect","useImperativeHandle","useDebugValue","useCallback","useMemo","primitive","stackError","getCacheForType","encodeURIComponent","readContext","memoizedState","current","useTransition","useMutableSource","_source","useDeferredValue","useOpaqueIdentifier","lastIndexOf","I","substr","J","functionName","isStateEditable","subHooks","K","L","ReactCurrentDispatcher","inspectHooks","inspectHooksOfFiber","tag","memoizedProps","elementType","defaultProps","_context","return","render","StackFrame","FIREFOX_SAFARI_STACK_REGEXP","CHROME_IE_STACK_REGEXP","SAFARI_NATIVE_CODE_REGEXP","error","stacktrace","parseOpera","stack","parseV8OrIE","parseFFOrSafari","extractLocation","urlLike","parts","line","sanitizedLine","location","locationParts","fileName","lineNumber","columnNumber","functionNameRegex","matches","message","parseOpera9","parseOpera11","parseOpera10","lineRE","lines","argsRaw","functionCall","_capitalize","str","charAt","toUpperCase","substring","_getter","booleanProps","numericProps","stringProps","props","obj","getArgs","setArgs","getEvalOrigin","evalOrigin","setEvalOrigin","getFileName","getLineNumber","getColumnNumber","getFunctionName","getIsEval","fromString","argsStartIndex","argsEndIndex","locationString","Boolean","parseFloat","isFinite","unstable_SuspenseList","unstable_DebugTracingMode","unstable_LegacyHidden","isMounted","enqueueForceUpdate","enqueueReplaceState","enqueueSetState","context","refs","updater","isReactComponent","setState","forceUpdate","isPureReactComponent","__self","__source","children","_owner","N","escape","O","done","P","Q","_status","_result","default","S","T","transition","U","ReactCurrentBatchConfig","ReactCurrentOwner","IsSomeRendererActing","Children","count","only","Component","PureComponent","cloneElement","createContext","_calculateChangedBits","_currentValue2","_threadCount","Provider","Consumer","createFactory","createRef","forwardRef","isValidElement","lazy","_payload","_init","memo","unstable_createMutableSource","_getVersion","_workInProgressVersionPrimary","_workInProgressVersionSecondary","unstable_getCacheForType","unstable_startTransition","unstable_useDeferredValue","unstable_useMutableSource","unstable_useOpaqueIdentifier","unstable_useTransition","EventEmitter","listener","listenersMap","didThrow","caughtError","clonedListeners","clear","rawStyleString","extractVar","varName","regExp","sessionStorageGetItem","sessionStorage","getItem","sessionStorageRemoveItem","removeItem","sessionStorageSetItem","setItem","simpleIsEqual","getOwnerWindow","ownerDocument","defaultView","getOwnerIframe","nodeWindow","frameElement","getBoundingClientRectWithBorderOffset","dimensions","getElementDimensions","mergeRectOffsets","getBoundingClientRect","top","borderTop","left","borderLeft","bottom","borderBottom","right","borderRight","width","height","rects","previousRect","rect","getNestedBoundingClientRect","boundaryWindow","ownerIframe","currentIframe","onlyOneMore","domElement","calculatedStyle","getComputedStyle","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth","marginLeft","marginRight","marginTop","marginBottom","paddingLeft","paddingRight","paddingTop","paddingBottom","OverlayRect","container","border","padding","content","style","borderColor","overlayStyles","backgroundColor","background","margin","pointerEvents","position","zIndex","parentNode","box","dims","boxWrap","OverlayTip","tip","display","flexFlow","borderRadius","fontFamily","fontWeight","fontSize","whiteSpace","nameSpan","color","dimSpan","textContent","round","bounds","tipRect","tipPos","tipSize","tipHeight","tipWidth","findTipPos","Overlay","currentWindow","__REACT_DEVTOOLS_TARGET_WINDOW__","tipBoundsWindow","remove","nodes","elements","nodeType","ELEMENT_NODE","outerBox","POSITIVE_INFINITY","NEGATIVE_INFINITY","element","update","nodeName","hook","__REACT_DEVTOOLS_GLOBAL_HOOK__","rendererInterfaces","ownerName","values","rendererInterface","getFiberIDForNative","getDisplayNameForFiberID","updateText","tipBounds","updatePosition","scrollY","scrollX","innerHeight","innerWidth","what","borderStyle","timeoutID","overlay","hideOverlay","showOverlay","componentName","hideAfterTimeout","inspect","iframesListeningTo","Set","setupHighlighter","bridge","agent","registerListenersOnWindow","onClick","onMouseEvent","onPointerDown","onPointerOver","onPointerUp","stopInspectingNative","removeListenersOnWindow","frame","contentWindow","removeEventListener","stopPropagation","send","selectFiberForNode","tagName","iframe","add","displayName","openNativeElementsPanel","rendererID","scrollIntoView","renderer","warn","findNativeNodesForFiberID","block","inline","throttle","resultFn","isEqual","lastResult","calledOnce","isNewArgEqualToLast","newArg","_len","newArgs","_key","memoize","getIDForNode","COLORS","canvas","draw","nodeToData","cssText","insertBefore","firstChild","initialize","canvasFlow","getContext","clearRect","colorIndex","lineWidth","strokeStyle","strokeRect","setLineDash","drawBorder","getCurrentTime","performance","drawAnimationFrameID","isEnabled","redrawTimeoutID","toggleEnabled","cancelAnimationFrame","traceUpdates","lastMeasuredAt","measureNode","expirationTime","requestAnimationFrame","prepareToDraw","earliestExpiration","MAX_VALUE","REACT_SUSPENSE_LIST_TYPE","symbolFor","meta","inspectable","inspected","preview_long","preview_short","readonly","size","unserializable","createDehydrated","cleaned","path","dehydrated","formatDataForPreview","dehydrate","isPathAllowed","isPathAllowedCheck","level","getDataType","getDisplayNameForReactElement","byteLength","unserializableValue","getAllEnumerableKeys","cachedDisplayNames","WeakMap","encodedStringCache","LRU","alphaSortKeys","currentKeys","descriptors","getOwnPropertyDescriptors","getDisplayName","fallbackName","nameFromCache","uidCounter","getUID","utfEncodeString","string","cached","encoded","codePointAt","getInObject","reduced","attr","deletePathInObject","last","parent","renamePathInObject","oldPath","newPath","lastOld","setInObject","HTMLElement","ArrayBuffer","isView","toStringValue","SuspenseList","truncateForDisplay","showFormattedValue","buffer","formatted","shortName","entryOrEntries","cleanForBridge","cleanedPaths","unserializablePaths","cleanedData","copyToClipboard","cache","safeToCopy","JSON","stringify","text","clipboardCopyText","catch","copyWithDelete","updated","copyWithRename","oldKey","newKey","copyWithSet","getFiberFlags","fiber","flags","effectTag","getInternalReactConstants","ReactTypeOfWork","getTypeSymbol","symbolOrNumber","ClassComponent","CoroutineComponent","CoroutineHandlerPhase","DehydratedSuspenseComponent","FunctionComponent","HostComponent","HostPortal","HostRoot","HostText","IncompleteClassComponent","IndeterminateComponent","LazyComponent","LegacyHiddenComponent","MemoComponent","Mode","OffscreenComponent","ScopeComponent","SimpleMemoComponent","SuspenseComponent","SuspenseListComponent","YieldComponent","getDisplayNameForFiber","resolvedType","resolveFiberType","resolvedContext","ReactPriorityLevels","ImmediatePriority","UserBlockingPriority","NormalPriority","LowPriority","IdlePriority","NoPriority","ReactTypeOfSideEffect","NoFlags","PerformedWork","Placement","attach","overrideHookState","overrideHookStateDeletePath","overrideHookStateRenamePath","overrideProps","overridePropsDeletePath","overridePropsRenamePath","setSuspenseHandler","scheduleUpdate","supportsTogglingSuspense","registerRendererWithConsole","appendComponentStack","__REACT_DEVTOOLS_APPEND_COMPONENT_STACK__","breakOnConsoleErrors","__REACT_DEVTOOLS_BREAK_ON_CONSOLE_ERRORS__","patchConsole","hideElementsWithDisplayNames","hideElementsWithPaths","hideElementsWithTypes","traceUpdatesEnabled","traceUpdatesForNodes","applyComponentFilters","componentFilters","componentFilter","isValid","shouldFilterFiber","_debugSource","getElementTypeForFiber","getPrimaryFiber","primaryFibers","alternate","__REACT_DEVTOOLS_COMPONENT_FILTERS__","fiberToIDMap","idToFiberMap","idToTreeBaseDurationMap","idToRootMap","currentRootID","getFiberID","primaryFiber","updateContextsForFiber","idToContextsMap","contexts","getContextsForFiber","NO_CONTEXT","instance","stateNode","legacyContext","modernContext","contextType","getContextChangedKeys","prevContexts","nextContexts","prevLegacyContext","prevModernContext","nextLegacyContext","nextModernContext","getChangedKeys","didHooksChange","changedKeys","didFiberRender","prevFiber","nextFiber","pendingOperations","pendingRealUnmountedIDs","pendingSimulatedUnmountedIDs","pendingOperationsQueue","pendingStringTable","pendingStringTableLength","pendingUnmountedRootID","pushOperation","flushPendingEvents","isProfiling","numUnmountIDs","operations","encodedKey","getStringID","existingID","stringID","recordUnmount","isSimulated","trackedPathMatchFiber","setTrackedPath","isRoot","mountFiberRecursively","parentFiber","traverseSiblings","traceNearestHostComponentUpdate","mightSiblingsBeOnTrackedPath","trackedPath","mightBeOnTrackedPath","returnFiber","returnAlternate","actualFrame","getPathFrame","expectedFrame","trackedPathMatchDepth","updateTrackedPathStateBeforeMount","shouldIncludeInTree","hasOwnerMetadata","isProfilingSupported","displayNamesByRootID","getDisplayNameForRoot","_debugOwner","ownerID","parentID","displayNameStringID","keyStringID","recordProfilingDurations","recordMount","primaryChildFragment","child","fallbackChildFragment","sibling","fallbackChild","primaryChild","updateTrackedPathStateAfterMount","unmountFiberChildrenRecursively","isTimedOutSuspense","actualDuration","treeBaseDuration","convertedTreeBaseDuration","floor","selfDuration","metadata","currentCommitProfilingMetadata","durations","maxActualDuration","recordChangeDescriptions","changeDescription","isFirstMount","state","getChangeDescription","changeDescriptions","findReorderedChildrenRecursively","nextChildren","updateFiberRecursively","mostRecentlyInspectedElement","hasElementUpdatedSinceLastInspected","shouldResetChildren","prevDidTimeout","nextDidTimeOut","nextFiberChild","nextFallbackChildSet","prevFiberChild","prevFallbackChildSet","nextPrimaryChildSet","nextChild","prevChildAtSameIndex","prevChild","findAllCurrentHostFibers","hostFiber","nextChildSet","childSet","numChildren","recordResetChildren","fibers","findCurrentFiberUsingSlowPathById","maybeFallbackFiber","isFiberMountedImpl","parentA","parentB","nextParent","didFindChild","inspectElementRaw","dependencies","usesHooks","typeSymbol","canViewSource","contextTypes","consumerResolvedContext","currentType","currentTypeSymbol","hasLegacyContext","owners","owner","hooks","originalConsoleMethods","method","currentDispatcherRef","rootType","fiberRoot","_debugRootType","canEditHooks","canEditFunctionProps","canEditHooksAndDeletePaths","canEditHooksAndRenamePaths","canEditFunctionPropsDeletePaths","canEditFunctionPropsRenamePaths","canToggleSuspense","forceFallbackForSuspenseIDs","rendererPackageName","rendererVersion","currentlyInspectedPaths","isMostRecentlyInspectedElementCurrent","mergeInspectedPaths","createIsPathAllowed","secondaryCategory","initialTreeBaseDurationsMap","initialIDToRootMap","profilingStartTime","rootToCommitProfilingMetadataMap","startProfiling","shouldRecordChangeDescriptions","getFiberRoots","rootID","crawlToInitializeContextsMap","shouldSuspendFiberAlwaysFalse","shouldSuspendFiberAccordingToSet","rootPseudoKeys","rootDisplayNameCounter","setRootPseudoKey","counter","pseudoKey","preferredDisplayName","fallbackDisplayName","formatPriorityLevel","priorityLevel","copyElementPath","deletePath","hookID","pendingProps","flushInitialOperations","localPendingOperationsQueue","memoizedInteractions","commitTime","interactions","interaction","timestamp","getBestMatchForTrackedPath","isFullMatch","hostInstance","findNearestUnfilteredAncestor","findFiberByHostInstance","getInstanceAndStyle","getOwnersList","getPathForElement","keyPath","getProfilingData","dataForRoots","commitProfilingMetadata","commitData","initialTreeBaseDurations","allInteractions","interactionCommits","commitProfilingData","commitIndex","interactionIDs","commitIndices","fiberActualDurations","fiberSelfDurations","fiberID","entries","duration","handleCommitFiberRoot","wasMounted","removeRootPseudoKey","handleCommitFiberUnmount","inspectElement","inspectedElement","$r","updateSelectedElement","cleanedInspectedElement","logElementToConsole","supportsGroup","groupCollapsed","nativeNodes","chrome","navigator","userAgent","groupEnd","prepareViewAttributeSource","$attribute","prepareViewElementSource","$type","overrideSuspense","forceFallback","overrideValueAtPath","renamePath","setTraceUpdatesEnabled","stopProfiling","storeAsGlobal","updateComponentFilters","describeBuiltInComponentFrame","ownerFn","reentry","describeNativeComponentFrame","construct","control","previousPrepareStackTrace","prepareStackTrace","previousDispatcher","Fake","Reflect","sample","sampleLines","controlLines","describeFunctionComponentFrame","describeFiber","workTagMap","workInProgress","ctor","describeClassComponentFrame","getStackByFiberInDevAndProd","info","APPEND_STACK_TO_METHODS","PREFIX_REGEX","ROW_COLUMN_NUMBER_REGEX","injectedRenderers","targetConsole","targetConsoleMethods","unpatchFn","registerRenderer","getCurrentFiber","consoleSettingsRef","originalMethod","overrideMethod","latestAppendComponentStack","lastArg","alreadyHasComponentStack","componentStack","__REACT_DEVTOOLS_ORIGINAL_METHOD__","Agent","_rendererInterfaces","_bridge","_isProfiling","_persistedSelectionMatch","_persistedSelection","_throttledPersistSelection","wasForwarded","_traceUpdatesEnabled","selectNode","_recordChangeDescriptions","prevMatch","nextMatch","prevMatchID","nextMatchID","persistedSelectionString","getProfilingStatus","reloadAndProfile","syncSelectionFromNativeElementsPanel","shutdown","updateConsolePatchSettings","viewAttributeSource","viewElementSource","overrideContext","overrideState","injectedAgent","isBackendStorageAPISupported","localStorage","selection","Bridge","wall","_timeoutID","_messageQueue","_wall","_flush","_wallUnlisten","listen","payload","_isShutdown","wallUnlisten","decorate","old","restoreMany","olds","internalInstance","_currentElement","getElementType","getPublicInstance","getChildren","_renderedComponent","_renderedChildren","renderedChildren","findNativeNodeForInternalID","idToInternalInstanceMap","internalInstanceToIDMap","internalInstanceToRootIDMap","getInternalIDForNative","getID","areEqualArrays","ComponentTree","getClosestInstanceFromNode","getNodeFromInstance","Mount","getNode","parentIDStack","oldReconcilerMethods","recordReorder","nextChildIDs","crawlAndRecordInitialMounts","Reconciler","fns","decorateMany","mountComponent","hostContainerInfo","_topLevelWrapper","performUpdateIfNecessary","prevChildren","receiveComponent","unmountComponent","pendingUnmountedIDs","currentlyInspectedElementID","publicInstance","_instance","Mixin","roots","_instancesByReactRootID","_instancesByContainerID","nativeNode","enabled","resolveBoxStyle","hasParts","styleForAll","styleForHorizontal","styleForLeft","styleForRight","styleForEnd","styleForStart","styleForVertical","styleForBottom","styleForTop","setupNativeStyleEditor","resolveNativeStyle","validAttributes","measureStyle","oldName","newName","customStyle","newStyle","setNativeProps","styleOverrides","componentIDToStyleOverrides","shallowClone","renameStyle","lastLength","setStyle","isSupported","EMPTY_BOX_STYLE","resolvedStyle","measure","layout","cloned","hasDetectedBadDCE","fiberRoots","renderers","inject","reactBuildType","bundleType","_renderNewRootComponent","renderRootCode","detectReactBuildType","__REACT_DEVTOOLS_ATTACH__","sub","supportsFiber","checkDCE","onCommitFiberUnmount","onCommitFiberRoot","mountedRoots","isKnownRoot","isUnmounting","configurable","__DEV__","installHook","savedComponentFilters","connectToDevTools","host","nativeStyleEditorValidAttributes","useHttps","port","websocket","resolveRNStyle","retryConnectionDelay","isAppActive","protocol","retryTimeoutID","messageListeners","uri","ws","WebSocket","onclose","scheduleRetry","onerror","onopen","transferable","readyState","OPEN","subs","setRendererInterface","onUnsupportedRenderer","onHookOperations","onTraceUpdates","attachRenderer","attachLegacy","reactDevtoolsAgent","onAgentShutdown","initBackend","lazyResolveRNStyle","lazyNativeStyleEditorValidAttributes","initAfterTick"],"mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,GACe,iBAAZC,QACdA,QAA8B,qBAAID,IAElCD,EAA2B,qBAAIC,IARjC,CASGK,QAAQ,WACX,O,YCTE,IAAIC,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUP,QAGnC,IAAIC,EAASI,EAAiBE,GAAY,CACzCC,EAAGD,EACHE,GAAG,EACHT,QAAS,IAUV,OANAU,EAAQH,GAAUI,KAAKV,EAAOD,QAASC,EAAQA,EAAOD,QAASM,GAG/DL,EAAOQ,GAAI,EAGJR,EAAOD,QA0Df,OArDAM,EAAoBM,EAAIF,EAGxBJ,EAAoBO,EAAIR,EAGxBC,EAAoBQ,EAAI,SAASd,EAASe,EAAMC,GAC3CV,EAAoBW,EAAEjB,EAASe,IAClCG,OAAOC,eAAenB,EAASe,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEV,EAAoBgB,EAAI,SAAStB,GACX,oBAAXuB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAenB,EAASuB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAenB,EAAS,aAAc,CAAEyB,OAAO,KAQvDnB,EAAoBoB,EAAI,SAASD,EAAOE,GAEvC,GADU,EAAPA,IAAUF,EAAQnB,EAAoB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iD,EACvCgjD,cAxJVlB,IAbF,SAASA,IACgB,OAAnBN,IAEFA,EAAiB1uC,YACf,kBAAMguC,GAAkBp6C,KACxB26C","file":"backend.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"ReactDevToolsBackend\"] = factory();\n\telse\n\t\troot[\"ReactDevToolsBackend\"] = factory();\n})(window, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 20);\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-is.production.min.js');\n} else {\n module.exports = require('./cjs/react-is.development.js');\n}\n","/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n'use strict';\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n","exports = module.exports = SemVer\n\nvar debug\n/* istanbul ignore next */\nif (typeof process === 'object' &&\n process.env &&\n process.env.NODE_DEBUG &&\n /\\bsemver\\b/i.test(process.env.NODE_DEBUG)) {\n debug = function () {\n var args = Array.prototype.slice.call(arguments, 0)\n args.unshift('SEMVER')\n console.log.apply(console, args)\n }\n} else {\n debug = function () {}\n}\n\n// Note: this is the semver.org version of the spec that it implements\n// Not necessarily the package version of this code.\nexports.SEMVER_SPEC_VERSION = '2.0.0'\n\nvar MAX_LENGTH = 256\nvar MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER ||\n /* istanbul ignore next */ 9007199254740991\n\n// Max safe segment length for coercion.\nvar MAX_SAFE_COMPONENT_LENGTH = 16\n\n// The actual regexps go on exports.re\nvar re = exports.re = []\nvar src = exports.src = []\nvar t = exports.tokens = {}\nvar R = 0\n\nfunction tok (n) {\n t[n] = R++\n}\n\n// The following Regular Expressions can be used for tokenizing,\n// validating, and parsing SemVer version strings.\n\n// ## Numeric Identifier\n// A single `0`, or a non-zero digit followed by zero or more digits.\n\ntok('NUMERICIDENTIFIER')\nsrc[t.NUMERICIDENTIFIER] = '0|[1-9]\\\\d*'\ntok('NUMERICIDENTIFIERLOOSE')\nsrc[t.NUMERICIDENTIFIERLOOSE] = '[0-9]+'\n\n// ## Non-numeric Identifier\n// Zero or more digits, followed by a letter or hyphen, and then zero or\n// more letters, digits, or hyphens.\n\ntok('NONNUMERICIDENTIFIER')\nsrc[t.NONNUMERICIDENTIFIER] = '\\\\d*[a-zA-Z-][a-zA-Z0-9-]*'\n\n// ## Main Version\n// Three dot-separated numeric identifiers.\n\ntok('MAINVERSION')\nsrc[t.MAINVERSION] = '(' + src[t.NUMERICIDENTIFIER] + ')\\\\.' +\n '(' + src[t.NUMERICIDENTIFIER] + ')\\\\.' +\n '(' + src[t.NUMERICIDENTIFIER] + ')'\n\ntok('MAINVERSIONLOOSE')\nsrc[t.MAINVERSIONLOOSE] = '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')\\\\.' +\n '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')\\\\.' +\n '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')'\n\n// ## Pre-release Version Identifier\n// A numeric identifier, or a non-numeric identifier.\n\ntok('PRERELEASEIDENTIFIER')\nsrc[t.PRERELEASEIDENTIFIER] = '(?:' + src[t.NUMERICIDENTIFIER] +\n '|' + src[t.NONNUMERICIDENTIFIER] + ')'\n\ntok('PRERELEASEIDENTIFIERLOOSE')\nsrc[t.PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[t.NUMERICIDENTIFIERLOOSE] +\n '|' + src[t.NONNUMERICIDENTIFIER] + ')'\n\n// ## Pre-release Version\n// Hyphen, followed by one or more dot-separated pre-release version\n// identifiers.\n\ntok('PRERELEASE')\nsrc[t.PRERELEASE] = '(?:-(' + src[t.PRERELEASEIDENTIFIER] +\n '(?:\\\\.' + src[t.PRERELEASEIDENTIFIER] + ')*))'\n\ntok('PRERELEASELOOSE')\nsrc[t.PRERELEASELOOSE] = '(?:-?(' + src[t.PRERELEASEIDENTIFIERLOOSE] +\n '(?:\\\\.' + src[t.PRERELEASEIDENTIFIERLOOSE] + ')*))'\n\n// ## Build Metadata Identifier\n// Any combination of digits, letters, or hyphens.\n\ntok('BUILDIDENTIFIER')\nsrc[t.BUILDIDENTIFIER] = '[0-9A-Za-z-]+'\n\n// ## Build Metadata\n// Plus sign, followed by one or more period-separated build metadata\n// identifiers.\n\ntok('BUILD')\nsrc[t.BUILD] = '(?:\\\\+(' + src[t.BUILDIDENTIFIER] +\n '(?:\\\\.' + src[t.BUILDIDENTIFIER] + ')*))'\n\n// ## Full Version String\n// A main version, followed optionally by a pre-release version and\n// build metadata.\n\n// Note that the only major, minor, patch, and pre-release sections of\n// the version string are capturing groups. The build metadata is not a\n// capturing group, because it should not ever be used in version\n// comparison.\n\ntok('FULL')\ntok('FULLPLAIN')\nsrc[t.FULLPLAIN] = 'v?' + src[t.MAINVERSION] +\n src[t.PRERELEASE] + '?' +\n src[t.BUILD] + '?'\n\nsrc[t.FULL] = '^' + src[t.FULLPLAIN] + '$'\n\n// like full, but allows v1.2.3 and =1.2.3, which people do sometimes.\n// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty\n// common in the npm registry.\ntok('LOOSEPLAIN')\nsrc[t.LOOSEPLAIN] = '[v=\\\\s]*' + src[t.MAINVERSIONLOOSE] +\n src[t.PRERELEASELOOSE] + '?' +\n src[t.BUILD] + '?'\n\ntok('LOOSE')\nsrc[t.LOOSE] = '^' + src[t.LOOSEPLAIN] + '$'\n\ntok('GTLT')\nsrc[t.GTLT] = '((?:<|>)?=?)'\n\n// Something like \"2.*\" or \"1.2.x\".\n// Note that \"x.x\" is a valid xRange identifer, meaning \"any version\"\n// Only the first item is strictly required.\ntok('XRANGEIDENTIFIERLOOSE')\nsrc[t.XRANGEIDENTIFIERLOOSE] = src[t.NUMERICIDENTIFIERLOOSE] + '|x|X|\\\\*'\ntok('XRANGEIDENTIFIER')\nsrc[t.XRANGEIDENTIFIER] = src[t.NUMERICIDENTIFIER] + '|x|X|\\\\*'\n\ntok('XRANGEPLAIN')\nsrc[t.XRANGEPLAIN] = '[v=\\\\s]*(' + src[t.XRANGEIDENTIFIER] + ')' +\n '(?:\\\\.(' + src[t.XRANGEIDENTIFIER] + ')' +\n '(?:\\\\.(' + src[t.XRANGEIDENTIFIER] + ')' +\n '(?:' + src[t.PRERELEASE] + ')?' +\n src[t.BUILD] + '?' +\n ')?)?'\n\ntok('XRANGEPLAINLOOSE')\nsrc[t.XRANGEPLAINLOOSE] = '[v=\\\\s]*(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' +\n '(?:\\\\.(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' +\n '(?:\\\\.(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' +\n '(?:' + src[t.PRERELEASELOOSE] + ')?' +\n src[t.BUILD] + '?' +\n ')?)?'\n\ntok('XRANGE')\nsrc[t.XRANGE] = '^' + src[t.GTLT] + '\\\\s*' + src[t.XRANGEPLAIN] + '$'\ntok('XRANGELOOSE')\nsrc[t.XRANGELOOSE] = '^' + src[t.GTLT] + '\\\\s*' + src[t.XRANGEPLAINLOOSE] + '$'\n\n// Coercion.\n// Extract anything that could conceivably be a part of a valid semver\ntok('COERCE')\nsrc[t.COERCE] = '(^|[^\\\\d])' +\n '(\\\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '})' +\n '(?:\\\\.(\\\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' +\n '(?:\\\\.(\\\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' +\n '(?:$|[^\\\\d])'\ntok('COERCERTL')\nre[t.COERCERTL] = new RegExp(src[t.COERCE], 'g')\n\n// Tilde ranges.\n// Meaning is \"reasonably at or greater than\"\ntok('LONETILDE')\nsrc[t.LONETILDE] = '(?:~>?)'\n\ntok('TILDETRIM')\nsrc[t.TILDETRIM] = '(\\\\s*)' + src[t.LONETILDE] + '\\\\s+'\nre[t.TILDETRIM] = new RegExp(src[t.TILDETRIM], 'g')\nvar tildeTrimReplace = '$1~'\n\ntok('TILDE')\nsrc[t.TILDE] = '^' + src[t.LONETILDE] + src[t.XRANGEPLAIN] + '$'\ntok('TILDELOOSE')\nsrc[t.TILDELOOSE] = '^' + src[t.LONETILDE] + src[t.XRANGEPLAINLOOSE] + '$'\n\n// Caret ranges.\n// Meaning is \"at least and backwards compatible with\"\ntok('LONECARET')\nsrc[t.LONECARET] = '(?:\\\\^)'\n\ntok('CARETTRIM')\nsrc[t.CARETTRIM] = '(\\\\s*)' + src[t.LONECARET] + '\\\\s+'\nre[t.CARETTRIM] = new RegExp(src[t.CARETTRIM], 'g')\nvar caretTrimReplace = '$1^'\n\ntok('CARET')\nsrc[t.CARET] = '^' + src[t.LONECARET] + src[t.XRANGEPLAIN] + '$'\ntok('CARETLOOSE')\nsrc[t.CARETLOOSE] = '^' + src[t.LONECARET] + src[t.XRANGEPLAINLOOSE] + '$'\n\n// A simple gt/lt/eq thing, or just \"\" to indicate \"any version\"\ntok('COMPARATORLOOSE')\nsrc[t.COMPARATORLOOSE] = '^' + src[t.GTLT] + '\\\\s*(' + src[t.LOOSEPLAIN] + ')$|^$'\ntok('COMPARATOR')\nsrc[t.COMPARATOR] = '^' + src[t.GTLT] + '\\\\s*(' + src[t.FULLPLAIN] + ')$|^$'\n\n// An expression to strip any whitespace between the gtlt and the thing\n// it modifies, so that `> 1.2.3` ==> `>1.2.3`\ntok('COMPARATORTRIM')\nsrc[t.COMPARATORTRIM] = '(\\\\s*)' + src[t.GTLT] +\n '\\\\s*(' + src[t.LOOSEPLAIN] + '|' + src[t.XRANGEPLAIN] + ')'\n\n// this one has to use the /g flag\nre[t.COMPARATORTRIM] = new RegExp(src[t.COMPARATORTRIM], 'g')\nvar comparatorTrimReplace = '$1$2$3'\n\n// Something like `1.2.3 - 1.2.4`\n// Note that these all use the loose form, because they'll be\n// checked against either the strict or loose comparator form\n// later.\ntok('HYPHENRANGE')\nsrc[t.HYPHENRANGE] = '^\\\\s*(' + src[t.XRANGEPLAIN] + ')' +\n '\\\\s+-\\\\s+' +\n '(' + src[t.XRANGEPLAIN] + ')' +\n '\\\\s*$'\n\ntok('HYPHENRANGELOOSE')\nsrc[t.HYPHENRANGELOOSE] = '^\\\\s*(' + src[t.XRANGEPLAINLOOSE] + ')' +\n '\\\\s+-\\\\s+' +\n '(' + src[t.XRANGEPLAINLOOSE] + ')' +\n '\\\\s*$'\n\n// Star ranges basically just allow anything at all.\ntok('STAR')\nsrc[t.STAR] = '(<|>)?=?\\\\s*\\\\*'\n\n// Compile to actual regexp objects.\n// All are flag-free, unless they were created above with a flag.\nfor (var i = 0; i < R; i++) {\n debug(i, src[i])\n if (!re[i]) {\n re[i] = new RegExp(src[i])\n }\n}\n\nexports.parse = parse\nfunction parse (version, options) {\n if (!options || typeof options !== 'object') {\n options = {\n loose: !!options,\n includePrerelease: false\n }\n }\n\n if (version instanceof SemVer) {\n return version\n }\n\n if (typeof version !== 'string') {\n return null\n }\n\n if (version.length > MAX_LENGTH) {\n return null\n }\n\n var r = options.loose ? re[t.LOOSE] : re[t.FULL]\n if (!r.test(version)) {\n return null\n }\n\n try {\n return new SemVer(version, options)\n } catch (er) {\n return null\n }\n}\n\nexports.valid = valid\nfunction valid (version, options) {\n var v = parse(version, options)\n return v ? v.version : null\n}\n\nexports.clean = clean\nfunction clean (version, options) {\n var s = parse(version.trim().replace(/^[=v]+/, ''), options)\n return s ? s.version : null\n}\n\nexports.SemVer = SemVer\n\nfunction SemVer (version, options) {\n if (!options || typeof options !== 'object') {\n options = {\n loose: !!options,\n includePrerelease: false\n }\n }\n if (version instanceof SemVer) {\n if (version.loose === options.loose) {\n return version\n } else {\n version = version.version\n }\n } else if (typeof version !== 'string') {\n throw new TypeError('Invalid Version: ' + version)\n }\n\n if (version.length > MAX_LENGTH) {\n throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters')\n }\n\n if (!(this instanceof SemVer)) {\n return new SemVer(version, options)\n }\n\n debug('SemVer', version, options)\n this.options = options\n this.loose = !!options.loose\n\n var m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL])\n\n if (!m) {\n throw new TypeError('Invalid Version: ' + version)\n }\n\n this.raw = version\n\n // these are actually numbers\n this.major = +m[1]\n this.minor = +m[2]\n this.patch = +m[3]\n\n if (this.major > MAX_SAFE_INTEGER || this.major < 0) {\n throw new TypeError('Invalid major version')\n }\n\n if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {\n throw new TypeError('Invalid minor version')\n }\n\n if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {\n throw new TypeError('Invalid patch version')\n }\n\n // numberify any prerelease numeric ids\n if (!m[4]) {\n this.prerelease = []\n } else {\n this.prerelease = m[4].split('.').map(function (id) {\n if (/^[0-9]+$/.test(id)) {\n var num = +id\n if (num >= 0 && num < MAX_SAFE_INTEGER) {\n return num\n }\n }\n return id\n })\n }\n\n this.build = m[5] ? m[5].split('.') : []\n this.format()\n}\n\nSemVer.prototype.format = function () {\n this.version = this.major + '.' + this.minor + '.' + this.patch\n if (this.prerelease.length) {\n this.version += '-' + this.prerelease.join('.')\n }\n return this.version\n}\n\nSemVer.prototype.toString = function () {\n return this.version\n}\n\nSemVer.prototype.compare = function (other) {\n debug('SemVer.compare', this.version, this.options, other)\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n return this.compareMain(other) || this.comparePre(other)\n}\n\nSemVer.prototype.compareMain = function (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n return compareIdentifiers(this.major, other.major) ||\n compareIdentifiers(this.minor, other.minor) ||\n compareIdentifiers(this.patch, other.patch)\n}\n\nSemVer.prototype.comparePre = function (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n // NOT having a prerelease is > having one\n if (this.prerelease.length && !other.prerelease.length) {\n return -1\n } else if (!this.prerelease.length && other.prerelease.length) {\n return 1\n } else if (!this.prerelease.length && !other.prerelease.length) {\n return 0\n }\n\n var i = 0\n do {\n var a = this.prerelease[i]\n var b = other.prerelease[i]\n debug('prerelease compare', i, a, b)\n if (a === undefined && b === undefined) {\n return 0\n } else if (b === undefined) {\n return 1\n } else if (a === undefined) {\n return -1\n } else if (a === b) {\n continue\n } else {\n return compareIdentifiers(a, b)\n }\n } while (++i)\n}\n\nSemVer.prototype.compareBuild = function (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n var i = 0\n do {\n var a = this.build[i]\n var b = other.build[i]\n debug('prerelease compare', i, a, b)\n if (a === undefined && b === undefined) {\n return 0\n } else if (b === undefined) {\n return 1\n } else if (a === undefined) {\n return -1\n } else if (a === b) {\n continue\n } else {\n return compareIdentifiers(a, b)\n }\n } while (++i)\n}\n\n// preminor will bump the version up to the next minor release, and immediately\n// down to pre-release. premajor and prepatch work the same way.\nSemVer.prototype.inc = function (release, identifier) {\n switch (release) {\n case 'premajor':\n this.prerelease.length = 0\n this.patch = 0\n this.minor = 0\n this.major++\n this.inc('pre', identifier)\n break\n case 'preminor':\n this.prerelease.length = 0\n this.patch = 0\n this.minor++\n this.inc('pre', identifier)\n break\n case 'prepatch':\n // If this is already a prerelease, it will bump to the next version\n // drop any prereleases that might already exist, since they are not\n // relevant at this point.\n this.prerelease.length = 0\n this.inc('patch', identifier)\n this.inc('pre', identifier)\n break\n // If the input is a non-prerelease version, this acts the same as\n // prepatch.\n case 'prerelease':\n if (this.prerelease.length === 0) {\n this.inc('patch', identifier)\n }\n this.inc('pre', identifier)\n break\n\n case 'major':\n // If this is a pre-major version, bump up to the same major version.\n // Otherwise increment major.\n // 1.0.0-5 bumps to 1.0.0\n // 1.1.0 bumps to 2.0.0\n if (this.minor !== 0 ||\n this.patch !== 0 ||\n this.prerelease.length === 0) {\n this.major++\n }\n this.minor = 0\n this.patch = 0\n this.prerelease = []\n break\n case 'minor':\n // If this is a pre-minor version, bump up to the same minor version.\n // Otherwise increment minor.\n // 1.2.0-5 bumps to 1.2.0\n // 1.2.1 bumps to 1.3.0\n if (this.patch !== 0 || this.prerelease.length === 0) {\n this.minor++\n }\n this.patch = 0\n this.prerelease = []\n break\n case 'patch':\n // If this is not a pre-release version, it will increment the patch.\n // If it is a pre-release it will bump up to the same patch version.\n // 1.2.0-5 patches to 1.2.0\n // 1.2.0 patches to 1.2.1\n if (this.prerelease.length === 0) {\n this.patch++\n }\n this.prerelease = []\n break\n // This probably shouldn't be used publicly.\n // 1.0.0 \"pre\" would become 1.0.0-0 which is the wrong direction.\n case 'pre':\n if (this.prerelease.length === 0) {\n this.prerelease = [0]\n } else {\n var i = this.prerelease.length\n while (--i >= 0) {\n if (typeof this.prerelease[i] === 'number') {\n this.prerelease[i]++\n i = -2\n }\n }\n if (i === -1) {\n // didn't increment anything\n this.prerelease.push(0)\n }\n }\n if (identifier) {\n // 1.2.0-beta.1 bumps to 1.2.0-beta.2,\n // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0\n if (this.prerelease[0] === identifier) {\n if (isNaN(this.prerelease[1])) {\n this.prerelease = [identifier, 0]\n }\n } else {\n this.prerelease = [identifier, 0]\n }\n }\n break\n\n default:\n throw new Error('invalid increment argument: ' + release)\n }\n this.format()\n this.raw = this.version\n return this\n}\n\nexports.inc = inc\nfunction inc (version, release, loose, identifier) {\n if (typeof (loose) === 'string') {\n identifier = loose\n loose = undefined\n }\n\n try {\n return new SemVer(version, loose).inc(release, identifier).version\n } catch (er) {\n return null\n }\n}\n\nexports.diff = diff\nfunction diff (version1, version2) {\n if (eq(version1, version2)) {\n return null\n } else {\n var v1 = parse(version1)\n var v2 = parse(version2)\n var prefix = ''\n if (v1.prerelease.length || v2.prerelease.length) {\n prefix = 'pre'\n var defaultResult = 'prerelease'\n }\n for (var key in v1) {\n if (key === 'major' || key === 'minor' || key === 'patch') {\n if (v1[key] !== v2[key]) {\n return prefix + key\n }\n }\n }\n return defaultResult // may be undefined\n }\n}\n\nexports.compareIdentifiers = compareIdentifiers\n\nvar numeric = /^[0-9]+$/\nfunction compareIdentifiers (a, b) {\n var anum = numeric.test(a)\n var bnum = numeric.test(b)\n\n if (anum && bnum) {\n a = +a\n b = +b\n }\n\n return a === b ? 0\n : (anum && !bnum) ? -1\n : (bnum && !anum) ? 1\n : a < b ? -1\n : 1\n}\n\nexports.rcompareIdentifiers = rcompareIdentifiers\nfunction rcompareIdentifiers (a, b) {\n return compareIdentifiers(b, a)\n}\n\nexports.major = major\nfunction major (a, loose) {\n return new SemVer(a, loose).major\n}\n\nexports.minor = minor\nfunction minor (a, loose) {\n return new SemVer(a, loose).minor\n}\n\nexports.patch = patch\nfunction patch (a, loose) {\n return new SemVer(a, loose).patch\n}\n\nexports.compare = compare\nfunction compare (a, b, loose) {\n return new SemVer(a, loose).compare(new SemVer(b, loose))\n}\n\nexports.compareLoose = compareLoose\nfunction compareLoose (a, b) {\n return compare(a, b, true)\n}\n\nexports.compareBuild = compareBuild\nfunction compareBuild (a, b, loose) {\n var versionA = new SemVer(a, loose)\n var versionB = new SemVer(b, loose)\n return versionA.compare(versionB) || versionA.compareBuild(versionB)\n}\n\nexports.rcompare = rcompare\nfunction rcompare (a, b, loose) {\n return compare(b, a, loose)\n}\n\nexports.sort = sort\nfunction sort (list, loose) {\n return list.sort(function (a, b) {\n return exports.compareBuild(a, b, loose)\n })\n}\n\nexports.rsort = rsort\nfunction rsort (list, loose) {\n return list.sort(function (a, b) {\n return exports.compareBuild(b, a, loose)\n })\n}\n\nexports.gt = gt\nfunction gt (a, b, loose) {\n return compare(a, b, loose) > 0\n}\n\nexports.lt = lt\nfunction lt (a, b, loose) {\n return compare(a, b, loose) < 0\n}\n\nexports.eq = eq\nfunction eq (a, b, loose) {\n return compare(a, b, loose) === 0\n}\n\nexports.neq = neq\nfunction neq (a, b, loose) {\n return compare(a, b, loose) !== 0\n}\n\nexports.gte = gte\nfunction gte (a, b, loose) {\n return compare(a, b, loose) >= 0\n}\n\nexports.lte = lte\nfunction lte (a, b, loose) {\n return compare(a, b, loose) <= 0\n}\n\nexports.cmp = cmp\nfunction cmp (a, op, b, loose) {\n switch (op) {\n case '===':\n if (typeof a === 'object')\n a = a.version\n if (typeof b === 'object')\n b = b.version\n return a === b\n\n case '!==':\n if (typeof a === 'object')\n a = a.version\n if (typeof b === 'object')\n b = b.version\n return a !== b\n\n case '':\n case '=':\n case '==':\n return eq(a, b, loose)\n\n case '!=':\n return neq(a, b, loose)\n\n case '>':\n return gt(a, b, loose)\n\n case '>=':\n return gte(a, b, loose)\n\n case '<':\n return lt(a, b, loose)\n\n case '<=':\n return lte(a, b, loose)\n\n default:\n throw new TypeError('Invalid operator: ' + op)\n }\n}\n\nexports.Comparator = Comparator\nfunction Comparator (comp, options) {\n if (!options || typeof options !== 'object') {\n options = {\n loose: !!options,\n includePrerelease: false\n }\n }\n\n if (comp instanceof Comparator) {\n if (comp.loose === !!options.loose) {\n return comp\n } else {\n comp = comp.value\n }\n }\n\n if (!(this instanceof Comparator)) {\n return new Comparator(comp, options)\n }\n\n debug('comparator', comp, options)\n this.options = options\n this.loose = !!options.loose\n this.parse(comp)\n\n if (this.semver === ANY) {\n this.value = ''\n } else {\n this.value = this.operator + this.semver.version\n }\n\n debug('comp', this)\n}\n\nvar ANY = {}\nComparator.prototype.parse = function (comp) {\n var r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]\n var m = comp.match(r)\n\n if (!m) {\n throw new TypeError('Invalid comparator: ' + comp)\n }\n\n this.operator = m[1] !== undefined ? m[1] : ''\n if (this.operator === '=') {\n this.operator = ''\n }\n\n // if it literally is just '>' or '' then allow anything.\n if (!m[2]) {\n this.semver = ANY\n } else {\n this.semver = new SemVer(m[2], this.options.loose)\n }\n}\n\nComparator.prototype.toString = function () {\n return this.value\n}\n\nComparator.prototype.test = function (version) {\n debug('Comparator.test', version, this.options.loose)\n\n if (this.semver === ANY || version === ANY) {\n return true\n }\n\n if (typeof version === 'string') {\n try {\n version = new SemVer(version, this.options)\n } catch (er) {\n return false\n }\n }\n\n return cmp(version, this.operator, this.semver, this.options)\n}\n\nComparator.prototype.intersects = function (comp, options) {\n if (!(comp instanceof Comparator)) {\n throw new TypeError('a Comparator is required')\n }\n\n if (!options || typeof options !== 'object') {\n options = {\n loose: !!options,\n includePrerelease: false\n }\n }\n\n var rangeTmp\n\n if (this.operator === '') {\n if (this.value === '') {\n return true\n }\n rangeTmp = new Range(comp.value, options)\n return satisfies(this.value, rangeTmp, options)\n } else if (comp.operator === '') {\n if (comp.value === '') {\n return true\n }\n rangeTmp = new Range(this.value, options)\n return satisfies(comp.semver, rangeTmp, options)\n }\n\n var sameDirectionIncreasing =\n (this.operator === '>=' || this.operator === '>') &&\n (comp.operator === '>=' || comp.operator === '>')\n var sameDirectionDecreasing =\n (this.operator === '<=' || this.operator === '<') &&\n (comp.operator === '<=' || comp.operator === '<')\n var sameSemVer = this.semver.version === comp.semver.version\n var differentDirectionsInclusive =\n (this.operator === '>=' || this.operator === '<=') &&\n (comp.operator === '>=' || comp.operator === '<=')\n var oppositeDirectionsLessThan =\n cmp(this.semver, '<', comp.semver, options) &&\n ((this.operator === '>=' || this.operator === '>') &&\n (comp.operator === '<=' || comp.operator === '<'))\n var oppositeDirectionsGreaterThan =\n cmp(this.semver, '>', comp.semver, options) &&\n ((this.operator === '<=' || this.operator === '<') &&\n (comp.operator === '>=' || comp.operator === '>'))\n\n return sameDirectionIncreasing || sameDirectionDecreasing ||\n (sameSemVer && differentDirectionsInclusive) ||\n oppositeDirectionsLessThan || oppositeDirectionsGreaterThan\n}\n\nexports.Range = Range\nfunction Range (range, options) {\n if (!options || typeof options !== 'object') {\n options = {\n loose: !!options,\n includePrerelease: false\n }\n }\n\n if (range instanceof Range) {\n if (range.loose === !!options.loose &&\n range.includePrerelease === !!options.includePrerelease) {\n return range\n } else {\n return new Range(range.raw, options)\n }\n }\n\n if (range instanceof Comparator) {\n return new Range(range.value, options)\n }\n\n if (!(this instanceof Range)) {\n return new Range(range, options)\n }\n\n this.options = options\n this.loose = !!options.loose\n this.includePrerelease = !!options.includePrerelease\n\n // First, split based on boolean or ||\n this.raw = range\n this.set = range.split(/\\s*\\|\\|\\s*/).map(function (range) {\n return this.parseRange(range.trim())\n }, this).filter(function (c) {\n // throw out any that are not relevant for whatever reason\n return c.length\n })\n\n if (!this.set.length) {\n throw new TypeError('Invalid SemVer Range: ' + range)\n }\n\n this.format()\n}\n\nRange.prototype.format = function () {\n this.range = this.set.map(function (comps) {\n return comps.join(' ').trim()\n }).join('||').trim()\n return this.range\n}\n\nRange.prototype.toString = function () {\n return this.range\n}\n\nRange.prototype.parseRange = function (range) {\n var loose = this.options.loose\n range = range.trim()\n // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`\n var hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE]\n range = range.replace(hr, hyphenReplace)\n debug('hyphen replace', range)\n // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`\n range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace)\n debug('comparator trim', range, re[t.COMPARATORTRIM])\n\n // `~ 1.2.3` => `~1.2.3`\n range = range.replace(re[t.TILDETRIM], tildeTrimReplace)\n\n // `^ 1.2.3` => `^1.2.3`\n range = range.replace(re[t.CARETTRIM], caretTrimReplace)\n\n // normalize spaces\n range = range.split(/\\s+/).join(' ')\n\n // At this point, the range is completely trimmed and\n // ready to be split into comparators.\n\n var compRe = loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]\n var set = range.split(' ').map(function (comp) {\n return parseComparator(comp, this.options)\n }, this).join(' ').split(/\\s+/)\n if (this.options.loose) {\n // in loose mode, throw out any that are not valid comparators\n set = set.filter(function (comp) {\n return !!comp.match(compRe)\n })\n }\n set = set.map(function (comp) {\n return new Comparator(comp, this.options)\n }, this)\n\n return set\n}\n\nRange.prototype.intersects = function (range, options) {\n if (!(range instanceof Range)) {\n throw new TypeError('a Range is required')\n }\n\n return this.set.some(function (thisComparators) {\n return (\n isSatisfiable(thisComparators, options) &&\n range.set.some(function (rangeComparators) {\n return (\n isSatisfiable(rangeComparators, options) &&\n thisComparators.every(function (thisComparator) {\n return rangeComparators.every(function (rangeComparator) {\n return thisComparator.intersects(rangeComparator, options)\n })\n })\n )\n })\n )\n })\n}\n\n// take a set of comparators and determine whether there\n// exists a version which can satisfy it\nfunction isSatisfiable (comparators, options) {\n var result = true\n var remainingComparators = comparators.slice()\n var testComparator = remainingComparators.pop()\n\n while (result && remainingComparators.length) {\n result = remainingComparators.every(function (otherComparator) {\n return testComparator.intersects(otherComparator, options)\n })\n\n testComparator = remainingComparators.pop()\n }\n\n return result\n}\n\n// Mostly just for testing and legacy API reasons\nexports.toComparators = toComparators\nfunction toComparators (range, options) {\n return new Range(range, options).set.map(function (comp) {\n return comp.map(function (c) {\n return c.value\n }).join(' ').trim().split(' ')\n })\n}\n\n// comprised of xranges, tildes, stars, and gtlt's at this point.\n// already replaced the hyphen ranges\n// turn into a set of JUST comparators.\nfunction parseComparator (comp, options) {\n debug('comp', comp, options)\n comp = replaceCarets(comp, options)\n debug('caret', comp)\n comp = replaceTildes(comp, options)\n debug('tildes', comp)\n comp = replaceXRanges(comp, options)\n debug('xrange', comp)\n comp = replaceStars(comp, options)\n debug('stars', comp)\n return comp\n}\n\nfunction isX (id) {\n return !id || id.toLowerCase() === 'x' || id === '*'\n}\n\n// ~, ~> --> * (any, kinda silly)\n// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0\n// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0\n// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0\n// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0\n// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0\nfunction replaceTildes (comp, options) {\n return comp.trim().split(/\\s+/).map(function (comp) {\n return replaceTilde(comp, options)\n }).join(' ')\n}\n\nfunction replaceTilde (comp, options) {\n var r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE]\n return comp.replace(r, function (_, M, m, p, pr) {\n debug('tilde', comp, _, M, m, p, pr)\n var ret\n\n if (isX(M)) {\n ret = ''\n } else if (isX(m)) {\n ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'\n } else if (isX(p)) {\n // ~1.2 == >=1.2.0 <1.3.0\n ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'\n } else if (pr) {\n debug('replaceTilde pr', pr)\n ret = '>=' + M + '.' + m + '.' + p + '-' + pr +\n ' <' + M + '.' + (+m + 1) + '.0'\n } else {\n // ~1.2.3 == >=1.2.3 <1.3.0\n ret = '>=' + M + '.' + m + '.' + p +\n ' <' + M + '.' + (+m + 1) + '.0'\n }\n\n debug('tilde return', ret)\n return ret\n })\n}\n\n// ^ --> * (any, kinda silly)\n// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0\n// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0\n// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0\n// ^1.2.3 --> >=1.2.3 <2.0.0\n// ^1.2.0 --> >=1.2.0 <2.0.0\nfunction replaceCarets (comp, options) {\n return comp.trim().split(/\\s+/).map(function (comp) {\n return replaceCaret(comp, options)\n }).join(' ')\n}\n\nfunction replaceCaret (comp, options) {\n debug('caret', comp, options)\n var r = options.loose ? re[t.CARETLOOSE] : re[t.CARET]\n return comp.replace(r, function (_, M, m, p, pr) {\n debug('caret', comp, _, M, m, p, pr)\n var ret\n\n if (isX(M)) {\n ret = ''\n } else if (isX(m)) {\n ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'\n } else if (isX(p)) {\n if (M === '0') {\n ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'\n } else {\n ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0'\n }\n } else if (pr) {\n debug('replaceCaret pr', pr)\n if (M === '0') {\n if (m === '0') {\n ret = '>=' + M + '.' + m + '.' + p + '-' + pr +\n ' <' + M + '.' + m + '.' + (+p + 1)\n } else {\n ret = '>=' + M + '.' + m + '.' + p + '-' + pr +\n ' <' + M + '.' + (+m + 1) + '.0'\n }\n } else {\n ret = '>=' + M + '.' + m + '.' + p + '-' + pr +\n ' <' + (+M + 1) + '.0.0'\n }\n } else {\n debug('no pr')\n if (M === '0') {\n if (m === '0') {\n ret = '>=' + M + '.' + m + '.' + p +\n ' <' + M + '.' + m + '.' + (+p + 1)\n } else {\n ret = '>=' + M + '.' + m + '.' + p +\n ' <' + M + '.' + (+m + 1) + '.0'\n }\n } else {\n ret = '>=' + M + '.' + m + '.' + p +\n ' <' + (+M + 1) + '.0.0'\n }\n }\n\n debug('caret return', ret)\n return ret\n })\n}\n\nfunction replaceXRanges (comp, options) {\n debug('replaceXRanges', comp, options)\n return comp.split(/\\s+/).map(function (comp) {\n return replaceXRange(comp, options)\n }).join(' ')\n}\n\nfunction replaceXRange (comp, options) {\n comp = comp.trim()\n var r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE]\n return comp.replace(r, function (ret, gtlt, M, m, p, pr) {\n debug('xRange', comp, ret, gtlt, M, m, p, pr)\n var xM = isX(M)\n var xm = xM || isX(m)\n var xp = xm || isX(p)\n var anyX = xp\n\n if (gtlt === '=' && anyX) {\n gtlt = ''\n }\n\n // if we're including prereleases in the match, then we need\n // to fix this to -0, the lowest possible prerelease value\n pr = options.includePrerelease ? '-0' : ''\n\n if (xM) {\n if (gtlt === '>' || gtlt === '<') {\n // nothing is allowed\n ret = '<0.0.0-0'\n } else {\n // nothing is forbidden\n ret = '*'\n }\n } else if (gtlt && anyX) {\n // we know patch is an x, because we have any x at all.\n // replace X with 0\n if (xm) {\n m = 0\n }\n p = 0\n\n if (gtlt === '>') {\n // >1 => >=2.0.0\n // >1.2 => >=1.3.0\n // >1.2.3 => >= 1.2.4\n gtlt = '>='\n if (xm) {\n M = +M + 1\n m = 0\n p = 0\n } else {\n m = +m + 1\n p = 0\n }\n } else if (gtlt === '<=') {\n // <=0.7.x is actually <0.8.0, since any 0.7.x should\n // pass. Similarly, <=7.x is actually <8.0.0, etc.\n gtlt = '<'\n if (xm) {\n M = +M + 1\n } else {\n m = +m + 1\n }\n }\n\n ret = gtlt + M + '.' + m + '.' + p + pr\n } else if (xm) {\n ret = '>=' + M + '.0.0' + pr + ' <' + (+M + 1) + '.0.0' + pr\n } else if (xp) {\n ret = '>=' + M + '.' + m + '.0' + pr +\n ' <' + M + '.' + (+m + 1) + '.0' + pr\n }\n\n debug('xRange return', ret)\n\n return ret\n })\n}\n\n// Because * is AND-ed with everything else in the comparator,\n// and '' means \"any version\", just remove the *s entirely.\nfunction replaceStars (comp, options) {\n debug('replaceStars', comp, options)\n // Looseness is ignored here. star is always as loose as it gets!\n return comp.trim().replace(re[t.STAR], '')\n}\n\n// This function is passed to string.replace(re[t.HYPHENRANGE])\n// M, m, patch, prerelease, build\n// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5\n// 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do\n// 1.2 - 3.4 => >=1.2.0 <3.5.0\nfunction hyphenReplace ($0,\n from, fM, fm, fp, fpr, fb,\n to, tM, tm, tp, tpr, tb) {\n if (isX(fM)) {\n from = ''\n } else if (isX(fm)) {\n from = '>=' + fM + '.0.0'\n } else if (isX(fp)) {\n from = '>=' + fM + '.' + fm + '.0'\n } else {\n from = '>=' + from\n }\n\n if (isX(tM)) {\n to = ''\n } else if (isX(tm)) {\n to = '<' + (+tM + 1) + '.0.0'\n } else if (isX(tp)) {\n to = '<' + tM + '.' + (+tm + 1) + '.0'\n } else if (tpr) {\n to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr\n } else {\n to = '<=' + to\n }\n\n return (from + ' ' + to).trim()\n}\n\n// if ANY of the sets match ALL of its comparators, then pass\nRange.prototype.test = function (version) {\n if (!version) {\n return false\n }\n\n if (typeof version === 'string') {\n try {\n version = new SemVer(version, this.options)\n } catch (er) {\n return false\n }\n }\n\n for (var i = 0; i < this.set.length; i++) {\n if (testSet(this.set[i], version, this.options)) {\n return true\n }\n }\n return false\n}\n\nfunction testSet (set, version, options) {\n for (var i = 0; i < set.length; i++) {\n if (!set[i].test(version)) {\n return false\n }\n }\n\n if (version.prerelease.length && !options.includePrerelease) {\n // Find the set of versions that are allowed to have prereleases\n // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0\n // That should allow `1.2.3-pr.2` to pass.\n // However, `1.2.4-alpha.notready` should NOT be allowed,\n // even though it's within the range set by the comparators.\n for (i = 0; i < set.length; i++) {\n debug(set[i].semver)\n if (set[i].semver === ANY) {\n continue\n }\n\n if (set[i].semver.prerelease.length > 0) {\n var allowed = set[i].semver\n if (allowed.major === version.major &&\n allowed.minor === version.minor &&\n allowed.patch === version.patch) {\n return true\n }\n }\n }\n\n // Version has a -pre, but it's not one of the ones we like.\n return false\n }\n\n return true\n}\n\nexports.satisfies = satisfies\nfunction satisfies (version, range, options) {\n try {\n range = new Range(range, options)\n } catch (er) {\n return false\n }\n return range.test(version)\n}\n\nexports.maxSatisfying = maxSatisfying\nfunction maxSatisfying (versions, range, options) {\n var max = null\n var maxSV = null\n try {\n var rangeObj = new Range(range, options)\n } catch (er) {\n return null\n }\n versions.forEach(function (v) {\n if (rangeObj.test(v)) {\n // satisfies(v, range, options)\n if (!max || maxSV.compare(v) === -1) {\n // compare(max, v, true)\n max = v\n maxSV = new SemVer(max, options)\n }\n }\n })\n return max\n}\n\nexports.minSatisfying = minSatisfying\nfunction minSatisfying (versions, range, options) {\n var min = null\n var minSV = null\n try {\n var rangeObj = new Range(range, options)\n } catch (er) {\n return null\n }\n versions.forEach(function (v) {\n if (rangeObj.test(v)) {\n // satisfies(v, range, options)\n if (!min || minSV.compare(v) === 1) {\n // compare(min, v, true)\n min = v\n minSV = new SemVer(min, options)\n }\n }\n })\n return min\n}\n\nexports.minVersion = minVersion\nfunction minVersion (range, loose) {\n range = new Range(range, loose)\n\n var minver = new SemVer('0.0.0')\n if (range.test(minver)) {\n return minver\n }\n\n minver = new SemVer('0.0.0-0')\n if (range.test(minver)) {\n return minver\n }\n\n minver = null\n for (var i = 0; i < range.set.length; ++i) {\n var comparators = range.set[i]\n\n comparators.forEach(function (comparator) {\n // Clone to avoid manipulating the comparator's semver object.\n var compver = new SemVer(comparator.semver.version)\n switch (comparator.operator) {\n case '>':\n if (compver.prerelease.length === 0) {\n compver.patch++\n } else {\n compver.prerelease.push(0)\n }\n compver.raw = compver.format()\n /* fallthrough */\n case '':\n case '>=':\n if (!minver || gt(minver, compver)) {\n minver = compver\n }\n break\n case '<':\n case '<=':\n /* Ignore maximum versions */\n break\n /* istanbul ignore next */\n default:\n throw new Error('Unexpected operation: ' + comparator.operator)\n }\n })\n }\n\n if (minver && range.test(minver)) {\n return minver\n }\n\n return null\n}\n\nexports.validRange = validRange\nfunction validRange (range, options) {\n try {\n // Return '*' instead of '' so that truthiness works.\n // This will throw if it's invalid anyway\n return new Range(range, options).range || '*'\n } catch (er) {\n return null\n }\n}\n\n// Determine if version is less than all the versions possible in the range\nexports.ltr = ltr\nfunction ltr (version, range, options) {\n return outside(version, range, '<', options)\n}\n\n// Determine if version is greater than all the versions possible in the range.\nexports.gtr = gtr\nfunction gtr (version, range, options) {\n return outside(version, range, '>', options)\n}\n\nexports.outside = outside\nfunction outside (version, range, hilo, options) {\n version = new SemVer(version, options)\n range = new Range(range, options)\n\n var gtfn, ltefn, ltfn, comp, ecomp\n switch (hilo) {\n case '>':\n gtfn = gt\n ltefn = lte\n ltfn = lt\n comp = '>'\n ecomp = '>='\n break\n case '<':\n gtfn = lt\n ltefn = gte\n ltfn = gt\n comp = '<'\n ecomp = '<='\n break\n default:\n throw new TypeError('Must provide a hilo val of \"<\" or \">\"')\n }\n\n // If it satisifes the range it is not outside\n if (satisfies(version, range, options)) {\n return false\n }\n\n // From now on, variable terms are as if we're in \"gtr\" mode.\n // but note that everything is flipped for the \"ltr\" function.\n\n for (var i = 0; i < range.set.length; ++i) {\n var comparators = range.set[i]\n\n var high = null\n var low = null\n\n comparators.forEach(function (comparator) {\n if (comparator.semver === ANY) {\n comparator = new Comparator('>=0.0.0')\n }\n high = high || comparator\n low = low || comparator\n if (gtfn(comparator.semver, high.semver, options)) {\n high = comparator\n } else if (ltfn(comparator.semver, low.semver, options)) {\n low = comparator\n }\n })\n\n // If the edge version comparator has a operator then our version\n // isn't outside it\n if (high.operator === comp || high.operator === ecomp) {\n return false\n }\n\n // If the lowest version comparator has an operator and our version\n // is less than it then it isn't higher than the range\n if ((!low.operator || low.operator === comp) &&\n ltefn(version, low.semver)) {\n return false\n } else if (low.operator === ecomp && ltfn(version, low.semver)) {\n return false\n }\n }\n return true\n}\n\nexports.prerelease = prerelease\nfunction prerelease (version, options) {\n var parsed = parse(version, options)\n return (parsed && parsed.prerelease.length) ? parsed.prerelease : null\n}\n\nexports.intersects = intersects\nfunction intersects (r1, r2, options) {\n r1 = new Range(r1, options)\n r2 = new Range(r2, options)\n return r1.intersects(r2)\n}\n\nexports.coerce = coerce\nfunction coerce (version, options) {\n if (version instanceof SemVer) {\n return version\n }\n\n if (typeof version === 'number') {\n version = String(version)\n }\n\n if (typeof version !== 'string') {\n return null\n }\n\n options = options || {}\n\n var match = null\n if (!options.rtl) {\n match = version.match(re[t.COERCE])\n } else {\n // Find the right-most coercible string that does not share\n // a terminus with a more left-ward coercible string.\n // Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4'\n //\n // Walk through the string checking with a /g regexp\n // Manually set the index so as to pick up overlapping matches.\n // Stop when we get a match that ends at the string end, since no\n // coercible string can be more right-ward without the same terminus.\n var next\n while ((next = re[t.COERCERTL].exec(version)) &&\n (!match || match.index + match[0].length !== version.length)\n ) {\n if (!match ||\n next.index + next[0].length !== match.index + match[0].length) {\n match = next\n }\n re[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length\n }\n // leave it in a clean state\n re[t.COERCERTL].lastIndex = -1\n }\n\n if (match === null) {\n return null\n }\n\n return parse(match[2] +\n '.' + (match[3] || '0') +\n '.' + (match[4] || '0'), options)\n}\n","/**\n * lodash (Custom Build) <https://lodash.com/>\n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors <https://jquery.org/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the `TypeError` message for \"Functions\" methods. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/** Used to match leading and trailing whitespace. */\nvar reTrim = /^\\s+|\\s+$/g;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n result = wait - timeSinceLastCall;\n\n return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\n/**\n * Creates a throttled function that only invokes `func` at most once per\n * every `wait` milliseconds. The throttled function comes with a `cancel`\n * method to cancel delayed `func` invocations and a `flush` method to\n * immediately invoke them. Provide `options` to indicate whether `func`\n * should be invoked on the leading and/or trailing edge of the `wait`\n * timeout. The `func` is invoked with the last arguments provided to the\n * throttled function. Subsequent calls to the throttled function return the\n * result of the last `func` invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the throttled function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.throttle` and `_.debounce`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to throttle.\n * @param {number} [wait=0] The number of milliseconds to throttle invocations to.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=true]\n * Specify invoking on the leading edge of the timeout.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new throttled function.\n * @example\n *\n * // Avoid excessively updating the position while scrolling.\n * jQuery(window).on('scroll', _.throttle(updatePosition, 100));\n *\n * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.\n * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });\n * jQuery(element).on('click', throttled);\n *\n * // Cancel the trailing throttled invocation.\n * jQuery(window).on('popstate', throttled.cancel);\n */\nfunction throttle(func, wait, options) {\n var leading = true,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n if (isObject(options)) {\n leading = 'leading' in options ? !!options.leading : leading;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n return debounce(func, wait, {\n 'leading': leading,\n 'maxWait': wait,\n 'trailing': trailing\n });\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return !!value && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && objectToString.call(value) == symbolTag);\n}\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = value.replace(reTrim, '');\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = throttle;\n","var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n","'use strict'\n\n// A linked list to keep track of recently-used-ness\nconst Yallist = require('yallist')\n\nconst MAX = Symbol('max')\nconst LENGTH = Symbol('length')\nconst LENGTH_CALCULATOR = Symbol('lengthCalculator')\nconst ALLOW_STALE = Symbol('allowStale')\nconst MAX_AGE = Symbol('maxAge')\nconst DISPOSE = Symbol('dispose')\nconst NO_DISPOSE_ON_SET = Symbol('noDisposeOnSet')\nconst LRU_LIST = Symbol('lruList')\nconst CACHE = Symbol('cache')\nconst UPDATE_AGE_ON_GET = Symbol('updateAgeOnGet')\n\nconst naiveLength = () => 1\n\n// lruList is a yallist where the head is the youngest\n// item, and the tail is the oldest. the list contains the Hit\n// objects as the entries.\n// Each Hit object has a reference to its Yallist.Node. This\n// never changes.\n//\n// cache is a Map (or PseudoMap) that matches the keys to\n// the Yallist.Node object.\nclass LRUCache {\n constructor (options) {\n if (typeof options === 'number')\n options = { max: options }\n\n if (!options)\n options = {}\n\n if (options.max && (typeof options.max !== 'number' || options.max < 0))\n throw new TypeError('max must be a non-negative number')\n // Kind of weird to have a default max of Infinity, but oh well.\n const max = this[MAX] = options.max || Infinity\n\n const lc = options.length || naiveLength\n this[LENGTH_CALCULATOR] = (typeof lc !== 'function') ? naiveLength : lc\n this[ALLOW_STALE] = options.stale || false\n if (options.maxAge && typeof options.maxAge !== 'number')\n throw new TypeError('maxAge must be a number')\n this[MAX_AGE] = options.maxAge || 0\n this[DISPOSE] = options.dispose\n this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false\n this[UPDATE_AGE_ON_GET] = options.updateAgeOnGet || false\n this.reset()\n }\n\n // resize the cache when the max changes.\n set max (mL) {\n if (typeof mL !== 'number' || mL < 0)\n throw new TypeError('max must be a non-negative number')\n\n this[MAX] = mL || Infinity\n trim(this)\n }\n get max () {\n return this[MAX]\n }\n\n set allowStale (allowStale) {\n this[ALLOW_STALE] = !!allowStale\n }\n get allowStale () {\n return this[ALLOW_STALE]\n }\n\n set maxAge (mA) {\n if (typeof mA !== 'number')\n throw new TypeError('maxAge must be a non-negative number')\n\n this[MAX_AGE] = mA\n trim(this)\n }\n get maxAge () {\n return this[MAX_AGE]\n }\n\n // resize the cache when the lengthCalculator changes.\n set lengthCalculator (lC) {\n if (typeof lC !== 'function')\n lC = naiveLength\n\n if (lC !== this[LENGTH_CALCULATOR]) {\n this[LENGTH_CALCULATOR] = lC\n this[LENGTH] = 0\n this[LRU_LIST].forEach(hit => {\n hit.length = this[LENGTH_CALCULATOR](hit.value, hit.key)\n this[LENGTH] += hit.length\n })\n }\n trim(this)\n }\n get lengthCalculator () { return this[LENGTH_CALCULATOR] }\n\n get length () { return this[LENGTH] }\n get itemCount () { return this[LRU_LIST].length }\n\n rforEach (fn, thisp) {\n thisp = thisp || this\n for (let walker = this[LRU_LIST].tail; walker !== null;) {\n const prev = walker.prev\n forEachStep(this, fn, walker, thisp)\n walker = prev\n }\n }\n\n forEach (fn, thisp) {\n thisp = thisp || this\n for (let walker = this[LRU_LIST].head; walker !== null;) {\n const next = walker.next\n forEachStep(this, fn, walker, thisp)\n walker = next\n }\n }\n\n keys () {\n return this[LRU_LIST].toArray().map(k => k.key)\n }\n\n values () {\n return this[LRU_LIST].toArray().map(k => k.value)\n }\n\n reset () {\n if (this[DISPOSE] &&\n this[LRU_LIST] &&\n this[LRU_LIST].length) {\n this[LRU_LIST].forEach(hit => this[DISPOSE](hit.key, hit.value))\n }\n\n this[CACHE] = new Map() // hash of items by key\n this[LRU_LIST] = new Yallist() // list of items in order of use recency\n this[LENGTH] = 0 // length of items in the list\n }\n\n dump () {\n return this[LRU_LIST].map(hit =>\n isStale(this, hit) ? false : {\n k: hit.key,\n v: hit.value,\n e: hit.now + (hit.maxAge || 0)\n }).toArray().filter(h => h)\n }\n\n dumpLru () {\n return this[LRU_LIST]\n }\n\n set (key, value, maxAge) {\n maxAge = maxAge || this[MAX_AGE]\n\n if (maxAge && typeof maxAge !== 'number')\n throw new TypeError('maxAge must be a number')\n\n const now = maxAge ? Date.now() : 0\n const len = this[LENGTH_CALCULATOR](value, key)\n\n if (this[CACHE].has(key)) {\n if (len > this[MAX]) {\n del(this, this[CACHE].get(key))\n return false\n }\n\n const node = this[CACHE].get(key)\n const item = node.value\n\n // dispose of the old one before overwriting\n // split out into 2 ifs for better coverage tracking\n if (this[DISPOSE]) {\n if (!this[NO_DISPOSE_ON_SET])\n this[DISPOSE](key, item.value)\n }\n\n item.now = now\n item.maxAge = maxAge\n item.value = value\n this[LENGTH] += len - item.length\n item.length = len\n this.get(key)\n trim(this)\n return true\n }\n\n const hit = new Entry(key, value, len, now, maxAge)\n\n // oversized objects fall out of cache automatically.\n if (hit.length > this[MAX]) {\n if (this[DISPOSE])\n this[DISPOSE](key, value)\n\n return false\n }\n\n this[LENGTH] += hit.length\n this[LRU_LIST].unshift(hit)\n this[CACHE].set(key, this[LRU_LIST].head)\n trim(this)\n return true\n }\n\n has (key) {\n if (!this[CACHE].has(key)) return false\n const hit = this[CACHE].get(key).value\n return !isStale(this, hit)\n }\n\n get (key) {\n return get(this, key, true)\n }\n\n peek (key) {\n return get(this, key, false)\n }\n\n pop () {\n const node = this[LRU_LIST].tail\n if (!node)\n return null\n\n del(this, node)\n return node.value\n }\n\n del (key) {\n del(this, this[CACHE].get(key))\n }\n\n load (arr) {\n // reset the cache\n this.reset()\n\n const now = Date.now()\n // A previous serialized cache has the most recent items first\n for (let l = arr.length - 1; l >= 0; l--) {\n const hit = arr[l]\n const expiresAt = hit.e || 0\n if (expiresAt === 0)\n // the item was created without expiration in a non aged cache\n this.set(hit.k, hit.v)\n else {\n const maxAge = expiresAt - now\n // dont add already expired items\n if (maxAge > 0) {\n this.set(hit.k, hit.v, maxAge)\n }\n }\n }\n }\n\n prune () {\n this[CACHE].forEach((value, key) => get(this, key, false))\n }\n}\n\nconst get = (self, key, doUse) => {\n const node = self[CACHE].get(key)\n if (node) {\n const hit = node.value\n if (isStale(self, hit)) {\n del(self, node)\n if (!self[ALLOW_STALE])\n return undefined\n } else {\n if (doUse) {\n if (self[UPDATE_AGE_ON_GET])\n node.value.now = Date.now()\n self[LRU_LIST].unshiftNode(node)\n }\n }\n return hit.value\n }\n}\n\nconst isStale = (self, hit) => {\n if (!hit || (!hit.maxAge && !self[MAX_AGE]))\n return false\n\n const diff = Date.now() - hit.now\n return hit.maxAge ? diff > hit.maxAge\n : self[MAX_AGE] && (diff > self[MAX_AGE])\n}\n\nconst trim = self => {\n if (self[LENGTH] > self[MAX]) {\n for (let walker = self[LRU_LIST].tail;\n self[LENGTH] > self[MAX] && walker !== null;) {\n // We know that we're about to delete this one, and also\n // what the next least recently used key will be, so just\n // go ahead and set it now.\n const prev = walker.prev\n del(self, walker)\n walker = prev\n }\n }\n}\n\nconst del = (self, node) => {\n if (node) {\n const hit = node.value\n if (self[DISPOSE])\n self[DISPOSE](hit.key, hit.value)\n\n self[LENGTH] -= hit.length\n self[CACHE].delete(hit.key)\n self[LRU_LIST].removeNode(node)\n }\n}\n\nclass Entry {\n constructor (key, value, length, now, maxAge) {\n this.key = key\n this.value = value\n this.length = length\n this.now = now\n this.maxAge = maxAge || 0\n }\n}\n\nconst forEachStep = (self, fn, node, thisp) => {\n let hit = node.value\n if (isStale(self, hit)) {\n del(self, node)\n if (!self[ALLOW_STALE])\n hit = undefined\n }\n if (hit)\n fn.call(thisp, hit.value, hit.key, self)\n}\n\nmodule.exports = LRUCache\n","// Import support https://stackoverflow.com/questions/13673346/supporting-both-commonjs-and-amd\n(function(name, definition) {\n if (typeof module !== \"undefined\") { module.exports = definition(); }\n else if (typeof define === \"function\" && typeof define.amd === \"object\") { define(definition); }\n else { this[name] = definition(); }\n}(\"clipboard\", function() {\n if (typeof document === 'undefined' || !document.addEventListener) {\n return null;\n }\n\n var clipboard = {};\n\n clipboard.copy = (function() {\n var _intercept = false;\n var _data = null; // Map from data type (e.g. \"text/html\") to value.\n var _bogusSelection = false;\n\n function cleanup() {\n _intercept = false;\n _data = null;\n if (_bogusSelection) {\n window.getSelection().removeAllRanges();\n }\n _bogusSelection = false;\n }\n\n document.addEventListener(\"copy\", function(e) {\n if (_intercept) {\n for (var key in _data) {\n e.clipboardData.setData(key, _data[key]);\n }\n e.preventDefault();\n }\n });\n\n // Workaround for Safari: https://bugs.webkit.org/show_bug.cgi?id=156529\n function bogusSelect() {\n var sel = document.getSelection();\n // If \"nothing\" is selected...\n if (!document.queryCommandEnabled(\"copy\") && sel.isCollapsed) {\n // ... temporarily select the entire body.\n //\n // We select the entire body because:\n // - it's guaranteed to exist,\n // - it works (unlike, say, document.head, or phantom element that is\n // not inserted into the DOM),\n // - it doesn't seem to flicker (due to the synchronous copy event), and\n // - it avoids modifying the DOM (can trigger mutation observers).\n //\n // Because we can't do proper feature detection (we already checked\n // document.queryCommandEnabled(\"copy\") , which actually gives a false\n // negative for Blink when nothing is selected) and UA sniffing is not\n // reliable (a lot of UA strings contain \"Safari\"), this will also\n // happen for some browsers other than Safari. :-()\n var range = document.createRange();\n range.selectNodeContents(document.body);\n sel.removeAllRanges();\n sel.addRange(range);\n _bogusSelection = true;\n }\n };\n\n return function(data) {\n return new Promise(function(resolve, reject) {\n _intercept = true;\n if (typeof data === \"string\") {\n _data = {\"text/plain\": data};\n } else if (data instanceof Node) {\n _data = {\"text/html\": new XMLSerializer().serializeToString(data)};\n } else if (data instanceof Object){\n _data = data;\n } else {\n reject(\"Invalid data type. Must be string, DOM node, or an object mapping MIME types to strings.\")\n }\n\n function triggerCopy(tryBogusSelect) {\n try {\n if (document.execCommand(\"copy\")) {\n // document.execCommand is synchronous: http://www.w3.org/TR/2015/WD-clipboard-apis-20150421/#integration-with-rich-text-editing-apis\n // So we can call resolve() back here.\n cleanup();\n resolve();\n }\n else {\n if (!tryBogusSelect) {\n bogusSelect();\n triggerCopy(true);\n } else {\n cleanup();\n throw new Error(\"Unable to copy. Perhaps it's not available in your browser?\");\n }\n }\n } catch (e) {\n cleanup();\n reject(e);\n }\n }\n triggerCopy(false);\n\n });\n };\n })();\n\n clipboard.paste = (function() {\n var _intercept = false;\n var _resolve;\n var _dataType;\n\n document.addEventListener(\"paste\", function(e) {\n if (_intercept) {\n _intercept = false;\n e.preventDefault();\n var resolve = _resolve;\n _resolve = null;\n resolve(e.clipboardData.getData(_dataType));\n }\n });\n\n return function(dataType) {\n return new Promise(function(resolve, reject) {\n _intercept = true;\n _resolve = resolve;\n _dataType = dataType || \"text/plain\";\n try {\n if (!document.execCommand(\"paste\")) {\n _intercept = false;\n reject(new Error(\"Unable to paste. Pasting only works in Internet Explorer at the moment.\"));\n }\n } catch (e) {\n _intercept = false;\n reject(new Error(e));\n }\n });\n };\n })();\n\n // Handle IE behaviour.\n if (typeof ClipboardEvent === \"undefined\" &&\n typeof window.clipboardData !== \"undefined\" &&\n typeof window.clipboardData.setData !== \"undefined\") {\n\n /*! promise-polyfill 2.0.1 */\n (function(a){function b(a,b){return function(){a.apply(b,arguments)}}function c(a){if(\"object\"!=typeof this)throw new TypeError(\"Promises must be constructed via new\");if(\"function\"!=typeof a)throw new TypeError(\"not a function\");this._state=null,this._value=null,this._deferreds=[],i(a,b(e,this),b(f,this))}function d(a){var b=this;return null===this._state?void this._deferreds.push(a):void j(function(){var c=b._state?a.onFulfilled:a.onRejected;if(null===c)return void(b._state?a.resolve:a.reject)(b._value);var d;try{d=c(b._value)}catch(e){return void a.reject(e)}a.resolve(d)})}function e(a){try{if(a===this)throw new TypeError(\"A promise cannot be resolved with itself.\");if(a&&(\"object\"==typeof a||\"function\"==typeof a)){var c=a.then;if(\"function\"==typeof c)return void i(b(c,a),b(e,this),b(f,this))}this._state=!0,this._value=a,g.call(this)}catch(d){f.call(this,d)}}function f(a){this._state=!1,this._value=a,g.call(this)}function g(){for(var a=0,b=this._deferreds.length;b>a;a++)d.call(this,this._deferreds[a]);this._deferreds=null}function h(a,b,c,d){this.onFulfilled=\"function\"==typeof a?a:null,this.onRejected=\"function\"==typeof b?b:null,this.resolve=c,this.reject=d}function i(a,b,c){var d=!1;try{a(function(a){d||(d=!0,b(a))},function(a){d||(d=!0,c(a))})}catch(e){if(d)return;d=!0,c(e)}}var j=c.immediateFn||\"function\"==typeof setImmediate&&setImmediate||function(a){setTimeout(a,1)},k=Array.isArray||function(a){return\"[object Array]\"===Object.prototype.toString.call(a)};c.prototype[\"catch\"]=function(a){return this.then(null,a)},c.prototype.then=function(a,b){var e=this;return new c(function(c,f){d.call(e,new h(a,b,c,f))})},c.all=function(){var a=Array.prototype.slice.call(1===arguments.length&&k(arguments[0])?arguments[0]:arguments);return new c(function(b,c){function d(f,g){try{if(g&&(\"object\"==typeof g||\"function\"==typeof g)){var h=g.then;if(\"function\"==typeof h)return void h.call(g,function(a){d(f,a)},c)}a[f]=g,0===--e&&b(a)}catch(i){c(i)}}if(0===a.length)return b([]);for(var e=a.length,f=0;f<a.length;f++)d(f,a[f])})},c.resolve=function(a){return a&&\"object\"==typeof a&&a.constructor===c?a:new c(function(b){b(a)})},c.reject=function(a){return new c(function(b,c){c(a)})},c.race=function(a){return new c(function(b,c){for(var d=0,e=a.length;e>d;d++)a[d].then(b,c)})},\"undefined\"!=typeof module&&module.exports?module.exports=c:a.Promise||(a.Promise=c)})(this);\n\n clipboard.copy = function(data) {\n return new Promise(function(resolve, reject) {\n // IE supports string and URL types: https://msdn.microsoft.com/en-us/library/ms536744(v=vs.85).aspx\n // We only support the string type for now.\n if (typeof data !== \"string\" && !(\"text/plain\" in data)) {\n throw new Error(\"You must provide a text/plain type.\");\n }\n\n var strData = (typeof data === \"string\" ? data : data[\"text/plain\"]);\n var copySucceeded = window.clipboardData.setData(\"Text\", strData);\n if (copySucceeded) {\n resolve();\n } else {\n reject(new Error(\"Copying was rejected.\"));\n }\n });\n };\n\n clipboard.paste = function() {\n return new Promise(function(resolve, reject) {\n var strData = window.clipboardData.getData(\"Text\");\n if (strData) {\n resolve(strData);\n } else {\n // The user rejected the paste request.\n reject(new Error(\"Pasting was rejected.\"));\n }\n });\n };\n }\n\n return clipboard;\n}));\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-debug-tools.production.min.js');\n} else {\n module.exports = require('./cjs/react-debug-tools.development.js');\n}\n","export default \":root {\\n /**\\n * IMPORTANT: When new theme variables are added below– also add them to SettingsContext updateThemeVariables()\\n */\\n\\n /* Light theme */\\n --light-color-attribute-name: #ef6632;\\n --light-color-attribute-name-not-editable: #23272f;\\n --light-color-attribute-name-inverted: rgba(255, 255, 255, 0.7);\\n --light-color-attribute-value: #1a1aa6;\\n --light-color-attribute-value-inverted: #ffffff;\\n --light-color-attribute-editable-value: #1a1aa6;\\n --light-color-background: #ffffff;\\n --light-color-background-hover: rgba(0, 136, 250, 0.1);\\n --light-color-background-inactive: #e5e5e5;\\n --light-color-background-invalid: #fff0f0;\\n --light-color-background-selected: #0088fa;\\n --light-color-button-background: #ffffff;\\n --light-color-button-background-focus: #ededed;\\n --light-color-button: #5f6673;\\n --light-color-button-disabled: #cfd1d5;\\n --light-color-button-active: #0088fa;\\n --light-color-button-focus: #23272f;\\n --light-color-button-hover: #23272f;\\n --light-color-border: #eeeeee;\\n --light-color-commit-did-not-render-fill: #cfd1d5;\\n --light-color-commit-did-not-render-fill-text: #000000;\\n --light-color-commit-did-not-render-pattern: #cfd1d5;\\n --light-color-commit-did-not-render-pattern-text: #333333;\\n --light-color-commit-gradient-0: #37afa9;\\n --light-color-commit-gradient-1: #63b19e;\\n --light-color-commit-gradient-2: #80b393;\\n --light-color-commit-gradient-3: #97b488;\\n --light-color-commit-gradient-4: #abb67d;\\n --light-color-commit-gradient-5: #beb771;\\n --light-color-commit-gradient-6: #cfb965;\\n --light-color-commit-gradient-7: #dfba57;\\n --light-color-commit-gradient-8: #efbb49;\\n --light-color-commit-gradient-9: #febc38;\\n --light-color-commit-gradient-text: #000000;\\n --light-color-component-name: #6a51b2;\\n --light-color-component-name-inverted: #ffffff;\\n --light-color-component-badge-background: rgba(0, 0, 0, 0.1);\\n --light-color-component-badge-background-inverted: rgba(255, 255, 255, 0.25);\\n --light-color-component-badge-count: #777d88;\\n --light-color-component-badge-count-inverted: rgba(255, 255, 255, 0.7);\\n --light-color-context-background: rgba(0,0,0,.9);\\n --light-color-context-background-hover: rgba(255, 255, 255, 0.1);\\n --light-color-context-background-selected: #178fb9;\\n --light-color-context-border: #3d424a;\\n --light-color-context-text: #ffffff;\\n --light-color-context-text-selected: #ffffff;\\n --light-color-dim: #777d88;\\n --light-color-dimmer: #cfd1d5;\\n --light-color-dimmest: #eff0f1;\\n --light-color-error-background: hsl(0, 100%, 97%);\\n --light-color-error-border: hsl(0, 100%, 92%);\\n --light-color-error-text: #ff0000;\\n --light-color-expand-collapse-toggle: #777d88;\\n --light-color-link: #0000ff;\\n --light-color-modal-background: rgba(255, 255, 255, 0.75);\\n --light-color-record-active: #fc3a4b;\\n --light-color-record-hover: #3578e5;\\n --light-color-record-inactive: #0088fa;\\n --light-color-scroll-thumb: #c2c2c2;\\n --light-color-scroll-track: #fafafa;\\n --light-color-search-match: yellow;\\n --light-color-search-match-current: #f7923b;\\n --light-color-selected-tree-highlight-active: rgba(0, 136, 250, 0.1);\\n --light-color-selected-tree-highlight-inactive: rgba(0, 0, 0, 0.05);\\n --light-color-shadow: rgba(0, 0, 0, 0.25);\\n --light-color-tab-selected-border: #0088fa;\\n --light-color-text: #000000;\\n --light-color-text-invalid: #ff0000;\\n --light-color-text-selected: #ffffff;\\n --light-color-toggle-background-invalid: #fc3a4b;\\n --light-color-toggle-background-on: #0088fa;\\n --light-color-toggle-background-off: #cfd1d5;\\n --light-color-toggle-text: #ffffff;\\n --light-color-tooltip-background: rgba(0, 0, 0, 0.9);\\n --light-color-tooltip-text: #ffffff;\\n\\n /* Dark theme */\\n --dark-color-attribute-name: #9d87d2;\\n --dark-color-attribute-name-not-editable: #ededed;\\n --dark-color-attribute-name-inverted: #282828;\\n --dark-color-attribute-value: #cedae0;\\n --dark-color-attribute-value-inverted: #ffffff;\\n --dark-color-attribute-editable-value: yellow;\\n --dark-color-background: #282c34;\\n --dark-color-background-hover: rgba(255, 255, 255, 0.1);\\n --dark-color-background-inactive: #3d424a;\\n --dark-color-background-invalid: #5c0000;\\n --dark-color-background-selected: #178fb9;\\n --dark-color-button-background: #282c34;\\n --dark-color-button-background-focus: #3d424a;\\n --dark-color-button: #afb3b9;\\n --dark-color-button-active: #61dafb;\\n --dark-color-button-disabled: #4f5766;\\n --dark-color-button-focus: #a2e9fc;\\n --dark-color-button-hover: #ededed;\\n --dark-color-border: #3d424a;\\n --dark-color-commit-did-not-render-fill: #777d88;\\n --dark-color-commit-did-not-render-fill-text: #000000;\\n --dark-color-commit-did-not-render-pattern: #666c77;\\n --dark-color-commit-did-not-render-pattern-text: #ffffff;\\n --dark-color-commit-gradient-0: #37afa9;\\n --dark-color-commit-gradient-1: #63b19e;\\n --dark-color-commit-gradient-2: #80b393;\\n --dark-color-commit-gradient-3: #97b488;\\n --dark-color-commit-gradient-4: #abb67d;\\n --dark-color-commit-gradient-5: #beb771;\\n --dark-color-commit-gradient-6: #cfb965;\\n --dark-color-commit-gradient-7: #dfba57;\\n --dark-color-commit-gradient-8: #efbb49;\\n --dark-color-commit-gradient-9: #febc38;\\n --dark-color-commit-gradient-text: #000000;\\n --dark-color-component-name: #61dafb;\\n --dark-color-component-name-inverted: #282828;\\n --dark-color-component-badge-background: rgba(255, 255, 255, 0.25);\\n --dark-color-component-badge-background-inverted: rgba(0, 0, 0, 0.25);\\n --dark-color-component-badge-count: #8f949d;\\n --dark-color-component-badge-count-inverted: rgba(255, 255, 255, 0.7);\\n --dark-color-context-background: rgba(255,255,255,.9);\\n --dark-color-context-background-hover: rgba(0, 136, 250, 0.1);\\n --dark-color-context-background-selected: #0088fa;\\n --dark-color-context-border: #eeeeee;\\n --dark-color-context-text: #000000;\\n --dark-color-context-text-selected: #ffffff;\\n --dark-color-dim: #8f949d;\\n --dark-color-dimmer: #777d88;\\n --dark-color-dimmest: #4f5766;\\n --dark-color-error-background: #200;\\n --dark-color-error-border: #900;\\n --dark-color-error-text: #f55;\\n --dark-color-expand-collapse-toggle: #8f949d;\\n --dark-color-link: #61dafb;\\n --dark-color-modal-background: rgba(0, 0, 0, 0.75);\\n --dark-color-record-active: #fc3a4b;\\n --dark-color-record-hover: #a2e9fc;\\n --dark-color-record-inactive: #61dafb;\\n --dark-color-scroll-thumb: #afb3b9;\\n --dark-color-scroll-track: #313640;\\n --dark-color-search-match: yellow;\\n --dark-color-search-match-current: #f7923b;\\n --dark-color-selected-tree-highlight-active: rgba(23, 143, 185, 0.15);\\n --dark-color-selected-tree-highlight-inactive: rgba(255, 255, 255, 0.05);\\n --dark-color-shadow: rgba(0, 0, 0, 0.5);\\n --dark-color-tab-selected-border: #178fb9;\\n --dark-color-text: #ffffff;\\n --dark-color-text-invalid: #ff8080;\\n --dark-color-text-selected: #ffffff;\\n --dark-color-toggle-background-invalid: #fc3a4b;\\n --dark-color-toggle-background-on: #178fb9;\\n --dark-color-toggle-background-off: #777d88;\\n --dark-color-toggle-text: #ffffff;\\n --dark-color-tooltip-background: rgba(255, 255, 255, 0.9);\\n --dark-color-tooltip-text: #000000;\\n\\n /* Font smoothing */\\n --light-font-smoothing: auto;\\n --dark-font-smoothing: antialiased;\\n --font-smoothing: auto;\\n\\n /* Compact density */\\n --compact-font-size-monospace-small: 9px;\\n --compact-font-size-monospace-normal: 11px;\\n --compact-font-size-monospace-large: 15px;\\n --compact-font-size-sans-small: 10px;\\n --compact-font-size-sans-normal: 12px;\\n --compact-font-size-sans-large: 14px;\\n --compact-line-height-data: 18px;\\n --compact-root-font-size: 16px;\\n\\n /* Comfortable density */\\n --comfortable-font-size-monospace-small: 10px;\\n --comfortable-font-size-monospace-normal: 13px;\\n --comfortable-font-size-monospace-large: 17px;\\n --comfortable-font-size-sans-small: 12px;\\n --comfortable-font-size-sans-normal: 14px;\\n --comfortable-font-size-sans-large: 16px;\\n --comfortable-line-height-data: 22px;\\n --comfortable-root-font-size: 20px;\\n\\n /* GitHub.com system fonts */\\n --font-family-monospace: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo,\\n Courier, monospace;\\n --font-family-sans: -apple-system, BlinkMacSystemFont, Segoe UI, Helvetica,\\n Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol;\\n\\n /* Constant values shared between JS and CSS */\\n --interaction-commit-size: 10px;\\n --interaction-label-width: 200px;\\n}\\n\"","'use strict'\nmodule.exports = Yallist\n\nYallist.Node = Node\nYallist.create = Yallist\n\nfunction Yallist (list) {\n var self = this\n if (!(self instanceof Yallist)) {\n self = new Yallist()\n }\n\n self.tail = null\n self.head = null\n self.length = 0\n\n if (list && typeof list.forEach === 'function') {\n list.forEach(function (item) {\n self.push(item)\n })\n } else if (arguments.length > 0) {\n for (var i = 0, l = arguments.length; i < l; i++) {\n self.push(arguments[i])\n }\n }\n\n return self\n}\n\nYallist.prototype.removeNode = function (node) {\n if (node.list !== this) {\n throw new Error('removing node which does not belong to this list')\n }\n\n var next = node.next\n var prev = node.prev\n\n if (next) {\n next.prev = prev\n }\n\n if (prev) {\n prev.next = next\n }\n\n if (node === this.head) {\n this.head = next\n }\n if (node === this.tail) {\n this.tail = prev\n }\n\n node.list.length--\n node.next = null\n node.prev = null\n node.list = null\n\n return next\n}\n\nYallist.prototype.unshiftNode = function (node) {\n if (node === this.head) {\n return\n }\n\n if (node.list) {\n node.list.removeNode(node)\n }\n\n var head = this.head\n node.list = this\n node.next = head\n if (head) {\n head.prev = node\n }\n\n this.head = node\n if (!this.tail) {\n this.tail = node\n }\n this.length++\n}\n\nYallist.prototype.pushNode = function (node) {\n if (node === this.tail) {\n return\n }\n\n if (node.list) {\n node.list.removeNode(node)\n }\n\n var tail = this.tail\n node.list = this\n node.prev = tail\n if (tail) {\n tail.next = node\n }\n\n this.tail = node\n if (!this.head) {\n this.head = node\n }\n this.length++\n}\n\nYallist.prototype.push = function () {\n for (var i = 0, l = arguments.length; i < l; i++) {\n push(this, arguments[i])\n }\n return this.length\n}\n\nYallist.prototype.unshift = function () {\n for (var i = 0, l = arguments.length; i < l; i++) {\n unshift(this, arguments[i])\n }\n return this.length\n}\n\nYallist.prototype.pop = function () {\n if (!this.tail) {\n return undefined\n }\n\n var res = this.tail.value\n this.tail = this.tail.prev\n if (this.tail) {\n this.tail.next = null\n } else {\n this.head = null\n }\n this.length--\n return res\n}\n\nYallist.prototype.shift = function () {\n if (!this.head) {\n return undefined\n }\n\n var res = this.head.value\n this.head = this.head.next\n if (this.head) {\n this.head.prev = null\n } else {\n this.tail = null\n }\n this.length--\n return res\n}\n\nYallist.prototype.forEach = function (fn, thisp) {\n thisp = thisp || this\n for (var walker = this.head, i = 0; walker !== null; i++) {\n fn.call(thisp, walker.value, i, this)\n walker = walker.next\n }\n}\n\nYallist.prototype.forEachReverse = function (fn, thisp) {\n thisp = thisp || this\n for (var walker = this.tail, i = this.length - 1; walker !== null; i--) {\n fn.call(thisp, walker.value, i, this)\n walker = walker.prev\n }\n}\n\nYallist.prototype.get = function (n) {\n for (var i = 0, walker = this.head; walker !== null && i < n; i++) {\n // abort out of the list early if we hit a cycle\n walker = walker.next\n }\n if (i === n && walker !== null) {\n return walker.value\n }\n}\n\nYallist.prototype.getReverse = function (n) {\n for (var i = 0, walker = this.tail; walker !== null && i < n; i++) {\n // abort out of the list early if we hit a cycle\n walker = walker.prev\n }\n if (i === n && walker !== null) {\n return walker.value\n }\n}\n\nYallist.prototype.map = function (fn, thisp) {\n thisp = thisp || this\n var res = new Yallist()\n for (var walker = this.head; walker !== null;) {\n res.push(fn.call(thisp, walker.value, this))\n walker = walker.next\n }\n return res\n}\n\nYallist.prototype.mapReverse = function (fn, thisp) {\n thisp = thisp || this\n var res = new Yallist()\n for (var walker = this.tail; walker !== null;) {\n res.push(fn.call(thisp, walker.value, this))\n walker = walker.prev\n }\n return res\n}\n\nYallist.prototype.reduce = function (fn, initial) {\n var acc\n var walker = this.head\n if (arguments.length > 1) {\n acc = initial\n } else if (this.head) {\n walker = this.head.next\n acc = this.head.value\n } else {\n throw new TypeError('Reduce of empty list with no initial value')\n }\n\n for (var i = 0; walker !== null; i++) {\n acc = fn(acc, walker.value, i)\n walker = walker.next\n }\n\n return acc\n}\n\nYallist.prototype.reduceReverse = function (fn, initial) {\n var acc\n var walker = this.tail\n if (arguments.length > 1) {\n acc = initial\n } else if (this.tail) {\n walker = this.tail.prev\n acc = this.tail.value\n } else {\n throw new TypeError('Reduce of empty list with no initial value')\n }\n\n for (var i = this.length - 1; walker !== null; i--) {\n acc = fn(acc, walker.value, i)\n walker = walker.prev\n }\n\n return acc\n}\n\nYallist.prototype.toArray = function () {\n var arr = new Array(this.length)\n for (var i = 0, walker = this.head; walker !== null; i++) {\n arr[i] = walker.value\n walker = walker.next\n }\n return arr\n}\n\nYallist.prototype.toArrayReverse = function () {\n var arr = new Array(this.length)\n for (var i = 0, walker = this.tail; walker !== null; i++) {\n arr[i] = walker.value\n walker = walker.prev\n }\n return arr\n}\n\nYallist.prototype.slice = function (from, to) {\n to = to || this.length\n if (to < 0) {\n to += this.length\n }\n from = from || 0\n if (from < 0) {\n from += this.length\n }\n var ret = new Yallist()\n if (to < from || to < 0) {\n return ret\n }\n if (from < 0) {\n from = 0\n }\n if (to > this.length) {\n to = this.length\n }\n for (var i = 0, walker = this.head; walker !== null && i < from; i++) {\n walker = walker.next\n }\n for (; walker !== null && i < to; i++, walker = walker.next) {\n ret.push(walker.value)\n }\n return ret\n}\n\nYallist.prototype.sliceReverse = function (from, to) {\n to = to || this.length\n if (to < 0) {\n to += this.length\n }\n from = from || 0\n if (from < 0) {\n from += this.length\n }\n var ret = new Yallist()\n if (to < from || to < 0) {\n return ret\n }\n if (from < 0) {\n from = 0\n }\n if (to > this.length) {\n to = this.length\n }\n for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) {\n walker = walker.prev\n }\n for (; walker !== null && i > from; i--, walker = walker.prev) {\n ret.push(walker.value)\n }\n return ret\n}\n\nYallist.prototype.splice = function (start, deleteCount /*, ...nodes */) {\n if (start > this.length) {\n start = this.length - 1\n }\n if (start < 0) {\n start = this.length + start;\n }\n\n for (var i = 0, walker = this.head; walker !== null && i < start; i++) {\n walker = walker.next\n }\n\n var ret = []\n for (var i = 0; walker && i < deleteCount; i++) {\n ret.push(walker.value)\n walker = this.removeNode(walker)\n }\n if (walker === null) {\n walker = this.tail\n }\n\n if (walker !== this.head && walker !== this.tail) {\n walker = walker.prev\n }\n\n for (var i = 2; i < arguments.length; i++) {\n walker = insert(this, walker, arguments[i])\n }\n return ret;\n}\n\nYallist.prototype.reverse = function () {\n var head = this.head\n var tail = this.tail\n for (var walker = head; walker !== null; walker = walker.prev) {\n var p = walker.prev\n walker.prev = walker.next\n walker.next = p\n }\n this.head = tail\n this.tail = head\n return this\n}\n\nfunction insert (self, node, value) {\n var inserted = node === self.head ?\n new Node(value, null, node, self) :\n new Node(value, node, node.next, self)\n\n if (inserted.next === null) {\n self.tail = inserted\n }\n if (inserted.prev === null) {\n self.head = inserted\n }\n\n self.length++\n\n return inserted\n}\n\nfunction push (self, item) {\n self.tail = new Node(item, self.tail, null, self)\n if (!self.head) {\n self.head = self.tail\n }\n self.length++\n}\n\nfunction unshift (self, item) {\n self.head = new Node(item, null, self.head, self)\n if (!self.tail) {\n self.tail = self.head\n }\n self.length++\n}\n\nfunction Node (value, prev, next, list) {\n if (!(this instanceof Node)) {\n return new Node(value, prev, next, list)\n }\n\n this.list = list\n this.value = value\n\n if (prev) {\n prev.next = this\n this.prev = prev\n } else {\n this.prev = null\n }\n\n if (next) {\n next.prev = this\n this.next = next\n } else {\n this.next = null\n }\n}\n\ntry {\n // add if support for Symbol.iterator is present\n require('./iterator.js')(Yallist)\n} catch (er) {}\n","'use strict'\nmodule.exports = function (Yallist) {\n Yallist.prototype[Symbol.iterator] = function* () {\n for (let walker = this.head; walker; walker = walker.next) {\n yield walker.value\n }\n }\n}\n","/** @license React v0.0.0-experimental-9b8060041\n * react-is.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var b=60103,c=60106,d=60107,e=60108,f=60114,g=60109,h=60110,k=60112,l=60113,m=60120,n=60115,p=60116,q=60117,r=60129,u=60131;\nif(\"function\"===typeof Symbol&&Symbol.for){var v=Symbol.for;b=v(\"react.element\");c=v(\"react.portal\");d=v(\"react.fragment\");e=v(\"react.strict_mode\");f=v(\"react.profiler\");g=v(\"react.provider\");h=v(\"react.context\");k=v(\"react.forward_ref\");l=v(\"react.suspense\");m=v(\"react.suspense_list\");n=v(\"react.memo\");p=v(\"react.lazy\");q=v(\"react.fundamental\");r=v(\"react.debug_trace_mode\");u=v(\"react.legacy_hidden\")}var w=0;\"function\"===typeof Symbol&&(w=Symbol.for(\"react.module.reference\"));\nfunction x(a){if(\"object\"===typeof a&&null!==a){var t=a.$$typeof;switch(t){case b:switch(a=a.type,a){case d:case f:case e:case l:case m:return a;default:switch(a=a&&a.$$typeof,a){case h:case k:case p:case n:case g:return a;default:return t}}case c:return t}}}var y=g,z=b,A=k,B=d,C=p,D=n,E=c,F=f,G=e,H=l;exports.ContextConsumer=h;exports.ContextProvider=y;exports.Element=z;exports.ForwardRef=A;exports.Fragment=B;exports.Lazy=C;exports.Memo=D;exports.Portal=E;exports.Profiler=F;exports.StrictMode=G;\nexports.Suspense=H;exports.isAsyncMode=function(){return!1};exports.isConcurrentMode=function(){return!1};exports.isContextConsumer=function(a){return x(a)===h};exports.isContextProvider=function(a){return x(a)===g};exports.isElement=function(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===b};exports.isForwardRef=function(a){return x(a)===k};exports.isFragment=function(a){return x(a)===d};exports.isLazy=function(a){return x(a)===p};exports.isMemo=function(a){return x(a)===n};\nexports.isPortal=function(a){return x(a)===c};exports.isProfiler=function(a){return x(a)===f};exports.isStrictMode=function(a){return x(a)===e};exports.isSuspense=function(a){return x(a)===l};\nexports.isValidElementType=function(a){return\"string\"===typeof a||\"function\"===typeof a||a===d||a===f||a===r||a===e||a===l||a===m||a===u||\"object\"===typeof a&&null!==a&&(a.$$typeof===p||a.$$typeof===n||a.$$typeof===g||a.$$typeof===h||a.$$typeof===k||a.$$typeof===q||a.$$typeof===w||void 0!==a.getModuleId)?!0:!1};exports.typeOf=x;\n","var scope = (typeof global !== \"undefined\" && global) ||\n (typeof self !== \"undefined\" && self) ||\n window;\nvar apply = Function.prototype.apply;\n\n// DOM APIs, for completeness\n\nexports.setTimeout = function() {\n return new Timeout(apply.call(setTimeout, scope, arguments), clearTimeout);\n};\nexports.setInterval = function() {\n return new Timeout(apply.call(setInterval, scope, arguments), clearInterval);\n};\nexports.clearTimeout =\nexports.clearInterval = function(timeout) {\n if (timeout) {\n timeout.close();\n }\n};\n\nfunction Timeout(id, clearFn) {\n this._id = id;\n this._clearFn = clearFn;\n}\nTimeout.prototype.unref = Timeout.prototype.ref = function() {};\nTimeout.prototype.close = function() {\n this._clearFn.call(scope, this._id);\n};\n\n// Does not start the time, just sets up the members needed.\nexports.enroll = function(item, msecs) {\n clearTimeout(item._idleTimeoutId);\n item._idleTimeout = msecs;\n};\n\nexports.unenroll = function(item) {\n clearTimeout(item._idleTimeoutId);\n item._idleTimeout = -1;\n};\n\nexports._unrefActive = exports.active = function(item) {\n clearTimeout(item._idleTimeoutId);\n\n var msecs = item._idleTimeout;\n if (msecs >= 0) {\n item._idleTimeoutId = setTimeout(function onTimeout() {\n if (item._onTimeout)\n item._onTimeout();\n }, msecs);\n }\n};\n\n// setimmediate attaches itself to the global object\nrequire(\"setimmediate\");\n// On some exotic environments, it's not clear which object `setimmediate` was\n// able to install onto. Search each possibility in the same order as the\n// `setimmediate` library.\nexports.setImmediate = (typeof self !== \"undefined\" && self.setImmediate) ||\n (typeof global !== \"undefined\" && global.setImmediate) ||\n (this && this.setImmediate);\nexports.clearImmediate = (typeof self !== \"undefined\" && self.clearImmediate) ||\n (typeof global !== \"undefined\" && global.clearImmediate) ||\n (this && this.clearImmediate);\n","(function (global, undefined) {\n \"use strict\";\n\n if (global.setImmediate) {\n return;\n }\n\n var nextHandle = 1; // Spec says greater than zero\n var tasksByHandle = {};\n var currentlyRunningATask = false;\n var doc = global.document;\n var registerImmediate;\n\n function setImmediate(callback) {\n // Callback can either be a function or a string\n if (typeof callback !== \"function\") {\n callback = new Function(\"\" + callback);\n }\n // Copy function arguments\n var args = new Array(arguments.length - 1);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i + 1];\n }\n // Store and register the task\n var task = { callback: callback, args: args };\n tasksByHandle[nextHandle] = task;\n registerImmediate(nextHandle);\n return nextHandle++;\n }\n\n function clearImmediate(handle) {\n delete tasksByHandle[handle];\n }\n\n function run(task) {\n var callback = task.callback;\n var args = task.args;\n switch (args.length) {\n case 0:\n callback();\n break;\n case 1:\n callback(args[0]);\n break;\n case 2:\n callback(args[0], args[1]);\n break;\n case 3:\n callback(args[0], args[1], args[2]);\n break;\n default:\n callback.apply(undefined, args);\n break;\n }\n }\n\n function runIfPresent(handle) {\n // From the spec: \"Wait until any invocations of this algorithm started before this one have completed.\"\n // So if we're currently running a task, we'll need to delay this invocation.\n if (currentlyRunningATask) {\n // Delay by doing a setTimeout. setImmediate was tried instead, but in Firefox 7 it generated a\n // \"too much recursion\" error.\n setTimeout(runIfPresent, 0, handle);\n } else {\n var task = tasksByHandle[handle];\n if (task) {\n currentlyRunningATask = true;\n try {\n run(task);\n } finally {\n clearImmediate(handle);\n currentlyRunningATask = false;\n }\n }\n }\n }\n\n function installNextTickImplementation() {\n registerImmediate = function(handle) {\n process.nextTick(function () { runIfPresent(handle); });\n };\n }\n\n function canUsePostMessage() {\n // The test against `importScripts` prevents this implementation from being installed inside a web worker,\n // where `global.postMessage` means something completely different and can't be used for this purpose.\n if (global.postMessage && !global.importScripts) {\n var postMessageIsAsynchronous = true;\n var oldOnMessage = global.onmessage;\n global.onmessage = function() {\n postMessageIsAsynchronous = false;\n };\n global.postMessage(\"\", \"*\");\n global.onmessage = oldOnMessage;\n return postMessageIsAsynchronous;\n }\n }\n\n function installPostMessageImplementation() {\n // Installs an event handler on `global` for the `message` event: see\n // * https://developer.mozilla.org/en/DOM/window.postMessage\n // * http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#crossDocumentMessages\n\n var messagePrefix = \"setImmediate$\" + Math.random() + \"$\";\n var onGlobalMessage = function(event) {\n if (event.source === global &&\n typeof event.data === \"string\" &&\n event.data.indexOf(messagePrefix) === 0) {\n runIfPresent(+event.data.slice(messagePrefix.length));\n }\n };\n\n if (global.addEventListener) {\n global.addEventListener(\"message\", onGlobalMessage, false);\n } else {\n global.attachEvent(\"onmessage\", onGlobalMessage);\n }\n\n registerImmediate = function(handle) {\n global.postMessage(messagePrefix + handle, \"*\");\n };\n }\n\n function installMessageChannelImplementation() {\n var channel = new MessageChannel();\n channel.port1.onmessage = function(event) {\n var handle = event.data;\n runIfPresent(handle);\n };\n\n registerImmediate = function(handle) {\n channel.port2.postMessage(handle);\n };\n }\n\n function installReadyStateChangeImplementation() {\n var html = doc.documentElement;\n registerImmediate = function(handle) {\n // Create a <script> element; its readystatechange event will be fired asynchronously once it is inserted\n // into the document. Do so, thus queuing up the task. Remember to clean up once it's been called.\n var script = doc.createElement(\"script\");\n script.onreadystatechange = function () {\n runIfPresent(handle);\n script.onreadystatechange = null;\n html.removeChild(script);\n script = null;\n };\n html.appendChild(script);\n };\n }\n\n function installSetTimeoutImplementation() {\n registerImmediate = function(handle) {\n setTimeout(runIfPresent, 0, handle);\n };\n }\n\n // If supported, we should attach to the prototype of global, since that is where setTimeout et al. live.\n var attachTo = Object.getPrototypeOf && Object.getPrototypeOf(global);\n attachTo = attachTo && attachTo.setTimeout ? attachTo : global;\n\n // Don't get fooled by e.g. browserify environments.\n if ({}.toString.call(global.process) === \"[object process]\") {\n // For Node.js before 0.9\n installNextTickImplementation();\n\n } else if (canUsePostMessage()) {\n // For non-IE10 modern browsers\n installPostMessageImplementation();\n\n } else if (global.MessageChannel) {\n // For web workers, where supported\n installMessageChannelImplementation();\n\n } else if (doc && \"onreadystatechange\" in doc.createElement(\"script\")) {\n // For IE 6–8\n installReadyStateChangeImplementation();\n\n } else {\n // For older browsers\n installSetTimeoutImplementation();\n }\n\n attachTo.setImmediate = setImmediate;\n attachTo.clearImmediate = clearImmediate;\n}(typeof self === \"undefined\" ? typeof global === \"undefined\" ? this : global : self));\n","/** @license React v0.0.0-experimental-9b8060041\n * react-debug-tools.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var g=require(\"object-assign\"),k=require(\"error-stack-parser\");function p(a){for(var b=\"https://reactjs.org/docs/error-decoder.html?invariant=\"+a,c=1;c<arguments.length;c++)b+=\"&args[]=\"+encodeURIComponent(arguments[c]);return\"Minified React error #\"+a+\"; visit \"+b+\" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.\"}var v=require(\"react\").__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,w=60128;\nif(\"function\"===typeof Symbol&&Symbol.for){var x=Symbol.for;w=x(\"react.opaque.id\")}var y=[],z=null,A=null;\nfunction B(){if(null===z){var a=new Map;try{C.useContext({_currentValue:null}),C.useState(null),C.useReducer(function(a){return a},null),C.useRef(null),C.useLayoutEffect(function(){}),C.useEffect(function(){}),C.useImperativeHandle(void 0,function(){return null}),C.useDebugValue(null),C.useCallback(function(){}),C.useMemo(function(){return null})}finally{var b=y;y=[]}for(var c=0;c<b.length;c++){var d=b[c];a.set(d.primitive,k.parse(d.stackError))}z=a}return z}var D=null;\nfunction E(){var a=D;null!==a&&(D=a.next);return a}\nvar C={getCacheForType:function(){throw Error(p(248));},readContext:function(a){return a._currentValue},useCallback:function(a){var b=E();y.push({primitive:\"Callback\",stackError:Error(),value:null!==b?b.memoizedState[0]:a});return a},useContext:function(a){y.push({primitive:\"Context\",stackError:Error(),value:a._currentValue});return a._currentValue},useEffect:function(a){E();y.push({primitive:\"Effect\",stackError:Error(),value:a})},useImperativeHandle:function(a){E();var b=void 0;null!==a&&\"object\"===\ntypeof a&&(b=a.current);y.push({primitive:\"ImperativeHandle\",stackError:Error(),value:b})},useDebugValue:function(a,b){y.push({primitive:\"DebugValue\",stackError:Error(),value:\"function\"===typeof b?b(a):a})},useLayoutEffect:function(a){E();y.push({primitive:\"LayoutEffect\",stackError:Error(),value:a})},useMemo:function(a){var b=E();a=null!==b?b.memoizedState[0]:a();y.push({primitive:\"Memo\",stackError:Error(),value:a});return a},useReducer:function(a,b,c){a=E();b=null!==a?a.memoizedState:void 0!==c?\nc(b):b;y.push({primitive:\"Reducer\",stackError:Error(),value:b});return[b,function(){}]},useRef:function(a){var b=E();a=null!==b?b.memoizedState:{current:a};y.push({primitive:\"Ref\",stackError:Error(),value:a.current});return a},useState:function(a){var b=E();a=null!==b?b.memoizedState:\"function\"===typeof a?a():a;y.push({primitive:\"State\",stackError:Error(),value:a});return[a,function(){}]},useTransition:function(){E();E();y.push({primitive:\"Transition\",stackError:Error(),value:void 0});return[function(){},\n!1]},useMutableSource:function(a,b){E();E();E();E();a=b(a._source);y.push({primitive:\"MutableSource\",stackError:Error(),value:a});return a},useDeferredValue:function(a){E();E();y.push({primitive:\"DeferredValue\",stackError:Error(),value:a});return a},useOpaqueIdentifier:function(){var a=E();A&&0===A.mode&&E();(a=null===a?void 0:a.memoizedState)&&a.$$typeof===w&&(a=void 0);y.push({primitive:\"OpaqueIdentifier\",stackError:Error(),value:a});return a}},F=0;\nfunction G(a,b,c){var d=b[c].source,e=0;a:for(;e<a.length;e++)if(a[e].source===d){for(var n=c+1,q=e+1;n<b.length&&q<a.length;n++,q++)if(a[q].source!==b[n].source)continue a;return e}return-1}function H(a,b){if(!a)return!1;b=\"use\"+b;return a.length<b.length?!1:a.lastIndexOf(b)===a.length-b.length}function I(a){if(!a)return\"\";var b=a.lastIndexOf(\".\");-1===b&&(b=0);\"use\"===a.substr(b,3)&&(b+=3);return a.substr(b)}\nfunction J(a,b){for(var c=[],d=null,e=c,n=0,q=[],u=0;u<b.length;u++){var t=b[u];var f=a;var h=k.parse(t.stackError);b:{var m=h,r=G(m,f,F);if(-1!==r)f=r;else{for(var l=0;l<f.length&&5>l;l++)if(r=G(m,f,l),-1!==r){F=l;f=r;break b}f=-1}}b:{m=h;r=B().get(t.primitive);if(void 0!==r)for(l=0;l<r.length&&l<m.length;l++)if(r[l].source!==m[l].source){l<m.length-1&&H(m[l].functionName,t.primitive)&&l++;l<m.length-1&&H(m[l].functionName,t.primitive)&&l++;m=l;break b}m=-1}h=-1===f||-1===m||2>f-m?null:h.slice(m,\nf-1);if(null!==h){f=0;if(null!==d){for(;f<h.length&&f<d.length&&h[h.length-f-1].source===d[d.length-f-1].source;)f++;for(d=d.length-1;d>f;d--)e=q.pop()}for(d=h.length-f-1;1<=d;d--)f=[],e.push({id:null,isStateEditable:!1,name:I(h[d-1].functionName),value:void 0,subHooks:f}),q.push(e),e=f;d=h}h=t.primitive;f=\"Context\"===h||\"DebugValue\"===h?null:n++;e.push({id:f,isStateEditable:\"Reducer\"===h||\"State\"===h,name:h,value:t.value,subHooks:[]})}K(c,null);return c}\nfunction K(a,b){for(var c=[],d=0;d<a.length;d++){var e=a[d];\"DebugValue\"===e.name&&0===e.subHooks.length?(a.splice(d,1),d--,c.push(e)):K(e.subHooks,e)}null!==b&&(1===c.length?b.value=c[0].value:1<c.length&&(b.value=c.map(function(a){return a.value})))}function L(a,b,c){null==c&&(c=v.ReactCurrentDispatcher);var d=c.current;c.current=C;try{var e=Error();a(b)}finally{a=y,y=[],c.current=d}c=k.parse(e);return J(c,a)}function M(a){a.forEach(function(a,c){return c._currentValue=a})}\nexports.inspectHooks=L;\nexports.inspectHooksOfFiber=function(a,b){null==b&&(b=v.ReactCurrentDispatcher);A=a;if(0!==a.tag&&15!==a.tag&&11!==a.tag)throw Error(\"Unknown Fiber. Needs to be a function component to inspect hooks.\");B();var c=a.type,d=a.memoizedProps;if(c!==a.elementType&&c&&c.defaultProps){d=g({},d);var e=c.defaultProps;for(n in e)void 0===d[n]&&(d[n]=e[n])}D=a.memoizedState;var n=new Map;try{for(e=a;e;){if(10===e.tag){var q=e.type._context;n.has(q)||(n.set(q,q._currentValue),q._currentValue=e.memoizedProps.value)}e=\ne.return}if(11===a.tag){var u=c.render;c=d;var t=a.ref;a=b;var f=a.current;a.current=C;try{var h=Error();u(c,t)}finally{var m=y;y=[];a.current=f}var r=k.parse(h);return J(r,m)}return L(c,d,b)}finally{D=null,M(n)}};\n","(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('error-stack-parser', ['stackframe'], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory(require('stackframe'));\n } else {\n root.ErrorStackParser = factory(root.StackFrame);\n }\n}(this, function ErrorStackParser(StackFrame) {\n 'use strict';\n\n var FIREFOX_SAFARI_STACK_REGEXP = /(^|@)\\S+:\\d+/;\n var CHROME_IE_STACK_REGEXP = /^\\s*at .*(\\S+:\\d+|\\(native\\))/m;\n var SAFARI_NATIVE_CODE_REGEXP = /^(eval@)?(\\[native code])?$/;\n\n return {\n /**\n * Given an Error object, extract the most information from it.\n *\n * @param {Error} error object\n * @return {Array} of StackFrames\n */\n parse: function ErrorStackParser$$parse(error) {\n if (typeof error.stacktrace !== 'undefined' || typeof error['opera#sourceloc'] !== 'undefined') {\n return this.parseOpera(error);\n } else if (error.stack && error.stack.match(CHROME_IE_STACK_REGEXP)) {\n return this.parseV8OrIE(error);\n } else if (error.stack) {\n return this.parseFFOrSafari(error);\n } else {\n throw new Error('Cannot parse given Error object');\n }\n },\n\n // Separate line and column numbers from a string of the form: (URI:Line:Column)\n extractLocation: function ErrorStackParser$$extractLocation(urlLike) {\n // Fail-fast but return locations like \"(native)\"\n if (urlLike.indexOf(':') === -1) {\n return [urlLike];\n }\n\n var regExp = /(.+?)(?::(\\d+))?(?::(\\d+))?$/;\n var parts = regExp.exec(urlLike.replace(/[()]/g, ''));\n return [parts[1], parts[2] || undefined, parts[3] || undefined];\n },\n\n parseV8OrIE: function ErrorStackParser$$parseV8OrIE(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !!line.match(CHROME_IE_STACK_REGEXP);\n }, this);\n\n return filtered.map(function(line) {\n if (line.indexOf('(eval ') > -1) {\n // Throw away eval information until we implement stacktrace.js/stackframe#8\n line = line.replace(/eval code/g, 'eval').replace(/(\\(eval at [^()]*)|(\\),.*$)/g, '');\n }\n var sanitizedLine = line.replace(/^\\s+/, '').replace(/\\(eval code/g, '(');\n\n // capture and preseve the parenthesized location \"(/foo/my bar.js:12:87)\" in\n // case it has spaces in it, as the string is split on \\s+ later on\n var location = sanitizedLine.match(/ (\\((.+):(\\d+):(\\d+)\\)$)/);\n\n // remove the parenthesized location from the line, if it was matched\n sanitizedLine = location ? sanitizedLine.replace(location[0], '') : sanitizedLine;\n\n var tokens = sanitizedLine.split(/\\s+/).slice(1);\n // if a location was matched, pass it to extractLocation() otherwise pop the last token\n var locationParts = this.extractLocation(location ? location[1] : tokens.pop());\n var functionName = tokens.join(' ') || undefined;\n var fileName = ['eval', '<anonymous>'].indexOf(locationParts[0]) > -1 ? undefined : locationParts[0];\n\n return new StackFrame({\n functionName: functionName,\n fileName: fileName,\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }, this);\n },\n\n parseFFOrSafari: function ErrorStackParser$$parseFFOrSafari(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !line.match(SAFARI_NATIVE_CODE_REGEXP);\n }, this);\n\n return filtered.map(function(line) {\n // Throw away eval information until we implement stacktrace.js/stackframe#8\n if (line.indexOf(' > eval') > -1) {\n line = line.replace(/ line (\\d+)(?: > eval line \\d+)* > eval:\\d+:\\d+/g, ':$1');\n }\n\n if (line.indexOf('@') === -1 && line.indexOf(':') === -1) {\n // Safari eval frames only have function names and nothing else\n return new StackFrame({\n functionName: line\n });\n } else {\n var functionNameRegex = /((.*\".+\"[^@]*)?[^@]*)(?:@)/;\n var matches = line.match(functionNameRegex);\n var functionName = matches && matches[1] ? matches[1] : undefined;\n var locationParts = this.extractLocation(line.replace(functionNameRegex, ''));\n\n return new StackFrame({\n functionName: functionName,\n fileName: locationParts[0],\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }\n }, this);\n },\n\n parseOpera: function ErrorStackParser$$parseOpera(e) {\n if (!e.stacktrace || (e.message.indexOf('\\n') > -1 &&\n e.message.split('\\n').length > e.stacktrace.split('\\n').length)) {\n return this.parseOpera9(e);\n } else if (!e.stack) {\n return this.parseOpera10(e);\n } else {\n return this.parseOpera11(e);\n }\n },\n\n parseOpera9: function ErrorStackParser$$parseOpera9(e) {\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)/i;\n var lines = e.message.split('\\n');\n var result = [];\n\n for (var i = 2, len = lines.length; i < len; i += 2) {\n var match = lineRE.exec(lines[i]);\n if (match) {\n result.push(new StackFrame({\n fileName: match[2],\n lineNumber: match[1],\n source: lines[i]\n }));\n }\n }\n\n return result;\n },\n\n parseOpera10: function ErrorStackParser$$parseOpera10(e) {\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)(?:: In function (\\S+))?$/i;\n var lines = e.stacktrace.split('\\n');\n var result = [];\n\n for (var i = 0, len = lines.length; i < len; i += 2) {\n var match = lineRE.exec(lines[i]);\n if (match) {\n result.push(\n new StackFrame({\n functionName: match[3] || undefined,\n fileName: match[2],\n lineNumber: match[1],\n source: lines[i]\n })\n );\n }\n }\n\n return result;\n },\n\n // Opera 10.65+ Error.stack very similar to FF/Safari\n parseOpera11: function ErrorStackParser$$parseOpera11(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !!line.match(FIREFOX_SAFARI_STACK_REGEXP) && !line.match(/^Error created at/);\n }, this);\n\n return filtered.map(function(line) {\n var tokens = line.split('@');\n var locationParts = this.extractLocation(tokens.pop());\n var functionCall = (tokens.shift() || '');\n var functionName = functionCall\n .replace(/<anonymous function(: (\\w+))?>/, '$2')\n .replace(/\\([^)]*\\)/g, '') || undefined;\n var argsRaw;\n if (functionCall.match(/\\(([^)]*)\\)/)) {\n argsRaw = functionCall.replace(/^[^(]+\\(([^)]*)\\)$/, '$1');\n }\n var args = (argsRaw === undefined || argsRaw === '[arguments not available]') ?\n undefined : argsRaw.split(',');\n\n return new StackFrame({\n functionName: functionName,\n args: args,\n fileName: locationParts[0],\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }, this);\n }\n };\n}));\n","(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('stackframe', [], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory();\n } else {\n root.StackFrame = factory();\n }\n}(this, function() {\n 'use strict';\n function _isNumber(n) {\n return !isNaN(parseFloat(n)) && isFinite(n);\n }\n\n function _capitalize(str) {\n return str.charAt(0).toUpperCase() + str.substring(1);\n }\n\n function _getter(p) {\n return function() {\n return this[p];\n };\n }\n\n var booleanProps = ['isConstructor', 'isEval', 'isNative', 'isToplevel'];\n var numericProps = ['columnNumber', 'lineNumber'];\n var stringProps = ['fileName', 'functionName', 'source'];\n var arrayProps = ['args'];\n\n var props = booleanProps.concat(numericProps, stringProps, arrayProps);\n\n function StackFrame(obj) {\n if (!obj) return;\n for (var i = 0; i < props.length; i++) {\n if (obj[props[i]] !== undefined) {\n this['set' + _capitalize(props[i])](obj[props[i]]);\n }\n }\n }\n\n StackFrame.prototype = {\n getArgs: function() {\n return this.args;\n },\n setArgs: function(v) {\n if (Object.prototype.toString.call(v) !== '[object Array]') {\n throw new TypeError('Args must be an Array');\n }\n this.args = v;\n },\n\n getEvalOrigin: function() {\n return this.evalOrigin;\n },\n setEvalOrigin: function(v) {\n if (v instanceof StackFrame) {\n this.evalOrigin = v;\n } else if (v instanceof Object) {\n this.evalOrigin = new StackFrame(v);\n } else {\n throw new TypeError('Eval Origin must be an Object or StackFrame');\n }\n },\n\n toString: function() {\n var fileName = this.getFileName() || '';\n var lineNumber = this.getLineNumber() || '';\n var columnNumber = this.getColumnNumber() || '';\n var functionName = this.getFunctionName() || '';\n if (this.getIsEval()) {\n if (fileName) {\n return '[eval] (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';\n }\n return '[eval]:' + lineNumber + ':' + columnNumber;\n }\n if (functionName) {\n return functionName + ' (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';\n }\n return fileName + ':' + lineNumber + ':' + columnNumber;\n }\n };\n\n StackFrame.fromString = function StackFrame$$fromString(str) {\n var argsStartIndex = str.indexOf('(');\n var argsEndIndex = str.lastIndexOf(')');\n\n var functionName = str.substring(0, argsStartIndex);\n var args = str.substring(argsStartIndex + 1, argsEndIndex).split(',');\n var locationString = str.substring(argsEndIndex + 1);\n\n if (locationString.indexOf('@') === 0) {\n var parts = /@(.+?)(?::(\\d+))?(?::(\\d+))?$/.exec(locationString, '');\n var fileName = parts[1];\n var lineNumber = parts[2];\n var columnNumber = parts[3];\n }\n\n return new StackFrame({\n functionName: functionName,\n args: args || undefined,\n fileName: fileName,\n lineNumber: lineNumber || undefined,\n columnNumber: columnNumber || undefined\n });\n };\n\n for (var i = 0; i < booleanProps.length; i++) {\n StackFrame.prototype['get' + _capitalize(booleanProps[i])] = _getter(booleanProps[i]);\n StackFrame.prototype['set' + _capitalize(booleanProps[i])] = (function(p) {\n return function(v) {\n this[p] = Boolean(v);\n };\n })(booleanProps[i]);\n }\n\n for (var j = 0; j < numericProps.length; j++) {\n StackFrame.prototype['get' + _capitalize(numericProps[j])] = _getter(numericProps[j]);\n StackFrame.prototype['set' + _capitalize(numericProps[j])] = (function(p) {\n return function(v) {\n if (!_isNumber(v)) {\n throw new TypeError(p + ' must be a Number');\n }\n this[p] = Number(v);\n };\n })(numericProps[j]);\n }\n\n for (var k = 0; k < stringProps.length; k++) {\n StackFrame.prototype['get' + _capitalize(stringProps[k])] = _getter(stringProps[k]);\n StackFrame.prototype['set' + _capitalize(stringProps[k])] = (function(p) {\n return function(v) {\n this[p] = String(v);\n };\n })(stringProps[k]);\n }\n\n return StackFrame;\n}));\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react.production.min.js');\n} else {\n module.exports = require('./cjs/react.development.js');\n}\n","/** @license React v0.0.0-experimental-9b8060041\n * react.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var l=require(\"object-assign\"),m=60103,p=60106;exports.Fragment=60107;exports.StrictMode=60108;exports.Profiler=60114;var q=60109,r=60110,t=60112;exports.Suspense=60113;exports.unstable_SuspenseList=60120;var u=60115,v=60116;exports.unstable_DebugTracingMode=60129;exports.unstable_LegacyHidden=60131;\nif(\"function\"===typeof Symbol&&Symbol.for){var w=Symbol.for;m=w(\"react.element\");p=w(\"react.portal\");exports.Fragment=w(\"react.fragment\");exports.StrictMode=w(\"react.strict_mode\");exports.Profiler=w(\"react.profiler\");q=w(\"react.provider\");r=w(\"react.context\");t=w(\"react.forward_ref\");exports.Suspense=w(\"react.suspense\");exports.unstable_SuspenseList=w(\"react.suspense_list\");u=w(\"react.memo\");v=w(\"react.lazy\");exports.unstable_DebugTracingMode=w(\"react.debug_trace_mode\");exports.unstable_LegacyHidden=\nw(\"react.legacy_hidden\")}var x=\"function\"===typeof Symbol&&Symbol.iterator;function y(a){if(null===a||\"object\"!==typeof a)return null;a=x&&a[x]||a[\"@@iterator\"];return\"function\"===typeof a?a:null}\nfunction z(a){for(var b=\"https://reactjs.org/docs/error-decoder.html?invariant=\"+a,c=1;c<arguments.length;c++)b+=\"&args[]=\"+encodeURIComponent(arguments[c]);return\"Minified React error #\"+a+\"; visit \"+b+\" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.\"}var A={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},B={};\nfunction C(a,b,c){this.props=a;this.context=b;this.refs=B;this.updater=c||A}C.prototype.isReactComponent={};C.prototype.setState=function(a,b){if(\"object\"!==typeof a&&\"function\"!==typeof a&&null!=a)throw Error(z(85));this.updater.enqueueSetState(this,a,b,\"setState\")};C.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,\"forceUpdate\")};function D(){}D.prototype=C.prototype;function E(a,b,c){this.props=a;this.context=b;this.refs=B;this.updater=c||A}var F=E.prototype=new D;\nF.constructor=E;l(F,C.prototype);F.isPureReactComponent=!0;var G={current:null},H=Object.prototype.hasOwnProperty,I={key:!0,ref:!0,__self:!0,__source:!0};\nfunction J(a,b,c){var e,d={},k=null,h=null;if(null!=b)for(e in void 0!==b.ref&&(h=b.ref),void 0!==b.key&&(k=\"\"+b.key),b)H.call(b,e)&&!I.hasOwnProperty(e)&&(d[e]=b[e]);var g=arguments.length-2;if(1===g)d.children=c;else if(1<g){for(var f=Array(g),n=0;n<g;n++)f[n]=arguments[n+2];d.children=f}if(a&&a.defaultProps)for(e in g=a.defaultProps,g)void 0===d[e]&&(d[e]=g[e]);return{$$typeof:m,type:a,key:k,ref:h,props:d,_owner:G.current}}\nfunction K(a,b){return{$$typeof:m,type:a.type,key:b,ref:a.ref,props:a.props,_owner:a._owner}}function L(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===m}function escape(a){var b={\"=\":\"=0\",\":\":\"=2\"};return\"$\"+a.replace(/[=:]/g,function(a){return b[a]})}var M=/\\/+/g;function N(a,b){return\"object\"===typeof a&&null!==a&&null!=a.key?escape(\"\"+a.key):b.toString(36)}\nfunction O(a,b,c,e,d){var k=typeof a;if(\"undefined\"===k||\"boolean\"===k)a=null;var h=!1;if(null===a)h=!0;else switch(k){case \"string\":case \"number\":h=!0;break;case \"object\":switch(a.$$typeof){case m:case p:h=!0}}if(h)return h=a,d=d(h),a=\"\"===e?\".\"+N(h,0):e,Array.isArray(d)?(c=\"\",null!=a&&(c=a.replace(M,\"$&/\")+\"/\"),O(d,b,c,\"\",function(a){return a})):null!=d&&(L(d)&&(d=K(d,c+(!d.key||h&&h.key===d.key?\"\":(\"\"+d.key).replace(M,\"$&/\")+\"/\")+a)),b.push(d)),1;h=0;e=\"\"===e?\".\":e+\":\";if(Array.isArray(a))for(var g=\n0;g<a.length;g++){k=a[g];var f=e+N(k,g);h+=O(k,b,c,f,d)}else if(f=y(a),\"function\"===typeof f)for(a=f.call(a),g=0;!(k=a.next()).done;)k=k.value,f=e+N(k,g++),h+=O(k,b,c,f,d);else if(\"object\"===k)throw b=\"\"+a,Error(z(31,\"[object Object]\"===b?\"object with keys {\"+Object.keys(a).join(\", \")+\"}\":b));return h}function P(a,b,c){if(null==a)return a;var e=[],d=0;O(a,e,\"\",\"\",function(a){return b.call(c,a,d++)});return e}\nfunction Q(a){if(-1===a._status){var b=a._result;b=b();a._status=0;a._result=b;b.then(function(b){0===a._status&&(b=b.default,a._status=1,a._result=b)},function(b){0===a._status&&(a._status=2,a._result=b)})}if(1===a._status)return a._result;throw a._result;}var R={current:null};function S(){var a=R.current;if(null===a)throw Error(z(321));return a}var T={transition:0},U={ReactCurrentDispatcher:R,ReactCurrentBatchConfig:T,ReactCurrentOwner:G,IsSomeRendererActing:{current:!1},assign:l};\nexports.Children={map:P,forEach:function(a,b,c){P(a,function(){b.apply(this,arguments)},c)},count:function(a){var b=0;P(a,function(){b++});return b},toArray:function(a){return P(a,function(a){return a})||[]},only:function(a){if(!L(a))throw Error(z(143));return a}};exports.Component=C;exports.PureComponent=E;exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=U;\nexports.cloneElement=function(a,b,c){if(null===a||void 0===a)throw Error(z(267,a));var e=l({},a.props),d=a.key,k=a.ref,h=a._owner;if(null!=b){void 0!==b.ref&&(k=b.ref,h=G.current);void 0!==b.key&&(d=\"\"+b.key);if(a.type&&a.type.defaultProps)var g=a.type.defaultProps;for(f in b)H.call(b,f)&&!I.hasOwnProperty(f)&&(e[f]=void 0===b[f]&&void 0!==g?g[f]:b[f])}var f=arguments.length-2;if(1===f)e.children=c;else if(1<f){g=Array(f);for(var n=0;n<f;n++)g[n]=arguments[n+2];e.children=g}return{$$typeof:m,type:a.type,\nkey:d,ref:k,props:e,_owner:h}};exports.createContext=function(a,b){void 0===b&&(b=null);a={$$typeof:r,_calculateChangedBits:b,_currentValue:a,_currentValue2:a,_threadCount:0,Provider:null,Consumer:null};a.Provider={$$typeof:q,_context:a};return a.Consumer=a};exports.createElement=J;exports.createFactory=function(a){var b=J.bind(null,a);b.type=a;return b};exports.createRef=function(){return{current:null}};exports.forwardRef=function(a){return{$$typeof:t,render:a}};exports.isValidElement=L;\nexports.lazy=function(a){return{$$typeof:v,_payload:{_status:-1,_result:a},_init:Q}};exports.memo=function(a,b){return{$$typeof:u,type:a,compare:void 0===b?null:b}};exports.unstable_createMutableSource=function(a,b){return{_getVersion:b,_source:a,_workInProgressVersionPrimary:null,_workInProgressVersionSecondary:null}};exports.unstable_getCacheForType=function(a){return S().getCacheForType(a)};\nexports.unstable_startTransition=function(a){var b=T.transition;T.transition=1;try{a()}finally{T.transition=b}};exports.unstable_useDeferredValue=function(a){return S().useDeferredValue(a)};exports.unstable_useMutableSource=function(a,b,c){return S().useMutableSource(a,b,c)};exports.unstable_useOpaqueIdentifier=function(){return S().useOpaqueIdentifier()};exports.unstable_useTransition=function(){return S().useTransition()};exports.useCallback=function(a,b){return S().useCallback(a,b)};\nexports.useContext=function(a,b){return S().useContext(a,b)};exports.useDebugValue=function(){};exports.useEffect=function(a,b){return S().useEffect(a,b)};exports.useImperativeHandle=function(a,b,c){return S().useImperativeHandle(a,b,c)};exports.useLayoutEffect=function(a,b){return S().useLayoutEffect(a,b)};exports.useMemo=function(a,b){return S().useMemo(a,b)};exports.useReducer=function(a,b,c){return S().useReducer(a,b,c)};exports.useRef=function(a){return S().useRef(a)};exports.useState=function(a){return S().useState(a)};\nexports.version=\"17.0.2-experimental-9b8060041\";\n","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n */\n\nexport default class EventEmitter<Events: Object> {\n listenersMap: Map<string, Array<Function>> = new Map();\n\n addListener<Event: $Keys<Events>>(\n event: Event,\n listener: (...$ElementType<Events, Event>) => any,\n ): void {\n const listeners = this.listenersMap.get(event);\n if (listeners === undefined) {\n this.listenersMap.set(event, [listener]);\n } else {\n const index = listeners.indexOf(listener);\n if (index < 0) {\n listeners.push(listener);\n }\n }\n }\n\n emit<Event: $Keys<Events>>(\n event: Event,\n ...args: $ElementType<Events, Event>\n ): void {\n const listeners = this.listenersMap.get(event);\n if (listeners !== undefined) {\n if (listeners.length === 1) {\n // No need to clone or try/catch\n const listener = listeners[0];\n listener.apply(null, args);\n } else {\n let didThrow = false;\n let caughtError = null;\n\n const clonedListeners = Array.from(listeners);\n for (let i = 0; i < clonedListeners.length; i++) {\n const listener = clonedListeners[i];\n try {\n listener.apply(null, args);\n } catch (error) {\n if (caughtError === null) {\n didThrow = true;\n caughtError = error;\n }\n }\n }\n\n if (didThrow) {\n throw caughtError;\n }\n }\n }\n }\n\n removeAllListeners(): void {\n this.listenersMap.clear();\n }\n\n removeListener(event: $Keys<Events>, listener: Function): void {\n const listeners = this.listenersMap.get(event);\n if (listeners !== undefined) {\n const index = listeners.indexOf(listener);\n if (index >= 0) {\n listeners.splice(index, 1);\n }\n }\n }\n}\n","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n */\n\n// Flip this flag to true to enable verbose console debug logging.\nexport const __DEBUG__ = false;\n\nexport const TREE_OPERATION_ADD = 1;\nexport const TREE_OPERATION_REMOVE = 2;\nexport const TREE_OPERATION_REORDER_CHILDREN = 3;\nexport const TREE_OPERATION_UPDATE_TREE_BASE_DURATION = 4;\n\nexport const LOCAL_STORAGE_FILTER_PREFERENCES_KEY =\n 'React::DevTools::componentFilters';\n\nexport const SESSION_STORAGE_LAST_SELECTION_KEY =\n 'React::DevTools::lastSelection';\n\nexport const SESSION_STORAGE_RECORD_CHANGE_DESCRIPTIONS_KEY =\n 'React::DevTools::recordChangeDescriptions';\n\nexport const SESSION_STORAGE_RELOAD_AND_PROFILE_KEY =\n 'React::DevTools::reloadAndProfile';\n\nexport const LOCAL_STORAGE_SHOULD_BREAK_ON_CONSOLE_ERRORS =\n 'React::DevTools::breakOnConsoleErrors';\n\nexport const LOCAL_STORAGE_SHOULD_PATCH_CONSOLE_KEY =\n 'React::DevTools::appendComponentStack';\n\nexport const LOCAL_STORAGE_TRACE_UPDATES_ENABLED_KEY =\n 'React::DevTools::traceUpdatesEnabled';\n\nexport const PROFILER_EXPORT_VERSION = 4;\n\nexport const CHANGE_LOG_URL =\n 'https://github.com/facebook/react/blob/master/packages/react-devtools/CHANGELOG.md';\n\nexport const UNSUPPORTED_VERSION_URL =\n 'https://reactjs.org/blog/2019/08/15/new-react-devtools.html#how-do-i-get-the-old-version-back';\n\n// HACK\n//\n// Extracting during build time avoids a temporarily invalid state for the inline target.\n// Sometimes the inline target is rendered before root styles are applied,\n// which would result in e.g. NaN itemSize being passed to react-window list.\n//\nlet COMFORTABLE_LINE_HEIGHT;\nlet COMPACT_LINE_HEIGHT;\n\ntry {\n // $FlowFixMe\n const rawStyleString = require('!!raw-loader!react-devtools-shared/src/devtools/views/root.css')\n .default;\n\n const extractVar = varName => {\n const regExp = new RegExp(`${varName}: ([0-9]+)`);\n const match = rawStyleString.match(regExp);\n return parseInt(match[1], 10);\n };\n\n COMFORTABLE_LINE_HEIGHT = extractVar('comfortable-line-height-data');\n COMPACT_LINE_HEIGHT = extractVar('compact-line-height-data');\n} catch (error) {\n // We can't use the Webpack loader syntax in the context of Jest,\n // so tests need some reasonably meaningful fallback value.\n COMFORTABLE_LINE_HEIGHT = 15;\n COMPACT_LINE_HEIGHT = 10;\n}\n\nexport {COMFORTABLE_LINE_HEIGHT, COMPACT_LINE_HEIGHT};\n","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n */\n\nexport function localStorageGetItem(key: string): any {\n try {\n return localStorage.getItem(key);\n } catch (error) {\n return null;\n }\n}\n\nexport function localStorageRemoveItem(key: string): void {\n try {\n localStorage.removeItem(key);\n } catch (error) {}\n}\n\nexport function localStorageSetItem(key: string, value: any): void {\n try {\n return localStorage.setItem(key, value);\n } catch (error) {}\n}\n\nexport function sessionStorageGetItem(key: string): any {\n try {\n return sessionStorage.getItem(key);\n } catch (error) {\n return null;\n }\n}\n\nexport function sessionStorageRemoveItem(key: string): void {\n try {\n sessionStorage.removeItem(key);\n } catch (error) {}\n}\n\nexport function sessionStorageSetItem(key: string, value: any): void {\n try {\n return sessionStorage.setItem(key, value);\n } catch (error) {}\n}\n","\n\nvar simpleIsEqual = function simpleIsEqual(a, b) {\n return a === b;\n};\n\nexport default function (resultFn) {\n var isEqual = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : simpleIsEqual;\n\n var lastThis = void 0;\n var lastArgs = [];\n var lastResult = void 0;\n var calledOnce = false;\n\n var isNewArgEqualToLast = function isNewArgEqualToLast(newArg, index) {\n return isEqual(newArg, lastArgs[index]);\n };\n\n var result = function result() {\n for (var _len = arguments.length, newArgs = Array(_len), _key = 0; _key < _len; _key++) {\n newArgs[_key] = arguments[_key];\n }\n\n if (calledOnce && lastThis === this && newArgs.length === lastArgs.length && newArgs.every(isNewArgEqualToLast)) {\n return lastResult;\n }\n\n calledOnce = true;\n lastThis = this;\n lastArgs = newArgs;\n lastResult = resultFn.apply(this, newArgs);\n return lastResult;\n };\n\n return result;\n}","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n */\n\nexport type Rect = {\n bottom: number,\n height: number,\n left: number,\n right: number,\n top: number,\n width: number,\n ...\n};\n\n// Get the window object for the document that a node belongs to,\n// or return null if it cannot be found (node not attached to DOM,\n// etc).\nexport function getOwnerWindow(node: HTMLElement): typeof window | null {\n if (!node.ownerDocument) {\n return null;\n }\n return node.ownerDocument.defaultView;\n}\n\n// Get the iframe containing a node, or return null if it cannot\n// be found (node not within iframe, etc).\nexport function getOwnerIframe(node: HTMLElement): HTMLElement | null {\n const nodeWindow = getOwnerWindow(node);\n if (nodeWindow) {\n return nodeWindow.frameElement;\n }\n return null;\n}\n\n// Get a bounding client rect for a node, with an\n// offset added to compensate for its border.\nexport function getBoundingClientRectWithBorderOffset(node: HTMLElement) {\n const dimensions = getElementDimensions(node);\n return mergeRectOffsets([\n node.getBoundingClientRect(),\n {\n top: dimensions.borderTop,\n left: dimensions.borderLeft,\n bottom: dimensions.borderBottom,\n right: dimensions.borderRight,\n // This width and height won't get used by mergeRectOffsets (since this\n // is not the first rect in the array), but we set them so that this\n // object typechecks as a ClientRect.\n width: 0,\n height: 0,\n },\n ]);\n}\n\n// Add together the top, left, bottom, and right properties of\n// each ClientRect, but keep the width and height of the first one.\nexport function mergeRectOffsets(rects: Array<Rect>): Rect {\n return rects.reduce((previousRect, rect) => {\n if (previousRect == null) {\n return rect;\n }\n\n return {\n top: previousRect.top + rect.top,\n left: previousRect.left + rect.left,\n width: previousRect.width,\n height: previousRect.height,\n bottom: previousRect.bottom + rect.bottom,\n right: previousRect.right + rect.right,\n };\n });\n}\n\n// Calculate a boundingClientRect for a node relative to boundaryWindow,\n// taking into account any offsets caused by intermediate iframes.\nexport function getNestedBoundingClientRect(\n node: HTMLElement,\n boundaryWindow: typeof window,\n): Rect {\n const ownerIframe = getOwnerIframe(node);\n if (ownerIframe && ownerIframe !== boundaryWindow) {\n const rects = [node.getBoundingClientRect()];\n let currentIframe = ownerIframe;\n let onlyOneMore = false;\n while (currentIframe) {\n const rect = getBoundingClientRectWithBorderOffset(currentIframe);\n rects.push(rect);\n currentIframe = getOwnerIframe(currentIframe);\n\n if (onlyOneMore) {\n break;\n }\n // We don't want to calculate iframe offsets upwards beyond\n // the iframe containing the boundaryWindow, but we\n // need to calculate the offset relative to the boundaryWindow.\n if (currentIframe && getOwnerWindow(currentIframe) === boundaryWindow) {\n onlyOneMore = true;\n }\n }\n\n return mergeRectOffsets(rects);\n } else {\n return node.getBoundingClientRect();\n }\n}\n\nexport function getElementDimensions(domElement: Element) {\n const calculatedStyle = window.getComputedStyle(domElement);\n return {\n borderLeft: parseInt(calculatedStyle.borderLeftWidth, 10),\n borderRight: parseInt(calculatedStyle.borderRightWidth, 10),\n borderTop: parseInt(calculatedStyle.borderTopWidth, 10),\n borderBottom: parseInt(calculatedStyle.borderBottomWidth, 10),\n marginLeft: parseInt(calculatedStyle.marginLeft, 10),\n marginRight: parseInt(calculatedStyle.marginRight, 10),\n marginTop: parseInt(calculatedStyle.marginTop, 10),\n marginBottom: parseInt(calculatedStyle.marginBottom, 10),\n paddingLeft: parseInt(calculatedStyle.paddingLeft, 10),\n paddingRight: parseInt(calculatedStyle.paddingRight, 10),\n paddingTop: parseInt(calculatedStyle.paddingTop, 10),\n paddingBottom: parseInt(calculatedStyle.paddingBottom, 10),\n };\n}\n","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n */\n\nimport assign from 'object-assign';\nimport {getElementDimensions, getNestedBoundingClientRect} from '../utils';\n\nimport type {DevToolsHook} from 'react-devtools-shared/src/backend/types';\nimport type {Rect} from '../utils';\n\ntype Box = {|top: number, left: number, width: number, height: number|};\n\n// Note that the Overlay components are not affected by the active Theme,\n// because they highlight elements in the main Chrome window (outside of devtools).\n// The colors below were chosen to roughly match those used by Chrome devtools.\n\nclass OverlayRect {\n node: HTMLElement;\n border: HTMLElement;\n padding: HTMLElement;\n content: HTMLElement;\n\n constructor(doc: Document, container: HTMLElement) {\n this.node = doc.createElement('div');\n this.border = doc.createElement('div');\n this.padding = doc.createElement('div');\n this.content = doc.createElement('div');\n\n this.border.style.borderColor = overlayStyles.border;\n this.padding.style.borderColor = overlayStyles.padding;\n this.content.style.backgroundColor = overlayStyles.background;\n\n assign(this.node.style, {\n borderColor: overlayStyles.margin,\n pointerEvents: 'none',\n position: 'fixed',\n });\n\n this.node.style.zIndex = '10000000';\n\n this.node.appendChild(this.border);\n this.border.appendChild(this.padding);\n this.padding.appendChild(this.content);\n container.appendChild(this.node);\n }\n\n remove() {\n if (this.node.parentNode) {\n this.node.parentNode.removeChild(this.node);\n }\n }\n\n update(box: Rect, dims: any) {\n boxWrap(dims, 'margin', this.node);\n boxWrap(dims, 'border', this.border);\n boxWrap(dims, 'padding', this.padding);\n\n assign(this.content.style, {\n height:\n box.height -\n dims.borderTop -\n dims.borderBottom -\n dims.paddingTop -\n dims.paddingBottom +\n 'px',\n width:\n box.width -\n dims.borderLeft -\n dims.borderRight -\n dims.paddingLeft -\n dims.paddingRight +\n 'px',\n });\n\n assign(this.node.style, {\n top: box.top - dims.marginTop + 'px',\n left: box.left - dims.marginLeft + 'px',\n });\n }\n}\n\nclass OverlayTip {\n tip: HTMLElement;\n nameSpan: HTMLElement;\n dimSpan: HTMLElement;\n\n constructor(doc: Document, container: HTMLElement) {\n this.tip = doc.createElement('div');\n assign(this.tip.style, {\n display: 'flex',\n flexFlow: 'row nowrap',\n backgroundColor: '#333740',\n borderRadius: '2px',\n fontFamily:\n '\"SFMono-Regular\", Consolas, \"Liberation Mono\", Menlo, Courier, monospace',\n fontWeight: 'bold',\n padding: '3px 5px',\n pointerEvents: 'none',\n position: 'fixed',\n fontSize: '12px',\n whiteSpace: 'nowrap',\n });\n\n this.nameSpan = doc.createElement('span');\n this.tip.appendChild(this.nameSpan);\n assign(this.nameSpan.style, {\n color: '#ee78e6',\n borderRight: '1px solid #aaaaaa',\n paddingRight: '0.5rem',\n marginRight: '0.5rem',\n });\n this.dimSpan = doc.createElement('span');\n this.tip.appendChild(this.dimSpan);\n assign(this.dimSpan.style, {\n color: '#d7d7d7',\n });\n\n this.tip.style.zIndex = '10000000';\n container.appendChild(this.tip);\n }\n\n remove() {\n if (this.tip.parentNode) {\n this.tip.parentNode.removeChild(this.tip);\n }\n }\n\n updateText(name: string, width: number, height: number) {\n this.nameSpan.textContent = name;\n this.dimSpan.textContent =\n Math.round(width) + 'px × ' + Math.round(height) + 'px';\n }\n\n updatePosition(dims: Box, bounds: Box) {\n const tipRect = this.tip.getBoundingClientRect();\n const tipPos = findTipPos(dims, bounds, {\n width: tipRect.width,\n height: tipRect.height,\n });\n assign(this.tip.style, tipPos.style);\n }\n}\n\nexport default class Overlay {\n window: window;\n tipBoundsWindow: window;\n container: HTMLElement;\n tip: OverlayTip;\n rects: Array<OverlayRect>;\n\n constructor() {\n // Find the root window, because overlays are positioned relative to it.\n const currentWindow = window.__REACT_DEVTOOLS_TARGET_WINDOW__ || window;\n this.window = currentWindow;\n\n // When opened in shells/dev, the tooltip should be bound by the app iframe, not by the topmost window.\n const tipBoundsWindow = window.__REACT_DEVTOOLS_TARGET_WINDOW__ || window;\n this.tipBoundsWindow = tipBoundsWindow;\n\n const doc = currentWindow.document;\n this.container = doc.createElement('div');\n this.container.style.zIndex = '10000000';\n\n this.tip = new OverlayTip(doc, this.container);\n this.rects = [];\n\n doc.body.appendChild(this.container);\n }\n\n remove() {\n this.tip.remove();\n this.rects.forEach(rect => {\n rect.remove();\n });\n this.rects.length = 0;\n if (this.container.parentNode) {\n this.container.parentNode.removeChild(this.container);\n }\n }\n\n inspect(nodes: Array<HTMLElement>, name?: ?string) {\n // We can't get the size of text nodes or comment nodes. React as of v15\n // heavily uses comment nodes to delimit text.\n const elements = nodes.filter(node => node.nodeType === Node.ELEMENT_NODE);\n\n while (this.rects.length > elements.length) {\n const rect = this.rects.pop();\n rect.remove();\n }\n if (elements.length === 0) {\n return;\n }\n\n while (this.rects.length < elements.length) {\n this.rects.push(new OverlayRect(this.window.document, this.container));\n }\n\n const outerBox = {\n top: Number.POSITIVE_INFINITY,\n right: Number.NEGATIVE_INFINITY,\n bottom: Number.NEGATIVE_INFINITY,\n left: Number.POSITIVE_INFINITY,\n };\n elements.forEach((element, index) => {\n const box = getNestedBoundingClientRect(element, this.window);\n const dims = getElementDimensions(element);\n\n outerBox.top = Math.min(outerBox.top, box.top - dims.marginTop);\n outerBox.right = Math.max(\n outerBox.right,\n box.left + box.width + dims.marginRight,\n );\n outerBox.bottom = Math.max(\n outerBox.bottom,\n box.top + box.height + dims.marginBottom,\n );\n outerBox.left = Math.min(outerBox.left, box.left - dims.marginLeft);\n\n const rect = this.rects[index];\n rect.update(box, dims);\n });\n\n if (!name) {\n name = elements[0].nodeName.toLowerCase();\n\n const node = elements[0];\n const hook: DevToolsHook =\n node.ownerDocument.defaultView.__REACT_DEVTOOLS_GLOBAL_HOOK__;\n if (hook != null && hook.rendererInterfaces != null) {\n let ownerName = null;\n // eslint-disable-next-line no-for-of-loops/no-for-of-loops\n for (const rendererInterface of hook.rendererInterfaces.values()) {\n const id = rendererInterface.getFiberIDForNative(node, true);\n if (id !== null) {\n ownerName = rendererInterface.getDisplayNameForFiberID(id, true);\n break;\n }\n }\n\n if (ownerName) {\n name += ' (in ' + ownerName + ')';\n }\n }\n }\n\n this.tip.updateText(\n name,\n outerBox.right - outerBox.left,\n outerBox.bottom - outerBox.top,\n );\n const tipBounds = getNestedBoundingClientRect(\n this.tipBoundsWindow.document.documentElement,\n this.window,\n );\n\n this.tip.updatePosition(\n {\n top: outerBox.top,\n left: outerBox.left,\n height: outerBox.bottom - outerBox.top,\n width: outerBox.right - outerBox.left,\n },\n {\n top: tipBounds.top + this.tipBoundsWindow.scrollY,\n left: tipBounds.left + this.tipBoundsWindow.scrollX,\n height: this.tipBoundsWindow.innerHeight,\n width: this.tipBoundsWindow.innerWidth,\n },\n );\n }\n}\n\nfunction findTipPos(dims, bounds, tipSize) {\n const tipHeight = Math.max(tipSize.height, 20);\n const tipWidth = Math.max(tipSize.width, 60);\n const margin = 5;\n\n let top;\n if (dims.top + dims.height + tipHeight <= bounds.top + bounds.height) {\n if (dims.top + dims.height < bounds.top + 0) {\n top = bounds.top + margin;\n } else {\n top = dims.top + dims.height + margin;\n }\n } else if (dims.top - tipHeight <= bounds.top + bounds.height) {\n if (dims.top - tipHeight - margin < bounds.top + margin) {\n top = bounds.top + margin;\n } else {\n top = dims.top - tipHeight - margin;\n }\n } else {\n top = bounds.top + bounds.height - tipHeight - margin;\n }\n\n let left = dims.left + margin;\n if (dims.left < bounds.left) {\n left = bounds.left + margin;\n }\n if (dims.left + tipWidth > bounds.left + bounds.width) {\n left = bounds.left + bounds.width - tipWidth - margin;\n }\n\n top += 'px';\n left += 'px';\n return {\n style: {top, left},\n };\n}\n\nfunction boxWrap(dims, what, node) {\n assign(node.style, {\n borderTopWidth: dims[what + 'Top'] + 'px',\n borderLeftWidth: dims[what + 'Left'] + 'px',\n borderRightWidth: dims[what + 'Right'] + 'px',\n borderBottomWidth: dims[what + 'Bottom'] + 'px',\n borderStyle: 'solid',\n });\n}\n\nconst overlayStyles = {\n background: 'rgba(120, 170, 210, 0.7)',\n padding: 'rgba(77, 200, 0, 0.3)',\n margin: 'rgba(255, 155, 0, 0.3)',\n border: 'rgba(255, 200, 50, 0.3)',\n};\n","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n */\n\nimport Overlay from './Overlay';\n\nconst SHOW_DURATION = 2000;\n\nlet timeoutID: TimeoutID | null = null;\nlet overlay: Overlay | null = null;\n\nexport function hideOverlay() {\n timeoutID = null;\n\n if (overlay !== null) {\n overlay.remove();\n overlay = null;\n }\n}\n\nexport function showOverlay(\n elements: Array<HTMLElement> | null,\n componentName: string | null,\n hideAfterTimeout: boolean,\n) {\n // TODO (npm-packages) Detect RN and support it somehow\n if (window.document == null) {\n return;\n }\n\n if (timeoutID !== null) {\n clearTimeout(timeoutID);\n }\n\n if (elements == null) {\n return;\n }\n\n if (overlay === null) {\n overlay = new Overlay();\n }\n\n overlay.inspect(elements, componentName);\n\n if (hideAfterTimeout) {\n timeoutID = setTimeout(hideOverlay, SHOW_DURATION);\n }\n}\n","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n */\n\nimport memoize from 'memoize-one';\nimport throttle from 'lodash.throttle';\nimport Agent from 'react-devtools-shared/src/backend/agent';\nimport {hideOverlay, showOverlay} from './Highlighter';\n\nimport type {BackendBridge} from 'react-devtools-shared/src/bridge';\n\n// This plug-in provides in-page highlighting of the selected element.\n// It is used by the browser extension nad the standalone DevTools shell (when connected to a browser).\n// It is not currently the mechanism used to highlight React Native views.\n// That is done by the React Native Inspector component.\n\nlet iframesListeningTo: Set<HTMLIFrameElement> = new Set();\n\nexport default function setupHighlighter(\n bridge: BackendBridge,\n agent: Agent,\n): void {\n bridge.addListener(\n 'clearNativeElementHighlight',\n clearNativeElementHighlight,\n );\n bridge.addListener('highlightNativeElement', highlightNativeElement);\n bridge.addListener('shutdown', stopInspectingNative);\n bridge.addListener('startInspectingNative', startInspectingNative);\n bridge.addListener('stopInspectingNative', stopInspectingNative);\n\n function startInspectingNative() {\n registerListenersOnWindow(window);\n }\n\n function registerListenersOnWindow(window) {\n // This plug-in may run in non-DOM environments (e.g. React Native).\n if (window && typeof window.addEventListener === 'function') {\n window.addEventListener('click', onClick, true);\n window.addEventListener('mousedown', onMouseEvent, true);\n window.addEventListener('mouseover', onMouseEvent, true);\n window.addEventListener('mouseup', onMouseEvent, true);\n window.addEventListener('pointerdown', onPointerDown, true);\n window.addEventListener('pointerover', onPointerOver, true);\n window.addEventListener('pointerup', onPointerUp, true);\n }\n }\n\n function stopInspectingNative() {\n hideOverlay();\n removeListenersOnWindow(window);\n iframesListeningTo.forEach(function(frame) {\n try {\n removeListenersOnWindow(frame.contentWindow);\n } catch (error) {\n // This can error when the iframe is on a cross-origin.\n }\n });\n iframesListeningTo = new Set();\n }\n\n function removeListenersOnWindow(window) {\n // This plug-in may run in non-DOM environments (e.g. React Native).\n if (window && typeof window.removeEventListener === 'function') {\n window.removeEventListener('click', onClick, true);\n window.removeEventListener('mousedown', onMouseEvent, true);\n window.removeEventListener('mouseover', onMouseEvent, true);\n window.removeEventListener('mouseup', onMouseEvent, true);\n window.removeEventListener('pointerdown', onPointerDown, true);\n window.removeEventListener('pointerover', onPointerOver, true);\n window.removeEventListener('pointerup', onPointerUp, true);\n }\n }\n\n function clearNativeElementHighlight() {\n hideOverlay();\n }\n\n function highlightNativeElement({\n displayName,\n hideAfterTimeout,\n id,\n openNativeElementsPanel,\n rendererID,\n scrollIntoView,\n }: {\n displayName: string | null,\n hideAfterTimeout: boolean,\n id: number,\n openNativeElementsPanel: boolean,\n rendererID: number,\n scrollIntoView: boolean,\n ...\n }) {\n const renderer = agent.rendererInterfaces[rendererID];\n if (renderer == null) {\n console.warn(`Invalid renderer id \"${rendererID}\" for element \"${id}\"`);\n }\n\n let nodes: ?Array<HTMLElement> = null;\n if (renderer != null) {\n nodes = ((renderer.findNativeNodesForFiberID(\n id,\n ): any): ?Array<HTMLElement>);\n }\n\n if (nodes != null && nodes[0] != null) {\n const node = nodes[0];\n if (scrollIntoView && typeof node.scrollIntoView === 'function') {\n // If the node isn't visible show it before highlighting it.\n // We may want to reconsider this; it might be a little disruptive.\n // $FlowFixMe Flow only knows about 'start' | 'end'\n node.scrollIntoView({block: 'nearest', inline: 'nearest'});\n }\n\n showOverlay(nodes, displayName, hideAfterTimeout);\n\n if (openNativeElementsPanel) {\n window.__REACT_DEVTOOLS_GLOBAL_HOOK__.$0 = node;\n bridge.send('syncSelectionToNativeElementsPanel');\n }\n } else {\n hideOverlay();\n }\n }\n\n function onClick(event: MouseEvent) {\n event.preventDefault();\n event.stopPropagation();\n\n stopInspectingNative();\n\n bridge.send('stopInspectingNative', true);\n }\n\n function onMouseEvent(event: MouseEvent) {\n event.preventDefault();\n event.stopPropagation();\n }\n\n function onPointerDown(event: MouseEvent) {\n event.preventDefault();\n event.stopPropagation();\n\n selectFiberForNode(((event.target: any): HTMLElement));\n }\n\n function onPointerOver(event: MouseEvent) {\n event.preventDefault();\n event.stopPropagation();\n\n const target = ((event.target: any): HTMLElement);\n\n if (target.tagName === 'IFRAME') {\n const iframe: HTMLIFrameElement = (target: any);\n try {\n if (!iframesListeningTo.has(iframe)) {\n const window = iframe.contentWindow;\n registerListenersOnWindow(window);\n iframesListeningTo.add(iframe);\n }\n } catch (error) {\n // This can error when the iframe is on a cross-origin.\n }\n }\n\n // Don't pass the name explicitly.\n // It will be inferred from DOM tag and Fiber owner.\n showOverlay([target], null, false);\n\n selectFiberForNode(target);\n }\n\n function onPointerUp(event: MouseEvent) {\n event.preventDefault();\n event.stopPropagation();\n }\n\n const selectFiberForNode = throttle(\n memoize((node: HTMLElement) => {\n const id = agent.getIDForNode(node);\n if (id !== null) {\n bridge.send('selectFiber', id);\n }\n }),\n 200,\n // Don't change the selection in the very first 200ms\n // because those are usually unintentional as you lift the cursor.\n {leading: false},\n );\n}\n","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n */\n\nimport type {Data} from './index';\nimport type {Rect} from '../utils';\nimport type {NativeType} from '../../types';\n\nconst OUTLINE_COLOR = '#f0f0f0';\n\n// Note these colors are in sync with DevTools Profiler chart colors.\nconst COLORS = [\n '#37afa9',\n '#63b19e',\n '#80b393',\n '#97b488',\n '#abb67d',\n '#beb771',\n '#cfb965',\n '#dfba57',\n '#efbb49',\n '#febc38',\n];\n\nlet canvas: HTMLCanvasElement | null = null;\n\nexport function draw(nodeToData: Map<NativeType, Data>): void {\n if (canvas === null) {\n initialize();\n }\n\n const canvasFlow: HTMLCanvasElement = ((canvas: any): HTMLCanvasElement);\n canvasFlow.width = window.innerWidth;\n canvasFlow.height = window.innerHeight;\n\n const context = canvasFlow.getContext('2d');\n context.clearRect(0, 0, canvasFlow.width, canvasFlow.height);\n\n nodeToData.forEach(({count, rect}) => {\n if (rect !== null) {\n const colorIndex = Math.min(COLORS.length - 1, count - 1);\n const color = COLORS[colorIndex];\n\n drawBorder(context, rect, color);\n }\n });\n}\n\nfunction drawBorder(\n context: CanvasRenderingContext2D,\n rect: Rect,\n color: string,\n): void {\n const {height, left, top, width} = rect;\n\n // outline\n context.lineWidth = 1;\n context.strokeStyle = OUTLINE_COLOR;\n\n context.strokeRect(left - 1, top - 1, width + 2, height + 2);\n\n // inset\n context.lineWidth = 1;\n context.strokeStyle = OUTLINE_COLOR;\n context.strokeRect(left + 1, top + 1, width - 1, height - 1);\n context.strokeStyle = color;\n\n context.setLineDash([0]);\n\n // border\n context.lineWidth = 1;\n context.strokeRect(left, top, width - 1, height - 1);\n\n context.setLineDash([0]);\n}\n\nexport function destroy(): void {\n if (canvas !== null) {\n if (canvas.parentNode != null) {\n canvas.parentNode.removeChild(canvas);\n }\n canvas = null;\n }\n}\n\nfunction initialize(): void {\n canvas = window.document.createElement('canvas');\n canvas.style.cssText = `\n xx-background-color: red;\n xx-opacity: 0.5;\n bottom: 0;\n left: 0;\n pointer-events: none;\n position: fixed;\n right: 0;\n top: 0;\n z-index: 1000000000;\n `;\n\n const root = window.document.documentElement;\n root.insertBefore(canvas, root.firstChild);\n}\n","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n */\n\nimport Agent from 'react-devtools-shared/src/backend/agent';\nimport {destroy as destroyCanvas, draw} from './canvas';\nimport {getNestedBoundingClientRect} from '../utils';\n\nimport type {NativeType} from '../../types';\nimport type {Rect} from '../utils';\n\n// How long the rect should be shown for?\nconst DISPLAY_DURATION = 250;\n\n// What's the longest we are willing to show the overlay for?\n// This can be important if we're getting a flurry of events (e.g. scroll update).\nconst MAX_DISPLAY_DURATION = 3000;\n\n// How long should a rect be considered valid for?\nconst REMEASUREMENT_AFTER_DURATION = 250;\n\n// Some environments (e.g. React Native / Hermes) don't support the performance API yet.\nconst getCurrentTime =\n typeof performance === 'object' && typeof performance.now === 'function'\n ? () => performance.now()\n : () => Date.now();\n\nexport type Data = {|\n count: number,\n expirationTime: number,\n lastMeasuredAt: number,\n rect: Rect | null,\n|};\n\nconst nodeToData: Map<NativeType, Data> = new Map();\n\nlet agent: Agent = ((null: any): Agent);\nlet drawAnimationFrameID: AnimationFrameID | null = null;\nlet isEnabled: boolean = false;\nlet redrawTimeoutID: TimeoutID | null = null;\n\nexport function initialize(injectedAgent: Agent): void {\n agent = injectedAgent;\n agent.addListener('traceUpdates', traceUpdates);\n}\n\nexport function toggleEnabled(value: boolean): void {\n isEnabled = value;\n\n if (!isEnabled) {\n nodeToData.clear();\n\n if (drawAnimationFrameID !== null) {\n cancelAnimationFrame(drawAnimationFrameID);\n drawAnimationFrameID = null;\n }\n\n if (redrawTimeoutID !== null) {\n clearTimeout(redrawTimeoutID);\n redrawTimeoutID = null;\n }\n\n destroyCanvas();\n }\n}\n\nfunction traceUpdates(nodes: Set<NativeType>): void {\n if (!isEnabled) {\n return;\n }\n\n nodes.forEach(node => {\n const data = nodeToData.get(node);\n const now = getCurrentTime();\n\n let lastMeasuredAt = data != null ? data.lastMeasuredAt : 0;\n let rect = data != null ? data.rect : null;\n if (rect === null || lastMeasuredAt + REMEASUREMENT_AFTER_DURATION < now) {\n lastMeasuredAt = now;\n rect = measureNode(node);\n }\n\n nodeToData.set(node, {\n count: data != null ? data.count + 1 : 1,\n expirationTime:\n data != null\n ? Math.min(\n now + MAX_DISPLAY_DURATION,\n data.expirationTime + DISPLAY_DURATION,\n )\n : now + DISPLAY_DURATION,\n lastMeasuredAt,\n rect,\n });\n });\n\n if (redrawTimeoutID !== null) {\n clearTimeout(redrawTimeoutID);\n redrawTimeoutID = null;\n }\n\n if (drawAnimationFrameID === null) {\n drawAnimationFrameID = requestAnimationFrame(prepareToDraw);\n }\n}\n\nfunction prepareToDraw(): void {\n drawAnimationFrameID = null;\n redrawTimeoutID = null;\n\n const now = getCurrentTime();\n let earliestExpiration = Number.MAX_VALUE;\n\n // Remove any items that have already expired.\n nodeToData.forEach((data, node) => {\n if (data.expirationTime < now) {\n nodeToData.delete(node);\n } else {\n earliestExpiration = Math.min(earliestExpiration, data.expirationTime);\n }\n });\n\n draw(nodeToData);\n\n if (earliestExpiration !== Number.MAX_VALUE) {\n redrawTimeoutID = setTimeout(prepareToDraw, earliestExpiration - now);\n }\n}\n\nfunction measureNode(node: Object): Rect | null {\n if (!node || typeof node.getBoundingClientRect !== 'function') {\n return null;\n }\n\n const currentWindow = window.__REACT_DEVTOOLS_TARGET_WINDOW__ || window;\n\n return getNestedBoundingClientRect(node, currentWindow);\n}\n","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n */\n\n// ATTENTION\n// When adding new symbols to this file,\n// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'\n\n// The Symbol used to tag the ReactElement-like types. If there is no native Symbol\n// nor polyfill, then a plain number is used for performance.\nexport let REACT_ELEMENT_TYPE = 0xeac7;\nexport let REACT_PORTAL_TYPE = 0xeaca;\nexport let REACT_FRAGMENT_TYPE = 0xeacb;\nexport let REACT_STRICT_MODE_TYPE = 0xeacc;\nexport let REACT_PROFILER_TYPE = 0xead2;\nexport let REACT_PROVIDER_TYPE = 0xeacd;\nexport let REACT_CONTEXT_TYPE = 0xeace;\nexport let REACT_FORWARD_REF_TYPE = 0xead0;\nexport let REACT_SUSPENSE_TYPE = 0xead1;\nexport let REACT_SUSPENSE_LIST_TYPE = 0xead8;\nexport let REACT_MEMO_TYPE = 0xead3;\nexport let REACT_LAZY_TYPE = 0xead4;\nexport let REACT_FUNDAMENTAL_TYPE = 0xead5;\nexport let REACT_SCOPE_TYPE = 0xead7;\nexport let REACT_OPAQUE_ID_TYPE = 0xeae0;\nexport let REACT_DEBUG_TRACING_MODE_TYPE = 0xeae1;\nexport let REACT_OFFSCREEN_TYPE = 0xeae2;\nexport let REACT_LEGACY_HIDDEN_TYPE = 0xeae3;\n\nif (typeof Symbol === 'function' && Symbol.for) {\n const symbolFor = Symbol.for;\n REACT_ELEMENT_TYPE = symbolFor('react.element');\n REACT_PORTAL_TYPE = symbolFor('react.portal');\n REACT_FRAGMENT_TYPE = symbolFor('react.fragment');\n REACT_STRICT_MODE_TYPE = symbolFor('react.strict_mode');\n REACT_PROFILER_TYPE = symbolFor('react.profiler');\n REACT_PROVIDER_TYPE = symbolFor('react.provider');\n REACT_CONTEXT_TYPE = symbolFor('react.context');\n REACT_FORWARD_REF_TYPE = symbolFor('react.forward_ref');\n REACT_SUSPENSE_TYPE = symbolFor('react.suspense');\n REACT_SUSPENSE_LIST_TYPE = symbolFor('react.suspense_list');\n REACT_MEMO_TYPE = symbolFor('react.memo');\n REACT_LAZY_TYPE = symbolFor('react.lazy');\n REACT_FUNDAMENTAL_TYPE = symbolFor('react.fundamental');\n REACT_SCOPE_TYPE = symbolFor('react.scope');\n REACT_OPAQUE_ID_TYPE = symbolFor('react.opaque.id');\n REACT_DEBUG_TRACING_MODE_TYPE = symbolFor('react.debug_trace_mode');\n REACT_OFFSCREEN_TYPE = symbolFor('react.offscreen');\n REACT_LEGACY_HIDDEN_TYPE = symbolFor('react.legacy_hidden');\n}\n\nconst MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\nconst FAUX_ITERATOR_SYMBOL = '@@iterator';\n\nexport function getIteratorFn(maybeIterable: ?any): ?() => ?Iterator<*> {\n if (maybeIterable === null || typeof maybeIterable !== 'object') {\n return null;\n }\n const maybeIterator =\n (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) ||\n maybeIterable[FAUX_ITERATOR_SYMBOL];\n if (typeof maybeIterator === 'function') {\n return maybeIterator;\n }\n return null;\n}\n","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n */\n\nimport {\n getDataType,\n getDisplayNameForReactElement,\n getAllEnumerableKeys,\n getInObject,\n formatDataForPreview,\n setInObject,\n} from './utils';\n\nimport type {DehydratedData} from 'react-devtools-shared/src/devtools/views/Components/types';\n\nexport const meta = {\n inspectable: Symbol('inspectable'),\n inspected: Symbol('inspected'),\n name: Symbol('name'),\n preview_long: Symbol('preview_long'),\n preview_short: Symbol('preview_short'),\n readonly: Symbol('readonly'),\n size: Symbol('size'),\n type: Symbol('type'),\n unserializable: Symbol('unserializable'),\n};\n\nexport type Dehydrated = {|\n inspectable: boolean,\n name: string | null,\n preview_long: string | null,\n preview_short: string | null,\n readonly?: boolean,\n size?: number,\n type: string,\n|};\n\n// Typed arrays and other complex iteratable objects (e.g. Map, Set, ImmutableJS) need special handling.\n// These objects can't be serialized without losing type information,\n// so a \"Unserializable\" type wrapper is used (with meta-data keys) to send nested values-\n// while preserving the original type and name.\nexport type Unserializable = {\n name: string | null,\n preview_long: string | null,\n preview_short: string | null,\n readonly?: boolean,\n size?: number,\n type: string,\n unserializable: boolean,\n ...\n};\n\n// This threshold determines the depth at which the bridge \"dehydrates\" nested data.\n// Dehydration means that we don't serialize the data for e.g. postMessage or stringify,\n// unless the frontend explicitly requests it (e.g. a user clicks to expand a props object).\n//\n// Reducing this threshold will improve the speed of initial component inspection,\n// but may decrease the responsiveness of expanding objects/arrays to inspect further.\nconst LEVEL_THRESHOLD = 2;\n\n/**\n * Generate the dehydrated metadata for complex object instances\n */\nfunction createDehydrated(\n type: string,\n inspectable: boolean,\n data: Object,\n cleaned: Array<Array<string | number>>,\n path: Array<string | number>,\n): Dehydrated {\n cleaned.push(path);\n\n const dehydrated: Dehydrated = {\n inspectable,\n type,\n preview_long: formatDataForPreview(data, true),\n preview_short: formatDataForPreview(data, false),\n name:\n !data.constructor || data.constructor.name === 'Object'\n ? ''\n : data.constructor.name,\n };\n\n if (type === 'array' || type === 'typed_array') {\n dehydrated.size = data.length;\n } else if (type === 'object') {\n dehydrated.size = Object.keys(data).length;\n }\n\n if (type === 'iterator' || type === 'typed_array') {\n dehydrated.readonly = true;\n }\n\n return dehydrated;\n}\n\n/**\n * Strip out complex data (instances, functions, and data nested > LEVEL_THRESHOLD levels deep).\n * The paths of the stripped out objects are appended to the `cleaned` list.\n * On the other side of the barrier, the cleaned list is used to \"re-hydrate\" the cleaned representation into\n * an object with symbols as attributes, so that a sanitized object can be distinguished from a normal object.\n *\n * Input: {\"some\": {\"attr\": fn()}, \"other\": AnInstance}\n * Output: {\n * \"some\": {\n * \"attr\": {\"name\": the fn.name, type: \"function\"}\n * },\n * \"other\": {\n * \"name\": \"AnInstance\",\n * \"type\": \"object\",\n * },\n * }\n * and cleaned = [[\"some\", \"attr\"], [\"other\"]]\n */\nexport function dehydrate(\n data: Object,\n cleaned: Array<Array<string | number>>,\n unserializable: Array<Array<string | number>>,\n path: Array<string | number>,\n isPathAllowed: (path: Array<string | number>) => boolean,\n level?: number = 0,\n):\n | string\n | Dehydrated\n | Unserializable\n | Array<Dehydrated>\n | Array<Unserializable>\n | {[key: string]: string | Dehydrated | Unserializable, ...} {\n const type = getDataType(data);\n\n let isPathAllowedCheck;\n\n switch (type) {\n case 'html_element':\n cleaned.push(path);\n return {\n inspectable: false,\n preview_short: formatDataForPreview(data, false),\n preview_long: formatDataForPreview(data, true),\n name: data.tagName,\n type,\n };\n\n case 'function':\n cleaned.push(path);\n return {\n inspectable: false,\n preview_short: formatDataForPreview(data, false),\n preview_long: formatDataForPreview(data, true),\n name:\n typeof data.name === 'function' || !data.name\n ? 'function'\n : data.name,\n type,\n };\n\n case 'string':\n return data.length <= 500 ? data : data.slice(0, 500) + '...';\n\n case 'bigint':\n cleaned.push(path);\n return {\n inspectable: false,\n preview_short: formatDataForPreview(data, false),\n preview_long: formatDataForPreview(data, true),\n name: data.toString(),\n type,\n };\n\n case 'symbol':\n cleaned.push(path);\n return {\n inspectable: false,\n preview_short: formatDataForPreview(data, false),\n preview_long: formatDataForPreview(data, true),\n name: data.toString(),\n type,\n };\n\n // React Elements aren't very inspector-friendly,\n // and often contain private fields or circular references.\n case 'react_element':\n cleaned.push(path);\n return {\n inspectable: false,\n preview_short: formatDataForPreview(data, false),\n preview_long: formatDataForPreview(data, true),\n name: getDisplayNameForReactElement(data) || 'Unknown',\n type,\n };\n\n // ArrayBuffers error if you try to inspect them.\n case 'array_buffer':\n case 'data_view':\n cleaned.push(path);\n return {\n inspectable: false,\n preview_short: formatDataForPreview(data, false),\n preview_long: formatDataForPreview(data, true),\n name: type === 'data_view' ? 'DataView' : 'ArrayBuffer',\n size: data.byteLength,\n type,\n };\n\n case 'array':\n isPathAllowedCheck = isPathAllowed(path);\n if (level >= LEVEL_THRESHOLD && !isPathAllowedCheck) {\n return createDehydrated(type, true, data, cleaned, path);\n }\n return data.map((item, i) =>\n dehydrate(\n item,\n cleaned,\n unserializable,\n path.concat([i]),\n isPathAllowed,\n isPathAllowedCheck ? 1 : level + 1,\n ),\n );\n\n case 'html_all_collection':\n case 'typed_array':\n case 'iterator':\n isPathAllowedCheck = isPathAllowed(path);\n if (level >= LEVEL_THRESHOLD && !isPathAllowedCheck) {\n return createDehydrated(type, true, data, cleaned, path);\n } else {\n const unserializableValue: Unserializable = {\n unserializable: true,\n type: type,\n readonly: true,\n size: type === 'typed_array' ? data.length : undefined,\n preview_short: formatDataForPreview(data, false),\n preview_long: formatDataForPreview(data, true),\n name:\n !data.constructor || data.constructor.name === 'Object'\n ? ''\n : data.constructor.name,\n };\n\n if (typeof data[Symbol.iterator]) {\n // TRICKY\n // Don't use [...spread] syntax for this purpose.\n // This project uses @babel/plugin-transform-spread in \"loose\" mode which only works with Array values.\n // Other types (e.g. typed arrays, Sets) will not spread correctly.\n Array.from(data).forEach(\n (item, i) =>\n (unserializableValue[i] = dehydrate(\n item,\n cleaned,\n unserializable,\n path.concat([i]),\n isPathAllowed,\n isPathAllowedCheck ? 1 : level + 1,\n )),\n );\n }\n\n unserializable.push(path);\n\n return unserializableValue;\n }\n\n case 'opaque_iterator':\n cleaned.push(path);\n return {\n inspectable: false,\n preview_short: formatDataForPreview(data, false),\n preview_long: formatDataForPreview(data, true),\n name: data[Symbol.toStringTag],\n type,\n };\n\n case 'date':\n cleaned.push(path);\n return {\n inspectable: false,\n preview_short: formatDataForPreview(data, false),\n preview_long: formatDataForPreview(data, true),\n name: data.toString(),\n type,\n };\n\n case 'regexp':\n cleaned.push(path);\n return {\n inspectable: false,\n preview_short: formatDataForPreview(data, false),\n preview_long: formatDataForPreview(data, true),\n name: data.toString(),\n type,\n };\n\n case 'object':\n isPathAllowedCheck = isPathAllowed(path);\n if (level >= LEVEL_THRESHOLD && !isPathAllowedCheck) {\n return createDehydrated(type, true, data, cleaned, path);\n } else {\n const object = {};\n getAllEnumerableKeys(data).forEach(key => {\n const name = key.toString();\n object[name] = dehydrate(\n data[key],\n cleaned,\n unserializable,\n path.concat([name]),\n isPathAllowed,\n isPathAllowedCheck ? 1 : level + 1,\n );\n });\n return object;\n }\n\n case 'infinity':\n case 'nan':\n case 'undefined':\n // Some values are lossy when sent through a WebSocket.\n // We dehydrate+rehydrate them to preserve their type.\n cleaned.push(path);\n return {\n type,\n };\n\n default:\n return data;\n }\n}\n\nexport function fillInPath(\n object: Object,\n data: DehydratedData,\n path: Array<string | number>,\n value: any,\n) {\n const target = getInObject(object, path);\n if (target != null) {\n if (!target[meta.unserializable]) {\n delete target[meta.inspectable];\n delete target[meta.inspected];\n delete target[meta.name];\n delete target[meta.preview_long];\n delete target[meta.preview_short];\n delete target[meta.readonly];\n delete target[meta.size];\n delete target[meta.type];\n }\n }\n\n if (value !== null && data.unserializable.length > 0) {\n const unserializablePath = data.unserializable[0];\n let isMatch = unserializablePath.length === path.length;\n for (let i = 0; i < path.length; i++) {\n if (path[i] !== unserializablePath[i]) {\n isMatch = false;\n break;\n }\n }\n if (isMatch) {\n upgradeUnserializable(value, value);\n }\n }\n\n setInObject(object, path, value);\n}\n\nexport function hydrate(\n object: any,\n cleaned: Array<Array<string | number>>,\n unserializable: Array<Array<string | number>>,\n): Object {\n cleaned.forEach((path: Array<string | number>) => {\n const length = path.length;\n const last = path[length - 1];\n const parent = getInObject(object, path.slice(0, length - 1));\n if (!parent || !parent.hasOwnProperty(last)) {\n return;\n }\n\n const value = parent[last];\n\n if (value.type === 'infinity') {\n parent[last] = Infinity;\n } else if (value.type === 'nan') {\n parent[last] = NaN;\n } else if (value.type === 'undefined') {\n parent[last] = undefined;\n } else {\n // Replace the string keys with Symbols so they're non-enumerable.\n const replaced: {[key: Symbol]: boolean | string, ...} = {};\n replaced[meta.inspectable] = !!value.inspectable;\n replaced[meta.inspected] = false;\n replaced[meta.name] = value.name;\n replaced[meta.preview_long] = value.preview_long;\n replaced[meta.preview_short] = value.preview_short;\n replaced[meta.size] = value.size;\n replaced[meta.readonly] = !!value.readonly;\n replaced[meta.type] = value.type;\n\n parent[last] = replaced;\n }\n });\n unserializable.forEach((path: Array<string | number>) => {\n const length = path.length;\n const last = path[length - 1];\n const parent = getInObject(object, path.slice(0, length - 1));\n if (!parent || !parent.hasOwnProperty(last)) {\n return;\n }\n\n const node = parent[last];\n\n const replacement = {\n ...node,\n };\n\n upgradeUnserializable(replacement, node);\n\n parent[last] = replacement;\n });\n return object;\n}\n\nfunction upgradeUnserializable(destination: Object, source: Object) {\n Object.defineProperties(destination, {\n [meta.inspected]: {\n configurable: true,\n enumerable: false,\n value: !!source.inspected,\n },\n [meta.name]: {\n configurable: true,\n enumerable: false,\n value: source.name,\n },\n [meta.preview_long]: {\n configurable: true,\n enumerable: false,\n value: source.preview_long,\n },\n [meta.preview_short]: {\n configurable: true,\n enumerable: false,\n value: source.preview_short,\n },\n [meta.size]: {\n configurable: true,\n enumerable: false,\n value: source.size,\n },\n [meta.readonly]: {\n configurable: true,\n enumerable: false,\n value: !!source.readonly,\n },\n [meta.type]: {\n configurable: true,\n enumerable: false,\n value: source.type,\n },\n [meta.unserializable]: {\n configurable: true,\n enumerable: false,\n value: !!source.unserializable,\n },\n });\n\n delete destination.inspected;\n delete destination.name;\n delete destination.preview_long;\n delete destination.preview_short;\n delete destination.size;\n delete destination.readonly;\n delete destination.type;\n delete destination.unserializable;\n}\n","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n */\n\nimport LRU from 'lru-cache';\nimport {\n isElement,\n typeOf,\n ContextConsumer,\n ContextProvider,\n ForwardRef,\n Fragment,\n Lazy,\n Memo,\n Portal,\n Profiler,\n StrictMode,\n Suspense,\n} from 'react-is';\nimport {REACT_SUSPENSE_LIST_TYPE as SuspenseList} from 'shared/ReactSymbols';\nimport {\n TREE_OPERATION_ADD,\n TREE_OPERATION_REMOVE,\n TREE_OPERATION_REORDER_CHILDREN,\n TREE_OPERATION_UPDATE_TREE_BASE_DURATION,\n} from './constants';\nimport {ElementTypeRoot} from 'react-devtools-shared/src/types';\nimport {\n LOCAL_STORAGE_FILTER_PREFERENCES_KEY,\n LOCAL_STORAGE_SHOULD_BREAK_ON_CONSOLE_ERRORS,\n LOCAL_STORAGE_SHOULD_PATCH_CONSOLE_KEY,\n} from './constants';\nimport {ComponentFilterElementType, ElementTypeHostComponent} from './types';\nimport {\n ElementTypeClass,\n ElementTypeForwardRef,\n ElementTypeFunction,\n ElementTypeMemo,\n} from 'react-devtools-shared/src/types';\nimport {localStorageGetItem, localStorageSetItem} from './storage';\nimport {meta} from './hydration';\nimport type {ComponentFilter, ElementType} from './types';\n\nconst cachedDisplayNames: WeakMap<Function, string> = new WeakMap();\n\n// On large trees, encoding takes significant time.\n// Try to reuse the already encoded strings.\nconst encodedStringCache = new LRU({max: 1000});\n\nexport function alphaSortKeys(\n a: string | number | Symbol,\n b: string | number | Symbol,\n): number {\n if (a.toString() > b.toString()) {\n return 1;\n } else if (b.toString() > a.toString()) {\n return -1;\n } else {\n return 0;\n }\n}\n\nexport function getAllEnumerableKeys(\n obj: Object,\n): Array<string | number | Symbol> {\n const keys = [];\n let current = obj;\n while (current != null) {\n const currentKeys = [\n ...Object.keys(current),\n ...Object.getOwnPropertySymbols(current),\n ];\n const descriptors = Object.getOwnPropertyDescriptors(current);\n currentKeys.forEach(key => {\n // $FlowFixMe: key can be a Symbol https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/getOwnPropertyDescriptor\n if (descriptors[key].enumerable) {\n keys.push(key);\n }\n });\n current = Object.getPrototypeOf(current);\n }\n return keys;\n}\n\nexport function getDisplayName(\n type: Function,\n fallbackName: string = 'Anonymous',\n): string {\n const nameFromCache = cachedDisplayNames.get(type);\n if (nameFromCache != null) {\n return nameFromCache;\n }\n\n let displayName = fallbackName;\n\n // The displayName property is not guaranteed to be a string.\n // It's only safe to use for our purposes if it's a string.\n // github.com/facebook/react-devtools/issues/803\n if (typeof type.displayName === 'string') {\n displayName = type.displayName;\n } else if (typeof type.name === 'string' && type.name !== '') {\n displayName = type.name;\n }\n\n cachedDisplayNames.set(type, displayName);\n return displayName;\n}\n\nlet uidCounter: number = 0;\n\nexport function getUID(): number {\n return ++uidCounter;\n}\n\nexport function utfDecodeString(array: Array<number>): string {\n return String.fromCodePoint(...array);\n}\n\nexport function utfEncodeString(string: string): Array<number> {\n const cached = encodedStringCache.get(string);\n if (cached !== undefined) {\n return cached;\n }\n\n const encoded = new Array(string.length);\n for (let i = 0; i < string.length; i++) {\n encoded[i] = string.codePointAt(i);\n }\n encodedStringCache.set(string, encoded);\n return encoded;\n}\n\nexport function printOperationsArray(operations: Array<number>) {\n // The first two values are always rendererID and rootID\n const rendererID = operations[0];\n const rootID = operations[1];\n\n const logs = [`operations for renderer:${rendererID} and root:${rootID}`];\n\n let i = 2;\n\n // Reassemble the string table.\n const stringTable = [\n null, // ID = 0 corresponds to the null string.\n ];\n const stringTableSize = operations[i++];\n const stringTableEnd = i + stringTableSize;\n while (i < stringTableEnd) {\n const nextLength = operations[i++];\n const nextString = utfDecodeString(\n (operations.slice(i, i + nextLength): any),\n );\n stringTable.push(nextString);\n i += nextLength;\n }\n\n while (i < operations.length) {\n const operation = operations[i];\n\n switch (operation) {\n case TREE_OPERATION_ADD: {\n const id = ((operations[i + 1]: any): number);\n const type = ((operations[i + 2]: any): ElementType);\n\n i += 3;\n\n if (type === ElementTypeRoot) {\n logs.push(`Add new root node ${id}`);\n\n i++; // supportsProfiling\n i++; // hasOwnerMetadata\n } else {\n const parentID = ((operations[i]: any): number);\n i++;\n\n i++; // ownerID\n\n const displayNameStringID = operations[i];\n const displayName = stringTable[displayNameStringID];\n i++;\n\n i++; // key\n\n logs.push(\n `Add node ${id} (${displayName || 'null'}) as child of ${parentID}`,\n );\n }\n break;\n }\n case TREE_OPERATION_REMOVE: {\n const removeLength = ((operations[i + 1]: any): number);\n i += 2;\n\n for (let removeIndex = 0; removeIndex < removeLength; removeIndex++) {\n const id = ((operations[i]: any): number);\n i += 1;\n\n logs.push(`Remove node ${id}`);\n }\n break;\n }\n case TREE_OPERATION_REORDER_CHILDREN: {\n const id = ((operations[i + 1]: any): number);\n const numChildren = ((operations[i + 2]: any): number);\n i += 3;\n const children = operations.slice(i, i + numChildren);\n i += numChildren;\n\n logs.push(`Re-order node ${id} children ${children.join(',')}`);\n break;\n }\n case TREE_OPERATION_UPDATE_TREE_BASE_DURATION:\n // Base duration updates are only sent while profiling is in progress.\n // We can ignore them at this point.\n // The profiler UI uses them lazily in order to generate the tree.\n i += 3;\n break;\n default:\n throw Error(`Unsupported Bridge operation ${operation}`);\n }\n }\n\n console.log(logs.join('\\n '));\n}\n\nexport function getDefaultComponentFilters(): Array<ComponentFilter> {\n return [\n {\n type: ComponentFilterElementType,\n value: ElementTypeHostComponent,\n isEnabled: true,\n },\n ];\n}\n\nexport function getSavedComponentFilters(): Array<ComponentFilter> {\n try {\n const raw = localStorageGetItem(LOCAL_STORAGE_FILTER_PREFERENCES_KEY);\n if (raw != null) {\n return JSON.parse(raw);\n }\n } catch (error) {}\n return getDefaultComponentFilters();\n}\n\nexport function saveComponentFilters(\n componentFilters: Array<ComponentFilter>,\n): void {\n localStorageSetItem(\n LOCAL_STORAGE_FILTER_PREFERENCES_KEY,\n JSON.stringify(componentFilters),\n );\n}\n\nexport function getAppendComponentStack(): boolean {\n try {\n const raw = localStorageGetItem(LOCAL_STORAGE_SHOULD_PATCH_CONSOLE_KEY);\n if (raw != null) {\n return JSON.parse(raw);\n }\n } catch (error) {}\n return true;\n}\n\nexport function setAppendComponentStack(value: boolean): void {\n localStorageSetItem(\n LOCAL_STORAGE_SHOULD_PATCH_CONSOLE_KEY,\n JSON.stringify(value),\n );\n}\n\nexport function getBreakOnConsoleErrors(): boolean {\n try {\n const raw = localStorageGetItem(\n LOCAL_STORAGE_SHOULD_BREAK_ON_CONSOLE_ERRORS,\n );\n if (raw != null) {\n return JSON.parse(raw);\n }\n } catch (error) {}\n return false;\n}\n\nexport function setBreakOnConsoleErrors(value: boolean): void {\n localStorageSetItem(\n LOCAL_STORAGE_SHOULD_BREAK_ON_CONSOLE_ERRORS,\n JSON.stringify(value),\n );\n}\n\nexport function separateDisplayNameAndHOCs(\n displayName: string | null,\n type: ElementType,\n): [string | null, Array<string> | null] {\n if (displayName === null) {\n return [null, null];\n }\n\n let hocDisplayNames = null;\n\n switch (type) {\n case ElementTypeClass:\n case ElementTypeForwardRef:\n case ElementTypeFunction:\n case ElementTypeMemo:\n if (displayName.indexOf('(') >= 0) {\n const matches = displayName.match(/[^()]+/g);\n if (matches != null) {\n displayName = matches.pop();\n hocDisplayNames = matches;\n }\n }\n break;\n default:\n break;\n }\n\n if (type === ElementTypeMemo) {\n if (hocDisplayNames === null) {\n hocDisplayNames = ['Memo'];\n } else {\n hocDisplayNames.unshift('Memo');\n }\n } else if (type === ElementTypeForwardRef) {\n if (hocDisplayNames === null) {\n hocDisplayNames = ['ForwardRef'];\n } else {\n hocDisplayNames.unshift('ForwardRef');\n }\n }\n\n return [displayName, hocDisplayNames];\n}\n\n// Pulled from react-compat\n// https://github.com/developit/preact-compat/blob/7c5de00e7c85e2ffd011bf3af02899b63f699d3a/src/index.js#L349\nexport function shallowDiffers(prev: Object, next: Object): boolean {\n for (const attribute in prev) {\n if (!(attribute in next)) {\n return true;\n }\n }\n for (const attribute in next) {\n if (prev[attribute] !== next[attribute]) {\n return true;\n }\n }\n return false;\n}\n\nexport function getInObject(object: Object, path: Array<string | number>): any {\n return path.reduce((reduced: Object, attr: any): any => {\n if (reduced) {\n if (hasOwnProperty.call(reduced, attr)) {\n return reduced[attr];\n }\n if (typeof reduced[Symbol.iterator] === 'function') {\n // Convert iterable to array and return array[index]\n //\n // TRICKY\n // Don't use [...spread] syntax for this purpose.\n // This project uses @babel/plugin-transform-spread in \"loose\" mode which only works with Array values.\n // Other types (e.g. typed arrays, Sets) will not spread correctly.\n return Array.from(reduced)[attr];\n }\n }\n\n return null;\n }, object);\n}\n\nexport function deletePathInObject(\n object: Object,\n path: Array<string | number>,\n) {\n const length = path.length;\n const last = path[length - 1];\n if (object != null) {\n const parent = getInObject(object, path.slice(0, length - 1));\n if (parent) {\n if (Array.isArray(parent)) {\n parent.splice(((last: any): number), 1);\n } else {\n delete parent[last];\n }\n }\n }\n}\n\nexport function renamePathInObject(\n object: Object,\n oldPath: Array<string | number>,\n newPath: Array<string | number>,\n) {\n const length = oldPath.length;\n if (object != null) {\n const parent = getInObject(object, oldPath.slice(0, length - 1));\n if (parent) {\n const lastOld = oldPath[length - 1];\n const lastNew = newPath[length - 1];\n parent[lastNew] = parent[lastOld];\n if (Array.isArray(parent)) {\n parent.splice(((lastOld: any): number), 1);\n } else {\n delete parent[lastOld];\n }\n }\n }\n}\n\nexport function setInObject(\n object: Object,\n path: Array<string | number>,\n value: any,\n) {\n const length = path.length;\n const last = path[length - 1];\n if (object != null) {\n const parent = getInObject(object, path.slice(0, length - 1));\n if (parent) {\n parent[last] = value;\n }\n }\n}\n\nexport type DataType =\n | 'array'\n | 'array_buffer'\n | 'bigint'\n | 'boolean'\n | 'data_view'\n | 'date'\n | 'function'\n | 'html_all_collection'\n | 'html_element'\n | 'infinity'\n | 'iterator'\n | 'opaque_iterator'\n | 'nan'\n | 'null'\n | 'number'\n | 'object'\n | 'react_element'\n | 'regexp'\n | 'string'\n | 'symbol'\n | 'typed_array'\n | 'undefined'\n | 'unknown';\n\n/**\n * Get a enhanced/artificial type string based on the object instance\n */\nexport function getDataType(data: Object): DataType {\n if (data === null) {\n return 'null';\n } else if (data === undefined) {\n return 'undefined';\n }\n\n if (isElement(data)) {\n return 'react_element';\n }\n\n if (typeof HTMLElement !== 'undefined' && data instanceof HTMLElement) {\n return 'html_element';\n }\n\n const type = typeof data;\n switch (type) {\n case 'bigint':\n return 'bigint';\n case 'boolean':\n return 'boolean';\n case 'function':\n return 'function';\n case 'number':\n if (Number.isNaN(data)) {\n return 'nan';\n } else if (!Number.isFinite(data)) {\n return 'infinity';\n } else {\n return 'number';\n }\n case 'object':\n if (Array.isArray(data)) {\n return 'array';\n } else if (ArrayBuffer.isView(data)) {\n return hasOwnProperty.call(data.constructor, 'BYTES_PER_ELEMENT')\n ? 'typed_array'\n : 'data_view';\n } else if (data.constructor && data.constructor.name === 'ArrayBuffer') {\n // HACK This ArrayBuffer check is gross; is there a better way?\n // We could try to create a new DataView with the value.\n // If it doesn't error, we know it's an ArrayBuffer,\n // but this seems kind of awkward and expensive.\n return 'array_buffer';\n } else if (typeof data[Symbol.iterator] === 'function') {\n return data[Symbol.iterator]() === data\n ? 'opaque_iterator'\n : 'iterator';\n } else if (data.constructor && data.constructor.name === 'RegExp') {\n return 'regexp';\n } else {\n const toStringValue = Object.prototype.toString.call(data);\n if (toStringValue === '[object Date]') {\n return 'date';\n } else if (toStringValue === '[object HTMLAllCollection]') {\n return 'html_all_collection';\n }\n }\n return 'object';\n case 'string':\n return 'string';\n case 'symbol':\n return 'symbol';\n case 'undefined':\n if (\n Object.prototype.toString.call(data) === '[object HTMLAllCollection]'\n ) {\n return 'html_all_collection';\n }\n return 'undefined';\n default:\n return 'unknown';\n }\n}\n\nexport function getDisplayNameForReactElement(\n element: React$Element<any>,\n): string | null {\n const elementType = typeOf(element);\n switch (elementType) {\n case ContextConsumer:\n return 'ContextConsumer';\n case ContextProvider:\n return 'ContextProvider';\n case ForwardRef:\n return 'ForwardRef';\n case Fragment:\n return 'Fragment';\n case Lazy:\n return 'Lazy';\n case Memo:\n return 'Memo';\n case Portal:\n return 'Portal';\n case Profiler:\n return 'Profiler';\n case StrictMode:\n return 'StrictMode';\n case Suspense:\n return 'Suspense';\n case SuspenseList:\n return 'SuspenseList';\n default:\n const {type} = element;\n if (typeof type === 'string') {\n return type;\n } else if (typeof type === 'function') {\n return getDisplayName(type, 'Anonymous');\n } else if (type != null) {\n return 'NotImplementedInDevtools';\n } else {\n return 'Element';\n }\n }\n}\n\nconst MAX_PREVIEW_STRING_LENGTH = 50;\n\nfunction truncateForDisplay(\n string: string,\n length: number = MAX_PREVIEW_STRING_LENGTH,\n) {\n if (string.length > length) {\n return string.substr(0, length) + '…';\n } else {\n return string;\n }\n}\n\n// Attempts to mimic Chrome's inline preview for values.\n// For example, the following value...\n// {\n// foo: 123,\n// bar: \"abc\",\n// baz: [true, false],\n// qux: { ab: 1, cd: 2 }\n// };\n//\n// Would show a preview of...\n// {foo: 123, bar: \"abc\", baz: Array(2), qux: {…}}\n//\n// And the following value...\n// [\n// 123,\n// \"abc\",\n// [true, false],\n// { foo: 123, bar: \"abc\" }\n// ];\n//\n// Would show a preview of...\n// [123, \"abc\", Array(2), {…}]\nexport function formatDataForPreview(\n data: any,\n showFormattedValue: boolean,\n): string {\n if (data != null && hasOwnProperty.call(data, meta.type)) {\n return showFormattedValue\n ? data[meta.preview_long]\n : data[meta.preview_short];\n }\n\n const type = getDataType(data);\n\n switch (type) {\n case 'html_element':\n return `<${truncateForDisplay(data.tagName.toLowerCase())} />`;\n case 'function':\n return truncateForDisplay(\n `ƒ ${typeof data.name === 'function' ? '' : data.name}() {}`,\n );\n case 'string':\n return `\"${data}\"`;\n case 'bigint':\n return truncateForDisplay(data.toString() + 'n');\n case 'regexp':\n return truncateForDisplay(data.toString());\n case 'symbol':\n return truncateForDisplay(data.toString());\n case 'react_element':\n return `<${truncateForDisplay(\n getDisplayNameForReactElement(data) || 'Unknown',\n )} />`;\n case 'array_buffer':\n return `ArrayBuffer(${data.byteLength})`;\n case 'data_view':\n return `DataView(${data.buffer.byteLength})`;\n case 'array':\n if (showFormattedValue) {\n let formatted = '';\n for (let i = 0; i < data.length; i++) {\n if (i > 0) {\n formatted += ', ';\n }\n formatted += formatDataForPreview(data[i], false);\n if (formatted.length > MAX_PREVIEW_STRING_LENGTH) {\n // Prevent doing a lot of unnecessary iteration...\n break;\n }\n }\n return `[${truncateForDisplay(formatted)}]`;\n } else {\n const length = hasOwnProperty.call(data, meta.size)\n ? data[meta.size]\n : data.length;\n return `Array(${length})`;\n }\n case 'typed_array':\n const shortName = `${data.constructor.name}(${data.length})`;\n if (showFormattedValue) {\n let formatted = '';\n for (let i = 0; i < data.length; i++) {\n if (i > 0) {\n formatted += ', ';\n }\n formatted += data[i];\n if (formatted.length > MAX_PREVIEW_STRING_LENGTH) {\n // Prevent doing a lot of unnecessary iteration...\n break;\n }\n }\n return `${shortName} [${truncateForDisplay(formatted)}]`;\n } else {\n return shortName;\n }\n case 'iterator':\n const name = data.constructor.name;\n\n if (showFormattedValue) {\n // TRICKY\n // Don't use [...spread] syntax for this purpose.\n // This project uses @babel/plugin-transform-spread in \"loose\" mode which only works with Array values.\n // Other types (e.g. typed arrays, Sets) will not spread correctly.\n const array = Array.from(data);\n\n let formatted = '';\n for (let i = 0; i < array.length; i++) {\n const entryOrEntries = array[i];\n\n if (i > 0) {\n formatted += ', ';\n }\n\n // TRICKY\n // Browsers display Maps and Sets differently.\n // To mimic their behavior, detect if we've been given an entries tuple.\n // Map(2) {\"abc\" => 123, \"def\" => 123}\n // Set(2) {\"abc\", 123}\n if (Array.isArray(entryOrEntries)) {\n const key = formatDataForPreview(entryOrEntries[0], true);\n const value = formatDataForPreview(entryOrEntries[1], false);\n formatted += `${key} => ${value}`;\n } else {\n formatted += formatDataForPreview(entryOrEntries, false);\n }\n\n if (formatted.length > MAX_PREVIEW_STRING_LENGTH) {\n // Prevent doing a lot of unnecessary iteration...\n break;\n }\n }\n\n return `${name}(${data.size}) {${truncateForDisplay(formatted)}}`;\n } else {\n return `${name}(${data.size})`;\n }\n case 'opaque_iterator': {\n return data[Symbol.toStringTag];\n }\n case 'date':\n return data.toString();\n case 'object':\n if (showFormattedValue) {\n const keys = getAllEnumerableKeys(data).sort(alphaSortKeys);\n\n let formatted = '';\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i];\n if (i > 0) {\n formatted += ', ';\n }\n formatted += `${key.toString()}: ${formatDataForPreview(\n data[key],\n false,\n )}`;\n if (formatted.length > MAX_PREVIEW_STRING_LENGTH) {\n // Prevent doing a lot of unnecessary iteration...\n break;\n }\n }\n return `{${truncateForDisplay(formatted)}}`;\n } else {\n return '{…}';\n }\n case 'boolean':\n case 'number':\n case 'infinity':\n case 'nan':\n case 'null':\n case 'undefined':\n return data;\n default:\n try {\n return truncateForDisplay('' + data);\n } catch (error) {\n return 'unserializable';\n }\n }\n}\n","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n */\n\nimport {copy} from 'clipboard-js';\nimport {dehydrate} from '../hydration';\n\nimport type {DehydratedData} from 'react-devtools-shared/src/devtools/views/Components/types';\n\nexport function cleanForBridge(\n data: Object | null,\n isPathAllowed: (path: Array<string | number>) => boolean,\n path?: Array<string | number> = [],\n): DehydratedData | null {\n if (data !== null) {\n const cleanedPaths = [];\n const unserializablePaths = [];\n const cleanedData = dehydrate(\n data,\n cleanedPaths,\n unserializablePaths,\n path,\n isPathAllowed,\n );\n\n return {\n data: cleanedData,\n cleaned: cleanedPaths,\n unserializable: unserializablePaths,\n };\n } else {\n return null;\n }\n}\n\nexport function copyToClipboard(value: any): void {\n const safeToCopy = serializeToString(value);\n const text = safeToCopy === undefined ? 'undefined' : safeToCopy;\n const {clipboardCopyText} = window.__REACT_DEVTOOLS_GLOBAL_HOOK__;\n\n // On Firefox navigator.clipboard.writeText has to be called from\n // the content script js code (because it requires the clipboardWrite\n // permission to be allowed out of a \"user handling\" callback),\n // clipboardCopyText is an helper injected into the page from.\n // injectGlobalHook.\n if (typeof clipboardCopyText === 'function') {\n clipboardCopyText(text).catch(err => {});\n } else {\n copy(text);\n }\n}\n\nexport function copyWithDelete(\n obj: Object | Array<any>,\n path: Array<string | number>,\n index: number = 0,\n): Object | Array<any> {\n const key = path[index];\n const updated = Array.isArray(obj) ? obj.slice() : {...obj};\n if (index + 1 === path.length) {\n if (Array.isArray(updated)) {\n updated.splice(((key: any): number), 1);\n } else {\n delete updated[key];\n }\n } else {\n // $FlowFixMe number or string is fine here\n updated[key] = copyWithDelete(obj[key], path, index + 1);\n }\n return updated;\n}\n\n// This function expects paths to be the same except for the final value.\n// e.g. ['path', 'to', 'foo'] and ['path', 'to', 'bar']\nexport function copyWithRename(\n obj: Object | Array<any>,\n oldPath: Array<string | number>,\n newPath: Array<string | number>,\n index: number = 0,\n): Object | Array<any> {\n const oldKey = oldPath[index];\n const updated = Array.isArray(obj) ? obj.slice() : {...obj};\n if (index + 1 === oldPath.length) {\n const newKey = newPath[index];\n // $FlowFixMe number or string is fine here\n updated[newKey] = updated[oldKey];\n if (Array.isArray(updated)) {\n updated.splice(((oldKey: any): number), 1);\n } else {\n delete updated[oldKey];\n }\n } else {\n // $FlowFixMe number or string is fine here\n updated[oldKey] = copyWithRename(obj[oldKey], oldPath, newPath, index + 1);\n }\n return updated;\n}\n\nexport function copyWithSet(\n obj: Object | Array<any>,\n path: Array<string | number>,\n value: any,\n index: number = 0,\n): Object | Array<any> {\n if (index >= path.length) {\n return value;\n }\n const key = path[index];\n const updated = Array.isArray(obj) ? obj.slice() : {...obj};\n // $FlowFixMe number or string is fine here\n updated[key] = copyWithSet(obj[key], path, value, index + 1);\n return updated;\n}\n\nexport function serializeToString(data: any): string {\n const cache = new Set();\n // Use a custom replacer function to protect against circular references.\n return JSON.stringify(data, (key, value) => {\n if (typeof value === 'object' && value !== null) {\n if (cache.has(value)) {\n return;\n }\n cache.add(value);\n }\n // $FlowFixMe\n if (typeof value === 'bigint') {\n return value.toString() + 'n';\n }\n return value;\n });\n}\n","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n */\n\nimport {gt, gte} from 'semver';\nimport {\n ComponentFilterDisplayName,\n ComponentFilterElementType,\n ComponentFilterHOC,\n ComponentFilterLocation,\n ElementTypeClass,\n ElementTypeContext,\n ElementTypeFunction,\n ElementTypeForwardRef,\n ElementTypeHostComponent,\n ElementTypeMemo,\n ElementTypeOtherOrUnknown,\n ElementTypeProfiler,\n ElementTypeRoot,\n ElementTypeSuspense,\n ElementTypeSuspenseList,\n} from 'react-devtools-shared/src/types';\nimport {\n deletePathInObject,\n getDisplayName,\n getDefaultComponentFilters,\n getInObject,\n getUID,\n renamePathInObject,\n setInObject,\n utfEncodeString,\n} from 'react-devtools-shared/src/utils';\nimport {sessionStorageGetItem} from 'react-devtools-shared/src/storage';\nimport {\n cleanForBridge,\n copyToClipboard,\n copyWithDelete,\n copyWithRename,\n copyWithSet,\n} from './utils';\nimport {\n __DEBUG__,\n SESSION_STORAGE_RELOAD_AND_PROFILE_KEY,\n SESSION_STORAGE_RECORD_CHANGE_DESCRIPTIONS_KEY,\n TREE_OPERATION_ADD,\n TREE_OPERATION_REMOVE,\n TREE_OPERATION_REORDER_CHILDREN,\n TREE_OPERATION_UPDATE_TREE_BASE_DURATION,\n} from '../constants';\nimport {inspectHooksOfFiber} from 'react-debug-tools';\nimport {\n patch as patchConsole,\n registerRenderer as registerRendererWithConsole,\n} from './console';\nimport {\n CONCURRENT_MODE_NUMBER,\n CONCURRENT_MODE_SYMBOL_STRING,\n DEPRECATED_ASYNC_MODE_SYMBOL_STRING,\n PROVIDER_NUMBER,\n PROVIDER_SYMBOL_STRING,\n CONTEXT_NUMBER,\n CONTEXT_SYMBOL_STRING,\n STRICT_MODE_NUMBER,\n STRICT_MODE_SYMBOL_STRING,\n PROFILER_NUMBER,\n PROFILER_SYMBOL_STRING,\n SCOPE_NUMBER,\n SCOPE_SYMBOL_STRING,\n FORWARD_REF_NUMBER,\n FORWARD_REF_SYMBOL_STRING,\n MEMO_NUMBER,\n MEMO_SYMBOL_STRING,\n} from './ReactSymbols';\n\nimport type {Fiber} from 'react-reconciler/src/ReactInternalTypes';\nimport type {\n ChangeDescription,\n CommitDataBackend,\n DevToolsHook,\n InspectedElement,\n InspectedElementPayload,\n InstanceAndStyle,\n NativeType,\n Owner,\n PathFrame,\n PathMatch,\n ProfilingDataBackend,\n ProfilingDataForRootBackend,\n ReactRenderer,\n RendererInterface,\n WorkTagMap,\n} from './types';\nimport type {Interaction} from 'react-devtools-shared/src/devtools/views/Profiler/types';\nimport type {\n ComponentFilter,\n ElementType,\n} from 'react-devtools-shared/src/types';\n\ntype getDisplayNameForFiberType = (fiber: Fiber) => string | null;\ntype getTypeSymbolType = (type: any) => Symbol | number;\n\ntype ReactPriorityLevelsType = {|\n ImmediatePriority: number,\n UserBlockingPriority: number,\n NormalPriority: number,\n LowPriority: number,\n IdlePriority: number,\n NoPriority: number,\n|};\n\ntype ReactTypeOfSideEffectType = {|\n NoFlags: number,\n PerformedWork: number,\n Placement: number,\n|};\n\nfunction getFiberFlags(fiber: Fiber): number {\n // The name of this field changed from \"effectTag\" to \"flags\"\n return fiber.flags !== undefined ? fiber.flags : (fiber: any).effectTag;\n}\n\n// Some environments (e.g. React Native / Hermes) don't support the performance API yet.\nconst getCurrentTime =\n typeof performance === 'object' && typeof performance.now === 'function'\n ? () => performance.now()\n : () => Date.now();\n\nexport function getInternalReactConstants(\n version: string,\n): {|\n getDisplayNameForFiber: getDisplayNameForFiberType,\n getTypeSymbol: getTypeSymbolType,\n ReactPriorityLevels: ReactPriorityLevelsType,\n ReactTypeOfSideEffect: ReactTypeOfSideEffectType,\n ReactTypeOfWork: WorkTagMap,\n|} {\n const ReactTypeOfSideEffect: ReactTypeOfSideEffectType = {\n NoFlags: 0b00,\n PerformedWork: 0b01,\n Placement: 0b10,\n };\n\n // **********************************************************\n // The section below is copied from files in React repo.\n // Keep it in sync, and add version guards if it changes.\n //\n // Technically these priority levels are invalid for versions before 16.9,\n // but 16.9 is the first version to report priority level to DevTools,\n // so we can avoid checking for earlier versions and support pre-16.9 canary releases in the process.\n const ReactPriorityLevels: ReactPriorityLevelsType = {\n ImmediatePriority: 99,\n UserBlockingPriority: 98,\n NormalPriority: 97,\n LowPriority: 96,\n IdlePriority: 95,\n NoPriority: 90,\n };\n\n let ReactTypeOfWork: WorkTagMap = ((null: any): WorkTagMap);\n\n // **********************************************************\n // The section below is copied from files in React repo.\n // Keep it in sync, and add version guards if it changes.\n //\n // TODO Update the gt() check below to be gte() whichever the next version number is.\n // Currently the version in Git is 17.0.2 (but that version has not been/may not end up being released).\n if (gt(version, '17.0.1')) {\n ReactTypeOfWork = {\n ClassComponent: 1,\n ContextConsumer: 9,\n ContextProvider: 10,\n CoroutineComponent: -1, // Removed\n CoroutineHandlerPhase: -1, // Removed\n DehydratedSuspenseComponent: 18, // Behind a flag\n ForwardRef: 11,\n Fragment: 7,\n FunctionComponent: 0,\n HostComponent: 5,\n HostPortal: 4,\n HostRoot: 3,\n HostText: 6,\n IncompleteClassComponent: 17,\n IndeterminateComponent: 2,\n LazyComponent: 16,\n LegacyHiddenComponent: 23,\n MemoComponent: 14,\n Mode: 8,\n OffscreenComponent: 22, // Experimental\n Profiler: 12,\n ScopeComponent: 21, // Experimental\n SimpleMemoComponent: 15,\n SuspenseComponent: 13,\n SuspenseListComponent: 19, // Experimental\n YieldComponent: -1, // Removed\n };\n } else if (gte(version, '17.0.0-alpha')) {\n ReactTypeOfWork = {\n ClassComponent: 1,\n ContextConsumer: 9,\n ContextProvider: 10,\n CoroutineComponent: -1, // Removed\n CoroutineHandlerPhase: -1, // Removed\n DehydratedSuspenseComponent: 18, // Behind a flag\n ForwardRef: 11,\n Fragment: 7,\n FunctionComponent: 0,\n HostComponent: 5,\n HostPortal: 4,\n HostRoot: 3,\n HostText: 6,\n IncompleteClassComponent: 17,\n IndeterminateComponent: 2,\n LazyComponent: 16,\n LegacyHiddenComponent: 24,\n MemoComponent: 14,\n Mode: 8,\n OffscreenComponent: 23, // Experimental\n Profiler: 12,\n ScopeComponent: 21, // Experimental\n SimpleMemoComponent: 15,\n SuspenseComponent: 13,\n SuspenseListComponent: 19, // Experimental\n YieldComponent: -1, // Removed\n };\n } else if (gte(version, '16.6.0-beta.0')) {\n ReactTypeOfWork = {\n ClassComponent: 1,\n ContextConsumer: 9,\n ContextProvider: 10,\n CoroutineComponent: -1, // Removed\n CoroutineHandlerPhase: -1, // Removed\n DehydratedSuspenseComponent: 18, // Behind a flag\n ForwardRef: 11,\n Fragment: 7,\n FunctionComponent: 0,\n HostComponent: 5,\n HostPortal: 4,\n HostRoot: 3,\n HostText: 6,\n IncompleteClassComponent: 17,\n IndeterminateComponent: 2,\n LazyComponent: 16,\n LegacyHiddenComponent: -1,\n MemoComponent: 14,\n Mode: 8,\n OffscreenComponent: -1, // Experimental\n Profiler: 12,\n ScopeComponent: -1, // Experimental\n SimpleMemoComponent: 15,\n SuspenseComponent: 13,\n SuspenseListComponent: 19, // Experimental\n YieldComponent: -1, // Removed\n };\n } else if (gte(version, '16.4.3-alpha')) {\n ReactTypeOfWork = {\n ClassComponent: 2,\n ContextConsumer: 11,\n ContextProvider: 12,\n CoroutineComponent: -1, // Removed\n CoroutineHandlerPhase: -1, // Removed\n DehydratedSuspenseComponent: -1, // Doesn't exist yet\n ForwardRef: 13,\n Fragment: 9,\n FunctionComponent: 0,\n HostComponent: 7,\n HostPortal: 6,\n HostRoot: 5,\n HostText: 8,\n IncompleteClassComponent: -1, // Doesn't exist yet\n IndeterminateComponent: 4,\n LazyComponent: -1, // Doesn't exist yet\n LegacyHiddenComponent: -1,\n MemoComponent: -1, // Doesn't exist yet\n Mode: 10,\n OffscreenComponent: -1, // Experimental\n Profiler: 15,\n ScopeComponent: -1, // Experimental\n SimpleMemoComponent: -1, // Doesn't exist yet\n SuspenseComponent: 16,\n SuspenseListComponent: -1, // Doesn't exist yet\n YieldComponent: -1, // Removed\n };\n } else {\n ReactTypeOfWork = {\n ClassComponent: 2,\n ContextConsumer: 12,\n ContextProvider: 13,\n CoroutineComponent: 7,\n CoroutineHandlerPhase: 8,\n DehydratedSuspenseComponent: -1, // Doesn't exist yet\n ForwardRef: 14,\n Fragment: 10,\n FunctionComponent: 1,\n HostComponent: 5,\n HostPortal: 4,\n HostRoot: 3,\n HostText: 6,\n IncompleteClassComponent: -1, // Doesn't exist yet\n IndeterminateComponent: 0,\n LazyComponent: -1, // Doesn't exist yet\n LegacyHiddenComponent: -1,\n MemoComponent: -1, // Doesn't exist yet\n Mode: 11,\n OffscreenComponent: -1, // Experimental\n Profiler: 15,\n ScopeComponent: -1, // Experimental\n SimpleMemoComponent: -1, // Doesn't exist yet\n SuspenseComponent: 16,\n SuspenseListComponent: -1, // Doesn't exist yet\n YieldComponent: 9,\n };\n }\n // **********************************************************\n // End of copied code.\n // **********************************************************\n\n function getTypeSymbol(type: any): Symbol | number {\n const symbolOrNumber =\n typeof type === 'object' && type !== null ? type.$$typeof : type;\n\n // $FlowFixMe Flow doesn't know about typeof \"symbol\"\n return typeof symbolOrNumber === 'symbol'\n ? symbolOrNumber.toString()\n : symbolOrNumber;\n }\n\n const {\n ClassComponent,\n IncompleteClassComponent,\n FunctionComponent,\n IndeterminateComponent,\n ForwardRef,\n HostRoot,\n HostComponent,\n HostPortal,\n HostText,\n Fragment,\n LazyComponent,\n LegacyHiddenComponent,\n MemoComponent,\n OffscreenComponent,\n ScopeComponent,\n SimpleMemoComponent,\n SuspenseComponent,\n SuspenseListComponent,\n } = ReactTypeOfWork;\n\n function resolveFiberType(type: any) {\n const typeSymbol = getTypeSymbol(type);\n switch (typeSymbol) {\n case MEMO_NUMBER:\n case MEMO_SYMBOL_STRING:\n // recursively resolving memo type in case of memo(forwardRef(Component))\n return resolveFiberType(type.type);\n case FORWARD_REF_NUMBER:\n case FORWARD_REF_SYMBOL_STRING:\n return type.render;\n default:\n return type;\n }\n }\n\n // NOTICE Keep in sync with shouldFilterFiber() and other get*ForFiber methods\n function getDisplayNameForFiber(fiber: Fiber): string | null {\n const {type, tag} = fiber;\n\n let resolvedType = type;\n if (typeof type === 'object' && type !== null) {\n resolvedType = resolveFiberType(type);\n }\n\n let resolvedContext: any = null;\n\n switch (tag) {\n case ClassComponent:\n case IncompleteClassComponent:\n return getDisplayName(resolvedType);\n case FunctionComponent:\n case IndeterminateComponent:\n return getDisplayName(resolvedType);\n case ForwardRef:\n // Mirror https://github.com/facebook/react/blob/7c21bf72ace77094fd1910cc350a548287ef8350/packages/shared/getComponentName.js#L27-L37\n return (\n (type && type.displayName) ||\n getDisplayName(resolvedType, 'Anonymous')\n );\n case HostRoot:\n return null;\n case HostComponent:\n return type;\n case HostPortal:\n case HostText:\n case Fragment:\n return null;\n case LazyComponent:\n // This display name will not be user visible.\n // Once a Lazy component loads its inner component, React replaces the tag and type.\n // This display name will only show up in console logs when DevTools DEBUG mode is on.\n return 'Lazy';\n case MemoComponent:\n case SimpleMemoComponent:\n return getDisplayName(resolvedType, 'Anonymous');\n case SuspenseComponent:\n return 'Suspense';\n case LegacyHiddenComponent:\n return 'LegacyHidden';\n case OffscreenComponent:\n return 'Offscreen';\n case ScopeComponent:\n return 'Scope';\n case SuspenseListComponent:\n return 'SuspenseList';\n default:\n const typeSymbol = getTypeSymbol(type);\n\n switch (typeSymbol) {\n case CONCURRENT_MODE_NUMBER:\n case CONCURRENT_MODE_SYMBOL_STRING:\n case DEPRECATED_ASYNC_MODE_SYMBOL_STRING:\n return null;\n case PROVIDER_NUMBER:\n case PROVIDER_SYMBOL_STRING:\n // 16.3.0 exposed the context object as \"context\"\n // PR #12501 changed it to \"_context\" for 16.3.1+\n // NOTE Keep in sync with inspectElementRaw()\n resolvedContext = fiber.type._context || fiber.type.context;\n return `${resolvedContext.displayName || 'Context'}.Provider`;\n case CONTEXT_NUMBER:\n case CONTEXT_SYMBOL_STRING:\n // 16.3-16.5 read from \"type\" because the Consumer is the actual context object.\n // 16.6+ should read from \"type._context\" because Consumer can be different (in DEV).\n // NOTE Keep in sync with inspectElementRaw()\n resolvedContext = fiber.type._context || fiber.type;\n\n // NOTE: TraceUpdatesBackendManager depends on the name ending in '.Consumer'\n // If you change the name, figure out a more resilient way to detect it.\n return `${resolvedContext.displayName || 'Context'}.Consumer`;\n case STRICT_MODE_NUMBER:\n case STRICT_MODE_SYMBOL_STRING:\n return null;\n case PROFILER_NUMBER:\n case PROFILER_SYMBOL_STRING:\n return `Profiler(${fiber.memoizedProps.id})`;\n case SCOPE_NUMBER:\n case SCOPE_SYMBOL_STRING:\n return 'Scope';\n default:\n // Unknown element type.\n // This may mean a new element type that has not yet been added to DevTools.\n return null;\n }\n }\n }\n\n return {\n getDisplayNameForFiber,\n getTypeSymbol,\n ReactPriorityLevels,\n ReactTypeOfWork,\n ReactTypeOfSideEffect,\n };\n}\n\nexport function attach(\n hook: DevToolsHook,\n rendererID: number,\n renderer: ReactRenderer,\n global: Object,\n): RendererInterface {\n const {\n getDisplayNameForFiber,\n getTypeSymbol,\n ReactPriorityLevels,\n ReactTypeOfWork,\n ReactTypeOfSideEffect,\n } = getInternalReactConstants(renderer.version);\n const {NoFlags, PerformedWork, Placement} = ReactTypeOfSideEffect;\n const {\n FunctionComponent,\n ClassComponent,\n ContextConsumer,\n DehydratedSuspenseComponent,\n Fragment,\n ForwardRef,\n HostRoot,\n HostPortal,\n HostComponent,\n HostText,\n IncompleteClassComponent,\n IndeterminateComponent,\n MemoComponent,\n OffscreenComponent,\n SimpleMemoComponent,\n SuspenseComponent,\n SuspenseListComponent,\n } = ReactTypeOfWork;\n const {\n ImmediatePriority,\n UserBlockingPriority,\n NormalPriority,\n LowPriority,\n IdlePriority,\n NoPriority,\n } = ReactPriorityLevels;\n\n const {\n overrideHookState,\n overrideHookStateDeletePath,\n overrideHookStateRenamePath,\n overrideProps,\n overridePropsDeletePath,\n overridePropsRenamePath,\n setSuspenseHandler,\n scheduleUpdate,\n } = renderer;\n const supportsTogglingSuspense =\n typeof setSuspenseHandler === 'function' &&\n typeof scheduleUpdate === 'function';\n\n // Patching the console enables DevTools to do a few useful things:\n // * Append component stacks to warnings and error messages\n // * Disable logging during re-renders to inspect hooks (see inspectHooksOfFiber)\n //\n // Don't patch in test environments because we don't want to interfere with Jest's own console overrides.\n if (process.env.NODE_ENV !== 'test') {\n registerRendererWithConsole(renderer);\n\n // The renderer interface can't read these preferences directly,\n // because it is stored in localStorage within the context of the extension.\n // It relies on the extension to pass the preference through via the global.\n const appendComponentStack =\n window.__REACT_DEVTOOLS_APPEND_COMPONENT_STACK__ !== false;\n const breakOnConsoleErrors =\n window.__REACT_DEVTOOLS_BREAK_ON_CONSOLE_ERRORS__ === true;\n if (appendComponentStack || breakOnConsoleErrors) {\n patchConsole({\n appendComponentStack,\n breakOnConsoleErrors,\n });\n }\n }\n\n const debug = (name: string, fiber: Fiber, parentFiber: ?Fiber): void => {\n if (__DEBUG__) {\n const displayName =\n fiber.tag + ':' + (getDisplayNameForFiber(fiber) || 'null');\n const id = getFiberID(fiber);\n const parentDisplayName = parentFiber\n ? parentFiber.tag +\n ':' +\n (getDisplayNameForFiber(parentFiber) || 'null')\n : '';\n const parentID = parentFiber ? getFiberID(parentFiber) : '';\n // NOTE: calling getFiberID or getPrimaryFiber is unsafe here\n // because it will put them in the map. For now, we'll omit them.\n // TODO: better debugging story for this.\n console.log(\n `[renderer] %c${name} %c${displayName} (${id}) %c${\n parentFiber ? `${parentDisplayName} (${parentID})` : ''\n }`,\n 'color: red; font-weight: bold;',\n 'color: blue;',\n 'color: purple;',\n );\n }\n };\n\n // Configurable Components tree filters.\n const hideElementsWithDisplayNames: Set<RegExp> = new Set();\n const hideElementsWithPaths: Set<RegExp> = new Set();\n const hideElementsWithTypes: Set<ElementType> = new Set();\n\n // Highlight updates\n let traceUpdatesEnabled: boolean = false;\n const traceUpdatesForNodes: Set<NativeType> = new Set();\n\n function applyComponentFilters(componentFilters: Array<ComponentFilter>) {\n hideElementsWithTypes.clear();\n hideElementsWithDisplayNames.clear();\n hideElementsWithPaths.clear();\n\n componentFilters.forEach(componentFilter => {\n if (!componentFilter.isEnabled) {\n return;\n }\n\n switch (componentFilter.type) {\n case ComponentFilterDisplayName:\n if (componentFilter.isValid && componentFilter.value !== '') {\n hideElementsWithDisplayNames.add(\n new RegExp(componentFilter.value, 'i'),\n );\n }\n break;\n case ComponentFilterElementType:\n hideElementsWithTypes.add(componentFilter.value);\n break;\n case ComponentFilterLocation:\n if (componentFilter.isValid && componentFilter.value !== '') {\n hideElementsWithPaths.add(new RegExp(componentFilter.value, 'i'));\n }\n break;\n case ComponentFilterHOC:\n hideElementsWithDisplayNames.add(new RegExp('\\\\('));\n break;\n default:\n console.warn(\n `Invalid component filter type \"${componentFilter.type}\"`,\n );\n break;\n }\n });\n }\n\n // The renderer interface can't read saved component filters directly,\n // because they are stored in localStorage within the context of the extension.\n // Instead it relies on the extension to pass filters through.\n if (window.__REACT_DEVTOOLS_COMPONENT_FILTERS__ != null) {\n applyComponentFilters(window.__REACT_DEVTOOLS_COMPONENT_FILTERS__);\n } else {\n // Unfortunately this feature is not expected to work for React Native for now.\n // It would be annoying for us to spam YellowBox warnings with unactionable stuff,\n // so for now just skip this message...\n //console.warn('⚛️ DevTools: Could not locate saved component filters');\n\n // Fallback to assuming the default filters in this case.\n applyComponentFilters(getDefaultComponentFilters());\n }\n\n // If necessary, we can revisit optimizing this operation.\n // For example, we could add a new recursive unmount tree operation.\n // The unmount operations are already significantly smaller than mount operations though.\n // This is something to keep in mind for later.\n function updateComponentFilters(componentFilters: Array<ComponentFilter>) {\n if (isProfiling) {\n // Re-mounting a tree while profiling is in progress might break a lot of assumptions.\n // If necessary, we could support this- but it doesn't seem like a necessary use case.\n throw Error('Cannot modify filter preferences while profiling');\n }\n\n // Recursively unmount all roots.\n hook.getFiberRoots(rendererID).forEach(root => {\n currentRootID = getFiberID(getPrimaryFiber(root.current));\n unmountFiberChildrenRecursively(root.current);\n recordUnmount(root.current, false);\n currentRootID = -1;\n });\n\n applyComponentFilters(componentFilters);\n\n // Reset pseudo counters so that new path selections will be persisted.\n rootDisplayNameCounter.clear();\n\n // Recursively re-mount all roots with new filter criteria applied.\n hook.getFiberRoots(rendererID).forEach(root => {\n currentRootID = getFiberID(getPrimaryFiber(root.current));\n setRootPseudoKey(currentRootID, root.current);\n mountFiberRecursively(root.current, null, false, false);\n flushPendingEvents(root);\n currentRootID = -1;\n });\n }\n\n // NOTICE Keep in sync with get*ForFiber methods\n function shouldFilterFiber(fiber: Fiber): boolean {\n const {_debugSource, tag, type} = fiber;\n\n switch (tag) {\n case DehydratedSuspenseComponent:\n // TODO: ideally we would show dehydrated Suspense immediately.\n // However, it has some special behavior (like disconnecting\n // an alternate and turning into real Suspense) which breaks DevTools.\n // For now, ignore it, and only show it once it gets hydrated.\n // https://github.com/bvaughn/react-devtools-experimental/issues/197\n return true;\n case HostPortal:\n case HostText:\n case Fragment:\n case OffscreenComponent:\n return true;\n case HostRoot:\n // It is never valid to filter the root element.\n return false;\n default:\n const typeSymbol = getTypeSymbol(type);\n\n switch (typeSymbol) {\n case CONCURRENT_MODE_NUMBER:\n case CONCURRENT_MODE_SYMBOL_STRING:\n case DEPRECATED_ASYNC_MODE_SYMBOL_STRING:\n case STRICT_MODE_NUMBER:\n case STRICT_MODE_SYMBOL_STRING:\n return true;\n default:\n break;\n }\n }\n\n const elementType = getElementTypeForFiber(fiber);\n if (hideElementsWithTypes.has(elementType)) {\n return true;\n }\n\n if (hideElementsWithDisplayNames.size > 0) {\n const displayName = getDisplayNameForFiber(fiber);\n if (displayName != null) {\n // eslint-disable-next-line no-for-of-loops/no-for-of-loops\n for (const displayNameRegExp of hideElementsWithDisplayNames) {\n if (displayNameRegExp.test(displayName)) {\n return true;\n }\n }\n }\n }\n\n if (_debugSource != null && hideElementsWithPaths.size > 0) {\n const {fileName} = _debugSource;\n // eslint-disable-next-line no-for-of-loops/no-for-of-loops\n for (const pathRegExp of hideElementsWithPaths) {\n if (pathRegExp.test(fileName)) {\n return true;\n }\n }\n }\n\n return false;\n }\n // NOTICE Keep in sync with shouldFilterFiber() and other get*ForFiber methods\n function getElementTypeForFiber(fiber: Fiber): ElementType {\n const {type, tag} = fiber;\n\n switch (tag) {\n case ClassComponent:\n case IncompleteClassComponent:\n return ElementTypeClass;\n case FunctionComponent:\n case IndeterminateComponent:\n return ElementTypeFunction;\n case ForwardRef:\n return ElementTypeForwardRef;\n case HostRoot:\n return ElementTypeRoot;\n case HostComponent:\n return ElementTypeHostComponent;\n case HostPortal:\n case HostText:\n case Fragment:\n return ElementTypeOtherOrUnknown;\n case MemoComponent:\n case SimpleMemoComponent:\n return ElementTypeMemo;\n case SuspenseComponent:\n return ElementTypeSuspense;\n case SuspenseListComponent:\n return ElementTypeSuspenseList;\n default:\n const typeSymbol = getTypeSymbol(type);\n\n switch (typeSymbol) {\n case CONCURRENT_MODE_NUMBER:\n case CONCURRENT_MODE_SYMBOL_STRING:\n case DEPRECATED_ASYNC_MODE_SYMBOL_STRING:\n return ElementTypeOtherOrUnknown;\n case PROVIDER_NUMBER:\n case PROVIDER_SYMBOL_STRING:\n return ElementTypeContext;\n case CONTEXT_NUMBER:\n case CONTEXT_SYMBOL_STRING:\n return ElementTypeContext;\n case STRICT_MODE_NUMBER:\n case STRICT_MODE_SYMBOL_STRING:\n return ElementTypeOtherOrUnknown;\n case PROFILER_NUMBER:\n case PROFILER_SYMBOL_STRING:\n return ElementTypeProfiler;\n default:\n return ElementTypeOtherOrUnknown;\n }\n }\n }\n\n // This is a slightly annoying indirection.\n // It is currently necessary because DevTools wants to use unique objects as keys for instances.\n // However fibers have two versions.\n // We use this set to remember first encountered fiber for each conceptual instance.\n function getPrimaryFiber(fiber: Fiber): Fiber {\n if (primaryFibers.has(fiber)) {\n return fiber;\n }\n const {alternate} = fiber;\n if (alternate != null && primaryFibers.has(alternate)) {\n return alternate;\n }\n primaryFibers.add(fiber);\n return fiber;\n }\n\n const fiberToIDMap: Map<Fiber, number> = new Map();\n const idToFiberMap: Map<number, Fiber> = new Map();\n const primaryFibers: Set<Fiber> = new Set();\n\n // When profiling is supported, we store the latest tree base durations for each Fiber.\n // This is so that we can quickly capture a snapshot of those values if profiling starts.\n // If we didn't store these values, we'd have to crawl the tree when profiling started,\n // and use a slow path to find each of the current Fibers.\n const idToTreeBaseDurationMap: Map<number, number> = new Map();\n\n // When profiling is supported, we store the latest tree base durations for each Fiber.\n // This map enables us to filter these times by root when sending them to the frontend.\n const idToRootMap: Map<number, number> = new Map();\n\n // When a mount or update is in progress, this value tracks the root that is being operated on.\n let currentRootID: number = -1;\n\n function getFiberID(primaryFiber: Fiber): number {\n if (!fiberToIDMap.has(primaryFiber)) {\n const id = getUID();\n fiberToIDMap.set(primaryFiber, id);\n idToFiberMap.set(id, primaryFiber);\n }\n return ((fiberToIDMap.get(primaryFiber): any): number);\n }\n\n function getChangeDescription(\n prevFiber: Fiber | null,\n nextFiber: Fiber,\n ): ChangeDescription | null {\n switch (getElementTypeForFiber(nextFiber)) {\n case ElementTypeClass:\n case ElementTypeFunction:\n case ElementTypeMemo:\n case ElementTypeForwardRef:\n if (prevFiber === null) {\n return {\n context: null,\n didHooksChange: false,\n isFirstMount: true,\n props: null,\n state: null,\n };\n } else {\n return {\n context: getContextChangedKeys(nextFiber),\n didHooksChange: didHooksChange(\n prevFiber.memoizedState,\n nextFiber.memoizedState,\n ),\n isFirstMount: false,\n props: getChangedKeys(\n prevFiber.memoizedProps,\n nextFiber.memoizedProps,\n ),\n state: getChangedKeys(\n prevFiber.memoizedState,\n nextFiber.memoizedState,\n ),\n };\n }\n default:\n return null;\n }\n }\n\n function updateContextsForFiber(fiber: Fiber) {\n switch (getElementTypeForFiber(fiber)) {\n case ElementTypeClass:\n if (idToContextsMap !== null) {\n const id = getFiberID(getPrimaryFiber(fiber));\n const contexts = getContextsForFiber(fiber);\n if (contexts !== null) {\n idToContextsMap.set(id, contexts);\n }\n }\n break;\n default:\n break;\n }\n }\n\n // Differentiates between a null context value and no context.\n const NO_CONTEXT = {};\n\n function getContextsForFiber(fiber: Fiber): [Object, any] | null {\n switch (getElementTypeForFiber(fiber)) {\n case ElementTypeClass:\n const instance = fiber.stateNode;\n let legacyContext = NO_CONTEXT;\n let modernContext = NO_CONTEXT;\n if (instance != null) {\n if (\n instance.constructor &&\n instance.constructor.contextType != null\n ) {\n modernContext = instance.context;\n } else {\n legacyContext = instance.context;\n if (legacyContext && Object.keys(legacyContext).length === 0) {\n legacyContext = NO_CONTEXT;\n }\n }\n }\n return [legacyContext, modernContext];\n default:\n return null;\n }\n }\n\n // Record all contexts at the time profiling is started.\n // Fibers only store the current context value,\n // so we need to track them separately in order to determine changed keys.\n function crawlToInitializeContextsMap(fiber: Fiber) {\n updateContextsForFiber(fiber);\n let current = fiber.child;\n while (current !== null) {\n crawlToInitializeContextsMap(current);\n current = current.sibling;\n }\n }\n\n function getContextChangedKeys(fiber: Fiber): null | boolean | Array<string> {\n switch (getElementTypeForFiber(fiber)) {\n case ElementTypeClass:\n if (idToContextsMap !== null) {\n const id = getFiberID(getPrimaryFiber(fiber));\n const prevContexts = idToContextsMap.has(id)\n ? idToContextsMap.get(id)\n : null;\n const nextContexts = getContextsForFiber(fiber);\n\n if (prevContexts == null || nextContexts == null) {\n return null;\n }\n\n const [prevLegacyContext, prevModernContext] = prevContexts;\n const [nextLegacyContext, nextModernContext] = nextContexts;\n\n if (nextLegacyContext !== NO_CONTEXT) {\n return getChangedKeys(prevLegacyContext, nextLegacyContext);\n } else if (nextModernContext !== NO_CONTEXT) {\n return prevModernContext !== nextModernContext;\n }\n }\n break;\n default:\n break;\n }\n return null;\n }\n\n function didHooksChange(prev: any, next: any): boolean {\n if (prev == null || next == null) {\n return false;\n }\n\n // We can't report anything meaningful for hooks changes.\n if (\n next.hasOwnProperty('baseState') &&\n next.hasOwnProperty('memoizedState') &&\n next.hasOwnProperty('next') &&\n next.hasOwnProperty('queue')\n ) {\n while (next !== null) {\n if (next.memoizedState !== prev.memoizedState) {\n return true;\n } else {\n next = next.next;\n prev = prev.next;\n }\n }\n }\n\n return false;\n }\n\n function getChangedKeys(prev: any, next: any): null | Array<string> {\n if (prev == null || next == null) {\n return null;\n }\n\n // We can't report anything meaningful for hooks changes.\n if (\n next.hasOwnProperty('baseState') &&\n next.hasOwnProperty('memoizedState') &&\n next.hasOwnProperty('next') &&\n next.hasOwnProperty('queue')\n ) {\n return null;\n }\n\n const keys = new Set([...Object.keys(prev), ...Object.keys(next)]);\n const changedKeys = [];\n // eslint-disable-next-line no-for-of-loops/no-for-of-loops\n for (const key of keys) {\n if (prev[key] !== next[key]) {\n changedKeys.push(key);\n }\n }\n\n return changedKeys;\n }\n\n // eslint-disable-next-line no-unused-vars\n function didFiberRender(prevFiber: Fiber, nextFiber: Fiber): boolean {\n switch (nextFiber.tag) {\n case ClassComponent:\n case FunctionComponent:\n case ContextConsumer:\n case MemoComponent:\n case SimpleMemoComponent:\n // For types that execute user code, we check PerformedWork effect.\n // We don't reflect bailouts (either referential or sCU) in DevTools.\n // eslint-disable-next-line no-bitwise\n return (getFiberFlags(nextFiber) & PerformedWork) === PerformedWork;\n // Note: ContextConsumer only gets PerformedWork effect in 16.3.3+\n // so it won't get highlighted with React 16.3.0 to 16.3.2.\n default:\n // For host components and other types, we compare inputs\n // to determine whether something is an update.\n return (\n prevFiber.memoizedProps !== nextFiber.memoizedProps ||\n prevFiber.memoizedState !== nextFiber.memoizedState ||\n prevFiber.ref !== nextFiber.ref\n );\n }\n }\n\n const pendingOperations: Array<number> = [];\n const pendingRealUnmountedIDs: Array<number> = [];\n const pendingSimulatedUnmountedIDs: Array<number> = [];\n let pendingOperationsQueue: Array<Array<number>> | null = [];\n const pendingStringTable: Map<string, number> = new Map();\n let pendingStringTableLength: number = 0;\n let pendingUnmountedRootID: number | null = null;\n\n function pushOperation(op: number): void {\n if (__DEV__) {\n if (!Number.isInteger(op)) {\n console.error(\n 'pushOperation() was called but the value is not an integer.',\n op,\n );\n }\n }\n pendingOperations.push(op);\n }\n\n function flushPendingEvents(root: Object): void {\n if (\n pendingOperations.length === 0 &&\n pendingRealUnmountedIDs.length === 0 &&\n pendingSimulatedUnmountedIDs.length === 0 &&\n pendingUnmountedRootID === null\n ) {\n // If we aren't profiling, we can just bail out here.\n // No use sending an empty update over the bridge.\n //\n // The Profiler stores metadata for each commit and reconstructs the app tree per commit using:\n // (1) an initial tree snapshot and\n // (2) the operations array for each commit\n // Because of this, it's important that the operations and metadata arrays align,\n // So it's important not to omit even empty operations while profiling is active.\n if (!isProfiling) {\n return;\n }\n }\n\n const numUnmountIDs =\n pendingRealUnmountedIDs.length +\n pendingSimulatedUnmountedIDs.length +\n (pendingUnmountedRootID === null ? 0 : 1);\n\n const operations = new Array(\n // Identify which renderer this update is coming from.\n 2 + // [rendererID, rootFiberID]\n // How big is the string table?\n 1 + // [stringTableLength]\n // Then goes the actual string table.\n pendingStringTableLength +\n // All unmounts are batched in a single message.\n // [TREE_OPERATION_REMOVE, removedIDLength, ...ids]\n (numUnmountIDs > 0 ? 2 + numUnmountIDs : 0) +\n // Regular operations\n pendingOperations.length,\n );\n\n // Identify which renderer this update is coming from.\n // This enables roots to be mapped to renderers,\n // Which in turn enables fiber props, states, and hooks to be inspected.\n let i = 0;\n operations[i++] = rendererID;\n operations[i++] = currentRootID; // Use this ID in case the root was unmounted!\n\n // Now fill in the string table.\n // [stringTableLength, str1Length, ...str1, str2Length, ...str2, ...]\n operations[i++] = pendingStringTableLength;\n pendingStringTable.forEach((value, key) => {\n operations[i++] = key.length;\n const encodedKey = utfEncodeString(key);\n for (let j = 0; j < encodedKey.length; j++) {\n operations[i + j] = encodedKey[j];\n }\n i += key.length;\n });\n\n if (numUnmountIDs > 0) {\n // All unmounts except roots are batched in a single message.\n operations[i++] = TREE_OPERATION_REMOVE;\n // The first number is how many unmounted IDs we're gonna send.\n operations[i++] = numUnmountIDs;\n // Fill in the real unmounts in the reverse order.\n // They were inserted parents-first by React, but we want children-first.\n // So we traverse our array backwards.\n for (let j = pendingRealUnmountedIDs.length - 1; j >= 0; j--) {\n operations[i++] = pendingRealUnmountedIDs[j];\n }\n // Fill in the simulated unmounts (hidden Suspense subtrees) in their order.\n // (We want children to go before parents.)\n // They go *after* the real unmounts because we know for sure they won't be\n // children of already pushed \"real\" IDs. If they were, we wouldn't be able\n // to discover them during the traversal, as they would have been deleted.\n for (let j = 0; j < pendingSimulatedUnmountedIDs.length; j++) {\n operations[i + j] = pendingSimulatedUnmountedIDs[j];\n }\n i += pendingSimulatedUnmountedIDs.length;\n // The root ID should always be unmounted last.\n if (pendingUnmountedRootID !== null) {\n operations[i] = pendingUnmountedRootID;\n i++;\n }\n }\n // Fill in the rest of the operations.\n for (let j = 0; j < pendingOperations.length; j++) {\n operations[i + j] = pendingOperations[j];\n }\n i += pendingOperations.length;\n\n // Let the frontend know about tree operations.\n // The first value in this array will identify which root it corresponds to,\n // so we do no longer need to dispatch a separate root-committed event.\n if (pendingOperationsQueue !== null) {\n // Until the frontend has been connected, store the tree operations.\n // This will let us avoid walking the tree later when the frontend connects,\n // and it enables the Profiler's reload-and-profile functionality to work as well.\n pendingOperationsQueue.push(operations);\n } else {\n // If we've already connected to the frontend, just pass the operations through.\n hook.emit('operations', operations);\n }\n\n pendingOperations.length = 0;\n pendingRealUnmountedIDs.length = 0;\n pendingSimulatedUnmountedIDs.length = 0;\n pendingUnmountedRootID = null;\n pendingStringTable.clear();\n pendingStringTableLength = 0;\n }\n\n function getStringID(str: string | null): number {\n if (str === null) {\n return 0;\n }\n const existingID = pendingStringTable.get(str);\n if (existingID !== undefined) {\n return existingID;\n }\n const stringID = pendingStringTable.size + 1;\n pendingStringTable.set(str, stringID);\n // The string table total length needs to account\n // both for the string length, and for the array item\n // that contains the length itself. Hence + 1.\n pendingStringTableLength += str.length + 1;\n return stringID;\n }\n\n function recordMount(fiber: Fiber, parentFiber: Fiber | null) {\n if (__DEBUG__) {\n debug('recordMount()', fiber, parentFiber);\n }\n\n const isRoot = fiber.tag === HostRoot;\n const id = getFiberID(getPrimaryFiber(fiber));\n\n const hasOwnerMetadata = fiber.hasOwnProperty('_debugOwner');\n const isProfilingSupported = fiber.hasOwnProperty('treeBaseDuration');\n\n if (isRoot) {\n pushOperation(TREE_OPERATION_ADD);\n pushOperation(id);\n pushOperation(ElementTypeRoot);\n pushOperation(isProfilingSupported ? 1 : 0);\n pushOperation(hasOwnerMetadata ? 1 : 0);\n\n if (isProfiling) {\n if (displayNamesByRootID !== null) {\n displayNamesByRootID.set(id, getDisplayNameForRoot(fiber));\n }\n }\n } else {\n const {key} = fiber;\n const displayName = getDisplayNameForFiber(fiber);\n const elementType = getElementTypeForFiber(fiber);\n const {_debugOwner} = fiber;\n\n const ownerID =\n _debugOwner != null ? getFiberID(getPrimaryFiber(_debugOwner)) : 0;\n const parentID = parentFiber\n ? getFiberID(getPrimaryFiber(parentFiber))\n : 0;\n\n const displayNameStringID = getStringID(displayName);\n\n // This check is a guard to handle a React element that has been modified\n // in such a way as to bypass the default stringification of the \"key\" property.\n const keyString = key === null ? null : '' + key;\n const keyStringID = getStringID(keyString);\n\n pushOperation(TREE_OPERATION_ADD);\n pushOperation(id);\n pushOperation(elementType);\n pushOperation(parentID);\n pushOperation(ownerID);\n pushOperation(displayNameStringID);\n pushOperation(keyStringID);\n }\n\n if (isProfilingSupported) {\n idToRootMap.set(id, currentRootID);\n\n recordProfilingDurations(fiber);\n }\n }\n\n function recordUnmount(fiber: Fiber, isSimulated: boolean) {\n if (__DEBUG__) {\n debug('recordUnmount()', fiber);\n }\n\n if (trackedPathMatchFiber !== null) {\n // We're in the process of trying to restore previous selection.\n // If this fiber matched but is being unmounted, there's no use trying.\n // Reset the state so we don't keep holding onto it.\n if (\n fiber === trackedPathMatchFiber ||\n fiber === trackedPathMatchFiber.alternate\n ) {\n setTrackedPath(null);\n }\n }\n\n const isRoot = fiber.tag === HostRoot;\n const primaryFiber = getPrimaryFiber(fiber);\n if (!fiberToIDMap.has(primaryFiber)) {\n // If we've never seen this Fiber, it might be because\n // it is inside a non-current Suspense fragment tree,\n // and so the store is not even aware of it.\n // In that case we can just ignore it, or otherwise\n // there will be errors later on.\n primaryFibers.delete(primaryFiber);\n // TODO: this is fragile and can obscure actual bugs.\n return;\n }\n const id = getFiberID(primaryFiber);\n\n if (isRoot) {\n // Roots must be removed only after all children (pending and simulated) have been removed.\n // So we track it separately.\n pendingUnmountedRootID = id;\n } else if (!shouldFilterFiber(fiber)) {\n // To maintain child-first ordering,\n // we'll push it into one of these queues,\n // and later arrange them in the correct order.\n if (isSimulated) {\n pendingSimulatedUnmountedIDs.push(id);\n } else {\n pendingRealUnmountedIDs.push(id);\n }\n }\n fiberToIDMap.delete(primaryFiber);\n idToFiberMap.delete(id);\n primaryFibers.delete(primaryFiber);\n\n const isProfilingSupported = fiber.hasOwnProperty('treeBaseDuration');\n if (isProfilingSupported) {\n idToRootMap.delete(id);\n idToTreeBaseDurationMap.delete(id);\n }\n }\n\n function mountFiberRecursively(\n fiber: Fiber,\n parentFiber: Fiber | null,\n traverseSiblings: boolean,\n traceNearestHostComponentUpdate: boolean,\n ) {\n if (__DEBUG__) {\n debug('mountFiberRecursively()', fiber, parentFiber);\n }\n\n // If we have the tree selection from previous reload, try to match this Fiber.\n // Also remember whether to do the same for siblings.\n const mightSiblingsBeOnTrackedPath = updateTrackedPathStateBeforeMount(\n fiber,\n );\n\n const shouldIncludeInTree = !shouldFilterFiber(fiber);\n if (shouldIncludeInTree) {\n recordMount(fiber, parentFiber);\n }\n\n if (traceUpdatesEnabled) {\n if (traceNearestHostComponentUpdate) {\n const elementType = getElementTypeForFiber(fiber);\n // If an ancestor updated, we should mark the nearest host nodes for highlighting.\n if (elementType === ElementTypeHostComponent) {\n traceUpdatesForNodes.add(fiber.stateNode);\n traceNearestHostComponentUpdate = false;\n }\n }\n\n // We intentionally do not re-enable the traceNearestHostComponentUpdate flag in this branch,\n // because we don't want to highlight every host node inside of a newly mounted subtree.\n }\n\n const isSuspense = fiber.tag === ReactTypeOfWork.SuspenseComponent;\n if (isSuspense) {\n const isTimedOut = fiber.memoizedState !== null;\n if (isTimedOut) {\n // Special case: if Suspense mounts in a timed-out state,\n // get the fallback child from the inner fragment and mount\n // it as if it was our own child. Updates handle this too.\n const primaryChildFragment = fiber.child;\n const fallbackChildFragment = primaryChildFragment\n ? primaryChildFragment.sibling\n : null;\n const fallbackChild = fallbackChildFragment\n ? fallbackChildFragment.child\n : null;\n if (fallbackChild !== null) {\n mountFiberRecursively(\n fallbackChild,\n shouldIncludeInTree ? fiber : parentFiber,\n true,\n traceNearestHostComponentUpdate,\n );\n }\n } else {\n let primaryChild: Fiber | null = null;\n const areSuspenseChildrenConditionallyWrapped =\n OffscreenComponent === -1;\n if (areSuspenseChildrenConditionallyWrapped) {\n primaryChild = fiber.child;\n } else if (fiber.child !== null) {\n primaryChild = fiber.child.child;\n }\n if (primaryChild !== null) {\n mountFiberRecursively(\n primaryChild,\n shouldIncludeInTree ? fiber : parentFiber,\n true,\n traceNearestHostComponentUpdate,\n );\n }\n }\n } else {\n if (fiber.child !== null) {\n mountFiberRecursively(\n fiber.child,\n shouldIncludeInTree ? fiber : parentFiber,\n true,\n traceNearestHostComponentUpdate,\n );\n }\n }\n\n // We're exiting this Fiber now, and entering its siblings.\n // If we have selection to restore, we might need to re-activate tracking.\n updateTrackedPathStateAfterMount(mightSiblingsBeOnTrackedPath);\n\n if (traverseSiblings && fiber.sibling !== null) {\n mountFiberRecursively(\n fiber.sibling,\n parentFiber,\n true,\n traceNearestHostComponentUpdate,\n );\n }\n }\n\n // We use this to simulate unmounting for Suspense trees\n // when we switch from primary to fallback.\n function unmountFiberChildrenRecursively(fiber: Fiber) {\n if (__DEBUG__) {\n debug('unmountFiberChildrenRecursively()', fiber);\n }\n\n // We might meet a nested Suspense on our way.\n const isTimedOutSuspense =\n fiber.tag === ReactTypeOfWork.SuspenseComponent &&\n fiber.memoizedState !== null;\n\n let child = fiber.child;\n if (isTimedOutSuspense) {\n // If it's showing fallback tree, let's traverse it instead.\n const primaryChildFragment = fiber.child;\n const fallbackChildFragment = primaryChildFragment\n ? primaryChildFragment.sibling\n : null;\n // Skip over to the real Fiber child.\n child = fallbackChildFragment ? fallbackChildFragment.child : null;\n }\n\n while (child !== null) {\n // Record simulated unmounts children-first.\n // We skip nodes without return because those are real unmounts.\n if (child.return !== null) {\n unmountFiberChildrenRecursively(child);\n recordUnmount(child, true);\n }\n child = child.sibling;\n }\n }\n\n function recordProfilingDurations(fiber: Fiber) {\n const id = getFiberID(getPrimaryFiber(fiber));\n const {actualDuration, treeBaseDuration} = fiber;\n\n idToTreeBaseDurationMap.set(id, treeBaseDuration || 0);\n\n if (isProfiling) {\n const {alternate} = fiber;\n\n // It's important to update treeBaseDuration even if the current Fiber did not render,\n // because it's possible that one of its descendants did.\n if (\n alternate == null ||\n treeBaseDuration !== alternate.treeBaseDuration\n ) {\n // Tree base duration updates are included in the operations typed array.\n // So we have to convert them from milliseconds to microseconds so we can send them as ints.\n const convertedTreeBaseDuration = Math.floor(\n (treeBaseDuration || 0) * 1000,\n );\n pushOperation(TREE_OPERATION_UPDATE_TREE_BASE_DURATION);\n pushOperation(id);\n pushOperation(convertedTreeBaseDuration);\n }\n\n if (alternate == null || didFiberRender(alternate, fiber)) {\n if (actualDuration != null) {\n // The actual duration reported by React includes time spent working on children.\n // This is useful information, but it's also useful to be able to exclude child durations.\n // The frontend can't compute this, since the immediate children may have been filtered out.\n // So we need to do this on the backend.\n // Note that this calculated self duration is not the same thing as the base duration.\n // The two are calculated differently (tree duration does not accumulate).\n let selfDuration = actualDuration;\n let child = fiber.child;\n while (child !== null) {\n selfDuration -= child.actualDuration || 0;\n child = child.sibling;\n }\n\n // If profiling is active, store durations for elements that were rendered during the commit.\n // Note that we should do this for any fiber we performed work on, regardless of its actualDuration value.\n // In some cases actualDuration might be 0 for fibers we worked on (particularly if we're using Date.now)\n // In other cases (e.g. Memo) actualDuration might be greater than 0 even if we \"bailed out\".\n const metadata = ((currentCommitProfilingMetadata: any): CommitProfilingData);\n metadata.durations.push(id, actualDuration, selfDuration);\n metadata.maxActualDuration = Math.max(\n metadata.maxActualDuration,\n actualDuration,\n );\n\n if (recordChangeDescriptions) {\n const changeDescription = getChangeDescription(alternate, fiber);\n if (changeDescription !== null) {\n if (metadata.changeDescriptions !== null) {\n metadata.changeDescriptions.set(id, changeDescription);\n }\n }\n\n updateContextsForFiber(fiber);\n }\n }\n }\n }\n }\n\n function recordResetChildren(fiber: Fiber, childSet: Fiber) {\n if (__DEBUG__) {\n debug('recordResetChildren()', childSet, fiber);\n }\n // The frontend only really cares about the displayName, key, and children.\n // The first two don't really change, so we are only concerned with the order of children here.\n // This is trickier than a simple comparison though, since certain types of fibers are filtered.\n const nextChildren: Array<number> = [];\n\n // This is a naive implementation that shallowly recourses children.\n // We might want to revisit this if it proves to be too inefficient.\n let child = childSet;\n while (child !== null) {\n findReorderedChildrenRecursively(child, nextChildren);\n child = child.sibling;\n }\n\n const numChildren = nextChildren.length;\n if (numChildren < 2) {\n // No need to reorder.\n return;\n }\n pushOperation(TREE_OPERATION_REORDER_CHILDREN);\n pushOperation(getFiberID(getPrimaryFiber(fiber)));\n pushOperation(numChildren);\n for (let i = 0; i < nextChildren.length; i++) {\n pushOperation(nextChildren[i]);\n }\n }\n\n function findReorderedChildrenRecursively(\n fiber: Fiber,\n nextChildren: Array<number>,\n ) {\n if (!shouldFilterFiber(fiber)) {\n nextChildren.push(getFiberID(getPrimaryFiber(fiber)));\n } else {\n let child = fiber.child;\n const isTimedOutSuspense =\n fiber.tag === SuspenseComponent && fiber.memoizedState !== null;\n if (isTimedOutSuspense) {\n // Special case: if Suspense mounts in a timed-out state,\n // get the fallback child from the inner fragment,\n // and skip over the primary child.\n const primaryChildFragment = fiber.child;\n const fallbackChildFragment = primaryChildFragment\n ? primaryChildFragment.sibling\n : null;\n const fallbackChild = fallbackChildFragment\n ? fallbackChildFragment.child\n : null;\n if (fallbackChild !== null) {\n child = fallbackChild;\n }\n }\n while (child !== null) {\n findReorderedChildrenRecursively(child, nextChildren);\n child = child.sibling;\n }\n }\n }\n\n // Returns whether closest unfiltered fiber parent needs to reset its child list.\n function updateFiberRecursively(\n nextFiber: Fiber,\n prevFiber: Fiber,\n parentFiber: Fiber | null,\n traceNearestHostComponentUpdate: boolean,\n ): boolean {\n if (__DEBUG__) {\n debug('updateFiberRecursively()', nextFiber, parentFiber);\n }\n\n if (traceUpdatesEnabled) {\n const elementType = getElementTypeForFiber(nextFiber);\n if (traceNearestHostComponentUpdate) {\n // If an ancestor updated, we should mark the nearest host nodes for highlighting.\n if (elementType === ElementTypeHostComponent) {\n traceUpdatesForNodes.add(nextFiber.stateNode);\n traceNearestHostComponentUpdate = false;\n }\n } else {\n if (\n elementType === ElementTypeFunction ||\n elementType === ElementTypeClass ||\n elementType === ElementTypeContext\n ) {\n // Otherwise if this is a traced ancestor, flag for the nearest host descendant(s).\n traceNearestHostComponentUpdate = didFiberRender(\n prevFiber,\n nextFiber,\n );\n }\n }\n }\n\n if (\n mostRecentlyInspectedElement !== null &&\n mostRecentlyInspectedElement.id ===\n getFiberID(getPrimaryFiber(nextFiber)) &&\n didFiberRender(prevFiber, nextFiber)\n ) {\n // If this Fiber has updated, clear cached inspected data.\n // If it is inspected again, it may need to be re-run to obtain updated hooks values.\n hasElementUpdatedSinceLastInspected = true;\n }\n\n const shouldIncludeInTree = !shouldFilterFiber(nextFiber);\n const isSuspense = nextFiber.tag === SuspenseComponent;\n let shouldResetChildren = false;\n // The behavior of timed-out Suspense trees is unique.\n // Rather than unmount the timed out content (and possibly lose important state),\n // React re-parents this content within a hidden Fragment while the fallback is showing.\n // This behavior doesn't need to be observable in the DevTools though.\n // It might even result in a bad user experience for e.g. node selection in the Elements panel.\n // The easiest fix is to strip out the intermediate Fragment fibers,\n // so the Elements panel and Profiler don't need to special case them.\n // Suspense components only have a non-null memoizedState if they're timed-out.\n const prevDidTimeout = isSuspense && prevFiber.memoizedState !== null;\n const nextDidTimeOut = isSuspense && nextFiber.memoizedState !== null;\n // The logic below is inspired by the code paths in updateSuspenseComponent()\n // inside ReactFiberBeginWork in the React source code.\n if (prevDidTimeout && nextDidTimeOut) {\n // Fallback -> Fallback:\n // 1. Reconcile fallback set.\n const nextFiberChild = nextFiber.child;\n const nextFallbackChildSet = nextFiberChild\n ? nextFiberChild.sibling\n : null;\n // Note: We can't use nextFiber.child.sibling.alternate\n // because the set is special and alternate may not exist.\n const prevFiberChild = prevFiber.child;\n const prevFallbackChildSet = prevFiberChild\n ? prevFiberChild.sibling\n : null;\n if (\n nextFallbackChildSet != null &&\n prevFallbackChildSet != null &&\n updateFiberRecursively(\n nextFallbackChildSet,\n prevFallbackChildSet,\n nextFiber,\n traceNearestHostComponentUpdate,\n )\n ) {\n shouldResetChildren = true;\n }\n } else if (prevDidTimeout && !nextDidTimeOut) {\n // Fallback -> Primary:\n // 1. Unmount fallback set\n // Note: don't emulate fallback unmount because React actually did it.\n // 2. Mount primary set\n const nextPrimaryChildSet = nextFiber.child;\n if (nextPrimaryChildSet !== null) {\n mountFiberRecursively(\n nextPrimaryChildSet,\n shouldIncludeInTree ? nextFiber : parentFiber,\n true,\n traceNearestHostComponentUpdate,\n );\n }\n shouldResetChildren = true;\n } else if (!prevDidTimeout && nextDidTimeOut) {\n // Primary -> Fallback:\n // 1. Hide primary set\n // This is not a real unmount, so it won't get reported by React.\n // We need to manually walk the previous tree and record unmounts.\n unmountFiberChildrenRecursively(prevFiber);\n // 2. Mount fallback set\n const nextFiberChild = nextFiber.child;\n const nextFallbackChildSet = nextFiberChild\n ? nextFiberChild.sibling\n : null;\n if (nextFallbackChildSet != null) {\n mountFiberRecursively(\n nextFallbackChildSet,\n shouldIncludeInTree ? nextFiber : parentFiber,\n true,\n traceNearestHostComponentUpdate,\n );\n shouldResetChildren = true;\n }\n } else {\n // Common case: Primary -> Primary.\n // This is the same code path as for non-Suspense fibers.\n if (nextFiber.child !== prevFiber.child) {\n // If the first child is different, we need to traverse them.\n // Each next child will be either a new child (mount) or an alternate (update).\n let nextChild = nextFiber.child;\n let prevChildAtSameIndex = prevFiber.child;\n while (nextChild) {\n // We already know children will be referentially different because\n // they are either new mounts or alternates of previous children.\n // Schedule updates and mounts depending on whether alternates exist.\n // We don't track deletions here because they are reported separately.\n if (nextChild.alternate) {\n const prevChild = nextChild.alternate;\n if (\n updateFiberRecursively(\n nextChild,\n prevChild,\n shouldIncludeInTree ? nextFiber : parentFiber,\n traceNearestHostComponentUpdate,\n )\n ) {\n // If a nested tree child order changed but it can't handle its own\n // child order invalidation (e.g. because it's filtered out like host nodes),\n // propagate the need to reset child order upwards to this Fiber.\n shouldResetChildren = true;\n }\n // However we also keep track if the order of the children matches\n // the previous order. They are always different referentially, but\n // if the instances line up conceptually we'll want to know that.\n if (prevChild !== prevChildAtSameIndex) {\n shouldResetChildren = true;\n }\n } else {\n mountFiberRecursively(\n nextChild,\n shouldIncludeInTree ? nextFiber : parentFiber,\n false,\n traceNearestHostComponentUpdate,\n );\n shouldResetChildren = true;\n }\n // Try the next child.\n nextChild = nextChild.sibling;\n // Advance the pointer in the previous list so that we can\n // keep comparing if they line up.\n if (!shouldResetChildren && prevChildAtSameIndex !== null) {\n prevChildAtSameIndex = prevChildAtSameIndex.sibling;\n }\n }\n // If we have no more children, but used to, they don't line up.\n if (prevChildAtSameIndex !== null) {\n shouldResetChildren = true;\n }\n } else {\n if (traceUpdatesEnabled) {\n // If we're tracing updates and we've bailed out before reaching a host node,\n // we should fall back to recursively marking the nearest host descendants for highlight.\n if (traceNearestHostComponentUpdate) {\n const hostFibers = findAllCurrentHostFibers(\n getFiberID(getPrimaryFiber(nextFiber)),\n );\n hostFibers.forEach(hostFiber => {\n traceUpdatesForNodes.add(hostFiber.stateNode);\n });\n }\n }\n }\n }\n\n if (shouldIncludeInTree) {\n const isProfilingSupported = nextFiber.hasOwnProperty('treeBaseDuration');\n if (isProfilingSupported) {\n recordProfilingDurations(nextFiber);\n }\n }\n if (shouldResetChildren) {\n // We need to crawl the subtree for closest non-filtered Fibers\n // so that we can display them in a flat children set.\n if (shouldIncludeInTree) {\n // Normally, search for children from the rendered child.\n let nextChildSet = nextFiber.child;\n if (nextDidTimeOut) {\n // Special case: timed-out Suspense renders the fallback set.\n const nextFiberChild = nextFiber.child;\n nextChildSet = nextFiberChild ? nextFiberChild.sibling : null;\n }\n if (nextChildSet != null) {\n recordResetChildren(nextFiber, nextChildSet);\n }\n // We've handled the child order change for this Fiber.\n // Since it's included, there's no need to invalidate parent child order.\n return false;\n } else {\n // Let the closest unfiltered parent Fiber reset its child order instead.\n return true;\n }\n } else {\n return false;\n }\n }\n\n function cleanup() {\n // We don't patch any methods so there is no cleanup.\n }\n\n function flushInitialOperations() {\n const localPendingOperationsQueue = pendingOperationsQueue;\n\n pendingOperationsQueue = null;\n\n if (\n localPendingOperationsQueue !== null &&\n localPendingOperationsQueue.length > 0\n ) {\n // We may have already queued up some operations before the frontend connected\n // If so, let the frontend know about them.\n localPendingOperationsQueue.forEach(operations => {\n hook.emit('operations', operations);\n });\n } else {\n // Before the traversals, remember to start tracking\n // our path in case we have selection to restore.\n if (trackedPath !== null) {\n mightBeOnTrackedPath = true;\n }\n // If we have not been profiling, then we can just walk the tree and build up its current state as-is.\n hook.getFiberRoots(rendererID).forEach(root => {\n currentRootID = getFiberID(getPrimaryFiber(root.current));\n setRootPseudoKey(currentRootID, root.current);\n\n // Checking root.memoizedInteractions handles multi-renderer edge-case-\n // where some v16 renderers support profiling and others don't.\n if (isProfiling && root.memoizedInteractions != null) {\n // If profiling is active, store commit time and duration, and the current interactions.\n // The frontend may request this information after profiling has stopped.\n currentCommitProfilingMetadata = {\n changeDescriptions: recordChangeDescriptions ? new Map() : null,\n durations: [],\n commitTime: getCurrentTime() - profilingStartTime,\n interactions: Array.from(root.memoizedInteractions).map(\n (interaction: Interaction) => ({\n ...interaction,\n timestamp: interaction.timestamp - profilingStartTime,\n }),\n ),\n maxActualDuration: 0,\n priorityLevel: null,\n };\n }\n\n mountFiberRecursively(root.current, null, false, false);\n flushPendingEvents(root);\n currentRootID = -1;\n });\n }\n }\n\n function handleCommitFiberUnmount(fiber) {\n // This is not recursive.\n // We can't traverse fibers after unmounting so instead\n // we rely on React telling us about each unmount.\n recordUnmount(fiber, false);\n }\n\n function handleCommitFiberRoot(root, priorityLevel) {\n const current = root.current;\n const alternate = current.alternate;\n\n currentRootID = getFiberID(getPrimaryFiber(current));\n\n // Before the traversals, remember to start tracking\n // our path in case we have selection to restore.\n if (trackedPath !== null) {\n mightBeOnTrackedPath = true;\n }\n\n if (traceUpdatesEnabled) {\n traceUpdatesForNodes.clear();\n }\n\n // Checking root.memoizedInteractions handles multi-renderer edge-case-\n // where some v16 renderers support profiling and others don't.\n const isProfilingSupported = root.memoizedInteractions != null;\n\n if (isProfiling && isProfilingSupported) {\n // If profiling is active, store commit time and duration, and the current interactions.\n // The frontend may request this information after profiling has stopped.\n currentCommitProfilingMetadata = {\n changeDescriptions: recordChangeDescriptions ? new Map() : null,\n durations: [],\n commitTime: getCurrentTime() - profilingStartTime,\n interactions: Array.from(root.memoizedInteractions).map(\n (interaction: Interaction) => ({\n ...interaction,\n timestamp: interaction.timestamp - profilingStartTime,\n }),\n ),\n maxActualDuration: 0,\n priorityLevel:\n priorityLevel == null ? null : formatPriorityLevel(priorityLevel),\n };\n }\n\n if (alternate) {\n // TODO: relying on this seems a bit fishy.\n const wasMounted =\n alternate.memoizedState != null &&\n alternate.memoizedState.element != null;\n const isMounted =\n current.memoizedState != null && current.memoizedState.element != null;\n if (!wasMounted && isMounted) {\n // Mount a new root.\n setRootPseudoKey(currentRootID, current);\n mountFiberRecursively(current, null, false, false);\n } else if (wasMounted && isMounted) {\n // Update an existing root.\n updateFiberRecursively(current, alternate, null, false);\n } else if (wasMounted && !isMounted) {\n // Unmount an existing root.\n removeRootPseudoKey(currentRootID);\n recordUnmount(current, false);\n }\n } else {\n // Mount a new root.\n setRootPseudoKey(currentRootID, current);\n mountFiberRecursively(current, null, false, false);\n }\n\n if (isProfiling && isProfilingSupported) {\n const commitProfilingMetadata = ((rootToCommitProfilingMetadataMap: any): CommitProfilingMetadataMap).get(\n currentRootID,\n );\n if (commitProfilingMetadata != null) {\n commitProfilingMetadata.push(\n ((currentCommitProfilingMetadata: any): CommitProfilingData),\n );\n } else {\n ((rootToCommitProfilingMetadataMap: any): CommitProfilingMetadataMap).set(\n currentRootID,\n [((currentCommitProfilingMetadata: any): CommitProfilingData)],\n );\n }\n }\n\n // We're done here.\n flushPendingEvents(root);\n\n if (traceUpdatesEnabled) {\n hook.emit('traceUpdates', traceUpdatesForNodes);\n }\n\n currentRootID = -1;\n }\n\n function findAllCurrentHostFibers(id: number): $ReadOnlyArray<Fiber> {\n const fibers = [];\n const fiber = findCurrentFiberUsingSlowPathById(id);\n if (!fiber) {\n return fibers;\n }\n\n // Next we'll drill down this component to find all HostComponent/Text.\n let node: Fiber = fiber;\n while (true) {\n if (node.tag === HostComponent || node.tag === HostText) {\n fibers.push(node);\n } else if (node.child) {\n node.child.return = node;\n node = node.child;\n continue;\n }\n if (node === fiber) {\n return fibers;\n }\n while (!node.sibling) {\n if (!node.return || node.return === fiber) {\n return fibers;\n }\n node = node.return;\n }\n node.sibling.return = node.return;\n node = node.sibling;\n }\n // Flow needs the return here, but ESLint complains about it.\n // eslint-disable-next-line no-unreachable\n return fibers;\n }\n\n function findNativeNodesForFiberID(id: number) {\n try {\n let fiber = findCurrentFiberUsingSlowPathById(id);\n if (fiber === null) {\n return null;\n }\n // Special case for a timed-out Suspense.\n const isTimedOutSuspense =\n fiber.tag === SuspenseComponent && fiber.memoizedState !== null;\n if (isTimedOutSuspense) {\n // A timed-out Suspense's findDOMNode is useless.\n // Try our best to find the fallback directly.\n const maybeFallbackFiber = fiber.child && fiber.child.sibling;\n if (maybeFallbackFiber != null) {\n fiber = maybeFallbackFiber;\n }\n }\n const hostFibers = findAllCurrentHostFibers(id);\n return hostFibers.map(hostFiber => hostFiber.stateNode).filter(Boolean);\n } catch (err) {\n // The fiber might have unmounted by now.\n return null;\n }\n }\n\n function getDisplayNameForFiberID(id) {\n const fiber = idToFiberMap.get(id);\n return fiber != null ? getDisplayNameForFiber(((fiber: any): Fiber)) : null;\n }\n\n function getFiberIDForNative(\n hostInstance,\n findNearestUnfilteredAncestor = false,\n ) {\n let fiber = renderer.findFiberByHostInstance(hostInstance);\n if (fiber != null) {\n if (findNearestUnfilteredAncestor) {\n while (fiber !== null && shouldFilterFiber(fiber)) {\n fiber = fiber.return;\n }\n }\n return getFiberID(getPrimaryFiber(((fiber: any): Fiber)));\n }\n return null;\n }\n\n const MOUNTING = 1;\n const MOUNTED = 2;\n const UNMOUNTED = 3;\n\n // This function is copied from React and should be kept in sync:\n // https://github.com/facebook/react/blob/master/packages/react-reconciler/src/ReactFiberTreeReflection.js\n function isFiberMountedImpl(fiber: Fiber): number {\n let node = fiber;\n if (!fiber.alternate) {\n // If there is no alternate, this might be a new tree that isn't inserted\n // yet. If it is, then it will have a pending insertion effect on it.\n if ((getFiberFlags(node) & Placement) !== NoFlags) {\n return MOUNTING;\n }\n while (node.return) {\n node = node.return;\n if ((getFiberFlags(node) & Placement) !== NoFlags) {\n return MOUNTING;\n }\n }\n } else {\n while (node.return) {\n node = node.return;\n }\n }\n if (node.tag === HostRoot) {\n // TODO: Check if this was a nested HostRoot when used with\n // renderContainerIntoSubtree.\n return MOUNTED;\n }\n // If we didn't hit the root, that means that we're in an disconnected tree\n // that has been unmounted.\n return UNMOUNTED;\n }\n\n // This function is copied from React and should be kept in sync:\n // https://github.com/facebook/react/blob/master/packages/react-reconciler/src/ReactFiberTreeReflection.js\n // It would be nice if we updated React to inject this function directly (vs just indirectly via findDOMNode).\n // BEGIN copied code\n function findCurrentFiberUsingSlowPathById(id: number): Fiber | null {\n const fiber = idToFiberMap.get(id);\n if (fiber == null) {\n console.warn(`Could not find Fiber with id \"${id}\"`);\n return null;\n }\n\n const alternate = fiber.alternate;\n if (!alternate) {\n // If there is no alternate, then we only need to check if it is mounted.\n const state = isFiberMountedImpl(fiber);\n if (state === UNMOUNTED) {\n throw Error('Unable to find node on an unmounted component.');\n }\n if (state === MOUNTING) {\n return null;\n }\n return fiber;\n }\n // If we have two possible branches, we'll walk backwards up to the root\n // to see what path the root points to. On the way we may hit one of the\n // special cases and we'll deal with them.\n let a: Fiber = fiber;\n let b: Fiber = alternate;\n while (true) {\n const parentA = a.return;\n if (parentA === null) {\n // We're at the root.\n break;\n }\n const parentB = parentA.alternate;\n if (parentB === null) {\n // There is no alternate. This is an unusual case. Currently, it only\n // happens when a Suspense component is hidden. An extra fragment fiber\n // is inserted in between the Suspense fiber and its children. Skip\n // over this extra fragment fiber and proceed to the next parent.\n const nextParent = parentA.return;\n if (nextParent !== null) {\n a = b = nextParent;\n continue;\n }\n // If there's no parent, we're at the root.\n break;\n }\n\n // If both copies of the parent fiber point to the same child, we can\n // assume that the child is current. This happens when we bailout on low\n // priority: the bailed out fiber's child reuses the current child.\n if (parentA.child === parentB.child) {\n let child = parentA.child;\n while (child) {\n if (child === a) {\n // We've determined that A is the current branch.\n if (isFiberMountedImpl(parentA) !== MOUNTED) {\n throw Error('Unable to find node on an unmounted component.');\n }\n return fiber;\n }\n if (child === b) {\n // We've determined that B is the current branch.\n if (isFiberMountedImpl(parentA) !== MOUNTED) {\n throw Error('Unable to find node on an unmounted component.');\n }\n return alternate;\n }\n child = child.sibling;\n }\n // We should never have an alternate for any mounting node. So the only\n // way this could possibly happen is if this was unmounted, if at all.\n throw Error('Unable to find node on an unmounted component.');\n }\n\n if (a.return !== b.return) {\n // The return pointer of A and the return pointer of B point to different\n // fibers. We assume that return pointers never criss-cross, so A must\n // belong to the child set of A.return, and B must belong to the child\n // set of B.return.\n a = parentA;\n b = parentB;\n } else {\n // The return pointers point to the same fiber. We'll have to use the\n // default, slow path: scan the child sets of each parent alternate to see\n // which child belongs to which set.\n //\n // Search parent A's child set\n let didFindChild = false;\n let child = parentA.child;\n while (child) {\n if (child === a) {\n didFindChild = true;\n a = parentA;\n b = parentB;\n break;\n }\n if (child === b) {\n didFindChild = true;\n b = parentA;\n a = parentB;\n break;\n }\n child = child.sibling;\n }\n if (!didFindChild) {\n // Search parent B's child set\n child = parentB.child;\n while (child) {\n if (child === a) {\n didFindChild = true;\n a = parentB;\n b = parentA;\n break;\n }\n if (child === b) {\n didFindChild = true;\n b = parentB;\n a = parentA;\n break;\n }\n child = child.sibling;\n }\n if (!didFindChild) {\n throw Error(\n 'Child was not found in either parent set. This indicates a bug ' +\n 'in React related to the return pointer. Please file an issue.',\n );\n }\n }\n }\n\n if (a.alternate !== b) {\n throw Error(\n \"Return fibers should always be each others' alternates. \" +\n 'This error is likely caused by a bug in React. Please file an issue.',\n );\n }\n }\n // If the root is not a host container, we're in a disconnected tree. I.e.\n // unmounted.\n if (a.tag !== HostRoot) {\n throw Error('Unable to find node on an unmounted component.');\n }\n if (a.stateNode.current === a) {\n // We've determined that A is the current branch.\n return fiber;\n }\n // Otherwise B has to be current branch.\n return alternate;\n }\n // END copied code\n\n function prepareViewAttributeSource(\n id: number,\n path: Array<string | number>,\n ): void {\n const isCurrent = isMostRecentlyInspectedElementCurrent(id);\n if (isCurrent) {\n window.$attribute = getInObject(\n ((mostRecentlyInspectedElement: any): InspectedElement),\n path,\n );\n }\n }\n\n function prepareViewElementSource(id: number): void {\n const fiber = idToFiberMap.get(id);\n if (fiber == null) {\n console.warn(`Could not find Fiber with id \"${id}\"`);\n return;\n }\n\n const {elementType, tag, type} = fiber;\n\n switch (tag) {\n case ClassComponent:\n case IncompleteClassComponent:\n case IndeterminateComponent:\n case FunctionComponent:\n global.$type = type;\n break;\n case ForwardRef:\n global.$type = type.render;\n break;\n case MemoComponent:\n case SimpleMemoComponent:\n global.$type =\n elementType != null && elementType.type != null\n ? elementType.type\n : type;\n break;\n default:\n global.$type = null;\n break;\n }\n }\n\n function getOwnersList(id: number): Array<Owner> | null {\n const fiber = findCurrentFiberUsingSlowPathById(id);\n if (fiber == null) {\n return null;\n }\n\n const {_debugOwner} = fiber;\n\n const owners = [\n {\n displayName: getDisplayNameForFiber(fiber) || 'Anonymous',\n id,\n type: getElementTypeForFiber(fiber),\n },\n ];\n\n if (_debugOwner) {\n let owner = _debugOwner;\n while (owner !== null) {\n owners.unshift({\n displayName: getDisplayNameForFiber(owner) || 'Anonymous',\n id: getFiberID(getPrimaryFiber(owner)),\n type: getElementTypeForFiber(owner),\n });\n owner = owner._debugOwner || null;\n }\n }\n\n return owners;\n }\n\n // Fast path props lookup for React Native style editor.\n // Could use inspectElementRaw() but that would require shallow rendering hooks components,\n // and could also mess with memoization.\n function getInstanceAndStyle(id: number): InstanceAndStyle {\n let instance = null;\n let style = null;\n\n const fiber = findCurrentFiberUsingSlowPathById(id);\n if (fiber !== null) {\n instance = fiber.stateNode;\n\n if (fiber.memoizedProps !== null) {\n style = fiber.memoizedProps.style;\n }\n }\n\n return {instance, style};\n }\n\n function inspectElementRaw(id: number): InspectedElement | null {\n const fiber = findCurrentFiberUsingSlowPathById(id);\n if (fiber == null) {\n return null;\n }\n\n const {\n _debugOwner,\n _debugSource,\n stateNode,\n key,\n memoizedProps,\n memoizedState,\n dependencies,\n tag,\n type,\n } = fiber;\n\n const elementType = getElementTypeForFiber(fiber);\n\n const usesHooks =\n (tag === FunctionComponent ||\n tag === SimpleMemoComponent ||\n tag === ForwardRef) &&\n (!!memoizedState || !!dependencies);\n\n const typeSymbol = getTypeSymbol(type);\n\n let canViewSource = false;\n let context = null;\n if (\n tag === ClassComponent ||\n tag === FunctionComponent ||\n tag === IncompleteClassComponent ||\n tag === IndeterminateComponent ||\n tag === MemoComponent ||\n tag === ForwardRef ||\n tag === SimpleMemoComponent\n ) {\n canViewSource = true;\n if (stateNode && stateNode.context != null) {\n // Don't show an empty context object for class components that don't use the context API.\n const shouldHideContext =\n elementType === ElementTypeClass &&\n !(type.contextTypes || type.contextType);\n\n if (!shouldHideContext) {\n context = stateNode.context;\n }\n }\n } else if (\n typeSymbol === CONTEXT_NUMBER ||\n typeSymbol === CONTEXT_SYMBOL_STRING\n ) {\n // 16.3-16.5 read from \"type\" because the Consumer is the actual context object.\n // 16.6+ should read from \"type._context\" because Consumer can be different (in DEV).\n // NOTE Keep in sync with getDisplayNameForFiber()\n const consumerResolvedContext = type._context || type;\n\n // Global context value.\n context = consumerResolvedContext._currentValue || null;\n\n // Look for overridden value.\n let current = ((fiber: any): Fiber).return;\n while (current !== null) {\n const currentType = current.type;\n const currentTypeSymbol = getTypeSymbol(currentType);\n if (\n currentTypeSymbol === PROVIDER_NUMBER ||\n currentTypeSymbol === PROVIDER_SYMBOL_STRING\n ) {\n // 16.3.0 exposed the context object as \"context\"\n // PR #12501 changed it to \"_context\" for 16.3.1+\n // NOTE Keep in sync with getDisplayNameForFiber()\n const providerResolvedContext =\n currentType._context || currentType.context;\n if (providerResolvedContext === consumerResolvedContext) {\n context = current.memoizedProps.value;\n break;\n }\n }\n\n current = current.return;\n }\n }\n\n let hasLegacyContext = false;\n if (context !== null) {\n hasLegacyContext = !!type.contextTypes;\n\n // To simplify hydration and display logic for context, wrap in a value object.\n // Otherwise simple values (e.g. strings, booleans) become harder to handle.\n context = {value: context};\n }\n\n let owners = null;\n if (_debugOwner) {\n owners = [];\n let owner = _debugOwner;\n while (owner !== null) {\n owners.push({\n displayName: getDisplayNameForFiber(owner) || 'Anonymous',\n id: getFiberID(getPrimaryFiber(owner)),\n type: getElementTypeForFiber(owner),\n });\n owner = owner._debugOwner || null;\n }\n }\n\n const isTimedOutSuspense =\n tag === SuspenseComponent && memoizedState !== null;\n\n let hooks = null;\n if (usesHooks) {\n const originalConsoleMethods = {};\n\n // Temporarily disable all console logging before re-running the hook.\n for (const method in console) {\n try {\n originalConsoleMethods[method] = console[method];\n // $FlowFixMe property error|warn is not writable.\n console[method] = () => {};\n } catch (error) {}\n }\n\n try {\n hooks = inspectHooksOfFiber(\n fiber,\n (renderer.currentDispatcherRef: any),\n );\n } finally {\n // Restore original console functionality.\n for (const method in originalConsoleMethods) {\n try {\n // $FlowFixMe property error|warn is not writable.\n console[method] = originalConsoleMethods[method];\n } catch (error) {}\n }\n }\n }\n\n let rootType = null;\n let current = fiber;\n while (current.return !== null) {\n current = current.return;\n }\n const fiberRoot = current.stateNode;\n if (fiberRoot != null && fiberRoot._debugRootType !== null) {\n rootType = fiberRoot._debugRootType;\n }\n\n return {\n id,\n\n // Does the current renderer support editable hooks and function props?\n canEditHooks: typeof overrideHookState === 'function',\n canEditFunctionProps: typeof overrideProps === 'function',\n\n // Does the current renderer support advanced editing interface?\n canEditHooksAndDeletePaths:\n typeof overrideHookStateDeletePath === 'function',\n canEditHooksAndRenamePaths:\n typeof overrideHookStateRenamePath === 'function',\n canEditFunctionPropsDeletePaths:\n typeof overridePropsDeletePath === 'function',\n canEditFunctionPropsRenamePaths:\n typeof overridePropsRenamePath === 'function',\n\n canToggleSuspense:\n supportsTogglingSuspense &&\n // If it's showing the real content, we can always flip fallback.\n (!isTimedOutSuspense ||\n // If it's showing fallback because we previously forced it to,\n // allow toggling it back to remove the fallback override.\n forceFallbackForSuspenseIDs.has(id)),\n\n // Can view component source location.\n canViewSource,\n\n // Does the component have legacy context attached to it.\n hasLegacyContext,\n\n key: key != null ? key : null,\n\n displayName: getDisplayNameForFiber(fiber),\n type: elementType,\n\n // Inspectable properties.\n // TODO Review sanitization approach for the below inspectable values.\n context,\n hooks,\n props: memoizedProps,\n state: usesHooks ? null : memoizedState,\n\n // List of owners\n owners,\n\n // Location of component in source code.\n source: _debugSource || null,\n\n rootType,\n rendererPackageName: renderer.rendererPackageName,\n rendererVersion: renderer.version,\n };\n }\n\n let mostRecentlyInspectedElement: InspectedElement | null = null;\n let hasElementUpdatedSinceLastInspected: boolean = false;\n let currentlyInspectedPaths: Object = {};\n\n function isMostRecentlyInspectedElementCurrent(id: number): boolean {\n return (\n mostRecentlyInspectedElement !== null &&\n mostRecentlyInspectedElement.id === id &&\n !hasElementUpdatedSinceLastInspected\n );\n }\n\n // Track the intersection of currently inspected paths,\n // so that we can send their data along if the element is re-rendered.\n function mergeInspectedPaths(path: Array<string | number>) {\n let current = currentlyInspectedPaths;\n path.forEach(key => {\n if (!current[key]) {\n current[key] = {};\n }\n current = current[key];\n });\n }\n\n function createIsPathAllowed(\n key: string | null,\n secondaryCategory: 'hooks' | null,\n ) {\n // This function helps prevent previously-inspected paths from being dehydrated in updates.\n // This is important to avoid a bad user experience where expanded toggles collapse on update.\n return function isPathAllowed(path: Array<string | number>): boolean {\n switch (secondaryCategory) {\n case 'hooks':\n if (path.length === 1) {\n // Never dehydrate the \"hooks\" object at the top levels.\n return true;\n }\n if (\n path[path.length - 1] === 'subHooks' ||\n path[path.length - 2] === 'subHooks'\n ) {\n // Dehydrating the 'subHooks' property makes the HooksTree UI a lot more complicated,\n // so it's easiest for now if we just don't break on this boundary.\n // We can always dehydrate a level deeper (in the value object).\n return true;\n }\n break;\n default:\n break;\n }\n\n let current =\n key === null ? currentlyInspectedPaths : currentlyInspectedPaths[key];\n if (!current) {\n return false;\n }\n for (let i = 0; i < path.length; i++) {\n current = current[path[i]];\n if (!current) {\n return false;\n }\n }\n return true;\n };\n }\n\n function updateSelectedElement(inspectedElement: InspectedElement): void {\n const {hooks, id, props} = inspectedElement;\n\n const fiber = idToFiberMap.get(id);\n if (fiber == null) {\n console.warn(`Could not find Fiber with id \"${id}\"`);\n return;\n }\n\n const {elementType, stateNode, tag, type} = fiber;\n\n switch (tag) {\n case ClassComponent:\n case IncompleteClassComponent:\n case IndeterminateComponent:\n global.$r = stateNode;\n break;\n case FunctionComponent:\n global.$r = {\n hooks,\n props,\n type,\n };\n break;\n case ForwardRef:\n global.$r = {\n props,\n type: type.render,\n };\n break;\n case MemoComponent:\n case SimpleMemoComponent:\n global.$r = {\n props,\n type:\n elementType != null && elementType.type != null\n ? elementType.type\n : type,\n };\n break;\n default:\n global.$r = null;\n break;\n }\n }\n\n function storeAsGlobal(\n id: number,\n path: Array<string | number>,\n count: number,\n ): void {\n const isCurrent = isMostRecentlyInspectedElementCurrent(id);\n\n if (isCurrent) {\n const value = getInObject(\n ((mostRecentlyInspectedElement: any): InspectedElement),\n path,\n );\n const key = `$reactTemp${count}`;\n\n window[key] = value;\n\n console.log(key);\n console.log(value);\n }\n }\n\n function copyElementPath(id: number, path: Array<string | number>): void {\n const isCurrent = isMostRecentlyInspectedElementCurrent(id);\n\n if (isCurrent) {\n copyToClipboard(\n getInObject(\n ((mostRecentlyInspectedElement: any): InspectedElement),\n path,\n ),\n );\n }\n }\n\n function inspectElement(\n id: number,\n path?: Array<string | number>,\n ): InspectedElementPayload {\n const isCurrent = isMostRecentlyInspectedElementCurrent(id);\n\n if (isCurrent) {\n if (path != null) {\n mergeInspectedPaths(path);\n\n let secondaryCategory = null;\n if (path[0] === 'hooks') {\n secondaryCategory = 'hooks';\n }\n\n // If this element has not been updated since it was last inspected,\n // we can just return the subset of data in the newly-inspected path.\n return {\n id,\n type: 'hydrated-path',\n path,\n value: cleanForBridge(\n getInObject(\n ((mostRecentlyInspectedElement: any): InspectedElement),\n path,\n ),\n createIsPathAllowed(null, secondaryCategory),\n path,\n ),\n };\n } else {\n // If this element has not been updated since it was last inspected, we don't need to re-run it.\n // Instead we can just return the ID to indicate that it has not changed.\n return {\n id,\n type: 'no-change',\n };\n }\n } else {\n hasElementUpdatedSinceLastInspected = false;\n\n if (\n mostRecentlyInspectedElement === null ||\n mostRecentlyInspectedElement.id !== id\n ) {\n currentlyInspectedPaths = {};\n }\n\n mostRecentlyInspectedElement = inspectElementRaw(id);\n if (mostRecentlyInspectedElement === null) {\n return {\n id,\n type: 'not-found',\n };\n }\n\n if (path != null) {\n mergeInspectedPaths(path);\n }\n\n // Any time an inspected element has an update,\n // we should update the selected $r value as wel.\n // Do this before dehydration (cleanForBridge).\n updateSelectedElement(mostRecentlyInspectedElement);\n\n // Clone before cleaning so that we preserve the full data.\n // This will enable us to send patches without re-inspecting if hydrated paths are requested.\n // (Reducing how often we shallow-render is a better DX for function components that use hooks.)\n const cleanedInspectedElement = {...mostRecentlyInspectedElement};\n cleanedInspectedElement.context = cleanForBridge(\n cleanedInspectedElement.context,\n createIsPathAllowed('context', null),\n );\n cleanedInspectedElement.hooks = cleanForBridge(\n cleanedInspectedElement.hooks,\n createIsPathAllowed('hooks', 'hooks'),\n );\n cleanedInspectedElement.props = cleanForBridge(\n cleanedInspectedElement.props,\n createIsPathAllowed('props', null),\n );\n cleanedInspectedElement.state = cleanForBridge(\n cleanedInspectedElement.state,\n createIsPathAllowed('state', null),\n );\n\n return {\n id,\n type: 'full-data',\n value: cleanedInspectedElement,\n };\n }\n }\n\n function logElementToConsole(id) {\n const result = isMostRecentlyInspectedElementCurrent(id)\n ? mostRecentlyInspectedElement\n : inspectElementRaw(id);\n if (result === null) {\n console.warn(`Could not find Fiber with id \"${id}\"`);\n return;\n }\n\n const supportsGroup = typeof console.groupCollapsed === 'function';\n if (supportsGroup) {\n console.groupCollapsed(\n `[Click to expand] %c<${result.displayName || 'Component'} />`,\n // --dom-tag-name-color is the CSS variable Chrome styles HTML elements with in the console.\n 'color: var(--dom-tag-name-color); font-weight: normal;',\n );\n }\n if (result.props !== null) {\n console.log('Props:', result.props);\n }\n if (result.state !== null) {\n console.log('State:', result.state);\n }\n if (result.hooks !== null) {\n console.log('Hooks:', result.hooks);\n }\n const nativeNodes = findNativeNodesForFiberID(id);\n if (nativeNodes !== null) {\n console.log('Nodes:', nativeNodes);\n }\n if (result.source !== null) {\n console.log('Location:', result.source);\n }\n if (window.chrome || /firefox/i.test(navigator.userAgent)) {\n console.log(\n 'Right-click any value to save it as a global variable for further inspection.',\n );\n }\n if (supportsGroup) {\n console.groupEnd();\n }\n }\n\n function deletePath(\n type: 'context' | 'hooks' | 'props' | 'state',\n id: number,\n hookID: ?number,\n path: Array<string | number>,\n ): void {\n const fiber = findCurrentFiberUsingSlowPathById(id);\n if (fiber !== null) {\n const instance = fiber.stateNode;\n\n switch (type) {\n case 'context':\n // To simplify hydration and display of primitive context values (e.g. number, string)\n // the inspectElement() method wraps context in a {value: ...} object.\n // We need to remove the first part of the path (the \"value\") before continuing.\n path = path.slice(1);\n\n switch (fiber.tag) {\n case ClassComponent:\n if (path.length === 0) {\n // Simple context value (noop)\n } else {\n deletePathInObject(instance.context, path);\n }\n instance.forceUpdate();\n break;\n case FunctionComponent:\n // Function components using legacy context are not editable\n // because there's no instance on which to create a cloned, mutated context.\n break;\n }\n break;\n case 'hooks':\n if (typeof overrideHookStateDeletePath === 'function') {\n overrideHookStateDeletePath(fiber, ((hookID: any): number), path);\n }\n break;\n case 'props':\n if (instance === null) {\n if (typeof overridePropsDeletePath === 'function') {\n overridePropsDeletePath(fiber, path);\n }\n } else {\n fiber.pendingProps = copyWithDelete(instance.props, path);\n instance.forceUpdate();\n }\n break;\n case 'state':\n deletePathInObject(instance.state, path);\n instance.forceUpdate();\n break;\n }\n }\n }\n\n function renamePath(\n type: 'context' | 'hooks' | 'props' | 'state',\n id: number,\n hookID: ?number,\n oldPath: Array<string | number>,\n newPath: Array<string | number>,\n ): void {\n const fiber = findCurrentFiberUsingSlowPathById(id);\n if (fiber !== null) {\n const instance = fiber.stateNode;\n\n switch (type) {\n case 'context':\n // To simplify hydration and display of primitive context values (e.g. number, string)\n // the inspectElement() method wraps context in a {value: ...} object.\n // We need to remove the first part of the path (the \"value\") before continuing.\n oldPath = oldPath.slice(1);\n newPath = newPath.slice(1);\n\n switch (fiber.tag) {\n case ClassComponent:\n if (oldPath.length === 0) {\n // Simple context value (noop)\n } else {\n renamePathInObject(instance.context, oldPath, newPath);\n }\n instance.forceUpdate();\n break;\n case FunctionComponent:\n // Function components using legacy context are not editable\n // because there's no instance on which to create a cloned, mutated context.\n break;\n }\n break;\n case 'hooks':\n if (typeof overrideHookStateRenamePath === 'function') {\n overrideHookStateRenamePath(\n fiber,\n ((hookID: any): number),\n oldPath,\n newPath,\n );\n }\n break;\n case 'props':\n if (instance === null) {\n if (typeof overridePropsRenamePath === 'function') {\n overridePropsRenamePath(fiber, oldPath, newPath);\n }\n } else {\n fiber.pendingProps = copyWithRename(\n instance.props,\n oldPath,\n newPath,\n );\n instance.forceUpdate();\n }\n break;\n case 'state':\n renamePathInObject(instance.state, oldPath, newPath);\n instance.forceUpdate();\n break;\n }\n }\n }\n\n function overrideValueAtPath(\n type: 'context' | 'hooks' | 'props' | 'state',\n id: number,\n hookID: ?number,\n path: Array<string | number>,\n value: any,\n ): void {\n const fiber = findCurrentFiberUsingSlowPathById(id);\n if (fiber !== null) {\n const instance = fiber.stateNode;\n\n switch (type) {\n case 'context':\n // To simplify hydration and display of primitive context values (e.g. number, string)\n // the inspectElement() method wraps context in a {value: ...} object.\n // We need to remove the first part of the path (the \"value\") before continuing.\n path = path.slice(1);\n\n switch (fiber.tag) {\n case ClassComponent:\n if (path.length === 0) {\n // Simple context value\n instance.context = value;\n } else {\n setInObject(instance.context, path, value);\n }\n instance.forceUpdate();\n break;\n case FunctionComponent:\n // Function components using legacy context are not editable\n // because there's no instance on which to create a cloned, mutated context.\n break;\n }\n break;\n case 'hooks':\n if (typeof overrideHookState === 'function') {\n overrideHookState(fiber, ((hookID: any): number), path, value);\n }\n break;\n case 'props':\n switch (fiber.tag) {\n case ClassComponent:\n fiber.pendingProps = copyWithSet(instance.props, path, value);\n instance.forceUpdate();\n break;\n default:\n if (typeof overrideProps === 'function') {\n overrideProps(fiber, path, value);\n }\n break;\n }\n break;\n case 'state':\n switch (fiber.tag) {\n case ClassComponent:\n setInObject(instance.state, path, value);\n instance.forceUpdate();\n break;\n }\n break;\n }\n }\n }\n\n type CommitProfilingData = {|\n changeDescriptions: Map<number, ChangeDescription> | null,\n commitTime: number,\n durations: Array<number>,\n interactions: Array<Interaction>,\n maxActualDuration: number,\n priorityLevel: string | null,\n |};\n\n type CommitProfilingMetadataMap = Map<number, Array<CommitProfilingData>>;\n type DisplayNamesByRootID = Map<number, string>;\n\n let currentCommitProfilingMetadata: CommitProfilingData | null = null;\n let displayNamesByRootID: DisplayNamesByRootID | null = null;\n let idToContextsMap: Map<number, any> | null = null;\n let initialTreeBaseDurationsMap: Map<number, number> | null = null;\n let initialIDToRootMap: Map<number, number> | null = null;\n let isProfiling: boolean = false;\n let profilingStartTime: number = 0;\n let recordChangeDescriptions: boolean = false;\n let rootToCommitProfilingMetadataMap: CommitProfilingMetadataMap | null = null;\n\n function getProfilingData(): ProfilingDataBackend {\n const dataForRoots: Array<ProfilingDataForRootBackend> = [];\n\n if (rootToCommitProfilingMetadataMap === null) {\n throw Error(\n 'getProfilingData() called before any profiling data was recorded',\n );\n }\n\n rootToCommitProfilingMetadataMap.forEach(\n (commitProfilingMetadata, rootID) => {\n const commitData: Array<CommitDataBackend> = [];\n const initialTreeBaseDurations: Array<[number, number]> = [];\n const allInteractions: Map<number, Interaction> = new Map();\n const interactionCommits: Map<number, Array<number>> = new Map();\n\n const displayName =\n (displayNamesByRootID !== null && displayNamesByRootID.get(rootID)) ||\n 'Unknown';\n\n if (initialTreeBaseDurationsMap != null) {\n initialTreeBaseDurationsMap.forEach((treeBaseDuration, id) => {\n if (\n initialIDToRootMap != null &&\n initialIDToRootMap.get(id) === rootID\n ) {\n // We don't need to convert milliseconds to microseconds in this case,\n // because the profiling summary is JSON serialized.\n initialTreeBaseDurations.push([id, treeBaseDuration]);\n }\n });\n }\n\n commitProfilingMetadata.forEach((commitProfilingData, commitIndex) => {\n const {\n changeDescriptions,\n durations,\n interactions,\n maxActualDuration,\n priorityLevel,\n commitTime,\n } = commitProfilingData;\n\n const interactionIDs: Array<number> = [];\n\n interactions.forEach(interaction => {\n if (!allInteractions.has(interaction.id)) {\n allInteractions.set(interaction.id, interaction);\n }\n\n interactionIDs.push(interaction.id);\n\n const commitIndices = interactionCommits.get(interaction.id);\n if (commitIndices != null) {\n commitIndices.push(commitIndex);\n } else {\n interactionCommits.set(interaction.id, [commitIndex]);\n }\n });\n\n const fiberActualDurations: Array<[number, number]> = [];\n const fiberSelfDurations: Array<[number, number]> = [];\n for (let i = 0; i < durations.length; i += 3) {\n const fiberID = durations[i];\n fiberActualDurations.push([fiberID, durations[i + 1]]);\n fiberSelfDurations.push([fiberID, durations[i + 2]]);\n }\n\n commitData.push({\n changeDescriptions:\n changeDescriptions !== null\n ? Array.from(changeDescriptions.entries())\n : null,\n duration: maxActualDuration,\n fiberActualDurations,\n fiberSelfDurations,\n interactionIDs,\n priorityLevel,\n timestamp: commitTime,\n });\n });\n\n dataForRoots.push({\n commitData,\n displayName,\n initialTreeBaseDurations,\n interactionCommits: Array.from(interactionCommits.entries()),\n interactions: Array.from(allInteractions.entries()),\n rootID,\n });\n },\n );\n\n return {\n dataForRoots,\n rendererID,\n };\n }\n\n function startProfiling(shouldRecordChangeDescriptions: boolean) {\n if (isProfiling) {\n return;\n }\n\n recordChangeDescriptions = shouldRecordChangeDescriptions;\n\n // Capture initial values as of the time profiling starts.\n // It's important we snapshot both the durations and the id-to-root map,\n // since either of these may change during the profiling session\n // (e.g. when a fiber is re-rendered or when a fiber gets removed).\n displayNamesByRootID = new Map();\n initialTreeBaseDurationsMap = new Map(idToTreeBaseDurationMap);\n initialIDToRootMap = new Map(idToRootMap);\n idToContextsMap = new Map();\n\n hook.getFiberRoots(rendererID).forEach(root => {\n const rootID = getFiberID(getPrimaryFiber(root.current));\n ((displayNamesByRootID: any): DisplayNamesByRootID).set(\n rootID,\n getDisplayNameForRoot(root.current),\n );\n\n if (shouldRecordChangeDescriptions) {\n // Record all contexts at the time profiling is started.\n // Fibers only store the current context value,\n // so we need to track them separately in order to determine changed keys.\n crawlToInitializeContextsMap(root.current);\n }\n });\n\n isProfiling = true;\n profilingStartTime = getCurrentTime();\n rootToCommitProfilingMetadataMap = new Map();\n }\n\n function stopProfiling() {\n isProfiling = false;\n recordChangeDescriptions = false;\n }\n\n // Automatically start profiling so that we don't miss timing info from initial \"mount\".\n if (\n sessionStorageGetItem(SESSION_STORAGE_RELOAD_AND_PROFILE_KEY) === 'true'\n ) {\n startProfiling(\n sessionStorageGetItem(SESSION_STORAGE_RECORD_CHANGE_DESCRIPTIONS_KEY) ===\n 'true',\n );\n }\n\n // React will switch between these implementations depending on whether\n // we have any manually suspended Fibers or not.\n\n function shouldSuspendFiberAlwaysFalse() {\n return false;\n }\n\n const forceFallbackForSuspenseIDs = new Set();\n function shouldSuspendFiberAccordingToSet(fiber) {\n const id = getFiberID(getPrimaryFiber(((fiber: any): Fiber)));\n return forceFallbackForSuspenseIDs.has(id);\n }\n\n function overrideSuspense(id, forceFallback) {\n if (\n typeof setSuspenseHandler !== 'function' ||\n typeof scheduleUpdate !== 'function'\n ) {\n throw new Error(\n 'Expected overrideSuspense() to not get called for earlier React versions.',\n );\n }\n if (forceFallback) {\n forceFallbackForSuspenseIDs.add(id);\n if (forceFallbackForSuspenseIDs.size === 1) {\n // First override is added. Switch React to slower path.\n setSuspenseHandler(shouldSuspendFiberAccordingToSet);\n }\n } else {\n forceFallbackForSuspenseIDs.delete(id);\n if (forceFallbackForSuspenseIDs.size === 0) {\n // Last override is gone. Switch React back to fast path.\n setSuspenseHandler(shouldSuspendFiberAlwaysFalse);\n }\n }\n const fiber = idToFiberMap.get(id);\n if (fiber != null) {\n scheduleUpdate(fiber);\n }\n }\n\n // Remember if we're trying to restore the selection after reload.\n // In that case, we'll do some extra checks for matching mounts.\n let trackedPath: Array<PathFrame> | null = null;\n let trackedPathMatchFiber: Fiber | null = null;\n let trackedPathMatchDepth = -1;\n let mightBeOnTrackedPath = false;\n\n function setTrackedPath(path: Array<PathFrame> | null) {\n if (path === null) {\n trackedPathMatchFiber = null;\n trackedPathMatchDepth = -1;\n mightBeOnTrackedPath = false;\n }\n trackedPath = path;\n }\n\n // We call this before traversing a new mount.\n // It remembers whether this Fiber is the next best match for tracked path.\n // The return value signals whether we should keep matching siblings or not.\n function updateTrackedPathStateBeforeMount(fiber: Fiber): boolean {\n if (trackedPath === null || !mightBeOnTrackedPath) {\n // Fast path: there's nothing to track so do nothing and ignore siblings.\n return false;\n }\n const returnFiber = fiber.return;\n const returnAlternate = returnFiber !== null ? returnFiber.alternate : null;\n // By now we know there's some selection to restore, and this is a new Fiber.\n // Is this newly mounted Fiber a direct child of the current best match?\n // (This will also be true for new roots if we haven't matched anything yet.)\n if (\n trackedPathMatchFiber === returnFiber ||\n (trackedPathMatchFiber === returnAlternate && returnAlternate !== null)\n ) {\n // Is this the next Fiber we should select? Let's compare the frames.\n const actualFrame = getPathFrame(fiber);\n const expectedFrame = trackedPath[trackedPathMatchDepth + 1];\n if (expectedFrame === undefined) {\n throw new Error('Expected to see a frame at the next depth.');\n }\n if (\n actualFrame.index === expectedFrame.index &&\n actualFrame.key === expectedFrame.key &&\n actualFrame.displayName === expectedFrame.displayName\n ) {\n // We have our next match.\n trackedPathMatchFiber = fiber;\n trackedPathMatchDepth++;\n // Are we out of frames to match?\n if (trackedPathMatchDepth === trackedPath.length - 1) {\n // There's nothing that can possibly match afterwards.\n // Don't check the children.\n mightBeOnTrackedPath = false;\n } else {\n // Check the children, as they might reveal the next match.\n mightBeOnTrackedPath = true;\n }\n // In either case, since we have a match, we don't need\n // to check the siblings. They'll never match.\n return false;\n }\n }\n // This Fiber's parent is on the path, but this Fiber itself isn't.\n // There's no need to check its children--they won't be on the path either.\n mightBeOnTrackedPath = false;\n // However, one of its siblings may be on the path so keep searching.\n return true;\n }\n\n function updateTrackedPathStateAfterMount(mightSiblingsBeOnTrackedPath) {\n // updateTrackedPathStateBeforeMount() told us whether to match siblings.\n // Now that we're entering siblings, let's use that information.\n mightBeOnTrackedPath = mightSiblingsBeOnTrackedPath;\n }\n\n // Roots don't have a real persistent identity.\n // A root's \"pseudo key\" is \"childDisplayName:indexWithThatName\".\n // For example, \"App:0\" or, in case of similar roots, \"Story:0\", \"Story:1\", etc.\n // We will use this to try to disambiguate roots when restoring selection between reloads.\n const rootPseudoKeys: Map<number, string> = new Map();\n const rootDisplayNameCounter: Map<string, number> = new Map();\n\n function setRootPseudoKey(id: number, fiber: Fiber) {\n const name = getDisplayNameForRoot(fiber);\n const counter = rootDisplayNameCounter.get(name) || 0;\n rootDisplayNameCounter.set(name, counter + 1);\n const pseudoKey = `${name}:${counter}`;\n rootPseudoKeys.set(id, pseudoKey);\n }\n\n function removeRootPseudoKey(id: number) {\n const pseudoKey = rootPseudoKeys.get(id);\n if (pseudoKey === undefined) {\n throw new Error('Expected root pseudo key to be known.');\n }\n const name = pseudoKey.substring(0, pseudoKey.lastIndexOf(':'));\n const counter = rootDisplayNameCounter.get(name);\n if (counter === undefined) {\n throw new Error('Expected counter to be known.');\n }\n if (counter > 1) {\n rootDisplayNameCounter.set(name, counter - 1);\n } else {\n rootDisplayNameCounter.delete(name);\n }\n rootPseudoKeys.delete(id);\n }\n\n function getDisplayNameForRoot(fiber: Fiber): string {\n let preferredDisplayName = null;\n let fallbackDisplayName = null;\n let child = fiber.child;\n // Go at most three levels deep into direct children\n // while searching for a child that has a displayName.\n for (let i = 0; i < 3; i++) {\n if (child === null) {\n break;\n }\n const displayName = getDisplayNameForFiber(child);\n if (displayName !== null) {\n // Prefer display names that we get from user-defined components.\n // We want to avoid using e.g. 'Suspense' unless we find nothing else.\n if (typeof child.type === 'function') {\n // There's a few user-defined tags, but we'll prefer the ones\n // that are usually explicitly named (function or class components).\n preferredDisplayName = displayName;\n } else if (fallbackDisplayName === null) {\n fallbackDisplayName = displayName;\n }\n }\n if (preferredDisplayName !== null) {\n break;\n }\n child = child.child;\n }\n return preferredDisplayName || fallbackDisplayName || 'Anonymous';\n }\n\n function getPathFrame(fiber: Fiber): PathFrame {\n const {key} = fiber;\n let displayName = getDisplayNameForFiber(fiber);\n const index = fiber.index;\n switch (fiber.tag) {\n case HostRoot:\n // Roots don't have a real displayName, index, or key.\n // Instead, we'll use the pseudo key (childDisplayName:indexWithThatName).\n const id = getFiberID(getPrimaryFiber(fiber));\n const pseudoKey = rootPseudoKeys.get(id);\n if (pseudoKey === undefined) {\n throw new Error('Expected mounted root to have known pseudo key.');\n }\n displayName = pseudoKey;\n break;\n case HostComponent:\n displayName = fiber.type;\n break;\n default:\n break;\n }\n return {\n displayName,\n key,\n index,\n };\n }\n\n // Produces a serializable representation that does a best effort\n // of identifying a particular Fiber between page reloads.\n // The return path will contain Fibers that are \"invisible\" to the store\n // because their keys and indexes are important to restoring the selection.\n function getPathForElement(id: number): Array<PathFrame> | null {\n let fiber = idToFiberMap.get(id);\n if (fiber == null) {\n return null;\n }\n const keyPath = [];\n while (fiber !== null) {\n keyPath.push(getPathFrame(fiber));\n fiber = fiber.return;\n }\n keyPath.reverse();\n return keyPath;\n }\n\n function getBestMatchForTrackedPath(): PathMatch | null {\n if (trackedPath === null) {\n // Nothing to match.\n return null;\n }\n if (trackedPathMatchFiber === null) {\n // We didn't find anything.\n return null;\n }\n // Find the closest Fiber store is aware of.\n let fiber = trackedPathMatchFiber;\n while (fiber !== null && shouldFilterFiber(fiber)) {\n fiber = fiber.return;\n }\n if (fiber === null) {\n return null;\n }\n return {\n id: getFiberID(getPrimaryFiber(fiber)),\n isFullMatch: trackedPathMatchDepth === trackedPath.length - 1,\n };\n }\n\n const formatPriorityLevel = (priorityLevel: ?number) => {\n if (priorityLevel == null) {\n return 'Unknown';\n }\n\n switch (priorityLevel) {\n case ImmediatePriority:\n return 'Immediate';\n case UserBlockingPriority:\n return 'User-Blocking';\n case NormalPriority:\n return 'Normal';\n case LowPriority:\n return 'Low';\n case IdlePriority:\n return 'Idle';\n case NoPriority:\n default:\n return 'Unknown';\n }\n };\n\n function setTraceUpdatesEnabled(isEnabled: boolean): void {\n traceUpdatesEnabled = isEnabled;\n }\n\n return {\n cleanup,\n copyElementPath,\n deletePath,\n findNativeNodesForFiberID,\n flushInitialOperations,\n getBestMatchForTrackedPath,\n getDisplayNameForFiberID,\n getFiberIDForNative,\n getInstanceAndStyle,\n getOwnersList,\n getPathForElement,\n getProfilingData,\n handleCommitFiberRoot,\n handleCommitFiberUnmount,\n inspectElement,\n logElementToConsole,\n prepareViewAttributeSource,\n prepareViewElementSource,\n overrideSuspense,\n overrideValueAtPath,\n renamePath,\n renderer,\n setTraceUpdatesEnabled,\n setTrackedPath,\n startProfiling,\n stopProfiling,\n storeAsGlobal,\n updateComponentFilters,\n };\n}\n","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n */\n\n// This list should be kept updated to reflect additions to 'shared/ReactSymbols'.\n// DevTools can't import symbols from 'shared/ReactSymbols' directly for two reasons:\n// 1. DevTools requires symbols which may have been deleted in more recent versions (e.g. concurrent mode)\n// 2. DevTools must support both Symbol and numeric forms of each symbol;\n// Since e.g. standalone DevTools runs in a separate process, it can't rely on its own ES capabilities.\n\nexport const CONCURRENT_MODE_NUMBER = 0xeacf;\nexport const CONCURRENT_MODE_SYMBOL_STRING = 'Symbol(react.concurrent_mode)';\n\nexport const CONTEXT_NUMBER = 0xeace;\nexport const CONTEXT_SYMBOL_STRING = 'Symbol(react.context)';\n\nexport const DEPRECATED_ASYNC_MODE_SYMBOL_STRING = 'Symbol(react.async_mode)';\n\nexport const ELEMENT_NUMBER = 0xeac7;\nexport const ELEMENT_SYMBOL_STRING = 'Symbol(react.element)';\n\nexport const DEBUG_TRACING_MODE_NUMBER = 0xeae1;\nexport const DEBUG_TRACING_MODE_SYMBOL_STRING =\n 'Symbol(react.debug_trace_mode)';\n\nexport const FORWARD_REF_NUMBER = 0xead0;\nexport const FORWARD_REF_SYMBOL_STRING = 'Symbol(react.forward_ref)';\n\nexport const FRAGMENT_NUMBER = 0xeacb;\nexport const FRAGMENT_SYMBOL_STRING = 'Symbol(react.fragment)';\n\nexport const FUNDAMENTAL_NUMBER = 0xead5;\nexport const FUNDAMENTAL_SYMBOL_STRING = 'Symbol(react.fundamental)';\n\nexport const LAZY_NUMBER = 0xead4;\nexport const LAZY_SYMBOL_STRING = 'Symbol(react.lazy)';\n\nexport const MEMO_NUMBER = 0xead3;\nexport const MEMO_SYMBOL_STRING = 'Symbol(react.memo)';\n\nexport const OPAQUE_ID_NUMBER = 0xeae0;\nexport const OPAQUE_ID_SYMBOL_STRING = 'Symbol(react.opaque.id)';\n\nexport const PORTAL_NUMBER = 0xeaca;\nexport const PORTAL_SYMBOL_STRING = 'Symbol(react.portal)';\n\nexport const PROFILER_NUMBER = 0xead2;\nexport const PROFILER_SYMBOL_STRING = 'Symbol(react.profiler)';\n\nexport const PROVIDER_NUMBER = 0xeacd;\nexport const PROVIDER_SYMBOL_STRING = 'Symbol(react.provider)';\n\nexport const SCOPE_NUMBER = 0xead7;\nexport const SCOPE_SYMBOL_STRING = 'Symbol(react.scope)';\n\nexport const STRICT_MODE_NUMBER = 0xeacc;\nexport const STRICT_MODE_SYMBOL_STRING = 'Symbol(react.strict_mode)';\n\nexport const SUSPENSE_NUMBER = 0xead1;\nexport const SUSPENSE_SYMBOL_STRING = 'Symbol(react.suspense)';\n\nexport const SUSPENSE_LIST_NUMBER = 0xead8;\nexport const SUSPENSE_LIST_SYMBOL_STRING = 'Symbol(react.suspense_list)';\n","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n */\n\nexport type Wall = {|\n // `listen` returns the \"unlisten\" function.\n listen: (fn: Function) => Function,\n send: (event: string, payload: any, transferable?: Array<any>) => void,\n|};\n\n// WARNING\n// The values below are referenced by ComponentFilters (which are saved via localStorage).\n// Do not change them or it will break previously saved user customizations.\n// If new element types are added, use new numbers rather than re-ordering existing ones.\n//\n// Changing these types is also a backwards breaking change for the standalone shell,\n// since the frontend and backend must share the same values-\n// and the backend is embedded in certain environments (like React Native).\nexport const ElementTypeClass = 1;\nexport const ElementTypeContext = 2;\nexport const ElementTypeFunction = 5;\nexport const ElementTypeForwardRef = 6;\nexport const ElementTypeHostComponent = 7;\nexport const ElementTypeMemo = 8;\nexport const ElementTypeOtherOrUnknown = 9;\nexport const ElementTypeProfiler = 10;\nexport const ElementTypeRoot = 11;\nexport const ElementTypeSuspense = 12;\nexport const ElementTypeSuspenseList = 13;\n\n// Different types of elements displayed in the Elements tree.\n// These types may be used to visually distinguish types,\n// or to enable/disable certain functionality.\nexport type ElementType = 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13;\n\n// WARNING\n// The values below are referenced by ComponentFilters (which are saved via localStorage).\n// Do not change them or it will break previously saved user customizations.\n// If new filter types are added, use new numbers rather than re-ordering existing ones.\nexport const ComponentFilterElementType = 1;\nexport const ComponentFilterDisplayName = 2;\nexport const ComponentFilterLocation = 3;\nexport const ComponentFilterHOC = 4;\n\nexport type ComponentFilterType = 1 | 2 | 3 | 4;\n\n// Hide all elements of types in this Set.\n// We hide host components only by default.\nexport type ElementTypeComponentFilter = {|\n isEnabled: boolean,\n type: 1,\n value: ElementType,\n|};\n\n// Hide all elements with displayNames or paths matching one or more of the RegExps in this Set.\n// Path filters are only used when elements include debug source location.\nexport type RegExpComponentFilter = {|\n isEnabled: boolean,\n isValid: boolean,\n type: 2 | 3,\n value: string,\n|};\n\nexport type BooleanComponentFilter = {|\n isEnabled: boolean,\n isValid: boolean,\n type: 4,\n|};\n\nexport type ComponentFilter =\n | BooleanComponentFilter\n | ElementTypeComponentFilter\n | RegExpComponentFilter;\n","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n */\n\n// Helpers to patch console.logs to avoid logging during side-effect free\n// replaying on render function. This currently only patches the object\n// lazily which won't cover if the log function was extracted eagerly.\n// We could also eagerly patch the method.\n\nlet disabledDepth = 0;\nlet prevLog;\nlet prevInfo;\nlet prevWarn;\nlet prevError;\nlet prevGroup;\nlet prevGroupCollapsed;\nlet prevGroupEnd;\n\nfunction disabledLog() {}\ndisabledLog.__reactDisabledLog = true;\n\nexport function disableLogs(): void {\n if (__DEV__) {\n if (disabledDepth === 0) {\n /* eslint-disable react-internal/no-production-logging */\n prevLog = console.log;\n prevInfo = console.info;\n prevWarn = console.warn;\n prevError = console.error;\n prevGroup = console.group;\n prevGroupCollapsed = console.groupCollapsed;\n prevGroupEnd = console.groupEnd;\n // https://github.com/facebook/react/issues/19099\n const props = {\n configurable: true,\n enumerable: true,\n value: disabledLog,\n writable: true,\n };\n // $FlowFixMe Flow thinks console is immutable.\n Object.defineProperties(console, {\n info: props,\n log: props,\n warn: props,\n error: props,\n group: props,\n groupCollapsed: props,\n groupEnd: props,\n });\n /* eslint-enable react-internal/no-production-logging */\n }\n disabledDepth++;\n }\n}\n\nexport function reenableLogs(): void {\n if (__DEV__) {\n disabledDepth--;\n if (disabledDepth === 0) {\n /* eslint-disable react-internal/no-production-logging */\n const props = {\n configurable: true,\n enumerable: true,\n writable: true,\n };\n // $FlowFixMe Flow thinks console is immutable.\n Object.defineProperties(console, {\n log: {...props, value: prevLog},\n info: {...props, value: prevInfo},\n warn: {...props, value: prevWarn},\n error: {...props, value: prevError},\n group: {...props, value: prevGroup},\n groupCollapsed: {...props, value: prevGroupCollapsed},\n groupEnd: {...props, value: prevGroupEnd},\n });\n /* eslint-enable react-internal/no-production-logging */\n }\n if (disabledDepth < 0) {\n console.error(\n 'disabledDepth fell below zero. ' +\n 'This is a bug in React. Please file an issue.',\n );\n }\n }\n}\n","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n */\n\n// This is a DevTools fork of ReactComponentStackFrame.\n// This fork enables DevTools to use the same \"native\" component stack format,\n// while still maintaining support for multiple renderer versions\n// (which use different values for ReactTypeOfWork).\n\nimport type {Source} from 'shared/ReactElementType';\nimport type {LazyComponent} from 'react/src/ReactLazy';\nimport type {CurrentDispatcherRef} from './types';\n\nimport {\n FORWARD_REF_NUMBER,\n FORWARD_REF_SYMBOL_STRING,\n LAZY_NUMBER,\n LAZY_SYMBOL_STRING,\n MEMO_NUMBER,\n MEMO_SYMBOL_STRING,\n SUSPENSE_NUMBER,\n SUSPENSE_SYMBOL_STRING,\n SUSPENSE_LIST_NUMBER,\n SUSPENSE_LIST_SYMBOL_STRING,\n} from './ReactSymbols';\n\n// These methods are safe to import from shared;\n// there is no React-specific logic here.\nimport {disableLogs, reenableLogs} from 'shared/ConsolePatchingDev';\n\nlet prefix;\nexport function describeBuiltInComponentFrame(\n name: string,\n source: void | null | Source,\n ownerFn: void | null | Function,\n): string {\n if (prefix === undefined) {\n // Extract the VM specific prefix used by each line.\n try {\n throw Error();\n } catch (x) {\n const match = x.stack.trim().match(/\\n( *(at )?)/);\n prefix = (match && match[1]) || '';\n }\n }\n // We use the prefix to ensure our stacks line up with native stack frames.\n return '\\n' + prefix + name;\n}\n\nlet reentry = false;\nlet componentFrameCache;\nif (__DEV__) {\n const PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;\n componentFrameCache = new PossiblyWeakMap();\n}\n\nexport function describeNativeComponentFrame(\n fn: Function,\n construct: boolean,\n currentDispatcherRef: CurrentDispatcherRef,\n): string {\n // If something asked for a stack inside a fake render, it should get ignored.\n if (!fn || reentry) {\n return '';\n }\n\n if (__DEV__) {\n const frame = componentFrameCache.get(fn);\n if (frame !== undefined) {\n return frame;\n }\n }\n\n let control;\n\n const previousPrepareStackTrace = Error.prepareStackTrace;\n // $FlowFixMe It does accept undefined.\n Error.prepareStackTrace = undefined;\n\n reentry = true;\n\n // Override the dispatcher so effects scheduled by this shallow render are thrown away.\n //\n // Note that unlike the code this was forked from (in ReactComponentStackFrame)\n // DevTools should override the dispatcher even when DevTools is compiled in production mode,\n // because the app itself may be in development mode and log errors/warnings.\n const previousDispatcher = currentDispatcherRef.current;\n currentDispatcherRef.current = null;\n disableLogs();\n\n try {\n // This should throw.\n if (construct) {\n // Something should be setting the props in the constructor.\n const Fake = function() {\n throw Error();\n };\n // $FlowFixMe\n Object.defineProperty(Fake.prototype, 'props', {\n set: function() {\n // We use a throwing setter instead of frozen or non-writable props\n // because that won't throw in a non-strict mode function.\n throw Error();\n },\n });\n if (typeof Reflect === 'object' && Reflect.construct) {\n // We construct a different control for this case to include any extra\n // frames added by the construct call.\n try {\n Reflect.construct(Fake, []);\n } catch (x) {\n control = x;\n }\n Reflect.construct(fn, [], Fake);\n } else {\n try {\n Fake.call();\n } catch (x) {\n control = x;\n }\n fn.call(Fake.prototype);\n }\n } else {\n try {\n throw Error();\n } catch (x) {\n control = x;\n }\n fn();\n }\n } catch (sample) {\n // This is inlined manually because closure doesn't do it for us.\n if (sample && control && typeof sample.stack === 'string') {\n // This extracts the first frame from the sample that isn't also in the control.\n // Skipping one frame that we assume is the frame that calls the two.\n const sampleLines = sample.stack.split('\\n');\n const controlLines = control.stack.split('\\n');\n let s = sampleLines.length - 1;\n let c = controlLines.length - 1;\n while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {\n // We expect at least one stack frame to be shared.\n // Typically this will be the root most one. However, stack frames may be\n // cut off due to maximum stack limits. In this case, one maybe cut off\n // earlier than the other. We assume that the sample is longer or the same\n // and there for cut off earlier. So we should find the root most frame in\n // the sample somewhere in the control.\n c--;\n }\n for (; s >= 1 && c >= 0; s--, c--) {\n // Next we find the first one that isn't the same which should be the\n // frame that called our sample function and the control.\n if (sampleLines[s] !== controlLines[c]) {\n // In V8, the first line is describing the message but other VMs don't.\n // If we're about to return the first line, and the control is also on the same\n // line, that's a pretty good indicator that our sample threw at same line as\n // the control. I.e. before we entered the sample frame. So we ignore this result.\n // This can happen if you passed a class to function component, or non-function.\n if (s !== 1 || c !== 1) {\n do {\n s--;\n c--;\n // We may still have similar intermediate frames from the construct call.\n // The next one that isn't the same should be our match though.\n if (c < 0 || sampleLines[s] !== controlLines[c]) {\n // V8 adds a \"new\" prefix for native classes. Let's remove it to make it prettier.\n const frame = '\\n' + sampleLines[s].replace(' at new ', ' at ');\n if (__DEV__) {\n if (typeof fn === 'function') {\n componentFrameCache.set(fn, frame);\n }\n }\n // Return the line we found.\n return frame;\n }\n } while (s >= 1 && c >= 0);\n }\n break;\n }\n }\n }\n } finally {\n reentry = false;\n\n Error.prepareStackTrace = previousPrepareStackTrace;\n\n currentDispatcherRef.current = previousDispatcher;\n reenableLogs();\n }\n // Fallback to just using the name if we couldn't make it throw.\n const name = fn ? fn.displayName || fn.name : '';\n const syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';\n if (__DEV__) {\n if (typeof fn === 'function') {\n componentFrameCache.set(fn, syntheticFrame);\n }\n }\n return syntheticFrame;\n}\n\nexport function describeClassComponentFrame(\n ctor: Function,\n source: void | null | Source,\n ownerFn: void | null | Function,\n currentDispatcherRef: CurrentDispatcherRef,\n): string {\n return describeNativeComponentFrame(ctor, true, currentDispatcherRef);\n}\n\nexport function describeFunctionComponentFrame(\n fn: Function,\n source: void | null | Source,\n ownerFn: void | null | Function,\n currentDispatcherRef: CurrentDispatcherRef,\n): string {\n return describeNativeComponentFrame(fn, false, currentDispatcherRef);\n}\n\nfunction shouldConstruct(Component: Function) {\n const prototype = Component.prototype;\n return !!(prototype && prototype.isReactComponent);\n}\n\nexport function describeUnknownElementTypeFrameInDEV(\n type: any,\n source: void | null | Source,\n ownerFn: void | null | Function,\n currentDispatcherRef: CurrentDispatcherRef,\n): string {\n if (!__DEV__) {\n return '';\n }\n if (type == null) {\n return '';\n }\n if (typeof type === 'function') {\n return describeNativeComponentFrame(\n type,\n shouldConstruct(type),\n currentDispatcherRef,\n );\n }\n if (typeof type === 'string') {\n return describeBuiltInComponentFrame(type, source, ownerFn);\n }\n switch (type) {\n case SUSPENSE_NUMBER:\n case SUSPENSE_SYMBOL_STRING:\n return describeBuiltInComponentFrame('Suspense', source, ownerFn);\n case SUSPENSE_LIST_NUMBER:\n case SUSPENSE_LIST_SYMBOL_STRING:\n return describeBuiltInComponentFrame('SuspenseList', source, ownerFn);\n }\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case FORWARD_REF_NUMBER:\n case FORWARD_REF_SYMBOL_STRING:\n return describeFunctionComponentFrame(\n type.render,\n source,\n ownerFn,\n currentDispatcherRef,\n );\n case MEMO_NUMBER:\n case MEMO_SYMBOL_STRING:\n // Memo may contain any component type so we recursively resolve it.\n return describeUnknownElementTypeFrameInDEV(\n type.type,\n source,\n ownerFn,\n currentDispatcherRef,\n );\n case LAZY_NUMBER:\n case LAZY_SYMBOL_STRING: {\n const lazyComponent: LazyComponent<any, any> = (type: any);\n const payload = lazyComponent._payload;\n const init = lazyComponent._init;\n try {\n // Lazy may contain any component type so we recursively resolve it.\n return describeUnknownElementTypeFrameInDEV(\n init(payload),\n source,\n ownerFn,\n currentDispatcherRef,\n );\n } catch (x) {}\n }\n }\n }\n return '';\n}\n","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n */\n\n// This is a DevTools fork of ReactFiberComponentStack.\n// This fork enables DevTools to use the same \"native\" component stack format,\n// while still maintaining support for multiple renderer versions\n// (which use different values for ReactTypeOfWork).\n\nimport type {Fiber} from 'react-reconciler/src/ReactInternalTypes';\nimport type {CurrentDispatcherRef, WorkTagMap} from './types';\n\nimport {\n describeBuiltInComponentFrame,\n describeFunctionComponentFrame,\n describeClassComponentFrame,\n} from './DevToolsComponentStackFrame';\n\nfunction describeFiber(\n workTagMap: WorkTagMap,\n workInProgress: Fiber,\n currentDispatcherRef: CurrentDispatcherRef,\n): string {\n const {\n HostComponent,\n LazyComponent,\n SuspenseComponent,\n SuspenseListComponent,\n FunctionComponent,\n IndeterminateComponent,\n SimpleMemoComponent,\n ForwardRef,\n ClassComponent,\n } = workTagMap;\n\n const owner: null | Function = __DEV__\n ? workInProgress._debugOwner\n ? workInProgress._debugOwner.type\n : null\n : null;\n const source = __DEV__ ? workInProgress._debugSource : null;\n switch (workInProgress.tag) {\n case HostComponent:\n return describeBuiltInComponentFrame(workInProgress.type, source, owner);\n case LazyComponent:\n return describeBuiltInComponentFrame('Lazy', source, owner);\n case SuspenseComponent:\n return describeBuiltInComponentFrame('Suspense', source, owner);\n case SuspenseListComponent:\n return describeBuiltInComponentFrame('SuspenseList', source, owner);\n case FunctionComponent:\n case IndeterminateComponent:\n case SimpleMemoComponent:\n return describeFunctionComponentFrame(\n workInProgress.type,\n source,\n owner,\n currentDispatcherRef,\n );\n case ForwardRef:\n return describeFunctionComponentFrame(\n workInProgress.type.render,\n source,\n owner,\n currentDispatcherRef,\n );\n case ClassComponent:\n return describeClassComponentFrame(\n workInProgress.type,\n source,\n owner,\n currentDispatcherRef,\n );\n default:\n return '';\n }\n}\n\nexport function getStackByFiberInDevAndProd(\n workTagMap: WorkTagMap,\n workInProgress: Fiber,\n currentDispatcherRef: CurrentDispatcherRef,\n): string {\n try {\n let info = '';\n let node = workInProgress;\n do {\n info += describeFiber(workTagMap, node, currentDispatcherRef);\n node = node.return;\n } while (node);\n return info;\n } catch (x) {\n return '\\nError generating stack: ' + x.message + '\\n' + x.stack;\n }\n}\n","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n */\n\nimport type {Fiber} from 'react-reconciler/src/ReactInternalTypes';\nimport type {CurrentDispatcherRef, ReactRenderer, WorkTagMap} from './types';\n\nimport {getInternalReactConstants} from './renderer';\nimport {getStackByFiberInDevAndProd} from './DevToolsFiberComponentStack';\n\nconst APPEND_STACK_TO_METHODS = ['error', 'trace', 'warn'];\n\n// React's custom built component stack strings match \"\\s{4}in\"\n// Chrome's prefix matches \"\\s{4}at\"\nconst PREFIX_REGEX = /\\s{4}(in|at)\\s{1}/;\n// Firefox and Safari have no prefix (\"\")\n// but we can fallback to looking for location info (e.g. \"foo.js:12:345\")\nconst ROW_COLUMN_NUMBER_REGEX = /:\\d+:\\d+(\\n|$)/;\n\nconst injectedRenderers: Map<\n ReactRenderer,\n {|\n currentDispatcherRef: CurrentDispatcherRef,\n getCurrentFiber: () => Fiber | null,\n workTagMap: WorkTagMap,\n |},\n> = new Map();\n\nlet targetConsole: Object = console;\nlet targetConsoleMethods = {};\nfor (const method in console) {\n targetConsoleMethods[method] = console[method];\n}\n\nlet unpatchFn: null | (() => void) = null;\n\n// Enables e.g. Jest tests to inject a mock console object.\nexport function dangerous_setTargetConsoleForTesting(\n targetConsoleForTesting: Object,\n): void {\n targetConsole = targetConsoleForTesting;\n\n targetConsoleMethods = {};\n for (const method in targetConsole) {\n targetConsoleMethods[method] = console[method];\n }\n}\n\n// v16 renderers should use this method to inject internals necessary to generate a component stack.\n// These internals will be used if the console is patched.\n// Injecting them separately allows the console to easily be patched or un-patched later (at runtime).\nexport function registerRenderer(renderer: ReactRenderer): void {\n const {\n currentDispatcherRef,\n getCurrentFiber,\n findFiberByHostInstance,\n version,\n } = renderer;\n\n // Ignore React v15 and older because they don't expose a component stack anyway.\n if (typeof findFiberByHostInstance !== 'function') {\n return;\n }\n\n // currentDispatcherRef gets injected for v16.8+ to support hooks inspection.\n // getCurrentFiber gets injected for v16.9+.\n if (currentDispatcherRef != null && typeof getCurrentFiber === 'function') {\n const {ReactTypeOfWork} = getInternalReactConstants(version);\n\n injectedRenderers.set(renderer, {\n currentDispatcherRef,\n getCurrentFiber,\n workTagMap: ReactTypeOfWork,\n });\n }\n}\n\nconst consoleSettingsRef = {\n appendComponentStack: false,\n breakOnConsoleErrors: false,\n};\n\n// Patches console methods to append component stack for the current fiber.\n// Call unpatch() to remove the injected behavior.\nexport function patch({\n appendComponentStack,\n breakOnConsoleErrors,\n}: {\n appendComponentStack: boolean,\n breakOnConsoleErrors: boolean,\n}): void {\n // Settings may change after we've patched the console.\n // Using a shared ref allows the patch function to read the latest values.\n consoleSettingsRef.appendComponentStack = appendComponentStack;\n consoleSettingsRef.breakOnConsoleErrors = breakOnConsoleErrors;\n\n if (unpatchFn !== null) {\n // Don't patch twice.\n return;\n }\n\n const originalConsoleMethods = {};\n\n unpatchFn = () => {\n for (const method in originalConsoleMethods) {\n try {\n // $FlowFixMe property error|warn is not writable.\n targetConsole[method] = originalConsoleMethods[method];\n } catch (error) {}\n }\n };\n\n APPEND_STACK_TO_METHODS.forEach(method => {\n try {\n const originalMethod = (originalConsoleMethods[method] =\n targetConsole[method]);\n\n const overrideMethod = (...args) => {\n const latestAppendComponentStack =\n consoleSettingsRef.appendComponentStack;\n const latestBreakOnConsoleErrors =\n consoleSettingsRef.breakOnConsoleErrors;\n\n if (latestAppendComponentStack) {\n try {\n // If we are ever called with a string that already has a component stack, e.g. a React error/warning,\n // don't append a second stack.\n const lastArg = args.length > 0 ? args[args.length - 1] : null;\n const alreadyHasComponentStack =\n lastArg !== null &&\n (PREFIX_REGEX.test(lastArg) ||\n ROW_COLUMN_NUMBER_REGEX.test(lastArg));\n\n if (!alreadyHasComponentStack) {\n // If there's a component stack for at least one of the injected renderers, append it.\n // We don't handle the edge case of stacks for more than one (e.g. interleaved renderers?)\n // eslint-disable-next-line no-for-of-loops/no-for-of-loops\n for (const {\n currentDispatcherRef,\n getCurrentFiber,\n workTagMap,\n } of injectedRenderers.values()) {\n const current: ?Fiber = getCurrentFiber();\n if (current != null) {\n const componentStack = getStackByFiberInDevAndProd(\n workTagMap,\n current,\n currentDispatcherRef,\n );\n if (componentStack !== '') {\n args.push(componentStack);\n }\n break;\n }\n }\n }\n } catch (error) {\n // Don't let a DevTools or React internal error interfere with logging.\n }\n }\n\n if (latestBreakOnConsoleErrors) {\n // --- Welcome to debugging with React DevTools ---\n // This debugger statement means that you've enabled the \"break on warnings\" feature.\n // Use the browser's Call Stack panel to step out of this override function-\n // to where the original warning or error was logged.\n // eslint-disable-next-line no-debugger\n debugger;\n }\n\n originalMethod(...args);\n };\n\n overrideMethod.__REACT_DEVTOOLS_ORIGINAL_METHOD__ = originalMethod;\n\n // $FlowFixMe property error|warn is not writable.\n targetConsole[method] = overrideMethod;\n } catch (error) {}\n });\n}\n\n// Removed component stack patch from console methods.\nexport function unpatch(): void {\n if (unpatchFn !== null) {\n unpatchFn();\n unpatchFn = null;\n }\n}\n","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n */\n\nimport EventEmitter from '../events';\nimport throttle from 'lodash.throttle';\nimport {\n SESSION_STORAGE_LAST_SELECTION_KEY,\n SESSION_STORAGE_RELOAD_AND_PROFILE_KEY,\n SESSION_STORAGE_RECORD_CHANGE_DESCRIPTIONS_KEY,\n __DEBUG__,\n} from '../constants';\nimport {\n sessionStorageGetItem,\n sessionStorageRemoveItem,\n sessionStorageSetItem,\n} from 'react-devtools-shared/src/storage';\nimport setupHighlighter from './views/Highlighter';\nimport {\n initialize as setupTraceUpdates,\n toggleEnabled as setTraceUpdatesEnabled,\n} from './views/TraceUpdates';\nimport {patch as patchConsole, unpatch as unpatchConsole} from './console';\n\nimport type {BackendBridge} from 'react-devtools-shared/src/bridge';\nimport type {\n InstanceAndStyle,\n NativeType,\n OwnersList,\n PathFrame,\n PathMatch,\n RendererID,\n RendererInterface,\n} from './types';\nimport type {ComponentFilter} from '../types';\n\nconst debug = (methodName, ...args) => {\n if (__DEBUG__) {\n console.log(\n `%cAgent %c${methodName}`,\n 'color: purple; font-weight: bold;',\n 'font-weight: bold;',\n ...args,\n );\n }\n};\n\ntype ElementAndRendererID = {|\n id: number,\n rendererID: number,\n|};\n\ntype StoreAsGlobalParams = {|\n count: number,\n id: number,\n path: Array<string | number>,\n rendererID: number,\n|};\n\ntype CopyElementParams = {|\n id: number,\n path: Array<string | number>,\n rendererID: number,\n|};\n\ntype InspectElementParams = {|\n id: number,\n path?: Array<string | number>,\n rendererID: number,\n|};\n\ntype OverrideHookParams = {|\n id: number,\n hookID: number,\n path: Array<string | number>,\n rendererID: number,\n wasForwarded?: boolean,\n value: any,\n|};\n\ntype SetInParams = {|\n id: number,\n path: Array<string | number>,\n rendererID: number,\n wasForwarded?: boolean,\n value: any,\n|};\n\ntype PathType = 'props' | 'hooks' | 'state' | 'context';\n\ntype DeletePathParams = {|\n type: PathType,\n hookID?: ?number,\n id: number,\n path: Array<string | number>,\n rendererID: number,\n|};\n\ntype RenamePathParams = {|\n type: PathType,\n hookID?: ?number,\n id: number,\n oldPath: Array<string | number>,\n newPath: Array<string | number>,\n rendererID: number,\n|};\n\ntype OverrideValueAtPathParams = {|\n type: PathType,\n hookID?: ?number,\n id: number,\n path: Array<string | number>,\n rendererID: number,\n value: any,\n|};\n\ntype OverrideSuspenseParams = {|\n id: number,\n rendererID: number,\n forceFallback: boolean,\n|};\n\ntype PersistedSelection = {|\n rendererID: number,\n path: Array<PathFrame>,\n|};\n\nexport default class Agent extends EventEmitter<{|\n hideNativeHighlight: [],\n showNativeHighlight: [NativeType],\n shutdown: [],\n traceUpdates: [Set<NativeType>],\n|}> {\n _bridge: BackendBridge;\n _isProfiling: boolean = false;\n _recordChangeDescriptions: boolean = false;\n _rendererInterfaces: {[key: RendererID]: RendererInterface, ...} = {};\n _persistedSelection: PersistedSelection | null = null;\n _persistedSelectionMatch: PathMatch | null = null;\n _traceUpdatesEnabled: boolean = false;\n\n constructor(bridge: BackendBridge) {\n super();\n\n if (\n sessionStorageGetItem(SESSION_STORAGE_RELOAD_AND_PROFILE_KEY) === 'true'\n ) {\n this._recordChangeDescriptions =\n sessionStorageGetItem(\n SESSION_STORAGE_RECORD_CHANGE_DESCRIPTIONS_KEY,\n ) === 'true';\n this._isProfiling = true;\n\n sessionStorageRemoveItem(SESSION_STORAGE_RECORD_CHANGE_DESCRIPTIONS_KEY);\n sessionStorageRemoveItem(SESSION_STORAGE_RELOAD_AND_PROFILE_KEY);\n }\n\n const persistedSelectionString = sessionStorageGetItem(\n SESSION_STORAGE_LAST_SELECTION_KEY,\n );\n if (persistedSelectionString != null) {\n this._persistedSelection = JSON.parse(persistedSelectionString);\n }\n\n this._bridge = bridge;\n\n bridge.addListener('copyElementPath', this.copyElementPath);\n bridge.addListener('deletePath', this.deletePath);\n bridge.addListener('getProfilingData', this.getProfilingData);\n bridge.addListener('getProfilingStatus', this.getProfilingStatus);\n bridge.addListener('getOwnersList', this.getOwnersList);\n bridge.addListener('inspectElement', this.inspectElement);\n bridge.addListener('logElementToConsole', this.logElementToConsole);\n bridge.addListener('overrideSuspense', this.overrideSuspense);\n bridge.addListener('overrideValueAtPath', this.overrideValueAtPath);\n bridge.addListener('reloadAndProfile', this.reloadAndProfile);\n bridge.addListener('renamePath', this.renamePath);\n bridge.addListener('setTraceUpdatesEnabled', this.setTraceUpdatesEnabled);\n bridge.addListener('startProfiling', this.startProfiling);\n bridge.addListener('stopProfiling', this.stopProfiling);\n bridge.addListener('storeAsGlobal', this.storeAsGlobal);\n bridge.addListener(\n 'syncSelectionFromNativeElementsPanel',\n this.syncSelectionFromNativeElementsPanel,\n );\n bridge.addListener('shutdown', this.shutdown);\n bridge.addListener(\n 'updateConsolePatchSettings',\n this.updateConsolePatchSettings,\n );\n bridge.addListener('updateComponentFilters', this.updateComponentFilters);\n bridge.addListener('viewAttributeSource', this.viewAttributeSource);\n bridge.addListener('viewElementSource', this.viewElementSource);\n\n // Temporarily support older standalone front-ends sending commands to newer embedded backends.\n // We do this because React Native embeds the React DevTools backend,\n // but cannot control which version of the frontend users use.\n bridge.addListener('overrideContext', this.overrideContext);\n bridge.addListener('overrideHookState', this.overrideHookState);\n bridge.addListener('overrideProps', this.overrideProps);\n bridge.addListener('overrideState', this.overrideState);\n\n if (this._isProfiling) {\n bridge.send('profilingStatus', true);\n }\n\n // Notify the frontend if the backend supports the Storage API (e.g. localStorage).\n // If not, features like reload-and-profile will not work correctly and must be disabled.\n let isBackendStorageAPISupported = false;\n try {\n localStorage.getItem('test');\n isBackendStorageAPISupported = true;\n } catch (error) {}\n bridge.send('isBackendStorageAPISupported', isBackendStorageAPISupported);\n\n setupHighlighter(bridge, this);\n setupTraceUpdates(this);\n }\n\n get rendererInterfaces(): {[key: RendererID]: RendererInterface, ...} {\n return this._rendererInterfaces;\n }\n\n copyElementPath = ({id, path, rendererID}: CopyElementParams) => {\n const renderer = this._rendererInterfaces[rendererID];\n if (renderer == null) {\n console.warn(`Invalid renderer id \"${rendererID}\" for element \"${id}\"`);\n } else {\n renderer.copyElementPath(id, path);\n }\n };\n\n deletePath = ({hookID, id, path, rendererID, type}: DeletePathParams) => {\n const renderer = this._rendererInterfaces[rendererID];\n if (renderer == null) {\n console.warn(`Invalid renderer id \"${rendererID}\" for element \"${id}\"`);\n } else {\n renderer.deletePath(type, id, hookID, path);\n }\n };\n\n getInstanceAndStyle({\n id,\n rendererID,\n }: ElementAndRendererID): InstanceAndStyle | null {\n const renderer = this._rendererInterfaces[rendererID];\n if (renderer == null) {\n console.warn(`Invalid renderer id \"${rendererID}\"`);\n return null;\n }\n return renderer.getInstanceAndStyle(id);\n }\n\n getIDForNode(node: Object): number | null {\n for (const rendererID in this._rendererInterfaces) {\n const renderer = ((this._rendererInterfaces[\n (rendererID: any)\n ]: any): RendererInterface);\n\n try {\n const id = renderer.getFiberIDForNative(node, true);\n if (id !== null) {\n return id;\n }\n } catch (error) {\n // Some old React versions might throw if they can't find a match.\n // If so we should ignore it...\n }\n }\n return null;\n }\n\n getProfilingData = ({rendererID}: {|rendererID: RendererID|}) => {\n const renderer = this._rendererInterfaces[rendererID];\n if (renderer == null) {\n console.warn(`Invalid renderer id \"${rendererID}\"`);\n }\n\n this._bridge.send('profilingData', renderer.getProfilingData());\n };\n\n getProfilingStatus = () => {\n this._bridge.send('profilingStatus', this._isProfiling);\n };\n\n getOwnersList = ({id, rendererID}: ElementAndRendererID) => {\n const renderer = this._rendererInterfaces[rendererID];\n if (renderer == null) {\n console.warn(`Invalid renderer id \"${rendererID}\" for element \"${id}\"`);\n } else {\n const owners = renderer.getOwnersList(id);\n this._bridge.send('ownersList', ({id, owners}: OwnersList));\n }\n };\n\n inspectElement = ({id, path, rendererID}: InspectElementParams) => {\n const renderer = this._rendererInterfaces[rendererID];\n if (renderer == null) {\n console.warn(`Invalid renderer id \"${rendererID}\" for element \"${id}\"`);\n } else {\n this._bridge.send('inspectedElement', renderer.inspectElement(id, path));\n\n // When user selects an element, stop trying to restore the selection,\n // and instead remember the current selection for the next reload.\n if (\n this._persistedSelectionMatch === null ||\n this._persistedSelectionMatch.id !== id\n ) {\n this._persistedSelection = null;\n this._persistedSelectionMatch = null;\n renderer.setTrackedPath(null);\n this._throttledPersistSelection(rendererID, id);\n }\n\n // TODO: If there was a way to change the selected DOM element\n // in native Elements tab without forcing a switch to it, we'd do it here.\n // For now, it doesn't seem like there is a way to do that:\n // https://github.com/bvaughn/react-devtools-experimental/issues/102\n // (Setting $0 doesn't work, and calling inspect() switches the tab.)\n }\n };\n\n logElementToConsole = ({id, rendererID}: ElementAndRendererID) => {\n const renderer = this._rendererInterfaces[rendererID];\n if (renderer == null) {\n console.warn(`Invalid renderer id \"${rendererID}\" for element \"${id}\"`);\n } else {\n renderer.logElementToConsole(id);\n }\n };\n\n overrideSuspense = ({\n id,\n rendererID,\n forceFallback,\n }: OverrideSuspenseParams) => {\n const renderer = this._rendererInterfaces[rendererID];\n if (renderer == null) {\n console.warn(`Invalid renderer id \"${rendererID}\" for element \"${id}\"`);\n } else {\n renderer.overrideSuspense(id, forceFallback);\n }\n };\n\n overrideValueAtPath = ({\n hookID,\n id,\n path,\n rendererID,\n type,\n value,\n }: OverrideValueAtPathParams) => {\n const renderer = this._rendererInterfaces[rendererID];\n if (renderer == null) {\n console.warn(`Invalid renderer id \"${rendererID}\" for element \"${id}\"`);\n } else {\n renderer.overrideValueAtPath(type, id, hookID, path, value);\n }\n };\n\n // Temporarily support older standalone front-ends by forwarding the older message types\n // to the new \"overrideValueAtPath\" command the backend is now listening to.\n overrideContext = ({\n id,\n path,\n rendererID,\n wasForwarded,\n value,\n }: SetInParams) => {\n // Don't forward a message that's already been forwarded by the front-end Bridge.\n // We only need to process the override command once!\n if (!wasForwarded) {\n this.overrideValueAtPath({\n id,\n path,\n rendererID,\n type: 'context',\n value,\n });\n }\n };\n\n // Temporarily support older standalone front-ends by forwarding the older message types\n // to the new \"overrideValueAtPath\" command the backend is now listening to.\n overrideHookState = ({\n id,\n hookID,\n path,\n rendererID,\n wasForwarded,\n value,\n }: OverrideHookParams) => {\n // Don't forward a message that's already been forwarded by the front-end Bridge.\n // We only need to process the override command once!\n if (!wasForwarded) {\n this.overrideValueAtPath({\n id,\n path,\n rendererID,\n type: 'hooks',\n value,\n });\n }\n };\n\n // Temporarily support older standalone front-ends by forwarding the older message types\n // to the new \"overrideValueAtPath\" command the backend is now listening to.\n overrideProps = ({\n id,\n path,\n rendererID,\n wasForwarded,\n value,\n }: SetInParams) => {\n // Don't forward a message that's already been forwarded by the front-end Bridge.\n // We only need to process the override command once!\n if (!wasForwarded) {\n this.overrideValueAtPath({\n id,\n path,\n rendererID,\n type: 'props',\n value,\n });\n }\n };\n\n // Temporarily support older standalone front-ends by forwarding the older message types\n // to the new \"overrideValueAtPath\" command the backend is now listening to.\n overrideState = ({\n id,\n path,\n rendererID,\n wasForwarded,\n value,\n }: SetInParams) => {\n // Don't forward a message that's already been forwarded by the front-end Bridge.\n // We only need to process the override command once!\n if (!wasForwarded) {\n this.overrideValueAtPath({\n id,\n path,\n rendererID,\n type: 'state',\n value,\n });\n }\n };\n\n reloadAndProfile = (recordChangeDescriptions: boolean) => {\n sessionStorageSetItem(SESSION_STORAGE_RELOAD_AND_PROFILE_KEY, 'true');\n sessionStorageSetItem(\n SESSION_STORAGE_RECORD_CHANGE_DESCRIPTIONS_KEY,\n recordChangeDescriptions ? 'true' : 'false',\n );\n\n // This code path should only be hit if the shell has explicitly told the Store that it supports profiling.\n // In that case, the shell must also listen for this specific message to know when it needs to reload the app.\n // The agent can't do this in a way that is renderer agnostic.\n this._bridge.send('reloadAppForProfiling');\n };\n\n renamePath = ({\n hookID,\n id,\n newPath,\n oldPath,\n rendererID,\n type,\n }: RenamePathParams) => {\n const renderer = this._rendererInterfaces[rendererID];\n if (renderer == null) {\n console.warn(`Invalid renderer id \"${rendererID}\" for element \"${id}\"`);\n } else {\n renderer.renamePath(type, id, hookID, oldPath, newPath);\n }\n };\n\n selectNode(target: Object): void {\n const id = this.getIDForNode(target);\n if (id !== null) {\n this._bridge.send('selectFiber', id);\n }\n }\n\n setRendererInterface(\n rendererID: RendererID,\n rendererInterface: RendererInterface,\n ) {\n this._rendererInterfaces[rendererID] = rendererInterface;\n\n if (this._isProfiling) {\n rendererInterface.startProfiling(this._recordChangeDescriptions);\n }\n\n rendererInterface.setTraceUpdatesEnabled(this._traceUpdatesEnabled);\n\n // When the renderer is attached, we need to tell it whether\n // we remember the previous selection that we'd like to restore.\n // It'll start tracking mounts for matches to the last selection path.\n const selection = this._persistedSelection;\n if (selection !== null && selection.rendererID === rendererID) {\n rendererInterface.setTrackedPath(selection.path);\n }\n }\n\n setTraceUpdatesEnabled = (traceUpdatesEnabled: boolean) => {\n this._traceUpdatesEnabled = traceUpdatesEnabled;\n\n setTraceUpdatesEnabled(traceUpdatesEnabled);\n\n for (const rendererID in this._rendererInterfaces) {\n const renderer = ((this._rendererInterfaces[\n (rendererID: any)\n ]: any): RendererInterface);\n renderer.setTraceUpdatesEnabled(traceUpdatesEnabled);\n }\n };\n\n syncSelectionFromNativeElementsPanel = () => {\n const target = window.__REACT_DEVTOOLS_GLOBAL_HOOK__.$0;\n if (target == null) {\n return;\n }\n this.selectNode(target);\n };\n\n shutdown = () => {\n // Clean up the overlay if visible, and associated events.\n this.emit('shutdown');\n };\n\n startProfiling = (recordChangeDescriptions: boolean) => {\n this._recordChangeDescriptions = recordChangeDescriptions;\n this._isProfiling = true;\n for (const rendererID in this._rendererInterfaces) {\n const renderer = ((this._rendererInterfaces[\n (rendererID: any)\n ]: any): RendererInterface);\n renderer.startProfiling(recordChangeDescriptions);\n }\n this._bridge.send('profilingStatus', this._isProfiling);\n };\n\n stopProfiling = () => {\n this._isProfiling = false;\n this._recordChangeDescriptions = false;\n for (const rendererID in this._rendererInterfaces) {\n const renderer = ((this._rendererInterfaces[\n (rendererID: any)\n ]: any): RendererInterface);\n renderer.stopProfiling();\n }\n this._bridge.send('profilingStatus', this._isProfiling);\n };\n\n storeAsGlobal = ({count, id, path, rendererID}: StoreAsGlobalParams) => {\n const renderer = this._rendererInterfaces[rendererID];\n if (renderer == null) {\n console.warn(`Invalid renderer id \"${rendererID}\" for element \"${id}\"`);\n } else {\n renderer.storeAsGlobal(id, path, count);\n }\n };\n\n updateConsolePatchSettings = ({\n appendComponentStack,\n breakOnConsoleErrors,\n }: {|\n appendComponentStack: boolean,\n breakOnConsoleErrors: boolean,\n |}) => {\n // If the frontend preference has change,\n // or in the case of React Native- if the backend is just finding out the preference-\n // then install or uninstall the console overrides.\n // It's safe to call these methods multiple times, so we don't need to worry about that.\n if (appendComponentStack || breakOnConsoleErrors) {\n patchConsole({appendComponentStack, breakOnConsoleErrors});\n } else {\n unpatchConsole();\n }\n };\n\n updateComponentFilters = (componentFilters: Array<ComponentFilter>) => {\n for (const rendererID in this._rendererInterfaces) {\n const renderer = ((this._rendererInterfaces[\n (rendererID: any)\n ]: any): RendererInterface);\n renderer.updateComponentFilters(componentFilters);\n }\n };\n\n viewAttributeSource = ({id, path, rendererID}: CopyElementParams) => {\n const renderer = this._rendererInterfaces[rendererID];\n if (renderer == null) {\n console.warn(`Invalid renderer id \"${rendererID}\" for element \"${id}\"`);\n } else {\n renderer.prepareViewAttributeSource(id, path);\n }\n };\n\n viewElementSource = ({id, rendererID}: ElementAndRendererID) => {\n const renderer = this._rendererInterfaces[rendererID];\n if (renderer == null) {\n console.warn(`Invalid renderer id \"${rendererID}\" for element \"${id}\"`);\n } else {\n renderer.prepareViewElementSource(id);\n }\n };\n\n onTraceUpdates = (nodes: Set<NativeType>) => {\n this.emit('traceUpdates', nodes);\n };\n\n onHookOperations = (operations: Array<number>) => {\n if (__DEBUG__) {\n debug('onHookOperations', operations);\n }\n\n // TODO:\n // The chrome.runtime does not currently support transferables; it forces JSON serialization.\n // See bug https://bugs.chromium.org/p/chromium/issues/detail?id=927134\n //\n // Regarding transferables, the postMessage doc states:\n // If the ownership of an object is transferred, it becomes unusable (neutered)\n // in the context it was sent from and becomes available only to the worker it was sent to.\n //\n // Even though Chrome is eventually JSON serializing the array buffer,\n // using the transferable approach also sometimes causes it to throw:\n // DOMException: Failed to execute 'postMessage' on 'Window': ArrayBuffer at index 0 is already neutered.\n //\n // See bug https://github.com/bvaughn/react-devtools-experimental/issues/25\n //\n // The Store has a fallback in place that parses the message as JSON if the type isn't an array.\n // For now the simplest fix seems to be to not transfer the array.\n // This will negatively impact performance on Firefox so it's unfortunate,\n // but until we're able to fix the Chrome error mentioned above, it seems necessary.\n //\n // this._bridge.send('operations', operations, [operations.buffer]);\n this._bridge.send('operations', operations);\n\n if (this._persistedSelection !== null) {\n const rendererID = operations[0];\n if (this._persistedSelection.rendererID === rendererID) {\n // Check if we can select a deeper match for the persisted selection.\n const renderer = this._rendererInterfaces[rendererID];\n if (renderer == null) {\n console.warn(`Invalid renderer id \"${rendererID}\"`);\n } else {\n const prevMatch = this._persistedSelectionMatch;\n const nextMatch = renderer.getBestMatchForTrackedPath();\n this._persistedSelectionMatch = nextMatch;\n const prevMatchID = prevMatch !== null ? prevMatch.id : null;\n const nextMatchID = nextMatch !== null ? nextMatch.id : null;\n if (prevMatchID !== nextMatchID) {\n if (nextMatchID !== null) {\n // We moved forward, unlocking a deeper node.\n this._bridge.send('selectFiber', nextMatchID);\n }\n }\n if (nextMatch !== null && nextMatch.isFullMatch) {\n // We've just unlocked the innermost selected node.\n // There's no point tracking it further.\n this._persistedSelection = null;\n this._persistedSelectionMatch = null;\n renderer.setTrackedPath(null);\n }\n }\n }\n }\n };\n\n onUnsupportedRenderer(rendererID: number) {\n this._bridge.send('unsupportedRendererVersion', rendererID);\n }\n\n _throttledPersistSelection = throttle((rendererID: number, id: number) => {\n // This is throttled, so both renderer and selected ID\n // might not be available by the time we read them.\n // This is why we need the defensive checks here.\n const renderer = this._rendererInterfaces[rendererID];\n const path = renderer != null ? renderer.getPathForElement(id) : null;\n if (path !== null) {\n sessionStorageSetItem(\n SESSION_STORAGE_LAST_SELECTION_KEY,\n JSON.stringify(({rendererID, path}: PersistedSelection)),\n );\n } else {\n sessionStorageRemoveItem(SESSION_STORAGE_LAST_SELECTION_KEY);\n }\n }, 1000);\n}\n","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n */\n\nimport EventEmitter from './events';\n\nimport type {ComponentFilter, Wall} from './types';\nimport type {\n InspectedElementPayload,\n OwnersList,\n ProfilingDataBackend,\n RendererID,\n} from 'react-devtools-shared/src/backend/types';\nimport type {StyleAndLayout as StyleAndLayoutPayload} from 'react-devtools-shared/src/backend/NativeStyleEditor/types';\n\nconst BATCH_DURATION = 100;\n\ntype ElementAndRendererID = {|id: number, rendererID: RendererID|};\n\ntype Message = {|\n event: string,\n payload: any,\n|};\n\ntype HighlightElementInDOM = {|\n ...ElementAndRendererID,\n displayName: string | null,\n hideAfterTimeout: boolean,\n openNativeElementsPanel: boolean,\n scrollIntoView: boolean,\n|};\n\ntype OverrideValue = {|\n ...ElementAndRendererID,\n path: Array<string | number>,\n wasForwarded?: boolean,\n value: any,\n|};\n\ntype OverrideHookState = {|\n ...OverrideValue,\n hookID: number,\n|};\n\ntype PathType = 'props' | 'hooks' | 'state' | 'context';\n\ntype DeletePath = {|\n ...ElementAndRendererID,\n type: PathType,\n hookID?: ?number,\n path: Array<string | number>,\n|};\n\ntype RenamePath = {|\n ...ElementAndRendererID,\n type: PathType,\n hookID?: ?number,\n oldPath: Array<string | number>,\n newPath: Array<string | number>,\n|};\n\ntype OverrideValueAtPath = {|\n ...ElementAndRendererID,\n type: PathType,\n hookID?: ?number,\n path: Array<string | number>,\n value: any,\n|};\n\ntype OverrideSuspense = {|\n ...ElementAndRendererID,\n forceFallback: boolean,\n|};\n\ntype CopyElementPathParams = {|\n ...ElementAndRendererID,\n path: Array<string | number>,\n|};\n\ntype ViewAttributeSourceParams = {|\n ...ElementAndRendererID,\n path: Array<string | number>,\n|};\n\ntype InspectElementParams = {|\n ...ElementAndRendererID,\n path?: Array<string | number>,\n|};\n\ntype StoreAsGlobalParams = {|\n ...ElementAndRendererID,\n count: number,\n path: Array<string | number>,\n|};\n\ntype NativeStyleEditor_RenameAttributeParams = {|\n ...ElementAndRendererID,\n oldName: string,\n newName: string,\n value: string,\n|};\n\ntype NativeStyleEditor_SetValueParams = {|\n ...ElementAndRendererID,\n name: string,\n value: string,\n|};\n\ntype UpdateConsolePatchSettingsParams = {|\n appendComponentStack: boolean,\n breakOnConsoleErrors: boolean,\n|};\n\ntype BackendEvents = {|\n extensionBackendInitialized: [],\n inspectedElement: [InspectedElementPayload],\n isBackendStorageAPISupported: [boolean],\n operations: [Array<number>],\n ownersList: [OwnersList],\n overrideComponentFilters: [Array<ComponentFilter>],\n profilingData: [ProfilingDataBackend],\n profilingStatus: [boolean],\n reloadAppForProfiling: [],\n selectFiber: [number],\n shutdown: [],\n stopInspectingNative: [boolean],\n syncSelectionFromNativeElementsPanel: [],\n syncSelectionToNativeElementsPanel: [],\n unsupportedRendererVersion: [RendererID],\n\n // React Native style editor plug-in.\n isNativeStyleEditorSupported: [\n {|isSupported: boolean, validAttributes: ?$ReadOnlyArray<string>|},\n ],\n NativeStyleEditor_styleAndLayout: [StyleAndLayoutPayload],\n|};\n\ntype FrontendEvents = {|\n clearNativeElementHighlight: [],\n copyElementPath: [CopyElementPathParams],\n deletePath: [DeletePath],\n getOwnersList: [ElementAndRendererID],\n getProfilingData: [{|rendererID: RendererID|}],\n getProfilingStatus: [],\n highlightNativeElement: [HighlightElementInDOM],\n inspectElement: [InspectElementParams],\n logElementToConsole: [ElementAndRendererID],\n overrideSuspense: [OverrideSuspense],\n overrideValueAtPath: [OverrideValueAtPath],\n profilingData: [ProfilingDataBackend],\n reloadAndProfile: [boolean],\n renamePath: [RenamePath],\n selectFiber: [number],\n setTraceUpdatesEnabled: [boolean],\n shutdown: [],\n startInspectingNative: [],\n startProfiling: [boolean],\n stopInspectingNative: [boolean],\n stopProfiling: [],\n storeAsGlobal: [StoreAsGlobalParams],\n updateComponentFilters: [Array<ComponentFilter>],\n updateConsolePatchSettings: [UpdateConsolePatchSettingsParams],\n viewAttributeSource: [ViewAttributeSourceParams],\n viewElementSource: [ElementAndRendererID],\n\n // React Native style editor plug-in.\n NativeStyleEditor_measure: [ElementAndRendererID],\n NativeStyleEditor_renameAttribute: [NativeStyleEditor_RenameAttributeParams],\n NativeStyleEditor_setValue: [NativeStyleEditor_SetValueParams],\n\n // Temporarily support newer standalone front-ends sending commands to older embedded backends.\n // We do this because React Native embeds the React DevTools backend,\n // but cannot control which version of the frontend users use.\n //\n // Note that nothing in the newer backend actually listens to these events,\n // but the new frontend still dispatches them (in case older backends are listening to them instead).\n //\n // Note that this approach does no support the combination of a newer backend with an older frontend.\n // It would be more work to suppot both approaches (and not run handlers twice)\n // so I chose to support the more likely/common scenario (and the one more difficult for an end user to \"fix\").\n overrideContext: [OverrideValue],\n overrideHookState: [OverrideHookState],\n overrideProps: [OverrideValue],\n overrideState: [OverrideValue],\n|};\n\nclass Bridge<\n OutgoingEvents: Object,\n IncomingEvents: Object,\n> extends EventEmitter<{|\n ...IncomingEvents,\n ...OutgoingEvents,\n|}> {\n _isShutdown: boolean = false;\n _messageQueue: Array<any> = [];\n _timeoutID: TimeoutID | null = null;\n _wall: Wall;\n _wallUnlisten: Function | null = null;\n\n constructor(wall: Wall) {\n super();\n\n this._wall = wall;\n\n this._wallUnlisten =\n wall.listen((message: Message) => {\n (this: any).emit(message.event, message.payload);\n }) || null;\n\n // Temporarily support older standalone front-ends sending commands to newer embedded backends.\n // We do this because React Native embeds the React DevTools backend,\n // but cannot control which version of the frontend users use.\n this.addListener('overrideValueAtPath', this.overrideValueAtPath);\n }\n\n // Listening directly to the wall isn't advised.\n // It can be used to listen for legacy (v3) messages (since they use a different format).\n get wall(): Wall {\n return this._wall;\n }\n\n send<EventName: $Keys<OutgoingEvents>>(\n event: EventName,\n ...payload: $ElementType<OutgoingEvents, EventName>\n ) {\n if (this._isShutdown) {\n console.warn(\n `Cannot send message \"${event}\" through a Bridge that has been shutdown.`,\n );\n return;\n }\n\n // When we receive a message:\n // - we add it to our queue of messages to be sent\n // - if there hasn't been a message recently, we set a timer for 0 ms in\n // the future, allowing all messages created in the same tick to be sent\n // together\n // - if there *has* been a message flushed in the last BATCH_DURATION ms\n // (or we're waiting for our setTimeout-0 to fire), then _timeoutID will\n // be set, and we'll simply add to the queue and wait for that\n this._messageQueue.push(event, payload);\n if (!this._timeoutID) {\n this._timeoutID = setTimeout(this._flush, 0);\n }\n }\n\n shutdown() {\n if (this._isShutdown) {\n console.warn('Bridge was already shutdown.');\n return;\n }\n\n // Queue the shutdown outgoing message for subscribers.\n this.send('shutdown');\n\n // Mark this bridge as destroyed, i.e. disable its public API.\n this._isShutdown = true;\n\n // Disable the API inherited from EventEmitter that can add more listeners and send more messages.\n // $FlowFixMe This property is not writable.\n this.addListener = function() {};\n // $FlowFixMe This property is not writable.\n this.emit = function() {};\n // NOTE: There's also EventEmitter API like `on` and `prependListener` that we didn't add to our Flow type of EventEmitter.\n\n // Unsubscribe this bridge incoming message listeners to be sure, and so they don't have to do that.\n this.removeAllListeners();\n\n // Stop accepting and emitting incoming messages from the wall.\n const wallUnlisten = this._wallUnlisten;\n if (wallUnlisten) {\n wallUnlisten();\n }\n\n // Synchronously flush all queued outgoing messages.\n // At this step the subscribers' code may run in this call stack.\n do {\n this._flush();\n } while (this._messageQueue.length);\n\n // Make sure once again that there is no dangling timer.\n if (this._timeoutID !== null) {\n clearTimeout(this._timeoutID);\n this._timeoutID = null;\n }\n }\n\n _flush = () => {\n // This method is used after the bridge is marked as destroyed in shutdown sequence,\n // so we do not bail out if the bridge marked as destroyed.\n // It is a private method that the bridge ensures is only called at the right times.\n\n if (this._timeoutID !== null) {\n clearTimeout(this._timeoutID);\n this._timeoutID = null;\n }\n\n if (this._messageQueue.length) {\n for (let i = 0; i < this._messageQueue.length; i += 2) {\n this._wall.send(this._messageQueue[i], ...this._messageQueue[i + 1]);\n }\n this._messageQueue.length = 0;\n\n // Check again for queued messages in BATCH_DURATION ms. This will keep\n // flushing in a loop as long as messages continue to be added. Once no\n // more are, the timer expires.\n this._timeoutID = setTimeout(this._flush, BATCH_DURATION);\n }\n };\n\n // Temporarily support older standalone backends by forwarding \"overrideValueAtPath\" commands\n // to the older message types they may be listening to.\n overrideValueAtPath = ({\n id,\n path,\n rendererID,\n type,\n value,\n }: OverrideValueAtPath) => {\n switch (type) {\n case 'context':\n this.send('overrideContext', {\n id,\n path,\n rendererID,\n wasForwarded: true,\n value,\n });\n break;\n case 'hooks':\n this.send('overrideHookState', {\n id,\n path,\n rendererID,\n wasForwarded: true,\n value,\n });\n break;\n case 'props':\n this.send('overrideProps', {\n id,\n path,\n rendererID,\n wasForwarded: true,\n value,\n });\n break;\n case 'state':\n this.send('overrideState', {\n id,\n path,\n rendererID,\n wasForwarded: true,\n value,\n });\n break;\n }\n };\n}\n\nexport type BackendBridge = Bridge<BackendEvents, FrontendEvents>;\nexport type FrontendBridge = Bridge<FrontendEvents, BackendEvents>;\n\nexport default Bridge;\n","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n */\n\nimport type {InternalInstance} from './renderer';\n\nexport function decorate(object: Object, attr: string, fn: Function): Function {\n const old = object[attr];\n object[attr] = function(instance: InternalInstance) {\n return fn.call(this, old, arguments);\n };\n return old;\n}\n\nexport function decorateMany(\n source: Object,\n fns: {[attr: string]: Function, ...},\n): Object {\n const olds = {};\n for (const name in fns) {\n olds[name] = decorate(source, name, fns[name]);\n }\n return olds;\n}\n\nexport function restoreMany(source: Object, olds: Object): void {\n for (const name in olds) {\n source[name] = olds[name];\n }\n}\n\nexport function forceUpdate(instance: InternalInstance): void {\n if (typeof instance.forceUpdate === 'function') {\n instance.forceUpdate();\n } else if (\n instance.updater != null &&\n typeof instance.updater.enqueueForceUpdate === 'function'\n ) {\n instance.updater.enqueueForceUpdate(this, () => {}, 'forceUpdate');\n }\n}\n","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n */\n\nimport {\n ElementTypeClass,\n ElementTypeFunction,\n ElementTypeRoot,\n ElementTypeHostComponent,\n ElementTypeOtherOrUnknown,\n} from 'react-devtools-shared/src/types';\nimport {getUID, utfEncodeString, printOperationsArray} from '../../utils';\nimport {\n cleanForBridge,\n copyToClipboard,\n copyWithDelete,\n copyWithRename,\n copyWithSet,\n} from '../utils';\nimport {\n deletePathInObject,\n getDisplayName,\n getInObject,\n renamePathInObject,\n setInObject,\n} from 'react-devtools-shared/src/utils';\nimport {\n __DEBUG__,\n TREE_OPERATION_ADD,\n TREE_OPERATION_REMOVE,\n TREE_OPERATION_REORDER_CHILDREN,\n} from '../../constants';\nimport {decorateMany, forceUpdate, restoreMany} from './utils';\n\nimport type {\n DevToolsHook,\n GetFiberIDForNative,\n InspectedElementPayload,\n InstanceAndStyle,\n NativeType,\n PathFrame,\n PathMatch,\n RendererInterface,\n} from '../types';\nimport type {\n ComponentFilter,\n ElementType,\n} from 'react-devtools-shared/src/types';\nimport type {Owner, InspectedElement} from '../types';\n\nexport type InternalInstance = Object;\ntype LegacyRenderer = Object;\n\nfunction getData(internalInstance: InternalInstance) {\n let displayName = null;\n let key = null;\n\n // != used deliberately here to catch undefined and null\n if (internalInstance._currentElement != null) {\n if (internalInstance._currentElement.key) {\n key = '' + internalInstance._currentElement.key;\n }\n\n const elementType = internalInstance._currentElement.type;\n if (typeof elementType === 'string') {\n displayName = elementType;\n } else if (typeof elementType === 'function') {\n displayName = getDisplayName(elementType);\n }\n }\n\n return {\n displayName,\n key,\n };\n}\n\nfunction getElementType(internalInstance: InternalInstance): ElementType {\n // != used deliberately here to catch undefined and null\n if (internalInstance._currentElement != null) {\n const elementType = internalInstance._currentElement.type;\n if (typeof elementType === 'function') {\n const publicInstance = internalInstance.getPublicInstance();\n if (publicInstance !== null) {\n return ElementTypeClass;\n } else {\n return ElementTypeFunction;\n }\n } else if (typeof elementType === 'string') {\n return ElementTypeHostComponent;\n }\n }\n return ElementTypeOtherOrUnknown;\n}\n\nfunction getChildren(internalInstance: Object): Array<any> {\n const children = [];\n\n // If the parent is a native node without rendered children, but with\n // multiple string children, then the `element` that gets passed in here is\n // a plain value -- a string or number.\n if (typeof internalInstance !== 'object') {\n // No children\n } else if (\n internalInstance._currentElement === null ||\n internalInstance._currentElement === false\n ) {\n // No children\n } else if (internalInstance._renderedComponent) {\n const child = internalInstance._renderedComponent;\n if (getElementType(child) !== ElementTypeOtherOrUnknown) {\n children.push(child);\n }\n } else if (internalInstance._renderedChildren) {\n const renderedChildren = internalInstance._renderedChildren;\n for (const name in renderedChildren) {\n const child = renderedChildren[name];\n if (getElementType(child) !== ElementTypeOtherOrUnknown) {\n children.push(child);\n }\n }\n }\n // Note: we skip the case where children are just strings or numbers\n // because the new DevTools skips over host text nodes anyway.\n return children;\n}\n\nexport function attach(\n hook: DevToolsHook,\n rendererID: number,\n renderer: LegacyRenderer,\n global: Object,\n): RendererInterface {\n const idToInternalInstanceMap: Map<number, InternalInstance> = new Map();\n const internalInstanceToIDMap: WeakMap<\n InternalInstance,\n number,\n > = new WeakMap();\n const internalInstanceToRootIDMap: WeakMap<\n InternalInstance,\n number,\n > = new WeakMap();\n\n let getInternalIDForNative: GetFiberIDForNative = ((null: any): GetFiberIDForNative);\n let findNativeNodeForInternalID: (id: number) => ?NativeType;\n\n if (renderer.ComponentTree) {\n getInternalIDForNative = (node, findNearestUnfilteredAncestor) => {\n const internalInstance = renderer.ComponentTree.getClosestInstanceFromNode(\n node,\n );\n return internalInstanceToIDMap.get(internalInstance) || null;\n };\n findNativeNodeForInternalID = (id: number) => {\n const internalInstance = idToInternalInstanceMap.get(id);\n return renderer.ComponentTree.getNodeFromInstance(internalInstance);\n };\n } else if (renderer.Mount.getID && renderer.Mount.getNode) {\n getInternalIDForNative = (node, findNearestUnfilteredAncestor) => {\n // Not implemented.\n return null;\n };\n findNativeNodeForInternalID = (id: number) => {\n // Not implemented.\n return null;\n };\n }\n\n function getDisplayNameForFiberID(id: number): string | null {\n const internalInstance = idToInternalInstanceMap.get(id);\n return internalInstance ? getData(internalInstance).displayName : null;\n }\n\n function getID(internalInstance: InternalInstance): number {\n if (typeof internalInstance !== 'object' || internalInstance === null) {\n throw new Error('Invalid internal instance: ' + internalInstance);\n }\n if (!internalInstanceToIDMap.has(internalInstance)) {\n const id = getUID();\n internalInstanceToIDMap.set(internalInstance, id);\n idToInternalInstanceMap.set(id, internalInstance);\n }\n return ((internalInstanceToIDMap.get(internalInstance): any): number);\n }\n\n function areEqualArrays(a, b) {\n if (a.length !== b.length) {\n return false;\n }\n for (let i = 0; i < a.length; i++) {\n if (a[i] !== b[i]) {\n return false;\n }\n }\n return true;\n }\n\n // This is shared mutable state that lets us keep track of where we are.\n let parentIDStack = [];\n\n let oldReconcilerMethods = null;\n if (renderer.Reconciler) {\n // React 15\n oldReconcilerMethods = decorateMany(renderer.Reconciler, {\n mountComponent(fn, args) {\n const internalInstance = args[0];\n const hostContainerInfo = args[3];\n if (getElementType(internalInstance) === ElementTypeOtherOrUnknown) {\n return fn.apply(this, args);\n }\n if (hostContainerInfo._topLevelWrapper === undefined) {\n // SSR\n return fn.apply(this, args);\n }\n\n const id = getID(internalInstance);\n // Push the operation.\n const parentID =\n parentIDStack.length > 0\n ? parentIDStack[parentIDStack.length - 1]\n : 0;\n recordMount(internalInstance, id, parentID);\n parentIDStack.push(id);\n\n // Remember the root.\n internalInstanceToRootIDMap.set(\n internalInstance,\n getID(hostContainerInfo._topLevelWrapper),\n );\n\n try {\n const result = fn.apply(this, args);\n parentIDStack.pop();\n return result;\n } catch (err) {\n parentIDStack = [];\n throw err;\n } finally {\n if (parentIDStack.length === 0) {\n const rootID = internalInstanceToRootIDMap.get(internalInstance);\n if (rootID === undefined) {\n throw new Error('Expected to find root ID.');\n }\n flushPendingEvents(rootID);\n }\n }\n },\n performUpdateIfNecessary(fn, args) {\n const internalInstance = args[0];\n if (getElementType(internalInstance) === ElementTypeOtherOrUnknown) {\n return fn.apply(this, args);\n }\n\n const id = getID(internalInstance);\n parentIDStack.push(id);\n\n const prevChildren = getChildren(internalInstance);\n try {\n const result = fn.apply(this, args);\n\n const nextChildren = getChildren(internalInstance);\n if (!areEqualArrays(prevChildren, nextChildren)) {\n // Push the operation\n recordReorder(internalInstance, id, nextChildren);\n }\n\n parentIDStack.pop();\n return result;\n } catch (err) {\n parentIDStack = [];\n throw err;\n } finally {\n if (parentIDStack.length === 0) {\n const rootID = internalInstanceToRootIDMap.get(internalInstance);\n if (rootID === undefined) {\n throw new Error('Expected to find root ID.');\n }\n flushPendingEvents(rootID);\n }\n }\n },\n receiveComponent(fn, args) {\n const internalInstance = args[0];\n if (getElementType(internalInstance) === ElementTypeOtherOrUnknown) {\n return fn.apply(this, args);\n }\n\n const id = getID(internalInstance);\n parentIDStack.push(id);\n\n const prevChildren = getChildren(internalInstance);\n try {\n const result = fn.apply(this, args);\n\n const nextChildren = getChildren(internalInstance);\n if (!areEqualArrays(prevChildren, nextChildren)) {\n // Push the operation\n recordReorder(internalInstance, id, nextChildren);\n }\n\n parentIDStack.pop();\n return result;\n } catch (err) {\n parentIDStack = [];\n throw err;\n } finally {\n if (parentIDStack.length === 0) {\n const rootID = internalInstanceToRootIDMap.get(internalInstance);\n if (rootID === undefined) {\n throw new Error('Expected to find root ID.');\n }\n flushPendingEvents(rootID);\n }\n }\n },\n unmountComponent(fn, args) {\n const internalInstance = args[0];\n if (getElementType(internalInstance) === ElementTypeOtherOrUnknown) {\n return fn.apply(this, args);\n }\n\n const id = getID(internalInstance);\n parentIDStack.push(id);\n try {\n const result = fn.apply(this, args);\n parentIDStack.pop();\n\n // Push the operation.\n recordUnmount(internalInstance, id);\n\n return result;\n } catch (err) {\n parentIDStack = [];\n throw err;\n } finally {\n if (parentIDStack.length === 0) {\n const rootID = internalInstanceToRootIDMap.get(internalInstance);\n if (rootID === undefined) {\n throw new Error('Expected to find root ID.');\n }\n flushPendingEvents(rootID);\n }\n }\n },\n });\n }\n\n function cleanup() {\n if (oldReconcilerMethods !== null) {\n if (renderer.Component) {\n restoreMany(renderer.Component.Mixin, oldReconcilerMethods);\n } else {\n restoreMany(renderer.Reconciler, oldReconcilerMethods);\n }\n }\n oldReconcilerMethods = null;\n }\n\n function recordMount(\n internalInstance: InternalInstance,\n id: number,\n parentID: number,\n ) {\n const isRoot = parentID === 0;\n\n if (__DEBUG__) {\n console.log(\n '%crecordMount()',\n 'color: green; font-weight: bold;',\n id,\n getData(internalInstance).displayName,\n );\n }\n\n if (isRoot) {\n // TODO Is this right? For all versions?\n const hasOwnerMetadata =\n internalInstance._currentElement != null &&\n internalInstance._currentElement._owner != null;\n\n pushOperation(TREE_OPERATION_ADD);\n pushOperation(id);\n pushOperation(ElementTypeRoot);\n pushOperation(0); // isProfilingSupported?\n pushOperation(hasOwnerMetadata ? 1 : 0);\n } else {\n const type = getElementType(internalInstance);\n const {displayName, key} = getData(internalInstance);\n\n const ownerID =\n internalInstance._currentElement != null &&\n internalInstance._currentElement._owner != null\n ? getID(internalInstance._currentElement._owner)\n : 0;\n\n const displayNameStringID = getStringID(displayName);\n const keyStringID = getStringID(key);\n pushOperation(TREE_OPERATION_ADD);\n pushOperation(id);\n pushOperation(type);\n pushOperation(parentID);\n pushOperation(ownerID);\n pushOperation(displayNameStringID);\n pushOperation(keyStringID);\n }\n }\n\n function recordReorder(\n internalInstance: InternalInstance,\n id: number,\n nextChildren: Array<InternalInstance>,\n ) {\n pushOperation(TREE_OPERATION_REORDER_CHILDREN);\n pushOperation(id);\n const nextChildIDs = nextChildren.map(getID);\n pushOperation(nextChildIDs.length);\n for (let i = 0; i < nextChildIDs.length; i++) {\n pushOperation(nextChildIDs[i]);\n }\n }\n\n function recordUnmount(internalInstance: InternalInstance, id: number) {\n pendingUnmountedIDs.push(id);\n idToInternalInstanceMap.delete(id);\n }\n\n function crawlAndRecordInitialMounts(\n id: number,\n parentID: number,\n rootID: number,\n ) {\n if (__DEBUG__) {\n console.group('crawlAndRecordInitialMounts() id:', id);\n }\n\n const internalInstance = idToInternalInstanceMap.get(id);\n if (internalInstance != null) {\n internalInstanceToRootIDMap.set(internalInstance, rootID);\n recordMount(internalInstance, id, parentID);\n getChildren(internalInstance).forEach(child =>\n crawlAndRecordInitialMounts(getID(child), id, rootID),\n );\n }\n\n if (__DEBUG__) {\n console.groupEnd();\n }\n }\n\n function flushInitialOperations() {\n // Crawl roots though and register any nodes that mounted before we were injected.\n\n const roots =\n renderer.Mount._instancesByReactRootID ||\n renderer.Mount._instancesByContainerID;\n\n for (const key in roots) {\n const internalInstance = roots[key];\n const id = getID(internalInstance);\n crawlAndRecordInitialMounts(id, 0, id);\n flushPendingEvents(id);\n }\n }\n\n const pendingOperations: Array<number> = [];\n const pendingStringTable: Map<string, number> = new Map();\n let pendingUnmountedIDs: Array<number> = [];\n let pendingStringTableLength: number = 0;\n let pendingUnmountedRootID: number | null = null;\n\n function flushPendingEvents(rootID: number) {\n if (\n pendingOperations.length === 0 &&\n pendingUnmountedIDs.length === 0 &&\n pendingUnmountedRootID === null\n ) {\n return;\n }\n\n const numUnmountIDs =\n pendingUnmountedIDs.length + (pendingUnmountedRootID === null ? 0 : 1);\n\n const operations = new Array(\n // Identify which renderer this update is coming from.\n 2 + // [rendererID, rootFiberID]\n // How big is the string table?\n 1 + // [stringTableLength]\n // Then goes the actual string table.\n pendingStringTableLength +\n // All unmounts are batched in a single message.\n // [TREE_OPERATION_REMOVE, removedIDLength, ...ids]\n (numUnmountIDs > 0 ? 2 + numUnmountIDs : 0) +\n // Mount operations\n pendingOperations.length,\n );\n\n // Identify which renderer this update is coming from.\n // This enables roots to be mapped to renderers,\n // Which in turn enables fiber properations, states, and hooks to be inspected.\n let i = 0;\n operations[i++] = rendererID;\n operations[i++] = rootID;\n\n // Now fill in the string table.\n // [stringTableLength, str1Length, ...str1, str2Length, ...str2, ...]\n operations[i++] = pendingStringTableLength;\n pendingStringTable.forEach((value, key) => {\n operations[i++] = key.length;\n const encodedKey = utfEncodeString(key);\n for (let j = 0; j < encodedKey.length; j++) {\n operations[i + j] = encodedKey[j];\n }\n i += key.length;\n });\n\n if (numUnmountIDs > 0) {\n // All unmounts except roots are batched in a single message.\n operations[i++] = TREE_OPERATION_REMOVE;\n // The first number is how many unmounted IDs we're gonna send.\n operations[i++] = numUnmountIDs;\n // Fill in the unmounts\n for (let j = 0; j < pendingUnmountedIDs.length; j++) {\n operations[i++] = pendingUnmountedIDs[j];\n }\n // The root ID should always be unmounted last.\n if (pendingUnmountedRootID !== null) {\n operations[i] = pendingUnmountedRootID;\n i++;\n }\n }\n\n // Fill in the rest of the operations.\n for (let j = 0; j < pendingOperations.length; j++) {\n operations[i + j] = pendingOperations[j];\n }\n i += pendingOperations.length;\n\n if (__DEBUG__) {\n printOperationsArray(operations);\n }\n\n // If we've already connected to the frontend, just pass the operations through.\n hook.emit('operations', operations);\n\n pendingOperations.length = 0;\n pendingUnmountedIDs = [];\n pendingUnmountedRootID = null;\n pendingStringTable.clear();\n pendingStringTableLength = 0;\n }\n\n function pushOperation(op: number): void {\n if (__DEV__) {\n if (!Number.isInteger(op)) {\n console.error(\n 'pushOperation() was called but the value is not an integer.',\n op,\n );\n }\n }\n pendingOperations.push(op);\n }\n\n function getStringID(str: string | null): number {\n if (str === null) {\n return 0;\n }\n const existingID = pendingStringTable.get(str);\n if (existingID !== undefined) {\n return existingID;\n }\n const stringID = pendingStringTable.size + 1;\n pendingStringTable.set(str, stringID);\n // The string table total length needs to account\n // both for the string length, and for the array item\n // that contains the length itself. Hence + 1.\n pendingStringTableLength += str.length + 1;\n return stringID;\n }\n\n let currentlyInspectedElementID: number | null = null;\n let currentlyInspectedPaths: Object = {};\n\n // Track the intersection of currently inspected paths,\n // so that we can send their data along if the element is re-rendered.\n function mergeInspectedPaths(path: Array<string | number>) {\n let current = currentlyInspectedPaths;\n path.forEach(key => {\n if (!current[key]) {\n current[key] = {};\n }\n current = current[key];\n });\n }\n\n function createIsPathAllowed(key: string) {\n // This function helps prevent previously-inspected paths from being dehydrated in updates.\n // This is important to avoid a bad user experience where expanded toggles collapse on update.\n return function isPathAllowed(path: Array<string | number>): boolean {\n let current = currentlyInspectedPaths[key];\n if (!current) {\n return false;\n }\n for (let i = 0; i < path.length; i++) {\n current = current[path[i]];\n if (!current) {\n return false;\n }\n }\n return true;\n };\n }\n\n // Fast path props lookup for React Native style editor.\n function getInstanceAndStyle(id: number): InstanceAndStyle {\n let instance = null;\n let style = null;\n\n const internalInstance = idToInternalInstanceMap.get(id);\n if (internalInstance != null) {\n instance = internalInstance._instance || null;\n\n const element = internalInstance._currentElement;\n if (element != null && element.props != null) {\n style = element.props.style || null;\n }\n }\n\n return {\n instance,\n style,\n };\n }\n\n function updateSelectedElement(id: number): void {\n const internalInstance = idToInternalInstanceMap.get(id);\n if (internalInstance == null) {\n console.warn(`Could not find instance with id \"${id}\"`);\n return;\n }\n\n switch (getElementType(internalInstance)) {\n case ElementTypeClass:\n global.$r = internalInstance._instance;\n break;\n case ElementTypeFunction:\n const element = internalInstance._currentElement;\n if (element == null) {\n console.warn(`Could not find element with id \"${id}\"`);\n return;\n }\n\n global.$r = {\n props: element.props,\n type: element.type,\n };\n break;\n default:\n global.$r = null;\n break;\n }\n }\n\n function storeAsGlobal(\n id: number,\n path: Array<string | number>,\n count: number,\n ): void {\n const inspectedElement = inspectElementRaw(id);\n if (inspectedElement !== null) {\n const value = getInObject(inspectedElement, path);\n const key = `$reactTemp${count}`;\n\n window[key] = value;\n\n console.log(key);\n console.log(value);\n }\n }\n\n function copyElementPath(id: number, path: Array<string | number>): void {\n const inspectedElement = inspectElementRaw(id);\n if (inspectedElement !== null) {\n copyToClipboard(getInObject(inspectedElement, path));\n }\n }\n\n function inspectElement(\n id: number,\n path?: Array<string | number>,\n ): InspectedElementPayload {\n if (currentlyInspectedElementID !== id) {\n currentlyInspectedElementID = id;\n currentlyInspectedPaths = {};\n }\n\n const inspectedElement = inspectElementRaw(id);\n if (inspectedElement === null) {\n return {\n id,\n type: 'not-found',\n };\n }\n\n if (path != null) {\n mergeInspectedPaths(path);\n }\n\n // Any time an inspected element has an update,\n // we should update the selected $r value as wel.\n // Do this before dehyration (cleanForBridge).\n updateSelectedElement(id);\n\n inspectedElement.context = cleanForBridge(\n inspectedElement.context,\n createIsPathAllowed('context'),\n );\n inspectedElement.props = cleanForBridge(\n inspectedElement.props,\n createIsPathAllowed('props'),\n );\n inspectedElement.state = cleanForBridge(\n inspectedElement.state,\n createIsPathAllowed('state'),\n );\n\n return {\n id,\n type: 'full-data',\n value: inspectedElement,\n };\n }\n\n function inspectElementRaw(id: number): InspectedElement | null {\n const internalInstance = idToInternalInstanceMap.get(id);\n\n if (internalInstance == null) {\n return null;\n }\n\n const {displayName, key} = getData(internalInstance);\n const type = getElementType(internalInstance);\n\n let context = null;\n let owners = null;\n let props = null;\n let state = null;\n let source = null;\n\n const element = internalInstance._currentElement;\n if (element !== null) {\n props = element.props;\n source = element._source != null ? element._source : null;\n\n let owner = element._owner;\n if (owner) {\n owners = [];\n while (owner != null) {\n owners.push({\n displayName: getData(owner).displayName || 'Unknown',\n id: getID(owner),\n type: getElementType(owner),\n });\n if (owner._currentElement) {\n owner = owner._currentElement._owner;\n }\n }\n }\n }\n\n const publicInstance = internalInstance._instance;\n if (publicInstance != null) {\n context = publicInstance.context || null;\n state = publicInstance.state || null;\n }\n\n return {\n id,\n\n // Does the current renderer support editable hooks and function props?\n canEditHooks: false,\n canEditFunctionProps: false,\n\n // Does the current renderer support advanced editing interface?\n canEditHooksAndDeletePaths: false,\n canEditHooksAndRenamePaths: false,\n canEditFunctionPropsDeletePaths: false,\n canEditFunctionPropsRenamePaths: false,\n\n // Suspense did not exist in legacy versions\n canToggleSuspense: false,\n\n // Can view component source location.\n canViewSource: type === ElementTypeClass || type === ElementTypeFunction,\n\n // Only legacy context exists in legacy versions.\n hasLegacyContext: true,\n\n displayName: displayName,\n\n type: type,\n\n key: key != null ? key : null,\n\n // Inspectable properties.\n context,\n hooks: null,\n props,\n state,\n\n // List of owners\n owners,\n\n // Location of component in source code.\n source,\n\n rootType: null,\n rendererPackageName: null,\n rendererVersion: null,\n };\n }\n\n function logElementToConsole(id: number): void {\n const result = inspectElementRaw(id);\n if (result === null) {\n console.warn(`Could not find element with id \"${id}\"`);\n return;\n }\n\n const supportsGroup = typeof console.groupCollapsed === 'function';\n if (supportsGroup) {\n console.groupCollapsed(\n `[Click to expand] %c<${result.displayName || 'Component'} />`,\n // --dom-tag-name-color is the CSS variable Chrome styles HTML elements with in the console.\n 'color: var(--dom-tag-name-color); font-weight: normal;',\n );\n }\n if (result.props !== null) {\n console.log('Props:', result.props);\n }\n if (result.state !== null) {\n console.log('State:', result.state);\n }\n if (result.context !== null) {\n console.log('Context:', result.context);\n }\n const nativeNode = findNativeNodeForInternalID(id);\n if (nativeNode !== null) {\n console.log('Node:', nativeNode);\n }\n if (window.chrome || /firefox/i.test(navigator.userAgent)) {\n console.log(\n 'Right-click any value to save it as a global variable for further inspection.',\n );\n }\n if (supportsGroup) {\n console.groupEnd();\n }\n }\n\n function prepareViewAttributeSource(\n id: number,\n path: Array<string | number>,\n ): void {\n const inspectedElement = inspectElementRaw(id);\n if (inspectedElement !== null) {\n window.$attribute = getInObject(inspectedElement, path);\n }\n }\n\n function prepareViewElementSource(id: number): void {\n const internalInstance = idToInternalInstanceMap.get(id);\n if (internalInstance == null) {\n console.warn(`Could not find instance with id \"${id}\"`);\n return;\n }\n\n const element = internalInstance._currentElement;\n if (element == null) {\n console.warn(`Could not find element with id \"${id}\"`);\n return;\n }\n\n global.$type = element.type;\n }\n\n function deletePath(\n type: 'context' | 'hooks' | 'props' | 'state',\n id: number,\n hookID: ?number,\n path: Array<string | number>,\n ): void {\n const internalInstance = idToInternalInstanceMap.get(id);\n if (internalInstance != null) {\n const publicInstance = internalInstance._instance;\n if (publicInstance != null) {\n switch (type) {\n case 'context':\n deletePathInObject(publicInstance.context, path);\n forceUpdate(publicInstance);\n break;\n case 'hooks':\n throw new Error('Hooks not supported by this renderer');\n case 'props':\n const element = internalInstance._currentElement;\n internalInstance._currentElement = {\n ...element,\n props: copyWithDelete(element.props, path),\n };\n forceUpdate(publicInstance);\n break;\n case 'state':\n deletePathInObject(publicInstance.state, path);\n forceUpdate(publicInstance);\n break;\n }\n }\n }\n }\n\n function renamePath(\n type: 'context' | 'hooks' | 'props' | 'state',\n id: number,\n hookID: ?number,\n oldPath: Array<string | number>,\n newPath: Array<string | number>,\n ): void {\n const internalInstance = idToInternalInstanceMap.get(id);\n if (internalInstance != null) {\n const publicInstance = internalInstance._instance;\n if (publicInstance != null) {\n switch (type) {\n case 'context':\n renamePathInObject(publicInstance.context, oldPath, newPath);\n forceUpdate(publicInstance);\n break;\n case 'hooks':\n throw new Error('Hooks not supported by this renderer');\n case 'props':\n const element = internalInstance._currentElement;\n internalInstance._currentElement = {\n ...element,\n props: copyWithRename(element.props, oldPath, newPath),\n };\n forceUpdate(publicInstance);\n break;\n case 'state':\n renamePathInObject(publicInstance.state, oldPath, newPath);\n forceUpdate(publicInstance);\n break;\n }\n }\n }\n }\n\n function overrideValueAtPath(\n type: 'context' | 'hooks' | 'props' | 'state',\n id: number,\n hookID: ?number,\n path: Array<string | number>,\n value: any,\n ): void {\n const internalInstance = idToInternalInstanceMap.get(id);\n if (internalInstance != null) {\n const publicInstance = internalInstance._instance;\n if (publicInstance != null) {\n switch (type) {\n case 'context':\n setInObject(publicInstance.context, path, value);\n forceUpdate(publicInstance);\n break;\n case 'hooks':\n throw new Error('Hooks not supported by this renderer');\n case 'props':\n const element = internalInstance._currentElement;\n internalInstance._currentElement = {\n ...element,\n props: copyWithSet(element.props, path, value),\n };\n forceUpdate(publicInstance);\n break;\n case 'state':\n setInObject(publicInstance.state, path, value);\n forceUpdate(publicInstance);\n break;\n }\n }\n }\n }\n\n // v16+ only features\n const getProfilingData = () => {\n throw new Error('getProfilingData not supported by this renderer');\n };\n const handleCommitFiberRoot = () => {\n throw new Error('handleCommitFiberRoot not supported by this renderer');\n };\n const handleCommitFiberUnmount = () => {\n throw new Error('handleCommitFiberUnmount not supported by this renderer');\n };\n const overrideSuspense = () => {\n throw new Error('overrideSuspense not supported by this renderer');\n };\n const startProfiling = () => {\n // Do not throw, since this would break a multi-root scenario where v15 and v16 were both present.\n };\n const stopProfiling = () => {\n // Do not throw, since this would break a multi-root scenario where v15 and v16 were both present.\n };\n\n function getBestMatchForTrackedPath(): PathMatch | null {\n // Not implemented.\n return null;\n }\n\n function getPathForElement(id: number): Array<PathFrame> | null {\n // Not implemented.\n return null;\n }\n\n function updateComponentFilters(componentFilters: Array<ComponentFilter>) {\n // Not implemented.\n }\n\n function setTraceUpdatesEnabled(enabled: boolean) {\n // Not implemented.\n }\n\n function setTrackedPath(path: Array<PathFrame> | null) {\n // Not implemented.\n }\n\n function getOwnersList(id: number): Array<Owner> | null {\n // Not implemented.\n return null;\n }\n\n return {\n cleanup,\n copyElementPath,\n deletePath,\n flushInitialOperations,\n getBestMatchForTrackedPath,\n getDisplayNameForFiberID,\n getFiberIDForNative: getInternalIDForNative,\n getInstanceAndStyle,\n findNativeNodesForFiberID: (id: number) => {\n const nativeNode = findNativeNodeForInternalID(id);\n return nativeNode == null ? null : [nativeNode];\n },\n getOwnersList,\n getPathForElement,\n getProfilingData,\n handleCommitFiberRoot,\n handleCommitFiberUnmount,\n inspectElement,\n logElementToConsole,\n overrideSuspense,\n overrideValueAtPath,\n renamePath,\n prepareViewAttributeSource,\n prepareViewElementSource,\n renderer,\n setTraceUpdatesEnabled,\n setTrackedPath,\n startProfiling,\n stopProfiling,\n storeAsGlobal,\n updateComponentFilters,\n };\n}\n","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n */\n\nimport type {BoxStyle} from './types';\n\n/**\n * This mirrors react-native/Libraries/Inspector/resolveBoxStyle.js (but without RTL support).\n *\n * Resolve a style property into it's component parts, e.g.\n *\n * resolveBoxStyle('margin', {margin: 5, marginBottom: 10})\n * -> {top: 5, left: 5, right: 5, bottom: 10}\n */\nexport default function resolveBoxStyle(\n prefix: string,\n style: Object,\n): BoxStyle | null {\n let hasParts = false;\n const result = {\n bottom: 0,\n left: 0,\n right: 0,\n top: 0,\n };\n\n const styleForAll = style[prefix];\n if (styleForAll != null) {\n // eslint-disable-next-line no-for-of-loops/no-for-of-loops\n for (const key of Object.keys(result)) {\n result[key] = styleForAll;\n }\n hasParts = true;\n }\n\n const styleForHorizontal = style[prefix + 'Horizontal'];\n if (styleForHorizontal != null) {\n result.left = styleForHorizontal;\n result.right = styleForHorizontal;\n hasParts = true;\n } else {\n const styleForLeft = style[prefix + 'Left'];\n if (styleForLeft != null) {\n result.left = styleForLeft;\n hasParts = true;\n }\n\n const styleForRight = style[prefix + 'Right'];\n if (styleForRight != null) {\n result.right = styleForRight;\n hasParts = true;\n }\n\n const styleForEnd = style[prefix + 'End'];\n if (styleForEnd != null) {\n // TODO RTL support\n result.right = styleForEnd;\n hasParts = true;\n }\n const styleForStart = style[prefix + 'Start'];\n if (styleForStart != null) {\n // TODO RTL support\n result.left = styleForStart;\n hasParts = true;\n }\n }\n\n const styleForVertical = style[prefix + 'Vertical'];\n if (styleForVertical != null) {\n result.bottom = styleForVertical;\n result.top = styleForVertical;\n hasParts = true;\n } else {\n const styleForBottom = style[prefix + 'Bottom'];\n if (styleForBottom != null) {\n result.bottom = styleForBottom;\n hasParts = true;\n }\n\n const styleForTop = style[prefix + 'Top'];\n if (styleForTop != null) {\n result.top = styleForTop;\n hasParts = true;\n }\n }\n\n return hasParts ? result : null;\n}\n","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n */\n\nimport Agent from 'react-devtools-shared/src/backend/agent';\nimport resolveBoxStyle from './resolveBoxStyle';\n\nimport type {BackendBridge} from 'react-devtools-shared/src/bridge';\nimport type {RendererID} from '../types';\nimport type {StyleAndLayout} from './types';\n\nexport type ResolveNativeStyle = (stylesheetID: any) => ?Object;\n\nexport default function setupNativeStyleEditor(\n bridge: BackendBridge,\n agent: Agent,\n resolveNativeStyle: ResolveNativeStyle,\n validAttributes?: $ReadOnlyArray<string> | null,\n) {\n bridge.addListener(\n 'NativeStyleEditor_measure',\n ({id, rendererID}: {|id: number, rendererID: RendererID|}) => {\n measureStyle(agent, bridge, resolveNativeStyle, id, rendererID);\n },\n );\n\n bridge.addListener(\n 'NativeStyleEditor_renameAttribute',\n ({\n id,\n rendererID,\n oldName,\n newName,\n value,\n }: {|\n id: number,\n rendererID: RendererID,\n oldName: string,\n newName: string,\n value: string,\n |}) => {\n renameStyle(agent, id, rendererID, oldName, newName, value);\n setTimeout(() =>\n measureStyle(agent, bridge, resolveNativeStyle, id, rendererID),\n );\n },\n );\n\n bridge.addListener(\n 'NativeStyleEditor_setValue',\n ({\n id,\n rendererID,\n name,\n value,\n }: {|\n id: number,\n rendererID: number,\n name: string,\n value: string,\n |}) => {\n setStyle(agent, id, rendererID, name, value);\n setTimeout(() =>\n measureStyle(agent, bridge, resolveNativeStyle, id, rendererID),\n );\n },\n );\n\n bridge.send('isNativeStyleEditorSupported', {\n isSupported: true,\n validAttributes,\n });\n}\n\nconst EMPTY_BOX_STYLE = {\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n};\n\nconst componentIDToStyleOverrides: Map<number, Object> = new Map();\n\nfunction measureStyle(\n agent: Agent,\n bridge: BackendBridge,\n resolveNativeStyle: ResolveNativeStyle,\n id: number,\n rendererID: RendererID,\n) {\n const data = agent.getInstanceAndStyle({id, rendererID});\n if (!data || !data.style) {\n bridge.send(\n 'NativeStyleEditor_styleAndLayout',\n ({\n id,\n layout: null,\n style: null,\n }: StyleAndLayout),\n );\n return;\n }\n\n const {instance, style} = data;\n\n let resolvedStyle = resolveNativeStyle(style);\n\n // If it's a host component we edited before, amend styles.\n const styleOverrides = componentIDToStyleOverrides.get(id);\n if (styleOverrides != null) {\n resolvedStyle = Object.assign({}, resolvedStyle, styleOverrides);\n }\n\n if (!instance || typeof instance.measure !== 'function') {\n bridge.send(\n 'NativeStyleEditor_styleAndLayout',\n ({\n id,\n layout: null,\n style: resolvedStyle || null,\n }: StyleAndLayout),\n );\n return;\n }\n\n // $FlowFixMe the parameter types of an unknown function are unknown\n instance.measure((x, y, width, height, left, top) => {\n // RN Android sometimes returns undefined here. Don't send measurements in this case.\n // https://github.com/jhen0409/react-native-debugger/issues/84#issuecomment-304611817\n if (typeof x !== 'number') {\n bridge.send(\n 'NativeStyleEditor_styleAndLayout',\n ({\n id,\n layout: null,\n style: resolvedStyle || null,\n }: StyleAndLayout),\n );\n return;\n }\n const margin =\n (resolvedStyle != null && resolveBoxStyle('margin', resolvedStyle)) ||\n EMPTY_BOX_STYLE;\n const padding =\n (resolvedStyle != null && resolveBoxStyle('padding', resolvedStyle)) ||\n EMPTY_BOX_STYLE;\n bridge.send(\n 'NativeStyleEditor_styleAndLayout',\n ({\n id,\n layout: {\n x,\n y,\n width,\n height,\n left,\n top,\n margin,\n padding,\n },\n style: resolvedStyle || null,\n }: StyleAndLayout),\n );\n });\n}\n\nfunction shallowClone(object: Object): Object {\n const cloned = {};\n for (const n in object) {\n cloned[n] = object[n];\n }\n return cloned;\n}\n\nfunction renameStyle(\n agent: Agent,\n id: number,\n rendererID: RendererID,\n oldName: string,\n newName: string,\n value: string,\n): void {\n const data = agent.getInstanceAndStyle({id, rendererID});\n if (!data || !data.style) {\n return;\n }\n\n const {instance, style} = data;\n\n const newStyle = newName\n ? {[oldName]: undefined, [newName]: value}\n : {[oldName]: undefined};\n\n let customStyle;\n\n // TODO It would be nice if the renderer interface abstracted this away somehow.\n if (instance !== null && typeof instance.setNativeProps === 'function') {\n // In the case of a host component, we need to use setNativeProps().\n // Remember to \"correct\" resolved styles when we read them next time.\n const styleOverrides = componentIDToStyleOverrides.get(id);\n if (!styleOverrides) {\n componentIDToStyleOverrides.set(id, newStyle);\n } else {\n Object.assign(styleOverrides, newStyle);\n }\n // TODO Fabric does not support setNativeProps; chat with Sebastian or Eli\n instance.setNativeProps({style: newStyle});\n } else if (Array.isArray(style)) {\n const lastIndex = style.length - 1;\n if (\n typeof style[lastIndex] === 'object' &&\n !Array.isArray(style[lastIndex])\n ) {\n customStyle = shallowClone(style[lastIndex]);\n delete customStyle[oldName];\n if (newName) {\n customStyle[newName] = value;\n } else {\n customStyle[oldName] = undefined;\n }\n\n agent.overrideValueAtPath({\n type: 'props',\n id,\n rendererID,\n path: ['style', lastIndex],\n value: customStyle,\n });\n } else {\n agent.overrideValueAtPath({\n type: 'props',\n id,\n rendererID,\n path: ['style'],\n value: style.concat([newStyle]),\n });\n }\n } else if (typeof style === 'object') {\n customStyle = shallowClone(style);\n delete customStyle[oldName];\n if (newName) {\n customStyle[newName] = value;\n } else {\n customStyle[oldName] = undefined;\n }\n\n agent.overrideValueAtPath({\n type: 'props',\n id,\n rendererID,\n path: ['style'],\n value: customStyle,\n });\n } else {\n agent.overrideValueAtPath({\n type: 'props',\n id,\n rendererID,\n path: ['style'],\n value: [style, newStyle],\n });\n }\n\n agent.emit('hideNativeHighlight');\n}\n\nfunction setStyle(\n agent: Agent,\n id: number,\n rendererID: RendererID,\n name: string,\n value: string,\n) {\n const data = agent.getInstanceAndStyle({id, rendererID});\n if (!data || !data.style) {\n return;\n }\n\n const {instance, style} = data;\n const newStyle = {[name]: value};\n\n // TODO It would be nice if the renderer interface abstracted this away somehow.\n if (instance !== null && typeof instance.setNativeProps === 'function') {\n // In the case of a host component, we need to use setNativeProps().\n // Remember to \"correct\" resolved styles when we read them next time.\n const styleOverrides = componentIDToStyleOverrides.get(id);\n if (!styleOverrides) {\n componentIDToStyleOverrides.set(id, newStyle);\n } else {\n Object.assign(styleOverrides, newStyle);\n }\n // TODO Fabric does not support setNativeProps; chat with Sebastian or Eli\n instance.setNativeProps({style: newStyle});\n } else if (Array.isArray(style)) {\n const lastLength = style.length - 1;\n if (\n typeof style[lastLength] === 'object' &&\n !Array.isArray(style[lastLength])\n ) {\n agent.overrideValueAtPath({\n type: 'props',\n id,\n rendererID,\n path: ['style', lastLength, name],\n value,\n });\n } else {\n agent.overrideValueAtPath({\n type: 'props',\n id,\n rendererID,\n path: ['style'],\n value: style.concat([newStyle]),\n });\n }\n } else {\n agent.overrideValueAtPath({\n type: 'props',\n id,\n rendererID,\n path: ['style'],\n value: [style, newStyle],\n });\n }\n\n agent.emit('hideNativeHighlight');\n}\n","/**\n * Install the hook on window, which is an event emitter.\n * Note because Chrome content scripts cannot directly modify the window object,\n * we are evaling this function by inserting a script tag.\n * That's why we have to inline the whole event emitter implementation here.\n *\n * @flow\n */\n\nimport {\n patch as patchConsole,\n registerRenderer as registerRendererWithConsole,\n} from './backend/console';\n\nimport type {DevToolsHook} from 'react-devtools-shared/src/backend/types';\n\ndeclare var window: any;\n\nexport function installHook(target: any): DevToolsHook | null {\n if (target.hasOwnProperty('__REACT_DEVTOOLS_GLOBAL_HOOK__')) {\n return null;\n }\n\n function detectReactBuildType(renderer) {\n try {\n if (typeof renderer.version === 'string') {\n // React DOM Fiber (16+)\n if (renderer.bundleType > 0) {\n // This is not a production build.\n // We are currently only using 0 (PROD) and 1 (DEV)\n // but might add 2 (PROFILE) in the future.\n return 'development';\n }\n\n // React 16 uses flat bundles. If we report the bundle as production\n // version, it means we also minified and envified it ourselves.\n return 'production';\n // Note: There is still a risk that the CommonJS entry point has not\n // been envified or uglified. In this case the user would have *both*\n // development and production bundle, but only the prod one would run.\n // This would be really bad. We have a separate check for this because\n // it happens *outside* of the renderer injection. See `checkDCE` below.\n }\n\n const toString = Function.prototype.toString;\n if (renderer.Mount && renderer.Mount._renderNewRootComponent) {\n // React DOM Stack\n const renderRootCode = toString.call(\n renderer.Mount._renderNewRootComponent,\n );\n // Filter out bad results (if that is even possible):\n if (renderRootCode.indexOf('function') !== 0) {\n // Hope for the best if we're not sure.\n return 'production';\n }\n // Check for React DOM Stack < 15.1.0 in development.\n // If it contains \"storedMeasure\" call, it's wrapped in ReactPerf (DEV only).\n // This would be true even if it's minified, as method name still matches.\n if (renderRootCode.indexOf('storedMeasure') !== -1) {\n return 'development';\n }\n // For other versions (and configurations) it's not so easy.\n // Let's quickly exclude proper production builds.\n // If it contains a warning message, it's either a DEV build,\n // or an PROD build without proper dead code elimination.\n if (renderRootCode.indexOf('should be a pure function') !== -1) {\n // Now how do we tell a DEV build from a bad PROD build?\n // If we see NODE_ENV, we're going to assume this is a dev build\n // because most likely it is referring to an empty shim.\n if (renderRootCode.indexOf('NODE_ENV') !== -1) {\n return 'development';\n }\n // If we see \"development\", we're dealing with an envified DEV build\n // (such as the official React DEV UMD).\n if (renderRootCode.indexOf('development') !== -1) {\n return 'development';\n }\n // I've seen process.env.NODE_ENV !== 'production' being smartly\n // replaced by `true` in DEV by Webpack. I don't know how that\n // works but we can safely guard against it because `true` was\n // never used in the function source since it was written.\n if (renderRootCode.indexOf('true') !== -1) {\n return 'development';\n }\n // By now either it is a production build that has not been minified,\n // or (worse) this is a minified development build using non-standard\n // environment (e.g. \"staging\"). We're going to look at whether\n // the function argument name is mangled:\n if (\n // 0.13 to 15\n renderRootCode.indexOf('nextElement') !== -1 ||\n // 0.12\n renderRootCode.indexOf('nextComponent') !== -1\n ) {\n // We can't be certain whether this is a development build or not,\n // but it is definitely unminified.\n return 'unminified';\n } else {\n // This is likely a minified development build.\n return 'development';\n }\n }\n // By now we know that it's envified and dead code elimination worked,\n // but what if it's still not minified? (Is this even possible?)\n // Let's check matches for the first argument name.\n if (\n // 0.13 to 15\n renderRootCode.indexOf('nextElement') !== -1 ||\n // 0.12\n renderRootCode.indexOf('nextComponent') !== -1\n ) {\n return 'unminified';\n }\n // Seems like we're using the production version.\n // However, the branch above is Stack-only so this is 15 or earlier.\n return 'outdated';\n }\n } catch (err) {\n // Weird environments may exist.\n // This code needs a higher fault tolerance\n // because it runs even with closed DevTools.\n // TODO: should we catch errors in all injected code, and not just this part?\n }\n return 'production';\n }\n\n function checkDCE(fn: Function) {\n // This runs for production versions of React.\n // Needs to be super safe.\n try {\n const toString = Function.prototype.toString;\n const code = toString.call(fn);\n\n // This is a string embedded in the passed function under DEV-only\n // condition. However the function executes only in PROD. Therefore,\n // if we see it, dead code elimination did not work.\n if (code.indexOf('^_^') > -1) {\n // Remember to report during next injection.\n hasDetectedBadDCE = true;\n\n // Bonus: throw an exception hoping that it gets picked up by a reporting system.\n // Not synchronously so that it doesn't break the calling code.\n setTimeout(function() {\n throw new Error(\n 'React is running in production mode, but dead code ' +\n 'elimination has not been applied. Read how to correctly ' +\n 'configure React for production: ' +\n 'https://reactjs.org/link/perf-use-production-build',\n );\n });\n }\n } catch (err) {}\n }\n\n let uidCounter = 0;\n\n function inject(renderer) {\n const id = ++uidCounter;\n renderers.set(id, renderer);\n\n const reactBuildType = hasDetectedBadDCE\n ? 'deadcode'\n : detectReactBuildType(renderer);\n\n // Patching the console enables DevTools to do a few useful things:\n // * Append component stacks to warnings and error messages\n // * Disable logging during re-renders to inspect hooks (see inspectHooksOfFiber)\n //\n // For React Native, we intentionally patch early (during injection).\n // This provides React Native developers with components stacks even if they don't run DevTools.\n // This won't work for DOM though, since this entire file is eval'ed and inserted as a script tag.\n // In that case, we'll patch later (when the frontend attaches).\n //\n // Don't patch in test environments because we don't want to interfere with Jest's own console overrides.\n //\n // Note that because this function is inlined, this conditional check must only use static booleans.\n // Otherwise the extension will throw with an undefined error.\n // (See comments in the try/catch below for more context on inlining.)\n if (!__EXTENSION__ && !__TEST__) {\n try {\n const appendComponentStack =\n window.__REACT_DEVTOOLS_APPEND_COMPONENT_STACK__ !== false;\n const breakOnConsoleErrors =\n window.__REACT_DEVTOOLS_BREAK_ON_CONSOLE_ERRORS__ === true;\n\n // The installHook() function is injected by being stringified in the browser,\n // so imports outside of this function do not get included.\n //\n // Normally we could check \"typeof patchConsole === 'function'\",\n // but Webpack wraps imports with an object (e.g. _backend_console__WEBPACK_IMPORTED_MODULE_0__)\n // and the object itself will be undefined as well for the reasons mentioned above,\n // so we use try/catch instead.\n if (appendComponentStack || breakOnConsoleErrors) {\n registerRendererWithConsole(renderer);\n patchConsole({\n appendComponentStack,\n breakOnConsoleErrors,\n });\n }\n } catch (error) {}\n }\n\n // If we have just reloaded to profile, we need to inject the renderer interface before the app loads.\n // Otherwise the renderer won't yet exist and we can skip this step.\n const attach = target.__REACT_DEVTOOLS_ATTACH__;\n if (typeof attach === 'function') {\n const rendererInterface = attach(hook, id, renderer, target);\n hook.rendererInterfaces.set(id, rendererInterface);\n }\n\n hook.emit('renderer', {id, renderer, reactBuildType});\n\n return id;\n }\n\n let hasDetectedBadDCE = false;\n\n function sub(event, fn) {\n hook.on(event, fn);\n return () => hook.off(event, fn);\n }\n\n function on(event, fn) {\n if (!listeners[event]) {\n listeners[event] = [];\n }\n listeners[event].push(fn);\n }\n\n function off(event, fn) {\n if (!listeners[event]) {\n return;\n }\n const index = listeners[event].indexOf(fn);\n if (index !== -1) {\n listeners[event].splice(index, 1);\n }\n if (!listeners[event].length) {\n delete listeners[event];\n }\n }\n\n function emit(event, data) {\n if (listeners[event]) {\n listeners[event].map(fn => fn(data));\n }\n }\n\n function getFiberRoots(rendererID) {\n const roots = fiberRoots;\n if (!roots[rendererID]) {\n roots[rendererID] = new Set();\n }\n return roots[rendererID];\n }\n\n function onCommitFiberUnmount(rendererID, fiber) {\n const rendererInterface = rendererInterfaces.get(rendererID);\n if (rendererInterface != null) {\n rendererInterface.handleCommitFiberUnmount(fiber);\n }\n }\n\n function onCommitFiberRoot(rendererID, root, priorityLevel) {\n const mountedRoots = hook.getFiberRoots(rendererID);\n const current = root.current;\n const isKnownRoot = mountedRoots.has(root);\n const isUnmounting =\n current.memoizedState == null || current.memoizedState.element == null;\n\n // Keep track of mounted roots so we can hydrate when DevTools connect.\n if (!isKnownRoot && !isUnmounting) {\n mountedRoots.add(root);\n } else if (isKnownRoot && isUnmounting) {\n mountedRoots.delete(root);\n }\n const rendererInterface = rendererInterfaces.get(rendererID);\n if (rendererInterface != null) {\n rendererInterface.handleCommitFiberRoot(root, priorityLevel);\n }\n }\n\n // TODO: More meaningful names for \"rendererInterfaces\" and \"renderers\".\n const fiberRoots = {};\n const rendererInterfaces = new Map();\n const listeners = {};\n const renderers = new Map();\n\n const hook: DevToolsHook = {\n rendererInterfaces,\n listeners,\n\n // Fast Refresh for web relies on this.\n renderers,\n\n emit,\n getFiberRoots,\n inject,\n on,\n off,\n sub,\n\n // This is a legacy flag.\n // React v16 checks the hook for this to ensure DevTools is new enough.\n supportsFiber: true,\n\n // React calls these methods.\n checkDCE,\n onCommitFiberUnmount,\n onCommitFiberRoot,\n };\n\n Object.defineProperty(\n target,\n '__REACT_DEVTOOLS_GLOBAL_HOOK__',\n ({\n // This property needs to be configurable for the test environment,\n // else we won't be able to delete and recreate it beween tests.\n configurable: __DEV__,\n enumerable: false,\n get() {\n return hook;\n },\n }: Object),\n );\n\n return hook;\n}\n","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n */\n\nimport Agent from 'react-devtools-shared/src/backend/agent';\nimport Bridge from 'react-devtools-shared/src/bridge';\nimport {installHook} from 'react-devtools-shared/src/hook';\nimport {initBackend} from 'react-devtools-shared/src/backend';\nimport {__DEBUG__} from 'react-devtools-shared/src/constants';\nimport setupNativeStyleEditor from 'react-devtools-shared/src/backend/NativeStyleEditor/setupNativeStyleEditor';\nimport {getDefaultComponentFilters} from 'react-devtools-shared/src/utils';\n\nimport type {BackendBridge} from 'react-devtools-shared/src/bridge';\nimport type {ComponentFilter} from 'react-devtools-shared/src/types';\nimport type {DevToolsHook} from 'react-devtools-shared/src/backend/types';\nimport type {ResolveNativeStyle} from 'react-devtools-shared/src/backend/NativeStyleEditor/setupNativeStyleEditor';\n\ntype ConnectOptions = {\n host?: string,\n nativeStyleEditorValidAttributes?: $ReadOnlyArray<string>,\n port?: number,\n useHttps?: boolean,\n resolveRNStyle?: ResolveNativeStyle,\n retryConnectionDelay?: number,\n isAppActive?: () => boolean,\n websocket?: ?WebSocket,\n ...\n};\n\ninstallHook(window);\n\nconst hook: ?DevToolsHook = window.__REACT_DEVTOOLS_GLOBAL_HOOK__;\n\nlet savedComponentFilters: Array<ComponentFilter> = getDefaultComponentFilters();\n\nfunction debug(methodName: string, ...args) {\n if (__DEBUG__) {\n console.log(\n `%c[core/backend] %c${methodName}`,\n 'color: teal; font-weight: bold;',\n 'font-weight: bold;',\n ...args,\n );\n }\n}\n\nexport function connectToDevTools(options: ?ConnectOptions) {\n if (hook == null) {\n // DevTools didn't get injected into this page (maybe b'c of the contentType).\n return;\n }\n const {\n host = 'localhost',\n nativeStyleEditorValidAttributes,\n useHttps = false,\n port = 8097,\n websocket,\n resolveRNStyle = null,\n retryConnectionDelay = 2000,\n isAppActive = () => true,\n } = options || {};\n\n const protocol = useHttps ? 'wss' : 'ws';\n let retryTimeoutID: TimeoutID | null = null;\n\n function scheduleRetry() {\n if (retryTimeoutID === null) {\n // Two seconds because RN had issues with quick retries.\n retryTimeoutID = setTimeout(\n () => connectToDevTools(options),\n retryConnectionDelay,\n );\n }\n }\n\n if (!isAppActive()) {\n // If the app is in background, maybe retry later.\n // Don't actually attempt to connect until we're in foreground.\n scheduleRetry();\n return;\n }\n\n let bridge: BackendBridge | null = null;\n\n const messageListeners = [];\n const uri = protocol + '://' + host + ':' + port;\n\n // If existing websocket is passed, use it.\n // This is necessary to support our custom integrations.\n // See D6251744.\n const ws = websocket ? websocket : new window.WebSocket(uri);\n ws.onclose = handleClose;\n ws.onerror = handleFailed;\n ws.onmessage = handleMessage;\n ws.onopen = function() {\n bridge = new Bridge({\n listen(fn) {\n messageListeners.push(fn);\n return () => {\n const index = messageListeners.indexOf(fn);\n if (index >= 0) {\n messageListeners.splice(index, 1);\n }\n };\n },\n send(event: string, payload: any, transferable?: Array<any>) {\n if (ws.readyState === ws.OPEN) {\n if (__DEBUG__) {\n debug('wall.send()', event, payload);\n }\n\n ws.send(JSON.stringify({event, payload}));\n } else {\n if (__DEBUG__) {\n debug(\n 'wall.send()',\n 'Shutting down bridge because of closed WebSocket connection',\n );\n }\n\n if (bridge !== null) {\n bridge.shutdown();\n }\n\n scheduleRetry();\n }\n },\n });\n bridge.addListener(\n 'inspectElement',\n ({id, rendererID}: {id: number, rendererID: number, ...}) => {\n const renderer = agent.rendererInterfaces[rendererID];\n if (renderer != null) {\n // Send event for RN to highlight.\n const nodes: ?Array<HTMLElement> = renderer.findNativeNodesForFiberID(\n id,\n );\n if (nodes != null && nodes[0] != null) {\n agent.emit('showNativeHighlight', nodes[0]);\n }\n }\n },\n );\n bridge.addListener(\n 'updateComponentFilters',\n (componentFilters: Array<ComponentFilter>) => {\n // Save filter changes in memory, in case DevTools is reloaded.\n // In that case, the renderer will already be using the updated values.\n // We'll lose these in between backend reloads but that can't be helped.\n savedComponentFilters = componentFilters;\n },\n );\n\n // The renderer interface doesn't read saved component filters directly,\n // because they are generally stored in localStorage within the context of the extension.\n // Because of this it relies on the extension to pass filters.\n // In the case of the standalone DevTools being used with a website,\n // saved filters are injected along with the backend script tag so we shouldn't override them here.\n // This injection strategy doesn't work for React Native though.\n // Ideally the backend would save the filters itself, but RN doesn't provide a sync storage solution.\n // So for now we just fall back to using the default filters...\n if (window.__REACT_DEVTOOLS_COMPONENT_FILTERS__ == null) {\n bridge.send('overrideComponentFilters', savedComponentFilters);\n }\n\n // TODO (npm-packages) Warn if \"isBackendStorageAPISupported\"\n const agent = new Agent(bridge);\n agent.addListener('shutdown', () => {\n // If we received 'shutdown' from `agent`, we assume the `bridge` is already shutting down,\n // and that caused the 'shutdown' event on the `agent`, so we don't need to call `bridge.shutdown()` here.\n hook.emit('shutdown');\n });\n\n initBackend(hook, agent, window);\n\n // Setup React Native style editor if the environment supports it.\n if (resolveRNStyle != null || hook.resolveRNStyle != null) {\n setupNativeStyleEditor(\n bridge,\n agent,\n ((resolveRNStyle || hook.resolveRNStyle: any): ResolveNativeStyle),\n nativeStyleEditorValidAttributes ||\n hook.nativeStyleEditorValidAttributes ||\n null,\n );\n } else {\n // Otherwise listen to detect if the environment later supports it.\n // For example, Flipper does not eagerly inject these values.\n // Instead it relies on the React Native Inspector to lazily inject them.\n let lazyResolveRNStyle;\n let lazyNativeStyleEditorValidAttributes;\n\n const initAfterTick = () => {\n if (bridge !== null) {\n setupNativeStyleEditor(\n bridge,\n agent,\n lazyResolveRNStyle,\n lazyNativeStyleEditorValidAttributes,\n );\n }\n };\n\n if (!hook.hasOwnProperty('resolveRNStyle')) {\n Object.defineProperty(\n hook,\n 'resolveRNStyle',\n ({\n enumerable: false,\n get() {\n return lazyResolveRNStyle;\n },\n set(value) {\n lazyResolveRNStyle = value;\n initAfterTick();\n },\n }: Object),\n );\n }\n if (!hook.hasOwnProperty('nativeStyleEditorValidAttributes')) {\n Object.defineProperty(\n hook,\n 'nativeStyleEditorValidAttributes',\n ({\n enumerable: false,\n get() {\n return lazyNativeStyleEditorValidAttributes;\n },\n set(value) {\n lazyNativeStyleEditorValidAttributes = value;\n initAfterTick();\n },\n }: Object),\n );\n }\n }\n };\n\n function handleClose() {\n if (__DEBUG__) {\n debug('WebSocket.onclose');\n }\n\n if (bridge !== null) {\n bridge.emit('shutdown');\n }\n\n scheduleRetry();\n }\n\n function handleFailed() {\n if (__DEBUG__) {\n debug('WebSocket.onerror');\n }\n\n scheduleRetry();\n }\n\n function handleMessage(event) {\n let data;\n try {\n if (typeof event.data === 'string') {\n data = JSON.parse(event.data);\n if (__DEBUG__) {\n debug('WebSocket.onmessage', data);\n }\n } else {\n throw Error();\n }\n } catch (e) {\n console.error(\n '[React DevTools] Failed to parse JSON: ' + (event.data: any),\n );\n return;\n }\n messageListeners.forEach(fn => {\n try {\n fn(data);\n } catch (error) {\n // jsc doesn't play so well with tracebacks that go into eval'd code,\n // so the stack trace here will stop at the `eval()` call. Getting the\n // message that caused the error is the best we can do for now.\n console.log('[React DevTools] Error calling listener', data);\n console.log('error:', error);\n throw error;\n }\n });\n }\n}\n","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n */\n\nimport Agent from './agent';\n\nimport {attach} from './renderer';\nimport {attach as attachLegacy} from './legacy/renderer';\n\nimport type {DevToolsHook, ReactRenderer, RendererInterface} from './types';\n\nexport function initBackend(\n hook: DevToolsHook,\n agent: Agent,\n global: Object,\n): () => void {\n if (hook == null) {\n // DevTools didn't get injected into this page (maybe b'c of the contentType).\n return () => {};\n }\n const subs = [\n hook.sub(\n 'renderer-attached',\n ({\n id,\n renderer,\n rendererInterface,\n }: {\n id: number,\n renderer: ReactRenderer,\n rendererInterface: RendererInterface,\n ...\n }) => {\n agent.setRendererInterface(id, rendererInterface);\n\n // Now that the Store and the renderer interface are connected,\n // it's time to flush the pending operation codes to the frontend.\n rendererInterface.flushInitialOperations();\n },\n ),\n\n hook.sub('unsupported-renderer-version', (id: number) => {\n agent.onUnsupportedRenderer(id);\n }),\n\n hook.sub('operations', agent.onHookOperations),\n hook.sub('traceUpdates', agent.onTraceUpdates),\n\n // TODO Add additional subscriptions required for profiling mode\n ];\n\n const attachRenderer = (id: number, renderer: ReactRenderer) => {\n let rendererInterface = hook.rendererInterfaces.get(id);\n\n // Inject any not-yet-injected renderers (if we didn't reload-and-profile)\n if (rendererInterface == null) {\n if (typeof renderer.findFiberByHostInstance === 'function') {\n // react-reconciler v16+\n rendererInterface = attach(hook, id, renderer, global);\n } else if (renderer.ComponentTree) {\n // react-dom v15\n rendererInterface = attachLegacy(hook, id, renderer, global);\n } else {\n // Older react-dom or other unsupported renderer version\n }\n\n if (rendererInterface != null) {\n hook.rendererInterfaces.set(id, rendererInterface);\n }\n }\n\n // Notify the DevTools frontend about new renderers.\n // This includes any that were attached early (via __REACT_DEVTOOLS_ATTACH__).\n if (rendererInterface != null) {\n hook.emit('renderer-attached', {\n id,\n renderer,\n rendererInterface,\n });\n } else {\n hook.emit('unsupported-renderer-version', id);\n }\n };\n\n // Connect renderers that have already injected themselves.\n hook.renderers.forEach((renderer, id) => {\n attachRenderer(id, renderer);\n });\n\n // Connect any new renderers that injected themselves.\n subs.push(\n hook.sub(\n 'renderer',\n ({id, renderer}: {id: number, renderer: ReactRenderer, ...}) => {\n attachRenderer(id, renderer);\n },\n ),\n );\n\n hook.emit('react-devtools', agent);\n hook.reactDevtoolsAgent = agent;\n const onAgentShutdown = () => {\n subs.forEach(fn => fn());\n hook.rendererInterfaces.forEach(rendererInterface => {\n rendererInterface.cleanup();\n });\n hook.reactDevtoolsAgent = null;\n };\n agent.addListener('shutdown', onAgentShutdown);\n subs.push(() => {\n agent.removeListener('shutdown', onAgentShutdown);\n });\n\n return () => {\n subs.forEach(fn => fn());\n };\n}\n"],"sourceRoot":""} |