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AC,SAAS0U,EAAE/B,GAAG,GAAGA,EAAE,MAAM,4BAA4B8K,mBAAmB9K,IAAI,CAAC,SAAS8B,EAAE9B,EAAE3S,EAAE6S,GAAG,MAAMgC,EAAEN,EAAEkD,IAAIzX,IAAI,CAAC,EAAE,IAAI,MAAMA,KAAK,MAAM6U,GAAG,OAAOwwB,EAAExwB,EAAEhC,SAAI,EAAOwyB,EAAEmE,YAAY,GAAG,CAAC,IAAInE,EAAErlC,EAAE2S,EAAE,CAAC4B,EAAEsD,IAAI7X,EAAE,CAAC,CAAC6S,GAAG,CAACuZ,MAAMzZ,IAAI","sources":["webpack://@nitro/gatsby-harvia.com/../node_modules/@gatsbyjs/reach-router/lib/history.js","webpack://@nitro/gatsby-harvia.com/../node_modules/@gatsbyjs/reach-router/lib/utils.js","webpack://@nitro/gatsby-harvia.com/../node_modules/@loadable/component/dist/cjs/loadable.cjs.js","webpack://@nitro/gatsby-harvia.com/../node_modules/gatsby-page-utils/dist/apply-trailing-slash-option.js","webpack://@nitro/gatsby-harvia.com/../node_modules/gatsby/dist/internal-plugins/partytown/gatsby-browser.js","webpack://@nitro/gatsby-harvia.com/../node_modules/gatsby/dist/internal-plugins/partytown/utils/get-forwards.js","webpack://@nitro/gatsby-harvia.com/../node_modules/gatsby/dist/internal-plugins/partytown/utils/inject-partytown-snippet.js","webpack://@nitro/gatsby-harvia.com/../node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js","webpack://@nitro/gatsby-harvia.com/../node_modules/react-icons/lib/esm/iconsManifest.js","webpack://@nitro/gatsby-harvia.com/../node_modules/react-icons/lib/esm/iconContext.js","webpack://@nitro/gatsby-harvia.com/../node_modules/react-icons/lib/esm/iconBase.js","webpack://@nitro/gatsby-harvia.com/../node_modules/react-is/cjs/react-is.production.min.js","webpack://@nitro/gatsby-harvia.com/../node_modules/react-is/index.js","webpack://@nitro/gatsby-harvia.com/../node_modules/gatsby-react-router-scroll/index.js","webpack://@nitro/gatsby-harvia.com/../node_modules/gatsby-react-router-scroll/scroll-handler.js","webpack://@nitro/gatsby-harvia.com/../node_modules/gatsby-react-router-scroll/session-storage.js","webpack://@nitro/gatsby-harvia.com/../node_modules/gatsby-react-router-scroll/use-scroll-restoration.js","webpack://@nitro/gatsby-harvia.com/./.cache/_this_is_virtual_fs_path_/$virtual/async-requires.js","webpack://@nitro/gatsby-harvia.com/./.cache/api-runner-browser-plugins.js","webpack://@nitro/gatsby-harvia.com/./.cache/api-runner-browser.js","webpack://@nitro/gatsby-harvia.com/./.cache/emitter.js","webpack://@nitro/gatsby-harvia.com/../node_modules/mitt/dist/mitt.es.js","webpack://@nitro/gatsby-harvia.com/./.cache/normalize-page-path.js","webpack://@nitro/gatsby-harvia.com/./.cache/find-path.js","webpack://@nitro/gatsby-harvia.com/./.cache/static-query.js","webpack://@nitro/gatsby-harvia.com/./.cache/gatsby-browser-entry.js","webpack://@nitro/gatsby-harvia.com/./.cache/prefetch.js","webpack://@nitro/gatsby-harvia.com/./.cache/loader.js","webpack://@nitro/gatsby-harvia.com/./.cache/head/components/fire-callback-in-effect.js","webpack://@nitro/gatsby-harvia.com/./.cache/head/constants.js","webpack://@nitro/gatsby-harvia.com/./.cache/head/utils.js","webpack://@nitro/gatsby-harvia.com/./.cache/head/head-export-handler-for-browser.js","webpack://@nitro/gatsby-harvia.com/./.cache/page-renderer.js","webpack://@nitro/gatsby-harvia.com/./.cache/route-announcer-props.js","webpack://@nitro/gatsby-harvia.com/./.cache/navigation.js","webpack://@nitro/gatsby-harvia.com/../node_modules/shallow-compare/es/index.js","webpack://@nitro/gatsby-harvia.com/./.cache/ensure-resources.js","webpack://@nitro/gatsby-harvia.com/./.cache/production-app.js","webpack://@nitro/gatsby-harvia.com/./.cache/public-page-renderer-prod.js","webpack://@nitro/gatsby-harvia.com/./.cache/public-page-renderer.js","webpack://@nitro/gatsby-harvia.com/./.cache/react-dom-utils.js","webpack://@nitro/gatsby-harvia.com/./.cache/react-lifecycles-compat.js","webpack://@nitro/gatsby-harvia.com/./.cache/redirect-utils.js","webpack://@nitro/gatsby-harvia.com/./.cache/register-service-worker.js","webpack://@nitro/gatsby-harvia.com/./.cache/strip-prefix.js","webpack://@nitro/gatsby-harvia.com/../node_modules/gatsby-plugin-canonical-urls/gatsby-browser.js","webpack://@nitro/gatsby-harvia.com/../node_modules/gatsby-plugin-google-tagmanager/gatsby-browser.js","webpack://@nitro/gatsby-harvia.com/../node_modules/gatsby-plugin-loadable-components-ssr/gatsby-browser.js","webpack://@nitro/gatsby-harvia.com/../node_modules/gatsby-plugin-manifest/gatsby-browser.js","webpack://@nitro/gatsby-harvia.com/../node_modules/gatsby-plugin-manifest/get-manifest-pathname.js","webpack://@nitro/gatsby-harvia.com/./gatsby-ssr.tsx","webpack://@nitro/gatsby-harvia.com/../gatsby-theme-harvia/src/components/atoms/Button.module.scss","webpack://@nitro/gatsby-harvia.com/../gatsby-theme-harvia/src/components/atoms/Button.tsx","webpack://@nitro/gatsby-harvia.com/../gatsby-theme-harvia/src/components/atoms/ExternalLink.tsx","webpack://@nitro/gatsby-harvia.com/../gatsby-theme-harvia/src/components/dato/DatoLinkList.tsx","webpack://@nitro/gatsby-harvia.com/../gatsby-theme-harvia/src/components/dato/DatoLinkToRecord.tsx","webpack://@nitro/gatsby-harvia.com/../gatsby-theme-harvia/src/components/organisms/localeDialog/localeLabels.ts","webpack://@nitro/gatsby-harvia.com/../gatsby-theme-harvia/src/components/molecules/ModalDialog.tsx","webpack://@nitro/gatsby-harvia.com/../gatsby-theme-harvia/src/components/molecules/ModalDialog.module.scss","webpack://@nitro/gatsby-harvia.com/../gatsby-theme-harvia/src/components/organisms/localeDialog/LocaleDialogAreaMenu.tsx","webpack://@nitro/gatsby-harvia.com/../gatsby-theme-harvia/src/components/organisms/localeDialog/LocaleDialogAreaMenu.module.scss","webpack://@nitro/gatsby-harvia.com/../gatsby-theme-harvia/src/components/organisms/localeDialog/localeOptions.ts","webpack://@nitro/gatsby-harvia.com/../gatsby-theme-harvia/src/components/organisms/localeDialog/LocaleDialog.tsx","webpack://@nitro/gatsby-harvia.com/../gatsby-theme-harvia/src/components/organisms/localeDialog/LocaleDialog.module.scss","webpack://@nitro/gatsby-harvia.com/../gatsby-theme-harvia/src/components/dato/DatoLocaleDialog.tsx","webpack://@nitro/gatsby-harvia.com/../gatsby-theme-harvia/src/context/LocaleDialogContext.tsx","webpack://@nitro/gatsby-harvia.com/../gatsby-theme-harvia/src/context/PageContext.tsx","webpack://@nitro/gatsby-harvia.com/../gatsby-theme-harvia/src/context/UserContext.tsx","webpack://@nitro/gatsby-harvia.com/../gatsby-theme-harvia/src/hooks/useArticlePath.ts","webpack://@nitro/gatsby-harvia.com/../gatsby-theme-harvia/src/hooks/useProductPath.ts","webpack://@nitro/gatsby-harvia.com/../gatsby-theme-harvia/src/hooks/useRoutePath.ts","webpack://@nitro/gatsby-harvia.com/../gatsby-theme-harvia/src/hooks/useWebsite.ts","webpack://@nitro/gatsby-harvia.com/../gatsby-theme-harvia/src/types.ts","webpack://@nitro/gatsby-harvia.com/../gatsby-theme-harvia/src/utils.ts","webpack://@nitro/gatsby-harvia.com/../node_modules/@gatsbyjs/reach-router/es/lib/utils.js","webpack://@nitro/gatsby-harvia.com/../node_modules/@gatsbyjs/reach-router/es/lib/history.js","webpack://@nitro/gatsby-harvia.com/../node_modules/@gatsbyjs/reach-router/es/index.js","webpack://@nitro/gatsby-harvia.com/../node_modules/invariant/browser.js","webpack://@nitro/gatsby-harvia.com/../node_modules/@babel/runtime/helpers/assertThisInitialized.js","webpack://@nitro/gatsby-harvia.com/../node_modules/@babel/runtime/helpers/extends.js","webpack://@nitro/gatsby-harvia.com/../node_modules/@babel/runtime/helpers/inheritsLoose.js","webpack://@nitro/gatsby-harvia.com/../node_modules/@babel/runtime/helpers/interopRequireDefault.js","webpack://@nitro/gatsby-harvia.com/../node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js","webpack://@nitro/gatsby-harvia.com/../node_modules/@babel/runtime/helpers/setPrototypeOf.js","webpack://@nitro/gatsby-harvia.com/../node_modules/@builder.io/partytown/integration/index.cjs","webpack://@nitro/gatsby-harvia.com/../node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://@nitro/gatsby-harvia.com/../node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@nitro/gatsby-harvia.com/../node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js","webpack://@nitro/gatsby-harvia.com/../node_modules/@babel/runtime/helpers/esm/toConsumableArray.js","webpack://@nitro/gatsby-harvia.com/../node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js","webpack://@nitro/gatsby-harvia.com/../node_modules/@babel/runtime/helpers/esm/iterableToArray.js","webpack://@nitro/gatsby-harvia.com/../node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js","webpack://@nitro/gatsby-harvia.com/../node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js","webpack://@nitro/gatsby-harvia.com/../node_modules/gatsby-link/dist/index.modern.mjs","webpack://@nitro/gatsby-harvia.com/../node_modules/gatsby-script/dist/index.modern.mjs"],"sourcesContent":["\"use strict\";\n\nexports.__esModule = true;\nvar _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n};\nvar getLocation = function getLocation(source) {\n var _source$location = source.location,\n search = _source$location.search,\n hash = _source$location.hash,\n href = _source$location.href,\n origin = _source$location.origin,\n protocol = _source$location.protocol,\n host = _source$location.host,\n hostname = _source$location.hostname,\n port = _source$location.port;\n var pathname = source.location.pathname;\n if (!pathname && href && canUseDOM) {\n var url = new URL(href);\n pathname = url.pathname;\n }\n return {\n pathname: encodeURI(decodeURI(pathname)),\n search: search,\n hash: hash,\n href: href,\n origin: origin,\n protocol: protocol,\n host: host,\n hostname: hostname,\n port: port,\n state: source.history.state,\n key: source.history.state && source.history.state.key || \"initial\"\n };\n};\nvar createHistory = function createHistory(source, options) {\n var listeners = [];\n var location = getLocation(source);\n var transitioning = false;\n var resolveTransition = function resolveTransition() {};\n return {\n get location() {\n return location;\n },\n get transitioning() {\n return transitioning;\n },\n _onTransitionComplete: function _onTransitionComplete() {\n transitioning = false;\n resolveTransition();\n },\n listen: function listen(listener) {\n listeners.push(listener);\n var popstateListener = function popstateListener() {\n location = getLocation(source);\n listener({\n location: location,\n action: \"POP\"\n });\n };\n source.addEventListener(\"popstate\", popstateListener);\n return function () {\n source.removeEventListener(\"popstate\", popstateListener);\n listeners = listeners.filter(function (fn) {\n return fn !== listener;\n });\n };\n },\n navigate: function navigate(to) {\n var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n state = _ref.state,\n _ref$replace = _ref.replace,\n replace = _ref$replace === undefined ? false : _ref$replace;\n if (typeof to === \"number\") {\n source.history.go(to);\n } else {\n state = _extends({}, state, {\n key: Date.now() + \"\"\n });\n // try...catch iOS Safari limits to 100 pushState calls\n try {\n if (transitioning || replace) {\n source.history.replaceState(state, null, to);\n } else {\n source.history.pushState(state, null, to);\n }\n } catch (e) {\n source.location[replace ? \"replace\" : \"assign\"](to);\n }\n }\n location = getLocation(source);\n transitioning = true;\n var transition = new Promise(function (res) {\n return resolveTransition = res;\n });\n listeners.forEach(function (listener) {\n return listener({\n location: location,\n action: \"PUSH\"\n });\n });\n return transition;\n }\n };\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// Stores history entries in memory for testing or other platforms like Native\nvar createMemorySource = function createMemorySource() {\n var initialPath = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : \"/\";\n var searchIndex = initialPath.indexOf(\"?\");\n var initialLocation = {\n pathname: searchIndex > -1 ? initialPath.substr(0, searchIndex) : initialPath,\n search: searchIndex > -1 ? initialPath.substr(searchIndex) : \"\"\n };\n var index = 0;\n var stack = [initialLocation];\n var states = [null];\n return {\n get location() {\n return stack[index];\n },\n addEventListener: function addEventListener(name, fn) {},\n removeEventListener: function removeEventListener(name, fn) {},\n history: {\n get entries() {\n return stack;\n },\n get index() {\n return index;\n },\n get state() {\n return states[index];\n },\n pushState: function pushState(state, _, uri) {\n var _uri$split = uri.split(\"?\"),\n pathname = _uri$split[0],\n _uri$split$ = _uri$split[1],\n search = _uri$split$ === undefined ? \"\" : _uri$split$;\n index++;\n stack.push({\n pathname: pathname,\n search: search.length ? \"?\" + search : search\n });\n states.push(state);\n },\n replaceState: function replaceState(state, _, uri) {\n var _uri$split2 = uri.split(\"?\"),\n pathname = _uri$split2[0],\n _uri$split2$ = _uri$split2[1],\n search = _uri$split2$ === undefined ? \"\" : _uri$split2$;\n stack[index] = {\n pathname: pathname,\n search: search\n };\n states[index] = state;\n },\n go: function go(to) {\n var newIndex = index + to;\n if (newIndex < 0 || newIndex > states.length - 1) {\n return;\n }\n index = newIndex;\n }\n }\n };\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// global history - uses window.history as the source if available, otherwise a\n// memory history\nvar canUseDOM = !!(typeof window !== \"undefined\" && window.document && window.document.createElement);\nvar getSource = function getSource() {\n return canUseDOM ? window : createMemorySource();\n};\nvar globalHistory = createHistory(getSource());\nvar navigate = globalHistory.navigate;\n\n////////////////////////////////////////////////////////////////////////////////\n\nexports.globalHistory = globalHistory;\nexports.navigate = navigate;\nexports.createHistory = createHistory;\nexports.createMemorySource = createMemorySource;","\"use strict\";\n\nexports.__esModule = true;\nexports.shallowCompare = exports.validateRedirect = exports.insertParams = exports.resolve = exports.match = exports.pick = exports.startsWith = undefined;\nvar _invariant = require(\"invariant\");\nvar _invariant2 = _interopRequireDefault(_invariant);\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\n\n////////////////////////////////////////////////////////////////////////////////\n// startsWith(string, search) - Check if `string` starts with `search`\nvar startsWith = function startsWith(string, search) {\n return string.substr(0, search.length) === search;\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// pick(routes, uri)\n//\n// Ranks and picks the best route to match. Each segment gets the highest\n// amount of points, then the type of segment gets an additional amount of\n// points where\n//\n// static > dynamic > splat > root\n//\n// This way we don't have to worry about the order of our routes, let the\n// computers do it.\n//\n// A route looks like this\n//\n// { path, default, value }\n//\n// And a returned match looks like:\n//\n// { route, params, uri }\n//\n// I know, I should use TypeScript not comments for these types.\nvar pick = function pick(routes, uri) {\n var match = void 0;\n var default_ = void 0;\n var _uri$split = uri.split(\"?\"),\n uriPathname = _uri$split[0];\n var uriSegments = segmentize(uriPathname);\n var isRootUri = uriSegments[0] === \"\";\n var ranked = rankRoutes(routes);\n for (var i = 0, l = ranked.length; i < l; i++) {\n var missed = false;\n var route = ranked[i].route;\n if (route.default) {\n default_ = {\n route: route,\n params: {},\n uri: uri\n };\n continue;\n }\n var routeSegments = segmentize(route.path);\n var params = {};\n var max = Math.max(uriSegments.length, routeSegments.length);\n var index = 0;\n for (; index < max; index++) {\n var routeSegment = routeSegments[index];\n var uriSegment = uriSegments[index];\n if (isSplat(routeSegment)) {\n // Hit a splat, just grab the rest, and return a match\n // uri: /files/documents/work\n // route: /files/*\n var param = routeSegment.slice(1) || \"*\";\n params[param] = uriSegments.slice(index).map(decodeURIComponent).join(\"/\");\n break;\n }\n if (uriSegment === undefined) {\n // URI is shorter than the route, no match\n // uri: /users\n // route: /users/:userId\n missed = true;\n break;\n }\n var dynamicMatch = paramRe.exec(routeSegment);\n if (dynamicMatch && !isRootUri) {\n var matchIsNotReserved = reservedNames.indexOf(dynamicMatch[1]) === -1;\n !matchIsNotReserved ? process.env.NODE_ENV !== \"production\" ? (0, _invariant2.default)(false, \" dynamic segment \\\"\" + dynamicMatch[1] + \"\\\" is a reserved name. Please use a different name in path \\\"\" + route.path + \"\\\".\") : (0, _invariant2.default)(false) : void 0;\n var value = decodeURIComponent(uriSegment);\n params[dynamicMatch[1]] = value;\n } else if (routeSegment !== uriSegment) {\n // Current segments don't match, not dynamic, not splat, so no match\n // uri: /users/123/settings\n // route: /users/:id/profile\n missed = true;\n break;\n }\n }\n if (!missed) {\n match = {\n route: route,\n params: params,\n uri: \"/\" + uriSegments.slice(0, index).join(\"/\")\n };\n break;\n }\n }\n return match || default_ || null;\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// match(path, uri) - Matches just one path to a uri, also lol\nvar match = function match(path, uri) {\n return pick([{\n path: path\n }], uri);\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// resolve(to, basepath)\n//\n// Resolves URIs as though every path is a directory, no files. Relative URIs\n// in the browser can feel awkward because not only can you be \"in a directory\"\n// you can be \"at a file\", too. For example\n//\n// browserSpecResolve('foo', '/bar/') => /bar/foo\n// browserSpecResolve('foo', '/bar') => /foo\n//\n// But on the command line of a file system, it's not as complicated, you can't\n// `cd` from a file, only directories. This way, links have to know less about\n// their current path. To go deeper you can do this:\n//\n// \n// // instead of\n// \n//\n// Just like `cd`, if you want to go deeper from the command line, you do this:\n//\n// cd deeper\n// # not\n// cd $(pwd)/deeper\n//\n// By treating every path as a directory, linking to relative paths should\n// require less contextual information and (fingers crossed) be more intuitive.\nvar resolve = function resolve(to, base) {\n // /foo/bar, /baz/qux => /foo/bar\n if (startsWith(to, \"/\")) {\n return to;\n }\n var _to$split = to.split(\"?\"),\n toPathname = _to$split[0],\n toQuery = _to$split[1];\n var _base$split = base.split(\"?\"),\n basePathname = _base$split[0];\n var toSegments = segmentize(toPathname);\n var baseSegments = segmentize(basePathname);\n\n // ?a=b, /users?b=c => /users?a=b\n if (toSegments[0] === \"\") {\n return addQuery(basePathname, toQuery);\n }\n\n // profile, /users/789 => /users/789/profile\n if (!startsWith(toSegments[0], \".\")) {\n var pathname = baseSegments.concat(toSegments).join(\"/\");\n return addQuery((basePathname === \"/\" ? \"\" : \"/\") + pathname, toQuery);\n }\n\n // ./ /users/123 => /users/123\n // ../ /users/123 => /users\n // ../.. /users/123 => /\n // ../../one /a/b/c/d => /a/b/one\n // .././one /a/b/c/d => /a/b/c/one\n var allSegments = baseSegments.concat(toSegments);\n var segments = [];\n for (var i = 0, l = allSegments.length; i < l; i++) {\n var segment = allSegments[i];\n if (segment === \"..\") segments.pop();else if (segment !== \".\") segments.push(segment);\n }\n return addQuery(\"/\" + segments.join(\"/\"), toQuery);\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// insertParams(path, params)\n\nvar insertParams = function insertParams(path, params) {\n var _path$split = path.split(\"?\"),\n pathBase = _path$split[0],\n _path$split$ = _path$split[1],\n query = _path$split$ === undefined ? \"\" : _path$split$;\n var segments = segmentize(pathBase);\n var constructedPath = \"/\" + segments.map(function (segment) {\n var match = paramRe.exec(segment);\n return match ? params[match[1]] : segment;\n }).join(\"/\");\n var _params$location = params.location;\n _params$location = _params$location === undefined ? {} : _params$location;\n var _params$location$sear = _params$location.search,\n search = _params$location$sear === undefined ? \"\" : _params$location$sear;\n var searchSplit = search.split(\"?\")[1] || \"\";\n constructedPath = addQuery(constructedPath, query, searchSplit);\n return constructedPath;\n};\nvar validateRedirect = function validateRedirect(from, to) {\n var filter = function filter(segment) {\n return isDynamic(segment);\n };\n var fromString = segmentize(from).filter(filter).sort().join(\"/\");\n var toString = segmentize(to).filter(filter).sort().join(\"/\");\n return fromString === toString;\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// Junk\nvar paramRe = /^:(.+)/;\nvar SEGMENT_POINTS = 4;\nvar STATIC_POINTS = 3;\nvar DYNAMIC_POINTS = 2;\nvar SPLAT_PENALTY = 1;\nvar ROOT_POINTS = 1;\nvar isRootSegment = function isRootSegment(segment) {\n return segment === \"\";\n};\nvar isDynamic = function isDynamic(segment) {\n return paramRe.test(segment);\n};\nvar isSplat = function isSplat(segment) {\n return segment && segment[0] === \"*\";\n};\nvar rankRoute = function rankRoute(route, index) {\n var score = route.default ? 0 : segmentize(route.path).reduce(function (score, segment) {\n score += SEGMENT_POINTS;\n if (isRootSegment(segment)) score += ROOT_POINTS;else if (isDynamic(segment)) score += DYNAMIC_POINTS;else if (isSplat(segment)) score -= SEGMENT_POINTS + SPLAT_PENALTY;else score += STATIC_POINTS;\n return score;\n }, 0);\n return {\n route: route,\n score: score,\n index: index\n };\n};\nvar rankRoutes = function rankRoutes(routes) {\n return routes.map(rankRoute).sort(function (a, b) {\n return a.score < b.score ? 1 : a.score > b.score ? -1 : a.index - b.index;\n });\n};\nvar segmentize = function segmentize(uri) {\n return uri\n // strip starting/ending slashes\n .replace(/(^\\/+|\\/+$)/g, \"\").split(\"/\");\n};\nvar addQuery = function addQuery(pathname) {\n for (var _len = arguments.length, query = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n query[_key - 1] = arguments[_key];\n }\n query = query.filter(function (q) {\n return q && q.length > 0;\n });\n return pathname + (query && query.length > 0 ? \"?\" + query.join(\"&\") : \"\");\n};\nvar reservedNames = [\"uri\", \"path\"];\n\n/**\n * Shallow compares two objects.\n * @param {Object} obj1 The first object to compare.\n * @param {Object} obj2 The second object to compare.\n */\nvar shallowCompare = function shallowCompare(obj1, obj2) {\n var obj1Keys = Object.keys(obj1);\n return obj1Keys.length === Object.keys(obj2).length && obj1Keys.every(function (key) {\n return obj2.hasOwnProperty(key) && obj1[key] === obj2[key];\n });\n};\n\n////////////////////////////////////////////////////////////////////////////////\nexports.startsWith = startsWith;\nexports.pick = pick;\nexports.match = match;\nexports.resolve = resolve;\nexports.insertParams = insertParams;\nexports.validateRedirect = validateRedirect;\nexports.shallowCompare = shallowCompare;","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\nfunction _interopDefault(ex) {\n return ex && typeof ex === 'object' && 'default' in ex ? ex['default'] : ex;\n}\nvar React = _interopDefault(require('react'));\nvar _objectWithoutPropertiesLoose = _interopDefault(require('@babel/runtime/helpers/objectWithoutPropertiesLoose'));\nvar _extends = _interopDefault(require('@babel/runtime/helpers/extends'));\nvar _assertThisInitialized = _interopDefault(require('@babel/runtime/helpers/assertThisInitialized'));\nvar _inheritsLoose = _interopDefault(require('@babel/runtime/helpers/inheritsLoose'));\nvar hoistNonReactStatics = _interopDefault(require('hoist-non-react-statics'));\n\n/* eslint-disable import/prefer-default-export */\nfunction invariant(condition, message) {\n if (condition) return;\n var error = new Error(\"loadable: \" + message);\n error.framesToPop = 1;\n error.name = 'Invariant Violation';\n throw error;\n}\nfunction warn(message) {\n // eslint-disable-next-line no-console\n console.warn(\"loadable: \" + message);\n}\nvar Context = /*#__PURE__*/\nReact.createContext();\nvar LOADABLE_REQUIRED_CHUNKS_KEY = '__LOADABLE_REQUIRED_CHUNKS__';\nfunction getRequiredChunkKey(namespace) {\n return \"\" + namespace + LOADABLE_REQUIRED_CHUNKS_KEY;\n}\nvar sharedInternals = /*#__PURE__*/Object.freeze({\n __proto__: null,\n getRequiredChunkKey: getRequiredChunkKey,\n invariant: invariant,\n Context: Context\n});\nvar LOADABLE_SHARED = {\n initialChunks: {}\n};\nvar STATUS_PENDING = 'PENDING';\nvar STATUS_RESOLVED = 'RESOLVED';\nvar STATUS_REJECTED = 'REJECTED';\nfunction resolveConstructor(ctor) {\n if (typeof ctor === 'function') {\n return {\n requireAsync: ctor,\n resolve: function resolve() {\n return undefined;\n },\n chunkName: function chunkName() {\n return undefined;\n }\n };\n }\n return ctor;\n}\nvar withChunkExtractor = function withChunkExtractor(Component) {\n var LoadableWithChunkExtractor = function LoadableWithChunkExtractor(props) {\n return React.createElement(Context.Consumer, null, function (extractor) {\n return React.createElement(Component, Object.assign({\n __chunkExtractor: extractor\n }, props));\n });\n };\n if (Component.displayName) {\n LoadableWithChunkExtractor.displayName = Component.displayName + \"WithChunkExtractor\";\n }\n return LoadableWithChunkExtractor;\n};\nvar identity = function identity(v) {\n return v;\n};\nfunction createLoadable(_ref) {\n var _ref$defaultResolveCo = _ref.defaultResolveComponent,\n defaultResolveComponent = _ref$defaultResolveCo === void 0 ? identity : _ref$defaultResolveCo,\n _render = _ref.render,\n onLoad = _ref.onLoad;\n function loadable(loadableConstructor, options) {\n if (options === void 0) {\n options = {};\n }\n var ctor = resolveConstructor(loadableConstructor);\n var cache = {};\n /**\n * Cachekey represents the component to be loaded\n * if key changes - component has to be reloaded\n * @param props\n * @returns {null|Component}\n */\n\n function _getCacheKey(props) {\n if (options.cacheKey) {\n return options.cacheKey(props);\n }\n if (ctor.resolve) {\n return ctor.resolve(props);\n }\n return 'static';\n }\n /**\n * Resolves loaded `module` to a specific `Component\n * @param module\n * @param props\n * @param Loadable\n * @returns Component\n */\n\n function resolve(module, props, Loadable) {\n var Component = options.resolveComponent ? options.resolveComponent(module, props) : defaultResolveComponent(module); // FIXME: suppressed due to https://github.com/gregberge/loadable-components/issues/990\n // if (options.resolveComponent && !ReactIs.isValidElementType(Component)) {\n // throw new Error(\n // `resolveComponent returned something that is not a React component!`,\n // )\n // }\n\n hoistNonReactStatics(Loadable, Component, {\n preload: true\n });\n return Component;\n }\n var cachedLoad = function cachedLoad(props) {\n var cacheKey = _getCacheKey(props);\n var promise = cache[cacheKey];\n if (!promise || promise.status === STATUS_REJECTED) {\n promise = ctor.requireAsync(props);\n promise.status = STATUS_PENDING;\n cache[cacheKey] = promise;\n promise.then(function () {\n promise.status = STATUS_RESOLVED;\n }, function (error) {\n console.error('loadable-components: failed to asynchronously load component', {\n fileName: ctor.resolve(props),\n chunkName: ctor.chunkName(props),\n error: error ? error.message : error\n });\n promise.status = STATUS_REJECTED;\n });\n }\n return promise;\n };\n var InnerLoadable = /*#__PURE__*/\n function (_React$Component) {\n _inheritsLoose(InnerLoadable, _React$Component);\n InnerLoadable.getDerivedStateFromProps = function getDerivedStateFromProps(props, state) {\n var cacheKey = _getCacheKey(props);\n return _extends({}, state, {\n cacheKey: cacheKey,\n // change of a key triggers loading state automatically\n loading: state.loading || state.cacheKey !== cacheKey\n });\n };\n function InnerLoadable(props) {\n var _this;\n _this = _React$Component.call(this, props) || this;\n _this.state = {\n result: null,\n error: null,\n loading: true,\n cacheKey: _getCacheKey(props)\n };\n invariant(!props.__chunkExtractor || ctor.requireSync, 'SSR requires `@loadable/babel-plugin`, please install it'); // Server-side\n\n if (props.__chunkExtractor) {\n // This module has been marked with no SSR\n if (options.ssr === false) {\n return _assertThisInitialized(_this);\n } // We run load function, we assume that it won't fail and that it\n // triggers a synchronous loading of the module\n\n ctor.requireAsync(props)[\"catch\"](function () {\n return null;\n }); // So we can require now the module synchronously\n\n _this.loadSync();\n props.__chunkExtractor.addChunk(ctor.chunkName(props));\n return _assertThisInitialized(_this);\n } // Client-side with `isReady` method present (SSR probably)\n // If module is already loaded, we use a synchronous loading\n // Only perform this synchronous loading if the component has not\n // been marked with no SSR, else we risk hydration mismatches\n\n if (options.ssr !== false && (\n // is ready - was loaded in this session\n ctor.isReady && ctor.isReady(props) ||\n // is ready - was loaded during SSR process\n ctor.chunkName && LOADABLE_SHARED.initialChunks[ctor.chunkName(props)])) {\n _this.loadSync();\n }\n return _this;\n }\n var _proto = InnerLoadable.prototype;\n _proto.componentDidMount = function componentDidMount() {\n this.mounted = true; // retrieve loading promise from a global cache\n\n var cachedPromise = this.getCache(); // if promise exists, but rejected - clear cache\n\n if (cachedPromise && cachedPromise.status === STATUS_REJECTED) {\n this.setCache();\n } // component might be resolved synchronously in the constructor\n\n if (this.state.loading) {\n this.loadAsync();\n }\n };\n _proto.componentDidUpdate = function componentDidUpdate(prevProps, prevState) {\n // Component has to be reloaded on cacheKey change\n if (prevState.cacheKey !== this.state.cacheKey) {\n this.loadAsync();\n }\n };\n _proto.componentWillUnmount = function componentWillUnmount() {\n this.mounted = false;\n };\n _proto.safeSetState = function safeSetState(nextState, callback) {\n if (this.mounted) {\n this.setState(nextState, callback);\n }\n }\n /**\n * returns a cache key for the current props\n * @returns {Component|string}\n */;\n _proto.getCacheKey = function getCacheKey() {\n return _getCacheKey(this.props);\n }\n /**\n * access the persistent cache\n */;\n _proto.getCache = function getCache() {\n return cache[this.getCacheKey()];\n }\n /**\n * sets the cache value. If called without value sets it as undefined\n */;\n _proto.setCache = function setCache(value) {\n if (value === void 0) {\n value = undefined;\n }\n cache[this.getCacheKey()] = value;\n };\n _proto.triggerOnLoad = function triggerOnLoad() {\n var _this2 = this;\n if (onLoad) {\n setTimeout(function () {\n onLoad(_this2.state.result, _this2.props);\n });\n }\n }\n /**\n * Synchronously loads component\n * target module is expected to already exists in the module cache\n * or be capable to resolve synchronously (webpack target=node)\n */;\n _proto.loadSync = function loadSync() {\n // load sync is expecting component to be in the \"loading\" state already\n // sounds weird, but loading=true is the initial state of InnerLoadable\n if (!this.state.loading) return;\n try {\n var loadedModule = ctor.requireSync(this.props);\n var result = resolve(loadedModule, this.props, Loadable);\n this.state.result = result;\n this.state.loading = false;\n } catch (error) {\n console.error('loadable-components: failed to synchronously load component, which expected to be available', {\n fileName: ctor.resolve(this.props),\n chunkName: ctor.chunkName(this.props),\n error: error ? error.message : error\n });\n this.state.error = error;\n }\n }\n /**\n * Asynchronously loads a component.\n */;\n _proto.loadAsync = function loadAsync() {\n var _this3 = this;\n var promise = this.resolveAsync();\n promise.then(function (loadedModule) {\n var result = resolve(loadedModule, _this3.props, Loadable);\n _this3.safeSetState({\n result: result,\n loading: false\n }, function () {\n return _this3.triggerOnLoad();\n });\n })[\"catch\"](function (error) {\n return _this3.safeSetState({\n error: error,\n loading: false\n });\n });\n return promise;\n }\n /**\n * Asynchronously resolves(not loads) a component.\n * Note - this function does not change the state\n */;\n _proto.resolveAsync = function resolveAsync() {\n var _this$props = this.props,\n __chunkExtractor = _this$props.__chunkExtractor,\n forwardedRef = _this$props.forwardedRef,\n props = _objectWithoutPropertiesLoose(_this$props, [\"__chunkExtractor\", \"forwardedRef\"]);\n return cachedLoad(props);\n };\n _proto.render = function render() {\n var _this$props2 = this.props,\n forwardedRef = _this$props2.forwardedRef,\n propFallback = _this$props2.fallback,\n __chunkExtractor = _this$props2.__chunkExtractor,\n props = _objectWithoutPropertiesLoose(_this$props2, [\"forwardedRef\", \"fallback\", \"__chunkExtractor\"]);\n var _this$state = this.state,\n error = _this$state.error,\n loading = _this$state.loading,\n result = _this$state.result;\n if (options.suspense) {\n var cachedPromise = this.getCache() || this.loadAsync();\n if (cachedPromise.status === STATUS_PENDING) {\n throw this.loadAsync();\n }\n }\n if (error) {\n throw error;\n }\n var fallback = propFallback || options.fallback || null;\n if (loading) {\n return fallback;\n }\n return _render({\n fallback: fallback,\n result: result,\n options: options,\n props: _extends({}, props, {\n ref: forwardedRef\n })\n });\n };\n return InnerLoadable;\n }(React.Component);\n var EnhancedInnerLoadable = withChunkExtractor(InnerLoadable);\n var Loadable = React.forwardRef(function (props, ref) {\n return React.createElement(EnhancedInnerLoadable, Object.assign({\n forwardedRef: ref\n }, props));\n });\n Loadable.displayName = 'Loadable'; // In future, preload could use ``\n\n Loadable.preload = function (props) {\n Loadable.load(props);\n };\n Loadable.load = function (props) {\n return cachedLoad(props);\n };\n return Loadable;\n }\n function lazy(ctor, options) {\n return loadable(ctor, _extends({}, options, {\n suspense: true\n }));\n }\n return {\n loadable: loadable,\n lazy: lazy\n };\n}\nfunction defaultResolveComponent(loadedModule) {\n // eslint-disable-next-line no-underscore-dangle\n return loadedModule.__esModule ? loadedModule[\"default\"] : loadedModule[\"default\"] || loadedModule;\n}\n\n/* eslint-disable no-use-before-define, react/no-multi-comp */\n\nvar _createLoadable = /*#__PURE__*/\n createLoadable({\n defaultResolveComponent: defaultResolveComponent,\n render: function render(_ref) {\n var Component = _ref.result,\n props = _ref.props;\n return React.createElement(Component, props);\n }\n }),\n loadable = _createLoadable.loadable,\n lazy = _createLoadable.lazy;\n\n/* eslint-disable no-use-before-define, react/no-multi-comp */\n\nvar _createLoadable$1 = /*#__PURE__*/\n createLoadable({\n onLoad: function onLoad(result, props) {\n if (result && props.forwardedRef) {\n if (typeof props.forwardedRef === 'function') {\n props.forwardedRef(result);\n } else {\n props.forwardedRef.current = result;\n }\n }\n },\n render: function render(_ref) {\n var result = _ref.result,\n props = _ref.props;\n if (props.children) {\n return props.children(result);\n }\n return null;\n }\n }),\n loadable$1 = _createLoadable$1.loadable,\n lazy$1 = _createLoadable$1.lazy;\n\n/* eslint-disable no-underscore-dangle, camelcase */\nvar BROWSER = typeof window !== 'undefined';\nfunction loadableReady(done, _temp) {\n if (done === void 0) {\n done = function done() {};\n }\n var _ref = _temp === void 0 ? {} : _temp,\n _ref$namespace = _ref.namespace,\n namespace = _ref$namespace === void 0 ? '' : _ref$namespace,\n _ref$chunkLoadingGlob = _ref.chunkLoadingGlobal,\n chunkLoadingGlobal = _ref$chunkLoadingGlob === void 0 ? '__LOADABLE_LOADED_CHUNKS__' : _ref$chunkLoadingGlob;\n if (!BROWSER) {\n warn('`loadableReady()` must be called in browser only');\n done();\n return Promise.resolve();\n }\n var requiredChunks = null;\n if (BROWSER) {\n var id = getRequiredChunkKey(namespace);\n var dataElement = document.getElementById(id);\n if (dataElement) {\n requiredChunks = JSON.parse(dataElement.textContent);\n var extElement = document.getElementById(id + \"_ext\");\n if (extElement) {\n var _JSON$parse = JSON.parse(extElement.textContent),\n namedChunks = _JSON$parse.namedChunks;\n namedChunks.forEach(function (chunkName) {\n LOADABLE_SHARED.initialChunks[chunkName] = true;\n });\n } else {\n // version mismatch\n throw new Error('loadable-component: @loadable/server does not match @loadable/component');\n }\n }\n }\n if (!requiredChunks) {\n warn('`loadableReady()` requires state, please use `getScriptTags` or `getScriptElements` server-side');\n done();\n return Promise.resolve();\n }\n var resolved = false;\n return new Promise(function (resolve) {\n window[chunkLoadingGlobal] = window[chunkLoadingGlobal] || [];\n var loadedChunks = window[chunkLoadingGlobal];\n var originalPush = loadedChunks.push.bind(loadedChunks);\n function checkReadyState() {\n if (requiredChunks.every(function (chunk) {\n return loadedChunks.some(function (_ref2) {\n var chunks = _ref2[0];\n return chunks.indexOf(chunk) > -1;\n });\n })) {\n if (!resolved) {\n resolved = true;\n resolve();\n }\n }\n }\n loadedChunks.push = function () {\n originalPush.apply(void 0, arguments);\n checkReadyState();\n };\n checkReadyState();\n }).then(done);\n}\n\n/* eslint-disable no-underscore-dangle */\nvar loadable$2 = loadable;\nloadable$2.lib = loadable$1;\nvar lazy$2 = lazy;\nlazy$2.lib = lazy$1;\nvar __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = sharedInternals;\nexports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\nexports.default = loadable$2;\nexports.lazy = lazy$2;\nexports.loadableReady = loadableReady;","\"use strict\";\n\nexports.__esModule = true;\nexports.applyTrailingSlashOption = void 0;\n\n// TODO(v5): Remove legacy setting and default to \"always\"\nconst applyTrailingSlashOption = function (input) {\n let option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : `legacy`;\n const hasHtmlSuffix = input.endsWith(`.html`);\n const hasXmlSuffix = input.endsWith(`.xml`);\n const hasPdfSuffix = input.endsWith(`.pdf`);\n if (input === `/`) return input;\n if (hasHtmlSuffix || hasXmlSuffix || hasPdfSuffix) {\n option = `never`;\n }\n if (option === `always`) {\n return input.endsWith(`/`) ? input : `${input}/`;\n }\n if (option === `never`) {\n return input.endsWith(`/`) ? input.slice(0, -1) : input;\n }\n return input;\n};\nexports.applyTrailingSlashOption = applyTrailingSlashOption;","\"use strict\";\n\nexports.__esModule = true;\nexports.onInitialClientRender = void 0;\nvar _gatsbyScript = require(\"gatsby-script\");\nvar _injectPartytownSnippet = require(\"./utils/inject-partytown-snippet\");\n\n// Makes sure off-main-thread scripts are loaded in `gatsby develop`\nconst onInitialClientRender = () => {\n if (process.env.NODE_ENV !== `development`) {\n return;\n }\n (0, _injectPartytownSnippet.injectPartytownSnippet)(_gatsbyScript.collectedScriptsByPage.get(window.location.pathname)); // Clear scripts after we've used them to avoid leaky behavior\n\n _gatsbyScript.collectedScriptsByPage.delete(window.location.pathname);\n}; // Client-side navigation (CSR, e.g. Gatsby Link navigations) are broken upstream in Partytown.\n// We need an official API from Partytown for handling re-configuration and on-demand script loading.\n// Until then, `off-main-thread` scripts load only on server-side navigation (SSR).\n// See https://github.com/BuilderIO/partytown/issues/74 for more details.\n\nexports.onInitialClientRender = onInitialClientRender;","\"use strict\";\n\nexports.__esModule = true;\nexports.getForwards = getForwards;\nfunction getForwards(collectedScripts) {\n return collectedScripts === null || collectedScripts === void 0 ? void 0 : collectedScripts.flatMap(script => (script === null || script === void 0 ? void 0 : script.forward) || []);\n}","\"use strict\";\n\nexports.__esModule = true;\nexports.injectPartytownSnippet = injectPartytownSnippet;\nvar _integration = require(\"@builder.io/partytown/integration\");\nvar _getForwards = require(\"./get-forwards\");\n\n// Adapted from https://github.com/BuilderIO/partytown/blob/main/src/react/snippet.tsx to only include CSR logic\nfunction injectPartytownSnippet(collectedScripts) {\n if (!collectedScripts.length) {\n return;\n }\n const existingSnippet = document.querySelector(`script[data-partytown]`);\n const existingSandbox = document.querySelector(`iframe[src*=\"~partytown/partytown-sandbox-sw\"]`);\n if (existingSnippet) {\n existingSnippet.remove();\n }\n if (existingSandbox) {\n existingSandbox.remove();\n }\n const forwards = (0, _getForwards.getForwards)(collectedScripts);\n const snippet = document.createElement(`script`);\n snippet.dataset.partytown = ``;\n snippet.innerHTML = (0, _integration.partytownSnippet)({\n forward: forwards\n });\n document.head.appendChild(snippet);\n}","'use strict';\n\nvar reactIs = require('react-is');\n\n/**\n * Copyright 2015, Yahoo! Inc.\n * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.\n */\nvar REACT_STATICS = {\n childContextTypes: true,\n contextType: true,\n contextTypes: true,\n defaultProps: true,\n displayName: true,\n getDefaultProps: true,\n getDerivedStateFromError: true,\n getDerivedStateFromProps: true,\n mixins: true,\n propTypes: true,\n type: true\n};\nvar KNOWN_STATICS = {\n name: true,\n length: true,\n prototype: true,\n caller: true,\n callee: true,\n arguments: true,\n arity: true\n};\nvar FORWARD_REF_STATICS = {\n '$$typeof': true,\n render: true,\n defaultProps: true,\n displayName: true,\n propTypes: true\n};\nvar MEMO_STATICS = {\n '$$typeof': true,\n compare: true,\n defaultProps: true,\n displayName: true,\n propTypes: true,\n type: true\n};\nvar TYPE_STATICS = {};\nTYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS;\nTYPE_STATICS[reactIs.Memo] = MEMO_STATICS;\nfunction getStatics(component) {\n // React v16.11 and below\n if (reactIs.isMemo(component)) {\n return MEMO_STATICS;\n } // React v16.12 and above\n\n return TYPE_STATICS[component['$$typeof']] || REACT_STATICS;\n}\nvar defineProperty = Object.defineProperty;\nvar getOwnPropertyNames = Object.getOwnPropertyNames;\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nvar getPrototypeOf = Object.getPrototypeOf;\nvar objectPrototype = Object.prototype;\nfunction hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {\n if (typeof sourceComponent !== 'string') {\n // don't hoist over string (html) components\n if (objectPrototype) {\n var inheritedComponent = getPrototypeOf(sourceComponent);\n if (inheritedComponent && inheritedComponent !== objectPrototype) {\n hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);\n }\n }\n var keys = getOwnPropertyNames(sourceComponent);\n if (getOwnPropertySymbols) {\n keys = keys.concat(getOwnPropertySymbols(sourceComponent));\n }\n var targetStatics = getStatics(targetComponent);\n var sourceStatics = getStatics(sourceComponent);\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {\n var descriptor = getOwnPropertyDescriptor(sourceComponent, key);\n try {\n // Avoid failures from read-only properties\n defineProperty(targetComponent, key, descriptor);\n } catch (e) {}\n }\n }\n }\n return targetComponent;\n}\nmodule.exports = hoistNonReactStatics;","export var IconsManifest = [{\n \"id\": \"ci\",\n \"name\": \"Circum Icons\",\n \"projectUrl\": \"https://circumicons.com/\",\n \"license\": \"MPL-2.0 license\",\n \"licenseUrl\": \"https://github.com/Klarr-Agency/Circum-Icons/blob/main/LICENSE\"\n}, {\n \"id\": \"fa\",\n \"name\": \"Font Awesome 5\",\n \"projectUrl\": \"https://fontawesome.com/\",\n \"license\": \"CC BY 4.0 License\",\n \"licenseUrl\": \"https://creativecommons.org/licenses/by/4.0/\"\n}, {\n \"id\": \"fa6\",\n \"name\": \"Font Awesome 6\",\n \"projectUrl\": \"https://fontawesome.com/\",\n \"license\": \"CC BY 4.0 License\",\n \"licenseUrl\": \"https://creativecommons.org/licenses/by/4.0/\"\n}, {\n \"id\": \"io\",\n \"name\": \"Ionicons 4\",\n \"projectUrl\": \"https://ionicons.com/\",\n \"license\": \"MIT\",\n \"licenseUrl\": \"https://github.com/ionic-team/ionicons/blob/master/LICENSE\"\n}, {\n \"id\": \"io5\",\n \"name\": \"Ionicons 5\",\n \"projectUrl\": \"https://ionicons.com/\",\n \"license\": \"MIT\",\n \"licenseUrl\": \"https://github.com/ionic-team/ionicons/blob/master/LICENSE\"\n}, {\n \"id\": \"md\",\n \"name\": \"Material Design icons\",\n \"projectUrl\": \"http://google.github.io/material-design-icons/\",\n \"license\": \"Apache License Version 2.0\",\n \"licenseUrl\": \"https://github.com/google/material-design-icons/blob/master/LICENSE\"\n}, {\n \"id\": \"ti\",\n \"name\": \"Typicons\",\n \"projectUrl\": \"http://s-ings.com/typicons/\",\n \"license\": \"CC BY-SA 3.0\",\n \"licenseUrl\": \"https://creativecommons.org/licenses/by-sa/3.0/\"\n}, {\n \"id\": \"go\",\n \"name\": \"Github Octicons icons\",\n \"projectUrl\": \"https://octicons.github.com/\",\n \"license\": \"MIT\",\n \"licenseUrl\": \"https://github.com/primer/octicons/blob/master/LICENSE\"\n}, {\n \"id\": \"fi\",\n \"name\": \"Feather\",\n \"projectUrl\": \"https://feathericons.com/\",\n \"license\": \"MIT\",\n \"licenseUrl\": \"https://github.com/feathericons/feather/blob/master/LICENSE\"\n}, {\n \"id\": \"lu\",\n \"name\": \"Lucide\",\n \"projectUrl\": \"https://lucide.dev/\",\n \"license\": \"ISC\",\n \"licenseUrl\": \"https://github.com/lucide-icons/lucide/blob/main/LICENSE\"\n}, {\n \"id\": \"gi\",\n \"name\": \"Game Icons\",\n \"projectUrl\": \"https://game-icons.net/\",\n \"license\": \"CC BY 3.0\",\n \"licenseUrl\": \"https://creativecommons.org/licenses/by/3.0/\"\n}, {\n \"id\": \"wi\",\n \"name\": \"Weather Icons\",\n \"projectUrl\": \"https://erikflowers.github.io/weather-icons/\",\n \"license\": \"SIL OFL 1.1\",\n \"licenseUrl\": \"http://scripts.sil.org/OFL\"\n}, {\n \"id\": \"di\",\n \"name\": \"Devicons\",\n \"projectUrl\": \"https://vorillaz.github.io/devicons/\",\n \"license\": \"MIT\",\n \"licenseUrl\": \"https://opensource.org/licenses/MIT\"\n}, {\n \"id\": \"ai\",\n \"name\": \"Ant Design Icons\",\n \"projectUrl\": \"https://github.com/ant-design/ant-design-icons\",\n \"license\": \"MIT\",\n \"licenseUrl\": \"https://opensource.org/licenses/MIT\"\n}, {\n \"id\": \"bs\",\n \"name\": \"Bootstrap Icons\",\n \"projectUrl\": \"https://github.com/twbs/icons\",\n \"license\": \"MIT\",\n \"licenseUrl\": \"https://opensource.org/licenses/MIT\"\n}, {\n \"id\": \"ri\",\n \"name\": \"Remix Icon\",\n \"projectUrl\": \"https://github.com/Remix-Design/RemixIcon\",\n \"license\": \"Apache License Version 2.0\",\n \"licenseUrl\": \"http://www.apache.org/licenses/\"\n}, {\n \"id\": \"fc\",\n \"name\": \"Flat Color Icons\",\n \"projectUrl\": \"https://github.com/icons8/flat-color-icons\",\n \"license\": \"MIT\",\n \"licenseUrl\": \"https://opensource.org/licenses/MIT\"\n}, {\n \"id\": \"gr\",\n \"name\": \"Grommet-Icons\",\n \"projectUrl\": \"https://github.com/grommet/grommet-icons\",\n \"license\": \"Apache License Version 2.0\",\n \"licenseUrl\": \"http://www.apache.org/licenses/\"\n}, {\n \"id\": \"hi\",\n \"name\": \"Heroicons\",\n \"projectUrl\": \"https://github.com/tailwindlabs/heroicons\",\n \"license\": \"MIT\",\n \"licenseUrl\": \"https://opensource.org/licenses/MIT\"\n}, {\n \"id\": \"hi2\",\n \"name\": \"Heroicons 2\",\n \"projectUrl\": \"https://github.com/tailwindlabs/heroicons\",\n \"license\": \"MIT\",\n \"licenseUrl\": \"https://opensource.org/licenses/MIT\"\n}, {\n \"id\": \"si\",\n \"name\": \"Simple Icons\",\n \"projectUrl\": \"https://simpleicons.org/\",\n \"license\": \"CC0 1.0 Universal\",\n \"licenseUrl\": \"https://creativecommons.org/publicdomain/zero/1.0/\"\n}, {\n \"id\": \"sl\",\n \"name\": \"Simple Line Icons\",\n \"projectUrl\": \"https://thesabbir.github.io/simple-line-icons/\",\n \"license\": \"MIT\",\n \"licenseUrl\": \"https://opensource.org/licenses/MIT\"\n}, {\n \"id\": \"im\",\n \"name\": \"IcoMoon Free\",\n \"projectUrl\": \"https://github.com/Keyamoon/IcoMoon-Free\",\n \"license\": \"CC BY 4.0 License\",\n \"licenseUrl\": \"https://github.com/Keyamoon/IcoMoon-Free/blob/master/License.txt\"\n}, {\n \"id\": \"bi\",\n \"name\": \"BoxIcons\",\n \"projectUrl\": \"https://github.com/atisawd/boxicons\",\n \"license\": \"CC BY 4.0 License\",\n \"licenseUrl\": \"https://github.com/atisawd/boxicons/blob/master/LICENSE\"\n}, {\n \"id\": \"cg\",\n \"name\": \"css.gg\",\n \"projectUrl\": \"https://github.com/astrit/css.gg\",\n \"license\": \"MIT\",\n \"licenseUrl\": \"https://opensource.org/licenses/MIT\"\n}, {\n \"id\": \"vsc\",\n \"name\": \"VS Code Icons\",\n \"projectUrl\": \"https://github.com/microsoft/vscode-codicons\",\n \"license\": \"CC BY 4.0\",\n \"licenseUrl\": \"https://creativecommons.org/licenses/by/4.0/\"\n}, {\n \"id\": \"tb\",\n \"name\": \"Tabler Icons\",\n \"projectUrl\": \"https://github.com/tabler/tabler-icons\",\n \"license\": \"MIT\",\n \"licenseUrl\": \"https://opensource.org/licenses/MIT\"\n}, {\n \"id\": \"tfi\",\n \"name\": \"Themify Icons\",\n \"projectUrl\": \"https://github.com/lykmapipo/themify-icons\",\n \"license\": \"MIT\",\n \"licenseUrl\": \"https://github.com/thecreation/standard-icons/blob/master/modules/themify-icons/LICENSE\"\n}, {\n \"id\": \"rx\",\n \"name\": \"Radix Icons\",\n \"projectUrl\": \"https://icons.radix-ui.com\",\n \"license\": \"MIT\",\n \"licenseUrl\": \"https://github.com/radix-ui/icons/blob/master/LICENSE\"\n}, {\n \"id\": \"pi\",\n \"name\": \"Phosphor Icons\",\n \"projectUrl\": \"https://github.com/phosphor-icons/core\",\n \"license\": \"MIT\",\n \"licenseUrl\": \"https://github.com/phosphor-icons/core/blob/main/LICENSE\"\n}, {\n \"id\": \"lia\",\n \"name\": \"Icons8 Line Awesome\",\n \"projectUrl\": \"https://icons8.com/line-awesome\",\n \"license\": \"MIT\",\n \"licenseUrl\": \"https://github.com/icons8/line-awesome/blob/master/LICENSE.md\"\n}];","import React from \"react\";\nexport var DefaultContext = {\n color: undefined,\n size: undefined,\n className: undefined,\n style: undefined,\n attr: undefined\n};\nexport var IconContext = React.createContext && React.createContext(DefaultContext);","var __assign = this && this.__assign || function () {\n __assign = Object.assign || function (t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __rest = this && this.__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport React from \"react\";\nimport { IconContext, DefaultContext } from \"./iconContext\";\nfunction Tree2Element(tree) {\n return tree && tree.map(function (node, i) {\n return React.createElement(node.tag, __assign({\n key: i\n }, node.attr), Tree2Element(node.child));\n });\n}\nexport function GenIcon(data) {\n // eslint-disable-next-line react/display-name\n return function (props) {\n return React.createElement(IconBase, __assign({\n attr: __assign({}, data.attr)\n }, props), Tree2Element(data.child));\n };\n}\nexport function IconBase(props) {\n var elem = function (conf) {\n var attr = props.attr,\n size = props.size,\n title = props.title,\n svgProps = __rest(props, [\"attr\", \"size\", \"title\"]);\n var computedSize = size || conf.size || \"1em\";\n var className;\n if (conf.className) className = conf.className;\n if (props.className) className = (className ? className + \" \" : \"\") + props.className;\n return React.createElement(\"svg\", __assign({\n stroke: \"currentColor\",\n fill: \"currentColor\",\n strokeWidth: \"0\"\n }, conf.attr, attr, svgProps, {\n className: className,\n style: __assign(__assign({\n color: props.color || conf.color\n }, conf.style), props.style),\n height: computedSize,\n width: computedSize,\n xmlns: \"http://www.w3.org/2000/svg\"\n }), title && React.createElement(\"title\", null, title), props.children);\n };\n return IconContext !== undefined ? React.createElement(IconContext.Consumer, null, function (conf) {\n return elem(conf);\n }) : elem(DefaultContext);\n}","/** @license React v16.13.1\n * react-is.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar b = \"function\" === typeof Symbol && Symbol.for,\n c = b ? Symbol.for(\"react.element\") : 60103,\n d = b ? Symbol.for(\"react.portal\") : 60106,\n e = b ? Symbol.for(\"react.fragment\") : 60107,\n f = b ? Symbol.for(\"react.strict_mode\") : 60108,\n g = b ? Symbol.for(\"react.profiler\") : 60114,\n h = b ? Symbol.for(\"react.provider\") : 60109,\n k = b ? Symbol.for(\"react.context\") : 60110,\n l = b ? Symbol.for(\"react.async_mode\") : 60111,\n m = b ? Symbol.for(\"react.concurrent_mode\") : 60111,\n n = b ? Symbol.for(\"react.forward_ref\") : 60112,\n p = b ? Symbol.for(\"react.suspense\") : 60113,\n q = b ? Symbol.for(\"react.suspense_list\") : 60120,\n r = b ? Symbol.for(\"react.memo\") : 60115,\n t = b ? Symbol.for(\"react.lazy\") : 60116,\n v = b ? Symbol.for(\"react.block\") : 60121,\n w = b ? Symbol.for(\"react.fundamental\") : 60117,\n x = b ? Symbol.for(\"react.responder\") : 60118,\n y = b ? Symbol.for(\"react.scope\") : 60119;\nfunction z(a) {\n if (\"object\" === typeof a && null !== a) {\n var u = a.$$typeof;\n switch (u) {\n case c:\n switch (a = a.type, a) {\n case l:\n case m:\n case e:\n case g:\n case f:\n case p:\n return a;\n default:\n switch (a = a && a.$$typeof, a) {\n case k:\n case n:\n case t:\n case r:\n case h:\n return a;\n default:\n return u;\n }\n }\n case d:\n return u;\n }\n }\n}\nfunction A(a) {\n return z(a) === m;\n}\nexports.AsyncMode = l;\nexports.ConcurrentMode = m;\nexports.ContextConsumer = k;\nexports.ContextProvider = h;\nexports.Element = c;\nexports.ForwardRef = n;\nexports.Fragment = e;\nexports.Lazy = t;\nexports.Memo = r;\nexports.Portal = d;\nexports.Profiler = g;\nexports.StrictMode = f;\nexports.Suspense = p;\nexports.isAsyncMode = function (a) {\n return A(a) || z(a) === l;\n};\nexports.isConcurrentMode = A;\nexports.isContextConsumer = function (a) {\n return z(a) === k;\n};\nexports.isContextProvider = function (a) {\n return z(a) === h;\n};\nexports.isElement = function (a) {\n return \"object\" === typeof a && null !== a && a.$$typeof === c;\n};\nexports.isForwardRef = function (a) {\n return z(a) === n;\n};\nexports.isFragment = function (a) {\n return z(a) === e;\n};\nexports.isLazy = function (a) {\n return z(a) === t;\n};\nexports.isMemo = function (a) {\n return z(a) === r;\n};\nexports.isPortal = function (a) {\n return z(a) === d;\n};\nexports.isProfiler = function (a) {\n return z(a) === g;\n};\nexports.isStrictMode = function (a) {\n return z(a) === f;\n};\nexports.isSuspense = function (a) {\n return z(a) === p;\n};\nexports.isValidElementType = function (a) {\n return \"string\" === typeof a || \"function\" === typeof a || a === e || a === m || a === g || a === f || a === p || a === q || \"object\" === typeof a && null !== a && (a.$$typeof === t || a.$$typeof === r || a.$$typeof === h || a.$$typeof === k || a.$$typeof === n || a.$$typeof === w || a.$$typeof === x || a.$$typeof === y || a.$$typeof === v);\n};\nexports.typeOf = z;","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-is.production.min.js');\n} else {\n module.exports = require('./cjs/react-is.development.js');\n}","\"use strict\";\n\nexports.__esModule = true;\nexports.useScrollRestoration = exports.ScrollContext = void 0;\n\nvar _scrollHandler = require(\"./scroll-handler\");\n\nexports.ScrollContext = _scrollHandler.ScrollHandler;\n\nvar _useScrollRestoration = require(\"./use-scroll-restoration\");\n\nexports.useScrollRestoration = _useScrollRestoration.useScrollRestoration;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nexports.__esModule = true;\nexports.ScrollHandler = exports.ScrollContext = void 0;\n\nvar _assertThisInitialized2 = _interopRequireDefault(require(\"@babel/runtime/helpers/assertThisInitialized\"));\n\nvar _inheritsLoose2 = _interopRequireDefault(require(\"@babel/runtime/helpers/inheritsLoose\"));\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nvar _sessionStorage = require(\"./session-storage\");\n\nfunction _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== \"function\") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }\n\nfunction _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== \"object\" && typeof obj !== \"function\") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\n\nvar ScrollContext = /*#__PURE__*/React.createContext(new _sessionStorage.SessionStorage());\nexports.ScrollContext = ScrollContext;\nScrollContext.displayName = \"GatsbyScrollContext\";\n\nvar ScrollHandler = /*#__PURE__*/function (_React$Component) {\n (0, _inheritsLoose2.default)(ScrollHandler, _React$Component);\n\n function ScrollHandler() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n _this._stateStorage = new _sessionStorage.SessionStorage();\n _this._isTicking = false;\n _this._latestKnownScrollY = 0;\n\n _this.scrollListener = function () {\n _this._latestKnownScrollY = window.scrollY;\n\n if (!_this._isTicking) {\n _this._isTicking = true;\n requestAnimationFrame(_this._saveScroll.bind((0, _assertThisInitialized2.default)(_this)));\n }\n };\n\n _this.windowScroll = function (position, prevProps) {\n if (_this.shouldUpdateScroll(prevProps, _this.props)) {\n window.scrollTo(0, position);\n }\n };\n\n _this.scrollToHash = function (hash, prevProps) {\n var node = document.getElementById(hash.substring(1));\n\n if (node && _this.shouldUpdateScroll(prevProps, _this.props)) {\n node.scrollIntoView();\n }\n };\n\n _this.shouldUpdateScroll = function (prevRouterProps, routerProps) {\n var shouldUpdateScroll = _this.props.shouldUpdateScroll;\n\n if (!shouldUpdateScroll) {\n return true;\n } // Hack to allow accessing this._stateStorage.\n\n\n return shouldUpdateScroll.call((0, _assertThisInitialized2.default)(_this), prevRouterProps, routerProps);\n };\n\n return _this;\n }\n\n var _proto = ScrollHandler.prototype;\n\n _proto._saveScroll = function _saveScroll() {\n var key = this.props.location.key || null;\n\n if (key) {\n this._stateStorage.save(this.props.location, key, this._latestKnownScrollY);\n }\n\n this._isTicking = false;\n };\n\n _proto.componentDidMount = function componentDidMount() {\n window.addEventListener(\"scroll\", this.scrollListener);\n var scrollPosition;\n var _this$props$location = this.props.location,\n key = _this$props$location.key,\n hash = _this$props$location.hash;\n\n if (key) {\n scrollPosition = this._stateStorage.read(this.props.location, key);\n }\n\n if (scrollPosition) {\n this.windowScroll(scrollPosition, undefined);\n } else if (hash) {\n this.scrollToHash(decodeURI(hash), undefined);\n }\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n window.removeEventListener(\"scroll\", this.scrollListener);\n };\n\n _proto.componentDidUpdate = function componentDidUpdate(prevProps) {\n var _this$props$location2 = this.props.location,\n hash = _this$props$location2.hash,\n key = _this$props$location2.key;\n var scrollPosition;\n\n if (key) {\n scrollPosition = this._stateStorage.read(this.props.location, key);\n }\n /** There are two pieces of state: the browser url and\n * history state which keeps track of scroll position\n * Native behaviour prescribes that we ought to restore scroll position\n * when a user navigates back in their browser (this is the `POP` action)\n * Currently, reach router has a bug that prevents this at https://github.com/reach/router/issues/228\n * So we _always_ stick to the url as a source of truth — if the url\n * contains a hash, we scroll to it\n */\n\n\n if (hash) {\n this.scrollToHash(decodeURI(hash), prevProps);\n } else {\n this.windowScroll(scrollPosition, prevProps);\n }\n };\n\n _proto.render = function render() {\n return /*#__PURE__*/React.createElement(ScrollContext.Provider, {\n value: this._stateStorage\n }, this.props.children);\n };\n\n return ScrollHandler;\n}(React.Component);\n\nexports.ScrollHandler = ScrollHandler;\nScrollHandler.propTypes = {\n shouldUpdateScroll: _propTypes.default.func,\n children: _propTypes.default.element.isRequired,\n location: _propTypes.default.object.isRequired\n};","\"use strict\";\n\nexports.__esModule = true;\nexports.SessionStorage = void 0;\nvar STATE_KEY_PREFIX = \"@@scroll|\";\nvar GATSBY_ROUTER_SCROLL_STATE = \"___GATSBY_REACT_ROUTER_SCROLL\";\n\nvar SessionStorage = /*#__PURE__*/function () {\n function SessionStorage() {}\n\n var _proto = SessionStorage.prototype;\n\n _proto.read = function read(location, key) {\n var stateKey = this.getStateKey(location, key);\n\n try {\n var value = window.sessionStorage.getItem(stateKey);\n return value ? JSON.parse(value) : 0;\n } catch (e) {\n if (process.env.NODE_ENV !== \"production\") {\n console.warn(\"[gatsby-react-router-scroll] Unable to access sessionStorage; sessionStorage is not available.\");\n }\n\n if (window && window[GATSBY_ROUTER_SCROLL_STATE] && window[GATSBY_ROUTER_SCROLL_STATE][stateKey]) {\n return window[GATSBY_ROUTER_SCROLL_STATE][stateKey];\n }\n\n return 0;\n }\n };\n\n _proto.save = function save(location, key, value) {\n var stateKey = this.getStateKey(location, key);\n var storedValue = JSON.stringify(value);\n\n try {\n window.sessionStorage.setItem(stateKey, storedValue);\n } catch (e) {\n if (window && window[GATSBY_ROUTER_SCROLL_STATE]) {\n window[GATSBY_ROUTER_SCROLL_STATE][stateKey] = JSON.parse(storedValue);\n } else {\n window[GATSBY_ROUTER_SCROLL_STATE] = {};\n window[GATSBY_ROUTER_SCROLL_STATE][stateKey] = JSON.parse(storedValue);\n }\n\n if (process.env.NODE_ENV !== \"production\") {\n console.warn(\"[gatsby-react-router-scroll] Unable to save state in sessionStorage; sessionStorage is not available.\");\n }\n }\n };\n\n _proto.getStateKey = function getStateKey(location, key) {\n var stateKeyBase = \"\" + STATE_KEY_PREFIX + location.pathname;\n return key === null || typeof key === \"undefined\" ? stateKeyBase : stateKeyBase + \"|\" + key;\n };\n\n return SessionStorage;\n}();\n\nexports.SessionStorage = SessionStorage;","\"use strict\";\n\nexports.__esModule = true;\nexports.useScrollRestoration = useScrollRestoration;\n\nvar _scrollHandler = require(\"./scroll-handler\");\n\nvar _react = require(\"react\");\n\nvar _reachRouter = require(\"@gatsbyjs/reach-router\");\n\nfunction useScrollRestoration(identifier) {\n var location = (0, _reachRouter.useLocation)();\n var state = (0, _react.useContext)(_scrollHandler.ScrollContext);\n var ref = (0, _react.useRef)(null);\n (0, _react.useLayoutEffect)(function () {\n if (ref.current) {\n var position = state.read(location, identifier);\n ref.current.scrollTo(0, position || 0);\n }\n }, [location.key]);\n return {\n ref: ref,\n onScroll: function onScroll() {\n if (ref.current) {\n state.save(location, identifier, ref.current.scrollTop);\n }\n }\n };\n}","exports.components = {\n \"component---gatsby-theme-harvia-src-gatsby-templates-dato-article-category-tsx\": () => import(\"./../../../../gatsby-theme-harvia/src/gatsby-templates/datoArticleCategory.tsx\" /* webpackChunkName: \"component---gatsby-theme-harvia-src-gatsby-templates-dato-article-category-tsx\" */),\n \"component---gatsby-theme-harvia-src-gatsby-templates-dato-article-tsx\": () => import(\"./../../../../gatsby-theme-harvia/src/gatsby-templates/datoArticle.tsx\" /* webpackChunkName: \"component---gatsby-theme-harvia-src-gatsby-templates-dato-article-tsx\" */),\n \"component---gatsby-theme-harvia-src-gatsby-templates-dato-product-category-tsx\": () => import(\"./../../../../gatsby-theme-harvia/src/gatsby-templates/datoProductCategory.tsx\" /* webpackChunkName: \"component---gatsby-theme-harvia-src-gatsby-templates-dato-product-category-tsx\" */),\n \"component---gatsby-theme-harvia-src-gatsby-templates-dato-route-tsx\": () => import(\"./../../../../gatsby-theme-harvia/src/gatsby-templates/datoRoute.tsx\" /* webpackChunkName: \"component---gatsby-theme-harvia-src-gatsby-templates-dato-route-tsx\" */),\n \"component---gatsby-theme-harvia-src-gatsby-templates-pim-product-tsx\": () => import(\"./../../../../gatsby-theme-harvia/src/gatsby-templates/pimProduct.tsx\" /* webpackChunkName: \"component---gatsby-theme-harvia-src-gatsby-templates-pim-product-tsx\" */),\n \"component---gatsby-theme-harvia-src-gatsby-templates-redirect-tsx\": () => import(\"./../../../../gatsby-theme-harvia/src/gatsby-templates/redirect.tsx\" /* webpackChunkName: \"component---gatsby-theme-harvia-src-gatsby-templates-redirect-tsx\" */),\n \"component---src-pages-404-tsx\": () => import(\"./../../../src/pages/404.tsx\" /* webpackChunkName: \"component---src-pages-404-tsx\" */),\n \"component---src-pages-index-tsx\": () => import(\"./../../../src/pages/index.tsx\" /* webpackChunkName: \"component---src-pages-index-tsx\" */)\n}\n\n","module.exports = [{\n plugin: require('../../node_modules/gatsby-plugin-gatsby-cloud/gatsby-browser.js'),\n options: {\"plugins\":[]},\n },{\n plugin: require('../../node_modules/gatsby-plugin-loadable-components-ssr/gatsby-browser.js'),\n options: {\"plugins\":[],\"useHydrate\":false,\"preloadTags\":true},\n },{\n plugin: require('../../node_modules/gatsby-plugin-google-tagmanager/gatsby-browser.js'),\n options: {\"plugins\":[],\"id\":\"GTM-W34V658\",\"includeInDevelopment\":false,\"defaultDataLayer\":{\"type\":\"object\",\"value\":{\"platform\":\"gatsby\"}},\"routeChangeEventName\":\"gatsby-route-change\",\"enableWebVitalsTracking\":false,\"selfHostedOrigin\":\"https://www.googletagmanager.com\"},\n },{\n plugin: require('../../node_modules/gatsby-plugin-canonical-urls/gatsby-browser.js'),\n options: {\"plugins\":[],\"siteUrl\":\"https://www.harvia.com\"},\n },{\n plugin: require('../../gatsby-theme-harvia/gatsby-browser.tsx'),\n options: {\"plugins\":[],\"siteUrl\":\"https://www.harvia.com\",\"datoOptions\":{\"apiToken\":\"3c59585307370eeee6d097a369a203\",\"previewMode\":false,\"disableLiveReload\":false,\"localeFallbacks\":{\"en-US\":[\"en\"],\"fi\":[\"en\"],\"sv\":[\"en\"],\"et\":[\"en\",\"fi\"],\"de\":[\"en\"]},\"localesToGenerate\":[\"en\",\"en-US\",\"de\",\"fi\",\"sv\",\"et\"]},\"productOptions\":{\"languages\":[\"en-US\",\"de-DE\",\"fi-FI\",\"sv-SE\",\"et-EE\"],\"queryParams\":[\"product_life_cycle_status:s3_maintenance\",\"product_life_cycle_status:s4_rampdown\",\"product_life_cycle_status:s5_discontinued\"]},\"cookiebotOptions\":{\"cookiebotId\":\"b061b95f-3ac0-4e95-98d0-9270094eb27a\",\"manualMode\":true,\"includeInDevelopment\":true},\"facebookOptions\":{\"domainVerification\":\"fn3c4esq1bmbk8fy1is2oy3qmzu64u\"}},\n },{\n plugin: require('../../node_modules/gatsby-plugin-manifest/gatsby-browser.js'),\n options: {\"plugins\":[],\"name\":\"Harvia global\",\"short_name\":\"Harvia\",\"icon\":\"src/images/logo.svg\",\"lang\":\"en\",\"background_color\":\"#EAE8E0\",\"theme_color\":\"#D5D1C1\",\"legacy\":true,\"theme_color_in_head\":true,\"cache_busting_mode\":\"query\",\"crossOrigin\":\"anonymous\",\"include_favicon\":true,\"cacheDigest\":\"505286353b973fb7fc9f950dd94e28cd\"},\n },{\n plugin: require('../gatsby-browser.tsx'),\n options: {\"plugins\":[]},\n },{\n plugin: require('../../node_modules/gatsby/dist/internal-plugins/partytown/gatsby-browser.js'),\n options: {\"plugins\":[]},\n }]\n","const plugins = require(`./api-runner-browser-plugins`)\nconst { getResourceURLsForPathname, loadPage, loadPageSync } =\n require(`./loader`).publicLoader\n\nexports.apiRunner = (api, args = {}, defaultReturn, argTransform) => {\n // Hooks for gatsby-cypress's API handler\n if (process.env.CYPRESS_SUPPORT) {\n if (window.___apiHandler) {\n window.___apiHandler(api)\n } else if (window.___resolvedAPIs) {\n window.___resolvedAPIs.push(api)\n } else {\n window.___resolvedAPIs = [api]\n }\n }\n\n let results = plugins.map(plugin => {\n if (!plugin.plugin[api]) {\n return undefined\n }\n\n args.getResourceURLsForPathname = getResourceURLsForPathname\n args.loadPage = loadPage\n args.loadPageSync = loadPageSync\n\n const result = plugin.plugin[api](args, plugin.options)\n if (result && argTransform) {\n args = argTransform({ args, result, plugin })\n }\n return result\n })\n\n // Filter out undefined results.\n results = results.filter(result => typeof result !== `undefined`)\n\n if (results.length > 0) {\n return results\n } else if (defaultReturn) {\n return [defaultReturn]\n } else {\n return []\n }\n}\n\nexports.apiRunnerAsync = (api, args, defaultReturn) =>\n plugins.reduce(\n (previous, next) =>\n next.plugin[api]\n ? previous.then(() => next.plugin[api](args, next.options))\n : previous,\n Promise.resolve()\n )\n","import mitt from \"mitt\"\n\nconst emitter = mitt()\nexport default emitter\n","// \n// An event handler can take an optional event argument\n// and should not return a value\n \n \n\n// An array of all currently registered event handlers for a type\n \n \n// A map of event types and their corresponding event handlers.\n \n \n \n \n\n/** Mitt: Tiny (~200b) functional event emitter / pubsub.\n * @name mitt\n * @returns {Mitt}\n */\nfunction mitt(all ) {\n\tall = all || Object.create(null);\n\n\treturn {\n\t\t/**\n\t\t * Register an event handler for the given type.\n\t\t *\n\t\t * @param {String} type\tType of event to listen for, or `\"*\"` for all events\n\t\t * @param {Function} handler Function to call in response to given event\n\t\t * @memberOf mitt\n\t\t */\n\t\ton: function on(type , handler ) {\n\t\t\t(all[type] || (all[type] = [])).push(handler);\n\t\t},\n\n\t\t/**\n\t\t * Remove an event handler for the given type.\n\t\t *\n\t\t * @param {String} type\tType of event to unregister `handler` from, or `\"*\"`\n\t\t * @param {Function} handler Handler function to remove\n\t\t * @memberOf mitt\n\t\t */\n\t\toff: function off(type , handler ) {\n\t\t\tif (all[type]) {\n\t\t\t\tall[type].splice(all[type].indexOf(handler) >>> 0, 1);\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Invoke all handlers for the given type.\n\t\t * If present, `\"*\"` handlers are invoked after type-matched handlers.\n\t\t *\n\t\t * @param {String} type The event type to invoke\n\t\t * @param {Any} [evt] Any value (object is recommended and powerful), passed to each handler\n\t\t * @memberOf mitt\n\t\t */\n\t\temit: function emit(type , evt ) {\n\t\t\t(all[type] || []).slice().map(function (handler) { handler(evt); });\n\t\t\t(all['*'] || []).slice().map(function (handler) { handler(type, evt); });\n\t\t}\n\t};\n}\n\nexport default mitt;\n//# sourceMappingURL=mitt.es.js.map\n","export default pathAndSearch => {\n if (pathAndSearch === undefined) {\n return pathAndSearch\n }\n let [path, search = ``] = pathAndSearch.split(`?`)\n if (search) {\n search = `?` + search\n }\n\n if (path === `/`) {\n return `/` + search\n }\n if (path.charAt(path.length - 1) === `/`) {\n return path.slice(0, -1) + search\n }\n return path + search\n}\n","import { pick } from \"@gatsbyjs/reach-router/lib/utils\"\nimport stripPrefix from \"./strip-prefix\"\nimport normalizePagePath from \"./normalize-page-path\"\nimport { maybeGetBrowserRedirect } from \"./redirect-utils.js\"\n\nconst pathCache = new Map()\nlet matchPaths = []\n\nconst trimPathname = rawPathname => {\n let newRawPathname = rawPathname\n const queryIndex = rawPathname.indexOf(`?`)\n\n if (queryIndex !== -1) {\n const [path, qs] = rawPathname.split(`?`)\n newRawPathname = `${path}?${encodeURIComponent(qs)}`\n }\n\n const pathname = decodeURIComponent(newRawPathname)\n\n // Remove the pathPrefix from the pathname.\n const trimmedPathname = stripPrefix(\n pathname,\n decodeURIComponent(__BASE_PATH__)\n )\n // Remove any hashfragment\n .split(`#`)[0]\n\n return trimmedPathname\n}\n\nfunction absolutify(path) {\n // If it's already absolute, return as-is\n if (\n path.startsWith(`/`) ||\n path.startsWith(`https://`) ||\n path.startsWith(`http://`)\n ) {\n return path\n }\n // Calculate path relative to current location, adding a trailing slash to\n // match behavior of @reach/router\n return new URL(\n path,\n window.location.href + (window.location.href.endsWith(`/`) ? `` : `/`)\n ).pathname\n}\n\n/**\n * Set list of matchPaths\n *\n * @param {Array<{path: string, matchPath: string}>} value collection of matchPaths\n */\nexport const setMatchPaths = value => {\n matchPaths = value\n}\n\n/**\n * Return a matchpath url\n * if `match-paths.json` contains `{ \"/foo*\": \"/page1\", ...}`, then\n * `/foo?bar=far` => `/page1`\n *\n * @param {string} rawPathname A raw pathname\n * @return {string|null}\n */\nexport const findMatchPath = rawPathname => {\n const trimmedPathname = cleanPath(rawPathname)\n\n const pickPaths = matchPaths.map(({ path, matchPath }) => {\n return {\n path: matchPath,\n originalPath: path,\n }\n })\n\n const path = pick(pickPaths, trimmedPathname)\n\n if (path) {\n return normalizePagePath(path.route.originalPath)\n }\n\n return null\n}\n\n/**\n * Return a matchpath params from reach/router rules\n * if `match-paths.json` contains `{ \":bar/*foo\" }`, and the path is /baz/zaz/zoo\n * then it returns\n * { bar: baz, foo: zaz/zoo }\n *\n * @param {string} rawPathname A raw pathname\n * @return {object}\n */\nexport const grabMatchParams = rawPathname => {\n const trimmedPathname = cleanPath(rawPathname)\n\n const pickPaths = matchPaths.map(({ path, matchPath }) => {\n return {\n path: matchPath,\n originalPath: path,\n }\n })\n\n const path = pick(pickPaths, trimmedPathname)\n\n if (path) {\n return path.params\n }\n\n return {}\n}\n\n// Given a raw URL path, returns the cleaned version of it (trim off\n// `#` and query params), or if it matches an entry in\n// `match-paths.json`, its matched path is returned\n//\n// E.g. `/foo?bar=far` => `/foo`\n//\n// Or if `match-paths.json` contains `{ \"/foo*\": \"/page1\", ...}`, then\n// `/foo?bar=far` => `/page1`\nexport const findPath = rawPathname => {\n const trimmedPathname = trimPathname(absolutify(rawPathname))\n if (pathCache.has(trimmedPathname)) {\n return pathCache.get(trimmedPathname)\n }\n\n const redirect = maybeGetBrowserRedirect(rawPathname)\n if (redirect) {\n return findPath(redirect.toPath)\n }\n\n let foundPath = findMatchPath(trimmedPathname)\n\n if (!foundPath) {\n foundPath = cleanPath(rawPathname)\n }\n\n pathCache.set(trimmedPathname, foundPath)\n\n return foundPath\n}\n\n/**\n * Clean a url and converts /index.html => /\n * E.g. `/foo?bar=far` => `/foo`\n *\n * @param {string} rawPathname A raw pathname\n * @return {string}\n */\nexport const cleanPath = rawPathname => {\n const trimmedPathname = trimPathname(absolutify(rawPathname))\n\n let foundPath = trimmedPathname\n if (foundPath === `/index.html`) {\n foundPath = `/`\n }\n\n foundPath = normalizePagePath(foundPath)\n\n return foundPath\n}\n","import React from \"react\"\nimport PropTypes from \"prop-types\"\n\nconst StaticQueryContext = React.createContext({})\nlet StaticQueryServerContext = null\nif (React.createServerContext) {\n StaticQueryServerContext = React.createServerContext(`StaticQuery`, {})\n}\n\nfunction StaticQueryDataRenderer({ staticQueryData, data, query, render }) {\n const finalData = data\n ? data.data\n : staticQueryData[query] && staticQueryData[query].data\n\n return (\n \n {finalData && render(finalData)}\n {!finalData &&
Loading (StaticQuery)
}\n
\n )\n}\n\n// TODO(v5): Remove completely\nconst StaticQuery = props => {\n const { data, query, render, children } = props\n\n return (\n \n {staticQueryData => (\n \n )}\n \n )\n}\n\nStaticQuery.propTypes = {\n data: PropTypes.object,\n query: PropTypes.string.isRequired,\n render: PropTypes.func,\n children: PropTypes.func,\n}\n\nconst useStaticQuery = query => {\n if (\n typeof React.useContext !== `function` &&\n process.env.NODE_ENV === `development`\n ) {\n // TODO(v5): Remove since we require React >= 18\n throw new Error(\n `You're likely using a version of React that doesn't support Hooks\\n` +\n `Please update React and ReactDOM to 16.8.0 or later to use the useStaticQuery hook.`\n )\n }\n let context\n\n // Can we get a better check here?\n if (\n StaticQueryServerContext &&\n Object.keys(StaticQueryServerContext._currentValue).length\n ) {\n context = React.useContext(StaticQueryServerContext)\n } else {\n context = React.useContext(StaticQueryContext)\n }\n\n // query is a stringified number like `3303882` when wrapped with graphql, If a user forgets\n // to wrap the query in a grqphql, then casting it to a Number results in `NaN` allowing us to\n // catch the misuse of the API and give proper direction\n if (isNaN(Number(query))) {\n throw new Error(`useStaticQuery was called with a string but expects to be called using \\`graphql\\`. Try this:\n\nimport { useStaticQuery, graphql } from 'gatsby';\n\nuseStaticQuery(graphql\\`${query}\\`);\n`)\n }\n\n if (context[query]?.data) {\n return context[query].data\n } else {\n throw new Error(\n `The result of this StaticQuery could not be fetched.\\n\\n` +\n `This is likely a bug in Gatsby and if refreshing the page does not fix it, ` +\n `please open an issue in https://github.com/gatsbyjs/gatsby/issues`\n )\n }\n}\n\nexport {\n StaticQuery,\n StaticQueryContext,\n useStaticQuery,\n StaticQueryServerContext,\n}\n","import loader from \"./loader\"\n\nconst prefetchPathname = loader.enqueue\n\nfunction graphql() {\n throw new Error(\n `It appears like Gatsby is misconfigured. Gatsby related \\`graphql\\` calls ` +\n `are supposed to only be evaluated at compile time, and then compiled away. ` +\n `Unfortunately, something went wrong and the query was left in the compiled code.\\n\\n` +\n `Unless your site has a complex or custom babel/Gatsby configuration this is likely a bug in Gatsby.`\n )\n}\n\nexport { default as PageRenderer } from \"./public-page-renderer\"\nexport { useScrollRestoration } from \"gatsby-react-router-scroll\"\nexport {\n default as Link,\n withPrefix,\n withAssetPrefix,\n navigate,\n parsePath,\n} from \"gatsby-link\"\n\nexport { graphql, prefetchPathname }\nexport {\n StaticQuery,\n StaticQueryContext,\n useStaticQuery,\n StaticQueryServerContext,\n} from \"./static-query\"\n\nexport * from \"gatsby-script\"\n","const support = function (feature) {\n if (typeof document === `undefined`) {\n return false\n }\n const fakeLink = document.createElement(`link`)\n try {\n if (fakeLink.relList && typeof fakeLink.relList.supports === `function`) {\n return fakeLink.relList.supports(feature)\n }\n } catch (err) {\n return false\n }\n return false\n}\n\nconst linkPrefetchStrategy = function (url, options) {\n return new Promise((resolve, reject) => {\n if (typeof document === `undefined`) {\n reject()\n return\n }\n\n const link = document.createElement(`link`)\n link.setAttribute(`rel`, `prefetch`)\n link.setAttribute(`href`, url)\n\n Object.keys(options).forEach(key => {\n link.setAttribute(key, options[key])\n })\n\n link.onload = resolve\n link.onerror = reject\n\n const parentElement =\n document.getElementsByTagName(`head`)[0] ||\n document.getElementsByName(`script`)[0].parentNode\n parentElement.appendChild(link)\n })\n}\n\nconst xhrPrefetchStrategy = function (url) {\n return new Promise((resolve, reject) => {\n const req = new XMLHttpRequest()\n req.open(`GET`, url, true)\n\n req.onload = () => {\n if (req.status === 200) {\n resolve()\n } else {\n reject()\n }\n }\n\n req.send(null)\n })\n}\n\nconst supportedPrefetchStrategy = support(`prefetch`)\n ? linkPrefetchStrategy\n : xhrPrefetchStrategy\n\nconst preFetched = {}\n\nconst prefetch = function (url, options) {\n return new Promise(resolve => {\n if (preFetched[url]) {\n resolve()\n return\n }\n\n supportedPrefetchStrategy(url, options)\n .then(() => {\n resolve()\n preFetched[url] = true\n })\n .catch(() => {}) // 404s are logged to the console anyway\n })\n}\n\nexport default prefetch\n","import { createFromReadableStream } from \"react-server-dom-webpack\"\nimport prefetchHelper from \"./prefetch\"\nimport emitter from \"./emitter\"\nimport { setMatchPaths, findPath, findMatchPath } from \"./find-path\"\n\n/**\n * Available resource loading statuses\n */\nexport const PageResourceStatus = {\n /**\n * At least one of critical resources failed to load\n */\n Error: `error`,\n /**\n * Resources loaded successfully\n */\n Success: `success`,\n}\n\nconst stripSurroundingSlashes = s => {\n s = s[0] === `/` ? s.slice(1) : s\n s = s.endsWith(`/`) ? s.slice(0, -1) : s\n return s\n}\n\nconst createPageDataUrl = rawPath => {\n const [path, maybeSearch] = rawPath.split(`?`)\n const fixedPath = path === `/` ? `index` : stripSurroundingSlashes(path)\n return `${__PATH_PREFIX__}/page-data/${fixedPath}/page-data.json${\n maybeSearch ? `?${maybeSearch}` : ``\n }`\n}\n\nfunction doFetch(url, method = `GET`) {\n return new Promise(resolve => {\n const req = new XMLHttpRequest()\n req.open(method, url, true)\n req.onreadystatechange = () => {\n if (req.readyState == 4) {\n resolve(req)\n }\n }\n req.send(null)\n })\n}\n\nconst doesConnectionSupportPrefetch = () => {\n if (\n `connection` in navigator &&\n typeof navigator.connection !== `undefined`\n ) {\n if ((navigator.connection.effectiveType || ``).includes(`2g`)) {\n return false\n }\n if (navigator.connection.saveData) {\n return false\n }\n }\n return true\n}\n\n// Regex that matches common search crawlers\nconst BOT_REGEX = /bot|crawler|spider|crawling/i\n\nconst toPageResources = (pageData, component = null, head) => {\n const page = {\n componentChunkName: pageData.componentChunkName,\n path: pageData.path,\n webpackCompilationHash: pageData.webpackCompilationHash,\n matchPath: pageData.matchPath,\n staticQueryHashes: pageData.staticQueryHashes,\n getServerDataError: pageData.getServerDataError,\n }\n\n return {\n component,\n head,\n json: pageData.result,\n page,\n }\n}\n\nfunction waitForResponse(response) {\n return new Promise(resolve => {\n try {\n const result = response.readRoot()\n resolve(result)\n } catch (err) {\n if (\n Object.hasOwnProperty.call(err, `_response`) &&\n Object.hasOwnProperty.call(err, `_status`)\n ) {\n setTimeout(() => {\n waitForResponse(response).then(resolve)\n }, 200)\n } else {\n throw err\n }\n }\n })\n}\n\nexport class BaseLoader {\n constructor(loadComponent, matchPaths) {\n // Map of pagePath -> Page. Where Page is an object with: {\n // status: PageResourceStatus.Success || PageResourceStatus.Error,\n // payload: PageResources, // undefined if PageResourceStatus.Error\n // }\n // PageResources is {\n // component,\n // json: pageData.result,\n // page: {\n // componentChunkName,\n // path,\n // webpackCompilationHash,\n // staticQueryHashes\n // },\n // staticQueryResults\n // }\n this.pageDb = new Map()\n this.inFlightDb = new Map()\n this.staticQueryDb = {}\n this.pageDataDb = new Map()\n this.partialHydrationDb = new Map()\n this.isPrefetchQueueRunning = false\n this.prefetchQueued = []\n this.prefetchTriggered = new Set()\n this.prefetchCompleted = new Set()\n this.loadComponent = loadComponent\n setMatchPaths(matchPaths)\n }\n\n inFlightNetworkRequests = new Map()\n\n memoizedGet(url) {\n let inFlightPromise = this.inFlightNetworkRequests.get(url)\n\n if (!inFlightPromise) {\n inFlightPromise = doFetch(url, `GET`)\n this.inFlightNetworkRequests.set(url, inFlightPromise)\n }\n\n // Prefer duplication with then + catch over .finally to prevent problems in ie11 + firefox\n return inFlightPromise\n .then(response => {\n this.inFlightNetworkRequests.delete(url)\n return response\n })\n .catch(err => {\n this.inFlightNetworkRequests.delete(url)\n throw err\n })\n }\n\n setApiRunner(apiRunner) {\n this.apiRunner = apiRunner\n this.prefetchDisabled = apiRunner(`disableCorePrefetching`).some(a => a)\n }\n\n fetchPageDataJson(loadObj) {\n const { pagePath, retries = 0 } = loadObj\n const url = createPageDataUrl(pagePath)\n return this.memoizedGet(url).then(req => {\n const { status, responseText } = req\n\n // Handle 200\n if (status === 200) {\n try {\n const jsonPayload = JSON.parse(responseText)\n if (jsonPayload.path === undefined) {\n throw new Error(`not a valid pageData response`)\n }\n\n const maybeSearch = pagePath.split(`?`)[1]\n if (maybeSearch && !jsonPayload.path.includes(maybeSearch)) {\n jsonPayload.path += `?${maybeSearch}`\n }\n\n return Object.assign(loadObj, {\n status: PageResourceStatus.Success,\n payload: jsonPayload,\n })\n } catch (err) {\n // continue regardless of error\n }\n }\n\n // Handle 404\n if (status === 404 || status === 200) {\n // If the request was for a 404/500 page and it doesn't exist, we're done\n if (pagePath === `/404.html` || pagePath === `/500.html`) {\n return Object.assign(loadObj, {\n status: PageResourceStatus.Error,\n })\n }\n\n // Need some code here to cache the 404 request. In case\n // multiple loadPageDataJsons result in 404s\n return this.fetchPageDataJson(\n Object.assign(loadObj, { pagePath: `/404.html`, notFound: true })\n )\n }\n\n // handle 500 response (Unrecoverable)\n if (status === 500) {\n return this.fetchPageDataJson(\n Object.assign(loadObj, {\n pagePath: `/500.html`,\n internalServerError: true,\n })\n )\n }\n\n // Handle everything else, including status === 0, and 503s. Should retry\n if (retries < 3) {\n return this.fetchPageDataJson(\n Object.assign(loadObj, { retries: retries + 1 })\n )\n }\n\n // Retried 3 times already, result is an error.\n return Object.assign(loadObj, {\n status: PageResourceStatus.Error,\n })\n })\n }\n\n fetchPartialHydrationJson(loadObj) {\n const { pagePath, retries = 0 } = loadObj\n const url = createPageDataUrl(pagePath).replace(`.json`, `-rsc.json`)\n return this.memoizedGet(url).then(req => {\n const { status, responseText } = req\n\n // Handle 200\n if (status === 200) {\n try {\n return Object.assign(loadObj, {\n status: PageResourceStatus.Success,\n payload: responseText,\n })\n } catch (err) {\n // continue regardless of error\n }\n }\n\n // Handle 404\n if (status === 404 || status === 200) {\n // If the request was for a 404/500 page and it doesn't exist, we're done\n if (pagePath === `/404.html` || pagePath === `/500.html`) {\n return Object.assign(loadObj, {\n status: PageResourceStatus.Error,\n })\n }\n\n // Need some code here to cache the 404 request. In case\n // multiple loadPageDataJsons result in 404s\n return this.fetchPartialHydrationJson(\n Object.assign(loadObj, { pagePath: `/404.html`, notFound: true })\n )\n }\n\n // handle 500 response (Unrecoverable)\n if (status === 500) {\n return this.fetchPartialHydrationJson(\n Object.assign(loadObj, {\n pagePath: `/500.html`,\n internalServerError: true,\n })\n )\n }\n\n // Handle everything else, including status === 0, and 503s. Should retry\n if (retries < 3) {\n return this.fetchPartialHydrationJson(\n Object.assign(loadObj, { retries: retries + 1 })\n )\n }\n\n // Retried 3 times already, result is an error.\n return Object.assign(loadObj, {\n status: PageResourceStatus.Error,\n })\n })\n }\n\n loadPageDataJson(rawPath) {\n const pagePath = findPath(rawPath)\n if (this.pageDataDb.has(pagePath)) {\n const pageData = this.pageDataDb.get(pagePath)\n if (process.env.BUILD_STAGE !== `develop` || !pageData.stale) {\n return Promise.resolve(pageData)\n }\n }\n\n return this.fetchPageDataJson({ pagePath }).then(pageData => {\n this.pageDataDb.set(pagePath, pageData)\n\n return pageData\n })\n }\n\n loadPartialHydrationJson(rawPath) {\n const pagePath = findPath(rawPath)\n if (this.partialHydrationDb.has(pagePath)) {\n const pageData = this.partialHydrationDb.get(pagePath)\n if (process.env.BUILD_STAGE !== `develop` || !pageData.stale) {\n return Promise.resolve(pageData)\n }\n }\n\n return this.fetchPartialHydrationJson({ pagePath }).then(pageData => {\n this.partialHydrationDb.set(pagePath, pageData)\n\n return pageData\n })\n }\n\n findMatchPath(rawPath) {\n return findMatchPath(rawPath)\n }\n\n // TODO check all uses of this and whether they use undefined for page resources not exist\n loadPage(rawPath) {\n const pagePath = findPath(rawPath)\n if (this.pageDb.has(pagePath)) {\n const page = this.pageDb.get(pagePath)\n if (process.env.BUILD_STAGE !== `develop` || !page.payload.stale) {\n if (page.error) {\n return {\n error: page.error,\n status: page.status,\n }\n }\n\n return Promise.resolve(page.payload)\n }\n }\n\n if (this.inFlightDb.has(pagePath)) {\n return this.inFlightDb.get(pagePath)\n }\n\n let inFlightPromise\n if (global.hasPartialHydration) {\n inFlightPromise = Promise.all([\n this.loadAppData(),\n this.loadPageDataJson(pagePath),\n this.loadPartialHydrationJson(pagePath),\n ]).then(([appData, { payload: pageData }, result]) => {\n if (result.status === PageResourceStatus.Error) {\n return {\n status: PageResourceStatus.Error,\n }\n }\n\n const finalResult = {}\n\n // In develop we have separate chunks for template and Head components\n // to enable HMR (fast refresh requires single exports).\n // In production we have shared chunk with both exports. Double loadComponent here\n // will be deduped by webpack runtime resulting in single request and single module\n // being loaded for both `component` and `head`.\n const componentChunkPromise = this.loadComponent(\n pageData.componentChunkName,\n `head`\n ).then(head => {\n finalResult.createdAt = new Date()\n finalResult.status = PageResourceStatus.Success\n if (result.notFound === true) {\n finalResult.notFound = true\n }\n pageData = Object.assign(pageData, {\n webpackCompilationHash: appData\n ? appData.webpackCompilationHash\n : ``,\n })\n\n const pageResources = toPageResources(pageData, null, head)\n\n if (result.payload && typeof result.payload === `string`) {\n pageResources.partialHydration = result.payload\n\n const readableStream = new ReadableStream({\n start(controller) {\n const te = new TextEncoder()\n controller.enqueue(te.encode(result.payload))\n },\n pull(controller) {\n // close on next read when queue is empty\n controller.close()\n },\n cancel() {},\n })\n\n return waitForResponse(\n createFromReadableStream(readableStream)\n ).then(result => {\n pageResources.partialHydration = result\n\n return pageResources\n })\n }\n\n // undefined if final result is an error\n return pageResources\n })\n\n // Necessary for head component\n const staticQueryBatchPromise = Promise.all(\n (pageData.staticQueryHashes || []).map(staticQueryHash => {\n // Check for cache in case this static query result has already been loaded\n if (this.staticQueryDb[staticQueryHash]) {\n const jsonPayload = this.staticQueryDb[staticQueryHash]\n return { staticQueryHash, jsonPayload }\n }\n\n return this.memoizedGet(\n `${__PATH_PREFIX__}/page-data/sq/d/${staticQueryHash}.json`\n )\n .then(req => {\n const jsonPayload = JSON.parse(req.responseText)\n return { staticQueryHash, jsonPayload }\n })\n .catch(() => {\n throw new Error(\n `We couldn't load \"${__PATH_PREFIX__}/page-data/sq/d/${staticQueryHash}.json\"`\n )\n })\n })\n ).then(staticQueryResults => {\n const staticQueryResultsMap = {}\n\n staticQueryResults.forEach(({ staticQueryHash, jsonPayload }) => {\n staticQueryResultsMap[staticQueryHash] = jsonPayload\n this.staticQueryDb[staticQueryHash] = jsonPayload\n })\n\n return staticQueryResultsMap\n })\n\n return (\n Promise.all([componentChunkPromise, staticQueryBatchPromise])\n .then(([pageResources, staticQueryResults]) => {\n let payload\n if (pageResources) {\n payload = {\n ...pageResources,\n staticQueryResults: staticQueryResults,\n }\n finalResult.payload = payload\n emitter.emit(`onPostLoadPageResources`, {\n page: payload,\n pageResources: payload,\n })\n }\n\n this.pageDb.set(pagePath, finalResult)\n\n if (finalResult.error) {\n return {\n error: finalResult.error,\n status: finalResult.status,\n }\n }\n\n return payload\n })\n // when static-query fail to load we throw a better error\n .catch(err => {\n return {\n error: err,\n status: PageResourceStatus.Error,\n }\n })\n )\n })\n } else {\n inFlightPromise = Promise.all([\n this.loadAppData(),\n this.loadPageDataJson(pagePath),\n ]).then(allData => {\n const result = allData[1]\n if (result.status === PageResourceStatus.Error) {\n return {\n status: PageResourceStatus.Error,\n }\n }\n\n let pageData = result.payload\n const { componentChunkName, staticQueryHashes = [] } = pageData\n\n const finalResult = {}\n\n // In develop we have separate chunks for template and Head components\n // to enable HMR (fast refresh requires single exports).\n // In production we have shared chunk with both exports. Double loadComponent here\n // will be deduped by webpack runtime resulting in single request and single module\n // being loaded for both `component` and `head`.\n const componentChunkPromise = Promise.all([\n this.loadComponent(componentChunkName),\n this.loadComponent(componentChunkName, `head`),\n ]).then(([component, head]) => {\n finalResult.createdAt = new Date()\n let pageResources\n if (!component || component instanceof Error) {\n finalResult.status = PageResourceStatus.Error\n finalResult.error = component\n } else {\n finalResult.status = PageResourceStatus.Success\n if (result.notFound === true) {\n finalResult.notFound = true\n }\n pageData = Object.assign(pageData, {\n webpackCompilationHash: allData[0]\n ? allData[0].webpackCompilationHash\n : ``,\n })\n pageResources = toPageResources(pageData, component, head)\n }\n // undefined if final result is an error\n return pageResources\n })\n\n const staticQueryBatchPromise = Promise.all(\n staticQueryHashes.map(staticQueryHash => {\n // Check for cache in case this static query result has already been loaded\n if (this.staticQueryDb[staticQueryHash]) {\n const jsonPayload = this.staticQueryDb[staticQueryHash]\n return { staticQueryHash, jsonPayload }\n }\n\n return this.memoizedGet(\n `${__PATH_PREFIX__}/page-data/sq/d/${staticQueryHash}.json`\n )\n .then(req => {\n const jsonPayload = JSON.parse(req.responseText)\n return { staticQueryHash, jsonPayload }\n })\n .catch(() => {\n throw new Error(\n `We couldn't load \"${__PATH_PREFIX__}/page-data/sq/d/${staticQueryHash}.json\"`\n )\n })\n })\n ).then(staticQueryResults => {\n const staticQueryResultsMap = {}\n\n staticQueryResults.forEach(({ staticQueryHash, jsonPayload }) => {\n staticQueryResultsMap[staticQueryHash] = jsonPayload\n this.staticQueryDb[staticQueryHash] = jsonPayload\n })\n\n return staticQueryResultsMap\n })\n\n return (\n Promise.all([componentChunkPromise, staticQueryBatchPromise])\n .then(([pageResources, staticQueryResults]) => {\n let payload\n if (pageResources) {\n payload = { ...pageResources, staticQueryResults }\n finalResult.payload = payload\n emitter.emit(`onPostLoadPageResources`, {\n page: payload,\n pageResources: payload,\n })\n }\n\n this.pageDb.set(pagePath, finalResult)\n\n if (finalResult.error) {\n return {\n error: finalResult.error,\n status: finalResult.status,\n }\n }\n\n return payload\n })\n // when static-query fail to load we throw a better error\n .catch(err => {\n return {\n error: err,\n status: PageResourceStatus.Error,\n }\n })\n )\n })\n }\n\n inFlightPromise\n .then(() => {\n this.inFlightDb.delete(pagePath)\n })\n .catch(error => {\n this.inFlightDb.delete(pagePath)\n throw error\n })\n\n this.inFlightDb.set(pagePath, inFlightPromise)\n\n return inFlightPromise\n }\n\n // returns undefined if the page does not exists in cache\n loadPageSync(rawPath, options = {}) {\n const pagePath = findPath(rawPath)\n if (this.pageDb.has(pagePath)) {\n const pageData = this.pageDb.get(pagePath)\n\n if (pageData.payload) {\n return pageData.payload\n }\n\n if (options?.withErrorDetails) {\n return {\n error: pageData.error,\n status: pageData.status,\n }\n }\n }\n return undefined\n }\n\n shouldPrefetch(pagePath) {\n // Skip prefetching if we know user is on slow or constrained connection\n if (!doesConnectionSupportPrefetch()) {\n return false\n }\n\n // Don't prefetch if this is a crawler bot\n if (navigator.userAgent && BOT_REGEX.test(navigator.userAgent)) {\n return false\n }\n\n // Check if the page exists.\n if (this.pageDb.has(pagePath)) {\n return false\n }\n\n return true\n }\n\n prefetch(pagePath) {\n if (!this.shouldPrefetch(pagePath)) {\n return {\n then: resolve => resolve(false),\n abort: () => {},\n }\n }\n if (this.prefetchTriggered.has(pagePath)) {\n return {\n then: resolve => resolve(true),\n abort: () => {},\n }\n }\n\n const defer = {\n resolve: null,\n reject: null,\n promise: null,\n }\n defer.promise = new Promise((resolve, reject) => {\n defer.resolve = resolve\n defer.reject = reject\n })\n this.prefetchQueued.push([pagePath, defer])\n const abortC = new AbortController()\n abortC.signal.addEventListener(`abort`, () => {\n const index = this.prefetchQueued.findIndex(([p]) => p === pagePath)\n // remove from the queue\n if (index !== -1) {\n this.prefetchQueued.splice(index, 1)\n }\n })\n\n if (!this.isPrefetchQueueRunning) {\n this.isPrefetchQueueRunning = true\n setTimeout(() => {\n this._processNextPrefetchBatch()\n }, 3000)\n }\n\n return {\n then: (resolve, reject) => defer.promise.then(resolve, reject),\n abort: abortC.abort.bind(abortC),\n }\n }\n\n _processNextPrefetchBatch() {\n const idleCallback = window.requestIdleCallback || (cb => setTimeout(cb, 0))\n\n idleCallback(() => {\n const toPrefetch = this.prefetchQueued.splice(0, 4)\n const prefetches = Promise.all(\n toPrefetch.map(([pagePath, dPromise]) => {\n // Tell plugins with custom prefetching logic that they should start\n // prefetching this path.\n if (!this.prefetchTriggered.has(pagePath)) {\n this.apiRunner(`onPrefetchPathname`, { pathname: pagePath })\n this.prefetchTriggered.add(pagePath)\n }\n\n // If a plugin has disabled core prefetching, stop now.\n if (this.prefetchDisabled) {\n return dPromise.resolve(false)\n }\n\n return this.doPrefetch(findPath(pagePath)).then(() => {\n if (!this.prefetchCompleted.has(pagePath)) {\n this.apiRunner(`onPostPrefetchPathname`, { pathname: pagePath })\n this.prefetchCompleted.add(pagePath)\n }\n\n dPromise.resolve(true)\n })\n })\n )\n\n if (this.prefetchQueued.length) {\n prefetches.then(() => {\n setTimeout(() => {\n this._processNextPrefetchBatch()\n }, 3000)\n })\n } else {\n this.isPrefetchQueueRunning = false\n }\n })\n }\n\n doPrefetch(pagePath) {\n const pageDataUrl = createPageDataUrl(pagePath)\n\n if (global.hasPartialHydration) {\n return Promise.all([\n prefetchHelper(pageDataUrl, {\n crossOrigin: `anonymous`,\n as: `fetch`,\n }).then(() =>\n // This was just prefetched, so will return a response from\n // the cache instead of making another request to the server\n this.loadPageDataJson(pagePath)\n ),\n prefetchHelper(pageDataUrl.replace(`.json`, `-rsc.json`), {\n crossOrigin: `anonymous`,\n as: `fetch`,\n }).then(() =>\n // This was just prefetched, so will return a response from\n // the cache instead of making another request to the server\n this.loadPartialHydrationJson(pagePath)\n ),\n ])\n } else {\n return prefetchHelper(pageDataUrl, {\n crossOrigin: `anonymous`,\n as: `fetch`,\n }).then(() =>\n // This was just prefetched, so will return a response from\n // the cache instead of making another request to the server\n this.loadPageDataJson(pagePath)\n )\n }\n }\n\n hovering(rawPath) {\n this.loadPage(rawPath)\n }\n\n getResourceURLsForPathname(rawPath) {\n const pagePath = findPath(rawPath)\n const page = this.pageDataDb.get(pagePath)\n if (page) {\n const pageResources = toPageResources(page.payload)\n\n return [\n ...createComponentUrls(pageResources.page.componentChunkName),\n createPageDataUrl(pagePath),\n ]\n } else {\n return null\n }\n }\n\n isPageNotFound(rawPath) {\n const pagePath = findPath(rawPath)\n const page = this.pageDb.get(pagePath)\n return !page || page.notFound\n }\n\n loadAppData(retries = 0) {\n return this.memoizedGet(`${__PATH_PREFIX__}/page-data/app-data.json`).then(\n req => {\n const { status, responseText } = req\n\n let appData\n\n if (status !== 200 && retries < 3) {\n // Retry 3 times incase of non-200 responses\n return this.loadAppData(retries + 1)\n }\n\n // Handle 200\n if (status === 200) {\n try {\n const jsonPayload = JSON.parse(responseText)\n if (jsonPayload.webpackCompilationHash === undefined) {\n throw new Error(`not a valid app-data response`)\n }\n\n appData = jsonPayload\n } catch (err) {\n // continue regardless of error\n }\n }\n\n return appData\n }\n )\n }\n}\n\nconst createComponentUrls = componentChunkName =>\n (window.___chunkMapping[componentChunkName] || []).map(\n chunk => __PATH_PREFIX__ + chunk\n )\n\nexport class ProdLoader extends BaseLoader {\n constructor(asyncRequires, matchPaths, pageData) {\n const loadComponent = (chunkName, exportType = `components`) => {\n if (!global.hasPartialHydration) {\n exportType = `components`\n }\n\n if (!asyncRequires[exportType][chunkName]) {\n throw new Error(\n `We couldn't find the correct component chunk with the name \"${chunkName}\"`\n )\n }\n\n return (\n asyncRequires[exportType][chunkName]()\n // loader will handle the case when component is error\n .catch(err => err)\n )\n }\n\n super(loadComponent, matchPaths)\n\n if (pageData) {\n this.pageDataDb.set(findPath(pageData.path), {\n pagePath: pageData.path,\n payload: pageData,\n status: `success`,\n })\n }\n }\n\n doPrefetch(pagePath) {\n return super.doPrefetch(pagePath).then(result => {\n if (result.status !== PageResourceStatus.Success) {\n return Promise.resolve()\n }\n const pageData = result.payload\n const chunkName = pageData.componentChunkName\n const componentUrls = createComponentUrls(chunkName)\n return Promise.all(componentUrls.map(prefetchHelper)).then(() => pageData)\n })\n }\n\n loadPageDataJson(rawPath) {\n return super.loadPageDataJson(rawPath).then(data => {\n if (data.notFound) {\n // check if html file exist using HEAD request:\n // if it does we should navigate to it instead of showing 404\n return doFetch(rawPath, `HEAD`).then(req => {\n if (req.status === 200) {\n // page (.html file) actually exist (or we asked for 404 )\n // returning page resources status as errored to trigger\n // regular browser navigation to given page\n return {\n status: PageResourceStatus.Error,\n }\n }\n\n // if HEAD request wasn't 200, return notFound result\n // and show 404 page\n return data\n })\n }\n return data\n })\n }\n\n loadPartialHydrationJson(rawPath) {\n return super.loadPartialHydrationJson(rawPath).then(data => {\n if (data.notFound) {\n // check if html file exist using HEAD request:\n // if it does we should navigate to it instead of showing 404\n return doFetch(rawPath, `HEAD`).then(req => {\n if (req.status === 200) {\n // page (.html file) actually exist (or we asked for 404 )\n // returning page resources status as errored to trigger\n // regular browser navigation to given page\n return {\n status: PageResourceStatus.Error,\n }\n }\n\n // if HEAD request wasn't 200, return notFound result\n // and show 404 page\n return data\n })\n }\n return data\n })\n }\n}\n\nlet instance\n\nexport const setLoader = _loader => {\n instance = _loader\n}\n\nexport const publicLoader = {\n enqueue: rawPath => instance.prefetch(rawPath),\n\n // Real methods\n getResourceURLsForPathname: rawPath =>\n instance.getResourceURLsForPathname(rawPath),\n loadPage: rawPath => instance.loadPage(rawPath),\n // TODO add deprecation to v4 so people use withErrorDetails and then we can remove in v5 and change default behaviour\n loadPageSync: (rawPath, options = {}) =>\n instance.loadPageSync(rawPath, options),\n prefetch: rawPath => instance.prefetch(rawPath),\n isPageNotFound: rawPath => instance.isPageNotFound(rawPath),\n hovering: rawPath => instance.hovering(rawPath),\n loadAppData: () => instance.loadAppData(),\n}\n\nexport default publicLoader\n\nexport function getStaticQueryResults() {\n if (instance) {\n return instance.staticQueryDb\n } else {\n return {}\n }\n}\n","import { useEffect } from \"react\"\n\n/*\n * Calls callback in an effect and renders children\n */\nexport function FireCallbackInEffect({ children, callback }) {\n useEffect(() => {\n callback()\n })\n\n return children\n}\n","export const VALID_NODE_NAMES = [\n `link`,\n `meta`,\n `style`,\n `title`,\n `base`,\n `noscript`,\n `script`,\n]\n","import { VALID_NODE_NAMES } from \"./constants\"\n\n/**\n * Filter the props coming from a page down to just the ones that are relevant for head.\n * This e.g. filters out properties that are undefined during SSR.\n */\nexport function filterHeadProps(input) {\n return {\n location: {\n pathname: input.location.pathname,\n },\n params: input.params,\n data: input.data || {},\n pageContext: input.pageContext,\n }\n}\n\n/**\n * Throw error if Head export is not a valid\n */\nexport function headExportValidator(head) {\n if (typeof head !== `function`)\n throw new Error(\n `Expected \"Head\" export to be a function got \"${typeof head}\".`\n )\n}\n\n/**\n * Warn once for same messsage\n */\nlet warnOnce = _ => {}\nif (process.env.NODE_ENV !== `production`) {\n const warnings = new Set()\n warnOnce = msg => {\n if (!warnings.has(msg)) {\n console.warn(msg)\n }\n warnings.add(msg)\n }\n}\n\n/**\n * Warn for invalid tags in head.\n * @param {string} tagName\n */\nexport function warnForInvalidTags(tagName) {\n if (process.env.NODE_ENV !== `production`) {\n const warning = `<${tagName}> is not a valid head element. Please use one of the following: ${VALID_NODE_NAMES.join(\n `, `\n )}`\n\n warnOnce(warning)\n }\n}\n\n/**\n * When a `nonce` is present on an element, browsers such as Chrome and Firefox strip it out of the\n * actual HTML attributes for security reasons *when the element is added to the document*. Thus,\n * given two equivalent elements that have nonces, `Element,isEqualNode()` will return false if one\n * of those elements gets added to the document. Although the `element.nonce` property will be the\n * same for both elements, the one that was added to the document will return an empty string for\n * its nonce HTML attribute value.\n *\n * This custom `isEqualNode()` function therefore removes the nonce value from the `newTag` before\n * comparing it to `oldTag`, restoring it afterwards.\n *\n * For more information, see:\n * https://bugs.chromium.org/p/chromium/issues/detail?id=1211471#c12\n */\nexport function isEqualNode(oldTag, newTag) {\n if (oldTag instanceof HTMLElement && newTag instanceof HTMLElement) {\n const nonce = newTag.getAttribute(`nonce`)\n // Only strip the nonce if `oldTag` has had it stripped. An element's nonce attribute will not\n // be stripped if there is no content security policy response header that includes a nonce.\n if (nonce && !oldTag.getAttribute(`nonce`)) {\n const cloneTag = newTag.cloneNode(true)\n cloneTag.setAttribute(`nonce`, ``)\n cloneTag.nonce = nonce\n return nonce === oldTag.nonce && oldTag.isEqualNode(cloneTag)\n }\n }\n\n return oldTag.isEqualNode(newTag)\n}\n\nexport function diffNodes({ oldNodes, newNodes, onStale, onNew }) {\n for (const existingHeadElement of oldNodes) {\n const indexInNewNodes = newNodes.findIndex(e =>\n isEqualNode(e, existingHeadElement)\n )\n\n if (indexInNewNodes === -1) {\n onStale(existingHeadElement)\n } else {\n // this node is re-created as-is, so we keep old node, and remove it from list of new nodes (as we handled it already here)\n newNodes.splice(indexInNewNodes, 1)\n }\n }\n\n // remaing new nodes didn't have matching old node, so need to be added\n for (const newNode of newNodes) {\n onNew(newNode)\n }\n}\n","import React from \"react\"\nimport { useEffect } from \"react\"\nimport { StaticQueryContext } from \"gatsby\"\nimport { LocationProvider } from \"@gatsbyjs/reach-router\"\nimport { reactDOMUtils } from \"../react-dom-utils\"\nimport { FireCallbackInEffect } from \"./components/fire-callback-in-effect\"\nimport { VALID_NODE_NAMES } from \"./constants\"\nimport {\n headExportValidator,\n filterHeadProps,\n warnForInvalidTags,\n diffNodes,\n} from \"./utils\"\n\nconst hiddenRoot = document.createElement(`div`)\n\nconst removePrevHeadElements = () => {\n const prevHeadNodes = document.querySelectorAll(`[data-gatsby-head]`)\n\n for (const node of prevHeadNodes) {\n node.parentNode.removeChild(node)\n }\n}\n\nconst onHeadRendered = () => {\n const validHeadNodes = []\n\n const seenIds = new Map()\n for (const node of hiddenRoot.childNodes) {\n const nodeName = node.nodeName.toLowerCase()\n const id = node.attributes?.id?.value\n\n if (!VALID_NODE_NAMES.includes(nodeName)) {\n warnForInvalidTags(nodeName)\n } else {\n let clonedNode = node.cloneNode(true)\n clonedNode.setAttribute(`data-gatsby-head`, true)\n\n // Create an element for scripts to make script work\n if (clonedNode.nodeName.toLowerCase() === `script`) {\n const script = document.createElement(`script`)\n for (const attr of clonedNode.attributes) {\n script.setAttribute(attr.name, attr.value)\n }\n script.innerHTML = clonedNode.innerHTML\n clonedNode = script\n }\n\n if (id) {\n if (!seenIds.has(id)) {\n validHeadNodes.push(clonedNode)\n seenIds.set(id, validHeadNodes.length - 1)\n } else {\n const indexOfPreviouslyInsertedNode = seenIds.get(id)\n validHeadNodes[indexOfPreviouslyInsertedNode].parentNode?.removeChild(\n validHeadNodes[indexOfPreviouslyInsertedNode]\n )\n validHeadNodes[indexOfPreviouslyInsertedNode] = clonedNode\n }\n } else {\n validHeadNodes.push(clonedNode)\n }\n }\n }\n\n const existingHeadElements = document.querySelectorAll(`[data-gatsby-head]`)\n\n if (existingHeadElements.length === 0) {\n document.head.append(...validHeadNodes)\n return\n }\n\n const newHeadNodes = []\n diffNodes({\n oldNodes: existingHeadElements,\n newNodes: validHeadNodes,\n onStale: node => node.parentNode.removeChild(node),\n onNew: node => newHeadNodes.push(node),\n })\n\n document.head.append(...newHeadNodes)\n}\n\nif (process.env.BUILD_STAGE === `develop`) {\n // We set up observer to be able to regenerate after react-refresh\n // updates our hidden element.\n const observer = new MutationObserver(onHeadRendered)\n observer.observe(hiddenRoot, {\n attributes: true,\n childList: true,\n characterData: true,\n subtree: true,\n })\n}\n\nexport function headHandlerForBrowser({\n pageComponent,\n staticQueryResults,\n pageComponentProps,\n}) {\n useEffect(() => {\n if (pageComponent?.Head) {\n headExportValidator(pageComponent.Head)\n\n const { render } = reactDOMUtils()\n\n const Head = pageComponent.Head\n\n render(\n // just a hack to call the callback after react has done first render\n // Note: In dev, we call onHeadRendered twice( in FireCallbackInEffect and after mutualution observer dectects initail render into hiddenRoot) this is for hot reloading\n // In Prod we only call onHeadRendered in FireCallbackInEffect to render to head\n \n \n \n \n \n \n ,\n hiddenRoot\n )\n }\n\n return () => {\n removePrevHeadElements()\n }\n })\n}\n","import React, { Suspense, createElement } from \"react\"\nimport PropTypes from \"prop-types\"\nimport { apiRunner } from \"./api-runner-browser\"\nimport { grabMatchParams } from \"./find-path\"\nimport { headHandlerForBrowser } from \"./head/head-export-handler-for-browser\"\n\n// Renders page\nfunction PageRenderer(props) {\n const pageComponentProps = {\n ...props,\n params: {\n ...grabMatchParams(props.location.pathname),\n ...props.pageResources.json.pageContext.__params,\n },\n }\n\n const preferDefault = m => (m && m.default) || m\n\n let pageElement\n if (props.pageResources.partialHydration) {\n pageElement = props.pageResources.partialHydration\n } else {\n pageElement = createElement(preferDefault(props.pageResources.component), {\n ...pageComponentProps,\n key: props.path || props.pageResources.page.path,\n })\n }\n\n const pageComponent = props.pageResources.head\n\n headHandlerForBrowser({\n pageComponent,\n staticQueryResults: props.pageResources.staticQueryResults,\n pageComponentProps,\n })\n\n const wrappedPage = apiRunner(\n `wrapPageElement`,\n {\n element: pageElement,\n props: pageComponentProps,\n },\n pageElement,\n ({ result }) => {\n return { element: result, props: pageComponentProps }\n }\n ).pop()\n\n return wrappedPage\n}\n\nPageRenderer.propTypes = {\n location: PropTypes.object.isRequired,\n pageResources: PropTypes.object.isRequired,\n data: PropTypes.object,\n pageContext: PropTypes.object.isRequired,\n}\n\nexport default PageRenderer\n","// This is extracted to separate module because it's shared\n// between browser and SSR code\nexport const RouteAnnouncerProps = {\n id: `gatsby-announcer`,\n style: {\n position: `absolute`,\n top: 0,\n width: 1,\n height: 1,\n padding: 0,\n overflow: `hidden`,\n clip: `rect(0, 0, 0, 0)`,\n whiteSpace: `nowrap`,\n border: 0,\n },\n \"aria-live\": `assertive`,\n \"aria-atomic\": `true`,\n}\n","import React from \"react\"\nimport PropTypes from \"prop-types\"\nimport loader, { PageResourceStatus } from \"./loader\"\nimport { maybeGetBrowserRedirect } from \"./redirect-utils.js\"\nimport { apiRunner } from \"./api-runner-browser\"\nimport emitter from \"./emitter\"\nimport { RouteAnnouncerProps } from \"./route-announcer-props\"\nimport { navigate as reachNavigate } from \"@gatsbyjs/reach-router\"\nimport { globalHistory } from \"@gatsbyjs/reach-router/lib/history\"\nimport { parsePath } from \"gatsby-link\"\n\nfunction maybeRedirect(pathname) {\n const redirect = maybeGetBrowserRedirect(pathname)\n const { hash, search } = window.location\n\n if (redirect != null) {\n window.___replace(redirect.toPath + search + hash)\n return true\n } else {\n return false\n }\n}\n\n// Catch unhandled chunk loading errors and force a restart of the app.\nlet nextRoute = ``\n\nwindow.addEventListener(`unhandledrejection`, event => {\n if (/loading chunk \\d* failed./i.test(event.reason)) {\n if (nextRoute) {\n window.location.pathname = nextRoute\n }\n }\n})\n\nconst onPreRouteUpdate = (location, prevLocation) => {\n if (!maybeRedirect(location.pathname)) {\n nextRoute = location.pathname\n apiRunner(`onPreRouteUpdate`, { location, prevLocation })\n }\n}\n\nconst onRouteUpdate = (location, prevLocation) => {\n if (!maybeRedirect(location.pathname)) {\n apiRunner(`onRouteUpdate`, { location, prevLocation })\n if (\n process.env.GATSBY_EXPERIMENTAL_QUERY_ON_DEMAND &&\n process.env.GATSBY_QUERY_ON_DEMAND_LOADING_INDICATOR === `true`\n ) {\n emitter.emit(`onRouteUpdate`, { location, prevLocation })\n }\n }\n}\n\nconst navigate = (to, options = {}) => {\n // Support forward/backward navigation with numbers\n // navigate(-2) (jumps back 2 history steps)\n // navigate(2) (jumps forward 2 history steps)\n if (typeof to === `number`) {\n globalHistory.navigate(to)\n return\n }\n\n const { pathname, search, hash } = parsePath(to)\n const redirect = maybeGetBrowserRedirect(pathname)\n\n // If we're redirecting, just replace the passed in pathname\n // to the one we want to redirect to.\n if (redirect) {\n to = redirect.toPath + search + hash\n }\n\n // If we had a service worker update, no matter the path, reload window and\n // reset the pathname whitelist\n if (window.___swUpdated) {\n window.location = pathname + search + hash\n return\n }\n\n // Start a timer to wait for a second before transitioning and showing a\n // loader in case resources aren't around yet.\n const timeoutId = setTimeout(() => {\n emitter.emit(`onDelayedLoadPageResources`, { pathname })\n apiRunner(`onRouteUpdateDelayed`, {\n location: window.location,\n })\n }, 1000)\n\n loader.loadPage(pathname + search).then(pageResources => {\n // If no page resources, then refresh the page\n // Do this, rather than simply `window.location.reload()`, so that\n // pressing the back/forward buttons work - otherwise when pressing\n // back, the browser will just change the URL and expect JS to handle\n // the change, which won't always work since it might not be a Gatsby\n // page.\n if (!pageResources || pageResources.status === PageResourceStatus.Error) {\n window.history.replaceState({}, ``, location.href)\n window.location = pathname\n clearTimeout(timeoutId)\n return\n }\n\n // If the loaded page has a different compilation hash to the\n // window, then a rebuild has occurred on the server. Reload.\n if (process.env.NODE_ENV === `production` && pageResources) {\n if (\n pageResources.page.webpackCompilationHash !==\n window.___webpackCompilationHash\n ) {\n // Purge plugin-offline cache\n if (\n `serviceWorker` in navigator &&\n navigator.serviceWorker.controller !== null &&\n navigator.serviceWorker.controller.state === `activated`\n ) {\n navigator.serviceWorker.controller.postMessage({\n gatsbyApi: `clearPathResources`,\n })\n }\n\n window.location = pathname + search + hash\n }\n }\n reachNavigate(to, options)\n clearTimeout(timeoutId)\n })\n}\n\nfunction shouldUpdateScroll(prevRouterProps, { location }) {\n const { pathname, hash } = location\n const results = apiRunner(`shouldUpdateScroll`, {\n prevRouterProps,\n // `pathname` for backwards compatibility\n pathname,\n routerProps: { location },\n getSavedScrollPosition: args => [\n 0,\n // FIXME this is actually a big code smell, we should fix this\n // eslint-disable-next-line @babel/no-invalid-this\n this._stateStorage.read(args, args.key),\n ],\n })\n if (results.length > 0) {\n // Use the latest registered shouldUpdateScroll result, this allows users to override plugin's configuration\n // @see https://github.com/gatsbyjs/gatsby/issues/12038\n return results[results.length - 1]\n }\n\n if (prevRouterProps) {\n const {\n location: { pathname: oldPathname },\n } = prevRouterProps\n if (oldPathname === pathname) {\n // Scroll to element if it exists, if it doesn't, or no hash is provided,\n // scroll to top.\n return hash ? decodeURI(hash.slice(1)) : [0, 0]\n }\n }\n return true\n}\n\nfunction init() {\n // The \"scroll-behavior\" package expects the \"action\" to be on the location\n // object so let's copy it over.\n globalHistory.listen(args => {\n args.location.action = args.action\n })\n\n window.___push = to => navigate(to, { replace: false })\n window.___replace = to => navigate(to, { replace: true })\n window.___navigate = (to, options) => navigate(to, options)\n}\n\nclass RouteAnnouncer extends React.Component {\n constructor(props) {\n super(props)\n this.announcementRef = React.createRef()\n }\n\n componentDidUpdate(prevProps, nextProps) {\n requestAnimationFrame(() => {\n let pageName = `new page at ${this.props.location.pathname}`\n if (document.title) {\n pageName = document.title\n }\n const pageHeadings = document.querySelectorAll(`#gatsby-focus-wrapper h1`)\n if (pageHeadings && pageHeadings.length) {\n pageName = pageHeadings[0].textContent\n }\n const newAnnouncement = `Navigated to ${pageName}`\n if (this.announcementRef.current) {\n const oldAnnouncement = this.announcementRef.current.innerText\n if (oldAnnouncement !== newAnnouncement) {\n this.announcementRef.current.innerText = newAnnouncement\n }\n }\n })\n }\n\n render() {\n return
\n }\n}\n\nconst compareLocationProps = (prevLocation, nextLocation) => {\n if (prevLocation.href !== nextLocation.href) {\n return true\n }\n\n if (prevLocation?.state?.key !== nextLocation?.state?.key) {\n return true\n }\n\n return false\n}\n\n// Fire on(Pre)RouteUpdate APIs\nclass RouteUpdates extends React.Component {\n constructor(props) {\n super(props)\n onPreRouteUpdate(props.location, null)\n }\n\n componentDidMount() {\n onRouteUpdate(this.props.location, null)\n }\n\n shouldComponentUpdate(prevProps) {\n if (compareLocationProps(prevProps.location, this.props.location)) {\n onPreRouteUpdate(this.props.location, prevProps.location)\n return true\n }\n return false\n }\n\n componentDidUpdate(prevProps) {\n if (compareLocationProps(prevProps.location, this.props.location)) {\n onRouteUpdate(this.props.location, prevProps.location)\n }\n }\n\n render() {\n return (\n \n {this.props.children}\n \n \n )\n }\n}\n\nRouteUpdates.propTypes = {\n location: PropTypes.object.isRequired,\n}\n\nexport { init, shouldUpdateScroll, RouteUpdates, maybeGetBrowserRedirect }\n","// Pulled from react-compat\n// https://github.com/developit/preact-compat/blob/7c5de00e7c85e2ffd011bf3af02899b63f699d3a/src/index.js#L349\nfunction shallowDiffers(a, b) {\n for (var i in a) {\n if (!(i in b)) return true;\n }for (var _i in b) {\n if (a[_i] !== b[_i]) return true;\n }return false;\n}\n\nexport default (function (instance, nextProps, nextState) {\n return shallowDiffers(instance.props, nextProps) || shallowDiffers(instance.state, nextState);\n});","import React from \"react\"\nimport loader, { PageResourceStatus } from \"./loader\"\nimport shallowCompare from \"shallow-compare\"\n\nclass EnsureResources extends React.Component {\n constructor(props) {\n super()\n const { location, pageResources } = props\n this.state = {\n location: { ...location },\n pageResources:\n pageResources ||\n loader.loadPageSync(location.pathname + location.search, {\n withErrorDetails: true,\n }),\n }\n }\n\n static getDerivedStateFromProps({ location }, prevState) {\n if (prevState.location.href !== location.href) {\n const pageResources = loader.loadPageSync(\n location.pathname + location.search,\n {\n withErrorDetails: true,\n }\n )\n\n return {\n pageResources,\n location: { ...location },\n }\n }\n\n return {\n location: { ...location },\n }\n }\n\n loadResources(rawPath) {\n loader.loadPage(rawPath).then(pageResources => {\n if (pageResources && pageResources.status !== PageResourceStatus.Error) {\n this.setState({\n location: { ...window.location },\n pageResources,\n })\n } else {\n window.history.replaceState({}, ``, location.href)\n window.location = rawPath\n }\n })\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n // Always return false if we're missing resources.\n if (!nextState.pageResources) {\n this.loadResources(\n nextProps.location.pathname + nextProps.location.search\n )\n return false\n }\n\n if (\n process.env.BUILD_STAGE === `develop` &&\n nextState.pageResources.stale\n ) {\n this.loadResources(\n nextProps.location.pathname + nextProps.location.search\n )\n return false\n }\n\n // Check if the component or json have changed.\n if (this.state.pageResources !== nextState.pageResources) {\n return true\n }\n if (\n this.state.pageResources.component !== nextState.pageResources.component\n ) {\n return true\n }\n\n if (this.state.pageResources.json !== nextState.pageResources.json) {\n return true\n }\n // Check if location has changed on a page using internal routing\n // via matchPath configuration.\n if (\n this.state.location.key !== nextState.location.key &&\n nextState.pageResources.page &&\n (nextState.pageResources.page.matchPath ||\n nextState.pageResources.page.path)\n ) {\n return true\n }\n return shallowCompare(this, nextProps, nextState)\n }\n\n render() {\n if (\n process.env.NODE_ENV !== `production` &&\n (!this.state.pageResources ||\n this.state.pageResources.status === PageResourceStatus.Error)\n ) {\n const message = `EnsureResources was not able to find resources for path: \"${this.props.location.pathname}\"\nThis typically means that an issue occurred building components for that path.\nRun \\`gatsby clean\\` to remove any cached elements.`\n if (this.state.pageResources?.error) {\n console.error(message)\n throw this.state.pageResources.error\n }\n\n throw new Error(message)\n }\n\n return this.props.children(this.state)\n }\n}\n\nexport default EnsureResources\n","import { apiRunner, apiRunnerAsync } from \"./api-runner-browser\"\nimport React from \"react\"\nimport { Router, navigate, Location, BaseContext } from \"@gatsbyjs/reach-router\"\nimport { ScrollContext } from \"gatsby-react-router-scroll\"\nimport { StaticQueryContext } from \"gatsby\"\nimport {\n shouldUpdateScroll,\n init as navigationInit,\n RouteUpdates,\n} from \"./navigation\"\nimport emitter from \"./emitter\"\nimport PageRenderer from \"./page-renderer\"\nimport asyncRequires from \"$virtual/async-requires\"\nimport {\n setLoader,\n ProdLoader,\n publicLoader,\n PageResourceStatus,\n getStaticQueryResults,\n} from \"./loader\"\nimport EnsureResources from \"./ensure-resources\"\nimport stripPrefix from \"./strip-prefix\"\n\n// Generated during bootstrap\nimport matchPaths from \"$virtual/match-paths.json\"\nimport { reactDOMUtils } from \"./react-dom-utils\"\n\nconst loader = new ProdLoader(asyncRequires, matchPaths, window.pageData)\nsetLoader(loader)\nloader.setApiRunner(apiRunner)\n\nconst { render, hydrate } = reactDOMUtils()\n\nwindow.asyncRequires = asyncRequires\nwindow.___emitter = emitter\nwindow.___loader = publicLoader\n\nnavigationInit()\n\nconst reloadStorageKey = `gatsby-reload-compilation-hash-match`\n\napiRunnerAsync(`onClientEntry`).then(() => {\n // Let plugins register a service worker. The plugin just needs\n // to return true.\n if (apiRunner(`registerServiceWorker`).filter(Boolean).length > 0) {\n require(`./register-service-worker`)\n }\n\n // In gatsby v2 if Router is used in page using matchPaths\n // paths need to contain full path.\n // For example:\n // - page have `/app/*` matchPath\n // - inside template user needs to use `/app/xyz` as path\n // Resetting `basepath`/`baseuri` keeps current behaviour\n // to not introduce breaking change.\n // Remove this in v3\n const RouteHandler = props => (\n \n \n \n )\n\n const DataContext = React.createContext({})\n\n class GatsbyRoot extends React.Component {\n render() {\n const { children } = this.props\n return (\n \n {({ location }) => (\n \n {({ pageResources, location }) => {\n if (pageResources.partialHydration) {\n return (\n \n {children}\n \n )\n } else {\n const staticQueryResults = getStaticQueryResults()\n return (\n \n \n {children}\n \n \n )\n }\n }}\n \n )}\n \n )\n }\n }\n\n class LocationHandler extends React.Component {\n render() {\n return (\n \n {({ pageResources, location }) => (\n \n \n \n \n
\n \n \n )}\n \n )\n }\n }\n\n const { pagePath, location: browserLoc } = window\n\n // Explicitly call navigate if the canonical path (window.pagePath)\n // is different to the browser path (window.location.pathname). SSR\n // page paths might include search params, while SSG and DSG won't.\n // If page path include search params we also compare query params.\n // But only if NONE of the following conditions hold:\n //\n // - The url matches a client side route (page.matchPath)\n // - it's a 404 page\n // - it's the offline plugin shell (/offline-plugin-app-shell-fallback/)\n if (\n pagePath &&\n __BASE_PATH__ + pagePath !==\n browserLoc.pathname + (pagePath.includes(`?`) ? browserLoc.search : ``) &&\n !(\n loader.findMatchPath(stripPrefix(browserLoc.pathname, __BASE_PATH__)) ||\n pagePath.match(/^\\/(404|500)(\\/?|.html)$/) ||\n pagePath.match(/^\\/offline-plugin-app-shell-fallback\\/?$/)\n )\n ) {\n navigate(\n __BASE_PATH__ +\n pagePath +\n (!pagePath.includes(`?`) ? browserLoc.search : ``) +\n browserLoc.hash,\n {\n replace: true,\n }\n )\n }\n\n // It's possible that sessionStorage can throw an exception if access is not granted, see https://github.com/gatsbyjs/gatsby/issues/34512\n const getSessionStorage = () => {\n try {\n return sessionStorage\n } catch {\n return null\n }\n }\n\n publicLoader.loadPage(browserLoc.pathname + browserLoc.search).then(page => {\n const sessionStorage = getSessionStorage()\n\n if (\n page?.page?.webpackCompilationHash &&\n page.page.webpackCompilationHash !== window.___webpackCompilationHash\n ) {\n // Purge plugin-offline cache\n if (\n `serviceWorker` in navigator &&\n navigator.serviceWorker.controller !== null &&\n navigator.serviceWorker.controller.state === `activated`\n ) {\n navigator.serviceWorker.controller.postMessage({\n gatsbyApi: `clearPathResources`,\n })\n }\n\n // We have not matching html + js (inlined `window.___webpackCompilationHash`)\n // with our data (coming from `app-data.json` file). This can cause issues such as\n // errors trying to load static queries (as list of static queries is inside `page-data`\n // which might not match to currently loaded `.js` scripts).\n // We are making attempt to reload if hashes don't match, but we also have to handle case\n // when reload doesn't fix it (possibly broken deploy) so we don't end up in infinite reload loop\n if (sessionStorage) {\n const isReloaded = sessionStorage.getItem(reloadStorageKey) === `1`\n\n if (!isReloaded) {\n sessionStorage.setItem(reloadStorageKey, `1`)\n window.location.reload(true)\n return\n }\n }\n }\n\n if (sessionStorage) {\n sessionStorage.removeItem(reloadStorageKey)\n }\n\n if (!page || page.status === PageResourceStatus.Error) {\n const message = `page resources for ${browserLoc.pathname} not found. Not rendering React`\n\n // if the chunk throws an error we want to capture the real error\n // This should help with https://github.com/gatsbyjs/gatsby/issues/19618\n if (page && page.error) {\n console.error(message)\n throw page.error\n }\n\n throw new Error(message)\n }\n\n const SiteRoot = apiRunner(\n `wrapRootElement`,\n { element: },\n ,\n ({ result }) => {\n return { element: result }\n }\n ).pop()\n\n const App = function App() {\n const onClientEntryRanRef = React.useRef(false)\n\n React.useEffect(() => {\n if (!onClientEntryRanRef.current) {\n onClientEntryRanRef.current = true\n if (performance.mark) {\n performance.mark(`onInitialClientRender`)\n }\n\n apiRunner(`onInitialClientRender`)\n }\n }, [])\n\n return {SiteRoot}\n }\n\n const focusEl = document.getElementById(`gatsby-focus-wrapper`)\n\n // Client only pages have any empty body so we just do a normal\n // render to avoid React complaining about hydration mis-matches.\n let defaultRenderer = render\n if (focusEl && focusEl.children.length) {\n defaultRenderer = hydrate\n }\n\n const renderer = apiRunner(\n `replaceHydrateFunction`,\n undefined,\n defaultRenderer\n )[0]\n\n function runRender() {\n const rootElement =\n typeof window !== `undefined`\n ? document.getElementById(`___gatsby`)\n : null\n\n renderer(, rootElement)\n }\n\n // https://github.com/madrobby/zepto/blob/b5ed8d607f67724788ec9ff492be297f64d47dfc/src/zepto.js#L439-L450\n // TODO remove IE 10 support\n const doc = document\n if (\n doc.readyState === `complete` ||\n (doc.readyState !== `loading` && !doc.documentElement.doScroll)\n ) {\n setTimeout(function () {\n runRender()\n }, 0)\n } else {\n const handler = function () {\n doc.removeEventListener(`DOMContentLoaded`, handler, false)\n window.removeEventListener(`load`, handler, false)\n\n runRender()\n }\n\n doc.addEventListener(`DOMContentLoaded`, handler, false)\n window.addEventListener(`load`, handler, false)\n }\n\n return\n })\n})\n","import React from \"react\"\nimport PropTypes from \"prop-types\"\n\nimport loader from \"./loader\"\nimport InternalPageRenderer from \"./page-renderer\"\n\nconst ProdPageRenderer = ({ location }) => {\n const pageResources = loader.loadPageSync(location.pathname)\n if (!pageResources) {\n return null\n }\n return React.createElement(InternalPageRenderer, {\n location,\n pageResources,\n ...pageResources.json,\n })\n}\n\nProdPageRenderer.propTypes = {\n location: PropTypes.shape({\n pathname: PropTypes.string.isRequired,\n }).isRequired,\n}\n\nexport default ProdPageRenderer\n","const preferDefault = m => (m && m.default) || m\n\nif (process.env.BUILD_STAGE === `develop`) {\n module.exports = preferDefault(require(`./public-page-renderer-dev`))\n} else if (process.env.BUILD_STAGE === `build-javascript`) {\n module.exports = preferDefault(require(`./public-page-renderer-prod`))\n} else {\n module.exports = () => null\n}\n","/* global HAS_REACT_18 */\n\nconst map = new WeakMap()\n\n/**\n * Since react 18, render and hydrate moved to react-dom/client\n * returns correct hydrate and render function based on installed react-dom version\n */\n\nexport function reactDOMUtils() {\n let render\n let hydrate\n\n if (HAS_REACT_18) {\n const reactDomClient = require(`react-dom/client`)\n\n render = (Component, el) => {\n let root = map.get(el)\n if (!root) {\n map.set(el, (root = reactDomClient.createRoot(el)))\n }\n root.render(Component)\n }\n\n hydrate = (Component, el) => reactDomClient.hydrateRoot(el, Component)\n } else {\n const reactDomClient = require(`react-dom`)\n render = reactDomClient.render\n hydrate = reactDomClient.hydrate\n }\n\n return { render, hydrate }\n}\n","exports.polyfill = Component => Component\n","import redirects from \"./redirects.json\"\n\n// Convert to a map for faster lookup in maybeRedirect()\n\nconst redirectMap = new Map()\nconst redirectIgnoreCaseMap = new Map()\n\nredirects.forEach(redirect => {\n if (redirect.ignoreCase) {\n redirectIgnoreCaseMap.set(redirect.fromPath, redirect)\n } else {\n redirectMap.set(redirect.fromPath, redirect)\n }\n})\n\nexport function maybeGetBrowserRedirect(pathname) {\n let redirect = redirectMap.get(pathname)\n if (!redirect) {\n redirect = redirectIgnoreCaseMap.get(pathname.toLowerCase())\n }\n return redirect\n}\n","import { apiRunner } from \"./api-runner-browser\"\n\nif (\n window.location.protocol !== `https:` &&\n window.location.hostname !== `localhost`\n) {\n console.error(\n `Service workers can only be used over HTTPS, or on localhost for development`\n )\n} else if (`serviceWorker` in navigator) {\n navigator.serviceWorker\n .register(`${__BASE_PATH__}/sw.js`)\n .then(function (reg) {\n reg.addEventListener(`updatefound`, () => {\n apiRunner(`onServiceWorkerUpdateFound`, { serviceWorker: reg })\n // The updatefound event implies that reg.installing is set; see\n // https://w3c.github.io/ServiceWorker/#service-worker-registration-updatefound-event\n const installingWorker = reg.installing\n console.log(`installingWorker`, installingWorker)\n installingWorker.addEventListener(`statechange`, () => {\n switch (installingWorker.state) {\n case `installed`:\n if (navigator.serviceWorker.controller) {\n // At this point, the old content will have been purged and the fresh content will\n // have been added to the cache.\n\n // We set a flag so Gatsby Link knows to refresh the page on next navigation attempt\n window.___swUpdated = true\n // We call the onServiceWorkerUpdateReady API so users can show update prompts.\n apiRunner(`onServiceWorkerUpdateReady`, { serviceWorker: reg })\n\n // If resources failed for the current page, reload.\n if (window.___failedResources) {\n console.log(`resources failed, SW updated - reloading`)\n window.location.reload()\n }\n } else {\n // At this point, everything has been precached.\n // It's the perfect time to display a \"Content is cached for offline use.\" message.\n console.log(`Content is now available offline!`)\n\n // Post to service worker that install is complete.\n // Delay to allow time for the event listener to be added --\n // otherwise fetch is called too soon and resources aren't cached.\n apiRunner(`onServiceWorkerInstalled`, { serviceWorker: reg })\n }\n break\n\n case `redundant`:\n console.error(`The installing service worker became redundant.`)\n apiRunner(`onServiceWorkerRedundant`, { serviceWorker: reg })\n break\n\n case `activated`:\n apiRunner(`onServiceWorkerActive`, { serviceWorker: reg })\n break\n }\n })\n })\n })\n .catch(function (e) {\n console.error(`Error during service worker registration:`, e)\n })\n}\n","/**\n * Remove a prefix from a string. Return the input string if the given prefix\n * isn't found.\n */\n\nexport default function stripPrefix(str, prefix = ``) {\n if (!prefix) {\n return str\n }\n\n if (str === prefix) {\n return `/`\n }\n\n if (str.startsWith(`${prefix}/`)) {\n return str.slice(prefix.length)\n }\n\n return str\n}\n","export const onRouteUpdate = ({\n location\n}, pluginOptions = {\n stripQueryString: false\n}) => {\n const domElem = document.querySelector(`link[rel='canonical']`);\n const existingValue = domElem.getAttribute(`href`);\n const baseProtocol = domElem.getAttribute(`data-baseProtocol`);\n const baseHost = domElem.getAttribute(`data-baseHost`);\n\n if (existingValue && baseProtocol && baseHost) {\n let value = `${baseProtocol}//${baseHost}${location.pathname}`;\n const {\n stripQueryString\n } = pluginOptions;\n\n if (!stripQueryString) {\n value += location.search;\n }\n\n value += location.hash;\n domElem.setAttribute(`href`, `${value}`);\n }\n};","const listOfMetricsSend = new Set();\n\nfunction debounce(fn, timeout) {\n let timer = null;\n return function (...args) {\n if (timer) {\n clearTimeout(timer);\n }\n\n timer = setTimeout(fn, timeout, ...args);\n };\n}\n\nfunction sendWebVitals(dataLayerName = `dataLayer`) {\n const win = window;\n\n function sendData(data) {\n if (listOfMetricsSend.has(data.name)) {\n return;\n }\n\n listOfMetricsSend.add(data.name);\n sendToGTM(data, win[dataLayerName]);\n }\n\n return import(`web-vitals/base`).then(({\n getLCP,\n getFID,\n getCLS\n }) => {\n const debouncedCLS = debounce(sendData, 3000); // we don't need to debounce FID - we send it when it happens\n\n const debouncedFID = sendData; // LCP can occur multiple times so we debounce it\n\n const debouncedLCP = debounce(sendData, 3000); // With the true flag, we measure all previous occurences too, in case we start listening to late.\n\n getCLS(debouncedCLS, true);\n getFID(debouncedFID, true);\n getLCP(debouncedLCP, true);\n });\n}\n\nfunction sendToGTM({\n name,\n value,\n id\n}, dataLayer) {\n dataLayer.push({\n event: `core-web-vitals`,\n webVitalsMeasurement: {\n name: name,\n // The `id` value will be unique to the current page load. When sending\n // multiple values from the same page (e.g. for CLS), Google Analytics can\n // compute a total by grouping on this ID (note: requires `eventLabel` to\n // be a dimension in your report).\n id,\n // Google Analytics metrics must be integers, so the value is rounded.\n // For CLS the value is first multiplied by 1000 for greater precision\n // (note: increase the multiplier for greater precision if needed).\n value: Math.round(name === `CLS` ? value * 1000 : value)\n }\n });\n}\n\nexport function onRouteUpdate(_, pluginOptions) {\n if (process.env.NODE_ENV === `production` || pluginOptions.includeInDevelopment) {\n // wrap inside a timeout to ensure the title has properly been changed\n setTimeout(() => {\n const data = pluginOptions.dataLayerName ? window[pluginOptions.dataLayerName] : window.dataLayer;\n const eventName = pluginOptions.routeChangeEventName ? pluginOptions.routeChangeEventName : `gatsby-route-change`;\n data.push({\n event: eventName\n });\n }, 50);\n }\n}\nexport function onInitialClientRender(_, pluginOptions) {\n // we only load the polyfill in production so we can't enable it in development\n if (process.env.NODE_ENV === `production` && pluginOptions.enableWebVitalsTracking) {\n sendWebVitals(pluginOptions.dataLayerName);\n }\n}","\"use strict\";\n\nexports.__esModule = true;\nexports.replaceHydrateFunction = void 0;\n\nvar _reactDom = require(\"react-dom\");\n\nvar _component = require(\"@loadable/component\");\n\nconst replaceHydrateFunction = (_, options) => (element, container, callback) => {\n (0, _component.loadableReady)(() => {\n const renderFn = typeof options.useHydrate === \"undefined\" ? // Using ReactDOM.hydrate on develop will throw an error in console\n process.env.BUILD_STAGE.includes(\"develop\") ? _reactDom.render : _reactDom.hydrate : !!options.useHydrate ? _reactDom.hydrate : _reactDom.render;\n renderFn(element, container, callback);\n });\n};\n\nexports.replaceHydrateFunction = replaceHydrateFunction;","/* global __MANIFEST_PLUGIN_HAS_LOCALISATION__ */\nimport { withPrefix } from \"gatsby\";\nimport getManifestForPathname from \"./get-manifest-pathname\"; // when we don't have localisation in our manifest, we tree shake everything away\n\nexport const onRouteUpdate = function onRouteUpdate({\n location\n}, pluginOptions) {\n if (__MANIFEST_PLUGIN_HAS_LOCALISATION__) {\n const {\n localize\n } = pluginOptions;\n const manifestFilename = getManifestForPathname(location.pathname, localize, true);\n const manifestEl = document.head.querySelector(`link[rel=\"manifest\"]`);\n\n if (manifestEl) {\n manifestEl.setAttribute(`href`, withPrefix(manifestFilename));\n }\n }\n};","\"use strict\";\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar _gatsby = require(\"gatsby\");\n\n/**\n * Get a manifest filename depending on localized pathname\n *\n * @param {string} pathname\n * @param {Array<{start_url: string, lang: string}>} localizedManifests\n * @param {boolean} shouldPrependPathPrefix\n * @return string\n */\nvar _default = (pathname, localizedManifests, shouldPrependPathPrefix = false) => {\n const defaultFilename = `manifest.webmanifest`;\n\n if (!Array.isArray(localizedManifests)) {\n return defaultFilename;\n }\n\n const localizedManifest = localizedManifests.find(app => {\n let startUrl = app.start_url;\n\n if (shouldPrependPathPrefix) {\n startUrl = (0, _gatsby.withPrefix)(startUrl);\n }\n\n return pathname.startsWith(startUrl);\n });\n\n if (!localizedManifest) {\n return defaultFilename;\n }\n\n return `manifest_${localizedManifest.lang}.webmanifest`;\n};\n\nexports.default = _default;","import { LocaleDialogContextProvider } from \"@nitro/gatsby-theme-harvia/src/context/LocaleDialogContext\"\nimport PageContextProvider, { IPageContext } from \"@nitro/gatsby-theme-harvia/src/context/PageContext\"\nimport { UserContextProvider } from \"@nitro/gatsby-theme-harvia/src/context/UserContext\"\nimport { type GatsbyBrowser, type GatsbySSR } from \"gatsby\"\nimport React from \"react\"\n\ntype DataType = Record\n\nexport const wrapRootElement: GatsbyBrowser[\"wrapRootElement\"] = ({ element }) => {\n return (\n \n {element}\n \n )\n}\n\nexport const wrapPageElement: GatsbyBrowser[\"wrapPageElement\"] = ({ element, props }) => {\n return {element}\n}\n\nexport const onRenderBody: GatsbySSR[\"onRenderBody\"] = args => {\n // Lisätään Zendesk chatti scripti saksankielisille sivuille.\n if (args.pathname.startsWith(\"/de/\")) {\n args.setPostBodyComponents([\n ,\n ])\n }\n\n // add Leadoo to en-US pages\n if (args.pathname.toLowerCase().startsWith(\"/en-us/\")) {\n args.setHeadComponents([\n ,\n ,\n ])\n }\n}\n","// extracted by mini-css-extract-plugin\nexport var button = \"Button-module--button--19a9f\";\nexport var flat = \"Button-module--flat--06178\";\nexport var normal = \"Button-module--normal--ac0b1\";\nexport var primary = \"Button-module--primary--2f269\";\nexport var secondary = \"Button-module--secondary--8fa60\";\nexport var small = \"Button-module--small--2dd64\";","import React, { ButtonHTMLAttributes, ReactNode } from \"react\"\nimport * as styles from \"./Button.module.scss\"\n\nexport type ButtonPriorityProp = \"primary\" | \"secondary\"\nexport type ButtonSizeProp = \"normal\" | \"flat\" | \"small\"\n\nexport type ButtonProps = {\n /**\n * Button importance\n */\n priority?: ButtonPriorityProp\n\n /**\n * Button size\n */\n size?: ButtonSizeProp\n /**\n * Button contents\n */\n label: string | ReactNode\n /**\n * Optional click handler\n */\n onClick?: () => void\n} & ButtonHTMLAttributes\n\n/**\n * Primary UI component for user interaction\n */\nconst Button: React.FC = ({ priority = \"default\", size = \"normal\", label, ...props }) => {\n // console.debug(\"Rendering Button\", props)\n const classNames = [props.className, styles.button]\n if (styles[size]) {\n classNames.push(styles[size])\n }\n if (styles[priority]) {\n classNames.push(styles[priority])\n }\n // const { type = \"button\" } = props\n return (\n \n )\n}\n\nexport default Button\n","import React, { ReactNode } from \"react\"\n//import styles from \"./ExternalLink.module.scss\"\n\nexport type ExternalLinkProps = {\n children: ReactNode\n} & React.AnchorHTMLAttributes\n\nconst ExternalLink = (props: ExternalLinkProps) => {\n //console.log('Rendering ExternalLink', props)\n const { children, ...anchorAttributes } = props\n return (\n \n {props.children}\n \n )\n}\n\nexport default ExternalLink\n","import { graphql } from \"gatsby\"\nimport React from \"react\"\nimport DatoLinkToRecord from \"./DatoLinkToRecord\"\n\nexport type DatoLinkListProps = {\n titleElement?: \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\"\n className?: string\n} & Queries.DatoLinkListFragment\n\nconst DatoLinkList = (props: DatoLinkListProps) => {\n // console.debug(\"Rendering LinkList\", props)\n const { titleElement: Title = \"h2\" } = props\n return (\n
\n {props.title && {props.title}}\n
    \n {props.links?.map(itm => {\n if (!itm?.title) {\n return null\n }\n return (\n
  • \n {itm.title}\n
  • \n )\n })}\n
