var feedbackForm =
(window["webpackJsonp_name_"] = window["webpackJsonp_name_"] || []).push([["feedbackForm"],{

/***/ "./node_modules/@ebi-gene-expression-group/atlas-feedback-form/lib/FeedbackButton.js":
/*!*******************************************************************************************!*\
  !*** ./node_modules/@ebi-gene-expression-group/atlas-feedback-form/lib/FeedbackButton.js ***!
  \*******************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = void 0;

var _react = _interopRequireDefault(__webpack_require__(/*! react */ "./node_modules/react/index.js"));

var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js"));

var _styledComponents = _interopRequireDefault(__webpack_require__(/*! styled-components */ "./node_modules/styled-components/dist/styled-components.browser.esm.js"));

var _reactPopup = _interopRequireDefault(__webpack_require__(/*! react-popup */ "./node_modules/react-popup/dist/index.js"));

var _reactGa = _interopRequireDefault(__webpack_require__(/*! react-ga */ "./node_modules/@ebi-gene-expression-group/atlas-feedback-form/node_modules/react-ga/dist/esm/index.js"));

var _Prompt = _interopRequireDefault(__webpack_require__(/*! ./Prompt */ "./node_modules/@ebi-gene-expression-group/atlas-feedback-form/lib/Prompt.js"));

var _templateObject;

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }

function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }

function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }

function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }

function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }

function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }

function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }

function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }

var FeedbackButtonDiv = _styledComponents["default"].button(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n  position: fixed;\n  bottom: 50%;\n  right: 0;\n  display: inline-block;\n  background-color: #3497c5;\n  color: white;\n  font-size: 1.2rem;\n  padding: 0.25rem 0.25rem 1rem 0.25rem;\n  transition: all 0.2s;\n  margin: -45px;\n  :hover {\n    background-color: #2f5767;\n    cursor: pointer;\n  }\n  box-shadow: 2px 2px 3px #999;\n  transform: rotate(-90deg);\n"])));

var FeedbackButton = /*#__PURE__*/function (_React$Component) {
  _inherits(FeedbackButton, _React$Component);

  var _super = _createSuper(FeedbackButton);

  function FeedbackButton(props) {
    var _this;

    _classCallCheck(this, FeedbackButton);

    _this = _super.call(this, props);
    _this.state = {
      smileyScore: null
    };
    _this.onClick = _this.onClick.bind(_assertThisInitialized(_this));
    _this.smileyChange = _this.smileyChange.bind(_assertThisInitialized(_this));

    _reactPopup["default"].registerPlugin("prompt", function (smileyScore, smileyChange, callback) {
      _reactPopup["default"].create({
        title: "Your feedback",
        content: /*#__PURE__*/_react["default"].createElement(_Prompt["default"], {
          feedbackFormLink: props.feedbackFormLink,
          onSelect: smileyChange
        }),
        buttons: {
          left: ["cancel"],
          right: smileyScore ? [{
            text: "Submit",
            className: "success",
            action: function action() {
              callback();
              smileyScore && _reactGa["default"].event({
                category: "Satisfaction",
                action: smileyScore.toString()
              });
              smileyScore && _reactPopup["default"].close();
            }
          }] : []
        }
      });
    });

    return _this;
  }

  _createClass(FeedbackButton, [{
    key: "smileyChange",
    value: function smileyChange(smileyScore) {
      var _this2 = this;

      this.setState({
        smileyScore: smileyScore
      }, function () {
        _reactPopup["default"].close();

        _this2.onClick();
      });
    }
  }, {
    key: "onClick",
    value: function onClick() {
      _reactPopup["default"].plugins().prompt(this.state.smileyScore, this.smileyChange, function () {
        _reactPopup["default"].alert("Thank you for submitting your feedback.");
      });
    }
  }, {
    key: "render",
    value: function render() {
      _reactGa["default"].initialize(this.props.gaId);

      _reactGa["default"].pageview(window.location.pathname + window.location.search);

      return /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_reactPopup["default"], null), /*#__PURE__*/_react["default"].createElement(FeedbackButtonDiv, {
        onClick: this.onClick
      }, /*#__PURE__*/_react["default"].createElement("i", {
        className: "icon icon-functional",
        "data-icon": "n",
        style: {
          paddingRight: "0.5rem"
        }
      }), "Feedback"));
    }
  }]);

  return FeedbackButton;
}(_react["default"].Component);

FeedbackButton.propTypes = {
  feedbackFormLink: _propTypes["default"].oneOf(["https://www.ebi.ac.uk/support/gxa", "https://www.ebi.ac.uk/support/gxasc"]).isRequired,
  gaId: _propTypes["default"].string.isRequired
};
var _default = FeedbackButton;
exports["default"] = _default;

/***/ }),

/***/ "./node_modules/@ebi-gene-expression-group/atlas-feedback-form/lib/Prompt.js":
/*!***********************************************************************************!*\
  !*** ./node_modules/@ebi-gene-expression-group/atlas-feedback-form/lib/Prompt.js ***!
  \***********************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = void 0;

var _react = _interopRequireDefault(__webpack_require__(/*! react */ "./node_modules/react/index.js"));

var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js"));

var _styledComponents = _interopRequireDefault(__webpack_require__(/*! styled-components */ "./node_modules/styled-components/dist/styled-components.browser.esm.js"));

var _smileyData = _interopRequireDefault(__webpack_require__(/*! ./smileyData */ "./node_modules/@ebi-gene-expression-group/atlas-feedback-form/lib/smileyData.js"));

var _SmileyDiv = _interopRequireDefault(__webpack_require__(/*! ./SmileyDiv */ "./node_modules/@ebi-gene-expression-group/atlas-feedback-form/lib/SmileyDiv.js"));

var _templateObject;

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }

function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }

function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }

function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }

function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }

function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }

function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }

function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }

var SmileyContainer = _styledComponents["default"].div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n  display: flex;\n  justify-content: space-evenly;\n"])));

var Prompt = /*#__PURE__*/function (_React$Component) {
  _inherits(Prompt, _React$Component);

  var _super = _createSuper(Prompt);

  function Prompt(props) {
    var _this;

    _classCallCheck(this, Prompt);

    _this = _super.call(this, props);
    _this.state = {
      selectedSmileyScore: 0
    };
    _this.onClick = _this.onClick.bind(_assertThisInitialized(_this));
    return _this;
  }

  _createClass(Prompt, [{
    key: "onClick",
    value: function onClick(selectedSmileyScore) {
      this.setState({
        selectedSmileyScore: selectedSmileyScore
      });
      this.props.onSelect(selectedSmileyScore);
    }
  }, {
    key: "render",
    value: function render() {
      var _this2 = this;

      return /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("p", {
        style: {
          paddingBottom: "1rem"
        }
      }, "How satisfied are you?"), /*#__PURE__*/_react["default"].createElement(SmileyContainer, null, _smileyData["default"].map(function (smiley, idx) {
        return /*#__PURE__*/_react["default"].createElement(_SmileyDiv["default"], {
          key: idx,
          onClick: function onClick() {
            return _this2.onClick(smiley.score);
          },
          emoji: smiley.emoji,
          label: smiley.label,
          selected: smiley.score === _this2.state.selectedSmileyScore
        });
      })), /*#__PURE__*/_react["default"].createElement("p", {
        style: {
          paddingTop: "1rem"
        }
      }, /*#__PURE__*/_react["default"].createElement("a", {
        href: this.props.feedbackFormLink,
        target: "_blank"
      }, "Click here if you need support.")));
    }
  }]);

  return Prompt;
}(_react["default"].Component);

Prompt.propTypes = {
  onSelect: _propTypes["default"].func.isRequired,
  feedbackFormLink: _propTypes["default"].string.isRequired
};
var _default = Prompt;
exports["default"] = _default;

/***/ }),

/***/ "./node_modules/@ebi-gene-expression-group/atlas-feedback-form/lib/SmileyDiv.js":
/*!**************************************************************************************!*\
  !*** ./node_modules/@ebi-gene-expression-group/atlas-feedback-form/lib/SmileyDiv.js ***!
  \**************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = void 0;

var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js"));

var _styledComponents = _interopRequireDefault(__webpack_require__(/*! styled-components */ "./node_modules/styled-components/dist/styled-components.browser.esm.js"));

var _templateObject;

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }

function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }

var SmileyDiv = _styledComponents["default"].div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n  transition: all 0.5s;\n  text-align: center;\n  display: grid;\n  flex: 1;\n  cursor: pointer;\n  ::before {\n    font-size: 2.5rem;\n    transition: inherit;\n    font-family: Segoe UI Emoji;\n    content: '", "';\n    opacity: ", ";\n    display: inline-block;\n  }\n  :hover::before {\n    opacity: 1.0\n  }\n\n  ::after {\n    font-size: 1rem;\n    transition: inherit;\n    content: '", "';\n    opacity: ", ";\n     display: inline-block;\n  }\n  :hover::after {\n    opacity: 1.0\n  }\n\n"])), function (props) {
  return props.emoji;
}, function (props) {
  return props.selected ? 1.0 : 0.2;
}, function (props) {
  return props.label;
}, function (props) {
  return props.selected ? 1.0 : 0.0;
});

SmileyDiv.propTypes = {
  emoji: _propTypes["default"].string.isRequired,
  label: _propTypes["default"].string.isRequired,
  selected: _propTypes["default"].bool.isRequired
};
var _default = SmileyDiv;
exports["default"] = _default;

/***/ }),

/***/ "./node_modules/@ebi-gene-expression-group/atlas-feedback-form/lib/index.js":
/*!**********************************************************************************!*\
  !*** ./node_modules/@ebi-gene-expression-group/atlas-feedback-form/lib/index.js ***!
  \**********************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
Object.defineProperty(exports, "default", {
  enumerable: true,
  get: function get() {
    return _FeedbackButton["default"];
  }
});
exports.render = void 0;

var _react = _interopRequireDefault(__webpack_require__(/*! react */ "./node_modules/react/index.js"));

var _reactDom = _interopRequireDefault(__webpack_require__(/*! react-dom */ "./node_modules/react-dom/index.js"));

var _FeedbackButton = _interopRequireDefault(__webpack_require__(/*! ./FeedbackButton */ "./node_modules/@ebi-gene-expression-group/atlas-feedback-form/lib/FeedbackButton.js"));

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }

var render = function render(options, target) {
  _reactDom["default"].render( /*#__PURE__*/_react["default"].createElement(_FeedbackButton["default"], options), document.getElementById(target));
};

exports.render = render;

/***/ }),

