{"version":3,"sources":["models/Conversation.ts","adi_logo.png","components/LogoAvatar.tsx","models/Constants.ts","services/WatsonService.ts","components/Appbar.jsx","models/Message.ts","components/MessageBox.tsx","components/MessageTextLink.tsx","components/QuickResponse.tsx","components/MessageCard.tsx","components/MessageCardCarousel.tsx","components/ChatItem.tsx","components/ChatInput.jsx","components/IntroCarousel.tsx","services/ConversationParser.ts","components/ChatArea.tsx","App.js","serviceWorker.js","index.js"],"names":["DisplayOption","useStyles","makeStyles","theme","createStyles","dark","margin","spacing","width","height","backgroundColor","grey","borderColor","light","image","LogoAvatar","props","classes","Box","className","border","borderRadius","display","alignItems","justifyContent","src","AdiLogo","alt","GenericResponse","response","responseType","this","response_type","text","context","title","description","options","parseOptions","map","option","optIsNew","newBadge","bObj","field_type","value","match_string","label","input","isNew","source","errorMessage","API_KEY","process","URL","sendMessage","messageText","buttons","document","getElementsByTagName","i","length","disabled","style","color","background","Promise","resolve","reject","str","fetch","method","headers","Headers","btoa","API_USERNAME","body","JSON","stringify","replace","match","index","toUpperCase","then","res","json","output","generic","Math","floor","random","gResponses","genRes","parseOptionResponse","parseImageResponse","parseTextLinkResponse","parseTextResponse","genericResponses","error","menuButton","marginRight","flexGrow","palette","getContrastText","deepOrange","fontWeight","lineHeight","verticalAlign","caption","iconButton","appBar","padding","clsIcon","marginTop","btn","modalHeader","textAlign","borderTopLeftRadius","borderTopRightRadius","paper","position","transform","borderBottom","boxShadow","shadows","opacity","backgroundImage","backgroundSize","smileySizeObj","styled","Rating","action","MessageDirection","MessageStatus","MessageType","Appbar","React","useState","AppBar","elevation","Grid","container","item","maxWidth","top","left","viewBox","fill","xmlns","d","xs","sm","md","lg","xl","marginLeft","Typography","variant","align","adi","borderBottomLeftRadius","user","borderBottomRightRadius","MessageBox","message","messageData","messageDirection","RECEIVED","Zoom","in","Paper","parse","SENT","red","a","textDecoration","MessageTextLink","textLink","dangerouslySetInnerHTML","__html","root","secondary","button","textTransform","fontSize","fontFamily","QuickResponse","Badge","badgeContent","marginBottom","Button","size","onClick","actions","quickResponseHandler","itemIndex","messageIndex","media","paddingTop","MessageCard","card","Card","href","undefined","target","rel","CardMedia","CardHeader","titleTypographyProps","subheader","CardActions","alignContent","Link","underline","id","justifySelf","justifyItems","paddingLeft","carousel","MessageCardCarousel","cardsMessageList","itemCount","activeItem","showControls","showIndicators","slide","itemId","box","status","avatar","objectFit","avatarArea","minWidth","statusText","RenderReceivedMessage","CssBaseline","messageType","QUICK_RESPONSE","CARD","CARD_CAROUSEL","TEXT_LINK","TEXT","RenderSentMessage","dt","Date","flexDirection","gutterBottom","messageStatus","SENDING","toLocaleTimeString","hour","minute","ChatItem","state","Avatar","chatbotLang","require","placeholderVal","appbar","bottom","textField","send","msgText","modal","ChatInput","isSendDisabled","setIsSendDisabled","chatInputText","setChatInputText","onSendClicked","XMLHttpRequest","chatInputHandler","FormControl","clsx","OutlinedInput","placeholder","onChange","event","onKeyDown","key","autoComplete","paddingRight","spacer","carouselContainer","carouselView","hidediv","paddingBottom","HideOnScroll","children","window","trigger","useScrollTrigger","Slide","appear","direction","IntroCarousel","isLoaded","showCarousal","carousalItem","greeting","time","getHours","useScrollPosition","prevPos","currPos","scrollCallback","y","element","link","img","CircularProgress","parseMessageCard","genResponses","messagesLength","msgList","imageResponseIndex","optionResponseIndex","msg","push","count","ChatArea","messagesEndRef","createRef","scrollToBottom","current","scrollIntoView","behavior","responseValue","showIntro","setState","elevateAppbar","tempMessages","messages","responseItemIndex","findIndex","registeredResponseIndex","opt","toLowerCase","registeredResponse","msgToSend","conversation","sameContext","newMsg","conv","lastInput","newConv","lastSendingMsg","conversation_id","initBot","addConversationToMessage","catch","console","log","sentMessageStatusHandler","chatInputSendHandler","introScrollCallback","previousY","currentY","IntroComponent","inConversation","elevate","List","ListItem","ref","repMsg","convIndex","display_option","forEach","dispopt","genResponse","parseMessageTextLink","parseMessageOption","msgCardList","parseMessageCardCarousel","sba","Component","createMuiTheme","primary","main","green","responsiveFontSizes","App","ThemeProvider","Boolean","location","hostname","ReactDOM","render","StrictMode","getElementById","navigator","serviceWorker","ready","registration","unregister"],"mappings":"qLAAYA,E,2ZCAG,MAA0B,qC,OCOnCC,EAAYC,aAAW,SAACC,GAAD,OAC3BC,YAAa,CACXC,KAAM,CACJC,OAAQH,EAAMI,QAAQ,GACtBC,MAAO,OACPC,OAAQ,OACRC,gBAAiBC,IAAK,KACtBC,YAAaD,IAAK,MAEpBE,MAAO,CACLP,OAAQH,EAAMI,QAAQ,GACtBC,MAAO,OACPC,OAAQ,OACRC,gBAAiBC,IAAK,KACtBC,YAAaD,IAAK,MAEpBG,MAAO,CACLN,MAAO,OACPC,OAAQ,aAcCM,EATI,SAACC,GAChB,IAAMC,EAAUhB,IAChB,OACI,cAACiB,EAAA,EAAD,CAAKC,UAAWH,EAAMX,KAAOY,EAAQZ,KAAKY,EAAQJ,MAAOO,OAAQ,EAAGC,aAAa,MAAMC,QAAQ,OAAOC,WAAW,cAAcC,eAAe,WAA9I,SACI,qBAAKL,UAAWF,EAAQH,MAAOW,IAAKC,EAASC,IAAI,Y,SFlCjD3B,O,eAAAA,I,yBAAAA,I,mBAAAA,I,iBAAAA,I,2BAAAA,I,eAAAA,I,iCAAAA,I,0BAAAA,M,KAsDL,IAAM4B,EAAb,WAII,WAAYC,GAAe,yBAH3BC,kBAG0B,OAF1BD,cAE0B,EACtBE,KAAKF,SAAWA,EAChBE,KAAKD,aAAeD,EAASG,cANrC,gEAUQD,KAAKF,SAAY,CAACI,KAAMF,KAAKF,SAASI,QAV9C,8CAcQF,KAAKF,SAAY,CAACI,KAAMF,KAAKF,SAASI,QAd9C,0CAiBwBC,GAChBH,KAAKF,SAAY,CAACM,MAAOJ,KAAKF,SAASM,MAAOC,YAAaL,KAAKF,SAASO,YAAaC,QAASN,KAAKO,aAAaP,KAAKF,SAASQ,QAASH,MAlBhJ,mCAqBiBG,EAAcH,GACvB,OAAOG,EAAQE,KAAI,SAACC,GAChB,IAAIC,GAAW,EAkBf,OAjBGP,EA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U,SAClEyG,iBAAkBlC,GAAiBmC,SACnC6B,aAAcuI,EAAa9Q,OAC3B0L,cAAelH,GAAckC,SAC7BqE,YAAatG,GAAY2G,OAE3B4H,GAAa,EDhTS,IAACI,KCoT7BlV,KAAK0S,SAAS,CAACG,SAAUD,Q,GAnSSnM,IAAM+O,WCNxCpX,GAAQqX,YAAe,CACzBlR,QAAS,CACPmR,QAAS,CACPC,KAAMlR,IAAW,MAEnB6E,UAAW,CACTqM,KAAMC,IAAM,SAIlBxX,GAAQyX,YAAoBzX,IAab0X,OAXf,WACE,OACE,qBAAK1W,UAAU,MAAf,SACE,cAAC2W,EAAA,EAAD,CAAe3X,MAAOA,GAAtB,SACE,cAAC,GAAD,SClBY4X,QACW,cAA7B9F,OAAO+F,SAASC,UAEe,UAA7BhG,OAAO+F,SAASC,UAEhBhG,OAAO+F,SAASC,SAASjT,MACvB,2DCXNkT,IAASC,OACP,cAAC,IAAMC,WAAP,UACA,cAAC,GAAD,MAEA1U,SAAS2U,eAAe,SDwHpB,kBAAmBC,WACrBA,UAAUC,cAAcC,MACrBrT,MAAK,SAAAsT,GACJA,EAAaC,gBAEd5C,OAAM,SAAA5P,GACL6P,QAAQ7P,MAAMA,EAAMkE,c","file":"static/js/main.48a02908.chunk.js","sourcesContent":["export enum DisplayOption {\n TEXT,\n TEXT_LINK,\n OPTION,\n IMAGE,\n SUGGESTION,\n CARD,\n CARD_CAROUSEL,\n UNDEFINED\n}\n// interface DialogNode{\n// dialogNode: string\n// }\n\nexport interface TextResponse {\n text: string;\n}\n\nexport interface TextLinkResponse {\n text: string;\n}\n\nexport interface OptionResponse {\n title: string;\n description?: string;\n options: Option[];\n}\n\nexport interface ImageResponse {\n source: string;\n}\n\nexport interface CardResponse {\n title: string;\n description: string;\n media: ImageResponse;\n actions: Option[];\n}\n\nexport interface CardCarouselResponse {\n cards: CardResponse[];\n}\n\nexport interface Option {\n label: string;\n value: string;\n isNew: boolean;\n}\n\nexport default interface Conversation {\n context?: any;\n genericResponses?: GenericResponse[];\n}\n\nexport class GenericResponse {\n responseType: string;\n response: any;\n\n constructor(response:any) {\n this.response = response;\n this.responseType = response.response_type;\n }\n\n parseTextResponse() {\n this.response = {text: this.response.text} as TextResponse;\n }\n\n parseTextLinkResponse() {\n this.response = {text: this.response.text} as TextLinkResponse;\n }\n\n parseOptionResponse(context:any) {\n this.response = {title: this.response.title, description: this.response.description, options: this.parseOptions(this.response.options, context) } as OptionResponse;\n }\n\n parseOptions(options: any, context: any): Option[] {\n return options.map((option: any)=>{\n let optIsNew = false;\n if(context.newBadge){\n context.newBadge.map((bObj:any) => {\n switch(bObj.field_type){\n case \"value\":\n if(option.value === bObj.match_string){\n optIsNew = true;\n }\n break;\n case \"label\":default:\n if(option.label === bObj.match_string){\n optIsNew = true;\n }\n break;\n }\n return null;\n });\n } \n return {label: option.label, value: option.value.input.text, isNew: optIsNew}\n })\n }\n\n parseImageResponse() {\n this.response = {source: this.response.source} as ImageResponse;\n }\n}","export default __webpack_public_path__ + \"static/media/adi_logo.8b42b97b.png\";","import React from 'react';\nimport { createStyles, makeStyles, Theme } from '@material-ui/core/styles';\nimport { grey } from '@material-ui/core/colors';\nimport { Box } from '@material-ui/core';\n//images\nimport AdiLogo from '../adi_logo.png';\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n dark: {\n margin: theme.spacing(1),\n width: \"40px\",\n height: \"40px\",\n backgroundColor: grey[400],\n borderColor: grey[100],\n },\n light: {\n margin: theme.spacing(1),\n width: \"40px\",\n height: \"40px\",\n backgroundColor: grey[100],\n borderColor: grey[300]\n },\n image: {\n width: \"32px\",\n height: \"35px\",\n },\n }),\n);\n\nconst LogoAvatar = (props:any) => {\n const classes = useStyles();\n return (\n \n \"ADI\"\n \n );\n}\n\nexport default LogoAvatar;","export const errorMessage:string[] = [\n \"I am having some diffuculties chatting right now. Can we chat later?\",\n \"Hmmmm. Something went wrong! It is probably some problem at my side. I will get it fixed.\",\n \"This is unusual! I am unable to process this request. Can you please try later? while I get this problem fixed.\",\n \"I cannot process your request at this time. Sorry for trouble. Please try later.\"\n]","//import axios from 'axios';\nimport Conversation, { GenericResponse } from '../models/Conversation';\nimport { errorMessage } from '../models/Constants';\n/***\nTHIS WORKS-\ncurl -X POST -u \"apikey:HQ255mmjDZN-qA76CieLqnFxKzHBnREaynaivfVp6g_i\" --header \"Content-Type:application/json\" --data \"{\\\"input\\\": {\\\"text\\\": \\\"Hello\\\"}}\" \"https://api.us-south.assistant.watson.cloud.ibm.com/v1/workspaces/bd12e787-087e-4b52-a8c9-1a2f4d652f2b/message?version=2020-04-01\"\n*/\n//const URL:string = \"https://api.us-south.assistant.watson.cloud.ibm.com/v1/workspaces/f038a7e7-ab28-440a-9a72-053465104446/message?version=2020-04-01\" //ENGLISH\n//const URL:string = \"https://api.us-south.assistant.watson.cloud.ibm.com/v1/workspaces/d95155d7-1dbc-438e-b9bb-8b405bc137dd/message?version=2020-04-01\" //HINDI\n\nconst API_KEY = process.env.REACT_APP_API_KEY!;\nconst API_USERNAME = process.env.REACT_APP_USERNAME!;\nlet URL:string = \"\";\nif(process.env.REACT_APP_LANG === \"HI\"){\n URL = process.env.REACT_APP_HIN_URL!;\n}else{\n URL = process.env.REACT_APP_ENG_URL!;\n}\n\nfunction convertToCamelcase(str:any) {\n return str.replace(/(?:^\\w|[A-Z]|\\b\\w|\\s+)/g, function(match, index) {\n //if (/\\s+/.test(match)) return \" \"; // or if (/\\s+/.test(match)) for white spaces\n return match.toUpperCase();\n });\n}\n\n\nexport const startConversation = () => {\n //alert(\"test\");\n return new Promise((resolve, reject) => {\n fetch(URL, {\n method:'POST',\n headers: new Headers({\n 'Content-Type':'application/json',\n 'Authorization': 'Basic ' + btoa(API_USERNAME + \":\" + API_KEY) \n }),\n body: JSON.stringify({\n input: {\n text: \"Hello\"\n }\n })\n })\n .then(res => res.json())\n .then(\n (response) => {\n const gResponses = response.output.generic.map((res: any)=>{\n const genRes:GenericResponse = new GenericResponse(res);\n switch (res.response_type) {\n case 'option':\n genRes.parseOptionResponse(response.context);\n return genRes;\n case 'text':default:\n genRes.parseTextResponse();\n return genRes;\n }\n });\n resolve({context: response.context, genericResponses: gResponses} as Conversation);\n },\n // Note: it's important to handle errors here\n // instead of a catch() block so that we don't swallow\n // exceptions from actual bugs in components.\n (error) => {\n reject(error);\n }\n )\n\n\n // axios.post(\n // URL,\n // {\n // input: {\n // text: \"Hello\"\n // }\n // },\n // {\n // headers: {'Content-Type':'application/json'},\n // auth: {username:API_USERNAME,password:API_KEY}\n // }\n // ).then(function (response) {\n // const gResponses = response.data.output.generic.map((res: any)=>{\n // const genRes:GenericResponse = new GenericResponse(res);\n // switch (res.response_type) {\n // case 'option':\n // genRes.parseOptionResponse(response.data.context);\n // return genRes;\n // case 'text':default:\n // genRes.parseTextResponse();\n // return genRes; \n // }\n // });\n // resolve({context: response.data.context, genericResponses: gResponses} as Conversation);\n // })\n // .catch(function (error) {\n // reject(error);\n // });\n })\n}\n\n\nexport const sendMessage = (messageText: any, context: any) => {\n // console.log(!context.conversation_id);\n //console.log(messageText)\n\n const buttons = document.getElementsByTagName(\"button\"); //To disable buttons on clicking quick response\n for (let i = 0; i < buttons.length; i++) {\n buttons[i].disabled = true;\n buttons[i].style.color = \"#000000de\";\n buttons[i].style.background = \"#eeeeee\";\n } \n \n //document.getElementById('quickRespGrid')!.remove(); //To delete quick response options\n \n return new Promise((resolve, reject) => {\n\n fetch(URL, {\n method:'POST',\n headers: new Headers({\n 'Content-Type':'application/json',\n 'Authorization': 'Basic ' + btoa(API_USERNAME + \":\" + API_KEY)\n }),\n body: JSON.stringify({\n input: {\n text: convertToCamelcase(messageText)\n },\n context: context\n })\n })\n .then(res => res.json())\n .then(\n (response) => {\n //console.log(JSON.stringify(response)); \n if(!response.output.generic){\n response.output.generic = [{response_type: \"text\", text: errorMessage[Math.floor(Math.random() * errorMessage.length)]}]\n }\n const gResponses = response.output.generic.map((res: any)=>{\n const genRes:GenericResponse = new GenericResponse(res);\n switch (res.response_type) {\n case 'option':\n genRes.parseOptionResponse(response.context);\n return genRes;\n case 'image':\n genRes.parseImageResponse();\n return genRes;\n case 'text_link':\n genRes.parseTextLinkResponse();\n return genRes;\n case 'text':default:\n genRes.parseTextResponse();\n return genRes;\n }\n });\n \n resolve({context: response.context, genericResponses: gResponses} as Conversation);\n },\n // Note: it's important to handle errors here\n // instead of a catch() block so that we don't swallow\n // exceptions from actual bugs in components.\n (error) => {\n reject(error);\n }\n )\n\n\n })\n \n}\n\n","import React from 'react';\nimport { createStyles, makeStyles } from '@material-ui/core/styles';\nimport AppBar from '@material-ui/core/AppBar';\nimport Grid from '@material-ui/core/Grid';\nimport Typography from '@material-ui/core/Typography';\nimport { deepOrange } from '@material-ui/core/colors';\nimport CloseSharpIcon from '@material-ui/icons/CloseSharp';\nimport RefreshSharpIcon from '@material-ui/icons/RefreshSharp';\nimport CallReceivedIcon from '@material-ui/icons/CallReceived';\nimport { Box } from '@material-ui/core';\nimport Button from '@material-ui/core/Button';\nimport Modal from '@material-ui/core/Modal';\nimport PropTypes from 'prop-types';\n// import Rating from '@material-ui/lab/Rating';\n\nimport { styled } from '@mui/material/styles';\nimport Rating from '@mui/material/Rating';\n// import SentimentVeryDissatisfiedIcon from '@mui/icons-material/SentimentVeryDissatisfied';\n// import SentimentDissatisfiedIcon from '@mui/icons-material/SentimentDissatisfied';\n// import SentimentSatisfiedIcon from '@mui/icons-material/SentimentSatisfied';\n// import SentimentSatisfiedAltIcon from '@mui/icons-material/SentimentSatisfiedAltOutlined';\n// import SentimentVerySatisfiedIcon from '@mui/icons-material/SentimentVerySatisfied';\nimport SentimentVeryDissatisfiedIcon from '@material-ui/icons/SentimentVeryDissatisfied';\nimport SentimentDissatisfiedIcon from '@material-ui/icons/SentimentDissatisfied';\nimport SentimentSatisfiedIcon from '@material-ui/icons/SentimentSatisfied';\nimport SentimentSatisfiedAltIcon from '@material-ui/icons/SentimentSatisfiedAltOutlined';\nimport SentimentVerySatisfiedIcon from '@material-ui/icons/SentimentVerySatisfied';\n\n//components\nimport LogoAvatar from './LogoAvatar'\nimport { sendMessage } from '../services/WatsonService';\n\n\n//import Conversation from '../models/Conversation';\n//import Toolbar from '@material-ui/core/Toolbar';\n//import IconButton from '@material-ui/core/IconButton';\n//import Replay from '@material-ui/icons/Replay';\n//import Close from '@material-ui/icons/Close';\n//import ArrowDownwardIcon from '@material-ui/icons/ArrowDownward';\n//import ArrowUpwardIcon from '@material-ui/icons/ArrowUpward';\n//import { NeuButton } from \"neumorphism-react\";\n//import { NeuDiv } from \"neumorphism-react\";\n//import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; \n//import { faRedo, faTimes } from '@fortawesome/free-solid-svg-icons';\n//import GitInfo from 'react-git-info/macro';\n\n\n\nconst useStyles = makeStyles((theme) =>\n createStyles({\n menuButton: {\n marginRight: theme.spacing(2),\n },\n title: { \n flexGrow: 1,\n color: theme.palette.getContrastText(deepOrange[500]),\n fontWeight: 600,\n lineHeight: \"50px\",\n //fontSize: \"16px\",\n verticalAlign:\"sub\",\n \n\n },\n caption: {\n color:theme.palette.getContrastText(deepOrange[500]),\n },\n iconButton: {\n //color: theme.palette.getContrastText(deepOrange[500]),\n },\n appBar: {\n flexGrow: 1,\n margin: 0,\n width: \"100%\",\n padding:\"5px 15px\"\n },\n clsIcon:{\n color:\"#FFF\",\n lineHeight: \"5!important\",\n marginTop: '15px'\n },\n btn: {\n margin: theme.spacing(1),\n background: \"#f26522\",\n color: \"#fff\",\n },\n \n modalHeader:{\n textAlign: 'center', \n color:'#fff',\n padding: \"11px\",\n background: \"#f26522\",\n borderTopLeftRadius: \"7px\",\n borderTopRightRadius: \"7px\",\n },\n\n//PAPER is for MODAL\n paper: {\n position: 'fixed',\n transform: \"translate(-50%, -50%)\",\n width: \"97%\", //Old value was 400px\n backgroundColor: theme.palette.background.paper,\n borderBottom: \"10px solid #f26522\",\n boxShadow: theme.shadows[5],\n borderRadius: \"10px\",\n color: '#162b75',\n opacity: \"0.95\",\n backgroundImage: \"radial-gradient(#f265227d 0.35px, #fff 0.35px)\",\n backgroundSize: \"7px 7px\",\n //border: \"2px solid #334\"\n //border: '2px solid #f26522',\n //padding: theme.spacing(2, 4, 3),\n //background: 'linear-gradient(45deg, #FE6B8B 30%, #FF8E53 90%)',\n //border: '2px solid #000',\n \n //boxShadow: '0 3px 5px 2px rgba(255, 105, 135, .3)',\n //color: 'white',\n //padding: theme.spacing(2, 4, 3),\n },\n \n\n }),\n);\n\nconst StyledRating = styled(Rating)(({ theme }) => ({\n '& .MuiRating-iconEmpty .MuiSvgIcon-root': {\n color: theme.palette.action.disabled,\n },\n}));\n\n// const hoverStyle = {\n// ':hover': {\n// color: 'green'\n// }\n// };\n\nconst smileySizeObj = {width:\"50px\",height:\"50px\"};\n\nconst customIcons = {\n 1: {\n icon: ,\n label: 'Very Dissatisfied',\n },\n 2: {\n icon: ,\n label: 'Dissatisfied',\n },\n 3: {\n icon: ,\n label: 'Neutral',\n },\n 4: {\n icon: ,\n label: 'Satisfied',\n },\n 5: {\n icon: ,\n label: 'Very Satisfied',\n }\n};\n\nfunction IconContainer(props) {\n const { value, ...other } = props;\n return {customIcons[value].icon};\n}\n\nIconContainer.propTypes = {\n value: PropTypes.number.isRequired,\n};\n\n\n//Rating ICON initialization \n// const customIcons = {\n// 1: {\n// icon: ,\n// label: 'Very Dissatisfied',\n// },\n// 2: {\n// icon: ,\n// label: 'Dissatisfied',\n// },\n// 3: {\n// icon: ,\n// label: 'Neutral',\n// },\n// 4: {\n// icon: ,\n// label: 'Satisfied',\n// },\n// 5: {\n// icon: ,\n// label: 'Very Satisfied',\n// },\n// };\n\n\n//const gitInfo = GitInfo();\n\nconst Appbar = (props) => {\n const classes = useStyles();\n\n //const [modalStyle] = React.useState(getModalStyle);\n const [open, setOpen] = React.useState(false);\n\n const [rating, setRating] = React.useState(false); //Rating\n\n const [errMsg, setErrMsg] = React.useState();\n \n const handleOpen = () => {\n setOpen(true);\n };\n\n const handleClose = () => {\n setOpen(false);\n };\n\n const onSendClicked = () => {\n window.parent.document.getElementById(\"actionTxt\").value = \"close\";\n let conv = props.conv;\n //console.log(\"TESTING :\"+ rating); \n if(rating !== false){\n setRating(\"Thanks for submitting your feedback!\");\n sendMessage(rating, conv.context)\n .then(conversation => {\n onCloseClick();\n })\n .catch(error => console.log(error));\n }else{\n setErrMsg(\"Please give rating above then click 'Submit' or click 'Close' to exit.\");\n setRating(false);\n }\n }\n\n\n const onCloseClick = ()=>{\n window.parent.document.getElementById(\"actionTxt\").value = \"close\";\n window.parent.document.getElementById(\"mainDiv\").classList.remove('bob-open-chat-iframe');\n //let botSrc = window.parent.document.getElementById(\"chatIframe\").src;\n //window.parent.document.getElementById(\"chatIframe\").src = botSrc;\n }\n\n const onMinimiseClick = () => {\n window.parent.document.getElementById(\"actionTxt\").value = \"minimise\";\n window.parent.document.getElementById(\"mainDiv\").classList.remove('bob-open-chat-iframe');\n }\n\n const onRefreshClick = () =>{\n window.parent.document.getElementById(\"actionTxt\").value = \"refresh\";\n let botSrc = window.parent.document.getElementById(\"chatIframe\").src;\n window.parent.document.getElementById(\"chatIframe\").src = botSrc;\n }\n\n\n return(\n \n {/* */}\n \n \n \n {/* */}\n \n \n \n \n \n \n \n \n Ask ADI\n \n {/* \n v2.1.5-beta\n */}\n \n {/* */}\n \n \n \n \n \n\n {/* \n \n \n \n \n \n \n \n \n \n
\n

It was great seeing you today !!!

\n
On exiting, all chat history will be cleared
\n

\n \n How would you rate your overall experience.\n\n customIcons[value].label}\n highlightSelectedOnly\n \n onChange={(event, value) => {\n setErrMsg(\"\");\n setRating(customIcons[value].label);\n }}\n />\n

{rating}
\n
{errMsg}
\n \n \n \n \n \n \n

\n
\n \n
*/}\n \n \n \n {/* */}\n \n {/* */}\n {/* \n \n */}\n
\n )\n}\n\nexport default Appbar;","export enum MessageDirection {\n SENT,\n RECEIVED,\n};\n\nexport enum MessageStatus {\n SENDING,\n RECEIVING,\n SENT,\n RECEIVED,\n ERROR_SENDING,\n ERROR_RECEIVING,\n UNKNOWN,\n}\n\nexport enum MessageType {\n TEXT,\n QUICK_RESPONSE,\n CARD,\n CARD_CAROUSEL,\n TEXT_LINK\n}\n\nexport default interface Message {\n messageIndex?:number;\n messageDirection?:MessageDirection;\n messageType?:MessageType;\n messageStatus?:MessageStatus;\n messageData?:any;\n}","import React from 'react';\nimport { makeStyles } from '@material-ui/core/styles';\nimport Paper from '@material-ui/core/Paper';\nimport { deepOrange, grey/*, red*/ } from '@material-ui/core/colors';\n//import { motion } from 'framer-motion';\nimport parse from 'html-react-parser';\n//import Zoom from '@mui/material/Zoom';\n\n//models\nimport Message, { MessageDirection } from '../models/Message';\nimport { errorMessage } from '../models/Constants';\n\n//import Grow from '@material-ui/core/Grow';\n\nimport Zoom from '@material-ui/core/Zoom';\n\nconst useStyles = makeStyles((theme) => ({\n adi: {\n //padding: theme.spacing(2),\n padding:\"13px\",\n maxWidth: '300px',\n color: theme.palette.getContrastText(grey[200]),\n backgroundColor: grey[200],\n //color: \"#fff\",\n //backgroundColor: \"#304284\",\n //backgroundColor:\"#5c6ba7\",\n borderRadius:20,\n borderTopRightRadius: 10,\n borderBottomLeftRadius: 0,\n fontWeight:400,\n },\n user: {\n //padding: theme.spacing(2),\n padding:\"13px\",\n maxWidth: '300px',\n color: theme.palette.getContrastText(deepOrange[500]),\n backgroundColor: deepOrange[500],\n //color:\"#FFF\",\n //backgroundColor:\"#ff693a\",\n borderRadius:20,\n borderTopLeftRadius: 10,\n borderBottomRightRadius: 0,\n fontWeight:100,\n },\n error: {\n //padding: theme.spacing(2),\n padding:\"13px\",\n maxWidth: '300px',\n //color: theme.palette.getContrastText(red[500]),\n color: \"#fff\",\n //backgroundColor: red[500],\n backgroundColor:\"#f44336\",\n borderRadius:20,\n borderTopRightRadius: 5,\n borderBottomLeftRadius: 0,\n fontWeight:100,\n },\n }));\n\nconst MessageBox = (props:any) => {\n const classes = useStyles();\n const message:Message = props.message;\n if (!message.messageData) {\n message.messageData = errorMessage[Math.floor(Math.random() * errorMessage.length)];\n }\n \n if(message.messageDirection===MessageDirection.RECEIVED){\n return (\n \n \n {parse(message.messageData)}\n \n \n );\n }else if(message.messageDirection===MessageDirection.SENT) {\n return (\n \n \n {parse(message.messageData)}\n \n \n );\n }else{\n return (\n \n \n {errorMessage[Math.floor(Math.random() * errorMessage.length)]}\n \n \n );\n }\n};\n\nexport default MessageBox;","import React from 'react';\nimport { makeStyles } from '@material-ui/core/styles';\nimport Paper from '@material-ui/core/Paper';\nimport { grey, red } from '@material-ui/core/colors';\n//import { motion } from 'framer-motion';\n//models\nimport Message from '../models/Message';\nimport { TextLinkResponse } from '../models/Conversation';\nimport { errorMessage } from '../models/Constants';\n\n//import Grow from '@material-ui/core/Grow';\n\nimport Zoom from '@material-ui/core/Zoom';\n\n//To make changes of Block card and PMSBY kind of msg response consult this file\nconst useStyles = makeStyles((theme) => ({\n adi: {\n padding: theme.spacing(2),\n maxWidth: '300px',\n color: theme.palette.getContrastText(grey[200]),\n backgroundColor: grey[200],\n borderRadius:20,\n borderTopRightRadius: 10,\n borderBottomLeftRadius: 0,\n },\n error: {\n padding: theme.spacing(2),\n maxWidth: '300px',\n color: theme.palette.getContrastText(red[500]),\n backgroundColor: red[500],\n borderRadius:20,\n borderTopRightRadius: 5,\n borderBottomLeftRadius: 0,\n },\n a: {\n textDecoration:\"underline\"\n }\n }));\n\nconst MessageTextLink = (props:any) => {\n const classes = useStyles();\n const message:Message = props.message;\n if (!message.messageData) {\n message.messageData = errorMessage[Math.floor(Math.random() * errorMessage.length)];\n return (\n \n \n {message.messageData}\n \n \n );\n }\n else {\n const textLink:TextLinkResponse = message.messageData as TextLinkResponse;\n return (\n \n
\n \n );\n }\n \n};\n\nexport default MessageTextLink;","import React from 'react';\nimport { makeStyles } from '@material-ui/core/styles';\nimport Grid from '@material-ui/core/Grid';\nimport Button from '@material-ui/core/Button';\nimport { grey } from '@material-ui/core/colors';\nimport Badge from '@material-ui/core/Badge';\nimport Box from '@material-ui/core/Box';\n// models\nimport Message from '../models/Message';\nimport { Option } from '../models/Conversation';\n//import { motion } from 'framer-motion';\n\n//import Grow from '@material-ui/core/Grow';\n\nimport Zoom from '@material-ui/core/Zoom';\n\n\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n flexGrow: 1,\n },\n paper: {\n padding: theme.spacing(2),\n textAlign: 'center',\n color: theme.palette.text.secondary,\n },\n adi: {\n padding: theme.spacing(2),\n maxWidth: '300px',\n color: theme.palette.getContrastText(grey[200]),\n backgroundColor: grey[200],\n borderRadius:20,\n borderTopRightRadius: 5,\n borderBottomLeftRadius: 0,\n },\n button: {\n textTransform: \"none\",\n borderRadius: '18px',\n padding: '5px 10px',\n background: 'rgba(22,43,117,.1)',\n color: '#162b75',\n border: 'none',\n fontSize: '.75rem',\n fontFamily: 'Arial',\n \n \"&:hover\":{\n background: '#162b75',\n color: '#fff',\n border: 'none'\n } \n }\n }));\n\nconst QuickResponse = (props:any) => {\n const classes = useStyles();\n const message:Message = props.message\n return (\n
\n \n {message.messageData.map((option:Option, index:number)=>{\n if(option.isNew){\n return ( \n \n \n \n \n \n \n \n );\n }\n else {\n return(\n \n \n \n \n \n \n \n ); \n }\n })}\n \n
\n );\n};\n\nexport default QuickResponse;","import React from 'react';\nimport { makeStyles } from '@material-ui/core/styles';\nimport Card from '@material-ui/core/Card';\nimport CardHeader from '@material-ui/core/CardHeader';\nimport CardMedia from '@material-ui/core/CardMedia';\n//import CardContent from '@material-ui/core/CardContent';\nimport CardActions from '@material-ui/core/CardActions';\n//import Typography from '@material-ui/core/Typography';\n//import Button from '@material-ui/core/Button';\nimport Box from '@material-ui/core/Box';\n\n// models\nimport Message from '../models/Message';\nimport { Option, CardResponse } from '../models/Conversation';\nimport Link from '@material-ui/core/Link';\n\n\n\n\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n flexGrow: 1,\n width: 315, // TO ADJUST VIA MEDIA QUERY\n },\n media: {\n height: 0,\n paddingTop: '56.25%', // 16:9\n }\n }));\n\nconst MessageCard = (props:any) => {\n const classes = useStyles();\n const message:Message = props.message\n const card: CardResponse = message.messageData;\n //alert(card.description);\n return (\n \n \n \n \n \n \n {/* \n \n {card.description}\n \n */}\n \n \n {card.actions.map((option:Option) => {\n return (\n \n {option.label}\n \n );\n })}\n \n \n \n );\n};\n\nexport default MessageCard;","import React from 'react';\nimport { makeStyles } from '@material-ui/core/styles';\nimport Box from '@material-ui/core/Box';\nimport MessageCard from './MessageCard';\nimport { MDBCarousel, MDBCarouselInner, MDBCarouselItem, MDBView, MDBContainer } from\"mdbreact\";\n// models\nimport Message from '../models/Message';\n// styles\nimport './MessageCardCarousel.css';\n\n\n\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n flexGrow: 1,\n display: \"flex\",\n justifySelf: \"flex-start\",\n justifyContent: \"flex-start\",\n justifyItems: \"flex-start\",\n paddingLeft: 0,\n marginLeft: 0,\n lineHeight:\"50px\"\n },\n carousel: {\n },\n media: {\n height: 0,\n paddingTop: '56.25%', // 16:9\n },\n }));\n\nconst MessageCardCarousel = (props:any) => {\n const classes = useStyles();\n const cardsMessageList: Message[] = props.message.messageData;\n let itemCount = 0;\n return (\n \n \n 1 ? true:false}\n showIndicators={true}\n slide={true}\n className=\"z-depth-1\"\n >\n \n {\n cardsMessageList.map(message => {\n ++itemCount;\n return (\n \n \n \n \n \n ); \n })\n }\n \n \n \n \n );\n};\n\n\n\nexport default MessageCardCarousel;","import React from 'react';\nimport { makeStyles } from '@material-ui/core/styles';\nimport CssBaseline from '@material-ui/core/CssBaseline';\nimport Avatar from '@material-ui/core/Avatar';\nimport Box from '@material-ui/core/Box';\nimport { grey } from '@material-ui/core/colors';\nimport { Typography } from '@material-ui/core';\nimport LogoAvatar from './LogoAvatar';\n// components\nimport MessageBox from './MessageBox';\nimport MessageTextLink from './MessageTextLink';\nimport QuickResponse from './QuickResponse';\nimport MessageCard from './MessageCard';\n// models\nimport Message, { MessageDirection, MessageStatus, MessageType } from '../models/Message';\nimport MessageCardCarousel from './MessageCardCarousel';\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n '& > *': {\n margin: theme.spacing(1),\n },\n width: '100%',\n },\n\n box: {\n //margin: theme.spacing(1),\n },\n status: {\n marginLeft: theme.spacing(1),\n marginRight: theme.spacing(1),\n marginTop: theme.spacing(0),\n marginBottom: theme.spacing(0),\n },\n avatar: {\n color: \"theme.palette.getContrastText(grey[200])\",\n backgroundColor: \"grey[200]\",\n objectFit: \"cover\",\n marginLeft: theme.spacing(0),\n marginRight: theme.spacing(0),\n marginTop: theme.spacing(0),\n marginBottom: theme.spacing(0),\n },\n avatarArea: {\n color: \"theme.palette.getContrastText(grey[200])\",\n backgroundColor: \"grey[50]\",\n width: '40px',\n maxWidth: '40px',\n minWidth: '40px',\n marginLeft: theme.spacing(0),\n marginRight: theme.spacing(2),\n marginTop: theme.spacing(0),\n marginBottom: theme.spacing(0),\n },\n statusText: {\n color: grey[500],\n }\n }));\n \nconst RenderReceivedMessage = (props:any) => {\n const classes = useStyles();\n const message:Message = props.message;\n //const dt = new Date();\n return (\n
\n \n {\n (()=>{\n switch(message.messageType){\n case MessageType.QUICK_RESPONSE: return (\n {/**Added BY SKY */}\n \n \n \n );\n case MessageType.CARD: return (\n \n {/* COMMENTED OUT TO REMOVE EXTRA SPACE ON LEFT */}\n \n \n );\n case MessageType.CARD_CAROUSEL: return (\n \n {/* COMMENTED OUT TO REMOVE EXTRA SPACE ON LEFT */}\n \n \n );\n case MessageType.TEXT_LINK: return (\n \n \n \n \n );\n case MessageType.TEXT:default: return (\n \n \n \n {/* \n \n {\n (() => {\n const dt = new Date();\n return (dt.toLocaleTimeString([], {hour: '2-digit', minute:'2-digit'}));\n })()\n }\n \n */}\n \n );\n }\n })()\n }\n \n {/* \n \n {\n (() => {\n return (dt.toLocaleTimeString([], {hour: '2-digit', minute:'2-digit'}));\n })()\n }\n \n */}\n \n
\n );\n}\n\nconst RenderSentMessage = (props:any) => {\n const classes = useStyles();\n const message:Message = props.message as Message;\n const dt = new Date();\n return ( \n
\n \n \n \n \n \n \n {\n (() => {\n switch(message.messageStatus) {\n case MessageStatus.SENDING: return \"sending...\";\n case MessageStatus.SENT: return (dt.toLocaleTimeString([], {hour: '2-digit', minute:'2-digit'}));\n default: return '';\n }\n })()\n }\n \n \n
\n );\n}\n \nconst ChatItem = (props:any) => {\n const classes = useStyles();\n const message:Message = props.message;\n if(props.message.messageDirection===MessageDirection.RECEIVED){\n return \n }else if(props.message.messageDirection===MessageDirection.SENT){\n return \n }else{\n return ( \n
\n \n \n ! \n
Something went wrong!
\n
\n
\n );\n } \n};\n\nexport default ChatItem;","import React, { useState } from 'react'\nimport AppBar from '@material-ui/core/AppBar';\nimport Box from '@material-ui/core/Box';\nimport Grid from '@material-ui/core/Grid';\nimport { createStyles, makeStyles } from '@material-ui/core/styles';\nimport { grey } from '@material-ui/core/colors';\nimport SendIcon from '@material-ui/icons/Send';\nimport clsx from 'clsx';\nimport OutlinedInput from '@material-ui/core/OutlinedInput';\nimport FormControl from '@material-ui/core/FormControl';\nimport Paper from '@material-ui/core/Paper';\nimport KeyboardOutlinedIcon from '@material-ui/icons/KeyboardOutlined';\nimport Menu from '@material-ui/core/Menu';\nimport MenuItem from '@material-ui/core/MenuItem';\nimport Button from '@material-ui/core/Button';\nimport Modal from '@material-ui/core/Modal';\n\nlet googleTransliterate = require('google-input-tool');\nconst chatbotLang = process.env.REACT_APP_LANG;\nlet placeholderVal = \"Type Your Query\";\nif(chatbotLang === \"HI\"){\n placeholderVal = \"अपना प्रश्न बताएं\"\n}\n\n//import TextField from '@material-ui/core/TextField';\n//import { NeuTextInput } from \"neumorphism-react\";\n//import { NeuButton } from \"neumorphism-react\";\n//import { NeuDiv } from \"neumorphism-react\";\n//import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; \n//import { faPaperPlane } from '@fortawesome/free-solid-svg-icons'\n// import Visibility from '@material-ui/icons/Visibility';\n// import VisibilityOff from '@material-ui/icons/VisibilityOff';\n//import InputLabel from '@material-ui/core/InputLabel';\n// import InputAdornment from '@material-ui/core/InputAdornment';\n// import FormHelperText from '@material-ui/core/FormHelperText';\n//import IconButton from '@material-ui/core/IconButton';\n//import Input from '@material-ui/core/Input';\n//import FilledInput from '@material-ui/core/FilledInput';\n\nconst useStyles = makeStyles((theme) =>\n createStyles({\n root: {\n flexGrow: 1,\n height: \"100%\",\n margin: theme.spacing(1)\n },\n appbar: {\n top: 'auto',\n bottom: 0,\n backgroundColor: grey[100],\n borderColor: grey[700],\n },\n textField: {\n width: \"100%\",\n },\n box:{\n top: 'auto',\n bottom: 0,\n borderColor: grey[700],\n },\n send:{\n marginTop: \"5px\",\n color:\"#ff693a\"\n },\n msgText:{\n // borderRadius: \"50px !important\",\n // backgroundColor: \"#FFF !important\",\n //border: \"1px solid #162b75\",\n height:\"45px\",\n //color:\"#162b75\"\n },\n paper: {\n padding: theme.spacing(1),\n textAlign: 'center',\n color: theme.palette.text.secondary,\n //backgroundColor: \"#F0F0F0\",\n borderRadius: \"0\",\n borderBottom: \"5px solid #ff693a\"\n },\n\n btn: {\n margin: theme.spacing(1),\n background: \"#f26522\",\n color: \"#fff\",\n },\n\n modalHeader:{\n textAlign: 'center', \n color:'#fff',\n padding: \"11px\",\n background: \"#f26522\",\n borderTopLeftRadius: \"7px\",\n borderTopRightRadius: \"7px\",\n },\n\n modal: {\n position: 'fixed',\n transform: \"translate(-50%, -50%)\",\n width: \"97%\", //Old value was 400px\n backgroundColor: theme.palette.background.paper,\n borderBottom: \"10px solid #f26522\",\n boxShadow: theme.shadows[5],\n borderRadius: \"10px\",\n color: '#162b75',\n opacity: \"0.95\",\n backgroundImage: \"radial-gradient(#f265227d 0.35px, #fff 0.35px)\",\n backgroundSize: \"7px 7px\",\n //border: \"2px solid #334\"\n //border: '2px solid #f26522',\n //padding: theme.spacing(2, 4, 3),\n //background: 'linear-gradient(45deg, #FE6B8B 30%, #FF8E53 90%)',\n //border: '2px solid #000',\n \n //boxShadow: '0 3px 5px 2px rgba(255, 105, 135, .3)',\n //color: 'white',\n //padding: theme.spacing(2, 4, 3),\n },\n}));\n\nconst ChatInput = (props) => {\n const classes = useStyles();\n const [ isSendDisabled, setIsSendDisabled ] = useState(true);\n const [ chatInputText, setChatInputText ] = useState (\"\");\n const [ chatLanguage, setChatLanguage ] = useState (chatbotLang);\n const [open, setOpen] = React.useState(false); //For Modal\n\n const [anchorEl, setAnchorEl] = React.useState(null);\n\n //alert(chatbotLang === \"EN\")\n\n // const handleModalOpen = () => {\n // setOpen(true);\n // };\n\n const handleModalClose = () => {\n setOpen(false);\n window.parent.document.getElementById(\"chatIframe\").src = \"https://www.bankofbaroda.in/chat/bob/countrywebsite/india/build2/hi/index.html\"; //Set Hindi Chatbot URL\n }; \n //const google = window.google = window.google ? window.google : {};\n //const google = window.google;\n let inputLanguage = 'ne-t-i0-und';\n let maxResult = 8;\n let request = new XMLHttpRequest();\n\n const onInputChange = (event) => {\n // console.log(event.target.value);\n if(event.target.value !== \"\"){\n setIsSendDisabled(false);\n }else{\n setIsSendDisabled(true);\n }\n setChatInputText(event.target.value);\n }\n\n const onKeyDownHandler = (event) => {\n if((chatbotLang === \"HI\" && chatLanguage === \"HI\") && (event.key === \" \" || event.key === 'Tab')){\n googleTransliterate(request, chatInputText, inputLanguage, maxResult)\n .then(function(response) {\n //console.log('Transliterated Text: ', response[0][0]);\n setChatInputText(response[0][0]+\" \");\n });\n }\n if (event.key === 'Enter') {\n onSendClicked();\n }\n }\n\n const onSendClicked = () => {\n // console.log(chatInputText);\n // console.log(\"SKY : \"+document.getElementById(\"transliterateTextarea\").value)\n if(chatInputText !== \"\"){\n props.chatInputHandler(chatInputText);\n setChatInputText(\"\");\n setIsSendDisabled(true);\n }\n }\n\n\n const handleClick = (event) => {\n setAnchorEl(event.currentTarget);\n };\n\n const handleLangChange = (event) => {\n setAnchorEl(null);\n // console.log(event.target.dataset.lang);\n setChatLanguage(event.target.dataset.lang);\n if(event.target.dataset.lang === \"HI\" && chatbotLang !== \"HI\"){\n setOpen(true);\n document.getElementById(\"txtChat\").placeholder = \"अपना प्रश्न बताएं\"; \n }\n\n if(event.target.dataset.lang === \"EN\" && chatbotLang !== \"EN\"){\n document.getElementById(\"txtChat\").placeholder = \"Type your query\";\n window.parent.document.getElementById(\"chatIframe\").src = \"https://www.bankofbaroda.in/chat/bob/countrywebsite/india/build2/en/index.html\"; // Set English Chatbot URL\n }\n\n setChatInputText(\"\");\n };\n\n \n\n return (\n \n \n {/* */}\n \n \n \n \n \n \n \n \n\n {/* \n \n \n {chatbotLang === \"HI\" &&\n English\n }\n {chatbotLang === \"EN\" &&\n Hindi\n }\n \n \n
\n

अस्वीकरण

\n
\n पाठ आपकी भाषा में अनुवादित किया जाएगा और हो सकता है कि पुरी तरह सटीक ना हो। \n अधिक स्पष्टता के लिए, कृपया हमारे फोनबैंकिंग प्रतिनिधि से संपर्क करें या अपनी निकटतम शाखा पर जाएं।\n
\n

\n \n \n \n

\n
\n \n
*/}\n\n \n \n \n
\n
\n
\n {/*
*/}\n
\n
\n ) \n};\n\nexport default ChatInput;"," import React, { useEffect, useState } from 'react'\n import Box from '@material-ui/core/Box';\n import Typography from '@material-ui/core/Typography';\n import { createStyles, makeStyles, Theme } from '@material-ui/core/styles';\n //import { deepOrange } from '@material-ui/core/colors';\n import { MDBCarousel, MDBCarouselInner, MDBCarouselItem, MDBView, MDBContainer } from\"mdbreact\";\n import { useScrollPosition } from '@n8tb1t/use-scroll-position';\n //import default_banners from \"../bob_banners.json\";\n //import axios from 'axios';\n //import { GenericResponse } from '../models/Conversation';\n\n import Slide from '@material-ui/core/Slide';\n //import CssBaseline from '@material-ui/core/CssBaseline';\n import useScrollTrigger from '@material-ui/core/useScrollTrigger';\n //import Toolbar from '@material-ui/core/Toolbar';\n import PropTypes from 'prop-types';\n import CircularProgress from '@material-ui/core/CircularProgress';\n\n //const URL:string = \"https://api.us-south.assistant.watson.cloud.ibm.com/v1/workspaces/f038a7e7-ab28-440a-9a72-053465104446/message?version=2020-04-01\"\n\n // const API_KEY = process.env.REACT_APP_API_KEY!;\n // const API_USERNAME = process.env.REACT_APP_USERNAME!;\n\n // let URL:string = \"\";\n // if(process.env.REACT_APP_LANG === \"HI\"){\n // URL = process.env.REACT_APP_HIN_URL!;\n // }else{\n // URL = process.env.REACT_APP_ENG_URL!;\n // }\n\n //let carousalItem: { id: number, img: string, link: string }[] = [];\n //let showCarousal:boolean = false;\n const useStyles = makeStyles((theme: Theme) =>\n createStyles({\n root: {\n //backgroundColor: deepOrange[500],\n margin: 0,\n padding: 0,\n flexGrow: 1,\n height: \"100%\",\n //marginTop:\"100px\"\n },\n title: { \n margin: \"-1px\",\n paddingLeft: 10,\n paddingRight: 10,\n flexGrow: 1, \n color:\"#fff\",\n //color: theme.palette.getContrastText(deepOrange[500])\n //color: \"rgb(0, 75, 145)\",\n //color: \"#162b75\",\n fontFamily: \"Roboto,Helvetica,Arial,sans-serif\",\n //fontWeight: 100,\n //fontSize:\"1.2em\",\n lineHeight:\"1.46em\"\n },\n spacer: {\n marginTop: '15px'\n //background: \"linear-gradient(to bottom, #ff5722, #ff8a65, #ffab91, #ffccbc, #fbe9e7, #fafafa)\",\n },\n carouselContainer: {\n height: \"70%\",\n width: \"75%\",\n maxWidth: \"400px\",\n padding: 0,\n },\n carouselView: {\n height: \"100%\",\n },\n hidediv:{\n //height:\"\",\n paddingBottom:\"10px\",\n backgroundColor: \"#ff5722\",\n // position: \"fixed\",\n width:\"100%\",\n //top:\"0\",\n //display:\"block\"\n }\n }));\n\n function HideOnScroll(props) {\n const { children, window } = props;\n // Note that you normally won't need to set the window ref as useScrollTrigger\n // will default to window.\n // This is only being set here because the demo is in an iframe.\n const trigger = useScrollTrigger({ target: window ? window() : undefined });\n \n return (\n \n {children}\n \n );\n }\n \n HideOnScroll.propTypes = {\n children: PropTypes.element.isRequired,\n /**\n * Injected by the documentation to work in an iframe.\n * You won't need it on your project.\n */\n window: PropTypes.func,\n };\n\n const IntroCarousel = (props:any) => {\n\n const [isLoaded, setIsLoaded] = useState(true);\n const [showCarousal, setShowCarousal] = useState(false);\n const [carousalItem, setCarousalItem] = useState([]);\n const [error, setError] = useState(null);\n\n const classes = useStyles();\n let greeting = \"\";\n let d = new Date(),\n time = d.getHours();\n \n if (time < 12) {\n greeting = \"Good Morning!\";\n }\n \n if (time >= 12 && time < 16) {\n greeting = \"Good Afternoon!\";\n }\n\n if (time >= 16) {\n greeting = \"Good Evening!\";\n }\n \n useScrollPosition(({ prevPos, currPos }:any) => {\n props.scrollCallback(prevPos.y, currPos.y);\n });\n\n \n \n //function GetCarousalData(){\n // useEffect(() => {\n \n // //alert(typeof API_KEY);\n // axios.post(\n // URL,\n // {\n // input: {\n // text: \"Hello\"\n // }\n // },\n // {\n // headers: {'Content-Type':'application/json'},\n // auth: {username:API_USERNAME,password: API_KEY }\n // }\n // ).then(function (response) {\n // setIsLoaded(true);\n // console.log(\"Heeeeeeeeeeeera\");\n // console.log((response.data.context.showCarousal === \"true\"));\n // console.log(response.data.context.showCarousal);\n // carousalItem = response.data.context.displayCarousel;\n // showCarousal = (response.data.context.showCarousal === \"true\");\n // })\n // // console.log(showCarousal);\n // // console.log(typeof showCarousal);\n // }, []);\n\n // useEffect(() => {\n // fetch(URL, {\n // method:'POST',\n // headers: new Headers({\n // 'Content-Type':'application/json',\n // 'Authorization': 'Basic ' + btoa(API_USERNAME + \":\" + API_KEY) \n // }),\n // body: JSON.stringify({\n // input: {\n // text: \"Hello\"\n // }\n // })\n // })\n // .then(res => res.json())\n // .then(\n // (response) => {\n // //console.log(JSON.stringify(response.context.showCarousal));\n // response.context.showCarousal === \"true\"? setShowCarousal(true):setShowCarousal(false); \n // setCarousalItem(response.context.displayCarousel);\n // setIsLoaded(true);\n // //setItems(result);\n // //console.log(\"Loki : \"+ carousalItem);\n // //console.log(JSON.stringify(carousalItem.length));\n // },\n // // Note: it's important to handle errors here\n // // instead of a catch() block so that we don't swallow\n // // exceptions from actual bugs in components.\n // (error) => {\n // setIsLoaded(true);\n // setError(error);\n // }\n // )\n // }, [])\n \n // }\n\n if(error){\n return

Error: {error}

;\n \n }else if (!isLoaded) {\n return ;\n }else{\n return (\n \n \n
\n \n {/*
*/}\n
{greeting}
\n Welcome to Bank of Baroda, this is ADI, your virtual assistant.\n {/* If you need help simply type your question or choose from the options provided below. */}\n \n {/*
*/}\n
\n {/* \n \n Please don't enter confidential data in this chat.\n \n */}\n
\n
\n \n \n {/*isLoaded &&*/ (() => {\n // GetCarousalData();\n //console.log(carousalItem.length + \" showCarousal : \"+ showCarousal);\n if(showCarousal){\n \n return ( \n \n \n \n {carousalItem.map(function(element){\n //alert(JSON.stringify(banner));\n return \n \n \n \"Slide\"\n\n \n \n \n })}\n \n \n \n \n );\n }\n })()\n }\n \n \n
\n )\n } \n };\n\n export default IntroCarousel;\n\n","import Message, { MessageDirection, MessageStatus, MessageType} from '../models/Message';\nimport { GenericResponse, TextResponse, TextLinkResponse, OptionResponse, Option, ImageResponse, CardResponse } from '../models/Conversation';\n\nexport const parseMessageText = (genResponse: GenericResponse, index:number):Message => {\n const msg:Message = {\n messageIndex: index,\n messageDirection: MessageDirection.RECEIVED,\n messageStatus: MessageStatus.RECEIVED,\n messageType: MessageType.TEXT,\n messageData: (genResponse.response as TextResponse).text\n }\n return msg;\n}\n\nexport const parseMessageTextLink = (genResponse: GenericResponse, index:number):Message => {\n const msgText:string = (genResponse.response as TextResponse).text;\n const textLink:TextLinkResponse = {\n text: msgText\n }\n const msg:Message = {\n messageIndex: index,\n messageDirection: MessageDirection.RECEIVED,\n messageStatus: MessageStatus.RECEIVED,\n messageType: MessageType.TEXT_LINK,\n messageData: textLink\n }\n return msg;\n}\n\nexport const parseMessageOption = (genResponse: GenericResponse, index:number):Message[] => {\n const msgList:Message[] = [];\n let msg:Message = {\n messageIndex: index,\n messageDirection: MessageDirection.RECEIVED,\n messageStatus: MessageStatus.RECEIVED,\n messageType: MessageType.TEXT,\n messageData: (genResponse.response as OptionResponse).title\n }\n msgList.push(msg);\n\n msg = {\n messageIndex: index+1,\n messageDirection: MessageDirection.RECEIVED,\n messageStatus: MessageStatus.RECEIVED,\n messageType: MessageType.QUICK_RESPONSE,\n messageData: (genResponse.response as OptionResponse).options\n }\n msgList.push(msg);\n\n return msgList;\n}\n\nexport const parseMessageImage = () => {\n \n}\n\nexport const parseMessageSuggestion = () => {\n\n}\n\nexport const parseMessageCardCarousel = (genResponses: GenericResponse[], index:number, length:number, messagesLength:number):Message => {\n const msgCardList: Message[] = parseMessageCard(genResponses, index, length, messagesLength);\n const msg:Message = {\n messageIndex: messagesLength,\n messageDirection: MessageDirection.RECEIVED,\n messageStatus: MessageStatus.RECEIVED,\n messageType: MessageType.CARD_CAROUSEL,\n messageData: msgCardList\n };\n return msg;\n}\n\nexport const parseMessageCard = (genResponses: GenericResponse[], index:number, length:number, messagesLength:number):Message[] => {\n const msgList:Message[] = [];\n for (let i = index; i < length*2; i=i+2) {\n const imageResponseIndex: number = i;\n const optionResponseIndex: number = i + 1;\n const title: string = (genResponses[optionResponseIndex].response as OptionResponse).title\n const description: string = (genResponses[optionResponseIndex].response as OptionResponse).description!\n const media: ImageResponse = genResponses[imageResponseIndex].response as ImageResponse\n const actions: Option[] = (genResponses[optionResponseIndex].response as OptionResponse).options\n const card: CardResponse = {\n actions: actions,\n description: description,\n media: media,\n title: title\n }\n const msg:Message = {\n messageIndex: messagesLength + 100,\n messageDirection: MessageDirection.RECEIVED,\n messageStatus: MessageStatus.RECEIVED,\n messageType: MessageType.CARD,\n messageData: card\n }\n msgList.push(msg);\n messagesLength += 1;\n }\n \n return msgList;\n}\n","import React from 'react';\nimport List from '@material-ui/core/List';\nimport Box from '@material-ui/core/Box';\nimport { grey } from '@material-ui/core/colors';\nimport { ListItem } from '@material-ui/core';\nimport CssBaseline from '@material-ui/core/CssBaseline';\n// components\nimport Appbar from './Appbar';\nimport ChatItem from './ChatItem';\nimport ChatInput from './ChatInput';\nimport IntroCarousel from './IntroCarousel';\n//models\nimport Message, { MessageDirection, MessageStatus, MessageType } from '../models/Message';\nimport Conversation, { Option } from '../models/Conversation';\nimport { errorMessage } from '../models/Constants';\n//services\nimport { sendMessage } from '../services/WatsonService';\nimport { parseMessageText, parseMessageTextLink, parseMessageOption, parseMessageCardCarousel } from '../services/ConversationParser';\n\nlet count = 0;\nexport default class ChatArea extends React.Component <{closeHandler:any}, { initBot:boolean, inConversation: boolean, messages:Message[], conversation?: Conversation, showIntro?:boolean, elevateAppbar?:boolean }> { \n messagesEndRef:any = React.createRef(); //This was use to scroll to bottom. Removed as now message list is cleared on new message.\n constructor(props:any) {\n super(props);\n this.state = {\n inConversation: false,\n messages: [],\n showIntro: true,\n elevateAppbar: false,\n initBot: false,\n conversation: ({\n \"context\": {\n \"display_option\": [\"option\"]\n },\n \"genericResponses\": [{\n \"responseType\": \"text\",\n \"response\": {\n \"title\": \"Please click below option to start conversation\",\n \"options\": [{\n \"label\": \"Hello\",\n \"value\": \"Hello\",\n \"isNew\": false\n }]\n }\n }]\n } as Conversation)\n };\n }\n \n \n componentDidMount(){\n\n this.addConversationToMessage((this.state.conversation)!)\n this.scrollToBottom(); //This is used to scroll to bottom.\n if(!this.state.showIntro) { this.scrollToBottom(); } //This was use to scroll to bottom. Removed as now message list is cleared on new message.\n }\n\n componentDidUpdate() {\n \n //console.log(\"COUNT: \"+ count);\n if(count === 0){\n count++;\n }else{\n this.scrollToBottom(); //This is used to scroll to bottom.\n }\n \n if(!this.state.showIntro) { this.scrollToBottom(); } //This was use to scroll to bottom. Removed as now message list is cleared on new message.\n }\n\n scrollToBottom = () => {\n //this.messagesEndRef.scrollIntoView({ behavior: \"smooth\" });\n this.messagesEndRef.current.scrollIntoView({ behavior: 'smooth' }); //This is used to scroll to bottom.\n }\n\n actions = {\n quickResponseHandler: (messageIndex:number, responseValue:any)=>{\n if(this.state.showIntro){\n this.setState({showIntro: false, elevateAppbar: true});\n }\n \n const tempMessages = [...this.state.messages];\n \n //console.log(\"quickResponseHandler TEMPMSG : \"+JSON.stringify(tempMessages));\n const responseItemIndex:number = tempMessages.findIndex(msg => {\n return msg.messageIndex === messageIndex\n }); \n //console.log(\"responseItemIndex 1 :\"+responseItemIndex);\n \n const registeredResponseIndex:number = tempMessages[responseItemIndex].messageData.findIndex((opt:Option) => {\n return (opt.value).toLowerCase() === (responseValue as string).toLowerCase()\n })\n const registeredResponse:Option = {...tempMessages[responseItemIndex].messageData[registeredResponseIndex]} as Option\n \n\n /*#################################################################*/\n\n /*\n * This block of code is written to handle the chatbot context in case\n * someone tried to change the topic/context. In case of change in \n * context the \"sameContext\" flag will be \"False\" otherwise True\n * and if \"sameContext is False\" we are taking \"lastInput\" as \n * a message/input for the chatbot to give proper response\n */\n let msgToSend = registeredResponse.label;\n \n \n if(this.state.conversation?.context.sameContext === false && registeredResponse.label.toLowerCase() === \"yes\")\n msgToSend = \"Yes\";\n \n /*#################################################################*/\n\n const newMsg = {\n messageIndex:responseItemIndex+1,\n messageDirection:MessageDirection.SENT,\n messageStatus:MessageStatus.SENDING,\n messageType: MessageType.TEXT,\n messageData: msgToSend\n }\n //tempMessages[responseItemIndex] = newMsg;\n tempMessages.push(newMsg);\n\n let conv:Conversation = {...this.state.conversation}\n //console.log(conv)\n \n\n sendMessage(this.state.conversation?.context.sameContext === false && registeredResponse.label.toLowerCase() === \"yes\"?\n this.state.conversation?.context.lastInput:registeredResponse.label, conv.context) \n // Above condition Added on 04 October for handling the Yes/No digression on both quick response\n .then(conversation => {\n const newConv: Conversation = conversation as Conversation;\n let lastSendingMsg: Message = tempMessages[tempMessages.length-1];\n lastSendingMsg.messageStatus = MessageStatus.SENT;\n tempMessages[tempMessages.length-1] = lastSendingMsg;\n // console.log(\"SKYY: \"+ JSON.stringify(tempMessages));\n this.setState({conversation: newConv, messages: tempMessages});\n // console.log(registeredResponse.label)\n if(newConv.context.conversation_id){\n this.setState({initBot:true});\n }\n\n //console.log(\"LOKIIII : \"+ JSON.stringify(newConv));\n this.addConversationToMessage(newConv); \n })\n .catch(error => console.log(error));\n },\n\n sentMessageStatusHandler: () => {\n\n },\n\n chatInputSendHandler: (value:any) => {\n if(this.state.showIntro){\n this.setState({showIntro: false, elevateAppbar: true});\n }\n const tempMessages = [...this.state.messages];\n \n const newMsg = {\n messageIndex: tempMessages.length,\n messageDirection:MessageDirection.SENT,\n messageStatus:MessageStatus.SENDING,\n messageType: MessageType.TEXT,\n messageData: value\n }\n tempMessages.push(newMsg);\n this.setState({messages: tempMessages});\n // alert(value);\n\n \n let conv:Conversation = {...this.state.conversation}\n //alert(typeof value)\n sendMessage(this.state.conversation?.context.sameContext === false && value.toLowerCase() === \"yes\"?\n this.state.conversation?.context.lastInput:value, conv.context)\n // Above condition added on 04 October for handling the Yes/No digression on both input and quick response above\n .then(conversation => {\n const newConv: Conversation = conversation as Conversation;\n let lastSendingMsg: Message = tempMessages[tempMessages.length-1];\n lastSendingMsg.messageStatus = MessageStatus.SENT;\n tempMessages[tempMessages.length-1] = lastSendingMsg;\n this.setState({conversation: newConv, messages: tempMessages});\n this.addConversationToMessage((conversation as Conversation)!);\n })\n .catch(error => console.log(error));\n },\n\n\n \n // resetHandler: () => {\n // this.setState({conversation: undefined, messages: []})\n\n // startConversation()\n // .then(conversation => {\n // this.setState({conversation: (conversation as Conversation)!})\n // this.addConversationToMessage((conversation as Conversation)!)\n // })\n // .catch(error => console.log(error));\n // this.scrollToBottom();\n // },\n\n // closeHandler: () => {\n // console.log(\"**** CLOSE HANDLER ****\");\n // },\n\n introScrollCallback: (previousY:number, currentY:number) => {\n if(this.state.showIntro) {\n if(currentY > previousY) {\n this.setState({elevateAppbar: false})\n }else if(currentY < previousY) {\n this.setState({elevateAppbar: true})\n }\n }\n }\n\n }\n\n IntroComponent = () => {\n if(!this.state.showIntro){\n return null\n }else {\n return \n }\n }\n\n render(){\n document.title = \"ADI\";\n return (\n
\n \n \n \n \n \n \n \n {this.state.messages.map((message) => {\n return (\n {/* Key attribute added on 30-AUG-2022 */}\n \n \n \n \n )\n })}\n
{/* Used to scroll to bottom*/}\n \n \n
\n {this.state.initBot?:\"\"}\n
\n );\n }\n\n addConversationToMessage(conversation:Conversation){\n \n //const tempMessages = [...this.state.messages]; //comment this if uncommenting below logic.\n //logic to remove all previous message but 1, and clear screen. Last user input is kept.\n //console.log(\"addConversationToMessage : \"+JSON.stringify(this.state.messages));\n\n const tempMessages = [...this.state.messages];//.reverse();\n //console.log(\"addConversationToMessage TEMPMSG : \"+JSON.stringify(tempMessages));\n //console.log(tempMessages.length);\n // while (tempMessages.length > 1) {\n // tempMessages.pop()\n // }\n if(tempMessages.length > 0){\n const repMsg:Message = tempMessages[0];\n repMsg.messageIndex = 0;\n tempMessages[0] = repMsg;\n }\n //logic ends here\n //console.log(\"GUDDDUUU : \"+ JSON.stringify(conversation));\n let convIndex = 0;\n //HANDLE OPTIONS ERROR HERE SKY\n if(!conversation.context.display_option){\n conversation.context.display_option = [\"undefined\"];\n }\n \n conversation.context.display_option.forEach((dispopt:any) => {\n //console.log(\"SKY : \"+dispopt);\n switch(dispopt){\n case \"text\":\n tempMessages.push(parseMessageText(conversation.genericResponses![convIndex],tempMessages.length));\n convIndex += 1;\n break;\n case \"text_link\":\n tempMessages.push(parseMessageTextLink(conversation.genericResponses![convIndex],tempMessages.length));\n convIndex += 1;\n break;\n case \"option\": \n parseMessageOption(conversation.genericResponses![convIndex],tempMessages.length).forEach(msg => {\n //console.log(\"MSGGGGGGGGGG : \"+JSON.stringify(msg));\n tempMessages.push(msg);\n });\n convIndex += 1;\n break;\n case \"card_carousel\":\n tempMessages.push(parseMessageCardCarousel(conversation.genericResponses!, convIndex, conversation.context.sba!.length,tempMessages.length));\n convIndex += conversation.context.sba!.length*2;\n break;\n case \"undefined\":default:\n tempMessages.push({\n messageData: errorMessage[Math.floor(Math.random() * errorMessage.length)],\n messageDirection: MessageDirection.RECEIVED,\n messageIndex: tempMessages.length,\n messageStatus: MessageStatus.RECEIVED,\n messageType: MessageType.TEXT\n } as Message);\n convIndex += 1;\n break;\n }\n });\n this.setState({messages: tempMessages});\n }\n}","import React from 'react';\nimport './App.css';\nimport 'antd/dist/antd.css';\nimport '@fortawesome/fontawesome-free/css/all.min.css';\nimport \"bootstrap-css-only/css/bootstrap.min.css\";\nimport \"mdbreact/dist/css/mdb.css\";\nimport { createMuiTheme, responsiveFontSizes, ThemeProvider } from '@material-ui/core/styles'\nimport deepOrange from '@material-ui/core/colors/deepOrange';\nimport green from '@material-ui/core/colors/green';\n\n// Components\nimport ChatArea from './components/ChatArea';\n//import FabPopup from './components/FabPopup';\n\nlet theme = createMuiTheme({\n palette: {\n primary: {\n main: deepOrange[500],\n },\n secondary: {\n main: green[500],\n },\n },\n});\ntheme = responsiveFontSizes(theme);\n\nfunction App() {\n return (\n
\n \n \n {/**/}\n \n
\n );\n}\n\nexport default App;\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.0/8 are 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 headers: { 'Service-Worker': 'script' },\n })\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\n .then(registration => {\n registration.unregister();\n })\n .catch(error => {\n console.error(error.message);\n });\n }\n}\n","import React from 'react';\nimport ReactDOM from 'react-dom';\nimport './index.css';\nimport App from './App';\nimport * as serviceWorker from './serviceWorker';\n\n\nReactDOM.render(\n \n \n ,\n document.getElementById('root')\n);\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":""}