{"version":3,"sources":["Landing.js","ProductListCard.js","Listing.js","components/Form/NestedConfig.js","components/Form/NestedForm.js","components/Form/String.js","components/Form/NumberInput.js","Portal.js","CurrencyPortal.js","Price.js","localePortal.js","Locale.js","components/Form/index.js","Detail.js","Header.js","contextProvider.js","styles/theme.js","App.js","reportWebVitals.js","index.js"],"names":["Landing","history","useHistory","useState","orgs","setOrgs","height","setHeight","useEffect","a","c","document","getElementById","clientHeight","Math","round","length","fetch","then","response","json","result","console","log","catch","error","classes","makeStyles","root","display","flexWrap","margin","padding","useStyles","className","Typography","variant","id","style","width","textAlign","Paper","elevation","minHeight","Grid","container","direction","alignContent","justifyContent","maxHeight","map","org","key","item","align","marginTop","onClick","push","name","_id","publicToken","noWrap","textDecoration","Array","elementInArray","i","Skeleton","theme","maxWidth","minWidth","details","flexDirection","content","flex","cover","controls","alignItems","paddingLeft","spacing","paddingBottom","playIcon","media","MediaControlCard","props","thumb","setThumb","product","orgId","Card","userId","CardActionArea","CardMedia","image","title","CardContent","gutterBottom","component","color","description","Listing","products","setProducts","useParams","method","redirect","assets","match","params","Breadcrumbs","aria-label","Link","window","location","pathname","split","replaceAll","trim","formControl","selectEmpty","formBtn","matches","useMediaQuery","current","setCurrent","currentAttr","currentAttrIndex","setCurrentAttrIndex","configurator","getDisplayAttributes","attributes","data","setLength","selectSelect","setSelectSelect","setColor","num","setNum","text","setText","isNested","nestedAttr","checkNested","attr","pl","player","enableApi","config","getNestedConfigurator","setStep","dir","handleString","val","setConfiguration","handlePartRef","assetId","e","event","type","values","FormControl","InputLabel","value","f","MenuItem","label","TextField","onChange","target","placeholder","ButtonGroup","orientation","Button","Slider","defaultValue","aria-labelledby","valueLabelDisplay","step","marks","newValue","handleSlide","min","max","data-name","rgb","r","g","b","handleColor","assetType","filesLimit","startIcon","list","fullList","TemporaryDrawer","anchor","React","left","state","setState","toggleDrawer","open","Fragment","Drawer","onClose","clsx","role","onKeyDown","StringComponent","Select","handleTextInput","xs","sm","md","NumberInput","Portal","ReactDOM","createPortal","this","children","Component","CurrencyPortal","Price","price","setPrice","currencies","setCurrencies","activeCurrency","setCurrency","pricebook","setPricebook","getPrice","myHeaders","Headers","append","requestOptions","headers","currentPrice","setPriceLoaded","ApiPricebook","pricebooks","filter","book","toLowerCase","Box","fontWeight","getSymbolFromCurrency","position","bottom","right","labelId","renderValue","currency","LocalePortal","Locale","languages","setLanguages","setKey","setactiveLanguage","getLanguages","translations","translate","getTranslations","handleChange","setLocale","playerLoaded","language","setAttributes","partRefSelect","setPartRefSelect","showForm","checked","setChecked","active","Object","keys","newAttributes","attribute","forEach","translationKey","justifyItems","justify","flexGrow","Switch","handleToggle","sort","generatePartRefOptions","loaded","styles","setProduct","setPlayerLoaded","err","setErr","wrap","setWrap","priceLoaded","user","setUser","productId","authToken","el","showConfigurator","showAR","locale","threekitPlayer","api","getConfigurator","when","on","unload","goBack","visibility","screen","menuButton","marginRight","toolbar","mixins","drawerPaper","drawerOpen","setDrawerOpen","users","setUsers","undefined","body","drawer","List","ListItem","button","ListItemText","primary","Divider","AppBar","Toolbar","IconButton","edge","src","Hidden","smUp","implementation","paper","ModalProps","keepMounted","Context","createContext","UpdateContext","ContextProvider","context","setContext","Provider","string","rawTheme","createTheme","palette","light","main","dark","secondary","warning","xLight","red","success","green","typography","fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontFamilySecondary","fontHeader","textTransform","background","default","common","white","grey","h1","letterSpacing","h2","h3","h4","h5","h6","subtitle1","body1","body2","App","ThemeProvider","path","render","pageid","reportWebVitals","onPerfEntry","Function","getCLS","getFID","getFCP","getLCP","getTTFB","StrictMode"],"mappings":"4XASe,SAASA,IACtB,IAAIC,EAAUC,cAEd,EAAwBC,mBAAS,IAAjC,mBAAOC,EAAP,KAAaC,EAAb,KACA,EAA4BF,mBAAS,GAArC,mBAAOG,EAAP,KAAeC,EAAf,KAEAC,oBAAS,sBAAC,4BAAAC,EAAA,sDACFC,EAAIC,SAASC,eAAe,aAAaC,aA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B,KAGtB,OACE,kBAACC,GAAA,EAAD,CAAe/T,MAAOA,IACpB,kBAACqR,GAAD,KACE,kBAAC,IAAD,KACE,kBAAC,GAAD,MACA,kBAAC,IAAD,KACE,kBAAC,IAAD,CAAO2C,KAAK,8BAA8BC,OAAQ,SAACjT,GAAD,OAChD,kBAAC,GAAD,eAAS/B,IAAK+B,EAAMuB,MAAMC,OAAO0R,QAAYlT,OAE/C,kBAAC,IAAD,CAAOgT,KAAK,kCAAkCC,OAAQ,SAACjT,GAAD,OACpD,kBAACgB,EAAD,eAAS/C,IAAK+B,EAAMuB,MAAMC,OAAO0R,QAAYlT,OAE/C,kBAAC,IAAD,CAAOgT,KAAK,KACV,kBAACnY,EAAD,WChCd,IAYesY,GAZS,SAAAC,GAClBA,GAAeA,aAAuBC,UACxC,8BAAqBtX,MAAK,YAAkD,IAA/CuX,EAA8C,EAA9CA,OAAQC,EAAsC,EAAtCA,OAAQC,EAA8B,EAA9BA,OAAQC,EAAsB,EAAtBA,OAAQC,EAAc,EAAdA,QAC3DJ,EAAOF,GACPG,EAAOH,GACPI,EAAOJ,GACPK,EAAOL,GACPM,EAAQN,OCDdhL,IAAS6K,OACP,kBAAC,IAAMU,WAAP,KACE,kBAACb,GAAD,OAEFtX,SAASC,eAAe,SAM1B0X,O","file":"static/js/main.5ae06695.chunk.js","sourcesContent":["import React, { useState, useEffect } from 'react'\nimport Paper from '@material-ui/core/Paper'\nimport { makeStyles } from '@material-ui/core/styles';\nimport { Grid, Typography } from '@material-ui/core';\nimport Skeleton from '@material-ui/lab/Skeleton';\nimport { useHistory } from 'react-router-dom'\n\n\n\nexport default function Landing() {\n let history = useHistory()\n\n const [orgs, setOrgs] = useState([]);\n const [height, setHeight] = useState(0);\n\n useEffect(async () => {\n const c = document.getElementById('container').clientHeight\n setHeight(2 * Math.round((c / 12.8) / 2))\n if (orgs.length < 1) {\n // let users = await getUsers()\n fetch(\"https://admin.demo.threekit.com/all\")\n .then(response => response.json())\n .then(result => {\n console.log(result)\n setOrgs(result)\n }\n )\n .catch(error => console.log('error', error));\n }\n }, [orgs])\n\n // function getUsers() {\n // return fetch('https://admin.demo.threekit.com/all')\n // .then(response => response.json())\n // .then(result => {\n // return result\n // })\n // .catch(error => console.log('error', error))\n // }\n\n const useStyles = makeStyles(() => ({\n root: {\n display: 'flex',\n flexWrap: 'wrap',\n '& > *': {\n margin: 'auto',\n padding: 10,\n // width: theme.spacing(16),\n // height: theme.spacing(16),\n },\n },\n }));\n const classes = useStyles();\n\n return (\n <>\n
\n categories\n \n
\n
\n 0 ? null : 'center'}\n\n style={{\n maxHeight: '70vh'\n }}\n >\n {orgs.length > 0 ? orgs.map((org) => {\n console.log(org)\n return ( {\n history.push(`/listing/${org.name}/${org._id}/${org.publicToken}`)\n }}\n >\n {org.name}\n {/* {org.userName} */}\n )\n }) :\n <>\n {[...Array(height)].map((elementInArray, i) => (\n < Grid\n item\n key={i}\n align='center'\n justifyContent='center'\n style={{\n width: '45%',\n margin: '3px'\n }}\n >\n \n \n )\n )}\n \n }\n \n
\n\n
\n \n )\n}\n","/* eslint-disable react/prop-types */\nimport React, { useState, useEffect } from 'react'\nimport { makeStyles } from '@material-ui/core/styles'\nimport Card from '@material-ui/core/Card'\nimport CardContent from '@material-ui/core/CardContent'\nimport CardMedia from '@material-ui/core/CardMedia'\nimport CardActionArea from '@material-ui/core/CardActionArea'\n\nimport Typography from '@material-ui/core/Typography'\nimport { useHistory } from 'react-router-dom'\n\nconst useStyles = makeStyles(theme => ({\n root: {\n display: 'flex',\n maxWidth: 345,\n minWidth: 345,\n margin: '0 auto 10px',\n height: 395\n },\n details: {\n display: 'flex',\n flexDirection: 'column'\n },\n content: {\n flex: '1 0 auto'\n },\n cover: {\n width: 151\n },\n controls: {\n display: 'flex',\n alignItems: 'center',\n paddingLeft: theme.spacing(1),\n paddingBottom: theme.spacing(1)\n },\n playIcon: {\n height: 38,\n width: 38\n },\n media: {\n height: 300\n }\n}))\n\nexport default function MediaControlCard(props) {\n const [thumb, setThumb] = useState(null)\n\n useEffect(() => {\n setThumb(\n `https://preview.threekit.com/api/assets/thumbnail/${props.product.id}?orgId=${props.product.orgId}&failOnEmpty=true`\n )\n return () => {\n setThumb(null)\n }\n }, [thumb])\n const classes = useStyles()\n let history = useHistory()\n\n return (\n {\n history.push(`/details/${props.userId}/${props.product.id}`)\n }}\n\n >\n \n \n \n \n {props.product.name}\n \n \n {props.product.description}\n \n \n \n
\n {/* \n \n {props.product.name}\n \n \n {props.product.description}\n \n {\n history.push(`/details/${props.userId}/${props.product.id}`)\n }}\n >\n details\n \n */}\n
\n {/* */}\n \n )\n}\n","/* eslint-disable react/prop-types */\nimport React, { useState, useEffect } from 'react'\nimport ProductListCard from './ProductListCard'\nimport { useParams } from 'react-router-dom'\nimport Breadcrumbs from '@material-ui/core/Breadcrumbs'\nimport Link from '@material-ui/core/Link'\nimport Typography from '@material-ui/core/Typography'\nimport { useHistory } from 'react-router-dom'\nimport Grid from '@material-ui/core/Grid'\n\nexport default function Listing(props) {\n let history = useHistory()\n\n const [products, setProducts] = useState([])\n\n // eslint-disable-next-line no-unused-vars\n let { id, name, publicToken } = useParams()\n useEffect(() => {\n var requestOptions = {\n method: 'GET',\n redirect: 'follow'\n }\n fetch(`https://admin.demo.threekit.com/products/${id}`, requestOptions)\n .then(response => response.json())\n .then(result => {\n setProducts(result.assets)\n })\n .catch(error => console.log('error', error))\n }, [props.match.params.id])\n\n return (\n <>\n Products\n \n {\n history.push(`/`)\n }}\n >\n Home\n \n \n {window.location.pathname\n .split('/')[2]\n .replaceAll('%20', ' ')\n .trim()}\n \n \n \n {products ? (\n products.map(product => {\n return (\n \n \n \n )\n })\n ) : (\n

\n {/* eslint-disable-next-line react/no-unescaped-entities */}\n No products found, you may need to add the \"website\" tag to your\n products\n

\n )}\n
\n \n )\n}\n","/* eslint-disable no-unreachable */\n/* eslint-disable react/prop-types */\n/* eslint-disable default-case */\nimport React, { useState, useEffect } from 'react'\nimport NestedForm from './NestedForm'\nimport \"./style.css\"\n// UI Elements\nimport { makeStyles } from '@material-ui/core/styles'\nimport useMediaQuery from '@material-ui/core/useMediaQuery'\nimport Typography from '@material-ui/core/Typography'\nimport ArrowBackIcon from '@material-ui/icons/ArrowBack'\nimport ArrowForwardIcon from '@material-ui/icons/ArrowForward'\nimport Button from '@material-ui/core/Button'\nimport ButtonGroup from '@material-ui/core/ButtonGroup'\nimport InputLabel from '@material-ui/core/InputLabel'\nimport MenuItem from '@material-ui/core/MenuItem'\nimport TuneIcon from '@material-ui/icons/Tune'\n\n// import FormHelperText from '@material-ui/core/FormHelperText'\nimport FormControl from '@material-ui/core/FormControl'\nimport Select from '@material-ui/core/NativeSelect'\n\n// Type = Number for numerical input\nimport TextField from '@material-ui/core/TextField'\nimport Slider from '@material-ui/core/Slider'\nimport { ColorPicker } from 'material-ui-color'\nimport { DropzoneArea } from 'material-ui-dropzone'\n\nconst useStyles = makeStyles(theme => ({\n formControl: {\n margin: theme.spacing(1),\n minWidth: 120\n },\n selectEmpty: {\n marginTop: theme.spacing(2)\n },\n root: {\n width: 300\n },\n formBtn: {\n margin: 5\n }\n}))\n\nexport default function Landing(props) {\n // Style\n const classes = useStyles()\n const matches = useMediaQuery('(min-width:600px)')\n\n // Gets the current step\n const [current, setCurrent] = useState(1)\n const [currentAttr] = useState()\n const [currentAttrIndex, setCurrentAttrIndex] = useState(0)\n\n // Saving the length of the array in state, probably not needed.\n const [attributes] = useState(window.configurator.getDisplayAttributes())\n const [length, setLength] = useState(props.data.length.length)\n\n\n // Configs\n const [selectSelect, setSelectSelect] = useState('')\n const [color, setColor] = useState('#000')\n const [num, setNum] = useState(0)\n const [text, setText] = useState('')\n const [isNested] = useState(false)\n const [nestedAttr] = useState([])\n\n function checkNested(attr) {\n window.pl = window.player.enableApi('player')\n window.config = window.pl.configurator\n // console.log(\"########\", attr)\n if (!window.config) {\n return\n }\n\n if (window.config.getNestedConfigurator(attr)) {\n // console.log('nested getDisplayAttributes')\n // console.log(\n // window.config.getNestedConfigurator(attr).getDisplayAttributes()\n // )\n return window.config.getNestedConfigurator(attr).getDisplayAttributes()\n } else {\n return false\n }\n // console.log(window.config.getNestedConfigurator(attr))\n }\n\n useEffect(() => {\n // setCurrentAttr(attributes[currentAttrIndex].name)\n\n // enable private API for nested config\n // attributes.forEach((element, index) => {\n // console.log()\n // if (checkNested(element)) {\n // setNestedAttr(nestedAttr => [...nestedAttr, index])\n // }\n // console.log(nestedAttr)\n // })\n }, [attributes, current, currentAttr, currentAttrIndex, isNested, nestedAttr])\n\n // Check to make sure we can't go too far in the steps\n function setStep(dir) {\n setSelectSelect()\n setNum()\n\n if (dir === 'forward') {\n if (current === length) {\n return\n } else {\n setCurrent(current => current + 1)\n setCurrentAttrIndex(currentAttrIndex => currentAttrIndex + 1)\n }\n } else {\n if (current === 1) {\n return\n } else {\n setCurrent(current => current - 1)\n setCurrentAttrIndex(currentAttrIndex => currentAttrIndex - 1)\n }\n }\n }\n\n function handleColor(event, e) {\n setColor(e)\n let color = e.rgb\n props.configurator.setConfiguration({\n [event]: { r: color[0] / 255, g: color[1] / 255, b: color[2] / 255 }\n })\n\n }\n // function handleUpload(e) {\n // setFile(e)\n // props.configurator.setConfiguration(e)\n\n // }\n function handleString(attr, val) {\n // This will be set config obj\n props.configurator.setConfiguration({ [attr]: val })\n\n }\n function handlePartRef(attr, val) {\n // This will be set config obj\n props.configurator.setConfiguration({ [attr]: { assetId: val } }).then(() => {\n setLength(window.configurator.getDisplayAttributes().length)\n })\n }\n function handleSlide(attr, e, newValue) {\n // This will be set config obj\n props.configurator.setConfiguration({ [attr]: newValue })\n setNum(newValue)\n }\n\n function handleTextInput(attr, value) {\n setText(value)\n props.configurator.setConfiguration({ [attr]: value })\n }\n return (\n
\n {props.data.length === 1 ? (\n

{props.data[currentAttrIndex].name}

\n ) : (\n
\n
\n setStep('back')}\n style={{ display: 'inline' }}\n />\n

\n {props.data[currentAttrIndex].name}\n

\n\n setStep('forward')}\n style={{ display: 'inline' }}\n />\n
\n {/* setStep('back')} style={{float: 'left'}} />\n

{attributes[currentAttrIndex].name}

\n\n setStep('forward')} style={{float: 'left'}} /> */}\n
\n )}\n\n \n