/***/ "./node_modules/@ebi-gene-expression-group/atlas-feedback-form/lib/smileyData.js":
/*!***************************************************************************************!*\
  !*** ./node_modules/@ebi-gene-expression-group/atlas-feedback-form/lib/smileyData.js ***!
  \***************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = void 0;
var smileyData = [{
  emoji: "\uD83D\uDE1E",
  label: "Terrible",
  score: 1
}, {
  emoji: "\uD83D\uDE14",
  label: "Bad",
  score: 2
}, {
  emoji: "\uD83D\uDE10",
  label: "Okay",
  score: 3
}, {
  emoji: "\uD83D\uDE01",
  label: "Good",
  score: 4
}, {
  emoji: "\uD83D\uDE06",
  label: "Great",
  score: 5
}];
var _default = smileyData;
exports["default"] = _default;

/***/ }),

/***/ "./node_modules/@ebi-gene-expression-group/atlas-feedback-form/node_modules/react-ga/dist/esm/components/OutboundLink.js":
/*!*******************************************************************************************************************************!*\
  !*** ./node_modules/@ebi-gene-expression-group/atlas-feedback-form/node_modules/react-ga/dist/esm/components/OutboundLink.js ***!
  \*******************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return OutboundLink; });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "./node_modules/react/index.js");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _utils_console_warn__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/console/warn */ "./node_modules/@ebi-gene-expression-group/atlas-feedback-form/node_modules/react-ga/dist/esm/utils/console/warn.js");
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }

var _excluded = ["to", "target"];

function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }

function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }

function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }

function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }

function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }

function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }

function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }

function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }

function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }

function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }

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 NEWTAB = '_blank';
var MIDDLECLICK = 1;

var OutboundLink = /*#__PURE__*/function (_Component) {
  _inherits(OutboundLink, _Component);

  var _super = _createSuper(OutboundLink);

  function OutboundLink() {
    var _this;

    _classCallCheck(this, OutboundLink);

    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
      args[_key] = arguments[_key];
    }

    _this = _super.call.apply(_super, [this].concat(args));

    _defineProperty(_assertThisInitialized(_this), "handleClick", function (event) {
      var _this$props = _this.props,
          target = _this$props.target,
          eventLabel = _this$props.eventLabel,
          to = _this$props.to,
          onClick = _this$props.onClick,
          trackerNames = _this$props.trackerNames;
      var eventMeta = {
        label: eventLabel
      };
      var sameTarget = target !== NEWTAB;
      var normalClick = !(event.ctrlKey || event.shiftKey || event.metaKey || event.button === MIDDLECLICK);

      if (sameTarget && normalClick) {
        event.preventDefault();
        OutboundLink.trackLink(eventMeta, function () {
          window.location.href = to;
        }, trackerNames);
      } else {
        OutboundLink.trackLink(eventMeta, function () {}, trackerNames);
      }

      if (onClick) {
        onClick(event);
      }
    });

    return _this;
  }

  _createClass(OutboundLink, [{
    key: "render",
    value: function render() {
      var _this$props2 = this.props,
          href = _this$props2.to,
          target = _this$props2.target,
          oldProps = _objectWithoutProperties(_this$props2, _excluded);

      var props = _objectSpread(_objectSpread({}, oldProps), {}, {
        target: target,
        href: href,
        onClick: this.handleClick
      });

      if (target === NEWTAB) {
        props.rel = "".concat(props.rel ? props.rel : '', " noopener noreferrer").trim();
      }

      delete props.eventLabel;
      delete props.trackerNames;
      return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement('a', props);
    }
  }]);

  return OutboundLink;
}(react__WEBPACK_IMPORTED_MODULE_0__["Component"]);

_defineProperty(OutboundLink, "trackLink", function () {
  Object(_utils_console_warn__WEBPACK_IMPORTED_MODULE_2__["default"])('ga tracking not enabled');
});


OutboundLink.propTypes = {
  eventLabel: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string.isRequired,
  target: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,
  to: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,
  onClick: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func,
  trackerNames: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string)
};
OutboundLink.defaultProps = {
  target: null,
  to: null,
  onClick: null,
  trackerNames: null
};

/***/ }),

/***/ "./node_modules/@ebi-gene-expression-group/atlas-feedback-form/node_modules/react-ga/dist/esm/core.js":
/*!************************************************************************************************************!*\
  !*** ./node_modules/@ebi-gene-expression-group/atlas-feedback-form/node_modules/react-ga/dist/esm/core.js ***!
  \************************************************************************************************************/
/*! exports provided: addTrackers, initialize, ga, set, send, pageview, modalview, timing, event, exception, plugin, outboundLink, testModeAPI, default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addTrackers", function() { return addTrackers; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "initialize", function() { return initialize; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ga", function() { return ga; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "set", function() { return set; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "send", function() { return send; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pageview", function() { return pageview; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "modalview", function() { return modalview; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timing", function() { return timing; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "event", function() { return event; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "exception", function() { return exception; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "plugin", function() { return plugin; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "outboundLink", function() { return outboundLink; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "testModeAPI", function() { return testModeAPI; });
/* harmony import */ var _utils_format__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils/format */ "./node_modules/@ebi-gene-expression-group/atlas-feedback-form/node_modules/react-ga/dist/esm/utils/format.js");
/* harmony import */ var _utils_removeLeadingSlash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils/removeLeadingSlash */ "./node_modules/@ebi-gene-expression-group/atlas-feedback-form/node_modules/react-ga/dist/esm/utils/removeLeadingSlash.js");
/* harmony import */ var _utils_trim__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils/trim */ "./node_modules/@ebi-gene-expression-group/atlas-feedback-form/node_modules/react-ga/dist/esm/utils/trim.js");
/* harmony import */ var _utils_loadGA__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils/loadGA */ "./node_modules/@ebi-gene-expression-group/atlas-feedback-form/node_modules/react-ga/dist/esm/utils/loadGA.js");
/* harmony import */ var _utils_console_warn__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./utils/console/warn */ "./node_modules/@ebi-gene-expression-group/atlas-feedback-form/node_modules/react-ga/dist/esm/utils/console/warn.js");
/* harmony import */ var _utils_console_log__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./utils/console/log */ "./node_modules/@ebi-gene-expression-group/atlas-feedback-form/node_modules/react-ga/dist/esm/utils/console/log.js");
/* harmony import */ var _utils_testModeAPI__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./utils/testModeAPI */ "./node_modules/@ebi-gene-expression-group/atlas-feedback-form/node_modules/react-ga/dist/esm/utils/testModeAPI.js");
var _excluded = ["category", "action", "label", "value", "nonInteraction", "transport"];

function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }

function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }

function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }

function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }

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; }

function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }

function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }

function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }

function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }

function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }

function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }

function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }

/**
 * React Google Analytics Module
 *
 * @package react-ga
 * @author  Adam Lofting <adam@mozillafoundation.org>
 *          Atul Varma <atul@mozillafoundation.org>
 */

/**
 * Utilities
 */








var _isNotBrowser = typeof window === 'undefined' || typeof document === 'undefined';

var _debug = false;
var _titleCase = true;
var _testMode = false;
var _alwaysSendToDefaultTracker = true;
var _redactEmail = true;

var internalGa = function internalGa() {
  var _window;

  if (_testMode) return _utils_testModeAPI__WEBPACK_IMPORTED_MODULE_6__["default"].ga.apply(_utils_testModeAPI__WEBPACK_IMPORTED_MODULE_6__["default"], arguments);
  if (_isNotBrowser) return false;
  if (!window.ga) return Object(_utils_console_warn__WEBPACK_IMPORTED_MODULE_4__["default"])('ReactGA.initialize must be called first or GoogleAnalytics should be loaded manually');
  return (_window = window).ga.apply(_window, arguments);
};

function _format(s) {
  return Object(_utils_format__WEBPACK_IMPORTED_MODULE_0__["default"])(s, _titleCase, _redactEmail);
}

function _gaCommand(trackerNames) {
  for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
    args[_key - 1] = arguments[_key];
  }

  var command = args[0];

  if (typeof internalGa === 'function') {
    if (typeof command !== 'string') {
      Object(_utils_console_warn__WEBPACK_IMPORTED_MODULE_4__["default"])('ga command must be a string');
      return;
    }

    if (_alwaysSendToDefaultTracker || !Array.isArray(trackerNames)) internalGa.apply(void 0, args);

    if (Array.isArray(trackerNames)) {
      trackerNames.forEach(function (name) {
        internalGa.apply(void 0, _toConsumableArray(["".concat(name, ".").concat(command)].concat(args.slice(1))));
      });
    }
  }
}

function _initialize(gaTrackingID, options) {
  if (!gaTrackingID) {
    Object(_utils_console_warn__WEBPACK_IMPORTED_MODULE_4__["default"])('gaTrackingID is required in initialize()');
    return;
  }

  if (options) {
    if (options.debug && options.debug === true) {
      _debug = true;
    }

    if (options.titleCase === false) {
      _titleCase = false;
    }

    if (options.redactEmail === false) {
      _redactEmail = false;
    }

    if (options.useExistingGa) {
      return;
    }
  }

  if (options && options.gaOptions) {
    internalGa('create', gaTrackingID, options.gaOptions);
  } else {
    internalGa('create', gaTrackingID, 'auto');
  }
}

function addTrackers(configsOrTrackingId, options) {
  if (Array.isArray(configsOrTrackingId)) {
    configsOrTrackingId.forEach(function (config) {
      if (_typeof(config) !== 'object') {
        Object(_utils_console_warn__WEBPACK_IMPORTED_MODULE_4__["default"])('All configs must be an object');
        return;
      }

      _initialize(config.trackingId, config);
    });
  } else {
    _initialize(configsOrTrackingId, options);
  }

  return true;
}
function initialize(configsOrTrackingId, options) {
  if (options && options.testMode === true) {
    _testMode = true;
  } else {
    if (_isNotBrowser) {
      return;
    }

    if (!options || options.standardImplementation !== true) Object(_utils_loadGA__WEBPACK_IMPORTED_MODULE_3__["default"])(options);
  }

  _alwaysSendToDefaultTracker = options && typeof options.alwaysSendToDefaultTracker === 'boolean' ? options.alwaysSendToDefaultTracker : true;
  addTrackers(configsOrTrackingId, options);
}
/**
 * ga:
 * Returns the original GA object.
 */

function ga() {
  for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
    args[_key2] = arguments[_key2];
  }

  if (args.length > 0) {
    internalGa.apply(void 0, args);

    if (_debug) {
      Object(_utils_console_log__WEBPACK_IMPORTED_MODULE_5__["default"])("called ga('arguments');");
      Object(_utils_console_log__WEBPACK_IMPORTED_MODULE_5__["default"])("with arguments: ".concat(JSON.stringify(args)));
    }
  }

  return window.ga;
}
/**
 * set:
 * GA tracker set method
 * @param {Object} fieldsObject - a field/value pair or a group of field/value pairs on the tracker
 * @param {Array} trackerNames - (optional) a list of extra trackers to run the command on
 */

