{"version":3,"sources":["assets/images/freight-people-logo-c.png","assets/images/freight-people-logo-white2x.png","assets/images/freight-people-home-bg.jpg","assets/images/freight-people-home-bg-blurred.jpg","components/Home/index.js","components/Home/Home.jsx","components/AzureMap.jsx","components/Track/TrackingEvent/TrackingEvent.jsx","components/Track/TrackingEvent/index.js","components/Track/ConsignmentInformation.jsx","components/Track/ConsignmentNotFound.jsx","components/Track/Header.jsx","components/Track/Loading.jsx","components/Track/ContactInfo.jsx","components/Track/Track.jsx","components/Track/index.js","components/LazyBackground/LazyBackground.jsx","components/LazyBackground/index.jsx","App.js","registerServiceWorker.js","index.js"],"names":["module","exports","Home","props","state","trackingId","redirect","handleChange","bind","handleSubmit","event","this","setState","target","value","preventDefault","shouldRedirect","url","to","push","className","src","require","id","alt","name","data-name","onSubmit","type","maxLength","placeholder","required","onChange","data-wait","React","Component","AzureMap","pickupAddress","deliveryAddress","map","AzureMaps","center","zoom","language","authOptions","authType","subscriptionKey","events","add","datasource","DataSource","sources","layers","LineLayer","strokeColor","strokeWidth","lineJoin","lineCap","SymbolLayer","iconOptions","image","allowOverlap","textOptions","textField","offset","filter","subscriptionKeyCredential","AzureMapsRest","pipeline","newPipeline","retryOptions","maxTries","startAddress","endAddress","searchURL","location","queryPickupAddress","line1","line2","line3","locality","postcode","pickupOptions","countrySet","country","is02","searchAddress","timeout","then","response","results","length","result","Feature","Point","position","lon","lat","title","icon","routeURL","coordinates","geometry","calculateRouteDirections","directions","data","geojson","getFeatures","setCamera","bounds","BoundingBox","fromData","padding","duration","queryDeliveryAddress","deliveryOptions","style","textAlign","height","faCircleNotch","size","color","spin","verticalAlign","marginTop","TrackingEvent","eventData","console","log","milestone","time","dateObj","Date","split","h","getHours","m","getMinutes","timeStr","day","getDate","month","getMonth","year","getFullYear","dateStr","getDateString","eventTime","ConsignmentInformation","consignment","specialInstructions","estimatedDelivery","startsWith","nullDatePrefix","getFriendlyDay","customerReference","ConsignmentNotFound","message","href","Header","delivered","description","freightPeopleLogo","maxWidth","Loading","ContactInfo","subject","connoteNumber","mailto","dayOfWeek","monthOfYear","dateString","date","getDay","Track","useParams","useState","notFound","setNotFound","undefined","setConsignment","error","setError","useEffect","window","origin","toString","fetch","status","json","responseJson","parsed","JSON","parse","Array","isArray","catch","overflow","find","LazyBackground","bgposition","bgrepeat","bgsize","newSrc","setSrc","img","Image","onload","transition","backgroundImage","backgroundPosition","backgroundRepeat","backgroundSize","App","exact","path","component","displayName","isLocalhost","Boolean","hostname","match","registerValidSW","swUrl","navigator","serviceWorker","register","registration","onupdatefound","installingWorker","installing","onstatechange","controller","baseUrl","document","getElementsByTagName","getAttribute","rootElement","getElementById","ReactDOM","render","basename","URL","process","addEventListener","headers","get","indexOf","ready","unregister","reload","checkValidServiceWorker","registerServiceWorker"],"mappings":"kHAAAA,EAAOC,QAAU,IAA0B,mD,mBCA3CD,EAAOC,QAAU,IAA0B,yD,2ICA3CD,EAAOC,QAAU,IAA0B,oD,mBCA3CD,EAAOC,QAAU,IAA0B,4D,2ICC5BC,G,wDCIX,WAAYC,GAAQ,IAAD,8BACf,cAAMA,IACDC,MAAQ,CAAEC,WAAY,GAAIC,UAAU,GACzC,EAAKC,aAAe,EAAKA,aAAaC,KAAlB,gBACpB,EAAKC,aAAe,EAAKA,aAAaD,KAAlB,gBAJL,E,yDAONE,GACTC,KAAKC,SAAS,CAAEP,WAAYK,EAAMG,OAAOC,U,mCAGhCJ,GACTA,EAAMK,iBACNJ,KAAKC,UAAS,SAACR,GACX,OAAO,2BAAKA,GAAZ,IAAmBE,UAAU,S,uCAKjC,OAAOK,KAAKP,MAAME,UAAsC,KAA1BK,KAAKP,MAAMC,a,+BAIzC,GAAIM,KAAKK,iBAAkB,CACvB,IAAMC,EAAG,iBAAaN,KAAKP,MAAMC,YACjC,OAAO,kBAAC,IAAD,CAAUa,GAAID,EAAKE,MAAI,IAGlC,OACI,yBAAKC,UAAU,oFACX,yBAAKA,UAAU,6BACX,yBAAKA,UAAU,qCACX,yBACIC,IAAK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MC,EAAmBF,EAAaG,WACtCD,EAAiBE,cAAgB,WACA,cAA3BF,EAAiBjO,QACf4N,UAAUC,cAAcO,WAK1BzG,QAAQC,IAAI,6CAKZD,QAAQC,IAAI,4CAMrBoE,OAAM,SAAAf,GACLtD,QAAQsD,MAAM,4CAA6CA,MChEjE,IAAMoD,EAAUC,SAASC,qBAAqB,QAAQ,GAAGC,aAAa,QAChEC,EAAcH,SAASI,eAAe,QAE5CC,IAASC,OACP,kBAAC,IAAD,CAAeC,SAAUR,GACvB,kBAAC,EAAD,OAEFI,GDOa,WACb,GAA6C,kBAAmBb,UAAW,CAGzE,GADkB,IAAIkB,IAAIC,GAAwB3D,OAAO7G,UAC3C8G,SAAWD,OAAO7G,SAAS8G,OAIvC,OAGFD,OAAO4D,iBAAiB,QAAQ,WAC9B,IAAMrB,EAAK,UAAMoB,GAAN,sBAEPzB,EAwCV,SAAkCK,GAEhCpC,MAAMoC,GACHvI,MAAK,SAAAC,GAGkB,MAApBA,EAASmG,SACuD,IAAhEnG,EAAS4J,QAAQC,IAAI,gBAAgBC,QAAQ,cAG7CvB,UAAUC,cAAcuB,MAAMhK,MAAK,SAAA2I,GACjCA,EAAasB,aAAajK,MAAK,WAC7BgG,OAAO7G,SAAS+K,eAKpB5B,EAAgBC,MAGnB3B,OAAM,WACLrE,QAAQC,IACN,oEA5DA2H,CAAwB5B,GAGxBD,EAAgBC,OCxBxB6B,K","file":"static/js/main.94f67919.chunk.js","sourcesContent":["module.exports = __webpack_public_path__ + \"static/media/freight-people-logo-c.f8da7b44.png\";","module.exports = __webpack_public_path__ + \"static/media/freight-people-logo-white2x.e9b71261.png\";","module.exports = __webpack_public_path__ + \"static/media/freight-people-home-bg.7f99d702.jpg\";","module.exports = __webpack_public_path__ + \"static/media/freight-people-home-bg-blurred.be2c685c.jpg\";","import Home from './Home';\r\nexport default Home;","import React from \"react\";\r\nimport { Redirect } from \"react-router\";\r\nimport \"./Home.scss\";\r\n\r\nclass Home extends React.Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = { trackingId: \"\", redirect: false };\r\n this.handleChange = this.handleChange.bind(this);\r\n this.handleSubmit = this.handleSubmit.bind(this);\r\n }\r\n\r\n handleChange(event) {\r\n this.setState({ trackingId: event.target.value });\r\n }\r\n\r\n handleSubmit(event) {\r\n event.preventDefault();\r\n this.setState((state) => {\r\n return { ...state, redirect: true };\r\n });\r\n }\r\n\r\n shouldRedirect() {\r\n return this.state.redirect && this.state.trackingId !== \"\";\r\n }\r\n\r\n render() {\r\n if (this.shouldRedirect()) {\r\n const url = `/track/${this.state.trackingId}`;\r\n return ;\r\n }\r\n\r\n return (\r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n

Enter a tracking number

\r\n \r\n
\r\n \r\n \r\n Submit\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n );\r\n }\r\n}\r\n\r\nexport default Home;\r\n","import * as React from \"react\";\r\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\r\nimport { faCircleNotch } from \"@fortawesome/free-solid-svg-icons\";\r\nimport * as AzureMaps from \"azure-maps-control\";\r\nimport * as AzureMapsRest from \"azure-maps-rest\";\r\n\r\nclass AzureMap extends React.Component {\r\n componentDidMount() {\r\n const pickupAddress = this.props.pickupAddress;\r\n const deliveryAddress = this.props.deliveryAddress;\r\n\r\n const map = new AzureMaps.Map(\"map\", {\r\n center: [131.033833, -25.352833],\r\n zoom: 2,\r\n language: \"en-US\",\r\n authOptions: {\r\n authType: \"subscriptionKey\",\r\n subscriptionKey: \"olHPTgU93mZ4FpM8cZOwTVH3Fix05U8GNyaOI6gAWZ0\",\r\n },\r\n });\r\n\r\n map.events.add(\"ready\", function () {\r\n //Create a data source and add it to the map.\r\n var datasource = new AzureMaps.source.DataSource();\r\n\r\n map.sources.add(datasource);\r\n\r\n //Add a layer for rendering the route lines and have it render under the map labels.\r\n map.layers.add(\r\n new AzureMaps.layer.LineLayer(datasource, null, {\r\n strokeColor: \"#2272B9\",\r\n strokeWidth: 5,\r\n lineJoin: \"round\",\r\n lineCap: \"round\",\r\n }),\r\n \"labels\"\r\n );\r\n\r\n //Add a layer for rendering point data.\r\n map.layers.add(\r\n new AzureMaps.layer.SymbolLayer(datasource, null, {\r\n iconOptions: {\r\n image: [\"get\", \"icon\"],\r\n allowOverlap: true,\r\n },\r\n textOptions: {\r\n textField: [\"get\", \"title\"],\r\n offset: [0, 1.2],\r\n },\r\n filter: [\"any\", [\"==\", [\"geometry-type\"], \"Point\"], [\"==\", [\"geometry-type\"], \"MultiPoint\"]], //Only render Point or MultiPoints in this layer.\r\n })\r\n );\r\n\r\n // Use SubscriptionKeyCredential with a subscription key\r\n var subscriptionKeyCredential = new AzureMapsRest.SubscriptionKeyCredential(\r\n \"olHPTgU93mZ4FpM8cZOwTVH3Fix05U8GNyaOI6gAWZ0\"\r\n );\r\n\r\n var pipeline = AzureMapsRest.MapsURL.newPipeline(subscriptionKeyCredential, {\r\n retryOptions: { maxTries: 4 }, // Retry options\r\n });\r\n\r\n var startAddress = null;\r\n var endAddress = null;\r\n\r\n // Create an instance of the SearchURL client.\r\n var searchURL = new AzureMapsRest.SearchURL(pipeline);\r\n\r\n if (pickupAddress && pickupAddress.location) {\r\n var queryPickupAddress = pickupAddress.line1;\r\n if (pickupAddress.line2 && pickupAddress.line2 !== \"\") {\r\n queryPickupAddress += `, ${pickupAddress.line2}`;\r\n }\r\n\r\n if (pickupAddress.line3 && pickupAddress.line3 !== \"\") {\r\n queryPickupAddress += `, ${pickupAddress.line3}`;\r\n }\r\n\r\n queryPickupAddress += `, ${pickupAddress.location.locality}`;\r\n queryPickupAddress += ` ${pickupAddress.location.state}`;\r\n queryPickupAddress += ` ${pickupAddress.location.postcode}`;\r\n\r\n var pickupOptions = { countrySet: [pickupAddress.location.country.is02] };\r\n\r\n searchURL\r\n .searchAddress(AzureMapsRest.Aborter.timeout(10000), queryPickupAddress, pickupOptions)\r\n .then((response) => {\r\n if (response.results.length === 0) {\r\n return;\r\n }\r\n\r\n var result = response.results[0];\r\n\r\n startAddress = new AzureMaps.data.Feature(\r\n new AzureMaps.data.Point([result.position.lon, result.position.lat]),\r\n {\r\n title: \"Pickup\",\r\n icon: \"pin-round-blue\",\r\n }\r\n );\r\n\r\n if (endAddress) {\r\n datasource.add([startAddress, endAddress]);\r\n\r\n // Construct the RouteURL object\r\n var routeURL = new AzureMapsRest.RouteURL(pipeline);\r\n\r\n //Start and end point input to the routeURL\r\n var coordinates = [\r\n [startAddress.geometry.coordinates[0], startAddress.geometry.coordinates[1]],\r\n [endAddress.geometry.coordinates[0], endAddress.geometry.coordinates[1]],\r\n ];\r\n\r\n //Make a search route request\r\n routeURL\r\n .calculateRouteDirections(AzureMapsRest.Aborter.timeout(10000), coordinates)\r\n .then((directions) => {\r\n //Get data features from response\r\n var data = directions.geojson.getFeatures();\r\n\r\n datasource.add(data);\r\n });\r\n\r\n map.setCamera({\r\n bounds: AzureMaps.data.BoundingBox.fromData([startAddress, endAddress]),\r\n padding: 80,\r\n duration: 1000,\r\n type: \"fly\",\r\n });\r\n }\r\n });\r\n }\r\n\r\n if (deliveryAddress && deliveryAddress.location) {\r\n var queryDeliveryAddress = deliveryAddress.line1;\r\n if (deliveryAddress.line2 && deliveryAddress.line2 !== \"\") {\r\n queryDeliveryAddress += `, ${deliveryAddress.line2}`;\r\n }\r\n\r\n if (deliveryAddress.line3 && deliveryAddress.line3 !== \"\") {\r\n queryDeliveryAddress += `, ${deliveryAddress.line3}`;\r\n }\r\n\r\n queryDeliveryAddress += `, ${deliveryAddress.location.locality}`;\r\n queryDeliveryAddress += ` ${deliveryAddress.location.state}`;\r\n queryDeliveryAddress += ` ${deliveryAddress.location.postcode}`;\r\n\r\n var deliveryOptions = { countrySet: [deliveryAddress.location.country.is02] };\r\n\r\n searchURL\r\n .searchAddress(AzureMapsRest.Aborter.timeout(10000), queryDeliveryAddress, deliveryOptions)\r\n .then((response) => {\r\n if (response.results.length === 0) {\r\n return;\r\n }\r\n\r\n var result = response.results[0];\r\n\r\n endAddress = new AzureMaps.data.Feature(\r\n new AzureMaps.data.Point([result.position.lon, result.position.lat]),\r\n {\r\n title: \"Delivery\",\r\n icon: \"pin-blue\",\r\n }\r\n );\r\n\r\n if (startAddress) {\r\n datasource.add([startAddress, endAddress]);\r\n\r\n // Construct the RouteURL object\r\n var routeURL = new AzureMapsRest.RouteURL(pipeline);\r\n\r\n //Start and end point input to the routeURL\r\n var coordinates = [\r\n [startAddress.geometry.coordinates[0], startAddress.geometry.coordinates[1]],\r\n [endAddress.geometry.coordinates[0], endAddress.geometry.coordinates[1]],\r\n ];\r\n\r\n //Make a search route request\r\n routeURL\r\n .calculateRouteDirections(AzureMapsRest.Aborter.timeout(10000), coordinates)\r\n .then((directions) => {\r\n //Get data features from response\r\n var data = directions.geojson.getFeatures();\r\n datasource.add(data);\r\n\r\n map.setCamera({\r\n bounds: AzureMaps.data.BoundingBox.fromData([startAddress, endAddress]),\r\n padding: 80,\r\n duration: 1000,\r\n type: \"fly\",\r\n });\r\n });\r\n }\r\n });\r\n }\r\n });\r\n }\r\n\r\n componentWillUnmount() {}\r\n\r\n shouldComponentUpdate() {\r\n return false;\r\n }\r\n\r\n render() {\r\n return (\r\n
\r\n \r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default AzureMap;\r\n","import * as React from \"react\";\r\nimport \"./TrackingEvent.scss\";\r\n\r\nfunction TrackingEvent(props) {\r\n const { eventData } = props;\r\n console.log(eventData);\r\n /**\r\n * Get a user fr\r\n *\r\n * @param {*} time\r\n * @returns\r\n */\r\n function getDateString(time) {\r\n // Strip timezone\r\n const dateObj = new Date(time.split(\"+\")[0]);\r\n\r\n const h = dateObj.getHours();\r\n const m = dateObj.getMinutes();\r\n const timeStr = `${h}:${m < 10 ? `0${m}` : m}`;\r\n const day = dateObj.getDate();\r\n const month = (dateObj.getMonth() + 1).length > 1 ? dateObj.getMonth() + 1 : `0${dateObj.getMonth() + 1}`;\r\n const year = dateObj.getFullYear();\r\n const dateStr = `${day}-${month}-${year}`;\r\n return `${timeStr} ${dateStr}`;\r\n }\r\n\r\n if (!eventData) {\r\n return null;\r\n }\r\n\r\n return (\r\n
\r\n
\r\n {eventData.title === \"Manifested\" ? \"Manifested\" : eventData.milestone}\r\n
\r\n
{getDateString(eventData.eventTime)}
\r\n
\r\n );\r\n}\r\n\r\nexport default TrackingEvent;\r\n","import TrackingEvent from \"./TrackingEvent\";\r\nexport default TrackingEvent;\r\n","import React from \"react\";\r\nimport { nullDatePrefix, getFriendlyDay } from \"./Track\";\r\n\r\nexport const ConsignmentInformation = ({ consignment }) => {\r\n const specialInstructions = consignment?.specialInstructions || \"N/A\";\r\n const pickupAddress = `${consignment?.pickupAddress.location.locality}, ${consignment?.pickupAddress.location.state} ${consignment?.pickupAddress.location.postcode}`;\r\n const deliveryAddress = `${consignment?.deliveryAddress.location.locality}, ${consignment?.deliveryAddress.location.state} ${consignment?.deliveryAddress.location.postcode}`;\r\n const estimatedDelivery =\r\n !consignment?.estimatedDelivery || consignment?.estimatedDelivery.startsWith(nullDatePrefix)\r\n ? \"\"\r\n : getFriendlyDay(consignment?.estimatedDelivery);\r\n\r\n return (\r\n <>\r\n

