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,QAAsB,GAC7BhQ,MAAK,UAAEqJ,EAAS4G,aAAX,QAAoB,GACzBhQ,UAAS,UAAEoJ,EAAS6G,iBAAX,QAAwB,GACjChQ,SAAQ,UAAEmJ,EAAS8G,gBAAX,QAAuB,GAC/BhQ,MAAK,UAAEkJ,EAAS+G,aAAX,QAAoB,GACzBhQ,WAAYiQ,OAAOC,SAAP,UAAgBZ,EAAYG,QAAQzP,kBAApC,QAAkD,KAAM,IACpEG,WAAU,UAAE8I,EAASkH,iBAAX,QAAwB,GAClC/P,YAAW,UAAE6I,EAASmH,mBAAX,QAA0B,GACrClQ,MAAK,UAAE+I,EAASoH,aAAX,QAAoB,GACzB/P,iBAAkB2P,OAAOC,SAAP,UAAgBjH,EAASqH,wBAAzB,QAA6C,EAAG,IAClE/P,YAAa0I,EAASsH,YACtBlQ,SAAQ,UAAE4I,EAASuH,gBAAX,QAAuB,KAC/BhQ,YAAW,UAAEyI,EAASwH,mBAAX,QAA0B,eACrChQ,gBAAiBwI,EAASyH,cAC1BhQ,iBAAkB,KAGhByN,EAAc1N,cAEhB,8BAGA,8BAEFkQ,EAAAA,QAAgB,SAACzC,GAAD,CAAKC,cAAeA,IAAmBmB,K,iECjDrDsB,E,MAA0B,GAA4B,KAE1DA,EAAwBlD,KAAK,CAACmD,EAAO9O,GAAI,+HAAgI,GAAG,CAAC,QAAU,EAAE,QAAU,CAAC,mDAAmD,MAAQ,GAAG,SAAW,qEAAqE,eAAiB,CAAC,gIAAgI,WAAa,MAEjf","sources":["webpack://orireactgenesyswidget/./src/components/Loading/Loading.tsx","webpack://orireactgenesyswidget/./src/contexts/configurationContext.ts","webpack://orireactgenesyswidget/./src/components/ChatButton/style.css?6111","webpack://orireactgenesyswidget/./src/utils/getWebChatForms.ts","webpack://orireactgenesyswidget/./src/utils/GenesysServerProxy.ts","webpack://orireactgenesyswidget/./src/utils/getIninChat.ts","webpack://orireactgenesyswidget/./src/utils/fixAndroidKeyboard.ts","webpack://orireactgenesyswidget/./src/components/ChatButton/ChatButton.tsx","webpack://orireactgenesyswidget/./src/utils/getGenesysSettings.ts","webpack://orireactgenesyswidget/./src/components/ErrorBoundary/ErrorBoundary.tsx","webpack://orireactgenesyswidget/./src/App.tsx","webpack://orireactgenesyswidget/./src/styles/arabicStyles.ts","webpack://orireactgenesyswidget/./src/AppRender.tsx","webpack://orireactgenesyswidget/./src/components/ChatButton/style.css"],"sourcesContent":["import { CircularProgress, styled } from '@ori-ui/mui';\nimport { memo } from 'react';\n\nconst Root = styled('div')({\n\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n justifyContent: 'center',\n height: '100vh',\n textAlign: 'center',\n\n});\n\nexport const Loading = memo(() => (\n \n \n \n ));\n","import { useContext, createContext } from 'react';\n\nimport type { AppConfiguration } from '../types';\n\nexport const configurationContext = createContext({\n identityUrl: '',\n apiUrl: '',\n tenant: '',\n graphqlUrl: '',\n appUrl: '',\n orgId: '',\n deploymentId: '',\n queue: '',\n firstName: '',\n lastName: '',\n email: '',\n customerId: -1,\n dataURL: '',\n title: '',\n scriptPath: 'https://apps.mypurecloud.de/widgets/9.0/cxbus.min.js',\n pluginsPath: 'https://apps.mypurecloud.de/widgets/9.0/plugins/',\n language: 'en',\n consultantNumber: 0,\n phoneNumber: '',\n buttonLabel: '',\n dedicatedPage: false,\n maxMessageLength: 500,\n});\n\nexport const ConfigurationProvider = configurationContext.Provider;\n\nexport const useConfiguration = () => useContext(configurationContext);\n","\n import API from \"!../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[2].use[2]!./style.css\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[2].use[2]!./style.css\";\n export default content && content.locals ? content.locals : undefined;\n","import type { AppConfiguration, WebChatForms, FormValidator } from '../types';\nimport type { WebChatFormJSON } from '../types/WebChatFormJSON';\n\nconst requiredValidator =\n (customerId: number): FormValidator =>\n (_, __, input) =>\n customerId > 0 ? true : !!input?.val();\n\nexport const getWebChatForms = (\n { firstName: firstname, lastName: lastname, email, customerId }: AppConfiguration,\n customForm = true,\n): WebChatForms => {\n const formJSON = {\n wrapper: '
',\n inputs: [\n {\n id: 'cx_webchat_form_firstname',\n name: 'firstname',\n maxlength: '100',\n placeholder: '@i18n:webchat.ChatFormPlaceholderFirstName',\n label: '@i18n:webchat.ChatFormFirstName',\n validate: requiredValidator(customerId),\n },\n {\n id: 'cx_webchat_form_lastname',\n name: 'lastname',\n maxlength: '100',\n placeholder: '@i18n:webchat.ChatFormPlaceholderLastName',\n label: '@i18n:webchat.ChatFormLastName',\n validate: requiredValidator(customerId),\n },\n {\n id: 'cx_webchat_form_email',\n name: 'email',\n maxlength: '100',\n placeholder: '@i18n:webchat.ChatFormPlaceholderEmail',\n label: '@i18n:webchat.ChatFormEmail',\n },\n ],\n };\n\n return {\n form: {\n autoSubmit: customerId > 0,\n firstname,\n lastname,\n email,\n subject: 'general questions',\n },\n formJSON: (customForm ? formJSON : {}) as WebChatFormJSON,\n };\n};\n","import type { IninServer } from '../types';\n\nexport class GenesysServerProxy implements IninServer {\n // this method used to transfer history from chatbot to genesys-widget\n sendMessage(message: string, isHtml?: boolean): void {\n let text = this.HTML2String(message);\n text = this.RemoveCommands(text);\n text = this.RemoveUrl(text);\n // get only the latest 1000 characters\n text = text.slice(0, 1000);\n window.ori?.genesysPlugin.command('WebChatService.sendMessage', { message: text });\n }\n\n private HTML2String(html: string): string {\n const text = html.replace(/