function set(fieldsObject, trackerNames) {
  if (!fieldsObject) {
    Object(_utils_console_warn__WEBPACK_IMPORTED_MODULE_4__["default"])('`fieldsObject` is required in .set()');
    return;
  }

  if (_typeof(fieldsObject) !== 'object') {
    Object(_utils_console_warn__WEBPACK_IMPORTED_MODULE_4__["default"])('Expected `fieldsObject` arg to be an Object');
    return;
  }

  if (Object.keys(fieldsObject).length === 0) {
    Object(_utils_console_warn__WEBPACK_IMPORTED_MODULE_4__["default"])('empty `fieldsObject` given to .set()');
  }

  _gaCommand(trackerNames, 'set', fieldsObject);

  if (_debug) {
    Object(_utils_console_log__WEBPACK_IMPORTED_MODULE_5__["default"])("called ga('set', fieldsObject);");
    Object(_utils_console_log__WEBPACK_IMPORTED_MODULE_5__["default"])("with fieldsObject: ".concat(JSON.stringify(fieldsObject)));
  }
}
/**
 * send:
 * Clone of the low level `ga.send` method
 * WARNING: No validations will be applied to this
 * @param  {Object} fieldObject - field object for tracking different analytics
 * @param  {Array} trackerNames - trackers to send the command to
 * @param {Array} trackerNames - (optional) a list of extra trackers to run the command on
 */

function send(fieldObject, trackerNames) {
  _gaCommand(trackerNames, 'send', fieldObject);

  if (_debug) {
    Object(_utils_console_log__WEBPACK_IMPORTED_MODULE_5__["default"])("called ga('send', fieldObject);");
    Object(_utils_console_log__WEBPACK_IMPORTED_MODULE_5__["default"])("with fieldObject: ".concat(JSON.stringify(fieldObject)));
    Object(_utils_console_log__WEBPACK_IMPORTED_MODULE_5__["default"])("with trackers: ".concat(JSON.stringify(trackerNames)));
  }
}
/**
 * pageview:
 * Basic GA pageview tracking
 * @param  {String} path - the current page page e.g. '/about'
 * @param {Array} trackerNames - (optional) a list of extra trackers to run the command on
 * @param {String} title - (optional) the page title e. g. 'My Website'
 */

function pageview(rawPath, trackerNames, title) {
  if (!rawPath) {
    Object(_utils_console_warn__WEBPACK_IMPORTED_MODULE_4__["default"])('path is required in .pageview()');
    return;
  }

  var path = Object(_utils_trim__WEBPACK_IMPORTED_MODULE_2__["default"])(rawPath);

  if (path === '') {
    Object(_utils_console_warn__WEBPACK_IMPORTED_MODULE_4__["default"])('path cannot be an empty string in .pageview()');
    return;
  }

  var extraFields = {};

  if (title) {
    extraFields.title = title;
  }

  if (typeof ga === 'function') {
    _gaCommand(trackerNames, 'send', _objectSpread({
      hitType: 'pageview',
      page: path
    }, extraFields));

    if (_debug) {
      Object(_utils_console_log__WEBPACK_IMPORTED_MODULE_5__["default"])("called ga('send', 'pageview', path);");
      var extraLog = '';

      if (title) {
        extraLog = " and title: ".concat(title);
      }

      Object(_utils_console_log__WEBPACK_IMPORTED_MODULE_5__["default"])("with path: ".concat(path).concat(extraLog));
    }
  }
}
/**
 * modalview:
 * a proxy to basic GA pageview tracking to consistently track
 * modal views that are an equivalent UX to a traditional pageview
 * @param  {String} modalName e.g. 'add-or-edit-club'
 * @param {Array} trackerNames - (optional) a list of extra trackers to run the command on
 */

function modalview(rawModalName, trackerNames) {
  if (!rawModalName) {
    Object(_utils_console_warn__WEBPACK_IMPORTED_MODULE_4__["default"])('modalName is required in .modalview(modalName)');
    return;
  }

  var modalName = Object(_utils_removeLeadingSlash__WEBPACK_IMPORTED_MODULE_1__["default"])(Object(_utils_trim__WEBPACK_IMPORTED_MODULE_2__["default"])(rawModalName));

  if (modalName === '') {
    Object(_utils_console_warn__WEBPACK_IMPORTED_MODULE_4__["default"])('modalName cannot be an empty string or a single / in .modalview()');
    return;
  }

  if (typeof ga === 'function') {
    var path = "/modal/".concat(modalName);

    _gaCommand(trackerNames, 'send', 'pageview', path);

    if (_debug) {
      Object(_utils_console_log__WEBPACK_IMPORTED_MODULE_5__["default"])("called ga('send', 'pageview', path);");
      Object(_utils_console_log__WEBPACK_IMPORTED_MODULE_5__["default"])("with path: ".concat(path));
    }
  }
}
/**
 * timing:
 * GA timing
 * @param args.category {String} required
 * @param args.variable {String} required
 * @param args.value  {Int}  required
 * @param args.label  {String} required
 * @param {Array} trackerNames - (optional) a list of extra trackers to run the command on
 */

function timing() {
  var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
      category = _ref.category,
      variable = _ref.variable,
      value = _ref.value,
      label = _ref.label;

  var trackerNames = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined;

  if (typeof ga === 'function') {
    if (!category || !variable || typeof value !== 'number') {
      Object(_utils_console_warn__WEBPACK_IMPORTED_MODULE_4__["default"])('args.category, args.variable ' + 'AND args.value are required in timing() ' + 'AND args.value has to be a number');
      return;
    } // Required Fields


    var fieldObject = {
      hitType: 'timing',
      timingCategory: _format(category),
      timingVar: _format(variable),
      timingValue: value
    };

    if (label) {
      fieldObject.timingLabel = _format(label);
    }

    send(fieldObject, trackerNames);
  }
}
/**
 * event:
 * GA event tracking
 * @param args.category {String} required
 * @param args.action {String} required
 * @param args.label {String} optional
 * @param args.value {Int} optional
 * @param args.nonInteraction {boolean} optional
 * @param args.transport {string} optional
 * @param {{action: string, category: string}} trackerNames - (optional) a list of extra trackers to run the command on
 */

function event() {
  var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
      category = _ref2.category,
      action = _ref2.action,
      label = _ref2.label,
      value = _ref2.value,
      nonInteraction = _ref2.nonInteraction,
      transport = _ref2.transport,
      args = _objectWithoutProperties(_ref2, _excluded);

  var trackerNames = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined;

  if (typeof ga === 'function') {
    // Simple Validation
    if (!category || !action) {
      Object(_utils_console_warn__WEBPACK_IMPORTED_MODULE_4__["default"])('args.category AND args.action are required in event()');
      return;
    } // Required Fields


    var fieldObject = {
      hitType: 'event',
      eventCategory: _format(category),
      eventAction: _format(action)
    }; // Optional Fields

    if (label) {
      fieldObject.eventLabel = _format(label);
    }

    if (typeof value !== 'undefined') {
      if (typeof value !== 'number') {
        Object(_utils_console_warn__WEBPACK_IMPORTED_MODULE_4__["default"])('Expected `args.value` arg to be a Number.');
      } else {
        fieldObject.eventValue = value;
      }
    }

    if (typeof nonInteraction !== 'undefined') {
      if (typeof nonInteraction !== 'boolean') {
        Object(_utils_console_warn__WEBPACK_IMPORTED_MODULE_4__["default"])('`args.nonInteraction` must be a boolean.');
      } else {
        fieldObject.nonInteraction = nonInteraction;
      }
    }

    if (typeof transport !== 'undefined') {
      if (typeof transport !== 'string') {
        Object(_utils_console_warn__WEBPACK_IMPORTED_MODULE_4__["default"])('`args.transport` must be a string.');
      } else {
        if (['beacon', 'xhr', 'image'].indexOf(transport) === -1) {
          Object(_utils_console_warn__WEBPACK_IMPORTED_MODULE_4__["default"])('`args.transport` must be either one of these values: `beacon`, `xhr` or `image`');
        }

        fieldObject.transport = transport;
      }
    }

    Object.keys(args).filter(function (key) {
      return key.substr(0, 'dimension'.length) === 'dimension';
    }).forEach(function (key) {
      fieldObject[key] = args[key];
    });
    Object.keys(args).filter(function (key) {
      return key.substr(0, 'metric'.length) === 'metric';
    }).forEach(function (key) {
      fieldObject[key] = args[key];
    }); // Send to GA

    send(fieldObject, trackerNames);
  }
}
/**
 * exception:
 * GA exception tracking
 * @param args.description {String} optional
 * @param args.fatal {boolean} optional
 * @param {Array} trackerNames - (optional) a list of extra trackers to run the command on
 */

