{"version":3,"sources":["webpack:///../node_modules/lodash.debounce/index.js","webpack:///./Scripts/Components/QuickSearchResult.js","webpack:///./Scripts/Components/QuickSearch.js","webpack:///./Scripts/Containers/QuickSearch.Container.js"],"names":["global","FUNC_ERROR_TEXT","NAN","symbolTag","reTrim","reIsBadHex","reIsBinary","reIsOctal","freeParseInt","parseInt","freeGlobal","Object","freeSelf","self","root","Function","objectToString","prototype","toString","nativeMax","Math","max","nativeMin","min","now","Date","isObject","value","type","toNumber","isObjectLike","call","isSymbol","other","valueOf","replace","isBinary","test","slice","module","exports","func","wait","options","lastArgs","lastThis","maxWait","result","timerId","lastCallTime","lastInvokeTime","leading","maxing","trailing","TypeError","invokeFunc","time","args","thisArg","undefined","apply","shouldInvoke","timeSinceLastCall","timerExpired","trailingEdge","setTimeout","remainingWait","debounced","isInvoking","arguments","this","leadingEdge","cancel","clearTimeout","flush","QuickSearchResult","_ref","selectedItem","searchUrl","react_default","a","createElement","className","map","item","index","array","react","key","concat","name","category","showAll","sameCategory","url","href","hasImage","imageSource","src","QuickSearch","Component","_this","searchInput","focus","_this2","_this$props","props","query","showResult","showFullForm","onSearch","onBlur","onKeyDown","toggleShowFullForm","role","onClick","e","focusOnInput","translate","placeholder","autoComplete","onChange","event","target","ref","input","autoFocus","Components_QuickSearchResult","QuickSearchContainer","QuickSearch_Container_classCallCheck","QuickSearch_Container_possibleConstructorReturn","QuickSearch_Container_getPrototypeOf","state","_objectSpread","clickHandler","bind","QuickSearch_Container_assertThisInitialized","lastClickedNode","document","addEventListener","removeEventListener","length","setState","searchContainer","contains","hideShowResult","prevProps","querySelector","scrollIntoView","behavior","block","inline","window","__litium","quickSearchUrl","elem","Components_QuickSearch","debouncedQuery","debounce","dispatch","text","connect","quickSearch","receive","setSearchQuery","opt","handleKeyDown"],"mappings":"8EAAA,SAAAA,GAUA,IAAAC,EAAA,sBAGAC,EAAA,IAGAC,EAAA,kBAGAC,EAAA,aAGAC,EAAA,qBAGAC,EAAA,aAGAC,EAA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,SAAU,SAACkD,GACPD,EAASK,YAAeJ,IACxBH,EAAeE,EAAUC,IAE7B/C,mBAAoB,kBAAM8C,EAAS9C,gBACnCD,UAAW,SAACU,EAAO2C,GAAR,OAAgBN,EAASO,YAAc5C,EAAO2C,OAIlDJ,CAA6CjC","file":"6.22497829373ee3a6a592.js","sourcesContent":["/**\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 * 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 = debounce;\n","import React, { Fragment } from 'react';\r\n\r\nconst sameCategory = (item, index, array) => index > 0 && array[index-1].category === array[index].category || item.showAll;\r\n\r\nconst QuickSearchResult = ({ result, selectedItem, searchUrl }) => (\r\n <ul className=\"quick-search-result hide-for-small-only\">\r\n {result && result.map((item, index, array) => (\r\n <Fragment key={`${item.name}-${index}`}>\r\n {item.category === 'NoHit' || sameCategory(item, index, array) ? null :\r\n <li className=\"quick-search-result__item quick-search-result__group-header\" >{ item.category }</li>\r\n }\r\n <li className={`quick-search-result__item ${selectedItem === index ? 'quick-search-result__item--selected' : ''}`} >\r\n <a className={item.showAll ? 'quick-search-result__show-all' : `quick-search-result__link ${item.url ? '' : 'quick-search-result__link--disabled'}`} \r\n href={item.showAll ? searchUrl :item.url}>\r\n {item.hasImage && item.imageSource && <img className=\"quick-search-result__image\" src={item.imageSource} />}\r\n <div>{item.name}</div>\r\n </a>\r\n </li>\r\n </Fragment>\r\n ))}\r\n </ul>\r\n)\r\n\r\nexport default QuickSearchResult;","import React, { Component } from 'react';\r\nimport QuickSearchResult from './QuickSearchResult';\r\nimport { translate } from '../Services/translation';\r\n\r\nclass QuickSearch extends Component {\r\n focusOnInput() {\r\n setTimeout(() => {\r\n this.searchInput && this.searchInput.focus();\r\n }, 0);\r\n }\r\n\r\n render () {\r\n const { query, result, showResult, showFullForm, onSearch, onBlur, onKeyDown, toggleShowFullForm, selectedItem, searchUrl } = this.props;\r\n return (\r\n <div className=\"quick-search\" role=\"search\">\r\n <a className=\"quick-search__link--block\" onClick={e => {toggleShowFullForm(); this.focusOnInput()}}>\r\n <i className=\"quick-search__icon\"></i>\r\n <span className=\"quick-search__title\">{translate('general.search')}</span>\r\n </a>\r\n <div className={`quick-search__form ${showFullForm ? 'quick-search__form--force-show' : ''}`} role=\"search\">\r\n <i className=\"quick-search__icon\" onClick={e => toggleShowFullForm()}></i>\r\n <input className=\"quick-search__input\" type=\"search\" placeholder={translate('general.search')}\r\n autoComplete=\"off\" value={query} onChange={event => onSearch(event.target.value)}\r\n onKeyDown={event => onKeyDown(event, {searchUrl})} ref={(input) => { this.searchInput = input; }}\r\n onBlur={() => onBlur() } autoFocus/>\r\n <button className=\"quick-search__submit-button\" type=\"submit\">\r\n <i className=\"quick-search__submit-icon\"></i>\r\n <span className=\"quick-search__submit-title\">{translate('general.search')}</span>\r\n </button>\r\n {showResult && <QuickSearchResult result={result} selectedItem={selectedItem} searchUrl={searchUrl}/>}\r\n </div>\r\n </div>\r\n )\r\n }\r\n}\r\n\r\nexport default QuickSearch;","import React, { Component } from 'react';\r\nimport * as debounce from 'lodash.debounce';\r\nimport { connect } from 'react-redux';\r\nimport QuickSearch from '../Components/QuickSearch';\r\nimport { query, setSearchQuery, toggleShowFullForm, handleKeyDown, receive } from '../Actions/QuickSearch.action';\r\n\r\nclass QuickSearchContainer extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = { ...props };\r\n this.clickHandler = this.clickHandler.bind(this);\r\n this.lastClickedNode = null;\r\n }\r\n\r\n componentDidMount() {\r\n document.addEventListener('mousedown', this.clickHandler);\r\n }\r\n\r\n componentWillUnmount() {\r\n document.removeEventListener('mousedown', this.clickHandler);\r\n }\r\n\r\n componentWillUpdate({ showFullForm } = props) {\r\n if (this.state.showFullForm !== showFullForm) {\r\n this.setState({ ...this.state, showFullForm });\r\n }\r\n }\r\n\r\n clickHandler(event) {\r\n this.lastClickedNode = event.target;\r\n }\r\n\r\n onBlur() {\r\n const { showFullForm, toggleShowFullForm } = this.props;\r\n if (this.searchContainer && !this.searchContainer.contains(this.lastClickedNode)) {\r\n showFullForm && toggleShowFullForm();\r\n }\r\n\r\n if (this.props.query.length == 0) {\r\n this.props.hideShowResult();\r\n }\r\n }\r\n\r\n componentDidUpdate(prevProps) {\r\n if (this.props.selectedItem !== prevProps.selectedItem) {\r\n document.querySelector('.quick-search-result__item--selected').scrollIntoView({ behavior: 'smooth', block: 'end', inline: 'nearest' });\r\n }\r\n }\r\n\r\n render() {\r\n const { query } = this.props;\r\n const searchUrl = window.__litium.quickSearchUrl + (query.length > 0 ? `?q=${query}` : '');\r\n return (\r\n <div ref={(elem) => this.searchContainer = elem} >\r\n <QuickSearch {...{ ...this.props, searchUrl, onBlur: () => this.onBlur() }} />\r\n </div>\r\n )\r\n }\r\n}\r\n\r\nconst mapStateToProps = state => {\r\n return {\r\n query: state.quickSearch.query,\r\n result: state.quickSearch.result,\r\n showResult: state.quickSearch.showResult,\r\n showFullForm: state.quickSearch.showFullForm,\r\n selectedItem: state.quickSearch.selectedItem,\r\n }\r\n}\r\n\r\n// debouncing function to 200ms so we don't send query request on every key stroke\r\nconst debouncedQuery = debounce((dispatch, text) => dispatch(query(text)), 200);\r\n\r\nconst mapDispatchToProps = dispatch => {\r\n return {\r\n hideShowResult: () => dispatch(receive()),\r\n onSearch: (text) => {\r\n dispatch(setSearchQuery(text));\r\n debouncedQuery(dispatch, text);\r\n },\r\n toggleShowFullForm: () => dispatch(toggleShowFullForm()),\r\n onKeyDown: (event, opt) => dispatch(handleKeyDown(event, opt)),\r\n }\r\n}\r\n\r\nexport default connect(mapStateToProps, mapDispatchToProps)(QuickSearchContainer);"],"sourceRoot":""}