void,\n setButtonVisibility: (value: boolean) => void,\n) => {\n const ininChat = window.ori?.ininChat;\n\n debug('existing ininchat', ininChat);\n\n const instance = {\n elementId: 'genesys-widget-root',\n events: {\n ...ininChatEvents,\n subscribe: (eventType: string, handler: IninChatSubscribeHandler) => {\n debug(`subscribe to ${eventType}`);\n instance.events.handlers[eventType] = handler;\n },\n unsubscribe: (eventType: string) => {\n debug(`unsubscribe from ${eventType}`);\n delete instance.events.handlers[eventType];\n },\n handlers: {},\n },\n server: new GenesysServerProxy(),\n iFrame: {\n load: handleOpenChat,\n },\n toggleVisibility: (value?: boolean) => {\n debug(`toggle visibility ${value ? 'on' : 'off'}`);\n\n if (value) {\n if (window.ori?.genesysPlugin) {\n window.ori?.genesysPlugin.command('WebChat.show');\n }\n setButtonVisibility(true);\n } else {\n if (window.ori?.genesysPlugin) {\n window.ori?.genesysPlugin.command('WebChat.hide');\n }\n setButtonVisibility(false);\n }\n },\n triggerEvent: (eventType: string, ...params) => {\n debug(`trigger event ${eventType}`, params);\n instance.events.handlers[eventType]?.(params);\n },\n handleClose: () => {\n debug('handle close');\n instance.triggerEvent(instance.events.CLOSE);\n },\n openChatWindow: () => {},\n getChatId: () => '',\n clearUserData: () => {},\n toggle: () => {},\n };\n\n return instance;\n};\n","export const fixAndroidKeyboard = () => {\n const inputClass = 'cx-message-input';\n const chatContainerClass = 'cx-docked-WebChat';\n const inputElement = document.getElementsByClassName(inputClass).length\n ? document.getElementsByClassName(inputClass)[0]\n : undefined;\n const chatContainer = document.getElementsByClassName(chatContainerClass).length\n ? (document.getElementsByClassName(chatContainerClass) as HTMLCollectionOf)[0]\n : undefined;\n\n chatContainer?.classList.add('keyboard-opened');\n\n const isInputClicked = (target) =>\n target === inputElement ||\n (target.nodeName === 'svg' && target.namespaceURI === 'http://www.w3.org/2000/svg') ||\n (target.nodeName === 'path' && target.classList.contains('cx-svg-icon-tone1'));\n\n const toggleHeight = (event) => {\n const isClickedOnInput = isInputClicked(event.target);\n if (isClickedOnInput && !chatContainer?.classList.contains('keyboard-opened')) {\n chatContainer?.classList.add('keyboard-opened');\n }\n if (!isClickedOnInput && chatContainer?.classList.contains('keyboard-opened')) {\n chatContainer?.classList.remove('keyboard-opened');\n }\n };\n if (inputElement) {\n document.addEventListener('click', (event) => toggleHeight(event));\n }\n};\n","/* eslint-disable unicorn/prefer-dom-node-dataset -- Rule is stupid*/\nimport { BubbleHelpFilled } from '@ori-ui/icons';\nimport { SHADOW_LEVEL1, styled } from '@ori-ui/mui';\nimport d from 'debug';\nimport type { FC } from 'react';\nimport { useState, useEffect } from 'react';\n\n// eslint-disable-next-line import/order -- Rule has clashes\nimport { useConfiguration } from '../../contexts';\n\nimport './style.css';\n\nimport type {\n AppConfiguration,\n EngageInviteSettings,\n WebChatServiceStartedEvent,\n} from '../../types';\nimport {\n getWebChatForms,\n getGenesysSettings,\n getIninChat,\n fixAndroidKeyboard,\n ininChatEvents,\n} from '../../utils';\n\nconst Label = styled('div')({\n display: 'block',\n fontWeight: 700,\n opacity: 0,\n paddingRight: '20px',\n transition: 'opacity 0.3s ease-in-out',\n});\n\nconst Button = styled('div')`\n -webkit-box-sizing: border-box;\n -webkit-transition: -webkit-box-shadow .15s, -webkit-transform .15s;\n align-items: center;\n background: ${({ theme }) => theme.palette.secondary.main};\n border-radius: 999px;\n border: 2px solid ${({ theme }) => theme.palette.secondary.main};\n bottom: 10px;\n box-sizing: border-box;\n color: ${({ theme }) => theme.palette.secondary.contrastText};\n cursor: pointer;\n direction: rtl;\n display: flex;\n flex-direction: row;\n height: 45px;\n line-height: 43px;\n max-width: 45px;\n overflow: hidden;\n padding-left: ${({ theme }) => theme.spacing(4)};\n padding-right: 6px;\n padding-top: 1px;\n position: fixed;\n right: 10px;\n text-align: center;\n text-overflow: ellipsis;\n text-transform: uppercase;\n transition: -webkit-box-shadow .15s, -webkit-transform .15s;\n transition: box-shadow .15s, transform .15s, -webkit-box-shadow .15s, -webkit-transform .15s\n transition: box-shadow .15s, transform .15s;\n transition: max-width 0.3s ease-in-out 0.2s;\n vertical-align: middle;\n white-space: nowrap;\n width: auto;\n z-index: 100;\n\n @media screen and (min-width: 1025px) {\n right: 45px;\n }\n\n &:focus,\n &:hover {\n -ms-transform: scale(1.01);\n -webkit-box-shadow: ${SHADOW_LEVEL1};\n -webkit-transform: scale(1.01);\n box-shadow: ${SHADOW_LEVEL1};\n max-width: 250px;\n transform: scale(1.01);\n transition-delay: 0s;\n\n .genesys-widget-label {\n opacity: 1;\n transition-delay: 0.2s;\n }\n }\n`;\n\nconst Icon = styled(BubbleHelpFilled)({\n display: 'flex',\n height: '30px',\n width: '30px',\n});\n\nconst debug = d('genesys-widget:chat-button');\n\nconst publishDataLayerEvent = (event: string) => {\n debug(`publish data layer ${event}`);\n\n window.dataLayer = window.dataLayer || [];\n\n window.dataLayer.push({ event });\n};\n\nconst SESSION_STORE_CONVERSATION_ID_KEY = 'ininChatId';\n\nconst handleWebChatServiceReady = () => {\n debug('webchat service ready');\n\n window.ori?.ininChat?.triggerEvent(ininChatEvents.READY);\n};\n\nconst iframeStyle = {\n width: 0,\n height: 0,\n};\n\nexport const ChatButton: FC = (props) => {\n const [showButton, setShowButton] = useState(null);\n const [isMinimized, setIsMinimized] = useState(false);\n const [sessionStarted, setSessionStarted] = useState(false);\n const [chatWindowOpened, setChatWindowOpened] = useState(false);\n const htmlContainer: HTMLElement | null = document.querySelector('.k-mobile');\n const { buttonLabel, customerId, isChatOpenedByDefault } = props;\n const { maxMessageLength } = useConfiguration();\n\n const handleOpenChat = () => {\n if (chatWindowOpened) {\n debug('reopen chat');\n\n window.ori?.genesysPlugin.command('WebChat.show');\n window.ori?.genesysPlugin.command('WebChat.minimize');\n\n return;\n }\n\n debug('open chat for the first time');\n\n window.ori?.genesysPlugin.command('WebChat.open', getWebChatForms(props));\n };\n\n const handleWebChatOpened = () => {\n debug('webchat opened');\n\n setChatWindowOpened(true);\n setShowButton(false);\n\n if (htmlContainer && htmlContainer.style.overflow !== 'hidden') {\n htmlContainer.style.overflow = 'hidden';\n }\n\n // if (bodyElement && bodyElement.style.overflow !== 'hidden') {\n // bodyElement.style.overflow = 'hidden';\n // }\n\n // attach event to change transcript height if input elemet is focused\n if (/android/i.test(navigator.userAgent)) {\n fixAndroidKeyboard();\n }\n };\n\n const handleWebChatMinimized = () => {\n debug('webchat minimized');\n\n if (htmlContainer && htmlContainer.style.overflow === 'hidden') {\n htmlContainer.style.overflow = 'inherit';\n }\n\n // if (bodyElement && bodyElement.style.overflow === 'hidden') {\n // bodyElement.style.overflow = 'inherit';\n // }\n\n window.ori?.genesysPlugin.command('WebChat.hide');\n setShowButton(true);\n setIsMinimized(true);\n };\n\n const handleWebChatClosed = () => {\n debug('webchat closed');\n\n // window.ori?.genesysPlugin.command('WebChat.minimize');\n\n if (htmlContainer && htmlContainer.style.overflow === 'hidden') {\n htmlContainer.style.overflow = 'inherit';\n }\n\n // if (bodyElement && bodyElement.style.overflow === 'hidden') {\n // bodyElement.style.overflow = 'inherit';\n // }\n\n setChatWindowOpened(false);\n setShowButton(true);\n\n setIsMinimized(false);\n\n if (!sessionStarted) {\n window.ori?.ininChat?.handleClose();\n }\n };\n\n const handleWebChatServiceStarted = (event: WebChatServiceStartedEvent) => {\n debug('webchat service started', event);\n\n // Setting this for the bot chat to be able to switch to genesys widget automatically\n sessionStorage.setItem(SESSION_STORE_CONVERSATION_ID_KEY, event.data.data.conversationId);\n window.ori?.ininChat?.triggerEvent(ininChatEvents.READY);\n\n setSessionStarted(true);\n };\n\n const handleWebChatServiceClientConnected = () => {\n debug('webchat service client connected');\n };\n\n const handleWebChatServiceEnded = () => {\n debug('webchat service ended');\n\n if (htmlContainer && htmlContainer.style.overflow === 'hidden') {\n htmlContainer.style.overflow = 'inherit';\n }\n\n // if (bodyElement && bodyElement.style.overflow === 'hidden') {\n // bodyElement.style.overflow = 'inherit';\n // }\n\n setSessionStarted(false);\n setShowButton(true);\n\n // Remove conversation id so the botchat will activate\n sessionStorage.removeItem(SESSION_STORE_CONVERSATION_ID_KEY);\n };\n\n // Configure localization and optionally bypass form for logged in users\n const handleEngageInvite = (settings: EngageInviteSettings) => {\n debug('engage invite', settings);\n\n try {\n const formsConfig = getWebChatForms(props, false);\n\n settings.options = { ...settings.options, ...formsConfig };\n\n return settings;\n } catch (error) {\n return settings;\n }\n };\n\n const handleInputChange = () => {\n const textArea = document.getElementById('cx_input') as HTMLTextAreaElement | null | undefined;\n const svg = document.querySelector('.cx-send.cx-icon') as HTMLElement | null | undefined;\n if (textArea && svg) {\n const { value } = textArea;\n textArea.setAttribute('data-messagelength', `${value.length}/${maxMessageLength}`);\n svg.setAttribute('data-messagelength', `${(maxMessageLength ?? 140) - value.length}`);\n }\n };\n\n useEffect(() => {\n if (isChatOpenedByDefault) {\n setTimeout(handleOpenChat, 500);\n }\n }, [isChatOpenedByDefault]);\n\n useEffect(\n () => {\n // Check if session exists\n const sessionId = sessionStorage.getItem(SESSION_STORE_CONVERSATION_ID_KEY);\n\n if (sessionId) {\n setSessionStarted(true);\n }\n },\n [\n /* only check on mount */\n ],\n );\n\n // add script from genesys to inject widget to page\n useEffect(() => {\n if (/android/i.test(navigator.userAgent)) {\n document.body.classList.add('device_android');\n }\n\n if (window.ori) {\n window.ori.ininChat = getIninChat(handleOpenChat, setShowButton);\n }\n\n const { scriptPath, pluginsPath, dedicatedPage } = props;\n const script = document.createElement('script');\n\n script.src = scriptPath;\n script.defer = true;\n\n script.addEventListener('load', () => {\n if (!window.ori) {\n window.ori = { genesysPlugin: {} };\n }\n\n const { ori } = window;\n\n // Configure widgets BUS\n // docs: https://all.docs.genesys.com/WID/Current/SDK/GWCBusAPIOverview\n window.CXBus.configure({ debug: false, pluginsPath });\n window.CXBus.loadPlugin('widgets-core');\n window._genesys = getGenesysSettings(props);\n\n // Register custom plugin to handle webchat/engage events\n ori.genesysPlugin = window.CXBus.registerPlugin('OnlineGenesysPlugin');\n\n // Skip chat form for logged in users for PE invitations\n // docs: https://docs.genesys.com/Documentation/GWC/latest/WidgetsAPI/EngagementCommands\n if (customerId > 0) {\n ori.genesysPlugin.before('Engage.invite', handleEngageInvite);\n }\n\n // Register WebChatService event handlers\n // docs: https://docs.genesys.com/Documentation/GWC/latest/WidgetsAPI/WebChatServiceEvents\n // WebChatService is initialized and ready to accept commands.\n ori.genesysPlugin.subscribe('WebChatService.ready', handleWebChatServiceReady);\n\n // Chat session has successfully started.\n ori.genesysPlugin.subscribe('WebChatService.started', handleWebChatServiceStarted);\n\n // Indicates the user has been connected to the chat session.\n ori.genesysPlugin.subscribe(\n 'WebChatService.clientConnected',\n handleWebChatServiceClientConnected,\n );\n\n // Chat session has successfully ended.\n ori.genesysPlugin.subscribe('WebChatService.ended', handleWebChatServiceEnded);\n\n // Register WebChatService event handlers\n // docs: https://docs.genesys.com/Documentation/GWC/latest/WidgetsAPI/WebChatEvents\n // The WebChat widget has appeared on screen.\n ori.genesysPlugin.subscribe('WebChat.opened', handleWebChatOpened);\n\n // The WebChat widget has been removed from the screen.\n ori.genesysPlugin.subscribe('WebChat.closed', handleWebChatClosed);\n\n // The WebChat widget has been changed to a minimized state.\n ori.genesysPlugin.subscribe('WebChat.minimized', handleWebChatMinimized);\n\n // When the webchat service is loaded we publish an event to the dataLayer\n // this should trigger initialization of the Predictive engagement from the GTM\n publishDataLayerEvent('genesysWidgetStart');\n\n // autostart chat\n if (dedicatedPage) {\n setTimeout(handleOpenChat, 2000);\n }\n });\n\n document.addEventListener('keyup', handleInputChange);\n\n document.body.append(script);\n\n return () => script.remove();\n }, []);\n\n return showButton || showButton == null ? (\n <>\n \n \n \n \n \n \n ) : null;\n};\n","import type { AppConfiguration, GenesysSettings } from '../types';\n\nexport const getGenesysSettings = ({\n appUrl,\n orgId,\n deploymentId,\n queue,\n customerId,\n title,\n dataURL,\n consultantNumber,\n phoneNumber,\n language,\n tenant,\n maxMessageLength,\n}: AppConfiguration): GenesysSettings => {\n const i18nUrl = new URL(appUrl);\n\n return {\n widgets: {\n main: {\n theme: 'light',\n downloadGoogleFont: false,\n lang: language,\n i18n: `${i18nUrl.origin}/static${i18nUrl.pathname}assets/widgets-${language}.i18n.json`,\n webchat: {\n maxMessageLength,\n },\n },\n webchat: {\n maxMessageLength,\n transport: {\n type: 'purecloud-v2-sockets',\n dataURL,\n deploymentKey: deploymentId,\n orgGuid: orgId,\n interactionData: {\n routing: {\n targetType: 'QUEUE',\n targetAddress: queue,\n priority: 2,\n },\n },\n },\n markdown: true,\n userData: {\n customerId: customerId === -1 ? undefined : customerId,\n phoneNumber,\n customField1Label: 'Customer Title',\n customField1: customerId === -1 ? 'Anonymous' : title,\n customField2Label: consultantNumber === 0 ? undefined : 'Consultant Number',\n customField2: consultantNumber === 0 ? undefined : consultantNumber,\n customField3Label: language ? 'Language Code' : undefined,\n customField3: language?.toUpperCase(),\n customField4Label: tenant ? 'Market Code' : undefined,\n customField4: tenant?.toUpperCase(),\n },\n confirmFormCloseEnabled: false,\n },\n },\n };\n};\n","import { Component } from 'react';\n\ninterface ErrorBoundaryProps {\n children: JSX.Element;\n}\n\ninterface ErrorBoundaryState {\n error?: Error;\n}\n\nexport class ErrorBoundary extends Component {\n readonly state: ErrorBoundaryState = {};\n\n static getDerivedStateFromError(error: Error) {\n return { error };\n }\n\n render() {\n const { error } = this.state;\n\n if (error) {\n return (\n

