"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.STATUSMAP = exports.STATUS = exports.REDIRECT_URI_PATHNAME = exports.OAUTH_COOKIE_NAME = exports.JWT_EXPIRED_MESSAGE = void 0;

var _STATUSMAP;

function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }

var REDIRECT_URI_PATHNAME = '/_oauth2/callback';
exports.REDIRECT_URI_PATHNAME = REDIRECT_URI_PATHNAME;
var OAUTH_COOKIE_NAME = 'plotly_oauth_token';
exports.OAUTH_COOKIE_NAME = OAUTH_COOKIE_NAME;
var JWT_EXPIRED_MESSAGE = 'JWT Expired';
exports.JWT_EXPIRED_MESSAGE = JWT_EXPIRED_MESSAGE;
var STATUS = {
  OK: 200,
  PREVENT_UPDATE: 204,
  // We accept both 400 and 401 for JWT token expiry responses.
  // Some servers use code 400 for expired tokens, because
  // they reserve 401 for cases that require user action
  BAD_REQUEST: 400,
  UNAUTHORIZED: 401,
  CLIENTSIDE_ERROR: 'CLIENTSIDE_ERROR',
  NO_RESPONSE: 'NO_RESPONSE'
};
exports.STATUS = STATUS;
var STATUSMAP = (_STATUSMAP = {}, _defineProperty(_STATUSMAP, STATUS.OK, 'SUCCESS'), _defineProperty(_STATUSMAP, STATUS.PREVENT_UPDATE, 'NO_UPDATE'), _STATUSMAP);
exports.STATUSMAP = STATUSMAP;