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AOC,CAAS,CACtB,EAEIE,EAAe5D,EAAO,gBAetB6D,EAAqB,KACzB,MAAMC,EAAa,SAAS,eAAe,eAAe,EACtDA,IACaD,EAAA,KAAK,MAAMC,EAAW,SAAS,GAE5CD,IAEHL,EAAiBG,EAAS,YAGXC,EAAAC,EAAc,SAAS,QAAQ,UAI/C,MAAMJ,EAAc,SAAS,eAAe,MAAM,EAClD,GAAI,CAACA,EACE,yCAIP,MAAMrE,EAAWqE,EAAY,QAAQ,YAAY7C,EAAAZ,EAAO,aAAP,YAAAY,EAAmB,UACpE,GAAI,CAACxB,EACE,+BASP2E,GAAS3E,EAAUwE,CAAuB,EACxC,KAAK,IAAMI,EAAc,GACzB,KAAK,IAAM,CAEXR,EACCC,EAECnE,MAAAa,EAAM,WAAN,CACA,eAAC8D,EACA,UAAA3E,EAAA,IAAC2C,GAAA,CACA,KAAM,OAAO,SAAS,SACtB,OAAQiC,EACR,SAAUL,EACV,SAAAzE,EACA,cAAe,CAAC,IAElB,CACD,GAEF,CAAC","names":["LoadableSitecoreContextRoute","Loadable","__vitePreload","Layout","componentFactory","Router","path","JssRoute","ssrState","siteName","project","jsx","SitecoreContext","Routes","Route","props","ComponentLoader","n","LayoutServiceFactory","cancelTokenSource","RestLayoutService","config","layoutServiceFactory","RouteHandler","React","__publicField","sitecoreRoutePath","language","layoutServiceInstance","resolve","routeData","error","newContext","_a","newLanguage","i18n","previousProps","existingRoute","newRoute","isEditorActive","axios","redirectTo","redirect","Fragment","layoutData","isRtl","_b","RouteHandler$1","withSitecoreContext","LANGUAGE_REG_EXP","parseRouteParams","url","route","useParams","AppRoot","_c","SitecoreContextRoute","RaceteqLoadableSitecoreContextRoute","AramcoWorldLoadableSitecoreContextRoute","AramcoStadiumLoadableSitecoreContextRoute","AramcoQafilahLoadableSitecoreContextRoute","AramcoTechLoadableSitecoreContextRoute","DictionaryServiceFactory","RestDictionaryService","dictionaryServiceFactory","i18nInit","dictionary","reject","options","dictionaryServiceInstance","_namespace","callback","phrases","x","deepmerge","err","initReactI18next","renderFunction","rootElement","component","ReactDOM","initLanguage","__JSS_STATE__","ssrRawJson","i18ninit","preloadReady","HelmetProvider","BrowserRouter"],"ignoreList":[],"sources":["../../../src/project/Raceteq/LoadableSitecoreContextRoute.tsx","../../../src/project/AramcoWorld/LoadableSitecoreContextRoute.tsx","../../../src/project/AramcoStadium/LoadableSitecoreContextRoute.tsx","../../../src/project/AramcoQafilah/LoadableSitecoreContextRoute.tsx","../../../src/project/AramcoTech/LoadableSitecoreContextRoute.tsx","../../../src/foundation/Jss/layout-service-factory.ts","../../../src/foundation/Jss/RouteHandler.tsx","../../../src/foundation/Jss/JssRoute.tsx","../../../src/AppRoot.tsx","../../../src/foundation/Dictionary/dictionary-service-factory.ts","../../../src/foundation/Dictionary/i18n.ts","../../../src/entry-client.tsx"],"sourcesContent":["import { type LoadableSitecoreContextRouteProps } from \"~/foundation/Multisite\";\r\nimport { SitecoreContext } from \"@sitecore-jss/sitecore-jss-react\";\r\nimport { Loadable } from \"~/foundation/ReactLoadable\";\r\nimport { ComponentLoader } from \"~/foundation/Components/Loading/ComponentLoader\";\r\nimport { Route, Routes } from \"react-router-dom\";\r\n\r\ntype ProjectImportProps = typeof import(\"./Project\"); // eslint-disable-line\r\n\r\nexport const LoadableSitecoreContextRoute = Loadable({\r\n\tloader: () => import(/* webpackChunkName: \"Raceteq_Project\" */'./Project'),\r\n\trender: ({ Layout, componentFactory }, { Router, path, JssRoute, ssrState, siteName, project }) => {\r\n\t\treturn (\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t} />\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t);\r\n\t},\r\n\tloading: (props: { error?: Error | unknown, retry?: () => void }) => ,\r\n\tmodules: ['Raceteq_componentFactory'],\r\n\tmoduleId: \"Raceteq_componentFactory\"\r\n});\r\n","import { type LoadableSitecoreContextRouteProps } from \"~/foundation/Multisite\";\r\nimport { SitecoreContext } from \"@sitecore-jss/sitecore-jss-react\";\r\nimport { Loadable } from \"~/foundation/ReactLoadable\";\r\nimport { ComponentLoader } from \"~/foundation/Components/Loading/ComponentLoader\";\r\nimport { Route, Routes } from \"react-router-dom\";\r\n\r\ntype ProjectImportProps = typeof import(\"./Project\"); // eslint-disable-line\r\n\r\nexport const LoadableSitecoreContextRoute = Loadable({\r\n\tloader: () => import(/* webpackChunkName: \"AramcoWorld_Project\" */'./Project'),\r\n\trender: ({ Layout, componentFactory }, { Router, path, JssRoute, ssrState, siteName, project }) => {\r\n\t\treturn (\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t} />\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t);\r\n\t},\r\n\tloading: (props: { error?: Error | unknown, retry?: () => void }) => ,\r\n\tmodules: ['AramcoWorld_componentFactory'],\r\n\tmoduleId: \"AramcoWorld_componentFactory\"\r\n});","import { type LoadableSitecoreContextRouteProps } from \"~/foundation/Multisite\";\r\nimport { SitecoreContext } from \"@sitecore-jss/sitecore-jss-react\";\r\nimport { Loadable } from \"~/foundation/ReactLoadable\";\r\nimport { ComponentLoader } from \"~/foundation/Components/Loading/ComponentLoader\";\r\nimport { Route, Routes } from \"react-router-dom\";\r\n\r\ntype ProjectImportProps = typeof import(\"./Project\"); // eslint-disable-line\r\n\r\nexport const LoadableSitecoreContextRoute = Loadable({\r\n\tloader: () => import(/* webpackChunkName: \"AramcoStadium_Project\" */'./Project'),\r\n\trender: ({ Layout, componentFactory }, { Router, path, JssRoute, ssrState, siteName, project }) => {\r\n\t\treturn (\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t} />\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t);\r\n\t},\r\n\tloading: (props: { error?: Error | unknown, retry?: () => void }) => ,\r\n\tmodules: ['AramcoStadium_componentFactory'],\r\n\tmoduleId: \"AramcoStadium_componentFactory\"\r\n});\r\n","import { type LoadableSitecoreContextRouteProps } from \"~/foundation/Multisite\";\r\nimport { SitecoreContext } from \"@sitecore-jss/sitecore-jss-react\";\r\nimport { Loadable } from \"~/foundation/ReactLoadable\";\r\nimport { ComponentLoader } from \"~/foundation/Components/Loading/ComponentLoader\";\r\nimport { Route, Routes } from \"react-router-dom\";\r\n\r\ntype ProjectImportProps = typeof import(\"./Project\"); // eslint-disable-line\r\n\r\nexport const LoadableSitecoreContextRoute = Loadable({\r\n\tloader: () => import(/* webpackChunkName: \"AramcoQafilah_Project\" */'./Project'),\r\n\trender: ({ Layout, componentFactory }, { Router, path, JssRoute, ssrState, siteName, project }) => {\r\n\t\treturn (\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t} />\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t);\r\n\t},\r\n\tloading: (props: { error?: Error | unknown, retry?: () => void }) => ,\r\n\tmodules: ['AramcoQafilah_componentFactory'],\r\n\tmoduleId: \"AramcoQafilah_componentFactory\"\r\n});\r\n","import { type LoadableSitecoreContextRouteProps } from \"~/foundation/Multisite\";\r\nimport { SitecoreContext } from \"@sitecore-jss/sitecore-jss-react\";\r\nimport { Loadable } from \"~/foundation/ReactLoadable\";\r\nimport { ComponentLoader } from \"~/foundation/Components/Loading/ComponentLoader\";\r\nimport { Route, Routes } from \"react-router-dom\";\r\n\r\ntype ProjectImportProps = typeof import(\"./Project\"); // eslint-disable-line\r\n\r\nexport const LoadableSitecoreContextRoute = Loadable({\r\n\tloader: () => import(/* webpackChunkName: \"AramcoTech_Project\" */'./Project'),\r\n\trender: ({ Layout, componentFactory }, { Router, path, JssRoute, ssrState, siteName, project }) => {\r\n\t\treturn (\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t} />\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t);\r\n\t},\r\n\tloading: (props: { error?: Error | unknown, retry?: () => void }) => ,\r\n\tmodules: ['AramcoTech_componentFactory'],\r\n\tmoduleId: \"AramcoTech_componentFactory\"\r\n});\r\n","import config from \"~/temp/config\";\r\nimport { RestLayoutService } from \"@sitecore-jss/sitecore-jss-react\";\r\nimport { type RestLayoutServiceConfig } from \"@sitecore-jss/sitecore-jss/types/layout/rest-layout-service\";\r\nimport { type CancelTokenSource } from \"axios\";\r\n\r\nexport class LayoutServiceFactory {\r\n\tcreate(siteName: string, cancelTokenSource?: CancelTokenSource) {\r\n\t\treturn new RestLayoutService({\r\n\t\t\tapiHost: config.sitecoreApiHost,\r\n\t\t\tapiKey: config.sitecoreApiKey,\r\n\t\t\tsiteName: siteName,\r\n\t\t\tconfigurationName: \"jss\",\r\n\t\t\tcancelTokenSource,\r\n\t\t} as RestLayoutServiceConfig & { cancelTokenSource: CancelTokenSource });\r\n\t}\r\n}\r\n\r\nexport const layoutServiceFactory = new LayoutServiceFactory();\r\n","/* eslint-disable no-console, @typescript-eslint/no-explicit-any */\r\nimport React from \"react\";\r\nimport { redirect } from \"react-router-dom\";\r\nimport i18n from \"i18next\";\r\nimport axios, { type CancelTokenSource } from \"axios\";\r\nimport { isEditorActive, type LayoutServiceData, withSitecoreContext, type ComponentFactory } from \"@sitecore-jss/sitecore-jss-react\";\r\nimport config from \"~/temp/config\";\r\nimport { layoutServiceFactory } from \"./layout-service-factory\";\r\nimport { type SitecoreContextValue } from \"./.\";\r\nimport { type LayoutServiceRedirect } from \"./generated-types\";\r\nimport { type LayoutProps } from \"~/foundation/Multisite\";\r\n\r\n// Dynamic route handler for Sitecore items.\r\n// Because JSS app routes are defined in Sitecore, traditional static React routing isn't enough -\r\n// we need to be able to load dynamic route data from Sitecore after the client side route changes.\r\n// So react-router delegates all route rendering to this handler, which attempts to get the right\r\n// route data from Sitecore - and if none exists, renders the not found component.\r\n\r\nexport type RouterHandlerState = {\r\n\tredirectTo: string | null;\r\n}\r\n\r\nexport type RouterHandlerProps = {\r\n\tisSSR: boolean;\r\n\troute: string;\r\n\tlanguage: string | undefined;\r\n\tsitecoreContext: SitecoreContextValue & { error?: unknown };\r\n\tupdateSitecoreContext: (value: any) => void;\r\n\tsiteName: string;\r\n\turl: string;\r\n\tprojectLayer: string;\r\n\tcomponentFactory?: ComponentFactory;\r\n\tLayoutComponent: React.ComponentType;\r\n}\r\n\r\nclass RouteHandler extends React.Component {\r\n\r\n\tprivate currentCancelTokenSource: CancelTokenSource | undefined;\r\n\r\n\tconstructor(props: RouterHandlerProps) {\r\n\t\tsuper(props);\r\n\r\n\t\tthis.state = {\r\n\t\t\tredirectTo: null\r\n\t\t};\r\n\r\n\t\t// tell i18next to sync its current language with the route language\r\n\t\tthis.updateLanguage();\r\n\t}\r\n\r\n\tcomponentDidMount() {\r\n\t\t// If we are not using SSR we have to load layout data\r\n\t\tif (!this.props.isSSR) {\r\n\t\t\tthis.updateLayoutData();\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n * Loads route data from Sitecore Layout Service into state.routeData\r\n */\r\n\tupdateLayoutData(cancelTokenSource?: CancelTokenSource): Promise {\r\n\t\tlet sitecoreRoutePath = this.props.route || \"/\";\r\n\t\tif (!sitecoreRoutePath.startsWith(\"/\")) {\r\n\t\t\tsitecoreRoutePath = `/${sitecoreRoutePath}`;\r\n\t\t}\r\n\r\n\t\tconst language = this.getLanguage();\r\n\r\n\t\t// instantiate the dictionary service.\r\n\t\tconst layoutServiceInstance = layoutServiceFactory.create(this.props.siteName, cancelTokenSource);\r\n\r\n\t\treturn new Promise((resolve) => {\r\n\t\t\t// get the route data for the new route\r\n\t\t\tlayoutServiceInstance.fetchLayoutData(sitecoreRoutePath, language)\r\n\t\t\t\t.then((routeData: LayoutServiceData & LayoutServiceRedirect) => {\r\n\t\t\t\t\tif (!routeData.sitecore && routeData.redirect) {\r\n\r\n\t\t\t\t\t\tthis.setState({\r\n\t\t\t\t\t\t\tredirectTo: routeData.redirect.redirectUrl\r\n\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\tresolve(undefined);\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tthis.props.updateSitecoreContext(routeData);\r\n\r\n\t\t\t\t\tif (!window.location.hash) {\r\n\t\t\t\t\t\twindow.scrollTo(0, 0);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tresolve(undefined);\r\n\t\t\t\t})\r\n\t\t\t\t.catch(error => {\r\n\t\t\t\t\tif (error?.message === \"cancelled\") {\r\n\t\t\t\t\t\tresolve(undefined);\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tconst newContext = { ...this.props.sitecoreContext, error };\r\n\t\t\t\t\tthis.props.updateSitecoreContext(newContext);\r\n\t\t\t\t\twindow.scrollTo(0, 0);\r\n\t\t\t\t\tresolve(undefined);\r\n\t\t\t\t});\r\n\t\t})\r\n\t}\r\n\r\n\tgetLanguage() {\r\n\t\treturn (\r\n\t\t\tthis.props.language ||\r\n\t\t\tthis.props.sitecoreContext?.language ||\r\n\t\t\tconfig.defaultLanguage\r\n\t\t);\r\n\t}\r\n\r\n\t/**\r\n * Updates the current app language to match the route data.\r\n */\r\n\tupdateLanguage() {\r\n\t\tconst newLanguage = this.getLanguage();\r\n\r\n\t\tif (i18n.language !== newLanguage) {\r\n\t\t\ti18n.changeLanguage(newLanguage);\r\n\t\t}\r\n\t}\r\n\r\n\tcomponentDidUpdate(previousProps: RouterHandlerProps) {\r\n\t\tconst existingRoute = previousProps.url;\r\n\t\tconst newRoute = this.props.url;\r\n\r\n\t\t// don't change state (refetch route data) if the route has not changed\r\n\t\tif (existingRoute === newRoute) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// if in Sitecore editor - force reload instead of route data update\r\n\t\t// avoids confusing Sitecore's editing JS\r\n\t\tif (isEditorActive()) {\r\n\t\t\twindow.location.assign(newRoute);\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// if a fetch is already running, cancel it\r\n\t\tif (this.currentCancelTokenSource) {\r\n\t\t\tthis.currentCancelTokenSource.cancel(\"cancelled\");\r\n\t\t\tif (window.location.pathname.toLowerCase() === newRoute.toLowerCase()) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tconst cancelTokenSource = axios.CancelToken.source();\r\n\t\tthis.currentCancelTokenSource = cancelTokenSource;\r\n\r\n\t\tthis.updateLanguage();\r\n\t\tthis.updateLayoutData(cancelTokenSource)\r\n\t\t\t.then(() => {\r\n\t\t\t\tthis.currentCancelTokenSource = undefined;\r\n\t\t\t});\r\n\t}\r\n\r\n\trender() {\r\n\t\tconst { redirectTo } = this.state;\r\n\r\n\t\tif (redirectTo) {\r\n\t\t\tif (typeof window !== \"undefined\") {\r\n\t\t\t\twindow.location.href = redirectTo;\r\n\t\t\t}\r\n\t\t\tredirect(redirectTo)\r\n\t\t\treturn <>;\r\n\t\t}\r\n\r\n\t\tconst layoutData = this.props.sitecoreContext;\r\n\t\tconst isRtl = layoutData?.custom?.settings?.isRtl || false;\r\n\t\tconst Layout = this.props.LayoutComponent;\r\n\r\n\t\treturn (\r\n\t\t\t\r\n\t\t);\r\n\t}\r\n}\r\n\r\nexport default withSitecoreContext({ updatable: true })(RouteHandler);\r\n","/* eslint-disable @typescript-eslint/no-explicit-any */\r\nimport { type FC } from \"react\";\r\nimport { type LayoutProps } from \"~/foundation/Multisite\";\r\nimport { useParams } from \"react-router-dom\";\r\nimport RouteHandler from \"./RouteHandler\";\r\n\r\n// support languages in the URL prefix\r\n// e.g. /da-DK/path, or /en/path, or /path\r\nconst LANGUAGE_REG_EXP = /^\\/?(([a-z]{2}-[a-zA-Z]{2})|([a-z]{2}))(\\/|$)/g;\r\n\r\nexport const parseRouteParams = (url: string) => {\r\n\tconst language = url.match(LANGUAGE_REG_EXP);\r\n\tconst route = url.replace(LANGUAGE_REG_EXP, '');\r\n\r\n\treturn {\r\n\t\troute: route.startsWith('/') ? route : `/${route}`,\r\n\t\tlanguage: language ? language[0].replace(/\\//g, '') : undefined,\r\n\t};\r\n};\r\n\r\nexport type JssRouteProps = {\r\n\tisSSR: boolean;\r\n\tsiteName: string;\r\n\tprojectLayer: string;\r\n\tLayoutComponent: React.ComponentType>;\r\n}\r\n\r\nexport const JssRoute: FC = (props) => {\r\n\tconst params = useParams();\r\n\tconst url = params['*'] ?? \"/\";\r\n\r\n\treturn ;\r\n};","/* eslint-disable @typescript-eslint/no-explicit-any */\r\nimport { type ElementType, type FC } from \"react\";\r\nimport { type LayoutServiceData } from \"~/foundation/Jss/useSitecoreContext\";\r\nimport { type LoadableSitecoreContextRouteProps } from \"./foundation/Multisite\";\r\nimport { LoadableSitecoreContextRoute as RaceteqLoadableSitecoreContextRoute } from \"./project/Raceteq/LoadableSitecoreContextRoute\";\r\nimport { LoadableSitecoreContextRoute as AramcoWorldLoadableSitecoreContextRoute } from \"./project/AramcoWorld/LoadableSitecoreContextRoute\";\r\nimport { LoadableSitecoreContextRoute as AramcoStadiumLoadableSitecoreContextRoute } from \"./project/AramcoStadium/LoadableSitecoreContextRoute\";\r\nimport { LoadableSitecoreContextRoute as AramcoQafilahLoadableSitecoreContextRoute } from \"./project/AramcoQafilah/LoadableSitecoreContextRoute\";\r\nimport { LoadableSitecoreContextRoute as AramcoTechLoadableSitecoreContextRoute } from \"./project/AramcoTech/LoadableSitecoreContextRoute\";\r\nimport { JssRoute } from \"./foundation/Jss/JssRoute\";\r\nimport config from \"./temp/config\";\r\n\r\n// This is the main JSX entry point of the app invoked by the renderer (server or client rendering).\r\n// By default the app's normal rendering is delegated to that handles the loading of JSS route data.\r\n\r\ntype AppRootProps = {\r\n\tssrState?: LayoutServiceData;\r\n\tpath: string;\r\n\tRouter: any;\r\n\tsiteName: string;\r\n\trouterContext: any;\r\n};\r\n\r\nconst AppRoot: FC = (props) => {\r\n\tconst { path, Router, ssrState, siteName } = props;\r\n\tconst project = ssrState?.sitecore.context?.custom?.projectLayer || config.devProject?.projectName;\r\n\tif (!project) {\r\n\t\tthrow \"Project is not defined\";\r\n\t}\r\n\r\n\tlet SitecoreContextRoute: ElementType | null = null;\r\n\r\n\tif (project === \"Raceteq\") {\r\n\t\tSitecoreContextRoute = RaceteqLoadableSitecoreContextRoute;\r\n\t}\r\n\r\n\tif (project === \"AramcoWorld\") {\r\n\t\tSitecoreContextRoute = AramcoWorldLoadableSitecoreContextRoute;\r\n\t}\r\n\r\n\tif (project === \"AramcoStadium\") {\r\n\t\tSitecoreContextRoute = AramcoStadiumLoadableSitecoreContextRoute;\r\n\t}\r\n\r\n\tif (project === \"AramcoQafilah\") {\r\n\t\tSitecoreContextRoute = AramcoQafilahLoadableSitecoreContextRoute;\r\n\t}\r\n\r\n\tif (project === \"AramcoTech\") {\r\n\t\tSitecoreContextRoute = AramcoTechLoadableSitecoreContextRoute;\r\n\t}\r\n\r\n\tif (!SitecoreContextRoute) {\r\n\t\tthrow \"Project is invalid: \" + project;\r\n\t}\r\n\r\n\t// wraps the app with:\r\n\t// SitecoreContext: provides component resolution and context services via withSitecoreContext\r\n\t// Router: provides a basic routing setup that will resolve Sitecore item routes and allow for language URL prefixes.\r\n\treturn (\r\n\t\t\r\n\t);\r\n}\r\n\r\nexport default AppRoot;\r\n","import { RestDictionaryService } from \"@sitecore-jss/sitecore-jss-react\";\r\nimport config from \"~/temp/config\";\r\n\r\nexport class DictionaryServiceFactory {\r\n\tcreate(siteName: string) {\r\n\t\treturn new RestDictionaryService({\r\n\t\t\tapiHost: config.sitecoreApiHost,\r\n\t\t\tapiKey: config.sitecoreApiKey,\r\n\t\t\tsiteName,\r\n\t\t});\r\n\t}\r\n}\r\n\r\nexport const dictionaryServiceFactory = new DictionaryServiceFactory();\r\n","import i18n, { type ReadCallback, type InitOptions } from \"i18next\";\r\nimport { initReactI18next } from \"react-i18next\";\r\nimport { dictionaryServiceFactory } from \"./dictionary-service-factory\";\r\nimport deepmerge from 'deepmerge';\r\nimport config from \"~/temp/config\";\r\n\r\n/**\r\n * Initializes the i18next library to provide a translation dictionary to the app.\r\n * If your app is not multilingual, this file and references to it can be removed.\r\n * Elsewhere in the app to use the dictionary `import { t } from 'i18next'; ... t('key')`\r\n * @param {string} language Optional, the initial language. Only used for SSR; otherwise language set in RouteHandler.\r\n * @param {any} dictionary Optional, the dictionary to load. Only used for SSR; otherwise, the dictionary is loaded via JSS dictionary service.\r\n */\r\nexport default function i18nInit(siteName: string, language: string, dictionary: any) { // eslint-disable-line\r\n\treturn new Promise((resolve, reject) => {\r\n\t\tconst options: InitOptions = {\r\n\t\t\tdebug: false,\r\n\t\t\tlng: language,\r\n\t\t\tfallbackLng: false, // fallback to keys\r\n\t\t\tload: \"currentOnly\", // e.g. don't load 'es' when requesting 'es-MX' -- Sitecore config should handle this\r\n\t\t\t//useCookie: false, // using URLs and Sitecore to store language context, don't need a cookie\r\n\r\n\t\t\tinterpolation: {\r\n\t\t\t\tescapeValue: false, // not needed for react\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tif (dictionary) {\r\n\t\t\t// if we got dictionary passed, that means we're in a SSR context with a server-provided dictionary\r\n\t\t\t// so we do not want a backend, because we already know all possible keys\r\n\r\n\t\t\tif (!i18n.isInitialized) {\r\n\t\t\t\ti18n.use(initReactI18next).init(options, (error) => {\r\n\t\t\t\t\tif (error) reject(error);\r\n\r\n\t\t\t\t\ti18n.addResourceBundle(language, \"translation\", dictionary, true, true);\r\n\r\n\t\t\t\t\tresolve();\r\n\t\t\t\t});\r\n\t\t\t} else {\r\n\t\t\t\ti18n.changeLanguage(language).then(() => {\r\n\t\t\t\t\ti18n.addResourceBundle(language, \"translation\", dictionary, true, true);\r\n\r\n\t\t\t\t\tresolve();\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t// We're running client-side, so we get translation data from the Sitecore dictionary API using fetch backend\r\n\t\t\t// For higher performance (but less simplicity), consider adding the i18n chained backend to a local cache option like the local storage backend.\r\n\r\n\t\t\t// instantiate the dictionary service.\r\n\t\t\tconst dictionaryServiceInstance = dictionaryServiceFactory.create(siteName);\r\n\r\n\t\t\ti18n\r\n\t\t\t\t.use({\r\n\t\t\t\t\ttype: \"backend\",\r\n\t\t\t\t\tread(language: string, _namespace: string, callback: ReadCallback) {\r\n\t\t\t\t\t\tdictionaryServiceInstance\r\n\t\t\t\t\t\t\t.fetchDictionaryData(language)\r\n\t\t\t\t\t\t\t.then((phrases) => {\r\n\t\t\t\t\t\t\t\tif (config.connected) {\r\n\t\t\t\t\t\t\t\t\tfetch(`/dictionary-${siteName}.json`)\r\n\t\t\t\t\t\t\t\t\t\t.then(x => x.json())\r\n\t\t\t\t\t\t\t\t\t\t.then((dictionary: any) => { // eslint-disable-line\r\n\t\t\t\t\t\t\t\t\t\t\tcallback(null, deepmerge.all([dictionary, phrases]));\r\n\t\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\tcallback(null, phrases);\r\n\t\t\t\t\t\t\t})\r\n\t\t\t\t\t\t\t.catch((err) => callback(err, false));\r\n\t\t\t\t\t},\r\n\t\t\t\t})\r\n\t\t\t\t.use(initReactI18next)\r\n\t\t\t\t.init(options, (error) => {\r\n\t\t\t\t\tif (error) reject(error);\r\n\r\n\t\t\t\t\tresolve();\r\n\t\t\t\t});\r\n\t\t}\r\n\t});\r\n}\r\n","import \"@total-typescript/ts-reset\";\r\nimport React from \"react\"\r\nimport ReactDOM from \"react-dom/client\"\r\nimport { BrowserRouter } from \"react-router-dom\";\r\nimport AppRoot from \"~/AppRoot\";\r\nimport config from \"~/temp/config\";\r\nimport i18ninit from \"~/foundation/Dictionary/i18n\";\r\nimport { HelmetProvider } from \"react-helmet-async\";\r\n// import reportWebVitals from \"./reportWebVitals\"\r\n// import * as serviceWorker from \"./serviceWorker\"\r\nimport { preloadReady } from \"~/foundation/ReactLoadable\";\r\n\r\nlet renderFunction = (rootElement: HTMLElement, component: JSX.Element) => {\r\n\tconst root = ReactDOM.createRoot(rootElement);\r\n\troot.render(component);\r\n};\r\n\r\nlet initLanguage = config.defaultLanguage;\r\n\r\n/*\r\n\tSSR Data\r\n\tIf we're running in a server-side rendering scenario,\r\n\tthe server will provide JSON in the #__JSS_STATE__ element\r\n\tfor us to acquire the initial state to run with on the client.\r\n\r\n\tThis enables us to skip a network request to load up the layout data.\r\n\tWe are emitting a quiescent script with JSON so that we can take advantage\r\n\tof JSON.parse()'s speed advantage over parsing full JS, and enable\r\n\tworking without needing `unsafe-inline` in Content Security Policies.\r\n\r\n\tSSR is initiated from /server/server.js.\r\n*/\r\nlet __JSS_STATE__: any = null; // eslint-disable-line\r\nconst ssrRawJson = document.getElementById(\"__JSS_STATE__\");\r\nif (ssrRawJson) {\r\n\t__JSS_STATE__ = JSON.parse(ssrRawJson.innerHTML);\r\n}\r\nif (__JSS_STATE__) {\r\n\t// when React initializes from a SSR-based initial state, you need to render with `hydrateRoot` instead of `render`\r\n\trenderFunction = ReactDOM.hydrateRoot;\r\n\r\n\t// set i18n language SSR state language instead of static config default language\r\n\tinitLanguage = __JSS_STATE__.sitecore.context.language;\r\n}\r\n\r\n\r\nconst rootElement = document.getElementById(\"root\");\r\nif (!rootElement) {\r\n\tthrow \"Could not find root element\";\r\n}\r\n\r\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\r\nconst siteName = rootElement.dataset.siteName || config.devProject?.siteName;\r\nif (!siteName) {\r\n\tthrow \"Could not find siteName\"\r\n}\r\n\r\n/*\r\n\tApp Rendering\r\n*/\r\n// initialize the dictionary, then render the app\r\n// note: if not making a multlingual app, the dictionary init can be removed.\r\n\r\ni18ninit(siteName, initLanguage, undefined)\r\n\t.then(() => preloadReady())\r\n\t.then(() => {\r\n\r\n\t\trenderFunction(\r\n\t\t\trootElement,\r\n\t\t\t// StrictMode will make the page render twice at start, but only in dev environment\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t);\r\n\t});"],"file":"assets/index-BN2sALKn.js"}