\n

Ooops... error found :(

\n
{error.message}
\n
\n );\n }\n\n const { children } = this.props;\n\n return children;\n }\n}\n","import { ThemeProvider } from '@ori-ui/mui';\nimport { TestIdProvider } from '@ori/testid-generator';\nimport type { VFC } from 'react';\nimport { Suspense, useEffect, useState } from 'react';\n\nimport { Loading, ChatButton, ErrorBoundary } from './components';\nimport { ConfigurationProvider } from './contexts';\nimport { arabicStylesComplete, arabicStylesBack } from './styles/arabicStyles';\nimport type { AppConfiguration } from './types';\n\ninterface AppProps {\n configuration: AppConfiguration;\n}\n\nexport const App: VFC = ({ configuration }) => {\n const { tenant, language } = configuration;\n const languageTenant = `${language}-${tenant.toLocaleUpperCase()}`;\n const [openedByDefault, setOpenedByDefault] = useState(false);\n\n useEffect(() => {\n if (languageTenant === 'ar-EG') {\n const style = document.createElement('style');\n style.innerHTML = arabicStylesComplete;\n document.head.append(style);\n }\n\n if (languageTenant === 'fr-MA' || languageTenant === 'en-EG') {\n const style = document.createElement('style');\n style.innerHTML = arabicStylesBack;\n\n document.head.append(style);\n }\n\n const urlSearchParams = new URLSearchParams(window.location.search);\n\n for (const param of urlSearchParams) {\n if (param[0] === 'openChat' && param[1] === 'true') {\n setOpenedByDefault(true);\n }\n }\n }, []);\n\n return (\n \n }>\n \n \n \n \n \n \n \n \n \n );\n};\n","export const arabicStylesBack = `\n.cx-message-text ul,\n.cx-message-text p {\n direction: rtl !important;\n text-align: right !important;\n}\n\n.cx-webchat .cx-transcript .cx-message-group > .cx-message {\n direction: rtl !important;\n text-align: right !important;\n}\n\n.cx-webchat .cx-transcript .cx-message-group>.cx-message.cx-participant:first-child .cx-bubble-arrow,\n.cx-webchat .cx-transcript .cx-message-group>.cx-message.cx-participant:first-child .cx-name {\n direction: rtl !important;\n text-align: right !important;\n}\n.cx-widget.cx-theme-light .cx-message .cx-bubble .cx-message-text {\n direction: rtl !important;\n text-align: right !important;\n}\n\n.cx-webchat .cx-transcript .cx-message-group>.cx-message.cx-participant:last-child .cx-time {\n text-align: right !important;\n}\n\n.cx-widget.cx-theme-light .cx-message .cx-bubble .cx-message-text ul,\n.cx-widget.cx-theme-light .cx-message .cx-bubble .cx-message-text ol\n{\n padding-right: 15px !important;\n}\n\n.cx-webchat .cx-transcript .cx-message-group > .cx-message .cx-time {\n direction: ltr !important;\n}\n`;\n\nexport const arabicStylesComplete = `\n.cx-message-text ul,\n.cx-message-text p {\n direction: rtl !important;\n text-align: right !important;\n}\n\n.cx-form-inputs {\n direction: rtl !important;\n text-align: right !important;\n}\n\n.cx-webchat .cx-form table th {\n padding-right: 0 !important;\n padding-left: 8px !important;\n direction: rtl !important;\n text-align: right !important;\n}\n\n.cx-webchat .cx-transcript .cx-message-group > .cx-message {\n direction: rtl !important;\n text-align: right !important;\n}\n\n.cx-webchat .cx-transcript .cx-message-group>.cx-message.cx-participant:first-child .cx-bubble-arrow,\n.cx-webchat .cx-transcript .cx-message-group>.cx-message.cx-participant:first-child .cx-name {\n direction: rtl !important;\n text-align: right important;\n}\n.cx-widget.cx-theme-light .cx-message .cx-bubble .cx-message-text {\n direction: rtl !important;\n text-align: right !important;\n}\n\n.cx-webchat .cx-transcript .cx-message-group>.cx-message.cx-participant:last-child .cx-time {\n text-align: right !important;\n}\n\n.cx-widget.cx-theme-light .cx-message .cx-bubble .cx-message-text ul,\n.cx-widget.cx-theme-light .cx-message .cx-bubble .cx-message-text ol\n{\n padding-right: 15px !important;\n}\n\n.cx-message-input.cx-input.i18n.cx-form-control {\n direction: rtl !important;\n text-align: right !important;\n padding-right: 0px !important;\n padding-left: 50px !important;\n}\n\n.cx-webchat .cx-send {\n left: 0 !important;\n transform: translateX(10px) !important;\n}\n\n.cx-webchat .cx-transcript .cx-message-group > .cx-message .cx-time {\n direction: ltr !important;\n text-align: right !important;\n}\n`;\n","import { OidcUrlHelper } from '@ori/auth';\nimport ReactDOM from 'react-dom';\n\nimport { App } from './App';\nimport type { AppConfiguration } from './types';\n\n// eslint-disable-next-line complexity -- nevermind\nexport const render = (rootElement: HTMLElement): void => {\n // extract token from URL; only on dev machine, not needed elsewhere\n if (__DEV__) {\n const searchParams = new URLSearchParams(window.location.hash.split('?')[1]);\n\n if (searchParams.has('state')) {\n const oidcUrlHelper = new OidcUrlHelper();\n\n oidcUrlHelper.storeTokenFromParams(searchParams);\n }\n }\n\n const settings = JSON.parse(rootElement.dataset.settings ?? '{}');\n const configuration: AppConfiguration = {\n apiUrl: rootElement.dataset.apiUrl ?? '',\n graphqlUrl: `${rootElement.dataset.graphqlUrl ?? ''}graphql`,\n identityUrl: rootElement.dataset.identityUrl ?? '',\n appUrl: rootElement.dataset.appUrl ?? '',\n tenant: rootElement.dataset.tenant ?? '',\n orgId: settings.OrganizationId ?? '',\n deploymentId: settings.DeploymentId ?? '',\n dataURL: settings.DataURL ?? '',\n queue: settings.Queue ?? '',\n firstName: settings.FirstName ?? '',\n lastName: settings.LastName ?? '',\n email: settings.Email ?? '',\n customerId: Number.parseInt(rootElement.dataset.customerId ?? '-1', 10),\n scriptPath: settings.ScriptURL ?? '',\n pluginsPath: settings.PluginsPath ?? '',\n title: settings.Title ?? '',\n consultantNumber: Number.parseInt(settings.ConsultantNumber ?? 0, 10),\n phoneNumber: settings.PhoneNumber,\n language: settings.Language ?? 'pl',\n buttonLabel: settings.ButtonLabel ?? 'Chat with us',\n dedicatedPage: !!settings.DedicatedPage,\n maxMessageLength: 500,\n };\n\n if (configuration.dedicatedPage) {\n // @ts-expect-error\n import('./styles/theme-ori-dedicated.less');\n } else {\n // @ts-expect-error\n import('./styles/theme-ori-light.less');\n }\n ReactDOM.render(, rootElement);\n};\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".is--minimized {\\n background: #fff;\\n color: #000;\\n border-color: #ccc;\\n}\\n\\n.is--minimized path {\\n fill: #000;\\n}\\n\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/components/ChatButton/style.css\"],\"names\":[],\"mappings\":\"AAAA;EACE,gBAAgB;EAChB,WAAW;EACX,kBAAkB;AACpB;;AAEA;EACE,UAAU;AACZ\",\"sourcesContent\":[\".is--minimized {\\n background: #fff;\\n color: #000;\\n border-color: #ccc;\\n}\\n\\n.is--minimized path {\\n fill: #000;\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n"],"names":["Root","styled","display","flexDirection","alignItems","justifyContent","height","textAlign","Loading","memo","CircularProgress","color","configurationContext","createContext","identityUrl","apiUrl","tenant","graphqlUrl","appUrl","orgId","deploymentId","queue","firstName","lastName","email","customerId","dataURL","title","scriptPath","pluginsPath","language","consultantNumber","phoneNumber","buttonLabel","dedicatedPage","maxMessageLength","ConfigurationProvider","Provider","options","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","requiredValidator","_","__","input","val","getWebChatForms","firstname","lastname","customForm","formJSON","wrapper","inputs","id","name","maxlength","placeholder","label","validate","form","autoSubmit","subject","GenesysServerProxy","message","isHtml","text","this","HTML2String","RemoveCommands","RemoveUrl","slice","window","ori","genesysPlugin","command","html","replace","tempDivElement","document","createElement","innerHTML","textContent","str","debug","d","ininChatEvents","INIT","READY","COMPLETE","OPEN_ERROR","CHAT_DISCONNECT","RECONNECT_FAILURE","CLOSE","fixAndroidKeyboard","inputClass","chatContainerClass","inputElement","getElementsByClassName","length","undefined","chatContainer","classList","add","toggleHeight","event","target","isClickedOnInput","nodeName","namespaceURI","contains","remove","addEventListener","Label","fontWeight","opacity","paddingRight","transition","Button","theme","palette","secondary","main","contrastText","spacing","SHADOW_LEVEL1","Icon","BubbleHelpFilled","width","SESSION_STORE_CONVERSATION_ID_KEY","handleWebChatServiceReady","ininChat","triggerEvent","iframeStyle","ChatButton","props","useState","showButton","setShowButton","isMinimized","setIsMinimized","sessionStarted","setSessionStarted","chatWindowOpened","setChatWindowOpened","htmlContainer","querySelector","isChatOpenedByDefault","useContext","handleOpenChat","handleWebChatOpened","style","overflow","test","navigator","userAgent","handleWebChatMinimized","handleWebChatClosed","handleClose","handleWebChatServiceStarted","sessionStorage","setItem","data","conversationId","handleWebChatServiceClientConnected","handleWebChatServiceEnded","removeItem","handleEngageInvite","settings","formsConfig","error","handleInputChange","textArea","getElementById","svg","value","setAttribute","useEffect","setTimeout","getItem","body","setButtonVisibility","instance","elementId","events","subscribe","eventType","handler","handlers","unsubscribe","server","iFrame","load","toggleVisibility","params","openChatWindow","getChatId","clearUserData","toggle","getIninChat","script","src","defer","CXBus","configure","loadPlugin","_genesys","i18nUrl","URL","widgets","downloadGoogleFont","lang","i18n","origin","pathname","webchat","transport","type","deploymentKey","orgGuid","interactionData","routing","targetType","targetAddress","priority","markdown","userData","customField1Label","customField1","customField2Label","customField2","customField3Label","customField3","toUpperCase","customField4Label","customField4","confirmFormCloseEnabled","getGenesysSettings","registerPlugin","before","dataLayer","push","append","className","onClick","ErrorBoundary","state","children","Component","App","configuration","languageTenant","toLocaleUpperCase","openedByDefault","setOpenedByDefault","head","URLSearchParams","location","search","param","Suspense","fallback","ThemeProvider","enableCacheProvider","cacheKey","TestIdProvider","team","project","render","rootElement","JSON","parse","dataset","OrganizationId","DeploymentId","DataURL","Queue","FirstName","LastName","Email","Number","parseInt","ScriptURL","PluginsPath","Title","ConsultantNumber","PhoneNumber","Language","ButtonLabel","DedicatedPage","ReactDOM","___CSS_LOADER_EXPORT___","module"],"sourceRoot":""}