{"version":3,"sources":["webpack://Gaffa/./Src/Scripts/components/hero-gallery.js","webpack://Gaffa/./node_modules/lodash/_Symbol.js","webpack://Gaffa/./node_modules/lodash/_baseGetTag.js","webpack://Gaffa/./node_modules/lodash/_baseTrim.js","webpack://Gaffa/./node_modules/lodash/_freeGlobal.js","webpack://Gaffa/./node_modules/lodash/_getRawTag.js","webpack://Gaffa/./node_modules/lodash/_objectToString.js","webpack://Gaffa/./node_modules/lodash/_root.js","webpack://Gaffa/./node_modules/lodash/_trimmedEndIndex.js","webpack://Gaffa/./node_modules/lodash/debounce.js","webpack://Gaffa/./node_modules/lodash/isObject.js","webpack://Gaffa/./node_modules/lodash/isObjectLike.js","webpack://Gaffa/./node_modules/lodash/isSymbol.js","webpack://Gaffa/./node_modules/lodash/now.js","webpack://Gaffa/./node_modules/lodash/throttle.js","webpack://Gaffa/./node_modules/lodash/toNumber.js"],"names":["Swiper","use","Navigation","Scrollbar","Thumbs","Controller","constructor","elm","args","document","querySelector","dataset","access","initialized","openElems","querySelectorAll","closeElems","thumbnailsElem","currentIndex","scrollBar","activeThumbnailClass","swiper","thumbsSwiper","updateActiveThumbnail","i","forEach","at","classList","remove","children","add","updateActiveCaption","innerText","thumbnailClick","e","indexOf","target","parentNode","slideToLoop","initialize","item","addEventListener","spaceBetween","navigation","nextEl","prevEl","scrollbar","el","centeredSlides","centeredSlidesBounds","slidesPerView","allowTouchMove","slideToClickedSlide","setTimeout","controlSwiper","on","realIndex","keyboardEventHandler","throttle","event","key","slideNext","slidePrev","close","open","window","preventDefault","removeEventListener","getCurrentIndex","getTotalSlides","slides","length","params","loop","changeSlide","index","total","slideTo","changeCaption","elementToShow","getElementById","id","captionElement","controller","oe","ce","top","documentElement","scrollTop","paywall","getBoundingClientRect","y","console","log","pos","scrollTo","Symbol","module","exports","getRawTag","objectToString","symToStringTag","toStringTag","undefined","value","Object","trimmedEndIndex","reTrimStart","string","slice","replace","freeGlobal","g","objectProto","prototype","hasOwnProperty","nativeObjectToString","toString","isOwn","call","tag","unmasked","result","freeSelf","self","root","Function","reWhitespace","test","charAt","isObject","now","toNumber","nativeMax","Math","max","nativeMin","min","func","wait","options","lastArgs","lastThis","maxWait","timerId","lastCallTime","lastInvokeTime","leading","maxing","trailing","TypeError","invokeFunc","time","thisArg","apply","leadingEdge","timerExpired","shouldInvoke","timeSinceLastCall","trailingEdge","timeWaiting","remainingWait","debounced","isInvoking","arguments","this","clearTimeout","cancel","flush","type","baseGetTag","isObjectLike","Date","debounce","baseTrim","isSymbol","reIsBadHex","reIsBinary","reIsOctal","freeParseInt","parseInt","other","valueOf","isBinary"],"mappings":"2KAAA,IACiF,EADjF,GACiF,EADjF,UACiF,2BAAjF,EAAiF,wbAAjF,UAAiF,+HACjFA,UAAOC,IAAI,CAACC,eACZF,UAAOC,IAAI,CAACE,cACZH,UAAOC,IAAI,CAACG,WACZJ,UAAOC,IAAI,CAACI,eA2LX,UAzLc,MACXC,YAAYC,EAAKC,GAMb,GALAA,EAAOA,GAAQ,CAAC,EAKD,OAFCC,SAASC,cAAc,iBAAiBC,QAAQC,OAE1C,CAClB,IAAIC,GAAc,EAClB,MAAMC,EAAYP,EAAIQ,iBAAiB,4BACjCC,EAAaT,EAAIQ,iBAAiB,6BAElCE,GADaV,EAAIG,cAAc,8BACdH,EAAIG,cAAc,mCAEnCQ,GADcX,EAAIG,cAAc,+BACjBH,EAAIG,cAAc,yBACjCS,EAAYZ,EAAIG,cAAc,qBAC9BU,EAAuB,wCAC7B,IAAIC,EAAS,KACTC,EAAe,KAEnB,MAAMC,EAAwB,SAAUC,GACpCP,EAAeF,iBAAiB,IAAMK,GAAsBK,SAASC,IACjEA,EAAGC,UAAUC,OAAOR,EAAqB,IAE7CH,EAAeY,SAASL,GAAGG,UAAUG,IAAIV,EAC7C,EAEMW,EAAsB,SAAUP,GAClCN,EAAac,UAAaR,EAAI,CAClC,EAEMS,EAAiB,SAAUC,GAC7B,MAAMV,EAAI,IAAIP,EAAeF,iBAAiB,mCAAmC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U,YAAaP,IAAYA,EAAQO,QAAUA,EACrDE,EAAW,aAAcT,IAAYA,EAAQS,SAAWA,GAEnDwB,EAASnC,EAAMC,EAAM,CAC1B,QAAWQ,EACX,QAAWR,EACX,SAAYU,GAEhB,C,iBClEA,IAAIyB,EAAW,EAAQ,MACnB5C,EAAW,EAAQ,MACnB6C,EAAW,EAAQ,MAMnBC,EAAa,qBAGbC,EAAa,aAGbC,EAAY,cAGZC,EAAeC,SA8CnBnF,EAAOC,QArBP,SAAkBM,GAChB,GAAoB,iBAATA,EACT,OAAOA,EAET,GAAIuE,EAASvE,GACX,OA1CM,IA4CR,GAAI0B,EAAS1B,GAAQ,CACnB,IAAI6E,EAAgC,mBAAjB7E,EAAM8E,QAAwB9E,EAAM8E,UAAY9E,EACnEA,EAAQ0B,EAASmD,GAAUA,EAAQ,GAAMA,CAC3C,CACA,GAAoB,iBAAT7E,EACT,OAAiB,IAAVA,EAAcA,GAASA,EAEhCA,EAAQsE,EAAStE,GACjB,IAAI+E,EAAWN,EAAWjD,KAAKxB,GAC/B,OAAQ+E,GAAYL,EAAUlD,KAAKxB,GAC/B2E,EAAa3E,EAAMK,MAAM,GAAI0E,EAAW,EAAI,GAC3CP,EAAWhD,KAAKxB,GAvDb,KAuD6BA,CACvC,C","file":"223.9803194c2fae89485b05.js","sourcesContent":["import throttle from 'lodash/throttle';\r\nimport Swiper, { Navigation, Scrollbar, Thumbs, Controller, } from 'swiper/core';\r\nSwiper.use([Navigation]);\r\nSwiper.use([Scrollbar]);\r\nSwiper.use([Thumbs]);\r\nSwiper.use([Controller]);\r\n\r\nexport default class HeroGallery {\r\n constructor(elm, args) {\r\n args = args || {};\r\n\r\n\r\n const article = document.querySelector('.article-page').dataset.access;\r\n\r\n if (article == \"off\") {\r\n let initialized = false;\r\n const openElems = elm.querySelectorAll('[data-hero-gallery-open]');\r\n const closeElems = elm.querySelectorAll('[data-hero-gallery-close]');\r\n const slidesElem = elm.querySelector('[data-hero-gallery-slides]');\r\n const thumbnailsElem = elm.querySelector('[data-hero-gallery-thumbnails]');\r\n const captionElem = elm.querySelector('[data-hero-gallery-caption]');\r\n const currentIndex = elm.querySelector('[data-current-index]');\r\n const scrollBar = elm.querySelector('.swiper-scrollbar');\r\n const activeThumbnailClass = 'hero-gallery__modal-thumbnail--active';\r\n let swiper = null;\r\n let thumbsSwiper = null;\r\n\r\n const updateActiveThumbnail = function (i) {\r\n thumbnailsElem.querySelectorAll('.' + activeThumbnailClass).forEach((at) => {\r\n at.classList.remove(activeThumbnailClass);\r\n });\r\n thumbnailsElem.children[i].classList.add(activeThumbnailClass);\r\n };\r\n\r\n const updateActiveCaption = function (i) {\r\n currentIndex.innerText = (i + 1);\r\n };\r\n\r\n const thumbnailClick = function (e) {\r\n const i = [...thumbnailsElem.querySelectorAll('.hero-gallery__modal-thumbnail')].indexOf(e.target.parentNode.parentNode) + 1;\r\n swiper.slideToLoop(i - 1, 200, false);\r\n thumbsSwiper.slideToLoop(i - 1, 200, false);\r\n };\r\n\r\n const initialize = function () {\r\n if (initialized) {\r\n return;\r\n }\r\n\r\n initialized = true;\r\n\r\n thumbnailsElem.querySelectorAll('.hero-gallery__modal-thumbnail').forEach(item => item.addEventListener('click', thumbnailClick));\r\n\r\n swiper = new Swiper(elm.querySelector('.swiper'), {\r\n spaceBetween: 100,\r\n navigation: {\r\n nextEl: \".hero-gallery__swiper-button--next\",\r\n prevEl: \".hero-gallery__swiper-button--prev\",\r\n },\r\n scrollbar: {\r\n el: scrollBar,\r\n },\r\n });\r\n\r\n thumbsSwiper = new Swiper(elm.querySelector('.thumbs-swiper'), {\r\n spaceBetween: 10,\r\n centeredSlides: true,\r\n centeredSlidesBounds: true,\r\n slidesPerView: 'auto',\r\n allowTouchMove: false,\r\n slideToClickedSlide: true,\r\n });\r\n\r\n setTimeout(function () {\r\n controlSwiper(thumbsSwiper, swiper);\r\n controlSwiper(swiper, thumbsSwiper);\r\n }, 1000);\r\n\r\n swiper.on('activeIndexChange', () => {\r\n updateActiveThumbnail(swiper.realIndex);\r\n updateActiveCaption(swiper.realIndex);\r\n });\r\n };\r\n\r\n const keyboardEventHandler = throttle(function (event) {\r\n switch (event.key) {\r\n case 'ArrowRight':\r\n swiper.slideNext(200, true);\r\n break;\r\n case 'ArrowLeft':\r\n swiper.slidePrev(200, true);\r\n break;\r\n case 'Escape':\r\n close();\r\n break;\r\n default:\r\n }\r\n }, 500);\r\n\r\n const open = function () {\r\n if (!initialized) {\r\n initialize();\r\n }\r\n elm.classList.add('hero-gallery--open');\r\n window.addEventListener('keydown', keyboardEventHandler);\r\n\r\n };\r\n\r\n const close = function (e) {\r\n if (e) {\r\n e.preventDefault();\r\n }\r\n\r\n elm.classList.remove('hero-gallery--open');\r\n window.removeEventListener('keydown', keyboardEventHandler);\r\n return false;\r\n };\r\n\r\n openElems.forEach((oe) => {\r\n oe.addEventListener('click', open);\r\n });\r\n\r\n closeElems.forEach((ce) => {\r\n ce.addEventListener('click', close);\r\n });\r\n\r\n function getCurrentIndex(swiper) {\r\n // Apparently the `realIndex` property might be a string?\r\n return swiper.realIndex | 0;\r\n }\r\n\r\n function getTotalSlides(swiper) {\r\n // Looped carousels include leading/lagging slides which buffs the length of this array\r\n return swiper.slides.length - (swiper.params.loop ? 2 : 0);\r\n }\r\n\r\n function changeSlide(swiper, index) {\r\n const currentIndex = getCurrentIndex(swiper);\r\n const total = getTotalSlides(swiper);\r\n\r\n // Only change the slide if the new index is different to the current\r\n // This is important if two carousels are controlling each other, as without this check the program will go into an infinite loop and overflow the stack\r\n if (currentIndex !== index) {\r\n // If the carousel loops around, then we want to ensure it truly does loop - simply using the `slideTo` method doesn't actually account for looping\r\n // The idea is to check if the new index is directly before or after the current, and if so, use the `slidePrev`/`slideNext` methods that *do* account for looping\r\n if (swiper.params.loop) {\r\n if ((index === 0 && currentIndex === total - 1) || index === currentIndex + 1) {\r\n swiper.slideNext();\r\n } else if ((index === total - 1 && currentIndex === 0) || index === currentIndex - 1) {\r\n swiper.slidePrev();\r\n } else {\r\n // Need to buffer the index to account for the leading/lagging slides\r\n swiper.slideTo(index + 1);\r\n }\r\n } else {\r\n swiper.slideTo(index);\r\n }\r\n }\r\n }\r\n\r\n function changeCaption(index) {\r\n const elementToShow = document.getElementById(elm.id + '-slider-caption');\r\n if (elementToShow) {\r\n const captionElement = document.getElementById(elm.id + '-slider-caption-index-' + index);\r\n if (captionElement) {\r\n elementToShow.innerText = captionElement.innerText;\r\n }\r\n }\r\n }\r\n\r\n function controlSwiper(controller, target) {\r\n // Listens for a `transitionStart` event, as none of the other slide changing events seemed to trigger at all\r\n controller.on('transitionStart', function () {\r\n const index = getCurrentIndex(controller);\r\n changeSlide(target, index);\r\n changeCaption(index);\r\n });\r\n }\r\n\r\n } else {\r\n elm.addEventListener('click', e => {\r\n e.preventDefault();\r\n const top = document.documentElement.scrollTop\r\n const paywall = document.querySelector('.paywall').getBoundingClientRect().y;\r\n\r\n console.log(paywall);\r\n let pos = top + paywall - 200;\r\n window.scrollTo(0, pos);\r\n });\r\n }\r\n }\r\n\r\n}\r\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","var trimmedEndIndex = require('./_trimmedEndIndex');\n\n/** Used to match leading whitespace. */\nvar reTrimStart = /^\\s+/;\n\n/**\n * The base implementation of `_.trim`.\n *\n * @private\n * @param {string} string The string to trim.\n * @returns {string} Returns the trimmed string.\n */\nfunction baseTrim(string) {\n return string\n ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n : string;\n}\n\nmodule.exports = baseTrim;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","/** Used to match a single whitespace character. */\nvar reWhitespace = /\\s/;\n\n/**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\n * character of `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the index of the last non-whitespace character.\n */\nfunction trimmedEndIndex(string) {\n var index = string.length;\n\n while (index-- && reWhitespace.test(string.charAt(index))) {}\n return index;\n}\n\nmodule.exports = trimmedEndIndex;\n","var isObject = require('./isObject'),\n now = require('./now'),\n toNumber = require('./toNumber');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n timeWaiting = wait - timeSinceLastCall;\n\n return maxing\n ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n : timeWaiting;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n clearTimeout(timerId);\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\nmodule.exports = debounce;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n}\n\nmodule.exports = isSymbol;\n","var root = require('./_root');\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\nmodule.exports = now;\n","var debounce = require('./debounce'),\n isObject = require('./isObject');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a throttled function that only invokes `func` at most once per\n * every `wait` milliseconds. The throttled function comes with a `cancel`\n * method to cancel delayed `func` invocations and a `flush` method to\n * immediately invoke them. Provide `options` to indicate whether `func`\n * should be invoked on the leading and/or trailing edge of the `wait`\n * timeout. The `func` is invoked with the last arguments provided to the\n * throttled function. Subsequent calls to the throttled function return the\n * result of the last `func` invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the throttled function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.throttle` and `_.debounce`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to throttle.\n * @param {number} [wait=0] The number of milliseconds to throttle invocations to.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=true]\n * Specify invoking on the leading edge of the timeout.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new throttled function.\n * @example\n *\n * // Avoid excessively updating the position while scrolling.\n * jQuery(window).on('scroll', _.throttle(updatePosition, 100));\n *\n * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.\n * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });\n * jQuery(element).on('click', throttled);\n *\n * // Cancel the trailing throttled invocation.\n * jQuery(window).on('popstate', throttled.cancel);\n */\nfunction throttle(func, wait, options) {\n var leading = true,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n if (isObject(options)) {\n leading = 'leading' in options ? !!options.leading : leading;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n return debounce(func, wait, {\n 'leading': leading,\n 'maxWait': wait,\n 'trailing': trailing\n });\n}\n\nmodule.exports = throttle;\n","var baseTrim = require('./_baseTrim'),\n isObject = require('./isObject'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = baseTrim(value);\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = toNumber;\n"],"sourceRoot":""}