Consignment Information

\r\n

\r\n Order reference:\r\n {consignment.customerReference}\r\n

\r\n

\r\n Special instructions:\r\n {specialInstructions}\r\n

\r\n\r\n

\r\n Estimated delivery:\r\n {estimatedDelivery}\r\n

\r\n

\r\n Sender location:\r\n {pickupAddress}\r\n

\r\n

\r\n Receiver location:\r\n {deliveryAddress}\r\n

\r\n \r\n );\r\n};\r\n","import React from \"react\";\r\n\r\nexport const ConsignmentNotFound = ({ message }) => {\r\n return (\r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n

{message}

\r\n

\r\n You have entered an incorrect Tracking ID or Consignment ID. Please double check the Tracking ID\r\n or contact our support team for more information.\r\n

\r\n \r\n Email enquiry\r\n \r\n
\r\n
\r\n \r\n );\r\n};\r\n","import React from \"react\";\r\nimport { nullDatePrefix, getFriendlyDay } from \"./Track\";\r\nimport freightPeopleLogo from \"assets/images/freight-people-logo-white2x.png\";\r\n\r\n/**\r\n * \r\n * consignment is JSON with the following:\r\n * \r\n connoteNumber: \"ABC123\"\r\n customerName: \"Blah\"\r\n customerReference: \"0221177221\"\r\n delivered: \"2020-06-11T01:25:45+00:00\"\r\n deliveryAddress: {id: 0, code: null, name: \"AAA\", line1: \"BBB\", line2: \"\", …}\r\n documents: []\r\n estimatedDelivery: null\r\n events: (6) [{…}, {…}, {…}, {…}, {…}, {…}]\r\n hasPOD: false\r\n id: 854037\r\n isOntime: true\r\n onBoardForDelivery: \"2020-06-10T22:35:37+00:00\"\r\n pickedUp: \"0001-01-01T00:00:00+00:00\"\r\n pickupAddress: {id: 0, code: null, name: \"ABC\", line1: \"1 ABC Drive\", line2: null, …}\r\n pickupDate: \"2020-06-09T00:00:00\"\r\n serviceCode: \"AAA\"\r\n serviceName: \"ABC\"\r\n specialInstructions: null\r\n status: \"Manifested\"\r\n totalItems: 1\r\n totalVolume: 0.0349\r\n totalWeight: 0.11\r\n transportUnits: [{…}]\r\n */\r\n\r\nexport const Header = ({ consignment }) => {\r\n var title =\r\n !consignment.delivered || consignment.delivered.startsWith(nullDatePrefix)\r\n ? \"No tracking available\"\r\n : \"Delivered\";\r\n var description = null;\r\n\r\n if (consignment.events && consignment.events.length > 0) {\r\n title = consignment.events[0].milestone;\r\n\r\n if (title === \"Delivered\") {\r\n description = `Consignment Delivered ${getFriendlyDay(consignment.events[0].eventTime)}`;\r\n } else if (consignment.estimatedDelivery) {\r\n description = `Estimated date of delivery ${consignment.estimatedDelivery}`;\r\n }\r\n }\r\n\r\n return (\r\n
\r\n
\r\n

