);\n\n // Add okta-react userAgent\n if (oktaAuth._oktaUserAgent) {\n oktaAuth._oktaUserAgent.addEnvironment(`${PACKAGE_NAME}/${PACKAGE_VERSION}`);\n } else {\n console.warn('_oktaUserAgent is not available on auth SDK instance. Please use okta-auth-js@^5.3.1 .');\n }\n\n // Update Security provider with latest authState\n const handler = (authState: AuthState) => {\n setAuthState(authState);\n };\n oktaAuth.authStateManager.subscribe(handler);\n\n // Trigger an initial change event to make sure authState is latest\n oktaAuth.start();\n\n return () => {\n oktaAuth.authStateManager.unsubscribe(handler);\n oktaAuth.stop();\n };\n }, [oktaAuth, restoreOriginalUri]);\n\n if (!oktaAuth) {\n const err = new AuthSdkError('No oktaAuth instance passed to Security Component.');\n return ;\n }\n\n if (!restoreOriginalUri) {\n const err = new AuthSdkError('No restoreOriginalUri callback passed to Security Component.');\n return ;\n }\n\n if (!oktaAuth._oktaUserAgent) {\n console.warn('_oktaUserAgent is not available on auth SDK instance. Please use okta-auth-js@^5.3.1 .');\n }\n else {\n // use SKIP_VERSION_CHECK flag to control version check in tests\n // OKTA-465157: remove SKIP_VERSION_CHECK\n const isAuthJsSupported = SKIP_VERSION_CHECK === '1' ||\n compareVersions(oktaAuth._oktaUserAgent.getVersion(), AUTH_JS.minSupportedVersion, '>=');\n if (!isAuthJsSupported) {\n const err = new AuthSdkError(`\n Passed in oktaAuth is not compatible with the SDK,\n minimum supported okta-auth-js version is ${AUTH_JS.minSupportedVersion}.\n `);\n return ;\n }\n }\n\n return (\n \n {children}\n \n );\n};\n\nexport default Security;\n","/*\n * Copyright (c) 2020-Present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport * as React from 'react';\nimport { useOktaAuth, IOktaContext } from './OktaContext';\n\nconst withOktaAuth = (\n ComponentToWrap: React.ComponentType
\n): React.FC> => { \n const WrappedComponent = (props: Omit) => { \n const oktaAuthProps = useOktaAuth();\n return ;\n };\n WrappedComponent.displayName = 'withOktaAuth_' + (ComponentToWrap.displayName || ComponentToWrap.name);\n return WrappedComponent;\n};\n\nexport default withOktaAuth;\n","/*\n * Copyright (c) 2017-Present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport * as React from 'react';\nimport { useOktaAuth, OnAuthResumeFunction } from './OktaContext';\nimport OktaError from './OktaError';\n\ninterface LoginCallbackProps {\n errorComponent?: React.ComponentType<{ error: Error }>;\n onAuthResume?: OnAuthResumeFunction;\n loadingElement?: React.ReactElement;\n}\n\nconst LoginCallback: React.FC = ({ errorComponent, loadingElement = null, onAuthResume }) => { \n const { oktaAuth, authState } = useOktaAuth();\n const [callbackError, setCallbackError] = React.useState(null);\n\n const ErrorReporter = errorComponent || OktaError;\n React.useEffect(() => {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore OKTA-464505: backward compatibility support for auth-js@5\n const isInteractionRequired = oktaAuth.idx.isInteractionRequired || oktaAuth.isInteractionRequired.bind(oktaAuth);\n if (onAuthResume && isInteractionRequired()) {\n onAuthResume();\n return;\n }\n oktaAuth.handleLoginRedirect().then(() => {\n // In `` component service was not started in case of login redirect.\n // Start it now after `restoreOriginalUri` has been called and route changed.\n oktaAuth.start();\n }).catch(e => {\n setCallbackError(e);\n });\n }, [oktaAuth]);\n\n const authError = authState?.error;\n const displayError = callbackError || authError;\n if (displayError) { \n return ;\n }\n\n return loadingElement;\n};\n\nexport default LoginCallback;\n","/*\n * Copyright (c) 2017-Present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport * as React from 'react';\nimport { useOktaAuth, OnAuthRequiredFunction } from './OktaContext';\nimport * as ReactRouterDom from 'react-router-dom';\nimport { toRelativeUrl, AuthSdkError } from '@okta/okta-auth-js';\nimport OktaError from './OktaError';\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nlet useMatch: any;\nif ('useRouteMatch' in ReactRouterDom) {\n // trick static analyzer to avoid \"'useRouteMatch' is not exported\" error\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n useMatch = (ReactRouterDom as any)['useRouteMatch' in ReactRouterDom ? 'useRouteMatch' : ''];\n} else {\n // throw when useMatch is triggered\n useMatch = () => { \n throw new AuthSdkError('Unsupported: SecureRoute only works with react-router-dom v5 or any router library with compatible APIs. See examples under the \"samples\" folder for how to implement your own custom SecureRoute Component.');\n };\n}\n\nconst SecureRoute: React.FC<{\n onAuthRequired?: OnAuthRequiredFunction;\n errorComponent?: React.ComponentType<{ error: Error }>;\n} & ReactRouterDom.RouteProps & React.HTMLAttributes> = ({ \n onAuthRequired,\n errorComponent,\n ...routeProps\n}) => { \n const { oktaAuth, authState, _onAuthRequired } = useOktaAuth();\n const match = useMatch(routeProps);\n const pendingLogin = React.useRef(false);\n const [handleLoginError, setHandleLoginError] = React.useState(null);\n const ErrorReporter = errorComponent || OktaError;\n\n React.useEffect(() => {\n const handleLogin = async () => {\n if (pendingLogin.current) {\n return;\n }\n\n pendingLogin.current = true;\n\n const originalUri = toRelativeUrl(window.location.href, window.location.origin);\n oktaAuth.setOriginalUri(originalUri);\n const onAuthRequiredFn = onAuthRequired || _onAuthRequired;\n if (onAuthRequiredFn) {\n await onAuthRequiredFn(oktaAuth);\n } else {\n await oktaAuth.signInWithRedirect();\n }\n };\n\n // Only process logic if the route matches\n if (!match) {\n return;\n }\n\n if (!authState) {\n return;\n }\n\n if (authState.isAuthenticated) {\n pendingLogin.current = false;\n return;\n }\n\n // Start login if app has decided it is not logged in and there is no pending signin\n if(!authState.isAuthenticated) { \n handleLogin().catch(err => {\n setHandleLoginError(err as Error);\n });\n } \n\n }, [\n authState,\n oktaAuth, \n match, \n onAuthRequired, \n _onAuthRequired\n ]);\n\n if (handleLoginError) {\n return ;\n }\n\n if (!authState || !authState.isAuthenticated) {\n return null;\n }\n\n return (\n \n );\n};\n\nexport default SecureRoute;\n","import objectWithoutPropertiesLoose from \"./objectWithoutPropertiesLoose.js\";\nfunction _objectWithoutProperties(e, t) {\n if (null == e) return {};\n var o,\n r,\n i = objectWithoutPropertiesLoose(e, t);\n if (Object.getOwnPropertySymbols) {\n var n = Object.getOwnPropertySymbols(e);\n for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);\n }\n return i;\n}\nexport { _objectWithoutProperties as default };","// eslint-disable-next-line import/prefer-default-export\nexport const LOCALE_CHANGE = 'LOCALE_CHANGE';\n","import { LOCALE_CHANGE } from './localeActionTypes';\n\n// eslint-disable-next-line import/prefer-default-export\nexport const localeChange = (locale) => ({\n type: LOCALE_CHANGE,\n locale,\n});\n","// * fallback: https://testpoints.rewardstaging.com\nexport const API_ENDPOINT = '';\nexport const ACTION_INVALID2 = 'This action is invalid!';\n\nexport const GetAPIEndpoint = () => {\n if (API_ENDPOINT.length > 0) {\n return API_ENDPOINT;\n }\n return window.location.origin;\n};\nexport function getHeaders() {\n const Authorization = `Bearer ${localStorage.getItem('access_token') ?? sessionStorage.getItem('access_token')}`;\n return { Authorization };\n}\n","import axios from 'axios';\nimport { GetAPIEndpoint, getHeaders } from '../../configuration';\n\nconst getApi = () => {\n const api = axios.create({\n baseURL: `${GetAPIEndpoint()}`,\n timeout: 30000,\n headers: getHeaders(),\n });\n\n api.interceptors.response.use(\n (response) => response,\n (error) => {\n if (error && error.response && (error.response.status === 500 || error.response.status === 401)) {\n localStorage.removeItem('access_token');\n sessionStorage.removeItem('access_token');\n if (window.location.href.indexOf('login') === -1) {\n window.location = '/login';\n }\n }\n return error;\n },\n );\n return api;\n};\n\nexport default getApi;\n","// import programData from '../database/program';\nimport getApi from './api';\nimport { GetAPIEndpoint } from '../../configuration';\n\nfunction getHeaders() {\n const Authorization = `Bearer ${localStorage.getItem('access_token') ?? sessionStorage.getItem('access_token')}`;\n return { Authorization };\n}\nconst programApi = {\n getProgram: () => getApi().get(`${GetAPIEndpoint()}/api/programs`, { headers: getHeaders() }),\n getContent: (program, language) => {\n if (!program) return undefined;\n if (!program.content) return undefined;\n const filtered = program.content.filter((data) => data.language === language);\n if (filtered.length > 0) return filtered[0];\n return undefined;\n },\n getUserWithoutApi: (mail) => getApi().post(`${GetAPIEndpoint()}/api/getpoints`, {email: mail}, { headers: getHeaders() }),\n};\n\nexport default programApi;\n","function r(e){var t,f,n=\"\";if(\"string\"==typeof e||\"number\"==typeof e)n+=e;else if(\"object\"==typeof e)if(Array.isArray(e))for(t=0;t 0)\n ? toastAutoClose\n : containerAutoClose;\n}\n\nexport const canUseDom = !!(\n typeof window !== 'undefined' &&\n window.document &&\n window.document.createElement\n);\n\nexport function canBeRendered(content: T): boolean {\n return (\n isValidElement(content) || isStr(content) || isFn(content) || isNum(content)\n );\n}\n","import { ToastPosition, TypeOptions } from '../types';\n\ntype KeyOfPosition =\n | 'TOP_LEFT'\n | 'TOP_RIGHT'\n | 'TOP_CENTER'\n | 'BOTTOM_LEFT'\n | 'BOTTOM_RIGHT'\n | 'BOTTOM_CENTER';\n\ntype KeyOfType = 'INFO' | 'SUCCESS' | 'WARNING' | 'ERROR' | 'DEFAULT' | 'DARK';\n\nexport const POSITION: { [key in KeyOfPosition]: ToastPosition } = {\n TOP_LEFT: 'top-left',\n TOP_RIGHT: 'top-right',\n TOP_CENTER: 'top-center',\n BOTTOM_LEFT: 'bottom-left',\n BOTTOM_RIGHT: 'bottom-right',\n BOTTOM_CENTER: 'bottom-center'\n};\n\nexport const TYPE: { [key in KeyOfType]: TypeOptions } = {\n INFO: 'info',\n SUCCESS: 'success',\n WARNING: 'warning',\n ERROR: 'error',\n DEFAULT: 'default',\n DARK: 'dark'\n};\n\nexport const enum Default {\n COLLAPSE_DURATION = 300,\n DEBOUNCE_DURATION = 50,\n CSS_NAMESPACE = 'Toastify',\n DRAGGABLE_PERCENT = 80\n}\n\nexport const enum Direction {\n X = 'x',\n Y = 'y'\n}\n","import React, { useEffect, useLayoutEffect, useRef } from 'react';\nimport { ToastTransitionProps } from '../types';\n\nimport { collapseToast } from './collapseToast';\nimport { Default } from './constant';\n\nexport interface CSSTransitionProps {\n /**\n * Css class to apply when toast enter\n */\n enter: string;\n\n /**\n * Css class to apply when toast leave\n */\n exit: string;\n\n /**\n * Append current toast position to the classname.\n * If multiple classes are provided, only the last one will get the position\n * For instance `myclass--top-center`...\n * `Default: false`\n */\n appendPosition?: boolean;\n\n /**\n * Collapse toast smoothly when exit animation end\n * `Default: true`\n */\n collapse?: boolean;\n\n /**\n * Collapse transition duration\n * `Default: 300`\n */\n collapseDuration?: number;\n}\n\nconst enum AnimationStep {\n Enter,\n Exit\n}\n\n/**\n * Css animation that just work.\n * You could use animate.css for instance\n *\n *\n * ```\n * cssTransition({\n * enter: \"animate__animated animate__bounceIn\",\n * exit: \"animate__animated animate__bounceOut\"\n * })\n * ```\n *\n */\nexport function cssTransition({\n enter,\n exit,\n appendPosition = false,\n collapse = true,\n collapseDuration = Default.COLLAPSE_DURATION\n}: CSSTransitionProps) {\n return function ToastTransition({\n children,\n position,\n preventExitTransition,\n done,\n nodeRef,\n isIn\n }: ToastTransitionProps) {\n const enterClassName = appendPosition ? `${enter}--${position}` : enter;\n const exitClassName = appendPosition ? `${exit}--${position}` : exit;\n const baseClassName = useRef();\n const animationStep = useRef(AnimationStep.Enter);\n\n useLayoutEffect(() => {\n onEnter();\n }, []);\n\n useEffect(() => {\n if (!isIn) preventExitTransition ? onExited() : onExit();\n }, [isIn]);\n\n function onEnter() {\n const node = nodeRef.current!;\n baseClassName.current = node.className;\n node.className += ` ${enterClassName}`;\n node.addEventListener('animationend', onEntered);\n }\n\n function onEntered() {\n const node = nodeRef.current!;\n node.removeEventListener('animationend', onEntered);\n if (animationStep.current === AnimationStep.Enter) {\n node.className = baseClassName.current!;\n }\n }\n\n function onExit() {\n animationStep.current = AnimationStep.Exit;\n const node = nodeRef.current!;\n\n node.className += ` ${exitClassName}`;\n node.addEventListener('animationend', onExited);\n }\n\n function onExited() {\n const node = nodeRef.current!;\n\n node.removeEventListener('animationend', onExited);\n collapse ? collapseToast(node, done, collapseDuration) : done();\n }\n\n return <>{children}>;\n };\n}\n","import { Default } from './constant';\n\n/**\n * Used to collapse toast after exit animation\n */\nexport function collapseToast(\n node: HTMLElement,\n done: () => void,\n duration = Default.COLLAPSE_DURATION\n) {\n const height = node.scrollHeight;\n const style = node.style;\n\n requestAnimationFrame(() => {\n style.minHeight = 'initial';\n style.height = height + 'px';\n style.transition = `all ${duration}ms`;\n\n requestAnimationFrame(() => {\n style.height = '0';\n style.padding = '0';\n style.margin = '0';\n setTimeout(done, duration as number);\n });\n });\n}\n","import {\n Id,\n ToastContent,\n ClearWaitingQueueParams,\n NotValidatedToastProps\n} from '../types';\nimport { ContainerInstance } from '../hooks';\n\nexport const enum Event {\n Show,\n Clear,\n DidMount,\n WillUnmount,\n Change,\n ClearWaitingQueue\n}\n\ntype OnShowCallback = (\n content: ToastContent,\n options: NotValidatedToastProps\n) => void;\ntype OnClearCallback = (id?: Id) => void;\ntype OnClearWaitingQueue = (params: ClearWaitingQueueParams) => void;\ntype OnDidMountCallback = (containerInstance: ContainerInstance) => void;\ntype OnWillUnmountCallback = OnDidMountCallback;\nexport type OnChangeCallback = (\n toast: number,\n containerId?: number | string\n) => void;\ntype Callback =\n | OnShowCallback\n | OnClearCallback\n | OnClearWaitingQueue\n | OnDidMountCallback\n | OnWillUnmountCallback\n | OnChangeCallback;\ntype TimeoutId = ReturnType;\n\nexport interface EventManager {\n list: Map;\n emitQueue: Map;\n on(event: Event.Show, callback: OnShowCallback): EventManager;\n on(event: Event.Clear, callback: OnClearCallback): EventManager;\n on(\n event: Event.ClearWaitingQueue,\n callback: OnClearWaitingQueue\n ): EventManager;\n on(event: Event.DidMount, callback: OnDidMountCallback): EventManager;\n on(event: Event.WillUnmount, callback: OnWillUnmountCallback): EventManager;\n on(event: Event.Change, callback: OnChangeCallback): EventManager;\n off(event: Event, callback?: Callback): EventManager;\n cancelEmit(event: Event): EventManager;\n emit(\n event: Event.Show,\n content: React.ReactNode,\n options: NotValidatedToastProps\n ): void;\n emit(event: Event.Clear, id?: string | number): void;\n emit(event: Event.ClearWaitingQueue, params: ClearWaitingQueueParams): void;\n emit(event: Event.DidMount, containerInstance: ContainerInstance): void;\n emit(event: Event.WillUnmount, containerInstance: ContainerInstance): void;\n emit(event: Event.Change, toast: number, containerId?: number | string): void;\n}\n\nexport const eventManager: EventManager = {\n list: new Map(),\n emitQueue: new Map(),\n\n on(event: Event, callback: Callback) {\n this.list.has(event) || this.list.set(event, []);\n this.list.get(event)!.push(callback);\n return this;\n },\n\n off(event, callback) {\n if (callback) {\n const cb = this.list.get(event)!.filter(cb => cb !== callback);\n this.list.set(event, cb);\n return this;\n }\n this.list.delete(event);\n return this;\n },\n\n cancelEmit(event) {\n const timers = this.emitQueue.get(event);\n if (timers) {\n timers.forEach(clearTimeout);\n this.emitQueue.delete(event);\n }\n\n return this;\n },\n\n /**\n * Enqueue the event at the end of the call stack\n * Doing so let the user call toast as follow:\n * toast('1')\n * toast('2')\n * toast('3')\n * Without setTimemout the code above will not work\n */\n emit(event: Event, ...args: any[]) {\n this.list.has(event) &&\n this.list.get(event)!.forEach((callback: Callback) => {\n const timer = setTimeout(() => {\n // @ts-ignore\n callback(...args);\n }, 0);\n\n this.emitQueue.has(event) || this.emitQueue.set(event, []);\n this.emitQueue.get(event)!.push(timer);\n });\n }\n};\n","import { useRef, useEffect } from 'react';\n\n/**\n * `useKeeper` is a helper around `useRef`.\n *\n * You don't need to access the `.current`property to get the value\n * If refresh is set to true. The ref will be updated every render\n */\nexport function useKeeper(arg: T, refresh = false) {\n const ref = useRef(arg);\n\n useEffect(() => {\n if (refresh) ref.current = arg;\n });\n\n return ref.current;\n}\n","import { Id } from '../types';\n\nimport { isToastIdValid } from '../utils';\n\nexport const enum ActionType {\n ADD,\n REMOVE\n}\nexport type State = Array;\nexport type Action =\n | { type: ActionType.ADD; toastId: Id; staleId?: Id }\n | { type: ActionType.REMOVE; toastId?: Id };\n\nexport function reducer(state: State, action: Action) {\n switch (action.type) {\n case ActionType.ADD:\n return [...state, action.toastId].filter(id => id !== action.staleId);\n case ActionType.REMOVE:\n return isToastIdValid(action.toastId)\n ? state.filter(id => id !== action.toastId)\n : [];\n }\n}\n","import {\n useEffect,\n useRef,\n useReducer,\n cloneElement,\n isValidElement\n} from 'react';\nimport {\n parseClassName,\n canBeRendered,\n isBool,\n isFn,\n isNum,\n isStr,\n isToastIdValid,\n getAutoCloseDelay,\n Direction,\n Default\n} from '../utils';\nimport { eventManager, Event } from '../core/eventManager';\n\nimport {\n Id,\n ToastContainerProps,\n ToastProps,\n ToastContent,\n Toast,\n ToastPosition,\n ClearWaitingQueueParams,\n NotValidatedToastProps,\n ToastTransition\n} from '../types';\nimport { useKeeper } from './useKeeper';\nimport { ActionType, reducer } from './toastContainerReducer';\n\ntype CollectionItem = Record;\ntype ToastToRender = Partial>;\n\ninterface QueuedToast {\n toastContent: ToastContent;\n toastProps: ToastProps;\n staleId?: Id;\n}\n\nexport interface ContainerInstance {\n toastKey: number;\n displayedToast: number;\n props: ToastContainerProps;\n containerId?: Id | null;\n isToastActive: (toastId: Id) => boolean;\n getToast: (id: Id) => Toast | null;\n}\n\nexport function useToastContainer(props: ToastContainerProps) {\n const [, forceUpdate] = useReducer(x => x + 1, 0);\n const [toast, dispatch] = useReducer(reducer, []);\n const containerRef = useRef(null);\n let toastCount = useKeeper(0);\n let queue = useKeeper([]);\n const collection = useKeeper({});\n const instance = useKeeper({\n toastKey: 1,\n displayedToast: 0,\n props,\n containerId: null,\n isToastActive: isToastActive,\n getToast: id => collection[id] || null\n });\n\n useEffect(() => {\n instance.containerId = props.containerId;\n eventManager\n .cancelEmit(Event.WillUnmount)\n .on(Event.Show, buildToast)\n .on(Event.Clear, toastId => containerRef.current && removeToast(toastId))\n .on(Event.ClearWaitingQueue, clearWaitingQueue)\n .emit(Event.DidMount, instance);\n\n return () => eventManager.emit(Event.WillUnmount, instance);\n }, []);\n\n useEffect(() => {\n instance.isToastActive = isToastActive;\n instance.displayedToast = toast.length;\n eventManager.emit(Event.Change, toast.length, props.containerId);\n }, [toast]);\n\n useEffect(() => {\n instance.props = props;\n });\n\n function isToastActive(id: Id) {\n return toast.indexOf(id) !== -1;\n }\n\n function clearWaitingQueue({ containerId }: ClearWaitingQueueParams) {\n const { limit, enableMultiContainer } = instance.props;\n if (\n limit &&\n (!containerId ||\n (instance.containerId === containerId && enableMultiContainer))\n ) {\n toastCount -= queue.length;\n queue = [];\n }\n }\n\n function removeToast(toastId?: Id) {\n dispatch({ type: ActionType.REMOVE, toastId });\n }\n\n function dequeueToast() {\n const { toastContent, toastProps, staleId } = queue.shift() as QueuedToast;\n appendToast(toastContent, toastProps, staleId);\n }\n\n /**\n * check if a container is attached to the dom\n * check for multi-container, build only if associated\n * check for duplicate toastId if no update\n */\n function isNotValid({\n containerId,\n toastId,\n updateId\n }: NotValidatedToastProps) {\n return !containerRef.current ||\n (instance.props.enableMultiContainer &&\n containerId !== instance.props.containerId) ||\n (collection[toastId] && updateId == null)\n ? true\n : false;\n }\n\n // this function and all the function called inside needs to rely on ref(`useKeeper`)\n function buildToast(\n content: ToastContent,\n { delay, staleId, ...options }: NotValidatedToastProps\n ) {\n if (!canBeRendered(content) || isNotValid(options)) return;\n\n const { toastId, updateId } = options;\n const { props } = instance;\n const closeToast = () => removeToast(toastId);\n const isNotAnUpdate = options.updateId == null;\n\n if (isNotAnUpdate) toastCount++;\n\n const toastProps: ToastProps = {\n toastId,\n updateId,\n isIn: false,\n key: options.key || instance.toastKey++,\n type: options.type,\n closeToast: closeToast,\n closeButton: options.closeButton,\n rtl: props.rtl,\n position: options.position || (props.position as ToastPosition),\n transition: options.transition || (props.transition as ToastTransition),\n className: parseClassName(options.className || props.toastClassName),\n bodyClassName: parseClassName(\n options.bodyClassName || props.bodyClassName\n ),\n style: options.style || props.toastStyle,\n bodyStyle: options.bodyStyle || props.bodyStyle,\n onClick: options.onClick || props.onClick,\n pauseOnHover: isBool(options.pauseOnHover)\n ? options.pauseOnHover\n : props.pauseOnHover,\n pauseOnFocusLoss: isBool(options.pauseOnFocusLoss)\n ? options.pauseOnFocusLoss\n : props.pauseOnFocusLoss,\n draggable: isBool(options.draggable)\n ? options.draggable\n : props.draggable,\n draggablePercent: isNum(options.draggablePercent)\n ? options.draggablePercent\n : (props.draggablePercent as number),\n draggableDirection:\n options.draggableDirection || props.draggableDirection,\n closeOnClick: isBool(options.closeOnClick)\n ? options.closeOnClick\n : props.closeOnClick,\n progressClassName: parseClassName(\n options.progressClassName || props.progressClassName\n ),\n progressStyle: options.progressStyle || props.progressStyle,\n autoClose: getAutoCloseDelay(options.autoClose, props.autoClose),\n hideProgressBar: isBool(options.hideProgressBar)\n ? options.hideProgressBar\n : props.hideProgressBar,\n progress: options.progress,\n role: isStr(options.role) ? options.role : props.role,\n deleteToast() {\n removeFromCollection(toastId);\n }\n };\n\n if (isFn(options.onOpen)) toastProps.onOpen = options.onOpen;\n if (isFn(options.onClose)) toastProps.onClose = options.onClose;\n\n // tweak for vertical dragging\n if (\n toastProps.draggableDirection === Direction.Y &&\n toastProps.draggablePercent === Default.DRAGGABLE_PERCENT\n ) {\n (toastProps.draggablePercent as number) *= 1.5;\n }\n\n let closeButton = props.closeButton;\n\n if (options.closeButton === false || canBeRendered(options.closeButton)) {\n closeButton = options.closeButton;\n } else if (options.closeButton === true) {\n closeButton = canBeRendered(props.closeButton) ? props.closeButton : true;\n }\n\n toastProps.closeButton = closeButton;\n\n let toastContent = content;\n\n if (isValidElement(content) && !isStr(content.type)) {\n toastContent = cloneElement(content, {\n closeToast,\n toastProps\n });\n } else if (isFn(content)) {\n toastContent = content({ closeToast, toastProps });\n }\n\n // not handling limit + delay by design. Waiting for user feedback first\n if (\n props.limit &&\n props.limit > 0 &&\n toastCount > props.limit &&\n isNotAnUpdate\n ) {\n queue.push({ toastContent, toastProps, staleId });\n } else if (isNum(delay) && (delay as number) > 0) {\n setTimeout(() => {\n appendToast(toastContent, toastProps, staleId);\n }, delay);\n } else {\n appendToast(toastContent, toastProps, staleId);\n }\n }\n\n function appendToast(\n content: ToastContent,\n toastProps: ToastProps,\n staleId?: Id\n ) {\n const { toastId } = toastProps;\n\n if (staleId) delete collection[staleId];\n\n collection[toastId] = {\n content,\n props: toastProps\n };\n dispatch({\n type: ActionType.ADD,\n toastId,\n staleId\n });\n }\n\n function removeFromCollection(toastId: Id) {\n delete collection[toastId];\n const queueLen = queue.length;\n toastCount = isToastIdValid(toastId)\n ? toastCount - 1\n : toastCount - instance.displayedToast;\n\n if (toastCount < 0) toastCount = 0;\n\n if (queueLen > 0) {\n const freeSlot = isToastIdValid(toastId) ? 1 : instance.props.limit!;\n\n if (queueLen === 1 || freeSlot === 1) {\n instance.displayedToast++;\n dequeueToast();\n } else {\n const toDequeue = freeSlot > queueLen ? queueLen : freeSlot;\n instance.displayedToast = toDequeue;\n\n for (let i = 0; i < toDequeue; i++) dequeueToast();\n }\n } else {\n forceUpdate();\n }\n }\n\n function getToastToRender(\n cb: (position: ToastPosition, toastList: Toast[]) => T\n ) {\n const toastToRender: ToastToRender = {};\n const toastList = props.newestOnTop\n ? Object.keys(collection).reverse()\n : Object.keys(collection);\n\n for (let i = 0; i < toastList.length; i++) {\n const toast = collection[toastList[i]];\n const { position } = toast.props;\n toastToRender[position] || (toastToRender[position] = []);\n\n toastToRender[position]!.push(toast);\n }\n\n return (Object.keys(toastToRender) as Array).map(p =>\n cb(p, toastToRender[p]!)\n );\n }\n\n return {\n getToastToRender,\n collection,\n containerRef,\n isToastActive\n };\n}\n","import {\n useState,\n useRef,\n useEffect,\n isValidElement,\n DOMAttributes\n} from 'react';\n\nimport { isFn } from '../utils';\nimport { ToastProps } from '../types';\nimport { useKeeper } from './useKeeper';\nimport { Direction } from '../utils/constant';\n\ninterface Draggable {\n start: number;\n x: number;\n y: number;\n delta: number;\n removalDistance: number;\n canCloseOnClick: boolean;\n canDrag: boolean;\n boundingRect: DOMRect | null;\n}\n\ntype DragEvent = MouseEvent & TouchEvent;\n\nfunction getX(e: DragEvent) {\n return e.targetTouches && e.targetTouches.length >= 1\n ? e.targetTouches[0].clientX\n : e.clientX;\n}\n\nfunction getY(e: DragEvent) {\n return e.targetTouches && e.targetTouches.length >= 1\n ? e.targetTouches[0].clientY\n : e.clientY;\n}\n\nexport function useToast(props: ToastProps) {\n const [isRunning, setIsRunning] = useState(true);\n const [preventExitTransition, setPreventExitTransition] = useState(false);\n const toastRef = useRef(null);\n const drag = useKeeper({\n start: 0,\n x: 0,\n y: 0,\n delta: 0,\n removalDistance: 0,\n canCloseOnClick: true,\n canDrag: false,\n boundingRect: null\n });\n const syncProps = useKeeper(props, true);\n const { autoClose, pauseOnHover, closeToast, onClick, closeOnClick } = props;\n\n useEffect(() => {\n if (isFn(props.onOpen))\n props.onOpen(isValidElement(props.children) && props.children.props);\n\n return () => {\n if (isFn(syncProps.onClose))\n syncProps.onClose(\n isValidElement(syncProps.children) && syncProps.children.props\n );\n };\n }, []);\n\n useEffect(() => {\n props.draggable && bindDragEvents();\n return () => {\n props.draggable && unbindDragEvents();\n };\n }, [props.draggable]);\n\n useEffect(() => {\n props.pauseOnFocusLoss && bindFocusEvents();\n return () => {\n props.pauseOnFocusLoss && unbindFocusEvents();\n };\n }, [props.pauseOnFocusLoss]);\n\n function onDragStart(\n e: React.MouseEvent | React.TouchEvent\n ) {\n if (props.draggable) {\n const toast = toastRef.current!;\n drag.canCloseOnClick = true;\n drag.canDrag = true;\n drag.boundingRect = toast.getBoundingClientRect();\n toast.style.transition = '';\n drag.x = getX(e.nativeEvent as DragEvent);\n drag.y = getY(e.nativeEvent as DragEvent);\n\n if (props.draggableDirection === Direction.X) {\n drag.start = drag.x;\n drag.removalDistance =\n toast.offsetWidth * (props.draggablePercent / 100);\n } else {\n drag.start = drag.y;\n drag.removalDistance =\n toast.offsetHeight * (props.draggablePercent / 100);\n }\n }\n }\n\n function onDragTransitionEnd() {\n if (drag.boundingRect) {\n const { top, bottom, left, right } = drag.boundingRect;\n\n if (\n props.pauseOnHover &&\n drag.x >= left &&\n drag.x <= right &&\n drag.y >= top &&\n drag.y <= bottom\n ) {\n pauseToast();\n } else {\n playToast();\n }\n }\n }\n\n function playToast() {\n setIsRunning(true);\n }\n\n function pauseToast() {\n setIsRunning(false);\n }\n\n function bindFocusEvents() {\n if (!document.hasFocus()) pauseToast();\n\n window.addEventListener('focus', playToast);\n window.addEventListener('blur', pauseToast);\n }\n\n function unbindFocusEvents() {\n window.removeEventListener('focus', playToast);\n window.removeEventListener('blur', pauseToast);\n }\n\n function bindDragEvents() {\n document.addEventListener('mousemove', onDragMove);\n document.addEventListener('mouseup', onDragEnd);\n\n document.addEventListener('touchmove', onDragMove);\n document.addEventListener('touchend', onDragEnd);\n }\n\n function unbindDragEvents() {\n document.removeEventListener('mousemove', onDragMove);\n document.removeEventListener('mouseup', onDragEnd);\n\n document.removeEventListener('touchmove', onDragMove);\n document.removeEventListener('touchend', onDragEnd);\n }\n\n function onDragMove(e: MouseEvent | TouchEvent) {\n if (drag.canDrag) {\n e.preventDefault();\n\n const toast = toastRef.current!;\n if (isRunning) pauseToast();\n\n drag.x = getX(e as DragEvent);\n drag.y = getY(e as DragEvent);\n\n if (props.draggableDirection === Direction.X) {\n drag.delta = drag.x - drag.start;\n } else {\n drag.delta = drag.y - drag.start;\n }\n\n // prevent false positif during a toast click\n if (drag.start !== drag.x) drag.canCloseOnClick = false;\n\n toast.style.transform = `translate${props.draggableDirection}(${drag.delta}px)`;\n toast.style.opacity = `${1 -\n Math.abs(drag.delta / drag.removalDistance)}`;\n }\n }\n\n function onDragEnd() {\n const toast = toastRef.current!;\n if (drag.canDrag) {\n drag.canDrag = false;\n\n if (Math.abs(drag.delta) > drag.removalDistance) {\n setPreventExitTransition(true);\n props.closeToast();\n return;\n }\n\n toast.style.transition = 'transform 0.2s, opacity 0.2s';\n toast.style.transform = `translate${props.draggableDirection}(0)`;\n toast.style.opacity = '1';\n }\n }\n\n const eventHandlers: DOMAttributes = {\n onMouseDown: onDragStart,\n onTouchStart: onDragStart,\n onMouseUp: onDragTransitionEnd,\n onTouchEnd: onDragTransitionEnd\n };\n\n if (autoClose && pauseOnHover) {\n eventHandlers.onMouseEnter = pauseToast;\n eventHandlers.onMouseLeave = playToast;\n }\n\n // prevent toast from closing when user drags the toast\n if (closeOnClick) {\n eventHandlers.onClick = (e: React.MouseEvent) => {\n onClick && onClick(e);\n drag.canCloseOnClick && closeToast();\n };\n }\n\n return {\n playToast,\n pauseToast,\n isRunning,\n preventExitTransition,\n toastRef,\n eventHandlers\n };\n}\n","import * as React from 'react';\nimport { Default } from '../utils';\nimport { TypeOptions } from '../types';\n\nexport interface CloseButtonProps {\n closeToast: (e: React.MouseEvent) => void;\n type: TypeOptions;\n ariaLabel?: string;\n}\n\nexport function CloseButton({\n closeToast,\n type,\n ariaLabel = 'close'\n}: CloseButtonProps) {\n return (\n {\n e.stopPropagation();\n closeToast(e);\n }}\n aria-label={ariaLabel}\n >\n \n \n \n \n );\n}\n","import * as React from 'react';\nimport cx from 'clsx';\n\nimport { TYPE, Default, isFn } from './../utils';\nimport { TypeOptions, ToastClassName } from '../types';\n\nexport interface ProgressBarProps {\n /**\n * The animation delay which determine when to close the toast\n */\n delay: number;\n\n /**\n * Whether or not the animation is running or paused\n */\n isRunning: boolean;\n\n /**\n * Func to close the current toast\n */\n closeToast: () => void;\n\n /**\n * Optional type : info, success ...\n */\n type: TypeOptions;\n\n /**\n * Hide or not the progress bar\n */\n hide?: boolean;\n\n /**\n * Optionnal className\n */\n className?: ToastClassName;\n\n /**\n * Optionnal inline style\n */\n style?: React.CSSProperties;\n\n /**\n * Tell wether or not controlled progress bar is used\n */\n controlledProgress?: boolean;\n\n /**\n * Controlled progress value\n */\n progress?: number | string;\n\n /**\n * Support rtl content\n */\n rtl?: boolean;\n\n /**\n * Tell if the component is visible on screen or not\n */\n isIn?: boolean;\n}\n\nexport function ProgressBar({\n delay,\n isRunning,\n closeToast,\n type,\n hide,\n className,\n style: userStyle,\n controlledProgress,\n progress,\n rtl,\n isIn\n}: ProgressBarProps) {\n const style: React.CSSProperties = {\n ...userStyle,\n animationDuration: `${delay}ms`,\n animationPlayState: isRunning ? 'running' : 'paused',\n opacity: hide ? 0 : 1\n };\n\n if (controlledProgress) style.transform = `scaleX(${progress})`;\n const defaultClassName = cx(\n `${Default.CSS_NAMESPACE}__progress-bar`,\n controlledProgress\n ? `${Default.CSS_NAMESPACE}__progress-bar--controlled`\n : `${Default.CSS_NAMESPACE}__progress-bar--animated`,\n `${Default.CSS_NAMESPACE}__progress-bar--${type}`,\n {\n [`${Default.CSS_NAMESPACE}__progress-bar--rtl`]: rtl\n }\n );\n const classNames = isFn(className)\n ? className({\n rtl,\n type,\n defaultClassName\n })\n : cx(defaultClassName, className);\n\n // 🧐 controlledProgress is derived from progress\n // so if controlledProgress is set\n // it means that this is also the case for progress\n const animationEvent = {\n [controlledProgress && progress! >= 1\n ? 'onTransitionEnd'\n : 'onAnimationEnd']:\n controlledProgress && progress! < 1\n ? null\n : () => {\n isIn && closeToast();\n }\n };\n\n // TODO: add aria-valuenow, aria-valuemax, aria-valuemin\n\n return (\n
\n );\n}\n\nProgressBar.defaultProps = {\n type: TYPE.DEFAULT,\n hide: false\n};\n","import * as React from 'react';\nimport cx from 'clsx';\n\nimport { ProgressBar } from './ProgressBar';\nimport { ToastProps } from '../types';\nimport { Default, isFn } from '../utils';\nimport { useToast } from '../hooks';\n\nexport const Toast: React.FC = props => {\n const {\n isRunning,\n preventExitTransition,\n toastRef,\n eventHandlers\n } = useToast(props);\n const {\n closeButton,\n children,\n autoClose,\n onClick,\n type,\n hideProgressBar,\n closeToast,\n transition: Transition,\n position,\n className,\n style,\n bodyClassName,\n bodyStyle,\n progressClassName,\n progressStyle,\n updateId,\n role,\n progress,\n rtl,\n toastId,\n deleteToast,\n isIn\n } = props;\n const defaultClassName = cx(\n `${Default.CSS_NAMESPACE}__toast`,\n `${Default.CSS_NAMESPACE}__toast--${type}`,\n {\n [`${Default.CSS_NAMESPACE}__toast--rtl`]: rtl\n }\n );\n const cssClasses = isFn(className)\n ? className({\n rtl,\n position,\n type,\n defaultClassName\n })\n : cx(defaultClassName, className);\n const isProgressControlled = !!progress;\n\n function renderCloseButton(closeButton: any) {\n if (!closeButton) return;\n\n const props = { closeToast, type };\n\n if (isFn(closeButton)) return closeButton(props);\n\n if (React.isValidElement(closeButton))\n return React.cloneElement(closeButton, props);\n }\n\n return (\n \n \n
\n {children}\n
\n {renderCloseButton(closeButton)}\n {(autoClose || isProgressControlled) && (\n
\n )}\n
\n \n );\n};\n","import { Default, cssTransition } from '../utils';\n\nconst Bounce = cssTransition({\n enter: `${Default.CSS_NAMESPACE}--animate ${Default.CSS_NAMESPACE}__bounce-enter`,\n exit: `${Default.CSS_NAMESPACE}--animate ${Default.CSS_NAMESPACE}__bounce-exit`,\n appendPosition: true\n});\n\nconst Slide = cssTransition({\n enter: `${Default.CSS_NAMESPACE}--animate ${Default.CSS_NAMESPACE}__slide-enter`,\n exit: `${Default.CSS_NAMESPACE}--animate ${Default.CSS_NAMESPACE}__slide-exit`,\n appendPosition: true\n});\n\nconst Zoom = cssTransition({\n enter: `${Default.CSS_NAMESPACE}--animate ${Default.CSS_NAMESPACE}__zoom-enter`,\n exit: `${Default.CSS_NAMESPACE}--animate ${Default.CSS_NAMESPACE}__zoom-exit`\n});\n\nconst Flip = cssTransition({\n enter: `${Default.CSS_NAMESPACE}--animate ${Default.CSS_NAMESPACE}__flip-enter`,\n exit: `${Default.CSS_NAMESPACE}--animate ${Default.CSS_NAMESPACE}__flip-exit`\n});\n\nexport { Bounce, Slide, Zoom, Flip };\n","import * as React from 'react';\nimport cx from 'clsx';\n\nimport { Toast } from './Toast';\nimport { CloseButton } from './CloseButton';\nimport { Bounce } from './Transitions';\nimport { POSITION, Direction, Default, parseClassName, isFn } from '../utils';\nimport { useToastContainer } from '../hooks';\nimport { ToastContainerProps, ToastPosition } from '../types';\n\nexport const ToastContainer: React.FC = props => {\n const { getToastToRender, containerRef, isToastActive } = useToastContainer(\n props\n );\n const { className, style, rtl, containerId } = props;\n\n function getClassName(position: ToastPosition) {\n const defaultClassName = cx(\n `${Default.CSS_NAMESPACE}__toast-container`,\n `${Default.CSS_NAMESPACE}__toast-container--${position}`,\n { [`${Default.CSS_NAMESPACE}__toast-container--rtl`]: rtl }\n );\n return isFn(className)\n ? className({\n position,\n rtl,\n defaultClassName\n })\n : cx(defaultClassName, parseClassName(className));\n }\n\n return (\n \n {getToastToRender((position, toastList) => {\n const containerStyle: React.CSSProperties =\n toastList.length === 0\n ? { ...style, pointerEvents: 'none' }\n : { ...style };\n\n return (\n
\n {toastList.map(({ content, props: toastProps }) => {\n return (\n \n {content}\n \n );\n })}\n
\n );\n })}\n
\n );\n};\n\nToastContainer.defaultProps = {\n position: POSITION.TOP_RIGHT as ToastPosition,\n transition: Bounce,\n rtl: false,\n autoClose: 5000,\n hideProgressBar: false,\n closeButton: CloseButton,\n pauseOnHover: true,\n pauseOnFocusLoss: true,\n closeOnClick: true,\n newestOnTop: false,\n draggable: true,\n draggablePercent: Default.DRAGGABLE_PERCENT as number,\n draggableDirection: Direction.X,\n role: 'alert'\n};\n","import * as React from 'react';\nimport { render } from 'react-dom';\n\nimport { POSITION, TYPE, canUseDom, isStr, isNum, isFn } from '../utils';\nimport { eventManager, OnChangeCallback, Event } from './eventManager';\nimport {\n ToastContent,\n ToastOptions,\n ToastProps,\n Id,\n ToastContainerProps,\n UpdateOptions,\n ClearWaitingQueueParams,\n NotValidatedToastProps\n} from '../types';\nimport { ContainerInstance } from 'hooks';\nimport { ToastContainer } from '../components';\n\ninterface EnqueuedToast {\n content: ToastContent;\n options: NotValidatedToastProps;\n}\n\nlet containers = new Map();\nlet latestInstance: ContainerInstance | Id;\nlet containerDomNode: HTMLElement;\nlet containerConfig: ToastContainerProps;\nlet queue: EnqueuedToast[] = [];\nlet lazy = false;\n\n/**\n * Check whether any container is currently mounted in the DOM\n */\nfunction isAnyContainerMounted() {\n return containers.size > 0;\n}\n\n/**\n * Get the toast by id, given it's in the DOM, otherwise returns null\n */\nfunction getToast(toastId: Id, { containerId }: ToastOptions) {\n const container = containers.get(containerId || latestInstance);\n if (!container) return null;\n\n return container.getToast(toastId);\n}\n\n/**\n * Generate a random toastId\n */\nfunction generateToastId() {\n return Math.random()\n .toString(36)\n .substr(2, 9);\n}\n\n/**\n * Generate a toastId or use the one provided\n */\nfunction getToastId(options?: ToastOptions) {\n if (options && (isStr(options.toastId) || isNum(options.toastId))) {\n return options.toastId;\n }\n\n return generateToastId();\n}\n\n/**\n * If the container is not mounted, the toast is enqueued and\n * the container lazy mounted\n */\nfunction dispatchToast(\n content: ToastContent,\n options: NotValidatedToastProps\n): Id {\n if (isAnyContainerMounted()) {\n eventManager.emit(Event.Show, content, options);\n } else {\n queue.push({ content, options });\n if (lazy && canUseDom) {\n lazy = false;\n containerDomNode = document.createElement('div');\n document.body.appendChild(containerDomNode);\n render( , containerDomNode);\n }\n }\n\n return options.toastId;\n}\n\n/**\n * Merge provided options with the defaults settings and generate the toastId\n */\nfunction mergeOptions(type: string, options?: ToastOptions) {\n return {\n ...options,\n type: (options && options.type) || type,\n toastId: getToastId(options)\n } as NotValidatedToastProps;\n}\n\nconst createToastByType = (type: string) => (\n content: ToastContent,\n options?: ToastOptions\n) => dispatchToast(content, mergeOptions(type, options));\n\nconst toast = (content: ToastContent, options?: ToastOptions) =>\n dispatchToast(content, mergeOptions(TYPE.DEFAULT, options));\n\ntoast.success = createToastByType(TYPE.SUCCESS);\ntoast.info = createToastByType(TYPE.INFO);\ntoast.error = createToastByType(TYPE.ERROR);\ntoast.warning = createToastByType(TYPE.WARNING);\ntoast.dark = createToastByType(TYPE.DARK);\ntoast.warn = toast.warning;\n\n/**\n * Remove toast programmaticaly\n */\ntoast.dismiss = (id?: Id) => eventManager.emit(Event.Clear, id);\n\n/**\n * Clear waiting queue when limit is used\n */\ntoast.clearWaitingQueue = (params: ClearWaitingQueueParams = {}) =>\n eventManager.emit(Event.ClearWaitingQueue, params);\n\n/**\n * return true if one container is displaying the toast\n */\ntoast.isActive = (id: Id) => {\n let isToastActive = false;\n\n containers.forEach(container => {\n if (container.isToastActive && container.isToastActive(id)) {\n isToastActive = true;\n }\n });\n\n return isToastActive;\n};\n\ntoast.update = (toastId: Id, options: UpdateOptions = {}) => {\n // if you call toast and toast.update directly nothing will be displayed\n // this is why I defered the update\n setTimeout(() => {\n const toast = getToast(toastId, options as ToastOptions);\n if (toast) {\n const { props: oldOptions, content: oldContent } = toast;\n\n const nextOptions = {\n ...oldOptions,\n ...options,\n toastId: options.toastId || toastId,\n updateId: generateToastId()\n } as ToastProps & UpdateOptions;\n\n if (nextOptions.toastId !== toastId) nextOptions.staleId = toastId;\n\n const content = nextOptions.render || oldContent;\n delete nextOptions.render;\n\n dispatchToast(content, nextOptions);\n }\n }, 0);\n};\n\n/**\n * Used for controlled progress bar.\n */\ntoast.done = (id: Id) => {\n toast.update(id, {\n progress: 1\n });\n};\n\n/**\n * Track changes. The callback get the number of toast displayed\n *\n */\ntoast.onChange = (callback: OnChangeCallback) => {\n if (isFn(callback)) {\n eventManager.on(Event.Change, callback);\n }\n return () => {\n isFn(callback) && eventManager.off(Event.Change, callback);\n };\n};\n\n/**\n * Configure the ToastContainer when lazy mounted\n */\ntoast.configure = (config: ToastContainerProps = {}) => {\n lazy = true;\n containerConfig = config;\n};\n\ntoast.POSITION = POSITION;\ntoast.TYPE = TYPE;\n\n/**\n * Wait until the ToastContainer is mounted to dispatch the toast\n * and attach isActive method\n */\neventManager\n .on(Event.DidMount, (containerInstance: ContainerInstance) => {\n latestInstance = containerInstance.containerId || containerInstance;\n containers.set(latestInstance, containerInstance);\n\n queue.forEach(item => {\n eventManager.emit(Event.Show, item.content, item.options);\n });\n\n queue = [];\n })\n .on(Event.WillUnmount, (containerInstance: ContainerInstance) => {\n containers.delete(containerInstance.containerId || containerInstance);\n\n if (containers.size === 0) {\n eventManager\n .off(Event.Show)\n .off(Event.Clear)\n .off(Event.ClearWaitingQueue);\n }\n\n if (canUseDom && containerDomNode) {\n document.body.removeChild(containerDomNode);\n }\n });\n\nexport { toast };\n","/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\n\nvar extendStatics = function(d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n};\n\nexport function __extends(d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nexport var __assign = function() {\n __assign = Object.assign || function __assign(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}\n\nexport function __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n 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]))\n t[p[i]] = s[p[i]];\n }\n return t;\n}\n\nexport function __decorate(decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\n\nexport function __param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n}\n\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _, done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n if (kind === \"accessor\") {\n if (result === void 0) continue;\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.unshift(_);\n }\n else if (_ = accept(result)) {\n if (kind === \"field\") initializers.unshift(_);\n else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n};\n\nexport function __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n};\n\nexport function __propKey(x) {\n return typeof x === \"symbol\" ? x : \"\".concat(x);\n};\n\nexport function __setFunctionName(f, name, prefix) {\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n};\n\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\n\nexport function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\nexport function __generator(thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n}\n\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nexport function __exportStar(m, o) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\n\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\n\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n}\n\n/** @deprecated */\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++)\n ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n}\n\nexport function __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\n\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\n\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n}\n\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\n}\n\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n}\n\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n};\n\nvar __setModuleDefault = Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n};\n\nvar ownKeys = function(o) {\n ownKeys = Object.getOwnPropertyNames || function (o) {\n var ar = [];\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\n return ar;\n };\n return ownKeys(o);\n};\n\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\n __setModuleDefault(result, mod);\n return result;\n}\n\nexport function __importDefault(mod) {\n return (mod && mod.__esModule) ? mod : { default: mod };\n}\n\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\n\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n}\n\nexport function __classPrivateFieldIn(state, receiver) {\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\n\nexport function __addDisposableResource(env, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\n var dispose, inner;\n if (async) {\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\n dispose = value[Symbol.dispose];\n if (async) inner = dispose;\n }\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\n env.stack.push({ value: value, dispose: dispose, async: async });\n }\n else if (async) {\n env.stack.push({ async: true });\n }\n return value;\n}\n\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\nexport function __disposeResources(env) {\n function fail(e) {\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\n env.hasError = true;\n }\n var r, s = 0;\n function next() {\n while (r = env.stack.pop()) {\n try {\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\n if (r.dispose) {\n var result = r.dispose.call(r.value);\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\n }\n else s |= 1;\n }\n catch (e) {\n fail(e);\n }\n }\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\n if (env.hasError) throw env.error;\n }\n return next();\n}\n\nexport function __rewriteRelativeImportExtension(path, preserveJsx) {\n if (typeof path === \"string\" && /^\\.\\.?\\//.test(path)) {\n return path.replace(/\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+?)?)\\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {\n return tsx ? preserveJsx ? \".jsx\" : \".js\" : d && (!ext || !cm) ? m : (d + ext + \".\" + cm.toLowerCase() + \"js\");\n });\n }\n return path;\n}\n\nexport default {\n __extends,\n __assign,\n __rest,\n __decorate,\n __param,\n __esDecorate,\n __runInitializers,\n __propKey,\n __setFunctionName,\n __metadata,\n __awaiter,\n __generator,\n __createBinding,\n __exportStar,\n __values,\n __read,\n __spread,\n __spreadArrays,\n __spreadArray,\n __await,\n __asyncGenerator,\n __asyncDelegator,\n __asyncValues,\n __makeTemplateObject,\n __importStar,\n __importDefault,\n __classPrivateFieldGet,\n __classPrivateFieldSet,\n __classPrivateFieldIn,\n __addDisposableResource,\n __disposeResources,\n __rewriteRelativeImportExtension,\n};\n","import { __assign } from \"tslib\";\nimport * as React from 'react';\nimport hoistNonReactStatics from 'hoist-non-react-statics';\nimport { invariantIntlContext } from '../utils';\nfunction getDisplayName(Component) {\n return Component.displayName || Component.name || 'Component';\n}\n// TODO: We should provide initial value here\nvar IntlContext = React.createContext(null);\nvar IntlConsumer = IntlContext.Consumer, IntlProvider = IntlContext.Provider;\nexport var Provider = IntlProvider;\nexport var Context = IntlContext;\nexport default function injectIntl(WrappedComponent, options) {\n var _a = options || {}, _b = _a.intlPropName, intlPropName = _b === void 0 ? 'intl' : _b, _c = _a.forwardRef, forwardRef = _c === void 0 ? false : _c, _d = _a.enforceContext, enforceContext = _d === void 0 ? true : _d;\n var WithIntl = function (props) { return (React.createElement(IntlConsumer, null, function (intl) {\n var _a;\n if (enforceContext) {\n invariantIntlContext(intl);\n }\n var intlProp = (_a = {}, _a[intlPropName] = intl, _a);\n return (React.createElement(WrappedComponent, __assign({}, props, intlProp, { ref: forwardRef ? props.forwardedRef : null })));\n })); };\n WithIntl.displayName = \"injectIntl(\" + getDisplayName(WrappedComponent) + \")\";\n WithIntl.WrappedComponent = WrappedComponent;\n if (forwardRef) {\n return hoistNonReactStatics(React.forwardRef(function (props, ref) { return (React.createElement(WithIntl, __assign({}, props, { forwardedRef: ref }))); }), WrappedComponent);\n }\n return hoistNonReactStatics(WithIntl, WrappedComponent);\n}\n","/**\n * Cannot do Math.log(x) / Math.log(10) bc if IEEE floating point issue\n * @param x number\n */\nexport function getMagnitude(x) {\n // Cannot count string length via Number.toString because it may use scientific notation\n // for very small or very large numbers.\n return Math.floor(Math.log(x) * Math.LOG10E);\n}\nexport function repeat(s, times) {\n if (typeof s.repeat === 'function') {\n return s.repeat(times);\n }\n var arr = new Array(times);\n for (var i = 0; i < arr.length; i++) {\n arr[i] = s;\n }\n return arr.join('');\n}\nexport function setInternalSlot(map, pl, field, value) {\n if (!map.get(pl)) {\n map.set(pl, Object.create(null));\n }\n var slots = map.get(pl);\n slots[field] = value;\n}\nexport function setMultiInternalSlots(map, pl, props) {\n for (var _i = 0, _a = Object.keys(props); _i < _a.length; _i++) {\n var k = _a[_i];\n setInternalSlot(map, pl, k, props[k]);\n }\n}\nexport function getInternalSlot(map, pl, field) {\n return getMultiInternalSlots(map, pl, field)[field];\n}\nexport function getMultiInternalSlots(map, pl) {\n var fields = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n fields[_i - 2] = arguments[_i];\n }\n var slots = map.get(pl);\n if (!slots) {\n throw new TypeError(pl + \" InternalSlot has not been initialized\");\n }\n return fields.reduce(function (all, f) {\n all[f] = slots[f];\n return all;\n }, Object.create(null));\n}\nexport function isLiteralPart(patternPart) {\n return patternPart.type === 'literal';\n}\n/*\n 17 ECMAScript Standard Built-in Objects:\n Every built-in Function object, including constructors, that is not\n identified as an anonymous function has a name property whose value\n is a String.\n\n Unless otherwise specified, the name property of a built-in Function\n object, if it exists, has the attributes { [[Writable]]: false,\n [[Enumerable]]: false, [[Configurable]]: true }.\n*/\nexport function defineProperty(target, name, _a) {\n var value = _a.value;\n Object.defineProperty(target, name, {\n configurable: true,\n enumerable: false,\n writable: true,\n value: value,\n });\n}\nexport var UNICODE_EXTENSION_SEQUENCE_REGEX = /-u(?:-[0-9a-z]{2,8})+/gi;\nexport function invariant(condition, message, Err) {\n if (Err === void 0) { Err = Error; }\n if (!condition) {\n throw new Err(message);\n }\n}\n","export var TYPE;\n(function (TYPE) {\n /**\n * Raw text\n */\n TYPE[TYPE[\"literal\"] = 0] = \"literal\";\n /**\n * Variable w/o any format, e.g `var` in `this is a {var}`\n */\n TYPE[TYPE[\"argument\"] = 1] = \"argument\";\n /**\n * Variable w/ number format\n */\n TYPE[TYPE[\"number\"] = 2] = \"number\";\n /**\n * Variable w/ date format\n */\n TYPE[TYPE[\"date\"] = 3] = \"date\";\n /**\n * Variable w/ time format\n */\n TYPE[TYPE[\"time\"] = 4] = \"time\";\n /**\n * Variable w/ select format\n */\n TYPE[TYPE[\"select\"] = 5] = \"select\";\n /**\n * Variable w/ plural format\n */\n TYPE[TYPE[\"plural\"] = 6] = \"plural\";\n /**\n * Only possible within plural argument.\n * This is the `#` symbol that will be substituted with the count.\n */\n TYPE[TYPE[\"pound\"] = 7] = \"pound\";\n /**\n * XML-like tag\n */\n TYPE[TYPE[\"tag\"] = 8] = \"tag\";\n})(TYPE || (TYPE = {}));\nexport var SKELETON_TYPE;\n(function (SKELETON_TYPE) {\n SKELETON_TYPE[SKELETON_TYPE[\"number\"] = 0] = \"number\";\n SKELETON_TYPE[SKELETON_TYPE[\"dateTime\"] = 1] = \"dateTime\";\n})(SKELETON_TYPE || (SKELETON_TYPE = {}));\n/**\n * Type Guards\n */\nexport function isLiteralElement(el) {\n return el.type === TYPE.literal;\n}\nexport function isArgumentElement(el) {\n return el.type === TYPE.argument;\n}\nexport function isNumberElement(el) {\n return el.type === TYPE.number;\n}\nexport function isDateElement(el) {\n return el.type === TYPE.date;\n}\nexport function isTimeElement(el) {\n return el.type === TYPE.time;\n}\nexport function isSelectElement(el) {\n return el.type === TYPE.select;\n}\nexport function isPluralElement(el) {\n return el.type === TYPE.plural;\n}\nexport function isPoundElement(el) {\n return el.type === TYPE.pound;\n}\nexport function isTagElement(el) {\n return el.type === TYPE.tag;\n}\nexport function isNumberSkeleton(el) {\n return !!(el && typeof el === 'object' && el.type === SKELETON_TYPE.number);\n}\nexport function isDateTimeSkeleton(el) {\n return !!(el && typeof el === 'object' && el.type === SKELETON_TYPE.dateTime);\n}\nexport function createLiteralElement(value) {\n return {\n type: TYPE.literal,\n value: value,\n };\n}\nexport function createNumberElement(value, style) {\n return {\n type: TYPE.number,\n value: value,\n style: style,\n };\n}\n","import { __assign } from \"tslib\";\n/**\n * https://unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table\n * Credit: https://github.com/caridy/intl-datetimeformat-pattern/blob/master/index.js\n * with some tweaks\n */\nvar DATE_TIME_REGEX = /(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;\n/**\n * Parse Date time skeleton into Intl.DateTimeFormatOptions\n * Ref: https://unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table\n * @public\n * @param skeleton skeleton string\n */\nexport function parseDateTimeSkeleton(skeleton) {\n var result = {};\n skeleton.replace(DATE_TIME_REGEX, function (match) {\n var len = match.length;\n switch (match[0]) {\n // Era\n case 'G':\n result.era = len === 4 ? 'long' : len === 5 ? 'narrow' : 'short';\n break;\n // Year\n case 'y':\n result.year = len === 2 ? '2-digit' : 'numeric';\n break;\n case 'Y':\n case 'u':\n case 'U':\n case 'r':\n throw new RangeError('`Y/u/U/r` (year) patterns are not supported, use `y` instead');\n // Quarter\n case 'q':\n case 'Q':\n throw new RangeError('`q/Q` (quarter) patterns are not supported');\n // Month\n case 'M':\n case 'L':\n result.month = ['numeric', '2-digit', 'short', 'long', 'narrow'][len - 1];\n break;\n // Week\n case 'w':\n case 'W':\n throw new RangeError('`w/W` (week) patterns are not supported');\n case 'd':\n result.day = ['numeric', '2-digit'][len - 1];\n break;\n case 'D':\n case 'F':\n case 'g':\n throw new RangeError('`D/F/g` (day) patterns are not supported, use `d` instead');\n // Weekday\n case 'E':\n result.weekday = len === 4 ? 'short' : len === 5 ? 'narrow' : 'short';\n break;\n case 'e':\n if (len < 4) {\n throw new RangeError('`e..eee` (weekday) patterns are not supported');\n }\n result.weekday = ['short', 'long', 'narrow', 'short'][len - 4];\n break;\n case 'c':\n if (len < 4) {\n throw new RangeError('`c..ccc` (weekday) patterns are not supported');\n }\n result.weekday = ['short', 'long', 'narrow', 'short'][len - 4];\n break;\n // Period\n case 'a': // AM, PM\n result.hour12 = true;\n break;\n case 'b': // am, pm, noon, midnight\n case 'B': // flexible day periods\n throw new RangeError('`b/B` (period) patterns are not supported, use `a` instead');\n // Hour\n case 'h':\n result.hourCycle = 'h12';\n result.hour = ['numeric', '2-digit'][len - 1];\n break;\n case 'H':\n result.hourCycle = 'h23';\n result.hour = ['numeric', '2-digit'][len - 1];\n break;\n case 'K':\n result.hourCycle = 'h11';\n result.hour = ['numeric', '2-digit'][len - 1];\n break;\n case 'k':\n result.hourCycle = 'h24';\n result.hour = ['numeric', '2-digit'][len - 1];\n break;\n case 'j':\n case 'J':\n case 'C':\n throw new RangeError('`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead');\n // Minute\n case 'm':\n result.minute = ['numeric', '2-digit'][len - 1];\n break;\n // Second\n case 's':\n result.second = ['numeric', '2-digit'][len - 1];\n break;\n case 'S':\n case 'A':\n throw new RangeError('`S/A` (second) patterns are not supported, use `s` instead');\n // Zone\n case 'z': // 1..3, 4: specific non-location format\n result.timeZoneName = len < 4 ? 'short' : 'long';\n break;\n case 'Z': // 1..3, 4, 5: The ISO8601 varios formats\n case 'O': // 1, 4: miliseconds in day short, long\n case 'v': // 1, 4: generic non-location format\n case 'V': // 1, 2, 3, 4: time zone ID or city\n case 'X': // 1, 2, 3, 4: The ISO8601 varios formats\n case 'x': // 1, 2, 3, 4: The ISO8601 varios formats\n throw new RangeError('`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead');\n }\n return '';\n });\n return result;\n}\nfunction icuUnitToEcma(unit) {\n return unit.replace(/^(.*?)-/, '');\n}\nvar FRACTION_PRECISION_REGEX = /^\\.(?:(0+)(\\*)?|(#+)|(0+)(#+))$/g;\nvar SIGNIFICANT_PRECISION_REGEX = /^(@+)?(\\+|#+)?$/g;\nvar INTEGER_WIDTH_REGEX = /(\\*)(0+)|(#+)(0+)|(0+)/g;\nvar CONCISE_INTEGER_WIDTH_REGEX = /^(0+)$/;\nfunction parseSignificantPrecision(str) {\n var result = {};\n str.replace(SIGNIFICANT_PRECISION_REGEX, function (_, g1, g2) {\n // @@@ case\n if (typeof g2 !== 'string') {\n result.minimumSignificantDigits = g1.length;\n result.maximumSignificantDigits = g1.length;\n }\n // @@@+ case\n else if (g2 === '+') {\n result.minimumSignificantDigits = g1.length;\n }\n // .### case\n else if (g1[0] === '#') {\n result.maximumSignificantDigits = g1.length;\n }\n // .@@## or .@@@ case\n else {\n result.minimumSignificantDigits = g1.length;\n result.maximumSignificantDigits =\n g1.length + (typeof g2 === 'string' ? g2.length : 0);\n }\n return '';\n });\n return result;\n}\nfunction parseSign(str) {\n switch (str) {\n case 'sign-auto':\n return {\n signDisplay: 'auto',\n };\n case 'sign-accounting':\n case '()':\n return {\n currencySign: 'accounting',\n };\n case 'sign-always':\n case '+!':\n return {\n signDisplay: 'always',\n };\n case 'sign-accounting-always':\n case '()!':\n return {\n signDisplay: 'always',\n currencySign: 'accounting',\n };\n case 'sign-except-zero':\n case '+?':\n return {\n signDisplay: 'exceptZero',\n };\n case 'sign-accounting-except-zero':\n case '()?':\n return {\n signDisplay: 'exceptZero',\n currencySign: 'accounting',\n };\n case 'sign-never':\n case '+_':\n return {\n signDisplay: 'never',\n };\n }\n}\nfunction parseConciseScientificAndEngineeringStem(stem) {\n // Engineering\n var result;\n if (stem[0] === 'E' && stem[1] === 'E') {\n result = {\n notation: 'engineering',\n };\n stem = stem.slice(2);\n }\n else if (stem[0] === 'E') {\n result = {\n notation: 'scientific',\n };\n stem = stem.slice(1);\n }\n if (result) {\n var signDisplay = stem.slice(0, 2);\n if (signDisplay === '+!') {\n result.signDisplay = 'always';\n stem = stem.slice(2);\n }\n else if (signDisplay === '+?') {\n result.signDisplay = 'exceptZero';\n stem = stem.slice(2);\n }\n if (!CONCISE_INTEGER_WIDTH_REGEX.test(stem)) {\n throw new Error('Malformed concise eng/scientific notation');\n }\n result.minimumIntegerDigits = stem.length;\n }\n return result;\n}\nfunction parseNotationOptions(opt) {\n var result = {};\n var signOpts = parseSign(opt);\n if (signOpts) {\n return signOpts;\n }\n return result;\n}\n/**\n * https://github.com/unicode-org/icu/blob/master/docs/userguide/format_parse/numbers/skeletons.md#skeleton-stems-and-options\n */\nexport function parseNumberSkeleton(tokens) {\n var result = {};\n for (var _i = 0, tokens_1 = tokens; _i < tokens_1.length; _i++) {\n var token = tokens_1[_i];\n switch (token.stem) {\n case 'percent':\n case '%':\n result.style = 'percent';\n continue;\n case '%x100':\n result.style = 'percent';\n result.scale = 100;\n continue;\n case 'currency':\n result.style = 'currency';\n result.currency = token.options[0];\n continue;\n case 'group-off':\n case ',_':\n result.useGrouping = false;\n continue;\n case 'precision-integer':\n case '.':\n result.maximumFractionDigits = 0;\n continue;\n case 'measure-unit':\n case 'unit':\n result.style = 'unit';\n result.unit = icuUnitToEcma(token.options[0]);\n continue;\n case 'compact-short':\n case 'K':\n result.notation = 'compact';\n result.compactDisplay = 'short';\n continue;\n case 'compact-long':\n case 'KK':\n result.notation = 'compact';\n result.compactDisplay = 'long';\n continue;\n case 'scientific':\n result = __assign(__assign(__assign({}, result), { notation: 'scientific' }), token.options.reduce(function (all, opt) { return (__assign(__assign({}, all), parseNotationOptions(opt))); }, {}));\n continue;\n case 'engineering':\n result = __assign(__assign(__assign({}, result), { notation: 'engineering' }), token.options.reduce(function (all, opt) { return (__assign(__assign({}, all), parseNotationOptions(opt))); }, {}));\n continue;\n case 'notation-simple':\n result.notation = 'standard';\n continue;\n // https://github.com/unicode-org/icu/blob/master/icu4c/source/i18n/unicode/unumberformatter.h\n case 'unit-width-narrow':\n result.currencyDisplay = 'narrowSymbol';\n result.unitDisplay = 'narrow';\n continue;\n case 'unit-width-short':\n result.currencyDisplay = 'code';\n result.unitDisplay = 'short';\n continue;\n case 'unit-width-full-name':\n result.currencyDisplay = 'name';\n result.unitDisplay = 'long';\n continue;\n case 'unit-width-iso-code':\n result.currencyDisplay = 'symbol';\n continue;\n case 'scale':\n result.scale = parseFloat(token.options[0]);\n continue;\n // https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#integer-width\n case 'integer-width':\n if (token.options.length > 1) {\n throw new RangeError('integer-width stems only accept a single optional option');\n }\n token.options[0].replace(INTEGER_WIDTH_REGEX, function (_, g1, g2, g3, g4, g5) {\n if (g1) {\n result.minimumIntegerDigits = g2.length;\n }\n else if (g3 && g4) {\n throw new Error('We currently do not support maximum integer digits');\n }\n else if (g5) {\n throw new Error('We currently do not support exact integer digits');\n }\n return '';\n });\n continue;\n }\n // https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#integer-width\n if (CONCISE_INTEGER_WIDTH_REGEX.test(token.stem)) {\n result.minimumIntegerDigits = token.stem.length;\n continue;\n }\n if (FRACTION_PRECISION_REGEX.test(token.stem)) {\n // Precision\n // https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#fraction-precision\n // precision-integer case\n if (token.options.length > 1) {\n throw new RangeError('Fraction-precision stems only accept a single optional option');\n }\n token.stem.replace(FRACTION_PRECISION_REGEX, function (_, g1, g2, g3, g4, g5) {\n // .000* case (before ICU67 it was .000+)\n if (g2 === '*') {\n result.minimumFractionDigits = g1.length;\n }\n // .### case\n else if (g3 && g3[0] === '#') {\n result.maximumFractionDigits = g3.length;\n }\n // .00## case\n else if (g4 && g5) {\n result.minimumFractionDigits = g4.length;\n result.maximumFractionDigits = g4.length + g5.length;\n }\n else {\n result.minimumFractionDigits = g1.length;\n result.maximumFractionDigits = g1.length;\n }\n return '';\n });\n if (token.options.length) {\n result = __assign(__assign({}, result), parseSignificantPrecision(token.options[0]));\n }\n continue;\n }\n // https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#significant-digits-precision\n if (SIGNIFICANT_PRECISION_REGEX.test(token.stem)) {\n result = __assign(__assign({}, result), parseSignificantPrecision(token.stem));\n continue;\n }\n var signOpts = parseSign(token.stem);\n if (signOpts) {\n result = __assign(__assign({}, result), signOpts);\n }\n var conciseScientificAndEngineeringOpts = parseConciseScientificAndEngineeringStem(token.stem);\n if (conciseScientificAndEngineeringOpts) {\n result = __assign(__assign({}, result), conciseScientificAndEngineeringOpts);\n }\n }\n return result;\n}\n","// @ts-nocheck\nimport { __assign, __extends } from \"tslib\";\n// @generated\nimport { SKELETON_TYPE, TYPE, } from './types';\nimport { parseDateTimeSkeleton, parseNumberSkeleton } from './skeleton';\nvar SyntaxError = /** @class */ (function (_super) {\n __extends(SyntaxError, _super);\n function SyntaxError(message, expected, found, location) {\n var _this = _super.call(this) || this;\n _this.message = message;\n _this.expected = expected;\n _this.found = found;\n _this.location = location;\n _this.name = \"SyntaxError\";\n if (typeof Error.captureStackTrace === \"function\") {\n Error.captureStackTrace(_this, SyntaxError);\n }\n return _this;\n }\n SyntaxError.buildMessage = function (expected, found) {\n function hex(ch) {\n return ch.charCodeAt(0).toString(16).toUpperCase();\n }\n function literalEscape(s) {\n return s\n .replace(/\\\\/g, \"\\\\\\\\\")\n .replace(/\"/g, \"\\\\\\\"\")\n .replace(/\\0/g, \"\\\\0\")\n .replace(/\\t/g, \"\\\\t\")\n .replace(/\\n/g, \"\\\\n\")\n .replace(/\\r/g, \"\\\\r\")\n .replace(/[\\x00-\\x0F]/g, function (ch) { return \"\\\\x0\" + hex(ch); })\n .replace(/[\\x10-\\x1F\\x7F-\\x9F]/g, function (ch) { return \"\\\\x\" + hex(ch); });\n }\n function classEscape(s) {\n return s\n .replace(/\\\\/g, \"\\\\\\\\\")\n .replace(/\\]/g, \"\\\\]\")\n .replace(/\\^/g, \"\\\\^\")\n .replace(/-/g, \"\\\\-\")\n .replace(/\\0/g, \"\\\\0\")\n .replace(/\\t/g, \"\\\\t\")\n .replace(/\\n/g, \"\\\\n\")\n .replace(/\\r/g, \"\\\\r\")\n .replace(/[\\x00-\\x0F]/g, function (ch) { return \"\\\\x0\" + hex(ch); })\n .replace(/[\\x10-\\x1F\\x7F-\\x9F]/g, function (ch) { return \"\\\\x\" + hex(ch); });\n }\n function describeExpectation(expectation) {\n switch (expectation.type) {\n case \"literal\":\n return \"\\\"\" + literalEscape(expectation.text) + \"\\\"\";\n case \"class\":\n var escapedParts = expectation.parts.map(function (part) {\n return Array.isArray(part)\n ? classEscape(part[0]) + \"-\" + classEscape(part[1])\n : classEscape(part);\n });\n return \"[\" + (expectation.inverted ? \"^\" : \"\") + escapedParts + \"]\";\n case \"any\":\n return \"any character\";\n case \"end\":\n return \"end of input\";\n case \"other\":\n return expectation.description;\n }\n }\n function describeExpected(expected1) {\n var descriptions = expected1.map(describeExpectation);\n var i;\n var j;\n descriptions.sort();\n if (descriptions.length > 0) {\n for (i = 1, j = 1; i < descriptions.length; i++) {\n if (descriptions[i - 1] !== descriptions[i]) {\n descriptions[j] = descriptions[i];\n j++;\n }\n }\n descriptions.length = j;\n }\n switch (descriptions.length) {\n case 1:\n return descriptions[0];\n case 2:\n return descriptions[0] + \" or \" + descriptions[1];\n default:\n return descriptions.slice(0, -1).join(\", \")\n + \", or \"\n + descriptions[descriptions.length - 1];\n }\n }\n function describeFound(found1) {\n return found1 ? \"\\\"\" + literalEscape(found1) + \"\\\"\" : \"end of input\";\n }\n return \"Expected \" + describeExpected(expected) + \" but \" + describeFound(found) + \" found.\";\n };\n return SyntaxError;\n}(Error));\nexport { SyntaxError };\nfunction peg$parse(input, options) {\n options = options !== undefined ? options : {};\n var peg$FAILED = {};\n var peg$startRuleFunctions = { start: peg$parsestart };\n var peg$startRuleFunction = peg$parsestart;\n var peg$c0 = function () { return !ignoreTag; };\n var peg$c1 = function (x) { return x; };\n var peg$c2 = function () { return ignoreTag; };\n var peg$c3 = \"<\";\n var peg$c4 = peg$literalExpectation(\"<\", false);\n var peg$c5 = function (parts) {\n return parts.join('');\n };\n var peg$c6 = function () { return '<'; };\n var peg$c7 = function (messageText) {\n return __assign({ type: TYPE.literal, value: messageText }, insertLocation());\n };\n var peg$c8 = \"#\";\n var peg$c9 = peg$literalExpectation(\"#\", false);\n var peg$c10 = function () {\n return __assign({ type: TYPE.pound }, insertLocation());\n };\n var peg$c11 = peg$otherExpectation(\"tagElement\");\n var peg$c12 = function (open, children, close) {\n if (open !== close) {\n error(\"Mismatch tag \\\"\" + open + \"\\\" !== \\\"\" + close + \"\\\"\", location());\n }\n return __assign({ type: TYPE.tag, value: open, children: children }, insertLocation());\n };\n var peg$c13 = \"/>\";\n var peg$c14 = peg$literalExpectation(\"/>\", false);\n var peg$c15 = function (value) {\n return __assign({ type: TYPE.literal, value: value.join('') }, insertLocation());\n };\n var peg$c16 = \">\";\n var peg$c17 = peg$literalExpectation(\">\", false);\n var peg$c18 = function (tag) { return tag; };\n var peg$c19 = \"\";\n var peg$c20 = peg$literalExpectation(\"\", false);\n var peg$c21 = peg$otherExpectation(\"argumentElement\");\n var peg$c22 = \"{\";\n var peg$c23 = peg$literalExpectation(\"{\", false);\n var peg$c24 = \"}\";\n var peg$c25 = peg$literalExpectation(\"}\", false);\n var peg$c26 = function (value) {\n return __assign({ type: TYPE.argument, value: value }, insertLocation());\n };\n var peg$c27 = peg$otherExpectation(\"numberSkeletonId\");\n var peg$c28 = /^['\\/{}]/;\n var peg$c29 = peg$classExpectation([\"'\", \"/\", \"{\", \"}\"], false, false);\n var peg$c30 = peg$anyExpectation();\n var peg$c31 = peg$otherExpectation(\"numberSkeletonTokenOption\");\n var peg$c32 = \"/\";\n var peg$c33 = peg$literalExpectation(\"/\", false);\n var peg$c34 = function (option) { return option; };\n var peg$c35 = peg$otherExpectation(\"numberSkeletonToken\");\n var peg$c36 = function (stem, options) {\n return { stem: stem, options: options };\n };\n var peg$c37 = function (tokens) {\n return __assign({ type: SKELETON_TYPE.number, tokens: tokens, parsedOptions: shouldParseSkeleton ? parseNumberSkeleton(tokens) : {} }, insertLocation());\n };\n var peg$c38 = \"::\";\n var peg$c39 = peg$literalExpectation(\"::\", false);\n var peg$c40 = function (skeleton) { return skeleton; };\n var peg$c41 = function () { messageCtx.push('numberArgStyle'); return true; };\n var peg$c42 = function (style) {\n messageCtx.pop();\n return style.replace(/\\s*$/, '');\n };\n var peg$c43 = \",\";\n var peg$c44 = peg$literalExpectation(\",\", false);\n var peg$c45 = \"number\";\n var peg$c46 = peg$literalExpectation(\"number\", false);\n var peg$c47 = function (value, type, style) {\n return __assign({ type: type === 'number' ? TYPE.number : type === 'date' ? TYPE.date : TYPE.time, style: style && style[2], value: value }, insertLocation());\n };\n var peg$c48 = \"'\";\n var peg$c49 = peg$literalExpectation(\"'\", false);\n var peg$c50 = /^[^']/;\n var peg$c51 = peg$classExpectation([\"'\"], true, false);\n var peg$c52 = /^[^a-zA-Z'{}]/;\n var peg$c53 = peg$classExpectation([[\"a\", \"z\"], [\"A\", \"Z\"], \"'\", \"{\", \"}\"], true, false);\n var peg$c54 = /^[a-zA-Z]/;\n var peg$c55 = peg$classExpectation([[\"a\", \"z\"], [\"A\", \"Z\"]], false, false);\n var peg$c56 = function (pattern) {\n return __assign({ type: SKELETON_TYPE.dateTime, pattern: pattern, parsedOptions: shouldParseSkeleton ? parseDateTimeSkeleton(pattern) : {} }, insertLocation());\n };\n var peg$c57 = function () { messageCtx.push('dateOrTimeArgStyle'); return true; };\n var peg$c58 = \"date\";\n var peg$c59 = peg$literalExpectation(\"date\", false);\n var peg$c60 = \"time\";\n var peg$c61 = peg$literalExpectation(\"time\", false);\n var peg$c62 = \"plural\";\n var peg$c63 = peg$literalExpectation(\"plural\", false);\n var peg$c64 = \"selectordinal\";\n var peg$c65 = peg$literalExpectation(\"selectordinal\", false);\n var peg$c66 = \"offset:\";\n var peg$c67 = peg$literalExpectation(\"offset:\", false);\n var peg$c68 = function (value, pluralType, offset, options) {\n return __assign({ type: TYPE.plural, pluralType: pluralType === 'plural' ? 'cardinal' : 'ordinal', value: value, offset: offset ? offset[2] : 0, options: options.reduce(function (all, _a) {\n var id = _a.id, value = _a.value, optionLocation = _a.location;\n if (id in all) {\n error(\"Duplicate option \\\"\" + id + \"\\\" in plural element: \\\"\" + text() + \"\\\"\", location());\n }\n all[id] = {\n value: value,\n location: optionLocation\n };\n return all;\n }, {}) }, insertLocation());\n };\n var peg$c69 = \"select\";\n var peg$c70 = peg$literalExpectation(\"select\", false);\n var peg$c71 = function (value, options) {\n return __assign({ type: TYPE.select, value: value, options: options.reduce(function (all, _a) {\n var id = _a.id, value = _a.value, optionLocation = _a.location;\n if (id in all) {\n error(\"Duplicate option \\\"\" + id + \"\\\" in select element: \\\"\" + text() + \"\\\"\", location());\n }\n all[id] = {\n value: value,\n location: optionLocation\n };\n return all;\n }, {}) }, insertLocation());\n };\n var peg$c72 = \"=\";\n var peg$c73 = peg$literalExpectation(\"=\", false);\n var peg$c74 = function (id) { messageCtx.push('select'); return true; };\n var peg$c75 = function (id, value) {\n messageCtx.pop();\n return __assign({ id: id,\n value: value }, insertLocation());\n };\n var peg$c76 = function (id) { messageCtx.push('plural'); return true; };\n var peg$c77 = function (id, value) {\n messageCtx.pop();\n return __assign({ id: id,\n value: value }, insertLocation());\n };\n var peg$c78 = peg$otherExpectation(\"whitespace\");\n var peg$c79 = /^[\\t-\\r \\x85\\xA0\\u1680\\u2000-\\u200A\\u2028\\u2029\\u202F\\u205F\\u3000]/;\n var peg$c80 = peg$classExpectation([[\"\\t\", \"\\r\"], \" \", \"\\x85\", \"\\xA0\", \"\\u1680\", [\"\\u2000\", \"\\u200A\"], \"\\u2028\", \"\\u2029\", \"\\u202F\", \"\\u205F\", \"\\u3000\"], false, false);\n var peg$c81 = peg$otherExpectation(\"syntax pattern\");\n var peg$c82 = /^[!-\\/:-@[-\\^`{-~\\xA1-\\xA7\\xA9\\xAB\\xAC\\xAE\\xB0\\xB1\\xB6\\xBB\\xBF\\xD7\\xF7\\u2010-\\u2027\\u2030-\\u203E\\u2041-\\u2053\\u2055-\\u205E\\u2190-\\u245F\\u2500-\\u2775\\u2794-\\u2BFF\\u2E00-\\u2E7F\\u3001-\\u3003\\u3008-\\u3020\\u3030\\uFD3E\\uFD3F\\uFE45\\uFE46]/;\n var peg$c83 = peg$classExpectation([[\"!\", \"/\"], [\":\", \"@\"], [\"[\", \"^\"], \"`\", [\"{\", \"~\"], [\"\\xA1\", \"\\xA7\"], \"\\xA9\", \"\\xAB\", \"\\xAC\", \"\\xAE\", \"\\xB0\", \"\\xB1\", \"\\xB6\", \"\\xBB\", \"\\xBF\", \"\\xD7\", \"\\xF7\", [\"\\u2010\", \"\\u2027\"], [\"\\u2030\", \"\\u203E\"], [\"\\u2041\", \"\\u2053\"], [\"\\u2055\", \"\\u205E\"], [\"\\u2190\", \"\\u245F\"], [\"\\u2500\", \"\\u2775\"], [\"\\u2794\", \"\\u2BFF\"], [\"\\u2E00\", \"\\u2E7F\"], [\"\\u3001\", \"\\u3003\"], [\"\\u3008\", \"\\u3020\"], \"\\u3030\", \"\\uFD3E\", \"\\uFD3F\", \"\\uFE45\", \"\\uFE46\"], false, false);\n var peg$c84 = peg$otherExpectation(\"optional whitespace\");\n var peg$c85 = peg$otherExpectation(\"number\");\n var peg$c86 = \"-\";\n var peg$c87 = peg$literalExpectation(\"-\", false);\n var peg$c88 = function (negative, num) {\n return num\n ? negative\n ? -num\n : num\n : 0;\n };\n var peg$c89 = peg$otherExpectation(\"apostrophe\");\n var peg$c90 = peg$otherExpectation(\"double apostrophes\");\n var peg$c91 = \"''\";\n var peg$c92 = peg$literalExpectation(\"''\", false);\n var peg$c93 = function () { return \"'\"; };\n var peg$c94 = function (escapedChar, quotedChars) {\n return escapedChar + quotedChars.replace(\"''\", \"'\");\n };\n var peg$c95 = function (x) {\n return (x !== '<' &&\n x !== '{' &&\n !(isInPluralOption() && x === '#') &&\n !(isNestedMessageText() && x === '}'));\n };\n var peg$c96 = \"\\n\";\n var peg$c97 = peg$literalExpectation(\"\\n\", false);\n var peg$c98 = function (x) {\n return x === '<' || x === '>' || x === '{' || x === '}' || (isInPluralOption() && x === '#');\n };\n var peg$c99 = peg$otherExpectation(\"argNameOrNumber\");\n var peg$c100 = peg$otherExpectation(\"validTag\");\n var peg$c101 = peg$otherExpectation(\"argNumber\");\n var peg$c102 = \"0\";\n var peg$c103 = peg$literalExpectation(\"0\", false);\n var peg$c104 = function () { return 0; };\n var peg$c105 = /^[1-9]/;\n var peg$c106 = peg$classExpectation([[\"1\", \"9\"]], false, false);\n var peg$c107 = /^[0-9]/;\n var peg$c108 = peg$classExpectation([[\"0\", \"9\"]], false, false);\n var peg$c109 = function (digits) {\n return parseInt(digits.join(''), 10);\n };\n var peg$c110 = peg$otherExpectation(\"argName\");\n var peg$c111 = peg$otherExpectation(\"tagName\");\n var peg$currPos = 0;\n var peg$savedPos = 0;\n var peg$posDetailsCache = [{ line: 1, column: 1 }];\n var peg$maxFailPos = 0;\n var peg$maxFailExpected = [];\n var peg$silentFails = 0;\n var peg$result;\n if (options.startRule !== undefined) {\n if (!(options.startRule in peg$startRuleFunctions)) {\n throw new Error(\"Can't start parsing from rule \\\"\" + options.startRule + \"\\\".\");\n }\n peg$startRuleFunction = peg$startRuleFunctions[options.startRule];\n }\n function text() {\n return input.substring(peg$savedPos, peg$currPos);\n }\n function location() {\n return peg$computeLocation(peg$savedPos, peg$currPos);\n }\n function expected(description, location1) {\n location1 = location1 !== undefined\n ? location1\n : peg$computeLocation(peg$savedPos, peg$currPos);\n throw peg$buildStructuredError([peg$otherExpectation(description)], input.substring(peg$savedPos, peg$currPos), location1);\n }\n function error(message, location1) {\n location1 = location1 !== undefined\n ? location1\n : peg$computeLocation(peg$savedPos, peg$currPos);\n throw peg$buildSimpleError(message, location1);\n }\n function peg$literalExpectation(text1, ignoreCase) {\n return { type: \"literal\", text: text1, ignoreCase: ignoreCase };\n }\n function peg$classExpectation(parts, inverted, ignoreCase) {\n return { type: \"class\", parts: parts, inverted: inverted, ignoreCase: ignoreCase };\n }\n function peg$anyExpectation() {\n return { type: \"any\" };\n }\n function peg$endExpectation() {\n return { type: \"end\" };\n }\n function peg$otherExpectation(description) {\n return { type: \"other\", description: description };\n }\n function peg$computePosDetails(pos) {\n var details = peg$posDetailsCache[pos];\n var p;\n if (details) {\n return details;\n }\n else {\n p = pos - 1;\n while (!peg$posDetailsCache[p]) {\n p--;\n }\n details = peg$posDetailsCache[p];\n details = {\n line: details.line,\n column: details.column\n };\n while (p < pos) {\n if (input.charCodeAt(p) === 10) {\n details.line++;\n details.column = 1;\n }\n else {\n details.column++;\n }\n p++;\n }\n peg$posDetailsCache[pos] = details;\n return details;\n }\n }\n function peg$computeLocation(startPos, endPos) {\n var startPosDetails = peg$computePosDetails(startPos);\n var endPosDetails = peg$computePosDetails(endPos);\n return {\n start: {\n offset: startPos,\n line: startPosDetails.line,\n column: startPosDetails.column\n },\n end: {\n offset: endPos,\n line: endPosDetails.line,\n column: endPosDetails.column\n }\n };\n }\n function peg$fail(expected1) {\n if (peg$currPos < peg$maxFailPos) {\n return;\n }\n if (peg$currPos > peg$maxFailPos) {\n peg$maxFailPos = peg$currPos;\n peg$maxFailExpected = [];\n }\n peg$maxFailExpected.push(expected1);\n }\n function peg$buildSimpleError(message, location1) {\n return new SyntaxError(message, [], \"\", location1);\n }\n function peg$buildStructuredError(expected1, found, location1) {\n return new SyntaxError(SyntaxError.buildMessage(expected1, found), expected1, found, location1);\n }\n function peg$parsestart() {\n var s0;\n s0 = peg$parsemessage();\n return s0;\n }\n function peg$parsemessage() {\n var s0, s1;\n s0 = [];\n s1 = peg$parsemessageElement();\n while (s1 !== peg$FAILED) {\n s0.push(s1);\n s1 = peg$parsemessageElement();\n }\n return s0;\n }\n function peg$parsemessageElement() {\n var s0, s1, s2;\n s0 = peg$currPos;\n peg$savedPos = peg$currPos;\n s1 = peg$c0();\n if (s1) {\n s1 = undefined;\n }\n else {\n s1 = peg$FAILED;\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parsetagElement();\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c1(s2);\n s0 = s1;\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$parseliteralElement();\n if (s0 === peg$FAILED) {\n s0 = peg$parseargumentElement();\n if (s0 === peg$FAILED) {\n s0 = peg$parsesimpleFormatElement();\n if (s0 === peg$FAILED) {\n s0 = peg$parsepluralElement();\n if (s0 === peg$FAILED) {\n s0 = peg$parseselectElement();\n if (s0 === peg$FAILED) {\n s0 = peg$parsepoundElement();\n }\n }\n }\n }\n }\n }\n return s0;\n }\n function peg$parsemessageText() {\n var s0, s1, s2, s3;\n s0 = peg$currPos;\n peg$savedPos = peg$currPos;\n s1 = peg$c2();\n if (s1) {\n s1 = undefined;\n }\n else {\n s1 = peg$FAILED;\n }\n if (s1 !== peg$FAILED) {\n s2 = [];\n s3 = peg$parsedoubleApostrophes();\n if (s3 === peg$FAILED) {\n s3 = peg$parsequotedString();\n if (s3 === peg$FAILED) {\n s3 = peg$parseunquotedString();\n if (s3 === peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 60) {\n s3 = peg$c3;\n peg$currPos++;\n }\n else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c4);\n }\n }\n }\n }\n }\n if (s3 !== peg$FAILED) {\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n s3 = peg$parsedoubleApostrophes();\n if (s3 === peg$FAILED) {\n s3 = peg$parsequotedString();\n if (s3 === peg$FAILED) {\n s3 = peg$parseunquotedString();\n if (s3 === peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 60) {\n s3 = peg$c3;\n peg$currPos++;\n }\n else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c4);\n }\n }\n }\n }\n }\n }\n }\n else {\n s2 = peg$FAILED;\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c5(s2);\n s0 = s1;\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = [];\n s2 = peg$parsedoubleApostrophes();\n if (s2 === peg$FAILED) {\n s2 = peg$parsequotedString();\n if (s2 === peg$FAILED) {\n s2 = peg$parseunquotedString();\n if (s2 === peg$FAILED) {\n s2 = peg$parsenonTagStartingAngleBracket();\n }\n }\n }\n if (s2 !== peg$FAILED) {\n while (s2 !== peg$FAILED) {\n s1.push(s2);\n s2 = peg$parsedoubleApostrophes();\n if (s2 === peg$FAILED) {\n s2 = peg$parsequotedString();\n if (s2 === peg$FAILED) {\n s2 = peg$parseunquotedString();\n if (s2 === peg$FAILED) {\n s2 = peg$parsenonTagStartingAngleBracket();\n }\n }\n }\n }\n }\n else {\n s1 = peg$FAILED;\n }\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c5(s1);\n }\n s0 = s1;\n }\n return s0;\n }\n function peg$parsenonTagStartingAngleBracket() {\n var s0, s1, s2;\n s0 = peg$currPos;\n s1 = peg$currPos;\n peg$silentFails++;\n s2 = peg$parseopeningTag();\n if (s2 === peg$FAILED) {\n s2 = peg$parseclosingTag();\n if (s2 === peg$FAILED) {\n s2 = peg$parseselfClosingTag();\n }\n }\n peg$silentFails--;\n if (s2 === peg$FAILED) {\n s1 = undefined;\n }\n else {\n peg$currPos = s1;\n s1 = peg$FAILED;\n }\n if (s1 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 60) {\n s2 = peg$c3;\n peg$currPos++;\n }\n else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c4);\n }\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c6();\n s0 = s1;\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n return s0;\n }\n function peg$parseliteralElement() {\n var s0, s1;\n s0 = peg$currPos;\n s1 = peg$parsemessageText();\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c7(s1);\n }\n s0 = s1;\n return s0;\n }\n function peg$parsepoundElement() {\n var s0, s1;\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 35) {\n s1 = peg$c8;\n peg$currPos++;\n }\n else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c9);\n }\n }\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c10();\n }\n s0 = s1;\n return s0;\n }\n function peg$parsetagElement() {\n var s0, s1, s2, s3;\n peg$silentFails++;\n s0 = peg$parseselfClosingTag();\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = peg$parseopeningTag();\n if (s1 !== peg$FAILED) {\n s2 = peg$parsemessage();\n if (s2 !== peg$FAILED) {\n s3 = peg$parseclosingTag();\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c12(s1, s2, s3);\n s0 = s1;\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n peg$silentFails--;\n if (s0 === peg$FAILED) {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c11);\n }\n }\n return s0;\n }\n function peg$parseselfClosingTag() {\n var s0, s1, s2, s3, s4, s5;\n s0 = peg$currPos;\n s1 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 60) {\n s2 = peg$c3;\n peg$currPos++;\n }\n else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c4);\n }\n }\n if (s2 !== peg$FAILED) {\n s3 = peg$parsevalidTag();\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.substr(peg$currPos, 2) === peg$c13) {\n s5 = peg$c13;\n peg$currPos += 2;\n }\n else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c14);\n }\n }\n if (s5 !== peg$FAILED) {\n s2 = [s2, s3, s4, s5];\n s1 = s2;\n }\n else {\n peg$currPos = s1;\n s1 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s1;\n s1 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s1;\n s1 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s1;\n s1 = peg$FAILED;\n }\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c15(s1);\n }\n s0 = s1;\n return s0;\n }\n function peg$parseopeningTag() {\n var s0, s1, s2, s3;\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 60) {\n s1 = peg$c3;\n peg$currPos++;\n }\n else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c4);\n }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parsevalidTag();\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 62) {\n s3 = peg$c16;\n peg$currPos++;\n }\n else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c17);\n }\n }\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c18(s2);\n s0 = s1;\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n return s0;\n }\n function peg$parseclosingTag() {\n var s0, s1, s2, s3;\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 2) === peg$c19) {\n s1 = peg$c19;\n peg$currPos += 2;\n }\n else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c20);\n }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parsevalidTag();\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 62) {\n s3 = peg$c16;\n peg$currPos++;\n }\n else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c17);\n }\n }\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c18(s2);\n s0 = s1;\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n return s0;\n }\n function peg$parseargumentElement() {\n var s0, s1, s2, s3, s4, s5;\n peg$silentFails++;\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 123) {\n s1 = peg$c22;\n peg$currPos++;\n }\n else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c23);\n }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parseargNameOrNumber();\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 125) {\n s5 = peg$c24;\n peg$currPos++;\n }\n else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c25);\n }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c26(s3);\n s0 = s1;\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n peg$silentFails--;\n if (s0 === peg$FAILED) {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c21);\n }\n }\n return s0;\n }\n function peg$parsenumberSkeletonId() {\n var s0, s1, s2, s3, s4;\n peg$silentFails++;\n s0 = peg$currPos;\n s1 = [];\n s2 = peg$currPos;\n s3 = peg$currPos;\n peg$silentFails++;\n s4 = peg$parsewhiteSpace();\n if (s4 === peg$FAILED) {\n if (peg$c28.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n }\n else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c29);\n }\n }\n }\n peg$silentFails--;\n if (s4 === peg$FAILED) {\n s3 = undefined;\n }\n else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n if (s3 !== peg$FAILED) {\n if (input.length > peg$currPos) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n }\n else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c30);\n }\n }\n if (s4 !== peg$FAILED) {\n s3 = [s3, s4];\n s2 = s3;\n }\n else {\n peg$currPos = s2;\n s2 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s2;\n s2 = peg$FAILED;\n }\n if (s2 !== peg$FAILED) {\n while (s2 !== peg$FAILED) {\n s1.push(s2);\n s2 = peg$currPos;\n s3 = peg$currPos;\n peg$silentFails++;\n s4 = peg$parsewhiteSpace();\n if (s4 === peg$FAILED) {\n if (peg$c28.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n }\n else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c29);\n }\n }\n }\n peg$silentFails--;\n if (s4 === peg$FAILED) {\n s3 = undefined;\n }\n else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n if (s3 !== peg$FAILED) {\n if (input.length > peg$currPos) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n }\n else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c30);\n }\n }\n if (s4 !== peg$FAILED) {\n s3 = [s3, s4];\n s2 = s3;\n }\n else {\n peg$currPos = s2;\n s2 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s2;\n s2 = peg$FAILED;\n }\n }\n }\n else {\n s1 = peg$FAILED;\n }\n if (s1 !== peg$FAILED) {\n s0 = input.substring(s0, peg$currPos);\n }\n else {\n s0 = s1;\n }\n peg$silentFails--;\n if (s0 === peg$FAILED) {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c27);\n }\n }\n return s0;\n }\n function peg$parsenumberSkeletonTokenOption() {\n var s0, s1, s2;\n peg$silentFails++;\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 47) {\n s1 = peg$c32;\n peg$currPos++;\n }\n else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c33);\n }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parsenumberSkeletonId();\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c34(s2);\n s0 = s1;\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n peg$silentFails--;\n if (s0 === peg$FAILED) {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c31);\n }\n }\n return s0;\n }\n function peg$parsenumberSkeletonToken() {\n var s0, s1, s2, s3, s4;\n peg$silentFails++;\n s0 = peg$currPos;\n s1 = peg$parse_();\n if (s1 !== peg$FAILED) {\n s2 = peg$parsenumberSkeletonId();\n if (s2 !== peg$FAILED) {\n s3 = [];\n s4 = peg$parsenumberSkeletonTokenOption();\n while (s4 !== peg$FAILED) {\n s3.push(s4);\n s4 = peg$parsenumberSkeletonTokenOption();\n }\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c36(s2, s3);\n s0 = s1;\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n peg$silentFails--;\n if (s0 === peg$FAILED) {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c35);\n }\n }\n return s0;\n }\n function peg$parsenumberSkeleton() {\n var s0, s1, s2;\n s0 = peg$currPos;\n s1 = [];\n s2 = peg$parsenumberSkeletonToken();\n if (s2 !== peg$FAILED) {\n while (s2 !== peg$FAILED) {\n s1.push(s2);\n s2 = peg$parsenumberSkeletonToken();\n }\n }\n else {\n s1 = peg$FAILED;\n }\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c37(s1);\n }\n s0 = s1;\n return s0;\n }\n function peg$parsenumberArgStyle() {\n var s0, s1, s2;\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 2) === peg$c38) {\n s1 = peg$c38;\n peg$currPos += 2;\n }\n else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c39);\n }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parsenumberSkeleton();\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c40(s2);\n s0 = s1;\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n peg$savedPos = peg$currPos;\n s1 = peg$c41();\n if (s1) {\n s1 = undefined;\n }\n else {\n s1 = peg$FAILED;\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parsemessageText();\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c42(s2);\n s0 = s1;\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n return s0;\n }\n function peg$parsenumberFormatElement() {\n var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12;\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 123) {\n s1 = peg$c22;\n peg$currPos++;\n }\n else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c23);\n }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parseargNameOrNumber();\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 44) {\n s5 = peg$c43;\n peg$currPos++;\n }\n else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c44);\n }\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parse_();\n if (s6 !== peg$FAILED) {\n if (input.substr(peg$currPos, 6) === peg$c45) {\n s7 = peg$c45;\n peg$currPos += 6;\n }\n else {\n s7 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c46);\n }\n }\n if (s7 !== peg$FAILED) {\n s8 = peg$parse_();\n if (s8 !== peg$FAILED) {\n s9 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 44) {\n s10 = peg$c43;\n peg$currPos++;\n }\n else {\n s10 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c44);\n }\n }\n if (s10 !== peg$FAILED) {\n s11 = peg$parse_();\n if (s11 !== peg$FAILED) {\n s12 = peg$parsenumberArgStyle();\n if (s12 !== peg$FAILED) {\n s10 = [s10, s11, s12];\n s9 = s10;\n }\n else {\n peg$currPos = s9;\n s9 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s9;\n s9 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s9;\n s9 = peg$FAILED;\n }\n if (s9 === peg$FAILED) {\n s9 = null;\n }\n if (s9 !== peg$FAILED) {\n s10 = peg$parse_();\n if (s10 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 125) {\n s11 = peg$c24;\n peg$currPos++;\n }\n else {\n s11 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c25);\n }\n }\n if (s11 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c47(s3, s7, s9);\n s0 = s1;\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n return s0;\n }\n function peg$parsedateTimeSkeletonLiteral() {\n var s0, s1, s2, s3;\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 39) {\n s1 = peg$c48;\n peg$currPos++;\n }\n else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c49);\n }\n }\n if (s1 !== peg$FAILED) {\n s2 = [];\n s3 = peg$parsedoubleApostrophes();\n if (s3 === peg$FAILED) {\n if (peg$c50.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n }\n else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c51);\n }\n }\n }\n if (s3 !== peg$FAILED) {\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n s3 = peg$parsedoubleApostrophes();\n if (s3 === peg$FAILED) {\n if (peg$c50.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n }\n else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c51);\n }\n }\n }\n }\n }\n else {\n s2 = peg$FAILED;\n }\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 39) {\n s3 = peg$c48;\n peg$currPos++;\n }\n else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c49);\n }\n }\n if (s3 !== peg$FAILED) {\n s1 = [s1, s2, s3];\n s0 = s1;\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = [];\n s1 = peg$parsedoubleApostrophes();\n if (s1 === peg$FAILED) {\n if (peg$c52.test(input.charAt(peg$currPos))) {\n s1 = input.charAt(peg$currPos);\n peg$currPos++;\n }\n else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c53);\n }\n }\n }\n if (s1 !== peg$FAILED) {\n while (s1 !== peg$FAILED) {\n s0.push(s1);\n s1 = peg$parsedoubleApostrophes();\n if (s1 === peg$FAILED) {\n if (peg$c52.test(input.charAt(peg$currPos))) {\n s1 = input.charAt(peg$currPos);\n peg$currPos++;\n }\n else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c53);\n }\n }\n }\n }\n }\n else {\n s0 = peg$FAILED;\n }\n }\n return s0;\n }\n function peg$parsedateTimeSkeletonPattern() {\n var s0, s1;\n s0 = [];\n if (peg$c54.test(input.charAt(peg$currPos))) {\n s1 = input.charAt(peg$currPos);\n peg$currPos++;\n }\n else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c55);\n }\n }\n if (s1 !== peg$FAILED) {\n while (s1 !== peg$FAILED) {\n s0.push(s1);\n if (peg$c54.test(input.charAt(peg$currPos))) {\n s1 = input.charAt(peg$currPos);\n peg$currPos++;\n }\n else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c55);\n }\n }\n }\n }\n else {\n s0 = peg$FAILED;\n }\n return s0;\n }\n function peg$parsedateTimeSkeleton() {\n var s0, s1, s2, s3;\n s0 = peg$currPos;\n s1 = peg$currPos;\n s2 = [];\n s3 = peg$parsedateTimeSkeletonLiteral();\n if (s3 === peg$FAILED) {\n s3 = peg$parsedateTimeSkeletonPattern();\n }\n if (s3 !== peg$FAILED) {\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n s3 = peg$parsedateTimeSkeletonLiteral();\n if (s3 === peg$FAILED) {\n s3 = peg$parsedateTimeSkeletonPattern();\n }\n }\n }\n else {\n s2 = peg$FAILED;\n }\n if (s2 !== peg$FAILED) {\n s1 = input.substring(s1, peg$currPos);\n }\n else {\n s1 = s2;\n }\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c56(s1);\n }\n s0 = s1;\n return s0;\n }\n function peg$parsedateOrTimeArgStyle() {\n var s0, s1, s2;\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 2) === peg$c38) {\n s1 = peg$c38;\n peg$currPos += 2;\n }\n else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c39);\n }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parsedateTimeSkeleton();\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c40(s2);\n s0 = s1;\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n peg$savedPos = peg$currPos;\n s1 = peg$c57();\n if (s1) {\n s1 = undefined;\n }\n else {\n s1 = peg$FAILED;\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parsemessageText();\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c42(s2);\n s0 = s1;\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n return s0;\n }\n function peg$parsedateOrTimeFormatElement() {\n var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12;\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 123) {\n s1 = peg$c22;\n peg$currPos++;\n }\n else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c23);\n }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parseargNameOrNumber();\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 44) {\n s5 = peg$c43;\n peg$currPos++;\n }\n else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c44);\n }\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parse_();\n if (s6 !== peg$FAILED) {\n if (input.substr(peg$currPos, 4) === peg$c58) {\n s7 = peg$c58;\n peg$currPos += 4;\n }\n else {\n s7 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c59);\n }\n }\n if (s7 === peg$FAILED) {\n if (input.substr(peg$currPos, 4) === peg$c60) {\n s7 = peg$c60;\n peg$currPos += 4;\n }\n else {\n s7 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c61);\n }\n }\n }\n if (s7 !== peg$FAILED) {\n s8 = peg$parse_();\n if (s8 !== peg$FAILED) {\n s9 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 44) {\n s10 = peg$c43;\n peg$currPos++;\n }\n else {\n s10 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c44);\n }\n }\n if (s10 !== peg$FAILED) {\n s11 = peg$parse_();\n if (s11 !== peg$FAILED) {\n s12 = peg$parsedateOrTimeArgStyle();\n if (s12 !== peg$FAILED) {\n s10 = [s10, s11, s12];\n s9 = s10;\n }\n else {\n peg$currPos = s9;\n s9 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s9;\n s9 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s9;\n s9 = peg$FAILED;\n }\n if (s9 === peg$FAILED) {\n s9 = null;\n }\n if (s9 !== peg$FAILED) {\n s10 = peg$parse_();\n if (s10 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 125) {\n s11 = peg$c24;\n peg$currPos++;\n }\n else {\n s11 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c25);\n }\n }\n if (s11 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c47(s3, s7, s9);\n s0 = s1;\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n return s0;\n }\n function peg$parsesimpleFormatElement() {\n var s0;\n s0 = peg$parsenumberFormatElement();\n if (s0 === peg$FAILED) {\n s0 = peg$parsedateOrTimeFormatElement();\n }\n return s0;\n }\n function peg$parsepluralElement() {\n var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, s15;\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 123) {\n s1 = peg$c22;\n peg$currPos++;\n }\n else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c23);\n }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parseargNameOrNumber();\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 44) {\n s5 = peg$c43;\n peg$currPos++;\n }\n else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c44);\n }\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parse_();\n if (s6 !== peg$FAILED) {\n if (input.substr(peg$currPos, 6) === peg$c62) {\n s7 = peg$c62;\n peg$currPos += 6;\n }\n else {\n s7 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c63);\n }\n }\n if (s7 === peg$FAILED) {\n if (input.substr(peg$currPos, 13) === peg$c64) {\n s7 = peg$c64;\n peg$currPos += 13;\n }\n else {\n s7 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c65);\n }\n }\n }\n if (s7 !== peg$FAILED) {\n s8 = peg$parse_();\n if (s8 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 44) {\n s9 = peg$c43;\n peg$currPos++;\n }\n else {\n s9 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c44);\n }\n }\n if (s9 !== peg$FAILED) {\n s10 = peg$parse_();\n if (s10 !== peg$FAILED) {\n s11 = peg$currPos;\n if (input.substr(peg$currPos, 7) === peg$c66) {\n s12 = peg$c66;\n peg$currPos += 7;\n }\n else {\n s12 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c67);\n }\n }\n if (s12 !== peg$FAILED) {\n s13 = peg$parse_();\n if (s13 !== peg$FAILED) {\n s14 = peg$parsenumber();\n if (s14 !== peg$FAILED) {\n s12 = [s12, s13, s14];\n s11 = s12;\n }\n else {\n peg$currPos = s11;\n s11 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s11;\n s11 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s11;\n s11 = peg$FAILED;\n }\n if (s11 === peg$FAILED) {\n s11 = null;\n }\n if (s11 !== peg$FAILED) {\n s12 = peg$parse_();\n if (s12 !== peg$FAILED) {\n s13 = [];\n s14 = peg$parsepluralOption();\n if (s14 !== peg$FAILED) {\n while (s14 !== peg$FAILED) {\n s13.push(s14);\n s14 = peg$parsepluralOption();\n }\n }\n else {\n s13 = peg$FAILED;\n }\n if (s13 !== peg$FAILED) {\n s14 = peg$parse_();\n if (s14 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 125) {\n s15 = peg$c24;\n peg$currPos++;\n }\n else {\n s15 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c25);\n }\n }\n if (s15 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c68(s3, s7, s11, s13);\n s0 = s1;\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n return s0;\n }\n function peg$parseselectElement() {\n var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13;\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 123) {\n s1 = peg$c22;\n peg$currPos++;\n }\n else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c23);\n }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parseargNameOrNumber();\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 44) {\n s5 = peg$c43;\n peg$currPos++;\n }\n else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c44);\n }\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parse_();\n if (s6 !== peg$FAILED) {\n if (input.substr(peg$currPos, 6) === peg$c69) {\n s7 = peg$c69;\n peg$currPos += 6;\n }\n else {\n s7 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c70);\n }\n }\n if (s7 !== peg$FAILED) {\n s8 = peg$parse_();\n if (s8 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 44) {\n s9 = peg$c43;\n peg$currPos++;\n }\n else {\n s9 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c44);\n }\n }\n if (s9 !== peg$FAILED) {\n s10 = peg$parse_();\n if (s10 !== peg$FAILED) {\n s11 = [];\n s12 = peg$parseselectOption();\n if (s12 !== peg$FAILED) {\n while (s12 !== peg$FAILED) {\n s11.push(s12);\n s12 = peg$parseselectOption();\n }\n }\n else {\n s11 = peg$FAILED;\n }\n if (s11 !== peg$FAILED) {\n s12 = peg$parse_();\n if (s12 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 125) {\n s13 = peg$c24;\n peg$currPos++;\n }\n else {\n s13 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c25);\n }\n }\n if (s13 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c71(s3, s11);\n s0 = s1;\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n return s0;\n }\n function peg$parsepluralRuleSelectValue() {\n var s0, s1, s2, s3;\n s0 = peg$currPos;\n s1 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 61) {\n s2 = peg$c72;\n peg$currPos++;\n }\n else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c73);\n }\n }\n if (s2 !== peg$FAILED) {\n s3 = peg$parsenumber();\n if (s3 !== peg$FAILED) {\n s2 = [s2, s3];\n s1 = s2;\n }\n else {\n peg$currPos = s1;\n s1 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s1;\n s1 = peg$FAILED;\n }\n if (s1 !== peg$FAILED) {\n s0 = input.substring(s0, peg$currPos);\n }\n else {\n s0 = s1;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$parseargName();\n }\n return s0;\n }\n function peg$parseselectOption() {\n var s0, s1, s2, s3, s4, s5, s6, s7;\n s0 = peg$currPos;\n s1 = peg$parse_();\n if (s1 !== peg$FAILED) {\n s2 = peg$parseargName();\n if (s2 !== peg$FAILED) {\n s3 = peg$parse_();\n if (s3 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 123) {\n s4 = peg$c22;\n peg$currPos++;\n }\n else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c23);\n }\n }\n if (s4 !== peg$FAILED) {\n peg$savedPos = peg$currPos;\n s5 = peg$c74(s2);\n if (s5) {\n s5 = undefined;\n }\n else {\n s5 = peg$FAILED;\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parsemessage();\n if (s6 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 125) {\n s7 = peg$c24;\n peg$currPos++;\n }\n else {\n s7 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c25);\n }\n }\n if (s7 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c75(s2, s6);\n s0 = s1;\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n return s0;\n }\n function peg$parsepluralOption() {\n var s0, s1, s2, s3, s4, s5, s6, s7;\n s0 = peg$currPos;\n s1 = peg$parse_();\n if (s1 !== peg$FAILED) {\n s2 = peg$parsepluralRuleSelectValue();\n if (s2 !== peg$FAILED) {\n s3 = peg$parse_();\n if (s3 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 123) {\n s4 = peg$c22;\n peg$currPos++;\n }\n else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c23);\n }\n }\n if (s4 !== peg$FAILED) {\n peg$savedPos = peg$currPos;\n s5 = peg$c76(s2);\n if (s5) {\n s5 = undefined;\n }\n else {\n s5 = peg$FAILED;\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parsemessage();\n if (s6 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 125) {\n s7 = peg$c24;\n peg$currPos++;\n }\n else {\n s7 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c25);\n }\n }\n if (s7 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c77(s2, s6);\n s0 = s1;\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n return s0;\n }\n function peg$parsewhiteSpace() {\n var s0, s1;\n peg$silentFails++;\n if (peg$c79.test(input.charAt(peg$currPos))) {\n s0 = input.charAt(peg$currPos);\n peg$currPos++;\n }\n else {\n s0 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c80);\n }\n }\n peg$silentFails--;\n if (s0 === peg$FAILED) {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c78);\n }\n }\n return s0;\n }\n function peg$parsepatternSyntax() {\n var s0, s1;\n peg$silentFails++;\n if (peg$c82.test(input.charAt(peg$currPos))) {\n s0 = input.charAt(peg$currPos);\n peg$currPos++;\n }\n else {\n s0 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c83);\n }\n }\n peg$silentFails--;\n if (s0 === peg$FAILED) {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c81);\n }\n }\n return s0;\n }\n function peg$parse_() {\n var s0, s1, s2;\n peg$silentFails++;\n s0 = peg$currPos;\n s1 = [];\n s2 = peg$parsewhiteSpace();\n while (s2 !== peg$FAILED) {\n s1.push(s2);\n s2 = peg$parsewhiteSpace();\n }\n if (s1 !== peg$FAILED) {\n s0 = input.substring(s0, peg$currPos);\n }\n else {\n s0 = s1;\n }\n peg$silentFails--;\n if (s0 === peg$FAILED) {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c84);\n }\n }\n return s0;\n }\n function peg$parsenumber() {\n var s0, s1, s2;\n peg$silentFails++;\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 45) {\n s1 = peg$c86;\n peg$currPos++;\n }\n else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c87);\n }\n }\n if (s1 === peg$FAILED) {\n s1 = null;\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parseargNumber();\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c88(s1, s2);\n s0 = s1;\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n peg$silentFails--;\n if (s0 === peg$FAILED) {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c85);\n }\n }\n return s0;\n }\n function peg$parseapostrophe() {\n var s0, s1;\n peg$silentFails++;\n if (input.charCodeAt(peg$currPos) === 39) {\n s0 = peg$c48;\n peg$currPos++;\n }\n else {\n s0 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c49);\n }\n }\n peg$silentFails--;\n if (s0 === peg$FAILED) {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c89);\n }\n }\n return s0;\n }\n function peg$parsedoubleApostrophes() {\n var s0, s1;\n peg$silentFails++;\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 2) === peg$c91) {\n s1 = peg$c91;\n peg$currPos += 2;\n }\n else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c92);\n }\n }\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c93();\n }\n s0 = s1;\n peg$silentFails--;\n if (s0 === peg$FAILED) {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c90);\n }\n }\n return s0;\n }\n function peg$parsequotedString() {\n var s0, s1, s2, s3, s4, s5;\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 39) {\n s1 = peg$c48;\n peg$currPos++;\n }\n else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c49);\n }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parseescapedChar();\n if (s2 !== peg$FAILED) {\n s3 = peg$currPos;\n s4 = [];\n if (input.substr(peg$currPos, 2) === peg$c91) {\n s5 = peg$c91;\n peg$currPos += 2;\n }\n else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c92);\n }\n }\n if (s5 === peg$FAILED) {\n if (peg$c50.test(input.charAt(peg$currPos))) {\n s5 = input.charAt(peg$currPos);\n peg$currPos++;\n }\n else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c51);\n }\n }\n }\n while (s5 !== peg$FAILED) {\n s4.push(s5);\n if (input.substr(peg$currPos, 2) === peg$c91) {\n s5 = peg$c91;\n peg$currPos += 2;\n }\n else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c92);\n }\n }\n if (s5 === peg$FAILED) {\n if (peg$c50.test(input.charAt(peg$currPos))) {\n s5 = input.charAt(peg$currPos);\n peg$currPos++;\n }\n else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c51);\n }\n }\n }\n }\n if (s4 !== peg$FAILED) {\n s3 = input.substring(s3, peg$currPos);\n }\n else {\n s3 = s4;\n }\n if (s3 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 39) {\n s4 = peg$c48;\n peg$currPos++;\n }\n else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c49);\n }\n }\n if (s4 === peg$FAILED) {\n s4 = null;\n }\n if (s4 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c94(s2, s3);\n s0 = s1;\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n return s0;\n }\n function peg$parseunquotedString() {\n var s0, s1, s2, s3;\n s0 = peg$currPos;\n s1 = peg$currPos;\n if (input.length > peg$currPos) {\n s2 = input.charAt(peg$currPos);\n peg$currPos++;\n }\n else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c30);\n }\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = peg$currPos;\n s3 = peg$c95(s2);\n if (s3) {\n s3 = undefined;\n }\n else {\n s3 = peg$FAILED;\n }\n if (s3 !== peg$FAILED) {\n s2 = [s2, s3];\n s1 = s2;\n }\n else {\n peg$currPos = s1;\n s1 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s1;\n s1 = peg$FAILED;\n }\n if (s1 === peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 10) {\n s1 = peg$c96;\n peg$currPos++;\n }\n else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c97);\n }\n }\n }\n if (s1 !== peg$FAILED) {\n s0 = input.substring(s0, peg$currPos);\n }\n else {\n s0 = s1;\n }\n return s0;\n }\n function peg$parseescapedChar() {\n var s0, s1, s2, s3;\n s0 = peg$currPos;\n s1 = peg$currPos;\n if (input.length > peg$currPos) {\n s2 = input.charAt(peg$currPos);\n peg$currPos++;\n }\n else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c30);\n }\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = peg$currPos;\n s3 = peg$c98(s2);\n if (s3) {\n s3 = undefined;\n }\n else {\n s3 = peg$FAILED;\n }\n if (s3 !== peg$FAILED) {\n s2 = [s2, s3];\n s1 = s2;\n }\n else {\n peg$currPos = s1;\n s1 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s1;\n s1 = peg$FAILED;\n }\n if (s1 !== peg$FAILED) {\n s0 = input.substring(s0, peg$currPos);\n }\n else {\n s0 = s1;\n }\n return s0;\n }\n function peg$parseargNameOrNumber() {\n var s0, s1;\n peg$silentFails++;\n s0 = peg$currPos;\n s1 = peg$parseargNumber();\n if (s1 === peg$FAILED) {\n s1 = peg$parseargName();\n }\n if (s1 !== peg$FAILED) {\n s0 = input.substring(s0, peg$currPos);\n }\n else {\n s0 = s1;\n }\n peg$silentFails--;\n if (s0 === peg$FAILED) {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c99);\n }\n }\n return s0;\n }\n function peg$parsevalidTag() {\n var s0, s1;\n peg$silentFails++;\n s0 = peg$currPos;\n s1 = peg$parseargNumber();\n if (s1 === peg$FAILED) {\n s1 = peg$parsetagName();\n }\n if (s1 !== peg$FAILED) {\n s0 = input.substring(s0, peg$currPos);\n }\n else {\n s0 = s1;\n }\n peg$silentFails--;\n if (s0 === peg$FAILED) {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c100);\n }\n }\n return s0;\n }\n function peg$parseargNumber() {\n var s0, s1, s2, s3, s4;\n peg$silentFails++;\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 48) {\n s1 = peg$c102;\n peg$currPos++;\n }\n else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c103);\n }\n }\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c104();\n }\n s0 = s1;\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = peg$currPos;\n if (peg$c105.test(input.charAt(peg$currPos))) {\n s2 = input.charAt(peg$currPos);\n peg$currPos++;\n }\n else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c106);\n }\n }\n if (s2 !== peg$FAILED) {\n s3 = [];\n if (peg$c107.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n }\n else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c108);\n }\n }\n while (s4 !== peg$FAILED) {\n s3.push(s4);\n if (peg$c107.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n }\n else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c108);\n }\n }\n }\n if (s3 !== peg$FAILED) {\n s2 = [s2, s3];\n s1 = s2;\n }\n else {\n peg$currPos = s1;\n s1 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s1;\n s1 = peg$FAILED;\n }\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c109(s1);\n }\n s0 = s1;\n }\n peg$silentFails--;\n if (s0 === peg$FAILED) {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c101);\n }\n }\n return s0;\n }\n function peg$parseargName() {\n var s0, s1, s2, s3, s4;\n peg$silentFails++;\n s0 = peg$currPos;\n s1 = [];\n s2 = peg$currPos;\n s3 = peg$currPos;\n peg$silentFails++;\n s4 = peg$parsewhiteSpace();\n if (s4 === peg$FAILED) {\n s4 = peg$parsepatternSyntax();\n }\n peg$silentFails--;\n if (s4 === peg$FAILED) {\n s3 = undefined;\n }\n else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n if (s3 !== peg$FAILED) {\n if (input.length > peg$currPos) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n }\n else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c30);\n }\n }\n if (s4 !== peg$FAILED) {\n s3 = [s3, s4];\n s2 = s3;\n }\n else {\n peg$currPos = s2;\n s2 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s2;\n s2 = peg$FAILED;\n }\n if (s2 !== peg$FAILED) {\n while (s2 !== peg$FAILED) {\n s1.push(s2);\n s2 = peg$currPos;\n s3 = peg$currPos;\n peg$silentFails++;\n s4 = peg$parsewhiteSpace();\n if (s4 === peg$FAILED) {\n s4 = peg$parsepatternSyntax();\n }\n peg$silentFails--;\n if (s4 === peg$FAILED) {\n s3 = undefined;\n }\n else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n if (s3 !== peg$FAILED) {\n if (input.length > peg$currPos) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n }\n else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c30);\n }\n }\n if (s4 !== peg$FAILED) {\n s3 = [s3, s4];\n s2 = s3;\n }\n else {\n peg$currPos = s2;\n s2 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s2;\n s2 = peg$FAILED;\n }\n }\n }\n else {\n s1 = peg$FAILED;\n }\n if (s1 !== peg$FAILED) {\n s0 = input.substring(s0, peg$currPos);\n }\n else {\n s0 = s1;\n }\n peg$silentFails--;\n if (s0 === peg$FAILED) {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c110);\n }\n }\n return s0;\n }\n function peg$parsetagName() {\n var s0, s1, s2, s3, s4;\n peg$silentFails++;\n s0 = peg$currPos;\n s1 = [];\n if (input.charCodeAt(peg$currPos) === 45) {\n s2 = peg$c86;\n peg$currPos++;\n }\n else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c87);\n }\n }\n if (s2 === peg$FAILED) {\n s2 = peg$currPos;\n s3 = peg$currPos;\n peg$silentFails++;\n s4 = peg$parsewhiteSpace();\n if (s4 === peg$FAILED) {\n s4 = peg$parsepatternSyntax();\n }\n peg$silentFails--;\n if (s4 === peg$FAILED) {\n s3 = undefined;\n }\n else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n if (s3 !== peg$FAILED) {\n if (input.length > peg$currPos) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n }\n else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c30);\n }\n }\n if (s4 !== peg$FAILED) {\n s3 = [s3, s4];\n s2 = s3;\n }\n else {\n peg$currPos = s2;\n s2 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s2;\n s2 = peg$FAILED;\n }\n }\n if (s2 !== peg$FAILED) {\n while (s2 !== peg$FAILED) {\n s1.push(s2);\n if (input.charCodeAt(peg$currPos) === 45) {\n s2 = peg$c86;\n peg$currPos++;\n }\n else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c87);\n }\n }\n if (s2 === peg$FAILED) {\n s2 = peg$currPos;\n s3 = peg$currPos;\n peg$silentFails++;\n s4 = peg$parsewhiteSpace();\n if (s4 === peg$FAILED) {\n s4 = peg$parsepatternSyntax();\n }\n peg$silentFails--;\n if (s4 === peg$FAILED) {\n s3 = undefined;\n }\n else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n if (s3 !== peg$FAILED) {\n if (input.length > peg$currPos) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n }\n else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c30);\n }\n }\n if (s4 !== peg$FAILED) {\n s3 = [s3, s4];\n s2 = s3;\n }\n else {\n peg$currPos = s2;\n s2 = peg$FAILED;\n }\n }\n else {\n peg$currPos = s2;\n s2 = peg$FAILED;\n }\n }\n }\n }\n else {\n s1 = peg$FAILED;\n }\n if (s1 !== peg$FAILED) {\n s0 = input.substring(s0, peg$currPos);\n }\n else {\n s0 = s1;\n }\n peg$silentFails--;\n if (s0 === peg$FAILED) {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c111);\n }\n }\n return s0;\n }\n var messageCtx = ['root'];\n function isNestedMessageText() {\n return messageCtx.length > 1;\n }\n function isInPluralOption() {\n return messageCtx[messageCtx.length - 1] === 'plural';\n }\n function insertLocation() {\n return options && options.captureLocation ? {\n location: location()\n } : {};\n }\n var ignoreTag = options && options.ignoreTag;\n var shouldParseSkeleton = options && options.shouldParseSkeleton;\n peg$result = peg$startRuleFunction();\n if (peg$result !== peg$FAILED && peg$currPos === input.length) {\n return peg$result;\n }\n else {\n if (peg$result !== peg$FAILED && peg$currPos < input.length) {\n peg$fail(peg$endExpectation());\n }\n throw peg$buildStructuredError(peg$maxFailExpected, peg$maxFailPos < input.length ? input.charAt(peg$maxFailPos) : null, peg$maxFailPos < input.length\n ? peg$computeLocation(peg$maxFailPos, peg$maxFailPos + 1)\n : peg$computeLocation(peg$maxFailPos, peg$maxFailPos));\n }\n}\nexport var pegParse = peg$parse;\n","import { __spreadArray } from \"tslib\";\nimport { isPluralElement, isLiteralElement, isSelectElement, } from './types';\nimport { pegParse } from './parser';\nvar PLURAL_HASHTAG_REGEX = /(^|[^\\\\])#/g;\n/**\n * Whether to convert `#` in plural rule options\n * to `{var, number}`\n * @param el AST Element\n * @param pluralStack current plural stack\n */\nexport function normalizeHashtagInPlural(els) {\n els.forEach(function (el) {\n // If we're encountering a plural el\n if (!isPluralElement(el) && !isSelectElement(el)) {\n return;\n }\n // Go down the options and search for # in any literal element\n Object.keys(el.options).forEach(function (id) {\n var _a;\n var opt = el.options[id];\n // If we got a match, we have to split this\n // and inject a NumberElement in the middle\n var matchingLiteralElIndex = -1;\n var literalEl = undefined;\n for (var i = 0; i < opt.value.length; i++) {\n var el_1 = opt.value[i];\n if (isLiteralElement(el_1) && PLURAL_HASHTAG_REGEX.test(el_1.value)) {\n matchingLiteralElIndex = i;\n literalEl = el_1;\n break;\n }\n }\n if (literalEl) {\n var newValue = literalEl.value.replace(PLURAL_HASHTAG_REGEX, \"$1{\" + el.value + \", number}\");\n var newEls = pegParse(newValue);\n (_a = opt.value).splice.apply(_a, __spreadArray([matchingLiteralElIndex, 1], newEls));\n }\n normalizeHashtagInPlural(opt.value);\n });\n });\n}\n","import { __assign } from \"tslib\";\nimport { pegParse } from './src/parser';\nimport { normalizeHashtagInPlural } from './src/normalize';\nexport * from './src/types';\nexport * from './src/parser';\nexport function parse(input, opts) {\n opts = __assign({ normalizeHashtagInPlural: true, shouldParseSkeleton: true }, (opts || {}));\n var els = pegParse(input, opts);\n if (opts.normalizeHashtagInPlural) {\n normalizeHashtagInPlural(els);\n }\n return els;\n}\n","import { __extends } from \"tslib\";\nexport var ErrorCode;\n(function (ErrorCode) {\n // When we have a placeholder but no value to format\n ErrorCode[\"MISSING_VALUE\"] = \"MISSING_VALUE\";\n // When value supplied is invalid\n ErrorCode[\"INVALID_VALUE\"] = \"INVALID_VALUE\";\n // When we need specific Intl API but it's not available\n ErrorCode[\"MISSING_INTL_API\"] = \"MISSING_INTL_API\";\n})(ErrorCode || (ErrorCode = {}));\nvar FormatError = /** @class */ (function (_super) {\n __extends(FormatError, _super);\n function FormatError(msg, code, originalMessage) {\n var _this = _super.call(this, msg) || this;\n _this.code = code;\n _this.originalMessage = originalMessage;\n return _this;\n }\n FormatError.prototype.toString = function () {\n return \"[formatjs Error: \" + this.code + \"] \" + this.message;\n };\n return FormatError;\n}(Error));\nexport { FormatError };\nvar InvalidValueError = /** @class */ (function (_super) {\n __extends(InvalidValueError, _super);\n function InvalidValueError(variableId, value, options, originalMessage) {\n return _super.call(this, \"Invalid values for \\\"\" + variableId + \"\\\": \\\"\" + value + \"\\\". Options are \\\"\" + Object.keys(options).join('\", \"') + \"\\\"\", ErrorCode.INVALID_VALUE, originalMessage) || this;\n }\n return InvalidValueError;\n}(FormatError));\nexport { InvalidValueError };\nvar InvalidValueTypeError = /** @class */ (function (_super) {\n __extends(InvalidValueTypeError, _super);\n function InvalidValueTypeError(value, type, originalMessage) {\n return _super.call(this, \"Value for \\\"\" + value + \"\\\" must be of type \" + type, ErrorCode.INVALID_VALUE, originalMessage) || this;\n }\n return InvalidValueTypeError;\n}(FormatError));\nexport { InvalidValueTypeError };\nvar MissingValueError = /** @class */ (function (_super) {\n __extends(MissingValueError, _super);\n function MissingValueError(variableId, originalMessage) {\n return _super.call(this, \"The intl string context variable \\\"\" + variableId + \"\\\" was not provided to the string \\\"\" + originalMessage + \"\\\"\", ErrorCode.MISSING_VALUE, originalMessage) || this;\n }\n return MissingValueError;\n}(FormatError));\nexport { MissingValueError };\n","import { isArgumentElement, isDateElement, isDateTimeSkeleton, isLiteralElement, isNumberElement, isNumberSkeleton, isPluralElement, isPoundElement, isSelectElement, isTimeElement, isTagElement, } from 'intl-messageformat-parser';\nimport { MissingValueError, InvalidValueError, ErrorCode, FormatError, InvalidValueTypeError, } from './error';\nexport var PART_TYPE;\n(function (PART_TYPE) {\n PART_TYPE[PART_TYPE[\"literal\"] = 0] = \"literal\";\n PART_TYPE[PART_TYPE[\"object\"] = 1] = \"object\";\n})(PART_TYPE || (PART_TYPE = {}));\nfunction mergeLiteral(parts) {\n if (parts.length < 2) {\n return parts;\n }\n return parts.reduce(function (all, part) {\n var lastPart = all[all.length - 1];\n if (!lastPart ||\n lastPart.type !== PART_TYPE.literal ||\n part.type !== PART_TYPE.literal) {\n all.push(part);\n }\n else {\n lastPart.value += part.value;\n }\n return all;\n }, []);\n}\nexport function isFormatXMLElementFn(el) {\n return typeof el === 'function';\n}\n// TODO(skeleton): add skeleton support\nexport function formatToParts(els, locales, formatters, formats, values, currentPluralValue, \n// For debugging\noriginalMessage) {\n // Hot path for straight simple msg translations\n if (els.length === 1 && isLiteralElement(els[0])) {\n return [\n {\n type: PART_TYPE.literal,\n value: els[0].value,\n },\n ];\n }\n var result = [];\n for (var _i = 0, els_1 = els; _i < els_1.length; _i++) {\n var el = els_1[_i];\n // Exit early for string parts.\n if (isLiteralElement(el)) {\n result.push({\n type: PART_TYPE.literal,\n value: el.value,\n });\n continue;\n }\n // TODO: should this part be literal type?\n // Replace `#` in plural rules with the actual numeric value.\n if (isPoundElement(el)) {\n if (typeof currentPluralValue === 'number') {\n result.push({\n type: PART_TYPE.literal,\n value: formatters.getNumberFormat(locales).format(currentPluralValue),\n });\n }\n continue;\n }\n var varName = el.value;\n // Enforce that all required values are provided by the caller.\n if (!(values && varName in values)) {\n throw new MissingValueError(varName, originalMessage);\n }\n var value = values[varName];\n if (isArgumentElement(el)) {\n if (!value || typeof value === 'string' || typeof value === 'number') {\n value =\n typeof value === 'string' || typeof value === 'number'\n ? String(value)\n : '';\n }\n result.push({\n type: typeof value === 'string' ? PART_TYPE.literal : PART_TYPE.object,\n value: value,\n });\n continue;\n }\n // Recursively format plural and select parts' option — which can be a\n // nested pattern structure. The choosing of the option to use is\n // abstracted-by and delegated-to the part helper object.\n if (isDateElement(el)) {\n var style = typeof el.style === 'string'\n ? formats.date[el.style]\n : isDateTimeSkeleton(el.style)\n ? el.style.parsedOptions\n : undefined;\n result.push({\n type: PART_TYPE.literal,\n value: formatters\n .getDateTimeFormat(locales, style)\n .format(value),\n });\n continue;\n }\n if (isTimeElement(el)) {\n var style = typeof el.style === 'string'\n ? formats.time[el.style]\n : isDateTimeSkeleton(el.style)\n ? el.style.parsedOptions\n : undefined;\n result.push({\n type: PART_TYPE.literal,\n value: formatters\n .getDateTimeFormat(locales, style)\n .format(value),\n });\n continue;\n }\n if (isNumberElement(el)) {\n var style = typeof el.style === 'string'\n ? formats.number[el.style]\n : isNumberSkeleton(el.style)\n ? el.style.parsedOptions\n : undefined;\n if (style && style.scale) {\n value =\n value *\n (style.scale || 1);\n }\n result.push({\n type: PART_TYPE.literal,\n value: formatters\n .getNumberFormat(locales, style)\n .format(value),\n });\n continue;\n }\n if (isTagElement(el)) {\n var children = el.children, value_1 = el.value;\n var formatFn = values[value_1];\n if (!isFormatXMLElementFn(formatFn)) {\n throw new InvalidValueTypeError(value_1, 'function', originalMessage);\n }\n var parts = formatToParts(children, locales, formatters, formats, values, currentPluralValue);\n var chunks = formatFn(parts.map(function (p) { return p.value; }));\n if (!Array.isArray(chunks)) {\n chunks = [chunks];\n }\n result.push.apply(result, chunks.map(function (c) {\n return {\n type: typeof c === 'string' ? PART_TYPE.literal : PART_TYPE.object,\n value: c,\n };\n }));\n }\n if (isSelectElement(el)) {\n var opt = el.options[value] || el.options.other;\n if (!opt) {\n throw new InvalidValueError(el.value, value, Object.keys(el.options), originalMessage);\n }\n result.push.apply(result, formatToParts(opt.value, locales, formatters, formats, values));\n continue;\n }\n if (isPluralElement(el)) {\n var opt = el.options[\"=\" + value];\n if (!opt) {\n if (!Intl.PluralRules) {\n throw new FormatError(\"Intl.PluralRules is not available in this environment.\\nTry polyfilling it using \\\"@formatjs/intl-pluralrules\\\"\\n\", ErrorCode.MISSING_INTL_API, originalMessage);\n }\n var rule = formatters\n .getPluralRules(locales, { type: el.pluralType })\n .select(value - (el.offset || 0));\n opt = el.options[rule] || el.options.other;\n }\n if (!opt) {\n throw new InvalidValueError(el.value, value, Object.keys(el.options), originalMessage);\n }\n result.push.apply(result, formatToParts(opt.value, locales, formatters, formats, values, value - (el.offset || 0)));\n continue;\n }\n }\n return mergeLiteral(result);\n}\n","/*\nCopyright (c) 2014, Yahoo! Inc. All rights reserved.\nCopyrights licensed under the New BSD License.\nSee the accompanying LICENSE file for terms.\n*/\nimport { __assign, __spreadArray } from \"tslib\";\nimport { parse } from 'intl-messageformat-parser';\nimport * as memoize from 'fast-memoize';\nimport { formatToParts, PART_TYPE, } from './formatters';\n// -- MessageFormat --------------------------------------------------------\nfunction mergeConfig(c1, c2) {\n if (!c2) {\n return c1;\n }\n return __assign(__assign(__assign({}, (c1 || {})), (c2 || {})), Object.keys(c1).reduce(function (all, k) {\n all[k] = __assign(__assign({}, c1[k]), (c2[k] || {}));\n return all;\n }, {}));\n}\nfunction mergeConfigs(defaultConfig, configs) {\n if (!configs) {\n return defaultConfig;\n }\n return Object.keys(defaultConfig).reduce(function (all, k) {\n all[k] = mergeConfig(defaultConfig[k], configs[k]);\n return all;\n }, __assign({}, defaultConfig));\n}\nfunction createFastMemoizeCache(store) {\n return {\n create: function () {\n return {\n has: function (key) {\n return key in store;\n },\n get: function (key) {\n return store[key];\n },\n set: function (key, value) {\n store[key] = value;\n },\n };\n },\n };\n}\n// @ts-ignore this is to deal with rollup's default import shenanigans\nvar _memoizeIntl = memoize.default || memoize;\nvar memoizeIntl = _memoizeIntl;\nfunction createDefaultFormatters(cache) {\n if (cache === void 0) { cache = {\n number: {},\n dateTime: {},\n pluralRules: {},\n }; }\n return {\n getNumberFormat: memoizeIntl(function () {\n var _a;\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return new ((_a = Intl.NumberFormat).bind.apply(_a, __spreadArray([void 0], args)))();\n }, {\n cache: createFastMemoizeCache(cache.number),\n strategy: memoizeIntl.strategies.variadic,\n }),\n getDateTimeFormat: memoizeIntl(function () {\n var _a;\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return new ((_a = Intl.DateTimeFormat).bind.apply(_a, __spreadArray([void 0], args)))();\n }, {\n cache: createFastMemoizeCache(cache.dateTime),\n strategy: memoizeIntl.strategies.variadic,\n }),\n getPluralRules: memoizeIntl(function () {\n var _a;\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return new ((_a = Intl.PluralRules).bind.apply(_a, __spreadArray([void 0], args)))();\n }, {\n cache: createFastMemoizeCache(cache.pluralRules),\n strategy: memoizeIntl.strategies.variadic,\n }),\n };\n}\nvar IntlMessageFormat = /** @class */ (function () {\n function IntlMessageFormat(message, locales, overrideFormats, opts) {\n var _this = this;\n if (locales === void 0) { locales = IntlMessageFormat.defaultLocale; }\n this.formatterCache = {\n number: {},\n dateTime: {},\n pluralRules: {},\n };\n this.format = function (values) {\n var parts = _this.formatToParts(values);\n // Hot path for straight simple msg translations\n if (parts.length === 1) {\n return parts[0].value;\n }\n var result = parts.reduce(function (all, part) {\n if (!all.length ||\n part.type !== PART_TYPE.literal ||\n typeof all[all.length - 1] !== 'string') {\n all.push(part.value);\n }\n else {\n all[all.length - 1] += part.value;\n }\n return all;\n }, []);\n if (result.length <= 1) {\n return result[0] || '';\n }\n return result;\n };\n this.formatToParts = function (values) {\n return formatToParts(_this.ast, _this.locales, _this.formatters, _this.formats, values, undefined, _this.message);\n };\n this.resolvedOptions = function () { return ({\n locale: Intl.NumberFormat.supportedLocalesOf(_this.locales)[0],\n }); };\n this.getAst = function () { return _this.ast; };\n if (typeof message === 'string') {\n this.message = message;\n if (!IntlMessageFormat.__parse) {\n throw new TypeError('IntlMessageFormat.__parse must be set to process `message` of type `string`');\n }\n // Parse string messages into an AST.\n this.ast = IntlMessageFormat.__parse(message, {\n normalizeHashtagInPlural: false,\n ignoreTag: opts === null || opts === void 0 ? void 0 : opts.ignoreTag,\n });\n }\n else {\n this.ast = message;\n }\n if (!Array.isArray(this.ast)) {\n throw new TypeError('A message must be provided as a String or AST.');\n }\n // Creates a new object with the specified `formats` merged with the default\n // formats.\n this.formats = mergeConfigs(IntlMessageFormat.formats, overrideFormats);\n // Defined first because it's used to build the format pattern.\n this.locales = locales;\n this.formatters =\n (opts && opts.formatters) || createDefaultFormatters(this.formatterCache);\n }\n Object.defineProperty(IntlMessageFormat, \"defaultLocale\", {\n get: function () {\n if (!IntlMessageFormat.memoizedDefaultLocale) {\n IntlMessageFormat.memoizedDefaultLocale = new Intl.NumberFormat().resolvedOptions().locale;\n }\n return IntlMessageFormat.memoizedDefaultLocale;\n },\n enumerable: false,\n configurable: true\n });\n IntlMessageFormat.memoizedDefaultLocale = null;\n IntlMessageFormat.__parse = parse;\n // Default format options used as the prototype of the `formats` provided to the\n // constructor. These are used when constructing the internal Intl.NumberFormat\n // and Intl.DateTimeFormat instances.\n IntlMessageFormat.formats = {\n number: {\n currency: {\n style: 'currency',\n },\n percent: {\n style: 'percent',\n },\n },\n date: {\n short: {\n month: 'numeric',\n day: 'numeric',\n year: '2-digit',\n },\n medium: {\n month: 'short',\n day: 'numeric',\n year: 'numeric',\n },\n long: {\n month: 'long',\n day: 'numeric',\n year: 'numeric',\n },\n full: {\n weekday: 'long',\n month: 'long',\n day: 'numeric',\n year: 'numeric',\n },\n },\n time: {\n short: {\n hour: 'numeric',\n minute: 'numeric',\n },\n medium: {\n hour: 'numeric',\n minute: 'numeric',\n second: 'numeric',\n },\n long: {\n hour: 'numeric',\n minute: 'numeric',\n second: 'numeric',\n timeZoneName: 'short',\n },\n full: {\n hour: 'numeric',\n minute: 'numeric',\n second: 'numeric',\n timeZoneName: 'short',\n },\n },\n };\n return IntlMessageFormat;\n}());\nexport { IntlMessageFormat };\n","import { __extends } from \"tslib\";\nexport var IntlErrorCode;\n(function (IntlErrorCode) {\n IntlErrorCode[\"FORMAT_ERROR\"] = \"FORMAT_ERROR\";\n IntlErrorCode[\"UNSUPPORTED_FORMATTER\"] = \"UNSUPPORTED_FORMATTER\";\n IntlErrorCode[\"INVALID_CONFIG\"] = \"INVALID_CONFIG\";\n IntlErrorCode[\"MISSING_DATA\"] = \"MISSING_DATA\";\n IntlErrorCode[\"MISSING_TRANSLATION\"] = \"MISSING_TRANSLATION\";\n})(IntlErrorCode || (IntlErrorCode = {}));\nvar IntlError = /** @class */ (function (_super) {\n __extends(IntlError, _super);\n function IntlError(code, message, exception) {\n var _this = _super.call(this, \"[@formatjs/intl Error \" + code + \"] \" + message + \" \\n\" + (exception ? \"\\n\" + exception.message + \"\\n\" + exception.stack : '')) || this;\n _this.code = code;\n if (typeof Error.captureStackTrace === 'function') {\n Error.captureStackTrace(_this, IntlError);\n }\n return _this;\n }\n return IntlError;\n}(Error));\nexport { IntlError };\nvar UnsupportedFormatterError = /** @class */ (function (_super) {\n __extends(UnsupportedFormatterError, _super);\n function UnsupportedFormatterError(message, exception) {\n return _super.call(this, IntlErrorCode.UNSUPPORTED_FORMATTER, message, exception) || this;\n }\n return UnsupportedFormatterError;\n}(IntlError));\nexport { UnsupportedFormatterError };\nvar InvalidConfigError = /** @class */ (function (_super) {\n __extends(InvalidConfigError, _super);\n function InvalidConfigError(message, exception) {\n return _super.call(this, IntlErrorCode.INVALID_CONFIG, message, exception) || this;\n }\n return InvalidConfigError;\n}(IntlError));\nexport { InvalidConfigError };\nvar MissingDataError = /** @class */ (function (_super) {\n __extends(MissingDataError, _super);\n function MissingDataError(message, exception) {\n return _super.call(this, IntlErrorCode.MISSING_DATA, message, exception) || this;\n }\n return MissingDataError;\n}(IntlError));\nexport { MissingDataError };\nvar MessageFormatError = /** @class */ (function (_super) {\n __extends(MessageFormatError, _super);\n function MessageFormatError(message, locale, descriptor, exception) {\n var _this = _super.call(this, IntlErrorCode.FORMAT_ERROR, message + \" \\nLocale: \" + locale + \"\\nMessageID: \" + (descriptor === null || descriptor === void 0 ? void 0 : descriptor.id) + \"\\nDefault Message: \" + (descriptor === null || descriptor === void 0 ? void 0 : descriptor.defaultMessage) + \"\\nDescription: \" + (descriptor === null || descriptor === void 0 ? void 0 : descriptor.description) + \" \\n\", exception) || this;\n _this.descriptor = descriptor;\n return _this;\n }\n return MessageFormatError;\n}(IntlError));\nexport { MessageFormatError };\nvar MissingTranslationError = /** @class */ (function (_super) {\n __extends(MissingTranslationError, _super);\n function MissingTranslationError(descriptor, locale) {\n var _this = _super.call(this, IntlErrorCode.MISSING_TRANSLATION, \"Missing message: \\\"\" + descriptor.id + \"\\\" for locale \\\"\" + locale + \"\\\", using \" + (descriptor.defaultMessage ? 'default message' : 'id') + \" as fallback.\") || this;\n _this.descriptor = descriptor;\n return _this;\n }\n return MissingTranslationError;\n}(IntlError));\nexport { MissingTranslationError };\n","import { __assign, __spreadArray } from \"tslib\";\nimport { IntlMessageFormat } from 'intl-messageformat';\nimport * as memoize from 'fast-memoize';\nimport { UnsupportedFormatterError } from './error';\nexport function filterProps(props, whitelist, defaults) {\n if (defaults === void 0) { defaults = {}; }\n return whitelist.reduce(function (filtered, name) {\n if (name in props) {\n filtered[name] = props[name];\n }\n else if (name in defaults) {\n filtered[name] = defaults[name];\n }\n return filtered;\n }, {});\n}\nvar defaultErrorHandler = function (error) {\n if (process.env.NODE_ENV !== 'production') {\n console.error(error);\n }\n};\nexport var DEFAULT_INTL_CONFIG = {\n formats: {},\n messages: {},\n timeZone: undefined,\n defaultLocale: 'en',\n defaultFormats: {},\n onError: defaultErrorHandler,\n};\nexport function createIntlCache() {\n return {\n dateTime: {},\n number: {},\n message: {},\n relativeTime: {},\n pluralRules: {},\n list: {},\n displayNames: {},\n };\n}\nfunction createFastMemoizeCache(store) {\n return {\n create: function () {\n return {\n has: function (key) {\n return key in store;\n },\n get: function (key) {\n return store[key];\n },\n set: function (key, value) {\n store[key] = value;\n },\n };\n },\n };\n}\n// @ts-ignore this is to deal with rollup's default import shenanigans\nvar _memoizeIntl = memoize.default || memoize;\nvar memoizeIntl = _memoizeIntl;\n/**\n * Create intl formatters and populate cache\n * @param cache explicit cache to prevent leaking memory\n */\nexport function createFormatters(cache) {\n if (cache === void 0) { cache = createIntlCache(); }\n var RelativeTimeFormat = Intl.RelativeTimeFormat;\n var ListFormat = Intl.ListFormat;\n var DisplayNames = Intl.DisplayNames;\n var getDateTimeFormat = memoizeIntl(function () {\n var _a;\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return new ((_a = Intl.DateTimeFormat).bind.apply(_a, __spreadArray([void 0], args)))();\n }, {\n cache: createFastMemoizeCache(cache.dateTime),\n strategy: memoizeIntl.strategies.variadic,\n });\n var getNumberFormat = memoizeIntl(function () {\n var _a;\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return new ((_a = Intl.NumberFormat).bind.apply(_a, __spreadArray([void 0], args)))();\n }, {\n cache: createFastMemoizeCache(cache.number),\n strategy: memoizeIntl.strategies.variadic,\n });\n var getPluralRules = memoizeIntl(function () {\n var _a;\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return new ((_a = Intl.PluralRules).bind.apply(_a, __spreadArray([void 0], args)))();\n }, {\n cache: createFastMemoizeCache(cache.pluralRules),\n strategy: memoizeIntl.strategies.variadic,\n });\n return {\n getDateTimeFormat: getDateTimeFormat,\n getNumberFormat: getNumberFormat,\n getMessageFormat: memoizeIntl(function (message, locales, overrideFormats, opts) {\n return new IntlMessageFormat(message, locales, overrideFormats, __assign({ formatters: {\n getNumberFormat: getNumberFormat,\n getDateTimeFormat: getDateTimeFormat,\n getPluralRules: getPluralRules,\n } }, (opts || {})));\n }, {\n cache: createFastMemoizeCache(cache.message),\n strategy: memoizeIntl.strategies.variadic,\n }),\n getRelativeTimeFormat: memoizeIntl(function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return new (RelativeTimeFormat.bind.apply(RelativeTimeFormat, __spreadArray([void 0], args)))();\n }, {\n cache: createFastMemoizeCache(cache.relativeTime),\n strategy: memoizeIntl.strategies.variadic,\n }),\n getPluralRules: getPluralRules,\n getListFormat: memoizeIntl(function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return new (ListFormat.bind.apply(ListFormat, __spreadArray([void 0], args)))();\n }, {\n cache: createFastMemoizeCache(cache.list),\n strategy: memoizeIntl.strategies.variadic,\n }),\n getDisplayNames: memoizeIntl(function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return new (DisplayNames.bind.apply(DisplayNames, __spreadArray([void 0], args)))();\n }, {\n cache: createFastMemoizeCache(cache.displayNames),\n strategy: memoizeIntl.strategies.variadic,\n }),\n };\n}\nexport function getNamedFormat(formats, type, name, onError) {\n var formatType = formats && formats[type];\n var format;\n if (formatType) {\n format = formatType[name];\n }\n if (format) {\n return format;\n }\n onError(new UnsupportedFormatterError(\"No \" + type + \" format named: \" + name));\n}\n","import { __assign } from \"tslib\";\nimport * as React from 'react';\nimport { invariant } from '@formatjs/ecma402-abstract';\nimport { DEFAULT_INTL_CONFIG as CORE_DEFAULT_INTL_CONFIG } from '@formatjs/intl';\nexport function invariantIntlContext(intl) {\n invariant(intl, '[React Intl] Could not find required `intl` object. ' +\n ' needs to exist in the component ancestry.');\n}\nexport var DEFAULT_INTL_CONFIG = __assign(__assign({}, CORE_DEFAULT_INTL_CONFIG), { textComponent: React.Fragment });\n/**\n * Takes a `formatXMLElementFn`, and composes it in function, which passes\n * argument `parts` through, assigning unique key to each part, to prevent\n * \"Each child in a list should have a unique \"key\"\" React error.\n * @param formatXMLElementFn\n */\nexport function assignUniqueKeysToParts(formatXMLElementFn) {\n return function (parts) {\n // eslint-disable-next-line prefer-rest-params\n return formatXMLElementFn(React.Children.toArray(parts));\n };\n}\nexport function shallowEqual(objA, objB) {\n if (objA === objB) {\n return true;\n }\n if (!objA || !objB) {\n return false;\n }\n var aKeys = Object.keys(objA);\n var bKeys = Object.keys(objB);\n var len = aKeys.length;\n if (bKeys.length !== len) {\n return false;\n }\n for (var i = 0; i < len; i++) {\n var key = aKeys[i];\n if (objA[key] !== objB[key] ||\n !Object.prototype.hasOwnProperty.call(objB, key)) {\n return false;\n }\n }\n return true;\n}\n","import { __assign } from \"tslib\";\nimport { invariant } from '@formatjs/ecma402-abstract';\nimport { IntlMessageFormat, } from 'intl-messageformat';\nimport { MissingTranslationError, MessageFormatError } from './error';\nimport { TYPE } from 'intl-messageformat-parser';\nfunction setTimeZoneInOptions(opts, timeZone) {\n return Object.keys(opts).reduce(function (all, k) {\n all[k] = __assign({ timeZone: timeZone }, opts[k]);\n return all;\n }, {});\n}\nfunction deepMergeOptions(opts1, opts2) {\n var keys = Object.keys(__assign(__assign({}, opts1), opts2));\n return keys.reduce(function (all, k) {\n all[k] = __assign(__assign({}, (opts1[k] || {})), (opts2[k] || {}));\n return all;\n }, {});\n}\nfunction deepMergeFormatsAndSetTimeZone(f1, timeZone) {\n if (!timeZone) {\n return f1;\n }\n var mfFormats = IntlMessageFormat.formats;\n return __assign(__assign(__assign({}, mfFormats), f1), { date: deepMergeOptions(setTimeZoneInOptions(mfFormats.date, timeZone), setTimeZoneInOptions(f1.date || {}, timeZone)), time: deepMergeOptions(setTimeZoneInOptions(mfFormats.time, timeZone), setTimeZoneInOptions(f1.time || {}, timeZone)) });\n}\nexport function formatMessage(_a, state, messageDescriptor, values, opts) {\n var locale = _a.locale, formats = _a.formats, messages = _a.messages, defaultLocale = _a.defaultLocale, defaultFormats = _a.defaultFormats, onError = _a.onError, timeZone = _a.timeZone, defaultRichTextElements = _a.defaultRichTextElements;\n if (messageDescriptor === void 0) { messageDescriptor = { id: '' }; }\n var msgId = messageDescriptor.id, defaultMessage = messageDescriptor.defaultMessage;\n // `id` is a required field of a Message Descriptor.\n invariant(!!msgId, '[@formatjs/intl] An `id` must be provided to format a message.');\n var id = String(msgId);\n var message = \n // In case messages is Object.create(null)\n // e.g import('foo.json') from webpack)\n // See https://github.com/formatjs/formatjs/issues/1914\n messages &&\n Object.prototype.hasOwnProperty.call(messages, id) &&\n messages[id];\n // IMPORTANT: Hot path if `message` is AST with a single literal node\n if (Array.isArray(message) &&\n message.length === 1 &&\n message[0].type === TYPE.literal) {\n return message[0].value;\n }\n // IMPORTANT: Hot path straight lookup for performance\n if (!values &&\n message &&\n typeof message === 'string' &&\n !defaultRichTextElements) {\n return message.replace(/'\\{(.*?)\\}'/gi, \"{$1}\");\n }\n values = __assign(__assign({}, defaultRichTextElements), (values || {}));\n formats = deepMergeFormatsAndSetTimeZone(formats, timeZone);\n defaultFormats = deepMergeFormatsAndSetTimeZone(defaultFormats, timeZone);\n if (!message) {\n if (!defaultMessage ||\n (locale && locale.toLowerCase() !== defaultLocale.toLowerCase())) {\n // This prevents warnings from littering the console in development\n // when no `messages` are passed into the for the\n // default locale.\n onError(new MissingTranslationError(messageDescriptor, locale));\n }\n if (defaultMessage) {\n try {\n var formatter = state.getMessageFormat(defaultMessage, defaultLocale, defaultFormats, opts);\n return formatter.format(values);\n }\n catch (e) {\n onError(new MessageFormatError(\"Error formatting default message for: \\\"\" + id + \"\\\", rendering default message verbatim\", locale, messageDescriptor, e));\n return typeof defaultMessage === 'string' ? defaultMessage : id;\n }\n }\n return id;\n }\n // We have the translated message\n try {\n var formatter = state.getMessageFormat(message, locale, formats, __assign({ formatters: state }, (opts || {})));\n return formatter.format(values);\n }\n catch (e) {\n onError(new MessageFormatError(\"Error formatting message: \\\"\" + id + \"\\\", using \" + (defaultMessage ? 'default message' : 'id') + \" as fallback.\", locale, messageDescriptor, e));\n }\n if (defaultMessage) {\n try {\n var formatter = state.getMessageFormat(defaultMessage, defaultLocale, defaultFormats, opts);\n return formatter.format(values);\n }\n catch (e) {\n onError(new MessageFormatError(\"Error formatting the default message for: \\\"\" + id + \"\\\", rendering message verbatim\", locale, messageDescriptor, e));\n }\n }\n if (typeof message === 'string') {\n return message;\n }\n if (typeof defaultMessage === 'string') {\n return defaultMessage;\n }\n return id;\n}\n","import { getNamedFormat, filterProps } from './utils';\nimport { IntlError, IntlErrorCode } from './error';\nvar NUMBER_FORMAT_OPTIONS = [\n 'localeMatcher',\n 'style',\n 'currency',\n 'currencyDisplay',\n 'unit',\n 'unitDisplay',\n 'useGrouping',\n 'minimumIntegerDigits',\n 'minimumFractionDigits',\n 'maximumFractionDigits',\n 'minimumSignificantDigits',\n 'maximumSignificantDigits',\n // ES2020 NumberFormat\n 'compactDisplay',\n 'currencyDisplay',\n 'currencySign',\n 'notation',\n 'signDisplay',\n 'unit',\n 'unitDisplay',\n];\nexport function getFormatter(_a, getNumberFormat, options) {\n var locale = _a.locale, formats = _a.formats, onError = _a.onError;\n if (options === void 0) { options = {}; }\n var format = options.format;\n var defaults = ((format &&\n getNamedFormat(formats, 'number', format, onError)) ||\n {});\n var filteredOptions = filterProps(options, NUMBER_FORMAT_OPTIONS, defaults);\n return getNumberFormat(locale, filteredOptions);\n}\nexport function formatNumber(config, getNumberFormat, value, options) {\n if (options === void 0) { options = {}; }\n try {\n return getFormatter(config, getNumberFormat, options).format(value);\n }\n catch (e) {\n config.onError(new IntlError(IntlErrorCode.FORMAT_ERROR, 'Error formatting number.', e));\n }\n return String(value);\n}\nexport function formatNumberToParts(config, getNumberFormat, value, options) {\n if (options === void 0) { options = {}; }\n try {\n return getFormatter(config, getNumberFormat, options).formatToParts(value);\n }\n catch (e) {\n config.onError(new IntlError(IntlErrorCode.FORMAT_ERROR, 'Error formatting number.', e));\n }\n return [];\n}\n","import { getNamedFormat, filterProps } from './utils';\nimport { FormatError, ErrorCode } from 'intl-messageformat';\nimport { MessageFormatError } from './error';\nvar RELATIVE_TIME_FORMAT_OPTIONS = ['numeric', 'style'];\nfunction getFormatter(_a, getRelativeTimeFormat, options) {\n var locale = _a.locale, formats = _a.formats, onError = _a.onError;\n if (options === void 0) { options = {}; }\n var format = options.format;\n var defaults = (!!format && getNamedFormat(formats, 'relative', format, onError)) || {};\n var filteredOptions = filterProps(options, RELATIVE_TIME_FORMAT_OPTIONS, defaults);\n return getRelativeTimeFormat(locale, filteredOptions);\n}\nexport function formatRelativeTime(config, getRelativeTimeFormat, value, unit, options) {\n if (options === void 0) { options = {}; }\n if (!unit) {\n unit = 'second';\n }\n var RelativeTimeFormat = Intl.RelativeTimeFormat;\n if (!RelativeTimeFormat) {\n config.onError(new FormatError(\"Intl.RelativeTimeFormat is not available in this environment.\\nTry polyfilling it using \\\"@formatjs/intl-relativetimeformat\\\"\\n\", ErrorCode.MISSING_INTL_API));\n }\n try {\n return getFormatter(config, getRelativeTimeFormat, options).format(value, unit);\n }\n catch (e) {\n config.onError(new MessageFormatError('Error formatting relative time.', e));\n }\n return String(value);\n}\n","import { __assign } from \"tslib\";\nimport { filterProps, getNamedFormat } from './utils';\nimport { IntlError, IntlErrorCode } from './error';\nvar DATE_TIME_FORMAT_OPTIONS = [\n 'localeMatcher',\n 'formatMatcher',\n 'timeZone',\n 'hour12',\n 'weekday',\n 'era',\n 'year',\n 'month',\n 'day',\n 'hour',\n 'minute',\n 'second',\n 'timeZoneName',\n 'hourCycle',\n 'dateStyle',\n 'timeStyle',\n 'calendar',\n // 'dayPeriod',\n 'numberingSystem',\n];\nexport function getFormatter(_a, type, getDateTimeFormat, options) {\n var locale = _a.locale, formats = _a.formats, onError = _a.onError, timeZone = _a.timeZone;\n if (options === void 0) { options = {}; }\n var format = options.format;\n var defaults = __assign(__assign({}, (timeZone && { timeZone: timeZone })), (format && getNamedFormat(formats, type, format, onError)));\n var filteredOptions = filterProps(options, DATE_TIME_FORMAT_OPTIONS, \n // @ts-expect-error es2020 has a lot stuff from es2021 bleed in\n defaults);\n if (type === 'time' &&\n !filteredOptions.hour &&\n !filteredOptions.minute &&\n !filteredOptions.second &&\n !filteredOptions.timeStyle &&\n !filteredOptions.dateStyle) {\n // Add default formatting options if hour, minute, or second isn't defined.\n filteredOptions = __assign(__assign({}, filteredOptions), { hour: 'numeric', minute: 'numeric' });\n }\n return getDateTimeFormat(locale, filteredOptions);\n}\nexport function formatDate(config, getDateTimeFormat) {\n var _a = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n _a[_i - 2] = arguments[_i];\n }\n var value = _a[0], _b = _a[1], options = _b === void 0 ? {} : _b;\n var date = typeof value === 'string' ? new Date(value || 0) : value;\n try {\n return getFormatter(config, 'date', getDateTimeFormat, options).format(date);\n }\n catch (e) {\n config.onError(new IntlError(IntlErrorCode.FORMAT_ERROR, 'Error formatting date.', e));\n }\n return String(date);\n}\nexport function formatTime(config, getDateTimeFormat) {\n var _a = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n _a[_i - 2] = arguments[_i];\n }\n var value = _a[0], _b = _a[1], options = _b === void 0 ? {} : _b;\n var date = typeof value === 'string' ? new Date(value || 0) : value;\n try {\n return getFormatter(config, 'time', getDateTimeFormat, options).format(date);\n }\n catch (e) {\n config.onError(new IntlError(IntlErrorCode.FORMAT_ERROR, 'Error formatting time.', e));\n }\n return String(date);\n}\nexport function formatDateTimeRange(config, getDateTimeFormat) {\n var _a = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n _a[_i - 2] = arguments[_i];\n }\n var from = _a[0], to = _a[1], _b = _a[2], options = _b === void 0 ? {} : _b;\n var timeZone = config.timeZone, locale = config.locale, onError = config.onError;\n var filteredOptions = filterProps(options, DATE_TIME_FORMAT_OPTIONS, timeZone ? { timeZone: timeZone } : {});\n try {\n return getDateTimeFormat(locale, filteredOptions).formatRange(from, to);\n }\n catch (e) {\n onError(new IntlError(IntlErrorCode.FORMAT_ERROR, 'Error formatting date time range.', e));\n }\n return String(from);\n}\nexport function formatDateToParts(config, getDateTimeFormat) {\n var _a = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n _a[_i - 2] = arguments[_i];\n }\n var value = _a[0], _b = _a[1], options = _b === void 0 ? {} : _b;\n var date = typeof value === 'string' ? new Date(value || 0) : value;\n try {\n return getFormatter(config, 'date', getDateTimeFormat, options).formatToParts(date);\n }\n catch (e) {\n config.onError(new IntlError(IntlErrorCode.FORMAT_ERROR, 'Error formatting date.', e));\n }\n return [];\n}\nexport function formatTimeToParts(config, getDateTimeFormat) {\n var _a = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n _a[_i - 2] = arguments[_i];\n }\n var value = _a[0], _b = _a[1], options = _b === void 0 ? {} : _b;\n var date = typeof value === 'string' ? new Date(value || 0) : value;\n try {\n return getFormatter(config, 'time', getDateTimeFormat, options).formatToParts(date);\n }\n catch (e) {\n config.onError(new IntlError(IntlErrorCode.FORMAT_ERROR, 'Error formatting time.', e));\n }\n return [];\n}\n","import { filterProps } from './utils';\nimport { MessageFormatError } from './error';\nimport { ErrorCode, FormatError } from 'intl-messageformat';\nvar PLURAL_FORMAT_OPTIONS = [\n 'localeMatcher',\n 'type',\n];\nexport function formatPlural(_a, getPluralRules, value, options) {\n var locale = _a.locale, onError = _a.onError;\n if (options === void 0) { options = {}; }\n if (!Intl.PluralRules) {\n onError(new FormatError(\"Intl.PluralRules is not available in this environment.\\nTry polyfilling it using \\\"@formatjs/intl-pluralrules\\\"\\n\", ErrorCode.MISSING_INTL_API));\n }\n var filteredOptions = filterProps(options, PLURAL_FORMAT_OPTIONS);\n try {\n return getPluralRules(locale, filteredOptions).select(value);\n }\n catch (e) {\n onError(new MessageFormatError('Error formatting plural.', e));\n }\n return 'other';\n}\n","import { filterProps } from './utils';\nimport { FormatError, ErrorCode } from 'intl-messageformat';\nimport { IntlError, IntlErrorCode } from './error';\nvar LIST_FORMAT_OPTIONS = [\n 'localeMatcher',\n 'type',\n 'style',\n];\nvar now = Date.now();\nfunction generateToken(i) {\n return now + \"_\" + i + \"_\" + now;\n}\nexport function formatList(_a, getListFormat, values, options) {\n var locale = _a.locale, onError = _a.onError;\n if (options === void 0) { options = {}; }\n var ListFormat = Intl.ListFormat;\n if (!ListFormat) {\n onError(new FormatError(\"Intl.ListFormat is not available in this environment.\\nTry polyfilling it using \\\"@formatjs/intl-listformat\\\"\\n\", ErrorCode.MISSING_INTL_API));\n }\n var filteredOptions = filterProps(options, LIST_FORMAT_OPTIONS);\n try {\n var richValues_1 = {};\n var serializedValues = values.map(function (v, i) {\n if (typeof v === 'object') {\n var id = generateToken(i);\n richValues_1[id] = v;\n return id;\n }\n return String(v);\n });\n if (!Object.keys(richValues_1).length) {\n return getListFormat(locale, filteredOptions).format(serializedValues);\n }\n var parts = getListFormat(locale, filteredOptions).formatToParts(serializedValues);\n return parts.reduce(function (all, el) {\n var val = el.value;\n if (richValues_1[val]) {\n all.push(richValues_1[val]);\n }\n else if (typeof all[all.length - 1] === 'string') {\n all[all.length - 1] += val;\n }\n else {\n all.push(val);\n }\n return all;\n }, []);\n }\n catch (e) {\n onError(new IntlError(IntlErrorCode.FORMAT_ERROR, 'Error formatting list.', e));\n }\n // @ts-ignore\n return values;\n}\n","import { filterProps } from './utils';\nimport { FormatError, ErrorCode } from 'intl-messageformat';\nimport { IntlErrorCode, IntlError } from './error';\nvar DISPLAY_NAMES_OPTONS = [\n 'localeMatcher',\n 'style',\n 'type',\n 'fallback',\n];\nexport function formatDisplayName(_a, getDisplayNames, value, options) {\n var locale = _a.locale, onError = _a.onError;\n var DisplayNames = Intl.DisplayNames;\n if (!DisplayNames) {\n onError(new FormatError(\"Intl.DisplayNames is not available in this environment.\\nTry polyfilling it using \\\"@formatjs/intl-displaynames\\\"\\n\", ErrorCode.MISSING_INTL_API));\n }\n var filteredOptions = filterProps(options, DISPLAY_NAMES_OPTONS);\n try {\n return getDisplayNames(locale, filteredOptions).of(value);\n }\n catch (e) {\n onError(new IntlError(IntlErrorCode.FORMAT_ERROR, 'Error formatting display name.', e));\n }\n}\n","import { __assign } from \"tslib\";\nimport { createFormatters, DEFAULT_INTL_CONFIG } from './utils';\nimport { InvalidConfigError, MissingDataError } from './error';\nimport { formatNumber, formatNumberToParts } from './number';\nimport { formatRelativeTime } from './relativeTime';\nimport { formatDate, formatDateToParts, formatTime, formatTimeToParts, formatDateTimeRange, } from './dateTime';\nimport { formatPlural } from './plural';\nimport { formatMessage } from './message';\nimport { formatList } from './list';\nimport { formatDisplayName } from './displayName';\nfunction messagesContainString(messages) {\n var firstMessage = messages\n ? messages[Object.keys(messages)[0]]\n : undefined;\n return typeof firstMessage === 'string';\n}\nfunction verifyConfigMessages(config) {\n if (config.defaultRichTextElements &&\n messagesContainString(config.messages || {})) {\n console.warn(\"[@formatjs/intl] \\\"defaultRichTextElements\\\" was specified but \\\"message\\\" was not pre-compiled. \\nPlease consider using \\\"@formatjs/cli\\\" to pre-compile your messages for performance.\\nFor more details see https://formatjs.io/docs/getting-started/message-distribution\");\n }\n}\n/**\n * Create intl object\n * @param config intl config\n * @param cache cache for formatter instances to prevent memory leak\n */\nexport function createIntl(config, cache) {\n var formatters = createFormatters(cache);\n var resolvedConfig = __assign(__assign({}, DEFAULT_INTL_CONFIG), config);\n var locale = resolvedConfig.locale, defaultLocale = resolvedConfig.defaultLocale, onError = resolvedConfig.onError;\n if (!locale) {\n if (onError) {\n onError(new InvalidConfigError(\"\\\"locale\\\" was not configured, using \\\"\" + defaultLocale + \"\\\" as fallback. See https://formatjs.io/docs/react-intl/api#intlshape for more details\"));\n }\n // Since there's no registered locale data for `locale`, this will\n // fallback to the `defaultLocale` to make sure things can render.\n // The `messages` are overridden to the `defaultProps` empty object\n // to maintain referential equality across re-renders. It's assumed\n // each contains a `defaultMessage` prop.\n resolvedConfig.locale = resolvedConfig.defaultLocale || 'en';\n }\n else if (!Intl.NumberFormat.supportedLocalesOf(locale).length && onError) {\n onError(new MissingDataError(\"Missing locale data for locale: \\\"\" + locale + \"\\\" in Intl.NumberFormat. Using default locale: \\\"\" + defaultLocale + \"\\\" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details\"));\n }\n else if (!Intl.DateTimeFormat.supportedLocalesOf(locale).length &&\n onError) {\n onError(new MissingDataError(\"Missing locale data for locale: \\\"\" + locale + \"\\\" in Intl.DateTimeFormat. Using default locale: \\\"\" + defaultLocale + \"\\\" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details\"));\n }\n verifyConfigMessages(resolvedConfig);\n return __assign(__assign({}, resolvedConfig), { formatters: formatters, formatNumber: formatNumber.bind(null, resolvedConfig, formatters.getNumberFormat), formatNumberToParts: formatNumberToParts.bind(null, resolvedConfig, formatters.getNumberFormat), formatRelativeTime: formatRelativeTime.bind(null, resolvedConfig, formatters.getRelativeTimeFormat), formatDate: formatDate.bind(null, resolvedConfig, formatters.getDateTimeFormat), formatDateToParts: formatDateToParts.bind(null, resolvedConfig, formatters.getDateTimeFormat), formatTime: formatTime.bind(null, resolvedConfig, formatters.getDateTimeFormat), formatDateTimeRange: formatDateTimeRange.bind(null, resolvedConfig, formatters.getDateTimeFormat), formatTimeToParts: formatTimeToParts.bind(null, resolvedConfig, formatters.getDateTimeFormat), formatPlural: formatPlural.bind(null, resolvedConfig, formatters.getPluralRules), formatMessage: formatMessage.bind(null, resolvedConfig, formatters), formatList: formatList.bind(null, resolvedConfig, formatters.getListFormat), formatDisplayName: formatDisplayName.bind(null, resolvedConfig, formatters.getDisplayNames) });\n}\n","/*\n * Copyright 2015, Yahoo Inc.\n * Copyrights licensed under the New BSD License.\n * See the accompanying LICENSE file for terms.\n */\nimport { __assign, __extends, __rest, __spreadArray } from \"tslib\";\nimport * as React from 'react';\nimport { Provider } from './injectIntl';\nimport { DEFAULT_INTL_CONFIG, invariantIntlContext, assignUniqueKeysToParts, shallowEqual, } from '../utils';\nimport { formatMessage as coreFormatMessage, createIntl as coreCreateIntl, createIntlCache, } from '@formatjs/intl';\nimport { isFormatXMLElementFn, } from 'intl-messageformat';\nfunction processIntlConfig(config) {\n return {\n locale: config.locale,\n timeZone: config.timeZone,\n formats: config.formats,\n textComponent: config.textComponent,\n messages: config.messages,\n defaultLocale: config.defaultLocale,\n defaultFormats: config.defaultFormats,\n onError: config.onError,\n wrapRichTextChunksInFragment: config.wrapRichTextChunksInFragment,\n defaultRichTextElements: config.defaultRichTextElements,\n };\n}\nfunction assignUniqueKeysToFormatXMLElementFnArgument(values) {\n if (!values) {\n return values;\n }\n return Object.keys(values).reduce(function (acc, k) {\n var v = values[k];\n acc[k] = isFormatXMLElementFn(v)\n ? assignUniqueKeysToParts(v)\n : v;\n return acc;\n }, {});\n}\nvar formatMessage = function (config, formatters, descriptor, rawValues) {\n var rest = [];\n for (var _i = 4; _i < arguments.length; _i++) {\n rest[_i - 4] = arguments[_i];\n }\n var values = assignUniqueKeysToFormatXMLElementFnArgument(rawValues);\n var chunks = coreFormatMessage.apply(void 0, __spreadArray([config,\n formatters,\n descriptor, values], rest));\n if (Array.isArray(chunks)) {\n return React.Children.toArray(chunks);\n }\n return chunks;\n};\n/**\n * Create intl object\n * @param config intl config\n * @param cache cache for formatter instances to prevent memory leak\n */\nexport var createIntl = function (_a, cache) {\n var rawDefaultRichTextElements = _a.defaultRichTextElements, config = __rest(_a, [\"defaultRichTextElements\"]);\n var defaultRichTextElements = assignUniqueKeysToFormatXMLElementFnArgument(rawDefaultRichTextElements);\n var coreIntl = coreCreateIntl(__assign(__assign(__assign({}, DEFAULT_INTL_CONFIG), config), { defaultRichTextElements: defaultRichTextElements }), cache);\n return __assign(__assign({}, coreIntl), { formatMessage: formatMessage.bind(null, {\n locale: coreIntl.locale,\n timeZone: coreIntl.timeZone,\n formats: coreIntl.formats,\n defaultLocale: coreIntl.defaultLocale,\n defaultFormats: coreIntl.defaultFormats,\n messages: coreIntl.messages,\n onError: coreIntl.onError,\n defaultRichTextElements: defaultRichTextElements,\n }, coreIntl.formatters) });\n};\nvar IntlProvider = /** @class */ (function (_super) {\n __extends(IntlProvider, _super);\n function IntlProvider() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.cache = createIntlCache();\n _this.state = {\n cache: _this.cache,\n intl: createIntl(processIntlConfig(_this.props), _this.cache),\n prevConfig: processIntlConfig(_this.props),\n };\n return _this;\n }\n IntlProvider.getDerivedStateFromProps = function (props, _a) {\n var prevConfig = _a.prevConfig, cache = _a.cache;\n var config = processIntlConfig(props);\n if (!shallowEqual(prevConfig, config)) {\n return {\n intl: createIntl(config, cache),\n prevConfig: config,\n };\n }\n return null;\n };\n IntlProvider.prototype.render = function () {\n invariantIntlContext(this.state.intl);\n return React.createElement(Provider, { value: this.state.intl }, this.props.children);\n };\n IntlProvider.displayName = 'IntlProvider';\n IntlProvider.defaultProps = DEFAULT_INTL_CONFIG;\n return IntlProvider;\n}(React.PureComponent));\nexport default IntlProvider;\n","class DepartmentsArea {\n /**\n * @type {null|HTMLElement}\n * @private\n */\n privateArea = null;\n\n /**\n * @type {null|function}\n * @private\n */\n privateSubscriber = null;\n\n set area(value) {\n if (this.privateArea === value) {\n return;\n }\n\n this.privateArea = value;\n\n if (this.privateSubscriber) {\n this.privateSubscriber(this.area);\n }\n }\n\n get area() {\n return this.privateArea;\n }\n\n subscribe(fn) {\n this.privateSubscriber = fn;\n\n return () => {\n this.privateSubscriber = null;\n };\n }\n}\n\nexport default new DepartmentsArea();\n","// react\nimport React, { Component } from 'react';\n\n// third-party\nimport classNames from 'classnames';\nimport PropTypes from 'prop-types';\nimport Slick from 'react-slick';\nimport { connect } from 'react-redux';\n\n// application\nclass StroykaSlickBase extends Component {\n slickRef;\n\n constructor(props) {\n super(props);\n\n this.state = {\n preventClick: false,\n activeSlides: this.getActiveSlides(this.getStartPosition()),\n slidesToShow: this.getSlidesToShow(),\n };\n }\n\n componentDidMount() {\n if (!this.element) {\n return;\n }\n\n this.element.addEventListener('mousedown', this.onMousedown);\n\n if (this.slickRef) {\n this.slickRef.slickGoTo(this.getStartPosition(), true);\n }\n\n this.createMedias();\n }\n\n componentDidUpdate(prevProps) {\n const { children: prevChildren } = prevProps;\n const { children: currChildren } = this.props;\n\n const prevDirection = 'ltr';\n const currDirection = 'ltr';\n\n if (currDirection !== prevDirection && this.slickRef) {\n this.slickRef.slickGoTo(this.getStartPosition(), true);\n }\n\n if (currChildren !== prevChildren) {\n // If the slides have changed, we also need to change the active slides.\n setTimeout(() => {\n this.setState({ activeSlides: this.getActiveSlides(this.getStartPosition()) });\n }, 0);\n }\n\n const { responsive: prevResponsive } = prevProps;\n const { responsive: currResponsive } = this.props;\n\n if (currResponsive !== prevResponsive) {\n this.unsubscribeMedias();\n this.createMedias();\n }\n }\n\n componentWillUnmount() {\n this.unsubscribeMedias();\n\n if (!this.element) {\n return;\n }\n\n this.element.removeEventListener('mousedown', this.onMousedown);\n }\n\n getSlidesCount() {\n const { children } = this.props;\n\n return React.Children.toArray(children).length;\n }\n\n // react-slick has a bug due to which it is initialized\n // with the incorrect position if the RTL property is true\n // this function returns the correct values\n getStartPosition() {\n let { infinite } = this.props;\n const direction = 'ltr';\n\n infinite = infinite === true || infinite === undefined;\n\n if (direction === 'ltr') {\n return 0;\n }\n\n const slidesToShow = this.getSlidesToShow();\n const slidesCount = this.getSlidesCount();\n\n if (!infinite) {\n return Math.max(0, slidesCount - slidesToShow);\n }\n\n return (Math.ceil(slidesCount / slidesToShow) - 1) * slidesToShow;\n }\n\n // returns indexes of active slides by currentIndex\n getActiveSlides(currentIndex) {\n const slidesToShow = this.getSlidesToShow();\n const activeSlides = [];\n const slidesCount = this.getSlidesCount();\n\n const firstSlide = Math.max(\n 0,\n Math.min(\n slidesCount - slidesToShow,\n currentIndex,\n ),\n );\n const lastSlide = Math.min(\n slidesCount,\n firstSlide + slidesToShow,\n );\n\n for (let i = firstSlide; i < lastSlide; i += 1) {\n activeSlides.push(i);\n }\n\n return activeSlides;\n }\n\n getSlidesToShow() {\n const { responsive, slidesToShow } = this.props;\n\n let result = slidesToShow || 1;\n\n if (responsive) {\n responsive.forEach((options) => {\n const { matches } = matchMedia(`(max-width: ${options.breakpoint}px)`);\n\n if (matches && options.settings.slidesToShow) {\n result = options.settings.slidesToShow;\n }\n });\n }\n\n return result;\n }\n\n unsubscribeMedias = () => { };\n\n originalSlickNext = () => { };\n\n originalSlickPrev = () => { };\n\n setRef = (ref) => {\n this.element = ref;\n };\n\n onMousedown = (event) => {\n const downX = event.screenX;\n const downY = event.screenY;\n\n const onMousemove = (moveEvent) => {\n const { preventClick } = this.state;\n\n if (preventClick) {\n return;\n }\n\n const distance = Math.sqrt(\n (Math.abs(downX - moveEvent.screenX) ** 2)\n + (Math.abs(downY - moveEvent.screenY) ** 2),\n );\n\n if (moveEvent.cancelable && distance > 3) {\n moveEvent.preventDefault();\n }\n\n if (distance > 15) {\n this.setState({ preventClick: true });\n }\n };\n const onMouseup = () => {\n this.setState({ preventClick: false });\n\n document.removeEventListener('mousemove', onMousemove);\n document.removeEventListener('mouseup', onMouseup);\n };\n\n document.addEventListener('mousemove', onMousemove);\n document.addEventListener('mouseup', onMouseup);\n };\n\n beforeChange = (oldIndex, newIndex) => {\n const { beforeChange } = this.props;\n\n if (beforeChange) {\n beforeChange(oldIndex, newIndex);\n }\n\n // react-slick incorrectly adds the .slick-active class to slides\n // if the RTL parameter is true so we will do it ourselves\n setTimeout(() => {\n this.setState({ activeSlides: this.getActiveSlides(newIndex) });\n }, 0);\n };\n\n setSlickRef = (ref) => {\n const { forwardRef } = this.props;\n\n if (forwardRef) {\n forwardRef(ref);\n }\n\n if (ref && ref !== this.slickRef) {\n // react-slick forgot that if the RTL parameter is true,\n // then the next and prev methods need to be swapped, so let's do it yourself\n this.originalSlickNext = ref.slickNext;\n this.originalSlickPrev = ref.slickPrev;\n\n // eslint-disable-next-line no-param-reassign\n ref.slickNext = this.slickNext;\n // eslint-disable-next-line no-param-reassign\n ref.slickPrev = this.slickPrev;\n }\n\n this.slickRef = ref;\n };\n\n slickNext = () => {\n const direction = 'ltr';\n\n if (direction === 'rtl') {\n this.originalSlickPrev();\n } else {\n this.originalSlickNext();\n }\n };\n\n slickPrev = () => {\n const direction = 'ltr';\n\n if (direction === 'rtl') {\n this.originalSlickNext();\n } else {\n this.originalSlickPrev();\n }\n };\n\n createMedias() {\n const { responsive, slidesToShow } = this.props;\n\n if (responsive && responsive.length > 0) {\n const subscriptions = [];\n\n const createMedia = (query, slidesToShow) => {\n const media = matchMedia(query);\n\n const onChange = () => {\n const { matches } = media;\n\n if (matches && slidesToShow) {\n this.setState(() => ({ slidesToShow }));\n }\n };\n\n if (media.addEventListener) {\n media.addEventListener('change', onChange);\n } else {\n media.addListener(onChange);\n }\n\n subscriptions.push(() => {\n if (media.removeEventListener) {\n media.removeEventListener('change', onChange);\n } else {\n media.removeListener(onChange);\n }\n });\n };\n\n createMedia(`(min-width: ${responsive[0].breakpoint}.02px)`, slidesToShow || 1);\n\n responsive.forEach((options, index) => {\n const query = [\n `(max-width: ${options.breakpoint}px)`,\n ];\n\n if (responsive.length - 1 !== index) {\n query.push(`(min-width: ${responsive[index + 1].breakpoint}.02px)`);\n }\n\n createMedia(query.join(' and '), options.settings.slidesToShow);\n });\n\n this.unsubscribeMedias = () => {\n subscriptions.forEach((x) => x());\n };\n }\n }\n\n render() {\n const {\n children,\n forwardRef,\n locale,\n beforeChange,\n ...otherProps\n } = this.props;\n const { preventClick, activeSlides, slidesToShow } = this.state;\n const direction = 'ltr';\n\n const classes = classNames('slick-prevent-click', {\n 'slick-prevent-click--active': preventClick,\n });\n\n // we need to reverse slides if direction is RTL\n // because react-slick displays them in the wrong order\n let reversedChildren = React.Children.toArray(children);\n\n if (direction === 'rtl') {\n reversedChildren = children.slice(0);\n reversedChildren.reverse();\n }\n\n reversedChildren = reversedChildren.map((slide, index) => {\n // react-slick incorrectly adds the .slick-active class to slides\n // if the RTL parameter is true so we will do it ourselves\n const slideClasses = classNames({ 'correct-slick-active': activeSlides.includes(index) });\n\n return (\n \n {slide}\n
\n );\n });\n\n return (\n // eslint-disable-next-line jsx-a11y/no-static-element-interactions\n \n slidesToShow}\n ref={this.setSlickRef}\n >\n {reversedChildren}\n \n
\n );\n }\n}\n\nStroykaSlickBase.propTypes = {\n /** current locale */\n locale: PropTypes.string,\n};\n\nconst mapStateToProps = (state) => ({\n locale: state.locale,\n});\n\nconst StroykaSlick = connect(mapStateToProps)(StroykaSlickBase);\n\nexport default React.forwardRef((props, ref) => (\n \n));\n","// react\nimport React, { Component } from 'react';\n\n// third-party\nimport classNames from 'classnames';\nimport PropTypes from 'prop-types';\nimport { connect } from 'react-redux';\nimport { Link } from 'react-router-dom';\n\n// application\nimport departmentsAria from '../../services/departmentsArea';\nimport StroykaSlick from '../shared/StroykaSlick';\n\nclass BlockSlideShow extends Component {\n departmentsAreaRef = null;\n\n media = window.matchMedia('(min-width: 992px)');\n\n slides = [];\n\n componentDidMount() {\n if (this.media.addEventListener) {\n this.media.addEventListener('change', this.onChangeMedia);\n } else {\n // noinspection JSDeprecatedSymbols\n this.media.addListener(this.onChangeMedia);\n }\n }\n\n componentWillUnmount() {\n departmentsAria.area = null;\n\n if (this.media.removeEventListener) {\n this.media.removeEventListener('change', this.onChangeMedia);\n } else {\n // noinspection JSDeprecatedSymbols\n this.media.removeListener(this.onChangeMedia);\n }\n }\n\n onChangeMedia = () => {\n if (this.media.matches) {\n departmentsAria.area = this.departmentsAreaRef;\n }\n };\n\n setDepartmentsAreaRef = (ref) => {\n this.departmentsAreaRef = ref;\n\n if (this.media.matches) {\n departmentsAria.area = this.departmentsAreaRef;\n }\n };\n\n render() {\n const { withDepartments, slides, speed } = this.props;\n const slickSettings = {\n dots: true,\n arrows: true,\n infinite: true,\n speed: 400,\n slidesToShow: 1,\n slidesToScroll: 1,\n autoplay: speed?.slideSpeed !== 0,\n autoplaySpeed: speed?.slideSpeed * 1000,\n };\n const blockClasses = classNames('block-slideshow block', {\n 'block-slideshow--layout--full': !withDepartments,\n 'block-slideshow--layout--with-departments': withDepartments,\n });\n\n const layoutClasses = classNames('col-12', {\n 'col-lg-12': !withDepartments,\n 'col-lg-9': withDepartments,\n });\n\n const slideComponents = slides.map((slide, index) => {\n const image = withDepartments ? slide.imageClassic : slide.imageFull;\n\n let actionButton;\n if (slide.action && slide.action.text && slide.action.link) {\n if (slide?.action?.link.includes('http')) {\n actionButton = (\n \n \n {slide.action.text}\n \n
\n );\n } else {\n actionButton = (\n \n \n {slide.action.text}\n \n
\n ); \n }\n\n }\n return (\n \n
{\n if (slide.action.link) {\n if (slide?.action?.link.includes('http')) {\n window.open(slide.action.link)\n } else {\n window.location.href = slide.action.link\n }\n }\n }}\n style={{\n backgroundImage: `url(${image})`,\n cursor: 'pointer'\n }}\n />\n
\n
\n
\n
\n\n {actionButton}\n
\n
\n );\n });\n\n return (\n
\n
\n
\n {withDepartments && (\n
\n )}\n\n
\n
\n {slideComponents} \n
\n
\n
\n
\n
\n );\n }\n}\n\nBlockSlideShow.propTypes = {\n withDepartments: PropTypes.bool,\n /** current locale */\n locale: PropTypes.string,\n};\n\nBlockSlideShow.defaultProps = {\n withDepartments: false,\n};\n\nconst mapStateToProps = (state) => ({\n locale: state.locale,\n});\n\nexport default connect(mapStateToProps)(BlockSlideShow);\n","// react\nimport React from 'react';\nimport '../../scss/redirect.css';\n\nfunction RawHTML(props) {\n const { html } = props;\n return (\n
\n );\n}\n\nexport default RawHTML;\n","import getApi from './api';\nimport { GetAPIEndpoint } from '../../configuration';\n\nfunction getHeaders() {\n const Authorization = `Bearer ${localStorage.getItem('access_token') ?? sessionStorage.getItem('access_token')}`;\n return { Authorization };\n}\nconst productApi = {\n getProductBySlug: (slug) => getApi().get(`${GetAPIEndpoint()}/api/products/${slug}`, { headers: getHeaders() }),\n\n getProductsList: (options = {}, filterValues = {}, filters = [], includeFilters = true) => getApi().get(`${GetAPIEndpoint()}/api/products?includeFilters=${includeFilters}&o=${encodeURIComponent(JSON.stringify({\n options, filterValues, filters,\n }))}`, { headers: getHeaders() }),\n\n getSuggestions: (query, options) => getApi().get(`${GetAPIEndpoint()}/api/products/suggestions?o=${JSON.stringify({ options })}&q=${query}`, { headers: getHeaders() }),\n};\nexport default productApi;\n","import {\n useCallback,\n useEffect,\n useMemo,\n useState,\n} from 'react';\n\nexport function useDeferredData(source, initialData, deps = []) {\n const [state, setState] = useState(() => ({ isLoading: true, data: initialData }));\n const memoizedSource = useCallback(source, deps);\n\n useEffect(() => {\n let canceled = false;\n\n setState((curState) => {\n if (!curState.isLoading) {\n return { ...curState, isLoading: true };\n }\n\n return curState;\n });\n\n memoizedSource().then((data) => {\n if (canceled) {\n return;\n }\n\n setState(() => ({ isLoading: false, data }));\n });\n\n return () => {\n canceled = true;\n };\n }, [memoizedSource]);\n\n return state;\n}\n\nexport function useProductTabs(tabs, productsSource, region) {\n const [currentTabId, setCurrentTabId] = useState(1);\n const memoizedTabs = useMemo(() => (\n tabs.map((tab) => ({\n ...tab,\n current: currentTabId === tab.id,\n }))\n ), [tabs, currentTabId, region]);\n const currentTab = memoizedTabs.find((x) => x.current);\n const products = useDeferredData(() => productsSource(currentTab), [], [currentTab]);\n const handleTabChange = useCallback((tab) => {\n setCurrentTabId(tab.id);\n }, [setCurrentTabId]);\n\n return useMemo(() => ({\n tabs: memoizedTabs,\n handleTabChange,\n ...products,\n }), [memoizedTabs, handleTabChange, products, region]);\n}\n\nexport function useProductColumns(columns) {\n const products = useDeferredData(() => (\n Promise.all(columns.map((column) => column.source()))\n ), [], [columns]);\n\n return useMemo(() => (\n columns.map((column, index) => ({\n ...column,\n products: products.data[index] || [],\n }))\n ), [columns, products]);\n}\n","var _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgArrowRoundedDown7X5(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n width: 7,\n height: 5,\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M0.3,0.3c0.4-0.4,1-0.4,1.3,0l1.9,2l1.9-2c0.4-0.4,1-0.4,1.3,0c0.4,0.4,0.4,0.9,0,1.3L3.5,5L0.3,1.6 C-0.1,1.2-0.1,0.6,0.3,0.3z\"\n })));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgArrowRoundedDown7X5);\nexport default __webpack_public_path__ + \"static/media/arrow-rounded-down-7x5.1dbb8ff459eba14629b7b494fd4ab474.svg\";\nexport { ForwardRef as ReactComponent };","var _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgArrowRoundedDown9X6(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n width: 9,\n height: 6,\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M0.2,0.4c0.4-0.4,1-0.5,1.4-0.1l2.9,3l2.9-3c0.4-0.4,1.1-0.4,1.4,0.1c0.3,0.4,0.3,0.9-0.1,1.3L4.5,6L0.3,1.6C-0.1,1.3-0.1,0.7,0.2,0.4z\"\n })));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgArrowRoundedDown9X6);\nexport default __webpack_public_path__ + \"static/media/arrow-rounded-down-9x6.917f270c953bcfc9cc28eaddfb40a9a6.svg\";\nexport { ForwardRef as ReactComponent };","var _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgArrowRoundedDown12X7(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n width: \"12px\",\n height: \"7px\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M0.286,0.273 L0.286,0.273 C-0.070,0.629 -0.075,1.204 0.276,1.565 L5.516,6.993 L10.757,1.565 C11.108,1.204 11.103,0.629 10.747,0.273 L10.747,0.273 C10.385,-0.089 9.796,-0.086 9.437,0.279 L5.516,4.296 L1.596,0.279 C1.237,-0.086 0.648,-0.089 0.286,0.273 Z\"\n })));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgArrowRoundedDown12X7);\nexport default __webpack_public_path__ + \"static/media/arrow-rounded-down-12x7.cadfa6ec1687eee6c885ac393a8fdc78.svg\";\nexport { ForwardRef as ReactComponent };","var _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgArrowRoundedLeft6X9(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n width: 6,\n height: 9,\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M5.7,8.7L5.7,8.7c-0.4,0.4-0.9,0.4-1.3,0L0,4.5l4.4-4.2c0.4-0.4,0.9-0.3,1.3,0l0,0c0.4,0.4,0.4,1,0,1.3l-3,2.9l3,2.9 C6.1,7.8,6.1,8.4,5.7,8.7z\"\n })));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgArrowRoundedLeft6X9);\nexport default __webpack_public_path__ + \"static/media/arrow-rounded-left-6x9.9f953eec0549bd73855b4a2268f7dc00.svg\";\nexport { ForwardRef as ReactComponent };","var _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgArrowRoundedLeft7X11(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n width: 7,\n height: 11,\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M6.7,0.3L6.7,0.3c-0.4-0.4-0.9-0.4-1.3,0L0,5.5l5.4,5.2c0.4,0.4,0.9,0.3,1.3,0l0,0c0.4-0.4,0.4-1,0-1.3l-4-3.9l4-3.9 C7.1,1.2,7.1,0.6,6.7,0.3z\"\n })));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgArrowRoundedLeft7X11);\nexport default __webpack_public_path__ + \"static/media/arrow-rounded-left-7x11.61a70fde97964ee40d84ce49122a11c2.svg\";\nexport { ForwardRef as ReactComponent };","var _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgArrowRoundedLeft8X13(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: \"8px\",\n height: \"13px\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M7.7,12.7L7.7,12.7c-0.4,0.4-0.9,0.4-1.3,0L0,6.5l6.4-6.2c0.4-0.4,0.9-0.3,1.3,0l0,0c0.4,0.4,0.4,1,0,1.3l-5,4.9l5,4.9 C8.1,11.8,8.1,12.4,7.7,12.7z\"\n })));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgArrowRoundedLeft8X13);\nexport default __webpack_public_path__ + \"static/media/arrow-rounded-left-8x13.bb786236944dc8a6c8fe58a1c8392e20.svg\";\nexport { ForwardRef as ReactComponent };","var _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgArrowRoundedRight6X9(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n width: 6,\n height: 9,\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M0.4,8.8c-0.4-0.4-0.5-1-0.1-1.4l3-2.9l-3-2.9c-0.4-0.4-0.4-1.1,0.1-1.4c0.4-0.3,0.9-0.3,1.3,0.1L6,4.5L1.6,8.7C1.3,9.1,0.7,9.1,0.4,8.8z\"\n })));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgArrowRoundedRight6X9);\nexport default __webpack_public_path__ + \"static/media/arrow-rounded-right-6x9.8178b60998b47f53f33ffc54b8f11d6b.svg\";\nexport { ForwardRef as ReactComponent };","var _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgArrowRoundedRight7X11(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n width: 7,\n height: 11,\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M0.3,10.7L0.3,10.7c0.4,0.4,0.9,0.4,1.3,0L7,5.5L1.6,0.3C1.2-0.1,0.7,0,0.3,0.3l0,0c-0.4,0.4-0.4,1,0,1.3l4,3.9l-4,3.9 C-0.1,9.8-0.1,10.4,0.3,10.7z\"\n })));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgArrowRoundedRight7X11);\nexport default __webpack_public_path__ + \"static/media/arrow-rounded-right-7x11.ecf7ff035cce585cae41660a2109c644.svg\";\nexport { ForwardRef as ReactComponent };","var _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgArrowRoundedRight8X13(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n width: \"8px\",\n height: \"13px\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M0.3,11.4l5-4.9l-5-4.9c-0.4-0.4-0.4-0.9,0-1.3l0,0c0.4-0.4,0.9-0.4,1.3,0L8,6.5l-6.4,6.2c-0.4,0.4-0.9,0.3-1.3,0l0,0 C-0.1,12.4-0.1,11.8,0.3,11.4z\"\n })));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgArrowRoundedRight8X13);\nexport default __webpack_public_path__ + \"static/media/arrow-rounded-right-8x13.a5dd722aef2a20139dc45f21433ebce1.svg\";\nexport { ForwardRef as ReactComponent };","var _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgArrowRoundedUp13X8(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n width: 13,\n height: 8,\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M11.4,7.7l-4.9-5l-4.9,5c-0.4,0.4-0.9,0.4-1.3,0l0,0c-0.4-0.4-0.4-0.9,0-1.3L6.5,0l6.2,6.4c0.4,0.4,0.3,0.9,0,1.3l0,0 C12.4,8.1,11.8,8.1,11.4,7.7z\"\n })));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgArrowRoundedUp13X8);\nexport default __webpack_public_path__ + \"static/media/arrow-rounded-up-13x8.6b0525ad02d5990cfe88027c856c82b8.svg\";\nexport { ForwardRef as ReactComponent };","var _g;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgCart16(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n width: \"27px\",\n height: \"27px\",\n viewBox: \"0 0 980.000000 980.000000\",\n preserveAspectRatio: \"xMidYMid meet\",\n xmlSpace: \"preserve\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _g || (_g = /*#__PURE__*/React.createElement(\"g\", {\n transform: \"translate(0.000000,980.000000) scale(0.100000,-0.100000)\",\n stroke: \"none\"\n }, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M7435 9793 c-1412 -122 -2333 -1520 -1890 -2868 142 -433 445 -838 817 -1092 l67 -46 48 44 c109 99 353 333 353 338 0 3 -26 20 -58 38 -131 72 -307 221 -415 351 -417 501 -504 1184 -226 1772 220 463 645 792 1166 902 94 20 136 23 323 22 182 0 230 -4 317 -22 670 -145 1161 -640 1295 -1305 30 -146 32 -450 5 -594 -70 -369 -260 -709 -531 -946 -97 -85 -224 -171 -320 -219 -36 -18 -66 -35 -66 -38 0 -8 368 -394 380 -398 5 -2 54 25 107 60 529 347 871 880 969 1508 22 143 25 472 6 605 -66 443 -234 814 -517 1142 -309 360 -739 612 -1205 706 -200 41 -440 56 -625 40z\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M7544 8679 c-58 -17 -125 -72 -158 -129 l-31 -55 -3 -282 -3 -283 -262 0 c-147 0 -278 -5 -299 -10 -63 -18 -129 -70 -162 -130 -27 -48 -31 -65 -31 -130 0 -57 6 -85 22 -116 29 -54 79 -102 133 -128 42 -20 64 -21 322 -24 l277 -3 3 -282 c3 -319 5 -326 88 -401 57 -52 103 -69 180 -70 82 0 144 28 200 91 64 73 70 108 70 405 l0 258 258 0 c297 0 332 6 405 70 61 54 91 117 91 194 0 80 -18 130 -67 184 -80 86 -84 87 -404 90 l-283 3 0 258 c0 312 -6 339 -84 417 -72 73 -170 100 -262 73z\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M160 7419 c-207 -93 -212 -381 -8 -483 l52 -26 718 0 c395 0 718 -2 718 -5 0 -7 1351 -5175 1356 -5190 3 -6 -29 -37 -70 -70 -308 -241 -428 -646 -302 -1018 46 -134 113 -243 216 -347 505 -512 1359 -284 1552 415 25 88 34 267 19 362 -10 63 -42 179 -66 235 -7 17 30 18 699 18 388 0 706 -2 706 -4 0 -3 -13 -44 -29 -93 -78 -233 -63 -468 44 -688 302 -624 1152 -706 1571 -151 60 79 128 219 155 321 29 106 32 335 6 438 -58 231 -214 449 -408 570 -74 46 -239 119 -309 138 -20 5 -725 9 -1650 9 l-1615 0 -85 327 c-47 180 -86 335 -88 345 -3 17 85 18 2200 18 l2204 0 457 1533 c252 842 458 1535 457 1540 0 4 -1379 7 -3065 7 l-3064 0 -9 33 c-5 17 -112 427 -238 910 l-229 877 -925 0 c-908 0 -926 -1 -970 -21z m7778 -2351 c-3 -13 -137 -465 -298 -1005 l-294 -983 -2076 0 -2076 0 -259 993 c-142 545 -260 998 -263 1005 -3 9 528 12 2633 12 l2637 0 -4 -22z m-4344 -3773 c113 -30 204 -106 254 -213 24 -50 27 -69 27 -162 0 -95 -3 -111 -28 -162 -37 -75 -100 -139 -178 -180 -61 -31 -70 -33 -169 -33 -94 0 -111 3 -161 28 -120 58 -196 158 -220 289 -35 189 90 380 281 432 72 19 123 19 194 1z m3172 -30 c84 -41 143 -101 183 -185 23 -48 26 -68 26 -155 0 -88 -3 -107 -27 -157 -37 -80 -107 -152 -187 -191 -61 -30 -73 -32 -166 -32 -88 0 -107 3 -157 27 -179 84 -270 287 -208 467 37 109 97 179 197 230 64 32 110 41 192 36 60 -3 88 -11 147 -40z\"\n }))));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgCart16);\nexport default __webpack_public_path__ + \"static/media/cart-16.70d1e146da790488d4c0e349ed4e5232.svg\";\nexport { ForwardRef as ReactComponent };","var _circle, _circle2, _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgCart20(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n width: 20,\n height: 20,\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _circle || (_circle = /*#__PURE__*/React.createElement(\"circle\", {\n cx: 7,\n cy: 17,\n r: 2\n })), _circle2 || (_circle2 = /*#__PURE__*/React.createElement(\"circle\", {\n cx: 15,\n cy: 17,\n r: 2\n })), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M20,4.4V5l-1.8,6.3c-0.1,0.4-0.5,0.7-1,0.7H6.7c-0.4,0-0.8-0.3-1-0.7L3.3,3.9C3.1,3.3,2.6,3,2.1,3H0.4C0.2,3,0,2.8,0,2.6 V1.4C0,1.2,0.2,1,0.4,1h2.5c1,0,1.8,0.6,2.1,1.6L5.1,3l2.3,6.8c0,0.1,0.2,0.2,0.3,0.2h8.6c0.1,0,0.3-0.1,0.3-0.2l1.3-4.4 C17.9,5.2,17.7,5,17.5,5H9.4C9.2,5,9,4.8,9,4.6V3.4C9,3.2,9.2,3,9.4,3h9.2C19.4,3,20,3.6,20,4.4z\"\n })));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgCart20);\nexport default __webpack_public_path__ + \"static/media/cart-20.aad071d2b222578824412340f668c69e.svg\";\nexport { ForwardRef as ReactComponent };","var _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgCheck9X7(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n width: \"9px\",\n height: \"7px\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M9.002,1.396 L3.461,7.002 L-0.002,3.498 L1.383,2.096 L3.461,4.199 L7.617,-0.006 L9.002,1.396 Z\"\n })));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgCheck9X7);\nexport default __webpack_public_path__ + \"static/media/check-9x7.9013dea3a92bdcfaad1616f123f35508.svg\";\nexport { ForwardRef as ReactComponent };","var _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgCheck12X9(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n width: \"12px\",\n height: \"9px\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M12.002,1.396 L4.461,9.002 L-0.002,4.498 L1.383,3.096 L4.461,6.203 L10.617,-0.006 L12.002,1.396 Z\"\n })));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgCheck12X9);\nexport default __webpack_public_path__ + \"static/media/check-12x9.342d5f8b04301749d2240d1f620e144c.svg\";\nexport { ForwardRef as ReactComponent };","var _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgCheck100(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n width: 100,\n height: 100,\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M50,100C22.4,100,0,77.6,0,50S22.4,0,50,0s50,22.4,50,50S77.6,100,50,100z M50,2C23.5,2,2,23.5,2,50 s21.5,48,48,48s48-21.5,48-48S76.5,2,50,2z M44.2,71L22.3,49.1l1.4-1.4l21.2,21.2l34.4-34.4l1.4,1.4L45.6,71 C45.2,71.4,44.6,71.4,44.2,71z\"\n })));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgCheck100);\nexport default __webpack_public_path__ + \"static/media/check-100.c0836f616538d7760d3c1dd8e247ddb8.svg\";\nexport { ForwardRef as ReactComponent };","var _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgCross10(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n width: 10,\n height: 10,\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M8.8,8.8L8.8,8.8c-0.4,0.4-1,0.4-1.4,0L5,6.4L2.6,8.8c-0.4,0.4-1,0.4-1.4,0l0,0c-0.4-0.4-0.4-1,0-1.4L3.6,5L1.2,2.6 c-0.4-0.4-0.4-1,0-1.4l0,0c0.4-0.4,1-0.4,1.4,0L5,3.6l2.4-2.4c0.4-0.4,1-0.4,1.4,0l0,0c0.4,0.4,0.4,1,0,1.4L6.4,5l2.4,2.4 C9.2,7.8,9.2,8.4,8.8,8.8z\"\n })));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgCross10);\nexport default __webpack_public_path__ + \"static/media/cross-10.c2d4006cd8c2d2186f199e402bedad22.svg\";\nexport { ForwardRef as ReactComponent };","var _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgCross12(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n width: 12,\n height: 12,\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M10.8,10.8L10.8,10.8c-0.4,0.4-1,0.4-1.4,0L6,7.4l-3.4,3.4c-0.4,0.4-1,0.4-1.4,0l0,0c-0.4-0.4-0.4-1,0-1.4L4.6,6L1.2,2.6 c-0.4-0.4-0.4-1,0-1.4l0,0c0.4-0.4,1-0.4,1.4,0L6,4.6l3.4-3.4c0.4-0.4,1-0.4,1.4,0l0,0c0.4,0.4,0.4,1,0,1.4L7.4,6l3.4,3.4 C11.2,9.8,11.2,10.4,10.8,10.8z\"\n })));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgCross12);\nexport default __webpack_public_path__ + \"static/media/cross-12.b024ae36f3dff5b723d3f78a2b342eb3.svg\";\nexport { ForwardRef as ReactComponent };","var _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgCross20(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n width: 20,\n height: 20,\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M17.71,17.71L17.71,17.71c-0.387,0.387-1.013,0.387-1.4,0L10,11.4l-6.31,6.31c-0.387,0.387-1.013,0.387-1.4,0l0,0 c-0.387-0.387-0.387-1.013,0-1.4L8.6,10L2.29,3.69c-0.387-0.387-0.387-1.013,0-1.4l0,0c0.387-0.387,1.013-0.387,1.4,0L10,8.6 l6.31-6.31c0.387-0.387,1.013-0.387,1.4,0l0,0c0.387,0.387,0.387,1.013,0,1.4L11.4,10l6.31,6.31 C18.097,16.697,18.097,17.323,17.71,17.71z\"\n })));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgCross20);\nexport default __webpack_public_path__ + \"static/media/cross-20.297ca97896d684789aff2ed7d059c520.svg\";\nexport { ForwardRef as ReactComponent };","var _g;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgFi24Hours48(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n width: 48,\n height: 48,\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _g || (_g = /*#__PURE__*/React.createElement(\"g\", null, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M46.2,18.2H46v-0.9c0-1.2-1.2-1.8-2.5-1.8c-0.5,0-1,0.1-1.4,0.3c0,0,2.3-4.6,2.3-4.6c1-2.3-3-4-4.4-1.4l-5.2,10.2 c-0.3,0.6-0.4,1.4,0,2.1c-0.2-0.1-0.4-0.2-0.7-0.2h-4.9c1.6-1.6,6.6-3.5,6.6-8c0-1.6-0.7-3-1.9-4c-1.1-0.9-2.5-1.4-4-1.4 c-2.8,0-5.8,1.8-5.8,5c0,2.2,1.4,2.5,2.3,2.5c1.7,0,2.5-1,2.5-2c0-0.5,0.1-1,1-1c0.9,0,1,0.6,1,0.9c0,2.3-7.1,4.5-7.1,8.4v2.2 c0,1.1,1.3,1.8,2.2,1.8h8c1.4,0,2.3-2.2,1.3-3.7c0.3,0.1,0.6,0.2,0.9,0.2H41v1.7c0,1,1,1.8,2.5,1.8s2.5-0.7,2.5-1.8v-1.7h0.3 c1,0,1.8-1.2,1.8-2.3C48,19.1,47.3,18.2,46.2,18.2L46.2,18.2z M34.2,24.9h-8c-0.4,0-0.8-0.3-0.8-0.4v-2.2c0-3.1,7.1-5,7.1-8.4 c0-1.1-0.8-2.3-2.4-2.3c-1.5,0-2.4,0.9-2.4,2.4c0,0.2-0.4,0.6-1.1,0.6c-0.5,0-0.9-0.1-0.9-1.1c0-2.3,2.3-3.6,4.4-3.6 c2.3,0,4.5,1.4,4.5,3.9c0,4.5-6.9,5.8-6.9,8.5v0.2c0,0.4,0.3,0.7,0.7,0.7h5.9c0.1,0,0.4,0.3,0.4,0.8C34.6,24.5,34.3,24.8,34.2,24.9 L34.2,24.9z M46.2,21.4h-0.9c-0.4,0-0.7,0.3-0.7,0.7v2.4c0,0.2-0.4,0.4-1,0.4s-1-0.2-1-0.4v-2.4c0-0.4-0.3-0.7-0.7-0.7h-5.3 c-0.5,0-0.5-0.5-0.4-0.8c0,0,0,0,0,0l5.2-10.2c0.5-1,1.9-0.2,1.9,0.1c0,0.1,0,0-4,8.1c-0.2,0.5,0.1,1,0.6,1h1.9 c0.4,0,0.7-0.3,0.7-0.7v-1.6c0-0.1,0.4-0.4,1.1-0.4c0.6,0,1,0.2,1,0.4v1.6c0,0.4,0.3,0.7,0.7,0.7h1c0.2,0,0.4,0.4,0.4,0.9 C46.6,21,46.3,21.3,46.2,21.4L46.2,21.4z M41,18v0.2H41L41,18z\"\n }), /*#__PURE__*/React.createElement(\"g\", null, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M37,36.6c2.4-2.3,4.2-5.2,5.2-8.4c0.1-0.4-0.1-0.8-0.5-0.9c-0.4-0.1-0.8,0.1-0.9,0.5c-0.9,2.9-2.6,5.6-4.8,7.7 c-0.3,0.3-0.3,0.7,0,1C36.2,36.9,36.7,36.9,37,36.6L37,36.6z\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M35.1,7.9c0.2-0.3,0.2-0.8-0.2-1c-5.3-3.7-11.8-4.5-17.6-2.5C17,4.5,16.8,4.9,17,5.3s0.5,0.6,0.9,0.4 C23.1,3.9,29.2,4.5,34.1,8C34.4,8.2,34.9,8.2,35.1,7.9L35.1,7.9z\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M25.2,43.6c-0.9-0.5-1.9-0.6-2.8-0.4c-0.5,0.1-1.1,0.2-1.6,0.3c-0.4,0-0.7,0.4-0.6,0.8s0.4,0.7,0.8,0.6 c0.6,0,1.2-0.1,1.8-0.3c0.6-0.1,1.2,0,1.8,0.3c1.6,0.9,3.5,0.9,5.1-0.1c3.6-2.2,3.2-2,3.4-2.1c2.2-1.5,2.9-4.5,1.5-6.8L32,31.8 c-1.4-2.3-4.5-3.1-6.8-1.6l-3.2,2c-1.5,0.9-2.4,2.5-2.4,4.2c0,0.2-0.1,0.3-0.3,0.2c-1.2-0.3-2.4-0.8-3.3-1.7 c-1.4-1.3-2.6-2.6-3.7-4c-0.2-0.3-0.7-0.4-1-0.1s-0.4,0.7-0.1,1c1.1,1.5,2.4,2.9,3.9,4.2c1.1,1,2.5,1.7,3.9,2c1,0.2,2-0.6,2-1.6 c0-1.2,0.6-2.4,1.7-3l2.7-1.7l6.3,10.2l-2.7,1.7C27.8,44.2,26.4,44.2,25.2,43.6L25.2,43.6z M26.6,31c1.5-0.5,3.3,0.1,4.1,1.5 l2.5,4.1c0.9,1.4,0.6,3.2-0.5,4.4L26.6,31z\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M0.4,23.2c1,3.8,2.4,7.2,4.2,10.2s4.2,5.8,7.1,8.4c1.6,1.4,3.6,2.4,5.7,2.9c0.4,0.1,0.8-0.2,0.8-0.5 c0.1-0.4-0.2-0.8-0.5-0.8c-1.9-0.4-3.6-1.3-5.1-2.5c-2.8-2.5-5.1-5.2-6.9-8.1c-1.7-2.8-3.1-6.1-4.1-9.8C0.9,19.4,1.7,15.7,4,13 c0.6-0.7,1-1.7,0.9-2.7C4.8,9,5.5,7.8,6.6,7.1l2.7-1.7l6.3,10.2l-2.7,1.7c-1,0.6-2.3,0.7-3.4,0.2c-0.9-0.5-2,0.1-2.3,1.1 c-0.4,1.5-0.4,3,0,4.5c0.6,2.1,1.3,4.1,2.2,5.8c0.2,0.3,0.6,0.5,1,0.3c0.3-0.2,0.5-0.6,0.3-1c-0.9-1.7-1.6-3.5-2.1-5.5 c-0.3-1.2-0.3-2.5,0-3.7c0-0.1,0.2-0.2,0.3-0.2c1.5,0.8,3.3,0.7,4.8-0.2l3.2-2c2.3-1.4,3.1-4.5,1.6-6.8l-2.5-4.1 c-1.4-2.4-4.5-3.1-6.8-1.6l-3.2,2c-1.5,0.9-2.5,2.7-2.4,4.5c0,0.6-0.2,1.2-0.6,1.7C0.3,15.2-0.6,19.3,0.4,23.2L0.4,23.2z M14.7,6.3l2.5,4.1c0.9,1.4,0.6,3.2-0.5,4.4L10.6,4.8C12.1,4.3,13.9,4.9,14.7,6.3L14.7,6.3z\"\n })))));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgFi24Hours48);\nexport default __webpack_public_path__ + \"static/media/fi-24-hours-48.03fde79699528afc4d8db7c6ba2bb3a6.svg\";\nexport { ForwardRef as ReactComponent };","var _path, _path2, _path3, _path4, _path5, _path6, _path7, _path8, _path9;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgFiFreeDelivery48(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n width: 48,\n height: 48,\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M44.6,26.9l-1.2-5c0.3-0.1,0.6-0.4,0.6-0.7v-0.8c0-1.7-1.4-3.2-3.2-3.2h-5.7v-1.7c0-0.9-0.7-1.6-1.6-1.6H23.1l6.4-2.6 c0.4-0.2,0.6-0.6,0.4-1c-0.2-0.4-0.6-0.6-1-0.4l-5.2,2.1c1.6-1,3.2-2.2,3.8-2.9c1.2-1.5,0.9-3.7-0.7-4.9c-1.5-1.2-3.7-0.9-4.9,0.7 l0,0c-0.9,1.1-2,4.3-2.7,6.5c-0.7-2.2-1.9-5.4-2.7-6.5l0,0c-1.2-1.5-3.4-1.8-4.9-0.7C10,5.5,9.7,7.7,10.9,9.2 c0.6,0.8,2.2,1.9,3.8,2.9l-5.2-2.1c-0.4-0.2-0.8,0-1,0.4c-0.2,0.4,0,0.8,0.4,1l6.4,2.6H4.8c-0.9,0-1.6,0.7-1.6,1.6v13.6 C3.2,29.6,3.5,30,4,30c0.4,0,0.8-0.3,0.8-0.8V15.6c0,0,0,0,0,0h28.9c0,0,0,0,0,0v13.6c0,0.4,0.3,0.8,0.8,0.8c0.4,0,0.8-0.3,0.8-0.8 v-0.9H44c0,0,0,0,0,0c0,0,0,0,0,0c1.1,0,2,0.7,2.3,1.7H44c-0.4,0-0.8,0.3-0.8,0.8v1.6c0,1.3,1.1,2.4,2.4,2.4h0.9v3.3h-2 c-0.6-1.9-2.4-3.2-4.5-3.2c-2.1,0-3.9,1.3-4.5,3.2h-0.4v-5.7c0-0.4-0.3-0.8-0.8-0.8c-0.4,0-0.8,0.3-0.8,0.8v5.7H18.1 c-0.6-1.9-2.4-3.2-4.5-3.2c-2.1,0-3.9,1.3-4.5,3.2H4.8c0,0,0,0,0,0v-1.7H8c0.4,0,0.8-0.3,0.8-0.8S8.4,34.9,8,34.9H0.8 c-0.4,0-0.8,0.3-0.8,0.8s0.3,0.8,0.8,0.8h2.5V38c0,0.9,0.7,1.6,1.6,1.6h4.1c0,0,0,0,0,0c0,2.6,2.1,4.8,4.8,4.8s4.8-2.1,4.8-4.8 c0,0,0,0,0,0h16.9c0,0,0,0,0,0c0,2.6,2.1,4.8,4.8,4.8s4.8-2.1,4.8-4.8c0,0,0,0,0,0h2.5c0.4,0,0.8-0.3,0.8-0.8v-8 C48,28.8,46.5,27.2,44.6,26.9z M23.1,5.9L23.1,5.9c0.7-0.9,1.9-1,2.8-0.4s1,1.9,0.4,2.8c-0.3,0.3-1.1,1.2-4.1,3 c-0.6,0.4-1.2,0.7-1.7,1C21.2,10.1,22.4,6.9,23.1,5.9z M12.1,8.3c-0.7-0.9-0.5-2.1,0.4-2.8c0.4-0.3,0.8-0.4,1.2-0.4 c0.6,0,1.2,0.3,1.6,0.8l0,0c0.7,1,1.9,4.2,2.6,6.5c-0.5-0.3-1.1-0.6-1.7-1C13.2,9.5,12.4,8.7,12.1,8.3z M35.2,21.9h6.7l1.2,4.9h-7.9 V21.9z M40.8,18.7c0.9,0,1.7,0.7,1.7,1.7v0h-7.3v-1.7L40.8,18.7L40.8,18.7z M13.6,42.9c-1.8,0-3.3-1.5-3.3-3.3s1.5-3.3,3.3-3.3 s3.3,1.5,3.3,3.3S15.4,42.9,13.6,42.9z M40,42.9c-1.8,0-3.3-1.5-3.3-3.3s1.5-3.3,3.3-3.3s3.3,1.5,3.3,3.3S41.8,42.9,40,42.9z M45.6,33.3c-0.5,0-0.9-0.4-0.9-0.9v-0.9h1.7v1.7L45.6,33.3L45.6,33.3z\"\n })), _path2 || (_path2 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M13.6,38.1c-0.9,0-1.6,0.7-1.6,1.6s0.7,1.6,1.6,1.6s1.6-0.7,1.6-1.6S14.4,38.1,13.6,38.1z\"\n })), _path3 || (_path3 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M40,38.1c-0.9,0-1.6,0.7-1.6,1.6s0.7,1.6,1.6,1.6c0.9,0,1.6-0.7,1.6-1.6S40.9,38.1,40,38.1z\"\n })), _path4 || (_path4 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M19.2,35.6c0,0.4,0.3,0.8,0.8,0.8h11.2c0.4,0,0.8-0.3,0.8-0.8s-0.3-0.8-0.8-0.8H20C19.6,34.9,19.2,35.2,19.2,35.6z\"\n })), _path5 || (_path5 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M2.4,33.2H12c0.4,0,0.8-0.3,0.8-0.8s-0.3-0.8-0.8-0.8H2.4c-0.4,0-0.8,0.3-0.8,0.8S1.9,33.2,2.4,33.2z\"\n })), _path6 || (_path6 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M12,21.9c0.4,0,0.8-0.3,0.8-0.8s-0.3-0.8-0.8-0.8H8.8c-0.4,0-0.8,0.3-0.8,0.8v6.4c0,0.4,0.3,0.8,0.8,0.8 c0.4,0,0.8-0.3,0.8-0.8v-2.5h1.7c0.4,0,0.8-0.3,0.8-0.8s-0.3-0.8-0.8-0.8H9.5v-1.7L12,21.9L12,21.9z\"\n })), _path7 || (_path7 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M19.1,23.2c0-1.5-1.2-2.8-2.8-2.8h-2c-0.4,0-0.8,0.3-0.8,0.8v6.4c0,0.4,0.3,0.8,0.8,0.8c0.4,0,0.8-0.3,0.8-0.8V26h1.3 l1.4,2.1c0.1,0.2,0.4,0.3,0.6,0.3c0.1,0,0.3,0,0.4-0.1c0.3-0.2,0.4-0.7,0.2-1l-1.1-1.7C18.6,25,19.1,24.2,19.1,23.2z M15.1,21.9h1.3 c0.7,0,1.3,0.6,1.3,1.3s-0.6,1.3-1.3,1.3h-1.3V21.9z\"\n })), _path8 || (_path8 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M24,21.9c0.4,0,0.8-0.3,0.8-0.8s-0.3-0.8-0.8-0.8h-3.2c-0.4,0-0.8,0.3-0.8,0.8v6.4c0,0.4,0.3,0.8,0.8,0.8H24 c0.4,0,0.8-0.3,0.8-0.8s-0.3-0.8-0.8-0.8h-2.5v-1.7c0,0,0,0,0,0h1.6c0.4,0,0.8-0.3,0.8-0.8s-0.3-0.8-0.8-0.8h-1.6c0,0,0,0,0,0v-1.7 L24,21.9L24,21.9z\"\n })), _path9 || (_path9 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M29.6,21.9c0.4,0,0.8-0.3,0.8-0.8s-0.3-0.8-0.8-0.8h-3.2c-0.4,0-0.8,0.3-0.8,0.8v6.4c0,0.4,0.3,0.8,0.8,0.8h3.2 c0.4,0,0.8-0.3,0.8-0.8s-0.3-0.8-0.8-0.8h-2.5v-1.7H28c0.4,0,0.8-0.3,0.8-0.8s-0.3-0.8-0.8-0.8h-0.9v-1.7L29.6,21.9L29.6,21.9z\"\n })));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgFiFreeDelivery48);\nexport default __webpack_public_path__ + \"static/media/fi-free-delivery-48.bda59594f7524dca09fe6dfa837481bd.svg\";\nexport { ForwardRef as ReactComponent };","var _path, _path2, _path3, _path4, _path5, _path6, _path7, _path8, _path9;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgFiPaymentSecurity48(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n width: 48,\n height: 48,\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M30,34.4H2.5c-0.5,0-0.9-0.4-0.9-0.9V7.7c0-0.5,0.4-0.9,0.9-0.9H42c0.5,0,0.9,0.4,0.9,0.9v11.2c0,0.4,0.4,0.8,0.8,0.8 c0.4,0,0.8-0.4,0.8-0.8V7.7c0-1.4-1.1-2.5-2.5-2.5H2.5C1.1,5.2,0,6.3,0,7.7v25.8C0,34.8,1.1,36,2.5,36H30c0.4,0,0.8-0.4,0.8-0.8 C30.8,34.7,30.5,34.4,30,34.4z\"\n })), _path2 || (_path2 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M15.4,18v-5.2c0-0.9-0.7-1.7-1.7-1.7H6.8c-0.9,0-1.7,0.7-1.7,1.7V18c0,0.9,0.7,1.7,1.7,1.7h6.9C14.6,19.7,15.4,18.9,15.4,18 z M13.7,12.8V18c0,0,0,0.1-0.1,0.1h-3.5v-1.8h0.9c0.4,0,0.8-0.4,0.8-0.8c0-0.4-0.4-0.8-0.8-0.8h-0.9v-1.8L13.7,12.8 C13.7,12.8,13.7,12.8,13.7,12.8z M6.8,18v-5.2c0,0,0-0.1,0.1-0.1h1.8V18L6.8,18C6.8,18,6.8,18,6.8,18z\"\n })), _path3 || (_path3 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M32.2,11.1c-0.8-0.5-1.7-0.8-2.6-0.8c-2.6,0-4.7,2.1-4.7,4.7s2.1,4.7,4.7,4.7c1,0,1.8-0.3,2.6-0.8c0.8,0.5,1.7,0.8,2.6,0.8 c2.6,0,4.7-2.1,4.7-4.7s-2.1-4.7-4.7-4.7C33.8,10.3,32.9,10.6,32.2,11.1z M26.5,15c0-1.7,1.4-3.1,3.1-3.1c0.5,0,0.9,0.1,1.4,0.3 C30.4,13,30.1,14,30.1,15c0,1,0.3,1.9,0.9,2.7c-0.4,0.2-0.9,0.3-1.4,0.3C27.9,18,26.5,16.7,26.5,15z M37.8,15c0,1.7-1.4,3.1-3.1,3.1 c-0.5,0-0.9-0.1-1.4-0.3c0.6-0.8,0.9-1.7,0.9-2.7c0-0.4-0.4-0.8-0.8-0.8s-0.8,0.4-0.8,0.8c0,0.6-0.2,1.2-0.5,1.6 c-0.3-0.5-0.5-1.1-0.5-1.6c0-1.7,1.4-3.1,3.1-3.1C36.4,11.9,37.8,13.3,37.8,15z\"\n })), _path4 || (_path4 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M6,24.1c-0.4,0-0.8,0.4-0.8,0.8c0,0.4,0.4,0.8,0.8,0.8h6.9c0.4,0,0.8-0.4,0.8-0.8c0-0.4-0.4-0.8-0.8-0.8H6z\"\n })), _path5 || (_path5 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M30.9,29.2H6c-0.4,0-0.8,0.4-0.8,0.8c0,0.4,0.4,0.8,0.8,0.8h24.9c0.4,0,0.8-0.4,0.8-0.8S31.3,29.2,30.9,29.2z\"\n })), _path6 || (_path6 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M16.3,24.1c-0.4,0-0.8,0.4-0.8,0.8c0,0.4,0.4,0.8,0.8,0.8h6.9c0.4,0,0.8-0.4,0.8-0.8c0-0.4-0.4-0.8-0.8-0.8H16.3z\"\n })), _path7 || (_path7 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M31.7,24.1h-5.2c-0.4,0-0.8,0.4-0.8,0.8c0,0.4,0.4,0.8,0.8,0.8h5.2c0.4,0,0.8-0.4,0.8-0.8C32.5,24.4,32.2,24.1,31.7,24.1z\"\n })), _path8 || (_path8 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M46.3,30.2v-3.6c0-3.3-2.7-6-6-6c-3.3,0-6,2.7-6,6v3.6c-1,0.3-1.7,1.3-1.7,2.4v7.7c0,1.4,1.1,2.5,2.5,2.5h10.3 c1.4,0,2.5-1.1,2.5-2.5v-7.7C48,31.5,47.3,30.5,46.3,30.2z M40.3,22.2c2.4,0,4.3,2,4.3,4.3v3.5H36v-3.5C36,24.2,37.9,22.2,40.3,22.2 z M46.4,40.3c0,0.5-0.4,0.9-0.9,0.9H35.2c-0.5,0-0.9-0.4-0.9-0.9v-7.7c0-0.5,0.4-0.9,0.9-0.9h10.3c0.5,0,0.9,0.4,0.9,0.9V40.3z\"\n })), _path9 || (_path9 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M40.3,33.5c-1.2,0-2.1,0.9-2.1,2.1c0,0.9,0.5,1.6,1.3,1.9v1.1c0,0.4,0.4,0.8,0.8,0.8s0.8-0.4,0.8-0.8v-1.1 c0.8-0.3,1.3-1.1,1.3-1.9C42.4,34.4,41.5,33.5,40.3,33.5z M40.3,35.1c0.3,0,0.5,0.2,0.5,0.5s-0.2,0.5-0.5,0.5s-0.5-0.2-0.5-0.5 S40.1,35.1,40.3,35.1z\"\n })));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgFiPaymentSecurity48);\nexport default __webpack_public_path__ + \"static/media/fi-payment-security-48.2f0378cdf7425617b7a01be6851bf86c.svg\";\nexport { ForwardRef as ReactComponent };","var _path, _path2, _path3, _path4;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgFiTag48(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n width: 48,\n height: 48,\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M48,3.3c0-0.9-0.3-1.7-1-2.3c-0.6-0.6-1.4-1-2.3-1c-0.9,0-1.7,0.3-2.3,1c-0.3,0.3-0.7,0.8-1,1.1c-0.3,0.3-0.2,0.8,0.1,1.1 c0.3,0.3,0.8,0.2,1.1-0.1c0.4-0.5,0.7-0.9,0.9-1c0.3-0.3,0.8-0.5,1.2-0.5c0,0,0,0,0,0c0.5,0,0.9,0.2,1.2,0.5 c0.3,0.3,0.5,0.8,0.5,1.2c0,0.5-0.2,0.9-0.5,1.2c-0.3,0.3-1.3,1.1-2.7,2.1c-0.9-1.5-2.4-2.4-4.3-2.4H27.5c-1.5,0-3,0.6-4.1,1.7 L0.7,28.6C0.3,29,0,29.7,0,30.3s0.3,1.3,0.7,1.7L16,47.3c0.5,0.5,1.1,0.7,1.7,0.7c0.7,0,1.3-0.3,1.7-0.7l22.8-22.8 c1.1-1.1,1.7-2.5,1.7-4.1V9.1c0-0.3,0-0.7-0.1-1C45.4,7,46.6,6,47,5.6C47.7,5,48,4.1,48,3.3z M42.3,9.1v11.4c0,1.1-0.4,2.2-1.2,3 L18.3,46.2c-0.3,0.3-0.9,0.3-1.2,0L1.8,30.9c-0.3-0.3-0.3-0.9,0-1.2L24.6,6.9c0.8-0.8,1.8-1.2,3-1.2h11.4c1.3,0,2.4,0.7,3,1.8 c-0.9,0.6-1.9,1.3-3,1.9c0,0-0.1-0.1-0.1-0.1c-1.3-1.3-3.3-1.3-4.6,0s-1.3,3.3,0,4.6c0.6,0.6,1.5,1,2.3,1c0.8,0,1.7-0.3,2.3-1 c0.9-0.9,1.1-2.1,0.8-3.1C40.6,10.2,41.5,9.6,42.3,9.1C42.3,9.1,42.3,9.1,42.3,9.1z M35.7,11.9c0.1,0.3,0.4,0.4,0.7,0.4 c0.1,0,0.2,0,0.3-0.1c0.5-0.2,0.9-0.5,1.4-0.7c0,0.4-0.2,0.9-0.5,1.2c-0.7,0.7-1.8,0.7-2.4,0c-0.7-0.7-0.7-1.8,0-2.4 c0.3-0.3,0.8-0.5,1.2-0.5c0.3,0,0.7,0.1,1,0.3c-0.4,0.2-0.9,0.5-1.3,0.7C35.7,11.1,35.6,11.5,35.7,11.9z\"\n })), _path2 || (_path2 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M16.3,25.8c-0.3-0.3-0.8-0.3-1.1,0c-0.3,0.3-0.3,0.8,0,1.1l2.4,2.4l-3,3l-2.4-2.4c-0.3-0.3-0.8-0.3-1.1,0 c-0.3,0.3-0.3,0.8,0,1.1l5.9,5.9c0.2,0.2,0.4,0.2,0.5,0.2s0.4-0.1,0.5-0.2c0.3-0.3,0.3-0.8,0-1.1l-2.4-2.4l3-3l2.4,2.4 c0.2,0.2,0.4,0.2,0.5,0.2s0.4-0.1,0.5-0.2c0.3-0.3,0.3-0.8,0-1.1L16.3,25.8z\"\n })), _path3 || (_path3 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M24.8,21.4c-1.4-1.4-3.8-1.4-5.2,0s-1.4,3.8,0,5.2l1.8,1.8c0.7,0.7,1.7,1.1,2.6,1.1s1.9-0.4,2.6-1.1c1.4-1.4,1.4-3.8,0-5.2 L24.8,21.4z M25.5,27.3c-0.8,0.8-2.2,0.8-3,0l-1.8-1.8c-0.8-0.8-0.8-2.2,0-3c0.4-0.4,1-0.6,1.5-0.6s1.1,0.2,1.5,0.6l1.8,1.8 C26.3,25.1,26.3,26.5,25.5,27.3z\"\n })), _path4 || (_path4 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M27.4,15.8l1.8-1.8c0.3-0.3,0.3-0.8,0-1.1c-0.3-0.3-0.8-0.3-1.1,0l-4.7,4.7c-0.3,0.3-0.3,0.8,0,1.1c0.2,0.2,0.4,0.2,0.5,0.2 s0.4-0.1,0.5-0.2l1.8-1.8l5.3,5.3c0.2,0.2,0.4,0.2,0.5,0.2c0.2,0,0.4-0.1,0.5-0.2c0.3-0.3,0.3-0.8,0-1.1L27.4,15.8z\"\n })));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgFiTag48);\nexport default __webpack_public_path__ + \"static/media/fi-tag-48.77bbeebb86ee5393d2d19e92489fca01.svg\";\nexport { ForwardRef as ReactComponent };","var _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgFilters16(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n width: 16,\n height: 16,\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M7,14v-2h9v2H7z M14,7h2v2h-2V7z M12.5,6C12.8,6,13,6.2,13,6.5v3c0,0.3-0.2,0.5-0.5,0.5h-2 C10.2,10,10,9.8,10,9.5v-3C10,6.2,10.2,6,10.5,6H12.5z M7,2h9v2H7V2z M5.5,5h-2C3.2,5,3,4.8,3,4.5v-3C3,1.2,3.2,1,3.5,1h2 C5.8,1,6,1.2,6,1.5v3C6,4.8,5.8,5,5.5,5z M0,2h2v2H0V2z M9,9H0V7h9V9z M2,14H0v-2h2V14z M3.5,11h2C5.8,11,6,11.2,6,11.5v3 C6,14.8,5.8,15,5.5,15h-2C3.2,15,3,14.8,3,14.5v-3C3,11.2,3.2,11,3.5,11z\"\n })));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgFilters16);\nexport default __webpack_public_path__ + \"static/media/filters-16.4f34080839bcd928c3c4ec696a510b4f.svg\";\nexport { ForwardRef as ReactComponent };","var _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgLayoutGrid16X16(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n width: 16,\n height: 16,\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M15.2,16H9.8C9.4,16,9,15.6,9,15.2V9.8C9,9.4,9.4,9,9.8,9h5.4C15.6,9,16,9.4,16,9.8v5.4C16,15.6,15.6,16,15.2,16z M15.2,7 H9.8C9.4,7,9,6.6,9,6.2V0.8C9,0.4,9.4,0,9.8,0h5.4C15.6,0,16,0.4,16,0.8v5.4C16,6.6,15.6,7,15.2,7z M6.2,16H0.8 C0.4,16,0,15.6,0,15.2V9.8C0,9.4,0.4,9,0.8,9h5.4C6.6,9,7,9.4,7,9.8v5.4C7,15.6,6.6,16,6.2,16z M6.2,7H0.8C0.4,7,0,6.6,0,6.2V0.8 C0,0.4,0.4,0,0.8,0h5.4C6.6,0,7,0.4,7,0.8v5.4C7,6.6,6.6,7,6.2,7z\"\n })));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgLayoutGrid16X16);\nexport default __webpack_public_path__ + \"static/media/layout-grid-16x16.887bae5a843cca293785999cc12dba38.svg\";\nexport { ForwardRef as ReactComponent };","var _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgLayoutGridWithDetails16X16(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n width: 16,\n height: 16,\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M16,0.8v14.4c0,0.4-0.4,0.8-0.8,0.8H9.8C9.4,16,9,15.6,9,15.2V0.8C9,0.4,9.4,0,9.8,0l5.4,0C15.6,0,16,0.4,16,0.8z M7,0.8 v14.4C7,15.6,6.6,16,6.2,16H0.8C0.4,16,0,15.6,0,15.2L0,0.8C0,0.4,0.4,0,0.8,0l5.4,0C6.6,0,7,0.4,7,0.8z\"\n })));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgLayoutGridWithDetails16X16);\nexport default __webpack_public_path__ + \"static/media/layout-grid-with-details-16x16.35eeec3b8790feb52f773f9be74f99a2.svg\";\nexport { ForwardRef as ReactComponent };","var _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgLayoutList16X16(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n width: 16,\n height: 16,\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M15.2,16H0.8C0.4,16,0,15.6,0,15.2V9.8C0,9.4,0.4,9,0.8,9h14.4C15.6,9,16,9.4,16,9.8v5.4C16,15.6,15.6,16,15.2,16z M15.2,7 H0.8C0.4,7,0,6.6,0,6.2V0.8C0,0.4,0.4,0,0.8,0h14.4C15.6,0,16,0.4,16,0.8v5.4C16,6.6,15.6,7,15.2,7z\"\n })));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgLayoutList16X16);\nexport default __webpack_public_path__ + \"static/media/layout-list-16x16.5f3a6f1555afe68c94d8581c822e97c4.svg\";\nexport { ForwardRef as ReactComponent };","var _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgLogo(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n width: \"196px\",\n height: \"26px\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M194.797,18 L184,18 C184,18.552 183.552,19 183,19 L182,19 C181.448,19 181,18.552 181,18 L181,16 L178.377,16 C177.708,16 177.119,15.556 176.935,14.912 L173.246,2 L168,2 L168,4 L168.500,4 C169.328,4 170,4.672 170,5.500 L170,24.500 C170,25.328 169.328,26 168.500,26 L165.500,26 C164.672,26 164,25.328 164,24.500 L164,5.500 C164,4.672 164.672,4 165.500,4 L166,4 L166,1.500 C166,0.672 166.672,0 167.500,0 L173.622,0 C174.292,0 174.881,0.444 175.065,1.088 L178.754,14 L181,14 L181,13 C181,12.448 181.448,12 182,12 L183,12 C183.552,12 184,12.448 184,13 L194.797,13 C195.461,13 196,13.539 196,14.203 L196,16.797 C196,17.461 195.461,18 194.797,18 ZM156.783,26 L154.483,26 C153.767,26 153.129,25.552 152.884,24.878 L150.437,18.135 C150.407,18.054 150.331,18 150.245,18 L142.768,18 C142.682,18 142.606,18.054 142.576,18.135 L140.129,24.878 C139.884,25.552 139.245,26 138.530,26 L136.230,26 C135.395,26 134.815,25.169 135.100,24.383 L143.445,1.122 C143.690,0.448 144.328,0 145.044,0 L147.969,0 C148.685,0 149.323,0.448 149.568,1.122 L157.913,24.383 C158.198,25.169 157.618,26 156.783,26 ZM148.472,12.725 L146.698,7.848 C146.633,7.668 146.380,7.668 146.315,7.848 L144.541,12.725 C144.492,12.859 144.591,13 144.733,13 L148.280,13 C148.422,13 148.521,12.859 148.472,12.725 ZM130.493,26 L128.090,26 C127.555,26 127.060,25.714 126.792,25.250 L122.610,18 L120.003,22.520 L120.003,24.500 C120.003,25.328 119.333,26 118.505,26 L116.507,26 C115.680,26 115.009,25.328 115.009,24.500 L115.009,1.500 C115.009,0.672 115.680,0 116.507,0 L118.505,0 C119.333,0 120.003,0.672 120.003,1.500 L120.003,12.520 L126.792,0.750 C127.060,0.286 127.555,0 128.090,0 L130.493,0 C131.646,0 132.367,1.250 131.791,2.250 L125.487,13 L131.791,23.750 C132.367,24.750 131.646,26 130.493,26 ZM103.987,15.775 L103.987,24.500 C103.987,25.328 103.315,26 102.486,26 L100.485,26 C99.656,26 98.984,25.328 98.984,24.500 L98.984,15.775 L98.594,15.100 L91.180,2.250 C90.610,1.250 91.330,0 92.481,0 L94.792,0 C95.322,0 95.823,0.290 96.093,0.750 L101.486,10.090 L106.879,0.750 C107.149,0.290 107.649,0 108.179,0 L110.491,0 C111.641,0 112.362,1.250 111.791,2.250 L103.987,15.775 ZM79,26 C71.821,26 66,20.179 66,13 C66,5.820 71.821,-0.001 79,-0.001 C86.180,-0.001 92.001,5.820 92.001,13 C92.001,20.179 86.180,26 79,26 ZM79,5 C74.582,5 71,8.582 71,13 C71,17.418 74.582,21 79,21 C83.418,21 87,17.418 87,13 C87,8.582 83.418,5 79,5 ZM62.793,23.750 C63.362,24.750 62.643,26 61.494,26 L59.186,26 C58.656,26 58.157,25.710 57.887,25.250 L53.711,18 L49.005,18 L49.005,24.500 C49.005,25.330 48.335,26 47.506,26 L45.508,26 C44.679,26 44.009,25.330 44.009,24.500 L44.009,1.500 C44.009,0.670 44.679,0 45.508,0 L54,0 C58.966,0 62.992,4.030 62.992,9 C62.992,12.240 61.274,15.090 58.706,16.670 L62.793,23.750 ZM54,5 L50.004,5 C49.454,5 49.005,5.450 49.005,6 L49.005,12 C49.005,12.550 49.454,13 50.004,13 L54,13 C56.208,13 57.997,11.210 57.997,9 C57.997,6.790 56.208,5 54,5 ZM39.500,5 L33,5 L33,24.500 C33,25.328 32.328,26 31.500,26 L29.500,26 C28.672,26 28,25.328 28,24.500 L28,5 L21.500,5 C20.672,5 20,4.328 20,3.500 L20,1.500 C20,0.672 20.672,0 21.500,0 L39.500,0 C40.328,0 41,0.672 41,1.500 L41,3.500 C41,4.328 40.328,5 39.500,5 ZM16.487,8 L14.181,8 C13.565,8 13.040,7.611 12.790,7.048 C12.261,5.856 10.765,5 9,5 C6.793,5 5.005,6.340 5.005,8 C5.005,8.940 5.575,9.780 6.483,10.320 C6.706,10.455 6.948,10.574 7.206,10.673 C8.059,11 8.412,12.020 7.955,12.812 L6.948,14.558 C6.573,15.208 5.768,15.499 5.080,15.201 C3.872,14.679 2.815,13.924 1.989,13 C0.751,11.630 0.012,9.890 0.012,8 C0.012,3.580 4.037,0 9,0 C13.254,0 17.017,2.629 17.950,6.163 C18.196,7.095 17.450,8 16.487,8 ZM1.513,18 L3.820,18 C4.435,18 4.960,18.389 5.210,18.952 C5.739,20.144 7.236,21 9,21 C11.207,21 12.995,19.660 12.995,18 C12.995,17.060 12.426,16.220 11.517,15.680 C11.294,15.544 11.052,15.426 10.794,15.327 C9.941,14.999 9.588,13.980 10.045,13.188 L11.053,11.442 C11.427,10.792 12.233,10.501 12.920,10.799 C14.128,11.320 15.185,12.075 16.011,13 C17.249,14.370 17.988,16.110 17.988,18 C17.988,22.420 13.964,26 9,26 C4.747,26 0.983,23.371 0.050,19.837 C-0.196,18.905 0.550,18 1.513,18 Z\"\n })));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgLogo);\nexport default __webpack_public_path__ + \"static/media/logo.c4ed52f9c923badcef6718fa56d8e050.svg\";\nexport { ForwardRef as ReactComponent };","var _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgLogoSmall(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n width: \"120px\",\n height: \"20px\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M118.5,20h-1.1c-0.6,0-1.2-0.4-1.4-1l-1.5-4h-6.1l-1.5,4c-0.2,0.6-0.8,1-1.4,1h-1.1c-1,0-1.8-1-1.4-2l1.1-3 l1.5-4l3.6-10c0.2-0.6,0.8-1,1.4-1h1.6c0.6,0,1.2,0.4,1.4,1l3.6,10l1.5,4l1.1,3C120.3,19,119.5,20,118.5,20z M111.5,6.6l-1.6,4.4 h3.2L111.5,6.6z M99.5,20h-1.4c-0.4,0-0.7-0.2-0.9-0.5L94,14l-2,3.5v1c0,0.8-0.7,1.5-1.5,1.5h-1c-0.8,0-1.5-0.7-1.5-1.5v-17 C88,0.7,88.7,0,89.5,0h1C91.3,0,92,0.7,92,1.5v8L94,6l3.2-5.5C97.4,0.2,97.7,0,98.1,0h1.4c1.2,0,1.9,1.3,1.3,2.3L96.3,10l4.5,7.8 C101.4,18.8,100.7,20,99.5,20z M80.3,11.8L80,12.3v6.2c0,0.8-0.7,1.5-1.5,1.5h-1c-0.8,0-1.5-0.7-1.5-1.5v-6.2l-0.3-0.5l-5.5-9.5 c-0.6-1,0.2-2.3,1.3-2.3h1.4c0.4,0,0.7,0.2,0.9,0.5L76,4.3l2,3.5l2-3.5l2.2-3.8C82.4,0.2,82.7,0,83.1,0h1.4c1.2,0,1.9,1.3,1.3,2.3 L80.3,11.8z M60,20c-5.5,0-10-4.5-10-10S54.5,0,60,0s10,4.5,10,10S65.5,20,60,20z M60,4c-3.3,0-6,2.7-6,6s2.7,6,6,6s6-2.7,6-6 S63.3,4,60,4z M47.8,17.8c0.6,1-0.2,2.3-1.3,2.3h-2L41,14h-4v4.5c0,0.8-0.7,1.5-1.5,1.5h-1c-0.8,0-1.5-0.7-1.5-1.5v-17 C33,0.7,33.7,0,34.5,0H41c0.3,0,0.7,0,1,0.1c3.4,0.5,6,3.4,6,6.9c0,2.4-1.2,4.5-3.1,5.8L47.8,17.8z M42,4.2C41.7,4.1,41.3,4,41,4h-3 c-0.6,0-1,0.4-1,1v4c0,0.6,0.4,1,1,1h3c0.3,0,0.7-0.1,1-0.2c0.3-0.1,0.6-0.3,0.9-0.5C43.6,8.8,44,7.9,44,7C44,5.7,43.2,4.6,42,4.2z M29.5,4H25v14.5c0,0.8-0.7,1.5-1.5,1.5h-1c-0.8,0-1.5-0.7-1.5-1.5V4h-4.5C15.7,4,15,3.3,15,2.5v-1C15,0.7,15.7,0,16.5,0h13 C30.3,0,31,0.7,31,1.5v1C31,3.3,30.3,4,29.5,4z M6.5,20c-2.8,0-5.5-1.7-6.4-4c-0.4-1,0.3-2,1.3-2h1c0.5,0,0.9,0.3,1.2,0.7 c0.2,0.3,0.4,0.6,0.8,0.8C4.9,15.8,5.8,16,6.5,16c1.5,0,2.8-0.9,2.8-2c0-0.7-0.5-1.3-1.2-1.6C7.4,12,7,11,7.4,10.3l0.4-0.9 c0.4-0.7,1.2-1,1.8-0.6c0.6,0.3,1.2,0.7,1.6,1.2c1,1.1,1.7,2.5,1.7,4C13,17.3,10.1,20,6.5,20z M11.6,6h-1c-0.5,0-0.9-0.3-1.2-0.7 C9.2,4.9,8.9,4.7,8.6,4.5C8.1,4.2,7.2,4,6.5,4C5,4,3.7,4.9,3.7,6c0,0.7,0.5,1.3,1.2,1.6C5.6,8,6,9,5.6,9.7l-0.4,0.9 c-0.4,0.7-1.2,1-1.8,0.6c-0.6-0.3-1.2-0.7-1.6-1.2C0.6,8.9,0,7.5,0,6c0-3.3,2.9-6,6.5-6c2.8,0,5.5,1.7,6.4,4C13.3,4.9,12.6,6,11.6,6 z\"\n })));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgLogoSmall);\nexport default __webpack_public_path__ + \"static/media/logo-small.51a8286876b75442f23f1f011b42ec32.svg\";\nexport { ForwardRef as ReactComponent };","var _path, _path2;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgLogout20(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n width: 20,\n height: 20,\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M10,5.3V3H3v14h7v-2.3c0-0.4,0.3-0.7,0.7-0.7h0.6c0.4,0,0.7,0.3,0.7,0.7V18c0,0.6-0.4,1-1,1H2c-0.6,0-1-0.4-1-1V2 c0-0.6,0.4-1,1-1h9c0.6,0,1,0.4,1,1v3.3C12,5.7,11.7,6,11.3,6h-0.6C10.3,6,10,5.7,10,5.3z\"\n })), _path2 || (_path2 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M19.8,10.7l-3.4,3.4c-0.2,0.2-0.6,0.2-0.8,0L15,13.5c-0.2-0.2-0.2-0.6,0-0.8l1.7-1.7h-7C9.3,11,9,10.7,9,10.3V9.7 C9,9.3,9.3,9,9.7,9h7L15,7.3c-0.2-0.2-0.2-0.6,0-0.8l0.6-0.6c0.2-0.2,0.6-0.2,0.8,0l3.4,3.4C20.2,9.7,20.2,10.3,19.8,10.7z\"\n })));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgLogout20);\nexport default __webpack_public_path__ + \"static/media/logout-20.d03df6f7b153825154efd82cd3f9f943.svg\";\nexport { ForwardRef as ReactComponent };","var _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgMenu18X14(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n width: 18,\n height: 14,\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M0,8V6h18v2H0z M0,0h18v2H0V0z M14,14H0v-2h14V14z\"\n })));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgMenu18X14);\nexport default __webpack_public_path__ + \"static/media/menu-18x14.52b081d610bea0ebce7c2f9b6c6a7eb3.svg\";\nexport { ForwardRef as ReactComponent };","var _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgPerson20(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n width: 20,\n height: 20,\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M13.7,10.7C15.1,9.6,16,7.9,16,6c0-3.3-2.7-6-6-6S4,2.7,4,6c0,1.9,0.9,3.6,2.3,4.7C2.6,12.2,0,15.8,0,20h2c0-4.4,3.6-8,8-8 s8,3.6,8,8h2C20,15.8,17.4,12.2,13.7,10.7z M6,6c0-2.2,1.8-4,4-4s4,1.8,4,4c0,2.2-1.8,4-4,4S6,8.2,6,6z\"\n })));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgPerson20);\nexport default __webpack_public_path__ + \"static/media/person-20.1a7a2f9b22ff9fe8895cd903e6c623df.svg\";\nexport { ForwardRef as ReactComponent };","var _path, _path2;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgPower20(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n width: 20,\n height: 20,\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M10.3,9H9.7C9.3,9,9,8.7,9,8.3V0.7C9,0.3,9.3,0,9.7,0h0.6C10.7,0,11,0.3,11,0.7v7.6C11,8.7,10.7,9,10.3,9z\"\n })), _path2 || (_path2 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M19,10c0,5.1-4.2,9.1-9.3,9C4.8,18.9,0.8,14.6,1,9.7c0.1-2.2,1-4.3,2.4-5.8c0.4-0.5,1.2-0.4,1.6,0.2l0,0 c0.2,0.4,0.2,0.9-0.1,1.2c-1.3,1.4-2,3.3-1.8,5.4c0.3,3.3,2.9,6,6.2,6.3c4.2,0.4,7.8-2.8,7.8-7c0-1.8-0.7-3.5-1.8-4.7 c-0.3-0.3-0.3-0.8-0.1-1.2l0,0c0.4-0.5,1.1-0.6,1.6-0.1C18.1,5.5,19,7.7,19,10z\"\n })));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgPower20);\nexport default __webpack_public_path__ + \"static/media/power-20.2277201e4559f306f98648579e2e1ee9.svg\";\nexport { ForwardRef as ReactComponent };","var _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgQuickview16(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n width: 16,\n height: 16,\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M14,15h-4v-2h3v-3h2v4C15,14.6,14.6,15,14,15z M13,3h-3V1h4c0.6,0,1,0.4,1,1v4h-2V3z M6,3H3v3H1V2c0-0.6,0.4-1,1-1h4V3z M3,13h3v2H2c-0.6,0-1-0.4-1-1v-4h2V13z\"\n })));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgQuickview16);\nexport default __webpack_public_path__ + \"static/media/quickview-16.d965374df78658983ac0a06feb02df52.svg\";\nexport { ForwardRef as ReactComponent };","var _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgSearch20(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n width: 20,\n height: 20,\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M19.2,17.8c0,0-0.2,0.5-0.5,0.8c-0.4,0.4-0.9,0.6-0.9,0.6s-0.9,0.7-2.8-1.6c-1.1-1.4-2.2-2.8-3.1-3.9C10.9,14.5,9.5,15,8,15 c-3.9,0-7-3.1-7-7s3.1-7,7-7s7,3.1,7,7c0,1.5-0.5,2.9-1.3,4c1.1,0.8,2.5,2,4,3.1C20,16.8,19.2,17.8,19.2,17.8z M8,3C5.2,3,3,5.2,3,8 c0,2.8,2.2,5,5,5c2.8,0,5-2.2,5-5C13,5.2,10.8,3,8,3z\"\n })));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgSearch20);\nexport default __webpack_public_path__ + \"static/media/search-20.ceef3a6072f9acc013a92d13461234d3.svg\";\nexport { ForwardRef as ReactComponent };","var _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgZoomIn24(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n width: 24,\n height: 24,\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M15,18c-2,0-3.8-0.6-5.2-1.7c-1,1.3-2.1,2.8-3.5,4.6c-2.2,2.8-3.4,1.9-3.4,1.9s-0.6-0.3-1.1-0.7 c-0.4-0.4-0.7-1-0.7-1s-0.9-1.2,1.9-3.3c1.8-1.4,3.3-2.5,4.6-3.5C6.6,12.8,6,11,6,9c0-5,4-9,9-9s9,4,9,9S20,18,15,18z M15,2 c-3.9,0-7,3.1-7,7s3.1,7,7,7s7-3.1,7-7S18.9,2,15,2z M16,13h-2v-3h-3V8h3V5h2v3h3v2h-3V13z\"\n })));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgZoomIn24);\nexport default __webpack_public_path__ + \"static/media/zoom-in-24.9364fc07df193bbba129eb6edab16a01.svg\";\nexport { ForwardRef as ReactComponent };","// react\nimport React from 'react';\n\n// third-party\nimport classNames from 'classnames';\nimport PropTypes from 'prop-types';\n\n// application\nimport { ArrowRoundedLeft7x11Svg, ArrowRoundedRight7x11Svg } from '../../svg';\n\nfunction BlockHeader(props) {\n const {\n title,\n groups,\n onPrev,\n onNext,\n onGroupClick,\n } = props;\n let { arrows } = props;\n\n if (arrows) {\n arrows = (\n
\n );\n }\n\n let groupsList;\n\n if (groups.length > 0) {\n groupsList = groups.map((group, index) => {\n const classes = classNames('block-header__group', {\n 'block-header__group--active': group.current,\n });\n\n return (\n
\n onGroupClick(group)}>\n {group.name}\n \n \n );\n });\n\n groupsList = (\n
\n );\n }\n\n return (\n
\n
{title} \n
\n {groupsList}\n {arrows}\n
\n );\n}\n\nBlockHeader.propTypes = {\n title: PropTypes.string,\n arrows: PropTypes.bool,\n groups: PropTypes.array,\n onNext: PropTypes.func,\n onPrev: PropTypes.func,\n onGroupClick: PropTypes.func,\n};\nBlockHeader.defaultProps = {\n groups: [],\n onGroupClick: () => {},\n};\n\nexport default BlockHeader;\n","/*\n * Copyright 2015, Yahoo Inc.\n * Copyrights licensed under the New BSD License.\n * See the accompanying LICENSE file for terms.\n */\nimport { __rest, __spreadArray } from \"tslib\";\nimport * as React from 'react';\nimport useIntl from './useIntl';\nimport { shallowEqual } from '../utils';\nfunction areEqual(prevProps, nextProps) {\n var values = prevProps.values, otherProps = __rest(prevProps, [\"values\"]);\n var nextValues = nextProps.values, nextOtherProps = __rest(nextProps, [\"values\"]);\n return (shallowEqual(nextValues, values) &&\n shallowEqual(otherProps, nextOtherProps));\n}\nvar FormattedMessage = React.memo(function (props) {\n var intl = useIntl();\n var formatMessage = intl.formatMessage, _a = intl.textComponent, Text = _a === void 0 ? React.Fragment : _a;\n var id = props.id, description = props.description, defaultMessage = props.defaultMessage, values = props.values, children = props.children, _b = props.tagName, Component = _b === void 0 ? Text : _b, ignoreTag = props.ignoreTag;\n var descriptor = { id: id, description: description, defaultMessage: defaultMessage };\n var nodes = formatMessage(descriptor, values, {\n ignoreTag: ignoreTag,\n });\n if (!Array.isArray(nodes)) {\n nodes = [nodes];\n }\n if (typeof children === 'function') {\n return children(nodes);\n }\n if (Component) {\n // Needs to use `createElement()` instead of JSX, otherwise React will\n // warn about a missing `key` prop with rich-text message formatting.\n return React.createElement.apply(React, __spreadArray([Component, null], nodes));\n }\n return React.createElement(React.Fragment, null, nodes);\n}, areEqual);\nFormattedMessage.displayName = 'FormattedMessage';\nexport default FormattedMessage;\n","import * as React from 'react';\nimport { Context } from './injectIntl';\nimport { invariantIntlContext } from '../utils';\nexport default function useIntl() {\n var intl = React.useContext(Context);\n invariantIntlContext(intl);\n return intl;\n}\n","// react\nimport { Component } from 'react';\n\n// third-party\nimport PropTypes from 'prop-types';\n\nclass AsyncAction extends Component {\n canceled = false;\n\n constructor(props) {\n super(props);\n\n this.state = {\n loading: false,\n };\n }\n\n componentWillUnmount() {\n this.canceled = true;\n }\n\n run = () => {\n const { action } = this.props;\n const { loading } = this.state;\n\n if (loading || !action) {\n return;\n }\n\n this.setState({ loading: true });\n\n action().then(() => {\n if (this.canceled) {\n return;\n }\n\n this.setState({ loading: false });\n });\n };\n\n render() {\n const { render } = this.props;\n const { loading } = this.state;\n\n if (render) {\n return render({ run: this.run, loading });\n }\n\n return null;\n }\n}\n\nAsyncAction.propTypes = {\n action: PropTypes.func,\n render: PropTypes.func,\n};\n\nexport default AsyncAction;\n","// react\nimport React from 'react';\n\n// third-party\nimport PropTypes from 'prop-types';\nimport { connect } from 'react-redux';\n\nfunction Points(props) {\n const { value } = props;\n\n return (\n
\n {`${value}`}\n {' '}\n Points\n \n);\n}\n\nPoints.propTypes = {\n /** price value */\n value: PropTypes.number.isRequired,\n};\n\nexport default connect()(Points);\n","export const CART_ADD_ITEM = 'CART_ADD_ITEM';\nexport const CART_REMOVE_ITEM = 'CART_REMOVE_ITEM';\nexport const CART_REMOVE_ALL = 'CART_REMOVE_ALL';\nexport const CART_UPDATE_QUANTITIES = 'CART_UPDATE_QUANTITIES';\n","import {\n CART_ADD_ITEM, CART_REMOVE_ITEM, CART_REMOVE_ALL, CART_UPDATE_QUANTITIES,\n} from './cartActionTypes';\n\n/**\n * @param {array} items\n * @param {object} product\n * @param {array} options\n * @return {number}\n */\nfunction findItemIndex(items, product, options) {\n return items.findIndex((item) => {\n if (item.product.productID !== product.productID) {\n return false;\n }\n if (options) {\n if (item.option.optionID !== options.optionID) {\n return false;\n }\n }\n return true;\n });\n}\n\nfunction calcSubtotal(items) {\n return items.reduce((subtotal, item) => subtotal + item.total, 0);\n}\n\nfunction calcQuantity(items) {\n return items.reduce((quantity, item) => quantity + item.quantity, 0);\n}\n\nfunction calcTotal(subtotal) {\n return subtotal;\n}\n\nfunction addItem(state, product, option, quantity) {\n const itemIndex = findItemIndex(state.items, product, option);\n\n let newItems;\n let { lastItemId } = state;\n if (itemIndex === -1) {\n lastItemId += 1;\n newItems = [...state.items, {\n id: lastItemId,\n product: { ...product },\n option: { ...option },\n quantity,\n }];\n } else {\n const item = state.items[itemIndex];\n\n newItems = [\n ...state.items.slice(0, itemIndex),\n {\n ...item,\n quantity: item.quantity + quantity,\n },\n ...state.items.slice(itemIndex + 1),\n ];\n }\n\n return {\n ...state,\n lastItemId,\n items: newItems,\n quantity: calcQuantity(newItems),\n };\n}\n\nfunction removeItem(state, itemId) {\n const { items } = state;\n const newItems = items.filter((item) => item.id !== itemId);\n\n const subtotal = calcSubtotal(newItems);\n const total = calcTotal(subtotal);\n\n return {\n ...state,\n items: newItems,\n quantity: calcQuantity(newItems),\n subtotal,\n total,\n };\n}\n\nfunction removeAll(state) {\n const subtotal = calcSubtotal([]);\n const total = calcTotal(subtotal);\n\n return {\n ...state,\n items: [],\n quantity: calcQuantity([]),\n subtotal,\n total,\n };\n}\n\nfunction updateQuantities(state, quantities) {\n let needUpdate = false;\n\n const newItems = state.items.map((item) => {\n const quantity = quantities.find((x) => x.itemId === item.id && x.value !== item.quantity);\n\n if (!quantity) {\n return item;\n }\n\n needUpdate = true;\n\n return {\n ...item,\n quantity: quantity.value,\n total: quantity.value * item.price,\n };\n });\n\n if (needUpdate) {\n const subtotal = calcSubtotal(newItems);\n const total = calcTotal(subtotal);\n\n return {\n ...state,\n items: newItems,\n quantity: calcQuantity(newItems),\n subtotal,\n total,\n };\n }\n\n return state;\n}\n\n/*\n* item example:\n* {\n* id: 1,\n* product: {...}\n* options: [\n* {optionId: 1, optionTitle: 'Color', valueId: 1, valueTitle: 'Red'}\n* ],\n* price: 250,\n* quantity: 2,\n* total: 500\n* }\n* extraLine example:\n* {\n* type: 'shipping',\n* title: 'Shipping',\n* price: 25\n* }\n*/\nconst initialState = {\n lastItemId: 0,\n quantity: 0,\n items: [],\n subtotal: 0,\n total: 0,\n};\n\nexport default function cartReducer(state = initialState, action) {\n switch (action.type) {\n case CART_ADD_ITEM:\n return addItem(state, action.product, action.option, action.quantity);\n\n case CART_REMOVE_ITEM:\n return removeItem(state, action.itemId);\n\n case CART_REMOVE_ALL:\n return removeAll(state, action.itemId);\n\n case CART_UPDATE_QUANTITIES:\n return updateQuantities(state, action.quantities);\n\n default:\n return state;\n }\n}\n","export const QUICKVIEW_OPEN = 'QUICKVIEW_OPEN';\nexport const QUICKVIEW_CLOSE = 'QUICKVIEW_CLOSE';\n","import { QUICKVIEW_CLOSE, QUICKVIEW_OPEN } from './quickviewActionTypes';\n\nconst initialState = {\n open: false,\n product: null,\n};\n\nexport default function quickviewReducer(state = initialState, action) {\n let newState = state;\n\n if (action.type === QUICKVIEW_OPEN) {\n newState = {\n ...state,\n open: true,\n product: JSON.parse(JSON.stringify(action.product)),\n };\n } else if (action.type === QUICKVIEW_CLOSE) {\n newState = {\n ...state,\n open: false,\n };\n }\n\n return newState;\n}\n","import productApi from '../../server/real/endpoints/products';\nimport { QUICKVIEW_CLOSE, QUICKVIEW_OPEN } from './quickviewActionTypes';\n\nlet cancelPreviousRequest = () => { };\n\nexport function quickviewOpenSuccess(product) {\n return {\n type: QUICKVIEW_OPEN,\n product,\n };\n}\n\nexport function quickviewClose() {\n return {\n type: QUICKVIEW_CLOSE,\n };\n}\n\nexport function quickviewOpen(productSlug) {\n return (dispatch) => {\n cancelPreviousRequest();\n\n return new Promise((resolve) => {\n let canceled = false;\n // sending request to server, timeout is used as a stub\n const timer = setTimeout(() => {\n productApi.getProductBySlug(productSlug).then((product) => {\n if (canceled) {\n return;\n }\n\n if (product) {\n dispatch(quickviewOpenSuccess(product.data));\n }\n\n resolve();\n });\n }, 350);\n\n cancelPreviousRequest = () => {\n canceled = true;\n clearTimeout(timer);\n resolve();\n };\n });\n };\n}\n","import quickviewReducer from './quickviewReducer';\n\nexport * from './quickviewActions';\nexport default quickviewReducer;\n","import { toast } from 'react-toastify';\nimport {\n CART_ADD_ITEM, CART_REMOVE_ALL, CART_REMOVE_ITEM, CART_UPDATE_QUANTITIES,\n} from './cartActionTypes';\nimport { quickviewClose } from '../quickview';\n\nexport function cartAddItemSuccess(product, option = {}, quantity = 1) {\n toast.success(`Product \"${product.productName}\" added to cart!`);\n\n return {\n type: CART_ADD_ITEM,\n product,\n option,\n quantity,\n };\n}\nexport function cartRemoveAllSuccess() {\n return {\n type: CART_REMOVE_ALL,\n };\n}\n\nexport function cartRemoveItemSuccess(itemId) {\n return {\n type: CART_REMOVE_ITEM,\n itemId,\n };\n}\n\nexport function cartUpdateQuantitiesSuccess(quantities) {\n return {\n type: CART_UPDATE_QUANTITIES,\n quantities,\n };\n}\n\nexport function cartAddItem(product, option, quantity = 1, program = {}) {\n // sending request to server, timeout is used as a stub\n return (dispatch) => (\n new Promise((resolve) => {\n const { type } = program;\n if (type === 'plateau' || type === 'claim') {\n dispatch(quickviewClose());\n dispatch(cartRemoveAllSuccess());\n dispatch(cartAddItemSuccess(product, option, quantity));\n resolve();\n window.location.href = '/shop/checkout';\n } else {\n dispatch(quickviewClose());\n dispatch(cartAddItemSuccess(product, option, quantity));\n resolve();\n }\n })\n );\n}\nexport function cartClear() {\n // sending request to server, timeout is used as a stub\n return (dispatch) => (\n new Promise((resolve) => {\n setTimeout(() => {\n dispatch(cartRemoveAllSuccess());\n resolve();\n }, 500);\n })\n );\n}\n\nexport function cartRemoveItem(itemId) {\n // sending request to server, timeout is used as a stub\n return (dispatch) => (\n new Promise((resolve) => {\n setTimeout(() => {\n dispatch(cartRemoveItemSuccess(itemId));\n resolve();\n }, 500);\n })\n );\n}\n\nexport function cartUpdateQuantities(quantities) {\n // sending request to server, timeout is used as a stub\n return (dispatch) => (\n new Promise((resolve) => {\n setTimeout(() => {\n dispatch(cartUpdateQuantitiesSuccess(quantities));\n resolve();\n }, 500);\n })\n );\n}\n","import cartReducer from './cartReducer';\n\nexport * from './cartActions';\nexport default cartReducer;\n","export const url = {\n home: () => '/',\n\n catalog: () => '/shop/catalog',\n\n category: (category) => `/shop/catalog/${category.slug}`,\n\n product: (product) => `/shop/products/${product.slug}`,\n};\n\nexport function getCategoryParents(category) {\n return category.parent ? [...getCategoryParents(category.parent), category.parent] : [];\n}\n","export function makeIdGenerator() {\n let lastId = 0;\n\n return () => {\n lastId += 1;\n\n return lastId;\n };\n}\n\nexport function nameToSlug(name) {\n return name.toLowerCase().replace(/[^a-z0-9]/, '-').replace(/-+/, '-');\n}\n\nexport function categoryHasProducts() {\n return true;\n}\n\nexport function getProductColors(product) {\n if (!product.options) {\n return [];\n }\n const colors = product.options.map((a) => a.optionColorValue);\n const unique = colors.filter((value, index, self) => self.indexOf(value) === index && value.length > 0);\n return unique;\n}\n\nexport function getProductSizes(product) {\n if (!product || !product.options) {\n return [];\n }\n const sizes = product.options.map((a) => a.optionSizeValue);\n const unique = sizes.filter((value, index, self) => self.indexOf(value) === index && value.length > 0);\n return unique;\n}\nexport function getCustom1Options(product) {\n if (!product || !product.options) {\n return [];\n }\n const values = product.options.map((a) => a.optionCustom1Value);\n const unique = values.filter((value, index, self) => self.indexOf(value) === index && value.length > 0);\n return unique;\n}\nexport function getCustom2Options(product) {\n if (!product || !product.options) {\n return [];\n }\n const values = product.options.map((a) => a.optionCustom2Value);\n const unique = values.filter((value, index, self) => self.indexOf(value) === index && value.length > 0);\n return unique;\n}\nexport function getCustom3Options(product) {\n if (!product || !product.options) {\n return [];\n }\n const values = product.options.map((a) => a.optionCustom3Value);\n const unique = values.filter((value, index, self) => self.indexOf(value) === index && value.length > 0);\n return unique;\n}\n\nexport function getAvailableOptions(product, color, size, custom1, custom2, custom3) {\n if (!product || !product.options) {\n return [];\n }\n const options = product.options.filter((data) => {\n const colorValid = color === undefined || data.optionColorValue === color;\n const sizeValid = size === undefined || data.optionSizeValue === size;\n const custom1Valid = custom1 === undefined || data.optionCustom1Value === custom1;\n const custom2Valid = custom2 === undefined || data.optionCustom2Value === custom2;\n const custom3Valid = custom3 === undefined || data.optionCustom3Value === custom3;\n return colorValid && sizeValid && custom1Valid && custom2Valid && custom3Valid;\n });\n return options;\n}\nexport function getProductOption(product, color, size, custom1, custom2, custom3) {\n const options = getAvailableOptions(product, color, size, custom1, custom2, custom3);\n\n const colorExists = product.options.filter((data) => data.optionSizeValue && data.optionSizeValue.length > 0) > 0;\n const sizeExists = product.options.filter((data) => data.optionColorValue && data.optionColorValue.length > 0) > 0;\n const custom1Exists = product.optionsCustom1Label && product.optionsCustom1Label.length > 0;\n const custom2Exists = product.optionsCustom2Label && product.optionsCustom2Label.length > 0;\n const custom3Exists = product.optionsCustom3Label && product.optionsCustom3Label.length > 0;\n\n const colorValid = (colorExists && color && color.length > 0) || !colorExists;\n const sizeValid = (sizeExists && size && size.length > 0) || !colorExists;\n const custom1Valid = (custom1Exists && custom1 && custom1.length > 0) || !custom1Exists;\n const custom2Valid = (custom2Exists && custom2 && custom2.length > 0) || !custom2Exists;\n const custom3Valid = (custom3Exists && custom3 && custom3.length > 0) || !custom3Exists;\n\n if (!colorValid || !sizeValid || !custom1Valid || !custom2Valid || !custom3Valid) return undefined;\n\n if (options.length === 1) return options[0];\n return undefined;\n}\n\nexport function getCostByRegion(product, region) {\n if (!region) return undefined;\n const { costs } = product;\n if (costs) {\n const selectedCosts = costs.filter((data) => region.country.indexOf('USA') !== -1 ? data.regionName === region.country : data.regionCCCode === region.country);\n if (selectedCosts.length === 0) return undefined;\n return selectedCosts[0];\n }\n return undefined;\n}\n\nexport function getProductPrice(product, option, region) {\n let { price } = product;\n if (!price) price = 0;\n if (option) {\n const optionCost = getCostByRegion(option, region);\n if (optionCost) {\n return optionCost.price;\n }\n }\n const cost = getCostByRegion(product, region);\n if (cost) {\n return cost.price;\n }\n return price;\n}\n\nexport function getProductDiscountPrice(product, option, region) {\n let { discountPrice } = product;\n const cost = getCostByRegion(product, region);\n if (cost) {\n discountPrice += cost.costHandling;\n }\n if (option && option.price) {\n discountPrice += option.price;\n }\n return discountPrice;\n}\n\nexport function selectedLanguage(product, locale, defaultData, data) {\n if (product.langs === undefined) {\n return defaultData;\n }\n const selectedLang = product.langs[locale];\n\n if (selectedLang) {\n if (selectedLang[data] === '') {\n return defaultData;\n }\n return selectedLang[data];\n }\n return defaultData;\n}\n","import { createContext } from 'react';\n\nconst ProgramContext = createContext({});\nexport default ProgramContext;\n","// react\nimport React, { useContext } from 'react';\n\n// third-party\nimport classNames from 'classnames';\nimport PropTypes from 'prop-types';\nimport { connect } from 'react-redux';\nimport { Link } from 'react-router-dom';\n\n// application\nimport { FormattedMessage } from 'react-intl';\nimport AsyncAction from './AsyncAction';\nimport Points from './Points';\nimport { cartAddItem } from '../../store/cart';\nimport { Quickview16Svg } from '../../svg';\nimport { quickviewOpen } from '../../store/quickview';\nimport { url } from '../../services/utils';\nimport { getProductPrice, getProductDiscountPrice, selectedLanguage } from '../../server/utils';\n\n// context\nimport ProgramContext from '../../contexts/ProgramContext';\n\nfunction ProductCard(props) {\n const {\n product, layout, quickviewOpen, cartAddItem, region, locale,\n } = props;\n const { program } = useContext(ProgramContext);\n const containerClasses = classNames('product-card', {\n 'product-card--layout--grid product-card--size--sm': layout === 'grid-sm',\n 'product-card--layout--grid product-card--size--nl': layout === 'grid-nl',\n 'product-card--layout--grid product-card--size--lg': layout === 'grid-lg',\n 'product-card--layout--list': layout === 'list',\n 'product-card--layout--horizontal': layout === 'horizontal',\n });\n let badges = [];\n let image;\n let price;\n let cartTextLang;\n\n function equalizeLang (langData) {\n if (langData === 'sp') {\n return 'es'\n }\n if (langData === 'ge') {\n return 'de'\n }\n return langData\n }\n\n if (program && program.type === 'points') {\n cartTextLang = (
);\n } else {\n cartTextLang = (
);\n }\n if (product.badges && product.badges.includes('discount')) {\n badges.push(\n
\n Discount\n
,\n );\n }\n if (product.badges && product.badges.includes('featured')) {\n badges.push(\n
\n Featured\n
,\n );\n }\n if (product.badges && product.badges.includes('new')) {\n badges.push(\n
\n New\n
,\n );\n }\n\n badges = badges.length ?
{badges}
: null;\n\n if (product.images) {\n image = (\n
\n
\n
\n \n
\n );\n }\n\n if (program && program.type === 'points') {\n if (product.discountPrice) {\n price = (\n
\n
\n \n \n {' '}\n
\n \n \n
\n );\n } else {\n price = (\n
\n );\n }\n }\n const features = product.features && product.features.slice(0, 3).map((feature, key) => (\n
{feature.featureName} \n));\n let optionComponent;\n if (product.options && product.options.length > 1) {\n optionComponent = (\n
\n quickviewOpen(product.slug)}\n render={({ run, loading }) => (\n \n {cartTextLang}\n \n )}\n />\n \n \n );\n } else {\n optionComponent = (\n
\n cartAddItem(product, {}, 1, program)}\n render={({ run, loading }) => (\n \n \n {cartTextLang}\n \n \n )}\n />\n \n );\n }\n\n return (\n
\n
quickviewOpen(product.slug)}\n render={({ run, loading }) => (\n \n \n \n )}\n />\n {badges}\n {image}\n \n
\n {product.brandName}\n
\n
\n {selectedLanguage(product, equalizeLang(locale), product.productName, 'name')}\n
\n
\n {features}\n
\n
\n \n
\n Ships within\n {': '}\n \n {product.productDropShipDays} \n {' '}\n day(s)\n
\n {price}\n
\n {program && program.permissions.allowPurchase && (optionComponent)}\n
\n
\n \n );\n}\n\nProductCard.propTypes = {\n /**\n * product object\n */\n product: PropTypes.object.isRequired,\n /**\n * product card layout\n * one of ['grid-sm', 'grid-nl', 'grid-lg', 'list', 'horizontal']\n */\n layout: PropTypes.oneOf(['grid-sm', 'grid-nl', 'grid-lg', 'list', 'horizontal']),\n};\n\nconst mapStateToProps = (state) => ({\n region: state.region,\n locale: state.locale,\n});\n\nconst mapDispatchToProps = {\n cartAddItem,\n quickviewOpen,\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(ProductCard);\n","// react\nimport React, { Component } from 'react';\n\n// third-party\nimport classNames from 'classnames';\nimport PropTypes from 'prop-types';\n\n// application\nimport BlockHeader from '../shared/BlockHeader';\nimport ProductCard from '../shared/ProductCard';\nimport StroykaSlick from '../shared/StroykaSlick';\n\nexport default class BlockProductsCarousel extends Component {\n handleNextClick = () => {\n if (this.slickRef) {\n this.slickRef.slickNext();\n }\n };\n\n handlePrevClick = () => {\n if (this.slickRef) {\n this.slickRef.slickPrev();\n }\n };\n\n setSlickRef = (ref) => {\n this.slickRef = ref;\n };\n\n productsColumns() {\n const columns = [];\n const { rows } = this.props;\n let { products } = this.props;\n\n if (!products) return [];\n\n if (rows > 0) {\n products = products.slice();\n\n while (products.length > 0) {\n columns.push(products.splice(0, rows));\n }\n }\n\n return columns;\n }\n\n render() {\n const {\n layout, title, withSidebar, onGroupClick, groups, loading, slideSpeed,\n } = this.props;\n\n const slickSettings = {\n 'grid-4': {\n dots: false,\n arrows: false,\n infinite: true,\n speed: 400,\n slidesToShow: 4,\n slidesToScroll: 4,\n autoplay: slideSpeed !== 0,\n autoplaySpeed: slideSpeed * 1000,\n responsive: [\n {\n breakpoint: 992,\n settings: {\n slidesToShow: 4,\n slidesToScroll: 4,\n },\n },\n {\n breakpoint: 991,\n settings: {\n slidesToShow: 3,\n slidesToScroll: 3,\n },\n },\n {\n breakpoint: 767,\n settings: {\n slidesToShow: 2,\n slidesToScroll: 2,\n },\n },\n {\n breakpoint: 479,\n settings: {\n slidesToShow: 1,\n slidesToScroll: 1,\n },\n },\n ],\n },\n 'grid-4-sm': {\n dots: false,\n arrows: false,\n infinite: true,\n speed: 400,\n slidesToShow: 4,\n slidesToScroll: 4,\n autoplay: slideSpeed !== 0,\n autoplaySpeed: slideSpeed * 1000,\n responsive: [\n {\n breakpoint: 1199,\n settings: {\n slidesToShow: 3,\n slidesToScroll: 3,\n },\n },\n {\n breakpoint: 767,\n settings: {\n slidesToShow: 2,\n slidesToScroll: 2,\n },\n },\n {\n breakpoint: 474,\n settings: {\n slidesToShow: 1,\n slidesToScroll: 1,\n },\n },\n ],\n },\n 'grid-5': {\n dots: false,\n arrows: false,\n infinite: true,\n speed: 400,\n slidesToShow: 5,\n slidesToScroll: 5,\n autoplay: slideSpeed !== 0,\n autoplaySpeed: slideSpeed * 1000,\n responsive: [\n {\n breakpoint: 1199,\n settings: {\n slidesToShow: 4,\n slidesToScroll: 4,\n },\n },\n {\n breakpoint: 991,\n settings: {\n slidesToShow: 3,\n slidesToScroll: 3,\n },\n },\n {\n breakpoint: 767,\n settings: {\n slidesToShow: 2,\n slidesToScroll: 2,\n },\n },\n {\n breakpoint: 479,\n settings: {\n slidesToShow: 1,\n slidesToScroll: 1,\n },\n },\n ],\n },\n horizontal: {\n dots: false,\n arrows: false,\n infinite: true,\n speed: 400,\n slidesToShow: 3,\n slidesToScroll: 3,\n autoplay: slideSpeed !== 0,\n autoplaySpeed: slideSpeed * 1000,\n responsive: [\n {\n breakpoint: 991,\n settings: {\n slidesToShow: 2,\n slidesToScroll: 2,\n },\n },\n {\n breakpoint: 767,\n settings: {\n slidesToShow: 1,\n slidesToScroll: 1,\n },\n },\n ],\n },\n };\n\n const columns = this.productsColumns().map((column, index) => {\n const products = column.map((product) => (\n
\n ));\n\n return (\n
\n {products}\n
\n );\n });\n\n const blockClasses = classNames('block block-products-carousel', {\n 'block-products-carousel--loading': loading,\n 'block-products-carousel--has-items': columns.length > 0,\n });\n const containerClasses = classNames({\n container: !withSidebar,\n });\n\n return (\n
\n
\n
\n\n
\n
\n\n
\n {columns}\n \n
\n
\n
\n );\n }\n}\n\nBlockProductsCarousel.propTypes = {\n title: PropTypes.string.isRequired,\n layout: PropTypes.oneOf(['grid-4', 'grid-4-sm', 'grid-5', 'horizontal']),\n rows: PropTypes.number,\n products: PropTypes.array,\n groups: PropTypes.array,\n withSidebar: PropTypes.bool,\n loading: PropTypes.bool,\n onGroupClick: PropTypes.func,\n};\n\nBlockProductsCarousel.defaultProps = {\n layout: 'grid-4',\n rows: 1,\n products: [],\n groups: [],\n withSidebar: false,\n loading: false,\n onGroupClick: undefined,\n};\n","// react\nimport React, { useMemo } from 'react';\nimport { connect } from 'react-redux';\n\n// application\nimport productApi from '../../server/real/endpoints/products';\nimport { useProductTabs } from '../../services/hooks';\n\n// blocks\nimport BlockProductsCarousel from '../blocks/BlockProductsCarousel';\n\nfunction ProductsCarousel(props) {\n const { section, region } = props;\n const {\n categories, title, layout, rows, source, limit, slideSpeed,\n } = section;\n const featuredProducts = useProductTabs(\n useMemo(() => categories, [region]), (tab) => productApi.getProductsList({\n limit,\n category: tab && tab.categorySlug,\n source,\n region,\n }, {}, [], false),\n region,\n );\n\n return (\n
\n {featuredProducts && featuredProducts.data && featuredProducts.data.data && featuredProducts.data.data.items.length > 0 && (\n \n )}\n \n );\n}\n\nconst mapStateToProps = (state) => ({\n region: state.region,\n});\n\nconst mapDispatchToProps = {\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(ProductsCarousel);\n","// react\nimport React from 'react';\n\nimport BlockSlideShow from '../blocks/BlockSlideShow';\n\n// data stubs\nimport RawHTML from './RawHTML';\nimport ProductsCarousel from './ProductsCarousel';\n\nfunction Sections(props) {\n const { sections } = props;\n const sectionComponents = [\n ];\n\n if (sections) {\n for (let i = 0; i < sections.length; i += 1) {\n const key = `home-${i}`;\n switch (sections[i].type) {\n default:\n break;\n case 'html':\n sectionComponents.push(\n
,\n );\n break;\n case 'slider':\n sectionComponents.push(\n
,\n );\n break;\n case 'productsCarousel':\n sectionComponents.push(\n
,\n );\n break;\n case 'productCarousel':\n sectionComponents.push(\n
,\n );\n break;\n }\n }\n }\n\n return (\n
\n {sectionComponents}\n \n );\n}\n\nexport default Sections;\n","import { createContext } from 'react';\n\nconst UserContext = createContext({});\nexport default UserContext;\n","// react\nimport React, {\n useEffect, useState, useContext,\n} from 'react';\nimport { connect } from 'react-redux';\n\n// third-party\nimport { Helmet } from 'react-helmet-async';\n\n// data stubs\nimport Sections from './Sections';\nimport ProgramContext from '../../contexts/ProgramContext';\nimport programApi from '../../server/real/endpoints/programs';\nimport UserContext from '../../contexts/UserContext';\n\nfunction HomePageTwo(props) {\n const { locale, region } = props;\n const [page, setPage] = useState();\n const { program } = useContext(ProgramContext);\n const { user } = useContext(UserContext);\n const calculateLevelPage = () => {\n let levelPage;\n if (user) {\n levelPage = program?.plateauLevels?.filter((level) => level.id === user?.levelId);\n }\n if (levelPage?.[0]?.customHomePage && levelPage?.[0]?.customHomePage?.length > 0) {\n return levelPage?.[0].customHomePage;\n }\n return false\n };\n\n useEffect(() => {\n if (calculateLevelPage() && calculateLevelPage()?.length > 0) {\n if (!program) return;\n const content = programApi.getContent(program, locale);\n if (!content) return;\n const { pages } = content;\n if (!pages) return;\n const homePageData = pages.filter((data) => data.url === calculateLevelPage())?.length > 0 ? pages.filter((data) => data.url === calculateLevelPage()) : pages.filter((data) => data.url === 'home');\n if (homePageData.length === 0) return;\n setPage(homePageData[0]); \n } else {\n if (!program) return;\n const content = programApi.getContent(program, locale);\n if (!content) return;\n const { pages } = content;\n if (!pages) return;\n const homePageData = pages.filter((data) => data.url === 'home');\n if (homePageData.length === 0) return;\n setPage(homePageData[0]); \n }\n\n }, [program, locale, region]);\n return (\n
\n \n {program && ({`Home — ${program.fullName}`} )}\n \n {page && }\n \n );\n}\n\nconst mapStateToProps = (state) => ({\n locale: state.locale,\n region: state.region,\n});\n\nexport default connect(mapStateToProps)(HomePageTwo);\n","// react\nimport React, { useContext } from 'react';\nimport { connect } from 'react-redux';\nimport { FormattedMessage } from 'react-intl';\nimport ProgramContext from '../../contexts/ProgramContext';\n\n// data stubs\nfunction FooterContacts() {\n const { program } = useContext(ProgramContext);\n return (\n
\n
\n\n
\n \n
\n\n {program && program.contacts && (\n
\n
\n
\n {program.contacts.address && (\n \n \n {program.contacts.address}\n \n)}\n {program.contacts.email && (\n \n \n {program.contacts.email}\n \n)}\n {program.contacts.phone && (\n \n \n {`${program.contacts.phone}`}\n \n)}\n \n
\n )}\n
\n );\n}\n\nconst mapStateToProps = (state) => ({\n locale: state.locale,\n});\n\nexport default connect(mapStateToProps)(FooterContacts);\n","// react\nimport React, { useEffect, useState } from 'react';\n\n// third-party\nimport classNames from 'classnames';\n\n// application\nimport { ArrowRoundedUp13x8Svg } from '../../svg';\n\nexport default function ToTop() {\n const [show, setShow] = useState(false);\n\n const showFrom = 300;\n const classes = classNames('totop', {\n 'totop--show': show,\n });\n\n const onClick = () => {\n try {\n window.scrollTo({ top: 0, left: 0, behavior: 'smooth' });\n } catch {\n window.scrollTo(0, 0);\n }\n };\n\n useEffect(() => {\n let state = false;\n const onScroll = () => {\n const newState = window.pageYOffset >= showFrom;\n\n if (state !== newState) {\n setShow(state = newState);\n }\n };\n\n window.addEventListener('scroll', onScroll, { passive: true });\n\n return () => window.removeEventListener('scroll', onScroll, { passive: true });\n }, [setShow]);\n\n return (\n
\n );\n}\n","// react\nimport React from 'react';\nimport { connect } from 'react-redux';\n\n// application\nimport FooterContacts from './FooterContacts';\nimport { FormattedMessage } from 'react-intl';\nimport ToTop from './ToTop';\n\n// data stubs\n\nfunction Footer() {\n return (\n
\n );\n}\n\nconst mapStateToProps = (state) => ({\n locale: state.locale,\n});\n\nexport default connect(mapStateToProps)(Footer);\n","import Footer from './Footer';\n\nexport default Footer;\n","// react\nimport React, { Component } from 'react';\n\n// third-party\nimport classNames from 'classnames';\nimport PropTypes from 'prop-types';\nimport { Link } from 'react-router-dom';\n\nclass Indicator extends Component {\n constructor(props) {\n super(props);\n\n this.state = {\n open: false,\n };\n }\n\n componentDidMount() {\n document.addEventListener('mousedown', this.handleOutsideClick);\n }\n\n componentDidUpdate(prevProps, prevState) {\n const { open } = this.state;\n const { onOpen, onClose } = this.props;\n\n if (open !== prevState.open) {\n if (open && onOpen) {\n onOpen();\n }\n if (!open && onClose) {\n onClose();\n }\n }\n }\n\n componentWillUnmount() {\n document.removeEventListener('mousedown', this.handleOutsideClick);\n }\n\n setWrapperRef = (node) => {\n this.wrapperRef = node;\n };\n\n handleOutsideClick = (event) => {\n const { open } = this.state;\n\n if (this.wrapperRef && !this.wrapperRef.contains(event.target) && open) {\n this.close();\n }\n };\n\n handleButtonClick = (event) => {\n const { onClick, dropdown } = this.props;\n\n if (dropdown) {\n event.preventDefault();\n }\n\n this.toggle();\n\n if (onClick) {\n onClick(event);\n }\n };\n\n toggle() {\n this.setState((state) => ({\n open: !state.open,\n }));\n }\n\n open() {\n this.setState(() => ({\n open: true,\n }));\n }\n\n close() {\n this.setState(() => ({\n open: false,\n }));\n }\n\n render() {\n const { open } = this.state;\n const {\n url, className, icon, program,\n} = this.props;\n let { value, dropdown } = this.props;\n let button;\n\n if (value !== undefined) {\n value =
{value} ;\n }\n\n const title = (\n
\n {icon}\n {program === 'points' && (value)}\n \n );\n\n if (url) {\n button = (\n
\n {title}\n \n );\n } else {\n button = (\n
\n {title}\n \n );\n }\n\n if (dropdown) {\n dropdown = (\n
\n {dropdown}\n
\n );\n }\n\n const classes = classNames(`indicator indicator--trigger--click ${className}`, {\n 'indicator--opened': open,\n });\n\n return (\n
\n {button}\n {dropdown}\n
\n );\n }\n}\n\nIndicator.propTypes = {\n /** indicator value */\n value: PropTypes.number,\n /** the component that will be shown in the dropdown */\n dropdown: PropTypes.node,\n /** indicator icon */\n icon: PropTypes.node,\n /** indicator url */\n url: PropTypes.string,\n /** callback function that is called when the dropdown is opened */\n onOpen: PropTypes.func,\n /** callback function that is called when the dropdown is closed */\n onClose: PropTypes.func,\n};\n\nexport default Indicator;\n","// react\nimport React, { useContext } from 'react';\n\n// third-party\nimport classNames from 'classnames';\nimport { connect } from 'react-redux';\nimport { Link, useHistory } from 'react-router-dom';\nimport { FormattedMessage } from 'react-intl';\n\n// application\nimport AsyncAction from '../shared/AsyncAction';\nimport Points from '../shared/Points';\nimport Indicator from './Indicator';\nimport { Cart20Svg, Cross10Svg } from '../../svg';\nimport { cartRemoveItem } from '../../store/cart';\nimport { url } from '../../services/utils';\nimport { getProductPrice, selectedLanguage } from '../../server/utils';\n\nimport UserContext from '../../contexts/UserContext';\nimport ProgramContext from '../../contexts/ProgramContext';\n\nfunction IndicatorCart(props) {\n const { cart, cartRemoveItem } = props;\n const { region, locale } = props;\n const history = useHistory();\n let dropdown;\n let totals;\n const { user } = useContext(UserContext);\n const { program } = useContext(ProgramContext);\n let grandTotal = 0;\n const isDisabled = () => {\n if (grandTotal > user.balance) {\n return true;\n }\n return false;\n };\n\n const handleCheckout = () => {\n history.push('/shop/checkout');\n };\n\n function equalizeLang (langData) {\n if (langData === 'sp') {\n return 'es'\n }\n if (langData === 'ge') {\n return 'de'\n }\n return langData\n }\n\n const items = cart.items.map((item) => {\n const { product, quantity } = item;\n const { option } = item;\n const unitPrice = getProductPrice(product, option, region);\n const totalPrice = unitPrice * quantity;\n grandTotal += totalPrice;\n\n let image;\n if (item.product.images) {\n image = (\n
\n
\n
\n \n
\n );\n }\n\n const removeButton = (\n
cartRemoveItem(item.id)}\n render={({ run, loading }) => {\n const classes = classNames('dropcart__product-remove btn btn-light btn-sm btn-svg-icon', {\n 'btn-loading': loading,\n });\n\n return (\n \n \n \n );\n }}\n />\n );\n\n return (\n \n {image}\n
\n
\n {`${selectedLanguage(item.product, equalizeLang(locale), item.product.productName, 'name')}`}\n
\n
\n {item.option && item.option.optionColorValue && ({`Color: ${item.option.optionColorValue}`} )}\n {item.option && item.option.optionSizeValue && ({`Size: ${item.option.optionSizeValue}`} )}\n {item.option && item.option.optionCustom1Value && ({`${item.product.optionsCustom1Label}: ${item.option.optionCustom1Value}`} )}\n {item.option && item.option.optionCustom2Value && ({`${item.product.optionsCustom2Label}: ${item.option.optionCustom2Value}`} )}\n {item.option && item.option.optionCustom3Value && ({`${item.product.optionsCustom3Label}: ${item.option.optionCustom3Value}`} )}\n \n {program && program.type === 'points' && (\n
\n
{item.quantity} \n {' × '}\n
\n
\n)}\n
\n {program.type === 'points' && (removeButton)}\n
\n );\n });\n\n if (cart.quantity) {\n dropdown = (\n \n
\n {items}\n
\n\n {program && program.type === 'points' && (\n
\n
\n \n {totals}\n \n \n \n \n \n \n \n
\n
\n)}\n\n
\n {program && program.type === 'points' && ( )}\n \n \n \n
\n
\n );\n } else {\n dropdown = (\n \n );\n }\n\n return (\n } />\n );\n}\n\nconst mapStateToProps = (state) => ({\n cart: state.cart,\n region: state.region,\n locale: state.locale,\n});\n\nconst mapDispatchToProps = {\n cartRemoveItem,\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(IndicatorCart);\n","// react\nimport React from 'react';\n\n// third-party\nimport PropTypes from 'prop-types';\nimport { Link } from 'react-router-dom';\n\nfunction AppLink(props) {\n const { external, children, ...otherProps } = props;\n let link;\n\n if (external) {\n const {\n to,\n replace,\n innerRef,\n ...linkProps\n } = otherProps;\n\n link = {children} ;\n } else if (otherProps.to.includes('filter_page')) {\n link = {children} ;\n } else {\n if (otherProps.to.indexOf('http') !== -1) {\n link = {children} ;\n } else {\n link = {children};\n }\n \n }\n\n return link;\n}\n\nAppLink.propTypes = {\n to: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.shape({\n pathname: PropTypes.string,\n search: PropTypes.string,\n hash: PropTypes.string,\n state: PropTypes.any,\n }),\n ]).isRequired,\n replace: PropTypes.bool,\n innerRef: PropTypes.oneOfType([\n PropTypes.func,\n PropTypes.object,\n ]),\n external: PropTypes.bool,\n};\nAppLink.defaultProps = {\n external: false,\n};\n\nexport default AppLink;\n","// react\nimport React from 'react';\n\n// third-party\nimport classNames from 'classnames';\nimport PropTypes from 'prop-types';\nimport { Link } from 'react-router-dom';\n\nfunction MegamenuLinks(props) {\n const { links, depth } = props;\n\n const linksList = links.map((link, index) => {\n let title = null;\n let subLinks = null;\n\n if (link.title) {\n title = {link.title};\n }\n\n if (link.links && link.links.length) {\n subLinks = ;\n }\n\n const classes = classNames('megamenu__item', {\n 'megamenu__item--with-submenu': subLinks,\n });\n\n return (\n \n {title}\n {subLinks}\n \n );\n });\n\n return (\n \n );\n}\n\nMegamenuLinks.propTypes = {\n links: PropTypes.array,\n depth: PropTypes.number,\n};\n\nMegamenuLinks.defaultProps = {\n depth: 0,\n};\n\nexport default MegamenuLinks;\n","// react\nimport React from 'react';\n\n// third-party\nimport PropTypes from 'prop-types';\nimport { connect } from 'react-redux';\n\n// application\nimport MegamenuLinks from './MegamenuLinks';\n\nfunction Megamenu(props) {\n const { menu, location } = props;\n const direction = 'ltr';\n\n if (!menu) {\n return [];\n }\n\n const menuStyle = {\n backgroundImage: menu.image ? `url('${menu.image[direction]}')` : '',\n };\n\n const columns = menu.columns.map((column, index) => (\n \n \n
\n ));\n\n return (\n \n );\n}\n\nMegamenu.propTypes = {\n /** menu object (required) */\n menu: PropTypes.object,\n /** one of ['nav-links', 'department'] (default: 'nav-links') */\n location: PropTypes.oneOf(['nav-links', 'department']),\n};\n\nMegamenu.defaultProps = {\n location: 'nav-links',\n};\n\nconst mapStateToProps = (state) => ({\n locale: state.locale,\n});\n\nexport default connect(mapStateToProps)(Megamenu);\n","// react\nimport React from 'react';\n\n// third-party\nimport classNames from 'classnames';\nimport PropTypes from 'prop-types';\n\n// application\nimport AppLink from '../shared/AppLink';\nimport { ArrowRoundedRight6x9Svg } from '../../svg';\n\nfunction Menu(props) {\n const {\n layout,\n withIcons,\n items,\n onClick,\n } = props;\n\n const renderLink = (item, content) => {\n let link;\n\n if (item.url) {\n link = (\n onClick(item)}\n >\n {content}\n \n );\n } else {\n link = onClick(item)}>{content} ;\n }\n\n return link;\n };\n\n const itemsList = items.map((item, index) => {\n let arrow;\n let submenu;\n let icon;\n\n if (item.submenu && item.submenu.length) {\n arrow = ;\n }\n\n if (item.submenu && item.submenu.length) {\n submenu = (\n \n
\n \n );\n }\n\n if (withIcons && item.icon) {\n icon = (\n \n
\n
\n );\n }\n\n return (\n \n {renderLink(item, (\n \n {icon}\n {item.title}\n {arrow}\n \n ))}\n {submenu}\n \n );\n });\n\n const classes = classNames(`menu menu--layout--${layout}`, {\n 'menu--with-icons': withIcons,\n });\n\n return (\n \n );\n}\n\nMenu.propTypes = {\n /** one of ['classic', 'topbar'] (default: 'classic') */\n layout: PropTypes.oneOf(['classic', 'topbar']),\n /** default: false */\n withIcons: PropTypes.bool,\n /** array of menu items */\n items: PropTypes.array,\n /** callback function that is called when the item is clicked */\n onClick: PropTypes.func,\n};\n\nMenu.defaultProps = {\n layout: 'classic',\n withIcons: false,\n items: [],\n onClick: () => {},\n};\n\nexport default Menu;\n","// react\nimport React, { useContext } from 'react';\n\n// third-party\nimport classNames from 'classnames';\nimport PropTypes from 'prop-types';\nimport { connect } from 'react-redux';\n\n// application\nimport AppLink from '../shared/AppLink';\nimport Megamenu from './Megamenu';\nimport Menu from './Menu';\nimport { ArrowRoundedDown9x6Svg } from '../../svg';\nimport ProgramContext from '../../contexts/ProgramContext';\nimport programApi from '../../server/real/endpoints/programs';\n\n// data stubs\n\nfunction NavLinks(props) {\n const { locale } = props;\n const { program } = useContext(ProgramContext);\n const content = programApi.getContent(program, locale);\n const handleMouseEnter = (event) => {\n const direction = 'ltr';\n\n const item = event.currentTarget;\n const megamenu = item.querySelector('.nav-links__megamenu');\n\n if (megamenu) {\n const container = megamenu.offsetParent;\n const containerWidth = container.getBoundingClientRect().width;\n const megamenuWidth = megamenu.getBoundingClientRect().width;\n const itemOffsetLeft = item.offsetLeft;\n\n if (direction === 'rtl') {\n const itemPosition = containerWidth - (\n itemOffsetLeft + item.getBoundingClientRect().width\n );\n\n const megamenuPosition = Math.round(\n Math.min(itemPosition, containerWidth - megamenuWidth),\n );\n\n megamenu.style.left = '';\n megamenu.style.right = `${megamenuPosition}px`;\n } else {\n const megamenuPosition = Math.round(\n Math.min(itemOffsetLeft, containerWidth - megamenuWidth),\n );\n\n megamenu.style.right = '';\n megamenu.style.left = `${megamenuPosition}px`;\n }\n }\n };\n\n const linksList = content && content.desktopMenu && content.desktopMenu.map((item, index) => {\n let arrow;\n let submenu;\n\n if (item.submenu) {\n arrow = ;\n }\n\n if (item.submenu && item.submenu.type === 'menu') {\n submenu = (\n \n
\n \n );\n }\n\n if (item.submenu && item.submenu.type === 'megamenu') {\n submenu = (\n \n \n
\n );\n }\n\n const classes = classNames('nav-links__item', {\n 'nav-links__item--with-submenu': item.submenu,\n });\n\n return (\n \n \n \n {item.title}\n {arrow}\n \n \n {submenu}\n \n );\n });\n\n return (\n \n );\n}\n\nNavLinks.propTypes = {\n /** current locale */\n locale: PropTypes.string,\n};\n\nconst mapStateToProps = (state) => ({\n locale: state.locale,\n});\n\nexport default connect(mapStateToProps)(NavLinks);\n","import { createContext } from 'react';\n\nconst CategoriesContext = createContext({});\nexport default CategoriesContext;\n","// react\nimport React, { useContext } from 'react';\n\n// third-party\nimport classNames from 'classnames';\nimport { connect } from 'react-redux';\nimport { Link } from 'react-router-dom';\n\n// application\nimport AsyncAction from '../shared/AsyncAction';\nimport Points from '../shared/Points';\nimport { Cart16Svg } from '../../svg';\nimport { cartAddItem } from '../../store/cart';\nimport { url } from '../../services/utils';\nimport { quickviewOpen } from '../../store/quickview';\nimport ProgramContext from '../../contexts/ProgramContext';\nimport { getProductPrice, selectedLanguage } from '../../server/utils';\n\nfunction Suggestions(props) {\n const {\n context,\n className,\n products,\n cartAddItem,\n quickviewOpen,\n locale,\n } = props;\n const rootClasses = classNames(`suggestions suggestions--location--${context}`, className);\n const { program } = useContext(ProgramContext);\n const { region } = props;\n const list = (products && products.map((product) => {\n const unitPrice = getProductPrice(product, product.options, region);\n return (\n \n {product.images && (\n \n
\n
\n
\n
\n )}\n \n
\n {selectedLanguage(product, locale, product.productName, 'name')}\n \n
\n SKU:\n {' '}\n {product.productUPC}\n
\n
\n \n {program && program.type === 'points' ?
: null}\n
\n {context === 'header' && program && program.permissions && program.permissions.allowPurchase !== false && (\n \n {product.options && product.options.length > 1 ? (\n
\n quickviewOpen(product.slug)}\n render={({ run, loading }) => (\n \n {program && program.type === 'points' ? : Select }\n \n )}\n />\n \n ) : (\n
\n cartAddItem(product, [], 1, program)}\n render={({ run, loading }) => (\n \n {program && program.type === 'points' ? : Select }\n \n )}\n />\n \n )}\n
\n )}\n \n );\n }));\n\n return (\n \n );\n}\n\nconst mapStateToProps = (state) => ({\n region: state.region,\n locale: state.locale,\n});\n\nconst mapDispatchToProps = {\n cartAddItem,\n quickviewOpen,\n};\n\nexport default connect(\n mapStateToProps,\n mapDispatchToProps,\n)(Suggestions);\n","// react\nimport React, {\n useCallback,\n useEffect,\n useRef,\n useState,\n useContext,\n} from 'react';\n\n// third-party\nimport classNames from 'classnames';\nimport { withRouter } from 'react-router-dom';\nimport { FormattedMessage } from 'react-intl';\nimport { connect } from 'react-redux';\n\nimport CategoriesContext from '../../contexts/CategoriesContext';\n// application\nimport productApi from '../../server/real/endpoints/products';\nimport Suggestions from './Suggestions';\nimport { Cross20Svg, Search20Svg } from '../../svg';\n\nfunction Search(props) {\n const {\n context,\n className,\n inputRef,\n onClose,\n location,\n region,\n } = props;\n const [cancelFn, setCancelFn] = useState(() => () => { });\n const [suggestionsOpen, setSuggestionsOpen] = useState(false);\n const [hasSuggestions, setHasSuggestions] = useState(false);\n const [suggestedProducts, setSuggestedProducts] = useState();\n const [categories, setCategories] = useState([]);\n const { categories: categoriesData } = useContext(CategoriesContext);\n\n const treeToList = (categories, depth = 0) => (\n categories.reduce(\n (result, category) => [\n ...result,\n { depth, ...category },\n ...treeToList(category.children || [], depth + 1),\n ],\n [],\n )\n );\n\n let searchQuery = new URLSearchParams(location.search).get('filter_search');\n if (searchQuery === 'null') { searchQuery = ''; }\n const [query, setQuery] = useState();\n const [category, setCategory] = useState('[all]');\n\n useEffect(() => {\n if (!categoriesData) {\n return () => {\n };\n }\n\n setCategories(treeToList(categoriesData));\n\n return () => {\n };\n }, [categoriesData]);\n\n const wrapper = useRef(null);\n const close = useCallback(() => {\n if (onClose) {\n onClose();\n }\n\n setSuggestionsOpen(false);\n }, [onClose]);\n\n // Close suggestions when the location has been changed.\n useEffect(() => close(), [close, location]);\n\n // Close suggestions when a click has been made outside component.\n useEffect(() => {\n const onGlobalClick = (event) => {\n if (wrapper.current && !wrapper.current.contains(event.target)) {\n close();\n }\n };\n\n document.addEventListener('mousedown', onGlobalClick);\n\n return () => document.removeEventListener('mousedown', onGlobalClick);\n }, [close]);\n\n // Cancel previous typing.\n useEffect(() => () => cancelFn(), [cancelFn]);\n\n const getSuggestions = () => {\n let canceled = false;\n let timer;\n\n const newCancelFn = () => {\n canceled = true;\n clearTimeout(timer);\n };\n\n if (!query || query.length < 3) {\n setHasSuggestions(false);\n } else {\n const options = { limit: 5 };\n\n if (category !== '[all]') {\n options.category = category;\n }\n options.region = region;\n\n productApi.getSuggestions(query, options).then((products) => {\n if (canceled) {\n return;\n }\n setSuggestedProducts(products.data.items);\n setHasSuggestions(products.data.items.length > 0);\n setSuggestionsOpen(true);\n });\n }\n setCancelFn(() => newCancelFn);\n };\n\n useEffect(() => {\n getSuggestions();\n }, [query, category]);\n\n const handleFocus = () => {\n setSuggestionsOpen(true);\n };\n\n const handleChangeCategory = (event) => {\n setCategory(event.target.value);\n };\n\n const handleChangeQuery = (event) => {\n setQuery(event.target.value);\n };\n\n const handleBlur = () => {\n setTimeout(() => {\n if (!document.activeElement || document.activeElement === document.body) {\n return;\n }\n\n // Close suggestions if the focus received an external element.\n if (wrapper.current && !wrapper.current.contains(document.activeElement)) {\n close();\n }\n }, 10);\n };\n\n // Close suggestions when the Escape key has been pressed.\n const handleKeyDown = (event) => {\n // Escape.\n if (event.which === 27) {\n close();\n }\n };\n\n const rootClasses = classNames(`search search--location--${context}`, className, {\n 'search--suggestions-open': suggestionsOpen,\n 'search--has-suggestions': hasSuggestions,\n });\n\n const closeButton = context !== 'mobile-header' ? '' : (\n \n \n \n );\n\n const categoryOptions = categories.map((category) => (\n \n {'\\u00A0'.repeat(4 * category.depth)}\n {category.name}\n \n ));\n\n let action = 'shop';\n if (category && category !== '[all]') { action = `shop/catalog/${category}`; }\n\n return (\n \n
\n
\n {suggestedProducts &&
}\n\n
\n
\n );\n}\n\nconst mapStateToProps = (state) => ({\n region: state.region,\n});\n\nconst mapDispatchToProps = {\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(withRouter(Search));\n","// react\nimport React, { useContext } from 'react';\n\n// third-party\nimport { connect } from 'react-redux';\nimport { FormattedMessage } from 'react-intl';\n\n// application\nimport CartIndicator from './IndicatorCart';\nimport NavLinks from './NavLinks';\nimport Search from './Search';\n\n// context\nimport ProgramContext from '../../contexts/ProgramContext';\nimport UserContext from '../../contexts/UserContext';\n\nfunction NavPanel() {\n let points;\n const { program } = useContext(ProgramContext);\n const { user } = useContext(UserContext);\n if (program && program.type === 'points') {\n points = true;\n } else {\n points = false;\n }\n\n return (\n \n
\n
\n\n
\n \n
\n { program && program.permissions && program.permissions.allowPurchase !== false && (\n
\n \n\n \n\n
\n \n
\n { points ? (\n
\n \n {': '}\n {user.balance}\n
\n) : ' ' }\n
\n
\n \n)}\n
\n {!program?.showTopCategorySearchBar && (\n
\n )}\n
\n
\n );\n}\n\nconst mapStateToProps = (state) => ({\n wishlist: state.wishlist,\n});\n\nconst mapDispatchToProps = {};\n\nexport default connect(\n mapStateToProps,\n mapDispatchToProps,\n)(NavPanel);\n","// react\nimport React, { Component } from 'react';\n\n// third-party\nimport classNames from 'classnames';\nimport PropTypes from 'prop-types';\n\n// application\nimport Menu from './Menu';\nimport { ArrowRoundedDown7x5Svg } from '../../svg';\n\nclass Dropdown extends Component {\n constructor(props) {\n super(props);\n\n this.state = {\n open: false,\n };\n }\n\n componentDidMount() {\n document.addEventListener('mousedown', this.handleOutsideClick);\n }\n\n componentWillUnmount() {\n document.removeEventListener('mousedown', this.handleOutsideClick);\n }\n\n setWrapperRef = (node) => {\n this.wrapperRef = node;\n };\n\n handleOutsideClick = (event) => {\n if (this.wrapperRef && !this.wrapperRef.contains(event.target)) {\n this.setState(() => ({\n open: false,\n }));\n }\n };\n\n handleButtonClick = () => {\n this.setState((state) => ({\n open: !state.open,\n }));\n };\n\n handleItemClick = (item) => {\n const { onClick } = this.props;\n\n this.setState(() => ({\n open: false,\n }));\n\n if (onClick) {\n onClick(item);\n }\n };\n\n render() {\n const { open } = this.state;\n const { title, withIcons, items } = this.props;\n\n const classes = classNames('topbar-dropdown', {\n 'topbar-dropdown--opened': open,\n });\n\n return (\n \n
\n {title}\n \n \n\n
\n
\n \n
\n );\n }\n}\n\nDropdown.propTypes = {\n /** title */\n title: PropTypes.node.isRequired,\n /** array of menu items */\n items: PropTypes.array.isRequired,\n /** default: false */\n withIcons: PropTypes.bool,\n /** callback function that is called when the item is clicked */\n onClick: PropTypes.func,\n};\n\nDropdown.defaultProps = {\n withIcons: false,\n onClick: undefined,\n};\n\nexport default Dropdown;\n","// react\nimport React, { useContext } from 'react';\n\n// third-party\nimport { connect } from 'react-redux';\nimport { FormattedMessage } from 'react-intl';\nimport ProgramContext from '../../contexts/ProgramContext';\n\n// application\nimport Dropdown from './Dropdown';\nimport { localeChange } from '../../store/locale';\n\nfunction DropdownLanguage(props) {\n const { locale, localeChange: changeLocale } = props;\n const { program } = useContext(ProgramContext);\n\n let languages = [\n {\n title: 'English',\n locale: 'en',\n code: 'EN',\n },\n {\n title: 'French',\n locale: 'fr',\n code: 'FR',\n },\n {\n title: 'Spanish',\n locale: 'sp',\n code: 'SP',\n },\n {\n title: 'German',\n locale: 'ge',\n code: 'GE',\n },\n {\n title: 'Italian',\n locale: 'it',\n code: 'IT',\n },\n {\n title: 'Portuguese',\n locale: 'pt',\n code: 'PT',\n },\n {\n title: 'Dutch',\n locale: 'nl',\n code: 'NL',\n },\n ];\n languages = languages.filter((data) => program.languages.indexOf(data.locale) !== -1);\n\n const language = languages.find((x) => x.locale === locale);\n\n const title = (\n \n \n {': '}\n {language.code} \n \n );\n\n if (program.languages.length < 2) {\n return (\n \n \n \n :\n {language.code}\n \n \n );\n }\n return (\n changeLocale(item.locale)}\n />\n );\n}\n\nconst mapStateToProps = (state) => ({\n locale: state.locale,\n});\n\nconst mapDispatchToProps = {\n localeChange,\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(DropdownLanguage);\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}\nexport { _assertThisInitialized as default };","import PropTypes from 'prop-types'; // https://github.com/twbs/bootstrap/blob/v4.0.0-alpha.4/js/src/modal.js#L436-L443\n\nexport function getScrollbarWidth() {\n var scrollDiv = document.createElement('div'); // .modal-scrollbar-measure styles // https://github.com/twbs/bootstrap/blob/v4.0.0-alpha.4/scss/_modal.scss#L106-L113\n\n scrollDiv.style.position = 'absolute';\n scrollDiv.style.top = '-9999px';\n scrollDiv.style.width = '50px';\n scrollDiv.style.height = '50px';\n scrollDiv.style.overflow = 'scroll';\n document.body.appendChild(scrollDiv);\n var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth;\n document.body.removeChild(scrollDiv);\n return scrollbarWidth;\n}\nexport function setScrollbarWidth(padding) {\n document.body.style.paddingRight = padding > 0 ? padding + \"px\" : null;\n}\nexport function isBodyOverflowing() {\n return document.body.clientWidth < window.innerWidth;\n}\nexport function getOriginalBodyPadding() {\n var style = window.getComputedStyle(document.body, null);\n return parseInt(style && style.getPropertyValue('padding-right') || 0, 10);\n}\nexport function conditionallyUpdateScrollbar() {\n var scrollbarWidth = getScrollbarWidth(); // https://github.com/twbs/bootstrap/blob/v4.0.0-alpha.6/js/src/modal.js#L433\n\n var fixedContent = document.querySelectorAll('.fixed-top, .fixed-bottom, .is-fixed, .sticky-top')[0];\n var bodyPadding = fixedContent ? parseInt(fixedContent.style.paddingRight || 0, 10) : 0;\n\n if (isBodyOverflowing()) {\n setScrollbarWidth(bodyPadding + scrollbarWidth);\n }\n}\nvar globalCssModule;\nexport function setGlobalCssModule(cssModule) {\n globalCssModule = cssModule;\n}\nexport function mapToCssModules(className, cssModule) {\n if (className === void 0) {\n className = '';\n }\n\n if (cssModule === void 0) {\n cssModule = globalCssModule;\n }\n\n if (!cssModule) return className;\n return className.split(' ').map(function (c) {\n return cssModule[c] || c;\n }).join(' ');\n}\n/**\n * Returns a new object with the key/value pairs from `obj` that are not in the array `omitKeys`.\n */\n\nexport function omit(obj, omitKeys) {\n var result = {};\n Object.keys(obj).forEach(function (key) {\n if (omitKeys.indexOf(key) === -1) {\n result[key] = obj[key];\n }\n });\n return result;\n}\n/**\n * Returns a filtered copy of an object with only the specified keys.\n */\n\nexport function pick(obj, keys) {\n var pickKeys = Array.isArray(keys) ? keys : [keys];\n var length = pickKeys.length;\n var key;\n var result = {};\n\n while (length > 0) {\n length -= 1;\n key = pickKeys[length];\n result[key] = obj[key];\n }\n\n return result;\n}\nvar warned = {};\nexport function warnOnce(message) {\n if (!warned[message]) {\n /* istanbul ignore else */\n if (typeof console !== 'undefined') {\n console.error(message); // eslint-disable-line no-console\n }\n\n warned[message] = true;\n }\n}\nexport function deprecated(propType, explanation) {\n return function validate(props, propName, componentName) {\n if (props[propName] !== null && typeof props[propName] !== 'undefined') {\n warnOnce(\"\\\"\" + propName + \"\\\" property of \\\"\" + componentName + \"\\\" has been deprecated.\\n\" + explanation);\n }\n\n for (var _len = arguments.length, rest = new Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {\n rest[_key - 3] = arguments[_key];\n }\n\n return propType.apply(void 0, [props, propName, componentName].concat(rest));\n };\n} // Shim Element if needed (e.g. in Node environment)\n\nvar Element = typeof window === 'object' && window.Element || function () {};\n\nexport function DOMElement(props, propName, componentName) {\n if (!(props[propName] instanceof Element)) {\n return new Error('Invalid prop `' + propName + '` supplied to `' + componentName + '`. Expected prop to be an instance of Element. Validation failed.');\n }\n}\nexport var targetPropType = PropTypes.oneOfType([PropTypes.string, PropTypes.func, DOMElement, PropTypes.shape({\n current: PropTypes.any\n})]);\nexport var tagPropType = PropTypes.oneOfType([PropTypes.func, PropTypes.string, PropTypes.shape({\n $$typeof: PropTypes.symbol,\n render: PropTypes.func\n}), PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.string, PropTypes.shape({\n $$typeof: PropTypes.symbol,\n render: PropTypes.func\n})]))]);\n/* eslint key-spacing: [\"error\", { afterColon: true, align: \"value\" }] */\n// These are all setup to match what is in the bootstrap _variables.scss\n// https://github.com/twbs/bootstrap/blob/v4-dev/scss/_variables.scss\n\nexport var TransitionTimeouts = {\n Fade: 150,\n // $transition-fade\n Collapse: 350,\n // $transition-collapse\n Modal: 300,\n // $modal-transition\n Carousel: 600 // $carousel-transition\n\n}; // Duplicated Transition.propType keys to ensure that Reactstrap builds\n// for distribution properly exclude these keys for nested child HTML attributes\n// since `react-transition-group` removes propTypes in production builds.\n\nexport var TransitionPropTypeKeys = ['in', 'mountOnEnter', 'unmountOnExit', 'appear', 'enter', 'exit', 'timeout', 'onEnter', 'onEntering', 'onEntered', 'onExit', 'onExiting', 'onExited'];\nexport var TransitionStatuses = {\n ENTERING: 'entering',\n ENTERED: 'entered',\n EXITING: 'exiting',\n EXITED: 'exited'\n};\nexport var keyCodes = {\n esc: 27,\n space: 32,\n enter: 13,\n tab: 9,\n up: 38,\n down: 40,\n home: 36,\n end: 35,\n n: 78,\n p: 80\n};\nexport var PopperPlacements = ['auto-start', 'auto', 'auto-end', 'top-start', 'top', 'top-end', 'right-start', 'right', 'right-end', 'bottom-end', 'bottom', 'bottom-start', 'left-end', 'left', 'left-start'];\nexport var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);\nexport function isReactRefObj(target) {\n if (target && typeof target === 'object') {\n return 'current' in target;\n }\n\n return false;\n}\n\nfunction getTag(value) {\n if (value == null) {\n return value === undefined ? '[object Undefined]' : '[object Null]';\n }\n\n return Object.prototype.toString.call(value);\n}\n\nexport function toNumber(value) {\n var type = typeof value;\n var NAN = 0 / 0;\n\n if (type === 'number') {\n return value;\n }\n\n if (type === 'symbol' || type === 'object' && getTag(value) === '[object Symbol]') {\n return NAN;\n }\n\n if (isObject(value)) {\n var other = typeof value.valueOf === 'function' ? value.valueOf() : value;\n value = isObject(other) ? \"\" + other : other;\n }\n\n if (type !== 'string') {\n return value === 0 ? value : +value;\n }\n\n value = value.replace(/^\\s+|\\s+$/g, '');\n var isBinary = /^0b[01]+$/i.test(value);\n return isBinary || /^0o[0-7]+$/i.test(value) ? parseInt(value.slice(2), isBinary ? 2 : 8) : /^[-+]0x[0-9a-f]+$/i.test(value) ? NAN : +value;\n}\nexport function isObject(value) {\n var type = typeof value;\n return value != null && (type === 'object' || type === 'function');\n}\nexport function isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n\n var tag = getTag(value);\n return tag === '[object Function]' || tag === '[object AsyncFunction]' || tag === '[object GeneratorFunction]' || tag === '[object Proxy]';\n}\nexport function findDOMElements(target) {\n if (isReactRefObj(target)) {\n return target.current;\n }\n\n if (isFunction(target)) {\n return target();\n }\n\n if (typeof target === 'string' && canUseDOM) {\n var selection = document.querySelectorAll(target);\n\n if (!selection.length) {\n selection = document.querySelectorAll(\"#\" + target);\n }\n\n if (!selection.length) {\n throw new Error(\"The target '\" + target + \"' could not be identified in the dom, tip: check spelling\");\n }\n\n return selection;\n }\n\n return target;\n}\nexport function isArrayOrNodeList(els) {\n if (els === null) {\n return false;\n }\n\n return Array.isArray(els) || canUseDOM && typeof els.length === 'number';\n}\nexport function getTarget(target, allElements) {\n var els = findDOMElements(target);\n\n if (allElements) {\n if (isArrayOrNodeList(els)) {\n return els;\n }\n\n if (els === null) {\n return [];\n }\n\n return [els];\n } else {\n if (isArrayOrNodeList(els)) {\n return els[0];\n }\n\n return els;\n }\n}\nexport var defaultToggleEvents = ['touchstart', 'click'];\nexport function addMultipleEventListeners(_els, handler, _events, useCapture) {\n var els = _els;\n\n if (!isArrayOrNodeList(els)) {\n els = [els];\n }\n\n var events = _events;\n\n if (typeof events === 'string') {\n events = events.split(/\\s+/);\n }\n\n if (!isArrayOrNodeList(els) || typeof handler !== 'function' || !Array.isArray(events)) {\n throw new Error(\"\\n The first argument of this function must be DOM node or an array on DOM nodes or NodeList.\\n The second must be a function.\\n The third is a string or an array of strings that represents DOM events\\n \");\n }\n\n Array.prototype.forEach.call(events, function (event) {\n Array.prototype.forEach.call(els, function (el) {\n el.addEventListener(event, handler, useCapture);\n });\n });\n return function removeEvents() {\n Array.prototype.forEach.call(events, function (event) {\n Array.prototype.forEach.call(els, function (el) {\n el.removeEventListener(event, handler, useCapture);\n });\n });\n };\n}\nexport var focusableElements = ['a[href]', 'area[href]', 'input:not([disabled]):not([type=hidden])', 'select:not([disabled])', 'textarea:not([disabled])', 'button:not([disabled])', 'object', 'embed', '[tabindex]:not(.modal)', 'audio[controls]', 'video[controls]', '[contenteditable]:not([contenteditable=\"false\"])'];","import _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport PropTypes from 'prop-types';\nimport { canUseDOM } from './utils';\nvar propTypes = {\n children: PropTypes.node.isRequired,\n node: PropTypes.any\n};\n\nvar Portal = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(Portal, _React$Component);\n\n function Portal() {\n return _React$Component.apply(this, arguments) || this;\n }\n\n var _proto = Portal.prototype;\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n if (this.defaultNode) {\n document.body.removeChild(this.defaultNode);\n }\n\n this.defaultNode = null;\n };\n\n _proto.render = function render() {\n if (!canUseDOM) {\n return null;\n }\n\n if (!this.props.node && !this.defaultNode) {\n this.defaultNode = document.createElement('div');\n document.body.appendChild(this.defaultNode);\n }\n\n return /*#__PURE__*/ReactDOM.createPortal(this.props.children, this.props.node || this.defaultNode);\n };\n\n return Portal;\n}(React.Component);\n\nPortal.propTypes = propTypes;\nexport default Portal;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { Transition } from 'react-transition-group';\nimport { mapToCssModules, omit, pick, TransitionPropTypeKeys, TransitionTimeouts, tagPropType } from './utils';\n\nvar propTypes = _objectSpread(_objectSpread({}, Transition.propTypes), {}, {\n children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]),\n tag: tagPropType,\n baseClass: PropTypes.string,\n baseClassActive: PropTypes.string,\n className: PropTypes.string,\n cssModule: PropTypes.object,\n innerRef: PropTypes.oneOfType([PropTypes.object, PropTypes.string, PropTypes.func])\n});\n\nvar defaultProps = _objectSpread(_objectSpread({}, Transition.defaultProps), {}, {\n tag: 'div',\n baseClass: 'fade',\n baseClassActive: 'show',\n timeout: TransitionTimeouts.Fade,\n appear: true,\n enter: true,\n exit: true,\n in: true\n});\n\nfunction Fade(props) {\n var Tag = props.tag,\n baseClass = props.baseClass,\n baseClassActive = props.baseClassActive,\n className = props.className,\n cssModule = props.cssModule,\n children = props.children,\n innerRef = props.innerRef,\n otherProps = _objectWithoutPropertiesLoose(props, [\"tag\", \"baseClass\", \"baseClassActive\", \"className\", \"cssModule\", \"children\", \"innerRef\"]);\n\n var transitionProps = pick(otherProps, TransitionPropTypeKeys);\n var childProps = omit(otherProps, TransitionPropTypeKeys);\n return /*#__PURE__*/React.createElement(Transition, transitionProps, function (status) {\n var isActive = status === 'entered';\n var classes = mapToCssModules(classNames(className, baseClass, isActive && baseClassActive), cssModule);\n return /*#__PURE__*/React.createElement(Tag, _extends({\n className: classes\n }, childProps, {\n ref: innerRef\n }), children);\n });\n}\n\nFade.propTypes = propTypes;\nFade.defaultProps = defaultProps;\nexport default Fade;","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport Portal from './Portal';\nimport Fade from './Fade';\nimport { getOriginalBodyPadding, conditionallyUpdateScrollbar, setScrollbarWidth, mapToCssModules, omit, focusableElements, TransitionTimeouts, keyCodes, targetPropType, getTarget } from './utils';\n\nfunction noop() {}\n\nvar FadePropTypes = PropTypes.shape(Fade.propTypes);\nvar propTypes = {\n isOpen: PropTypes.bool,\n autoFocus: PropTypes.bool,\n centered: PropTypes.bool,\n scrollable: PropTypes.bool,\n size: PropTypes.string,\n toggle: PropTypes.func,\n keyboard: PropTypes.bool,\n role: PropTypes.string,\n labelledBy: PropTypes.string,\n backdrop: PropTypes.oneOfType([PropTypes.bool, PropTypes.oneOf(['static'])]),\n onEnter: PropTypes.func,\n onExit: PropTypes.func,\n onOpened: PropTypes.func,\n onClosed: PropTypes.func,\n children: PropTypes.node,\n className: PropTypes.string,\n wrapClassName: PropTypes.string,\n modalClassName: PropTypes.string,\n backdropClassName: PropTypes.string,\n contentClassName: PropTypes.string,\n external: PropTypes.node,\n fade: PropTypes.bool,\n cssModule: PropTypes.object,\n zIndex: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n backdropTransition: FadePropTypes,\n modalTransition: FadePropTypes,\n innerRef: PropTypes.oneOfType([PropTypes.object, PropTypes.string, PropTypes.func]),\n unmountOnClose: PropTypes.bool,\n returnFocusAfterClose: PropTypes.bool,\n container: targetPropType,\n trapFocus: PropTypes.bool\n};\nvar propsToOmit = Object.keys(propTypes);\nvar defaultProps = {\n isOpen: false,\n autoFocus: true,\n centered: false,\n scrollable: false,\n role: 'dialog',\n backdrop: true,\n keyboard: true,\n zIndex: 1050,\n fade: true,\n onOpened: noop,\n onClosed: noop,\n modalTransition: {\n timeout: TransitionTimeouts.Modal\n },\n backdropTransition: {\n mountOnEnter: true,\n timeout: TransitionTimeouts.Fade // uses standard fade transition\n\n },\n unmountOnClose: true,\n returnFocusAfterClose: true,\n container: 'body',\n trapFocus: false\n};\n\nvar Modal = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(Modal, _React$Component);\n\n function Modal(props) {\n var _this;\n\n _this = _React$Component.call(this, props) || this;\n _this._element = null;\n _this._originalBodyPadding = null;\n _this.getFocusableChildren = _this.getFocusableChildren.bind(_assertThisInitialized(_this));\n _this.handleBackdropClick = _this.handleBackdropClick.bind(_assertThisInitialized(_this));\n _this.handleBackdropMouseDown = _this.handleBackdropMouseDown.bind(_assertThisInitialized(_this));\n _this.handleEscape = _this.handleEscape.bind(_assertThisInitialized(_this));\n _this.handleStaticBackdropAnimation = _this.handleStaticBackdropAnimation.bind(_assertThisInitialized(_this));\n _this.handleTab = _this.handleTab.bind(_assertThisInitialized(_this));\n _this.onOpened = _this.onOpened.bind(_assertThisInitialized(_this));\n _this.onClosed = _this.onClosed.bind(_assertThisInitialized(_this));\n _this.manageFocusAfterClose = _this.manageFocusAfterClose.bind(_assertThisInitialized(_this));\n _this.clearBackdropAnimationTimeout = _this.clearBackdropAnimationTimeout.bind(_assertThisInitialized(_this));\n _this.trapFocus = _this.trapFocus.bind(_assertThisInitialized(_this));\n _this.state = {\n isOpen: false,\n showStaticBackdropAnimation: false\n };\n return _this;\n }\n\n var _proto = Modal.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n var _this$props = this.props,\n isOpen = _this$props.isOpen,\n autoFocus = _this$props.autoFocus,\n onEnter = _this$props.onEnter;\n\n if (isOpen) {\n this.init();\n this.setState({\n isOpen: true\n });\n\n if (autoFocus) {\n this.setFocus();\n }\n }\n\n if (onEnter) {\n onEnter();\n } // traps focus inside the Modal, even if the browser address bar is focused\n\n\n document.addEventListener('focus', this.trapFocus, true);\n this._isMounted = true;\n };\n\n _proto.componentDidUpdate = function componentDidUpdate(prevProps, prevState) {\n if (this.props.isOpen && !prevProps.isOpen) {\n this.init();\n this.setState({\n isOpen: true\n }); // let render() renders Modal Dialog first\n\n return;\n } // now Modal Dialog is rendered and we can refer this._element and this._dialog\n\n\n if (this.props.autoFocus && this.state.isOpen && !prevState.isOpen) {\n this.setFocus();\n }\n\n if (this._element && prevProps.zIndex !== this.props.zIndex) {\n this._element.style.zIndex = this.props.zIndex;\n }\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n this.clearBackdropAnimationTimeout();\n\n if (this.props.onExit) {\n this.props.onExit();\n }\n\n if (this._element) {\n this.destroy();\n\n if (this.props.isOpen || this.state.isOpen) {\n this.close();\n }\n }\n\n document.removeEventListener('focus', this.trapFocus, true);\n this._isMounted = false;\n };\n\n _proto.trapFocus = function trapFocus(ev) {\n if (!this.props.trapFocus) {\n return;\n }\n\n if (!this._element) //element is not attached\n return;\n if (this._dialog && this._dialog.parentNode === ev.target) // initial focus when the Modal is opened\n return;\n if (this.modalIndex < Modal.openCount - 1) // last opened modal\n return;\n var children = this.getFocusableChildren();\n\n for (var i = 0; i < children.length; i++) {\n // focus is already inside the Modal\n if (children[i] === ev.target) return;\n }\n\n if (children.length > 0) {\n // otherwise focus the first focusable element in the Modal\n ev.preventDefault();\n ev.stopPropagation();\n children[0].focus();\n }\n };\n\n _proto.onOpened = function onOpened(node, isAppearing) {\n this.props.onOpened();\n (this.props.modalTransition.onEntered || noop)(node, isAppearing);\n };\n\n _proto.onClosed = function onClosed(node) {\n var unmountOnClose = this.props.unmountOnClose; // so all methods get called before it is unmounted\n\n this.props.onClosed();\n (this.props.modalTransition.onExited || noop)(node);\n\n if (unmountOnClose) {\n this.destroy();\n }\n\n this.close();\n\n if (this._isMounted) {\n this.setState({\n isOpen: false\n });\n }\n };\n\n _proto.setFocus = function setFocus() {\n if (this._dialog && this._dialog.parentNode && typeof this._dialog.parentNode.focus === 'function') {\n this._dialog.parentNode.focus();\n }\n };\n\n _proto.getFocusableChildren = function getFocusableChildren() {\n return this._element.querySelectorAll(focusableElements.join(', '));\n };\n\n _proto.getFocusedChild = function getFocusedChild() {\n var currentFocus;\n var focusableChildren = this.getFocusableChildren();\n\n try {\n currentFocus = document.activeElement;\n } catch (err) {\n currentFocus = focusableChildren[0];\n }\n\n return currentFocus;\n } // not mouseUp because scrollbar fires it, shouldn't close when user scrolls\n ;\n\n _proto.handleBackdropClick = function handleBackdropClick(e) {\n if (e.target === this._mouseDownElement) {\n e.stopPropagation();\n var backdrop = this._dialog ? this._dialog.parentNode : null;\n\n if (backdrop && e.target === backdrop && this.props.backdrop === 'static') {\n this.handleStaticBackdropAnimation();\n }\n\n if (!this.props.isOpen || this.props.backdrop !== true) return;\n\n if (backdrop && e.target === backdrop && this.props.toggle) {\n this.props.toggle(e);\n }\n }\n };\n\n _proto.handleTab = function handleTab(e) {\n if (e.which !== 9) return;\n if (this.modalIndex < Modal.openCount - 1) return; // last opened modal\n\n var focusableChildren = this.getFocusableChildren();\n var totalFocusable = focusableChildren.length;\n if (totalFocusable === 0) return;\n var currentFocus = this.getFocusedChild();\n var focusedIndex = 0;\n\n for (var i = 0; i < totalFocusable; i += 1) {\n if (focusableChildren[i] === currentFocus) {\n focusedIndex = i;\n break;\n }\n }\n\n if (e.shiftKey && focusedIndex === 0) {\n e.preventDefault();\n focusableChildren[totalFocusable - 1].focus();\n } else if (!e.shiftKey && focusedIndex === totalFocusable - 1) {\n e.preventDefault();\n focusableChildren[0].focus();\n }\n };\n\n _proto.handleBackdropMouseDown = function handleBackdropMouseDown(e) {\n this._mouseDownElement = e.target;\n };\n\n _proto.handleEscape = function handleEscape(e) {\n if (this.props.isOpen && e.keyCode === keyCodes.esc && this.props.toggle) {\n if (this.props.keyboard) {\n e.preventDefault();\n e.stopPropagation();\n this.props.toggle(e);\n } else if (this.props.backdrop === 'static') {\n e.preventDefault();\n e.stopPropagation();\n this.handleStaticBackdropAnimation();\n }\n }\n };\n\n _proto.handleStaticBackdropAnimation = function handleStaticBackdropAnimation() {\n var _this2 = this;\n\n this.clearBackdropAnimationTimeout();\n this.setState({\n showStaticBackdropAnimation: true\n });\n this._backdropAnimationTimeout = setTimeout(function () {\n _this2.setState({\n showStaticBackdropAnimation: false\n });\n }, 100);\n };\n\n _proto.init = function init() {\n try {\n this._triggeringElement = document.activeElement;\n } catch (err) {\n this._triggeringElement = null;\n }\n\n if (!this._element) {\n this._element = document.createElement('div');\n\n this._element.setAttribute('tabindex', '-1');\n\n this._element.style.position = 'relative';\n this._element.style.zIndex = this.props.zIndex;\n this._mountContainer = getTarget(this.props.container);\n\n this._mountContainer.appendChild(this._element);\n }\n\n this._originalBodyPadding = getOriginalBodyPadding();\n conditionallyUpdateScrollbar();\n\n if (Modal.openCount === 0) {\n document.body.className = classNames(document.body.className, mapToCssModules('modal-open', this.props.cssModule));\n }\n\n this.modalIndex = Modal.openCount;\n Modal.openCount += 1;\n };\n\n _proto.destroy = function destroy() {\n if (this._element) {\n this._mountContainer.removeChild(this._element);\n\n this._element = null;\n }\n\n this.manageFocusAfterClose();\n };\n\n _proto.manageFocusAfterClose = function manageFocusAfterClose() {\n if (this._triggeringElement) {\n var returnFocusAfterClose = this.props.returnFocusAfterClose;\n if (this._triggeringElement.focus && returnFocusAfterClose) this._triggeringElement.focus();\n this._triggeringElement = null;\n }\n };\n\n _proto.close = function close() {\n if (Modal.openCount <= 1) {\n var modalOpenClassName = mapToCssModules('modal-open', this.props.cssModule); // Use regex to prevent matching `modal-open` as part of a different class, e.g. `my-modal-opened`\n\n var modalOpenClassNameRegex = new RegExp(\"(^| )\" + modalOpenClassName + \"( |$)\");\n document.body.className = document.body.className.replace(modalOpenClassNameRegex, ' ').trim();\n }\n\n this.manageFocusAfterClose();\n Modal.openCount = Math.max(0, Modal.openCount - 1);\n setScrollbarWidth(this._originalBodyPadding);\n };\n\n _proto.renderModalDialog = function renderModalDialog() {\n var _classNames,\n _this3 = this;\n\n var attributes = omit(this.props, propsToOmit);\n var dialogBaseClass = 'modal-dialog';\n return /*#__PURE__*/React.createElement(\"div\", _extends({}, attributes, {\n className: mapToCssModules(classNames(dialogBaseClass, this.props.className, (_classNames = {}, _classNames[\"modal-\" + this.props.size] = this.props.size, _classNames[dialogBaseClass + \"-centered\"] = this.props.centered, _classNames[dialogBaseClass + \"-scrollable\"] = this.props.scrollable, _classNames)), this.props.cssModule),\n role: \"document\",\n ref: function ref(c) {\n _this3._dialog = c;\n }\n }), /*#__PURE__*/React.createElement(\"div\", {\n className: mapToCssModules(classNames('modal-content', this.props.contentClassName), this.props.cssModule)\n }, this.props.children));\n };\n\n _proto.render = function render() {\n var unmountOnClose = this.props.unmountOnClose;\n\n if (!!this._element && (this.state.isOpen || !unmountOnClose)) {\n var isModalHidden = !!this._element && !this.state.isOpen && !unmountOnClose;\n this._element.style.display = isModalHidden ? 'none' : 'block';\n var _this$props2 = this.props,\n wrapClassName = _this$props2.wrapClassName,\n modalClassName = _this$props2.modalClassName,\n backdropClassName = _this$props2.backdropClassName,\n cssModule = _this$props2.cssModule,\n isOpen = _this$props2.isOpen,\n backdrop = _this$props2.backdrop,\n role = _this$props2.role,\n labelledBy = _this$props2.labelledBy,\n external = _this$props2.external,\n innerRef = _this$props2.innerRef;\n var modalAttributes = {\n onClick: this.handleBackdropClick,\n onMouseDown: this.handleBackdropMouseDown,\n onKeyUp: this.handleEscape,\n onKeyDown: this.handleTab,\n style: {\n display: 'block'\n },\n 'aria-labelledby': labelledBy,\n role: role,\n tabIndex: '-1'\n };\n var hasTransition = this.props.fade;\n\n var modalTransition = _objectSpread(_objectSpread(_objectSpread({}, Fade.defaultProps), this.props.modalTransition), {}, {\n baseClass: hasTransition ? this.props.modalTransition.baseClass : '',\n timeout: hasTransition ? this.props.modalTransition.timeout : 0\n });\n\n var backdropTransition = _objectSpread(_objectSpread(_objectSpread({}, Fade.defaultProps), this.props.backdropTransition), {}, {\n baseClass: hasTransition ? this.props.backdropTransition.baseClass : '',\n timeout: hasTransition ? this.props.backdropTransition.timeout : 0\n });\n\n var Backdrop = backdrop && (hasTransition ? /*#__PURE__*/React.createElement(Fade, _extends({}, backdropTransition, {\n in: isOpen && !!backdrop,\n cssModule: cssModule,\n className: mapToCssModules(classNames('modal-backdrop', backdropClassName), cssModule)\n })) : /*#__PURE__*/React.createElement(\"div\", {\n className: mapToCssModules(classNames('modal-backdrop', 'show', backdropClassName), cssModule)\n }));\n return /*#__PURE__*/React.createElement(Portal, {\n node: this._element\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: mapToCssModules(wrapClassName)\n }, /*#__PURE__*/React.createElement(Fade, _extends({}, modalAttributes, modalTransition, {\n in: isOpen,\n onEntered: this.onOpened,\n onExited: this.onClosed,\n cssModule: cssModule,\n className: mapToCssModules(classNames('modal', modalClassName, this.state.showStaticBackdropAnimation && 'modal-static'), cssModule),\n innerRef: innerRef\n }), external, this.renderModalDialog()), Backdrop));\n }\n\n return null;\n };\n\n _proto.clearBackdropAnimationTimeout = function clearBackdropAnimationTimeout() {\n if (this._backdropAnimationTimeout) {\n clearTimeout(this._backdropAnimationTimeout);\n this._backdropAnimationTimeout = undefined;\n }\n };\n\n return Modal;\n}(React.Component);\n\nModal.propTypes = propTypes;\nModal.defaultProps = defaultProps;\nModal.openCount = 0;\nexport default Modal;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { mapToCssModules, tagPropType } from './utils';\nvar propTypes = {\n tag: tagPropType,\n wrapTag: tagPropType,\n toggle: PropTypes.func,\n className: PropTypes.string,\n cssModule: PropTypes.object,\n children: PropTypes.node,\n closeAriaLabel: PropTypes.string,\n charCode: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n close: PropTypes.object\n};\nvar defaultProps = {\n tag: 'h5',\n wrapTag: 'div',\n closeAriaLabel: 'Close',\n charCode: 215\n};\n\nvar ModalHeader = function ModalHeader(props) {\n var closeButton;\n\n var className = props.className,\n cssModule = props.cssModule,\n children = props.children,\n toggle = props.toggle,\n Tag = props.tag,\n WrapTag = props.wrapTag,\n closeAriaLabel = props.closeAriaLabel,\n charCode = props.charCode,\n close = props.close,\n attributes = _objectWithoutPropertiesLoose(props, [\"className\", \"cssModule\", \"children\", \"toggle\", \"tag\", \"wrapTag\", \"closeAriaLabel\", \"charCode\", \"close\"]);\n\n var classes = mapToCssModules(classNames(className, 'modal-header'), cssModule);\n\n if (!close && toggle) {\n var closeIcon = typeof charCode === 'number' ? String.fromCharCode(charCode) : charCode;\n closeButton = /*#__PURE__*/React.createElement(\"button\", {\n type: \"button\",\n onClick: toggle,\n className: mapToCssModules('close', cssModule),\n \"aria-label\": closeAriaLabel\n }, /*#__PURE__*/React.createElement(\"span\", {\n \"aria-hidden\": \"true\"\n }, closeIcon));\n }\n\n return /*#__PURE__*/React.createElement(WrapTag, _extends({}, attributes, {\n className: classes\n }), /*#__PURE__*/React.createElement(Tag, {\n className: mapToCssModules('modal-title', cssModule)\n }, children), close || closeButton);\n};\n\nModalHeader.propTypes = propTypes;\nModalHeader.defaultProps = defaultProps;\nexport default ModalHeader;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { mapToCssModules, tagPropType } from './utils';\nvar propTypes = {\n tag: tagPropType,\n className: PropTypes.string,\n cssModule: PropTypes.object\n};\nvar defaultProps = {\n tag: 'div'\n};\n\nvar ModalBody = function ModalBody(props) {\n var className = props.className,\n cssModule = props.cssModule,\n Tag = props.tag,\n attributes = _objectWithoutPropertiesLoose(props, [\"className\", \"cssModule\", \"tag\"]);\n\n var classes = mapToCssModules(classNames(className, 'modal-body'), cssModule);\n return /*#__PURE__*/React.createElement(Tag, _extends({}, attributes, {\n className: classes\n }));\n};\n\nModalBody.propTypes = propTypes;\nModalBody.defaultProps = defaultProps;\nexport default ModalBody;","// eslint-disable-next-line import/prefer-default-export\nexport const REGION_CHANGE = 'REGION_CHANGE';\n","import { REGION_CHANGE } from './regionActionTypes';\n\nconst initialState = {\n location: 'USA',\n country: 'USA-CONT',\n};\n\nexport default function regionReducer(state = initialState, action) {\n if (action.type === REGION_CHANGE) {\n return action.region;\n }\n\n return state;\n}\n","import { REGION_CHANGE } from './regionActionTypes';\n\n// eslint-disable-next-line import/prefer-default-export\nexport const regionChange = (region) => ({\n type: REGION_CHANGE,\n region,\n});\n","import regionReducer from './regionReducer';\n\nexport * from './regionActions';\nexport default regionReducer;\n","const locations = [\n {\n code: 'USA',\n title: 'USA',\n countries: [\n {\n code: 'USA-CONT',\n title: 'USA Continental',\n },\n {\n code: 'USA-HI',\n title: 'USA Hawai',\n },\n {\n code: 'USA-AK',\n title: 'USA Alaska',\n },\n {\n code: 'USA-VI',\n title: 'USA Virgin Islands',\n },\n {\n code: 'USA-PR',\n title: 'USA Puerto Rico',\n },\n ],\n },\n {\n code: 'NORTH_AMERICA',\n title: 'North America',\n countries: [\n {\n parent: 'North America',\n title: 'Bermuda',\n code: 'BMU',\n code2: 'BM',\n },\n {\n parent: 'North America',\n title: 'Canada',\n code: 'CAN',\n code2: 'CA',\n },\n {\n parent: 'North America',\n title: 'Mexico',\n code: 'MEX',\n code2: 'MX',\n },\n ],\n },\n {\n code: 'SOUTH_AMERICA',\n title: 'South America',\n countries: [\n {\n parent: 'South America',\n title: 'Anguilla',\n code: 'AIA',\n DZ: 'AI',\n },\n {\n parent: 'South America',\n title: 'Antigua And Barbuda',\n code: 'ATG',\n DZ: 'AG',\n },\n {\n parent: 'South America',\n title: 'Argentina',\n code: 'ARG',\n DZ: 'AR',\n },\n {\n parent: 'South America',\n title: 'Bahamas',\n code: 'BHS',\n DZ: 'BS',\n },\n {\n parent: 'South America',\n title: 'Barbados',\n code: 'BRB',\n DZ: 'BB',\n },\n {\n parent: 'South America',\n title: 'Belize',\n code: 'BLZ',\n DZ: 'BZ',\n },\n {\n parent: 'South America',\n title: 'Bolivia',\n code: 'BOL',\n DZ: 'BO',\n },\n {\n parent: 'South America',\n title: 'Bonaire (Netherlands Antilles)',\n code: 'BES',\n DZ: 'BQ',\n },\n {\n parent: 'South America',\n title: 'Brazil',\n code: 'BRA',\n DZ: 'BR',\n },\n {\n parent: 'South America',\n title: 'British Virgin Islands',\n code: 'VGB',\n DZ: 'VG',\n },\n {\n parent: 'South America',\n title: 'Cayman Islands',\n code: 'CYM',\n DZ: 'KY',\n },\n {\n parent: 'South America',\n title: 'Chile',\n code: 'CHL',\n DZ: 'CL',\n },\n {\n parent: 'South America',\n title: 'Colombia',\n code: 'COL',\n DZ: 'CO',\n },\n {\n parent: 'South America',\n title: 'Costa Rica',\n code: 'CRI',\n DZ: 'CR',\n },\n {\n parent: 'South America',\n title: 'Curaçao (Netherlands Antilles)',\n code: 'CUW',\n DZ: 'CW',\n },\n {\n parent: 'South America',\n title: 'Dominica',\n code: 'DMA',\n DZ: 'DM',\n },\n {\n parent: 'South America',\n title: 'Dominican Republic',\n code: 'DOM',\n DZ: 'DO',\n },\n {\n parent: 'South America',\n title: 'Ecuador',\n code: 'ECU',\n DZ: 'EC',\n },\n {\n parent: 'South America',\n title: 'El Salvador',\n code: 'SLV',\n DZ: 'SV',\n },\n {\n parent: 'South America',\n title: 'French Guiana',\n code: 'GUF',\n DZ: 'GF',\n },\n {\n parent: 'South America',\n title: 'Grenada',\n code: 'GRD',\n DZ: 'GD',\n },\n {\n parent: 'South America',\n title: 'Guadeloupe',\n code: 'GLP',\n DZ: 'GP',\n },\n {\n parent: 'South America',\n title: 'Guatemala',\n code: 'GTM',\n DZ: 'GT',\n },\n {\n parent: 'South America',\n title: 'Guyana',\n code: 'GUY',\n DZ: 'GY',\n },\n {\n parent: 'South America',\n title: 'Haiti',\n code: 'HTI',\n DZ: 'HT',\n },\n {\n parent: 'South America',\n title: 'Honduras',\n code: 'HND',\n DZ: 'HN',\n },\n {\n parent: 'South America',\n title: 'Jamaica',\n code: 'JAM',\n DZ: 'JM',\n },\n {\n parent: 'South America',\n title: 'Martinique',\n code: 'MTQ',\n DZ: 'MQ',\n },\n {\n parent: 'South America',\n title: 'Montserrat',\n code: 'MSR',\n DZ: 'MS',\n },\n {\n parent: 'South America',\n title: 'Netherlands Antilles',\n code: 'ANT',\n DZ: 'AN',\n },\n {\n parent: 'South America',\n title: 'Nevis (St. Kitts)',\n code: 'KNA',\n DZ: 'KN',\n },\n {\n parent: 'South America',\n title: 'Nicaragua',\n code: 'NIC',\n DZ: 'NI',\n },\n {\n parent: 'South America',\n title: 'Panama',\n code: 'PAN',\n DZ: 'PA',\n },\n {\n parent: 'South America',\n title: 'Paraguay',\n code: 'PRY',\n DZ: 'PY',\n },\n {\n parent: 'South America',\n title: 'Peru',\n code: 'PER',\n DZ: 'PE',\n },\n {\n parent: 'South America',\n title: 'Saba (Netherlands Antilles)',\n code: 'ANT',\n DZ: 'AN',\n },\n {\n parent: 'South America',\n title: 'St. Barthelemy',\n code: 'BLM',\n DZ: 'BL',\n },\n {\n parent: 'South America',\n title: 'St. Christopher (St. Kitts)',\n code: 'KNA',\n DZ: 'KN',\n },\n {\n parent: 'South America',\n title: 'St. Croix (Us Virgin Islands)',\n code: 'VIR',\n DZ: 'VI',\n },\n {\n parent: 'South America',\n title: 'St. Eustatius (Netherlands Antilles)',\n code: 'ANT',\n DZ: 'AN',\n },\n {\n parent: 'South America',\n title: 'St. John (Us Virgin Islands)',\n code: 'VIR',\n DZ: 'VI',\n },\n {\n parent: 'South America',\n title: 'St. Lucia',\n code: 'LCA',\n DZ: 'LC',\n },\n {\n parent: 'South America',\n title: 'St. Maarten (Netherlands Antilles)',\n code: 'ANT',\n DZ: 'AN',\n },\n {\n parent: 'South America',\n title: 'St. Thomas (Us Virgin Islands)',\n code: 'VIR',\n DZ: 'VI',\n },\n {\n parent: 'South America',\n title: 'St. Vincent And The Grenadines',\n code: 'VCT',\n DZ: 'VC',\n },\n {\n parent: 'South America',\n title: 'Tortola (British Virgin Islands)',\n code: 'VGB',\n DZ: 'VG',\n },\n {\n parent: 'South America',\n title: 'Trinidad And Tobago',\n code: 'TTO',\n DZ: 'TT',\n },\n {\n parent: 'South America',\n title: 'Turks And Caicos Islands',\n code: 'TCA',\n DZ: 'TC',\n },\n {\n parent: 'South America',\n title: 'Union Island (St. Vincent And The Grenadines)',\n code: 'VCT',\n DZ: 'VC',\n },\n {\n parent: 'South America',\n title: 'Uruguay',\n code: 'URY',\n DZ: 'UY',\n },\n {\n parent: 'South America',\n title: 'Venezuela',\n code: 'VEN',\n DZ: 'VE',\n },\n {\n parent: 'South America',\n title: 'Virgin Gorda (British Virgin Islands)',\n code: 'VGB',\n DZ: 'VG',\n },\n {\n parent: 'South America',\n title: 'Virgin Islands (Us)',\n code: 'VIR',\n DZ: 'VI',\n },\n ],\n },\n {\n code: 'AFRICA',\n title: 'Africa',\n countries: [\n {\n parent: 'Africa',\n title: 'Angola',\n code: 'AGO',\n DZ: 'AO',\n },\n {\n parent: 'Africa',\n title: 'Benin',\n code: 'BEN',\n DZ: 'BJ',\n },\n {\n parent: 'Africa',\n title: 'Botswana',\n code: 'BWA',\n DZ: 'BW',\n },\n {\n parent: 'Africa',\n title: 'Burkina Faso',\n code: 'BFA',\n DZ: 'BF',\n },\n {\n parent: 'Africa',\n title: 'Burundi',\n code: 'BDI',\n DZ: 'BI',\n },\n {\n parent: 'Africa',\n title: \"Ca�Te D'Ivoire\",\n code: 'CIV',\n DZ: 'CI',\n },\n {\n parent: 'Africa',\n title: 'Cameroon',\n code: 'CMR',\n DZ: 'CM',\n },\n {\n parent: 'Africa',\n title: 'Cape Verde',\n code: 'CPV',\n DZ: 'CV',\n },\n {\n parent: 'Africa',\n title: 'Central African Republic',\n code: 'CAF',\n DZ: 'CF',\n },\n {\n parent: 'Africa',\n title: 'Chad',\n code: 'TCD',\n DZ: 'TD',\n },\n {\n parent: 'Africa',\n title: 'Comoros',\n code: 'COM',\n DZ: 'KM',\n },\n {\n parent: 'Africa',\n title: 'Democratic Republic Of The Congo',\n code: 'COG',\n DZ: 'CG',\n },\n {\n parent: 'Africa',\n title: 'Djibouti',\n code: 'DJI',\n DZ: 'DJ',\n },\n {\n parent: 'Africa',\n title: 'Egypt',\n code: 'EGY',\n DZ: 'EG',\n },\n {\n parent: 'Africa',\n title: 'Equatorial Guinea',\n code: 'GNQ',\n DZ: 'GQ',\n },\n {\n parent: 'Africa',\n title: 'Eritrea',\n code: 'ERI',\n DZ: 'ER',\n },\n {\n parent: 'Africa',\n title: 'Gabon',\n code: 'GAB',\n DZ: 'GA',\n },\n {\n parent: 'Africa',\n title: 'Gambia',\n code: 'GMB',\n DZ: 'GM',\n },\n {\n parent: 'Africa',\n title: 'Ghana',\n code: 'GHA',\n DZ: 'GH',\n },\n {\n parent: 'Africa',\n title: 'Guinea',\n code: 'GIN',\n DZ: 'GN',\n },\n {\n parent: 'Africa',\n title: 'Guinea-Bissau',\n code: 'GNB',\n DZ: 'GW',\n },\n {\n parent: 'Africa',\n title: 'Kenya',\n code: 'KEN',\n DZ: 'KE',\n },\n {\n parent: 'Africa',\n title: 'Lesotho',\n code: 'LSO',\n DZ: 'LS',\n },\n {\n parent: 'Africa',\n title: 'Liberia',\n code: 'LBR',\n DZ: 'LR',\n },\n {\n parent: 'Africa',\n title: 'Libyan Arab Jamahiriya',\n code: 'LBY',\n DZ: 'LY',\n },\n {\n parent: 'Africa',\n title: 'Madagascar',\n code: 'MDG',\n DZ: 'MG',\n },\n {\n parent: 'Africa',\n title: 'Malawi',\n code: 'MWI',\n DZ: 'MW',\n },\n {\n parent: 'Africa',\n title: 'Mali',\n code: 'MLI',\n DZ: 'ML',\n },\n {\n parent: 'Africa',\n title: 'Mauritania',\n code: 'MRT',\n DZ: 'MR',\n },\n {\n parent: 'Africa',\n title: 'Mayotte',\n code: 'MYT',\n DZ: 'YT',\n },\n {\n parent: 'Africa',\n title: 'Morocco',\n code: 'MAR',\n DZ: 'MA',\n },\n {\n parent: 'Africa',\n title: 'Mozambique',\n code: 'MOZ',\n DZ: 'MZ',\n },\n {\n parent: 'Africa',\n title: 'Namibia',\n code: 'NAM',\n DZ: 'NA',\n },\n {\n parent: 'Africa',\n title: 'Niger',\n code: 'NER',\n DZ: 'NE',\n },\n {\n parent: 'Africa',\n title: 'Nigeria',\n code: 'NGA',\n DZ: 'NG',\n },\n {\n parent: 'Africa',\n title: 'Reunion',\n code: 'REU',\n DZ: 'RE',\n },\n {\n parent: 'Africa',\n title: 'Rwanda',\n code: 'RWA',\n DZ: 'RW',\n },\n {\n parent: 'Africa',\n title: 'Senegal',\n code: 'SEN',\n DZ: 'SN',\n },\n {\n parent: 'Africa',\n title: 'Seychelles',\n code: 'SYC',\n DZ: 'SC',\n },\n {\n parent: 'Africa',\n title: 'Sierra Leone',\n code: 'SLE',\n DZ: 'SL',\n },\n {\n parent: 'Africa',\n title: 'South Africa',\n code: 'ZAF',\n DZ: 'ZA',\n },\n {\n parent: 'Africa',\n title: 'Suriname',\n code: 'SUR',\n DZ: 'SR',\n },\n {\n parent: 'Africa',\n title: 'Swaziland',\n code: 'SWZ',\n DZ: 'SZ',\n },\n {\n parent: 'Africa',\n title: 'Tanzania, United Republic Of',\n code: 'TZA',\n DZ: 'TZ',\n },\n {\n parent: 'Africa',\n title: 'Tunisia',\n code: 'TUN',\n DZ: 'TN',\n },\n {\n parent: 'Africa',\n title: 'Uganda',\n code: 'UGA',\n DZ: 'UG',\n },\n {\n parent: 'Africa',\n title: 'Zambia',\n code: 'ZMB',\n DZ: 'ZM',\n },\n {\n parent: 'Africa',\n title: 'Zimbabwe',\n code: 'ZWE',\n DZ: 'ZW',\n },\n ],\n },\n {\n code: 'ASIA',\n title: 'Asia',\n countries: [\n {\n parent: 'Asia',\n title: 'Cambodia',\n code: 'KHM',\n DZ: 'KH',\n },\n {\n parent: 'Asia',\n title: 'China',\n code: 'CHN',\n DZ: 'CN',\n },\n {\n parent: 'Asia',\n title: 'East Timor',\n code: 'TMP',\n DZ: 'TL',\n },\n {\n parent: 'Asia',\n title: 'Guam',\n code: 'GUM',\n DZ: 'GU',\n },\n {\n parent: 'Asia',\n title: 'Hong Kong',\n code: 'HKG',\n DZ: 'HK',\n },\n {\n parent: 'Asia',\n title: 'Japan',\n code: 'JPN',\n DZ: 'JP',\n },\n {\n parent: 'Asia',\n title: 'Korea',\n code: 'KOR',\n DZ: 'KR',\n },\n {\n parent: 'Asia',\n title: \"Lao People'S Democratic Republic\",\n code: 'LAO',\n DZ: 'LA',\n },\n {\n parent: 'Asia',\n title: 'Macau',\n code: 'MAC',\n DZ: 'MO',\n },\n {\n parent: 'Asia',\n title: 'Malaysia',\n code: 'MYS',\n DZ: 'MY',\n },\n {\n parent: 'Asia',\n title: 'Mongolia',\n code: 'MNG',\n DZ: 'MN',\n },\n {\n parent: 'Asia',\n title: 'Myanmar (Burma)',\n code: 'MMR',\n DZ: 'MM',\n },\n {\n parent: 'Asia',\n title: 'Papua New Guinea',\n code: 'PNG',\n DZ: 'PG',\n },\n {\n parent: 'Asia',\n title: 'Philippines',\n code: 'PHL',\n DZ: 'PH',\n },\n {\n parent: 'Asia',\n title: 'Singapore',\n code: 'SGP',\n DZ: 'SG',\n },\n {\n parent: 'Asia',\n title: 'Taiwan',\n code: 'TWN',\n DZ: 'TW',\n },\n {\n parent: 'Asia',\n title: 'Thailand',\n code: 'THA',\n DZ: 'TH',\n },\n {\n parent: 'Asia',\n title: 'Vietnam',\n code: 'VNM',\n DZ: 'VN',\n },\n ],\n },\n {\n code: 'AUSTRALASIA',\n title: 'Australasia',\n countries: [\n {\n parent: 'Australasia',\n title: 'American Samoa',\n code: 'ASM',\n DZ: 'AS',\n },\n {\n parent: 'Australasia',\n title: 'Australia',\n code: 'AUS',\n DZ: 'AU',\n },\n {\n parent: 'Australasia',\n title: 'Cook Islands',\n code: 'COK',\n DZ: 'CK',\n },\n {\n parent: 'Australasia',\n title: 'Fiji',\n code: 'FJI',\n DZ: 'FJ',\n },\n {\n parent: 'Australasia',\n title: 'French Polynesia',\n code: 'PYF',\n DZ: 'PF',\n },\n {\n parent: 'Australasia',\n title: 'Kiribati',\n code: 'KIR',\n DZ: 'KI',\n },\n {\n parent: 'Australasia',\n title: 'Kosrae (Micronesia, Federated States Of)',\n code: 'FSM',\n DZ: 'FM',\n },\n {\n parent: 'Australasia',\n title: 'Marshall Islands',\n code: 'MHL',\n DZ: 'MH',\n },\n {\n parent: 'Australasia',\n title: 'Micronesia (Federated States Of)',\n code: 'FSM',\n DZ: 'FM',\n },\n {\n parent: 'Australasia',\n title: 'New Caledonia',\n code: 'NCL',\n DZ: 'NC',\n },\n {\n parent: 'Australasia',\n title: 'New Zealand',\n code: 'NZL',\n DZ: 'NZ',\n },\n {\n parent: 'Australasia',\n title: 'Norfolk Island',\n code: 'NFK',\n DZ: 'NF',\n },\n {\n parent: 'Australasia',\n title: 'Northern Mariana Islands',\n code: 'MNP',\n DZ: 'MP',\n },\n {\n parent: 'Australasia',\n title: 'Palau',\n code: 'PLW',\n DZ: 'PW',\n },\n {\n parent: 'Australasia',\n title: 'Ponape (Micronesia, Federated States Of)',\n code: 'FSM',\n DZ: 'FM',\n },\n {\n parent: 'Australasia',\n title: 'Rota (Northern Mariana Islands)',\n code: 'MNP',\n DZ: 'MP',\n },\n {\n parent: 'Australasia',\n title: 'Saipan (Northern Mariana Islands)',\n code: 'MNP',\n DZ: 'MP',\n },\n {\n parent: 'Australasia',\n title: 'Solomon Islands',\n code: 'SLB',\n DZ: 'SB',\n },\n {\n parent: 'Australasia',\n title: 'Tahiti',\n code: 'PYF',\n DZ: 'PF',\n },\n {\n parent: 'Australasia',\n title: 'Timor-Leste',\n code: 'TLS',\n DZ: 'TL',\n },\n {\n parent: 'Australasia',\n title: 'Tinian (Northern Mariana Islands)',\n code: 'MNP',\n DZ: 'MP',\n },\n {\n parent: 'Australasia',\n title: 'Togo',\n code: 'TGO',\n DZ: 'TG',\n },\n {\n parent: 'Australasia',\n title: 'Tonga',\n code: 'TON',\n DZ: 'TO',\n },\n {\n parent: 'Australasia',\n title: 'Truk (Micronesia, Federated States Of)',\n code: 'FSM',\n DZ: 'FM',\n },\n {\n parent: 'Australasia',\n title: 'Tuvalu',\n code: 'TUV',\n DZ: 'TV',\n },\n {\n parent: 'Australasia',\n title: 'Vanuatu',\n code: 'VUT',\n DZ: 'VU',\n },\n {\n parent: 'Australasia',\n title: 'Wallis And Futuna Islands',\n code: 'WLF',\n DZ: 'WF',\n },\n {\n parent: 'Australasia',\n title: 'Western Samoa',\n code: 'WSM',\n DZ: 'WS',\n },\n {\n parent: 'Australasia',\n title: 'Yap (Micronesia, Federated States Of)',\n code: 'FSM',\n DZ: 'FM',\n },\n ],\n },\n {\n code: 'EUROPEAN_UNION',\n title: 'European Union',\n countries: [\n {\n parent: 'European Union',\n title: 'Aland Islands',\n code: 'ALA',\n DZ: 'AX',\n },\n {\n parent: 'European Union',\n title: 'Aruba',\n code: 'ABW',\n DZ: 'AW',\n },\n {\n parent: 'European Union',\n title: 'Austria',\n code: 'AUT',\n DZ: 'AT',\n },\n {\n parent: 'European Union',\n title: 'Azores',\n code: 'PRT',\n DZ: 'PT',\n },\n {\n parent: 'European Union',\n title: 'Belgium',\n code: 'BEL',\n DZ: 'BE',\n },\n {\n parent: 'European Union',\n title: 'Bulgaria',\n code: 'BGR',\n DZ: 'BG',\n },\n {\n parent: 'European Union',\n title: 'Canary Islands',\n code: 'CNR',\n DZ: 'GC',\n },\n {\n parent: 'European Union',\n title: 'Ceuta',\n code: 'ESP',\n DZ: 'ES',\n },\n {\n parent: 'European Union',\n title: 'Channel Islands (Guernsey)',\n code: 'GGY',\n DZ: 'GG',\n },\n {\n parent: 'European Union',\n title: 'Channel Islands (Jersey)',\n code: 'JEY',\n DZ: 'JE',\n },\n {\n parent: 'European Union',\n title: 'Croatia',\n code: 'HRV',\n DZ: 'HR',\n },\n {\n parent: 'European Union',\n title: 'Cyprus',\n code: 'CYP',\n DZ: 'CY',\n },\n {\n parent: 'European Union',\n title: 'Czech Republic',\n code: 'CZE',\n DZ: 'CZ',\n },\n {\n parent: 'European Union',\n title: 'Denmark',\n code: 'DNK',\n DZ: 'DK',\n },\n {\n parent: 'European Union',\n title: 'Finland',\n code: 'FIN',\n DZ: 'FI',\n },\n {\n parent: 'European Union',\n title: 'France',\n code: 'FRA',\n DZ: 'FR',\n },\n {\n parent: 'European Union',\n title: 'Germany',\n code: 'DEU',\n DZ: 'DE',\n },\n {\n parent: 'European Union',\n title: 'Gibraltar',\n code: 'GIB',\n DZ: 'GI',\n },\n {\n parent: 'European Union',\n title: 'Greece',\n code: 'GRC',\n DZ: 'GR',\n },\n {\n parent: 'European Union',\n title: 'Holy See (Vatican City State)',\n code: 'VAT',\n DZ: 'VA',\n },\n {\n parent: 'European Union',\n title: 'Hungary',\n code: 'HUN',\n DZ: 'HU',\n },\n {\n parent: 'European Union',\n title: 'Ireland, Republic Of',\n code: 'IRL',\n DZ: 'IE',\n },\n {\n parent: 'European Union',\n title: 'Italy',\n code: 'ITA',\n DZ: 'IT',\n },\n {\n parent: 'European Union',\n title: 'Latvia',\n code: 'LVA',\n DZ: 'LV',\n },\n {\n parent: 'European Union',\n title: 'Lithuania',\n code: 'LTU',\n DZ: 'LT',\n },\n {\n parent: 'European Union',\n title: 'Luxembourg',\n code: 'LUX',\n DZ: 'LU',\n },\n {\n parent: 'European Union',\n title: 'Madeira',\n code: 'PRT',\n DZ: 'PT',\n },\n {\n parent: 'European Union',\n title: 'Malta',\n code: 'MLT',\n DZ: 'MT',\n },\n {\n parent: 'European Union',\n title: 'Melilla',\n code: 'ESP',\n DZ: 'ES',\n },\n {\n parent: 'European Union',\n title: 'Monaco',\n code: 'MCO',\n DZ: 'MC',\n },\n {\n parent: 'European Union',\n title: 'Netherlands, The (Holland)',\n code: 'NLD',\n DZ: 'NL',\n },\n {\n parent: 'European Union',\n title: 'Poland',\n code: 'POL',\n DZ: 'PL',\n },\n {\n parent: 'European Union',\n title: 'Portugal',\n code: 'PRT',\n DZ: 'PT',\n },\n {\n parent: 'European Union',\n title: 'Romania',\n code: 'ROU',\n DZ: 'RO',\n },\n {\n parent: 'European Union',\n title: 'Slovakia',\n code: 'SVK',\n DZ: 'SK',\n },\n {\n parent: 'European Union',\n title: 'Slovenia',\n code: 'SVN',\n DZ: 'SI',\n },\n {\n parent: 'European Union',\n title: 'Spain',\n code: 'ESP',\n DZ: 'ES',\n },\n {\n parent: 'European Union',\n title: 'Sweden',\n code: 'SWE',\n DZ: 'SE',\n },\n ],\n },\n {\n code: 'NON_EU_EUROPE',\n title: 'Non EU Countries - Europe',\n countries: [\n {\n parent: 'Europe - Non EU',\n title: 'Albania',\n code: 'ALB',\n DZ: 'AL',\n },\n {\n parent: 'Europe - Non EU',\n title: 'Andorra',\n code: 'AND',\n DZ: 'AD',\n },\n {\n parent: 'Europe - Non EU',\n title: 'Armenia',\n code: 'ARM',\n DZ: 'AM',\n },\n {\n parent: 'Europe - Non EU',\n title: 'Belarus (Byelorussia)',\n code: 'BLR',\n DZ: 'BY',\n },\n {\n parent: 'Europe - Non EU',\n title: 'Bosnia-Herzegovina',\n code: 'BIH',\n DZ: 'BA',\n },\n {\n parent: 'Europe - Non EU',\n title: 'England',\n code: 'GBR',\n DZ: 'GB',\n },\n {\n parent: 'Europe - Non EU',\n title: 'Estonia',\n code: 'EST',\n DZ: 'EE',\n },\n {\n parent: 'Europe - Non EU',\n title: 'Faroe Islands',\n code: 'FRO',\n DZ: 'FO',\n },\n {\n parent: 'Europe - Non EU',\n title: 'Georgia',\n code: 'GEO',\n DZ: 'GE',\n },\n {\n parent: 'Europe - Non EU',\n title: 'Greenland',\n code: 'GRL',\n DZ: 'GL',\n },\n {\n parent: 'Europe - Non EU',\n title: 'Iceland',\n code: 'ISL',\n DZ: 'IS',\n },\n {\n parent: 'Europe - Non EU',\n title: 'Isle Of Man',\n code: 'IMN',\n DZ: 'IM',\n },\n {\n parent: 'Europe - Non EU',\n title: 'Kosovo',\n code: 'SRB',\n DZ: 'RS',\n },\n {\n parent: 'Europe - Non EU',\n title: 'Liechtenstein',\n code: 'LIE',\n DZ: 'LI',\n },\n {\n parent: 'Europe - Non EU',\n title: 'Moldova',\n code: 'MDA',\n DZ: 'MD',\n },\n {\n parent: 'Europe - Non EU',\n title: 'Montenegro',\n code: 'MNE',\n DZ: 'ME',\n },\n {\n parent: 'Europe - Non EU',\n title: 'Northern Ireland',\n code: 'GBR',\n DZ: 'GB',\n },\n {\n parent: 'Europe - Non EU',\n title: 'Norway',\n code: 'NOR',\n DZ: 'NO',\n },\n {\n parent: 'Europe - Non EU',\n title: 'Russia',\n code: 'RUS',\n DZ: 'RU',\n },\n {\n parent: 'Europe - Non EU',\n title: 'San Marino',\n code: 'SMR',\n DZ: 'SM',\n },\n {\n parent: 'Europe - Non EU',\n title: 'Scotland',\n code: 'GBR',\n DZ: 'GB',\n },\n {\n parent: 'Europe - Non EU',\n title: 'Serbia And Montenegro',\n code: 'SRB',\n DZ: 'RS',\n },\n {\n parent: 'Europe - Non EU',\n title: 'Switzerland (Express Plus Available For Ups Express Envelopes And Documents Only)',\n code: 'CHE',\n DZ: 'CH',\n },\n {\n parent: 'Europe - Non EU',\n title: 'Turkey',\n code: 'TUR',\n DZ: 'TR',\n },\n {\n parent: 'Europe - Non EU',\n title: 'Ukraine',\n code: 'UKR',\n DZ: 'UA',\n },\n {\n parent: 'Europe - Non EU',\n title: 'Wales',\n code: 'GBR',\n DZ: 'GB',\n },\n ],\n },\n {\n code: 'INDIAN_SUB_CONTINENT',\n title: 'Indian Sub Continent',\n countries: [\n {\n parent: 'Indian Sub Continent',\n title: 'Afghanistan',\n code: 'AFG',\n DZ: 'AF',\n },\n {\n parent: 'Indian Sub Continent',\n title: 'Bangladesh',\n code: 'BGD',\n DZ: 'BD',\n },\n {\n parent: 'Indian Sub Continent',\n title: 'Bhutan',\n code: 'BTN',\n DZ: 'BT',\n },\n {\n parent: 'Indian Sub Continent',\n title: 'Brunei',\n code: 'BRN',\n DZ: 'BN',\n },\n {\n parent: 'Indian Sub Continent',\n title: 'India',\n code: 'IND',\n DZ: 'IN',\n },\n {\n parent: 'Indian Sub Continent',\n title: 'Indonesia',\n code: 'IDN',\n DZ: 'ID',\n },\n {\n parent: 'Indian Sub Continent',\n title: 'Kyrgyzstan',\n code: 'KGZ',\n DZ: 'KG',\n },\n {\n parent: 'Indian Sub Continent',\n title: 'Macedonia (Fyrom)',\n code: 'MKD',\n DZ: 'MK',\n },\n {\n parent: 'Indian Sub Continent',\n title: 'Maldives',\n code: 'MDV',\n DZ: 'MV',\n },\n {\n parent: 'Indian Sub Continent',\n title: 'Mauritius',\n code: 'MUS',\n DZ: 'MU',\n },\n {\n parent: 'Indian Sub Continent',\n title: 'Nepal',\n code: 'NPL',\n DZ: 'NP',\n },\n {\n parent: 'Indian Sub Continent',\n title: 'Pakistan',\n code: 'PAK',\n DZ: 'PK',\n },\n {\n parent: 'Indian Sub Continent',\n title: 'Sri Lanka',\n code: 'LKA',\n DZ: 'LK',\n },\n ],\n },\n {\n code: 'MIDDLE_EAST',\n title: 'Middle East',\n countries: [\n {\n parent: 'Middle East',\n title: 'Azerbaijan',\n code: 'AZE',\n DZ: 'AZ',\n },\n {\n parent: 'Middle East',\n title: 'Bahrain',\n code: 'BHR',\n DZ: 'BH',\n },\n {\n parent: 'Middle East',\n title: 'Iraq',\n code: 'IRQ',\n DZ: 'IQ',\n },\n {\n parent: 'Middle East',\n title: 'Israel',\n code: 'ISR',\n DZ: 'IL',\n },\n {\n parent: 'Middle East',\n title: 'Jordan',\n code: 'JOR',\n DZ: 'JO',\n },\n {\n parent: 'Middle East',\n title: 'Kazakhstan',\n code: 'KAZ',\n DZ: 'KZ',\n },\n {\n parent: 'Middle East',\n title: 'Kuwait',\n code: 'KWT',\n DZ: 'KW',\n },\n {\n parent: 'Middle East',\n title: 'Lebanon',\n code: 'LBN',\n DZ: 'LB',\n },\n {\n parent: 'Middle East',\n title: 'Oman',\n code: 'OMN',\n DZ: 'OM',\n },\n {\n parent: 'Middle East',\n title: 'Qatar',\n code: 'QAT',\n DZ: 'QA',\n },\n {\n parent: 'Middle East',\n title: 'Saudi Arabia',\n code: 'SAU',\n DZ: 'SA',\n },\n {\n parent: 'Middle East',\n title: 'Tajikistan',\n code: 'TJK',\n DZ: 'TJ',\n },\n {\n parent: 'Middle East',\n title: 'Turkmenistan',\n code: 'TKM',\n DZ: 'TM',\n },\n {\n parent: 'Middle East',\n title: 'United Arab Emirates',\n code: 'ARE',\n DZ: 'AE',\n },\n {\n parent: 'Middle East',\n title: 'Uzbekistan',\n code: 'UZB',\n DZ: 'UZ',\n },\n {\n parent: 'Middle East',\n title: 'Yemen',\n code: 'YEM',\n DZ: 'YE',\n },\n ],\n },\n];\n\nexport default locations;\n","import React, { useState, useContext } from 'react';\nimport { connect } from 'react-redux';\nimport {\n Modal, ModalHeader, ModalBody,\n} from 'reactstrap';\nimport { FormattedMessage } from 'react-intl';\nimport Dropdown from './Dropdown';\nimport UserContext from '../../contexts/UserContext';\nimport ProgramContext from '../../contexts/ProgramContext';\nimport DropdownLanguage from './DropdownLanguage';\nimport { regionChange } from '../../store/region';\nimport { cartClear } from '../../store/cart';\nimport locations from '../Countries';\n\nconst GeoModal = (props) => {\n const {\n cartClear, className, locale,\n } = props;\n const { user } = useContext(UserContext);\n const { program } = useContext(ProgramContext);\n const [errorMessage, setErrorMessage] = useState(false);\n\n const getLocation = (locationName) => {\n const filtered = locations.filter((data) => data.code === locationName);\n if (filtered.length > 0) {\n return filtered[0];\n }\n return undefined;\n };\n\n const getProgramLocations = () => {\n const programLocations = [];\n if (program.continents) {\n for (let i = 0; i < locations.length; i += 1) {\n if (program.continents.indexOf(locations[i].code) !== -1) {\n programLocations.push(locations[i]);\n }\n }\n }\n return programLocations;\n };\n\n const getCountry = (locationName, countryName) => {\n const selectedLocation = getLocation(locationName);\n const filtered = selectedLocation.countries.filter((data) => data.code === countryName);\n if (filtered.length > 0) {\n return filtered[0];\n }\n return undefined;\n };\n\n const { region, regionChange: changeRegion } = props;\n\n let defaultLocation = region.location;\n if (!defaultLocation || defaultLocation.length === 0) {\n defaultLocation = program.defaultContinent;\n }\n\n let defaultCountry = region.country;\n if (!defaultCountry || defaultCountry.length === 0) {\n defaultCountry = program.defaultCountry;\n }\n\n const [location, setLocation] = useState(getLocation(defaultLocation));\n const [country, setCountry] = useState(getCountry(defaultLocation, defaultCountry));\n const [modal, setModal] = useState(false);\n const toggle = () => setModal(!modal);\n const saveChanges = () => {\n if (country) {\n setModal(!modal);\n setErrorMessage(false);\n changeRegion({\n location: location.code,\n country: country.code,\n });\n } else {\n setErrorMessage(true);\n }\n };\n\n const centeredmodal = true;\n\n const countriesTitle = (\n \n Location\n {': '}\n {location === undefined ? {user.country} : {location.title} }\n \n );\n\n const countryTitle = (\n \n {* }\n {location && location.title === 'USA' ? 'Region' : 'Country'}\n {': '}\n {country && ({country.title} )}\n \n );\n\n return (\n \n \n \n \n \n Localization Preferences \n \n \n \n );\n};\nconst mapStateToProps = (state) => ({\n region: state.region,\n});\n\nconst mapDispatchToProps = {\n cartClear,\n regionChange,\n };\n\nexport default connect(mapStateToProps, mapDispatchToProps)(GeoModal);\n","import axios from 'axios';\nimport { GetAPIEndpoint } from '../../configuration';\n\nfunction getToken() {\n const tokenString = localStorage.getItem('access_token') ?? sessionStorage.getItem('access_token');\n if (!tokenString) return '';\n return tokenString;\n}\n\nconst auth = {\n isAuthenticated: () => {\n const authenticated = getToken().length > 0;\n if (!authenticated && !(window.location.href.includes('login') || window.location.href.includes('mindtickle/score') || window.location.href.includes('mindtickle/callback') || window.location.href.includes('mindtickle/okta') || window.location.href.includes('mindtickle/redirect'))) {\n window.location = '/login';\n }\n return authenticated;\n},\n authenticate(email, password, cb) {\n axios.post(`${GetAPIEndpoint()}/token`, { email, password }).then((data) => {\n if (!data.data) {\n cb({ success: false });\n return;\n }\n if (data.status !== 200) {\n cb({ success: false });\n return;\n }\n\n localStorage.setItem('access_token', data.data.access_token);\n cb({ success: true });\n }).catch(\n (error) => {\n cb({ success: false });\n return Promise.reject(error);\n },\n );\n },\n authenticateSSO(token, cb) {\n axios.post(`${GetAPIEndpoint()}/api/sso`, { token }).then((data) => {\n if (!data.data) {\n cb({ success: false });\n return;\n }\n if (data.status !== 200) {\n cb({ success: false });\n return;\n }\n\n localStorage.setItem('access_token', data.data.access_token);\n cb({ success: true });\n }).catch(\n (error) => {\n cb({ success: false });\n return Promise.reject(error);\n },\n );\n },\n signout(cb) {\n localStorage.removeItem('access_token');\n sessionStorage.removeItem('access_token');\n cb();\n },\n};\n\nexport default auth;\n","// react\nimport React, { useContext } from 'react';\n\n// third-party\n// import { FormattedMessage } from 'react-intl';\nimport { Link, useHistory } from 'react-router-dom';\nimport { connect } from 'react-redux';\nimport { FormattedMessage } from 'react-intl';\n\n// application\n// import Dropdown from './Dropdown';\nimport DropdownLanguage from './DropdownLanguage';\nimport ProgramContext from '../../contexts/ProgramContext';\nimport UserContext from '../../contexts/UserContext';\nimport GeoModal from './Geolocationmodal';\nimport auth from '../../server/real/endpoints/auth';\n\nfunction Topbar(props) {\n const { locale } = props;\n const { program } = useContext(ProgramContext);\n const { user } = useContext(UserContext);\n const { theme } = program;\n const history = useHistory();\n let logo;\n if (theme !== undefined) {\n logo = theme.logo;\n }\n const links = [\n\n ];\n\n const myProfile = () => {\n history.push('/account/myprofile');\n };\n const logout = () => {\n auth.signout(() => {\n window.location = '/';\n });\n };\n\n // const accountLinks = [\n // { title: 'My Profile', url: '/account/myprofile' },\n // ];\n\n const linksList = links.map((item, index) => (\n \n {item.title}\n
\n ));\n\n const calculateLevelMessage = () => {\n let levelMessage;\n if (user) {\n levelMessage = program?.plateauLevels?.filter((level) => level.id === user?.levelId);\n }\n if (levelMessage?.[0]?.levelMessage) {\n return levelMessage?.[0].levelMessage;\n }\n return program.adminMessage;\n };\n\n return (\n \n
\n
\n
\n {linksList}\n
\n {!program.showTopAccountBar\n ? (\n
\n \n \n \n
\n )\n : (\n
\n \n \n \n
\n )}\n {program && program.geolocation && program.geolocation.enabled && (\n
\n \n
\n )}\n
\n \n
\n
\n
\n
\n
\n
\n\n
\n
\n \n
\n {program && (\n
\n {program.type === 'points' ? : calculateLevelMessage()} \n
\n )}\n
\n
\n
\n );\n}\n\nconst mapStateToProps = (state) => ({\n locale: state.locale,\n});\n\nexport default connect(mapStateToProps)(Topbar);\n","// react\nimport React from 'react';\n\n// third-party\nimport PropTypes from 'prop-types';\n\n// application\nimport NavPanel from './NavPanel';\nimport Topbar from './Topbar';\n\nfunction Header(props) {\n const { layout } = props;\n let bannerSection;\n\n return (\n \n
\n {bannerSection}\n
\n \n
\n
\n );\n}\n\nHeader.propTypes = {\n /** one of ['default', 'compact'] (default: 'default') */\n layout: PropTypes.oneOf(['default', 'compact']),\n};\n\nHeader.defaultProps = {\n layout: 'compact',\n};\n\nexport default Header;\n","import Header from './Header';\n\nexport default Header;\n","export const MOBILE_MENU_OPEN = 'MOBILE_MENU_OPEN';\nexport const MOBILE_MENU_CLOSE = 'MOBILE_MENU_CLOSE';\n","import { MOBILE_MENU_CLOSE, MOBILE_MENU_OPEN } from './mobileMenuActionTypes';\n\nconst initialState = {\n open: false,\n};\n\nexport default function mobileMenuReducer(state = initialState, action) {\n switch (action.type) {\n case MOBILE_MENU_OPEN:\n return {\n ...state,\n open: true,\n };\n case MOBILE_MENU_CLOSE:\n return {\n ...state,\n open: false,\n };\n default:\n return state;\n }\n}\n","import { MOBILE_MENU_CLOSE, MOBILE_MENU_OPEN } from './mobileMenuActionTypes';\n\nexport function mobileMenuOpen() {\n return { type: MOBILE_MENU_OPEN };\n}\n\nexport function mobileMenuClose() {\n return { type: MOBILE_MENU_CLOSE };\n}\n","import mobileMenuReducer from './mobileMenuReducer';\n\nexport * from './mobileMenuActions';\nexport default mobileMenuReducer;\n","// react\nimport React, { Component } from 'react';\n\n// third-party\nimport classNames from 'classnames';\nimport { connect } from 'react-redux';\nimport { Link } from 'react-router-dom';\n\n// application\nimport Indicator from '../header/Indicator';\nimport {\n Menu18x14Svg,\n Search20Svg,\n Cart20Svg,\n} from '../../svg';\nimport { mobileMenuOpen } from '../../store/mobile-menu';\nimport Search from '../header/Search';\nimport ProgramContext from '../../contexts/ProgramContext';\n\nclass MobileHeader extends Component {\n constructor(props) {\n super(props);\n\n this.state = {\n searchOpen: false,\n };\n this.searchInput = React.createRef();\n }\n\n componentDidUpdate(prevProps, prevState) {\n const { searchOpen } = this.state;\n\n if (searchOpen && searchOpen !== prevState.searchOpen && this.searchInput.current) {\n this.searchInput.current.focus();\n }\n }\n\n handleOpenSearch = () => {\n this.setState(() => ({ searchOpen: true }));\n };\n\n handleCloseSearch = () => {\n this.setState(() => ({ searchOpen: false }));\n };\n\n render() {\n const { openMobileMenu, cart } = this.props;\n const { searchOpen } = this.state;\n const searchClasses = classNames('mobile-header__search', {\n 'mobile-header__search--open': searchOpen,\n });\n\n return (\n \n
\n
\n
\n
\n \n \n
\n {(context) => {\n let logo;\n const { program } = context;\n const { theme } = program;\n if (theme !== undefined) {\n logo = (\n \n \n \n );\n }\n return logo;\n }}\n \n
\n
\n
}\n />\n
\n {(context) => {\n let plateau;\n const { program } = context;\n if (program && program.type === 'points') {\n plateau = (\n }\n />\n );\n } else { plateau = ({' '} ); }\n return plateau;\n }}\n \n
\n
\n
\n
\n
\n );\n }\n}\n\nconst mapStateToProps = (state) => ({\n cart: state.cart,\n locale: state.locale,\n});\n\nconst mapDispatchToProps = {\n openMobileMenu: mobileMenuOpen,\n};\n\nexport default connect(\n mapStateToProps,\n mapDispatchToProps,\n)(MobileHeader);\n","// react\nimport { Component } from 'react';\n\n// third-party\nimport PropTypes from 'prop-types';\n\nclass Collapse extends Component {\n componentDidMount() {\n if (!this.content) {\n return;\n }\n\n const { open } = this.props;\n\n this.content.addEventListener('transitionend', this.handleTransitionEnd);\n\n if (open === true) {\n this.expand(true);\n }\n if (open === false) {\n this.collapse(true);\n }\n }\n\n componentDidUpdate() {\n const { open } = this.props;\n\n if (typeof open === 'boolean') {\n if (open) {\n this.expand();\n } else {\n this.collapse();\n }\n }\n }\n\n componentWillUnmount() {\n if (!this.content) {\n return;\n }\n\n this.content.removeEventListener('transitionend', this.handleTransitionEnd);\n }\n\n handleTransitionEnd = (event) => {\n if (this.content && event.propertyName === 'height') {\n this.content.style.height = '';\n }\n };\n\n handleToggle = () => {\n const { toggleClass } = this.props;\n\n if (!this.item || !this.content || !toggleClass) {\n return;\n }\n\n if (this.item.classList.contains(toggleClass)) {\n this.collapse();\n } else {\n this.expand();\n }\n };\n\n setItemRef = (ref) => {\n this.item = ref;\n };\n\n setContentRef = (ref) => {\n this.content = ref;\n };\n\n expand(immediate = false) {\n const { toggleClass } = this.props;\n\n if (!this.item || !this.content || !toggleClass) {\n return;\n }\n\n if (immediate) {\n this.item.classList.add(toggleClass);\n this.content.style.height = '';\n } else {\n const startHeight = this.content.getBoundingClientRect().height;\n\n this.item.classList.add(toggleClass);\n\n const endHeight = this.content.getBoundingClientRect().height;\n\n this.content.style.height = `${startHeight}px`;\n this.content.getBoundingClientRect(); // force reflow\n this.content.style.height = `${endHeight}px`;\n }\n }\n\n collapse(immediate = false) {\n const { toggleClass } = this.props;\n\n if (immediate) {\n this.item.classList.remove(toggleClass);\n this.content.style.height = '';\n } else {\n const startHeight = this.content.getBoundingClientRect().height;\n\n this.content.style.height = `${startHeight}px`;\n this.item.classList.remove(toggleClass);\n\n this.content.getBoundingClientRect(); // force reflow\n this.content.style.height = '';\n }\n }\n\n render() {\n const { render } = this.props;\n\n if (render) {\n return render({\n toggle: this.handleToggle,\n setItemRef: this.setItemRef,\n setContentRef: this.setContentRef,\n });\n }\n\n return null;\n }\n}\n\nCollapse.propTypes = {\n /** class that will be applied to this.item when opened */\n toggleClass: PropTypes.string,\n /** render function with arguments: toggle, setItemRef, setContentRef */\n render: PropTypes.func,\n /** if specified, the component will behave as a stateless component */\n open: PropTypes.bool,\n};\n\nexport default Collapse;\n","// react\nimport React from 'react';\n\n// third-party\nimport PropTypes from 'prop-types';\n\n// application\nimport AppLink from '../shared/AppLink';\nimport Collapse from '../shared/Collapse';\nimport { ArrowRoundedDown12x7Svg } from '../../svg';\n\nfunction MobileLinks(props) {\n const { links, level, onItemClick } = props;\n\n const handleItemClick = (item) => {\n if (onItemClick) {\n onItemClick(item);\n }\n };\n\n const linksList = links.map((link, index) => {\n let item;\n\n if (link.type === 'link' || link.type === 'button') {\n item = (\n {\n let arrow;\n let subLinks;\n let linkOrButton;\n\n if (link.children && link.children.length > 0) {\n arrow = (\n \n \n \n );\n\n subLinks = (\n \n \n
\n );\n }\n\n if (link.type === 'link') {\n linkOrButton = (\n handleItemClick(link)}\n >\n {link.label}\n \n );\n } else {\n linkOrButton = (\n handleItemClick(link)}\n >\n {link.label}\n \n );\n }\n\n return (\n \n
\n {linkOrButton}\n {arrow}\n
\n {subLinks}\n
\n );\n }}\n />\n );\n } else if (link.type === 'divider') {\n item =
;\n }\n\n return {item} ;\n });\n\n return (\n \n );\n}\n\nMobileLinks.propTypes = {\n links: PropTypes.array,\n level: PropTypes.number,\n onItemClick: PropTypes.func,\n};\n\nMobileLinks.defaultProps = {\n links: [],\n level: 0,\n};\n\nexport default MobileLinks;\n","// react\nimport React, { useContext } from 'react';\n\n// third-party\nimport classNames from 'classnames';\nimport { connect } from 'react-redux';\nimport { FormattedMessage } from 'react-intl';\n// application\nimport MobileLinks from './MobileLinks';\nimport { Cross20Svg } from '../../svg';\nimport { localeChange } from '../../store/locale';\nimport { mobileMenuClose } from '../../store/mobile-menu';\n\n// data stubs\nimport ProgramContext from '../../contexts/ProgramContext';\nimport programApi from '../../server/real/endpoints/programs';\n\nfunction MobileMenu(props) {\n const {\n mobileMenuState,\n closeMobileMenu,\n changeLocale,\n locale,\n } = props;\n const { program } = useContext(ProgramContext);\n const content = programApi.getContent(program, locale);\n\n const classes = classNames('mobilemenu', {\n 'mobilemenu--open': mobileMenuState.open,\n });\n\n const handleItemClick = (item) => {\n if (item.data) {\n if (item.data.type === 'language') {\n changeLocale(item.data.locale);\n closeMobileMenu();\n }\n }\n if (item.type === 'link') {\n closeMobileMenu();\n }\n };\n\n return (\n \n {/* eslint-disable-next-line jsx-a11y/no-static-element-interactions,jsx-a11y/click-events-have-key-events */}\n
\n
\n
\n
\n {content && ( )}\n
\n
\n
\n );\n}\n\nconst mapStateToProps = (state) => ({\n mobileMenuState: state.mobileMenu,\n locale: state.locale,\n});\n\nconst mapDispatchToProps = {\n closeMobileMenu: mobileMenuClose,\n changeLocale: localeChange,\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(MobileMenu);\n","/* eslint-disable jsx-a11y/no-static-element-interactions */\n// react\nimport React, { Component } from 'react';\n\n// third-party\nimport classNames from 'classnames';\nimport PropTypes from 'prop-types';\n\nclass InputNumber extends Component {\n handleChange = (event) => {\n const { min, onChange } = this.props;\n\n if (onChange) {\n if (event.target.value.trim() === '') {\n onChange('');\n } else {\n const value = parseFloat(event.target.value);\n\n onChange(Number.isNaN(value) ? (min || 0) : value);\n }\n }\n };\n\n handleAddMouseDown = () => {\n this.change(1);\n this.changeByTimer(1);\n };\n\n handleSubMouseDown = () => {\n this.change(-1);\n this.changeByTimer(-1);\n };\n\n /**\n * @param direction - one of [-1, 1]\n */\n change(direction) {\n const {\n value,\n step,\n max,\n min,\n onChange,\n } = this.props;\n let newValue = (value === '' || Number.isNaN(value) ? 0 : value) + step * direction;\n\n if (max !== null) {\n newValue = Math.min(max, newValue);\n }\n if (min !== null) {\n newValue = Math.max(min, newValue);\n }\n\n if (newValue !== value) {\n if (onChange) {\n onChange(newValue);\n }\n }\n }\n\n /**\n * @param direction - one of [-1, 1]\n */\n changeByTimer(direction) {\n let interval;\n const timer = setTimeout(() => {\n interval = setInterval(() => this.change(direction), 50);\n }, 300);\n\n const documentMouseUp = () => {\n clearTimeout(timer);\n clearInterval(interval);\n\n document.removeEventListener('mouseup', documentMouseUp, false);\n };\n\n document.addEventListener('mouseup', documentMouseUp, false);\n }\n\n render() {\n const {\n size,\n className,\n onChange,\n enableUp,\n enableDown,\n ...otherProps\n } = this.props;\n\n const classes = classNames('input-number', className);\n const formControlClasses = classNames('form-control input-number__input', {\n 'form-control-sm': size === 'sm',\n 'form-control-lg': size === 'lg',\n });\n\n return (\n \n );\n }\n}\n\nInputNumber.propTypes = {\n onChange: PropTypes.func,\n size: PropTypes.oneOf(['sm', 'lg']),\n step: PropTypes.number,\n min: PropTypes.number,\n max: PropTypes.number,\n value: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number,\n ]),\n disabled: PropTypes.bool,\n readonly: PropTypes.bool,\n};\n\nInputNumber.defaultProps = {\n value: '',\n step: 1,\n max: null,\n min: null,\n};\n\nexport default InputNumber;\n","// react\nimport React, { Component } from 'react';\n\n// third-party\nimport classNames from 'classnames';\nimport PropTypes from 'prop-types';\nimport { connect } from 'react-redux';\nimport { Link } from 'react-router-dom';\n\n// application\nimport StroykaSlick from './StroykaSlick';\nimport { ZoomIn24Svg } from '../../svg';\n\nconst slickSettingsFeatured = {\n dots: false,\n arrows: false,\n infinite: false,\n speed: 400,\n slidesToShow: 1,\n slidesToScroll: 1,\n};\nconst slickSettingsThumbnails = {\n standard: {\n dots: false,\n arrows: false,\n infinite: false,\n speed: 400,\n slidesToShow: 5,\n slidesToScroll: 1,\n responsive: [\n { breakpoint: 1199, settings: { slidesToShow: 4 } },\n { breakpoint: 991, settings: { slidesToShow: 3 } },\n { breakpoint: 767, settings: { slidesToShow: 5 } },\n { breakpoint: 479, settings: { slidesToShow: 4 } },\n { breakpoint: 379, settings: { slidesToShow: 3 } },\n ],\n },\n sidebar: {\n dots: false,\n arrows: false,\n infinite: false,\n speed: 400,\n slidesToShow: 4,\n slidesToScroll: 1,\n responsive: [\n { breakpoint: 1199, settings: { slidesToShow: 3 } },\n { breakpoint: 767, settings: { slidesToShow: 5 } },\n { breakpoint: 479, settings: { slidesToShow: 4 } },\n { breakpoint: 379, settings: { slidesToShow: 3 } },\n ],\n },\n columnar: {\n dots: false,\n arrows: false,\n infinite: false,\n speed: 400,\n slidesToShow: 4,\n slidesToScroll: 1,\n responsive: [\n { breakpoint: 1199, settings: { slidesToShow: 3 } },\n { breakpoint: 767, settings: { slidesToShow: 5 } },\n { breakpoint: 479, settings: { slidesToShow: 4 } },\n { breakpoint: 379, settings: { slidesToShow: 3 } },\n ],\n },\n quickview: {\n dots: false,\n arrows: false,\n infinite: false,\n speed: 400,\n slidesToShow: 5,\n slidesToScroll: 1,\n responsive: [\n { breakpoint: 1199, settings: { slidesToShow: 4 } },\n { breakpoint: 767, settings: { slidesToShow: 5 } },\n { breakpoint: 479, settings: { slidesToShow: 4 } },\n { breakpoint: 379, settings: { slidesToShow: 3 } },\n ],\n },\n};\n\nclass ProductGallery extends Component {\n gallery;\n\n /** @var {Promise} */\n createGallery = null;\n\n imagesRefs = [];\n\n unmounted = false;\n\n constructor(props) {\n super(props);\n\n this.state = {\n currentIndex: 0,\n transition: false,\n };\n }\n\n componentDidMount() {\n this.createGallery = import('../../photoswipe').then((module) => module.createGallery);\n\n // this is necessary to reset the transition state, because sometimes\n // react-slick does not trigger an afterChange event after a beforeChange event\n setTimeout(() => {\n this.setState(() => ({\n transition: false,\n }));\n }, 0);\n }\n\n componentDidUpdate() {\n const prevDirection = 'ltr';\n const currDirection = 'ltr';\n\n if (currDirection !== prevDirection) {\n // this is necessary to reset the transition state,\n // because when the direction changes, the afterChange event does not fire\n setTimeout(() => {\n this.setState(() => ({\n transition: false,\n }));\n }, 0);\n }\n }\n\n componentWillUnmount() {\n if (this.gallery) {\n this.gallery.destroy();\n }\n\n this.unmounted = true;\n }\n\n getIndexDependOnDir(index) {\n const { images } = this.props;\n const direction = 'ltr';\n\n // we need to invert index id direction === 'rtl' due to react-slick bug\n if (direction === 'rtl') {\n return images.length - 1 - index;\n }\n\n return index;\n }\n\n handleFeaturedClick = (event, index) => {\n const { layout } = this.props;\n\n if (!this.createGallery || layout === 'quickview') {\n return;\n }\n\n event.preventDefault();\n\n this.openPhotoswipe(index);\n };\n\n handleThumbnailClick = (index) => {\n const { transition } = this.state;\n\n if (transition) {\n return;\n }\n\n this.setState(() => ({ currentIndex: index }));\n\n if (this.slickFeaturedRef) {\n this.slickFeaturedRef.slickGoTo(this.getIndexDependOnDir(index));\n }\n };\n\n handleFeaturedBeforeChange = (oldIndex, newIndex) => {\n this.setState(() => ({\n currentIndex: this.getIndexDependOnDir(newIndex),\n transition: true,\n }));\n };\n\n handleFeaturedAfterChange = (index) => {\n this.setState(() => ({\n currentIndex: this.getIndexDependOnDir(index),\n transition: false,\n }));\n };\n\n handleZoomButtonClick = () => {\n const { currentIndex } = this.state;\n\n this.openPhotoswipe(currentIndex);\n };\n\n setSlickFeaturedRef = (ref) => {\n this.slickFeaturedRef = ref;\n };\n\n openPhotoswipe(index) {\n const { product, option } = this.props;\n const direction = 'ltr';\n\n const images = [];\n\n if (!option) {\n images.push(product?.images?.imageHigh);\n } else {\n images.push(option.optionImages.optionImageHigh);\n }\n\n product.resources.product?.filter((a) => a.productResourceType === 'Image').forEach((item) => {\n images.push(item.productImageLink);\n });\n\n const items = this.imagesRefs.map((tag, index) => {\n const width = parseFloat(tag.dataset.width) || tag.naturalWidth;\n const height = parseFloat(tag.dataset.height) || tag.naturalHeight;\n\n return {\n src: images[index],\n msrc: images[index],\n w: width,\n h: height,\n };\n });\n\n if (direction === 'rtl') {\n items.reverse();\n }\n\n // noinspection JSUnusedGlobalSymbols\n const options = {\n getThumbBoundsFn: (index) => {\n const dirDependentIndex = this.getIndexDependOnDir(index);\n\n if (!this.imagesRefs[dirDependentIndex]) {\n return null;\n }\n\n const tag = this.imagesRefs[dirDependentIndex];\n const width = tag.naturalWidth;\n const height = tag.naturalHeight;\n const rect = tag.getBoundingClientRect();\n const ration = Math.min(rect.width / width, rect.height / height);\n const fitWidth = width * ration;\n const fitHeight = height * ration;\n\n return {\n x: rect.left + (rect.width - fitWidth) / 2 + window.pageXOffset,\n y: rect.top + (rect.height - fitHeight) / 2 + window.pageYOffset,\n w: fitWidth,\n };\n },\n index: this.getIndexDependOnDir(index),\n bgOpacity: 0.9,\n history: false,\n };\n\n this.createGallery.then((createGallery) => {\n if (this.unmounted) {\n return;\n }\n\n this.gallery = createGallery(items, options);\n\n this.gallery.listen('beforeChange', () => {\n if (this.gallery && this.slickFeaturedRef) {\n this.slickFeaturedRef.slickGoTo(\n this.gallery.getCurrentIndex(),\n true,\n );\n }\n });\n this.gallery.listen('destroy', () => {\n this.gallery = null;\n });\n\n this.gallery.init();\n });\n }\n\n render() {\n const { layout, product, option } = this.props;\n const { currentIndex } = this.state;\n\n const images = [];\n\n if (!option) {\n images.push(product?.images?.imageHigh);\n } else {\n images.push(option?.optionImages?.optionImageHigh);\n }\n if (product.resources && product.resources.product) {\n product.resources.product.filter((a) => a.productResourceType === 'Image').forEach((item) => {\n images.push(item.productImageLink);\n });\n }\n\n const featured = images.map((image, index) => (\n \n
this.handleFeaturedClick(event, index)}\n target=\"_blank\"\n >\n {/*\n The data-width and data-height attributes must contain the size of a larger\n version of the product image.\n\n If you do not know the image size, you can remove the data-width and data-height\n attribute, in which case the width and height will be obtained from the\n naturalWidth and naturalHeight property of img.product-image__img.\n */}\n
{ this.imagesRefs[index] = element; }}\n data-width=\"700\"\n data-height=\"700\"\n />\n \n
\n ));\n\n const thumbnails = images.map((image, index) => {\n const classes = classNames('product-gallery__carousel-item product-image', {\n 'product-gallery__carousel-item--active': index === currentIndex,\n });\n\n return (\n this.handleThumbnailClick(index)}\n className={classes}\n >\n \n
\n
\n \n );\n });\n\n return (\n \n
\n
\n {layout !== 'quickview' && (\n \n \n \n )}\n \n {featured}\n \n
\n
\n \n {thumbnails}\n \n
\n
\n
\n );\n }\n}\n\nProductGallery.propTypes = {\n images: PropTypes.array,\n layout: PropTypes.oneOf(['standard', 'sidebar', 'columnar', 'quickview']),\n /** current locale */\n locale: PropTypes.string,\n};\n\nProductGallery.defaultProps = {\n images: [],\n layout: 'standard',\n};\n\nconst mapStateToProps = (state) => ({\n locale: state.locale,\n});\n\nexport default connect(mapStateToProps)(ProductGallery);\n","// react\nimport React, { Component } from 'react';\n\n// third-party\nimport classNames from 'classnames';\nimport PropTypes from 'prop-types';\nimport { connect } from 'react-redux';\nimport { FormattedMessage } from 'react-intl';\n// import { useHistory } from 'react-router-dom';\n\n// application\nimport AsyncAction from './AsyncAction';\nimport Points from './Points';\nimport InputNumber from './InputNumber';\nimport ProductGallery from './ProductGallery';\nimport { cartAddItem } from '../../store/cart';\n\n// contex\nimport ProgramContext from '../../contexts/ProgramContext';\nimport UserContext from '../../contexts/UserContext';\nimport {\n selectedLanguage, getProductColors, getProductSizes, getProductOption, getProductPrice, getProductDiscountPrice, getCustom1Options, getCustom2Options, getCustom3Options,\n} from '../../server/utils';\n\nclass Product extends Component {\n constructor(props) {\n super(props);\n\n this.state = {\n quantity: 1,\n };\n }\n\n onClick = () => {\n try {\n window.scrollTo({ top: 10000, left: 0, behavior: 'smooth' });\n } catch {\n window.scrollTo(0, 0);\n }\n };\n\n handleChangeQuantity = (quantity) => {\n this.setState({ quantity });\n };\n\n handleChangeColor = (e) => {\n this.setState({ color: e.currentTarget.value }, function () {\n this.handleChangeOption();\n });\n };\n\n handleChangeSize = (e) => {\n this.setState({ size: e.currentTarget.value }, function () {\n this.handleChangeOption();\n });\n };\n\n handleChangeOption = () => {\n const { product } = this.props;\n const {\n color, size, custom1, custom2, custom3,\n } = this.state;\n const option = getProductOption(product, color, size, custom1, custom2, custom3);\n this.setState({ option });\n }\n\n handleChangeCustom1Option = (e) => {\n this.setState({ custom1: e.currentTarget.value }, function () {\n this.handleChangeOption();\n });\n };\n\n handleChangeCustom2Option = (e) => {\n this.setState({ custom2: e.currentTarget.value }, function () {\n this.handleChangeOption();\n });\n };\n\n handleChangeCustom3Option = (e) => {\n this.setState({ custom3: e.currentTarget.value }, function () {\n this.handleChangeOption();\n });\n };\n\n addToCartEnabled = () => {\n const { product } = this.props;\n const { option } = this.state;\n\n if (product && product.options && product.options.length > 0) {\n if (option) {\n return false;\n } if (option && option.length < 1) {\n return false;\n }\n return true;\n }\n return false;\n }\n\n render() {\n const {\n layout, cartAddItem, product, region, locale,\n } = this.props;\n const {\n quantity, option, color, size,\n } = this.state;\n\n // const history = useHistory();\n\n let colors;\n let sizes;\n let custom1Options;\n let custom2Options;\n let custom3Options;\n function equalizeLang (langData) {\n if (langData === 'sp') {\n return 'es'\n }\n if (langData === 'ge') {\n return 'de'\n }\n return langData\n }\n if (product && product.options && product.options.length > 0) {\n colors = getProductColors(product);\n sizes = getProductSizes(product);\n custom1Options = getCustom1Options(product);\n custom2Options = getCustom2Options(product);\n custom3Options = getCustom3Options(product);\n }\n\n return (\n \n {(context) => {\n const { program } = context;\n return (\n \n {(userContext) => {\n // eslint-disable-next-line no-unused-vars\n const { user } = userContext;\n return (\n \n
window.history.go(-1)}\n >\n \n \n
\n
\n
\n
\n {product.brandName}\n \n
{product !== null && (selectedLanguage(product, equalizeLang(locale), product && product.productName, 'name'))} \n {product && product.options && product.options.length < 1 && (\n
\n {product !== null && (selectedLanguage(product, equalizeLang(locale), product && product.productSalesCopy, 'salesCopy'))}\n
\n )}\n\n
\n \n \n {': '}\n \n {`${product.productDropShipDays} days`}\n \n \n \n
\n\n
\n
\n \n :\n In Stock \n
\n\n
\n
\n {program && program.type === 'points' && product.discountPrice && (\n \n \n \n \n {' '}\n \n \n \n \n )}\n\n {program && program.type === 'points' && !product.discountPrice && ( )}\n \n
\n\n
\n
\n
\n
\n );\n }}\n \n );\n }}\n \n );\n }\n}\n\nProduct.propTypes = {\n /** product object */\n product: PropTypes.object.isRequired,\n /** one of ['standard', 'sidebar', 'columnar', 'quickview'] (default: 'standard') */\n layout: PropTypes.oneOf(['standard', 'sidebar', 'columnar', 'quickview']),\n};\n\nProduct.defaultProps = {\n layout: 'standard',\n};\n\nconst mapDispatchToProps = {\n cartAddItem,\n};\n\nconst mapStateToProps = (state) => ({\n region: state.region,\n locale: state.locale,\n});\n\nexport default connect(mapStateToProps, mapDispatchToProps)(Product);\n","// react\nimport React from 'react';\n\n// third-party\nimport { connect } from 'react-redux';\nimport { Modal } from 'reactstrap';\n\n// application\nimport Product from './Product';\nimport { Cross20Svg } from '../../svg';\nimport { quickviewClose } from '../../store/quickview';\n\nfunction Quickview(props) {\n const { product, open, quickviewClose } = props;\n\n let productView;\n\n if (product !== null) {\n productView = ;\n }\n\n return (\n \n \n \n \n \n\n {productView}\n
\n \n );\n}\n\nconst mapStateToProps = (state) => ({\n open: state.quickview.open,\n product: state.quickview.product,\n});\n\nconst mapDispatchToProps = {\n quickviewClose,\n};\n\nexport default connect(\n mapStateToProps,\n mapDispatchToProps,\n)(Quickview);\n","// react\nimport React from 'react';\n\n// third-party\nimport { Redirect, Route } from 'react-router-dom';\nimport { connect } from 'react-redux';\n\nimport auth from '../server/real/endpoints/auth';\n\nfunction PrivateRoute({ component: Component, ...rest }) {\n return (\n (auth.isAuthenticated() ? (\n \n ) : (\n \n ))}\n />\n );\n}\n\nconst mapStateToProps = (state) => ({\n locale: state.locale,\n});\n\nexport default connect(mapStateToProps)(PrivateRoute);\n","// react\nimport React from 'react';\n\nexport default function BlockLoader() {\n return (\n \n );\n}\n","// react\nimport React, { useContext } from 'react';\n\n// third-party\nimport PropTypes from 'prop-types';\nimport { Link } from 'react-router-dom';\n\n// application\nimport { ArrowRoundedRight6x9Svg } from '../../svg';\nimport CategoriesContext from '../../contexts/CategoriesContext';\n\nfunction PageHeader(props) {\n let { header, breadcrumb } = props;\n const lang = JSON.parse(localStorage.getItem('state'))?.locale\n const { getCateogryLanguage } = useContext(CategoriesContext)\n\n if (header) {\n header = (\n \n
{getCateogryLanguage(lang, header)} \n \n );\n }\n\n if (breadcrumb.length > 0) {\n const lastIndex = breadcrumb.length - 1;\n\n breadcrumb = breadcrumb.map((item, index) => {\n let link;\n\n if (lastIndex === index) {\n link = {getCateogryLanguage(lang, item.title)} ;\n } else {\n link = (\n \n {getCateogryLanguage(lang, item.title)}\n \n \n );\n }\n\n return link;\n });\n\n breadcrumb = (\n \n
\n \n {breadcrumb}\n \n \n
\n );\n }\n\n return (\n \n
\n {breadcrumb}\n {header}\n
\n
\n );\n}\n\nPageHeader.propTypes = {\n /** page header */\n header: PropTypes.node,\n /** array of breadcrumb links */\n breadcrumb: PropTypes.array,\n};\n\nPageHeader.defaultProps = {\n breadcrumb: [],\n};\n\nexport default PageHeader;\n","import getApi from './api';\nimport { GetAPIEndpoint } from '../../configuration';\n\nfunction getHeaders() {\n const Authorization = `Bearer ${localStorage.getItem('access_token') ?? sessionStorage.getItem('access_token')}`;\n return { Authorization };\n}\nconst userApi = {\n getUser: () => getApi().get(`${GetAPIEndpoint()}/api/self`, { headers: getHeaders() }),\n getDefaultAddress: (user) => {\n if (!user || !user.addresses || user.addresses.length === 0) {\n return {\n id: 0,\n default: false,\n fullName: '',\n email: '',\n phone: '',\n country: '',\n townCity: '',\n city: '',\n stateCounty: '',\n postcode: '',\n address1: '',\n address2: '',\n address3: '',\n address4: '',\n companyName: '',\n };\n }\n const addresses = user.addresses.filter((data) => data.default);\n if (addresses.length > 0) return addresses[0];\n return user.addresses[0];\n },\n getAddress: (user, id) => {\n if (!user || !user.addresses || user.addresses.length === 0) {\n return {\n id: 0,\n default: false,\n fullName: '',\n email: '',\n phone: '',\n country: '',\n townCity: '',\n city: '',\n stateCounty: '',\n postcode: '',\n address1: '',\n address2: '',\n address3: '',\n address4: '',\n companyName: '',\n };\n }\n const addresses = user.addresses.filter((data) => data.id.toString() === id.toString());\n if (addresses.length > 0) return addresses[0];\n return {\n id: 0,\n default: false,\n fullName: '',\n email: '',\n phone: '',\n country: '',\n townCity: '',\n city: '',\n stateCounty: '',\n postcode: '',\n address1: '',\n address2: '',\n address3: '',\n address4: '',\n companyName: '',\n };\n },\n updateAddress: (userid, addressId, address) => getApi().post(`${GetAPIEndpoint()}/api/users/${userid}/addresses/${addressId}`, address, { headers: getHeaders() }),\n addAddress: (userId, address) => getApi().post(`${GetAPIEndpoint()}/api/users/${userId}/addresses`, address, { headers: getHeaders() }),\n deleteAddress: (userid, addressId) => getApi().delete(`${GetAPIEndpoint()}/api/users/${userid}/addresses/${addressId}`, { headers: getHeaders() }),\n updateUser: (userid, user) => getApi().post(`${GetAPIEndpoint()}/api/users/${userid}`, user, { headers: getHeaders() }),\n changePassword: (currentPassword, newPassword) => getApi().post(`${GetAPIEndpoint()}/api/users/changepassword`, { currentPassword, newPassword }, { headers: getHeaders() }),\n forgotPassword: (email) => {\n const data = { email };\n return getApi().post('/api/users/forgotpassword', data);\n },\n resetPassword: (email, password, token) => {\n const data = { email, password, token };\n return getApi().post('/api/users/resetpassword', data);\n },\n};\n\nexport default userApi;\n","// react\nimport React, { useContext } from 'react';\n\n// third-party\nimport { Helmet } from 'react-helmet-async';\nimport { Link } from 'react-router-dom';\nimport { FormattedMessage } from 'react-intl';\n\n// data stubs\nimport UserContext from '../../contexts/UserContext';\nimport ProgramContext from '../../contexts/ProgramContext';\nimport userApi from '../../server/real/endpoints/users';\n\nexport default function AccountPageAddresses() {\n const { user } = useContext(UserContext);\n const { program } = useContext(ProgramContext);\n\n const deleteAddress = (e, addressid) => {\n userApi.deleteAddress(user.sid, addressid).then(() => {\n window.location.reload();\n });\n };\n let addresses;\n if (user) {\n addresses = user.addresses.map((address) => (\n \n {address && address.country && (\n \n {address && address.default &&
}\n
\n
{address.address1 === undefined ? 'Default' : address.address1}
\n
\n {address.address1}\n \n {address.address2}\n \n {address.address3}\n \n {address.address4}\n \n {address.postcode}\n \n {address.stateCounty}\n \n {address.country}\n
\n
\n
\n \n \n deleteAddress(e, address.id)}>\n \n \n
\n
\n
\n)}\n
\n \n ));\n }\n\n return (\n \n
\n {`Address List — ${program.fullName}`} \n \n\n
\n
\n
\n \n
\n {addresses}\n
\n );\n}\n","import getApi from './api';\nimport { GetAPIEndpoint } from '../../configuration';\n\nfunction getHeaders() {\n const Authorization = `Bearer ${localStorage.getItem('access_token') ?? sessionStorage.getItem('access_token')}`;\n return { Authorization };\n}\nconst orderApi = {\n getOrder: (id) => {\n const headers = getHeaders();\n return getApi().get(`${GetAPIEndpoint()}/api/orders/${id}`, { headers });\n },\n getOrders: () => {\n const headers = getHeaders();\n return getApi().get(`${GetAPIEndpoint()}/api/orders`, { headers });\n },\n getTransactions: () => {\n const headers = getHeaders();\n return getApi().get(`${GetAPIEndpoint()}/api/transactions`, { headers });\n },\n placeOrder: (order) => fetch(`${GetAPIEndpoint()}/api/orders`, {\n method: 'POST',\n headers: new Headers(\n {\n 'Content-Type': 'application/json',\n Accept: 'application/json',\n Authorization: `Bearer ${localStorage.getItem('access_token') ?? sessionStorage.getItem('access_token')}`,\n },\n ),\n body: JSON.stringify(order),\n }),\n};\n\nexport default orderApi;\n","// react\nimport React, { useContext, useEffect, useState } from 'react';\n\n// third-party\nimport { Helmet } from 'react-helmet-async';\nimport { Link } from 'react-router-dom';\nimport { FormattedMessage } from 'react-intl';\n\n// data stubs\nimport orderApi from '../../server/real/endpoints/orders';\n\n// context\nimport UserContext from '../../contexts/UserContext';\nimport ProgramContext from '../../contexts/ProgramContext';\n\nexport default function AccountPageDashboard() {\n const { user } = useContext(UserContext);\n const { program } = useContext(ProgramContext);\n const [orders, setOrders] = useState([]);\n\n useEffect(() => {\n let canceled = false;\n\n orderApi.getOrders().then((data) => {\n if (canceled) {\n return;\n }\n setOrders(data.data);\n });\n\n return () => {\n canceled = true;\n };\n }, []);\n\n let address;\n let fullname;\n let useremail;\n if (user) {\n if (user.addresses) {\n [address] = user.addresses;\n }\n fullname = user.name;\n useremail = user.email;\n }\n\n const orderLines = orders.map((order) => (\n \n \n \n #\n {order.orderNumber}\n \n \n \n {new Date(order.date).toLocaleString('en-US', {\n weekday: 'short', // long, short, narrow\n day: 'numeric', // numeric, 2-digit\n year: 'numeric', // numeric, 2-digit\n month: 'long', // numeric, 2-digit, long, short, narrow\n })}\n \n {order.status === 'Shipped' && order.items[0].tracking.trackingLink ? {order.status} : {order.status === 'API Error' ? 'Pending' : order.status} } \n {program && program.type === 'points' && ({order.total} )}\n \n ));\n let addressComponent;\n if (address) {\n addressComponent = (\n \n {address.default &&
}\n
\n
{`${address.address1 === undefined ? 'Default' : address.address1}`}
\n
\n {address.address1}\n \n {address.postcode}\n \n {address.city}\n \n {address.stateCounty}\n \n {address.country}\n
\n
\n
\n \n
\n
\n
\n );\n }\n\n return (\n \n
\n {`My Account — ${program.fullName}`} \n \n\n
\n
\n {/*
\n
\n
*/}\n
{fullname}
\n
{useremail}
\n
\n \n {!program?.ableToPasswordReset && (\n \n )}\n
\n
\n
\n\n {addressComponent}\n\n
\n
\n
\n \n
\n
\n
\n
\n \n \n \n \n \n \n \n \n \n \n \n {program && program.type === 'points' && (\n \n \n \n)}\n \n \n \n {orderLines}\n \n
\n
\n
\n
\n
\n );\n}\n","// react\nimport React, { useContext, useState, useEffect } from 'react';\nimport { useParams } from 'react-router-dom';\nimport { FormattedMessage } from 'react-intl';\n\n// third-party\nimport { Helmet } from 'react-helmet-async';\n\n// data stubs\nimport userApi from '../../server/real/endpoints/users';\nimport UserContext from '../../contexts/UserContext';\nimport ProgramContext from '../../contexts/ProgramContext';\nimport locations from '../Countries';\n\nexport default function AccountPageEditAddress() {\n const { user } = useContext(UserContext);\n const { addressId } = useParams();\n const [address, setAddress] = useState();\n const { program } = useContext(ProgramContext);\n let isDisabled;\n if (program && program.permissions && program.permissions.allowAddressManagement === false) {\n isDisabled = true;\n }\n\n useEffect(() => {\n const addressvariable = userApi.getAddress(user, addressId);\n setAddress(addressvariable);\n }, [user]);\n\n if (!address) return ( );\n\n const updateAddress = () => {\n userApi.updateAddress(user.sid, address.id, address).then(() => {\n window.location = 'account/addresses';\n });\n };\n const phoneLength = () => {\n if ((address && address.country && address.country.indexOf('USA') !== -1) || (address && address.country === 'Canada')) {\n return 18;\n }\n return 50;\n };\n const zipRegCnd = () => {\n const zipReg = /^[A-Za-z]\\d[A-Za-z][ -]?\\d[A-Za-z]\\d$/;\n if (!zipReg.test(address.postcode)) {\n return 'form-control is-invalid';\n }\n return 'form-control';\n };\n const zipRegUs = () => {\n const zipReg = /(^\\d{5}$)|(^\\d{5}[ -]?\\d{4}$)/;\n if (!zipReg.test(address.postcode)) {\n return 'form-control is-invalid';\n }\n return 'form-control';\n };\n\n const zipRegex = () => {\n if (address && address.country.indexOf('USA') !== -1) {\n return zipRegUs();\n }\n if (address.country === 'Canada') {\n return zipRegCnd();\n }\n return 'form-control';\n };\n\n const addressValidate = () => {\n if (address && address.address1 && address.address1.length > 1) {\n return 'form-control';\n }\n return 'form-control is-invalid';\n };\n const countryValidate = () => {\n if ((address && address.country && address.country.length > 1) && (address && address.country && address.country.indexOf('Select Country...') === -1)) {\n return 'form-control';\n }\n return 'form-control is-invalid';\n };\n const fullnameValidate = () => {\n if (address && address.fullName && address.fullName.length > 1) {\n return 'form-control';\n }\n return 'form-control is-invalid';\n };\n const cityValidate = () => {\n if (address && address.townCity && address.townCity.length > 1) {\n return 'form-control';\n }\n return 'form-control is-invalid';\n };\n const stateValidate = () => {\n if (address && address.stateCounty && address.stateCounty.length > 1) {\n return 'form-control';\n }\n return 'form-control is-invalid';\n };\n const phoneValidate = () => {\n const number = /^(\\+\\d{1,2}\\s?)?\\(?\\d{3}\\)?[\\s.-]?\\d{3}[\\s.-]?\\d{4}$/;\n if (address && address.phone && address.phone.length > 1 && number.test(address.phone)) {\n return 'form-control';\n }\n return 'form-control is-invalid';\n };\n const checkValid = () => {\n if (address && address.country.indexOf('USA') !== -1) {\n if (addressValidate() === 'form-control' && countryValidate() === 'form-control' && phoneValidate() === 'form-control' && zipRegex() === 'form-control' && fullnameValidate() === 'form-control' && cityValidate() === 'form-control' && stateValidate() === 'form-control') {\n return false;\n }\n if (addressValidate() === 'form-control' && countryValidate() === 'form-control' && phoneValidate() === 'form-control' && zipRegex() === 'form-control' && fullnameValidate() === 'form-control') {\n return false;\n }\n }\n return true;\n };\n\n const selectCountry = () => {\n if (program && program.geolocation.enabled) {\n const continentsFilter = locations.filter((data) => program && program.continents.includes(data.code));\n const filteredContinents = continentsFilter && continentsFilter.map((a) => a.countries);\n const allCountries = [];\n for (let i = 0; i < filteredContinents.length; i += 1) {\n for (let j = 0; j < filteredContinents[i].length; j += 1) {\n allCountries.push(filteredContinents[i][j].title);\n }\n }\n return allCountries;\n }\n if (program && program.defaultContinent && program.defaultCountry) {\n const defaultContinents = locations.filter((a) => a.code === program.defaultContinent);\n const defaultCountry = defaultContinents.map((a) => a.countries.filter((b) => b.code === program.defaultCountry));\n return [defaultCountry[0][0].title];\n }\n return ['USA'];\n };\n\n function keyChanged(key, e) {\n const newAddress = { ...address };\n newAddress[key] = e.target.value;\n setAddress(newAddress);\n checkValid();\n }\n return (\n \n
\n Edit Address \n \n\n
\n
Edit Address \n \n
\n
\n
\n
\n
\n \n \n \n * \n \n \n {(placeholder) => (\n keyChanged('fullName', e)}\n value={address && address.fullName}\n />\n )}\n \n
\n \n \n \n {' '}\n \n \n \n {(placeholder) => (\n keyChanged('companyName', e)}\n value={address && address.companyName}\n />\n )}\n \n
\n \n \n \n * \n \n keyChanged('country', e)} value={address && address.country} disabled={isDisabled}>\n Select Country... \n {selectCountry().map((a) => {a} )}\n \n
\n \n \n \n * \n \n \n {(placeholder) => (\n keyChanged('address1', e)}\n value={address && address.address1}\n />\n )}\n \n
\n \n \n \n \n \n {(placeholder) => (\n keyChanged('address2', e)}\n value={address && address.address2}\n />\n )}\n \n
\n {(address && address.country.indexOf('USA') === -1) ? (\n \n \n \n \n \n \n {(placeholder) => (\n keyChanged('address3', e)}\n value={address && address.address3}\n />\n )}\n \n
\n \n \n \n \n \n {(placeholder) => (\n keyChanged('address4', e)}\n value={address && address.address4}\n />\n )}\n \n
\n \n) : ''}\n {(address && address.country.indexOf('USA') !== -1) ? (\n \n \n \n \n * \n \n keyChanged('townCity', e)} value={address && address.townCity} />\n
\n \n \n \n * \n \n \n {(placeholder) => (\n keyChanged('stateCounty', e)} value={address && address.stateCounty} />\n )}\n \n
\n \n) : ''}\n {address && address.country === 'Canada' && (\n \n \n \n * \n \n keyChanged('postcode', e)} value={address && address.postcode} />\n
\n)}\n { (address && address.country.indexOf('USA') !== -1) && (\n \n \n \n * \n \n keyChanged('postcode', e)} value={address && address.postcode} />\n
\n)}\n\n {(address && address.country.indexOf('USA') === -1) && address.country !== 'Canada' && (\n \n \n \n \n keyChanged('postcode', e)} value={address && address.postcode} />\n
\n)}\n \n \n \n\n
\n Save \n
\n
\n
\n
\n
\n );\n}\n","// react\nimport React, { useContext, useState } from 'react';\nimport { FormattedMessage } from 'react-intl';\n\n// third-party\nimport { Helmet } from 'react-helmet-async';\n\n// data stubs\nimport ProgramContext from '../../contexts/ProgramContext';\nimport UserContext from '../../contexts/UserContext';\nimport userApi from '../../server/real/endpoints/users';\nimport locations from '../Countries';\n\nexport default function AccountPageNewAddress() {\n const { user } = useContext(UserContext);\n const [address, setAddress] = useState();\n const { program } = useContext(ProgramContext);\n let isDisabled;\n if (program && program.permissions && program.permissions.allowAddressManagement === false) {\n isDisabled = true;\n }\n\n const addAddress = () => {\n userApi.addAddress(user.sid, address).then(() => {\n window.location = 'account/addresses';\n });\n };\n\n const zipRegCnd = () => {\n const zipReg = /^[A-Za-z]\\d[A-Za-z][ -]?\\d[A-Za-z]\\d$/;\n if (!zipReg.test(address.postcode)) {\n return 'form-control is-invalid';\n }\n return 'form-control';\n };\n const zipRegUs = () => {\n const zipReg = /(^\\d{5}$)|(^\\d{5}[ -]?\\d{4}$)/;\n if (!zipReg.test(address.postcode)) {\n return 'form-control is-invalid';\n }\n return 'form-control';\n };\n\n const phoneLength = () => {\n if ((address && address.country && address.country.indexOf('USA') !== -1) || (address && address.country === 'Canada')) {\n return 18;\n }\n return 50;\n };\n\n const zipRegex = () => {\n if (address && address.country && address.country.indexOf('USA') !== -1) {\n return zipRegUs();\n }\n if (address.country === 'Canada') {\n return zipRegCnd();\n }\n return 'form-control';\n };\n const addressValidate = () => {\n if (address && address.address1 && address.address1.length > 1) {\n return 'form-control';\n }\n return 'form-control is-invalid';\n };\n const countryValidate = () => {\n if ((address && address.country && address.country.length > 1) && (address && address.country && address.country.indexOf('Select Country...') === -1)) {\n return 'form-control';\n }\n return 'form-control is-invalid';\n };\n const phoneValidate = () => {\n const number = /^(\\+\\d{1,2}\\s?)?\\(?\\d{3}\\)?[\\s.-]?\\d{3}[\\s.-]?\\d{4}$/;\n if (address && address.phone && address.phone.length > 1 && number.test(address.phone)) {\n return 'form-control';\n }\n return 'form-control is-invalid';\n };\n const fullnameValidate = () => {\n if (address && address.fullName && address.fullName.length > 1) {\n return 'form-control';\n }\n return 'form-control is-invalid';\n };\n const cityValidate = () => {\n if (address && address.townCity && address.townCity.length > 1) {\n return 'form-control';\n }\n return 'form-control is-invalid';\n };\n const stateValidate = () => {\n if (address && address.stateCounty && address.stateCounty.length > 1) {\n return 'form-control';\n }\n return 'form-control is-invalid';\n };\n const checkValid = () => {\n if (address && address.country && address.country.indexOf('USA') !== -1) {\n if (addressValidate() === 'form-control' && countryValidate() === 'form-control' && phoneValidate() === 'form-control' && zipRegex() === 'form-control' && fullnameValidate() === 'form-control' && cityValidate() === 'form-control' && stateValidate() === 'form-control') {\n return false;\n }\n if (addressValidate() === 'form-control' && countryValidate() === 'form-control' && phoneValidate() === 'form-control' && zipRegex() === 'form-control' && fullnameValidate() === 'form-control') {\n return false;\n }\n }\n return true;\n };\n\n function keyChanged(key, e) {\n const newAddress = { ...address };\n newAddress[key] = e.target.value;\n setAddress(newAddress);\n checkValid();\n }\n\n const selectCountry = () => {\n if (program && program.geolocation.enabled) {\n const continentsFilter = locations.filter((data) => program && program.continents.includes(data.code));\n const filteredContinents = continentsFilter && continentsFilter.map((a) => a.countries);\n const allCountries = [];\n for (let i = 0; i < filteredContinents.length; i += 1) {\n for (let j = 0; j < filteredContinents[i].length; j += 1) {\n allCountries.push(filteredContinents[i][j].title);\n }\n }\n return allCountries;\n }\n if (program && program.defaultContinent && program.defaultCountry) {\n const defaultContinents = program && program.defaultContinent && locations.filter((a) => a.code === program.defaultContinent);\n const defaultCountry = program && program.defaultCountry && defaultContinents.map((a) => a.countries.filter((b) => b.code === program.defaultCountry));\n return [defaultCountry[0][0].title];\n }\n return ['USA'];\n };\n\n return (\n \n
\n {`New Address — ${program.fullName}`} \n \n\n
\n
New Address \n \n
\n
\n
\n
\n
\n \n \n \n * \n \n \n {(placeholder) => (\n keyChanged('fullName', e)}\n />\n )}\n \n
\n \n \n \n {' '}\n \n \n \n {(placeholder) => (\n keyChanged('companyName', e)}\n />\n )}\n \n
\n \n \n \n * \n \n keyChanged('country', e)} value={address && address.country} disabled={isDisabled}>\n Select Country... \n {selectCountry().map((a) => {a} )}\n \n
\n \n \n \n * \n \n \n {(placeholder) => (\n keyChanged('address1', e)}\n />\n )}\n \n
\n \n \n \n \n \n {(placeholder) => (\n keyChanged('address2', e)}\n />\n )}\n \n
\n {(address && address.country && address.country.indexOf('USA') === -1) ? (\n \n \n \n \n \n \n {(placeholder) => (\n keyChanged('address3', e)}\n />\n )}\n \n
\n \n \n \n \n \n {(placeholder) => (\n keyChanged('address4', e)}\n />\n )}\n \n
\n \n) : ''}\n {(address && address.country && address.country.indexOf('USA') !== -1) ? (\n \n \n \n \n * \n \n keyChanged('townCity', e)} />\n
\n \n \n \n * \n \n \n {(placeholder) => (\n keyChanged('stateCounty', e)} />\n )}\n \n
\n \n) : ''}\n {address && address.country === 'Canada' && (\n \n \n \n \n keyChanged('postcode', e)} />\n
\n)}\n {(address && address.country && address.country.indexOf('USA') !== -1) && (\n \n \n \n \n keyChanged('postcode', e)} />\n
\n)}\n\n {(address && address.country && address.country.indexOf('USA') === -1) && address.country !== 'Canada' && (\n \n \n \n \n keyChanged('postcode', e)} />\n
\n)}\n \n \n \n\n
\n Save \n
\n
\n
\n
\n
\n );\n}\n","// react\nimport React, { useContext, useEffect, useState } from 'react';\n\n// third-party\nimport { Helmet } from 'react-helmet-async';\nimport { Link } from 'react-router-dom';\nimport { FormattedMessage } from 'react-intl';\nimport PropTypes from 'prop-types';\nimport ProgramContext from '../../contexts/ProgramContext';\nimport orderApi from '../../server/real/endpoints/orders';\n\nfunction AccountPageOrderDetails(props) {\n const { program } = useContext(ProgramContext);\n const { match } = props;\n const { params } = match;\n const { orderId } = params;\n const [order, setOrder] = useState();\n\n useEffect(() => {\n let canceled = false;\n\n orderApi.getOrder(orderId).then((orderData) => {\n if (canceled) {\n return;\n }\n setOrder(orderData.data);\n });\n\n return () => {\n canceled = true;\n };\n }, []);\n\n if (!order) return ;\n const { shippingAddress } = order;\n return (\n \n \n {`Order Details — ${program.fullName}`} \n \n\n \n
\n
\n \n
\n
\n Order #\n {order.orderNumber}\n \n
\n
\n {' '}\n
\n {new Date(order.date).toLocaleString('en-US', {\n weekday: 'short', // long, short, narrow\n day: 'numeric', // numeric, 2-digit\n year: 'numeric', // numeric, 2-digit\n month: 'long', // numeric, 2-digit, long, short, narrow\n })}\n \n {' '}\n
\n {' '}\n
{order.status === 'Shipped' && order.items[0].tracking.trackingLink ? {order.status} : {order.status === 'API Error' ? 'Pending' : order.status} } \n .\n
\n
\n
\n
\n
\n
\n \n \n \n \n \n \n \n \n \n \n \n {program && program.type === 'points' && (\n \n \n \n )}\n \n \n \n {order.items.map((item) => (\n \n \n {item.product && item.product.productName}\n {' '}\n ×\n {' '}\n {item.quantity}\n \n \n {item?.tracking?.trackingNumber}\n \n \n {item?.tracking?.trackingCompany}\n \n {program && program.type === 'points' && (\n \n {item.total}\n {' '}\n Points\n \n )}\n \n ))}\n \n {program && program.type === 'points' && (\n \n \n \n \n \n \n {' '}\n \n \n {' '}\n \n {/* \n {' '}\n */}\n \n {order.total}\n {' '}\n Points\n \n \n \n )}\n
\n
\n
\n
\n\n \n
\n
\n
\n
\n
{shippingAddress.fullName}
\n
\n {shippingAddress.address1}\n \n {shippingAddress.address2}\n \n {shippingAddress.address3}\n \n {shippingAddress.address4}\n \n {shippingAddress.stateCounty}\n \n {shippingAddress.postalcode}\n \n {shippingAddress.country}\n
\n
\n
\n
{shippingAddress.phone}
\n
\n
\n
\n
\n
\n \n );\n}\n\nAccountPageOrderDetails.propTypes = {\n /**\n * Category slug.\n */\n orderId: PropTypes.string,\n};\n\nexport default AccountPageOrderDetails;\n","// react\nimport React, { Component } from 'react';\n\n// third-party\nimport { Link } from 'react-router-dom';\nimport { Helmet } from 'react-helmet-async';\nimport { FormattedMessage } from 'react-intl';\n\n// data stubs\nimport orderApi from '../../server/real/endpoints/orders';\nimport ProgramContext from '../../contexts/ProgramContext';\n\nexport default class AccountPageOrders extends Component {\n constructor(props) {\n super(props);\n\n this.state = {\n orders: [],\n };\n }\n\n componentDidMount = () => {\n orderApi.getOrders().then((ordersData) => {\n this.setState({ orders: ordersData.data });\n });\n }\n\n render() {\n const { orders } = this.state;\n\n const ordersList = orders.map((order) => (\n \n \n \n #\n {order.orderNumber}\n \n \n \n {new Date(order.date).toLocaleString('en-US', {\n weekday: 'short', // long, short, narrow\n day: 'numeric', // numeric, 2-digit\n year: 'numeric', // numeric, 2-digit\n month: 'long', // numeric, 2-digit, long, short, narrow\n })}\n \n {order.status === 'Shipped' ? {order.status} : {order.status === 'API Error' ? 'Pending' : order.status} } \n \n {(context) => {\n const { program } = context;\n return (\n program && program.type === 'points'\n && (\n {order.total} \n )\n );\n }}\n \n \n ));\n\n return (\n \n
\n {(context) => {\n const { program } = context;\n return (\n \n {`Order History — ${program.fullName}`} \n \n );\n }}\n \n\n
\n
Order History \n \n
\n
\n
\n
\n \n \n \n \n \n \n \n \n \n \n \n \n {(context) => {\n const { program } = context;\n return (\n program && program.type === 'points'\n && (\n \n \n \n)\n );\n }}\n \n \n \n \n {ordersList}\n \n
\n
\n
\n
\n
\n );\n }\n}\n","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { mapToCssModules, tagPropType } from './utils';\nvar propTypes = {\n tag: tagPropType,\n className: PropTypes.string,\n cssModule: PropTypes.object\n};\nvar defaultProps = {\n tag: 'div'\n};\n\nvar ModalFooter = function ModalFooter(props) {\n var className = props.className,\n cssModule = props.cssModule,\n Tag = props.tag,\n attributes = _objectWithoutPropertiesLoose(props, [\"className\", \"cssModule\", \"tag\"]);\n\n var classes = mapToCssModules(classNames(className, 'modal-footer'), cssModule);\n return /*#__PURE__*/React.createElement(Tag, _extends({}, attributes, {\n className: classes\n }));\n};\n\nModalFooter.propTypes = propTypes;\nModalFooter.defaultProps = defaultProps;\nexport default ModalFooter;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { mapToCssModules, tagPropType } from './utils';\nvar propTypes = {\n active: PropTypes.bool,\n 'aria-label': PropTypes.string,\n block: PropTypes.bool,\n color: PropTypes.string,\n disabled: PropTypes.bool,\n outline: PropTypes.bool,\n tag: tagPropType,\n innerRef: PropTypes.oneOfType([PropTypes.object, PropTypes.func, PropTypes.string]),\n onClick: PropTypes.func,\n size: PropTypes.string,\n children: PropTypes.node,\n className: PropTypes.string,\n cssModule: PropTypes.object,\n close: PropTypes.bool\n};\nvar defaultProps = {\n color: 'secondary',\n tag: 'button'\n};\n\nvar Button = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(Button, _React$Component);\n\n function Button(props) {\n var _this;\n\n _this = _React$Component.call(this, props) || this;\n _this.onClick = _this.onClick.bind(_assertThisInitialized(_this));\n return _this;\n }\n\n var _proto = Button.prototype;\n\n _proto.onClick = function onClick(e) {\n if (this.props.disabled) {\n e.preventDefault();\n return;\n }\n\n if (this.props.onClick) {\n return this.props.onClick(e);\n }\n };\n\n _proto.render = function render() {\n var _this$props = this.props,\n active = _this$props.active,\n ariaLabel = _this$props['aria-label'],\n block = _this$props.block,\n className = _this$props.className,\n close = _this$props.close,\n cssModule = _this$props.cssModule,\n color = _this$props.color,\n outline = _this$props.outline,\n size = _this$props.size,\n Tag = _this$props.tag,\n innerRef = _this$props.innerRef,\n attributes = _objectWithoutPropertiesLoose(_this$props, [\"active\", \"aria-label\", \"block\", \"className\", \"close\", \"cssModule\", \"color\", \"outline\", \"size\", \"tag\", \"innerRef\"]);\n\n if (close && typeof attributes.children === 'undefined') {\n attributes.children = /*#__PURE__*/React.createElement(\"span\", {\n \"aria-hidden\": true\n }, \"\\xD7\");\n }\n\n var btnOutlineColor = \"btn\" + (outline ? '-outline' : '') + \"-\" + color;\n var classes = mapToCssModules(classNames(className, {\n close: close\n }, close || 'btn', close || btnOutlineColor, size ? \"btn-\" + size : false, block ? 'btn-block' : false, {\n active: active,\n disabled: this.props.disabled\n }), cssModule);\n\n if (attributes.href && Tag === 'button') {\n Tag = 'a';\n }\n\n var defaultAriaLabel = close ? 'Close' : null;\n return /*#__PURE__*/React.createElement(Tag, _extends({\n type: Tag === 'button' && attributes.onClick ? 'button' : undefined\n }, attributes, {\n className: classes,\n ref: innerRef,\n onClick: this.onClick,\n \"aria-label\": ariaLabel || defaultAriaLabel\n }));\n };\n\n return Button;\n}(React.Component);\n\nButton.propTypes = propTypes;\nButton.defaultProps = defaultProps;\nexport default Button;","import React from 'react';\nimport {\n Modal, ModalHeader, ModalBody, Button, ModalFooter,\n} from 'reactstrap';\n\nconst PasswordModal = (props) => {\n const {\n className, modal,\n } = props;\n\n const centeredmodal = true;\n\n return (\n \n \n Congratulations \n \n The password change was succes. You will be redirect to homepage.\n \n \n { window.location = '/'; }}\n >\n Go homepage\n \n \n \n \n );\n};\nexport default PasswordModal;\n","import React from 'react';\nimport {\n Modal, ModalHeader, ModalBody, Button, ModalFooter,\n} from 'reactstrap';\n\nconst PasswordModalFail = (props) => {\n const {\n className, modalFail, modalClose,\n } = props;\n\n const centeredmodal = true;\n\n return (\n \n \n Fail \n \n Password change failed. Please try again.\n \n \n modalClose(false)}>\n Cancel\n \n \n \n \n );\n};\nexport default PasswordModalFail;\n","// react\nimport React, { useState, useContext } from 'react';\nimport { FormattedMessage } from 'react-intl';\n\n// third-party\nimport { Helmet } from 'react-helmet-async';\nimport ProgramContext from '../../contexts/ProgramContext';\nimport userApi from '../../server/real/endpoints/users';\nimport PasswordModal from './AccountResetPasswordModal';\nimport PasswordModalFail from './AccountPasswordModalFail';\n\nexport default function AccountPagePassword() {\n const [password, setPassword] = useState('');\n const [password2, setPassword2] = useState('');\n const [modal, setModal] = useState(false);\n const [modalFail, setModalFail] = useState(false);\n const { program } = useContext(ProgramContext);\n\n const [currentPassword, setCurrentPassword] = useState('');\n\n function onCurrentPasswordChange(e) {\n setCurrentPassword(e.target.value);\n }\n\n function onPasswordChange(e) {\n setPassword(e.target.value);\n }\n function onValidationPasswordChange(e) {\n setPassword2(e.target.value);\n }\n\n function validationMessages() {\n const errorMessageList = [];\n if (password.length > 0) {\n if (password.search(/[a-z]/) < 0) {\n errorMessageList.push( );\n }\n if (password.search(/[A-Z]/) < 0) {\n errorMessageList.push( );\n }\n if (password.search(/[.^#!'[!-#%-*,-/:;?@[-\\]_{}<>\"&/%*+?^${}()|[\\]\\\\]/g, '\\\\$&') < 0) {\n errorMessageList.push( );\n }\n if (password.search(/[0-9]/) < 0) {\n errorMessageList.push( );\n }\n if (password.length < 8) {\n errorMessageList.push( );\n }\n if (password.length > 16) {\n errorMessageList.push( );\n }\n if (password === currentPassword) {\n errorMessageList.push( );\n }\n }\n\n // setGreen('form-control is-invalid');\n return errorMessageList;\n }\n\n function password2Valid() {\n if (password === password2 && password.length > 0) {\n return true;\n }\n return false;\n }\n\n function confirmValidationComponent() {\n const valid = password2Valid();\n if (valid) {\n return ( );\n }\n return ( );\n }\n\n function formClassName() {\n const messages = validationMessages();\n if (password.length > 0) {\n if (messages.length > 0) {\n return 'form-control is-invalid';\n }\n\n return 'form-control is-valid';\n }\n return 'form-control';\n }\n\n function validationFormClassName() {\n const isPassword2Valid = password2Valid();\n if (password2.length > 0) {\n if (!isPassword2Valid) {\n return 'form-control is-invalid';\n }\n return 'form-control is-valid';\n }\n return 'form-control';\n }\n\n function passwordValid() {\n if (password === password2 && validationFormClassName() === formClassName() && password.length > 7) {\n return false;\n }\n return true;\n }\n\n const changePassword = () => {\n userApi.changePassword(currentPassword, password).then((response) => {\n if (response.data.success) {\n setModal(true);\n } else {\n setModalFail(true);\n setCurrentPassword('');\n setPassword('');\n setPassword2('');\n}\n });\n };\n\n return (\n \n
\n {`Change Password — ${program.fullName}`} \n \n\n
\n
\n \n
\n
\n
\n
\n
\n \n \n \n \n
\n\n
\n
\n \n \n\n
\n {validationMessages().map((message) => (
{message}
))}\n\n
\n
\n
\n
\n \n \n
\n\n
{confirmValidationComponent()}
\n\n
\n
\n\n
\n
\n \n \n
\n
{ setModalFail(data); }} modalFail={modalFail} />\n \n
\n
\n
\n
\n );\n}\n","// react\nimport React, { useState, useContext, useEffect } from 'react';\n\n// third-party\nimport { Helmet } from 'react-helmet-async';\n\n// data stubs\nimport UserContext from '../../contexts/UserContext';\nimport userApi from '../../server/real/endpoints/users';\n\nexport default function AccountPageProfile() {\n const { user } = useContext(UserContext);\n const [newUser, setNewUser] = useState();\n function validationEmail() {\n const pattern = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$/;\n const result = pattern.test(newUser && newUser.email);\n if (result) {\n return 'form-control';\n }\n return 'form-control is-invalid';\n }\n function setDisableButton() {\n if (validationEmail() === 'form-control') {\n return false;\n }\n return true;\n }\n const updateUser = () => {\n userApi.updateUser(user.sid, newUser).then(() => {\n window.location = 'account/myprofile';\n });\n };\n useEffect(() => {\n setNewUser(user);\n validationEmail(newUser && newUser.email);\n setDisableButton();\n }, [user]);\n\n function keyChanged(key, e) {\n const newUser = { ...user };\n newUser[key] = e.target.value;\n setNewUser(newUser);\n }\n\n return (\n \n
\n Profile Edit \n \n\n
\n
Edit Profile \n \n
\n
\n
\n
\n
\n Full Name \n keyChanged('name', e)}\n className=\"form-control\"\n placeholder=\"Please Type Your Name\"\n value={newUser && newUser.name}\n />\n
\n
\n
Email Address \n
keyChanged('email', e)}\n value={newUser && newUser.email}\n />\n
Please Enter valid email address
\n
\n\n
\n Save \n
\n
\n
\n
\n
\n );\n}\n","// react\nimport React, { Component } from 'react';\n\n// third-party\nimport { Helmet } from 'react-helmet-async';\nimport { FormattedMessage } from 'react-intl';\n\n// data stubs\nimport orderApi from '../../server/real/endpoints/orders';\nimport ProgramContext from '../../contexts/ProgramContext';\nimport UserContext from '../../contexts/UserContext';\n\nexport default class AccountPageTransactions extends Component {\n constructor(props) {\n super(props);\n\n this.state = {\n transactions: [],\n };\n }\n\n componentDidMount = () => {\n orderApi.getTransactions().then((transactionsData) => {\n this.setState({ transactions: transactionsData.data });\n });\n }\n\n render() {\n const { transactions } = this.state;\n\n const transactionsList = transactions.map((transaction) => (\n \n \n {new Date(transaction.createDate).toLocaleString('en-US', {\n weekday: 'short', // long, short, narrow\n day: 'numeric', // numeric, 2-digit\n year: 'numeric', // numeric, 2-digit\n month: 'long', // numeric, 2-digit, long, short, narrow\n })}\n \n {transaction.description} \n {transaction.amount} \n \n ));\n\n return (\n \n
\n {(context) => {\n const { program } = context;\n return (\n \n {`Transaction History — ${program.fullName}`} \n \n );\n }}\n \n\n
\n
Transaction History \n \n {(context) => {\n const { user } = context;\n return (\n \n Balance:\n {' '}\n {user.balance}\n \n);\n }}\n \n \n
\n
\n
\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {transactionsList}\n \n
\n
\n
\n
\n
\n );\n }\n}\n","// react\nimport React from 'react';\n\nexport default function AccountTimeout() {\n return (\n \n );\n}\n","// react\nimport React, { useContext } from 'react';\n\n// third-party\nimport classNames from 'classnames';\nimport {\n Link,\n matchPath,\n Redirect,\n Switch,\n Route,\n} from 'react-router-dom';\nimport { FormattedMessage } from 'react-intl';\n\n// application\nimport PageHeader from '../shared/PageHeader';\n\n// pages\nimport AccountPageAddresses from './AccountPageAddresses';\nimport AccountPageDashboard from './AccountPageDashboard';\nimport AccountPageEditAddress from './AccountPageEditAddress';\nimport AccountPageNewAddress from './AccountPageNewAddress';\nimport AccountPageOrderDetails from './AccountPageOrderDetails';\nimport AccountPageOrders from './AccountPageOrders';\nimport AccountPagePassword from './AccountPagePassword';\nimport AccountPageProfile from './AccountPageProfile';\nimport ProgramContext from '../../contexts/ProgramContext';\nimport AccountPageTransactions from './AccountPageTransactions';\nimport AccountTimeout from './AccountTimeout';\n\nexport default function AccountLayout(props) {\n const { match, location } = props;\n const { program } = useContext(ProgramContext);\n const breadcrumb = [\n { title: 'Home', url: '' },\n { title: 'My Account', url: '' },\n ];\n\n let defaultRedirect;\n let urls = [];\n let components = [];\n if (program.type === 'points') {\n urls = [\n { title: , url: 'myprofile' },\n { title: , url: 'orders' },\n { title: , url: 'transactions' },\n { title: , url: 'addresses' },\n { title: , url: 'logout' },\n ];\n\n components = [\n ,\n ,\n ,\n ];\n\n defaultRedirect = 'myprofile';\n } else if (program.type === 'claim') {\n urls = [\n { title: , url: 'orders' },\n { title: , url: 'addresses' },\n { title: , url: 'logout' },\n ];\n\n defaultRedirect = 'adresses';\n } else if (program.type === 'plateau') {\n urls = [\n { title: , url: 'myprofile' },\n { title: , url: 'orders' },\n { title: , url: 'addresses' },\n { title: , url: 'logout' },\n ];\n\n components = [\n ,\n ,\n ,\n ];\n\n defaultRedirect = 'adresses';\n }\n const links = urls.map((link) => {\n const url = `${match.url}/${link.url}`;\n const isActive = matchPath(location.pathname, { path: url, exact: true });\n const classes = classNames('account-nav__item', {\n 'account-nav__item--active': isActive,\n });\n return (\n \n {link.title}\n \n );\n });\n\n return (\n \n } breadcrumb={breadcrumb} />\n\n \n
\n
\n
\n
\n
\n \n {components}\n \n \n {\n const { match } = props;\n const { params } = match;\n const { orderId } = params;\n ;\n }}\n component={AccountPageOrderDetails}\n />\n \n \n \n \n \n
\n
\n
\n
\n \n );\n}\n","import React, { useState, useContext } from 'react';\nimport {\n Button, Modal, ModalHeader, ModalBody, ModalFooter,\n } from 'reactstrap';\nimport userApi from '../../server/real/endpoints/users';\nimport ProgramContext from '../../contexts/ProgramContext';\n\nconst ErrModal = (props) => {\n const {\n className,\n } = props;\n const { program } = useContext(ProgramContext);\n const [modal, setModal] = useState(false);\n const [email, setEmail] = useState();\n const toggle = () => setModal(!modal);\n\n const centeredmodal = true;\n\n function onSubmit() {\n userApi.forgotPassword(email);\n}\n return (\n \n {!program?.ableToPasswordReset && (\n
Forgot Password \n )}\n
\n Reset Password \n \n \n
\n );\n};\n\nexport default ErrModal;\n","// react\nimport React, { useContext, useEffect, useState } from 'react';\n\n// third-party\nimport { Helmet } from 'react-helmet-async';\nimport { FormattedMessage } from 'react-intl';\n\n// application\nimport { Check9x7Svg } from '../../svg';\n\n// data stubs\nimport ErrModal from './AccountPassModal';\n\n// context\nimport ProgramContext from '../../contexts/ProgramContext';\nimport auth from '../../server/real/endpoints/auth';\nimport PageHeader from '../shared/PageHeader';\n\nexport default function AccountPageLogin() {\n const { program } = useContext(ProgramContext);\n const [email, setEmail] = useState('');\n const [failCounter, setFailCounter] = useState(0);\n const [password, setPassword] = useState('');\n const queryString = window.location.search;\n const urlParams = new URLSearchParams(queryString);\n const token = urlParams.get('token');\n\n const failFunc = (fail) => {\n setFailCounter(fail + 1);\n };\n\n useEffect(() => {\n if (token && token.length > 0) {\n auth.authenticateSSO(token, (result) => {\n if (result.success) window.location = '/';\n else failFunc(failCounter);\n });\n }\n }, [token]);\n\n const enterLoginClaim = (event) => {\n if (event.keyCode === 13) {\n event.preventDefault();\n auth.authenticate(email, email, (result) => {\n if (result.success) window.location = '/';\n else failFunc(failCounter);\n });\n }\n };\n\n const enterLoginPassword = (event) => {\n if (event.keyCode === 13) {\n event.preventDefault();\n auth.authenticate(email, password, (result) => {\n if (result.success) {\n window.location = '/';\n } else { failFunc(failCounter); }\n });\n }\n };\n\n const claimComponent = (\n \n
\n
\n
\n
\n
\n
\n );\n const loginComponent = (\n \n
\n
\n
\n
\n
\n
\n );\n let authComponent;\n if (program) {\n if (program.type === 'points') {\n authComponent = (\n \n
\n
\n {loginComponent}\n
\n
\n
\n );\n } else if (program.type === 'plateau') {\n authComponent = (\n \n
\n
\n {loginComponent}\n
\n
\n
\n );\n } else if (program.type === 'claim') {\n authComponent = (\n \n
\n
\n {claimComponent}\n
\n
\n
\n );\n }\n }\n\n return (\n \n \n {`Login — ${program.fullName}`} \n \n \n \n
\n {authComponent}\n
\n
\n \n );\n}\n","// react\nimport React from 'react';\nimport auth from '../../server/real/endpoints/auth';\n\nexport default function AccountPageLogout() {\n auth.signout(() => {\n window.location = '/';\n });\n return (\n \n );\n}\n","/* eslint-disable class-methods-use-this */\n/* eslint-disable react/sort-comp */\n// react\nimport React, { Component } from 'react';\nimport { FormattedMessage } from 'react-intl';\n\n// third-party\nimport classNames from 'classnames';\nimport { connect } from 'react-redux';\nimport { Helmet } from 'react-helmet-async';\nimport { Link, withRouter } from 'react-router-dom';\n\n// application\nimport AsyncAction from '../shared/AsyncAction';\nimport Points from '../shared/Points';\nimport InputNumber from '../shared/InputNumber';\nimport PageHeader from '../shared/PageHeader';\nimport { cartRemoveItem, cartUpdateQuantities } from '../../store/cart';\nimport { Cross12Svg } from '../../svg';\nimport { url } from '../../services/utils';\nimport { getProductPrice, selectedLanguage } from '../../server/utils';\n// data stubs\nimport ProgramContext from '../../contexts/ProgramContext';\nimport UserContext from '../../contexts/UserContext';\n\nclass ShopPageCart extends Component {\n constructor(props) {\n super(props);\n\n this.state = {\n /** example: [{itemId: 8, value: 1}] */\n quantities: [],\n };\n }\n\n componentDidUpdate(prevState) {\n const { quantities } = this.state;\n const { cartUpdateQuantities } = this.props;\n if (prevState.quantities !== quantities) {\n cartUpdateQuantities(quantities);\n }\n }\n\n getItemQuantity(item) {\n const { quantities } = this.state;\n const quantity = quantities.find((x) => x.itemId === item.id);\n\n return quantity ? quantity.value : item.quantity;\n }\n\n handleChangeQuantity = (user, item, quantity, currentQuantity) => {\n const max = this.getProductMax(user, item.product, item.option, currentQuantity);\n\n if (quantity > max) return;\n\n this.setState((state) => {\n const stateQuantity = state.quantities.find((x) => x.itemId === item.id);\n\n if (!stateQuantity) {\n state.quantities.push({ itemId: item.id, value: quantity });\n } else {\n stateQuantity.value = quantity;\n }\n\n return {\n quantities: state.quantities,\n };\n });\n };\n\n cartNeedUpdate() {\n const { quantities } = this.state;\n const { cart } = this.props;\n\n return quantities.filter((x) => {\n const item = cart.items.find((item) => item.id === x.itemId);\n\n return item && item.quantity !== x.value && x.value !== '';\n }).length > 0;\n }\n\n getProductMax(user, product, option, quantity) {\n const { region } = this.props;\n let { balance } = user;\n if (!balance) balance = 0;\n\n const cartTotal = this.getCartTotal(user);\n\n const unitPrice = getProductPrice(product, option, region);\n\n const remaining = ((balance - cartTotal) / unitPrice) + quantity;\n return Math.floor(remaining);\n }\n\n\n\n renderItems(user) {\n const { cart, cartRemoveItem } = this.props;\n const { region, locale } = this.props;\n function equalizeLang (langData) {\n if (langData === 'sp') {\n return 'es'\n }\n if (langData === 'ge') {\n return 'de'\n }\n return langData\n }\n return cart.items.map((item) => {\n const { product, quantity } = item;\n const { option } = item;\n const unitPrice = getProductPrice(product, option, region);\n const totalPrice = unitPrice * quantity;\n let image;\n if (item.product.images) {\n image = (\n \n
\n
\n \n
\n );\n }\n const removeButton = (\n cartRemoveItem(item.id)}\n render={({ run, loading }) => {\n const classes = classNames('btn btn-light btn-sm btn-svg-icon', {\n 'btn-loading': loading,\n });\n\n return (\n \n \n \n );\n }}\n />\n );\n\n return (\n \n \n {image}\n \n \n \n {selectedLanguage(item.product, equalizeLang(locale), item.product.productName, 'name')}\n \n\n \n {item.option && item.option.optionColorValue && ({`Color: ${item.option.optionColorValue}`} )}\n {item.option && item.option.optionSizeValue && ({`Size: ${item.option.optionColorValue}`} )}\n {item.option && item.option.optionCustom1Value && ({`${item.product.optionsCustom1Label}: ${item.option.optionCustom1Value}`} )}\n {item.option && item.option.optionCustom2Value && ({`${item.product.optionsCustom2Label}: ${item.option.optionCustom2Value}`} )}\n {item.option && item.option.optionCustom3Value && ({`${item.product.optionsCustom3Label}: ${item.option.optionCustom3Value}`} )}\n \n \n \n \n \n \n this.handleChangeQuantity(user, item, quantity, this.getItemQuantity(item))}\n value={this.getItemQuantity(item)}\n enableUp={this.getProductMax(user, item.product, item.option, this.getItemQuantity(item)) !== this.getItemQuantity(item)}\n enableDown\n min={1}\n max={this.getProductMax(user, item.product, item.option, this.getItemQuantity(item))}\n />\n \n \n \n \n \n {removeButton}\n \n \n );\n });\n }\n\n getCartTotal(user) {\n const { region } = this.props;\n if (!user) return 0;\n let allTotal = 0;\n const { cart } = this.props;\n for (let i = 0; i < cart.items.length; i += 1) {\n const item = cart.items[i];\n const { product, quantity } = item;\n const { option } = item;\n\n const unitPrice = getProductPrice(product, option, region);\n const totalPrice = unitPrice * quantity;\n allTotal += totalPrice;\n }\n return allTotal;\n }\n\n checkoutDisabled(user) {\n if (this.getCartTotal(user) > user.balance) {\n return true;\n }\n return false;\n }\n\n renderCart(user, history) {\n return (\n \n
\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {this.renderItems(user)}\n \n
\n
\n\n
\n
\n
\n
\n
\n \n \n \n \n \n \n \n \n \n \n
\n {this.checkoutDisabled(user) && (
Your cart total exceeds your available points balance.
)}\n
history.push('/shop/checkout')}>\n \n \n
\n
\n
\n
\n
\n
\n );\n }\n\n render() {\n const { cart, history } = this.props;\n const breadcrumb = [\n { title: 'Home', url: '' },\n { title: 'Shopping Cart', url: '' },\n ];\n\n let content;\n\n return (\n \n \n {(context) => {\n const { program } = context;\n return (\n\n \n {(userContext) => {\n const { user } = userContext;\n return (\n \n\n \n {`Shopping Cart — ${program.fullName}`} \n \n \n {cart.quantity && this.renderCart(user, history)}\n {!cart.quantity && (\n \n )}\n\n {content}\n \n );\n }}\n \n );\n }}\n \n\n \n );\n }\n}\n\nconst mapStateToProps = (state) => ({\n cart: state.cart,\n region: state.region,\n locale: state.locale,\n});\n\nconst mapDispatchToProps = {\n cartRemoveItem,\n cartUpdateQuantities,\n};\n\nexport default withRouter(connect(mapStateToProps, mapDispatchToProps)(ShopPageCart));\n","// react\nimport React, { useContext, useState, useEffect } from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { connect } from 'react-redux';\n\n// data stubs\nimport UserContext from '../../contexts/UserContext';\nimport ProgramContext from '../../contexts/ProgramContext';\nimport userApi from '../../server/real/endpoints/users';\nimport locations from '../Countries';\n\nfunction ShopPageCheckoutAddress(props) {\n const { onAddressChange, region } = props;\n const { country } = region;\n\n let flatCountries = [];\n for (let i = 0; i < locations.length; i += 1) {\n flatCountries = [...flatCountries, ...locations[i].countries];\n }\n\n const filteredCountries = flatCountries.filter((data) => data.code === country);\n const geolocationCountry = filteredCountries[0];\n const [addressId, setAddressId] = useState();\n const { program } = useContext(ProgramContext);\n const { user } = useContext(UserContext);\n const [userData, setUserData] = useState(user && user);\n const storageAddress = JSON.parse(localStorage.getItem('summary_data'));\n const [address, setAddress] = useState(storageAddress && storageAddress.shippingAddress ? storageAddress.shippingAddress : user && user.addresses && user.addresses[0]);\n useEffect(() => {\n const userAddress = user.addresses[0];\n userAddress.country = geolocationCountry.title;\n if (!userAddress.fullName || userAddress.fullName.length === 0) {\n userAddress.fullName = user.name;\n }\n setAddressId(storageAddress && storageAddress.shippingAddress ? storageAddress.shippingAddress.id : userAddress.id);\n setAddress(storageAddress && storageAddress.shippingAddress ? storageAddress.shippingAddress : userAddress);\n }, [user]);\n const claimDefaultMail = program && program.defaultEmail;\n\n const allowMail = program && program.permissions && program.permissions.allowEmailUpdate;\n\n const defaultMail = () => {\n if (userData.claimEmail === claimDefaultMail) {\n return '';\n }\n return userData.claimEmail;\n };\n\n const validationEmail = () => {\n const pattern = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$/;\n const result = pattern.test(defaultMail() === undefined ? 'help@replink.com' : defaultMail());\n if (!result) {\n return 'form-control is-invalid';\n }\n return 'form-control';\n };\n\n const addressHandling = (user, e) => {\n const id = e.target.value;\n const address = userApi.getAddress(user, id);\n if (!address.country) {\n address.country = 'USA Continental';\n }\n setAddress(address);\n setAddressId(address.id);\n };\n const zipRegCnd = () => {\n const zipReg = /^[A-Za-z]\\d[A-Za-z][ -]?\\d[A-Za-z]\\d$/;\n if (!zipReg.test(address.postcode)) {\n return 'form-control is-invalid';\n }\n return 'form-control';\n };\n const zipRegUs = () => {\n const zipReg = /(^\\d{5}$)|(^\\d{5}[ -]?\\d{4}$)/;\n if (!zipReg.test(address.postcode)) {\n return 'form-control is-invalid';\n }\n return 'form-control';\n };\n\n const phoneLength = () => {\n if ((address && address.country && address.country.indexOf('USA') !== -1) || (address && address.country === 'Canada')) {\n return 18;\n }\n return 16;\n };\n\n const zipRegex = () => {\n if (address && address.country && address.country.indexOf('USA') !== -1) {\n return zipRegUs();\n }\n if (address.country === 'Canada') {\n return zipRegCnd();\n }\n return 'form-control';\n };\n const addressValidate = () => {\n if (address && address.address1 && address.address1.length > 1) {\n return 'form-control';\n }\n return 'form-control is-invalid';\n };\n const countryValidate = () => {\n if ((address && address.country && address.country.length > 1) && (address && address.country && address.country && address.country.indexOf('Select Country...') === -1)) {\n return 'form-control';\n }\n return 'form-control is-invalid';\n };\n const phoneValidate = () => {\n const number = /^(\\+\\d{1,2}\\s?)?\\(?\\d{3}\\)?[\\s.-]?\\d{3}[\\s.-]?\\d{4}$/;\n if (address && address.phone && address.phone.length > 1 && number.test(address.phone)) {\n return 'form-control';\n }\n return 'form-control is-invalid';\n };\n const fullnameValidate = () => {\n if (address && address.fullName && address.fullName.length > 1) {\n return 'form-control';\n }\n return 'form-control is-invalid';\n };\n const cityValidate = () => {\n if (address && address.townCity && address.townCity.length > 1) {\n return 'form-control';\n }\n return 'form-control is-invalid';\n };\n const stateValidate = () => {\n if (address && address.stateCounty && address.stateCounty.length > 1) {\n return 'form-control';\n }\n return 'form-control is-invalid';\n };\n const checkValidUs = () => {\n if (program.type === 'claim') {\n if (addressValidate() === 'form-control'\n && countryValidate() === 'form-control'\n && phoneValidate() === 'form-control'\n && zipRegex() === 'form-control'\n && fullnameValidate() === 'form-control'\n && cityValidate() === 'form-control'\n && stateValidate() === 'form-control'\n && validationEmail() === 'form-control') {\n return true;\n }\n return false;\n }\n if (addressValidate() === 'form-control'\n && countryValidate() === 'form-control'\n && phoneValidate() === 'form-control'\n && zipRegex() === 'form-control'\n && fullnameValidate() === 'form-control'\n && cityValidate() === 'form-control'\n && stateValidate() === 'form-control') {\n return true;\n }\n return false;\n };\n\n const checkValid = () => {\n if (program.type === 'claim') {\n if (addressValidate() === 'form-control' && countryValidate() === 'form-control' && phoneValidate() === 'form-control' && zipRegex() === 'form-control' && fullnameValidate() === 'form-control') {\n return true;\n }\n return false;\n }\n if (addressValidate() === 'form-control' && countryValidate() === 'form-control' && phoneValidate() === 'form-control' && zipRegex() === 'form-control' && fullnameValidate() === 'form-control' && validationEmail() === 'form-control') {\n return true;\n }\n return false;\n };\n useEffect(() => {\n onAddressChange(address, address && address.country && address.country.indexOf('USA') !== -1 ? checkValidUs() : checkValid(), allowMail ? defaultMail() : claimDefaultMail);\n }, [address, validationEmail()]);\n\n const keyChanged = (key, e) => {\n if (storageAddress) {\n localStorage.removeItem('summary_data');\n }\n const newaddress = { ...address };\n newaddress[key] = e.target.value;\n setAddress(newaddress);\n addressValidate();\n validationEmail();\n };\n\n const customKeyChanged = (key, e) => {\n const newaddress = { ...address };\n if (key === 'customField1') newaddress[key] = { label: program?.customField1, value: e.target.value };\n if (key === 'customField2') newaddress[key] = { label: program?.customField2, value: e.target.value };\n setAddress(newaddress);\n addressValidate();\n validationEmail();\n };\n\n const mailChanged = (key, e) => {\n const userMail = { ...userData };\n userMail[key] = e.target.value;\n setUserData(userMail);\n validationEmail();\n };\n let isDisabled;\n if (program && program.permissions && program.permissions.allowAddressManagement === false) {\n isDisabled = true;\n }\n return (\n \n \n \n {user.addresses.length > 0 && (\n
\n \n \n \n {\n addressHandling(user, e);\n }}\n >\n {program && program.permissions.allowAddressManagement === true && (New Address )}\n {user.addresses && user.addresses.map((address) => (\n {`${(!address.address1 || address.address1 === 'undefined') ? 'Default' : address.address1}`} \n ))}\n \n
\n )}\n
\n \n \n \n \n * \n \n \n {(placeholder) => (\n keyChanged('fullName', e)}\n value={address && address.fullName}\n />\n )}\n \n
\n \n \n \n {' '}\n \n \n \n {(placeholder) => (\n keyChanged('companyName', e)}\n value={address && address.companyName}\n />\n )}\n \n
\n {program && program.type === 'claim' && allowMail && (\n \n \n \n * \n \n \n {(placeholder) => (\n mailChanged('claimEmail', e)}\n value={defaultMail()}\n />\n )}\n \n
\n)}\n \n \n \n * \n \n keyChanged('country', e)}\n />\n
\n \n \n \n * \n \n \n {(placeholder) => (\n keyChanged('address1', e)}\n value={address && address.address1}\n />\n )}\n \n
\n \n \n \n \n \n {(placeholder) => (\n keyChanged('address2', e)}\n value={address && address.address2}\n />\n )}\n \n
\n {(address && address.country && address.country.indexOf('USA') === -1) && (address && address.country && address.country.indexOf('Canada') === -1) ? (\n \n \n \n \n \n \n {(placeholder) => (\n keyChanged('address3', e)}\n value={address && address.address3}\n />\n )}\n \n
\n \n \n \n \n \n {(placeholder) => (\n keyChanged('address4', e)}\n value={address && address.address4}\n />\n )}\n \n
\n \n \n \n \n keyChanged('townCity', e)} value={address && address.townCity} />\n
\n \n \n \n \n \n {(placeholder) => (\n keyChanged('stateCounty', e)} value={address && address.stateCounty} />\n )}\n \n
\n \n ) : ''}\n {(address && address.country && address.country.indexOf('USA') !== -1) ? (\n \n \n \n \n * \n \n keyChanged('townCity', e)} value={address && address.townCity} />\n
\n \n \n \n * \n \n \n {(placeholder) => (\n keyChanged('stateCounty', e)} value={address && address.stateCounty} />\n )}\n \n
\n \n ) : ''}\n {address && address.country === 'Canada' && (\n \n \n \n \n \n \n {(placeholder) => (\n keyChanged('address3', e)}\n value={address && address.address3}\n />\n )}\n \n
\n \n \n \n \n \n {(placeholder) => (\n keyChanged('address4', e)}\n value={address && address.address4}\n />\n )}\n \n
\n \n \n \n \n keyChanged('townCity', e)} value={address && address.townCity} />\n
\n \n \n \n \n \n {(placeholder) => (\n keyChanged('stateCounty', e)} value={address && address.stateCounty} />\n )}\n \n
\n \n \n \n * \n \n keyChanged('postcode', e)} value={address && address.postcode} />\n
\n \n )}\n {(address && address.country && address.country.indexOf('USA') !== -1) && (\n \n \n \n * \n \n keyChanged('postcode', e)} value={address && address.postcode} />\n
\n )}\n\n {(address && address.country && address.country.indexOf('USA') === -1) && (address && address.country !== 'Canada') && (\n \n \n \n \n keyChanged('postcode', e)} value={address && address.postcode} />\n
\n )}\n \n \n {program?.customField1 && Object.keys(program?.customField1).length > 0 && (\n \n \n {program?.customField1}\n \n customKeyChanged('customField1', e)} value={address && address.customField1?.[1]} />\n
\n )}\n {program?.customField2 && Object.keys(program?.customField2).length > 0 && (\n \n \n {program?.customField2}\n \n customKeyChanged('customField2', e)} value={address && address.customField2?.[1]} />\n
\n )}\n \n\n \n );\n}\n\nconst mapStateToProps = (state) => ({\n cart: state.cart,\n region: state.region,\n locale: state.locale,\n});\n\nconst mapDispatchToProps = {\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(ShopPageCheckoutAddress);\n","// react\nimport React, { Component } from 'react';\nimport { FormattedMessage } from 'react-intl';\n\n// third-party\nimport { connect } from 'react-redux';\nimport { Helmet } from 'react-helmet-async';\nimport { Link, Redirect, withRouter } from 'react-router-dom';\n\n// application\nimport Points from '../shared/Points';\nimport PageHeader from '../shared/PageHeader';\nimport { Check9x7Svg } from '../../svg';\n\n// data stubs\nimport UserContext from '../../contexts/UserContext';\nimport ProgramContext from '../../contexts/ProgramContext';\nimport userApi from '../../server/real/endpoints/users';\nimport { getProductPrice, selectedLanguage } from '../../server/utils';\n// import orderApi from '../../server/real/endpoints/orders';\nimport ShopPageCheckoutAddress from './ShopPageCheckoutAddress';\n\nclass ShopPageCheckout extends Component {\n constructor(props) {\n super(props);\n this.state = {\n aggrementCheckBox: false,\n isSubmitted: false,\n isValid: false,\n };\n }\n\n componentDidUpdate() {\n\n }\n\n checkBox = (e) => {\n this.setState({ aggrementCheckBox: e.target.checked });\n };\n\n grandTotal = () => {\n const { cart, region } = this.props;\n let grandTotal = 0;\n cart.items.map((item) => {\n const unitPrice = getProductPrice(item.product, item.option, region);\n const totalPrice = unitPrice * item.quantity;\n grandTotal += totalPrice;\n return grandTotal;\n });\n return grandTotal;\n };\n\n isDisabled = (user) => {\n const { program } = this.props;\n const { isSubmitted, aggrementCheckBox, isValid } = this.state;\n if (isSubmitted) {\n return true;\n }\n if (!isValid) {\n return true;\n }\n if (!aggrementCheckBox) {\n return true;\n }\n if (program.type === 'points') {\n if (user.balance < this.grandTotal()) {\n return true;\n }\n }\n return false;\n }\n\n addressHandling = (user, e) => {\n const id = e.target.value;\n const address = userApi.getAddress(user, id);\n this.setState({ defaultAddress: address });\n };\n\n keyChanged = (key, e) => {\n const { defaultAddress } = this.state;\n defaultAddress[key] = e.target.value;\n this.setState({ defaultAddress });\n };\n\n renderTotals() {\n const { program } = this.props;\n\n return (\n \n {program && program.type === 'points' && (\n \n )}\n\n \n );\n }\n\n renderCart() {\n const {\n cart, program, region, locale,\n } = this.props;\n function equalizeLang (langData) {\n if (langData === 'sp') {\n return 'es'\n }\n if (langData === 'ge') {\n return 'de'\n }\n return langData\n }\n const goToShop = () => {\n program?.checkoutSelectDifferentProductRedirectHome ? window.location.href = '/' : window.location.href = '/shop';\n };\n console.log(cart);\n let grandTotal = 0;\n const items = cart.items.map((item) => {\n const unitPrice = getProductPrice(item.product, item.option, region);\n const totalPrice = unitPrice * item.quantity;\n grandTotal += totalPrice;\n return (\n \n \n {`${selectedLanguage(item.product, equalizeLang(locale), item.product.productName, 'name')} × ${item.quantity}`}\n\n {item.option && item.option.optionColorValue && ({`Color: ${item.option.optionColorValue}`} )}\n {item.option && item.option.optionSizeValue && ({`Size: ${item.option.optionSizeValue}`} )}\n {item.option && item.option.optionCustom1Value && ({`${item.product.optionsCustom1Label}: ${item.option.optionCustom1Value}`} )}\n {item.option && item.option.optionCustom2Value && ({`${item.product.optionsCustom2Label}: ${item.option.optionCustom2Value}`} )}\n {item.option && item.option.optionCustom3Value && ({`${item.product.optionsCustom3Label}: ${item.option.optionCustom3Value}`} )}\n \n {program && program.type === 'points' && ( )} \n \n );\n });\n\n return (\n \n \n \n \n \n \n {program && program.type === 'points' && ('Total')} \n \n \n \n {items}\n \n {program.type !== 'points' && (\n \n \n \n)}\n \n \n \n \n \n \n {this.renderTotals()}\n {program && program.type === 'points' && (\n \n \n \n \n \n \n \n \n )}\n\n
\n );\n }\n\n render() {\n const { defaultAddress } = this.state;\n const { cart, history } = this.props;\n if (cart.items.length < 1) {\n return ;\n }\n const breadcrumb = [\n { title: 'Home', url: '' },\n { title: 'Shop', url: '/shop' },\n { title: 'Shopping Cart', url: '/shop/cart' },\n { title: 'Checkout', url: '' },\n ];\n\n const breadcrumbPlateau = [\n { title: 'Home', url: '' },\n { title: 'Shop', url: '/shop' },\n { title: 'Checkout', url: '' },\n ];\n return (\n \n {(context) => {\n const { program } = context;\n return (\n \n {(userContext) => {\n const { user } = userContext;\n let address = { ...defaultAddress };\n if (address && Object.keys(address).length === 0 && address.constructor === Object && user.addresses.length > 0) [address] = user.addresses;\n return (\n \n\n \n {program && ({`Checkout — ${program.fullName}`} )}\n \n \n \n
\n
\n\n
\n
\n
\n\n {user && (\n { this.setState({ address: data, isValid: valid, claimEmail: mail }); }} />\n )}\n
\n
\n
\n\n
\n
\n
\n
\n\n {this.renderCart(user)}\n\n
\n
\n \n \n \n \n \n \n \n \n \n {' '}\n \n *\n \n
\n
\n
{\n this.setState({ isSubmitted: true }, function () {\n const { address, claimEmail } = this.state;\n const data = { ...cart };\n data.shippingAddress = address;\n data.claimEmail = claimEmail;\n let grandTotal = 0;\n const { region } = this.props;\n for (let i = 0; i < cart.items.length; i += 1) {\n const unitPrice = getProductPrice(cart.items[i].product, cart.items[i].option, region);\n const totalPrice = unitPrice * cart.items[i].quantity;\n cart.items[i].total = totalPrice;\n cart.items[i].price = unitPrice;\n grandTotal += totalPrice;\n }\n data.total = grandTotal;\n data.region = region;\n localStorage.setItem('summary_data', JSON.stringify(data));\n history.push('/shop/checkout/summary');\n\n // orderApi.placeOrder(data)\n // .then((response) => response.json())\n // .then((response) => {\n // if (response.success) {\n // window.location = `/shop/checkout/success/${response.id}`;\n // }\n // });\n });\n }}\n type=\"button\"\n disabled={this.isDisabled(user)}\n className=\"btn btn-primary btn-xl btn-block\"\n >\n \n \n
\n
\n
\n
\n
\n
\n \n );\n }}\n \n );\n }}\n \n );\n }\n}\n\nconst mapStateToProps = (state) => ({\n cart: state.cart,\n region: state.region,\n locale: state.locale,\n});\n\nconst mapDispatchToProps = {};\n\nexport default withRouter(connect(mapStateToProps, mapDispatchToProps)(ShopPageCheckout));\n\nShopPageCheckout.contextType = UserContext;\n","export const SIDEBAR_OPEN = 'SIDEBAR_OPEN';\nexport const SIDEBAR_CLOSE = 'SIDEBAR_CLOSE';\n","import { SIDEBAR_CLOSE, SIDEBAR_OPEN } from './sidebarActionTypes';\n\nconst initialState = {\n open: false,\n};\n\nexport default function sidebarReducer(state = initialState, action) {\n switch (action.type) {\n case SIDEBAR_OPEN:\n return {\n ...state,\n open: true,\n };\n case SIDEBAR_CLOSE:\n return {\n ...state,\n open: false,\n };\n default:\n return state;\n }\n}\n","import { SIDEBAR_CLOSE, SIDEBAR_OPEN } from './sidebarActionTypes';\n\nexport function sidebarOpen() {\n return { type: SIDEBAR_OPEN };\n}\n\nexport function sidebarClose() {\n return { type: SIDEBAR_CLOSE };\n}\n","import sidebarReducer from './sidebarReducer';\n\nexport * from './sidebarActions';\nexport default sidebarReducer;\n","// react\nimport React, { useEffect, useRef } from 'react';\nimport { FormattedMessage } from 'react-intl';\n// third-party\nimport classNames from 'classnames';\nimport PropTypes from 'prop-types';\nimport { connect } from 'react-redux';\n\n// application\nimport { Cross20Svg } from '../../svg';\nimport { sidebarClose } from '../../store/sidebar';\n\nfunction CategorySidebar(props) {\n const {\n children,\n sidebarClose,\n sidebarState,\n offcanvas,\n } = props;\n\n const classes = classNames('block block-sidebar', {\n 'block-sidebar--open': sidebarState.open,\n 'block-sidebar--offcanvas--always': offcanvas === 'always',\n 'block-sidebar--offcanvas--mobile': offcanvas === 'mobile',\n });\n\n const backdropRef = useRef(null);\n const bodyRef = useRef(null);\n useEffect(() => {\n const media = matchMedia('(max-width: 991px)');\n let changedByMedia = false;\n\n const onChange = () => {\n if (offcanvas === 'mobile') {\n if (sidebarState.open && !media.matches) {\n sidebarClose();\n }\n // this is necessary to avoid the transition hiding the sidebar\n if (!sidebarState.open && media.matches && changedByMedia) {\n /** @var {HTMLElement} */\n const backdrop = backdropRef.current;\n /** @var {HTMLElement} */\n const body = bodyRef.current;\n\n backdrop.style.transition = 'none';\n body.style.transition = 'none';\n\n backdrop.getBoundingClientRect(); // force reflow\n\n backdrop.style.transition = '';\n body.style.transition = '';\n }\n }\n };\n\n if (media.addEventListener) {\n media.addEventListener('change', onChange);\n } else {\n media.addListener(onChange);\n }\n\n onChange();\n\n changedByMedia = true;\n\n return () => {\n if (media.removeEventListener) {\n media.removeEventListener('change', onChange);\n } else {\n media.removeListener(onChange);\n }\n };\n }, [offcanvas, sidebarState.open, sidebarClose]);\n\n useEffect(() => {\n if (sidebarState.open) {\n const width = document.body.clientWidth;\n\n document.body.style.overflow = 'hidden';\n document.body.style.paddingRight = `${document.body.clientWidth - width}px`;\n } else {\n document.body.style.overflow = '';\n document.body.style.paddingRight = '';\n }\n }, [sidebarState.open]);\n\n return (\n \n {/* eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions */}\n
sidebarClose()} />\n
\n
\n
\n
sidebarClose()}>\n \n \n
\n {children}\n
\n
\n );\n}\n\nCategorySidebar.propTypes = {\n /**\n * indicates when sidebar bar should be off canvas\n */\n offcanvas: PropTypes.oneOf(['always', 'mobile']),\n};\n\nCategorySidebar.defaultProps = {\n offcanvas: 'mobile',\n};\n\nconst mapStateToProps = (state) => ({\n sidebarState: state.sidebar,\n});\n\nconst mapDispatchToProps = {\n sidebarClose,\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(CategorySidebar);\n","// react\nimport React from 'react';\n\n// third-party\nimport classNames from 'classnames';\n\nexport default function CategorySidebarItem(props) {\n const { children, className } = props;\n const classes = classNames('block-sidebar__item', className);\n\n return (\n
\n {children}\n
\n );\n}\n","// react\nimport React, { Component } from 'react';\nimport { FormattedMessage } from 'react-intl';\n// third-party\nimport classNames from 'classnames';\nimport PropTypes from 'prop-types';\n\n// application\nimport { ArrowRoundedLeft8x13Svg, ArrowRoundedRight8x13Svg } from '../../svg';\n\nclass Pagination extends Component {\n setPage = (value) => {\n const { total, current, onPageChange } = this.props;\n\n if (value < 1 || value > total || value === current) {\n return;\n }\n\n if (onPageChange) {\n onPageChange(value);\n }\n };\n\n getPages() {\n const { siblings, current, total } = this.props;\n const pages = [];\n const min = Math.max(1, current - siblings - Math.max(0, siblings - total + current));\n const max = Math.min(total, min + siblings * 2);\n\n for (let i = min; i <= max; i += 1) {\n pages.push(i);\n }\n\n return pages;\n }\n\n render() {\n const { current, total } = this.props;\n const firstLinkClasses = classNames('page-item', {\n disabled: current <= 1,\n });\n const lastLinkClasses = classNames('page-item', {\n disabled: current >= total,\n });\n\n const pages = this.getPages().map((page, index) => {\n const classes = classNames('page-item', {\n active: page === current,\n });\n\n return (\n
\n this.setPage(page)}>\n {page}\n {page === current && }\n \n \n );\n });\n\n return (\n
\n \n this.setPage(1)}\n >\n \n \n \n \n \n this.setPage(current - 1)}\n >\n \n \n \n {pages}\n \n this.setPage(current + 1)}\n >\n \n \n \n \n this.setPage(total)}\n >\n \n \n \n \n \n );\n }\n}\n\nPagination.propTypes = {\n /**\n * the number of sibling links\n */\n siblings: PropTypes.number,\n /**\n * current page number\n */\n current: PropTypes.number,\n /**\n * total pages\n */\n total: PropTypes.number,\n /**\n * total pages\n */\n onPageChange: PropTypes.func,\n};\n\nPagination.defaultProps = {\n siblings: 1,\n current: 1,\n total: 1,\n};\n\nexport default Pagination;\n","// react\nimport React, {\n useCallback, useState, useContext,\n} from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { useHistory } from 'react-router-dom';\n\n// third-party\nimport classNames from 'classnames';\nimport PropTypes from 'prop-types';\nimport { connect } from 'react-redux';\n\n// application\nimport Pagination from '../shared/Pagination';\nimport ProductCard from '../shared/ProductCard';\nimport {\n Filters16Svg,\n LayoutGrid16x16Svg,\n LayoutGridWithDetails16x16Svg,\n LayoutList16x16Svg,\n} from '../../svg';\nimport { sidebarOpen } from '../../store/sidebar';\nimport ProgramContext from '../../contexts/ProgramContext';\n\nfunction ProductsView(props) {\n const {\n isLoading,\n productsList,\n options,\n filters,\n dispatch,\n layout: propsLayout,\n grid,\n offcanvas,\n sidebarOpen,\n onOptionChanged,\n resetFilters,\n } = props;\n const [layout, setLayout] = useState(propsLayout);\n const history = useHistory();\n const lang = JSON.parse(localStorage.getItem('state'))?.locale\n const handleResetFilters = useCallback(() => {\n resetFilters();\n if (window.location.href.indexOf('/shop/catalog/') !== -1) {\n history.push('/shop/catalog');\n }\n }, [dispatch]);\n const toTop = () => {\n try {\n window.scrollTo({ top: 0, left: 0, behavior: 'smooth' });\n } catch {\n window.scrollTo(0, 0);\n }\n };\n const toPageOne = (pageData) => {\n onOptionChanged('page', pageData);\n toTop();\n };\n const resetPage = (e) => {\n onOptionChanged('limit', e.target.value);\n };\n const filtersCount = Object.keys(filters).map((x) => filters[x]).filter((x) => x).length;\n const { program } = useContext(ProgramContext);\n const { theme } = program;\n let viewModes = [];\n if (program && program.permissions && program.permissions.allowUserGrid) {\n viewModes = [{ key: 'grid', title: 'Grid', icon:
},\n { key: 'list', title: 'List', icon:
},\n { key: 'long', title: 'Grid With Features', icon:
}];\n } else if (theme && theme.theme !== undefined) {\n if (theme.gridType === 'grid') {\n viewModes = [{ key: 'grid', title: 'Grid', icon:
}];\n } else if (theme.gridType === 'list') {\n viewModes = [{ key: 'list', title: 'List', icon:
}];\n } else if (theme.gridType === 'long') {\n viewModes = [{ key: 'long', title: 'Grid With Features', icon:
}];\n }\n }\n\n viewModes = viewModes.map((viewMode) => {\n const className = classNames('layout-switcher__button', {\n 'layout-switcher__button--active': layout === viewMode.key,\n });\n\n return (\n
setLayout(viewMode.key)}\n >\n {viewMode.icon}\n \n );\n });\n const productsListItems = productsList.items.map((product) => (\n
\n ));\n\n const rootClasses = classNames('products-view', {\n 'products-view--loading': isLoading,\n });\n\n const viewOptionsClasses = classNames('view-options', {\n 'view-options--offcanvas--always': offcanvas === 'always',\n 'view-options--offcanvas--mobile': offcanvas === 'mobile',\n });\n\n let divs;\n\n const findSortNames = (sortName) => {\n if (sortName === 'name_asc') {\n return 'Product (A-Z)'\n }\n if (sortName === 'name_desc') {\n return 'Product (Z-A)'\n }\n if (sortName === 'brand_asc') {\n return 'Brand (A-Z)'\n }\n if (sortName === 'brand_desc') {\n return 'Brand (Z-A)'\n }\n if (sortName === 'price_asc') {\n return 'Points Low to High'\n }\n if (sortName === 'price_desc') {\n return 'Points High to Low'\n }\n }\n\n const showingFunctoLang = () => {\n if (lang) {\n if (lang === 'sp') {\n return `Mostrar ${productsList?.from + 1}—${productsList?.to > productsList?.total ? productsList?.total : productsList?.to} de ${productsList?.total} productos`\n }\n if (lang === 'fr') {\n return `Montrant ${productsList?.from + 1}—${productsList?.to > productsList?.total ? productsList?.total : productsList?.to} des ${productsList?.total} produits`\n }\n if (lang === 'ge') {\n return `${productsList?.from + 1}—${productsList?.to > productsList?.total ? productsList?.total : productsList?.to} von ${productsList?.total} Produkten zeigen`\n }\n if (lang === 'it') {\n return `Mostrare ${productsList?.from + 1}—${productsList?.to > productsList?.total ? productsList?.total : productsList?.to} di ${productsList?.total} prodotti`\n }\n if (lang === 'nl') {\n return `Met ${productsList?.from + 1}—${productsList?.to > productsList?.total ? productsList?.total : productsList?.to} van ${productsList?.total} producten`\n }\n if (lang === 'pt') {\n return `Mostrando ${productsList?.from + 1}—${productsList?.to > productsList?.total ? productsList?.total : productsList?.to} de ${productsList?.total} produtos`\n }\n if (lang === 'en') {\n return `Showing ${productsList?.from + 1}—${productsList?.to > productsList?.total ? productsList?.total : productsList?.to} of ${productsList?.total} products`\n }\n } else {\n return `Showing ${productsList?.from + 1}—${productsList?.to > productsList?.total ? productsList?.total : productsList?.to} of ${productsList?.total} products`\n }\n }\n showingFunctoLang()\n if (productsListItems.length > 0) {\n divs = (\n
\n
\n
\n {program && (program.permissions.showBrands || program.permissions.showCategories || program.permissions.showPriceSlider || program.permissions.showTags)\n && (\n
\n dispatch(sidebarOpen())}>\n \n \n {!!filtersCount && {filtersCount} }\n \n
\n )}\n
\n
\n {showingFunctoLang()}\n
\n
\n
\n
\n \n \n
\n { onOptionChanged('sort', e.target.value); }}\n >\n Brand (A-Z) \n {program.permissions?.sortOrder?.length > 0 ? program.permissions?.sortOrder?.map((sort) => {\n return (\n {findSortNames(sort)} \n )\n }) : <>\n Product (A-Z) \n Product (Z-A) \n Brand (A-Z) \n Brand (Z-A) >}\n {/* Product (A-Z) \n Product (Z-A) \n Brand (A-Z) \n Brand (Z-A) */}\n {program && program.permissions?.sortOrder?.length === 0 && program.type === 'points'\n && (\n \n Points Low to High \n Points High to Low \n \n )}\n \n
\n
\n {program && program.permissions && program.permissions.productCounts.length > 0 && (\n
\n
\n
\n {\n resetPage(e);\n toPageOne(1);\n }}\n >\n {program && program.permissions && program.permissions.productCounts.length > 0 ? program && program.permissions && program.permissions.productCounts.map((data, index) => {data} )\n : (\n \n 100 \n \n )}\n \n
\n
\n )}\n
\n
\n\n
\n
\n {productsListItems}\n
\n
\n\n
\n
{ toPageOne(e); }}\n />\n \n
\n );\n } else {\n divs = (\n
\n );\n }\n\n return (\n
\n );\n}\n\nProductsView.propTypes = {\n /**\n * Indicates that products is loading.\n */\n isLoading: PropTypes.bool,\n /**\n * ProductsList object.\n */\n productsList: PropTypes.object,\n /**\n * Products list options.\n */\n options: PropTypes.object,\n /**\n * Products list filters.\n */\n filters: PropTypes.object,\n /**\n * Category page dispatcher.\n */\n dispatch: PropTypes.func,\n /**\n * products list layout (default: 'grid')\n * one of ['grid', 'grid-with-features', 'list']\n */\n layout: PropTypes.oneOf(['grid', 'long', 'list']),\n /**\n * products list layout (default: 'grid')\n * one of ['grid-3-sidebar', 'grid-4-full', 'grid-5-full']\n */\n grid: PropTypes.oneOf(['grid-3-sidebar', 'grid-4-full', 'grid-5-full']),\n /**\n * indicates when sidebar should be off canvas\n */\n offcanvas: PropTypes.oneOf(['always', 'mobile']),\n};\n\nProductsView.defaultProps = {\n layout: 'grid',\n grid: 'grid-3-sidebar',\n offcanvas: 'mobile',\n};\n\nconst mapStateToProps = (state) => ({\n sidebarOpen,\n locale: state.locale,\n});\n\nexport default connect(mapStateToProps)(ProductsView);\n","/* eslint-disable no-unused-vars */\nimport getApi from './api';\nimport { GetAPIEndpoint } from '../../configuration';\n\nfunction getHeaders() {\n const Authorization = `Bearer ${localStorage.getItem('access_token') ?? sessionStorage.getItem('access_token')}`;\n return { Authorization };\n}\nconst categoryApi = {\n getLangCategories: () => getApi().get(`${GetAPIEndpoint()}/api/categories`, { headers: getHeaders() }).then((data) => {\n return data.data\n }),\n getCategories: (options = {}) => getApi().get(`${GetAPIEndpoint()}/api/categories`, { headers: getHeaders() }).then((data) => {\n const [categoriesTreeData, categoriesListData] = categoryApi.walkTree(data.data);\n return Promise.resolve(\n categoriesTreeData.map((x) => categoryApi.prepareCategory(x, options.depth)),\n );\n }),\n getCategoryBySlug: (slug, options = {}) => getApi().get(`${GetAPIEndpoint()}/api/categories`, { headers: getHeaders() }).then((data) => {\n const [categoriesTreeData, categoriesListData] = categoryApi.walkTree(data.data);\n const category = categoriesListData.find((x) => x.slug === slug);\n return category ? Promise.resolve(categoryApi.prepareCategory(category, options.depth)) : Promise.reject();\n }),\n\n prepareCategory(category, depth) {\n let children;\n\n if (depth && depth > 0) {\n children = category.children.map((x) => categoryApi.prepareCategory(x, depth - 1));\n }\n\n return JSON.parse(JSON.stringify({\n ...category,\n parent: category.parent ? categoryApi.prepareCategory(category.parent) : null,\n children,\n }));\n },\n walkTree(defs, parent = null) {\n let list = [];\n const tree = defs.map((def) => {\n const category = {\n id: def.id,\n name: def.name,\n slug: def.slug,\n image: def.image || null,\n items: def.items || 0,\n customFields: {},\n parent,\n children: [],\n };\n\n const [childrenTree, childrenList] = categoryApi.walkTree(def.children || [], category);\n\n category.children = childrenTree;\n list = [...list, category, ...childrenList];\n\n return category;\n });\n\n return [tree, list];\n },\n};\n\nexport default categoryApi;\n","// react\nimport React, { Fragment, useContext } from 'react';\nimport { FormattedMessage } from 'react-intl';\n\n// third-party\nimport classNames from 'classnames';\nimport PropTypes from 'prop-types';\nimport { Link , useHistory , useLocation } from 'react-router-dom';\n\n// application\nimport { ArrowRoundedLeft6x9Svg } from '../../svg';\nimport { getCategoryParents, url } from '../../services/utils';\nimport CategoriesContext from '../../contexts/CategoriesContext';\n\nfunction FilterCategory(props) {\n const { data } = props;\n const lang = JSON.parse(localStorage.getItem('state'))?.locale\n const { getCateogryLanguage } = useContext(CategoriesContext)\n\n const history = useHistory();\n const location = useLocation();\n\n const handleClick = (category) => {\n history.push(`${category}${window.location.search}`);\n };\n\n console.log(window.location.search)\n\n const categoriesList = data.items.map((category) => {\n const itemClasses = classNames('filter-categories__item', {\n 'filter-categories__item--current': data.value === category.slug,\n });\n\n return (\n
\n {getCategoryParents(category).map((parent) => (\n \n \n handleClick(url.category(parent))}>{getCateogryLanguage(lang, parent.name)} \n \n ))}\n \n handleClick(url.category(category))}>{getCateogryLanguage(lang ,category.name)} \n \n {category.children && category.children.map((child) => (\n \n handleClick(url.category(child))}>{getCateogryLanguage(lang ,child.name)} \n \n ))}\n \n );\n });\n\n if (data.value) {\n categoriesList.unshift(\n
\n \n handleClick('/shop/catalog')}> \n ,\n );\n }\n\n return (\n
\n );\n}\n\nFilterCategory.propTypes = {\n /**\n * Filter object.\n */\n data: PropTypes.object,\n};\n\nexport default FilterCategory;\n","/* eslint-disable no-nested-ternary */\n// react\nimport React, { useState } from 'react';\n\n// third-party\nimport { FormattedMessage } from 'react-intl';\nimport classNames from 'classnames';\nimport PropTypes from 'prop-types';\n\n// application\nimport { Check9x7Svg } from '../../svg';\n\nfunction FilterCheck(props) {\n const [showCount, setShowCount] = useState(15);\n const [showText, setShowText] = useState(
);\n\n const HandleShow = () => {\n setShowCount(showCount === 15 ? 1000 : 15);\n setShowText(showText === 'All Brands' ? :
);\n };\n\n const { data, value, onChangeValue } = props;\n\n const updateValue = (newValue) => {\n onChangeValue({ filter: data, value: newValue });\n };\n\n const handleChange = (event) => {\n if (event.target.checked && !value.includes(event.target.value)) {\n updateValue([...value, event.target.value]);\n }\n if (!event.target.checked && value.includes(event.target.value)) {\n updateValue(value.filter((x) => x !== event.target.value));\n }\n };\n\n const itemsList = data.items.sort((b, a) => a.count - b.count).slice(0, showCount).sort((a, b) => {\n const textA = a.name;\n const textB = b.name;\n return (textA < textB) ? -1 : (textA > textB) ? 1 : 0;\n}).map((item) => {\n let count;\n const name =
{item.name} ;\n\n const itemClasses = classNames('filter-list__item', {\n 'filter-list__item--disabled': item.count === 0,\n });\n\n return (\n
\n \n \n \n \n \n \n \n {name}\n {count}\n \n );\n });\n\n return (\n
\n
\n {itemsList}\n
\n {itemsList && itemsList.length > 14 && (\n
\n {showText} \n
\n )}\n
\n );\n}\n\nFilterCheck.propTypes = {\n /**\n * Filter object.\n */\n data: PropTypes.object,\n /**\n * Value.\n */\n value: PropTypes.arrayOf(PropTypes.string),\n /**\n * Change value callback.\n */\n onChangeValue: PropTypes.func,\n};\n\nexport default FilterCheck;\n","/* eslint-disable jsx-a11y/label-has-associated-control */\n// react\nimport React, {\n useCallback,\n useEffect,\n useMemo,\n useState,\n useContext,\n} from 'react';\n\n// third-party\nimport InputRange from 'react-input-range';\nimport PropTypes from 'prop-types';\nimport { connect } from 'react-redux';\nimport { Check9x7Svg } from '../../svg';\n\n// application\nimport Points from '../shared/Points';\nimport UserContext from '../../contexts/UserContext';\n\nfunction getFirstValidValue(...values) {\n return values.reduce((acc, value) => (\n acc === null && (value || value === 0)\n ? value\n : acc\n ), null);\n}\n\nfunction FilterRange(props) {\n const {\n data,\n value,\n onChangeValue,\n checkbox,\n getCheckBox,\n } = props;\n const direction = 'ltr';\n const [propsFrom, propsTo] = value || [];\n const [timer, setTimer] = useState(null);\n const [state, setState] = useState([propsFrom, propsTo]);\n const [stateFrom, stateTo] = state;\n const { user } = useContext(UserContext);\n let { min, max } = data;\n let from = Math.max(getFirstValidValue(stateFrom, propsFrom, min), min);\n let to = Math.min(getFirstValidValue(stateTo, propsTo, max), max);\n let fromLabel = from;\n let toLabel = to;\n // since react-input-range does not support RTL direction,\n // we just need to invert and swipe values\n if (direction === 'rtl') {\n [from, to] = [to * -1, from * -1];\n [min, max] = [max * -1, min * -1];\n [fromLabel, toLabel] = [from * -1, to * -1];\n }\n // Update state from props.\n\n useEffect(() => {\n setState([propsFrom, propsTo]);\n }, [propsFrom, propsTo]);\n\n // Clear previous timer.\n useEffect(() => () => {\n clearTimeout(timer);\n }, [timer]);\n\n const limitMax = () => {\n getCheckBox(!checkbox);\n };\n\n const handleChange = useCallback((newValue) => {\n let { min: newFrom, max: newTo } = newValue;\n\n // This is needed to fix a bug in react-input-range.\n [newFrom, newTo] = [Math.max(newFrom, min), Math.min(newTo, max)];\n\n // since react-input-range does not support RTL direction,\n // we just need to invert and swipe values\n if (direction === 'rtl') {\n [newFrom, newTo] = [newTo * -1, newFrom * -1];\n }\n\n setState([newFrom, newTo]);\n\n if (onChangeValue) {\n setTimer(setTimeout(() => {\n onChangeValue({ filter: data, value: [newFrom, newTo] });\n }, 250));\n }\n }, [min, max, data, onChangeValue, direction, setTimer, setState, checkbox]);\n\n useEffect(() => {\n if (checkbox) {\n handleChange({ min: from, max: user.balance });\n }\n }, [checkbox]);\n\n return useMemo(() => (\n
\n
\n \n
\n
\n { handleChange({ min: e.target.value, max: to }); }}\n />\n { handleChange({ min: from, max: checkbox ? user.balance : e.target.value }); }}\n />\n
\n
\n Show for my points\n \n \n \n { handleChange({ min: from, max: checkbox ? user.balance : to }); }}\n />\n \n \n \n \n \n
\n Value:\n {' '}\n
\n {' – '}\n
\n
\n
\n ), [min, max, from, to, fromLabel, toLabel, handleChange]);\n}\n\nFilterRange.propTypes = {\n /**\n * Filter object.\n */\n data: PropTypes.object,\n /**\n * Value.\n */\n value: PropTypes.arrayOf(PropTypes.number),\n /**\n * Change value callback.\n */\n onChangeValue: PropTypes.func,\n /**\n * Current locale.\n */\n locale: PropTypes.string,\n};\n\nconst mapStateToProps = (state) => ({\n locale: state.locale,\n});\n\nexport default connect(mapStateToProps)(FilterRange);\n","const CheckFilterHandler = {\n type: 'check',\n serialize: (value) => value.join(','),\n deserialize: (value) => (value ? value.split(',') : []),\n isDefaultValue: (filter, value) => value.length === 0,\n getDefaultValue: () => [],\n};\n\nconst ColorFilterHandler = {\n type: 'color',\n serialize: (value) => value.join(','),\n deserialize: (value) => (value ? value.split(',') : []),\n isDefaultValue: (filter, value) => value.length === 0,\n getDefaultValue: () => [],\n};\n\nconst RadioFilterHandler = {\n type: 'radio',\n serialize: (value) => value,\n deserialize: (value) => value,\n isDefaultValue: (filter, value) => RadioFilterHandler.getDefaultValue(filter) === value,\n getDefaultValue: (filter) => filter.items[0].slug,\n};\n\nconst RangeFilterHandler = {\n type: 'range',\n serialize: (value) => value.join('-'),\n deserialize: (value) => (value ? value.split('-').map(parseFloat) : undefined),\n isDefaultValue: (filter, value) => filter.min === value[0] && filter.max === value[1],\n getDefaultValue: (filter) => [filter.min, filter.max],\n};\n\nconst handlers = [\n CheckFilterHandler,\n ColorFilterHandler,\n RadioFilterHandler,\n RangeFilterHandler,\n];\n\nexport default function getFilterHandler(filter) {\n return handlers.find((x) => x.type === filter.type);\n}\n","// react\nimport React, { useCallback, useState } from 'react';\nimport { useHistory } from 'react-router-dom';\n\n// third-party\nimport classNames from 'classnames';\nimport PropTypes from 'prop-types';\n\n// application\nimport Collapse from '../shared/Collapse';\nimport FilterCategory from '../filters/FilterCategory';\nimport FilterCheck from '../filters/FilterCheck';\nimport FilterRange from '../filters/FilterRange';\nimport { FormattedMessage } from 'react-intl';\nimport getFilterHandler from '../../services/filters';\nimport { ArrowRoundedDown12x7Svg } from '../../svg';\n\nconst filterComponents = {\n category: FilterCategory,\n range: FilterRange,\n check: FilterCheck,\n\n};\n\nfunction WidgetFilters(props) {\n const {\n dispatch,\n values,\n title,\n offcanvas,\n filters,\n } = props;\n\n const history = useHistory();\n const [checkbox, setCheckbox] = useState();\n// const [chipData, setChipData] = useState([]);\n\n const getCheckBox = (data) => {\n setCheckbox(data);\n };\n\n const handleValueChange = useCallback(({ filter, value }) => {\n const handler = getFilterHandler(filter);\n\n if (handler) {\n dispatch({\n type: 'SET_FILTER_VALUE',\n filter: filter.slug,\n value: handler.isDefaultValue(filter, value) ? undefined : handler.serialize(value),\n });\n }\n }, [dispatch]);\n const handleResetFilters = () => {\n dispatch({ type: 'RESET_FILTERS' });\n setCheckbox(false);\n if (window.location.href.indexOf('/shop/catalog/') !== -1) {\n history.push('/shop/catalog');\n }\n };\n\n const brandChips = [];\n let brandFilter;\n\n const filtersList = filters.map((filter) => {\n let filterView;\n let { value } = filter;\n const handler = getFilterHandler(filter);\n\n if (handler && filter.slug in values) {\n value = handler.deserialize(values[filter.slug]) || handler.getDefaultValue(filter);\n if (filter.slug === 'brand') {\n brandChips.push(...value);\n brandFilter = filter;\n }\n }\n\n const FilterComponent = filterComponents[filter.type];\n\n if (FilterComponent) {\n filterView = (\n
{ getCheckBox(data); }}\n checkbox={checkbox}\n data={filter}\n value={value}\n onChangeValue={handleValueChange}\n />\n );\n }\n\n return (\n filter && filter.permission && (\n \n
\n
\n {filter.name === 'Brands' ? : filter.name === 'Categories' ? : filter.name }\n \n \n
\n
\n
\n)}\n />\n );\n });\n\n const classes = classNames('widget-filters widget', {\n 'widget-filters--offcanvas--always': offcanvas === 'always',\n 'widget-filters--offcanvas--mobile': offcanvas === 'mobile',\n });\n\n const chipDataHandler = (index) => {\n const chipCopy = { value: brandChips, filter: brandFilter };\n chipCopy.value.splice(index, 1);\n handleValueChange(chipCopy);\n };\n\n return (\n \n
\n
\n \n
\n {brandChips.map((brand, index) => (\n
\n
\n {brand} \n chipDataHandler(index)} />\n
\n
\n ))}\n\n
\n
\n \n \n \n
\n
\n {filtersList}\n
\n {/*
\n
\n Reset\n */}\n
\n );\n}\n\nWidgetFilters.propTypes = {\n /**\n * widget title\n */\n title: PropTypes.node,\n /**\n * Category page dispatcher.\n */\n dispatch: PropTypes.func,\n /**\n * Products list filter values.\n */\n values: PropTypes.object,\n /**\n * indicates when sidebar bar should be off canvas\n */\n offcanvas: PropTypes.oneOf(['always', 'mobile']),\n};\n\nWidgetFilters.defaultProps = {\n offcanvas: 'mobile',\n};\n\nexport default WidgetFilters;\n","export default class AbstractFilterBuilder {\n slug;\n\n name;\n\n constructor(slug, name) {\n this.slug = slug;\n this.name = name;\n }\n\n // eslint-disable-next-line no-unused-vars,class-methods-use-this\n test(product) {}\n\n // eslint-disable-next-line no-unused-vars,class-methods-use-this\n makeItems(products, value) {}\n\n // eslint-disable-next-line no-unused-vars,class-methods-use-this\n calc(filters) {}\n\n // eslint-disable-next-line class-methods-use-this\n build() {}\n}\n","import AbstractFilterBuilder from './abstract';\n\nexport default class CategoryFilterBuilder extends AbstractFilterBuilder {\n value = null;\n\n items = [];\n\n // eslint-disable-next-line class-methods-use-this,no-unused-vars\n test(product) {\n if (this.value === null) {\n return true;\n }\n\n return product.categories.reduce((acc, category) => (\n acc || category === this.value\n ), false);\n }\n\n makeItems(value) {\n this.value = value || null;\n\n if (this.value) {\n this.items = [];\n } else {\n this.items = [];\n }\n }\n\n // eslint-disable-next-line class-methods-use-this\n calc() { }\n\n build() {\n return {\n type: 'category',\n slug: this.slug,\n name: this.name,\n items: this.items,\n value: this.value,\n };\n }\n}\n","import AbstractFilterBuilder from './abstract';\n\nexport default class CheckFilterBuilder extends AbstractFilterBuilder {\n items = [];\n\n value = [];\n\n test(product) {\n if (this.value.length === 0) {\n return true;\n }\n\n return this.value.reduce((result, value) => (\n result || this.extractItems(product).map((x) => x.slug).includes(value)\n ), false);\n }\n\n makeItems(value) {\n this.items = [];\n this.value = this.parseValue(value);\n }\n\n calc() {\n this.items = [];\n }\n\n build() {\n return {\n type: 'check',\n slug: this.slug,\n name: this.name,\n items: this.items,\n value: this.value,\n };\n }\n\n // eslint-disable-next-line class-methods-use-this\n parseValue(value) {\n return value ? value.split(',') : [];\n }\n\n extractItems(product) {\n if (this.slug === 'brand') {\n return product.brandName ? [{\n slug: product.brandName,\n name: product.brandName,\n count: 0,\n }] : null;\n }\n if (this.slug === 'badges') {\n const { badges } = product;\n const list = [];\n for (let i = 0; i < badges.length; i += 1) {\n list.push({\n slug: badges[i],\n name: badges[i],\n count: 0,\n });\n }\n return list;\n }\n\n throw Error();\n }\n}\n","import AbstractFilterBuilder from './abstract';\n\nexport default class RangeFilterBuilder extends AbstractFilterBuilder {\n min;\n\n max;\n\n value;\n\n test(product) {\n const value = this.extractValue(product);\n return value >= this.value[0] && value <= this.value[1];\n }\n\n // eslint-disable-next-line class-methods-use-this\n parseValue(value) {\n return value.split('-').map((x) => parseFloat(x));\n }\n\n makeItems(value) {\n this.max = 10000;\n this.min = 0;\n\n /** Calculates the number of digits for rounding. */\n let digit = Math.max(Math.ceil(this.max).toString().length - 2, 1);\n\n digit = 10 ** digit;\n\n this.max = Math.ceil(this.max / digit) * digit;\n this.min = Math.floor(this.min / digit) * digit;\n this.value = [this.min, this.max];\n\n if (value) {\n this.value = this.parseValue(value);\n }\n }\n\n // eslint-disable-next-line class-methods-use-this\n calc() { }\n\n extractValue(product) {\n if (this.slug === 'price') {\n return product.costs[0].costMSRP;\n }\n\n throw Error();\n }\n\n build() {\n return {\n type: 'range',\n slug: this.slug,\n name: this.name,\n min: this.min,\n max: this.max,\n value: this.value,\n };\n }\n}\n","// react\nimport React, {\n useEffect, useReducer, useContext, useState,\n} from 'react';\n\n// third-party\nimport PropTypes from 'prop-types';\nimport queryString from 'query-string';\nimport { connect } from 'react-redux';\nimport { Helmet } from 'react-helmet-async';\n\n// application\nimport BlockLoader from '../blocks/BlockLoader';\nimport CategorySidebar from './CategorySidebar';\nimport CategorySidebarItem from './CategorySidebarItem';\nimport PageHeader from '../shared/PageHeader';\nimport ProductsView from './ProductsView';\nimport categoryApi from '../../server/real/endpoints/categories';\nimport productApi from '../../server/real/endpoints/products';\nimport WidgetFilters from '../widgets/WidgetFilters';\nimport { sidebarClose } from '../../store/sidebar';\nimport CategoryFilterBuilder from '../../server/filters/category';\nimport CheckFilterBuilder from '../../server/filters/check';\nimport RangeFilterBuilder from '../../server/filters/price';\nimport ProgramContext from '../../contexts/ProgramContext';\nimport CategoriesContext from '../../contexts/CategoriesContext';\n\n\n// data stubs\nimport { url, getCategoryParents } from '../../services/utils';\n\nfunction parseQueryOptions(location) {\n const query = queryString.parse(location);\n const optionValues = {};\n\n if (typeof query.page === 'string') {\n optionValues.page = parseFloat(query.page);\n }\n if (typeof query.limit === 'string') {\n optionValues.limit = parseFloat(query.limit);\n }\n if (typeof query.sort === 'string') {\n optionValues.sort = query.sort;\n }\n\n return optionValues;\n}\n\nfunction parseQueryFilters(location) {\n const query = queryString.parse(location);\n const filterValues = {};\n\n Object.keys(query).forEach((param) => {\n const mr = param.match(/^filter_([-_A-Za-z0-9]+)$/);\n\n if (!mr) {\n return;\n }\n\n const filterSlug = mr[1];\n\n filterValues[filterSlug] = query[param];\n });\n\n return filterValues;\n}\n\nfunction parseQuery(location) {\n return [\n parseQueryOptions(location),\n parseQueryFilters(location),\n ];\n}\n\nfunction buildQuery(options, filters) {\n const params = {};\n\n if (options.page !== 1) {\n params.page = options.page;\n }\n\n if (options.limit !== 12) {\n params.limit = options.limit;\n }\n\n if (options.sort !== 'default') {\n params.sort = options.sort;\n }\n\n if (options.search) {\n params.search = options.search;\n }\n\n Object.keys(filters).filter((x) => x !== 'category' && !!filters[x]).forEach((filterSlug) => {\n params[`filter_${filterSlug}`] = filters[filterSlug];\n });\n\n return queryString.stringify(params, { encode: false });\n}\n\nconst initialState = {\n init: false,\n /**\n * Indicates that the category is loading.\n */\n categoryIsLoading: true,\n /**\n * Category object.\n */\n category: null,\n /**\n * Indicates that the products list is loading.\n */\n productsListIsLoading: true,\n /**\n * Products list.\n */\n productsList: null,\n /**\n * Products list options.\n *\n * options.page: number - Current page.\n * options.limit: number - Items per page.\n * options.sort: string - Sort algorithm.\n */\n options: {},\n /**\n * Products list filters.\n *\n * filters[FILTER_SLUG]: string - filter value.\n */\n filters: {},\n};\nfunction reducer(state, action) {\n switch (action.type) {\n case 'FETCH_CATEGORY_SUCCESS':\n return {\n ...state,\n init: true,\n categoryIsLoading: false,\n category: action.category,\n };\n case 'FETCH_PRODUCTS_LIST':\n return { ...state, productsListIsLoading: true };\n case 'FETCH_PRODUCTS_LIST_SUCCESS':\n return { ...state, productsListIsLoading: false, productsList: action.productsList };\n case 'SET_OPTION_VALUE':\n return {\n ...state,\n options: { ...state.options, page: 1, [action.option]: action.value },\n };\n case 'SET_FILTER_VALUE':\n return {\n ...state,\n options: { ...state.options, page: 1 },\n filters: { ...state.filters, [action.filter]: action.value },\n };\n case 'RESET_FILTERS':\n return { ...state, options: { ...state.options, page: 1 }, filters: {} };\n case 'RESET':\n return state.init ? initialState : state;\n default:\n throw new Error();\n }\n}\nfunction init(state) {\n const [options, filters] = parseQuery(window.location.search);\n return { ...state, options, filters };\n}\n\nfunction ShopPageCategory(props) {\n const { getCateogryLanguage } = useContext(CategoriesContext)\n const {\n categorySlug,\n columns,\n viewMode,\n sidebarPosition,\n } = props;\n const pageQuery = new URLSearchParams(window.location.search).get('filter_page');\n const offcanvas = columns === 3 ? 'mobile' : 'always';\n const [state, dispatch] = useReducer(reducer, initialState, init);\n const { region } = props;\n const [limit, setLimit] = useState();\n const [once, setOnce] = useState();\n const [page, setPage] = useState(pageQuery || 1);\n const [sort, setSort] = useState('default');\n const lang = JSON.parse(localStorage.getItem('state'))?.locale\n \n\n // Replace current url.\n useEffect(() => {\n const query = buildQuery(state.options, state.filters);\n const location = `${window.location.pathname}${query ? '?' : ''}${query}`;\n\n window.history.replaceState(null, '', location);\n }, [state.options, state.filters]);\n\n const resetFilters = () => {\n dispatch({ type: 'RESET_FILTERS' });\n };\n\n function insertUrlParam(key, value) {\n const url = new URL(window.location);\n url.searchParams.set(key, value);\n window.history.pushState(null, '', url.toString());\n }\n\n useEffect(() => {\n insertUrlParam('filter_page', page);\n }, [page, pageQuery]);\n\n // Load category.\n useEffect(() => {\n let request;\n let canceled = false;\n\n // dispatch({ type: 'RESET', categorySlug });\n\n if (categorySlug) {\n request = categoryApi.getCategoryBySlug(categorySlug);\n setPage(1);\n } else {\n request = Promise.resolve(null);\n }\n\n request.then((category) => {\n if (canceled) {\n return;\n }\n dispatch({ type: 'FETCH_CATEGORY_SUCCESS', category });\n });\n\n return () => {\n canceled = true;\n };\n }, [dispatch, categorySlug]);\n // Load products.\n const { program } = useContext(ProgramContext);\n\n useEffect(() => {\n if (!once) {\n if (program && program.permissions.productCounts) {\n setLimit(program.permissions.productCounts[0] || '100');\n setOnce(true);\n }\n }\n }, [program, page]);\n\n useEffect(() => {\n let canceled = false;\n if (!program || !limit) {\n return () => {\n canceled = true;\n };\n }\n\n let filters = [];\n if (program) {\n switch (program.type) {\n default:\n break;\n case 'points':\n filters = [\n new CheckFilterBuilder('badges', 'Badges'),\n new CategoryFilterBuilder('category', 'Categories'),\n new RangeFilterBuilder('price', 'Price'),\n new CheckFilterBuilder('brand', 'Brand'),\n ];\n break;\n case 'plateau':\n filters = [\n new CheckFilterBuilder('badges', 'Badges'),\n new CategoryFilterBuilder('category', 'Categories'),\n new CheckFilterBuilder('brand', 'Brand'),\n ];\n break;\n case 'claim':\n filters = [\n new CheckFilterBuilder('badges', 'Badges'),\n new CategoryFilterBuilder('category', 'Categories'),\n new CheckFilterBuilder('brand', 'Brand'),\n ];\n break;\n }\n }\n\n dispatch({ type: 'FETCH_PRODUCTS_LIST' });\n productApi.getProductsList(\n {\n ...state.options, region, limit, page, sort,\n },\n { ...state.filters, category: categorySlug }, filters,\n ).then((productsList) => {\n if (canceled) {\n return;\n }\n\n dispatch({ type: 'FETCH_PRODUCTS_LIST_SUCCESS', productsList: productsList.data });\n });\n\n return () => {\n canceled = true;\n };\n }, [categorySlug, state.options, state.filters, program, region, limit, page, sort, window.location]);\n // Load latest products.\n\n if (state.categoryIsLoading || (state.productsListIsLoading && !state.productsList)) {\n return ;\n }\n\n const breadcrumb = [\n { title: 'Home', url: url.home() },\n { title: 'Shop', url: url.catalog() },\n ];\n let pageTitle = getCateogryLanguage(lang, 'Shop');\n let content;\n\n if (state.category) {\n getCategoryParents(state.category).forEach((parent) => {\n breadcrumb.push({ title: parent.name, url: url.category(parent) });\n });\n\n breadcrumb.push({ title: state.category.name, url: url.category(state.category) });\n\n pageTitle = state.category.name;\n }\n\n const productsView = (\n {\n // eslint-disable-next-line default-case\n switch (key) {\n case 'sort':\n setSort(option);\n break;\n case 'limit':\n setLimit(option);\n break;\n case 'page':\n setPage(option);\n break;\n }\n }}\n filters={state.filters}\n dispatch={dispatch}\n layout={viewMode}\n grid={`grid-${columns}-${columns > 3 ? 'full' : 'sidebar'}`}\n offcanvas={offcanvas}\n resetFilters={resetFilters}\n />\n );\n\n const sidebarComponent = (\n \n \n \n \n\n \n );\n\n if (columns > 3) {\n content = (\n \n
{productsView}
\n {program && (program.permissions.showBrands || program.permissions.showCategories || program.permissions.showPriceSlider || program.permissions.showTags) && (sidebarComponent)}\n
\n );\n } else {\n const sidebar = (\n \n {program && (program.permissions.showBrands || program.permissions.showCategories || program.permissions.showPriceSlider || program.permissions.showTags) && (sidebarComponent)}\n
\n );\n\n content = (\n \n
\n {sidebarPosition === 'start' && sidebar}\n
\n {sidebarPosition === 'end' && sidebar}\n
\n
\n );\n }\n\n return (\n \n \n {program && ({`Shop Category Page — ${program.fullName}`} )}\n \n\n \n\n {content}\n \n );\n}\n\nShopPageCategory.propTypes = {\n /**\n * Category slug.\n */\n categorySlug: PropTypes.string,\n /**\n * number of product columns (default: 3)\n */\n columns: PropTypes.number,\n /**\n * mode of viewing the list of products (default: 'grid')\n * one of ['grid', 'grid-with-features', 'list']\n */\n viewMode: PropTypes.oneOf(['grid', 'long', 'list']),\n /**\n * sidebar position (default: 'start')\n * one of ['start', 'end']\n * for LTR scripts \"start\" is \"left\" and \"end\" is \"right\"\n */\n sidebarPosition: PropTypes.oneOf(['start', 'end']),\n};\n\nShopPageCategory.defaultProps = {\n columns: 3,\n viewMode: 'list',\n sidebarPosition: 'start',\n};\n\nconst mapStateToProps = (state) => ({\n sidebarState: state.sidebar,\n page: state.category,\n region: state.region,\n});\n\nconst mapDispatchToProps = () => ({\n sidebarClose,\n});\n\nexport default connect(mapStateToProps, mapDispatchToProps)(ShopPageCategory);\n","// react\nimport React, { useEffect, useState, useContext } from 'react';\nimport { FormattedMessage } from 'react-intl';\n\n// third-party\nimport { connect } from 'react-redux';\nimport { Helmet } from 'react-helmet-async';\nimport { Link } from 'react-router-dom';\nimport Sections from '../home/Sections';\n\n// application\nimport Points from '../shared/Points';\nimport { Check100Svg } from '../../svg';\nimport auth from '../../server/real/endpoints/auth';\n\n// data stubs\nimport orderApi from '../../server/real/endpoints/orders';\nimport { url } from '../../services/utils';\nimport ProgramContext from '../../contexts/ProgramContext';\nimport { cartClear } from '../../store/cart';\nimport programApi from '../../server/real/endpoints/programs';\nimport UserContext from '../../contexts/UserContext';\n\nfunction ShopPageOrderSuccess(props) {\n const { program } = useContext(ProgramContext);\n const { setRefreshUser } = useContext(UserContext);\n const {\n match, cartClear, locale, region,\n} = props;\n const { params } = match;\n const [page, setPage] = useState();\n const { orderId } = params;\n const [order, setOrder] = useState();\n useEffect(() => {\n if (!program) return;\n const content = programApi.getContent(program, locale);\n if (!content) return;\n const { pages } = content;\n if (!pages) return;\n const homePageData = pages.filter((data) => data.url === 'ordersuccess');\n if (homePageData.length === 0) return;\n setPage(homePageData[0]);\n }, [program, locale, region]);\n\n const formatDate = (date) => {\n const d = new Date(date);\n let month = `${d.getMonth() + 1}`;\n let day = `${d.getDate()}`;\n const year = d.getFullYear();\n\n if (month.length < 2) month = `0${month}`;\n if (day.length < 2) day = `0${day}`;\n\n return [year, month, day].join('-');\n };\n\n useEffect(() => {\n let canceled = false;\n\n orderApi.getOrder(orderId).then((orderData) => {\n if (canceled) {\n return;\n }\n setOrder(orderData.data);\n cartClear();\n setRefreshUser(new Date())\n });\n\n return () => {\n canceled = true;\n };\n }, []);\n\n const logout = () => {\n auth.signout(() => {\n window.location = '/';\n });\n };\n\n let items;\n if (order) {\n items = order.items.map((item) => {\n const options = (item.options || []).map((option) => (\n \n \n {option.optionCustom1Value}\n {': '}\n \n {option.optionCustom1Value} \n \n ));\n\n return (\n \n \n \n
\n \n \n
\n \n \n {item.product.productName} \n\n \n
\n {item.product.options.length < 0 && (\n \n {item.product.options && item.product.options[0].optionColorValue && (\n \n {item.product.options[0].optionColorValue}\n \n /\n \n \n)}\n {item.product.options && item.product.options[0].optionSizeValue && (\n \n {item.product.options[0].optionSizeValue}\n \n /\n \n \n)}\n {item.product.options && item.product.options[0].optionCustom1Value && (\n \n {item.product.options[0].optionCustom1Value}\n \n /\n \n \n)}\n {item.product.options && item.product.options[0].optionCustom2Value && (\n \n {item.product.options[0].optionCustom2Value}\n \n /\n \n \n)}\n {item.product.options && item.product.options[0].optionCustom2Value && (\n \n {item.product.options[0].optionCustom3Value}\n \n)}\n \n)}\n\n \n
\n \n\n \n {item.name}\n {options.length > 0 && (\n \n )}\n \n {program.type !== 'points' && (\n \n )}\n \n {item.product.productDropShipDays}\n {' '}\n days\n \n {program.type === 'points' && (\n \n\n {item.quantity} \n \n \n )}\n \n );\n });\n }\n\n let colSpan = '4';\n if (program.type === 'points') {\n colSpan = '3';\n }\n if (!order) {\n return ( );\n }\n const { shippingAddress } = order;\n\n return (\n \n
\n {`Order Success — ${program.fullName}`} \n \n\n
\n
\n\n {page && page.sections ?
: (\n
\n) }\n
\n
\n \n \n \n :\n \n {`#${order.orderNumber}`} \n \n \n \n \n :\n \n {formatDate(order.date)} \n \n\n {program.type === 'points' && (\n \n Total: \n \n \n )}\n \n
\n\n
\n
\n
\n \n \n \n \n \n \n \n \n {program.type === 'points' && (\n \n \n \n \n \n \n \n \n )}\n \n \n \n {items}\n \n {program.type === 'points' && (\n \n \n \n \n \n \n \n \n \n )}\n
\n
\n
\n\n
\n
\n
\n
\n
\n \n
\n
\n
\n
{shippingAddress.fullName}
\n
\n
\n
\n
{shippingAddress.address1}
\n {shippingAddress.address2 && (\n
\n {shippingAddress.address2}
\n \n)}\n {shippingAddress.address3 && (\n
\n {shippingAddress.address3}
\n \n)}\n {shippingAddress.address4 && (\n
\n {shippingAddress.address4}
\n \n)}\n
\n
\n
{program && program.type === 'claim' ? : }
\n
{order.user.email}
\n
\n
\n
\n
{shippingAddress.stateCounty}
\n
\n\n
\n
\n
{shippingAddress.townCity}
\n
\n
\n
\n
{shippingAddress.postcode}
\n
\n
\n
\n
{order.shippingAddress.phone}
\n
\n
\n
\n {program && program.type === 'claim' &&
Use Another Code }\n
\n
\n
\n
\n
\n );\n}\nconst mapStateToProps = (state) => ({\n cart: state.cart,\n region: state.region,\n locale: state.locale,\n});\n\nconst mapDispatchToProps = {\n cartClear,\n };\n\nexport default connect(mapStateToProps, mapDispatchToProps)(ShopPageOrderSuccess);\n","// react\nimport React, { useContext, useState } from 'react';\nimport { FormattedMessage } from 'react-intl';\n\n// third-party\nimport { connect } from 'react-redux';\nimport { Helmet } from 'react-helmet-async';\nimport { Link, useHistory } from 'react-router-dom';\n// import Sections from '../home/Sections';\n\n// application\nimport Points from '../shared/Points';\n// import { Check100Svg } from '../../svg';\nimport orderApi from '../../server/real/endpoints/orders';\n\n// data stubs\nimport { url } from '../../services/utils';\nimport ProgramContext from '../../contexts/ProgramContext';\nimport { cartClear } from '../../store/cart';\n// import programApi from '../../server/real/endpoints/programs';\n\nfunction ShopPageOrderSummary() {\n const { program } = useContext(ProgramContext);\n// const { locale, region } = props;\n const order = JSON.parse(localStorage.getItem('summary_data'));\n const [disableButton, setDisableButton] = useState(false);\n const history = useHistory();\n // const { params } = match;\n// const [page, setPage] = useState();\n // useEffect(() => {\n // if (!program) return;\n // const content = programApi.getContent(program, locale);\n // if (!content) return;\n // const { pages } = content;\n // if (!pages) return;\n // const homePageData = pages.filter((data) => data.url === 'ordersuccess');\n // if (homePageData.length === 0) return;\n // setPage(homePageData[0]);\n // }, [program, locale, region]);\n\n // const formatDate = (date) => {\n // const d = new Date(date);\n // let month = `${d.getMonth() + 1}`;\n // let day = `${d.getDate()}`;\n // const year = d.getFullYear();\n\n // if (month.length < 2) month = `0${month}`;\n // if (day.length < 2) day = `0${day}`;\n\n // return [year, month, day].join('-');\n // };\n\n let items;\n if (order) {\n items = order.items.map((item) => {\n const options = (item.options || []).map((option) => (\n \n \n {option.optionCustom1Value}\n {': '}\n \n {option.optionCustom1Value} \n \n ));\n\n return (\n \n \n \n
\n \n \n
\n \n \n {item.product.productName} \n\n \n
\n {item.product.options.length < 0 && (\n \n {item.product.options && item.product.options[0].optionColorValue && (\n \n {item.product.options[0].optionColorValue}\n \n /\n \n \n)}\n {item.product.options && item.product.options[0].optionSizeValue && (\n \n {item.product.options[0].optionSizeValue}\n \n /\n \n \n)}\n {item.product.options && item.product.options[0].optionCustom1Value && (\n \n {item.product.options[0].optionCustom1Value}\n \n /\n \n \n)}\n {item.product.options && item.product.options[0].optionCustom2Value && (\n \n {item.product.options[0].optionCustom2Value}\n \n /\n \n \n)}\n {item.product.options && item.product.options[0].optionCustom2Value && (\n \n {item.product.options[0].optionCustom3Value}\n \n)}\n \n)}\n\n \n
\n \n\n \n {item.name}\n {options.length > 0 && (\n \n )}\n \n {program.type !== 'points' && (\n \n )}\n \n {item.product.productDropShipDays}\n {' '}\n days\n \n {program.type === 'points' && (\n \n\n {item.quantity} \n \n \n )}\n \n );\n });\n }\n\n let colSpan = '4';\n if (program.type === 'points') {\n colSpan = '3';\n }\n if (!order) {\n return ( );\n }\n const { shippingAddress } = order;\n\n return (\n \n
\n {`Order Success — ${program.fullName}`} \n \n\n
\n
\n\n {/* {page && page.sections ?
: (\n
\n) } */}\n {/*
\n
\n \n \n \n :\n \n {`#${order.orderNumber}`} \n \n \n \n \n :\n \n {formatDate(order.date)} \n \n\n {program.type === 'points' && (\n \n Total: \n \n \n )}\n \n
*/}\n\n
\n
\n
\n \n \n \n \n \n \n \n \n {program.type === 'points' && (\n \n \n \n \n \n \n \n \n )}\n \n \n \n {items}\n \n {program.type === 'points' && (\n \n \n \n \n \n history.push('/shop/cart')}>Edit \n \n \n \n )}\n
\n
\n
\n\n
\n
\n
\n
\n
\n \n
\n
\n
\n
{shippingAddress.fullName}
\n
\n
\n
\n
{shippingAddress.address1}
\n {shippingAddress.address2 && (\n
\n {shippingAddress.address2}
\n \n)}\n {shippingAddress.address3 && (\n
\n {shippingAddress.address3}
\n \n)}\n {shippingAddress.address4 && (\n
\n {shippingAddress.address4}
\n \n)}\n
\n
\n
{program && program.type === 'claim' ? : }
\n
{order?.user?.email}
\n
\n
\n
\n
{shippingAddress.stateCounty}
\n
\n\n
\n
\n
{shippingAddress.townCity}
\n
\n
\n
\n
{shippingAddress.postcode}
\n
\n
\n
\n
{order.shippingAddress.phone}
\n
\n
history.push('/shop/checkout')}>Edit Address \n
\n
\n
{\n setDisableButton(true)\n orderApi.placeOrder(order)\n .then((response) => response.json())\n .then((response) => {\n if (response.success) {\n history.push(`/shop/checkout/success/${response.id}`);\n localStorage.removeItem('summary_data');\n }\n setDisableButton(false)\n });\n }}\n >\n Confirm\n\n \n
\n
\n
\n
\n
\n );\n}\nconst mapStateToProps = (state) => ({\n cart: state.cart,\n region: state.region,\n locale: state.locale,\n});\n\nconst mapDispatchToProps = {\n cartClear,\n };\n\nexport default connect(mapStateToProps, mapDispatchToProps)(ShopPageOrderSummary);\n","// react\nimport React from 'react';\nimport { connect } from 'react-redux';\nimport { selectedLanguage } from '../../server/utils';\n\nfunction ProductTabDescription(props) {\n const { product, locale } = props;\n function equalizeLang (langData) {\n if (langData === 'sp') {\n return 'es'\n }\n if (langData === 'ge') {\n return 'de'\n }\n return langData\n }\n return (\n \n
{product !== null && (selectedLanguage(product, equalizeLang(locale), product && product.productName, 'name'))} \n
\n {product !== null && (selectedLanguage(product, equalizeLang(locale), product && product.productSalesCopy, 'salesCopy'))}\n
\n
\n );\n}\nconst mapStateToProps = (state) => ({\n locale: state.locale,\n});\nexport default connect(mapStateToProps)(ProductTabDescription);\n","import React from 'react';\nimport Slider from 'react-slick';\n\nexport default function APP(props) {\n const slickSettings = {\n dots: true,\n arrows: true,\n };\n const { product } = props;\n return (\n \n
\n {product && product.resources.product.filter((video) => video.productResourceType === 'Video').map((a) => (
))}\n \n
\n );\n}\n","// react\nimport React from 'react';\n\n// data stubs\n\nfunction ProductTabSpecification(props) {\n const { product } = props;\n const features = product.features && product.features.map((feature, key) => (\n \n
\n {feature.featureName}\n
\n
\n));\n\n return (\n \n
Specification \n {product && product.features && (\n
\n
Features \n {features}\n \n)}\n
\n
Dimensions \n {/* {product.dims.cartonHeight !== 0 && (\n
\n
Carton Height
\n
\n {product.dims.cartonHeight.toFixed(2)}\n {' '}\n inches \n
\n
\n)}\n {product.dims.cartonLength !== 0 && (\n
\n
Carton Length
\n
\n {product.dims.cartonLength.toFixed(2)}\n {' '}\n inches \n
\n
\n)}\n {product.dims.cartonWeight !== 0 && (\n
\n
Carton Weight
\n
\n {product.dims.cartonWeight.toFixed(2)}\n {' '}\n lbs \n
\n
\n)}\n {product.dims.cartonWidth !== 0 && (\n
\n
Carton Width
\n
\n {product.dims.cartonWidth.toFixed(2)}\n {' '}\n inches \n
\n
\n)} */}\n {product?.dims?.itemHeight !== 0 && (\n
\n
Item Height
\n
\n {product?.dims?.itemHeight?.toFixed(2)}\n {' '}\n inches \n
\n
\n)}\n {product?.dims?.itemWeight !== 0 && (\n
\n
Item Weight
\n
\n {product?.dims?.itemWeight?.toFixed(2)}\n {' '}\n lbs \n
\n
\n)}\n {product?.dims?.itemWidth !== 0 && (\n
\n
Item Width
\n
\n {product?.dims?.itemWidth?.toFixed(2)}\n {' '}\n inches \n
\n
\n)}\n
\n
\n );\n}\n\nexport default ProductTabSpecification;\n","// react\nimport React, { useState } from 'react';\n\n// third-party\nimport classNames from 'classnames';\nimport PropTypes from 'prop-types';\nimport { FormattedMessage } from 'react-intl';\n\n// application\nimport ProductTabDescription from './ProductTabDescription';\nimport ProductTabVideos from './ProductTabVideos';\nimport ProductTabFeatures from './ProductTabFeatures';\n\nfunction ProductTabs(props) {\n const { withSidebar, product } = props;\n const [currentTab, setCurrentTab] = useState(product && product.options && product.options.length < 1 ? 'Details' : 'description');\n\n const prop65Text = 'This Product contains chemicals know to the state of California to cause cancer and birth defects or other reproductive harm(Proposition 65)';\n\n const setTab = (newTab) => {\n setCurrentTab(newTab);\n };\n\n const classes = classNames('product-tabs', {\n 'product-tabs--layout--sidebar': withSidebar,\n });\n\n const videoFeed = () => {\n if (product.resources && product.resources.brand && product.resources && product.resources.product) {\n return [...product.resources.brand, ...product.resources.product];\n }\n if (product.resources && product.resources.brand) {\n return [...product.resources.brand];\n }\n if (product.resources && product.resources.product) {\n return [...product.resources.product];\n }\n return null;\n };\n let tabs = [];\n if (videoFeed() && videoFeed().filter((video) => video.productResourceType === 'Video').length > 0) {\n tabs = [\n { key: 'description', title: , content: },\n { key: 'Details', title: , content: },\n { key: 'Videos', title: , content: },\n ];\n } else {\n tabs = [\n { key: 'description', title: , content: },\n { key: 'Details', title: , content: },\n ];\n }\n\n if (product && product.options && product.options.length < 1) {\n tabs.shift();\n }\n\n const tabsButtons = tabs.map((tab) => {\n const classes = classNames('product-tabs__item', {\n 'product-tabs__item--active': currentTab === tab.key,\n });\n\n return setTab(tab.key)} className={classes}>{tab.title} ;\n });\n\n const tabsContent = tabs.map((tab) => {\n const classes = classNames('product-tabs__pane', {\n 'product-tabs__pane--active': currentTab === tab.key,\n });\n\n return {tab.content}
;\n });\n\n return (\n \n
\n {tabsButtons}\n
\n
\n {tabsContent}\n
\n {product && product.prop65 === 'Y' && (\n
\n
\n
{prop65Text}
\n
\n )}\n
\n );\n }\n\nProductTabs.propTypes = {\n withSidebar: PropTypes.bool,\n};\n\nProductTabs.defaultProps = {\n withSidebar: false,\n};\n\nexport default ProductTabs;\n","// react\nimport React, { useEffect, useState, useContext } from 'react';\n\n// third-party\nimport PropTypes from 'prop-types';\nimport { Helmet } from 'react-helmet-async';\n\n// application\nimport PageHeader from '../shared/PageHeader';\nimport Product from '../shared/Product';\nimport ProductTabs from './ProductTabs';\nimport productApi from '../../server/real/endpoints/products';\nimport { url } from '../../services/utils';\n\n// blocks\nimport BlockLoader from '../blocks/BlockLoader';\n\n// data stubs\nimport ProgramContext from '../../contexts/ProgramContext';\n\nfunction ShopPageProduct(props) {\n const {\n productSlug, layout,\n } = props;\n const [isLoading, setIsLoading] = useState(true);\n const [product, setProduct] = useState(null);\n const { program } = useContext(ProgramContext);\n\n // Load product.\n useEffect(() => {\n let canceled = false;\n\n setIsLoading(true);\n\n productApi.getProductBySlug(productSlug).then((product) => {\n if (canceled) {\n return;\n }\n\n setProduct(product.data);\n setIsLoading(false);\n });\n\n return () => {\n canceled = true;\n };\n }, [productSlug, setIsLoading]);\n\n if (isLoading) {\n return ;\n }\n\n const breadcrumb = [\n { title: 'Home', url: url.home() },\n { title: 'Shop', url: url.catalog() },\n { title: product.productName, url: url.product(product) },\n ];\n\n const content = (\n \n \n \n );\n\n return (\n \n \n \n {`${product.productName} — ${program.fullName}`} \n \n\n \n\n {content}\n \n );\n}\n\nShopPageProduct.propTypes = {\n /** Product slug. */\n productSlug: PropTypes.string,\n /** one of ['standard', 'sidebar', 'columnar', 'quickview'] (default: 'standard') */\n layout: PropTypes.oneOf(['standard', 'sidebar', 'columnar', 'quickview']),\n};\n\nShopPageProduct.defaultProps = {\n layout: 'standard',\n};\n\nexport default ShopPageProduct;\n","// react\nimport React, { useContext } from 'react';\n\n// third-party\nimport { Helmet } from 'react-helmet-async';\n\n// application\nimport PageHeader from '../shared/PageHeader';\n\n// data stubs\nimport ProgramContext from '../../contexts/ProgramContext';\n\nfunction ShopPageTrackOrder() {\n const breadcrumb = [\n { title: 'Home', url: '' },\n { title: 'Track Order', url: '' },\n ];\n const { program } = useContext(ProgramContext);\n\n return (\n \n \n {`Track Order — ${program.fullName}`} \n \n\n \n\n \n
\n
\n
\n
\n
\n
Track Order \n
\n Vestibulum sem odio, ullamcorper a imperdiet tincidunt\n sed magna felis, consequat a erat ut, rutrum finibus\n odio.\n
\n
\n
\n
\n
\n
\n
\n
\n \n );\n}\n\nexport default ShopPageTrackOrder;\n","// react\nimport React from 'react';\n\n// third-party\nimport { Helmet } from 'react-helmet-async';\nimport { Link } from 'react-router-dom';\n\n// data stubs\nimport ProgramContext from '../../contexts/ProgramContext';\n\nfunction SitePageNotFound() {\n return (\n \n
\n {(context) => {\n const { program } = context;\n return (\n \n {`404 Page Not Found — ${program.fullName}`} \n \n );\n }}\n \n\n
\n
\n
\n Oops! Error 404\n
\n\n
\n
Page Not Found \n\n
\n We can't seem to find the page you're looking for.\n \n Try to use the search.\n
\n\n
\n\n
\n Or go to the home page to start over.\n
\n\n
Go To Home Page\n
\n
\n
\n
\n );\n}\n\nexport default SitePageNotFound;\n","// react\nimport React, { useContext, useEffect, useState } from 'react';\nimport { connect } from 'react-redux';\n\n// third-party\nimport { Helmet } from 'react-helmet-async';\nimport Sections from '../home/Sections';\n\n// data stubs\nimport ProgramContext from '../../contexts/ProgramContext';\nimport programApi from '../../server/real/endpoints/programs';\n\nfunction TermsAndConditions(props) {\n const { program } = useContext(ProgramContext);\n const { locale, region } = props;\n const [page, setPage] = useState();\n useEffect(() => {\n if (!program) return;\n const content = programApi.getContent(program, locale);\n if (!content) return;\n const { pages } = content;\n if (!pages) return;\n const homePageData = pages.filter((data) => data.url === 'termsandconditions');\n if (homePageData.length === 0) return;\n setPage(homePageData[0]);\n }, [program, locale, region]);\n return (\n \n
\n {(context) => {\n const { program } = context;\n return (\n \n {`Terms & Conditions— ${program.fullName}`} \n \n );\n }}\n \n\n
\n\n {page && page.sections.length > 0 ?
: (\n
\n
\n
Terms And Conditions \n
This Agreement was last modified on 27 May 2018.
\n
\n
\n
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec facilisis neque ut purus fermentum, ac pretium nibh facilisis. Vivamus venenatis viverra iaculis. Suspendisse tempor orci non sapien ullamcorper dapibus. Suspendisse at velit diam. Donec pharetra nec enim blandit vulputate. Suspendisse potenti. Pellentesque et molestie ante. In feugiat ante vitae ultricies malesuada.
\n
Definitions \n
\n \n Risus \n — Morbi posuere eleifend sollicitudin. Praesent eget ante in enim scelerisque scelerisque. Donec mi lorem, molestie a sapien non, laoreet convallis felis. In semper felis in lacus venenatis, sit amet commodo leo interdum. Maecenas congue ut leo et auctor.\n \n \n Praesent \n — Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Nulla orci ante, viverra in imperdiet in, pharetra et leo\n \n \n Vestibulum \n — Vestibulum arcu tellus, aliquam vel fermentum vestibulum, lacinia pulvinar ipsum. In hac habitasse platea dictumst. Integer felis libero, blandit scelerisque mauris eget, porta elementum sapien. Mauris luctus arcu non enim lobortis gravida.\n \n \n
Ornare dolor \n
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec facilisis neque ut purus fermentum, ac pretium nibh facilisis. Vivamus venenatis viverra iaculis. Suspendisse tempor orci non sapien ullamcorper dapibus. Suspendisse at velit diam. Donec pharetra nec enim blandit vulputate. Suspendisse potenti. Pellentesque et molestie ante. In feugiat ante vitae ultricies malesuada.
\n
\n For information about how to contact us, please visit our\n contact page \n .\n
\n
\n
\n)}\n
\n
\n );\n}\n\nconst mapStateToProps = (state) => ({\n region: state.region,\n locale: state.locale,\n});\n\nexport default connect(mapStateToProps)(TermsAndConditions);\n","// react\nimport React, { useContext, useEffect, useState } from 'react';\nimport { connect } from 'react-redux';\n\n// third-party\nimport { Helmet } from 'react-helmet-async';\nimport Sections from '../home/Sections';\n\n// data stubs\nimport ProgramContext from '../../contexts/ProgramContext';\nimport programApi from '../../server/real/endpoints/programs';\n\nfunction SiteRebuilding(props) {\n const { program } = useContext(ProgramContext);\n const { locale, region } = props;\n const [page, setPage] = useState();\n useEffect(() => {\n if (!program) return;\n const content = programApi.getContent(program, locale);\n if (!content) return;\n const { pages } = content;\n if (!pages) return;\n const homePageData = pages.filter((data) => data.url === 'siterebuilding');\n if (homePageData.length === 0) return;\n setPage(homePageData[0]);\n }, [program, locale, region]);\n return (\n \n\n
\n {`Program is not accessable — ${program.fullName}`} \n \n\n
\n {page && page.sections.length > 0 ?
: (\n
\n
\n\n
\n
Catalog Rebuilding in Progress... \n\n
\n\n
\n
\n)}\n
\n
\n );\n}\n\nconst mapStateToProps = (state) => ({\n region: state.region,\n locale: state.locale,\n});\n\nexport default connect(mapStateToProps)(SiteRebuilding);\n","import getApi from './api';\nimport { GetAPIEndpoint } from '../../configuration';\n\nfunction getHeaders() {\n const Authorization = `Bearer ${localStorage.getItem('access_token') ?? sessionStorage.getItem('access_token')}`;\n return { Authorization };\n}\nconst languageApi = {\n getLanguages: () => getApi().get(`${GetAPIEndpoint()}/api/languages`, { headers: getHeaders() }),\n};\n\nexport default languageApi;\n","// react\nimport React, { useEffect, useState } from 'react';\n\n// third-party\nimport { Helmet } from 'react-helmet-async';\nimport {\n Route, Switch, useHistory,\n} from 'react-router-dom';\nimport { ToastContainer } from 'react-toastify';\nimport { connect } from 'react-redux';\nimport { IntlProvider, FormattedMessage } from 'react-intl';\n\n// application\n\n// pages\nimport BlockLoader from './blocks/BlockLoader';\nimport Footer from './footer';\nimport PrivateRoute from './PrivateRoute';\nimport AccountLayout from './account/AccountLayout';\nimport AccountPageLogout from './account/AccountPageLogout';\nimport ShopPageOrderSuccess from './shop/ShopPageOrderSuccess';\n\nimport ProgramContext from '../contexts/ProgramContext';\nimport UserContext from '../contexts/UserContext';\nimport SiteRebuilding from './site/SiteRebuilding';\n\n// data stubs\nimport programApi from '../server/real/endpoints/programs';\nimport userApi from '../server/real/endpoints/users';\nimport languageApi from '../server/real/endpoints/languages';\n\nfunction UsedLayout() {\n const [program, setProgram] = useState();\n const [languages, setLanguages] = useState();\n const [isLoadingProgram, setisLoadingProgram] = useState(true);\n const [isLoadingLanguages, setisLoadingLanguages] = useState(true);\n const history = useHistory();\n const [user, setUser] = useState({\n addresses: [],\n });\n useEffect(() => {\n const preloader = document.querySelector('.site-preloader');\n if (preloader) {\n preloader.addEventListener('transitionend', (event) => {\n if (event.propertyName === 'opacity' && preloader.parentNode) {\n preloader.parentNode.removeChild(preloader);\n }\n });\n preloader.classList.add('site-preloader__fade');\n }\n\n return () => {\n };\n }, [program, languages, user]);\n\n useEffect(() => {\n let canceled = false;\n\n programApi.getProgram().then((programData) => {\n if (canceled) {\n return;\n }\n setProgram(programData.data);\n setisLoadingProgram(false);\n });\n\n return () => {\n canceled = true;\n };\n }, []);\n\n useEffect(() => {\n let canceled = false;\n userApi.getUser().then((userData) => {\n const use = { ...userData };\n if (canceled) {\n return;\n }\n setUser(use.data);\n });\n\n return () => {\n canceled = true;\n };\n }, []);\n\n useEffect(() => {\n let canceled = false;\n\n languageApi.getLanguages().then((data) => {\n if (canceled) {\n return;\n }\n setLanguages(data.data);\n setisLoadingLanguages(false);\n });\n\n return () => {\n canceled = true;\n };\n }, []);\n\n if (isLoadingProgram || isLoadingLanguages) {\n return ;\n }\n\n const { theme } = program;\n const root = document.documentElement;\n if (theme !== undefined) {\n root?.style.setProperty('--accent-color', theme.color1);\n root?.style.setProperty('--buttons-theme-color', theme.color2);\n root?.style.setProperty('--link-color', theme.color3);\n }\n const myProfile = () => {\n history.push('/account/myprofile');\n };\n return (\n \n \n \n \n {program && (\n \n {program.fullName} \n \n \n )}\n \n
\n \n
\n
\n
\n
\n\n
\n
\n
\n \n \n\n
\n\n
\n
\n
\n
\n
\n
\n\n
\n
\n {program && (\n
\n {program.adminMessage}\n
\n )}\n
\n
\n
\n
\n \n\n
\n\n
\n\n
\n
\n \n \n \n \n );\n}\n\nUsedLayout.defaultProps = {\n headerLayout: 'compact',\n};\n\nconst mapStateToProps = (state) => ({\n locale: state.locale,\n});\n\nexport default connect(mapStateToProps)(UsedLayout);\n","// react\nimport React, { useContext, useEffect, useState } from 'react';\nimport { connect } from 'react-redux';\n\n// third-party\nimport { Helmet } from 'react-helmet-async';\nimport Sections from '../home/Sections';\n\n// data stubs\nimport ProgramContext from '../../contexts/ProgramContext';\nimport programApi from '../../server/real/endpoints/programs';\n\nfunction UsedAccount(props) {\n const { program } = useContext(ProgramContext);\n const { locale, region } = props;\n const [page, setPage] = useState();\n useEffect(() => {\n if (!program) return;\n const content = programApi.getContent(program, locale);\n if (!content) return;\n const { pages } = content;\n if (!pages) return;\n const homePageData = pages.filter((data) => data.url === 'usedaccount');\n if (homePageData.length === 0) return;\n setPage(homePageData[0]);\n }, [program, locale, region]);\n return (\n \n\n
\n {`Program is not accessable — ${program.fullName}`} \n \n\n
\n {page && page.sections.length > 0 ?
: (\n
\n
\n\n {program && program.type === 'claim' ? (\n
\n
The code you have entered has already been used to redeem an item. \n\n
\n Please contact your program administrator if you believe this information is not correct.\n
\n\n
\n) : (\n
\n
An item has already been redeemed using the credentials you provided. \n\n
\n Please contact your program administrator if you believe this information is not correct.\n
\n\n
\n)}\n
\n)}\n
\n
\n );\n}\n\nconst mapStateToProps = (state) => ({\n region: state.region,\n locale: state.locale,\n});\n\nexport default connect(mapStateToProps)(UsedAccount);\n","// react\nimport React, { useEffect, useState } from 'react';\n\n// third-party\nimport { Helmet } from 'react-helmet-async';\nimport {\n Route, Switch, useHistory,\n} from 'react-router-dom';\nimport { ToastContainer } from 'react-toastify';\nimport { connect } from 'react-redux';\nimport { IntlProvider, FormattedMessage } from 'react-intl';\n\n// application\n\n// pages\nimport BlockLoader from './blocks/BlockLoader';\nimport Footer from './footer';\nimport PrivateRoute from './PrivateRoute';\nimport AccountLayout from './account/AccountLayout';\nimport AccountPageLogout from './account/AccountPageLogout';\nimport ShopPageOrderSuccess from './shop/ShopPageOrderSuccess';\n\nimport ProgramContext from '../contexts/ProgramContext';\nimport UserContext from '../contexts/UserContext';\nimport UsedAccount from './site/SiteUsedAccount';\n\n// data stubs\nimport programApi from '../server/real/endpoints/programs';\nimport userApi from '../server/real/endpoints/users';\nimport languageApi from '../server/real/endpoints/languages';\n\nfunction UsedLayout() {\n const [program, setProgram] = useState();\n const [languages, setLanguages] = useState();\n const [isLoadingProgram, setisLoadingProgram] = useState(true);\n const [isLoadingLanguages, setisLoadingLanguages] = useState(true);\n const history = useHistory();\n const [user, setUser] = useState({\n addresses: [],\n });\n useEffect(() => {\n const preloader = document.querySelector('.site-preloader');\n if (preloader) {\n preloader.addEventListener('transitionend', (event) => {\n if (event.propertyName === 'opacity' && preloader.parentNode) {\n preloader.parentNode.removeChild(preloader);\n }\n });\n preloader.classList.add('site-preloader__fade');\n }\n\n return () => {\n };\n }, [program, languages, user]);\n\n useEffect(() => {\n let canceled = false;\n\n programApi.getProgram().then((programData) => {\n if (canceled) {\n return;\n }\n setProgram(programData.data);\n setisLoadingProgram(false);\n });\n\n return () => {\n canceled = true;\n };\n }, []);\n\n useEffect(() => {\n let canceled = false;\n userApi.getUser().then((userData) => {\n const use = { ...userData };\n if (canceled) {\n return;\n }\n setUser(use.data);\n });\n\n return () => {\n canceled = true;\n };\n }, []);\n\n useEffect(() => {\n let canceled = false;\n\n languageApi.getLanguages().then((data) => {\n if (canceled) {\n return;\n }\n setLanguages(data.data);\n setisLoadingLanguages(false);\n });\n\n return () => {\n canceled = true;\n };\n }, []);\n\n if (isLoadingProgram || isLoadingLanguages) {\n return ;\n }\n\n const { theme } = program;\n const root = document.documentElement;\n if (theme !== undefined) {\n root?.style.setProperty('--accent-color', theme.color1);\n root?.style.setProperty('--buttons-theme-color', theme.color2);\n root?.style.setProperty('--link-color', theme.color3);\n }\n const myProfile = () => {\n history.push('/account/myprofile');\n };\n return (\n \n \n \n \n {program && (\n \n {program.fullName} \n \n \n )}\n \n
\n \n
\n
\n
\n
\n\n
\n
\n
\n \n \n\n
\n\n
\n
\n
\n
\n
\n
\n\n
\n
\n {program && (\n
\n {program.adminMessage}\n
\n )}\n
\n
\n
\n
\n \n\n
\n\n
\n\n
\n
\n \n \n \n \n );\n}\n\nUsedLayout.defaultProps = {\n headerLayout: 'compact',\n};\n\nconst mapStateToProps = (state) => ({\n locale: state.locale,\n});\n\nexport default connect(mapStateToProps)(UsedLayout);\n","// react\nimport React, {\n useEffect, useState, useContext,\n} from 'react';\nimport { connect } from 'react-redux';\n\n// third-party\nimport { Helmet } from 'react-helmet-async';\n\n// data stubs\nimport Sections from './Sections';\nimport ProgramContext from '../../contexts/ProgramContext';\nimport programApi from '../../server/real/endpoints/programs';\n\nfunction SitePage(props) {\n const { locale, region, pageName } = props;\n const [page, setPage] = useState({ sections: [] });\n const { program } = useContext(ProgramContext);\n useEffect(() => {\n if (!program) return;\n const content = programApi.getContent(program, locale);\n if (!content) return;\n const { pages } = content;\n if (!pages) return;\n const homePageData = pages.filter((data) => data.url === pageName);\n if (homePageData.length === 0) return;\n setPage(homePageData[0]);\n }, [program, locale, region, pageName]);\n\n return (\n \n \n {`Home — ${program.fullName}`} \n \n\n \n \n );\n}\n\nconst mapStateToProps = (state) => ({\n locale: state.locale,\n region: state.region,\n});\n\nexport default connect(mapStateToProps)(SitePage);\n","// react\nimport React, { useEffect, useState } from 'react';\n\n// third-party\nimport PropTypes from 'prop-types';\nimport { Helmet } from 'react-helmet-async';\nimport {\n Redirect, Route, Switch, useHistory,\n} from 'react-router-dom';\nimport { ToastContainer } from 'react-toastify';\nimport { connect } from 'react-redux';\nimport { IntlProvider } from 'react-intl';\nimport 'suneditor/dist/css/suneditor.min.css'; // Import Sun Editor's CSS File\n\n// application\nimport HomePage from './home/HomePage';\nimport Footer from './footer';\nimport Header from './header';\nimport MobileHeader from './mobile/MobileHeader';\nimport MobileMenu from './mobile/MobileMenu';\nimport Quickview from './shared/Quickview';\nimport PrivateRoute from './PrivateRoute';\n\n// pages\nimport BlockLoader from './blocks/BlockLoader';\nimport AccountLayout from './account/AccountLayout';\nimport AccountPageLogin from './account/AccountPageLogin';\nimport AccountPageLogout from './account/AccountPageLogout';\nimport PageCart from './shop/ShopPageCart';\nimport PageCheckout from './shop/ShopPageCheckout';\nimport ShopPageCategory from './shop/ShopPageCategory';\nimport ShopPageOrderSuccess from './shop/ShopPageOrderSuccess';\nimport ShopPageOrderSummary from './shop/ShopPageOrderSummary';\nimport ShopPageProduct from './shop/ShopPageProduct';\nimport ShopPageTrackOrder from './shop/ShopPageTrackOrder';\nimport SitePageNotFound from './site/SitePageNotFound';\nimport TermsAndConditions from './site/SiteTermsConditions';\nimport RebuildingLayout from './RebuildingLayout';\n\nimport ProgramContext from '../contexts/ProgramContext';\nimport CategoriesContext from '../contexts/CategoriesContext';\nimport UserContext from '../contexts/UserContext';\nimport UsedAccountLayout from './UsedAccountLayout';\n\n// data stubs\nimport programApi from '../server/real/endpoints/programs';\nimport categoryApi from '../server/real/endpoints/categories';\nimport userApi from '../server/real/endpoints/users';\nimport languageApi from '../server/real/endpoints/languages';\nimport SitePage from './home/SitePage';\nimport auth from '../server/real/endpoints/auth';\n\nfunction Layout(props) {\n const {\n match, headerLayout, locale, location, cart,\n } = props;\n const [program, setProgram] = useState();\n const [refreshUser, setRefreshUser] = useState();\n const [categories, setCategories] = useState([]);\n const [categoryLanguages, setCategoryLanguages] = useState();\n const [languages, setLanguages] = useState();\n const [isLoadingProgram, setisLoadingProgram] = useState(true);\n const [isLoadingLanguages, setisLoadingLanguages] = useState(true);\n const [user, setUser] = useState();\n const [determineLangList, setDetermineLangList] = useState([]);\n const history = useHistory();\n const orderSummary = JSON.parse(localStorage.getItem('summary_data'));\n\n useEffect(() => {\n const preloader = document.querySelector('.site-preloader');\n if (preloader) {\n preloader.addEventListener('transitionend', (event) => {\n if (event.propertyName === 'opacity' && preloader.parentNode) {\n preloader.parentNode.removeChild(preloader);\n }\n });\n preloader.classList.add('site-preloader__fade');\n }\n\n return () => {\n };\n }, [program, languages, user]);\n\n useEffect(() => {\n let canceled = false;\n\n programApi.getProgram().then((programData) => {\n if (!programData.data) {\n history.push('/site/not-found');\n }\n if (canceled) {\n return;\n }\n setProgram(programData.data);\n setisLoadingProgram(false);\n });\n\n return () => {\n canceled = true;\n };\n }, []);\n\n\n useEffect(() => {\n let canceled = false;\n\n categoryApi.getCategories().then((categoriesData) => {\n if (canceled) {\n return;\n }\n setCategories(categoriesData);\n\n });\n\n categoryApi.getLangCategories().then((langData) => {\n if (canceled) {\n return;\n }\n setCategoryLanguages(langData);\n\n });\n\n return () => {\n canceled = true;\n };\n }, []);\n\n useEffect(() => {\n const languageList = [{originalCategoryName: 'Home', de: 'Heim', es: 'Hogar', fr: 'Maison', it: 'Casa', nl: 'Thuis', pt: 'Lar'},\n {originalCategoryName: 'Checkout', de: 'Kasse', es: 'Verificar', fr: 'Vérifier', it: 'Carrello', nl: 'Uitchecken', pt: 'Confira'},\n {originalCategoryName: 'Shopping Cart', de: 'Einkaufswagen', es: 'Carro de la compra', fr: 'Chariot', it: 'Carrello della spesa', nl: 'Winkelwagen', pt: 'Carrinho de compras'},\n {originalCategoryName: 'Shop', de: 'Geschäft', es: 'Comercio', fr: 'Boutique', it: 'Negozio', nl: 'Winkel', pt: 'Comprar'}]\n if (categoryLanguages) {\n for (let i = 0; i < categoryLanguages?.length; i += 1) {\n for (let j = 0; j < categoryLanguages[i]?.children?.length; j += 1) {\n for (let u = 0; u < categoryLanguages[i]?.children[j]?.children?.length; u += 1) {\n if (languageList.filter((lang) => lang.originalCategoryName === categoryLanguages[i].children[j].children[u].feedCategory.productCategoryChild).length < 1) {\n languageList.push({originalCategoryName: categoryLanguages[i].children[j].children[u].feedCategory.productCategoryChild, \n de: categoryLanguages[i].children[j].children[u].feedCategory.langs.de.productCategoryChild,\n es: categoryLanguages[i].children[j].children[u].feedCategory.langs.es.productCategoryChild,\n fr: categoryLanguages[i].children[j].children[u].feedCategory.langs.fr.productCategoryChild,\n it: categoryLanguages[i].children[j].children[u].feedCategory.langs.it.productCategoryChild,\n nl: categoryLanguages[i].children[j].children[u].feedCategory.langs.nl.productCategoryChild,\n pt: categoryLanguages[i].children[j].children[u].feedCategory.langs.pt.productCategoryChild,\n })\n }\n if (languageList.filter((lang) => lang.originalCategoryName === categoryLanguages[i].children[j].children[u].feedCategory.productCategoryGrandChild).length < 1) {\n languageList.push({originalCategoryName: categoryLanguages[i].children[j].children[u].feedCategory.productCategoryGrandChild, \n de: categoryLanguages[i].children[j].children[u].feedCategory.langs.de.productCategoryGrandChild,\n es: categoryLanguages[i].children[j].children[u].feedCategory.langs.es.productCategoryGrandChild,\n fr: categoryLanguages[i].children[j].children[u].feedCategory.langs.fr.productCategoryGrandChild,\n it: categoryLanguages[i].children[j].children[u].feedCategory.langs.it.productCategoryGrandChild,\n nl: categoryLanguages[i].children[j].children[u].feedCategory.langs.nl.productCategoryGrandChild,\n pt: categoryLanguages[i].children[j].children[u].feedCategory.langs.pt.productCategoryGrandChild,\n })\n }\n if (languageList.filter((lang) => lang.originalCategoryName === categoryLanguages[i].children[j].children[u].feedCategory.productCategoryGreatGrandChild).length < 1) {\n languageList.push({originalCategoryName: categoryLanguages[i].children[j].children[u].feedCategory.productCategoryGreatGrandChild, \n de: categoryLanguages[i].children[j].children[u].feedCategory.langs.de.productCategoryGreatGrandChild,\n es: categoryLanguages[i].children[j].children[u].feedCategory.langs.es.productCategoryGreatGrandChild,\n fr: categoryLanguages[i].children[j].children[u].feedCategory.langs.fr.productCategoryGreatGrandChild,\n it: categoryLanguages[i].children[j].children[u].feedCategory.langs.it.productCategoryGreatGrandChild,\n nl: categoryLanguages[i].children[j].children[u].feedCategory.langs.nl.productCategoryGreatGrandChild,\n pt: categoryLanguages[i].children[j].children[u].feedCategory.langs.pt.productCategoryGreatGrandChild,\n })\n }\n\n }\n }\n }\n }\n setDetermineLangList(languageList)\n }, [categoryLanguages]);\n\n const equalizeLang = (langData) => {\n if (langData === 'sp') {\n return 'es'\n }\n if (langData === 'ge') {\n return 'de'\n }\n return langData\n }\n\n const getCateogryLanguage = (lang, category) => {\n const categoryText = determineLangList?.filter((langData) => langData.originalCategoryName === category)[0]\n if (lang && categoryText) {\n return categoryText[equalizeLang(lang)] || category\n }\n return category\n }\n\n useEffect(() => {\n let canceled = false;\n userApi.getUser().then((userData) => {\n const use = { ...userData };\n if (canceled) {\n return;\n }\n setUser(use.data);\n }).catch(\n (error) => {\n auth.signout(() => {\n window.location.href = '/login';\n });\n return Promise.reject(error);\n },\n );\n\n return () => {\n canceled = true;\n };\n }, [refreshUser]);\n useEffect(() => {\n let canceled = false;\n\n languageApi.getLanguages().then((data) => {\n if (canceled) {\n return;\n }\n setLanguages(data.data);\n setisLoadingLanguages(false);\n });\n\n return () => {\n canceled = true;\n };\n }, []);\n\n useEffect(() => {\n if (user) {\n userApi.updateUser(user.sid, { ...user, cartItems: cart?.cart });\n }\n }, [cart]);\n\n if (program && program.status === false) {\n auth.signout(() => {\n window.location = '/';\n });\n return (\n \n );\n }\n\n if (isLoadingProgram || isLoadingLanguages) {\n return ;\n }\n const messages = languages[locale]?.messages\n console.log(languages)\n const { theme } = program;\n let gridType;\n const root = document.documentElement;\n if (theme !== undefined) {\n root?.style.setProperty('--accent-color', theme.color1);\n root?.style.setProperty('--buttons-theme-color', theme.color2);\n root?.style.setProperty('--link-color', theme.color3);\n gridType = theme && theme.gridType;\n }\n\n if ((program && program.feedStatus) && (\n // program.feedStatus.status === 'Started'\n // || program.feedStatus.status === 'Feed Requested'\n // || program.feedStatus.status === 'Feed Received'\n program.feedStatus.status === 'Cleared Catalog'\n || program.feedStatus.status === 'Created Categories'\n || program.feedStatus.status === 'Created Products'\n || program.feedStatus.status === 'Set Category Items'\n // || program.feedStatus.status === 'Created Brands'\n // || program.feedStatus.status === 'Completed'\n || program.feedStatus.status === 'Completed with Error'\n )) {\n return (\n \n \n \n \n \n \n \n );\n }\n\n if (!user) { return ; }\n if (user.status === 'Used') {\n return (\n \n \n \n \n \n \n \n \n \n );\n }\n return (\n \n \n \n \n \n {program && (\n \n \n {program?.fullName} \n \n \n )}\n\n \n\n \n\n \n \n
\n\n
\n\n
\n
\n \n {\n if (auth.isAuthenticated()) return ;\n window.location = '/login';\n return ;\n }}\n />\n {\n if (auth.isAuthenticated()) return ;\n return (\n \n );\n }}\n />\n {\n if (auth.isAuthenticated()) {\n const { match } = props;\n const { params } = match;\n const { categorySlug } = params;\n return (\n \n );\n }\n return (\n \n );\n }}\n />\n {\n if (auth.isAuthenticated()) {\n const { match } = props;\n const { params } = match;\n const { pageName } = params;\n return (\n \n );\n }\n return (\n \n );\n }}\n />\n {\n if (auth.isAuthenticated()) {\n const { match } = props;\n const { params } = match;\n const { pageName } = params;\n console.log(pageName)\n return (\n \n );\n }\n return (\n \n );\n }}\n />\n {\n if (auth.isAuthenticated()) {\n const { match } = props;\n const { params } = match;\n const { productSlug } = params;\n return (\n \n );\n }\n return (\n \n );\n }}\n />\n {\n return (\n \n );\n }}\n />\n \n {\n if (auth.isAuthenticated()) {\n return (\n \n );\n }\n return (\n \n );\n }}\n />\n \n \n {orderSummary && }\n \n\n \n \n \n\n \n\n \n \n
\n\n
\n
\n \n \n \n \n \n );\n}\n\nLayout.propTypes = {\n headerLayout: PropTypes.oneOf(['default', 'compact']),\n};\n\nLayout.defaultProps = {\n headerLayout: 'compact',\n};\n\nconst mapStateToProps = (state) => ({\n cart: state,\n locale: state.locale,\n});\n\nexport default connect(mapStateToProps)(Layout);\n","// react\nimport React, { useState } from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { useLocation } from 'react-router-dom';\n// third-party\nimport { Helmet } from 'react-helmet-async';\nimport userApi from '../../server/real/endpoints/users';\n\nexport default function AccountPageResetPassword() {\n const [password, setPassword] = useState('');\n const [password2, setPassword2] = useState('');\n\n function onPasswordChange(e) {\n setPassword(e.target.value);\n }\n function onValidationPasswordChange(e) {\n setPassword2(e.target.value);\n }\n\n function validationMessages() {\n const errorMessageList = [];\n if (password.length > 0) {\n if (password.search(/[a-z]/) < 0) {\n errorMessageList.push( );\n }\n if (password.search(/[A-Z]/) < 0) {\n errorMessageList.push( );\n }\n if (password.search(/[.^#!'<>\"&/%*+?^${}()|[\\]\\\\]/g, '\\\\$&') < 0) {\n errorMessageList.push( );\n }\n if (password.search(/[0-9]/) < 0) {\n errorMessageList.push( );\n }\n if (password.length < 8) {\n errorMessageList.push( );\n }\n if (password.length > 16) {\n errorMessageList.push( );\n }\n }\n\n // setGreen('form-control is-invalid');\n return errorMessageList;\n }\n\n function password2Valid() {\n if (password === password2 && password.length > 0) {\n return true;\n }\n return false;\n }\n\n function confirmValidationComponent() {\n const valid = password2Valid();\n if (valid) {\n return ( );\n }\n return ( );\n }\n\n function formClassName() {\n const messages = validationMessages();\n if (password.length > 0) {\n if (messages.length > 0) {\n return 'form-control is-invalid';\n }\n\n return 'form-control is-valid';\n }\n return 'form-control';\n }\n\n function validationFormClassName() {\n const isPassword2Valid = password2Valid();\n if (password2.length > 0) {\n if (!isPassword2Valid) {\n return 'form-control is-invalid';\n }\n return 'form-control is-valid';\n }\n return 'form-control';\n }\n\n function passwordValid() {\n if (password === password2 && validationFormClassName() === formClassName() && password.length > 7) {\n return false;\n }\n return true;\n }\n\n const { search } = useLocation();\n const token = new URLSearchParams(search).get('token');\n const email = new URLSearchParams(search).get('email');\n\n const resetPassword = () => {\n userApi.resetPassword(email, password, token).then((response) => {\n if (response.data.success) { window.location = '/'; }\n });\n };\n\n return (\n \n
\n Reset Password \n \n\n
\n
\n \n
\n
\n
\n
\n
\n
\n \n \n\n
\n {validationMessages().map((message) => (
{message}
))}\n\n
\n
\n
\n
\n \n \n
\n\n
{confirmValidationComponent()}
\n\n
\n
\n\n
\n \n \n \n
\n
\n
\n
\n
\n );\n}\n","// react\nimport React, { useContext, useEffect, useState } from 'react';\nimport { connect } from 'react-redux';\n\n// third-party\nimport { Helmet } from 'react-helmet-async';\nimport Sections from '../home/Sections';\n\n// data stubs\nimport ProgramContext from '../../contexts/ProgramContext';\nimport programApi from '../../server/real/endpoints/programs';\n\nfunction ProgramNotAccessable(props) {\n const { program } = useContext(ProgramContext);\n const { locale, region } = props;\n const [page, setPage] = useState();\n useEffect(() => {\n if (!program) return;\n const content = programApi.getContent(program, locale);\n if (!content) return;\n const { pages } = content;\n if (!pages) return;\n const homePageData = pages.filter((data) => data.url === 'closed');\n if (homePageData.length === 0) return;\n setPage(homePageData[0]);\n }, [program, locale, region]);\n return (\n \n
\n {`Program is not accessable — ${program.fullName}`} \n \n\n
\n {page && page.sections.length > 0 ?
: (\n
\n
\n Opps...\n
\n\n
\n
The incentive program you are attempting to reach is either temporarily unavailable or has ended. \n\n
\n Please contact your program administrator for more details\n
\n\n
\n
\n)}\n
\n
\n );\n}\n\nconst mapStateToProps = (state) => ({\n region: state.region,\n locale: state.locale,\n});\n\nexport default connect(mapStateToProps)(ProgramNotAccessable);\n","// react\nimport React, { Component } from 'react';\n\n// third-party\nimport { connect } from 'react-redux';\nimport { Link } from 'react-router-dom';\n\nimport { mobileMenuOpen } from '../../store/mobile-menu';\nimport ProgramContext from '../../contexts/ProgramContext';\n\nclass MobileHeader extends Component {\n constructor(props) {\n super(props);\n\n this.state = {\n searchOpen: false,\n };\n this.searchInput = React.createRef();\n }\n\n componentDidUpdate(prevProps, prevState) {\n const { searchOpen } = this.state;\n\n if (searchOpen && searchOpen !== prevState.searchOpen && this.searchInput.current) {\n this.searchInput.current.focus();\n }\n }\n\n handleOpenSearch = () => {\n this.setState(() => ({ searchOpen: true }));\n };\n\n handleCloseSearch = () => {\n this.setState(() => ({ searchOpen: false }));\n };\n\n render() {\n return (\n \n
\n
\n
\n
\n {(context) => {\n let logo;\n const { program } = context;\n const { theme } = program;\n if (theme !== undefined) {\n logo = (\n \n \n \n );\n }\n return logo;\n }}\n \n
\n
\n
\n
\n );\n }\n}\n\nconst mapStateToProps = (state) => ({\n cart: state.cart,\n locale: state.locale,\n});\n\nconst mapDispatchToProps = {\n openMobileMenu: mobileMenuOpen,\n};\n\nexport default connect(\n mapStateToProps,\n mapDispatchToProps,\n)(MobileHeader);\n","// react\nimport React, { useEffect, useState } from 'react';\n\n// third-party\nimport { Helmet } from 'react-helmet-async';\nimport { Route, Switch, useHistory } from 'react-router-dom';\nimport { ToastContainer } from 'react-toastify';\nimport { connect } from 'react-redux';\nimport { IntlProvider } from 'react-intl';\nimport { FormattedMessage } from 'react-intl';\nimport SitePageNotFound from './site/SitePageNotFound';\nimport AccountPageResetPassword from './account/AccountPageResetPassword';\n\n// application\n\n// pages\nimport BlockLoader from './blocks/BlockLoader';\nimport AccountPageLogin from './account/AccountPageLogin';\nimport Footer from './footer';\n\nimport ProgramContext from '../contexts/ProgramContext';\nimport UserContext from '../contexts/UserContext';\nimport SiteProgramClosed from './site/SiteProgramClosed';\n\n// data stubs\nimport programApi from '../server/real/endpoints/programs';\nimport userApi from '../server/real/endpoints/users';\nimport languageApi from '../server/real/endpoints/languages';\nimport MobileHeaderLogin from './mobile/MobileHeaderLogin';\n\nfunction Layout(props) {\n const { locale } = props;\n const [program, setProgram] = useState();\n const [languages, setLanguages] = useState();\n const [isLoadingProgram, setisLoadingProgram] = useState(true);\n const [isLoadingLanguages, setisLoadingLanguages] = useState(true);\n const history = useHistory();\n const [user, setUser] = useState({\n addresses: [],\n });\n useEffect(() => {\n const preloader = document.querySelector('.site-preloader');\n if (preloader) {\n preloader.addEventListener('transitionend', (event) => {\n if (event.propertyName === 'opacity' && preloader.parentNode) {\n preloader.parentNode.removeChild(preloader);\n }\n });\n preloader.classList.add('site-preloader__fade');\n }\n\n return () => {\n };\n }, [program, languages, user]);\n\n useEffect(() => {\n let canceled = false;\n\n programApi.getProgram().then((programData) => {\n if (!programData.data) {\n history.push('/login/not-found');\n }\n if (canceled) {\n return;\n }\n setProgram(programData.data);\n setisLoadingProgram(false);\n });\n\n return () => {\n canceled = true;\n };\n }, []);\n\n useEffect(() => {\n let canceled = false;\n userApi.getUser().then((userData) => {\n const use = { ...userData };\n if (canceled) {\n return;\n }\n setUser(use.data);\n });\n\n return () => {\n canceled = true;\n };\n }, []);\n\n useEffect(() => {\n let canceled = false;\n\n languageApi.getLanguages().then((data) => {\n if (canceled) {\n return;\n }\n setLanguages(data.data);\n setisLoadingLanguages(false);\n });\n\n return () => {\n canceled = true;\n };\n }, []);\n\n if (isLoadingProgram || isLoadingLanguages) {\n return ;\n }\n const { messages } = languages?.[locale];\n const { theme } = program;\n const root = document.documentElement;\n if (theme !== undefined) {\n root?.style.setProperty('--accent-color', theme.color1);\n root?.style.setProperty('--buttons-theme-color', theme.color2);\n root?.style.setProperty('--link-color', theme.color3);\n }\n return (\n \n \n \n \n {program && (\n \n \n {program.fullName} \n \n \n )}\n \n
\n
\n \n
\n
\n
\n
\n\n
\n
\n
\n
\n {program && (\n
\n \n
\n \n )}\n
\n
\n
\n {/*
*/}\n
\n \n\n
\n\n
\n \n \n \n \n \n
\n\n
\n
\n \n \n \n \n );\n}\n\nLayout.defaultProps = {\n headerLayout: 'compact',\n};\n\nconst mapStateToProps = (state) => ({\n locale: state.locale,\n});\n\nexport default connect(mapStateToProps)(Layout);\n","import React, { Component } from 'react';\nimport { withOktaAuth } from '@okta/okta-react';\nimport programApi from '../../server/real/endpoints/programs';\nimport { useSearchParams } from 'react-router-dom';\n\nexport default withOktaAuth(class Home extends Component {\n constructor(props) {\n super(props);\n this.login = this.login.bind(this);\n this.state = {\n user: undefined,\n }\n }\n\n \n async logout() {\n await this.props.oktaAuth.signOut();\n }\n\n async login() {\n await this.props.oktaAuth.signInWithRedirect();\n }\n componentDidMount(e) {\n const params = new URLSearchParams(window.location.search)\n const emailAddresses = [\"miles.graham@spglobal.com\",\"carolina.onetto@spglobal.com\",\"hugh.pleasants@spglobal.com\",\"edward.nico.alves@spglobal.com\",\"rehan.tayyar@spglobal.com\",\"sobiya.rahat@spglobal.com\", \"zekeriya@webservicespros.com\", \"test.leaderspromo.user@spglobal.com\", \"gabriel.gumabon@spglobal.com\"]\n if (params.get('emailID')?.toLowerCase() && !params.get('redirect')) {\n programApi.getUserWithoutApi(params.get('emailID')).then((userData) => {\n this.setState({\n user: userData.data\n });\n }); \n } else if(params.get('redirect')) {\n this.login()\n }\n}\n\n\n render() {\n const value = (100000).toLocaleString(\n undefined, // leave undefined to use the visitor's browser \n // locale or a string like 'en-US' to override it.\n { minimumFractionDigits: 2 }\n );\n const params = new URLSearchParams(window.location.search)\n const emailAddresses = [\"miles.graham@spglobal.com\",\"carolina.onetto@spglobal.com\",\"hugh.pleasants@spglobal.com\",\"edward.nico.alves@spglobal.com\",\"rehan.tayyar@spglobal.com\",\"sobiya.rahat@spglobal.com\", \"zekeriya@webservicespros.com\", \"test.leaderspromo.user@spglobal.com\", \"gabriel.gumabon@spglobal.com\"]\n let d = new Date(this.state.user?.lastUpdateDate);\n var datestring = (d.getMonth()+1) + \"/\" + d.getDate() + \"/\" + d.getFullYear()\n if (!emailAddresses.includes(params.get('emailID')?.toLowerCase())) {\n return (\n \n
\n {/*
\n
\n
Exciting News!
\n
Reward Points Coming Soon
*/}\n
\n )\n }\n if (params.get('redirect')) {\n return (\n\n
\n
\n
\n
Just a moment... \n
\n
\n We're redirecting you to the site... \n
\n
\n )\n }\n if (!this.state.user) return null\n\n if (this.state.user && emailAddresses.includes(params.get('emailID')?.toLowerCase())) {\n return (\n \n {this.state?.user?.balance !== 0 &&
CONGRATULATIONS!
}\n
\n
As of {datestring} You have
\n
{this.state?.user?.balance.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\")} Points
\n
\n
\n\n );\n \n }\n }\n});\n","// react\nimport React, { useEffect, useState } from 'react';\nimport { useOktaAuth } from '@okta/okta-react';\nimport { useHistory } from 'react-router-dom';\nimport axios from 'axios';\nimport '../../scss/redirect.css';\n// import { useHistory } from 'react-router-dom';\n\n// third-party\n\n// data stubs\n// import UserContext from '../../contexts/UserContext';\n// import ProgramContext from '../../contexts/ProgramContext';\n\nexport default function RedirectOidc() {\n const { authState, oktaAuth } = useOktaAuth();\n const [userInfo, setUserInfo] = useState(null);\n const [oidcData, setOidcData] = useState();\n const history = useHistory();\n\n useEffect(() => {\n if (!authState || !authState.isAuthenticated) {\n // When user isn't authenticated, forget any user info\n setUserInfo(null);\n } else {\n // You can also get user information from the `/userinfo` endpoint\n \n oktaAuth.getUser().then((info) => {\n setUserInfo({email: info.email, token: authState?.accessToken?.accessToken});\n });\n }\n }, [authState, oktaAuth]);\n\n useEffect(() => {\n if (userInfo !== null) {\n axios.post('/signin-oidc', userInfo).then(response => {\n if (response.data)\n setOidcData(response.data.access_token);\n })\n }\n }, [userInfo]);\n\n useEffect(() => {\n if (oidcData) {\n sessionStorage.setItem('access_token', oidcData);\n setTimeout(() => {\n window.location = '/'\n }, 2000)\n }\n }, [oidcData]);\n\nreturn (\n\n
\n
\n
\n
Just a moment... \n
\n
\n We're redirecting you to the site... Not working? \n \n Click here. \n \n
\n
\n);\n}\n","// react\nimport React, { useEffect, useState } from 'react';\nimport { useOktaAuth } from '@okta/okta-react';\nimport { useHistory } from 'react-router-dom';\nimport axios from 'axios';\n\n// third-party\n\n// data stubs\n// import UserContext from '../../contexts/UserContext';\n// import ProgramContext from '../../contexts/ProgramContext';\n\nexport default function CallbackOkta() {\n const { authState, oktaAuth } = useOktaAuth();\n const [userInfo, setUserInfo] = useState(null);\n const [oidcData, setOidcData] = useState();\n const [counter, setCounter] = useState(0);\n const history = useHistory();\n\n useEffect(() => {\n if (!authState || !authState.isAuthenticated) {\n // When user isn't authenticated, forget any user info\n setUserInfo(null);\n } else {\n // You can also get user information from the `/userinfo` endpoint\n \n oktaAuth.getUser().then((info) => {\n setUserInfo({email: info.email, token: authState?.accessToken?.accessToken});\n });\n }\n }, [authState, oktaAuth]);\n\n useEffect(() => {\n if (userInfo !== null) {\n axios.post('/signin-oidc', userInfo).then(response => {\n if (response.data)\n setOidcData(response.data.access_token);\n })\n }\n }, [userInfo]);\n\n useEffect(() => {\n\n if (oidcData && counter === 0) {\n setCounter(counter + 1)\n window.open(window.location.origin+'/mindtickle/redirect', '_blank')\n\n }\n }, [oidcData]);\n useEffect(() => {\n if (userInfo !== null && oidcData) {\n setTimeout(() => {\n history.push(\"/mindtickle/score\" + \"?emailID=\" + userInfo?.email)\n }, 5000);\n }\n\n }, [userInfo, oidcData]);\n return (\n \n
\n
\n
\n
Just a moment... \n
\n
\n We're redirecting you to the site... Not working? \n \n Click here. \n \n
\n
\n );\n }\n","// react\nimport React, { Component, useState } from 'react';\n\n// third-party\nimport PropTypes from 'prop-types';\nimport {\n BrowserRouter,\n Route,\n Redirect,\n Switch,\n} from 'react-router-dom';\nimport { connect } from 'react-redux';\nimport { Helmet, HelmetProvider } from 'react-helmet-async';\nimport { ScrollContext } from 'react-router-scroll-4';\nimport { OktaAuth, toRelativeUrl } from '@okta/okta-auth-js';\nimport { LoginCallback, Security, SecureRoute } from '@okta/okta-react';\n\n// application\nimport { localeChange } from '../store/locale';\nimport programApi from '../server/real/endpoints/programs';\n\n// pages\nimport Layout from './Layout';\nimport LoginLayout from './LoginLayout';\nimport MindTickle from './shop/MindTickle';\nimport RedirectOidc from './shop/RedirectOidc';\nimport auth from '../server/real/endpoints/auth';\nimport CallbackOkta from './shop/Callback';\n\n\nclass Root extends Component {\n\n shouldUpdateScroll = (prevRouterProps, { location }) => (\n prevRouterProps && location.pathname !== prevRouterProps.location.pathname\n );\n\n\n constructor(props) {\n super(props);\n this.restoreOriginalUri = async (_oktaAuth, originalUri) => {\n window.location = toRelativeUrl(originalUri || '/mindtickle/redirect', window.location.origin);\n };\n this.state = {\n programData: undefined,\n }\n }\n componentDidMount() {\n programApi.getProgram().then((programData) => {\n this.setState({\n programData: programData.data\n });\n });\n }\n render() {\n const { locale } = this.props;\n const direction = 'ltr';\n let oktaAuth\n if (this.state?.programData?.ssoEnabled) {\n oktaAuth = new OktaAuth({\n issuer: this.state.programData?.oktaConfig?.serviceURL,\n clientId: this.state.programData?.oktaConfig?.clientId,\n redirectUri: window.location.origin + '/mindtickle/callback'\n });\n }\n if (!this.state?.programData) return null\n if (auth.isAuthenticated()) {\n return (\n \n \n \n \n \n (\n \n )}\n />\n \n \n \n \n \n );\n }\n return (\n \n \n \n \n \n (\n \n )}\n />\n \n \n \n \n \n \n \n \n \n \n \n );\n }\n\n }\n\nRoot.propTypes = {\n /** current locale */\n locale: PropTypes.string,\n program: PropTypes.string,\n};\n\nconst mapStateToProps = (state) => ({\n locale: state.locale,\n});\n\nconst mapDispatchToProps = {\n localeChange,\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(Root);\n","function createThunkMiddleware(extraArgument) {\n return function (_ref) {\n var dispatch = _ref.dispatch,\n getState = _ref.getState;\n return function (next) {\n return function (action) {\n if (typeof action === 'function') {\n return action(dispatch, getState, extraArgument);\n }\n\n return next(action);\n };\n };\n };\n}\n\nvar thunk = createThunkMiddleware();\nthunk.withExtraArgument = createThunkMiddleware;\n\nexport default thunk;","// third-party\nimport { createStore, applyMiddleware, compose } from 'redux';\nimport thunk from 'redux-thunk';\n\n// reducer\nimport rootReducer from './rootReducer';\nimport version from './version';\n\nfunction load() {\n let state;\n\n try {\n state = localStorage.getItem('state');\n\n if (typeof state === 'string') {\n state = JSON.parse(state);\n }\n\n if (state && state.version !== version) {\n state = undefined;\n }\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error(error);\n }\n\n return state || undefined;\n}\n\nconst store = createStore(rootReducer, load(), compose(\n applyMiddleware(thunk),\n // window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__()\n));\n\nfunction save() {\n try {\n localStorage.setItem('state', JSON.stringify(store.getState()));\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error(error);\n }\n}\n\nstore.subscribe(() => save());\n\nexport default store;\n","import { combineReducers } from 'redux';\n\n// reducers\nimport cartReducer from './cart';\nimport localeReducer from './locale';\nimport regionReducer from './region';\nimport mobileMenuReducer from './mobile-menu';\nimport quickviewReducer from './quickview';\nimport sidebarReducer from './sidebar';\nimport version from './version';\n\nexport default combineReducers({\n version: (state = version) => state,\n cart: cartReducer,\n locale: localeReducer,\n region: regionReducer,\n mobileMenu: mobileMenuReducer,\n quickview: quickviewReducer,\n sidebar: sidebarReducer,\n});\n","const version = 2;\n\nexport default version;\n","import { LOCALE_CHANGE } from './localeActionTypes';\n\nconst initialState = 'en';\n\nexport default function localeReducer(state = initialState, action) {\n if (action.type === LOCALE_CHANGE) {\n return action.locale;\n }\n\n return state;\n}\n","import store from './store';\n\nexport default store;\n","// react\nimport React from 'react';\n\n// third-party\nimport ReactDOM from 'react-dom';\nimport { Provider } from 'react-redux';\n\n// application\nimport * as serviceWorker from './serviceWorker';\nimport Root from './components/Root';\nimport store from './store';\n\n// styles\nimport 'slick-carousel/slick/slick.css';\nimport 'react-toastify/dist/ReactToastify.min.css';\nimport '@fortawesome/fontawesome-free/css/all.min.css';\nimport 'react-input-range/lib/css/index.css';\nimport './scss/style.scss';\n\nReactDOM.render((\n // eslint-disable-next-line react/jsx-filename-extension\n \n \n \n), document.getElementById('root'));\n\n// If you want your app to work offline and load faster, you can change\n// unregister() to register() below. Note this comes with some pitfalls.\n// Learn more about service workers: https://bit.ly/CRA-PWA\nserviceWorker.unregister();\n"],"names":["module","exports","obj","predicate","ret","keys","Object","isArr","Array","isArray","i","length","key","val","indexOf","ReactPropTypesSecret","require","emptyFunction","emptyFunctionWithReset","resetWarningCache","shim","props","propName","componentName","location","propFullName","secret","err","Error","name","getShim","isRequired","ReactPropTypes","array","bigint","bool","func","number","object","string","symbol","any","arrayOf","element","elementType","instanceOf","node","objectOf","oneOf","oneOfType","shape","exact","checkPropTypes","PropTypes","hasOwn","hasOwnProperty","classNames","classes","arguments","arg","appendClass","parseValue","apply","toString","prototype","includes","call","value","newClass","default","reactIs","REACT_STATICS","childContextTypes","contextType","contextTypes","defaultProps","displayName","getDefaultProps","getDerivedStateFromError","getDerivedStateFromProps","mixins","propTypes","type","KNOWN_STATICS","caller","callee","arity","MEMO_STATICS","compare","TYPE_STATICS","getStatics","component","isMemo","ForwardRef","render","Memo","defineProperty","getOwnPropertyNames","getOwnPropertySymbols","getOwnPropertyDescriptor","getPrototypeOf","objectPrototype","hoistNonReactStatics","targetComponent","sourceComponent","blacklist","inheritedComponent","concat","targetStatics","sourceStatics","descriptor","e","_inputRange","QueryHandler","options","this","deferSetup","setup","constructor","initialised","on","match","off","unmatch","destroy","equals","target","Slider","_classCallCheck","_this","_possibleConstructorReturn","__proto__","ariaLabelledby","_propTypes2","ariaControls","formatLabel","maxValue","minValue","onSliderDrag","onSliderKeyDown","percentage","removeDocumentMouseMoveListener","removeDocumentMouseUpListener","removeDocumentTouchEndListener","removeDocumentTouchMoveListener","position","left","ownerDocument","addEventListener","handleMouseMove","handleMouseUp","handleTouchMove","handleTouchEnd","removeEventListener","addDocumentMouseMoveListener","addDocumentMouseUpListener","event","addDocumentTouchEndListener","addDocumentTouchMoveListener","_this2","style","getStyle","_react2","createElement","className","sliderContainer","ref","_label2","slider","draggable","onKeyDown","handleKeyDown","onMouseDown","handleMouseDown","onTouchStart","handleTouchStart","role","tabIndex","Component","_react","_interopRequireDefault","_innerSlider","_json2mq","_defaultProps","_innerSliderUtils","__esModule","_typeof","Symbol","iterator","_extends","assign","source","ownKeys","enumerableOnly","symbols","filter","sym","enumerable","push","_objectSpread","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","_defineProperties","configurable","writable","_setPrototypeOf","o","p","setPrototypeOf","_createSuper","Derived","hasNativeReflectConstruct","Reflect","construct","sham","Proxy","Date","_isNativeReflectConstruct","result","Super","_getPrototypeOf","NewTarget","self","_assertThisInitialized","ReferenceError","enquire","canUseDOM","_React$Component","subClass","superClass","TypeError","create","_inherits","Constructor","protoProps","staticProps","_super","instance","innerSlider","slickPrev","slickNext","slide","dontAnimate","undefined","slickGoTo","pause","autoPlay","state","breakpoint","_responsiveMediaHandlers","query","handler","register","responsive","breakpoints","map","breakpt","sort","x","y","index","bQuery","minWidth","maxWidth","media","setState","slice","unregister","settings","newProps","_this3","resp","centerMode","slidesToScroll","fade","slidesToShow","children","Children","toArray","child","trim","variableWidth","rows","slidesPerRow","console","warn","newChildren","currentWidth","newSlide","j","row","k","width","cloneElement","display","unslick","InnerSlider","innerSliderRefHandler","reTrim","reIsBadHex","reIsBinary","reIsOctal","freeParseInt","parseInt","freeGlobal","global","freeSelf","root","Function","objectToString","nativeMax","Math","max","nativeMin","min","now","isObject","toNumber","isObjectLike","isSymbol","other","valueOf","replace","isBinary","test","wait","lastArgs","lastThis","maxWait","timerId","lastCallTime","lastInvokeTime","leading","maxing","trailing","invokeFunc","time","args","thisArg","shouldInvoke","timeSinceLastCall","timerExpired","trailingEdge","setTimeout","remainingWait","debounced","isInvoking","leadingEdge","cancel","clearTimeout","flush","MediaQueryDispatch","utils","bind","Axios","mergeConfig","createInstance","defaultConfig","context","request","extend","axios","instanceConfig","defaults","Cancel","CancelToken","isCancel","all","promises","Promise","spread","isAxiosError","isStandardBrowserEnv","originURL","msie","navigator","userAgent","urlParsingNode","document","resolveURL","url","href","setAttribute","protocol","host","search","hash","hostname","port","pathname","charAt","window","requestURL","parsed","isString","Track","_classnames","getSlideClasses","spec","slickActive","slickCenter","slickCloned","centerOffset","rtl","slideCount","floor","currentSlide","targetSlide","getKey","fallbackKey","renderSlides","slides","preCloneSlides","postCloneSlides","childrenCount","count","startIndex","lazyStartIndex","endIndex","lazyEndIndex","elem","childOnClickOptions","message","lazyLoad","lazyLoadedList","childStyle","slideWidth","vertical","top","slideHeight","opacity","useCSS","transition","speed","cssEase","getSlideStyle","slideClass","slideClasses","outline","onClick","focusOnSelect","infinite","preCloneNo","getPreClones","reverse","_React$PureComponent","_len","_key","_this$props","mouseEvents","onMouseEnter","onMouseOver","onMouseLeave","handleRef","trackStyle","PureComponent","classNamesShape","timeoutsShape","enhanceError","config","code","response","error","f","g","Fragment","for","h","m","__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED","ReactCurrentOwner","n","__self","__source","q","c","a","b","d","l","$$typeof","_owner","current","jsx","jsxs","clamp","slidesOnLeft","slidesOnRight","siblingDirection","getTotalSlides","getPostClones","getTrackLeft","getTrackAnimateCSS","getTrackCSS","checkSpecKeys","getSlideCount","checkNavigable","getNavigableIndexes","swipeEnd","swipeMove","swipeStart","keyHandler","changeSlide","slideHandler","initializedState","extractObject","canGoNext","getSwipeDirection","getHeight","getWidth","lazySlidesOnRight","lazySlidesOnLeft","getRequiredLazySlides","getOnDemandLazySlides","safePreventDefault","lowerBound","upperBound","_reactName","preventDefault","onDemandSlides","slideIndex","requiredSlides","centerPadding","offsetWidth","offsetHeight","touchObject","xDist","yDist","r","swipeAngle","verticalSwiping","startX","curX","startY","curY","atan2","round","PI","abs","canGo","newObject","listNode","listRef","listWidth","ceil","trackNode","trackRef","trackWidth","centerPaddingAdj","querySelector","listHeight","initialSlide","slidesToLoad","autoplaying","autoplay","waitForAnimate","animating","finalSlide","animationLeft","finalLeft","animationSlide","nextState","swipeLeft","indexOffset","previousInt","slideOffset","previousTargetSlide","direction","Number","accessibility","tagName","keyCode","swipe","dragging","touches","pageX","clientX","pageY","clientY","scrolling","swipeToSlide","edgeFriction","edgeDragged","onEdge","swiped","swiping","swipeEvent","curLeft","swipeLength","sqrt","pow","verticalSwipeLength","positionOffset","dotCount","swipeDirection","touchSwipeLength","touchThreshold","onSwipe","minSwipe","activeSlide","currentLeft","counter","indexes","navigables","prevNavigable","swipedSlide","slickList","querySelectorAll","from","every","offsetTop","offsetLeft","currentIndex","dataset","keysArray","reduce","trackHeight","trackChildren","WebkitTransition","useTransform","WebkitTransform","transform","msTransform","height","attachEvent","marginTop","marginLeft","targetLeft","slidesToOffset","targetSlideIndex","trackElem","childNodes","_ref","right","_ref2","camel2hyphen","obj2mq","mq","features","feature","isDimension","separator","separatorIndex","isFunction","each","collection","fn","numA","numB","_utils","isNumber","baseURL","relativeURL","normalizeHeaderName","DEFAULT_CONTENT_TYPE","setContentTypeIfUnset","headers","isUndefined","transitional","silentJSONParsing","forcedJSONParsing","clarifyTimeoutError","adapter","XMLHttpRequest","process","getDefaultAdapter","transformRequest","data","isFormData","isArrayBuffer","isBuffer","isStream","isFile","isBlob","isArrayBufferView","buffer","isURLSearchParams","rawValue","parser","encoder","JSON","parse","stringify","stringifySafely","transformResponse","strictJSONParsing","responseType","timeout","xsrfCookieName","xsrfHeaderName","maxContentLength","maxBodyLength","validateStatus","status","common","method","merge","valueTransformer","_keyCodes","InputRange","startValue","isSliderDragging","lastKeyMoved","allowSameValues","disabled","draggableTrack","_rangePropType2","onChangeStart","onChange","onChangeComplete","step","_valuePropType2","_defaultClassNames2","disabledInputRange","inputRange","getClientRect","values","getValueFromProps","isMultiValue","positions","getPositionsFromValues","getTrackClientRect","distanceTo","currentValues","isWithinRange","hasStepDifference","updatePositions","getValueFromPosition","transformedValues","getStepValueFromValue","updateValues","shouldUpdate","updateValue","getPositionFromEvent","requestAnimationFrame","updatePosition","prevEvent","_props","_props$value","stepValue","prevPosition","prevValue","offset","LEFT_ARROW","DOWN_ARROW","decrementValue","RIGHT_ARROW","UP_ARROW","incrementValue","_props2","_props2$value","getKeyByPosition","isDefined","handleInteractionStart","handleInteractionEnd","percentages","getPercentagesFromValues","getKeys","_props3","_slider2","handleSliderDrag","handleSliderKeyDown","_this4","captialize","_this5","componentClassName","getComponentClassName","onKeyUp","handleKeyUp","_track2","onTrackDrag","handleTrackDrag","onTrackMouseDown","handleTrackMouseDown","renderSliders","renderHiddenInputs","_propTypes","_reactLifecyclesCompat","_ChildMapping","TransitionGroup","handleExited","firstRender","_proto","getChildContext","transitionGroup","isMounting","appeared","componentDidMount","mounted","componentWillUnmount","nextProps","prevChildMapping","getInitialChildMapping","getNextChildMapping","currentChildMapping","getChildMapping","onExited","childFactory","excluded","sourceKeys","_objectWithoutPropertiesLoose","appear","enter","exit","_default","polyfill","settle","cookies","buildURL","buildFullPath","parseHeaders","isURLSameOrigin","createError","resolve","reject","requestData","requestHeaders","auth","username","password","unescape","encodeURIComponent","Authorization","btoa","fullPath","onloadend","responseHeaders","getAllResponseHeaders","responseText","statusText","open","toUpperCase","params","paramsSerializer","onreadystatechange","readyState","responseURL","onabort","onerror","ontimeout","timeoutErrorMessage","xsrfValue","withCredentials","read","toLowerCase","setRequestHeader","onDownloadProgress","onUploadProgress","upload","cancelToken","promise","then","abort","send","normalizedName","propIsEnumerable","propertyIsEnumerable","test1","String","test2","fromCharCode","join","test3","split","letter","shouldUseNative","to","toObject","s","_off","_on","_scrollLeft","_scrollTop","_requestAnimationFrame","ScrollBehavior","addTransitionHook","stateStorage","getCurrentLocation","shouldUpdateScroll","_restoreScrollRestoration","_oldScrollRestoration","history","scrollRestoration","_onWindowScroll","_ignoreScrollEvents","_saveWindowPositionHandle","_saveWindowPosition","_windowScrollTarget","_this$_windowScrollTa","xTarget","yTarget","_cancelCheckWindowScroll","_savePosition","_checkWindowScrollPosition","_checkWindowScrollHandle","scrollToTarget","_numWindowScrollAttempts","_stateStorage","_getCurrentLocation","_shouldUpdateScroll","isMobileSafari","_scrollElements","_removeTransitionHook","scrollElement","savePositionHandle","_saveElementPosition","registerElement","invariant","saveElementPosition","onScroll","_updateElementScroll","unregisterElement","_this$_scrollElements","updateScroll","prevContext","_updateWindowScroll","stop","startIgnoringScrollEvents","stopIgnoringScrollEvents","save","_getScrollTarget","_this$_scrollElements2","scrollTarget","_getDefaultScrollTarget","_getSavedScrollTarget","action","targetElement","getElementById","getElementsByName","scrollIntoView","_target","pkg","validators","thing","deprecatedWarnings","currentVerArr","version","isOlderVersion","thanVersion","pkgVersionArr","destVer","validator","isDeprecated","formatMessage","opt","desc","opts","assertOptions","schema","allowUnknown","compatRaf","_inDOM","raf","curr","getTime","ms","prev","req","vendor","substr","some","rafKey","cb","id","aa","ba","Set","ca","da","ea","add","fa","ha","ia","ja","ka","B","acceptsBooleans","attributeName","attributeNamespace","mustUseProperty","propertyName","sanitizeURL","removeEmptyString","D","oa","pa","qa","ma","isNaN","na","la","removeAttribute","setAttributeNS","xlinkHref","ra","sa","ta","ua","wa","xa","ya","za","Aa","Ba","Ca","Da","Ea","Fa","Ga","Ha","Ia","Ja","E","Ma","Ka","La","Na","stack","Oa","Pa","prepareStackTrace","set","Qa","tag","_render","Ra","_context","_payload","_init","Sa","Ta","nodeName","Va","_valueTracker","get","getValue","setValue","stopTracking","Ua","Wa","checked","Xa","activeElement","body","Ya","defaultChecked","defaultValue","_wrapperState","initialChecked","Za","initialValue","controlled","$a","ab","bb","eb","db","fb","selected","defaultSelected","gb","dangerouslySetInnerHTML","hb","ib","jb","textContent","kb","lb","mb","nb","ob","namespaceURI","innerHTML","firstChild","removeChild","appendChild","MSApp","execUnsafeLocalFunction","pb","lastChild","nodeType","nodeValue","qb","animationIterationCount","borderImageOutset","borderImageSlice","borderImageWidth","boxFlex","boxFlexGroup","boxOrdinalGroup","columnCount","columns","flex","flexGrow","flexPositive","flexShrink","flexNegative","flexOrder","gridArea","gridRow","gridRowEnd","gridRowSpan","gridRowStart","gridColumn","gridColumnEnd","gridColumnSpan","gridColumnStart","fontWeight","lineClamp","lineHeight","order","orphans","tabSize","widows","zIndex","zoom","fillOpacity","floodOpacity","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeOpacity","strokeWidth","rb","sb","tb","setProperty","substring","ub","menuitem","area","base","br","col","embed","hr","img","input","keygen","link","meta","param","track","wbr","vb","wb","is","xb","srcElement","correspondingUseElement","parentNode","yb","zb","Ab","Bb","Cb","stateNode","Db","Eb","Fb","Gb","Hb","Ib","Jb","Kb","Lb","Mb","Ob","Pb","Qb","Rb","onError","Sb","Tb","Ub","Vb","Wb","Xb","Zb","alternate","return","flags","$b","memoizedState","dehydrated","ac","cc","sibling","bc","dc","ec","fc","gc","hc","ic","jc","kc","lc","mc","nc","Map","oc","pc","qc","rc","blockedOn","domEventName","eventSystemFlags","nativeEvent","targetContainers","sc","delete","pointerId","tc","vc","wc","lanePriority","unstable_runWithPriority","priority","hydrate","containerInfo","xc","yc","shift","zc","Ac","Bc","unstable_scheduleCallback","unstable_NormalPriority","Cc","Dc","Ec","animationend","animationiteration","animationstart","transitionend","Fc","Gc","Hc","animation","Ic","Jc","Kc","Lc","Mc","Nc","Oc","Pc","Qc","unstable_now","F","Rc","Uc","pendingLanes","expiredLanes","suspendedLanes","pingedLanes","Vc","entangledLanes","entanglements","Wc","Xc","Yc","Zc","$c","eventTimes","clz32","bd","cd","log","LN2","dd","unstable_UserBlockingPriority","ed","fd","gd","hd","uc","jd","kd","ld","md","nd","od","charCode","pd","qd","rd","_targetInst","currentTarget","isDefaultPrevented","defaultPrevented","returnValue","isPropagationStopped","stopPropagation","cancelBubble","persist","isPersistent","wd","xd","yd","sd","eventPhase","bubbles","cancelable","timeStamp","isTrusted","td","ud","view","detail","vd","Ad","screenX","screenY","ctrlKey","shiftKey","altKey","metaKey","getModifierState","zd","button","buttons","relatedTarget","fromElement","toElement","movementX","movementY","Bd","Dd","dataTransfer","Fd","Hd","animationName","elapsedTime","pseudoElement","Id","clipboardData","Jd","Ld","Md","Esc","Spacebar","Left","Up","Right","Down","Del","Win","Menu","Apps","Scroll","MozPrintableKey","Nd","Od","Alt","Control","Meta","Shift","Pd","Qd","repeat","locale","which","Rd","Td","pressure","tangentialPressure","tiltX","tiltY","twist","pointerType","isPrimary","Vd","targetTouches","changedTouches","Xd","Yd","deltaX","wheelDeltaX","deltaY","wheelDeltaY","wheelDelta","deltaZ","deltaMode","Zd","$d","ae","be","documentMode","ce","de","ee","fe","ge","he","ie","le","color","date","datetime","email","month","range","tel","text","week","me","ne","oe","listeners","pe","qe","re","se","te","ue","ve","we","xe","ye","ze","oninput","Ae","detachEvent","Be","Ce","De","Ee","Fe","He","Ie","Je","Ke","Le","nextSibling","Me","contains","compareDocumentPosition","Ne","HTMLIFrameElement","contentWindow","Oe","contentEditable","Pe","Qe","Re","Se","Te","Ue","start","selectionStart","end","selectionEnd","anchorNode","defaultView","getSelection","anchorOffset","focusNode","focusOffset","Ve","We","Xe","Ye","Ze","Yb","listener","G","$e","has","af","bf","random","cf","df","capture","passive","Nb","w","z","u","t","v","ef","ff","parentWindow","gf","hf","J","K","Q","L","je","char","ke","unshift","jf","kf","lf","mf","autoFocus","nf","__html","of","pf","qf","rf","sf","previousSibling","tf","vf","wf","xf","yf","zf","Af","Bf","H","I","Cf","M","N","Df","Ef","__reactInternalMemoizedUnmaskedChildContext","__reactInternalMemoizedMaskedChildContext","Ff","Gf","Hf","If","Jf","__reactInternalMemoizedMergedChildContext","Kf","Lf","Mf","Nf","Of","Pf","unstable_cancelCallback","Qf","unstable_shouldYield","Rf","unstable_requestPaint","Sf","Tf","unstable_getCurrentPriorityLevel","Uf","unstable_ImmediatePriority","Vf","Wf","Xf","unstable_LowPriority","Yf","unstable_IdlePriority","Zf","$f","ag","bg","cg","dg","O","eg","fg","gg","hg","ig","jg","kg","ReactCurrentBatchConfig","lg","mg","ng","og","pg","qg","rg","_currentValue","sg","childLanes","tg","dependencies","firstContext","lanes","ug","vg","observedBits","next","responders","wg","xg","updateQueue","baseState","firstBaseUpdate","lastBaseUpdate","shared","pending","effects","yg","zg","eventTime","lane","payload","callback","Ag","Bg","Cg","A","C","Dg","Eg","Fg","refs","Gg","Kg","isMounted","_reactInternals","enqueueSetState","Hg","Ig","Jg","enqueueReplaceState","enqueueForceUpdate","Lg","shouldComponentUpdate","isPureReactComponent","Mg","updater","Ng","componentWillReceiveProps","UNSAFE_componentWillReceiveProps","Og","getSnapshotBeforeUpdate","UNSAFE_componentWillMount","componentWillMount","Pg","Qg","_stringRef","Rg","Sg","lastEffect","nextEffect","firstEffect","Tg","Ug","mode","Vg","implementation","Wg","Xg","done","Yg","Zg","$g","ah","bh","ch","dh","eh","documentElement","fh","gh","hh","P","ih","memoizedProps","revealOrder","jh","kh","lh","mh","nh","oh","pendingProps","ph","qh","rh","sh","th","uh","_workInProgressVersionPrimary","vh","ReactCurrentDispatcher","wh","xh","R","S","T","yh","zh","Ah","Bh","Ch","Dh","Eh","Fh","Gh","Hh","baseQueue","queue","Ih","Jh","Kh","lastRenderedReducer","eagerReducer","eagerState","lastRenderedState","dispatch","Lh","Mh","_getVersion","_source","mutableReadLanes","Nh","U","useState","getSnapshot","subscribe","useEffect","setSnapshot","Oh","Ph","Qh","Rh","deps","Sh","Th","Uh","Vh","Wh","Xh","Yh","Zh","$h","ai","bi","ci","di","readContext","useCallback","useContext","useImperativeHandle","useLayoutEffect","useMemo","useReducer","useRef","useDebugValue","useDeferredValue","useTransition","useMutableSource","useOpaqueIdentifier","unstable_isNewReconciler","uf","ei","fi","gi","hi","ii","ji","ki","li","mi","baseLanes","ni","oi","pi","UNSAFE_componentWillUpdate","componentWillUpdate","componentDidUpdate","qi","ri","pendingContext","Bi","Ci","Di","Ei","si","retryLane","ti","fallback","unstable_avoidThisFallback","ui","unstable_expectedLoadTime","vi","wi","xi","yi","zi","isBackwards","rendering","renderingStartTime","last","tail","tailMode","Ai","Fi","Gi","wasMultiple","multiple","onclick","size","createElementNS","createTextNode","V","Hi","Ii","W","Ji","Ki","Li","Mi","Ni","Oi","WeakMap","Pi","Qi","Ri","Si","componentDidCatch","Ti","componentStack","Ui","WeakSet","Vi","Wi","Xi","__reactInternalSnapshotBeforeUpdate","Yi","Zi","$i","focus","aj","bj","onCommitFiberUnmount","cj","dj","ej","fj","gj","hj","insertBefore","_reactRootContainer","ij","jj","kj","lj","mj","nj","oj","pj","X","Y","qj","rj","sj","tj","uj","vj","Infinity","wj","ck","Z","xj","yj","zj","Aj","Bj","Cj","Dj","Ej","Fj","Gj","Hj","Ij","Jj","Sc","Kj","Lj","Mj","callbackNode","expirationTimes","callbackPriority","Tc","Nj","Oj","Pj","Qj","Rj","Sj","Tj","finishedWork","finishedLanes","Uj","timeoutHandle","Wj","Xj","pingCache","Yj","Zj","va","ak","bk","dk","rangeCount","focusedElem","selectionRange","ek","createRange","setStart","removeAllRanges","addRange","setEnd","scrollLeft","scrollTop","onCommitFiberRoot","fk","gk","ik","isReactComponent","pendingChildren","jk","mutableSourceEagerHydrationData","lk","mk","nk","ok","qk","hydrationOptions","mutableSources","_internalRoot","rk","tk","hasAttribute","sk","uk","kk","hk","_calculateChangedBits","unstable_observedBits","unmount","form","Vj","vk","Events","wk","findFiberByHostInstance","bundleType","rendererPackageName","xk","rendererConfig","overrideHookState","overrideHookStateDeletePath","overrideHookStateRenamePath","overrideProps","overridePropsDeletePath","overridePropsRenamePath","setSuspenseHandler","scheduleUpdate","currentDispatcherRef","findHostInstanceByFiber","findHostInstancesForRefresh","scheduleRefresh","scheduleRoot","setRefreshHandler","getCurrentFiber","__REACT_DEVTOOLS_GLOBAL_HOOK__","yk","isDisabled","supportsFiber","inject","createPortal","findDOMNode","flushSync","unmountComponentAtNode","unstable_batchedUpdates","unstable_createPortal","unstable_renderSubtreeIntoContainer","condition","format","argIndex","framesToPop","fns","ignoreDuplicateOf","line","activeTrack","labelContainer","maxLabel","minLabel","valueLabel","win","_isWindow","pageXOffset","scrollTo","pageYOffset","boundClass","boundMethod","definingProperty","boundFn","arr","StrictMode","Profiler","Suspense","forceUpdate","escape","_status","_result","IsSomeRendererActing","only","createContext","_currentValue2","_threadCount","Provider","Consumer","createFactory","createRef","forwardRef","isValidElement","lazy","memo","observable","ponyfill","transformData","throwIfCancellationRequested","throwIfRequested","reason","classList","baseVal","argType","inner","_regeneratorRuntime","asyncIterator","toStringTag","define","wrap","Generator","Context","makeInvokeMethod","tryCatch","GeneratorFunction","GeneratorFunctionPrototype","defineIteratorMethods","_invoke","AsyncIterator","invoke","__await","callInvokeWithMethodAndArg","delegate","maybeInvokeDelegate","sent","_sent","dispatchException","abrupt","resultName","nextLoc","pushTryEntry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","resetTryEntry","completion","reset","isGeneratorFunction","mark","awrap","async","pop","rval","handle","complete","finish","delegateYield","runtime","regeneratorRuntime","accidentalStrictMode","globalThis","currentDirection","initialized","pointA","pointB","xDiff","yDiff","EXITING","ENTERED","ENTERING","EXITED","UNMOUNTED","newObj","_interopRequireWildcard","_reactDom","Transition","initialStatus","parentGroup","appearStatus","in","unmountOnExit","mountOnEnter","nextCallback","prevState","updateStatus","prevProps","nextStatus","cancelNextCallback","getTimeouts","mounting","performEnter","performExit","appearing","timeouts","enterTimeout","onEnter","safeSetState","onEntering","onTransitionEnd","onEntered","onExit","onExiting","setNextCallback","active","doesNotHaveTimeoutOrListener","addEndListener","childProps","noop","AsyncMode","ConcurrentMode","ContextConsumer","ContextProvider","Element","Lazy","Portal","isAsyncMode","isConcurrentMode","isContextConsumer","isContextProvider","isElement","isForwardRef","isFragment","isLazy","isPortal","isProfiler","isStrictMode","isSuspense","isValidElementType","typeOf","adaptiveHeight","afterChange","appendDots","dots","arrows","autoplaySpeed","beforeChange","customPaging","dotsClass","easing","nextArrow","onInit","onLazyLoadError","onReInit","pauseOnDotsHover","pauseOnFocus","pauseOnHover","prevArrow","touchMove","__CANCEL__","trackDragEvent","getBoundingClientRect","activeTrackStyle","getActiveTrackStyle","__reactInternalSnapshotFlag","__reactInternalSnapshot","foundWillMountName","foundWillReceivePropsName","foundWillUpdateName","newApiName","maybeSnapshot","snapshot","__suppressDeprecationWarning","token","singleMatcher","RegExp","multiMatcher","decodeComponents","components","decodeURIComponent","decode","tokens","encodedURI","replaceMap","exec","entries","customDecodeURIComponent","platform","MediaQuery","isUnconditional","handlers","mql","matchMedia","assess","addListener","constuctor","addHandler","matches","removeHandler","splice","clear","removeListener","MapShim","getIndex","entry","class_1","__entries__","ctx","_i","_a","isBrowser","global$1","requestAnimationFrame$1","transitionKeys","mutationObserverSupported","MutationObserver","ResizeObserverController","connected_","mutationEventsAdded_","mutationsObserver_","observers_","onTransitionEnd_","refresh","delay","leadingCall","trailingCall","resolvePending","proxy","timeoutCallback","throttle","addObserver","observer","connect_","removeObserver","observers","disconnect_","updateObservers_","activeObservers","gatherActive","hasActive","broadcastActive","observe","attributes","childList","characterData","subtree","disconnect","_b","getInstance","instance_","defineConfigurable","getWindowOf","emptyRect","createRectInit","toFloat","parseFloat","getBordersSize","styles","getHTMLElementContentRect","clientWidth","clientHeight","getComputedStyle","paddings","positions_1","getPaddings","horizPad","vertPad","bottom","boxSizing","isDocumentElement","vertScrollbar","horizScrollbar","isSVGGraphicsElement","SVGGraphicsElement","SVGElement","getBBox","getContentRect","bbox","getSVGContentRect","ResizeObservation","broadcastWidth","broadcastHeight","contentRect_","isActive","rect","broadcastRect","ResizeObserverEntry","rectInit","contentRect","Constr","DOMRectReadOnly","createReadOnlyRect","ResizeObserverSPI","controller","callbackCtx","activeObservations_","observations_","callback_","controller_","callbackCtx_","observations","unobserve","clearActive","observation","ResizeObserver","eventName","NextArrow","PrevArrow","_createClass","clickHandler","prevClasses","prevHandler","prevArrowProps","customProps","_React$PureComponent2","_super2","nextClasses","nextHandler","nextArrowProps","isPlainObject","FormData","ArrayBuffer","isView","isDate","pipe","URLSearchParams","product","assignValue","str","stripBOM","content","charCodeAt","_TransitionGroup","ReplaceTransition","_args","handleEnter","_len2","_key2","handleLifecycle","handleEntering","_len3","_key3","handleEntered","_len4","_key4","handleExit","_len5","_key5","handleExiting","_len6","_key6","_len7","_key7","idx","originalArgs","_child$props","inProp","_React$Children$toArr","first","second","hasElementType","hasMap","hasSet","hasArrayBuffer","equal","it","replaceClassName","origClass","classToRemove","remove","config1","config2","valueFromConfig2Keys","mergeDeepPropertiesKeys","defaultToConfig2Keys","directMergeKeys","getMergedValue","mergeDeepProperties","prop","axiosKeys","otherKeys","InterceptorManager","use","fulfilled","rejected","synchronous","runWhen","eject","encode","serializedParams","parts","toISOString","hashmarkIndex","_CSSTransition","_ReplaceTransition","_Transition","CSSTransition","performance","MessageChannel","unstable_forceFrameRate","cancelAnimationFrame","port2","port1","onmessage","postMessage","sortIndex","startTime","expirationTime","priorityLevel","unstable_Profiling","unstable_continueExecution","unstable_getFirstCallbackNode","unstable_next","unstable_pauseExecution","unstable_wrapCallback","objA","objB","compareContext","keysA","keysB","bHasOwnProperty","valueA","valueB","getPercentageFromPosition","clientRect","sizePerc","getPercentageFromValue","getPositionFromValue","valuePerStep","isAbsoluteURL","combineURLs","requestedURL","executor","resolvePromise","write","expires","path","domain","secure","cookie","toGMTString","checkDCE","Boolean","HttpClient","interceptors","before","credentials","userAgentHeaders","_","clientId","issuer","stateHandle","interactionHandle","redirectUri","scopes","codeChallenge","codeChallengeMethod","activationToken","recoveryToken","baseUrl","origin","validateVersionConfig","t0","catch","makeIdxState","details","t1","introspect","interact","client","LATEST_SUPPORTED_IDX_API_VERSION","json","client_id","scope","redirect_uri","code_challenge","code_challenge_method","activation_token","recovery_token","interaction_handle","stateToken","accept","getUserAgent","divideActionParamsByMutability","mutable","defaultParamsForAction","neededParamsForAction","immutableParamsForAction","defaultParams","neededParams","immutableParams","actionDefinition","toPersist","accepts","stepUp","parseIdxResponse","parseNonRemediations","rel","actions","JSONPath","generateRemediationFunctions","remediation","remediations","successWithInteractionCode","proceed","neededToProceed","rawIdxState","hasInteractionCode","interactionCode","_cancelHandlers","_isPending","_isCanceled","_rejectOnCancel","_promise","_reject","shouldReject","finally","CancelError","find","fromEntries","findIndex","filterOut","foo","IteratorPrototype","BUGGY_SAFARI_ITERATORS","proto","forced","CSSRuleList","CSSStyleDeclaration","CSSValueList","ClientRectList","DOMRectList","DOMStringList","DOMTokenList","DataTransferItemList","FileList","HTMLAllCollection","HTMLCollection","HTMLFormElement","HTMLSelectElement","MediaList","MimeTypeArray","NamedNodeMap","NodeList","PaintRequestList","Plugin","PluginArray","SVGLengthList","SVGNumberList","SVGPathSegList","SVGPointList","SVGStringList","SVGTransformList","SourceBufferList","StyleSheetList","TextTrackCueList","TextTrackList","TouchList","versions","v8","stat","noTargetGet","real","inspectSource","facade","enforce","getterFor","normalize","NATIVE","POLYFILL","stopped","that","AS_ENTRIES","IS_ITERATOR","INTERRUPTED","WebKitMutationObserver","nextTick","URL","searchParams","toJSON","ActiveXObject","close","src","unsafe","copyright","codeAt","RangeError","setImmediate","clearImmediate","Dispatch","importScripts","withoutSetter","AggregateError","kind","Arguments","allSettled","$","createEvent","dispatchEvent","PromiseRejectionEvent","notified","reactions","fail","rejection","initEvent","emit","parent","race","QObject","findChild","description","keyFor","useSetter","useSimple","try","updateURL","updateSearchParams","append","getAll","fetch","getState","ftp","file","http","https","ws","wss","scheme","cannotBeABaseURL","fragment","_e","createObjectURL","revokeObjectURL","lastIndex","UNSUPPORTED_Y","BROKEN_CARET","raw","groups","sticky","multiline","ignoreCase","dotAll","unicode","DOMException","Blob","bodyUsed","onload","FileReader","readAsArrayBuffer","Uint8Array","byteLength","_initBody","_bodyInit","_bodyText","isPrototypeOf","_bodyBlob","_bodyFormData","DataView","_bodyArrayBuffer","blob","arrayBuffer","readAsText","formData","signal","referrer","clone","redirect","aborted","Headers","Request","Response","toUTCString","getJSON","withConverter","avoidNew","resultType","flatten","sandbox","preventEval","parentProperty","otherTypeCallback","autostart","evaluate","currResultType","currPreventEval","currSandbox","currOtherTypeCallback","toPathString","toPathArray","_hasParentSelector","_trace","isParentSelector","hasArrExpr","_getPreferredOutput","pointer","toPointer","_handleCallback","_walk","expr","_slice","_eval","isFinite","_$_parentProperty","_$_parent","_$_property","_$_path","_$_root","_$_v","vm","runInNewContext","cache","lastIndexOf","once","ACCESS_TOKEN_STORAGE_KEY","AuthApiError","AuthPollStopError","AuthSdkError","AuthStateManager","Zn","AuthTransaction","AuthenticatorKey","Lt","CACHE_STORAGE_NAME","DEFAULT_CACHE_DURATION","DEFAULT_CODE_CHALLENGE_METHOD","DEFAULT_MAX_CLOCK_SKEW","DEFAULT_POLLING_DELAY","EVENT_ADDED","qn","EVENT_ERROR","Kn","EVENT_EXPIRED","Bn","EVENT_REMOVED","Vn","EVENT_RENEWED","Hn","EmailVerifyCallbackError","Wo","IDX_API_VERSION","IDX_RESPONSE_STORAGE_NAME","ID_TOKEN_STORAGE_KEY","INITIAL_AUTH_STATE","Yn","IdxFeature","Dt","IdxStatus","Ft","MAX_VERIFIER_LENGTH","MIN_VERIFIER_LENGTH","OAuthError","ORIGINAL_URI_STORAGE_NAME","OktaAuth","PKCE_STORAGE_NAME","REDIRECT_NONCE_COOKIE_NAME","REDIRECT_OAUTH_PARAMS_NAME","REDIRECT_STATE_COOKIE_NAME","REFERRER_PATH_STORAGE_KEY","REFRESH_TOKEN_STORAGE_KEY","SHARED_TRANSACTION_STORAGE_NAME","STATE_TOKEN_KEY_NAME","TOKEN_STORAGE_NAME","TRANSACTION_STORAGE_NAME","TokenManager","Gn","nt","addPostMessageListener","at","addStateToken","assertPKCESupport","Ht","authenticate","Ko","buildAuthorizeParams","canProceed","Qo","Go","clearTransactionMeta","Cr","convertTokenParamsToOAuthParams","createOAuthMeta","Nt","createTransactionMeta","Er","crypto","decodeToken","un","deprecate","jn","deprecateWrap","Cn","exchangeCodeForTokens","sn","genRandomString","generateNonce","ct","generateState","ut","getConsole","Rn","getDefaultTokenParams","Tt","getHashOrSearch","It","tt","getLink","getNativeConsole","_n","getOAuthBaseUrl","ft","getOAuthDomain","lt","getOAuthUrls","pt","getPollFn","getSavedTransactionMeta","Rr","getStateToken","getToken","hn","getTransactionMeta","Pr","getUserInfo","wn","getWellKnown","et","getWithPopup","kn","getWithRedirect","Sn","getWithoutPrompt","dn","handleEmailVerifyCallback","Yo","handleInteractionCodeRedirect","handleOAuthResponse","pn","hasAuthorizationCode","_t","hasErrorInUrl","Pt","Rt","hasSavedInteractionHandle","_r","hasTokensInHash","Et","Lr","Br","introspectAuthn","isAbsoluteUrl","isAccessToken","nn","isAuthApiError","isAuthorizationCodeError","At","isCodeFlow","Ct","isCustomAuthTransactionMeta","Zt","isEmailVerifyCallback","zo","isEmailVerifyCallbackError","$o","isIDToken","rn","isIdxTransactionMeta","Qt","isInteractionRequired","Ut","isInteractionRequiredError","Ot","isLoginRedirect","Mt","isOAuthTransactionMeta","Yt","isPKCETransactionMeta","Xt","isPromise","isRedirectUri","jt","isRefreshToken","isRefreshTokenError","Wt","isSameRefreshToken","Gt","isToken","tn","isTransactionMeta","en","isTransactionMetaValid","Ir","isTransactionMetaValidForFlow","Mr","isTransactionMetaValidForOptions","Ur","isoToUTCString","loadFrame","ot","loadPopup","omit","parseEmailVerifyCallback","Jo","parseFromUrl","En","pkce","poll","postRefreshToken","postToTokenEndpoint","postToTransaction","preparePKCE","Vt","prepareTokenParams","Kt","Zo","recoverPassword","rt","removeNils","removeTrailingSlash","renewToken","mn","renewTokens","bn","renewTokensWithRefresh","vn","resumeTransaction","revokeToken","cn","saveTransactionMeta","jr","startTransaction","toAbsoluteUrl","toQueryString","toRelativeUrl","transactionExists","transactionStatus","transactionStep","urlParamsToObject","$t","validateClaims","zt","validateCodeChallengeMethod","qt","validateToken","an","verifyToken","Pn","atob","base64ToBase64Url","base64UrlDecode","base64UrlToBase64","base64UrlToString","getOidcHash","stringToBase64Url","stringToBuffer","webcrypto","gt","hasTextEncoder","wt","dt","isFingerprintSupported","yt","isHTTPS","xt","isIE11OrLess","vt","isLocalhost","St","isPKCESupported","kt","isPopupPostMessageSupported","mt","isTokenVerifySupported","bt","AuthenticatorEnrollmentData","xo","AuthenticatorVerificationData","ko","ChallengeAuthenticator","ao","ChallengePoll","uo","EnrollAuthenticator","eo","EnrollPoll","ro","EnrollProfile","so","EnrollmentChannelData","io","Identify","fo","ReEnrollAuthenticator","lo","RedirectIdp","po","Remediator","Gr","ResetAuthenticator","co","SelectAuthenticatorAuthenticate","yo","SelectAuthenticatorEnroll","mo","SelectEnrollProfile","bo","SelectEnrollmentChannel","oo","Skip","So","errorSummary","errorCode","errorLink","errorId","errorCauses","xhr","TextEncoder","subtle","digest","_links","importKey","verify","saveAuthnState","accessToken","storageUtil","storage","storageManager","getHttpCache","cacheResponse","getStorage","expiresAt","_oktaUserAgent","getHttpHeader","Accept","httpRequestClient","updateStorage","transformErrorXHR","getIssuerOrigin","UTC","rememberDevice","autoPush","transactionCallBack","isPolling","factorResult","hints","allow","factorType","provider","profile","updatePhone","_embedded","tx","exists","_get","generateVerifier","getRandomValues","computeChallenge","session","user","Ge","checkAccountSetupComplete","redirectUrl","idp","idp_scope","idpScope","login_hint","loginHint","max_age","maxAge","nonce","prompt","response_mode","responseMode","response_type","sessionToken","extraParams","authorizationCode","codeVerifier","grant_type","code_verifier","interaction_code","clientSecret","client_secret","tokenUrl","refresh_token","refreshToken","jwks_uri","kid","clearStorage","popupTitle","st","authorizeUrl","userinfoUrl","logoutUrl","revokeUrl","ht","ignoreSignature","responseJSON","urls","Bt","throw","code_challenge_methods_supported","iss","aud","iat","exp","ignoreLifetime","maxClockSkew","Jt","idToken","header","signature","token_type_hint","transactionManager","claims","at_hash","ln","error_description","expires_in","token_type","access_token","id_token","tokenType","popupWindow","parentElement","setInterval","closed","clearInterval","tokenManager","updateRefreshToken","gn","yn","getTokensSync","getTokens","sub","getResponseHeader","SUCCESS","PENDING","FAILURE","TERMINAL","CANCELED","OKTA_PASSWORD","OKTA_EMAIL","PHONE_NUMBER","GOOGLE_AUTHENTICATOR","SECURITY_QUESTION","OKTA_VERIFY","PASSWORD_RECOVERY","REGISTRATION","SOCIAL_IDP","xn","oauth","_setLocation","Tn","On","_getLocation","An","_getHistory","_getDocument","replaceState","title","load","group","groupEnd","In","Mn","getPKCEStorage","browserHasLocalStorage","getLocalStorage","testStorage","browserHasSessionStorage","getSessionStorage","testStorageType","getStorageByType","getCookieStorage","getInMemoryStorage","findStorageType","localStorage","sessionStorage","sameSite","sessionCookie","getItem","setItem","removeItem","useSeparateCookies","inMemoryStore","Un","Nn","localOffset","Fn","storageListener","onTokenExpiredHandler","autoRenew","emitError","renew","autoRemove","setExpireEventTimeoutAll","syncStorage","newValue","oldValue","storageKey","syncTimeout","resetExpireEventTimeoutAll","emitEventsForCrossTabsStorageUpdate","_storageEventDelay","clearExpireEventTimeoutAll","Ln","Dn","clearPendingRemoveTokens","expireEarlySeconds","sdk","emitter","service","storageProvider","storageType","getTokenStorage","clock","expireTimeouts","renewPromise","getOptions","getExpireTime","getTokensFromStorageValue","emitAdded","emitRemoved","clearExpireEventTimeout","emitExpired","setExpireEventTimeout","setStorage","getSync","getTokenType","getStorageKeyByType","emitRenewed","setTokens","tokenKey","pendingRemove","Wn","running","thisObject","run","$n","zn","fingerprint","Jn","Xn","updateAuthStatePromise","canceledTimes","Qn","_sdk","_pending","_authState","_logOptions","_prevAuthState","_setLogOptions","updateAuthState","transformAuthState","devMode","isAuthenticated","getAuthState","isCanceled","er","storageName","tr","nr","storageManagerOptions","cookieOptions","storageTypes","getOptionsForSection","getTransactionStorage","rr","or","ir","getSharedTansactionStorage","dateCreated","ar","transaction","ur","cr","sr","legacyWidgetSupport","saveNonceCookie","saveStateCookie","saveParamsCookie","enableSharedStorage","saveLastResponse","clearIdxResponse","clearSharedStorage","clearLegacyOAuthParams","clearLegacyPKCE","muteWarning","loadLegacyOAuthParams","loadLegacyPKCE","getLegacyPKCEStorage","getLegacyOAuthParamsStorage","getIdxResponseStorage","fr","lr","pr","dr","vr","gr","yr","nodeCache","del","mr","wr","kr","xr","Sr","Tr","Or","Ar","flow","Nr","Fr","Dr","loadIdxResponse","Hr","qr","Vr","Kr","formatAuthenticators","authenticators","authenticator","authenticatorsData","required","hasData","getData","getName","getInputs","getAuthenticator","inputs","relatesTo","messages","Wr","$r","verificationCode","otp","passcode","zr","totp","Jr","Yr","questionKey","question","answer","label","Xr","contextualData","enrolledQuestion","Qr","Zr","canVerify","mapCredentials","no","remediationName","startPolling","currentAuthenticator","channel","getChannels","phoneNumber","userProfile","identifier","rememberMe","newPassword","ho","vo","go","selectedAuthenticator","wo","formatAuthenticatorData","getAuthenticatorData","mapAuthenticatorDataFromValues","getMethodTypes","methodType","getAuthenticatorFromRemediation","enrollmentId","skip","To","Oo","Ao","remediators","canRemediate","Eo","_o","getMessages","Ro","getNextStep","canSkip","canResend","Po","terminal","nextStep","jo","resend","Co","Io","idxResponse","canceled","getValuesAfterProceed","t2","Mo","identify","Uo","No","Fo","Lo","Do","Bo","Ho","qo","autoRemediate","getFlow","setFlow","saveIdxResponse","enabledFeatures","availableSteps","Vo","Xo","isInteger","environments","maybeAddNodeEnvironment","postLogoutRedirectUri","useInteractionCodeFlow","restoreOriginalUri","resume","handleLogin","setCookieAndRedirect","_tokenQueue","revoke","authStateManager","signInWithCredentials","sendFingerprint","originalUri","setOriginalUri","revokeAccessToken","revokeRefreshToken","getSignOutRedirectUrl","closeSession","reload","clearTokensBeforeRedirect","addPendingRemoveFlags","hasExpired","getOriginalUriStorage","getOriginalUri","storeTokensFromRedirect","removeOriginalUri","hasResponseType","constants","isarray","pathToRegexp","compile","tokensToFunction","tokensToRegExp","PATH_REGEXP","res","defaultDelimiter","delimiter","escaped","prefix","modifier","asterisk","partial","optional","pattern","prevText","escapeGroup","restrictBacktrack","escapeString","encodeURIComponentPretty","encodeURI","pretty","segment","attachKeys","sensitive","strict","route","endsWithDelimiter","regexpToRegexp","arrayToRegexp","stringToRegexp","mergeChildMappings","getProp","nextChildMapping","hasPrev","hasNext","prevChild","isLeaving","mapFn","mapper","getValueForKey","nextKeysPending","pendingKeys","prevKey","childMapping","nextKey","pendingNextKey","Dots","_rightBound","rightBound","_leftBound","leftBound","dotOptions","Util","queries","browserIsIncapable","shouldDegrade","monadic","serializer","cacheKey","computedValue","variadic","assemble","strategy","serialize","strategyDefault","serializerDefault","ObjectWithoutPrototypeCache","cacheDefault","strategies","dispatchRequest","boolean","requestInterceptorChain","synchronousRequestInterceptors","interceptor","responseInterceptorChain","chain","newConfig","onFulfilled","onRejected","getUri","_hasClass","strictUriEncode","decodeComponent","splitOnFirst","filterObject","validateArrayFormatSeparator","keysSorter","removeHash","hashStart","extract","queryStart","parseNumbers","parseBooleans","arrayFormat","arrayFormatSeparator","formatter","accumulator","isEncodedArray","item","parserForArrayFormat","shouldFilter","skipNull","skipEmptyString","encoderForArrayFormat","objectCopy","parseUrl","url_","parseFragmentIdentifier","fragmentIdentifier","stringifyUrl","queryFromUrl","parsedQueryFromUrl","queryString","getHash","pick","exclude","exclusionFilter","_addClass","_removeClass","addClass","removeClass","getClassNames","removeClasses","activeClassName","reflowAndAddClass","appearClassName","doneClassName","enterClassName","isStringClassNames","_this$getClassNames6","fileName","lineNumber","columnNumber","Label","labelValue","_initialState","_lodash","_track","_dots","_arrows","_resizeObserverPolyfill","_objectWithoutProperties","sourceSymbolKeys","list","onLazyLoad","updateState","adaptHeight","lazyLoadTimer","progressiveLazyLoad","onWindowResized","callbackTimers","onfocus","onSlideFocus","onblur","onSlideBlur","animationEndCallback","timer","autoplayTimer","checkImagesLoad","setTrackStyle","didPropsChange","debouncedResize","resizeWindow","updatedState","_trackWidth","_trackLeft","childrenWidths","preClones","postClones","_i2","_trackStyle","trackLeft","images","imagesCount","loadedCount","image","prevClickHandler","_index","asNavFor","_slideHandler","asNavForIndex","firstBatch","nodes","clickable","dir","ontouchmove","disableBodyScroll","triggerSlideHandler","enableBodyScroll","nextIndex","playType","play","pauseType","trackProps","onTrackOver","onTrackLeave","selectHandler","dotProps","onDotsLeave","onDotsOver","arrowProps","verticalHeightStyle","centerPaddingStyle","padding","listStyle","listProps","onMouseMove","onMouseUp","onTouchMove","onTouchEnd","touchEnd","onTouchCancel","innerSliderProps","listRefHandler","trackRefHandler","ssrState","ssrInit","_i3","_Object$keys","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","loaded","__webpack_modules__","getter","leafPrototypes","getProto","ns","def","definition","chunkId","miniCssF","hmd","inProgress","dataWebpackPrefix","script","needAttach","scripts","getElementsByTagName","getAttribute","charset","onScriptComplete","doneFns","head","loadStylesheet","fullhref","existingLinkTags","dataHref","existingStyleTags","findStylesheet","oldTag","linkTag","errorType","realHref","createStylesheet","installedCssChunks","miniCss","installedChunks","installedChunkData","realSrc","webpackJsonpCallback","parentChunkLoadingFunction","chunkIds","moreModules","chunkLoadingGlobal","ReactReduxContext","React","batch","nullListeners","notify","createListenerCollection","isSubscribed","Subscription","store","parentSub","unsubscribe","handleChangeWrapper","addNestedSub","trySubscribe","notifyNestedSubs","onStateChange","tryUnsubscribe","contextValue","subscription","previousState","useIsomorphicLayoutEffect","EMPTY_ARRAY","NO_SUBSCRIPTION_ARRAY","storeStateUpdatesReducer","updateCount","useIsomorphicLayoutEffectWithArgs","effectFunc","effectArgs","captureWrapperProps","lastWrapperProps","lastChildProps","renderIsScheduled","wrapperProps","actualChildProps","childPropsFromStoreUpdate","subscribeUpdates","shouldHandleStateChanges","childPropsSelector","forceComponentUpdateDispatch","didUnsubscribe","lastThrownError","checkForUpdates","newChildProps","latestStoreState","initStateUpdates","connectAdvanced","selectorFactory","_ref2$getDisplayName","getDisplayName","_ref2$methodName","methodName","_ref2$renderCountProp","renderCountProp","_ref2$shouldHandleSta","_ref2$storeKey","storeKey","_ref2$forwardRef","withRef","_ref2$context","connectOptions","WrappedComponent","wrappedComponentName","selectorFactoryOptions","pure","usePureOnlyMemo","ConnectFunction","_useMemo","reactReduxForwardedRef","propsContext","ContextToUse","didStoreComeFromProps","createChildSelector","_useMemo2","overriddenContextValue","_useReducer","previousStateUpdateResult","renderedWrappedComponent","Connect","forwarded","hoistStatics","shallowEqual","randomString","ActionTypes","INIT","REPLACE","PROBE_UNKNOWN_ACTION","getUndefinedStateErrorMessage","actionType","bindActionCreator","actionCreator","compose","funcs","wrapMapToPropsConstant","getConstant","constant","constantSelector","dependsOnOwnProps","getDependsOnOwnProps","mapToProps","wrapMapToPropsFunc","stateOrDispatch","ownProps","mapDispatchToProps","actionCreators","boundActionCreators","bindActionCreators","mapStateToProps","defaultMergeProps","stateProps","dispatchProps","mergeProps","mergedProps","areMergedPropsEqual","hasRunOnce","nextMergedProps","wrapMergePropsFunc","impureFinalPropsSelectorFactory","pureFinalPropsSelectorFactory","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","hasRunAtLeastOnce","handleSubsequentCalls","nextOwnProps","propsChanged","stateChanged","nextStateProps","statePropsChanged","handleNewState","finalPropsSelectorFactory","initMapStateToProps","initMapDispatchToProps","initMergeProps","factories","strictEqual","createConnect","_temp","_ref$connectHOC","connectHOC","_ref$mapStateToPropsF","mapStateToPropsFactories","defaultMapStateToPropsFactories","_ref$mapDispatchToPro","mapDispatchToPropsFactories","defaultMapDispatchToPropsFactories","_ref$mergePropsFactor","mergePropsFactories","defaultMergePropsFactories","_ref$selectorFactory","defaultSelectorFactory","_ref3","_ref3$pure","_ref3$areStatesEqual","_ref3$areOwnPropsEqua","_ref3$areStatePropsEq","_ref3$areMergedPropsE","extraOptions","newBatch","isAbsolute","spliceOne","hasTrailingSlash","toParts","fromParts","isToAbs","isFromAbs","mustEndAbs","up","part","valueEqual","aValue","bValue","isProduction","provided","addLeadingSlash","stripLeadingSlash","stripBasename","hasBasename","stripTrailingSlash","createPath","createLocation","currentLocation","hashIndex","searchIndex","parsePath","decodeURI","URIError","resolvePathname","createTransitionManager","setPrompt","nextPrompt","confirmTransitionTo","getUserConfirmation","appendListener","notifyListeners","getConfirmation","confirm","PopStateEvent","HashChangeEvent","getHistoryState","createBrowserHistory","globalHistory","canUseHistory","supportsHistory","needsHashChangeListener","_props$forceRefresh","forceRefresh","_props$getUserConfirm","_props$keyLength","keyLength","basename","getDOMLocation","historyState","_window$location","createKey","transitionManager","handlePopState","isExtraneousPopstateEvent","handlePop","handleHashChange","forceNextPop","fromLocation","toLocation","toIndex","allKeys","fromIndex","delta","revertPop","initialLocation","createHref","listenerCount","checkDOMListeners","isBlocked","pushState","prevIndex","nextKeys","goBack","goForward","block","unblock","listen","unlisten","HashChangeEvent$1","HashPathCoders","hashbang","encodePath","decodePath","noslash","slash","stripHash","getHashPath","replaceHashPath","createHashHistory","_props$hashType","hashType","_HashPathCoders$hashT","ignorePath","encodedPath","prevLocation","allPaths","baseTag","pushHashPath","nextPaths","MAX_SIGNED_31_BIT_INT","commonjsGlobal","calculateChangedBits","_Provider$childContex","_Consumer$contextType","contextProp","getUniqueId","_Component","changedBits","createEventEmitter","_inheritsLoose","_Component2","onUpdate","_proto2","historyContext","createNamedContext","createNamedContext$1","Router","_isMounted","_pendingLocation","staticContext","computeRootMatch","isExact","MemoryRouter","_props$initialEntries","initialEntries","_props$initialIndex","initialIndex","nextEntries","createMemoryHistory","Lifecycle","onMount","onUnmount","Prompt","when","_ref$when","release","cacheLimit","cacheCount","generatePath","generator","compilePath","Redirect","computedMatch","_ref$push","cache$1","cacheLimit$1","cacheCount$1","matchPath","_options","_options$exact","_options$strict","_options$sensitive","matched","pathCache","regexp","compilePath$1","_compilePath","Route","context$1","createURL","staticHandler","StaticRouter","handlePush","navigateTo","handleReplace","handleListen","handleBlock","_this$props$basename","_this$props$context","addBasename","_this$props2$basename","_this$props2$context","_this$props2$location","rest","_this$props2","Switch","withRouter","wrappedComponentRef","remainingProps","useHistory","useLocation","useParams","useRouteMatch","BrowserRouter","HashRouter","resolveToLocation","normalizeToLocation","forwardRefShim","LinkAnchor","forwardedRef","innerRef","navigate","_onClick","ex","isModifiedEvent","Link","_ref2$component","__RouterContext","forwardRefShim$1","forwardRef$1","NavLink","ariaCurrent","_ref$ariaCurrent","_ref$activeClassName","activeStyle","classNameProp","isActiveProp","locationProp","styleProp","escapedPath","classnames","joinClassnames","BASE","BODY","HEAD","HTML","LINK","META","NOSCRIPT","SCRIPT","STYLE","TITLE","FRAGMENT","accesskey","class","contenteditable","contextmenu","itemprop","tabindex","toComponent","titleAttributes","cssText","bodyAttributes","htmlAttributes","linkTags","metaTags","noscriptTags","scriptTags","styleTags","noscript","setHelmet","helmetInstances","instances","helmet","encodeSpecialCharacters","styleSheet","isEqualNode","oldTags","newTags","onChangeClientState","rendered","emitChange","defer","init","mapNestedChildrenToProps","flattenArrayTypeChildren","arrayTypeChildren","nestedChildren","mapObjectTypeChildren","mapArrayTypeChildrenToProps","warnOnInvalidChildren","mapChildrenToProps","defaultTitle","titleTemplate","classCallCheck","AwaitValue","AsyncGenerator","gen","front","back","createClass","inherits","possibleConstructorReturn","scrollKey","scrollBehavior","ScrollContainer","prevRouterProps","routerProps","ReactDOM","SessionStorage","stateKey","getStateKey","storedValue","stateKeyBase","propTypes$1","ScrollContext","getRouterProps","ScrollBehaviorConstructor","ScrollBehaviorContext","_next","_throw","compareVersions","v1","v2","n1","validateAndParse","n2","p1","p2","compareSegments","operator","assertValidOperator","operatorResMap","validate","semver","satisfies","op","v3","r1","r2","r3","compareStrings","isWildcard","tryParse","ap","bp","forceType","allowedOperators","toPrimitive","OktaContext","useOktaAuth","Security","oktaAuth","onAuthRequired","authState","_React$useState2","setAuthState","_asyncToGenerator","_callee","_x","_x2","addEnvironment","_err","OktaError","getVersion","_err2","_onAuthRequired","ownKeys$1","_objectSpread$1","LoginCallback","errorComponent","loadingElement","_ref$loadingElement","onAuthResume","_useOktaAuth","callbackError","setCallbackError","ErrorReporter","handleLoginRedirect","displayError","_excluded","useMatch","ReactRouterDom","routeProps","pendingLogin","_slicedToArray","handleLoginError","setHandleLoginError","onAuthRequiredFn","signInWithRedirect","LOCALE_CHANGE","localeChange","GetAPIEndpoint","getHeaders","_localStorage$getItem","getApi","api","getProgram","getContent","program","language","filtered","getUserWithoutApi","mail","post","isNum","isBool","isStr","isFn","parseClassName","isToastIdValid","toastId","canUseDom","canBeRendered","POSITION","TOP_LEFT","TOP_RIGHT","TOP_CENTER","BOTTOM_LEFT","BOTTOM_RIGHT","BOTTOM_CENTER","TYPE","INFO","WARNING","ERROR","DEFAULT","DARK","cssTransition","appendPosition","_ref$appendPosition","collapse","_ref$collapse","collapseDuration","_ref$collapseDuration","preventExitTransition","nodeRef","isIn","exitClassName","baseClassName","animationStep","duration","scrollHeight","minHeight","margin","collapseToast","React__default","eventManager","emitQueue","cancelEmit","timers","useKeeper","reducer","staleId","useToastContainer","toast","_useReducer2","containerRef","toastCount","toastKey","displayedToast","containerId","isToastActive","getToast","clearWaitingQueue","limit","_instance$props","enableMultiContainer","removeToast","dequeueToast","appendToast","_queue$shift","toastContent","toastProps","buildToast","updateId","isNotValid","closeToast","isNotAnUpdate","toastAutoClose","containerAutoClose","closeButton","toastClassName","bodyClassName","toastStyle","bodyStyle","pauseOnFocusLoss","draggablePercent","draggableDirection","closeOnClick","progressClassName","progressStyle","autoClose","hideProgressBar","progress","deleteToast","queueLen","freeSlot","toDequeue","removeFromCollection","onOpen","onClose","getToastToRender","toastToRender","toastList","newestOnTop","_toast","getX","getY","useToast","isRunning","_useState","setIsRunning","_useState2","setPreventExitTransition","toastRef","drag","removalDistance","canCloseOnClick","canDrag","boundingRect","syncProps","onDragStart","onDragTransitionEnd","_drag$boundingRect","pauseToast","playToast","onDragMove","onDragEnd","hasFocus","bindFocusEvents","eventHandlers","CloseButton","ariaLabel","_ref$ariaLabel","viewBox","fillRule","ProgressBar","hide","userStyle","controlledProgress","animationDuration","animationPlayState","defaultClassName","cx","_cx","animationEvent","_animationEvent","Toast","_useToast","cssClasses","isProgressControlled","renderCloseButton","Bounce","ToastContainer","_useToastContainer","getClassName","containerStyle","pointerEvents","latestInstance","containerDomNode","containerConfig","containers","generateToastId","getToastId","dispatchToast","mergeOptions","createToastByType","success","info","warning","dark","dismiss","container","update","oldOptions","oldContent","nextOptions","configure","containerInstance","extendStatics","__extends","__","__assign","__rest","__spreadArray","pack","SuppressedError","IntlContext","SKELETON_TYPE","Err","isLiteralElement","el","literal","isArgumentElement","argument","isNumberElement","isDateElement","isTimeElement","isSelectElement","select","isPluralElement","plural","isPoundElement","pound","isTagElement","isNumberSkeleton","isDateTimeSkeleton","dateTime","DATE_TIME_REGEX","parseDateTimeSkeleton","skeleton","len","era","year","day","weekday","hour12","hourCycle","hour","minute","timeZoneName","FRACTION_PRECISION_REGEX","SIGNIFICANT_PRECISION_REGEX","INTEGER_WIDTH_REGEX","CONCISE_INTEGER_WIDTH_REGEX","parseSignificantPrecision","g1","g2","minimumSignificantDigits","maximumSignificantDigits","parseSign","signDisplay","currencySign","parseConciseScientificAndEngineeringStem","stem","notation","minimumIntegerDigits","parseNotationOptions","signOpts","parseNumberSkeleton","tokens_1","scale","currency","useGrouping","maximumFractionDigits","unit","compactDisplay","currencyDisplay","unitDisplay","g3","g4","g5","minimumFractionDigits","conciseScientificAndEngineeringOpts","SyntaxError","expected","found","captureStackTrace","buildMessage","hex","literalEscape","classEscape","describeExpectation","expectation","escapedParts","inverted","expected1","descriptions","describeExpected","found1","pegParse","peg$result","peg$FAILED","peg$startRuleFunctions","peg$parsestart","peg$startRuleFunction","peg$c0","ignoreTag","peg$c1","peg$c2","peg$c3","peg$c4","peg$literalExpectation","peg$c5","peg$c6","peg$c7","messageText","insertLocation","peg$c8","peg$c9","peg$c10","peg$c11","peg$otherExpectation","peg$c12","peg$c13","peg$c14","peg$c15","peg$c16","peg$c17","peg$c18","peg$c19","peg$c20","peg$c21","peg$c22","peg$c23","peg$c24","peg$c25","peg$c26","peg$c27","peg$c28","peg$c29","peg$classExpectation","peg$c30","peg$c31","peg$c32","peg$c33","peg$c34","option","peg$c35","peg$c36","peg$c37","parsedOptions","shouldParseSkeleton","peg$c38","peg$c39","peg$c40","peg$c41","messageCtx","peg$c42","peg$c43","peg$c44","peg$c45","peg$c46","peg$c47","peg$c48","peg$c49","peg$c50","peg$c51","peg$c52","peg$c53","peg$c54","peg$c55","peg$c56","peg$c57","peg$c58","peg$c59","peg$c60","peg$c61","peg$c62","peg$c63","peg$c64","peg$c65","peg$c66","peg$c67","peg$c68","pluralType","optionLocation","peg$c69","peg$c70","peg$c71","peg$c72","peg$c73","peg$c74","peg$c75","peg$c76","peg$c77","peg$c78","peg$c79","peg$c80","peg$c81","peg$c82","peg$c83","peg$c84","peg$c85","peg$c86","peg$c87","peg$c88","negative","num","peg$c90","peg$c91","peg$c92","peg$c93","peg$c94","escapedChar","quotedChars","peg$c95","isInPluralOption","peg$c96","peg$c97","peg$c98","peg$c99","peg$c100","peg$c101","peg$c102","peg$c103","peg$c104","peg$c105","peg$c106","peg$c107","peg$c108","peg$c109","digits","peg$c110","peg$c111","peg$currPos","peg$savedPos","peg$posDetailsCache","column","peg$maxFailPos","peg$maxFailExpected","peg$silentFails","startRule","peg$computeLocation","location1","peg$buildSimpleError","text1","peg$computePosDetails","pos","startPos","endPos","startPosDetails","endPosDetails","peg$fail","peg$buildStructuredError","peg$parsemessage","s0","s1","peg$parsemessageElement","s2","s3","peg$parseselfClosingTag","peg$parseopeningTag","peg$parseclosingTag","peg$parsetagElement","peg$parsemessageText","peg$parseliteralElement","s5","peg$parse_","peg$parseargNameOrNumber","peg$parseargumentElement","s7","s9","s10","s11","s12","peg$parsenumberSkeletonToken","peg$parsenumberSkeleton","peg$parsenumberArgStyle","peg$parsenumberFormatElement","peg$parsedateTimeSkeletonLiteral","peg$parsedateTimeSkeletonPattern","peg$parsedateTimeSkeleton","peg$parsedateOrTimeArgStyle","peg$parsedateOrTimeFormatElement","peg$parsesimpleFormatElement","s13","s14","s15","peg$parsenumber","peg$parsepluralOption","peg$parsepluralElement","peg$parseselectOption","peg$parseselectElement","peg$parsepoundElement","peg$parsedoubleApostrophes","peg$parsequotedString","peg$parseunquotedString","peg$parsenonTagStartingAngleBracket","s4","peg$parsevalidTag","peg$parsenumberSkeletonId","peg$parsewhiteSpace","peg$parsenumberSkeletonTokenOption","s6","peg$parseargName","peg$parsepluralRuleSelectValue","peg$parsepatternSyntax","peg$parseargNumber","peg$parseescapedChar","peg$parsetagName","captureLocation","PLURAL_HASHTAG_REGEX","normalizeHashtagInPlural","els","matchingLiteralElIndex","literalEl","el_1","newEls","ErrorCode","PART_TYPE","FormatError","msg","originalMessage","InvalidValueError","variableId","INVALID_VALUE","InvalidValueTypeError","MissingValueError","MISSING_VALUE","isFormatXMLElementFn","formatToParts","locales","formatters","formats","currentPluralValue","els_1","getNumberFormat","varName","getDateTimeFormat","value_1","formatFn","chunks","Intl","PluralRules","MISSING_INTL_API","rule","getPluralRules","lastPart","mergeLiteral","mergeConfigs","configs","c1","c2","createFastMemoizeCache","memoizeIntl","memoize","IntlErrorCode","IntlMessageFormat","overrideFormats","defaultLocale","formatterCache","pluralRules","ast","resolvedOptions","NumberFormat","supportedLocalesOf","getAst","__parse","DateTimeFormat","memoizedDefaultLocale","percent","short","medium","long","full","IntlError","exception","UnsupportedFormatterError","UNSUPPORTED_FORMATTER","InvalidConfigError","INVALID_CONFIG","MissingDataError","MISSING_DATA","MessageFormatError","FORMAT_ERROR","defaultMessage","MissingTranslationError","MISSING_TRANSLATION","filterProps","whitelist","DEFAULT_INTL_CONFIG","timeZone","defaultFormats","getNamedFormat","formatType","invariantIntlContext","intl","CORE_DEFAULT_INTL_CONFIG","textComponent","aKeys","bKeys","setTimeZoneInOptions","deepMergeOptions","opts1","opts2","deepMergeFormatsAndSetTimeZone","f1","mfFormats","messageDescriptor","defaultRichTextElements","msgId","getMessageFormat","NUMBER_FORMAT_OPTIONS","getFormatter","formatNumber","formatNumberToParts","RELATIVE_TIME_FORMAT_OPTIONS","formatRelativeTime","getRelativeTimeFormat","RelativeTimeFormat","DATE_TIME_FORMAT_OPTIONS","filteredOptions","timeStyle","dateStyle","formatDate","formatTime","formatDateTimeRange","formatRange","formatDateToParts","formatTimeToParts","PLURAL_FORMAT_OPTIONS","formatPlural","LIST_FORMAT_OPTIONS","formatList","getListFormat","ListFormat","richValues_1","serializedValues","generateToken","DISPLAY_NAMES_OPTONS","formatDisplayName","getDisplayNames","DisplayNames","verifyConfigMessages","createIntl","relativeTime","displayNames","createFormatters","resolvedConfig","processIntlConfig","wrapRichTextChunksInFragment","assignUniqueKeysToFormatXMLElementFnArgument","acc","formatXMLElementFn","rawValues","coreFormatMessage","rawDefaultRichTextElements","coreIntl","coreCreateIntl","IntlProvider","prevConfig","privateArea","privateSubscriber","StroykaSlickBase","super","unsubscribeMedias","originalSlickNext","originalSlickPrev","setRef","onMousedown","downX","downY","onMousemove","moveEvent","preventClick","distance","onMouseup","oldIndex","newIndex","activeSlides","getActiveSlides","setSlickRef","slickRef","getStartPosition","getSlidesToShow","createMedias","prevChildren","currChildren","prevResponsive","currResponsive","getSlidesCount","slidesCount","firstSlide","lastSlide","subscriptions","createMedia","otherProps","reversedChildren","_jsx","Slick","StroykaSlick","connect","BlockSlideShow","departmentsAreaRef","onChangeMedia","departmentsAria","setDepartmentsAreaRef","withDepartments","slickSettings","slideSpeed","blockClasses","layoutClasses","slideComponents","imageClassic","imageFull","actionButton","_slide$action","_jsxs","_slide$action2","backgroundImage","cursor","imageMobile","html","getProductBySlug","slug","getProductsList","filterValues","filters","includeFilters","getSuggestions","useDeferredData","initialData","isLoading","memoizedSource","curState","svgRef","titleId","xmlns","preserveAspectRatio","xmlSpace","stroke","cy","BlockHeader","onPrev","onNext","onGroupClick","groupsList","ArrowRoundedLeft7x11Svg","ArrowRoundedRight7x11Svg","FormattedMessage","useIntl","Text","nextValues","nextOtherProps","AsyncAction","loading","CART_ADD_ITEM","CART_REMOVE_ITEM","CART_REMOVE_ALL","CART_UPDATE_QUANTITIES","calcSubtotal","items","subtotal","total","calcQuantity","quantity","initialState","lastItemId","QUICKVIEW_OPEN","QUICKVIEW_CLOSE","cancelPreviousRequest","quickviewClose","quickviewOpen","productSlug","productApi","quickviewOpenSuccess","newState","cartAddItemSuccess","productName","cartRemoveAllSuccess","cartAddItem","cartClear","cartRemoveItem","itemId","cartRemoveItemSuccess","itemIndex","productID","optionID","findItemIndex","newItems","addItem","removeAll","quantities","needUpdate","price","updateQuantities","home","catalog","category","getCategoryParents","getCostByRegion","region","costs","selectedCosts","country","regionName","regionCCCode","getProductPrice","optionCost","cost","getProductDiscountPrice","discountPrice","costHandling","selectedLanguage","defaultData","langs","selectedLang","layout","ProgramContext","containerClasses","cartTextLang","badges","imageLowMedium","alt","Points","featureName","optionComponent","fontSize","Quickview16Svg","marginBottom","brandName","langData","productDropShipDays","permissions","allowPurchase","BlockProductsCarousel","handleNextClick","handlePrevClick","productsColumns","products","withSidebar","horizontal","ProductCard","section","categories","featuredProducts","tabs","productsSource","currentTabId","setCurrentTabId","memoizedTabs","tab","currentTab","handleTabChange","useProductTabs","categorySlug","sections","sectionComponents","RawHTML","ProductsCarousel","page","setPage","UserContext","calculateLevelPage","_levelPage","_levelPage$","_levelPage2","_levelPage2$","_levelPage2$$customHo","levelPage","_program$plateauLevel","_levelPage3","plateauLevels","level","levelId","customHomePage","_calculateLevelPage","_pages$filter","programApi","pages","homePageData","Helmet","fullName","Sections","textAlign","footerTextAlign","footerTextSize","contacts","address","phone","ToTop","show","setShow","behavior","ArrowRoundedUp13x8Svg","FooterContacts","getFullYear","Indicator","setWrapperRef","wrapperRef","handleOutsideClick","handleButtonClick","dropdown","toggle","icon","cart","grandTotal","handleCheckout","unitPrice","removeButton","Cross10Svg","optionColorValue","optionSizeValue","optionCustom1Value","optionsCustom1Label","optionCustom2Value","optionsCustom2Label","optionCustom3Value","optionsCustom3Label","totals","balance","Cart20Svg","AppLink","external","linkProps","MegamenuLinks","links","depth","linksList","subLinks","Megamenu","menu","menuStyle","withIcons","renderLink","itemsList","arrow","submenu","ArrowRoundedRight6x9Svg","srcSet","icon_srcset","handleMouseEnter","megamenu","containerWidth","offsetParent","megamenuWidth","itemOffsetLeft","megamenuPosition","desktopMenu","ArrowRoundedDown9x6Svg","rootClasses","imageLowSmall","productUPC","Cart16Svg","inputRef","cancelFn","setCancelFn","suggestionsOpen","setSuggestionsOpen","hasSuggestions","setHasSuggestions","suggestedProducts","setSuggestedProducts","setCategories","categoriesData","CategoriesContext","treeToList","searchQuery","setQuery","setCategory","wrapper","onGlobalClick","newCancelFn","handleFocus","handleChangeQuery","Cross20Svg","categoryOptions","onBlur","handleBlur","onFocus","placeholder","autoComplete","Search20Svg","Suggestions","wishlist","points","NavLinks","CartIndicator","showTopCategorySearchBar","paddingLeft","paddingRight","Search","Dropdown","handleItemClick","ArrowRoundedDown7x5Svg","changeLocale","languages","globalCssModule","setScrollbarWidth","conditionallyUpdateScrollbar","scrollbarWidth","scrollDiv","overflow","getScrollbarWidth","fixedContent","bodyPadding","innerWidth","mapToCssModules","cssModule","omitKeys","targetPropType","tagPropType","TransitionTimeouts","TransitionPropTypeKeys","keyCodes","getTag","findDOMElements","isReactRefObj","selection","isArrayOrNodeList","focusableElements","defaultNode","baseClass","baseClassActive","Fade","Tag","transitionProps","pickKeys","FadePropTypes","isOpen","centered","scrollable","keyboard","labelledBy","backdrop","onOpened","onClosed","wrapClassName","modalClassName","backdropClassName","contentClassName","backdropTransition","modalTransition","unmountOnClose","returnFocusAfterClose","trapFocus","propsToOmit","Modal","_element","_originalBodyPadding","getFocusableChildren","handleBackdropClick","handleBackdropMouseDown","handleEscape","handleStaticBackdropAnimation","handleTab","manageFocusAfterClose","clearBackdropAnimationTimeout","showStaticBackdropAnimation","setFocus","ev","_dialog","modalIndex","openCount","isAppearing","getFocusedChild","currentFocus","focusableChildren","_mouseDownElement","totalFocusable","focusedIndex","_backdropAnimationTimeout","_triggeringElement","_mountContainer","allElements","getTarget","getPropertyValue","getOriginalBodyPadding","modalOpenClassName","modalOpenClassNameRegex","renderModalDialog","_classNames","dialogBaseClass","isModalHidden","modalAttributes","hasTransition","Backdrop","wrapTag","closeAriaLabel","ModalHeader","WrapTag","closeIcon","ModalBody","REGION_CHANGE","countries","code2","DZ","regionChange","errorMessage","setErrorMessage","getLocation","locationName","locations","changeRegion","defaultLocation","defaultContinent","defaultCountry","setLocation","setCountry","getCountry","countryName","modal","setModal","countriesTitle","countryTitle","getProgramLocations","programLocations","continents","DropdownLanguage","saveChanges","authenticated","authenticateSSO","signout","theme","logo","showTopAccountBar","logout","myProfile","geolocation","enabled","GeoModal","maxHeight","messageAlign","messageSize","adminMessage","calculateLevelMessage","_levelMessage","_levelMessage$","levelMessage","_levelMessage2","Header","Topbar","bannerSection","NavPanel","MOBILE_MENU_OPEN","MOBILE_MENU_CLOSE","mobileMenuOpen","MobileHeader","handleOpenSearch","searchOpen","handleCloseSearch","searchInput","openMobileMenu","searchClasses","Menu18x14Svg","mobileLogo","plateau","Collapse","handleTransitionEnd","handleToggle","toggleClass","expand","setItemRef","setContentRef","immediate","startHeight","endHeight","MobileLinks","onItemClick","linkOrButton","ArrowRoundedDown12x7Svg","mobileMenuState","mobileMenu","closeMobileMenu","InputNumber","handleChange","handleAddMouseDown","change","changeByTimer","handleSubMouseDown","interval","documentMouseUp","enableUp","enableDown","formControlClasses","slickSettingsFeatured","slickSettingsThumbnails","standard","sidebar","columnar","quickview","ProductGallery","createGallery","imagesRefs","unmounted","handleFeaturedClick","openPhotoswipe","handleThumbnailClick","slickFeaturedRef","getIndexDependOnDir","handleFeaturedBeforeChange","handleFeaturedAfterChange","handleZoomButtonClick","setSlickFeaturedRef","gallery","_product$resources$pr","_product$images","optionImages","optionImageHigh","imageHigh","resources","productResourceType","productImageLink","naturalWidth","naturalHeight","msrc","getThumbBoundsFn","dirDependentIndex","ration","fitWidth","fitHeight","bgOpacity","getCurrentIndex","_option$optionImages","_product$images2","featured","thumbnails","ZoomIn24Svg","Product","handleChangeQuantity","handleChangeColor","handleChangeOption","handleChangeSize","custom1","custom2","custom3","colorValid","sizeValid","custom1Valid","custom2Valid","custom3Valid","getAvailableOptions","colorExists","sizeExists","custom1Exists","custom2Exists","custom3Exists","getProductOption","handleChangeCustom1Option","handleChangeCustom2Option","handleChangeCustom3Option","addToCartEnabled","colors","sizes","custom1Options","custom2Options","custom3Options","equalizeLang","getProductColors","getProductSizes","getCustom1Options","getCustom2Options","getCustom3Options","userContext","productSalesCopy","custom1Option","custom2Option","custom3Option","htmlFor","productView","BlockLoader","PageHeader","_JSON$parse","breadcrumb","lang","getCateogryLanguage","getUser","getDefaultAddress","addresses","townCity","city","stateCounty","postcode","address1","address2","address3","address4","companyName","getAddress","updateAddress","userid","addressId","addAddress","userId","deleteAddress","updateUser","changePassword","currentPassword","forgotPassword","resetPassword","AccountPageAddresses","border","background","addressid","userApi","sid","getOrder","getOrders","getTransactions","placeOrder","_localStorage$getItem2","AccountPageDashboard","orders","setOrders","fullname","useremail","orderApi","orderLines","orderNumber","toLocaleString","tracking","trackingLink","addressComponent","ableToPasswordReset","AccountPageEditAddress","setAddress","allowAddressManagement","addressvariable","zipRegCnd","zipRegUs","zipRegex","addressValidate","countryValidate","fullnameValidate","cityValidate","stateValidate","phoneValidate","checkValid","keyChanged","newAddress","maxLength","selectCountry","continentsFilter","filteredContinents","allCountries","phoneExt","alternativePhone","alternativePhoneExt","AccountPageNewAddress","defaultContinents","alignItems","orderId","setOrder","orderData","shippingAddress","_item$tracking","_item$tracking2","trackingNumber","trackingCompany","postalcode","AccountPageOrders","ordersData","ordersList","ModalFooter","Button","btnOutlineColor","defaultAriaLabel","modalFail","modalClose","AccountPagePassword","setPassword","password2","setPassword2","setModalFail","setCurrentPassword","validationMessages","errorMessageList","password2Valid","formClassName","validationFormClassName","isPassword2Valid","PasswordModal","PasswordModalFail","AccountPageProfile","newUser","setNewUser","validationEmail","setDisableButton","AccountPageTransactions","transactionsData","transactions","transactionsList","createDate","amount","AccountTimeout","AccountLayout","defaultRedirect","AccountPageOrderDetails","setEmail","onSubmit","AccountPageLogin","_program$theme","_program$theme2","failCounter","setFailCounter","failFunc","enterLoginPassword","claimComponent","loginLogo","loginComponent","ErrModal","Check9x7Svg","authComponent","AccountPageLogout","ShopPageCart","currentQuantity","getProductMax","stateQuantity","cartUpdateQuantities","getItemQuantity","cartNeedUpdate","remaining","getCartTotal","renderItems","totalPrice","Cross12Svg","allTotal","checkoutDisabled","renderCart","cartUpdateQuantitiesSuccess","_address$customField","_address$customField2","onAddressChange","flatCountries","geolocationCountry","setAddressId","userData","setUserData","storageAddress","userAddress","claimDefaultMail","defaultEmail","allowMail","allowEmailUpdate","defaultMail","claimEmail","newaddress","customKeyChanged","customField1","customField2","addressHandling","mailChanged","userMail","ShopPageCheckout","checkBox","aggrementCheckBox","isSubmitted","isValid","defaultAddress","renderTotals","listStyleType","goToShop","checkoutSelectDifferentProductRedirectHome","breadcrumbPlateau","ShopPageCheckoutAddress","valid","SIDEBAR_OPEN","SIDEBAR_CLOSE","sidebarOpen","sidebarClose","CategorySidebar","sidebarState","offcanvas","backdropRef","bodyRef","changedByMedia","CategorySidebarItem","Pagination","onPageChange","getPages","siblings","firstLinkClasses","lastLinkClasses","ArrowRoundedLeft8x13Svg","ArrowRoundedRight8x13Svg","ProductsView","productsList","propsLayout","grid","onOptionChanged","resetFilters","setLayout","handleResetFilters","toPageOne","pageData","toTop","filtersCount","viewModes","allowUserGrid","LayoutGrid16x16Svg","LayoutList16x16Svg","LayoutGridWithDetails16x16Svg","gridType","viewMode","productsListItems","viewOptionsClasses","divs","showingFunctoLang","_program$permissions","_program$permissions$","_program$permissions2","_program$permissions3","_program$permissions4","_program$permissions5","showBrands","showCategories","showPriceSlider","showTags","Filters16Svg","hidden","sortOrder","sortName","_Fragment","productCounts","resetPage","categoryApi","getLangCategories","getCategories","categoriesTreeData","categoriesListData","walkTree","prepareCategory","getCategoryBySlug","defs","customFields","childrenTree","childrenList","handleClick","categoriesList","itemClasses","ArrowRoundedLeft6x9Svg","showCount","setShowCount","showText","setShowText","onChangeValue","textA","textB","HandleShow","getFirstValidValue","checkbox","getCheckBox","propsFrom","propsTo","setTimer","stateFrom","stateTo","fromLabel","toLabel","limitMax","newFrom","newTo","marginRight","RadioFilterHandler","deserialize","isDefaultValue","getDefaultValue","getFilterHandler","filterComponents","FilterCategory","FilterRange","check","FilterCheck","WidgetFilters","setCheckbox","handleValueChange","brandChips","brandFilter","filtersList","filterView","FilterComponent","permission","brand","chipCopy","chipDataHandler","AbstractFilterBuilder","makeItems","calc","build","CategoryFilterBuilder","CheckFilterBuilder","extractItems","RangeFilterBuilder","extractValue","digit","costMSRP","parseQueryOptions","optionValues","parseQueryFilters","filterSlug","categoryIsLoading","productsListIsLoading","ShopPageCategory","sidebarPosition","pageQuery","setLimit","setOnce","setSort","buildQuery","insertUrlParam","pageTitle","productsView","sidebarComponent","setRefreshUser","colSpan","Check100Svg","getMonth","getDate","float","_order$user","disableButton","APP","video","productResourceEmbed","_product$dims","_product$dims2","_product$dims2$itemHe","_product$dims3","_product$dims4","_product$dims4$itemWe","_product$dims5","_product$dims6","_product$dims6$itemWi","dims","itemHeight","toFixed","itemWeight","itemWidth","ProductTabs","setCurrentTab","videoFeed","ProductTabDescription","ProductTabFeatures","ProductTabVideos","tabsButtons","setTab","newTab","tabsContent","prop65","ShopPageProduct","setIsLoading","setProduct","getLanguages","UsedLayout","setProgram","setLanguages","isLoadingProgram","setisLoadingProgram","isLoadingLanguages","setisLoadingLanguages","setUser","preloader","programData","languageApi","color1","color2","color3","SiteRebuilding","PrivateRoute","ShopPageOrderSuccess","Footer","headerLayout","UsedAccount","pageName","Layout","_languages$locale","refreshUser","categoryLanguages","setCategoryLanguages","determineLangList","setDetermineLangList","orderSummary","languageList","originalCategoryName","es","nl","_categoryLanguages$i","_categoryLanguages$i$","_categoryLanguages$i2","_categoryLanguages$i3","_categoryLanguages$i4","feedCategory","productCategoryChild","productCategoryGrandChild","productCategoryGreatGrandChild","categoryText","cartItems","feedStatus","RebuildingLayout","UsedAccountLayout","favIcon","Quickview","MobileMenu","HomePage","SitePage","TermsAndConditions","PageCheckout","PageCart","ShopPageOrderSummary","ShopPageTrackOrder","SitePageNotFound","AccountPageResetPassword","MobileHeaderLogin","backgroundRepeat","backgroundPosition","alignContent","SiteProgramClosed","ComponentToWrap","oktaAuthProps","login","signOut","_params$get","_this$state$user","_params$get2","_params$get3","emailAddresses","lastUpdateDate","_this$state","_this$state$user2","_this$state2","_this$state2$user","_this$state3","_this$state3$user","_params$get4","_this$state4","_this$state4$user","datestring","fontFamily","borderRadius","backgroundColor","RedirectOidc","userInfo","setUserInfo","oidcData","setOidcData","_authState$accessToke","CallbackOkta","setCounter","Root","_oktaAuth","_this$state$programDa","_this$state$programDa2","_this$state$programDa3","_this$state$programDa4","_this$state$programDa5","ssoEnabled","oktaConfig","serviceURL","HelmetProvider","LoginLayout","MindTickle","SecureRoute","createThunkMiddleware","extraArgument","thunk","withExtraArgument","createStore","preloadedState","enhancer","currentReducer","currentState","currentListeners","nextListeners","isDispatching","ensureCanMutateNextListeners","replaceReducer","nextReducer","$$observable","outerSubscribe","observeState","reducers","reducerKeys","finalReducers","shapeAssertionError","finalReducerKeys","assertReducerShape","hasChanged","previousStateForKey","nextStateForKey","cartReducer","regionReducer","mobileMenuReducer","quickviewReducer","sidebarReducer","middlewares","_dispatch","middlewareAPI","middleware","_objectSpread2","applyMiddleware","serviceWorker","ready","registration"],"sourceRoot":""}