{"version":3,"sources":["contexts/AuthContext.js","components/AppHeader/AppHeader.js","components/SearchBar/Suggestions/Suggestions.js","components/SearchBar/SearchBar.js","pages/Home/Home.js","components/Results/Result/Result.js","components/Results/Answer/Answer.js","components/Results/Results.js","components/Pager/Pager.js","components/Facets/CheckboxFacet/CheckboxFacet.js","components/Facets/Facets.js","pages/Search/Search.js","components/Transcript/Transcript.js","components/DocumentViewer/DocumentViewer.js","pages/Details/Details.js","pages/Upload/Upload.js","App/App.js","index.js"],"names":["AuthContext","createContext","iconStyle","width","height","onKbClick","alert","AppHeader","props","kbId","className","href","style","src","alt","type","data-toggle","data-target","aria-controls","aria-expanded","aria-label","id","onClick","Suggestions","suggestionClickHandler","e","currentTarget","suggestions","map","s","index","key","queryPlusText","onMouseDown","border","boxShadow","boxSizing","SearchBar","suggestionDiv","useState","q","setQ","setSuggestions","showSuggestions","setShowSuggestions","onSearchHandler","postSearchHandler","useEffect","_","timer","setTimeout","body","top","suggester","headers","code","url","axios","post","then","response","data","catch","error","console","log","clearTimeout","document","getElementById","value","onKeyDown","keyCode","autoComplete","placeholder","onChange","searchTerm","searchChangeHandler","defaultValue","onBlur","Home","showSamples","history","useHistory","push","Result","maxHeight","display","padding","paddingBottom","marginBottom","metadata_storage_name","color","paddingLeft","paddingTop","marginTop","whiteSpace","overflow","metadata_storage_path","fontSize","ReactHtmlParser","highlights","content","Answer","bodyStyle","overflowWrap","answer","questions","Results","results","documents","result","beginDocNumber","Math","min","skip","count","endDocNumber","margin","toLocaleString","Pager","currentPage","selectedPage","setSelectedPage","totalPages","ceil","resultCount","resultsPerPage","setCurrentPage","previousButton","nextButton","i","page_links","minPage","maxPage","parseInt","CheckboxFacet","isExpanded","setIsExpanded","checkboxes","values","facetValue","isSelected","selectedFacets","some","facet","FacetValueListItem","dense","disableGutters","Checkbox","edge","disableRipple","checked","removeFilter","field","name","addFilter","ListItemText","primary","FacetListItem","button","mapFacetName","ExpandLess","ExpandMore","Collapse","in","component","FacetValuesList","styled","ListItem","List","overflowY","marginRight","Facets","facetName","string","trim","toUpperCase","substring","replace","newFilters","filters","concat","setFilters","filter","item","facets","Object","keys","f","Chip","label","onDelete","FacetList","Search","location","useLocation","setAnswer","setResults","setResultCount","URLSearchParams","search","get","setSkip","setFacets","isLoading","setIsLoading","getAnswer","answers","CircularProgress","Transcript","highlight","highlightedElement","scrollIntoView","block","behavior","full_content","merged_content","length","searchText","regex","RegExp","str","shortname","slice","GetReferences","DocumentViewer","fileContainerHTML","path","sasToken","pathLower","toLowerCase","includes","title","txtHtml","controls","encodeURIComponent","Details","useParams","setDocument","setSasToken","selectedTab","setTab","setHighlight","searchBar","useRef","doc","sas","tags","tagValue","GetTagsHTML","keyPhrases","snippets","match","startIdx","ln","indexOf","maxLengthOfSnippet","reference","shortName","GetSnippets","tab_0_style","tab_1_style","tab_2_style","JSON","stringify","ref","current","Upload","loading","successMessage","errorMessage","file","setFile","isSuccess","setIsSuccess","isError","setIsError","class","role","disabled","for","event","selectedFile","target","files","onFileChange","App","functionCode","setFunctionCode","functionUrl","setFunctionUrl","user","knowledgeBaseID","setKnowledgeBaseID","a","kbResponse","qnAMakerKnowledgeBaseID","fetchCredentials","Provider","exact","render","ReactDOM","StrictMode"],"mappings":"4lBAGaA,EAAcC,0B,WCErBC,EAAY,CAChBC,MAAO,QACPC,OAAQ,QAGV,SAASC,IACPC,MAAM,0LAGO,SAASC,EAAUC,GACrB,0DAAsDA,EAAMC,MAEvE,OACE,4BAAQC,UAAU,UAChB,yBAAKA,UAAU,2BACb,uBAAGA,UAAU,eAAeC,KAAK,KAC/B,yBAAKC,MAAOV,EAAWW,IAAI,8BAA8BH,UAAU,OAAOI,IAAI,eAEhF,4BAAQJ,UAAU,iBAAiBK,KAAK,SAASC,cAAY,WAAWC,cAAY,0BAA0BC,gBAAc,yBAAyBC,gBAAc,QAAQC,aAAW,qBACpL,0BAAMV,UAAU,yBAGlB,yBAAKA,UAAU,2BAA2BW,GAAG,0BAC3C,wBAAIX,UAAU,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R,IACjB,kBAAC,IAAD,KACE,kBAAC,IAAD,KACE,kBAAC,IAAD,CAAOjE,KAAK,IAAIwE,OAAK,EAACC,OAAQ,kBAAM,kBAAC,EAAD,CAAMrP,KAAMwO,EAAcvO,IAAKyO,OACnE,kBAAC,IAAD,CAAO9D,KAAK,UAAUyE,OAAQ,kBAAM,kBAAC,EAAD,CAAQrP,KAAMwO,EAAcvO,IAAKyO,OACrE,kBAAC,IAAD,CAAO9D,KAAK,UAAUyE,OAAQ,kBAAM,kBAAC,EAAD,CAAQrP,KAAMwO,EAAcvO,IAAKyO,OACrE,kBAAC,IAAD,CAAO9D,KAAK,eAAeyE,OAAQ,kBAAM,kBAAC,EAAD,CAASrP,KAAMwO,EAAcvO,IAAKyO,WASnF,kBAACjF,EAAA,EAAD,MCnHN6F,IAASD,OACP,kBAAC,IAAME,WAAP,KACE,kBAAC,EAAD,OAEF3O,SAASC,eAAe,U","file":"static/js/main.d5593ff3.chunk.js","sourcesContent":["import { createContext, useContext } from 'react';\r\n\r\n// Create new auth context\r\nexport const AuthContext = createContext();\r\n\r\n// React hook to use auth context\r\nexport function useAuth() {\r\n return useContext(AuthContext);\r\n}\r\n","import React from 'react';\r\n// import AppHeaderAuth from '../AppHeaderAuth/AppHeaderAuth';\r\n\r\nimport './AppHeader.css';\r\n\r\nconst iconStyle = {\r\n width: \"1.5em\",\r\n height: \"auto\"\r\n}\r\n\r\nfunction onKbClick() {\r\n alert(\"This is a public demo so the knowledge base isn't accessible. If you spin up this solution from the repo, this link will take you to your knowledge base so you can view and edit QnA.\");\r\n}\r\n\r\nexport default function AppHeader(props) {\r\n const kbUrl = `https://www.qnamaker.ai/Edit/KnowledgeBase?kbId=${props.kbId}`;\r\n\r\n return (\r\n
\r\n \r\n \r\n
\r\n );\r\n};\r\n","import React from 'react';\r\n\r\nimport \"./Suggestions.css\";\r\nimport 'bootstrap/dist/css/bootstrap.min.css';\r\n\r\nexport default function Suggestions(props) {\r\n\r\n const suggestionClickHandler = (e) => {\r\n props.suggestionClickHandler(e.currentTarget.id);\r\n }\r\n\r\n const borders = {\r\n border: \"1px solid #eee\",\r\n boxShadow: \"0 2px 3px #ccc\",\r\n boxSizing: \"border-box\"\r\n }\r\n\r\n let suggestions = props.suggestions.map((s, index) => {\r\n return (
{s.queryPlusText}
);\r\n });\r\n\r\n return (\r\n
\r\n {suggestions}\r\n
\r\n );\r\n};\r\n","import React, { useState, useEffect } from 'react';\r\nimport axios from 'axios';\r\nimport Suggestions from './Suggestions/Suggestions';\r\n\r\nimport \"./SearchBar.css\";\r\n\r\nexport default function SearchBar(props) {\r\n\r\n let [q, setQ] = useState(\"\");\r\n let [suggestions, setSuggestions] = useState([]);\r\n let [showSuggestions, setShowSuggestions] = useState(false);\r\n\r\n const onSearchHandler = () => {\r\n props.postSearchHandler(q);\r\n setShowSuggestions(false);\r\n }\r\n\r\n const onEnterButton = (event) => {\r\n if (event.keyCode === 13) {\r\n onSearchHandler();\r\n }\r\n }\r\n\r\n const suggestionClickHandler = (s) => {\r\n document.getElementById(\"search-box\").value = s;\r\n setShowSuggestions(false);\r\n props.postSearchHandler(s);\r\n\r\n }\r\n\r\n const onChangeHandler = () => {\r\n var searchTerm = document.getElementById(\"search-box\").value;\r\n setShowSuggestions(true);\r\n setQ(searchTerm);\r\n\r\n // use this prop if you want to make the search more reactive\r\n if (props.searchChangeHandler) {\r\n props.searchChangeHandler(searchTerm);\r\n }\r\n }\r\n\r\n useEffect(_ => {\r\n const timer = setTimeout(() => {\r\n const body = {\r\n q: q,\r\n top: 5,\r\n suggester: 'sg'\r\n };\r\n\r\n const headers = {\r\n \"x-functions-key\": props.code\r\n };\r\n\r\n if (q === '') {\r\n setSuggestions([]);\r\n } else {\r\n const url = props.url + '/api/suggest';\r\n axios.post(url, body, { headers: headers })\r\n .then(response => {\r\n setSuggestions(response.data.suggestions);\r\n })\r\n .catch(error => {\r\n console.log(error);\r\n setSuggestions([]);\r\n });\r\n }\r\n }, 300);\r\n return () => clearTimeout(timer);\r\n }, [q, props]);\r\n\r\n var suggestionDiv;\r\n if (showSuggestions) {\r\n suggestionDiv = ( suggestionClickHandler(s)}>);\r\n } else {\r\n suggestionDiv = (
);\r\n }\r\n\r\n return (\r\n
\r\n
onEnterButton(e)}>\r\n
\r\n setShowSuggestions(false)}\r\n onClick={() => setShowSuggestions(true)}>\r\n \r\n {suggestionDiv}\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n );\r\n};","import React, { useState, useEffect } from 'react';\r\nimport { useHistory } from \"react-router-dom\";\r\n\r\nimport SearchBar from '../../components/SearchBar/SearchBar';\r\n\r\nimport \"./Home.css\";\r\nimport \"../../pages/Search/Search.css\";\r\n//import { Typography, Card, CardHeader, IconButton, CardContent, Grid } from \"@material-ui/core\";\r\n//import ClearIcon from '@material-ui/icons/Clear';\r\n\r\n\r\n\r\nexport default function Home(props) {\r\n let [showSamples, setShowSamples] = useState(true);\r\n\r\n useEffect(() => {\r\n }, [showSamples]);\r\n\r\n\r\n const history = useHistory();\r\n const navigateToSearchPage = (q) => {\r\n if (!q || q === '') {\r\n q = '*'\r\n }\r\n history.push('/search?q=' + q);\r\n }\r\n\r\n const hideSamples = () => {\r\n setShowSamples(false);\r\n }\r\n\r\n // var sample;\r\n // if (showSamples) {\r\n // sample = (\r\n // \r\n // \r\n // \r\n // \r\n // }\r\n // subheader=\"Try out the following sample queries:\"\r\n // />\r\n // \r\n // \r\n // - \"How do I use fuzzy search?\"\r\n // \r\n // \r\n // - \"When should I use cognitive skills?\"\r\n // \r\n // \r\n // \r\n // )\r\n // }\r\n\r\n\r\n return (\r\n
\r\n
\r\n \"Cognitive\r\n

