{"version":3,"sources":["fonts/FiraSans-Regular.otf","fonts/FiraSans-Medium.otf","components/webbot.jsx","components/ChatWindow/ChatWindow.jsx","App.js","serviceWorker.js","index.js"],"names":["module","exports","card_class_name","WebBot","props","state","service","styleClass","cardType","margin_left","boxWidth","root_width","directLine","disableTextBox","message","rememberMe","iOS","bind","store","window","WebChat","createStore","dispatch","next","action","type","myCookie","localStorage","getItem","payload","name","console","log","activity","alert","JSON","stringify","document","querySelector","lastChild","scrollIntoView","behavior","block","suggestedActions","$","hide","show","setItem","undefined","i","length","style","pointerEvents","keydown","event","adaptiveCardHostConfig","actionTitleToWrap","spacing","containerStyles","default","foregroundColors","flex","accent","subtle","dark","attachmentMiddleware","card","attachment","contentType","getElementsByClassName","from","role","axios","post","then","res","token","data","setState","DirectLine","this","iconStyles","getElementById","width","marginTop","includes","navigator","platform","userAgent","textAlign","margin","display","tableLayout","className","styleOptions","sendBoxButtonColorOnHover","bubbleFromUserBackground","bubbleFromUserTextColor","bubbleTextColor","bubbleFromUserBorderRadius","bubbleBorderRadius","bubbleMinHeight","suggestedActionBorderRadius","suggestedActionTextColor","suggestedActionHeight","fontWeight","suggestedActionBackground","sendBoxRadius","suggestedActionBorderColor","connectivityTextSize","rootHeight","rootWidth","textBoxMarginLeft","typingAnimationHeight","typingAnimationWidth","typingAnimationBackgroundImage","React","Component","ChatWindow","id","App","Boolean","location","hostname","match","ReactDOM","render","serviceWorker","ready","registration","unregister"],"mappings":"yLAAAA,EAAOC,QAAU,IAA0B,8C,qBCA3CD,EAAOC,QAAU,IAA0B,6C,2DCUvCC,E,+LAsTWC,E,YAnTX,WAAYC,GAAQ,IAAD,8BACf,4CAAMA,KACDC,MAAQ,CACTC,QAAS,GACTC,WAAY,GACZC,SAAU,GACVC,YAAa,GACbC,SAAU,GACVC,WAAY,GACZC,WAAY,GACZC,eAAgB,GAChBC,QAAS,GACTC,WAAW,IAGd,EAAKC,IAAM,EAAKA,IAAIC,KAAT,gBAGZ,EAAKC,MAAQC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MACfC,2BAA4B,UAC5BC,qBAAsB,MACtBC,WAAY,OACZC,UAAW,QACXC,kBAAmB,MACnBC,sBAAuB,KACvBC,qBAAsB,KACtBC,+BAAgC,4uzD,GAxSvCC,IAAMC,WCOZC,MAhBf,WACE,OASE,yBAAKzB,UAAY,OAChB,kBAAC,EAAD,CAAQ0B,GAAG,aCLDC,MANf,WACE,OACE,kBAAC,EAAD,OCOgBC,QACW,cAA7BtG,OAAOuG,SAASC,UAEe,UAA7BxG,OAAOuG,SAASC,UAEhBxG,OAAOuG,SAASC,SAASC,MACvB,2D,gBCPNC,IAASC,OAAO,kBAAC,EAAD,MAASzF,SAAS6C,eAAe,YDsH3C,kBAAmBI,WACrBA,UAAUyC,cAAcC,MAAMtD,MAAK,SAAAuD,GACjCA,EAAaC,iB","file":"static/js/main.63bc2c52.chunk.js","sourcesContent":["module.exports = __webpack_public_path__ + \"static/media/FiraSans-Regular.d95cbc6b.otf\";","module.exports = __webpack_public_path__ + \"static/media/FiraSans-Medium.f255f5ea.otf\";","import {\r\n DirectLine\r\n} from 'botframework-directlinejs';\r\nimport React from 'react';\r\nimport ReactWebChat, { createDirectLine, createStore, Components } from 'botframework-webchat';\r\nimport axios from 'axios';\r\nimport $ from \"jquery\";\r\n// import './../../public/images/'\r\nvar msgParam = '';\r\nvar _id = '';\r\nvar card_class_name;\r\n//var interval;\r\nclass WebBot extends React.Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n service: '',\r\n styleClass: '',\r\n cardType: '',\r\n margin_left: '',\r\n boxWidth: '',\r\n root_width: '',\r\n directLine: '',\r\n disableTextBox: '',\r\n message: '',\r\n rememberMe:''\r\n }\r\n // this.getUrlVars = this.getUrlVars.bind(this);\r\n this.iOS = this.iOS.bind(this);\r\n // this.attachmentMiddleware = this.attachmentMiddleware.bind(this);\r\n // We are creating our own version of Redux store, which includes middleware and an optional initial state.\r\n this.store = window.WebChat.createStore({}, ({\r\n dispatch\r\n }) => next => action => {\r\n // console.log(\"action-->\",action);\r\n if (action.type === 'DIRECT_LINE/CONNECT_FULFILLED') {\r\n // After connected, we will send a message by dispatching a Redux action.\r\n // if (this.state.service) {\r\n // console.log(\"in\");\r\n // dispatch({\r\n // type: 'WEB_CHAT/SEND_EVENT',\r\n // payload: {\r\n // name: this.state.service + '&'+this.state.rememberMe\r\n // }\r\n // });\r\n // } else {\r\n const myCookie=localStorage.getItem('rememberMe')\r\n dispatch({\r\n type: 'WEB_CHAT/SEND_EVENT',\r\n payload: {\r\n name: 'empty'\r\n +'&'+myCookie\r\n \r\n }\r\n \r\n });\r\n console.log(action.payload,'connect fulfiled')\r\n // }\r\n } else if (action.type === 'DIRECT_LINE/INCOMING_ACTIVITY') {\r\n // When receiving an activity of type \"event\" with name of \"sample:backchannel\", prompt it out.\r\n \r\n const {\r\n activity\r\n } = action.payload;\r\n if (activity.type === 'event' && activity.name === 'sample:backchannel') {\r\n alert(JSON.stringify(activity, null, 2));\r\n }\r\n }\r\n if (action.type === 'DIRECT_LINE/POST_ACTIVITY_FULFILLED' || action.type === 'WEB_CHAT/SUBMIT_SEND_BOX' || action.type === 'WEB_CHAT/SET_SUGGESTED_ACTIONS') {\r\n document.querySelector('ul[role=\"list\"]').lastChild.scrollIntoView({ behavior: 'smooth', block: 'start' });\r\n // document.querySelectorAll('webchat__row attachment').scrollIntoView({ behavior: 'smooth', block: 'start' });\r\n \r\n }\r\n // if(action.type=== 'WEB_CHAT/SEND_MESSAGE'){\r\n // //Message sent bu user\r\n // // console.log('cleared interval')\r\n // clearTimeout(interval);\r\n // }else if(action.type === 'DIRECT_LINE/INCOMING_ACTIVITY' && action.payload.activity.name !== \"inactive\"){\r\n // //Message sent by bot\r\n // // console.log('msg from bot')\r\n // clearInterval(interval);\r\n // interval = setTimeout(() => {\r\n // // Notify bot the user has been inactive\r\n // dispatch({\r\n // type: 'WEB_CHAT/SEND_EVENT',\r\n // payload: {\r\n // name: 'inactive',\r\n // value: ''\r\n // }\r\n // });\r\n // }, 300000)\r\n // }\r\n \r\n // var myCookie=localStorage.getItem('rememberMe')\r\n // if(action.type === 'DIRECT_LINE/POST_ACTIVITY_FULFILLED'){\r\n // // if(this.state.message=='user'){\r\n // dispatch({\r\n // type: 'WEB_CHAT/SEND_EVENT',\r\n // payload: {\r\n // name: 'empty'+'&'+myCookie\r\n // }\r\n \r\n // });\r\n // console.log(action.payload)\r\n // // }\r\n // // console.log(this.state.rememberMe)\r\n \r\n // }\r\n if (action.type === 'WEB_CHAT/SET_SUGGESTED_ACTIONS') {\r\n if (action.payload.suggestedActions != 0) {\r\n $('div.main').hide();\r\n }\r\n else {\r\n $('div.main').show();\r\n }\r\n }\r\n // if(action.type === 'WEB_CHAT/SEND_EVENT'){\r\n // console.log(action.payload)\r\n // }\r\n \r\n if(this.state.message == \"user\")\r\n {\r\n localStorage.setItem('rememberMe', true);\r\n this.state.rememberMe = localStorage.getItem('rememberMe');\r\n }\r\n // console.log(this.state.rememberMe)\r\n // if(action.type === \"WEB_CHAT/SUBMIT_SEND_BOX\"){\r\n // localStorage.setItem('rememberMe', true);\r\n // this.state.rememberMe = localStorage.getItem('rememberMe');\r\n // console.log(\"cookie\",this.state.rememberMe)\r\n\r\n // dispatch({\r\n // type: 'WEB_CHAT/SUBMIT_SEND_BOX',\r\n // payload: {\r\n // cookie: this.state.rememberMe\r\n // }\r\n // });\r\n // }\r\n \r\n // Styles for thumbs up thumbs down feedback card\r\n // if (_id === \"thumbsCard\") {\r\n // let button_name = document.getElementsByClassName(\"ac-pushButton\");\r\n // let card_name = document.getElementsByClassName(\"ac-adaptiveCard\");\r\n // let actionSet_name = document.getElementsByClassName(\"ac-actionSet\");\r\n // let bubble_name = document.getElementsByClassName(\"css-s6ngnb attachment bubble\");\r\n // let class_name = document.getElementsByClassName(\"css-shluf1\");\r\n // let columnSet_name = document.getElementsByClassName(\"ac-columnSet\");\r\n // // columnSet_name[columnSet_name.length - 1].style.margin = \"0px !important\"\r\n // actionSet_name[actionSet_name.length - 1].style.flex = \"0 0 42px !important\";\r\n // actionSet_name[actionSet_name.length - 1].style.padding = \"2px\";\r\n // actionSet_name[actionSet_name.length - 2].style.padding = \"2px\";\r\n\r\n // bubble_name[bubble_name.length - 1].style.border = \"0px solid transparent\";\r\n\r\n // class_name[class_name.length - 1].style.width = \"110px\";\r\n\r\n // card_name[card_name.length - 1].style.padding = \"0px\";\r\n // // console.log(\"styles based on id\",class_name[class_name.length - 1].style.width); \r\n // }\r\n // else if (this.state.disableTextBox === \"Product info categories\" || this.state.disableTextBox === \"Other useful links\") {\r\n // let bubble_name = document.getElementsByClassName(\"css-s6ngnb attachment bubble\");\r\n // let class_name = document.getElementsByClassName(\"css-shluf1\");\r\n // let card_name = document.getElementsByClassName(\"ac-adaptiveCard\");\r\n // card_name[card_name.length - 1].style.padding = \"15px\";\r\n // bubble_name[bubble_name.length - 1].style.border = \"1px solid #E6E6E6\";\r\n // class_name[class_name.length - 1].style.width = \"100%\";\r\n \r\n // }\r\n // Disabling adaptive cards \r\n if (card_class_name != undefined) {\r\n var i = 0;\r\n // console.log(\"in\");\r\n while (i < card_class_name.length - 1) {\r\n // card_class_name[i].style.opacity = \"0.4\";\r\n // console.log(\"inside while\");\r\n card_class_name[i].style.pointerEvents = \"none\";\r\n\r\n $(card_class_name[i]).keydown(function (event) {\r\n return false;\r\n });\r\n i++;\r\n }\r\n }\r\n return next(action);\r\n });\r\n\r\n this.adaptiveCardHostConfig = {\r\n actionTitleToWrap: true, spacing: 'small', containerStyles: { default: { foregroundColors: { default: { default: '#034eal', flex: '1 1 1px', } }, accent: { default: \"#034ea1\", subtle: \"#88034ea1\" }, dark: { default: \"#808080\", subtle: \"black\" }, } }\r\n }\r\n\r\n this.attachmentMiddleware = () => next => card => {\r\n // console.log(\"cardd data\", card);\r\n if (card.attachment.contentType === 'application/vnd.microsoft.card.custom') {\r\n card.attachment.contentType = 'application/vnd.microsoft.card.adaptive';\r\n \r\n }\r\n else \r\n if (card.attachment.contentType === 'application/vnd.microsoft.card.adaptive') {\r\n // this.state.disableTextBox = card.attachment.content.body[0].text;\r\n card_class_name = document.getElementsByClassName(\"ac-adaptiveCard\");\r\n // _id = card.attachment.content.id;\r\n \r\n \r\n } \r\n // if (card.attachment.contentType === 'application/vnd.microsoft.card.adaptive') {\r\n // this.state.disableTextBox = card.attachment.content.body[0].text;\r\n // card_class_name = document.getElementsByClassName(\"ac-adaptiveCard\");\r\n // _id = card.attachment.content.id;\r\n \r\n // }\r\n // else if (card.attachment.contentType === \"text/markdown\") {\r\n // // if (card.attachment.content === 'Thank you! For your Valuable Remark. Start a new conversation by saying hello!')\r\n // // this.setState({ message: card.attachment.contentType})\r\n // this.state.message = card.attachment.content;\r\n // }\r\n if (card.attachment.contentType === \"text/plain\") {\r\n this.state.message = card.activity.from.role;\r\n \r\n }\r\n // console.log(this.state.message)\r\n return next(card)\r\n };\r\n }\r\n\r\n async componentDidMount() {\r\n // localStorage.setItem('rememberMe', true);\r\n // this.state.rememberMe = localStorage.getItem('rememberMe');\r\n // const res = await axios.post('http://localhost:8080/generatetoken')\r\n // Staging URL - always used in local\r\n // const res = await axios.post('https://dep-chatbot-dep-staging.azurewebsites.net/generatetoken')\r\n // Prod build - wont work in local\r\n const res = await axios.post('https://dep-production.azurewebsites.net/generatetoken')\r\n .then(res => {\r\n const { token } = res.data;\r\n this.setState({ token: token });\r\n this.directLine = new DirectLine({ token: token });\r\n this.setState({ directLine: this.directLine });\r\n // console.log(res.data);\r\n });\r\n // Covid - 19 secret \r\n // this.directLine = new DirectLine({ secret: 'LEq4ZveVDRY.hPyrvmhNFDlASwf_cfjQLkVUYQD8jMYdJwB_n7t9fQc' })\r\n // DEP prod secret\r\n // this.directLine = new DirectLine({secret : 'bLjLz6ZIB9g.POe8sHuWfgBeBPyEGim3VbbI3nHV9j7OQUvXxFT4f7s'})\r\n this.setState({ directLine: this.directLine });\r\n if(this.iOS()){\r\n var iconStyles = document.getElementById(\"sendIconButton\");\r\n iconStyles.style.width = '70px';\r\n iconStyles.style.marginTop = '2px';\r\n console.log(this.iOS(),iconStyles);\r\n }\r\n }\r\n // getUrlVars() {\r\n // var vars = {};\r\n // var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function (m, key, value) {\r\n // if (key) {\r\n // vars[key] = value;\r\n // return vars;\r\n // }\r\n // });\r\n // return vars;\r\n // }\r\n iOS() {\r\n return [\r\n 'iPad Simulator',\r\n 'iPhone Simulator',\r\n 'iPod Simulator',\r\n 'iPad',\r\n 'iPhone',\r\n 'iPod'\r\n ].includes(navigator.platform)\r\n // iPad on iOS 13 detection\r\n || (navigator.userAgent.includes(\"Mac\") && \"ontouchend\" in document)\r\n }\r\n\r\n render() {\r\n return (\r\n\r\n !!this.state.directLine && (\r\n
\r\n {/* backgroundColor: \"crimson\", */}\r\n \r\n //
\r\n // \"logo\"\r\n //
\r\n // \"notification\"\r\n // \"user\"\r\n //
\r\n //style={{backgroundColor:'white'}} \r\n
\r\n \r\n
\r\n );\r\n}\r\n\r\nexport default ChatWindow;\r\n\r\n","import React from 'react';\nimport './App.css';\nimport ChatWindow from './components/ChatWindow/ChatWindow';\nfunction App() {\n return (\n \n );\n}\n\nexport default App;\n\n\n","// This optional code is used to register a service worker.\n// register() is not called by default.\n\n// This lets the app load faster on subsequent visits in production, and gives\n// it offline capabilities. However, it also means that developers (and users)\n// will only see deployed updates on subsequent visits to a page, after all the\n// existing tabs open on the page have been closed, since previously cached\n// resources are updated in the background.\n\n// To learn more about the benefits of this model and instructions on how to\n// opt-in, read https://bit.ly/CRA-PWA\n\nconst isLocalhost = Boolean(\n window.location.hostname === 'localhost' ||\n // [::1] is the IPv6 localhost address.\n window.location.hostname === '[::1]' ||\n // 127.0.0.1/8 is considered localhost for IPv4.\n window.location.hostname.match(\n /^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/\n )\n);\n\nexport function register(config) {\n if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\n // The URL constructor is available in all browsers that support SW.\n const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href);\n if (publicUrl.origin !== window.location.origin) {\n // Our service worker won't work if PUBLIC_URL is on a different origin\n // from what our page is served on. This might happen if a CDN is used to\n // serve assets; see https://github.com/facebook/create-react-app/issues/2374\n return;\n }\n\n window.addEventListener('load', () => {\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\n\n if (isLocalhost) {\n // This is running on localhost. Let's check if a service worker still exists or not.\n checkValidServiceWorker(swUrl, config);\n\n // Add some additional logging to localhost, pointing developers to the\n // service worker/PWA documentation.\n navigator.serviceWorker.ready.then(() => {\n console.log(\n 'This web app is being served cache-first by a service ' +\n 'worker. To learn more, visit https://bit.ly/CRA-PWA'\n );\n });\n } else {\n // Is not localhost. Just register service worker\n registerValidSW(swUrl, config);\n }\n });\n }\n}\n\nfunction registerValidSW(swUrl, config) {\n navigator.serviceWorker\n .register(swUrl)\n .then(registration => {\n registration.onupdatefound = () => {\n const installingWorker = registration.installing;\n if (installingWorker == null) {\n return;\n }\n installingWorker.onstatechange = () => {\n if (installingWorker.state === 'installed') {\n if (navigator.serviceWorker.controller) {\n // At this point, the updated precached content has been fetched,\n // but the previous service worker will still serve the older\n // content until all client tabs are closed.\n console.log(\n 'New content is available and will be used when all ' +\n 'tabs for this page are closed. See https://bit.ly/CRA-PWA.'\n );\n\n // Execute callback\n if (config && config.onUpdate) {\n config.onUpdate(registration);\n }\n } else {\n // At this point, everything has been precached.\n // It's the perfect time to display a\n // \"Content is cached for offline use.\" message.\n console.log('Content is cached for offline use.');\n\n // Execute callback\n if (config && config.onSuccess) {\n config.onSuccess(registration);\n }\n }\n }\n };\n };\n })\n .catch(error => {\n console.error('Error during service worker registration:', error);\n });\n}\n\nfunction checkValidServiceWorker(swUrl, config) {\n // Check if the service worker can be found. If it can't reload the page.\n fetch(swUrl)\n .then(response => {\n // Ensure service worker exists, and that we really are getting a JS file.\n const contentType = response.headers.get('content-type');\n if (\n response.status === 404 ||\n (contentType != null && contentType.indexOf('javascript') === -1)\n ) {\n // No service worker found. Probably a different app. Reload the page.\n navigator.serviceWorker.ready.then(registration => {\n registration.unregister().then(() => {\n window.location.reload();\n });\n });\n } else {\n // Service worker found. Proceed as normal.\n registerValidSW(swUrl, config);\n }\n })\n .catch(() => {\n console.log(\n 'No internet connection found. App is running in offline mode.'\n );\n });\n}\n\nexport function unregister() {\n if ('serviceWorker' in navigator) {\n navigator.serviceWorker.ready.then(registration => {\n registration.unregister();\n });\n }\n}\n","import 'react-app-polyfill/ie11';\nimport 'react-app-polyfill/stable';\n// import babelPolyfill from 'babel-polyfill';\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport './index.css';\nimport App from './App';\nimport * as serviceWorker from './serviceWorker';\nimport './fonts/FiraSans-Regular.otf';\nimport './fonts/FiraSans-Medium.otf';\n// import './../public/images/'\nReactDOM.render(, document.getElementById('webchat'));\n\n// If you want your app to work offline and load faster, you can change\n// unregister() to register() below. Note this comes with some pitfalls.\n// Learn more about service workers: https://bit.ly/CRA-PWA\nserviceWorker.unregister();\n"],"sourceRoot":""}