{"version":3,"sources":["utils/hybrid-utils.ts","utils/qa-mode-utils.ts","launcher/utils/launcher-constants/launcher-constants.ts","app-consts.ts","orbit-startup-functions.ts","webpack-public-path.js","utils/array.extensions.ts","polyfills.ts","index.tsx"],"names":["isHybridEmbedded","OrbitStartupFunctions","isOrbitInQAMode","Boolean","window","MAIN_LAUNCHER_PATH","LAUNCHER_PATHS","isLauncherPath","path","toLowerCase","i","length","startsWith","ALL_CONFIGS_KEY","LAUNCHER_DATA_STORAGE_KEY","allConfigs","orbitServerPath","sdk","config","ExtraProperties","paths","server","endsWith","__webpack_public_path__","Array","prototype","toDictionary","keySelector","valueSelector","result","item","this","forEach","index","key","groupByKey","push","distinct","uniqueItems","Object","values","all","predicate","splitToChunks","chunkSize","slice","selectMany","subItemsSelector","value","findFirst","filter","max","min","sum","smoothscroll","polyfill","startLauncher","a","startHybridApp","location","pathname","module","startOrbitHybridQA","startupOrbitHybridProd","startWebApp","then","startOrbitQA","startOrbitProd","startApp"],"mappings":"+FAAA,6CAEO,SAASA,IACZ,OAAOC,IAAsBD,qB,8BCHjC,6CAcO,SAASE,IACZ,OAAOC,QAAQC,OAAM,0BAZjBJ,iBAIDI,OAAM,iBACEA,OAAM,oB,8BCRrB,oEAAO,IAAMC,EAAqB,mBAE5BC,EAAiB,CAACD,EAAoB,uBAAwB,wBAE7D,SAASE,EAAeC,GAE3B,IAAIA,EACA,OAAO,EAGXA,EAAOA,EAAKC,cACZ,IAAI,IAAIC,EAAI,EAAGA,EAAIJ,EAAeK,OAAQD,IACtC,GAAGF,EAAKI,WAAWN,EAAeI,IAC9B,OAAO,EAIf,OAAO,I,6BCjBX,oEAAO,IAAMG,EAAkB,cAClBC,EAA4B,c,8BCkBzC,kCAAO,IAAMb,EAAwBG,OAAM,uB,2ECjBrCW,EAAaX,OAAOS,KAC1B,GAAIE,EAAY,CACZ,IAAIC,EAAkBD,EAAWE,IAAIC,OAAOC,gBAAgBC,MAAMC,OAC9DL,EAAgBM,SAAS,OACzB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D,I,mBChKfyB,EAAaC,W,kCCEEC,I,2EAAf,sBAAAC,EAAA,sEACyB,4KADzB,cAEWD,gBAFX,4C,+BAKeE,I,2EAAf,8BAAAD,EAAA,0DACQvD,cADR,qBAEYK,YAAeH,OAAOuD,SAASC,UAF3C,gCAGkBJ,IAHlB,8CAKiC,4IALjC,cAKkBK,EALlB,iBAMkBA,EAAOC,qBANzB,iDAS6B,gCAT7B,eAScD,EATd,iBAUcA,EAAOE,yBAVrB,6C,+BAceC,I,2EAAf,sBAAAP,EAAA,0DACOvD,cADP,oBAEWK,YAAeH,OAAOuD,SAASC,UAF1C,gCAGkBJ,IAHlB,6BAKY,oJAA+DS,MAAK,SAAAJ,GAAM,OAAIA,EAAOK,kBALjG,8BAQQ,gCAAmED,MAAK,SAAAJ,GAAM,OAAIA,EAAOM,oBARjG,6C,kEAYA,sBAAAV,EAAA,0DACOzD,cADP,gCAEc0D,IAFd,6CAIcM,IAJd,4C,0DAQAI,K","file":"static/js/main.187f141c.chunk.js","sourcesContent":["import {OrbitStartupFunctions} from \"../orbit-startup-functions\";\n\nexport function isHybridEmbedded(): boolean {\n return OrbitStartupFunctions.isHybridEmbedded();\n}\n","import {isHybridEmbedded} from \"./hybrid-utils\";\n\nfunction isHybridEmbeddedQA(): boolean {\n if(!isHybridEmbedded()) {\n return false;\n }\n\n if(window['isQAEnvironment']) {\n return window['isQAEnvironment']();\n }\n\n return false;\n}\n\nexport function isOrbitInQAMode(): boolean {\n return Boolean(window['isOrbitWebAppInQAMode']) || isHybridEmbeddedQA();\n}","export const MAIN_LAUNCHER_PATH = \"/launch/888debug\";\n\nconst LAUNCHER_PATHS = [MAIN_LAUNCHER_PATH, \"/cip/launch/888debug\", \"/cis/launch/888debug\"];\n\nexport function isLauncherPath(path: string): boolean {\n\n if(!path) {\n return false;\n }\n\n path = path.toLowerCase();\n for(let i = 0; i < LAUNCHER_PATHS.length; i++) {\n if(path.startsWith(LAUNCHER_PATHS[i])) {\n return true;\n }\n }\n\n return false;\n}","export const ALL_CONFIGS_KEY = '$allConfigs';\nexport const LAUNCHER_DATA_STORAGE_KEY = 'cgp_client';","interface IOrbitStartupFunctions {\n isCip(): boolean;\n isCis(): boolean;\n isProgressiveWebApp(): boolean;\n logToElastic(eventCategory: string, eventAction: string, eventLabel: string, eventValue: string): void;\n isHybridEmbedded(): boolean;\n getOrbitInitParams(): {\n sdkApiOrigin: string;\n orbitCDNOrigin: string;\n country: string;\n cmsSource: string;\n languageIso3: string;\n languageIso2: string;\n publicationId: number;\n queryParams: string;\n }\n}\n\n\nexport const OrbitStartupFunctions = window['orbitStartupFunctions'] as IOrbitStartupFunctions;\n","import {ALL_CONFIGS_KEY} from \"./app-consts\";\n\nconst allConfigs = window[ALL_CONFIGS_KEY];\nif (allConfigs) {\n let orbitServerPath = allConfigs.sdk.config.ExtraProperties.paths.server;\n if(!orbitServerPath.endsWith('/')) {\n orbitServerPath = orbitServerPath + '/';\n }\n /* eslint-disable-next-line no-undef */\n __webpack_public_path__ = orbitServerPath;\n}\n\n","import {DictionaryKey} from \"../common/types/dictionary-key-type\";\nimport {NullableUndefinedString} from \"../common/types/nullable-types\";\n\n\nif (!Array.prototype.toDictionary) {\n Array.prototype.toDictionary = function(keySelector: (item: TItem, index: number) => TKey,\n valueSelector?: (item: TItem, index: number) => TValue | TItem ): Record {\n const result: Record = {};\n\n if(!valueSelector) {\n valueSelector = (item) => item;\n }\n\n this.forEach((item, index) => {\n let key: any = keySelector(item, index);\n result[key] = valueSelector(item, index);\n })\n return result;\n }\n}\n\n\nif(!Array.prototype.groupByKey) {\n Array.prototype.groupByKey = function(keySelector: (item: TItem, index: number) => TKey,\n valueSelector?: (item: TItem, index: number) => TValue | TItem ): Record> {\n\n const result: Record> = {};\n\n if(!valueSelector) {\n valueSelector = (item => item);\n }\n\n this.forEach((item, index) => {\n const key: any = keySelector(item, index);\n if(!result[key]) {\n result[key] = [];\n }\n result[key].push(valueSelector(item, index));\n });\n return result;\n }\n}\n\nif(!Array.prototype.distinct) {\n Array.prototype.distinct = function(keySelector?: (item: TItem, index: number) => TKey | TItem,\n valueSelector?: (item: TItem, index: number) => TResult | TItem): Array {\n if(this.length === 0) {\n return [];\n }\n\n if(!keySelector) {\n keySelector = item => item;\n }\n\n if(!valueSelector) {\n valueSelector = item => item;\n }\n\n const uniqueItems: Record = {};\n\n this.forEach((item, index) => {\n const key: any = keySelector(item, index);\n uniqueItems[key] = valueSelector(item, index);\n })\n\n return Object.values(uniqueItems);\n }\n}\n\nif(!Array.prototype.all) {\n Array.prototype.all = function(predicate: (item: T) => boolean): boolean {\n if(this.length === 0) {\n return false;\n }\n\n for(let item of this) {\n if(!predicate(item)) {\n return false;\n }\n }\n return true;\n }\n}\n\nif(!Array.prototype.splitToChunks) {\n Array.prototype.splitToChunks = function(chunkSize: number): Array {\n if(this.length === 0) {\n return [];\n }\n\n let result: Array = [];\n for(let i = 0; i * chunkSize < this.length; i++) {\n result.push(this.slice(i * chunkSize, i * chunkSize + chunkSize));\n }\n\n return result;\n }\n}\n\nif(!Array.prototype.selectMany) {\n Array.prototype.selectMany = function(subItemsSelector: (item: TItem, index: number) => TValue[]): TValue[] {\n\n const result: TValue[] = [];\n this.forEach((item, index) => {\n for(let value of subItemsSelector(item, index)) {\n result.push(value);\n }\n });\n return result;\n }\n}\n\nif (!Array.prototype.findFirst) {\n Array.prototype.findFirst = function(filter: (item: T) => boolean): T | undefined {\n return this.filter(filter)[0];\n }\n}\n\nif (!Array.prototype.max) {\n Array.prototype.max = function(valueSelector: (item: T) => number): T | undefined {\n if(this.length === 0) {\n return undefined;\n }\n\n let max = this[0];\n\n for(let i = 1; i < this.length; i++) {\n if(valueSelector(max) < valueSelector(this[i])) {\n max = this[i];\n }\n }\n\n return max;\n }\n}\n\nif (!Array.prototype.min) {\n Array.prototype.min = function(valueSelector: (item: T) => number): T | undefined {\n if(this.length === 0) {\n return undefined;\n }\n\n let min = this[0];\n\n for(let i = 1; i < this.length; i++) {\n if(valueSelector(min) > valueSelector(this[i])) {\n min = this[i];\n }\n }\n\n return min;\n }\n}\n\nif(!Array.prototype.sum) {\n Array.prototype.sum = function(valueSelector: (item: T) => number): number {\n if(this.length === 0) {\n return 0;\n }\n let result = 0;\n this.forEach(item => {\n result += valueSelector(item);\n });\n\n return result;\n }\n}\n\n\nexport {};\n","import 'intersection-observer';\nimport 'url-search-params-polyfill'; // Edge 41 and 42 don't have this\nimport './utils/array.extensions'\nimport smoothscroll from 'smoothscroll-polyfill'; // this is for making window.scrollTo work in Edge\nsmoothscroll.polyfill();","import './webpack-public-path';\nimport './polyfills';\nimport {isLauncherPath} from \"./launcher/utils/launcher-constants/launcher-constants\";\nimport {isOrbitInQAMode} from './utils/qa-mode-utils';\nimport {isHybridEmbedded} from \"./utils/hybrid-utils\";\n\nasync function startLauncher(): Promise {\n const module = await import(/* webpackChunkName: \"launcher\"*/ './startup-launcher');\n module.startLauncher();\n}\n\nasync function startHybridApp(): Promise {\n if (isOrbitInQAMode()) {\n if (isLauncherPath(window.location.pathname)) {\n await startLauncher();\n } else {\n const module = await import(/* webpackChunkName: \"hybrid-qa\"*/ './startup-orbit-hybrid-qa');\n await module.startOrbitHybridQA()\n }\n } else {\n const module = await import(/* webpackChunkName: \"hybrid-prod\"*/ './startup-orbit-hybrid-prod');\n await module.startupOrbitHybridProd();\n }\n}\n\nasync function startWebApp(): Promise {\n if(isOrbitInQAMode()) {\n if(isLauncherPath(window.location.pathname)) {\n await startLauncher();\n } else {\n import(/* webpackChunkName: \"orbit-qa\"*/ './startup-orbit-qa').then(module => module.startOrbitQA());\n }\n } else {\n import(/* webpackChunkName: \"orbit-prod\"*/ './startup-orbit-prod').then(module => module.startOrbitProd());\n }\n}\n\nasync function startApp(): Promise {\n if(isHybridEmbedded()) {\n await startHybridApp();\n } else {\n await startWebApp();\n }\n}\n\nstartApp();\n\n"],"sourceRoot":""}