From b94945fed2a9116a969e9a12c26f2f25315c7cdb Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Wed, 18 Oct 2017 16:31:23 +1100 Subject: [PATCH 01/37] Bug 1407494 (follow-up) - Revert operator new use to malloc(), to pair with free(). r=glandium. --HG-- extra : rebase_source : 5fd9221d7a0509e0c094767e66661be0d9ff1688 --- modules/libpref/Preferences.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/libpref/Preferences.cpp b/modules/libpref/Preferences.cpp index 2c096e4dd95b..78b988f4f7fc 100644 --- a/modules/libpref/Preferences.cpp +++ b/modules/libpref/Preferences.cpp @@ -1216,7 +1216,7 @@ PREF_RegisterCallback(const char* aPrefNode, NS_PRECONDITION(aPrefNode, "aPrefNode must not be nullptr"); NS_PRECONDITION(aCallback, "aCallback must not be nullptr"); - auto node = new CallbackNode(); + auto node = (CallbackNode*)moz_xmalloc(sizeof(CallbackNode)); node->mDomain = moz_xstrdup(aPrefNode); node->mFunc = aCallback; node->mData = aData; @@ -2975,7 +2975,7 @@ nsPrefBranch::GetChildList(const char* aStartingAt, numPrefs = prefArray.Length(); if (numPrefs) { - outArray = new char*[numPrefs]; + outArray = (char**)moz_xmalloc(numPrefs * sizeof(char*)); for (dwIndex = 0; dwIndex < numPrefs; ++dwIndex) { // we need to lop off mPrefRoot in case the user is planning to pass this From 69ed33396c3b52e1d6b14cbdda6f87b4523c3829 Mon Sep 17 00:00:00 2001 From: Stone Shih Date: Thu, 12 Oct 2017 11:22:36 +0800 Subject: [PATCH 02/37] Bug 1407700 Part1: Revise CoalescedInputData interfaces. r=smaug. MozReview-Commit-ID: 75AsFBM4qr --- dom/ipc/CoalescedInputData.h | 9 ++------- dom/ipc/TabChild.cpp | 8 +++----- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/dom/ipc/CoalescedInputData.h b/dom/ipc/CoalescedInputData.h index e86d31a2364d..51b2f34a4891 100644 --- a/dom/ipc/CoalescedInputData.h +++ b/dom/ipc/CoalescedInputData.h @@ -29,11 +29,6 @@ public: { } - void Reset() - { - mCoalescedInputEvent = nullptr; - } - bool IsEmpty() { return !mCoalescedInputEvent; @@ -43,9 +38,9 @@ public: const ScrollableLayerGuid& aGuid, const uint64_t& aInputBlockId); - const InputEventType* GetCoalescedEvent() + UniquePtr TakeCoalescedEvent() { - return mCoalescedInputEvent.get(); + return Move(mCoalescedInputEvent); } ScrollableLayerGuid GetScrollableLayerGuid() diff --git a/dom/ipc/TabChild.cpp b/dom/ipc/TabChild.cpp index 685e1ab0e154..1323526bee19 100644 --- a/dom/ipc/TabChild.cpp +++ b/dom/ipc/TabChild.cpp @@ -1601,14 +1601,13 @@ TabChild::MaybeDispatchCoalescedMouseMoveEvents() if (!data || data->IsEmpty()) { continue; } - const WidgetMouseEvent* event = data->GetCoalescedEvent(); + UniquePtr event = data->TakeCoalescedEvent(); MOZ_ASSERT(event); // Dispatch the coalesced mousemove event. Using RecvRealMouseButtonEvent to // bypass the coalesce handling in RecvRealMouseMoveEvent. RecvRealMouseButtonEvent(*event, data->GetScrollableLayerGuid(), data->GetInputBlockId()); - data->Reset(); } if (mCoalescedMouseEventFlusher) { mCoalescedMouseEventFlusher->RemoveObserver(); @@ -1779,13 +1778,12 @@ TabChild::MaybeDispatchCoalescedWheelEvent() if (mCoalescedWheelData.IsEmpty()) { return; } - const WidgetWheelEvent* wheelEvent = - mCoalescedWheelData.GetCoalescedEvent(); + UniquePtr wheelEvent = + mCoalescedWheelData.TakeCoalescedEvent(); MOZ_ASSERT(wheelEvent); DispatchWheelEvent(*wheelEvent, mCoalescedWheelData.GetScrollableLayerGuid(), mCoalescedWheelData.GetInputBlockId()); - mCoalescedWheelData.Reset(); } void From 98ed53bd59501c83f40c8e54efa9eaaf53c75018 Mon Sep 17 00:00:00 2001 From: Stone Shih Date: Thu, 12 Oct 2017 09:05:40 +0800 Subject: [PATCH 03/37] Bug 1407700 Part2: Handle the case to re-entry event loop for mousemove coalescing. r=smaug. MozReview-Commit-ID: DcHVokf6boL --- dom/ipc/CoalescedInputData.h | 7 ++ dom/ipc/CoalescedMouseData.cpp | 4 +- dom/ipc/TabChild.cpp | 127 ++++++++++++++++++++++++++------- dom/ipc/TabChild.h | 17 ++++- 4 files changed, 126 insertions(+), 29 deletions(-) diff --git a/dom/ipc/CoalescedInputData.h b/dom/ipc/CoalescedInputData.h index 51b2f34a4891..04ca46ea7d7e 100644 --- a/dom/ipc/CoalescedInputData.h +++ b/dom/ipc/CoalescedInputData.h @@ -29,6 +29,13 @@ public: { } + void RetrieveDataFrom(CoalescedInputData& aSource) + { + mCoalescedInputEvent = Move(aSource.mCoalescedInputEvent); + mGuid = aSource.mGuid; + mInputBlockId = aSource.mInputBlockId; + } + bool IsEmpty() { return !mCoalescedInputEvent; diff --git a/dom/ipc/CoalescedMouseData.cpp b/dom/ipc/CoalescedMouseData.cpp index 7f28552143f0..332c04cf174c 100644 --- a/dom/ipc/CoalescedMouseData.cpp +++ b/dom/ipc/CoalescedMouseData.cpp @@ -55,8 +55,8 @@ void CoalescedMouseMoveFlusher::WillRefresh(mozilla::TimeStamp aTime) { MOZ_ASSERT(mRefreshDriver); - mTabChild->MaybeDispatchCoalescedMouseMoveEvents(); - RemoveObserver(); + mTabChild->FlushAllCoalescedMouseData(); + mTabChild->ProcessPendingCoalescedMouseDataAndDispatchEvents(); } void diff --git a/dom/ipc/TabChild.cpp b/dom/ipc/TabChild.cpp index 1323526bee19..872c74a5abb0 100644 --- a/dom/ipc/TabChild.cpp +++ b/dom/ipc/TabChild.cpp @@ -1059,6 +1059,15 @@ TabChild::DestroyWindow() mCoalescedMouseEventFlusher->RemoveObserver(); mCoalescedMouseEventFlusher = nullptr; } + + // In case we don't have chance to process all entries, clean all data in + // the queue. + while (mToBeDispatchedMouseData.GetSize() > 0) { + UniquePtr data( + static_cast(mToBeDispatchedMouseData.PopFront())); + data.reset(); + } + nsCOMPtr baseWindow = do_QueryInterface(WebNavigation()); if (baseWindow) baseWindow->Destroy(); @@ -1591,27 +1600,62 @@ TabChild::RecvMouseEvent(const nsString& aType, } void -TabChild::MaybeDispatchCoalescedMouseMoveEvents() +TabChild::ProcessPendingCoalescedMouseDataAndDispatchEvents() { - if (!mCoalesceMouseMoveEvents) { + if (!mCoalesceMouseMoveEvents || !mCoalescedMouseEventFlusher) { + // We don't enable mouse coalescing or we are destroying TabChild. return; } + + // We may reentry the event loop and push more data to + // mToBeDispatchedMouseData while dispatching an event. + + // We may have some pending coalesced data while dispatch an event and reentry + // the event loop. In that case we don't have chance to consume the remainding + // pending data until we get new mouse events. Get some helps from + // mCoalescedMouseEventFlusher to trigger it. + mCoalescedMouseEventFlusher->StartObserver(); + + while (mToBeDispatchedMouseData.GetSize() > 0) { + UniquePtr data( + static_cast(mToBeDispatchedMouseData.PopFront())); + + UniquePtr event = data->TakeCoalescedEvent(); + if (event) { + // Dispatch the pending events. Using HandleRealMouseButtonEvent + // to bypass the coalesce handling in RecvRealMouseMoveEvent. Can't use + // RecvRealMouseButtonEvent because we may also put some mouse events + // other than mousemove. + HandleRealMouseButtonEvent(*event, + data->GetScrollableLayerGuid(), + data->GetInputBlockId()); + } + } + // mCoalescedMouseEventFlusher may be destroyed when reentrying the event + // loop. + if (mCoalescedMouseEventFlusher) { + mCoalescedMouseEventFlusher->RemoveObserver(); + } +} + +void +TabChild::FlushAllCoalescedMouseData() +{ + MOZ_ASSERT(mCoalesceMouseMoveEvents); + + // Move all entries from mCoalescedMouseData to mToBeDispatchedMouseData. for (auto iter = mCoalescedMouseData.Iter(); !iter.Done(); iter.Next()) { CoalescedMouseData* data = iter.UserData(); if (!data || data->IsEmpty()) { continue; } - UniquePtr event = data->TakeCoalescedEvent(); - MOZ_ASSERT(event); - // Dispatch the coalesced mousemove event. Using RecvRealMouseButtonEvent to - // bypass the coalesce handling in RecvRealMouseMoveEvent. - RecvRealMouseButtonEvent(*event, - data->GetScrollableLayerGuid(), - data->GetInputBlockId()); - } - if (mCoalescedMouseEventFlusher) { - mCoalescedMouseEventFlusher->RemoveObserver(); + UniquePtr dispatchData = + MakeUnique(); + + dispatchData->RetrieveDataFrom(*data); + mToBeDispatchedMouseData.Push(dispatchData.release()); } + mCoalescedMouseData.Clear(); } mozilla::ipc::IPCResult @@ -1631,10 +1675,23 @@ TabChild::RecvRealMouseMoveEvent(const WidgetMouseEvent& aEvent, mCoalescedMouseEventFlusher->StartObserver(); return IPC_OK(); } - // Can't coalesce current mousemove event. Dispatch the coalesced mousemove - // event and coalesce the current one. - MaybeDispatchCoalescedMouseMoveEvents(); - data->Coalesce(aEvent, aGuid, aInputBlockId); + // Can't coalesce current mousemove event. Put the coalesced mousemove data + // with the same pointer id to mToBeDispatchedMouseData, coalesce the + // current one, and process all pending data in mToBeDispatchedMouseData. + MOZ_ASSERT(data); + UniquePtr dispatchData = + MakeUnique(); + + dispatchData->RetrieveDataFrom(*data); + mToBeDispatchedMouseData.Push(dispatchData.release()); + + // Put new data to replace the old one in the hash table. + CoalescedMouseData* newData = new CoalescedMouseData(); + mCoalescedMouseData.Put(aEvent.pointerId, newData); + newData->Coalesce(aEvent, aGuid, aInputBlockId); + + // Dispatch all pending mouse events. + ProcessPendingCoalescedMouseDataAndDispatchEvents(); mCoalescedMouseEventFlusher->StartObserver(); } else if (!RecvRealMouseButtonEvent(aEvent, aGuid, aInputBlockId)) { return IPC_FAIL_NO_REASON(this); @@ -1674,16 +1731,35 @@ TabChild::RecvRealMouseButtonEvent(const WidgetMouseEvent& aEvent, const ScrollableLayerGuid& aGuid, const uint64_t& aInputBlockId) { - if (aEvent.mMessage != eMouseMove) { - // Flush the coalesced mousemove event before dispatching other mouse - // events. - MaybeDispatchCoalescedMouseMoveEvents(); - if (aEvent.mMessage == eMouseEnterIntoWidget) { - mCoalescedMouseData.Put(aEvent.pointerId, new CoalescedMouseData()); - } else if (aEvent.mMessage == eMouseExitFromWidget) { - mCoalescedMouseData.Remove(aEvent.pointerId); - } + if (mCoalesceMouseMoveEvents && mCoalescedMouseEventFlusher && + aEvent.mMessage != eMouseMove) { + // When receiving a mouse event other than mousemove, we have to dispatch + // all coalesced events before it. However, we can't dispatch all pending + // coalesced events directly because we may reentry the event loop while + // dispatching. To make sure we won't dispatch disorder events, we move all + // coalesced mousemove events and current event to a deque to dispatch them. + // When reentrying the event loop and dispatching more events, we put new + // events in the end of the nsQueue and dispatch events from the beginning. + FlushAllCoalescedMouseData(); + + UniquePtr dispatchData = + MakeUnique(); + + dispatchData->Coalesce(aEvent, aGuid, aInputBlockId); + mToBeDispatchedMouseData.Push(dispatchData.release()); + + ProcessPendingCoalescedMouseDataAndDispatchEvents(); + return IPC_OK(); } + HandleRealMouseButtonEvent(aEvent, aGuid, aInputBlockId); + return IPC_OK(); +} + +void +TabChild::HandleRealMouseButtonEvent(const WidgetMouseEvent& aEvent, + const ScrollableLayerGuid& aGuid, + const uint64_t& aInputBlockId) +{ // Mouse events like eMouseEnterIntoWidget, that are created in the parent // process EventStateManager code, have an input block id which they get from // the InputAPZContext in the parent process stack. However, they did not @@ -1713,7 +1789,6 @@ TabChild::RecvRealMouseButtonEvent(const WidgetMouseEvent& aEvent, if (aInputBlockId && aEvent.mFlags.mHandledByAPZ) { mAPZEventState->ProcessMouseEvent(aEvent, aGuid, aInputBlockId); } - return IPC_OK(); } mozilla::ipc::IPCResult diff --git a/dom/ipc/TabChild.h b/dom/ipc/TabChild.h index 39ec36c85624..2da68453e7b4 100644 --- a/dom/ipc/TabChild.h +++ b/dom/ipc/TabChild.h @@ -41,6 +41,7 @@ #include "AudioChannelService.h" #include "PuppetWidget.h" #include "mozilla/layers/GeckoContentController.h" +#include "nsDeque.h" #include "nsISHistoryListener.h" #include "nsIPartialSHistoryListener.h" @@ -761,8 +762,17 @@ public: return mWidgetNativeData; } + // Prepare to dispatch all coalesced mousemove events. We'll move all data + // in mCoalescedMouseData to a nsDeque; then we start processing them. We + // can't fetch the coalesced event one by one and dispatch it because we may + // reentry the event loop and access to the same hashtable. It's called when + // dispatching some mouse events other than mousemove. + void FlushAllCoalescedMouseData(); + void ProcessPendingCoalescedMouseDataAndDispatchEvents(); - void MaybeDispatchCoalescedMouseMoveEvents(); + void HandleRealMouseButtonEvent(const WidgetMouseEvent& aEvent, + const ScrollableLayerGuid& aGuid, + const uint64_t& aInputBlockId); static bool HasActiveTabs() { @@ -948,7 +958,12 @@ private: // takes time, some repeated events can be skipped to not flood child process. mozilla::TimeStamp mLastWheelProcessedTimeFromParent; mozilla::TimeDuration mLastWheelProcessingDuration; + + // Hash table to track coalesced mousemove events for different pointers. nsClassHashtable mCoalescedMouseData; + + nsDeque mToBeDispatchedMouseData; + CoalescedWheelData mCoalescedWheelData; RefPtr mCoalescedMouseEventFlusher; From ebfefa4a4c1115c9f00bf9f0adb7fe87dac4646c Mon Sep 17 00:00:00 2001 From: Jason Laster Date: Thu, 19 Oct 2017 11:05:49 +0200 Subject: [PATCH 04/37] Bug 1408562 - Update Debugger frontend (10-13). r=jdescottes MozReview-Commit-ID: 6qEViJ9Z2Nw --HG-- extra : rebase_source : cc99bd7f7f369588023e3c84e35b5253e4fbb6b5 --- devtools/client/debugger/new/README.mozilla | 2 +- devtools/client/debugger/new/debugger.css | 367 +- devtools/client/debugger/new/debugger.js | 60056 ++++++++-------- devtools/client/debugger/new/parser-worker.js | 3482 +- .../debugger/new/pretty-print-worker.js | 386 +- devtools/client/debugger/new/search-worker.js | 1921 +- .../debugger/new/test/mochitest/browser.ini | 2 +- .../mochitest/browser_dbg-breakpoints-cond.js | 6 +- .../browser_dbg-browser-content-toolbox.js | 4 +- .../mochitest/browser_dbg-layout-changes.js | 81 + .../mochitest/browser_dbg-wasm-sourcemaps.js | 4 + .../debugger/new/test/mochitest/head.js | 6 +- devtools/client/jar.mn | 2 + .../client/locales/en-US/debugger.properties | 18 +- devtools/client/preferences/debugger.js | 5 + .../themes/images/debugger/blackBox.svg | 9 + .../themes/images/debugger/prettyPrint.svg | 6 + 17 files changed, 32492 insertions(+), 33865 deletions(-) create mode 100644 devtools/client/debugger/new/test/mochitest/browser_dbg-layout-changes.js create mode 100644 devtools/client/themes/images/debugger/blackBox.svg create mode 100644 devtools/client/themes/images/debugger/prettyPrint.svg diff --git a/devtools/client/debugger/new/README.mozilla b/devtools/client/debugger/new/README.mozilla index d704029f5313..333fef5e1685 100644 --- a/devtools/client/debugger/new/README.mozilla +++ b/devtools/client/debugger/new/README.mozilla @@ -1,7 +1,7 @@ This is the debugger.html project output. See https://github.com/devtools-html/debugger.html -Taken from upstream commit: 455e7e3f2de29113e37de8c03052de110f5fb106 +Taken from upstream commit: aa6b25cc7dc645b8c1d76af58b99012e40b80848 Packages: - babel-plugin-transform-es2015-modules-commonjs @6.26.0 diff --git a/devtools/client/debugger/new/debugger.css b/devtools/client/debugger/new/debugger.css index 1005b3a6f283..daacb8bba8ca 100644 --- a/devtools/client/debugger/new/debugger.css +++ b/devtools/client/debugger/new/debugger.css @@ -2,6 +2,141 @@ * 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/. */ +menu { + display: inline; + padding: 0; +} + +menu > menuitem::after { + content: "\25BA"; + float: right; + padding-left: 5px; +} + +menu > menupopup { + display: none; +} + +menu > menuitem:hover + menupopup, +menu > menupopup:hover { + display: block; +} + +menupopup { + position: fixed; + z-index: 10000; + background: white; + border: 1px solid #cccccc; + padding: 5px 0; + background: #f2f2f2; + border-radius: 5px; + color: #585858; + box-shadow: 0 0 4px 0 rgba(190, 190, 190, 0.8); + min-width: 130px; +} + +menuitem { + display: block; + padding: 0 20px; + line-height: 20px; + font-weight: 500; + font-size: 13px; + -moz-user-select: none; + user-select: none; +} + +menuitem:hover { + background: #3780fb; + color: white; + cursor: pointer; +} + +menuitem[disabled=true] { + color: #cccccc; +} + +menuitem[disabled=true]:hover { + background-color: transparent; + cursor: default; +} + +menuitem[type=checkbox]::before { + content: ""; + width: 10px; + display: inline-block; +} + +menuitem[type=checkbox][checked=true]::before { + content: "\2713"; + left: -8px; + position: relative; +} + +menuseparator { + border-bottom: 1px solid #cacdd3; + width: 100%; + height: 5px; + display: block; + margin-bottom: 5px; +} + +#contextmenu-mask.show { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + z-index: 999; +} +/* This Source Code Form is subject to the terms of the Mozilla Public + * 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/. */ + +:root.theme-light, +:root .theme-light { + --theme-search-overlays-semitransparent: rgba(221, 225, 228, 0.66); +} + +* { + box-sizing: border-box; +} + +html, +body { + height: 100%; + margin: 0; + padding: 0; + width: 100%; +} + +#mount { + display: flex; + height: 100%; +} + +::-webkit-scrollbar { + width: 8px; + height: 8px; + background: transparent; +} + +::-webkit-scrollbar-track { + border-radius: 8px; + background: transparent; +} + +::-webkit-scrollbar-thumb { + border-radius: 8px; + background: rgba(113, 113, 113, 0.5); +} + +:root.theme-dark .CodeMirror-scrollbar-filler { + background: transparent; +} +/* This Source Code Form is subject to the terms of the Mozilla Public + * 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/. */ + .landing-page { flex: 1; display: flex; @@ -275,144 +410,10 @@ padding-left: 3px; font-weight: normal; } -/* This Source Code Form is subject to the terms of the Mozilla Public - * 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/. */ - -menu { - display: inline; - padding: 0; -} - -menu > menuitem::after { - content: "\25BA"; - float: right; - padding-left: 5px; -} - -menu > menupopup { - display: none; -} - -menu > menuitem:hover + menupopup, -menu > menupopup:hover { - display: block; -} - -menupopup { - position: fixed; - z-index: 10000; - background: white; - border: 1px solid #cccccc; - padding: 5px 0; - background: #f2f2f2; - border-radius: 5px; - color: #585858; - box-shadow: 0 0 4px 0 rgba(190, 190, 190, 0.8); - min-width: 130px; -} - -menuitem { - display: block; - padding: 0 20px; - line-height: 20px; - font-weight: 500; - font-size: 13px; - -moz-user-select: none; - user-select: none; -} - -menuitem:hover { - background: #3780fb; - color: white; - cursor: pointer; -} - -menuitem[disabled=true] { - color: #cccccc; -} - -menuitem[disabled=true]:hover { - background-color: transparent; - cursor: default; -} - -menuitem[type=checkbox]::before { - content: ""; - width: 10px; - display: inline-block; -} - -menuitem[type=checkbox][checked=true]::before { - content: "\2713"; - left: -8px; - position: relative; -} - -menuseparator { - border-bottom: 1px solid #cacdd3; - width: 100%; - height: 5px; - display: block; - margin-bottom: 5px; -} - -#contextmenu-mask.show { - position: fixed; - top: 0; - left: 0; - width: 100%; - height: 100%; - z-index: 999; -} -/* This Source Code Form is subject to the terms of the Mozilla Public - * 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/. */ - -:root.theme-light, -:root .theme-light { - --theme-search-overlays-semitransparent: rgba(221, 225, 228, 0.66); -} - -* { - box-sizing: border-box; -} - -html, -body { - height: 100%; - margin: 0; - padding: 0; - width: 100%; -} - -#mount { - display: flex; - height: 100%; -} - -::-webkit-scrollbar { - width: 8px; - height: 8px; - background: transparent; -} - -::-webkit-scrollbar-track { - border-radius: 8px; - background: transparent; -} - -::-webkit-scrollbar-thumb { - border-radius: 8px; - background: rgba(113, 113, 113, 0.5); -} - -:root.theme-dark .CodeMirror-scrollbar-filler { - background: transparent; -} .modal-wrapper { position: fixed; display: flex; + flex-direction: column; align-items: center; width: 100%; height: 100%; @@ -423,13 +424,12 @@ body { } .modal { - top: 0; - margin: auto; - width: 500px; + width: 80%; + height: auto; + overflow-y: scroll; background-color: var(--theme-toolbar-background); - transform: translateY(-250px); transition: transform 150ms cubic-bezier(0.07, 0.95, 0, 1); - box-shadow: 0 0 10px 2px var(--popup-shadow-color); + box-shadow: 1px 1px 3px 1px var(--popup-shadow-color); } .modal.entering, @@ -439,13 +439,24 @@ body { .modal.entered, .modal.exiting { - transform: translateY(0px); + transform: translateY(5px); } -@media (max-width: 520px) { +/* This rule is active when the screen is not short and narrow */ +@media (min-width: 580px) and (min-height: 340px) { .modal { - width: 80%; - left: 10%; + width: 50%; + } +} + +@media (min-height: 340px) { + .modal { + height: auto; + max-height: 80vh; + } + .modal.entered, + .modal.exiting { + transform: translateY(30px); } } .shortcuts-content { @@ -490,10 +501,6 @@ body { width: calc(100% - 1px); /* 1px fixes the hidden right border */ } -.shortcuts-modal { - width: 45%; -} - .shortcuts-list li { font-size: 12px; color: var(--theme-body-color); @@ -1696,10 +1703,10 @@ html .toggle-button-end.vertical svg { transition: opacity 200ms; border: none; background: transparent; - padding: 6px 0.7em; + padding: 6px; } -.source-footer > .commands > .action i { +.source-footer > .commands > .action img { height: 100%; display: flex; flex-direction: column; @@ -1718,9 +1725,18 @@ html .toggle-button-end.vertical svg { fill: var(--theme-selection-color); } -.source-footer > .commands > .action svg { +.source-footer > .commands > .action > img.prettyPrint { + mask: url("chrome://devtools/skin/images/debugger/prettyPrint.svg") no-repeat; height: 16px; width: 16px; + background: var(--theme-body-color); +} + +.source-footer > .commands > .action > img.blackBox { + mask: url("chrome://devtools/skin/images/debugger/blackBox.svg") no-repeat; + height: 16px; + width: 16px; + background: var(--theme-body-color); } .source-footer .commands .coverage { @@ -1733,8 +1749,8 @@ html .toggle-button-end.vertical svg { border-radius: 2px; } -.source-footer .black-box.blackboxed svg { - fill: var(--theme-highlight-blue); +.source-footer > .commands > .blackboxed > img.blackBox { + background: var(--theme-highlight-blue); } .source-footer .blackbox-summary { @@ -2188,12 +2204,19 @@ html[dir="rtl"] .arrow svg, box-shadow: 1px 2px 3px var(--popup-shadow-color); } -.popover .preview-popup .header { +.popover .preview-popup .header-container { width: 100%; line-height: 20px; - border-bottom: 1px solid #cccccc; display: flex; flex-direction: column; + margin-bottom: 5px; +} + +.popover .preview-popup .header-container h3 { + margin: 0; + margin-bottom: 5px; + font-weight: normal; + font-size: 14px; } .popover .preview-popup .header .link { @@ -2492,8 +2515,9 @@ html[dir="rtl"] .editor-mount { } .CodeMirror-linenumber { - font-size: 11px; - line-height: 14px; + font-size: 12px; + line-height: 15px; + font-family: monospace; } .folding-enabled .CodeMirror-linenumber { @@ -3149,6 +3173,18 @@ html .command-bar > button:disabled { .command-bar > button { padding: 6px 5px; } + +.command-bar.bottom { + justify-content: flex-end; +} + +.command-bar.bottom > button { + color: var(--theme-comment); + width: 26px; +} +.command-bar.bottom > button:hover { + color: var(--theme-body-color); +} .object-node.default-property { opacity: 0.6; } @@ -3373,13 +3409,13 @@ html .welcomebox .toggle-button-end.collapsed { fill: var(--theme-body-color); } -.source-tab .prettyPrint { - line-height: 0; -} - -.source-tab .prettyPrint svg { +.source-tab img.prettyPrint { + mask: url("chrome://devtools/skin/images/debugger/prettyPrint.svg") no-repeat; + mask-size: 100%; + padding-top: 12px; height: 12px; width: 12px; + background: var(--theme-highlight-blue); } .source-tab .prettyPrint path { @@ -3388,13 +3424,16 @@ html .welcomebox .toggle-button-end.collapsed { .source-tab .blackBox, .source-tab .prettyPrint { - line-height: 0; align-self: center; } -.source-tab .blackBox svg { +.source-tab img.blackBox { + mask: url("chrome://devtools/skin/images/debugger/blackBox.svg") no-repeat; + mask-size: 100%; + padding-top: 12px; height: 12px; width: 12px; + background: var(--theme-highlight-blue); } .source-tab .blackBox path { diff --git a/devtools/client/debugger/new/debugger.js b/devtools/client/debugger/new/debugger.js index 68b32973ed48..2f46dd3c7b3d 100644 --- a/devtools/client/debugger/new/debugger.js +++ b/devtools/client/debugger/new/debugger.js @@ -80,74 +80,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = __WEBPACK_EXTERNAL_MODULE_0__; /***/ }), -/* 1 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var _react = __webpack_require__(0); - -var _react2 = _interopRequireDefault(_react); - -var _reactDom = __webpack_require__(4); - -var _reactDom2 = _interopRequireDefault(_reactDom); - -var _devtoolsLaunchpad = __webpack_require__(131); - -var _devtoolsConfig = __webpack_require__(828); - -var _client = __webpack_require__(888); - -var _bootstrap = __webpack_require__(897); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -if (false) { - window.Perf = require("react-addons-perf"); -} - -if ((0, _devtoolsConfig.isFirefoxPanel)()) { - module.exports = { - bootstrap: (_ref) => { - var threadClient = _ref.threadClient, - tabTarget = _ref.tabTarget, - debuggerClient = _ref.debuggerClient, - sourceMaps = _ref.sourceMaps, - toolboxActions = _ref.toolboxActions; - - return (0, _client.onConnect)({ - tab: { clientType: "firefox" }, - tabConnection: { - tabTarget, - threadClient, - debuggerClient - } - }, { - services: { sourceMaps }, - toolboxActions - }); - }, - destroy: () => { - (0, _devtoolsLaunchpad.unmountRoot)(_reactDom2.default); - (0, _bootstrap.teardownWorkers)(); - } - }; -} else { - window.L10N = _devtoolsLaunchpad.L10N; - // $FlowIgnore: - window.L10N.setBundle(__webpack_require__(960)); - - (0, _devtoolsLaunchpad.bootstrap)(_react2.default, _reactDom2.default).then(connection => { - (0, _client.onConnect)(connection, { - services: { sourceMaps: __webpack_require__(898) }, - toolboxActions: {} - }); - }); -} - -/***/ }), +/* 1 */, /* 2 */ /***/ (function(module, exports) { @@ -395,112 +328,7 @@ module.exports = __webpack_require__(168); /***/ }), /* 16 */, /* 17 */, -/* 18 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.nodeHasChildren = nodeHasChildren; -exports.isExactUrlMatch = isExactUrlMatch; -exports.isDirectory = isDirectory; -exports.isNotJavaScript = isNotJavaScript; -exports.isInvalidUrl = isInvalidUrl; -exports.partIsFile = partIsFile; -exports.createNode = createNode; -exports.createParentMap = createParentMap; -exports.getRelativePath = getRelativePath; - -var _url = __webpack_require__(334); - -var _source = __webpack_require__(233); - -var IGNORED_URLS = ["debugger eval code", "XStringBundle"]; - -function nodeHasChildren(item) { - return Array.isArray(item.contents); -} - -function isExactUrlMatch(pathPart, debuggeeUrl) { - // compare to hostname with an optional 'www.' prefix - var _parse = (0, _url.parse)(debuggeeUrl), - host = _parse.host; - - if (!host) { - return false; - } - return host.replace(/^www\./, "") === pathPart.replace(/^www\./, ""); -} - -function isDirectory(url) { - var parts = url.path.split("/").filter(p => p !== ""); - - // Assume that all urls point to files except when they end with '/' - // Or directory node has children - return parts.length === 0 || url.path.slice(-1) === "/" || nodeHasChildren(url); -} - -function isNotJavaScript(source) { - var parsedUrl = (0, _url.parse)(source.url).pathname; - if (!parsedUrl) { - return false; - } - var parsedExtension = parsedUrl.split(".").pop(); - - return ["css", "svg", "png"].includes(parsedExtension); -} - -function isInvalidUrl(url, source) { - return IGNORED_URLS.indexOf(url) != -1 || !source.get("url") || source.get("loadedState") === "loading" || !url.group || (0, _source.isPretty)(source.toJS()) || isNotJavaScript(source.toJS()); -} - -function partIsFile(index, parts, url) { - var isLastPart = index === parts.length - 1; - return !isDirectory(url) && isLastPart; -} - -function createNode(name, path, contents) { - return { - name, - path, - contents - }; -} - -function createParentMap(tree) { - var map = new WeakMap(); - - function _traverse(subtree) { - if (nodeHasChildren(subtree)) { - for (var child of subtree.contents) { - map.set(child, subtree); - _traverse(child); - } - } - } - - // Don't link each top-level path to the "root" node because the - // user never sees the root - tree.contents.forEach(_traverse); - return map; -} - -function getRelativePath(url) { - var _parse2 = (0, _url.parse)(url), - pathname = _parse2.pathname; - - if (!pathname) { - return url; - } - var path = pathname.split("/"); - path.shift(); - return path.join("/"); -} - -/***/ }), +/* 18 */, /* 19 */, /* 20 */ /***/ (function(module, exports, __webpack_require__) { @@ -543,331 +371,15 @@ if (false) { module.exports = __WEBPACK_EXTERNAL_MODULE_22__; /***/ }), -/* 23 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.renderWasmText = exports.clearWasmStates = exports.wasmOffsetToLine = exports.lineToWasmOffset = exports.isWasm = exports.getWasmLineNumberFormatter = exports.getWasmText = undefined; - -var _WasmParser = __webpack_require__(677); - -var _WasmDis = __webpack_require__(678); - -var wasmStates = Object.create(null); - -/** - * @memberof utils/wasm - * @static - */ -function getWasmText(sourceId, data) { - var parser = new _WasmParser.BinaryReader(); - parser.setData(data.buffer, 0, data.length); - var dis = new _WasmDis.WasmDisassembler(); - dis.addOffsets = true; - var done = dis.disassembleChunk(parser); - var result = dis.getResult(); - if (result.lines.length === 0) { - result = { lines: ["No luck with wast conversion"], offsets: [0], done }; - } - - var offsets = result.offsets; - var lines = []; - for (var i = 0; i < offsets.length; i++) { - lines[offsets[i]] = i; - } - - wasmStates[sourceId] = { offsets, lines }; - - return { lines: result.lines, done: result.done }; -} - -/** - * @memberof utils/wasm - * @static - */ -function getWasmLineNumberFormatter(sourceId) { - var codeOf0 = 48, - codeOfA = 65; - var buffer = [codeOf0, codeOf0, codeOf0, codeOf0, codeOf0, codeOf0, codeOf0, codeOf0]; - var last0 = 7; - return function (number) { - var offset = lineToWasmOffset(sourceId, number - 1); - if (offset == undefined) { - return ""; - } - var i = 7; - for (var n = offset; n !== 0 && i >= 0; n >>= 4, i--) { - var nibble = n & 15; - buffer[i] = nibble < 10 ? codeOf0 + nibble : codeOfA - 10 + nibble; - } - for (var j = i; j > last0; j--) { - buffer[j] = codeOf0; - } - last0 = i; - return String.fromCharCode.apply(null, buffer); - }; -} - -/** - * @memberof utils/wasm - * @static - */ -function isWasm(sourceId) { - return sourceId in wasmStates; -} - -/** - * @memberof utils/wasm - * @static - */ -function lineToWasmOffset(sourceId, number) { - var wasmState = wasmStates[sourceId]; - if (!wasmState) { - return undefined; - } - var offset = wasmState.offsets[number]; - while (offset === undefined && number > 0) { - offset = wasmState.offsets[--number]; - } - return offset; -} - -/** - * @memberof utils/wasm - * @static - */ -function wasmOffsetToLine(sourceId, offset) { - var wasmState = wasmStates[sourceId]; - if (!wasmState) { - return undefined; - } - return wasmState.lines[offset]; -} - -/** - * @memberof utils/wasm - * @static - */ -function clearWasmStates() { - wasmStates = Object.create(null); -} - -function renderWasmText(sourceId, _ref) { - var binary = _ref.binary; - - // binary does not survive as Uint8Array, converting from string - var data = new Uint8Array(binary.length); - for (var i = 0; i < data.length; i++) { - data[i] = binary.charCodeAt(i); - } - - var _getWasmText = getWasmText(sourceId, data), - lines = _getWasmText.lines; - - var MAX_LINES = 100000; - if (lines.length > MAX_LINES) { - lines.splice(MAX_LINES, lines.length - MAX_LINES); - lines.push(";; .... text is truncated due to the size"); - } - return lines; -} - -exports.getWasmText = getWasmText; -exports.getWasmLineNumberFormatter = getWasmLineNumberFormatter; -exports.isWasm = isWasm; -exports.lineToWasmOffset = lineToWasmOffset; -exports.wasmOffsetToLine = wasmOffsetToLine; -exports.clearWasmStates = clearWasmStates; -exports.renderWasmText = renderWasmText; - -/***/ }), -/* 24 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.getFilenameFromPath = getFilenameFromPath; -exports.getURL = getURL; - -var _url = __webpack_require__(334); - -var _lodash = __webpack_require__(2); - -function getFilenameFromPath(pathname) { - var filename = ""; - if (pathname) { - filename = pathname.substring(pathname.lastIndexOf("/") + 1); - // This file does not have a name. Default should be (index). - if (filename == "" || !filename.includes(".")) { - filename = "(index)"; - } - } - return filename; -} - -function getURL(sourceUrl) { - var debuggeeUrl = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ""; - - var url = sourceUrl; - var def = { path: "", group: "", filename: "" }; - if (!url) { - return def; - } - - var _parse = (0, _url.parse)(url), - pathname = _parse.pathname, - protocol = _parse.protocol, - host = _parse.host, - path = _parse.path; - - var defaultDomain = (0, _url.parse)(debuggeeUrl).host; - var filename = getFilenameFromPath(pathname); - - switch (protocol) { - case "javascript:": - // Ignore `javascript:` URLs for now - return def; - - case "webpack:": - // A Webpack source is a special case - return (0, _lodash.merge)(def, { - path: path, - group: "Webpack", - filename: filename - }); - - case "about:": - // An about page is a special case - return (0, _lodash.merge)(def, { - path: "/", - group: url, - filename: filename - }); - - case null: - if (pathname && pathname.startsWith("/")) { - // If it's just a URL like "/foo/bar.js", resolve it to the file - // protocol - return (0, _lodash.merge)(def, { - path: path, - group: "file://", - filename: filename - }); - } else if (host === null) { - // We don't know what group to put this under, and it's a script - // with a weird URL. Just group them all under an anonymous group. - return (0, _lodash.merge)(def, { - path: url, - group: defaultDomain, - filename: filename - }); - } - break; - - case "http:": - case "https:": - return (0, _lodash.merge)(def, { - path: pathname, - group: host, - filename: filename - }); - } - - return (0, _lodash.merge)(def, { - path: path, - group: protocol ? `${protocol}//` : "", - filename: filename - }); -} - -/***/ }), +/* 23 */, +/* 24 */, /* 25 */, /* 26 */, /* 27 */, /* 28 */, /* 29 */, /* 30 */, -/* 31 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.InitialState = InitialState; -exports.getTextSearchResults = getTextSearchResults; -exports.getTextSearchQuery = getTextSearchQuery; - -var _immutable = __webpack_require__(146); - -var I = _interopRequireWildcard(_immutable); - -var _makeRecord = __webpack_require__(230); - -var _makeRecord2 = _interopRequireDefault(_makeRecord); - -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; } } - -/* This Source Code Form is subject to the terms of the Mozilla Public - * 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/. */ - -/** - * Search reducer - * @module reducers/search - */ - -function InitialState() { - return (0, _makeRecord2.default)({ query: "", results: I.List() })(); -} - -function update() { - var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : InitialState(); - var action = arguments[1]; - - switch (action.type) { - case "ADD_QUERY": - return state.update("query", value => action.query); - - case "CLEAR_QUERY": - return state.remove("query"); - - case "ADD_SEARCH_RESULT": - var _results = state.get("results"); - return state.merge({ results: _results.push(action.result) }); - - case "CLEAR_SEARCH_RESULTS": - return state.merge({ - results: state.get("results").clear() - }); - } - return state; -} - -function getTextSearchResults(state) { - return state.projectTextSearch.get("results"); -} - -function getTextSearchQuery(state) { - return state.projectTextSearch.get("query"); -} - -exports.default = update; - -/***/ }), +/* 31 */, /* 32 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { @@ -1280,515 +792,19 @@ function compose() { } /***/ }), -/* 37 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.addSearchQuery = addSearchQuery; -exports.clearSearchQuery = clearSearchQuery; -exports.clearSearchResults = clearSearchResults; -exports.searchSources = searchSources; -exports.searchSource = searchSource; - -var _search = __webpack_require__(1210); - -var _selectors = __webpack_require__(242); - -var _source = __webpack_require__(233); - -var _sources = __webpack_require__(254); - -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"); }); }; } - -/* This Source Code Form is subject to the terms of the Mozilla Public - * 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/. */ - -/** - * Redux actions for the search state - * @module actions/search - */ - -function addSearchQuery(query) { - return (_ref) => { - var dispatch = _ref.dispatch, - getState = _ref.getState; - - dispatch({ type: "ADD_QUERY", query }); - }; -} - -function clearSearchQuery() { - return (_ref2) => { - var dispatch = _ref2.dispatch, - getState = _ref2.getState; - - dispatch({ type: "CLEAR_QUERY" }); - }; -} - -function clearSearchResults() { - return (_ref3) => { - var dispatch = _ref3.dispatch, - getState = _ref3.getState; - - dispatch({ type: "CLEAR_SEARCH_RESULTS" }); - }; -} - -function searchSources(query) { - return (() => { - var _ref4 = _asyncToGenerator(function* (_ref5) { - var dispatch = _ref5.dispatch, - getState = _ref5.getState; - - yield dispatch(clearSearchResults()); - yield dispatch(addSearchQuery(query)); - yield dispatch((0, _sources.loadAllSources)()); - var sources = (0, _selectors.getSources)(getState()); - var validSources = sources.valueSeq().filter(function (source) { - return (0, _source.isLoaded)(source.toJS()) && !(0, _source.isThirdParty)(source.toJS()); - }).toJS(); - - for (var source of validSources) { - yield dispatch(searchSource(source.id, query)); - } - }); - - return function (_x) { - return _ref4.apply(this, arguments); - }; - })(); -} - -function searchSource(sourceId, query) { - return (() => { - var _ref6 = _asyncToGenerator(function* (_ref7) { - var dispatch = _ref7.dispatch, - getState = _ref7.getState; - - var sourceRecord = (0, _selectors.getSource)(getState(), sourceId); - if (!sourceRecord) { - return; - } - - var source = sourceRecord.toJS(); - var matches = yield (0, _search.findSourceMatches)(source, query); - dispatch({ - type: "ADD_SEARCH_RESULT", - result: { - sourceId: source.id, - filepath: source.url, - matches - } - }); - }); - - return function (_x2) { - return _ref6.apply(this, arguments); - }; - })(); -} - -/***/ }), +/* 37 */, /* 38 */, -/* 39 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _formatTree = __webpack_require__(273); - -Object.defineProperty(exports, "formatTree", { - enumerable: true, - get: function () { - return _formatTree.formatTree; - } -}); - -var _addToTree = __webpack_require__(40); - -Object.defineProperty(exports, "addToTree", { - enumerable: true, - get: function () { - return _addToTree.addToTree; - } -}); - -var _sortTree = __webpack_require__(794); - -Object.defineProperty(exports, "sortTree", { - enumerable: true, - get: function () { - return _sortTree.sortTree; - } -}); -Object.defineProperty(exports, "sortEntireTree", { - enumerable: true, - get: function () { - return _sortTree.sortEntireTree; - } -}); - -var _collapseTree = __webpack_require__(41); - -Object.defineProperty(exports, "collapseTree", { - enumerable: true, - get: function () { - return _collapseTree.collapseTree; - } -}); - -var _getDirectories = __webpack_require__(274); - -Object.defineProperty(exports, "getDirectories", { - enumerable: true, - get: function () { - return _getDirectories.getDirectories; - } -}); - -var _createTree = __webpack_require__(275); - -Object.defineProperty(exports, "createTree", { - enumerable: true, - get: function () { - return _createTree.createTree; - } -}); - -var _getURL = __webpack_require__(24); - -Object.defineProperty(exports, "getURL", { - enumerable: true, - get: function () { - return _getURL.getURL; - } -}); -Object.defineProperty(exports, "getFilenameFromPath", { - enumerable: true, - get: function () { - return _getURL.getFilenameFromPath; - } -}); - -var _utils = __webpack_require__(18); - -Object.defineProperty(exports, "nodeHasChildren", { - enumerable: true, - get: function () { - return _utils.nodeHasChildren; - } -}); -Object.defineProperty(exports, "isExactUrlMatch", { - enumerable: true, - get: function () { - return _utils.isExactUrlMatch; - } -}); -Object.defineProperty(exports, "isDirectory", { - enumerable: true, - get: function () { - return _utils.isDirectory; - } -}); -Object.defineProperty(exports, "createNode", { - enumerable: true, - get: function () { - return _utils.createNode; - } -}); -Object.defineProperty(exports, "createParentMap", { - enumerable: true, - get: function () { - return _utils.createParentMap; - } -}); -Object.defineProperty(exports, "getRelativePath", { - enumerable: true, - get: function () { - return _utils.getRelativePath; - } -}); -Object.defineProperty(exports, "isNotJavaScript", { - enumerable: true, - get: function () { - return _utils.isNotJavaScript; - } -}); - -/***/ }), -/* 40 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.addToTree = addToTree; - -var _utils = __webpack_require__(18); - -var _treeOrder = __webpack_require__(1239); - -var _getURL = __webpack_require__(24); - -function createNodeInTree(part, path, tree, index) { - 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; - - return node; -} - -/* - * Look for the child directory - * 1. if it exists return it - * 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; - - // we create and enter the new node - - - if (!childFound) { - return createNodeInTree(part, path, subTree, childIndex); - } - - // 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 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); - } - - // if there is no naming conflict, we can traverse into the child - return child; -} - -/* - * walk the source tree to the final node for a given url, - * adding new nodes along the way - */ -function traverseTree(url, tree, debuggeeHost) { - url.path = decodeURIComponent(url.path); - - var parts = url.path.split("/").filter(p => p !== ""); - parts.unshift(url.group); - - 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); - }, tree); -} - -/* - * Add a source file to a directory node in the tree - */ -function addSourceToNode(node, url, source) { - var isFile = !(0, _utils.isDirectory)(url); - - // if we have a file, and the subtree has no elements, overwrite the - // subtree contents with the source - if (isFile) { - return 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; - - // 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]; - 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; -} - -/** - * @memberof utils/sources-tree - * @static - */ -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); - finalNode.contents = addSourceToNode(finalNode, url, source); -} - -/***/ }), -/* 41 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.collapseTree = collapseTree; - -var _utils = __webpack_require__(18); - -/** - * Take an existing source tree, and return a new one with collapsed nodes. - */ -function collapseTree(node) { - var depth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; - - // Node is a folder. - if (Array.isArray(node.contents)) { - // Node is not a root/domain node, and only contains 1 item. - if (depth > 1 && node.contents.length === 1) { - var next = node.contents[0]; - // Do not collapse if the next node is a leaf node. - if ((0, _utils.nodeHasChildren)(next)) { - return collapseTree((0, _utils.createNode)(`${node.name}/${next.name}`, next.path, next.contents), depth + 1); - } - } - // Map the contents. - return (0, _utils.createNode)(node.name, node.path, node.contents.map(next => collapseTree(next, depth + 1))); - } - // Node is a leaf, not a folder, do not modify it. - return node; -} - -/***/ }), -/* 42 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -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); } } - -/* This Source Code Form is subject to the terms of the Mozilla Public - * 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/. */ - -// Dependencies -var React = __webpack_require__(0); -// Shortcuts -var span = React.DOM.span; - -var _require = __webpack_require__(927), - wrapRender = _require.wrapRender; - -var PropRep = __webpack_require__(937); - -var _require2 = __webpack_require__(925), - MODE = _require2.MODE; -/** - * Renders an map entry. A map entry is represented by its key, a column and its value. - */ - - -GripMapEntry.propTypes = { - object: React.PropTypes.object, - // @TODO Change this to Object.values once it's supported in Node's version of V8 - mode: React.PropTypes.oneOf(Object.keys(MODE).map(key => MODE[key])), - onDOMNodeMouseOver: React.PropTypes.func, - onDOMNodeMouseOut: React.PropTypes.func, - onInspectIconClick: React.PropTypes.func -}; - -function GripMapEntry(props) { - var object = props.object; - var _object$preview = object.preview, - key = _object$preview.key, - value = _object$preview.value; - - - return span.apply(undefined, [{ - className: "objectBox objectBox-map-entry" - }].concat(_toConsumableArray(PropRep(Object.assign({}, props, { - name: key, - object: value, - equal: " \u2192 ", - title: null, - suppressQuotes: false - }))))); -} - -function supportsObject(grip) { - var noGrip = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; - - if (noGrip === true) { - return false; - } - return grip && grip.type === "mapEntry" && grip.preview; -} - -function createGripMapEntry(key, value) { - return { - type: "mapEntry", - preview: { - key, - value - } - }; -} - -// Exports from this module -module.exports = { - rep: wrapRender(GripMapEntry), - createGripMapEntry, - supportsObject -}; - -/***/ }), +/* 39 */, +/* 40 */, +/* 41 */, +/* 42 */, /* 43 */, /* 44 */, /* 45 */, /* 46 */ /***/ (function(module, exports, __webpack_require__) { -module.exports = __webpack_require__(1); +module.exports = __webpack_require__(1459); /***/ }), @@ -1810,215 +826,11 @@ module.exports = __WEBPACK_EXTERNAL_MODULE_52__; /* 57 */, /* 58 */, /* 59 */, -/* 60 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/* This Source Code Form is subject to the terms of the Mozilla Public - * 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/. */ - - - -/** - * Empty shim for "devtools/client/shared/zoom-keys" module - * - * Based on nsIMarkupDocumentViewer.fullZoom API - * https://developer.mozilla.org/en-US/Firefox/Releases/3/Full_page_zoom - */ - -exports.register = function (window) {}; - -/***/ }), +/* 60 */, /* 61 */, -/* 62 */ -/***/ (function(module, exports, __webpack_require__) { - -/* This Source Code Form is subject to the terms of the Mozilla Public - * 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/. */ - -const networkRequest = __webpack_require__(63); -const workerUtils = __webpack_require__(64); - -module.exports = { - networkRequest, - workerUtils -}; - -/***/ }), -/* 63 */ -/***/ (function(module, exports) { - -/* This Source Code Form is subject to the terms of the Mozilla Public - * 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/. */ - -function networkRequest(url, opts) { - return new Promise((resolve, reject) => { - try { - const req = new XMLHttpRequest(); - - req.addEventListener("readystatechange", () => { - if (req.readyState === XMLHttpRequest.DONE) { - if (req.status === 200) { - resolve({ content: req.responseText }); - } else { - let text = req.statusText || "invalid URL"; - reject(text); - } - } - }); - - // Not working yet. - // if (!opts.loadFromCache) { - // req.channel.loadFlags = ( - // Components.interfaces.nsIRequest.LOAD_BYPASS_CACHE | - // Components.interfaces.nsIRequest.INHIBIT_CACHING | - // Components.interfaces.nsIRequest.LOAD_ANONYMOUS - // ); - // } - - req.open("GET", url); - req.send(); - } catch (e) { - reject(e.toString()); - } - }); -} - -module.exports = networkRequest; - -/***/ }), -/* 64 */ -/***/ (function(module, exports) { - -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 WorkerDispatcher() { - this.msgId = 1; - this.worker = null; -} /* This Source Code Form is subject to the terms of the Mozilla Public - * 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/. */ - -WorkerDispatcher.prototype = { - start(url) { - this.worker = new Worker(url); - this.worker.onerror = () => { - console.error(`Error in worker ${url}`); - }; - }, - - stop() { - if (!this.worker) { - return; - } - - this.worker.terminate(); - this.worker = null; - }, - - task(method) { - return (...args) => { - return new Promise((resolve, reject) => { - const id = this.msgId++; - this.worker.postMessage({ id, method, args }); - - const listener = ({ data: result }) => { - if (result.id !== id) { - return; - } - - this.worker.removeEventListener("message", listener); - if (result.error) { - reject(result.error); - } else { - resolve(result.response); - } - }; - - this.worker.addEventListener("message", listener); - }); - }; - } -}; - -function workerHandler(publicInterface) { - return function (msg) { - const { id, method, args } = msg.data; - try { - const response = publicInterface[method].apply(undefined, args); - if (response instanceof Promise) { - response.then(val => self.postMessage({ id, response: val }), err => self.postMessage({ id, error: err })); - } else { - self.postMessage({ id, response }); - } - } catch (error) { - self.postMessage({ id, error }); - } - }; -} - -function streamingWorkerHandler(publicInterface, { timeout = 100 } = {}, worker = self) { - let streamingWorker = (() => { - var _ref = _asyncToGenerator(function* (id, tasks) { - let isWorking = true; - - const intervalId = setTimeout(function () { - isWorking = false; - }, timeout); - - const results = []; - while (tasks.length !== 0 && isWorking) { - const { callback, context, args } = tasks.shift(); - const result = yield callback.call(context, args); - results.push(result); - } - worker.postMessage({ id, status: "pending", data: results }); - clearInterval(intervalId); - - if (tasks.length !== 0) { - yield streamingWorker(id, tasks); - } - }); - - return function streamingWorker(_x, _x2) { - return _ref.apply(this, arguments); - }; - })(); - - return (() => { - var _ref2 = _asyncToGenerator(function* (msg) { - const { id, method, args } = msg.data; - const workerMethod = publicInterface[method]; - if (!workerMethod) { - console.error(`Could not find ${method} defined in worker.`); - } - worker.postMessage({ id, status: "start" }); - - try { - const tasks = workerMethod(args); - yield streamingWorker(id, tasks); - worker.postMessage({ id, status: "done" }); - } catch (error) { - worker.postMessage({ id, status: "error", error }); - } - }); - - return function (_x3) { - return _ref2.apply(this, arguments); - }; - })(); -} - -module.exports = { - WorkerDispatcher, - workerHandler, - streamingWorkerHandler -}; - -/***/ }), +/* 62 */, +/* 63 */, +/* 64 */, /* 65 */, /* 66 */ /***/ (function(module, exports, __webpack_require__) { @@ -4405,802 +3217,14 @@ function overArg(func, transform) { /***/ }), -/* 131 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var updateConfig = (() => { - var _ref = _asyncToGenerator(function* () { - var response = yield fetch("/getconfig", { - method: "get" - }); - - var config = yield response.json(); - setConfig(config); - return config; - }); - - return function updateConfig() { - return _ref.apply(this, arguments); - }; -})(); - -var initApp = (() => { - var _ref2 = _asyncToGenerator(function* () { - var configureStore = __webpack_require__(132); - var reducers = __webpack_require__(143); - var LaunchpadApp = __webpack_require__(149); - - var createStore = configureStore({ - log: getValue("logging.actions"), - makeThunkArgs: function (args, state) { - return Object.assign({}, args, {}); - } - }); - - var store = createStore(combineReducers(reducers)); - var actions = bindActionCreators(__webpack_require__(181), store.dispatch); - - debugGlobal("launchpadStore", store); - - if (isDevelopment()) { - var config = yield updateConfig(); - actions.setConfig(config); - // AppConstants.DEBUG_JS_MODULES = true; - } - - return { store, actions, LaunchpadApp }; - }); - - return function initApp() { - return _ref2.apply(this, arguments); - }; -})(); - -var connectClients = (() => { - var _ref3 = _asyncToGenerator(function* (actions) { - var firefoxTabs = yield firefox.connectClient(); - actions.newTabs(firefoxTabs); - - chrome.connectClient().then(actions.newTabs); - - chrome.connectNodeClient().then(actions.newTabs); - }); - - return function connectClients(_x) { - return _ref3.apply(this, arguments); - }; -})(); - -var getTabs = (() => { - var _ref4 = _asyncToGenerator(function* (actions) { - var firefoxTabs = yield firefox.connectClient(); - var chromeTabs = yield chrome.connectClient(); - var nodeTabs = yield chrome.connectNodeClient(); - - actions.clearTabs(); - - actions.newTabs(firefoxTabs); - actions.newTabs(chromeTabs); - actions.newTabs(nodeTabs); - }); - - return function getTabs(_x2) { - return _ref4.apply(this, arguments); - }; -})(); - -var bootstrap = (() => { - var _ref5 = _asyncToGenerator(function* (React, ReactDOM) { - var connTarget = getTargetFromQuery(); - if (connTarget) { - var _ref6 = yield startDebugging(connTarget), - tab = _ref6.tab, - tabConnection = _ref6.tabConnection; - - yield updateConfig(); - return { tab, connTarget, tabConnection }; - } - - var _ref7 = yield initApp(), - store = _ref7.store, - actions = _ref7.actions, - LaunchpadApp = _ref7.LaunchpadApp; - - renderRoot(React, ReactDOM, LaunchpadApp, store); - yield connectClients(actions); - setInterval(_asyncToGenerator(function* () { - return yield getTabs(actions); - }), 3000); - - return undefined; - }); - - return function bootstrap(_x3, _x4) { - return _ref5.apply(this, arguments); - }; -})(); - -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"); }); }; } - -/* This Source Code Form is subject to the terms of the Mozilla Public - * 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/. */ - -/* global window, document, DebuggerConfig */ - -var _require = __webpack_require__(3), - bindActionCreators = _require.bindActionCreators, - combineReducers = _require.combineReducers; - -var _require2 = __webpack_require__(1189), - Provider = _require2.Provider; - -var _require3 = __webpack_require__(137), - defer = _require3.defer; - -var _require4 = __webpack_require__(184), - debugGlobal = _require4.debugGlobal; - -var _require5 = __webpack_require__(828), - setConfig = _require5.setConfig, - getValue = _require5.getValue, - isDevelopment = _require5.isDevelopment; - -var L10N = __webpack_require__(185); - -var _require6 = __webpack_require__(1130), - showMenu = _require6.showMenu, - buildMenu = _require6.buildMenu; - -setConfig({"environment":"firefox-panel","logging":false,"clientLogging":false,"firefox":{"mcPath":"./firefox"},"workers":{"parserURL":"resource://devtools/client/debugger/new/parser-worker.js","prettyPrintURL":"resource://devtools/client/debugger/new/pretty-print-worker.js","searchURL":"resource://devtools/client/debugger/new/search-worker.js"},"features":{"blackbox":{"enabled":true},"chromeScopes":{"enabled":false},"eventListeners":{"enabled":false},"codeCoverage":{"enabled":false},"codeFolding":{"enabled":false},"searchNav":{"enabled":true},"collapseFrame":{"enabled":true},"outline":{"enabled":true}}}); - -// Set various flags before requiring app code. -if (getValue("logging.client")) { - // DevToolsUtils.dumpn.wantLogging = true; -} - -var _require7 = __webpack_require__(885), - firefox = _require7.firefox, - chrome = _require7.chrome, - startDebugging = _require7.startDebugging; - -var Root = __webpack_require__(186); - -// Using this static variable allows webpack to know at compile-time -// to avoid this require and not include it at all in the output. -if (false) { - require("devtools-mc-assets/assets/devtools/client/themes/light-theme.css"); - require("devtools-mc-assets/assets/devtools/client/themes/dark-theme.css"); - require("devtools-mc-assets/assets/devtools/client/themes/firebug-theme.css"); -} - -function updateTheme(className) { - if (false) { - var theme = getValue("theme"); - var root = document.body.parentNode; - var appRoot = document.querySelector(".launchpad-root"); - - root.className = ""; - appRoot.className = className; - - root.classList.add(`theme-${theme}`); - appRoot.classList.add(`theme-${theme}`); - } -} - -function updateDir() { - var dir = getValue("dir"); - var root = document.body.parentNode; - root.dir = dir; -} - -function renderRoot(_React, _ReactDOM, component, _store, props) { - var createElement = _React.createElement; - - var mount = document.querySelector("#mount"); - - // bail in test environments that do not have a mount - if (!mount) { - return; - } - - var className = "launchpad-root theme-body"; - var root = Root(className); - mount.appendChild(root); - - if (isDevelopment()) { - updateConfig(); - updateTheme(className); - } - - if (component.props || component.propTypes) { - _ReactDOM.render(createElement(Provider, { store: _store }, createElement(component, props)), root); - } else { - root.appendChild(component); - } -} - -function unmountRoot(_ReactDOM) { - var mount = document.querySelector("#mount .launchpad-root"); - _ReactDOM.unmountComponentAtNode(mount); -} - -function getTargetFromQuery() { - var href = window.location.href; - var nodeMatch = href.match(/node-tab=([^&#]*)/); - var firefoxMatch = href.match(/firefox-tab=([^&#]*)/); - var chromeMatch = href.match(/chrome-tab=([^&#]*)/); - - if (nodeMatch) { - return { type: "node", param: nodeMatch[1] }; - } else if (firefoxMatch) { - return { type: "firefox", param: firefoxMatch[1] }; - } else if (chromeMatch) { - return { type: "chrome", param: chromeMatch[1] }; - } - - return null; -} - -module.exports = { - bootstrap, - buildMenu, - debugGlobal, - defer, - renderRoot, - L10N, - showMenu, - unmountRoot, - updateTheme, - updateDir -}; - -/***/ }), -/* 132 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -/* This Source Code Form is subject to the terms of the Mozilla Public - * 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/. */ -/* global window */ - -var _require = __webpack_require__(3), - createStore = _require.createStore, - applyMiddleware = _require.applyMiddleware; - -var _require2 = __webpack_require__(133), - waitUntilService = _require2.waitUntilService; - -var _require3 = __webpack_require__(134), - log = _require3.log; - -var _require4 = __webpack_require__(135), - history = _require4.history; - -var _require5 = __webpack_require__(136), - promise = _require5.promise; - -var _require6 = __webpack_require__(142), - thunk = _require6.thunk; - -/** - * This creates a dispatcher with all the standard middleware in place - * that all code requires. It can also be optionally configured in - * various ways, such as logging and recording. - * - * @param {object} opts: - * - log: log all dispatched actions to console - * - history: an array to store every action in. Should only be - * used in tests. - * - middleware: array of middleware to be included in the redux store - */ -var configureStore = function () { - var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - - var middleware = [thunk(opts.makeThunkArgs), promise, - - // Order is important: services must go last as they always - // operate on "already transformed" actions. Actions going through - // them shouldn't have any special fields like promises, they - // should just be normal JSON objects. - waitUntilService]; - - if (opts.history) { - middleware.push(history(opts.history)); - } - - if (opts.middleware) { - opts.middleware.forEach(fn => middleware.push(fn)); - } - - if (opts.log) { - middleware.push(log); - } - - // Hook in the redux devtools browser extension if it exists - var devtoolsExt = typeof window === "object" && window.devToolsExtension ? window.devToolsExtension() : f => f; - - return applyMiddleware.apply(undefined, middleware)(devtoolsExt(createStore)); -}; - -module.exports = configureStore; - -/***/ }), -/* 133 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -/* This Source Code Form is subject to the terms of the Mozilla Public - * 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/. */ - -/** - * A middleware which acts like a service, because it is stateful - * and "long-running" in the background. It provides the ability - * for actions to install a function to be run once when a specific - * condition is met by an action coming through the system. Think of - * it as a thunk that blocks until the condition is met. Example: - * - * ```js - * const services = { WAIT_UNTIL: require('wait-service').NAME }; - * - * { type: services.WAIT_UNTIL, - * predicate: action => action.type === constants.ADD_ITEM, - * run: (dispatch, getState, action) => { - * // Do anything here. You only need to accept the arguments - * // if you need them. `action` is the action that satisfied - * // the predicate. - * } - * } - * ``` - */ -var NAME = exports.NAME = "@@service/waitUntil"; - -function waitUntilService(_ref) { - var dispatch = _ref.dispatch, - getState = _ref.getState; - - var pending = []; - - function checkPending(action) { - var readyRequests = []; - var stillPending = []; - - // Find the pending requests whose predicates are satisfied with - // this action. Wait to run the requests until after we update the - // pending queue because the request handler may synchronously - // dispatch again and run this service (that use case is - // completely valid). - for (var request of pending) { - if (request.predicate(action)) { - readyRequests.push(request); - } else { - stillPending.push(request); - } - } - - pending = stillPending; - for (var _request of readyRequests) { - _request.run(dispatch, getState, action); - } - } - - return next => action => { - if (action.type === NAME) { - pending.push(action); - return null; - } - var result = next(action); - checkPending(action); - return result; - }; -} -exports.waitUntilService = waitUntilService; - -/***/ }), -/* 134 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -/* This Source Code Form is subject to the terms of the Mozilla Public - * 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/. */ - -/** - * A middleware that logs all actions coming through the system - * to the console. - */ -function log(_ref) { - var dispatch = _ref.dispatch, - getState = _ref.getState; - - return next => action => { - var actionText = JSON.stringify(action, null, 2); - var truncatedActionText = `${actionText.slice(0, 1000)}...`; - console.log(`[DISPATCH ${action.type}]`, action, truncatedActionText); - next(action); - }; -} - -exports.log = log; - -/***/ }), -/* 135 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -/* This Source Code Form is subject to the terms of the Mozilla Public - * 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/. */ - -var _require = __webpack_require__(828), - isDevelopment = _require.isDevelopment; - -/** - * A middleware that stores every action coming through the store in the passed - * in logging object. Should only be used for tests, as it collects all - * action information, which will cause memory bloat. - */ - - -exports.history = function () { - var log = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; - return (_ref) => { - var dispatch = _ref.dispatch, - getState = _ref.getState; - - if (isDevelopment()) { - console.warn("Using history middleware stores all actions in state for " + "testing and devtools is not currently running in test " + "mode. Be sure this is intentional."); - } - return next => action => { - log.push(action); - next(action); - }; - }; -}; - -/***/ }), -/* 136 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -/* This Source Code Form is subject to the terms of the Mozilla Public - * 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/. */ - -var _require = __webpack_require__(137), - defer = _require.defer; - -var _require2 = __webpack_require__(138), - entries = _require2.entries, - toObject = _require2.toObject; - -var _require3 = __webpack_require__(140), - executeSoon = _require3.executeSoon; - -var PROMISE = exports.PROMISE = "@@dispatch/promise"; -var seqIdVal = 1; - -function seqIdGen() { - return seqIdVal++; -} - -function promiseMiddleware(_ref) { - var dispatch = _ref.dispatch, - getState = _ref.getState; - - return next => action => { - if (!(PROMISE in action)) { - return next(action); - } - - var promiseInst = action[PROMISE]; - var seqId = seqIdGen().toString(); - - // Create a new action that doesn't have the promise field and has - // the `seqId` field that represents the sequence id - action = Object.assign(toObject(entries(action).filter(pair => pair[0] !== PROMISE)), { seqId }); - - dispatch(Object.assign({}, action, { status: "start" })); - - // Return the promise so action creators can still compose if they - // want to. - var deferred = defer(); - promiseInst.then(value => { - executeSoon(() => { - dispatch(Object.assign({}, action, { - status: "done", - value: value - })); - deferred.resolve(value); - }); - }, error => { - executeSoon(() => { - dispatch(Object.assign({}, action, { - status: "error", - error: error.message || error - })); - deferred.reject(error); - }); - }); - return deferred.promise; - }; -} - -exports.promise = promiseMiddleware; - -/***/ }), -/* 137 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -/* This Source Code Form is subject to the terms of the Mozilla Public - * 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/. */ - -/** - * Returns a deferred object, with a resolve and reject property. - * https://developer.mozilla.org/en-US/docs/Mozilla/JavaScript_code_modules/Promise.jsm/Deferred - */ -module.exports = function defer() { - var resolve = void 0, - reject = void 0; - var promise = new Promise(function () { - resolve = arguments[0]; - reject = arguments[1]; - }); - return { - resolve: resolve, - reject: reject, - promise: promise - }; -}; - -/***/ }), -/* 138 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -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"); } }; }(); - -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); } } - -/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */ -/* vim: set ft=javascript ts=2 et sw=2 tw=80: */ -/* This Source Code Form is subject to the terms of the Mozilla Public - * 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/. */ - -var co = __webpack_require__(965); - -function asPaused(client, func) { - if (client.state != "paused") { - return co(function* () { - yield client.interrupt(); - var result = void 0; - - try { - result = yield func(); - } catch (e) { - // Try to put the debugger back in a working state by resuming - // it - yield client.resume(); - throw e; - } - - yield client.resume(); - return result; - }); - } - return func(); -} - -function handleError(err) { - console.log("ERROR: ", err); -} - -function promisify(context, method) { - for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) { - args[_key - 2] = arguments[_key]; - } - - return new Promise((resolve, reject) => { - args.push(response => { - if (response.error) { - reject(response); - } else { - resolve(response); - } - }); - method.apply(context, args); - }); -} - -function truncateStr(str, size) { - if (str.length > size) { - return `${str.slice(0, size)}...`; - } - return str; -} - -function endTruncateStr(str, size) { - if (str.length > size) { - return `...${str.slice(str.length - size)}`; - } - return str; -} - -var msgId = 1; -function workerTask(worker, method) { - return function () { - for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { - args[_key2] = arguments[_key2]; - } - - return new Promise((resolve, reject) => { - var id = msgId++; - worker.postMessage({ id, method, args }); - - var listener = (_ref) => { - var result = _ref.data; - - if (result.id !== id) { - return; - } - - worker.removeEventListener("message", listener); - if (result.error) { - reject(result.error); - } else { - resolve(result.response); - } - }; - - worker.addEventListener("message", listener); - }); - }; -} - -/** - * Interleaves two arrays element by element, returning the combined array, like - * a zip. In the case of arrays with different sizes, undefined values will be - * interleaved at the end along with the extra values of the larger array. - * - * @param Array a - * @param Array b - * @returns Array - * The combined array, in the form [a1, b1, a2, b2, ...] - */ -function zip(a, b) { - if (!b) { - return a; - } - if (!a) { - return b; - } - var pairs = []; - for (var i = 0, aLength = a.length, bLength = b.length; i < aLength || i < bLength; i++) { - pairs.push([a[i], b[i]]); - } - return pairs; -} - -/** - * Converts an object into an array with 2-element arrays as key/value - * pairs of the object. `{ foo: 1, bar: 2}` would become - * `[[foo, 1], [bar 2]]` (order not guaranteed); - * - * @param object obj - * @returns array - */ -function entries(obj) { - return Object.keys(obj).map(k => [k, obj[k]]); -} - -function mapObject(obj, iteratee) { - return toObject(entries(obj).map((_ref2) => { - var _ref3 = _slicedToArray(_ref2, 2), - key = _ref3[0], - value = _ref3[1]; - - return [key, iteratee(key, value)]; - })); -} - -/** - * Takes an array of 2-element arrays as key/values pairs and - * constructs an object using them. - */ -function toObject(arr) { - var obj = {}; - for (var pair of arr) { - obj[pair[0]] = pair[1]; - } - return obj; -} - -/** - * Composes the given functions into a single function, which will - * apply the results of each function right-to-left, starting with - * applying the given arguments to the right-most function. - * `compose(foo, bar, baz)` === `args => foo(bar(baz(args)` - * - * @param ...function funcs - * @returns function - */ -function compose() { - for (var _len3 = arguments.length, funcs = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) { - funcs[_key3] = arguments[_key3]; - } - - return function () { - for (var _len4 = arguments.length, args = Array(_len4), _key4 = 0; _key4 < _len4; _key4++) { - args[_key4] = arguments[_key4]; - } - - var initialValue = funcs[funcs.length - 1].apply(null, args); - var leftFuncs = funcs.slice(0, -1); - return leftFuncs.reduceRight((composed, f) => f(composed), initialValue); - }; -} - -function updateObj(obj, fields) { - return Object.assign({}, obj, fields); -} - -function throttle(func, ms) { - var timeout = void 0, - _this = void 0; - return function () { - for (var _len5 = arguments.length, args = Array(_len5), _key5 = 0; _key5 < _len5; _key5++) { - args[_key5] = arguments[_key5]; - } - - _this = this; - if (!timeout) { - timeout = setTimeout(() => { - func.apply.apply(func, [_this].concat(_toConsumableArray(args))); - timeout = null; - }, ms); - } - }; -} - -module.exports = { - asPaused, - handleError, - promisify, - truncateStr, - endTruncateStr, - workerTask, - zip, - entries, - toObject, - mapObject, - compose, - updateObj, - throttle -}; - -/***/ }), +/* 131 */, +/* 132 */, +/* 133 */, +/* 134 */, +/* 135 */, +/* 136 */, +/* 137 */, +/* 138 */, /* 139 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { @@ -5237,221 +3261,12 @@ function isObjectLike(value) { /***/ }), -/* 140 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -/* This Source Code Form is subject to the terms of the Mozilla Public - * 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/. */ - -var assert = __webpack_require__(141); - -function reportException(who, exception) { - var msg = `${who} threw an exception: `; - console.error(msg, exception); -} - -function executeSoon(fn) { - setTimeout(fn, 0); -} - -module.exports = { - reportException, - executeSoon, - assert -}; - -/***/ }), -/* 141 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -/* This Source Code Form is subject to the terms of the Mozilla Public - * 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/. */ - -function assert(condition, message) { - if (!condition) { - throw new Error(`Assertion failure: ${message}`); - } -} - -module.exports = assert; - -/***/ }), -/* 142 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -/* This Source Code Form is subject to the terms of the Mozilla Public - * 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/. */ - -/** - * A middleware that allows thunks (functions) to be dispatched. If - * it's a thunk, it is called with an argument that contains - * `dispatch`, `getState`, and any additional args passed in via the - * middleware constructure. This allows the action to create multiple - * actions (most likely asynchronously). - */ -function thunk(makeArgs) { - return (_ref) => { - var dispatch = _ref.dispatch, - getState = _ref.getState; - - var args = { dispatch, getState }; - - return next => action => { - return typeof action === "function" ? action(makeArgs ? makeArgs(args, getState()) : args) : next(action); - }; - }; -} -exports.thunk = thunk; - -/***/ }), -/* 143 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -/* This Source Code Form is subject to the terms of the Mozilla Public - * 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/. */ - -var tabs = __webpack_require__(144); -var config = __webpack_require__(148); - -module.exports = { - tabs, - config -}; - -/***/ }), -/* 144 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -/* This Source Code Form is subject to the terms of the Mozilla Public - * 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/. */ - -var constants = __webpack_require__(145); -var Immutable = __webpack_require__(146); -var fromJS = __webpack_require__(147); - -var initialState = fromJS({ - tabs: {}, - selectedTab: null, - filterString: "" -}); - -function update() { - var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState; - var action = arguments[1]; - - switch (action.type) { - case constants.CLEAR_TABS: - return state.setIn(["tabs"], Immutable.Map()).setIn(["selectedTab"], null); - - case constants.ADD_TABS: - var tabs = action.value; - if (!tabs) { - return state; - } - - return state.mergeIn(["tabs"], Immutable.Map(tabs.map(tab => { - tab = Object.assign({}, tab, { id: getTabId(tab) }); - return [tab.id, Immutable.Map(tab)]; - }))); - - case constants.SELECT_TAB: - var tabToSelect = state.getIn(["tabs", action.id]); - return state.setIn(["selectedTab"], tabToSelect); - - case constants.FILTER_TABS: - return state.setIn(["filterString"], action.value); - } - - return state; -} - -function getTabId(tab) { - var id = tab.id; - var isFirefox = tab.clientType == "firefox"; - - // NOTE: we're getting the last part of the actor because - // we want to ignore the connection id - if (isFirefox) { - id = tab.id.split(".").pop(); - } - - return id; -} - -module.exports = update; - -/***/ }), -/* 145 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */ -/* vim: set ft=javascript ts=2 et sw=2 tw=80: */ -/* This Source Code Form is subject to the terms of the Mozilla Public - * 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/. */ -var sidePanelItems = { - Firefox: { - name: "Firefox", - clientType: "firefox", - paramName: "firefox-tab", - docsUrlPart: "firefox" - }, - Chrome: { - name: "Chrome", - clientType: "chrome", - paramName: "chrome-tab", - docsUrlPart: "chrome", - isUnderConstruction: true - }, - Node: { - name: "Node", - clientType: "node", - paramName: "node-tab", - docsUrlPart: "node", - isUnderConstruction: true - }, - Settings: { - name: "Settings", - clientType: "settings", - paramName: "settings-tab", - docsUrlPart: "settings" - } -}; - -module.exports = { - CLEAR_TABS: "CLEAR_TABS", - ADD_TABS: "ADD_TABS", - SELECT_TAB: "SELECT_TAB", - FILTER_TABS: "FILTER_TABS", - SET_VALUE: "SET_VALUE", - SET_CONFIG: "SET_CONFIG", - sidePanelItems -}; - -/***/ }), +/* 140 */, +/* 141 */, +/* 142 */, +/* 143 */, +/* 144 */, +/* 145 */, /* 146 */ /***/ (function(module, exports, __webpack_require__) { @@ -10434,176 +8249,9 @@ module.exports = { })); /***/ }), -/* 147 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -/* This Source Code Form is subject to the terms of the Mozilla Public - * 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/. */ - -var Immutable = __webpack_require__(146); - -// When our app state is fully types, we should be able to get rid of -// this function. This is only temporarily necessary to support -// converting typed objects to immutable.js, which usually happens in -// reducers. -function fromJS(value) { - if (Array.isArray(value)) { - return Immutable.Seq(value).map(fromJS).toList(); - } - if (value && value.constructor.meta) { - // This adds support for tcomb objects which are native JS objects - // but are not "plain", so the above checks fail. Since they - // behave the same we can use the same constructors, but we need - // special checks for them. - var kind = value.constructor.meta.kind; - if (kind === "struct") { - return Immutable.Seq(value).map(fromJS).toMap(); - } else if (kind === "list") { - return Immutable.Seq(value).map(fromJS).toList(); - } - } - - // If it's a primitive type, just return the value. Note `==` check - // for null, which is intentionally used to match either `null` or - // `undefined`. - if (value == null || typeof value !== "object") { - return value; - } - - // Otherwise, treat it like an object. We can't reliably detect if - // it's a plain object because we might be objects from other JS - // contexts so `Object !== Object`. - return Immutable.Seq(value).map(fromJS).toMap(); -} - -module.exports = fromJS; - -/***/ }), -/* 148 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -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); } } - -/* This Source Code Form is subject to the terms of the Mozilla Public - * 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/. */ - -var constants = __webpack_require__(145); -var fromJS = __webpack_require__(147); -var I = __webpack_require__(146); - -var initialState = fromJS({ - config: I.Map() -}); - -function update() { - var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState; - var action = arguments[1]; - - switch (action.type) { - case constants.SET_VALUE: - return state.setIn(["config"].concat(_toConsumableArray(action.path.split("."))), action.value); - - case constants.SET_CONFIG: - return state.setIn(["config"], fromJS(action.config)); - } - - return state; -} - -module.exports = update; - -/***/ }), -/* 149 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -/* This Source Code Form is subject to the terms of the Mozilla Public - * 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/. */ - -var React = __webpack_require__(0); -var PropTypes = React.PropTypes; - -var ImPropTypes = __webpack_require__(150); - -var _require = __webpack_require__(1189), - connect = _require.connect; - -var _require2 = __webpack_require__(3), - bindActionCreators = _require2.bindActionCreators; - -var _require3 = __webpack_require__(160), - getTabs = _require3.getTabs, - getFilterString = _require3.getFilterString, - getConfig = _require3.getConfig; - -var _require4 = __webpack_require__(828), - getValue = _require4.getValue; - -var LandingPage = React.createFactory(__webpack_require__(167)); - -var LaunchpadApp = React.createClass({ - displayName: "LaunchpadApp", - - propTypes: { - tabs: ImPropTypes.map.isRequired, - filterString: PropTypes.string, - actions: PropTypes.object, - config: PropTypes.object - }, - - render() { - var _props = this.props, - filterString = _props.filterString, - _props$actions = _props.actions, - setValue = _props$actions.setValue, - filterTabs = _props$actions.filterTabs, - config = _props.config; - - - return LandingPage({ - tabs: this.props.tabs, - supportsFirefox: !!getValue("firefox"), - supportsChrome: !!getValue("chrome"), - title: getValue("title"), - filterString, - onFilterChange: filterTabs, - onTabClick: url => { - window.location = url; - }, - config, - setValue - }); - } -}); - -function mapStateToProps(state) { - return { - tabs: getTabs(state), - filterString: getFilterString(state), - config: getConfig(state) - }; -} - -function mapDispatchToProps(dispatch) { - return { - actions: bindActionCreators(__webpack_require__(181), dispatch) - }; -} - -module.exports = connect(mapStateToProps, mapDispatchToProps)(LaunchpadApp); - -/***/ }), +/* 147 */, +/* 148 */, +/* 149 */, /* 150 */ /***/ (function(module, exports, __webpack_require__) { @@ -10926,53 +8574,7 @@ module.exports = invariant; /***/ }), -/* 160 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -/* This Source Code Form is subject to the terms of the Mozilla Public - * 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/. */ - -var _require = __webpack_require__(161), - score = _require.score; - -function getTabs(state) { - var tabs = state.tabs.get("tabs"); - var filterString = getFilterString(state); - - if (filterString === "") { - return tabs; - } - - return tabs.map(tab => { - var _overallScore = score(tab.get("title"), filterString) + score(tab.get("url"), filterString); - return tab.set("filteredOut", _overallScore === 0); - }); -} - -function getSelectedTab(state) { - return state.tabs.get("selectedTab"); -} - -function getFilterString(state) { - return state.tabs.get("filterString"); -} - -function getConfig(state) { - return state.config.get("config").toJS(); -} - -module.exports = { - getTabs, - getSelectedTab, - getFilterString, - getConfig -}; - -/***/ }), +/* 160 */, /* 161 */ /***/ (function(module, exports, __webpack_require__) { @@ -11884,225 +9486,7 @@ module.exports = { /***/ }), -/* 167 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -/* This Source Code Form is subject to the terms of the Mozilla Public - * 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/. */ - -var React = __webpack_require__(0); - -__webpack_require__(1298); -var dom = React.DOM; - -var ImPropTypes = __webpack_require__(150); -var configMap = __webpack_require__(145).sidePanelItems; -var Tabs = React.createFactory(__webpack_require__(172)); -var Sidebar = React.createFactory(__webpack_require__(176)); -var Settings = React.createFactory(__webpack_require__(179)); - -var githubUrl = "https://github.com/devtools-html/debugger.html/blob/master"; - -function getTabsByClientType(tabs, clientType) { - return tabs.valueSeq().filter(tab => tab.get("clientType") == clientType); -} - -function firstTimeMessage(title, urlPart) { - return dom.div({ className: "footer-note" }, `First time connecting to ${title}? Checkout out the `, dom.a({ - href: `${githubUrl}/docs/getting-setup.md#starting-${urlPart}`, - target: "_blank" - }, "docs"), "."); -} - -var LandingPage = React.createClass({ - displayName: "LandingPage", - - propTypes: { - tabs: ImPropTypes.map.isRequired, - supportsFirefox: React.PropTypes.bool.isRequired, - supportsChrome: React.PropTypes.bool.isRequired, - title: React.PropTypes.string.isRequired, - filterString: React.PropTypes.string, - onFilterChange: React.PropTypes.func.isRequired, - onTabClick: React.PropTypes.func.isRequired, - config: React.PropTypes.object.isRequired, - setValue: React.PropTypes.func.isRequired - }, - - getInitialState() { - return { - selectedPane: configMap.Firefox.name, - firefoxConnected: false, - chromeConnected: false - }; - }, - - componentDidUpdate() { - if (this.refs.filterInput) { - this.refs.filterInput.focus(); - } - }, - - onFilterChange(newFilterString) { - this.props.onFilterChange(newFilterString); - }, - - onSideBarItemClick(itemTitle) { - if (itemTitle !== this.state.selectedPane) { - this.setState({ selectedPane: itemTitle }); - } - }, - - renderLaunchOptions() { - var selectedPane = this.state.selectedPane; - var _configMap$selectedPa = configMap[selectedPane], - name = _configMap$selectedPa.name, - isUnderConstruction = _configMap$selectedPa.isUnderConstruction; - - - var isConnected = name === configMap.Firefox.name ? this.state.firefoxConnected : this.state.chromeConnected; - var isNodeSelected = name === configMap.Node.name; - - if (isNodeSelected) { - return dom.div({ className: "launch-action-container" }, dom.h3({}, "Run a node script in the terminal with `--inspect`"), isUnderConstruction ? this.renderExperimentalMessage(name) : null); - } - - var connectedStateText = isNodeSelected ? null : `Please open a tab in ${name}`; - - return isConnected ? connectedStateText : this.renderLaunchButton(name, isUnderConstruction); - }, - - renderLaunchButton(browserName, isUnderConstruction) { - return dom.div({ className: "launch-action-container" }, dom.button({ onClick: () => this.launchBrowser(browserName) }, `Launch ${browserName}`), isUnderConstruction ? this.renderExperimentalMessage(browserName) : null); - }, - - renderExperimentalMessage(browserName) { - var underConstructionMessage = "Debugging is experimental and certain features won't work (i.e, seeing variables, attaching breakpoints)"; // eslint-disable-line max-len - - return dom.div({ className: "under-construction" }, dom.div({ className: "under-construction-message" }, dom.p({}, underConstructionMessage), dom.img({ src: "/assets/under_construction.png" }), dom.a({ - className: "github-link", - target: "_blank" - }, "Help us make it happen"))); - }, - - launchBrowser(browser) { - fetch("/launch", { - body: JSON.stringify({ browser }), - headers: { - "Content-Type": "application/json" - }, - method: "post" - }).then(resp => { - if (browser === configMap.Firefox.name) { - this.setState({ firefoxConnected: true }); - } else { - this.setState({ chromeConnected: true }); - } - }).catch(err => { - alert(`Error launching ${browser}. ${err.message}`); - }); - }, - - renderEmptyPanel() { - return dom.div({ className: "hero" }, this.renderLaunchOptions()); - }, - - renderSettings() { - var _props = this.props, - config = _props.config, - setValue = _props.setValue; - - - return dom.div({}, dom.header({}, dom.h1({}, configMap.Settings.name)), Settings({ config, setValue })); - }, - - renderFilter() { - var selectedPane = this.state.selectedPane; - var _props2 = this.props, - tabs = _props2.tabs, - _props2$filterString = _props2.filterString, - filterString = _props2$filterString === undefined ? "" : _props2$filterString; - var _configMap$selectedPa2 = configMap[selectedPane], - clientType = _configMap$selectedPa2.clientType, - paramName = _configMap$selectedPa2.paramName; - - - var targets = getTabsByClientType(tabs, clientType); - - return dom.header({}, dom.input({ - ref: "filterInput", - placeholder: "Filter tabs", - value: filterString, - autoFocus: true, - type: "search", - onChange: e => this.onFilterChange(e.target.value), - onKeyDown: e => { - if (targets.size === 1 && e.keyCode === 13) { - this.onTabClick(targets.first(), paramName); - } - } - })); - }, - - renderPanel() { - var _props3 = this.props, - onTabClick = _props3.onTabClick, - tabs = _props3.tabs; - var selectedPane = this.state.selectedPane; - var _configMap$selectedPa3 = configMap[selectedPane], - name = _configMap$selectedPa3.name, - clientType = _configMap$selectedPa3.clientType, - paramName = _configMap$selectedPa3.paramName; - - - var clientTargets = getTabsByClientType(tabs, clientType); - var tabsDetected = clientTargets && clientTargets.count() > 0; - var targets = clientTargets.filter(t => !t.get("filteredOut")); - - var isSettingsPaneSelected = name === configMap.Settings.name; - - if (isSettingsPaneSelected) { - return this.renderSettings(); - } - - if (!tabsDetected) { - return this.renderEmptyPanel(); - } - - return dom.div({}, this.renderFilter(), Tabs({ targets, paramName, onTabClick })); - }, - - render() { - var _props4 = this.props, - supportsFirefox = _props4.supportsFirefox, - supportsChrome = _props4.supportsChrome, - title = _props4.title; - var selectedPane = this.state.selectedPane; - var onSideBarItemClick = this.onSideBarItemClick; - var _configMap$selectedPa4 = configMap[selectedPane], - name = _configMap$selectedPa4.name, - docsUrlPart = _configMap$selectedPa4.docsUrlPart; - - - return dom.div({ - className: "landing-page" - }, Sidebar({ - supportsFirefox, - supportsChrome, - title, - selectedPane, - onSideBarItemClick - }), dom.main({ className: "panel" }, this.renderPanel(), firstTimeMessage(name, docsUrlPart))); - } -}); - -module.exports = LandingPage; - -/***/ }), +/* 167 */, /* 168 */ /***/ (function(module, exports, __webpack_require__) { @@ -12309,77 +9693,7 @@ function combineReducers(reducers) { } /***/ }), -/* 172 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -/* This Source Code Form is subject to the terms of the Mozilla Public - * 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/. */ - -var React = __webpack_require__(0); - -__webpack_require__(1299); -var dom = React.DOM; - -var classnames = __webpack_require__(175); - -function getTabURL(tab, paramName) { - var tabID = tab.get("id"); - return `/?${paramName}=${tabID}`; -} - -var Tabs = React.createClass({ - displayName: "Tabs", - - propTypes: { - targets: React.PropTypes.object.isRequired, - paramName: React.PropTypes.string.isRequired, - onTabClick: React.PropTypes.func.isRequired - }, - - onTabClick(tab, paramName) { - this.props.onTabClick(getTabURL(tab, paramName)); - }, - - render() { - var _props = this.props, - targets = _props.targets, - paramName = _props.paramName; - - - if (!targets || targets.count() == 0) { - return dom.div({}, ""); - } - - var tabClassNames = ["tab"]; - if (targets.size === 1) { - tabClassNames.push("active"); - } - - return dom.div({ className: "tab-group" }, dom.ul({ className: "tab-list" }, targets.valueSeq().map(tab => dom.li({ - className: classnames("tab", { - active: targets.size === 1 - }), - key: tab.get("id"), - tabIndex: 0, - role: "link", - onClick: () => this.onTabClick(tab, paramName), - onKeyDown: e => { - if (e.keyCode === 13) { - this.onTabClick(tab, paramName); - } - } - }, dom.div({ className: "tab-title" }, tab.get("title")), dom.div({ className: "tab-url" }, tab.get("url")))))); - } - -}); - -module.exports = Tabs; - -/***/ }), +/* 172 */, /* 173 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { @@ -12545,74 +9859,7 @@ var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! /***/ }), -/* 176 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -/* This Source Code Form is subject to the terms of the Mozilla Public - * 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/. */ - -var React = __webpack_require__(0); -__webpack_require__(1300); -var dom = React.DOM; - -var classnames = __webpack_require__(175); -var Svg = __webpack_require__(1349); -var Sidebar = React.createClass({ - displayName: "Sidebar", - - propTypes: { - supportsFirefox: React.PropTypes.bool.isRequired, - supportsChrome: React.PropTypes.bool.isRequired, - title: React.PropTypes.string.isRequired, - selectedPane: React.PropTypes.string.isRequired, - onSideBarItemClick: React.PropTypes.func.isRequired - }, - - renderTitle(title) { - return dom.div({ className: "title-wrapper" }, dom.h1({}, title), dom.div({ className: "launchpad-container" }, Svg({ name: "rocket" }), dom.h2({ className: "launchpad-container-title" }, "Launchpad"))); - }, - - renderItem(title) { - return dom.li({ - className: classnames({ - selected: title == this.props.selectedPane - }), - key: title, - tabIndex: 0, - role: "button", - onClick: () => this.props.onSideBarItemClick(title), - onKeyDown: e => { - if (e.keyCode === 13) { - this.props.onSideBarItemClick(title); - } - } - }, dom.a({}, title)); - }, - - render() { - var connections = []; - - if (this.props.supportsFirefox) { - connections.push("Firefox"); - } - - if (this.props.supportsChrome) { - connections.push("Chrome", "Node"); - } - - return dom.aside({ - className: "sidebar" - }, this.renderTitle(this.props.title), dom.ul({}, connections.map(title => this.renderItem(title)), this.renderItem("Settings"))); - } -}); - -module.exports = Sidebar; - -/***/ }), +/* 176 */, /* 177 */ /***/ (function(module, exports, __webpack_require__) { @@ -12720,131 +9967,7 @@ emptyFunction.thatReturnsArgument = function (arg) { module.exports = emptyFunction; /***/ }), -/* 179 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -/* This Source Code Form is subject to the terms of the Mozilla Public - * 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/. */ - -var React = __webpack_require__(0); -var dom = React.DOM; - -var _require = __webpack_require__(1130), - showMenu = _require.showMenu, - buildMenu = _require.buildMenu; - -var Settings = React.createClass({ - displayName: "Settings", - - propTypes: { - config: React.PropTypes.object.isRequired, - setValue: React.PropTypes.func.isRequired - }, - - onConfigContextMenu(event, key) { - event.preventDefault(); - - var _props = this.props, - setValue = _props.setValue, - config = _props.config; - - - var setConfig = (path, value) => { - setValue(path, value); - }; - - var ltrMenuItem = { - id: "node-menu-ltr", - label: "ltr", - disabled: config[key] === "ltr", - click: () => setConfig(key, "ltr") - }; - - var rtlMenuItem = { - id: "node-menu-rtl", - label: "rtl", - disabled: config[key] === "rtl", - click: () => setConfig(key, "rtl") - }; - - var lightMenuItem = { - id: "node-menu-light", - label: "light", - disabled: config[key] === "light", - click: () => setConfig(key, "light") - }; - - var darkMenuItem = { - id: "node-menu-dark", - label: "dark", - disabled: config[key] === "dark", - click: () => setConfig(key, "dark") - }; - - var firebugMenuItem = { - id: "node-menu-firebug", - label: "firebug", - disabled: config[key] === "firebug", - click: () => setConfig(key, "firebug") - }; - - var items = { - "dir": [{ item: ltrMenuItem }, { item: rtlMenuItem }], - "theme": [{ item: lightMenuItem }, { item: darkMenuItem }, { item: firebugMenuItem }] - }; - showMenu(event, buildMenu(items[key])); - }, - - onInputHandler(e, path) { - var setValue = this.props.setValue; - - setValue(path, e.target.checked); - }, - - renderConfig(config) { - var configs = [{ name: "dir", label: "direction" }, { name: "theme", label: "theme" - // Hiding hotReloading option for now. See Issue #242 - // { name: "hotReloading", label: "hot reloading", bool: true } - }]; - - return dom.ul({ className: "tab-list" }, configs.map(c => { - return dom.li({ key: c.name, className: "tab tab-sides" }, dom.div({ className: "tab-title" }, c.label), c.bool ? dom.input({ - type: "checkbox", - defaultChecked: config[c.name], - onChange: e => this.onInputHandler(e, c.name) - }, null) : dom.div({ - className: "tab-value", - onClick: e => this.onConfigContextMenu(e, c.name) - }, config[c.name])); - })); - }, - - renderFeatures(features) { - return dom.ul({ className: "tab-list" }, Object.keys(features).map(key => dom.li({ - className: "tab tab-sides", - key - }, dom.div({ className: "tab-title" }, typeof features[key] == "object" ? features[key].label : key), dom.div({ className: "tab-value" }, dom.input({ - type: "checkbox", - defaultChecked: features[key].enabled, - onChange: e => this.onInputHandler(e, `features.${key}.enabled`) - }))))); - }, - - render() { - var config = this.props.config; - - - return dom.div({ className: "tab-group" }, dom.h3({}, "Configurations"), this.renderConfig(config), config.features ? (dom.h3({}, "Features"), this.renderFeatures(config.features)) : null); - } -}); - -module.exports = Settings; - -/***/ }), +/* 179 */, /* 180 */ /***/ (function(module, exports, __webpack_require__) { @@ -12904,324 +10027,12 @@ function invariant(condition, format, a, b, c, d, e, f) { module.exports = invariant; /***/ }), -/* 181 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -/* This Source Code Form is subject to the terms of the Mozilla Public - * 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/. */ - -var tabs = __webpack_require__(182); -var config = __webpack_require__(183); - -module.exports = Object.assign({}, tabs, config); - -/***/ }), -/* 182 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -/* This Source Code Form is subject to the terms of the Mozilla Public - * 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/. */ -/* global window */ - -/** - * Redux actions for the pause state - * @module actions/tabs - */ - -var constants = __webpack_require__(145); - -/** - * @typedef {Object} TabAction - * @memberof actions/tabs - * @static - * @property {number} type The type of Action - * @property {number} value The payload of the Action - */ - -/** - * @memberof actions/tabs - * @static - * @returns {TabAction} with type constants.CLEAR_TABS and tabs as value - */ -function clearTabs() { - return { - type: constants.CLEAR_TABS - }; -} - -/** - * @memberof actions/tabs - * @static - * @param {Array} tabs - * @returns {TabAction} with type constants.ADD_TABS and tabs as value - */ -function newTabs(tabs) { - return (_ref) => { - var getState = _ref.getState, - dispatch = _ref.dispatch; - - return dispatch({ - type: constants.ADD_TABS, - value: tabs - }); - }; -} - -/** - * @memberof actions/tabs - * @static - * @param {String} $0.id Unique ID of the tab to select - * @returns {TabAction} - */ -function selectTab(_ref2) { - var id = _ref2.id; - - return { - type: constants.SELECT_TAB, - id: id - }; -} - -/** - * @memberof actions/tabs - * @static - * @param {String} value String which should be used to filter tabs - * @returns {TabAction} with type constants.FILTER_TABS - * and filter string as value - */ -function filterTabs(value) { - return { - type: constants.FILTER_TABS, - value - }; -} - -module.exports = { - newTabs, - selectTab, - filterTabs, - clearTabs -}; - -/***/ }), -/* 183 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -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"); }); }; } - -/* This Source Code Form is subject to the terms of the Mozilla Public - * 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/. */ - -var _require = __webpack_require__(828), - _setConfig = _require.setConfig; - -var _require2 = __webpack_require__(131), - updateTheme = _require2.updateTheme, - updateDir = _require2.updateDir; - -/** - * Redux actions for the pause state - * @module actions/config - */ - -var constants = __webpack_require__(145); - - -/** - * @typedef {Object} ConfigAction - * @memberof actions/config - * @static - * @property {number} type The type of Action - * @property {number} value The payload of the Action - */ - -/** - * @memberof actions/config - * @static - * @param {string} path - * @param {string} value - * @returns {ConfigAction} with type constants.SET_VALUE and value - */ -function setValue(path, value) { - return (() => { - var _ref = _asyncToGenerator(function* (_ref2) { - var dispatch = _ref2.dispatch; - - var response = yield fetch("/setconfig", { - method: "post", - headers: { "Content-Type": "application/json" }, - body: JSON.stringify({ path, value }) - }); - - var config = yield response.json(); - _setConfig(config); - updateTheme(); - updateDir(); - - dispatch({ - type: constants.SET_VALUE, - path, - value - }); - }); - - return function (_x) { - return _ref.apply(this, arguments); - }; - })(); -} - -/** - * @memberof actions/config - * @static - * @param {string} config - * @returns {ConfigAction} with type constants.SET_CONFIG and config - */ -function setConfig(config) { - return { - type: constants.SET_CONFIG, - config - }; -} - -module.exports = { - setValue, - setConfig -}; - -/***/ }), -/* 184 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -/* This Source Code Form is subject to the terms of the Mozilla Public - * 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/. */ - -var _require = __webpack_require__(828), - isDevelopment = _require.isDevelopment, - isTesting = _require.isTesting; - -function debugGlobal(field, value) { - if (isDevelopment() || isTesting()) { - window[field] = value; - } -} - -module.exports = { - debugGlobal -}; - -/***/ }), -/* 185 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -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); } } - -/* This Source Code Form is subject to the terms of the Mozilla Public - * 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/. */ - -var _require = __webpack_require__(975), - sprintf = _require.sprintf; - -var _require2 = __webpack_require__(883), - parse = _require2.parse; - -var strings = {}; - -function setBundle(bundle) { - bundle = parse(bundle); - strings = Object.assign(strings, bundle); -} - -function getStr(key) { - if (!strings[key]) { - throw new Error(`L10N key ${key} cannot be found.`); - } - return strings[key]; -} - -function getFormatStr(name) { - for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - args[_key - 1] = arguments[_key]; - } - - return sprintf.apply(undefined, [getStr(name)].concat(_toConsumableArray(args))); -} - -function numberWithDecimals(number) { - var decimals = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; - - // If this is an integer, don't do anything special. - if (number === (number | 0)) { - return number; - } - // If this isn't a number (and yes, `isNaN(null)` is false), return zero. - if (isNaN(number) || number === null) { - return "0"; - } - - var localized = number.toLocaleString(); - - // If no grouping or decimal separators are available, bail out, because - // padding with zeros at the end of the string won't make sense anymore. - if (!localized.match(/[^\d]/)) { - return localized; - } - - return number.toLocaleString(undefined, { - maximumFractionDigits: decimals, - minimumFractionDigits: decimals - }); -} - -module.exports = { - setBundle, - getStr, - getFormatStr, - numberWithDecimals -}; - -/***/ }), -/* 186 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -/* This Source Code Form is subject to the terms of the Mozilla Public - * 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/. */ - -var classnames = __webpack_require__(175); -__webpack_require__(1302); - -module.exports = function (className) { - var root = document.createElement("div"); - root.className = classnames(className); - root.style.setProperty("flex", 1); - return root; -}; - -/***/ }), +/* 181 */, +/* 182 */, +/* 183 */, +/* 184 */, +/* 185 */, +/* 186 */, /* 187 */ /***/ (function(module, exports, __webpack_require__) { @@ -13241,412 +10052,14 @@ module.exports = ReactPropTypesSecret; /***/ }), -/* 188 */ -/***/ (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.default = remapLocations; - -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 remapLocations(breakpoints, sourceId, sourceMaps) { - var sourceBreakpoints = breakpoints.map((() => { - var _ref = _asyncToGenerator(function* (breakpoint) { - if (breakpoint.location.sourceId !== sourceId) { - return breakpoint; - } - var location = yield sourceMaps.getOriginalLocation(breakpoint.location); - return _extends({}, breakpoint, { location }); - }); - - return function (_x) { - return _ref.apply(this, arguments); - }; - })()); - - return Promise.all(sourceBreakpoints.valueSeq()); -} - -/***/ }), -/* 189 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _redux = __webpack_require__(3); - -var _waitService = __webpack_require__(190); - -var _log = __webpack_require__(191); - -var _history = __webpack_require__(192); - -var _promise = __webpack_require__(193); - -var _thunk = __webpack_require__(224); - -var _timing = __webpack_require__(992); - -/** - * This creates a dispatcher with all the standard middleware in place - * that all code requires. It can also be optionally configured in - * various ways, such as logging and recording. - * - * @param {object} opts: - * - log: log all dispatched actions to console - * - history: an array to store every action in. Should only be - * used in tests. - * - middleware: array of middleware to be included in the redux store - * @memberof utils/create-store - * @static - */ - - -/** - * @memberof utils/create-store - * @static - */ -var configureStore = function () { - var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - - var middleware = [(0, _thunk.thunk)(opts.makeThunkArgs), _promise.promise, - - // Order is important: services must go last as they always - // operate on "already transformed" actions. Actions going through - // them shouldn't have any special fields like promises, they - // should just be normal JSON objects. - _waitService.waitUntilService]; - - if (opts.history) { - middleware.push((0, _history.history)(opts.history)); - } - - if (opts.middleware) { - opts.middleware.forEach(fn => middleware.push(fn)); - } - - if (opts.log) { - middleware.push(_log.log); - } - - if (opts.timing) { - middleware.push(_timing.timing); - } - - // Hook in the redux devtools browser extension if it exists - var devtoolsExt = typeof window === "object" && window.devToolsExtension ? window.devToolsExtension() : f => f; - - return _redux.applyMiddleware.apply(undefined, middleware)(devtoolsExt(_redux.createStore)); -}; - -/* This Source Code Form is subject to the terms of the Mozilla Public - * 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/. */ -/* global window */ - -/** - * Redux store utils - * @module utils/create-store - */ - -exports.default = configureStore; - -/***/ }), -/* 190 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.waitUntilService = waitUntilService; - - -/** - * A middleware which acts like a service, because it is stateful - * and "long-running" in the background. It provides the ability - * for actions to install a function to be run once when a specific - * condition is met by an action coming through the system. Think of - * it as a thunk that blocks until the condition is met. Example: - * - * ```js - * const services = { WAIT_UNTIL: require('wait-service').NAME }; - * - * { type: services.WAIT_UNTIL, - * predicate: action => action.type === "ADD_ITEM", - * run: (dispatch, getState, action) => { - * // Do anything here. You only need to accept the arguments - * // if you need them. `action` is the action that satisfied - * // the predicate. - * } - * } - * ``` - */ -var NAME = exports.NAME = "@@service/waitUntil"; - -function waitUntilService(_ref) { - var dispatch = _ref.dispatch, - getState = _ref.getState; - - var pending = []; - - function checkPending(action) { - var readyRequests = []; - var stillPending = []; - - // Find the pending requests whose predicates are satisfied with - // this action. Wait to run the requests until after we update the - // pending queue because the request handler may synchronously - // dispatch again and run this service (that use case is - // completely valid). - for (var request of pending) { - if (request.predicate(action)) { - readyRequests.push(request); - } else { - stillPending.push(request); - } - } - - pending = stillPending; - for (var _request of readyRequests) { - _request.run(dispatch, getState, action); - } - } - - return next => action => { - if (action.type === NAME) { - pending.push(action); - return null; - } - var result = next(action); - checkPending(action); - return result; - }; -} - -/***/ }), -/* 191 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.log = log; -/** - * A middleware that logs all actions coming through the system - * to the console. - */ -function log(_ref) { - var dispatch = _ref.dispatch, - getState = _ref.getState; - - return next => action => { - var status = action.status == "done" ? "<-" : "->"; - var asyncMsg = !action.status ? "" : status; - console.log(action, asyncMsg); - next(action); - }; -} - -/***/ }), -/* 192 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.history = undefined; - -var _devtoolsConfig = __webpack_require__(828); - -/** - * A middleware that stores every action coming through the store in the passed - * in logging object. Should only be used for tests, as it collects all - * action information, which will cause memory bloat. - */ -var history = exports.history = function () { - var log = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; - return (_ref) => { - var dispatch = _ref.dispatch, - getState = _ref.getState; - - return next => action => { - if ((0, _devtoolsConfig.isDevelopment)()) { - log.push(action); - } - - return next(action); - }; - }; -}; - -/***/ }), -/* 193 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.promise = exports.PROMISE = undefined; - -var _lodash = __webpack_require__(2); - -var _DevToolsUtils = __webpack_require__(222); - -/* This Source Code Form is subject to the terms of the Mozilla Public - * 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/. */ - -var seqIdVal = 1; - -function seqIdGen() { - return seqIdVal++; -} - -function filterAction(action) { - return (0, _lodash.fromPairs)((0, _lodash.toPairs)(action).filter(pair => pair[0] !== PROMISE)); -} - -function promiseMiddleware(_ref) { - var dispatch = _ref.dispatch, - getState = _ref.getState; - - return next => action => { - if (!(PROMISE in action)) { - return next(action); - } - - var promiseInst = action[PROMISE]; - var seqId = seqIdGen().toString(); - - // Create a new action that doesn't have the promise field and has - // the `seqId` field that represents the sequence id - action = Object.assign(filterAction(action), { seqId }); - - dispatch(Object.assign({}, action, { status: "start" })); - - // Return the promise so action creators can still compose if they - // want to. - return new Promise((resolve, reject) => { - promiseInst.then(value => { - (0, _DevToolsUtils.executeSoon)(() => { - dispatch(Object.assign({}, action, { - status: "done", - value: value - })); - resolve(value); - }); - }, error => { - (0, _DevToolsUtils.executeSoon)(() => { - dispatch(Object.assign({}, action, { - status: "error", - error: error.message || error - })); - reject(error); - }); - }); - }); - }; -} - -var PROMISE = exports.PROMISE = "@@dispatch/promise"; -exports.promise = promiseMiddleware; - -/***/ }), +/* 188 */, +/* 189 */, +/* 190 */, +/* 191 */, +/* 192 */, +/* 193 */, /* 194 */, -/* 195 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.createPrettySource = createPrettySource; - -var _selectors = __webpack_require__(242); - -var _prettyPrint = __webpack_require__(1213); - -var _pause = __webpack_require__(255); - -var _source = __webpack_require__(233); - -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 createPrettySource(sourceId) { - return (() => { - var _ref = _asyncToGenerator(function* (_ref2) { - var dispatch = _ref2.dispatch, - getState = _ref2.getState, - sourceMaps = _ref2.sourceMaps; - - var source = (0, _selectors.getSource)(getState(), sourceId).toJS(); - var url = (0, _source.getPrettySourceURL)(source.url); - var id = yield sourceMaps.generatedToOriginalId(sourceId, url); - - var _ref3 = yield (0, _prettyPrint.prettyPrint)({ - source, - url - }), - code = _ref3.code, - mappings = _ref3.mappings; - - yield sourceMaps.applySourceMap(source.id, url, code, mappings); - - var frames = (0, _selectors.getFrames)(getState()); - if (frames) { - frames = yield (0, _pause.updateFrameLocations)(frames, sourceMaps); - } - - var prettySource = { - url, - id, - isPrettyPrinted: true, - text: code, - contentType: "text/javascript", - frames, - loadedState: "loaded" - }; - - return dispatch({ - type: "ADD_SOURCE", - source: prettySource - }); - }); - - return function (_x) { - return _ref.apply(this, arguments); - }; - })(); -} - -/***/ }), +/* 195 */, /* 196 */, /* 197 */ /***/ (function(module, exports) { @@ -13782,89 +10195,9 @@ module.exports = isLength; /* 219 */, /* 220 */, /* 221 */, -/* 222 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.reportException = reportException; -exports.executeSoon = executeSoon; - -var _assert = __webpack_require__(223); - -var _assert2 = _interopRequireDefault(_assert); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function reportException(who, exception) { - var msg = `${who} threw an exception: `; - console.error(msg, exception); -} - -function executeSoon(fn) { - setTimeout(fn, 0); -} - -exports.default = _assert2.default; - -/***/ }), -/* 223 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = assert; - -var _devtoolsConfig = __webpack_require__(828); - -function assert(condition, message) { - if ((0, _devtoolsConfig.isDevelopment)() && !condition) { - throw new Error(`Assertion failure: ${message}`); - } -} - -/***/ }), -/* 224 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.thunk = thunk; - - -/** - * A middleware that allows thunks (functions) to be dispatched. If - * it's a thunk, it is called with an argument that contains - * `dispatch`, `getState`, and any additional args passed in via the - * middleware constructure. This allows the action to create multiple - * actions (most likely asynchronously). - */ -function thunk(makeArgs) { - return (_ref) => { - var dispatch = _ref.dispatch, - getState = _ref.getState; - - var args = { dispatch, getState }; - - return next => action => { - return typeof action === "function" ? action(makeArgs ? makeArgs(args, getState()) : args) : next(action); - }; - }; -} - -/***/ }), +/* 222 */, +/* 223 */, +/* 224 */, /* 225 */, /* 226 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { @@ -13873,8 +10206,8 @@ function thunk(makeArgs) { Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); // @flow -const { isDevelopment } = __webpack_require__(828); -const { Services, PrefsHelper } = __webpack_require__(830); +const { isDevelopment } = __webpack_require__(1355); +const { Services, PrefsHelper } = __webpack_require__(1376); const prefsSchemaVersion = "1.0.3"; @@ -13895,11 +10228,14 @@ if (isDevelopment()) { pref("devtools.debugger.file-search-case-sensitive", false); pref("devtools.debugger.file-search-whole-word", false); pref("devtools.debugger.file-search-regex-match", false); + pref("devtools.debugger.project-directory-root", ""); pref("devtools.debugger.prefs-schema-version", "1.0.1"); pref("devtools.debugger.features.project-text-search", true); pref("devtools.debugger.features.async-stepping", true); pref("devtools.debugger.features.wasm", true); pref("devtools.debugger.features.shortcuts", true); + pref("devtools.debugger.features.root", true); + pref("devtools.debugger.features.column-breakpoints", true); } const prefs = new PrefsHelper("devtools", { @@ -13917,7 +10253,8 @@ const prefs = new PrefsHelper("devtools", { fileSearchCaseSensitive: ["Bool", "debugger.file-search-case-sensitive"], fileSearchWholeWord: ["Bool", "debugger.file-search-whole-word"], fileSearchRegexMatch: ["Bool", "debugger.file-search-regex-match"], - debuggerPrefsSchemaVersion: ["Char", "debugger.prefs-schema-version"] + debuggerPrefsSchemaVersion: ["Char", "debugger.prefs-schema-version"], + projectDirectoryRoot: ["Char", "project-directory-root", ""] }); /* harmony export (immutable) */ __webpack_exports__["prefs"] = prefs; @@ -13926,7 +10263,9 @@ const features = new PrefsHelper("devtools.debugger.features", { asyncStepping: ["Bool", "async-stepping", false], projectTextSearch: ["Bool", "project-text-search", true], wasm: ["Bool", "wasm", true], - shortcuts: ["Bool", "shortcuts", false] + shortcuts: ["Bool", "shortcuts", true], + root: ["Bool", "root", false], + columnBreakpoints: ["Bool", "column-breakpoints", false] }); /* harmony export (immutable) */ __webpack_exports__["features"] = features; @@ -13939,3048 +10278,25 @@ if (prefs.debuggerPrefsSchemaVersion !== prefsSchemaVersion) { /***/ }), -/* 227 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _expressions = __webpack_require__(228); - -var _expressions2 = _interopRequireDefault(_expressions); - -var _eventListeners = __webpack_require__(231); - -var _eventListeners2 = _interopRequireDefault(_eventListeners); - -var _sources = __webpack_require__(232); - -var _sources2 = _interopRequireDefault(_sources); - -var _breakpoints = __webpack_require__(236); - -var _breakpoints2 = _interopRequireDefault(_breakpoints); - -var _pendingBreakpoints = __webpack_require__(1133); - -var _pendingBreakpoints2 = _interopRequireDefault(_pendingBreakpoints); - -var _asyncRequests = __webpack_require__(238); - -var _asyncRequests2 = _interopRequireDefault(_asyncRequests); - -var _pause = __webpack_require__(239); - -var _pause2 = _interopRequireDefault(_pause); - -var _ui = __webpack_require__(240); - -var _ui2 = _interopRequireDefault(_ui); - -var _ast = __webpack_require__(1058); - -var _ast2 = _interopRequireDefault(_ast); - -var _coverage = __webpack_require__(241); - -var _coverage2 = _interopRequireDefault(_coverage); - -var _projectTextSearch = __webpack_require__(31); - -var _projectTextSearch2 = _interopRequireDefault(_projectTextSearch); - -var _sourceSearch = __webpack_require__(1132); - -var _sourceSearch2 = _interopRequireDefault(_sourceSearch); - -var _sourceTree = __webpack_require__(1176); - -var _sourceTree2 = _interopRequireDefault(_sourceTree); - -var _debuggee = __webpack_require__(1175); - -var _debuggee2 = _interopRequireDefault(_debuggee); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/* This Source Code Form is subject to the terms of the Mozilla Public - * 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/. */ - -exports.default = { - expressions: _expressions2.default, - eventListeners: _eventListeners2.default, - sources: _sources2.default, - breakpoints: _breakpoints2.default, - pendingBreakpoints: _pendingBreakpoints2.default, - asyncRequests: _asyncRequests2.default, - pause: _pause2.default, - ui: _ui2.default, - ast: _ast2.default, - coverage: _coverage2.default, - projectTextSearch: _projectTextSearch2.default, - sourceSearch: _sourceSearch2.default, - sourceTree: _sourceTree2.default, - debuggee: _debuggee2.default -}; - -/***/ }), -/* 228 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.getExpressions = exports.State = undefined; -exports.getExpression = getExpression; - -var _makeRecord = __webpack_require__(230); - -var _makeRecord2 = _interopRequireDefault(_makeRecord); - -var _immutable = __webpack_require__(146); - -var _lodash = __webpack_require__(2); - -var _reselect = __webpack_require__(993); - -var _prefs = __webpack_require__(226); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var State = exports.State = (0, _makeRecord2.default)({ - expressions: (0, _immutable.List)(restoreExpressions()) -}); - -function update() { - var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : State(); - var action = arguments[1]; - - switch (action.type) { - case "ADD_EXPRESSION": - return appendToList(state, ["expressions"], { - input: action.input, - value: null, - updating: true - }); - case "UPDATE_EXPRESSION": - var key = action.expression.input; - return updateItemInList(state, ["expressions"], key, { - input: action.input, - value: null, - updating: true - }); - case "EVALUATE_EXPRESSION": - return updateItemInList(state, ["expressions"], action.input, { - input: action.input, - value: action.value, - updating: false - }); - case "DELETE_EXPRESSION": - return deleteExpression(state, action.input); - } - - return state; -} - -function restoreExpressions() { - var exprs = _prefs.prefs.expressions; - if (exprs.length == 0) { - return; - } - return exprs; -} - -function storeExpressions(state) { - var expressions = state.getIn(["expressions"]).map(expression => (0, _lodash.omit)(expression, "value")).toJS(); - - _prefs.prefs.expressions = expressions; -} - -function appendToList(state, path, value) { - var newState = state.updateIn(path, () => { - return state.getIn(path).push(value); - }); - storeExpressions(newState); - return newState; -} - -function updateItemInList(state, path, key, value) { - var newState = state.updateIn(path, () => { - var list = state.getIn(path); - var index = list.findIndex(e => e.input == key); - return list.update(index, () => value); - }); - storeExpressions(newState); - return newState; -} - -function deleteExpression(state, input) { - var index = getExpressions({ expressions: state }).findKey(e => e.input == input); - var newState = state.deleteIn(["expressions", index]); - storeExpressions(newState); - return newState; -} - -var getExpressionsWrapper = state => state.expressions; - -var getExpressions = exports.getExpressions = (0, _reselect.createSelector)(getExpressionsWrapper, expressions => expressions.get("expressions")); - -function getExpression(state, input) { - return getExpressions(state).find(exp => exp.input == input); -} - -exports.default = update; - -/***/ }), +/* 227 */, +/* 228 */, /* 229 */, -/* 230 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _immutable = __webpack_require__(146); - -var I = _interopRequireWildcard(_immutable); - -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; } } - -/** - * Make an immutable record type - * - * @param spec - the keys and their default values - * @return a state record factory function - * @memberof utils/makeRecord - * @static - */ - - -/** - * @memberof utils/makeRecord - * @static - */ -function makeRecord(spec) { - return I.Record(spec); -} - -/** - * When Flow 0.29 is released (very soon), we can use this Record type - * instead of the builtin immutable.js Record type. This is better - * because all the fields are actually typed, unlike the builtin one. - * This depends on a performance fix that will go out in 0.29 though; - * @module utils/makeRecord - */ - -exports.default = makeRecord; - -/***/ }), -/* 231 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.getEventListeners = getEventListeners; -/* This Source Code Form is subject to the terms of the Mozilla Public - * 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/. */ - -var initialState = { - activeEventNames: [], - listeners: [], - fetchingListeners: false -}; - -function update() { - var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState; - var action = arguments[1]; - var emit = arguments[2]; - - switch (action.type) { - case "UPDATE_EVENT_BREAKPOINTS": - state.activeEventNames = action.eventNames; - // emit("activeEventNames", state.activeEventNames); - break; - case "FETCH_EVENT_LISTENERS": - if (action.status === "begin") { - state.fetchingListeners = true; - } else if (action.status === "done") { - state.fetchingListeners = false; - state.listeners = action.listeners; - } - break; - case "NAVIGATE": - return initialState; - } - - return state; -} - -function getEventListeners(state) { - return state.eventListeners.listeners; -} - -exports.default = update; - -/***/ }), -/* 232 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.getSelectedSourceText = exports.getSelectedSource = exports.getSelectedLocation = exports.getSourcesForTabs = exports.getSearchTabs = exports.getSourceTabs = exports.getSources = undefined; -exports.initialState = initialState; -exports.removeSourceFromTabList = removeSourceFromTabList; -exports.removeSourcesFromTabList = removeSourcesFromTabList; -exports.getNewSelectedSourceId = getNewSelectedSourceId; -exports.getSource = getSource; -exports.getSourceByURL = getSourceByURL; -exports.getPendingSelectedLocation = getPendingSelectedLocation; -exports.getPrettySource = getPrettySource; -exports.getSourceInSources = getSourceInSources; - -var _immutable = __webpack_require__(146); - -var I = _interopRequireWildcard(_immutable); - -var _reselect = __webpack_require__(993); - -var _makeRecord = __webpack_require__(230); - -var _makeRecord2 = _interopRequireDefault(_makeRecord); - -var _source2 = __webpack_require__(233); - -var _prefs = __webpack_require__(226); - -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 initialState() { - return (0, _makeRecord2.default)({ - sources: I.Map(), - selectedLocation: undefined, - pendingSelectedLocation: _prefs.prefs.pendingSelectedLocation, - sourcesText: I.Map(), - tabs: I.List(restoreTabs()) - })(); -} -/* This Source Code Form is subject to the terms of the Mozilla Public - * 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/. */ - -/** - * Sources reducer - * @module reducers/sources - */ - -function update() { - var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState(); - var action = arguments[1]; - - var location = null; - - switch (action.type) { - case "ADD_SOURCE": - { - var _source = action.source; - return updateSource(state, _source); - } - - case "ADD_SOURCES": - { - action.sources.forEach(source => { - state = state.mergeIn(["sources", source.id], source); - }); - - return state; - } - - case "SELECT_SOURCE": - if (action.status != "start") { - return state; - } - - location = { - line: action.line, - url: action.source.url - }; - - _prefs.prefs.pendingSelectedLocation = location; - return state.set("selectedLocation", { - sourceId: action.source.id, - line: action.line - }).set("pendingSelectedLocation", location); - - case "CLEAR_SELECTED_SOURCE": - location = { url: "" }; - _prefs.prefs.pendingSelectedLocation = location; - - return state.set("selectedLocation", { sourceId: "" }).set("pendingSelectedLocation", location); - - case "SELECT_SOURCE_URL": - location = { - url: action.url, - line: action.line - }; - - _prefs.prefs.pendingSelectedLocation = location; - return state.set("pendingSelectedLocation", location); - - case "ADD_TAB": - return state.merge({ - tabs: updateTabList({ sources: state }, action.source.url) - }); - - case "MOVE_TAB": - return state.merge({ - tabs: updateTabList({ sources: state }, action.url, action.tabIndex) - }); - - case "CLOSE_TAB": - _prefs.prefs.tabs = action.tabs; - return state.merge({ tabs: action.tabs }); - - case "CLOSE_TABS": - _prefs.prefs.tabs = action.tabs; - return state.merge({ tabs: action.tabs }); - - case "LOAD_SOURCE_TEXT": - return setSourceTextProps(state, action); - - case "BLACKBOX": - if (action.status === "done") { - return state.setIn(["sources", action.source.id, "isBlackBoxed"], action.value.isBlackBoxed); - } - break; - - case "TOGGLE_PRETTY_PRINT": - return setSourceTextProps(state, action); - - case "NAVIGATE": - var source = getSelectedSource({ sources: state }); - var url = source && source.get("url"); - - if (!url) { - return initialState(); - } - - return initialState().set("pendingSelectedLocation", { url }); - } - - return state; -} - -function getTextPropsFromAction(action) { - var source = action.source; - var value = action.value; - - - if (action.status === "start") { - return { id: source.id, loadedState: "loading" }; - } else if (action.status === "error") { - return { id: source.id, error: action.error, loadedState: "loaded" }; - } - return { - text: value.text, - id: source.id, - contentType: value.contentType, - loadedState: "loaded" - }; -} - -// TODO: Action is coerced to `any` unfortunately because how we type -// asynchronous actions is wrong. The `value` may be null for the -// "start" and "error" states but we don't type it like that. We need -// to rethink how we type async actions. -function setSourceTextProps(state, action) { - var text = getTextPropsFromAction(action); - return updateSource(state, text); -} - -function updateSource(state, source) { - if (!source.id) { - return state; - } - - return state.mergeIn(["sources", source.id], source); -} - -function removeSourceFromTabList(tabs, url) { - return tabs.filter(tab => tab != url); -} - -function removeSourcesFromTabList(tabs, urls) { - return urls.reduce((t, url) => removeSourceFromTabList(t, url), tabs); -} - -function restoreTabs() { - var prefsTabs = _prefs.prefs.tabs || []; - if (prefsTabs.length == 0) { - return; - } - - return prefsTabs; -} - -/** - * Adds the new source to the tab list if it is not already there - * @memberof reducers/sources - * @static - */ -function updateTabList(state, url, tabIndex) { - var tabs = state.sources.get("tabs"); - - var urlIndex = tabs.indexOf(url); - var includesUrl = !!tabs.find(tab => tab == url); - - if (includesUrl) { - if (tabIndex != undefined) { - tabs = tabs.delete(urlIndex).insert(tabIndex, url); - } - } else { - tabs = tabs.insert(0, url); - } - - _prefs.prefs.tabs = tabs.toJS(); - return tabs; -} - -/** - * Gets the next tab to select when a tab closes. Heuristics: - * 1. if the selected tab is available, it remains selected - * 2. if it is gone, the next available tab to the left should be active - * 3. if the first tab is active and closed, select the second tab - * - * @memberof reducers/sources - * @static - */ -function getNewSelectedSourceId(state, availableTabs) { - var selectedLocation = state.sources.selectedLocation; - if (!selectedLocation) { - return ""; - } - - var selectedTab = state.sources.sources.get(selectedLocation.sourceId); - - var selectedTabUrl = selectedTab ? selectedTab.get("url") : ""; - - if (availableTabs.includes(selectedTabUrl)) { - var _sources = state.sources.sources; - if (!_sources) { - return ""; - } - - var selectedSource = _sources.find(source => source.get("url") == selectedTabUrl); - - if (selectedSource) { - return selectedSource.get("id"); - } - - return ""; - } - - var tabUrls = state.sources.tabs.toJS(); - var leftNeighborIndex = Math.max(tabUrls.indexOf(selectedTabUrl) - 1, 0); - var lastAvailbleTabIndex = availableTabs.size - 1; - var newSelectedTabIndex = Math.min(leftNeighborIndex, lastAvailbleTabIndex); - var availableTab = availableTabs.toJS()[newSelectedTabIndex]; - var tabSource = getSourceByUrlInSources(state.sources.sources, availableTab); - - if (tabSource) { - return tabSource.get("id"); - } - - return ""; -} - -// Selectors - -// Unfortunately, it's really hard to make these functions accept just -// the state that we care about and still type it with Flow. The -// problem is that we want to re-export all selectors from a single -// module for the UI, and all of those selectors should take the -// top-level app state, so we'd have to "wrap" them to automatically -// pick off the piece of state we're interested in. It's impossible -// (right now) to type those wrapped functions. - - -var getSourcesState = state => state.sources; - -function getSource(state, id) { - return getSourceInSources(getSources(state), id); -} - -function getSourceByURL(state, url) { - return getSourceByUrlInSources(state.sources.sources, url); -} - -function getPendingSelectedLocation(state) { - return state.sources.pendingSelectedLocation; -} - -function getPrettySource(state, id) { - var source = getSource(state, id); - if (!source) { - return; - } - - return getSourceByURL(state, (0, _source2.getPrettySourceURL)(source.get("url"))); -} - -function getSourceByUrlInSources(sources, url) { - if (!url) { - return null; - } - - return sources.find(source => source.get("url") === url); -} - -function getSourceInSources(sources, id) { - return sources.get(id); -} - -var getSources = exports.getSources = (0, _reselect.createSelector)(getSourcesState, sources => sources.sources); - -var getTabs = (0, _reselect.createSelector)(getSourcesState, sources => sources.tabs); - -var getSourceTabs = exports.getSourceTabs = (0, _reselect.createSelector)(getTabs, getSources, (tabs, sources) => tabs.filter(tab => getSourceByUrlInSources(sources, tab))); - -var getSearchTabs = exports.getSearchTabs = (0, _reselect.createSelector)(getTabs, getSources, (tabs, sources) => tabs.filter(tab => !getSourceByUrlInSources(sources, tab))); - -var getSourcesForTabs = exports.getSourcesForTabs = (0, _reselect.createSelector)(getSourceTabs, getSources, (tabs, sources) => { - return tabs.map(tab => getSourceByUrlInSources(sources, tab)).filter(source => source); -}); - -var getSelectedLocation = exports.getSelectedLocation = (0, _reselect.createSelector)(getSourcesState, sources => sources.selectedLocation); - -var getSelectedSource = exports.getSelectedSource = (0, _reselect.createSelector)(getSelectedLocation, getSources, (selectedLocation, sources) => { - if (!selectedLocation) { - return; - } - - return sources.get(selectedLocation.sourceId); -}); - -var getSelectedSourceText = exports.getSelectedSourceText = (0, _reselect.createSelector)(getSelectedSource, getSourcesState, (selectedSource, sources) => { - var id = selectedSource.get("id"); - return id ? sources.sourcesText.get(id) : null; -}); - -exports.default = update; - -/***/ }), -/* 233 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -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; - -var _devtoolsSourceMap = __webpack_require__(898); - -var _utils = __webpack_require__(234); - -var _path = __webpack_require__(235); - -var _url = __webpack_require__(334); - -/** - * Trims the query part or reference identifier of a url string, if necessary. - * - * @memberof utils/source - * @static - */ - - -/** - * Utils for working with Source URLs - * @module utils/source - */ - -function trimUrlQuery(url) { - var length = url.length; - var q1 = url.indexOf("?"); - var q2 = url.indexOf("&"); - var q3 = url.indexOf("#"); - var q = Math.min(q1 != -1 ? q1 : length, q2 != -1 ? q2 : length, q3 != -1 ? q3 : length); - - return url.slice(0, q); -} - -function shouldPrettyPrint(source) { - if (!source) { - return false; - } - - var _isPretty = isPretty(source); - var _isJavaScript = isJavaScript(source); - var isOriginal = (0, _devtoolsSourceMap.isOriginalId)(source.id); - var hasSourceMap = source.sourceMapURL; - - if (_isPretty || isOriginal || hasSourceMap || !_isJavaScript) { - return false; - } - - return true; -} - -/** - * Returns true if the specified url and/or content type are specific to - * javascript files. - * - * @return boolean - * True if the source is likely javascript. - * - * @memberof utils/source - * @static - */ -function isJavaScript(source) { - return source.url && /\.(jsm|js)?$/.test(trimUrlQuery(source.url)) || !!(source.contentType && source.contentType.includes("javascript")); -} - -/** - * @memberof utils/source - * @static - */ -function isPretty(source) { - return source.url ? /formatted$/.test(source.url) : false; -} - -function isThirdParty(source) { - if (!source || !source.url) { - return false; - } - - return !!source.url.match(/(node_modules|bower_components)/); -} - -/** - * @memberof utils/source - * @static - */ -function getPrettySourceURL(url) { - if (!url) { - url = ""; - } - return `${url}:formatted`; -} - -/** - * @memberof utils/source - * @static - */ -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}`; -} - -/** - * Show a source url's filename. - * If the source does not have a url, use the source id. - * - * @memberof utils/source - * @static - */ -function getFilename(source) { - var url = source.url, - id = source.id; - - if (!url) { - return getFormattedSourceId(id); - } - - 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 }, - "text/coffeescript": "coffeescript", - "text/typescript-jsx": { - name: "jsx", - base: { name: "javascript", typescript: true } - }, - "text/jsx": "jsx", - "text/x-elm": "elm", - "text/x-clojure": "clojure", - "text/wasm": { name: "text" }, - "text/html": { name: "htmlmixed" } -}; - -function getSourcePath(source) { - if (!source.url) { - return ""; - } - - var _parseURL = (0, _url.parse)(source.url), - path = _parseURL.path, - href = _parseURL.href; - // for URLs like "about:home" the path is null so we pass the full href - - - return path || href; -} - -/** - * Returns amount of lines in the source. If source is a WebAssembly binary, - * the function returns amount of bytes. - */ -function getSourceLineCount(source) { - if (source.isWasm) { - var _ref = source.text, - binary = _ref.binary; - - return binary.length; - } - return source.text != undefined ? source.text.split("\n").length : 0; -} - -/** - * - * Returns Code Mirror mode for source content type - * @param contentType - * @return String - * @memberof utils/source - * @static - */ - -function getMode(source) { - var contentType = source.contentType, - text = source.text, - isWasm = source.isWasm, - url = source.url; - - - if (!text || isWasm) { - return { name: "text" }; - } - - // if the url ends with .marko we set the name to Javascript so - // syntax highlighting works for marko too - if (url && url.match(/\.marko$/i)) { - return { name: "javascript" }; - } - - // Use HTML mode for files in which the first non whitespace - // character is `<` regardless of extension. - var isHTMLLike = text.match(/^\s* 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) { - args[_key - 2] = arguments[_key]; - } - - return new Promise((resolve, reject) => { - args.push(response => { - if (response.error) { - reject(response); - } else { - resolve(response); - } - }); - method.apply(context, args); - }); -} - -/** - * @memberof utils/utils - * @static - */ -function endTruncateStr(str, size) { - if (str.length > size) { - return `...${str.slice(str.length - size)}`; - } - return str; -} - -/** - * @memberof utils/utils - * @static - */ -/** - * @memberof utils/utils - * @static - */ -function throttle(func, ms) { - var timeout = void 0, - _this = void 0; - return function () { - for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { - args[_key2] = arguments[_key2]; - } - - _this = this; - if (!timeout) { - timeout = setTimeout(() => { - func.apply.apply(func, [_this].concat(_toConsumableArray(args))); - timeout = null; - }, ms); - } - }; -} - -function waitForMs(ms) { - return new Promise(resolve => setTimeout(resolve, ms)); -} - -exports.handleError = handleError; -exports.promisify = promisify; -exports.endTruncateStr = endTruncateStr; -exports.throttle = throttle; -exports.waitForMs = waitForMs; - -/***/ }), -/* 235 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -function basename(path) { - return path.split("/").pop(); -} - -function dirname(path) { - var idx = path.lastIndexOf("/"); - return path.slice(0, idx); -} - -function isURL(str) { - return str.indexOf("://") !== -1; -} - -function isAbsolute(str) { - return str[0] === "/"; -} - -function join(base, dir) { - return `${base}/${dir}`; -} - -exports.basename = basename; -exports.dirname = dirname; -exports.isURL = isURL; -exports.isAbsolute = isAbsolute; -exports.join = join; - -/***/ }), -/* 236 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.getHiddenBreakpointLocation = exports.getHiddenBreakpoint = undefined; - -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; }; -/* This Source Code Form is subject to the terms of the Mozilla Public - * 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/. */ - -/** - * Breakpoints reducer - * @module reducers/breakpoints - */ - -exports.initialState = initialState; -exports.getBreakpoints = getBreakpoints; -exports.getBreakpoint = getBreakpoint; -exports.getBreakpointsDisabled = getBreakpointsDisabled; -exports.getBreakpointsLoading = getBreakpointsLoading; -exports.getBreakpointsForSource = getBreakpointsForSource; -exports.getBreakpointForLine = getBreakpointForLine; - -var _immutable = __webpack_require__(146); - -var I = _interopRequireWildcard(_immutable); - -var _makeRecord = __webpack_require__(230); - -var _makeRecord2 = _interopRequireDefault(_makeRecord); - -var _devtoolsSourceMap = __webpack_require__(898); - -var _breakpoint = __webpack_require__(1057); - -var _reselect = __webpack_require__(993); - -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 initialState() { - return (0, _makeRecord2.default)({ - breakpoints: I.Map(), - breakpointsDisabled: false - })(); -} - -function update() { - var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState(); - var action = arguments[1]; - - switch (action.type) { - case "ADD_BREAKPOINT": - { - return addBreakpoint(state, action); - } - - case "SYNC_BREAKPOINT": - { - return syncBreakpoint(state, action); - } - - case "ENABLE_BREAKPOINT": - { - return addBreakpoint(state, action); - } - - case "DISABLE_BREAKPOINT": - { - return updateBreakpoint(state, action); - } - - case "SET_BREAKPOINT_CONDITION": - { - return updateBreakpoint(state, action); - } - - case "REMOVE_BREAKPOINT": - { - return removeBreakpoint(state, action); - } - - case "REMAP_BREAKPOINTS": - { - return remapBreakpoints(state, action); - } - } - - return state; -} - -function addBreakpoint(state, action) { - if (action.status === "start" && action.breakpoint) { - var breakpoint = action.breakpoint; - - var locationId = (0, _breakpoint.makeLocationId)(breakpoint.location); - return state.setIn(["breakpoints", locationId], breakpoint); - } - - // when the action completes, we can commit the breakpoint - if (action.status === "done") { - return syncBreakpoint(state, action.value); - } - - // Remove the optimistic update - if (action.status === "error" && action.breakpoint) { - var _locationId = (0, _breakpoint.makeLocationId)(action.breakpoint.location); - return state.deleteIn(["breakpoints", _locationId]); - } - - return state; -} - -function syncBreakpoint(state, data) { - var breakpoint = data.breakpoint, - previousLocation = data.previousLocation; - - var locationId = (0, _breakpoint.makeLocationId)(breakpoint.location); - - if (previousLocation) { - return state.deleteIn(["breakpoints", (0, _breakpoint.makeLocationId)(previousLocation)]).setIn(["breakpoints", locationId], breakpoint); - } - - return state.setIn(["breakpoints", locationId], breakpoint); -} - -function updateBreakpoint(state, action) { - var breakpoint = action.breakpoint; - - var locationId = (0, _breakpoint.makeLocationId)(breakpoint.location); - return state.setIn(["breakpoints", locationId], breakpoint); -} - -function remapBreakpoints(state, action) { - var breakpoints = action.breakpoints.reduce((updatedBreakpoints, breakpoint) => { - var locationId = (0, _breakpoint.makeLocationId)(breakpoint.location); - return _extends({}, updatedBreakpoints, { [locationId]: breakpoint }); - }, {}); - - return state.set("breakpoints", I.Map(breakpoints)); -} - -function removeBreakpoint(state, action) { - var breakpoint = action.breakpoint; - - var id = (0, _breakpoint.makeLocationId)(breakpoint.location); - return state.deleteIn(["breakpoints", id]); -} - -// Selectors -// TODO: these functions should be moved out of the reducer - -function getBreakpoints(state) { - return state.breakpoints.breakpoints; -} - -function getBreakpoint(state, location) { - var breakpoints = getBreakpoints(state); - return breakpoints.get((0, _breakpoint.makeLocationId)(location)); -} - -function getBreakpointsDisabled(state) { - return state.breakpoints.breakpoints.every(x => x.disabled); -} - -function getBreakpointsLoading(state) { - var breakpoints = getBreakpoints(state); - var isLoading = !!breakpoints.valueSeq().filter(bp => bp.loading).first(); - - return breakpoints.size > 0 && isLoading; -} - -function getBreakpointsForSource(state, sourceId) { - if (!sourceId) { - return I.Map(); - } - - var isGeneratedSource = (0, _devtoolsSourceMap.isGeneratedId)(sourceId); - var breakpoints = getBreakpoints(state); - - return breakpoints.filter(bp => { - var location = isGeneratedSource ? bp.generatedLocation || bp.location : bp.location; - return location.sourceId === sourceId; - }); -} - -function getBreakpointForLine(state, sourceId, line) { - if (!sourceId) { - return I.Map(); - } - var breakpoints = getBreakpointsForSource(state, sourceId); - return breakpoints.find(breakpoint => breakpoint.location.line === line); -} - -var getHiddenBreakpoint = exports.getHiddenBreakpoint = (0, _reselect.createSelector)(getBreakpoints, function (breakpoints) { - var hiddenBreakpoints = breakpoints.valueSeq().filter(breakpoint => breakpoint.hidden).first(); - return hiddenBreakpoints; -}); - -var getHiddenBreakpointLocation = exports.getHiddenBreakpointLocation = (0, _reselect.createSelector)(getHiddenBreakpoint, function (hiddenBreakpoint) { - if (!hiddenBreakpoint) { - return null; - } - return hiddenBreakpoint.location; -}); - -exports.default = update; - -/***/ }), -/* 237 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var _immutable = __webpack_require__(146); - -var I = _interopRequireWildcard(_immutable); - -var _lodash = __webpack_require__(2); - -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; } } - -// hasOwnProperty is defensive because it is possible that the -// object that we're creating a map for has a `hasOwnProperty` field - - -/** - * Immutable JS conversion utils - * @deprecated - * @module utils/fromJS - */ - -function hasOwnProperty(value, key) { - if (value.hasOwnProperty && (0, _lodash.isFunction)(value.hasOwnProperty)) { - return value.hasOwnProperty(key); - } - - if (value.prototype && value.prototype.hasOwnProperty) { - return value.prototype.hasOwnProperty(key); - } - - return false; -} - -/* - creates an immutable map, where each of the value's - items are transformed into their own map. - - NOTE: we guard against `length` being a property because - length confuses Immutable's internal algorithm. -*/ -function createMap(value) { - var hasLength = hasOwnProperty(value, "length"); - var length = value.length; - - if (hasLength) { - value.length = `${value.length}`; - } - - var map = I.Seq(value).map(fromJS).toMap(); - - if (hasLength) { - map = map.set("length", length); - value.length = length; - } - - return map; -} - -function createList(value) { - return I.Seq(value).map(fromJS).toList(); -} - -/** - * When our app state is fully typed, we should be able to get rid of - * this function. This is only temporarily necessary to support - * converting typed objects to immutable.js, which usually happens in - * reducers. - * - * @memberof utils/fromJS - * @static - */ -function fromJS(value) { - if (Array.isArray(value)) { - return createList(value); - } - if (value && value.constructor && value.constructor.meta) { - // This adds support for tcomb objects which are native JS objects - // but are not "plain", so the above checks fail. Since they - // behave the same we can use the same constructors, but we need - // special checks for them. - var kind = value.constructor.meta.kind; - if (kind === "struct") { - return createMap(value); - } else if (kind === "list") { - return createList(value); - } - } - - // If it's a primitive type, just return the value. Note `==` check - // for null, which is intentionally used to match either `null` or - // `undefined`. - if (value == null || typeof value !== "object") { - return value; - } - - // Otherwise, treat it like an object. We can't reliably detect if - // it's a plain object because we might be objects from other JS - // contexts so `Object !== Object`. - - return createMap(value); -} - -module.exports = fromJS; - -/***/ }), -/* 238 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -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); } } - -/* This Source Code Form is subject to the terms of the Mozilla Public - * 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/. */ - -var initialState = []; - -function update() { - var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState; - var action = arguments[1]; - var seqId = action.seqId; - - - if (action.type === "NAVIGATE") { - return initialState; - } else if (seqId) { - var newState = void 0; - if (action.status === "start") { - newState = [].concat(_toConsumableArray(state), [seqId]); - } else if (action.status === "error" || action.status === "done") { - newState = state.filter(id => id !== seqId); - } - - return newState; - } - - return state; -} - -exports.default = update; - -/***/ }), -/* 239 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.getSelectedFrame = exports.getSelectedFrameId = exports.getLoadedObjects = exports.getPause = exports.State = undefined; - -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; }; -/* This Source Code Form is subject to the terms of the Mozilla Public - * 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/. */ - -exports.isStepping = isStepping; -exports.isPaused = isPaused; -exports.isEvaluatingExpression = isEvaluatingExpression; -exports.pausedInEval = pausedInEval; -exports.getLoadedObject = getLoadedObject; -exports.getObjectProperties = getObjectProperties; -exports.getIsWaitingOnBreak = getIsWaitingOnBreak; -exports.getShouldPauseOnExceptions = getShouldPauseOnExceptions; -exports.getShouldIgnoreCaughtExceptions = getShouldIgnoreCaughtExceptions; -exports.getFrames = getFrames; -exports.getFrameScopes = getFrameScopes; -exports.getDebuggeeUrl = getDebuggeeUrl; -exports.getChromeScopes = getChromeScopes; - -var _reselect = __webpack_require__(993); - -var _prefs = __webpack_require__(226); - -var State = exports.State = () => ({ - pause: undefined, - isWaitingOnBreak: false, - frames: undefined, - selectedFrameId: undefined, - frameScopes: {}, - loadedObjects: {}, - shouldPauseOnExceptions: _prefs.prefs.pauseOnExceptions, - shouldIgnoreCaughtExceptions: _prefs.prefs.ignoreCaughtExceptions, - debuggeeUrl: "", - command: "" -}); - -function update() { - var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : State(); - var action = arguments[1]; - - switch (action.type) { - case "PAUSED": - { - var _selectedFrameId2 = action.selectedFrameId, - _frames = action.frames, - _scopes = action.scopes, - _loadedObjects = action.loadedObjects, - pauseInfo = action.pauseInfo; - - pauseInfo.isInterrupted = pauseInfo.why.type === "interrupted"; - - var _frameScopes = { [_selectedFrameId2]: _scopes }; - - // turn this into an object keyed by object id - var objectMap = {}; - _loadedObjects.forEach(obj => { - objectMap[obj.value.objectId] = obj; - }); - - return Object.assign({}, state, { - isWaitingOnBreak: false, - pause: pauseInfo, - selectedFrameId: _selectedFrameId2, - frames: _frames, - frameScopes: _frameScopes, - loadedObjects: objectMap - }); - } - - case "RESUME": - return Object.assign({}, state, { - pause: null, - frames: null, - selectedFrameId: null, - loadedObjects: {} - }); - - case "TOGGLE_PRETTY_PRINT": - if (action.status == "done") { - var _frames2 = action.value.frames; - var _pause = state.pause; - if (_pause) { - _pause.frame = _frames2[0]; - } - - return Object.assign({}, state, { pause: _pause, frames: _frames2 }); - } - - break; - case "BREAK_ON_NEXT": - return Object.assign({}, state, { isWaitingOnBreak: true }); - - case "SELECT_FRAME": - var frame = action.frame, - scopes = action.scopes; - - var _selectedFrameId = frame.id; - return _extends({}, state, { - frameScopes: _extends({}, state.frameScopes, { [_selectedFrameId]: scopes }), - selectedFrameId: _selectedFrameId - }); - - case "LOAD_OBJECT_PROPERTIES": - if (action.status === "start") { - return _extends({}, state, { - loadedObjects: _extends({}, state.loadedObjects, { - [action.objectId]: {} - }) - }); - } - - if (action.status === "done") { - if (!action.value) { - return Object.assign({}, state); - } - - var ownProperties = action.value.ownProperties; - var ownSymbols = action.value.ownSymbols || []; - var prototype = action.value.prototype; - - return _extends({}, state, { - loadedObjects: _extends({}, state.loadedObjects, { - [action.objectId]: { ownProperties, prototype, ownSymbols } - }) - }); - } - break; - - case "CONNECT": - return Object.assign({}, State(), { debuggeeUrl: action.url }); - - case "PAUSE_ON_EXCEPTIONS": - var _shouldPauseOnExceptions = action.shouldPauseOnExceptions, - _shouldIgnoreCaughtExceptions = action.shouldIgnoreCaughtExceptions; - - - _prefs.prefs.pauseOnExceptions = _shouldPauseOnExceptions; - _prefs.prefs.ignoreCaughtExceptions = _shouldIgnoreCaughtExceptions; - - return Object.assign({}, state, { - shouldPauseOnExceptions: _shouldPauseOnExceptions, - shouldIgnoreCaughtExceptions: _shouldIgnoreCaughtExceptions - }); - - case "COMMAND": - return _extends({}, state, { command: action.value.type }); - - case "CLEAR_COMMAND": - return _extends({}, state, { command: "" }); - - case "EVALUATE_EXPRESSION": - return _extends({}, state, { - command: action.status === "start" ? "expression" : "" - }); - - case "NAVIGATE": - return _extends({}, state, { debuggeeUrl: action.url }); - } - - return state; -} - -// Selectors - -// Unfortunately, it's really hard to make these functions accept just -// the state that we care about and still type it with Flow. The -// problem is that we want to re-export all selectors from a single -// module for the UI, and all of those selectors should take the -// top-level app state, so we'd have to "wrap" them to automatically -// pick off the piece of state we're interested in. It's impossible -// (right now) to type those wrapped functions. - - -var getPauseState = state => state.pause; - -var getPause = exports.getPause = (0, _reselect.createSelector)(getPauseState, pauseWrapper => pauseWrapper.pause); - -var getLoadedObjects = exports.getLoadedObjects = (0, _reselect.createSelector)(getPauseState, pauseWrapper => pauseWrapper.loadedObjects); - -function isStepping(state) { - return ["stepIn", "stepOver", "stepOut"].includes(state.pause.command); -} - -function isPaused(state) { - return !!getPause(state); -} - -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]; -} - -function getObjectProperties(state, parentId) { - return getLoadedObjects(state).filter(obj => obj.parentId == parentId); -} - -function getIsWaitingOnBreak(state) { - return state.pause.isWaitingOnBreak; -} - -function getShouldPauseOnExceptions(state) { - return state.pause.shouldPauseOnExceptions; -} - -function getShouldIgnoreCaughtExceptions(state) { - return state.pause.shouldIgnoreCaughtExceptions; -} - -function getFrames(state) { - return state.pause.frames; -} - -function getFrameScopes(state, frameId) { - return state.pause.frameScopes[frameId]; -} - -var getSelectedFrameId = exports.getSelectedFrameId = (0, _reselect.createSelector)(getPauseState, pauseWrapper => { - return pauseWrapper.selectedFrameId; -}); - -var getSelectedFrame = exports.getSelectedFrame = (0, _reselect.createSelector)(getSelectedFrameId, getFrames, (selectedFrameId, frames) => { - if (!frames) { - return null; - } - return frames.find(frame => frame.id == selectedFrameId); -}); - -function getDebuggeeUrl(state) { - return state.pause.debuggeeUrl; -} - -// NOTE: currently only used for chrome -function getChromeScopes(state) { - var frame = getSelectedFrame(state); - return frame ? frame.scopeChain : undefined; -} - -exports.default = update; - -/***/ }), -/* 240 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.State = undefined; -exports.getActiveSearch = getActiveSearch; -exports.getContextMenu = getContextMenu; -exports.getFileSearchQueryState = getFileSearchQueryState; -exports.getFileSearchModifierState = getFileSearchModifierState; -exports.getSearchResults = getSearchResults; -exports.getFrameworkGroupingState = getFrameworkGroupingState; -exports.getSymbolSearchType = getSymbolSearchType; -exports.getShownSource = getShownSource; -exports.getPaneCollapse = getPaneCollapse; -exports.getHighlightedLineRange = getHighlightedLineRange; -exports.getConditionalPanelLine = getConditionalPanelLine; - -var _makeRecord = __webpack_require__(230); - -var _makeRecord2 = _interopRequireDefault(_makeRecord); - -var _prefs = __webpack_require__(226); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * UI reducer - * @module reducers/ui - */ - -var State = exports.State = (0, _makeRecord2.default)({ - activeSearch: null, - contextMenu: {}, - fileSearchQuery: "", - fileSearchModifiers: (0, _makeRecord2.default)({ - caseSensitive: _prefs.prefs.fileSearchCaseSensitive, - wholeWord: _prefs.prefs.fileSearchWholeWord, - regexMatch: _prefs.prefs.fileSearchRegexMatch - })(), - symbolSearchType: "functions", - searchResults: { - matches: [], - matchIndex: -1, - index: -1, - count: 0 - }, - shownSource: "", - startPanelCollapsed: _prefs.prefs.startPanelCollapsed, - endPanelCollapsed: _prefs.prefs.endPanelCollapsed, - frameworkGroupingOn: _prefs.prefs.frameworkGroupingOn, - highlightedLineRange: undefined, - conditionalPanelLine: null -}); - -function update() { - var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : State(); - var action = arguments[1]; - - switch (action.type) { - case "TOGGLE_ACTIVE_SEARCH": - { - return state.set("activeSearch", action.value); - } - - case "TOGGLE_FRAMEWORK_GROUPING": - { - _prefs.prefs.frameworkGroupingOn = action.value; - return state.set("frameworkGroupingOn", action.value); - } - - case "UPDATE_FILE_SEARCH_QUERY": - { - return state.set("fileSearchQuery", action.query); - } - - case "UPDATE_SEARCH_RESULTS": - { - return state.set("searchResults", action.results); - } - - case "TOGGLE_FILE_SEARCH_MODIFIER": - { - var actionVal = !state.getIn(["fileSearchModifiers", action.modifier]); - - if (action.modifier == "caseSensitive") { - _prefs.prefs.fileSearchCaseSensitive = actionVal; - } - - if (action.modifier == "wholeWord") { - _prefs.prefs.fileSearchWholeWord = actionVal; - } - - if (action.modifier == "regexMatch") { - _prefs.prefs.fileSearchRegexMatch = actionVal; - } - - return state.setIn(["fileSearchModifiers", action.modifier], actionVal); - } - - case "SET_SYMBOL_SEARCH_TYPE": - { - return state.set("symbolSearchType", action.symbolType); - } - - case "SET_CONTEXT_MENU": - { - return state.set("contextMenu", action.contextMenu); - } - - case "SHOW_SOURCE": - { - return state.set("shownSource", action.sourceUrl); - } - - case "TOGGLE_PANE": - { - if (action.position == "start") { - _prefs.prefs.startPanelCollapsed = action.paneCollapsed; - return state.set("startPanelCollapsed", action.paneCollapsed); - } - - _prefs.prefs.endPanelCollapsed = action.paneCollapsed; - return state.set("endPanelCollapsed", action.paneCollapsed); - } - - case "HIGHLIGHT_LINES": - var _action$location = action.location, - _start = _action$location.start, - _end = _action$location.end, - _sourceId = _action$location.sourceId; - - var lineRange = {}; - - if (_start && _end && _sourceId) { - lineRange = { start: _start, end: _end, sourceId: _sourceId }; - } - - return state.set("highlightedLineRange", lineRange); - - case "CLEAR_HIGHLIGHT_LINES": - return state.set("highlightedLineRange", {}); - - case "OPEN_CONDITIONAL_PANEL": - return state.set("conditionalPanelLine", action.line); - - case "CLOSE_CONDITIONAL_PANEL": - return state.set("conditionalPanelLine", null); - - default: - { - return state; - } - } -} - -// NOTE: we'd like to have the app state fully typed -// https://github.com/devtools-html/debugger.html/blob/master/src/reducers/sources.js#L179-L185 -function getActiveSearch(state) { - return state.ui.get("activeSearch"); -} - -function getContextMenu(state) { - return state.ui.get("contextMenu"); -} - -function getFileSearchQueryState(state) { - return state.ui.get("fileSearchQuery"); -} - -function getFileSearchModifierState(state) { - return state.ui.get("fileSearchModifiers"); -} - -function getSearchResults(state) { - return state.ui.get("searchResults"); -} - -function getFrameworkGroupingState(state) { - return state.ui.get("frameworkGroupingOn"); -} - -function getSymbolSearchType(state) { - return state.ui.get("symbolSearchType"); -} - -function getShownSource(state) { - return state.ui.get("shownSource"); -} - -function getPaneCollapse(state, position) { - if (position == "start") { - return state.ui.get("startPanelCollapsed"); - } - - return state.ui.get("endPanelCollapsed"); -} - -function getHighlightedLineRange(state) { - return state.ui.get("highlightedLineRange"); -} - -function getConditionalPanelLine(state) { - return state.ui.get("conditionalPanelLine"); -} - -exports.default = update; - -/***/ }), -/* 241 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.State = undefined; -exports.getHitCountForSource = getHitCountForSource; -exports.getCoverageEnabled = getCoverageEnabled; - -var _makeRecord = __webpack_require__(230); - -var _makeRecord2 = _interopRequireDefault(_makeRecord); - -var _immutable = __webpack_require__(146); - -var I = _interopRequireWildcard(_immutable); - -var _fromJS = __webpack_require__(237); - -var _fromJS2 = _interopRequireDefault(_fromJS); - -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 State = exports.State = (0, _makeRecord2.default)({ - coverageOn: false, - hitCount: I.Map() -}); - -/** - * Code Coverage reducer - * @module reducers/coverage - */ - -function update() { - var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : State(); - var action = arguments[1]; - - switch (action.type) { - case "RECORD_COVERAGE": - return state.mergeIn(["hitCount"], (0, _fromJS2.default)(action.value.coverage)).setIn(["coverageOn"], true); - - default: - { - return state; - } - } -} - -// NOTE: we'd like to have the app state fully typed -// https://github.com/devtools-html/debugger.html/blob/master/src/reducers/sources.js#L179-L185 -function getHitCountForSource(state, sourceId) { - var hitCount = state.coverage.get("hitCount"); - return hitCount.get(sourceId); -} - -function getCoverageEnabled(state) { - return state.coverage.get("coverageOn"); -} - -exports.default = update; - -/***/ }), -/* 242 */ -/***/ (function(module, exports, __webpack_require__) { - -"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); - -var _sources = __webpack_require__(232); - -var sources = _interopRequireWildcard(_sources); - -var _pause = __webpack_require__(239); - -var pause = _interopRequireWildcard(_pause); - -var _debuggee = __webpack_require__(1175); - -var debuggee = _interopRequireWildcard(_debuggee); - -var _breakpoints = __webpack_require__(236); - -var breakpoints = _interopRequireWildcard(_breakpoints); - -var _pendingBreakpoints = __webpack_require__(1133); - -var pendingBreakpoints = _interopRequireWildcard(_pendingBreakpoints); - -var _eventListeners = __webpack_require__(231); - -var eventListeners = _interopRequireWildcard(_eventListeners); - -var _ui = __webpack_require__(240); - -var ui = _interopRequireWildcard(_ui); - -var _ast = __webpack_require__(1058); - -var ast = _interopRequireWildcard(_ast); - -var _coverage = __webpack_require__(241); - -var coverage = _interopRequireWildcard(_coverage); - -var _projectTextSearch = __webpack_require__(31); - -var projectTextSearch = _interopRequireWildcard(_projectTextSearch); - -var _sourceSearch = __webpack_require__(1132); - -var sourceSearch = _interopRequireWildcard(_sourceSearch); - -var _sourceTree = __webpack_require__(1176); - -var sourceTree = _interopRequireWildcard(_sourceTree); - -var _breakpointAtLocation = __webpack_require__(1134); - -var _breakpointAtLocation2 = _interopRequireDefault(_breakpointAtLocation); - -var _linesInScope = __webpack_require__(1124); - -var _linesInScope2 = _interopRequireDefault(_linesInScope); - -var _visibleBreakpoints = __webpack_require__(1135); - -var _visibleBreakpoints2 = _interopRequireDefault(_visibleBreakpoints); - -var _isSelectedFrameVisible = __webpack_require__(805); - -var _isSelectedFrameVisible2 = _interopRequireDefault(_isSelectedFrameVisible); - -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; } } - -/** - * @param object - location - */ - -module.exports = _extends({}, expressions, sources, pause, debuggee, breakpoints, pendingBreakpoints, eventListeners, ui, ast, coverage, projectTextSearch, sourceSearch, sourceTree, { - getBreakpointAtLocation: _breakpointAtLocation2.default, - getInScopeLines: _linesInScope2.default, - getVisibleBreakpoints: _visibleBreakpoints2.default, - isSelectedFrameVisible: _isSelectedFrameVisible2.default -}); - -/***/ }), -/* 243 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _propTypes = __webpack_require__(20); - -var _propTypes2 = _interopRequireDefault(_propTypes); - -var _react = __webpack_require__(0); - -var _react2 = _interopRequireDefault(_react); - -var _reactRedux = __webpack_require__(1189); - -var _redux = __webpack_require__(3); - -var _prefs = __webpack_require__(226); - -var _actions = __webpack_require__(244); - -var _actions2 = _interopRequireDefault(_actions); - -var _ShortcutsModal = __webpack_require__(1181); - -var _selectors = __webpack_require__(242); - -var _ui = __webpack_require__(1128); - -var _devtoolsModules = __webpack_require__(830); - -__webpack_require__(1305); - -__webpack_require__(1306); - -__webpack_require__(1307); - -__webpack_require__(1308); - -var _devtoolsSplitter = __webpack_require__(910); - -var _devtoolsSplitter2 = _interopRequireDefault(_devtoolsSplitter); - -var _ProjectSearch = __webpack_require__(1139); - -var _ProjectSearch2 = _interopRequireDefault(_ProjectSearch); - -var _PrimaryPanes = __webpack_require__(1142); - -var _PrimaryPanes2 = _interopRequireDefault(_PrimaryPanes); - -var _Editor = __webpack_require__(426); - -var _Editor2 = _interopRequireDefault(_Editor); - -var _SecondaryPanes = __webpack_require__(718); - -var _SecondaryPanes2 = _interopRequireDefault(_SecondaryPanes); - -var _WelcomeBox = __webpack_require__(747); - -var _WelcomeBox2 = _interopRequireDefault(_WelcomeBox); - -var _Tabs = __webpack_require__(750); - -var _Tabs2 = _interopRequireDefault(_Tabs); - -var _SymbolModal = __webpack_require__(1170); - -var _SymbolModal2 = _interopRequireDefault(_SymbolModal); - -var _GotoLineModal = __webpack_require__(1346); - -var _GotoLineModal2 = _interopRequireDefault(_GotoLineModal); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var shortcuts = new _devtoolsModules.KeyShortcuts({ window }); - -var appinfo = _devtoolsModules.Services.appinfo; - - -var isMacOS = appinfo.OS === "Darwin"; - -var verticalLayoutBreakpoint = window.matchMedia("(min-width: 800px)"); - -class App extends _react.Component { - - constructor(props) { - super(props); - this.state = { - shortcutsModalEnabled: false, - horizontal: verticalLayoutBreakpoint.matches, - startPanelSize: 0, - endPanelSize: 0 - }; - - this.getChildContext = this.getChildContext.bind(this); - this.onLayoutChange = this.onLayoutChange.bind(this); - this.toggleSymbolModal = this.toggleSymbolModal.bind(this); - this.toggleGoToLineModal = this.toggleGoToLineModal.bind(this); - 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() { - return { shortcuts }; - } - - componentDidMount() { - verticalLayoutBreakpoint.addListener(this.onLayoutChange); - - shortcuts.on(L10N.getStr("symbolSearch.search.key2"), this.toggleSymbolModal); - - shortcuts.on(L10N.getStr("gotoLineModal.key"), this.toggleGoToLineModal); - - shortcuts.on("Escape", this.onEscape); - shortcuts.on("Cmd+/", this.onCommandSlash); - } - - componentWillUnmount() { - verticalLayoutBreakpoint.removeListener(this.onLayoutChange); - shortcuts.off(L10N.getStr("symbolSearch.search.key2"), this.toggleSymbolModal); - - shortcuts.off(L10N.getStr("gotoLineModal.key"), this.toggleGoToLineModal); - - shortcuts.off("Escape", this.onEscape); - } - - onEscape(_, e) { - var _props = this.props, - activeSearch = _props.activeSearch, - closeActiveSearch = _props.closeActiveSearch; - - - if (activeSearch) { - e.preventDefault(); - closeActiveSearch(); - } - } - - onCommandSlash() { - this.toggleShortcutsModal(); - } - - toggleSymbolModal(_, e) { - var _props2 = this.props, - selectedSource = _props2.selectedSource, - activeSearch = _props2.activeSearch, - closeActiveSearch = _props2.closeActiveSearch, - setActiveSearch = _props2.setActiveSearch; - - - e.preventDefault(); - e.stopPropagation(); - - if (!selectedSource) { - return; - } - - if (activeSearch == "symbol") { - return closeActiveSearch(); - } - - setActiveSearch("symbol"); - } - - toggleGoToLineModal(_, e) { - var _props3 = this.props, - selectedSource = _props3.selectedSource, - activeSearch = _props3.activeSearch, - closeActiveSearch = _props3.closeActiveSearch, - setActiveSearch = _props3.setActiveSearch; - - - e.preventDefault(); - e.stopPropagation(); - - if (!selectedSource) { - return; - } - - if (activeSearch == "line") { - return closeActiveSearch(); - } - - setActiveSearch("line"); - } - - onLayoutChange() { - if ((0, _ui.isVisible)()) { - this.setState({ horizontal: verticalLayoutBreakpoint.matches }); - } - } - - renderEditorPane() { - var _props4 = this.props, - startPanelCollapsed = _props4.startPanelCollapsed, - endPanelCollapsed = _props4.endPanelCollapsed; - var _state = this.state, - horizontal = _state.horizontal, - endPanelSize = _state.endPanelSize, - startPanelSize = _state.startPanelSize; - - - return _react2.default.createElement( - "div", - { className: "editor-pane" }, - _react2.default.createElement( - "div", - { className: "editor-container" }, - _react2.default.createElement(_Tabs2.default, { - startPanelCollapsed: startPanelCollapsed, - endPanelCollapsed: endPanelCollapsed, - horizontal: horizontal, - startPanelSize: startPanelSize, - endPanelSize: endPanelSize - }), - _react2.default.createElement(_Editor2.default, { - horizontal: horizontal, - startPanelSize: startPanelSize, - endPanelSize: endPanelSize - }), - !this.props.selectedSource ? _react2.default.createElement(_WelcomeBox2.default, { horizontal: horizontal }) : null, - _react2.default.createElement(_ProjectSearch2.default, null) - ) - ); - } - - toggleShortcutsModal() { - this.setState({ - shortcutsModalEnabled: !this.state.shortcutsModalEnabled - }); - } - - renderHorizontalLayout() { - var _props5 = this.props, - startPanelCollapsed = _props5.startPanelCollapsed, - endPanelCollapsed = _props5.endPanelCollapsed; - var horizontal = this.state.horizontal; - - - var overflowX = endPanelCollapsed ? "hidden" : "auto"; - - return _react2.default.createElement(_devtoolsSplitter2.default, { - style: { width: "100vw" }, - initialSize: "250px", - minSize: 10, - maxSize: "50%", - splitterSize: 1, - onResizeEnd: size => this.setState({ startPanelSize: size }), - startPanel: _react2.default.createElement(_PrimaryPanes2.default, { horizontal: horizontal }), - startPanelCollapsed: startPanelCollapsed, - endPanel: _react2.default.createElement(_devtoolsSplitter2.default, { - style: { overflowX }, - initialSize: "300px", - minSize: 10, - maxSize: "80%", - splitterSize: 1, - onResizeEnd: size => this.setState({ endPanelSize: size }), - endPanelControl: true, - startPanel: this.renderEditorPane(), - endPanel: _react2.default.createElement(_SecondaryPanes2.default, { - horizontal: horizontal, - toggleShortcutsModal: () => this.toggleShortcutsModal() - }), - endPanelCollapsed: endPanelCollapsed, - vert: horizontal - }) - }); - } - - renderVerticalLayout() { - var _props6 = this.props, - startPanelCollapsed = _props6.startPanelCollapsed, - endPanelCollapsed = _props6.endPanelCollapsed; - var horizontal = this.state.horizontal; - - - return _react2.default.createElement(_devtoolsSplitter2.default, { - style: { width: "100vw" }, - initialSize: "300px", - minSize: 30, - maxSize: "99%", - splitterSize: 1, - vert: horizontal, - startPanel: _react2.default.createElement(_devtoolsSplitter2.default, { - style: { width: "100vw" }, - initialSize: "250px", - minSize: 10, - maxSize: "40%", - splitterSize: 1, - startPanelCollapsed: startPanelCollapsed, - startPanel: _react2.default.createElement(_PrimaryPanes2.default, { horizontal: horizontal }), - endPanel: this.renderEditorPane() - }), - endPanel: _react2.default.createElement(_SecondaryPanes2.default, { horizontal: horizontal }), - endPanelCollapsed: endPanelCollapsed - }); - } - - renderSymbolModal() { - var _props7 = this.props, - selectSource = _props7.selectSource, - selectedSource = _props7.selectedSource, - activeSearch = _props7.activeSearch; - - - if (activeSearch !== "symbol") { - return; - } - - return _react2.default.createElement(_SymbolModal2.default, { - selectSource: selectSource, - selectedSource: selectedSource - }); - } - - renderGotoLineModal() { - var _props8 = this.props, - selectSource = _props8.selectSource, - selectedSource = _props8.selectedSource, - activeSearch = _props8.activeSearch; - - - if (activeSearch !== "line") { - return; - } - - return _react2.default.createElement(_GotoLineModal2.default, { - selectSource: selectSource, - selectedSource: selectedSource - }); - } - - renderShortcutsModal() { - var additionalClass = isMacOS ? "mac" : ""; - - if (!_prefs.features.shortcuts) { - return; - } - - return _react2.default.createElement(_ShortcutsModal.ShortcutsModal, { - additionalClass: additionalClass, - enabled: this.state.shortcutsModalEnabled, - handleClose: () => this.toggleShortcutsModal() - }); - } - - render() { - return _react2.default.createElement( - "div", - { className: "debugger" }, - this.state.horizontal ? this.renderHorizontalLayout() : this.renderVerticalLayout(), - this.renderSymbolModal(), - this.renderGotoLineModal(), - this.renderShortcutsModal() - ); - } -} - -App.childContextTypes = { shortcuts: _propTypes2.default.object }; - -exports.default = (0, _reactRedux.connect)(state => ({ - selectedSource: (0, _selectors.getSelectedSource)(state), - startPanelCollapsed: (0, _selectors.getPaneCollapse)(state, "start"), - endPanelCollapsed: (0, _selectors.getPaneCollapse)(state, "end"), - activeSearch: (0, _selectors.getActiveSearch)(state) -}), dispatch => (0, _redux.bindActionCreators)(_actions2.default, dispatch))(App); - -/***/ }), -/* 244 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _breakpoints = __webpack_require__(245); - -var breakpoints = _interopRequireWildcard(_breakpoints); - -var _expressions = __webpack_require__(252); - -var expressions = _interopRequireWildcard(_expressions); - -var _eventListeners = __webpack_require__(253); - -var eventListeners = _interopRequireWildcard(_eventListeners); - -var _sources = __webpack_require__(254); - -var sources = _interopRequireWildcard(_sources); - -var _pause = __webpack_require__(319); - -var pause = _interopRequireWildcard(_pause); - -var _navigation = __webpack_require__(320); - -var navigation = _interopRequireWildcard(_navigation); - -var _ui = __webpack_require__(321); - -var ui = _interopRequireWildcard(_ui); - -var _ast = __webpack_require__(1059); - -var ast = _interopRequireWildcard(_ast); - -var _coverage = __webpack_require__(322); - -var coverage = _interopRequireWildcard(_coverage); - -var _projectTextSearch = __webpack_require__(37); - -var projectTextSearch = _interopRequireWildcard(_projectTextSearch); - -var _sourceSearch = __webpack_require__(1144); - -var sourceSearch = _interopRequireWildcard(_sourceSearch); - -var _sourceTree = __webpack_require__(1178); - -var sourceTree = _interopRequireWildcard(_sourceTree); - -var _loadSourceText = __webpack_require__(1143); - -var loadSourceText = _interopRequireWildcard(_loadSourceText); - -var _debuggee = __webpack_require__(1179); - -var debuggee = _interopRequireWildcard(_debuggee); - -var _toolbox = __webpack_require__(1180); - -var toolbox = _interopRequireWildcard(_toolbox); - -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; } } - -exports.default = Object.assign({}, navigation, breakpoints, expressions, eventListeners, sources, pause, ui, ast, coverage, projectTextSearch, sourceSearch, sourceTree, loadSourceText, debuggee, toolbox); - -/***/ }), -/* 245 */ -/***/ (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"); } }; }(); - -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.syncBreakpoint = syncBreakpoint; -exports.addBreakpoint = addBreakpoint; -exports.addHiddenBreakpoint = addHiddenBreakpoint; -exports.removeBreakpoint = removeBreakpoint; -exports.enableBreakpoint = enableBreakpoint; -exports.disableBreakpoint = disableBreakpoint; -exports.toggleAllBreakpoints = toggleAllBreakpoints; -exports.toggleBreakpoints = toggleBreakpoints; -exports.removeAllBreakpoints = removeAllBreakpoints; -exports.removeBreakpoints = removeBreakpoints; -exports.remapBreakpoints = remapBreakpoints; -exports.setBreakpointCondition = setBreakpointCondition; -exports.toggleBreakpoint = toggleBreakpoint; -exports.addOrToggleDisabledBreakpoint = addOrToggleDisabledBreakpoint; -exports.toggleDisabledBreakpoint = toggleDisabledBreakpoint; - -var _promise = __webpack_require__(193); - -var _selectors = __webpack_require__(242); - -var _breakpoint = __webpack_require__(1057); - -var _addBreakpoint = __webpack_require__(1136); - -var _addBreakpoint2 = _interopRequireDefault(_addBreakpoint); - -var _remapLocations = __webpack_require__(188); - -var _remapLocations2 = _interopRequireDefault(_remapLocations); - -var _ast = __webpack_require__(1058); - -var _syncBreakpoint = __webpack_require__(1137); - -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"); }); }; } -/* This Source Code Form is subject to the terms of the Mozilla Public - * 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/. */ - -/** - * Redux actions for breakpoints - * @module actions/breakpoints - */ - -// this will need to be changed so that addCLientBreakpoint is removed - - -/** - * Syncing a breakpoint add breakpoint information that is stored, and - * contact the server for more data. - * - * @memberof actions/breakpoints - * @static - * @param {String} $1.sourceId String value - * @param {PendingBreakpoint} $1.location PendingBreakpoint value - */ -function syncBreakpoint(sourceId, pendingBreakpoint) { - return (() => { - var _ref = _asyncToGenerator(function* (_ref2) { - var dispatch = _ref2.dispatch, - getState = _ref2.getState, - client = _ref2.client, - sourceMaps = _ref2.sourceMaps; - - var _ref3 = yield (0, _syncBreakpoint.syncClientBreakpoint)(getState, client, sourceMaps, sourceId, pendingBreakpoint), - breakpoint = _ref3.breakpoint, - previousLocation = _ref3.previousLocation; - - return dispatch({ - type: "SYNC_BREAKPOINT", - breakpoint, - previousLocation - }); - }); - - return function (_x) { - return _ref.apply(this, arguments); - }; - })(); -} - -/** - * Add a new breakpoint - * - * @memberof actions/breakpoints - * @static - * @param {String} $1.condition Conditional breakpoint condition value - * @param {Boolean} $1.disabled Disable value for breakpoint value - */ - -function addBreakpoint(location) { - var _ref4 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, - condition = _ref4.condition, - hidden = _ref4.hidden; - - var breakpoint = (0, _breakpoint.createBreakpoint)(location, { condition, hidden }); - return (_ref5) => { - var dispatch = _ref5.dispatch, - getState = _ref5.getState, - sourceMaps = _ref5.sourceMaps, - client = _ref5.client; - - var action = { type: "ADD_BREAKPOINT", breakpoint }; - var promise = (0, _addBreakpoint2.default)(getState, client, sourceMaps, action); - return dispatch(_extends({}, action, { [_promise.PROMISE]: promise })); - }; -} - -/** - * Add a new hidden breakpoint - * - * @memberOf actions/breakpoints - * @param location - * @return {function(ThunkArgs)} - */ -function addHiddenBreakpoint(location) { - return (_ref6) => { - var dispatch = _ref6.dispatch; - - return dispatch(addBreakpoint(location, { hidden: true })); - }; -} - -/** - * Remove a single breakpoint - * - * @memberof actions/breakpoints - * @static - */ -function removeBreakpoint(location) { - return (_ref7) => { - var dispatch = _ref7.dispatch, - getState = _ref7.getState, - client = _ref7.client; - - var bp = (0, _selectors.getBreakpoint)(getState(), location); - if (!bp || bp.loading) { - return; - } - - // If the breakpoint is already disabled, we don't need to communicate - // with the server. We just need to dispatch an action - // simulating a successful server request - if (bp.disabled) { - return dispatch({ - type: "REMOVE_BREAKPOINT", - breakpoint: bp, - status: "done" - }); - } - - return dispatch({ - type: "REMOVE_BREAKPOINT", - breakpoint: bp, - [_promise.PROMISE]: client.removeBreakpoint(bp.generatedLocation) - }); - }; -} - -/** - * Enabling a breakpoint - * will reuse the existing breakpoint information that is stored. - * - * @memberof actions/breakpoints - * @static - * @param {Location} $1.location Location value - */ -function enableBreakpoint(location) { - return (() => { - var _ref8 = _asyncToGenerator(function* (_ref9) { - var dispatch = _ref9.dispatch, - getState = _ref9.getState, - client = _ref9.client, - sourceMaps = _ref9.sourceMaps; - - var breakpoint = (0, _selectors.getBreakpoint)(getState(), location); - if (!breakpoint || breakpoint.loading) { - return; - } - - var action = { type: "ENABLE_BREAKPOINT", breakpoint }; - var promise = (0, _addBreakpoint2.default)(getState, client, sourceMaps, action); - return dispatch({ - type: "ENABLE_BREAKPOINT", - breakpoint, - [_promise.PROMISE]: promise - }); - }); - - return function (_x3) { - return _ref8.apply(this, arguments); - }; - })(); -} - -/** - * Disable a single breakpoint - * - * @memberof actions/breakpoints - * @static - */ -function disableBreakpoint(location) { - return (() => { - var _ref10 = _asyncToGenerator(function* (_ref11) { - var dispatch = _ref11.dispatch, - getState = _ref11.getState, - client = _ref11.client; - - var bp = (0, _selectors.getBreakpoint)(getState(), location); - - if (!bp || bp.loading) { - return; - } - - yield client.removeBreakpoint(bp.generatedLocation); - var newBreakpoint = _extends({}, bp, { disabled: true }); - - return dispatch({ - type: "DISABLE_BREAKPOINT", - breakpoint: newBreakpoint - }); - }); - - return function (_x4) { - return _ref10.apply(this, arguments); - }; - })(); -} - -/** - * Toggle All Breakpoints - * - * @memberof actions/breakpoints - * @static - */ -function toggleAllBreakpoints(shouldDisableBreakpoints) { - return (() => { - var _ref12 = _asyncToGenerator(function* (_ref13) { - var dispatch = _ref13.dispatch, - getState = _ref13.getState; - - var breakpoints = (0, _selectors.getBreakpoints)(getState()); - for (var _ref14 of breakpoints) { - var _ref15 = _slicedToArray(_ref14, 2); - - var breakpoint = _ref15[1]; - - if (shouldDisableBreakpoints) { - yield dispatch(disableBreakpoint(breakpoint.location)); - } else { - yield dispatch(enableBreakpoint(breakpoint.location)); - } - } - }); - - return function (_x5) { - return _ref12.apply(this, arguments); - }; - })(); -} - -/** - * Toggle Breakpoints - * - * @memberof actions/breakpoints - * @static - */ -function toggleBreakpoints(shouldDisableBreakpoints, breakpoints) { - return (() => { - var _ref16 = _asyncToGenerator(function* (_ref17) { - var dispatch = _ref17.dispatch; - - for (var _ref18 of breakpoints) { - var _ref19 = _slicedToArray(_ref18, 2); - - var breakpoint = _ref19[1]; - - if (shouldDisableBreakpoints) { - yield dispatch(disableBreakpoint(breakpoint.location)); - } else { - yield dispatch(enableBreakpoint(breakpoint.location)); - } - } - }); - - return function (_x6) { - return _ref16.apply(this, arguments); - }; - })(); -} - -/** - * Removes all breakpoints - * - * @memberof actions/breakpoints - * @static - */ -function removeAllBreakpoints() { - return (() => { - var _ref20 = _asyncToGenerator(function* (_ref21) { - var dispatch = _ref21.dispatch, - getState = _ref21.getState; - - var breakpoints = (0, _selectors.getBreakpoints)(getState()); - for (var _ref22 of breakpoints) { - var _ref23 = _slicedToArray(_ref22, 2); - - var breakpoint = _ref23[1]; - - yield dispatch(removeBreakpoint(breakpoint.location)); - } - }); - - return function (_x7) { - return _ref20.apply(this, arguments); - }; - })(); -} - -/** - * Removes breakpoints - * - * @memberof actions/breakpoints - * @static - */ -function removeBreakpoints(breakpoints) { - return (() => { - var _ref24 = _asyncToGenerator(function* (_ref25) { - var dispatch = _ref25.dispatch; - - for (var _ref26 of breakpoints) { - var _ref27 = _slicedToArray(_ref26, 2); - - var breakpoint = _ref27[1]; - - yield dispatch(removeBreakpoint(breakpoint.location)); - } - }); - - return function (_x8) { - return _ref24.apply(this, arguments); - }; - })(); -} - -function remapBreakpoints(sourceId) { - return (() => { - var _ref28 = _asyncToGenerator(function* (_ref29) { - var dispatch = _ref29.dispatch, - getState = _ref29.getState, - sourceMaps = _ref29.sourceMaps; - - var breakpoints = (0, _selectors.getBreakpoints)(getState()); - var newBreakpoints = yield (0, _remapLocations2.default)(breakpoints, sourceId, sourceMaps); - - return dispatch({ - type: "REMAP_BREAKPOINTS", - breakpoints: newBreakpoints - }); - }); - - return function (_x9) { - return _ref28.apply(this, arguments); - }; - })(); -} - -/** - * Update the condition of a breakpoint. - * - * @throws {Error} "not implemented" - * @memberof actions/breakpoints - * @static - * @param {Location} location - * @see DebuggerController.Breakpoints.addBreakpoint - * @param {string} condition - * The condition to set on the breakpoint - * @param {Boolean} $1.disabled Disable value for breakpoint value - */ -function setBreakpointCondition(location) { - var _ref30 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, - condition = _ref30.condition; - - return (() => { - var _ref31 = _asyncToGenerator(function* (_ref32) { - var dispatch = _ref32.dispatch, - getState = _ref32.getState, - client = _ref32.client, - sourceMaps = _ref32.sourceMaps; - - var bp = (0, _selectors.getBreakpoint)(getState(), location); - if (!bp) { - return dispatch(addBreakpoint(location, { condition })); - } - - if (bp.loading) { - return; - } - - if (bp.disabled) { - yield dispatch(enableBreakpoint(location)); - bp.disabled = !bp.disabled; - } - - yield client.setBreakpointCondition(bp.id, location, condition, sourceMaps.isOriginalId(bp.location.sourceId)); - - var newBreakpoint = _extends({}, bp, { condition }); - - (0, _breakpoint.assertBreakpoint)(newBreakpoint); - - return dispatch({ - type: "SET_BREAKPOINT_CONDITION", - breakpoint: newBreakpoint - }); - }); - - return function (_x11) { - return _ref31.apply(this, arguments); - }; - })(); -} - -function toggleBreakpoint(line, column) { - return (_ref33) => { - var dispatch = _ref33.dispatch, - getState = _ref33.getState, - client = _ref33.client, - sourceMaps = _ref33.sourceMaps; - - var state = getState(); - var selectedSource = (0, _selectors.getSelectedSource)(state); - var bp = (0, _selectors.getBreakpointAtLocation)(state, { line, column }); - var isEmptyLine = (0, _ast.isEmptyLineInSource)(state, line, selectedSource.toJS()); - - if (isEmptyLine || bp && bp.loading) { - return; - } - - if (bp) { - // NOTE: it's possible the breakpoint has slid to a column - return dispatch(removeBreakpoint({ - sourceId: bp.location.sourceId, - sourceUrl: bp.location.sourceUrl, - line: bp.location.line, - column: column || bp.location.column - })); - } - - return dispatch(addBreakpoint({ - sourceId: selectedSource.get("id"), - sourceUrl: selectedSource.get("url"), - line: line, - column: column - })); - }; -} - -function addOrToggleDisabledBreakpoint(line, column) { - return (_ref34) => { - var dispatch = _ref34.dispatch, - getState = _ref34.getState, - client = _ref34.client, - sourceMaps = _ref34.sourceMaps; - - var selectedSource = (0, _selectors.getSelectedSource)(getState()); - var bp = (0, _selectors.getBreakpointAtLocation)(getState(), { line, column }); - - if (bp && bp.loading) { - return; - } - - if (bp) { - // NOTE: it's possible the breakpoint has slid to a column - return dispatch(toggleDisabledBreakpoint(line, column || bp.location.column)); - } - - return dispatch(addBreakpoint({ - sourceId: selectedSource.get("id"), - sourceUrl: selectedSource.get("url"), - line: line, - column: column - })); - }; -} - -function toggleDisabledBreakpoint(line, column) { - return (_ref35) => { - var dispatch = _ref35.dispatch, - getState = _ref35.getState, - client = _ref35.client, - sourceMaps = _ref35.sourceMaps; - - var bp = (0, _selectors.getBreakpointAtLocation)(getState(), { line, column }); - if (!bp || bp.loading) { - return; - } - - if (!bp.disabled) { - return dispatch(disableBreakpoint(bp.location)); - } - return dispatch(enableBreakpoint(bp.location)); - }; -} - -/***/ }), +/* 230 */, +/* 231 */, +/* 232 */, +/* 233 */, +/* 234 */, +/* 235 */, +/* 236 */, +/* 237 */, +/* 238 */, +/* 239 */, +/* 240 */, +/* 241 */, +/* 242 */, +/* 243 */, +/* 244 */, +/* 245 */, /* 246 */, /* 247 */ /***/ (function(module, exports) { @@ -17322,1244 +10638,17 @@ function isSlowBuffer (obj) { /***/ }), -/* 252 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.getMappedExpression = undefined; - -/** - * Gets information about original variable names from the source map - * and replaces all posible generated names. - */ -var getMappedExpression = exports.getMappedExpression = (() => { - var _ref9 = _asyncToGenerator(function* (_ref10, generatedLocation, expression) { - var sourceMaps = _ref10.sourceMaps; - - var astScopes = yield parser.getScopes(generatedLocation); - - var generatedScopes = yield sourceMaps.getLocationScopes(generatedLocation, astScopes); - - if (!generatedScopes) { - return expression; - } - - return (0, _utils.replaceOriginalVariableName)(expression, generatedScopes); - }); - - return function getMappedExpression(_x4, _x5, _x6) { - return _ref9.apply(this, arguments); - }; -})(); - -exports.addExpression = addExpression; -exports.updateExpression = updateExpression; -exports.deleteExpression = deleteExpression; -exports.evaluateExpressions = evaluateExpressions; - -var _selectors = __webpack_require__(242); - -var _promise = __webpack_require__(193); - -var _utils = __webpack_require__(1206); - -var _sources = __webpack_require__(254); - -var _devtoolsSourceMap = __webpack_require__(898); - -var _expressions = __webpack_require__(1177); - -var _parser = __webpack_require__(1208); - -var parser = _interopRequireWildcard(_parser); - -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 _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"); }); }; } - -/** - * Add expression for debugger to watch - * - * @param {object} expression - * @param {number} expression.id - * @memberof actions/pause - * @static - */ -function addExpression(input) { - return (() => { - var _ref = _asyncToGenerator(function* (_ref2) { - var dispatch = _ref2.dispatch, - getState = _ref2.getState; - - if (!input) { - return; - } - - var expression = (0, _selectors.getExpression)(getState(), input); - if (expression) { - return dispatch(evaluateExpression(expression)); - } - - dispatch({ - type: "ADD_EXPRESSION", - input - }); - - var newExpression = (0, _selectors.getExpression)(getState(), input); - dispatch(evaluateExpression(newExpression)); - }); - - return function (_x) { - return _ref.apply(this, arguments); - }; - })(); -} - -function updateExpression(input, expression) { - return (_ref3) => { - var dispatch = _ref3.dispatch, - getState = _ref3.getState; - - if (!input || input == expression.input) { - return; - } - - dispatch({ - type: "UPDATE_EXPRESSION", - expression, - input: input - }); - - dispatch(evaluateExpressions()); - }; -} - -/** - * - * @param {object} expression - * @param {number} expression.id - * @memberof actions/pause - * @static - */ -function deleteExpression(expression) { - return (_ref4) => { - var dispatch = _ref4.dispatch; - - dispatch({ - type: "DELETE_EXPRESSION", - input: expression.input - }); - }; -} - -/** - * - * @memberof actions/pause - * @param {number} selectedFrameId - * @static - */ -function evaluateExpressions() { - return (() => { - var _ref5 = _asyncToGenerator(function* (_ref6) { - var dispatch = _ref6.dispatch, - getState = _ref6.getState, - client = _ref6.client; - - var expressions = (0, _selectors.getExpressions)(getState()).toJS(); - for (var expression of expressions) { - yield dispatch(evaluateExpression(expression)); - } - }); - - return function (_x2) { - return _ref5.apply(this, arguments); - }; - })(); -} - -function evaluateExpression(expression) { - return (() => { - var _ref7 = _asyncToGenerator(function* (_ref8) { - var dispatch = _ref8.dispatch, - getState = _ref8.getState, - client = _ref8.client, - sourceMaps = _ref8.sourceMaps; - - if (!expression.input) { - console.warn("Expressions should not be empty"); - return; - } - - var input = expression.input; - var error = yield parser.hasSyntaxError(input); - if (error) { - return dispatch({ - type: "EVALUATE_EXPRESSION", - input: expression.input, - value: { input: expression.input, result: error } - }); - } - - var frame = (0, _selectors.getSelectedFrame)(getState()); - - if (frame) { - var location = frame.location, - generatedLocation = frame.generatedLocation; - - var source = (0, _selectors.getSource)(getState(), location.sourceId); - var sourceId = source.get("id"); - - if (!(0, _devtoolsSourceMap.isGeneratedId)(sourceId)) { - var generatedSourceId = generatedLocation.sourceId; - yield dispatch((0, _sources.ensureParserHasSourceText)(generatedSourceId)); - - input = yield getMappedExpression({ sourceMaps }, generatedLocation, input); - } - } - - var frameId = (0, _selectors.getSelectedFrameId)(getState()); - return dispatch({ - type: "EVALUATE_EXPRESSION", - input: expression.input, - [_promise.PROMISE]: client.evaluate((0, _expressions.wrapExpression)(input), { frameId }) - }); - }); - - return function (_x3) { - return _ref7.apply(this, arguments); - }; - })(); -} - -/***/ }), -/* 253 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -/** - * @memberof utils/utils - * @static - */ -var asPaused = (() => { - var _ref = _asyncToGenerator(function* (state, client, func) { - if (!(0, _selectors.getPause)(state)) { - yield client.interrupt(); - var result = void 0; - - try { - result = yield func(client); - } catch (e) { - // Try to put the debugger back in a working state by resuming - // it - yield client.resume(); - throw e; - } - - yield client.resume(); - return result; - } - - return func(client); - }); - - return function asPaused(_x, _x2, _x3) { - return _ref.apply(this, arguments); - }; -})(); - -/** - * @memberof actions/event-listeners - * @static - */ - - -var _getEventListeners = (() => { - var _ref3 = _asyncToGenerator(function* (threadClient) { - var response = yield threadClient.eventListeners(); - - // Make sure all the listeners are sorted by the event type, since - // they"re not guaranteed to be clustered together. - response.listeners.sort(function (a, b) { - return a.type > b.type ? 1 : -1; - }); - - // Add all the listeners in the debugger view event linsteners container. - var fetchedDefinitions = new Map(); - var listeners = []; - for (var listener of response.listeners) { - var definitionSite = void 0; - if (fetchedDefinitions.has(listener.function.actor)) { - definitionSite = fetchedDefinitions.get(listener.function.actor); - } else if (listener.function.class == "Function") { - definitionSite = yield _getDefinitionSite(threadClient, listener.function); - if (!definitionSite) { - // We don"t know where this listener comes from so don"t show it in - // the UI as breaking on it doesn"t work (bug 942899). - continue; - } - - fetchedDefinitions.set(listener.function.actor, definitionSite); - } - listener.function.url = definitionSite; - listeners.push(listener); - } - fetchedDefinitions.clear(); - - return listeners; - }); - - return function _getEventListeners(_x4) { - return _ref3.apply(this, arguments); - }; -})(); - -var _getDefinitionSite = (() => { - var _ref4 = _asyncToGenerator(function* (threadClient, func) { - var grip = threadClient.pauseGrip(func); - var response = void 0; - - try { - response = yield grip.getDefinitionSite(); - } catch (e) { - // Don't make this error fatal, it would break the entire events pane. - (0, _DevToolsUtils.reportException)("_getDefinitionSite", e); - return null; - } - - return response.source.url; - }); - - return function _getDefinitionSite(_x5, _x6) { - return _ref4.apply(this, arguments); - }; -})(); - -/** - * @memberof actions/event-listeners - * @static - * @param {string} eventNames - */ - - -exports.fetchEventListeners = fetchEventListeners; -exports.updateEventBreakpoints = updateEventBreakpoints; - -var _DevToolsUtils = __webpack_require__(222); - -var _selectors = __webpack_require__(242); - -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"); }); }; } /* This Source Code Form is subject to the terms of the Mozilla Public - * 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/. */ -/* global window gThreadClient setNamedTimeout services EVENTS */ -/* eslint no-shadow: 0 */ - -/** - * Redux actions for the event listeners state - * @module actions/event-listeners - */ - -// delay is in ms -var FETCH_EVENT_LISTENERS_DELAY = 200; -var fetchListenersTimerID = void 0;function fetchEventListeners() { - return (_ref2) => { - var dispatch = _ref2.dispatch, - getState = _ref2.getState, - client = _ref2.client; - - // Make sure we"re not sending a batch of closely repeated requests. - // This can easily happen whenever new sources are fetched. - if (fetchListenersTimerID) { - clearTimeout(fetchListenersTimerID); - } - - fetchListenersTimerID = setTimeout(() => { - // In case there is still a request of listeners going on (it - // takes several RDP round trips right now), make sure we wait - // on a currently running request - if (getState().eventListeners.fetchingListeners) { - dispatch({ - type: services.WAIT_UNTIL, - predicate: action => action.type === "FETCH_EVENT_LISTENERS" && action.status === "done", - run: dispatch => dispatch(fetchEventListeners()) - }); - return; - } - - dispatch({ - type: "FETCH_EVENT_LISTENERS", - status: "begin" - }); - - asPaused(getState(), client, _getEventListeners).then(listeners => { - dispatch({ - type: "FETCH_EVENT_LISTENERS", - status: "done", - listeners: formatListeners(getState(), listeners) - }); - }); - }, FETCH_EVENT_LISTENERS_DELAY); - }; -} - -function formatListeners(state, listeners) { - return listeners.map(l => { - return { - selector: l.node.selector, - type: l.type, - sourceId: (0, _selectors.getSourceByURL)(state, l.function.location.url).get("id"), - line: l.function.location.line - }; - }); -} - -function updateEventBreakpoints(eventNames) { - return dispatch => { - setNamedTimeout("event-breakpoints-update", 0, () => { - gThreadClient.pauseOnDOMEvents(eventNames, () => { - // Notify that event breakpoints were added/removed on the server. - window.emit(EVENTS.EVENT_BREAKPOINTS_UPDATED); - - dispatch({ - type: "UPDATE_EVENT_BREAKPOINTS", - eventNames: eventNames - }); - }); - }); - }; -} - -/***/ }), -/* 254 */ -/***/ (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"); } }; }(); - -// If a request has been made to show this source, go ahead and -// select it. -var checkSelectedSource = (() => { - var _ref = _asyncToGenerator(function* (state, dispatch, source) { - var pendingLocation = (0, _selectors.getPendingSelectedLocation)(state); - - if (pendingLocation && !!source.url && pendingLocation.url === source.url) { - yield dispatch(selectSource(source.id, { line: pendingLocation.line })); - } - }); - - return function checkSelectedSource(_x, _x2, _x3) { - return _ref.apply(this, arguments); - }; -})(); - -var checkPendingBreakpoints = (() => { - var _ref2 = _asyncToGenerator(function* (state, dispatch, sourceId) { - // source may have been modified by selectSource - var source = (0, _selectors.getSource)(state, sourceId).toJS(); - var pendingBreakpoints = (0, _selectors.getPendingBreakpointsForSource)(state, source.url); - if (!pendingBreakpoints.size) { - return; - } - - // load the source text if there is a pending breakpoint for it - yield dispatch((0, _loadSourceText.loadSourceText)(source)); - var pendingBreakpointsArray = pendingBreakpoints.valueSeq().toJS(); - for (var pendingBreakpoint of pendingBreakpointsArray) { - yield dispatch((0, _breakpoints.syncBreakpoint)(sourceId, pendingBreakpoint)); - } - }); - - return function checkPendingBreakpoints(_x4, _x5, _x6) { - return _ref2.apply(this, arguments); - }; -})(); - -/** - * Handler for the debugger client's unsolicited newSource notification. - * @memberof actions/sources - * @static - */ - - -exports.newSource = newSource; -exports.newSources = newSources; -exports.selectSourceURL = selectSourceURL; -exports.selectSource = selectSource; -exports.jumpToMappedLocation = jumpToMappedLocation; -exports.addTab = addTab; -exports.moveTab = moveTab; -exports.closeTab = closeTab; -exports.closeTabs = closeTabs; -exports.togglePrettyPrint = togglePrettyPrint; -exports.toggleBlackBox = toggleBlackBox; -exports.loadAllSources = loadAllSources; -exports.ensureParserHasSourceText = ensureParserHasSourceText; - -var _promise = __webpack_require__(193); - -var _assert = __webpack_require__(223); - -var _assert2 = _interopRequireDefault(_assert); - -var _breakpoints = __webpack_require__(245); - -var _ast = __webpack_require__(1059); - -var _projectTextSearch = __webpack_require__(37); - -var _ui = __webpack_require__(321); - -var _source2 = __webpack_require__(233); - -var _createPrettySource = __webpack_require__(195); - -var _loadSourceText = __webpack_require__(1143); - -var _prefs = __webpack_require__(226); - -var _editor = __webpack_require__(257); - -var _sourceMaps = __webpack_require__(797); - -var _parser = __webpack_require__(1208); - -var parser = _interopRequireWildcard(_parser); - -var _selectors = __webpack_require__(242); - -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 }; } - -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"); }); }; } - -/* This Source Code Form is subject to the terms of the Mozilla Public - * 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/. */ - -/** - * Redux actions for the sources state - * @module actions/sources - */ - -function newSource(source) { - return (() => { - var _ref3 = _asyncToGenerator(function* (_ref4) { - var dispatch = _ref4.dispatch, - getState = _ref4.getState; - - var _source = (0, _selectors.getSource)(getState(), source.id); - if (_source) { - return; - } - - dispatch({ type: "ADD_SOURCE", source }); - - if (_prefs.prefs.clientSourceMapsEnabled) { - yield dispatch(loadSourceMap(source)); - } - - yield checkSelectedSource(getState(), dispatch, source); - yield checkPendingBreakpoints(getState(), dispatch, source.id); - }); - - return function (_x7) { - return _ref3.apply(this, arguments); - }; - })(); -} - -function newSources(sources) { - return (() => { - var _ref5 = _asyncToGenerator(function* (_ref6) { - var dispatch = _ref6.dispatch, - getState = _ref6.getState; - - var filteredSources = sources.filter(function (source) { - return !(0, _selectors.getSource)(getState(), source.id); - }); - - for (var source of filteredSources) { - yield dispatch(newSource(source)); - } - }); - - return function (_x8) { - return _ref5.apply(this, arguments); - }; - })(); -} - -/** - * @memberof actions/sources - * @static - */ -function loadSourceMap(generatedSource) { - return (() => { - var _ref7 = _asyncToGenerator(function* (_ref8) { - var dispatch = _ref8.dispatch, - getState = _ref8.getState, - sourceMaps = _ref8.sourceMaps; - - var urls = yield sourceMaps.getOriginalURLs(generatedSource); - if (!urls) { - // If this source doesn't have a sourcemap, do nothing. - return; - } - - var originalSources = urls.map(function (originalUrl) { - return { - url: originalUrl, - id: sourceMaps.generatedToOriginalId(generatedSource.id, originalUrl), - isPrettyPrinted: false, - isWasm: false, - isBlackBoxed: false, - loadedState: "unloaded" - }; - }); - - dispatch({ type: "ADD_SOURCES", sources: originalSources }); - - originalSources.forEach((() => { - var _ref9 = _asyncToGenerator(function* (source) { - yield checkSelectedSource(getState(), dispatch, source); - checkPendingBreakpoints(getState(), dispatch, source.id); - }); - - return function (_x10) { - return _ref9.apply(this, arguments); - }; - })()); - }); - - return function (_x9) { - return _ref7.apply(this, arguments); - }; - })(); -} - -/** - * Deterministically select a source that has a given URL. This will - * work regardless of the connection status or if the source exists - * yet. This exists mostly for external things to interact with the - * debugger. - * - * @memberof actions/sources - * @static - */ -function selectSourceURL(url) { - var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - - return (() => { - var _ref10 = _asyncToGenerator(function* (_ref11) { - var dispatch = _ref11.dispatch, - getState = _ref11.getState; - - var source = (0, _selectors.getSourceByURL)(getState(), url); - if (source) { - yield dispatch(selectSource(source.get("id"), options)); - } else { - dispatch({ - type: "SELECT_SOURCE_URL", - url: url, - tabIndex: options.tabIndex, - line: options.line - }); - } - }); - - return function (_x12) { - return _ref10.apply(this, arguments); - }; - })(); -} - -/** - * @memberof actions/sources - * @static - */ -function selectSource(id) { - var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - - return (_ref12) => { - var dispatch = _ref12.dispatch, - getState = _ref12.getState, - client = _ref12.client; - - if (!client) { - // No connection, do nothing. This happens when the debugger is - // shut down too fast and it tries to display a default source. - return; - } - - var source = (0, _selectors.getSource)(getState(), id); - if (!source) { - // If there is no source we deselect the current selected source - return dispatch({ type: "CLEAR_SELECTED_SOURCE" }); - } - - var activeSearch = (0, _selectors.getActiveSearch)(getState()); - if (activeSearch !== "file") { - dispatch((0, _ui.closeActiveSearch)()); - } - - dispatch(addTab(source.toJS(), 0)); - - return dispatch({ - type: "SELECT_SOURCE", - source: source.toJS(), - tabIndex: options.tabIndex, - line: options.line, - [_promise.PROMISE]: _asyncToGenerator(function* () { - yield dispatch((0, _loadSourceText.loadSourceText)(source.toJS())); - yield dispatch((0, _ast.setOutOfScopeLocations)()); - })() - }); - }; -} - -/** - * @memberof actions/sources - * @static - */ -function jumpToMappedLocation(sourceLocation) { - return (() => { - var _ref14 = _asyncToGenerator(function* (_ref15) { - var dispatch = _ref15.dispatch, - getState = _ref15.getState, - client = _ref15.client, - sourceMaps = _ref15.sourceMaps; - - if (!client) { - return; - } - - var source = (0, _selectors.getSource)(getState(), sourceLocation.sourceId); - var pairedLocation = void 0; - if (sourceMaps.isOriginalId(sourceLocation.sourceId)) { - pairedLocation = yield (0, _sourceMaps.getGeneratedLocation)(getState(), source.toJS(), sourceLocation, sourceMaps); - } else { - pairedLocation = yield sourceMaps.getOriginalLocation(sourceLocation, source.toJS()); - } - - return dispatch(selectSource(pairedLocation.sourceId, { line: pairedLocation.line })); - }); - - return function (_x14) { - return _ref14.apply(this, arguments); - }; - })(); -} - -function addTab(source, tabIndex) { - return { - type: "ADD_TAB", - source, - tabIndex - }; -} - -function moveTab(url, tabIndex) { - return { - type: "MOVE_TAB", - url, - tabIndex - }; -} - -/** - * @memberof actions/sources - * @static - */ -function closeTab(url) { - return (_ref16) => { - var dispatch = _ref16.dispatch, - getState = _ref16.getState, - client = _ref16.client; - - (0, _editor.removeDocument)(url); - var tabs = (0, _selectors.removeSourceFromTabList)((0, _selectors.getSourceTabs)(getState()), url); - var sourceId = (0, _selectors.getNewSelectedSourceId)(getState(), tabs); - - dispatch({ type: "CLOSE_TAB", url, tabs }); - dispatch(selectSource(sourceId)); - }; -} - -/** - * @memberof actions/sources - * @static - */ -function closeTabs(urls) { - return (_ref17) => { - var dispatch = _ref17.dispatch, - getState = _ref17.getState, - client = _ref17.client; - - urls.forEach(url => { - var source = (0, _selectors.getSourceByURL)(getState(), url); - if (source) { - (0, _editor.removeDocument)(source.get("id")); - } - }); - - var tabs = (0, _selectors.removeSourcesFromTabList)((0, _selectors.getSourceTabs)(getState()), urls); - var sourceId = (0, _selectors.getNewSelectedSourceId)(getState(), tabs); - - dispatch({ type: "CLOSE_TABS", urls, tabs }); - dispatch(selectSource(sourceId)); - }; -} - -/** - * Toggle the pretty printing of a source's text. All subsequent calls to - * |getText| will return the pretty-toggled text. Nothing will happen for - * non-javascript files. - * - * @memberof actions/sources - * @static - * @param string id The source form from the RDP. - * @returns Promise - * A promise that resolves to [aSource, prettyText] or rejects to - * [aSource, error]. - */ -function togglePrettyPrint(sourceId) { - return (() => { - var _ref18 = _asyncToGenerator(function* (_ref19) { - var dispatch = _ref19.dispatch, - getState = _ref19.getState, - client = _ref19.client, - sourceMaps = _ref19.sourceMaps; - - var source = (0, _selectors.getSource)(getState(), sourceId).toJS(); - - if (!source || !(0, _source2.isLoaded)(source)) { - return {}; - } - - (0, _assert2.default)(sourceMaps.isGeneratedId(sourceId), "Pretty-printing only allowed on generated sources"); - - var selectedLocation = (0, _selectors.getSelectedLocation)(getState()); - var selectedOriginalLocation = selectedLocation ? yield sourceMaps.getOriginalLocation(selectedLocation) : {}; - - var url = (0, _source2.getPrettySourceURL)(source.url); - var prettySource = (0, _selectors.getSourceByURL)(getState(), url); - - if (prettySource) { - return dispatch(selectSource(prettySource.get("id"), { - line: selectedOriginalLocation.line - })); - } - - var _ref20 = yield dispatch((0, _createPrettySource.createPrettySource)(sourceId)), - newPrettySource = _ref20.source; - - yield dispatch((0, _breakpoints.remapBreakpoints)(sourceId)); - yield dispatch((0, _ast.setEmptyLines)(newPrettySource.id)); - - return dispatch(selectSource(newPrettySource.id, { - line: selectedOriginalLocation.line - })); - }); - - return function (_x15) { - return _ref18.apply(this, arguments); - }; - })(); -} - -function toggleBlackBox(source) { - return (() => { - var _ref21 = _asyncToGenerator(function* (_ref22) { - var dispatch = _ref22.dispatch, - getState = _ref22.getState, - client = _ref22.client, - sourceMaps = _ref22.sourceMaps; - var isBlackBoxed = source.isBlackBoxed, - id = source.id; - - - return dispatch({ - type: "BLACKBOX", - source, - [_promise.PROMISE]: client.blackBox(id, isBlackBoxed) - }); - }); - - return function (_x16) { - return _ref21.apply(this, arguments); - }; - })(); -} - -/** - Load the text for all the available sources - * @memberof actions/sources - * @static - */ -function loadAllSources() { - return (() => { - var _ref23 = _asyncToGenerator(function* (_ref24) { - var dispatch = _ref24.dispatch, - getState = _ref24.getState; - - var sources = (0, _selectors.getSources)(getState()); - var query = (0, _selectors.getTextSearchQuery)(getState()); - for (var _ref25 of sources) { - var _ref26 = _slicedToArray(_ref25, 2); - - var src = _ref26[1]; - - var source = src.toJS(); - if ((0, _source2.isThirdParty)(source)) { - continue; - } - - yield dispatch((0, _loadSourceText.loadSourceText)(source)); - // If there is a current search query we search - // each of the source texts as they get loaded - if (query) { - yield dispatch((0, _projectTextSearch.searchSource)(source.id, query)); - } - } - }); - - return function (_x17) { - return _ref23.apply(this, arguments); - }; - })(); -} - -/** - * Ensures parser has source text - * - * @memberof actions/sources - * @static - */ -function ensureParserHasSourceText(sourceId) { - return (() => { - var _ref27 = _asyncToGenerator(function* (_ref28) { - var dispatch = _ref28.dispatch, - getState = _ref28.getState; - - if (!(yield parser.hasSource(sourceId))) { - yield dispatch((0, _loadSourceText.loadSourceText)((0, _selectors.getSource)(getState(), sourceId).toJS())); - yield parser.setSource((0, _selectors.getSource)(getState(), sourceId).toJS()); - } - }); - - return function (_x18) { - return _ref27.apply(this, arguments); - }; - })(); -} - -/***/ }), -/* 255 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.getPausedPosition = exports.updateScopeBindings = undefined; - -var updateScopeBindings = exports.updateScopeBindings = (() => { - var _ref = _asyncToGenerator(function* (scope, location, sourceMaps) { - var astScopes = yield (0, _parser.getScopes)(location); - var generatedScopes = yield sourceMaps.getLocationScopes(location, astScopes); - if (!generatedScopes) { - return scope; - } - return extendScope(scope, generatedScopes, 0); - }); - - return function updateScopeBindings(_x, _x2, _x3) { - return _ref.apply(this, arguments); - }; -})(); - -// Map protocol pause "why" reason to a valid L10N key -// These are the known unhandled reasons: -// "breakpointConditionThrown", "clientEvaluated" -// "interrupted", "attached" - - -var getPausedPosition = exports.getPausedPosition = (() => { - var _ref2 = _asyncToGenerator(function* (pauseInfo, sourceMaps) { - var frames = pauseInfo.frames; - - frames = yield updateFrameLocations(frames, sourceMaps); - var frame = frames[0]; - var location = frame.location; - - return location; - }); - - return function getPausedPosition(_x4, _x5) { - return _ref2.apply(this, arguments); - }; -})(); - -exports.updateFrameLocations = updateFrameLocations; -exports.getPauseReason = getPauseReason; - -var _lodash = __webpack_require__(2); - -var _parser = __webpack_require__(1208); - -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 updateFrameLocations(frames, sourceMaps) { - if (!frames || frames.length == 0) { - return Promise.resolve(frames); - } - - return Promise.all(frames.map(frame => { - return sourceMaps.getOriginalLocation(frame.location).then(loc => { - return Object.assign({}, frame, { - location: loc, - generatedLocation: frame.location - }); - }); - })); -} - -function extendScope(scope, generatedScopes, index) { - if (!scope) { - return undefined; - } - if (index >= generatedScopes.length) { - return scope; - } - return Object.assign({}, scope, { - parent: extendScope(scope.parent, generatedScopes, index + 1), - sourceBindings: generatedScopes[index].bindings - }); -} - -var reasons = { - debuggerStatement: "whyPaused.debuggerStatement", - breakpoint: "whyPaused.breakpoint", - exception: "whyPaused.exception", - resumeLimit: "whyPaused.resumeLimit", - pauseOnDOMEvents: "whyPaused.pauseOnDOMEvents", - breakpointConditionThrown: "whyPaused.breakpointConditionThrown", - - // V8 - DOM: "whyPaused.breakpoint", - EventListener: "whyPaused.pauseOnDOMEvents", - XHR: "whyPaused.xhr", - promiseRejection: "whyPaused.promiseRejection", - assert: "whyPaused.assert", - debugCommand: "whyPaused.debugCommand", - other: "whyPaused.other" -}; - -function getPauseReason(pauseInfo) { - if (!pauseInfo) { - return null; - } - - var reasonType = (0, _lodash.get)(pauseInfo, "why.type", null); - if (!reasons[reasonType]) { - console.log("Please file an issue: reasonType=", reasonType); - } - return reasons[reasonType]; -} - -/***/ }), +/* 252 */, +/* 253 */, +/* 254 */, +/* 255 */, /* 256 */ /***/ (function(module, exports) { module.exports = "" /***/ }), -/* 257 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var _devtoolsConfig = __webpack_require__(828); - -var _sourceDocuments = __webpack_require__(260); - -var sourceDocumentUtils = _interopRequireWildcard(_sourceDocuments); - -var _source = __webpack_require__(233); - -var _expression = __webpack_require__(904); - -var expressionUtils = _interopRequireWildcard(_expression); - -var _sourceSearch = __webpack_require__(261); - -var sourceSearchUtils = _interopRequireWildcard(_sourceSearch); - -var _wasm = __webpack_require__(23); - -var _devtoolsSourceEditor = __webpack_require__(994); - -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; } } - -var findNext = sourceSearchUtils.findNext, - findPrev = sourceSearchUtils.findPrev; - - -function shouldShowPrettyPrint(selectedSource) { - if (!selectedSource) { - return false; - } - - selectedSource = selectedSource.toJS(); - return (0, _source.shouldPrettyPrint)(selectedSource); -} - -function shouldShowFooter(selectedSource, horizontal) { - if (!horizontal) { - return true; - } - - return shouldShowPrettyPrint(selectedSource); -} - -function traverseResults(e, ctx, query, dir, modifiers) { - e.stopPropagation(); - e.preventDefault(); - - if (dir == "prev") { - findPrev(ctx, query, true, modifiers); - } else if (dir == "next") { - findNext(ctx, query, true, modifiers); - } -} - -function createEditor() { - var gutters = ["breakpoints", "hit-markers", "CodeMirror-linenumbers"]; - - if ((0, _devtoolsConfig.isEnabled)("codeFolding")) { - gutters.push("CodeMirror-foldgutter"); - } - - return new _devtoolsSourceEditor.SourceEditor({ - mode: "javascript", - foldGutter: (0, _devtoolsConfig.isEnabled)("codeFolding"), - enableCodeFolding: (0, _devtoolsConfig.isEnabled)("codeFolding"), - readOnly: true, - lineNumbers: true, - theme: "mozilla", - styleActiveLine: false, - lineWrapping: false, - matchBrackets: true, - showAnnotationRuler: true, - gutters, - value: " ", - extraKeys: { - // Override code mirror keymap to avoid conflicts with split console. - Esc: false, - "Cmd-F": false, - "Cmd-G": false - } - }); -} - -function toEditorLine(sourceId, lineOrOffset) { - return (0, _wasm.isWasm)(sourceId) ? (0, _wasm.wasmOffsetToLine)(sourceId, lineOrOffset) : lineOrOffset - 1; -} - -function toEditorPosition(sourceId, location) { - return { - line: toEditorLine(sourceId, location.line), - column: (0, _wasm.isWasm)(sourceId) ? 0 : location.column - }; -} - -function toEditorRange(sourceId, location) { - var start = location.start, - end = location.end; - - return { - start: toEditorPosition(sourceId, start), - end: toEditorPosition(sourceId, end) - }; -} - -function toSourceLine(sourceId, line) { - return (0, _wasm.isWasm)(sourceId) ? (0, _wasm.lineToWasmOffset)(sourceId, line) : line + 1; -} - -function toSourceLocation(sourceId, location) { - return { - line: toSourceLine(sourceId, location.line), - column: (0, _wasm.isWasm)(sourceId) ? undefined : location.column - }; -} - -function markText(editor, className, location) { - var start = location.start, - end = location.end; - - - return editor.codeMirror.markText({ ch: start.column, line: start.line }, { ch: end.column, line: end.line }, { className }); -} - -function lineAtHeight(editor, sourceId, event) { - var editorLine = editor.codeMirror.lineAtHeight(event.clientY); - return toSourceLine(sourceId, editorLine); -} - -function getSourceLocationFromMouseEvent(editor, selectedLocation, e) { - var _editor$codeMirror$co = editor.codeMirror.coordsChar({ - left: e.clientX, - top: e.clientY - }), - line = _editor$codeMirror$co.line, - ch = _editor$codeMirror$co.ch; - - return { - sourceId: selectedLocation.sourceId, - line: line + 1, - column: ch + 1 - }; -} - -module.exports = Object.assign({}, expressionUtils, sourceDocumentUtils, sourceSearchUtils, _devtoolsSourceEditor.SourceEditorUtils, { - createEditor, - isWasm: _wasm.isWasm, - toEditorLine, - toEditorPosition, - toEditorRange, - toSourceLine, - toSourceLocation, - shouldShowPrettyPrint, - shouldShowFooter, - traverseResults, - markText, - lineAtHeight, - getSourceLocationFromMouseEvent -}); - -/***/ }), +/* 257 */, /* 258 */ /***/ (function(module, exports) { @@ -18604,427 +10693,8 @@ module.exports = escapeRegExp; /***/ }), -/* 260 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -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; - -var _source = __webpack_require__(233); - -var _wasm = __webpack_require__(23); - -var _devtoolsSourceEditor = __webpack_require__(994); - -var resizeBreakpointGutter = _devtoolsSourceEditor.SourceEditorUtils.resizeBreakpointGutter; - - -var sourceDocs = {}; - -function getDocument(key) { - return sourceDocs[key]; -} - -function setDocument(key, doc) { - sourceDocs[key] = doc; -} - -function removeDocument(key) { - delete sourceDocs[key]; -} - -function clearDocuments() { - sourceDocs = {}; -} - -function resetLineNumberFormat(editor) { - var cm = editor.codeMirror; - cm.setOption("lineNumberFormatter", number => number); - resizeBreakpointGutter(cm); -} - -function updateLineNumberFormat(editor, sourceId) { - if (!(0, _wasm.isWasm)(sourceId)) { - return resetLineNumberFormat(editor); - } - var cm = editor.codeMirror; - var lineNumberFormatter = (0, _wasm.getWasmLineNumberFormatter)(sourceId); - cm.setOption("lineNumberFormatter", lineNumberFormatter); - resizeBreakpointGutter(cm); -} - -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; - - if (source.isWasm) { - var wasmLines = (0, _wasm.renderWasmText)(sourceId, text); - // cm will try to split into lines anyway, saving memory - var wasmText = { split: () => wasmLines, match: () => false }; - editor.setText(wasmText); - } else { - editor.setText(text); - } -} - -/** - * Handle getting the source document or creating a new - * document with the correct mode and text. - */ -function showSourceText(editor, source) { - if (!source) { - return; - } - - var doc = getDocument(source.id); - if (editor.codeMirror.doc === doc) { - return; - } - - if (doc) { - editor.replaceDocument(doc); - updateLineNumberFormat(editor, source.id); - return doc; - } - - doc = editor.createDocument(); - setDocument(source.id, doc); - editor.replaceDocument(doc); - - setEditorText(editor, source); - editor.setMode((0, _source.getMode)(source)); - updateLineNumberFormat(editor, source.id); -} - -exports.getDocument = getDocument; -exports.setDocument = setDocument; -exports.removeDocument = removeDocument; -exports.clearDocuments = clearDocuments; -exports.resetLineNumberFormat = resetLineNumberFormat; -exports.updateLineNumberFormat = updateLineNumberFormat; -exports.updateDocument = updateDocument; -exports.showSourceText = showSourceText; -exports.showLoading = showLoading; - -/***/ }), -/* 261 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.getMatchIndex = exports.removeOverlay = exports.findPrev = exports.findNext = exports.find = exports.buildQuery = undefined; - -var _buildQuery = __webpack_require__(1211); - -var _buildQuery2 = _interopRequireDefault(_buildQuery); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * @memberof utils/source-search - * @static - */ -function getSearchCursor(cm, query, pos, modifiers) { - var regexQuery = (0, _buildQuery2.default)(query, modifiers, { isGlobal: true }); - return cm.getSearchCursor(regexQuery, pos); -} - -/** - * @memberof utils/source-search - * @static - */ - - -function SearchState() { - this.posFrom = this.posTo = this.query = null; - this.overlay = null; - this.results = []; -} - -/** - * @memberof utils/source-search - * @static - */ -function getSearchState(cm, query, modifiers) { - var state = cm.state.search || (cm.state.search = new SearchState()); - return state; -} - -function isWhitespace(query) { - return !query.match(/\S/); -} - -/** - * This returns a mode object used by CoeMirror's addOverlay function - * to parse and style tokens in the file. - * The mode object contains a tokenizer function (token) which takes - * a character stream as input, advances it a character at a time, - * and returns style(s) for that token. For more details see - * https://codemirror.net/doc/manual.html#modeapi - * - * Also the token function code is mainly based of work done - * by the chrome devtools team. Thanks guys! :) - * - * @memberof utils/source-search - * @static - */ -function searchOverlay(query, modifiers) { - var regexQuery = (0, _buildQuery2.default)(query, modifiers, { - ignoreSpaces: true, - // regex must be global for the overlay - isGlobal: true - }); - - return { - token: function (stream, state) { - // set the last index to be the current stream position - // this acts as an offset - regexQuery.lastIndex = stream.pos; - var match = regexQuery.exec(stream.string); - if (match && match.index === stream.pos) { - // if we have a match at the current stream position - // set the class for a match - stream.pos += match[0].length || 1; - return "highlight highlight-full"; - } else if (match) { - // if we have a match somewhere in the line, go to that point in the - // stream - stream.pos = match.index; - } else { - // if we have no matches in this line, skip to the end of the line - stream.skipToEnd(); - } - } - }; -} - -/** - * @memberof utils/source-search - * @static - */ -function updateOverlay(cm, state, query, modifiers) { - cm.removeOverlay(state.overlay); - state.overlay = searchOverlay(query, modifiers); - cm.addOverlay(state.overlay, { opaque: false }); -} - -function updateCursor(cm, state, keepSelection) { - state.posTo = cm.getCursor("anchor"); - state.posFrom = cm.getCursor("head"); - - if (!keepSelection) { - state.posTo = { line: 0, ch: 0 }; - state.posFrom = { line: 0, ch: 0 }; - } -} - -function getMatchIndex(count, currentIndex, rev) { - if (!rev) { - if (currentIndex == count - 1) { - return 0; - } - - return currentIndex + 1; - } - - if (currentIndex == 0) { - return count - 1; - } - - return currentIndex - 1; -} - -/** - * If there's a saved search, selects the next results. - * Otherwise, creates a new search and selects the first - * result. - * - * @memberof utils/source-search - * @static - */ -function doSearch(ctx, rev, query, keepSelection, modifiers) { - var cm = ctx.cm; - - if (!cm) { - return; - } - var defaultIndex = { line: -1, ch: -1 }; - - return cm.operation(function () { - if (!query || isWhitespace(query)) { - clearSearch(cm, query, modifiers); - return; - } - - var state = getSearchState(cm, query, modifiers); - var isNewQuery = state.query !== query; - state.query = query; - - updateOverlay(cm, state, query, modifiers); - updateCursor(cm, state, keepSelection); - var searchLocation = searchNext(ctx, rev, query, isNewQuery, modifiers); - - return searchLocation ? searchLocation.from : defaultIndex; - }); -} - -function getCursorPos(newQuery, rev, state) { - if (newQuery) { - return rev ? state.posFrom : state.posTo; - } - - return rev ? state.posTo : state.posFrom; -} - -/** - * Selects the next result of a saved search. - * - * @memberof utils/source-search - * @static - */ -function searchNext(ctx, rev, query, newQuery, modifiers) { - var cm = ctx.cm, - ed = ctx.ed; - - var nextMatch = void 0; - cm.operation(function () { - var state = getSearchState(cm, query, modifiers); - var pos = getCursorPos(newQuery, rev, state); - - if (!state.query) { - return; - } - - var cursor = getSearchCursor(cm, state.query, pos, modifiers); - - var location = rev ? { line: cm.lastLine(), ch: null } : { line: cm.firstLine(), ch: 0 }; - - if (!cursor.find(rev) && state.query) { - cursor = getSearchCursor(cm, state.query, location, modifiers); - if (!cursor.find(rev)) { - return; - } - } - - // We don't want to jump the editor - // when we're selecting text - if (!cm.state.selectingText) { - ed.alignLine(cursor.from().line, "center"); - cm.setSelection(cursor.from(), cursor.to()); - } - - nextMatch = { from: cursor.from(), to: cursor.to() }; - }); - - return nextMatch; -} - -/** - * Remove overlay. - * - * @memberof utils/source-search - * @static - */ -function removeOverlay(ctx, query, modifiers) { - var state = getSearchState(ctx.cm, query, modifiers); - ctx.cm.removeOverlay(state.overlay); - - var _ctx$cm$getCursor = ctx.cm.getCursor(), - line = _ctx$cm$getCursor.line, - ch = _ctx$cm$getCursor.ch; - - ctx.cm.doc.setSelection({ line, ch }, { line, ch }, { scroll: false }); -} - -/** - * Clears the currently saved search. - * - * @memberof utils/source-search - * @static - */ -function clearSearch(cm, query, modifiers) { - var state = getSearchState(cm, query, modifiers); - - state.results = []; - - if (!state.query) { - return; - } - cm.removeOverlay(state.overlay); - state.query = null; -} - -/** - * Starts a new search. - * - * @memberof utils/source-search - * @static - */ -function find(ctx, query, keepSelection, modifiers) { - clearSearch(ctx.cm, query, modifiers); - return doSearch(ctx, false, query, keepSelection, modifiers); -} - -/** - * Finds the next item based on the currently saved search. - * - * @memberof utils/source-search - * @static - */ -function findNext(ctx, query, keepSelection, modifiers) { - return doSearch(ctx, false, query, keepSelection, modifiers); -} - -/** - * Finds the previous item based on the currently saved search. - * - * @memberof utils/source-search - * @static - */ -function findPrev(ctx, query, keepSelection, modifiers) { - return doSearch(ctx, true, query, keepSelection, modifiers); -} - -exports.buildQuery = _buildQuery2.default; -exports.find = find; -exports.findNext = findNext; -exports.findPrev = findPrev; -exports.removeOverlay = removeOverlay; -exports.getMatchIndex = getMatchIndex; - -/***/ }), +/* 260 */, +/* 261 */, /* 262 */, /* 263 */, /* 264 */, @@ -19036,131 +10706,9 @@ exports.getMatchIndex = getMatchIndex; /* 270 */, /* 271 */, /* 272 */, -/* 273 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.formatTree = formatTree; -function formatTree(tree) { - var depth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; - var str = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ""; - - var whitespace = new Array(depth * 2).join(" "); - - if (Array.isArray(tree.contents)) { - str += `${whitespace} - ${tree.name} path=${tree.path} \n`; - tree.contents.forEach(t => { - str = formatTree(t, depth + 1, str); - }); - } else { - var id = tree.contents.get("id"); - str += `${whitespace} - ${tree.name} path=${tree.path} source_id=${id} \n`; - } - - return str; -} - -/***/ }), -/* 274 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.getDirectories = getDirectories; - -var _utils = __webpack_require__(18); - -var _getURL = __webpack_require__(24); - -function findSource(sourceTree, sourceUrl) { - var returnTarget = null; - function _traverse(subtree) { - if ((0, _utils.nodeHasChildren)(subtree)) { - for (var child of subtree.contents) { - _traverse(child); - } - } else if (!returnTarget) { - if (subtree.path.replace(/http(s)?:\//, "") == sourceUrl) { - returnTarget = subtree; - return; - } - } - } - - sourceTree.contents.forEach(_traverse); - - if (!returnTarget) { - return sourceTree; - } - - return returnTarget; -} - -function getDirectories(sourceUrl, sourceTree) { - var url = (0, _getURL.getURL)(sourceUrl); - var fullUrl = `/${url.group}${url.path}`; - var parentMap = (0, _utils.createParentMap)(sourceTree); - var source = findSource(sourceTree, fullUrl); - if (!source) { - return []; - } - - var node = source; - var directories = []; - directories.push(source); - while (true) { - node = parentMap.get(node); - if (!node) { - return directories; - } - directories.push(node); - } -} - -/***/ }), -/* 275 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.createTree = createTree; - -var _utils = __webpack_require__(18); - -var _collapseTree = __webpack_require__(41); - -var _addToTree = __webpack_require__(40); - -function createTree(sources, debuggeeUrl) { - var uncollapsedTree = (0, _utils.createNode)("root", "", []); - for (var source of sources.valueSeq()) { - (0, _addToTree.addToTree)(uncollapsedTree, source, debuggeeUrl); - } - - var sourceTree = (0, _collapseTree.collapseTree)(uncollapsedTree); - - return { - uncollapsedTree, - sourceTree, - parentMap: (0, _utils.createParentMap)(sourceTree), - focusedItem: null - }; -} - -/***/ }), +/* 273 */, +/* 274 */, +/* 275 */, /* 276 */, /* 277 */, /* 278 */, @@ -19169,67 +10717,7 @@ function createTree(sources, debuggeeUrl) { /* 281 */, /* 282 */, /* 283 */, -/* 284 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _propTypes = __webpack_require__(20); - -var _propTypes2 = _interopRequireDefault(_propTypes); - -var _react = __webpack_require__(0); - -var _react2 = _interopRequireDefault(_react); - -var _classnames = __webpack_require__(175); - -var _classnames2 = _interopRequireDefault(_classnames); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -class ToggleSearch extends _react.Component { - render() { - var _props = this.props, - kind = _props.kind, - toggle = _props.toggle; - - var isSourcesActive = kind === "sources"; - return _react2.default.createElement( - "div", - { className: "toggle-search" }, - _react2.default.createElement( - "span", - { - className: (0, _classnames2.default)("text", { active: isSourcesActive }), - onClick: toggle - }, - L10N.getStr("sourceSearch.search") - ), - _react2.default.createElement( - "span", - { - className: (0, _classnames2.default)("text", { active: !isSourcesActive }), - onClick: toggle - }, - L10N.getStr("projectTextSearch.placeholder") - ) - ); - } -} - -exports.default = ToggleSearch; -ToggleSearch.propTypes = { - kind: _propTypes2.default.string.isRequired, - toggle: _propTypes2.default.func.isRequired -}; - -/***/ }), +/* 284 */, /* 285 */, /* 286 */, /* 287 */, @@ -19294,81 +10782,7 @@ module.exports = hasPath; /* 302 */, /* 303 */, /* 304 */, -/* 305 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -/* This Source Code Form is subject to the terms of the Mozilla Public - * 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/. */ - -// Dependencies -var React = __webpack_require__(0); - -var _require = __webpack_require__(927), - wrapRender = _require.wrapRender; - -var _require2 = __webpack_require__(925), - MODE = _require2.MODE; -// Shortcuts - - -var span = React.DOM.span; -/** - * Renders an object. An object is represented by a list of its - * properties enclosed in curly brackets. - */ - -Accessor.propTypes = { - object: React.PropTypes.object.isRequired, - mode: React.PropTypes.oneOf(Object.values(MODE)) -}; - -function Accessor(props) { - var object = props.object; - - - var accessors = []; - if (hasGetter(object)) { - accessors.push("Getter"); - } - if (hasSetter(object)) { - accessors.push("Setter"); - } - var title = accessors.join(" & "); - - return span({ className: "objectBox objectBox-accessor" }, span({ - className: "objectTitle" - }, title)); -} - -function hasGetter(object) { - return object && object.get && object.get.type !== "undefined"; -} - -function hasSetter(object) { - return object && object.set && object.set.type !== "undefined"; -} - -function supportsObject(object) { - var noGrip = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; - - if (noGrip !== true && (hasGetter(object) || hasSetter(object))) { - return true; - } - - return false; -} - -// Exports from this module -module.exports = { - rep: wrapRender(Accessor), - supportsObject -}; - -/***/ }), +/* 305 */, /* 306 */, /* 307 */ /***/ (function(module, exports, __webpack_require__) { @@ -19440,839 +10854,16 @@ module.exports = baseHas; /* 310 */, /* 311 */, /* 312 */, -/* 313 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.DebugLine = undefined; - -var _react = __webpack_require__(0); - -var _editor = __webpack_require__(257); - -var _sourceDocuments = __webpack_require__(260); - -var _reactRedux = __webpack_require__(1189); - -var _selectors = __webpack_require__(242); - -class DebugLine extends _react.Component { - - constructor() { - super(); - this.state = { debugExpression: { clear: () => {} } }; - } - - componentDidMount() { - this.setDebugLine(this.props.selectedFrame, this.props.selectedLocation, this.props.editor); - } - - componentWillReceiveProps(nextProps) { - this.clearDebugLine(this.props.selectedFrame, this.props.editor); - this.setDebugLine(nextProps.selectedFrame, nextProps.selectedLocation, nextProps.editor); - } - - componentWillUnmount() { - this.clearDebugLine(this.props.selectedFrame, this.props.editor); - } - - setDebugLine(selectedFrame, selectedLocation, editor) { - if (!selectedFrame) { - return; - } - var location = selectedFrame.location, - sourceId = selectedFrame.location.sourceId; - - var _toEditorPosition = (0, _editor.toEditorPosition)(sourceId, location), - line = _toEditorPosition.line, - column = _toEditorPosition.column; - - var doc = (0, _sourceDocuments.getDocument)(sourceId); - if (!doc) { - return; - } - - doc.addLineClass(line, "line", "new-debug-line"); - var debugExpression = (0, _editor.markText)(editor, "debug-expression", { - start: { line, column }, - end: { line, column: null } - }); - this.setState({ debugExpression }); - } - - clearDebugLine(selectedFrame, editor) { - if (!selectedFrame) { - return; - } - var _selectedFrame$locati = selectedFrame.location, - line = _selectedFrame$locati.line, - sourceId = _selectedFrame$locati.sourceId; - var debugExpression = this.state.debugExpression; - - if (debugExpression) { - debugExpression.clear(); - } - - var editorLine = line - 1; - var doc = (0, _sourceDocuments.getDocument)(sourceId); - if (!doc) { - return; - } - - doc.removeLineClass(editorLine, "line", "new-debug-line"); - } - - render() { - return null; - } -} - -exports.DebugLine = DebugLine; -exports.default = (0, _reactRedux.connect)(state => ({ - selectedLocation: (0, _selectors.getSelectedLocation)(state), - selectedFrame: (0, _selectors.getSelectedFrame)(state) -}))(DebugLine); - -/***/ }), +/* 313 */, /* 314 */, /* 315 */, /* 316 */, /* 317 */, /* 318 */, -/* 319 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _getScopeBindings = (() => { - var _ref = _asyncToGenerator(function* (_ref2, generatedLocation, scopes) { - var dispatch = _ref2.dispatch, - getState = _ref2.getState, - 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); - }); - - return function _getScopeBindings(_x, _x2, _x3) { - return _ref.apply(this, arguments); - }; -})(); - -/** - * Redux actions for the pause state - * @module actions/pause - */ - -/** - * Debugger has just resumed - * - * @memberof actions/pause - * @static - */ - - -exports.resumed = resumed; -exports.continueToHere = continueToHere; -exports.paused = paused; -exports.pauseOnExceptions = pauseOnExceptions; -exports.command = command; -exports.stepIn = stepIn; -exports.stepOver = stepOver; -exports.stepOut = stepOut; -exports.resume = resume; -exports.breakOnNext = breakOnNext; -exports.selectFrame = selectFrame; -exports.loadObjectProperties = loadObjectProperties; -exports.astCommand = astCommand; - -var _sources = __webpack_require__(254); - -var _promise = __webpack_require__(193); - -var _selectors = __webpack_require__(242); - -var _pause = __webpack_require__(255); - -var _expressions = __webpack_require__(252); - -var _breakpoints = __webpack_require__(245); - -var _breakpoints2 = __webpack_require__(236); - -var _parser = __webpack_require__(1208); - -var parser = _interopRequireWildcard(_parser); - -var _prefs = __webpack_require__(226); - -var _devtoolsSourceMap = __webpack_require__(898); - -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 _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 resumed() { - return (_ref3) => { - var dispatch = _ref3.dispatch, - client = _ref3.client, - getState = _ref3.getState; - - if (!(0, _selectors.isPaused)(getState())) { - return; - } - - var wasPausedInEval = (0, _selectors.pausedInEval)(getState()); - - dispatch({ - type: "RESUME", - value: undefined - }); - - if (!(0, _selectors.isStepping)(getState()) && !wasPausedInEval) { - dispatch((0, _expressions.evaluateExpressions)()); - } - }; -} - -function continueToHere(line) { - return (() => { - var _ref4 = _asyncToGenerator(function* (_ref5) { - var dispatch = _ref5.dispatch, - getState = _ref5.getState, - client = _ref5.client, - sourceMaps = _ref5.sourceMaps; - - var source = (0, _selectors.getSelectedSource)(getState()).toJS(); - - yield dispatch((0, _breakpoints.addHiddenBreakpoint)({ - line, - column: undefined, - sourceId: source.id - })); - - dispatch(command("resume")); - }); - - return function (_x4) { - return _ref4.apply(this, arguments); - }; - })(); -} - -/** - * Debugger has just paused - * - * @param {object} pauseInfo - * @memberof actions/pause - * @static - */ -function paused(pauseInfo) { - return (() => { - var _ref6 = _asyncToGenerator(function* (_ref7) { - var dispatch = _ref7.dispatch, - getState = _ref7.getState, - client = _ref7.client, - sourceMaps = _ref7.sourceMaps; - var frames = pauseInfo.frames, - why = pauseInfo.why, - loadedObjects = pauseInfo.loadedObjects; - - - frames = yield (0, _pause.updateFrameLocations)(frames, sourceMaps); - var frame = frames[0]; - - var frameScopes = yield client.getFrameScopes(frame); - var scopes = !(0, _devtoolsSourceMap.isGeneratedId)(frame.location.sourceId) ? yield _getScopeBindings({ dispatch, getState, sourceMaps }, frame.generatedLocation, frameScopes) : frameScopes; - - dispatch({ - type: "PAUSED", - pauseInfo: { why, frame, frames }, - frames: frames, - scopes, - selectedFrameId: frame.id, - loadedObjects: loadedObjects || [] - }); - - var hiddenBreakpointLocation = (0, _breakpoints2.getHiddenBreakpointLocation)(getState()); - if (hiddenBreakpointLocation) { - dispatch((0, _breakpoints.removeBreakpoint)(hiddenBreakpointLocation)); - } - - if (!(0, _selectors.isEvaluatingExpression)(getState())) { - dispatch((0, _expressions.evaluateExpressions)()); - } - - dispatch((0, _sources.selectSource)(frame.location.sourceId, { line: frame.location.line })); - }); - - return function (_x5) { - return _ref6.apply(this, arguments); - }; - })(); -} - -/** - * - * @memberof actions/pause - * @static - */ -function pauseOnExceptions(shouldPauseOnExceptions, shouldIgnoreCaughtExceptions) { - return (_ref8) => { - var dispatch = _ref8.dispatch, - client = _ref8.client; - - dispatch({ - type: "PAUSE_ON_EXCEPTIONS", - shouldPauseOnExceptions, - shouldIgnoreCaughtExceptions, - [_promise.PROMISE]: client.pauseOnExceptions(shouldPauseOnExceptions, shouldIgnoreCaughtExceptions) - }); - }; -} - -/** - * Debugger commands like stepOver, stepIn, stepUp - * - * @param string $0.type - * @memberof actions/pause - * @static - */ -function command(type) { - return (() => { - var _ref9 = _asyncToGenerator(function* (_ref10) { - var dispatch = _ref10.dispatch, - client = _ref10.client; - - // execute debugger thread command e.g. stepIn, stepOver - dispatch({ type: "COMMAND", value: { type } }); - - yield client[type](); - - dispatch({ type: "CLEAR_COMMAND" }); - }); - - return function (_x6) { - return _ref9.apply(this, arguments); - }; - })(); -} - -/** - * StepIn - * @memberof actions/pause - * @static - * @returns {Function} {@link command} - */ -function stepIn() { - return (_ref11) => { - var dispatch = _ref11.dispatch, - getState = _ref11.getState; - - if ((0, _selectors.getPause)(getState())) { - return dispatch(command("stepIn")); - } - }; -} - -/** - * stepOver - * @memberof actions/pause - * @static - * @returns {Function} {@link command} - */ -function stepOver() { - return (_ref12) => { - var dispatch = _ref12.dispatch, - getState = _ref12.getState; - - if ((0, _selectors.getPause)(getState())) { - return dispatch(astCommand("stepOver")); - } - }; -} - -/** - * stepOut - * @memberof actions/pause - * @static - * @returns {Function} {@link command} - */ -function stepOut() { - return (_ref13) => { - var dispatch = _ref13.dispatch, - getState = _ref13.getState; - - if ((0, _selectors.getPause)(getState())) { - return dispatch(command("stepOut")); - } - }; -} - -/** - * resume - * @memberof actions/pause - * @static - * @returns {Function} {@link command} - */ -function resume() { - return (_ref14) => { - var dispatch = _ref14.dispatch, - getState = _ref14.getState; - - if ((0, _selectors.getPause)(getState())) { - return dispatch(command("resume")); - } - }; -} - -/** - * Debugger breakOnNext command. - * It's different from the comand action because we also want to - * highlight the pause icon. - * - * @memberof actions/pause - * @static - */ -function breakOnNext() { - return (_ref15) => { - var dispatch = _ref15.dispatch, - client = _ref15.client; - - client.breakOnNext(); - - return dispatch({ - type: "BREAK_ON_NEXT", - value: true - }); - }; -} - -/** - * @memberof actions/pause - * @static - */ -function selectFrame(frame) { - return (() => { - var _ref16 = _asyncToGenerator(function* (_ref17) { - var dispatch = _ref17.dispatch, - client = _ref17.client, - getState = _ref17.getState, - sourceMaps = _ref17.sourceMaps; - - var frameScopes = yield client.getFrameScopes(frame); - var scopes = !(0, _devtoolsSourceMap.isGeneratedId)(frame.location.sourceId) ? yield _getScopeBindings({ dispatch, getState, sourceMaps }, frame.generatedLocation, frameScopes) : frameScopes; - - dispatch({ - type: "SELECT_FRAME", - frame, - scopes - }); - - dispatch((0, _sources.selectSource)(frame.location.sourceId, { line: frame.location.line })); - - dispatch((0, _expressions.evaluateExpressions)()); - }); - - return function (_x7) { - return _ref16.apply(this, arguments); - }; - })(); -} - -/** - * @memberof actions/pause - * @static - */ -function loadObjectProperties(object) { - return (_ref18) => { - var dispatch = _ref18.dispatch, - client = _ref18.client, - getState = _ref18.getState; - - var objectId = object.actor || object.objectId; - - if ((0, _selectors.getLoadedObject)(getState(), objectId)) { - return; - } - - dispatch({ - type: "LOAD_OBJECT_PROPERTIES", - objectId, - [_promise.PROMISE]: client.getProperties(object) - }); - }; -} - -/** - * @memberOf actions/pause - * @static - * @param stepType - * @returns {function(ThunkArgs)} - */ -function astCommand(stepType) { - return (() => { - var _ref19 = _asyncToGenerator(function* (_ref20) { - var dispatch = _ref20.dispatch, - getState = _ref20.getState, - sourceMaps = _ref20.sourceMaps; - - if (!_prefs.features.asyncStepping) { - return dispatch(command(stepType)); - } - - var pauseInfo = (0, _selectors.getPause)(getState()); - var source = (0, _selectors.getSelectedSource)(getState()).toJS(); - - var pausedPosition = yield (0, _pause.getPausedPosition)(pauseInfo, sourceMaps); - - if (stepType == "stepOver") { - var nextLocation = yield parser.getNextStep(source, pausedPosition); - if (nextLocation) { - yield dispatch((0, _breakpoints.addHiddenBreakpoint)(nextLocation)); - return dispatch(command("resume")); - } - } - - return dispatch(command(stepType)); - }); - - return function (_x8) { - return _ref19.apply(this, arguments); - }; - })(); -} - -/***/ }), -/* 320 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.willNavigate = willNavigate; -exports.navigate = navigate; -exports.connect = connect; -exports.navigated = navigated; - -var _editor = __webpack_require__(257); - -var _sources = __webpack_require__(232); - -var _utils = __webpack_require__(234); - -var _sources2 = __webpack_require__(254); - -var _parser = __webpack_require__(1208); - -var _wasm = __webpack_require__(23); - -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"); }); }; } - -/** - * Redux actions for the navigation state - * @module actions/navigation - */ - -/** - * @memberof actions/navigation - * @static - */ -function willNavigate(_, event) { - return (() => { - var _ref = _asyncToGenerator(function* (_ref2) { - var dispatch = _ref2.dispatch, - getState = _ref2.getState, - client = _ref2.client, - sourceMaps = _ref2.sourceMaps; - - yield sourceMaps.clearSourceMaps(); - (0, _wasm.clearWasmStates)(); - (0, _editor.clearDocuments)(); - (0, _parser.clearSymbols)(); - (0, _parser.clearASTs)(); - (0, _parser.clearScopes)(); - (0, _parser.clearSources)(); - - dispatch(navigate(event.url)); - }); - - return function (_x) { - return _ref.apply(this, arguments); - }; - })(); -} - -function navigate(url) { - return { - type: "NAVIGATE", - url - }; -} - -function connect(url) { - return { - type: "CONNECT", - url - }; -} - -/** - * @memberof actions/navigation - * @static - */ -function navigated() { - return (() => { - var _ref3 = _asyncToGenerator(function* (_ref4) { - var dispatch = _ref4.dispatch, - getState = _ref4.getState, - client = _ref4.client; - - yield (0, _utils.waitForMs)(100); - if ((0, _sources.getSources)(getState()).size == 0) { - var sources = yield client.fetchSources(); - dispatch((0, _sources2.newSources)(sources)); - } - }); - - return function (_x2) { - return _ref3.apply(this, arguments); - }; - })(); -} - -/***/ }), -/* 321 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.setContextMenu = setContextMenu; -exports.closeActiveSearch = closeActiveSearch; -exports.setActiveSearch = setActiveSearch; -exports.toggleFrameworkGrouping = toggleFrameworkGrouping; -exports.setSelectedSymbolType = setSelectedSymbolType; -exports.setFileSearchQuery = setFileSearchQuery; -exports.updateSearchResults = updateSearchResults; -exports.toggleFileSearchModifier = toggleFileSearchModifier; -exports.showSource = showSource; -exports.togglePaneCollapse = togglePaneCollapse; -exports.highlightLineRange = highlightLineRange; -exports.clearHighlightLineRange = clearHighlightLineRange; -exports.openConditionalPanel = openConditionalPanel; -exports.closeConditionalPanel = closeConditionalPanel; - -var _selectors = __webpack_require__(242); - -var _sourceSearch = __webpack_require__(1144); - -function setContextMenu(type, event) { - return (_ref) => { - var dispatch = _ref.dispatch; - - dispatch({ type: "SET_CONTEXT_MENU", contextMenu: { type, event } }); - }; -} - -function closeActiveSearch() { - return (_ref2) => { - var getState = _ref2.getState, - dispatch = _ref2.dispatch; - - var activeSearch = (0, _selectors.getActiveSearch)(getState()); - - if (activeSearch == "source") { - dispatch((0, _sourceSearch.clearSourceSearchQuery)()); - } - - dispatch({ - type: "TOGGLE_ACTIVE_SEARCH", - value: null - }); - }; -} - -function setActiveSearch(activeSearch) { - return (_ref3) => { - var dispatch = _ref3.dispatch, - getState = _ref3.getState; - - var activeSearchState = (0, _selectors.getActiveSearch)(getState()); - if (activeSearchState === activeSearch) { - return; - } - - dispatch({ - type: "TOGGLE_ACTIVE_SEARCH", - value: activeSearch - }); - }; -} - -function toggleFrameworkGrouping(toggleValue) { - return (_ref4) => { - var dispatch = _ref4.dispatch, - getState = _ref4.getState; - - dispatch({ - type: "TOGGLE_FRAMEWORK_GROUPING", - value: toggleValue - }); - }; -} - -function setSelectedSymbolType(symbolType) { - return (_ref5) => { - var dispatch = _ref5.dispatch, - getState = _ref5.getState; - - dispatch({ - type: "SET_SYMBOL_SEARCH_TYPE", - symbolType - }); - }; -} - -function setFileSearchQuery(query) { - return { - type: "UPDATE_FILE_SEARCH_QUERY", - query - }; -} - -function updateSearchResults(results) { - return { - type: "UPDATE_SEARCH_RESULTS", - results - }; -} - -function toggleFileSearchModifier(modifier) { - return { type: "TOGGLE_FILE_SEARCH_MODIFIER", modifier }; -} - -function showSource(sourceId) { - return (_ref6) => { - var dispatch = _ref6.dispatch, - getState = _ref6.getState; - - var source = (0, _selectors.getSource)(getState(), sourceId); - - dispatch({ - type: "SHOW_SOURCE", - sourceUrl: "" - }); - - dispatch({ - type: "SHOW_SOURCE", - sourceUrl: source.get("url") - }); - }; -} - -function togglePaneCollapse(position, paneCollapsed) { - return { - type: "TOGGLE_PANE", - position, - paneCollapsed - }; -} - -/** - * @memberof actions/sources - * @static - */ -function highlightLineRange(location) { - return { - type: "HIGHLIGHT_LINES", - location - }; -} - -/** - * @memberof actions/sources - * @static - */ -function clearHighlightLineRange() { - return { - type: "CLEAR_HIGHLIGHT_LINES" - }; -} - -function openConditionalPanel(line) { - return { - type: "OPEN_CONDITIONAL_PANEL", - line: line - }; -} - -function closeConditionalPanel() { - return { - type: "CLOSE_CONDITIONAL_PANEL" - }; -} - -/***/ }), -/* 322 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.recordCoverage = recordCoverage; - -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 recordCoverage() { - return (() => { - var _ref = _asyncToGenerator(function* (_ref2) { - var dispatch = _ref2.dispatch, - getState = _ref2.getState, - client = _ref2.client; - - var _ref3 = yield client.recordCoverage(), - coverage = _ref3.coverage; - - return dispatch({ - type: "RECORD_COVERAGE", - value: { coverage } - }); - }); - - return function (_x) { - return _ref.apply(this, arguments); - }; - })(); -} - -/***/ }), +/* 319 */, +/* 320 */, +/* 321 */, +/* 322 */, /* 323 */, /* 324 */, /* 325 */, @@ -20282,93 +10873,7 @@ function recordCoverage() { /* 329 */, /* 330 */, /* 331 */, -/* 332 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.Modal = undefined; -exports.default = Slide; - -var _propTypes = __webpack_require__(20); - -var _propTypes2 = _interopRequireDefault(_propTypes); - -var _react = __webpack_require__(0); - -var _react2 = _interopRequireDefault(_react); - -var _classnames = __webpack_require__(175); - -var _classnames2 = _interopRequireDefault(_classnames); - -var _Transition = __webpack_require__(333); - -var _Transition2 = _interopRequireDefault(_Transition); - -__webpack_require__(1303); - -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; - } - - render() { - var status = this.props.status; - - - return _react2.default.createElement( - "div", - { className: "modal-wrapper", onClick: this.props.handleClose }, - _react2.default.createElement( - "div", - { - className: (0, _classnames2.default)("modal", this.props.additionalClass, status), - onClick: this.onClick - }, - this.props.children - ) - ); - } -} - -exports.Modal = Modal; -Modal.contextTypes = { - shortcuts: _propTypes2.default.object -}; - -function Slide(_ref) { - var inProp = _ref.in, - children = _ref.children, - additionalClass = _ref.additionalClass, - handleClose = _ref.handleClose; - - return _react2.default.createElement( - _Transition2.default, - { "in": inProp, timeout: 175, appear: true }, - status => _react2.default.createElement( - Modal, - { - status: status, - additionalClass: additionalClass, - handleClose: handleClose - }, - children - ) - ); -} - -/***/ }), +/* 332 */, /* 333 */ /***/ (function(module, exports, __webpack_require__) { @@ -21753,374 +12258,10 @@ module.exports = { /* 339 */, /* 340 */, /* 341 */, -/* 342 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _react = __webpack_require__(0); - -var _react2 = _interopRequireDefault(_react); - -var _fuzzaldrinPlus = __webpack_require__(161); - -var _classnames = __webpack_require__(175); - -var _classnames2 = _interopRequireDefault(_classnames); - -var _resultList = __webpack_require__(343); - -__webpack_require__(1315); - -var _SearchInput = __webpack_require__(377); - -var _SearchInput2 = _interopRequireDefault(_SearchInput); - -var _ResultList = __webpack_require__(383); - -var _ResultList2 = _interopRequireDefault(_ResultList); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -class Autocomplete extends _react.Component { - - constructor(props) { - super(props); - - this.onKeyDown = this.onKeyDown.bind(this); - this.state = { - selectedIndex: 0, - focused: false - }; - } - - componentDidUpdate() { - if (this.refs.resultList && this.refs.resultList.refs) { - (0, _resultList.scrollList)(this.refs.resultList.refs, this.state.selectedIndex); - } - } - - getSearchResults() { - var inputValue = this.props.inputValue; - if (inputValue == "") { - return []; - } - - return (0, _fuzzaldrinPlus.filter)(this.props.items, inputValue, { - key: "value" - }); - } - - onKeyDown(e) { - var searchResults = this.getSearchResults(), - resultCount = searchResults.length; - - if (e.key === "ArrowUp") { - var _selectedIndex = Math.max(0, this.state.selectedIndex - 1); - this.setState({ selectedIndex: _selectedIndex }); - if (this.props.onSelectedItem) { - this.props.onSelectedItem(searchResults[_selectedIndex]); - } - e.preventDefault(); - } else if (e.key === "ArrowDown") { - var _selectedIndex2 = Math.min(resultCount - 1, this.state.selectedIndex + 1); - this.setState({ selectedIndex: _selectedIndex2 }); - if (this.props.onSelectedItem) { - this.props.onSelectedItem(searchResults[_selectedIndex2]); - } - e.preventDefault(); - } else if (e.key === "Enter") { - if (searchResults.length) { - this.props.selectItem(e, searchResults[this.state.selectedIndex]); - } else { - this.props.close(this.props.inputValue); - } - e.preventDefault(); - } else if (e.key === "Tab") { - this.props.close(this.props.inputValue); - e.preventDefault(); - } - } - - renderResults(results) { - var size = this.props.size; - - - if (results.length) { - var props = { - items: results, - selected: this.state.selectedIndex, - selectItem: this.props.selectItem, - close: this.props.close, - size, - ref: "resultList" - }; - - return _react2.default.createElement(_ResultList2.default, props); - } else if (this.props.inputValue && !results.length) { - return _react2.default.createElement( - "div", - { className: "no-result-msg absolute-center" }, - L10N.getStr("sourceSearch.noResults2") - ); - } - } - - render() { - var focused = this.state.focused; - var _props = this.props, - size = _props.size, - children = _props.children; - - var searchResults = this.getSearchResults(); - var summaryMsg = L10N.getFormatStr("sourceSearch.resultsSummary1", searchResults.length); - - var searchProps = { - query: this.props.inputValue, - count: searchResults.length, - placeholder: this.props.placeholder, - size, - showErrorEmoji: true, - summaryMsg, - onChange: e => { - this.props.onChangeHandler(e.target.value); - this.setState({ - selectedIndex: 0 - }); - }, - onFocus: () => this.setState({ focused: true }), - onBlur: () => this.setState({ focused: false }), - onKeyDown: this.onKeyDown, - handleClose: this.props.close - }; - - return _react2.default.createElement( - "div", - { className: (0, _classnames2.default)("autocomplete", { focused }) }, - _react2.default.createElement(_SearchInput2.default, searchProps), - children, - this.renderResults(searchResults) - ); - } -} - -exports.default = Autocomplete; -Autocomplete.defaultProps = { - size: "" -}; - -/***/ }), -/* 343 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.handleKeyDown = exports.scrollList = undefined; - -var _devtoolsConfig = __webpack_require__(828); - -function scrollList(resultList, index) { - if (!resultList.hasOwnProperty(index)) { - return; - } - - var resultEl = resultList[index]; - - if ((0, _devtoolsConfig.isFirefox)()) { - resultEl.scrollIntoView({ block: "end", behavior: "smooth" }); - } else { - chromeScrollList(resultEl, index); - } -} - -function chromeScrollList(elem, index) { - var resultsEl = elem.parentNode; - if (!resultsEl || resultsEl.children.length === 0) { - return; - } - - var resultsHeight = resultsEl.clientHeight; - var itemHeight = resultsEl.children[0].clientHeight; - var numVisible = resultsHeight / itemHeight; - var positionsToScroll = index - numVisible + 1; - var itemOffset = resultsHeight % itemHeight; - var scroll = positionsToScroll * (itemHeight + 2) + itemOffset; - - resultsEl.scrollTop = Math.max(0, scroll); -} - -function handleKeyDown(e) { - var searchResults = this.getSearchResults(), - resultCount = searchResults.length; - - if (e.key === "ArrowUp") { - var selectedIndex = Math.max(0, this.state.selectedIndex - 1); - this.setState({ selectedIndex }); - if (this.props.onSelectedItem) { - this.props.onSelectedItem(searchResults[selectedIndex]); - } - e.preventDefault(); - } else if (e.key === "ArrowDown") { - var _selectedIndex = Math.min(resultCount - 1, this.state.selectedIndex + 1); - this.setState({ selectedIndex: _selectedIndex }); - if (this.props.onSelectedItem) { - this.props.onSelectedItem(searchResults[_selectedIndex]); - } - e.preventDefault(); - } else if (e.key === "Enter") { - if (searchResults.length) { - this.props.selectItem(searchResults[this.state.selectedIndex]); - } else { - this.props.close(this.state.inputValue); - } - e.preventDefault(); - } else if (e.key === "Tab") { - this.props.close(this.state.inputValue); - e.preventDefault(); - } -} - -exports.scrollList = scrollList; -exports.handleKeyDown = handleKeyDown; - -/***/ }), -/* 344 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _Svg = __webpack_require__(345); - -var _Svg2 = _interopRequireDefault(_Svg); - -__webpack_require__(1310); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * This file maps the SVG React Components in the assets/images directory. - */ - -exports.default = _Svg2.default; - -/***/ }), -/* 345 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var React = __webpack_require__(0); -var InlineSVG = __webpack_require__(346); - -var _require = __webpack_require__(828), - isDevelopment = _require.isDevelopment; - -var svg = { - "angle-brackets": __webpack_require__(347), - angular: __webpack_require__(247), - arrow: __webpack_require__(348), - backbone: __webpack_require__(997), - blackBox: __webpack_require__(349), - breakpoint: __webpack_require__(350), - "column-breakpoint": __webpack_require__(998), - "case-match": __webpack_require__(351), - close: __webpack_require__(352), - choo: __webpack_require__(1290), - dojo: __webpack_require__(806), - domain: __webpack_require__(353), - file: __webpack_require__(354), - folder: __webpack_require__(355), - globe: __webpack_require__(356), - jquery: __webpack_require__(999), - underscore: __webpack_require__(1117), - lodash: __webpack_require__(1118), - ember: __webpack_require__(1119), - vuejs: __webpack_require__(1174), - "magnifying-glass": __webpack_require__(357), - "arrow-up": __webpack_require__(919), - "arrow-down": __webpack_require__(920), - 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), - redux: __webpack_require__(256), - immutable: __webpack_require__(258), - resume: __webpack_require__(363), - settings: __webpack_require__(364), - stepIn: __webpack_require__(365), - stepOut: __webpack_require__(366), - stepOver: __webpack_require__(367), - subSettings: __webpack_require__(368), - toggleBreakpoints: __webpack_require__(369), - togglePanes: __webpack_require__(370), - "whole-word-match": __webpack_require__(371), - worker: __webpack_require__(372), - "sad-face": __webpack_require__(1347), - refresh: __webpack_require__(1348), - webpack: __webpack_require__(1001), - node: __webpack_require__(1002), - express: __webpack_require__(1003), - pug: __webpack_require__(1004), - extjs: __webpack_require__(1043), - showSources: __webpack_require__(1044), - showOutline: __webpack_require__(1045), - shortcut: __webpack_require__(1183) -}; - -function Svg(_ref) { - var name = _ref.name, - className = _ref.className, - onClick = _ref.onClick, - ariaLabel = _ref["aria-label"]; - - if (!svg[name]) { - var error = `Unknown SVG: ${name}`; - if (isDevelopment()) { - throw new Error(error); - } - - console.warn(error); - return; - } - - className = `${name} ${className || ""}`; - if (name === "subSettings") { - className = ""; - } - - var props = { - className, - onClick, - ["aria-label"]: ariaLabel, - src: svg[name] - }; - - return React.createElement(InlineSVG, props); -} - -Svg.displayName = "Svg"; - -module.exports = Svg; - -/***/ }), +/* 342 */, +/* 343 */, +/* 344 */, +/* 345 */, /* 346 */ /***/ (function(module, exports, __webpack_require__) { @@ -22434,334 +12575,19 @@ module.exports = "`); -} - -// Registration -function supportsObject(object) { - var noGrip = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; - - if (noGrip === true || !isGrip(object)) { - return false; - } - return object.preview && object.preview.nodeType === nodeConstants.COMMENT_NODE; -} - -// Exports from this module -module.exports = { - rep: wrapRender(CommentNode), - supportsObject -}; - -/***/ }), -/* 951 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -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); } } - -/* This Source Code Form is subject to the terms of the Mozilla Public - * 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/. */ - -// ReactJS -var React = __webpack_require__(0); - -// Utils - -var _require = __webpack_require__(927), - isGrip = _require.isGrip, - wrapRender = _require.wrapRender; - -var _require2 = __webpack_require__(925), - MODE = _require2.MODE; - -var nodeConstants = __webpack_require__(928); -var Svg = __webpack_require__(1151); - -// Shortcuts -var span = React.DOM.span; - -/** - * Renders DOM element node. - */ - -ElementNode.propTypes = { - object: React.PropTypes.object.isRequired, - // @TODO Change this to Object.values once it's supported in Node's version of V8 - mode: React.PropTypes.oneOf(Object.keys(MODE).map(key => MODE[key])), - onDOMNodeMouseOver: React.PropTypes.func, - onDOMNodeMouseOut: React.PropTypes.func, - onInspectIconClick: React.PropTypes.func -}; - -function ElementNode(props) { - var object = props.object, - mode = props.mode, - onDOMNodeMouseOver = props.onDOMNodeMouseOver, - onDOMNodeMouseOut = props.onDOMNodeMouseOut, - onInspectIconClick = props.onInspectIconClick; - - var elements = getElements(object, mode); - - var isInTree = object.preview && object.preview.isConnected === true; - - var baseConfig = { - "data-link-actor-id": object.actor, - className: "objectBox objectBox-node" - }; - var inspectIcon = void 0; - if (isInTree) { - if (onDOMNodeMouseOver) { - Object.assign(baseConfig, { - onMouseOver: _ => onDOMNodeMouseOver(object) - }); - } - - if (onDOMNodeMouseOut) { - Object.assign(baseConfig, { - onMouseOut: onDOMNodeMouseOut - }); - } - - if (onInspectIconClick) { - inspectIcon = Svg("open-inspector", { - element: "a", - draggable: false, - // TODO: Localize this with "openNodeInInspector" when Bug 1317038 lands - title: "Click to select the node in the inspector", - onClick: e => onInspectIconClick(object, e) - }); - } - } - - return span.apply(undefined, [baseConfig].concat(_toConsumableArray(elements), [inspectIcon])); -} - -function getElements(grip, mode) { - var _grip$preview = grip.preview, - attributes = _grip$preview.attributes, - nodeName = _grip$preview.nodeName; - - var nodeNameElement = span({ - className: "tag-name theme-fg-color3" - }, nodeName); - - if (mode === MODE.TINY) { - var elements = [nodeNameElement]; - if (attributes.id) { - elements.push(span({ className: "attr-name theme-fg-color2" }, `#${attributes.id}`)); - } - if (attributes.class) { - elements.push(span({ className: "attr-name theme-fg-color2" }, attributes.class.replace(/(^\s+)|(\s+$)/g, "").split(" ").map(cls => `.${cls}`).join(""))); - } - return elements; - } - var attributeKeys = Object.keys(attributes); - if (attributeKeys.includes("class")) { - attributeKeys.splice(attributeKeys.indexOf("class"), 1); - attributeKeys.unshift("class"); - } - if (attributeKeys.includes("id")) { - attributeKeys.splice(attributeKeys.indexOf("id"), 1); - attributeKeys.unshift("id"); - } - var attributeElements = attributeKeys.reduce((arr, name, i, keys) => { - var value = attributes[name]; - var attribute = span({}, span({ className: "attr-name theme-fg-color2" }, `${name}`), `="`, span({ className: "attr-value theme-fg-color6" }, `${value}`), `"`); - - return arr.concat([" ", attribute]); - }, []); - - return ["<", nodeNameElement].concat(_toConsumableArray(attributeElements), [">"]); -} - -// Registration -function supportsObject(object) { - var noGrip = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; - - if (noGrip === true || !isGrip(object)) { - return false; - } - return object.preview && object.preview.nodeType === nodeConstants.ELEMENT_NODE; -} - -// Exports from this module -module.exports = { - rep: wrapRender(ElementNode), - supportsObject -}; - -/***/ }), +/* 936 */, +/* 937 */, +/* 938 */, +/* 939 */, +/* 940 */, +/* 941 */, +/* 942 */, +/* 943 */, +/* 944 */, +/* 945 */, +/* 946 */, +/* 947 */, +/* 948 */, +/* 949 */, +/* 950 */, +/* 951 */, /* 952 */, -/* 953 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -/* This Source Code Form is subject to the terms of the Mozilla Public - * 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/. */ - -// ReactJS -var React = __webpack_require__(0); - -// Reps - -var _require = __webpack_require__(927), - isGrip = _require.isGrip, - cropString = _require.cropString, - wrapRender = _require.wrapRender; - -var _require2 = __webpack_require__(925), - MODE = _require2.MODE; - -var Svg = __webpack_require__(1151); - -// Shortcuts -var DOM = React.DOM; - -/** - * Renders DOM #text node. - */ -TextNode.propTypes = { - object: React.PropTypes.object.isRequired, - // @TODO Change this to Object.values once it's supported in Node's version of V8 - mode: React.PropTypes.oneOf(Object.keys(MODE).map(key => MODE[key])), - onDOMNodeMouseOver: React.PropTypes.func, - onDOMNodeMouseOut: React.PropTypes.func, - onInspectIconClick: React.PropTypes.func -}; - -function TextNode(props) { - var grip = props.object, - _props$mode = props.mode, - mode = _props$mode === undefined ? MODE.SHORT : _props$mode, - onDOMNodeMouseOver = props.onDOMNodeMouseOver, - onDOMNodeMouseOut = props.onDOMNodeMouseOut, - onInspectIconClick = props.onInspectIconClick; - - - var baseConfig = { - "data-link-actor-id": grip.actor, - className: "objectBox objectBox-textNode" - }; - var inspectIcon = void 0; - var isInTree = grip.preview && grip.preview.isConnected === true; - - if (isInTree) { - if (onDOMNodeMouseOver) { - Object.assign(baseConfig, { - onMouseOver: _ => onDOMNodeMouseOver(grip) - }); - } - - if (onDOMNodeMouseOut) { - Object.assign(baseConfig, { - onMouseOut: onDOMNodeMouseOut - }); - } - - if (onInspectIconClick) { - inspectIcon = Svg("open-inspector", { - element: "a", - draggable: false, - // TODO: Localize this with "openNodeInInspector" when Bug 1317038 lands - title: "Click to select the node in the inspector", - onClick: e => onInspectIconClick(grip, e) - }); - } - } - - if (mode === MODE.TINY) { - return DOM.span(baseConfig, getTitle(grip), inspectIcon); - } - - return DOM.span(baseConfig, getTitle(grip), DOM.span({ className: "nodeValue" }, " ", `"${getTextContent(grip)}"`), inspectIcon); -} - -function getTextContent(grip) { - return cropString(grip.preview.textContent); -} - -function getTitle(grip) { - var title = "#text"; - return DOM.span({}, title); -} - -// Registration -function supportsObject(grip) { - var noGrip = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; - - if (noGrip === true || !isGrip(grip)) { - return false; - } - - return grip.preview && grip.class == "Text"; -} - -// Exports from this module -module.exports = { - rep: wrapRender(TextNode), - supportsObject -}; - -/***/ }), -/* 954 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -/* This Source Code Form is subject to the terms of the Mozilla Public - * 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/. */ - -// ReactJS -var React = __webpack_require__(0); -// Utils - -var _require = __webpack_require__(927), - getGripType = _require.getGripType, - isGrip = _require.isGrip, - wrapRender = _require.wrapRender; - -var _require2 = __webpack_require__(925), - MODE = _require2.MODE; - -// Shortcuts - - -var span = React.DOM.span; - -/** - * Renders Error objects. - */ - -ErrorRep.propTypes = { - object: React.PropTypes.object.isRequired, - // @TODO Change this to Object.values once it's supported in Node's version of V8 - mode: React.PropTypes.oneOf(Object.keys(MODE).map(key => MODE[key])) -}; - -function ErrorRep(props) { - var object = props.object; - var preview = object.preview; - var name = preview && preview.name ? preview.name : "Error"; - - var content = props.mode === MODE.TINY ? name : `${name}: ${preview.message}`; - - if (preview.stack && props.mode !== MODE.TINY) { - /* - * Since Reps are used in the JSON Viewer, we can't localize - * the "Stack trace" label (defined in debugger.properties as - * "variablesViewErrorStacktrace" property), until Bug 1317038 lands. - */ - content = `${content}\nStack trace:\n${preview.stack}`; - } - - return span({ - "data-link-actor-id": object.actor, - className: "objectBox-stackTrace" - }, content); -} - -// Registration -function supportsObject(object) { - var noGrip = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; - - if (noGrip === true || !isGrip(object)) { - return false; - } - return object.preview && getGripType(object, noGrip) === "Error"; -} - -// Exports from this module -module.exports = { - rep: wrapRender(ErrorRep), - supportsObject -}; - -/***/ }), -/* 955 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -/* This Source Code Form is subject to the terms of the Mozilla Public - * 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/. */ - -// ReactJS -var React = __webpack_require__(0); - -// Reps - -var _require = __webpack_require__(927), - getGripType = _require.getGripType, - isGrip = _require.isGrip, - getURLDisplayString = _require.getURLDisplayString, - wrapRender = _require.wrapRender; - -var _require2 = __webpack_require__(925), - MODE = _require2.MODE; - -// Shortcuts - - -var span = React.DOM.span; - -/** - * Renders a grip representing a window. - */ - -WindowRep.propTypes = { - // @TODO Change this to Object.values once it's supported in Node's version of V8 - mode: React.PropTypes.oneOf(Object.keys(MODE).map(key => MODE[key])), - object: React.PropTypes.object.isRequired -}; - -function WindowRep(props) { - var mode = props.mode, - object = props.object; - - - var config = { - "data-link-actor-id": object.actor, - className: "objectBox objectBox-Window" - }; - - if (mode === MODE.TINY) { - return span(config, getTitle(object)); - } - - return span(config, getTitle(object), " ", span({ className: "objectPropValue" }, getLocation(object))); -} - -function getTitle(object) { - var title = object.displayClass || object.class || "Window"; - return span({ className: "objectBoxTitle" }, title); -} - -function getLocation(object) { - return getURLDisplayString(object.preview.url); -} - -// Registration -function supportsObject(object) { - var noGrip = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; - - if (noGrip === true || !isGrip(object)) { - return false; - } - - return object.preview && getGripType(object, noGrip) == "Window"; -} - -// Exports from this module -module.exports = { - rep: wrapRender(WindowRep), - supportsObject -}; - -/***/ }), -/* 956 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -/* This Source Code Form is subject to the terms of the Mozilla Public - * 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/. */ - -// ReactJS -var React = __webpack_require__(0); - -// Reps - -var _require = __webpack_require__(927), - isGrip = _require.isGrip, - wrapRender = _require.wrapRender; - -// Shortcuts - - -var span = React.DOM.span; - -/** - * Renders a grip object with textual data. - */ - -ObjectWithText.propTypes = { - object: React.PropTypes.object.isRequired -}; - -function ObjectWithText(props) { - var grip = props.object; - return span({ - "data-link-actor-id": grip.actor, - className: "objectBox objectBox-" + getType(grip) - }, span({ className: "objectPropValue" }, getDescription(grip))); -} - -function getType(grip) { - return grip.class; -} - -function getDescription(grip) { - return "\"" + grip.preview.text + "\""; -} - -// Registration -function supportsObject(grip) { - var noGrip = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; - - if (noGrip === true || !isGrip(grip)) { - return false; - } - - return grip.preview && grip.preview.kind == "ObjectWithText"; -} - -// Exports from this module -module.exports = { - rep: wrapRender(ObjectWithText), - supportsObject -}; - -/***/ }), -/* 957 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -/* This Source Code Form is subject to the terms of the Mozilla Public - * 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/. */ - -// ReactJS -var React = __webpack_require__(0); - -// Reps - -var _require = __webpack_require__(927), - isGrip = _require.isGrip, - getURLDisplayString = _require.getURLDisplayString, - wrapRender = _require.wrapRender; - -// Shortcuts - - -var span = React.DOM.span; - -/** - * Renders a grip object with URL data. - */ - -ObjectWithURL.propTypes = { - object: React.PropTypes.object.isRequired -}; - -function ObjectWithURL(props) { - var grip = props.object; - return span({ - "data-link-actor-id": grip.actor, - className: "objectBox objectBox-" + getType(grip) - }, getTitle(grip), span({ className: "objectPropValue" }, getDescription(grip))); -} - -function getTitle(grip) { - return span({ className: "objectTitle" }, getType(grip) + " "); -} - -function getType(grip) { - return grip.class; -} - -function getDescription(grip) { - return getURLDisplayString(grip.preview.url); -} - -// Registration -function supportsObject(grip) { - var noGrip = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; - - if (noGrip === true || !isGrip(grip)) { - return false; - } - - return grip.preview && grip.preview.kind == "ObjectWithURL"; -} - -// Exports from this module -module.exports = { - rep: wrapRender(ObjectWithURL), - supportsObject -}; - -/***/ }), -/* 958 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -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); } } - -/* This Source Code Form is subject to the terms of the Mozilla Public - * 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/. */ - -// Dependencies -var React = __webpack_require__(0); - -var _require = __webpack_require__(927), - getGripType = _require.getGripType, - isGrip = _require.isGrip, - wrapRender = _require.wrapRender; - -var _require2 = __webpack_require__(925), - MODE = _require2.MODE; - -// Shortcuts - - -var span = React.DOM.span; - -/** - * Renders an array. The array is enclosed by left and right bracket - * and the max number of rendered items depends on the current mode. - */ - -GripArray.propTypes = { - object: React.PropTypes.object.isRequired, - // @TODO Change this to Object.values once it's supported in Node's version of V8 - mode: React.PropTypes.oneOf(Object.keys(MODE).map(key => MODE[key])), - provider: React.PropTypes.object, - onDOMNodeMouseOver: React.PropTypes.func, - onDOMNodeMouseOut: React.PropTypes.func, - onInspectIconClick: React.PropTypes.func -}; - -function GripArray(props) { - var object = props.object, - _props$mode = props.mode, - mode = _props$mode === undefined ? MODE.SHORT : _props$mode; - - - var items = void 0; - var brackets = void 0; - var needSpace = function (space) { - return space ? { left: "[ ", right: " ]" } : { left: "[", right: "]" }; - }; - - if (mode === MODE.TINY) { - var objectLength = getLength(object); - var isEmpty = objectLength === 0; - if (isEmpty) { - items = []; - } else { - items = [span({ - className: "more-ellipsis", - title: "more…" - }, "…")]; - } - brackets = needSpace(false); - } else { - var max = maxLengthMap.get(mode); - items = arrayIterator(props, object, max); - brackets = needSpace(items.length > 0); - } - - var title = getTitle(props, object); - - return span.apply(undefined, [{ - "data-link-actor-id": object.actor, - className: "objectBox objectBox-array" }, title, span({ - className: "arrayLeftBracket" - }, brackets.left)].concat(_toConsumableArray(interleaveCommas(items)), [span({ - className: "arrayRightBracket" - }, brackets.right), span({ - className: "arrayProperties", - role: "group" })])); -} - -function interleaveCommas(items) { - return items.reduce((res, item, index) => { - if (index !== items.length - 1) { - return res.concat(item, ", "); - } - return res.concat(item); - }, []); -} - -function getLength(grip) { - if (!grip.preview) { - return 0; - } - - return grip.preview.length || grip.preview.childNodesLength || 0; -} - -function getTitle(props, object) { - if (props.mode === MODE.TINY) { - return ""; - } - - var title = props.title || object.class || "Array"; - return span({ - className: "objectTitle" - }, title + " "); -} - -function getPreviewItems(grip) { - if (!grip.preview) { - return null; - } - - return grip.preview.items || grip.preview.childNodes || []; -} - -function arrayIterator(props, grip, max) { - var _require3 = __webpack_require__(926), - Rep = _require3.Rep; - - var items = []; - var gripLength = getLength(grip); - - if (!gripLength) { - return items; - } - - var previewItems = getPreviewItems(grip); - var provider = props.provider; - - var emptySlots = 0; - var foldedEmptySlots = 0; - items = previewItems.reduce((res, itemGrip) => { - if (res.length >= max) { - return res; - } - - var object = void 0; - try { - if (!provider && itemGrip === null) { - emptySlots++; - return res; - } - - object = provider ? provider.getValue(itemGrip) : itemGrip; - } catch (exc) { - object = exc; - } - - if (emptySlots > 0) { - res.push(getEmptySlotsElement(emptySlots)); - foldedEmptySlots = foldedEmptySlots + emptySlots - 1; - emptySlots = 0; - } - - if (res.length < max) { - res.push(Rep(Object.assign({}, props, { - object, - mode: MODE.TINY, - // Do not propagate title to array items reps - title: undefined - }))); - } - - return res; - }, []); - - // Handle trailing empty slots if there are some. - if (items.length < max && emptySlots > 0) { - items.push(getEmptySlotsElement(emptySlots)); - foldedEmptySlots = foldedEmptySlots + emptySlots - 1; - } - - var itemsShown = items.length + foldedEmptySlots; - if (gripLength > itemsShown) { - items.push(span({ - className: "more-ellipsis", - title: "more…" - }, "…")); - } - - return items; -} - -function getEmptySlotsElement(number) { - // TODO: Use l10N - See https://github.com/devtools-html/reps/issues/141 - return `<${number} empty slot${number > 1 ? "s" : ""}>`; -} - -function supportsObject(grip) { - var noGrip = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; - - if (noGrip === true || !isGrip(grip)) { - return false; - } - - return grip.preview && (grip.preview.kind == "ArrayLike" || getGripType(grip, noGrip) === "DocumentFragment"); -} - -var maxLengthMap = new Map(); -maxLengthMap.set(MODE.SHORT, 3); -maxLengthMap.set(MODE.LONG, 10); - -// Exports from this module -module.exports = { - rep: wrapRender(GripArray), - supportsObject, - maxLengthMap -}; - -/***/ }), -/* 959 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -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"); } }; }(); - -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); } } - -/* This Source Code Form is subject to the terms of the Mozilla Public - * 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/. */ - -// Dependencies -var React = __webpack_require__(0); - -var _require = __webpack_require__(927), - isGrip = _require.isGrip, - wrapRender = _require.wrapRender; - -var PropRep = __webpack_require__(937); - -var _require2 = __webpack_require__(925), - MODE = _require2.MODE; -// Shortcuts - - -var span = React.DOM.span; - -/** - * Renders an map. A map is represented by a list of its - * entries enclosed in curly brackets. - */ - -GripMap.propTypes = { - object: React.PropTypes.object, - // @TODO Change this to Object.values once it's supported in Node's version of V8 - mode: React.PropTypes.oneOf(Object.keys(MODE).map(key => MODE[key])), - isInterestingEntry: React.PropTypes.func, - onDOMNodeMouseOver: React.PropTypes.func, - onDOMNodeMouseOut: React.PropTypes.func, - onInspectIconClick: React.PropTypes.func, - title: React.PropTypes.string -}; - -function GripMap(props) { - var mode = props.mode, - object = props.object; - - - var config = { - "data-link-actor-id": object.actor, - className: "objectBox objectBox-object" - }; - - if (mode === MODE.TINY) { - return span(config, getTitle(props, object)); - } - - var propsArray = safeEntriesIterator(props, object, maxLengthMap.get(mode)); - - return span.apply(undefined, [config, getTitle(props, object), span({ - className: "objectLeftBrace" - }, " { ")].concat(_toConsumableArray(propsArray), [span({ - className: "objectRightBrace" - }, " }")])); -} - -function getTitle(props, object) { - var title = props.title || (object && object.class ? object.class : "Map"); - return span({ - className: "objectTitle" - }, title); -} - -function safeEntriesIterator(props, object, max) { - max = typeof max === "undefined" ? 3 : max; - try { - return entriesIterator(props, object, max); - } catch (err) { - console.error(err); - } - return []; -} - -function entriesIterator(props, object, max) { - // Entry filter. Show only interesting entries to the user. - var isInterestingEntry = props.isInterestingEntry || ((type, value) => { - return type == "boolean" || type == "number" || type == "string" && value.length != 0; - }); - - var mapEntries = object.preview && object.preview.entries ? object.preview.entries : []; - - var indexes = getEntriesIndexes(mapEntries, max, isInterestingEntry); - if (indexes.length < max && indexes.length < mapEntries.length) { - // There are not enough entries yet, so we add uninteresting entries. - indexes = indexes.concat(getEntriesIndexes(mapEntries, max - indexes.length, (t, value, name) => { - return !isInterestingEntry(t, value, name); - })); - } - - var entries = getEntries(props, mapEntries, indexes); - if (entries.length < object.preview.size) { - // There are some undisplayed entries. Then display "…". - entries.push(span({ - key: "more", - className: "more-ellipsis", - title: "more…" - }, "…")); - } - - return unfoldEntries(entries); -} - -function unfoldEntries(items) { - return items.reduce((res, item, index) => { - if (Array.isArray(item)) { - res = res.concat(item); - } else { - res.push(item); - } - - // Interleave commas between elements - if (index !== items.length - 1) { - res.push(", "); - } - return res; - }, []); -} - -/** - * Get entries ordered by index. - * - * @param {Object} props Component props. - * @param {Array} entries Entries array. - * @param {Array} indexes Indexes of entries. - * @return {Array} Array of PropRep. - */ -function getEntries(props, entries, indexes) { - var onDOMNodeMouseOver = props.onDOMNodeMouseOver, - onDOMNodeMouseOut = props.onDOMNodeMouseOut, - onInspectIconClick = props.onInspectIconClick; - - // Make indexes ordered by ascending. - - indexes.sort(function (a, b) { - return a - b; - }); - - return indexes.map((index, i) => { - var _entries$index = _slicedToArray(entries[index], 2), - key = _entries$index[0], - entryValue = _entries$index[1]; - - var value = entryValue.value !== undefined ? entryValue.value : entryValue; - - return PropRep({ - name: key, - equal: " \u2192 ", - object: value, - mode: MODE.TINY, - onDOMNodeMouseOver, - onDOMNodeMouseOut, - onInspectIconClick - }); - }); -} - -/** - * Get the indexes of entries in the map. - * - * @param {Array} entries Entries array. - * @param {Number} max The maximum length of indexes array. - * @param {Function} filter Filter the entry you want. - * @return {Array} Indexes of filtered entries in the map. - */ -function getEntriesIndexes(entries, max, filter) { - return entries.reduce((indexes, _ref, i) => { - var _ref2 = _slicedToArray(_ref, 2), - key = _ref2[0], - entry = _ref2[1]; - - if (indexes.length < max) { - var value = entry && entry.value !== undefined ? entry.value : entry; - // Type is specified in grip's "class" field and for primitive - // values use typeof. - var type = (value && value.class ? value.class : typeof value).toLowerCase(); - - if (filter(type, value, key)) { - indexes.push(i); - } - } - - return indexes; - }, []); -} - -function supportsObject(grip) { - var noGrip = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; - - if (noGrip === true || !isGrip(grip)) { - return false; - } - return grip.preview && grip.preview.kind == "MapLike"; -} - -var maxLengthMap = new Map(); -maxLengthMap.set(MODE.SHORT, 3); -maxLengthMap.set(MODE.LONG, 10); - -// Exports from this module -module.exports = { - rep: wrapRender(GripMap), - supportsObject, - maxLengthMap -}; - -/***/ }), +/* 953 */, +/* 954 */, +/* 955 */, +/* 956 */, +/* 957 */, +/* 958 */, +/* 959 */, /* 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.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(gotoLineModal.placeholder): The placeholder\n# text displayed when the user searches for specific lines in a file\ngotoLineModal.placeholder=Go to line…\ngotoLineModal.key=CmdOrCtrl+Shift+;\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 (setDirectoryRoot): This is the text that appears in the\n# context menu to set a directory as root directory\nsetDirectoryRoot.label=Set directory root\nsetDirectoryRoot.accesskey=r\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\neditor.disableBreakpoint.accesskey=D\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/editing a breakpoint condition on a line.\neditor.addConditionalBreakpoint=Add/Edit conditional breakpoint\neditor.addConditionalBreakpoint.accesskey=c\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\neditor.jumpToMappedLocation1.accesskey=m\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\nexpressions.placeholder.accesskey=e\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.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 (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(gotoLineModal.placeholder): The placeholder\n# text displayed when the user searches for specific lines in a file\ngotoLineModal.placeholder=Go to line…\ngotoLineModal.key=CmdOrCtrl+Shift+;\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\nshortcuts.toggleBreakpoint.accesskey=B\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" /***/ }), /* 961 */, @@ -36340,1191 +14513,15 @@ function isObject(val) { /***/ }), /* 966 */, -/* 967 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -/* This Source Code Form is subject to the terms of the Mozilla Public - * 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/. */ - -var EventEmitter = __webpack_require__(968); - -function inToolbox() { - return window.parent.document.documentURI == "about:devtools-toolbox"; -} - -/** - * A partial implementation of the Menu API provided by electron: - * https://github.com/electron/electron/blob/master/docs/api/menu.md. - * - * Extra features: - * - Emits an 'open' and 'close' event when the menu is opened/closed - - * @param String id (non standard) - * Needed so tests can confirm the XUL implementation is working - */ -function Menu() { - var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, - _ref$id = _ref.id, - id = _ref$id === undefined ? null : _ref$id; - - this.menuitems = []; - this.id = id; - - Object.defineProperty(this, "items", { - get() { - return this.menuitems; - } - }); - - EventEmitter.decorate(this); -} - -/** - * Add an item to the end of the Menu - * - * @param {MenuItem} menuItem - */ -Menu.prototype.append = function (menuItem) { - this.menuitems.push(menuItem); -}; - -/** - * Add an item to a specified position in the menu - * - * @param {int} pos - * @param {MenuItem} menuItem - */ -Menu.prototype.insert = function (pos, menuItem) { - throw Error("Not implemented"); -}; - -/** - * Show the Menu at a specified location on the screen - * - * Missing features: - * - browserWindow - BrowserWindow (optional) - Default is null. - * - positioningItem Number - (optional) OS X - * - * @param {int} screenX - * @param {int} screenY - * @param Toolbox toolbox (non standard) - * Needed so we in which window to inject XUL - */ -Menu.prototype.popup = function (screenX, screenY, toolbox) { - var doc = toolbox.doc; - var popupset = doc.querySelector("popupset"); - // See bug 1285229, on Windows, opening the same popup multiple times in a - // row ends up duplicating the popup. The newly inserted popup doesn't - // dismiss the old one. So remove any previously displayed popup before - // opening a new one. - var popup = popupset.querySelector("menupopup[menu-api=\"true\"]"); - if (popup) { - popup.hidePopup(); - } - - popup = this.createPopup(doc); - popup.setAttribute("menu-api", "true"); - - if (this.id) { - popup.id = this.id; - } - this._createMenuItems(popup); - - // Remove the menu from the DOM once it's hidden. - popup.addEventListener("popuphidden", e => { - if (e.target === popup) { - popup.remove(); - this.emit("close", popup); - } - }); - - popup.addEventListener("popupshown", e => { - if (e.target === popup) { - this.emit("open", popup); - } - }); - - popupset.appendChild(popup); - popup.openPopupAtScreen(screenX, screenY, true); -}; - -Menu.prototype.createPopup = function (doc) { - return doc.createElement("menupopup"); -}; - -Menu.prototype._createMenuItems = function (parent) { - var doc = parent.ownerDocument; - this.menuitems.forEach(item => { - if (!item.visible) { - return; - } - - if (item.submenu) { - var menupopup = doc.createElement("menupopup"); - item.submenu._createMenuItems(menupopup); - - var menuitem = doc.createElement("menuitem"); - menuitem.setAttribute("label", item.label); - if (!inToolbox()) { - menuitem.textContent = item.label; - } - - var menu = doc.createElement("menu"); - menu.appendChild(menuitem); - menu.appendChild(menupopup); - if (item.disabled) { - menu.setAttribute("disabled", "true"); - } - if (item.accesskey) { - menu.setAttribute("accesskey", item.accesskey); - } - if (item.id) { - menu.id = item.id; - } - parent.appendChild(menu); - } else if (item.type === "separator") { - var menusep = doc.createElement("menuseparator"); - parent.appendChild(menusep); - } else { - var _menuitem = doc.createElement("menuitem"); - _menuitem.setAttribute("label", item.label); - - if (!inToolbox()) { - _menuitem.textContent = item.label; - } - - _menuitem.addEventListener("command", () => item.click()); - - if (item.type === "checkbox") { - _menuitem.setAttribute("type", "checkbox"); - } - if (item.type === "radio") { - _menuitem.setAttribute("type", "radio"); - } - if (item.disabled) { - _menuitem.setAttribute("disabled", "true"); - } - if (item.checked) { - _menuitem.setAttribute("checked", "true"); - } - if (item.accesskey) { - _menuitem.setAttribute("accesskey", item.accesskey); - } - if (item.id) { - _menuitem.id = item.id; - } - - parent.appendChild(_menuitem); - } - }); -}; - -Menu.setApplicationMenu = () => { - throw Error("Not implemented"); -}; - -Menu.sendActionToFirstResponder = () => { - throw Error("Not implemented"); -}; - -Menu.buildFromTemplate = () => { - throw Error("Not implemented"); -}; - -module.exports = Menu; - -/***/ }), -/* 968 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -/* This Source Code Form is subject to the terms of the Mozilla Public - * 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/. */ - -var EventEmitter = function EventEmitter() {}; -module.exports = EventEmitter; - -var promise = __webpack_require__(969); - -/** - * Decorate an object with event emitter functionality. - * - * @param Object aObjectToDecorate - * Bind all public methods of EventEmitter to - * the aObjectToDecorate object. - */ -EventEmitter.decorate = function EventEmitter_decorate(aObjectToDecorate) { - var emitter = new EventEmitter(); - aObjectToDecorate.on = emitter.on.bind(emitter); - aObjectToDecorate.off = emitter.off.bind(emitter); - aObjectToDecorate.once = emitter.once.bind(emitter); - aObjectToDecorate.emit = emitter.emit.bind(emitter); -}; - -EventEmitter.prototype = { - /** - * Connect a listener. - * - * @param string aEvent - * The event name to which we're connecting. - * @param function aListener - * Called when the event is fired. - */ - on: function EventEmitter_on(aEvent, aListener) { - if (!this._eventEmitterListeners) this._eventEmitterListeners = new Map(); - if (!this._eventEmitterListeners.has(aEvent)) { - this._eventEmitterListeners.set(aEvent, []); - } - this._eventEmitterListeners.get(aEvent).push(aListener); - }, - - /** - * Listen for the next time an event is fired. - * - * @param string aEvent - * The event name to which we're connecting. - * @param function aListener - * (Optional) Called when the event is fired. Will be called at most - * one time. - * @return promise - * A promise which is resolved when the event next happens. The - * resolution value of the promise is the first event argument. If - * you need access to second or subsequent event arguments (it's rare - * that this is needed) then use aListener - */ - once: function EventEmitter_once(aEvent, aListener) { - var _this = this; - - var deferred = promise.defer(); - - var handler = function (aEvent, aFirstArg) { - for (var _len = arguments.length, aRest = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) { - aRest[_key - 2] = arguments[_key]; - } - - _this.off(aEvent, handler); - if (aListener) { - aListener.apply(null, [aEvent, aFirstArg].concat(aRest)); - } - deferred.resolve(aFirstArg); - }; - - handler._originalListener = aListener; - this.on(aEvent, handler); - - return deferred.promise; - }, - - /** - * Remove a previously-registered event listener. Works for events - * registered with either on or once. - * - * @param string aEvent - * The event name whose listener we're disconnecting. - * @param function aListener - * The listener to remove. - */ - off: function EventEmitter_off(aEvent, aListener) { - if (!this._eventEmitterListeners) return; - var listeners = this._eventEmitterListeners.get(aEvent); - if (listeners) { - this._eventEmitterListeners.set(aEvent, listeners.filter(l => { - return l !== aListener && l._originalListener !== aListener; - })); - } - }, - - /** - * Emit an event. All arguments to this method will - * be sent to listener functions. - */ - emit: function EventEmitter_emit(aEvent) { - var _this2 = this, - _arguments = arguments; - - if (!this._eventEmitterListeners || !this._eventEmitterListeners.has(aEvent)) { - return; - } - - var originalListeners = this._eventEmitterListeners.get(aEvent); - - var _loop = function (listener) { - // If the object was destroyed during event emission, stop - // emitting. - if (!_this2._eventEmitterListeners) { - return "break"; - } - - // If listeners were removed during emission, make sure the - // event handler we're going to fire wasn't removed. - if (originalListeners === _this2._eventEmitterListeners.get(aEvent) || _this2._eventEmitterListeners.get(aEvent).some(l => l === listener)) { - try { - listener.apply(null, _arguments); - } catch (ex) { - // Prevent a bad listener from interfering with the others. - var msg = ex + ": " + ex.stack; - //console.error(msg); - console.log(msg); - } - } - }; - - for (var listener of this._eventEmitterListeners.get(aEvent)) { - var _ret = _loop(listener); - - if (_ret === "break") break; - } - } -}; - -/***/ }), -/* 969 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -/* This Source Code Form is subject to the terms of the Mozilla Public - * 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/. */ - -/* - * A sham for https://dxr.mozilla.org/mozilla-central/source/toolkit/modules/Promise.jsm - */ - -/** - * Promise.jsm is mostly the Promise web API with a `defer` method. Just drop this in here, - * and use the native web API (although building with webpack/babel, it may replace this - * with it's own version if we want to target environments that do not have `Promise`. - */ - -var p = typeof window != "undefined" ? window.Promise : Promise; -p.defer = function defer() { - var resolve, reject; - var promise = new Promise(function () { - resolve = arguments[0]; - reject = arguments[1]; - }); - return { - resolve: resolve, - reject: reject, - promise: promise - }; -}; - -module.exports = p; - -/***/ }), -/* 970 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -/* This Source Code Form is subject to the terms of the Mozilla Public - * 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/. */ - -/** - * A partial implementation of the MenuItem API provided by electron: - * https://github.com/electron/electron/blob/master/docs/api/menu-item.md. - * - * Missing features: - * - id String - Unique within a single menu. If defined then it can be used - * as a reference to this item by the position attribute. - * - role String - Define the action of the menu item; when specified the - * click property will be ignored - * - sublabel String - * - accelerator Accelerator - * - icon NativeImage - * - position String - This field allows fine-grained definition of the - * specific location within a given menu. - * - * Implemented features: - * @param Object options - * Function click - * Will be called with click(menuItem, browserWindow) when the menu item - * is clicked - * String type - * Can be normal, separator, submenu, checkbox or radio - * String label - * Boolean enabled - * If false, the menu item will be greyed out and unclickable. - * Boolean checked - * Should only be specified for checkbox or radio type menu items. - * Menu submenu - * Should be specified for submenu type menu items. If submenu is specified, - * the type: 'submenu' can be omitted. If the value is not a Menu then it - * will be automatically converted to one using Menu.buildFromTemplate. - * Boolean visible - * If false, the menu item will be entirely hidden. - */ -function MenuItem() { - var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, - _ref$accesskey = _ref.accesskey, - accesskey = _ref$accesskey === undefined ? null : _ref$accesskey, - _ref$checked = _ref.checked, - checked = _ref$checked === undefined ? false : _ref$checked, - _ref$click = _ref.click, - click = _ref$click === undefined ? () => {} : _ref$click, - _ref$disabled = _ref.disabled, - disabled = _ref$disabled === undefined ? false : _ref$disabled, - _ref$label = _ref.label, - label = _ref$label === undefined ? "" : _ref$label, - _ref$id = _ref.id, - id = _ref$id === undefined ? null : _ref$id, - _ref$submenu = _ref.submenu, - submenu = _ref$submenu === undefined ? null : _ref$submenu, - _ref$type = _ref.type, - type = _ref$type === undefined ? "normal" : _ref$type, - _ref$visible = _ref.visible, - visible = _ref$visible === undefined ? true : _ref$visible; - - this.accesskey = accesskey; - this.checked = checked; - this.click = click; - this.disabled = disabled; - this.id = id; - this.label = label; - this.submenu = submenu; - this.type = type; - this.visible = visible; -} - -module.exports = MenuItem; - -/***/ }), -/* 971 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -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"); } }; }(); - -/* This Source Code Form is subject to the terms of the Mozilla Public - * 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/. */ - -var Services = __webpack_require__(22); -var EventEmitter = __webpack_require__(968); - -/** - * Shortcuts for lazily accessing and setting various preferences. - * Usage: - * let prefs = new Prefs("root.path.to.branch", { - * myIntPref: ["Int", "leaf.path.to.my-int-pref"], - * myCharPref: ["Char", "leaf.path.to.my-char-pref"], - * myJsonPref: ["Json", "leaf.path.to.my-json-pref"], - * myFloatPref: ["Float", "leaf.path.to.my-float-pref"] - * ... - * }); - * - * Get/set: - * prefs.myCharPref = "foo"; - * let aux = prefs.myCharPref; - * - * Observe: - * prefs.registerObserver(); - * prefs.on("pref-changed", (prefName, prefValue) => { - * ... - * }); - * - * @param string prefsRoot - * The root path to the required preferences branch. - * @param object prefsBlueprint - * An object containing { accessorName: [prefType, prefName, prefDefault] } keys. - */ -function PrefsHelper() { - var prefsRoot = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ""; - var prefsBlueprint = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - - EventEmitter.decorate(this); - - var cache = new Map(); - - for (var accessorName in prefsBlueprint) { - var _prefsBlueprint$acces = _slicedToArray(prefsBlueprint[accessorName], 3), - prefType = _prefsBlueprint$acces[0], - prefName = _prefsBlueprint$acces[1], - prefDefault = _prefsBlueprint$acces[2]; - - map(this, cache, accessorName, prefType, prefsRoot, prefName, prefDefault); - } - - var observer = makeObserver(this, cache, prefsRoot, prefsBlueprint); - this.registerObserver = () => observer.register(); - this.unregisterObserver = () => observer.unregister(); -} - -/** - * Helper method for getting a pref value. - * - * @param Map cache - * @param string prefType - * @param string prefsRoot - * @param string prefName - * @return any - */ -function get(cache, prefType, prefsRoot, prefName) { - var cachedPref = cache.get(prefName); - if (cachedPref !== undefined) { - return cachedPref; - } - var value = Services.prefs["get" + prefType + "Pref"]([prefsRoot, prefName].join(".")); - cache.set(prefName, value); - return value; -} - -/** - * Helper method for setting a pref value. - * - * @param Map cache - * @param string prefType - * @param string prefsRoot - * @param string prefName - * @param any value - */ -function set(cache, prefType, prefsRoot, prefName, value) { - Services.prefs["set" + prefType + "Pref"]([prefsRoot, prefName].join("."), value); - cache.set(prefName, value); -} - -/** - * Maps a property name to a pref, defining lazy getters and setters. - * Supported types are "Bool", "Char", "Int", "Float" (sugar around "Char" - * type and casting), and "Json" (which is basically just sugar for "Char" - * using the standard JSON serializer). - * - * @param PrefsHelper self - * @param Map cache - * @param string accessorName - * @param string prefType - * @param string prefsRoot - * @param string prefName - * @param string prefDefault - * @param array serializer [optional] - */ -function map(self, cache, accessorName, prefType, prefsRoot, prefName, prefDefault) { - var serializer = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : { in: e => e, out: e => e }; - - if (prefName in self) { - throw new Error(`Can't use ${prefName} because it overrides a property` + "on the instance."); - } - if (prefType == "Json") { - map(self, cache, accessorName, "String", prefsRoot, prefName, prefDefault, { - in: JSON.parse, - out: JSON.stringify - }); - return; - } - if (prefType == "Float") { - map(self, cache, accessorName, "Char", prefsRoot, prefName, prefDefault, { - in: Number.parseFloat, - out: n => n + "" - }); - return; - } - - Object.defineProperty(self, accessorName, { - get: () => { - try { - return serializer.in(get(cache, prefType, prefsRoot, prefName)); - } catch (e) { - if (typeof prefDefault !== 'undefined') { - return prefDefault; - } - throw e; - } - }, - set: e => set(cache, prefType, prefsRoot, prefName, serializer.out(e)) - }); -} - -/** - * Finds the accessor for the provided pref, based on the blueprint object - * used in the constructor. - * - * @param PrefsHelper self - * @param object prefsBlueprint - * @return string - */ -function accessorNameForPref(somePrefName, prefsBlueprint) { - for (var accessorName in prefsBlueprint) { - var _prefsBlueprint$acces2 = _slicedToArray(prefsBlueprint[accessorName], 2), - prefName = _prefsBlueprint$acces2[1]; - - if (somePrefName == prefName) { - return accessorName; - } - } - return ""; -} - -/** - * Creates a pref observer for `self`. - * - * @param PrefsHelper self - * @param Map cache - * @param string prefsRoot - * @param object prefsBlueprint - * @return object - */ -function makeObserver(self, cache, prefsRoot, prefsBlueprint) { - return { - register: function () { - this._branch = Services.prefs.getBranch(prefsRoot + "."); - this._branch.addObserver("", this); - }, - unregister: function () { - this._branch.removeObserver("", this); - }, - observe: function (subject, topic, prefName) { - // If this particular pref isn't handled by the blueprint object, - // even though it's in the specified branch, ignore it. - var accessorName = accessorNameForPref(prefName, prefsBlueprint); - if (!(accessorName in self)) { - return; - } - cache.delete(prefName); - self.emit("pref-changed", accessorName, self[accessorName]); - } - }; -} - -exports.PrefsHelper = PrefsHelper; - -/***/ }), -/* 972 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -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"); } }; }(); - -/* This Source Code Form is subject to the terms of the Mozilla Public - * 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/. */ - -var _require = __webpack_require__(22), - appinfo = _require.appinfo; - -var EventEmitter = __webpack_require__(968); -var isOSX = appinfo.OS === "Darwin"; - -// List of electron keys mapped to DOM API (DOM_VK_*) key code -var ElectronKeysMapping = { - "F1": "DOM_VK_F1", - "F2": "DOM_VK_F2", - "F3": "DOM_VK_F3", - "F4": "DOM_VK_F4", - "F5": "DOM_VK_F5", - "F6": "DOM_VK_F6", - "F7": "DOM_VK_F7", - "F8": "DOM_VK_F8", - "F9": "DOM_VK_F9", - "F10": "DOM_VK_F10", - "F11": "DOM_VK_F11", - "F12": "DOM_VK_F12", - "F13": "DOM_VK_F13", - "F14": "DOM_VK_F14", - "F15": "DOM_VK_F15", - "F16": "DOM_VK_F16", - "F17": "DOM_VK_F17", - "F18": "DOM_VK_F18", - "F19": "DOM_VK_F19", - "F20": "DOM_VK_F20", - "F21": "DOM_VK_F21", - "F22": "DOM_VK_F22", - "F23": "DOM_VK_F23", - "F24": "DOM_VK_F24", - "Space": "DOM_VK_SPACE", - "Backspace": "DOM_VK_BACK_SPACE", - "Delete": "DOM_VK_DELETE", - "Insert": "DOM_VK_INSERT", - "Return": "DOM_VK_RETURN", - "Enter": "DOM_VK_RETURN", - "Up": "DOM_VK_UP", - "Down": "DOM_VK_DOWN", - "Left": "DOM_VK_LEFT", - "Right": "DOM_VK_RIGHT", - "Home": "DOM_VK_HOME", - "End": "DOM_VK_END", - "PageUp": "DOM_VK_PAGE_UP", - "PageDown": "DOM_VK_PAGE_DOWN", - "Escape": "DOM_VK_ESCAPE", - "Esc": "DOM_VK_ESCAPE", - "Tab": "DOM_VK_TAB", - "VolumeUp": "DOM_VK_VOLUME_UP", - "VolumeDown": "DOM_VK_VOLUME_DOWN", - "VolumeMute": "DOM_VK_VOLUME_MUTE", - "PrintScreen": "DOM_VK_PRINTSCREEN" -}; - -/** - * Helper to listen for keyboard events decribed in .properties file. - * - * let shortcuts = new KeyShortcuts({ - * window - * }); - * shortcuts.on("Ctrl+F", event => { - * // `event` is the KeyboardEvent which relates to the key shortcuts - * }); - * - * @param DOMWindow window - * The window object of the document to listen events from. - * @param DOMElement target - * Optional DOM Element on which we should listen events from. - * If omitted, we listen for all events fired on `window`. - */ -function KeyShortcuts(_ref) { - var window = _ref.window, - target = _ref.target; - - this.window = window; - this.target = target || window; - this.keys = new Map(); - this.eventEmitter = new EventEmitter(); - this.target.addEventListener("keydown", this); -} - -/* - * Parse an electron-like key string and return a normalized object which - * allow efficient match on DOM key event. The normalized object matches DOM - * API. - * - * @param DOMWindow window - * Any DOM Window object, just to fetch its `KeyboardEvent` object - * @param String str - * The shortcut string to parse, following this document: - * https://github.com/electron/electron/blob/master/docs/api/accelerator.md - */ -KeyShortcuts.parseElectronKey = function (window, str) { - var modifiers = str.split("+"); - var key = modifiers.pop(); - - var shortcut = { - ctrl: false, - meta: false, - alt: false, - shift: false, - // Set for character keys - key: undefined, - // Set for non-character keys - keyCode: undefined - }; - for (var mod of modifiers) { - if (mod === "Alt") { - shortcut.alt = true; - } else if (["Command", "Cmd"].includes(mod)) { - shortcut.meta = true; - } else if (["CommandOrControl", "CmdOrCtrl"].includes(mod)) { - if (isOSX) { - shortcut.meta = true; - } else { - shortcut.ctrl = true; - } - } else if (["Control", "Ctrl"].includes(mod)) { - shortcut.ctrl = true; - } else if (mod === "Shift") { - shortcut.shift = true; - } else { - console.error("Unsupported modifier:", mod, "from key:", str); - return null; - } - } - - // Plus is a special case. It's a character key and shouldn't be matched - // against a keycode as it is only accessible via Shift/Capslock - if (key === "Plus") { - key = "+"; - } - - if (typeof key === "string" && key.length === 1) { - // Match any single character - shortcut.key = key.toLowerCase(); - } else if (key in ElectronKeysMapping) { - // Maps the others manually to DOM API DOM_VK_* - key = ElectronKeysMapping[key]; - shortcut.keyCode = window.KeyboardEvent[key]; - // Used only to stringify the shortcut - shortcut.keyCodeString = key; - shortcut.key = key; - } else { - console.error("Unsupported key:", key); - return null; - } - - return shortcut; -}; - -KeyShortcuts.stringify = function (shortcut) { - var list = []; - if (shortcut.alt) { - list.push("Alt"); - } - if (shortcut.ctrl) { - list.push("Ctrl"); - } - if (shortcut.meta) { - list.push("Cmd"); - } - if (shortcut.shift) { - list.push("Shift"); - } - var key = void 0; - if (shortcut.key) { - key = shortcut.key.toUpperCase(); - } else { - key = shortcut.keyCodeString; - } - list.push(key); - return list.join("+"); -}; - -KeyShortcuts.prototype = { - destroy() { - this.target.removeEventListener("keydown", this); - this.keys.clear(); - }, - - doesEventMatchShortcut(event, shortcut) { - if (shortcut.meta != event.metaKey) { - return false; - } - if (shortcut.ctrl != event.ctrlKey) { - return false; - } - if (shortcut.alt != event.altKey) { - return false; - } - // Shift is a special modifier, it may implicitely be required if the - // expected key is a special character accessible via shift. - if (shortcut.shift != event.shiftKey && event.key && event.key.match(/[a-zA-Z]/)) { - return false; - } - if (shortcut.keyCode) { - return event.keyCode == shortcut.keyCode; - } else if (event.key in ElectronKeysMapping) { - return ElectronKeysMapping[event.key] === shortcut.key; - } - - // get the key from the keyCode if key is not provided. - var key = event.key || String.fromCharCode(event.keyCode); - - // For character keys, we match if the final character is the expected one. - // But for digits we also accept indirect match to please azerty keyboard, - // which requires Shift to be pressed to get digits. - return key.toLowerCase() == shortcut.key || shortcut.key.match(/^[0-9]$/) && event.keyCode == shortcut.key.charCodeAt(0); - }, - - handleEvent(event) { - for (var _ref2 of this.keys) { - var _ref3 = _slicedToArray(_ref2, 2); - - var key = _ref3[0]; - var shortcut = _ref3[1]; - - if (this.doesEventMatchShortcut(event, shortcut)) { - this.eventEmitter.emit(key, event); - } - } - }, - - on(key, listener) { - if (typeof listener !== "function") { - throw new Error("KeyShortcuts.on() expects a function as " + "second argument"); - } - if (!this.keys.has(key)) { - var shortcut = KeyShortcuts.parseElectronKey(this.window, key); - // The key string is wrong and we were unable to compute the key shortcut - if (!shortcut) { - return; - } - this.keys.set(key, shortcut); - } - this.eventEmitter.on(key, listener); - }, - - off(key, listener) { - this.eventEmitter.off(key, listener); - } -}; -module.exports = KeyShortcuts; - -/***/ }), +/* 967 */, +/* 968 */, +/* 969 */, +/* 970 */, +/* 971 */, +/* 972 */, /* 973 */, /* 974 */, -/* 975 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -var __WEBPACK_AMD_DEFINE_RESULT__; - -/* globals window, exports, define */ - -(function (window) { - 'use strict'; - - var re = { - not_string: /[^s]/, - not_bool: /[^t]/, - not_type: /[^T]/, - not_primitive: /[^v]/, - number: /[diefg]/, - numeric_arg: /bcdiefguxX/, - json: /[j]/, - not_json: /[^j]/, - text: /^[^\x25]+/, - modulo: /^\x25{2}/, - placeholder: /^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijosStTuvxX])/, - key: /^([a-z_][a-z_\d]*)/i, - key_access: /^\.([a-z_][a-z_\d]*)/i, - index_access: /^\[(\d+)\]/, - sign: /^[\+\-]/ - }; - - function sprintf() { - var key = arguments[0], - cache = sprintf.cache; - if (!(cache[key] && cache.hasOwnProperty(key))) { - cache[key] = sprintf.parse(key); - } - return sprintf.format.call(null, cache[key], arguments); - } - - sprintf.format = function (parse_tree, argv) { - var cursor = 1, - tree_length = parse_tree.length, - node_type = '', - arg, - output = [], - i, - k, - match, - pad, - pad_character, - pad_length, - is_positive = true, - sign = ''; - for (i = 0; i < tree_length; i++) { - node_type = get_type(parse_tree[i]); - if (node_type === 'string') { - output[output.length] = parse_tree[i]; - } else if (node_type === 'array') { - match = parse_tree[i]; // convenience purposes only - if (match[2]) { - // keyword argument - arg = argv[cursor]; - for (k = 0; k < match[2].length; k++) { - if (!arg.hasOwnProperty(match[2][k])) { - throw new Error(sprintf('[sprintf] property "%s" does not exist', match[2][k])); - } - arg = arg[match[2][k]]; - } - } else if (match[1]) { - // positional argument (explicit) - arg = argv[match[1]]; - } else { - // positional argument (implicit) - arg = argv[cursor++]; - } - - if (re.not_type.test(match[8]) && re.not_primitive.test(match[8]) && get_type(arg) == 'function') { - arg = arg(); - } - - if (re.numeric_arg.test(match[8]) && get_type(arg) != 'number' && isNaN(arg)) { - throw new TypeError(sprintf("[sprintf] expecting number but found %s", get_type(arg))); - } - - if (re.number.test(match[8])) { - is_positive = arg >= 0; - } - - switch (match[8]) { - case 'b': - arg = parseInt(arg, 10).toString(2); - break; - case 'c': - arg = String.fromCharCode(parseInt(arg, 10)); - break; - case 'd': - case 'i': - arg = parseInt(arg, 10); - break; - case 'j': - arg = JSON.stringify(arg, null, match[6] ? parseInt(match[6]) : 0); - break; - case 'e': - arg = match[7] ? parseFloat(arg).toExponential(match[7]) : parseFloat(arg).toExponential(); - break; - case 'f': - arg = match[7] ? parseFloat(arg).toFixed(match[7]) : parseFloat(arg); - break; - case 'g': - arg = match[7] ? parseFloat(arg).toPrecision(match[7]) : parseFloat(arg); - break; - case 'o': - arg = arg.toString(8); - break; - case 's': - case 'S': - arg = String(arg); - arg = match[7] ? arg.substring(0, match[7]) : arg; - break; - case 't': - arg = String(!!arg); - arg = match[7] ? arg.substring(0, match[7]) : arg; - break; - case 'T': - arg = get_type(arg); - arg = match[7] ? arg.substring(0, match[7]) : arg; - break; - case 'u': - arg = parseInt(arg, 10) >>> 0; - break; - case 'v': - arg = arg.valueOf(); - arg = match[7] ? arg.substring(0, match[7]) : arg; - break; - case 'x': - arg = parseInt(arg, 10).toString(16); - break; - case 'X': - arg = parseInt(arg, 10).toString(16).toUpperCase(); - break; - } - if (re.json.test(match[8])) { - output[output.length] = arg; - } else { - if (re.number.test(match[8]) && (!is_positive || match[3])) { - sign = is_positive ? '+' : '-'; - arg = arg.toString().replace(re.sign, ''); - } else { - sign = ''; - } - pad_character = match[4] ? match[4] === '0' ? '0' : match[4].charAt(1) : ' '; - pad_length = match[6] - (sign + arg).length; - pad = match[6] ? pad_length > 0 ? str_repeat(pad_character, pad_length) : '' : ''; - output[output.length] = match[5] ? sign + arg + pad : pad_character === '0' ? sign + pad + arg : pad + sign + arg; - } - } - } - return output.join(''); - }; - - sprintf.cache = {}; - - sprintf.parse = function (fmt) { - var _fmt = fmt, - match = [], - parse_tree = [], - arg_names = 0; - while (_fmt) { - if ((match = re.text.exec(_fmt)) !== null) { - parse_tree[parse_tree.length] = match[0]; - } else if ((match = re.modulo.exec(_fmt)) !== null) { - parse_tree[parse_tree.length] = '%'; - } else if ((match = re.placeholder.exec(_fmt)) !== null) { - if (match[2]) { - arg_names |= 1; - var field_list = [], - replacement_field = match[2], - field_match = []; - if ((field_match = re.key.exec(replacement_field)) !== null) { - field_list[field_list.length] = field_match[1]; - while ((replacement_field = replacement_field.substring(field_match[0].length)) !== '') { - if ((field_match = re.key_access.exec(replacement_field)) !== null) { - field_list[field_list.length] = field_match[1]; - } else if ((field_match = re.index_access.exec(replacement_field)) !== null) { - field_list[field_list.length] = field_match[1]; - } else { - throw new SyntaxError("[sprintf] failed to parse named argument key"); - } - } - } else { - throw new SyntaxError("[sprintf] failed to parse named argument key"); - } - match[2] = field_list; - } else { - arg_names |= 2; - } - if (arg_names === 3) { - throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported"); - } - parse_tree[parse_tree.length] = match; - } else { - throw new SyntaxError("[sprintf] unexpected placeholder"); - } - _fmt = _fmt.substring(match[0].length); - } - return parse_tree; - }; - - var vsprintf = function (fmt, argv, _argv) { - _argv = (argv || []).slice(0); - _argv.splice(0, 0, fmt); - return sprintf.apply(null, _argv); - }; - - /** - * helpers - */ - function get_type(variable) { - if (typeof variable === 'number') { - return 'number'; - } else if (typeof variable === 'string') { - return 'string'; - } else { - return Object.prototype.toString.call(variable).slice(8, -1).toLowerCase(); - } - } - - var preformattedPadding = { - '0': ['', '0', '00', '000', '0000', '00000', '000000', '0000000'], - ' ': ['', ' ', ' ', ' ', ' ', ' ', ' ', ' '], - '_': ['', '_', '__', '___', '____', '_____', '______', '_______'] - }; - function str_repeat(input, multiplier) { - if (multiplier >= 0 && multiplier <= 7 && preformattedPadding[input]) { - return preformattedPadding[input][multiplier]; - } - return Array(multiplier + 1).join(input); - } - - /** - * export to either browser or node.js - */ - if (true) { - exports.sprintf = sprintf; - exports.vsprintf = vsprintf; - } - if (typeof window !== 'undefined') { - window.sprintf = sprintf; - window.vsprintf = vsprintf; - - if (true) { - !(__WEBPACK_AMD_DEFINE_RESULT__ = function () { - return { - sprintf: sprintf, - vsprintf: vsprintf - }; - }.call(exports, __webpack_require__, exports, module), - __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); - } - } -})(typeof window === 'undefined' ? undefined : window); - -/***/ }), +/* 975 */, /* 976 */, /* 977 */, /* 978 */, @@ -37541,36 +14538,7 @@ var __WEBPACK_AMD_DEFINE_RESULT__; /* 989 */, /* 990 */, /* 991 */, -/* 992 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.timing = timing; -/** - * Redux middleware that sets performance markers for all actions such that they - * will appear in performance tooling under the User Timing API - */ - -var mark = window.performance && window.performance.mark ? window.performance.mark.bind(window.performance) : () => {}; - -var measure = window.performance && window.performance.measure ? window.performance.measure.bind(window.performance) : () => {}; - -function timing(store) { - return next => action => { - mark(`${action.type}_start`); - var result = next(action); - mark(`${action.type}_end`); - measure(`${action.type}`, `${action.type}_start`, `${action.type}_end`); - return result; - }; -} - -/***/ }), +/* 992 */, /* 993 */ /***/ (function(module, exports, __webpack_require__) { @@ -37702,97 +14670,9 @@ function createStructuredSelector(selectors) { } /***/ }), -/* 994 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -/* This Source Code Form is subject to the terms of the Mozilla Public - * 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/. */ - -var SourceEditor = __webpack_require__(197); -var SourceEditorUtils = __webpack_require__(996); - -module.exports = { SourceEditor, SourceEditorUtils }; - -/***/ }), +/* 994 */, /* 995 */, -/* 996 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -/* This Source Code Form is subject to the terms of the Mozilla Public - * 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/. */ - -function forEachLine(codeMirror, iter) { - codeMirror.operation(() => { - codeMirror.doc.iter(0, codeMirror.lineCount(), iter); - }); -} - -function removeLineClass(codeMirror, line, className) { - codeMirror.removeLineClass(line, "line", className); -} - -function clearLineClass(codeMirror, className) { - forEachLine(codeMirror, line => { - removeLineClass(codeMirror, line, className); - }); -} - -function getTextForLine(codeMirror, line) { - return codeMirror.getLine(line - 1).trim(); -} - -function getCursorLine(codeMirror) { - return codeMirror.getCursor().line; -} - -function getTokenLocation(codeMirror, tokenEl) { - var lineOffset = 1; - - var _tokenEl$getBoundingC = tokenEl.getBoundingClientRect(), - left = _tokenEl$getBoundingC.left, - top = _tokenEl$getBoundingC.top; - - var _codeMirror$coordsCha = codeMirror.coordsChar({ left, top }), - line = _codeMirror$coordsCha.line, - ch = _codeMirror$coordsCha.ch; - - return { - line: line + lineOffset, - column: ch - }; -} - -/** - * Forces the breakpoint gutter to be the same size as the line - * numbers gutter. Editor CSS will absolutely position the gutter - * beneath the line numbers. This makes it easy to be flexible with - * how we overlay breakpoints. - */ -function resizeBreakpointGutter(editor) { - var gutters = editor.display.gutters; - var lineNumbers = gutters.querySelector(".CodeMirror-linenumbers"); - var breakpoints = gutters.querySelector(".breakpoints"); - breakpoints.style.width = `${lineNumbers.clientWidth}px`; -} - -module.exports = { - removeLineClass, - clearLineClass, - getTextForLine, - getCursorLine, - getTokenLocation, - resizeBreakpointGutter -}; - -/***/ }), +/* 996 */, /* 997 */ /***/ (function(module, exports) { @@ -37843,1462 +14723,15 @@ module.exports = " this.props.onCollapse(this.props.item) : e => this.props.onExpand(this.props.item, e.altKey) - }; - - if (this.props.expanded) { - attrs.className += " open"; - } - - if (!this.props.visible) { - attrs.style = Object.assign({}, this.props.style || {}, { - visibility: "hidden" - }); - } - - return dom.div(attrs, this.props.children); - } -})); - -var TreeNode = createFactory(createClass({ - displayName: "TreeNode", - - componentDidMount() { - if (this.props.focused) { - this.refs.button.focus(); - } - }, - - componentDidUpdate() { - if (this.props.focused) { - this.refs.button.focus(); - } - }, - - shouldComponentUpdate(nextProps) { - return this.props.item !== nextProps.item || this.props.focused !== nextProps.focused || this.props.expanded !== nextProps.expanded; - }, - - render() { - var arrow = ArrowExpander({ - item: this.props.item, - expanded: this.props.expanded, - visible: this.props.hasChildren, - onExpand: this.props.onExpand, - onCollapse: this.props.onCollapse - }); - - var isOddRow = this.props.index % 2; - return dom.div({ - className: `tree-node div ${isOddRow ? "tree-node-odd" : ""}`, - onFocus: this.props.onFocus, - onClick: this.props.onFocus, - onBlur: this.props.onBlur, - style: { - padding: 0, - margin: 0 - } - }, this.props.renderItem(this.props.item, this.props.depth, this.props.focused, arrow, this.props.expanded), - - // XXX: OSX won't focus/blur regular elements even if you set tabindex - // unless there is an input/button child. - dom.button(this._buttonAttrs)); - }, - - _buttonAttrs: { - ref: "button", - style: { - opacity: 0, - width: "0 !important", - height: "0 !important", - padding: "0 !important", - outline: "none", - MozAppearance: "none", - // XXX: Despite resetting all of the above properties (and margin), the - // button still ends up with ~79px width, so we set a large negative - // margin to completely hide it. - MozMarginStart: "-1000px !important" - } - } -})); - -/** - * Create a function that calls the given function `fn` only once per animation - * frame. - * - * @param {Function} fn - * @returns {Function} - */ -function oncePerAnimationFrame(fn) { - var animationId = null; - var argsToPass = null; - return function () { - for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - - argsToPass = args; - if (animationId !== null) { - return; - } - - animationId = requestAnimationFrame(() => { - fn.call.apply(fn, [this].concat(_toConsumableArray(argsToPass))); - animationId = null; - argsToPass = null; - }); - }; -} - -var NUMBER_OF_OFFSCREEN_ITEMS = 1; - -/** - * A generic tree component. See propTypes for the public API. - * - * @see `devtools/client/memory/components/test/mochitest/head.js` for usage - * @see `devtools/client/memory/components/heap.js` for usage - */ -var Tree = module.exports = createClass({ - displayName: "Tree", - - propTypes: { - // Required props - - // A function to get an item's parent, or null if it is a root. - getParent: PropTypes.func.isRequired, - // A function to get an item's children. - getChildren: PropTypes.func.isRequired, - // A function which takes an item and ArrowExpander and returns a - // component. - renderItem: PropTypes.func.isRequired, - // A function which returns the roots of the tree (forest). - getRoots: PropTypes.func.isRequired, - // A function to get a unique key for the given item. - getKey: PropTypes.func.isRequired, - // A function to get whether an item is expanded or not. If an item is not - // expanded, then it must be collapsed. - isExpanded: PropTypes.func.isRequired, - // The height of an item in the tree including margin and padding, in - // pixels. - itemHeight: PropTypes.number.isRequired, - - // Optional props - - // The currently focused item, if any such item exists. - focused: PropTypes.any, - // Handle when a new item is focused. - onFocus: PropTypes.func, - // The depth to which we should automatically expand new items. - autoExpandDepth: PropTypes.number, - // Should auto expand all new items or just the new items under the first - // root item. - autoExpandAll: PropTypes.bool, - // Optional event handlers for when items are expanded or collapsed. - onExpand: PropTypes.func, - onCollapse: PropTypes.func - }, - - getDefaultProps() { - return { - autoExpandDepth: AUTO_EXPAND_DEPTH, - autoExpandAll: true - }; - }, - - getInitialState() { - return { - scroll: 0, - height: window.innerHeight, - seen: new Set() - }; - }, - - componentDidMount() { - window.addEventListener("resize", this._updateHeight); - this._autoExpand(this.props); - this._updateHeight(); - }, - - componentWillUnmount() { - window.removeEventListener("resize", this._updateHeight); - }, - - componentWillReceiveProps(nextProps) { - this._autoExpand(nextProps); - this._updateHeight(); - }, - - _autoExpand(props) { - if (!props.autoExpandDepth) { - return; - } - - // Automatically expand the first autoExpandDepth levels for new items. Do - // not use the usual DFS infrastructure because we don't want to ignore - // collapsed nodes. - var autoExpand = (item, currentDepth) => { - if (currentDepth >= props.autoExpandDepth || this.state.seen.has(item)) { - return; - } - - props.onExpand(item); - this.state.seen.add(item); - - var children = props.getChildren(item); - var length = children.length; - for (var i = 0; i < length; i++) { - autoExpand(children[i], currentDepth + 1); - } - }; - - var roots = props.getRoots(); - var length = roots.length; - if (props.autoExpandAll) { - for (var i = 0; i < length; i++) { - autoExpand(roots[i], 0); - } - } else if (length != 0) { - autoExpand(roots[0], 0); - } - }, - - render() { - var traversal = this._dfsFromRoots(); - - var renderItem = i => { - var _traversal$i = traversal[i], - item = _traversal$i.item, - depth = _traversal$i.depth; - - return TreeNode({ - key: this.props.getKey(item, i), - index: i, - item: item, - depth: depth, - renderItem: this.props.renderItem, - focused: this.props.focused === item, - expanded: this.props.isExpanded(item), - hasChildren: !!this.props.getChildren(item).length, - onExpand: this._onExpand, - onCollapse: this._onCollapse, - onFocus: () => this._focus(i, item) - }); - }; - - var style = Object.assign({}, this.props.style || {}, { - padding: 0, - margin: 0 - }); - - return dom.div({ - className: `tree ${this.props.className ? this.props.className : ""}`, - ref: "tree", - onKeyDown: this._onKeyDown, - onKeyPress: this._preventArrowKeyScrolling, - onKeyUp: this._preventArrowKeyScrolling, - onScroll: this._onScroll, - style - }, traversal.map((v, i) => renderItem(i))); - }, - - _preventArrowKeyScrolling(e) { - switch (e.key) { - case "ArrowUp": - case "ArrowDown": - case "ArrowLeft": - case "ArrowRight": - e.preventDefault(); - e.stopPropagation(); - if (e.nativeEvent) { - if (e.nativeEvent.preventDefault) { - e.nativeEvent.preventDefault(); - } - if (e.nativeEvent.stopPropagation) { - e.nativeEvent.stopPropagation(); - } - } - } - }, - - /** - * Updates the state's height based on clientHeight. - */ - _updateHeight() { - this.setState({ - height: this.refs.tree.clientHeight - }); - }, - - /** - * Perform a pre-order depth-first search from item. - */ - _dfs(item) { - var maxDepth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Infinity; - var traversal = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : []; - - var _depth = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0; - - traversal.push({ item, depth: _depth }); - - if (!this.props.isExpanded(item)) { - return traversal; - } - - var nextDepth = _depth + 1; - - if (nextDepth > maxDepth) { - return traversal; - } - - var children = this.props.getChildren(item); - var length = children.length; - for (var i = 0; i < length; i++) { - this._dfs(children[i], maxDepth, traversal, nextDepth); - } - - return traversal; - }, - - /** - * Perform a pre-order depth-first search over the whole forest. - */ - _dfsFromRoots() { - var maxDepth = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : Infinity; - - var traversal = []; - - var roots = this.props.getRoots(); - var length = roots.length; - for (var i = 0; i < length; i++) { - this._dfs(roots[i], maxDepth, traversal); - } - - return traversal; - }, - - /** - * Expands current row. - * - * @param {Object} item - * @param {Boolean} expandAllChildren - */ - _onExpand: oncePerAnimationFrame(function (item, expandAllChildren) { - if (this.props.onExpand) { - this.props.onExpand(item); - - if (expandAllChildren) { - var children = this._dfs(item); - var length = children.length; - for (var i = 0; i < length; i++) { - this.props.onExpand(children[i].item); - } - } - } - }), - - /** - * Collapses current row. - * - * @param {Object} item - */ - _onCollapse: oncePerAnimationFrame(function (item) { - if (this.props.onCollapse) { - this.props.onCollapse(item); - } - }), - - /** - * Sets the passed in item to be the focused item. - * - * @param {Number} index - * The index of the item in a full DFS traversal (ignoring collapsed - * nodes). Ignored if `item` is undefined. - * - * @param {Object|undefined} item - * The item to be focused, or undefined to focus no item. - */ - _focus(index, item) { - if (item !== undefined) { - var itemStartPosition = index * this.props.itemHeight; - var itemEndPosition = (index + 1) * this.props.itemHeight; - - // Note that if the height of the viewport (this.state.height) is less than - // `this.props.itemHeight`, we could accidentally try and scroll both up and - // down in a futile attempt to make both the item's start and end positions - // visible. Instead, give priority to the start of the item by checking its - // position first, and then using an "else if", rather than a separate "if", - // for the end position. - if (this.state.scroll > itemStartPosition) { - this.refs.tree.scrollTop = itemStartPosition; - } else if (this.state.scroll + this.state.height < itemEndPosition) { - this.refs.tree.scrollTop = itemEndPosition - this.state.height; - } - } - - if (this.props.onFocus) { - this.props.onFocus(item); - } - }, - - /** - * Sets the state to have no focused item. - */ - _onBlur() { - this._focus(0, undefined); - }, - - /** - * Fired on a scroll within the tree's container, updates - * the stored position of the view port to handle virtual view rendering. - * - * @param {Event} e - */ - _onScroll: oncePerAnimationFrame(function (e) { - this.setState({ - scroll: Math.max(this.refs.tree.scrollTop, 0), - height: this.refs.tree.clientHeight - }); - }), - - /** - * Handles key down events in the tree's container. - * - * @param {Event} e - */ - _onKeyDown(e) { - if (this.props.focused == null) { - return; - } - - // Allow parent nodes to use navigation arrows with modifiers. - if (e.altKey || e.ctrlKey || e.shiftKey || e.metaKey) { - return; - } - - this._preventArrowKeyScrolling(e); - - switch (e.key) { - case "ArrowUp": - this._focusPrevNode(); - return; - - case "ArrowDown": - this._focusNextNode(); - return; - - case "ArrowLeft": - if (this.props.isExpanded(this.props.focused) && this.props.getChildren(this.props.focused).length) { - this._onCollapse(this.props.focused); - } else { - this._focusParentNode(); - } - return; - - case "ArrowRight": - if (!this.props.isExpanded(this.props.focused)) { - this._onExpand(this.props.focused); - } - return; - } - }, - - /** - * Sets the previous node relative to the currently focused item, to focused. - */ - _focusPrevNode: oncePerAnimationFrame(function () { - // Start a depth first search and keep going until we reach the currently - // focused node. Focus the previous node in the DFS, if it exists. If it - // doesn't exist, we're at the first node already. - - var prev = void 0; - var prevIndex = void 0; - - var traversal = this._dfsFromRoots(); - var length = traversal.length; - for (var i = 0; i < length; i++) { - var item = traversal[i].item; - if (item === this.props.focused) { - break; - } - prev = item; - prevIndex = i; - } - - if (prev === undefined) { - return; - } - - this._focus(prevIndex, prev); - }), - - /** - * Handles the down arrow key which will focus either the next child - * or sibling row. - */ - _focusNextNode: oncePerAnimationFrame(function () { - // Start a depth first search and keep going until we reach the currently - // focused node. Focus the next node in the DFS, if it exists. If it - // doesn't exist, we're at the last node already. - - var traversal = this._dfsFromRoots(); - var length = traversal.length; - var i = 0; - - while (i < length) { - if (traversal[i].item === this.props.focused) { - break; - } - i++; - } - - if (i + 1 < traversal.length) { - this._focus(i + 1, traversal[i + 1].item); - } - }), - - /** - * Handles the left arrow key, going back up to the current rows' - * parent row. - */ - _focusParentNode: oncePerAnimationFrame(function () { - var parent = this.props.getParent(this.props.focused); - if (!parent) { - return; - } - - var traversal = this._dfsFromRoots(); - var length = traversal.length; - var parentIndex = 0; - for (; parentIndex < length; parentIndex++) { - if (traversal[parentIndex].item === parent) { - break; - } - } - - this._focus(parentIndex, parent); - }) -}); - -/***/ }), +/* 1007 */, +/* 1008 */, /* 1009 */, /* 1010 */, /* 1011 */, -/* 1012 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.getAndProcessFrames = getAndProcessFrames; - -var _propTypes = __webpack_require__(20); - -var _propTypes2 = _interopRequireDefault(_propTypes); - -var _react = __webpack_require__(0); - -var _react2 = _interopRequireDefault(_react); - -var _redux = __webpack_require__(3); - -var _reactRedux = __webpack_require__(1189); - -var _reselect = __webpack_require__(993); - -var _lodash = __webpack_require__(2); - -var _Frame = __webpack_require__(1013); - -var _Frame2 = _interopRequireDefault(_Frame); - -var _Group = __webpack_require__(1015); - -var _Group2 = _interopRequireDefault(_Group); - -var _WhyPaused = __webpack_require__(1120); - -var _WhyPaused2 = _interopRequireDefault(_WhyPaused); - -var _actions = __webpack_require__(244); - -var _actions2 = _interopRequireDefault(_actions); - -var _frame = __webpack_require__(1014); - -var _clipboard = __webpack_require__(423); - -var _selectors = __webpack_require__(242); - -__webpack_require__(1338); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var NUM_FRAMES_SHOWN = 7; - -class Frames extends _react.Component { - - constructor() { - super(...arguments); - - this.state = { - showAllFrames: false - }; - - this.toggleFramesDisplay = this.toggleFramesDisplay.bind(this); - this.copyStackTrace = this.copyStackTrace.bind(this); - this.toggleFrameworkGrouping = this.toggleFrameworkGrouping.bind(this); - } - - shouldComponentUpdate(nextProps, nextState) { - var _props = this.props, - frames = _props.frames, - selectedFrame = _props.selectedFrame, - frameworkGroupingOn = _props.frameworkGroupingOn; - var showAllFrames = this.state.showAllFrames; - - return frames !== nextProps.frames || selectedFrame !== nextProps.selectedFrame || showAllFrames !== nextState.showAllFrames || frameworkGroupingOn !== nextProps.frameworkGroupingOn; - } - - toggleFramesDisplay() { - this.setState({ - showAllFrames: !this.state.showAllFrames - }); - } - - collapseFrames(frames) { - var frameworkGroupingOn = this.props.frameworkGroupingOn; - - if (!frameworkGroupingOn) { - return frames; - } - - return (0, _frame.collapseFrames)(frames); - } - - truncateFrames(frames) { - var numFramesToShow = this.state.showAllFrames ? frames.length : NUM_FRAMES_SHOWN; - - return frames.slice(0, numFramesToShow); - } - - copyStackTrace() { - var frames = this.props.frames; - - var framesToCopy = frames.map(f => (0, _frame.formatCopyName)(f)).join("\n"); - (0, _clipboard.copyToTheClipboard)(framesToCopy); - } - - toggleFrameworkGrouping() { - var _props2 = this.props, - toggleFrameworkGrouping = _props2.toggleFrameworkGrouping, - frameworkGroupingOn = _props2.frameworkGroupingOn; - - toggleFrameworkGrouping(!frameworkGroupingOn); - } - - renderFrames(frames) { - var _props3 = this.props, - selectFrame = _props3.selectFrame, - selectedFrame = _props3.selectedFrame, - toggleBlackBox = _props3.toggleBlackBox, - frameworkGroupingOn = _props3.frameworkGroupingOn; - - - var framesOrGroups = this.truncateFrames(this.collapseFrames(frames)); - - - return _react2.default.createElement( - "ul", - null, - framesOrGroups.map(frameOrGroup => frameOrGroup.id ? _react2.default.createElement(_Frame2.default, { - frame: frameOrGroup, - toggleFrameworkGrouping: this.toggleFrameworkGrouping, - copyStackTrace: this.copyStackTrace, - frameworkGroupingOn: frameworkGroupingOn, - selectFrame: selectFrame, - selectedFrame: selectedFrame, - toggleBlackBox: toggleBlackBox, - key: frameOrGroup.id - }) : _react2.default.createElement(_Group2.default, { - group: frameOrGroup, - toggleFrameworkGrouping: this.toggleFrameworkGrouping, - copyStackTrace: this.copyStackTrace, - frameworkGroupingOn: frameworkGroupingOn, - selectFrame: selectFrame, - selectedFrame: selectedFrame, - toggleBlackBox: toggleBlackBox, - key: frameOrGroup[0].id - })) - ); - } - - renderToggleButton(frames) { - var buttonMessage = this.state.showAllFrames ? L10N.getStr("callStack.collapse") : L10N.getStr("callStack.expand"); - - frames = this.collapseFrames(frames); - if (frames.length <= NUM_FRAMES_SHOWN) { - return null; - } - - return _react2.default.createElement( - "div", - { className: "show-more", onClick: this.toggleFramesDisplay }, - buttonMessage - ); - } - - render() { - var _props4 = this.props, - frames = _props4.frames, - pause = _props4.pause; - - - if (!frames) { - return _react2.default.createElement( - "div", - { className: "pane frames" }, - _react2.default.createElement( - "div", - { className: "pane-info empty" }, - L10N.getStr("callStack.notPaused") - ) - ); - } - - return _react2.default.createElement( - "div", - { className: "pane frames" }, - this.renderFrames(frames), - (0, _WhyPaused2.default)({ pause }), - this.renderToggleButton(frames) - ); - } -} - -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 -}; - -function getSourceForFrame(sources, frame) { - return (0, _selectors.getSourceInSources)(sources, frame.location.sourceId); -} - -function appendSource(sources, frame) { - return Object.assign({}, frame, { - source: getSourceForFrame(sources, frame).toJS() - }); -} - -function getAndProcessFrames(frames, sources) { - if (!frames) { - return null; - } - - var processedFrames = frames.filter(frame => getSourceForFrame(sources, frame)).map(frame => appendSource(sources, frame)).filter(frame => !(0, _lodash.get)(frame, "source.isBlackBoxed")).map(_frame.annotateFrame); - - return processedFrames; -} - -var getAndProcessFramesSelector = (0, _reselect.createSelector)(_selectors.getFrames, _selectors.getSources, getAndProcessFrames); - -exports.default = (0, _reactRedux.connect)(state => ({ - frames: getAndProcessFramesSelector(state), - frameworkGroupingOn: (0, _selectors.getFrameworkGroupingState)(state), - selectedFrame: (0, _selectors.getSelectedFrame)(state), - pause: (0, _selectors.getPause)(state) -}), dispatch => (0, _redux.bindActionCreators)(_actions2.default, dispatch))(Frames); - -/***/ }), -/* 1013 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _react = __webpack_require__(0); - -var _react2 = _interopRequireDefault(_react); - -var _classnames = __webpack_require__(175); - -var _classnames2 = _interopRequireDefault(_classnames); - -var _Svg = __webpack_require__(344); - -var _Svg2 = _interopRequireDefault(_Svg); - -var _frame = __webpack_require__(1014); - -var _source = __webpack_require__(233); - -var _FrameMenu = __webpack_require__(1032); - -var _FrameMenu2 = _interopRequireDefault(_FrameMenu); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function FrameTitle(_ref) { - var frame = _ref.frame, - options = _ref.options; - - var displayName = (0, _frame.formatDisplayName)(frame, options); - return _react2.default.createElement( - "div", - { className: "title" }, - displayName - ); -} - -function FrameLocation(_ref2) { - var frame = _ref2.frame; - - if (!frame.source) { - return; - } - - if (frame.library) { - return _react2.default.createElement( - "div", - { className: "location" }, - frame.library, - _react2.default.createElement(_Svg2.default, { name: frame.library.toLowerCase(), className: "annotation-logo" }) - ); - } - - var filename = (0, _source.getFilename)(frame.source); - return _react2.default.createElement( - "div", - { className: "location" }, - `${filename}: ${frame.location.line}` - ); -} - -FrameLocation.displayName = "FrameLocation"; - -class FrameComponent extends _react.Component { - - constructor() { - super(); - } - - onContextMenu(event) { - var _props = this.props, - frame = _props.frame, - copyStackTrace = _props.copyStackTrace, - toggleFrameworkGrouping = _props.toggleFrameworkGrouping, - toggleBlackBox = _props.toggleBlackBox, - frameworkGroupingOn = _props.frameworkGroupingOn; - - (0, _FrameMenu2.default)(frame, frameworkGroupingOn, { copyStackTrace, toggleFrameworkGrouping, toggleBlackBox }, event); - } - - onMouseDown(e, frame, selectedFrame) { - if (e.nativeEvent.which == 3 && selectedFrame.id != frame.id) { - return; - } - this.props.selectFrame(frame); - } - - onKeyUp(event, frame, selectedFrame) { - if (event.key != "Enter" || selectedFrame.id == frame.id) { - return; - } - this.props.selectFrame(frame); - } - - render() { - var _props2 = this.props, - frame = _props2.frame, - selectedFrame = _props2.selectedFrame, - hideLocation = _props2.hideLocation, - shouldMapDisplayName = _props2.shouldMapDisplayName; - - - var className = (0, _classnames2.default)("frame", { - selected: selectedFrame && selectedFrame.id === frame.id - }); - return _react2.default.createElement( - "li", - { - key: frame.id, - className: className, - onMouseDown: e => this.onMouseDown(e, frame, selectedFrame), - onKeyUp: e => this.onKeyUp(e, frame, selectedFrame), - onContextMenu: e => this.onContextMenu(e), - tabIndex: 0 - }, - _react2.default.createElement(FrameTitle, { frame: frame, options: { shouldMapDisplayName } }), - !hideLocation && _react2.default.createElement(FrameLocation, { frame: frame }) - ); - } -} - -exports.default = FrameComponent; -FrameComponent.defaultProps = { - hideLocation: false, - shouldMapDisplayName: true -}; - -FrameComponent.displayName = "Frame"; - -/***/ }), -/* 1014 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.getLibraryFromUrl = getLibraryFromUrl; -exports.annotateFrame = annotateFrame; -exports.simplifyDisplayName = simplifyDisplayName; -exports.formatDisplayName = formatDisplayName; -exports.formatCopyName = formatCopyName; -exports.collapseFrames = collapseFrames; - -var _lodash = __webpack_require__(2); - -var _devtoolsConfig = __webpack_require__(828); - -var _utils = __webpack_require__(234); - -var _source = __webpack_require__(233); - -function getFrameUrl(frame) { - return (0, _lodash.get)(frame, "source.url", "") || ""; -} - -function isBackbone(frame) { - return getFrameUrl(frame).match(/backbone/i); -} - -function isJQuery(frame) { - return getFrameUrl(frame).match(/jquery/i); -} - -function isReact(frame) { - return getFrameUrl(frame).match(/react/i); -} - -function isImmutable(frame) { - return getFrameUrl(frame).match(/immutable/i); -} - -function isWebpack(frame) { - return getFrameUrl(frame).match(/webpack\/bootstrap/i); -} - -function isNodeInternal(frame) { - // starts with "internal/" OR no path, just "timers.js", "url.js" etc - // (normally frameUrl will be a FQ pathname) - return (/(^internal\/|^[^.\/]+\.js)/.test(getFrameUrl(frame)) - ); -} - -function isExpress(frame) { - return (/node_modules\/express/.test(getFrameUrl(frame)) - ); -} - -function isPug(frame) { - return (/node_modules\/pug/.test(getFrameUrl(frame)) - ); -} - -function isExtJs(frame) { - return (/\/ext-all[\.\-]/.test(getFrameUrl(frame)) - ); -} - -function isUnderscore(frame) { - return getFrameUrl(frame).match(/underscore/i); -} - -function isLodash(frame) { - return getFrameUrl(frame).match(/lodash/i); -} - -function isEmber(frame) { - return getFrameUrl(frame).match(/ember/i); -} - -function isChoo(frame) { - return getFrameUrl(frame).match(/choo/i); -} - -function isVueJS(frame) { - return getFrameUrl(frame).match(/vue\.js/i); -} - -function isRxJs(frame) { - return getFrameUrl(frame).match(/rxjs/i); -} - -function isAngular(frame) { - return getFrameUrl(frame).match(/angular/i); -} - -function isRedux(frame) { - return getFrameUrl(frame).match(/redux/i); -} - -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) - - if (isBackbone(frame)) { - return "Backbone"; - } - - if (isJQuery(frame)) { - return "jQuery"; - } - - // Needs to remain before "react", otherwise "react" can also match "preact" - if (isPreact(frame)) { - return "Preact"; - } - - if (isReact(frame)) { - return "React"; - } - - if (isWebpack(frame)) { - return "Webpack"; - } - - if (isNodeInternal(frame)) { - return "Node"; - } - - if (isExpress(frame)) { - return "Express"; - } - - if (isChoo(frame)) { - return "Choo"; - } - - if (isPug(frame)) { - return "Pug"; - } - - if (isExtJs(frame)) { - return "ExtJS"; - } - - if (isUnderscore(frame)) { - return "Underscore"; - } - - if (isLodash(frame)) { - return "Lodash"; - } - - if (isEmber(frame)) { - return "Ember"; - } - - if (isVueJS(frame)) { - return "VueJS"; - } - - if (isRxJs(frame)) { - return "RxJS"; - } - - if (isAngular(frame)) { - return "Angular"; - } - - if (isRedux(frame)) { - return "Redux"; - } - - if (isDojo(frame)) { - return "Dojo"; - } - - if (isImmutable(frame)) { - return "Immutable"; - } -} - -var displayNameMap = { - Backbone: { - "extend/child": "Create Class", - ".create": "Create Model" - }, - jQuery: { - "jQuery.event.dispatch": "Dispatch Event" - }, - React: { - // eslint-disable-next-line max-len - "ReactCompositeComponent._renderValidatedComponentWithoutOwnerOrContext/renderedElement<": "Render", - _renderValidatedComponentWithoutOwnerOrContext: "Render" - }, - VueJS: { - "renderMixin/Vue.prototype._render": "Render" - }, - Webpack: { - // eslint-disable-next-line camelcase - __webpack_require__: "Bootstrap" - } -}; - -function mapDisplayNames(frame, library) { - var map = displayNameMap[library]; - var displayName = frame.displayName; - - return map && map[displayName] || displayName; -} - -function annotateFrame(frame) { - if (!(0, _devtoolsConfig.isEnabled)("collapseFrame")) { - return frame; - } - - var library = getLibraryFromUrl(frame); - if (library) { - return Object.assign({}, frame, { library }); - } - - return frame; -} - -// Decodes an anonymous naming scheme that -// spider monkey implements based on "Naming Anonymous JavaScript Functions" -// http://johnjbarton.github.io/nonymous/index.html -var objectProperty = /([\w\d]+)$/; -var arrayProperty = /\[(.*?)\]$/; -var functionProperty = /([\w\d]+)[\/\.<]*?$/; -var annonymousProperty = /([\w\d]+)\(\^\)$/; - -function simplifyDisplayName(displayName) { - // if the display name has a space it has already been mapped - if (/\s/.exec(displayName)) { - return displayName; - } - - var scenarios = [objectProperty, arrayProperty, functionProperty, annonymousProperty]; - - for (var reg of scenarios) { - var match = reg.exec(displayName); - if (match) { - return match[1]; - } - } - - return displayName; -} - -function formatDisplayName(frame) { - var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, - _ref$shouldMapDisplay = _ref.shouldMapDisplayName, - shouldMapDisplayName = _ref$shouldMapDisplay === undefined ? true : _ref$shouldMapDisplay; - - var displayName = frame.displayName, - library = frame.library; - - if (library && shouldMapDisplayName) { - displayName = mapDisplayNames(frame, library); - } - - displayName = simplifyDisplayName(displayName); - return (0, _utils.endTruncateStr)(displayName, 25); -} - -function formatCopyName(frame) { - var displayName = formatDisplayName(frame); - var fileName = (0, _source.getFilename)(frame.source); - var frameLocation = frame.location.line; - - return `${displayName} (${fileName}#${frameLocation})`; -} - -function collapseFrames(frames) { - // We collapse groups of one so that user frames - // are not in a group of one - function addGroupToList(group, list) { - if (!group) { - return list; - } - - if (group.length > 1) { - list.push(group); - } else { - list = list.concat(group); - } - - return list; - } - - var _collapseLastFrames = collapseLastFrames(frames), - newFrames = _collapseLastFrames.newFrames, - lastGroup = _collapseLastFrames.lastGroup; - - frames = newFrames; - var items = []; - var currentGroup = null; - var prevItem = null; - for (var frame of frames) { - var prevLibrary = (0, _lodash.get)(prevItem, "library"); - - if (!currentGroup) { - currentGroup = [frame]; - } else if (prevLibrary && prevLibrary == frame.library) { - currentGroup.push(frame); - } else { - items = addGroupToList(currentGroup, items); - currentGroup = [frame]; - } - - prevItem = frame; - } - - items = addGroupToList(currentGroup, items); - items = addGroupToList(lastGroup, items); - return items; -} - -function collapseLastFrames(frames) { - var index = (0, _lodash.findIndex)(frames, isWebpack); - - if (index == -1) { - return { newFrames: frames, lastGroup: [] }; - } - - var newFrames = frames.slice(0, index); - var lastGroup = frames.slice(index); - return { newFrames, lastGroup }; -} - -/***/ }), -/* 1015 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _react = __webpack_require__(0); - -var _react2 = _interopRequireDefault(_react); - -var _classnames = __webpack_require__(175); - -var _classnames2 = _interopRequireDefault(_classnames); - -var _Svg = __webpack_require__(344); - -var _Svg2 = _interopRequireDefault(_Svg); - -var _frame = __webpack_require__(1014); - -var _FrameMenu = __webpack_require__(1032); - -var _FrameMenu2 = _interopRequireDefault(_FrameMenu); - -__webpack_require__(1336); - -var _Frame = __webpack_require__(1013); - -var _Frame2 = _interopRequireDefault(_Frame); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function FrameLocation(_ref) { - var frame = _ref.frame; - - var library = (0, _frame.getLibraryFromUrl)(frame); - if (!library) { - return null; - } - - return _react2.default.createElement( - "div", - { className: "location" }, - library, - _react2.default.createElement(_Svg2.default, { name: library.toLowerCase(), className: "annotation-logo" }) - ); -} - - -FrameLocation.displayName = "FrameLocation"; - -class Group extends _react.Component { - - constructor() { - super(...arguments); - - this.toggleFrames = () => { - this.setState({ expanded: !this.state.expanded }); - }; - - this.state = { expanded: false }; - } - - onContextMenu(event) { - var _props = this.props, - group = _props.group, - copyStackTrace = _props.copyStackTrace, - toggleFrameworkGrouping = _props.toggleFrameworkGrouping, - toggleBlackBox = _props.toggleBlackBox, - frameworkGroupingOn = _props.frameworkGroupingOn; - - var frame = group[0]; - (0, _FrameMenu2.default)(frame, frameworkGroupingOn, { copyStackTrace, toggleFrameworkGrouping, toggleBlackBox }, event); - } - - renderFrames() { - var _props2 = this.props, - group = _props2.group, - selectFrame = _props2.selectFrame, - selectedFrame = _props2.selectedFrame, - toggleFrameworkGrouping = _props2.toggleFrameworkGrouping, - frameworkGroupingOn = _props2.frameworkGroupingOn, - toggleBlackBox = _props2.toggleBlackBox, - copyStackTrace = _props2.copyStackTrace; - var expanded = this.state.expanded; - - if (!expanded) { - return null; - } - - return _react2.default.createElement( - "div", - { className: "frames-list" }, - group.map(frame => _react2.default.createElement(_Frame2.default, { - copyStackTrace: copyStackTrace, - frame: frame, - frameworkGroupingOn: frameworkGroupingOn, - hideLocation: true, - key: frame.id, - selectedFrame: selectedFrame, - selectFrame: selectFrame, - shouldMapDisplayName: false, - toggleBlackBox: toggleBlackBox, - toggleFrameworkGrouping: toggleFrameworkGrouping - })) - ); - } - - renderDescription() { - var frame = this.props.group[0]; - var displayName = (0, _frame.formatDisplayName)(frame); - return _react2.default.createElement( - "li", - { - key: frame.id, - className: (0, _classnames2.default)("group"), - onClick: this.toggleFrames, - tabIndex: 0 - }, - _react2.default.createElement( - "div", - { className: "title" }, - displayName - ), - _react2.default.createElement(FrameLocation, { frame: frame }) - ); - } - - render() { - var expanded = this.state.expanded; - - return _react2.default.createElement( - "div", - { - className: (0, _classnames2.default)("frames-group", { expanded }), - onContextMenu: e => this.onContextMenu(e) - }, - this.renderDescription(), - this.renderFrames() - ); - } -} - -exports.default = Group; -Group.displayName = "Group"; - -/***/ }), +/* 1012 */, +/* 1013 */, +/* 1014 */, +/* 1015 */, /* 1016 */, /* 1017 */, /* 1018 */, @@ -39308,224 +14741,14 @@ Group.displayName = "Group"; /* 1022 */, /* 1023 */, /* 1024 */, -/* 1025 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _react = __webpack_require__(0); - -var _lodash = __webpack_require__(2); - -var _reactRedux = __webpack_require__(1189); - -var _selectors = __webpack_require__(242); - -class HighlightLines extends _react.Component { - - constructor() { - super(); - this.highlightLineRange = this.highlightLineRange.bind(this); - } - - componentDidMount() { - this.highlightLineRange(); - } - - componentWillUpdate() { - this.clearHighlightRange(); - } - - componentDidUpdate() { - this.highlightLineRange(); - } - - componentWillUnmount() { - this.clearHighlightRange(); - } - - clearHighlightRange() { - var _props = this.props, - highlightedLineRange = _props.highlightedLineRange, - editor = _props.editor; - var codeMirror = editor.codeMirror; - - - if ((0, _lodash.isEmpty)(highlightedLineRange) || !codeMirror) { - return; - } - - var start = highlightedLineRange.start, - end = highlightedLineRange.end; - - codeMirror.operation(() => { - (0, _lodash.range)(start - 1, end).forEach(line => { - codeMirror.removeLineClass(line, "line", "highlight-lines"); - }); - }); - } - - highlightLineRange() { - var _props2 = this.props, - highlightedLineRange = _props2.highlightedLineRange, - editor = _props2.editor; - var codeMirror = editor.codeMirror; - - - if ((0, _lodash.isEmpty)(highlightedLineRange) || !codeMirror) { - return; - } - - var start = highlightedLineRange.start, - end = highlightedLineRange.end; - - - codeMirror.operation(() => { - editor.alignLine(start); - - (0, _lodash.range)(start - 1, end).forEach(line => { - codeMirror.addLineClass(line, "line", "highlight-lines"); - }); - }); - } - - render() { - return null; - } -} -exports.default = (0, _reactRedux.connect)(state => ({ - highlightedLineRange: (0, _selectors.getHighlightedLineRange)(state) -}))(HighlightLines); - -/***/ }), +/* 1025 */, /* 1026 */, /* 1027 */, /* 1028 */, -/* 1029 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _react = __webpack_require__(0); - -var _react2 = _interopRequireDefault(_react); - -var _classnames = __webpack_require__(175); - -var _classnames2 = _interopRequireDefault(_classnames); - -__webpack_require__(1326); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var BracketArrow = (_ref) => { - var orientation = _ref.orientation, - left = _ref.left, - top = _ref.top, - bottom = _ref.bottom; - - return _react2.default.createElement("div", { - className: (0, _classnames2.default)("bracket-arrow", orientation || "up"), - style: { left, top, bottom } - }); -}; - -exports.default = BracketArrow; - -/***/ }), +/* 1029 */, /* 1030 */, /* 1031 */, -/* 1032 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = FrameMenu; - -var _devtoolsLaunchpad = __webpack_require__(131); - -var _clipboard = __webpack_require__(423); - -var _lodash = __webpack_require__(2); - -var blackboxString = "sourceFooter.blackbox"; - -var unblackboxString = "sourceFooter.unblackbox"; - -function formatMenuElement(labelString, click) { - var disabled = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; - - var label = L10N.getStr(labelString); - var accesskey = L10N.getStr(`${labelString}.accesskey`); - var id = `node-menu-${(0, _lodash.kebabCase)(label)}`; - return { - id, - label, - accesskey, - disabled, - click - }; -} - -function copySourceElement(url) { - return formatMenuElement("copySourceUri2", () => (0, _clipboard.copyToTheClipboard)(url)); -} - -function copyStackTraceElement(copyStackTrace) { - return formatMenuElement("copyStackTrace", () => copyStackTrace()); -} - -function toggleFrameworkGroupingElement(toggleFrameworkGrouping, frameworkGroupingOn) { - var actionType = frameworkGroupingOn ? "framework.disableGrouping" : "framework.enableGrouping"; - - return formatMenuElement(actionType, () => toggleFrameworkGrouping()); -} - -function blackBoxSource(source, toggleBlackBox) { - var toggleBlackBoxString = source.isBlackBoxed ? unblackboxString : blackboxString; - - return formatMenuElement(toggleBlackBoxString, () => toggleBlackBox(source)); -} - -function FrameMenu(frame, frameworkGroupingOn, callbacks, event) { - event.stopPropagation(); - event.preventDefault(); - - var menuOptions = []; - - var source = frame.source; - - var toggleFrameworkElement = toggleFrameworkGroupingElement(callbacks.toggleFrameworkGrouping, frameworkGroupingOn); - menuOptions.push(toggleFrameworkElement); - - if (source) { - var copySourceUri2 = copySourceElement(source.url); - menuOptions.push(copySourceUri2); - menuOptions.push(blackBoxSource(source, callbacks.toggleBlackBox)); - } - - var copyStackTraceItem = copyStackTraceElement(callbacks.copyStackTrace); - - menuOptions.push(copyStackTraceItem); - - (0, _devtoolsLaunchpad.showMenu)(event, menuOptions); -} - -/***/ }), +/* 1032 */, /* 1033 */, /* 1034 */, /* 1035 */, @@ -39565,849 +14788,14 @@ module.exports = " { - var sameLine = breakpoint.location.line === line; - if (!sameLine) { - return false; - } - - // NOTE: when column breakpoints are disabled we want to find - // the first breakpoint - if (!(0, _devtoolsConfig.isEnabled)("columnBreakpoints")) { - return true; - } - - return breakpoint.location.column === column; - }); -} - -function breakpointExists(state, location) { - var currentBp = (0, _selectors.getBreakpoint)(state, location); - return currentBp && !currentBp.disabled; -} - -function createBreakpoint(location) { - var overrides = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - var condition = overrides.condition, - disabled = overrides.disabled, - hidden = overrides.hidden, - generatedLocation = overrides.generatedLocation, - astLocation = overrides.astLocation; - - - var properties = { - condition: condition || null, - disabled: disabled || false, - hidden: hidden || false, - astLocation: astLocation || { offset: location }, - generatedLocation: generatedLocation || location, - location - }; - - return properties; -} - -function createPendingLocation(location) { - var sourceUrl = location.sourceUrl, - line = location.line, - column = location.column; - - return { sourceUrl, line, column }; -} - -function createPendingBreakpoint(bp) { - var pendingLocation = createPendingLocation(bp.location); - var pendingGeneratedLocation = createPendingLocation(bp.generatedLocation); - - assertPendingLocation(pendingLocation); - - return { - condition: bp.condition, - disabled: bp.disabled, - location: pendingLocation, - astLocation: bp.astLocation, - generatedLocation: pendingGeneratedLocation - }; -} - -/***/ }), -/* 1058 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.initialState = initialState; -exports.getSymbols = getSymbols; -exports.hasSymbols = hasSymbols; -exports.isEmptyLineInSource = isEmptyLineInSource; -exports.getEmptyLines = getEmptyLines; -exports.getOutOfScopeLocations = getOutOfScopeLocations; -exports.getPreview = getPreview; - -var _immutable = __webpack_require__(146); - -var I = _interopRequireWildcard(_immutable); - -var _makeRecord = __webpack_require__(230); - -var _makeRecord2 = _interopRequireDefault(_makeRecord); - -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; } } - -/** - * UI reducer - * @module reducers/ui - */ - -function initialState() { - return (0, _makeRecord2.default)({ - symbols: I.Map(), - emptyLines: I.Map(), - outOfScopeLocations: null, - preview: null - })(); -} - -function update() { - var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState(); - var action = arguments[1]; - - switch (action.type) { - case "SET_SYMBOLS": - { - var source = action.source, - _symbols = action.symbols; - - return state.setIn(["symbols", source.id], _symbols); - } - - case "SET_EMPTY_LINES": - { - var _source = action.source, - _emptyLines = action.emptyLines; - - return state.setIn(["emptyLines", _source.id], _emptyLines); - } - - case "OUT_OF_SCOPE_LOCATIONS": - { - return state.set("outOfScopeLocations", action.locations); - } - - case "CLEAR_SELECTION": - { - return state.set("preview", null); - } - - case "SET_PREVIEW": - { - if (action.status == "start") { - return state.set("preview", { updating: true }); - } - - if (!action.value) { - return state.set("preview", null); - } - - var _action$value = action.value, - _expression = _action$value.expression, - _location = _action$value.location, - _result = _action$value.result, - _tokenPos = _action$value.tokenPos, - _cursorPos = _action$value.cursorPos; - - return state.set("preview", { - updating: false, - expression: _expression, - location: _location, - result: _result, - tokenPos: _tokenPos, - cursorPos: _cursorPos - }); - } - - case "RESUMED": - { - return state.set("outOfScopeLocations", null); - } - - case "NAVIGATE": - { - return initialState(); - } - - default: - { - return state; - } - } -} - -// NOTE: we'd like to have the app state fully typed -// https://github.com/devtools-html/debugger.html/blob/master/src/reducers/sources.js#L179-L185 -function getSymbols(state, source) { - var emptySet = { variables: [], functions: [] }; - if (!source) { - return emptySet; - } - - var symbols = state.ast.getIn(["symbols", source.id]); - return symbols || emptySet; -} - -function hasSymbols(state, source) { - if (!source) { - return false; - } - - return !!state.ast.getIn(["symbols", source.id]); -} - -function isEmptyLineInSource(state, line, selectedSource) { - var emptyLines = getEmptyLines(state, selectedSource); - return emptyLines.includes(line); -} - -function getEmptyLines(state, source) { - if (!source) { - return []; - } - - return state.ast.getIn(["emptyLines", source.id]) || []; -} - -function getOutOfScopeLocations(state) { - return state.ast.get("outOfScopeLocations"); -} - -function getPreview(state) { - return state.ast.get("preview"); -} - -exports.default = update; - -/***/ }), -/* 1059 */ -/***/ (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.setSymbols = setSymbols; -exports.setEmptyLines = setEmptyLines; -exports.setOutOfScopeLocations = setOutOfScopeLocations; -exports.clearPreview = clearPreview; -exports.setPreview = setPreview; - -var _selectors = __webpack_require__(242); - -var _sources = __webpack_require__(254); - -var _expressions = __webpack_require__(252); - -var _promise = __webpack_require__(193); - -var _parser = __webpack_require__(1208); - -var _devtoolsSourceMap = __webpack_require__(898); - -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 setSymbols(sourceId) { - return (() => { - var _ref = _asyncToGenerator(function* (_ref2) { - var dispatch = _ref2.dispatch, - getState = _ref2.getState; - - var sourceRecord = (0, _selectors.getSource)(getState(), sourceId); - if (!sourceRecord) { - return; - } - - var source = sourceRecord.toJS(); - if (!source.text || (0, _selectors.hasSymbols)(getState(), source)) { - return; - } - - var symbols = yield (0, _parser.getSymbols)(source); - - dispatch({ - type: "SET_SYMBOLS", - source, - symbols - }); - }); - - return function (_x) { - return _ref.apply(this, arguments); - }; - })(); -} - -function setEmptyLines(sourceId) { - return (() => { - var _ref3 = _asyncToGenerator(function* (_ref4) { - var dispatch = _ref4.dispatch, - getState = _ref4.getState; - - var sourceRecord = (0, _selectors.getSource)(getState(), sourceId); - if (!sourceRecord) { - return; - } - - var source = sourceRecord.toJS(); - if (!source.text) { - return; - } - - var emptyLines = yield (0, _parser.getEmptyLines)(source); - - dispatch({ - type: "SET_EMPTY_LINES", - source, - emptyLines - }); - }); - - return function (_x2) { - return _ref3.apply(this, arguments); - }; - })(); -} - -function setOutOfScopeLocations() { - return (() => { - var _ref5 = _asyncToGenerator(function* (_ref6) { - var dispatch = _ref6.dispatch, - getState = _ref6.getState; - - var location = (0, _selectors.getSelectedLocation)(getState()); - if (!location) { - return; - } - - var source = (0, _selectors.getSource)(getState(), location.sourceId); - - if (!location.line || !source) { - return dispatch({ - type: "OUT_OF_SCOPE_LOCATIONS", - locations: null - }); - } - - var locations = yield (0, _parser.getOutOfScopeLocations)(source.toJS(), location); - - return dispatch({ - type: "OUT_OF_SCOPE_LOCATIONS", - locations - }); - }); - - return function (_x3) { - return _ref5.apply(this, arguments); - }; - })(); -} - -function clearPreview() { - return (_ref7) => { - var dispatch = _ref7.dispatch, - getState = _ref7.getState, - client = _ref7.client; - - var currentSelection = (0, _selectors.getPreview)(getState()); - if (!currentSelection) { - return; - } - - return dispatch({ - type: "CLEAR_SELECTION" - }); - }; -} - -function findBestMatch(symbols, tokenPos, token) { - var memberExpressions = symbols.memberExpressions, - identifiers = symbols.identifiers; - var line = tokenPos.line, - column = tokenPos.column; - - return identifiers.concat(memberExpressions).reduce((found, expression) => { - var overlaps = expression.location.start.line == line && expression.location.start.column <= column && expression.location.end.column >= column; - - if (overlaps) { - return expression; - } - - return found; - }, {}); -} - -function setPreview(token, tokenPos, cursorPos) { - return (() => { - var _ref8 = _asyncToGenerator(function* (_ref9) { - var dispatch = _ref9.dispatch, - getState = _ref9.getState, - client = _ref9.client, - sourceMaps = _ref9.sourceMaps; - - var currentSelection = (0, _selectors.getPreview)(getState()); - if (currentSelection && currentSelection.updating) { - return; - } - - yield dispatch({ - type: "SET_PREVIEW", - [_promise.PROMISE]: _asyncToGenerator(function* () { - var source = (0, _selectors.getSelectedSource)(getState()); - var _symbols = yield (0, _parser.getSymbols)(source.toJS()); - - var found = findBestMatch(_symbols, tokenPos, token); - if (!found) { - return; - } - - var expression = found.expression, - location = found.location; - - - if (!expression) { - return; - } - - var sourceId = source.get("id"); - if (location && !(0, _devtoolsSourceMap.isGeneratedId)(sourceId)) { - var generatedLocation = yield sourceMaps.getGeneratedLocation(_extends({}, location.start, { sourceId }), source.toJS()); - - var generatedSourceId = generatedLocation.sourceId; - yield dispatch((0, _sources.ensureParserHasSourceText)(generatedSourceId)); - - expression = yield (0, _expressions.getMappedExpression)({ sourceMaps }, generatedLocation, expression); - } - - var selectedFrame = (0, _selectors.getSelectedFrame)(getState()); - - var _ref11 = yield client.evaluate(expression, { - frameId: selectedFrame.id - }), - result = _ref11.result; - - if (result === undefined) { - return; - } - - return { - expression, - result, - location, - tokenPos, - cursorPos - }; - })() - }); - }); - - return function (_x4) { - return _ref8.apply(this, arguments); - }; - })(); -} - -/***/ }), +/* 1057 */, +/* 1058 */, +/* 1059 */, /* 1060 */, /* 1061 */, /* 1062 */, /* 1063 */, -/* 1064 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _propTypes = __webpack_require__(20); - -var _propTypes2 = _interopRequireDefault(_propTypes); - -var _react = __webpack_require__(0); - -var _react2 = _interopRequireDefault(_react); - -var _classnames = __webpack_require__(175); - -var _classnames2 = _interopRequireDefault(_classnames); - -var _Svg = __webpack_require__(344); - -var _Svg2 = _interopRequireDefault(_Svg); - -var _ManagedTree = __webpack_require__(419); - -var _ManagedTree2 = _interopRequireDefault(_ManagedTree); - -var _SearchInput = __webpack_require__(377); - -var _SearchInput2 = _interopRequireDefault(_SearchInput); - -__webpack_require__(1314); - -var _sourcesTree = __webpack_require__(39); - -var _highlight = __webpack_require__(1184); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -class TextSearch extends _react.Component { - constructor(props) { - super(props); - this.state = { - inputValue: this.props.query || "" - }; - - this.focusedItem = null; - this.inputFocused = false; - - this.inputOnChange = this.inputOnChange.bind(this); - this.onKeyDown = this.onKeyDown.bind(this); - this.onEnterPress = this.onEnterPress.bind(this); - this.selectMatchItem = this.selectMatchItem.bind(this); - } - - componentDidMount() { - var shortcuts = this.context.shortcuts; - shortcuts.on("Enter", this.onEnterPress); - } - - componentWillUnmount() { - var shortcuts = this.context.shortcuts; - shortcuts.off("Enter", this.onEnterPress); - } - - selectMatchItem(matchItem) { - this.props.selectSource(matchItem.sourceId, { line: matchItem.line }); - } - - getResults() { - var results = this.props.results; - - return results.filter(result => result.filepath && result.matches.length > 0); - } - - getResultCount() { - var results = this.getResults(); - return results.reduce((count, file) => count + (file.matches ? file.matches.length : 0), 0); - } - - onKeyDown(e) { - if (e.key === "Escape") { - return; - } - - e.stopPropagation(); - - if (e.key !== "Enter") { - return; - } - this.focusedItem = null; - this.props.searchSources(this.state.inputValue); - } - - onEnterPress() { - if (this.focusedItem && !this.inputFocused) { - var _focusedItem = this.focusedItem, - setExpanded = _focusedItem.setExpanded, - file = _focusedItem.file, - expanded = _focusedItem.expanded, - match = _focusedItem.match; - - if (setExpanded) { - setExpanded(file, !expanded); - } else { - this.selectMatchItem(match); - } - } - } - - inputOnChange(e) { - var inputValue = e.target.value; - this.setState({ inputValue }); - } - - renderFile(file, focused, expanded, setExpanded) { - if (focused) { - this.focusedItem = { setExpanded, file, expanded }; - } - - var matchesLength = file.matches.length; - var matches = ` (${matchesLength} match${matchesLength > 1 ? "es" : ""})`; - - return _react2.default.createElement( - "div", - { - className: (0, _classnames2.default)("file-result", { focused }), - key: file.sourceId, - onClick: e => setExpanded(file, !expanded) - }, - _react2.default.createElement(_Svg2.default, { name: "arrow", className: (0, _classnames2.default)({ expanded }) }), - _react2.default.createElement(_Svg2.default, { name: "file" }), - _react2.default.createElement( - "span", - { className: "file-path" }, - (0, _sourcesTree.getRelativePath)(file.filepath) - ), - _react2.default.createElement( - "span", - { className: "matches-summary" }, - matches - ) - ); - } - - renderMatch(match, focused) { - if (focused) { - this.focusedItem = { match }; - } - return _react2.default.createElement( - "div", - { - className: (0, _classnames2.default)("result", { focused }), - onClick: () => setTimeout(() => this.selectMatchItem(match), 50) - }, - _react2.default.createElement( - "span", - { className: "line-number", key: match.line }, - match.line - ), - this.renderMatchValue(match) - ); - } - - renderMatchValue(lineMatch) { - return (0, _highlight.highlightMatches)(lineMatch); - } - - renderResults() { - var results = this.getResults(); - results = results.filter(result => result.matches.length > 0); - function getFilePath(item, index) { - return item.filepath ? `${item.sourceId}-${index}` : `${item.sourceId}-${item.line}-${item.column}-${index}`; - } - - var renderItem = (item, depth, focused, _, expanded, _ref) => { - var setExpanded = _ref.setExpanded; - - return item.filepath ? this.renderFile(item, focused, expanded, setExpanded) : this.renderMatch(item, focused); - }; - - if (results.length) { - return _react2.default.createElement(_ManagedTree2.default, { - getRoots: () => results, - getChildren: file => file.matches || [], - itemHeight: 24, - autoExpand: 1, - autoExpandDepth: 1, - getParent: item => null, - getPath: getFilePath, - renderItem: renderItem - }); - } else if (this.props.query && !results.length) { - return _react2.default.createElement( - "div", - { className: "no-result-msg absolute-center" }, - L10N.getStr("projectTextSearch.noResults") - ); - } - } - - renderInput() { - var resultCount = this.getResultCount(); - var summaryMsg = L10N.getFormatStr("sourceSearch.resultsSummary1", resultCount); - - return _react2.default.createElement(_SearchInput2.default, { - query: this.state.inputValue, - count: resultCount, - placeholder: L10N.getStr("projectTextSearch.placeholder"), - size: "big", - summaryMsg: summaryMsg, - onChange: e => this.inputOnChange(e), - onFocus: () => this.inputFocused = true, - onBlur: () => this.inputFocused = false, - onKeyDown: e => this.onKeyDown(e), - handleClose: this.props.closeActiveSearch, - ref: "searchInput" - }); - } - - render() { - var searchBottomBar = this.props.searchBottomBar; - - return _react2.default.createElement( - "div", - { className: "project-text-search" }, - _react2.default.createElement( - "div", - { className: "header" }, - this.renderInput(), - searchBottomBar - ), - this.renderResults() - ); - } -} - -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 -}; - -TextSearch.contextTypes = { - shortcuts: _propTypes2.default.object -}; - -/***/ }), +/* 1064 */, /* 1065 */, /* 1066 */, /* 1067 */, @@ -40478,143 +14866,11 @@ module.exports = "" /***/ }), -/* 1120 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = renderWhyPaused; - -var _react = __webpack_require__(0); - -var _react2 = _interopRequireDefault(_react); - -var _lodash = __webpack_require__(2); - -var _pause = __webpack_require__(255); - -__webpack_require__(1337); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function renderExceptionSummary(exception) { - if ((0, _lodash.isString)(exception)) { - return exception; - } - - var message = (0, _lodash.get)(exception, "preview.message"); - var name = (0, _lodash.get)(exception, "preview.name"); - - return `${name}: ${message}`; -} - - -function renderMessage(pauseInfo) { - if (!pauseInfo) { - return null; - } - - var message = (0, _lodash.get)(pauseInfo, "why.message"); - if (message) { - return _react2.default.createElement( - "div", - { className: "message" }, - message - ); - } - - var exception = (0, _lodash.get)(pauseInfo, "why.exception"); - if (exception) { - return _react2.default.createElement( - "div", - { className: "message warning" }, - renderExceptionSummary(exception) - ); - } - - return null; -} - -function renderWhyPaused(_ref) { - var pause = _ref.pause; - - var reason = (0, _pause.getPauseReason)(pause); - - if (!reason) { - return null; - } - - return _react2.default.createElement( - "div", - { className: "pane why-paused" }, - _react2.default.createElement( - "div", - null, - L10N.getStr(reason) - ), - renderMessage(pause) - ); -} -renderWhyPaused.displayName = "whyPaused"; - -/***/ }), +/* 1120 */, /* 1121 */, /* 1122 */, /* 1123 */, -/* 1124 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = getInScopeLines; - -var _ast = __webpack_require__(1058); - -var _sources = __webpack_require__(232); - -var _source = __webpack_require__(233); - -var _lodash = __webpack_require__(2); - -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 getOutOfScopeLines(outOfScopeLocations) { - if (!outOfScopeLocations) { - return null; - } - - return (0, _lodash.uniq)((0, _lodash.flatMap)(outOfScopeLocations, location => (0, _lodash.range)(location.start.line, location.end.line))); -} - -function getInScopeLines(state) { - var source = (0, _sources.getSelectedSource)(state); - var outOfScopeLocations = (0, _ast.getOutOfScopeLocations)(state); - - if (!source || !source.get("text")) { - return; - } - - var linesOutOfScope = getOutOfScopeLines(outOfScopeLocations, source.toJS()); - - var sourceNumLines = (0, _source.getSourceLineCount)(source.toJS()); - var sourceLines = (0, _lodash.range)(1, sourceNumLines + 1); - - if (!linesOutOfScope) { - return sourceLines; - } - - return _lodash.without.apply(undefined, [sourceLines].concat(_toConsumableArray(linesOutOfScope))); -} - -/***/ }), +/* 1124 */, /* 1125 */, /* 1126 */ /***/ (function(module, exports) { @@ -40623,1864 +14879,30 @@ module.exports = "