├── .gitignore ├── public └── assets │ ├── icons │ ├── icon.png │ ├── camicon.png │ ├── favicon.ico │ ├── marker-icon.png │ └── marker-shadow.png │ ├── banner │ ├── meta-banner.png │ └── github-banner.png │ ├── leaflet │ └── js │ │ └── map.js │ ├── drag-and-drop.js │ ├── style.css │ └── material │ └── material.min.js ├── config.json ├── package.json ├── remove.js ├── views ├── pages │ ├── donate.ejs │ ├── index.ejs │ ├── success.ejs │ ├── error.ejs │ ├── upload.ejs │ ├── tos.ejs │ └── privacy.ejs └── partials │ ├── footer.ejs │ └── header.ejs ├── scrape.js ├── README.md ├── index.js └── LICENSE /.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules -------------------------------------------------------------------------------- /public/assets/icons/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moom0o/PhotoSphereStudio/HEAD/public/assets/icons/icon.png -------------------------------------------------------------------------------- /public/assets/icons/camicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moom0o/PhotoSphereStudio/HEAD/public/assets/icons/camicon.png -------------------------------------------------------------------------------- /public/assets/icons/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moom0o/PhotoSphereStudio/HEAD/public/assets/icons/favicon.ico -------------------------------------------------------------------------------- /public/assets/banner/meta-banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moom0o/PhotoSphereStudio/HEAD/public/assets/banner/meta-banner.png -------------------------------------------------------------------------------- /public/assets/icons/marker-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moom0o/PhotoSphereStudio/HEAD/public/assets/icons/marker-icon.png -------------------------------------------------------------------------------- /public/assets/banner/github-banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moom0o/PhotoSphereStudio/HEAD/public/assets/banner/github-banner.png -------------------------------------------------------------------------------- /public/assets/icons/marker-shadow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moom0o/PhotoSphereStudio/HEAD/public/assets/icons/marker-shadow.png -------------------------------------------------------------------------------- /config.json: -------------------------------------------------------------------------------- 1 | { 2 | "https": false, 3 | "host": "localhost", 4 | "port": 7000, 5 | "openWebBrowser": false, 6 | "clientId": "XXXXXXXXXXXX-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.apps.googleusercontent.com", 7 | "clientSecret": "XXXXXX-XXXXXXXXXXXXXXXXXXXXXXXXXXXX" 8 | } 9 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "photospherestudio", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "keywords": [], 10 | "author": "moo", 11 | "license": "ISC", 12 | "dependencies": { 13 | "body-parser": "^1.20.1", 14 | "cookie-parser": "^1.4.6", 15 | "ejs": "^3.1.9", 16 | "exif-js": "^2.3.0", 17 | "express": "^4.18.2", 18 | "express-fileupload": "^1.4.0", 19 | "open": "^8.4.0", 20 | "puppeteer": "^24.29.1", 21 | "request": "^2.88.2", 22 | "serve-favicon": "^2.5.0", 23 | "sqlite3": "^5.1.7", 24 | "unirest": "^0.6.0" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /remove.js: -------------------------------------------------------------------------------- 1 | const sqlite3 = require('sqlite3'); 2 | const fs = require('fs'); 3 | const db = new sqlite3.Database('published.db'); 4 | db.run("CREATE TABLE IF NOT EXISTS points (url TEXT, lat LONG, long LONG, UNIQUE(url))"); 5 | // Prevent corruption 6 | db.run('PRAGMA synchronous=FULL') 7 | db.run('PRAGMA count_changes=OFF') 8 | db.run('PRAGMA journal_mode=DELETE') 9 | db.run('PRAGMA temp_store=DEFAULT') 10 | const urlsToProcess = JSON.parse(fs.readFileSync("tao_photospheres.json")) 11 | 12 | urlsToProcess.forEach((url) => { 13 | console.log(url.url); 14 | db.serialize(function () { 15 | let stmt = db.prepare(`DELETE FROM points WHERE url = '${url.url}';`); 16 | stmt.run(); 17 | stmt.finalize(); 18 | }); 19 | }) 20 | -------------------------------------------------------------------------------- /views/pages/donate.ejs: -------------------------------------------------------------------------------- 1 | <%- include('../partials/header'); %> 2 | 3 |
4 |
5 |

Donations

6 |

Find this service useful? Consider donating!

7 |

Bitcoin

8 |

37UFXbEqWiixvMDfooL9BsSD9mU3ZzRxKg

9 |

Monero

10 |

49aXC8ZatrK4MrQXeSpUGsYk5HKLpeuhTZKMW8MtXuXxhNob8rQQBrkRj471Zv4ZNoCu6teYwsMy42HznLp6grCt1AUDCrW

11 |
12 |

Looking for a VPS that accepts crypto?

13 |

Consider BuyVM! Their policy is very lenient, and they even allow running exit nodes. Consider using my referral link: https://my.frantech.ca/aff.php?aff=4697

14 |
15 |
16 | 17 | <%- include('../partials/footer'); %> -------------------------------------------------------------------------------- /views/pages/index.ejs: -------------------------------------------------------------------------------- 1 | <%- include('../partials/header'); %> 2 | 3 |
4 |
5 |

Get Started

6 |

Use the button below to authenticate your google account in order to use the service.

7 | 8 | 9 | 10 |
11 | 12 |
13 | 14 |
15 |
16 |
17 | 18 | <%- include('../partials/footer'); %> -------------------------------------------------------------------------------- /views/pages/success.ejs: -------------------------------------------------------------------------------- 1 | <%- include('../partials/header'); %> 2 | 3 |
4 |
5 | 6 |
7 | 8 | done 9 | 10 | 11 |

12 | <%= status %> 13 |

14 | 15 |

16 | Your 360 image has been published to Google Street View! Click on the link below to view the image! 17 |

18 | 19 |
20 | Link: <%= shareLink %> 21 |
22 | 23 | 26 |
27 | 28 |
29 | 30 |
31 | Debug Information 32 |
<%= response %>
33 |
34 |
35 | 36 | 41 |
42 |
43 | 44 | <%- include('../partials/footer'); %> -------------------------------------------------------------------------------- /views/partials/footer.ejs: -------------------------------------------------------------------------------- 1 |

Source Code: Github - Made 2 | by moom0o & Win

Privacy Policy - Terms

3 | 4 | 5 | 6 | 7 | 8 | 9 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /views/pages/error.ejs: -------------------------------------------------------------------------------- 1 | <%- include('../partials/header'); %> 2 | 3 |
4 |
5 | 6 |
7 | 8 | close 9 | 10 | 11 |

12 | <%= errorCode %>: <%= errorStatus %> 13 |

14 | 15 |

16 | <%= errorMessage %> 17 |

18 |

19 | Make sure your image is JPEG and you haven't cropped/downsized the photo. 20 |

21 |

22 | If your image is JPEG and the original size try these steps: 23 |
24 | 1) Download exiftool and run .\exiftool.exe -UsePanoramaViewer=true -ProjectionType=equirectangular .\image.jpg then try uploading 25 |
26 | 2) If that STILL hasn't fixed your issue, make sure you haven't downsized your image, otherwise if you did you will need to run 27 |
28 | .\exiftool.exe -CroppedAreaImageWidthPixels=XXXX -CroppedAreaImageHeightPixels=YYYY -FullPanoWidthPixels=XXXX -FullPanoHeightPixels=YYYY .\image.jpg with your image dimensions. 29 |
30 | If you need to decrease the size of your image below the max of 75mb, I recommend using Paint.NET and compressing the image to 98 or 99% which usually gets right below 75mb and is the best quality. 31 |

32 |
33 | 34 |
35 | 36 |
37 | Debug Information 38 |
<%= response %>
39 |
40 |
41 | 42 | 47 |
48 |
49 | 50 | <%- include('../partials/footer'); %> 51 | -------------------------------------------------------------------------------- /views/partials/header.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 22 | 23 | 24 | 26 | 27 | 28 | PhotoSphereStudio - Upload 360° Photos to Google Maps 29 | 30 | 31 |
32 | 45 |
-------------------------------------------------------------------------------- /public/assets/leaflet/js/map.js: -------------------------------------------------------------------------------- 1 | // Creating map options 2 | let mapOptions = { 3 | center: [41.875728, -87.626609], 4 | zoom: 4, 5 | preferCanvas: true 6 | } 7 | 8 | var defaultIcon = L.icon({ 9 | iconUrl: '/assets/icons/marker-icon.png', 10 | shadowUrl: '/assets/icons/marker-shadow.png', 11 | }); 12 | 13 | // Creating a map object 14 | let map = new L.map('map', mapOptions); 15 | 16 | // Creating a Layer object 17 | let layer = new L.TileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { 18 | attribution: '© OpenStreetMap contributors' 19 | }); 20 | 21 | // Geolocation 22 | L.control.locate().addTo(map); 23 | 24 | // Adding layer to the map 25 | map.addLayer(layer); 26 | 27 | const getJSON = async url => { 28 | const response = await fetch(url); 29 | if(!response.ok) // check if response worked (no 404 errors etc...) 30 | throw new Error(response.statusText); 31 | 32 | const data = response.json(); // get JSON from the response 33 | return data; // returns a promise, which resolves to this data value 34 | } 35 | 36 | console.log("Fetching data..."); 37 | let camIcon = L.icon({ 38 | iconUrl: '/assets/icons/camicon.png', 39 | 40 | iconSize: [32, 32], // size of the icon 41 | iconAnchor: [16, 28], // point of the icon which will correspond to marker's location 42 | }); 43 | getJSON("/list").then(data => { 44 | const textControl = L.control({ position: 'topright' }); 45 | 46 | textControl.onAdd = function () { 47 | const div = L.DomUtil.create('div', 'map-text'); 48 | div.innerHTML = `

${data.length} total images

