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ACd,OAAQ,KACR,UAAW,KACX,OAAQ,KACR,UAAW,KACX,OAAQ,KACR,YAAa,IACb,eAAgB,IAChB,UAAW,KACX,OAAQ,KACR,UAAW,KACX,aAAc,KACd,gBAAiB,KACjB,OAAQ,KACR,UAAW,KACX,UAAW,KACX,aAAc,KACd,UAAW,KACX,aAAc,KACd,UAAW,KACX,aAAc,KACd,UAAW,KACX,aAAc,MAIf,SAAS6f,EAAeC,GACvB,IAAIjgB,EAAKkgB,EAAsBD,GAC/B,OAAOE,EAAoBngB,EAC5B,CACA,SAASkgB,EAAsBD,GAC9B,IAAIE,EAAoBC,EAAEjgB,EAAK8f,GAAM,CACpC,IAAII,EAAI,IAAIC,MAAM,uBAAyBL,EAAM,KAEjD,MADAI,EAAEE,KAAO,mBACHF,CACP,CACA,OAAOlgB,EAAI8f,EACZ,CACAD,EAAeQ,KAAO,WACrB,OAAO7J,OAAO6J,KAAKrgB,EACpB,EACA6f,EAAe9hB,QAAUgiB,EACzBO,EAAOC,QAAUV,EACjBA,EAAehgB,GAAK,I","sources":["webpack://citymessenger-web/./app/webpacker/src/javascripts/services/apiService.ts","webpack://citymessenger-web/./app/webpacker/src/javascripts/services/messagingService.ts","webpack://citymessenger-web/./app/webpacker/src/javascripts/services/roomHelpers.tsx","webpack://citymessenger-web/./app/webpacker/src/javascripts/components/messages/BroadcastPlanInput.tsx","webpack://citymessenger-web/./app/webpacker/src/javascripts/components/messages/BroadcastVisibleOnWidgetCheckbox.tsx","webpack://citymessenger-web/./app/webpacker/src/javascripts/components/shared/AppendToBody.tsx","webpack://citymessenger-web/./app/webpacker/src/javascripts/components/messages/BroadcastReferencesCouponSelection.tsx","webpack://citymessenger-web/./app/webpacker/src/javascripts/shared/chat/layout-helpers.ts","webpack://citymessenger-web/./app/webpacker/src/javascripts/components/messages/ChatInput.tsx","webpack://citymessenger-web/./app/webpacker/src/javascripts/components/messages/Message.tsx","webpack://citymessenger-web/./app/webpacker/src/javascripts/components/messages/Messages.tsx","webpack://citymessenger-web/./app/webpacker/src/javascripts/services/draftService.ts","webpack://citymessenger-web/./app/webpacker/src/javascripts/components/messages/ImageWithLightbox.tsx","webpack://citymessenger-web/./app/webpacker/src/javascripts/components/shared/ConfirmDialog.tsx","webpack://citymessenger-web/./app/webpacker/src/javascripts/components/messages/BroadcastChat.tsx","webpack://citymessenger-web/./app/webpacker/src/javascripts/components/messages/BroadcastCategoryItem.tsx","webpack://citymessenger-web/./app/webpacker/src/javascripts/components/messages/BroadcastCategories.tsx","webpack://citymessenger-web/./app/webpacker/src/javascripts/components/messages/InvitationModal.tsx","webpack://citymessenger-web/./app/webpacker/src/javascripts/components/messages/CustomerInvitation.tsx","webpack://citymessenger-web/./app/webpacker/src/javascripts/components/messages/RoomItem.tsx","webpack://citymessenger-web/./app/webpacker/src/javascripts/components/messages/Rooms.tsx","webpack://citymessenger-web/./app/webpacker/src/javascripts/components/messages/DirectChat.tsx","webpack://citymessenger-web/./app/webpacker/src/javascripts/components/messages/MessageToggles.tsx","webpack://citymessenger-web/./app/webpacker/src/javascripts/components/messages/BroadcastChatHeader.tsx","webpack://citymessenger-web/./app/webpacker/src/javascripts/components/messages/DirectChatHeader.tsx","webpack://citymessenger-web/./app/webpacker/src/javascripts/components/messages/MessengerRouter.tsx","webpack://citymessenger-web/./app/webpacker/src/javascripts/components/messages/Messenger.tsx","webpack://citymessenger-web/./app/webpacker/src/javascripts/contexts/chatMessagesContext.tsx","webpack://citymessenger-web/./app/webpacker/src/javascripts/services/messageHelpers.tsx","webpack://citymessenger-web/./app/webpacker/src/javascripts/services/toast.tsx","webpack://citymessenger-web/./app/webpacker/src/javascripts/shared/chat/base-chat-service.ts","webpack://citymessenger-web/./app/webpacker/src/javascripts/shared/chat/pusher-chat-service.ts","webpack://citymessenger-web/./app/webpacker/src/javascripts/shared/chat/ChatContext.tsx","webpack://citymessenger-web/./app/webpacker/src/javascripts/shared/chat/message-helpers.ts","webpack://citymessenger-web/./app/webpacker/src/javascripts/shared/services/serialization.ts","webpack://citymessenger-web/./node_modules/moment/locale/ sync ^\\.\\/.*$"],"sourcesContent":["export default class ApiService {\n static fetch(input: RequestInfo, init?: RequestInit, contentType: string | null = 'application/json') {\n const headers = {\n Authorization: window.CityMessenger.chatConfig.token,\n };\n if (contentType) {\n headers['Content-Type'] = contentType;\n }\n const method = 'get';\n\n return new Promise((resolve, reject) => {\n fetch(input, { headers, method, ...init }).then(response => {\n if (response.ok) {\n return resolve(response);\n } else {\n return reject(response);\n }\n });\n });\n }\n}\n","import objectToFormData from 'object-to-formdata';\nimport ApiService from 'src/javascripts/services/apiService';\nimport {\n BroadcastCategory,\n InitialHistory,\n MultipartMessage,\n MultipartMessagePayload,\n MultipartPlannedBroadcastChatMessagePerCategory, PlanInformation,\n} from 'src/javascripts/shared/chat';\nimport { serialize } from '../shared/services/serialization';\n\nexport default class MessagingService {\n static submitMessage = async (customerId: string, text: string, image?: string) => {\n const parts: MultipartMessagePayload[] = [\n { type: 'text/plain', content: text },\n ];\n\n const body = objectToFormData(\n serialize('message', ['parts', 'customerId'], { parts, customerId }),\n );\n\n if (image) {\n body.append('data[attributes][remote_image_url]', image);\n }\n const data = await ApiService.fetch('/shop_api/messages', { method: 'post', body }, null).then(response => response.json());\n return data as MultipartMessage;\n }\n\n static submitBroadcastMessage = async (broadcastCategoryId: string, scheduledFor: string, text: string, image?: string,\n visibleOnWidget?: boolean, referencedCouponId?: string) => {\n const body = objectToFormData({\n broadcast_message: {\n text,\n broadcast_category_id: broadcastCategoryId,\n scheduled_for: scheduledFor,\n visible_on_widget: visibleOnWidget,\n referenced_coupon_id: referencedCouponId,\n },\n });\n if (image) {\n body.append('broadcast_message[remote_image_url]', image);\n }\n\n return ApiService.fetch('/shop_api/broadcast_messages', { method: 'post', body }, null);\n }\n\n static submitImage = async (image: File) => {\n const body = objectToFormData({\n message_image: {\n image,\n },\n });\n\n const response = await ApiService.fetch('/shop_api/message_images', { method: 'post', body }, null);\n return response.json();\n }\n\n static deleteBroadcastMessage = async (id: string) => {\n return ApiService.fetch(`/shop_api/broadcast_messages/${id}`, { method: 'delete' });\n }\n\n static deleteDirectMessage = async (id: string) => {\n return ApiService.fetch(`/shop_api/messages/${id}`, { method: 'delete' });\n }\n\n static fetchPlannedBroadcastMessages = async (): Promise => {\n const response = await ApiService.fetch('/shop_api/broadcast_messages?planned=1');\n\n if (response.ok) {\n return response.json();\n } else {\n return [];\n }\n }\n\n static fetchBroadcastCategories = async (): Promise => {\n const response = await ApiService.fetch(`/shop_api/broadcast_categories?locale=${window.CityMessenger.chatConfig.locale}`);\n if (response.ok) {\n const categories = await response.json();\n return categories.data.map(({ id, attributes: { name, icon } }) => ({ id, name, icon }));\n } else {\n return [];\n }\n }\n\n static fetchHistory = async () => {\n const response = await ApiService.fetch('/shop_api/initial_history');\n return await response.json() as InitialHistory;\n }\n\n static fetchPlanInformation = async () => {\n const response = await ApiService.fetch('/shop_api/plan_information');\n const handleInfinity = (attributes: PlanInformation) => {\n for (const information in attributes) {\n if(attributes[information] === null) {\n attributes[information] = Infinity;\n }\n }\n };\n\n if (response.ok) {\n const planInformation = await response.json();\n handleInfinity(planInformation.data.attributes);\n return planInformation.data.attributes as PlanInformation;\n } else {\n return {} as PlanInformation;\n }\n }\n\n static setBroadcastCursor = async (position: string, categoryId: string) => {\n const body = JSON.stringify(serialize('messageCursor', ['position', 'categoryId'], { position, categoryId }));\n\n return ApiService.fetch('/shop_api/message_cursors/broadcast', { method: 'post', body });\n }\n\n static setDirectCursor = async (position: string, customerId: string) => {\n const body = JSON.stringify(serialize('messageCursor', ['position', 'customerId'], { position, customerId }));\n\n return ApiService.fetch('/shop_api/message_cursors/direct', { method: 'post', body });\n }\n\n static fetchDirectMessages = async ({ customerId, page }): Promise => {\n const response = await ApiService.fetch(`/shop_api/direct_messages?customer_id=${customerId}&page=${page}`);\n\n if (response.ok) {\n return response.json();\n } else {\n return [];\n }\n }\n\n static fetchBroadcastMessages = async ({ categoryId, page }): Promise => {\n const response = await ApiService.fetch(`/shop_api/broadcast_messages?broadcast_category_id=${categoryId}&page=${page}`);\n\n if (response.ok) {\n return response.json();\n } else {\n return [];\n }\n }\n}\n","import { ChatMessagesContextValue } from 'src/javascripts/contexts/chatMessagesContext';\nimport { Room } from 'src/javascripts/shared/chat';\n\nexport const sortRoomsByLastActivity = (directChat: ChatMessagesContextValue['directChat'], rooms: Room[]) => {\n const byLastActivity = (room1: Room, room2: Room) => {\n const extractTime = (room: Room) => new Date((directChat(room.customer.id).teaser || room).createdAt).getTime();\n return extractTime(room2) - extractTime(room1);\n };\n\n return rooms.sort(byLastActivity);\n};\n","import moment, { Moment } from 'moment';\nimport React from 'react';\nimport * as Datetime from 'react-datetime';\nimport { BroadCastSubmitType } from 'src/javascripts/components/messages/BroadcastChat';\nimport { DraftedBroadcastMessage } from 'src/javascripts/services/draftService';\nimport t from 'src/javascripts/services/translations';\n\ninterface Props {\n draftedMessage: DraftedBroadcastMessage;\n setDraftSubmitType: (submitType: BroadCastSubmitType) => any;\n setDraftDate: (date: string) => any;\n}\n\nexport default function BroadcastPlanInput({ draftedMessage: { submitType, date }, setDraftDate, setDraftSubmitType }: Props) {\n const yesterday = moment().subtract(1, 'day');\n const setDate = (newDate: Moment | string) => {\n if (typeof newDate !== 'string') {\n setDraftDate(newDate.format('DD.MM.YYYY HH:mm'));\n }\n };\n\n const toggleSubmitType = () => {\n let newSubmitType;\n if (submitType === BroadCastSubmitType.send) {\n newSubmitType = BroadCastSubmitType.plan;\n setDate(moment());\n } else {\n newSubmitType = BroadCastSubmitType.send;\n }\n setDraftSubmitType(newSubmitType);\n };\n\n const isValidDate = (current) => current.isAfter(yesterday);\n\n return (\n
\n
\n \n \n
\n {submitType === BroadCastSubmitType.plan && (\n
\n \n
\n )}\n
\n );\n}\n","import 'bootstrap/js/dist/tooltip';\nimport React, { useLayoutEffect } from 'react';\nimport { DraftedBroadcastMessage } from 'src/javascripts/services/draftService';\nimport t from 'src/javascripts/services/translations';\n\ninterface Props {\n draftedMessage: DraftedBroadcastMessage;\n setVisibleOnWidget: (submitType: boolean) => any;\n}\n\nexport default function BroadcastVisibleOnWidgetCheckbox({ draftedMessage, setVisibleOnWidget }: Props) {\n useLayoutEffect(() => {\n const tooltips = $('[data-toggle=\"tooltip\"]') as { tooltip?: () => void };\n /* istanbul ignore next */\n if (tooltips.tooltip) {\n tooltips.tooltip();\n }\n });\n return (\n
\n
\n setVisibleOnWidget(!draftedMessage.visibleOnWidget)}\n />\n \n \n \n \n
\n
\n );\n}\n","import React, { ReactNode } from 'react';\nimport ReactDOM from 'react-dom';\n\ninterface Props {\n children: ReactNode;\n}\n\nexport default class AppendToBody extends React.Component {\n private readonly element: HTMLDivElement;\n\n constructor(props) {\n super(props);\n this.element = document.createElement('div');\n }\n\n componentDidMount() {\n this.body.appendChild(this.element);\n }\n\n componentWillUnmount() {\n this.body.removeChild(this.element);\n }\n\n render() {\n return ReactDOM.createPortal(\n this.props.children,\n this.element,\n );\n }\n\n get body() {\n return document.getElementsByTagName('body')[0];\n }\n}\n","import React from 'react';\nimport AppendToBody from 'src/javascripts/components/shared/AppendToBody';\nimport ApiService from 'src/javascripts/services/apiService';\nimport t from 'src/javascripts/services/translations';\nimport { Coupon } from 'src/javascripts/shared/chat';\nimport { deserialize } from 'src/javascripts/shared/services/serialization';\n\ninterface Props {\n referencedCouponId?: string;\n setReferencedCouponId: (referencedCouponId?: string) => void;\n}\n\nexport default function BroadcastReferencesCouponSelection({ referencedCouponId, setReferencedCouponId }: Props) {\n const [showModal, setShowModal] = React.useState(false);\n const [coupons, setCoupons] = React.useState>>([]);\n const cancel = () => {\n setReferencedCouponId(undefined);\n setShowModal(false);\n };\n\n React.useEffect(() => {\n ApiService\n .fetch('/shop_api/coupons')\n .then(response => response.json())\n .then(deserialize)\n .then(setCoupons);\n }, []);\n\n return (\n
\n setShowModal(!showModal)} className={`fal fa-ticket-alt field-toggle ${referencedCouponId ? 'active' : ''}`}/>\n {showModal && (\n \n
\n
\n
\n
\n
{t('broadcast.couponing.reference_coupon')}
\n
\n
\n

{t('broadcast.couponing.reference_coupon_description')}

\n setReferencedCouponId(event.target.value)}\n className=\"custom-select\"\n >\n \n {coupons.map(coupon => )}\n \n
\n
\n \n \n
\n
\n
\n
\n
\n )}\n
\n );\n}\n","export const isWrapperApp = () => (\n document.getElementsByTagName('body').item(0).className.includes('wrapper-app')\n);\n","import { Picker } from 'emoji-mart';\nimport React, { KeyboardEvent, ReactNode, useEffect, useState } from 'react';\nimport TextareaAutosize from 'react-textarea-autosize';\nimport { BroadCastSubmitType } from 'src/javascripts/components/messages/BroadcastChat';\nimport BroadcastReferencesCouponSelection from 'src/javascripts/components/messages/BroadcastReferencesCouponSelection';\nimport { DraftedMessage } from 'src/javascripts/services/draftService';\nimport t from 'src/javascripts/services/translations';\nimport MessagingService from '../../services/messagingService';\nimport { toast } from '../../services/toast';\nimport { isWrapperApp } from '../../shared/chat/layout-helpers';\n\ninterface Props {\n submitMessage: () => any;\n draftMessage: (text: string, image?: string, cb?: () => any) => any;\n draftedMessage: DraftedMessage;\n isBlocked: boolean;\n children?: ReactNode;\n submitType?: BroadCastSubmitType;\n isQuotaReached?: boolean;\n isStarter?: boolean;\n isVoucherIssuer?: boolean;\n setReferencedCouponId?: (referencedCouponId: string) => any;\n}\n\nexport default function ChatInput({\n submitMessage, isBlocked, draftMessage, draftedMessage: { text, image, referencedCouponId }, children,\n submitType = BroadCastSubmitType.send, isQuotaReached, isVoucherIssuer, setReferencedCouponId,\n}: Props) {\n\n const [emojiPickerVisible, setEmojiPickerVisible] = useState(false);\n const [inputCursorPosition, setInputCursorPosition] = useState(0);\n\n useEffect(() => {\n document.addEventListener('keyup', closeEmojiPickerHandler, false);\n return () => {\n document.removeEventListener('keyup', closeEmojiPickerHandler, false);\n };\n }, []);\n\n const closeEmojiPickerHandler = (event) => {\n if (event.keyCode === 27) {\n event.preventDefault();\n setEmojiPickerVisible(false);\n }\n };\n\n const onKeyDown = (event: KeyboardEvent) => {\n if (event.keyCode === 13 && (event.ctrlKey || event.metaKey)) {\n event.preventDefault();\n draftMessage(text, image, submitMessage);\n }\n };\n\n const updateCursorPosition = (event) => {\n setInputCursorPosition(event.nativeEvent.target.selectionStart);\n };\n\n const addEmoji = (emoji) => {\n if (isBlocked) {\n return;\n }\n const newText = text.substring(0, inputCursorPosition) + emoji.native + text.substring(inputCursorPosition);\n setInputCursorPosition(inputCursorPosition + 2);\n draftMessage(newText, image);\n };\n\n const submitImage = async (selectedImage: File) => {\n try {\n const response = await MessagingService.submitImage(selectedImage);\n draftMessage(text, response.url);\n } catch (_e) {\n toast('error', 'chat.image.submission_failed');\n draftMessage(text, image);\n }\n };\n\n const displayQuotaMessage = () => {\n return isQuotaReached &&
{t('chat_input.quota_reached')}
;\n };\n\n return (\n <>\n
\n {image && (\n
\n \n draftMessage(text, undefined)} className=\"fal fa-times\"/>\n
\n )}\n
\n {emojiPickerVisible && (\n
\n \n
\n )}\n
\n
\n submitImage(event.target.files[0])}\n hidden={true}\n />\n
\n {children}\n {isBlocked &&
{t('chat_input.blocked')}
}\n {displayQuotaMessage()}\n
\n \n );\n}\n","import React from 'react';\nimport Linkify from 'react-linkify';\nimport ImageWithLightbox from 'src/javascripts/components/messages/ImageWithLightbox';\nimport { defaultAvatarForUser, formatDate, isPlanned, isSending } from 'src/javascripts/services/messageHelpers';\nimport t from 'src/javascripts/services/translations';\nimport { BroadcastMultipartMessage, ChatMessage, PlannedBroadcastChatMessage, Users } from 'src/javascripts/shared/chat';\n\nenum MessageType {\n Planned = 'planned',\n Sent = 'sent',\n Sending = 'sending',\n Received = 'received',\n}\n\ninterface Props {\n currentUserId: string;\n message: ChatMessage | PlannedBroadcastChatMessage;\n imgLoaded: () => void;\n actions: Array<[string, (message: ChatMessage | PlannedBroadcastChatMessage) => any]>;\n deleteAction: (message: ChatMessage) => void;\n users: Users;\n}\n\nexport default function Message({ currentUserId, message, actions, imgLoaded, deleteAction, users }: Props) {\n let sentOrReceived = currentUserId === message.sender.chatUserId ? MessageType.Sent : MessageType.Received;\n const sender = users[message.sender.chatUserId];\n\n if (isPlanned(message)) {\n sentOrReceived = MessageType.Planned;\n }\n\n if (isSending(message)) {\n sentOrReceived = MessageType.Sending;\n }\n\n const confirmDeletion = () => {\n if (window.confirm(t('chat.message.deletion_confirmation')) === true) {\n deleteAction(message as ChatMessage);\n }\n };\n\n return (\n
\n
\n
{sender.name}
\n
\n {message.image && }\n
\n {sentOrReceived === MessageType.Planned &&\n actions.map(([icon, cb], index) =>\n cb(message)} className={`far ${icon}`}/>)\n }\n {(sentOrReceived === MessageType.Sent || sentOrReceived === MessageType.Planned) &&\n \n }\n
\n {(message as ChatMessage).quote &&
{(message as ChatMessage).quote}
}\n
\n {message.text}\n
\n
\n {(message as any).referencedCouponId && }\n {formatDate(message.createdAt)}\n
\n
\n
\n );\n}\n","import { throttle } from 'lodash';\nimport React, { createRef, useEffect, useRef } from 'react';\nimport Message from 'src/javascripts/components/messages/Message';\nimport { ChatMessage, MultipartMessage, PlanInformation, PlannedBroadcastChatMessage, Users } from 'src/javascripts/shared/chat';\n\ninterface Props {\n messages: Array;\n currentUserId: string;\n recipient: string;\n loadEarlierMessages: (page: number) => Promise;\n actions?: Array<[string, (message: ChatMessage | PlannedBroadcastChatMessage) => any]>;\n deleteAction: (message: ChatMessage) => void;\n quotaMessage?: string;\n users: Users;\n}\n\nlet page: number;\n// to not try to fetch the same page multiple times\nlet refreshing: boolean;\n// when i was at the bottom, it should scroll together with incoming messages, otherwise it keeps the scroll position\nlet isAtBottom: boolean;\n// no further messages loaded, no need to perform the pagination\nlet isOnTop: boolean;\n// to keep the track of the scrollbar, so that there's always a gap from the top where can scroll\nlet scrollFromBottom: number;\n\nexport default function Messages({ messages, currentUserId, actions = [], deleteAction, loadEarlierMessages,\n recipient, quotaMessage = '', users }: Props) {\n const PAGINATION_SCROLL_OFFSET = 500;\n const scroll = () => {\n /* istanbul ignore if */\n if (!chatRef.current) {\n return;\n }\n const scrollHeight = chatRef.current.scrollHeight;\n chatRef.current.scrollTop = isAtBottom ? scrollHeight : scrollHeight - scrollFromBottom;\n };\n const chatRef = useRef(null);\n useEffect(scroll, [messages]);\n useEffect(() => {\n page = 1;\n refreshing = false;\n isAtBottom = true;\n isOnTop = false;\n scrollFromBottom = 0;\n scroll();\n }, [recipient]);\n\n const handleScroll = async () => {\n /* istanbul ignore if */\n if (!chatRef.current) {\n return;\n }\n const { scrollHeight, scrollTop, clientHeight } = chatRef.current;\n isAtBottom = Math.abs(scrollHeight - scrollTop - clientHeight) <= 1;\n scrollFromBottom = scrollHeight - scrollTop;\n if (chatRef.current.scrollTop > PAGINATION_SCROLL_OFFSET || !loadEarlierMessages || refreshing || isOnTop) {\n return;\n }\n refreshing = true;\n page += 1;\n const incomingMessages = await loadEarlierMessages(page);\n if (!incomingMessages.length) {\n isOnTop = true;\n }\n refreshing = false;\n };\n\n useEffect(() => {\n const scrollFn = throttle(handleScroll, 400);\n chatRef.current.addEventListener('scroll', scrollFn);\n }, [chatRef]);\n\n return (\n
\n {(messages).map(message => (\n \n ))}\n
\n
\n );\n}\n","import moment from 'moment';\nimport { BroadCastSubmitType } from 'src/javascripts/components/messages/BroadcastChat';\n\nexport interface DraftedMessage {\n text: string;\n image: string | undefined;\n visibleOnWidget: boolean;\n referencedCouponId?: string;\n}\n\nexport interface DraftedBroadcastMessage extends DraftedMessage {\n date: string;\n submitType: BroadCastSubmitType;\n}\n\nexport enum DraftType {\n direct = 'direct',\n broadcast = 'broadcast',\n}\n\nconst cache = {};\n\nexport default class DraftService {\n // tslint:disable\n static new(type: DraftType.direct): DraftService;\n static new(type: DraftType.broadcast): DraftService;\n static new(type: DraftType): DraftService {\n return new DraftService(type);\n }\n // tslint:enable\n\n cache: {[key: string]: T} = cache;\n\n constructor(private type: DraftType) {}\n\n retrieve(id: string): T {\n const key = this.key(id);\n let message: T = this.cache[key];\n\n if (message) {\n return message;\n }\n\n message = JSON.parse(localStorage.getItem(key));\n\n if (message) {\n return message;\n }\n\n return this.emptyDraft;\n }\n\n save(id: string, message: T): void {\n const key = this.key(id);\n this.cache[key] = message;\n localStorage.setItem(key, JSON.stringify({ ...message }));\n }\n\n update(id: string, attributesToUpdate: Partial): T {\n const message = { ...this.retrieve(id), ...attributesToUpdate };\n this.save(id, message);\n return message;\n }\n\n delete(id: string): void {\n const key = this.key(id);\n this.cache[key] = undefined;\n localStorage.removeItem(key);\n }\n\n get emptyDraft(): T {\n const message: any = {\n text: '',\n image: undefined,\n visibleOnWidget: true,\n };\n\n if (this.type === DraftType.broadcast) {\n message.date = moment().format('DD.MM.YYYY HH:mm');\n message.submitType = BroadCastSubmitType.send;\n }\n\n return message;\n }\n\n key(id: string): string {\n return `cm-draft-${this.type}-${id}`;\n }\n}\n","import PinchZoom from 'pinch-zoom-js';\nimport React from 'react';\nimport AppendToBody from 'src/javascripts/components/shared/AppendToBody';\n\ninterface Props {\n onLoad: () => void;\n src: string;\n}\n\ninterface State {\n open: boolean;\n}\n\nexport default class ImageWithLightbox extends React.Component {\n state = { open: false };\n\n componentDidUpdate() {\n if (this.state.open) {\n document.addEventListener('keydown', this.closeOnEsc);\n const _pinchZoom = new PinchZoom(document.querySelector('#lightbox-img'));\n } else {\n document.removeEventListener('keydown', this.closeOnEsc);\n }\n }\n\n fixOnLoad = img => {\n if (!img) {\n return;\n }\n\n img.onload = this.props.onLoad;\n\n if (img.complete) {\n img.onload();\n }\n }\n\n closeOnEsc = ({ keyCode }: { keyCode: number }) => {\n if (keyCode === 27) {\n this.setState({ open: false });\n }\n }\n\n render() {\n const { open } = this.state;\n const { src } = this.props;\n\n return (\n <>\n this.setState({ open: true })}/>\n {open && (\n \n
this.setState({ open: false })}>\n \n
\n
\n )}\n \n );\n }\n}\n","import React, { ReactNode } from 'react';\nimport AppendToBody from 'src/javascripts/components/shared/AppendToBody';\nimport t from 'src/javascripts/services/translations';\n\ninterface Props {\n confirm: () => unknown;\n cancel: () => unknown;\n children: ReactNode;\n confirmText?: string;\n cancelText?: string;\n}\n\nexport function ConfirmDialog({ confirm, cancel, children, confirmText, cancelText }: Props) {\n const getText = (text, scope) => text || t(`confirm_dialog.${scope}`);\n\n return (\n \n
\n
\n
\n
{children}
\n
\n \n \n
\n
\n
\n
\n
\n );\n}\n","import moment from 'moment';\nimport React from 'react';\nimport { RouteComponentProps } from 'react-router-dom';\nimport BroadcastPlanInput from 'src/javascripts/components/messages/BroadcastPlanInput';\nimport BroadcastVisibleOnWidgetCheckbox from 'src/javascripts/components/messages/BroadcastVisibleOnWidgetCheckbox';\nimport ChatInput from 'src/javascripts/components/messages/ChatInput';\nimport Messages from 'src/javascripts/components/messages/Messages';\nimport { ConfirmDialog } from 'src/javascripts/components/shared/ConfirmDialog';\nimport { ChatMessagesContext } from 'src/javascripts/contexts/chatMessagesContext';\nimport DraftService, { DraftedBroadcastMessage, DraftType } from 'src/javascripts/services/draftService';\nimport { getQuotaMessage, notReady } from 'src/javascripts/services/messageHelpers';\nimport MessagingService from 'src/javascripts/services/messagingService';\nimport { toast } from 'src/javascripts/services/toast';\nimport t from 'src/javascripts/services/translations';\nimport {\n BroadcastCategory,\n ChatMessage,\n PlanInformation,\n PusherUser,\n Users,\n} from 'src/javascripts/shared/chat';\nimport { isWrapperApp } from 'src/javascripts/shared/chat/layout-helpers';\nimport BroadcastCategories from './BroadcastCategories';\n\ninterface Props extends RouteComponentProps<{ categoryId: string }> {\n currentUser: PusherUser;\n broadcastCategories: BroadcastCategory[];\n reload: () => void;\n planInformation: PlanInformation;\n users: Users;\n}\n\nexport enum BroadCastSubmitType {\n send = 'send',\n plan = 'plan',\n}\n\ninterface State {\n currentCategoryId: string;\n draftedMessage: DraftedBroadcastMessage;\n resolveConfirmSubmitMessage?: (confirmed: boolean) => void;\n showStarter: boolean;\n}\n\nexport default class BroadcastChat extends React.Component {\n static contextType = ChatMessagesContext;\n\n context!: React.ContextType;\n state: State = {\n currentCategoryId: '',\n draftedMessage: undefined,\n showStarter: true,\n };\n draftService = DraftService.new(DraftType.broadcast);\n\n componentDidMount() {\n this.initialize({} as Props, {} as State);\n }\n\n componentDidUpdate(prevProps: Props, prevState: State) {\n this.initialize(prevProps, prevState);\n }\n\n initialize(prevProps: Props, prevState: State) {\n const { currentCategoryId } = this.state;\n const { broadcastCategories, match: { params: { categoryId } } } = this.props;\n\n if (broadcastCategories.length && (broadcastCategories !== prevProps.broadcastCategories\n || currentCategoryId !== categoryId && broadcastCategories.find(c => c.id === categoryId))) {\n this.setState({ currentCategoryId: categoryId || broadcastCategories[0].id });\n }\n\n if (currentCategoryId !== prevState.currentCategoryId) {\n const draftedMessage = this.draftService.retrieve(this.state.currentCategoryId);\n this.setState({ draftedMessage });\n }\n\n if (currentCategoryId) {\n this.updateMessageReadCursor();\n }\n }\n\n setDraftSubmitType = (submitType: BroadCastSubmitType) => {\n this.setState({ draftedMessage: this.draftService.update(this.state.currentCategoryId, { submitType }) });\n }\n\n setDraftDate = (date: string) => {\n this.setState({ draftedMessage: this.draftService.update(this.state.currentCategoryId, { date }) });\n }\n\n setDraftMessage = (text, image, cb?) => {\n this.setState({ draftedMessage: this.draftService.update(this.state.currentCategoryId, { text, image }) }, cb);\n }\n\n setVisibleOnWidget = (visibleOnWidget: boolean) => {\n this.setState({ draftedMessage: this.draftService.update(this.state.currentCategoryId, { visibleOnWidget }) });\n }\n\n setReferencedCouponId = (referencedCouponId: string) => {\n this.setState({ draftedMessage: this.draftService.update(this.state.currentCategoryId, { referencedCouponId }) });\n }\n\n submitMessage = async () => {\n const { currentCategoryId, draftedMessage: { text, image, date, submitType, visibleOnWidget, referencedCouponId } } = this.state;\n if (text || image) {\n if (!await this.confirmSubmitMessage()) { return; }\n const scheduledFor = submitType === BroadCastSubmitType.plan ? date : moment().format('DD.MM.YYYY HH:mm:ss');\n this.draftService.delete(this.state.currentCategoryId);\n this.setState({ draftedMessage: this.draftService.emptyDraft });\n try {\n await MessagingService.submitBroadcastMessage(currentCategoryId, scheduledFor, text, image, visibleOnWidget, referencedCouponId);\n this.props.reload();\n } catch (error) {\n this.setDraftMessage(text, image);\n const errorJson = await error.json().catch(() => console.error('Broadcast submit failed'));\n if (errorJson?.errors?.scheduled_for) {\n toast('error', 'chat.message.scheduling_failed');\n } else {\n toast('error', 'chat.message.submission_failed');\n }\n }\n }\n }\n\n confirmSubmitMessage = async () => {\n const confirmed: boolean = await new Promise(resolve =>\n this.setState({\n resolveConfirmSubmitMessage: confirmed => resolve(confirmed),\n }),\n );\n this.setState({ resolveConfirmSubmitMessage: undefined });\n return confirmed;\n }\n\n editMessage = async message => {\n const { text, createdAt, visibleOnWidget, referencedCouponId } = message;\n const date = moment(createdAt).format('DD.MM.YYYY HH:mm');\n const draftedMessage = { text, image: undefined, date, submitType: BroadCastSubmitType.plan, visibleOnWidget, referencedCouponId };\n const oldDraftedMessage = this.state.draftedMessage;\n this.draftService.save(this.state.currentCategoryId, draftedMessage);\n this.setState({ draftedMessage });\n await this.deleteMessage(message, () => {\n toast('error', 'chat.message.editing_failed');\n this.draftService.save(this.state.currentCategoryId, oldDraftedMessage);\n this.setState({ draftedMessage: oldDraftedMessage });\n });\n }\n\n deleteMessage = async (message: ChatMessage, errorHandler?: () => void) => {\n try {\n const response = await MessagingService.deleteBroadcastMessage(message.id);\n if (response.ok) {\n this.context.removeBroadcastMessage(this.state.currentCategoryId, message.id);\n }\n } catch (_e) {\n if(errorHandler) {\n errorHandler();\n } else {\n toast('error', 'chat.message.deletion_failed');\n }\n }\n }\n\n loadEarlierMessages = async (page: number) => {\n const { currentCategoryId } = this.state;\n const messages = await MessagingService.fetchBroadcastMessages({ categoryId: currentCategoryId, page });\n this.context.addBroadcastConversations({ [currentCategoryId]: { messages, unreadMessageIds: [] } });\n return messages;\n }\n\n render() {\n const { broadcastCategories, currentUser, planInformation, users } = this.props;\n const { currentCategoryId, draftedMessage, resolveConfirmSubmitMessage } = this.state;\n\n if (!currentUser || !draftedMessage || !planInformation) {\n return notReady(t('broadcast.not_ready.connecting'));\n }\n\n const isQuotaReached = planInformation.sentBroadcastMessages >= planInformation.totalBroadcastMessages;\n const isMessageInThisMonth = moment(draftedMessage.date, 'DD.MM.YYYY hh:mm').isSame(moment(), 'month');\n\n return (\n
\n {!isWrapperApp() && (\n \n )}\n \n \n
\n \n \n
\n \n {resolveConfirmSubmitMessage && (\n resolveConfirmSubmitMessage(true)}\n cancel={() => resolveConfirmSubmitMessage(false)}\n >\n \n {isQuotaReached && isMessageInThisMonth && (\n
\n {t('chat_input.quota_reached', { cost: planInformation.costPerAdditionalBroadcast })}\n
\n )}\n \n )}\n
\n );\n }\n\n private get currentCategoryName(): string {\n return this.props.broadcastCategories.find(({ id }) => id === this.state.currentCategoryId).name;\n }\n\n private updateMessageReadCursor() {\n const { currentCategoryId } = this.state;\n const { unreadMessageIds, teaser } = this.context.broadcastChat(currentCategoryId);\n if (unreadMessageIds.length) {\n this.context.markBroadcastChatAsRead(currentCategoryId);\n MessagingService.setBroadcastCursor(teaser.id, currentCategoryId);\n }\n }\n}\n","import React from 'react';\nimport { BroadcastCategory, ChatMessage, Users } from 'src/javascripts/shared/chat';\nimport { formatDate } from '../../services/messageHelpers';\n\ninterface Props {\n category: BroadcastCategory;\n currentCategoryId: string;\n setCurrentCategoryId: (id: string) => void;\n teaser?: ChatMessage;\n unreadMessages?: number;\n users: Users;\n}\n\nexport default function BroadcastCategoryItem({ category, currentCategoryId, setCurrentCategoryId, teaser, unreadMessages, users }: Props) {\n const activeClass = currentCategoryId === category.id ? 'selected' : '';\n\n return (\n
setCurrentCategoryId(category.id)}>\n
\n
{category.name}
\n
{teaser && `${users[teaser.sender.chatUserId].name}: ${teaser.text}`}
\n
{teaser && formatDate(teaser.createdAt)}
\n {unreadMessages > 0 &&
{unreadMessages}
}\n
\n );\n}\n","import React from 'react';\nimport { RouteComponentProps } from 'react-router-dom';\nimport { useMessagesContext } from 'src/javascripts/contexts/chatMessagesContext';\nimport { BroadcastCategory, Users } from 'src/javascripts/shared/chat';\nimport BroadcastCategoryItem from './BroadcastCategoryItem';\n\ninterface Props extends RouteComponentProps {\n broadcastCategories: BroadcastCategory[];\n currentCategoryId?: string;\n users: Users;\n}\n\nexport default function BroadcastCategories({ broadcastCategories, currentCategoryId, history, users }: Props) {\n const { broadcastChat } = useMessagesContext();\n\n return (\n
\n
\n {broadcastCategories.map(category => {\n return (\n history.push(`/broadcasts/${id}`)}\n teaser={broadcastChat(category.id).teaser}\n unreadMessages={broadcastChat(category.id).unreadMessageIds.length}\n users={users}\n />\n );\n },\n )}\n
\n
\n );\n}\n","import React from 'react';\nimport AppendToBody from 'src/javascripts/components/shared/AppendToBody';\nimport t from 'src/javascripts/services/translations';\n// @ts-ignore\nimport smsTemplate from '../../../../images/sms-template.png';\nimport { isWrapperApp } from '../../shared/chat/layout-helpers';\n\ninterface Props {\n cancel: () => void;\n}\n\nexport default function InvitationModal({ cancel }: Props) {\n const [file, setFile] = React.useState(null);\n const [confirmed, setConfirmed] = React.useState(false);\n return (\n \n
\n
\n
\n
\n
Telefonnummer Import
\n
\n
\n {confirmed ? (\n
\n \n

\n

\n ) : (\n
\n

\n

\n )}\n
\n \n {isWrapperApp() && }\n
\n
\n setFile(event.currentTarget.files[0])}\n />\n \n
\n
\n \n {confirmed ? (\n \n ) : (\n \n )}\n
\n
\n
\n
\n
\n
\n );\n}\n","import React, { useState } from 'react';\nimport { RouteComponentProps } from 'react-router-dom';\nimport t from 'src/javascripts/services/translations';\nimport { isWrapperApp } from 'src/javascripts/shared/chat/layout-helpers';\nimport InvitationModal from './InvitationModal';\n\ninterface Props extends RouteComponentProps {\n showHeader?: boolean;\n}\n\nexport default function CustomerInvitation({ showHeader, history: { replace: redirect } }: Props) {\n const [invitationModalOpen, setInvitationModalOpen] = useState(false);\n\n return (\n
\n {invitationModalOpen && setInvitationModalOpen(false)}/>}\n {showHeader && (\n
\n redirect('/')} title=\"back\">\n \n \n {t('customer_invitation.title')}\n
\n )}\n
\n

