diff --git a/devtools/client/debugger/new/README.mozilla b/devtools/client/debugger/new/README.mozilla deleted file mode 100644 index 60157ebdf9b6..000000000000 --- a/devtools/client/debugger/new/README.mozilla +++ /dev/null @@ -1,11 +0,0 @@ -This is the debugger.html project output. -See https://github.com/devtools-html/debugger.html - -Taken from upstream commit: 6a34276ba4e2e4f8dfb2123eb4e6795ae658486a - -Packages: -- babel-plugin-transform-es2015-modules-commonjs @6.26.0 -- babel-preset-react @6.24.1 -- react @15.6.2 -- react-dom @15.6.2 -- webpack @3.6.0 diff --git a/devtools/client/debugger/new/debugger.css b/devtools/client/debugger/new/debugger.css index 8d30d289495c..89e21eb636ab 100644 --- a/devtools/client/debugger/new/debugger.css +++ b/devtools/client/debugger/new/debugger.css @@ -412,7 +412,7 @@ body { .modal-wrapper { position: fixed; display: flex; - align-items: center; + justify-content: center; width: 100%; height: 100%; top: 0; @@ -423,7 +423,7 @@ body { .modal { top: 0; - margin: auto; + height: 230px; width: 500px; background-color: var(--theme-toolbar-background); transform: translateY(-250px); @@ -438,7 +438,7 @@ body { .modal.entered, .modal.exiting { - transform: translateY(0px); + transform: translateY(30px); } @media (max-width: 520px) { @@ -490,6 +490,7 @@ body { } .shortcuts-modal { + height: fit-content; width: 45%; } @@ -972,7 +973,7 @@ html .arrow.expanded svg { width: 15px; height: 15px; margin-right: 5px; - vertical-align: sub; + vertical-align: bottom; } .theme-dark .webpack { @@ -1427,7 +1428,6 @@ html[dir="rtl"] .managed-tree .tree .node > div { display: flex; overflow-x: hidden; overflow-y: auto; - padding-top: 11px; } .sources-list .managed-tree { @@ -1462,11 +1462,6 @@ html[dir="rtl"] .managed-tree .tree .node > div { display: inline-block; } -.sources-list .tree .node .no-arrow { - width: 10px; - display: inline-block; -} - .no-sources-message { font-size: 12px; color: var(--theme-comment-alt); @@ -1502,7 +1497,7 @@ html[dir="rtl"] .managed-tree .tree .node > div { position: relative; transition: all 0.25s ease; overflow: hidden; - padding: 8px 8px 7px 8px; + padding: 6.5px; margin-bottom: 0px; margin-top: -1px; cursor: default; @@ -2358,6 +2353,11 @@ html[dir="rtl"] .arrow svg, --theme-conditional-breakpoint-color: var(--theme-body-color); } +.paused .CodeMirror-line, +.paused .CodeMirror-linenumber { + opacity: 0.7; +} + /** * There's a known codemirror flex issue with chrome that this addresses. * BUG https://github.com/devtools-html/debugger.html/issues/63 @@ -2629,7 +2629,6 @@ html .breakpoints-list .breakpoint.paused { overflow-x: hidden; text-overflow: ellipsis; padding: 1px 0; - vertical-align: bottom; } .breakpoints-list .pause-indicator { @@ -3217,26 +3216,12 @@ html .command-bar > button:disabled { offset-inline-start: auto; } -.welcomebox .small-size-layout { - display: none; -} - -.welcomebox .normal-layout { - display: inline-block; -} - .shortcutKeys { text-align: right; float: left; font-family: Courier; } -.shortcutKey { - display: inline-block; - margin-right: 10px; - font-family: Courier; -} - .shortcutFunction { text-align: left; float: left; @@ -3246,24 +3231,6 @@ html .command-bar > button:disabled { html .welcomebox .toggle-button-end.collapsed { bottom: 1px; } - -@media (max-width: 430px) { - .welcomebox .small-size-layout { - display: inline-block; - } - - .welcomebox .normal-layout { - display: none; - } - - .shortcutFunction { - margin-left: 0; - } - - .shortcutKey { - display: block; - } -} .source-header { border-bottom: 1px solid var(--theme-splitter-color); width: 100%; diff --git a/devtools/client/debugger/new/debugger.js b/devtools/client/debugger/new/debugger.js index 6f56cce52cdd..d620ebc6376c 100644 --- a/devtools/client/debugger/new/debugger.js +++ b/devtools/client/debugger/new/debugger.js @@ -1295,7 +1295,7 @@ exports.clearSearchResults = clearSearchResults; exports.searchSources = searchSources; exports.searchSource = searchSource; -var _search = __webpack_require__(1210); +var _search = __webpack_require__(1115); var _selectors = __webpack_require__(242); @@ -1541,18 +1541,14 @@ exports.addToTree = addToTree; var _utils = __webpack_require__(18); -var _treeOrder = __webpack_require__(1239); - var _getURL = __webpack_require__(24); -function createNodeInTree(part, path, tree, index) { +function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } + +function createNodeInTree(part, path, tree) { var node = (0, _utils.createNode)(part, path, []); - // we are modifying the tree - var contents = tree.contents.slice(0); - contents.splice(index, 0, node); - tree.contents = contents; - + tree.contents = [].concat(_toConsumableArray(tree.contents), [node]); return node; } @@ -1562,30 +1558,22 @@ function createNodeInTree(part, path, tree, index) { * 2. if it does not exist create it * 3. if it is a file, replace it with a directory */ - - -function findOrCreateNode(parts, subTree, path, part, index, url, debuggeeHost) { - var addedPartIsFile = (0, _utils.partIsFile)(index, parts, url); - - var _findNodeInContents = (0, _treeOrder.findNodeInContents)(subTree, (0, _treeOrder.createTreeNodeMatcher)(part, !addedPartIsFile, debuggeeHost)), - childFound = _findNodeInContents.found, - childIndex = _findNodeInContents.index; +function findOrCreateNode(parts, subTree, path, part, index, url) { + var child = subTree.contents.find(c => c.name === part); // we create and enter the new node - - - if (!childFound) { - return createNodeInTree(part, path, subTree, childIndex); + if (!child) { + return createNodeInTree(part, path, subTree); } // we found a path with the same name as the part. We need to determine // if this is the correct child, or if we have a naming conflict - var child = subTree.contents[childIndex]; + var addedPartIsFile = (0, _utils.partIsFile)(index, parts, url); var childIsFile = !(0, _utils.nodeHasChildren)(child); // if we have a naming conflict, we'll create a new node if (childIsFile && !addedPartIsFile || !childIsFile && addedPartIsFile) { - return createNodeInTree(part, path, subTree, childIndex); + return createNodeInTree(part, path, subTree); } // if there is no naming conflict, we can traverse into the child @@ -1596,7 +1584,7 @@ function findOrCreateNode(parts, subTree, path, part, index, url, debuggeeHost) * walk the source tree to the final node for a given url, * adding new nodes along the way */ -function traverseTree(url, tree, debuggeeHost) { +function traverseTree(url, tree) { url.path = decodeURIComponent(url.path); var parts = url.path.split("/").filter(p => p !== ""); @@ -1605,8 +1593,7 @@ function traverseTree(url, tree, debuggeeHost) { var path = ""; return parts.reduce((subTree, part, index) => { path = `${path}/${part}`; - var debuggeeHostIfRoot = index === 0 ? debuggeeHost : null; - return findOrCreateNode(parts, subTree, path, part, index, url, debuggeeHostIfRoot); + return findOrCreateNode(parts, subTree, path, part, index, url); }, tree); } @@ -1623,26 +1610,18 @@ function addSourceToNode(node, url, source) { } var name = (0, _getURL.getFilenameFromPath)(url.path); - - var _findNodeInContents2 = (0, _treeOrder.findNodeInContents)(node, (0, _treeOrder.createTreeNodeMatcher)(name, false, null)), - childFound = _findNodeInContents2.found, - childIndex = _findNodeInContents2.index; + var existingNode = node.contents.find(childNode => childNode.name === name); // if we are readding an existing file in the node, overwrite the existing // file and return the node's contents - - - if (childFound) { - var existingNode = node.contents[childIndex]; + if (existingNode) { existingNode.contents = source; return node.contents; } // if this is a new file, add the new file; var newNode = (0, _utils.createNode)(name, source.get("url"), source); - var contents = node.contents.slice(0); - contents.splice(childIndex, 0, newNode); - return contents; + return [].concat(_toConsumableArray(node.contents), [newNode]); } /** @@ -1651,13 +1630,12 @@ function addSourceToNode(node, url, source) { */ function addToTree(tree, source, debuggeeUrl) { var url = (0, _getURL.getURL)(source.get("url"), debuggeeUrl); - var debuggeeHost = (0, _treeOrder.getDomain)(debuggeeUrl); if ((0, _utils.isInvalidUrl)(url, source)) { return; } - var finalNode = traverseTree(url, tree, debuggeeHost); + var finalNode = traverseTree(url, tree); finalNode.contents = addSourceToNode(finalNode, url, source); } @@ -5455,10 +5433,12 @@ module.exports = { /***/ (function(module, exports, __webpack_require__) { /** - * Copyright (c) 2014-present, Facebook, Inc. + * Copyright (c) 2014-2015, Facebook, Inc. + * All rights reserved. * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. */ (function (global, factory) { @@ -11895,7 +11875,7 @@ module.exports = { var React = __webpack_require__(0); -__webpack_require__(1221); +__webpack_require__(851); var dom = React.DOM; var ImPropTypes = __webpack_require__(150); @@ -12322,7 +12302,7 @@ function combineReducers(reducers) { var React = __webpack_require__(0); -__webpack_require__(1222); +__webpack_require__(852); var dom = React.DOM; var classnames = __webpack_require__(175); @@ -12559,7 +12539,7 @@ var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! var React = __webpack_require__(0); var createElement = React.createElement; -__webpack_require__(1223); +__webpack_require__(853); var rocketSvg = __webpack_require__(1126); var InlineSVG = __webpack_require__(1205); @@ -13221,7 +13201,7 @@ module.exports = { * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ var classnames = __webpack_require__(175); -__webpack_require__(1225); +__webpack_require__(856); module.exports = function (className) { var root = document.createElement("div"); @@ -13468,7 +13448,9 @@ function log(_ref) { getState = _ref.getState; return next => action => { - console.log(`[DISPATCH ${action.type}]`, action); + var actionText = JSON.stringify(action, null, 2); + var truncatedActionText = `${actionText.slice(0, 1000)}...`; + console.log(`[DISPATCH ${action.type}]`, action, truncatedActionText); next(action); }; } @@ -13598,7 +13580,7 @@ exports.createPrettySource = createPrettySource; var _selectors = __webpack_require__(242); -var _prettyPrint = __webpack_require__(1213); +var _prettyPrint = __webpack_require__(903); var _pause = __webpack_require__(255); @@ -13892,6 +13874,7 @@ if (isDevelopment()) { pref("devtools.debugger.pause-on-exceptions", false); pref("devtools.debugger.ignore-caught-exceptions", false); pref("devtools.debugger.call-stack-visible", false); + pref("devtools.debugger.scopes-visible", false); pref("devtools.debugger.start-panel-collapsed", false); pref("devtools.debugger.end-panel-collapsed", false); pref("devtools.debugger.tabs", "[]"); @@ -13914,6 +13897,7 @@ const prefs = new PrefsHelper("devtools", { pauseOnExceptions: ["Bool", "debugger.pause-on-exceptions"], ignoreCaughtExceptions: ["Bool", "debugger.ignore-caught-exceptions"], callStackVisible: ["Bool", "debugger.call-stack-visible"], + scopesVisible: ["Bool", "debugger.scopes-visible"], startPanelCollapsed: ["Bool", "debugger.start-panel-collapsed"], endPanelCollapsed: ["Bool", "debugger.end-panel-collapsed"], frameworkGroupingOn: ["Bool", "debugger.ui.framework-grouping-on"], @@ -14606,7 +14590,7 @@ exports.default = update; Object.defineProperty(exports, "__esModule", { value: true }); -exports.isLoaded = exports.getMode = exports.getSourceLineCount = exports.getSourcePath = exports.getFileURL = exports.getFilenameFromURL = exports.getFilename = exports.getRawSourceURL = exports.getPrettySourceURL = exports.shouldPrettyPrint = exports.isThirdParty = exports.isPretty = exports.isJavaScript = undefined; +exports.isLoaded = exports.getMode = exports.getSourceLineCount = exports.getSourcePath = exports.getFilenameFromURL = exports.getFilename = exports.getRawSourceURL = exports.getPrettySourceURL = exports.shouldPrettyPrint = exports.isThirdParty = exports.isPretty = exports.isJavaScript = undefined; var _devtoolsSourceMap = __webpack_require__(898); @@ -14705,21 +14689,10 @@ function getRawSourceURL(url) { return url.replace(/:formatted$/, ""); } -function resolveFileURL(url) { - var transformUrl = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : initialUrl => initialUrl; - - url = getRawSourceURL(url || ""); - var name = transformUrl(url); - return (0, _utils.endTruncateStr)(name, 50); -} - function getFilenameFromURL(url) { - return resolveFileURL(url, initialUrl => (0, _path.basename)(initialUrl) || "(index)"); -} - -function getFormattedSourceId(id) { - var sourceId = id.split("/")[1]; - return `SOURCE${sourceId}`; + url = getRawSourceURL(url || ""); + var name = (0, _path.basename)(url) || "(index)"; + return (0, _utils.endTruncateStr)(name, 50); } /** @@ -14734,30 +14707,13 @@ function getFilename(source) { id = source.id; if (!url) { - return getFormattedSourceId(id); + var sourceId = id.split("/")[1]; + return `SOURCE${sourceId}`; } return getFilenameFromURL(url); } -/** - * Show a source url. - * If the source does not have a url, use the source id. - * - * @memberof utils/source - * @static - */ -function getFileURL(source) { - var url = source.url, - id = source.id; - - if (!url) { - return getFormattedSourceId(id); - } - - return resolveFileURL(url); -} - var contentTypeModeMap = { "text/javascript": { name: "javascript" }, "text/typescript": { name: "javascript", typescript: true }, @@ -14869,7 +14825,6 @@ exports.getPrettySourceURL = getPrettySourceURL; exports.getRawSourceURL = getRawSourceURL; exports.getFilename = getFilename; exports.getFilenameFromURL = getFilenameFromURL; -exports.getFileURL = getFileURL; exports.getSourcePath = getSourcePath; exports.getSourceLineCount = getSourceLineCount; exports.getMode = getMode; @@ -15384,7 +15339,6 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < argument exports.isStepping = isStepping; exports.isPaused = isPaused; exports.isEvaluatingExpression = isEvaluatingExpression; -exports.pausedInEval = pausedInEval; exports.getLoadedObject = getLoadedObject; exports.getObjectProperties = getObjectProperties; exports.getIsWaitingOnBreak = getIsWaitingOnBreak; @@ -15567,19 +15521,6 @@ function isEvaluatingExpression(state) { return state.pause.command === "expression"; } -function pausedInEval(state) { - if (!state.pause.pause) { - return false; - } - - var exception = state.pause.pause.why.exception; - if (!exception) { - return false; - } - - return exception.preview.fileName === "debugger eval code"; -} - function getLoadedObject(state, objectId) { return getLoadedObjects(state)[objectId]; } @@ -15905,8 +15846,6 @@ exports.default = update; "use strict"; -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - var _expressions = __webpack_require__(228); var expressions = _interopRequireWildcard(_expressions); @@ -15983,7 +15922,7 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; * @param object - location */ -module.exports = _extends({}, expressions, sources, pause, debuggee, breakpoints, pendingBreakpoints, eventListeners, ui, ast, coverage, projectTextSearch, sourceSearch, sourceTree, { +module.exports = Object.assign({}, expressions, sources, pause, debuggee, breakpoints, pendingBreakpoints, eventListeners, ui, ast, coverage, projectTextSearch, sourceSearch, sourceTree, { getBreakpointAtLocation: _breakpointAtLocation2.default, getInScopeLines: _linesInScope2.default, getVisibleBreakpoints: _visibleBreakpoints2.default, @@ -16001,10 +15940,6 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _propTypes = __webpack_require__(20); - -var _propTypes2 = _interopRequireDefault(_propTypes); - var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); @@ -16027,13 +15962,13 @@ var _ui = __webpack_require__(1128); var _devtoolsModules = __webpack_require__(830); -__webpack_require__(1228); +__webpack_require__(857); -__webpack_require__(1229); +__webpack_require__(858); -__webpack_require__(1230); +__webpack_require__(859); -__webpack_require__(1231); +__webpack_require__(860); var _devtoolsSplitter = __webpack_require__(910); @@ -16095,7 +16030,6 @@ class App extends _react.Component { this.renderEditorPane = this.renderEditorPane.bind(this); this.renderVerticalLayout = this.renderVerticalLayout.bind(this); this.onEscape = this.onEscape.bind(this); - this.onCommandSlash = this.onCommandSlash.bind(this); } getChildContext() { @@ -16106,7 +16040,6 @@ class App extends _react.Component { verticalLayoutBreakpoint.addListener(this.onLayoutChange); shortcuts.on(L10N.getStr("symbolSearch.search.key2"), this.toggleSymbolModal); shortcuts.on("Escape", this.onEscape); - shortcuts.on("Cmd+/", this.onCommandSlash); } componentWillUnmount() { @@ -16127,10 +16060,6 @@ class App extends _react.Component { } } - onCommandSlash() { - this.toggleShortcutsModal(); - } - toggleSymbolModal(_, e) { var _props2 = this.props, selectedSource = _props2.selectedSource, @@ -16307,7 +16236,7 @@ class App extends _react.Component { } } -App.childContextTypes = { shortcuts: _propTypes2.default.object }; +App.childContextTypes = { shortcuts: _react.PropTypes.object }; exports.default = (0, _reactRedux.connect)(state => ({ selectedSource: (0, _selectors.getSelectedSource)(state), @@ -17266,11 +17195,9 @@ exports.evaluateExpressions = evaluateExpressions; var _selectors = __webpack_require__(242); -var _promise = __webpack_require__(193); - var _expressions = __webpack_require__(1177); -var _parser = __webpack_require__(1208); +var _parser = __webpack_require__(827); var parser = _interopRequireWildcard(_parser); @@ -17391,19 +17318,13 @@ function evaluateExpression(expression) { } var error = yield parser.hasSyntaxError(expression.input); - if (error) { - return dispatch({ - type: "EVALUATE_EXPRESSION", - input: expression.input, - value: { input: expression.input, result: error } - }); - } - var frameId = (0, _selectors.getSelectedFrameId)(getState()); + var value = error ? { input: expression.input, result: error } : yield client.evaluate((0, _expressions.wrapExpression)(expression.input), { frameId }); + return dispatch({ type: "EVALUATE_EXPRESSION", input: expression.input, - [_promise.PROMISE]: client.evaluate((0, _expressions.wrapExpression)(expression.input), { frameId }) + value }); }); @@ -17653,7 +17574,6 @@ var checkPendingBreakpoint = (() => { var sameSource = sourceUrl && sourceUrl === source.url; if (sameSource) { - yield dispatch((0, _loadSourceText.loadSourceText)(source)); yield dispatch((0, _breakpoints.syncBreakpoint)(source.id, pendingBreakpoint)); } }); @@ -17730,7 +17650,7 @@ var _editor = __webpack_require__(257); var _sourceMaps = __webpack_require__(797); -var _parser = __webpack_require__(1208); +var _parser = __webpack_require__(827); var parser = _interopRequireWildcard(_parser); @@ -18212,7 +18132,7 @@ exports.getPauseReason = getPauseReason; var _lodash = __webpack_require__(2); -var _parser = __webpack_require__(1208); +var _parser = __webpack_require__(827); function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; } @@ -18500,7 +18420,7 @@ module.exports = escapeRegExp; Object.defineProperty(exports, "__esModule", { value: true }); -exports.showLoading = exports.showSourceText = exports.updateDocument = exports.updateLineNumberFormat = exports.resetLineNumberFormat = exports.clearDocuments = exports.removeDocument = exports.setDocument = exports.getDocument = undefined; +exports.showSourceText = exports.updateDocument = exports.updateLineNumberFormat = exports.resetLineNumberFormat = exports.clearDocuments = exports.removeDocument = exports.setDocument = exports.getDocument = undefined; var _source = __webpack_require__(233); @@ -18549,25 +18469,12 @@ function updateDocument(editor, sourceId) { if (!sourceId) { return; } - var doc = getDocument(sourceId) || editor.createDocument(); editor.replaceDocument(doc); updateLineNumberFormat(editor, sourceId); } -function showLoading(editor) { - if (getDocument("loading")) { - return; - } - - var doc = editor.createDocument(); - setDocument("loading", doc); - editor.replaceDocument(doc); - editor.setText(L10N.getStr("loadingText")); - editor.setMode({ name: "text" }); -} - function setEditorText(editor, source) { var text = source.text, sourceId = source.id; @@ -18619,7 +18526,6 @@ exports.resetLineNumberFormat = resetLineNumberFormat; exports.updateLineNumberFormat = updateLineNumberFormat; exports.updateDocument = updateDocument; exports.showSourceText = showSourceText; -exports.showLoading = showLoading; /***/ }), /* 261 */ @@ -18633,7 +18539,7 @@ Object.defineProperty(exports, "__esModule", { }); exports.getMatchIndex = exports.removeOverlay = exports.findPrev = exports.findNext = exports.find = exports.buildQuery = undefined; -var _buildQuery = __webpack_require__(1211); +var _buildQuery = __webpack_require__(1138); var _buildQuery2 = _interopRequireDefault(_buildQuery); @@ -19029,6 +18935,8 @@ var _utils = __webpack_require__(18); var _collapseTree = __webpack_require__(41); +var _sortTree = __webpack_require__(794); + var _addToTree = __webpack_require__(40); function createTree(sources, debuggeeUrl) { @@ -19037,7 +18945,7 @@ function createTree(sources, debuggeeUrl) { (0, _addToTree.addToTree)(uncollapsedTree, source, debuggeeUrl); } - var sourceTree = (0, _collapseTree.collapseTree)(uncollapsedTree); + var sourceTree = (0, _sortTree.sortEntireTree)((0, _collapseTree.collapseTree)(uncollapsedTree), debuggeeUrl); return { uncollapsedTree, @@ -19066,10 +18974,6 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _propTypes = __webpack_require__(20); - -var _propTypes2 = _interopRequireDefault(_propTypes); - var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); @@ -19112,8 +19016,8 @@ class ToggleSearch extends _react.Component { exports.default = ToggleSearch; ToggleSearch.propTypes = { - kind: _propTypes2.default.string.isRequired, - toggle: _propTypes2.default.func.isRequired + kind: _react.PropTypes.string.isRequired, + toggle: _react.PropTypes.func.isRequired }; /***/ }), @@ -19180,7 +19084,78 @@ module.exports = hasPath; /* 301 */, /* 302 */, /* 303 */, -/* 304 */, +/* 304 */ +/***/ (function(module, exports, __webpack_require__) { + +var isObject = __webpack_require__(84), + isSymbol = __webpack_require__(72); + +/** Used as references for various `Number` constants. */ +var NAN = 0 / 0; + +/** Used to match leading and trailing whitespace. */ +var reTrim = /^\s+|\s+$/g; + +/** Used to detect bad signed hexadecimal string values. */ +var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; + +/** Used to detect binary string values. */ +var reIsBinary = /^0b[01]+$/i; + +/** Used to detect octal string values. */ +var reIsOctal = /^0o[0-7]+$/i; + +/** Built-in method references without a dependency on `root`. */ +var freeParseInt = parseInt; + +/** + * Converts `value` to a number. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to process. + * @returns {number} Returns the number. + * @example + * + * _.toNumber(3.2); + * // => 3.2 + * + * _.toNumber(Number.MIN_VALUE); + * // => 5e-324 + * + * _.toNumber(Infinity); + * // => Infinity + * + * _.toNumber('3.2'); + * // => 3.2 + */ +function toNumber(value) { + if (typeof value == 'number') { + return value; + } + if (isSymbol(value)) { + return NAN; + } + if (isObject(value)) { + var other = typeof value.valueOf == 'function' ? value.valueOf() : value; + value = isObject(other) ? (other + '') : other; + } + if (typeof value != 'string') { + return value === 0 ? value : +value; + } + value = value.replace(reTrim, ''); + var isBinary = reIsBinary.test(value); + return (isBinary || reIsOctal.test(value)) + ? freeParseInt(value.slice(2), isBinary ? 2 : 8) + : (reIsBadHex.test(value) ? NAN : +value); +} + +module.exports = toNumber; + + +/***/ }), /* 305 */ /***/ (function(module, exports, __webpack_require__) { @@ -19432,11 +19407,6 @@ var _getScopeBindings = (() => { sourceMaps = _ref2.sourceMaps; var sourceId = generatedLocation.sourceId; - var sourceRecord = (0, _selectors.getSource)(getState(), sourceId); - if (sourceRecord.get("isWasm")) { - return scopes; - } - yield dispatch((0, _sources.ensureParserHasSourceText)(sourceId)); return yield (0, _pause.updateScopeBindings)(scopes, generatedLocation, sourceMaps); @@ -19488,7 +19458,7 @@ var _breakpoints = __webpack_require__(245); var _breakpoints2 = __webpack_require__(236); -var _parser = __webpack_require__(1208); +var _parser = __webpack_require__(827); var parser = _interopRequireWildcard(_parser); @@ -19510,14 +19480,12 @@ function resumed() { return; } - var wasPausedInEval = (0, _selectors.pausedInEval)(getState()); - dispatch({ type: "RESUME", value: undefined }); - if (!(0, _selectors.isStepping)(getState()) && !wasPausedInEval) { + if (!(0, _selectors.isStepping)(getState())) { dispatch((0, _expressions.evaluateExpressions)()); } }; @@ -19586,11 +19554,7 @@ function paused(pauseInfo) { if (hiddenBreakpointLocation) { dispatch((0, _breakpoints.removeBreakpoint)(hiddenBreakpointLocation)); } - - if (!(0, _selectors.isEvaluatingExpression)(getState())) { - dispatch((0, _expressions.evaluateExpressions)()); - } - + dispatch((0, _expressions.evaluateExpressions)()); dispatch((0, _sources.selectSource)(frame.location.sourceId, { line: frame.location.line })); }); @@ -19854,7 +19818,7 @@ var _utils = __webpack_require__(234); var _sources2 = __webpack_require__(254); -var _parser = __webpack_require__(1208); +var _parser = __webpack_require__(827); var _wasm = __webpack_require__(23); @@ -20149,10 +20113,6 @@ Object.defineProperty(exports, "__esModule", { exports.Modal = undefined; exports.default = Slide; -var _propTypes = __webpack_require__(20); - -var _propTypes2 = _interopRequireDefault(_propTypes); - var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); @@ -20165,17 +20125,20 @@ var _Transition = __webpack_require__(333); var _Transition2 = _interopRequireDefault(_Transition); -__webpack_require__(1226); +__webpack_require__(952); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } class Modal extends _react.Component { - constructor() { - var _temp; - return _temp = super(...arguments), this.onClick = e => { - e.stopPropagation(); - }, _temp; + constructor(props) { + super(props); + var self = this; + self.onClick = this.onClick.bind(this); + } + + onClick(e) { + e.stopPropagation(); } render() { @@ -20199,7 +20162,7 @@ class Modal extends _react.Component { exports.Modal = Modal; Modal.contextTypes = { - shortcuts: _propTypes2.default.object + shortcuts: _react.PropTypes.object }; function Slide(_ref) { @@ -21630,7 +21593,7 @@ var _classnames2 = _interopRequireDefault(_classnames); var _resultList = __webpack_require__(343); -__webpack_require__(1240); +__webpack_require__(867); var _SearchInput = __webpack_require__(377); @@ -21862,7 +21825,7 @@ var _Svg = __webpack_require__(345); var _Svg2 = _interopRequireDefault(_Svg); -__webpack_require__(1234); +__webpack_require__(862); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -21911,7 +21874,6 @@ var svg = { pause: __webpack_require__(358), "pause-exceptions": __webpack_require__(359), plus: __webpack_require__(360), - preact: __webpack_require__(1233), prettyPrint: __webpack_require__(361), react: __webpack_require__(1000), "regex-match": __webpack_require__(362), @@ -22326,7 +22288,7 @@ var _Close = __webpack_require__(378); var _Close2 = _interopRequireDefault(_Close); -__webpack_require__(1237); +__webpack_require__(865); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -22470,7 +22432,7 @@ var _Svg = __webpack_require__(344); var _Svg2 = _interopRequireDefault(_Svg); -__webpack_require__(1236); +__webpack_require__(864); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -22514,7 +22476,7 @@ var _classnames = __webpack_require__(175); var _classnames2 = _interopRequireDefault(_classnames); -__webpack_require__(1241); +__webpack_require__(868); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -22671,7 +22633,7 @@ var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); -__webpack_require__(1235); +__webpack_require__(863); var _devtoolsComponents = __webpack_require__(1007); @@ -22684,37 +22646,14 @@ class ManagedTree extends _react.Component { constructor(props) { super(); - this.setExpanded = (item, isExpanded) => { - var expanded = this.state.expanded; - var itemPath = this.props.getPath(item); - if (isExpanded) { - expanded.add(itemPath); - } else { - expanded.delete(itemPath); - } - this.setState({ expanded }); - - if (isExpanded && this.props.onExpand) { - this.props.onExpand(item, expanded); - } else if (!isExpanded && this.props.onCollapse) { - this.props.onCollapse(item, expanded); - } - }; - - this.focusItem = item => { - if (!this.props.disabledFocus && this.state.focusedItem !== item) { - this.setState({ focusedItem: item }); - - if (this.props.onFocus) { - this.props.onFocus(item); - } - } - }; - this.state = { expanded: props.expanded || new Set(), focusedItem: null }; + + var self = this; + self.setExpanded = this.setExpanded.bind(this); + self.focusItem = this.focusItem.bind(this); } componentWillReceiveProps(nextProps) { @@ -22733,6 +22672,23 @@ class ManagedTree extends _react.Component { } } + setExpanded(item, isExpanded) { + var expanded = this.state.expanded; + var itemPath = this.props.getPath(item); + if (isExpanded) { + expanded.add(itemPath); + } else { + expanded.delete(itemPath); + } + this.setState({ expanded }); + + if (isExpanded && this.props.onExpand) { + this.props.onExpand(item, expanded); + } else if (!isExpanded && this.props.onCollapse) { + this.props.onCollapse(item, expanded); + } + } + expandListItems(listItems) { var expanded = this.state.expanded; listItems.forEach(item => expanded.add(this.props.getPath(item))); @@ -22754,6 +22710,16 @@ class ManagedTree extends _react.Component { } } + focusItem(item) { + if (!this.props.disabledFocus && this.state.focusedItem !== item) { + this.setState({ focusedItem: item }); + + if (this.props.onFocus) { + this.props.onFocus(item); + } + } + } + render() { var _this = this; @@ -22791,6 +22757,8 @@ class ManagedTree extends _react.Component { } } +ManagedTree.propTypes = Object.assign({}, Tree.propTypes); + exports.default = ManagedTree; /***/ }), @@ -22836,10 +22804,6 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _propTypes = __webpack_require__(20); - -var _propTypes2 = _interopRequireDefault(_propTypes); - var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); @@ -22924,9 +22888,9 @@ var _EmptyLines2 = _interopRequireDefault(_EmptyLines); var _editor = __webpack_require__(257); -__webpack_require__(1257); +__webpack_require__(905); -__webpack_require__(1258); +__webpack_require__(906); var _devtoolsSourceEditor = __webpack_require__(994); @@ -22938,169 +22902,11 @@ var cssVars = { footerHeight: "var(--editor-footer-height)" }; - class Editor extends _react.PureComponent { constructor() { super(); - this.onToggleBreakpoint = (key, e) => { - e.preventDefault(); - var codeMirror = this.state.editor.codeMirror; - var selectedSource = this.props.selectedSource; - - var line = (0, _editor.getCursorLine)(codeMirror); - - if (!selectedSource) { - return; - } - - var sourceLine = (0, _editor.toSourceLine)(selectedSource.get("id"), line); - - if (e.shiftKey) { - this.toggleConditionalPanel(sourceLine); - } else { - this.props.toggleBreakpoint(sourceLine); - } - }; - - this.onEscape = (key, e) => { - if (!this.state.editor) { - return; - } - - var codeMirror = this.state.editor.codeMirror; - - if (codeMirror.listSelections().length > 1) { - codeMirror.execCommand("singleSelection"); - e.preventDefault(); - } - }; - - this.onSearchAgain = (_, e) => { - var _props = this.props, - query = _props.query, - searchModifiers = _props.searchModifiers; - var codeMirror = this.state.editor.editor.codeMirror; - - var ctx = { ed: this.state.editor, cm: codeMirror }; - - var direction = e.shiftKey ? "prev" : "next"; - (0, _editor.traverseResults)(e, ctx, query, direction, searchModifiers.toJS()); - }; - - this.onGutterClick = (cm, line, gutter, ev) => { - var _props2 = this.props, - selectedSource = _props2.selectedSource, - toggleBreakpoint = _props2.toggleBreakpoint, - addOrToggleDisabledBreakpoint = _props2.addOrToggleDisabledBreakpoint, - isEmptyLine = _props2.isEmptyLine, - continueToHere = _props2.continueToHere; - - // ignore right clicks in the gutter - - if (ev.ctrlKey && ev.button === 0 || ev.which === 3 || selectedSource && selectedSource.get("isBlackBoxed")) { - return; - } - - if (isEmptyLine(line)) { - return; - } - - if (this.isCbPanelOpen()) { - return this.closeConditionalPanel(); - } - - if (!selectedSource) { - return; - } - - if (gutter !== "CodeMirror-foldgutter") { - if (ev.altKey) { - continueToHere((0, _editor.toSourceLine)(selectedSource.get("id"), line)); - } else if (ev.shiftKey) { - addOrToggleDisabledBreakpoint((0, _editor.toSourceLine)(selectedSource.get("id"), line)); - } else { - toggleBreakpoint((0, _editor.toSourceLine)(selectedSource.get("id"), line)); - } - } - }; - - this.onGutterContextMenu = event => { - var _props3 = this.props, - selectedSource = _props3.selectedSource, - breakpoints = _props3.breakpoints, - toggleBreakpoint = _props3.toggleBreakpoint, - toggleDisabledBreakpoint = _props3.toggleDisabledBreakpoint, - isEmptyLine = _props3.isEmptyLine, - pauseData = _props3.pauseData, - continueToHere = _props3.continueToHere; - - - if (selectedSource && selectedSource.get("isBlackBoxed")) { - event.preventDefault(); - return; - } - - var sourceId = selectedSource ? selectedSource.get("id") : ""; - var line = (0, _editor.lineAtHeight)(this.state.editor, sourceId, event); - var breakpoint = breakpoints.find(bp => bp.location.line === line); - - if (isEmptyLine(line - 1)) { - return; - } - - (0, _GutterMenu2.default)({ - event, - line, - breakpoint, - toggleBreakpoint, - toggleDisabledBreakpoint, - pauseData, - continueToHere, - - showConditionalPanel: this.toggleConditionalPanel, - isCbPanelOpen: this.isCbPanelOpen(), - closeConditionalPanel: this.closeConditionalPanel - }); - }; - - this.toggleConditionalPanel = line => { - if (this.isCbPanelOpen()) { - return this.closeConditionalPanel(); - } - - var _props4 = this.props, - selectedLocation = _props4.selectedLocation, - setBreakpointCondition = _props4.setBreakpointCondition, - breakpoints = _props4.breakpoints; - - var sourceId = selectedLocation ? selectedLocation.sourceId : ""; - - var breakpoint = breakpoints.find(bp => bp.location.line === line); - var location = { sourceId, line }; - var condition = breakpoint ? breakpoint.condition : ""; - - var panel = (0, _ConditionalPanel.renderConditionalPanel)({ - condition, - setBreakpoint: value => setBreakpointCondition(location, { condition: value }), - closePanel: this.closeConditionalPanel - }); - - var editorLine = (0, _editor.toEditorLine)(sourceId, line); - this.cbPanel = this.state.editor.codeMirror.addLineWidget(editorLine, panel, { - coverGutter: true, - noHScroll: false - }); - this.cbPanel.node.querySelector("input").focus(); - }; - - this.closeConditionalPanel = () => { - this.props.toggleConditionalBreakpointPanel(null); - this.cbPanel.clear(); - this.cbPanel = null; - }; - this.cbPanel = null; this.pendingJumpLocation = null; this.lastJumpLine = null; @@ -23109,6 +22915,15 @@ class Editor extends _react.PureComponent { highlightedLineRange: null, editor: null }; + + var self = this; + self.closeConditionalPanel = this.closeConditionalPanel.bind(this); + self.onEscape = this.onEscape.bind(this); + self.onGutterClick = this.onGutterClick.bind(this); + self.onGutterContextMenu = this.onGutterContextMenu.bind(this); + self.onSearchAgain = this.onSearchAgain.bind(this); + self.onToggleBreakpoint = this.onToggleBreakpoint.bind(this); + self.toggleConditionalPanel = this.toggleConditionalPanel.bind(this); } componentWillReceiveProps(nextProps) { @@ -23175,9 +22990,9 @@ class Editor extends _react.PureComponent { this.cbPanel = null; var editor = this.setupEditor(); - var _props5 = this.props, - selectedSource = _props5.selectedSource, - selectedLocation = _props5.selectedLocation; + var _props = this.props, + selectedSource = _props.selectedSource, + selectedLocation = _props.selectedLocation; var shortcuts = this.context.shortcuts; @@ -23215,9 +23030,9 @@ class Editor extends _react.PureComponent { // This is in `componentDidUpdate` so helper functions can expect // `this.props` to be the current props. This lifecycle method is // responsible for updating the editor annotations. - var _props6 = this.props, - selectedLocation = _props6.selectedLocation, - selectedSource = _props6.selectedSource; + var _props2 = this.props, + selectedLocation = _props2.selectedLocation, + selectedSource = _props2.selectedSource; // If the location is different and a new line is requested, // update the pending jump line. Note that if jumping to a line in @@ -23244,6 +23059,26 @@ class Editor extends _react.PureComponent { } } + onToggleBreakpoint(key, e) { + e.preventDefault(); + var codeMirror = this.state.editor.codeMirror; + var selectedSource = this.props.selectedSource; + + var line = (0, _editor.getCursorLine)(codeMirror); + + if (!selectedSource) { + return; + } + + var sourceLine = (0, _editor.toSourceLine)(selectedSource.get("id"), line); + + if (e.shiftKey) { + this.toggleConditionalPanel(sourceLine); + } else { + this.props.toggleBreakpoint(sourceLine); + } + } + onKeyDown(e) { var codeMirror = this.state.editor.codeMirror; var key = e.key, @@ -23269,25 +23104,48 @@ class Editor extends _react.PureComponent { * split console. Restore it here, but preventDefault if and only if there * is a multiselection. */ + onEscape(key, e) { + if (!this.state.editor) { + return; + } + var codeMirror = this.state.editor.codeMirror; + + if (codeMirror.listSelections().length > 1) { + codeMirror.execCommand("singleSelection"); + e.preventDefault(); + } + } + + onSearchAgain(_, e) { + var _props3 = this.props, + query = _props3.query, + searchModifiers = _props3.searchModifiers; + var codeMirror = this.state.editor.editor.codeMirror; + + var ctx = { ed: this.state.editor, cm: codeMirror }; + + var direction = e.shiftKey ? "prev" : "next"; + (0, _editor.traverseResults)(e, ctx, query, direction, searchModifiers.toJS()); + } inSelectedFrameSource() { - var _props7 = this.props, - selectedLocation = _props7.selectedLocation, - selectedFrame = _props7.selectedFrame; + var _props4 = this.props, + selectedLocation = _props4.selectedLocation, + selectedFrame = _props4.selectedFrame; return selectedFrame && selectedLocation && selectedFrame.location.sourceId == selectedLocation.sourceId; } openMenu(event, editor) { - var _props8 = this.props, - selectedSource = _props8.selectedSource, - selectedLocation = _props8.selectedLocation, - showSource = _props8.showSource, - jumpToMappedLocation = _props8.jumpToMappedLocation, - addExpression = _props8.addExpression, - toggleBlackBox = _props8.toggleBlackBox, - getFunctionText = _props8.getFunctionText; + var _props5 = this.props, + selectedSource = _props5.selectedSource, + selectedLocation = _props5.selectedLocation, + showSource = _props5.showSource, + jumpToMappedLocation = _props5.jumpToMappedLocation, + addExpression = _props5.addExpression, + toggleBlackBox = _props5.toggleBlackBox, + getFunctionText = _props5.getFunctionText; return (0, _EditorMenu2.default)({ @@ -23304,10 +23162,86 @@ class Editor extends _react.PureComponent { }); } + onGutterClick(cm, line, gutter, ev) { + var _props6 = this.props, + selectedSource = _props6.selectedSource, + toggleBreakpoint = _props6.toggleBreakpoint, + addOrToggleDisabledBreakpoint = _props6.addOrToggleDisabledBreakpoint, + isEmptyLine = _props6.isEmptyLine, + continueToHere = _props6.continueToHere; + + // ignore right clicks in the gutter + + if (ev.ctrlKey && ev.button === 0 || ev.which === 3 || selectedSource && selectedSource.get("isBlackBoxed")) { + return; + } + + if (isEmptyLine(line)) { + return; + } + + if (this.isCbPanelOpen()) { + return this.closeConditionalPanel(); + } + + if (!selectedSource) { + return; + } + + if (gutter !== "CodeMirror-foldgutter") { + if (ev.altKey) { + continueToHere((0, _editor.toSourceLine)(selectedSource.get("id"), line)); + } else if (ev.shiftKey) { + addOrToggleDisabledBreakpoint((0, _editor.toSourceLine)(selectedSource.get("id"), line)); + } else { + toggleBreakpoint((0, _editor.toSourceLine)(selectedSource.get("id"), line)); + } + } + } + + onGutterContextMenu(event) { + var _props7 = this.props, + selectedSource = _props7.selectedSource, + breakpoints = _props7.breakpoints, + toggleBreakpoint = _props7.toggleBreakpoint, + toggleDisabledBreakpoint = _props7.toggleDisabledBreakpoint, + isEmptyLine = _props7.isEmptyLine, + pauseData = _props7.pauseData, + continueToHere = _props7.continueToHere; + + + if (selectedSource && selectedSource.get("isBlackBoxed")) { + event.preventDefault(); + return; + } + + var sourceId = selectedSource ? selectedSource.get("id") : ""; + var line = (0, _editor.lineAtHeight)(this.state.editor, sourceId, event); + var breakpoint = breakpoints.find(bp => bp.location.line === line); + + if (isEmptyLine(line - 1)) { + return; + } + + (0, _GutterMenu2.default)({ + event, + line, + breakpoint, + toggleBreakpoint, + toggleDisabledBreakpoint, + pauseData, + continueToHere, + + showConditionalPanel: this.toggleConditionalPanel, + isCbPanelOpen: this.isCbPanelOpen(), + closeConditionalPanel: this.closeConditionalPanel + }); + } + onClick(e) { - var _props9 = this.props, - selectedLocation = _props9.selectedLocation, - jumpToMappedLocation = _props9.jumpToMappedLocation; + var _props8 = this.props, + selectedLocation = _props8.selectedLocation, + jumpToMappedLocation = _props8.jumpToMappedLocation; if (e.metaKey && e.altKey) { @@ -23316,6 +23250,42 @@ class Editor extends _react.PureComponent { } } + toggleConditionalPanel(line) { + if (this.isCbPanelOpen()) { + return this.closeConditionalPanel(); + } + + var _props9 = this.props, + selectedLocation = _props9.selectedLocation, + setBreakpointCondition = _props9.setBreakpointCondition, + breakpoints = _props9.breakpoints; + + var sourceId = selectedLocation ? selectedLocation.sourceId : ""; + + var breakpoint = breakpoints.find(bp => bp.location.line === line); + var location = { sourceId, line }; + var condition = breakpoint ? breakpoint.condition : ""; + + var panel = (0, _ConditionalPanel.renderConditionalPanel)({ + condition, + setBreakpoint: value => setBreakpointCondition(location, { condition: value }), + closePanel: this.closeConditionalPanel + }); + + var editorLine = (0, _editor.toEditorLine)(sourceId, line); + this.cbPanel = this.state.editor.codeMirror.addLineWidget(editorLine, panel, { + coverGutter: true, + noHScroll: false + }); + this.cbPanel.node.querySelector("input").focus(); + } + + closeConditionalPanel() { + this.props.toggleConditionalBreakpointPanel(null); + this.cbPanel.clear(); + this.cbPanel = null; + } + isCbPanelOpen() { return !!this.cbPanel; } @@ -23378,7 +23348,7 @@ class Editor extends _react.PureComponent { } if (!(0, _source.isLoaded)(nextProps.selectedSource.toJS())) { - return (0, _editor.showLoading)(this.state.editor); + return this.showMessage(L10N.getStr("loadingText")); } if (nextProps.selectedSource.get("error")) { @@ -23395,6 +23365,9 @@ class Editor extends _react.PureComponent { return; } + this.state.editor.replaceDocument(this.state.editor.createDocument()); + this.state.editor.setText(msg); + this.state.editor.setMode({ name: "text" }); (0, _editor.resetLineNumberFormat)(this.state.editor); } @@ -23536,14 +23509,17 @@ class Editor extends _react.PureComponent { } render() { - var coverageOn = this.props.coverageOn; + var _props14 = this.props, + coverageOn = _props14.coverageOn, + pauseData = _props14.pauseData; return _react2.default.createElement( "div", { className: (0, _classnames2.default)("editor-wrapper", { - "coverage-on": coverageOn + "coverage-on": coverageOn, + paused: !!pauseData && (0, _devtoolsConfig.isEnabled)("highlightScopeLines") }) }, this.renderSearchBar(), @@ -23565,48 +23541,48 @@ class Editor extends _react.PureComponent { Editor.propTypes = { breakpoints: _reactImmutableProptypes2.default.map, - hitCount: _propTypes2.default.object, - selectedLocation: _propTypes2.default.object, + hitCount: _react.PropTypes.object, + selectedLocation: _react.PropTypes.object, selectedSource: _reactImmutableProptypes2.default.map, - highlightLineRange: _propTypes2.default.func, - clearHighlightLineRange: _propTypes2.default.func, - highlightedLineRange: _propTypes2.default.object, - searchOn: _propTypes2.default.bool, - addBreakpoint: _propTypes2.default.func.isRequired, - disableBreakpoint: _propTypes2.default.func.isRequired, - enableBreakpoint: _propTypes2.default.func.isRequired, - removeBreakpoint: _propTypes2.default.func.isRequired, - setBreakpointCondition: _propTypes2.default.func.isRequired, - selectSource: _propTypes2.default.func, - jumpToMappedLocation: _propTypes2.default.func, - toggleBlackBox: _propTypes2.default.func, - showSource: _propTypes2.default.func, - coverageOn: _propTypes2.default.bool, - pauseData: _propTypes2.default.object, - selectedFrame: _propTypes2.default.object, - addExpression: _propTypes2.default.func.isRequired, - horizontal: _propTypes2.default.bool, - query: _propTypes2.default.string.isRequired, + highlightLineRange: _react.PropTypes.func, + clearHighlightLineRange: _react.PropTypes.func, + highlightedLineRange: _react.PropTypes.object, + searchOn: _react.PropTypes.bool, + addBreakpoint: _react.PropTypes.func.isRequired, + disableBreakpoint: _react.PropTypes.func.isRequired, + enableBreakpoint: _react.PropTypes.func.isRequired, + removeBreakpoint: _react.PropTypes.func.isRequired, + setBreakpointCondition: _react.PropTypes.func.isRequired, + selectSource: _react.PropTypes.func, + jumpToMappedLocation: _react.PropTypes.func, + toggleBlackBox: _react.PropTypes.func, + showSource: _react.PropTypes.func, + coverageOn: _react.PropTypes.bool, + pauseData: _react.PropTypes.object, + selectedFrame: _react.PropTypes.object, + addExpression: _react.PropTypes.func.isRequired, + horizontal: _react.PropTypes.bool, + query: _react.PropTypes.string.isRequired, searchModifiers: _reactImmutableProptypes2.default.recordOf({ - caseSensitive: _propTypes2.default.bool.isRequired, - regexMatch: _propTypes2.default.bool.isRequired, - wholeWord: _propTypes2.default.bool.isRequired + caseSensitive: _react.PropTypes.bool.isRequired, + regexMatch: _react.PropTypes.bool.isRequired, + wholeWord: _react.PropTypes.bool.isRequired }).isRequired, - startPanelSize: _propTypes2.default.number, - endPanelSize: _propTypes2.default.number, - linesInScope: _propTypes2.default.array, - toggleBreakpoint: _propTypes2.default.func.isRequired, - addOrToggleDisabledBreakpoint: _propTypes2.default.func.isRequired, - toggleDisabledBreakpoint: _propTypes2.default.func.isRequired, - conditionalBreakpointPanel: _propTypes2.default.number, - toggleConditionalBreakpointPanel: _propTypes2.default.func.isRequired, - isEmptyLine: _propTypes2.default.func, - continueToHere: _propTypes2.default.func, - getFunctionText: _propTypes2.default.func + startPanelSize: _react.PropTypes.number, + endPanelSize: _react.PropTypes.number, + linesInScope: _react.PropTypes.array, + toggleBreakpoint: _react.PropTypes.func.isRequired, + addOrToggleDisabledBreakpoint: _react.PropTypes.func.isRequired, + toggleDisabledBreakpoint: _react.PropTypes.func.isRequired, + conditionalBreakpointPanel: _react.PropTypes.number, + toggleConditionalBreakpointPanel: _react.PropTypes.func.isRequired, + isEmptyLine: _react.PropTypes.func, + continueToHere: _react.PropTypes.func, + getFunctionText: _react.PropTypes.func }; Editor.contextTypes = { - shortcuts: _propTypes2.default.object + shortcuts: _react.PropTypes.object }; exports.default = (0, _reactRedux.connect)(state => { @@ -23677,7 +23653,7 @@ var _PaneToggle = __webpack_require__(428); var _PaneToggle2 = _interopRequireDefault(_PaneToggle); -__webpack_require__(1248); +__webpack_require__(875); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -23856,7 +23832,7 @@ var _Svg = __webpack_require__(344); var _Svg2 = _interopRequireDefault(_Svg); -__webpack_require__(1247); +__webpack_require__(874); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -23912,10 +23888,6 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _propTypes = __webpack_require__(20); - -var _propTypes2 = _interopRequireDefault(_propTypes); - var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); @@ -23938,7 +23910,7 @@ var _selectors = __webpack_require__(242); var _editor = __webpack_require__(257); -var _search = __webpack_require__(1210); +var _search = __webpack_require__(1115); var _resultList = __webpack_require__(343); @@ -23954,7 +23926,7 @@ var _SearchInput = __webpack_require__(377); var _SearchInput2 = _interopRequireDefault(_SearchInput); -__webpack_require__(1249); +__webpack_require__(876); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -23975,249 +23947,28 @@ function getShortcuts() { class SearchBar extends _react.Component { constructor(props) { - var _this; - - _this = super(props); - - this.onEscape = e => { - this.closeSearch(e); - }; - - this.clearSearch = () => { - var _props = this.props, - ed = _props.editor, - query = _props.query, - modifiers = _props.modifiers; - - if (ed && modifiers) { - var ctx = { ed, cm: ed.codeMirror }; - (0, _editor.removeOverlay)(ctx, query, modifiers.toJS()); - } - }; - - this.closeSearch = e => { - var _props2 = this.props, - editor = _props2.editor, - setFileSearchQuery = _props2.setFileSearchQuery, - searchOn = _props2.searchOn; - - - if (editor && searchOn) { - setFileSearchQuery(""); - this.clearSearch(); - this.props.setActiveSearch(); - this.props.clearHighlightLineRange(); - e.stopPropagation(); - e.preventDefault(); - } - }; - - this.toggleSearch = e => { - e.stopPropagation(); - e.preventDefault(); - var editor = this.props.editor; - - - if (!this.props.searchOn) { - this.props.setActiveSearch("file"); - } - - if (this.props.searchOn && editor) { - var selection = editor.codeMirror.getSelection(); - this.setSearchValue(selection); - if (selection !== "") { - this.doSearch(selection); - } - this.selectSearchInput(); - } - }; - - this.setSearchValue = value => { - var searchInput = this.searchInput(); - if (value == "" || !searchInput) { - return; - } - - searchInput.value = value; - }; - - this.selectSearchInput = () => { - var searchInput = this.searchInput(); - if (searchInput) { - searchInput.setSelectionRange(0, searchInput.value.length); - searchInput.focus(); - } - }; - - this.searchInput = () => { - var node = (0, _reactDom.findDOMNode)(this); - if (node instanceof HTMLElement) { - var input = node.querySelector("input"); - if (input instanceof HTMLInputElement) { - return input; - } - } - return null; - }; - - this.doSearch = query => { - var _props3 = this.props, - selectedSource = _props3.selectedSource, - setFileSearchQuery = _props3.setFileSearchQuery; - - if (!selectedSource || !selectedSource.get("text")) { - return; - } - - setFileSearchQuery(query); - - this.searchContents(query); - }; - - this.updateSearchResults = (characterIndex, line, matches) => { - var matchIndex = matches.findIndex(elm => elm.line === line && elm.ch === characterIndex); - this.props.updateSearchResults({ - matches, - matchIndex, - count: matches.length, - index: characterIndex - }); - }; - - this.searchContents = (() => { - var _ref = _asyncToGenerator(function* (query) { - var _props4 = _this.props, - selectedSource = _props4.selectedSource, - modifiers = _props4.modifiers, - ed = _props4.editor; - - - if (!query || !ed || !selectedSource || !selectedSource.get("text") || !modifiers) { - return; - } - - var ctx = { ed, cm: ed.codeMirror }; - - var _modifiers = modifiers.toJS(); - var matches = yield (0, _search.getMatches)(query, selectedSource.get("text"), _modifiers); - - var _find = (0, _editor.find)(ctx, query, true, _modifiers), - ch = _find.ch, - line = _find.line; - - _this.updateSearchResults(ch, line, matches); - }); - - return function (_x) { - return _ref.apply(this, arguments); - }; - })(); - - this.traverseResults = (e, rev) => { - e.stopPropagation(); - e.preventDefault(); - var ed = this.props.editor; - - if (!ed) { - return; - } - - var ctx = { ed, cm: ed.codeMirror }; - - var _props5 = this.props, - query = _props5.query, - modifiers = _props5.modifiers, - matches = _props5.searchResults.matches; - - - if (query === "") { - this.props.setActiveSearch("file"); - } - - if (modifiers) { - var matchedLocations = matches || []; - - var _ref2 = rev ? (0, _editor.findPrev)(ctx, query, true, modifiers.toJS()) : (0, _editor.findNext)(ctx, query, true, modifiers.toJS()), - ch = _ref2.ch, - line = _ref2.line; - - this.updateSearchResults(ch, line, matchedLocations); - } - }; - - this.onChange = e => { - return this.doSearch(e.target.value); - }; - - this.onKeyUp = e => { - if (e.key !== "Enter" && e.key !== "F3") { - return; - } - - this.traverseResults(e, e.shiftKey); - e.preventDefault(); - }; - - this.renderSearchModifiers = () => { - var _props6 = this.props, - modifiers = _props6.modifiers, - toggleFileSearchModifier = _props6.toggleFileSearchModifier; - - - function SearchModBtn(_ref3) { - var modVal = _ref3.modVal, - className = _ref3.className, - svgName = _ref3.svgName, - tooltip = _ref3.tooltip; - - var preppedClass = (0, _classnames2.default)(className, { - active: modifiers && modifiers.get(modVal) - }); - return _react2.default.createElement( - "button", - { - className: preppedClass, - onClick: () => toggleFileSearchModifier(modVal), - title: tooltip - }, - _react2.default.createElement(_Svg2.default, { name: svgName }) - ); - } - - return _react2.default.createElement( - "div", - { className: "search-modifiers" }, - _react2.default.createElement( - "span", - { className: "search-type-name" }, - L10N.getStr("symbolSearch.searchModifier.modifiersLabel") - ), - _react2.default.createElement(SearchModBtn, { - modVal: "regexMatch", - className: "regex-match-btn", - svgName: "regex-match", - tooltip: L10N.getStr("symbolSearch.searchModifier.regex") - }), - _react2.default.createElement(SearchModBtn, { - modVal: "caseSensitive", - className: "case-sensitive-btn", - svgName: "case-match", - tooltip: L10N.getStr("symbolSearch.searchModifier.caseSensitive") - }), - _react2.default.createElement(SearchModBtn, { - modVal: "wholeWord", - className: "whole-word-btn", - svgName: "whole-word-match", - tooltip: L10N.getStr("symbolSearch.searchModifier.wholeWord") - }) - ); - }; - + super(props); this.state = { selectedResultIndex: 0, count: 0, index: -1 }; + + var self = this; + self.onEscape = this.onEscape.bind(this); + self.clearSearch = this.clearSearch.bind(this); + self.closeSearch = this.closeSearch.bind(this); + self.toggleSearch = this.toggleSearch.bind(this); + self.setSearchValue = this.setSearchValue.bind(this); + self.selectSearchInput = this.selectSearchInput.bind(this); + self.searchInput = this.searchInput.bind(this); + self.doSearch = this.doSearch.bind(this); + self.searchContents = this.searchContents.bind(this); + self.traverseResults = this.traverseResults.bind(this); + self.onChange = this.onChange.bind(this); + self.onKeyUp = this.onKeyUp.bind(this); + self.buildSummaryMsg = this.buildSummaryMsg.bind(this); + self.renderSearchModifiers = this.renderSearchModifiers.bind(this); } componentWillUnmount() { @@ -24237,6 +23988,7 @@ class SearchBar extends _react.Component { componentDidMount() { // overwrite searchContents with a debounced version to reduce the // frequency of queries which improves perf on large files + // $FlowIgnore this.searchContents = (0, _lodash.debounce)(this.searchContents, 100); var shortcuts = this.context.shortcuts; @@ -24266,16 +24018,192 @@ class SearchBar extends _react.Component { } } + onEscape(e) { + this.closeSearch(e); + } + + clearSearch() { + var _props = this.props, + ed = _props.editor, + query = _props.query, + modifiers = _props.modifiers; + + if (ed && modifiers) { + var ctx = { ed, cm: ed.codeMirror }; + (0, _editor.removeOverlay)(ctx, query, modifiers.toJS()); + } + } + + closeSearch(e) { + var _props2 = this.props, + editor = _props2.editor, + setFileSearchQuery = _props2.setFileSearchQuery, + searchOn = _props2.searchOn; + + + if (editor && searchOn) { + setFileSearchQuery(""); + this.clearSearch(); + this.props.setActiveSearch(); + this.props.clearHighlightLineRange(); + e.stopPropagation(); + e.preventDefault(); + } + } + + toggleSearch(e) { + e.stopPropagation(); + e.preventDefault(); + var editor = this.props.editor; + + + if (!this.props.searchOn) { + this.props.setActiveSearch("file"); + } + + if (this.props.searchOn && editor) { + var selection = editor.codeMirror.getSelection(); + this.setSearchValue(selection); + if (selection !== "") { + this.doSearch(selection); + } + this.selectSearchInput(); + } + } + + setSearchValue(value) { + var searchInput = this.searchInput(); + if (value == "" || !searchInput) { + return; + } + + searchInput.value = value; + } + + selectSearchInput() { + var searchInput = this.searchInput(); + if (searchInput) { + searchInput.setSelectionRange(0, searchInput.value.length); + searchInput.focus(); + } + } + + searchInput() { + var node = (0, _reactDom.findDOMNode)(this); + if (node instanceof HTMLElement) { + var input = node.querySelector("input"); + if (input instanceof HTMLInputElement) { + return input; + } + } + return null; + } + + doSearch(query) { + var _props3 = this.props, + selectedSource = _props3.selectedSource, + setFileSearchQuery = _props3.setFileSearchQuery; + + if (!selectedSource || !selectedSource.get("text")) { + return; + } + + setFileSearchQuery(query); + + this.searchContents(query); + } + + updateSearchResults(characterIndex, line, matches) { + var matchIndex = matches.findIndex(elm => elm.line === line && elm.ch === characterIndex); + this.props.updateSearchResults({ + matches, + matchIndex, + count: matches.length, + index: characterIndex + }); + } + + searchContents(query) { + var _this = this; + + return _asyncToGenerator(function* () { + var _props4 = _this.props, + selectedSource = _props4.selectedSource, + modifiers = _props4.modifiers, + ed = _props4.editor; + + + if (!query || !ed || !selectedSource || !selectedSource.get("text") || !modifiers) { + return; + } + + var ctx = { ed, cm: ed.codeMirror }; + + var _modifiers = modifiers.toJS(); + var matches = yield (0, _search.getMatches)(query, selectedSource.get("text"), _modifiers); + + var _find = (0, _editor.find)(ctx, query, true, _modifiers), + ch = _find.ch, + line = _find.line; + + _this.updateSearchResults(ch, line, matches); + })(); + } + + traverseResults(e, rev) { + e.stopPropagation(); + e.preventDefault(); + var ed = this.props.editor; + + if (!ed) { + return; + } + + var ctx = { ed, cm: ed.codeMirror }; + + var _props5 = this.props, + query = _props5.query, + modifiers = _props5.modifiers, + matches = _props5.searchResults.matches; + + + if (query === "") { + this.props.setActiveSearch("file"); + } + + if (modifiers) { + var matchedLocations = matches || []; + + var _ref = rev ? (0, _editor.findPrev)(ctx, query, true, modifiers.toJS()) : (0, _editor.findNext)(ctx, query, true, modifiers.toJS()), + ch = _ref.ch, + line = _ref.line; + + this.updateSearchResults(ch, line, matchedLocations); + } + } + // Handlers + onChange(e) { + return this.doSearch(e.target.value); + } + + onKeyUp(e) { + if (e.key !== "Enter" && e.key !== "F3") { + return; + } + + this.traverseResults(e, e.shiftKey); + e.preventDefault(); + } // Renderers buildSummaryMsg() { - var _props7 = this.props, - _props7$searchResults = _props7.searchResults, - matchIndex = _props7$searchResults.matchIndex, - count = _props7$searchResults.count, - index = _props7$searchResults.index, - query = _props7.query; + var _props6 = this.props, + _props6$searchResults = _props6.searchResults, + matchIndex = _props6$searchResults.matchIndex, + count = _props6$searchResults.count, + index = _props6$searchResults.index, + query = _props6.query; if (query.trim() == "") { @@ -24293,6 +24221,61 @@ class SearchBar extends _react.Component { return L10N.getFormatStr("editor.searchResults", matchIndex + 1, count); } + renderSearchModifiers() { + var _props7 = this.props, + modifiers = _props7.modifiers, + toggleFileSearchModifier = _props7.toggleFileSearchModifier; + + + function SearchModBtn(_ref2) { + var modVal = _ref2.modVal, + className = _ref2.className, + svgName = _ref2.svgName, + tooltip = _ref2.tooltip; + + var preppedClass = (0, _classnames2.default)(className, { + active: modifiers && modifiers.get(modVal) + }); + return _react2.default.createElement( + "button", + { + className: preppedClass, + onClick: () => toggleFileSearchModifier(modVal), + title: tooltip + }, + _react2.default.createElement(_Svg2.default, { name: svgName }) + ); + } + + return _react2.default.createElement( + "div", + { className: "search-modifiers" }, + _react2.default.createElement( + "span", + { className: "search-type-name" }, + L10N.getStr("symbolSearch.searchModifier.modifiersLabel") + ), + _react2.default.createElement(SearchModBtn, { + modVal: "regexMatch", + className: "regex-match-btn", + svgName: "regex-match", + tooltip: L10N.getStr("symbolSearch.searchModifier.regex") + }), + _react2.default.createElement(SearchModBtn, { + modVal: "caseSensitive", + className: "case-sensitive-btn", + svgName: "case-match", + tooltip: L10N.getStr("symbolSearch.searchModifier.caseSensitive") + }), + _react2.default.createElement(SearchModBtn, { + modVal: "wholeWord", + className: "whole-word-btn", + svgName: "whole-word-match", + tooltip: L10N.getStr("symbolSearch.searchModifier.wholeWord") + }) + ); + } + renderSearchType() { return _react2.default.createElement( "div", @@ -24344,7 +24327,7 @@ class SearchBar extends _react.Component { } SearchBar.contextTypes = { - shortcuts: _propTypes2.default.object + shortcuts: _react.PropTypes.object }; exports.default = (0, _reactRedux.connect)(state => { @@ -24574,8 +24557,229 @@ exports.default = (0, _reactRedux.connect)(state => { /* 648 */, /* 649 */, /* 650 */, -/* 651 */, -/* 652 */, +/* 651 */ +/***/ (function(module, exports, __webpack_require__) { + +var isObject = __webpack_require__(84), + now = __webpack_require__(652), + toNumber = __webpack_require__(304); + +/** Error message constants. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max, + nativeMin = Math.min; + +/** + * Creates a debounced function that delays invoking `func` until after `wait` + * milliseconds have elapsed since the last time the debounced function was + * invoked. The debounced function comes with a `cancel` method to cancel + * delayed `func` invocations and a `flush` method to immediately invoke them. + * Provide `options` to indicate whether `func` should be invoked on the + * leading and/or trailing edge of the `wait` timeout. The `func` is invoked + * with the last arguments provided to the debounced function. Subsequent + * calls to the debounced function return the result of the last `func` + * invocation. + * + * **Note:** If `leading` and `trailing` options are `true`, `func` is + * invoked on the trailing edge of the timeout only if the debounced function + * is invoked more than once during the `wait` timeout. + * + * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred + * until to the next tick, similar to `setTimeout` with a timeout of `0`. + * + * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) + * for details over the differences between `_.debounce` and `_.throttle`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to debounce. + * @param {number} [wait=0] The number of milliseconds to delay. + * @param {Object} [options={}] The options object. + * @param {boolean} [options.leading=false] + * Specify invoking on the leading edge of the timeout. + * @param {number} [options.maxWait] + * The maximum time `func` is allowed to be delayed before it's invoked. + * @param {boolean} [options.trailing=true] + * Specify invoking on the trailing edge of the timeout. + * @returns {Function} Returns the new debounced function. + * @example + * + * // Avoid costly calculations while the window size is in flux. + * jQuery(window).on('resize', _.debounce(calculateLayout, 150)); + * + * // Invoke `sendMail` when clicked, debouncing subsequent calls. + * jQuery(element).on('click', _.debounce(sendMail, 300, { + * 'leading': true, + * 'trailing': false + * })); + * + * // Ensure `batchLog` is invoked once after 1 second of debounced calls. + * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 }); + * var source = new EventSource('/stream'); + * jQuery(source).on('message', debounced); + * + * // Cancel the trailing debounced invocation. + * jQuery(window).on('popstate', debounced.cancel); + */ +function debounce(func, wait, options) { + var lastArgs, + lastThis, + maxWait, + result, + timerId, + lastCallTime, + lastInvokeTime = 0, + leading = false, + maxing = false, + trailing = true; + + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + wait = toNumber(wait) || 0; + if (isObject(options)) { + leading = !!options.leading; + maxing = 'maxWait' in options; + maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait; + trailing = 'trailing' in options ? !!options.trailing : trailing; + } + + function invokeFunc(time) { + var args = lastArgs, + thisArg = lastThis; + + lastArgs = lastThis = undefined; + lastInvokeTime = time; + result = func.apply(thisArg, args); + return result; + } + + function leadingEdge(time) { + // Reset any `maxWait` timer. + lastInvokeTime = time; + // Start the timer for the trailing edge. + timerId = setTimeout(timerExpired, wait); + // Invoke the leading edge. + return leading ? invokeFunc(time) : result; + } + + function remainingWait(time) { + var timeSinceLastCall = time - lastCallTime, + timeSinceLastInvoke = time - lastInvokeTime, + result = wait - timeSinceLastCall; + + return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result; + } + + function shouldInvoke(time) { + var timeSinceLastCall = time - lastCallTime, + timeSinceLastInvoke = time - lastInvokeTime; + + // Either this is the first call, activity has stopped and we're at the + // trailing edge, the system time has gone backwards and we're treating + // it as the trailing edge, or we've hit the `maxWait` limit. + return (lastCallTime === undefined || (timeSinceLastCall >= wait) || + (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait)); + } + + function timerExpired() { + var time = now(); + if (shouldInvoke(time)) { + return trailingEdge(time); + } + // Restart the timer. + timerId = setTimeout(timerExpired, remainingWait(time)); + } + + function trailingEdge(time) { + timerId = undefined; + + // Only invoke if we have `lastArgs` which means `func` has been + // debounced at least once. + if (trailing && lastArgs) { + return invokeFunc(time); + } + lastArgs = lastThis = undefined; + return result; + } + + function cancel() { + if (timerId !== undefined) { + clearTimeout(timerId); + } + lastInvokeTime = 0; + lastArgs = lastCallTime = lastThis = timerId = undefined; + } + + function flush() { + return timerId === undefined ? result : trailingEdge(now()); + } + + function debounced() { + var time = now(), + isInvoking = shouldInvoke(time); + + lastArgs = arguments; + lastThis = this; + lastCallTime = time; + + if (isInvoking) { + if (timerId === undefined) { + return leadingEdge(lastCallTime); + } + if (maxing) { + // Handle invocations in a tight loop. + timerId = setTimeout(timerExpired, wait); + return invokeFunc(lastCallTime); + } + } + if (timerId === undefined) { + timerId = setTimeout(timerExpired, wait); + } + return result; + } + debounced.cancel = cancel; + debounced.flush = flush; + return debounced; +} + +module.exports = debounce; + + +/***/ }), +/* 652 */ +/***/ (function(module, exports, __webpack_require__) { + +var root = __webpack_require__(8); + +/** + * Gets the timestamp of the number of milliseconds that have elapsed since + * the Unix epoch (1 January 1970 00:00:00 UTC). + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Date + * @returns {number} Returns the timestamp. + * @example + * + * _.defer(function(stamp) { + * console.log(_.now() - stamp); + * }, _.now()); + * // => Logs the number of milliseconds it took for the deferred invocation. + */ +var now = function() { + return root.Date.now(); +}; + +module.exports = now; + + +/***/ }), /* 653 */, /* 654 */, /* 655 */ @@ -24902,12 +25106,11 @@ var _BracketArrow = __webpack_require__(1029); var _BracketArrow2 = _interopRequireDefault(_BracketArrow); -__webpack_require__(1253); +__webpack_require__(880); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } class Popover extends _react.Component { - constructor() { super(); this.onMouseLeave = this.onMouseLeave.bind(this); @@ -25068,6 +25271,14 @@ class Popover extends _react.Component { } } +Popover.propTypes = { + target: _react.PropTypes.object, + targetPosition: _react.PropTypes.object, + children: _react.PropTypes.object, + onMouseLeave: _react.PropTypes.func, + type: _react.PropTypes.string +}; + Popover.defaultProps = { onMouseLeave: () => {}, type: "popover" @@ -25111,7 +25322,7 @@ var _Close = __webpack_require__(378); var _Close2 = _interopRequireDefault(_Close); -__webpack_require__(1246); +__webpack_require__(873); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -25388,10 +25599,6 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _propTypes = __webpack_require__(20); - -var _propTypes2 = _interopRequireDefault(_propTypes); - var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); @@ -25462,7 +25669,7 @@ var _Scopes2 = __webpack_require__(731); var _Scopes3 = _interopRequireDefault(_Scopes2); -__webpack_require__(1267); +__webpack_require__(921); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -25646,18 +25853,18 @@ class SecondaryPanes extends _react.Component { } SecondaryPanes.propTypes = { - evaluateExpressions: _propTypes2.default.func.isRequired, - pauseData: _propTypes2.default.object, - horizontal: _propTypes2.default.bool, + evaluateExpressions: _react.PropTypes.func.isRequired, + pauseData: _react.PropTypes.object, + horizontal: _react.PropTypes.bool, breakpoints: _reactImmutableProptypes2.default.map.isRequired, - breakpointsDisabled: _propTypes2.default.bool, - breakpointsLoading: _propTypes2.default.bool, - toggleAllBreakpoints: _propTypes2.default.func.isRequired, - toggleShortcutsModal: _propTypes2.default.func + breakpointsDisabled: _react.PropTypes.bool, + breakpointsLoading: _react.PropTypes.bool, + toggleAllBreakpoints: _react.PropTypes.func.isRequired, + toggleShortcutsModal: _react.PropTypes.func }; SecondaryPanes.contextTypes = { - shortcuts: _propTypes2.default.object + shortcuts: _react.PropTypes.object }; exports.default = (0, _reactRedux.connect)(state => ({ @@ -25700,7 +25907,7 @@ var _Close2 = _interopRequireDefault(_Close); var _devtoolsReps = __webpack_require__(924); -__webpack_require__(1260); +__webpack_require__(908); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -25945,7 +26152,7 @@ var _Close = __webpack_require__(378); var _Close2 = _interopRequireDefault(_Close); -__webpack_require__(1259); +__webpack_require__(907); var _lodash = __webpack_require__(2); @@ -25953,8 +26160,6 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } - function isCurrentlyPausedAtBreakpoint(pause, breakpoint) { if (!pause || pause.isInterrupted) { return false; @@ -25965,12 +26170,8 @@ function isCurrentlyPausedAtBreakpoint(pause, breakpoint) { return bpId === pausedId; } -function getBreakpointFilename(source) { - return source && source.toJS ? (0, _source.getFilename)(source.toJS()) : ""; -} - function renderSourceLocation(source, line, column) { - var filename = getBreakpointFilename(source); + var filename = source ? (0, _source.getFilename)(source.toJS()) : null; var isWasm = source && source.get("isWasm"); var columnVal = (0, _devtoolsConfig.isEnabled)("columnBreakpoints") && column ? `:${column}` : ""; var bpLocation = isWasm ? `0x${line.toString(16).toUpperCase()}` : `${line}${columnVal}`; @@ -26223,16 +26424,16 @@ class Breakpoints extends _react.PureComponent { onClick: () => this.selectBreakpoint(breakpoint), onContextMenu: e => this.showContextMenu(e, breakpoint) }, - _react2.default.createElement("input", { - type: "checkbox", - className: "breakpoint-checkbox", - checked: !isDisabled, - onChange: () => this.handleCheckbox(breakpoint), - onClick: ev => ev.stopPropagation() - }), _react2.default.createElement( "label", { className: "breakpoint-label", title: breakpoint.text }, + _react2.default.createElement("input", { + type: "checkbox", + className: "breakpoint-checkbox", + checked: !isDisabled, + onChange: () => this.handleCheckbox(breakpoint), + onClick: ev => ev.stopPropagation() + }), renderSourceLocation(breakpoint.location.source, line, column) ), _react2.default.createElement( @@ -26254,7 +26455,7 @@ class Breakpoints extends _react.PureComponent { "div", { className: "pane-info" }, L10N.getStr("breakpoints.none") - ) : (0, _lodash.sortBy)([].concat(_toConsumableArray(breakpoints.valueSeq())), [bp => getBreakpointFilename(bp.location.source), bp => bp.location.line]).map(bp => this.renderBreakpoint(bp)); + ) : breakpoints.valueSeq().map(bp => this.renderBreakpoint(bp)); return _react2.default.createElement( "div", @@ -26322,7 +26523,7 @@ var _ManagedTree = __webpack_require__(419); var _ManagedTree2 = _interopRequireDefault(_ManagedTree); -__webpack_require__(1216); +__webpack_require__(850); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -26559,7 +26760,7 @@ var _scopes = __webpack_require__(732); var _devtoolsReps = __webpack_require__(924); -__webpack_require__(1216); +__webpack_require__(850); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -26856,7 +27057,7 @@ var _Close = __webpack_require__(378); var _Close2 = _interopRequireDefault(_Close); -__webpack_require__(1264); +__webpack_require__(915); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -26970,7 +27171,7 @@ var _Svg = __webpack_require__(344); var _Svg2 = _interopRequireDefault(_Svg); -__webpack_require__(1266); +__webpack_require__(917); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -26981,42 +27182,13 @@ class Accordion extends _react.Component { constructor(props) { super(); - this.renderContainer = (item, i) => { - var _state = this.state, - opened = _state.opened, - created = _state.created; - - var containerClassName = `${item.header.toLowerCase().replace(/\s/g, "-")}-pane`; - - return _react2.default.createElement( - "div", - { className: containerClassName, key: i }, - _react2.default.createElement( - "div", - { className: "_header", onClick: () => this.handleHeaderClick(i) }, - _react2.default.createElement(_Svg2.default, { name: "arrow", className: opened[i] ? "expanded" : "" }), - item.header, - item.buttons ? _react2.default.createElement( - "div", - { className: "header-buttons" }, - item.buttons - ) : null - ), - created[i] || opened[i] ? _react2.default.createElement( - "div", - { - className: "_content", - style: { display: opened[i] ? "block" : "none" } - }, - (0, _react.createElement)(item.component, item.componentProps || {}) - ) : null - ); - }; - this.state = { opened: props.items.map(item => item.opened), created: [] }; + + var self = this; + self.renderContainer = this.renderContainer.bind(this); } componentWillReceiveProps(nextProps) { @@ -27049,6 +27221,38 @@ class Accordion extends _react.Component { this.setState({ opened, created }); } + renderContainer(item, i) { + var _state = this.state, + opened = _state.opened, + created = _state.created; + + var containerClassName = `${item.header.toLowerCase().replace(/\s/g, "-")}-pane`; + + return _react2.default.createElement( + "div", + { className: containerClassName, key: i }, + _react2.default.createElement( + "div", + { className: "_header", onClick: () => this.handleHeaderClick(i) }, + _react2.default.createElement(_Svg2.default, { name: "arrow", className: opened[i] ? "expanded" : "" }), + item.header, + item.buttons ? _react2.default.createElement( + "div", + { className: "header-buttons" }, + item.buttons + ) : null + ), + created[i] || opened[i] ? _react2.default.createElement( + "div", + { + className: "_content", + style: { display: opened[i] ? "block" : "none" } + }, + (0, _react.createElement)(item.component, item.componentProps || {}) + ) : null + ); + } + render() { return _react2.default.createElement( "div", @@ -27075,10 +27279,6 @@ Object.defineProperty(exports, "__esModule", { var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; -var _propTypes = __webpack_require__(20); - -var _propTypes2 = _interopRequireDefault(_propTypes); - var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); @@ -27103,7 +27303,7 @@ var _actions = __webpack_require__(244); var _actions2 = _interopRequireDefault(_actions); -__webpack_require__(1215); +__webpack_require__(918); var _devtoolsModules = __webpack_require__(830); @@ -27273,7 +27473,7 @@ class CommandBar extends _react.Component { } CommandBar.contextTypes = { - shortcuts: _propTypes2.default.object + shortcuts: _react.PropTypes.object }; exports.default = (0, _reactRedux.connect)(state => { @@ -27320,7 +27520,7 @@ var _PaneToggle = __webpack_require__(428); var _PaneToggle2 = _interopRequireDefault(_PaneToggle); -__webpack_require__(1268); +__webpack_require__(922); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -27359,36 +27559,7 @@ class WelcomeBox extends _react.Component { { className: "welcomebox" }, _react2.default.createElement( "div", - { className: "alignlabel small-size-layout" }, - _react2.default.createElement( - "div", - { className: "shortcutFunction" }, - _react2.default.createElement( - "p", - { onClick: setActiveSearch.bind(null, "source") }, - _react2.default.createElement( - "span", - { className: "shortcutKey" }, - searchSourcesShortcut - ), - searchSourcesLabel - ), - _react2.default.createElement( - "p", - { onClick: setActiveSearch.bind(null, "project") }, - _react2.default.createElement( - "span", - { className: "shortcutKey" }, - searchProjectShortcut - ), - searchProjectLabel - ) - ), - this.renderToggleButton() - ), - _react2.default.createElement( - "div", - { className: "alignlabel normal-layout" }, + { className: "alignlabel" }, _react2.default.createElement( "div", { className: "shortcutKeys" }, @@ -27416,7 +27587,8 @@ class WelcomeBox extends _react.Component { { onClick: setActiveSearch.bind(null, "project") }, searchProjectLabel ) - ) + ), + this.renderToggleButton() ) ); } @@ -27479,7 +27651,7 @@ var _lodash = __webpack_require__(2); var _text = __webpack_require__(389); -__webpack_require__(1269); +__webpack_require__(923); var _PaneToggle = __webpack_require__(428); @@ -27829,7 +28001,7 @@ class SourceTabs extends _react.PureComponent { key: source.get("id"), onClick: () => selectSource(source.get("id")), onContextMenu: e => this.onTabContextMenu(e, source.get("id")), - title: (0, _source.getFileURL)(source.toJS()) + title: (0, _source.getFilename)(source.toJS()) }, sourceAnnotation, _react2.default.createElement( @@ -27950,7 +28122,7 @@ var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); -__webpack_require__(1270); +__webpack_require__(935); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -28237,7 +28409,7 @@ var _lodash = __webpack_require__(2); var _frame = __webpack_require__(1014); -__webpack_require__(1245); +__webpack_require__(872); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -28351,25 +28523,19 @@ var findScopeByName = exports.findScopeByName = (() => { }; })(); -exports.containsPosition = containsPosition; exports.findClosestScope = findClosestScope; -var _parser = __webpack_require__(1208); +var _parser = __webpack_require__(827); + +var _contains = __webpack_require__(1127); function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; } -function containsPosition(a, b) { - var startsBefore = a.start.line < b.line || a.start.line === b.line && a.start.column <= b.column; - var endsAfter = a.end.line > b.line || a.end.line === b.line && a.end.column >= b.column; - - return startsBefore && endsAfter; -} - function findClosestScope(functions, location) { return functions.reduce((found, currNode) => { - if (currNode.name === "anonymous" || !containsPosition(currNode.location, location)) { + if (currNode.name === "anonymous" || !(0, _contains.containsPosition)(currNode.location, location)) { return found; } @@ -28442,7 +28608,9 @@ var _redux = __webpack_require__(3); var _reactRedux = __webpack_require__(1189); -var _lodash = __webpack_require__(2); +var _debounce = __webpack_require__(651); + +var _debounce2 = _interopRequireDefault(_debounce); var _Popup = __webpack_require__(810); @@ -28465,7 +28633,7 @@ class Preview extends _react.PureComponent { var self = this; self.onScroll = this.onScroll.bind(this); - self.onMouseOver = (0, _lodash.debounce)(this.onMouseOver, 40); + self.onMouseOver = (0, _debounce2.default)(this.onMouseOver, 40); } componentDidMount() { @@ -28589,7 +28757,7 @@ var _PreviewFunction2 = _interopRequireDefault(_PreviewFunction); var _editor = __webpack_require__(257); -__webpack_require__(1254); +__webpack_require__(881); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -28598,12 +28766,6 @@ var Rep = _devtoolsReps2.default.REPS.Rep, ObjectInspectorUtils = _devtoolsReps2.default.ObjectInspectorUtils; var ObjectInspector = _devtoolsReps2.default.ObjectInspector; var getChildren = ObjectInspectorUtils.getChildren; - - -function isReactComponent(roots) { - return roots.some(root => root.name === "_reactInternalInstance"); -} - class Popup extends _react.Component { componentDidMount() { @@ -28664,23 +28826,10 @@ class Popup extends _react.Component { } renderObjectPreview(expression, root) { - var loadedObjects = this.props.loadedObjects; - - var getObjectProperties = id => loadedObjects[id]; - var roots = this.getChildren(root, getObjectProperties); - - if (!roots) { - return null; - } - - if (isReactComponent(roots)) { - roots = roots.filter(r => ["state", "props"].includes(r.name)); - } - return _react2.default.createElement( "div", { className: "preview-popup" }, - this.renderObjectInspector(roots) + this.renderObjectInspector(root) ); } @@ -28698,13 +28847,19 @@ class Popup extends _react.Component { ); } - renderObjectInspector(roots) { + renderObjectInspector(root) { var _props2 = this.props, loadObjectProperties = _props2.loadObjectProperties, loadedObjects = _props2.loadedObjects, openLink = _props2.openLink; + var getObjectProperties = id => loadedObjects[id]; + var roots = this.getChildren(root, getObjectProperties); + + if (!roots) { + return null; + } return _react2.default.createElement(ObjectInspector, { roots: roots, @@ -28775,7 +28930,7 @@ class Popup extends _react.Component { } getPreviewType(value) { - if (typeof value == "number" || typeof value == "boolean" || typeof value == "string" && value.length < 10 || typeof value == "number" && value.toString().length < 10 || value.type == "null" || value.type == "undefined" || value.class === "Function") { + if (typeof value == "number" || typeof value == "boolean" || value.type == "null" || value.type == "undefined" || value.class === "Function") { return "tooltip"; } @@ -28789,6 +28944,7 @@ class Popup extends _react.Component { value = _props3.value, expression = _props3.expression; + var type = this.getPreviewType(value); return _react2.default.createElement( @@ -28821,7 +28977,42 @@ exports.default = (0, _reactRedux.connect)(state => ({ /* 824 */, /* 825 */, /* 826 */, -/* 827 */, +/* 827 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.hasSyntaxError = exports.clearSources = exports.setSource = exports.hasSource = exports.getEmptyLines = exports.getNextStep = exports.clearASTs = exports.clearScopes = exports.clearSymbols = exports.getOutOfScopeLocations = exports.getVariablesInScope = exports.getScopes = exports.getSymbols = exports.getClosestExpression = exports.stopParserWorker = exports.startParserWorker = undefined; + +var _devtoolsUtils = __webpack_require__(900); + +var WorkerDispatcher = _devtoolsUtils.workerUtils.WorkerDispatcher; + + +var dispatcher = new WorkerDispatcher(); +var startParserWorker = exports.startParserWorker = dispatcher.start.bind(dispatcher); +var stopParserWorker = exports.stopParserWorker = dispatcher.stop.bind(dispatcher); + +var getClosestExpression = exports.getClosestExpression = dispatcher.task("getClosestExpression"); +var getSymbols = exports.getSymbols = dispatcher.task("getSymbols"); +var getScopes = exports.getScopes = dispatcher.task("getScopes"); +var getVariablesInScope = exports.getVariablesInScope = dispatcher.task("getVariablesInScope"); +var getOutOfScopeLocations = exports.getOutOfScopeLocations = dispatcher.task("getOutOfScopeLocations"); +var clearSymbols = exports.clearSymbols = dispatcher.task("clearSymbols"); +var clearScopes = exports.clearScopes = dispatcher.task("clearScopes"); +var clearASTs = exports.clearASTs = dispatcher.task("clearASTs"); +var getNextStep = exports.getNextStep = dispatcher.task("getNextStep"); +var getEmptyLines = exports.getEmptyLines = dispatcher.task("getEmptyLines"); +var hasSource = exports.hasSource = dispatcher.task("hasSource"); +var setSource = exports.setSource = dispatcher.task("setSource"); +var clearSources = exports.clearSources = dispatcher.task("clearSources"); +var hasSyntaxError = exports.hasSyntaxError = dispatcher.task("hasSyntaxError"); + +/***/ }), /* 828 */ /***/ (function(module, exports, __webpack_require__) { @@ -28985,44 +29176,204 @@ module.exports = { /* 847 */, /* 848 */, /* 849 */, -/* 850 */, -/* 851 */, -/* 852 */, -/* 853 */, -/* 854 */, +/* 850 */ +/***/ (function(module, exports) { + +// removed by extract-text-webpack-plugin + +/***/ }), +/* 851 */ +/***/ (function(module, exports) { + +// removed by extract-text-webpack-plugin + +/***/ }), +/* 852 */ +/***/ (function(module, exports) { + +// removed by extract-text-webpack-plugin + +/***/ }), +/* 853 */ +/***/ (function(module, exports) { + +// removed by extract-text-webpack-plugin + +/***/ }), +/* 854 */ +/***/ (function(module, exports) { + +// removed by extract-text-webpack-plugin + +/***/ }), /* 855 */ /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAF4AAABqCAMAAAAC5xbnAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAFZaVRYdFhNTDpjb20uYWRvYmUueG1wAAAAAAA8eDp4bXBtZXRhIHhtbG5zOng9ImFkb2JlOm5zOm1ldGEvIiB4OnhtcHRrPSJYTVAgQ29yZSA1LjQuMCI+CiAgIDxyZGY6UkRGIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyI+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOnRpZmY9Imh0dHA6Ly9ucy5hZG9iZS5jb20vdGlmZi8xLjAvIj4KICAgICAgICAgPHRpZmY6T3JpZW50YXRpb24+MTwvdGlmZjpPcmllbnRhdGlvbj4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgIDwvcmRmOlJERj4KPC94OnhtcG1ldGE+CkzCJ1kAAAMAUExURUxpcf/fQOF4Wf6qob2GSbyGTP61q++hVlpCNO+ATLuESaZzPYdWLZ1uN/KOQywvJ/OGDfeTGWRSMlpFNvqrQ/yNkPipLfeTGviRGyobJAYCC5BgL/y2MKJrRg0gKH5ULfSTIWhnYyIeJv5/g7K1tfiSGviWIIZgPP+jn6KnqJxqNvmWH/qdTJNkM/6GjPmdKX5JIKiIafeVHTcuLK9uHvTn0/iUH5NiKQUbM/eTH0ExL/6hmv/TStTCqvidK/6Oi/uTkOnZv/mgNLaHbZppFu6ooPeMGYJVJOzbu5pqOap2RY+WnZaOgv+cmahkY/LjzvaEE+vew/2blzs+Ov6enQohIsVvb/+QkP6Bg4+YntB4de7Ru7yfg6KEaf+movj07s7Husx9atqYPJVKKLqESf/47v22GuJOM/3LLf/////ZY//37fyzGP3y4v2rFv3JLP3z5fuiEt9HM/3CKAAAAN1BL//+9f7NLtk7KP726NY0ILB4P/7XYvukH95HLf/88v65Gvy6J/7IKPPizLZ7QPqPEPru3N1AJ7+ITP+vprqAQ+p5IPiZGbV/Rfz8/PyzJv+lmP7VOfitIvqzT/zozeTMtf/RLvycCcSKTP29Hv/ocf/Btv3LOOdpHQQaI/7RY+JcJaltNP66r/3AM6OEMPCMH+nq6/Lz9JpiLzk3M/nYxE40H7WTMcgvHk9AMsLEwyQsL/u8ANrEqurWwJp2Jtrc3WRNR//76fzPsmJHI+FZHvfo1+WiHf3BV/p4dHVdMwABKfDALbV6Kt9PJ91+YHY/L6OVhJksJyIdGcUjB4VrMLd9OMqiL7EqIEJAP/3LXtu5maAFBP7OQ/yWj5GXl7w7K8GLHH1RLNyuLXklJ83Q0WYzLs2THIJJC/+PeXp4cIoABOe4LTUlJ//hbMWXYISKivqqA8udeemXhXtaHOiHc9YLAM1AKI+Ec7ideFVgYNs0BrgSAJh3YcRwII1ZGMCsj2QCAteBEXqDgviWNfW4esd1S8e4ofbDnNVeSrxWUew/xBkAAABkdFJOUwD+EP7//v4CAwX8/mb9HhH/MP3+/TT9TdYm/oP90bA4bPtYefztff7J+buL991SyUn+Y9v62T+cfp3S9P5co9TrkLj++vmqnHCp90X+nf3EvKx27ZH14bSWoqznwX6h/sly7fPC0KykAAAQBUlEQVRo3tyYe0xTWR7Hb+nwKKs4IK9UnAED+CIiLMvE9ZH1Oc64Pnc0O7O7/0nDo8/0BtKUptQ+VgzSUqCVR0oKXWhpAx0oQsOrGDWkQ8AVFggBFBWVSZTERxzHcXZ/59wWWakOGdl/9isgve39nO/9nd/5/c6BIP6/Fcj4X4EDA+Eb/4+00nTkPJAICcW/en6sJB2FJTQmJgp+i00lVtQ/wLYmJ0bFRpfQEnYk7tPx0vGzrNyEhtbR1BKuurpEreaqS0qi4SGIFZpmwIRG19FiWGxZdYlMxpJVVxcpD6UTKxIhYDASi7iyEhmFxz8lXIHyUOgKzDDQ05PrhDKMV9ct4LkCQULsB/Ph9tTIEhpNpi6pk7FldTRZhQfPZXMlWz+QD95jY2ggoZomZHO16jqtlqsVYjyL9cF8BhGlRvQSobYuMjy8lFJ4JODZLDbwUz8EzyBCIhE8kyeMLO0eqqnJR6qp6Q4XAB7xE0KAH8hgMH5d4PdA3Et4vDx1aU12dr5H2fmlAqADnsXdQfzq9QWrKQbRMzMBn79I2d0YD3x2AqSn3+5TET5X4/tGDoIH3lqC6bw82X/h73rwMIAkkTj8l4Ba+qkl3hjvK334OiOZRuN58DWL8JVDXvcsffJJToAmoDZg2+IigStSYOg7Fx5c/XTd51siaTqgv42/Wzkk8eDVyiRR7TCdHlC1aQFFtYOQ2H3h4e9I3EAi6JurPVevqkuw+UweK3wBn323ksKzIfQS/UvNMF2D8H7YPlVJ/aL2JHXDHaVRvgoffOLP06Akdh4Puxe+wQO8srJGgtKexRYIJMokOoVn4BRFt4cmJpcO1UCCZQ/t8Z0yERrNTo1m+j4PWT8nRPhsr3WEj2QVQFYK9Hrlxy81dE1hQNVRz2yGpO4LR8bxx2uSQnzYZxDbAgI0GA8SgioQ3sOuvAt4rqRIiVUE/MKAgMJtuKVF7YCgLCyR7PzuWJ/4CHpt4cOHSXqJRKvVqtVqbThatDVDQ90gKAuIXQRvqiH4SRpqZqmg5NekxN3btWvXTdCu/Jp9PiYXSvymqoOXX9TdrNMWUZJERkokEgEWlLaYOpCMfV9f9PTL/RvXHoS8REEZGtq1yzbY1NQ3PnMOKfNmeKjv6NQetL6IjLlJo1XfrPaKl5kH0unOfYt0X69/+Y9nrvl5O/PBV4zkGLBbzTvXZxkYcJtclnH4JEQ2JtF3UztaldJvvfbiPgJVfEsJHMeAIsNLf/zx9euOxk5V24h98PJpw3oiNaY6D+zydLawTN2AxdZks5n6YARhtJ+P1A8k/DZV7Tcw48obGzs6Hr7uQLqRlvb06VPz1HV+hrQ4Kwu+srIaNpPMy2dCiER1Jg+nWa9jfMbkmAmzNbl6+/ryzhVF+VpZDOAXriVnGwBRb59ApKwJst8sNjrJWQxui6tHIzSTd85AQQstEiK+LtPhOu0IGze5HW6bZSDMMS7Y4TM6ML1Hn5A/FAOimYzH+M3kmOKiwsycBy51FeN/j3N7nwxqx8yArs80MGC3rbWFjdvcpqbT9iLcEnzuP1aRcQ0Y34x4DXGk+YJCYbSSE+hlGzmCxownNxBowcZKhJk6k3t8QKfrC3OZTO4ZGMI9OaoVpPreETGINX9itgG+fnMDZddqVIjF4jEUHfg324zcz5J/I4JQX0tg5fF6bb0mGzzBTN9a+1q3ze4arWBxT7yrrh1+To7gOCPVz5PXxK9eKRTmfngar9qYU+sDcZHcIxGOh7mbIGdMjj7duLt3IOzAZBcLdxyfdc3vd3IrM76+obi4oaF+4hZ559nVnp6eV0Yr83IzXIXcaWi7Rf5GvB1uh6ZfVDBqt/eGmUx2l6lvJk83bjA4cN1L9I3fm6V60M+c/2F29lbcIEnap4wYL3522kAOxs2OjIzMzpNjwZe2UGaiuXOuXnvvQNO422RymYQFXQfmtAXQ76MZS6MDdUeVm9N6z0lSsjqnzGKx8WcjTO6U9Y7nKukU+5//8lM8uVslcw63axwnfa/bNTnZVUE1zKL0JfahoRwvzskQNd54nPLkScqTKbPRKEYTi2Q0ms0bx65Zr21crfjobPD5dajUQ+pztc8cWsuAyW1yTjpHnaOjk97txNv2YV6l0pycDKmqDCRvfZCWRqEVlIzmMeuY+IK/v//Z4Evr1xBBcH8yt0DL7rIarKNOg8uRZp1zjVI9Lfrt1EfzCuYz4Isjb5XDCC33FIoLFxUKsdG82jzmtPYbmAeuXElL+84/GEUnCKc+G5rM5NykY+7ZXJfT5ewqADirgpuwFH84F7FBIlX54+vPf2q5sd/8bAo0t9pJMg12i+HxjfLW8hv3rpz1P7sKRyckAbXIgoKCtEmHY9RlmKyAVyzY6u55Kzhe86AcPoff+Ueyv99iSXn8+Dkg5U9Ii2WQvCUv44hEfFXLd8GX1lEN+pAAB4PFKhh1OA84RyvYbDgIRCf6LTG/my+l8Bl8DkfEeURa7OTjMg6H097efp0ctNj7W8rk8JKTkVsefOkLXKOIKKV3e1XQNdplvcLVKxN2RDF8TOze3IyMBbyqvdViHyQfcdo5ZRw+5zoJ5h/J5Sp4iyPKyG25soXA0fGL1gu4XgmevlCeiA0hfB6Sjhd78SLkUQSODU1ywKva2x/+s8lwx2Oen5Mj7aTco9RXCjzSK5XRW0MXNj5L8ibXExsUfMC3kBbDvzra28vK2jume3puPyrzms+Rqu595jn6pn+sx2wIyqEoP7zTDPRdbhbwlP3Wy8x/90x3lEHv0tALNT3lco95jF+HowvxOaHHex8qKEGMd+0wg46/wUP0+Sr5rdtQb6Y1AYWwqYFtTaPXPOA7L26HvMeFJFaJgpJO/Y3gPdvvk960R+EBfNlPP08P02sDKNFr5Z0eOuAbD6zB+CAi6JOxNE9Q3n8u2d0ufWMfwqNqHB4upESn0wsbVRwvPUfa8jllPYjYMGjYQPzyHwQWLauF8Hc2VtUiVXU0NnZyvN7BPH//dk9FXPPbwU+I5ZyGFq8rD58v4nNUWBw+n5pVCp/xV5w3EQxiQxNzAzULv6y9uYv5OD35lHDKiLxv5PIjUKhDdh6N+AP9m2WfCoNOSqUZix8AY7H4b+Bgfu8RtBMJKaw9M4wOEYHLPBYSezszUMl/8wQibF60cA33g+b45t2QNat2Hjw2XPjVMo/p8KEjX8fL+ainLBrhzVBI0lyRfGKieGL9Z1+sN35/7Bi96uDy3EPqfB3fVh+f0sqBEGHYIix+JZVKOY0P4toaiidSLp0//5HxzrHhnaeWeTw/srkNth8jt//+fXnnfzq1vpC2rjAe9F4bc80MhhZCpqIWnDJLhw8V+2BhD4Wtb13pnvZ0axzahN6QeU0w/ol6r0muFldbRSK2I7F/Fh2KsqogGmOUzGGpobMOdFKmqN10o66Ubuw79yaptrGc5PeQnHvP+X7fd77z7zvnnpq6iApJRx1CTcv9f2d2t/cLPG0jswSsiQ/XN3uSk3DOqI7JPj/paWvzjIzOm7Z3P371o62lRuQET4H/r47bOhdffXtLtWtm5tVP2zyzdppX/tCb+dUXSXieKYAoqd9TsMZYGZ/qlsoxs7nY2Tk8PGwDDP31n297W/W70+0yWZm1l/39BTQhPOwt1uA5Ri7LvjAoGc/omL4T39W6tre3d3e5efXwuK3lwtqu2WRyfNiud/oYHbs/+PXgJ/a7vXO5YriAwa4pCs4+7fcsgfE6k8NYXeVgdDrGxDFrS5XfjKh3dAx6bSjXu0w63d6fnpFZYaA3S4Y1YGFAFXYR5NLI4IMdE/C4DQaRRsT+YOXLRyjB9HVUdOvdVkitLXlOrs7NYU4HctlpC6Gwf1qQs2ey6hhfbYXB2ceI5IzOO7oakBSZ3GD+tT7Q61WfLPh5DtN4sF5LkDTN5yxzyHhXA+yPfEzYet3CfjhhcrVXG/UOoGcWLubMzWkw5zK5TAuBEU892OGsopHVRuSDMEL+SMpXa6joRvViTP5L61m4M6XkHDojYEWOtQKJ0c2aIgj5GcbEILBu2Kx1IPN1oXuXcI1Hc0Yh35W/bDazJisHLQj0LkcEf/v7wrA6GlAWC6rZALbxYsdUCgMhl8vhdjtrgcPQADCKaJx4cqK9o70DQcyqdTscrr6d4vR4+LMv3u5oB0bxNKdC3OoDIHXzl8mpmxWRJ/Gox9jQ3l57uyQu89VTYXHEAGg0RqyfnKo2iK8MYo6ovaJxIh7zZVk/3ZTEgbYbUF9eHglNn/zWaKg4BIOxobzqbi5+19FkgPFQ7W4IzlEw+gZ695OJ+vLublQRBHSShILu+l9xhxV0nZLvq43l+mvOZpUKGs7lGovCNeb/B96qmpudTlCmr6qSIu76jgwN7qSQXjqhd6ugQ/isVqm3M1HsrOzAW6vP5xvrg77lULmdSEt5/XQJLn2uHzEj0uhgZaxh7KyEoqpAL8tyvjGXQ9Wsn8D0jlxWEmCjzCKvVAWOY1nWuxIyA9iDgGduzIHrHVnWAhfl5oAUxL3zYeythLiDxPCDikDKj9V3IMwt9cJ0gJhZs9e7EAgs7y/7/aMS1OuP9h6FsbfnNYerwsHEUIJHn14sSQHz8opanZH/4vXroaFOCUOro6vPL8wCnj9fzVlZDgQWxNIsF8rC7ThexA3Uk/lKCrbhGzcgPKgJY3wcYu+WlvEbNlvnH3fzJzPUoANUcKFSvJYF55gXlgcmlZYmu91O03Rww3al7ko4yqkTgx74rxzegGzYpivzkYqFUCnWvHAMmjZwL59qEqkRyCA/BOGmqKGyBoWYEPDYFsmglA06LMpJ9co9DZ7zc9cHlE0RbpHfPv1syHZVCs9QhDY+vMhP28loAYIghPySdMwpp5iyC/RBkGTTNL+BNvw223Dn0ItnQSAnD5YQD40wh22acEhUUmAPTgftBI/+p4M0+VYJBX8GM/aG1YTiFfS7CkjkZ2gRkiTfzRXSsEOF9Myud+nf6IgBBU9l4y/mWuII+qMArpfjrycxvfM+4PtG7ACF8dEr+KI41tpU2en4zCcFbRwrOXj/DB2rDRUIsYzPlMfzZRU6TxFBvsVLkoQEkjysRMErs+MxXgw0lQIflSf5ri6eoAVBsAgCbKR4eIoqIGkqLT52VNPzSguaSwiQJ2gqs/CMVpsmQQvb2M8EqJ1YF1qgzsf9TRu5x0JRYKygIJTa7Lemq3RNWhGtgMpAGSqeXnNg5rEIlBJAFWVLNZKnSpC4NEWQd5uiBEtaAhcuYIuVOYPQZQdx+eFNn1wuT5WlzWxtbm5tbWUmYDzQHz93J6U1+fHZx3mxB8flnp6UO9eTW88dT+Bzf6osr+d+T0pKMsgnxTzeb0XZ6NguLwHnpMpOtYJ4a2tya1ls+rOIHZ2s5SV22SXv8kdlZWWXvzwe+/5F3rnrwH39cVkizhFFUpOSUo/O/uBUHuBUkiwxRD+tH3V/5HC5hO5zvUcWhsCx9991OIT/AVwXLXUhLDYVAAAAAElFTkSuQmCC" /***/ }), -/* 856 */, -/* 857 */, -/* 858 */, -/* 859 */, -/* 860 */, -/* 861 */, -/* 862 */, -/* 863 */, -/* 864 */, -/* 865 */, -/* 866 */, -/* 867 */, -/* 868 */, -/* 869 */, -/* 870 */, -/* 871 */, -/* 872 */, -/* 873 */, -/* 874 */, -/* 875 */, -/* 876 */, -/* 877 */, -/* 878 */, -/* 879 */, -/* 880 */, -/* 881 */, -/* 882 */, +/* 856 */ +/***/ (function(module, exports) { + +// removed by extract-text-webpack-plugin + +/***/ }), +/* 857 */ +/***/ (function(module, exports) { + +// removed by extract-text-webpack-plugin + +/***/ }), +/* 858 */ +/***/ (function(module, exports) { + +// removed by extract-text-webpack-plugin + +/***/ }), +/* 859 */ +/***/ (function(module, exports) { + +// removed by extract-text-webpack-plugin + +/***/ }), +/* 860 */ +/***/ (function(module, exports) { + +// removed by extract-text-webpack-plugin + +/***/ }), +/* 861 */ +/***/ (function(module, exports) { + +// removed by extract-text-webpack-plugin + +/***/ }), +/* 862 */ +/***/ (function(module, exports) { + +// removed by extract-text-webpack-plugin + +/***/ }), +/* 863 */ +/***/ (function(module, exports) { + +// removed by extract-text-webpack-plugin + +/***/ }), +/* 864 */ +/***/ (function(module, exports) { + +// removed by extract-text-webpack-plugin + +/***/ }), +/* 865 */ +/***/ (function(module, exports) { + +// removed by extract-text-webpack-plugin + +/***/ }), +/* 866 */ +/***/ (function(module, exports) { + +// removed by extract-text-webpack-plugin + +/***/ }), +/* 867 */ +/***/ (function(module, exports) { + +// removed by extract-text-webpack-plugin + +/***/ }), +/* 868 */ +/***/ (function(module, exports) { + +// removed by extract-text-webpack-plugin + +/***/ }), +/* 869 */ +/***/ (function(module, exports) { + +// removed by extract-text-webpack-plugin + +/***/ }), +/* 870 */ +/***/ (function(module, exports) { + +// removed by extract-text-webpack-plugin + +/***/ }), +/* 871 */ +/***/ (function(module, exports) { + +// removed by extract-text-webpack-plugin + +/***/ }), +/* 872 */ +/***/ (function(module, exports) { + +// removed by extract-text-webpack-plugin + +/***/ }), +/* 873 */ +/***/ (function(module, exports) { + +// removed by extract-text-webpack-plugin + +/***/ }), +/* 874 */ +/***/ (function(module, exports) { + +// removed by extract-text-webpack-plugin + +/***/ }), +/* 875 */ +/***/ (function(module, exports) { + +// removed by extract-text-webpack-plugin + +/***/ }), +/* 876 */ +/***/ (function(module, exports) { + +// removed by extract-text-webpack-plugin + +/***/ }), +/* 877 */ +/***/ (function(module, exports) { + +// removed by extract-text-webpack-plugin + +/***/ }), +/* 878 */ +/***/ (function(module, exports) { + +// removed by extract-text-webpack-plugin + +/***/ }), +/* 879 */ +/***/ (function(module, exports) { + +// removed by extract-text-webpack-plugin + +/***/ }), +/* 880 */ +/***/ (function(module, exports) { + +// removed by extract-text-webpack-plugin + +/***/ }), +/* 881 */ +/***/ (function(module, exports) { + +// removed by extract-text-webpack-plugin + +/***/ }), +/* 882 */ +/***/ (function(module, exports) { + +// removed by extract-text-webpack-plugin + +/***/ }), /* 883 */ /***/ (function(module, exports, __webpack_require__) { @@ -30964,11 +31315,11 @@ var _devtoolsLaunchpad = __webpack_require__(131); var _devtoolsSourceMap = __webpack_require__(898); -var _search = __webpack_require__(1210); +var _search = __webpack_require__(1115); -var _prettyPrint = __webpack_require__(1213); +var _prettyPrint = __webpack_require__(903); -var _parser = __webpack_require__(1208); +var _parser = __webpack_require__(827); var _createStore = __webpack_require__(189); @@ -31276,7 +31627,59 @@ module.exports = { }; /***/ }), -/* 903 */, +/* 903 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.prettyPrint = exports.stopPrettyPrintWorker = exports.startPrettyPrintWorker = undefined; + +var prettyPrint = exports.prettyPrint = (() => { + var _ref = _asyncToGenerator(function* (_ref2) { + var source = _ref2.source, + url = _ref2.url; + + var indent = 2; + + (0, _assert2.default)((0, _source.isJavaScript)(source), "Can't prettify non-javascript files."); + + return yield _prettyPrint({ + url, + indent, + source: source.text + }); + }); + + return function prettyPrint(_x) { + return _ref.apply(this, arguments); + }; +})(); + +var _devtoolsUtils = __webpack_require__(900); + +var _source = __webpack_require__(233); + +var _assert = __webpack_require__(223); + +var _assert2 = _interopRequireDefault(_assert); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; } + +var WorkerDispatcher = _devtoolsUtils.workerUtils.WorkerDispatcher; + + +var dispatcher = new WorkerDispatcher(); +var startPrettyPrintWorker = exports.startPrettyPrintWorker = dispatcher.start.bind(dispatcher); +var stopPrettyPrintWorker = exports.stopPrettyPrintWorker = dispatcher.stop.bind(dispatcher); +var _prettyPrint = dispatcher.task("prettyPrint"); + +/***/ }), /* 904 */ /***/ (function(module, exports, __webpack_require__) { @@ -31334,16 +31737,11 @@ function updatePreview(target, editor, _ref) { } var invalidToken = tokenText === "" || tokenText.match(/[(){}\|&%,.;=<>\+-/\*\s]/); - var invalidTarget = target.parentElement && !target.parentElement.closest(".CodeMirror-line") || cursorPos.top == 0; - var isUpdating = preview && preview.updating; - var inScope = linesInScope && linesInScope.includes(location.line); - var invaildType = target.className === "cm-string" || target.className === "cm-number" || target.className === "cm-atom"; - - if (invalidTarget || !inScope || isUpdating || invalidToken || invaildType) { + if (invalidTarget || !inScope || isUpdating || invalidToken) { return; } @@ -31351,11 +31749,36 @@ function updatePreview(target, editor, _ref) { } /***/ }), -/* 905 */, -/* 906 */, -/* 907 */, -/* 908 */, -/* 909 */, +/* 905 */ +/***/ (function(module, exports) { + +// removed by extract-text-webpack-plugin + +/***/ }), +/* 906 */ +/***/ (function(module, exports) { + +// removed by extract-text-webpack-plugin + +/***/ }), +/* 907 */ +/***/ (function(module, exports) { + +// removed by extract-text-webpack-plugin + +/***/ }), +/* 908 */ +/***/ (function(module, exports) { + +// removed by extract-text-webpack-plugin + +/***/ }), +/* 909 */ +/***/ (function(module, exports) { + +// removed by extract-text-webpack-plugin + +/***/ }), /* 910 */ /***/ (function(module, exports, __webpack_require__) { @@ -31380,7 +31803,7 @@ var dom = React.DOM, PropTypes = React.PropTypes; -__webpack_require__(1232); +__webpack_require__(861); /** * This component represents a Splitter. The splitter supports vertical @@ -31683,9 +32106,24 @@ var Draggable = React.createClass({ module.exports = Draggable; /***/ }), -/* 913 */, -/* 914 */, -/* 915 */, +/* 913 */ +/***/ (function(module, exports) { + +// removed by extract-text-webpack-plugin + +/***/ }), +/* 914 */ +/***/ (function(module, exports) { + +// removed by extract-text-webpack-plugin + +/***/ }), +/* 915 */ +/***/ (function(module, exports) { + +// removed by extract-text-webpack-plugin + +/***/ }), /* 916 */ /***/ (function(module, exports, __webpack_require__) { @@ -32225,8 +32663,18 @@ module.exports = Draggable; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(793)(module), __webpack_require__(792))) /***/ }), -/* 917 */, -/* 918 */, +/* 917 */ +/***/ (function(module, exports) { + +// removed by extract-text-webpack-plugin + +/***/ }), +/* 918 */ +/***/ (function(module, exports) { + +// removed by extract-text-webpack-plugin + +/***/ }), /* 919 */ /***/ (function(module, exports) { @@ -32239,9 +32687,24 @@ module.exports = "" /***/ }), -/* 921 */, -/* 922 */, -/* 923 */, +/* 921 */ +/***/ (function(module, exports) { + +// removed by extract-text-webpack-plugin + +/***/ }), +/* 922 */ +/***/ (function(module, exports) { + +// removed by extract-text-webpack-plugin + +/***/ }), +/* 923 */ +/***/ (function(module, exports) { + +// removed by extract-text-webpack-plugin + +/***/ }), /* 924 */ /***/ (function(module, exports, __webpack_require__) { @@ -32310,7 +32773,7 @@ module.exports = { * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -__webpack_require__(1250); +__webpack_require__(877); // Load all existing rep templates var Undefined = __webpack_require__(929); @@ -33395,7 +33858,12 @@ module.exports = { }; /***/ }), -/* 935 */, +/* 935 */ +/***/ (function(module, exports) { + +// removed by extract-text-webpack-plugin + +/***/ }), /* 936 */ /***/ (function(module, exports, __webpack_require__) { @@ -35078,7 +35546,12 @@ module.exports = { }; /***/ }), -/* 952 */, +/* 952 */ +/***/ (function(module, exports) { + +// removed by extract-text-webpack-plugin + +/***/ }), /* 953 */ /***/ (function(module, exports, __webpack_require__) { @@ -35928,11 +36401,16 @@ module.exports = { /* 960 */ /***/ (function(module, exports) { -module.exports = "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not distributed with this\n# file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n# LOCALIZATION NOTE These strings are used inside the Debugger\n# which is available from the Web Developer sub-menu -> 'Debugger'.\n# The correct localization of this file might be to keep it in\n# English, or another language commonly spoken among web developers.\n# You want to make that choice consistent across the developer tools.\n# A good criteria is the language in which you'd find the best\n# documentation on web development on the web.\n\n# LOCALIZATION NOTE (collapsePanes): This is the tooltip for the button\n# that collapses the left and right panes in the debugger UI.\ncollapsePanes=Collapse panes\n\n# LOCALIZATION NOTE (copySource): This is the text that appears in the\n# context menu to copy the selected source of file open.\ncopySource=Copy\ncopySource.accesskey=y\n\n# LOCALIZATION NOTE (copySourceUri2): This is the text that appears in the\n# context menu to copy the source URI of file open.\ncopySourceUri2=Copy source URI\ncopySourceUri2.accesskey=u\n\n# LOCALIZATION NOTE (copyFunction): This is the text that appears in the\n# context menu to copy the function the user selected\ncopyFunction.label=Copy function\ncopyFunction.accesskey=F\n\n# LOCALIZATION NOTE (copyStackTrace): This is the text that appears in the\n# context menu to copy the stack trace methods, file names and row number.\ncopyStackTrace=Copy stack trace\ncopyStackTrace.accesskey=c\n\n# LOCALIZATION NOTE (expandPanes): This is the tooltip for the button\n# that expands the left and right panes in the debugger UI.\nexpandPanes=Expand panes\n\n# LOCALIZATION NOTE (pauseButtonTooltip): The tooltip that is displayed for the pause\n# button when the debugger is in a running state.\npauseButtonTooltip=Pause %S\n\n# LOCALIZATION NOTE (pausePendingButtonTooltip): The tooltip that is displayed for\n# the pause button after it's been clicked but before the next JavaScript to run.\npausePendingButtonTooltip=Waiting for next execution\n\n# LOCALIZATION NOTE (resumeButtonTooltip): The label that is displayed on the pause\n# button when the debugger is in a paused state.\nresumeButtonTooltip=Resume %S\n\n# LOCALIZATION NOTE (stepOverTooltip): The label that is displayed on the\n# button that steps over a function call.\nstepOverTooltip=Step over %S\n\n# LOCALIZATION NOTE (stepInTooltip): The label that is displayed on the\n# button that steps into a function call.\nstepInTooltip=Step in %S\n\n# LOCALIZATION NOTE (stepOutTooltip): The label that is displayed on the\n# button that steps out of a function call.\nstepOutTooltip=Step out %S\n\n# LOCALIZATION NOTE (workersHeader): The text to display in the events\n# header.\nworkersHeader=Workers\n\n# LOCALIZATION NOTE (noWorkersText): The text to display in the workers list\n# when there are no workers.\nnoWorkersText=This page has no workers.\n\n# LOCALIZATION NOTE (noSourcesText): The text to display in the sources list\n# when there are no sources.\nnoSourcesText=This page has no sources.\n\n# LOCALIZATION NOTE (noEventListenersText): The text to display in the events tab\n# when there are no events.\nnoEventListenersText=No event listeners to display.\n\n# LOCALIZATION NOTE (eventListenersHeader): The text to display in the events\n# header.\neventListenersHeader=Event listeners\n\n# LOCALIZATION NOTE (noStackFramesText): The text to display in the call stack tab\n# when there are no stack frames.\nnoStackFramesText=No stack frames to display\n\n# LOCALIZATION NOTE (eventCheckboxTooltip): The tooltip text to display when\n# the user hovers over the checkbox used to toggle an event breakpoint.\neventCheckboxTooltip=Toggle breaking on this event\n\n# LOCALIZATION NOTE (eventOnSelector): The text to display in the events tab\n# for every event item, between the event type and event selector.\neventOnSelector=on\n\n# LOCALIZATION NOTE (eventInSource): The text to display in the events tab\n# for every event item, between the event selector and listener's owner source.\neventInSource=in\n\n# LOCALIZATION NOTE (eventNodes): The text to display in the events tab when\n# an event is listened on more than one target node.\neventNodes=%S nodes\n\n# LOCALIZATION NOTE (eventNative): The text to display in the events tab when\n# a listener is added from plugins, thus getting translated to native code.\neventNative=[native code]\n\n# LOCALIZATION NOTE (*Events): The text to display in the events tab for\n# each group of sub-level event entries.\nanimationEvents=Animation\naudioEvents=Audio\nbatteryEvents=Battery\nclipboardEvents=Clipboard\ncompositionEvents=Composition\ndeviceEvents=Device\ndisplayEvents=Display\ndragAndDropEvents=Drag and Drop\ngamepadEvents=Gamepad\nindexedDBEvents=IndexedDB\ninteractionEvents=Interaction\nkeyboardEvents=Keyboard\nmediaEvents=HTML5 Media\nmouseEvents=Mouse\nmutationEvents=Mutation\nnavigationEvents=Navigation\npointerLockEvents=Pointer Lock\nsensorEvents=Sensor\nstorageEvents=Storage\ntimeEvents=Time\ntouchEvents=Touch\notherEvents=Other\n\n# LOCALIZATION NOTE (blackboxCheckboxTooltip2): The tooltip text to display when\n# the user hovers over the checkbox used to toggle blackboxing its associated\n# source.\nblackboxCheckboxTooltip2=Toggle blackboxing\n\n# LOCALIZATION NOTE (sources.search.key2): Key shortcut to open the search for\n# searching all the source files the debugger has seen.\nsources.search.key2=CmdOrCtrl+P\n\n# LOCALIZATION NOTE (sources.search.alt.key): A second key shortcut to open the\n# search for searching all the source files the debugger has seen.\nsources.search.alt.key=CmdOrCtrl+O\n\n# LOCALIZATION NOTE (projectTextSearch.key): A key shortcut to open the\n# full project text search for searching all the files the debugger has seen.\nprojectTextSearch.key=CmdOrCtrl+Shift+F\n\n# LOCALIZATION NOTE (functionSearch.key): A key shortcut to open the\n# modal for searching functions in a file.\nfunctionSearch.key=CmdOrCtrl+Shift+O\n\n# LOCALIZATION NOTE (toggleBreakpoint.key): A key shortcut to toggle\n# breakpoints.\ntoggleBreakpoint.key=CmdOrCtrl+B\n\n# LOCALIZATION NOTE (toggleCondPanel.key): A key shortcut to toggle\n# the conditional breakpoint panel.\ntoggleCondPanel.key=CmdOrCtrl+Shift+B\n\n# LOCALIZATION NOTE (stepOut.key): A key shortcut to\n# step out.\nstepOut.key=Shift+F11\n\n# LOCALIZATION NOTE (shortcuts.header.editor): Sections header in\n# the shortcuts modal for keyboard shortcuts related to editing.\nshortcuts.header.editor=Editor\n\n# LOCALIZATION NOTE (shortcuts.header.stepping): Sections header in\n# the shortcuts modal for keyboard shortcuts related to stepping.\nshortcuts.header.stepping=Stepping\n\n# LOCALIZATION NOTE (shortcuts.header.search): Sections header in\n# the shortcuts modal for keyboard shortcuts related to search.\nshortcuts.header.search=Search\n\n# LOCALIZATION NOTE (projectTextSearch.placeholder): A placeholder shown\n# when searching across all of the files in a project.\nprojectTextSearch.placeholder=Find in files…\n\n# LOCALIZATION NOTE (projectTextSearch.noResults): The center pane Text Search\n# message when the query did not match any text of all files in a project.\nprojectTextSearch.noResults=No results found\n\n# LOCALIZATION NOTE (sources.noSourcesAvailable): Text shown when the debugger\n# does not have any sources.\nsources.noSourcesAvailable=This page has no sources\n\n# LOCALIZATION NOTE (sourceSearch.search.key2): Key shortcut to open the search\n# for searching within a the currently opened files in the editor\nsourceSearch.search.key2=CmdOrCtrl+F\n\n# LOCALIZATION NOTE (sourceSearch.search.placeholder): placeholder text in\n# the source search input bar\nsourceSearch.search.placeholder=Search in file…\n\n# LOCALIZATION NOTE (sourceSearch.search.again.key2): Key shortcut to highlight\n# the next occurrence of the last search triggered from a source search\nsourceSearch.search.again.key2=CmdOrCtrl+G\n\n# LOCALIZATION NOTE (sourceSearch.search.againPrev.key2): Key shortcut to highlight\n# the previous occurrence of the last search triggered from a source search\nsourceSearch.search.againPrev.key2=CmdOrCtrl+Shift+G\n\n# LOCALIZATION NOTE (sourceSearch.resultsSummary1): Shows a summary of\n# the number of matches for autocomplete\nsourceSearch.resultsSummary1=%d results\n\n# LOCALIZATION NOTE (noMatchingStringsText): The text to display in the\n# global search results when there are no matching strings after filtering.\nnoMatchingStringsText=No matches found\n\n# LOCALIZATION NOTE (emptySearchText): This is the text that appears in the\n# filter text box when it is empty and the scripts container is selected.\nemptySearchText=Search scripts (%S)\n\n# LOCALIZATION NOTE (emptyVariablesFilterText): This is the text that\n# appears in the filter text box for the variables view container.\nemptyVariablesFilterText=Filter variables\n\n# LOCALIZATION NOTE (emptyPropertiesFilterText): This is the text that\n# appears in the filter text box for the editor's variables view bubble.\nemptyPropertiesFilterText=Filter properties\n\n# LOCALIZATION NOTE (searchPanelFilter): This is the text that appears in the\n# filter panel popup for the filter scripts operation.\nsearchPanelFilter=Filter scripts (%S)\n\n# LOCALIZATION NOTE (searchPanelGlobal): This is the text that appears in the\n# filter panel popup for the global search operation.\nsearchPanelGlobal=Search in all files (%S)\n\n# LOCALIZATION NOTE (searchPanelFunction): This is the text that appears in the\n# filter panel popup for the function search operation.\nsearchPanelFunction=Search for function definition (%S)\n\n# LOCALIZATION NOTE (searchPanelToken): This is the text that appears in the\n# filter panel popup for the token search operation.\nsearchPanelToken=Find in this file (%S)\n\n# LOCALIZATION NOTE (searchPanelGoToLine): This is the text that appears in the\n# filter panel popup for the line search operation.\nsearchPanelGoToLine=Go to line (%S)\n\n# LOCALIZATION NOTE (searchPanelVariable): This is the text that appears in the\n# filter panel popup for the variables search operation.\nsearchPanelVariable=Filter variables (%S)\n\n# LOCALIZATION NOTE (breakpointMenuItem): The text for all the elements that\n# are displayed in the breakpoints menu item popup.\nbreakpointMenuItem.setConditional=Configure conditional breakpoint\nbreakpointMenuItem.enableSelf2.label=Enable\nbreakpointMenuItem.enableSelf2.accesskey=E\nbreakpointMenuItem.disableSelf2.label=Disable\nbreakpointMenuItem.disableSelf2.accesskey=D\nbreakpointMenuItem.deleteSelf2.label=Remove\nbreakpointMenuItem.deleteSelf2.accesskey=R\nbreakpointMenuItem.enableOthers2.label=Enable others\nbreakpointMenuItem.enableOthers2.accesskey=o\nbreakpointMenuItem.disableOthers2.label=Disable others\nbreakpointMenuItem.disableOthers2.accesskey=s\nbreakpointMenuItem.deleteOthers2.label=Remove others\nbreakpointMenuItem.deleteOthers2.accesskey=h\nbreakpointMenuItem.enableAll2.label=Enable all\nbreakpointMenuItem.enableAll2.accesskey=b\nbreakpointMenuItem.disableAll2.label=Disable all\nbreakpointMenuItem.disableAll2.accesskey=k\nbreakpointMenuItem.deleteAll2.label=Remove all\nbreakpointMenuItem.deleteAll2.accesskey=a\nbreakpointMenuItem.removeCondition2.label=Remove condition\nbreakpointMenuItem.removeCondition2.accesskey=c\nbreakpointMenuItem.addCondition2.label=Add condition\nbreakpointMenuItem.addCondition2.accesskey=A\nbreakpointMenuItem.editCondition2.label=Edit condition\nbreakpointMenuItem.editCondition2.accesskey=n\nbreakpointMenuItem.enableSelf=Enable breakpoint\nbreakpointMenuItem.enableSelf.accesskey=E\nbreakpointMenuItem.disableSelf=Disable breakpoint\nbreakpointMenuItem.disableSelf.accesskey=D\nbreakpointMenuItem.deleteSelf=Remove breakpoint\nbreakpointMenuItem.deleteSelf.accesskey=R\nbreakpointMenuItem.enableOthers=Enable others\nbreakpointMenuItem.enableOthers.accesskey=o\nbreakpointMenuItem.disableOthers=Disable others\nbreakpointMenuItem.disableOthers.accesskey=s\nbreakpointMenuItem.deleteOthers=Remove others\nbreakpointMenuItem.deleteOthers.accesskey=h\nbreakpointMenuItem.enableAll=Enable all breakpoints\nbreakpointMenuItem.enableAll.accesskey=b\nbreakpointMenuItem.disableAll=Disable all breakpoints\nbreakpointMenuItem.disableAll.accesskey=k\nbreakpointMenuItem.deleteAll=Remove all breakpoints\nbreakpointMenuItem.deleteAll.accesskey=a\nbreakpointMenuItem.removeCondition.label=Remove breakpoint condition\nbreakpointMenuItem.removeCondition.accesskey=c\nbreakpointMenuItem.editCondition.label=Edit breakpoint condition\nbreakpointMenuItem.editCondition.accesskey=n\n\n# LOCALIZATION NOTE (breakpoints.header): Breakpoints right sidebar pane header.\nbreakpoints.header=Breakpoints\n\n# LOCALIZATION NOTE (breakpoints.none): The text that appears when there are\n# no breakpoints present\nbreakpoints.none=No breakpoints\n\n# LOCALIZATION NOTE (breakpoints.enable): The text that may appear as a tooltip\n# when hovering over the 'disable breakpoints' switch button in right sidebar\nbreakpoints.enable=Enable breakpoints\n\n# LOCALIZATION NOTE (breakpoints.disable): The text that may appear as a tooltip\n# when hovering over the 'disable breakpoints' switch button in right sidebar\nbreakpoints.disable=Disable breakpoints\n\n# LOCALIZATION NOTE (breakpoints.removeBreakpointTooltip): The tooltip that is displayed\n# for remove breakpoint button in right sidebar\nbreakpoints.removeBreakpointTooltip=Remove breakpoint\n\n# LOCALIZATION NOTE (callStack.header): Call Stack right sidebar pane header.\ncallStack.header=Call stack\n\n# LOCALIZATION NOTE (callStack.notPaused): Call Stack right sidebar pane\n# message when not paused.\ncallStack.notPaused=Not paused\n\n# LOCALIZATION NOTE (callStack.collapse): Call Stack right sidebar pane\n# message to hide some of the frames that are shown.\ncallStack.collapse=Collapse rows\n\n# LOCALIZATION NOTE (callStack.expand): Call Stack right sidebar pane\n# message to show more of the frames.\ncallStack.expand=Expand rows\n\n# LOCALIZATION NOTE (editor.searchResults): Editor Search bar message\n# for the summarizing the selected search result. e.g. 5 of 10 results.\neditor.searchResults=%d of %d results\n\n# LOCALIZATION NOTE (sourceSearch.singleResult): Copy shown when there is one result.\neditor.singleResult=1 result\n\n# LOCALIZATION NOTE (editor.noResults): Editor Search bar message\n# for when no results found.\neditor.noResults=No results\n\n# LOCALIZATION NOTE (editor.searchResults.nextResult): Editor Search bar\n# tooltip for traversing to the Next Result\neditor.searchResults.nextResult=Next result\n\n# LOCALIZATION NOTE (editor.searchResults.prevResult): Editor Search bar\n# tooltip for traversing to the Previous Result\neditor.searchResults.prevResult=Previous result\n\n# LOCALIZATION NOTE (editor.searchTypeToggleTitle): Search bar title for\n# toggling search type buttons(function search, variable search)\neditor.searchTypeToggleTitle=Search for:\n\n# LOCALIZATION NOTE (editor.continueToHere.label): Editor gutter context\n# menu item for jumping to a new paused location\neditor.continueToHere.label=Continue to here\neditor.continueToHere.accesskey=H\n\n# LOCALIZATION NOTE (editor.addBreakpoint): Editor gutter context menu item\n# for adding a breakpoint on a line.\neditor.addBreakpoint=Add breakpoint\n\n# LOCALIZATION NOTE (editor.disableBreakpoint): Editor gutter context menu item\n# for disabling a breakpoint on a line.\neditor.disableBreakpoint=Disable breakpoint\n\n# LOCALIZATION NOTE (editor.enableBreakpoint): Editor gutter context menu item\n# for enabling a breakpoint on a line.\neditor.enableBreakpoint=Enable breakpoint\n\n# LOCALIZATION NOTE (editor.removeBreakpoint): Editor gutter context menu item\n# for removing a breakpoint on a line.\neditor.removeBreakpoint=Remove breakpoint\n\n# LOCALIZATION NOTE (editor.editBreakpoint): Editor gutter context menu item\n# for setting a breakpoint condition on a line.\neditor.editBreakpoint=Edit breakpoint\n\n# LOCALIZATION NOTE (editor.addConditionalBreakpoint): Editor gutter context\n# menu item for adding a breakpoint condition on a line.\neditor.addConditionalBreakpoint=Add conditional breakpoint\n\n# LOCALIZATION NOTE (editor.conditionalPanel.placeholder): Placeholder text for\n# input element inside ConditionalPanel component\neditor.conditionalPanel.placeholder=This breakpoint will pause when the expression is true\n\n# LOCALIZATION NOTE (editor.conditionalPanel.placeholder): Tooltip text for\n# close button inside ConditionalPanel component\neditor.conditionalPanel.close=Cancel edit breakpoint and close\n\n# LOCALIZATION NOTE (editor.jumpToMappedLocation1): Context menu item\n# for navigating to a source mapped location\neditor.jumpToMappedLocation1=Jump to %S location\n\n# LOCALIZATION NOTE (framework.disableGrouping): This is the text that appears in the\n# context menu to disable framework grouping.\nframework.disableGrouping=Disable framework grouping\nframework.disableGrouping.accesskey=u\n\n# LOCALIZATION NOTE (framework.enableGrouping): This is the text that appears in the\n# context menu to enable framework grouping.\nframework.enableGrouping=Enable framework grouping\nframework.enableGrouping.accesskey=u\n\n# LOCALIZATION NOTE (generated): Source Map term for a server source location\ngenerated=Generated\n\n# LOCALIZATION NOTE (original): Source Map term for a debugger UI source location\noriginal=original\n\n# LOCALIZATION NOTE (expressions.placeholder): Placeholder text for expression\n# input element\nexpressions.placeholder=Add watch expression\n\n# LOCALIZATION NOTE (sourceTabs.closeTab): Editor source tab context menu item\n# for closing the selected tab below the mouse.\nsourceTabs.closeTab=Close tab\nsourceTabs.closeTab.accesskey=c\n\n# LOCALIZATION NOTE (sourceTabs.closeOtherTabs): Editor source tab context menu item\n# for closing the other tabs.\nsourceTabs.closeOtherTabs=Close other tabs\nsourceTabs.closeOtherTabs.accesskey=o\n\n# LOCALIZATION NOTE (sourceTabs.closeTabsToEnd): Editor source tab context menu item\n# for closing the tabs to the end (the right for LTR languages) of the selected tab.\nsourceTabs.closeTabsToEnd=Close tabs to the right\nsourceTabs.closeTabsToEnd.accesskey=e\n\n# LOCALIZATION NOTE (sourceTabs.closeAllTabs): Editor source tab context menu item\n# for closing all tabs.\nsourceTabs.closeAllTabs=Close all tabs\nsourceTabs.closeAllTabs.accesskey=a\n\n# LOCALIZATION NOTE (sourceTabs.revealInTree): Editor source tab context menu item\n# for revealing source in tree.\nsourceTabs.revealInTree=Reveal in tree\nsourceTabs.revealInTree.accesskey=r\n\n# LOCALIZATION NOTE (sourceTabs.copyLink): Editor source tab context menu item\n# for copying a link address.\nsourceTabs.copyLink=Copy link address\nsourceTabs.copyLink.accesskey=l\n\n# LOCALIZATION NOTE (sourceTabs.prettyPrint): Editor source tab context menu item\n# for pretty printing the source.\nsourceTabs.prettyPrint=Pretty print source\nsourceTabs.prettyPrint.accesskey=p\n\n# LOCALIZATION NOTE (sourceFooter.blackbox): Tooltip text associated\n# with the blackbox button\nsourceFooter.blackbox=Blackbox source\nsourceFooter.blackbox.accesskey=B\n\n# LOCALIZATION NOTE (sourceFooter.unblackbox): Tooltip text associated\n# with the blackbox button\nsourceFooter.unblackbox=Unblackbox source\nsourceFooter.unblackbox.accesskey=b\n\n# LOCALIZATION NOTE (sourceFooter.blackboxed): Text associated\n# with a blackboxed source\nsourceFooter.blackboxed=Blackboxed source\n\n# LOCALIZATION NOTE (sourceFooter.codeCoverage): Text associated\n# with a code coverage button\nsourceFooter.codeCoverage=Code coverage\n\n# LOCALIZATION NOTE (sourceTabs.closeTabButtonTooltip): The tooltip that is displayed\n# for close tab button in source tabs.\nsourceTabs.closeTabButtonTooltip=Close tab\n\n# LOCALIZATION NOTE (sourceTabs.newTabButtonTooltip): The tooltip that is displayed for\n# new tab button in source tabs.\nsourceTabs.newTabButtonTooltip=Search for sources (%S)\n\n# LOCALIZATION NOTE (scopes.header): Scopes right sidebar pane header.\nscopes.header=Scopes\n\n# LOCALIZATION NOTE (scopes.notAvailable): Scopes right sidebar pane message\n# for when the debugger is paused, but there isn't pause data.\nscopes.notAvailable=Scopes unavailable\n\n# LOCALIZATION NOTE (scopes.notPaused): Scopes right sidebar pane message\n# for when the debugger is not paused.\nscopes.notPaused=Not paused\n\n# LOCALIZATION NOTE (scopes.block): Refers to a block of code in\n# the scopes pane when the debugger is paused.\nscopes.block=Block\n\n# LOCALIZATION NOTE (sources.header): Sources left sidebar header\nsources.header=Sources\n\n# LOCALIZATION NOTE (outline.header): Outline left sidebar header\noutline.header=Outline\n\n# LOCALIZATION NOTE (outline.noFunctions): Outline text when there are no functions to display\noutline.noFunctions=No functions\n\n# LOCALIZATION NOTE (sources.search): Sources left sidebar prompt\n# e.g. Cmd+P to search. On a mac, we use the command unicode character.\n# On windows, it's ctrl.\nsources.search=%S to search\n\n# LOCALIZATION NOTE (watchExpressions.header): Watch Expressions right sidebar\n# pane header.\nwatchExpressions.header=Watch expressions\n\n# LOCALIZATION NOTE (watchExpressions.refreshButton): Watch Expressions header\n# button for refreshing the expressions.\nwatchExpressions.refreshButton=Refresh\n\n# LOCALIZATION NOTE (welcome.search): The center pane welcome panel's\n# search prompt. e.g. cmd+p to search for files. On windows, it's ctrl, on\n# a mac we use the unicode character.\nwelcome.search=%S to search for sources\n\n# LOCALIZATION NOTE (welcome.findInFiles): The center pane welcome panel's\n# search prompt. e.g. cmd+f to search for files. On windows, it's ctrl+shift+f, on\n# a mac we use the unicode character.\nwelcome.findInFiles=%S to find in files\n\n# LOCALIZATION NOTE (welcome.searchFunction): Label displayed in the welcome\n# panel. %S is replaced by the keyboard shortcut to search for functions.\nwelcome.searchFunction=%S to search for functions in file\n\n# LOCALIZATION NOTE (sourceSearch.search): The center pane Source Search\n# prompt for searching for files.\nsourceSearch.search=Search sources…\n\n# LOCALIZATION NOTE (sourceSearch.noResults): The center pane Source Search\n# message when the query did not match any of the sources.\nsourceSearch.noResults2=No results found\n\n# LOCALIZATION NOTE (ignoreExceptions): The pause on exceptions button tooltip\n# when the debugger will not pause on exceptions.\nignoreExceptions=Ignore exceptions. Click to pause on uncaught exceptions\n\n# LOCALIZATION NOTE (pauseOnUncaughtExceptions): The pause on exceptions button\n# tooltip when the debugger will pause on uncaught exceptions.\npauseOnUncaughtExceptions=Pause on uncaught exceptions. Click to pause on all exceptions\n\n# LOCALIZATION NOTE (pauseOnExceptions): The pause on exceptions button tooltip\n# when the debugger will pause on all exceptions.\npauseOnExceptions=Pause on all exceptions. Click to ignore exceptions\n\n# LOCALIZATION NOTE (loadingText): The text that is displayed in the script\n# editor when the loading process has started but there is no file to display\n# yet.\nloadingText=Loading\\u2026\n\n# LOCALIZATION NOTE (errorLoadingText3): The text that is displayed in the debugger\n# viewer when there is an error loading a file\nerrorLoadingText3=Error loading this URI: %S\n\n# LOCALIZATION NOTE (addWatchExpressionText): The text that is displayed in the\n# watch expressions list to add a new item.\naddWatchExpressionText=Add watch expression\n\n# LOCALIZATION NOTE (addWatchExpressionButton): The button that is displayed in the\n# variables view popup.\naddWatchExpressionButton=Watch\n\n# LOCALIZATION NOTE (emptyVariablesText): The text that is displayed in the\n# variables pane when there are no variables to display.\nemptyVariablesText=No variables to display\n\n# LOCALIZATION NOTE (scopeLabel): The text that is displayed in the variables\n# pane as a header for each variable scope (e.g. \"Global scope, \"With scope\",\n# etc.).\nscopeLabel=%S scope\n\n# LOCALIZATION NOTE (watchExpressionsScopeLabel): The name of the watch\n# expressions scope. This text is displayed in the variables pane as a header for\n# the watch expressions scope.\nwatchExpressionsScopeLabel=Watch expressions\n\n# LOCALIZATION NOTE (globalScopeLabel): The name of the global scope. This text\n# is added to scopeLabel and displayed in the variables pane as a header for\n# the global scope.\nglobalScopeLabel=Global\n\n# LOCALIZATION NOTE (variablesViewErrorStacktrace): This is the text that is\n# shown before the stack trace in an error.\nvariablesViewErrorStacktrace=Stack trace:\n\n# LOCALIZATION NOTE (variablesViewMoreObjects): the text that is displayed\n# when you have an object preview that does not show all of the elements. At the end of the list\n# you see \"N more...\" in the web console output.\n# This is a semi-colon list of plural forms.\n# See: http://developer.mozilla.org/en/docs/Localization_and_Plurals\n# #1 number of remaining items in the object\n# example: 3 more…\nvariablesViewMoreObjects=#1 more…;#1 more…\n\n# LOCALIZATION NOTE (variablesEditableNameTooltip): The text that is displayed\n# in the variables list on an item with an editable name.\nvariablesEditableNameTooltip=Double click to edit\n\n# LOCALIZATION NOTE (variablesEditableValueTooltip): The text that is displayed\n# in the variables list on an item with an editable value.\nvariablesEditableValueTooltip=Click to change value\n\n# LOCALIZATION NOTE (variablesCloseButtonTooltip): The text that is displayed\n# in the variables list on an item which can be removed.\nvariablesCloseButtonTooltip=Click to remove\n\n# LOCALIZATION NOTE (variablesEditButtonTooltip): The text that is displayed\n# in the variables list on a getter or setter which can be edited.\nvariablesEditButtonTooltip=Click to set value\n\n# LOCALIZATION NOTE (variablesEditableValueTooltip): The text that is displayed\n# in a tooltip on the \"open in inspector\" button in the the variables list for a\n# DOMNode item.\nvariablesDomNodeValueTooltip=Click to select the node in the inspector\n\n# LOCALIZATION NOTE (configurable|...|Tooltip): The text that is displayed\n# in the variables list on certain variables or properties as tooltips.\n# Expanations of what these represent can be found at the following links:\n# https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty\n# https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/isExtensible\n# https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/isFrozen\n# https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/isSealed\n# It's probably best to keep these in English.\nconfigurableTooltip=configurable\nenumerableTooltip=enumerable\nwritableTooltip=writable\nfrozenTooltip=frozen\nsealedTooltip=sealed\nextensibleTooltip=extensible\noverriddenTooltip=overridden\nWebIDLTooltip=WebIDL\n\n# LOCALIZATION NOTE (variablesSeparatorLabel): The text that is displayed\n# in the variables list as a separator between the name and value.\nvariablesSeparatorLabel=:\n\n# LOCALIZATION NOTE (watchExpressionsSeparatorLabel2): The text that is displayed\n# in the watch expressions list as a separator between the code and evaluation.\nwatchExpressionsSeparatorLabel2=\\u0020→\n\n# LOCALIZATION NOTE (functionSearchSeparatorLabel): The text that is displayed\n# in the functions search panel as a separator between function's inferred name\n# and its real name (if available).\nfunctionSearchSeparatorLabel=←\n\n# LOCALIZATION NOTE(symbolSearch.search.functionsPlaceholder): The placeholder\n# text displayed when the user searches for functions in a file\nsymbolSearch.search.functionsPlaceholder=Search functions…\n\n# LOCALIZATION NOTE(symbolSearch.search.variablesPlaceholder): The placeholder\n# text displayed when the user searches for variables in a file\nsymbolSearch.search.variablesPlaceholder=Search variables…\n\n# LOCALIZATION NOTE(symbolSearch.search.key2): The Key Shortcut for\n# searching for a function or variable\nsymbolSearch.search.key2=CmdOrCtrl+Shift+O\n\n# LOCALIZATION NOTE(symbolSearch.searchModifier.modifiersLabel): A label\n# preceding the group of modifiers\nsymbolSearch.searchModifier.modifiersLabel=Modifiers:\n\n# LOCALIZATION NOTE(symbolSearch.searchModifier.regex): A search option\n# when searching text in a file\nsymbolSearch.searchModifier.regex=Regex\n\n# LOCALIZATION NOTE(symbolSearch.searchModifier.caseSensitive): A search option\n# when searching text in a file\nsymbolSearch.searchModifier.caseSensitive=Case sensitive\n\n# LOCALIZATION NOTE(symbolSearch.searchModifier.wholeWord): A search option\n# when searching text in a file\nsymbolSearch.searchModifier.wholeWord=Whole word\n\n# LOCALIZATION NOTE (resumptionOrderPanelTitle): This is the text that appears\n# as a description in the notification panel popup, when multiple debuggers are\n# open in separate tabs and the user tries to resume them in the wrong order.\n# The substitution parameter is the URL of the last paused window that must be\n# resumed first.\nresumptionOrderPanelTitle=There are one or more paused debuggers. Please resume the most-recently paused debugger first at: %S\n\nvariablesViewOptimizedOut=(optimized away)\nvariablesViewUninitialized=(uninitialized)\nvariablesViewMissingArgs=(unavailable)\n\nanonymousSourcesLabel=Anonymous sources\n\nexperimental=This is an experimental feature\n\n# LOCALIZATION NOTE (whyPaused.debuggerStatement): The text that is displayed\n# in a info block explaining how the debugger is currently paused due to a `debugger`\n# statement in the code\nwhyPaused.debuggerStatement=Paused on debugger statement\n\n# LOCALIZATION NOTE (whyPaused.breakpoint): The text that is displayed\n# in a info block explaining how the debugger is currently paused on a breakpoint\nwhyPaused.breakpoint=Paused on breakpoint\n\n# LOCALIZATION NOTE (whyPaused.exception): The text that is displayed\n# in a info block explaining how the debugger is currently paused on an exception\nwhyPaused.exception=Paused on exception\n\n# LOCALIZATION NOTE (whyPaused.resumeLimit): The text that is displayed\n# in a info block explaining how the debugger is currently paused while stepping\n# in or out of the stack\nwhyPaused.resumeLimit=Paused while stepping\n\n# LOCALIZATION NOTE (whyPaused.pauseOnDOMEvents): The text that is displayed\n# in a info block explaining how the debugger is currently paused on a\n# dom event\nwhyPaused.pauseOnDOMEvents=Paused on event listener\n\n# LOCALIZATION NOTE (whyPaused.breakpointConditionThrown): The text that is displayed\n# in an info block when evaluating a conditional breakpoint throws an error\nwhyPaused.breakpointConditionThrown=Error with conditional breakpoint\n\n# LOCALIZATION NOTE (whyPaused.xhr): The text that is displayed\n# in a info block explaining how the debugger is currently paused on an\n# xml http request\nwhyPaused.xhr=Paused on XMLHttpRequest\n\n# LOCALIZATION NOTE (whyPaused.promiseRejection): The text that is displayed\n# in a info block explaining how the debugger is currently paused on a\n# promise rejection\nwhyPaused.promiseRejection=Paused on promise rejection\n\n# LOCALIZATION NOTE (whyPaused.assert): The text that is displayed\n# in a info block explaining how the debugger is currently paused on an\n# assert\nwhyPaused.assert=Paused on assertion\n\n# LOCALIZATION NOTE (whyPaused.debugCommand): The text that is displayed\n# in a info block explaining how the debugger is currently paused on a\n# debugger statement\nwhyPaused.debugCommand=Paused on debugged function\n\n# LOCALIZATION NOTE (whyPaused.other): The text that is displayed\n# in a info block explaining how the debugger is currently paused on an event\n# listener breakpoint set\nwhyPaused.other=Debugger paused\n\n# LOCALIZATION NOTE (ctrl): The text that is used for documenting\n# keyboard shortcuts that use the control key\nctrl=Ctrl\n\n# LOCALIZATION NOTE (anonymous): The text that is displayed when the\n# display name is null.\nanonymous=(anonymous)\n\n# LOCALIZATION NOTE (shortcuts.toggleBreakpoint): text describing\n# keyboard shortcut action for toggling breakpoint\nshortcuts.toggleBreakpoint=Toggle Breakpoint\n\n# LOCALIZATION NOTE (shortcuts.toggleCondPanel): text describing\n# keyboard shortcut action for toggling conditional panel keyboard\nshortcuts.toggleCondPanel=Toggle Conditional Panel\n\n# LOCALIZATION NOTE (shortcuts.pauseOrResume): text describing\n# keyboard shortcut action for pause of resume\nshortcuts.pauseOrResume=Pause/Resume\n\n# LOCALIZATION NOTE (shortcuts.stepOver): text describing\n# keyboard shortcut action for stepping over\nshortcuts.stepOver=Step Over\n\n# LOCALIZATION NOTE (shortcuts.stepIn): text describing\n# keyboard shortcut action for stepping in\nshortcuts.stepIn=Step In\n\n# LOCALIZATION NOTE (shortcuts.stepOut): text describing\n# keyboard shortcut action for stepping out\nshortcuts.stepOut=Step Out\n\n# LOCALIZATION NOTE (shortcuts.fileSearch): text describing\n# keyboard shortcut action for source file search\nshortcuts.fileSearch=Source File Search\n\n# LOCALIZATION NOTE (shortcuts.searchAgain): text describing\n# keyboard shortcut action for searching again\nshortcuts.searchAgain=Search Again\n\n# LOCALIZATION NOTE (shortcuts.projectSearch): text describing\n# keyboard shortcut action for full project search\nshortcuts.projectSearch=Full Project Search\n\n# LOCALIZATION NOTE (shortcuts.functionSearch): text describing\n# keyboard shortcut action for function search\nshortcuts.functionSearch=Function Search\n\n# LOCALIZATION NOTE (shortcuts.buttonName): text describing\n# keyboard shortcut button text\nshortcuts.buttonName=Keyboard shortcuts\n" +module.exports = "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not distributed with this\n# file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n# LOCALIZATION NOTE These strings are used inside the Debugger\n# which is available from the Web Developer sub-menu -> 'Debugger'.\n# The correct localization of this file might be to keep it in\n# English, or another language commonly spoken among web developers.\n# You want to make that choice consistent across the developer tools.\n# A good criteria is the language in which you'd find the best\n# documentation on web development on the web.\n\n# LOCALIZATION NOTE (collapsePanes): This is the tooltip for the button\n# that collapses the left and right panes in the debugger UI.\ncollapsePanes=Collapse panes\n\n# LOCALIZATION NOTE (copySource): This is the text that appears in the\n# context menu to copy the selected source of file open.\ncopySource=Copy\ncopySource.accesskey=y\n\n# LOCALIZATION NOTE (copySourceUri2): This is the text that appears in the\n# context menu to copy the source URI of file open.\ncopySourceUri2=Copy source URI\ncopySourceUri2.accesskey=u\n\n# LOCALIZATION NOTE (copyFunction): This is the text that appears in the\n# context menu to copy the function the user selected\ncopyFunction.label=Copy function\ncopyFunction.accesskey=F\n\n# LOCALIZATION NOTE (copyStackTrace): This is the text that appears in the\n# context menu to copy the stack trace methods, file names and row number.\ncopyStackTrace=Copy stack trace\ncopyStackTrace.accesskey=c\n\n# LOCALIZATION NOTE (expandPanes): This is the tooltip for the button\n# that expands the left and right panes in the debugger UI.\nexpandPanes=Expand panes\n\n# LOCALIZATION NOTE (pauseButtonTooltip): The tooltip that is displayed for the pause\n# button when the debugger is in a running state.\npauseButtonTooltip=Pause %S\n\n# LOCALIZATION NOTE (pausePendingButtonTooltip): The tooltip that is displayed for\n# the pause button after it's been clicked but before the next JavaScript to run.\npausePendingButtonTooltip=Waiting for next execution\n\n# LOCALIZATION NOTE (resumeButtonTooltip): The label that is displayed on the pause\n# button when the debugger is in a paused state.\nresumeButtonTooltip=Resume %S\n\n# LOCALIZATION NOTE (stepOverTooltip): The label that is displayed on the\n# button that steps over a function call.\nstepOverTooltip=Step over %S\n\n# LOCALIZATION NOTE (stepInTooltip): The label that is displayed on the\n# button that steps into a function call.\nstepInTooltip=Step in %S\n\n# LOCALIZATION NOTE (stepOutTooltip): The label that is displayed on the\n# button that steps out of a function call.\nstepOutTooltip=Step out %S\n\n# LOCALIZATION NOTE (workersHeader): The text to display in the events\n# header.\nworkersHeader=Workers\n\n# LOCALIZATION NOTE (noWorkersText): The text to display in the workers list\n# when there are no workers.\nnoWorkersText=This page has no workers.\n\n# LOCALIZATION NOTE (noSourcesText): The text to display in the sources list\n# when there are no sources.\nnoSourcesText=This page has no sources.\n\n# LOCALIZATION NOTE (noEventListenersText): The text to display in the events tab\n# when there are no events.\nnoEventListenersText=No event listeners to display.\n\n# LOCALIZATION NOTE (eventListenersHeader): The text to display in the events\n# header.\neventListenersHeader=Event listeners\n\n# LOCALIZATION NOTE (noStackFramesText): The text to display in the call stack tab\n# when there are no stack frames.\nnoStackFramesText=No stack frames to display\n\n# LOCALIZATION NOTE (eventCheckboxTooltip): The tooltip text to display when\n# the user hovers over the checkbox used to toggle an event breakpoint.\neventCheckboxTooltip=Toggle breaking on this event\n\n# LOCALIZATION NOTE (eventOnSelector): The text to display in the events tab\n# for every event item, between the event type and event selector.\neventOnSelector=on\n\n# LOCALIZATION NOTE (eventInSource): The text to display in the events tab\n# for every event item, between the event selector and listener's owner source.\neventInSource=in\n\n# LOCALIZATION NOTE (eventNodes): The text to display in the events tab when\n# an event is listened on more than one target node.\neventNodes=%S nodes\n\n# LOCALIZATION NOTE (eventNative): The text to display in the events tab when\n# a listener is added from plugins, thus getting translated to native code.\neventNative=[native code]\n\n# LOCALIZATION NOTE (*Events): The text to display in the events tab for\n# each group of sub-level event entries.\nanimationEvents=Animation\naudioEvents=Audio\nbatteryEvents=Battery\nclipboardEvents=Clipboard\ncompositionEvents=Composition\ndeviceEvents=Device\ndisplayEvents=Display\ndragAndDropEvents=Drag and Drop\ngamepadEvents=Gamepad\nindexedDBEvents=IndexedDB\ninteractionEvents=Interaction\nkeyboardEvents=Keyboard\nmediaEvents=HTML5 Media\nmouseEvents=Mouse\nmutationEvents=Mutation\nnavigationEvents=Navigation\npointerLockEvents=Pointer Lock\nsensorEvents=Sensor\nstorageEvents=Storage\ntimeEvents=Time\ntouchEvents=Touch\notherEvents=Other\n\n# LOCALIZATION NOTE (blackboxCheckboxTooltip2): The tooltip text to display when\n# the user hovers over the checkbox used to toggle blackboxing its associated\n# source.\nblackboxCheckboxTooltip2=Toggle blackboxing\n\n# LOCALIZATION NOTE (sources.search.key2): Key shortcut to open the search for\n# searching all the source files the debugger has seen.\nsources.search.key2=CmdOrCtrl+P\n\n# LOCALIZATION NOTE (sources.search.alt.key): A second key shortcut to open the\n# search for searching all the source files the debugger has seen.\nsources.search.alt.key=CmdOrCtrl+O\n\n# LOCALIZATION NOTE (projectTextSearch.key): A key shortcut to open the\n# full project text search for searching all the files the debugger has seen.\nprojectTextSearch.key=CmdOrCtrl+Shift+F\n\n# LOCALIZATION NOTE (functionSearch.key): A key shortcut to open the\n# modal for searching functions in a file.\nfunctionSearch.key=CmdOrCtrl+Shift+O\n\n# LOCALIZATION NOTE (toggleBreakpoint.key): A key shortcut to toggle\n# breakpoints.\ntoggleBreakpoint.key=CmdOrCtrl+B\n\n# LOCALIZATION NOTE (toggleCondPanel.key): A key shortcut to toggle\n# the conditional breakpoint panel.\ntoggleCondPanel.key=CmdOrCtrl+Shift+B\n\n# LOCALIZATION NOTE (stepOut.key): A key shortcut to\n# step out.\nstepOut.key=Shift+F11\n\n# LOCALIZATION NOTE (shortcuts.header.editor): Sections header in\n# the shortcuts modal for keyboard shortcuts related to editing.\nshortcuts.header.editor=Editor\n\n# LOCALIZATION NOTE (shortcuts.header.stepping): Sections header in\n# the shortcuts modal for keyboard shortcuts related to stepping.\nshortcuts.header.stepping=Stepping\n\n# LOCALIZATION NOTE (shortcuts.header.search): Sections header in\n# the shortcuts modal for keyboard shortcuts related to search.\nshortcuts.header.search=Search\n\n# LOCALIZATION NOTE (projectTextSearch.placeholder): A placeholder shown\n# when searching across all of the files in a project.\nprojectTextSearch.placeholder=Find in files…\n\n# LOCALIZATION NOTE (projectTextSearch.noResults): The center pane Text Search\n# message when the query did not match any text of all files in a project.\nprojectTextSearch.noResults=No results found\n\n# LOCALIZATION NOTE (sources.noSourcesAvailable): Text shown when the debugger\n# does not have any sources.\nsources.noSourcesAvailable=This page has no sources\n\n# LOCALIZATION NOTE (sourceSearch.search.key2): Key shortcut to open the search\n# for searching within a the currently opened files in the editor\nsourceSearch.search.key2=CmdOrCtrl+F\n\n# LOCALIZATION NOTE (sourceSearch.search.placeholder): placeholder text in\n# the source search input bar\nsourceSearch.search.placeholder=Search in file…\n\n# LOCALIZATION NOTE (sourceSearch.search.again.key2): Key shortcut to highlight\n# the next occurrence of the last search triggered from a source search\nsourceSearch.search.again.key2=CmdOrCtrl+G\n\n# LOCALIZATION NOTE (sourceSearch.search.againPrev.key2): Key shortcut to highlight\n# the previous occurrence of the last search triggered from a source search\nsourceSearch.search.againPrev.key2=CmdOrCtrl+Shift+G\n\n# LOCALIZATION NOTE (sourceSearch.resultsSummary1): Shows a summary of\n# the number of matches for autocomplete\nsourceSearch.resultsSummary1=%d results\n\n# LOCALIZATION NOTE (noMatchingStringsText): The text to display in the\n# global search results when there are no matching strings after filtering.\nnoMatchingStringsText=No matches found\n\n# LOCALIZATION NOTE (emptySearchText): This is the text that appears in the\n# filter text box when it is empty and the scripts container is selected.\nemptySearchText=Search scripts (%S)\n\n# LOCALIZATION NOTE (emptyVariablesFilterText): This is the text that\n# appears in the filter text box for the variables view container.\nemptyVariablesFilterText=Filter variables\n\n# LOCALIZATION NOTE (emptyPropertiesFilterText): This is the text that\n# appears in the filter text box for the editor's variables view bubble.\nemptyPropertiesFilterText=Filter properties\n\n# LOCALIZATION NOTE (searchPanelFilter): This is the text that appears in the\n# filter panel popup for the filter scripts operation.\nsearchPanelFilter=Filter scripts (%S)\n\n# LOCALIZATION NOTE (searchPanelGlobal): This is the text that appears in the\n# filter panel popup for the global search operation.\nsearchPanelGlobal=Search in all files (%S)\n\n# LOCALIZATION NOTE (searchPanelFunction): This is the text that appears in the\n# filter panel popup for the function search operation.\nsearchPanelFunction=Search for function definition (%S)\n\n# LOCALIZATION NOTE (searchPanelToken): This is the text that appears in the\n# filter panel popup for the token search operation.\nsearchPanelToken=Find in this file (%S)\n\n# LOCALIZATION NOTE (searchPanelGoToLine): This is the text that appears in the\n# filter panel popup for the line search operation.\nsearchPanelGoToLine=Go to line (%S)\n\n# LOCALIZATION NOTE (searchPanelVariable): This is the text that appears in the\n# filter panel popup for the variables search operation.\nsearchPanelVariable=Filter variables (%S)\n\n# LOCALIZATION NOTE (breakpointMenuItem): The text for all the elements that\n# are displayed in the breakpoints menu item popup.\nbreakpointMenuItem.setConditional=Configure conditional breakpoint\nbreakpointMenuItem.enableSelf2.label=Enable\nbreakpointMenuItem.enableSelf2.accesskey=E\nbreakpointMenuItem.disableSelf2.label=Disable\nbreakpointMenuItem.disableSelf2.accesskey=D\nbreakpointMenuItem.deleteSelf2.label=Remove\nbreakpointMenuItem.deleteSelf2.accesskey=R\nbreakpointMenuItem.enableOthers2.label=Enable others\nbreakpointMenuItem.enableOthers2.accesskey=o\nbreakpointMenuItem.disableOthers2.label=Disable others\nbreakpointMenuItem.disableOthers2.accesskey=s\nbreakpointMenuItem.deleteOthers2.label=Remove others\nbreakpointMenuItem.deleteOthers2.accesskey=h\nbreakpointMenuItem.enableAll2.label=Enable all\nbreakpointMenuItem.enableAll2.accesskey=b\nbreakpointMenuItem.disableAll2.label=Disable all\nbreakpointMenuItem.disableAll2.accesskey=k\nbreakpointMenuItem.deleteAll2.label=Remove all\nbreakpointMenuItem.deleteAll2.accesskey=a\nbreakpointMenuItem.removeCondition2.label=Remove condition\nbreakpointMenuItem.removeCondition2.accesskey=c\nbreakpointMenuItem.addCondition2.label=Add condition\nbreakpointMenuItem.addCondition2.accesskey=A\nbreakpointMenuItem.editCondition2.label=Edit condition\nbreakpointMenuItem.editCondition2.accesskey=n\nbreakpointMenuItem.enableSelf=Enable breakpoint\nbreakpointMenuItem.enableSelf.accesskey=E\nbreakpointMenuItem.disableSelf=Disable breakpoint\nbreakpointMenuItem.disableSelf.accesskey=D\nbreakpointMenuItem.deleteSelf=Remove breakpoint\nbreakpointMenuItem.deleteSelf.accesskey=R\nbreakpointMenuItem.enableOthers=Enable others\nbreakpointMenuItem.enableOthers.accesskey=o\nbreakpointMenuItem.disableOthers=Disable others\nbreakpointMenuItem.disableOthers.accesskey=s\nbreakpointMenuItem.deleteOthers=Remove others\nbreakpointMenuItem.deleteOthers.accesskey=h\nbreakpointMenuItem.enableAll=Enable all breakpoints\nbreakpointMenuItem.enableAll.accesskey=b\nbreakpointMenuItem.disableAll=Disable all breakpoints\nbreakpointMenuItem.disableAll.accesskey=k\nbreakpointMenuItem.deleteAll=Remove all breakpoints\nbreakpointMenuItem.deleteAll.accesskey=a\nbreakpointMenuItem.removeCondition.label=Remove breakpoint condition\nbreakpointMenuItem.removeCondition.accesskey=c\nbreakpointMenuItem.editCondition.label=Edit breakpoint condition\nbreakpointMenuItem.editCondition.accesskey=n\n\n# LOCALIZATION NOTE (breakpoints.header): Breakpoints right sidebar pane header.\nbreakpoints.header=Breakpoints\n\n# LOCALIZATION NOTE (breakpoints.none): The text that appears when there are\n# no breakpoints present\nbreakpoints.none=No breakpoints\n\n# LOCALIZATION NOTE (breakpoints.enable): The text that may appear as a tooltip\n# when hovering over the 'disable breakpoints' switch button in right sidebar\nbreakpoints.enable=Enable breakpoints\n\n# LOCALIZATION NOTE (breakpoints.disable): The text that may appear as a tooltip\n# when hovering over the 'disable breakpoints' switch button in right sidebar\nbreakpoints.disable=Disable breakpoints\n\n# LOCALIZATION NOTE (breakpoints.removeBreakpointTooltip): The tooltip that is displayed\n# for remove breakpoint button in right sidebar\nbreakpoints.removeBreakpointTooltip=Remove breakpoint\n\n# LOCALIZATION NOTE (callStack.header): Call Stack right sidebar pane header.\ncallStack.header=Call stack\n\n# LOCALIZATION NOTE (callStack.notPaused): Call Stack right sidebar pane\n# message when not paused.\ncallStack.notPaused=Not paused\n\n# LOCALIZATION NOTE (callStack.collapse): Call Stack right sidebar pane\n# message to hide some of the frames that are shown.\ncallStack.collapse=Collapse rows\n\n# LOCALIZATION NOTE (callStack.expand): Call Stack right sidebar pane\n# message to show more of the frames.\ncallStack.expand=Expand rows\n\n# LOCALIZATION NOTE (editor.searchResults): Editor Search bar message\n# for the summarizing the selected search result. e.g. 5 of 10 results.\neditor.searchResults=%d of %d results\n\n# LOCALIZATION NOTE (sourceSearch.singleResult): Copy shown when there is one result.\neditor.singleResult=1 result\n\n# LOCALIZATION NOTE (editor.noResults): Editor Search bar message\n# for when no results found.\neditor.noResults=No results\n\n# LOCALIZATION NOTE (editor.searchResults.nextResult): Editor Search bar\n# tooltip for traversing to the Next Result\neditor.searchResults.nextResult=Next result\n\n# LOCALIZATION NOTE (editor.searchResults.prevResult): Editor Search bar\n# tooltip for traversing to the Previous Result\neditor.searchResults.prevResult=Previous result\n\n# LOCALIZATION NOTE (editor.searchTypeToggleTitle): Search bar title for\n# toggling search type buttons(function search, variable search)\neditor.searchTypeToggleTitle=Search for:\n\n# LOCALIZATION NOTE (editor.continueToHere.label): Editor gutter context\n# menu item for jumping to a new paused location\neditor.continueToHere.label=Continue to here\neditor.continueToHere.accesskey=H\n\n# LOCALIZATION NOTE (editor.addBreakpoint): Editor gutter context menu item\n# for adding a breakpoint on a line.\neditor.addBreakpoint=Add breakpoint\n\n# LOCALIZATION NOTE (editor.disableBreakpoint): Editor gutter context menu item\n# for disabling a breakpoint on a line.\neditor.disableBreakpoint=Disable breakpoint\n\n# LOCALIZATION NOTE (editor.enableBreakpoint): Editor gutter context menu item\n# for enabling a breakpoint on a line.\neditor.enableBreakpoint=Enable breakpoint\n\n# LOCALIZATION NOTE (editor.removeBreakpoint): Editor gutter context menu item\n# for removing a breakpoint on a line.\neditor.removeBreakpoint=Remove breakpoint\n\n# LOCALIZATION NOTE (editor.editBreakpoint): Editor gutter context menu item\n# for setting a breakpoint condition on a line.\neditor.editBreakpoint=Edit breakpoint\n\n# LOCALIZATION NOTE (editor.addConditionalBreakpoint): Editor gutter context\n# menu item for adding a breakpoint condition on a line.\neditor.addConditionalBreakpoint=Add conditional breakpoint\n\n# LOCALIZATION NOTE (editor.conditionalPanel.placeholder): Placeholder text for\n# input element inside ConditionalPanel component\neditor.conditionalPanel.placeholder=This breakpoint will pause when the expression is true\n\n# LOCALIZATION NOTE (editor.conditionalPanel.placeholder): Tooltip text for\n# close button inside ConditionalPanel component\neditor.conditionalPanel.close=Cancel edit breakpoint and close\n\n# LOCALIZATION NOTE (editor.jumpToMappedLocation1): Context menu item\n# for navigating to a source mapped location\neditor.jumpToMappedLocation1=Jump to %S location\n\n# LOCALIZATION NOTE (framework.disableGrouping): This is the text that appears in the\n# context menu to disable framework grouping.\nframework.disableGrouping=Disable framework grouping\nframework.disableGrouping.accesskey=u\n\n# LOCALIZATION NOTE (framework.enableGrouping): This is the text that appears in the\n# context menu to enable framework grouping.\nframework.enableGrouping=Enable framework grouping\nframework.enableGrouping.accesskey=u\n\n# LOCALIZATION NOTE (generated): Source Map term for a server source location\ngenerated=Generated\n\n# LOCALIZATION NOTE (original): Source Map term for a debugger UI source location\noriginal=original\n\n# LOCALIZATION NOTE (expressions.placeholder): Placeholder text for expression\n# input element\nexpressions.placeholder=Add watch expression\n\n# LOCALIZATION NOTE (sourceTabs.closeTab): Editor source tab context menu item\n# for closing the selected tab below the mouse.\nsourceTabs.closeTab=Close tab\nsourceTabs.closeTab.accesskey=c\n\n# LOCALIZATION NOTE (sourceTabs.closeOtherTabs): Editor source tab context menu item\n# for closing the other tabs.\nsourceTabs.closeOtherTabs=Close other tabs\nsourceTabs.closeOtherTabs.accesskey=o\n\n# LOCALIZATION NOTE (sourceTabs.closeTabsToEnd): Editor source tab context menu item\n# for closing the tabs to the end (the right for LTR languages) of the selected tab.\nsourceTabs.closeTabsToEnd=Close tabs to the right\nsourceTabs.closeTabsToEnd.accesskey=e\n\n# LOCALIZATION NOTE (sourceTabs.closeAllTabs): Editor source tab context menu item\n# for closing all tabs.\nsourceTabs.closeAllTabs=Close all tabs\nsourceTabs.closeAllTabs.accesskey=a\n\n# LOCALIZATION NOTE (sourceTabs.revealInTree): Editor source tab context menu item\n# for revealing source in tree.\nsourceTabs.revealInTree=Reveal in tree\nsourceTabs.revealInTree.accesskey=r\n\n# LOCALIZATION NOTE (sourceTabs.copyLink): Editor source tab context menu item\n# for copying a link address.\nsourceTabs.copyLink=Copy link address\nsourceTabs.copyLink.accesskey=l\n\n# LOCALIZATION NOTE (sourceTabs.prettyPrint): Editor source tab context menu item\n# for pretty printing the source.\nsourceTabs.prettyPrint=Pretty print source\nsourceTabs.prettyPrint.accesskey=p\n\n# LOCALIZATION NOTE (sourceFooter.blackbox): Tooltip text associated\n# with the blackbox button\nsourceFooter.blackbox=Blackbox source\nsourceFooter.blackbox.accesskey=B\n\n# LOCALIZATION NOTE (sourceFooter.unblackbox): Tooltip text associated\n# with the blackbox button\nsourceFooter.unblackbox=Unblackbox source\nsourceFooter.unblackbox.accesskey=b\n\n# LOCALIZATION NOTE (sourceFooter.blackboxed): Text associated\n# with a blackboxed source\nsourceFooter.blackboxed=Blackboxed source\n\n# LOCALIZATION NOTE (sourceFooter.codeCoverage): Text associated\n# with a code coverage button\nsourceFooter.codeCoverage=Code coverage\n\n# LOCALIZATION NOTE (sourceTabs.closeTabButtonTooltip): The tooltip that is displayed\n# for close tab button in source tabs.\nsourceTabs.closeTabButtonTooltip=Close tab\n\n# LOCALIZATION NOTE (sourceTabs.newTabButtonTooltip): The tooltip that is displayed for\n# new tab button in source tabs.\nsourceTabs.newTabButtonTooltip=Search for sources (%S)\n\n# LOCALIZATION NOTE (scopes.header): Scopes right sidebar pane header.\nscopes.header=Scopes\n\n# LOCALIZATION NOTE (scopes.notAvailable): Scopes right sidebar pane message\n# for when the debugger is paused, but there isn't pause data.\nscopes.notAvailable=Scopes unavailable\n\n# LOCALIZATION NOTE (scopes.notPaused): Scopes right sidebar pane message\n# for when the debugger is not paused.\nscopes.notPaused=Not paused\n\n# LOCALIZATION NOTE (scopes.block): Refers to a block of code in\n# the scopes pane when the debugger is paused.\nscopes.block=Block\n\n# LOCALIZATION NOTE (sources.header): Sources left sidebar header\nsources.header=Sources\n\n# LOCALIZATION NOTE (outline.header): Outline left sidebar header\noutline.header=Outline\n\n# LOCALIZATION NOTE (outline.noFunctions): Outline text when there are no functions to display\noutline.noFunctions=No functions\n\n# LOCALIZATION NOTE (sources.search): Sources left sidebar prompt\n# e.g. Cmd+P to search. On a mac, we use the command unicode character.\n# On windows, it's ctrl.\nsources.search=%S to search\n\n# LOCALIZATION NOTE (watchExpressions.header): Watch Expressions right sidebar\n# pane header.\nwatchExpressions.header=Watch expressions\n\n# LOCALIZATION NOTE (watchExpressions.refreshButton): Watch Expressions header\n# button for refreshing the expressions.\nwatchExpressions.refreshButton=Refresh\n\n# LOCALIZATION NOTE (welcome.search): The center pane welcome panel's\n# search prompt. e.g. cmd+p to search for files. On windows, it's ctrl, on\n# a mac we use the unicode character.\nwelcome.search=%S to search for sources\n\n# LOCALIZATION NOTE (welcome.findInFiles): The center pane welcome panel's\n# search prompt. e.g. cmd+f to search for files. On windows, it's ctrl+shift+f, on\n# a mac we use the unicode character.\nwelcome.findInFiles=%S to find in files\n\n# LOCALIZATION NOTE (welcome.searchFunction): Label displayed in the welcome\n# panel. %S is replaced by the keyboard shortcut to search for functions.\nwelcome.searchFunction=%S to search for functions in file\n\n# LOCALIZATION NOTE (sourceSearch.search): The center pane Source Search\n# prompt for searching for files.\nsourceSearch.search=Search sources…\n\n# LOCALIZATION NOTE (sourceSearch.noResults): The center pane Source Search\n# message when the query did not match any of the sources.\nsourceSearch.noResults2=No results found\n\n# LOCALIZATION NOTE (ignoreExceptions): The pause on exceptions button tooltip\n# when the debugger will not pause on exceptions.\nignoreExceptions=Ignore exceptions. Click to pause on uncaught exceptions\n\n# LOCALIZATION NOTE (pauseOnUncaughtExceptions): The pause on exceptions button\n# tooltip when the debugger will pause on uncaught exceptions.\npauseOnUncaughtExceptions=Pause on uncaught exceptions. Click to pause on all exceptions\n\n# LOCALIZATION NOTE (pauseOnExceptions): The pause on exceptions button tooltip\n# when the debugger will pause on all exceptions.\npauseOnExceptions=Pause on all exceptions. Click to ignore exceptions\n\n# LOCALIZATION NOTE (loadingText): The text that is displayed in the script\n# editor when the loading process has started but there is no file to display\n# yet.\nloadingText=Loading\\u2026\n\n# LOCALIZATION NOTE (errorLoadingText3): The text that is displayed in the debugger\n# viewer when there is an error loading a file\nerrorLoadingText3=Error loading this URI: %S\n\n# LOCALIZATION NOTE (addWatchExpressionText): The text that is displayed in the\n# watch expressions list to add a new item.\naddWatchExpressionText=Add watch expression\n\n# LOCALIZATION NOTE (addWatchExpressionButton): The button that is displayed in the\n# variables view popup.\naddWatchExpressionButton=Watch\n\n# LOCALIZATION NOTE (emptyVariablesText): The text that is displayed in the\n# variables pane when there are no variables to display.\nemptyVariablesText=No variables to display\n\n# LOCALIZATION NOTE (scopeLabel): The text that is displayed in the variables\n# pane as a header for each variable scope (e.g. \"Global scope, \"With scope\",\n# etc.).\nscopeLabel=%S scope\n\n# LOCALIZATION NOTE (watchExpressionsScopeLabel): The name of the watch\n# expressions scope. This text is displayed in the variables pane as a header for\n# the watch expressions scope.\nwatchExpressionsScopeLabel=Watch expressions\n\n# LOCALIZATION NOTE (globalScopeLabel): The name of the global scope. This text\n# is added to scopeLabel and displayed in the variables pane as a header for\n# the global scope.\nglobalScopeLabel=Global\n\n# LOCALIZATION NOTE (variablesViewErrorStacktrace): This is the text that is\n# shown before the stack trace in an error.\nvariablesViewErrorStacktrace=Stack trace:\n\n# LOCALIZATION NOTE (variablesViewMoreObjects): the text that is displayed\n# when you have an object preview that does not show all of the elements. At the end of the list\n# you see \"N more...\" in the web console output.\n# This is a semi-colon list of plural forms.\n# See: http://developer.mozilla.org/en/docs/Localization_and_Plurals\n# #1 number of remaining items in the object\n# example: 3 more…\nvariablesViewMoreObjects=#1 more…;#1 more…\n\n# LOCALIZATION NOTE (variablesEditableNameTooltip): The text that is displayed\n# in the variables list on an item with an editable name.\nvariablesEditableNameTooltip=Double click to edit\n\n# LOCALIZATION NOTE (variablesEditableValueTooltip): The text that is displayed\n# in the variables list on an item with an editable value.\nvariablesEditableValueTooltip=Click to change value\n\n# LOCALIZATION NOTE (variablesCloseButtonTooltip): The text that is displayed\n# in the variables list on an item which can be removed.\nvariablesCloseButtonTooltip=Click to remove\n\n# LOCALIZATION NOTE (variablesEditButtonTooltip): The text that is displayed\n# in the variables list on a getter or setter which can be edited.\nvariablesEditButtonTooltip=Click to set value\n\n# LOCALIZATION NOTE (variablesEditableValueTooltip): The text that is displayed\n# in a tooltip on the \"open in inspector\" button in the the variables list for a\n# DOMNode item.\nvariablesDomNodeValueTooltip=Click to select the node in the inspector\n\n# LOCALIZATION NOTE (configurable|...|Tooltip): The text that is displayed\n# in the variables list on certain variables or properties as tooltips.\n# Expanations of what these represent can be found at the following links:\n# https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty\n# https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/isExtensible\n# https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/isFrozen\n# https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/isSealed\n# It's probably best to keep these in English.\nconfigurableTooltip=configurable\nenumerableTooltip=enumerable\nwritableTooltip=writable\nfrozenTooltip=frozen\nsealedTooltip=sealed\nextensibleTooltip=extensible\noverriddenTooltip=overridden\nWebIDLTooltip=WebIDL\n\n# LOCALIZATION NOTE (variablesSeparatorLabel): The text that is displayed\n# in the variables list as a separator between the name and value.\nvariablesSeparatorLabel=:\n\n# LOCALIZATION NOTE (watchExpressionsSeparatorLabel2): The text that is displayed\n# in the watch expressions list as a separator between the code and evaluation.\nwatchExpressionsSeparatorLabel2=\\u0020→\n\n# LOCALIZATION NOTE (functionSearchSeparatorLabel): The text that is displayed\n# in the functions search panel as a separator between function's inferred name\n# and its real name (if available).\nfunctionSearchSeparatorLabel=←\n\n# LOCALIZATION NOTE(symbolSearch.search.functionsPlaceholder): The placeholder\n# text displayed when the user searches for functions in a file\nsymbolSearch.search.functionsPlaceholder=Search functions…\n\n# LOCALIZATION NOTE(symbolSearch.search.variablesPlaceholder): The placeholder\n# text displayed when the user searches for variables in a file\nsymbolSearch.search.variablesPlaceholder=Search variables…\n\n# LOCALIZATION NOTE(symbolSearch.search.key2): The Key Shortcut for\n# searching for a function or variable\nsymbolSearch.search.key2=CmdOrCtrl+Shift+O\n\n# LOCALIZATION NOTE(symbolSearch.searchModifier.modifiersLabel): A label\n# preceding the group of modifiers\nsymbolSearch.searchModifier.modifiersLabel=Modifiers:\n\n# LOCALIZATION NOTE(symbolSearch.searchModifier.regex): A search option\n# when searching text in a file\nsymbolSearch.searchModifier.regex=Regex\n\n# LOCALIZATION NOTE(symbolSearch.searchModifier.caseSensitive): A search option\n# when searching text in a file\nsymbolSearch.searchModifier.caseSensitive=Case sensitive\n\n# LOCALIZATION NOTE(symbolSearch.searchModifier.wholeWord): A search option\n# when searching text in a file\nsymbolSearch.searchModifier.wholeWord=Whole word\n\n# LOCALIZATION NOTE (resumptionOrderPanelTitle): This is the text that appears\n# as a description in the notification panel popup, when multiple debuggers are\n# open in separate tabs and the user tries to resume them in the wrong order.\n# The substitution parameter is the URL of the last paused window that must be\n# resumed first.\nresumptionOrderPanelTitle=There are one or more paused debuggers. Please resume the most-recently paused debugger first at: %S\n\nvariablesViewOptimizedOut=(optimized away)\nvariablesViewUninitialized=(uninitialized)\nvariablesViewMissingArgs=(unavailable)\n\nanonymousSourcesLabel=Anonymous sources\n\nexperimental=This is an experimental feature\n\n# LOCALIZATION NOTE (whyPaused.debuggerStatement): The text that is displayed\n# in a info block explaining how the debugger is currently paused due to a `debugger`\n# statement in the code\nwhyPaused.debuggerStatement=Paused on debugger statement\n\n# LOCALIZATION NOTE (whyPaused.breakpoint): The text that is displayed\n# in a info block explaining how the debugger is currently paused on a breakpoint\nwhyPaused.breakpoint=Paused on breakpoint\n\n# LOCALIZATION NOTE (whyPaused.exception): The text that is displayed\n# in a info block explaining how the debugger is currently paused on an exception\nwhyPaused.exception=Paused on exception\n\n# LOCALIZATION NOTE (whyPaused.resumeLimit): The text that is displayed\n# in a info block explaining how the debugger is currently paused while stepping\n# in or out of the stack\nwhyPaused.resumeLimit=Paused while stepping\n\n# LOCALIZATION NOTE (whyPaused.pauseOnDOMEvents): The text that is displayed\n# in a info block explaining how the debugger is currently paused on a\n# dom event\nwhyPaused.pauseOnDOMEvents=Paused on event listener\n\n# LOCALIZATION NOTE (whyPaused.breakpointConditionThrown): The text that is displayed\n# in an info block when evaluating a conditional breakpoint throws an error\nwhyPaused.breakpointConditionThrown=Error with conditional breakpoint\n\n# LOCALIZATION NOTE (whyPaused.xhr): The text that is displayed\n# in a info block explaining how the debugger is currently paused on an\n# xml http request\nwhyPaused.xhr=Paused on XMLHttpRequest\n\n# LOCALIZATION NOTE (whyPaused.promiseRejection): The text that is displayed\n# in a info block explaining how the debugger is currently paused on a\n# promise rejection\nwhyPaused.promiseRejection=Paused on promise rejection\n\n# LOCALIZATION NOTE (whyPaused.assert): The text that is displayed\n# in a info block explaining how the debugger is currently paused on an\n# assert\nwhyPaused.assert=Paused on assertion\n\n# LOCALIZATION NOTE (whyPaused.debugCommand): The text that is displayed\n# in a info block explaining how the debugger is currently paused on a\n# debugger statement\nwhyPaused.debugCommand=Paused on debugged function\n\n# LOCALIZATION NOTE (whyPaused.other): The text that is displayed\n# in a info block explaining how the debugger is currently paused on an event\n# listener breakpoint set\nwhyPaused.other=Debugger paused\n\n# LOCALIZATION NOTE (ctrl): The text that is used for documenting\n# keyboard shortcuts that use the control key\nctrl=Ctrl\n\n# LOCALIZATION NOTE (anonymous): The text that is displayed when the\n# display name is null.\nanonymous=(anonymous)\n\n# LOCALIZATION NOTE (shortcuts.toggleBreakpoint): text describing\n# keyboard shortcut action for toggling breakpoint\nshortcuts.toggleBreakpoint=Toggle Breakpoint\n\n# LOCALIZATION NOTE (shortcuts.toggleCondPanel): text describing\n# keyboard shortcut action for toggling conditional panel keyboard\nshortcuts.toggleCondPanel=Toggle Conditional Panel\n\n# LOCALIZATION NOTE (shortcuts.pauseOrResume): text describing\n# keyboard shortcut action for pause of resume\nshortcuts.pauseOrResume=Pause/Resume\n\n# LOCALIZATION NOTE (shortcuts.stepOver): text describing\n# keyboard shortcut action for stepping over\nshortcuts.stepOver=Step Over\n\n# LOCALIZATION NOTE (shortcuts.stepIn): text describing\n# keyboard shortcut action for stepping in\nshortcuts.stepIn=Step In\n\n# LOCALIZATION NOTE (shortcuts.stepOut): text describing\n# keyboard shortcut action for stepping out\nshortcuts.stepOut=Step Out\n\n# LOCALIZATION NOTE (shortcuts.fileSearch): text describing\n# keyboard shortcut action for source file search\nshortcuts.fileSearch=Source File Search\n\n# LOCALIZATION NOTE (shortcuts.searchAgain): text describing\n# keyboard shortcut action for searching again\nshortcuts.searchAgain=Search Again\n\n# LOCALIZATION NOTE (shortcuts.projectSearch): text describing\n# keyboard shortcut action for full project search\nshortcuts.projectSearch=Full Project Search\n\n# LOCALIZATION NOTE (shortcuts.functionSearch): text describing\n# keyboard shortcut action for function search\nshortcuts.functionSearch=Function Search\n" /***/ }), /* 961 */, -/* 962 */, +/* 962 */ +/***/ (function(module, exports) { + +// removed by extract-text-webpack-plugin + +/***/ }), /* 963 */, /* 964 */, /* 965 */ @@ -38284,10 +38762,6 @@ Object.defineProperty(exports, "__esModule", { }); exports.getAndProcessFrames = getAndProcessFrames; -var _propTypes = __webpack_require__(20); - -var _propTypes2 = _interopRequireDefault(_propTypes); - var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); @@ -38304,9 +38778,9 @@ var _Frame = __webpack_require__(1013); var _Frame2 = _interopRequireDefault(_Frame); -var _Group = __webpack_require__(1015); +var _Group2 = __webpack_require__(1015); -var _Group2 = _interopRequireDefault(_Group); +var _Group3 = _interopRequireDefault(_Group2); var _WhyPaused = __webpack_require__(1120); @@ -38322,10 +38796,14 @@ var _clipboard = __webpack_require__(423); var _selectors = __webpack_require__(242); -__webpack_require__(1263); +__webpack_require__(914); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +var FrameComponent = (0, _react.createFactory)(_Frame2.default); + +var Group = (0, _react.createFactory)(_Group3.default); + var NUM_FRAMES_SHOWN = 7; class Frames extends _react.Component { @@ -38403,23 +38881,23 @@ class Frames extends _react.Component { return _react2.default.createElement( "ul", null, - framesOrGroups.map(frameOrGroup => frameOrGroup.id ? _react2.default.createElement(_Frame2.default, { + framesOrGroups.map(frameOrGroup => frameOrGroup.id ? FrameComponent({ frame: frameOrGroup, toggleFrameworkGrouping: this.toggleFrameworkGrouping, copyStackTrace: this.copyStackTrace, - frameworkGroupingOn: frameworkGroupingOn, - selectFrame: selectFrame, - selectedFrame: selectedFrame, - toggleBlackBox: toggleBlackBox, + frameworkGroupingOn, + selectFrame, + selectedFrame, + toggleBlackBox, key: frameOrGroup.id - }) : _react2.default.createElement(_Group2.default, { + }) : Group({ group: frameOrGroup, toggleFrameworkGrouping: this.toggleFrameworkGrouping, copyStackTrace: this.copyStackTrace, - frameworkGroupingOn: frameworkGroupingOn, - selectFrame: selectFrame, - selectedFrame: selectedFrame, - toggleBlackBox: toggleBlackBox, + frameworkGroupingOn, + selectFrame, + selectedFrame, + toggleBlackBox, key: frameOrGroup[0].id })) ); @@ -38469,13 +38947,13 @@ class Frames extends _react.Component { } Frames.propTypes = { - frames: _propTypes2.default.array, - frameworkGroupingOn: _propTypes2.default.bool.isRequired, - toggleFrameworkGrouping: _propTypes2.default.func.isRequired, - selectedFrame: _propTypes2.default.object, - selectFrame: _propTypes2.default.func.isRequired, - toggleBlackBox: _propTypes2.default.func, - pause: _propTypes2.default.object + frames: _react.PropTypes.array, + frameworkGroupingOn: _react.PropTypes.bool.isRequired, + toggleFrameworkGrouping: _react.PropTypes.func.isRequired, + selectedFrame: _react.PropTypes.object, + selectFrame: _react.PropTypes.func.isRequired, + toggleBlackBox: _react.PropTypes.func, + pause: _react.PropTypes.object }; function getSourceForFrame(sources, frame) { @@ -38747,10 +39225,6 @@ function isDojo(frame) { return getFrameUrl(frame).match(/dojo/i); } -function isPreact(frame) { - return getFrameUrl(frame).match(/preact/i); -} - function getLibraryFromUrl(frame) { // @TODO each of these fns calls getFrameUrl, just call it once // (assuming there's not more complex logic to identify a lib) @@ -38763,11 +39237,6 @@ function getLibraryFromUrl(frame) { return "jQuery"; } - // Needs to remain before "react", otherwise "react" can also match "preact" - if (isPreact(frame)) { - return "Preact"; - } - if (isReact(frame)) { return "React"; } @@ -39007,7 +39476,7 @@ var _FrameMenu = __webpack_require__(1032); var _FrameMenu2 = _interopRequireDefault(_FrameMenu); -__webpack_require__(1261); +__webpack_require__(909); var _Frame = __webpack_require__(1013); @@ -39015,6 +39484,8 @@ var _Frame2 = _interopRequireDefault(_Frame); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +var FrameComponent = (0, _react.createFactory)(_Frame2.default); + function FrameLocation(_ref) { var frame = _ref.frame; @@ -39031,19 +39502,16 @@ function FrameLocation(_ref) { ); } - FrameLocation.displayName = "FrameLocation"; class Group extends _react.Component { constructor() { super(...arguments); - - this.toggleFrames = () => { - this.setState({ expanded: !this.state.expanded }); - }; - this.state = { expanded: false }; + var self = this; + + self.toggleFrames = this.toggleFrames.bind(this); } onContextMenu(event) { @@ -39058,6 +39526,10 @@ class Group extends _react.Component { (0, _FrameMenu2.default)(frame, frameworkGroupingOn, { copyStackTrace, toggleFrameworkGrouping, toggleBlackBox }, event); } + toggleFrames() { + this.setState({ expanded: !this.state.expanded }); + } + renderFrames() { var _props2 = this.props, group = _props2.group, @@ -39076,17 +39548,17 @@ class Group extends _react.Component { return _react2.default.createElement( "div", { className: "frames-list" }, - group.map(frame => _react2.default.createElement(_Frame2.default, { - copyStackTrace: copyStackTrace, - frame: frame, - frameworkGroupingOn: frameworkGroupingOn, - hideLocation: true, + group.map(frame => FrameComponent({ + frame, + copyStackTrace, + toggleFrameworkGrouping, + frameworkGroupingOn, + selectFrame, + selectedFrame, + toggleBlackBox, key: frame.id, - selectedFrame: selectedFrame, - selectFrame: selectFrame, - shouldMapDisplayName: false, - toggleBlackBox: toggleBlackBox, - toggleFrameworkGrouping: toggleFrameworkGrouping + hideLocation: true, + shouldMapDisplayName: false })) ); } @@ -39249,7 +39721,7 @@ var _classnames = __webpack_require__(175); var _classnames2 = _interopRequireDefault(_classnames); -__webpack_require__(1252); +__webpack_require__(879); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -39783,7 +40255,7 @@ var _sources = __webpack_require__(254); var _promise = __webpack_require__(193); -var _parser = __webpack_require__(1208); +var _parser = __webpack_require__(827); var _devtoolsSourceMap = __webpack_require__(898); @@ -40006,10 +40478,6 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _propTypes = __webpack_require__(20); - -var _propTypes2 = _interopRequireDefault(_propTypes); - var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); @@ -40030,7 +40498,7 @@ var _SearchInput = __webpack_require__(377); var _SearchInput2 = _interopRequireDefault(_SearchInput); -__webpack_require__(1238); +__webpack_require__(866); var _sourcesTree = __webpack_require__(39); @@ -40238,17 +40706,17 @@ class TextSearch extends _react.Component { exports.default = TextSearch; TextSearch.propTypes = { - sources: _propTypes2.default.object, - results: _propTypes2.default.array, - query: _propTypes2.default.string, - closeActiveSearch: _propTypes2.default.func, - searchSources: _propTypes2.default.func, - selectSource: _propTypes2.default.func, - searchBottomBar: _propTypes2.default.object + sources: _react.PropTypes.object, + results: _react.PropTypes.array, + query: _react.PropTypes.string, + closeActiveSearch: _react.PropTypes.func, + searchSources: _react.PropTypes.func, + selectSource: _react.PropTypes.func, + searchBottomBar: _react.PropTypes.object }; TextSearch.contextTypes = { - shortcuts: _propTypes2.default.object + shortcuts: _react.PropTypes.object }; /***/ }), @@ -40302,7 +40770,31 @@ TextSearch.contextTypes = { /* 1112 */, /* 1113 */, /* 1114 */, -/* 1115 */, +/* 1115 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.findSourceMatches = exports.searchSources = exports.getMatches = exports.stopSearchWorker = exports.startSearchWorker = undefined; + +var _devtoolsUtils = __webpack_require__(900); + +var WorkerDispatcher = _devtoolsUtils.workerUtils.WorkerDispatcher; + + +var dispatcher = new WorkerDispatcher(); +var startSearchWorker = exports.startSearchWorker = dispatcher.start.bind(dispatcher); +var stopSearchWorker = exports.stopSearchWorker = dispatcher.stop.bind(dispatcher); + +var getMatches = exports.getMatches = dispatcher.task("getMatches"); +var searchSources = exports.searchSources = dispatcher.task("searchSources"); +var findSourceMatches = exports.findSourceMatches = dispatcher.task("findSourceMatches"); + +/***/ }), /* 1116 */, /* 1117 */ /***/ (function(module, exports) { @@ -40341,7 +40833,7 @@ var _lodash = __webpack_require__(2); var _pause = __webpack_require__(255); -__webpack_require__(1262); +__webpack_require__(913); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -40466,7 +40958,34 @@ function getInScopeLines(state) { module.exports = "" /***/ }), -/* 1127 */, +/* 1127 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.containsPosition = containsPosition; +exports.containsLocation = containsLocation; +exports.nodeContainsPosition = nodeContainsPosition; +function containsPosition(a, b) { + var startsBefore = a.start.line < b.line || a.start.line === b.line && a.start.column <= b.column; + var endsAfter = a.end.line > b.line || a.end.line === b.line && a.end.column >= b.column; + + return startsBefore && endsAfter; +} + +function containsLocation(a, b) { + return containsPosition(a, b.start) && containsPosition(a, b.end); +} + +function nodeContainsPosition(node, position) { + return containsPosition(node.loc, position); +} + +/***/ }), /* 1128 */ /***/ (function(module, exports, __webpack_require__) { @@ -40508,7 +41027,7 @@ function inToolbox() { } if (!inToolbox()) { - __webpack_require__(1224); + __webpack_require__(854); } function createPopup(doc) { @@ -41179,7 +41698,93 @@ function createSyncData(pendingBreakpoint, location, generatedLocation) { } /***/ }), -/* 1138 */, +/* 1138 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = buildQuery; + +var _escapeRegExp = __webpack_require__(259); + +var _escapeRegExp2 = _interopRequireDefault(_escapeRegExp); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Ignore doing outline matches for less than 3 whitespaces + * + * @memberof utils/source-search + * @static + */ +function ignoreWhiteSpace(str) { + return (/^\s{0,2}$/.test(str) ? "(?!\\s*.*)" : str + ); +} + + +function wholeMatch(query, wholeWord) { + if (query === "" || !wholeWord) { + return query; + } + + return `\\b${query}\\b`; +} + +function buildFlags(caseSensitive, isGlobal) { + if (caseSensitive && isGlobal) { + return "g"; + } + + if (!caseSensitive && isGlobal) { + return "gi"; + } + + if (!caseSensitive && !isGlobal) { + return "i"; + } + + return; +} + +function buildQuery(originalQuery, modifiers, _ref) { + var _ref$isGlobal = _ref.isGlobal, + isGlobal = _ref$isGlobal === undefined ? false : _ref$isGlobal, + _ref$ignoreSpaces = _ref.ignoreSpaces, + ignoreSpaces = _ref$ignoreSpaces === undefined ? false : _ref$ignoreSpaces; + var caseSensitive = modifiers.caseSensitive, + regexMatch = modifiers.regexMatch, + wholeWord = modifiers.wholeWord; + + + if (originalQuery === "") { + return new RegExp(originalQuery); + } + + var query = originalQuery; + if (ignoreSpaces) { + query = ignoreWhiteSpace(query); + } + + if (!regexMatch) { + query = (0, _escapeRegExp2.default)(query); + } + + query = wholeMatch(query, wholeWord); + var flags = buildFlags(caseSensitive, isGlobal); + + if (flags) { + return new RegExp(query, flags); + } + + return new RegExp(query); +} + +/***/ }), /* 1139 */ /***/ (function(module, exports, __webpack_require__) { @@ -41190,10 +41795,6 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _propTypes = __webpack_require__(20); - -var _propTypes2 = _interopRequireDefault(_propTypes); - var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); @@ -41222,7 +41823,7 @@ var _prefs = __webpack_require__(226); var _selectors = __webpack_require__(242); -__webpack_require__(1242); +__webpack_require__(869); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -41349,21 +41950,21 @@ class ProjectSearch extends _react.Component { } ProjectSearch.propTypes = { - sources: _propTypes2.default.object.isRequired, - results: _propTypes2.default.object, - textSearchQuery: _propTypes2.default.string, - setActiveSearch: _propTypes2.default.func.isRequired, - closeActiveSearch: _propTypes2.default.func.isRequired, - searchSources: _propTypes2.default.func, - activeSearch: _propTypes2.default.string, - selectSource: _propTypes2.default.func.isRequired, - sourceSearchQuery: _propTypes2.default.string, - setSourceSearchQuery: _propTypes2.default.func, - clearSourceSearchQuery: _propTypes2.default.func + sources: _react.PropTypes.object.isRequired, + results: _react.PropTypes.object, + textSearchQuery: _react.PropTypes.string, + setActiveSearch: _react.PropTypes.func.isRequired, + closeActiveSearch: _react.PropTypes.func.isRequired, + searchSources: _react.PropTypes.func, + activeSearch: _react.PropTypes.string, + selectSource: _react.PropTypes.func.isRequired, + sourceSearchQuery: _react.PropTypes.string, + setSourceSearchQuery: _react.PropTypes.func, + clearSourceSearchQuery: _react.PropTypes.func }; ProjectSearch.contextTypes = { - shortcuts: _propTypes2.default.object + shortcuts: _react.PropTypes.object }; exports.default = (0, _reactRedux.connect)(state => ({ @@ -41386,10 +41987,6 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _propTypes = __webpack_require__(20); - -var _propTypes2 = _interopRequireDefault(_propTypes); - var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); @@ -41441,7 +42038,7 @@ class SourceSearch extends _react.Component { exports.default = SourceSearch; SourceSearch.contextTypes = { - shortcuts: _propTypes2.default.object + shortcuts: _react.PropTypes.object }; /***/ }), @@ -41473,7 +42070,7 @@ var _selectors = __webpack_require__(242); var _devtoolsConfig = __webpack_require__(828); -__webpack_require__(1243); +__webpack_require__(870); var _classnames = __webpack_require__(175); @@ -41719,7 +42316,7 @@ var _actions2 = _interopRequireDefault(_actions); var _selectors = __webpack_require__(242); -__webpack_require__(1244); +__webpack_require__(871); var _PreviewFunction = __webpack_require__(798); @@ -41821,7 +42418,7 @@ var _actions2 = _interopRequireDefault(_actions); var _selectors = __webpack_require__(242); -__webpack_require__(1256); +__webpack_require__(1161); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -41892,10 +42489,6 @@ var _redux = __webpack_require__(3); var _reactRedux = __webpack_require__(1189); -var _propTypes = __webpack_require__(20); - -var _propTypes2 = _interopRequireDefault(_propTypes); - var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); @@ -42018,7 +42611,8 @@ class SourcesTree extends _react.Component { for (var source of newSet) { (0, _sourcesTree.addToTree)(uncollapsedTree, source, this.props.debuggeeUrl); } - sourceTree = (0, _sourcesTree.collapseTree)(uncollapsedTree); + var unsortedTree = (0, _sourcesTree.collapseTree)(uncollapsedTree); + sourceTree = (0, _sourcesTree.sortEntireTree)(unsortedTree, nextProps.debuggeeUrl); } this.setState({ @@ -42039,7 +42633,7 @@ class SourcesTree extends _react.Component { } getIcon(item, depth) { - if (item.path === "/Webpack") { + if (item.path === "/webpack://") { return _react2.default.createElement(_Svg2.default, { name: "webpack" }); } @@ -42082,16 +42676,17 @@ class SourcesTree extends _react.Component { renderItem(item, depth, focused, _, expanded, _ref) { var setExpanded = _ref.setExpanded; - var arrow = (0, _sourcesTree.nodeHasChildren)(item) ? _react2.default.createElement(_Svg2.default, { + var arrow = _react2.default.createElement(_Svg2.default, { name: "arrow", className: (0, _classnames2.default)({ - expanded: expanded + expanded: expanded, + hidden: !(0, _sourcesTree.nodeHasChildren)(item) }), onClick: e => { e.stopPropagation(); setExpanded(item, !expanded); } - }) : _react2.default.createElement("i", { className: "no-arrow" }); + }); var icon = this.getIcon(item, depth); var paddingDir = "paddingRight"; @@ -42103,7 +42698,7 @@ class SourcesTree extends _react.Component { "div", { className: (0, _classnames2.default)("node", { focused }), - style: { [paddingDir]: `${depth * 15 + 5}px` }, + style: { [paddingDir]: `${depth * 15}px` }, key: item.path, onClick: () => { this.selectItem(item); @@ -42180,12 +42775,12 @@ class SourcesTree extends _react.Component { SourcesTree.propTypes = { sources: _reactImmutableProptypes2.default.map.isRequired, - selectSource: _propTypes2.default.func.isRequired, - shownSource: _propTypes2.default.string, + selectSource: _react.PropTypes.func.isRequired, + shownSource: _react.PropTypes.string, selectedSource: _reactImmutableProptypes2.default.map, - debuggeeUrl: _propTypes2.default.string.isRequired, - setExpandedState: _propTypes2.default.func, - expanded: _propTypes2.default.any + debuggeeUrl: _react.PropTypes.string.isRequired, + setExpandedState: _react.PropTypes.func, + expanded: _react.PropTypes.any }; exports.default = (0, _reactRedux.connect)(state => { @@ -42213,7 +42808,7 @@ var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); -__webpack_require__(1265); +__webpack_require__(1162); var _reactRedux = __webpack_require__(1189); @@ -42327,7 +42922,7 @@ var _require = __webpack_require__(0), PropTypes = _require.PropTypes; var Tree = createFactory(__webpack_require__(1007).Tree); -__webpack_require__(1251); +__webpack_require__(878); var classnames = __webpack_require__(175); var Svg = __webpack_require__(1151); @@ -43514,8 +44109,18 @@ exports.default = (0, _reactRedux.connect)(state => { /***/ }), /* 1160 */, -/* 1161 */, -/* 1162 */, +/* 1161 */ +/***/ (function(module, exports) { + +// removed by extract-text-webpack-plugin + +/***/ }), +/* 1162 */ +/***/ (function(module, exports) { + +// removed by extract-text-webpack-plugin + +/***/ }), /* 1163 */, /* 1164 */, /* 1165 */ @@ -43569,34 +44174,37 @@ var _react = __webpack_require__(0); var _editor = __webpack_require__(257); -__webpack_require__(1255); +__webpack_require__(882); class CallSite extends _react.Component { constructor() { super(); - this.addCallSite = nextProps => { - var _ref = nextProps || this.props, - editor = _ref.editor, - callSite = _ref.callSite, - breakpoint = _ref.breakpoint, - source = _ref.source; - - var className = !breakpoint ? "call-site" : "call-site-bp"; - var sourceId = source.get("id"); - var editorRange = (0, _editor.toEditorRange)(sourceId, callSite.location); - this.marker = (0, _editor.markText)(editor, className, editorRange); - }; - - this.clearCallSite = () => { - if (this.marker) { - this.marker.clear(); - this.marker = null; - } - }; - this.marker = undefined; + var self = this; + self.addCallSite = this.addCallSite.bind(this); + self.clearCallSite = this.clearCallSite.bind(this); + } + + addCallSite(nextProps) { + var _ref = nextProps || this.props, + editor = _ref.editor, + callSite = _ref.callSite, + breakpoint = _ref.breakpoint, + source = _ref.source; + + var className = !breakpoint ? "call-site" : "call-site-bp"; + var sourceId = source.get("id"); + var editorRange = (0, _editor.toEditorRange)(sourceId, callSite.location); + this.marker = (0, _editor.markText)(editor, className, editorRange); + } + + clearCallSite() { + if (this.marker) { + this.marker.clear(); + this.marker = null; + } } shouldComponentUpdate(nextProps) { @@ -43803,10 +44411,20 @@ exports.findFunctionText = findFunctionText; var _astBreakpointLocation = __webpack_require__(804); -var _indentation = __webpack_require__(1214); - function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } +function getIndentation(lines) { + var firstLine = lines[0]; + var secondLine = lines[1]; + var lastLine = lines[lines.length - 1]; + + var _getIndentation = line => line && line.match(/^\s*/)[0].length; + + var indentations = [_getIndentation(firstLine), _getIndentation(secondLine), _getIndentation(lastLine)]; + + return Math.max.apply(Math, indentations.concat([0])); +} + function findFunctionText(line, source, symbols) { var func = (0, _astBreakpointLocation.findClosestScope)(symbols.functions, { line, column: Infinity }); if (!func) { @@ -43821,10 +44439,12 @@ function findFunctionText(line, source, symbols) { var firstLine = lines[start.line - 1].slice(start.column); var lastLine = lines[end.line - 1].slice(0, end.column); var middle = lines.slice(start.line, end.line - 1); - var functionText = [firstLine].concat(_toConsumableArray(middle), [lastLine]).join("\n"); - var indentedFunctionText = (0, _indentation.correctIndentation)(functionText); + var functionLines = [firstLine].concat(_toConsumableArray(middle), [lastLine]); - return indentedFunctionText; + var indentation = getIndentation(functionLines); + var formattedLines = functionLines.map(_line => _line.replace(new RegExp(`^\\s{0,${indentation - 1}}`), "")); + + return formattedLines.join("\n").trim(); } /***/ }), @@ -43838,10 +44458,6 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _propTypes = __webpack_require__(20); - -var _propTypes2 = _interopRequireDefault(_propTypes); - var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); @@ -43872,7 +44488,7 @@ var _ResultList = __webpack_require__(383); var _ResultList2 = _interopRequireDefault(_ResultList); -__webpack_require__(1271); +__webpack_require__(962); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -43890,141 +44506,19 @@ class SymbolModal extends _react.Component { constructor(props) { super(props); - - this.onClick = e => { - e.stopPropagation(); - }; - - this.onChange = e => { - var selectedSource = this.props.selectedSource; - - if (!selectedSource || !selectedSource.get("text")) { - return; - } - - this.setState({ query: e.target.value }); - return this.updateResults(e.target.value); - }; - - this.closeModal = () => { - this.props.closeActiveSearch(); - this.props.clearHighlightLineRange(); - }; - - this.selectResultItem = (e, item) => { - var _props = this.props, - selectSource = _props.selectSource, - selectedSource = _props.selectedSource; - - - if (!selectedSource || !item) { - return; - } - - selectSource(selectedSource.get("id"), { - line: item.location.start.line - }); - - this.closeModal(); - }; - - this.updateResults = query => { - var _props2 = this.props, - symbolType = _props2.symbolType, - symbols = _props2.symbols; - - - var symbolSearchResults = symbols[symbolType]; - if (query == "") { - this.setState({ results: symbolSearchResults }); - return; - } - - symbolSearchResults = (0, _fuzzaldrinPlus.filter)(symbolSearchResults, query, { - key: "value" - }); - - this.setState({ results: symbolSearchResults }); - }; - - this.traverseResults = direction => { - var _state = this.state, - resultsIndex = _state.resultsIndex, - results = _state.results; - - var resultCount = this.resultsCount(); - var index = resultsIndex + direction; - var nextIndex = (index + resultCount) % resultCount; - - this.setState({ resultsIndex: nextIndex }); - - if (results) { - this.onSelectResultItem(results[nextIndex]); - } - }; - - this.onKeyUp = e => { - e.preventDefault(); - var enabled = this.props.enabled; - var _state2 = this.state, - results = _state2.results, - resultsIndex = _state2.resultsIndex; - - - if (!enabled || !results) { - return; - } - - if (e.key === "ArrowUp") { - this.traverseResults(-1); - } else if (e.key === "ArrowDown") { - this.traverseResults(1); - } else if (e.key === "Enter") { - this.selectResultItem(e, results[resultsIndex]); - this.closeModal(); - } else if (e.key === "Tab") { - this.closeModal(); - } - }; - - this.renderResults = () => { - var _state3 = this.state, - resultsIndex = _state3.resultsIndex, - results = _state3.results; - var enabled = this.props.enabled; - - if (!enabled || !results) { - return null; - } - - return _react2.default.createElement(_ResultList2.default, { - key: "results", - items: results, - selected: resultsIndex, - selectItem: this.selectResultItem, - ref: "resultList" - }); - }; - - this.buildSummaryMsg = () => { - var resultsIndex = this.state.resultsIndex; - - var count = this.resultsCount(); - - if (count > 1) { - return L10N.getFormatStr("editor.searchResults", resultsIndex + 1, count); - } else if (count === 1) { - return L10N.getFormatStr("editor.singleResult"); - } - }; - - this.buildPlaceHolder = () => { - var symbolType = this.props.symbolType; - - return L10N.getFormatStr(`symbolSearch.search.${symbolType}Placeholder`); - }; - this.state = { results: null, query: "", resultsIndex: 0 }; + + var self = this; + self.onClick = this.onClick.bind(this); + self.closeModal = this.closeModal.bind(this); + self.onChange = this.onChange.bind(this); + self.onKeyUp = this.onKeyUp.bind(this); + self.updateResults = this.updateResults.bind(this); + self.traverseResults = this.traverseResults.bind(this); + self.renderResults = this.renderResults.bind(this); + self.buildSummaryMsg = this.buildSummaryMsg.bind(this); + self.buildPlaceHolder = this.buildPlaceHolder.bind(this); + self.selectResultItem = this.selectResultItem.bind(this); } componentDidMount() { @@ -44041,6 +44535,78 @@ class SymbolModal extends _react.Component { } } + onClick(e) { + e.stopPropagation(); + } + + onChange(e) { + var selectedSource = this.props.selectedSource; + + if (!selectedSource || !selectedSource.get("text")) { + return; + } + + this.setState({ query: e.target.value }); + return this.updateResults(e.target.value); + } + + closeModal() { + this.props.closeActiveSearch(); + this.props.clearHighlightLineRange(); + } + + selectResultItem(e, item) { + var _props = this.props, + selectSource = _props.selectSource, + selectedSource = _props.selectedSource; + + + if (!selectedSource || !item) { + return; + } + + selectSource(selectedSource.get("id"), { + line: item.location.start.line + }); + + this.closeModal(); + } + + updateResults(query) { + var _props2 = this.props, + symbolType = _props2.symbolType, + symbols = _props2.symbols; + + + var symbolSearchResults = symbols[symbolType]; + if (query == "") { + this.setState({ results: symbolSearchResults }); + return; + } + + symbolSearchResults = (0, _fuzzaldrinPlus.filter)(symbolSearchResults, query, { + key: "value" + }); + + this.setState({ results: symbolSearchResults }); + } + + traverseResults(direction) { + var _state = this.state, + resultsIndex = _state.resultsIndex, + results = _state.results; + + var resultCount = this.resultsCount(); + var index = resultsIndex + direction; + var nextIndex = (index + resultCount) % resultCount; + + this.setState({ resultsIndex: nextIndex }); + + if (results) { + this.onSelectResultItem(results[nextIndex]); + } + } + onSelectResultItem(item) { var _props3 = this.props, selectSource = _props3.selectSource, @@ -44064,6 +44630,49 @@ class SymbolModal extends _react.Component { } } + onKeyUp(e) { + e.preventDefault(); + var enabled = this.props.enabled; + var _state2 = this.state, + results = _state2.results, + resultsIndex = _state2.resultsIndex; + + + if (!enabled || !results) { + return; + } + + if (e.key === "ArrowUp") { + this.traverseResults(-1); + } else if (e.key === "ArrowDown") { + this.traverseResults(1); + } else if (e.key === "Enter") { + this.selectResultItem(e, results[resultsIndex]); + this.closeModal(); + } else if (e.key === "Tab") { + this.closeModal(); + } + } + + renderResults() { + var _state3 = this.state, + resultsIndex = _state3.resultsIndex, + results = _state3.results; + var enabled = this.props.enabled; + + if (!enabled || !results) { + return null; + } + + return _react2.default.createElement(_ResultList2.default, { + key: "results", + items: results, + selected: resultsIndex, + selectItem: this.selectResultItem, + ref: "resultList" + }); + } + renderInput() { var query = this.state.query; @@ -44085,10 +44694,28 @@ class SymbolModal extends _react.Component { ); } + buildSummaryMsg() { + var resultsIndex = this.state.resultsIndex; + + var count = this.resultsCount(); + + if (count > 1) { + return L10N.getFormatStr("editor.searchResults", resultsIndex + 1, count); + } else if (count === 1) { + return L10N.getFormatStr("editor.singleResult"); + } + } + resultsCount() { return this.state.results ? this.state.results.length : 0; } + buildPlaceHolder() { + var symbolType = this.props.symbolType; + + return L10N.getFormatStr(`symbolSearch.search.${symbolType}Placeholder`); + } + render() { var enabled = this.props.enabled; @@ -44107,7 +44734,7 @@ class SymbolModal extends _react.Component { } SymbolModal.contextTypes = { - shortcuts: _propTypes2.default.object + shortcuts: _react.PropTypes.object }; function _getFormattedSymbols(state, source) { @@ -44327,7 +44954,6 @@ exports.sanitizeInput = sanitizeInput; exports.wrapExpression = wrapExpression; exports.getValue = getValue; -var _indentation = __webpack_require__(1214); // replace quotes and slashes that could interfere with the evaluation. function sanitizeInput(input) { @@ -44343,13 +44969,13 @@ function sanitizeInput(input) { function wrapExpression(input) { - return (0, _indentation.correctIndentation)(` + return `eval(\` try { ${sanitizeInput(input)} } catch (e) { e } - `); + \`)`.trim(); } function getValue(expression) { @@ -44508,7 +45134,7 @@ var _classnames2 = _interopRequireDefault(_classnames); var _text = __webpack_require__(389); -__webpack_require__(1227); +__webpack_require__(1182); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -44628,10 +45254,17 @@ class ShortcutsModal extends _react.Component { ); } } + exports.ShortcutsModal = ShortcutsModal; +ShortcutsModal.displayName = "ShortcutsModal"; + +/***/ }), +/* 1182 */ +/***/ (function(module, exports) { + +// removed by extract-text-webpack-plugin /***/ }), -/* 1182 */, /* 1183 */ /***/ (function(module, exports) { @@ -44708,7 +45341,7 @@ var _Svg = __webpack_require__(344); var _Svg2 = _interopRequireDefault(_Svg); -__webpack_require__(1215); +__webpack_require__(918); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -44733,7 +45366,7 @@ function debugBtn(onClick, type, className, tooltip) { class UtilsBar extends _react.Component { renderUtilButtons() { - return [debugBtn(this.props.toggleShortcutsModal, "shortcut", "active", L10N.getStr("shortcuts.buttonName"), false)]; + return [debugBtn(this.props.toggleShortcutsModal, "shortcut", "active", "shortcuts", false)]; } render() { @@ -46116,687 +46749,6 @@ function replaceOriginalVariableName(expression, generatedScopes) { module.exports = { replaceOriginalVariableName }; -/***/ }), -/* 1207 */, -/* 1208 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.hasSyntaxError = exports.clearSources = exports.setSource = exports.hasSource = exports.getEmptyLines = exports.getNextStep = exports.clearASTs = exports.clearScopes = exports.clearSymbols = exports.getOutOfScopeLocations = exports.getVariablesInScope = exports.getScopes = exports.getSymbols = exports.getClosestExpression = exports.stopParserWorker = exports.startParserWorker = undefined; - -var _devtoolsUtils = __webpack_require__(900); - -var WorkerDispatcher = _devtoolsUtils.workerUtils.WorkerDispatcher; - - -var dispatcher = new WorkerDispatcher(); -var startParserWorker = exports.startParserWorker = dispatcher.start.bind(dispatcher); -var stopParserWorker = exports.stopParserWorker = dispatcher.stop.bind(dispatcher); - -var getClosestExpression = exports.getClosestExpression = dispatcher.task("getClosestExpression"); -var getSymbols = exports.getSymbols = dispatcher.task("getSymbols"); -var getScopes = exports.getScopes = dispatcher.task("getScopes"); -var getVariablesInScope = exports.getVariablesInScope = dispatcher.task("getVariablesInScope"); -var getOutOfScopeLocations = exports.getOutOfScopeLocations = dispatcher.task("getOutOfScopeLocations"); -var clearSymbols = exports.clearSymbols = dispatcher.task("clearSymbols"); -var clearScopes = exports.clearScopes = dispatcher.task("clearScopes"); -var clearASTs = exports.clearASTs = dispatcher.task("clearASTs"); -var getNextStep = exports.getNextStep = dispatcher.task("getNextStep"); -var getEmptyLines = exports.getEmptyLines = dispatcher.task("getEmptyLines"); -var hasSource = exports.hasSource = dispatcher.task("hasSource"); -var setSource = exports.setSource = dispatcher.task("setSource"); -var clearSources = exports.clearSources = dispatcher.task("clearSources"); -var hasSyntaxError = exports.hasSyntaxError = dispatcher.task("hasSyntaxError"); - -/***/ }), -/* 1209 */, -/* 1210 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.findSourceMatches = exports.searchSources = exports.getMatches = exports.stopSearchWorker = exports.startSearchWorker = undefined; - -var _devtoolsUtils = __webpack_require__(900); - -var WorkerDispatcher = _devtoolsUtils.workerUtils.WorkerDispatcher; - - -var dispatcher = new WorkerDispatcher(); -var startSearchWorker = exports.startSearchWorker = dispatcher.start.bind(dispatcher); -var stopSearchWorker = exports.stopSearchWorker = dispatcher.stop.bind(dispatcher); - -var getMatches = exports.getMatches = dispatcher.task("getMatches"); -var searchSources = exports.searchSources = dispatcher.task("searchSources"); -var findSourceMatches = exports.findSourceMatches = dispatcher.task("findSourceMatches"); - -/***/ }), -/* 1211 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = buildQuery; - -var _escapeRegExp = __webpack_require__(259); - -var _escapeRegExp2 = _interopRequireDefault(_escapeRegExp); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Ignore doing outline matches for less than 3 whitespaces - * - * @memberof utils/source-search - * @static - */ -function ignoreWhiteSpace(str) { - return (/^\s{0,2}$/.test(str) ? "(?!\\s*.*)" : str - ); -} - - -function wholeMatch(query, wholeWord) { - if (query === "" || !wholeWord) { - return query; - } - - return `\\b${query}\\b`; -} - -function buildFlags(caseSensitive, isGlobal) { - if (caseSensitive && isGlobal) { - return "g"; - } - - if (!caseSensitive && isGlobal) { - return "gi"; - } - - if (!caseSensitive && !isGlobal) { - return "i"; - } - - return; -} - -function buildQuery(originalQuery, modifiers, _ref) { - var _ref$isGlobal = _ref.isGlobal, - isGlobal = _ref$isGlobal === undefined ? false : _ref$isGlobal, - _ref$ignoreSpaces = _ref.ignoreSpaces, - ignoreSpaces = _ref$ignoreSpaces === undefined ? false : _ref$ignoreSpaces; - var caseSensitive = modifiers.caseSensitive, - regexMatch = modifiers.regexMatch, - wholeWord = modifiers.wholeWord; - - - if (originalQuery === "") { - return new RegExp(originalQuery); - } - - var query = originalQuery; - if (ignoreSpaces) { - query = ignoreWhiteSpace(query); - } - - if (!regexMatch) { - query = (0, _escapeRegExp2.default)(query); - } - - query = wholeMatch(query, wholeWord); - var flags = buildFlags(caseSensitive, isGlobal); - - if (flags) { - return new RegExp(query, flags); - } - - return new RegExp(query); -} - -/***/ }), -/* 1212 */, -/* 1213 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.prettyPrint = exports.stopPrettyPrintWorker = exports.startPrettyPrintWorker = undefined; - -var prettyPrint = exports.prettyPrint = (() => { - var _ref = _asyncToGenerator(function* (_ref2) { - var source = _ref2.source, - url = _ref2.url; - - var indent = 2; - - (0, _assert2.default)((0, _source.isJavaScript)(source), "Can't prettify non-javascript files."); - - return yield _prettyPrint({ - url, - indent, - source: source.text - }); - }); - - return function prettyPrint(_x) { - return _ref.apply(this, arguments); - }; -})(); - -var _devtoolsUtils = __webpack_require__(900); - -var _source = __webpack_require__(233); - -var _assert = __webpack_require__(223); - -var _assert2 = _interopRequireDefault(_assert); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; } - -var WorkerDispatcher = _devtoolsUtils.workerUtils.WorkerDispatcher; - - -var dispatcher = new WorkerDispatcher(); -var startPrettyPrintWorker = exports.startPrettyPrintWorker = dispatcher.start.bind(dispatcher); -var stopPrettyPrintWorker = exports.stopPrettyPrintWorker = dispatcher.stop.bind(dispatcher); -var _prettyPrint = dispatcher.task("prettyPrint"); - -/***/ }), -/* 1214 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.correctIndentation = correctIndentation; -function getIndentation(lines) { - var firstLine = lines[0]; - var secondLine = lines[1]; - var lastLine = lines[lines.length - 1]; - - var _getIndentation = line => line && line.match(/^\s*/)[0].length; - - var indentations = [_getIndentation(firstLine), _getIndentation(secondLine), _getIndentation(lastLine)]; - - return Math.max.apply(Math, indentations); -} - -function correctIndentation(text) { - var lines = text.trim().split("\n"); - var indentation = getIndentation(lines); - var formattedLines = lines.map(_line => _line.replace(new RegExp(`^\\s{0,${indentation - 1}}`), "")); - - return formattedLines.join("\n"); -} - -/***/ }), -/* 1215 */ -/***/ (function(module, exports) { - -// removed by extract-text-webpack-plugin - -/***/ }), -/* 1216 */ -/***/ (function(module, exports) { - -// removed by extract-text-webpack-plugin - -/***/ }), -/* 1217 */, -/* 1218 */, -/* 1219 */, -/* 1220 */, -/* 1221 */ -/***/ (function(module, exports) { - -// removed by extract-text-webpack-plugin - -/***/ }), -/* 1222 */ -/***/ (function(module, exports) { - -// removed by extract-text-webpack-plugin - -/***/ }), -/* 1223 */ -/***/ (function(module, exports) { - -// removed by extract-text-webpack-plugin - -/***/ }), -/* 1224 */ -/***/ (function(module, exports) { - -// removed by extract-text-webpack-plugin - -/***/ }), -/* 1225 */ -/***/ (function(module, exports) { - -// removed by extract-text-webpack-plugin - -/***/ }), -/* 1226 */ -/***/ (function(module, exports) { - -// removed by extract-text-webpack-plugin - -/***/ }), -/* 1227 */ -/***/ (function(module, exports) { - -// removed by extract-text-webpack-plugin - -/***/ }), -/* 1228 */ -/***/ (function(module, exports) { - -// removed by extract-text-webpack-plugin - -/***/ }), -/* 1229 */ -/***/ (function(module, exports) { - -// removed by extract-text-webpack-plugin - -/***/ }), -/* 1230 */ -/***/ (function(module, exports) { - -// removed by extract-text-webpack-plugin - -/***/ }), -/* 1231 */ -/***/ (function(module, exports) { - -// removed by extract-text-webpack-plugin - -/***/ }), -/* 1232 */ -/***/ (function(module, exports) { - -// removed by extract-text-webpack-plugin - -/***/ }), -/* 1233 */ -/***/ (function(module, exports) { - -module.exports = "" - -/***/ }), -/* 1234 */ -/***/ (function(module, exports) { - -// removed by extract-text-webpack-plugin - -/***/ }), -/* 1235 */ -/***/ (function(module, exports) { - -// removed by extract-text-webpack-plugin - -/***/ }), -/* 1236 */ -/***/ (function(module, exports) { - -// removed by extract-text-webpack-plugin - -/***/ }), -/* 1237 */ -/***/ (function(module, exports) { - -// removed by extract-text-webpack-plugin - -/***/ }), -/* 1238 */ -/***/ (function(module, exports) { - -// removed by extract-text-webpack-plugin - -/***/ }), -/* 1239 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.getDomain = getDomain; -exports.findNodeInContents = findNodeInContents; -exports.createTreeNodeMatcher = createTreeNodeMatcher; - -var _url = __webpack_require__(334); - -var _utils = __webpack_require__(18); - -/* - * Gets domain from url (without www prefix) - */ -function getDomain(url) { - var _parse = (0, _url.parse)(url), - host = _parse.host; - - if (!host) { - return null; - } - return host.startsWith("www.") ? host.substr("www.".length) : host; -} - -/* - * Checks if node name matches debugger host/domain. - */ -function isExactDomainMatch(part, debuggeeHost) { - return part.startsWith("www.") ? part.substr("www.".length) === debuggeeHost : part === debuggeeHost; -} - -/* - * Function to assist with node search for a defined sorted order, see e.g. - * `createTreeNodeMatcher`. Returns negative number if the node - * stands earlier in sorting order, positive number if the node stands later - * in sorting order, or zero if the node is found. - */ - - -/* - * Performs a binary search to insert a node into contents. Returns positive - * number, index of the found child, or negative number, which can be used - * to calculate a position where a new node can be inserted (`-index - 1`). - * The matcher is a function that returns result of comparision of a node with - * lookup value. - */ -function findNodeInContents(tree, matcher) { - var contents = tree.contents; - - if (contents.length === 0) { - return { found: false, index: 0 }; - } - var left = 0; - var right = contents.length - 1; - while (left < right) { - var middle = Math.floor((left + right) / 2); - if (matcher(contents[middle]) < 0) { - left = middle + 1; - } else { - right = middle; - } - } - var result = matcher(contents[left]); - if (result === 0) { - return { found: true, index: left }; - } - return { found: false, index: result > 0 ? left : left + 1 }; -} - -var IndexName = "(index)"; - -function createTreeNodeMatcherWithIndex() { - return node => node.name === IndexName ? 0 : 1; -} - -function createTreeNodeMatcherWithDebuggeeHost(debuggeeHost) { - return node => { - if (node.name === IndexName) { - return -1; - } - return isExactDomainMatch(node.name, debuggeeHost) ? 0 : 1; - }; -} - -function createTreeNodeMatcherWithNameAndOther(part, isDir, debuggeeHost) { - return node => { - if (node.name === IndexName) { - return -1; - } - if (debuggeeHost && isExactDomainMatch(node.name, debuggeeHost)) { - return -1; - } - var nodeIsDir = (0, _utils.nodeHasChildren)(node); - if (nodeIsDir && !isDir) { - return -1; - } else if (!nodeIsDir && isDir) { - return 1; - } - return node.name.localeCompare(part); - }; -} - -/* - * Creates a matcher for findNodeInContents. - * The sorting order of nodes during comparison is: - * - "(index)" node - * - root node with the debuggee host/domain - * - hosts/directories (not files) sorted by name - * - files sorted by name - */ -function createTreeNodeMatcher(part, isDir, debuggeeHost) { - if (part === IndexName) { - // Specialied matcher, when we are looking for "(index)" position. - return createTreeNodeMatcherWithIndex(); - } - if (debuggeeHost && isExactDomainMatch(part, debuggeeHost)) { - // Specialied matcher, when we are looking for domain position. - return createTreeNodeMatcherWithDebuggeeHost(debuggeeHost); - } - // Rest of the cases, without mentioned above. - return createTreeNodeMatcherWithNameAndOther(part, isDir, debuggeeHost); -} - -/***/ }), -/* 1240 */ -/***/ (function(module, exports) { - -// removed by extract-text-webpack-plugin - -/***/ }), -/* 1241 */ -/***/ (function(module, exports) { - -// removed by extract-text-webpack-plugin - -/***/ }), -/* 1242 */ -/***/ (function(module, exports) { - -// removed by extract-text-webpack-plugin - -/***/ }), -/* 1243 */ -/***/ (function(module, exports) { - -// removed by extract-text-webpack-plugin - -/***/ }), -/* 1244 */ -/***/ (function(module, exports) { - -// removed by extract-text-webpack-plugin - -/***/ }), -/* 1245 */ -/***/ (function(module, exports) { - -// removed by extract-text-webpack-plugin - -/***/ }), -/* 1246 */ -/***/ (function(module, exports) { - -// removed by extract-text-webpack-plugin - -/***/ }), -/* 1247 */ -/***/ (function(module, exports) { - -// removed by extract-text-webpack-plugin - -/***/ }), -/* 1248 */ -/***/ (function(module, exports) { - -// removed by extract-text-webpack-plugin - -/***/ }), -/* 1249 */ -/***/ (function(module, exports) { - -// removed by extract-text-webpack-plugin - -/***/ }), -/* 1250 */ -/***/ (function(module, exports) { - -// removed by extract-text-webpack-plugin - -/***/ }), -/* 1251 */ -/***/ (function(module, exports) { - -// removed by extract-text-webpack-plugin - -/***/ }), -/* 1252 */ -/***/ (function(module, exports) { - -// removed by extract-text-webpack-plugin - -/***/ }), -/* 1253 */ -/***/ (function(module, exports) { - -// removed by extract-text-webpack-plugin - -/***/ }), -/* 1254 */ -/***/ (function(module, exports) { - -// removed by extract-text-webpack-plugin - -/***/ }), -/* 1255 */ -/***/ (function(module, exports) { - -// removed by extract-text-webpack-plugin - -/***/ }), -/* 1256 */ -/***/ (function(module, exports) { - -// removed by extract-text-webpack-plugin - -/***/ }), -/* 1257 */ -/***/ (function(module, exports) { - -// removed by extract-text-webpack-plugin - -/***/ }), -/* 1258 */ -/***/ (function(module, exports) { - -// removed by extract-text-webpack-plugin - -/***/ }), -/* 1259 */ -/***/ (function(module, exports) { - -// removed by extract-text-webpack-plugin - -/***/ }), -/* 1260 */ -/***/ (function(module, exports) { - -// removed by extract-text-webpack-plugin - -/***/ }), -/* 1261 */ -/***/ (function(module, exports) { - -// removed by extract-text-webpack-plugin - -/***/ }), -/* 1262 */ -/***/ (function(module, exports) { - -// removed by extract-text-webpack-plugin - -/***/ }), -/* 1263 */ -/***/ (function(module, exports) { - -// removed by extract-text-webpack-plugin - -/***/ }), -/* 1264 */ -/***/ (function(module, exports) { - -// removed by extract-text-webpack-plugin - -/***/ }), -/* 1265 */ -/***/ (function(module, exports) { - -// removed by extract-text-webpack-plugin - -/***/ }), -/* 1266 */ -/***/ (function(module, exports) { - -// removed by extract-text-webpack-plugin - -/***/ }), -/* 1267 */ -/***/ (function(module, exports) { - -// removed by extract-text-webpack-plugin - -/***/ }), -/* 1268 */ -/***/ (function(module, exports) { - -// removed by extract-text-webpack-plugin - -/***/ }), -/* 1269 */ -/***/ (function(module, exports) { - -// removed by extract-text-webpack-plugin - -/***/ }), -/* 1270 */ -/***/ (function(module, exports) { - -// removed by extract-text-webpack-plugin - -/***/ }), -/* 1271 */ -/***/ (function(module, exports) { - -// removed by extract-text-webpack-plugin - /***/ }) /******/ ]); }); \ No newline at end of file diff --git a/devtools/client/debugger/new/parser-worker.js b/devtools/client/debugger/new/parser-worker.js index a217da70f4bb..7eeeffbba271 100644 --- a/devtools/client/debugger/new/parser-worker.js +++ b/devtools/client/debugger/new/parser-worker.js @@ -70,7 +70,7 @@ return /******/ (function(modules) { // webpackBootstrap /******/ __webpack_require__.p = "/assets/build"; /******/ /******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 1272); +/******/ return __webpack_require__(__webpack_require__.s = 339); /******/ }) /************************************************************************/ /******/ ([ @@ -3849,7 +3849,13 @@ module.exports = toNumber; /* 336 */, /* 337 */, /* 338 */, -/* 339 */, +/* 339 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = __webpack_require__(961); + + +/***/ }), /* 340 */ /***/ (function(module, exports, __webpack_require__) { @@ -28464,7 +28470,63 @@ module.exports = basePropertyDeep; /***/ }), -/* 842 */, +/* 842 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +exports.getNextStep = getNextStep; + +var _debuggerHtml = __webpack_require__(843); + +var _types = __webpack_require__(844); + +var _closest = __webpack_require__(1055); + +var _helpers = __webpack_require__(1052); + +function getNextStep(source, pausedPosition) { + var awaitExpression = getAwaitExpression(source, pausedPosition); + if (!awaitExpression) { + return null; + } + var awaitStatement = awaitExpression.getStatementParent(); + return getLocationAfterAwaitExpression(awaitStatement, pausedPosition); +} + +function getAwaitExpression(source, pausedPosition) { + var closestPath = (0, _closest.getClosestPath)(source, pausedPosition); + + if (!closestPath) { + return null; + } + + if ((0, _helpers.isAwaitExpression)(closestPath)) { + return closestPath; + } + + return closestPath.find(p => p.isAwaitExpression()); +} + +function getLocationAfterAwaitExpression(statement, position) { + var nextStatement = statement.getSibling(statement.key + 1); + if (nextStatement.node) { + return _extends({}, nextStatement.node.loc.start, { + sourceId: position.sourceId + }); + } + + return null; +} + +/***/ }), /* 843 */ /***/ (function(module, exports, __webpack_require__) { @@ -28472,8 +28534,72 @@ module.exports = basePropertyDeep; /***/ }), -/* 844 */, -/* 845 */, +/* 844 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/***/ }), +/* 845 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = getEmptyLines; + +var _uniq = __webpack_require__(561); + +var _uniq2 = _interopRequireDefault(_uniq); + +var _difference = __webpack_require__(1129); + +var _difference2 = _interopRequireDefault(_difference); + +var _ast = __webpack_require__(1051); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var commentTokens = ["CommentBlock", "CommentLine"]; + +function fillRange(start, end) { + return Array(end - start + 1).fill().map((item, index) => start + index); +} + +// Populates a pre-filled array of every line number, +// then removes lines which were found to be executable +function getLines(ast) { + return fillRange(0, ast.tokens[ast.tokens.length - 1].loc.end.line); +} + +// The following sequence stores lines which have executable code +// (contents other than comments or EOF, regardless of line position) +function getExecutableLines(ast) { + var lines = ast.tokens.filter(token => !commentTokens.includes(token.type) && (!token.type || token.type.label && token.type.label != "eof")).map(token => token.loc.start.line - 1); + + return (0, _uniq2.default)(lines); +} + +function getEmptyLines(sourceToJS) { + if (!sourceToJS) { + return null; + } + + var ast = (0, _ast.getAst)(sourceToJS); + if (!ast || !ast.comments) { + return []; + } + + var executableLines = getExecutableLines(ast); + var lines = getLines(ast); + return (0, _difference2.default)(lines, executableLines); +} + +/***/ }), /* 846 */, /* 847 */, /* 848 */, @@ -28761,7 +28887,65 @@ module.exports = { /* 958 */, /* 959 */, /* 960 */, -/* 961 */, +/* 961 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _closest = __webpack_require__(1055); + +var _scopes = __webpack_require__(1049); + +var _getSymbols = __webpack_require__(1050); + +var _getSymbols2 = _interopRequireDefault(_getSymbols); + +var _ast = __webpack_require__(1051); + +var _getScopes = __webpack_require__(1186); + +var _getScopes2 = _interopRequireDefault(_getScopes); + +var _sources = __webpack_require__(1171); + +var _getOutOfScopeLocations = __webpack_require__(1072); + +var _getOutOfScopeLocations2 = _interopRequireDefault(_getOutOfScopeLocations); + +var _steps = __webpack_require__(842); + +var _getEmptyLines = __webpack_require__(845); + +var _getEmptyLines2 = _interopRequireDefault(_getEmptyLines); + +var _validate = __webpack_require__(1207); + +var _devtoolsUtils = __webpack_require__(900); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var workerHandler = _devtoolsUtils.workerUtils.workerHandler; + + +self.onmessage = workerHandler({ + getClosestExpression: _closest.getClosestExpression, + getOutOfScopeLocations: _getOutOfScopeLocations2.default, + getSymbols: _getSymbols2.default, + getScopes: _getScopes2.default, + clearSymbols: _getSymbols.clearSymbols, + clearScopes: _getScopes.clearScopes, + clearASTs: _ast.clearASTs, + hasSource: _sources.hasSource, + setSource: _sources.setSource, + clearSources: _sources.clearSources, + getVariablesInScope: _scopes.getVariablesInScope, + getNextStep: _steps.getNextStep, + getEmptyLines: _getEmptyLines2.default, + hasSyntaxError: _validate.hasSyntaxError +}); + +/***/ }), /* 962 */, /* 963 */ /***/ (function(module, exports, __webpack_require__) { @@ -29076,13 +29260,787 @@ exports.parseScriptTags = parseScriptTags; /* 1046 */, /* 1047 */, /* 1048 */, -/* 1049 */, -/* 1050 */, -/* 1051 */, -/* 1052 */, -/* 1053 */, +/* 1049 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); + +exports.getVariablesInLocalScope = getVariablesInLocalScope; +exports.getVariablesInScope = getVariablesInScope; +exports.isExpressionInScope = isExpressionInScope; + +var _toPairs = __webpack_require__(795); + +var _toPairs2 = _interopRequireDefault(_toPairs); + +var _uniq = __webpack_require__(561); + +var _uniq2 = _interopRequireDefault(_uniq); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } + +function getScopeVariables(scope) { + var bindings = scope.bindings; + + + return (0, _toPairs2.default)(bindings).map((_ref) => { + var _ref2 = _slicedToArray(_ref, 2), + name = _ref2[0], + binding = _ref2[1]; + + return { + name, + references: binding.referencePaths + }; + }); +} + +function getScopeChain(scope) { + var scopes = []; + + do { + scopes.push(scope); + } while (scope = scope.parent); + + return scopes; +} + +function getVariablesInLocalScope(scope) { + return getScopeVariables(scope); +} + +function getVariablesInScope(scope) { + var _ref3; + + var scopes = getScopeChain(scope); + var scopeVars = scopes.map(getScopeVariables); + var vars = (_ref3 = [{ name: "this" }, { name: "arguments" }]).concat.apply(_ref3, _toConsumableArray(scopeVars)).map(variable => variable.name); + return (0, _uniq2.default)(vars); +} + +function isExpressionInScope(expression, scope) { + if (!scope) { + return false; + } + + var variables = getVariablesInScope(scope); + var firstPart = expression.split(/\./)[0]; + return variables.includes(firstPart); +} + +/***/ }), +/* 1050 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = getSymbols; +exports.formatSymbols = formatSymbols; +exports.clearSymbols = clearSymbols; + +var _ast = __webpack_require__(1051); + +var _helpers = __webpack_require__(1052); + +var _babelTypes = __webpack_require__(493); + +var t = _interopRequireWildcard(_babelTypes); + +var _getFunctionName = __webpack_require__(1053); + +var _getFunctionName2 = _interopRequireDefault(_getFunctionName); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } + +var symbolDeclarations = new Map(); + +function getFunctionParameterNames(path) { + return path.node.params.map(param => param.name); +} + +function getVariableNames(path) { + if (t.isObjectProperty(path) && !(0, _helpers.isFunction)(path.node.value)) { + return [{ + name: path.node.key.name, + location: path.node.loc + }]; + } + + if (!path.node.declarations) { + return path.node.params.map(dec => ({ + name: dec.name, + location: dec.loc + })); + } + + return path.node.declarations.map(dec => ({ + name: dec.id.name, + location: dec.loc + })); +} + +function getComments(ast) { + if (!ast || !ast.comments) { + return []; + } + return ast.comments.map(comment => ({ + name: comment.location, + location: comment.loc + })); +} + +function getClassName(path) { + var classDeclaration = path.findParent(_p => _p.isClassDeclaration()); + if (!classDeclaration) { + return null; + } + + return classDeclaration.node.id.name; +} + +function extractSymbols(source) { + var functions = []; + var variables = []; + var memberExpressions = []; + var callExpressions = []; + var objectProperties = []; + var identifiers = []; + + var ast = (0, _ast.traverseAst)(source, { + enter(path) { + if ((0, _helpers.isVariable)(path)) { + variables.push.apply(variables, _toConsumableArray(getVariableNames(path))); + } + + if ((0, _helpers.isFunction)(path)) { + functions.push({ + name: (0, _getFunctionName2.default)(path), + klass: getClassName(path), + location: path.node.loc, + parameterNames: getFunctionParameterNames(path), + identifier: path.node.id + }); + } + + if (t.isClassDeclaration(path)) { + variables.push({ + name: path.node.id.name, + location: path.node.loc + }); + } + + if (t.isObjectProperty(path)) { + var _path$node$key$loc = path.node.key.loc, + start = _path$node$key$loc.start, + end = _path$node$key$loc.end, + identifierName = _path$node$key$loc.identifierName; + + objectProperties.push({ + name: identifierName, + location: { start, end }, + expression: getSnippet(path) + }); + } + + if (t.isMemberExpression(path)) { + var _path$node$property$l = path.node.property.loc, + _start = _path$node$property$l.start, + _end = _path$node$property$l.end; + + memberExpressions.push({ + name: path.node.property.name, + location: { start: _start, end: _end }, + expressionLocation: path.node.loc, + expression: getSnippet(path) + }); + } + + if (t.isCallExpression(path)) { + var callee = path.node.callee; + if (!t.isMemberExpression(callee)) { + var _callee$loc = callee.loc, + _start2 = _callee$loc.start, + _end2 = _callee$loc.end, + _identifierName = _callee$loc.identifierName; + + callExpressions.push({ + name: _identifierName, + location: { start: _start2, end: _end2 } + }); + } + } + + if (t.isIdentifier(path)) { + var _path$node$loc = path.node.loc, + _start3 = _path$node$loc.start, + _end3 = _path$node$loc.end; + + + identifiers.push({ + name: path.node.name, + expression: path.node.name, + location: { start: _start3, end: _end3 } + }); + } + + if (t.isThisExpression(path.node)) { + var _path$node$loc2 = path.node.loc, + _start4 = _path$node$loc2.start, + _end4 = _path$node$loc2.end; + + identifiers.push({ + name: "this", + location: { start: _start4, end: _end4 }, + expressionLocation: path.node.loc, + expression: "this" + }); + } + + if (t.isVariableDeclarator(path)) { + var node = path.node.id; + var _path$node$loc3 = path.node.loc, + _start5 = _path$node$loc3.start, + _end5 = _path$node$loc3.end; + + + identifiers.push({ + name: node.name, + expression: node.name, + location: { start: _start5, end: _end5 } + }); + } + } + }); + + // comments are extracted separately from the AST + var comments = getComments(ast); + + return { + functions, + variables, + callExpressions, + memberExpressions, + objectProperties, + comments, + identifiers + }; +} + +function getSymbols(source) { + if (symbolDeclarations.has(source.id)) { + var _symbols = symbolDeclarations.get(source.id); + if (_symbols) { + return _symbols; + } + } + + var symbols = extractSymbols(source); + symbolDeclarations.set(source.id, symbols); + return symbols; +} + +function extendSnippet(name, expression, path, prevPath) { + var computed = path && path.node.computed; + var prevComputed = prevPath && prevPath.node.computed; + var prevArray = t.isArrayExpression(prevPath); + var array = t.isArrayExpression(path); + + if (expression === "") { + if (computed) { + return `[${name}]`; + } + return name; + } + + if (computed || array) { + if (prevComputed || prevArray) { + return `[${name}]${expression}`; + } + return `[${name}].${expression}`; + } + + if (prevComputed || prevArray) { + return `${name}${expression}`; + } + + return `${name}.${expression}`; +} + +function getMemberSnippet(node) { + var expression = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ""; + + if (t.isMemberExpression(node)) { + var _name = node.property.name; + + return getMemberSnippet(node.object, extendSnippet(_name, expression)); + } + + if (t.isCallExpression(node)) { + return ""; + } + + if (t.isThisExpression(node)) { + return `this.${expression}`; + } + + if (t.isIdentifier(node)) { + return `${node.name}.${expression}`; + } + + return expression; +} + +function getObjectSnippet(path, prevPath) { + var expression = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ""; + + if (!path) { + return expression; + } + + var name = path.node.key.name; + + var extendedExpression = extendSnippet(name, expression, path, prevPath); + + var nextPrevPath = path; + var nextPath = path.parentPath && path.parentPath.parentPath; + + return getSnippet(nextPath, nextPrevPath, extendedExpression); +} + +function getArraySnippet(path, prevPath, expression) { + var index = prevPath.parentPath.key; + var extendedExpression = extendSnippet(index, expression, path, prevPath); + + var nextPrevPath = path; + var nextPath = path.parentPath && path.parentPath.parentPath; + + return getSnippet(nextPath, nextPrevPath, extendedExpression); +} + +function getSnippet(path, prevPath) { + var expression = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ""; + + if (t.isVariableDeclaration(path)) { + var node = path.node.declarations[0]; + var _name2 = node.id.name; + return extendSnippet(_name2, expression, path, prevPath); + } + + if (t.isVariableDeclarator(path)) { + var _node = path.node.id; + if (t.isObjectPattern(_node)) { + return expression; + } + + var _name3 = _node.name; + var prop = extendSnippet(_name3, expression, path, prevPath); + return prop; + } + + if (t.isAssignmentExpression(path)) { + var _node2 = path.node.left; + var _name4 = t.isMemberExpression(_node2) ? getMemberSnippet(_node2) : _node2.name; + + var _prop = extendSnippet(_name4, expression, path, prevPath); + return _prop; + } + + if ((0, _helpers.isFunction)(path)) { + return expression; + } + + if (t.isIdentifier(path)) { + var _node3 = path.node; + return `${_node3.name}.${expression}`; + } + + if (t.isObjectProperty(path)) { + return getObjectSnippet(path, prevPath, expression); + } + + if (t.isObjectExpression(path)) { + var parentPath = prevPath && prevPath.parentPath; + return getObjectSnippet(parentPath, prevPath, expression); + } + + if (t.isMemberExpression(path)) { + return getMemberSnippet(path.node, expression); + } + + if (t.isArrayExpression(path)) { + return getArraySnippet(path, prevPath, expression); + } +} + +function formatSymbols(source) { + var symbols = getSymbols(source); + + function formatLocation(loc) { + if (!loc) { + return ""; + } + var start = loc.start, + end = loc.end; + + + var startLoc = `(${start.line}, ${start.column})`; + var endLoc = `(${end.line}, ${end.column})`; + return `[${startLoc}, ${endLoc}]`; + } + + function summarize(symbol) { + var loc = formatLocation(symbol.location); + var exprLoc = formatLocation(symbol.expressionLocation); + var params = symbol.parameterNames ? symbol.parameterNames.join(", ") : ""; + var expression = symbol.expression || ""; + var klass = symbol.klass || ""; + return `${loc} ${exprLoc} ${expression} ${symbol.name} ${params} ${klass}`; + } + + return Object.keys(symbols).map(name => `${name}:\n ${symbols[name].map(summarize).join("\n")}`); +} + +function clearSymbols() { + symbolDeclarations = new Map(); +} + +/***/ }), +/* 1051 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.parseExpression = parseExpression; +exports.getAst = getAst; +exports.clearASTs = clearASTs; +exports.traverseAst = traverseAst; + +var _parseScriptTags = __webpack_require__(1023); + +var _parseScriptTags2 = _interopRequireDefault(_parseScriptTags); + +var _babylon = __webpack_require__(435); + +var babylon = _interopRequireWildcard(_babylon); + +var _babelTraverse = __webpack_require__(436); + +var _babelTraverse2 = _interopRequireDefault(_babelTraverse); + +var _isEmpty = __webpack_require__(963); + +var _isEmpty2 = _interopRequireDefault(_isEmpty); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var ASTs = new Map(); + +function _parse(code, opts) { + return babylon.parse(code, Object.assign({}, opts, { + sourceType: "module", + plugins: ["jsx", "flow", "objectRestSpread"] + })); +} + +function parse(text, opts) { + var ast = void 0; + if (!text) { + return; + } + + try { + ast = _parse(text, opts); + } catch (error) { + ast = {}; + } + + return ast; +} + +// Custom parser for parse-script-tags that adapts its input structure to +// our parser's signature +function htmlParser(_ref) { + var source = _ref.source, + line = _ref.line; + + return parse(source, { + startLine: line + }); +} + +function parseExpression(expression, opts) { + return babylon.parseExpression(expression, Object.assign({}, opts, { sourceType: "script" })); +} + +function getAst(source) { + if (!source || !source.text) { + return {}; + } + + if (ASTs.has(source.id)) { + return ASTs.get(source.id); + } + + var ast = {}; + if (source.contentType == "text/html") { + ast = (0, _parseScriptTags2.default)(source.text, htmlParser) || {}; + } else if (source.contentType == "text/javascript") { + ast = parse(source.text); + } + + ASTs.set(source.id, ast); + return ast; +} + +function clearASTs() { + ASTs = new Map(); +} + +function traverseAst(source, visitor) { + var ast = getAst(source); + if ((0, _isEmpty2.default)(ast)) { + return null; + } + + (0, _babelTraverse2.default)(ast, visitor); + return ast; +} + +/***/ }), +/* 1052 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.isLexicalScope = isLexicalScope; +exports.isFunction = isFunction; +exports.isAwaitExpression = isAwaitExpression; +exports.isVariable = isVariable; +exports.getMemberExpression = getMemberExpression; + +var _babelTypes = __webpack_require__(493); + +var t = _interopRequireWildcard(_babelTypes); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function isLexicalScope(path) { + return t.isBlockStatement(path) || isFunction(path) || t.isProgram(path); +} + +function isFunction(path) { + return t.isFunction(path) || t.isArrowFunctionExpression(path) || t.isObjectMethod(path) || t.isClassMethod(path); +} + +function isAwaitExpression(path) { + return t.isAwaitExpression(path) || t.isAwaitExpression(path.container.init) || t.isAwaitExpression(path.parentPath); +} + +function isVariable(path) { + return t.isVariableDeclaration(path) || isFunction(path) && path.node.params.length || t.isObjectProperty(path) && !isFunction(path.node.value); +} + +function getMemberExpression(root) { + function _getMemberExpression(node, expr) { + if (t.isMemberExpression(node)) { + expr = [node.property.name].concat(expr); + return _getMemberExpression(node.object, expr); + } + + if (t.isCallExpression(node)) { + return []; + } + + if (t.isThisExpression(node)) { + return ["this"].concat(expr); + } + + return [node.name].concat(expr); + } + + var expr = _getMemberExpression(root, []); + return expr.join("."); +} + +/***/ }), +/* 1053 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = getFunctionName; +function getFunctionName(path) { + if (path.node.id) { + return path.node.id.name; + } + + var parent = path.parent; + if (parent.type == "ObjectProperty") { + return parent.key.name; + } + + if (parent.type == "ObjectExpression" || path.node.type == "ClassMethod") { + return path.node.key.name; + } + + if (parent.type == "VariableDeclarator") { + return parent.id.name; + } + + if (parent.type == "AssignmentExpression") { + if (parent.left.type == "MemberExpression") { + return parent.left.property.name; + } + + return parent.left.name; + } + + return "anonymous"; +} + +/***/ }), /* 1054 */, -/* 1055 */, +/* 1055 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.getClosestExpression = getClosestExpression; +exports.getClosestScope = getClosestScope; +exports.getClosestPath = getClosestPath; + +var _babelTypes = __webpack_require__(493); + +var t = _interopRequireWildcard(_babelTypes); + +var _ast = __webpack_require__(1051); + +var _helpers = __webpack_require__(1052); + +var _contains = __webpack_require__(1127); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function getNodeValue(node) { + if (t.isThisExpression(node)) { + return "this"; + } + + return node.name; +} + +function getClosestMemberExpression(source, token, location) { + var expression = null; + (0, _ast.traverseAst)(source, { + enter(path) { + var node = path.node; + + if (!(0, _contains.nodeContainsPosition)(node, location)) { + return path.skip(); + } + + if (t.isMemberExpression(node) && node.property.name === token) { + var memberExpression = (0, _helpers.getMemberExpression)(node); + expression = { + expression: memberExpression, + location: node.loc + }; + } + } + }); + + return expression; +} + +function getClosestExpression(source, token, location) { + var memberExpression = getClosestMemberExpression(source, token, location); + if (memberExpression) { + return memberExpression; + } + + var path = getClosestPath(source, location); + if (!path || !path.node) { + return; + } + + var node = path.node; + + return { expression: getNodeValue(node), location: node.loc }; +} + +function getClosestScope(source, location) { + var closestPath = null; + + (0, _ast.traverseAst)(source, { + enter(path) { + if (!(0, _contains.nodeContainsPosition)(path.node, location)) { + return path.skip(); + } + + if ((0, _helpers.isLexicalScope)(path)) { + closestPath = path; + } + } + }); + + if (!closestPath) { + return; + } + + return closestPath.scope; +} + +function getClosestPath(source, location) { + var closestPath = null; + + (0, _ast.traverseAst)(source, { + enter(path) { + if (!(0, _contains.nodeContainsPosition)(path.node, location)) { + return path.skip(); + } + closestPath = path; + } + }); + + return closestPath; +} + +/***/ }), /* 1056 */ /***/ (function(module, exports, __webpack_require__) { @@ -29171,7 +30129,106 @@ Object.defineProperty(module, 'exports', { /* 1069 */, /* 1070 */, /* 1071 */, -/* 1072 */, +/* 1072 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +var _get = __webpack_require__(1073); + +var _get2 = _interopRequireDefault(_get); + +var _contains = __webpack_require__(1127); + +var _getSymbols2 = __webpack_require__(1050); + +var _getSymbols3 = _interopRequireDefault(_getSymbols2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function findSymbols(source) { + var _getSymbols = (0, _getSymbols3.default)(source), + functions = _getSymbols.functions, + comments = _getSymbols.comments; + + return { functions, comments }; +} + +/** + * Returns the location for a given function path. If the path represents a + * function declaration, the location will begin after the function identifier + * but before the function parameters. + */ + +function getLocation(func) { + var location = _extends({}, func.location); + + // if the function has an identifier, start the block after it so the + // identifier is included in the "scope" of its parent + var identifierEnd = (0, _get2.default)("identifier.loc.end", func); + if (identifierEnd) { + location.start = identifierEnd; + } + + return location; +} + +/** + * Reduces an array of locations to remove items that are completely enclosed + * by another location in the array. + */ +function removeOverlaps(locations, location) { + // support reducing without an initializing array + if (!Array.isArray(locations)) { + locations = [locations]; + } + + var contains = locations.filter(a => (0, _contains.containsLocation)(a, location)).length > 0; + + if (!contains) { + locations.push(location); + } + + return locations; +} + +/** + * Sorts an array of locations by start position + */ +function sortByStart(a, b) { + if (a.start.line < b.start.line) { + return -1; + } else if (a.start.line === b.start.line) { + return a.start.column - b.start.column; + } + + return 1; +} + +/** + * Returns an array of locations that are considered out of scope for the given + * location. + */ +function getOutOfScopeLocations(source, position) { + var _findSymbols = findSymbols(source), + functions = _findSymbols.functions, + comments = _findSymbols.comments; + + var commentLocations = comments.map(c => c.location); + + return functions.map(getLocation).concat(commentLocations).filter(loc => !(0, _contains.containsPosition)(loc, position)).reduce(removeOverlaps, []).sort(sortByStart); +} + +exports.default = getOutOfScopeLocations; + +/***/ }), /* 1073 */ /***/ (function(module, exports, __webpack_require__) { @@ -31764,7 +32821,34 @@ module.exports = toPath; /* 1124 */, /* 1125 */, /* 1126 */, -/* 1127 */, +/* 1127 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.containsPosition = containsPosition; +exports.containsLocation = containsLocation; +exports.nodeContainsPosition = nodeContainsPosition; +function containsPosition(a, b) { + var startsBefore = a.start.line < b.line || a.start.line === b.line && a.start.column <= b.column; + var endsAfter = a.end.line > b.line || a.end.line === b.line && a.end.column >= b.column; + + return startsBefore && endsAfter; +} + +function containsLocation(a, b) { + return containsPosition(a, b.start) && containsPosition(a, b.end); +} + +function nodeContainsPosition(node, position) { + return containsPosition(node.loc, position); +} + +/***/ }), /* 1128 */, /* 1129 */ /***/ (function(module, exports, __webpack_require__) { @@ -31956,7 +33040,43 @@ module.exports = isArrayLikeObject; /* 1168 */, /* 1169 */, /* 1170 */, -/* 1171 */, +/* 1171 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.hasSource = hasSource; +exports.setSource = setSource; +exports.getSource = getSource; +exports.clearSources = clearSources; + + +var cachedSources = new Map(); + +function hasSource(sourceId) { + return cachedSources.has(sourceId); +} + +function setSource(source) { + cachedSources.set(source.id, source); +} + +function getSource(sourceId) { + if (!cachedSources.has(sourceId)) { + throw new Error(`${sourceId} was not provided.`); + } + return cachedSources.get(sourceId); +} + +function clearSources() { + cachedSources = new Map(); +} + +/***/ }), /* 1172 */, /* 1173 */, /* 1174 */, @@ -31971,7 +33091,44 @@ module.exports = isArrayLikeObject; /* 1183 */, /* 1184 */, /* 1185 */, -/* 1186 */, +/* 1186 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = getScopes; +exports.clearScopes = clearScopes; + +var _ast = __webpack_require__(1051); + +var _sources = __webpack_require__(1171); + +var _parser = __webpack_require__(1187); + +var parsedScopesCache = new Map(); + +function getScopes(location) { + var sourceId = location.sourceId; + + var parsedScopes = parsedScopesCache.get(sourceId); + if (!parsedScopes) { + var visitor = (0, _parser.createParseJSScopeVisitor)(sourceId); + (0, _ast.traverseAst)((0, _sources.getSource)(sourceId), visitor.traverseVisitor); + parsedScopes = visitor.toParsedScopes(); + parsedScopesCache.set(sourceId, parsedScopes); + } + return (0, _parser.findScopes)(parsedScopes, location); +} + +function clearScopes() { + parsedScopesCache = new Map(); +} + +/***/ }), /* 1187 */ /***/ (function(module, exports) { @@ -32234,1245 +33391,7 @@ module.exports = { /* 1204 */, /* 1205 */, /* 1206 */, -/* 1207 */, -/* 1208 */, -/* 1209 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.parseExpression = parseExpression; -exports.getAst = getAst; -exports.clearASTs = clearASTs; -exports.traverseAst = traverseAst; - -var _parseScriptTags = __webpack_require__(1023); - -var _parseScriptTags2 = _interopRequireDefault(_parseScriptTags); - -var _babylon = __webpack_require__(435); - -var babylon = _interopRequireWildcard(_babylon); - -var _babelTraverse = __webpack_require__(436); - -var _babelTraverse2 = _interopRequireDefault(_babelTraverse); - -var _isEmpty = __webpack_require__(963); - -var _isEmpty2 = _interopRequireDefault(_isEmpty); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var ASTs = new Map(); - -function _parse(code, opts) { - return babylon.parse(code, Object.assign({}, opts, { - sourceType: "module", - plugins: ["jsx", "flow", "objectRestSpread"] - })); -} - -function parse(text, opts) { - var ast = void 0; - if (!text) { - return; - } - - try { - ast = _parse(text, opts); - } catch (error) { - ast = {}; - } - - return ast; -} - -// Custom parser for parse-script-tags that adapts its input structure to -// our parser's signature -function htmlParser(_ref) { - var source = _ref.source, - line = _ref.line; - - return parse(source, { - startLine: line - }); -} - -function parseExpression(expression, opts) { - return babylon.parseExpression(expression, Object.assign({}, opts, { sourceType: "script" })); -} - -function getAst(source) { - if (!source || !source.text) { - return {}; - } - - if (ASTs.has(source.id)) { - return ASTs.get(source.id); - } - - var ast = {}; - var contentType = source.contentType; - - if (contentType == "text/html") { - ast = (0, _parseScriptTags2.default)(source.text, htmlParser) || {}; - } else if (contentType && contentType.includes("javascript")) { - ast = parse(source.text); - } - - ASTs.set(source.id, ast); - return ast; -} - -function clearASTs() { - ASTs = new Map(); -} - -function traverseAst(source, visitor) { - var ast = getAst(source); - if ((0, _isEmpty2.default)(ast)) { - return null; - } - - (0, _babelTraverse2.default)(ast, visitor); - return ast; -} - -/***/ }), -/* 1210 */, -/* 1211 */, -/* 1212 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.isLexicalScope = isLexicalScope; -exports.isFunction = isFunction; -exports.isAwaitExpression = isAwaitExpression; -exports.isYieldExpression = isYieldExpression; -exports.isVariable = isVariable; -exports.getMemberExpression = getMemberExpression; - -var _babelTypes = __webpack_require__(493); - -var t = _interopRequireWildcard(_babelTypes); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -function isLexicalScope(path) { - return t.isBlockStatement(path) || isFunction(path) || t.isProgram(path); -} - -function isFunction(path) { - return t.isFunction(path) || t.isArrowFunctionExpression(path) || t.isObjectMethod(path) || t.isClassMethod(path); -} - -function isAwaitExpression(path) { - return t.isAwaitExpression(path) || t.isAwaitExpression(path.container.init) || t.isAwaitExpression(path.parentPath); -} - -function isYieldExpression(path) { - return t.isYieldExpression(path) || t.isYieldExpression(path.container.init) || t.isYieldExpression(path.parentPath); -} - -function isVariable(path) { - return t.isVariableDeclaration(path) || isFunction(path) && path.node.params.length || t.isObjectProperty(path) && !isFunction(path.node.value); -} - -function getMemberExpression(root) { - function _getMemberExpression(node, expr) { - if (t.isMemberExpression(node)) { - expr = [node.property.name].concat(expr); - return _getMemberExpression(node.object, expr); - } - - if (t.isCallExpression(node)) { - return []; - } - - if (t.isThisExpression(node)) { - return ["this"].concat(expr); - } - - return [node.name].concat(expr); - } - - var expr = _getMemberExpression(root, []); - return expr.join("."); -} - -/***/ }), -/* 1213 */, -/* 1214 */, -/* 1215 */, -/* 1216 */, -/* 1217 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.getClosestExpression = getClosestExpression; -exports.getClosestScope = getClosestScope; -exports.getClosestPath = getClosestPath; - -var _babelTypes = __webpack_require__(493); - -var t = _interopRequireWildcard(_babelTypes); - -var _ast = __webpack_require__(1209); - -var _helpers = __webpack_require__(1212); - -var _contains = __webpack_require__(1218); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -function getNodeValue(node) { - if (t.isThisExpression(node)) { - return "this"; - } - - return node.name; -} - -function getClosestMemberExpression(source, token, location) { - var expression = null; - (0, _ast.traverseAst)(source, { - enter(path) { - var node = path.node; - - if (!(0, _contains.nodeContainsPosition)(node, location)) { - return path.skip(); - } - - if (t.isMemberExpression(node) && node.property.name === token) { - var memberExpression = (0, _helpers.getMemberExpression)(node); - expression = { - expression: memberExpression, - location: node.loc - }; - } - } - }); - - return expression; -} - -function getClosestExpression(source, token, location) { - var memberExpression = getClosestMemberExpression(source, token, location); - if (memberExpression) { - return memberExpression; - } - - var path = getClosestPath(source, location); - if (!path || !path.node) { - return; - } - - var node = path.node; - - return { expression: getNodeValue(node), location: node.loc }; -} - -function getClosestScope(source, location) { - var closestPath = null; - - (0, _ast.traverseAst)(source, { - enter(path) { - if (!(0, _contains.nodeContainsPosition)(path.node, location)) { - return path.skip(); - } - - if ((0, _helpers.isLexicalScope)(path)) { - closestPath = path; - } - } - }); - - if (!closestPath) { - return; - } - - return closestPath.scope; -} - -function getClosestPath(source, location) { - var closestPath = null; - - (0, _ast.traverseAst)(source, { - enter(path) { - if (!(0, _contains.nodeContainsPosition)(path.node, location)) { - return path.skip(); - } - closestPath = path; - } - }); - - return closestPath; -} - -/***/ }), -/* 1218 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.containsPosition = containsPosition; -exports.containsLocation = containsLocation; -exports.nodeContainsPosition = nodeContainsPosition; -function containsPosition(a, b) { - var startsBefore = a.start.line < b.line || a.start.line === b.line && a.start.column <= b.column; - var endsAfter = a.end.line > b.line || a.end.line === b.line && a.end.column >= b.column; - - return startsBefore && endsAfter; -} - -function containsLocation(a, b) { - return containsPosition(a, b.start) && containsPosition(a, b.end); -} - -function nodeContainsPosition(node, position) { - return containsPosition(node.loc, position); -} - -/***/ }), -/* 1219 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = getSymbols; -exports.formatSymbols = formatSymbols; -exports.clearSymbols = clearSymbols; - -var _ast = __webpack_require__(1209); - -var _helpers = __webpack_require__(1212); - -var _babelTypes = __webpack_require__(493); - -var t = _interopRequireWildcard(_babelTypes); - -var _getFunctionName = __webpack_require__(1275); - -var _getFunctionName2 = _interopRequireDefault(_getFunctionName); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } - -var symbolDeclarations = new Map(); - -function getFunctionParameterNames(path) { - return path.node.params.map(param => param.name); -} - -function getVariableNames(path) { - if (t.isObjectProperty(path) && !(0, _helpers.isFunction)(path.node.value)) { - return [{ - name: path.node.key.name, - location: path.node.loc - }]; - } - - if (!path.node.declarations) { - return path.node.params.map(dec => ({ - name: dec.name, - location: dec.loc - })); - } - - return path.node.declarations.map(dec => ({ - name: dec.id.name, - location: dec.loc - })); -} - -function getComments(ast) { - if (!ast || !ast.comments) { - return []; - } - return ast.comments.map(comment => ({ - name: comment.location, - location: comment.loc - })); -} - -function getClassName(path) { - var classDeclaration = path.findParent(_p => _p.isClassDeclaration()); - if (!classDeclaration) { - return null; - } - - return classDeclaration.node.id.name; -} - -function extractSymbols(source) { - var functions = []; - var variables = []; - var memberExpressions = []; - var callExpressions = []; - var objectProperties = []; - var identifiers = []; - - var ast = (0, _ast.traverseAst)(source, { - enter(path) { - if ((0, _helpers.isVariable)(path)) { - variables.push.apply(variables, _toConsumableArray(getVariableNames(path))); - } - - if ((0, _helpers.isFunction)(path)) { - functions.push({ - name: (0, _getFunctionName2.default)(path), - klass: getClassName(path), - location: path.node.loc, - parameterNames: getFunctionParameterNames(path), - identifier: path.node.id - }); - } - - if (t.isClassDeclaration(path)) { - variables.push({ - name: path.node.id.name, - location: path.node.loc - }); - } - - if (t.isObjectProperty(path)) { - var _path$node$key$loc = path.node.key.loc, - start = _path$node$key$loc.start, - end = _path$node$key$loc.end, - identifierName = _path$node$key$loc.identifierName; - - objectProperties.push({ - name: identifierName, - location: { start, end }, - expression: getSnippet(path) - }); - } - - if (t.isMemberExpression(path)) { - var _path$node$property$l = path.node.property.loc, - _start = _path$node$property$l.start, - _end = _path$node$property$l.end; - - memberExpressions.push({ - name: path.node.property.name, - location: { start: _start, end: _end }, - expressionLocation: path.node.loc, - expression: getSnippet(path) - }); - } - - if (t.isCallExpression(path)) { - var callee = path.node.callee; - if (!t.isMemberExpression(callee)) { - var _callee$loc = callee.loc, - _start2 = _callee$loc.start, - _end2 = _callee$loc.end, - _identifierName = _callee$loc.identifierName; - - callExpressions.push({ - name: _identifierName, - location: { start: _start2, end: _end2 } - }); - } - } - - if (t.isIdentifier(path)) { - var _path$node$loc = path.node.loc, - _start3 = _path$node$loc.start, - _end3 = _path$node$loc.end; - - - identifiers.push({ - name: path.node.name, - expression: path.node.name, - location: { start: _start3, end: _end3 } - }); - } - - if (t.isThisExpression(path.node)) { - var _path$node$loc2 = path.node.loc, - _start4 = _path$node$loc2.start, - _end4 = _path$node$loc2.end; - - identifiers.push({ - name: "this", - location: { start: _start4, end: _end4 }, - expressionLocation: path.node.loc, - expression: "this" - }); - } - - if (t.isVariableDeclarator(path)) { - var node = path.node.id; - var _path$node$loc3 = path.node.loc, - _start5 = _path$node$loc3.start, - _end5 = _path$node$loc3.end; - - - identifiers.push({ - name: node.name, - expression: node.name, - location: { start: _start5, end: _end5 } - }); - } - } - }); - - // comments are extracted separately from the AST - var comments = getComments(ast); - - return { - functions, - variables, - callExpressions, - memberExpressions, - objectProperties, - comments, - identifiers - }; -} - -function getSymbols(source) { - if (symbolDeclarations.has(source.id)) { - var _symbols = symbolDeclarations.get(source.id); - if (_symbols) { - return _symbols; - } - } - - var symbols = extractSymbols(source); - symbolDeclarations.set(source.id, symbols); - return symbols; -} - -function extendSnippet(name, expression, path, prevPath) { - var computed = path && path.node.computed; - var prevComputed = prevPath && prevPath.node.computed; - var prevArray = t.isArrayExpression(prevPath); - var array = t.isArrayExpression(path); - - if (expression === "") { - if (computed) { - return `[${name}]`; - } - return name; - } - - if (computed || array) { - if (prevComputed || prevArray) { - return `[${name}]${expression}`; - } - return `[${name}].${expression}`; - } - - if (prevComputed || prevArray) { - return `${name}${expression}`; - } - - return `${name}.${expression}`; -} - -function getMemberSnippet(node) { - var expression = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ""; - - if (t.isMemberExpression(node)) { - var _name = node.property.name; - - return getMemberSnippet(node.object, extendSnippet(_name, expression)); - } - - if (t.isCallExpression(node)) { - return ""; - } - - if (t.isThisExpression(node)) { - return `this.${expression}`; - } - - if (t.isIdentifier(node)) { - return `${node.name}.${expression}`; - } - - return expression; -} - -function getObjectSnippet(path, prevPath) { - var expression = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ""; - - if (!path) { - return expression; - } - - var name = path.node.key.name; - - var extendedExpression = extendSnippet(name, expression, path, prevPath); - - var nextPrevPath = path; - var nextPath = path.parentPath && path.parentPath.parentPath; - - return getSnippet(nextPath, nextPrevPath, extendedExpression); -} - -function getArraySnippet(path, prevPath, expression) { - var index = prevPath.parentPath.key; - var extendedExpression = extendSnippet(index, expression, path, prevPath); - - var nextPrevPath = path; - var nextPath = path.parentPath && path.parentPath.parentPath; - - return getSnippet(nextPath, nextPrevPath, extendedExpression); -} - -function getSnippet(path, prevPath) { - var expression = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ""; - - if (t.isVariableDeclaration(path)) { - var node = path.node.declarations[0]; - var _name2 = node.id.name; - return extendSnippet(_name2, expression, path, prevPath); - } - - if (t.isVariableDeclarator(path)) { - var _node = path.node.id; - if (t.isObjectPattern(_node)) { - return expression; - } - - var _name3 = _node.name; - var prop = extendSnippet(_name3, expression, path, prevPath); - return prop; - } - - if (t.isAssignmentExpression(path)) { - var _node2 = path.node.left; - var _name4 = t.isMemberExpression(_node2) ? getMemberSnippet(_node2) : _node2.name; - - var _prop = extendSnippet(_name4, expression, path, prevPath); - return _prop; - } - - if ((0, _helpers.isFunction)(path)) { - return expression; - } - - if (t.isIdentifier(path)) { - var _node3 = path.node; - return `${_node3.name}.${expression}`; - } - - if (t.isObjectProperty(path)) { - return getObjectSnippet(path, prevPath, expression); - } - - if (t.isObjectExpression(path)) { - var parentPath = prevPath && prevPath.parentPath; - return getObjectSnippet(parentPath, prevPath, expression); - } - - if (t.isMemberExpression(path)) { - return getMemberSnippet(path.node, expression); - } - - if (t.isArrayExpression(path)) { - return getArraySnippet(path, prevPath, expression); - } -} - -function formatSymbols(source) { - var symbols = getSymbols(source); - - function formatLocation(loc) { - if (!loc) { - return ""; - } - var start = loc.start, - end = loc.end; - - - var startLoc = `(${start.line}, ${start.column})`; - var endLoc = `(${end.line}, ${end.column})`; - return `[${startLoc}, ${endLoc}]`; - } - - function summarize(symbol) { - var loc = formatLocation(symbol.location); - var exprLoc = formatLocation(symbol.expressionLocation); - var params = symbol.parameterNames ? symbol.parameterNames.join(", ") : ""; - var expression = symbol.expression || ""; - var klass = symbol.klass || ""; - return `${loc} ${exprLoc} ${expression} ${symbol.name} ${params} ${klass}`; - } - - return Object.keys(symbols).map(name => `${name}:\n ${symbols[name].map(summarize).join("\n")}`); -} - -function clearSymbols() { - symbolDeclarations = new Map(); -} - -/***/ }), -/* 1220 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.hasSource = hasSource; -exports.setSource = setSource; -exports.getSource = getSource; -exports.clearSources = clearSources; - - -var cachedSources = new Map(); - -function hasSource(sourceId) { - return cachedSources.has(sourceId); -} - -function setSource(source) { - cachedSources.set(source.id, source); -} - -function getSource(sourceId) { - if (!cachedSources.has(sourceId)) { - throw new Error(`${sourceId} was not provided.`); - } - return cachedSources.get(sourceId); -} - -function clearSources() { - cachedSources = new Map(); -} - -/***/ }), -/* 1221 */, -/* 1222 */, -/* 1223 */, -/* 1224 */, -/* 1225 */, -/* 1226 */, -/* 1227 */, -/* 1228 */, -/* 1229 */, -/* 1230 */, -/* 1231 */, -/* 1232 */, -/* 1233 */, -/* 1234 */, -/* 1235 */, -/* 1236 */, -/* 1237 */, -/* 1238 */, -/* 1239 */, -/* 1240 */, -/* 1241 */, -/* 1242 */, -/* 1243 */, -/* 1244 */, -/* 1245 */, -/* 1246 */, -/* 1247 */, -/* 1248 */, -/* 1249 */, -/* 1250 */, -/* 1251 */, -/* 1252 */, -/* 1253 */, -/* 1254 */, -/* 1255 */, -/* 1256 */, -/* 1257 */, -/* 1258 */, -/* 1259 */, -/* 1260 */, -/* 1261 */, -/* 1262 */, -/* 1263 */, -/* 1264 */, -/* 1265 */, -/* 1266 */, -/* 1267 */, -/* 1268 */, -/* 1269 */, -/* 1270 */, -/* 1271 */, -/* 1272 */ -/***/ (function(module, exports, __webpack_require__) { - -module.exports = __webpack_require__(1273); - - -/***/ }), -/* 1273 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var _closest = __webpack_require__(1217); - -var _scopes = __webpack_require__(1274); - -var _getSymbols = __webpack_require__(1219); - -var _getSymbols2 = _interopRequireDefault(_getSymbols); - -var _ast = __webpack_require__(1209); - -var _getScopes = __webpack_require__(1276); - -var _getScopes2 = _interopRequireDefault(_getScopes); - -var _sources = __webpack_require__(1220); - -var _getOutOfScopeLocations = __webpack_require__(1277); - -var _getOutOfScopeLocations2 = _interopRequireDefault(_getOutOfScopeLocations); - -var _steps = __webpack_require__(1278); - -var _getEmptyLines = __webpack_require__(1280); - -var _getEmptyLines2 = _interopRequireDefault(_getEmptyLines); - -var _validate = __webpack_require__(1281); - -var _devtoolsUtils = __webpack_require__(900); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var workerHandler = _devtoolsUtils.workerUtils.workerHandler; - - -self.onmessage = workerHandler({ - getClosestExpression: _closest.getClosestExpression, - getOutOfScopeLocations: _getOutOfScopeLocations2.default, - getSymbols: _getSymbols2.default, - getScopes: _getScopes2.default, - clearSymbols: _getSymbols.clearSymbols, - clearScopes: _getScopes.clearScopes, - clearASTs: _ast.clearASTs, - hasSource: _sources.hasSource, - setSource: _sources.setSource, - clearSources: _sources.clearSources, - getVariablesInScope: _scopes.getVariablesInScope, - getNextStep: _steps.getNextStep, - getEmptyLines: _getEmptyLines2.default, - hasSyntaxError: _validate.hasSyntaxError -}); - -/***/ }), -/* 1274 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); - -exports.getVariablesInLocalScope = getVariablesInLocalScope; -exports.getVariablesInScope = getVariablesInScope; -exports.isExpressionInScope = isExpressionInScope; - -var _toPairs = __webpack_require__(795); - -var _toPairs2 = _interopRequireDefault(_toPairs); - -var _uniq = __webpack_require__(561); - -var _uniq2 = _interopRequireDefault(_uniq); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } - -function getScopeVariables(scope) { - var bindings = scope.bindings; - - - return (0, _toPairs2.default)(bindings).map((_ref) => { - var _ref2 = _slicedToArray(_ref, 2), - name = _ref2[0], - binding = _ref2[1]; - - return { - name, - references: binding.referencePaths - }; - }); -} - -function getScopeChain(scope) { - var scopes = []; - - do { - scopes.push(scope); - } while (scope = scope.parent); - - return scopes; -} - -function getVariablesInLocalScope(scope) { - return getScopeVariables(scope); -} - -function getVariablesInScope(scope) { - var _ref3; - - var scopes = getScopeChain(scope); - var scopeVars = scopes.map(getScopeVariables); - var vars = (_ref3 = [{ name: "this" }, { name: "arguments" }]).concat.apply(_ref3, _toConsumableArray(scopeVars)).map(variable => variable.name); - return (0, _uniq2.default)(vars); -} - -function isExpressionInScope(expression, scope) { - if (!scope) { - return false; - } - - var variables = getVariablesInScope(scope); - var firstPart = expression.split(/\./)[0]; - return variables.includes(firstPart); -} - -/***/ }), -/* 1275 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = getFunctionName; -function getFunctionName(path) { - if (path.node.id) { - return path.node.id.name; - } - - var parent = path.parent; - if (parent.type == "ObjectProperty") { - return parent.key.name; - } - - if (parent.type == "ObjectExpression" || path.node.type == "ClassMethod") { - return path.node.key.name; - } - - if (parent.type == "VariableDeclarator") { - return parent.id.name; - } - - if (parent.type == "AssignmentExpression") { - if (parent.left.type == "MemberExpression") { - return parent.left.property.name; - } - - return parent.left.name; - } - - return "anonymous"; -} - -/***/ }), -/* 1276 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = getScopes; -exports.clearScopes = clearScopes; - -var _ast = __webpack_require__(1209); - -var _sources = __webpack_require__(1220); - -var _parser = __webpack_require__(1187); - -var parsedScopesCache = new Map(); - -function getScopes(location) { - var sourceId = location.sourceId; - - var parsedScopes = parsedScopesCache.get(sourceId); - if (!parsedScopes) { - var visitor = (0, _parser.createParseJSScopeVisitor)(sourceId); - (0, _ast.traverseAst)((0, _sources.getSource)(sourceId), visitor.traverseVisitor); - parsedScopes = visitor.toParsedScopes(); - parsedScopesCache.set(sourceId, parsedScopes); - } - return (0, _parser.findScopes)(parsedScopes, location); -} - -function clearScopes() { - parsedScopesCache = new Map(); -} - -/***/ }), -/* 1277 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - -var _get = __webpack_require__(1073); - -var _get2 = _interopRequireDefault(_get); - -var _contains = __webpack_require__(1218); - -var _getSymbols2 = __webpack_require__(1219); - -var _getSymbols3 = _interopRequireDefault(_getSymbols2); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function findSymbols(source) { - var _getSymbols = (0, _getSymbols3.default)(source), - functions = _getSymbols.functions, - comments = _getSymbols.comments; - - return { functions, comments }; -} - -/** - * Returns the location for a given function path. If the path represents a - * function declaration, the location will begin after the function identifier - * but before the function parameters. - */ - -function getLocation(func) { - var location = _extends({}, func.location); - - // if the function has an identifier, start the block after it so the - // identifier is included in the "scope" of its parent - var identifierEnd = (0, _get2.default)("identifier.loc.end", func); - if (identifierEnd) { - location.start = identifierEnd; - } - - return location; -} - -/** - * Reduces an array of locations to remove items that are completely enclosed - * by another location in the array. - */ -function removeOverlaps(locations, location) { - // support reducing without an initializing array - if (!Array.isArray(locations)) { - locations = [locations]; - } - - var contains = locations.filter(a => (0, _contains.containsLocation)(a, location)).length > 0; - - if (!contains) { - locations.push(location); - } - - return locations; -} - -/** - * Sorts an array of locations by start position - */ -function sortByStart(a, b) { - if (a.start.line < b.start.line) { - return -1; - } else if (a.start.line === b.start.line) { - return a.start.column - b.start.column; - } - - return 1; -} - -/** - * Returns an array of locations that are considered out of scope for the given - * location. - */ -function getOutOfScopeLocations(source, position) { - var _findSymbols = findSymbols(source), - functions = _findSymbols.functions, - comments = _findSymbols.comments; - - var commentLocations = comments.map(c => c.location); - - return functions.map(getLocation).concat(commentLocations).filter(loc => !(0, _contains.containsPosition)(loc, position)).reduce(removeOverlaps, []).sort(sortByStart); -} - -exports.default = getOutOfScopeLocations; - -/***/ }), -/* 1278 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - -exports.getNextStep = getNextStep; - -var _debuggerHtml = __webpack_require__(843); - -var _types = __webpack_require__(1279); - -var _closest = __webpack_require__(1217); - -var _helpers = __webpack_require__(1212); - -function getNextStep(source, pausedPosition) { - var currentExpression = getSteppableExpression(source, pausedPosition); - if (!currentExpression) { - return null; - } - var currentStatement = currentExpression.getStatementParent(); - return _getNextStep(currentStatement, pausedPosition); -} - -function getSteppableExpression(source, pausedPosition) { - var closestPath = (0, _closest.getClosestPath)(source, pausedPosition); - - if (!closestPath) { - return null; - } - - if ((0, _helpers.isAwaitExpression)(closestPath) || (0, _helpers.isYieldExpression)(closestPath)) { - return closestPath; - } - - return closestPath.find(p => p.isAwaitExpression() || p.isYieldExpression()); -} - -function _getNextStep(statement, position) { - var nextStatement = statement.getSibling(statement.key + 1); - if (nextStatement.node) { - return _extends({}, nextStatement.node.loc.start, { - sourceId: position.sourceId - }); - } - - return null; -} - -/***/ }), -/* 1279 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -/***/ }), -/* 1280 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = getEmptyLines; - -var _uniq = __webpack_require__(561); - -var _uniq2 = _interopRequireDefault(_uniq); - -var _difference = __webpack_require__(1129); - -var _difference2 = _interopRequireDefault(_difference); - -var _ast = __webpack_require__(1209); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var commentTokens = ["CommentBlock", "CommentLine"]; - -function fillRange(start, end) { - return Array(end - start + 1).fill().map((item, index) => start + index); -} - -// Populates a pre-filled array of every line number, -// then removes lines which were found to be executable -function getLines(ast) { - return fillRange(0, ast.tokens[ast.tokens.length - 1].loc.end.line); -} - -// The following sequence stores lines which have executable code -// (contents other than comments or EOF, regardless of line position) -function getExecutableLines(ast) { - var lines = ast.tokens.filter(token => !commentTokens.includes(token.type) && (!token.type || token.type.label && token.type.label != "eof")).map(token => token.loc.start.line - 1); - - return (0, _uniq2.default)(lines); -} - -function getEmptyLines(sourceToJS) { - if (!sourceToJS) { - return null; - } - - var ast = (0, _ast.getAst)(sourceToJS); - if (!ast || !ast.comments) { - return []; - } - - var executableLines = getExecutableLines(ast); - var lines = getLines(ast); - return (0, _difference2.default)(lines, executableLines); -} - -/***/ }), -/* 1281 */ +/* 1207 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -33483,7 +33402,7 @@ Object.defineProperty(exports, "__esModule", { }); exports.hasSyntaxError = hasSyntaxError; -var _ast = __webpack_require__(1209); +var _ast = __webpack_require__(1051); function hasSyntaxError(input) { try { diff --git a/devtools/client/debugger/new/pretty-print-worker.js b/devtools/client/debugger/new/pretty-print-worker.js index 1774ce020007..dceeb9f3c06f 100644 --- a/devtools/client/debugger/new/pretty-print-worker.js +++ b/devtools/client/debugger/new/pretty-print-worker.js @@ -70,74 +70,17 @@ return /******/ (function(modules) { // webpackBootstrap /******/ __webpack_require__.p = "/assets/build"; /******/ /******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 1282); +/******/ return __webpack_require__(__webpack_require__.s = 380); /******/ }) /************************************************************************/ /******/ ({ -/***/ 1282: +/***/ 380: /***/ (function(module, exports, __webpack_require__) { -module.exports = __webpack_require__(1283); +module.exports = __webpack_require__(964); -/***/ }), - -/***/ 1283: -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var _prettyFast = __webpack_require__(802); - -var _prettyFast2 = _interopRequireDefault(_prettyFast); - -var _devtoolsUtils = __webpack_require__(900); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var workerHandler = _devtoolsUtils.workerUtils.workerHandler; - - -function prettyPrint(_ref) { - var url = _ref.url, - indent = _ref.indent, - source = _ref.source; - - var prettified = (0, _prettyFast2.default)(source, { - url: url, - indent: " ".repeat(indent) - }); - - return { - code: prettified.code, - mappings: invertMappings(prettified.map._mappings) - }; -} - -function invertMappings(mappings) { - return mappings._array.map(m => { - var mapping = { - generated: { - line: m.originalLine, - column: m.originalColumn - } - }; - if (m.source) { - mapping.source = m.source; - mapping.original = { - line: m.generatedLine, - column: m.generatedColumn - }; - mapping.name = m.name; - } - return mapping; - }); -} - -self.onmessage = workerHandler({ prettyPrint }); - /***/ }), /***/ 381: @@ -7589,6 +7532,63 @@ module.exports = { streamingWorkerHandler }; +/***/ }), + +/***/ 964: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _prettyFast = __webpack_require__(802); + +var _prettyFast2 = _interopRequireDefault(_prettyFast); + +var _devtoolsUtils = __webpack_require__(900); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var workerHandler = _devtoolsUtils.workerUtils.workerHandler; + + +function prettyPrint(_ref) { + var url = _ref.url, + indent = _ref.indent, + source = _ref.source; + + var prettified = (0, _prettyFast2.default)(source, { + url: url, + indent: " ".repeat(indent) + }); + + return { + code: prettified.code, + mappings: invertMappings(prettified.map._mappings) + }; +} + +function invertMappings(mappings) { + return mappings._array.map(m => { + var mapping = { + generated: { + line: m.originalLine, + column: m.originalColumn + } + }; + if (m.source) { + mapping.source = m.source; + mapping.original = { + line: m.generatedLine, + column: m.generatedColumn + }; + mapping.name = m.name; + } + return mapping; + }); +} + +self.onmessage = workerHandler({ prettyPrint }); + /***/ }) /******/ }); diff --git a/devtools/client/debugger/new/search-worker.js b/devtools/client/debugger/new/search-worker.js index 533bf6a756e1..21cf99a7fa9f 100644 --- a/devtools/client/debugger/new/search-worker.js +++ b/devtools/client/debugger/new/search-worker.js @@ -70,7 +70,7 @@ return /******/ (function(modules) { // webpackBootstrap /******/ __webpack_require__.p = "/assets/build"; /******/ /******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 1284); +/******/ return __webpack_require__(__webpack_require__.s = 382); /******/ }) /************************************************************************/ /******/ ({ @@ -262,6 +262,168 @@ function arrayMap(array, iteratee) { module.exports = arrayMap; +/***/ }), + +/***/ 1123: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _getMatches = __webpack_require__(1173); + +var _getMatches2 = _interopRequireDefault(_getMatches); + +var _projectSearch = __webpack_require__(1140); + +var _devtoolsUtils = __webpack_require__(900); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var workerHandler = _devtoolsUtils.workerUtils.workerHandler; + + +self.onmessage = workerHandler({ getMatches: _getMatches2.default, findSourceMatches: _projectSearch.findSourceMatches }); + +/***/ }), + +/***/ 1138: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = buildQuery; + +var _escapeRegExp = __webpack_require__(259); + +var _escapeRegExp2 = _interopRequireDefault(_escapeRegExp); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Ignore doing outline matches for less than 3 whitespaces + * + * @memberof utils/source-search + * @static + */ +function ignoreWhiteSpace(str) { + return (/^\s{0,2}$/.test(str) ? "(?!\\s*.*)" : str + ); +} + + +function wholeMatch(query, wholeWord) { + if (query === "" || !wholeWord) { + return query; + } + + return `\\b${query}\\b`; +} + +function buildFlags(caseSensitive, isGlobal) { + if (caseSensitive && isGlobal) { + return "g"; + } + + if (!caseSensitive && isGlobal) { + return "gi"; + } + + if (!caseSensitive && !isGlobal) { + return "i"; + } + + return; +} + +function buildQuery(originalQuery, modifiers, _ref) { + var _ref$isGlobal = _ref.isGlobal, + isGlobal = _ref$isGlobal === undefined ? false : _ref$isGlobal, + _ref$ignoreSpaces = _ref.ignoreSpaces, + ignoreSpaces = _ref$ignoreSpaces === undefined ? false : _ref$ignoreSpaces; + var caseSensitive = modifiers.caseSensitive, + regexMatch = modifiers.regexMatch, + wholeWord = modifiers.wholeWord; + + + if (originalQuery === "") { + return new RegExp(originalQuery); + } + + var query = originalQuery; + if (ignoreSpaces) { + query = ignoreWhiteSpace(query); + } + + if (!regexMatch) { + query = (0, _escapeRegExp2.default)(query); + } + + query = wholeMatch(query, wholeWord); + var flags = buildFlags(caseSensitive, isGlobal); + + if (flags) { + return new RegExp(query, flags); + } + + return new RegExp(query); +} + +/***/ }), + +/***/ 1140: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.findSourceMatches = findSourceMatches; + +var _source = __webpack_require__(233); + +function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } // Maybe reuse file search's functions? + + +function findSourceMatches(source, queryText) { + var _ref; + + var text = source.text; + + if (!(0, _source.isLoaded)(source) || !text || queryText == "") { + return []; + } + + var lines = text.split("\n"); + var result = undefined; + var query = new RegExp(queryText, "g"); + + var matches = lines.map((_text, line) => { + var indices = []; + + while (result = query.exec(_text)) { + indices.push({ + sourceId: source.id, + line: line + 1, + column: result.index, + match: result[0], + value: _text, + text: result.input + }); + } + return indices; + }).filter(_matches => _matches.length > 0); + + matches = (_ref = []).concat.apply(_ref, _toConsumableArray(matches)); + return matches; +} + /***/ }), /***/ 1165: @@ -519,6 +681,44 @@ module.exports = { /***/ }), +/***/ 1173: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = getMatches; + +var _buildQuery = __webpack_require__(1138); + +var _buildQuery2 = _interopRequireDefault(_buildQuery); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getMatches(query, text, modifiers) { + if (!query || !text || !modifiers) { + return []; + } + var regexQuery = (0, _buildQuery2.default)(query, modifiers, { + isGlobal: true + }); + var matchedLocations = []; + var lines = text.split("\n"); + for (var i = 0; i < lines.length; i++) { + var singleMatch = void 0; + var line = lines[i]; + while ((singleMatch = regexQuery.exec(line)) !== null) { + matchedLocations.push({ line: i, ch: singleMatch.index }); + } + } + return matchedLocations; +} + +/***/ }), + /***/ 121: /***/ (function(module, exports, __webpack_require__) { @@ -609,94 +809,6 @@ var isArray = Array.isArray || function (xs) { }; -/***/ }), - -/***/ 1211: -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = buildQuery; - -var _escapeRegExp = __webpack_require__(259); - -var _escapeRegExp2 = _interopRequireDefault(_escapeRegExp); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Ignore doing outline matches for less than 3 whitespaces - * - * @memberof utils/source-search - * @static - */ -function ignoreWhiteSpace(str) { - return (/^\s{0,2}$/.test(str) ? "(?!\\s*.*)" : str - ); -} - - -function wholeMatch(query, wholeWord) { - if (query === "" || !wholeWord) { - return query; - } - - return `\\b${query}\\b`; -} - -function buildFlags(caseSensitive, isGlobal) { - if (caseSensitive && isGlobal) { - return "g"; - } - - if (!caseSensitive && isGlobal) { - return "gi"; - } - - if (!caseSensitive && !isGlobal) { - return "i"; - } - - return; -} - -function buildQuery(originalQuery, modifiers, _ref) { - var _ref$isGlobal = _ref.isGlobal, - isGlobal = _ref$isGlobal === undefined ? false : _ref$isGlobal, - _ref$ignoreSpaces = _ref.ignoreSpaces, - ignoreSpaces = _ref$ignoreSpaces === undefined ? false : _ref$ignoreSpaces; - var caseSensitive = modifiers.caseSensitive, - regexMatch = modifiers.regexMatch, - wholeWord = modifiers.wholeWord; - - - if (originalQuery === "") { - return new RegExp(originalQuery); - } - - var query = originalQuery; - if (ignoreSpaces) { - query = ignoreWhiteSpace(query); - } - - if (!regexMatch) { - query = (0, _escapeRegExp2.default)(query); - } - - query = wholeMatch(query, wholeWord); - var flags = buildFlags(caseSensitive, isGlobal); - - if (flags) { - return new RegExp(query, flags); - } - - return new RegExp(query); -} - /***/ }), /***/ 122: @@ -790,126 +902,6 @@ var objectKeys = Object.keys || function (obj) { }; -/***/ }), - -/***/ 1284: -/***/ (function(module, exports, __webpack_require__) { - -module.exports = __webpack_require__(1285); - - -/***/ }), - -/***/ 1285: -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var _getMatches = __webpack_require__(1286); - -var _getMatches2 = _interopRequireDefault(_getMatches); - -var _projectSearch = __webpack_require__(1287); - -var _devtoolsUtils = __webpack_require__(900); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var workerHandler = _devtoolsUtils.workerUtils.workerHandler; - - -self.onmessage = workerHandler({ getMatches: _getMatches2.default, findSourceMatches: _projectSearch.findSourceMatches }); - -/***/ }), - -/***/ 1286: -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = getMatches; - -var _buildQuery = __webpack_require__(1211); - -var _buildQuery2 = _interopRequireDefault(_buildQuery); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function getMatches(query, text, modifiers) { - if (!query || !text || !modifiers) { - return []; - } - var regexQuery = (0, _buildQuery2.default)(query, modifiers, { - isGlobal: true - }); - var matchedLocations = []; - var lines = text.split("\n"); - for (var i = 0; i < lines.length; i++) { - var singleMatch = void 0; - var line = lines[i]; - while ((singleMatch = regexQuery.exec(line)) !== null) { - matchedLocations.push({ line: i, ch: singleMatch.index }); - } - } - return matchedLocations; -} - -/***/ }), - -/***/ 1287: -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.findSourceMatches = findSourceMatches; - -var _source = __webpack_require__(233); - -function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } // Maybe reuse file search's functions? - - -function findSourceMatches(source, queryText) { - var _ref; - - var text = source.text; - - if (!(0, _source.isLoaded)(source) || !text || queryText == "") { - return []; - } - - var lines = text.split("\n"); - var result = undefined; - var query = new RegExp(queryText, "g"); - - var matches = lines.map((_text, line) => { - var indices = []; - - while (result = query.exec(_text)) { - indices.push({ - sourceId: source.id, - line: line + 1, - column: result.index, - match: result[0], - value: _text, - text: result.input - }); - } - return indices; - }).filter(_matches => _matches.length > 0); - - matches = (_ref = []).concat.apply(_ref, _toConsumableArray(matches)); - return matches; -} - /***/ }), /***/ 14: @@ -957,7 +949,7 @@ module.exports = isObjectLike; Object.defineProperty(exports, "__esModule", { value: true }); -exports.isLoaded = exports.getMode = exports.getSourceLineCount = exports.getSourcePath = exports.getFileURL = exports.getFilenameFromURL = exports.getFilename = exports.getRawSourceURL = exports.getPrettySourceURL = exports.shouldPrettyPrint = exports.isThirdParty = exports.isPretty = exports.isJavaScript = undefined; +exports.isLoaded = exports.getMode = exports.getSourceLineCount = exports.getSourcePath = exports.getFilenameFromURL = exports.getFilename = exports.getRawSourceURL = exports.getPrettySourceURL = exports.shouldPrettyPrint = exports.isThirdParty = exports.isPretty = exports.isJavaScript = undefined; var _devtoolsSourceMap = __webpack_require__(898); @@ -1056,21 +1048,10 @@ function getRawSourceURL(url) { return url.replace(/:formatted$/, ""); } -function resolveFileURL(url) { - var transformUrl = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : initialUrl => initialUrl; - - url = getRawSourceURL(url || ""); - var name = transformUrl(url); - return (0, _utils.endTruncateStr)(name, 50); -} - function getFilenameFromURL(url) { - return resolveFileURL(url, initialUrl => (0, _path.basename)(initialUrl) || "(index)"); -} - -function getFormattedSourceId(id) { - var sourceId = id.split("/")[1]; - return `SOURCE${sourceId}`; + url = getRawSourceURL(url || ""); + var name = (0, _path.basename)(url) || "(index)"; + return (0, _utils.endTruncateStr)(name, 50); } /** @@ -1085,30 +1066,13 @@ function getFilename(source) { id = source.id; if (!url) { - return getFormattedSourceId(id); + var sourceId = id.split("/")[1]; + return `SOURCE${sourceId}`; } return getFilenameFromURL(url); } -/** - * Show a source url. - * If the source does not have a url, use the source id. - * - * @memberof utils/source - * @static - */ -function getFileURL(source) { - var url = source.url, - id = source.id; - - if (!url) { - return getFormattedSourceId(id); - } - - return resolveFileURL(url); -} - var contentTypeModeMap = { "text/javascript": { name: "javascript" }, "text/typescript": { name: "javascript", typescript: true }, @@ -1220,7 +1184,6 @@ exports.getPrettySourceURL = getPrettySourceURL; exports.getRawSourceURL = getRawSourceURL; exports.getFilename = getFilename; exports.getFilenameFromURL = getFilenameFromURL; -exports.getFileURL = getFileURL; exports.getSourcePath = getSourcePath; exports.getSourceLineCount = getSourceLineCount; exports.getMode = getMode; @@ -2500,6 +2463,14 @@ module.exports = { }; +/***/ }), + +/***/ 382: +/***/ (function(module, exports, __webpack_require__) { + +module.exports = __webpack_require__(1123); + + /***/ }), /***/ 6: diff --git a/devtools/client/debugger/new/test/mochitest/browser.ini b/devtools/client/debugger/new/test/mochitest/browser.ini index 26ab596fb62e..db48cccf063d 100644 --- a/devtools/client/debugger/new/test/mochitest/browser.ini +++ b/devtools/client/debugger/new/test/mochitest/browser.ini @@ -19,9 +19,6 @@ support-files = examples/sum/sum.js examples/sum/sum.min.js examples/sum/sum.min.js.map - examples/reload/code_reload_1.js - examples/reload/code_reload_2.js - examples/reload/doc_reload.html examples/doc-async.html examples/doc-asm.html examples/doc-scripts.html @@ -56,7 +53,6 @@ support-files = examples/script-switching-02.js examples/script-switching-01.js examples/times2.js - examples/reload/sjs_code_reload.sjs [browser_dbg-asm.js] [browser_dbg-async-stepping.js] @@ -68,6 +64,7 @@ support-files = skip-if = true # Bug 1383576 [browser_dbg-breakpoints-cond.js] [browser_dbg-call-stack.js] +[browser_dbg-expressions.js] [browser_dbg-scopes.js] [browser_dbg-chrome-create.js] [browser_dbg-chrome-debugging.js] @@ -77,8 +74,6 @@ skip-if = debug # bug 1374187 [browser_dbg-editor-gutter.js] [browser_dbg-editor-select.js] [browser_dbg-editor-highlight.js] -[browser_dbg-expressions.js] -[browser_dbg-expressions-error.js] [browser_dbg-iframes.js] [browser_dbg_keyboard_navigation.js] [browser_dbg_keyboard-shortcuts.js] @@ -107,4 +102,4 @@ skip-if = true # Bug 1393121, 1393299 [browser_dbg-tabs.js] [browser_dbg-toggling-tools.js] [browser_dbg-wasm-sourcemaps.js] -[browser_dbg-reload.js] +skip-if = true diff --git a/devtools/client/debugger/new/test/mochitest/browser_dbg-expressions-error.js b/devtools/client/debugger/new/test/mochitest/browser_dbg-expressions-error.js deleted file mode 100644 index 3a8dee1a998f..000000000000 --- a/devtools/client/debugger/new/test/mochitest/browser_dbg-expressions-error.js +++ /dev/null @@ -1,90 +0,0 @@ -/* Any copyright is dedicated to the Public Domain. - * http://creativecommons.org/publicdomain/zero/1.0/ */ - -/** - * test pausing on an errored watch expression - * assert that you can: - * 1. resume - * 2. still evalutate expressions - * 3. expand properties - */ - -const expressionSelectors = { - input: "input.input-expression" -}; - -function getLabel(dbg, index) { - return findElement(dbg, "expressionNode", index).innerText; -} - -function getValue(dbg, index) { - return findElement(dbg, "expressionValue", index).innerText; -} - -function assertEmptyValue(dbg, index) { - const value = findElement(dbg, "expressionValue", index); - if (value) { - is(value.innerText, ""); - return; - } - - is(value, null); -} - -function toggleExpression(dbg, index) { - findElement(dbg, "expressionNode", index).click(); -} - -async function addExpression(dbg, input) { - info("Adding an expression"); - findElementWithSelector(dbg, expressionSelectors.input).focus(); - type(dbg, input); - pressKey(dbg, "Enter"); - - await waitForDispatch(dbg, "EVALUATE_EXPRESSION"); -} - -async function editExpression(dbg, input) { - info("updating the expression"); - dblClickElement(dbg, "expressionNode", 1); - // Position cursor reliably at the end of the text. - pressKey(dbg, "End"); - type(dbg, input); - pressKey(dbg, "Enter"); - await waitForDispatch(dbg, "EVALUATE_EXPRESSION"); -} - -/* - * When we add a bad expression, we'll pause, - * resume, and wait for the expression to finish being evaluated. - */ -async function addBadExpression(dbg, input) { - const paused = waitForPaused(dbg); - const added = addExpression(dbg, input); - - await paused; - ok(dbg.selectors.isEvaluatingExpression(dbg.getState())); - await resume(dbg); - await added; -} - -add_task(async function() { - const dbg = await initDebugger("doc-script-switching.html"); - - await togglePauseOnExceptions(dbg, true, false); - - // add a good expression, 2 bad expressions, and another good one - await addExpression(dbg, "location"); - await addBadExpression(dbg, "foo.bar"); - await addBadExpression(dbg, "foo.batt"); - await addExpression(dbg, "2"); - - // check the value of - is(getValue(dbg, 2), "(unavailable)") - is(getValue(dbg, 3), "(unavailable)") - is(getValue(dbg, 4), 2); - - toggleExpression(dbg, 1); - await waitForDispatch(dbg, "LOAD_OBJECT_PROPERTIES"); - is(findAllElements(dbg, "expressionNodes").length, 20); -}); diff --git a/devtools/client/debugger/new/test/mochitest/browser_dbg-reload.js b/devtools/client/debugger/new/test/mochitest/browser_dbg-reload.js deleted file mode 100644 index 7c4db1a5ded3..000000000000 --- a/devtools/client/debugger/new/test/mochitest/browser_dbg-reload.js +++ /dev/null @@ -1,29 +0,0 @@ -/* Any copyright is dedicated to the Public Domain. - http://creativecommons.org/publicdomain/zero/1.0/ */ - -/* - * Test reloading: - * 1. reload the source - * 2. re-sync breakpoints - */ - -add_task(async function() { - const dbg = await initDebugger("reload/doc_reload.html", "sjs_code_reload"); - - const sym = waitForDispatch(dbg, "SET_SYMBOLS"); - await selectSource(dbg, "sjs_code_reload"); - await sym; - - await addBreakpoint(dbg, "sjs_code_reload", 2); - - const sync = waitForDispatch(dbg, "SYNC_BREAKPOINT"); - await reload(dbg, "sjs_code_reload"); - await sync; - - const breakpoints = dbg.selectors.getBreakpoints(dbg.getState()); - const breakpointList = breakpoints.valueSeq().toJS(); - const breakpoint = breakpointList[0]; - - is(breakpointList.length, 1); - is(breakpoint.location.line, 6); -}); diff --git a/devtools/client/debugger/new/test/mochitest/browser_dbg-wasm-sourcemaps.js b/devtools/client/debugger/new/test/mochitest/browser_dbg-wasm-sourcemaps.js index 5604c3f45a03..14eeb332b347 100644 --- a/devtools/client/debugger/new/test/mochitest/browser_dbg-wasm-sourcemaps.js +++ b/devtools/client/debugger/new/test/mochitest/browser_dbg-wasm-sourcemaps.js @@ -11,7 +11,6 @@ add_task(async function() { await waitForPaused(dbg); assertPausedLocation(dbg); - await waitForSource(dbg, "wasm-sourcemaps/average.c"); await addBreakpoint(dbg, "wasm-sourcemaps/average.c", 12); clickElement(dbg, "resume"); diff --git a/devtools/client/debugger/new/test/mochitest/examples/reload/code_reload_1.js b/devtools/client/debugger/new/test/mochitest/examples/reload/code_reload_1.js deleted file mode 100644 index 52e7f61a01fc..000000000000 --- a/devtools/client/debugger/new/test/mochitest/examples/reload/code_reload_1.js +++ /dev/null @@ -1,3 +0,0 @@ -function foo(n) { - console.log("yo") -} diff --git a/devtools/client/debugger/new/test/mochitest/examples/reload/code_reload_2.js b/devtools/client/debugger/new/test/mochitest/examples/reload/code_reload_2.js deleted file mode 100644 index 9d59fe7c8b52..000000000000 --- a/devtools/client/debugger/new/test/mochitest/examples/reload/code_reload_2.js +++ /dev/null @@ -1,7 +0,0 @@ -/* - * comments - */ - -function foo() { - console.log("YO") -} diff --git a/devtools/client/debugger/new/test/mochitest/examples/reload/doc_reload.html b/devtools/client/debugger/new/test/mochitest/examples/reload/doc_reload.html deleted file mode 100644 index 6894782cd313..000000000000 --- a/devtools/client/debugger/new/test/mochitest/examples/reload/doc_reload.html +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - Empty test page 1 - - - - - - diff --git a/devtools/client/debugger/new/test/mochitest/examples/reload/sjs_code_reload.sjs b/devtools/client/debugger/new/test/mochitest/examples/reload/sjs_code_reload.sjs deleted file mode 100644 index 774d39090d31..000000000000 --- a/devtools/client/debugger/new/test/mochitest/examples/reload/sjs_code_reload.sjs +++ /dev/null @@ -1,32 +0,0 @@ -/* Any copyright is dedicated to the Public Domain. - * http://creativecommons.org/publicdomain/zero/1.0/ */ - -/* globals getState, setState */ -/* exported handleRequest */ - -"use strict"; - -function _getUrl(request, counter) { - const { scheme, host, path } = request; - - const newPath = path.substr(0, path.lastIndexOf("/") + 1); - const index = counter < 3 ? 1 : 2; - return `${scheme}://${host}${newPath}/code_reload_${index}.js` -} - -function handleRequest(request, response) { - response.setHeader("Cache-Control", "no-cache, no-store, must-revalidate"); - response.setHeader("Pragma", "no-cache"); - response.setHeader("Expires", "0"); - response.setHeader("Access-Control-Allow-Origin", "*", false); - response.setHeader("Content-Type", "text/javascript", false); - - // Redirect to a different file each time. - let counter = 1 + +getState("counter"); - - const newUrl = _getUrl(request, counter); - - response.setStatusLine(request.httpVersion, 302, "Found"); - response.setHeader("Location", newUrl); - setState("counter", "" + counter); -} diff --git a/devtools/client/debugger/new/test/mochitest/head.js b/devtools/client/debugger/new/test/mochitest/head.js index cda5800ec386..71b4816bddfd 100644 --- a/devtools/client/debugger/new/test/mochitest/head.js +++ b/devtools/client/debugger/new/test/mochitest/head.js @@ -504,7 +504,7 @@ function stepOut(dbg) { function resume(dbg) { info("Resuming"); dbg.actions.resume(); - return waitForState(dbg, (state) => !dbg.selectors.isPaused(state)); + return waitForThreadEvents(dbg, "resumed"); } function deleteExpression(dbg, input) { diff --git a/devtools/client/locales/en-US/debugger.properties b/devtools/client/locales/en-US/debugger.properties index b6328e38a11d..970998bbebac 100644 --- a/devtools/client/locales/en-US/debugger.properties +++ b/devtools/client/locales/en-US/debugger.properties @@ -790,7 +790,3 @@ shortcuts.projectSearch=Full Project Search # LOCALIZATION NOTE (shortcuts.functionSearch): text describing # keyboard shortcut action for function search shortcuts.functionSearch=Function Search - -# LOCALIZATION NOTE (shortcuts.buttonName): text describing -# keyboard shortcut button text -shortcuts.buttonName=Keyboard shortcuts diff --git a/devtools/client/preferences/debugger.js b/devtools/client/preferences/debugger.js index 0286d8a4d180..1cfe2dacad7b 100644 --- a/devtools/client/preferences/debugger.js +++ b/devtools/client/preferences/debugger.js @@ -31,6 +31,7 @@ pref("devtools.debugger.ui.variables-only-enum-visible", false); pref("devtools.debugger.ui.variables-searchbox-visible", false); pref("devtools.debugger.ui.framework-grouping-on", true); pref("devtools.debugger.call-stack-visible", false); +pref("devtools.debugger.scopes-visible", false); pref("devtools.debugger.start-panel-collapsed", false); pref("devtools.debugger.end-panel-collapsed", false); pref("devtools.debugger.tabs", "[]");