\n
\n )\n}\n\nexport default DatoLinkList\n\nexport const query = graphql`\n fragment DatoLinkList on DatoCmsLinkList {\n title\n links {\n ... on Node {\n __typename\n }\n ... on DatoCmsExternalUrl {\n id\n url\n title\n }\n ... on DatoCmsRouteLink {\n id\n urlParams\n title\n route {\n originalId\n }\n }\n }\n }\n`\n","import { Link } from \"gatsby\"\nimport React, { ReactNode } from \"react\"\nimport useArticlePath from \"../../hooks/useArticlePath\"\nimport useProductPath from \"../../hooks/useProductPath\"\nimport useRoutePath from \"../../hooks/useRoutePath\"\nimport useWebsite from \"../../hooks/useWebsite\"\nimport ExternalLink from \"../atoms/ExternalLink\"\n// import styles from \"./DatoLinkToRecord.module.scss\"\n\ntype DatoLinkToRecordData =\n | ({ __typename: \"DatoCmsRouteLink\" } & Pick)\n | ({ __typename: \"DatoCmsProductLink\" } & Queries.DatoProductLinkFragment)\n | ({ __typename: \"DatoCmsProductFinderLink\" } & Pick)\n | ({ __typename: \"DatoCmsArticleLink\" } & Queries.DatoArticleLinkFragment)\n | ({ __typename: \"DatoCmsExternalUrl\" } & Partial>)\n\nexport type DatoLinkToRecordProps = { children?: ReactNode; newWindow?: boolean } & DatoLinkToRecordData\n\n/**\n * Mappaa structured text linkit React komponentteihin\n */\nconst DatoLinkToRecord = (props: DatoLinkToRecordProps) => {\n // console.debug(\"Rendering DatoLinkToRecord\", props)\n const website = useWebsite()\n const getProductPath = useProductPath()\n const getArticlePath = useArticlePath()\n const getRoutePath = useRoutePath()\n\n switch (props.__typename) {\n case \"DatoCmsRouteLink\": {\n const routePath = getRoutePath(props.route?.originalId)\n const url = `${routePath || \"\"}${props.urlParams || \"\"}`\n if (props.newWindow) {\n return (\n \n {props.children}\n \n )\n }\n return {props.children}\n }\n case \"DatoCmsProductLink\": {\n const target = getProductPath(props.sku)\n if (props.newWindow) {\n return (\n \n {props.children}\n \n )\n }\n return {props.children}\n }\n case \"DatoCmsProductFinderLink\": {\n const path = getRoutePath(website.productRootRoute?.originalId)\n const url = `${path}${props.searchQuery || \"\"}`\n if (props.newWindow) {\n return (\n \n {props.children}\n \n )\n }\n return {props.children}\n }\n case \"DatoCmsArticleLink\": {\n const target = getArticlePath(props.article?.originalId)\n const url = `${target}${props.urlParams || \"\"}`\n if (props.newWindow) {\n return (\n \n {props.children}\n \n )\n }\n return {props.children}\n }\n case \"DatoCmsExternalUrl\": {\n if (!props?.url) {\n console.warn(\"DatoLinkToRecord: Empty URL for ExternalLink\")\n return null\n }\n return {props.children || props.title}\n }\n /* case \"DatoCmsContactLocation\":\n return (\n i)\n .join()}`}\n target=\"_blank\">\n {children}\n \n ) */\n\n default:\n console.warn(`Unknown type \"${(props as any).__typename}\". Rendering skipped`)\n return null\n }\n}\n\nexport default DatoLinkToRecord\n","import { DatoLocale } from \"gatsby-theme-harvia/src/types\"\nimport { AreaKey } from \"./localeOptions\"\n\n/**\n * Map of locale codes used in Dato to language name in that language.\n * Intenteded use in language menus etc,\n */\nconst langTitles = new Map([\n [\"en\", \"English\"],\n [\"en-US\", \"English\"],\n [\"fi\", \"Suomi\"],\n [\"sv\", \"Svenska\"],\n [\"de\", \"Deutsch\"],\n [\"et\", \"Eesti\"],\n [\"jp\", \"Japan\"],\n])\n\nexport function getLangTitle(locale: DatoLocale | string): string | undefined {\n return langTitles.get(locale)\n}\n\nconst localeAreaTitles = new Map([\n [\"africa\", \"Africa\"],\n [\"asia\", \"Asia\"],\n // [\"canada\", \"Canada\"],\n [\"europe\", \"Europe\"],\n [\"global\", \"Global\"],\n [\"middle-east\", \"Middle East\"],\n [\"north-europe\", \"Nordics & Baltics\"],\n [\"oceania\", \"Oceania\"],\n [\"north-america\", \"USA & Canada\"],\n [\"south-america\", \"South America\"],\n // [\"usa\", \"United States\"],\n])\n\nexport function getLocaleAreaTitle(localeArea: AreaKey): string | undefined {\n return localeAreaTitles.get(localeArea)\n}\n","import React, { useEffect, useRef } from \"react\"\nimport * as s from \"./ModalDialog.module.scss\"\n\ntype ModalDialogProps = {\n children: React.ReactNode\n open: boolean\n onClose?: () => void\n}\n\nconst ModalDialog = (props: ModalDialogProps) => {\n // console.debug(\"Rendering ModalDialog\", props)\n // const [isOpen, setIsOpen] = useState(props.open)\n const modalRef = useRef(null)\n\n const { open } = props\n\n const handleCloseModal: React.ReactEventHandler = () => {\n // setIsOpen(false) // update internal state\n\n if (props.onClose) {\n // we have a callback registered so call it\n props.onClose()\n }\n }\n\n useEffect(() => {\n // console.debug(`ModalDialog effect on \"open\" while ref open status is \"${modalRef.current?.open}\"`)\n const modalElemement = modalRef.current\n if (!modalElemement) {\n return\n }\n if (open) {\n // console.debug(`ModalDialog opening on effect on \"open\" `)\n modalElemement.showModal()\n } else {\n // console.debug(`ModalDialog closing on effect on \"open\" `)\n modalElemement.close()\n }\n }, [open])\n\n return (\n \n {props.children}\n \n )\n}\n\nexport default ModalDialog\n","// extracted by mini-css-extract-plugin\nexport var dialog = \"ModalDialog-module--dialog--2eecd\";","import type { DatoLocale, LocaleArea } from \"gatsby-theme-harvia/src/types\"\nimport React from \"react\"\nimport { IoOpenOutline } from \"react-icons/io5\"\nimport * as s from \"./LocaleDialogAreaMenu.module.scss\"\nimport { getLangTitle, getLocaleAreaTitle } from \"./localeLabels\"\nimport type { AreaConfig } from \"./localeOptions\"\n\ntype LocaleDialogAreaMenuProps = {\n area: LocaleArea\n configs: AreaConfig[]\n onLocaleSelect: (locale: DatoLocale, area: LocaleArea) => void\n}\n\nconst LocaleDialogAreaMenu = (props: LocaleDialogAreaMenuProps) => {\n const title = getLocaleAreaTitle(props.area) || props.area // TODO\n\n return (\n
\n