\n {t('customer_invitation.phone_invite')}\n

\n
\n \n {isWrapperApp() && }\n
\n
\n
\n \n \n
\n
\n \n
\n \n
\n
\n );\n}\n","import React from 'react';\nimport { defaultAvatarForUser, formatDate } from 'src/javascripts/services/messageHelpers';\nimport { ChatMessage, ChatMessageSender, Room } from 'src/javascripts/shared/chat';\n\ninterface Props {\n currentRoom: Room;\n room: Room;\n customer?: ChatMessageSender;\n setCurrentRoom: (room: Room) => void;\n teaser: ChatMessage;\n unreadMessages?: number;\n}\n\nexport default function RoomItem({ room, currentRoom, customer, setCurrentRoom, teaser, unreadMessages }: Props) {\n if (!customer) {\n return null;\n }\n const activeClass = currentRoom === room ? 'selected' : '';\n const avatarUrl = defaultAvatarForUser(customer);\n const time = teaser && formatDate(teaser.createdAt) || room.lastMessageAt && formatDate(room.lastMessageAt);\n\n return (\n
setCurrentRoom(room)}>\n
\n
{customer.name}
\n
{teaser && teaser.text}
\n
{time}
\n {unreadMessages > 0 &&
{unreadMessages}
}\n
\n );\n}\n","import React from 'react';\nimport { Link, RouteComponentProps } from 'react-router-dom';\nimport { useMessagesContext } from 'src/javascripts/contexts/chatMessagesContext';\nimport t from 'src/javascripts/services/translations';\nimport { PusherUser, Room, transformChatMessageSender, Users } from 'src/javascripts/shared/chat';\nimport { isWrapperApp } from 'src/javascripts/shared/chat/layout-helpers';\nimport CustomerInvitation from './CustomerInvitation';\nimport RoomItem from './RoomItem';\n\ninterface Props extends RouteComponentProps {\n rooms: Room[];\n currentRoom: Room;\n currentUser?: PusherUser;\n users: Users;\n}\n\nexport default function Rooms(props: Props) {\n const { rooms, currentRoom, currentUser, users, history } = props;\n if (!currentUser) {\n return null;\n }\n\n const { directChat } = useMessagesContext();\n\n return (\n
\n
\n {rooms.map(room => (\n history.push(`/direct/${r.id}`)}\n teaser={directChat(room.customer.id).teaser}\n unreadMessages={directChat(room.customer.id).unreadMessageIds.length}\n />\n ))}\n
\n {isWrapperApp() && (\n <>\n {!rooms.length &&
{t('direct.not_ready.no_messages')}
}\n \n {t('customer_invitation.phone_invite')}\n \n \n )}\n {!isWrapperApp() && }\n
\n );\n}\n","import React from 'react';\nimport { RouteComponentProps } from 'react-router-dom';\nimport ChatInput from 'src/javascripts/components/messages/ChatInput';\nimport Messages from 'src/javascripts/components/messages/Messages';\nimport { ChatMessagesContext } from 'src/javascripts/contexts/chatMessagesContext';\nimport DraftService, { DraftedMessage, DraftType } from 'src/javascripts/services/draftService';\nimport { getQuotaMessage, notReady } from 'src/javascripts/services/messageHelpers';\nimport MessagingService from 'src/javascripts/services/messagingService';\nimport { toast } from 'src/javascripts/services/toast';\nimport t from 'src/javascripts/services/translations';\nimport { PlanInformation, PusherUser, Room, Users } from 'src/javascripts/shared/chat';\nimport { isWrapperApp } from 'src/javascripts/shared/chat/layout-helpers';\nimport Rooms from './Rooms';\n\ninterface Props extends RouteComponentProps<{ roomId: string }> {\n currentUser: PusherUser;\n users: Users;\n rooms: Room[];\n reload: () => void;\n planInformation: PlanInformation;\n}\n\ninterface State {\n currentRoom: Room;\n draftedMessage: DraftedMessage;\n}\n\nexport default class DirectChat extends React.Component {\n static contextType = ChatMessagesContext;\n context!: React.ContextType;\n state: State = {\n currentRoom: null,\n draftedMessage: { text: '', image: undefined, visibleOnWidget: undefined },\n };\n draftService = DraftService.new(DraftType.direct);\n\n componentDidMount() {\n return this.initialize({} as Props, {} as State);\n }\n\n componentDidUpdate(prevProps: Props, prevState: State) {\n this.initialize(prevProps, prevState);\n }\n\n initialize(prevProps: Props, prevState: State) {\n const { rooms, match: { params: { roomId } } } = this.props;\n const { currentRoom } = this.state;\n\n if (rooms.length && (!currentRoom || roomId !== prevProps.match.params.roomId)) {\n const newCurrentRoom = rooms.find(room => room.id === roomId) || rooms[0];\n this.setState({ currentRoom: newCurrentRoom });\n }\n\n if (currentRoom && currentRoom !== prevState.currentRoom) {\n const draftedMessage = this.draftService.retrieve(currentRoom.id);\n this.setState({ draftedMessage });\n }\n\n if (currentRoom) {\n this.updateMessageReadCursor();\n }\n }\n\n draftMessage = (text, image, cb?) => {\n this.setState({ draftedMessage: this.draftService.update(this.state.currentRoom.id, { text, image }) }, cb);\n }\n\n submitMessage = async () => {\n const { currentRoom, draftedMessage: { text, image } } = this.state;\n if (text || image) {\n this.draftService.delete(currentRoom.id);\n this.setState({ draftedMessage: this.draftService.emptyDraft });\n try {\n await MessagingService.submitMessage(currentRoom.customer.id, text, image);\n this.props.reload();\n } catch (_e) {\n this.draftMessage(text, image);\n toast('error', 'chat.message.submission_failed');\n }\n }\n }\n\n deleteMessage = async message => {\n try {\n const response = await MessagingService.deleteDirectMessage(message.id);\n if (response.ok) {\n this.context.removeDirectMessage(this.state.currentRoom.customer.id, message.id);\n }\n } catch (_e) {\n toast('error', 'chat.message.deletion_failed');\n }\n }\n\n loadEarlierMessages = async (page: number) => {\n const { id: customerId } = this.state.currentRoom.customer;\n const messages = await MessagingService.fetchDirectMessages({ customerId, page });\n this.context.addDirectConversations({ [customerId]: { messages, unreadMessageIds: [] } });\n return messages;\n }\n\n render() {\n const { currentUser, rooms, users, planInformation } = this.props;\n const { currentRoom, draftedMessage } = this.state;\n\n if (!currentUser || !planInformation) {\n return notReady(t('direct.not_ready.connecting'));\n }\n\n return (\n
\n {!isWrapperApp() && (\n \n )}\n {(!rooms.length && !isWrapperApp()) &&
{t('direct.not_ready.no_messages')}
}\n {currentRoom && (\n <>\n \n = planInformation.totalDirectMessages}\n />\n \n )}\n
\n );\n }\n\n private get currentRoomRecipient(): string {\n return this.state.currentRoom.customer.id;\n }\n\n private updateMessageReadCursor() {\n const { unreadMessageIds, teaser } = this.context.directChat(this.currentRoomRecipient);\n if (unreadMessageIds.length) {\n this.context.markDirectChatAsRead(this.currentRoomRecipient);\n MessagingService.setDirectCursor(teaser.id, this.currentRoomRecipient);\n }\n }\n}\n","import React from 'react';\nimport { Link, RouteComponentProps } from 'react-router-dom';\nimport { isWrapperApp } from 'src/javascripts/shared/chat/layout-helpers';\n\ninterface Props extends RouteComponentProps {\n toggles: Array<[string, string]>;\n}\n\nexport default function MessageToggles({ toggles, location: { pathname } }: Props) {\n return (\n
\n {toggles.map(([path, text], index) => (\n \n {text}\n \n ))}\n
\n );\n}\n","import React from 'react';\nimport { RouteComponentProps } from 'react-router-dom';\nimport { BroadcastCategory } from 'src/javascripts/shared/chat';\nimport { isWrapperApp } from 'src/javascripts/shared/chat/layout-helpers';\n\ninterface Props extends RouteComponentProps<{categoryId: string}> {\n categories: BroadcastCategory[];\n}\n\nexport default function BroadcastChatHeader({ categories, history: { replace: redirect }, match: { params: { categoryId } } }: Props) {\n const category = categories.find(c => c.id === categoryId);\n if (!isWrapperApp() || !category) {\n return null;\n }\n return (\n \n );\n}\n","import React from 'react';\nimport { RouteComponentProps } from 'react-router-dom';\nimport { defaultAvatarForUser } from 'src/javascripts/services/messageHelpers';\nimport { Room, Users } from 'src/javascripts/shared/chat';\nimport { isWrapperApp } from 'src/javascripts/shared/chat/layout-helpers';\n\ninterface Props extends RouteComponentProps<{roomId: string}> {\n users: Users;\n rooms: Room[];\n}\n\nexport default function DirectChatHeader({ users, rooms, history: { replace: redirect }, match: { params: { roomId } } }: Props) {\n const room = rooms.find(r => r.id === roomId) || rooms[0];\n if (!isWrapperApp() || !room) {\n return null;\n }\n const customer = users[room.customer.chatUserId];\n const avatarUrl = defaultAvatarForUser(customer);\n return (\n \n );\n}\n","import React from 'react';\nimport { HashRouter as Router, Redirect, Route, Switch } from 'react-router-dom';\nimport BroadcastChat from 'src/javascripts/components/messages/BroadcastChat';\nimport DirectChat from 'src/javascripts/components/messages/DirectChat';\nimport MessageToggles from 'src/javascripts/components/messages/MessageToggles';\nimport t from 'src/javascripts/services/translations';\nimport { BroadcastCategory, PlanInformation, PusherUser, Room, Users } from 'src/javascripts/shared/chat';\nimport { isWrapperApp } from 'src/javascripts/shared/chat/layout-helpers';\nimport BroadcastCategories from './BroadcastCategories';\nimport BroadcastChatHeader from './BroadcastChatHeader';\nimport CustomerInvitation from './CustomerInvitation';\nimport DirectChatHeader from './DirectChatHeader';\nimport Rooms from './Rooms';\n\ninterface Props {\n currentUser: PusherUser;\n directRooms: Room[];\n users: Users;\n broadcastCategories: BroadcastCategory[];\n loadPlannedMessages: () => void;\n planInformation: PlanInformation;\n loadPlanInformation: () => void;\n}\n\nexport default class MessengerRouter extends React.Component {\n renderDirectChat = props => (\n
\n \n \n
\n )\n\n renderBroadcastChat = props => (\n
\n \n {\n this.props.loadPlannedMessages();\n this.props.loadPlanInformation();\n }}\n />\n
\n )\n\n renderDirect = props => (\n isWrapperApp() ? (\n \n ) : this.renderDirectChat(props)\n )\n\n renderBroadcasts = props => (\n isWrapperApp() ? (\n \n ) : this.renderBroadcastChat(props)\n )\n\n render() {\n return (\n <>\n \n {/* MessageToggles are wrapped in Route, so that it can re-render the className based on the current path\n Exactly match only in a wrapper app, so that the toggles are hidden in the chat view. */ }\n (\n \n )}\n />\n \n \n \n \n \n \n }\n />\n \n \n \n );\n }\n}\n","import React from 'react';\nimport { Subscription } from 'rxjs';\nimport { ChatMessagesContext } from 'src/javascripts/contexts/chatMessagesContext';\nimport { transformPlannedMessagesToConversations } from 'src/javascripts/services/messageHelpers';\nimport MessagingService from 'src/javascripts/services/messagingService';\nimport { sortRoomsByLastActivity } from 'src/javascripts/services/roomHelpers';\nimport { ToastContainer } from 'src/javascripts/services/toast';\nimport {\n BroadcastCategory,\n BroadcastMultipartMessage,\n IChatService,\n MultipartMessage,\n PlanInformation,\n PusherUser,\n Room,\n Users,\n} from 'src/javascripts/shared/chat';\nimport MessengerRouter from './MessengerRouter';\n\ninterface State {\n currentUser: PusherUser;\n directRooms: Room[];\n users: Users;\n broadcastCategories: BroadcastCategory[];\n planInformation?: PlanInformation;\n}\n\ninterface Props {\n chatService: IChatService;\n}\n\nexport default class Messenger extends React.Component {\n static contextType = ChatMessagesContext;\n context!: React.ContextType;\n state: State = {\n currentUser: undefined,\n directRooms: [],\n users: {},\n broadcastCategories: [],\n planInformation: {\n sentBroadcastMessages: 0,\n sentDirectMessages: 0,\n totalBroadcastMessages: 0,\n totalDirectMessages: 0,\n costPerAdditionalBroadcast: 0,\n isVoucherIssuer: false,\n },\n };\n\n subscriptions: Subscription[] = [];\n\n componentDidMount() {\n this.initializeChat();\n }\n\n componentWillUnmount() {\n this.subscriptions.forEach(subscription => subscription.unsubscribe());\n }\n\n async initializeChat() {\n const { chatService } = this.props;\n if (!chatService) {\n return;\n }\n\n this.subscriptions.push(chatService.users.subscribe((users: Users) => this.setState({ users })));\n this.subscriptions.push(chatService.onConnected.subscribe((currentUser: PusherUser) => {\n this.setState({ currentUser: { ...currentUser, id: `shop-${currentUser.id}` } });\n this.subscriptions.push(chatService.sentDirectMessages.subscribe(this.receiveDirectMessage));\n this.subscriptions.push(chatService.removedDirectMessages.subscribe(this.removeDirectMessage));\n this.subscriptions.push(chatService.sentBroadcastMessages.subscribe(this.receiveBroadcastMessage));\n this.subscriptions.push(chatService.removedBroadcastMessages.subscribe(this.removeBroadcastMessage));\n\n MessagingService.fetchBroadcastCategories().then(broadcastCategories => this.setState({ broadcastCategories }));\n MessagingService.fetchHistory().then(history => {\n this.context.addDirectConversations(history.direct);\n this.context.addBroadcastConversations(history.categories);\n this.subscriptions.push(chatService.rooms.subscribe((directRooms: Room[]) => this.setDirectRooms(directRooms)));\n });\n this.loadPlannedMessages();\n }));\n this.loadPlanInformation();\n }\n\n loadPlannedMessages = () => {\n MessagingService.fetchPlannedBroadcastMessages().then(plannedBroadcastMessages => {\n this.context.addBroadcastConversations(transformPlannedMessagesToConversations(plannedBroadcastMessages));\n });\n }\n\n loadPlanInformation = () => {\n MessagingService.fetchPlanInformation().then((planInformation) => this.setState({ planInformation }));\n }\n\n receiveDirectMessage = (message: MultipartMessage) => {\n this.context.addDirectConversations({\n [message.room.customerId]: {\n messages: [message],\n unreadMessageIds: [message.id],\n },\n });\n this.setDirectRooms(this.state.directRooms);\n }\n\n removeDirectMessage = (message: MultipartMessage) => {\n this.context.removeDirectMessage(message.room.customerId, message.id);\n }\n\n receiveBroadcastMessage = (message: BroadcastMultipartMessage) => {\n this.context.addBroadcastConversations({\n [message.category.id]: {\n messages: [message],\n unreadMessageIds: [message.id],\n },\n });\n }\n\n removeBroadcastMessage = (message: BroadcastMultipartMessage) => {\n this.context.removeBroadcastMessage(message.category.id, message.id);\n }\n\n setDirectRooms = (directRooms: Room[]) => {\n this.setState({ directRooms: sortRoomsByLastActivity(this.context.directChat, directRooms) });\n }\n\n render() {\n const { currentUser, broadcastCategories, directRooms, users, planInformation } = this.state;\n\n return (\n
\n \n \n
\n );\n }\n}\n","import { sortBy, uniq, uniqWith } from 'lodash';\nimport React, { Component, useContext } from 'react';\nimport { selectTeaser, transformToChatMessages, uniqMessageComparator } from 'src/javascripts/services/messageHelpers';\nimport { ChatMessage, Conversations } from 'src/javascripts/shared/chat';\n\ntype SupportMessageTypes = 'direct' | 'broadcast';\n\ninterface State {\n direct: {\n [customerId: string]: {\n messages: ChatMessage[],\n unreadMessageIds: string[],\n teaser?: ChatMessage,\n },\n };\n broadcast: {\n [categoryId: string]: {\n messages: ChatMessage[],\n unreadMessageIds: string[],\n teaser?: ChatMessage,\n },\n };\n}\n\nexport interface ChatMessagesContextValue {\n directChat: (customerId: string) => State['direct']['customerId'];\n broadcastChat: (categoryId: string) => State['broadcast']['categoryId'];\n addDirectConversations: (conversations: Conversations) => void;\n addBroadcastConversations: (conversations: Conversations) => void;\n markDirectChatAsRead: (customerId: string) => void;\n markBroadcastChatAsRead: (categoryId: string) => void;\n removeDirectMessage: (customerId: string, messageId: string) => void;\n removeBroadcastMessage: (categoryId: string, messageId: string) => void;\n}\n\nexport const ChatMessagesContext = React.createContext(null);\n\nexport const useMessagesContext = () => useContext(ChatMessagesContext);\n\nexport default class ChatMessagesProvider extends Component {\n state: State = {\n direct: {},\n broadcast: {},\n };\n\n get value(): ChatMessagesContextValue {\n return {\n directChat: this.access('direct'),\n broadcastChat: this.access('broadcast'),\n addDirectConversations: this.addConversations('direct'),\n addBroadcastConversations: this.addConversations('broadcast'),\n markDirectChatAsRead: this.markChatAsRead('direct'),\n markBroadcastChatAsRead: this.markChatAsRead('broadcast'),\n removeDirectMessage: this.removeChatMessage('direct'),\n removeBroadcastMessage: this.removeChatMessage('broadcast'),\n };\n }\n\n render() {\n return {this.props.children};\n }\n\n private addConversations = (key: SupportMessageTypes) => (conversations: Conversations) => {\n const chat = { ...this.state[key] };\n Object.entries(conversations).forEach(([id, conversation]) => {\n const { messages: oldMessages, unreadMessageIds: oldUnreadMessageIds } = this.access(key)(id);\n const newMessages = transformToChatMessages(conversation.messages);\n const messages = sortBy(uniqWith([...newMessages, ...oldMessages], uniqMessageComparator), ['createdAt']);\n const unreadMessageIds = uniq([...conversation.unreadMessageIds, ...oldUnreadMessageIds]);\n\n chat[id] = { messages, unreadMessageIds, teaser: selectTeaser(messages) };\n });\n\n this.setState({ ...this.state, [key]: chat });\n }\n\n private markChatAsRead = (key: SupportMessageTypes) => (id: string) => {\n const { messages, teaser } = this.access(key)(id);\n this.setState({\n ...this.state, [key]: {\n ...this.state[key],\n [id]: { messages, unreadMessageIds: [], teaser },\n },\n });\n }\n\n private access = (key: SupportMessageTypes) => (id: string) => {\n return this.state[key][id] || { messages: [], unreadMessageIds: [] };\n }\n\n private removeChatMessage = (key: SupportMessageTypes) => (id: string, messageId: string) => {\n const { messages: oldMessages, unreadMessageIds: oldUnreadMessageIds } = this.access(key)(id);\n const messages = oldMessages.filter(({ id }) => id !== messageId);\n const unreadMessageIds = oldUnreadMessageIds.filter((id) => id !== messageId);\n\n this.setState({\n ...this.state, [key]: {\n ...this.state[key],\n [id]: { messages, unreadMessageIds, teaser: selectTeaser(messages) },\n },\n });\n }\n}\n","import moment from 'moment';\nimport React from 'react';\nimport t from 'src/javascripts/services/translations';\nimport {\n ChatMessage,\n ChatUser,\n Conversations,\n InlineMessagePart,\n MultipartMessage,\n MultipartPlannedBroadcastChatMessage,\n MultipartPlannedBroadcastChatMessagePerCategory,\n PlannedBroadcastChatMessage,\n UrlMessagePart,\n} from 'src/javascripts/shared/chat';\n\ntype AnyMessage = ChatMessage | PlannedBroadcastChatMessage;\n\nexport interface TransformableMessage extends Partial, Partial {\n}\n\nexport function transformToChatMessage(multipartMessage: TransformableMessage): T {\n const textParts = multipartMessage.parts.filter(part =>\n part.partType === 'inline' && part.payload.type === 'text/plain');\n\n const textPart = textParts[0] as InlineMessagePart;\n const quotedTextPart = (textParts.length > 1) ? textParts[1] as InlineMessagePart : undefined;\n\n const imagePart = multipartMessage.parts.find(part => part.partType === 'url') as UrlMessagePart;\n\n const text = textPart ? textPart.payload.content : '';\n const quote = quotedTextPart ? quotedTextPart.payload.content : '';\n const image = imagePart ? imagePart.payload.url : undefined;\n\n const { id, createdAt, sender, room, planned, plannedId, referencedCouponId } = multipartMessage;\n return { id, createdAt, sender, room, text, quote, image, planned, plannedId, referencedCouponId } as any;\n}\n\nexport function transformToChatMessages(multipartMessages: TransformableMessage[]) {\n return multipartMessages.map((multipartMessage) => transformToChatMessage(multipartMessage));\n}\n\nexport function transformPlannedMessagesToConversations(plannedMessages: MultipartPlannedBroadcastChatMessagePerCategory): Conversations {\n return Object.entries(plannedMessages).reduce(((conversations, [key, messages]) => {\n conversations[key] = { messages, unreadMessageIds: [] };\n return conversations;\n }), {});\n}\n\nexport function formatDate(time: string | Date) {\n moment.locale('de-ch');\n return moment(time).format('Do MMM HH:mm');\n}\n\nexport function defaultAvatarForUser(user: ChatUser) {\n return (user && user.avatar && user.avatar.thumb.url) || window.CityMessenger.avatarFallbackImage;\n}\n\nexport function notReady(message: string) {\n return (\n
\n
\n
{message}
\n
\n
\n );\n}\n\nexport const getQuotaMessage = (sentMessages: number, totalMessages: number, scope: 'bc' | 'dm') => {\n if (scope === 'bc' && totalMessages === 0) {\n return null;\n }\n\n if (totalMessages !== Infinity) {\n return `${sentMessages} / ${totalMessages} ${t(`chat.quota.${scope}`)}`;\n } else {\n return '';\n }\n};\n\nexport const selectTeaser = (messages: ChatMessage[]) => {\n for (let index = messages.length - 1; index >= 0; index--) {\n if (!isPlanned(messages[index]) || isSending(messages[index])) {\n return messages[index];\n }\n }\n};\n\nexport const isPlanned = (message: AnyMessage) => {\n return (message as PlannedBroadcastChatMessage).planned;\n};\n\nexport const isSending = (message: AnyMessage) => {\n return isPlanned(message) && Date.parse((message as any).createdAt) < Date.now();\n};\n\nexport const uniqMessageComparator = (message: AnyMessage, otherMessage: AnyMessage): boolean => {\n return message.id === otherMessage.id || (\n (message as PlannedBroadcastChatMessage).plannedId && (message as PlannedBroadcastChatMessage).plannedId === otherMessage.id\n ) || (\n (otherMessage as PlannedBroadcastChatMessage).plannedId && (otherMessage as PlannedBroadcastChatMessage).plannedId === message.id\n );\n};\n","import React from 'react';\nimport { toast as _toast, ToastContainer as _ToastContainer, TypeOptions } from 'react-toastify';\nimport t from 'src/javascripts/services/translations';\n\nexport const toast = (type: TypeOptions, translationKey: string) => {\n const icons = {\n error: 'exclamation-circle',\n warning: 'exclamation-triangle',\n success: 'check-circle',\n info: 'info-circle',\n default: 'info-circle',\n };\n\n _toast(\n (\n <>\n \n
{t(`${translationKey}.title`)}
\n
{t(`${translationKey}.description`)}
\n \n ),\n { type },\n );\n};\n\nexport const CloseButton = ({ closeToast }) => ;\n\nexport const ToastContainer = () => (\n <_ToastContainer\n position=\"bottom-left\"\n autoClose={false}\n newestOnTop={true}\n closeButton={}\n />\n);\n","import { BehaviorSubject, ReplaySubject, Subject } from 'rxjs';\nimport { BroadcastMultipartMessage, Channel, MultipartMessage, PusherUser, Room, Users } from './interfaces';\n\nexport class BaseChatService {\n protected sentDirectMessagesSubject: Subject;\n protected removedDirectMessagesSubject: Subject;\n protected sentBroadcastMessagesSubject: Subject;\n protected removedBroadcastMessagesSubject: Subject;\n protected unarchivedChannelsSubject: Subject;\n protected roomsSubject: BehaviorSubject;\n protected connectedSubject: ReplaySubject;\n protected usersSubject: ReplaySubject;\n\n constructor() {\n this.sentDirectMessagesSubject = new Subject();\n this.removedDirectMessagesSubject = new Subject();\n this.sentBroadcastMessagesSubject = new Subject();\n this.removedBroadcastMessagesSubject = new Subject();\n this.unarchivedChannelsSubject = new Subject();\n this.roomsSubject = new BehaviorSubject([]);\n this.usersSubject = new ReplaySubject(1);\n this.connectedSubject = new ReplaySubject(1);\n }\n\n get sentDirectMessages() {\n return this.sentDirectMessagesSubject.asObservable();\n }\n\n get removedDirectMessages() {\n return this.removedDirectMessagesSubject.asObservable();\n }\n\n get sentBroadcastMessages() {\n return this.sentBroadcastMessagesSubject.asObservable();\n }\n\n get removedBroadcastMessages() {\n return this.removedBroadcastMessagesSubject.asObservable();\n }\n\n get unarchivedChannels() {\n return this.unarchivedChannelsSubject.asObservable();\n }\n\n get rooms() {\n return this.roomsSubject.asObservable();\n }\n\n get onConnected() {\n return this.connectedSubject.asObservable();\n }\n\n get users() {\n return this.usersSubject.asObservable();\n }\n}\n","import { deserialize } from '../services/serialization';\nimport { BaseChatService } from './base-chat-service';\nimport { BroadcastMultipartMessage, Channel, ChatUser, IChatService, MultipartMessage, PusherUser, PusherUserInfo, Room, Users } from './interfaces';\n\nexport const PAGE_SIZE = 20;\nexport const PRESENCE_CHANNEL = 'presence-citymessenger';\nexport const BROADCASTS_CHANNEL = 'private-broadcasts';\nexport const PEER_TO_PEER_CHANNEL = 'private-peer-to-peer';\nexport const DIRECT_CHANNEL_PREFIX = 'private-direct-';\nexport enum EVENTS {\n newMessage = 'new_message',\n messageDeleted = 'message_deleted',\n roomBlocked = 'room_blocked',\n roomUnblocked = 'room_unblocked',\n customerUpdate = 'customer_update',\n shopUpdate = 'shop_update',\n favouriteAdded = 'favourite_added',\n favouriteRemoved = 'favourite_removed',\n channelUnarchived = 'channel_unarchived',\n}\n\ninterface AdditionalHeaders {\n [key: string]: string;\n}\n\nexport class PusherChatService extends BaseChatService implements IChatService {\n pusher: Pusher.Pusher;\n user?: PusherUser;\n usersCache: Users = {};\n roomsCache: Room[] = [];\n presence: { [id: string]: boolean } = {};\n isConnecting: boolean = false;\n presenceChannel?: Pusher.Channel;\n connectionRejection?: (reason: string) => void;\n\n constructor(\n pusherKlass: any,\n private apiNamespace: string,\n tokenProviderUrl: string,\n channelsInstanceId: string,\n private token: string,\n private additionalHeaders: AdditionalHeaders = {},\n ) {\n super();\n this.pusher = new pusherKlass(channelsInstanceId, {\n cluster: 'eu',\n forceTLS: true,\n authEndpoint: tokenProviderUrl,\n auth: {\n headers: {\n Authorization: token,\n ...additionalHeaders,\n },\n },\n });\n }\n\n connect = () => {\n if (this.isConnecting) {\n return Promise.reject('connecting');\n }\n this.isConnecting = true;\n this.pusher.connect();\n this.presenceChannel = this.pusher.subscribe(PRESENCE_CHANNEL);\n return new Promise((resolve, reject) => {\n this.connectionRejection = (reason: string) => reject(reason);\n const timeoutHandle = setTimeout(() => this.connectionRejection!('timeout'), 20000);\n this.presenceChannel!.bind('pusher:subscription_succeeded', async (data: { me: PusherUser, members: PusherUserInfo[] }) => {\n this.user = data.me;\n await this.subscribeToChannels();\n await Promise.all([this.fetchRooms(), this.fetchUsers()]);\n Object.values(data.members).forEach((memberInfo: PusherUserInfo) => this.presence[memberInfo.chatUserId] = true);\n this.isConnecting = false;\n this.connectedSubject.next(this.user);\n clearTimeout(timeoutHandle);\n resolve(this.user);\n });\n\n this.presenceChannel!.bind('pusher:subscription_error', (data: unknown) => {\n this.user = undefined;\n this.connectedSubject.next(this.user);\n this.isConnecting = false;\n clearTimeout(timeoutHandle);\n reject(data);\n });\n\n this.presenceChannel!.bind('pusher:member_added', (member: Pusher.Member) => {\n this.presence[member.info.chatUserId] = true;\n });\n this.presenceChannel!.bind('pusher:member_removed', (member: Pusher.Member) => {\n delete this.presence[member.info.chatUserId];\n });\n });\n }\n\n disconnect = () => {\n if (this.presenceChannel) {\n this.presenceChannel.unbind();\n }\n this.pusher.unsubscribe(PRESENCE_CHANNEL);\n this.pusher.unsubscribe(BROADCASTS_CHANNEL);\n if (this.connectionRejection) {\n this.connectionRejection('disconnected');\n }\n if (this.user) {\n this.pusher.unsubscribe(this.directChannelName());\n }\n this.isConnecting = false;\n this.user = undefined;\n this.pusher.disconnect();\n return Promise.resolve();\n }\n\n subscribeToChannels = async () => {\n // TODO: Handle connection errors\n const directChannel = this.pusher.subscribe(this.directChannelName());\n directChannel.bind(EVENTS.roomBlocked, this.toggleRoom('blocked', true));\n directChannel.bind(EVENTS.roomUnblocked, this.toggleRoom('blocked', false));\n directChannel.bind(EVENTS.favouriteAdded, this.toggleRoom('favourite', true));\n directChannel.bind(EVENTS.favouriteRemoved, this.toggleRoom('favourite', false));\n directChannel.bind(EVENTS.newMessage, (message: MultipartMessage) => {\n this.sentDirectMessagesSubject.next(message);\n if (!this.usersCache[message.sender.chatUserId]) {\n this.fetchRooms();\n this.fetchUsers();\n }\n });\n directChannel.bind(EVENTS.messageDeleted, (message: MultipartMessage) => {\n this.removedDirectMessagesSubject.next(message);\n });\n directChannel.bind(EVENTS.channelUnarchived, (channel: Channel) => this.unarchivedChannelsSubject.next(channel));\n\n const peerToPeerChannel = this.pusher.subscribe(PEER_TO_PEER_CHANNEL);\n peerToPeerChannel.bind(EVENTS.newMessage, (message: MultipartMessage) => {\n directChannel.emit(EVENTS.newMessage, message);\n });\n peerToPeerChannel.bind(EVENTS.messageDeleted, (message: MultipartMessage) => {\n directChannel.emit(EVENTS.messageDeleted, message);\n });\n\n const broadcastChannel = this.pusher.subscribe(BROADCASTS_CHANNEL);\n broadcastChannel.bind(EVENTS.newMessage, (message: BroadcastMultipartMessage) => this.sentBroadcastMessagesSubject.next(message));\n broadcastChannel.bind(EVENTS.customerUpdate, this.updateUser('customer'));\n broadcastChannel.bind(EVENTS.shopUpdate, this.updateUser('shop'));\n broadcastChannel.bind(EVENTS.messageDeleted, (message: BroadcastMultipartMessage) => {\n this.removedBroadcastMessagesSubject.next(message);\n });\n }\n\n private updateUser = (userType: string) => {\n return async ({ id }: { id: string }) => {\n const chatUserId = `${userType}-${id}`;\n const outdatedUser = this.usersCache[chatUserId];\n\n if (outdatedUser) {\n const updatedUser: ChatUser = await this.fetchData(`chat_users/find?${userType}_id=${id}`);\n this.usersCache[updatedUser.chatUserId] = { ...outdatedUser, ...updatedUser };\n this.usersSubject.next(this.usersCache);\n }\n };\n }\n\n private toggleRoom = (attribute: 'favourite' | 'blocked', value: boolean) => {\n return (data: { customer: string; }) => {\n const room = this.roomsCache.find(r => r.customer.id === data.customer);\n if (room) {\n room[attribute] = value;\n this.roomsSubject.next(this.roomsCache);\n }\n };\n }\n\n private directChannelName = () => {\n return `${DIRECT_CHANNEL_PREFIX}${this.user!.info.chatUserId}`;\n }\n\n private fetchRooms = async () => {\n this.roomsCache = await this.fetchData('rooms');\n this.roomsSubject.next(this.roomsCache);\n return this.roomsCache;\n }\n\n private fetchUsers = async () => {\n const users = await this.fetchData('chat_users');\n this.cacheUsers(users);\n return users;\n }\n\n private extendWithPresence = (user: ChatUser) => {\n user.presence = { state: 'offline' };\n Object.defineProperty(user.presence, 'state', {\n get: () => this.presence[user.chatUserId] && 'online' || 'offline',\n configurable: true,\n });\n return user;\n }\n\n private cacheUsers = (users: ChatUser[]) => {\n users.forEach(user => this.usersCache[user.chatUserId] = this.extendWithPresence(user));\n this.usersSubject.next(this.usersCache);\n }\n\n private fetchData = async (endpoint: string) => {\n const data = await fetch(`${this.apiNamespace}/${endpoint}`, {\n method: 'get',\n headers: { 'Authorization': this.token, 'Content-Type': 'application/json', ...this.additionalHeaders },\n }).then(response => response.json());\n return deserialize(data);\n }\n}\n","import React from 'react';\nimport { hoistStatics } from 'recompose';\nimport { IChatService } from './interfaces';\n\nexport const ChatContext = React.createContext(undefined);\n\nconst chatEnhancer = (ChildComponent: React.ComponentType) => (props: any) => {\n return (\n \n {chatService => }\n \n );\n};\n\n// TODO: How to type this?\nexport const withChatContext = hoistStatics(chatEnhancer as any);\n","import { ChatMessageSender, ChatUser, MessageSender, Users } from './interfaces';\n\nexport const convertChatId = (id: string) => id.replace('customer-', '').replace('shop-', '');\n\nexport const getChatMessageSender = (sender: MessageSender, users: Users) => {\n const user = users && users[sender.chatUserId];\n if (user) {\n return transformChatMessageSender(user);\n }\n return sender;\n};\n\nexport const transformChatMessageSender = (user?: ChatUser): ChatMessageSender | undefined => {\n if (user) {\n return { ...user, id: user.chatUserId, avatarUrl: user.avatar && user.avatar.thumb.url || null };\n }\n};\n","import { Deserializer as JSONApiDeserializer, Serializer as JSONApiSerializer } from 'ts-jsonapi';\n\nfunction couldBeDate(dateString: string) {\n return !!dateString.match(/^\\d\\d\\d\\d-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\d\\.\\d\\d\\dZ$/);\n}\n\nfunction deserializeDatesInplace(obj: any) {\n if (!obj) {\n return;\n }\n Object.getOwnPropertyNames(obj).concat(Object.getOwnPropertySymbols(obj) as any).forEach(key => {\n if (typeof obj[key] === 'object') {\n deserializeDatesInplace(obj[key]);\n }\n if (typeof obj[key] === 'string' && couldBeDate(obj[key])) {\n obj[key] = new Date(obj[key]);\n }\n });\n}\n\nexport function deserialize(data: any) {\n const deserialized = new JSONApiDeserializer({ keyForAttribute: 'camelCase' }).deserialize(data);\n deserializeDatesInplace(deserialized);\n return deserialized;\n}\n\nexport function serialize(resourceName: string, attributes: string[], data: any) {\n const serialized = new JSONApiSerializer(resourceName, { id: 'id', keyForAttribute: 'camelCase', attributes }).serialize(data);\n if (serialized.data.id === 'undefined') {\n delete serialized.data.id;\n }\n return serialized;\n}\n\nexport function serializeData(resourceName: string, data: any) {\n return serialize(resourceName, Object.keys(data), data);\n}\n","var map = {\n\t\"./af\": 2786,\n\t\"./af.js\": 2786,\n\t\"./ar\": 867,\n\t\"./ar-dz\": 4130,\n\t\"./ar-dz.js\": 4130,\n\t\"./ar-kw\": 6135,\n\t\"./ar-kw.js\": 6135,\n\t\"./ar-ly\": 6440,\n\t\"./ar-ly.js\": 6440,\n\t\"./ar-ma\": 7702,\n\t\"./ar-ma.js\": 7702,\n\t\"./ar-sa\": 6040,\n\t\"./ar-sa.js\": 6040,\n\t\"./ar-tn\": 7100,\n\t\"./ar-tn.js\": 7100,\n\t\"./ar.js\": 867,\n\t\"./az\": 1083,\n\t\"./az.js\": 1083,\n\t\"./be\": 9808,\n\t\"./be.js\": 9808,\n\t\"./bg\": 8338,\n\t\"./bg.js\": 8338,\n\t\"./bm\": 7438,\n\t\"./bm.js\": 7438,\n\t\"./bn\": 8905,\n\t\"./bn-bd\": 6225,\n\t\"./bn-bd.js\": 6225,\n\t\"./bn.js\": 8905,\n\t\"./bo\": 1560,\n\t\"./bo.js\": 1560,\n\t\"./br\": 1278,\n\t\"./br.js\": 1278,\n\t\"./bs\": 622,\n\t\"./bs.js\": 622,\n\t\"./ca\": 2468,\n\t\"./ca.js\": 2468,\n\t\"./cs\": 5822,\n\t\"./cs.js\": 5822,\n\t\"./cv\": 877,\n\t\"./cv.js\": 877,\n\t\"./cy\": 7373,\n\t\"./cy.js\": 7373,\n\t\"./da\": 4780,\n\t\"./da.js\": 4780,\n\t\"./de\": 9740,\n\t\"./de-at\": 217,\n\t\"./de-at.js\": 217,\n\t\"./de-ch\": 894,\n\t\"./de-ch.js\": 894,\n\t\"./de.js\": 9740,\n\t\"./dv\": 5300,\n\t\"./dv.js\": 5300,\n\t\"./el\": 837,\n\t\"./el.js\": 837,\n\t\"./en-au\": 8348,\n\t\"./en-au.js\": 8348,\n\t\"./en-ca\": 7925,\n\t\"./en-ca.js\": 7925,\n\t\"./en-gb\": 2243,\n\t\"./en-gb.js\": 2243,\n\t\"./en-ie\": 6436,\n\t\"./en-ie.js\": 6436,\n\t\"./en-il\": 7207,\n\t\"./en-il.js\": 7207,\n\t\"./en-in\": 4175,\n\t\"./en-in.js\": 4175,\n\t\"./en-nz\": 6319,\n\t\"./en-nz.js\": 6319,\n\t\"./en-sg\": 1662,\n\t\"./en-sg.js\": 1662,\n\t\"./eo\": 2915,\n\t\"./eo.js\": 2915,\n\t\"./es\": 5655,\n\t\"./es-do\": 5251,\n\t\"./es-do.js\": 5251,\n\t\"./es-mx\": 6112,\n\t\"./es-mx.js\": 6112,\n\t\"./es-us\": 1146,\n\t\"./es-us.js\": 1146,\n\t\"./es.js\": 5655,\n\t\"./et\": 5603,\n\t\"./et.js\": 5603,\n\t\"./eu\": 7763,\n\t\"./eu.js\": 7763,\n\t\"./fa\": 6959,\n\t\"./fa.js\": 6959,\n\t\"./fi\": 1897,\n\t\"./fi.js\": 1897,\n\t\"./fil\": 2549,\n\t\"./fil.js\": 2549,\n\t\"./fo\": 4694,\n\t\"./fo.js\": 4694,\n\t\"./fr\": 4470,\n\t\"./fr-ca\": 3049,\n\t\"./fr-ca.js\": 3049,\n\t\"./fr-ch\": 2330,\n\t\"./fr-ch.js\": 2330,\n\t\"./fr.js\": 4470,\n\t\"./fy\": 5044,\n\t\"./fy.js\": 5044,\n\t\"./ga\": 9295,\n\t\"./ga.js\": 9295,\n\t\"./gd\": 2101,\n\t\"./gd.js\": 2101,\n\t\"./gl\": 8794,\n\t\"./gl.js\": 8794,\n\t\"./gom-deva\": 7884,\n\t\"./gom-deva.js\": 7884,\n\t\"./gom-latn\": 3168,\n\t\"./gom-latn.js\": 3168,\n\t\"./gu\": 5349,\n\t\"./gu.js\": 5349,\n\t\"./he\": 4206,\n\t\"./he.js\": 4206,\n\t\"./hi\": 94,\n\t\"./hi.js\": 94,\n\t\"./hr\": 316,\n\t\"./hr.js\": 316,\n\t\"./hu\": 2138,\n\t\"./hu.js\": 2138,\n\t\"./hy-am\": 1423,\n\t\"./hy-am.js\": 1423,\n\t\"./id\": 9218,\n\t\"./id.js\": 9218,\n\t\"./is\": 135,\n\t\"./is.js\": 135,\n\t\"./it\": 626,\n\t\"./it-ch\": 150,\n\t\"./it-ch.js\": 150,\n\t\"./it.js\": 626,\n\t\"./ja\": 9183,\n\t\"./ja.js\": 9183,\n\t\"./jv\": 4286,\n\t\"./jv.js\": 4286,\n\t\"./ka\": 2105,\n\t\"./ka.js\": 2105,\n\t\"./kk\": 7772,\n\t\"./kk.js\": 7772,\n\t\"./km\": 8758,\n\t\"./km.js\": 8758,\n\t\"./kn\": 9282,\n\t\"./kn.js\": 9282,\n\t\"./ko\": 3730,\n\t\"./ko.js\": 3730,\n\t\"./ku\": 1408,\n\t\"./ku.js\": 1408,\n\t\"./ky\": 3291,\n\t\"./ky.js\": 3291,\n\t\"./lb\": 6841,\n\t\"./lb.js\": 6841,\n\t\"./lo\": 5466,\n\t\"./lo.js\": 5466,\n\t\"./lt\": 7010,\n\t\"./lt.js\": 7010,\n\t\"./lv\": 7595,\n\t\"./lv.js\": 7595,\n\t\"./me\": 9861,\n\t\"./me.js\": 9861,\n\t\"./mi\": 5493,\n\t\"./mi.js\": 5493,\n\t\"./mk\": 5966,\n\t\"./mk.js\": 5966,\n\t\"./ml\": 7341,\n\t\"./ml.js\": 7341,\n\t\"./mn\": 5115,\n\t\"./mn.js\": 5115,\n\t\"./mr\": 370,\n\t\"./mr.js\": 370,\n\t\"./ms\": 9847,\n\t\"./ms-my\": 1237,\n\t\"./ms-my.js\": 1237,\n\t\"./ms.js\": 9847,\n\t\"./mt\": 2126,\n\t\"./mt.js\": 2126,\n\t\"./my\": 6165,\n\t\"./my.js\": 6165,\n\t\"./nb\": 4924,\n\t\"./nb.js\": 4924,\n\t\"./ne\": 6744,\n\t\"./ne.js\": 6744,\n\t\"./nl\": 3901,\n\t\"./nl-be\": 9814,\n\t\"./nl-be.js\": 9814,\n\t\"./nl.js\": 3901,\n\t\"./nn\": 3877,\n\t\"./nn.js\": 3877,\n\t\"./oc-lnc\": 2135,\n\t\"./oc-lnc.js\": 2135,\n\t\"./pa-in\": 5858,\n\t\"./pa-in.js\": 5858,\n\t\"./pl\": 4495,\n\t\"./pl.js\": 4495,\n\t\"./pt\": 9520,\n\t\"./pt-br\": 7971,\n\t\"./pt-br.js\": 7971,\n\t\"./pt.js\": 9520,\n\t\"./ro\": 6459,\n\t\"./ro.js\": 6459,\n\t\"./ru\": 1793,\n\t\"./ru.js\": 1793,\n\t\"./sd\": 950,\n\t\"./sd.js\": 950,\n\t\"./se\": 7930,\n\t\"./se.js\": 7930,\n\t\"./si\": 124,\n\t\"./si.js\": 124,\n\t\"./sk\": 4249,\n\t\"./sk.js\": 4249,\n\t\"./sl\": 4985,\n\t\"./sl.js\": 4985,\n\t\"./sq\": 1104,\n\t\"./sq.js\": 1104,\n\t\"./sr\": 9131,\n\t\"./sr-cyrl\": 9915,\n\t\"./sr-cyrl.js\": 9915,\n\t\"./sr.js\": 9131,\n\t\"./ss\": 5893,\n\t\"./ss.js\": 5893,\n\t\"./sv\": 8760,\n\t\"./sv.js\": 8760,\n\t\"./sw\": 1172,\n\t\"./sw.js\": 1172,\n\t\"./ta\": 7333,\n\t\"./ta.js\": 7333,\n\t\"./te\": 3110,\n\t\"./te.js\": 3110,\n\t\"./tet\": 2095,\n\t\"./tet.js\": 2095,\n\t\"./tg\": 7321,\n\t\"./tg.js\": 7321,\n\t\"./th\": 9041,\n\t\"./th.js\": 9041,\n\t\"./tk\": 9005,\n\t\"./tk.js\": 9005,\n\t\"./tl-ph\": 5768,\n\t\"./tl-ph.js\": 5768,\n\t\"./tlh\": 9444,\n\t\"./tlh.js\": 9444,\n\t\"./tr\": 2397,\n\t\"./tr.js\": 2397,\n\t\"./tzl\": 8254,\n\t\"./tzl.js\": 8254,\n\t\"./tzm\": 1106,\n\t\"./tzm-latn\": 699,\n\t\"./tzm-latn.js\": 699,\n\t\"./tzm.js\": 1106,\n\t\"./ug-cn\": 9288,\n\t\"./ug-cn.js\": 9288,\n\t\"./uk\": 7691,\n\t\"./uk.js\": 7691,\n\t\"./ur\": 3795,\n\t\"./ur.js\": 3795,\n\t\"./uz\": 6791,\n\t\"./uz-latn\": 588,\n\t\"./uz-latn.js\": 588,\n\t\"./uz.js\": 6791,\n\t\"./vi\": 9822,\n\t\"./vi.js\": 9822,\n\t\"./x-pseudo\": 4378,\n\t\"./x-pseudo.js\": 4378,\n\t\"./yo\": 5805,\n\t\"./yo.js\": 5805,\n\t\"./zh-cn\": 3839,\n\t\"./zh-cn.js\": 3839,\n\t\"./zh-hk\": 5726,\n\t\"./zh-hk.js\": 5726,\n\t\"./zh-mo\": 9807,\n\t\"./zh-mo.js\": 9807,\n\t\"./zh-tw\": 4152,\n\t\"./zh-tw.js\": 4152\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 6700;"],"names":["ApiService","input","init","contentType","headers","Authorization","window","CityMessenger","chatConfig","token","Promise","resolve","reject","fetch","method","then","response","ok","MessagingService","customerId","text","image","parts","type","content","body","objectToFormData","serialize","append","json","data","broadcastCategoryId","scheduledFor","visibleOnWidget","referencedCouponId","broadcast_message","broadcast_category_id","scheduled_for","visible_on_widget","referenced_coupon_id","message_image","id","locale","categories","map","attributes","name","icon","handleInfinity","information","Infinity","planInformation","position","categoryId","JSON","stringify","page","sortRoomsByLastActivity","directChat","rooms","sort","room1","room2","extractTime","room","Date","customer","teaser","createdAt","getTime","BroadcastPlanInput","draftedMessage","submitType","date","setDraftDate","setDraftSubmitType","yesterday","moment","subtract","setDate","newDate","format","className","checked","BroadCastSubmitType","plan","onChange","newSubmitType","send","htmlFor","t","value","timeFormat","dateFormat","isValidDate","current","isAfter","BroadcastVisibleOnWidgetCheckbox","setVisibleOnWidget","useLayoutEffect","tooltips","$","tooltip","href","userChatId","substring","length","title","AppendToBody","props","element","document","createElement","this","appendChild","removeChild","ReactDOM","children","getElementsByTagName","React","BroadcastReferencesCouponSelection","setReferencedCouponId","showModal","setShowModal","coupons","setCoupons","deserialize","onClick","tabIndex","role","event","target","coupon","key","undefined","disabled","isWrapperApp","item","includes","ChatInput","submitMessage","isBlocked","draftMessage","isQuotaReached","isVoucherIssuer","useState","emojiPickerVisible","setEmojiPickerVisible","inputCursorPosition","setInputCursorPosition","useEffect","addEventListener","closeEmojiPickerHandler","removeEventListener","keyCode","preventDefault","updateCursorPosition","nativeEvent","selectionStart","submitImage","selectedImage","url","toast","src","onSelect","emoji","newText","showPreview","showSkinTones","emojiSize","native","autoFocus","accept","files","hidden","placeholder","onKeyDown","ctrlKey","metaKey","onBlur","onKeyUp","maxRows","MessageType","refreshing","isAtBottom","isOnTop","scrollFromBottom","DraftType","ImageWithLightbox","open","img","onload","onLoad","complete","setState","state","closeOnEsc","PinchZoom","querySelector","ref","fixOnLoad","Message","currentUserId","message","actions","imgLoaded","deleteAction","users","sentOrReceived","sender","chatUserId","Sent","Received","isPlanned","Planned","isSending","Sending","defaultAvatarForUser","index","cb","confirm","quote","Linkify","properties","rel","formatDate","Messages","messages","loadEarlierMessages","recipient","quotaMessage","scroll","chatRef","scrollHeight","scrollTop","useRef","handleScroll","clientHeight","Math","abs","scrollFn","throttle","dangerouslySetInnerHTML","__html","ConfirmDialog","cancel","confirmText","cancelText","getText","scope","cache","DraftService","parse","localStorage","getItem","emptyDraft","setItem","attributesToUpdate","retrieve","save","removeItem","broadcast","BroadcastCategoryItem","category","currentCategoryId","setCurrentCategoryId","unreadMessages","activeClass","join","BroadcastCategories","broadcastCategories","history","broadcastChat","useMessagesContext","push","unreadMessageIds","BroadcastChat","showStarter","draftService","update","confirmSubmitMessage","submitBroadcastMessage","reload","setDraftMessage","console","error","errorJson","errors","resolveConfirmSubmitMessage","confirmed","oldDraftedMessage","deleteMessage","errorHandler","deleteBroadcastMessage","context","removeBroadcastMessage","fetchBroadcastMessages","addBroadcastConversations","initialize","prevProps","prevState","match","params","find","c","updateMessageReadCursor","currentUser","notReady","sentBroadcastMessages","totalBroadcastMessages","isMessageInThisMonth","isSame","editMessage","getQuotaMessage","time","currentCategoryName","cost","costPerAdditionalBroadcast","markBroadcastChatAsRead","setBroadcastCursor","ChatMessagesContext","InvitationModal","file","setFile","setConfirmed","smsTemplate","action","encType","csrfToken","required","onInput","currentTarget","CustomerInvitation","showHeader","redirect","replace","invitationModalOpen","setInvitationModalOpen","RoomItem","currentRoom","setCurrentRoom","avatarUrl","lastMessageAt","presence","Rooms","transformChatMessageSender","r","to","DirectChat","direct","deleteDirectMessage","removeDirectMessage","fetchDirectMessages","addDirectConversations","roomId","newCurrentRoom","currentRoomRecipient","sentDirectMessages","totalDirectMessages","blocked","markDirectChatAsRead","setDirectCursor","MessageToggles","toggles","pathname","location","path","BroadcastChatHeader","DirectChatHeader","MessengerRouter","directRooms","loadPlanInformation","loadPlannedMessages","renderDirectChat","renderBroadcastChat","exact","render","from","renderDirect","renderBroadcasts","Messenger","fetchPlannedBroadcastMessages","plannedBroadcastMessages","transformPlannedMessagesToConversations","fetchPlanInformation","setDirectRooms","initializeChat","subscriptions","forEach","subscription","unsubscribe","chatService","subscribe","onConnected","receiveDirectMessage","removedDirectMessages","receiveBroadcastMessage","removedBroadcastMessages","fetchBroadcastCategories","fetchHistory","useContext","ChatMessagesProvider","conversations","chat","Object","entries","conversation","access","oldMessages","oldUnreadMessageIds","newMessages","transformToChatMessages","sortBy","uniqWith","uniqMessageComparator","uniq","selectTeaser","messageId","filter","addConversations","markChatAsRead","removeChatMessage","Provider","Component","transformToChatMessage","multipartMessage","textParts","part","partType","payload","textPart","quotedTextPart","imagePart","planned","plannedId","multipartMessages","plannedMessages","reduce","user","avatar","thumb","avatarFallbackImage","sentMessages","totalMessages","now","otherMessage","translationKey","_toast","warning","success","info","default","CloseButton","closeToast","ToastContainer","autoClose","newestOnTop","closeButton","BaseChatService","sentDirectMessagesSubject","Subject","removedDirectMessagesSubject","sentBroadcastMessagesSubject","removedBroadcastMessagesSubject","unarchivedChannelsSubject","roomsSubject","BehaviorSubject","usersSubject","ReplaySubject","connectedSubject","asObservable","EVENTS","PRESENCE_CHANNEL","BROADCASTS_CHANNEL","PEER_TO_PEER_CHANNEL","DIRECT_CHANNEL_PREFIX","PusherChatService","pusherKlass","apiNamespace","tokenProviderUrl","channelsInstanceId","additionalHeaders","isConnecting","pusher","connect","presenceChannel","connectionRejection","reason","timeoutHandle","setTimeout","bind","me","subscribeToChannels","all","fetchRooms","fetchUsers","values","members","memberInfo","next","clearTimeout","member","unbind","directChannelName","disconnect","directChannel","roomBlocked","toggleRoom","roomUnblocked","favouriteAdded","favouriteRemoved","newMessage","usersCache","messageDeleted","channelUnarchived","channel","peerToPeerChannel","emit","broadcastChannel","customerUpdate","updateUser","shopUpdate","userType","outdatedUser","fetchData","updatedUser","attribute","roomsCache","cacheUsers","defineProperty","get","configurable","extendWithPresence","endpoint","cluster","forceTLS","authEndpoint","auth","ChatContext","hoistStatics","ChildComponent","Consumer","deserializeDatesInplace","obj","getOwnPropertyNames","concat","getOwnPropertySymbols","deserialized","JSONApiDeserializer","keyForAttribute","resourceName","serialized","JSONApiSerializer","webpackContext","req","webpackContextResolve","__webpack_require__","o","e","Error","code","keys","module","exports"],"sourceRoot":""}