PageSourceSearch

https://www.cookfood.net/dist/reactHeader.js?202609221200

js cookfood.net collected 2026-09-25 19:53:30 UTC 166,799 bytes, 4,366 lines download raw bytes

1(this["webpackJsonp"] = this["webpackJsonp"] || []).push([[16],{
2
3/***/ 11:
4/***/ (function(module, __webpack_exports__, __webpack_require__) {
5
6"use strict";
7
8// EXPORTS
9__webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ BaseButton; });
10
11// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js
12var jsx_runtime = __webpack_require__(0);
13
14// CONCATENATED MODULE: ./React/Common/Components/Buttons/StandardButtonHoverImages.tsx
15
16function StandardButtonHoverImages(props) {
17  if (!props.activeImage && !props.hoverImage) {
18    return null;
19  }
20  return Object(jsx_runtime["jsxs"])("div", Object.assign({
21    className: "img-state"
22  }, {
23    children: [!!props.activeImage ? Object(jsx_runtime["jsx"])("img", {
24      className: "on-active",
25      src: props.activeImage,
26      alt: props.alt || ''
27    }) : null, !!props.hoverImage ? Object(jsx_runtime["jsx"])("img", {
28      className: "on-hover",
29      src: props.hoverImage,
30      alt: props.alt || ''
31    }) : null]
32  }));
33}
34// EXTERNAL MODULE: ./React/Common/Components/Buttons/BaseButton.module.scss
35var BaseButton_module = __webpack_require__(27);
36var BaseButton_module_default = /*#__PURE__*/__webpack_require__.n(BaseButton_module);
37
38// EXTERNAL MODULE: ./node_modules/lodash/map.js
39var map = __webpack_require__(44);
40var map_default = /*#__PURE__*/__webpack_require__.n(map);
41
42// CONCATENATED MODULE: ./React/Common/Components/Buttons/BaseButton.tsx
43
44
45
46
47function BaseButton(props) {
48  var classNames = [BaseButton_module_default.a.Button];
49  var target = props.target;
50  if (props.target == undefined) {
51    target = "_self";
52  }
53  var rel = props.rel;
54  if (props.rel == undefined) {
55    rel = "";
56  }
57  var href = props.href;
58  if (props.href == undefined) {
59    href = '#';
60  }
61  if (props.className) {
62    classNames.push(props.className);
63  }
64  var hasImages = !!props.activeImage || !!props.hoverImage;
65  if (hasImages) {
66    classNames.push('has-images');
67  }
68  var propList = [];
69  map_default()(props, function (value, key) {
70    if (key.startsWith('data-')) {
71      propList.push({
72        key: key,
73        value: value
74      });
75    }
76  });
77  var dataProps = propList.reduce(function (result, item, i) {
78    result[item["key"]] = item["value"];
79    return result;
80  }, {});
81  var handleClick = function handleClick(e) {
82    if (!props.disabled && props.onClick != null) {
83      props.onClick();
84      e.preventDefault();
85    }
86  };
87  return Object(jsx_runtime["jsxs"])("a", Object.assign({
88    role: props.role,
89    tabIndex: props.tabIndex,
90    target: target,
91    rel: rel,
92    title: props.title,
93    id: props.id,
94    style: {
95      opacity: props.disabled ? 0.4 : 1,
96      cursor: props.disabled ? 'not-allowed' : 'pointer'
97    }
98  }, dataProps, {
99    href: href,
100    className: classNames.join(' '),
101    onClick: handleClick
102  }, {
103    children: [props.children, Object(jsx_runtime["jsx"])(StandardButtonHoverImages, {
104      activeImage: props.activeImage,
105      hoverImage: props.hoverImage,
106      alt: props.alt
107    })]
108  }));
109}
110
111/***/ }),
112
113/***/ 1117:
114/***/ (function(module, exports, __webpack_require__) {
115
116module.exports = __webpack_require__(1118);
117
118
119/***/ }),
120
121/***/ 1118:
122/***/ (function(module, __webpack_exports__, __webpack_require__) {
123
124"use strict";
125__webpack_require__.r(__webpack_exports__);
126/* WEBPACK VAR INJECTION */(function(global) {/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1);
127/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
128/* harmony import */ var _HeaderApp__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(585);
129/* harmony import */ var _Updater__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(621);
130
131
132
133
134global.Header = {
135  Header: _HeaderApp__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"],
136  DoUpdate: _Updater__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"]
137};
138/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(17)))
139
140/***/ }),
141
142/***/ 1119:
143/***/ (function(module, exports, __webpack_require__) {
144
145// extracted by mini-css-extract-plugin
146module.exports = {"menu-open":"afecoXLET7FO1rZFx8Sxj","is-hidden":"_1nXsBPYEKvaD3ZND4dsa3t","is-display":"_2hlBfEqWHx3ryCZR4YP6se","fadeIn":"_2eoH1SQVFeUAkf07xwDdIN","fadeOut":"_3W1MQUWfNI0h6fq-YeaotT"};
147
148/***/ }),
149
150/***/ 1205:
151/***/ (function(module, exports, __webpack_require__) {
152
153"use strict";
154
155Object.defineProperty(exports, "__esModule", { value: true });
156exports.useScrollPosition = void 0;
157const react_1 = __webpack_require__(1);
158const useIsomorphicLayoutEffect_1 = __webpack_require__(1206);
159const isBrowser = typeof window !== `undefined`;
160const zeroPosition = { x: 0, y: 0 };
161const getClientRect = (element) => element === null || element === void 0 ? void 0 : element.getBoundingClientRect();
162const getScrollPosition = ({ element, useWindow, boundingElement, }) => {
163    if (!isBrowser) {
164        return zeroPosition;
165    }
166    if (useWindow) {
167        return { x: window.scrollX, y: window.scrollY };
168    }
169    const targetPosition = getClientRect((element === null || element === void 0 ? void 0 : element.current) || document.body);
170    const containerPosition = getClientRect(boundingElement === null || boundingElement === void 0 ? void 0 : boundingElement.current);
171    if (!targetPosition) {
172        return zeroPosition;
173    }
174    return containerPosition
175        ? {
176            x: (containerPosition.x || 0) - (targetPosition.x || 0),
177            y: (containerPosition.y || 0) - (targetPosition.y || 0),
178        }
179        : { x: targetPosition.left, y: targetPosition.top };
180};
181exports.useScrollPosition = (effect, deps, element, useWindow, wait, boundingElement) => {
182    const position = react_1.useRef(getScrollPosition({ useWindow, boundingElement }));
183    let throttleTimeout = null;
184    const callBack = () => {
185        const currPos = getScrollPosition({ element, useWindow, boundingElement });
186        effect({ prevPos: position.current, currPos });
187        position.current = currPos;
188        throttleTimeout = null;
189    };
190    useIsomorphicLayoutEffect_1.useIsomorphicLayoutEffect(() => {
191        var _a;
192        if (!isBrowser) {
193            return undefined;
194        }
195        const handleScroll = () => {
196            if (wait) {
197                if (throttleTimeout === null) {
198                    throttleTimeout = setTimeout(callBack, wait);
199                }
200            }
201            else {
202                callBack();
203            }
204        };
205        if (boundingElement) {
206            (_a = boundingElement.current) === null || _a === void 0 ? void 0 : _a.addEventListener('scroll', handleScroll, { passive: true });
207        }
208        else {
209            window.addEventListener('scroll', handleScroll, { passive: true });
210        }
211        return () => {
212            var _a;
213            if (boundingElement) {
214                (_a = boundingElement.current) === null || _a === void 0 ? void 0 : _a.removeEventListener('scroll', handleScroll);
215            }
216            else {
217                window.removeEventListener('scroll', handleScroll);
218            }
219            if (throttleTimeout) {
220                clearTimeout(throttleTimeout);
221            }
222        };
223    }, deps);
224};
225exports.useScrollPosition.defaultProps = {
226    deps: [],
227    element: false,
228    useWindow: false,
229    wait: null,
230    boundingElement: false,
231};
232
233
234/***/ }),
235
236/***/ 1206:
237/***/ (function(module, exports, __webpack_require__) {
238
239"use strict";
240
241Object.defineProperty(exports, "__esModule", { value: true });
242exports.useIsomorphicLayoutEffect = void 0;
243const react_1 = __webpack_require__(1);
244exports.useIsomorphicLayoutEffect = typeof window !== 'undefined' ? react_1.useLayoutEffect : react_1.useEffect;
245
246
247/***/ }),
248
249/***/ 13:
250/***/ (function(module, __webpack_exports__, __webpack_require__) {
251
252"use strict";
253/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getHttpInstance; });
254/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(38);
255/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(axios__WEBPACK_IMPORTED_MODULE_0__);
256
257function getHttpInstance(baseUrl) {
258  var axiosConfig = {
259    baseURL: baseUrl,
260    headers: {
261      'Accept': 'application/json',
262      'Content-Type': 'application/json',
263      'x-requested-with': 'XMLHttpRequest'
264    }
265  };
266  return axios__WEBPACK_IMPORTED_MODULE_0___default.a.create(axiosConfig);
267}
268
269/***/ }),
270
271/***/ 130:
272/***/ (function(module, __webpack_exports__, __webpack_require__) {
273
274"use strict";
275/** A function that accepts a potential "extra argument" value to be injected later,
276 * and returns an instance of the thunk middleware that uses that value
277 */
278function createThunkMiddleware(extraArgument) {
279  // Standard Redux middleware definition pattern:
280  // See: https://redux.js.org/tutorials/fundamentals/part-4-store#writing-custom-middleware
281  var middleware = function middleware(_ref) {
282    var dispatch = _ref.dispatch,
283        getState = _ref.getState;
284    return function (next) {
285      return function (action) {
286        // The thunk middleware looks for any functions that were passed to `store.dispatch`.
287        // If this "action" is really a function, call it and return the result.
288        if (typeof action === 'function') {
289          // Inject the store's `dispatch` and `getState` methods, as well as any "extra arg"
290          return action(dispatch, getState, extraArgument);
291        } // Otherwise, pass the action down the middleware chain as usual
292
293
294        return next(action);
295      };
296    };
297  };
298
299  return middleware;
300}
301
302var thunk = createThunkMiddleware(); // Attach the factory function so users can create a customized version
303// with whatever "extra arg" they want to inject into their thunks
304
305thunk.withExtraArgument = createThunkMiddleware;
306/* harmony default export */ __webpack_exports__["a"] = (thunk);
307
308/***/ }),
309
310/***/ 131:
311/***/ (function(module, exports, __webpack_require__) {
312
313var v1 = __webpack_require__(439);
314var v4 = __webpack_require__(440);
315
316var uuid = v4;
317uuid.v1 = v1;
318uuid.v4 = v4;
319
320module.exports = uuid;
321
322
323/***/ }),
324
325/***/ 137:
326/***/ (function(module, __webpack_exports__, __webpack_require__) {
327
328"use strict";
329
330// EXPORTS
331__webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _objectSpread2; });
332
333// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/typeof.js
334function _typeof(o) {
335  "@babel/helpers - typeof";
336
337  return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
338    return typeof o;
339  } : function (o) {
340    return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
341  }, _typeof(o);
342}
343
344// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toPrimitive.js
345
346function toPrimitive(t, r) {
347  if ("object" != _typeof(t) || !t) return t;
348  var e = t[Symbol.toPrimitive];
349  if (void 0 !== e) {
350    var i = e.call(t, r || "default");
351    if ("object" != _typeof(i)) return i;
352    throw new TypeError("@@toPrimitive must return a primitive value.");
353  }
354  return ("string" === r ? String : Number)(t);
355}
356
357// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js
358
359
360function toPropertyKey(t) {
361  var i = toPrimitive(t, "string");
362  return "symbol" == _typeof(i) ? i : i + "";
363}
364
365// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
366
367function _defineProperty(e, r, t) {
368  return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
369    value: t,
370    enumerable: !0,
371    configurable: !0,
372    writable: !0
373  }) : e[r] = t, e;
374}
375
376// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
377
378function ownKeys(e, r) {
379  var t = Object.keys(e);
380  if (Object.getOwnPropertySymbols) {
381    var o = Object.getOwnPropertySymbols(e);
382    r && (o = o.filter(function (r) {
383      return Object.getOwnPropertyDescriptor(e, r).enumerable;
384    })), t.push.apply(t, o);
385  }
386  return t;
387}
388function _objectSpread2(e) {
389  for (var r = 1; r < arguments.length; r++) {
390    var t = null != arguments[r] ? arguments[r] : {};
391    r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {
392      _defineProperty(e, r, t[r]);
393    }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
394      Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
395    });
396  }
397  return e;
398}
399
400
401/***/ }),
402
403/***/ 14:
404/***/ (function(module, __webpack_exports__, __webpack_require__) {
405
406"use strict";
407/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return VariantProvider; });
408/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return useVariant; });
409/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
410/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__);
411/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1);
412/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
413function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
414function _nonIterableRest() { throw new TypeError("Invalid attempt to de
414structure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
415function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
416function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
417function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
418function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
419
420
421// Create the context
422var VariantContext = /*#__PURE__*/Object(react__WEBPACK_IMPORTED_MODULE_1__["createContext"])(undefined);
423var VariantProvider = function VariantProvider(_ref) {
424  var initialVariants = _ref.initialVariants,
425    children = _ref.children;
426  var _useState = Object(react__WEBPACK_IMPORTED_MODULE_1__["useState"])(initialVariants || {}),
427    _useState2 = _slicedToArray(_useState, 2),
428    variants = _useState2[0],
429    setVariants = _useState2[1]; // State to manage the variants
430  // Update the state when initialVariants changes (important for Storybook)
431  Object(react__WEBPACK_IMPORTED_MODULE_1__["useEffect"])(function () {
432    setVariants(initialVariants);
433  }, [initialVariants]);
434  // Function to check if a variant is enabled
435  var isVariantOn = function isVariantOn(variant) {
436    if (!variants) {
437      return false;
438    }
439    return variants[variant] || false; // Return true if the variant is on, false if it's off
440  };
441  return Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__["jsx"])(VariantContext.Provider, Object.assign({
442    value: {
443      isVariantOn: isVariantOn
444    }
445  }, {
446    children: children
447  }));
448};
449var useVariant = function useVariant(variant) {
450  var context = Object(react__WEBPACK_IMPORTED_MODULE_1__["useContext"])(VariantContext);
451  if (!context) {
452    throw new Error('useVariant must be used within a VariantProvider');
453  }
454  return context.isVariantOn(variant); // Check if the variant is on
455};
456
457/***/ }),
458
459/***/ 141:
460/***/ (function(module, exports, __webpack_require__) {
461
462var require;var require;(function(f){if(true){module.exports=f()}else { var g; }})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return require(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require
vendor: 6,001 bytes, lines 462-722
462;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){
463module.exports = function(forceSimilar) {
464	if (typeof Map !== 'function' || forceSimilar) {
465		var Similar = _dereq_('./similar');
466		return new Similar();
467	}
468	else {
469		return new Map();
470	}
471}
472
473},{"./similar":2}],2:[function(_dereq_,module,exports){
474function Similar() {
475	this.list = [];
476	this.lastItem = undefined;
477	this.size = 0;
478
479	return this;
480}
481
482Similar.prototype.get = function(key) {
483	var index;
484
485	if (this.lastItem && this.isEqual(this.lastItem.key, key)) {
486		return this.lastItem.val;
487	}
488
489	index = this.indexOf(key);
490	if (index >= 0) {
491		this.lastItem = this.list[index];
492		return this.list[index].val;
493	}
494
495	return undefined;
496};
497
498Similar.prototype.set = function(key, val) {
499	var index;
500
501	if (this.lastItem && this.isEqual(this.lastItem.key, key)) {
502		this.lastItem.val = val;
503		return this;
504	}
505
506	index = this.indexOf(key);
507	if (index >= 0) {
508		this.lastItem = this.list[index];
509		this.list[index].val = val;
510		return this;
511	}
512
513	this.lastItem = { key: key, val: val };
514	this.list.push(this.lastItem);
515	this.size++;
516
517	return this;
518};
519
520Similar.prototype.delete = function(key) {
521	var index;
522
523	if (this.lastItem && this.isEqual(this.lastItem.key, key)) {
524		this.lastItem = undefined;
525	}
526
527	index = this.indexOf(key);
528	if (index >= 0) {
529		this.size--;
530		return this.list.splice(index, 1)[0];
531	}
532
533	return undefined;
534};
535
536
537// important that has() doesn't use get() in case an existing key has a falsy value, in which case has() would return false
538Similar.prototype.has = function(key) {
539	var index;
540
541	if (this.lastItem && this.isEqual(this.lastItem.key, key)) {
542		return true;
543	}
544
545	index = this.indexOf(key);
546	if (index >= 0) {
547		this.lastItem = this.list[index];
548		return true;
549	}
550
551	return false;
552};
553
554Similar.prototype.forEach = function(callback, thisArg) {
555	var i;
556	for (i = 0; i < this.size; i++) {
557		callback.call(thisArg || this, this.list[i].val, this.list[i].key, this);
558	}
559};
560
561Similar.prototype.indexOf = function(key) {
562	var i;
563	for (i = 0; i < this.size; i++) {
564		if (this.isEqual(this.list[i].key, key)) {
565			return i;
566		}
567	}
568	return -1;
569};
570
571// check if the numbers are equal, or whether they are both precisely NaN (isNaN returns true for all non-numbers)
572Similar.prototype.isEqual = function(val1, val2) {
573	return val1 === val2 || (val1 !== val1 && val2 !== val2);
574};
575
576module.exports = Similar;
577},{}],3:[function(_dereq_,module,exports){
578var MapOrSimilar = _dereq_('map-or-similar');
579
580module.exports = function (limit) {
581	var cache = new MapOrSimilar(undefined === 'true'),
582		lru = [];
583
584	return function (fn) {
585		var memoizerific = function () {
586			var currentCache = cache,
587				newMap,
588				fnResult,
589				argsLengthMinusOne = arguments.length - 1,
590				lruPath = Array(argsLengthMinusOne + 1),
591				isMemoized = true,
592				i;
593
594			if ((memoizerific.numArgs || memoizerific.numArgs === 0) && memoizerific.numArgs !== argsLengthMinusOne + 1) {
595				throw new Error('Memoizerific functions should always be called with the same number of arguments');
596			}
597
598			// loop through each argument to traverse the map tree
599			for (i = 0; i < argsLengthMinusOne; i++) {
600				lruPath[i] = {
601					cacheItem: currentCache,
602					arg: arguments[i]
603				};
604
605				// climb through the hierarchical map tree until the second-last argument has been found, or an argument is missing.
606				// if all arguments up to the second-last have been found, this will potentially be a cache hit (determined later)
607				if (currentCache.has(arguments[i])) {
608					currentCache = currentCache.get(arguments[i]);
609					continue;
610				}
611
612				isMemoized = false;
613
614				// make maps until last value
615				newMap = new MapOrSimilar(undefined === 'true');
616				currentCache.set(arguments[i], newMap);
617				currentCache = newMap;
618			}
619
620			// we are at the last arg, check if it is really memoized
621			if (isMemoized) {
622				if (currentCache.has(arguments[argsLengthMinusOne])) {
623					fnResult = currentCache.get(arguments[argsLengthMinusOne]);
624				}
625				else {
626					isMemoized = false;
627				}
628			}
629
630			if (!isMemoized) {
631				fnResult = fn.apply(null, arguments);
632				currentCache.set(arguments[argsLengthMinusOne], fnResult);
633			}
634
635			if (limit > 0) {
636				lruPath[argsLengthMinusOne] = {
637					cacheItem: currentCache,
638					arg: arguments[argsLengthMinusOne]
639				};
640
641				if (isMemoized) {
642					moveToMostRecentLru(lru, lruPath);
643				}
644				else {
645					lru.push(lruPath);
646				}
647
648				if (lru.length > limit) {
649					removeCachedResult(lru.shift());
650				}
651			}
652
653			memoizerific.wasMemoized = isMemoized;
654			memoizerific.numArgs = argsLengthMinusOne + 1;
655
656			return fnResult;
657		};
658
659		memoizerific.limit = limit;
660		memoizerific.wasMemoized = false;
661		memoizerific.cache = cache;
662		memoizerific.lru = lru;
663
664		return memoizerific;
665	};
666};
667
668// move current args to most recent position
669function moveToMostRecentLru(lru, lruPath) {
670	var lruLen = lru.length,
671		lruPathLen = lruPath.length,
672		isMatch,
673		i, ii;
674
675	for (i = 0; i < lruLen; i++) {
676		isMatch = true;
677		for (ii = 0; ii < lruPathLen; ii++) {
678			if (!isEqual(lru[i][ii].arg, lruPath[ii].arg)) {
679				isMatch = false;
680				break;
681			}
682		}
683		if (isMatch) {
684			break;
685		}
686	}
687
688	lru.push(lru.splice(i, 1)[0]);
689}
690
691// remove least recently used cache item and all dead branches
692function removeCachedResult(removedLru) {
693	var removedLruLen = removedLru.length,
694		currentLru = removedLru[removedLruLen - 1],
695		tmp,
696		i;
697
698	currentLru.cacheItem.delete(currentLru.arg);
699
700	// walk down the tree removing dead branches (size 0) along the way
701	for (i = removedLruLen - 2; i >= 0; i--) {
702		currentLru = removedLru[i];
703		tmp = currentLru.cacheItem.get(currentLru.arg);
704
705		if (!tmp || !tmp.size) {
706			currentLru.cacheItem.delete(currentLru.arg);
707		} else {
708			break;
709		}
710	}
711}
712
713// check if the numbers are equal, or whether they are both precisely NaN (isNaN returns true for all non-numbers)
714function isEqual(val1, val2) {
715	return val1 === val2 || (val1 !== val1 && val2 !== val2);
716}
717},{"map-or-similar":1}]},{},[3])(3)
718});
719
720/***/ }),
721
722/***/ 
722143:
723/***/ (function(module, __webpack_exports__, __webpack_require__) {
724
725"use strict";
726/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return useStoreActions; });
727/* unused harmony export useStoreDispatch */
728/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return useStoreState; });
729/* harmony import */ var easy_peasy__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4);
730
731var typedHooks = Object(easy_peasy__WEBPACK_IMPORTED_MODULE_0__[/* createTypedHooks */ "d"])();
732var useStoreActions = typedHooks.useStoreActions;
733var useStoreDispatch = typedHooks.useStoreDispatch;
734var useStoreState = typedHooks.useStoreState;
735
736/***/ }),
737
738/***/ 167:
739/***/ (function(module, exports, __webpack_require__) {
740
741// extracted by mini-css-extract-plugin
742module.exports = {"Content":"_3nOsjtUecm9EyUUO4qtGFz","ProductName":"_3joEkwgF41hWPStm4o_yc6","PriceRange":"_27Izo6ejefexJ2Wf5w3xeC","Symbols":"_2n-518CsTFqGP9Q05Q7ELx","active":"_1nCiFXGn_ksV1Wi39gh-4s"};
743
744/***/ }),
745
746/***/ 17:
747/***/ (function(module, exports) {
748
749var g;
750
751// This works in non-strict mode
752g = (function() {
753	return this;
754})();
755
756try {
757	// This works if eval is allowed (see CSP)
758	g = g || new Function("return this")();
759} catch (e) {
760	// This works if the window reference is available
761	if (typeof window === "object") g = window;
762}
763
764// g can still be undefined, but nothing to do about it...
765// We return undefined, instead of nothing here, so it's
766// easier to handle this case. if(!global) { ...}
767
768module.exports = g;
769
770
771/***/ }),
772
773/***/ 18:
774/***/ (function(module, __webpack_exports__, __webpack_require__) {
775
776"use strict";
777/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Variants; });
778var Variants;
779(function (Variants) {
780  Variants["Calendar_Updates"] = "experiment-calendar-updates";
781  Variants["Search_Bar_Upselling_Updates"] = "experiment-search-bar-upselling-updates";
782  Variants["PLP_Card_Layout"] = "experiment-plp-card-layout";
783  Variants["Price_Per_Kg"] = "experiment-price-per-kg";
784})(Variants || (Variants = {}));
785
786/***/ }),
787
788/***/ 2:
789/***/ (function(module, exports, __webpack_require__) {
790
791// extracted by mini-css-extract-plugin
792module.exports = {"StandardButton":"_3FAZAnjzttPvt2EXyFzBOg","IsSmall":"_3znRHPYs84eEITefsBihHG","SecondaryButton":"rfrmHQSGWa2Z9Zp9U7_5F","TertiaryButton":"_3uK4ayqBDXTAJAOuiNDGvF","OutlineButton":"fCpDURDVBJNmckYdowaKv","Pill":"_3lz21OHnCr2ROGgbbjosba","GhostButton":"_1irTIh1QI02YoN4d2_LJ82","Warning":"_1mYbsGn_qn7ZXsFRCK_Iun","Attention":"_3WABT6IP1iNTY_xG5UdgRj","QuaternaryButton":"_1Ije1MEyx2my2i57nbXqqw","FullWidth":"_3YLyuodanpppHf6GZcCHRG","IsPlain":"_2DJQ_o5FOWmawqsxCjL8OG","IsDanger":"_1pzU1ltIOuJMedAWCtLZrS"};
793
794/***/ }),
795
796/***/ 21:
797/***/ (function(module, __webpack_exports__, __webpack_require__) {
798
799"use strict";
800/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return useWindowDimensions; });
801/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1);
802/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
803function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
804function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
805function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
806function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
807function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
808function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
809
810function useWindowDimensions() {
811  var hasWindow = typeof window !== 'undefined';
812  function getWindowDimensions() {
813    var width = hasWindow ? window.innerWidth : null;
814    var height = hasWindow ? window.innerHeight : null;
815    var breakpoint = hasWindow ? getBreakpoint(width) : null;
816    var isMobile = hasWindow ? width < 768 : null;
817    var isTablet = hasWindow ? width < 992 : null;
818    return {
819      width: width,
820      height: height,
821      breakpoint: breakpoint,
822      isMobile: isMobile,
823      isTablet: isTablet,
824      hasWindow: hasWindow
825    };
826  }
827  function getBreakpoint(width) {
828    if (width < 576) {
829      return 'xs';
830    } else if (width >= 576 && width < 768) {
831      return 'sm';
832    } else if (width >= 768 && width < 992) {
833      return 'md';
834    } else if (width >= 992 && width < 1200) {
835      return 'lg';
836    } else if (width >= 1200 && width < 1400) {
837      return 'xl';
838    } else if (width >= 1400) {
839      return 'xxl';
840    }
841  }
842  var _useState = Object(react__WEBPACK_IMPORTED_MODULE_0__["useState"])(getWindowDimensions()),
843    _useState2 = _slicedToArray(_useState, 2),
844    windowDimensions = _useState2[0],
845    setWindowDimensions = _useState2[1];
846  Object(react__WEBPACK_IMPORTED_MODULE_0__["useEffect"])(function () {
847    if (hasWindow) {
848      var handleResize = function handleResize() {
849        var dimensions = getWindowDimensions();
850        setWindowDimensions(dimensions);
851      };
852      window.addEventListener('resize', handleResize);
853      return function () {
854        return window.removeEventListener('resize', handleResize);
855      };
856    }
857  }, [hasWindow]); // hasWindow is a constant here, so this effect essentially runs once on mount
858  return windowDimensions;
859}
860
861/***/ }),
862
863/***/ 27:
864/***/ (function(module, exports, __webpack_require__) {
865
866// extracted by mini-css-extract-plugin
867module.exports = {"Button":"kDS6s-BFVXmEybYcZ6ZVi"};
868
869/***/ }),
870
871/***/ 275:
872/***/ (function(module, exports, __webpack_require__) {
873
874// extracted by mini-css-extract-plugin
875module.exports = {"SiteHeader":"_22r1xJAw7xZxXAa9Td1Vgn","HeaderCentre":"YTOJyZUY-3Q2KWPlLda2C","HeaderLeft":"KtuCJpHNxaJlHSUq9DU7A","HeaderRight":"_3IH_mI8EFnGkggae-R_G_E","HeaderRightContainer":"_1pWSrZQzYo-OaOPxNKlMT1"};
876
877/***/ }),
878
879/***/ 293:
880/***/ (function(module, exports, __webpack_require__) {
881
882// extracted by mini-css-extract-plugin
883
884/***/ }),
885
886/***/ 294:
887/***/ (function(module, exports) {
888
889// Unique ID creation requires a high quality random # generator.  In the
890// browser this is a little complicated due to unknown quality of Math.random()
891// and inconsistent support for the `crypto` API.  We do the best we can via
892// feature-detection
893
894// getRandomValues needs to be invoked in a context where "this" is a Crypto
895// implementation. Also, find the complete implementation of crypto on IE11.
896var getRandomValues = (typeof(crypto) != 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto)) ||
897                      (typeof(msCrypto) != 'undefined' && typeof window.msCrypto.getRandomValues == 'function' && msCrypto.getRandomValues.bind(msCrypto));
898
899if (getRandomValues) {
900  // WHATWG crypto RNG - http://wiki.whatwg.org/wiki/Crypto
901  var rnds8 = new Uint8Array(16); // eslint-disable-line no-undef
902
903  module.exports = function whatwgRNG() {
904    getRandomValues(rnds8);
905    return rnds8;
906  };
907} else {
908  // Math.random()-based (RNG)
909  //
910  // If all else fails, use Math.random().  It's fast, but is of unspecified
911  // quality.
912  var rnds = new Array(16);
913
914  module.exports = function mathRNG() {
915    for (var i = 0, r; i < 16; i++) {
916      if ((i & 0x03) === 0) r = Math.random() * 0x100000000;
917      rnds[i] = r >>> ((i & 0x03) << 3) & 0xff;
918    }
919
920    return rnds;
921  };
922}
923
924
925/***/ }),
926
927/***/ 295:
928/***/ (function(module, exports) {
929
930/**
931 * Convert array of 16 byte values to UUID string format of the form:
932 * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
933 */
934var byteToHex = [];
935for (var i = 0; i < 256; ++i) {
936  byteToHex[i] = (i + 0x100).toString(16).substr(1);
937}
938
939function bytesToUuid(buf, offset) {
940  var i = offset || 0;
941  var bth = byteToHex;
942  // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4
943  return ([
944    bth[buf[i++]], bth[buf[i++]],
945    bth[buf[i++]], bth[buf[i++]], '-',
946    bth[buf[i++]], bth[buf[i++]], '-',
947    bth[buf[i++]], bth[buf[i++]], '-',
948    bth[buf[i++]], bth[buf[i++]], '-',
949    bth[buf[i++]], bth[buf[i++]],
950    bth[buf[i++]], bth[buf[i++]],
951    bth[buf[i++]], bth[buf[i++]]
952  ]).join('');
953}
954
955module.exports = bytesToUuid;
956
957
958/***/ }),
959
960/***/ 30:
961/***/ (function(module, __webpack_exports__, __webpack_require__) {
962
963"use strict";
964/* unused harmony export HeaderSettingsDefault */
965/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return HeaderContext; });
966/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1);
967/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
968
969var HeaderSettingsDefault = {
970  BaseUrl: '',
971  AssetUrl: '',
972  CurrentUrl: '',
973  HideBookSlot: false,
974  HideNav: false,
975  HideBasketButton: false,
976  HideSearch: false,
977  SlotSelected: false,
978  LoggedIn: false,
979  CategoryNavigation: [],
980  PageNavigation: [],
981  BasketItems: []
982};
983var HeaderContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createContext"](HeaderSettingsDefault);
984
985/***/ }),
986
987/***/ 324:
988/***/ (function(module, exports, __webpack_require__) {
989
990// extracted by mini-css-extract-plugin
991module.exports = {"SearchWrapper":"DEhw5C02f_1_7Dit5kcd2","SearchButton":"bk5pzltNjktYN_LOIu-sF","CancelButton":"JeMIiOqffC45mX3yLIVIv","SearchField":"_2_uISlj7-yHBM5N32fGoyA"};
992
993/***/ }),
994
995/***/ 378:
996/***/ (function(module, exports, __webpack_require__) {
997
998// extracted by mini-css-extract-plugin
999module.exports = {"MiniBasketHeader":"_3PB3XfuOj2izJGMQVQ0NvW"};
1000
1001/***/ }),
1002
1003/***/ 379:
1004/***/ (function(module, exports, __webpack_require__) {
1005
1006// extracted by mini-css-extract-plugin
1007module.exports = {"MiniBasket":"_31mbN4XNTZ9LbDdUMLaMyb","fadeIn":"_1MuxS5QiLTYydCn4CITGRr"};
1008
1009/***/ }),
1010
1011/***/ 387:
1012/***/ (function(module, exports, __webpack_require__) {
1013
1014// extracted by mini-css-extract-plugin
1015module.exports = {"SearchBoxOuter":"CeyZK05S8D78Nbn7u6oNd","SearchBox":"_1VctdBT33KbZCiw_YFNPjr","search-box":"_1kF_VnudKPzWAogCCPSTjo","hide":"ftgsvea_IhY2GQy6Hu0E9","SearchBoxBackground":"_2wOY-MHH-JX4af_JAX4oaa"};
1016
1017/***/ }),
1018
1019/***/ 41:
1020/***/ (function(module, __webpack_exports__, __webpack_require__) {
1021
1022"use strict";
1023/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return SubHeader; });
1024/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
1025/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__);
1026/* harmony import */ var _Hooks_WindowDimensions__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(21);
1027/* harmony import */ var _SubHeader_module_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(46);
1028/* harmony import */ var _SubHeader_module_scss__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_SubHeader_module_scss__WEBPACK_IMPORTED_MODULE_2__);
1029
1030
1031
1032function SubHeader(props) {
1033  var isMobile = Object(_Hooks_WindowDimensions__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])().isMobile;
1034  var classNames = [];
1035  classNames.push(_SubHeader_module_scss__WEBPACK_IMPORTED_MODULE_2___default.a.SubHeader);
1036  if (props.className) {
1037    classNames.push(props.className);
1038  }
1039  if (props.alignCentre) {
1040    classNames.push(_SubHeader_module_scss__WEBPACK_IMPORTED_MODULE_2___default.a.AlignCentre);
1041  }
1042  if (props.alignRightMobile && isMobile) {
1043    classNames.push(_SubHeader_module_scss__WEBPACK_IMPORTED_MODULE_2___default.a.AlignRight);
1044  }
1045  if (props.alignRightDesktop && !isMobile) {
1046    classNames.push(_SubHeader_module_scss__WEBPACK_IMPORTED_MODULE_2___default.a.AlignRight);
1047  }
1048  return Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__["jsxs"])("h2", Object.assign({
1049    className: classNames.join(' ')
1050  }, {
1051    children: [props.image ? Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__["jsx"])("img", {
1052      className: _SubHeader_module_scss__WEBPACK_IMPORTED_MODULE_2___default.a.SubHeaderImage,
1053      src: props.image,
1054      width: 25
1055    }) : null, props.text]
1056  }));
1057}
1058
1059/***/ }),
1060
1061/***/ 439:
1062/***/ (function(module, exports, __webpack_require__) {
1063
1064var rng = __webpack_require__(294);
1065var bytesToUuid = __webpack_require__(295);
1066
1067// **`v1()` - Generate time-based UUID**
1068//
1069// Inspired by https://github.com/LiosK/UUID.js
1070// and http://docs.python.org/library/uuid.html
1071
1072var _nodeId;
1073var _clockseq;
1074
1075// Previous uuid creation time
1076var _lastMSecs = 0;
1077var _lastNSecs = 0;
1078
1079// See https://github.com/uuidjs/uuid for API details
1080function v1(options, buf, offset) {
1081  var i = buf && offset || 0;
1082  var b = buf || [];
1083
1084  options = options || {};
1085  var node = options.node || _nodeId;
1086  var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq;
1087
1088  // node and clockseq need to be initialized to random values if they're not
1089  // specified.  We do this lazily to minimize issues related to insufficient
1090  // system entropy.  See #189
1091  if (node == null || clockseq == null) {
1092    var seedBytes = rng();
1093    if (node == null) {
1094      // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)
1095      node = _nodeId = [
1096        seedBytes[0] | 0x01,
1097        seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]
1098      ];
1099    }
1100    if (clockseq == null) {
1101      // Per 4.2.2, randomize (14 bit) clockseq
1102      clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;
1103    }
1104  }
1105
1106  // UUID timestamps are 100 nano-second units since the Gregorian epoch,
1107  // (1582-10-15 00:00).  JSNumbers aren't precise enough for this, so
1108  // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'
1109  // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.
1110  var msecs = options.msecs !== undefined ? options.msecs : new Date().getTime();
1111
1112  // Per 4.2.1.2, use count of uuid's generated during the current clock
1113  // cycle to simulate higher resolution clock
1114  var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1;
1115
1116  // Time since last uuid creation (in msecs)
1117  var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000;
1118
1119  // Per 4.2.1.2, Bump clockseq on clock regression
1120  if (dt < 0 && options.clockseq === undefined) {
1121    clockseq = clockseq + 1 & 0x3fff;
1122  }
1123
1124  // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new
1125  // time interval
1126  if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {
1127    nsecs = 0;
1128  }
1129
1130  // Per 4.2.1.2 Throw error if too many uuids are requested
1131  if (nsecs >= 10000) {
1132    throw new Error('uuid.v1(): Can\'t create more than 10M uuids/sec');
1133  }
1134
1135  _lastMSecs = msecs;
1136  _lastNSecs = nsecs;
1137  _clockseq = clockseq;
1138
1139  // Per 4.1.4 - Convert from unix epoch to Gregorian epoch
1140  msecs += 12219292800000;
1141
1142  // `time_low`
1143  var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;
1144  b[i++] = tl >>> 24 & 0xff;
1145  b[i++] = tl >>> 16 & 0xff;
1146  b[i++] = tl >>> 8 & 0xff;
1147  b[i++] = tl & 0xff;
1148
1149  // `time_mid`
1150  var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff;
1151  b[i++] = tmh >>> 8 & 0xff;
1152  b[i++] = tmh & 0xff;
1153
1154  // `time_high_and_version`
1155  b[i++] = tmh >>> 24 & 0xf | 0x10; // include version
1156  b[i++] = tmh >>> 16 & 0xff;
1157
1158  // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)
1159  b[i++] = clockseq >>> 8 | 0x80;
1160
1161  // `clock_seq_low`
1162  b[i++] = clockseq & 0xff;
1163
1164  // `node`
1165  for (var n = 0; n < 6; ++n) {
1166    b[i + n] = node[n];
1167  }
1168
1169  return buf ? buf : bytesToUuid(b);
1170}
1171
1172module.exports = v1;
1173
1174
1175/***/ }),
1176
1177/***/ 440:
1178/***/ (function(module, exports, __webpack_require__) {
1179
1180var rng = __webpack_require__(294);
1181var bytesToUuid = __webpack_require__(295);
1182
1183function v4(options, buf, offset) {
1184  var i = buf && offset || 0;
1185
1186  if (typeof(options) == 'string') {
1187    buf = options === 'binary' ? new Array(16) : null;
1188    options = null;
1189  }
1190  options = options || {};
1191
1192  var rnds = options.random || (options.rng || rng)();
1193
1194  // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
1195  rnds[6] = (rnds[6] & 0x0f) | 0x40;
1196  rnds[8] = (rnds[8] & 0x3f) | 0x80;
1197
1198  // Copy bytes to buffer, if provided
1199  if (buf) {
1200    for (var ii = 0; ii < 16; ++ii) {
1201      buf[i + ii] = rnds[ii];
1202    }
1203  }
1204
1205  return buf || bytesToUuid(rnds);
1206}
1207
1208module.exports = v4;
1209
1210
1211/***/ }),
1212
1213/***/ 454:
1214/***/ (function(module, exports, __webpack_require__) {
1215
1216// extracted by mini-css-extract-plugin
1217module.exports = {"MiniBasketFooter":"_13BEwU_JvCmhJjDVfyIRQE","button":"_2Uh6Dqm7ch6AumzyEIlISY","MiniBasketSubtotal":"i-dVQQXFqQARkpa7Y2AYr"};
1218
1219/***/ }),
1220
1221/***/ 455:
1222/***/ (function(module, exports, __webpack_require__) {
1223
1224// extracted by mini-css-extract-plugin
1225module.exports = {"HoverWrapperContent":"_1XXYiqpv74yMa4ME5Z5uIy","HoverWrapperContainer":"_2F7dJSH3qK6ZFGCtMGzSTC"};
1226
1227/***/ }),
1228
1229/***/ 456:
1230/***/ (function(module, exports, __webpack_require__) {
1231
1232// extracted by mini-css-extract-plugin
1233module.exports = {"HeaderRowContainer":"_3QMr4dxWPqjf_ja0nvgbnK","alignRight":"_2r4Wt-aC2TX_TlOwkNPk4W"};
1234
1235/***/ }),
1236
1237/***/ 457:
1238/***/ (function(module, exports, __webpack_require__) {
1239
1240// extracted by mini-css-extract-plugin
1241module.exports = {"NavOuter":"_2vkIRt6h_ZyWnlVJK7TSJx","Dropdown":"_320_UDSndxzNS7GGlr27FV"};
1242
1243/***/ }),
1244
1245/***/ 458:
1246/***/ (function(module, exports, __webpack_require__) {
1247
1248// extracted by mini-css-extract-plugin
1249module.exports = {"MainHeaderLinkItem":"_1EfCUsslQVq848rdEcySC6","MainHeaderLink":"_13sTb0V0XDBNF6QzG3eNOr","active":"_3M6jZU-FXMtg8LfjFbouS-"};
1250
1251/***/ }),
1252
1253/***/ 459:
1254/***/ (function(module, exports, __webpack_require__) {
1255
1256// extracted by mini-css-extract-plugin
1257module.exports = {"MobileSubLinks":"_2XAWsoofNFYlWmwPV2Iwxx","fadeIn":"_2ptnuFBaKmHRzEThtEkSn4"};
1258
1259/***/ }),
1260
1261/***/ 46:
1262/***/ (function(module, exports, __webpack_require__) {
1263
1264// extracted by mini-css-extract-plugin
1265module.exports = {"SubHeader":"LcTE0sZ9uyN1dVp27QfZK","AlignRight":"JnUpkLuQef5iE1vOtjzDr","AlignCentre":"_3mY0uTIY5sHZc5PysmhEtc","SubHeaderImage":"_1hK8qgjhbhg6KqKmK2WbdQ"};
1266
1267/***/ }),
1268
1269/***/ 48:
1270/***/ (function(module, __webpack_exports__, __webpack_require__) {
1271
1272"use strict";
1273/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return pushToDataLayer; });
1274/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return pushToFaceBook; });
1275/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return sendToContentLightbox; });
1276/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return pushBasketUpdateToOptimove; });
1277/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return pushToOptimove; });
1278/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return applySubFreeDelivery; });
1279function pushToDataLayer(eventName, eventCategory, eventAction, eventLabel) {
1280  // @ts-ignore
1281  if (typeof dataLayer !== 'undefined') {
1282    // @ts-ignore
1283    dataLayer.push({
1284      'event': eventName,
1285      'eventCategory': eventCategory,
1286      'eventAction': eventAction,
1287      'eventLabel': eventLabel
1288    });
1289  }
1290}
1291function pushToFaceBook(eventType, eventName, data) {
1292  // @ts-ignore
1293  if (typeof fbq !== 'undefined') {
1294    // @ts-ignore
1295    fbq(eventType, eventName, data);
1296  }
1297}
1298function sendToContentLightbox(content) {
1299  // @ts-ignore
1300  showContentLightbox(content);
1301}
1302function pushBasketUpdateToOptimove(data) {
1303  // @ts-ignore
1304  reportBasketUpdateToOptimove(data.BasketItems, data.DeliveryChannel, data.OrderValue);
1305}
1306function pushToOptimove(productImage, productName, productURL, productPrices, productServings) {
1307  // @ts-ignore
1308  if (typeof reportProductVisitToOptimove !== 'undefined') {
1309    // @ts-ignore
1310    reportProductVisitToOptimove(productImage, productName, productURL, productPrices, productServings);
1311  }
1312}
1313function applySubFreeDelivery(isSubscription) {
1314  // @ts-ignore
1315  console.log('external events. isSubscription: ' + isSubscription);
1316  // @ts-ignore
1317  applyRemoveFreeSub(isSubscription);
1318}
1319
1320/***/ }),
1321
1322/***/ 5:
1323/***/ (function(module, __webpack_exports__, __webpack_require__) {
1324
1325"use strict";
1326/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return StandardLinkButton; });
1327/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
1328/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__);
1329/* harmony import */ var _StandardButton_module_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2);
1330/* harmony import */ var _StandardButton_module_scss__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_StandardButton_module_scss__WEBPACK_IMPORTED_MODULE_1__);
1331/* harmony import */ var _BaseButton__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(11);
1332
1333
1334
1335function StandardLinkButton(props) {
1336  function classFromType() {
1337    switch (props.type) {
1338      case 'secondary':
1339        return _StandardButton_module_scss__WEBPACK_IMPORTED_MODULE_1___default.a.SecondaryButton;
1340      case 'outline':
1341        return _StandardButton_module_scss__WEBPACK_IMPORTED_MODULE_1___default.a.OutlineButton;
1342      case 'tertiary':
1343        return _StandardButton_module_scss__WEBPACK_IMPORTED_MODULE_1___default.a.TertiaryButton;
1344      case 'quaternary':
1345        return _StandardButton_module_scss__WEBPACK_IMPORTED_MODULE_1___default.a.QuaternaryButton;
1346      case 'ghost':
1347        return _StandardButton_module_scss__WEBPACK_IMPORTED_MODULE_1___default.a.GhostButton;
1348      case 'pill':
1349        return _StandardButton_module_scss__WEBPACK_IMPORTED_MODULE_1___default.a.Pill;
1350      case 'attention':
1351        return _StandardButton_module_scss__WEBPACK_IMPORTED_MODULE_1___default.a.Attention;
1352      case 'warning':
1353        return _StandardButton_module_scss__WEBPACK_IMPORTED_MODULE_1___default.a.Warning;
1354      default:
1355        return undefined;
1356    }
1357  }
1358  var classNames = [];
1359  if (props.isDanger) {
1360    classNames.push(_StandardButton_module_scss__WEBPACK_IMPORTED_MODULE_1___default.a.IsDanger);
1361  }
1362  if (props.className) {
1363    classNames.push(props.className);
1364  }
1365  if (props.fullWidth) {
1366    classNames.push(_StandardButton_module_scss__WEBPACK_IMPORTED_MODULE_1___default.a.FullWidth);
1367  }
1368  if (props.isSmall) {
1369    classNames.push(_StandardButton_module_scss__WEBPACK_IMPORTED_MODULE_1___default.a.IsSmall);
1370  }
1371  if (props.isPlain) {
1372    classNames.push(_StandardButton_module_scss__WEBPACK_IMPORTED_MODULE_1___default.a.IsPlain);
1373  }
1374  if (props.isSelected) {
1375    classNames.push("is-selected");
1376  }
1377  classNames.push(_StandardButton_module_scss__WEBPACK_IMPORTED_MODULE_1___default.a.StandardButton);
1378  var specificClass = classFromType();
1379  if (specificClass) {
1380    classNames.push(specificClass);
1381  }
1382  return Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__["jsx"])(_BaseButton__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"], Object.assign({}, props, {
1383    target: props.target,
1384    href: props.href,
1385    className: classNames.join(" "),
1386    onClick: props.onClick,
1387    activeImage: props.activeImage,
1388    hoverImage: props.hoverImage,
1389    alt: props.alt
1390  }, {
1391    children: props.children
1392  }));
1393}
1394
1395/***/ }),
1396
1397/***/ 55:
1398/***/ (function(module, exports, __webpack_require__) {
1399
1400"use strict";
1401/*
1402object-assign
1403(c) Sindre Sorhus
1404@license MIT
1405*/
1406
1407
1408/* eslint-disable no-unused-vars */
1409var getOwnPropertySymbols = Object.getOwnPropertySymbols;
1410var hasOwnProperty = Object.prototype.hasOwnProperty;
1411var propIsEnumerable = Object.prototype.propertyIsEnumerable;
1412
1413function toObject(val) {
1414	if (val === null || val === undefined) {
1415		throw new TypeError('Object.assign cannot be called with null or undefined');
1416	}
1417
1418	return Object(val);
1419}
1420
1421function shouldUseNative() {
1422	try {
1423		if (!Object.assign) {
1424			return false;
1425		}
1426
1427		// Detect buggy property enumeration order in older V8 versions.
1428
1429		// https://bugs.chromium.org/p/v8/issues/detail?id=4118
1430		var test1 = new String('abc');  // eslint-disable-line no-new-wrappers
1431		test1[5] = 'de';
1432		if (Object.getOwnPropertyNames(test1)[0] === '5') {
1433			return false;
1434		}
1435
1436		// https://bugs.chromium.org/p/v8/issues/detail?id=3056
1437		var test2 = {};
1438		for (var i = 0; i < 10; i++) {
1439			test2['_' + String.fromCharCode(i)] = i;
1440		}
1441		var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
1442			return test2[n];
1443		});
1444		if (order2.join('') !== '0123456789') {
1445			return false;
1446		}
1447
1448		// https://bugs.chromium.org/p/v8/issues/detail?id=3056
1449		var test3 = {};
1450		'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
1451			test3[letter] = letter;
1452		});
1453		if (Object.keys(Object.assign({}, test3)).join('') !==
1454				'abcdefghijklmnopqrst') {
1455			return false;
1456		}
1457
1458		return true;
1459	} catch (err) {
1460		// We don't expect any of the above to throw, but better to be safe.
1461		return false;
1462	}
1463}
1464
1465module.exports = shouldUseNative() ? Object.assign : function (target, source) {
1466	var from;
1467	var to = toObject(target);
1468	var symbols;
1469
1470	for (var s = 1; s < arguments.length; s++) {
1471		from = Object(arguments[s]);
1472
1473		for (var key in from) {
1474			if (hasOwnProperty.call(from, key)) {
1475				to[key] = from[key];
1476			}
1477		}
1478
1479		if (getOwnPropertySymbols) {
1480			symbols = getOwnPropertySymbols(from);
1481			for (var i = 0; i < symbols.length; i++) {
1482				if (propIsEnumerable.call(from, symbols[i])) {
1483					to[symbols[i]] = from[symbols[i]];
1484				}
1485			}
1486		}
1487	}
1488
1489	return to;
1490};
1491
1492
1493/***/ }),
1494
1495/***/ 585:
1496/***/ (function(module, __webpack_exports__, __webpack_require__) {
1497
1498"use strict";
1499/* WEBPACK VAR INJECTION */(function(global) {/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
1500/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__);
1501/* harmony import */ var _Common_Styles_common_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(293);
1502/* harmony import */ var _Common_Styles_common_scss__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_Common_Styles_common_scss__WEBPACK_IMPORTED_MODULE_1__);
1503/* harmony import */ var easy_peasy__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4);
1504/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(1);
1505/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);
1506/* harmony import */ var _Components_Header__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(675);
1507/* harmony import */ var _Common_Features_variantContext__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(14);
1508
1509// ts-nocheck
1510
1511
1512
1513
1514
1515var App = function App(props) {
1516  Object(react__WEBPACK_IMPORTED_MODULE_3__["useEffect"])(function () {
1517    store.getActions().updateBasketItems({
1518      BasketItems: props.BasketItems,
1519      DoBasketFlash: false
1520    });
1521  }, []);
1522  var store = {};
1523  // @ts-ignore
1524  store = global.Store;
1525  return Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__["jsx"])(easy_peasy__WEBPACK_IMPORTED_MODULE_2__[/* StoreProvider */ "a"], Object.assign({
1526    store: store
1527  }, {
1528    children: Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__["jsx"])(_Common_Features_variantContext__WEBPACK_IMPORTED_MODULE_5__[/* VariantProvider */ "a"], Object.assign({
1529      initialVariants: props.FrontendFeatureStates
1530    }, {
1531      children: Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__["jsx"])(_Components_Header__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"], Object.assign({}, props))
1532    }))
1533  }));
1534};
1535/* harmony default export */ __webpack_exports__["a"] = (App);
1536/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(17)))
1537
1538/***/ }),
1539
1540/***/ 586:
1541/***/ (function(module, exports, __webpack_require__) {
1542
1543// extracted by mini-css-extract-plugin
1544module.exports = {"BasketButton":"_2ptmhtsGUHBxuFep1LLxaK"};
1545
1546/***/ }),
1547
1548/***/ 587:
1549/***/ (function(module, exports, __webpack_require__) {
1550
1551// extracted by mini-css-extract-plugin
1552module.exports = {"HeaderButton":"W5omXdLLirDdJ-1XltgKp"};
1553
1554/***/ }),
1555
1556/***/ 588:
1557/***/ (function(module, exports, __webpack_require__) {
1558
1559// extracted by mini-css-extract-plugin
1560module.exports = {"MiniBasketItem":"_1Vxgi3PCN-MCHlhA1P6VO6"};
1561
1562/***/ }),
1563
1564/***/ 589:
1565/***/ (function(module, exports, __webpack_require__) {
1566
1567// extracted by mini-css-extract-plugin
1568module.exports = {"MiniBasketItemContent":"fkj1OwA44v_CiQ05vIgfl"};
1569
1570/***/ }),
1571
1572/***/ 590:
1573/***/ (function(module, exports, __webpack_require__) {
1574
1575"use strict";
1576
1577Object.defineProperty(exports, "__esModule", { value: true });
1578var useScrollPosition_1 = __webpack_require__(1205);
1579Object.defineProperty(exports, "useScrollPosition", { enumerable: true, get: function () { return useScrollPosition_1.useScrollPosition; } });
1580
1581
1582/***/ }),
1583
1584/***/ 591:
1585/***/ (function(module, exports, __webpack_require__) {
1586
1587// extracted by mini-css-extract-plugin
1588
1589/***/ }),
1590
1591/***/ 592:
1592/***/ (function(module, exports, __webpack_require__) {
1593
1594// extracted by mini-css-extract-plugin
1595module.exports = {"SearchBoxMessage":"yzHtYtMppLvfzXzrRwvTc"};
1596
1597/***/ }),
1598
1599/***/ 593:
1600/***/ (function(module, exports, __webpack_require__) {
1601
1602// extracted by mini-css-extract-plugin
1603module.exports = {"SearchResultsMore":"_2FUrUXWigjvzBjzNLRHpXP"};
1604
1605/***/ }),
1606
1607/***/ 594:
1608/***/ (function(module, exports, __webpack_require__) {
1609
1610// extracted by mini-css-extract-plugin
1611module.exports = {"SearchResultsMore":"qyNYliMjV4e4Li7BXuxOV"};
1612
1613/***/ }),
1614
1615/***/ 595:
1616/***/ (function(module, exports, __webpack_require__) {
1617
1618// extracted by mini-css-extract-plugin
1619
1620/***/ }),
1621
1622/***/ 596:
1623/***/ (function(module, exports, __webpack_require__) {
1624
1625// extracted by mini-css-extract-plugin
1626module.exports = {"SearchBarUpsellingText":"_1OQ6ndB9wcJmcR1fFA_5EQ","Container":"_12jfm1OEqLqQttdvNxFlSz"};
1627
1628/***/ }),
1629
1630/***/ 597:
1631/***/ (function(module, exports, __webpack_require__) {
1632
1633// extracted by mini-css-extract-plugin
1634module.exports = {"SearchResults":"_1g2V_uIlE-lEtEZ8h1fPfv","fadeIn":"eRS9exKt70ZkXUfThkPJ3","Container":"_12WBp47MGvm8VaeO9o-F7n"};
1635
1636/***/ }),
1637
1638/***/ 598:
1639/***/ (function(module, exports, __webpack_require__) {
1640
1641// extracted by mini-css-extract-plugin
1642module.exports = {"SearchResults":"_1qeCCxaToTv-NL5g2Y3LBW","fadeIn":"_3N9fFHaecKWPzyCTd3pTv8","Container":"vw8sMTer_ZqO1Rs8OdPcl"};
1643
1644/***/ }),
1645
1646/***/ 599:
1647/***/ (function(module, exports, __webpack_require__) {
1648
1649// extracted by mini-css-extract-plugin
1650module.exports = {"MainHeaderLinks":"_2nlq_VxMRZgSA3awd8Nt0F"};
1651
1652/***/ }),
1653
1654/***/ 60:
1655/***/ (function(module, exports) {
1656
1657/**
1658 * Returns a function, that, as long as it continues to be invoked, will not
1659 * be triggered. The function will be called after it stops being called for
1660 * N milliseconds. If `immediate` is passed, trigger the function on the
1661 * leading edge, instead of the trailing. The function also has a property 'clear' 
1662 * that is a function which will clear the timer to prevent previously scheduled executions. 
1663 *
1664 * @source underscore.js
1665 * @see http://unscriptable.com/2009/03/20/debouncing-javascript-methods/
1666 * @param {Function} function to wrap
1667 * @param {Number} timeout in ms (`100`)
1668 * @param {Boolean} whether to execute at the beginning (`false`)
1669 * @api public
1670 */
1671function debounce(func, wait, immediate){
1672  var timeout, args, context, timestamp, result;
1673  if (null == wait) wait = 100;
1674
1675  function later() {
1676    var last = Date.now() - timestamp;
1677
1678    if (last < wait && last >= 0) {
1679      timeout = setTimeout(later, wait - last);
1680    } else {
1681      timeout = null;
1682      if (!immediate) {
1683        result = func.apply(context, args);
1684        context = args = null;
1685      }
1686    }
1687  };
1688
1689  var debounced = function(){
1690    context = this;
1691    args = arguments;
1692    timestamp = Date.now();
1693    var callNow = immediate && !timeout;
1694    if (!timeout) timeout = setTimeout(later, wait);
1695    if (callNow) {
1696      result = func.apply(context, args);
1697      context = args = null;
1698    }
1699
1700    return result;
1701  };
1702
1703  debounced.clear = function() {
1704    if (timeout) {
1705      clearTimeout(timeout);
1706      timeout = null;
1707    }
1708  };
1709  
1710  debounced.flush = function() {
1711    if (timeout) {
1712      result = func.apply(context, args);
1713      context = args = null;
1714      
1715      clearTimeout(timeout);
1716      timeout = null;
1717    }
1718  };
1719
1720  return debounced;
1721};
1722
1723// Adds compatibility for ES modules
1724debounce.debounce = debounce;
1725
1726module.exports = debounce;
1727
1728
1729/***/ }),
1730
1731/***/ 600:
1732/***/ (function(module, exports, __webpack_require__) {
1733
1734// extracted by mini-css-extract-plugin
1735module.exports = {"ColumnLink":"j4_9RYj_-AnnWP6tZZVxD"};
1736
1737/***/ }),
1738
1739/***/ 601:
1740/***/ (function(module, exports, __webpack_require__) {
1741
1742// extracted by mini-css-extract-plugin
1743module.exports = {"Column":"rqYZ_k4WtI98NJIikgMJJ"};
1744
1745/***/ }),
1746
1747/***/ 602:
1748/***/ (function(module, exports, __webpack_require__) {
1749
1750// extracted by mini-css-extract-plugin
1751module.exports = {"ColumnHeader":"_3McKNIWHtm5cfGnM_Gd8ez"};
1752
1753/***/ }),
1754
1755/***/ 603:
1756/***/ (function(module, exports, __webpack_require__) {
1757
1758// extracted by mini-css-extract-plugin
1759module.exports = {"DropdownPromo":"_1OxU6i3wR0yCBDq704h_Bd"};
1760
1761/***/ }),
1762
1763/***/ 604:
1764/***/ (function(module, exports, __webpack_require__) {
1765
1766// extracted by mini-css-extract-plugin
1767
1768/***/ }),
1769
1770/***/ 605:
1771/***/ (function(module, exports, __webpack_require__) {
1772
1773// extracted by mini-css-extract-plugin
1774module.exports = {"CloseMenu":"_3AZMkDrpahju7fOBOsYvMk"};
1775
1776/***/ }),
1777
1778/***/ 606:
1779/***/ (function(module, exports, __webpack_require__) {
1780
1781// extracted by mini-css-extract-plugin
1782module.exports = {"MobileFooter":"_3N-8LHVyTNgismFq3HIHDu"};
1783
1784/***/ }),
1785
1786/***/ 607:
1787/***/ (function(module, exports, __webpack_require__) {
1788
1789// extracted by mini-css-extract-plugin
1790module.exports = {"NavLink":"_2KcdFj9oUeXMnrJhCje8mO"};
1791
1792/***/ }),
1793
1794/***/ 608:
1795/***/ (function(module, exports, __webpack_require__) {
1796
1797// extracted by mini-css-extract-plugin
1798module.exports = {"MobileHeader":"q6DNGtBBq1BaPHLO_fJQH"};
1799
1800/***/ }),
1801
1802/***/ 609:
1803/***/ (function(module, exports, __webpack_require__) {
1804
1805// extracted by mini-css-extract-plugin
1806module.exports = {"MobileHeaderNav":"_2xurQcy0104yKlRqBkoypz"};
1807
1808/***/ }),
1809
1810/***/ 610:
1811/***/ (function(module, exports, __webpack_require__) {
1812
1813// extracted by mini-css-extract-plugin
1814module.exports = {"MobileHeaderNavLink":"_2u-apqZjqIwFs3O-DO8WHF"};
1815
1816/***/ }),
1817
1818/***/ 611:
1819/***/ (function(module, exports, __webpack_require__) {
1820
1821// extracted by mini-css-extract-plugin
1822module.exports = {"HeaderTitle":"_2353IW0wyUU0CsYOQa-PSJ"};
1823
1824/***/ }),
1825
1826/***/ 612:
1827/***/ (function(module, exports, __webpack_require__) {
1828
1829// extracted by mini-css-extract-plugin
1830module.exports = {"MobileLinks":"_3dHdLSC0k_T7t6Y7roqy2n"};
1831
1832/***/ }),
1833
1834/***/ 613:
1835/***/ (function(module, exports, __webpack_require__) {
1836
1837// extracted by mini-css-extract-plugin
1838module.exports = {"PrimaryItem":"vPxJa2nL5c4ud_-joyBlF"};
1839
1840/***/ }),
1841
1842/***/ 614:
1843/***/ (function(module, exports, __webpack_require__) {
1844
1845// extracted by mini-css-extract-plugin
1846module.exports = {"Back":"_2YfH9B_YZXp2SeiWdx8rfP"};
1847
1848/***/ }),
1849
1850/***/ 615:
1851/***/ (function(module, exports, __webpack_require__) {
1852
1853// extracted by mini-css-extract-plugin
1854module.exports = {"SubNavHeader":"_30iQpIHc63qYOIGdE-zepU"};
1855
1856/***/ }),
1857
1858/***/ 616:
1859/***/ (function(module, exports, __webpack_require__) {
1860
1861// extracted by mini-css-extract-plugin
1862module.exports = {"Forward":"_1-lVnxEaYyPeish5-VRENM"};
1863
1864/***/ }),
1865
1866/***/ 617:
1867/***/ (function(module, exports, __webpack_require__) {
1868
1869// extracted by mini-css-extract-plugin
1870module.exports = {"NavigationLinks":"_2_XJIYphETFkzTgP8JMmwQ"};
1871
1872/***/ }),
1873
1874/***/ 618:
1875/***/ (function(module, exports, __webpack_require__) {
1876
1877// extracted by mini-css-extract-plugin
1878module.exports = {"SideBar":"_1cUFaMxsb0c8WHm1Yf6iYb"};
1879
1880/***/ }),
1881
1882/***/ 619:
1883/***/ (function(module, exports, __webpack_require__) {
1884
1885// extracted by mini-css-extract-plugin
1886module.exports = {"MobileToggle":"_2yTDWESypk5T6NQHsDcWgu"};
1887
1888/***/ }),
1889
1890/***/ 620:
1891/***/ (function(module, exports, __webpack_require__) {
1892
1893// extracted by mini-css-extract-plugin
1894module.exports = {"MobileOverlay":"_36vC2FwXBXAHtHHD3O3Lq5"};
1895
1896/***/ }),
1897
1898/***/ 621:
1899/***/ (function(module, __webpack_exports__, __webpack_require__) {
1900
1901"use strict";
1902/* WEBPACK VAR INJECTION */(function(global) {var DoUpdate = function DoUpdate(data) {
1903  var mappedItems = data.map(function (element) {
1904    return {
1905      ProductId: element.Product_ID,
1906      Title: element.BasketLineDescription,
1907      Quantity: element.Quantity,
1908      UnitPrice: element.Price
1909    };
1910  });
1911  // @ts-ignore
1912  global.Store.getActions().updateBasketItems({
1913    BasketItems: mappedItems,
1914    DoBasketFlash: true
1915  });
1916};
1917/* harmony default export */ __webpack_exports__["a"] = (DoUpdate);
1918/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(17)))
1919
1920/***/ }),
1921
1922/***/ 675:
1923/***/ (function(module, __webpack_exports__, __webpack_require__) {
1924
1925"use strict";
1926
1927// EXPORTS
1928__webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ Header; });
1929
1930// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js
1931var jsx_runtime = __webpack_require__(0);
1932
1933// EXTERNAL MODULE: ./React/Header/styles/main.scss
1934var main = __webpack_require__(1119);
1935
1936// EXTERNAL MODULE: ./React/Header/Components/basket/BasketButton.module.scss
1937var BasketButton_module = __webpack_require__(586);
1938var BasketButton_module_default = /*#__PURE__*/__webpack_require__.n(BasketButton_module);
1939
1940// EXTERNAL MODULE: ./React/Header/Components/buttons/HeaderButton.module.scss
1941var HeaderButton_module = __webpack_require__(587);
1942var HeaderButton_module_default = /*#__PURE__*/__webpack_require__.n(HeaderButton_module);
1943
1944// EXTERNAL MODULE: ./React/Common/Components/Buttons/BaseButton.tsx + 1 modules
1945var BaseButton = __webpack_require__(11);
1946
1947// CONCATENATED MODULE: ./React/Header/Components/buttons/HeaderButton.tsx
1948
1949
1950
1951function HeaderButton(props) {
1952  var classNames = [HeaderButton_module_default.a.HeaderButton];
1953  if (props.className) {
1954    classNames.push(props.className);
1955  }
1956  return Object(jsx_runtime["jsxs"])(BaseButton["a" /* default */], Object.assign({
1957    href: props.href,
1958    className: classNames.join(' '),
1959    activeImage: props.activeImage,
1960    hoverImage: props.hoverImage,
1961    alt: props.alt
1962  }, {
1963    children: [props.children, Object(jsx_runtime["jsx"])("span", Object.assign({
1964      className: "name"
1965    }, {
1966      children: props.title
1967    }))]
1968  }));
1969}
1970// EXTERNAL MODULE: ./node_modules/react/index.js
1971var react = __webpack_require__(1);
1972
1973// EXTERNAL MODULE: ./React/Header/models/HeaderContext.tsx
1974var HeaderContext = __webpack_require__(30);
1975
1976// CONCATENATED MODULE: ./React/Header/Components/basket/BasketButton.tsx
1977
1978
1979
1980
1981
1982function BasketButton(props) {
1983  var _useContext = Object(react["useContext"])(HeaderContext["a" /* HeaderContext */]),
1984    BaseUrl = _useContext.BaseUrl;
1985  return Object(jsx_runtime["jsxs"])(HeaderButton, Object.assign({
1986    href: "".concat(BaseUrl, "basket/"),
1987    title: "checkout",
1988    className: BasketButton_module_default.a.BasketButton,
1989    activeImage: "https://assets.cookfood.net/new-header/shopping-basket-light.svg",
1990    hoverImage: "https://assets.cookfood.net/new-header/shopping-basket-solid.svg",
1991    alt: 'Basket'
1992  }, {
1993    children: [Object(jsx_runtime["jsx"])("span", Object.assign({
1994      className: "item-count"
1995    }, {
1996      children: props.quantity
1997    })), Object(jsx_runtime["jsxs"])("span", Object.assign({
1998      className: "amount"
1999    }, {
2000      children: ["\xA3", props.value.toFixed(2)]
2001    }))]
2002  }));
2003}
2004// EXTERNAL MODULE: ./React/Common/Components/Buttons/StandardLinkButton.tsx
2005var StandardLinkButton = __webpack_require__(5);
2006
2007// EXTERNAL MODULE: ./React/Header/Components/basket/MiniBasketFooter.module.scss
2008var MiniBasketFooter_module = __webpack_require__(454);
2009var MiniBasketFooter_module_default = /*#__PURE__*/__webpack_require__.n(MiniBasketFooter_module);
2010
2011// CONCATENATED MODULE: ./React/Header/Components/basket/MiniBasketFooter.tsx
2012
2013
2014
2015
2016
2017function MiniBasketFooter(props) {
2018  var _useContext = Object(react["useContext"])(HeaderContext["a" /* HeaderContext */]),
2019    BaseUrl = _useContext.BaseUrl;
2020  return Object(jsx_runtime["jsxs"])(jsx_runtime["Fragment"], {
2021    children: [Object(jsx_runtime["jsxs"])("div", Object.assign({
2022      className: MiniBasketFooter_module_default.a.MiniBasketSubtotal
2023    }, {
2024      children: [Object(jsx_runtime["jsx"])("span", {
2025        children: "Subtotal"
2026      }), Object(jsx_runtime["jsxs"])("span", Object.assign({
2027        className: "item__subtotal"
2028      }, {
2029        children: ["\xA3", props.value.toFixed(2)]
2030      }))]
2031    })), Object(jsx_runtime["jsxs"])("div", Object.assign({
2032      className: MiniBasketFooter_module_default.a.MiniBasketFooter
2033    }, {
2034      children: [Object(jsx_runtime["jsx"])(StandardLinkButton["a" /* default */], Object.assign({
2035        href: "".concat(BaseUrl, "basket"),
2036        type: "secondary",
2037        className: "all-items"
2038      }, {
2039        children: "View all items"
2040      })), Object(jsx_runtime["jsx"])(StandardLinkButton["a" /* default */], Object.assign({
2041        href: "".concat(BaseUrl, "checkout"),
2042        className: "checkout"
2043      }, {
2044        children: "Checkout securely"
2045      }))]
2046    }))]
2047  });
2048}
2049// EXTERNAL MODULE: ./React/Header/Components/basket/MiniBasketHeader.module.scss
2050var MiniBasketHeader_module = __webpack_require__(378);
2051var MiniBasketHeader_module_default = /*#__PURE__*/__webpack_require__.n(MiniBasketHeader_module);
2052
2053// CONCATENATED MODULE: ./React/Header/Components/basket/MiniBasketHeader.tsx
2054
2055
2056function MiniBasketHeader(props) {
2057  return Object(jsx_runtime["jsxs"])("div", Object.assign({
2058    className: MiniBasketHeader_module_default.a.MiniBasketHeader
2059  }, {
2060    children: ["my basket,", Object(jsx_runtime["jsxs"])("span", Object.assign({
2061      className: "basket-summary__itemNo"
2062    }, {
2063      children: [props.quantity, " item", props.quantity != 1 ? "s" : ""]
2064    }))]
2065  }));
2066}
2067// EXTERNAL MODULE: ./React/Header/Components/basket/MiniBasketItem.module.scss
2068var MiniBasketItem_module = __webpack_require__(588);
2069var MiniBasketItem_module_default = /*#__PURE__*/__webpack_require__.n(MiniBasketItem_module);
2070
2071// CONCATENATED MODULE: ./React/Header/Components/basket/MiniBasketItem.tsx
2072
2073
2074function MiniBasketItem(props) {
2075  return Object(jsx_runtime["jsx"])("div", Object.assign({
2076    className: MiniBasketItem_module_default.a.MiniBasketItem
2077  }, {
2078    children: props.children
2079  }));
2080}
2081// EXTERNAL MODULE: ./React/Header/Components/basket/MiniBasketProductItem.module.scss
2082var MiniBasketProductItem_module = __webpack_require__(589);
2083var MiniBasketProductItem_module_default = /*#__PURE__*/__webpack_require__.n(MiniBasketProductItem_module);
2084
2085// CONCATENATED MODULE: ./React/Header/Components/basket/MiniBasketProductItem.tsx
2086
2087
2088
2089function MiniBasketProductItem(props) {
2090  var linePrice = props.item.UnitPrice * props.item.Quantity;
2091  return Object(jsx_runtime["jsxs"])(MiniBasketItem, {
2092    children: [Object(jsx_runtime["jsx"])("a", Object.assign({
2093      className: "item__img",
2094      href: "#"
2095    }, {
2096      children: Object(jsx_runtime["jsx"])("img", {
2097        src: "https://assets.cookfood.net/product_".concat(props.item.ProductId, ".jpg"),
2098        alt: props.item.Title
2099      })
2100    })), Object(jsx_runtime["jsxs"])("div", Object.assign({
2101      className: MiniBasketProductItem_module_default.a.MiniBasketItemContent
2102    }, {
2103      children: [Object(jsx_runtime["jsx"])("a", Object.assign({
2104        className: "item__title",
2105        href: "#"
2106      }, {
2107        children: props.item.Title
2108      })), Object(jsx_runtime["jsxs"])("p", Object.assign({
2109        className: "item__quantity"
2110      }, {
2111        children: ["Qty: ", props.item.Quantity]
2112      })), Object(jsx_runtime["jsxs"])("p", Object.assign({
2113        className: "item__price"
2114      }, {
2115        children: ["\xA3", linePrice.toFixed(2)]
2116      }))]
2117    }))]
2118  });
2119}
2120// EXTERNAL MODULE: ./React/Header/Components/basket/MiniBasket.module.scss
2121var MiniBasket_module = __webpack_require__(379);
2122var MiniBasket_module_default = /*#__PURE__*/__webpack_require__.n(MiniBasket_module);
2123
2124// CONCATENATED MODULE: ./React/Header/Components/basket/MiniBasketEmpty.tsx
2125
2126
2127
2128function MiniBasketEmpty() {
2129  return Object(jsx_runtime["jsxs"])(jsx_runtime["Fragment"], {
2130    children: [Object(jsx_runtime["jsx"])("div", Object.assign({
2131      className: MiniBasketHeader_module_default.a.MiniBasketHeader
2132    }, {
2133      children: "My Basket"
2134    })), Object(jsx_runtime["jsx"])("div", Object.assign({
2135      className: "basket-summary__body"
2136    }, {
2137      children: Object(jsx_runtime["jsx"])(MiniBasketItem, {
2138        children: Object(jsx_runtime["jsx"])("div", Object.assign({
2139          className: "item__content"
2140        }, {
2141          children: Object(jsx_runtime["jsx"])("p", {
2142            children: "Your basket is currently empty"
2143          })
2144        }))
2145      })
2146    }))]
2147  });
2148}
2149// CONCATENATED MODULE: ./React/Header/Components/basket/MiniBasket.tsx
2150
2151
2152
2153
2154
2155
2156function MiniBasket(props) {
2157  var miniBasketContents = Object(jsx_runtime["jsx"])(jsx_runtime["Fragment"], {});
2158  if (!props.items || props.items.length == 0) {
2159    miniBasketContents = Object(jsx_runtime["jsx"])(MiniBasketEmpty, {});
2160  } else {
2161    miniBasketContents = Object(jsx_runtime["jsxs"])(jsx_runtime["Fragment"], {
2162      children: [Object(jsx_runtime["jsx"])(MiniBasketHeader, {
2163        quantity: props.quantity
2164      }), Object(jsx_runtime["jsx"])("div", Object.assign({
2165        className: "basket-summary__body"
2166      }, {
2167        children: props.items.map(function (item, index) {
2168          return Object(jsx_runtime["jsx"])(MiniBasketProductItem, {
2169            item: item
2170          }, index);
2171        })
2172      })), Object(jsx_runtime["jsx"])(MiniBasketFooter, {
2173        value: props.value
2174      })]
2175    });
2176  }
2177  return Object(jsx_runtime["jsx"])("div", Object.assign({
2178    className: MiniBasket_module_default.a.MiniBasket
2179  }, {
2180    children: Object(jsx_runtime["jsx"])("form", {
2181      children: miniBasketContents
2182    })
2183  }));
2184}
2185// CONCATENATED MODULE: ./React/Header/Components/basket/BasketItemAdded.tsx
2186
2187
2188
2189function BasketItemAdded(props) {
2190  return Object(jsx_runtime["jsx"])("div", Object.assign({
2191    className: MiniBasket_module_default.a.MiniBasket + ' forceshow'
2192  }, {
2193    children: Object(jsx_runtime["jsx"])("form", {
2194      children: Object(jsx_runtime["jsx"])("div", Object.assign({
2195        className: "basket-summary__body"
2196      }, {
2197        children: Object(jsx_runtime["jsx"])(MiniBasketItem, {
2198          children: Object(jsx_runtime["jsx"])("p", {
2199            children: "Your basket was updated"
2200          })
2201        })
2202      }))
2203    })
2204  }));
2205}
2206// EXTERNAL MODULE: ./React/Header/Components/basket/HoverWrapper.module.scss
2207var HoverWrapper_module = __webpack_require__(455);
2208var HoverWrapper_module_default = /*#__PURE__*/__webpack_require__.n(HoverWrapper_module);
2209
2210// CONCATENATED MODULE: ./React/Header/Components/basket/HoverWrapper.tsx
2211
2212
2213function HoverWrapper(props) {
2214  return Object(jsx_runtime["jsx"])(jsx_runtime["Fragment"], {
2215    children: Object(jsx_runtime["jsxs"])("div", Object.assign({
2216      className: HoverWrapper_module_default.a.HoverWrapperContainer
2217    }, {
2218      children: [props.hoverElement, Object(jsx_runtime["jsx"])("div", Object.assign({
2219        className: HoverWrapper_module_default.a.HoverWrapperContent,
2220        style: {
2221          right: props.alignRight ? "0" : 'auto'
2222        }
2223      }, {
2224        children: props.children
2225      }))]
2226    }))
2227  });
2228}
2229// CONCATENATED MODULE: ./React/Header/Components/basket/BasketSummary.tsx
2230
2231
2232
2233
2234
2235
2236
2237function BasketSummary(props) {
2238  var _useContext = Object(react["useContext"])(HeaderContext["a" /* HeaderContext */]),
2239    HideBasketButton = _useContext.HideBasketButton;
2240  var quantity = 0;
2241  var value = 0;
2242  if (!!props.items && props.items.length > 0) {
2243    quantity = props.items.map(function (item) {
2244      return item.Quantity;
2245    }).reduce(function (a, b) {
2246      return a + b;
2247    });
2248    value = props.items.map(function (item) {
2249      return item.Quantity * item.UnitPrice;
2250    }).reduce(function (a, b) {
2251      return a + b;
2252    });
2253  }
2254  return Object(jsx_runtime["jsx"])("div", Object.assign({
2255    className: "basket-outer"
2256  }, {
2257    children: Object(jsx_runtime["jsxs"])(HoverWrapper, Object.assign({
2258      alignRight: true,
2259      hoverElement: !HideBasketButton ? Object(jsx_runtime["jsx"])(BasketButton, {
2260        quantity: quantity,
2261        value: value
2262      }) : null
2263    }, {
2264      children: [props.basketFlash ? Object(jsx_runtime["jsx"])(jsx_runtime["Fragment"], {
2265        children: Object(jsx_runtime["jsx"])(BasketItemAdded, Object.assign({}, props, {
2266          quantity: quantity,
2267          value: value
2268        }))
2269      }) : null, Object(jsx_runtime["jsx"])(MiniBasket, Object.assign({}, props, {
2270        quantity: quantity,
2271        value: value
2272      }))]
2273    }))
2274  }));
2275}
2276// CONCATENATED MODULE: ./React/Header/Components/buttons/BookSlotButton.tsx
2277
2278
2279
2280
2281function BookSlotButton() {
2282  var _useContext = Object(react["useContext"])(HeaderContext["a" /* HeaderContext */]),
2283    BaseUrl = _useContext.BaseUrl,
2284    CurrentUrl = _useContext.CurrentUrl;
2285  return Object(jsx_runtime["jsx"])(StandardLinkButton["a" /* default */], Object.assign({
2286    href: "".concat(BaseUrl, "CheckoutNew/BookSlot"),
2287    "data-addurl": CurrentUrl,
2288    className: "bookslot",
2289    activeImage: "https://assets.cookfood.net/new-header/clock-regular.svg",
2290    hoverImage: "https://assets.cookfood.net/new-header/clock-solid.svg",
2291    alt: 'Book Slot'
2292  }, {
2293    children: "Book Slot"
2294  }));
2295}
2296// CONCATENATED MODULE: ./React/Header/Components/common/logo.tsx
2297
2298
2299
2300function Logo() {
2301  var _useContext = Object(react["useContext"])(HeaderContext["a" /* HeaderContext */]),
2302    BaseUrl = _useContext.BaseUrl;
2303  return Object(jsx_runtime["jsx"])("a", Object.assign({
2304    href: BaseUrl
2305  }, {
2306    children: Object(jsx_runtime["jsx"])("img", {
2307      src: "https://assets.cookfood.net/cook_plain_coregreen.svg",
2308      alt: ""
2309    })
2310  }));
2311}
2312// EXTERNAL MODULE: ./node_modules/@n8tb1t/use-scroll-position/lib/index.js
2313var lib = __webpack_require__(590);
2314
2315// EXTERNAL MODULE: ./React/Header/Components/HeaderTemplate.module.scss
2316var HeaderTemplate_module = __webpack_require__(275);
2317var HeaderTemplate_module_default = /*#__PURE__*/__webpack_require__.n(HeaderTemplate_module);
2318
2319// EXTERNAL MODULE: ./React/Common/Hooks/WindowDimensions.tsx
2320var WindowDimensions = __webpack_require__(21);
2321
2322// EXTERNAL MODULE: ./node_modules/debounce/index.js
2323var debounce = __webpack_require__(60);
2324
2325// EXTERNAL MODULE: ./React/Common/Helpers/http.tsx
2326var Helpers_http = __webpack_require__(13);
2327
2328// EXTERNAL MODULE: ./React/Header/Components/search/SearchInput.module.scss
2329var SearchInput_module = __webpack_require__(324);
2330var SearchInput_module_default = /*#__PURE__*/__webpack_require__.n(SearchInput_module);
2331
2332// CONCATENATED MODULE: ./React/Header/Components/search/SearchInput.tsx
2333
2334
2335
2336var SearchInput = /*#__PURE__*/react["forwardRef"](function (props, ref) {
2337  var handleOnChange = function handleOnChange(e) {
2338    props.onChange(e.target.value);
2339  };
2340  var handleClearValue = function handleClearValue() {
2341    props.onChange('');
2342  };
2343  var handleSubmit = function handleSubmit() {
2344    window.location.href = "https://www.cookfood.net/search/?search=".concat(encodeURIComponent(props.value));
2345  };
2346  var handleKeyDown = function handleKeyDown(event) {
2347    switch (event.key) {
2348      case "ArrowDown":
2349        event.preventDefault();
2350        props.navigateResultsList(1);
2351        break;
2352      case "ArrowUp":
2353        event.preventDefault();
2354        props.navigateResultsList(-1);
2355        break;
2356      case "Enter":
2357        if (props.showResults && props.activeIndex >= 0 && props.activeIndex < props.searchMatches.length) {
2358          event.preventDefault();
2359          props.onSelect(props.searchMatches[props.activeIndex]);
2360        } else {
2361          event.preventDefault();
2362        }
2363        break;
2364      case "Escape":
2365        props.showResultsList(false);
2366        break;
2367    }
2368  };
2369  if (!props.isHidden) {
2370    return Object(jsx_runtime["jsxs"])("form", Object.assign({
2371      className: SearchInput_module_default.a.SearchWrapper,
2372      action: "https://www.cookfood.net/search/",
2373      role: "search",
2374      "aria-label": "Site search"
2375    }, {
2376      children: [Object(jsx_runtime["jsx"])("input", {
2377        ref: ref,
2378        autoComplete: "off",
2379        className: SearchInput_module_default.a.SearchField,
2380        placeholder: "Search our Frozen Meals and Puddings",
2381        type: "text",
2382        onFocus: props.onFocus,
2383        onBlur: props.onBlur,
2384        value: props.value,
2385        onChange: handleOnChange,
2386        onKeyDown: handleKeyDown,
2387        onSubmit: handleSubmit,
2388        role: "combobox",
2389        "aria-expanded": props.showResults,
2390        "aria-controls": props.showResults ? props.listboxID : undefined,
2391        "aria-activedescendant": props.showResults && props.activeIndex >= 0 ? "".concat(props.listboxID, "-").concat(props.activeIndex) : undefined,
2392        "aria-autocomplete": "list",
2393        "aria-label": "Search COOK frozen meals and puddings",
2394        name: "search"
2395      }), Object(jsx_runtime["jsx"])("button", {
2396        type: "button",
2397        "aria-label": "Submit search",
2398        className: SearchInput_module_default.a.SearchButton
2399      }), props.value.length > 0 && Object(jsx_runtime["jsx"])("button", Object.assign({
2400        onClick: handleClearValue,
2401        type: "button",
2402        className: SearchInput_module_default.a.CancelButton,
2403        "aria-label": "Clear search"
2404      }, {
2405        children: "x"
2406      }))]
2407    }));
2408  }
2409});
2410/* harmony default export */ var search_SearchInput = (SearchInput);
2411// EXTERNAL MODULE: ./React/Header/Components/search/SearchBoxMessage.module.scss
2412var SearchBoxMessage_module = __webpack_require__(591);
2413var SearchBoxMessage_module_default = /*#__PURE__*/__webpack_require__.n(SearchBoxMessage_module);
2414
2415// EXTERNAL MODULE: ./React/Header/Components/search/SearchBoxMessage.B.module.scss
2416var SearchBoxMessage_B_module = __webpack_require__(592);
2417var SearchBoxMessage_B_module_default = /*#__PURE__*/__webpack_require__.n(SearchBoxMessage_B_module);
2418
2419// EXTERNAL MODULE: ./React/Common/Features/variantContext.tsx
2420var variantContext = __webpack_require__(14);
2421
2422// EXTERNAL MODULE: ./React/Common/Features/variants.tsx
2423var variants = __webpack_require__(18);
2424
2425// CONCATENATED MODULE: ./React/Header/Components/search/SearchBoxMessage.tsx
2426
2427
2428
2429
2430
2431function SearchBoxMessage(_ref) {
2432  var text = _ref.text;
2433  var Styles = Object(variantContext["b" /* useVariant */])(variants["a" /* Variants */].Search_Bar_Upselling_Updates) ? SearchBoxMessage_B_module_default.a : SearchBoxMessage_module_default.a;
2434  return Object(jsx_runtime["jsx"])("div", Object.assign({
2435    className: Styles.SearchBoxMessage
2436  }, {
2437    children: text
2438  }));
2439}
2440// CONCATENATED MODULE: ./React/Header/Components/search/SearchResultsEmpty.tsx
2441
2442
2443function SearchResultsEmpty() {
2444  return Object(jsx_runtime["jsx"])(SearchBoxMessage, {
2445    text: 'Start typing to search'
2446  });
2447}
2448// EXTERNAL MODULE: ./React/Header/Components/search/SearchResultItem.module.scss
2449var SearchResultItem_module = __webpack_require__(167);
2450var SearchResultItem_module_default = /*#__PURE__*/__webpack_require__.n(SearchResultItem_module);
2451
2452// CONCATENATED MODULE: ./React/Header/Components/search/SearchResultCategory.tsx
2453
2454
2455function SearchResultCategory(props) {
2456  return Object(jsx_runtime["jsx"])("li", Object.assign({
2457    id: props.Id,
2458    role: "option",
2459    "aria-selected": !!props.IsActive,
2460    className: props.IsActive ? SearchResultItem_module_default.a.active : undefined
2461  }, {
2462    children: Object(jsx_runtime["jsxs"])("a", Object.assign({
2463      href: "/Product/LogSearchItemClicked?redirectURL=".concat(props.URL, "&searchPosition=").concat(props.Index, "&imageURL=").concat(props.ImageURL, "&resultType=Category")
2464    }, {
2465      children: [Object(jsx_runtime["jsx"])("img", {
2466        src: props.ImageURL,
2467        alt: props.Title
2468      }), Object(jsx_runtime["jsx"])("div", Object.assign({
2469        className: SearchResultItem_module_default.a.Content
2470      }, {
2471        children: Object(jsx_runtime["jsx"])("p", Object.assign({
2472          className: SearchResultItem_module_default.a.ProductName
2473        }, {
2474          children: props.Title
2475        }))
2476      }))]
2477    }))
2478  }));
2479}
2480// CONCATENATED MODULE: ./React/Header/Components/search/SearchResultItem.tsx
2481
2482
2483function SearchResultItem(props) {
2484  return Object(jsx_runtime["jsx"])("li", Object.assign({
2485    id: props.Id,
2486    role: "option",
2487    "aria-label": props.Title,
2488    "aria-selected": !!props.IsActive,
2489    className: props.IsActive ? SearchResultItem_module_default.a.active : undefined
2490  }, {
2491    children: Object(jsx_runtime["jsxs"])("a", Object.assign({
2492      href: "/Product/LogSearchItemClicked?redirectURL=".concat(props.URL, "&searchPosition=").concat(props.Index, "&imageURL=").concat(props.ImageURL, "&resultType=Product")
2493    }, {
2494      children: [Object(jsx_runtime["jsx"])("img", {
2495        src: props.ImageURL,
2496        alt: props.Title
2497      }), Object(jsx_runtime["jsxs"])("div", Object.assign({
2498        className: SearchResultItem_module_default.a.Content
2499      }, {
2500        children: [Object(jsx_runtime["jsx"])("p", Object.assign({
2501          className: SearchResultItem_module_default.a.ProductName
2502        }, {
2503          children: props.Title
2504        })), props.FromPrice > 0 ? Object(jsx_runtime["jsxs"])("p", Object.assign({
2505          className: SearchResultItem_module_default.a.PriceRange
2506        }, {
2507          children: ["From \xA3", props.FromPrice.toFixed(2)]
2508        })) : null, Object(jsx_runtime["jsx"])("div", {
2509          className: SearchResultItem_module_default.a.Symbols
2510        })]
2511      }))]
2512    }))
2513  }));
2514}
2515// EXTERNAL MODULE: ./React/Header/Components/search/SearchResultsMore.module.scss
2516var SearchResultsMore_module = __webpack_require__(593);
2517var SearchResultsMore_module_default = /*#__PURE__*/__webpack_require__.n(SearchResultsMore_module);
2518
2519// EXTERNAL MODULE: ./React/Header/Components/search/SearchResultsMore.B.module.scss
2520var SearchResultsMore_B_module = __webpack_require__(594);
2521var SearchResultsMore_B_module_default = /*#__PURE__*/__webpack_require__.n(SearchResultsMore_B_module);
2522
2523// CONCATENATED MODULE: ./React/Header/Components/search/SearchResultsMore.tsx
2524
2525
2526
2527
2528
2529
2530
2531
2532function SearchResultsMore(props) {
2533  var _useContext = Object(react["useContext"])(HeaderContext["a" /* HeaderContext */]),
2534    BaseUrl = _useContext.BaseUrl;
2535  var Styles = Object(variantContext["b" /* useVariant */])(variants["a" /* Variants */].Search_Bar_Upselling_Updates) ? SearchResultsMore_B_module_default.a : SearchResultsMore_module_default.a;
2536  function redirectToSearchResult(redirectURL, searchPosition, imageURL, resultType) {
2537    var queryString = new URLSearchParams({
2538      redirectURL: redirectURL,
2539      searchPosition: searchPosition.toString(),
2540      imageURL: imageURL,
2541      resultType: resultType
2542    }).toString();
2543    window.location.href = "/Product/LogSearchItemClicked?".concat(queryString);
2544  }
2545  return Object(jsx_runtime["jsxs"])(StandardLinkButton["a" /* default */], Object.assign({
2546    onClick: function onClick() {
2547      redirectToSearchResult("".concat(BaseUrl, "search?search=").concat(props.searchTerm), 0, "No Image", "View More");
2548    },
2549    className: Styles.SearchResultsMore,
2550    type: "secondary",
2551    "aria-label": "More search results"
2552  }, {
2553    children: ["More Results ", Object(jsx_runtime["jsx"])("span", {})]
2554  }));
2555}
2556// EXTERNAL MODULE: ./React/Common/Components/SubHeader.tsx
2557var SubHeader = __webpack_require__(41);
2558
2559// EXTERNAL MODULE: ./React/Header/Components/search/SearchResultsFound.module.scss
2560var SearchResultsFound_module = __webpack_require__(595);
2561var SearchResultsFound_module_default = /*#__PURE__*/__webpack_require__.n(SearchResultsFound_module);
2562
2563// EXTERNAL MODULE: ./React/Header/Components/search/SearchResultsFound.B.module.scss
2564var SearchResultsFound_B_module = __webpack_require__(596);
2565var SearchResultsFound_B_module_default = /*#__PURE__*/__webpack_require__.n(SearchResultsFound_B_module);
2566
2567// CONCATENATED MODULE: ./React/Header/Components/search/SearchResultsFound.tsx
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577function SearchResultsFound(props) {
2578  var resultsSize = 5;
2579  var searchResultListing = props.searchResults.slice(0, resultsSize).map(function (result, index) {
2580    return result.Type == 0 ? Object(jsx_runtime["jsx"])(SearchResultItem, Object.assign({}, result, {
2581      Index: index,
2582      Id: "".concat(props.listboxID, "-").concat(index),
2583      IsActive: index === props.activeIndex
2584    }), index) : Object(jsx_runtime["jsx"])(SearchResultCategory, Object.assign({}, result, {
2585      Index: index,
2586      Id: "".concat(props.listboxID, "-").concat(index),
2587      IsActive: index === props.activeIndex
2588    }), index);
2589  });
2590  var resultsLength = props.searchResults.length;
2591  var searchResultsStyle = Object.assign(Object.assign({}, props.style), {
2592    maxHeight: "calc(100vh - 230px)"
2593  });
2594  var isRecommended = props.searchTerm.length === 0;
2595  var Styles = Object(variantContext["b" /* useVariant */])(variants["a" /* Variants */].Search_Bar_Upselling_Updates) ? SearchResultsFound_B_module_default.a : SearchResultsFound_module_default.a;
2596  return Object(jsx_runtime["jsxs"])("div", Object.assign({
2597    className: isRecommended ? null : Styles.Container
2598  }, {
2599    children: [isRecommended ? Object(jsx_runtime["jsx"])(SubHeader["a" /* default */], {
2600      text: "Our best-selling meals",
2601      className: Styles.SearchBarUpsellingText
2602    }) : null, Object(jsx_runtime["jsx"])("ul", Object.assign({
2603      style: searchResultsStyle
2604    }, {
2605      children: searchResultListing
2606    })), !isRecommended && resultsLength > resultsSize ? Object(jsx_runtime["jsx"])(SearchResultsMore, {
2607      searchTerm: props.searchTerm
2608    }) : null]
2609  }));
2610}
2611// CONCATENATED MODULE: ./React/Header/Components/search/SearchResultsNone.tsx
2612
2613
2614function SearchResultsNone() {
2615  return Object(jsx_runtime["jsx"])(SearchBoxMessage, {
2616    text: 'Sorry, no products found'
2617  });
2618}
2619// EXTERNAL MODULE: ./React/Header/Components/search/SearchResults.module.scss
2620var SearchResults_module = __webpack_require__(597);
2621var SearchResults_module_default = /*#__PURE__*/__webpack_require__.n(SearchResults_module);
2622
2623// EXTERNAL MODULE: ./React/Header/Components/search/SearchResults.B.module.scss
2624var SearchResults_B_module = __webpack_require__(598);
2625var SearchResults_B_module_default = /*#__PURE__*/__webpack_require__.n(SearchResults_B_module);
2626
2627// CONCATENATED MODULE: ./React/Header/Components/search/SearchResultsSearching.tsx
2628
2629
2630function SearchResultsSearching() {
2631  return Object(jsx_runtime["jsx"])(SearchBoxMessage, {
2632    text: 'Searching...'
2633  });
2634}
2635// CONCATENATED MODULE: ./React/Header/Components/search/SearchResults.tsx
2636function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
2637function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
2638function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
2639function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
2640function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
2641function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652function SearchResults(props) {
2653  var _useState = Object(react["useState"])(false),
2654    _useState2 = _slicedToArray(_useState, 2),
2655    showResults = _useState2[0],
2656    setShowResults = _useState2[1];
2657  var showUpselling = Object(variantContext["b" /* useVariant */])(variants["a" /* Variants */].Search_Bar_Upselling_Updates);
2658  var Styles = showUpselling ? SearchResults_B_module_default.a : SearchResults_module_default.a;
2659  function getSearchDisplay() {
2660    if (props.isSearching) {
2661      return Object(jsx_runtime["jsx"])(SearchResultsSearching, {});
2662    }
2663    if (props.searchTerm.length === 0) {
2664      if (props.searchResults.length > 0 && showUpselling) {
2665        return Object(jsx_runtime["jsx"])(SearchResultsFound, Ob
2665ject.assign({
2666          onSelect: props.onSelect,
2667          style: {
2668            opacity: props.isSearching ? 0.5 : 1
2669          }
2670        }, props));
2671      } else {
2672        return Object(jsx_runtime["jsx"])(SearchResultsEmpty, {});
2673      }
2674    } else {
2675      if (props.searchResults.length === 0) {
2676        return Object(jsx_runtime["jsx"])(SearchResultsNone, {});
2677      } else {
2678        return Object(jsx_runtime["jsx"])(SearchResultsFound, Object.assign({
2679          style: {
2680            opacity: props.isSearching ? 0.5 : 1
2681          }
2682        }, props));
2683      }
2684    }
2685  }
2686  return Object(jsx_runtime["jsx"])("div", Object.assign({
2687    className: Styles.SearchResults,
2688    onMouseEnter: props.onMouseEnter,
2689    onMouseLeave: props.onMouseLeave
2690  }, {
2691    children: Object(jsx_runtime["jsx"])("div", Object.assign({
2692      className: Styles.Container,
2693      id: props.listboxID,
2694      role: "listbox",
2695      "aria-label": "Search Suggestions"
2696    }, {
2697      children: getSearchDisplay()
2698    }))
2699  }));
2700}
2701// EXTERNAL MODULE: ./React/Header/Components/search/SearchBox.module.scss
2702var SearchBox_module = __webpack_require__(387);
2703var SearchBox_module_default = /*#__PURE__*/__webpack_require__.n(SearchBox_module);
2704
2705// CONCATENATED MODULE: ./React/Header/Components/search/SearchBoxPure.tsx
2706
2707
2708
2709
2710
2711var SearchBoxPure = /*#__PURE__*/react["forwardRef"](function (props, ref) {
2712  if (!props.isHidden) {
2713    return Object(jsx_runtime["jsx"])(jsx_runtime["Fragment"], {
2714      children: Object(jsx_runtime["jsxs"])("div", Object.assign({
2715        className: SearchBox_module_default.a.SearchBoxOuter
2716      }, {
2717        children: [Object(jsx_runtime["jsx"])("div", {
2718          className: SearchBox_module_default.a.SearchBoxBackground
2719        }), Object(jsx_runtime["jsxs"])("div", Object.assign({
2720          className: SearchBox_module_default.a.SearchBox
2721        }, {
2722          children: [Object(jsx_runtime["jsx"])(search_SearchInput, {
2723            ref: ref,
2724            onBlur: props.onBlur,
2725            onFocus: props.onFocus,
2726            onChange: props.onSearchTermChange,
2727            value: props.searchTerm,
2728            isHidden: false,
2729            navigateResultsList: props.navigateResultsList,
2730            showResultsList: props.showResultsList,
2731            showResults: props.showResults,
2732            activeIndex: props.activeIndex,
2733            onSelect: props.onSelect,
2734            searchMatches: props.searchMatches,
2735            listboxID: props.listboxID
2736          }), props.showResults ? Object(jsx_runtime["jsx"])(SearchResults, {
2737            isSearching: props.isSearching,
2738            searchResults: props.searchMatches,
2739            searchTerm: props.searchTerm,
2740            onMouseEnter: props.onMouseEnter,
2741            onMouseLeave: props.onMouseLeave,
2742            activeIndex: props.activeIndex,
2743            onActiveIndexChange: props.onActiveIndexChange,
2744            onSelect: props.onSelect,
2745            listboxID: props.listboxID
2746          }) : null]
2747        }))]
2748      }))
2749    });
2750  } else {
2751    return null;
2752  }
2753});
2754/* harmony default export */ var search_SearchBoxPure = (SearchBoxPure);
2755// EXTERNAL MODULE: ./React/Common/Helpers/externalEvents.tsx
2756var externalEvents = __webpack_require__(48);
2757
2758// EXTERNAL MODULE: ./node_modules/uuid/index.js
2759var uuid = __webpack_require__(131);
2760
2761// CONCATENATED MODULE: ./React/Header/Components/search/SearchBoxSmart.tsx
2762function _regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return _regeneratorDefine2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i["return"]) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf;
2762 var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine2(u), _regeneratorDefine2(u, o, "Generator"), _regeneratorDefine2(u, n, function () { return this; }), _regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (_regenerator = function _regenerator() { return { w: i, m: f }; })(); }
2763function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { if (r) i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n;else { var o = function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); }; o("next", 0), o("throw", 1), o("return", 2); } }, _regeneratorDefine2(e, r, n, t); }
2764function SearchBoxSmart_slicedToArray(r, e) { return SearchBoxSmart_arrayWithHoles(r) || SearchBoxSmart_iterableToArrayLimit(r, e) || SearchBoxSmart_unsupportedIterableToArray(r, e) || SearchBoxSmart_nonIterableRest(); }
2765function SearchBoxSmart_nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
2766function SearchBoxSmart_unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return SearchBoxSmart_arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? SearchBoxSmart_arrayLikeToArray(r, a) : void 0; } }
2767function SearchBoxSmart_arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
2768function SearchBoxSmart_iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
2769function SearchBoxSmart_arrayWithHoles(r) { if (Array.isArray(r)) return r; }
2770var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
2771  function adopt(value) {
2772    return value instanceof P ? value : new P(function (resolve) {
2773      resolve(value);
2774    });
2775  }
2776  return new (P || (P = Promise))(function (resolve, reject) {
2777    function fulfilled(value) {
2778      try {
2779        step(generator.next(value));
2780      } catch (e) {
2781        reject(e);
2782      }
2783    }
2784    function rejected(value) {
2785      try {
2786        step(generator["throw"](value));
2787      } catch (e) {
2788        reject(e);
2789      }
2790    }
2791    function step(result) {
2792      result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
2793    }
2794    step((generator = generator.apply(thisArg, _arguments || [])).next());
2795  });
2796};
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808var RecommendedCacheKey = "search:recommended";
2809var RecommendedCacheKeyTTL = 24 * 60 * 60 * 1000; //24hours
2810var SearchBoxSmart = /*#__PURE__*/react["forwardRef"](function (props, ref) {
2811  var _useState = Object(react["useState"])(false),
2812    _useState2 = SearchBoxSmart_slicedToArray(_useState, 2),
2813    showResults = _useState2[0],
2814    setShowResults = _useState2[1];
2815  var _useState3 = Object(react["useState"])(""),
2816    _useState4 = SearchBoxSmart_slicedToArray(_useState3, 2),
2817    searchTerm = _useState4[0],
2818    setSearchTerm = _useState4[1];
2819  var _useState5 = Object(react["useState"])(false),
2820    _useState6 = SearchBoxSmart_slicedToArray(_useState5, 2),
2821    isFocussed = _useState6[0],
2822    setIsFocussed = _useState6[1];
2823  var _useState7 = Object(react["useState"])(false),
2824    _useState8 = SearchBoxSmart_slicedToArray(_useState7, 2),
2825    isHovered = _useState8[0],
2826    setIsHovered = _useState8[1];
2827  var _useState9 = Object(react["useState"])(false),
2828    _useState0 = SearchBoxSmart_slicedToArray(_useState9, 2),
2829    isHidden = _useState0[0],
2830    SetIsHidden = _useState0[1];
2831  var _useContext = Object(react["useContext"])(HeaderContext["a" /* HeaderContext */]),
2832    BaseUrl = _useContext.BaseUrl;
2833  var http = Object(Helpers_http["a" /* getHttpInstance */])(BaseUrl);
2834  var _useState1 = Object(react["useState"])(0),
2835    _useState10 = SearchBoxSmart_slicedToArray(_useState1, 2),
2836    latestRequestId = _useState10[0],
2837    setLatestRequestId = _useState10[1];
2838  var _useState11 = Object(react["useState"])([]),
2839    _useState12 = SearchBoxSmart_slicedToArray(_useState11, 2),
2840    searchMatches = _useState12[0],
2841    setSearchMatches = _useState12[1];
2842  var _useState13 = Object(react["useState"])(false),
2843    _useState14 = SearchBoxSmart_slicedToArray(_useState13, 2),
2844    isSearching = _useState14[0],
2845    setIsSearching = _useState14[1];
2846  var _useState15 = Object(react["useState"])(function () {
2847      return Object(uuid["v4"])();
2848    }),
2849    _useState16 = SearchBoxSmart_slicedToArray(_useState15, 1),
2850    sessionGUID = _useState16[0];
2851  var _useState17 = Object(react["useState"])([]),
2852    _useState18 = SearchBoxSmart_slicedToArray(_useState17, 2),
2853    recommended = _useState18[0],
2854    setRecommended = _useState18[1];
2855  var requestSeqRef = Object(react["useRef"])(0);
2856  var activeRequestIdRef = Object(react["useRef"])(0);
2857  var searchTermRef = Object(react["useRef"])("");
2858  var debounceRef = Object(react["useRef"])(null);
2859  var showUpselling = Object(variantContext["b" /* useVariant */])(variants["a" /* Variants */].Search_Bar_Upselling_Updates);
2860  var _useState19 = Object(react["useState"])(-1),
2861    _useState20 = SearchBoxSmart_slicedToArray(_useState19, 2),
2862    activeIndex = _useState20[0],
2863    setActiveIndex = _useState20[1];
2864  var listboxID = "searchSuggestionListBox";
2865  Object(react["useEffect"])(function () {
2866    if (activeIndex >= searchMatches.length) setActiveIndex(searchMatches.length ? 0 : -1);
2867  }, [searchMatches, activeIndex]);
2868  var _showResultsList = function showResultsList(open) {
2869    setShowResults(open);
2870    if (!open) setActiveIndex(-1);
2871  };
2872  var _navigateResultsList = function navigateResultsList(direction) {
2873    if (!searchMatches.length) return;
2874    setShowResults(true);
2875    setActiveIndex(function (current) {
2876      if (current < 0) return direction > 0 ? 0 : searchMatches.length - 1;
2877      return (current + direction + searchMatches.length) % searchMatches.length;
2878    });
2879  };
2880  var onSelect = function onSelect(item) {
2881    var _a, _b;
2882    _showResultsList(false);
2883    var resultType = item.Type === 0 ? "Product" : "Category";
2884    var url = "/Product/LogSearchItemClicked?redirectURL=".concat(encodeURIComponent(item.URL), "&searchPosition=").concat(encodeURIComponent(String((_a = item.Index) !== null && _a !== void 0 ? _a : 0)), "&imageURL=").concat(encodeURIComponent((_b = item.ImageURL) !== null && _b !== void 0 ? _b : ""), "&resultType=").concat(resultType);
2885    window.location.href = url;
2886  };
2887  Object(react["useEffect"])(function () {
2888    searchTermRef.current = searchTerm;
2889  }, [searchTerm]);
2890  Object(react["useEffect"])(function () {
2891    debounceRef.current = Object(debounce["debounce"])(handleSearch, 300);
2892    return function () {
2893      // debounceRef.current?.clear?.();
2894    };
2895  }, []);
2896  //caching
2897  Object(react["useEffect"])(function () {
2898    if (showUpselling) {
2899      var fromCache = localStorage.getItem(RecommendedCacheKey);
2900      if (fromCache) {
2901        try {
2902          var parsed = JSON.parse(fromCache);
2903          if (Date.now() - parsed.ts < RecommendedCacheKeyTTL && Array.isArray(parsed.data)) {
2904            setRecommended(parsed.data);
2905            //prefill if user hasnt started typing
2906            if (searchTermRef.current === "") setSearchMatches(parsed.data);
2907          }
2908        } catch (e) {
2909          console.error(e);
2910        }
2911      } else {
2912        //grab data
2913        (function () {
2914          return __awaiter(void 0, void 0, void 0, /*#__PURE__*/_regenerator().m(function _callee() {
2915            var _a, result, toCache, _t;
2916            return _regenerator().w(function (_context) {
2917              while (1) switch (_context.n) {
2918                case 0:
2919                  _context.p = 0;
2920                  _context.n = 1;
2921                  return http.post("Product/GetSearchBarRecommendations");
2922                case 1:
2923                  result = _context.v;
2924                  if ((_a = result === null || result === void 0 ? void 0 : result.data) === null || _a === void 0 ? void 0 : _a.Results) {
2925                    setRecommended(result.data.Results);
2926                    //set cache
2927                    toCache = {
2928                      data: result.data.Results,
2929                      ts: Date.now()
2930                    };
2931                    localStorage.setItem(RecommendedCacheKey, JSON.stringify(toCache));
2932                    //if user hasnt started typing show the results:
2933                    if (!searchTerm) setSearchMatches(result.data.Results);
2934                    //and if the searchbox is empty
2935                    if (searchTermRef.current === "") setSearchMatches(result.data.Results);
2936                  }
2937                  _context.n = 3;
2938                  break;
2939                case 2:
2940                  _context.p = 2;
2941                  _t = _context.v;
2942                  console.error(_t);
2943                case 3:
2944                  return _context.a(2);
2945              }
2946            }, _callee, null, [[0, 2]]);
2947          }));
2948        })();
2949      }
2950    }
2951  }, []);
2952  var handleSearch = function handleSearch(searchTerm, requestId) {
2953    console.log("search term: '" + searchTerm + "'");
2954    var getData = function getData(requestId) {
2955      return __awaiter(void 0, void 0, void 0, /*#__PURE__*/_regenerator().m(function _callee2() {
2956        var screenData, payload, result, _t2;
2957        return _regenerator().w(function (_context2) {
2958          while (1) switch (_context2.n) {
2959            case 0:
2960              if (!(requestId !== activeRequestIdRef.current)) {
2961                _context2.n = 1;
2962                break;
2963              }
2964              return _context2.a(2);
2965            case 1:
2966              if (searchTerm) {
2967                _context2.n = 2;
2968                break;
2969              }
2970              setSearchMatches(recommended);
2971              setIsSearching(false);
2972              return _context2.a(2);
2973            case 2:
2974              _context2.p = 2;
2975              Object(externalEvents["c" /* pushToDataLayer */])('GAEvent', 'Header', 'Debounced Search', searchTerm);
2976              screenData = {
2977                width: window.innerWidth,
2978                height: window.innerHeight,
2979                sessionID: sessionGUID,
2980                currentPage: window.location.href
2981              };
2982              if (!(screenData.width != null && screenData.height != null && screenData.sessionID != null)) {
2983                _context2.n = 3;
2984                break;
2985              }
2986              _context2.n = 3;
2987              return http.post('Product/LogUserSearchDetails/', screenData);
2988            case 3:
2989              payload = {
2990                search: searchTerm,
2991                SID: requestId,
2992                sessionGuid: sessionGUID
2993              };
2994              _context2.n = 4;
2995              return http.post('Product/SuggestSearch/', payload);
2996            case 4:
2997              result = _context2.v;
2998              if (!result.data) {
2999                console.log("no data for suggest");
3000              } else if (result.data.SID === requestId && requestId === activeRequestIdRef.current && searchTermRef.current !== "") {
3001                setSearchMatches(result.data.Results);
3002              }
3003              _context2.n = 6;
3004              break;
3005            case 5:
3006              _context2.p = 5;
3007              _t2 = _context2.v;
3008              console.log(_t2);
3009            case 6:
3010              setIsSearching(false);
3011            case 7:
3012              return _context2.a(2);
3013          }
3014        }, _callee2, null, [[2, 5]]);
3015      }));
3016    };
3017    getData(requestId);
3018  };
3019  var debounceSearch = Object(react["useCallback"])(Object(debounce["debounce"])(handleSearch, 300), []);
3020  var handleSearchTermChange = function handleSearchTermChange(value) {
3021    setSearchTerm(value);
3022    //bump sequence for every change
3023    requestSeqRef.current += 1;
3024    var nextRequestId = requestSeqRef.current;
3025    activeRequestIdRef.current = nextRequestId;
3026    //if set to empty (backspacing etc) then cancel any current requests and show current recommendations
3027    if (value === "") {
3028      setIsSearching(false);
3029      setSearchMatches(recommended);
3030      return;
3031    }
3032    setIsSearching(true);
3033    setLatestRequestId(nextRequestId);
3034    debounceSearch(value, nextRequestId);
3035  };
3036  var handleShowResults = function handleShowResults(focussed, hovered, searchTerm) {
3037    var doShowResults = focussed || (/*searchTerm.trim().length > 0 &&*/hovered);
3038    setShowResults(doShowResults);
3039    if (doShowResults && !searchTerm && recommended.length) {
3040      setSearchMatches(recommended);
3041    }
3042  };
3043  var handleFocus = function handleFocus(focussed) {
3044    setIsFocussed(focussed);
3045    handleShowResults(focussed, isHovered, searchTerm);
3046  };
3047  var handleMouse = function handleMouse(hover) {
3048    setIsHovered(hover);
3049    handleShowResults(isFocussed, hover, searchTerm);
3050  };
3051  var handleHidden = function handleHidden(hidden) {
3052    SetIsHidden(hidden);
3053  };
3054  return Object(jsx_runtime["jsx"])(search_SearchBoxPure, {
3055    ref: ref,
3056    isFocussed: isFocussed,
3057    isHovered: isHovered,
3058    isHidden: isHidden,
3059    isSearching: isSearching,
3060    onBlur: function onBlur() {
3061      return handleFocus(false);
3062    },
3063    onFocus: function onFocus() {
3064      return handleFocus(true);
3065    },
3066    onMouseEnter: function onMouseEnter() {
3067      return handleMouse(true);
3068    },
3069    onMouseLeave: function onMouseLeave() {
3070      return handleMouse(false);
3071    },
3072    onSearchTermChange: function onSearchTermChange(value) {
3073      return handleSearchTermChange(value);
3074    },
3075    searchMatches: searchMatches,
3076    searchTerm: searchTerm,
3077    showResults: showResults,
3078    onSelect: onSelect,
3079    activeIndex: activeIndex,
3080    listboxID: listboxID,
3081    onActiveIndexChange: setActiveIndex,
3082    navigateResultsList: function navigateResultsList(value) {
3083      return _navigateResultsList(value);
3084    },
3085    showResultsList: function showResultsList(value) {
3086      return _showResultsList(value);
3087    }
3088  });
3089});
3090/* harmony default export */ var search_SearchBoxSmart = (SearchBoxSmart);
3091// CONCATENATED MODULE: ./React/Header/Components/search/HeaderSearch.tsx
3092
3093
3094
3095function HeaderSearch(props) {
3096  return Object(jsx_runtime["jsx"])(search_SearchBoxSmart, {});
3097}
3098// EXTERNAL MODULE: ./React/Header/Components/Navigation/Desktop/DesktopNavigationContainer.module.scss
3099var DesktopNavigationContainer_module = __webpack_require__(456);
3100var DesktopNavigationContainer_module_default = /*#__PURE__*/__webpack_require__.n(DesktopNavigationContainer_module);
3101
3102// EXTERNAL MODULE: ./React/Header/Components/Navigation/Desktop/DesktopNavigation.module.scss
3103var DesktopNavigation_module = __webpack_require__(599);
3104var DesktopNavigation_module_default = /*#__PURE__*/__webpack_require__.n(DesktopNavigation_module);
3105
3106// EXTERNAL MODULE: ./React/Header/Components/Navigation/Desktop/Dropdown/DropdownColumnLink.module.scss
3107var DropdownColumnLink_module = __webpack_require__(600);
3108var DropdownColumnLink_module_default = /*#__PURE__*/__webpack_require__.n(DropdownColumnLink_module);
3109
3110// CONCATENATED MODULE: ./React/Header/Components/Navigation/Desktop/Dropdown/DropdownColumnLink.tsx
3111
3112
3113function DropdownColumnLink(props) {
3114  var className = !!props.className ? props.className : '';
3115  return Object(jsx_runtime["jsx"])("li", Object.assign({
3116    className: "".concat(DropdownColumnLink_module_default.a.ColumnLink, " ").concat(className)
3117  }, {
3118    children: Object(jsx_runtime["jsx"])("a", Object.assign({
3119      href: props.HRef
3120    }, {
3121      children: props.Title
3122    }))
3123  }));
3124}
3125// EXTERNAL MODULE: ./React/Header/Components/Navigation/Desktop/Dropdown/DropdownColumn.module.scss
3126var DropdownColumn_module = __webpack_require__(601);
3127var DropdownColumn_module_default = /*#__PURE__*/__webpack_require__.n(DropdownColumn_module);
3128
3129// EXTERNAL MODULE: ./React/Header/Components/Navigation/Desktop/Dropdown/DropdownColumnHeader.module.scss
3130var DropdownColumnHeader_module = __webpack_require__(602);
3131var DropdownColumnHeader_module_default = /*#__PURE__*/__webpack_require__.n(DropdownColumnHeader_module);
3132
3133// CONCATENATED MODULE: ./React/Header/Components/Navigation/Desktop/Dropdown/DropdownColumnHeader.tsx
3134
3135
3136
3137function DropdownColumnHeader(props) {
3138  return Object(jsx_runtime["jsx"])(DropdownColumnLink, Object.assign({}, props, {
3139    className: DropdownColumnHeader_module_default.a.ColumnHeader
3140  }));
3141}
3142// CONCATENATED MODULE: ./React/Header/Components/Navigation/Desktop/Dropdown/DropdownColumn.tsx
3143
3144
3145
3146
3147function DropdownColumn(props) {
3148  var _a;
3149  return Object(jsx_runtime["jsxs"])("ul", Object.assign({
3150    className: DropdownColumn_module_default.a.Column
3151  }, {
3152    children: [Object(jsx_runtime["jsx"])(DropdownColumnHeader, Object.assign({}, props.sublink)), (_a = props.sublink.SubLinks) === null || _a === void 0 ? void 0 : _a.map(function (item, index) {
3153      return Object(jsx_runtime["jsx"])(DropdownColumnLink, Object.assign({}, item), index);
3154    })]
3155  }));
3156}
3157// EXTERNAL MODULE: ./React/Header/Components/Navigation/Desktop/Dropdown/Dropdown.module.scss
3158var Dropdown_module = __webpack_require__(457);
3159var Dropdown_module_default = /*#__PURE__*/__webpack_require__.n(Dropdown_module);
3160
3161// EXTERNAL MODULE: ./React/Header/Components/Navigation/Desktop/Dropdown/DropdownPromo.module.scss
3162var DropdownPromo_module = __webpack_require__(603);
3163var DropdownPromo_module_default = /*#__PURE__*/__webpack_require__.n(DropdownPromo_module);
3164
3165// CONCATENATED MODULE: ./React/Header/Components/Navigation/Desktop/Dropdown/DropdownPromo.tsx
3166
3167
3168function DropdownPromo(props) {
3169  return Object(jsx_runtime["jsx"])("div", {
3170    className: DropdownPromo_module_default.a.DropdownPromo,
3171    dangerouslySetInnerHTML: {
3172      __html: props.promoContent
3173    }
3174  });
3175}
3176// CONCATENATED MODULE: ./React/Header/Components/Navigation/Desktop/Dropdown/Dropdown.tsx
3177
3178
3179
3180
3181function Dropdown(props) {
3182  if (!(props.SubLinks && props.SubLinks.length > 0)) {
3183    return null;
3184  }
3185  var handleChildClick = function handleChildClick(item) {};
3186  var dropdownItems = Object(jsx_runtime["jsx"])(jsx_runtime["Fragment"], {});
3187  if (props.TopLevelOnly) {
3188    dropdownItems = Object(jsx_runtime["jsxs"])(jsx_runtime["Fragment"], {
3189      children: [Object(jsx_runtime["jsx"])(DropdownColumn, {
3190        onChildClick: handleChildClick,
3191        sublink: props
3192      }), Object(jsx_runtime["jsx"])(DropdownPromo, {
3193        promoContent: props.PromoArea
3194      })]
3195    });
3196  } else {
3197    dropdownItems = Object(jsx_runtime["jsxs"])(jsx_runtime["Fragment"], {
3198      children: [props.SubLinks.map(function (item, index) {
3199        return Object(jsx_runtime["jsx"])(DropdownColumn, {
3200          onChildClick: handleChildClick,
3201          sublink: item
3202        }, index);
3203      }), Object(jsx_runtime["jsx"])(DropdownPromo, {
3204        promoContent: props.PromoArea
3205      })]
3206    });
3207  }
3208  return Object(jsx_runtime["jsx"])("div", Object.assign({
3209    className: "".concat(Dropdown_module_default.a.Dropdown, " ").concat(props.isOpen ? "open" : '')
3210  }, {
3211    children: Object(jsx_runtime["jsx"])("div", Object.assign({
3212      className: Dropdown_module_default.a.NavOuter
3213    }, {
3214      children: dropdownItems
3215    }))
3216  }));
3217}
3218// EXTERNAL MODULE: ./React/Header/Components/Navigation/Desktop/MainHeaderLinkItem.module.scss
3219var MainHeaderLinkItem_module = __webpack_require__(458);
3220var MainHeaderLinkItem_module_default = /*#__PURE__*/__webpack_require__.n(MainHeaderLinkItem_module);
3221
3222// CONCATENATED MODULE: ./React/Header/Components/Navigation/Desktop/MainHeaderLinkItem.tsx
3223function MainHeaderLinkItem_slicedToArray(r, e) { return MainHeaderLinkItem_arrayWithHoles(r) || MainHeaderLinkItem_iterableToArrayLimit(r, e) || MainHeaderLinkItem_unsupportedIterableToArray(r, e) || MainHeaderLinkItem_nonIterableRest(); }
3224function MainHeaderLinkItem_nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
3225function MainHeaderLinkItem_unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return MainHeaderLinkItem_arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? MainHeaderLinkItem_arrayLikeToArray(r, a) : void 0; } }
3226function MainHeaderLinkItem_arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
3227function MainHeaderLinkItem_iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
3228function MainHeaderLinkItem_arrayWithHoles(r) { if (Array.isArray(r)) return r; }
3229
3230
3231
3232
3233function MainHeaderLinkItem(props) {
3234  var _useState = Object(react["useState"])(0),
3235    _useState2 = MainHeaderLinkItem_slicedToArray(_useState, 2),
3236    clickCount = _useState2[0],
3237    setClickCount = _useState2[1];
3238  var handleOnClick = function handleOnClick(e) {
3239    if (props.SubLinks && props.SubLinks.length > 0) {
3240      if (clickCount == 0) {
3241        e.preventDefault();
3242        props.onClick();
3243        setClickCount(1);
3244      }
3245    }
3246  };
3247  var styles = {};
3248  //commented and not removed in case they want to set the colour again in future
3249  // if (props.Colour.length > 0)
3250  // {
3251  //     let colour = props.Colour;
3252  //     if (!colour.startsWith('#'))
3253  //     {
3254  //         colour = '#' + colour;
3255  //     }
3256  //     styles = {...styles, color:  colour};
3257  // }
3258  return Object(jsx_runtime["jsxs"])("li", Object.assign({
3259    className: "".concat(MainHeaderLinkItem_module_default.a.MainHeaderLinkItem, " parent-link")
3260  }, {
3261    children: [Object(jsx_runtime["jsx"])("a", Object.assign({
3262      style: styles,
3263      className: MainHeaderLinkItem_module_default.a.MainHeaderLink,
3264      href: props.HRef,
3265      onClick: handleOnClick
3266    }, {
3267      children: props.Title
3268    })), Object(jsx_runtime["jsx"])(Dropdown, Object.assign({}, props))]
3269  }));
3270}
3271// CONCATENATED MODULE: ./React/Header/Components/Navigation/Desktop/DesktopNavigation.tsx
3272function DesktopNavigation_slicedToArray(r, e) { return DesktopNavigation_arrayWithHoles(r) || DesktopNavigation_iterableToArrayLimit(r, e) || DesktopNavigation_unsupportedIterableToArray(r, e) || DesktopNavigation_nonIterableRest(); }
3273function DesktopNavigation_nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
3274function DesktopNavigation_unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return DesktopNavigation_arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? DesktopNavigation_arrayLikeToArray(r, a) : void 0; } }
3275function DesktopNavigation_arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
3276function DesktopNavigation_iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
3277function DesktopNavigation_arrayWithHoles(r) { if (Array.isArray(r)) return r; }
3278
3279
3280
3281
3282function DesktopNavigation(props) {
3283  var _useState = Object(react["useState"])(),
3284    _useState2 = DesktopNavigation_slicedToArray(_useState, 2),
3285    currentLink = _useState2[0],
3286    setCurrentLink = _useState2[1];
3287  var handleCurrentLink = function handleCurrentLink(item) {
3288    setCurrentLink(item);
3289  };
3290  if (!props.categoryNavigation && !props.pageNavigation) {
3291    return null;
3292  }
3293  return Object(jsx_runtime["jsx"])(jsx_runtime["Fragment"], {
3294    children: Object(jsx_runtime["jsxs"])("ul", Object.assign({
3295      className: DesktopNavigation_module_default.a.MainHeaderLinks
3296    }, {
3297      children: [props.categoryNavigation.map(function (item, index) {
3298        return Object(jsx_runtime["jsx"])(MainHeaderLinkItem, Object.assign({
3299          isActive: currentLink == item.Id,
3300          onClick: function onClick() {
3301            return handleCurrentLink(item.Id);
3302          },
3303          onHide: function onHide() {
3304            return handleCurrentLink(undefined);
3305          }
3306        }, item), index);
3307      }), props.pageNavigation.map(function (item, index) {
3308        return Object(jsx_runtime["jsx"])(MainHeaderLinkItem, Object.assign({
3309          isActive: currentLink == item.Id,
3310          onClick: function onClick() {
3311            return handleCurrentLink(item.Id);
3312          },
3313          onHide: function onHide() {
3314            return handleCurrentLink(undefined);
3315          }
3316        }, item), index);
3317      })]
3318    }))
3319  });
3320}
3321// CONCATENATED MODULE: ./React/Header/Components/Navigation/Desktop/DesktopNavigationContainer.tsx
3322function DesktopNavigationContainer_slicedToArray(r, e) { return DesktopNavigationContainer_arrayWithHoles(r) || DesktopNavigationContainer_iterableToArrayLimit(r, e) || DesktopNavigationContainer_unsupportedIterableToArray(r, e) || DesktopNavigationContainer_nonIterableRest(); }
3323function DesktopNavigationContainer_nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
3324function DesktopNavigationContainer_unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return DesktopNavigationContainer_arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? DesktopNavigationContainer_arrayLikeToArray(r, a) : void 0; } }
3325function DesktopNavigationContainer_arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
3326function DesktopNavigationContainer_iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
3327function DesktopNavigationContainer_arrayWithHoles(r) { if (Array.isArray(r)) return r; }
3328
3329
3330
3331
3332
3333
3334
3335
3336function DesktopNavigationContainer(props) {
3337  var _useState = Object(react["useState"])(false),
3338    _useState2 = DesktopNavigationContainer_slicedToArray(_useState, 2),
3339    searchClicked = _useState2[0],
3340    setSearchClicked = _useState2[1];
3341  var _useContext = Object(react["useContext"])(HeaderContext["a" /* HeaderContext */]),
3342    CategoryNavigation = _useContext.CategoryNavigation,
3343    PageNavigation = _useContext.PageNavigation,
3344    HideNav = _useContext.HideNav,
3345    HideSearch = _useContext.HideSearch;
3346  var scrollMode = props.isScrolled && !searchClicked;
3347  var IsMobile = false;
3348  var handleSearchClick = function handleSearchClick() {
3349    setSearchClicked(true);
3350  };
3351  var _useWindowDimensions = Object(WindowDimensions["a" /* default */])(),
3352    width = _useWindowDimensions.width,
3353    height = _useWindowDimensions.height;
3354  return Object(jsx_runtime["jsx"])(jsx_runtime["Fragment"], {
3355    children: Object(jsx_runtime["jsxs"])("div", Object.assign({
3356      className: [DesktopNavigationContainer_module_default.a.HeaderRowContainer, HideNav ? DesktopNavigationContainer_module_default.a.alignRight : null].join(' ')
3357    }, {
3358      children: [!HideNav ? Object(jsx_runtime["jsx"])(DesktopNavigation, {
3359        categoryNavigation: CategoryNavigation,
3360        pageNavigation: PageNavigation
3361      }) : null, !HideSearch ? Object(jsx_runtime["jsx"])(HeaderSearch, {
3362        searchClicked: searchClicked,
3363        isMobile: IsMobile,
3364        isScrolled: props.isScrolled,
3365        onSearchClick: handleSearchClick
3366      }) : null]
3367    }))
3368  });
3369}
3370// EXTERNAL MODULE: ./React/Header/Components/Navigation/Mobile/MobileNavigationContainer.module.scss
3371var MobileNavigationContainer_module = __webpack_require__(604);
3372var MobileNavigationContainer_module_default = /*#__PURE__*/__webpack_require__.n(MobileNavigationContainer_module);
3373
3374// EXTERNAL MODULE: ./React/Header/Components/Navigation/Mobile/MobileCloseMenu.module.scss
3375var MobileCloseMenu_module = __webpack_require__(605);
3376var MobileCloseMenu_module_default = /*#__PURE__*/__webpack_require__.n(MobileCloseMenu_module);
3377
3378// CONCATENATED MODULE: ./React/Header/Components/Navigation/Mobile/MobileCloseMenu.tsx
3379
3380
3381function MobileCloseMenu(props) {
3382  return Object(jsx_runtime["jsx"])("div", Object.assign({
3383    className: MobileCloseMenu_module_default.a.CloseMenu,
3384    onClick: props.onClick
3385  }, {
3386    children: Object(jsx_runtime["jsx"])("span", {})
3387  }));
3388}
3389// EXTERNAL MODULE: ./React/Header/Components/Navigation/Mobile/Footer/MobileFooter.module.scss
3390var MobileFooter_module = __webpack_require__(606);
3391var MobileFooter_module_default = /*#__PURE__*/__webpack_require__.n(MobileFooter_module);
3392
3393// CONCATENATED MODULE: ./React/Header/Components/Navigation/Mobile/BaseImageLink.tsx
3394
3395function BaseImageLink(props) {
3396  var className = !!props.className ? props.className : '';
3397  return Object(jsx_runtime["jsxs"])("a", Object.assign({
3398    href: props.href,
3399    className: className
3400  }, {
3401    children: [!!props.image ? Object(jsx_runtime["jsx"])("img", {
3402      src: props.image,
3403      alt: ""
3404    }) : null, Object(jsx_runtime["jsx"])("span", {
3405      children: props.children
3406    })]
3407  }));
3408}
3409// EXTERNAL MODULE: ./React/Header/Components/Navigation/Mobile/Footer/MobileFooterNavLink.module.scss
3410var MobileFooterNavLink_module = __webpack_require__(607);
3411var MobileFooterNavLink_module_default = /*#__PURE__*/__webpack_require__.n(MobileFooterNavLink_module);
3412
3413// CONCATENATED MODULE: ./React/Header/Components/Navigation/Mobile/Footer/MobileFooterNavLink.tsx
3414
3415
3416
3417function MobileFooterNavLink(props) {
3418  return Object(jsx_runtime["jsx"])(BaseImageLink, Object.assign({
3419    className: MobileFooterNavLink_module_default.a.NavLink
3420  }, props));
3421}
3422// CONCATENATED MODULE: ./React/Header/Components/buttons/ChangeSlotButton.tsx
3423
3424
3425
3426
3427function ChangeSlotButton() {
3428  var _useContext = Object(react["useContext"])(HeaderContext["a" /* HeaderContext */]),
3429    BaseUrl = _useContext.BaseUrl,
3430    CurrentUrl = _useContext.CurrentUrl;
3431  return Object(jsx_runtime["jsx"])(StandardLinkButton["a" /* default */], Object.assign({
3432    href: "".concat(BaseUrl, "CheckoutNew/BookSlot"),
3433    "data-addurl": CurrentUrl,
3434    type: "tertiary",
3435    className: "bookslot"
3436  }, {
3437    children: "Change Slot"
3438  }));
3439}
3440// CONCATENATED MODULE: ./React/Header/Components/Navigation/Mobile/Footer/MobileFooter.tsx
3441
3442
3443
3444
3445
3446
3447
3448function MobileFooter() {
3449  var _useContext = Object(react["useContext"])(HeaderContext["a" /* HeaderContext */]),
3450    LoggedIn = _useContext.LoggedIn,
3451    SlotSelected = _useContext.SlotSelected,
3452    HideBookSlot = _useContext.HideBookSlot;
3453  var slotButton = Object(jsx_runtime["jsx"])(jsx_runtime["Fragment"], {});
3454  if (!HideBookSlot) {
3455    if (SlotSelected) {
3456      slotButton = Object(jsx_runtime["jsx"])(ChangeSlotButton, {});
3457    } else {
3458      slotButton = Object(jsx_runtime["jsx"])(BookSlotButton, {});
3459    }
3460  }
3461  return Object(jsx_runtime["jsxs"])("div", Object.assign({
3462    className: MobileFooter_module_default.a.MobileFooter
3463  }, {
3464    children: [slotButton, Object(jsx_runtime["jsx"])(MobileFooterNavLink, Object.assign({
3465      href: "/shops",
3466      image: "https://cook.blob.core.windows.net/assets/HeaderMenuIcons/map-marker-light.png"
3467    }, {
3468      children: "Shop Finder"
3469    })), Object(jsx_runtime["jsx"])(MobileFooterNavLink, Object.assign({
3470      href: "/contact"
3471    }, {
3472      children: "Contact Us and FAQ"
3473    })), !LoggedIn ? Object(jsx_runtime["jsx"])(MobileFooterNavLink, Object.assign({
3474      href: "/your-account"
3475    }, {
3476      children: "Log In | Sign Up"
3477    })) : Object(jsx_runtime["jsx"])(MobileFooterNavLink, Object.assign({
3478      href: "/register?logout=1",
3479      image: "https://assets.cookfood.net/HeaderMenuIcons/sign-out-light.png"
3480    }, {
3481      children: "Log Out"
3482    }))]
3483  }));
3484}
3485// EXTERNAL MODULE: ./React/Header/Components/Navigation/Mobile/Header/MobileHeader.module.scss
3486var MobileHeader_module = __webpack_require__(608);
3487var MobileHeader_module_default = /*#__PURE__*/__webpack_require__.n(MobileHeader_module);
3488
3489// EXTERNAL MODULE: ./React/Header/Components/Navigation/Mobile/Header/MobileHeaderNav.module.scss
3490var MobileHeaderNav_module = __webpack_require__(609);
3491var MobileHeaderNav_module_default = /*#__PURE__*/__webpack_require__.n(MobileHeaderNav_module);
3492
3493// EXTERNAL MODULE: ./React/Header/Components/Navigation/Mobile/Header/MobileHeaderNavLink.module.scss
3494var MobileHeaderNavLink_module = __webpack_require__(610);
3495var MobileHeaderNavLink_module_default = /*#__PURE__*/__webpack_require__.n(MobileHeaderNavLink_module);
3496
3497// CONCATENATED MODULE: ./React/Header/Components/Navigation/Mobile/Header/MobileHeaderNavLink.tsx
3498
3499
3500
3501function MobileHeaderNavLink(props) {
3502  return Object(jsx_runtime["jsx"])("div", Object.assign({
3503    className: MobileHeaderNavLink_module_default.a.MobileHeaderNavLink
3504  }, {
3505    children: Object(jsx_runtime["jsx"])(BaseImageLink, Object.assign({}, props))
3506  }));
3507}
3508// CONCATENATED MODULE: ./React/Header/Components/Navigation/Mobile/Header/MobileHeaderNav.tsx
3509
3510
3511
3512
3513
3514function MobileHeaderNav(props) {
3515  var _useContext = Object(react["useContext"])(HeaderContext["a" /* HeaderContext */]),
3516    LoggedIn = _useContext.LoggedIn;
3517  return Object(jsx_runtime["jsxs"])("div", Object.assign({
3518    className: MobileHeaderNav_module_default.a.MobileHeaderNav
3519  }, {
3520    children: [Object(jsx_runtime["jsx"])(MobileHeaderNavLink, Object.assign({
3521      href: "/",
3522      image: "https://assets.cookfood.net/HeaderMenuIcons/home-alt-light.png"
3523    }, {
3524      children: "Home"
3525    })), LoggedIn ? Object(jsx_runtime["jsx"])(MobileHeaderNavLink, Object.assign({
3526      href: "/your-account",
3527      image: "https://assets.cookfood.net/HeaderMenuIcons/user-light.png"
3528    }, {
3529      children: "Account"
3530    })) : null]
3531  }));
3532}
3533// EXTERNAL MODULE: ./React/Header/Components/Navigation/Mobile/Header/MobileHeaderTitle.module.scss
3534var MobileHeaderTitle_module = __webpack_require__(611);
3535var MobileHeaderTitle_module_default = /*#__PURE__*/__webpack_require__.n(MobileHeaderTitle_module);
3536
3537// CONCATENATED MODULE: ./React/Header/Components/Navigation/Mobile/Header/MobileHeaderTitle.tsx
3538
3539
3540function MobileHeaderTitle() {
3541  return Object(jsx_runtime["jsx"])("div", Object.assign({
3542    className: MobileHeaderTitle_module_default.a.HeaderTitle
3543  }, {
3544    children: Object(jsx_runtime["jsx"])("img", {
3545      src: "https://assets.cookfood.net/cook_plain_coregreen.svg",
3546      alt: ""
3547    })
3548  }));
3549}
3550// CONCATENATED MODULE: ./React/Header/Components/Navigation/Mobile/Header/MobileHeader.tsx
3551
3552
3553
3554
3555function MobileHeader() {
3556  return Object(jsx_runtime["jsxs"])("div", Object.assign({
3557    className: MobileHeader_module_default.a.MobileHeader
3558  }, {
3559    children: [Object(jsx_runtime["jsx"])(MobileHeaderTitle, {}), Object(jsx_runtime["jsx"])(MobileHeaderNav, {})]
3560  }));
3561}
3562// EXTERNAL MODULE: ./React/Header/Components/Navigation/Mobile/MobileLinks.module.scss
3563var MobileLinks_module = __webpack_require__(612);
3564var MobileLinks_module_default = /*#__PURE__*/__webpack_require__.n(MobileLinks_module);
3565
3566// EXTERNAL MODULE: ./React/Header/Components/Navigation/Mobile/MobileLinkPrimaryItem.module.scss
3567var MobileLinkPrimaryItem_module = __webpack_require__(613);
3568var MobileLinkPrimaryItem_module_default = /*#__PURE__*/__webpack_require__.n(MobileLinkPrimaryItem_module);
3569
3570// CONCATENATED MODULE: ./React/Header/Components/Navigation/Mobile/SubLinkItems.tsx
3571
3572function SubLinkItems(props) {
3573  var _a;
3574  return Object(jsx_runtime["jsx"])("ul", {
3575    children: (_a = props.sublink.SubLinks) === null || _a === void 0 ? void 0 : _a.map(function (item, index) {
3576      return Object(jsx_runtime["jsx"])("li", {
3577        children: Object(jsx_runtime["jsx"])("a", Object.assign({
3578          href: item.HRef
3579        }, {
3580          children: item.Title
3581        }))
3582      }, index);
3583    })
3584  });
3585}
3586// EXTERNAL MODULE: ./React/Header/Components/Navigation/Mobile/MobileSublinks.module.scss
3587var MobileSublinks_module = __webpack_require__(459);
3588var MobileSublinks_module_default = /*#__PURE__*/__webpack_require__.n(MobileSublinks_module);
3589
3590// EXTERNAL MODULE: ./React/Header/Components/Navigation/Mobile/Buttons/BackButton.module.scss
3591var BackButton_module = __webpack_require__(614);
3592var BackButton_module_default = /*#__PURE__*/__webpack_require__.n(BackButton_module);
3593
3594// CONCATENATED MODULE: ./React/Header/Components/Navigation/Mobile/Buttons/BackButton.tsx
3595
3596
3597function BackButton(props) {
3598  return Object(jsx_runtime["jsx"])("div", Object.assign({
3599    className: BackButton_module_default.a.Back,
3600    onClick: props.onClick
3601  }, {
3602    children: Object(jsx_runtime["jsx"])("span", {})
3603  }));
3604}
3605// EXTERNAL MODULE: ./React/Header/Components/Navigation/Mobile/SubNavHeader.module.scss
3606var SubNavHeader_module = __webpack_require__(615);
3607var SubNavHeader_module_default = /*#__PURE__*/__webpack_require__.n(SubNavHeader_module);
3608
3609// CONCATENATED MODULE: ./React/Header/Components/Navigation/Mobile/SubNavHeader.tsx
3610
3611
3612function SubNavHeader(props) {
3613  return Object(jsx_runtime["jsx"])("div", Object.assign({
3614    className: SubNavHeader_module_default.a.SubNavHeader
3615  }, {
3616    children: Object(jsx_runtime["jsx"])("a", Object.assign({
3617      href: props.href
3618    }, {
3619      children: props.title
3620    }))
3621  }));
3622}
3623// EXTERNAL MODULE: ./React/Header/Components/Navigation/Mobile/Buttons/ForwardButton.module.scss
3624var ForwardButton_module = __webpack_require__(616);
3625var ForwardButton_module_default = /*#__PURE__*/__webpack_require__.n(ForwardButton_module);
3626
3627// CONCATENATED MODULE: ./React/Header/Components/Navigation/Mobile/Buttons/ForwardButton.tsx
3628
3629
3630function ForwardButton(props) {
3631  return Object(jsx_runtime["jsx"])("div", Object.assign({
3632    className: ForwardButton_module_default.a.Forward,
3633    onClick: props.onClick
3634  }, {
3635    children: Object(jsx_runtime["jsx"])("span", {})
3636  }));
3637}
3638// CONCATENATED MODULE: ./React/Header/Components/Navigation/Mobile/SubLinkCategoryItems.tsx
3639
3640
3641function SubLinkCategoryItems(props) {
3642  var handleSubCategoryClick = function handleSubCategoryClick(e, item) {
3643    if (!!item.SubLinks && item.SubLinks.length > 0) {
3644      e.preventDefault();
3645      props.onClick(item);
3646    }
3647  };
3648  return Object(jsx_runtime["jsx"])("ul", {
3649    children: props.sublinks.map(function (element, index) {
3650      var forwardButton = !!element.SubLinks && element.SubLinks.length > 0 ? Object(jsx_runtime["jsx"])(ForwardButton, {
3651        onClick: function onClick() {}
3652      }) : null;
3653      return Object(jsx_runtime["jsx"])("li", {
3654        children: Object(jsx_runtime["jsxs"])("a", Object.assign({
3655          href: element.HRef,
3656          onClick: function onClick(e) {
3657            return handleSubCategoryClick(e, element);
3658          }
3659        }, {
3660          children: [element.Title, " ", forwardButton]
3661        }))
3662      }, index);
3663    })
3664  });
3665}
3666// CONCATENATED MODULE: ./React/Header/Components/Navigation/Mobile/MobileSubLinks.tsx
3667function MobileSubLinks_slicedToArray(r, e) { return MobileSubLinks_arrayWithHoles(r) || MobileSubLinks_iterableToArrayLimit(r, e) || MobileSubLinks_unsupportedIterableToArray(r, e) || MobileSubLinks_nonIterableRest(); }
3668function MobileSubLinks_nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
3669function MobileSubLinks_unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return MobileSubLinks_arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? MobileSubLinks_arrayLikeToArray(r, a) : void 0; } }
3670function MobileSubLinks_arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
3671function MobileSubLinks_iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
3672function MobileSubLinks_arrayWithHoles(r) { if (Array.isArray(r)) return r; }
3673
3674
3675
3676
3677
3678
3679
3680function MobileSubLinks(props) {
3681  var _useState = Object(react["useState"])(false),
3682    _useState2 = MobileSubLinks_slicedToArray(_useState, 2),
3683    childShowing = _useState2[0],
3684    setChildShowing = _useState2[1];
3685  var _useState3 = Object(react["useState"])(),
3686    _useState4 = MobileSubLinks_slicedToArray(_useState3, 2),
3687    childLink = _useState4[0],
3688    setChildLink = _useState4[1];
3689  if (!(props.SubLinks && props.SubLinks.length > 0)) {
3690    return null;
3691  }
3692  var handleChildClick = function handleChildClick(item) {
3693    setChildShowing(true);
3694    setChildLink(item);
3695  };
3696  var handleBackButton = function handleBackButton() {
3697    if (childShowing) {
3698      setChildShowing(false);
3699    } else {
3700      props.onBackButton();
3701    }
3702  };
3703  var currentNav = childShowing ? childLink : props;
3704  var primaryLinks = childShowing ? childLink : currentNav.SubLinks[0];
3705  var childLinks = !childShowing ? currentNav.SubLinks : [];
3706  return Object(jsx_runtime["jsxs"])("div", Object.assign({
3707    className: "".concat(MobileSublinks_module_default.a.MobileSubLinks)
3708  }, {
3709    children: [Object(jsx_runtime["jsx"])(BackButton, {
3710      onClick: handleBackButton
3711    }), Object(jsx_runtime["jsx"])(SubNavHeader, {
3712      title: currentNav.Title,
3713      href: currentNav.HRef
3714    }), Object(jsx_runtime["jsxs"])("div", Object.assign({
3715      className: MobileSublinks_module_default.a.NavOuter
3716    }, {
3717      children: [Object(jsx_runtime["jsx"])(SubLinkCategoryItems, {
3718        sublinks: childLinks,
3719        onClick: handleChildClick
3720      }), Object(jsx_runtime["jsx"])(SubLinkItems, {
3721        sublink: primaryLinks
3722      })]
3723    }))]
3724  }));
3725}
3726// CONCATENATED MODULE: ./React/Header/Components/Navigation/Mobile/MobileLinkPrimaryItem.tsx
3727function MobileLinkPrimaryItem_slicedToArray(r, e) { return MobileLinkPrimaryItem_arrayWithHoles(r) || MobileLinkPrimaryItem_iterableToArrayLimit(r, e) || MobileLinkPrimaryItem_unsupportedIterableToArray(r, e) || MobileLinkPrimaryItem_nonIterableRest(); }
3728function MobileLinkPrimaryItem_nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
3729function MobileLinkPrimaryItem_unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return MobileLinkPrimaryItem_arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? MobileLinkPrimaryItem_arrayLikeToArray(r, a) : void 0; } }
3730function MobileLinkPrimaryItem_arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
3731function MobileLinkPrimaryItem_iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
3732function MobileLinkPrimaryItem_arrayWithHoles(r) { if (Array.isArray(r)) return r; }
3733
3734
3735
3736
3737function MobileLinkPrimaryItem(props) {
3738  var _useState = Object(react["useState"])(0),
3739    _useState2 = MobileLinkPrimaryItem_slicedToArray(_useState, 2),
3740    clickCount = _useState2[0],
3741    setClickCount = _useState2[1];
3742  Object(react["useEffect"])(function () {
3743    if (!props.isActive) {
3744      setClickCount(0);
3745    }
3746  }, [props.isActive]);
3747  var handleOnClick = function handleOnClick(e) {
3748    if (props.SubLinks && props.SubLinks.length > 0) {
3749      if (clickCount == 0) {
3750        e.preventDefault();
3751        props.onClick();
3752        setClickCount(1);
3753      }
3754    }
3755  };
3756  var handleOnHide = function handleOnHide() {
3757    setClickCount(0);
3758    props.onHide();
3759  };
3760  return Object(jsx_runtime["jsxs"])("li", Object.assign({
3761    className: MobileLinkPrimaryItem_module_default.a.PrimaryItem
3762  }, {
3763    children: [Object(jsx_runtime["jsx"])("a", Object.assign({
3764      className: 'primary-link ' + (props.isActive ? "active-mobile" : ""),
3765      href: props.HRef,
3766      onClick: handleOnClick
3767    }, {
3768      children: props.Title
3769    })), props.isActive ? Object(jsx_runtime["jsx"])(MobileSubLinks, Object.assign({
3770      onBackButton: handleOnHide
3771    }, props)) : null]
3772  }));
3773}
3774// CONCATENATED MODULE: ./React/Header/Components/Navigation/Mobile/MobileLinks.tsx
3775function MobileLinks_slicedToArray(r, e) { return MobileLinks_arrayWithHoles(r) || MobileLinks_iterableToArrayLimit(r, e) || MobileLinks_unsupportedIterableToArray(r, e) || MobileLinks_nonIterableRest(); }
3776function MobileLinks_nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
3777function MobileLinks_unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return MobileLinks_arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? MobileLinks_arrayLikeToArray(r, a) : void 0; } }
3778function MobileLinks_arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
3779function MobileLinks_iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
3780function MobileLinks_arrayWithHoles(r) { if (Array.isArray(r)) return r; }
3781
3782
3783
3784
3785function MobileLinks(props) {
3786  var _useState = Object(react["useState"])(),
3787    _useState2 = MobileLinks_slicedToArray(_useState, 2),
3788    currentLink = _useState2[0],
3789    setCurrentLink = _useState2[1];
3790  var handleCurrentLink = function handleCurrentLink(item) {
3791    setCurrentLink(item);
3792  };
3793  if (!props.navigation) {
3794    return null;
3795  }
3796  return Object(jsx_runtime["jsx"])("ul", Object.assign({
3797    className: MobileLinks_module_default.a.MobileLinks
3798  }, {
3799    children: props.navigation.map(function (item, index) {
3800      return Object(jsx_runtime["jsx"])(MobileLinkPrimaryItem, Object.assign({
3801        isActive: currentLink == item.Id,
3802        onClick: function onClick() {
3803          return handleCurrentLink(item.Id);
3804        },
3805        onHide: function onHide() {
3806          return handleCurrentLink(undefined);
3807        }
3808      }, item), index);
3809    })
3810  }));
3811}
3812// EXTERNAL MODULE: ./React/Header/Components/Navigation/Mobile/MobileMenu.module.scss
3813var MobileMenu_module = __webpack_require__(617);
3814var MobileMenu_module_default = /*#__PURE__*/__webpack_require__.n(MobileMenu_module);
3815
3816// CONCATENATED MODULE: ./React/Header/Components/Navigation/Mobile/MobileMenu.tsx
3817function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || MobileMenu_unsupportedIterableToArray(r) || _nonIterableSpread(); }
3818function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
3819function MobileMenu_unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return MobileMenu_arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? MobileMenu_arrayLikeToArray(r, a) : void 0; } }
3820function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
3821function _arrayWithoutHoles(r) { if (Array.isArray(r)) return MobileMenu_arrayLikeToArray(r); }
3822function MobileMenu_arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
3823
3824
3825
3826
3827
3828function MobileMenu(props) {
3829  var combinedNavs = [].concat(_toConsumableArray(props.categoryNavigation), _toConsumableArray(props.pageNavigation));
3830  // todo: uncombine when these need to be seperated
3831  return Object(jsx_runtime["jsxs"])("div", Object.assign({
3832    className: MobileMenu_module_default.a.NavigationLinks
3833  }, {
3834    children: [Object(jsx_runtime["jsx"])(MobileHeader, {}), Object(jsx_runtime["jsx"])(MobileLinks, {
3835      navigation: combinedNavs
3836    }), Object(jsx_runtime["jsx"])(MobileFooter, {})]
3837  }));
3838}
3839// EXTERNAL MODULE: ./React/Header/Components/Navigation/Mobile/MobileNavigation.module.scss
3840var MobileNavigation_module = __webpack_require__(618);
3841var MobileNavigation_module_default = /*#__PURE__*/__webpack_require__.n(MobileNavigation_module);
3842
3843// EXTERNAL MODULE: ./React/Header/Components/Navigation/Mobile/Buttons/MobileOpenMenu.module.scss
3844var MobileOpenMenu_module = __webpack_require__(619);
3845var MobileOpenMenu_module_default = /*#__PURE__*/__webpack_require__.n(MobileOpenMenu_module);
3846
3847// CONCATENATED MODULE: ./React/Header/Components/Navigation/Mobile/Buttons/MobileOpenMenu.tsx
3848
3849
3850function MobileOpenMenu(props) {
3851  return Object(jsx_runtime["jsx"])("div", Object.assign({
3852    onClick: props.onClick,
3853    className: MobileOpenMenu_module_default.a.MobileToggle + " " + (props.isActive ? "active" : "")
3854  }, {
3855    children: Object(jsx_runtime["jsx"])("span", {})
3856  }));
3857}
3858// EXTERNAL MODULE: ./React/Header/Components/Navigation/Mobile/MobileOverlay.module.scss
3859var MobileOverlay_module = __webpack_require__(620);
3860var MobileOverlay_module_default = /*#__PURE__*/__webpack_require__.n(MobileOverlay_module);
3861
3862// CONCATENATED MODULE: ./React/Header/Components/Navigation/Mobile/MobileOverlay.tsx
3863
3864
3865function MobileOverlay(props) {
3866  return Object(jsx_runtime["jsx"])("div", {
3867    className: MobileOverlay_module_default.a.MobileOverlay,
3868    onClick: props.onClick
3869  });
3870}
3871// CONCATENATED MODULE: ./React/Header/Components/Navigation/Mobile/MobileNavigation.tsx
3872function MobileNavigation_slicedToArray(r, e) { return MobileNavigation_arrayWithHoles(r) || MobileNavigation_iterableToArrayLimit(r, e) || MobileNavigation_unsupportedIterableToArray(r, e) || MobileNavigation_nonIterableRest(); }
3873function MobileNavigation_nonIterableRest() { throw new TypeError("Invalid attempt to de
3873structure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
3874function MobileNavigation_unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return MobileNavigation_arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? MobileNavigation_arrayLikeToArray(r, a) : void 0; } }
3875function MobileNavigation_arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
3876function MobileNavigation_iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
3877function MobileNavigation_arrayWithHoles(r) { if (Array.isArray(r)) return r; }
3878
3879
3880
3881
3882
3883
3884
3885function MobileNavigation(props) {
3886  var _useState = Object(react["useState"])(false),
3887    _useState2 = MobileNavigation_slicedToArray(_useState, 2),
3888    isMobileMenuActive = _useState2[0],
3889    setIsMobileMenuActive = _useState2[1];
3890  var handleMobileMenu = function handleMobileMenu() {
3891    setIsMobileMenuActive(!isMobileMenuActive);
3892  };
3893  return Object(jsx_runtime["jsxs"])(jsx_runtime["Fragment"], {
3894    children: [isMobileMenuActive ? Object(jsx_runtime["jsx"])(MobileOverlay, {
3895      onClick: handleMobileMenu
3896    }) : null, Object(jsx_runtime["jsx"])(MobileOpenMenu, {
3897      onClick: handleMobileMenu,
3898      isActive: isMobileMenuActive
3899    }), Object(jsx_runtime["jsxs"])("div", Object.assign({
3900      className: MobileNavigation_module_default.a.SideBar + ' ' + (isMobileMenuActive ? 'open' : '')
3901    }, {
3902      children: [Object(jsx_runtime["jsx"])(MobileCloseMenu, {
3903        onClick: handleMobileMenu
3904      }), Object(jsx_runtime["jsx"])(MobileMenu, {
3905        categoryNavigation: props.categoryNavigation,
3906        pageNavigation: props.pageNavigation
3907      })]
3908    }))]
3909  });
3910}
3911// CONCATENATED MODULE: ./React/Header/Components/Navigation/Mobile/MobileNavigationContainer.tsx
3912
3913
3914
3915
3916
3917
3918function MobileNavigationContainer(props) {
3919  var _useContext = Object(react["useContext"])(HeaderContext["a" /* HeaderContext */]),
3920    CategoryNavigation = _useContext.CategoryNavigation,
3921    PageNavigation = _useContext.PageNavigation,
3922    HideNav = _useContext.HideNav,
3923    HideSearch = _useContext.HideSearch;
3924  var IsMobile = true;
3925  var handleSearchClick = function handleSearchClick() {
3926    props.onSearchClick();
3927  };
3928  return Object(jsx_runtime["jsx"])(jsx_runtime["Fragment"], {
3929    children: Object(jsx_runtime["jsxs"])("div", Object.assign({
3930      className: MobileNavigationContainer_module_default.a.HeaderRowContainer
3931    }, {
3932      children: [!HideNav ? Object(jsx_runtime["jsx"])(MobileNavigation, {
3933        categoryNavigation: CategoryNavigation,
3934        pageNavigation: PageNavigation
3935      }) : null, !HideSearch ? Object(jsx_runtime["jsx"])(HeaderSearch, {
3936        searchClicked: props.searchClicked,
3937        isMobile: IsMobile,
3938        isScrolled: props.isScrolled,
3939        onSearchClick: handleSearchClick
3940      }) : null]
3941    }))
3942  });
3943}
3944// CONCATENATED MODULE: ./React/Header/Components/Navigation/NavigationOuter.tsx
3945
3946
3947
3948function NavigationOuter(props) {
3949  if (props.isMobile) {
3950    return Object(jsx_runtime["jsx"])(MobileNavigationContainer, {
3951      searchClicked: props.searchClicked,
3952      onSearchClick: props.onSearchClick,
3953      isScrolled: props.isScrolled
3954    });
3955  } else {
3956    return Object(jsx_runtime["jsx"])(DesktopNavigationContainer, {
3957      isScrolled: props.isScrolled
3958    });
3959  }
3960}
3961// CONCATENATED MODULE: ./React/Header/Components/HeaderTemplate.tsx
3962function HeaderTemplate_slicedToArray(r, e) { return HeaderTemplate_arrayWithHoles(r) || HeaderTemplate_iterableToArrayLimit(r, e) || HeaderTemplate_unsupportedIterableToArray(r, e) || HeaderTemplate_nonIterableRest(); }
3963function HeaderTemplate_nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
3964function HeaderTemplate_unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return HeaderTemplate_arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? HeaderTemplate_arrayLikeToArray(r, a) : void 0; } }
3965function HeaderTemplate_arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
3966function HeaderTemplate_iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
3967function HeaderTemplate_arrayWithHoles(r) { if (Array.isArray(r)) return r; }
3968
3969
3970
3971
3972
3973
3974
3975
3976function HeaderTemplate(props) {
3977  var _useState = Object(react["useState"])(false),
3978    _useState2 = HeaderTemplate_slicedToArray(_useState, 2),
3979    isScrolled = _useState2[0],
3980    setIsScrolled = _useState2[1];
3981  var _useState3 = Object(react["useState"])(false),
3982    _useState4 = HeaderTemplate_slicedToArray(_useState3, 2),
3983    searchClicked = _useState4[0],
3984    setSearchClicked = _useState4[1];
3985  var _useContext = Object(react["useContext"])(HeaderContext["a" /* HeaderContext */]),
3986    CategoryNavigation = _useContext.CategoryNavigation,
3987    PageNavigation = _useContext.PageNavigation,
3988    HideNav = _useContext.HideNav,
3989    HideSearch = _useContext.HideSearch;
3990  var _useWindowDimensions = Object(WindowDimensions["a" /* default */])(),
3991    width = _useWindowDimensions.width,
3992    height = _useWindowDimensions.height;
3993  var _useState5 = Object(react["useState"])(false),
3994    _useState6 = HeaderTemplate_slicedToArray(_useState5, 2),
3995    isLoaded = _useState6[0],
3996    setIsLoaded = _useState6[1];
3997  var isMobile = isLoaded && width != null && width < 991;
3998  var scrollMode = isScrolled && !searchClicked;
3999  Object(lib["useScrollPosition"])(function (_ref) {
4000    var prevPos = _ref.prevPos,
4001      currPos = _ref.currPos;
4002    if (prevPos.y != currPos.y && searchClicked) {
4003      setSearchClicked(false);
4004    }
4005    if (!isScrolled && currPos.y < -50) {
4006      setIsScrolled(true);
4007    }
4008    if (isScrolled && currPos.y >= -50) {
4009      setIsScrolled(false);
4010    }
4011  }, [isScrolled, searchClicked]);
4012  var handleSearchClick = function handleSearchClick() {
4013    setSearchClicked(true);
4014  };
4015  Object(react["useEffect"])(function () {
4016    setIsLoaded(true);
4017  }, []);
4018  return Object(jsx_runtime["jsxs"])("header", Object.assign({
4019    className: "".concat(HeaderTemplate_module_default.a.SiteHeader, " ").concat(scrollMode ? "scrolling" : "")
4020  }, {
4021    children: [Object(jsx_runtime["jsx"])("div", Object.assign({
4022      className: HeaderTemplate_module_default.a.HeaderLeft
4023    }, {
4024      children: props.leftChildren
4025    })), Object(jsx_runtime["jsx"])("div", Object.assign({
4026      className: HeaderTemplate_module_default.a.HeaderCentre
4027    }, {
4028      children: Object(jsx_runtime["jsx"])(Logo, {})
4029    })), Object(jsx_runtime["jsx"])("div", Object.assign({
4030      className: HeaderTemplate_module_default.a.HeaderRight
4031    }, {
4032      children: Object(jsx_runtime["jsx"])("div", Object.assign({
4033        className: HeaderTemplate_module_default.a.HeaderRightContainer
4034      }, {
4035        children: props.rightChildren
4036      }))
4037    })), Object(jsx_runtime["jsx"])(NavigationOuter, {
4038      searchClicked: searchClicked,
4039      onSearchClick: handleSearchClick,
4040      isMobile: isMobile,
4041      categoryNavigation: CategoryNavigation,
4042      pageNavigation: PageNavigation,
4043      isScrolled: isScrolled
4044    })]
4045  }));
4046}
4047// CONCATENATED MODULE: ./React/Header/Components/buttons/LocationFinderButton.tsx
4048
4049
4050
4051
4052function LocationFinderButton() {
4053  var _useContext = Object(react["useContext"])(HeaderContext["a" /* HeaderContext */]),
4054    BaseUrl = _useContext.BaseUrl;
4055  return Object(jsx_runtime["jsx"])(HeaderButton, {
4056    href: "".concat(BaseUrl, "shops"),
4057    title: "shop finder",
4058    activeImage: "https://assets.cookfood.net/new-header/map-marker.svg",
4059    hoverImage: "https://assets.cookfood.net/new-header/map-marker-alt-solid.svg",
4060    alt: 'Shop Finder'
4061  });
4062}
4063// CONCATENATED MODULE: ./React/Header/Components/buttons/UserLoginButton.tsx
4064
4065
4066
4067
4068function UserLoginButton() {
4069  var _useContext = Object(react["useContext"])(HeaderContext["a" /* HeaderContext */]),
4070    BaseUrl = _useContext.BaseUrl;
4071  return Object(jsx_runtime["jsx"])(HeaderButton, {
4072    href: "".concat(BaseUrl, "your-account"),
4073    title: "account",
4074    activeImage: "https://assets.cookfood.net/new-header/user-solid-white.svg",
4075    hoverImage: "https://assets.cookfood.net/new-header/user-solid.svg",
4076    alt: 'Account'
4077  });
4078}
4079// EXTERNAL MODULE: ./React/Common/Store/Hooks.tsx
4080var Hooks = __webpack_require__(143);
4081
4082// CONCATENATED MODULE: ./React/Header/Components/Header.tsx
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094function Header(props) {
4095  var state = Object(Hooks["b" /* useStoreState */])(function (state) {
4096    return state;
4097  });
4098  var actions = Object(Hooks["a" /* useStoreActions */])(function (state) {
4099    return state;
4100  });
4101  var basketFlash = state.DoBasketFlash;
4102  var _useContext = Object(react["useContext"])(HeaderContext["a" /* HeaderContext */]),
4103    HideNav = _useContext.HideNav,
4104    HideBasketButton = _useContext.HideBasketButton;
4105  Object(react["useEffect"])(function () {
4106    if (state.DoBasketFlash) {
4107      var timer = setTimeout(function () {
4108        actions.setBasketFlash(false);
4109      }, 1500);
4110      return function () {
4111        return clearTimeout(timer);
4112      };
4113    }
4114  }, [basketFlash]);
4115  var slotButton = Object(jsx_runtime["jsx"])(jsx_runtime["Fragment"], {});
4116  if (!props.HideBookSlot) {
4117    if (props.SlotSelected) {
4118      slotButton = Object(jsx_runtime["jsx"])(ChangeSlotButton, {});
4119    } else {
4120      slotButton = Object(jsx_runtime["jsx"])(BookSlotButton, {});
4121    }
4122  }
4123  var rightChildren = Object(jsx_runtime["jsxs"])(jsx_runtime["Fragment"], {
4124    children: [Object(jsx_runtime["jsx"])(LocationFinderButton, {}), Object(jsx_runtime["jsx"])(UserLoginButton, {})]
4125  });
4126  if (!HideBasketButton) {
4127    rightChildren = Object(jsx_runtime["jsxs"])(jsx_runtime["Fragment"], {
4128      children: [Object(jsx_runtime["jsx"])(LocationFinderButton, {}), Object(jsx_runtime["jsx"])(UserLoginButton, {}), Object(jsx_runtime["jsx"])(BasketSummary, {
4129        basketFlash: state.DoBasketFlash,
4130        items: state.BasketItems
4131      })]
4132    });
4133  }
4134  return Object(jsx_runtime["jsx"])(HeaderContext["a" /* HeaderContext */].Provider, Object.assign({
4135    value: props
4136  }, {
4137    children: Object(jsx_runtime["jsx"])(HeaderTemplate, {
4138      leftChildren: slotButton,
4139      rightChildren: rightChildren
4140    })
4141  }));
4142}
4143
4144/***/ }),
4145
4146/***/ 70:
4147/***/ (function(module, exports) {
vendor: 5,420 bytes, lines 4148-4333
4148
4149// shim for using process in browser
4150var process = module.exports = {};
4151
4152// cached from whatever global is present so that test runners that stub it
4153// don't break things.  But we need to wrap it in a try catch in case it is
4154// wrapped in strict mode code which doesn't define any globals.  It's inside a
4155// function because try/catches deoptimize in certain engines.
4156
4157var cachedSetTimeout;
4158var cachedClearTimeout;
4159
4160function defaultSetTimout() {
4161    throw new Error('setTimeout has not been defined');
4162}
4163function defaultClearTimeout () {
4164    throw new Error('clearTimeout has not been defined');
4165}
4166(function () {
4167    try {
4168        if (typeof setTimeout === 'function') {
4169            cachedSetTimeout = setTimeout;
4170        } else {
4171            cachedSetTimeout = defaultSetTimout;
4172        }
4173    } catch (e) {
4174        cachedSetTimeout = defaultSetTimout;
4175    }
4176    try {
4177        if (typeof clearTimeout === 'function') {
4178            cachedClearTimeout = clearTimeout;
4179        } else {
4180            cachedClearTimeout = defaultClearTimeout;
4181        }
4182    } catch (e) {
4183        cachedClearTimeout = defaultClearTimeout;
4184    }
4185} ())
4186function runTimeout(fun) {
4187    if (cachedSetTimeout === setTimeout) {
4188        //normal enviroments in sane situations
4189        return setTimeout(fun, 0);
4190    }
4191    // if setTimeout wasn't available but was latter defined
4192    if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
4193        cachedSetTimeout = setTimeout;
4194        return setTimeout(fun, 0);
4195    }
4196    try {
4197        // when when somebody has screwed with setTimeout but no I.E. maddness
4198        return cachedSetTimeout(fun, 0);
4199    } catch(e){
4200        try {
4201            // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
4202            return cachedSetTimeout.call(null, fun, 0);
4203        } catch(e){
4204            // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
4205            return cachedSetTimeout.call(this, fun, 0);
4206        }
4207    }
4208
4209
4210}
4211function runClearTimeout(marker) {
4212    if (cachedClearTimeout === clearTimeout) {
4213        //normal enviroments in sane situations
4214        return clearTimeout(marker);
4215    }
4216    // if clearTimeout wasn't available but was latter defined
4217    if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
4218        cachedClearTimeout = clearTimeout;
4219        return clearTimeout(marker);
4220    }
4221    try {
4222        // when when somebody has screwed with setTimeout but no I.E. maddness
4223        return cachedClearTimeout(marker);
4224    } catch (e){
4225        try {
4226            // When we are in I.E. but the script has been evaled so I.E. doesn't  trust the global object when called normally
4227            return cachedClearTimeout.call(null, marker);
4228        } catch (e){
4229            // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
4230            // Some versions of I.E. have different rules for clearTimeout vs setTimeout
4231            return cachedClearTimeout.call(this, marker);
4232        }
4233    }
4234
4235
4236
4237}
4238var queue = [];
4239var draining = false;
4240var currentQueue;
4241var queueIndex = -1;
4242
4243function cleanUpNextTick() {
4244    if (!draining || !currentQueue) {
4245        return;
4246    }
4247    draining = false;
4248    if (currentQueue.length) {
4249        queue = currentQueue.concat(queue);
4250    } else {
4251        queueIndex = -1;
4252    }
4253    if (queue.length) {
4254        drainQueue();
4255    }
4256}
4257
4258function drainQueue() {
4259    if (draining) {
4260        return;
4261    }
4262    var timeout = runTimeout(cleanUpNextTick);
4263    draining = true;
4264
4265    var len = queue.length;
4266    while(len) {
4267        currentQueue = queue;
4268        queue = [];
4269        while (++queueIndex < len) {
4270            if (currentQueue) {
4271                currentQueue[queueIndex].run();
4272            }
4273        }
4274        queueIndex = -1;
4275        len = queue.length;
4276    }
4277    currentQueue = null;
4278    draining = false;
4279    runClearTimeout(timeout);
4280}
4281
4282process.nextTick = function (fun) {
4283    var args = new Array(arguments.length - 1);
4284    if (arguments.length > 1) {
4285        for (var i = 1; i < arguments.length; i++) {
4286            args[i - 1] = arguments[i];
4287        }
4288    }
4289    queue.push(new Item(fun, args));
4290    if (queue.length === 1 && !draining) {
4291        runTimeout(drainQueue);
4292    }
4293};
4294
4295// v8 likes predictible objects
4296function Item(fun, array) {
4297    this.fun = fun;
4298    this.array = array;
4299}
4300Item.prototype.run = function () {
4301    this.fun.apply(null, this.array);
4302};
4303process.title = 'browser';
4304process.browser = true;
4305process.env = {};
4306process.argv = [];
4307process.version = ''; // empty string to avoid regexp issues
4308process.versions = {};
4309
4310function noop() {}
4311
4312process.on = noop;
4313process.addListener = noop;
4314process.once = noop;
4315process.off = noop;
4316process.removeListener = noop;
4317process.removeAllListeners = noop;
4318process.emit = noop;
4319process.prependListener = noop;
4320process.prependOnceListener = noop;
4321
4322process.listeners = function (name) { return [] }
4323
4324process.binding = function (name) {
4325    throw new Error('process.binding is not supported');
4326};
4327
4328process.cwd = function () { return '/' };
4329process.chdir = function (dir) {
4330    throw new Error('process.chdir is not supported');
4331};
4332process.umask = function() { return 0; };
4333
4334
4335/***/ }),
4336
4337/***/ 76:
4338/***/ (function(module, exports) {
4339
4340module.exports = function(module) {
4341	if (!module.webpackPolyfill) {
4342		module.deprecate = function() {};
4343		module.paths = [];
4344		// module.parent = undefined by default
4345		if (!module.children) module.children = [];
4346		Object.defineProperty(module, "loaded", {
4347			enumerable: true,
4348			get: function() {
4349				return module.l;
4350			}
4351		});
4352		Object.defineProperty(module, "id", {
4353			enumerable: true,
4354			get: function() {
4355				return module.i;
4356			}
4357		});
4358		module.webpackPolyfill = 1;
4359	}
4360	return module;
4361};
4362
4363
4364/***/ })
4365
4366},[[1117,0,1]]]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.