`; 49 | return div; 50 | }; 51 | 52 | textControl.addTo(map); 53 | 54 | 55 | data.forEach(b => { 56 | //use CircleMarker when it starts lagging // , {icon: camIcon} 57 | L.circleMarker([b.lat, b.long]).addTo(map).on('click', function(evt) { 58 | window.open(b.url, '_blank'); 59 | }); 60 | }) 61 | }).catch(error => { 62 | console.error(error); 63 | }); 64 | 65 | // Marker 66 | let marker = null; 67 | let marker2 = null 68 | map.on('click', (event) => { 69 | if(!document.getElementById('lat')){ 70 | return 71 | } 72 | if (marker !== null || marker2 !== null) { 73 | map.removeLayer(marker); 74 | } 75 | 76 | marker = L.marker([event.latlng.lat, event.latlng.lng]).addTo(map); 77 | 78 | document.getElementById('lat').value = event.latlng.lat; 79 | document.getElementById('long').value = event.latlng.lng; 80 | 81 | }) 82 | -------------------------------------------------------------------------------- /public/assets/drag-and-drop.js: -------------------------------------------------------------------------------- 1 | function convertDMSToDD([degrees, minutes, seconds], ref) { 2 | decimal_degrees = degrees + minutes / 60 + seconds / 3600; 3 | if (ref == 'S' || ref == 'W') { 4 | decimal_degrees = -decimal_degrees; 5 | } 6 | return decimal_degrees; 7 | } 8 | 9 | function readURL(input) { 10 | if (input.files && input.files[0]) { 11 | var reader = new FileReader(); 12 | 13 | reader.onload = function (e) { 14 | $('.image-upload-wrap').hide(); 15 | 16 | $('.file-upload-image').attr('src', e.target.result); 17 | $('.file-upload-content').show(); 18 | 19 | $('.image-title').html(input.files[0].name); 20 | 21 | var img = document.createElement('img'); 22 | img.src = e.target.result; 23 | 24 | // Render thumbnail. 25 | img.onload = function () { 26 | ExifReader.load(input.files[0], {async: false}).then(function (tags) { 27 | if(tags["PoseHeadingDegrees"]){ 28 | $('#pose').val(tags["PoseHeadingDegrees"].value); 29 | } else { 30 | $('#pose').val(0); 31 | } 32 | 33 | }).catch(function (error) { 34 | $('#pose').val(0); 35 | console.log(error) 36 | }) 37 | EXIF.getData(img, function () { 38 | var lat = convertDMSToDD( 39 | EXIF.getTag(this, 'GPSLatitude'), 40 | EXIF.getTag(this, 'GPSLatitudeRef') 41 | ); 42 | var long = convertDMSToDD( 43 | EXIF.getTag(this, 'GPSLongitude'), 44 | EXIF.getTag(this, 'GPSLongitudeRef') 45 | ); 46 | $('#lat').val(lat); 47 | $('#long').val(long); 48 | map.flyTo([lat, long], 18); 49 | marker = L.marker([lat, long]).addTo(map); 50 | console.log(`lat: ${lat}, long: ${long}`); 51 | }); 52 | }; 53 | }; 54 | 55 | reader.readAsDataURL(input.files[0]); 56 | } else { 57 | removeUpload(); 58 | } 59 | } 60 | 61 | function removeUpload() { 62 | if (marker !== null) { 63 | map.removeLayer(marker); 64 | } 65 | $('.file-upload-input').replaceWith($('.file-upload-input').clone()); 66 | $('.file-upload-content').hide(); 67 | $('.image-upload-wrap').show(); 68 | } 69 | 70 | $('.image-upload-wrap').bind('dragover', function () { 71 | $('.image-upload-wrap').addClass('image-dropping'); 72 | }); 73 | 74 | $('.image-upload-wrap').bind('dragleave', function () { 75 | $('.image-upload-wrap').removeClass('image-dropping'); 76 | }); 77 | -------------------------------------------------------------------------------- /public/assets/style.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | padding: 0; 4 | } 5 | 6 | button { 7 | border: none; 8 | border-radius: 2px; 9 | padding: 12px 18px; 10 | font-size: 16px; 11 | text-transform: uppercase; 12 | cursor: pointer; 13 | color: white; 14 | background-color: #2196f3; 15 | box-shadow: 0 0 4px #999; 16 | outline: none; 17 | } 18 | 19 | pre { 20 | white-space: pre-line; 21 | } 22 | 23 | form, input, label, p { 24 | color: white !important; 25 | } 26 | 27 | #icon { 28 | max-width: 45px; 29 | height: auto; 30 | border-radius: 50%; 31 | } 32 | 33 | .column { 34 | flex-grow: 1; 35 | display: inline-block; 36 | } 37 | 38 | /* Ripple effect */ 39 | .ripple { 40 | background-position: center; 41 | transition: background 0.8s; 42 | } 43 | 44 | .ripple:hover { 45 | background: #47a7f5 radial-gradient(circle, transparent 1%, #47a7f5 1%) center/15000%; 46 | } 47 | 48 | .ripple:active { 49 | background-color: #6eb9f7; 50 | background-size: 100%; 51 | transition: background 0s; 52 | } 53 | 54 | /* Ripple effect */ 55 | .donate { 56 | background-position: center; 57 | transition: background 0.8s; 58 | background-color: #2eff00; 59 | } 60 | 61 | .donate:hover { 62 | background: #00ff9b radial-gradient(circle, transparent 1%, #00ff9b 1%) center/15000%; 63 | } 64 | 65 | .donate:active { 66 | background-color: #00ff93; 67 | background-size: 100%; 68 | transition: background 0s; 69 | } 70 | 71 | /* DRAG AND DROP */ 72 | .file-upload { 73 | width: 100%; 74 | margin: 0 auto; 75 | } 76 | 77 | .file-upload-btn { 78 | width: 100%; 79 | margin: 0; 80 | color: #fff; 81 | background: #2196f3; 82 | border: none; 83 | padding: 10px; 84 | border-radius: 4px; 85 | border-bottom: 4px solid #2879f3; 86 | transition: all .2s ease; 87 | outline: none; 88 | text-transform: uppercase; 89 | font-weight: 700; 90 | } 91 | 92 | .file-upload-btn:hover { 93 | background: #2175f3; 94 | color: #ffffff; 95 | transition: all .2s ease; 96 | cursor: pointer; 97 | } 98 | 99 | .file-upload-btn:active { 100 | border: 0; 101 | transition: all .2s ease; 102 | } 103 | 104 | .file-upload-content { 105 | display: none; 106 | text-align: center; 107 | } 108 | 109 | .file-upload-input { 110 | position: absolute; 111 | margin: 0; 112 | padding: 0; 113 | width: 100%; 114 | height: 100%; 115 | outline: none; 116 | opacity: 0; 117 | cursor: pointer; 118 | } 119 | 120 | .image-upload-wrap { 121 | margin-top: 20px; 122 | border: 4px dashed #2196f3; 123 | position: relative; 124 | } 125 | 126 | .image-dropping, .image-upload-wrap:hover { 127 | background-color: #2196f3; 128 | border: 4px dashed #ffffff; 129 | } 130 | 131 | .image-title-wrap { 132 | padding: 0 15px 15px 15px; 133 | color: #222; 134 | } 135 | 136 | .drag-text { 137 | text-align: center; 138 | } 139 | 140 | .drag-text .buttonText { 141 | font-weight: 100; 142 | text-transform: uppercase; 143 | color: #fff; 144 | padding: 60px 0; 145 | } 146 | 147 | .file-upload-image { 148 | max-height: 200px; 149 | max-width: 200px; 150 | margin: auto; 151 | padding: 20px; 152 | } 153 | 154 | .remove-image { 155 | width: 200px; 156 | margin: 0; 157 | color: #fff; 158 | background: #cd4535; 159 | border: none; 160 | padding: 10px; 161 | border-radius: 4px; 162 | border-bottom: 4px solid #b02818; 163 | transition: all .2s ease; 164 | outline: none; 165 | text-transform: uppercase; 166 | font-weight: 700; 167 | } 168 | 169 | .remove-image:hover { 170 | background: #c13b2a; 171 | color: #ffffff; 172 | transition: all .2s ease; 173 | cursor: pointer; 174 | } 175 | 176 | .remove-image:active { 177 | border: 0; 178 | transition: all .2s ease; 179 | } 180 | 181 | .checkmark { 182 | height: 25px; 183 | width: 25px; 184 | background-color: #eee; 185 | } 186 | 187 | .map-text { 188 | background: rgba(255, 255, 255, 0.8); 189 | padding: 8px 12px; 190 | border-radius: 4px; 191 | font-size: 14px; 192 | font-family: sans-serif; 193 | color: black; 194 | box-shadow: 0 0 4px rgba(0,0,0,0.2); 195 | } -------------------------------------------------------------------------------- /scrape.js: -------------------------------------------------------------------------------- 1 | // Mostly used Gemini for this since I needed something quick to scrape Google and remove dead urls 2 | 3 | import puppeteer from 'puppeteer'; 4 | import fs from 'fs'; 5 | const targetHost = 'www.google.com/maps/photometa/v1'; // This is what we're hunting 6 | const urlsToProcess = JSON.parse(fs.readFileSync("list.json")) 7 | async function findMetadataRequest(url) { 8 | console.log(`[PUPPETEER] Launching browser for: ${url}`); 9 | let browser; 10 | try { 11 | browser = await puppeteer.launch(); 12 | const page = await browser.newPage(); 13 | 14 | // This is the magic. We create a "promise" that 15 | // our event listener can "resolve" when it finds the URL. 16 | const foundUrlPromise = new Promise((resolve, reject) => { 17 | // Set up the listener *before* we navigate 18 | page.on('request', (request) => { 19 | const requestUrl = request.url(); 20 | // Check if the URL is the one we want 21 | if (requestUrl.includes(targetHost)) { 22 | console.log(`[INTERCEPTED] Found target URL: ${requestUrl}...`); 23 | // This is it! Stop listening and return the URL. 24 | page.off('request'); 25 | resolve(requestUrl); 26 | } 27 | }); 28 | 29 | // Set a 30-second timeout for the whole operation 30 | setTimeout(() => { 31 | reject(new Error(`Timeout: Did not find a request to ${targetHost} within 30 seconds.`)); 32 | }, 30000); 33 | }); 34 | 35 | // 1. Go to the page. This will trigger all the JS and network calls. 36 | console.log(`[PUPPETEER] Navigating and waiting for requests...`); 37 | await page.goto(url, { waitUntil: 'networkidle2' }); 38 | 39 | // 2. Wait for our promise to be resolved by the event listener. 40 | const realUrl = await foundUrlPromise; 41 | 42 | await browser.close(); 43 | console.log(`[SUCCESS] Captured metadata URL.`); 44 | return realUrl; 45 | 46 | } catch (error) { 47 | console.error(`[ERROR] Failed to capture request:`, error.message); 48 | if (browser) { 49 | await browser.close(); 50 | } 51 | return null; 52 | } 53 | } 54 | import unirest from 'unirest'; 55 | 56 | // --- Run the example --- 57 | (async () => { 58 | processList() 59 | })(); 60 | 61 | // 3. THE MAIN FUNCTION TO PROCESS THE LIST 62 | async function processList() { 63 | console.log(`Starting check for ${urlsToProcess.length} URLs...`); 64 | const aliveUrls = []; 65 | const deadUrls = []; 66 | const taoUrls = []; 67 | 68 | for (const item of urlsToProcess) { 69 | const realUrl = await findMetadataRequest(item.url); 70 | if (realUrl) { 71 | console.log(`\nCaptured URL: ${realUrl}`); 72 | var req = unirest('GET', realUrl) 73 | .end(function (res) { 74 | if (res.error) throw new Error(res.error); 75 | // Removing tao's stupid photospheres, constantly spamming the website with stupid pictures 76 | if(res.raw_body.includes("Táo TV")){ 77 | taoUrls.push(item); 78 | try { 79 | const outputData = JSON.stringify(taoUrls, null, 2); // Pretty-print JSON 80 | fs.writeFileSync('tao_photospheres.json', outputData); 81 | console.log('Successfully saved results to tao_photospheres.json'); 82 | } catch (err) { 83 | console.error('Error writing to file:', err); 84 | } 85 | return console.log("fuck ass tao") 86 | } else if (res.raw_body.includes("[[],[[[2],") 87 | ){ 88 | deadUrls.push(item); 89 | try { 90 | const outputData = JSON.stringify(deadUrls, null, 2); // Pretty-print JSON 91 | fs.writeFileSync('dead_photospheres.json', outputData); 92 | console.log('Successfully saved results to dead_photospheres.json'); 93 | } catch (err) { 94 | console.error('Error writing to file:', err); 95 | } 96 | return console.log("dead") 97 | } else if(res.raw_body.includes("[[],[[[1],")){ 98 | aliveUrls.push(item); 99 | try { 100 | const outputData = JSON.stringify(aliveUrls, null, 2); // Pretty-print JSON 101 | fs.writeFileSync('alive_photospheres.json', outputData); 102 | console.log('Successfully saved results to alive_photospheres.json'); 103 | } catch (err) { 104 | console.error('Error writing to file:', err); 105 | } 106 | return console.log("good") 107 | 108 | } 109 | //console.log(res.raw_body); 110 | }); 111 | 112 | } else { 113 | console.log(`\nCould not capture a metadata request from that page.`); 114 | } 115 | } 116 | console.log(`\nProcess complete. Found ${aliveUrls.length} live URLs.`); 117 | } -------------------------------------------------------------------------------- /views/pages/upload.ejs: -------------------------------------------------------------------------------- 1 | <%- include('../partials/header'); %> 2 | 3 |
4 |
5 |

Upload

6 |

This page will allow you to upload photo spheres to Google Maps after the idiots at Google removed 7 | their perfectly working StreetView app.

8 | 9 | 12 | 15 | 16 | 19 | 20 |
21 |
22 | Upload a 360 image 23 |
24 | 27 | 28 |
29 | 31 |
32 | 33 |
34 | 35 | 36 | upload 37 | 38 | 39 |

Drag and drop a file or select add Image

40 | 41 |
42 | 43 | 44 |
45 |
46 |
47 | Uploaded Image 48 |
49 | 51 |
52 |
53 |
54 |
55 | 56 |
57 | 58 |
59 |
60 |
61 | 62 | 64 |
65 |
66 | 67 | 69 |
70 |
71 | 72 | 73 |
74 |
75 | 76 |
77 | Advanced Options 78 |
 79 |                     
80 | 81 | 84 |
85 |
86 | 87 | 90 |
91 |

92 | Find the placeId of your place here. (Make sure to search your place, it will not show id by clicking the place) 93 |

94 |
95 |
96 |
97 | 98 | 99 |
100 |
101 |
102 | 103 | 106 | 107 | <%- include('../partials/footer'); %> 108 | -------------------------------------------------------------------------------- /views/pages/tos.ejs: -------------------------------------------------------------------------------- 1 | <%- include('../partials/header'); %> 2 | 3 |
4 |
5 |
6 |

Terms of Service for maps.moomoo.me

7 |

Effective Date: November 24, 2025

8 | 9 |

1. Agreement to Terms

10 |

Welcome to maps.moomoo.me (the "Service"). These Terms of Service ("Terms") are the rules for using our website.

11 |

By accessing or using our Service, you agree to be bound by these Terms. If you do not agree with any part of these terms, you may not use our Service.

12 | 13 |

2. Description of Service

14 |

Our Service provides a tool that allows you to sign in with your Google Account and upload your images (and their metadata, like GPS location) to be published on Google Street View.

15 | 16 |

3. Google Accounts

17 |

To use our Service, you must sign in with your Google Account. You authorize us to access the specific permissions you grant (i.e., "manage streetview images") to perform the Service.

18 |

We are not responsible for your Google Account. Your relationship with Google, including their collection and use of your data, is governed by Google's Terms of Service and Privacy Policy.

19 | 20 |

4. User Content and Responsibility

21 |

You are entirely responsible for the images and data ("User Content") you upload.

22 |

By uploading User Content, you represent and warrant that:

23 |
    24 |
  • You own the content: You have the legal right, title, and ownership of the images you upload.
  • 25 |
  • You have permission: If the content is not yours, you have the necessary licenses, rights, and permissions to upload it and grant us the rights to use it.
  • 26 |
  • Your content is legal: Your content does not violate any laws or infringe on the rights of any third party (such as privacy rights, copyrights, or trademarks).
  • 27 |
  • Your content is not harmful: Your content is not obscene, defamatory, harassing, hateful, or otherwise objectionable.
  • 28 |
29 | 30 |

5. What You Grant Us

31 |

To provide the Service, you grant us a limited, non-exclusive, royalty-free, worldwide license to:

32 |
    33 |
  1. Process your User Content (images, GPS data).
  2. 34 |
  3. Transmit your User Content to Google's APIs to publish it on Google Street View.
  4. 35 |
  5. Store and Copy your images and metadata on our servers (only if you opt-in to the map marker feature) for backup and display purposes. No personally identifiable data is saved.
  6. 36 |
37 |

Regarding Image Storage:

38 |
    39 |
  • If the "Publish url as a marker..." checkbox is disabled, we do not store your image files; we only process them at the time of upload.
  • 40 |
  • If the "Publish url as a marker..." checkbox is enabled, you explicitly grant us permission to store a copy of your image file and its metadata on our servers. This is intended to serve as a backup and to ensure continuity of the map feature.
  • 41 |
42 |

If you enable the "Publish url as a marker to this website's map?" checkbox, you also grant us permission to store and publicly display the resulting Google Street View URL and its GPS coordinates on our map.

43 | 44 |

6. Prohibited Activities

45 |

You agree not to use the Service to:

46 |
    47 |
  • Upload any illegal, harmful, or infringing content.
  • 48 |
  • Attempt to harm, hack, or disrupt our servers or network.
  • 49 |
  • Use the Service for any purpose it was not intended for (e..g, data mining, spamming).
  • 50 |
  • Violate any applicable local, state, national, or international law.
  • 51 |
52 | 53 |

7. Our Intellectual Property

54 |

This Service is open-source. Your use of the source code is governed by the terms of the open-source license, which is available on our GitHub repository.

55 | 56 |

8. Termination

57 |
    58 |
  • Your Right to Stop: You may stop using our Service at any time. You can revoke our access to your Google Account at any time from your Google Account settings.
  • 59 |
  • Our Right to Stop: We reserve the right to suspend or terminate your access to the Service at any time, without notice or liability, if you violate these Terms.
  • 60 |
61 | 62 |

9. Disclaimer of Warranties

63 |

Our Service is provided "AS IS" and "AS AVAILABLE" without any warranties, express or implied.

64 |

We do not promise that the Service will be:

65 |
    66 |
  • Secure, bug-free, or error-free.
  • 67 |
  • Always available or uninterrupted.
  • 68 |
  • Successful in uploading your images to Google Street View. (Google may reject images for its own reasons).
  • 69 |
  • Permanent: While we aim to back up your images if you opt-in, we do not guarantee the integrity or permanence of these backups. You should not rely on this Service as your primary or sole backup method.
  • 70 |
71 |

You use this Service at your own risk.

72 | 73 |

10. Limitation of Liability

74 |

To the fullest extent permitted by law, maps.moomoo.me (and its owners or operators) shall not be liable for any indirect, incidental, special, or consequential damages, or for any loss of data, profits, or goodwill, resulting from:

75 |
    76 |
  • Your use of, or inability to use, the Service.
  • 77 |
  • Any failed, delayed, or rejected image uploads.
  • 78 |
  • Any content or conduct of any third party (including Google).
  • 79 |
80 |

We are a tool. Your use of this tool and your interactions with Google are your own responsibility.

81 | 82 |

11. Changes to These Terms

83 |

We may modify these Terms at any time. We will post the most current version on this page. By continuing to use the Service after changes become effective, you agree to the new terms.

84 | 85 |

12. Contact Us

86 |

If you have any questions about these Terms, please contact us at: moom0o AT protonmail D0T com

87 | 88 |
89 |
90 |
91 | 92 | <%- include('../partials/footer'); %> -------------------------------------------------------------------------------- /views/pages/privacy.ejs: -------------------------------------------------------------------------------- 1 | <%- include('../partials/header'); %> 2 | 3 |
4 |
5 |
6 |

Privacy Policy for maps.moomoo.me

7 |

Effective Date: November 24, 2025

8 | 9 |

1. Introduction

10 |

Welcome to maps.moomoo.me (referred to as "we," "us," or "our"). We are committed to protecting your privacy. This Privacy Policy explains how we collect, use, and handle your information when you use our website and services (the "Service").

11 |

Our Service allows you to sign in using your Google Account to upload and manage your Google Street View images.

12 | 13 |

2. Information We Collect

14 |

We only collect the information that is necessary to provide our Service.

15 |
    16 |
  • Information from Google Sign-In: When you sign in with your Google Account, we receive a unique Google Account ID. This ID is used to associate your account with the images you upload.
  • 17 |
  • We DO NOT access your email address. The permissions you grant are strictly limited. We do not receive, store, or have access to your email address, your name, your profile picture, or any other personal information from your Google Account.
  • 18 |
  • User-Uploaded Content: We process the images (and their associated metadata, like GPS location) that you choose to upload through our Service for the sole purpose of publishing them to Google. We back up and store the image files on our servers ONLY if you select the "Publish url as a marker to this website's map?" option. This is done to preserve your content in the event that Google discontinues Google Earth photospheres or related services.
  • 19 |
  • Database Information (With Your Consent): When you upload an image, you have an option via a checkbox labeled "Publish url as a marker to this website's map?". 20 |
      21 |
    • If you leave this checkbox enabled, we will store the resulting Google Street View image URL and the image's GPS coordinates in our database.
    • 22 |
    • If you disable (uncheck) this box, the image URL and its coordinates will not be stored in our database.
    • 23 |
    24 |
  • 25 |
26 | 27 |

3. How We Use Your Information

28 |

We use the information we collect for specific purposes:

29 |
    30 |
  • To Provide the Core Service: We use your Google Account ID to link your account to your uploads. We process the images you provide to upload, manage, and publish them to Google Street View on your behalf. This action is initiated by you and requires your explicit authorization through the Google API.
  • 31 |
  • To Display Markers on Our Map: If you consent by leaving the "Publish url as a marker to this website's map?" checkbox enabled, we use the stored image URLs and GPS coordinates to display your published images as markers on the maps.moomoo.me public map for other users to see.
  • 32 |
  • To Protect Against Service Discontinuation: If you enable the marker option, we store a backup of your image file to ensure your data is not lost if Google alters or removes their photosphere hosting services.
  • 33 |
34 | 35 |

4. How We Share Your Information

36 |

Your information is only shared in the following way:

37 |
    38 |
  • With Google: The core function of our Service is to publish your images to Google Street View. Therefore, any images you upload are shared directly with Google to be published on their platform. These images and their management are subject to Google's Terms of Service and Privacy Policy.
  • 39 |
  • Publicly on Our Map (With Your Consent): If you opt-in by enabling the checkbox, the resulting image URLs and their location coordinates will be used to publicly display a marker on our map.
  • 40 |
  • With Third Parties: We do not sell, trade, rent, or otherwise share your Google Account ID or any other personal information with any third parties.
  • 41 |
  • Legal Requirements: We may disclose your information if required to do so by law or in response to valid requests by public authorities (e.g., a court or a government agency).
  • 42 |
43 | 44 |

5. Google API Services Disclosure

45 |

Our use and transfer of information received from Google APIs will adhere to the Google API Services User Data Policy, including the Limited Use requirements. We only use the "manage streetview images" permission to perform the actions you explicitly request within our application.

46 | 47 |

6. Data Security

48 |

We take reasonable measures to protect the limited information we store. To be clear, the only information we store is your Google Account ID and, if you opt-in, the Google Street View image URLs, their associated GPS coordinates and an image file backup with no identifiable information.

49 |

Please remember that no method of transmission over the Internet or method of electronic storage is 100% secure.

50 | 51 |

7. Your Rights and Data Deletion

52 |
    53 |
  • Managing Your Images: The images you upload are managed through your Google Street View account. You can view, manage, or delete your published images directly through Google's services. Deleting an image from Google Street View will result in a broken link on our map.
  • 54 |
  • Removing Your Markers: If you have allowed your image URLs and coordinates to be published to our map and wish to have them removed from our database, please contact us at the email address below.
  • 55 |
  • Revoking Access: You can revoke our Service's access to your Google Account at any time by visiting the "Security" or "Apps with access to your account" section of your Google Account settings.
  • 56 |
  • Deleting Your Data: If you revoke our access, we will no longer be able to manage your images. If you wish to have your Google Account ID deleted from our system, please contact us.
  • 57 |
58 | 59 |

8. Children's Privacy

60 |

Our Service is not intended for anyone under the age of 13. We do not knowingly collect any personally identifiable information from children under 13.

61 | 62 |

9. Transparency and Open Source

63 |

We believe in transparency. The source code for maps.moomoo.me is open-source and available for public review on GitHub. You can view the code at: https://github.com/moom0o/PhotoSphereStudio

64 | 65 |

10. Changes to This Privacy Policy

66 |

We may update this Privacy Policy from time to time. We will notify you of any changes by posting the new Privacy Policy on this page. We recommend you review this page periodically for any changes.

67 | 68 |

11. Contact Us

69 |

If you have any questions about this Privacy Policy, please contact us at: moom0o AT protonmail D0T com

70 |
71 |
72 |
73 | 74 | <%- include('../partials/footer'); %> -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |
2 | 3 |

4 |

Uploading 360° photos made easy

5 |
6 | 7 | # Overview 8 | ![NodeJS](https://img.shields.io/badge/Node.js-339933?style=for-the-badge&logo=nodedotjs&logoColor=white) 9 | ![Express](https://img.shields.io/badge/Express.js-Middleware-000000?style=for-the-badge&logo=express&logoColor=white) 10 | ![Google Cloud](https://img.shields.io/badge/Google_Cloud-Street_View_API-4285F4?style=for-the-badge&logo=googlecloud&logoColor=white) 11 | ![OAuth 2.0](https://img.shields.io/badge/Security-OAuth_2.0-red?style=for-the-badge&logo=openid&logoColor=white) 12 | 13 | Upload 360° photos to Google Maps without using Google's app. 14 | 15 | The main reason why I created this is because Google Maps isn't a good replacement of the former app. You are only able 16 | to upload 360 photos to specific places on the map. With this project, it is possible to upload them at any coordinates. 17 | 18 | If you want to try it out, there are publicly available instances: 19 | | **URL** | **Country** | **Status** | **Hosted By** | 20 | |------------------------------------------------|-------------|------------|---------------| 21 | | [maps.moomoo.me](https://maps.moomoo.me) | 🇬🇧 | Up | @moom0o | 22 | 23 | ```mermaid 24 | graph TD 25 | subgraph "Auth" 26 | User([User]) -->|Click Sign In| Google[Google Login Page] 27 | Google -->|Redirect| ServerAuth[Exchange Code for Token] 28 | ServerAuth -->|Set HTTP-Only Cookie| Session([User Logged In]) 29 | end 30 | 31 | subgraph "Upload" 32 | Session -->|POST /upload| CheckCookie{Cookie Valid?} 33 | 34 | CheckCookie --No--> Redirect[/Redirect to Home/] 35 | CheckCookie --Yes--> CheckFile{File Attached?} 36 | 37 | CheckFile --No--> Err400[400: Missing File] 38 | CheckFile --Yes--> ExtAPI[POST startUpload] 39 | 40 | ExtAPI --Error--> Err500[500: Server Error] 41 | ExtAPI --Success--> UploadBin[POST Image File to Google] 42 | 43 | UploadBin --> MetaCheck{Metadata in Body?} 44 | end 45 | 46 | subgraph "Finalize" 47 | MetaCheck --Yes--> WithMeta[Add Metadata] 48 | MetaCheck --No--> NoMeta[Use Default Meta] 49 | 50 | WithMeta & NoMeta --> Publish[POST photo endpoint] 51 | 52 | Publish --> Extract[Extract ShareLink] 53 | Extract --> DBCheck{Save to DB?} 54 | 55 | DBCheck --Yes--> DB[(SQLite DB)] 56 | DB --> Final([200 OK + ShareLink]) 57 | DBCheck --No--> Final 58 | end 59 | ``` 60 | ## Quick start 61 | 62 | In order to get the Google api keys required for the oauth follow these steps: 63 | 64 | ### Client ID 65 | 66 | 1. Create a new project at https://console.cloud.google.com/ 67 | 68 | 2. Head over to the API library and enable 69 | the Street View Publish 70 | API 71 | 72 | 3. Select 'Create Credentials', select 'User Data', enter any app name/email. 73 | 74 | 4. Enable the 'Street View Publish API' scope. You won't need any sensitive scopes. 75 | 76 | 5. Select 'Web application' for type, and name it anything. 77 | 78 | 6. Add http://localhost:7000 to authorized javascript origins. (If you are running on another domain/port, replace 79 | localhost) 80 | 81 | 7. Add http://localhost:7000/auth/ to authorized redirect URIs (If you are running on another domain/port, replace 82 | localhost) 83 | 84 | 8. You should now copy the Client ID into the config.json file. 85 | 86 | ### Client Secret 87 | 88 | Head to the main credentials screen and click the pencil. (Edit OAuth Client) You will be able to find the Client Secret 89 | and copy that to your config.json. 90 | 91 | ### Consent Screen 92 | 93 | 1. Select 'OAuth consent screen', use any name/email 94 | 95 | 2. Make sure the authorized domain and email is correct, then select 'Save and Continue'. 96 | 97 | 3. Make sure the Street View Publish API scope is enabled, if not, add it! 98 | 99 | 4. For test users, add the email address of the account where you want to upload 360 photos. 100 | 101 | 5. **Make sure to also copy the client ID into index.html**, after '&client_id=' and before '&scope', if needed, change 102 | the port and domain here as well. 103 | 104 | ### Config File 105 | 106 | There are many options in the config file that might confuse you, so here's a simple guide (I think?) to help you get 107 | through it. 108 | 109 | | **Keys** | **Default values** | **Usage** | 110 | | ---------------- | -------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | 111 | | `https` | `false` (boolean) | This is an option whether if you want to enable https or not, this uses boolean values. `false` = http:// and `true` = https:// | 112 | | `host` | `localhost` (string) | Your host or domain, if you are hosting on a local machine, set this to `localhost`, if you are hosting this publicly, set it to your domain. | 113 | | `port` | `7000` (integer) or `null` | Your port, if are running this as a public instance, set this to `null` | 114 | | `openWebBrowser` | `true` (boolean) | This option will open a browser window to PhotoSphereStudio's running instance, set this to `false` if you are running this on a server, | 115 | | `clientId` | string | Paste your Google OAuth Client ID here, check the previous steps on how to get it. | 116 | | `clientSecret` | string | Paste your Google OAuth Client Secret ID here, check the previous steps on how to get it. | 117 | 118 | **INFO: Your authorized JavaScript origins and authorized redirect URIs should be the same as the one you have set in 119 | your config file.** 120 | 121 | **Scenario 1 - Public Instance** 122 | 123 | This example is for those who are hosting a public instance, your https, host and port would look something like this. 124 | Change `maps.moomoo.me` to your domain. 125 | 126 | You must use a nginx reverse proxy pointing to localhost:7000 for this to work. 127 | 128 | ``` 129 | { 130 | "https": true, 131 | "host": "maps.moomoo.me", 132 | "port": 7000 133 | } 134 | ``` 135 | 136 | Your **authorized JavaScript origin** would be: `https://maps.moomoo.me` 137 | 138 | Your **authorized redirect URIs** would be: `https://maps.moomoo.me/auth/` (don't forget the slash after `auth`) 139 | 140 | **Scenario 2 - Private Instance** 141 | 142 | This example is for those who are running PhotoSphereStudio on a local machine, your https, host and port would look 143 | something like this. 144 | 145 | ``` 146 | { 147 | "https": false, 148 | "host": "localhost", 149 | "port" 7000 150 | } 151 | ``` 152 | 153 | Your **authorized JavaScript origin** would be: `http://localhost:7000` 154 | 155 | Your **authorized redirect URIs** would be: `http://localhost:7000/auth/` (don't forget the slash after `auth`) 156 | 157 | ## Installation 158 | 159 | 1. Clone the repository 160 | 161 | ```bash 162 | git clone https://github.com/moom0o/PhotoSphereStudio.git 163 | ``` 164 | 165 | 2. Install the dependencies 166 | 167 | ```bash 168 | npm install 169 | ``` 170 | 171 | 3. Update the `config.json` file in the root directory of the project and fill it with the required information (clientId, clientSecret, etc.) 172 | 173 | 4. Start the server 174 | 175 | ```bash 176 | node index.js 177 | ``` 178 | 179 | ## Credits 180 | * **Backend & Architecture:** [moom0o](https://github.com/moom0o) - *OAuth flow, API Design, Database, Google Cloud API integration. Client-Side interactions.* 181 | * **UI/UX:** [Win](https://github.com/WinsDominoes) - *Visual design, CSS* 182 | 183 | ## Support 184 | If you have any questions about how to set this up or about the source code, feel free to create a issue or pull request. 185 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | const config = require('./config.json') 2 | 3 | const host = config.host; 4 | const port = config.port; 5 | const openWebBrowser = config.openWebBrowser; // Set to false if running as a server 6 | 7 | const sqlite3 = require('sqlite3'); 8 | const db = new sqlite3.Database('published.db'); 9 | db.run("CREATE TABLE IF NOT EXISTS points (url TEXT, lat LONG, long LONG, UNIQUE(url))"); 10 | // Prevent corruption 11 | db.run('PRAGMA synchronous=FULL') 12 | db.run('PRAGMA count_changes=OFF') 13 | db.run('PRAGMA journal_mode=DELETE') 14 | db.run('PRAGMA temp_store=DEFAULT') 15 | 16 | let full_url = ""; 17 | let protocol = ""; 18 | if (config.https) { 19 | protocol = "https://" 20 | } else { 21 | protocol = "http://" 22 | } 23 | 24 | if (port && !config.https) { 25 | full_url = protocol + host + ":" + port 26 | } else { 27 | full_url = protocol + host 28 | } 29 | 30 | 31 | console.log("Server running on: " + full_url); 32 | 33 | // Doesn't matter what Google account holds these keys. 34 | const clientId = config.clientId // Client ID from Google API page 35 | const clientSecret = config.clientSecret // Client Secret from Google API page 36 | 37 | // Part 1: Open web browser to login to Google account and receive access token 38 | const open = require('open'); 39 | if (openWebBrowser) { 40 | (async () => { 41 | await open(full_url); 42 | })(); 43 | } 44 | 45 | const favicon = require('serve-favicon'); 46 | const express = require('express') 47 | const bodyParser = require('body-parser'); 48 | const cookieParser = require('cookie-parser') 49 | const upload = require("express-fileupload"); 50 | const request = require("request"); 51 | const app = express() 52 | app.use(bodyParser.urlencoded({extended: true})); 53 | app.use(cookieParser()); 54 | app.use( 55 | upload({ 56 | preserveExtension: true, 57 | safeFileNames: true, 58 | limits: {fileSize: 75 * 1024 * 1024}, 59 | }) 60 | ); 61 | // CSS and JS Files 62 | app.use(express.static(__dirname + '/public')); 63 | 64 | app.set('view engine', 'ejs'); 65 | 66 | app.use(favicon(__dirname + '/public/assets/icons/favicon.ico')); 67 | 68 | app.get('/', function (req, res) { 69 | res.render('pages/index', { 70 | full_url: full_url, 71 | clientId: clientId, 72 | domain: config.host 73 | }); 74 | }) 75 | 76 | app.get('/upload', function (req, res) { 77 | res.render('pages/upload'); 78 | }) 79 | 80 | app.get(`/donate`, function (req, res) { 81 | res.render('pages/donate'); 82 | }) 83 | 84 | app.get(`/privacy`, function (req, res) { 85 | res.render('pages/privacy'); 86 | }) 87 | 88 | app.get(`/tos`, function (req, res) { 89 | res.render('pages/tos'); 90 | }) 91 | 92 | app.post('/upload', function (req, res) { 93 | 94 | let latitude = req.body["lat"]; 95 | let longitude = req.body["long"]; 96 | let heading = req.body["head"]; 97 | let placespot = req.body["place"]; 98 | let publish = req.body["publish"] 99 | 100 | let key = req.cookies["oauth"] 101 | if (!key) { 102 | return res.redirect('/') 103 | } else { 104 | if (!req.files) { 105 | return res.status(400).render('pages/error', { 106 | errorCode: 400, 107 | errorStatus: "Missing File", 108 | errorMessage: "Missing File", 109 | response: "Error: Missing File" 110 | }) 111 | 112 | } else { 113 | // Part 1: Get uploadUrl 114 | const options = { 115 | 'method': 'POST', 116 | 'url': `https://streetviewpublish.googleapis.com/v1/photo:startUpload`, 117 | 'headers': { 118 | 'Authorization': `Bearer ${key}` 119 | } 120 | // For authorization token, must use oauth 2.0 121 | }; 122 | request(options, function (error, response) { 123 | if (error) { 124 | console.log(error) 125 | res.status(500).render('pages/error', { 126 | errorCode: 500, 127 | errorStatus: "ERROR", 128 | errorMessage: "Error: Error with getting upload url", 129 | response: JSON.stringify(JSON.parse(response.body), null, 4) 130 | }) 131 | } else { 132 | let uploadUrl = JSON.parse(response.body)["uploadUrl"] 133 | // PART 2: Upload the image! 134 | const options = { 135 | 'method': 'POST', 136 | 'url': uploadUrl, 137 | 'headers': { 138 | 'Authorization': `Bearer ${key}`, 139 | }, 140 | body: req.files.file.data 141 | }; 142 | request(options, function (error) { 143 | if (error) { 144 | console.log(error) 145 | 146 | res.status(500).render('pages/error', { 147 | errorCode: 500, 148 | errorStatus: "UPLOAD ERROR", 149 | errorMessage: "Error: Error with uploading file to Google's API", 150 | response: error 151 | }) 152 | 153 | } else { 154 | //PART 3: Set metadata! 155 | let body; 156 | if (req.body["lat"] && req.body["long"]) { 157 | if(placespot && placespot.length > 0){ 158 | body = JSON.stringify({ 159 | "uploadReference": { 160 | "uploadUrl": uploadUrl 161 | }, 162 | "pose": { 163 | "latLngPair": { 164 | "latitude": latitude, 165 | "longitude": longitude 166 | }, 167 | "heading": heading 168 | }, 169 | "places": { 170 | "placeId": placespot 171 | } 172 | }) 173 | } else { 174 | body = JSON.stringify({ 175 | "uploadReference": { 176 | "uploadUrl": uploadUrl 177 | }, 178 | "pose": { 179 | "latLngPair": { 180 | "latitude": latitude, 181 | "longitude": longitude 182 | }, 183 | "heading": heading 184 | } 185 | }) 186 | } 187 | 188 | } else { 189 | body = JSON.stringify({ 190 | "uploadReference": { 191 | "uploadUrl": uploadUrl 192 | }, 193 | }) 194 | } 195 | 196 | const options = { 197 | 'method': 'POST', 198 | 'url': `https://streetviewpublish.googleapis.com/v1/photo`, 199 | 'headers': { 200 | 'Authorization': `Bearer ${key}`, 201 | 'Content-Type': 'application/json' 202 | }, 203 | body: body 204 | }; 205 | request(options, function (error, response) { 206 | if (error) { 207 | console.log(error) 208 | 209 | res.status(500).render('pages/error', { 210 | errorCode: 500, 211 | errorStatus: "ERROR", 212 | errorMessage: "Error with setting metadata of file", 213 | response: "Error: Error with setting metadata of file" 214 | }) 215 | 216 | } else { 217 | if (JSON.parse(response.body)["error"]) { 218 | res.status(500).render('pages/error', { 219 | errorCode: JSON.parse(response.body)["error"]["code"], 220 | errorStatus: JSON.parse(response.body)["error"]["status"], 221 | errorMessage: JSON.parse(response.body)["error"]["message"], 222 | response: JSON.stringify(JSON.parse(response.body), null, 4), 223 | }); 224 | } else { 225 | let shareLink = JSON.parse(response.body)["shareLink"] 226 | if(publish){ 227 | write(shareLink, latitude, longitude, req.files.file.data) 228 | } 229 | res.status(200).render('pages/success', { 230 | status: JSON.parse(response.body)["mapsPublishStatus"], 231 | shareLink: shareLink, 232 | response: JSON.stringify(JSON.parse(response.body), null, 4) 233 | }); 234 | } 235 | } 236 | }); 237 | } 238 | }); 239 | } 240 | }); 241 | } 242 | } 243 | }) 244 | // We contact Google to get a temporary token that only has permission to upload PhotoSpheres. 245 | app.get('/auth', function (req, res) { 246 | const request = require('request'); 247 | const options = { 248 | 'method': 'POST', 249 | 'url': `https://www.googleapis.com/oauth2/v4/token?client_id=${clientId}&client_secret=${clientSecret}&grant_type=authorization_code&code=${req.query["code"]}&redirect_uri=${full_url}/auth/&scope=https://www.googleapis.com/auth/streetviewpublish`, 250 | 'headers': {} 251 | }; 252 | request(options, function (error, response) { 253 | if (error) console.log(error) && res.send("Error: Check console"); 254 | let body = JSON.parse(response.body) 255 | if (body["error"] || !body["access_token"]) { 256 | res.redirect('/') 257 | } else { 258 | res.cookie('oauth', JSON.parse(response.body)["access_token"], { 259 | maxAge: JSON.parse(response.body)["expires_in"] * 1000, 260 | httpOnly: true 261 | }); 262 | res.render('pages/upload') 263 | } 264 | }); 265 | 266 | }) 267 | 268 | app.get('/list', function (req,res){ 269 | read(function (data) { 270 | res.send(data); 271 | }); 272 | 273 | }) 274 | const fs = require('fs'); 275 | function write(url, lat, long, file) { 276 | if (url && url !== "undefined") { 277 | db.serialize(function () { 278 | let stmt = db.prepare(`INSERT OR IGNORE INTO points (url, lat, long, time) VALUES (?,?,?, ?)`); 279 | stmt.run(url, lat, long, new Date().getTime()); 280 | stmt.finalize(); 281 | db.get(`SELECT seq FROM sqlite_sequence WHERE name="points";`, function (err, result) { 282 | fs.promises.writeFile(`./backup/${Number(result["seq"])}.jpeg`, file); 283 | }) 284 | }); 285 | } 286 | } 287 | 288 | function read(callback) { 289 | db.all(`SELECT * FROM points;`, function (err, data) { 290 | if (err) { 291 | console.log(err) 292 | } else { 293 | callback(data) 294 | } 295 | }) 296 | } 297 | app.listen(port) 298 | -------------------------------------------------------------------------------- /public/assets/material/material.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Daemonite Material v4.1.1 (http://daemonite.github.io/material/) 3 | * Copyright 2011-2018 Daemon Pty Ltd 4 | * Licensed under MIT (https://github.com/Daemonite/material/blob/master/LICENSE) 5 | */ 6 | !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("jquery")):"function"==typeof define&&define.amd?define(["exports","jquery"],t):t(e.material={},e.jQuery)}(this,function(e,i){"use strict";i=i&&i.hasOwnProperty("default")?i.default:i;var n,t,o,r,a,s,c,l,d,u,h,f,p,m,g,y,v,b,_,k,S=(r="show-predecessor",a="hide"+(t=".bs.collapse"),s=(o="show")+t,c=".expansion-panel",l=".expansion-panel .collapse",void(n=i)(document).on(""+a,l,function(){var e=n(this).closest(c);e.removeClass(o);var t=e.prev(c);t.length&&t.removeClass(r)}).on(""+s,l,function(){var e=n(this).closest(c);e.addClass(o);var t=e.prev(c);t.length&&t.addClass(r)})),w=(h="."+(u="md.floatinglabel"),f="floatinglabel",p=(d=i).fn[f],m="is-focused",g="has-value",y="change"+h,v="focusin"+h,b="focusout"+h,_={DATA_PARENT:".floating-label",DATA_TOGGLE:".floating-label .custom-select, .floating-label .form-control"},k=function(){function i(e){this._element=e,this._parent=d(e).closest(_.DATA_PARENT)[0]}var e=i.prototype;return e.change=function(){d(this._element).val()||d(this._element).is("select")&&""!==d("option:first-child",d(this._element)).html().replace(" ","")?d(this._parent).addClass(g):d(this._parent).removeClass(g)},e.focusin=function(){d(this._parent).addClass(m)},e.focusout=function(){d(this._parent).removeClass(m)},i._jQueryInterface=function(n){return this.each(function(){var e=n||"change",t=d(this).data(u);if(t||(t=new i(this),d(this).data(u,t)),"string"==typeof e){if("undefined"==typeof t[e])throw new Error('No method named "'+e+'"');t[e]()}})},i}(),d(document).on(y+" "+v+" "+b,_.DATA_TOGGLE,function(e){k._jQueryInterface.call(d(this),e.type)}),d.fn[f]=k._jQueryInterface,d.fn[f].Constructor=k,d.fn[f].noConflict=function(){return d.fn[f]=p,k._jQueryInterface},k);function D(e,t){for(var n=0;n'),k(d.$root[0],"hidden",!0),d.$holder=m(u()).appendTo(d.$root),h(),c.formatSubmit&&function(){var e;!0===c.hiddenName?(e=i.name,i.name=""):e=(e=["string"==typeof c.hiddenPrefix?c.hiddenPrefix:"","string"==typeof c.hiddenSuffix?c.hiddenSuffix:"_submit"])[0]+i.name+e[1];d._hidden=m('")[0],l.on("change."+s.id,function(){d._hidden.value=i.value?d.get("select",c.formatSubmit):""})}(),function(){l.data(e,d).addClass(r.input).val(l.data("value")?d.get("select",c.format):i.value),c.editable||l.on("focus."+s.id+" click."+s.id,function(e){e.preventDefault(),d.open()}).on("keydown."+s.id,p);k(i,{haspopup:!0,expanded:!1,readonly:!1,owns:i.id+"_root"})}(),c.containerHidden?m(c.containerHidden).append(d._hidden):l.after(d._hidden),c.container?m(c.container).append(d.$root):l.after(d.$root),d.on({start:d.component.onStart,render:d.component.onRender,stop:d.component.onStop,open:d.component.onOpen,close:d.component.onClose,set:d.component.onSet}).on({start:c.onStart,render:c.onRender,stop:c.onStop,open:c.onOpen,close:c.onClose,set:c.onSet}),o=function(e){var t,n="position";e.currentStyle?t=e.currentStyle[n]:window.getComputedStyle&&(t=getComputedStyle(e)[n]);return"fixed"==t}(d.$holder[0]),i.autofocus&&d.open(),d.trigger("start").trigger("render"))},render:function(e){return e?(d.$holder=m(u()),h(),d.$root.html(d.$holder)):d.$root.find("."+r.box).html(d.component.nodes(s.open)),d.trigger("render")},stop:function(){return s.start&&(d.close(),d._hidden&&d._hidden.parentNode.removeChild(d._hidden),d.$root.remove(),l.removeClass(r.input).removeData(e),setTimeout(function(){l.off("."+s.id)},0),i.type=s.type,i.readOnly=!1,d.trigger("stop"),s.methods={},s.start=!1),d},open:function(e){return s.open?d:(l.addClass(r.active),k(i,"expanded",!0),setTimeout(function(){d.$root.addClass(r.opened),k(d.$root[0],"hidden",!1)},0),!1!==e&&(s.open=!0,o&&y.css("overflow","hidden").css("padding-right","+="+_()),o&&v?d.$holder.find("."+r.frame).one("transitionend",function(){d.$holder[0].focus()}):d.$holder[0].focus(),g.on("click."+s.id+" focusin."+s.id,function(e){var t=e.target;t!=i&&t!=document&&3!=e.which&&d.close(t===d.$holder[0])}).on("keydown."+s.id,function(e){var t=e.keyCode,n=d.component.key[t],i=e.target;27==t?d.close(!0):i!=d.$holder[0]||!n&&13!=t?m.contains(d.$root[0],i)&&13==t&&(e.preventDefault(),i.click()):(e.preventDefault(),n?b._.trigger(d.component.key.go,d,[b._.trigger(n)]):d.$root.find("."+r.highlighted).hasClass(r.disabled)||(d.set("select",d.component.item.highlight),c.closeOnSelect&&d.close(!0)))})),d.trigger("open"))},close:function(e){return e&&(c.editable?i.focus():(d.$holder.off("focus.toOpen").focus(),setTimeout(function(){d.$holder.on("focus.toOpen",f)},0))),l.removeClass(r.active),k(i,"expanded",!1),setTimeout(function(){d.$root.removeClass(r.opened+" "+r.focused),k(d.$root[0],"hidden",!0)},0),s.open?(s.open=!1,o&&y.css("overflow","").css("padding-right","-="+_()),g.off("."+s.id),d.trigger("close")):d},clear:function(e){return d.set("clear",null,e)},set:function(e,t,n){var i,o,r=m.isPlainObject(e),a=r?e:{};if(n=r&&m.isPlainObject(t)?t:n||{},e){for(i in r||(a[e]=t),a)o=a[i],i in d.component.item&&(void 0===o&&(o=null),d.component.set(i,o,n)),"select"!=i&&"clear"!=i||l.val("clear"==i?"":d.get(i,c.format)).trigger("change");d.render()}return n.muted?d:d.trigger("set",a)},get:function(e,t){if(null!=s[e=e||"value"])return s[e];if("valueSubmit"==e){if(d._hidden)return d._hidden.value;e="value"}if("value"==e)return i.value;if(e in d.component.item){if("string"==typeof t){var n=d.component.get(e);return n?b._.trigger(d.component.formats.toString,d.component,[t,n]):""}return d.component.get(e)}},on:function(e,t,n){var i,o,r=m.isPlainObject(e),a=r?e:{};if(e)for(i in r||(a[e]=t),a)o=a[i],n&&(i="_"+i),s.methods[i]=s.methods[i]||[],s.methods[i].push(o);return d},off:function(){var e,t,n=arguments;for(e=0,namesCount=n.length;e').appendTo("body"),t=e[0].offsetWidth;e.css("overflow","scroll");var n=m('
').appendTo(e)[0].offsetWidth;return e.remove(),t-n}function k(e,t,n){if(m.isPlainObject(t))for(var i in t)o(e,i,t[i]);else o(e,t,n)}function o(e,t,n){e.setAttribute(("role"==t?"":"aria-")+t,n)}function S(){try{return document.activeElement}catch(e){}}return b.klasses=function(e){return{picker:e=e||"picker",opened:e+"--opened",focused:e+"--focused",input:e+"__input",active:e+"__input--active",target:e+"__input--target",holder:e+"__holder",frame:e+"__frame",wrap:e+"__wrap",box:e+"__box"}},b._={group:function(e){for(var t,n="",i=b._.trigger(e.min,e);i<=b._.trigger(e.max,e,[i]);i+=e.i)t=b._.trigger(e.item,e,[i]),n+=b._.node(e.node,t[0],t[1],t[2]);return n},node:function(e,t,n,i){return t?"<"+e+(n=n?' class="'+n+'"':"")+(i=i?" "+i:"")+">"+(t=m.isArray(t)?t.join(""):t)+"":""},lead:function(e){return(e<10?"0":"")+e},trigger:function(e,t,n){return"function"==typeof e?e.apply(t,n||[]):e},digits:function(e){return/\d/.test(e[1])?2:1},isDate:function(e){return-1<{}.toString.call(e).indexOf("Date")&&this.isInteger(e.getDate())},isInteger:function(e){return-1<{}.toString.call(e).indexOf("Number")&&e%1==0},ariaAttr:function(e,t){m.isPlainObject(e)||(e={attribute:t});for(var n in t="",e){var i=("role"==n?"":"aria-")+n,o=e[n];t+=null==o?"":i+'="'+e[n]+'"'}return t}},b.extend=function(i,o){m.fn[i]=function(e,t){var n=this.data(i);return"picker"==e?n:n&&"string"==typeof e?b._.trigger(n[e],n,[t]):this.each(function(){m(this).data(i)||new b(this,i,o,e)})},m.fn[i].defaults=o.defaults},b},e.exports=n(i)}),be=Object.freeze({default:ve,__moduleExports:ve}),_e=be&&ve||be,ke=(H(function(e,t){ 13 | /*! 14 | * Date picker for pickadate.js v3.5.6 15 | * http://amsul.github.io/pickadate.js/date.htm 16 | */var n;n=function(e,p){var t,y=e._;function n(t,n){var e,i=this,o=t.$node[0],r=o.value,a=t.$node.data("value"),s=a||r,c=a?n.formatSubmit:n.format,l=function(){return o.currentStyle?"rtl"==o.currentStyle.direction:"rtl"==getComputedStyle(t.$root[0]).direction};i.settings=n,i.$node=t.$node,i.queue={min:"measure create",max:"measure create",now:"now create",select:"parse create validate",highlight:"parse navigate create validate",view:"parse create validate viewset",disable:"deactivate",enable:"activate"},i.item={},i.item.clear=null,i.item.disable=(n.disable||[]).slice(0),i.item.enable=-(!0===(e=i.item.disable)[0]?e.shift():-1),i.set("min",n.min).set("max",n.max).set("now"),s?i.set("select",s,{format:c,defaultValue:!0}):i.set("select",null).set("highlight",i.item.now),i.key={40:7,38:-7,39:function(){return l()?-1:1},37:function(){return l()?1:-1},go:function(e){var t=i.item.highlight,n=new Date(t.year,t.month,t.date+e);i.set("highlight",n,{interval:e}),this.render()}},t.on("render",function(){t.$root.find("."+n.klass.selectMonth).on("change",function(){var e=this.value;e&&(t.set("highlight",[t.get("view").year,e,t.get("highlight").date]),t.$root.find("."+n.klass.selectMonth).trigger("focus"))}),t.$root.find("."+n.klass.selectYear).on("change",function(){var e=this.value;e&&(t.set("highlight",[e,t.get("view").month,t.get("highlight").date]),t.$root.find("."+n.klass.selectYear).trigger("focus"))})},1).on("open",function(){var e="";i.disabled(i.get("now"))&&(e=":not(."+n.klass.buttonToday+")"),t.$root.find("button"+e+", select").attr("disabled",!1)},1).on("close",function(){t.$root.find("button, select").attr("disabled",!0)},1)}n.prototype.set=function(t,n,i){var o=this,e=o.item;return null===n?("clear"==t&&(t="select"),e[t]=n):(e["enable"==t?"disable":"flip"==t?"enable":t]=o.queue[t].split(" ").map(function(e){return n=o[e](t,n,i)}).pop(),"select"==t?o.set("highlight",e.select,i):"highlight"==t?o.set("view",e.highlight,i):t.match(/^(flip|min|max|disable|enable)$/)&&(e.select&&o.disabled(e.select)&&o.set("select",e.select,i),e.highlight&&o.disabled(e.highlight)&&o.set("highlight",e.highlight,i))),o},n.prototype.get=function(e){return this.item[e]},n.prototype.create=function(e,t,n){var i;return(t=void 0===t?e:t)==-1/0||t==1/0?i=t:p.isPlainObject(t)&&y.isInteger(t.pick)?t=t.obj:p.isArray(t)?(t=new Date(t[0],t[1],t[2]),t=y.isDate(t)?t:this.create().obj):t=y.isInteger(t)||y.isDate(t)?this.normalize(new Date(t),n):this.now(e,t,n),{year:i||t.getFullYear(),month:i||t.getMonth(),date:i||t.getDate(),day:i||t.getDay(),obj:i||t,pick:i||t.getTime()}},n.prototype.createRange=function(e,t){var n=this,i=function(e){return!0===e||p.isArray(e)||y.isDate(e)?n.create(e):e};return y.isInteger(e)||(e=i(e)),y.isInteger(t)||(t=i(t)),y.isInteger(e)&&p.isPlainObject(t)?e=[t.year,t.month,t.date+e]:y.isInteger(t)&&p.isPlainObject(e)&&(t=[e.year,e.month,e.date+t]),{from:i(e),to:i(t)}},n.prototype.withinRange=function(e,t){return e=this.createRange(e.from,e.to),t.pick>=e.from.pick&&t.pick<=e.to.pick},n.prototype.overlapRanges=function(e,t){var n=this;return e=n.createRange(e.from,e.to),t=n.createRange(t.from,t.to),n.withinRange(e,t.from)||n.withinRange(e,t.to)||n.withinRange(t,e.from)||n.withinRange(t,e.to)},n.prototype.now=function(e,t,n){return t=new Date,n&&n.rel&&t.setDate(t.getDate()+n.rel),this.normalize(t,n)},n.prototype.navigate=function(e,t,n){var i,o,r,a,s=p.isArray(t),c=p.isPlainObject(t),l=this.item.view;if(s||c){for(c?(o=t.year,r=t.month,a=t.date):(o=+t[0],r=+t[1],a=+t[2]),n&&n.nav&&l&&l.month!==r&&(o=l.year,r=l.month),o=(i=new Date(o,r+(n&&n.nav?n.nav:0),1)).getFullYear(),r=i.getMonth();new Date(o,r,a).getMonth()!==r;)a-=1;t=[o,r,a]}return t},n.prototype.normalize=function(e){return e.setHours(0,0,0,0),e},n.prototype.measure=function(e,t){return t?"string"==typeof t?t=this.parse(e,t):y.isInteger(t)&&(t=this.now(e,t,{rel:t})):t="min"==e?-1/0:1/0,t},n.prototype.viewset=function(e,t){return this.create([t.year,t.month,1])},n.prototype.validate=function(e,n,t){var i,o,r,a,s=this,c=n,l=t&&t.interval?t.interval:1,d=-1===s.item.enable,u=s.item.min,h=s.item.max,f=d&&s.item.disable.filter(function(e){if(p.isArray(e)){var t=s.create(e).pick;tn.pick&&(o=!0)}return y.isInteger(e)}).length;if((!t||!t.nav&&!t.defaultValue)&&(!d&&s.disabled(n)||d&&s.disabled(n)&&(f||i||o)||!d&&(n.pick<=u.pick||n.pick>=h.pick)))for(d&&!f&&(!o&&0c.month)&&(n=c,l=0=h.pick&&(a=!0,l=-1,n=s.create([h.year,h.month,h.date+(n.pick===h.pick?0:1)])),!r||!a);)n=s.create([n.year,n.month,n.date+l]);return n},n.prototype.disabled=function(t){var n=this,e=n.item.disable.filter(function(e){return y.isInteger(e)?t.day===(n.settings.firstDay?e:e-1)%7:p.isArray(e)||y.isDate(e)?t.pick===n.create(e).pick:p.isPlainObject(e)?n.withinRange(e,t):void 0});return e=e.length&&!e.filter(function(e){return p.isArray(e)&&"inverted"==e[3]||p.isPlainObject(e)&&e.inverted}).length,-1===n.item.enable?!e:e||t.pickn.item.max.pick},n.prototype.parse=function(e,i,t){var o=this,r={};return i&&"string"==typeof i?(t&&t.format||((t=t||{}).format=o.settings.format),o.formats.toArray(t.format).map(function(e){var t=o.formats[e],n=t?y.trigger(t,o,[i,r]):e.replace(/^!/,"").length;t&&(r[e]=i.substr(0,n)),i=i.substr(n)}),[r.yyyy||r.yy,+(r.mm||r.m)-1,r.dd||r.d]):i},n.prototype.formats=function(){function i(e,t,n){var i=e.match(/[^\x00-\x7F]+|\w+/)[0];return n.mm||n.m||(n.m=t.indexOf(i)+1),i.length}function n(e){return e.match(/\w+/)[0].length}return{d:function(e,t){return e?y.digits(e):t.date},dd:function(e,t){return e?2:y.lead(t.date)},ddd:function(e,t){return e?n(e):this.settings.weekdaysShort[t.day]},dddd:function(e,t){return e?n(e):this.settings.weekdaysFull[t.day]},m:function(e,t){return e?y.digits(e):t.month+1},mm:function(e,t){return e?2:y.lead(t.month+1)},mmm:function(e,t){var n=this.settings.monthsShort;return e?i(e,n,t):n[t.month]},mmmm:function(e,t){var n=this.settings.monthsFull;return e?i(e,n,t):n[t.month]},yy:function(e,t){return e?2:(""+t.year).slice(2)},yyyy:function(e,t){return e?4:t.year},toArray:function(e){return e.split(/(d{1,4}|m{1,4}|y{4}|yy|!.)/g)},toString:function(e,t){var n=this;return n.formats.toArray(e).map(function(e){return y.trigger(n.formats[e],n,[0,t])||e.replace(/^!/,"")}).join("")}}}(),n.prototype.isDateExact=function(e,t){return y.isInteger(e)&&y.isInteger(t)||"boolean"==typeof e&&"boolean"==typeof t?e===t:(y.isDate(e)||p.isArray(e))&&(y.isDate(t)||p.isArray(t))?this.create(e).pick===this.create(t).pick:!(!p.isPlainObject(e)||!p.isPlainObject(t))&&(this.isDateExact(e.from,t.from)&&this.isDateExact(e.to,t.to))},n.prototype.isDateOverlap=function(e,t){var n=this.settings.firstDay?1:0;return y.isInteger(e)&&(y.isDate(t)||p.isArray(t))?(e=e%7+n)===this.create(t).day+1:y.isInteger(t)&&(y.isDate(e)||p.isArray(e))?(t=t%7+n)===this.create(e).day+1:!(!p.isPlainObject(e)||!p.isPlainObject(t))&&this.overlapRanges(e,t)},n.prototype.flipEnable=function(e){var t=this.item;t.enable=e||(-1==t.enable?1:-1)},n.prototype.deactivate=function(e,t){var i=this,o=i.item.disable.slice(0);return"flip"==t?i.flipEnable():!1===t?(i.flipEnable(1),o=[]):!0===t?(i.flipEnable(-1),o=[]):t.map(function(e){for(var t,n=0;n=m.year&&h.month>=m.month||!e&&h.year<=p.year&&h.month<=p.month?" "+d.klass.navDisabled:""),"data-nav="+(e||-1)+" "+y.ariaAttr({role:"button",controls:l.$node[0].id+"_table"})+' title="'+(e?d.labelMonthNext:d.labelMonthPrev)+'"')},r=function(){var t=d.showMonthsShort?d.monthsShort:d.monthsFull;return d.selectMonths?y.node("select",y.group({min:0,max:11,i:1,node:"option",item:function(e){return[t[e],0,"value="+e+(h.month==e?" selected":"")+(h.year==p.year&&em.month?" disabled":"")]}}),d.klass.selectMonth,(c?"":"disabled")+" "+y.ariaAttr({controls:l.$node[0].id+"_table"})+' title="'+d.labelMonthSelect+'"'):y.node("div",t[h.month],d.klass.month)},g=function(){var t=h.year,e=!0===d.selectYears?5:~~(d.selectYears/2);if(e){var n=p.year,i=m.year,o=t-e,r=t+e;if(om.pick,r=y.trigger(l.formats.toString,l,[d.format,e]);return[y.node("div",e.date,(t=[d.klass.day],t.push(h.month==e.month?d.klass.infocus:d.klass.outfocus),a.pick==e.pick&&t.push(d.klass.now),n&&t.push(d.klass.selected),i&&t.push(d.klass.highlighted),o&&t.push(d.klass.disabled),t.join(" ")),"data-pick="+e.pick+" "+y.ariaAttr({role:"gridcell",label:r,selected:!(!n||l.$node.val()!==r)||null,activedescendant:!!i||null,disabled:!!o||null})),"",y.ariaAttr({role:"presentation"})]}})]}})),d.klass.table,'id="'+l.$node[0].id+'_table" '+y.ariaAttr({role:"grid",controls:l.$node[0].id,readonly:!0}))+y.node("div",y.node("button",d.today,d.klass.buttonToday,"type=button data-pick="+a.pick+(c&&!l.disabled(a)?"":" disabled")+" "+y.ariaAttr({controls:l.$node[0].id}))+y.node("button",d.clear,d.klass.buttonClear,"type=button data-clear=1"+(c?"":" disabled")+" "+y.ariaAttr({controls:l.$node[0].id}))+y.node("button",d.close,d.klass.buttonClose,"type=button data-close=true "+(c?"":" disabled")+" "+y.ariaAttr({controls:l.$node[0].id})),d.klass.footer)},n.defaults={labelMonthNext:"Next month",labelMonthPrev:"Previous month",labelMonthSelect:"Select a month",labelYearSelect:"Select a year",monthsFull:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],weekdaysFull:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],today:"Today",clear:"Clear",close:"Close",closeOnSelect:!0,closeOnClear:!0,format:"d mmmm, yyyy",klass:{table:(t=e.klasses().picker+"__")+"table",header:t+"header",navPrev:t+"nav--prev",navNext:t+"nav--next",navDisabled:t+"nav--disabled",month:t+"month",year:t+"year",selectMonth:t+"select--month",selectYear:t+"select--year",weekdays:t+"weekday",day:t+"day",disabled:t+"day--disabled",selected:t+"day--selected",highlighted:t+"day--highlighted",now:t+"day--today",infocus:t+"day--infocus",outfocus:t+"day--outfocus",footer:t+"footer",buttonClear:t+"button--clear",buttonToday:t+"button--today",buttonClose:t+"button--close"}},e.extend("pickadate",n)},e.exports=n(_e,i)}),B="md.pickdate",Q="pickdate",L=(U=i).fn[Q],J={cancel:"Cancel",closeOnCancel:!0,closeOnSelect:!1,container:"",containerHidden:"",disable:[],firstDay:0,format:"d/m/yyyy",formatSubmit:"",hiddenName:!1,hiddenPrefix:"",hiddenSuffix:"",klass:{buttonClear:"btn btn-outline-primary picker-button-clear",buttonClose:"btn btn-outline-primary picker-button-close",buttonToday:"btn btn-outline-primary picker-button-today",day:"picker-day",disabled:"picker-day-disabled",highlighted:"picker-day-highlighted",infocus:"picker-day-infocus",now:"picker-day-today",outfocus:"picker-day-outfocus",selected:"picker-day-selected",weekdays:"picker-weekday",box:"picker-box",footer:"picker-footer",frame:"picker-frame",header:"picker-header",holder:"picker-holder",table:"picker-table",wrap:"picker-wrap",active:"picker-input-active",input:"picker-input",month:"picker-month",navDisabled:"picker-nav-disabled",navNext:"material-icons picker-nav-next",navPrev:"material-icons picker-nav-prev",selectMonth:"picker-select-month",selectYear:"picker-select-year",year:"picker-year",focused:"picker-focused",opened:"picker-opened",picker:"picker"},labelMonthNext:"Next month",labelMonthPrev:"Previous month",labelMonthSelect:"Select a month",labelYearSelect:"Select a year",max:!1,min:!1,monthsFull:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],ok:"OK",onClose:function(){},onOpen:function(){},onRender:function(){},onSet:function(){},onStart:function(){},onStop:function(){},selectMonths:!1,selectYears:!1,today:"",weekdaysFull:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],weekdaysShort:["S","M","T","W","T","F","S"]},K={cancel:"string",closeOnCancel:"boolean",closeOnSelect:"boolean",container:"string",containerHidden:"string",disable:"array",firstDay:"number",format:"string",formatSubmit:"string",hiddenName:"boolean",hiddenPrefix:"string",hiddenSuffix:"string",klass:"object",labelMonthNext:"string",labelMonthPrev:"string",labelMonthSelect:"string",labelYearSelect:"string",max:"boolean || date",min:"boolean || date",monthsFull:"array",monthsShort:"array",ok:"string",onClose:"function",onOpen:"function",onRender:"function",onSet:"function",onStart:"function",onStop:"function",selectMonths:"boolean",selectYears:"boolean || number",today:"string",weekdaysFull:"array",weekdaysShort:"array"},G=function(){function i(e,t){this._config=this._getConfig(t),this._element=e}var e=i.prototype;return e.display=function(e,t,n){U(".picker-date-display",t).remove(),U(".picker-wrap",t).prepend('
'+e.get(n,"yyyy")+'
'+e.get(n,"dddd")+''+e.get(n,"d")+''+e.get(n,"mmm")+"
")},e.show=function(){var e=this;U(this._element).pickadate({clear:this._config.cancel,close:this._config.ok,closeOnClear:this._config.closeOnCancel,closeOnSelect:this._config.closeOnSelect,container:this._config.container,containerHidden:this._config.containerHidden,disable:this._config.disable,firstDay:this._config.firstDay,format:this._config.format,formatSubmit:this._config.formatSubmit,klass:this._config.klass,hiddenName:this._config.hiddenName,hiddenPrefix:this._config.hiddenPrefix,hiddenSuffix:this._config.hiddenSuffix,labelMonthNext:this._config.labelMonthNext,labelMonthPrev:this._config.labelMonthPrev,labelMonthSelect:this._config.labelMonthSelect,labelYearSelect:this._config.labelYearSelect,max:this._config.max,min:this._config.min,monthsFull:this._config.monthsFull,monthsShort:this._config.monthsShort,onClose:this._config.onClose,onOpen:this._config.onOpen,onRender:this._config.onRender,onSet:this._config.onSet,onStart:this._config.onStart,onStop:this._config.onStop,selectMonths:this._config.selectMonths,selectYears:this._config.selectYears,today:this._config.today,weekdaysFull:this._config.weekdaysFull,weekdaysShort:this._config.weekdaysShort});var t=U(this._element).pickadate("picker"),n=t.$root;t.on({close:function(){U(document.activeElement).blur()},open:function(){U(".picker__date-display",n).length||e.display(t,n,"highlight")},set:function(){null!==t.get("select")&&e.display(t,n,"select")}})},e._getConfig=function(e){return e=C({},J,e),W.typeCheckConfig(Q,e,K),e},i._jQueryInterface=function(n){return this.each(function(){var e=C({},J,U(this).data(),"object"==typeof n&&n?n:{}),t=U(this).data(B);t||(t=new i(this,e),U(this).data(B,t)),t.show()})},i}(),U.fn[Q]=G._jQueryInterface,U.fn[Q].Constructor=G,void(U.fn[Q].noConflict=function(){return U.fn[Q]=L,G._jQueryInterface})),Se=(X={IS_MOUSEDOWN:!(V="focus")},Z="blur"+(z=".md.selectioncontrolfocus"),ee="focus"+z,te="mousedown"+z,ne="mouseup"+z,ie=".custom-control",oe=".custom-control-input",void(q=i)(document).on(""+Z,oe,function(){q(this).removeClass(V)}).on(""+ee,oe,function(){!1===X.IS_MOUSEDOWN&&q(this).addClass(V)}).on(""+te,ie,function(){X.IS_MOUSEDOWN=!0}).on(""+ne,ie,function(){setTimeout(function(){X.IS_MOUSEDOWN=!1},1)})),we=(ae="md.tabswitch",se="tabswitch",ce=(re=i).fn[se],le="animate",de="dropdown-item",ue="nav-tabs-indicator",he="nav-tabs-material",fe="show",pe='.nav-tabs [data-toggle="tab"]',me=".dropdown",ge=".nav-tabs",ye=function(){function i(e){this._nav=e,this._navindicator=null}var e=i.prototype;return e.switch=function(e,t){var n=this,i=re(this._nav).offset().left,o=re(this._nav).scrollLeft(),r=re(this._nav).outerWidth();this._navindicator||this._createIndicator(i,o,r,t),re(e).hasClass(de)&&(e=re(e).closest(me));var a=re(e).offset().left,s=re(e).outerWidth();re(this._navindicator).addClass(fe),W.reflow(this._navindicator),re(this._nav).addClass(le),re(this._navindicator).css({left:a+o-i,right:r-(a+o-i+s)});var c=W.getTransitionDurationFromElement(this._navindicator);re(this._navindicator).one(W.TRANSITION_END,function(){re(n._nav).removeClass(le),re(n._navindicator).removeClass(fe)}).emulateTransitionEnd(c)},e._createIndicator=function(e,t,n,i){if(this._navindicator=document.createElement("div"),re(this._navindicator).addClass(ue).appendTo(this._nav),"undefined"!=typeof i){re(i).hasClass(de)&&(i=re(i).closest(me));var o=re(i).offset().left,r=re(i).outerWidth();re(this._navindicator).css({left:o+t-e,right:n-(o+t-e+r)})}re(this._nav).addClass(he)},i._jQueryInterface=function(n){return this.each(function(){var e=re(this).closest(ge)[0];if(e){var t=re(e).data(ae);t||(t=new i(e),re(e).data(ae,t)),t.switch(this,n)}})},i}(),re(document).on("show.bs.tab",pe,function(e){ye._jQueryInterface.call(re(this),e.relatedTarget)}),re.fn[se]=ye._jQueryInterface,re.fn[se].Constructor=ye,re.fn[se].noConflict=function(){return re.fn[se]=ce,ye._jQueryInterface},ye);e.Util=W,e.ExpansionPanel=S,e.FloatingLabel=w,e.NavDrawer=Y,e.PickDate=ke,e.SelectionControlFocus=Se,e.TabSwitch=we,Object.defineProperty(e,"__esModule",{value:!0})}); 17 | //# sourceMappingURL=material.min.js.map -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | --------------------------------------------------------------------------------