{"version":3,"sources":["webpack:///scripts/scroll-to-top--824789d28e771611aa85.js","webpack:///./client/src/core/components/scroll-to-top/scroll-to-top.js"],"names":["webpackJsonpHairCare","D:\\a\\1\\s\\node_modules\\babel-loader\\lib\\index.js??ref--12-0!D:\\a\\1\\s\\node_modules\\eslint-loader\\index.js??ref--12-1!D:\\a\\1\\s\\client\\src\\core\\components\\scroll-to-top\\scroll-to-top.js","module","exports","__webpack_require__","_classCallCheck","instance","Constructor","TypeError","handleScroll","topButton","$","helpButton","window","scrollTop","parseInt","css","fadeIn","hide","debounce","func","wait","immediate","timeout","context","this","args","arguments","later","apply","callNow","clearTimeout","setTimeout","Object","defineProperty","value","_createClass","defineProperties","target","props","i","length","descriptor","enumerable","configurable","writable","key","protoProps","staticProps","prototype","_debug2","obj","__esModule","default","_debug","log","ScrollToTop","element","options","init","click","e","preventDefault","animate","scroll","DEFAULTS"],"mappings":"AAAAA,sBAAsB,kBAEhBC,8MACA,SAAUC,EAAQC,EAASC,GAEjC,YAeA,SAASC,GAAgBC,EAAUC,GAAe,KAAMD,YAAoBC,IAAgB,KAAM,IAAIC,WAAU,qCCqBhH,QAASC,KAEL,GAAIC,GAAYC,EAAE,0BACdC,EAAaD,EAAE,YAEhBA,GAAEE,QAAQC,YAAc,IAEvBC,SAASH,EAAWI,IAAI,iBAAmB,KAE7CJ,EAAWI,KAAK,eAAe,SAC/BN,EAAUO,OAAO,MAIfF,SAASH,EAAWI,IAAI,iBAAmB,KAC7CJ,EAAWI,KAAK,eAAe,SAE/BN,EAAUQ,QAKhB,QAASC,GAASC,EAAMC,EAAMC,GAC7B,GAAIC,EACJ,OAAO,YACN,GAAIC,GAAUC,KAAMC,EAAOC,UACvBC,EAAQ,WACXL,EAAU,KACLD,GAAWF,EAAKS,MAAML,EAASE,IAEjCI,EAAUR,IAAcC,CAC5BQ,cAAaR,GACbA,EAAUS,WAAWJ,EAAOP,GACxBS,GAASV,EAAKS,MAAML,EAASE,IDlEnCO,OAAOC,eAAe/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\node_modules\\\\eslint-loader\\\\index.js??ref--12-1!D:\\\\a\\\\1\\\\s\\\\client\\\\src\\\\core\\\\components\\\\scroll-to-top\\\\scroll-to-top.js\":\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: 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 _debug = __webpack_require__(\"D:\\\\a\\\\1\\\\s\\\\node_modules\\\\babel-loader\\\\lib\\\\index.js??ref--12-0!D:\\\\a\\\\1\\\\s\\\\node_modules\\\\eslint-loader\\\\index.js??ref--12-1!D:\\\\a\\\\1\\\\s\\\\node_modules\\\\debug\\\\src\\\\browser.js\");\n\nvar _debug2 = _interopRequireDefault(_debug);\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\nvar log = (0, _debug2.default)(\"scroll-to-top\");\n\nvar ScrollToTop = function () {\n\tfunction ScrollToTop(element, options) {\n\t\t_classCallCheck(this, ScrollToTop);\n\n\t\tthis.element = element;\n\t\tthis.options = options;\n\n\t\tlog(this.element, this);\n\t\tthis.init();\n\t}\n\n\t_createClass(ScrollToTop, [{\n\t\tkey: \"init\",\n\t\tvalue: function init() {\n\n\t\t\tvar topButton = $('.scroll-to-top__button');\n\t\t\tvar helpButton = $('#launcher');\n\n\t\t\ttopButton.click(function (e) {\n\t\t\t\te.preventDefault();\n\t\t\t\t$(\"html, body\").animate({ scrollTop: 0 }, 1000);\n\t\t\t\treturn false;\n\t\t\t});\n\n\t\t\t//on first load - check scroll and hide/show 'top' button\n\t\t\t// 1 second timeout added so that help button can be initialised by the help plugin\n\t\t\tif ($(window).scrollTop() > 800) {\n\t\t\t\t//helpButton.animate({'margin-right':'75px'},200);\n\t\t\t\tsetTimeout(function () {\n\t\t\t\t\thelpButton.css({ 'margin-right': '75px' });\n\t\t\t\t\ttopButton.fadeIn(100);\n\t\t\t\t}, 1000);\n\t\t\t}\n\n\t\t\t//on scroll - check scroll and hide/show 'top' button\n\t\t\t$(window).scroll(function () {\n\t\t\t\tdebounce(handleScroll(), 500);\n\t\t\t});\n\t\t}\n\t}]);\n\n\treturn ScrollToTop;\n}();\n\nfunction handleScroll() {\n\n\tvar topButton = $('.scroll-to-top__button');\n\tvar helpButton = $('#launcher');\n\n\tif ($(window).scrollTop() > 800) {\n\n\t\tif (parseInt(helpButton.css('margin-right')) < 50) {\n\t\t\t//helpButton.animate({'margin-right':'75px'},200);\n\t\t\thelpButton.css({ 'margin-right': '75px' });\n\t\t\ttopButton.fadeIn(100);\n\t\t}\n\t} else {\n\n\t\tif (parseInt(helpButton.css('margin-right')) > 50) {\n\t\t\thelpButton.css({ 'margin-right': '20px' });\n\t\t\t//helpButton.animate({'margin-right':'20px'},200);\n\t\t\ttopButton.hide();\n\t\t}\n\t}\n}\n\nfunction debounce(func, wait, immediate) {\n\tvar timeout;\n\treturn function () {\n\t\tvar context = this,\n\t\t args = arguments;\n\t\tvar later = function later() {\n\t\t\ttimeout = null;\n\t\t\tif (!immediate) func.apply(context, args);\n\t\t};\n\t\tvar callNow = immediate && !timeout;\n\t\tclearTimeout(timeout);\n\t\ttimeout = setTimeout(later, wait);\n\t\tif (callNow) func.apply(context, args);\n\t};\n};\n\nScrollToTop.DEFAULTS = {};\n\nexports.default = ScrollToTop;\n\n/***/ })\n\n});\n\n\n// WEBPACK FOOTER //\n// scripts/scroll-to-top--824789d28e771611aa85.js","import debug from \"debug\";\r\n\r\nconst log = debug(\"scroll-to-top\");\r\n\r\nclass ScrollToTop {\r\n\tconstructor(element, options) {\r\n\t\tthis.element = element;\r\n\t\tthis.options = options;\r\n\r\n\t\tlog(this.element, this);\r\n\t\tthis.init();\r\n\t}\r\n\r\n\tinit() {\r\n\r\n\t\tvar topButton = $('.scroll-to-top__button');\r\n \tvar helpButton = $('#launcher');\r\n\r\n\t\ttopButton.click(function(e) {\r\n\t\t\te.preventDefault();\r\n\t\t $(\"html, body\").animate({scrollTop: 0}, 1000);\r\n\t\t return false;\r\n\t\t });\r\n\r\n\t\t//on first load - check scroll and hide/show 'top' button\r\n\t\t// 1 second timeout added so that help button can be initialised by the help plugin\r\n\t\tif($(window).scrollTop() > 800) {\r\n\t\t\t//helpButton.animate({'margin-right':'75px'},200);\r\n\t\t\tsetTimeout(function() { \r\n\t\t\t\thelpButton.css({'margin-right':'75px'});\r\n\t\t \ttopButton.fadeIn(100);\r\n\t \t}, 1000);\r\n\t\t}\r\n\r\n\t\t//on scroll - check scroll and hide/show 'top' button\r\n\t\t$(window).scroll(function() {\r\n\t\t debounce(handleScroll(), 500);\r\n\t\t});\r\n\t}\r\n}\r\n\r\nfunction handleScroll() {\r\n\r\n var topButton = $('.scroll-to-top__button');\r\n var helpButton = $('#launcher');\r\n\r\n if($(window).scrollTop() > 800) {\r\n\r\n \tif(parseInt(helpButton.css('margin-right')) < 50) {\r\n\t \t//helpButton.animate({'margin-right':'75px'},200);\r\n\t \thelpButton.css({'margin-right':'75px'});\r\n\t \ttopButton.fadeIn(100);\r\n\t }\r\n } else {\r\n\r\n \tif(parseInt(helpButton.css('margin-right')) > 50) {\r\n\t \thelpButton.css({'margin-right':'20px'});\r\n\t \t//helpButton.animate({'margin-right':'20px'},200);\r\n\t \ttopButton.hide();\r\n\t }\r\n } \r\n}\r\n\r\nfunction debounce(func, wait, immediate) {\r\n\tvar timeout;\r\n\treturn function() {\r\n\t\tvar context = this, args = arguments;\r\n\t\tvar later = function() {\r\n\t\t\ttimeout = null;\r\n\t\t\tif (!immediate) func.apply(context, args);\r\n\t\t};\r\n\t\tvar callNow = immediate && !timeout;\r\n\t\tclearTimeout(timeout);\r\n\t\ttimeout = setTimeout(later, wait);\r\n\t\tif (callNow) func.apply(context, args);\r\n\t};\r\n};\r\n\r\nScrollToTop.DEFAULTS = {\r\n\t\r\n};\r\n\r\nexport default ScrollToTop;\r\n\n\n\n// WEBPACK FOOTER //\n// ./client/src/core/components/scroll-to-top/scroll-to-top.js"],"sourceRoot":""}