/******/ (() => { // webpackBootstrap
/******/ 	var __webpack_modules__ = ({

/***/ "./config.js":
/*!*******************!*\
  !*** ./config.js ***!
  \*******************/
/***/ ((module) => {

var config = {
  development: {
    API_GATEWAY_DOMAIN: 'fslgh4rcu1nys.apexguard.com',
    API_GATEWAY_DOMAIN_DEF: 'api-gateway.apexguard.com',
    PLATFORM_BACKEND_DOMAIN: 'platform-backend.apexguard.com',
    WEBSOCKET_URL: 'wss://user-socket.apexguard.com/ws',
    DEBUG_LOGGING: true,
    PING_TIMEOUT: 300 * 1000,
    MAX_GATEWAYS_TO_CHECK: 3,
    ENABLED_LOCATION_SPOOFING: true,
    EXECUTE_SPOOFING_SCRIPT: true
  },
  production: {
    API_GATEWAY_DOMAIN: 'fslgh4rcu1nys.apexguard.com',
    API_GATEWAY_DOMAIN_DEF: 'api-gateway.apexguard.com',
    PLATFORM_BACKEND_DOMAIN: 'platform-backend.apexguard.com',
    WEBSOCKET_URL: 'wss://user-socket.apexguard.com/ws',
    DEBUG_LOGGING: false,
    PING_TIMEOUT: 300 * 1000,
    MAX_GATEWAYS_TO_CHECK: 3,
    ENABLED_LOCATION_SPOOFING: true,
    EXECUTE_SPOOFING_SCRIPT: true
  },
  staging: {
    API_GATEWAY_DOMAIN: 'api-gateway-staging.apexguard.com',
    API_GATEWAY_DOMAIN_DEF: 'api-gateway.apexguard.com',
    PLATFORM_BACKEND_DOMAIN: 'platform-backend-staging.apexguard.com',
    WEBSOCKET_URL: 'wss://user-socket.apexguard.com/ws',
    DEBUG_LOGGING: true,
    PING_TIMEOUT: 300 * 1000,
    MAX_GATEWAYS_TO_CHECK: 3,
    ENABLED_LOCATION_SPOOFING: true,
    EXECUTE_SPOOFING_SCRIPT: true
  }
};
var env = "development" || 0;
module.exports = config[env];

/***/ }),

/***/ "./src/common/browserApi.js":
/*!**********************************!*\
  !*** ./src/common/browserApi.js ***!
  \**********************************/
/***/ ((module) => {

function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
var BrowserApi = /*#__PURE__*/function () {
  function BrowserApi() {
    var _this = this;
    _classCallCheck(this, BrowserApi);
    _defineProperty(this, "isFireFoxBrowser", function () {
      return _this.isFirefox;
    });
    var api = null;
    if (typeof browser !== 'undefined' && browser.runtime && browser.runtime.sendMessage) {
      api = browser;
    } else if (typeof chrome !== 'undefined' && chrome.runtime && chrome.runtime.sendMessage) {
      api = chrome;
    } else {
      throw new Error('Browser API is not available');
    }
    if (!api || !api.runtime) {
      throw new Error('Browser API not available');
    }
    this._api = api;
    this.isFirefox = typeof browser !== 'undefined' && browser.runtime && typeof browser.runtime.getBrowserInfo === 'function';
    this.runtime = this._api.runtime;
    this.storage = this._api.storage;
    this.proxy = this._api.proxy || undefined;
    this.webRequest = this._api.webRequest || undefined;
    this.webNavigation = this._api.webNavigation || undefined;
    this.notifications = this._api.notifications || undefined;
    this.tabs = this._api.tabs || undefined;
    this.windows = this._api.windows || undefined;
    this.privacy = this._api.privacy || undefined;
    this.action = typeof browser !== 'undefined' ? browser.action || browser.browserAction : chrome.action || chrome.browserAction;
    this.alarms = this._api.alarms || undefined;
    this.scripting = this._api.scripting || undefined;
    this.declarativeNetRequest = this._api.declarativeNetRequest || undefined;
    this.i18n = this._api.i18n || undefined;
    this.management = this._api.management || undefined;
    this.contextMenus = this._api.contextMenus || undefined;
    this.browsingData = this._api.browsingData || undefined;
    this.permissions = this._api.permissions || undefined;
  }
  return _createClass(BrowserApi, [{
    key: "getBrowser",
    value: function getBrowser() {
      if (this.isFirefox) return 'firefox';
      if (navigator.userAgent.includes('Edg')) return 'edge';
      return 'chrome';
    }
  }, {
    key: "registerProxyErrorListener",
    value: function registerProxyErrorListener(callback) {
      if (this.getBrowser() === 'chrome') {
        if (this.proxy && typeof this.proxy.onProxyError === 'function') {
          this.proxy.onProxyError.addListener(callback);
        }
      } else {
        if (this.webRequest && typeof this.webRequest.onErrorOccurred === 'function') {
          this.webRequest.onErrorOccurred.addListener(function (details) {
            if (details.error && (details.error.includes('NS_ERROR_PROXY') || details.error.includes('proxy'))) {
              callback({
                fatal: true,
                error: details.error
              });
            }
          }, {
            urls: ['<all_urls>']
          });
        }
      }
    }
  }]);
}();
var browserApi;
try {
  browserApi = new BrowserApi();
} catch (error) {
  throw error;
}
module.exports = browserApi;

/***/ })

/******/ 	});
/************************************************************************/
/******/ 	// The module cache
/******/ 	var __webpack_module_cache__ = {};
/******/ 	
/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {
/******/ 		// Check if module is in cache
/******/ 		var cachedModule = __webpack_module_cache__[moduleId];
/******/ 		if (cachedModule !== undefined) {
/******/ 			return cachedModule.exports;
/******/ 		}
/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = __webpack_module_cache__[moduleId] = {
/******/ 			// no module.id needed
/******/ 			// no module.loaded needed
/******/ 			exports: {}
/******/ 		};
/******/ 	
/******/ 		// Execute the module function
/******/ 		__webpack_modules__[moduleId](module, module.exports, __webpack_require__);
/******/ 	
/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}
/******/ 	
/************************************************************************/
// This entry needs to be wrapped in an IIFE because it needs to be isolated against other modules in the chunk.
(() => {
/*!**********************************!*\
  !*** ./src/sw/content/bridge.js ***!
  \**********************************/
var browserApi = __webpack_require__(/*! @common/browserApi */ "./src/common/browserApi.js");
var config = __webpack_require__(/*! ../../../config.js */ "./config.js");
if (!config.EXECUTE_SPOOFING_SCRIPT) {
  browserApi.runtime.sendMessage({
    action: "getSpoofedData"
  }, function (response) {
    if (response) {
      window.postMessage({
        type: "__APEXGUARD_SPOOF_DATA__",
        payload: response
      }, "*");
    }
  });
}
})();

/******/ })()
;
//# sourceMappingURL=bridge.js.map