{title}

\n {props.configs.map(config => {\n return (\n \n {/* {config.subArea &&

{getLocaleAreaTitle(config.subArea) || config.subArea}

} */}\n \n
\n )\n })}\n
\n )\n}\n\nexport default LocaleDialogAreaMenu\n","// extracted by mini-css-extract-plugin\nexport var container = \"LocaleDialogAreaMenu-module--container--45b1d\";\nexport var locales = \"LocaleDialogAreaMenu-module--locales--bd448\";","import { DatoLocale, LocaleArea } from \"gatsby-theme-harvia/src/types\"\n\n/**\n * Top level location areas\n */\n// type AreaTitleKey = Exclude | \"north-america\"\ntype AreaTitleKey = LocaleArea\n\n/**\n * Sub level location areas\n */\n// type SubAreaTitleKey = Extract\n\nexport type AreaKey = AreaTitleKey // | SubAreaTitleKey\n\ntype LocaleOptionMenuConfig = Map\n\nexport type AreaConfig = {\n locales: DatoLocale[]\n /** Unique ID used as `key` when looping items in React */\n id: string\n // subArea?: SubAreaTitleKey\n external?: { locale: string; href: string }\n}\n\n/**\n * Location dialog menu options.\n */\nconst localeOptions: LocaleOptionMenuConfig = new Map([\n [\"north-europe\", [{ id: \"main\", locales: [\"fi\", \"en\", \"sv\", \"et\"] }]],\n [\"europe\", [{ id: \"main\", locales: [\"de\", \"en\"] }]],\n [\n \"north-america\",\n [\n { id: \"usa\" /*, subArea: \"usa\"*/, locales: [\"en-US\"] },\n // { id: \"canada\", subArea: \"canada\", locales: [\"en\"] },\n ],\n ],\n [\"south-america\", [{ id: \"main\", locales: [\"en\"] }]],\n [\"asia\", [{ id: \"main\", external: { locale: \"jp\", href: \"https://harvia.jp\" }, locales: [\"en\"] }]],\n [\"middle-east\", [{ id: \"main\", locales: [\"en\"] }]],\n [\"africa\", [{ id: \"main\", locales: [\"en\"] }]],\n [\"oceania\", [{ id: \"main\", locales: [\"en\"] }]],\n [\"global\", [{ id: \"main\", locales: [\"en\"] }]],\n])\n\nexport default localeOptions\n","import { navigate } from \"gatsby\"\nimport React, { useCallback, useEffect } from \"react\"\nimport { useLocaleDialog } from \"../../../context/LocaleDialogContext\"\nimport { useUserPreferences, useUserPreferencesDispatch } from \"../../../context/UserContext\"\nimport { isLocaleArea, type DatoLocale, type LocaleArea } from \"../../../types\"\nimport Button from \"../../atoms/Button\"\nimport ModalDialog from \"../../molecules/ModalDialog\"\nimport * as styles from \"./LocaleDialog.module.scss\"\nimport LocaleDialogAreaMenu from \"./LocaleDialogAreaMenu\"\nimport localeOptions from \"./localeOptions\"\n\ntype LocaleDialogProps = {\n title: string\n subtitle?: string\n footer?: React.ReactNode\n}\n\n/**\n * A modal dialog for locale and area/country selection\n */\nconst LocaleDialog = (props: LocaleDialogProps) => {\n // console.debug(\"Rendering LocaleDialog\", props)\n const [isLocaleDialogOpen, setLocaleDialogOpen] = useLocaleDialog()\n const userPrefs = useUserPreferences()\n const userPrefDispatch = useUserPreferencesDispatch()\n\n const shouldOpenOnInit = userPrefs === null || !isLocaleArea(userPrefs.localeArea)\n // console.debug(\n // `Rendering LocaleDialog. It's open? \"${isLocaleDialogOpen}\". It should be open? \"${shouldOpenOnInit}\", because userPrefs`,\n // userPrefs\n // )\n\n const init = useCallback(() => {\n setLocaleDialogOpen(shouldOpenOnInit)\n }, [setLocaleDialogOpen, shouldOpenOnInit])\n\n useEffect(() => {\n init()\n }, [init])\n\n useEffect(() => {\n if (userPrefs.localeArea) {\n return\n }\n userPrefDispatch({ type: \"SET_DEFAULT_AREA\" })\n }, [userPrefDispatch, userPrefs.localeArea])\n\n const onCloseIntent = () => {\n // console.debug(`LocaleDialog onCloseIntent() called`, userPrefs)\n setLocaleDialogOpen(false)\n }\n\n function onLocaleSelect(locale: DatoLocale, area: LocaleArea) {\n // console.debug(`User selected area \"${area}\", locale \"${locale}\" with current locale \"${userPrefs?.language}\"`)\n userPrefDispatch({\n type: \"SET\",\n userPreferences: {\n localeArea: area,\n language: locale,\n },\n })\n\n // selecting a locale/area implies also intent to close the dialog\n onCloseIntent()\n\n // on language change or location set we should navigate to new language\n if (userPrefs?.language !== locale || !isLocaleArea(userPrefs?.localeArea)) {\n // console.debug(`Navigate from \"${userPrefs.language}\" to \"${locale}\"`)\n // TODO navigate to same page in different locale or if only area changes, refresh only wehen needed (product search pages etc)\n navigate(`/${locale}`) // `locale` is the new user selected \"languange\" here\n return\n }\n // on language change to different language than in the actual URL, we should also navigate to user selected new lang\n const urlPath = typeof window !== \"undefined\" ? window.location.pathname : \"\"\n const urlLang = urlPath.split(\"/\")[1]\n // console.debug(\n // `Should navigate? Lang in URL \"${urlLang}\", users new preference \"${locale}\" and previous preference \"${userPrefs?.language}\"`\n // )\n if (urlLang && urlLang !== locale) {\n // we should navigate even when `userPrefs.language === locale` because actual language changes\n // (user might have changed it directly by navigating to different /lang path without using LocaleDialog)\n navigate(`/${locale}`) // TODO navigate to same page in different locale\n }\n }\n\n return (\n \n
\n
\n

