ibuted with this
 * file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
function fetchScopes(cx) {
  return async function ({
    dispatch,
    getState,
    client,
    sourceMaps
  }) {
    const frame = (0, _selectors.getSelectedFrame)(getState(), cx.thread);

    if (!frame || (0, _selectors.getGeneratedFrameScope)(getState(), frame.id)) {
      return;
    }

    const scopes = dispatch({
      type: "ADD_SCOPES",
      cx,
      thread: cx.thread,
      frame,
      [_promise.PROMISE]: client.getFrameScopes(frame)
    });
    scopes.then(() => {
      dispatch((0, _inlinePreview.generateInlinePreview)(cx, frame));
    });
    await dispatch((0, _mapScopes.mapScopes)(cx, scopes, frame));
  };
}PK