{"version":3,"sources":["components/Geocoder/Styles.js","components/Geocoder/Geocode.js","components/Geocoder/Geocoder.js","utils/map.js","utils/request.js","components/EsriMap.js","components/LocationDetails/AttributeList.js","App.js","serviceWorker.js","index.js"],"names":["css","className","emoCSS","Item","styled","position","cursor","display","border","height","textAlign","borderTop","lineHeight","color","fontSize","textTransform","fontWeight","boxShadow","padding","whiteSpace","wordWrap","isActive","isSelected","styles","push","background","Input","width","outline","minHeight","borderRadius","transition","borderColor","isOpen","borderBottomLeftRadius","borderBottomRightRadius","BaseMenu","marginBottom","marginTop","backgroundColor","maxHeight","overflowY","overflowX","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderStyle","Menu","React","forwardRef","props","ref","ControllerButton","right","top","flexDirection","justifyContent","alignItems","ArrowIcon","viewBox","preserveAspectRatio","fill","stroke","strokeWidth","transform","d","XIcon","initialState","data","undefined","loading","error","reducer","state","action","type","payload","Geocode","address","children","useReducer","dispatch","useEffect","debounce","a","suggest","endpoint","params","maxSuggestions","outSR","location","x","y","spatialReference","wkid","latestWkid","res","suggestions","message","console","fetchData","Search","updateXY","itemToString","item","text","onStateChange","selectedItem","magicKey","geocode","maxLocations","outFields","then","candidates","attributes","getInputProps","getItemProps","highlightedIndex","inputValue","clearSelection","getToggleButtonProps","getMenuProps","margin","placeholder","onClick","aria-label","zIndex","allItems","filter","disabled","length","matchSorter","keys","map","index","key","_Graphic","status","response","Promise","resolve","reject","Error","statusText","handleResponse","handleAs","json","getRequestBody","isFormData","this","objectToFormData","obj","body","URLSearchParams","prop","hasOwnProperty","append","has","toString","objectToUrlSearchParams","makeRequest","url","headers","Headers","getHeaders","options","method","hideCredentials","credentials","fetch","bind","catch","getConfig","resp","element","config","NProgress","start","loadModules","WebMap","MapView","Graphic","LayerList","Expand","portalItem","id","webMapId","view","container","when","expand","content","document","createElement","ui","add","on","evt","stopPropagation","done","mapDiv","EsriMap","center","viewdivRef","useRef","useState","setView","loadMap","current","ready","graphics","removeAll","pointGraphic","geometry","symbol","style","size","addMany","goTo","zoom","duration","addPoint","Card","fluid","AttributeList","RespondingDistrict","RespondingPost","NeighborhoodsName","isEmpty","Message","Table","striped","Body","Row","Cell","Header","as","href","toLowerCase","target","rel","App","mapCenter","setMapCenter","setAttributes","title","setConfig","fetchConfig","onXYupdate","borderBottom","src","alt","paddingLeft","Container","Grid","stackable","Column","mobile","tablet","computer","widescreen","Boolean","window","hostname","match","ReactDOM","render","StrictMode","getElementById","navigator","serviceWorker","registration","unregister"],"mappings":"mSAIMA,EAAM,iBAAc,CAAEC,UAAWC,IAAM,WAAN,eAEjCC,EAAOC,YAAO,KAAPA,CACX,CACEC,SAAU,WACVC,OAAQ,UACRC,QAAS,QACTC,OAAQ,OACRC,OAAQ,OACRC,UAAW,OACXC,UAAW,OACXC,WAAY,MACZC,MAAO,kBACPC,SAAU,OACVC,cAAe,OACfC,WAAY,MACZC,UAAW,OACXC,QAAS,eACTC,WAAY,SACZC,SAAU,WAEZ,YAA+B,IAA5BC,EAA2B,EAA3BA,SAAUC,EAAiB,EAAjBA,WACLC,EAAS,GAaf,OAZIF,GACFE,EAAOC,KAAK,CACVX,MAAO,kBACPY,WAAY,oBAGZH,GACFC,EAAOC,KAAK,CACVX,MAAO,kBACPG,WAAY,QAGTO,KAILG,EAAQtB,YAAO,QAAPA,CAAA,aAEVuB,MAAO,OACPb,SAAU,GACVM,SAAU,aACVR,WAAY,MACZgB,QAAS,EACTT,WAAY,SACZU,UAAW,MACXJ,WAAY,OACZlB,QAAS,eACTW,QAAS,kBACTL,MAAO,kBACPI,UAAW,OACXT,OAAQ,+BACRsB,aAAc,SACdC,WAAY,sCAjBI,mBAkBD,CACbC,YAAa,UACbf,UAAW,oCAGf,qBAAGgB,OACK,aAEAC,uBAAwB,IACxBC,wBAAyB,KA3Bf,mBA4BK,CACblB,UAAW,SAGf,QAUFmB,GAPQhC,YAAO,QAAPA,CAAgB,CAC5BU,SAAU,GACVE,WAAY,OACZT,QAAS,QACT8B,aAAc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AAC,EAAD,CAASqK,OAAQwC,EAAW5I,SAAUkJ,UChEhCa,QACW,cAA7BC,OAAO5K,SAAS6K,UAEe,UAA7BD,OAAO5K,SAAS6K,UAEhBD,OAAO5K,SAAS6K,SAASC,MACvB,2DCXNC,IAASC,OACP,kBAAC,IAAMC,WAAP,KACE,kBAAC,EAAD,OAEF3E,SAAS4E,eAAe,SDwHpB,kBAAmBC,WACrBA,UAAUC,cAAc7D,MACrBjG,MAAK,SAAA+J,GACJA,EAAaC,gBAEdrG,OAAM,SAAApG,GACL4B,QAAQ5B,MAAMA,EAAM2B,c","file":"static/js/main.2371c841.chunk.js","sourcesContent":["import React from 'react';\r\nimport { css as emoCSS } from 'emotion';\r\nimport styled from '@emotion/styled';\r\n\r\nconst css = (...args) => ({ className: emoCSS(...args) });\r\n\r\nconst Item = styled('li')(\r\n {\r\n position: 'relative',\r\n cursor: 'pointer',\r\n display: 'block',\r\n border: 'none',\r\n height: 'auto',\r\n textAlign: 'left',\r\n borderTop: 'none',\r\n lineHeight: '1em',\r\n color: 'rgba(0,0,0,.87)',\r\n fontSize: '1rem',\r\n textTransform: 'none',\r\n fontWeight: '400',\r\n boxShadow: 'none',\r\n padding: '.8rem 1.1rem',\r\n whiteSpace: 'normal',\r\n wordWrap: 'normal',\r\n },\r\n ({ isActive, isSelected }) => {\r\n const styles = [];\r\n if (isActive) {\r\n styles.push({\r\n color: 'rgba(0,0,0,.95)',\r\n background: 'rgba(0,0,0,.03)',\r\n });\r\n }\r\n if (isSelected) {\r\n styles.push({\r\n color: 'rgba(0,0,0,.95)',\r\n fontWeight: '700',\r\n });\r\n }\r\n return styles;\r\n },\r\n);\r\nconst onAttention = '&:hover, &:focus';\r\nconst Input = styled('input')(\r\n {\r\n width: '100%', // full width - icon width/2 - border\r\n fontSize: 14,\r\n wordWrap: 'break-word',\r\n lineHeight: '1em',\r\n outline: 0,\r\n whiteSpace: 'normal',\r\n minHeight: '2em',\r\n background: '#fff',\r\n display: 'inline-block',\r\n padding: '1em 2em 1em 1em',\r\n color: 'rgba(0,0,0,.87)',\r\n boxShadow: 'none',\r\n border: '1px solid rgba(34,36,38,.15)',\r\n borderRadius: '.30rem',\r\n transition: 'box-shadow .1s ease,width .1s ease',\r\n [onAttention]: {\r\n borderColor: '#96c8da',\r\n boxShadow: '0 2px 3px 0 rgba(34,36,38,.15)',\r\n },\r\n },\r\n ({ isOpen }) =>\r\n isOpen\r\n ? {\r\n borderBottomLeftRadius: '0',\r\n borderBottomRightRadius: '0',\r\n [onAttention]: {\r\n boxShadow: 'none',\r\n },\r\n }\r\n : null,\r\n);\r\n\r\nconst Label = styled('label')({\r\n fontSize: 16,\r\n fontWeight: 'bold',\r\n display: 'block',\r\n marginBottom: 10,\r\n});\r\n\r\nconst BaseMenu = styled('ul')(\r\n {\r\n padding: 0,\r\n marginTop: 0,\r\n position: 'absolute',\r\n backgroundColor: 'white',\r\n width: '100%',\r\n maxHeight: '20rem',\r\n overflowY: 'auto',\r\n overflowX: 'hidden',\r\n outline: '0',\r\n transition: 'opacity .1s ease',\r\n borderRadius: '0 0 .28571429rem .28571429rem',\r\n boxShadow: '0 2px 3px 0 rgba(34,36,38,.15)',\r\n borderColor: '#96c8da',\r\n borderTopWidth: '0',\r\n borderRightWidth: 1,\r\n borderBottomWidth: 1,\r\n borderLeftWidth: 1,\r\n borderStyle: 'solid',\r\n },\r\n ({ isOpen }) => ({\r\n border: isOpen ? null : 'none',\r\n }),\r\n);\r\n\r\nconst Menu = React.forwardRef((props, ref) => (\r\n \r\n));\r\n\r\nconst ControllerButton = styled('button')({\r\n backgroundColor: 'transparent',\r\n border: 'none',\r\n position: 'absolute',\r\n right: 0,\r\n top: 0,\r\n cursor: 'pointer',\r\n width: 47,\r\n display: 'flex',\r\n flexDirection: 'column',\r\n height: '100%',\r\n justifyContent: 'center',\r\n alignItems: 'center',\r\n});\r\n\r\nfunction ArrowIcon({ isOpen }) {\r\n return (\r\n \r\n \r\n \r\n );\r\n}\r\n\r\nfunction XIcon() {\r\n return (\r\n \r\n \r\n \r\n \r\n );\r\n}\r\n\r\nexport { Menu, ControllerButton, Input, Item, ArrowIcon, XIcon, Label, css };\r\n","import { suggest } from \"@esri/arcgis-rest-geocoder\";\r\nimport debounce from \"lodash.debounce\";\r\nimport { useEffect, useReducer } from \"react\";\r\n\r\nconst initialState = {\r\n data: undefined,\r\n loading: true,\r\n error: \"\",\r\n};\r\n\r\nconst reducer = (state, action) => {\r\n switch (action.type) {\r\n case \"FETCH_SUCCESS\":\r\n return {\r\n data: action.payload,\r\n loading: false,\r\n error: \"\",\r\n };\r\n\r\n case \"FETCH_ERROR\":\r\n return {\r\n data: undefined,\r\n loading: false,\r\n error: action.payload,\r\n };\r\n\r\n default:\r\n return state;\r\n }\r\n};\r\n\r\nfunction Geocode({ address, children }) {\r\n const [state, dispatch] = useReducer(reducer, initialState);\r\n\r\n useEffect(() => {\r\n const fetchData = debounce(async () => {\r\n try {\r\n const res = await suggest(address, {\r\n endpoint:\r\n \"https://arcgisportal.baltimorepolice.org/gis/rest/services/BPD_Cloud_Locator/GeocodeServer\",\r\n params: {\r\n maxSuggestions: 5,\r\n outSR: 4326,\r\n location: {\r\n x: -8521378.876202783,\r\n y: 4762668.342192003,\r\n spatialReference: { wkid: 102100, latestWkid: 3857 },\r\n },\r\n },\r\n });\r\n dispatch({ type: \"FETCH_SUCCESS\", payload: res.suggestions });\r\n } catch (e) {\r\n dispatch({ type: \"FETCH_ERROR\", payload: e.message });\r\n console.error(e);\r\n }\r\n });\r\n fetchData();\r\n }, [address]);\r\n\r\n const { data, loading, error } = state;\r\n\r\n return children({\r\n data,\r\n loading,\r\n error,\r\n });\r\n}\r\n\r\nexport default Geocode;\r\n","import React from \"react\";\r\nimport Downshift from \"downshift\";\r\nimport { geocode } from \"@esri/arcgis-rest-geocoder\";\r\nimport matchSorter from \"match-sorter\";\r\nimport {\r\n Menu,\r\n ControllerButton,\r\n Input,\r\n Item,\r\n ArrowIcon,\r\n XIcon,\r\n css,\r\n} from \"./Styles\";\r\nimport Geocode from \"./Geocode\";\r\n\r\nexport default function Search({ updateXY }) {\r\n const handleStateChange = ({ selectedItem }) => {\r\n if (selectedItem) {\r\n const { magicKey } = selectedItem;\r\n geocode({\r\n magicKey,\r\n maxLocations: 1,\r\n outFields: [\"*\"],\r\n outSR: 4326,\r\n endpoint:\r\n \"https://arcgisportal.baltimorepolice.org/gis/rest/services/BPD_Cloud_Locator/GeocodeServer\",\r\n }).then((res) => {\r\n const location = res.candidates[0].location;\r\n const attributes = res.candidates[0].attributes;\r\n updateXY(location, attributes);\r\n });\r\n } else {\r\n updateXY(null);\r\n }\r\n };\r\n const getItems = (allItems, filter) => {\r\n return filter\r\n ? matchSorter(allItems, filter, {\r\n keys: [\"text\"],\r\n })\r\n : allItems;\r\n };\r\n\r\n return (\r\n (item ? item.text : \"\")}\r\n onStateChange={handleStateChange}\r\n >\r\n {({\r\n selectedItem,\r\n getInputProps,\r\n getItemProps,\r\n highlightedIndex,\r\n isOpen,\r\n inputValue,\r\n clearSelection,\r\n getToggleButtonProps,\r\n getMenuProps,\r\n }) => (\r\n
\r\n
\r\n \r\n {selectedItem ? (\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 if (!isOpen) {\r\n return null;\r\n }\r\n\r\n if (!inputValue) {\r\n return You have to enter a search query;\r\n }\r\n\r\n return (\r\n \r\n {({ loading, error, data = [] }) => {\r\n if (loading) {\r\n return Loading...;\r\n }\r\n\r\n if (error) {\r\n return Error! {error};\r\n }\r\n\r\n if (!data.length) {\r\n return No Addresses found;\r\n }\r\n\r\n return getItems(data, inputValue).map((item, index) => (\r\n \r\n {item.text}\r\n \r\n ));\r\n }}\r\n \r\n );\r\n })()}\r\n \r\n
\r\n
\r\n )}\r\n \r\n );\r\n}\r\n","import { loadModules } from \"esri-loader\";\r\nimport NProgress from \"nprogress\";\r\nimport { getConfig } from \"./request\";\r\n\r\n// NOTE: module, not global scope\r\nlet _Graphic;\r\n\r\n// lazy load the ArcGIS API modules and CSS\r\n// then create a new map view at an element\r\nexport async function loadMap(element) {\r\n const config = await getConfig();\r\n NProgress.start();\r\n const [WebMap, MapView, Graphic, LayerList, Expand] = await loadModules(\r\n [\r\n \"esri/WebMap\",\r\n \"esri/views/MapView\",\r\n \"esri/Graphic\",\r\n \"esri/widgets/LayerList\",\r\n \"esri/widgets/Expand\",\r\n ],\r\n {\r\n css: true,\r\n }\r\n );\r\n if (!element) {\r\n // component or app was likely destroyed\r\n return;\r\n }\r\n // hold onto the graphic class for later use\r\n _Graphic = Graphic;\r\n\r\n // create the Map\r\n const map = new WebMap({\r\n portalItem: {\r\n id: config.webMapId,\r\n },\r\n });\r\n\r\n // show the map at the element\r\n let view = new MapView({\r\n map,\r\n container: element,\r\n });\r\n // wait for the view to load\r\n return view.when(() => {\r\n const expand = new Expand({\r\n view: view,\r\n content: new LayerList({\r\n view: view,\r\n container: document.createElement(\"div\"),\r\n }),\r\n });\r\n\r\n view.ui.add(expand, \"top-right\");\r\n\r\n // //run updateXY on map click\r\n // view.on('click', (e) => {\r\n // const location = { x: e.mapPoint.longitude, y: e.mapPoint.latitude };\r\n // updateXY(location);\r\n // });\r\n view.on(\"mouse-wheel\", function (evt) {\r\n evt.stopPropagation();\r\n });\r\n\r\n NProgress.done();\r\n // return a reference to the view\r\n return view;\r\n });\r\n}\r\n\r\nexport function addPoint(view, center) {\r\n if (!_Graphic) {\r\n throw new Error(\"You must load a map before creating new graphics\");\r\n }\r\n if (!view || !view.ready) {\r\n return;\r\n }\r\n // clear any existing graphics (if any)\r\n view.graphics.removeAll();\r\n const { x, y } = center;\r\n const marker = {\r\n type: \"simple-marker\",\r\n style: \"circle\",\r\n size: 12,\r\n color: [22, 30, 46],\r\n outline: {\r\n color: [244, 244, 244],\r\n width: 1,\r\n },\r\n };\r\n const pointGraphic = new _Graphic({\r\n geometry: {\r\n type: \"point\",\r\n x,\r\n y,\r\n },\r\n symbol: marker,\r\n });\r\n view.graphics.addMany([pointGraphic]);\r\n view.goTo({ center: [x, y], zoom: 15 }, { duration: 1000 });\r\n}\r\n","function status(response) {\r\n if (response.status >= 200 && response.status < 300) {\r\n return Promise.resolve(response);\r\n } else {\r\n return Promise.reject(new Error(response.statusText));\r\n }\r\n}\r\n\r\nfunction handleResponse(handleAs, response) {\r\n switch (handleAs) {\r\n case 'text':\r\n return response.text();\r\n default:\r\n return response.json();\r\n }\r\n}\r\n\r\nfunction objectToUrlSearchParams(obj) {\r\n const body = new URLSearchParams();\r\n for (var prop in obj) {\r\n if (obj.hasOwnProperty(prop)) {\r\n body.append(prop, obj[prop]);\r\n }\r\n }\r\n\r\n // add f=json if not included\r\n if (!body.has('f')) {\r\n body.append('f', 'json');\r\n }\r\n\r\n return body.toString();\r\n}\r\n\r\nfunction getHeaders(isFormData) {\r\n const headers = {};\r\n\r\n if (!isFormData) {\r\n headers['content-type'] = 'application/x-www-form-urlencoded';\r\n }\r\n\r\n return new Headers(headers);\r\n}\r\n\r\nfunction getRequestBody(data, isFormData) {\r\n // if formdata, make formdata\r\n if (isFormData) {\r\n return this.objectToFormData(data);\r\n }\r\n\r\n // Not formdata, make url param\r\n return objectToUrlSearchParams(data);\r\n}\r\n\r\n/**\r\n * Make a request using fetch()\r\n * @param { Object } params Object containing key/value parameters to pass to fetch()\r\n * @return { Promise} Promise returned by fetch()\r\n */\r\nexport function makeRequest(params) {\r\n return new Promise((resolve, reject) => {\r\n let url = params.url;\r\n const data = params.data || {};\r\n const headers = getHeaders(params.isFormData);\r\n const options = {\r\n method: params.method || 'get',\r\n headers,\r\n };\r\n\r\n if (!params.hideCredentials) {\r\n options.credentials = 'include';\r\n }\r\n\r\n let body = getRequestBody(data, params.isFormData);\r\n\r\n if (options.method === 'get') {\r\n url = `${url}?${body}`;\r\n } else {\r\n options.body = body;\r\n }\r\n\r\n fetch(url, options)\r\n .then(status)\r\n .then(handleResponse.bind(null, params.handleAs))\r\n .then(function (data) {\r\n // Handle successful requests that are actually errors...\r\n if (data.error) {\r\n reject(data.error);\r\n return;\r\n }\r\n resolve(data);\r\n })\r\n .catch(function (error) {\r\n reject(error);\r\n });\r\n });\r\n}\r\n\r\nexport function getConfig() {\r\n return new Promise((resolve, reject) => {\r\n makeRequest({\r\n url: `/locdesc/config.json`,\r\n method: 'get',\r\n }).then((resp) => resolve(resp));\r\n });\r\n}\r\n","import React, { useState, useEffect, useRef } from 'react';\r\nimport { Card } from 'semantic-ui-react';\r\nimport { loadMap, addPoint } from '../utils/map';\r\n\r\nconst styles = {\r\n mapDiv: {\r\n height: '500px',\r\n width: '100',\r\n position: 'relative',\r\n outline: 'none',\r\n },\r\n};\r\nfunction EsriMap({ center, updateXY }) {\r\n const viewdivRef = useRef();\r\n const [view, setView] = useState(null);\r\n useEffect(() => {\r\n loadMap(viewdivRef.current, updateXY).then((view) => {\r\n setView(view);\r\n });\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, []);\r\n useEffect(() => {\r\n if (view && center) {\r\n addPoint(view, center);\r\n }\r\n }, [view, center]);\r\n return (\r\n \r\n
\r\n \r\n );\r\n}\r\n\r\nexport default EsriMap;\r\n","import React from \"react\";\r\nimport { isEmpty } from \"lodash\";\r\nimport { Table, Header, Message } from \"semantic-ui-react\";\r\n\r\nfunction AttributeList(attributes) {\r\n const { RespondingDistrict, RespondingPost, NeighborhoodsName } =\r\n attributes.attributes;\r\n return !isEmpty(attributes.attributes) ? (\r\n \r\n \r\n \r\n \r\n
District
\r\n
\r\n \r\n \r\n {RespondingDistrict}\r\n \r\n \r\n
\r\n \r\n \r\n
Post
\r\n
\r\n {RespondingPost}\r\n
\r\n \r\n \r\n
Neighborhood
\r\n
\r\n {NeighborhoodsName}\r\n
\r\n
\r\n
\r\n ) : (\r\n Please search for Baltimore City address above.\r\n );\r\n}\r\n\r\nexport default AttributeList;\r\n","import React, { useState, useEffect } from \"react\";\r\nimport Geocoder from \"./components/Geocoder/Geocoder\";\r\nimport EsriMap from \"./components/EsriMap\";\r\nimport AttributeList from \"./components/LocationDetails/AttributeList\";\r\nimport { Container, Message, Grid } from \"semantic-ui-react\";\r\nimport { getConfig } from \"./utils/request\";\r\nimport { isEmpty } from \"lodash\";\r\n\r\nfunction App() {\r\n const [mapCenter, setMapCenter] = useState(null);\r\n const [attributes, setAttributes] = useState(null);\r\n const [config, setConfig] = useState({ title: \"Find My District\" });\r\n useEffect(() => {\r\n const fetchConfig = async () => {\r\n const config = await getConfig();\r\n document.title = config.title;\r\n setConfig(config);\r\n };\r\n fetchConfig();\r\n }, []);\r\n const onXYupdate = (location, attributes) => {\r\n if (location) {\r\n const { x, y } = location;\r\n setMapCenter({ x, y });\r\n setAttributes(attributes);\r\n } else {\r\n setMapCenter(null);\r\n setAttributes(null);\r\n }\r\n };\r\n\r\n return (\r\n
\r\n \r\n \"logo\"\r\n

{config?.title}

\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n {mapCenter && !isEmpty(attributes) ? (\r\n \r\n ) : (\r\n \r\n Please search for Baltimore City address above.\r\n \r\n )}\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n );\r\n}\r\n\r\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.0/8 are 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 headers: { 'Service-Worker': 'script' },\r\n })\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\r\n .then(registration => {\r\n registration.unregister();\r\n })\r\n .catch(error => {\r\n console.error(error.message);\r\n });\r\n }\r\n}\r\n","import React from 'react';\r\nimport ReactDOM from 'react-dom';\r\nimport 'semantic-ui-css/semantic.min.css';\r\nimport 'nprogress/nprogress.css';\r\nimport App from './App';\r\nimport * as serviceWorker from './serviceWorker';\r\n\r\nReactDOM.render(\r\n \r\n \r\n ,\r\n document.getElementById('root'),\r\n);\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":""}