{"version":3,"sources":["webpack:///./app/javascript/images/markers/fixed-2x.png","webpack:///./app/javascript/images/markers/fixed.png","webpack:///./app/javascript/controllers/index.js","webpack:///./app/javascript/packs/application.js","webpack:///./app/javascript/controllers sync \\.js$","webpack:///./app/javascript/controllers/clipboard_controller.js","webpack:///./app/javascript/controllers/countdown_controller.js","webpack:///./app/javascript/controllers/map_controller.js","webpack:///./app/javascript/channels/index.js","webpack:///./app/javascript/channels sync _channel\\.js$"],"names":["module","exports","window","Stimulus","Application","start","context","require","load","definitionsFromContext","Rails","Dropzone","options","importDropzone","acceptedFiles","maxFilesize","dictDefaultMessage","map","webpackContext","req","id","webpackContextResolve","__webpack_require__","o","e","Error","code","keys","Object","resolve","_Class","Controller","connect","this","tooltip","Tooltip","triggerTarget","title","trigger","copy","source","sourceTarget","innerText","value","navigator","clipboard","writeText","then","copied","show","setTimeout","hide","targets","hasDateValue","endTime","Date","dateValue","getTime","timer","setInterval","update","disconnect","stopTimer","clearInterval","difference","displayTime","days","Math","floor","hours","minutes","seconds","daysTarget","textContent","hoursTarget","minutesTarget","secondsTarget","values","date","String","createMap","updateLocation","hasLocation","lnglat","setView","marker","setLatLng","L","mapTarget","zoomControl","attributionControl","control","zoom","position","addTo","attribution","prefix","tileLayer","on","setLocation","createMarker","icon","iconUrl","iconRetinaUrl","iconSize","iconAnchor","lat","latlng","lon","lng","latTarget","toFixed","lonTarget","channels","forEach","webpackEmptyContext"],"mappings":"6EAAAA,EAAOC,QAAU,IAA0B,oE,sBCA3CD,EAAOC,QAAU,IAA0B,iE,mCCA3C,4BAGAC,OAAOC,SAAWC,IAAYC,QAC9B,MAAMC,EAAUC,OAChBJ,SAASK,KAAKC,YAAuBH,G,mCCLrC,oEAWAI,IAAML,QAENM,IAASC,QAAQC,eAAiB,CAChCC,cAAe,kBACfC,YAAa,KACbC,mBAAoB,6D,sBChBtB,IAAIC,EAAM,CACT,4BAA6B,IAC7B,4BAA6B,IAC7B,aAAc,IACd,sBAAuB,KAIxB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C,WAAY,CAAC,GAAI,QAElBX,MAAM7D,KAAKhB,IAChB,CAEAkF,YAAa3E,GACX,MAAMkF,EAAMlF,EAAEmF,OAAOD,IACfE,EAAMpF,EAAEmF,OAAOE,IAErB5E,KAAK6E,UAAUnE,MAAQ+D,EAAIK,QAAQ,GACnC9E,KAAK+E,UAAUrE,MAAQiE,EAAIG,QAAQ,GAE9B9E,KAAKoD,QACRpD,KAAKmE,eAGPnE,KAAKoD,OAAOC,UAAU9D,EAAEmF,OAC1B,CAEA,eAAIzB,GACF,OAAOjD,KAAK6E,UAAUnE,OAASV,KAAK+E,UAAUrE,KAChD,CAEA,UAAIwC,GAIF,MAAO,CAHKlD,KAAK6E,UAAUnE,MACfV,KAAK+E,UAAUrE,MAG7B,EACDb,EA1EQsB,QAAU,CAAC,MAAO,MAAO,M,sBCFlC,MAAM6D,EAAW1G,OACjB0G,EAAStF,OAAOuF,QAAQD,E,oBCJxB,SAASE,EAAoBhG,GAC5B,IAAIK,EAAI,IAAIC,MAAM,uBAAyBN,EAAM,KAEjD,MADAK,EAAEE,KAAO,mBACHF,CACP,CACA2F,EAAoBxF,KAAO,WAAa,MAAO,EAAI,EACnDwF,EAAoBtF,QAAUsF,EAC9BnH,EAAOC,QAAUkH,EACjBA,EAAoB/F,GAAK,G","file":"js/application-6874887463d3199fd472.chunk.js","sourcesContent":["module.exports = __webpack_public_path__ + \"media/images/markers/fixed-2x-a56d652f15cbae97b706bf1e7619b88d.png\";","module.exports = __webpack_public_path__ + \"media/images/markers/fixed-cc35f4478ae1359edc0212f47a8f2c88.png\";","import { Application } from '@hotwired/stimulus'\nimport { definitionsFromContext } from '@hotwired/stimulus-webpack-helpers'\n\nwindow.Stimulus = Application.start()\nconst context = require.context('.', true, /\\.js$/)\nStimulus.load(definitionsFromContext(context))\n","// This file is automatically compiled by Webpack, along with any other files\n// present in this directory. You're encouraged to place your actual application logic in\n// a relevant structure within app/javascript and only use these pack files to reference\n// that code so it'll be compiled.\n\nimport Rails from '@rails/ujs'\nimport Dropzone from 'dropzone'\nimport 'bootstrap'\nimport 'controllers'\nimport 'channels'\n\nRails.start()\n\nDropzone.options.importDropzone = {\n acceptedFiles: 'application/zip',\n maxFilesize: 2048,\n dictDefaultMessage: 'Drop ZIP files from your PUC’s SD card here to upload'\n}\n","var map = {\n\t\"./clipboard_controller.js\": 488,\n\t\"./countdown_controller.js\": 489,\n\t\"./index.js\": 414,\n\t\"./map_controller.js\": 490\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 487;","import { Controller } from '@hotwired/stimulus'\n\nimport Tooltip from 'bootstrap/js/dist/tooltip'\n\nexport default class extends Controller {\n static targets = [\"source\", \"trigger\"]\n\n connect () {\n this.tooltip = new Tooltip(this.triggerTarget, {\n title: 'Copied!',\n trigger: 'manual'\n })\n }\n\n copy () {\n const source = this.sourceTarget.innerText || this.sourceTarget.value\n navigator.clipboard.writeText(source).then(() => this.copied())\n }\n\n copied () {\n this.tooltip.show()\n setTimeout(() => this.tooltip.hide(), 2000)\n }\n}\n","import { Controller } from '@hotwired/stimulus'\n\nexport default class extends Controller {\n static targets = [\"days\", \"hours\", \"minutes\", \"seconds\"]\n static values = { date: String }\n\n connect () {\n if (this.hasDateValue) {\n this.endTime = new Date(this.dateValue).getTime()\n this.timer = setInterval(() => this.update(), 1000)\n this.update()\n }\n }\n\n disconnect () {\n this.stopTimer()\n }\n\n stopTimer () {\n if (this.timer) {\n clearInterval(this.timer)\n }\n }\n\n update () {\n const difference = this.endTime - new Date().getTime()\n\n if (difference < 0) {\n this.stopTimer()\n this.displayTime(0, 0, 0, 0)\n return\n }\n\n const days = Math.floor(difference / (1000 * 60 * 60 * 24))\n const hours = Math.floor((difference % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60))\n const minutes = Math.floor((difference % (1000 * 60 * 60)) / (1000 * 60))\n const seconds = Math.floor((difference % (1000 * 60)) / 1000)\n\n this.displayTime(days, hours, minutes, seconds)\n }\n\n displayTime (days, hours, minutes, seconds) {\n this.daysTarget.textContent = days\n this.hoursTarget.textContent = hours\n this.minutesTarget.textContent = minutes\n this.secondsTarget.textContent = seconds\n }\n}\n","import { Controller } from '@hotwired/stimulus'\n\nimport L from 'leaflet'\n\nexport default class extends Controller {\n static targets = [\"map\", \"lat\", \"lon\"]\n\n connect () {\n this.createMap()\n this.updateLocation()\n }\n\n updateLocation () {\n if (this.hasLocation) {\n const lnglat = this.lnglat\n this.map.setView(lnglat, 18)\n\n this.marker.setLatLng(lnglat)\n } else {\n this.map.setView([0, 0], 2)\n }\n }\n\n createMap () {\n this.map = L.map(this.mapTarget, {\n zoomControl: false,\n attributionControl: false\n })\n\n L.control.zoom({ position: 'topright' }).addTo(this.map)\n L.control.attribution({ prefix: false }).addTo(this.map)\n\n L.tileLayer(`https://api.mapbox.com/styles/v1/{id}/tiles/{z}/{x}/{y}?access_token=${process.env.MAPBOX_TOKEN}`, {\n attribution: '© OpenStreetMap contributors, Imagery © Mapbox',\n id: 'mapbox/streets-v11'\n }).addTo(this.map)\n\n this.map.on('click', (e) => this.setLocation(e))\n\n if (this.hasLocation) {\n this.createMarker()\n }\n }\n\n createMarker () {\n this.marker = L.marker(this.lnglat, {\n icon: L.icon({\n iconUrl: require('images/markers/fixed.png'),\n iconRetinaUrl: require('images/markers/fixed-2x.png'),\n iconSize: [23, 36],\n iconAnchor: [12, 24]\n })\n }).addTo(this.map)\n }\n\n setLocation (e) {\n const lat = e.latlng.lat\n const lon = e.latlng.lng\n\n this.latTarget.value = lat.toFixed(7)\n this.lonTarget.value = lon.toFixed(7)\n\n if (!this.marker) {\n this.createMarker()\n }\n\n this.marker.setLatLng(e.latlng)\n }\n\n get hasLocation () {\n return this.latTarget.value && this.lonTarget.value\n }\n\n get lnglat () {\n const lat = this.latTarget.value\n const lon = this.lonTarget.value\n\n return [lat, lon]\n }\n}\n","// Load all the channels within this directory and all subdirectories.\n// Channel files must be named *_channel.js.\n\nconst channels = require.context('.', true, /_channel\\.js$/)\nchannels.keys().forEach(channels)\n","function webpackEmptyContext(req) {\n\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\te.code = 'MODULE_NOT_FOUND';\n\tthrow e;\n}\nwebpackEmptyContext.keys = function() { return []; };\nwebpackEmptyContext.resolve = webpackEmptyContext;\nmodule.exports = webpackEmptyContext;\nwebpackEmptyContext.id = 492;"],"sourceRoot":""}