{"version":3,"file":"scripts.fbb30b05a5a7edfc.js","mappings":"UAAAA,KACA,yCACAC,qCACIC,YACJC,eACI,CACJ,OACAD,YAEAC,aACAH,0BACA,CACA,EAACI,iBACD,aAEAC,sCACAC,WAoBA,SACA,sBACA,OACAC,cACAC,IAEA,GAEAC,8CACAA,gDACA,CAEA,oMAGAC,KACAC,KACAC,KACAC,SACAC,SACAC,SAGAC,cACA,0BACA,gEAKA,EACA,EAEAC,cACA,sBAWA,SALAD,aAKAE,sBAEAA,sCAEA,EACA,EAsBAC,kBACA,QACAC,mCAIAL,eAGA,QACAK,+BAIAP,SAEA,EAoCAQ,aACA,eAEA,4CACAC,yCAGAF,wCACAA,8BACAA,gCAGAX,qBAEAK,QACA,CACA,EA4BAZ,kCAEA,MAOA,uBACA,0BACA,GAIA,QACAqB,gBACAC,eAGAd,YA7MA,cACA,qBACA,8BAAgDe,WAAgBA,IAChEC,UAGA,QACA,CACA,oBAEA,CAmMAC,SAEAC,EAnGAnB,wCAEA,eACAK,GACAe,sCACAC,4BACAC,+BAIA,aACAC,YACAC,YACAC,gBAEAd,qCACAA,2BACAA,4BAEAe,sBACA,+CAEA,2BACAC,UAEAhB,+BAEA,EACA,EAAS,IACT,CACA,GArEA,YAEA,eACA,IACAiB,yDAEA,GAHAb,+BAGAa,KACA,4FACAtB,mCACAK,yCACA,CACA,MAGA,QACAP,+BACAO,sCAEA,CA2HAkB,IAGAV,IACAL,2BACA,6BAEAX,6BAEA,EACAW,0BACA,4BAzDA,cACA,oCAEAP,cAIAO,yBAXA,YACA,qDACA,CAcAgB,SAEAtB,KAGAuB,oBAEA,CAwCAC,KAEA,EAEA9B,IACAS,2CAAoFb,iBAAiB,GACrGI,aAxCA+B,+HA2CA,EAEAxC,qCACA0B,IAEAlB,sBACAiC,kCACAA,gCACA,GAEAhC,IACAS,8CAAuFb,iBAAiB,GACxGI,MAIAC,MAGAgB,EACAP,IAEAF,IAGAT,IACA,EAEAR,+BACAqB,GAMAb,uBACA,0BACA,GAEAkB,IACAL,oBACAA,mBAEAZ,kBACAS,8CAAuFb,iBAAiB,GACxGI,OAIAiB,EACAP,IAEAF,KArBAuB,6HAuBA,CACA","names":["global","define","exports","factory","this","Object","value","passive","hasPassiveEvents","window","locks","documentListenerAdded","initialClientY","previousBodyOverflowSetting","previousBodyPosition","previousBodyPaddingRight","allowTouchMove","preventDefault","e","restoreOverflowSetting","document","restorePositionSetting","x","targetElement","options","i","arr2","_toConsumableArray","isIosDevice","position","top","left","scrollY","scrollX","innerHeight","setTimeout","bottomBarHeight","scrollBarGap","setOverflowHidden","isTargetElementTotallyScrolled","event","handleScroll","console","lock"],"sourceRoot":"webpack:///","sources":["node_modules/body-scroll-lock/lib/bodyScrollLock.js"],"sourcesContent":["(function (global, factory) {\n if (typeof define === \"function\" && define.amd) {\n define(['exports'], factory);\n } else if (typeof exports !== \"undefined\") {\n factory(exports);\n } else {\n var mod = {\n exports: {}\n };\n factory(mod.exports);\n global.bodyScrollLock = mod.exports;\n }\n})(this, function (exports) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n\n function _toConsumableArray(arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n } else {\n return Array.from(arr);\n }\n }\n\n // Older browsers don't support event options, feature detect it.\n\n // Adopted and modified solution from Bohdan Didukh (2017)\n // https://stackoverflow.com/questions/41594997/ios-10-safari-prevent-scrolling-behind-a-fixed-overlay-and-maintain-scroll-posi\n\n var hasPassiveEvents = false;\n if (typeof window !== 'undefined') {\n var passiveTestOptions = {\n get passive() {\n hasPassiveEvents = true;\n return undefined;\n }\n };\n window.addEventListener('testPassive', null, passiveTestOptions);\n window.removeEventListener('testPassive', null, passiveTestOptions);\n }\n\n var isIosDevice = typeof window !== 'undefined' && window.navigator && window.navigator.platform && (/iP(ad|hone|od)/.test(window.navigator.platform) || window.navigator.platform === 'MacIntel' && window.navigator.maxTouchPoints > 1);\n\n\n var locks = [];\n var documentListenerAdded = false;\n var initialClientY = -1;\n var previousBodyOverflowSetting = void 0;\n var previousBodyPosition = void 0;\n var previousBodyPaddingRight = void 0;\n\n // returns true if `el` should be allowed to receive touchmove events.\n var allowTouchMove = function allowTouchMove(el) {\n return locks.some(function (lock) {\n if (lock.options.allowTouchMove && lock.options.allowTouchMove(el)) {\n return true;\n }\n\n return false;\n });\n };\n\n var preventDefault = function preventDefault(rawEvent) {\n var e = rawEvent || window.event;\n\n // For the case whereby consumers adds a touchmove event listener to document.\n // Recall that we do document.addEventListener('touchmove', preventDefault, { passive: false })\n // in disableBodyScroll - so if we provide this opportunity to allowTouchMove, then\n // the touchmove event on document will break.\n if (allowTouchMove(e.target)) {\n return true;\n }\n\n // Do not prevent if the event has more than one touch (usually meaning this is a multi touch gesture like pinch to zoom).\n if (e.touches.length > 1) return true;\n\n if (e.preventDefault) e.preventDefault();\n\n return false;\n };\n\n var setOverflowHidden = function setOverflowHidden(options) {\n // If previousBodyPaddingRight is already set, don't set it again.\n if (previousBodyPaddingRight === undefined) {\n var _reserveScrollBarGap = !!options && options.reserveScrollBarGap === true;\n var scrollBarGap = window.innerWidth - document.documentElement.clientWidth;\n\n if (_reserveScrollBarGap && scrollBarGap > 0) {\n var computedBodyPaddingRight = parseInt(window.getComputedStyle(document.body).getPropertyValue('padding-right'), 10);\n previousBodyPaddingRight = document.body.style.paddingRight;\n document.body.style.paddingRight = computedBodyPaddingRight + scrollBarGap + 'px';\n }\n }\n\n // If previousBodyOverflowSetting is already set, don't set it again.\n if (previousBodyOverflowSetting === undefined) {\n previousBodyOverflowSetting = document.body.style.overflow;\n document.body.style.overflow = 'hidden';\n }\n };\n\n var restoreOverflowSetting = function restoreOverflowSetting() {\n if (previousBodyPaddingRight !== undefined) {\n document.body.style.paddingRight = previousBodyPaddingRight;\n\n // Restore previousBodyPaddingRight to undefined so setOverflowHidden knows it\n // can be set again.\n previousBodyPaddingRight = undefined;\n }\n\n if (previousBodyOverflowSetting !== undefined) {\n document.body.style.overflow = previousBodyOverflowSetting;\n\n // Restore previousBodyOverflowSetting to undefined\n // so setOverflowHidden knows it can be set again.\n previousBodyOverflowSetting = undefined;\n }\n };\n\n var setPositionFixed = function setPositionFixed() {\n return window.requestAnimationFrame(function () {\n // If previousBodyPosition is already set, don't set it again.\n if (previousBodyPosition === undefined) {\n previousBodyPosition = {\n position: document.body.style.position,\n top: document.body.style.top,\n left: document.body.style.left\n };\n\n // Update the dom inside an animation frame \n var _window = window,\n scrollY = _window.scrollY,\n scrollX = _window.scrollX,\n innerHeight = _window.innerHeight;\n\n document.body.style.position = 'fixed';\n document.body.style.top = -scrollY;\n document.body.style.left = -scrollX;\n\n setTimeout(function () {\n return window.requestAnimationFrame(function () {\n // Attempt to check if the bottom bar appeared due to the position change\n var bottomBarHeight = innerHeight - window.innerHeight;\n if (bottomBarHeight && scrollY >= innerHeight) {\n // Move the content further up so that the bottom bar doesn't hide it\n document.body.style.top = -(scrollY + bottomBarHeight);\n }\n });\n }, 300);\n }\n });\n };\n\n var restorePositionSetting = function restorePositionSetting() {\n if (previousBodyPosition !== undefined) {\n // Convert the position from \"px\" to Int\n var y = -parseInt(document.body.style.top, 10);\n var x = -parseInt(document.body.style.left, 10);\n\n // Restore styles\n document.body.style.position = previousBodyPosition.position;\n document.body.style.top = previousBodyPosition.top;\n document.body.style.left = previousBodyPosition.left;\n\n // Restore scroll\n window.scrollTo(x, y);\n\n previousBodyPosition = undefined;\n }\n };\n\n // https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollHeight#Problems_and_solutions\n var isTargetElementTotallyScrolled = function isTargetElementTotallyScrolled(targetElement) {\n return targetElement ? targetElement.scrollHeight - targetElement.scrollTop <= targetElement.clientHeight : false;\n };\n\n var handleScroll = function handleScroll(event, targetElement) {\n var clientY = event.targetTouches[0].clientY - initialClientY;\n\n if (allowTouchMove(event.target)) {\n return false;\n }\n\n if (targetElement && targetElement.scrollTop === 0 && clientY > 0) {\n // element is at the top of its scroll.\n return preventDefault(event);\n }\n\n if (isTargetElementTotallyScrolled(targetElement) && clientY < 0) {\n // element is at the bottom of its scroll.\n return preventDefault(event);\n }\n\n event.stopPropagation();\n return true;\n };\n\n var disableBodyScroll = exports.disableBodyScroll = function disableBodyScroll(targetElement, options) {\n // targetElement must be provided\n if (!targetElement) {\n // eslint-disable-next-line no-console\n console.error('disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.');\n return;\n }\n\n // disableBodyScroll must not have been called on this targetElement before\n if (locks.some(function (lock) {\n return lock.targetElement === targetElement;\n })) {\n return;\n }\n\n var lock = {\n targetElement: targetElement,\n options: options || {}\n };\n\n locks = [].concat(_toConsumableArray(locks), [lock]);\n\n if (isIosDevice) {\n setPositionFixed();\n } else {\n setOverflowHidden(options);\n }\n\n if (isIosDevice) {\n targetElement.ontouchstart = function (event) {\n if (event.targetTouches.length === 1) {\n // detect single touch.\n initialClientY = event.targetTouches[0].clientY;\n }\n };\n targetElement.ontouchmove = function (event) {\n if (event.targetTouches.length === 1) {\n // detect single touch.\n handleScroll(event, targetElement);\n }\n };\n\n if (!documentListenerAdded) {\n document.addEventListener('touchmove', preventDefault, hasPassiveEvents ? { passive: false } : undefined);\n documentListenerAdded = true;\n }\n }\n };\n\n var clearAllBodyScrollLocks = exports.clearAllBodyScrollLocks = function clearAllBodyScrollLocks() {\n if (isIosDevice) {\n // Clear all locks ontouchstart/ontouchmove handlers, and the references.\n locks.forEach(function (lock) {\n lock.targetElement.ontouchstart = null;\n lock.targetElement.ontouchmove = null;\n });\n\n if (documentListenerAdded) {\n document.removeEventListener('touchmove', preventDefault, hasPassiveEvents ? { passive: false } : undefined);\n documentListenerAdded = false;\n }\n\n // Reset initial clientY.\n initialClientY = -1;\n }\n\n if (isIosDevice) {\n restorePositionSetting();\n } else {\n restoreOverflowSetting();\n }\n\n locks = [];\n };\n\n var enableBodyScroll = exports.enableBodyScroll = function enableBodyScroll(targetElement) {\n if (!targetElement) {\n // eslint-disable-next-line no-console\n console.error('enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.');\n return;\n }\n\n locks = locks.filter(function (lock) {\n return lock.targetElement !== targetElement;\n });\n\n if (isIosDevice) {\n targetElement.ontouchstart = null;\n targetElement.ontouchmove = null;\n\n if (documentListenerAdded && locks.length === 0) {\n document.removeEventListener('touchmove', preventDefault, hasPassiveEvents ? { passive: false } : undefined);\n documentListenerAdded = false;\n }\n }\n\n if (isIosDevice) {\n restorePositionSetting();\n } else {\n restoreOverflowSetting();\n }\n };\n});\n\n"],"x_google_ignoreList":[]}