function exception(_ref3, trackerNames) {
  var description = _ref3.description,
      fatal = _ref3.fatal;

  if (typeof ga === 'function') {
    // Required Fields
    var fieldObject = {
      hitType: 'exception'
    }; // Optional Fields

    if (description) {
      fieldObject.exDescription = _format(description);
    }

    if (typeof fatal !== 'undefined') {
      if (typeof fatal !== 'boolean') {
        Object(_utils_console_warn__WEBPACK_IMPORTED_MODULE_4__["default"])('`args.fatal` must be a boolean.');
      } else {
        fieldObject.exFatal = fatal;
      }
    } // Send to GA


    send(fieldObject, trackerNames);
  }
}
var plugin = {
  /**
   * require:
   * GA requires a plugin
   * @param name {String} e.g. 'ecommerce' or 'myplugin'
   * @param options {Object} optional e.g {path: '/log', debug: true}
   * @param trackerName {String} optional e.g 'trackerName'
   */
  require: function require(rawName, options, trackerName) {
    if (typeof ga === 'function') {
      // Required Fields
      if (!rawName) {
        Object(_utils_console_warn__WEBPACK_IMPORTED_MODULE_4__["default"])('`name` is required in .require()');
        return;
      }

      var name = Object(_utils_trim__WEBPACK_IMPORTED_MODULE_2__["default"])(rawName);

      if (name === '') {
        Object(_utils_console_warn__WEBPACK_IMPORTED_MODULE_4__["default"])('`name` cannot be an empty string in .require()');
        return;
      }

      var requireString = trackerName ? "".concat(trackerName, ".require") : 'require'; // Optional Fields

      if (options) {
        if (_typeof(options) !== 'object') {
          Object(_utils_console_warn__WEBPACK_IMPORTED_MODULE_4__["default"])('Expected `options` arg to be an Object');
          return;
        }

        if (Object.keys(options).length === 0) {
          Object(_utils_console_warn__WEBPACK_IMPORTED_MODULE_4__["default"])('Empty `options` given to .require()');
        }

        ga(requireString, name, options);

        if (_debug) {
          Object(_utils_console_log__WEBPACK_IMPORTED_MODULE_5__["default"])("called ga('require', '".concat(name, "', ").concat(JSON.stringify(options)));
        }
      } else {
        ga(requireString, name);

        if (_debug) {
          Object(_utils_console_log__WEBPACK_IMPORTED_MODULE_5__["default"])("called ga('require', '".concat(name, "');"));
        }
      }
    }
  },

  /**
   * execute:
   * GA execute action for plugin
   * Takes variable number of arguments
   * @param pluginName {String} e.g. 'ecommerce' or 'myplugin'
   * @param action {String} e.g. 'addItem' or 'myCustomAction'
   * @param actionType {String} optional e.g. 'detail'
   * @param payload {Object} optional e.g { id: '1x5e', name : 'My product to track' }
   */
  execute: function execute(pluginName, action) {
    var payload;
    var actionType;

    for (var _len3 = arguments.length, args = new Array(_len3 > 2 ? _len3 - 2 : 0), _key3 = 2; _key3 < _len3; _key3++) {
      args[_key3 - 2] = arguments[_key3];
    }

    if (args.length === 1) {
      payload = args[0];
    } else {
      actionType = args[0];
      payload = args[1];
    }

    if (typeof ga === 'function') {
      if (typeof pluginName !== 'string') {
        Object(_utils_console_warn__WEBPACK_IMPORTED_MODULE_4__["default"])('Expected `pluginName` arg to be a String.');
      } else if (typeof action !== 'string') {
        Object(_utils_console_warn__WEBPACK_IMPORTED_MODULE_4__["default"])('Expected `action` arg to be a String.');
      } else {
        var command = "".concat(pluginName, ":").concat(action);
        payload = payload || null;

        if (actionType && payload) {
          ga(command, actionType, payload);

          if (_debug) {
            Object(_utils_console_log__WEBPACK_IMPORTED_MODULE_5__["default"])("called ga('".concat(command, "');"));
            Object(_utils_console_log__WEBPACK_IMPORTED_MODULE_5__["default"])("actionType: \"".concat(actionType, "\" with payload: ").concat(JSON.stringify(payload)));
          }
        } else if (payload) {
          ga(command, payload);

          if (_debug) {
            Object(_utils_console_log__WEBPACK_IMPORTED_MODULE_5__["default"])("called ga('".concat(command, "');"));
            Object(_utils_console_log__WEBPACK_IMPORTED_MODULE_5__["default"])("with payload: ".concat(JSON.stringify(payload)));
          }
        } else {
          ga(command);

          if (_debug) {
            Object(_utils_console_log__WEBPACK_IMPORTED_MODULE_5__["default"])("called ga('".concat(command, "');"));
          }
        }
      }
    }
  }
};
/**
 * outboundLink:
 * GA outboundLink tracking
 * @param args.label {String} e.g. url, or 'Create an Account'
 * @param {function} hitCallback - Called after processing a hit.
 */

function outboundLink(args, hitCallback, trackerNames) {
  if (typeof hitCallback !== 'function') {
    Object(_utils_console_warn__WEBPACK_IMPORTED_MODULE_4__["default"])('hitCallback function is required');
    return;
  }

  if (typeof ga === 'function') {
    // Simple Validation
    if (!args || !args.label) {
      Object(_utils_console_warn__WEBPACK_IMPORTED_MODULE_4__["default"])('args.label is required in outboundLink()');
      return;
    } // Required Fields


    var fieldObject = {
      hitType: 'event',
      eventCategory: 'Outbound',
      eventAction: 'Click',
      eventLabel: _format(args.label)
    };
    var safetyCallbackCalled = false;

    var safetyCallback = function safetyCallback() {
      // This prevents a delayed response from GA
      // causing hitCallback from being fired twice
      safetyCallbackCalled = true;
      hitCallback();
    }; // Using a timeout to ensure the execution of critical application code
    // in the case when the GA server might be down
    // or an ad blocker prevents sending the data
    // register safety net timeout:


    var t = setTimeout(safetyCallback, 250);

    var clearableCallbackForGA = function clearableCallbackForGA() {
      clearTimeout(t);

      if (!safetyCallbackCalled) {
        hitCallback();
      }
    };

    fieldObject.hitCallback = clearableCallbackForGA; // Send to GA

    send(fieldObject, trackerNames);
  } else {
    // if ga is not defined, return the callback so the application
    // continues to work as expected
    setTimeout(hitCallback, 0);
  }
}
var testModeAPI = _utils_testModeAPI__WEBPACK_IMPORTED_MODULE_6__["default"];
/* harmony default export */ __webpack_exports__["default"] = ({
  initialize: initialize,
  ga: ga,
  set: set,
  send: send,
  pageview: pageview,
  modalview: modalview,
  timing: timing,
  event: event,
  exception: exception,
  plugin: plugin,
  outboundLink: outboundLink,
  testModeAPI: _utils_testModeAPI__WEBPACK_IMPORTED_MODULE_6__["default"]
});

/***/ }),

/***/ "./node_modules/@ebi-gene-expression-group/atlas-feedback-form/node_modules/react-ga/dist/esm/index.js":
/*!*************************************************************************************************************!*\
  !*** ./node_modules/@ebi-gene-expression-group/atlas-feedback-form/node_modules/react-ga/dist/esm/index.js ***!
  \*************************************************************************************************************/
/*! exports provided: initialize, addTrackers, ga, set, send, pageview, modalview, timing, event, exception, plugin, outboundLink, testModeAPI, OutboundLink, default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "initialize", function() { return initialize; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addTrackers", function() { return addTrackers; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ga", function() { return ga; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "set", function() { return set; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "send", function() { return send; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pageview", function() { return pageview; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "modalview", function() { return modalview; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timing", function() { return timing; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "event", function() { return event; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "exception", function() { return exception; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "plugin", function() { return plugin; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "outboundLink", function() { return outboundLink; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "testModeAPI", function() { return testModeAPI; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "OutboundLink", function() { return OutboundLink; });
/* harmony import */ var _components_OutboundLink__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./components/OutboundLink */ "./node_modules/@ebi-gene-expression-group/atlas-feedback-form/node_modules/react-ga/dist/esm/components/OutboundLink.js");
/* harmony import */ var _core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./core */ "./node_modules/@ebi-gene-expression-group/atlas-feedback-form/node_modules/react-ga/dist/esm/core.js");
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }

function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }

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 initialize = _core__WEBPACK_IMPORTED_MODULE_1__["initialize"];

var addTrackers = _core__WEBPACK_IMPORTED_MODULE_1__["addTrackers"];

var ga = _core__WEBPACK_IMPORTED_MODULE_1__["ga"];

var set = _core__WEBPACK_IMPORTED_MODULE_1__["set"];

var send = _core__WEBPACK_IMPORTED_MODULE_1__["send"];

var pageview = _core__WEBPACK_IMPORTED_MODULE_1__["pageview"];

var modalview = _core__WEBPACK_IMPORTED_MODULE_1__["modalview"];

var timing = _core__WEBPACK_IMPORTED_MODULE_1__["timing"];

var event = _core__WEBPACK_IMPORTED_MODULE_1__["event"];

var exception = _core__WEBPACK_IMPORTED_MODULE_1__["exception"];

var plugin = _core__WEBPACK_IMPORTED_MODULE_1__["plugin"];

var outboundLink = _core__WEBPACK_IMPORTED_MODULE_1__["outboundLink"];

var testModeAPI = _core__WEBPACK_IMPORTED_MODULE_1__["testModeAPI"];

_components_OutboundLink__WEBPACK_IMPORTED_MODULE_0__["default"].origTrackLink = _components_OutboundLink__WEBPACK_IMPORTED_MODULE_0__["default"].trackLink;
_components_OutboundLink__WEBPACK_IMPORTED_MODULE_0__["default"].trackLink = _core__WEBPACK_IMPORTED_MODULE_1__["outboundLink"];
var OutboundLink = _components_OutboundLink__WEBPACK_IMPORTED_MODULE_0__["default"];
/* harmony default export */ __webpack_exports__["default"] = (_objectSpread(_objectSpread({}, _core__WEBPACK_IMPORTED_MODULE_1__), {}, {
  OutboundLink: OutboundLink
}));

/***/ }),

/***/ "./node_modules/@ebi-gene-expression-group/atlas-feedback-form/node_modules/react-ga/dist/esm/utils/console/log.js":
/*!*************************************************************************************************************************!*\
  !*** ./node_modules/@ebi-gene-expression-group/atlas-feedback-form/node_modules/react-ga/dist/esm/utils/console/log.js ***!
  \*************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return log; });
function log(s) {
  console.info('[react-ga]', s);
}

/***/ }),

/***/ "./node_modules/@ebi-gene-expression-group/atlas-feedback-form/node_modules/react-ga/dist/esm/utils/console/warn.js":
/*!**************************************************************************************************************************!*\
  !*** ./node_modules/@ebi-gene-expression-group/atlas-feedback-form/node_modules/react-ga/dist/esm/utils/console/warn.js ***!
  \**************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return warn; });
function warn(s) {
  console.warn('[react-ga]', s);
}

/***/ }),

/***/ "./node_modules/@ebi-gene-expression-group/atlas-feedback-form/node_modules/react-ga/dist/esm/utils/format.js":
/*!********************************************************************************************************************!*\
  !*** ./node_modules/@ebi-gene-expression-group/atlas-feedback-form/node_modules/react-ga/dist/esm/utils/format.js ***!
  \********************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return format; });
/* harmony import */ var _redactEmail__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./redactEmail */ "./node_modules/@ebi-gene-expression-group/atlas-feedback-form/node_modules/react-ga/dist/esm/utils/redactEmail.js");
/* harmony import */ var _toTitleCase__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./toTitleCase */ "./node_modules/@ebi-gene-expression-group/atlas-feedback-form/node_modules/react-ga/dist/esm/utils/toTitleCase.js");


function format() {
  var s = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
  var titleCase = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  var redactingEmail = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;

  var _str = s || '';

  if (titleCase) {
    _str = Object(_toTitleCase__WEBPACK_IMPORTED_MODULE_1__["default"])(s);
  }

  if (redactingEmail) {
    _str = Object(_redactEmail__WEBPACK_IMPORTED_MODULE_0__["default"])(_str);
  }

  return _str;
}

/***/ }),