Powered by Azure Cognitive Search and QnA Maker

\r\n \r\n

\r\n

Try searching \"How do I use fuzzy search?\" or \"When should I use cognitive skills?\"

\r\n
\r\n
\r\n );\r\n};\r\n","import React from 'react'\r\nimport ReactHtmlParser from 'react-html-parser';\r\n\r\n\r\nimport './Result.css';\r\n\r\n\r\nexport default function Result(props) {\r\n\r\n const cardStyle = {\r\n maxHeight: '18rem',\r\n display: 'block'\r\n };\r\n\r\n const bodyStyle = {\r\n padding: '0.25rem',\r\n paddingBottom: '0',\r\n marginBottom: '0'\r\n };\r\n \r\n\r\n const pStyle = {\r\n paddingLeft: '0.25rem',\r\n fontSize: '0.9rem'\r\n };\r\n\r\n const uriStyle = {\r\n color: 'green',\r\n paddingLeft: '0.25rem',\r\n paddingTop: '0',\r\n paddingBottom: '0',\r\n marginTop: '0',\r\n marginBottom: '0',\r\n whiteSpace: 'nowrap',\r\n overflow: 'hidden'\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n
{props.document.metadata_storage_name}
\r\n
\r\n
\r\n

{props.document.metadata_storage_path}

\r\n

\r\n {ReactHtmlParser(props?.highlights?.content[0] || \"\")}\r\n

\r\n
\r\n );\r\n}\r\n","import React from 'react';\r\nimport ReactMarkdown from 'react-markdown';\r\n\r\nimport './Answer.css';\r\n\r\n\r\nexport default function Answer(props) {\r\n\r\n const bodyStyle = {\r\n padding: '0.25rem',\r\n overflowWrap: 'normal'\r\n };\r\n\r\n const pStyle = {\r\n paddingLeft: '0.25rem',\r\n fontSize: '0.9rem'\r\n };\r\n\r\n const uriStyle = {\r\n color: 'green',\r\n paddingLeft: '0.25rem',\r\n paddingTop: '0',\r\n paddingBottom: '0',\r\n marginTop: '0',\r\n marginBottom: '0',\r\n whiteSpace: 'nowrap',\r\n overflow: 'hidden'\r\n };\r\n\r\n return (\r\n
\r\n
\r\n
{props.data.answer.questions[0]}
\r\n

\r\n {props.data.answer.answer}\r\n

\r\n \r\n
\r\n
{props.data.document.document.metadata_storage_name}
\r\n
\r\n
\r\n

{props.data.document.document.metadata_storage_path}

\r\n

\r\n
\r\n
\r\n );\r\n}\r\n","import React from 'react';\r\nimport Result from './Result/Result';\r\nimport Answer from './Answer/Answer';\r\n\r\nimport \"./Results.css\";\r\n\r\nexport default function Results(props) {\r\n\r\n const infoStyle = {\r\n margin: '1em'\r\n }\r\n\r\n let results = props.documents.map((result, index) => {\r\n return ;\r\n });\r\n\r\n let beginDocNumber = Math.min(props.skip + 1, props.count);\r\n let endDocNumber = Math.min(props.skip + props.top, props.count);\r\n\r\n//console.log(props.documents);\r\n var answer;\r\n if(props.answer?.answer?.answer && beginDocNumber === 1 && props.answer?.answer?.answer !== \"No good match found in KB.\") {\r\n answer = ;\r\n } else {\r\n answer = null;\r\n }\r\n\r\n return (\r\n
\r\n

Showing {beginDocNumber}-{endDocNumber} of {props.count.toLocaleString()} results

\r\n
\r\n {answer}\r\n
\r\n
\r\n {results}\r\n
\r\n
\r\n );\r\n};\r\n","import React, {useState, useEffect} from 'react';\r\n\r\nimport './Pager.css';\r\n\r\nexport default function Pager(props) {\r\n\r\n let [selectedPage, setSelectedPage] = useState(props.currentPage);\r\n let totalPages = Math.ceil(props.resultCount / props.resultsPerPage);\r\n\r\n useEffect(_=>{\r\n props.setCurrentPage(selectedPage);\r\n }, [selectedPage, props]);\r\n\r\n function goToNextPage() {\r\n setSelectedPage(selectedPage + 1);\r\n }\r\n\r\n function goToPreviousPage() {\r\n setSelectedPage(selectedPage - 1);\r\n }\r\n\r\n var i = 0;\r\n var page_links = [];\r\n\r\n var minPage = 1;\r\n var maxPage = totalPages;\r\n\r\n if (selectedPage - minPage > 2) {\r\n minPage = selectedPage - 2;\r\n }\r\n\r\n if (maxPage - selectedPage > 2) {\r\n maxPage = parseInt(selectedPage) + 2;\r\n }\r\n\r\n\r\n for (i = minPage; i <= maxPage; i++) {\r\n if (i === parseInt(selectedPage)) {\r\n page_links.push(\r\n
  • \r\n \r\n {i}\r\n \r\n
  • \r\n );\r\n } else {\r\n page_links.push(\r\n
  • \r\n \r\n
  • \r\n );\r\n }\r\n }\r\n\r\n var previousButton;\r\n if (parseInt(selectedPage) === 1) {\r\n previousButton = (
  • \r\n Previous\r\n
  • );\r\n } else {\r\n previousButton = (
  • \r\n \r\n
  • );\r\n }\r\n\r\n var nextButton;\r\n if (parseInt(selectedPage) === totalPages) {\r\n nextButton = (
  • \r\n Next\r\n
  • );\r\n } else {\r\n nextButton = (
  • \r\n \r\n
  • );\r\n }\r\n\r\n \r\n\r\n return (\r\n \r\n );\r\n\r\n }","import React, {useState} from 'react';\r\nimport { Collapse, Checkbox, List, ListItem, ListItemText } from '@material-ui/core';\r\nimport { ExpandLess, ExpandMore } from '@material-ui/icons';\r\nimport styled from 'styled-components';\r\n\r\nimport './CheckboxFacet.css';\r\n\r\nexport default function CheckboxFacet(props) {\r\n\r\n let [isExpanded, setIsExpanded] = useState(false);\r\n\r\n const checkboxes = props.values.map(facetValue => {\r\n\r\n let isSelected = props.selectedFacets.some(facet => facet.value === facetValue.value);\r\n \r\n return (\r\n \r\n props.removeFilter({field: props.name, value: facetValue.value}) :\r\n () => props.addFilter(props.name, facetValue.value)\r\n }\r\n />\r\n \r\n \r\n );\r\n });\r\n\r\n\r\n return (\r\n
    \r\n setIsExpanded(!isExpanded)}>\r\n \r\n {isExpanded ? : }\r\n \r\n \r\n \r\n {checkboxes}\r\n \r\n \r\n
    \r\n );\r\n}\r\n\r\nconst FacetListItem = styled(ListItem)({\r\n paddingLeft: '36px !important',\r\n})\r\n\r\nconst FacetValueListItem= styled(ListItem)({\r\n paddingLeft: '46px !important',\r\n});\r\n\r\nconst FacetValuesList= styled(List)({\r\n maxHeight: 340,\r\n overflowY: 'auto !important',\r\n marginRight: '18px !important'\r\n})","import React from 'react';\r\nimport { List, Chip } from '@material-ui/core';\r\nimport CheckboxFacet from './CheckboxFacet/CheckboxFacet';\r\nimport styled from 'styled-components';\r\nimport \"./Facets.css\";\r\n\r\nexport default function Facets(props) {\r\n\r\n function mapFacetName(facetName) {\r\n const capitalizeFirstLetter = (string) =>\r\n string[0] ? `${string[0].toUpperCase()}${string.substring(1)}` : '';\r\n facetName = facetName.trim();\r\n facetName = capitalizeFirstLetter(facetName);\r\n\r\n facetName = facetName.replace('_', ' ');\r\n return facetName;\r\n }\r\n\r\n function addFilter(name, value) {\r\n const newFilters = props.filters.concat({ field: name, value: value });\r\n props.setFilters(newFilters);\r\n }\r\n\r\n function removeFilter(filter) { \r\n const newFilters = props.filters.filter((item) => item.value !== filter.value);\r\n props.setFilters(newFilters);\r\n }\r\n\r\n var facets;\r\n try{\r\n facets = Object.keys(props.facets).map(key => {\r\n return f.field === key)}\r\n />;\r\n });\r\n } catch (error) {\r\n console.log(error);\r\n }\r\n\r\n const filters = props.filters.map((filter, index) => {\r\n return (\r\n
  • \r\n removeFilter(filter)}\r\n className=\"chip\"\r\n />\r\n
  • );\r\n });\r\n\r\n\r\n return (\r\n
    \r\n
    \r\n
    \r\n
      \r\n {filters}\r\n
    \r\n
    \r\n \r\n {facets}\r\n \r\n
    \r\n
    \r\n );\r\n};\r\n\r\nconst FacetList = styled(List)({\r\n marginTop: '32px !important'\r\n})\r\n","import React, { useEffect, useState } from 'react';\r\nimport axios from 'axios';\r\nimport CircularProgress from '@material-ui/core/CircularProgress';\r\nimport { useLocation, useHistory } from \"react-router-dom\";\r\n\r\nimport Results from '../../components/Results/Results';\r\nimport Pager from '../../components/Pager/Pager';\r\nimport Facets from '../../components/Facets/Facets';\r\nimport SearchBar from '../../components/SearchBar/SearchBar';\r\n\r\nimport \"./Search.css\";\r\n\r\nexport default function Search(props) {\r\n\r\n let location = useLocation();\r\n let history = useHistory();\r\n\r\n const [answer, setAnswer] = useState({});\r\n const [results, setResults] = useState([]);\r\n const [resultCount, setResultCount] = useState(0);\r\n const [currentPage, setCurrentPage] = useState(1);\r\n const [q, setQ] = useState(new URLSearchParams(location.search).get('q') ?? \"*\");\r\n const [top] = useState(new URLSearchParams(location.search).get('top') ?? 8);\r\n const [skip, setSkip] = useState(new URLSearchParams(location.search).get('skip') ?? 0);\r\n const [filters, setFilters] = useState([]);\r\n const [facets, setFacets] = useState({});\r\n const [isLoading, setIsLoading] = useState(true);\r\n\r\n let resultsPerPage = top;\r\n\r\n useEffect(() => {\r\n setIsLoading(true);\r\n setSkip((currentPage - 1) * top);\r\n const body = {\r\n q: q,\r\n top: top,\r\n skip: skip,\r\n filters: filters,\r\n // only return answer on first page\r\n getAnswer: currentPage === 1 ? true : false\r\n };\r\n\r\n const headers = {\r\n \"x-functions-key\": props.code\r\n };\r\n \r\n const url = props.url + '/api/search';\r\n axios.post(url, body, {headers: headers})\r\n .then(response => {\r\n setResults(response.data.results);\r\n setFacets(response.data.facets);\r\n setResultCount(response.data.count);\r\n\r\n if (currentPage === 1) {\r\n setAnswer(response.data.answers);\r\n }\r\n setIsLoading(false);\r\n })\r\n .catch(error => {\r\n console.log(error);\r\n setIsLoading(false);\r\n });\r\n\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [top, skip, filters, currentPage]);\r\n\r\n // pushing the new search term to history when q is updated\r\n // allows the back button to work as expected when coming back from the details page\r\n useEffect(() => {\r\n history.push('/search?q=' + q);\r\n setCurrentPage(1);\r\n setFilters([]);\r\n\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [q]);\r\n\r\n\r\n let postSearchHandler = (searchTerm) => {\r\n //console.log(searchTerm);\r\n setQ(searchTerm);\r\n }\r\n\r\n\r\n\r\n var body;\r\n if (isLoading) {\r\n body = (\r\n
    \r\n \r\n
    );\r\n } else {\r\n body = (\r\n
    \r\n \r\n \r\n
    \r\n )\r\n }\r\n\r\n return (\r\n
    \r\n\r\n
    \r\n
    \r\n
    \r\n \r\n

    Try searching \"How do I use fuzzy search?\" or \"When should I use cognitive skills?\"

    \r\n
    \r\n \r\n
    \r\n {body}\r\n
    \r\n
    \r\n );\r\n}\r\n\r\n\r\n","import React, {useEffect} from 'react'\r\nimport ReactHtmlParser from 'react-html-parser';\r\n\r\nimport './Transcript.css';\r\n\r\n\r\nexport default function Transcript(props) {\r\n\r\n\r\n useEffect(_ =>{\r\n console.log(props.highlight);\r\n if (!!props.highlight) {\r\n\r\n let highlightedElement = document.getElementById(props.highlight)\r\n if (!!highlightedElement) {\r\n highlightedElement.scrollIntoView({block: 'start', behavior: 'smooth'});\r\n }\r\n }\r\n }, [props]);\r\n\r\n\r\n let full_content = \"\";\r\n\r\n // If we have merged content, let's use it.\r\n if (props.document.merged_content) {\r\n if (props.document.merged_content.length > 0) {\r\n full_content = props.document.merged_content.trim();\r\n }\r\n }\r\n else {\r\n // otherwise, let's try getting the content -- although it won't have any image data.\r\n full_content = props.document.content.trim();\r\n }\r\n\r\n if (full_content === null || full_content === \"\") {\r\n // not much to display\r\n return null;\r\n }\r\n\r\n // finds all matches to the search term in the transcript and adds a highlight class to them (plus an id that can be used for scrolling)\r\n function GetReferences(searchText, content) {\r\n // find all matches in content\r\n var regex = new RegExp(searchText, 'gi');\r\n\r\n var i = -1;\r\n var response = content.replace(regex, function (str) {\r\n i++;\r\n var shortname = str.slice(0, 20).replace(/[^a-zA-Z ]/g, \" \").replace(new RegExp(\" \", 'g'), \"_\");\r\n return `${str}`;\r\n })\r\n\r\n return response;\r\n }\r\n\r\n\r\n if (props.q.trim() !== \"\") {\r\n full_content = GetReferences(props.q, full_content);\r\n }\r\n \r\n\r\n return (\r\n
    \r\n \r\n \r\n \r\n \r\n \r\n \r\n
    \r\n
    {ReactHtmlParser(full_content)}
    \r\n
    \r\n
    \r\n );\r\n}","import React from 'react'\r\n\r\nimport './DocumentViewer.css';\r\n\r\nexport default function DocumentViewer(props) {\r\n\r\n const path = props.document.metadata_storage_path + \"?\" + props.sasToken;\r\n const content = props.document.content;\r\n\r\n\r\n var fileContainerHTML;\r\n if (path != null) {\r\n var pathLower = path.toLowerCase();\r\n\r\n if (pathLower.includes(\".pdf\")) {\r\n fileContainerHTML =\r\n \r\n \r\n ;\r\n }\r\n else if (pathLower.includes(\".txt\") || pathLower.includes(\".json\")) {\r\n var txtHtml = content.trim();\r\n fileContainerHTML =
     {txtHtml} 
    ;\r\n }\r\n else if (pathLower.includes(\".las\")) {\r\n fileContainerHTML = \r\n ;\r\n }\r\n else if (pathLower.includes(\".jpg\") || pathLower.includes(\".jpeg\") || pathLower.includes(\".gif\") || pathLower.includes(\".png\")) {\r\n fileContainerHTML =\r\n
    \r\n \"the\r\n
    ;\r\n }\r\n else if (pathLower.includes(\".xml\")) {\r\n fileContainerHTML =\r\n ;\r\n }\r\n else if (pathLower.includes(\".htm\")) {\r\n fileContainerHTML = \r\n ;\r\n }\r\n else if (pathLower.includes(\".mp3\")) {\r\n fileContainerHTML =\r\n ;\r\n }\r\n else if (pathLower.includes(\".mp4\")) {\r\n fileContainerHTML =\r\n ;\r\n }\r\n else if (pathLower.includes(\".doc\") || pathLower.includes(\".ppt\") || pathLower.includes(\".xls\")) {\r\n var src = \"https://view.officeapps.live.com/op/view.aspx?src=\" + encodeURIComponent(path);\r\n\r\n fileContainerHTML =\r\n ;\r\n }\r\n else {\r\n fileContainerHTML =\r\n
    This file cannot be previewed. Download it here to view: Download
    ;\r\n }\r\n }\r\n else {\r\n fileContainerHTML =\r\n
    This file cannot be previewed or downloaded.
    ;\r\n }\r\n\r\n return fileContainerHTML;\r\n}","import React, { useState, useEffect, useRef } from \"react\";\r\nimport { useParams } from 'react-router-dom';\r\nimport CircularProgress from '@material-ui/core/CircularProgress';\r\nimport Transcript from '../../components/Transcript/Transcript';\r\nimport DocumentViewer from '../../components/DocumentViewer/DocumentViewer';\r\nimport ReactHtmlParser from 'react-html-parser';\r\nimport axios from 'axios';\r\nimport \"./Details.css\";\r\n\r\nexport default function Details(props) {\r\n\r\n let { id } = useParams();\r\n const [document, setDocument] = useState({});\r\n const [sasToken, setSasToken] = useState(\"\");\r\n const [selectedTab, setTab] = useState(0);\r\n const [highlight, setHighlight] = useState(null);\r\n const [isLoading, setIsLoading] = useState(true);\r\n const [q, setQ] = useState(\"\");\r\n const searchBar = useRef(null);\r\n\r\n useEffect(() => {\r\n setIsLoading(true);\r\n\r\n const headers = {\r\n \"x-functions-key\": props.code\r\n };\r\n\r\n const url = props.url + '/api/lookup?id=' + id;\r\n console.log(url);\r\n axios.get(url, {headers: headers})\r\n .then(response => {\r\n const doc = response.data.document;\r\n const sas = response.data.sasToken;\r\n setDocument(doc);\r\n setSasToken(sas);\r\n setIsLoading(false);\r\n })\r\n .catch(error => {\r\n console.log(error);\r\n setIsLoading(false);\r\n });\r\n\r\n }, [id]);\r\n\r\n useEffect(() => {\r\n setHighlight(null);\r\n }, [q]);\r\n\r\n function GetTagsHTML(tags) {\r\n\r\n if (!!tags) {\r\n let tagsHtml = tags.map((tagValue, index) => {\r\n if (index < 10) {\r\n\r\n if (tagValue.length > 30) { // check tag name length\r\n // create substring of tag name length if too long\r\n tagValue = tagValue.slice(0, 30);\r\n }\r\n\r\n return ;\r\n } else {\r\n return null;\r\n }\r\n });\r\n\r\n return tagsHtml;\r\n }\r\n\r\n return null;\r\n }\r\n\r\n let tags = GetTagsHTML(document.keyPhrases);\r\n\r\n function GetSnippets(q, content) {\r\n if (!!content && q.trim() !== \"\") {\r\n var regex = new RegExp(q, 'gi');\r\n\r\n let matches = content.match(regex);\r\n\r\n return matches.map((value, index) => {\r\n var startIdx;\r\n var maxLengthOfSnippet = 400;\r\n var ln = maxLengthOfSnippet;\r\n\r\n if (value.length > 150) {\r\n startIdx = content.indexOf(value);\r\n ln = value.length;\r\n }\r\n else {\r\n if (content.indexOf(value) < (maxLengthOfSnippet / 2)) {\r\n startIdx = 0;\r\n }\r\n else {\r\n startIdx = content.indexOf(value) - (maxLengthOfSnippet / 2);\r\n }\r\n\r\n ln = maxLengthOfSnippet + value.length;\r\n }\r\n\r\n var reference = content.slice(startIdx, startIdx + ln);\r\n content = content.replace(value, \"\");\r\n\r\n reference = reference.replace(value, function (str) {\r\n return (`${str}`);\r\n });\r\n\r\n var shortName = value.slice(0, 20).replace(/[^a-zA-Z ]/g, \" \").replace(new RegExp(\" \", 'g'), \"_\");\r\n\r\n return
  • ClickSnippet(`${index}_${shortName}`)}>{ReactHtmlParser(reference)}
  • ;\r\n\r\n });\r\n }\r\n }\r\n\r\n let snippets = GetSnippets(q, document.content);\r\n\r\n function ClickSnippet(name) {\r\n // navigating to the transcript\r\n setTab(1);\r\n setHighlight(name);\r\n }\r\n\r\n var body;\r\n let tab_0_style = \"nav-link black\";\r\n let tab_1_style = \"nav-link black\";\r\n let tab_2_style = \"nav-link black\";\r\n if (isLoading) {\r\n body = ();\r\n } else {\r\n if (selectedTab === 0) {\r\n body = ();\r\n tab_0_style = \"nav-link active black\";\r\n }\r\n else if (selectedTab === 1) {\r\n body = ();\r\n tab_1_style = \"nav-link active black\";\r\n }\r\n else if (selectedTab === 2) {\r\n body =
    \r\n
    \r\n          {JSON.stringify(document, null, 2)}\r\n        
    \r\n
    ;\r\n tab_2_style = \"nav-link active black\";\r\n }\r\n\r\n }\r\n\r\n\r\n\r\n return (\r\n
    \r\n
    \r\n
    \r\n
      \r\n
    • \r\n \r\n
    • \r\n
    • \r\n \r\n
    • \r\n
    • \r\n \r\n
    • \r\n
    \r\n
    \r\n
    \r\n
    \r\n {body}\r\n
    \r\n\r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n \r\n
    \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n {tags}\r\n
    \r\n
    \r\n
    \r\n {snippets}\r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n );\r\n}\r\n\r\n","import React, { useState } from \"react\";\r\nimport axios from 'axios';\r\nimport CircularProgress from '@material-ui/core/CircularProgress';\r\n\r\nimport \"./Upload.css\";\r\n\r\nexport default function Upload(props) {\r\n\r\n const [file, setFile] = useState(\"\");\r\n const [isLoading, setIsLoading] = useState(false);\r\n const [isSuccess, setIsSuccess] = useState(false);\r\n const [isError, setIsError] = useState(false);\r\n\r\n function onFileChange(event) {\r\n let selectedFile = event.target.files[0];\r\n console.log(selectedFile);\r\n setFile(selectedFile);\r\n\r\n setIsError(false);\r\n setIsSuccess(false);\r\n }\r\n\r\n async function onUploadClick() {\r\n setIsLoading(true);\r\n setIsError(false);\r\n setIsSuccess(false);\r\n\r\n var reader = new FileReader();\r\n\r\n reader.onload = function () {\r\n let base64File = reader.result.replace(/^data:.+;base64,/, '');\r\n\r\n\r\n let body = {\r\n name: file.name,\r\n file: base64File,\r\n fileType: file.type\r\n }\r\n\r\n const headers = {\r\n \"x-functions-key\": props.code\r\n };\r\n\r\n const url = props.url + '/api/upload';\r\n axios.post(url, body, {headers: headers})\r\n .then(response => {\r\n setIsLoading(false);\r\n setIsSuccess(true);\r\n })\r\n .catch(error => {\r\n console.log(error);\r\n setIsLoading(false);\r\n setIsError(true);\r\n });\r\n\r\n console.log(body);\r\n };\r\n reader.onerror = function (error) {\r\n console.log('Error: ', error);\r\n };\r\n\r\n reader.readAsDataURL(file);\r\n\r\n }\r\n\r\n var loading;\r\n if (isLoading) {\r\n loading = ();\r\n }\r\n\r\n var successMessage;\r\n if (isSuccess) {\r\n successMessage = (
    \r\n Document successfully uploaded!\r\n
    );\r\n }\r\n\r\n var errorMessage;\r\n if (isError) {\r\n errorMessage = (
    \r\n Document upload failed :(\r\n
    );\r\n }\r\n\r\n var button;\r\n if (file !== \"\") {\r\n button = ();\r\n } else {\r\n button = ();\r\n }\r\n\r\n\r\n return (\r\n
    \r\n
    \r\n

    Upload a document

    \r\n

    This site is a public demo so the ability to upload documents has been disabled.

    \r\n

    If you deploy your own version of the solution from the repo, you'll be able to upload documents.

    \r\n
    \r\n\r\n
    \r\n\r\n
    \r\n \r\n onFileChange(e)} />\r\n

    {file.name}

    \r\n\r\n
    \r\n
    \r\n {button}\r\n {loading}\r\n
    \r\n
    \r\n {successMessage}\r\n {errorMessage}\r\n
    \r\n );\r\n};\r\n","import React, {useState, useEffect} from 'react';\r\nimport { BrowserRouter as Router, Switch, Route } from 'react-router-dom';\r\nimport CircularProgress from '@material-ui/core/CircularProgress';\r\nimport axios from 'axios';\r\n\r\n// Context for user authentication\r\nimport { AuthContext } from '../contexts/AuthContext';\r\n\r\n// App shell components\r\nimport AppHeader from '../components/AppHeader/AppHeader';\r\n//import AppFooter from '../components/AppFooter/AppFooter';\r\n\r\n// React Router page components\r\nimport Home from '../pages/Home/Home';\r\nimport Search from '../pages/Search/Search';\r\nimport Details from '../pages/Details/Details';\r\nimport Upload from '../pages/Upload/Upload';\r\n\r\n// Bootstrap styles, optionally with jQuery and Popper\r\nimport 'bootstrap/dist/css/bootstrap.min.css';\r\n\r\n// Custom app styles\r\nimport './App.css';\r\n\r\nexport default function App() {\r\n\r\n // React Hook: useState with a var name, set function, & default value\r\n const [functionCode, setFunctionCode] = useState(\"\");\r\n const [functionUrl, setFunctionUrl] = useState(\"\");\r\n const [user, setUser] = useState({});\r\n const [knowledgeBaseID, setKnowledgeBaseID] = useState(\"\");\r\n\r\n // Fetch authentication API & set user state\r\n // async function fetchAuth() {\r\n // const response = await fetch(\"/.auth/me\");\r\n // if (response) {\r\n // const contentType = response.headers.get(\"content-type\");\r\n // if (contentType && contentType.indexOf(\"application/json\") !== -1) {\r\n // response.json()\r\n // .then(response => setUser(response))\r\n // .catch(error => console.error('Error:', error));\r\n // }\r\n // }\r\n // }\r\n\r\n async function fetchCredentials() {\r\n const config_url = \"/config\";\r\n\r\n // if NODE_ENV is development, pull variables from local .env file\r\n // otherwise, pull variables from config endpoint\r\n if (process.env.NODE_ENV === 'development') {\r\n setFunctionCode(process.env.REACT_APP_FUNCTION_CODE);\r\n setFunctionUrl(process.env.REACT_APP_FUNCTION_URL);\r\n\r\n const headers = {\r\n \"x-functions-key\": process.env.REACT_APP_FUNCTION_CODE\r\n };\r\n \r\n const url = process.env.REACT_APP_FUNCTION_URL + '/api/getKb';\r\n axios.get(url, {headers: headers})\r\n .then(kbResponse => {\r\n setKnowledgeBaseID(kbResponse.data.qnAMakerKnowledgeBaseID)\r\n })\r\n .catch(error => {\r\n console.log(error);\r\n });\r\n\r\n } else {\r\n axios.get(config_url)\r\n .then(response => {\r\n setFunctionCode(response.data.code);\r\n setFunctionUrl(response.data.url);\r\n\r\n const headers = {\r\n \"x-functions-key\": response.data.code\r\n };\r\n \r\n const url = response.data.url + '/api/getKb';\r\n axios.get(url, {headers: headers})\r\n .then(kbResponse => {\r\n setKnowledgeBaseID(kbResponse.data.qnAMakerKnowledgeBaseID)\r\n })\r\n .catch(error => {\r\n console.log(error);\r\n });\r\n \r\n })\r\n .catch(error => {\r\n console.log(error);\r\n });\r\n }\r\n }\r\n\r\n\r\n // React Hook: useEffect when component changes\r\n // Empty array ensure this only runs once on mount\r\n useEffect(() => {\r\n //fetchAuth();\r\n fetchCredentials();\r\n }, []);\r\n\r\n if (functionUrl !== \"\") {\r\n return (\r\n \r\n
    \r\n \r\n \r\n \r\n } />\r\n } />\r\n } />\r\n
    } />\r\n \r\n \r\n {/* */}\r\n
    \r\n
    \r\n );\r\n } else {\r\n return (\r\n \r\n );\r\n }\r\n\r\n \r\n}\r\n","import React from 'react';\r\nimport ReactDOM from 'react-dom';\r\n\r\nimport App from './App/App';\r\n\r\nReactDOM.render(\r\n \r\n \r\n ,\r\n document.getElementById('root')\r\n);\r\n"],"sourceRoot":""}