{props.data.map((e) => {\n return e.name\n })}

\n {[props.data[current - 1]].map((event) => {\n // console.log('attr index ' + currentAttrIndex)\n switch (event.type) {\n case 'String':\n if (event.values.length > 10) {\n return (\n
\n \n {event.name}\n \n \n
\n )\n } else if (event.values.length === 0) {\n return (\n handleTextInput(event.name, e.target.value)}\n placeholder={'Personalize your item'}\n />\n )\n } else {\n return (\n
\n \n {event.values.map(f => {\n return (\n \n handleString(event.name, f.value, event)\n }\n className={classes.formBtn}\n key={f.value}\n >\n {f.label}\n \n )\n })}\n \n
\n )\n }\n // eslint-disable-next-line no-unreachable\n break\n case 'Number':\n return (\n
\n \n {event.name}\n \n \n handleSlide(event.name, e, newValue)\n }\n min={event.min}\n max={event.max}\n />\n
\n\n //
  • \n // Number {e.name} - min: {e.min} max: {e.max}\n //
  • \n )\n break\n case 'Color':\n return (\n
    \n handleColor(event.name, e)}\n />\n
    \n )\n break\n case 'Asset':\n if (event.assetType === 'upload') {\n return \n } else if (event.values.length > 10) {\n return (\n
    \n {/*

    Part-Ref Long {event.name}

    */}\n \n {event.name}\n \n \n
    \n )\n } else if (event.values.length < 10) {\n return (\n
    \n \n {event.values.map((f) => {\n return (\n \n {checkNested(props.data[currentAttrIndex]) ? (\n \n ) : null}\n : null}\n onClick={() =>\n handlePartRef(event.name, f.assetId, event)\n }\n className={classes.formBtn}\n >\n {f.label}\n \n
    \n )\n })}\n \n
    \n )\n }\n break\n }\n })}\n \n \n )\n}\n","/* eslint-disable react/prop-types */\nimport React, { useEffect } from 'react'\nimport clsx from 'clsx'\nimport { makeStyles } from '@material-ui/core/styles'\nimport Drawer from '@material-ui/core/Drawer'\nimport NestedConfig from './NestedConfig'\nimport TuneIcon from '@material-ui/icons/Tune'\n\nconst useStyles = makeStyles({\n list: {\n width: 250\n },\n fullList: {\n width: 'auto'\n }\n})\n\nexport default function TemporaryDrawer(props) {\n useEffect(() => {\n // console.log(props)\n }, [])\n const classes = useStyles()\n const [state, setState] = React.useState({\n left: false\n })\n\n const toggleDrawer = (anchor, open) => event => {\n if (\n event.type === 'keydown' &&\n (event.key === 'Tab' || event.key === 'Shift')\n ) {\n return\n }\n\n setState({ ...state, [anchor]: open })\n }\n\n const list = anchor => (\n \n \n \n )\n\n return (\n
    \n \n Configure\n \n {list('bottom')}\n \n \n
    \n )\n}\n","import React from 'react';\nimport FormControl from '@material-ui/core/FormControl'\nimport InputLabel from '@material-ui/core/InputLabel'\nimport Select from '@material-ui/core/Select'\nimport TextField from '@material-ui/core/TextField'\nimport Button from '@material-ui/core/Button'\nimport Grid from '@material-ui/core/Grid'\nimport Paper from '@material-ui/core/Paper'\nimport MenuItem from '@material-ui/core/MenuItem'\nimport { makeStyles } from '@material-ui/core/styles'\n\n\nconst useStyles = makeStyles(theme => ({\n formControl: {\n margin: theme.spacing(1),\n minWidth: 250\n },\n selectEmpty: {\n marginTop: theme.spacing(2)\n },\n root: {\n width: 300\n },\n formBtn: {\n // margin: 5\n }\n}))\n\nexport default function StringComponent(props) {\n const classes = useStyles()\n\n if (props.e.values.length > 0) {\n return (\n
    \n \n {props.e.name}\n \n \n
    \n )\n } else if (props.e.values.length === 0) {\n return (\n props.handleTextInput(props.e.name, e.target.value)}\n placeholder={'Personalize your item'}\n />\n )\n } else {\n return (\n props.e.values.map(f => {\n return (\n \n \n props.handleString(props.e.name, f.value, props.e)\n }\n style={{\n width: \"70%\",\n minHeight: \"100%\",\n }}\n >\n {f.label}\n \n \n )\n })\n\n )\n }\n}","/* eslint-disable react/prop-types */\nimport React from 'react'\nimport { makeStyles } from '@material-ui/core/styles'\nimport Slider from '@material-ui/core/Slider'\nimport Typography from '@material-ui/core/Typography'\n\nconst useStyles = makeStyles(theme => ({\n formControl: {\n margin: theme.spacing(1),\n minWidth: 120\n },\n selectEmpty: {\n marginTop: theme.spacing(2)\n },\n root: {\n width: 300\n },\n formBtn: {\n // margin: 5\n }\n}))\n\nexport default function NumberInput(props) {\n const classes = useStyles()\n\n return (\n
    \n \n {props.event.name}\n \n \n props.handleSlide(props.event.name, e, newValue)\n }\n min={props.event.min}\n max={props.event.max}\n />\n
    \n\n //
  • \n // Number {e.name} - min: {e.min} max: {e.max}\n //
  • \n )\n}\n","/* eslint-disable react/prop-types */\nimport React from 'react';\nimport ReactDOM from 'react-dom';\n\nexport default class Portal extends React.Component {\n render() {\n return ReactDOM.createPortal(this.props.children, document.getElementById('portal'));\n }\n}","/* eslint-disable react/prop-types */\nimport React from 'react';\nimport ReactDOM from 'react-dom';\n\nexport default class CurrencyPortal extends React.Component {\n render() {\n return ReactDOM.createPortal(this.props.children, document.getElementById('currencyPortal'));\n }\n}","/* eslint-disable react/prop-types */\nimport React, { useState, useEffect } from 'react'\nimport Box from '@material-ui/core/Box'\nimport { MenuItem, Select, Typography } from '@material-ui/core'\nimport getSymbolFromCurrency from 'currency-symbol-map'\nimport Portal from './Portal'\nimport CurrencyPortal from './CurrencyPortal'\n\nexport default function Price(props) {\n const [price, setPrice] = useState(0)\n const [currencies, setCurrencies] = useState(0)\n const [activeCurrency, setCurrency] = useState(0)\n const [pricebook, setPricebook] = useState(null)\n\n\n useEffect(() => {\n getPrice()\n }, [price, props])\n\n function renderValue() {\n return activeCurrency\n }\n\n function getPrice() {\n\n // setAttributes(props.attributes)\n let userId = props.userId\n\n var myHeaders = new Headers()\n myHeaders.append(\n 'Authorization',\n 'Bearer 34613bc7-dd6d-41f3-b1e0-6098b29b5d1a'\n )\n\n var requestOptions = {\n method: 'GET',\n headers: myHeaders,\n redirect: 'follow'\n }\n\n if (!pricebook) {\n fetch(\n 'https://admin.demo.threekit.com/pricebook/' + userId,\n requestOptions\n )\n .then(response => response.json())\n .then(result => {\n let ApiPricebook = result.pricebooks.filter(book => {\n return book.name.toLowerCase() === 'website'\n })\n if (window.configurator) {\n if (ApiPricebook) {\n setPricebook(ApiPricebook)\n ApiPricebook = ApiPricebook[0]\n setCurrencies(ApiPricebook.currencies)\n console.log('api')\n if (!activeCurrency) {\n setCurrency(ApiPricebook.currencies[0])\n props.setPriceLoaded(true)\n }\n let currentPrice = window.configurator.getPrice(\n ApiPricebook.id,\n activeCurrency\n )\n if (currentPrice !== price) {\n setPrice(currentPrice)\n props.setPriceLoaded(true)\n } else {\n props.setPriceLoaded(true)\n }\n } else {\n console.log('origional')\n props.setPriceLoaded(true)\n }\n } props.setPriceLoaded(true)\n })\n .catch(error => console.log('error', error))\n } else {\n if (window.configurator && pricebook.length > 0) {\n let currentPrice = window.configurator.getPrice(\n pricebook[0].id,\n activeCurrency\n )\n if (currentPrice !== price) {\n setPrice(currentPrice)\n props.setPriceLoaded(true)\n }\n } else {\n props.setPriceLoaded(true)\n }\n }\n props.setPriceLoaded(true)\n }\n useEffect(() => {\n getPrice()\n }, [activeCurrency]);\n\n return (\n
    \n \n {price > 0 ? (\n \n \n {getSymbolFromCurrency(activeCurrency) ? getSymbolFromCurrency(activeCurrency) : 'errorororor'}{price}\n \n \n ) : null}\n \n {currencies ?\n \n
    \n currency\n\n {\n setCurrency(e.target.value)\n }}\n >{currencies.map(currency => {\n return (\n {currency}\n )\n })}\n \n
    \n
    \n : null}\n
    \n )\n}\n","/* eslint-disable react/prop-types */\nimport React from 'react';\nimport ReactDOM from 'react-dom';\n\nexport default class LocalePortal extends React.Component {\n render() {\n return ReactDOM.createPortal(this.props.children, document.getElementById('localePortal'));\n }\n}","/* eslint-disable react/prop-types */\nimport Select from '@material-ui/core/Select'\nimport MenuItem from '@material-ui/core/MenuItem'\nimport React, { useState, useEffect } from 'react';\nimport LocalePortal from './localePortal';\nimport { Typography } from '@material-ui/core';\n\nexport default function Locale(props) {\n const [languages, setLanguages] = useState([]);\n const [key, setKey] = useState(0)\n const [activeLanguage, setactiveLanguage] = useState();\n\n useEffect(async () => {\n if (key >= 0) {\n let languages = await getLanguages()\n setLanguages(languages)\n props.translate(window.player.getTranslations())\n setKey(key - 1)\n }\n }, [props, key]);\n\n useEffect(() => {\n setactiveLanguage(languages[0])\n }, [languages]);\n\n async function getLanguages() {\n var myHeaders = new Headers();\n myHeaders.append(\"authorization\", \"Bearer {access-token}\");\n\n var requestOptions = {\n method: 'GET',\n headers: myHeaders,\n redirect: 'follow'\n };\n\n let translations = await fetch(\"https://admin.demo.threekit.com/translations/\" + props.userId, requestOptions)\n .then(response => response.json())\n .catch(error => console.log('error', error));\n\n return translations.values\n }\n let handleChange = async (e) => {\n await window.player.setLocale(e.target.value)\n props.translate(window.player.getTranslations(e))\n setKey(key + 1)\n }\n\n\n\n\n return (props.playerLoaded && languages.length > 0 ? (\n \n \n language\n {\n handleChange(e)\n }\n }\n >\n {\n languages.length > 1 ? languages.map((language) => {\n return (\n {language.label}\n )\n }) : null\n }\n \n \n \n ) : null\n )\n}","/* eslint-disable react/prop-types */\n/* eslint-disable default-case */\nimport React, { useState, useEffect } from 'react'\nimport NestedForm from './NestedForm'\nimport './style.css'\n// UI Elements\nimport { makeStyles } from '@material-ui/core/styles'\nimport ArrowBackIcon from '@material-ui/icons/ArrowBack'\nimport ArrowForwardIcon from '@material-ui/icons/ArrowForward'\nimport Button from '@material-ui/core/Button'\nimport Grid from '@material-ui/core/Grid'\nimport InputLabel from '@material-ui/core/InputLabel'\nimport MenuItem from '@material-ui/core/MenuItem'\nimport { FormControlLabel, Switch } from '@material-ui/core'\n\nimport StringComponent from './String'\nimport NumberInput from './NumberInput'\nimport Price from '../../Price'\nimport Locale from '../../Locale'\n\n// import FormHelperText from '@material-ui/core/FormHelperText'\nimport FormControl from '@material-ui/core/FormControl'\nimport Select from '@material-ui/core/Select'\n\n// Type = Number for numerical input\nimport { ColorPicker } from 'material-ui-color'\nimport Skeleton from '@material-ui/lab/Skeleton'\n\nconst useStyles = makeStyles(theme => ({\n formControl: {\n margin: theme.spacing(1),\n minWidth: 120\n },\n selectEmpty: {\n marginTop: theme.spacing(2)\n },\n root: {\n width: 300\n },\n formBtn: {\n // margin: 5\n }\n}))\n\nexport default function Landing(props) {\n // Style\n const classes = useStyles()\n\n // Gets the current step\n const [current, setCurrent] = useState(1)\n const [currentAttr] = useState()\n const [currentAttrIndex, setCurrentAttrIndex] = useState(0)\n const [translatedAttributes, setTranslatedAttributes] = useState();\n\n // Saving the length of the array in state, probably not needed.\n const [attributes, setAttributes] = useState(\n window.configurator.getDisplayAttributes()\n )\n const [length, setLength] = useState(attributes.length)\n const [key] = useState()\n\n // Configs\n const [selectSelect, setSelectSelect] = useState('')\n const [partRefSelect, setPartRefSelect] = useState('')\n const [color, setColor] = useState('#000')\n const [num, setNum] = useState(0)\n const [text, setText] = useState('')\n const [isNested] = useState(false)\n const [nestedAttr] = useState([])\n const [showForm, setShowForm] = useState(true)\n const [checked, setChecked] = useState(false);\n // const [playerHeight, setPlayerHeight] =useState()\n\n function checkNested(attr, active) {\n window.pl = window.player.enableApi('player')\n window.config = window.pl.configurator\n if (!window.config) {\n return\n }\n\n if (\n window.config.getNestedConfigurator(attr) &&\n active === attr.value.assetId\n ) {\n // console.log('nested getDisplayAttributes')\n // console.log(\n // window.config.getNestedConfigurator(attr).getDisplayAttributes()\n // )\n return window.config.getNestedConfigurator(attr).getDisplayAttributes()\n } else {\n return false\n }\n // console.log(window.config.getNestedConfigurator(attr))\n }\n\n useEffect(() => {\n translate()\n\n // setCurrentAttr(attributes[currentAttrIndex].name)\n // enable private API for nested config\n // attributes.forEach((element, index) => {\n // console.log()\n // if (checkNested(element)) {\n // setNestedAttr(nestedAttr => [...nestedAttr, index])\n // }\n // console.log(nestedAttr)\n // })\n }, [\n attributes,\n current,\n currentAttr,\n currentAttrIndex,\n isNested,\n nestedAttr,\n props,\n key\n ])\n\n // Check to make sure we can't go too far in the steps\n function setStep(dir) {\n setPartRefSelect(null)\n setSelectSelect()\n setNum()\n\n if (dir == 'forward') {\n if (current == length) {\n setCurrent(() => 1)\n setCurrentAttrIndex(0)\n\n } else {\n setCurrent(current => current + 1)\n setCurrentAttrIndex(currentAttrIndex => currentAttrIndex + 1)\n }\n } else {\n if (current == 1) {\n setCurrent(length)\n setCurrentAttrIndex(length - 1)\n } else {\n setCurrent(current => current - 1)\n setCurrentAttrIndex(currentAttrIndex => currentAttrIndex - 1)\n }\n }\n }\n\n // function handleSelect(attr, e) {\n // // setSelectSelect(e.target.value)\n // window.configurator.setConfiguration({ [attr]: e.target.value })\n // setAttributes(window.configurator.getDisplayAttributes())\n // }\n function handleColor(event, e) {\n setColor(e)\n let color = e.rgb\n window.configurator.setConfiguration({\n [event]: { r: color[0] / 255, g: color[1] / 255, b: color[2] / 255 }\n }).then(() => {\n setAttributes(window.configurator.getDisplayAttributes())\n translate()\n setLength(window.configurator.getDisplayAttributes().length)\n\n })\n }\n // function handleUpload(e) {\n // setFile(e)\n // window.configurator.setConfiguration(e)\n // setAttributes(window.configurator.getDisplayAttributes())\n translate()\n // }\n function handleString(attr, val) {\n // This will be set config obj\n window.configurator.setConfiguration({ [attr]: val }).then(() => {\n setAttributes(window.configurator.getDisplayAttributes())\n translate()\n setLength(window.configurator.getDisplayAttributes().length)\n })\n }\n function handlePartRef(attr, val) {\n // This will be set config obj\n\n window.configurator\n .setConfiguration({ [attr]: { assetId: val } })\n .then(() => {\n setAttributes(window.configurator.getDisplayAttributes())\n translate()\n setLength(window.configurator.getDisplayAttributes().length)\n // console.log(val)\n })\n }\n function handleSlide(attr, e, newValue) {\n // This will be set config obj\n window.configurator.setConfiguration({ [attr]: newValue }).then(() => {\n setAttributes(window.configurator.getDisplayAttributes())\n translate()\n setLength(window.configurator.getDisplayAttributes().length)\n })\n setNum(newValue)\n\n }\n\n function handleTextInput(attr, value) {\n setText(value)\n window.configurator.setConfiguration({ [attr]: value }).then(() => {\n setAttributes(window.configurator.getDisplayAttributes())\n translate()\n setLength(window.configurator.getDisplayAttributes().length)\n })\n\n }\n\n function handleToggle(event, e) {\n setChecked(!checked)\n console.log(e.target.value)\n window.configurator.setConfiguration({ [event.name]: !checked }).then(() => {\n setAttributes(window.configurator.getDisplayAttributes())\n translate()\n setLength(window.configurator.getDisplayAttributes().length)\n })\n\n }\n\n function toggleShowForm() {\n setShowForm(!showForm)\n }\n\n function translate() {\n if (window.player.getTranslations() && Object.keys(window.player.getTranslations()).length > 0 && window.configurator.getDisplayAttributes()) {\n let newAttributes = window.configurator\n .getDisplayAttributes()\n .map(attribute => {\n Object.keys(window.player.getTranslations()).forEach(translationKey => {\n if (attribute.name === translationKey) {\n attribute.label = window.player.getTranslations()[translationKey]\n }\n attribute.values.forEach((value) => {\n if (value.label === translationKey) {\n value.label = window.player.getTranslations()[translationKey]\n }\n })\n })\n return attribute\n })\n\n if (attributes[0].label !== newAttributes[0].label) {\n console.log(newAttributes, attributes)\n setAttributes(newAttributes)\n //this is dirty. the purpose of value attribtues is to change the name of the values without changing the name of the attribtue itself. \n //the purpose of the translated attributes is to change the name of the attribtues and use that as the display name for the attribute\n // this is necessary because the name of the attribute is also what setDisplayAttributes() uses to set. \n //We should make another key on attributes in the future and use that for the display to fix this problem\n }\n }\n }\n\n function generatePartRefOptions(event) {\n event.values.sort((a, b) => {\n if (a.label < b.label) { return -1 }\n if (a.label > b.label) { return 1 }\n return 0\n })\n return event.values.map(f => {\n return (\n\n \n {f.label}\n \n\n )\n })\n }\n\n function renderValue(value) {\n console.log(value)\n return value;\n }\n\n return (\n
    \n {attributes.length === 1 ? (\n
    \n

    {attributes[currentAttrIndex].name}

    \n
    \n ) : (\n
    \n \n \n \n < Button>\n setStep('forward')}\n style={{ display: 'inline' }}\n />\n \n \n {/* setStep('back')} style={{float: 'left'}} />\n

    {attributes[currentAttrIndex].name}

    \n setStep('forward')} style={{float: 'left'}} /> */}\n
    \n )}\n\n {showForm ? (\n \n {[attributes[currentAttrIndex]].map((event) => {\n // console.log('attr index ' + currentAttrIndex)\n switch (event.type) {\n case 'String':\n return (\n \n )\n\n // eslint-disable-next-line no-unreachable\n break\n case 'Boolean':\n return (\n handleToggle(event, e)}\n color=\"#E48B6E\"\n name=\"checkedB\"\n />\n )\n\n // eslint-disable-next-line no-unreachable\n break\n case 'Number':\n return (\n \n )\n\n // eslint-disable-next-line no-unreachable\n break\n case 'Color':\n return (\n
    \n handleColor(event.name, e)}\n />\n
    \n )\n // eslint-disable-next-line no-unreachable\n break\n case 'Asset':\n if (event.assetType == 'upload') {\n return (\n // need to build this\n

    Image upload is not yet supported on this app.

    \n )\n } else if (event.values.length > 0) {\n return (\n
    \n {/*

    Part-Ref Long {event.name}

    */}\n \n {attributes[currentAttrIndex].label}\n
    \n
    \n {event.values.map(g => {\n return checkNested(\n attributes[currentAttrIndex],\n g.assetId\n ) ? (\n \n ) : null\n })}\n
    \n\n renderValue(partRefSelect)}\n onChange={(e) => {\n console.log(e.target.value)\n handlePartRef(event.name, e.target.value.id)\n setPartRefSelect(e.target.value.label)\n }}\n >\n {generatePartRefOptions(event)}\n \n
    \n
    \n )\n } else if (event.values.length < 10) {\n return event.values.map((f) => {\n return (\n \n {' '}\n {/* {checkNested(\n attributes[currentAttrIndex],\n f.assetId\n ) ? (\n \n ) : null} */}\n \n ) : null\n }\n onClick={() =>\n handlePartRef(event.name, f.assetId, event)\n }\n className={classes.formBtn}\n style={{\n width: '70%',\n minHeight: '100%',\n color: '#044849'\n }}\n >{f.label}\n \n \n )\n })\n }\n break\n }\n })}\n \n ) : null}\n {props.playerLoaded ? (\n \n ) : null}\n \n
    \n )\n}","/* eslint-disable react/prop-types */\nimport React, { useState, useEffect } from 'react'\nimport Form from './components/Form'\nimport { useParams } from 'react-router-dom'\nimport Grid from '@material-ui/core/Grid'\n\nimport Breadcrumbs from '@material-ui/core/Breadcrumbs'\nimport Link from '@material-ui/core/Link'\nimport Typography from '@material-ui/core/Typography'\nimport { useHistory } from 'react-router-dom'\nimport Skeleton from '@material-ui/lab/Skeleton'\n\n\nexport default function Landing(props) {\n const [product, setProduct] = useState({})\n const [attributes, setAttributes] = useState(null)\n const [playerLoaded, setPlayerLoaded] = useState(false)\n const [err, setErr] = useState(null)\n const [wrap, setWrap] = useState(true)\n const [priceLoaded, setPriceLoaded] = useState();\n\n const [user, setUser] = useState(null)\n let { userId, productId } = useParams()\n let history = useHistory()\n\n\n useEffect(() => {\n console.log(priceLoaded)\n // get user\n fetch(`https://admin.demo.threekit.com/all`, requestOptions)\n .then(response => response.json())\n .then(result => {\n result.forEach(e => {\n if (e._id === window.location.pathname.split('/')[2]) {\n setUser(e.name)\n }\n })\n })\n .catch(error => console.log('error', error))\n // end get user\n var requestOptions = {\n method: 'GET',\n redirect: 'follow'\n }\n if (Object.keys(product).length === 0) {\n fetch(\n `https://admin.demo.threekit.com/product/${userId}/${productId}`,\n requestOptions\n )\n .then(response => response.json())\n .then(result => {\n setProduct(result)\n })\n .catch(error => console.log('error', error))\n }\n if (!product.publicToken) {\n return\n } else {\n let config = {\n authToken: product.publicToken,\n el: document.getElementById('player'),\n assetId: product.id,\n showConfigurator: false,\n showAR: true,\n locale: 'FR'\n }\n // if (locale) {\n // config.locale = locale\n // }\n window\n .threekitPlayer(config)\n .then(async api => {\n window.player = api\n window.configurator = await api.getConfigurator()\n await api.when('loaded')\n setPlayerLoaded(true)\n if (attributes === null) {\n setAttributes(window.configurator.getDisplayAttributes())\n const privateConfig = window.player\n .enableApi('player')\n .getConfigurator()\n // eslint-disable-next-line no-unused-vars\n privateConfig.on('setConfiguration', config => {\n setAttributes(window.configurator.getDisplayAttributes())\n })\n }\n })\n .catch(err => {\n setErr(err)\n })\n }\n return () => {\n if (window.player) {\n window.player.unload()\n }\n }\n }, [product, attributes, props.match.params.userId])\n return (\n <>\n \n\n {\n history.push(`/`)\n }}\n >\n Home\n \n {\n history.goBack()\n }}\n >\n {user}\n \n {product.name}\n \n {!err ? (\n
    \n \n \n \n {product.name}\n \n \n \n
    \n
    \n \n \n\n {playerLoaded ? (\n\n product.description ? \n {/* */}\n (wrap ? setWrap(false) : setWrap(true))}\n variant=\"body1\"\n >\n {product.description}\n \n {/* */}\n
    : null\n\n\n ) : }\n\n \n \n \n ) : (\n

    \n There was an error loading this asset. Please ensure the token,\n assetId, and orgID are all correct.\n

    \n )}\n\n {attributes === null || attributes.length === 0 ? <>\n \n : (\n \n )}\n
    \n
    \n \n )\n}\n","/* eslint-disable react/prop-types */\nimport React, { useState, useEffect } from 'react'\nimport { makeStyles } from '@material-ui/core/styles'\nimport AppBar from '@material-ui/core/AppBar'\nimport Toolbar from '@material-ui/core/Toolbar'\nimport Typography from '@material-ui/core/Typography'\nimport Button from '@material-ui/core/Button'\nimport IconButton from '@material-ui/core/IconButton'\nimport MenuIcon from '@material-ui/icons/Menu'\nimport Drawer from '@material-ui/core/Drawer'\nimport ListItem from '@material-ui/core/ListItem'\nimport ListItemText from '@material-ui/core/ListItemText'\nimport Divider from '@material-ui/core/Divider'\nimport List from '@material-ui/core/List'\nimport Hidden from '@material-ui/core/Hidden'\nimport { useHistory } from 'react-router-dom'\n\n\nconst drawerWidth = '100%'\n\nconst useStyles = makeStyles(theme => ({\n root: {\n flexGrow: 1\n },\n menuButton: {\n marginRight: theme.spacing(2)\n },\n title: {\n flexGrow: 1\n },\n // necessary for content to be below app bar\n toolbar: theme.mixins.toolbar,\n drawerPaper: {\n width: drawerWidth\n },\n content: {\n flexGrow: 1,\n padding: theme.spacing(3)\n }\n}))\n\nexport default function Landing(props) {\n const [drawerOpen, setDrawerOpen] = useState(false)\n const [users, setUsers] = useState([])\n\n const classes = useStyles()\n const { window } = props\n const container =\n window !== undefined ? () => window().document.body : undefined\n function toggleDrawer() {\n setDrawerOpen(!drawerOpen)\n }\n let history = useHistory()\n\n useEffect(() => {\n var requestOptions = {\n method: 'GET',\n redirect: 'follow'\n }\n\n fetch('https://admin.demo.threekit.com/all', requestOptions)\n .then(response => response.json())\n .then(result => {\n setUsers(result)\n })\n .catch(error => console.log('error', error))\n }, [])\n\n const drawer = (\n
    \n
    \n {/* */}\n \n {\n history.push(`/`)\n toggleDrawer()\n }}\n >\n \n \n \n {users.map((user) => (\n {\n history.push(\n `/listing/${user.name}/${user._id}/${user.publicToken}`\n )\n toggleDrawer()\n }}\n >\n\n \n \n ))}\n \n
    \n )\n\n return (\n
    \n \n \n {\n setDrawerOpen(!drawerOpen)\n }}\n >\n \n \n {\n history.push(`/`)\n }}>\n Threekit\n \n \n \n \n \n \n {drawer}\n \n \n
    \n )\n}\n","/* eslint-disable react/prop-types */\nimport React, { useState, useContext } from 'react';\n\nconst Context = React.createContext()\nconst UpdateContext = React.createContext()\n\nexport function useContextData() {\n return useContext(Context)\n}\n\nexport function useUpdateContext() {\n return useContext(UpdateContext)\n}\n\nexport function ContextProvider({ children }) {\n const [context, setContext] = useState(null);\n function setTest(string) {\n setContext(string)\n }\n return (\n \n \n {children}\n \n \n )\n}","import { createTheme } from '@material-ui/core/styles';\nimport { green, grey, red } from '@material-ui/core/colors';\n\nconst rawTheme = createTheme({\n palette: {\n primary: {\n light: '#69696a',\n main: '#28282a',\n dark: '#1e1e1f',\n },\n secondary: {\n light: '#fff5f8',\n main: '#ff3366',\n dark: '#e62958',\n },\n warning: {\n main: '#ffc071',\n dark: '#ffb25e',\n },\n error: {\n xLight: red[50],\n main: red[500],\n dark: red[700],\n },\n success: {\n xLight: green[50],\n main: green[500],\n dark: green[700],\n },\n },\n typography: {\n fontFamily: \"'Work Sans', sans-serif\",\n fontSize: 14,\n fontWeightLight: 300, // Work Sans\n fontWeightRegular: 400, // Work Sans\n fontWeightMedium: 700, // Roboto Condensed\n fontFamilySecondary: \"'Roboto Condensed', sans-serif\",\n },\n});\n\nconst fontHeader = {\n color: rawTheme.palette.text.primary,\n fontWeight: rawTheme.typography.fontWeightMedium,\n fontFamily: rawTheme.typography.fontFamilySecondary,\n textTransform: 'uppercase',\n};\n\nconst theme = {\n ...rawTheme,\n palette: {\n ...rawTheme.palette,\n background: {\n ...rawTheme.palette.background,\n default: rawTheme.palette.common.white,\n placeholder: grey[200],\n },\n },\n typography: {\n ...rawTheme.typography,\n fontHeader,\n h1: {\n ...rawTheme.typography.h1,\n ...fontHeader,\n letterSpacing: 0,\n fontSize: 60,\n },\n h2: {\n ...rawTheme.typography.h2,\n ...fontHeader,\n fontSize: 48,\n },\n h3: {\n ...rawTheme.typography.h3,\n ...fontHeader,\n fontSize: 42,\n },\n h4: {\n ...rawTheme.typography.h4,\n ...fontHeader,\n fontSize: 28,\n },\n h5: {\n ...rawTheme.typography.h5,\n fontSize: 20,\n fontWeight: rawTheme.typography.fontWeightLight,\n },\n h6: {\n ...rawTheme.typography.h6,\n ...fontHeader,\n fontSize: 18,\n },\n subtitle1: {\n ...rawTheme.typography.subtitle1,\n fontSize: 18,\n },\n body1: {\n ...rawTheme.typography.body2,\n fontWeight: rawTheme.typography.fontWeightRegular,\n fontSize: 16,\n },\n body2: {\n ...rawTheme.typography.body1,\n fontSize: 14,\n },\n },\n};\n\nexport default theme;","/* eslint-disable react/prop-types */\nimport React from 'react';\nimport {\n BrowserRouter as Router,\n Switch,\n Route\n} from \"react-router-dom\";\nimport Landing from \"./Landing\";\nimport Listing from \"./Listing\";\nimport Details from './Detail'\nimport Header from './Header'\nimport { ContextProvider } from './contextProvider';\nimport './styles/style.css'\nimport { ThemeProvider } from '@material-ui/styles';\nimport theme from './styles/theme';\n\nexport default function App() {\n\n\n return (\n \n \n \n
    \n \n (\n
    )\n } />\n (\n )\n } />\n \n \n \n \n \n \n \n );\n}\n\n","const reportWebVitals = onPerfEntry => {\n if (onPerfEntry && onPerfEntry instanceof Function) {\n import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {\n getCLS(onPerfEntry);\n getFID(onPerfEntry);\n getFCP(onPerfEntry);\n getLCP(onPerfEntry);\n getTTFB(onPerfEntry);\n });\n }\n};\n\nexport default reportWebVitals;\n","import React from 'react';\nimport ReactDOM from 'react-dom';\nimport './index.css';\nimport App from './App';\nimport reportWebVitals from './reportWebVitals';\n\nReactDOM.render(\n \n \n ,\n document.getElementById('root')\n);\n\n// If you want to start measuring performance in your app, pass a function\n// to log results (for example: reportWebVitals(console.log))\n// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals\nreportWebVitals();\n"],"sourceRoot":""}