/***/ "./node_modules/@ebi-gene-expression-group/atlas-feedback-form/node_modules/react-ga/dist/esm/utils/loadGA.js":
/*!********************************************************************************************************************!*\
  !*** ./node_modules/@ebi-gene-expression-group/atlas-feedback-form/node_modules/react-ga/dist/esm/utils/loadGA.js ***!
  \********************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
var isLoaded = false;
/* harmony default export */ __webpack_exports__["default"] = (function (options) {
  if (isLoaded) return;
  isLoaded = true;
  var gaAddress = 'https://www.google-analytics.com/analytics.js';

  if (options && options.gaAddress) {
    gaAddress = options.gaAddress;
  } else if (options && options.debug) {
    gaAddress = 'https://www.google-analytics.com/analytics_debug.js';
  }

  var onerror = options && options.onerror; // https://developers.google.com/analytics/devguides/collection/analyticsjs/

  /* eslint-disable */

  (function (i, s, o, g, r, a, m) {
    i['GoogleAnalyticsObject'] = r;
    i[r] = i[r] || function () {
      (i[r].q = i[r].q || []).push(arguments);
    }, i[r].l = 1 * new Date();
    a = s.createElement(o), m = s.getElementsByTagName(o)[0];
    a.async = 1;
    a.src = g;
    a.onerror = onerror;
    m.parentNode.insertBefore(a, m);
  })(window, document, 'script', gaAddress, 'ga');
  /* eslint-enable */

});

/***/ }),

/***/ "./node_modules/@ebi-gene-expression-group/atlas-feedback-form/node_modules/react-ga/dist/esm/utils/mightBeEmail.js":
/*!**************************************************************************************************************************!*\
  !*** ./node_modules/@ebi-gene-expression-group/atlas-feedback-form/node_modules/react-ga/dist/esm/utils/mightBeEmail.js ***!
  \**************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return mightBeEmail; });
// See if s could be an email address. We don't want to send personal data like email.
// https://support.google.com/analytics/answer/2795983?hl=en
function mightBeEmail(s) {
  // There's no point trying to validate rfc822 fully, just look for ...@...
  return typeof s === 'string' && s.indexOf('@') !== -1;
}

/***/ }),

/***/ "./node_modules/@ebi-gene-expression-group/atlas-feedback-form/node_modules/react-ga/dist/esm/utils/redactEmail.js":
/*!*************************************************************************************************************************!*\
  !*** ./node_modules/@ebi-gene-expression-group/atlas-feedback-form/node_modules/react-ga/dist/esm/utils/redactEmail.js ***!
  \*************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return redactEmail; });
/* harmony import */ var _console_warn__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./console/warn */ "./node_modules/@ebi-gene-expression-group/atlas-feedback-form/node_modules/react-ga/dist/esm/utils/console/warn.js");
/* harmony import */ var _mightBeEmail__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./mightBeEmail */ "./node_modules/@ebi-gene-expression-group/atlas-feedback-form/node_modules/react-ga/dist/esm/utils/mightBeEmail.js");


var redacted = 'REDACTED (Potential Email Address)';
function redactEmail(string) {
  if (Object(_mightBeEmail__WEBPACK_IMPORTED_MODULE_1__["default"])(string)) {
    Object(_console_warn__WEBPACK_IMPORTED_MODULE_0__["default"])('This arg looks like an email address, redacting.');
    return redacted;
  }

  return string;
}

/***/ }),

/***/ "./node_modules/@ebi-gene-expression-group/atlas-feedback-form/node_modules/react-ga/dist/esm/utils/removeLeadingSlash.js":
/*!********************************************************************************************************************************!*\
  !*** ./node_modules/@ebi-gene-expression-group/atlas-feedback-form/node_modules/react-ga/dist/esm/utils/removeLeadingSlash.js ***!
  \********************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return removeLeadingSlash; });
function removeLeadingSlash(string) {
  if (string.substring(0, 1) === '/') {
    return string.substring(1);
  }

  return string;
}

/***/ }),

/***/ "./node_modules/@ebi-gene-expression-group/atlas-feedback-form/node_modules/react-ga/dist/esm/utils/testModeAPI.js":
/*!*************************************************************************************************************************!*\
  !*** ./node_modules/@ebi-gene-expression-group/atlas-feedback-form/node_modules/react-ga/dist/esm/utils/testModeAPI.js ***!
  \*************************************************************************************************************************/
/*! exports provided: gaCalls, default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "gaCalls", function() { return gaCalls; });
var gaCalls = [];
/* harmony default export */ __webpack_exports__["default"] = ({
  calls: gaCalls,
  ga: function ga() {
    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
      args[_key] = arguments[_key];
    }

    gaCalls.push([].concat(args));
  },
  resetCalls: function resetCalls() {
    gaCalls.length = 0;
  }
});

/***/ }),

/***/ "./node_modules/@ebi-gene-expression-group/atlas-feedback-form/node_modules/react-ga/dist/esm/utils/toTitleCase.js":
/*!*************************************************************************************************************************!*\
  !*** ./node_modules/@ebi-gene-expression-group/atlas-feedback-form/node_modules/react-ga/dist/esm/utils/toTitleCase.js ***!
  \*************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return toTitleCase; });
/* harmony import */ var _trim__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./trim */ "./node_modules/@ebi-gene-expression-group/atlas-feedback-form/node_modules/react-ga/dist/esm/utils/trim.js");
/**
 * To Title Case 2.1 - http://individed.com/code/to-title-case/
 * Copyright 2008-2013 David Gouch. Licensed under the MIT License.
 * https://github.com/gouch/to-title-case
 */

var smallWords = /^(a|an|and|as|at|but|by|en|for|if|in|nor|of|on|or|per|the|to|vs?\.?|via)$/i; // test

function toTitleCase(string) {
  return Object(_trim__WEBPACK_IMPORTED_MODULE_0__["default"])(string).replace(/[A-Za-z0-9\u00C0-\u00FF]+[^\s-]*/g, function (match, index, title) {
    if (index > 0 && index + match.length !== title.length && match.search(smallWords) > -1 && title.charAt(index - 2) !== ':' && (title.charAt(index + match.length) !== '-' || title.charAt(index - 1) === '-') && title.charAt(index - 1).search(/[^\s-]/) < 0) {
      return match.toLowerCase();
    }

    if (match.substr(1).search(/[A-Z]|\../) > -1) {
      return match;
    }

    return match.charAt(0).toUpperCase() + match.substr(1);
  });
}

/***/ }),

/***/ "./node_modules/@ebi-gene-expression-group/atlas-feedback-form/node_modules/react-ga/dist/esm/utils/trim.js":
/*!******************************************************************************************************************!*\
  !*** ./node_modules/@ebi-gene-expression-group/atlas-feedback-form/node_modules/react-ga/dist/esm/utils/trim.js ***!
  \******************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return trim; });
// GA strings need to have leading/trailing whitespace trimmed, and not all
// browsers have String.prototoype.trim().
function trim(s) {
  return s && s.toString().replace(/^\s+|\s+$/g, '');
}

/***/ }),

