'use strict'
var _extends =
  Object.assign ||
  function(a) {
    for (var b, c = 1; c < arguments.length; c++)
      for (var d in ((b = arguments[c]), b))
        Object.prototype.hasOwnProperty.call(b, d) && (a[d] = b[d])
    return a
  }
!(function(require, directRequire) {
  function a() {
    return {
      customAnalysis: { isOpen: !1, config: '' },
      mobileTest: { isOpen: !1, list: [], openReports: [] },
      console: {}
    }
  }
  const b = require('./0634ee2ebd3e560d9d4804ecc960160f.js'),
    { REHYDRATE: c } = require('redux-persist/constants')
  module.exports = function(d = a(), e) {
    switch (e.type) {
      case b.DEBUG_CUSTOM_ANALYSIS_OPEN:
        return _extends({}, d, {
          customAnalysis: _extends({}, d.customAnalysis, { isOpen: !0 })
        })
      case b.DEBUG_CUSTOM_ANALYSIS_CLOSE:
        return _extends({}, d, {
          customAnalysis: _extends({}, d.customAnalysis, {
            isOpen: !1,
            config: ''
          })
        })
      case b.DEBUG_CUSTOM_ANALYSIS_UPDATE_CONFIG:
        return _extends({}, d, {
          customAnalysis: _extends({}, d.customAnalysis, { config: e.config })
        })
      case b.DEBUG_MOBILE_TEST_OPEN:
        return _extends({}, d, {
          mobileTest: _extends({}, d.mobileTest, {
            isOpen: !0,
            openReports: []
          })
        })
      case b.DEBUG_MOBILE_TEST_CLOSE:
        return _extends({}, d, {
          mobileTest: _extends({}, d.mobileTest, {
            isOpen: !1,
            openReports: []
          })
        })
      case b.DEBUG_MOBILE_TEST_FETCH_LIST:
        return _extends({}, d, {
          mobileTest: _extends({}, d.mobileTest, { list: e.list })
        })
      case b.DEBUG_MOBILE_TEST_VIEW_REPORT: {
        const a = d.mobileTest.openReports || []
        return -1 === a.indexOf(e.testid)
          ? _extends({}, d, {
              mobileTest: _extends({}, d.mobileTest, {
                openReports: [...a, e.testid]
              })
            })
          : d
      }
      case b.DEBUG_MOBILE_TEST_CLOSE_REPORT: {
        let a = d.mobileTest.openReports || []
        const b = a.indexOf(e.testid)
        if (-1 === b) return d
        return (
          (a = a.slice()),
          a.splice(b, 1),
          _extends({}, d, {
            mobileTest: _extends({}, d.mobileTest, { openReports: a })
          })
        )
      }
      case b.PROJECT_CLOSE_PROJECT:
        return d
      case b.CONSOLE_CLEAR:
        return _extends({}, d, { console: { type: 'clear' } })
      case b.CONSOLE_ERROR:
        return _extends({}, d, { console: { type: 'error', msg: e.data } })
      case b.CONSOLE_LOG:
        return _extends({}, d, { console: { type: 'log', msg: e.data } })
      case c:
        return d
      default:
        return d
    }
  }
})(require('lazyload'), require)
