{"version":3,"sources":["webpack:///39.ee81dfcc.bundle.js","webpack:///./src/js/components/global/BackToTop.js"],"names":["webpackJsonp","253","module","exports","__webpack_require__","$","_classCallCheck","instance","Constructor","TypeError","_possibleConstructorReturn","self","call","ReferenceError","_inherits","subClass","superClass","prototype","Object","create","constructor","value","enumerable","writable","configurable","setPrototypeOf","__proto__","defineProperty","_createClass","defineProperties","target","props","i","length","descriptor","key","protoProps","staticProps","_component2","obj","__esModule","default","_component","BackToTop","el","config","onWindowScroll","_Component","window","on","this","document","onButtonClick","scrollTo","top","behavior","scrollTop","$footer","footerHeight","height","$el","css","width","Component"],"mappings":"AAAAA,cAAc,KAERC,IACA,SAAUC,EAAQC,EAASC,GAEjC,cAC4B,SAASC,GAcrC,QAASC,GAAgBC,EAAUC,GAAe,KAAMD,YAAoBC,IAAgB,KAAM,IAAIC,WAAU,qCAEhH,QAASC,GAA2BC,EAAMC,GAAQ,IAAKD,EAAQ,KAAM,IAAIE,gBAAe,4DAAgE,QAAOD,GAAyB,gBAATA,IAAqC,kBAATA,GAA8BD,EAAPC,EAElO,QAASE,GAAUC,EAAUC,GAAc,GAA0B,kBAAfA,IAA4C,OAAfA,EAAuB,KAAM,IAAIP,WAAU,iEAAoEO,GAAeD,GAASE,UAAYC,OAAOC,OAAOH,GAAcA,EAAWC,WAAaG,aAAeC,MAAON,EAAUO,YAAY,EAAOC,UAAU,EAAMC,cAAc,KAAeR,IAAYE,OAAOO,eAAiBP,OAAOO,eAAeV,EAAUC,GAAcD,EAASW,UAAYV,GAhBjeE,OAAOS,eAAexB,EAAS,cAC7BkB,OAAO,GAGT,IAAIO,GAAe,WAAc,QAASC,GAAiBC,EAAQC,GAAS,IAAK,GAAIC,GAAI,EAAGA,EAAID,EAAME,OAAQD,IAAK,CAAE,GAAIE,GAAaH,EAAMC,EAAIE,GAAWZ,WAAaY,EAAWZ,aAAc,EAAOY,EAAWV,cAAe,EAAU,SAAWU,KAAYA,EAAWX,UAAW,GAAML,OAAOS,eAA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"39.ee81dfcc.bundle.js","sourcesContent":["webpackJsonp([39],{\n\n/***/ 253:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* WEBPACK VAR INJECTION */(function($) {\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = 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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _component = __webpack_require__(33);\n\nvar _component2 = _interopRequireDefault(_component);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar LARGE_VIEWPORT = 1200;\n\nvar BackToTop = function (_Component) {\n _inherits(BackToTop, _Component);\n\n function BackToTop(el, config) {\n _classCallCheck(this, BackToTop);\n\n var _this = _possibleConstructorReturn(this, (BackToTop.__proto__ || Object.getPrototypeOf(BackToTop)).call(this, el, config));\n\n _this.onWindowScroll();\n return _this;\n }\n\n _createClass(BackToTop, [{\n key: 'addListeners',\n value: function addListeners() {\n $(window).on('scroll', this.onWindowScroll.bind(this));\n $(document).on('click', '.wh-back-to-top__button', this.onButtonClick.bind(this));\n }\n }, {\n key: 'onButtonClick',\n value: function onButtonClick() {\n window.scrollTo({ top: 0, behavior: 'smooth' });\n }\n }, {\n key: 'onWindowScroll',\n value: function onWindowScroll() {\n var scrollTop = $(window).scrollTop();\n var threshold = 500;\n var $footer = $('.wh-footer');\n var footerHeight = $footer.height();\n\n if (scrollTop < threshold) {\n this.$el.css('opacity', '0');\n this.$el.css('visibility', 'hidden');\n this.$el.css('transform', 'translateY(150px)');\n } else {\n this.$el.css('opacity', '1');\n this.$el.css('visibility', 'visible');\n this.$el.css('transform', '');\n }\n\n if (scrollTop + $(window).height() > $(document).height() - footerHeight) {\n this.$el.css('bottom', footerHeight + 20 + 'px');\n } else {\n if ($(document).width() < LARGE_VIEWPORT) {\n this.$el.css('bottom', 20 + 'px');\n } else {\n this.$el.css('bottom', 40 + 'px');\n }\n }\n }\n }]);\n\n return BackToTop;\n}(_component2.default);\n\nexports.default = BackToTop;\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(10)))\n\n/***/ })\n\n});\n\n\n// WEBPACK FOOTER //\n// 39.ee81dfcc.bundle.js","import Component from 'component';\n\nconst LARGE_VIEWPORT = 1200;\n\nclass BackToTop extends Component{\n constructor(el, config){\n super(el, config);\n this.onWindowScroll();\n }\n\n addListeners(){\n $(window).on('scroll', ::this.onWindowScroll);\n $(document).on('click', '.wh-back-to-top__button', ::this.onButtonClick);\n }\n\n onButtonClick() {\n window.scrollTo({ top: 0, behavior: 'smooth' });\n }\n\n onWindowScroll() {\n const scrollTop = $(window).scrollTop();\n const threshold = 500;\n const $footer = $('.wh-footer');\n const footerHeight = $footer.height();\n\n if (scrollTop < threshold) {\n this.$el.css('opacity', '0');\n this.$el.css('visibility', 'hidden');\n this.$el.css('transform', 'translateY(150px)');\n } else {\n this.$el.css('opacity', '1');\n this.$el.css('visibility', 'visible');\n this.$el.css('transform', '');\n }\n\n if (scrollTop + $(window).height() > $(document).height() - footerHeight) {\n this.$el.css('bottom', (footerHeight + 20) + 'px');\n } else {\n if ($(document).width() < LARGE_VIEWPORT) {\n this.$el.css('bottom', 20 + 'px');\n } else {\n this.$el.css('bottom', 40 + 'px');\n }\n }\n }\n}\n\nexport default BackToTop;\n\n\n\n// WEBPACK FOOTER //\n// ./src/js/components/global/BackToTop.js"],"sourceRoot":""}