"use strict";

var _interopRequireDefault = require("@babel/runtime-corejs2/helpers/interopRequireDefault");

exports.__esModule = true;
exports.isSSR = isSSR;
exports.REQUEST_RUL = exports.UMS_URL = exports.isServer = void 0;

var _vue = _interopRequireDefault(require("vue"));

var _getEnv = _interopRequireDefault(require("./get-env"));

var isServer = _vue.default.prototype.$isServer;
exports.isServer = isServer;

if (isServer) {
  _vue.default.prototype.$isSSR = true;
}

var UMS_URL = '';
exports.UMS_URL = UMS_URL;
var REQUEST_RUL = '';
exports.REQUEST_RUL = REQUEST_RUL;

function isSSR() {
  return _vue.default.prototype.$isServer || _vue.default.prototype.$isSSR;
}

if (!isServer) {
  var env = (0, _getEnv.default)(location.origin);

  if (env === 'production') {
    exports.REQUEST_RUL = REQUEST_RUL = 'https://www.gaoding.com';
    exports.UMS_URL = UMS_URL = 'https://ums.gaoding.com';
  } else if (env === 'release') {
    exports.REQUEST_RUL = REQUEST_RUL = 'https://stage.gaoding.com';
    exports.UMS_URL = UMS_URL = 'https://ums.gaoding.com';
  } else if (env === 'localhost') {
    exports.REQUEST_RUL = REQUEST_RUL = 'http://www.gaoding.localhost';
    exports.UMS_URL = UMS_URL = 'http://ums.dev.gaoding.com';
  } else {
    exports.REQUEST_RUL = REQUEST_RUL = 'http://www.dev.gaoding.com';
    exports.UMS_URL = UMS_URL = 'http://ums.dev.gaoding.com';
  }
}