{props.title}

\n

{props.subtitle}

\n
\n
\n \n
\n
\n
{props.footer}
\n
\n
\n )\n}\n\nexport default LocaleDialog\n","// extracted by mini-css-extract-plugin\nexport var container = \"LocaleDialog-module--container--72f47\";\nexport var linkList = \"LocaleDialog-module--linkList--11d7d\";","import { graphql, useStaticQuery } from \"gatsby\"\nimport React from \"react\"\n// import WelcomeModal from \"../molecules/WelcomeModal\"\nimport LocaleDialog from \"../organisms/localeDialog/LocaleDialog\"\nimport DatoLinkList from \"./DatoLinkList\"\n\n// type DatoLocaleDialogProps = {}\n\nconst DatoLocaleDialog = (/*props: DatoLocaleDialogProps*/) => {\n // console.debug(\"Rendering DatoLocaleDialog\")\n // Older implementation used a fragment on DatoCmsWelcomePage for mostly the same data\n // There's no \"Welcome page\" anymore so content was migrated to new \"Location Dialog\" single instance model\n const contentData = useStaticQuery(graphql`\n query DatoLocationDialog {\n datoCmsLocationDialog(originalId: { eq: \"R0SeHzVzR82vwq4xMAGmuA\" }, locale: \"en\") {\n title\n subtitle\n footerLinks {\n key: originalId\n ...DatoLinkList\n }\n }\n }\n `)\n if (!contentData.datoCmsLocationDialog) {\n return null\n }\n\n const { title, subtitle, footerLinks } = contentData.datoCmsLocationDialog\n\n return (\n {\n if (!linkList) {\n return null\n }\n const { key, ...linkListProps } = linkList\n return \n })}\n />\n )\n}\n\nexport default DatoLocaleDialog\n","import React, { createContext, useContext, useState } from \"react\"\nimport DatoLocaleDialog from \"../components/dato/DatoLocaleDialog\"\n\nconst LocaleDialogContext = createContext([false, () => undefined])\n\ntype LocaleDialogProviderProps = {\n value: boolean\n children: React.ReactNode\n}\n\ntype LocaleDialogContextValue = readonly [\n isLocaleDialogOpen: boolean,\n setLocaleDialogOpen: React.Dispatch>\n]\n\n/**\n * Get the language/area modal state (open or closed) and a function to change that\n */\nexport function useLocaleDialog(): LocaleDialogContextValue {\n const context = useContext(LocaleDialogContext)\n\n if (!context) {\n throw new Error(\"useLocaleDialog() must be used within a LocaleDialogContext\")\n }\n return context\n}\n\n/**\n * Renders location and language dialog/modal (opened or closed depending on props) to DOM\n * and sets and initializes a state dispatch function.\n * Intented to be a wrapper for whole pages (see `gatsby-ssr.tsx`).\n *\n * Both open/close state and the function to switch the state are made available by `useLocaleDialog()´ hook.\n */\nexport const LocaleDialogContextProvider = (props: LocaleDialogProviderProps) => {\n // console.debug(\"Rendering LocaleDialogContextProvider\", props)\n\n const [isOpen, setIsOpen] = useState(props.value)\n\n return (\n \n {props.children}\n \n \n )\n}\n","import React, { useContext } from \"react\"\nimport type { DatoLocale } from \"../types\"\n//import { useTranslation } from \"react-i18next\"\n\n/**\n * gatsby-node'sta gatsby-template'lle annettu data.\n * Käytettävissä usePageContext() hookin avulla.\n */\nexport type IPageContext = {\n /** Current DatoCms locale */\n locale: DatoLocale\n /** Current PIM product language */\n localePim: string\n /** Dato fallback locales */\n fallbackLocales: string[]\n\n /** Current route / article / articleCategory id on some pages */\n originalId?: string\n\n // ProductPage specifics\n sku?: string\n landing_pages_product_family?: string\n landing_pages_sku?: string\n\n // Product category page\n pimCode?: string\n}\n\nexport const PageContext = React.createContext({\n locale: \"en\",\n localePim: \"en-US\",\n fallbackLocales: [],\n})\n\ntype PageContextProviderProps = {\n value: IPageContext\n children: React.ReactNode\n}\n\nexport const PageContextProvider = (props: PageContextProviderProps) => {\n // console.debug(\"PageContentProvider init\", props)\n const { value, children } = props\n\n return {children}\n}\n\nexport default PageContextProvider\n\n/**\n * Returns the locale the page was build with.\n */\nexport function usePageLocale() {\n const context = useContext(PageContext)\n\n return context.locale\n}\n","import React, { createContext, useCallback, useContext, useEffect, useReducer } from \"react\"\nimport { DatoLocale, LocaleArea, isLocaleArea } from \"../types\"\nimport { getHttpArea } from \"../utils\"\n\n/**\n * Name of the object stored in Locale Storage.\n *\n * NOTE! If using Cookiebot or similar: value needs to be categorized as \"Necessary\" \"HTML cookie\" or similar.\n */\nconst STORAGE_KEY = \"user-preferences\"\nconst DEFAUlT_AREA: LocaleArea = \"global\"\n\ntype UserPreferences = {\n /**\n * Users preferred location or `null` if user has not explicitly selected one.\n */\n localeArea: LocaleArea | null\n /**\n * Users preferred language or `null` if user has not explicitly selected one.\n * IMPORTANT! Notice that actual language of requested page is:\n * 1. Different concept and\n * 2. Should take and takes precedence almost always (TODO spec details)\n */\n language: DatoLocale | null\n /**\n * TODO Language detected from Browser.\n * This could be used as third level locale preference (page > user > browser > geo)\n */\n browserLanguage?: string\n initialized?: boolean\n}\n\nconst initialState: UserPreferences = {\n localeArea: null,\n language: null,\n initialized: false,\n}\n\n/**\n * Context for User preferences, settings user has explicitly set themself\n */\nconst UserContext = createContext(initialState)\n\nconst UserDispatchContext = createContext>(() => null)\n\nexport function useUserPreferences() {\n return useContext(UserContext)\n // const context = useContext(UserContext)\n // if (context.initialized === false) {\n // throw new Error(\"useUserPreferences() must be used within a UserContext\")\n // }\n // return context\n}\n\nexport function useUserPreferencesDispatch() {\n const context = useContext(UserDispatchContext)\n if (context === null) {\n throw new Error(\"useUserPreferencesDispatch() must be used within a UserDispatchContext\")\n }\n return context\n}\n\nexport const UserContextProvider = (props: { children: React.ReactNode }) => {\n const [state, dispatch] = useReducer(userReducer, initialState)\n\n const needInit = !state.initialized\n\n // make a callback so that we can avoid `dispatch`, `getUserFromStorage`, `getHttpArea()` etc as useEffect dependencies\n const init = useCallback(() => {\n if (!needInit) {\n // User state is already set, no need to initialize it\n return\n }\n // console.debug(\"Getting userPreferences from localStorage\")\n const userPrefs = getUserFromStorage() || initialState\n // `userPrefs` is something new from Locale Storage or undefined\n if (!isLocaleArea(userPrefs.localeArea)) {\n const area = getHttpArea()\n if (area) {\n userPrefs.localeArea = area\n }\n }\n\n // NOTE this passes also language from Local Storage. The actual page language might not be same as \"user preference\" language (by design)\n dispatch({ type: \"INITIALIZE\", userPreferences: userPrefs })\n return\n }, [needInit])\n\n // Initialize from Local Storage and browser when Provider is mounted\n useEffect(() => {\n init()\n }, [init])\n\n // Syncronize chages to Local Storage on every state change\n useEffect(() => {\n if (!state) {\n // Don't save. TODO if we ever have a user mechanism to clear preferences, handle it here\n return\n }\n saveUserPreferencesToStorage(state)\n }, [state])\n\n return (\n \n {props.children}\n \n )\n}\n\n/** helpers */\n/**\n *\n * @returns new state read from Locale Storage or reference to `initialState`\n */\nfunction getUserFromStorage(): UserPreferences | undefined {\n const val = localStorage.getItem(STORAGE_KEY)\n return val ? JSON.parse(val) : undefined\n}\nfunction saveUserPreferencesToStorage(prefs: UserPreferences) {\n const { localeArea, language } = prefs\n // save only user selectable values, don't store `initialized` etc \"internal\" properties\n localStorage.setItem(STORAGE_KEY, JSON.stringify({ localeArea, language }))\n}\n/**\n * Compares two User Preferences and return true if they are the same from users POW.\n * @param a\n * @param b\n * @returns\n */\n// function compareStates(a: UserPreferences, b: UserPreferences): boolean {\n// return a.language === b.language && a.localeArea === b.localeArea\n// }\n\n/** reducer */\ntype UserPrefAction =\n | {\n type: \"INITIALIZE\"\n userPreferences: UserPreferences\n }\n | {\n type: \"SET_AREA\"\n localeArea: LocaleArea\n }\n | {\n type: \"SET_DEFAULT_AREA\"\n }\n | {\n type: \"SET_LANGUAGE\"\n datoLanguage: DatoLocale\n }\n | {\n type: \"SET\"\n userPreferences: Omit\n }\n | {\n type: \"RESET\"\n }\n\nfunction userReducer(state: UserPreferences, action: UserPrefAction) {\n switch (action.type) {\n case \"INITIALIZE\": {\n // console.debug(\"Initializing user preferences with\", action.userPreferences)\n return {\n ...state,\n ...action.userPreferences,\n initialized: true,\n }\n }\n case \"SET_AREA\": {\n return {\n ...state,\n localeArea: action.localeArea,\n }\n }\n case \"SET_DEFAULT_AREA\": {\n return {\n ...state,\n localeArea: DEFAUlT_AREA,\n initialized: true,\n }\n }\n case \"SET_LANGUAGE\": {\n return {\n ...state,\n language: action.datoLanguage,\n }\n }\n case \"SET\": {\n // console.debug(\"Setting user preferences to\", action.userPreferences)\n return {\n ...action.userPreferences,\n initialized: state ? state.initialized : initialState.initialized,\n }\n }\n case \"RESET\": {\n return { ...state, ...initialState }\n }\n default:\n throw new Error()\n }\n}\n","import { graphql, useStaticQuery } from \"gatsby\"\nimport React from \"react\"\nimport { IPageContext, PageContext } from \"../context/PageContext\"\n\nlet _store: Record | null = null\n\ntype RoutePathMapData = {\n allSitePage: {\n nodes: Array<{\n path: string\n pageContext: IPageContext\n }>\n }\n}\n\n/**\n * Palauttaa Dato CMS routeId:tä vastaavan, routesta tehdyn sivun URL polun\n */\nconst useArticlePath = () => {\n const { locale: contextLocale } = React.useContext(PageContext)\n\n const data = useStaticQuery(\n graphql`\n query DatoCmsArticlePathMap {\n allSitePage(\n filter: {\n componentChunkName: { eq: \"component---gatsby-theme-harvia-src-gatsby-templates-dato-article-tsx\" }\n }\n ) {\n nodes {\n path\n pageContext\n }\n }\n }\n `\n )\n\n // console.debug(\"useArticlePath()\", data)\n\n if (_store === null) {\n const pathMap: Record = Object.create(null)\n data.allSitePage.nodes.forEach(n => {\n pathMap[`${n.pageContext.originalId}-${n.pageContext.locale}`] = n.path\n })\n _store = pathMap\n }\n\n function getArticlePath(originalId?: string | null, locale?: string): string | undefined {\n const toLocale = locale || contextLocale\n // console.debug(\n // `getArticlePath() originalId: \"${originalId}\", locale: \"${toLocale}\". In store? ${\n // _store && `${originalId}-${toLocale}` in _store\n // }`,\n // _store\n // )\n return _store ? _store[`${originalId}-${toLocale}`] : undefined\n }\n\n return getArticlePath\n}\n\nexport default useArticlePath\n","import { graphql, useStaticQuery } from \"gatsby\"\nimport { useContext } from \"react\"\nimport { IPageContext, PageContext } from \"../context/PageContext\"\n\ntype Store = { [skuLocale: string]: string }\n\nlet _store: Store | null = null\n\ntype RoutePathMapData = {\n allSitePage: {\n nodes: Array<{\n path: string\n pageContext?: IPageContext\n }>\n }\n}\n\n/**\n * Palauttaa Dato CMS routeId:tä vastaavan, routesta tehdyn sivun URL polun\n */\nconst useProductPath = () => {\n const { locale: contextLocale } = useContext(PageContext)\n //const getRoutePath = useRoutePath()\n //const basePath = getRoutePath(useWebsite()?.productRootRoute?.originalId)\n\n const data = useStaticQuery(\n graphql`\n query DatoCmsProductPathMap {\n allSitePage(\n filter: { componentChunkName: { eq: \"component---gatsby-theme-harvia-src-gatsby-templates-pim-product-tsx\" } }\n ) {\n nodes {\n path\n pageContext\n }\n }\n }\n `\n )\n // console.debug(\"useProductPath()\", data)\n\n if (!data) {\n return () => \"\"\n }\n\n if (_store === null) {\n const pathMap: Store = Object.create(null)\n data.allSitePage.nodes.forEach(n => {\n const context = n.pageContext\n if (context?.sku) {\n pathMap[`${context.sku}--${context.locale}`] = n.path\n }\n })\n _store = pathMap\n }\n\n function getProductPath(sku?: string | null, locale?: string): string {\n if (!sku) {\n return \"\"\n }\n const toLocale = locale || contextLocale\n const productPath = _store ? _store[`${sku}--${toLocale}`] : \"\"\n //const url = productPath || (basePath ? `${basePath}?id=${sku}` : \"\") // ohjataan väliaikaiseen online tuotesivuun\n return productPath // || \"\"\n }\n\n return getProductPath\n}\n\nexport default useProductPath\n","import { graphql, useStaticQuery } from \"gatsby\"\nimport { useContext } from \"react\"\nimport { IPageContext, PageContext } from \"../context/PageContext\"\n\nlet _store: Record | null = null\n\ntype RoutePathMapData = {\n allSitePage: {\n nodes: {\n path: string\n pageContext: IPageContext\n }[]\n }\n}\n\n/**\n * Palauttaa Dato CMS routeId:tä vastaavan, routesta tehdyn sivun URL polun\n */\nconst useRoutePath = () => {\n const { locale: contextLocale } = useContext(PageContext)\n\n const data = useStaticQuery(\n graphql`\n query DatoCmsRoutePathMap {\n allSitePage(\n filter: { componentChunkName: { eq: \"component---gatsby-theme-harvia-src-gatsby-templates-dato-route-tsx\" } }\n ) {\n nodes {\n path\n pageContext\n }\n }\n }\n `\n )\n\n if (!data) {\n return () => undefined\n }\n\n // console.debug(\"useRoutePath()\", data)\n\n if (_store === null) {\n // generate a map of \"route Id + locale\" as key to \"URL path\" as value for fast lookup\n const pathMap: Record = Object.create(null)\n data.allSitePage.nodes.forEach(node => {\n const context = node.pageContext\n if (context.originalId) {\n const key = `${context.originalId}-${context.locale}`\n pathMap[key] = node.path\n }\n })\n _store = pathMap\n }\n\n //console.debug(\"useRoutePath()\", data, _store)\n //console.debug(\"useRoutePath(), found\", _store[routeId + toLocale])\n\n function getRoutePath(routeId?: string | null, locale?: string): string | undefined {\n // use `contextLocale` as fallback for `locale` and combine it with `routeId` to generate a key\n const key = `${routeId}-${locale || contextLocale}`\n return _store ? _store[key] : undefined\n }\n\n return getRoutePath\n}\n\nexport default useRoutePath\n","import { graphql, useStaticQuery } from \"gatsby\"\nimport type { DatoLocale } from \"../types\"\n\nexport type Website = {\n title: string\n locale: DatoLocale\n originalId: string\n footer: {\n originalId: string\n }\n mainMenu: {\n originalId: string\n }\n productRootRoute: {\n originalId: string\n }\n rootRoute: {\n originalId: string\n }\n articleRootRoute: {\n originalId: string\n }\n findDealerRoute: {\n originalId: string\n }\n saunaCalculatorRoute: {\n originalId: string\n }\n saunaPlannerRoute: {\n originalId: string\n }\n}\n\n/**\n * @deprecated\n */\nconst useWebsite = () => {\n const data = useStaticQuery(graphql`\n query UseWebsite {\n datoCmsWebsite {\n title\n #locale\n originalId\n footer {\n originalId\n }\n mainMenu {\n originalId\n }\n productRootRoute {\n originalId\n }\n rootRoute {\n originalId\n }\n articleRootRoute {\n originalId\n }\n findDealerRoute {\n originalId\n }\n saunaCalculatorRoute {\n originalId\n }\n saunaPlannerRoute {\n originalId\n }\n }\n }\n `)\n\n return data?.datoCmsWebsite\n}\n\nexport default useWebsite\n","import { isString } from \"./utils\"\n\n/**\n * All possible \"locale\" values defined in Dato as Supported languages.\n * https://harvia.admin.datocms.com/admin/environment\n */\nconst datoLocales = [\"en\", \"fi\", \"sv\", \"de\", \"fr\", \"es\", \"ru\", \"it\", \"et\", \"pl\", \"en-US\"] as const\n\n/**\n * Supported locale in Dato.\n */\nexport type DatoLocale = (typeof datoLocales)[number]\n\nexport const pimUnitSystems = [\"metric\", \"imperial\"] as const\nexport type PimUnitSystem = (typeof pimUnitSystems)[number]\n\nexport type Nullable = { [K in keyof T]: T[K] | null }\n\nconst area = [\n \"north-europe\",\n \"europe\",\n \"africa\",\n \"north-america\",\n \"south-america\",\n \"asia\",\n \"middle-east\",\n \"oceania\",\n \"global\",\n] as const\n\nexport type LocaleArea = (typeof area)[number]\n\nexport function isLocaleArea(val: unknown): val is LocaleArea {\n return isString(val) && area.includes(val as LocaleArea)\n}\n","// import timeZoneCityToCountry from \"../data/timezone-cities-to-countries.json\"\nimport { LocaleArea, PimUnitSystem, pimUnitSystems } from \"./types\"\n\n/**\n * Find element from node with tree-like sub nodes\n */\n\nexport const findRecursive = >(\n node: T | T[],\n compareFn: (arg: T) => boolean,\n subArrayKey?: string // keyof T\n) => {\n if (!node) return\n\n if (Array.isArray(node)) {\n for (const element of node) {\n const v = findRecursive(element, compareFn, subArrayKey)\n if (v) return v\n }\n\n return\n }\n\n const val = compareFn(node)\n if (val) {\n return node\n }\n\n const subProp = subArrayKey ? node[subArrayKey] : undefined\n if (!subProp) return\n\n return findRecursive(subProp as T, compareFn, subArrayKey)\n}\n/**\n * Vertaa kahta arrayta, ja palauttaa ensimmäisen elementin fromArraystä joka löytyy myös findArraystä tai undefined\n * @param fromArray\n * @param findArray\n * @returns\n */\nexport function findAny(fromArray: any[], findArray: any[]): any {\n return fromArray.find(itm => findArray.includes(itm))\n}\n/**\n * Make valid slug from any string\n * @param title Text\n * @param id Unique identifier, e.g. originalId to stringify and append to end of slug\n * @returns\n */\nexport const slugify = (title?: string | null, id?: string | number | null) => {\n const separator = \"-\"\n const title_str = title\n ?.toString()\n .normalize(\"NFD\") // split an accented letter in the base letter and the acent\n .replace(/[\\u0300-\\u036f]/g, \"\") // remove all previously split accents\n .toLowerCase()\n .trim()\n .replace(/[^a-z0-9 ]/g, \"\") // remove all chars not letters, numbers and spaces (to be replaced)\n .replace(/\\s+/g, separator)\n\n const id_str = id && parseInt(id.toString())?.toString(32)\n\n const slug = [title_str, id_str].filter(itm => itm).join(separator)\n\n return slug || undefined\n}\n/**\n * CamelCase, mutta isolla alkukirjaimella.\n * @param text\n * @returns\n */\nexport const camelCase = (text?: string) =>\n text\n ?.split(/\\s|-/)\n .map((word: string) => word.charAt(0).toUpperCase() + word.substr(1))\n .join(\"\")\n\n/**\n * Send Google gtag or ga event & push event to dataLayer\n * @param {*} category string - required - The object that was interacted with (e.g.video)\n * @param {*} action string - required - Type of interaction (e.g. 'play')\n * @param {*} label string - optional - Useful for categorizing events (e.g. 'Spring Campaign')\n * @param {*} value number - optional - Numeric value associated with the event. (e.g. A product ID)\n */\nexport const trackEvent = (category: string, action: string, label?: string, value?: number) => {\n if (isBrowser && category && action) {\n //console.log(\"ga\", category, action, label, value)\n\n const ga = window[\"ga\"]\n const gtag = window[\"gtag\"]\n const dataLayer = window[\"dataLayer\"]\n\n // Google analytics events\n\n if (typeof gtag === \"function\") {\n gtag(\"event\", action, {\n event_category: category,\n event_label: label,\n value: value,\n })\n }\n if (typeof ga === \"function\") {\n ga(\"send\", {\n hitType: \"event\",\n eventCategory: category,\n eventAction: action,\n eventLabel: label,\n value: value,\n })\n }\n\n // GTM DataLayer event\n\n if (Array.isArray(dataLayer)) {\n dataLayer.push({\n event: category + \".\" + action,\n action,\n category,\n label,\n value,\n })\n }\n }\n}\n\n/** Detect ssr mode */\nexport const isBrowser = typeof window !== \"undefined\"\n\n/**\n * Find value for given locale from `_all*Locales` query result.\n *\n * @param locale Locale whose value to find\n * @param locales All locale/value pairs\n * @returns Value matching given locale or undefined\n */\nexport const localeValue = (\n locale: string | null,\n locales?: readonly ({ readonly locale: string | null; value: T } | null)[] | null\n) => {\n const res = locales?.find(loc => loc?.locale === locale)?.value\n return res !== null ? res : undefined\n}\n\n/**\n * Sort value for given locale from `_all*Locales` query result.\n *\n * @param locales All locale/value pairs\n * @returns Value matching given locale or undefined\n */\nexport const localeSort = (\n locales?: readonly ({ readonly locale: string | null; readonly value: T } | null)[] | null\n) => {\n if (!locales) return []\n return [...locales]?.sort((a, b) => {\n if (!a?.locale || !b?.locale) return 0\n return a.locale?.localeCompare(b.locale)\n })\n}\n\n/**\n * Find if given locale exists in `_all*Locales` query result.\n *\n * @param locale Locale whose value to find, the needle\n * @param locales Locales from _all*Locales query, the haystack\n * @returns\n */\nexport const localeExists = (\n locale: string | null,\n locales?: readonly ({ readonly locale: string | null } | null)[] | null\n) => {\n return locales?.find(loc => loc?.locale === locale) !== undefined\n}\n\n/**\n * Type guard for string value\n */\nexport function isString(val: unknown): val is string {\n return typeof val === \"string\"\n}\nexport function isObject(val: unknown): val is object {\n return val !== null && typeof val === \"object\"\n}\nexport function isPimUnitSystem(val: unknown): val is PimUnitSystem {\n return isString(val) && pimUnitSystems.includes(val as PimUnitSystem)\n}\n\n// export function getUserLocationIntl() {\n// let region: string | undefined\n// let city: string | undefined\n// let country: string | undefined\n// let timeZone: string | undefined\n\n// if (Intl) {\n// timeZone = Intl.DateTimeFormat().resolvedOptions().timeZone\n// const tzArr = timeZone.split(\"/\")\n// region = tzArr[0]\n// city = tzArr[tzArr.length - 1]\n// country = timeZoneCityToCountry[city]\n// }\n\n// return { timeZone, region, city, country }\n// }\n\nconst northEuropeCities = [\"Helsinki\", \"Stockholm\", \"Tallinn\"]\n\n/**\n * Get browsers timezone and locale based guesses to approximate or guess location from.\n * @deprecated or TODO\n *\n * @example getTimeZoneLocation(Intl.DateTimeFormat().resolvedOptions())\n *\n * @param timeZone - timezone from `Intl.DateTimeFormat().resolvedOptions().timeZone`\n * @param locale - Locale from `Intl.DateTimeFormat().resolvedOptions().locale`\n * @returns\n */\nexport function getTimeZoneLocation(timeZone: string /*, locale?: string*/): LocaleArea | undefined {\n const [zone, city] = timeZone.split(\"/\")\n\n switch (zone) {\n case \"UTC\":\n return\n case \"Europe\":\n if (northEuropeCities.includes(city)) {\n return \"north-europe\"\n }\n return \"europe\"\n case \"America\":\n // TODO \"south-america\", \"usa\", \"canada\"\n return \"north-america\"\n case \"Africa\":\n return \"africa\"\n case \"Pacific\":\n case \"Asia\":\n return \"oceania\"\n default:\n return \"global\"\n }\n}\n\n/**\n * Read cookie value from browser.\n *\n * TODO port to {@link https://developer.mozilla.org/en-US/docs/Web/API/Cookie_Store_API | CookieStore API} when it's globally available/supported\n * @param name - Name of the cookie\n * @returns The cookie value as `string` or `undefined` if Cookies cannot be read or no cookie with given name exists.\n */\nfunction getCookie(name: string) {\n if (!document?.cookie) {\n return\n }\n const key = `${name}=`\n return decodeURIComponent(document.cookie)\n .split(\"; \")\n .find(row => row.startsWith(key))\n ?.split(\"=\")[1]\n}\n\n/**\n * Azure CDN provided information about requester's continent through its abbreviation.\n *\n * Valid values are:\n * - AF: Africa\n * - AS: Asia\n * - EU: Europe\n * - NA: North America\n * - OC: Oceania\n * - SA: South America\n */\ntype AzureGeoContinent =\n | \"AF\" // Africa\n | \"AS\" // Asia\n | \"EU\" // Europe\n | \"NA\" // North America\n | \"OC\" // Oceania\n | \"SA\" // South America\n\n/**\n * Azure CDN provided information about requester's geo location.\n */\nexport type AzureGeoCookieVal = {\n /**\n * Continent the HTTP request comes from\n */\n continent: AzureGeoContinent\n /**\n * Country the HTTP request comes from\n */\n country: string\n}\n\n/**\n * Try to get users geo location (continent and country) from a Cookie set by Azure CDN.\n *\n * Expects a cookie named \"HArviaHttpGeo\" with a JSON string value.\n */\nexport function getHttpArea(): LocaleArea | undefined {\n const cookieVal = getCookie(\"HarviaHttpGeo\")\n\n let httpGeo: AzureGeoCookieVal | undefined = undefined\n\n try {\n httpGeo = cookieVal ? JSON.parse(cookieVal) : undefined\n } catch {\n console.warn(\"Couldn't parse Azure GEO cookie\")\n }\n\n if (!httpGeo) {\n return\n }\n return azureHttpGeoToArea(httpGeo)\n}\n\n/**\n * Country codes considered to be in \"north-europe\".\n * These are probably ISO 3166-1 alpha-2 country codes (uppercase).\n * Azure {@link https://learn.microsoft.com/en-us/azure/cdn/cdn-http-variables?toc=%2Fazure%2Ffrontdoor%2FTOC.json#definitions | documents}\n * them as \"requester's country/region of origin through its country/region code.\"\n *\n */\nconst northEuropeCounries = [\"FI\", \"SE\", \"EE\", \"DK\", \"NO\"]\n\n/**\n * Convert continent and country information to a {@link LocaleArea}\n * @param httpGeo - Azure CDN provided request geo information\n * @returns Harvia marketing area corresponding to given continent and country\n */\nexport function azureHttpGeoToArea(httpGeo?: AzureGeoCookieVal): LocaleArea | undefined {\n if (!httpGeo) {\n return\n }\n const { continent, country } = httpGeo\n\n switch (continent) {\n case \"EU\":\n if (northEuropeCounries.includes(country)) {\n return \"north-europe\"\n }\n return \"europe\"\n case \"NA\":\n // if (country === \"US\") {\n // return \"usa\"\n // } else if (country === \"CA\") {\n // return \"canada\"\n // }\n return \"north-america\"\n case \"AF\":\n return \"africa\"\n case \"AS\":\n return \"asia\"\n case \"OC\":\n return \"oceania\"\n case \"SA\":\n return \"south-america\"\n default:\n return undefined\n }\n}\n","import invariant from \"invariant\";\n\n////////////////////////////////////////////////////////////////////////////////\n// startsWith(string, search) - Check if `string` starts with `search`\nvar startsWith = function startsWith(string, search) {\n return string.substr(0, search.length) === search;\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// pick(routes, uri)\n//\n// Ranks and picks the best route to match. Each segment gets the highest\n// amount of points, then the type of segment gets an additional amount of\n// points where\n//\n// static > dynamic > splat > root\n//\n// This way we don't have to worry about the order of our routes, let the\n// computers do it.\n//\n// A route looks like this\n//\n// { path, default, value }\n//\n// And a returned match looks like:\n//\n// { route, params, uri }\n//\n// I know, I should use TypeScript not comments for these types.\nvar pick = function pick(routes, uri) {\n var match = void 0;\n var default_ = void 0;\n var _uri$split = uri.split(\"?\"),\n uriPathname = _uri$split[0];\n var uriSegments = segmentize(uriPathname);\n var isRootUri = uriSegments[0] === \"\";\n var ranked = rankRoutes(routes);\n for (var i = 0, l = ranked.length; i < l; i++) {\n var missed = false;\n var route = ranked[i].route;\n if (route.default) {\n default_ = {\n route: route,\n params: {},\n uri: uri\n };\n continue;\n }\n var routeSegments = segmentize(route.path);\n var params = {};\n var max = Math.max(uriSegments.length, routeSegments.length);\n var index = 0;\n for (; index < max; index++) {\n var routeSegment = routeSegments[index];\n var uriSegment = uriSegments[index];\n if (isSplat(routeSegment)) {\n // Hit a splat, just grab the rest, and return a match\n // uri: /files/documents/work\n // route: /files/*\n var param = routeSegment.slice(1) || \"*\";\n params[param] = uriSegments.slice(index).map(decodeURIComponent).join(\"/\");\n break;\n }\n if (uriSegment === undefined) {\n // URI is shorter than the route, no match\n // uri: /users\n // route: /users/:userId\n missed = true;\n break;\n }\n var dynamicMatch = paramRe.exec(routeSegment);\n if (dynamicMatch && !isRootUri) {\n var matchIsNotReserved = reservedNames.indexOf(dynamicMatch[1]) === -1;\n !matchIsNotReserved ? process.env.NODE_ENV !== \"production\" ? invariant(false, \" dynamic segment \\\"\" + dynamicMatch[1] + \"\\\" is a reserved name. Please use a different name in path \\\"\" + route.path + \"\\\".\") : invariant(false) : void 0;\n var value = decodeURIComponent(uriSegment);\n params[dynamicMatch[1]] = value;\n } else if (routeSegment !== uriSegment) {\n // Current segments don't match, not dynamic, not splat, so no match\n // uri: /users/123/settings\n // route: /users/:id/profile\n missed = true;\n break;\n }\n }\n if (!missed) {\n match = {\n route: route,\n params: params,\n uri: \"/\" + uriSegments.slice(0, index).join(\"/\")\n };\n break;\n }\n }\n return match || default_ || null;\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// match(path, uri) - Matches just one path to a uri, also lol\nvar match = function match(path, uri) {\n return pick([{\n path: path\n }], uri);\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// resolve(to, basepath)\n//\n// Resolves URIs as though every path is a directory, no files. Relative URIs\n// in the browser can feel awkward because not only can you be \"in a directory\"\n// you can be \"at a file\", too. For example\n//\n// browserSpecResolve('foo', '/bar/') => /bar/foo\n// browserSpecResolve('foo', '/bar') => /foo\n//\n// But on the command line of a file system, it's not as complicated, you can't\n// `cd` from a file, only directories. This way, links have to know less about\n// their current path. To go deeper you can do this:\n//\n// \n// // instead of\n// \n//\n// Just like `cd`, if you want to go deeper from the command line, you do this:\n//\n// cd deeper\n// # not\n// cd $(pwd)/deeper\n//\n// By treating every path as a directory, linking to relative paths should\n// require less contextual information and (fingers crossed) be more intuitive.\nvar resolve = function resolve(to, base) {\n // /foo/bar, /baz/qux => /foo/bar\n if (startsWith(to, \"/\")) {\n return to;\n }\n var _to$split = to.split(\"?\"),\n toPathname = _to$split[0],\n toQuery = _to$split[1];\n var _base$split = base.split(\"?\"),\n basePathname = _base$split[0];\n var toSegments = segmentize(toPathname);\n var baseSegments = segmentize(basePathname);\n\n // ?a=b, /users?b=c => /users?a=b\n if (toSegments[0] === \"\") {\n return addQuery(basePathname, toQuery);\n }\n\n // profile, /users/789 => /users/789/profile\n if (!startsWith(toSegments[0], \".\")) {\n var pathname = baseSegments.concat(toSegments).join(\"/\");\n return addQuery((basePathname === \"/\" ? \"\" : \"/\") + pathname, toQuery);\n }\n\n // ./ /users/123 => /users/123\n // ../ /users/123 => /users\n // ../.. /users/123 => /\n // ../../one /a/b/c/d => /a/b/one\n // .././one /a/b/c/d => /a/b/c/one\n var allSegments = baseSegments.concat(toSegments);\n var segments = [];\n for (var i = 0, l = allSegments.length; i < l; i++) {\n var segment = allSegments[i];\n if (segment === \"..\") segments.pop();else if (segment !== \".\") segments.push(segment);\n }\n return addQuery(\"/\" + segments.join(\"/\"), toQuery);\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// insertParams(path, params)\n\nvar insertParams = function insertParams(path, params) {\n var _path$split = path.split(\"?\"),\n pathBase = _path$split[0],\n _path$split$ = _path$split[1],\n query = _path$split$ === undefined ? \"\" : _path$split$;\n var segments = segmentize(pathBase);\n var constructedPath = \"/\" + segments.map(function (segment) {\n var match = paramRe.exec(segment);\n return match ? params[match[1]] : segment;\n }).join(\"/\");\n var _params$location = params.location;\n _params$location = _params$location === undefined ? {} : _params$location;\n var _params$location$sear = _params$location.search,\n search = _params$location$sear === undefined ? \"\" : _params$location$sear;\n var searchSplit = search.split(\"?\")[1] || \"\";\n constructedPath = addQuery(constructedPath, query, searchSplit);\n return constructedPath;\n};\nvar validateRedirect = function validateRedirect(from, to) {\n var filter = function filter(segment) {\n return isDynamic(segment);\n };\n var fromString = segmentize(from).filter(filter).sort().join(\"/\");\n var toString = segmentize(to).filter(filter).sort().join(\"/\");\n return fromString === toString;\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// Junk\nvar paramRe = /^:(.+)/;\nvar SEGMENT_POINTS = 4;\nvar STATIC_POINTS = 3;\nvar DYNAMIC_POINTS = 2;\nvar SPLAT_PENALTY = 1;\nvar ROOT_POINTS = 1;\nvar isRootSegment = function isRootSegment(segment) {\n return segment === \"\";\n};\nvar isDynamic = function isDynamic(segment) {\n return paramRe.test(segment);\n};\nvar isSplat = function isSplat(segment) {\n return segment && segment[0] === \"*\";\n};\nvar rankRoute = function rankRoute(route, index) {\n var score = route.default ? 0 : segmentize(route.path).reduce(function (score, segment) {\n score += SEGMENT_POINTS;\n if (isRootSegment(segment)) score += ROOT_POINTS;else if (isDynamic(segment)) score += DYNAMIC_POINTS;else if (isSplat(segment)) score -= SEGMENT_POINTS + SPLAT_PENALTY;else score += STATIC_POINTS;\n return score;\n }, 0);\n return {\n route: route,\n score: score,\n index: index\n };\n};\nvar rankRoutes = function rankRoutes(routes) {\n return routes.map(rankRoute).sort(function (a, b) {\n return a.score < b.score ? 1 : a.score > b.score ? -1 : a.index - b.index;\n });\n};\nvar segmentize = function segmentize(uri) {\n return uri\n // strip starting/ending slashes\n .replace(/(^\\/+|\\/+$)/g, \"\").split(\"/\");\n};\nvar addQuery = function addQuery(pathname) {\n for (var _len = arguments.length, query = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n query[_key - 1] = arguments[_key];\n }\n query = query.filter(function (q) {\n return q && q.length > 0;\n });\n return pathname + (query && query.length > 0 ? \"?\" + query.join(\"&\") : \"\");\n};\nvar reservedNames = [\"uri\", \"path\"];\n\n/**\n * Shallow compares two objects.\n * @param {Object} obj1 The first object to compare.\n * @param {Object} obj2 The second object to compare.\n */\nvar shallowCompare = function shallowCompare(obj1, obj2) {\n var obj1Keys = Object.keys(obj1);\n return obj1Keys.length === Object.keys(obj2).length && obj1Keys.every(function (key) {\n return obj2.hasOwnProperty(key) && obj1[key] === obj2[key];\n });\n};\n\n////////////////////////////////////////////////////////////////////////////////\nexport { startsWith, pick, match, resolve, insertParams, validateRedirect, shallowCompare };","var _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n};\nvar getLocation = function getLocation(source) {\n var _source$location = source.location,\n search = _source$location.search,\n hash = _source$location.hash,\n href = _source$location.href,\n origin = _source$location.origin,\n protocol = _source$location.protocol,\n host = _source$location.host,\n hostname = _source$location.hostname,\n port = _source$location.port;\n var pathname = source.location.pathname;\n if (!pathname && href && canUseDOM) {\n var url = new URL(href);\n pathname = url.pathname;\n }\n return {\n pathname: encodeURI(decodeURI(pathname)),\n search: search,\n hash: hash,\n href: href,\n origin: origin,\n protocol: protocol,\n host: host,\n hostname: hostname,\n port: port,\n state: source.history.state,\n key: source.history.state && source.history.state.key || \"initial\"\n };\n};\nvar createHistory = function createHistory(source, options) {\n var listeners = [];\n var location = getLocation(source);\n var transitioning = false;\n var resolveTransition = function resolveTransition() {};\n return {\n get location() {\n return location;\n },\n get transitioning() {\n return transitioning;\n },\n _onTransitionComplete: function _onTransitionComplete() {\n transitioning = false;\n resolveTransition();\n },\n listen: function listen(listener) {\n listeners.push(listener);\n var popstateListener = function popstateListener() {\n location = getLocation(source);\n listener({\n location: location,\n action: \"POP\"\n });\n };\n source.addEventListener(\"popstate\", popstateListener);\n return function () {\n source.removeEventListener(\"popstate\", popstateListener);\n listeners = listeners.filter(function (fn) {\n return fn !== listener;\n });\n };\n },\n navigate: function navigate(to) {\n var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n state = _ref.state,\n _ref$replace = _ref.replace,\n replace = _ref$replace === undefined ? false : _ref$replace;\n if (typeof to === \"number\") {\n source.history.go(to);\n } else {\n state = _extends({}, state, {\n key: Date.now() + \"\"\n });\n // try...catch iOS Safari limits to 100 pushState calls\n try {\n if (transitioning || replace) {\n source.history.replaceState(state, null, to);\n } else {\n source.history.pushState(state, null, to);\n }\n } catch (e) {\n source.location[replace ? \"replace\" : \"assign\"](to);\n }\n }\n location = getLocation(source);\n transitioning = true;\n var transition = new Promise(function (res) {\n return resolveTransition = res;\n });\n listeners.forEach(function (listener) {\n return listener({\n location: location,\n action: \"PUSH\"\n });\n });\n return transition;\n }\n };\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// Stores history entries in memory for testing or other platforms like Native\nvar createMemorySource = function createMemorySource() {\n var initialPath = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : \"/\";\n var searchIndex = initialPath.indexOf(\"?\");\n var initialLocation = {\n pathname: searchIndex > -1 ? initialPath.substr(0, searchIndex) : initialPath,\n search: searchIndex > -1 ? initialPath.substr(searchIndex) : \"\"\n };\n var index = 0;\n var stack = [initialLocation];\n var states = [null];\n return {\n get location() {\n return stack[index];\n },\n addEventListener: function addEventListener(name, fn) {},\n removeEventListener: function removeEventListener(name, fn) {},\n history: {\n get entries() {\n return stack;\n },\n get index() {\n return index;\n },\n get state() {\n return states[index];\n },\n pushState: function pushState(state, _, uri) {\n var _uri$split = uri.split(\"?\"),\n pathname = _uri$split[0],\n _uri$split$ = _uri$split[1],\n search = _uri$split$ === undefined ? \"\" : _uri$split$;\n index++;\n stack.push({\n pathname: pathname,\n search: search.length ? \"?\" + search : search\n });\n states.push(state);\n },\n replaceState: function replaceState(state, _, uri) {\n var _uri$split2 = uri.split(\"?\"),\n pathname = _uri$split2[0],\n _uri$split2$ = _uri$split2[1],\n search = _uri$split2$ === undefined ? \"\" : _uri$split2$;\n stack[index] = {\n pathname: pathname,\n search: search\n };\n states[index] = state;\n },\n go: function go(to) {\n var newIndex = index + to;\n if (newIndex < 0 || newIndex > states.length - 1) {\n return;\n }\n index = newIndex;\n }\n }\n };\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// global history - uses window.history as the source if available, otherwise a\n// memory history\nvar canUseDOM = !!(typeof window !== \"undefined\" && window.document && window.document.createElement);\nvar getSource = function getSource() {\n return canUseDOM ? window : createMemorySource();\n};\nvar globalHistory = createHistory(getSource());\nvar navigate = globalHistory.navigate;\n\n////////////////////////////////////////////////////////////////////////////////\n\nexport { globalHistory, navigate, createHistory, createMemorySource };","var _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n};\nfunction _objectWithoutProperties(obj, keys) {\n var target = {};\n for (var i in obj) {\n if (keys.indexOf(i) >= 0) continue;\n if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;\n target[i] = obj[i];\n }\n return target;\n}\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\nfunction _possibleConstructorReturn(self, call) {\n if (!self) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\n}\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass);\n }\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n}\n\n/* eslint-disable jsx-a11y/anchor-has-content */\nimport React, { useContext, createContext } from \"react\";\nimport invariant from \"invariant\";\nimport { polyfill } from \"react-lifecycles-compat\";\nimport { startsWith, pick, resolve, match, insertParams, validateRedirect, shallowCompare } from \"./lib/utils\";\nimport { globalHistory, navigate, createHistory, createMemorySource } from \"./lib/history\";\n\n////////////////////////////////////////////////////////////////////////////////\n\nvar createNamedContext = function createNamedContext(name, defaultValue) {\n var Ctx = createContext(defaultValue);\n Ctx.displayName = name;\n return Ctx;\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// Location Context/Provider\nvar LocationContext = createNamedContext(\"Location\");\n\n// sets up a listener if there isn't one already so apps don't need to be\n// wrapped in some top level provider\nvar Location = function Location(_ref) {\n var children = _ref.children;\n return React.createElement(LocationContext.Consumer, null, function (context) {\n return context ? children(context) : React.createElement(LocationProvider, null, children);\n });\n};\nvar LocationProvider = function (_React$Component) {\n _inherits(LocationProvider, _React$Component);\n function LocationProvider() {\n var _temp, _this, _ret;\n _classCallCheck(this, LocationProvider);\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.state = {\n context: _this.getContext(),\n refs: {\n unlisten: null\n }\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n LocationProvider.prototype.getContext = function getContext() {\n var _props$history = this.props.history,\n navigate = _props$history.navigate,\n location = _props$history.location;\n return {\n navigate: navigate,\n location: location\n };\n };\n LocationProvider.prototype.componentDidCatch = function componentDidCatch(error, info) {\n if (isRedirect(error)) {\n var _navigate = this.props.history.navigate;\n _navigate(error.uri, {\n replace: true\n });\n } else {\n throw error;\n }\n };\n LocationProvider.prototype.componentDidUpdate = function componentDidUpdate(prevProps, prevState) {\n if (prevState.context.location !== this.state.context.location) {\n this.props.history._onTransitionComplete();\n }\n };\n LocationProvider.prototype.componentDidMount = function componentDidMount() {\n var _this2 = this;\n var refs = this.state.refs,\n history = this.props.history;\n history._onTransitionComplete();\n refs.unlisten = history.listen(function () {\n Promise.resolve().then(function () {\n // TODO: replace rAF with react deferred update API when it's ready https://github.com/facebook/react/issues/13306\n requestAnimationFrame(function () {\n if (!_this2.unmounted) {\n _this2.setState(function () {\n return {\n context: _this2.getContext()\n };\n });\n }\n });\n });\n });\n };\n LocationProvider.prototype.componentWillUnmount = function componentWillUnmount() {\n var refs = this.state.refs;\n this.unmounted = true;\n refs.unlisten();\n };\n LocationProvider.prototype.render = function render() {\n var context = this.state.context,\n children = this.props.children;\n return React.createElement(LocationContext.Provider, {\n value: context\n }, typeof children === \"function\" ? children(context) : children || null);\n };\n return LocationProvider;\n}(React.Component);\n\n////////////////////////////////////////////////////////////////////////////////\n\nLocationProvider.defaultProps = {\n history: globalHistory\n};\nprocess.env.NODE_ENV !== \"production\" ? void 0 : void 0;\nvar ServerLocation = function ServerLocation(_ref2) {\n var url = _ref2.url,\n children = _ref2.children;\n var searchIndex = url.indexOf(\"?\");\n var searchExists = searchIndex > -1;\n var pathname = void 0;\n var search = \"\";\n var hash = \"\";\n if (searchExists) {\n pathname = url.substring(0, searchIndex);\n search = url.substring(searchIndex);\n } else {\n pathname = url;\n }\n return React.createElement(LocationContext.Provider, {\n value: {\n location: {\n pathname: pathname,\n search: search,\n hash: hash\n },\n navigate: function navigate() {\n throw new Error(\"You can't call navigate on the server.\");\n }\n }\n }, children);\n};\n////////////////////////////////////////////////////////////////////////////////\n// Sets baseuri and basepath for nested routers and links\nvar BaseContext = createNamedContext(\"Base\", {\n baseuri: \"/\",\n basepath: \"/\",\n navigate: globalHistory.navigate\n});\n\n////////////////////////////////////////////////////////////////////////////////\n// The main event, welcome to the show everybody.\nvar Router = function Router(props) {\n return React.createElement(BaseContext.Consumer, null, function (baseContext) {\n return React.createElement(Location, null, function (locationContext) {\n return React.createElement(RouterImpl, _extends({}, baseContext, locationContext, props));\n });\n });\n};\nvar RouterImpl = function (_React$PureComponent) {\n _inherits(RouterImpl, _React$PureComponent);\n function RouterImpl() {\n _classCallCheck(this, RouterImpl);\n return _possibleConstructorReturn(this, _React$PureComponent.apply(this, arguments));\n }\n RouterImpl.prototype.render = function render() {\n var _props = this.props,\n location = _props.location,\n _navigate2 = _props.navigate,\n basepath = _props.basepath,\n primary = _props.primary,\n children = _props.children,\n baseuri = _props.baseuri,\n _props$component = _props.component,\n component = _props$component === undefined ? \"div\" : _props$component,\n domProps = _objectWithoutProperties(_props, [\"location\", \"navigate\", \"basepath\", \"primary\", \"children\", \"baseuri\", \"component\"]);\n var routes = React.Children.toArray(children).reduce(function (array, child) {\n var routes = createRoute(basepath)(child);\n return array.concat(routes);\n }, []);\n var pathname = location.pathname;\n var match = pick(routes, pathname);\n if (match) {\n var params = match.params,\n uri = match.uri,\n route = match.route,\n element = match.route.value;\n\n // remove the /* from the end for child routes relative paths\n\n basepath = route.default ? basepath : route.path.replace(/\\*$/, \"\");\n var props = _extends({}, params, {\n uri: uri,\n location: location,\n navigate: function navigate(to, options) {\n return _navigate2(resolve(to, uri), options);\n }\n });\n var clone = React.cloneElement(element, props, element.props.children ? React.createElement(Router, {\n location: location,\n primary: primary\n }, element.props.children) : undefined);\n\n // using 'div' for < 16.3 support\n var FocusWrapper = primary ? FocusHandler : component;\n // don't pass any props to 'div'\n var wrapperProps = primary ? _extends({\n uri: uri,\n location: location,\n component: component\n }, domProps) : domProps;\n return React.createElement(BaseContext.Provider, {\n value: {\n baseuri: uri,\n basepath: basepath,\n navigate: props.navigate\n }\n }, React.createElement(FocusWrapper, wrapperProps, clone));\n } else {\n // Not sure if we want this, would require index routes at every level\n // warning(\n // false,\n // `\\n\\nNothing matched:\\n\\t${\n // location.pathname\n // }\\n\\nPaths checked: \\n\\t${routes\n // .map(route => route.path)\n // .join(\n // \"\\n\\t\"\n // )}\\n\\nTo get rid of this warning, add a default NotFound component as child of Router:\n // \\n\\tlet NotFound = () =>
Not Found!
\n // \\n\\t\\n\\t \\n\\t {/* ... */}\\n\\t`\n // );\n return null;\n }\n };\n return RouterImpl;\n}(React.PureComponent);\nRouterImpl.defaultProps = {\n primary: true\n};\nvar FocusContext = createNamedContext(\"Focus\");\nvar FocusHandler = function FocusHandler(_ref3) {\n var uri = _ref3.uri,\n location = _ref3.location,\n component = _ref3.component,\n domProps = _objectWithoutProperties(_ref3, [\"uri\", \"location\", \"component\"]);\n return React.createElement(FocusContext.Consumer, null, function (requestFocus) {\n return React.createElement(FocusHandlerImpl, _extends({}, domProps, {\n component: component,\n requestFocus: requestFocus,\n uri: uri,\n location: location\n }));\n });\n};\n\n// don't focus on initial render\nvar initialRender = true;\nvar focusHandlerCount = 0;\nvar FocusHandlerImpl = function (_React$Component2) {\n _inherits(FocusHandlerImpl, _React$Component2);\n function FocusHandlerImpl() {\n var _temp2, _this4, _ret2;\n _classCallCheck(this, FocusHandlerImpl);\n for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n return _ret2 = (_temp2 = (_this4 = _possibleConstructorReturn(this, _React$Component2.call.apply(_React$Component2, [this].concat(args))), _this4), _this4.state = {}, _this4.requestFocus = function (node) {\n if (!_this4.state.shouldFocus && node) {\n node.focus();\n }\n }, _temp2), _possibleConstructorReturn(_this4, _ret2);\n }\n FocusHandlerImpl.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, prevState) {\n var initial = prevState.uri == null;\n if (initial) {\n return _extends({\n shouldFocus: true\n }, nextProps);\n } else {\n var myURIChanged = nextProps.uri !== prevState.uri;\n var navigatedUpToMe = prevState.location.pathname !== nextProps.location.pathname && nextProps.location.pathname === nextProps.uri;\n return _extends({\n shouldFocus: myURIChanged || navigatedUpToMe\n }, nextProps);\n }\n };\n FocusHandlerImpl.prototype.componentDidMount = function componentDidMount() {\n focusHandlerCount++;\n this.focus();\n };\n FocusHandlerImpl.prototype.componentWillUnmount = function componentWillUnmount() {\n focusHandlerCount--;\n if (focusHandlerCount === 0) {\n initialRender = true;\n }\n };\n FocusHandlerImpl.prototype.componentDidUpdate = function componentDidUpdate(prevProps, prevState) {\n if (prevProps.location !== this.props.location && this.state.shouldFocus) {\n this.focus();\n }\n };\n FocusHandlerImpl.prototype.focus = function focus() {\n if (process.env.NODE_ENV === \"test\") {\n // getting cannot read property focus of null in the tests\n // and that bit of global `initialRender` state causes problems\n // should probably figure it out!\n return;\n }\n var requestFocus = this.props.requestFocus;\n if (requestFocus) {\n requestFocus(this.node);\n } else {\n if (initialRender) {\n initialRender = false;\n } else if (this.node) {\n // React polyfills [autofocus] and it fires earlier than cDM,\n // so we were stealing focus away, this line prevents that.\n if (!this.node.contains(document.activeElement)) {\n this.node.focus();\n }\n }\n }\n };\n FocusHandlerImpl.prototype.render = function render() {\n var _this5 = this;\n var _props2 = this.props,\n children = _props2.children,\n style = _props2.style,\n requestFocus = _props2.requestFocus,\n _props2$component = _props2.component,\n Comp = _props2$component === undefined ? \"div\" : _props2$component,\n uri = _props2.uri,\n location = _props2.location,\n domProps = _objectWithoutProperties(_props2, [\"children\", \"style\", \"requestFocus\", \"component\", \"uri\", \"location\"]);\n return React.createElement(Comp, _extends({\n style: _extends({\n outline: \"none\"\n }, style),\n tabIndex: \"-1\",\n ref: function ref(n) {\n return _this5.node = n;\n }\n }, domProps), React.createElement(FocusContext.Provider, {\n value: this.requestFocus\n }, this.props.children));\n };\n return FocusHandlerImpl;\n}(React.Component);\npolyfill(FocusHandlerImpl);\nvar k = function k() {};\n\n////////////////////////////////////////////////////////////////////////////////\nvar forwardRef = React.forwardRef;\nif (typeof forwardRef === \"undefined\") {\n forwardRef = function forwardRef(C) {\n return C;\n };\n}\nvar Link = forwardRef(function (_ref4, ref) {\n var innerRef = _ref4.innerRef,\n props = _objectWithoutProperties(_ref4, [\"innerRef\"]);\n return React.createElement(BaseContext.Consumer, null, function (_ref5) {\n var basepath = _ref5.basepath,\n baseuri = _ref5.baseuri;\n return React.createElement(Location, null, function (_ref6) {\n var location = _ref6.location,\n navigate = _ref6.navigate;\n var to = props.to,\n state = props.state,\n replace = props.replace,\n _props$getProps = props.getProps,\n getProps = _props$getProps === undefined ? k : _props$getProps,\n anchorProps = _objectWithoutProperties(props, [\"to\", \"state\", \"replace\", \"getProps\"]);\n var href = resolve(to, baseuri);\n var encodedHref = encodeURI(href);\n var isCurrent = location.pathname === encodedHref;\n var isPartiallyCurrent = startsWith(location.pathname, encodedHref);\n return React.createElement(\"a\", _extends({\n ref: ref || innerRef,\n \"aria-current\": isCurrent ? \"page\" : undefined\n }, anchorProps, getProps({\n isCurrent: isCurrent,\n isPartiallyCurrent: isPartiallyCurrent,\n href: href,\n location: location\n }), {\n href: href,\n onClick: function onClick(event) {\n if (anchorProps.onClick) anchorProps.onClick(event);\n if (shouldNavigate(event)) {\n event.preventDefault();\n var shouldReplace = replace;\n if (typeof replace !== \"boolean\" && isCurrent) {\n var _location$state = _extends({}, location.state),\n key = _location$state.key,\n restState = _objectWithoutProperties(_location$state, [\"key\"]);\n shouldReplace = shallowCompare(_extends({}, state), restState);\n }\n navigate(href, {\n state: state,\n replace: shouldReplace\n });\n }\n }\n }));\n });\n });\n});\nLink.displayName = \"Link\";\nprocess.env.NODE_ENV !== \"production\" ? void 0 : void 0;\n\n////////////////////////////////////////////////////////////////////////////////\nfunction RedirectRequest(uri) {\n this.uri = uri;\n}\nvar isRedirect = function isRedirect(o) {\n return o instanceof RedirectRequest;\n};\nvar redirectTo = function redirectTo(to) {\n throw new RedirectRequest(to);\n};\nvar RedirectImpl = function (_React$Component3) {\n _inherits(RedirectImpl, _React$Component3);\n function RedirectImpl() {\n _classCallCheck(this, RedirectImpl);\n return _possibleConstructorReturn(this, _React$Component3.apply(this, arguments));\n }\n\n // Support React < 16 with this hook\n RedirectImpl.prototype.componentDidMount = function componentDidMount() {\n var _props3 = this.props,\n navigate = _props3.navigate,\n to = _props3.to,\n from = _props3.from,\n _props3$replace = _props3.replace,\n replace = _props3$replace === undefined ? true : _props3$replace,\n state = _props3.state,\n noThrow = _props3.noThrow,\n baseuri = _props3.baseuri,\n props = _objectWithoutProperties(_props3, [\"navigate\", \"to\", \"from\", \"replace\", \"state\", \"noThrow\", \"baseuri\"]);\n Promise.resolve().then(function () {\n var resolvedTo = resolve(to, baseuri);\n navigate(insertParams(resolvedTo, props), {\n replace: replace,\n state: state\n });\n });\n };\n RedirectImpl.prototype.render = function render() {\n var _props4 = this.props,\n navigate = _props4.navigate,\n to = _props4.to,\n from = _props4.from,\n replace = _props4.replace,\n state = _props4.state,\n noThrow = _props4.noThrow,\n baseuri = _props4.baseuri,\n props = _objectWithoutProperties(_props4, [\"navigate\", \"to\", \"from\", \"replace\", \"state\", \"noThrow\", \"baseuri\"]);\n var resolvedTo = resolve(to, baseuri);\n if (!noThrow) redirectTo(insertParams(resolvedTo, props));\n return null;\n };\n return RedirectImpl;\n}(React.Component);\nvar Redirect = function Redirect(props) {\n return React.createElement(BaseContext.Consumer, null, function (_ref7) {\n var baseuri = _ref7.baseuri;\n return React.createElement(Location, null, function (locationContext) {\n return React.createElement(RedirectImpl, _extends({}, locationContext, {\n baseuri: baseuri\n }, props));\n });\n });\n};\nprocess.env.NODE_ENV !== \"production\" ? void 0 : void 0;\n\n////////////////////////////////////////////////////////////////////////////////\nvar Match = function Match(_ref8) {\n var path = _ref8.path,\n children = _ref8.children;\n return React.createElement(BaseContext.Consumer, null, function (_ref9) {\n var baseuri = _ref9.baseuri;\n return React.createElement(Location, null, function (_ref10) {\n var navigate = _ref10.navigate,\n location = _ref10.location;\n var resolvedPath = resolve(path, baseuri);\n var result = match(resolvedPath, location.pathname);\n return children({\n navigate: navigate,\n location: location,\n match: result ? _extends({}, result.params, {\n uri: result.uri,\n path: path\n }) : null\n });\n });\n });\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// Hooks\n\nvar useLocation = function useLocation() {\n var context = useContext(LocationContext);\n if (!context) {\n throw new Error(\"useLocation hook was used but a LocationContext.Provider was not found in the parent tree. Make sure this is used in a component that is a child of Router\");\n }\n return context.location;\n};\nvar useNavigate = function useNavigate() {\n var context = useContext(BaseContext);\n if (!context) {\n throw new Error(\"useNavigate hook was used but a BaseContext.Provider was not found in the parent tree. Make sure this is used in a component that is a child of Router\");\n }\n return context.navigate;\n};\nvar useParams = function useParams() {\n var context = useContext(BaseContext);\n if (!context) {\n throw new Error(\"useParams hook was used but a LocationContext.Provider was not found in the parent tree. Make sure this is used in a component that is a child of Router\");\n }\n var location = useLocation();\n var results = match(context.basepath, location.pathname);\n return results ? results.params : null;\n};\nvar useMatch = function useMatch(path) {\n if (!path) {\n throw new Error(\"useMatch(path: string) requires an argument of a string to match against\");\n }\n var context = useContext(BaseContext);\n if (!context) {\n throw new Error(\"useMatch hook was used but a LocationContext.Provider was not found in the parent tree. Make sure this is used in a component that is a child of Router\");\n }\n var location = useLocation();\n var resolvedPath = resolve(path, context.baseuri);\n var result = match(resolvedPath, location.pathname);\n return result ? _extends({}, result.params, {\n uri: result.uri,\n path: path\n }) : null;\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// Junk\nvar stripSlashes = function stripSlashes(str) {\n return str.replace(/(^\\/+|\\/+$)/g, \"\");\n};\nvar createRoute = function createRoute(basepath) {\n return function (element) {\n if (!element) {\n return null;\n }\n if (element.type === React.Fragment && element.props.children) {\n return React.Children.map(element.props.children, createRoute(basepath));\n }\n !(element.props.path || element.props.default || element.type === Redirect) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \": Children of must have a `path` or `default` prop, or be a ``. None found on element type `\" + element.type + \"`\") : invariant(false) : void 0;\n !!(element.type === Redirect && (!element.props.from || !element.props.to)) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \" requires both \\\"from\\\" and \\\"to\\\" props when inside a .\") : invariant(false) : void 0;\n !!(element.type === Redirect && !validateRedirect(element.props.from, element.props.to)) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \" has mismatched dynamic segments, ensure both paths have the exact same dynamic segments.\") : invariant(false) : void 0;\n if (element.props.default) {\n return {\n value: element,\n default: true\n };\n }\n var elementPath = element.type === Redirect ? element.props.from : element.props.path;\n var path = elementPath === \"/\" ? basepath : stripSlashes(basepath) + \"/\" + stripSlashes(elementPath);\n return {\n value: element,\n default: element.props.default,\n path: element.props.children ? stripSlashes(path) + \"/*\" : path\n };\n };\n};\nvar shouldNavigate = function shouldNavigate(event) {\n return !event.defaultPrevented && event.button === 0 && !(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);\n};\n\n////////////////////////////////////////////////////////////////////////\nexport { Link, Location, LocationProvider, Match, Redirect, Router, ServerLocation, createHistory, createMemorySource, isRedirect, navigate, redirectTo, globalHistory, match as matchPath, useLocation, useNavigate, useParams, useMatch, resolve , BaseContext };","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments\n * to provide information about what broke and what you were\n * expecting.\n *\n * The invariant message will be stripped in production, but the invariant\n * will remain to ensure logic does not differ in production.\n */\n\nvar invariant = function(condition, format, a, b, c, d, e, f) {\n if (process.env.NODE_ENV !== 'production') {\n if (format === undefined) {\n throw new Error('invariant requires an error message argument');\n }\n }\n\n if (!condition) {\n var error;\n if (format === undefined) {\n error = new Error(\n 'Minified exception occurred; use the non-minified dev environment ' +\n 'for the full error message and additional helpful warnings.'\n );\n } else {\n var args = [a, b, c, d, e, f];\n var argIndex = 0;\n error = new Error(\n format.replace(/%s/g, function() { return args[argIndex++]; })\n );\n error.name = 'Invariant Violation';\n }\n\n error.framesToPop = 1; // we don't care about invariant's own frame\n throw error;\n }\n};\n\nmodule.exports = invariant;\n","function _assertThisInitialized(e) {\n if (void 0 === e) throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n return e;\n}\nmodule.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _extends() {\n return (module.exports = _extends = Object.assign ? Object.assign.bind() : function (n) {\n for (var e = 1; e < arguments.length; e++) {\n var t = arguments[e];\n for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);\n }\n return n;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports), _extends.apply(null, arguments);\n}\nmodule.exports = _extends, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var setPrototypeOf = require(\"./setPrototypeOf.js\");\nfunction _inheritsLoose(t, o) {\n t.prototype = Object.create(o.prototype), t.prototype.constructor = t, setPrototypeOf(t, o);\n}\nmodule.exports = _inheritsLoose, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _interopRequireDefault(e) {\n return e && e.__esModule ? e : {\n \"default\": e\n };\n}\nmodule.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _objectWithoutPropertiesLoose(r, e) {\n if (null == r) return {};\n var t = {};\n for (var n in r) if ({}.hasOwnProperty.call(r, n)) {\n if (e.indexOf(n) >= 0) continue;\n t[n] = r[n];\n }\n return t;\n}\nmodule.exports = _objectWithoutPropertiesLoose, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _setPrototypeOf(t, e) {\n return (module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {\n return t.__proto__ = e, t;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports), _setPrototypeOf(t, e);\n}\nmodule.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nconst PartytownSnippet = \"/* Partytown 0.5.4 - MIT builder.io */\\n!function(t,e,n,i,r,o,a,d,s,c,p,l){function u(){l||(l=1,\\\"/\\\"==(a=(o.lib||\\\"/~partytown/\\\")+(o.debug?\\\"debug/\\\":\\\"\\\"))[0]&&(s=e.querySelectorAll('script[type=\\\"text/partytown\\\"]'),i!=t?i.dispatchEvent(new CustomEvent(\\\"pt1\\\",{detail:t})):(d=setTimeout(w,1e4),e.addEventListener(\\\"pt0\\\",f),r?h(1):n.serviceWorker?n.serviceWorker.register(a+(o.swPath||\\\"partytown-sw.js\\\"),{scope:a}).then((function(t){t.active?h():t.installing&&t.installing.addEventListener(\\\"statechange\\\",(function(t){\\\"activated\\\"==t.target.state&&h()}))}),console.error):w())))}function h(t){c=e.createElement(t?\\\"script\\\":\\\"iframe\\\"),t||(c.setAttribute(\\\"style\\\",\\\"display:block;width:0;height:0;border:0;visibility:hidden\\\"),c.setAttribute(\\\"aria-hidden\\\",!0)),c.src=a+\\\"partytown-\\\"+(t?\\\"atomics.js?v=0.5.4\\\":\\\"sandbox-sw.html?\\\"+Date.now()),e.body.appendChild(c)}function w(t,n){for(f(),t=0;t {\n const { forward = [], ...filteredConfig } = config || {};\n const configStr = JSON.stringify(filteredConfig, (k, v) => {\n if (typeof v === 'function') {\n v = String(v);\n if (v.startsWith(k + '(')) {\n v = 'function ' + v;\n }\n }\n return v;\n });\n return [\n `!(function(w,p,f,c){`,\n Object.keys(filteredConfig).length > 0\n ? `c=w[p]=Object.assign(w[p]||{},${configStr});`\n : `c=w[p]=w[p]||{};`,\n `c[f]=(c[f]||[])`,\n forward.length > 0 ? `.concat(${JSON.stringify(forward)})` : ``,\n `})(window,'partytown','forward');`,\n snippetCode,\n ].join('');\n};\n\n/**\n * The `type` attribute for Partytown scripts, which does two things:\n *\n * 1. Prevents the `