{"version":3,"sources":["components/NavBar.tsx","components/Collapsible.tsx","components/CategoryDisplay.tsx","components/MostPopularDisplay.tsx","components/BoxDisplay.tsx","components/ShowAnswerDetails.tsx","close.png","App.tsx","serviceWorker.ts","index.tsx"],"names":["useStyles","createStyles","theme","root","flexGrow","menuButton","marginRight","spacing","title","display","breakpoints","up","search","position","borderRadius","shape","backgroundColor","fade","palette","common","white","marginLeft","width","searchIcon","padding","height","pointerEvents","alignItems","justifyContent","inputRoot","color","inputInput","paddingLeft","transition","transitions","create","withStyles","props","classes","OnSearchChange","className","AppBar","Toolbar","href","src","alt","InputBase","placeholder","input","inputProps","onChange","event","target","value","Collapsible","state","open","togglePanel","bind","ShowFullAnswer","e","this","setState","preventDefault","stopPropagation","undefined","AnswerID","AnswerQuestion","window","history","pushState","replaceAll","console","log","ChangeAnswerID","onClick","children","React","Component","ReactMarkdown","require","CategoryDisplay","id","cat","questions","map","answer","i","question","_id","source","escapeHtml","MostPopularDisplay","Loaded","Error","FeaturedItems","FaqItems","FeaturedFirst","find","item","FeaturedSecond","Card","CardHeader","CardContent","GatherCategories","storedCategories","forEach","element","Number","category","some","str","push","BoxDisplay","index","fetch","then","res","json","result","UpdateFaqItems","error","TotalItems","length","filter","toLowerCase","includes","ShowAnswerDetails","Question","HideAnswer","CardRef","createRef","current","scrollIntoView","behavior","block","UpdateAnswerID","Typography","ref","GenerateTitle","App","_child","ShowAnswerID","LoadedAnswerID","location","pathname","split","handleSearchChange","UpdateTest","newID","FAQQuestions","faqquestion","x","NavBar","Boolean","hostname","match","document","body","style","background","ReactDOM","render","getElementById","navigator","serviceWorker","ready","registration","unregister","catch","message"],"mappings":"6SAUMA,EAAYC,aAAa,SAACC,GAAD,MAAiB,CAC9CC,KAAM,CACJC,SAAU,GAEZC,WAAY,CACVC,YAAaJ,EAAMK,QAAQ,IAE7BC,MAAM,aACJJ,SAAU,EACVK,QAAS,QACRP,EAAMQ,YAAYC,GAAG,MAAQ,CAC5BF,QAAS,UAGbG,O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C,WAAa,UACjCC,IAASC,OACP,8BACE,cAAC,EAAD,MAEFL,SAASM,eAAe,SDgIpB,kBAAmBC,WACrBA,UAAUC,cAAcC,MACrBlD,MAAK,SAAAmD,GACJA,EAAaC,gBAEdC,OAAM,SAAAhD,GACLjD,QAAQiD,MAAMA,EAAMiD,a","file":"static/js/main.bf93b44d.chunk.js","sourcesContent":["import React from \"react\";\nimport { createStyles, fade, withStyles } from \"@material-ui/core/styles\";\n\nimport AppBar from \"@material-ui/core/AppBar\";\nimport Toolbar from \"@material-ui/core/Toolbar\";\nimport InputBase from \"@material-ui/core/InputBase\";\nimport SearchIcon from \"@material-ui/icons/Search\";\n\nimport PropTypes from \"prop-types\";\n\nconst useStyles = createStyles((theme: any) => ({\n root: {\n flexGrow: 1,\n },\n menuButton: {\n marginRight: theme.spacing(2),\n },\n title: {\n flexGrow: 1,\n display: \"none\",\n [theme.breakpoints.up(\"sm\")]: {\n display: \"block\",\n },\n },\n search: {\n position: \"relative\",\n borderRadius: theme.shape.borderRadius,\n backgroundColor: fade(theme.palette.common.white, 0.15),\n \"&:hover\": {\n backgroundColor: fade(theme.palette.common.white, 0.25),\n },\n marginLeft: 0,\n width: \"100%\",\n [theme.breakpoints.up(\"sm\")]: {\n marginLeft: theme.spacing(1),\n width: \"auto\",\n },\n },\n searchIcon: {\n padding: theme.spacing(0, 2),\n height: \"100%\",\n position: \"absolute\",\n pointerEvents: \"none\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n },\n inputRoot: {\n color: \"inherit\",\n },\n inputInput: {\n padding: theme.spacing(1, 1, 1, 0),\n // vertical padding + font size from searchIcon\n paddingLeft: `calc(1em + ${theme.spacing(4)}px)`,\n transition: theme.transitions.create(\"width\"),\n width: \"100%\",\n [theme.breakpoints.up(\"sm\")]: {\n width: \"12ch\",\n \"&:focus\": {\n width: \"20ch\",\n },\n },\n },\n}));\n\n\n/*class NavBar extends Component {\n constructor(props: MyProps) {\n super(props);\n this.OnSearch = this.OnSearch.bind(this);\n\n this.state = {\n search: \"\",\n };\n }\n\n OnSearch(e: any) {\n //OnFire\n this.props.OnSearchChange(e.target.value);\n }\n\n render() {\n const classes = useStyles();\n return (\n
\n \n \n \n \n \n
\n
\n \n
\n \n
\n
\n
\n
\n );\n }\n}\n*/\n\nfunction NarBarComp(props: any) {\n const { classes, OnSearchChange } = props;\n\n const OnSearch = (event: any) => OnSearchChange(event.target.value);\n\n return (\n
\n \n \n \n \n \n
\n
\n \n
\n \n
\n
\n
\n
\n );\n}\n\nNarBarComp.propTypes = {\n classes: PropTypes.object.isRequired,\n search: PropTypes.any.isRequired,\n OnSearchChange: PropTypes.any.isRequired,\n};\n\nexport default withStyles(useStyles)(NarBarComp);\n","import React from \"react\";\n\n\ntype MyState = { open: boolean };\ntype MyProps = { title: string; className: string; open: boolean; AnswerID?: string; ChangeAnswerID:any; AnswerQuestion?: string };\nexport class Collapsible extends React.Component {\n constructor(props: MyProps) {\n super(props);\n this.state = {\n open: this.props.open,\n };\n this.togglePanel = this.togglePanel.bind(this);\n this.ShowFullAnswer = this.ShowFullAnswer.bind(this);\n }\n togglePanel(e: any) {\n this.setState({ open: !this.state.open });\n }\n ShowFullAnswer(e: any) {\n e.preventDefault();\n e.stopPropagation();\n if (this.props.AnswerID !== undefined && this.props.AnswerQuestion !== undefined)\n {\n window.history.pushState({}, '', `${this.props.AnswerID}/${this.props.AnswerQuestion?.replaceAll(\" \", \"-\")}`);\n }\n console.log(\"Now we moved!\")\n this.props.ChangeAnswerID(this.props.AnswerID)\n }\n render() {\n return (\n
\n
this.props.AnswerID != null ? this.ShowFullAnswer(e) : this.togglePanel(e)} className=\"header\">\n {this.props.title}\n \n
\n {this.state.open ? (\n
{this.props.children}
\n ) : null}\n
\n );\n }\n}\nexport default Collapsible;\n","import React from \"react\";\nimport { FAQQuestion } from \"../models/FAQQuestion\";\nimport { Collapsible } from \"./Collapsible\";\nconst ReactMarkdown = require(\"react-markdown\");\ntype MyProps = { questions: FAQQuestion[]; cat: string; open: boolean; ChangeAnswerID: any };\nexport class CategoryDisplay extends React.Component {\n // eslint-disable-next-line @typescript-eslint/no-useless-constructor\n constructor(props: MyProps) {\n super(props);\n }\n\n render() {\n return (\n
\n \n
\n {this.props.questions.map((answer, i) => {\n return (\n
\n \n
\n

\n \n

\n
\n \n
\n );\n })}\n
\n \n
\n );\n }\n}\nexport default CategoryDisplay;\n","import React from \"react\";\nimport { FAQQuestion } from \"../models/FAQQuestion\";\nimport { Card, CardContent, CardHeader } from \"@material-ui/core\";\nconst ReactMarkdown = require(\"react-markdown\");\ntype MyState = {\n FeaturedItems: FAQQuestion[];\n Loaded: boolean;\n Error: boolean;\n};\ntype MyProps = { FaqItems: FAQQuestion[] };\nexport class MostPopularDisplay extends React.Component {\n constructor(props: MyProps) {\n super(props);\n\n this.state = {\n Loaded: false,\n Error: false,\n FeaturedItems: [],\n };\n }\n\n componentDidMount() {\n this.setState({\n FeaturedItems: this.props.FaqItems,\n Loaded: true,\n });\n }\n\n render() {\n const { Loaded, Error } = this.state;\n let FeaturedFirst = this.state.FeaturedItems.find(\n (item) => item._id === \"5f21c14d557aa53950dcbfe0\"\n );\n if (FeaturedFirst === undefined) {\n FeaturedFirst = this.state.FeaturedItems[1];\n }\n\n let FeaturedSecond = this.state.FeaturedItems.find(\n (item) => item._id === \"5f21b412557aa53950dcbfdd\"\n );\n if (FeaturedSecond === undefined) {\n FeaturedSecond = this.state.FeaturedItems[2];\n }\n if (Error) return null;\n else if (Loaded === false) return null;\n return (\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 MostPopularDisplay;\n","import React from \"react\";\nimport { Card, CardContent } from \"@material-ui/core\";\nimport { FAQQuestion } from \"../models/FAQQuestion\";\nimport { CategoryDisplay } from \"../components/CategoryDisplay\";\nimport { MostPopularDisplay } from \"../components/MostPopularDisplay\";\nfunction GatherCategories(FaqItems: FAQQuestion[]): string[] {\n let storedCategories: string[] = [];\n FaqItems.forEach((element) => {\n if (\n !Number(element.category) &&\n element.category !== \"0\" &&\n storedCategories.some((str) => element.category === str) === false\n ) {\n storedCategories.push(element.category);\n }\n });\n return storedCategories;\n}\n\ntype MyState = {\n storedCategories: string[];\n FaqItems: FAQQuestion[];\n Loaded: boolean;\n Error: boolean;\n search: string;\n index: number;\n};\ntype MyProps = {\n search: string;\n ChangeAnswerID: any\n UpdateFaqItems: any\n};\nexport class BoxDisplay extends React.Component {\n constructor(props: MyProps) {\n super(props);\n\n this.state = {\n Loaded: false,\n Error: false,\n storedCategories: [],\n FaqItems: [],\n search: this.props.search,\n index: 0,\n };\n // eslint-disable-next-line no-func-assign\n }\n\n componentDidMount() {\n fetch(\"https://api.pandahut.net/api/Help/Questions\")\n .then((res) => res.json())\n .then(\n (result: FAQQuestion[]) => {\n this.setState({\n Loaded: true,\n FaqItems: result,\n storedCategories: GatherCategories(result),\n });\n this.props.UpdateFaqItems(result)\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 this.setState({\n Error: true,\n });\n }\n );\n }\n\n UpdateTest(input: string) {\n this.setState({ search: input, index: this.state.index + 1 });\n }\n render() {\n const { Loaded, Error, storedCategories, search } = this.state;\n let { FaqItems, index } = this.state;\n let TotalItems = FaqItems.length;\n FaqItems = FaqItems.filter(\n (item) =>\n search === \"\" ||\n item.answer.toLowerCase().includes(search.toLowerCase()) ||\n item.question.toLowerCase().includes(search.toLowerCase())\n );\n if (Error) return