/***/ "./node_modules/keymaster/keymaster.js":
/*!*********************************************!*\
  !*** ./node_modules/keymaster/keymaster.js ***!
  \*********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

//     keymaster.js
//     (c) 2011-2013 Thomas Fuchs
//     keymaster.js may be freely distributed under the MIT license.

;(function(global){
  var k,
    _handlers = {},
    _mods = { 16: false, 18: false, 17: false, 91: false },
    _scope = 'all',
    // modifier keys
    _MODIFIERS = {
      '⇧': 16, shift: 16,
      '⌥': 18, alt: 18, option: 18,
      '⌃': 17, ctrl: 17, control: 17,
      '⌘': 91, command: 91
    },
    // special keys
    _MAP = {
      backspace: 8, tab: 9, clear: 12,
      enter: 13, 'return': 13,
      esc: 27, escape: 27, space: 32,
      left: 37, up: 38,
      right: 39, down: 40,
      del: 46, 'delete': 46,
      home: 36, end: 35,
      pageup: 33, pagedown: 34,
      ',': 188, '.': 190, '/': 191,
      '`': 192, '-': 189, '=': 187,
      ';': 186, '\'': 222,
      '[': 219, ']': 221, '\\': 220
    },
    code = function(x){
      return _MAP[x] || x.toUpperCase().charCodeAt(0);
    },
    _downKeys = [];

  for(k=1;k<20;k++) _MAP['f'+k] = 111+k;

  // IE doesn't support Array#indexOf, so have a simple replacement
  function index(array, item){
    var i = array.length;
    while(i--) if(array[i]===item) return i;
    return -1;
  }

  // for comparing mods before unassignment
  function compareArray(a1, a2) {
    if (a1.length != a2.length) return false;
    for (var i = 0; i < a1.length; i++) {
        if (a1[i] !== a2[i]) return false;
    }
    return true;
  }

  var modifierMap = {
      16:'shiftKey',
      18:'altKey',
      17:'ctrlKey',
      91:'metaKey'
  };
  function updateModifierKey(event) {
      for(k in _mods) _mods[k] = event[modifierMap[k]];
  };

  // handle keydown event
  function dispatch(event) {
    var key, handler, k, i, modifiersMatch, scope;
    key = event.keyCode;

    if (index(_downKeys, key) == -1) {
        _downKeys.push(key);
    }

    // if a modifier key, set the key.<modifierkeyname> property to true and return
    if(key == 93 || key == 224) key = 91; // right command on webkit, command on Gecko
    if(key in _mods) {
      _mods[key] = true;
      // 'assignKey' from inside this closure is exported to window.key
      for(k in _MODIFIERS) if(_MODIFIERS[k] == key) assignKey[k] = true;
      return;
    }
    updateModifierKey(event);

    // see if we need to ignore the keypress (filter() can can be overridden)
    // by default ignore key presses if a select, textarea, or input is focused
    if(!assignKey.filter.call(this, event)) return;

    // abort if no potentially matching shortcuts found
    if (!(key in _handlers)) return;

    scope = getScope();

    // for each potential shortcut
    for (i = 0; i < _handlers[key].length; i++) {
      handler = _handlers[key][i];

      // see if it's in the current scope
      if(handler.scope == scope || handler.scope == 'all'){
        // check if modifiers match if any
        modifiersMatch = handler.mods.length > 0;
        for(k in _mods)
          if((!_mods[k] && index(handler.mods, +k) > -1) ||
            (_mods[k] && index(handler.mods, +k) == -1)) modifiersMatch = false;
        // call the handler and stop the event if neccessary
        if((handler.mods.length == 0 && !_mods[16] && !_mods[18] && !_mods[17] && !_mods[91]) || modifiersMatch){
          if(handler.method(event, handler)===false){
            if(event.preventDefault) event.preventDefault();
              else event.returnValue = false;
            if(event.stopPropagation) event.stopPropagation();
            if(event.cancelBubble) event.cancelBubble = true;
          }
        }
      }
    }
  };

  // unset modifier keys on keyup
  function clearModifier(event){
    var key = event.keyCode, k,
        i = index(_downKeys, key);

    // remove key from _downKeys
    if (i >= 0) {
        _downKeys.splice(i, 1);
    }

    if(key == 93 || key == 224) key = 91;
    if(key in _mods) {
      _mods[key] = false;
      for(k in _MODIFIERS) if(_MODIFIERS[k] == key) assignKey[k] = false;
    }
  };

  function resetModifiers() {
    for(k in _mods) _mods[k] = false;
    for(k in _MODIFIERS) assignKey[k] = false;
  };

  // parse and assign shortcut
  function assignKey(key, scope, method){
    var keys, mods;
    keys = getKeys(key);
    if (method === undefined) {
      method = scope;
      scope = 'all';
    }

    // for each shortcut
    for (var i = 0; i < keys.length; i++) {
      // set modifier keys if any
      mods = [];
      key = keys[i].split('+');
      if (key.length > 1){
        mods = getMods(key);
        key = [key[key.length-1]];
      }
      // convert to keycode and...
      key = key[0]
      key = code(key);
      // ...store handler
      if (!(key in _handlers)) _handlers[key] = [];
      _handlers[key].push({ shortcut: keys[i], scope: scope, method: method, key: keys[i], mods: mods });
    }
  };

  // unbind all handlers for given key in current scope
  function unbindKey(key, scope) {
    var multipleKeys, keys,
      mods = [],
      i, j, obj;

    multipleKeys = getKeys(key);

    for (j = 0; j < multipleKeys.length; j++) {
      keys = multipleKeys[j].split('+');

      if (keys.length > 1) {
        mods = getMods(keys);
        key = keys[keys.length - 1];
      }

      key = code(key);

      if (scope === undefined) {
        scope = getScope();
      }
      if (!_handlers[key]) {
        return;
      }
      for (i = 0; i < _handlers[key].length; i++) {
        obj = _handlers[key][i];
        // only clear handlers if correct scope and mods match
        if (obj.scope === scope && compareArray(obj.mods, mods)) {
          _handlers[key][i] = {};
        }
      }
    }
  };

  // Returns true if the key with code 'keyCode' is currently down
  // Converts strings into key codes.
  function isPressed(keyCode) {
      if (typeof(keyCode)=='string') {
        keyCode = code(keyCode);
      }
      return index(_downKeys, keyCode) != -1;
  }

  function getPressedKeyCodes() {
      return _downKeys.slice(0);
  }

  function filter(event){
    var tagName = (event.target || event.srcElement).tagName;
    // ignore keypressed in any elements that support keyboard data input
    return !(tagName == 'INPUT' || tagName == 'SELECT' || tagName == 'TEXTAREA');
  }

  // initialize key.<modifier> to false
  for(k in _MODIFIERS) assignKey[k] = false;

  // set current scope (default 'all')
  function setScope(scope){ _scope = scope || 'all' };
  function getScope(){ return _scope || 'all' };

  // delete all handlers for a given scope
  function deleteScope(scope){
    var key, handlers, i;

    for (key in _handlers) {
      handlers = _handlers[key];
      for (i = 0; i < handlers.length; ) {
        if (handlers[i].scope === scope) handlers.splice(i, 1);
        else i++;
      }
    }
  };

  // abstract key logic for assign and unassign
  function getKeys(key) {
    var keys;
    key = key.replace(/\s/g, '');
    keys = key.split(',');
    if ((keys[keys.length - 1]) == '') {
      keys[keys.length - 2] += ',';
    }
    return keys;
  }

  // abstract mods logic for assign and unassign
  function getMods(key) {
    var mods = key.slice(0, key.length - 1);
    for (var mi = 0; mi < mods.length; mi++)
    mods[mi] = _MODIFIERS[mods[mi]];
    return mods;
  }

  // cross-browser events
  function addEvent(object, event, method) {
    if (object.addEventListener)
      object.addEventListener(event, method, false);
    else if(object.attachEvent)
      object.attachEvent('on'+event, function(){ method(window.event) });
  };

  // set the handlers globally on document
  addEvent(document, 'keydown', function(event) { dispatch(event) }); // Passing _scope to a callback to ensure it remains the same by execution. Fixes #48
  addEvent(document, 'keyup', clearModifier);

  // reset modifiers to false whenever the window is (re)focused.
  addEvent(window, 'focus', resetModifiers);

  // store previously defined key
  var previousKey = global.key;

  // restore previously defined key and return reference to our key object
  function noConflict() {
    var k = global.key;
    global.key = previousKey;
    return k;
  }

  // set window.key and window.key.set/get/deleteScope, and the default filter
  global.key = assignKey;
  global.key.setScope = setScope;
  global.key.getScope = getScope;
  global.key.deleteScope = deleteScope;
  global.key.filter = filter;
  global.key.isPressed = isPressed;
  global.key.getPressedKeyCodes = getPressedKeyCodes;
  global.key.noConflict = noConflict;
  global.key.unbind = unbindKey;

  if(true) module.exports = assignKey;

})(this);


/***/ }),

/***/ "./node_modules/react-popup/dist/ActionButton.react.js":
/*!*************************************************************!*\
  !*** ./node_modules/react-popup/dist/ActionButton.react.js ***!
  \*************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;

var _react = _interopRequireDefault(__webpack_require__(/*! react */ "./node_modules/react/index.js"));

var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js"));

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } _setPrototypeOf(subClass.prototype, superClass && superClass.prototype); if (superClass) _setPrototypeOf(subClass, superClass); }

function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }

function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }

function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }

function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }

function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

function _getPrototypeOf(o) { _getPrototypeOf = Object.getPrototypeOf || function _getPrototypeOf(o) { return o.__proto__; }; return _getPrototypeOf(o); }

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 PopupAction =
/*#__PURE__*/
function (_React$Component) {
  function PopupAction() {
    _classCallCheck(this, PopupAction);

    return _possibleConstructorReturn(this, _getPrototypeOf(PopupAction).apply(this, arguments));
  }

  _createClass(PopupAction, [{
    key: "handleClick",
    value: function handleClick() {
      return this.props.onClick();
    }
  }, {
    key: "render",
    value: function render() {
      var _this = this;

      var className = this.props.className;

      if (this.props.url && this.props.url !== '#') {
        return _react.default.createElement("a", {
          href: this.props.url,
          target: "_blank",
          className: className
        }, this.props.children);
      }

      return _react.default.createElement("button", {
        onClick: function onClick() {
          return _this.handleClick();
        },
        className: className
      }, this.props.children);
    }
  }]);

  _inherits(PopupAction, _React$Component);

  return PopupAction;
}(_react.default.Component);

_defineProperty(PopupAction, "defaultProps", {
  onClick: function onClick() {},
  className: 'btn',
  url: null
});

PopupAction.propTypes = {
  onClick: _propTypes.default.func,
  className: _propTypes.default.string,
  children: _propTypes.default.node.isRequired,
  url: _propTypes.default.string
};
var _default = PopupAction;
exports.default = _default;

/***/ }),

/***/ "./node_modules/react-popup/dist/Bem.js":
/*!**********************************************!*\
  !*** ./node_modules/react-popup/dist/Bem.js ***!
  \**********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.element = exports.modifier = void 0;

var element = function element(el, base) {
  return "".concat(base, "__").concat(el);
};

exports.element = element;

var modifier = function modifier(modifiers, base) {
  if (!modifiers) {
    return null;
  }

  var finalClass = [];
  var classNames = modifiers.split(' ');
  classNames.forEach(function (singleClass) {
    finalClass.push("".concat(base, "--").concat(singleClass));
  });
  return finalClass.join(' ');
};

exports.modifier = modifier;

/***/ }),

/***/ "./node_modules/react-popup/dist/ButtonsSpace.react.js":
/*!*************************************************************!*\
  !*** ./node_modules/react-popup/dist/ButtonsSpace.react.js ***!
  \*************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;

var _react = _interopRequireDefault(__webpack_require__(/*! react */ "./node_modules/react/index.js"));

var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js"));

var _ActionButton = _interopRequireDefault(__webpack_require__(/*! ./ActionButton.react */ "./node_modules/react-popup/dist/ActionButton.react.js"));

var _Bem = __webpack_require__(/*! ./Bem */ "./node_modules/react-popup/dist/Bem.js");

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } _setPrototypeOf(subClass.prototype, superClass && superClass.prototype); if (superClass) _setPrototypeOf(subClass, superClass); }

function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }

function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }

function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }

function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }

function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

function _getPrototypeOf(o) { _getPrototypeOf = Object.getPrototypeOf || function _getPrototypeOf(o) { return o.__proto__; }; return _getPrototypeOf(o); }

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 PopupFooterButtons =
/*#__PURE__*/
function (_React$Component) {
  function PopupFooterButtons() {
    _classCallCheck(this, PopupFooterButtons);

    return _possibleConstructorReturn(this, _getPrototypeOf(PopupFooterButtons).apply(this, arguments));
  }

  _createClass(PopupFooterButtons, [{
    key: "onOk",
    value: function onOk() {
      return this.props.onOk();
    }
  }, {
    key: "onClose",
    value: function onClose() {
      return this.props.onClose();
    }
  }, {
    key: "buttonClick",
    value: function buttonClick(action) {
      return this.props.buttonClick(action);
    }
  }, {
    key: "render",
    value: function render() {
      var _this = this;

      if (!this.props.buttons) {
        return null;
      }

      var btns = [];
      this.props.buttons.forEach(function (btn, i) {
        var url = btn.url ? btn.url : null;
        var key = i;

        if (typeof btn === 'string') {
          if (btn === 'ok') {
            btns.push(_react.default.createElement(_ActionButton.default, {
              className: "".concat(_this.props.btnClass, " ").concat(_this.props.btnClass, "--ok"),
              key: key,
              onClick: function onClick() {
                return _this.onOk();
              }
            }, _this.props.defaultOk));
          } else if (btn === 'cancel') {
            btns.push(_react.default.createElement(_ActionButton.default, {
              className: "".concat(_this.props.btnClass, " ").concat(_this.props.btnClass, "--cancel"),
              key: key,
              onClick: function onClick() {
                return _this.onClose();
              }
            }, _this.props.defaultCancel));
          }
        } else if (_react.default.isValidElement(btn)) {
          btns.push(btn);
        } else {
          var className = "".concat(_this.props.btnClass, " ").concat((0, _Bem.modifier)(btn.className, _this.props.btnClass));

          var btnComponent = _react.default.createElement(_ActionButton.default, {
            className: className,
            key: key,
            url: url,
            onClick: function onClick() {
              return _this.buttonClick(btn.action);
            }
          }, btn.text);

          btns.push(btnComponent);
        }
      });
      return _react.default.createElement("div", {
        className: this.props.className
      }, btns);
    }
  }]);

  _inherits(PopupFooterButtons, _React$Component);

  return PopupFooterButtons;
}(_react.default.Component);

