'use strict';

var attachContext = function attachContext(notice, context) {
  if (notice.context) Object.assign(notice.context, context);else notice.context = context;
};
var getSessionReplayUrl = function getSessionReplayUrl() {
  var storage = sessionStorage.getItem("neeto-replay-widget--session");
  var currentTimestamp = new Date().getTime();
  return storage ? "".concat(JSON.parse(storage).url, "?goto=").concat(currentTimestamp) : "";
};
var isNeetoReplaySecurityError = function isNeetoReplaySecurityError(notice) {
  var _notice$stack;
  return notice.name === "SecurityError" && ((_notice$stack = notice.stack) === null || _notice$stack === void 0 ? void 0 : _notice$stack.includes("neeto-replay-widget"));
};

exports.attachContext = attachContext;
exports.getSessionReplayUrl = getSessionReplayUrl;
exports.isNeetoReplaySecurityError = isNeetoReplaySecurityError;
//# sourceMappingURL=utils.js.map