Error

;\n else if (Loaded === false) return

Loading....

;\n return (\n
\n \n \n \n

\n Frequently Asked Questions{\" \"}\n {search !== \"\"\n ? `- (Filtered: ${TotalItems - FaqItems.length}/${TotalItems})`\n : \"\"}{\" \"}\n

\n {storedCategories.map((cat, i) => {\n return (\n item.category.toLowerCase() === cat.toLowerCase()\n )}\n key={i + index}\n open={search !== \"\"}\n >\n );\n })}\n
\n
\n
\n );\n }\n}\nexport default BoxDisplay;\n","import React from \"react\";\nimport logo from '../close.png' // relative path to image \n\nimport { FAQQuestion } from \"../models/FAQQuestion\";\nimport { Card, CardContent, CardHeader, Typography } from \"@material-ui/core\";\nconst ReactMarkdown = require(\"react-markdown\");\n\ntype MyState = { CardRef: any};\ntype MyProps = { Question: FAQQuestion | undefined, UpdateAnswerID: any};\nexport class ShowAnswerDetails extends React.Component {\n constructor(props: MyProps) {\n super(props);\n console.log(`Show Answer Details init for ${this.props.Question?._id}`)\n this.HideAnswer = this.HideAnswer.bind(this);\n this.state = { CardRef: React.createRef()}\n }\n componentDidMount() {\n if (this.state.CardRef.current) {\n this.state.CardRef.current.scrollIntoView({ \n behavior: \"smooth\", \n block: \"nearest\"\n })\n }\n }\n HideAnswer(e: any) {\n e.preventDefault();\n e.stopPropagation();\n window.history.pushState({}, '', \"/\");\n this.props.UpdateAnswerID(undefined)\n }\n GenerateTitle() {\n return (\n
\n \n {this.props.Question !== undefined ? this.props.Question.question : \"\"}\n \n this.HideAnswer(e)}>\"Hide \n
\n )\n }\n render() {\n return (\n \n \n \n \n \n \n );\n }\n}\nexport default ShowAnswerDetails;\n","export default \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAABmJLR0QA/wD/AP+gvaeTAAAD9ElEQVRoge3Yz28bRRTA8e/Muti4B0jSQOyUGxJ3BFJJ0iZREQQRkMqJvyCi4gIcKEmaXy5JaU/Aqf0zQKhFVFDcJiq9ceRMEhfRIhRInATvzOPg2rFj7+x6U8k++F1WXmvGn7cz82bW0I1udKMb7QwV9MXOu++/LajrwKCIgAAcXOXQZwSkfBMOXevuO9pX79e330CY6l27ebOZUwclIKhrbceX+z0pYq8HOQMTAE62+ckj5c5BeKHlBNqOF6lr23ICnYSv9tdSAp2ED/aHj0Bn4GOOQMfgHSOQCORHxPsi7BqfY0qTVCoSft8aStaSUpqEUuH4o66BIPx/Yvl34ATPrMzjv/YKRd8Pxe8aH3/kFD1Xc2xnBtizJhTvWsSBIxDlye8M9DP45RUSfb0cf/VlHuSusJNfI629pviiKcHYaQaXplGeR+qlF/n9g0/wNv8goWgZDxFGIGjO7xqfvg+nSPT1AqA8j8z8BTgzRNH4gfjsYzxA4kQf/R+dZ88aNz7WFApZsMeU5p/vvkeMqTZRnkdm4TMYHa4mEYQHEGPY+vYGCYUbHyeBsGqTVAq1ep8Hi5cbksguTsPZUbZ9v4wfHWnEW0th8Qskv0YS7cS7JpHrLBRaKtOeh7r7C4WFlbok0JrM3Kfo18fK+NxMI37hMvaHn0grLxzvGIHA4/TWG+9V1E3xtdVm1xjsyKkGKFYQBKUPnlMsvAjP/XqnqTXSCIRtUk9rjb57j8L88qGRUE8EH/MoEQ1fm4S6c4/C3DJY26Q7OQI+1kYWHV+9LwJKNf05VenK1rSLiHdtBdGqUAT8rvGR0eHyOtBNutWK7NI03pvj7PimNXy8o0RMfG21EambTkprsrkZvIlxtn2/BXycBI6Kt5bC/Arr00v1+4TWZHOzeG+dpWhMNHy8RRyOL5pSMP7xguX2KhtNkhi8NIueGGfbmFB87DcyF37fGuT0UCPeGDYvfl6tNmmt4fYqm7OXmiRxETU+zL61bny8o0QwHhFK1vLs5EQjfm4Z+TFfVyrTSmNv/czGTK7h2NFzbpKSsbHwzgScpRJIKc3Dr67hP/rLia9Um7T2kFv5uulUeviIP69+TUorNz7OUeLvsXckCF+Zr/tiKWaep//j82x9cwPJr4VuUkVrkbEhes5NlvHrBZ5CufEiDPx2v6nVkcCkuPCVP518K+xZQ0IR7VQpwr61lIwlpRVeBLwAmYAEQt/IGvAc4BFIKDiudf10C9mkkiiSng6fNrXtAiK8Ch3GN5Q8aQkfqdo0tAtWuqtQp+BjjUAH4V3vZNHfB9qJjzOFOgofbxGz0Tl4WW89AWEKkY0OwU85HnQ3utGNbrQx/geUXOzhLxT8xgAAAABJRU5ErkJggg==\"","import React, { Component } from \"react\";\nimport NavBar from \"./components/NavBar\";\nimport BoxDisplay from \"./components/BoxDisplay\";\nimport { FAQQuestion } from \"./models/FAQQuestion\";\nimport ShowAnswerDetails from \"./components/ShowAnswerDetails\";\ntype MyState = {\n search: string;\n _child: React.RefObject;\n ShowAnswerID: string | undefined;\n FaqItems: FAQQuestion[];\n LoadedAnswerID: string | undefined;\n};\ntype MyProps = {};\nclass App extends Component {\n constructor(props: any) {\n super(props);\n\n //this.handleSearchChange = this.handleSearchChange.bind(this);\n this.state = { search: \"\", _child: React.createRef(), ShowAnswerID: undefined, FaqItems: [], LoadedAnswerID: window.location.pathname.split('/')[1]}; // This won't throw error because always start with slash\n this.handleSearchChange = this.handleSearchChange.bind(this);\n this.ChangeAnswerID = this.ChangeAnswerID.bind(this)\n this.UpdateFaqItems = this.UpdateFaqItems.bind(this);\n }\n handleSearchChange(event: string) {\n this.setState({ search: event });\n if (this.state._child.current != null)\n this.state._child.current.UpdateTest(event);\n }\n ChangeAnswerID(newID: string) {\n console.log(`New Answer ID: ${newID}`)\n console.log(`We have ${this.state.FaqItems.length} Faq Items`)\n this.setState({ ShowAnswerID: newID})\n }\n UpdateFaqItems(FAQQuestions: FAQQuestion[]) {\n console.log(`Got new ${FAQQuestions.length} Faq Items`)\n \n this.setState({FaqItems: FAQQuestions})\n console.log(`Got LoadedAnswerID with ${this.state.LoadedAnswerID}`)\n if (this.state.LoadedAnswerID !== undefined && this.state.LoadedAnswerID !== \"\"){\n var faqquestion = this.state.FaqItems.find(x => this.state.LoadedAnswerID?.toLowerCase()?.includes(x._id.toLowerCase()))\n if (faqquestion === undefined)\n {\n console.log(\"Couldn't find question\")\n this.setState({LoadedAnswerID: undefined})\n }\n else {\n this.setState({ShowAnswerID: faqquestion._id})\n }\n }\n }\n\n render() {\n const search = this.state.search;\n return (\n
\n \n
\n {this.state.ShowAnswerID !== undefined ? x._id === this.state.ShowAnswerID)} UpdateAnswerID={this.ChangeAnswerID} /> : null}\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\ntype Config = {\n onSuccess?: (registration: ServiceWorkerRegistration) => void;\n onUpdate?: (registration: ServiceWorkerRegistration) => void;\n};\n\nexport function register(config?: 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(\n process.env.PUBLIC_URL,\n window.location.href\n );\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: string, config?: 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: string, config?: 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 \"./FaqItem.css\";\nimport App from \"./App\";\nimport * as serviceWorker from \"./serviceWorker\";\ndocument.body.style.background = \"#151a30\";\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":""}