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AS,GAAG,CAAC,CACtD,CAGD,MAAM,QAAQ,WAAWF,CAAO,EAAE,KAAK,IAAM,CAC5C,OAAO,eAAoBpC,EACpB,WAAI,eAAoB,GAC/B,QAAQ,IAAI,uBAAuB,EACnC,CACF,CAOA,eAAeA,GAAiB,CAC/B,MAAMjB,EAAA,WAAO,aAA2B,yFACxC,MAAMwD,EAAW,OAAO,KAAK,OAAO,cAAiB,EACrD,QAAQ,IAAI,6BAA6BA,EAAS,MAAM,EAAE,EAE1D,MAAMH,EAAU,CAAC,EACjB,IAAIlB,EAAI,EACR,IAAKA,EAAI,EAAGA,EAAIqB,EAAS,OAAQrB,IAAK,CACrC,MAAMmB,EAAS,OAAO,eAAkBE,EAASrB,CAAC,CAAC,EAC/CmB,IACH,QAAQ,IAAI,2BAA2BE,EAASrB,CAAC,CAAC,EAAE,EAC5CkB,EAAA,KAAKC,EAAO,eAAe,EACpC,CAGD,MAAM,QAAQ,WAAWD,CAAO,EAAE,KAAK,IAAM,CACrC,WAAI,eAAoB,GAC/B,QAAQ,IAAI,yBAAyB,EACrC,CACF,CAMO,SAASZ,GAA0B,aACzC,OAAOJ,GAAAC,GAAAC,GAAA7B,EAAA,WAAW,MAAX,YAAAA,EAAgB,WAAhB,YAAA6B,EAA0B,OAA1B,YAAAD,EAAgC,YAAhC,YAAAD,EAA2C,SAAS,OAC5D,CAEA1C,EAAK","names":["unregister","registration","LoadPolyfills","arr","item","El","s","el","ancestor","str","newStr","allSettled","tmp","fixRoute","highchartsmore","Highcharts","solidgauge","heatmap","treemap","Data","exporting","configure","parsedUrl","LoadPCRApiIntoWindow","HireEZApi","n","CandidateApiV2","CanPresApi","InterviewApi","PositionApi","Api","SessionApi","signalR","Load","isSPAMode","isMobileMode","UserStorage","dialogManager","__vitePreload","RegisterError","connectError","RegisterToastNotification","RemoveToastNotification","connectToastNotification","connectSignalR","notificationsManager","connectNotifications","commandOrId","_a","connectOnLogout","pcrLoginDb","db","LocalStorageHelper","odbcParam","BrowserNavigate","unloadManagers","injectGlobalPreflightStyles","GS","reporting","loadTinyMCE","inPCR","versionStamp","path","newScriptTag1","newScriptTag2","loadManagers","style","index","injectGlobal","ex","target","targetSheet","j","i","windowRedirects","_d","_c","_b","prop","isNineDarkMode","AddGlobalStylesForTenEnvOnly","Ten","AddGlobalStylesForTenEnvOnly2","err","serviceWorker.unregister","PCRLib","applyGlobalStyle","forceReload","recordUIManager","saveAlertManager","managersToLoad","waiters","loader","resolve","managers"],"ignoreList":[],"sources":["../../../apps/web/src/serviceWorker.ts","../../../apps/web/src/base/Polyfills.ts","../../../apps/web/src/index.tsx"],"sourcesContent":["/* eslint-disable */\n// This optional code is used to register a service worker.\n// register() is not called by default.\n\n// This lets the app load faster on subsequent visits in production, and gives\n// it offline capabilities. However, it also means that developers (and users)\n// will only see deployed updates on subsequent visits to a page, after all the\n// existing tabs open on the page have been closed, since previously cached\n// resources are updated in the background.\n\n// To learn more about the benefits of this model and instructions on how to\n// opt-in, read https://bit.ly/CRA-PWA\n\nconst isLocalhost = Boolean(\n\twindow.location.hostname === 'localhost' ||\n\t\t// [::1] is the IPv6 localhost address.\n\t\twindow.location.hostname === '[::1]' ||\n\t\t// 127.0.0.1/8 is considered localhost for IPv4.\n\t\twindow.location.hostname.match(/^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/)\n);\n\ntype Config = {\n\tonSuccess?: (registration: ServiceWorkerRegistration) => void;\n\tonUpdate?: (registration: ServiceWorkerRegistration) => void;\n};\n\nexport function register(config?: Config) {\n\tif (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\n\t\t// The URL constructor is available in all browsers that support SW.\n\t\tconst publicUrl = new URL((process as { env: { [key: string]: string } }).env.PUBLIC_URL, window.location.href);\n\t\tif (publicUrl.origin !== window.location.origin) {\n\t\t\t// Our service worker won't work if PUBLIC_URL is on a different origin\n\t\t\t// from what our page is served on. This might happen if a CDN is used to\n\t\t\t// serve assets; see https://github.com/facebook/create-react-app/issues/2374\n\t\t\treturn;\n\t\t}\n\n\t\twindow.addEventListener('load', () => {\n\t\t\tconst swUrl = `${import.meta.env.BASE_URL}/service-worker.js`;\n\n\t\t\tif (isLocalhost) {\n\t\t\t\t// This is running on localhost. Let's check if a service worker still exists or not.\n\t\t\t\tcheckValidServiceWorker(swUrl, config);\n\n\t\t\t\t// Add some additional logging to localhost, pointing developers to the\n\t\t\t\t// service worker/PWA documentation.\n\t\t\t\tnavigator.serviceWorker.ready.then(() => {\n\t\t\t\t\tconsole.log(\n\t\t\t\t\t\t'This web app is being served cache-first by a service ' + 'worker. To learn more, visit https://bit.ly/CRA-PWA'\n\t\t\t\t\t);\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\t// Is not localhost. Just register service worker\n\t\t\t\tregisterValidSW(swUrl, config);\n\t\t\t}\n\t\t});\n\t}\n}\n\nfunction registerValidSW(swUrl: string, config?: Config) {\n\tnavigator.serviceWorker\n\t\t.register(swUrl)\n\t\t.then(registration => {\n\t\t\tregistration.onupdatefound = () => {\n\t\t\t\tconst installingWorker = registration.installing;\n\t\t\t\tif (installingWorker == null) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tinstallingWorker.onstatechange = () => {\n\t\t\t\t\tif (installingWorker.state === 'installed') {\n\t\t\t\t\t\tif (navigator.serviceWorker.controller) {\n\t\t\t\t\t\t\t// At this point, the updated precached content has been fetched,\n\t\t\t\t\t\t\t// but the previous service worker will still serve the older\n\t\t\t\t\t\t\t// content until all client tabs are closed.\n\t\t\t\t\t\t\tconsole.log(\n\t\t\t\t\t\t\t\t'New content is available and will be used when all ' +\n\t\t\t\t\t\t\t\t\t'tabs for this page are closed. See https://bit.ly/CRA-PWA.'\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t// Execute callback\n\t\t\t\t\t\t\tif (config && config.onUpdate) {\n\t\t\t\t\t\t\t\tconfig.onUpdate(registration);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// At this point, everything has been precached.\n\t\t\t\t\t\t\t// It's the perfect time to display a\n\t\t\t\t\t\t\t// \"Content is cached for offline use.\" message.\n\t\t\t\t\t\t\tconsole.log('Content is cached for offline use.');\n\n\t\t\t\t\t\t\t// Execute callback\n\t\t\t\t\t\t\tif (config && config.onSuccess) {\n\t\t\t\t\t\t\t\tconfig.onSuccess(registration);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t};\n\t\t})\n\t\t.catch(error => {\n\t\t\tconsole.error('Error during service worker registration:', error);\n\t\t});\n}\n\nfunction checkValidServiceWorker(swUrl: string, config?: Config) {\n\t// Check if the service worker can be found. If it can't reload the page.\n\tfetch(swUrl)\n\t\t.then(response => {\n\t\t\t// Ensure service worker exists, and that we really are getting a JS file.\n\t\t\tconst contentType = response.headers.get('content-type');\n\t\t\tif (response.status === 404 || (contentType != null && contentType.indexOf('javascript') === -1)) {\n\t\t\t\t// No service worker found. Probably a different app. Reload the page.\n\t\t\t\tnavigator.serviceWorker.ready.then(registration => {\n\t\t\t\t\tregistration.unregister().then(() => {\n\t\t\t\t\t\twindow.location.reload();\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\t// Service worker found. Proceed as normal.\n\t\t\t\tregisterValidSW(swUrl, config);\n\t\t\t}\n\t\t})\n\t\t.catch(() => {\n\t\t\tconsole.log('No internet connection found. App is running in offline mode.');\n\t\t});\n}\n\nexport function unregister() {\n\tif ('serviceWorker' in navigator) {\n\t\tnavigator.serviceWorker.ready.then(registration => {\n\t\t\tregistration.unregister();\n\t\t});\n\t}\n}\n","import 'whatwg-fetch';\nimport allSettled from 'promise-all-settled';\n\ndeclare global {\n\tinterface String {\n\t\txlate(): string;\n\t\tisNullOrEmpty(): boolean;\n\t\tstripHTML(): string;\n\t}\n}\n\n/**\n * Load missing polyfils for web project\n */\nexport function LoadPolyfills(): void {\n\t//core-js doesnt include dom closest polyfill so adding it here.\n\t//\n\t// from:https://github.com/jserz/js_piece/blob/master/DOM/ChildNode/remove()/remove().md\n\t(function (arr) {\n\t\tarr.forEach(function (item) {\n\t\t\tif (Object.prototype.hasOwnProperty.call(item, 'remove')) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tObject.defineProperty(item, 'remove', {\n\t\t\t\tconfigurable: true,\n\t\t\t\tenumerable: true,\n\t\t\t\twritable: true,\n\t\t\t\tvalue: function remove() {\n\t\t\t\t\tif (this.parentNode !== null) {\n\t\t\t\t\t\tthis.parentNode.removeChild(this);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t})([Element.prototype, CharacterData.prototype, DocumentType.prototype]);\n\n\t/**\n\t * Element.closest() polyfill\n\t * Polyfill for IE\n\t * https://developer.mozilla.org/en-US/docs/Web/API/Element/closest#Polyfill\n\t */\n\t/* eslint-disable @typescript-eslint/no-this-alias */\n\tconst El: any = Element;\n\tif (!Element.prototype.closest) {\n\t\tif (!Element.prototype.matches) {\n\t\t\tElement.prototype.matches = El.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;\n\t\t}\n\t\tElement.prototype.closest = function (s) {\n\t\t\t// biome-ignore lint/complexity/noUselessThisAlias: why do we need this this alias?\n\t\t\tconst el = this;\n\n\t\t\tlet ancestor = this;\n\t\t\tif (!document.documentElement.contains(el)) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tdo {\n\t\t\t\tif (ancestor.matches(s)) {\n\t\t\t\t\treturn ancestor;\n\t\t\t\t}\n\t\t\t\tancestor = ancestor.parentElement;\n\t\t\t} while (ancestor !== null);\n\t\t\treturn null;\n\t\t};\n\t}\n\t/* eslint-enable @typescript-eslint/no-this-alias */\n\n\t/**\n\t * String.prototype.replaceAll() polyfill\n\t * https://gomakethings.com/how-to-replace-a-section-of-a-string-with-another-one-with-vanilla-js/\n\t * @author Chris Ferdinandi\n\t * @license MIT\n\t */\n\tif (!String.prototype.replaceAll) {\n\t\tString.prototype.replaceAll = function (str, newStr) {\n\t\t\t// If a regex pattern\n\t\t\tif (Object.prototype.toString.call(str).toLowerCase() === '[object regexp]') {\n\t\t\t\treturn this.replace(str, newStr);\n\t\t\t}\n\t\t\t// If a string\n\t\t\treturn this.replace(new RegExp(str, 'g'), newStr);\n\t\t};\n\t}\n\n\t/**\n\t * Polyfill for Promise.allSettled while we wait for CRA to update its babel config to accept it in the stage 3.2 of core-js\n\t * https://www.npmjs.com/package/promise-all-settled\n\t */\n\tif (!Promise.allSettled) {\n\t\tPromise['allSettled'] = allSettled;\n\t}\n\n\t/**\n\t * Polyfill to translate string literal expressions\n\t */\n\tString.prototype.xlate = function () {\n\t\tif (window['ReactApp']) {\n\t\t\treturn window['ReactApp'].xlateConfig.xlate(this);\n\t\t} else {\n\t\t\t//TODO non-mobile app translations\n\t\t\treturn this.replace(/~~/g, '');\n\t\t}\n\t};\n\n\t/**\n\t * Checks for empty string\n\t */\n\tString.prototype.isNullOrEmpty = function () {\n\t\tif (this === null || this === undefined) {\n\t\t\treturn true;\n\t\t}\n\t\tif (this.length < 1) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t};\n\n\t/**\n\t * Polyfill for NODE strip HTML function\n\t * If using Chrome extension will need to\n\t * run inside content scripts only\n\t */\n\tString.prototype.stripHTML = function () {\n\t\tconst tmp = document.createElement('span');\n\t\ttmp.innerHTML = this.toString();\n\t\treturn tmp.textContent || tmp.innerText || '';\n\t};\n}\n","/* eslint-disable import/first */\nimport * as serviceWorker from './serviceWorker';\n/* eslint-disable import/no-unresolved */\nimport 'virtual:uno.css';\nimport {\n\tconnectError,\n\tconnectNotifications,\n\tconnectOnLogout,\n\tconnectSignalR,\n\tconnectToastNotification,\n\tsignalR\n} from '@mst/stores/lib/GlobalState/Helpers';\nimport SessionApi from '@mst/api/api/SessionApi';\nimport { LoadPolyfills } from './base/Polyfills';\n//#region polfills\n//POLYFILL LIBS\nimport 'core-js/stable';\nimport 'regenerator-runtime/runtime';\nimport { reporting } from './utilities/utilities';\nimport * as GS from './base/GeneralCSS';\nimport { injectGlobal, injectGlobalPreflightStyles } from '@mst/ui/core/Emotion';\n\n//the code splitting wants to really hold onto highcharts now when loading index so\n//we will give it what it wants to work with analytics.\nimport Highcharts from 'highcharts'; // eslint-disable-line import/default\nimport highchartsmore from 'highcharts/highcharts-more';\nimport solidgauge from 'highcharts/modules/solid-gauge';\nimport heatmap from 'highcharts/modules/heatmap';\nimport treemap from 'highcharts/modules/treemap';\nimport Data from 'highcharts/modules/data';\nimport exporting from 'highcharts/modules/exporting';\nimport { PageRenderStore } from '@mst/ui/lib/RenderStore';\nimport { configure } from 'mobx';\nimport { LocalStorageHelper } from '@mst/utils/lib/LocalStorage/LocalStorageHelper';\nimport { BrowserNavigate } from './routing/BrowserNavigate';\nimport { UserStorage } from '@mst/utils/lib/IndexedDB';\n\nfixRoute();\nhighchartsmore(Highcharts);\nsolidgauge(Highcharts);\nheatmap(Highcharts);\ntreemap(Highcharts);\nData(Highcharts);\nexporting(Highcharts);\n\n/*\n * Mobx 'runtime linting' configuration\n * DO NOT ALLOW THIS CONFIG IN DEV ENVIRONMENT\n * Mobx warnings are there to annoy us so that we fix the problems :)\n */\nif (process.env.NODE_ENV === 'production') {\n\tconfigure({\n\t\tenforceActions: 'never'\n\t});\n}\n\nfunction fixRoute() {\n\t// if the current page is /pcr/app then add a trailing /, service workers do not work without the trailing / for the folder they reside in\n\tconst parsedUrl = new URL(window.location.href);\n\n\t// Check if the pathname is exactly \"/pcr/app\" without a trailing slash\n\tif (parsedUrl.pathname === '/pcr/app' && !parsedUrl.pathname.endsWith('/')) {\n\t\t// Add the trailing slash while preserving query parameters\n\t\tparsedUrl.pathname += '/';\n\t\twindow.location.href = parsedUrl.toString();\n\t}\n}\n\n//Fill in the rest from what core-js and whatwg-fetch doesn't cover.\nLoadPolyfills();\n//END POLYFILL LIBS\n//#endregion\n\n/**\n * Dynamically load in some parts of the api so they are available in the window to some other parts of the application.\n * This also enables better code splitting of the api files outside of the index / PCRApp since it dynamically imports.\n * @returns\n */\nasync function LoadPCRApiIntoWindow(): Promise {\n\tconst { HireEZApi } = await import('@mst/api/api/HireEZApi');\n\tconst { CandidateApiV2 } = await import('@mst/api/api/CandidateApi');\n\tconst { CanPresApi } = await import('@mst/api/api/CanPresApi');\n\tconst { InterviewApi } = await import('@mst/api/api/InterviewApi');\n\tconst { PositionApi } = await import('@mst/api/api/PositionApi');\n\n\tconst Api = {\n\t\tsessionApi: new SessionApi(),\n\t\thireEZApi: new HireEZApi(),\n\t\tcandidateApiV2: new CandidateApiV2(),\n\t\tcanPresApi: new CanPresApi(),\n\t\tinterviewApi: new InterviewApi(),\n\t\tpositionApi: new PositionApi(),\n\t\tconnectors: {\n\t\t\tsignalR: signalR\n\t\t}\n\t};\n\tif (window['cacheFrame']) {\n\t\twindow.top['PCRApi'] = Api;\n\t} else {\n\t\twindow['PCRApi'] = Api;\n\t}\n}\n\n/**\n * Loading function for Web app.\n * Builds the API.\n * Builds Managers.\n */\nasync function Load() {\n\t//General items that need loaded in before the app or PCRLib loads in.\n\t//isSPAMode gives us awareness of if we are running in a full react environment vs as a lib in pcr9\n\tconst isSPAMode = document.getElementById('root') !== null;\n\tlet isMobileMode = false;\n\n\tif (isSPAMode) {\n\t\t//initialization pieces for if we are in spa mode. Mounting for spa mode happens at the bottom of Load.\n\t\twindow.name = 'PCR_SPA';\n\t}\n\n\t//check for mobile app paths and do not load TEN.tsx\n\tif (document.location.href.indexOf('file://') > -1 || document.location.href.indexOf('/temphrs.aspx') > -1) {\n\t\tisMobileMode = true;\n\t}\n\n\t//--------------------------------------------\n\t//----- Begin connect/initialization functions\n\t//----- this creates classes that were intentionally left undefined inline to avoid circular references\n\n\t//Initialize user storage before app usage\n\tawait UserStorage.Connect();\n\n\t//----Initialize Api----//\n\t//build out the session url and pcr-id with the given information in the url and session storage.\n\tawait new SessionApi().buildSession();\n\n\t//add dialog functions handled by react into the current window object\n\tconst dialogManager = await import('base/managers/DialogManager');\n\tdialogManager.enableNewDialogsFuncs();\n\n\t//----Initialize RegisterError----//\n\tconst { RegisterError } = await import('base/managers/ErrorManager');\n\t// ActiveSession.registerError = RegisterError;\n\tconnectError(RegisterError);\n\n\t//----Initialize ToastNotificationApiHookup----//\n\tconst { RegisterToastNotification, RemoveToastNotification } = await import('base/managers/ToastNotificationManager');\n\tconnectToastNotification(RegisterToastNotification, RemoveToastNotification);\n\n\t//----Initialize SignalR----//\n\tconnectSignalR();\n\n\t//----Initialize Notification Manager for use in api----//\n\tconst { notificationsManager } = await import('./base/managers/NotificationsManager');\n\tconnectNotifications((commandOrId: number) => notificationsManager.get()?.updateNotifications(commandOrId));\n\n\t//----Initialize onLogout callback for when the session gets logged out, setup additional cleanup here.----//\n\tconnectOnLogout(async () => {\n\t\tlet pcrLoginDb;\n\t\tconst db = LocalStorageHelper.Load('pcrLoginDb');\n\t\tif (db) {\n\t\t\tpcrLoginDb = decodeURIComponent(db);\n\t\t}\n\t\tconst odbcParam = (pcrLoginDb && pcrLoginDb.split('.')[1]) || '';\n\n\t\t// navigate to initial page\n\t\tBrowserNavigate(`/?uid=odbc.${odbcParam}`);\n\n\t\t//cleanup managers\n\t\tawait unloadManagers();\n\n\t\t//cleanup localstorage items that will reset on login anyway\n\t\tawait UserStorage.Delete('session');\n\n\t\t//reload the page after logout\n\t\twindow.top.location.reload();\n\t});\n\n\t//----- End connect/initialization functions\n\t//--------------------------------------------\n\n\t//this must come after connect/initialization\n\tawait LoadPCRApiIntoWindow();\n\n\t//----Initialize Theme----//\n\n\t// Api.themeApi.resetTheme = GS.Theme.ResetTheme;\n\t// await Api.themeApi.buildTheme();\n\t//apply preflight styles for use in react\n\tinjectGlobalPreflightStyles();\n\twindow['GS'] = GS; //used to have access to the GS module in the console to play with it.\n\n\tif (window === window.top) {\n\t\twindow.top['GS'] = GS;\n\t}\n\n\t//login manager\n\t//const LoginManager = await import('base/managers/LoginManager');\n\t//LoginManager.url = document.location.pathname;\n\n\t// Reporting Engine\n\twindow['reporting'] = reporting;\n\n\t/**\n\t * Load in the proper tinymce being used, the legacy tinymce areas need to use the one hosted in pcrimg/inc\n\t * and the new react ones need to point to the one at pcr/app\n\t * @todo JTB - Depending on how we convert over to react overlapping pcr.asp then this will need to be revisited and merged.\n\t * @param inPCR if we are loading in pcr as pcrlib or false if we are loading in as a single page app\n\t */\n\tasync function loadTinyMCE(inPCR: boolean) {\n\t\tif (!window['tinymce']) {\n\t\t\t//version stamp can be in many places,\n\t\t\t//from pcr.asp it should be in top window as 'verStamp'\n\t\t\t//but in some other frames it can appear in the window as 'versionStamp' and 'versionstamp'\n\t\t\tconst versionStamp = window['verStamp'] ?? window['versionStamp'] ?? window['versionstamp'] ?? '';\n\t\t\tif (versionStamp.length <= 0) {\n\t\t\t\t//we did not get a versionStamp, console an error to notify in the future for easy followup\n\t\t\t\tconsole.error('No VersionStamp found in page. (while loading TinyMCE scripts)');\n\t\t\t}\n\t\t\tconst path = inPCR ? `/pcrimg/inc` : '/pcr/app';\n\t\t\t//add script to load in our tinymce library from our /pcr/app/tinymce directory\n\t\t\tif (window.top === window) {\n\t\t\t\tconst newScriptTag1 = window.document.createElement('script');\n\t\t\t\tnewScriptTag1.type = 'text/javascript';\n\t\t\t\tnewScriptTag1.src = `${path}/tinymce48/tinymce.min.js?ver=${versionStamp}`;\n\t\t\t\twindow.document.head.appendChild(newScriptTag1);\n\t\t\t\tif (inPCR) {\n\t\t\t\t\tconst newScriptTag2 = window.document.createElement('script');\n\t\t\t\t\tnewScriptTag2.type = 'text/javascript';\n\t\t\t\t\tnewScriptTag2.src = `${path}/tinymce48/jquery.tinymce.min.js?ver=${versionStamp}`;\n\t\t\t\t\twindow.document.head.appendChild(newScriptTag2);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\twindow['tinymce'] = window.top['tinymce'];\n\t\t\t}\n\t\t}\n\t}\n\t//---end tinymce\n\n\tif (isSPAMode || (!isSPAMode && (window['cacheFrame'] === true || (window === window.top && window.name !== 'PCR')))) {\n\t\t//load managers in SPA mode (the onLoginSuccess code will reload them, but we may need them for the logon panel)\n\t\t//load managers in PCR9 frames for only the cacheFrame\n\t\tawait loadManagers();\n\t}\n\n\tif (window.name === 'reactCache') {\n\t\t//override insertRule on reactCache frame so any injected styles are redirected to the other frames\n\t\t//this is mainly to correct 3rd party components that have their own emotion instances that use its own css function\n\t\t//we still need to insert the rule on the cache frame, so that if it uses any nested css classnames, it will work properly\n\t\t//eventually we might need to make a CSS garbage collector\n\t\ttry {\n\t\t\tdocument.styleSheets[0]['__proto__'].insertRuleOrig = document.styleSheets[0]['__proto__'].insertRule;\n\t\t\tdocument.styleSheets[0]['__proto__'].insertRule = function (style: string, index?: number) {\n\t\t\t\tinjectGlobal(style);\n\t\t\t\treturn this.insertRuleOrig(style, index);\n\t\t\t};\n\t\t} catch (ex) {\n\t\t\tconsole.error(`Stylesheet redirection was not able to be set up in reactCache frame: ${ex}`);\n\t\t}\n\n\t\t//copy emotion styles from the reactCache frame to a target StyleSheet.\n\t\t//Useful when a new iframe is opened and we need to copy emotion entries that were created by a 3rd party component that we have no control over.\n\t\twindow['copyEmotionStyles'] = (target: Window) => {\n\t\t\tconst style = target.document.createElement('style');\n\t\t\tstyle.setAttribute('data-emotion', 'css');\n\t\t\tstyle.setAttribute('data-mirrored', '1');\n\t\t\ttarget.document.head.appendChild(style); // must append before you can access sheet property\n\t\t\tconst targetSheet = style.sheet as any as CSSStyleSheet; //there is a compiler bug that thinks this is a StyleSheet and will not cast it.\n\n\t\t\tfor (let j = 0; j < window.document.styleSheets.length; j++) {\n\t\t\t\ttry {\n\t\t\t\t\tconst s = window.document.styleSheets[j] as any as CSSStyleSheet;\n\t\t\t\t\tif (s.href) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t} //skip stylesheets that were not manually created\n\n\t\t\t\t\tfor (let i = 0; i < s.rules.length; i++) {\n\t\t\t\t\t\ttargetSheet.insertRule(s.rules[i].cssText);\n\t\t\t\t\t}\n\t\t\t\t} catch (_ex) {\n\t\t\t\t\t/* do nothing */\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\t//window properties that we need to redirect to the top window\n\t\t//this is needed for managers that have the context originating from this frame that might reference window\n\t\t//do not include 'name', as this will break things!\n\t\tconst windowRedirects = {\n\t\t\tinnerWidth,\n\t\t\touterWidth,\n\t\t\tinnerHeight,\n\t\t\touterHeight\n\t\t};\n\n\t\twindow['CurrentWindow'] = () => {\n\t\t\treturn window['GetMyDialogInfo']()?.dialog?.iframeRef?.current?.contentWindow ?? window.top;\n\t\t};\n\t\tObject.getOwnPropertyNames(windowRedirects).forEach(prop =>\n\t\t\tObject.defineProperty(window, prop, {\n\t\t\t\tget: function () {\n\t\t\t\t\treturn (dialogManager.GetMyDialogInfo()?.dialog?.iframeRef?.current?.contentWindow ?? window.top)[prop];\n\t\t\t\t}\n\t\t\t})\n\t\t);\n\t}\n\n\t/** Forces dark mode in react if PCR9 is in dark mode, specifically for react screens in iframes like CanPres */\n\tif (isNineDarkMode()) {\n\t\twindow.document.body.classList.add('dark');\n\t}\n\n\t//load as spa otherwise just load in as pcrlib and apply globalstyle.\n\tif (isSPAMode && isMobileMode !== true) {\n\t\tawait loadTinyMCE(false);\n\n\t\t/**\n\t\t * Injects some global styling for the app\n\t\t */\n\t\t// eslint-disable-next-line no-inner-declarations\n\t\tfunction AddGlobalStylesForTenEnvOnly(): void {\n\t\t\tinjectGlobal`\n body{\n margin:0px;\n }\n\n .App, #body, #html, #root {\n height:100vh;\n max-height:100vh;\n min-height:100vh;\n width:100vw;\n max-width:100vw;\n min-width: 100vw;\n display:flex;\n font-size: 100%;\n font-family: 'Lato', sans-serif;\n line-height: 24px;\n overflow: hidden;\n overflow-y: hidden;\n }\n\n #maintable {\n width: 100%;\n }\n `;\n\t\t}\n\n\t\t//render as page\n\t\timport('./Ten')\n\t\t\t.then(async ({ Ten }) => {\n\t\t\t\t//setup as SPA, routing inside App takes over what to load next.\n\t\t\t\twindow['PCRVersion'] = 10;\n\t\t\t\tconst app: PageRenderStore = new Ten();\n\t\t\t\tapp.renderOnDOM('root', null);\n\t\t\t\tAddGlobalStylesForTenEnvOnly();\n\t\t\t})\n\t\t\t.catch(err => {\n\t\t\t\t// Handle failure\n\t\t\t\tconsole.error(`Failed to load App code: ${err.toString()}`);\n\t\t\t\tconsole.trace(err);\n\t\t\t});\n\n\t\t// If you want your app to work offline and load faster, you can change\n\t\t// unregister() to register() below. Note this comes with some pitfalls.\n\t\t// Learn more about service workers: https://bit.ly/CRA-PWA\n\t\tserviceWorker.unregister();\n\t} else {\n\t\t//do not load for mobile\n\t\tif (isMobileMode !== true) {\n\t\t\tawait loadTinyMCE(true);\n\t\t}\n\n\t\t//Apply global styling for the pcr9 style upgrade. Only applies in pcr9.\n\t\t//This is to match new styles to work on existing parts of pcr9 as an inbetween to 10\n\t\timport('./base/PCRLib')\n\t\t\t.then(({ PCRLib }) => {\n\t\t\t\tPCRLib['loaded'] = true;\n\t\t\t})\n\t\t\t.catch(err => {\n\t\t\t\t// Handle failure\n\t\t\t\tconsole.error(`Failed to load PCRLib code. ${err}`);\n\t\t\t});\n\t\timport('controls/PCR9_GlobalStyles').then(({ applyGlobalStyle }) => {\n\t\t\tapplyGlobalStyle();\n\t\t});\n\t}\n}\n\n/**\n * Load React Managers to top window\n * @param forceReload - if the force reload flag is set to true, all of the managers will be reloaded even if they have been previously reloaded. The\n * managers need to be reloaded when a user logs in to ensure that data does not persist inside the managers from other users or databases.\n */\nexport async function loadManagers(forceReload?: boolean): Promise {\n\tconst { recordUIManager, saveAlertManager } = await import('base/PCRLib');\n\tawait import('base/managers/ManagerBase');\n\twindow.top['managersLoaded'] = false;\n\tlet managersToLoad: string[] = [];\n\tawait recordUIManager;\n\tawait saveAlertManager;\n\twindow['cacheFrame'] = true;\n\n\tmanagersToLoad = Object.keys(window['ManagerLoaders']);\n\tconsole.log(`Found managers to load: ${managersToLoad.length}`);\n\n\tconst waiters: Promise[] = [];\n\twhile (managersToLoad.length > 0) {\n\t\tfor (let i = 0; i < managersToLoad.length; i++) {\n\t\t\tif (window.top[managersToLoad[i]] && !forceReload) {\n\t\t\t\t//old manager is still loaded, skip\n\t\t\t} else {\n\t\t\t\tconst loader = window['ManagerLoaders'][managersToLoad[i]];\n\t\t\t\tif (loader) {\n\t\t\t\t\twaiters.push(loader.loadManager());\n\t\t\t\t}\n\t\t\t}\n\t\t\tmanagersToLoad.splice(i, 1); //remove\n\t\t\ti--; //keep i where it is to get the next item\n\t\t}\n\n\t\tif (managersToLoad.length > 0) {\n\t\t\t//pause to give managers that are still in-use a chance to unload\n\n\t\t\tawait new Promise(resolve => setTimeout(resolve, 100));\n\t\t}\n\t}\n\n\tawait Promise.allSettled(waiters).then(() => {\n\t\twindow['unloadManagers'] = unloadManagers; //set unloadManagers function on top window for PCR9\n\t\twindow.top['managersLoaded'] = true;\n\t\tconsole.log('Managers Done Loading');\n\t});\n}\n\n/**\n * Unload React Managers, which are stored in window.top\n *\n * This needs to be done if PCR has been updated\n */\nasync function unloadManagers() {\n\tawait import('base/managers/ManagerBase');\n\tconst managers = Object.keys(window['ManagerLoaders']);\n\tconsole.log(`Found managers to unload: ${managers.length}`);\n\n\tconst waiters = [];\n\tlet i = 0;\n\tfor (i = 0; i < managers.length; i++) {\n\t\tconst loader = window['ManagerLoaders'][managers[i]];\n\t\tif (loader) {\n\t\t\tconsole.log(`Queuing Manager Unload: ${managers[i]}`);\n\t\t\twaiters.push(loader.unloadManager());\n\t\t}\n\t}\n\n\tawait Promise.allSettled(waiters).then(() => {\n\t\twindow.top['managersLoaded'] = false;\n\t\tconsole.log('Managers Done Unloading');\n\t});\n}\n\n/**\n * GlobalHelper to check if we are in a window in the context of light or dark mode in PCR9.\n * @RelatedTo Theme Values for React Screens in PCR9\n */\nexport function isNineDarkMode(): boolean {\n\treturn globalThis.top?.document?.body?.classList?.contains('dark');\n}\n\nLoad();\n"],"file":"assets/WEB-ENTRY.js"}