exports.default = PopupFooterButtons;

_defineProperty(PopupFooterButtons, "defaultProps", {
  buttons: null,
  className: null,
  onOk: function onOk() {},
  onClose: function onClose() {},
  buttonClick: function buttonClick() {},
  btnClass: null,
  defaultOk: null,
  defaultCancel: null
});

PopupFooterButtons.propTypes = {
  buttons: _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.object])),
  className: _propTypes.default.string,
  onOk: _propTypes.default.func,
  onClose: _propTypes.default.func,
  buttonClick: _propTypes.default.func,
  btnClass: _propTypes.default.string,
  defaultOk: _propTypes.default.string,
  defaultCancel: _propTypes.default.string
};

/***/ }),

/***/ "./node_modules/react-popup/dist/Constants.js":
/*!****************************************************!*\
  !*** ./node_modules/react-popup/dist/Constants.js ***!
  \****************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
var _default = {
  SHOW: 'SHOW',
  CLOSE: 'CLOSE',
  REFRESH: 'REFRESH'
};
exports.default = _default;

/***/ }),

/***/ "./node_modules/react-popup/dist/Footer.react.js":
/*!*******************************************************!*\
  !*** ./node_modules/react-popup/dist/Footer.react.js ***!
  \*******************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;

var _react = _interopRequireDefault(__webpack_require__(/*! react */ "./node_modules/react/index.js"));

var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js"));

var _ButtonsSpace = _interopRequireDefault(__webpack_require__(/*! ./ButtonsSpace.react */ "./node_modules/react-popup/dist/ButtonsSpace.react.js"));

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var PopupFooter = function PopupFooter(props) {
  if (!props.buttons) {
    return null;
  }

  return _react.default.createElement("footer", {
    className: props.className
  }, _react.default.createElement(_ButtonsSpace.default, {
    buttonClick: props.buttonClick,
    onOk: props.onOk,
    onClose: props.onClose,
    className: "".concat(props.className, "__left-space"),
    btnClass: props.btnClass,
    defaultOk: props.defaultOk,
    defaultCancel: props.defaultCancel,
    buttons: props.buttons.left
  }), _react.default.createElement(_ButtonsSpace.default, {
    buttonClick: props.buttonClick,
    onOk: props.onOk,
    onClose: props.onClose,
    className: "".concat(props.className, "__right-space"),
    btnClass: props.btnClass,
    defaultOk: props.defaultOk,
    defaultCancel: props.defaultCancel,
    buttons: props.buttons.right
  }));
};

PopupFooter.propTypes = {
  buttons: _propTypes.default.shape({
    left: _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.object])),
    right: _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.object]))
  }),
  className: _propTypes.default.string,
  btnClass: _propTypes.default.string,
  onOk: _propTypes.default.func,
  onClose: _propTypes.default.func,
  buttonClick: _propTypes.default.func,
  defaultOk: _propTypes.default.string,
  defaultCancel: _propTypes.default.string
};
PopupFooter.defaultProps = {
  buttons: null,
  className: null,
  btnClass: null,
  defaultOk: null,
  defaultCancel: null,
  buttonClick: function buttonClick() {},
  onOk: function onOk() {},
  onClose: function onClose() {}
};
var _default = PopupFooter;
exports.default = _default;

/***/ }),

/***/ "./node_modules/react-popup/dist/Header.react.js":
/*!*******************************************************!*\
  !*** ./node_modules/react-popup/dist/Header.react.js ***!
  \*******************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;

var _react = _interopRequireDefault(__webpack_require__(/*! react */ "./node_modules/react/index.js"));

var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js"));

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var PopupHeader = function PopupHeader(props) {
  if (!props.title) {
    return null;
  }

  return _react.default.createElement("header", {
    className: props.className
  }, _react.default.createElement("h1", {
    className: "".concat(props.className, "__title")
  }, props.title));
};

PopupHeader.defaultProps = {
  title: null,
  className: null
};
PopupHeader.propTypes = {
  title: _propTypes.default.string,
  className: _propTypes.default.string
};
var _default = PopupHeader;
exports.default = _default;

/***/ }),

/***/ "./node_modules/react-popup/dist/Popup.react.js":
/*!******************************************************!*\
  !*** ./node_modules/react-popup/dist/Popup.react.js ***!
  \******************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;

var _react = _interopRequireDefault(__webpack_require__(/*! react */ "./node_modules/react/index.js"));

var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js"));

var _keymaster = _interopRequireDefault(__webpack_require__(/*! keymaster */ "./node_modules/keymaster/keymaster.js"));

var _Store = _interopRequireDefault(__webpack_require__(/*! ./Store */ "./node_modules/react-popup/dist/Store.js"));

var _Header = _interopRequireDefault(__webpack_require__(/*! ./Header.react */ "./node_modules/react-popup/dist/Header.react.js"));

var _Footer = _interopRequireDefault(__webpack_require__(/*! ./Footer.react */ "./node_modules/react-popup/dist/Footer.react.js"));

var _Constants = _interopRequireDefault(__webpack_require__(/*! ./Constants */ "./node_modules/react-popup/dist/Constants.js"));

var _Bem = __webpack_require__(/*! ./Bem */ "./node_modules/react-popup/dist/Bem.js");

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } _setPrototypeOf(subClass.prototype, superClass && superClass.prototype); if (superClass) _setPrototypeOf(subClass, superClass); }

function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }

function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }

function _getPrototypeOf(o) { _getPrototypeOf = Object.getPrototypeOf || function _getPrototypeOf(o) { return o.__proto__; }; return _getPrototypeOf(o); }

function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }

function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }

function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

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 defaultKeyFilter = _keymaster.default.filter;
var Store = new _Store.default();

var handleClose = function handleClose() {
  _keymaster.default.deleteScope('react-popup');

  _keymaster.default.filter = defaultKeyFilter;
  Store.close();
};

var initialState = {
  id: null,
  title: null,
  buttons: null,
  content: null,
  visible: false,
  className: null,
  noOverlay: false,
  position: false,
  closeOnOutsideClick: true,
  onClose: function onClose() {},
  onOpen: function onOpen() {}
};

