{"version":3,"sources":["util/FetchUtil.js","config/settings.js","controller/AuthController.js","controller/CustomerController.js","controller/FloorController.js","view/LoginParams.js","view/ExportOptions.js","view/Response.js","view/RequiredParams.js","view/ImdfParams.js","view/MapOptionalParams.js","view/IpsOptionalParams.js","view/EmptyOptionalParams.js","controller/LocalIPSController.js","controller/JacsQueController.js","controller/index.js","view/ExportParent.js","App.js","serviceWorker.js","index.js"],"names":["FetchUtil","url","a","headers","fetch","method","mode","req","json","cors","blob","data","body","status","format","properties","jacsQueUrl","generateUrl","generateIpsUrl","clientId","AuthController","this","username","password","host","client_id","grant_type","encodedBody","Object","keys","map","key","encodeURIComponent","join","post","authReponse","CustomerController","customerId","hostUrl","token","entity","Authorization","get","reponse","Array","isArray","FloorController","venue","id","response","length","getBuildingId","buildingId","LoginParams","props","handleChange","bind","authorize","authController","customerController","floorController","state","errorMessage","loginClick","event","target","setState","value","auth","access_token","jwtDecode","cid","getByCustomer","clients","templates","venues","forEach","v","name","getByVenue","initFloors","sdkClients","filter","c","sdkCredentials","onLoginClick","inputProps","style","color","inputLabelProps","shrink","className","TextField","required","label","margin","onChange","InputProps","InputLabelProps","type","Button","variant","onClick","CircularProgress","Component","ExportOptions","onExportClick","onExportSelect","onExportChange","FormControl","component","FormLabel","focused","RadioGroup","aria-label","defaultValue","row","FormControlLabel","control","Radio","endIcon","disabled","exportClick","Response","handleClick","handleClose","handleViewClick","handleDownloadClick","handleImdfDownloadClick","fetchUtil","anchorEl","currentTarget","innerHTML","exports","find","e","window","open","getFile","saveAs","fileUrl","aria-controls","aria-haspopup","Menu","keepMounted","Boolean","onClose","MenuItem","createErrorMessage","createExportLinks","createImdfExportLinks","message","showResponseButtons","export","RequiredParams","onVenueChange","onClientChange","InputLabel","Select","autoWidth","selectedVenue","selectedClient","client","ImdfParams","paddingTop","MapOptionalParams","boundingBoxParams","focusToWaypointParams","onFloorChange","bboxX","bboxY","waypointId","unitPadding","minWidth","minHeight","selectedFloor","optional","floors","floor","Checkbox","checked","focusToWaypoint","fontSize","IpsOptionalParams","EmptyOptionalParams","LocalIPSController","lat1","lon1","lat2","lon2","PI","Math","cos","sin","sqrt","atan2","radsInSingleDegree","dLat","dLon","coordinates","mapSize","topLat","topLeft","topLng","bottomLat","bottomRight","bottomLng","distance","measure","latlng","proj4","mmPerPX","hypot","pxPerMeter","Promise","resolve","reject","clientSec","clientSecret","authResponse","getVenueFullCall","vfcResponse","mapTemplateResponse","defaultMapTemplateId","getMapTemplateById","getBuildingFullCall","buildings","items","bfcResponse","vfc","bfc","mt","svg","docwidth","docheight","scale","width","height","canvas","OffscreenCanvas","ctx","getContext","Canvg","fromString","presets","offscreen","resize","render","convertToBlob","mapTemplateId","venueId","client_secret","mapNames","building","templateBlob","text","templateText","pngSize","round","replace","address","md","JacsQueController","JSON","stringify","uuid","setIfNotNull","field","getGeneratedImdfFile","controller","isAwaiting","interval","setInterval","getImdfFile","generatedImdfFile","clearInterval","GenerateController","localIPSController","jacsQueueController","f","customer_id","venue_id","host_name","map_id","mapId","building_id","focus_waypoint","export_formats","fontFamily","fontFill","fontStroke","fontStrokeWidth","bboxWidth","bboxHeight","updateMessage","getAllVenueData","venueData","zip","JSZip","venueName","file","exportIPSData","mapNameArray","i","mapName","shortName","includes","level","parser","DOMParser","doc","parseFromString","cssRawRuleList","k","getElementsByTagName","push","prototype","slice","call","sheet","cssRules","cssCombinedRuleList","m","n","cssRuleList","element","index","indexOf","customStyleString","customStylingSVGXml","mapStyleList","mapStyle","j","cssObject","selectorText","toLowerCase","concat","layerName","layerObject","fill","opacity","stroke","strokeWidth","strokeOpacity","cssText","split","documentElement","viewBox","baseVal","Error","svgToRasterize","rasterizeMap","svgBlob","Blob","exportSupportFile","generateAsync","then","selectedTemplate","t","map_style","postFile","pushImdfExportRequest","exportResponse","ExportParent","handleExportChange","handleVenueChange","handleClientChange","handleOptionalParamChange","handleFloorChange","handleIpsParamChange","generateExport","generateController","templatesWithDefault","venueFloorMap","exportMessage","venueKey","alreadyLoaded","localGenerateIPS","showUpdateMessage","exportImdf","showRequiredParams","showMainPage","App","login","handleLogout","loggedIn","location","hostname","match","ReactDOM","document","getElementById","navigator","serviceWorker","ready","registration","unregister"],"mappings":"qgBA4DeA,E,0HA1Db,WAAUC,GAAV,+BAAAC,EAAA,6DAAeC,EAAf,+BAAyB,GAAzB,SACoBC,MAAMH,EAAK,CAC3BI,OAAQ,MACRC,KAAM,OACNH,YAJJ,cACQI,EADR,gBAMqBA,EAAIC,OANzB,cAMQA,EANR,yBAOSA,GAPT,2C,mHAUA,WAAcP,GAAd,iCAAAC,EAAA,6DAAmBC,EAAnB,+BAA6B,GAAIM,EAAjC,+BAAwC,OAAxC,SACoBL,MAAMH,EAAK,CAC3BI,OAAQ,MACRC,KAAMG,EACNN,YAJJ,cACQI,EADR,gBAMqBA,EAAIG,OANzB,cAMQA,EANR,yBAOSA,GAPT,2C,gHAWA,WAAWT,EAAKE,EAASQ,GAAzB,iBAAAT,EAAA,sEACoBE,MAAMH,EAAK,CAC3BI,OAAQ,OACRC,KAAM,OACNH,UACAS,KAAMD,IALV,cACQJ,EADR,gBAOqBA,EAAIC,OAPzB,cAOQA,EAPR,yBAQSA,GART,2C,wHAYA,WAAeP,EAAKE,EAASQ,GAA7B,mBAAAT,EAAA,sEACoBE,MAAMH,EAAK,CAC3BI,OAAQ,OACRC,KAAM,OACNH,UACAS,KAAMD,IALV,UAOqB,OANbJ,EADR,QAOUM,OAPV,gCAQuBN,EAAIG,OAR3B,cAQUA,EARV,yBASWA,GATX,wBAWqBH,EAAIC,OAXzB,eAWQA,EAXR,yBAYSA,GAZT,4C,uFAeA,SAAeM,GACb,OAAQA,GACN,IAAK,MAAO,MAAO,gBACnB,IAAK,MAAO,MAAO,2BACnB,IAAK,MAAO,MAAO,kBACnB,QAAS,MAAO,Q,cC/ChBC,EAJO,CACTC,WAAY,+CAOD,eAEXC,YAAa,6CACbC,eAAgB,gDAChBC,SAAU,wCACPJ,GCQQK,E,WApBb,aAAe,oBACbC,K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mBC,WACrBA,UAAUC,cAAcC,MAAMtC,MAAK,SAAAuC,GACjCA,EAAaC,kB","file":"static/js/main.ebb74c16.chunk.js","sourcesContent":["class FetchUtil {\r\n // GET, good for re-use!\r\n async get(url, headers = []) {\r\n const req = await fetch(url, {\r\n method: 'GET',\r\n mode: 'cors',\r\n headers,\r\n })\r\n const json = await req.json()\r\n return json\r\n }\r\n\r\n async getFile(url, headers = {}, cors = 'cors') {\r\n const req = await fetch(url, {\r\n method: 'GET',\r\n mode: cors,\r\n headers,\r\n })\r\n const blob = await req.blob()\r\n return blob\r\n }\r\n\r\n // POST, good for re-use!\r\n async post(url, headers, data) {\r\n const req = await fetch(url, {\r\n method: 'POST',\r\n mode: 'cors',\r\n headers,\r\n body: data,\r\n })\r\n const json = await req.json()\r\n return json\r\n }\r\n\r\n // POST, good for re-use!\r\n async postFile(url, headers, data) {\r\n const req = await fetch(url, {\r\n method: 'POST',\r\n mode: 'cors',\r\n headers,\r\n body: data,\r\n })\r\n if (req.status === 200) {\r\n const blob = await req.blob()\r\n return blob\r\n }\r\n const json = await req.json()\r\n return json\r\n }\r\n\r\n getContentType(format) {\r\n switch (format) {\r\n case 'svg': return 'image/svg+xml'\r\n case 'png': return 'application/octet-stream'\r\n case 'pdf': return 'application/pdf'\r\n default: return ''\r\n }\r\n }\r\n}\r\n\r\nexport default FetchUtil\r\n","const dev = {\r\n jacsQueUrl: \"https://jacs-que.azurewebsites.net/JACS-QUE\"\r\n};\r\n\r\nconst prod = {\r\n jacsQueUrl: \"https://jacs-que.azurewebsites.net/JACS-QUE\"\r\n};\r\n\r\nconst properties = process.env.NODE_ENV === 'production'\r\n ? prod\r\n : dev;\r\n\r\nexport default {\r\n // Add common config values here\r\n generateUrl: 'https://mapexports.jibestream.com/generate',\r\n generateIpsUrl: 'https://mapexports.jibestream.com/generateIPS',\r\n clientId: '047cbf8a-513a-4afe-9a8c-2df5effcf30b',\r\n ...properties\r\n};\r\n","import FetchUtil from '../util/FetchUtil'\r\nimport properties from '../config/settings'\r\n\r\n// Controller for any authorization requests\r\nclass AuthController {\r\n constructor() {\r\n this.fetch = new FetchUtil()\r\n }\r\n\r\n // Authorize user and password for environment\r\n async auth(username, password, host) {\r\n const url = `${host}/JACS/api/auth/token`\r\n const headers = { 'Content-Type': 'application/x-www-form-urlencoded' }\r\n const body = {\r\n client_id: properties.clientId,\r\n grant_type: 'password',\r\n username,\r\n password,\r\n }\r\n const encodedBody = Object.keys(body).map(key => `${encodeURIComponent(key)}=${encodeURIComponent(body[key])}`).join('&')\r\n const authReponse = await this.fetch.post(url, headers, encodedBody)\r\n return authReponse\r\n }\r\n}\r\n\r\nexport default AuthController\r\n","import FetchUtil from '../util/FetchUtil'\r\n\r\n// Controller to retrieve customer level entities from JACS\r\nclass CustomerController {\r\n constructor() {\r\n this.fetch = new FetchUtil()\r\n }\r\n\r\n async getByCustomer(customerId, hostUrl, token, entity) {\r\n const url = `${hostUrl}/JACS/api/customer/${customerId}/${entity}`\r\n const headers = { 'Content-Type': 'application/json', Authorization: `Bearer ${token}` }\r\n const reponse = await this.fetch.get(url, headers)\r\n if (Array.isArray(reponse)) {\r\n return reponse\r\n }\r\n return []\r\n }\r\n}\r\n\r\nexport default CustomerController\r\n","import FetchUtil from '../util/FetchUtil'\r\n\r\n// Controller for retrieving floor data\r\nclass FloorController {\r\n constructor() {\r\n this.fetch = new FetchUtil()\r\n }\r\n\r\n // Get the building id for the specified venue\r\n async getBuildingId(venue, hostUrl, token) {\r\n const url = `${hostUrl}/JACS/api/customer/${venue.customerId}/venue/${venue.id}/building`\r\n const headers = { 'Content-Type': 'application/json', Authorization: `Bearer ${token}` }\r\n const response = await this.fetch.get(url, headers)\r\n if (Array.isArray(response) && response.length) {\r\n return response[0].id\r\n }\r\n return null\r\n }\r\n\r\n // Get all floors in a venue, return an empty array if no floors\r\n async getByVenue(venue, hostUrl, token) {\r\n const buildingId = await this.getBuildingId(venue, hostUrl, token)\r\n if (!buildingId) return []\r\n const url = `${hostUrl}/JACS/api/customer/${venue.customerId}/venue/${venue.id}/building/${buildingId}/floor`\r\n const headers = { 'Content-Type': 'application/json', Authorization: `Bearer ${token}` }\r\n const response = await this.fetch.get(url, headers)\r\n if (Array.isArray(response)) {\r\n return response\r\n }\r\n return []\r\n }\r\n}\r\n\r\nexport default FloorController\r\n","import React, { Component } from 'react'\r\nimport TextField from '@material-ui/core/TextField'\r\nimport Button from '@material-ui/core/Button'\r\nimport * as jwtDecode from 'jwt-decode'\r\nimport CircularProgress from '@material-ui/core/CircularProgress'\r\nimport PropTypes from 'prop-types'\r\nimport AuthController from '../controller/AuthController'\r\nimport CustomerController from '../controller/CustomerController'\r\nimport FloorController from '../controller/FloorController'\r\n\r\nimport './css/LoginParams.css'\r\n\r\nclass LoginParams extends Component {\r\n constructor(props) {\r\n super(props)\r\n this.handleChange = this.handleChange.bind(this)\r\n this.authorize = this.authorize.bind(this)\r\n this.authController = new AuthController()\r\n this.customerController = new CustomerController()\r\n this.floorController = new FloorController()\r\n this.state = { username: '', password: '', hostUrl: 'https://api.jibestream.com', errorMessage: '', loginClick: false }\r\n }\r\n\r\n handleChange(event) {\r\n if (event.target.id === 'username') this.setState({ username: event.target.value })\r\n if (event.target.id === 'password') this.setState({ password: event.target.value })\r\n if (event.target.id === 'hostUrl') this.setState({ hostUrl: event.target.value })\r\n }\r\n\r\n // Call the auth controller and authorize based on the user inputted data\r\n async authorize() {\r\n const { username, password, hostUrl } = this.state\r\n this.setState({ errorMessage: '', loginClick: true })\r\n const auth = await this.authController.auth(username, password, hostUrl)\r\n if (auth.access_token) {\r\n const customerId = jwtDecode(auth.access_token).cid\r\n const clients = await this.customerController.getByCustomer(customerId, hostUrl, auth.access_token, 'app')\r\n const templates = await this.customerController.getByCustomer(customerId, hostUrl, auth.access_token, 'map-template')\r\n const venues = await this.customerController.getByCustomer(customerId, hostUrl, auth.access_token, 'venue')\r\n venues.forEach(v => v.key = `${v.id}-${v.name}`)\r\n const initFloors = await this.floorController.getByVenue(venues[0],\r\n hostUrl, auth.access_token)\r\n const sdkClients = clients.filter(c => c.sdkCredentials)\r\n this.props.onLoginClick(auth, hostUrl, sdkClients, venues, initFloors, templates)\r\n } else {\r\n this.setState({ errorMessage: 'Invalid Username or Password', loginClick: false })\r\n }\r\n }\r\n\r\n render() {\r\n const inputProps = { style: { color: 'white' } }\r\n const inputLabelProps = { shrink: true, style: { color: 'white' } }\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 {this.state.loginClick ? : }\r\n
{this.state.errorMessage}
\r\n
\r\n )\r\n }\r\n}\r\n\r\nLoginParams.propTypes = {\r\n onLoginClick: PropTypes.func.isRequired,\r\n}\r\n\r\nexport default LoginParams\r\n","import React, { Component } from 'react'\r\nimport Button from '@material-ui/core/Button'\r\nimport Radio from '@material-ui/core/Radio'\r\nimport RadioGroup from '@material-ui/core/RadioGroup'\r\nimport FormControlLabel from '@material-ui/core/FormControlLabel'\r\nimport FormControl from '@material-ui/core/FormControl'\r\nimport FormLabel from '@material-ui/core/FormLabel'\r\nimport SendIcon from '@material-ui/icons/Send'\r\nimport PropTypes from 'prop-types'\r\n\r\nimport './css/ExportOptions.css'\r\n\r\nclass ExportOptions extends Component {\r\n constructor(props) {\r\n super(props)\r\n this.onExportClick = this.onExportClick.bind(this)\r\n this.onExportSelect = this.onExportSelect.bind(this)\r\n }\r\n\r\n onExportSelect(event) {\r\n this.props.onExportChange(event.target)\r\n }\r\n\r\n onExportClick() {\r\n this.props.onExportClick()\r\n }\r\n\r\n render() {\r\n return (\r\n
\r\n \r\n Export Options\r\n
\r\n
\r\n \r\n } label=\"Map\" className=\"mapLabel\" />\r\n } label=\"IPS\" className=\"ipsLabel\" />\r\n } label=\"IMDF\" className=\"imdfLabel\" />\r\n \r\n \r\n
\r\n
\r\n
\r\n )\r\n }\r\n}\r\n\r\nExportOptions.propTypes = {\r\n onExportChange: PropTypes.func.isRequired,\r\n onExportClick: PropTypes.func.isRequired,\r\n exportClick: PropTypes.bool.isRequired,\r\n}\r\n\r\nexport default ExportOptions\r\n","import React, { Component } from 'react'\r\nimport FormControl from '@material-ui/core/FormControl'\r\nimport FormLabel from '@material-ui/core/FormLabel'\r\nimport Button from '@material-ui/core/Button'\r\nimport Menu from '@material-ui/core/Menu'\r\nimport MenuItem from '@material-ui/core/MenuItem'\r\nimport { saveAs } from 'file-saver'\r\nimport PropTypes from 'prop-types'\r\nimport FetchUtil from '../util/FetchUtil'\r\n\r\nimport './css/Response.css'\r\n\r\nclass Response extends Component {\r\n constructor(props) {\r\n super(props)\r\n this.handleClick = this.handleClick.bind(this)\r\n this.handleClose = this.handleClose.bind(this)\r\n this.handleViewClick = this.handleViewClick.bind(this)\r\n this.handleDownloadClick = this.handleDownloadClick.bind(this)\r\n this.handleImdfDownloadClick = this.handleImdfDownloadClick.bind(this)\r\n this.fetchUtil = new FetchUtil()\r\n this.state = { anchorEl: null, format: '' }\r\n }\r\n\r\n handleClick(event) {\r\n this.setState({ anchorEl: event.currentTarget, format: event.target.innerHTML })\r\n }\r\n\r\n handleClose() {\r\n this.setState({ anchorEl: null, format: '' })\r\n }\r\n\r\n handleViewClick() {\r\n const { format } = this.state\r\n const { url } = this.props.data.response.exports.find(e => e.format === format)\r\n window.open(url)\r\n this.handleClose()\r\n }\r\n\r\n async handleDownloadClick() {\r\n const { format } = this.state\r\n const { url } = this.props.data.response.exports.find(e => e.format === format)\r\n const response = await this.fetchUtil.getFile(url, {})\r\n saveAs(response, `download.${format}`)\r\n this.handleClose()\r\n }\r\n\r\n async handleImdfDownloadClick() {\r\n const response = await this.fetchUtil.getFile( this.props.data.response.fileUrl, {})\r\n saveAs(response, 'imdf.zip')\r\n }\r\n\r\n createExportLinks(response) {\r\n if (!response.exports) {\r\n return null\r\n }\r\n return response.exports.map(e => (\r\n
\r\n \r\n \r\n View\r\n Download\r\n \r\n
\r\n ))\r\n }\r\n\r\n createImdfExportLinks(response) {\r\n if (!response.fileUrl) {\r\n return null\r\n }\r\n\r\n return (
\r\n \r\n
)\r\n }\r\n\r\n showResponseButtons(state) {\r\n if (state === 'map' || state === 'ipslocal') {\r\n return (
\r\n { this.props.data.response.status && this.props.data.response.status !== 200\r\n ? this.createErrorMessage() : this.createExportLinks(this.props.data.response) }\r\n
)\r\n } else if (state === 'imdf') {\r\n return (
\r\n { this.props.data.response.status && this.props.data.response.status === 'ERROR'\r\n ? this.createErrorMessage() : this.createImdfExportLinks(this.props.data.response) }\r\n
)\r\n }\r\n }\r\n\r\n createErrorMessage() {\r\n return (\r\n
\r\n Error on export:\r\n {' '}\r\n {this.props.data.response.message}\r\n
\r\n )\r\n }\r\n\r\n render() {\r\n return (\r\n
\r\n \r\n Export Response\r\n
\r\n {this.showResponseButtons(this.props.data.export)}\r\n
\r\n
\r\n )\r\n }\r\n}\r\n\r\nResponse.propTypes = {\r\n data: PropTypes.object,\r\n}\r\n\r\nexport default Response\r\n","import React, { Component } from 'react'\r\nimport FormControl from '@material-ui/core/FormControl'\r\nimport FormLabel from '@material-ui/core/FormLabel'\r\nimport Select from '@material-ui/core/Select'\r\nimport MenuItem from '@material-ui/core/MenuItem'\r\nimport InputLabel from '@material-ui/core/InputLabel'\r\nimport PropTypes from 'prop-types'\r\n\r\nimport './css/RequiredParams.css'\r\n\r\nfunction venueMenuItems(venues) {\r\n return venues.map(venue => (\r\n {venue.key}\r\n ))\r\n}\r\n\r\nfunction clientMenuItems(clients) {\r\n return clients.map(client => (\r\n {client.clientId}\r\n ))\r\n}\r\n\r\nclass RequiredParams extends Component {\r\n constructor(props) {\r\n super(props)\r\n this.handleChange = this.handleChange.bind(this)\r\n }\r\n\r\n handleChange(event) {\r\n if (event.target.name === 'venueList') {\r\n this.props.onVenueChange(event.target.value)\r\n }\r\n if (event.target.name === 'clientList') {\r\n this.props.onClientChange(event.target.value)\r\n }\r\n }\r\n\r\n render() {\r\n return (\r\n
\r\n \r\n Required Params\r\n
\r\n \r\n Venues\r\n \r\n \r\n \r\n Clients\r\n \r\n \r\n
\r\n
\r\n )\r\n }\r\n}\r\n\r\nRequiredParams.propTypes = {\r\n onVenueChange: PropTypes.func.isRequired,\r\n onClientChange: PropTypes.func.isRequired,\r\n data: PropTypes.object,\r\n}\r\n\r\nexport default RequiredParams\r\n","import React, { Component } from 'react'\r\nimport FormControl from '@material-ui/core/FormControl'\r\nimport FormLabel from '@material-ui/core/FormLabel'\r\nimport Select from '@material-ui/core/Select'\r\nimport MenuItem from '@material-ui/core/MenuItem'\r\nimport InputLabel from '@material-ui/core/InputLabel'\r\nimport PropTypes from 'prop-types'\r\n\r\nimport './css/ImdfParams.css'\r\n\r\nfunction venueMenuItems(venues) {\r\n return venues.map(venue => (\r\n {venue.key}\r\n ))\r\n}\r\n\r\nclass ImdfParams extends Component {\r\n constructor(props) {\r\n super(props)\r\n this.handleChange = this.handleChange.bind(this)\r\n }\r\n\r\n handleChange(event) {\r\n this.props.onVenueChange(event.target.value)\r\n }\r\n\r\n render() {\r\n return (\r\n
\r\n \r\n Required Params\r\n
\r\n \r\n Venues\r\n \r\n \r\n
\r\n
\r\n )\r\n }\r\n}\r\n\r\nImdfParams.propTypes = {\r\n onVenueChange: PropTypes.func.isRequired,\r\n data: PropTypes.object,\r\n}\r\n\r\nexport default ImdfParams\r\n","import React, { Component } from 'react'\r\nimport TextField from '@material-ui/core/TextField'\r\nimport FormControl from '@material-ui/core/FormControl'\r\nimport FormLabel from '@material-ui/core/FormLabel'\r\nimport Select from '@material-ui/core/Select'\r\nimport MenuItem from '@material-ui/core/MenuItem'\r\nimport InputLabel from '@material-ui/core/InputLabel'\r\nimport Checkbox from '@material-ui/core/Checkbox'\r\nimport FormControlLabel from '@material-ui/core/FormControlLabel'\r\nimport PropTypes from 'prop-types'\r\nimport FloorController from '../controller/FloorController'\r\n\r\nimport './css/OptionalParams.css'\r\n\r\nconst inputProps = { style: { color: 'white' } }\r\nconst inputLabelProps = { shrink: true, style: { color: 'white', paddingTop: '20px' } }\r\n\r\nfunction mapMenuItems(floors) {\r\n return floors.map(floor => (\r\n {floor.name}\r\n ))\r\n}\r\n\r\nclass MapOptionalParams extends Component {\r\n constructor(props) {\r\n super(props)\r\n this.handleChange = this.handleChange.bind(this)\r\n this.boundingBoxParams = this.boundingBoxParams.bind(this)\r\n this.focusToWaypointParams = this.focusToWaypointParams.bind(this)\r\n this.floorController = new FloorController()\r\n }\r\n\r\n handleChange(event) {\r\n if (event.target.name === 'mapList') {\r\n this.props.onFloorChange(event)\r\n } else {\r\n this.props.onChange(event)\r\n }\r\n }\r\n\r\n boundingBoxParams() {\r\n return (\r\n
\r\n \r\n \r\n
\r\n )\r\n }\r\n\r\n focusToWaypointParams() {\r\n return (\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n )\r\n }\r\n\r\n render() {\r\n return (\r\n
\r\n \r\n Optional Params\r\n
\r\n \r\n Maps\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 label={Focus To Waypoint}\r\n className=\"focusToWaypoint\"\r\n />\r\n { this.props.data.focusToWaypoint\r\n ? this.focusToWaypointParams() : this.boundingBoxParams() }\r\n
\r\n
\r\n )\r\n }\r\n}\r\n\r\nMapOptionalParams.propTypes = {\r\n onChange: PropTypes.func.isRequired,\r\n onFloorChange: PropTypes.func.isRequired,\r\n data: PropTypes.object,\r\n}\r\n\r\nexport default MapOptionalParams\r\n","import React, { Component } from 'react'\r\nimport TextField from '@material-ui/core/TextField'\r\nimport FormControl from '@material-ui/core/FormControl'\r\nimport FormLabel from '@material-ui/core/FormLabel'\r\nimport PropTypes from 'prop-types'\r\n\r\nimport './css/OptionalParams.css'\r\n\r\n\r\nclass IpsOptionalParams extends Component {\r\n constructor(props) {\r\n super(props)\r\n this.handleChange = this.handleChange.bind(this)\r\n }\r\n\r\n handleChange(event) {\r\n this.props.onChange(event)\r\n }\r\n\r\n render() {\r\n const inputProps = { style: { color: 'white' } }\r\n const inputLabelProps = { shrink: true, style: { color: 'white', paddingTop: '20px' } }\r\n return (\r\n
\r\n \r\n Optional Params\r\n
\r\n \r\n
\r\n
\r\n )\r\n }\r\n}\r\n\r\nIpsOptionalParams.propTypes = {\r\n onChange: PropTypes.func.isRequired,\r\n // eslint-disable-next-line react/no-unused-prop-types\r\n data: PropTypes.objectOf(PropTypes.object).isRequired,\r\n}\r\n\r\nexport default IpsOptionalParams\r\n","import React, { Component } from 'react'\r\nimport PropTypes from 'prop-types'\r\nimport FormControl from '@material-ui/core/FormControl'\r\n\r\nimport './css/OptionalParams.css'\r\n\r\nclass EmptyOptionalParams extends Component {\r\n render() {\r\n return (\r\n
\r\n \r\n \r\n
\r\n )\r\n }\r\n}\r\n\r\nEmptyOptionalParams.propTypes = {\r\n data: PropTypes.object,\r\n}\r\n\r\nexport default EmptyOptionalParams\r\n","import proj4 from 'proj4'\r\nimport Canvg, {\r\n presets,\r\n} from 'canvg'\r\nimport FetchUtil from '../util/FetchUtil'\r\n\r\nclass LocalIPSController {\r\n constructor() {\r\n this.fetch = new FetchUtil()\r\n }\r\n\r\n measure(lat1, lon1, lat2, lon2) { // generally used geo measurement function\r\n const { PI, cos, sin, sqrt, atan2 } = Math // math fns\r\n const R = 6371 // Radius of earth in KM\r\n // PI is equivilant to 180 degrees, so divide PI by 180\r\n // and you get how many radians constitute a single degree\r\n const radsInSingleDegree = (PI / 180)\r\n // Get the amount of radians between the two coordinates\r\n const [dLat, dLon] = [\r\n (lat2 * radsInSingleDegree) - (lat1 * radsInSingleDegree),\r\n (lon2 * radsInSingleDegree) - (lon1 * radsInSingleDegree),\r\n ]\r\n const a = sin(dLat / 2) * sin(dLat / 2) + cos(lat1 * radsInSingleDegree)\r\n * cos(lat2 * radsInSingleDegree) * sin(dLon / 2) * sin(dLon / 2)\r\n const c = 2 * atan2(sqrt(a), sqrt(1 - a))\r\n const km = (R * c) // kilometers\r\n return km * 1000 // meters\r\n }\r\n\r\n exportIPSData(coordinates, mapSize = 1920) {\r\n const topLat = coordinates.topLeft[0] // North\r\n const topLng = coordinates.topLeft[1] // West\r\n const bottomLat = coordinates.bottomRight[0] // South\r\n const bottomLng = coordinates.bottomRight[1] // East\r\n const distance = this.measure(topLat, topLng, bottomLat, bottomLng)\r\n return {\r\n topLeft: {\r\n latlng: [topLat, topLng],\r\n 'espg:4326': [topLng, topLat], // curved\r\n 'espg:3857': proj4('EPSG:4326', 'EPSG:3857', [topLng, topLat]), // flat (needs conversion)\r\n },\r\n bottomRight: {\r\n latlng: [bottomLat, bottomLng],\r\n 'espg:4326': [bottomLng, bottomLat],\r\n 'espg:3857': proj4('EPSG:4326', 'EPSG:3857', [bottomLng, bottomLat]),\r\n },\r\n mmPerPX: distance / Math.hypot(mapSize, mapSize) * 1000,\r\n pxPerMeter: Math.hypot(mapSize, mapSize) / distance,\r\n }\r\n }\r\n\r\n getAllVenueData(data, venue, client) {\r\n // eslint-disable-next-line no-async-promise-executor\r\n return new Promise(async (resolve, reject) => {\r\n try {\r\n const { host } = data\r\n const { clientId } = client\r\n const clientSec = client.clientSecret\r\n\r\n const authResponse = await this.auth(clientId, clientSec, host)\r\n\r\n const vfcResponse = await this.getVenueFullCall(host, authResponse.access_token,\r\n venue.customerId, venue.id)\r\n\r\n let mapTemplateResponse = null\r\n\r\n if (vfcResponse.defaultMapTemplateId && vfcResponse.defaultMapTemplateId !== null) {\r\n mapTemplateResponse = await this.getMapTemplateById(host, authResponse.access_token, \r\n vfcResponse.customerId, vfcResponse.defaultMapTemplateId)\r\n }\r\n\r\n const bfcResponse = await this.getBuildingFullCall(host, authResponse.access_token,\r\n venue.customerId, venue.id, vfcResponse.buildings.items[0].id)\r\n\r\n resolve({\r\n vfc: vfcResponse,\r\n bfc: bfcResponse,\r\n mt: mapTemplateResponse,\r\n })\r\n } catch (e) {\r\n reject(e)\r\n }\r\n })\r\n }\r\n\r\n // eslint-disable-next-line class-methods-use-this\r\n async rasterizeMap(svg, docwidth, docheight, scale = 1) {\r\n const width = docwidth * scale\r\n const height = docheight * scale\r\n const canvas = new OffscreenCanvas(width, height)\r\n const ctx = canvas.getContext('2d')\r\n const v = await Canvg.fromString(ctx, svg, presets.offscreen())\r\n\r\n /**\r\n * Resize SVG to fit in given size.\r\n * @param width\r\n * @param height\r\n * @param preserveAspectRatio\r\n */\r\n v.resize(width, height, 'xMidYMid meet')\r\n\r\n // Render only first frame, ignoring animations and mouse.\r\n await v.render()\r\n\r\n const blob = await canvas.convertToBlob()\r\n return blob\r\n }\r\n\r\n async getMapTemplateById(host, token, customerId, mapTemplateId) {\r\n const url = `${host}/JACS/api/customer/${customerId}/map-template/${mapTemplateId}/full`\r\n const headers = { 'Content-Type': 'application/json', Authorization: `Bearer ${token}` }\r\n const mapTemplateResponse = await this.fetch.get(url, headers)\r\n return mapTemplateResponse\r\n }\r\n\r\n async getVenueFullCall(host, token, customerId, venueId) {\r\n const url = `${host}/JACS/api/customer/${customerId}/venue/${venueId}/full`\r\n const headers = { 'Content-Type': 'application/json', Authorization: `Bearer ${token}` }\r\n const vfcResponse = await this.fetch.get(url, headers)\r\n return vfcResponse\r\n }\r\n\r\n async getBuildingFullCall(host, token, customerId, venueId, buildingId) {\r\n const url = `${host}/JACS/api/customer/${customerId}/venue/${venueId}/building/${buildingId}/full`\r\n const headers = { 'Content-Type': 'application/json', Authorization: `Bearer ${token}` }\r\n const bfcResponse = await this.fetch.get(url, headers)\r\n return bfcResponse\r\n }\r\n\r\n async auth(clientId, clientSecret, host) {\r\n const url = `${host}/JACS/api/auth/token`\r\n const headers = { 'Content-Type': 'application/x-www-form-urlencoded' }\r\n const body = {\r\n client_id: clientId,\r\n grant_type: 'client_credentials',\r\n client_secret: clientSecret,\r\n }\r\n const encodedBody = Object.keys(body).map(key => `${encodeURIComponent(key)}=${encodeURIComponent(body[key])}`).join('&')\r\n const authReponse = await this.fetch.post(url, headers, encodedBody)\r\n return authReponse\r\n }\r\n\r\n async exportSupportFile(venue, mapNames, building, scale = 1, mapSize = 1920) {\r\n const templateBlob = await this.fetch.getFile('templates/note-template.txt')\r\n let templateText = await templateBlob.text()\r\n const pngSize = Math.round(scale * mapSize)\r\n templateText = templateText.replace('{venue_name}', venue.name)\r\n .replace('{venue_id}', venue.id)\r\n .replace('{venue_address}', building.address)\r\n .replace('{json_file_name}', `${venue.name}-IPS.json`)\r\n .replace('{svg_dimension}', `${mapSize}px X ${mapSize}px`)\r\n .replace('{png_dimension}', `${pngSize}px X ${pngSize}px`)\r\n .replace('{png_scale}', scale)\r\n .replace('{png_names}', mapNames.map(md => `${md}__${venue.name}-master-HighRes-PNG.png`).join(', '))\r\n return templateText\r\n }\r\n}\r\n\r\nexport default LocalIPSController\r\n","import FetchUtil from '../util/FetchUtil'\r\nimport properties from '../config/settings'\r\n\r\n// Controller for queue requests\r\nclass JacsQueController {\r\n constructor() {\r\n this.fetch = new FetchUtil()\r\n }\r\n\r\n async pushImdfExportRequest(token, venueId, host) {\r\n const url = `${properties.jacsQueUrl}/imdf/export`\r\n const headers = { 'Content-Type': 'application/json' }\r\n const body = {\r\n token: `Bearer ${token}`,\r\n venueId: venueId,\r\n host: host,\r\n }\r\n const response = await this.fetch.post(url, headers, JSON.stringify(body))\r\n return response\r\n }\r\n\r\n async getImdfFile(uuid) {\r\n const url = `${properties.jacsQueUrl}/imdf/export/${uuid}`\r\n const headers = { 'Content-Type': 'application/json' }\r\n const response = await this.fetch.get(url, headers)\r\n return response\r\n }\r\n}\r\n\r\nexport default JacsQueController\r\n","import JSZip from 'jszip'\r\nimport FetchUtil from '../util/FetchUtil'\r\nimport properties from '../config/settings'\r\nimport LocalIPSController from './LocalIPSController'\r\nimport JacsQueController from \"./JacsQueController\";\r\n\r\nfunction setIfNotNull(body, field, value) {\r\n if (value) {\r\n body[field] = value\r\n }\r\n}\r\n\r\nasync function getGeneratedImdfFile(controller, uuid) {\r\n let isAwaiting = false\r\n return await new Promise(resolve => {\r\n const interval = setInterval(async () => {\r\n if(!isAwaiting) {\r\n isAwaiting = true\r\n let generatedImdfFile = await controller.getImdfFile(uuid)\r\n isAwaiting = false\r\n if (generatedImdfFile.fileUrl || generatedImdfFile.status === 'ERROR') {\r\n resolve(generatedImdfFile);\r\n clearInterval(interval);\r\n }\r\n }\r\n }, 5000);\r\n });\r\n}\r\n// Controller for communicating with the Map Export Service\r\nclass GenerateController {\r\n constructor() {\r\n this.fetch = new FetchUtil()\r\n this.localIPSController = new LocalIPSController()\r\n this.jacsQueueController = new JacsQueController()\r\n }\r\n\r\n // Export map as SVG/PNG/PDF\r\n async export(data) {\r\n const headers = { 'Content-Type': 'application/x-www-form-urlencoded' }\r\n const venue = data.required.venues.find(v => v.key === data.selectedVenue)\r\n const client = data.required.clients.find(c => c.clientId === data.selectedClient)\r\n const floor = data.optional.floors.find(f => f.name === data.selectedFloor)\r\n const body = {\r\n customer_id: venue.customerId,\r\n venue_id: venue.id,\r\n client_id: client.clientId,\r\n client_secret: client.clientSecret,\r\n host_name: data.host,\r\n map_id: floor.mapId,\r\n building_id: floor.buildingId,\r\n focus_waypoint: data.focusToWaypoint,\r\n export_formats: 'svg,png,pdf',\r\n }\r\n setIfNotNull(body, 'font_family', data.fontFamily)\r\n setIfNotNull(body, 'font_size', data.fontSize)\r\n setIfNotNull(body, 'font_fill', data.fontFill)\r\n setIfNotNull(body, 'font_stroke', data.fontStroke)\r\n setIfNotNull(body, 'font_stroke_width', data.fontStrokeWidth)\r\n setIfNotNull(body, 'bbox_width', data.bboxWidth)\r\n setIfNotNull(body, 'bbox_height', data.bboxHeight)\r\n setIfNotNull(body, 'width', data.width)\r\n setIfNotNull(body, 'height', data.height)\r\n setIfNotNull(body, 'bbox_x', data.bboxX)\r\n setIfNotNull(body, 'bbox_y', data.bboxY)\r\n if (data.focusToWaypoint) {\r\n setIfNotNull(body, 'waypoint_id', data.waypointId)\r\n setIfNotNull(body, 'unit_padding', data.unitPadding)\r\n setIfNotNull(body, 'min_width', data.minWidth)\r\n setIfNotNull(body, 'min_height', data.minHeight)\r\n }\r\n const encodedBody = Object.keys(body).map(key => `${encodeURIComponent(key)}=${encodeURIComponent(body[key])}`).join('&')\r\n const response = await this.fetch.post(properties.generateUrl, headers, encodedBody)\r\n return response\r\n }\r\n\r\n async localGenerateIPS(data, updateMessage) {\r\n const venue = data.required.venues.find(v => v.key === data.selectedVenue)\r\n const client = data.required.clients.find(c => c.clientId === data.selectedClient)\r\n let { scale } = data\r\n\r\n if(scale == null) scale = 1;\r\n\r\n updateMessage('Loading Venue Data')\r\n\r\n const venueData = await this.localIPSController.getAllVenueData(data, venue, client)\r\n const zip = new JSZip()\r\n const venueName = venueData.vfc.name\r\n updateMessage(`Processing Venue Data - ${venueName}`)\r\n\r\n zip.file(`${venueName}-IPS.json`, JSON.stringify(this.localIPSController.exportIPSData(venueData.vfc.coordinates)))\r\n\r\n const mapNameArray = []\r\n let mapSize = 1920\r\n\r\n for (let i = 0; i < venueData.bfc.floors.items.length; i++) {\r\n const floor = venueData.bfc.floors.items[i]\r\n const mapName = floor.shortName && !mapNameArray.includes(floor.shortName) ? floor.shortName : `${floor.shortName}-${floor.level}`\r\n\r\n const { svg } = venueData.bfc.floors.items[i].map\r\n\r\n updateMessage(`Processing Map - ${venueName} - ${mapName} (${i + 1} of ${venueData.bfc.floors.items.length})`)\r\n\r\n const parser = new DOMParser()\r\n const doc = parser.parseFromString(svg, 'image/svg+xml')\r\n\r\n const cssRawRuleList = []\r\n\r\n for (let k = 0; k < doc.getElementsByTagName('style').length; k++) {\r\n cssRawRuleList.push(Array.prototype.slice.call(doc.getElementsByTagName('style'), 0)[k].sheet.cssRules)\r\n }\r\n\r\n const cssCombinedRuleList = []\r\n\r\n for (let m = 0; m < cssRawRuleList.length; m++) {\r\n for (let n = 0; n < cssRawRuleList[m].length; n++) {\r\n cssCombinedRuleList.push(cssRawRuleList[m][n])\r\n }\r\n }\r\n\r\n const cssRuleList = cssCombinedRuleList.filter((element, index) => {\r\n return cssCombinedRuleList.indexOf(element) === index\r\n })\r\n\r\n let customStyleString = ''\r\n let customStylingSVGXml = ''\r\n\r\n if (venueData.mt !== null) {\r\n const mapStyleList = venueData.mt.mapStyle\r\n for (let j = 0; j < cssRuleList.length; j++) {\r\n mapStyleList\r\n .filter(cssObject => cssRuleList[j].selectorText.toLowerCase() === '.'.concat(cssObject.layerName.toLowerCase()))\r\n .map(layerObject => {\r\n setIfNotNull(cssRuleList[j].style, 'fill', layerObject.fill)\r\n setIfNotNull(cssRuleList[j].style, 'opacity', layerObject.opacity)\r\n setIfNotNull(cssRuleList[j].style, 'stroke', layerObject.stroke)\r\n setIfNotNull(cssRuleList[j].style, 'strokeWidth', layerObject.strokeWidth)\r\n setIfNotNull(cssRuleList[j].style, 'strokeOpacity', layerObject.strokeOpacity)\r\n return cssRuleList[j]\r\n })\r\n customStyleString += cssRuleList[j].cssText.concat('\\n')\r\n }\r\n customStylingSVGXml = svg.split('', svg.split('')[1])\r\n }\r\n\r\n mapSize = doc.documentElement.viewBox.baseVal.width\r\n\r\n if ((mapSize * scale) > 16000) {\r\n throw new Error('Map Size + Scale exceed 16000px')\r\n }\r\n\r\n const svgToRasterize = venueData.mt !== null ? customStylingSVGXml : svg\r\n\r\n // eslint-disable-next-line no-await-in-loop\r\n const blob = await this.localIPSController.rasterizeMap(svgToRasterize,\r\n doc.documentElement.viewBox.baseVal.width,\r\n doc.documentElement.viewBox.baseVal.height, scale)\r\n zip.file(`${mapName}__${venueName}-master-HighRes-PNG.png`, blob)\r\n const svgBlob = new Blob([svgToRasterize], { type: 'image/svg+xml' })\r\n zip.file(`${mapName}__${venueName}-master-SVG.svg`, svgBlob)\r\n\r\n mapNameArray.push(mapName)\r\n }\r\n\r\n zip.file(`${venueName}-IPS-General-Notes.txt`,\r\n await this.localIPSController.exportSupportFile(venueData.vfc, mapNameArray,\r\n venueData.bfc, scale, mapSize))\r\n\r\n updateMessage('Downloading Zip')\r\n\r\n zip.generateAsync({ type: 'blob' }).then(blob => {\r\n window.saveAs(blob, `${venueName}.zip`)\r\n })\r\n }\r\n\r\n // Export Ips package for a venue\r\n async exportIps(data) {\r\n const headers = { 'Content-Type': 'application/x-www-form-urlencoded' }\r\n const venue = data.required.venues.find(v => v.key === data.selectedVenue)\r\n const client = data.required.clients.find(c => c.clientId === data.selectedClient)\r\n const { scale, selectedTemplate } = data\r\n const mapStyle = selectedTemplate === 'Default' ? null : JSON.stringify(data.optional.templates.find(t => t.name === selectedTemplate).mapStyle)\r\n const body = {\r\n customer_id: venue.customerId,\r\n venue_id: venue.id,\r\n client_id: client.clientId,\r\n client_secret: client.clientSecret,\r\n host_name: data.host,\r\n scale,\r\n map_style: mapStyle,\r\n }\r\n const encodedBody = Object.keys(body).map(key => `${encodeURIComponent(key)}=${encodeURIComponent(body[key])}`).join('&')\r\n const response = await this.fetch.postFile(properties.generateIpsUrl, headers, encodedBody)\r\n return response\r\n }\r\n\r\n // Export map in IMDF format\r\n async exportImdf(data) {\r\n const venueId = data.required.venues.find(v => v.key === data.selectedVenue)\r\n const host = data.host\r\n const token = data.auth.access_token\r\n\r\n const exportResponse = await this.jacsQueueController.pushImdfExportRequest(token, venueId.id, host)\r\n const generatedImdfFile = await getGeneratedImdfFile(this.jacsQueueController, exportResponse.uuid)\r\n return generatedImdfFile\r\n }\r\n\r\n}\r\n\r\nexport default GenerateController\r\n","import React, { Component } from 'react'\r\nimport CircularProgress from '@material-ui/core/CircularProgress'\r\nimport PropTypes from 'prop-types'\r\nimport ExportOptions from './ExportOptions'\r\nimport Response from './Response'\r\nimport RequiredParams from './RequiredParams'\r\nimport ImdfParams from './ImdfParams'\r\nimport MapOptionalParams from './MapOptionalParams'\r\nimport IpsOptionalParams from './IpsOptionalParams'\r\nimport EmptyOptionalParams from './EmptyOptionalParams'\r\nimport FloorController from '../controller/FloorController'\r\nimport GenerateController from '../controller'\r\n\r\nimport './css/ExportParent.css'\r\n\r\nclass ExportParent extends Component {\r\n constructor(props) {\r\n super(props)\r\n this.handleExportChange = this.handleExportChange.bind(this)\r\n this.handleVenueChange = this.handleVenueChange.bind(this)\r\n this.handleClientChange = this.handleClientChange.bind(this)\r\n this.handleOptionalParamChange = this.handleOptionalParamChange.bind(this)\r\n this.handleExportChange = this.handleExportChange.bind(this)\r\n this.handleFloorChange = this.handleFloorChange.bind(this)\r\n this.handleIpsParamChange = this.handleIpsParamChange.bind(this)\r\n this.generateExport = this.generateExport.bind(this)\r\n this.floorController = new FloorController()\r\n this.generateController = new GenerateController()\r\n this.templatesWithDefault = [{ id: 0, name: 'Default' }].concat(this.props.templates)\r\n this.state = {\r\n auth: this.props.auth,\r\n host: this.props.host,\r\n required: { venues: this.props.venues, clients: this.props.clients },\r\n optional: { floors: this.props.floors, templates: this.templatesWithDefault },\r\n selectedVenue: this.props.venues[0].key,\r\n selectedFloor: this.props.floors[0] ? this.props.floors[0].name : '',\r\n selectedTemplate: 'Default',\r\n selectedClient: this.props.clients[0].clientId,\r\n fontFamily: '',\r\n fontSize: '',\r\n fontFill: '',\r\n fontStroke: '',\r\n fontStrokeWidth: '',\r\n width: null,\r\n height: null,\r\n bboxWidth: null,\r\n bboxHeight: null,\r\n bboxX: null,\r\n bboxY: null,\r\n focusToWaypoint: false,\r\n waypointId: null,\r\n unitPadding: null,\r\n minWidth: null,\r\n minHeight: null,\r\n scale: 1,\r\n venueFloorMap: [{ venue: this.props.venues[0].key, floors: this.props.floors }],\r\n export: 'map',\r\n response: {},\r\n exportClick: false,\r\n exportMessage: '',\r\n }\r\n }\r\n\r\n handleExportChange(target) {\r\n this.setState({ export: target.value, response: {} })\r\n }\r\n\r\n handleFloorChange(event) {\r\n if (event.target.name === 'mapList') {\r\n this.setState({ selectedFloor: event.target.value })\r\n }\r\n }\r\n\r\n handleOptionalParamChange(event) {\r\n switch (event.target.id) {\r\n case 'fontFamily':\r\n this.setState({ fontFamily: event.target.value })\r\n break\r\n case 'fontSize':\r\n this.setState({ fontSize: event.target.value })\r\n break\r\n case 'fontFill':\r\n this.setState({ fontFill: event.target.value })\r\n break\r\n case 'fontStroke':\r\n this.setState({ fontStroke: event.target.value })\r\n break\r\n case 'fontStrokeWidth':\r\n this.setState({ fontStrokeWidth: event.target.value })\r\n break\r\n case 'width':\r\n this.setState({ width: event.target.value })\r\n break\r\n case 'height':\r\n this.setState({ height: event.target.value })\r\n break\r\n case 'bboxWidth':\r\n this.setState({ bboxWidth: event.target.value })\r\n break\r\n case 'bboxHeight':\r\n this.setState({ bboxHeight: event.target.value })\r\n break\r\n case 'bboxX':\r\n this.setState({ bboxX: event.target.value })\r\n break\r\n case 'bboxY':\r\n this.setState({ bboxY: event.target.value })\r\n break\r\n case 'focusToWaypoint':\r\n this.setState({ focusToWaypoint: event.target.checked })\r\n this.setState({ bboxX: '' })\r\n this.setState({ bboxY: '' })\r\n this.setState({ waypointId: '' })\r\n this.setState({ unitPadding: '' })\r\n break\r\n case 'waypointId':\r\n this.setState({ waypointId: event.target.value })\r\n break\r\n case 'unitPadding':\r\n this.setState({ unitPadding: event.target.value })\r\n break\r\n case 'minWidth':\r\n this.setState({ minWidth: event.target.value })\r\n break\r\n case 'minHeight':\r\n this.setState({ minHeight: event.target.value })\r\n break\r\n default:\r\n }\r\n }\r\n\r\n handleClientChange(clientId) {\r\n this.setState({ selectedClient: clientId })\r\n }\r\n\r\n handleIpsParamChange(event) {\r\n const key = event.target.id ? event.target.id : event.target.name\r\n switch (key) {\r\n case 'scale':\r\n this.setState({ scale: event.target.value })\r\n break\r\n case 'templateList':\r\n this.setState({ selectedTemplate: event.target.value })\r\n break\r\n default:\r\n }\r\n }\r\n\r\n async handleVenueChange(venueKey) {\r\n this.setState({ selectedVenue: venueKey })\r\n const alreadyLoaded = this.state.venueFloorMap.find(i => i.venue === venueKey)\r\n if (alreadyLoaded) {\r\n const name = alreadyLoaded.floors[0] ? alreadyLoaded.floors[0].name : ''\r\n this.setState({ optional: { floors: alreadyLoaded.floors, templates: this.templatesWithDefault },\r\n selectedFloor: name })\r\n } else {\r\n const venue = this.state.required.venues.find(v => v.key === venueKey)\r\n const floors = await this.floorController.getByVenue(venue,\r\n this.state.host, this.state.auth.access_token)\r\n const name = floors[0] ? floors[0].name : ''\r\n this.setState({ optional: { floors, templates: this.templatesWithDefault },\r\n selectedFloor: name })\r\n this.state.venueFloorMap.push({ venue: venue.key, floors })\r\n }\r\n }\r\n\r\n async generateExport() {\r\n if (!this.state.selectedFloor) {\r\n this.setState({ response: { status: 400, message: 'Cannot export from venue without floors.' } })\r\n } else {\r\n this.setState({ exportClick: true, response: {} })\r\n if (this.state.export === 'map') {\r\n const response = await this.generateController.export(this.state)\r\n this.setState({ exportClick: false, response })\r\n } else if (this.state.export === 'ipslocal') {\r\n try {\r\n await this.generateController.localGenerateIPS(this.state,\r\n this.showUpdateMessage.bind(this))\r\n this.setState({ exportClick: false, exportMessage: '' })\r\n } catch (e) {\r\n this.setState({ exportClick: false, exportMessage:`Error - ${e.message}` })\r\n }\r\n } else if (this.state.export === 'imdf') {\r\n try {\r\n const response = await this.generateController.exportImdf(this.state)\r\n this.setState({ exportClick: false, response })\r\n } catch (e) {\r\n this.setState({ exportClick: false, exportMessage:`Error - ${e.message}` })\r\n }\r\n }\r\n }\r\n }\r\n\r\n showUpdateMessage(message) {\r\n this.setState({ exportMessage: message })\r\n }\r\n\r\n showRequiredParams(state) {\r\n if (state === 'map') {\r\n return ()\r\n } else if (state === 'ipslocal') {\r\n return ()\r\n } else if (state === 'imdf') {\r\n return ()\r\n }\r\n }\r\n\r\n showMainPage(state) {\r\n if (state === 'map') {\r\n return ()\r\n } else if (state === 'ipslocal') {\r\n return ()\r\n } else if (state === 'imdf') {\r\n return ()\r\n }\r\n }\r\n\r\n render() {\r\n\r\n\r\n return (\r\n
\r\n
\r\n \r\n
\r\n
\r\n {this.showRequiredParams(this.state.export)}\r\n {this.showMainPage(this.state.export)}\r\n
\r\n
\r\n \r\n
\r\n
\r\n {this.state.exportClick ? :
}\r\n

{this.state.exportMessage}

\r\n
\r\n
\r\n )\r\n }\r\n}\r\n\r\nExportParent.propTypes = {\r\n auth: PropTypes.object,\r\n host: PropTypes.string,\r\n venues: PropTypes.array,\r\n clients: PropTypes.array,\r\n floors: PropTypes.array,\r\n templates: PropTypes.array,\r\n}\r\n\r\nexport default ExportParent\r\n","import React, { Component } from 'react'\r\nimport Button from '@material-ui/core/Button'\r\nimport LoginParams from './view/LoginParams'\r\nimport ExportParent from './view/ExportParent'\r\n\r\nimport './App.css'\r\n\r\nclass App extends Component {\r\n constructor(props) {\r\n super(props)\r\n this.login = this.login.bind(this)\r\n this.handleLogout = this.handleLogout.bind(this)\r\n this.state = { loggedIn: false, venues: {}, clients: {}, floors: [], auth: {}, host: '', templates: [] }\r\n }\r\n\r\n login(auth, host, clients, venues, floors, templates) {\r\n this.setState({ loggedIn: true, venues, clients, floors, templates, auth, host })\r\n }\r\n\r\n handleLogout() {\r\n this.setState({ loggedIn: false })\r\n }\r\n\r\n render() {\r\n return (\r\n
\r\n
\r\n

Map Export Tool

\r\n {this.state.loggedIn && }\r\n
\r\n {this.state.loggedIn ? (\r\n \r\n )\r\n : }\r\n
\r\n )\r\n }\r\n}\r\n\r\nexport default App\r\n","// This optional code is used to register a service worker.\r\n// register() is not called by default.\r\n\r\n// This lets the app load faster on subsequent visits in production, and gives\r\n// it offline capabilities. However, it also means that developers (and users)\r\n// will only see deployed updates on subsequent visits to a page, after all the\r\n// existing tabs open on the page have been closed, since previously cached\r\n// resources are updated in the background.\r\n\r\n// To learn more about the benefits of this model and instructions on how to\r\n// opt-in, read https://bit.ly/CRA-PWA\r\n\r\nconst isLocalhost = Boolean(\r\n window.location.hostname === 'localhost'\r\n // [::1] is the IPv6 localhost address.\r\n || window.location.hostname === '[::1]'\r\n // 127.0.0.1/8 is considered localhost for IPv4.\r\n || window.location.hostname.match(\r\n /^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/,\r\n ),\r\n)\r\n\r\nexport function register(config) {\r\n if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\r\n // The URL constructor is available in all browsers that support SW.\r\n const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href)\r\n if (publicUrl.origin !== window.location.origin) {\r\n // Our service worker won't work if PUBLIC_URL is on a different origin\r\n // from what our page is served on. This might happen if a CDN is used to\r\n // serve assets; see https://github.com/facebook/create-react-app/issues/2374\r\n return\r\n }\r\n\r\n window.addEventListener('load', () => {\r\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`\r\n\r\n if (isLocalhost) {\r\n // This is running on localhost. Let's check if a service worker still exists or not.\r\n checkValidServiceWorker(swUrl, config)\r\n\r\n // Add some additional logging to localhost, pointing developers to the\r\n // service worker/PWA documentation.\r\n navigator.serviceWorker.ready.then(() => {\r\n console.log(\r\n 'This web app is being served cache-first by a service '\r\n + 'worker. To learn more, visit https://bit.ly/CRA-PWA',\r\n )\r\n })\r\n } else {\r\n // Is not localhost. Just register service worker\r\n registerValidSW(swUrl, config)\r\n }\r\n })\r\n }\r\n}\r\n\r\nfunction registerValidSW(swUrl, config) {\r\n navigator.serviceWorker\r\n .register(swUrl)\r\n .then(registration => {\r\n registration.onupdatefound = () => {\r\n const installingWorker = registration.installing\r\n if (installingWorker == null) {\r\n return\r\n }\r\n installingWorker.onstatechange = () => {\r\n if (installingWorker.state === 'installed') {\r\n if (navigator.serviceWorker.controller) {\r\n // At this point, the updated precached content has been fetched,\r\n // but the previous service worker will still serve the older\r\n // content until all client tabs are closed.\r\n console.log(\r\n 'New content is available and will be used when all '\r\n + 'tabs for this page are closed. See https://bit.ly/CRA-PWA.',\r\n )\r\n\r\n // Execute callback\r\n if (config && config.onUpdate) {\r\n config.onUpdate(registration)\r\n }\r\n } else {\r\n // At this point, everything has been precached.\r\n // It's the perfect time to display a\r\n // \"Content is cached for offline use.\" message.\r\n console.log('Content is cached for offline use.')\r\n\r\n // Execute callback\r\n if (config && config.onSuccess) {\r\n config.onSuccess(registration)\r\n }\r\n }\r\n }\r\n }\r\n }\r\n })\r\n .catch(error => {\r\n console.error('Error during service worker registration:', error)\r\n })\r\n}\r\n\r\nfunction checkValidServiceWorker(swUrl, config) {\r\n // Check if the service worker can be found. If it can't reload the page.\r\n fetch(swUrl)\r\n .then(response => {\r\n // Ensure service worker exists, and that we really are getting a JS file.\r\n const contentType = response.headers.get('content-type')\r\n if (\r\n response.status === 404\r\n || (contentType != null && contentType.indexOf('javascript') === -1)\r\n ) {\r\n // No service worker found. Probably a different app. Reload the page.\r\n navigator.serviceWorker.ready.then(registration => {\r\n registration.unregister().then(() => {\r\n window.location.reload()\r\n })\r\n })\r\n } else {\r\n // Service worker found. Proceed as normal.\r\n registerValidSW(swUrl, config)\r\n }\r\n })\r\n .catch(() => {\r\n console.log(\r\n 'No internet connection found. App is running in offline mode.',\r\n )\r\n })\r\n}\r\n\r\nexport function unregister() {\r\n if ('serviceWorker' in navigator) {\r\n navigator.serviceWorker.ready.then(registration => {\r\n registration.unregister()\r\n })\r\n }\r\n}\r\n","import React from 'react'\r\nimport ReactDOM from 'react-dom'\r\nimport './index.css'\r\nimport App from './App'\r\nimport * as serviceWorker from './serviceWorker'\r\n\r\nReactDOM.render(, document.getElementById('root'))\r\n\r\n// If you want your app to work offline and load faster, you can change\r\n// unregister() to register() below. Note this comes with some pitfalls.\r\n// Learn more about service workers: https://bit.ly/CRA-PWA\r\nserviceWorker.unregister()\r\n"],"sourceRoot":""}