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EAAS,YAAahG,GACHiE,EAAUQ,EAASzE,EAAQ2F,UAAY,EAAGL,GAAQK,EACrEH,EAAW,aAAcxF,IAAYA,EAAQwF,SAAWA,GAiG1DqB,EAAUG,OAnCV,gBACkBpH,IAAZiG,GACFoB,aAAapB,GAEfE,EAAiB,EACjBN,EAAWK,EAAeJ,EAAWG,OAAUjG,GA+BjDiH,EAAUK,MA5BV,WACE,YAAmBtH,IAAZiG,EAAwBD,EAASe,EAAarC,MA4BhDuC,EA0DAM,CAAS9B,EAAMC,EAAM,CAC1B,QAAWC,EACX,QAAWD,EACX,SAAYE","sources":["webpack://umms-html/./FrontEndSrc/modules/macro/live-filter/live-filter.js","webpack://umms-html/./node_modules/lodash.throttle/index.js"],"sourcesContent":["'use strict';\r\n\r\nimport $ from 'jquery';\r\nimport throttle from 'lodash.throttle';\r\n\r\nexport default (() => {\r\n\r\n if (!String.prototype.includes) {\r\n String.prototype.includes = function(search, start) {\r\n if (search instanceof RegExp) {\r\n throw TypeError('first argument must not be a RegExp');\r\n }\r\n if (start === undefined) { start = 0; }\r\n return this.indexOf(search, start) !== -1;\r\n };\r\n }\r\n\r\n var _self,\r\n ui,\r\n wrap,\r\n value,\r\n filtering;\r\n\r\n return {\r\n\r\n ////////////////////////////////////////////////////////////////////////\r\n // INIT\r\n\r\n init: function(options) {\r\n _self = this;\r\n\r\n if (options.wrap) {\r\n wrap = options.wrap;\r\n }\r\n\r\n if (wrap) {\r\n ui = {\r\n input: $(wrap).find('.js-live-filter-input'),\r\n section: $(wrap).find('.js-live-filter-results-section'),\r\n results: $(wrap).find('.js-live-filter-results-item'),\r\n browse: $(wrap).find('.js-live-filter-browse-item'),\r\n clearInput: $(wrap).find('.js-live-filter-clear-input'),\r\n clearBrowse: $(wrap).find('.js-live-filter-clear-browse'),\r\n expand: $(wrap).find('.js-live-filter-expand'),\r\n noResults: $(wrap).find('.js-live-filter-no-results')\r\n };\r\n\r\n _self.bindUIActions();\r\n }\r\n },\r\n\r\n ////////////////////////////////////////////////////////////////////////\r\n // Bind UI Actions\r\n\r\n bindUIActions: function() {\r\n ui.input.on('input', throttle(function() { _self.searchList(); }, 500));\r\n ui.input.on('keypress', _self.events.scrollToFilter);\r\n ui.clearInput.on('click keypress', _self.clearList.input);\r\n ui.clearBrowse.on('click keypress', _self.clearList.browse);\r\n window.addEventListener('load', _self.events.setExpandState);\r\n window.addEventListener('load', _self.enableBrowseFilters);\r\n },\r\n\r\n events: {\r\n setExpandState: function() {\r\n if (window.innerWidth < 850) {\r\n $(ui.expand).removeClass('is-expanded').addClass('is-collapsed');\r\n }\r\n $(ui.expand).removeClass('is-not-loaded').addClass('is-loaded');\r\n },\r\n scrollToFilter: function(e) {\r\n if (e.which === 13) {\r\n $('html, body').animate({\r\n scrollTop: $('#live-filter').offset().top - 20\r\n }, 500);\r\n }\r\n },\r\n scrollToResults: function() {\r\n $('html, body').animate({\r\n scrollTop: $('#live-filter-results').offset().top - 20\r\n }, 500);\r\n }\r\n },\r\n\r\n ////////////////////////////////////////////////////////////////////////\r\n // Search List\r\n\r\n searchList: function() {\r\n value = ui.input.val().toLowerCase();\r\n value ? _self.toggleVisibility.clearButton('input-show') : _self.toggleVisibility.clearButton('input-hide');\r\n\r\n if (filtering) {\r\n ui.section.each(function (i, section) {\r\n if ( $(section).attr('data-browse-result') === filtering ) {\r\n $(section).find('.js-live-filter-results-item').each(function() {\r\n if ($(this).text().toLowerCase().search(value) > -1) {\r\n $(this).removeClass('is-hidden').addClass('is-visible');\r\n } else {\r\n $(this).removeClass('is-visible').addClass('is-hidden');\r\n }\r\n });\r\n } else {\r\n $(section).find('.js-live-filter-results-item').removeClass('is-visible').addClass('is-hidden');\r\n }\r\n });\r\n } else {\r\n ui.results.each(function() {\r\n if ($(this).text().toLowerCase().includes(value)) {\r\n $(this).removeClass('is-hidden').addClass('is-visible');\r\n } else {\r\n $(this).removeClass('is-visible').addClass('is-hidden');\r\n }\r\n });\r\n }\r\n\r\n _self.toggleVisibility.section();\r\n },\r\n\r\n ////////////////////////////////////////////////////////////////////////\r\n // Filter List\r\n\r\n filterList: function() {\r\n filtering = $(this).attr('data-browse-select').toLowerCase();\r\n ui.browse.filter('.is-active').removeClass('is-active');\r\n $(this).addClass('is-active');\r\n _self.toggleVisibility.clearButton('browse-show');\r\n _self.searchList();\r\n },\r\n\r\n ////////////////////////////////////////////////////////////////////////\r\n // Clear List\r\n\r\n clearList: {\r\n\r\n input: function() {\r\n ui.input.val('');\r\n _self.toggleVisibility.clearButton('input-hide');\r\n _self.searchList();\r\n },\r\n\r\n browse: function() {\r\n filtering = null;\r\n ui.browse.filter('.is-active').removeClass('is-active');\r\n _self.toggleVisibility.clearButton('browse-hide');\r\n _self.searchList();\r\n }\r\n\r\n },\r\n\r\n ////////////////////////////////////////////////////////////////////////\r\n // Toggle Visibility\r\n\r\n toggleVisibility: {\r\n\r\n section: function() {\r\n var hasVisibleChildren,\r\n noResults = true;\r\n\r\n ui.section.each(function(i, section) {\r\n hasVisibleChildren = false;\r\n\r\n $(section).find('.live-filter__results-item').each(function(ii, item) {\r\n if ( $(item).hasClass('is-visible') ) {\r\n hasVisibleChildren = true;\r\n return false;\r\n }\r\n });\r\n\r\n if (hasVisibleChildren) {\r\n $(section).removeClass('is-hidden').addClass('is-visible');\r\n if (noResults) {\r\n noResults = false;\r\n }\r\n } else if (!hasVisibleChildren) {\r\n $(section).removeClass('is-visible').addClass('is-hidden');\r\n }\r\n });\r\n\r\n if (noResults && ui.noResults.hasClass('is-hidden')) {\r\n ui.noResults.removeClass('is-hidden').addClass('is-visible');\r\n } else if (!noResults && ui.noResults.hasClass('is-visible')) {\r\n ui.noResults.removeClass('is-visible').addClass('is-hidden');\r\n }\r\n\r\n },\r\n\r\n clearButton: function(type) {\r\n if (type === 'input-show' && !ui.clearInput.hasClass('is-active')) {\r\n ui.clearInput.addClass('is-active');\r\n } else if (type === 'input-hide') {\r\n ui.clearInput.removeClass('is-active');\r\n } else if (type === 'browse-show' && !ui.clearBrowse.hasClass('is-active')) {\r\n ui.clearBrowse.addClass('is-active');\r\n } else if (type === 'browse-hide') {\r\n ui.clearBrowse.removeClass('is-active');\r\n }\r\n }\r\n },\r\n\r\n ////////////////////////////////////////////////////////////////////////\r\n // Disable browse filters\r\n\r\n enableBrowseFilters: function() {\r\n var letter,\r\n itemBrowse;\r\n\r\n ui.section.each(function (i, section) {\r\n letter = $(section).data('browse-result');\r\n itemBrowse = $('.js-live-filter-browse-item[data-browse-select=\"' + letter + '\"]');\r\n\r\n if ($(itemBrowse).length) {\r\n $(itemBrowse).removeClass('is-disabled');\r\n $(itemBrowse).attr('tabindex', '0');\r\n $(itemBrowse).on('click keypress', _self.filterList);\r\n $(itemBrowse).on('click keypress', _self.events.scrollToResults);\r\n }\r\n });\r\n }\r\n\r\n };\r\n})();\r\n","/**\n * lodash (Custom Build) <https://lodash.com/>\n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors <https://jquery.org/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the `TypeError` message for \"Functions\" methods. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/** Used to match leading and trailing whitespace. */\nvar reTrim = /^\\s+|\\s+$/g;\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/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\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\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 objectToString = objectProto.toString;\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 * 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\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 result = wait - timeSinceLastCall;\n\n return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result;\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 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\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\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 && (type == 'object' || type == 'function');\n}\n\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 && typeof value == 'object';\n}\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) && objectToString.call(value) == symbolTag);\n}\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 = value.replace(reTrim, '');\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 = throttle;\n"],"names":["_self","ui","wrap","value","filtering","String","prototype","includes","search","start","RegExp","TypeError","undefined","this","indexOf","init","options","input","find","section","results","browse","clearInput","clearBrowse","expand","noResults","bindUIActions","on","searchList","events","scrollToFilter","clearList","window","addEventListener","setExpandState","enableBrowseFilters","innerWidth","removeClass","addClass","e","which","animate","scrollTop","offset","top","scrollToResults","val","toLowerCase","toggleVisibility","clearButton","each","i","attr","text","filterList","filter","hasVisibleChildren","ii","item","hasClass","type","letter","itemBrowse","data","length","FUNC_ERROR_TEXT","reTrim","reIsBadHex","reIsBinary","reIsOctal","freeParseInt","parseInt","freeGlobal","g","Object","freeSelf","self","root","Function","objectToString","toString","nativeMax","Math","max","nativeMin","min","now","Date","isObject","toNumber","isObjectLike","call","isSymbol","other","valueOf","replace","isBinary","test","slice","module","exports","func","wait","leading","trailing","lastArgs","lastThis","maxWait","result","timerId","lastCallTime","lastInvokeTime","maxing","invokeFunc","time","args","thisArg","apply","leadingEdge","setTimeout","timerExpired","shouldInvoke","timeSinceLastCall","trailingEdge","remainingWait","debounced","isInvoking","arguments","cancel","clearTimeout","flush","debounce"],"sourceRoot":""}