var Popup =
/*#__PURE__*/
function (_React$Component) {
  _createClass(Popup, null, [{
    key: "addShowListener",
    value: function addShowListener(callback) {
      Store.on(_Constants.default.SHOW, callback);
    }
  }, {
    key: "removeShowListener",
    value: function removeShowListener(callback) {
      Store.removeListener(_Constants.default.SHOW, callback);
    }
  }, {
    key: "addCloseListener",
    value: function addCloseListener(callback) {
      Store.on(_Constants.default.CLOSE, callback);
    }
  }, {
    key: "removeCloseListener",
    value: function removeCloseListener(callback) {
      Store.removeListener(_Constants.default.CLOSE, callback);
    }
  }, {
    key: "register",
    value: function register(data) {
      var id = Store.getId();
      Store.popups[id] = Object.assign({}, initialState, data);
      return id;
    }
  }, {
    key: "queue",
    value: function queue(id) {
      if (!Object.prototype.hasOwnProperty.call(Store.popups, id)) {
        return false;
      }
      /** Add popup to queue */


      Store.queue.push(id);
      /** Dispatch queue */

      Store.dispatch();
      return id;
    }
  }, {
    key: "create",
    value: function create(data, bringToFront) {
      /** Register popup */
      var id = this.register(data);
      /** Queue popup */

      if (bringToFront === true) {
        var currentlyActive = Store.active;
        Store.active = null;
        this.queue(id);
        this.queue(currentlyActive);
        Store.dispatch();
      } else {
        this.queue(id);
      }

      return id;
    }
  }, {
    key: "alert",
    value: function alert(text, title, bringToFront) {
      var data = {
        title: title,
        content: text,
        buttons: {
          right: ['ok']
        }
      };
      return this.create(data, bringToFront);
    }
  }, {
    key: "close",
    value: function close() {
      Store.close();
    }
  }, {
    key: "registerPlugin",
    value: function registerPlugin(name, callback) {
      Store.plugins[name] = callback.bind(this);
    }
  }, {
    key: "plugins",
    value: function plugins() {
      return Store.plugins;
    }
  }, {
    key: "refreshPosition",
    value: function refreshPosition(position) {
      return Store.refreshPosition(position);
    }
  }, {
    key: "clearQueue",
    value: function clearQueue() {
      return Store.clearQueue();
    }
  }]);

  function Popup(props) {
    var _this;

    _classCallCheck(this, Popup);

    _this = _possibleConstructorReturn(this, _getPrototypeOf(Popup).call(this, props));
    initialState.closeOnOutsideClick = _this.props.closeOnOutsideClick;
    _this.state = initialState;
    _this.bound = {
      onShow: _this.onShow.bind(_assertThisInitialized(_assertThisInitialized(_this))),
      onClose: _this.onClose.bind(_assertThisInitialized(_assertThisInitialized(_this))),
      onRefresh: _this.onRefresh.bind(_assertThisInitialized(_assertThisInitialized(_this))),
      containerClick: _this.containerClick.bind(_assertThisInitialized(_assertThisInitialized(_this))),
      handleButtonClick: _this.handleButtonClick.bind(_assertThisInitialized(_assertThisInitialized(_this)))
    };
    _this.boxRef = null;
    _this.defaultKeyBindings = {
      ok: _this.props.defaultOkKey,
      cancel: _this.props.defaultCancelKey
    };
    return _this;
  }

  _createClass(Popup, [{
    key: "componentDidMount",
    value: function componentDidMount() {
      Store.on(_Constants.default.SHOW, this.bound.onShow);
      Store.on(_Constants.default.CLOSE, this.bound.onClose);
      Store.on(_Constants.default.REFRESH, this.bound.onRefresh);
    }
  }, {
    key: "componentDidUpdate",
    value: function componentDidUpdate() {
      if (this.boxRef) {
        this.boxRef.focus();
      }

      this.setPosition(this.state.position);
    }
  }, {
    key: "componentWillUnmount",
    value: function componentWillUnmount() {
      Store.removeListener(_Constants.default.SHOW, this.bound.onShow);
      Store.removeListener(_Constants.default.CLOSE, this.bound.onClose);
      Store.removeListener(_Constants.default.REFRESH, this.bound.onRefresh);

      _keymaster.default.deleteScope('react-popup');

      _keymaster.default.filter = defaultKeyFilter;
    }
    /**
     * Refresh popup position
     * @param position
     * @private
     */

  }, {
    key: "onRefresh",
    value: function onRefresh(position) {
      this.setPosition(position);
    }
    /**
     * On popup close
     * @private
     */

  }, {
    key: "onClose",
    value: function onClose() {
      _keymaster.default.deleteScope('react-popup');

      _keymaster.default.filter = defaultKeyFilter;
      this.state.onClose(this.state.id, this.state.title);
      this.setState(initialState);
    }
    /**
     * On popup show
     * @private
     */

  }, {
    key: "onShow",
    value: function onShow(id) {
      var _this2 = this;

      _keymaster.default.deleteScope('react-popup');

      _keymaster.default.filter = function () {
        return true;
      };

      var popup = Store.activePopup();

      if (popup.buttons && !Object.prototype.hasOwnProperty.call(popup.buttons, 'left')) {
        popup.buttons.left = [];
      }

      if (popup.buttons && !Object.prototype.hasOwnProperty.call(popup.buttons, 'right')) {
        popup.buttons.right = [];
      }

      this.setState({
        id: id,
        title: popup.title,
        content: popup.content,
        buttons: popup.buttons,
        visible: true,
        className: popup.className,
        noOverlay: popup.noOverlay,
        position: popup.position,
        closeOnOutsideClick: popup.closeOnOutsideClick,
        onClose: popup.onClose,
        onOpen: popup.onOpen
      }, function () {
        _keymaster.default.setScope('react-popup');

        _this2.state.onOpen(_this2.state.id, _this2.state.title);

        if (_this2.props.escToClose) {
          (0, _keymaster.default)('esc', 'react-popup', _this2.handleKeyEvent.bind(_this2, 'cancel', _this2.state.id));
        }

        if (_this2.state.buttons) {
          if (_this2.state.buttons.left.length) {
            _this2.state.buttons.left.forEach(function (button) {
              return _this2.bindKeyEvents(button);
            });
          }

          if (_this2.state.buttons.right.length) {
            _this2.state.buttons.right.forEach(function (button) {
              return _this2.bindKeyEvents(button);
            });
          }
        }
      });
    }
  }, {
    key: "setPosition",
    value: function setPosition(position) {
      var box = this.boxRef;
      var boxPosition = position;

      if (!box) {
        return;
      }

      if (!boxPosition) {
        boxPosition = this.state.position;
      }

      if (!boxPosition) {
        box.style.opacity = 1;
        box.style.top = null;
        box.style.left = null;
        box.style.margin = null;
        return;
      }

      if (typeof boxPosition === 'function') {
        boxPosition.call(null, box);
        return;
      }

      box.style.top = "".concat(parseInt(boxPosition.y, 10), "px");
      box.style.left = "".concat(parseInt(boxPosition.x, 10), "px");
      box.style.margin = 0;
      box.style.opacity = 1;
    }
    /**
     * Handle container click
     * @param e
     * @private
     */

  }, {
    key: "containerClick",
    value: function containerClick() {
      if (this.state.closeOnOutsideClick) {
        handleClose();
      }
    }
  }, {
    key: "bindKeyEvents",
    value: function bindKeyEvents(button) {
      var code = null;

      if (typeof button === 'string') {
        code = this.defaultKeyBindings[button];
      } else if (Object.prototype.hasOwnProperty.call(button, 'key')) {
        code = button.key;
      }

      if (this.props.escToClose && code === 'esc') {
        return;
      }

      if (code) {
        (0, _keymaster.default)(code, 'react-popup', this.handleKeyEvent.bind(this, button, this.state.id));
      }
    }
  }, {
    key: "handleKeyEvent",
    value: function handleKeyEvent(button, id, e) {
      var excludeTags = ['INPUT', 'TEXTAREA', 'BUTTON'];

      if (this.state.id !== id || button.key === 'enter' && excludeTags.indexOf(e.target.tagName) >= 0) {
        return true;
      }

      if (typeof button === 'string') {
        handleClose();
      } else if (Object.prototype.hasOwnProperty.call(button, 'action')) {
        this.handleButtonClick(button.action);
      }

      return false;
    }
    /**
     * Handle button clicks
     * @param action
     * @returns {*}
     * @private
     */

  }, {
    key: "handleButtonClick",
    value: function handleButtonClick(action) {
      if (typeof action === 'function') {
        return action.call(this, Store);
      }

      return null;
    }
  }, {
    key: "className",
    value: function className(_className) {
      return (0, _Bem.element)(_className, this.props.className);
    }
  }, {
    key: "render",
    value: function render() {
      var _this3 = this;

      var className = this.props.className;
      var box = null;
      var overlayStyle = {};

      if (this.state.visible) {
        var closeBtn = null;
        className += " ".concat(this.props.className, "--visible");

        if (this.props.closeBtn) {
          closeBtn = _react.default.createElement("button", {
            onClick: handleClose,
            className: "".concat(this.props.className, "__close")
          }, this.props.closeHtml);
        }

        var boxClass = this.className('box');

        if (this.state.className) {
          boxClass += " ".concat((0, _Bem.modifier)(this.state.className, boxClass));
        }

        box = _react.default.createElement("article", {
          role: "dialog",
          tabIndex: "-1",
          ref: function ref(el) {
            _this3.boxRef = el;
          },
          style: {
            opacity: 0,
            outline: 'none'
          },
          className: boxClass
        }, closeBtn, _react.default.createElement(_Header.default, {
          title: this.state.title,
          className: this.className('box__header')
        }), _react.default.createElement("div", {
          className: this.className('box__body')
        }, this.state.content), _react.default.createElement(_Footer.default, {
          className: this.className('box__footer'),
          btnClass: this.props.btnClass,
          buttonClick: this.bound.handleButtonClick,
          onClose: handleClose,
          onOk: handleClose,
          defaultOk: this.props.defaultOk,
          defaultCancel: this.props.defaultCancel,
          buttons: this.state.buttons
        }));
      }

      if (this.state.noOverlay) {
        overlayStyle.background = 'transparent';
      }

      return _react.default.createElement("div", {
        className: className
      }, _react.default.createElement("div", {
        role: "presentation",
        onClick: this.bound.containerClick,
        className: this.className('overlay'),
        style: overlayStyle
      }), box);
    }
  }]);

  _inherits(Popup, _React$Component);

  return Popup;
}(_react.default.Component);

_defineProperty(Popup, "defaultProps", {
  className: 'mm-popup',
  btnClass: 'mm-popup__btn',
  closeBtn: true,
  closeHtml: null,
  defaultOk: 'Ok',
  defaultOkKey: 'enter',
  defaultCancel: 'Cancel',
  defaultCancelKey: 'esc',
  closeOnOutsideClick: true,
  escToClose: true,
  onClose: function onClose() {},
  onOpen: function onOpen() {}
});

Popup.propTypes = {
  className: _propTypes.default.string,
  btnClass: _propTypes.default.string,
  closeBtn: _propTypes.default.bool,
  closeHtml: _propTypes.default.node,
  defaultOk: _propTypes.default.string,
  defaultOkKey: _propTypes.default.string,
  defaultCancel: _propTypes.default.string,
  defaultCancelKey: _propTypes.default.string,
  closeOnOutsideClick: _propTypes.default.bool,
  escToClose: _propTypes.default.bool,
  onClose: _propTypes.default.func,
  onOpen: _propTypes.default.func
};
var _default = Popup;
exports.default = _default;

/***/ }),

/***/ "./node_modules/react-popup/dist/Store.js":
/*!************************************************!*\
  !*** ./node_modules/react-popup/dist/Store.js ***!
  \************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;

var _events = __webpack_require__(/*! events */ "./node_modules/events/events.js");

var _Constants = _interopRequireDefault(__webpack_require__(/*! ./Constants */ "./node_modules/react-popup/dist/Constants.js"));

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } _setPrototypeOf(subClass.prototype, superClass && superClass.prototype); if (superClass) _setPrototypeOf(subClass, superClass); }

function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }

function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }

function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }

function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }

function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

function _getPrototypeOf(o) { _getPrototypeOf = Object.getPrototypeOf || function _getPrototypeOf(o) { return o.__proto__; }; return _getPrototypeOf(o); }

var PopupStore =
/*#__PURE__*/
function (_EventEmitter) {
  function PopupStore(props) {
    var _this;

    _classCallCheck(this, PopupStore);

    _this = _possibleConstructorReturn(this, _getPrototypeOf(PopupStore).call(this, props));
    _this.id = 1;
    _this.popups = {};
    _this.queue = [];
    _this.active = null;
    _this.plugins = {};
    return _this;
  }
  /**
   * Get popup ID
   */


  _createClass(PopupStore, [{
    key: "getId",
    value: function getId() {
      return "id_".concat(this.id++);
    }
    /**
     * Get active popup
     * @returns {*}
     */

  }, {
    key: "activePopup",
    value: function activePopup() {
      return this.popups[this.active];
    }
    /**
     * Close current popup
     */

  }, {
    key: "close",
    value: function close() {
      if (!this.active) {
        return false;
      }

      var id = this.active;
      this.active = null;
      this.emit(_Constants.default.CLOSE, id);
      this.dispatch();
      this.value = null;
      return id;
    }
    /**
     * Dispatch next popup in queue
     */

  }, {
    key: "dispatch",
    value: function dispatch() {
      if (this.active || this.queue.length < 1) {
        return false;
      }

      var id = this.queue.shift();
      /** Set active */

      this.active = id;
      this.emit(_Constants.default.SHOW, id);
      return true;
    }
    /**
     * Refresh popup position
     * @param position
     */

  }, {
    key: "refreshPosition",
    value: function refreshPosition(position) {
      this.emit(_Constants.default.REFRESH, position);
    }
    /**
     * Clear queue
     */

  }, {
    key: "clearQueue",
    value: function clearQueue() {
      this.queue = [];
    }
  }]);

  _inherits(PopupStore, _EventEmitter);

  return PopupStore;
}(_events.EventEmitter);

exports.default = PopupStore;

/***/ }),

/***/ "./node_modules/react-popup/dist/index.js":
/*!************************************************!*\
  !*** ./node_modules/react-popup/dist/index.js ***!
  \************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
Object.defineProperty(exports, "default", {
  enumerable: true,
  get: function get() {
    return _Popup.default;
  }
});

var _Popup = _interopRequireDefault(__webpack_require__(/*! ./Popup.react */ "./node_modules/react-popup/dist/Popup.react.js"));

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

/***/ })

},[["./node_modules/@ebi-gene-expression-group/atlas-feedback-form/lib/index.js","vendorCommons"]]]);
//# sourceMappingURL=feedbackForm.bundle.js.map