\r\n {title}\r\n

\r\n

\r\n {description}\r\n

\r\n
\r\n
\r\n \r\n
\r\n
\r\n );\r\n};\r\n","import React from \"react\";\r\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\r\nimport { faCircleNotch } from \"@fortawesome/free-solid-svg-icons\";\r\n\r\nexport const Loading = () => {\r\n return (\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n );\r\n};\r\n","import React from \"react\";\r\n\r\nexport const ContactInfo = ({ consignment }) => {\r\n const subject = `ASN Enquiry Re. Consignment# ${consignment.connoteNumber}`;\r\n const mailto = `mailto:support@freightpeople.com.au?subject=${subject}`;\r\n return (\r\n
\r\n

Got questions? Contact us!

\r\n \r\n email enquiry\r\n \r\n
\r\n );\r\n};\r\n","import React from \"react\";\r\nimport { useParams } from \"react-router-dom\";\r\nimport AzureMap from \"components/AzureMap\";\r\nimport \"./Track.scss\";\r\nimport TrackingEvent from \"./TrackingEvent\";\r\nimport { ConsignmentInformation } from \"./ConsignmentInformation\";\r\nimport { ConsignmentNotFound } from \"./ConsignmentNotFound\";\r\nimport { Header } from \"./Header\";\r\nimport { Loading } from \"./Loading\";\r\nimport { ContactInfo } from \"./ContactInfo\";\r\nexport const nullDatePrefix = \"0001-01-01T\";\r\nconst dayOfWeek = [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"];\r\nconst monthOfYear = [\r\n \"January\",\r\n \"February\",\r\n \"March\",\r\n \"April\",\r\n \"May\",\r\n \"June\",\r\n \"July\",\r\n \"August\",\r\n \"September\",\r\n \"October\",\r\n \"November\",\r\n \"December\",\r\n];\r\n\r\nexport function getFriendlyDay(dateString) {\r\n var date = new Date(dateString);\r\n return `${dayOfWeek[date.getDay()]}, ${date.getDate()} ${monthOfYear[date.getMonth()]} ${date.getFullYear()}`;\r\n}\r\n\r\nexport function Track() {\r\n const { trackingId } = useParams();\r\n const [notFound, setNotFound] = React.useState(false);\r\n const [consignment, setConsignment] = React.useState(undefined);\r\n const [error, setError] = React.useState(undefined);\r\n\r\n React.useEffect(() => {\r\n var url = `${window.location.origin.toString()}/api/tracking/${trackingId}`;\r\n fetch(url)\r\n .then((response) => {\r\n if (response.status === 404) {\r\n setNotFound(true);\r\n }\r\n return response.json();\r\n })\r\n .then((responseJson) => {\r\n const parsed = JSON.parse(responseJson);\r\n setConsignment(Array.isArray(parsed) ? parsed[0] : parsed);\r\n })\r\n .catch((error) => {\r\n setError(error);\r\n });\r\n }, [trackingId]);\r\n\r\n if (notFound || error) {\r\n return (\r\n \r\n );\r\n }\r\n\r\n // Display this when no data is returned\r\n if (!consignment) {\r\n return ;\r\n }\r\n\r\n //console.log(\"DATA\", consignment);\r\n\r\n return (\r\n
\r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n\r\n {/* PACKAGE EVENT DETAILS HERE */}\r\n
\r\n

\r\n Tracking #: \r\n {consignment.connoteNumber}\r\n

\r\n\r\n
\r\n event.milestone === \"Delivered\")}\r\n />\r\n event.milestone === \"On Board for Delivery\"\r\n )}\r\n />\r\n event.milestone === \"In Transit\" && event.title !== \"Manifested\"\r\n )}\r\n />\r\n event.milestone === \"Manifested\" || event.title === \"Manifested\"\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 Track;\r\n","import Track from \"./Track.jsx\";\r\nexport default Track;\r\n","import * as React from \"react\";\r\n\r\nfunction LazyBackground(props) {\r\n const { src, bgposition, bgrepeat, bgsize } = props;\r\n const [newSrc, setSrc] = React.useState(null);\r\n\r\n React.useEffect(() => {\r\n const img = new Image();\r\n img.src = src;\r\n img.onload = () => setSrc(src);\r\n }, [src]);\r\n\r\n return (\r\n \r\n );\r\n}\r\nexport default LazyBackground;\r\n","import LazyBackground from \"./LazyBackground\";\r\nexport default LazyBackground;\r\n","import React, { Component } from \"react\";\r\nimport { Route } from \"react-router\";\r\nimport Home from \"./components/Home\";\r\nimport Track from \"./components/Track\";\r\n// Site-wide global styles (Bootstrap etc.)\r\nimport \"./assets/styles/index.scss\";\r\nimport LazyBackground from \"./components/LazyBackground\";\r\n\r\nexport default class App extends Component {\r\n static displayName = App.name;\r\n\r\n componentDidMount() {}\r\n\r\n render() {\r\n return (\r\n \r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n","// In production, we register a service worker to serve assets from local cache.\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 the \"N+1\" visit to a page, since previously\r\n// cached resources are updated in the background.\r\n\r\n// To learn more about the benefits of this model, read https://goo.gl/KwvDNy.\r\n// This link also includes instructions on opting out of this behavior.\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 default function register () {\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);\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/facebookincubator/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. Lets check if a service worker still exists or not.\r\n checkValidServiceWorker(swUrl);\r\n } else {\r\n // Is not local host. Just register service worker\r\n registerValidSW(swUrl);\r\n }\r\n });\r\n }\r\n}\r\n\r\nfunction registerValidSW (swUrl) {\r\n navigator.serviceWorker\r\n .register(swUrl)\r\n .then(registration => {\r\n registration.onupdatefound = () => {\r\n const installingWorker = registration.installing;\r\n installingWorker.onstatechange = () => {\r\n if (installingWorker.state === 'installed') {\r\n if (navigator.serviceWorker.controller) {\r\n // At this point, the old content will have been purged and\r\n // the fresh content will have been added to the cache.\r\n // It's the perfect time to display a \"New content is\r\n // available; please refresh.\" message in your web app.\r\n console.log('New content is available; please refresh.');\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 }\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) {\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 if (\r\n response.status === 404 ||\r\n response.headers.get('content-type').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);\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 { BrowserRouter } from 'react-router-dom';\r\nimport App from './App';\r\nimport registerServiceWorker from './registerServiceWorker';\r\n\r\nconst baseUrl = document.getElementsByTagName('base')[0].getAttribute('href');\r\nconst rootElement = document.getElementById('root');\r\n\r\nReactDOM.render(\r\n \r\n \r\n ,\r\n rootElement);\r\n\r\nregisterServiceWorker();\r\n"],"sourceRoot":""}