diff --git a/public/assets/js/links.js b/public/assets/js/links.js index 891a21af..3898da7e 100644 --- a/public/assets/js/links.js +++ b/public/assets/js/links.js @@ -63,12 +63,12 @@ /******/ __webpack_require__.p = ""; /******/ /******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 18); +/******/ return __webpack_require__(__webpack_require__.s = 12); /******/ }) /************************************************************************/ /******/ ({ -/***/ 18: +/***/ 12: /***/ (function(module, exports, __webpack_require__) { "use strict"; diff --git a/public/assets/js/links.js.br b/public/assets/js/links.js.br index b9b0c22c..7406eab6 100644 Binary files a/public/assets/js/links.js.br and b/public/assets/js/links.js.br differ diff --git a/public/assets/js/links.js.gz b/public/assets/js/links.js.gz index fdacd185..08e5c8bb 100644 Binary files a/public/assets/js/links.js.gz and b/public/assets/js/links.js.gz differ diff --git a/public/assets/js/links.js.map b/public/assets/js/links.js.map index cb04d137..8a49d382 100644 --- a/public/assets/js/links.js.map +++ b/public/assets/js/links.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap 24cb5e5f339c421e8b0f?e5de**","webpack:///./links.js"],"names":["youtubeRegex","spotifyRegex","notes","document","querySelectorAll","note","ytid","textContent","match","ytcontainer","createElement","classList","add","ytiframe","setAttribute","appendChild","spotifyid","sid","replace","siframe"],"mappings":";AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA,mDAA2C,cAAc;;AAEzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8DAAsD,+DAA+D;;AAErH;AACA;;AAEA;AACA;;;;;;;;;;;AChEA;;AAEA,IAAIA,eAAe,8BAAnB;AACA,IAAIC,eAAe,uCAAnB;;AAEA,IAAIC,QAAQC,SAASC,gBAAT,CAA0B,YAA1B,CAAZ;;;;;;;AAEA,yBAAiBF,KAAjB,8HAAwB;AAAA,YAAfG,IAAe;;AACpB,YAAIC,OAAOD,KAAKE,WAAL,CAAiBC,KAAjB,CAAuBR,YAAvB,CAAX;AACA,YAAIM,IAAJ,EAAU;AACN,gBAAIG,cAAcN,SAASO,aAAT,CAAuB,KAAvB,CAAlB;AACAD,wBAAYE,SAAZ,CAAsBC,GAAtB,CAA0B,WAA1B;AACA,gBAAIC,WAAWV,SAASO,aAAT,CAAuB,QAAvB,CAAf;AACAG,qBAASF,SAAT,CAAmBC,GAAnB,CAAuB,SAAvB;AACAC,qBAASC,YAAT,CAAsB,KAAtB,EAA6B,mCAAmCR,KAAK,CAAL,CAAhE;AACAO,qBAASC,YAAT,CAAsB,aAAtB,EAAqC,CAArC;AACAD,qBAASC,YAAT,CAAsB,iBAAtB,EAAyC,MAAzC;AACAL,wBAAYM,WAAZ,CAAwBF,QAAxB;AACAR,iBAAKU,WAAL,CAAiBN,WAAjB;AACH;AACD,YAAIO,YAAYX,KAAKE,WAAL,CAAiBC,KAAjB,CAAuBP,YAAvB,CAAhB;AACA,YAAIe,SAAJ,EAAe;AACX,gBAAIC,MAAMD,UAAU,CAAV,EAAaE,OAAb,CAAqB,GAArB,EAA0B,GAA1B,CAAV;AACA,gBAAIC,UAAUhB,SAASO,aAAT,CAAuB,QAAvB,CAAd;AACAS,oBAAQR,SAAR,CAAkBC,GAAlB,CAAsB,SAAtB;AACAO,oBAAQL,YAAR,CAAqB,KAArB,EAA4B,4CAA4CG,GAAxE;AACAE,oBAAQL,YAAR,CAAqB,aAArB,EAAoC,CAApC;AACAK,oBAAQL,YAAR,CAAqB,mBAArB,EAA0C,MAA1C;AACAT,iBAAKU,WAAL,CAAiBI,OAAjB;AACH;AACJ","file":"links.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// identity function for calling harmony imports with the correct context\n \t__webpack_require__.i = function(value) { return value; };\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 18);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 24cb5e5f339c421e8b0f","//links.js\n\nlet youtubeRegex = /watch\\?v=([A-Za-z0-9\\-_]+)\\b/;\nlet spotifyRegex = /https\\:\\/\\/play\\.spotify\\.com\\/(.*)\\b/;\n\nlet notes = document.querySelectorAll('.e-content');\n\nfor (let note of notes) {\n let ytid = note.textContent.match(youtubeRegex);\n if (ytid) {\n let ytcontainer = document.createElement('div');\n ytcontainer.classList.add('container');\n let ytiframe = document.createElement('iframe');\n ytiframe.classList.add('youtube');\n ytiframe.setAttribute('src', 'https://www.youtube.com/embed/' + ytid[1]);\n ytiframe.setAttribute('frameborder', 0);\n ytiframe.setAttribute('allowfullscreen', 'true');\n ytcontainer.appendChild(ytiframe);\n note.appendChild(ytcontainer);\n }\n let spotifyid = note.textContent.match(spotifyRegex);\n if (spotifyid) {\n let sid = spotifyid[1].replace('/', ':');\n let siframe = document.createElement('iframe');\n siframe.classList.add('spotify');\n siframe.setAttribute('src', 'https://embed.spotify.com/?uri=spotify:' + sid);\n siframe.setAttribute('frameborder', 0);\n siframe.setAttribute('allowtransparency', 'true');\n note.appendChild(siframe);\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./links.js"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/bootstrap 0d56878049caba29cc1d?60c9**","webpack:///./links.js"],"names":["youtubeRegex","spotifyRegex","notes","document","querySelectorAll","note","ytid","textContent","match","ytcontainer","createElement","classList","add","ytiframe","setAttribute","appendChild","spotifyid","sid","replace","siframe"],"mappings":";AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA,mDAA2C,cAAc;;AAEzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8DAAsD,+DAA+D;;AAErH;AACA;;AAEA;AACA;;;;;;;;;;;AChEA;;AAEA,IAAIA,eAAe,8BAAnB;AACA,IAAIC,eAAe,uCAAnB;;AAEA,IAAIC,QAAQC,SAASC,gBAAT,CAA0B,YAA1B,CAAZ;;;;;;;AAEA,yBAAiBF,KAAjB,8HAAwB;AAAA,YAAfG,IAAe;;AACpB,YAAIC,OAAOD,KAAKE,WAAL,CAAiBC,KAAjB,CAAuBR,YAAvB,CAAX;AACA,YAAIM,IAAJ,EAAU;AACN,gBAAIG,cAAcN,SAASO,aAAT,CAAuB,KAAvB,CAAlB;AACAD,wBAAYE,SAAZ,CAAsBC,GAAtB,CAA0B,WAA1B;AACA,gBAAIC,WAAWV,SAASO,aAAT,CAAuB,QAAvB,CAAf;AACAG,qBAASF,SAAT,CAAmBC,GAAnB,CAAuB,SAAvB;AACAC,qBAASC,YAAT,CAAsB,KAAtB,EAA6B,mCAAmCR,KAAK,CAAL,CAAhE;AACAO,qBAASC,YAAT,CAAsB,aAAtB,EAAqC,CAArC;AACAD,qBAASC,YAAT,CAAsB,iBAAtB,EAAyC,MAAzC;AACAL,wBAAYM,WAAZ,CAAwBF,QAAxB;AACAR,iBAAKU,WAAL,CAAiBN,WAAjB;AACH;AACD,YAAIO,YAAYX,KAAKE,WAAL,CAAiBC,KAAjB,CAAuBP,YAAvB,CAAhB;AACA,YAAIe,SAAJ,EAAe;AACX,gBAAIC,MAAMD,UAAU,CAAV,EAAaE,OAAb,CAAqB,GAArB,EAA0B,GAA1B,CAAV;AACA,gBAAIC,UAAUhB,SAASO,aAAT,CAAuB,QAAvB,CAAd;AACAS,oBAAQR,SAAR,CAAkBC,GAAlB,CAAsB,SAAtB;AACAO,oBAAQL,YAAR,CAAqB,KAArB,EAA4B,4CAA4CG,GAAxE;AACAE,oBAAQL,YAAR,CAAqB,aAArB,EAAoC,CAApC;AACAK,oBAAQL,YAAR,CAAqB,mBAArB,EAA0C,MAA1C;AACAT,iBAAKU,WAAL,CAAiBI,OAAjB;AACH;AACJ","file":"links.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// identity function for calling harmony imports with the correct context\n \t__webpack_require__.i = function(value) { return value; };\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 12);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 0d56878049caba29cc1d","//links.js\n\nlet youtubeRegex = /watch\\?v=([A-Za-z0-9\\-_]+)\\b/;\nlet spotifyRegex = /https\\:\\/\\/play\\.spotify\\.com\\/(.*)\\b/;\n\nlet notes = document.querySelectorAll('.e-content');\n\nfor (let note of notes) {\n let ytid = note.textContent.match(youtubeRegex);\n if (ytid) {\n let ytcontainer = document.createElement('div');\n ytcontainer.classList.add('container');\n let ytiframe = document.createElement('iframe');\n ytiframe.classList.add('youtube');\n ytiframe.setAttribute('src', 'https://www.youtube.com/embed/' + ytid[1]);\n ytiframe.setAttribute('frameborder', 0);\n ytiframe.setAttribute('allowfullscreen', 'true');\n ytcontainer.appendChild(ytiframe);\n note.appendChild(ytcontainer);\n }\n let spotifyid = note.textContent.match(spotifyRegex);\n if (spotifyid) {\n let sid = spotifyid[1].replace('/', ':');\n let siframe = document.createElement('iframe');\n siframe.classList.add('spotify');\n siframe.setAttribute('src', 'https://embed.spotify.com/?uri=spotify:' + sid);\n siframe.setAttribute('frameborder', 0);\n siframe.setAttribute('allowtransparency', 'true');\n note.appendChild(siframe);\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./links.js"],"sourceRoot":""} \ No newline at end of file diff --git a/public/assets/js/maps.js b/public/assets/js/maps.js index a7f42a01..1d209241 100644 --- a/public/assets/js/maps.js +++ b/public/assets/js/maps.js @@ -63,7 +63,7 @@ /******/ __webpack_require__.p = ""; /******/ /******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 19); +/******/ return __webpack_require__(__webpack_require__.s = 13); /******/ }) /************************************************************************/ /******/ ([ @@ -2828,13 +2828,7 @@ module.exports={"$version":8,"$root":{"version":{"required":true,"type":"enum"," /* 10 */, /* 11 */, /* 12 */, -/* 13 */, -/* 14 */, -/* 15 */, -/* 16 */, -/* 17 */, -/* 18 */, -/* 19 */ +/* 13 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; diff --git a/public/assets/js/maps.js.br b/public/assets/js/maps.js.br index c2b16cde..e33fccb9 100644 Binary files a/public/assets/js/maps.js.br and b/public/assets/js/maps.js.br differ diff --git a/public/assets/js/maps.js.gz b/public/assets/js/maps.js.gz index 48c80e4b..9d1006d8 100644 Binary files a/public/assets/js/maps.js.gz and b/public/assets/js/maps.js.gz differ diff --git a/public/assets/js/maps.js.map b/public/assets/js/maps.js.map index 13304840..0af0b7c8 100644 --- a/public/assets/js/maps.js.map +++ b/public/assets/js/maps.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap 24cb5e5f339c421e8b0f?e5de","webpack:///(webpack)/buildin/global.js?3698","webpack:///./parse-location.js?dbf7","webpack:///./mapbox-utils.js?6df0","webpack:///./select-place.js?bf59","webpack:////home/jonny/git/jonnybarnes.uk/~/base64-js/index.js?5d7d","webpack:////home/jonny/git/jonnybarnes.uk/~/buffer/index.js?3028","webpack:////home/jonny/git/jonnybarnes.uk/~/buffer/~/isarray/index.js?320e","webpack:////home/jonny/git/jonnybarnes.uk/~/ieee754/index.js?2a87","webpack:////home/jonny/git/jonnybarnes.uk/~/mapbox-gl/dist/mapbox-gl.js?96d9","webpack:///./maps.js"],"names":["parseLocation","text","coords","exec","parsedLongitude","split","parsedLatitude","addMap","accessToken","titlecase","string","map","first","rest","toUpperCase","join","toLowerCase","addMapTypeOption","menu","option","checked","input","document","createElement","setAttribute","addEventListener","setStyle","label","appendChild","createTextNode","makeMapMenu","mapMenu","classList","add","div","position","places","dataLatitude","dataset","latitude","dataLongitude","longitude","dataId","id","data","window","place","placeLongitude","location","placeLatitude","features","push","name","slug","Map","container","style","center","zoom","scrollZoom","disable","addControl","NavigationControl","on","addSource","addLayer","e","queryRenderedFeatures","point","layer","length","flyTo","geometry","coordinates","properties","uri","bounds","LngLatBounds","feature","extend","fitBounds","padding","selectPlaceInForm","querySelector","selected","mapDivs","querySelectorAll"],"mappings":";AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA,mDAA2C,cAAc;;AAEzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;A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A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,qBAAqB,mDAAmD;AACxE;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,UAAU;AAC7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,YAAY;AAC7B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA,uCAAuC,SAAS;AAChD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC;AACA;AACA;;AAEA;AACA;AACA,aAAa,iBAAiB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,iBAAiB,SAAS;AAC1B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,iBAAiB,SAAS;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,iBAAiB,SAAS;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,gDAAgD,EAAE;AAClD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,iBAAiB,SAAS;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA,wBAAwB,eAAe;AACvC;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,wBAAwB,QAAQ;AAChC;AACA,qBAAqB,eAAe;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,YAAY;AAC7B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,qBAAqB,SAAS;AAC9B;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,qBAAqB,SAAS;AAC9B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,qBAAqB,SAAS;AAC9B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,kBAAkB;AACnC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,mBAAmB,cAAc;AACjC;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,uDAAuD,OAAO;AAC9D;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA,uDAAuD,OAAO;AAC9D;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB;AAClB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,qBAAqB,QAAQ;AAC7B;AACA;AACA,GAAG;AACH;AACA,eAAe,SAAS;AACxB;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,mBAAmB,SAAS;AAC5B;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,iBAAiB,YAAY;AAC7B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,iBAAiB,gBAAgB;AACjC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,gBAAgB;AACjC;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,iBAAiB,YAAY;AA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,wBAAwB,gHAAgH,+FAA+F,gBAAgB;AAC/qB,CAAC,EAAE,yBAAyB;AAC5B,aAAa,4DAA4D,gBAAgB,yCAAyC,WAAW,kBAAkB,iCAAiC,oBAAoB,sBAAsB,+BAA+B,8CAA8C,0CAA0C,6FAA6F,cAAc,qBAAqB;AACje,CAAC,EAAE,4BAA4B,EAAE,GAAG;AACpC,CAAC;;;AAGD,qC;;;;;;;;;;;;;;;;;;;AC3bA;;;;;;AAEA,IAAIC,UAAU/D,SAASgE,gBAAT,CAA0B,MAA1B,CAAd,C,CAHA;;;;;;;AAKA,yBAAgBD,OAAhB,8HAAyB;AAAA,YAAhBnD,GAAgB;;AACrB,mCAASA,GAAT;AACH","file":"maps.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// identity function for calling harmony imports with the correct context\n \t__webpack_require__.i = function(value) { return value; };\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 19);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 24cb5e5f339c421e8b0f","var g;\r\n\r\n// This works in non-strict mode\r\ng = (function() {\r\n\treturn this;\r\n})();\r\n\r\ntry {\r\n\t// This works if eval is allowed (see CSP)\r\n\tg = g || Function(\"return this\")() || (1,eval)(\"this\");\r\n} catch(e) {\r\n\t// This works if the window reference is available\r\n\tif(typeof window === \"object\")\r\n\t\tg = window;\r\n}\r\n\r\n// g can still be undefined, but nothing to do about it...\r\n// We return undefined, instead of nothing here, so it's\r\n// easier to handle this case. if(!global) { ...}\r\n\r\nmodule.exports = g;\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// (webpack)/buildin/global.js\n// module id = 0\n// module chunks = 0 1","//parse-location.js\n\n//text = `POINT(lon lat)`\nexport default function parseLocation(text) {\n let coords = /POINT\\((.*)\\)/.exec(text);\n let parsedLongitude = coords[1].split(' ')[0];\n let parsedLatitude = coords[1].split(' ')[1];\n\n return {'latitude': parsedLatitude, 'longitude': parsedLongitude};\n}\n\n\n\n// WEBPACK FOOTER //\n// ./parse-location.js","//mapbox-utils.js\nimport mapboxgl from 'mapbox-gl/dist/mapbox-gl.js';\nimport parseLocation from './parse-location';\nimport selectPlaceInForm from './select-place';\n\nmapboxgl.accessToken = 'pk.eyJ1Ijoiam9ubnliYXJuZXMiLCJhIjoiY2l2cDhjYW04MDAwcjJ0cG1uZnhqcm82ayJ9.qA2zeVA-nsoMh9IFrd5KQw';\n\n//define some functions to be used in the default function.\nconst titlecase = (string) => {\n return string.split('-').map(([first,...rest]) => first.toUpperCase() + rest.join('').toLowerCase()).join(' ');\n};\n\nconst addMapTypeOption = (map, menu, option, checked = false) => {\n let input = document.createElement('input');\n input.setAttribute('id', option);\n input.setAttribute('type', 'radio');\n input.setAttribute('name', 'toggle');\n input.setAttribute('value', option);\n if (checked == true) {\n input.setAttribute('checked', 'checked');\n }\n input.addEventListener('click', function () {\n map.setStyle('mapbox://styles/mapbox/' + option + '-v9');\n });\n let label = document.createElement('label');\n label.setAttribute('for', option);\n label.appendChild(document.createTextNode(titlecase(option)));\n menu.appendChild(input);\n menu.appendChild(label);\n};\n\nconst makeMapMenu = (map) => {\n let mapMenu = document.createElement('div');\n mapMenu.classList.add('map-menu');\n addMapTypeOption(map, mapMenu, 'streets', true);\n addMapTypeOption(map, mapMenu, 'satellite-streets');\n return mapMenu;\n};\n\n//the main function\nexport default function addMap(div, position = null, places = null) {\n let dataLatitude = div.dataset.latitude;\n let dataLongitude = div.dataset.longitude;\n let dataId = div.dataset.id;\n let data = window['geojson'+dataId];\n if (data == null) {\n data = {\n 'type': 'FeatureCollection',\n 'features': [{\n 'type': 'Feature',\n 'geometry': {\n 'type': 'Point',\n 'coordinates': [dataLongitude, dataLatitude]\n },\n 'properties': {\n 'title': 'Current Location',\n 'icon': 'circle-stroked',\n 'uri': 'current-location'\n }\n }]\n };\n }\n if (places != null) {\n for (let place of places) {\n let placeLongitude = parseLocation(place.location).longitude;\n let placeLatitude = parseLocation(place.location).latitude;\n data.features.push({\n 'type': 'Feature',\n 'geometry': {\n 'type': 'Point',\n 'coordinates': [placeLongitude, placeLatitude]\n },\n 'properties': {\n 'title': place.name,\n 'icon': 'circle',\n 'uri': place.slug\n }\n });\n }\n }\n if (position != null) {\n dataLongitude = position.coords.longitude;\n dataLatitude = position.coords.latitude;\n }\n let map = new mapboxgl.Map({\n container: div,\n style: 'mapbox://styles/mapbox/streets-v9',\n center: [dataLongitude, dataLatitude],\n zoom: 15\n });\n if (position == null) {\n map.scrollZoom.disable();\n }\n map.addControl(new mapboxgl.NavigationControl());\n div.appendChild(makeMapMenu(map));\n map.on('load', function () {\n map.addSource('points', {\n 'type': 'geojson',\n 'data': data\n });\n map.addLayer({\n 'id': 'points',\n 'interactive': true,\n 'type': 'symbol',\n 'source': 'points',\n 'layout': {\n 'icon-image': '{icon}-15',\n 'text-field': '{title}',\n 'text-offset': [0, 1]\n }\n });\n });\n if (position != null) {\n map.on('click', function (e) {\n let features = map.queryRenderedFeatures(e.point, {\n layer: ['points']\n });\n // if there are features within the given radius of the click event,\n // fly to the location of the click event\n if (features.length) {\n // Get coordinates from the symbol and center the map on those coordinates\n map.flyTo({center: features[0].geometry.coordinates});\n selectPlaceInForm(features[0].properties.uri);\n }\n });\n }\n if (data.features && data.features.length > 1) {\n let bounds = new mapboxgl.LngLatBounds();\n for (let feature of data.features) {\n bounds.extend(feature.geometry.coordinates);\n }\n map.fitBounds(bounds, { padding: 65});\n }\n\n return map;\n}\n\n\n\n// WEBPACK FOOTER //\n// ./mapbox-utils.js","//select-place.js\n\nexport default function selectPlaceInForm(uri) {\n if (document.querySelector('select')) {\n if (uri == 'current-location') {\n document.querySelector('select [id=\"option-coords\"]').selected = true;\n } else {\n document.querySelector('select [value=\"' + uri + '\"]').selected = true;\n }\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./select-place.js","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction placeHoldersCount (b64) {\n var len = b64.length\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // the number of equal signs (place holders)\n // if there are two placeholders, than the two characters before it\n // represent one byte\n // if there is only one, then the three characters before it represent 2 bytes\n // this is just a cheap hack to not do indexOf twice\n return b64[len - 2] === '=' ? 2 : b64[len - 1] === '=' ? 1 : 0\n}\n\nfunction byteLength (b64) {\n // base64 is 4/3 + up to two characters of the original data\n return b64.length * 3 / 4 - placeHoldersCount(b64)\n}\n\nfunction toByteArray (b64) {\n var i, j, l, tmp, placeHolders, arr\n var len = b64.length\n placeHolders = placeHoldersCount(b64)\n\n arr = new Arr(len * 3 / 4 - placeHolders)\n\n // if there are placeholders, only get up to the last complete 4 chars\n l = placeHolders > 0 ? len - 4 : len\n\n var L = 0\n\n for (i = 0, j = 0; i < l; i += 4, j += 3) {\n tmp = (revLookup[b64.charCodeAt(i)] << 18) | (revLookup[b64.charCodeAt(i + 1)] << 12) | (revLookup[b64.charCodeAt(i + 2)] << 6) | revLookup[b64.charCodeAt(i + 3)]\n arr[L++] = (tmp >> 16) & 0xFF\n arr[L++] = (tmp >> 8) & 0xFF\n arr[L++] = tmp & 0xFF\n }\n\n if (placeHolders === 2) {\n tmp = (revLookup[b64.charCodeAt(i)] << 2) | (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[L++] = tmp & 0xFF\n } else if (placeHolders === 1) {\n tmp = (revLookup[b64.charCodeAt(i)] << 10) | (revLookup[b64.charCodeAt(i + 1)] << 4) | (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[L++] = (tmp >> 8) & 0xFF\n arr[L++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2])\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var output = ''\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n output += lookup[tmp >> 2]\n output += lookup[(tmp << 4) & 0x3F]\n output += '=='\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + (uint8[len - 1])\n output += lookup[tmp >> 10]\n output += lookup[(tmp >> 4) & 0x3F]\n output += lookup[(tmp << 2) & 0x3F]\n output += '='\n }\n\n parts.push(output)\n\n return parts.join('')\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/jonny/git/jonnybarnes.uk/~/base64-js/index.js\n// module id = 5\n// module chunks = 0 1","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nvar base64 = require('base64-js')\nvar ieee754 = require('ieee754')\nvar isArray = require('isarray')\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Use Object implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * Due to various browser bugs, sometimes the Object implementation will be used even\n * when the browser supports typed arrays.\n *\n * Note:\n *\n * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,\n * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.\n *\n * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.\n *\n * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of\n * incorrect length in some situations.\n\n * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they\n * get the Object implementation, which is slower but behaves correctly.\n */\nBuffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined\n ? global.TYPED_ARRAY_SUPPORT\n : typedArraySupport()\n\n/*\n * Export kMaxLength after typed array support is determined.\n */\nexports.kMaxLength = kMaxLength()\n\nfunction typedArraySupport () {\n try {\n var arr = new Uint8Array(1)\n arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}\n return arr.foo() === 42 && // typed array instances can be augmented\n typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`\n arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`\n } catch (e) {\n return false\n }\n}\n\nfunction kMaxLength () {\n return Buffer.TYPED_ARRAY_SUPPORT\n ? 0x7fffffff\n : 0x3fffffff\n}\n\nfunction createBuffer (that, length) {\n if (kMaxLength() < length) {\n throw new RangeError('Invalid typed array length')\n }\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = new Uint8Array(length)\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n if (that === null) {\n that = new Buffer(length)\n }\n that.length = length\n }\n\n return that\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n return new Buffer(arg, encodingOrOffset, length)\n }\n\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new Error(\n 'If encoding is specified then the first argument must be a string'\n )\n }\n return allocUnsafe(this, arg)\n }\n return from(this, arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\n// TODO: Legacy, not needed anymore. Remove in next major version.\nBuffer._augment = function (arr) {\n arr.__proto__ = Buffer.prototype\n return arr\n}\n\nfunction from (that, value, encodingOrOffset, length) {\n if (typeof value === 'number') {\n throw new TypeError('\"value\" argument must not be a number')\n }\n\n if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {\n return fromArrayBuffer(that, value, encodingOrOffset, length)\n }\n\n if (typeof value === 'string') {\n return fromString(that, value, encodingOrOffset)\n }\n\n return fromObject(that, value)\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(null, value, encodingOrOffset, length)\n}\n\nif (Buffer.TYPED_ARRAY_SUPPORT) {\n Buffer.prototype.__proto__ = Uint8Array.prototype\n Buffer.__proto__ = Uint8Array\n if (typeof Symbol !== 'undefined' && Symbol.species &&\n Buffer[Symbol.species] === Buffer) {\n // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97\n Object.defineProperty(Buffer, Symbol.species, {\n value: null,\n configurable: true\n })\n }\n}\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be a number')\n } else if (size < 0) {\n throw new RangeError('\"size\" argument must not be negative')\n }\n}\n\nfunction alloc (that, size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(that, size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpretted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(that, size).fill(fill, encoding)\n : createBuffer(that, size).fill(fill)\n }\n return createBuffer(that, size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(null, size, fill, encoding)\n}\n\nfunction allocUnsafe (that, size) {\n assertSize(size)\n that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n for (var i = 0; i < size; ++i) {\n that[i] = 0\n }\n }\n return that\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(null, size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(null, size)\n}\n\nfunction fromString (that, string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('\"encoding\" must be a valid string encoding')\n }\n\n var length = byteLength(string, encoding) | 0\n that = createBuffer(that, length)\n\n var actual = that.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n that = that.slice(0, actual)\n }\n\n return that\n}\n\nfunction fromArrayLike (that, array) {\n var length = array.length < 0 ? 0 : checked(array.length) | 0\n that = createBuffer(that, length)\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n}\n\nfunction fromArrayBuffer (that, array, byteOffset, length) {\n array.byteLength // this throws if `array` is not a valid ArrayBuffer\n\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\\'offset\\' is out of bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\\'length\\' is out of bounds')\n }\n\n if (byteOffset === undefined && length === undefined) {\n array = new Uint8Array(array)\n } else if (length === undefined) {\n array = new Uint8Array(array, byteOffset)\n } else {\n array = new Uint8Array(array, byteOffset, length)\n }\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = array\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n that = fromArrayLike(that, array)\n }\n return that\n}\n\nfunction fromObject (that, obj) {\n if (Buffer.isBuffer(obj)) {\n var len = checked(obj.length) | 0\n that = createBuffer(that, len)\n\n if (that.length === 0) {\n return that\n }\n\n obj.copy(that, 0, 0, len)\n return that\n }\n\n if (obj) {\n if ((typeof ArrayBuffer !== 'undefined' &&\n obj.buffer instanceof ArrayBuffer) || 'length' in obj) {\n if (typeof obj.length !== 'number' || isnan(obj.length)) {\n return createBuffer(that, 0)\n }\n return fromArrayLike(that, obj)\n }\n\n if (obj.type === 'Buffer' && isArray(obj.data)) {\n return fromArrayLike(that, obj.data)\n }\n }\n\n throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')\n}\n\nfunction checked (length) {\n // Note: cannot use `length < kMaxLength()` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= kMaxLength()) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + kMaxLength().toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return !!(b != null && b._isBuffer)\n}\n\nBuffer.compare = function compare (a, b) {\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError('Arguments must be Buffers')\n }\n\n if (a === b) return 0\n\n var x = a.length\n var y = b.length\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n var i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n var buffer = Buffer.allocUnsafe(length)\n var pos = 0\n for (i = 0; i < list.length; ++i) {\n var buf = list[i]\n if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n buf.copy(buffer, pos)\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&\n (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n string = '' + string\n }\n\n var len = string.length\n if (len === 0) return 0\n\n // Use a for loop to avoid recursion\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n case undefined:\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) return utf8ToBytes(string).length // assume utf8\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n var loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coersion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect\n// Buffer instances.\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n var i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n var len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (var i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n var len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (var i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n var len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (var i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n var length = this.length | 0\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n var str = ''\n var max = exports.INSPECT_MAX_BYTES\n if (this.length > 0) {\n str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')\n if (this.length > max) str += ' ... '\n }\n return ''\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (!Buffer.isBuffer(target)) {\n throw new TypeError('Argument must be a Buffer')\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n var x = thisEnd - thisStart\n var y = end - start\n var len = Math.min(x, y)\n\n var thisCopy = this.slice(thisStart, thisEnd)\n var targetCopy = target.slice(start, end)\n\n for (var i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n var indexSize = 1\n var arrLength = arr.length\n var valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n var i\n if (dir) {\n var foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n var found = true\n for (var j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n var remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n // must be an even number of digits\n var strLen = string.length\n if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n for (var i = 0; i < length; ++i) {\n var parsed = parseInt(string.substr(i * 2, 2), 16)\n if (isNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction latin1Write (buf, string, offset, length) {\n return asciiWrite(buf, string, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset | 0\n if (isFinite(length)) {\n length = length | 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n // legacy write(string, encoding, offset, length) - remove in v0.13\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n var remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n return asciiWrite(this, string, offset, length)\n\n case 'latin1':\n case 'binary':\n return latin1Write(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n var res = []\n\n var i = start\n while (i < end) {\n var firstByte = buf[i]\n var codePoint = null\n var bytesPerSequence = (firstByte > 0xEF) ? 4\n : (firstByte > 0xDF) ? 3\n : (firstByte > 0xBF) ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n var secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nvar MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n var len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n var res = ''\n var i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n var len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n var out = ''\n for (var i = start; i < end; ++i) {\n out += toHex(buf[i])\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n var bytes = buf.slice(start, end)\n var res = ''\n for (var i = 0; i < bytes.length; i += 2) {\n res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n var len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n var newBuf\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n newBuf = this.subarray(start, end)\n newBuf.__proto__ = Buffer.prototype\n } else {\n var sliceLen = end - start\n newBuf = new Buffer(sliceLen, undefined)\n for (var i = 0; i < sliceLen; ++i) {\n newBuf[i] = this[i + start]\n }\n }\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n var val = this[offset + --byteLength]\n var mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var i = byteLength\n var mul = 1\n var val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var mul = 1\n var i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var i = byteLength - 1\n var mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nfunction objectWriteUInt16 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {\n buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>\n (littleEndian ? i : 1 - i) * 8\n }\n}\n\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nfunction objectWriteUInt32 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffffffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {\n buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff\n }\n}\n\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = 0\n var mul = 1\n var sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = byteLength - 1\n var mul = 1\n var sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n var len = end - start\n var i\n\n if (this === target && start < targetStart && targetStart < end) {\n // descending copy from end\n for (i = len - 1; i >= 0; --i) {\n target[i + targetStart] = this[i + start]\n }\n } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {\n // ascending copy from start\n for (i = 0; i < len; ++i) {\n target[i + targetStart] = this[i + start]\n }\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, start + len),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (val.length === 1) {\n var code = val.charCodeAt(0)\n if (code < 256) {\n val = code\n }\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n } else if (typeof val === 'number') {\n val = val & 255\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n var i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n var bytes = Buffer.isBuffer(val)\n ? val\n : utf8ToBytes(new Buffer(val, encoding).toString())\n var len = bytes.length\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// HELPER FUNCTIONS\n// ================\n\nvar INVALID_BASE64_RE = /[^+\\/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = stringtrim(str).replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction stringtrim (str) {\n if (str.trim) return str.trim()\n return str.replace(/^\\s+|\\s+$/g, '')\n}\n\nfunction toHex (n) {\n if (n < 16) return '0' + n.toString(16)\n return n.toString(16)\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n var codePoint\n var length = string.length\n var leadSurrogate = null\n var bytes = []\n\n for (var i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n var c, hi, lo\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n for (var i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\nfunction isnan (val) {\n return val !== val // eslint-disable-line no-self-compare\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/jonny/git/jonnybarnes.uk/~/buffer/index.js\n// module id = 6\n// module chunks = 0 1","var toString = {}.toString;\n\nmodule.exports = Array.isArray || function (arr) {\n return toString.call(arr) == '[object Array]';\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/jonny/git/jonnybarnes.uk/~/buffer/~/isarray/index.js\n// module id = 7\n// module chunks = 0 1","exports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = nBytes * 8 - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = nBytes * 8 - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = (value * c - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/jonny/git/jonnybarnes.uk/~/ieee754/index.js\n// module id = 8\n// module chunks = 0 1","(function(f){if(typeof exports===\"object\"&&typeof module!==\"undefined\"){module.exports=f()}else if(typeof define===\"function\"&&define.amd){define([],f)}else{var g;if(typeof window!==\"undefined\"){g=window}else if(typeof global!==\"undefined\"){g=global}else if(typeof self!==\"undefined\"){g=self}else{g=this}g.mapboxgl = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o0){for(var o=0,a=0,u=0;uh.maxh||t>h.maxw||i<=h.maxh&&t<=h.maxw&&(r=h.maxw*h.maxh-t*i,rn.free)){if(i===n.h)return this.allocShelf(f,t,i,s);i>n.h||ic)&&(p=2*Math.max(t,c)),(uu)&&(l=2*Math.max(i,u)),this.resize(p,l),this.packOne(t,i,s)}return null},t.prototype.allocFreebin=function(t,e,i,s){var h=this.freebins.splice(t,1)[0];return h.id=s,h.w=e,h.h=i,h.refcount=0,this.bins[s]=h,this.ref(h),h},t.prototype.allocShelf=function(t,e,i,s){var h=this.shelves[t],n=h.alloc(e,i,s);return this.bins[s]=n,this.ref(n),n},t.prototype.getBin=function(t){return this.bins[t]},t.prototype.ref=function(t){if(1===++t.refcount){var e=t.h;this.stats[e]=(0|this.stats[e])+1}return t.refcount},t.prototype.unref=function(t){return 0===t.refcount?0:(0===--t.refcount&&(this.stats[t.h]--,delete this.bins[t.id],this.freebins.push(t)),t.refcount)},t.prototype.clear=function(){this.shelves=[],this.freebins=[],this.stats={},this.bins={},this.maxId=0},t.prototype.resize=function(t,e){this.w=t,this.h=e;for(var i=0;ithis.free||e>this.h)return null;var h=this.x;return this.x+=t,this.free-=t,new i(s,h,this.y,t,e,t,this.h)},e.prototype.resize=function(t){return this.free+=t-this.w,this.w=t,!0},t});\n},{}],3:[function(require,module,exports){\nfunction UnitBezier(t,i,e,r){this.cx=3*t,this.bx=3*(e-t)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*i,this.by=3*(r-i)-this.cy,this.ay=1-this.cy-this.by,this.p1x=t,this.p1y=r,this.p2x=e,this.p2y=r}module.exports=UnitBezier,UnitBezier.prototype.sampleCurveX=function(t){return((this.ax*t+this.bx)*t+this.cx)*t},UnitBezier.prototype.sampleCurveY=function(t){return((this.ay*t+this.by)*t+this.cy)*t},UnitBezier.prototype.sampleCurveDerivativeX=function(t){return(3*this.ax*t+2*this.bx)*t+this.cx},UnitBezier.prototype.solveCurveX=function(t,i){\"undefined\"==typeof i&&(i=1e-6);var e,r,s,h,n;for(s=t,n=0;n<8;n++){if(h=this.sampleCurveX(s)-t,Math.abs(h)r)return r;for(;eh?e=s:r=s,s=.5*(r-e)+e}return s},UnitBezier.prototype.solve=function(t,i){return this.sampleCurveY(this.solveCurveX(t,i))};\n},{}],4:[function(require,module,exports){\n!function(e,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?t(exports):\"function\"==typeof define&&define.amd?define([\"exports\"],t):t(e.WhooTS=e.WhooTS||{})}(this,function(e){function t(e,t,r,n,i,s){s=s||{};var f=e+\"?\"+[\"bbox=\"+o(r,n,i),\"format=\"+(s.format||\"image/png\"),\"service=\"+(s.service||\"WMS\"),\"version=\"+(s.version||\"1.1.1\"),\"request=\"+(s.request||\"GetMap\"),\"srs=\"+(s.srs||\"EPSG:3857\"),\"width=\"+(s.width||256),\"height=\"+(s.height||256),\"layers=\"+t].join(\"&\");return f}function o(e,t,o){t=Math.pow(2,o)-t-1;var n=r(256*e,256*t,o),i=r(256*(e+1),256*(t+1),o);return n[0]+\",\"+n[1]+\",\"+i[0]+\",\"+i[1]}function r(e,t,o){var r=2*Math.PI*6378137/256/Math.pow(2,o),n=e*r-2*Math.PI*6378137/2,i=t*r-2*Math.PI*6378137/2;return[n,i]}e.getURL=t,e.getTileBBox=o,e.getMercCoords=r,Object.defineProperty(e,\"__esModule\",{value:!0})});\n},{}],5:[function(require,module,exports){\n\"use strict\";function earcut(e,n,r){r=r||2;var t=n&&n.length,i=t?n[0]*r:e.length,x=linkedList(e,0,i,r,!0),a=[];if(!x)return a;var o,l,u,s,v,f,y;if(t&&(x=eliminateHoles(e,n,x,r)),e.length>80*r){o=u=e[0],l=s=e[1];for(var d=r;du&&(u=v),f>s&&(s=f);y=Math.max(u-o,s-l)}return earcutLinked(x,a,r,o,l,y),a}function linkedList(e,n,r,t,i){var x,a;if(i===signedArea(e,n,r,t)>0)for(x=n;x=n;x-=t)a=insertNode(x,e[x],e[x+1],a);return a&&equals(a,a.next)&&(removeNode(a),a=a.next),a}function filterPoints(e,n){if(!e)return e;n||(n=e);var r,t=e;do if(r=!1,t.steiner||!equals(t,t.next)&&0!==area(t.prev,t,t.next))t=t.next;else{if(removeNode(t),t=n=t.prev,t===t.next)return null;r=!0}while(r||t!==n);return n}function earcutLinked(e,n,r,t,i,x,a){if(e){!a&&x&&indexCurve(e,t,i,x);for(var o,l,u=e;e.prev!==e.next;)if(o=e.prev,l=e.next,x?isEarHashed(e,t,i,x):isEar(e))n.push(o.i/r),n.push(e.i/r),n.push(l.i/r),removeNode(e),e=l.next,u=l.next;else if(e=l,e===u){a?1===a?(e=cureLocalIntersections(e,n,r),earcutLinked(e,n,r,t,i,x,2)):2===a&&splitEarcut(e,n,r,t,i,x):earcutLinked(filterPoints(e),n,r,t,i,x,1);break}}}function isEar(e){var n=e.prev,r=e,t=e.next;if(area(n,r,t)>=0)return!1;for(var i=e.next.next;i!==e.prev;){if(pointInTriangle(n.x,n.y,r.x,r.y,t.x,t.y,i.x,i.y)&&area(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function isEarHashed(e,n,r,t){var i=e.prev,x=e,a=e.next;if(area(i,x,a)>=0)return!1;for(var o=i.xx.x?i.x>a.x?i.x:a.x:x.x>a.x?x.x:a.x,s=i.y>x.y?i.y>a.y?i.y:a.y:x.y>a.y?x.y:a.y,v=zOrder(o,l,n,r,t),f=zOrder(u,s,n,r,t),y=e.nextZ;y&&y.z<=f;){if(y!==e.prev&&y!==e.next&&pointInTriangle(i.x,i.y,x.x,x.y,a.x,a.y,y.x,y.y)&&area(y.prev,y,y.next)>=0)return!1;y=y.nextZ}for(y=e.prevZ;y&&y.z>=v;){if(y!==e.prev&&y!==e.next&&pointInTriangle(i.x,i.y,x.x,x.y,a.x,a.y,y.x,y.y)&&area(y.prev,y,y.next)>=0)return!1;y=y.prevZ}return!0}function cureLocalIntersections(e,n,r){var t=e;do{var i=t.prev,x=t.next.next;!equals(i,x)&&intersects(i,t,t.next,x)&&locallyInside(i,x)&&locallyInside(x,i)&&(n.push(i.i/r),n.push(t.i/r),n.push(x.i/r),removeNode(t),removeNode(t.next),t=e=x),t=t.next}while(t!==e);return t}function splitEarcut(e,n,r,t,i,x){var a=e;do{for(var o=a.next.next;o!==a.prev;){if(a.i!==o.i&&isValidDiagonal(a,o)){var l=splitPolygon(a,o);return a=filterPoints(a,a.next),l=filterPoints(l,l.next),earcutLinked(a,n,r,t,i,x),void earcutLinked(l,n,r,t,i,x)}o=o.next}a=a.next}while(a!==e)}function eliminateHoles(e,n,r,t){var i,x,a,o,l,u=[];for(i=0,x=n.length;i=t.next.y){var o=t.x+(x-t.y)*(t.next.x-t.x)/(t.next.y-t.y);if(o<=i&&o>a){if(a=o,o===i){if(x===t.y)return t;if(x===t.next.y)return t.next}r=t.x=t.x&&t.x>=s&&pointInTriangle(xr.x)&&locallyInside(t,e)&&(r=t,f=l)),t=t.next;return r}function indexCurve(e,n,r,t){var i=e;do null===i.z&&(i.z=zOrder(i.x,i.y,n,r,t)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next;while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,sortLinked(i)}function sortLinked(e){var n,r,t,i,x,a,o,l,u=1;do{for(r=e,e=null,x=null,a=0;r;){for(a++,t=r,o=0,n=0;n0||l>0&&t;)0===o?(i=t,t=t.nextZ,l--):0!==l&&t?r.z<=t.z?(i=r,r=r.nextZ,o--):(i=t,t=t.nextZ,l--):(i=r,r=r.nextZ,o--),x?x.nextZ=i:e=i,i.prevZ=x,x=i;r=t}x.nextZ=null,u*=2}while(a>1);return e}function zOrder(e,n,r,t,i){return e=32767*(e-r)/i,n=32767*(n-t)/i,e=16711935&(e|e<<8),e=252645135&(e|e<<4),e=858993459&(e|e<<2),e=1431655765&(e|e<<1),n=16711935&(n|n<<8),n=252645135&(n|n<<4),n=858993459&(n|n<<2),n=1431655765&(n|n<<1),e|n<<1}function getLeftmost(e){var n=e,r=e;do n.x=0&&(e-a)*(t-o)-(r-a)*(n-o)>=0&&(r-a)*(x-o)-(i-a)*(t-o)>=0}function isValidDiagonal(e,n){return e.next.i!==n.i&&e.prev.i!==n.i&&!intersectsPolygon(e,n)&&locallyInside(e,n)&&locallyInside(n,e)&&middleInside(e,n)}function area(e,n,r){return(n.y-e.y)*(r.x-n.x)-(n.x-e.x)*(r.y-n.y)}function equals(e,n){return e.x===n.x&&e.y===n.y}function intersects(e,n,r,t){return!!(equals(e,n)&&equals(r,t)||equals(e,t)&&equals(r,n))||area(e,n,r)>0!=area(e,n,t)>0&&area(r,t,e)>0!=area(r,t,n)>0}function intersectsPolygon(e,n){var r=e;do{if(r.i!==e.i&&r.next.i!==e.i&&r.i!==n.i&&r.next.i!==n.i&&intersects(r,r.next,e,n))return!0;r=r.next}while(r!==e);return!1}function locallyInside(e,n){return area(e.prev,e,e.next)<0?area(e,n,e.next)>=0&&area(e,e.prev,n)>=0:area(e,n,e.prev)<0||area(e,e.next,n)<0}function middleInside(e,n){var r=e,t=!1,i=(e.x+n.x)/2,x=(e.y+n.y)/2;do r.y>x!=r.next.y>x&&i<(r.next.x-r.x)*(x-r.y)/(r.next.y-r.y)+r.x&&(t=!t),r=r.next;while(r!==e);return t}function splitPolygon(e,n){var r=new Node(e.i,e.x,e.y),t=new Node(n.i,n.x,n.y),i=e.next,x=n.prev;return e.next=n,n.prev=e,r.next=i,i.prev=r,t.next=r,r.prev=t,x.next=t,t.prev=x,t}function insertNode(e,n,r,t){var i=new Node(e,n,r);return t?(i.next=t.next,i.prev=t,t.next.prev=i,t.next=i):(i.prev=i,i.next=i),i}function removeNode(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function Node(e,n,r){this.i=e,this.x=n,this.y=r,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function signedArea(e,n,r,t){for(var i=0,x=n,a=r-t;x0&&(t+=e[i-1].length,r.holes.push(t))}return r};\n},{}],6:[function(require,module,exports){\nfunction geometry(r){if(\"Polygon\"===r.type)return polygonArea(r.coordinates);if(\"MultiPolygon\"===r.type){for(var e=0,n=0;n0){e+=Math.abs(ringArea(r[0]));for(var n=1;n2){for(var n,t,o=0;o=0}var geojsonArea=require(\"geojson-area\");module.exports=rewind;\n},{\"geojson-area\":6}],8:[function(require,module,exports){\n\"use strict\";function clip(e,r,t,n,u,i,l,s){if(t/=r,n/=r,l>=t&&s<=n)return e;if(l>n||s=t&&c<=n)h.push(o);else if(!(a>n||c=r&&s<=t&&u.push(l)}return u}function clipGeometry(e,r,t,n,u,i){for(var l=[],s=0;st?(d.push(u(h,f,r),u(h,f,t)),i||(d=newSlice(l,d,v,m,w))):o>=r&&d.push(u(h,f,r)):c>t?ot&&(d.push(u(h,f,t)),i||(d=newSlice(l,d,v,m,w))));h=g[S-1],c=h[n],c>=r&&c<=t&&d.push(h),a=d[d.length-1],i&&a&&(d[0][0]!==a[0]||d[0][1]!==a[1])&&d.push(d[0]),newSlice(l,d,v,m,w)}return l}function newSlice(e,r,t,n,u){return r.length&&(r.area=t,r.dist=n,void 0!==u&&(r.outer=u),e.push(r)),[]}module.exports=clip;var createFeature=require(\"./feature\");\n},{\"./feature\":10}],9:[function(require,module,exports){\n\"use strict\";function convert(e,t){var r=[];if(\"FeatureCollection\"===e.type)for(var o=0;o1?1:o,[r,o,0]}function calcSize(e){for(var t,r,o=0,a=0,i=0;i1)return!1;var r=n.geometry[0].length;if(5!==r)return!1;for(var s=0;s1&&console.time(\"creation\"),m=this.tiles[d]=createTile(e,p,i,o,f,t===a.maxZoom),this.tileCoords.push({z:t,x:i,y:o}),u)){u>1&&(console.log(\"tile z%d-%d-%d (features: %d, points: %d, simplified: %d)\",t,i,o,m.numFeatures,m.numPoints,m.numSimplified),console.timeEnd(\"creation\"));var h=\"z\"+t;this.stats[h]=(this.stats[h]||0)+1,this.total++}if(m.source=e,n){if(t===a.maxZoom||t===n)continue;var x=1<1&&console.time(\"clipping\");var g,v,M,T,b,y,S=.5*a.buffer/a.extent,Z=.5-S,q=.5+S,w=1+S;g=v=M=T=null,b=clip(e,p,i-S,i+q,0,intersectX,m.min[0],m.max[0]),y=clip(e,p,i+Z,i+w,0,intersectX,m.min[0],m.max[0]),b&&(g=clip(b,p,o-S,o+q,1,intersectY,m.min[1],m.max[1]),v=clip(b,p,o+Z,o+w,1,intersectY,m.min[1],m.max[1])),y&&(M=clip(y,p,o-S,o+q,1,intersectY,m.min[1],m.max[1]),T=clip(y,p,o+Z,o+w,1,intersectY,m.min[1],m.max[1])),u>1&&console.timeEnd(\"clipping\"),e.length&&(l.push(g||[],t+1,2*i,2*o),l.push(v||[],t+1,2*i,2*o+1),l.push(M||[],t+1,2*i+1,2*o),l.push(T||[],t+1,2*i+1,2*o+1))}else n&&(c=t)}return c},GeoJSONVT.prototype.getTile=function(e,t,i){var o=this.options,n=o.extent,r=o.debug,s=1<1&&console.log(\"drilling down to z%d-%d-%d\",e,t,i);for(var a,u=e,c=t,p=i;!a&&u>0;)u--,c=Math.floor(c/2),p=Math.floor(p/2),a=this.tiles[toID(u,c,p)];if(!a||!a.source)return null;if(r>1&&console.log(\"found parent tile z%d-%d-%d\",u,c,p),isClippedSquare(a,n,o.buffer))return transform.tile(a,n);r>1&&console.time(\"drilling down\");var d=this.splitTile(a.source,u,c,p,e,t,i);if(r>1&&console.timeEnd(\"drilling down\"),null!==d){var m=1<p&&(s=e,p=r);p>o?(t[s][2]=p,g.push(u),g.push(s),u=s):(n=g.pop(),u=g.pop())}}function getSqSegDist(t,i,e){var p=i[0],r=i[1],s=e[0],o=e[1],f=t[0],u=t[1],n=s-p,g=o-r;if(0!==n||0!==g){var l=((f-p)*n+(u-r)*g)/(n*n+g*g);l>1?(p=s,r=o):l>0&&(p+=n*l,r+=g*l)}return n=f-p,g=u-r,n*n+g*g}module.exports=simplify;\n},{}],13:[function(require,module,exports){\n\"use strict\";function createTile(e,n,r,i,t,u){for(var a={features:[],numPoints:0,numSimplified:0,numFeatures:0,source:null,x:r,y:i,z2:n,transformed:!1,min:[2,1],max:[-1,0]},m=0;ma.max[0]&&(a.max[0]=l[0]),l[1]>a.max[1]&&(a.max[1]=l[1])}return a}function addFeature(e,n,r,i){var t,u,a,m,s=n.geometry,l=n.type,o=[],f=r*r;if(1===l)for(t=0;tf)&&(d.push(m),e.numSimplified++),e.numPoints++;3===l&&rewind(d,a.outer),o.push(d)}else e.numPoints+=a.length;if(o.length){var g={geometry:o,type:l,tags:n.tags||null};null!==n.id&&(g.id=n.id),e.features.push(g)}}function rewind(e,n){var r=signedArea(e);r<0===n&&e.reverse()}function signedArea(e){for(var n,r,i=0,t=0,u=e.length,a=u-1;t=a[u+0]&&s>=a[u+1]?(n[f]=!0,h.push(l[f])):n[f]=!1}}},GridIndex.prototype._forEachCell=function(t,r,e,s,i,h,n){for(var o=this._convertToCellCoord(t),l=this._convertToCellCoord(r),a=this._convertToCellCoord(e),d=this._convertToCellCoord(s),f=o;f<=a;f++)for(var u=l;u<=d;u++){var y=this.d*u+f;if(i.call(this,t,r,e,s,y,h,n))return}},GridIndex.prototype._convertToCellCoord=function(t){return Math.max(0,Math.min(this.d-1,Math.floor(t*this.scale)+this.padding))},GridIndex.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var t=this.cells,r=NUM_PARAMS+this.cells.length+1+1,e=0,s=0;s>1,i=-7,N=t?h-1:0,n=t?-1:1,s=a[o+N];for(N+=n,M=s&(1<<-i)-1,s>>=-i,i+=w;i>0;M=256*M+a[o+N],N+=n,i-=8);for(p=M&(1<<-i)-1,M>>=-i,i+=r;i>0;p=256*p+a[o+N],N+=n,i-=8);if(0===M)M=1-e;else{if(M===f)return p?NaN:(s?-1:1)*(1/0);p+=Math.pow(2,r),M-=e}return(s?-1:1)*p*Math.pow(2,M-r)},exports.write=function(a,o,t,r,h,M){var p,w,f,e=8*M-h-1,i=(1<>1,n=23===h?Math.pow(2,-24)-Math.pow(2,-77):0,s=r?0:M-1,u=r?1:-1,l=o<0||0===o&&1/o<0?1:0;for(o=Math.abs(o),isNaN(o)||o===1/0?(w=isNaN(o)?1:0,p=i):(p=Math.floor(Math.log(o)/Math.LN2),o*(f=Math.pow(2,-p))<1&&(p--,f*=2),o+=p+N>=1?n/f:n*Math.pow(2,1-N),o*f>=2&&(p++,f/=2),p+N>=i?(w=0,p=i):p+N>=1?(w=(o*f-1)*Math.pow(2,h),p+=N):(w=o*Math.pow(2,N-1)*Math.pow(2,h),p=0));h>=8;a[t+s]=255&w,s+=u,w/=256,h-=8);for(p=p<0;a[t+s]=255&p,s+=u,p/=256,e-=8);a[t+s-u]|=128*l};\n},{}],18:[function(require,module,exports){\n\"use strict\";function kdbush(t,i,e,s,n){return new KDBush(t,i,e,s,n)}function KDBush(t,i,e,s,n){i=i||defaultGetX,e=e||defaultGetY,n=n||Array,this.nodeSize=s||64,this.points=t,this.ids=new n(t.length),this.coords=new n(2*t.length);for(var r=0;r=s&&a<=h&&t>=u&&t<=e&&f.push(p[i]);else{var c=Math.floor((g+v)/2);a=r[2*c],t=r[2*c+1],a>=s&&a<=h&&t>=u&&t<=e&&f.push(p[c]);var d=(l+1)%2;(0===l?s<=a:u<=t)&&(n.push(g),n.push(c-1),n.push(d)),(0===l?h>=a:e>=t)&&(n.push(c+1),n.push(v),n.push(d))}}return f}module.exports=range;\n},{}],20:[function(require,module,exports){\n\"use strict\";function sortKD(t,a,o,s,r,e){if(!(r-s<=o)){var f=Math.floor((s+r)/2);select(t,a,f,s,r,e%2),sortKD(t,a,o,s,f-1,e+1),sortKD(t,a,o,f+1,r,e+1)}}function select(t,a,o,s,r,e){for(;r>s;){if(r-s>600){var f=r-s+1,p=o-s+1,w=Math.log(f),m=.5*Math.exp(2*w/3),n=.5*Math.sqrt(w*m*(f-m)/f)*(p-f/2<0?-1:1),c=Math.max(s,Math.floor(o-p*m/f+n)),h=Math.min(r,Math.floor(o+(f-p)*m/f+n));select(t,a,o,c,h,e)}var i=a[2*o+e],l=s,M=r;for(swapItem(t,a,s,o),a[2*r+e]>i&&swapItem(t,a,s,r);li;)M--}a[2*s+e]===i?swapItem(t,a,s,M):(M++,swapItem(t,a,M,r)),M<=o&&(s=M+1),o<=M&&(r=M-1)}}function swapItem(t,a,o,s){swap(t,o,s),swap(a,2*o,2*s),swap(a,2*o+1,2*s+1)}function swap(t,a,o){var s=t[a];t[a]=t[o],t[o]=s}module.exports=sortKD;\n},{}],21:[function(require,module,exports){\n\"use strict\";function within(s,p,r,t,u,h){for(var i=[0,s.length-1,0],o=[],n=u*u;i.length;){var e=i.pop(),a=i.pop(),f=i.pop();if(a-f<=h)for(var v=f;v<=a;v++)sqDist(p[2*v],p[2*v+1],r,t)<=n&&o.push(s[v]);else{var l=Math.floor((f+a)/2),c=p[2*l],q=p[2*l+1];sqDist(c,q,r,t)<=n&&o.push(s[l]);var D=(e+1)%2;(0===e?r-u<=c:t-u<=q)&&(i.push(f),i.push(l-1),i.push(D)),(0===e?r+u>=c:t+u>=q)&&(i.push(l+1),i.push(a),i.push(D))}}return o}function sqDist(s,p,r,t){var u=s-r,h=p-t;return u*u+h*h}module.exports=within;\n},{}],22:[function(require,module,exports){\n\"use strict\";function isSupported(e){return!!(isBrowser()&&isArraySupported()&&isFunctionSupported()&&isObjectSupported()&&isJSONSupported()&&isWorkerSupported()&&isUint8ClampedArraySupported()&&isWebGLSupportedCached(e&&e.failIfMajorPerformanceCaveat))}function isBrowser(){return\"undefined\"!=typeof window&&\"undefined\"!=typeof document}function isArraySupported(){return Array.prototype&&Array.prototype.every&&Array.prototype.filter&&Array.prototype.forEach&&Array.prototype.indexOf&&Array.prototype.lastIndexOf&&Array.prototype.map&&Array.prototype.some&&Array.prototype.reduce&&Array.prototype.reduceRight&&Array.isArray}function isFunctionSupported(){return Function.prototype&&Function.prototype.bind}function isObjectSupported(){return Object.keys&&Object.create&&Object.getPrototypeOf&&Object.getOwnPropertyNames&&Object.isSealed&&Object.isFrozen&&Object.isExtensible&&Object.getOwnPropertyDescriptor&&Object.defineProperty&&Object.defineProperties&&Object.seal&&Object.freeze&&Object.preventExtensions}function isJSONSupported(){return\"JSON\"in window&&\"parse\"in JSON&&\"stringify\"in JSON}function isWorkerSupported(){return\"Worker\"in window}function isUint8ClampedArraySupported(){return\"Uint8ClampedArray\"in window}function isWebGLSupportedCached(e){return void 0===isWebGLSupportedCache[e]&&(isWebGLSupportedCache[e]=isWebGLSupported(e)),isWebGLSupportedCache[e]}function isWebGLSupported(e){var t=document.createElement(\"canvas\"),r=Object.create(isSupported.webGLContextAttributes);return r.failIfMajorPerformanceCaveat=e,t.probablySupportsContext?t.probablySupportsContext(\"webgl\",r)||t.probablySupportsContext(\"experimental-webgl\",r):t.supportsContext?t.supportsContext(\"webgl\",r)||t.supportsContext(\"experimental-webgl\",r):t.getContext(\"webgl\",r)||t.getContext(\"experimental-webgl\",r)}\"undefined\"!=typeof module&&module.exports?module.exports=isSupported:window&&(window.mapboxgl=window.mapboxgl||{},window.mapboxgl.supported=isSupported);var isWebGLSupportedCache={};isSupported.webGLContextAttributes={antialias:!1,alpha:!0,stencil:!0,depth:!0};\n},{}],23:[function(require,module,exports){\n(function (process){\nfunction normalizeArray(r,t){for(var e=0,n=r.length-1;n>=0;n--){var s=r[n];\".\"===s?r.splice(n,1):\"..\"===s?(r.splice(n,1),e++):e&&(r.splice(n,1),e--)}if(t)for(;e--;e)r.unshift(\"..\");return r}function filter(r,t){if(r.filter)return r.filter(t);for(var e=[],n=0;n=-1&&!t;e--){var n=e>=0?arguments[e]:process.cwd();if(\"string\"!=typeof n)throw new TypeError(\"Arguments to path.resolve must be strings\");n&&(r=n+\"/\"+r,t=\"/\"===n.charAt(0))}return r=normalizeArray(filter(r.split(\"/\"),function(r){return!!r}),!t).join(\"/\"),(t?\"/\":\"\")+r||\".\"},exports.normalize=function(r){var t=exports.isAbsolute(r),e=\"/\"===substr(r,-1);return r=normalizeArray(filter(r.split(\"/\"),function(r){return!!r}),!t).join(\"/\"),r||t||(r=\".\"),r&&e&&(r+=\"/\"),(t?\"/\":\"\")+r},exports.isAbsolute=function(r){return\"/\"===r.charAt(0)},exports.join=function(){var r=Array.prototype.slice.call(arguments,0);return exports.normalize(filter(r,function(r,t){if(\"string\"!=typeof r)throw new TypeError(\"Arguments to path.join must be strings\");return r}).join(\"/\"))},exports.relative=function(r,t){function e(r){for(var t=0;t=0&&\"\"===r[e];e--);return t>e?[]:r.slice(t,e-t+1)}r=exports.resolve(r).substr(1),t=exports.resolve(t).substr(1);for(var n=e(r.split(\"/\")),s=e(t.split(\"/\")),i=Math.min(n.length,s.length),o=i,u=0;u55295&&e<57344){if(!r){e>56319||o+1===n?i.push(239,191,189):r=e;continue}if(e<56320){i.push(239,191,189),r=e;continue}e=r-55296<<10|e-56320|65536,r=null}else r&&(i.push(239,191,189),r=null);e<128?i.push(e):e<2048?i.push(e>>6|192,63&e|128):e<65536?i.push(e>>12|224,e>>6&63|128,63&e|128):i.push(e>>18|240,e>>12&63|128,e>>6&63|128,63&e|128)}return i}module.exports=Buffer;var ieee754=require(\"ieee754\"),BufferMethods,lastStr,lastStrEncoded;BufferMethods={readUInt32LE:function(t){return(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},writeUInt32LE:function(t,e){this[e]=t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24},readInt32LE:function(t){return(this[t]|this[t+1]<<8|this[t+2]<<16)+(this[t+3]<<24)},readFloatLE:function(t){return ieee754.read(this,t,!0,23,4)},readDoubleLE:function(t){return ieee754.read(this,t,!0,52,8)},writeFloatLE:function(t,e){return ieee754.write(this,t,e,!0,23,4)},writeDoubleLE:function(t,e){return ieee754.write(this,t,e,!0,52,8)},toString:function(t,e,r){var n=\"\",i=\"\";e=e||0,r=Math.min(this.length,r||this.length);for(var o=e;o=1;){if(i.pos>=e)throw new Error(\"Given varint doesn't fit into 10 bytes\");var r=255&t;i.buf[i.pos++]=r|(t>=128?128:0),t/=128}}function reallocForRawMessage(t,i,e){var r=i<=16383?1:i<=2097151?2:i<=268435455?3:Math.ceil(Math.log(i)/(7*Math.LN2));e.realloc(r);for(var s=e.pos-1;s>=t;s--)e.buf[s+r]=e.buf[s]}function writePackedVarint(t,i){for(var e=0;e>3,n=this.pos;t(s,i,this),this.pos===n&&this.skip(r)}return i},readMessage:function(t,i){return this.readFields(t,i,this.readVarint()+this.pos)},readFixed32:function(){var t=this.buf.readUInt32LE(this.pos);return this.pos+=4,t},readSFixed32:function(){var t=this.buf.readInt32LE(this.pos);return this.pos+=4,t},readFixed64:function(){var t=this.buf.readUInt32LE(this.pos)+this.buf.readUInt32LE(this.pos+4)*SHIFT_LEFT_32;return this.pos+=8,t},readSFixed64:function(){var t=this.buf.readUInt32LE(this.pos)+this.buf.readInt32LE(this.pos+4)*SHIFT_LEFT_32;return this.pos+=8,t},readFloat:function(){var t=this.buf.readFloatLE(this.pos);return this.pos+=4,t},readDouble:function(){var t=this.buf.readDoubleLE(this.pos);return this.pos+=8,t},readVarint:function(){var t,i,e=this.buf;return i=e[this.pos++],t=127&i,i<128?t:(i=e[this.pos++],t|=(127&i)<<7,i<128?t:(i=e[this.pos++],t|=(127&i)<<14,i<128?t:(i=e[this.pos++],t|=(127&i)<<21,i<128?t:readVarintRemainder(t,this))))},readVarint64:function(){var t=this.pos,i=this.readVarint();if(i127;);else if(i===Pbf.Bytes)this.pos=this.readVarint()+this.pos;else if(i===Pbf.Fixed32)this.pos+=4;else{if(i!==Pbf.Fixed64)throw new Error(\"Unimplemented type: \"+i);this.pos+=8}},writeTag:function(t,i){this.writeVarint(t<<3|i)},realloc:function(t){for(var i=this.length||16;i268435455?void writeBigVarint(t,this):(this.realloc(4),this.buf[this.pos++]=127&t|(t>127?128:0),void(t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=t>>>7&127)))))},writeSVarint:function(t){this.writeVarint(t<0?2*-t-1:2*t)},writeBoolean:function(t){this.writeVarint(Boolean(t))},writeString:function(t){t=String(t);var i=Buffer.byteLength(t);this.writeVarint(i),this.realloc(i),this.buf.write(t,this.pos),this.pos+=i},writeFloat:function(t){this.realloc(4),this.buf.writeFloatLE(t,this.pos),this.pos+=4},writeDouble:function(t){this.realloc(8),this.buf.writeDoubleLE(t,this.pos),this.pos+=8},writeBytes:function(t){var i=t.length;this.writeVarint(i),this.realloc(i);for(var e=0;e=128&&reallocForRawMessage(e,r,this),this.pos=e-1,this.writeVarint(r),this.pos+=r},writeMessage:function(t,i,e){this.writeTag(t,Pbf.Bytes),this.writeRawMessage(i,e)},writePackedVarint:function(t,i){this.writeMessage(t,writePackedVarint,i)},writePackedSVarint:function(t,i){this.writeMessage(t,writePackedSVarint,i)},writePackedBoolean:function(t,i){this.writeMessage(t,writePackedBoolean,i)},writePackedFloat:function(t,i){this.writeMessage(t,writePackedFloat,i)},writePackedDouble:function(t,i){this.writeMessage(t,writePackedDouble,i)},writePackedFixed32:function(t,i){this.writeMessage(t,writePackedFixed32,i)},writePackedSFixed32:function(t,i){this.writeMessage(t,writePackedSFixed32,i)},writePackedFixed64:function(t,i){this.writeMessage(t,writePackedFixed64,i)},writePackedSFixed64:function(t,i){this.writeMessage(t,writePackedSFixed64,i)},writeBytesField:function(t,i){this.writeTag(t,Pbf.Bytes),this.writeBytes(i)},writeFixed32Field:function(t,i){this.writeTag(t,Pbf.Fixed32),this.writeFixed32(i)},writeSFixed32Field:function(t,i){this.writeTag(t,Pbf.Fixed32),this.writeSFixed32(i)},writeFixed64Field:function(t,i){this.writeTag(t,Pbf.Fixed64),this.writeFixed64(i)},writeSFixed64Field:function(t,i){this.writeTag(t,Pbf.Fixed64),this.writeSFixed64(i)},writeVarintField:function(t,i){this.writeTag(t,Pbf.Varint),this.writeVarint(i)},writeSVarintField:function(t,i){this.writeTag(t,Pbf.Varint),this.writeSVarint(i)},writeStringField:function(t,i){this.writeTag(t,Pbf.Bytes),this.writeString(i)},writeFloatField:function(t,i){this.writeTag(t,Pbf.Fixed32),this.writeFloat(i)},writeDoubleField:function(t,i){this.writeTag(t,Pbf.Fixed64),this.writeDouble(i)},writeBooleanField:function(t,i){this.writeVarintField(t,Boolean(i))}};\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n\n},{\"./buffer\":24}],26:[function(require,module,exports){\n\"use strict\";function Point(t,n){this.x=t,this.y=n}module.exports=Point,Point.prototype={clone:function(){return new Point(this.x,this.y)},add:function(t){return this.clone()._add(t)},sub:function(t){return this.clone()._sub(t)},mult:function(t){return this.clone()._mult(t)},div:function(t){return this.clone()._div(t)},rotate:function(t){return this.clone()._rotate(t)},matMult:function(t){return this.clone()._matMult(t)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(t){return this.x===t.x&&this.y===t.y},dist:function(t){return Math.sqrt(this.distSqr(t))},distSqr:function(t){var n=t.x-this.x,i=t.y-this.y;return n*n+i*i},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(t){return Math.atan2(this.y-t.y,this.x-t.x)},angleWith:function(t){return this.angleWithSep(t.x,t.y)},angleWithSep:function(t,n){return Math.atan2(this.x*n-this.y*t,this.x*t+this.y*n)},_matMult:function(t){var n=t[0]*this.x+t[1]*this.y,i=t[2]*this.x+t[3]*this.y;return this.x=n,this.y=i,this},_add:function(t){return this.x+=t.x,this.y+=t.y,this},_sub:function(t){return this.x-=t.x,this.y-=t.y,this},_mult:function(t){return this.x*=t,this.y*=t,this},_div:function(t){return this.x/=t,this.y/=t,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var t=this.y;return this.y=this.x,this.x=-t,this},_rotate:function(t){var n=Math.cos(t),i=Math.sin(t),s=n*this.x-i*this.y,r=i*this.x+n*this.y;return this.x=s,this.y=r,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},Point.convert=function(t){return t instanceof Point?t:Array.isArray(t)?new Point(t[0],t[1]):t};\n},{}],27:[function(require,module,exports){\nfunction defaultSetTimout(){throw new Error(\"setTimeout has not been defined\")}function defaultClearTimeout(){throw new Error(\"clearTimeout has not been defined\")}function runTimeout(e){if(cachedSetTimeout===setTimeout)return setTimeout(e,0);if((cachedSetTimeout===defaultSetTimout||!cachedSetTimeout)&&setTimeout)return cachedSetTimeout=setTimeout,setTimeout(e,0);try{return cachedSetTimeout(e,0)}catch(t){try{return cachedSetTimeout.call(null,e,0)}catch(t){return cachedSetTimeout.call(this,e,0)}}}function runClearTimeout(e){if(cachedClearTimeout===clearTimeout)return clearTimeout(e);if((cachedClearTimeout===defaultClearTimeout||!cachedClearTimeout)&&clearTimeout)return cachedClearTimeout=clearTimeout,clearTimeout(e);try{return cachedClearTimeout(e)}catch(t){try{return cachedClearTimeout.call(null,e)}catch(t){return cachedClearTimeout.call(this,e)}}}function cleanUpNextTick(){draining&¤tQueue&&(draining=!1,currentQueue.length?queue=currentQueue.concat(queue):queueIndex=-1,queue.length&&drainQueue())}function drainQueue(){if(!draining){var e=runTimeout(cleanUpNextTick);draining=!0;for(var t=queue.length;t;){for(currentQueue=queue,queue=[];++queueIndex1)for(var u=1;ur;){if(o-r>600){var f=o-r+1,e=t-r+1,l=Math.log(f),s=.5*Math.exp(2*l/3),i=.5*Math.sqrt(l*s*(f-s)/f)*(e-f/2<0?-1:1),n=Math.max(r,Math.floor(t-e*s/f+i)),h=Math.min(o,Math.floor(t+(f-e)*s/f+i));partialSort(a,t,n,h,p)}var u=a[t],M=r,w=o;for(swap(a,r,t),p(a[o],u)>0&&swap(a,r,o);M0;)w--}0===p(a[r],u)?swap(a,r,w):(w++,swap(a,w,o)),w<=t&&(r=w+1),t<=w&&(o=w-1)}}function swap(a,t,r){var o=a[t];a[t]=a[r],a[r]=o}function defaultCompare(a,t){return at?1:0}module.exports=partialSort;\n},{}],29:[function(require,module,exports){\n\"use strict\";function supercluster(t){return new SuperCluster(t)}function SuperCluster(t){this.options=extend(Object.create(this.options),t),this.trees=new Array(this.options.maxZoom+1)}function createCluster(t,e,o,n){return{x:t,y:e,zoom:1/0,id:n,numPoints:o}}function createPointCluster(t,e){var o=t.geometry.coordinates;return createCluster(lngX(o[0]),latY(o[1]),1,e)}function getClusterJSON(t){return{type:\"Feature\",properties:getClusterProperties(t),geometry:{type:\"Point\",coordinates:[xLng(t.x),yLat(t.y)]}}}function getClusterProperties(t){var e=t.numPoints,o=e>=1e4?Math.round(e/1e3)+\"k\":e>=1e3?Math.round(e/100)/10+\"k\":e;return{cluster:!0,point_count:e,point_count_abbreviated:o}}function lngX(t){return t/360+.5}function latY(t){var e=Math.sin(t*Math.PI/180),o=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return o<0?0:o>1?1:o}function xLng(t){return 360*(t-.5)}function yLat(t){var e=(180-360*t)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}function extend(t,e){for(var o in e)t[o]=e[o];return t}function getX(t){return t.x}function getY(t){return t.y}var kdbush=require(\"kdbush\");module.exports=supercluster,SuperCluster.prototype={options:{minZoom:0,maxZoom:16,radius:40,extent:512,nodeSize:64,log:!1},load:function(t){var e=this.options.log;e&&console.time(\"total time\");var o=\"prepare \"+t.length+\" points\";e&&console.time(o),this.points=t;var n=t.map(createPointCluster);e&&console.timeEnd(o);for(var r=this.options.maxZoom;r>=this.options.minZoom;r--){var i=+Date.now();this.trees[r+1]=kdbush(n,getX,getY,this.options.nodeSize,Float32Array),n=this._cluster(n,r),e&&console.log(\"z%d: %d clusters in %dms\",r,n.length,+Date.now()-i)}return this.trees[this.options.minZoom]=kdbush(n,getX,getY,this.options.nodeSize,Float32Array),e&&console.timeEnd(\"total time\"),this},getClusters:function(t,e){for(var o=this.trees[this._limitZoom(e)],n=o.range(lngX(t[0]),latY(t[3]),lngX(t[2]),latY(t[1])),r=[],i=0;i=0;a--)this._down(a)}function defaultCompare(t,i){return ti?1:0}function swap(t,i,a){var n=t[i];t[i]=t[a],t[a]=n}module.exports=TinyQueue,TinyQueue.prototype={push:function(t){this.data.push(t),this.length++,this._up(this.length-1)},pop:function(){var t=this.data[0];return this.data[0]=this.data[this.length-1],this.length--,this.data.pop(),this._down(0),t},peek:function(){return this.data[0]},_up:function(t){for(var i=this.data,a=this.compare;t>0;){var n=Math.floor((t-1)/2);if(!(a(i[t],i[n])<0))break;swap(i,n,t),t=n}},_down:function(t){for(var i=this.data,a=this.compare,n=this.length;;){var e=2*t+1,h=e+1,s=t;if(e=3&&(t.depth=arguments[2]),arguments.length>=4&&(t.colors=arguments[3]),isBoolean(r)?t.showHidden=r:r&&exports._extend(t,r),isUndefined(t.showHidden)&&(t.showHidden=!1),isUndefined(t.depth)&&(t.depth=2),isUndefined(t.colors)&&(t.colors=!1),isUndefined(t.customInspect)&&(t.customInspect=!0),t.colors&&(t.stylize=stylizeWithColor),formatValue(t,e,t.depth)}function stylizeWithColor(e,r){var t=inspect.styles[r];return t?\"\u001b[\"+inspect.colors[t][0]+\"m\"+e+\"\u001b[\"+inspect.colors[t][1]+\"m\":e}function stylizeNoColor(e,r){return e}function arrayToHash(e){var r={};return e.forEach(function(e,t){r[e]=!0}),r}function formatValue(e,r,t){if(e.customInspect&&r&&isFunction(r.inspect)&&r.inspect!==exports.inspect&&(!r.constructor||r.constructor.prototype!==r)){var n=r.inspect(t,e);return isString(n)||(n=formatValue(e,n,t)),n}var i=formatPrimitive(e,r);if(i)return i;var o=Object.keys(r),s=arrayToHash(o);if(e.showHidden&&(o=Object.getOwnPropertyNames(r)),isError(r)&&(o.indexOf(\"message\")>=0||o.indexOf(\"description\")>=0))return formatError(r);if(0===o.length){if(isFunction(r)){var u=r.name?\": \"+r.name:\"\";return e.stylize(\"[Function\"+u+\"]\",\"special\")}if(isRegExp(r))return e.stylize(RegExp.prototype.toString.call(r),\"regexp\");if(isDate(r))return e.stylize(Date.prototype.toString.call(r),\"date\");if(isError(r))return formatError(r)}var c=\"\",a=!1,l=[\"{\",\"}\"];if(isArray(r)&&(a=!0,l=[\"[\",\"]\"]),isFunction(r)){var p=r.name?\": \"+r.name:\"\";c=\" [Function\"+p+\"]\"}if(isRegExp(r)&&(c=\" \"+RegExp.prototype.toString.call(r)),isDate(r)&&(c=\" \"+Date.prototype.toUTCString.call(r)),isError(r)&&(c=\" \"+formatError(r)),0===o.length&&(!a||0==r.length))return l[0]+c+l[1];if(t<0)return isRegExp(r)?e.stylize(RegExp.prototype.toString.call(r),\"regexp\"):e.stylize(\"[Object]\",\"special\");e.seen.push(r);var f;return f=a?formatArray(e,r,t,s,o):o.map(function(n){return formatProperty(e,r,t,s,n,a)}),e.seen.pop(),reduceToSingleString(f,c,l)}function formatPrimitive(e,r){if(isUndefined(r))return e.stylize(\"undefined\",\"undefined\");if(isString(r)){var t=\"'\"+JSON.stringify(r).replace(/^\"|\"$/g,\"\").replace(/'/g,\"\\\\'\").replace(/\\\\\"/g,'\"')+\"'\";return e.stylize(t,\"string\")}return isNumber(r)?e.stylize(\"\"+r,\"number\"):isBoolean(r)?e.stylize(\"\"+r,\"boolean\"):isNull(r)?e.stylize(\"null\",\"null\"):void 0}function formatError(e){return\"[\"+Error.prototype.toString.call(e)+\"]\"}function formatArray(e,r,t,n,i){for(var o=[],s=0,u=r.length;s-1&&(u=o?u.split(\"\\n\").map(function(e){return\" \"+e}).join(\"\\n\").substr(2):\"\\n\"+u.split(\"\\n\").map(function(e){return\" \"+e}).join(\"\\n\"))):u=e.stylize(\"[Circular]\",\"special\")),isUndefined(s)){if(o&&i.match(/^\\d+$/))return u;s=JSON.stringify(\"\"+i),s.match(/^\"([a-zA-Z_][a-zA-Z_0-9]*)\"$/)?(s=s.substr(1,s.length-2),s=e.stylize(s,\"name\")):(s=s.replace(/'/g,\"\\\\'\").replace(/\\\\\"/g,'\"').replace(/(^\"|\"$)/g,\"'\"),s=e.stylize(s,\"string\"))}return s+\": \"+u}function reduceToSingleString(e,r,t){var n=0,i=e.reduce(function(e,r){return n++,r.indexOf(\"\\n\")>=0&&n++,e+r.replace(/\\u001b\\[\\d\\d?m/g,\"\").length+1},0);return i>60?t[0]+(\"\"===r?\"\":r+\"\\n \")+\" \"+e.join(\",\\n \")+\" \"+t[1]:t[0]+r+\" \"+e.join(\", \")+\" \"+t[1]}function isArray(e){return Array.isArray(e)}function isBoolean(e){return\"boolean\"==typeof e}function isNull(e){return null===e}function isNullOrUndefined(e){return null==e}function isNumber(e){return\"number\"==typeof e}function isString(e){return\"string\"==typeof e}function isSymbol(e){return\"symbol\"==typeof e}function isUndefined(e){return void 0===e}function isRegExp(e){return isObject(e)&&\"[object RegExp]\"===objectToString(e)}function isObject(e){return\"object\"==typeof e&&null!==e}function isDate(e){return isObject(e)&&\"[object Date]\"===objectToString(e)}function isError(e){return isObject(e)&&(\"[object Error]\"===objectToString(e)||e instanceof Error)}function isFunction(e){return\"function\"==typeof e}function isPrimitive(e){return null===e||\"boolean\"==typeof e||\"number\"==typeof e||\"string\"==typeof e||\"symbol\"==typeof e||\"undefined\"==typeof e}function objectToString(e){return Object.prototype.toString.call(e)}function pad(e){return e<10?\"0\"+e.toString(10):e.toString(10)}function timestamp(){var e=new Date,r=[pad(e.getHours()),pad(e.getMinutes()),pad(e.getSeconds())].join(\":\");return[e.getDate(),months[e.getMonth()],r].join(\" \")}function hasOwnProperty(e,r){return Object.prototype.hasOwnProperty.call(e,r)}var formatRegExp=/%[sdj%]/g;exports.format=function(e){if(!isString(e)){for(var r=[],t=0;t=i)return e;switch(e){case\"%s\":return String(n[t++]);case\"%d\":return Number(n[t++]);case\"%j\":try{return JSON.stringify(n[t++])}catch(e){return\"[Circular]\"}default:return e}}),s=n[t];t>3}if(a--,1===i||2===i)o+=e.readSVarint(),n+=e.readSVarint(),1===i&&(t&&s.push(t),t=[]),t.push(new Point(o,n));else{if(7!==i)throw new Error(\"unknown command \"+i);t&&t.push(t[0].clone())}}return t&&s.push(t),s},VectorTileFeature.prototype.bbox=function(){var e=this._pbf;e.pos=this._geometry;for(var t=e.readVarint()+e.pos,r=1,i=0,a=0,o=0,n=1/0,s=-(1/0),p=1/0,h=-(1/0);e.pos>3}if(i--,1===r||2===r)a+=e.readSVarint(),o+=e.readSVarint(),as&&(s=a),oh&&(h=o);else if(7!==r)throw new Error(\"unknown command \"+r)}return[n,p,s,h]},VectorTileFeature.prototype.toGeoJSON=function(e,t,r){function i(e){for(var t=0;t>3;t=1===a?e.readString():2===a?e.readFloat():3===a?e.readDouble():4===a?e.readVarint64():5===a?e.readVarint():6===a?e.readSVarint():7===a?e.readBoolean():null}return t}var VectorTileFeature=require(\"./vectortilefeature.js\");module.exports=VectorTileLayer,VectorTileLayer.prototype.feature=function(e){if(e<0||e>=this._features.length)throw new Error(\"feature index out of bounds\");this._pbf.pos=this._features[e];var t=this._pbf.readVarint()+this._pbf.pos;return new VectorTileFeature(this._pbf,t,this.extent,this._keys,this._values)};\n},{\"./vectortilefeature.js\":36}],38:[function(require,module,exports){\nfunction fromVectorTileJs(e){var r=[];for(var o in e.layers)r.push(prepareLayer(e.layers[o]));var t=new Pbf;return vtpb.tile.write({layers:r},t),t.finish()}function fromGeojsonVt(e){var r={};for(var o in e)r[o]=new GeoJSONWrapper(e[o].features),r[o].name=o;return fromVectorTileJs({layers:r})}function prepareLayer(e){for(var r={name:e.name||\"\",version:e.version||1,extent:e.extent||4096,keys:[],values:[],features:[]},o={},t={},n=0;n>31}function encodeGeometry(e){for(var r=[],o=0,t=0,n=e.length,a=0;aArrayGroup.MAX_VERTEX_ARRAY_LENGTH)&&(e=new Segment(this.layoutVertexArray.length,this.elementArray.length),this.segments.push(e)),e},ArrayGroup.prototype.prepareSegment2=function(r){var e=this.segments2[this.segments2.length-1];return(!e||e.vertexLength+r>ArrayGroup.MAX_VERTEX_ARRAY_LENGTH)&&(e=new Segment(this.layoutVertexArray.length,this.elementArray2.length),this.segments2.push(e)),e},ArrayGroup.prototype.populatePaintArrays=function(r){var e=this;for(var t in e.layerData){var a=e.layerData[t];0!==a.paintVertexArray.bytesPerElement&&a.programConfiguration.populatePaintArray(a.layer,a.paintVertexArray,a.paintPropertyStatistics,e.layoutVertexArray.length,e.globalProperties,r)}},ArrayGroup.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},ArrayGroup.prototype.serialize=function(r){return{layoutVertexArray:this.layoutVertexArray.serialize(r),elementArray:this.elementArray&&this.elementArray.serialize(r),elementArray2:this.elementArray2&&this.elementArray2.serialize(r),paintVertexArrays:serializePaintVertexArrays(this.layerData,r),segments:this.segments,segments2:this.segments2}},ArrayGroup.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,module.exports=ArrayGroup;\n},{\"./program_configuration\":58}],45:[function(require,module,exports){\n\"use strict\";var ArrayGroup=require(\"./array_group\"),BufferGroup=require(\"./buffer_group\"),util=require(\"../util/util\"),Bucket=function(r,t){this.zoom=r.zoom,this.overscaling=r.overscaling,this.layers=r.layers,this.index=r.index,r.arrays?this.buffers=new BufferGroup(t,r.layers,r.zoom,r.arrays):this.arrays=new ArrayGroup(t,r.layers,r.zoom)};Bucket.prototype.populate=function(r,t){for(var e=this,i=0,a=r;i=EXTENT||o<0||o>=EXTENT)){var n=r.prepareSegment(4),u=n.vertexLength;addCircleVertex(r.layoutVertexArray,y,o,-1,-1),addCircleVertex(r.layoutVertexArray,y,o,1,-1),addCircleVertex(r.layoutVertexArray,y,o,1,1),addCircleVertex(r.layoutVertexArray,y,o,-1,1),r.elementArray.emplaceBack(u,u+1,u+2),r.elementArray.emplaceBack(u,u+3,u+2),n.vertexLength+=4,n.primitiveLength+=2}}r.populatePaintArrays(e.properties)},r}(Bucket);CircleBucket.programInterface=circleInterface,module.exports=CircleBucket;\n},{\"../bucket\":45,\"../element_array_type\":53,\"../extent\":54,\"../load_geometry\":56,\"../vertex_array_type\":60}],47:[function(require,module,exports){\n\"use strict\";var Bucket=require(\"../bucket\"),createVertexArrayType=require(\"../vertex_array_type\"),createElementArrayType=require(\"../element_array_type\"),loadGeometry=require(\"../load_geometry\"),earcut=require(\"earcut\"),classifyRings=require(\"../../util/classify_rings\"),EARCUT_MAX_RINGS=500,fillInterface={layoutVertexArrayType:createVertexArrayType([{name:\"a_pos\",components:2,type:\"Int16\"}]),elementArrayType:createElementArrayType(3),elementArrayType2:createElementArrayType(2),paintAttributes:[{property:\"fill-color\",type:\"Uint8\"},{property:\"fill-outline-color\",type:\"Uint8\"},{property:\"fill-opacity\",type:\"Uint8\",multiplier:255}]},FillBucket=function(e){function r(r){e.call(this,r,fillInterface)}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.addFeature=function(e){for(var r=this.arrays,t=0,a=classifyRings(loadGeometry(e),EARCUT_MAX_RINGS);tEXTENT)||e.y===r.y&&(e.y<0||e.y>EXTENT)}var Bucket=require(\"../bucket\"),createVertexArrayType=require(\"../vertex_array_type\"),createElementArrayType=require(\"../element_array_type\"),loadGeometry=require(\"../load_geometry\"),EXTENT=require(\"../extent\"),earcut=require(\"earcut\"),classifyRings=require(\"../../util/classify_rings\"),EARCUT_MAX_RINGS=500,fillExtrusionInterface={layoutVertexArrayType:createVertexArrayType([{name:\"a_pos\",components:2,type:\"Int16\"},{name:\"a_normal\",components:3,type:\"Int16\"},{name:\"a_edgedistance\",components:1,type:\"Int16\"}]),elementArrayType:createElementArrayType(3),paintAttributes:[{property:\"fill-extrusion-base\",type:\"Uint16\"},{property:\"fill-extrusion-height\",type:\"Uint16\"},{property:\"fill-extrusion-color\",type:\"Uint8\"}]},FACTOR=Math.pow(2,13),FillExtrusionBucket=function(e){function r(r){e.call(this,r,fillExtrusionInterface)}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.addFeature=function(e){for(var r=this.arrays,t=0,a=classifyRings(loadGeometry(e),EARCUT_MAX_RINGS);t=1){var A=d[h-1];if(!isBoundaryEdge(g,A)){var _=g.sub(A)._perp()._unit();addVertex(r.layoutVertexArray,g.x,g.y,_.x,_.y,0,0,m),addVertex(r.layoutVertexArray,g.x,g.y,_.x,_.y,0,1,m),m+=A.dist(g),addVertex(r.layoutVertexArray,A.x,A.y,_.x,_.y,0,0,m),addVertex(r.layoutVertexArray,A.x,A.y,_.x,_.y,0,1,m);var v=p.vertexLength;r.elementArray.emplaceBack(v,v+1,v+2),r.elementArray.emplaceBack(v+1,v+2,v+3),p.vertexLength+=4,p.primitiveLength+=2}}u.push(g.x),u.push(g.y)}}}for(var E=earcut(u,c),T=0;T>6)}var Bucket=require(\"../bucket\"),createVertexArrayType=require(\"../vertex_array_type\"),createElementArrayType=require(\"../element_array_type\"),loadGeometry=require(\"../load_geometry\"),EXTENT=require(\"../extent\"),VectorTileFeature=require(\"vector-tile\").VectorTileFeature,EXTRUDE_SCALE=63,COS_HALF_SHARP_CORNER=Math.cos(37.5*(Math.PI/180)),SHARP_CORNER_OFFSET=15,LINE_DISTANCE_BUFFER_BITS=15,LINE_DISTANCE_SCALE=.5,MAX_LINE_DISTANCE=Math.pow(2,LINE_DISTANCE_BUFFER_BITS-1)/LINE_DISTANCE_SCALE,lineInterface={layoutVertexArrayType:createVertexArrayType([{name:\"a_pos\",components:2,type:\"Int16\"},{name:\"a_data\",components:4,type:\"Uint8\"}]),paintAttributes:[{property:\"line-color\",type:\"Uint8\"},{property:\"line-blur\",multiplier:10,type:\"Uint8\"},{property:\"line-opacity\",multiplier:10,type:\"Uint8\"},{property:\"line-gap-width\",multiplier:10,type:\"Uint8\",name:\"a_gapwidth\"},{property:\"line-offset\",multiplier:1,type:\"Int8\"}],elementArrayType:createElementArrayType()},LineBucket=function(e){function t(t){e.call(this,t,lineInterface)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.addFeature=function(e){for(var t=this,r=this.layers[0].layout,i=r[\"line-join\"],a=r[\"line-cap\"],n=r[\"line-miter-limit\"],d=r[\"line-round-limit\"],s=0,u=loadGeometry(e,LINE_DISTANCE_BUFFER_BITS);s=2&&e[l-1].equals(e[l-2]);)l--;if(!(l<(u?3:2))){\"bevel\"===r&&(a=1.05);var o=SHARP_CORNER_OFFSET*(EXTENT/(512*this.overscaling)),p=e[0],c=this.arrays,_=c.prepareSegment(10*l);this.distance=0;var y,h,m,E,x,C,v,A=i,f=u?\"butt\":i,L=!0;this.e1=this.e2=this.e3=-1,u&&(y=e[l-2],x=p.sub(y)._unit()._perp());for(var V=0;V0){var b=y.dist(h);if(b>2*o){var R=y.sub(y.sub(h)._mult(o/b)._round());d.distance+=R.dist(h),d.addCurrentVertex(R,d.distance,E.mult(1),0,0,!1,_),h=R}}var g=h&&m,F=g?r:m?A:f;if(g&&\"round\"===F&&(Ia&&(F=\"bevel\"),\"bevel\"===F&&(I>2&&(F=\"flipbevel\"),I100)S=x.clone().mult(-1);else{var B=E.x*x.y-E.y*x.x>0?-1:1,k=I*E.add(x).mag()/E.sub(x).mag();S._perp()._mult(k*B)}d.addCurrentVertex(y,d.distance,S,0,0,!1,_),d.addCurrentVertex(y,d.distance,S.mult(-1),0,0,!1,_)}else if(\"bevel\"===F||\"fakeround\"===F){var D=E.x*x.y-E.y*x.x>0,P=-Math.sqrt(I*I-1);if(D?(v=0,C=P):(C=0,v=P),L||d.addCurrentVertex(y,d.distance,E,C,v,!1,_),\"fakeround\"===F){for(var U=Math.floor(8*(.5-(T-.5))),q=void 0,M=0;M=0;O--)q=E.mult((O+1)/(U+1))._add(x)._unit(),d.addPieSliceVertex(y,d.distance,q,D,_)}m&&d.addCurrentVertex(y,d.distance,x,-C,-v,!1,_)}else\"butt\"===F?(L||d.addCurrentVertex(y,d.distance,E,0,0,!1,_),m&&d.addCurrentVertex(y,d.distance,x,0,0,!1,_)):\"square\"===F?(L||(d.addCurrentVertex(y,d.distance,E,1,1,!1,_),d.e1=d.e2=-1),m&&d.addCurrentVertex(y,d.distance,x,-1,-1,!1,_)):\"round\"===F&&(L||(d.addCurrentVertex(y,d.distance,E,0,0,!1,_),d.addCurrentVertex(y,d.distance,E,1,1,!0,_),d.e1=d.e2=-1),m&&(d.addCurrentVertex(y,d.distance,x,-1,-1,!0,_),d.addCurrentVertex(y,d.distance,x,0,0,!1,_)));if(N&&V2*o){var H=y.add(m.sub(y)._mult(o/X)._round());d.distance+=H.dist(y),d.addCurrentVertex(H,d.distance,x.mult(1),0,0,!1,_),y=H}}L=!1}c.populatePaintArrays(s)}},t.prototype.addCurrentVertex=function(e,t,r,i,a,n,d){var s,u=n?1:0,l=this.arrays,o=l.layoutVertexArray,p=l.elementArray;s=r.clone(),i&&s._sub(r.perp()._mult(i)),addLineVertex(o,e,s,u,0,i,t),this.e3=d.vertexLength++,this.e1>=0&&this.e2>=0&&(p.emplaceBack(this.e1,this.e2,this.e3),d.primitiveLength++),this.e1=this.e2,this.e2=this.e3,s=r.mult(-1),a&&s._sub(r.perp()._mult(a)),addLineVertex(o,e,s,u,1,-a,t),this.e3=d.vertexLength++,this.e1>=0&&this.e2>=0&&(p.emplaceBack(this.e1,this.e2,this.e3),d.primitiveLength++),this.e1=this.e2,this.e2=this.e3,t>MAX_LINE_DISTANCE/2&&(this.distance=0,this.addCurrentVertex(e,this.distance,r,i,a,n,d))},t.prototype.addPieSliceVertex=function(e,t,r,i,a){var n=i?1:0;r=r.mult(i?-1:1);var d=this.arrays,s=d.layoutVertexArray,u=d.elementArray;addLineVertex(s,e,r,0,n,0,t),this.e3=a.vertexLength++,this.e1>=0&&this.e2>=0&&(u.emplaceBack(this.e1,this.e2,this.e3),a.primitiveLength++),i?this.e2=this.e3:this.e1=this.e3},t}(Bucket);LineBucket.programInterface=lineInterface,module.exports=LineBucket;\n},{\"../bucket\":45,\"../element_array_type\":53,\"../extent\":54,\"../load_geometry\":56,\"../vertex_array_type\":60,\"vector-tile\":34}],50:[function(require,module,exports){\n\"use strict\";function addVertex(e,t,o,r,a,i,n,l,s,c,y){e.emplaceBack(t,o,Math.round(64*r),Math.round(64*a),i/4,n/4,10*(c||0),y,10*(l||0),10*Math.min(s||25,25))}function addCollisionBoxVertex(e,t,o,r,a){return e.emplaceBack(t.x,t.y,Math.round(o.x),Math.round(o.y),10*r,10*a)}var Point=require(\"point-geometry\"),ArrayGroup=require(\"../array_group\"),BufferGroup=require(\"../buffer_group\"),createVertexArrayType=require(\"../vertex_array_type\"),createElementArrayType=require(\"../element_array_type\"),EXTENT=require(\"../extent\"),Anchor=require(\"../../symbol/anchor\"),getAnchors=require(\"../../symbol/get_anchors\"),resolveTokens=require(\"../../util/token\"),Quads=require(\"../../symbol/quads\"),Shaping=require(\"../../symbol/shaping\"),resolveText=require(\"../../symbol/resolve_text\"),mergeLines=require(\"../../symbol/mergelines\"),clipLine=require(\"../../symbol/clip_line\"),util=require(\"../../util/util\"),scriptDetection=require(\"../../util/script_detection\"),loadGeometry=require(\"../load_geometry\"),CollisionFeature=require(\"../../symbol/collision_feature\"),findPoleOfInaccessibility=require(\"../../util/find_pole_of_inaccessibility\"),classifyRings=require(\"../../util/classify_rings\"),VectorTileFeature=require(\"vector-tile\").VectorTileFeature,rtlTextPlugin=require(\"../../source/rtl_text_plugin\"),shapeText=Shaping.shapeText,shapeIcon=Shaping.shapeIcon,WritingMode=Shaping.WritingMode,getGlyphQuads=Quads.getGlyphQuads,getIconQuads=Quads.getIconQuads,elementArrayType=createElementArrayType(),layoutVertexArrayType=createVertexArrayType([{name:\"a_pos_offset\",components:4,type:\"Int16\"},{name:\"a_texture_pos\",components:2,type:\"Uint16\"},{name:\"a_data\",components:4,type:\"Uint8\"}]),symbolInterfaces={glyph:{layoutVertexArrayType:layoutVertexArrayType,elementArrayType:elementArrayType,paintAttributes:[{name:\"a_fill_color\",property:\"text-color\",type:\"Uint8\"},{name:\"a_halo_color\",property:\"text-halo-color\",type:\"Uint8\"},{name:\"a_halo_width\",property:\"text-halo-width\",type:\"Uint16\",multiplier:10},{name:\"a_halo_blur\",property:\"text-halo-blur\",type:\"Uint16\",multiplier:10},{name:\"a_opacity\",property:\"text-opacity\",type:\"Uint8\",multiplier:255}]},icon:{layoutVertexArrayType:layoutVertexArrayType,elementArrayType:elementArrayType,paintAttributes:[{name:\"a_fill_color\",property:\"icon-color\",type:\"Uint8\"},{name:\"a_halo_color\",property:\"icon-halo-color\",type:\"Uint8\"},{name:\"a_halo_width\",property:\"icon-halo-width\",type:\"Uint16\",multiplier:10},{name:\"a_halo_blur\",property:\"icon-halo-blur\",type:\"Uint16\",multiplier:10},{name:\"a_opacity\",property:\"icon-opacity\",type:\"Uint8\",multiplier:255}]},collisionBox:{layoutVertexArrayType:createVertexArrayType([{name:\"a_pos\",components:2,type:\"Int16\"},{name:\"a_extrude\",components:2,type:\"Int16\"},{name:\"a_data\",components:2,type:\"Uint8\"}]),elementArrayType:createElementArrayType(2)}},SymbolBucket=function(e){var t=this;if(this.collisionBoxArray=e.collisionBoxArray,this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.index=e.index,this.sdfIcons=e.sdfIcons,this.iconsNeedLinear=e.iconsNeedLinear,this.adjustedTextSize=e.adjustedTextSize,this.adjustedIconSize=e.adjustedIconSize,this.fontstack=e.fontstack,e.arrays){this.buffers={};for(var o in e.arrays)e.arrays[o]&&(t.buffers[o]=new BufferGroup(symbolInterfaces[o],e.layers,e.zoom,e.arrays[o]))}};SymbolBucket.prototype.populate=function(e,t){var o=this,r=this.layers[0],a=r.layout,i=a[\"text-font\"],n=a[\"icon-image\"],l=i&&(!r.isLayoutValueFeatureConstant(\"text-field\")||a[\"text-field\"]),s=n;if(this.features=[],l||s){for(var c=t.iconDependencies,y=t.glyphDependencies,p=y[i]=y[i]||{},x=0;xEXTENT||i.y<0||i.y>EXTENT);if(!x||n){var l=n||f;r.addSymbolInstance(i,a,t,o,r.layers[0],l,r.collisionBoxArray,e.index,e.sourceLayerIndex,r.index,s,h,m,y,u,g,{zoom:r.zoom},e.properties)}};if(\"line\"===b)for(var S=0,T=clipLine(e.geometry,0,0,EXTENT,EXTENT);S=0;i--)if(o.dist(a[i])7*Math.PI/4)continue}else if(r&&a&&d<=3*Math.PI/4||d>5*Math.PI/4)continue}else if(r&&a&&(d<=Math.PI/2||d>3*Math.PI/2))continue;var m=u.tl,g=u.tr,f=u.bl,b=u.br,v=u.tex,I=u.anchorPoint,S=Math.max(y+Math.log(u.minScale)/Math.LN2,p),T=Math.min(y+Math.log(u.maxScale)/Math.LN2,25);if(!(T<=S)){S===p&&(S=0);var M=Math.round(u.glyphAngle/(2*Math.PI)*256),B=e.prepareSegment(4),A=B.vertexLength;addVertex(c,I.x,I.y,m.x,m.y,v.x,v.y,S,T,p,M),addVertex(c,I.x,I.y,g.x,g.y,v.x+v.w,v.y,S,T,p,M),addVertex(c,I.x,I.y,f.x,f.y,v.x,v.y+v.h,S,T,p,M),addVertex(c,I.x,I.y,b.x,b.y,v.x+v.w,v.y+v.h,S,T,p,M),s.emplaceBack(A,A+1,A+2),s.emplaceBack(A+1,A+2,A+3),B.vertexLength+=4,B.primitiveLength+=2}}e.populatePaintArrays(n)},SymbolBucket.prototype.addToDebugBuffers=function(e){for(var t=this,o=this.arrays.collisionBox,r=o.layoutVertexArray,a=o.elementArray,i=-e.angle,n=e.yStretch,l=0,s=t.symbolInstances;lSymbolBucket.MAX_INSTANCES&&util.warnOnce(\"Too many symbols being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907\"),z>SymbolBucket.MAX_INSTANCES&&util.warnOnce(\"Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907\");var _=(o[WritingMode.vertical]?WritingMode.vertical:0)|(o[WritingMode.horizontal]?WritingMode.horizontal:0);this.symbolInstances.push({textBoxStartIndex:M,textBoxEndIndex:B,iconBoxStartIndex:A,iconBoxEndIndex:z,glyphQuads:I,iconQuads:v,anchor:e,featureIndex:l,featureProperties:g,writingModes:_})},SymbolBucket.programInterfaces=symbolInterfaces,SymbolBucket.MAX_INSTANCES=65535,module.exports=SymbolBucket;\n},{\"../../source/rtl_text_plugin\":90,\"../../symbol/anchor\":157,\"../../symbol/clip_line\":159,\"../../symbol/collision_feature\":161,\"../../symbol/get_anchors\":163,\"../../symbol/mergelines\":166,\"../../symbol/quads\":167,\"../../symbol/resolve_text\":168,\"../../symbol/shaping\":169,\"../../util/classify_rings\":195,\"../../util/find_pole_of_inaccessibility\":201,\"../../util/script_detection\":209,\"../../util/token\":211,\"../../util/util\":212,\"../array_group\":44,\"../buffer_group\":52,\"../element_array_type\":53,\"../extent\":54,\"../load_geometry\":56,\"../vertex_array_type\":60,\"point-geometry\":26,\"vector-tile\":34}],51:[function(require,module,exports){\n\"use strict\";var AttributeType={Int8:\"BYTE\",Uint8:\"UNSIGNED_BYTE\",Int16:\"SHORT\",Uint16:\"UNSIGNED_SHORT\"},Buffer=function(e,t,r){this.arrayBuffer=e.arrayBuffer,this.length=e.length,this.attributes=t.members,this.itemSize=t.bytesPerElement,this.type=r,this.arrayType=t};Buffer.fromStructArray=function(e,t){return new Buffer(e.serialize(),e.constructor.serialize(),t)},Buffer.prototype.bind=function(e){var t=e[this.type];this.buffer?e.bindBuffer(t,this.buffer):(this.gl=e,this.buffer=e.createBuffer(),e.bindBuffer(t,this.buffer),e.bufferData(t,this.arrayBuffer,e.STATIC_DRAW),this.arrayBuffer=null)},Buffer.prototype.setVertexAttribPointers=function(e,t,r){for(var f=this,i=0;i0?t+2*e:e}function translate(e,t,r,i,a){if(!t[0]&&!t[1])return e;t=Point.convert(t),\"viewport\"===r&&t._rotate(-i);for(var n=[],s=0;sr.max||d.yr.max)&&util.warnOnce(\"Geometry exceeds allowed extent, reduce your vector tile buffer size\")}return u};\n},{\"../util/util\":212,\"./extent\":54}],57:[function(require,module,exports){\n\"use strict\";var createStructArrayType=require(\"../util/struct_array\"),PosArray=createStructArrayType({members:[{name:\"a_pos\",type:\"Int16\",components:2}]});module.exports=PosArray;\n},{\"../util/struct_array\":210}],58:[function(require,module,exports){\n\"use strict\";function getPaintAttributeValue(t,r,e,i){if(!t.zoomStops)return r.getPaintValue(t.property,e,i);var a=t.zoomStops.map(function(a){return r.getPaintValue(t.property,util.extend({},e,{zoom:a}),i)});return 1===a.length?a[0]:a}function normalizePaintAttribute(t,r){var e=t.name;e||(e=t.property.replace(r.type+\"-\",\"\").replace(/-/g,\"_\"));var i=\"color\"===r._paintSpecifications[t.property].type;return util.extend({name:\"a_\"+e,components:i?4:1,multiplier:i?255:1,dimensions:i?4:1},t)}var createVertexArrayType=require(\"./vertex_array_type\"),util=require(\"../util/util\"),ProgramConfiguration=function(){this.attributes=[],this.uniforms=[],this.interpolationUniforms=[],this.pragmas={vertex:{},fragment:{}},this.cacheKey=\"\"};ProgramConfiguration.createDynamic=function(t,r,e){for(var i=new ProgramConfiguration,a=0,n=t;a90||this.lat<-90)throw new Error(\"Invalid LngLat latitude value: must be between -90 and 90\")};LngLat.prototype.wrap=function(){return new LngLat(wrap(this.lng,-180,180),this.lat)},LngLat.prototype.toArray=function(){return[this.lng,this.lat]},LngLat.prototype.toString=function(){return\"LngLat(\"+this.lng+\", \"+this.lat+\")\"},LngLat.convert=function(t){if(t instanceof LngLat)return t;if(t&&t.hasOwnProperty(\"lng\")&&t.hasOwnProperty(\"lat\"))return new LngLat(t.lng,t.lat);if(Array.isArray(t)&&2===t.length)return new LngLat(t[0],t[1]);throw new Error(\"`LngLatLike` argument must be specified as a LngLat instance, an object {lng: , lat: }, or an array of [, ]\")},module.exports=LngLat;\n},{\"../util/util\":212}],63:[function(require,module,exports){\n\"use strict\";var LngLat=require(\"./lng_lat\"),LngLatBounds=function(t,n){t&&(n?this.setSouthWest(t).setNorthEast(n):4===t.length?this.setSouthWest([t[0],t[1]]).setNorthEast([t[2],t[3]]):this.setSouthWest(t[0]).setNorthEast(t[1]))};LngLatBounds.prototype.setNorthEast=function(t){return this._ne=LngLat.convert(t),this},LngLatBounds.prototype.setSouthWest=function(t){return this._sw=LngLat.convert(t),this},LngLatBounds.prototype.extend=function(t){var n,e,s=this._sw,o=this._ne;if(t instanceof LngLat)n=t,e=t;else{if(!(t instanceof LngLatBounds))return Array.isArray(t)?t.every(Array.isArray)?this.extend(LngLatBounds.convert(t)):this.extend(LngLat.convert(t)):this;if(n=t._sw,e=t._ne,!n||!e)return this}return s||o?(s.lng=Math.min(n.lng,s.lng),s.lat=Math.min(n.lat,s.lat),o.lng=Math.max(e.lng,o.lng),o.lat=Math.max(e.lat,o.lat)):(this._sw=new LngLat(n.lng,n.lat),this._ne=new LngLat(e.lng,e.lat)),this},LngLatBounds.prototype.getCenter=function(){return new LngLat((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},LngLatBounds.prototype.getSouthWest=function(){return this._sw},LngLatBounds.prototype.getNorthEast=function(){return this._ne},LngLatBounds.prototype.getNorthWest=function(){return new LngLat(this.getWest(),this.getNorth())},LngLatBounds.prototype.getSouthEast=function(){return new LngLat(this.getEast(),this.getSouth())},LngLatBounds.prototype.getWest=function(){return this._sw.lng},LngLatBounds.prototype.getSouth=function(){return this._sw.lat},LngLatBounds.prototype.getEast=function(){return this._ne.lng},LngLatBounds.prototype.getNorth=function(){return this._ne.lat},LngLatBounds.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},LngLatBounds.prototype.toString=function(){return\"LngLatBounds(\"+this._sw.toString()+\", \"+this._ne.toString()+\")\"},LngLatBounds.convert=function(t){return!t||t instanceof LngLatBounds?t:new LngLatBounds(t)},module.exports=LngLatBounds;\n},{\"./lng_lat\":62}],64:[function(require,module,exports){\n\"use strict\";var LngLat=require(\"./lng_lat\"),Point=require(\"point-geometry\"),Coordinate=require(\"./coordinate\"),util=require(\"../util/util\"),interp=require(\"../util/interpolate\"),TileCoord=require(\"../source/tile_coord\"),EXTENT=require(\"../data/extent\"),glmatrix=require(\"@mapbox/gl-matrix\"),vec4=glmatrix.vec4,mat4=glmatrix.mat4,mat2=glmatrix.mat2,Transform=function(t,i,o){this.tileSize=512,this._renderWorldCopies=void 0===o||o,this._minZoom=t||0,this._maxZoom=i||22,this.latRange=[-85.05113,85.05113],this.width=0,this.height=0,this._center=new LngLat(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0},prototypeAccessors={minZoom:{},maxZoom:{},worldSize:{},centerPoint:{},size:{},bearing:{},pitch:{},fov:{},zoom:{},center:{},unmodified:{},x:{},y:{},point:{}};prototypeAccessors.minZoom.get=function(){return this._minZoom},prototypeAccessors.minZoom.set=function(t){this._minZoom!==t&&(this._minZoom=t,this.zoom=Math.max(this.zoom,t))},prototypeAccessors.maxZoom.get=function(){return this._maxZoom},prototypeAccessors.maxZoom.set=function(t){this._maxZoom!==t&&(this._maxZoom=t,this.zoom=Math.min(this.zoom,t))},prototypeAccessors.worldSize.get=function(){return this.tileSize*this.scale},prototypeAccessors.centerPoint.get=function(){return this.size._div(2)},prototypeAccessors.size.get=function(){return new Point(this.width,this.height)},prototypeAccessors.bearing.get=function(){return-this.angle/Math.PI*180},prototypeAccessors.bearing.set=function(t){var i=-util.wrap(t,-180,180)*Math.PI/180;this.angle!==i&&(this._unmodified=!1,this.angle=i,this._calcMatrices(),this.rotationMatrix=mat2.create(),mat2.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},prototypeAccessors.pitch.get=function(){return this._pitch/Math.PI*180},prototypeAccessors.pitch.set=function(t){var i=util.clamp(t,0,60)/180*Math.PI;this._pitch!==i&&(this._unmodified=!1,this._pitch=i,this._calcMatrices())},prototypeAccessors.fov.get=function(){return this._fov/Math.PI*180},prototypeAccessors.fov.set=function(t){t=Math.max(.01,Math.min(60,t)),this._fov!==t&&(this._unmodified=!1,this._fov=t/180*Math.PI,this._calcMatrices())},prototypeAccessors.zoom.get=function(){return this._zoom},prototypeAccessors.zoom.set=function(t){var i=Math.min(Math.max(t,this.minZoom),this.maxZoom);this._zoom!==i&&(this._unmodified=!1,this._zoom=i,this.scale=this.zoomScale(i),this.tileZoom=Math.floor(i),this.zoomFraction=i-this.tileZoom,this._constrain(),this._calcMatrices())},prototypeAccessors.center.get=function(){return this._center},prototypeAccessors.center.set=function(t){t.lat===this._center.lat&&t.lng===this._center.lng||(this._unmodified=!1,this._center=t,this._constrain(),this._calcMatrices())},Transform.prototype.coveringZoomLevel=function(t){return(t.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/t.tileSize))},Transform.prototype.coveringTiles=function(t){var i=this.coveringZoomLevel(t),o=i;if(it.maxzoom&&(i=t.maxzoom);var e=this.pointCoordinate(this.centerPoint,i),r=new Point(e.column-.5,e.row-.5),n=[this.pointCoordinate(new Point(0,0),i),this.pointCoordinate(new Point(this.width,0),i),this.pointCoordinate(new Point(this.width,this.height),i),this.pointCoordinate(new Point(0,this.height),i)];return TileCoord.cover(i,n,t.reparseOverscaled?o:i,this._renderWorldCopies).sort(function(t,i){return r.dist(t)-r.dist(i)})},Transform.prototype.resize=function(t,i){this.width=t,this.height=i,this.pixelsToGLUnits=[2/t,-2/i],this._constrain(),this._calcMatrices()},prototypeAccessors.unmodified.get=function(){return this._unmodified},Transform.prototype.zoomScale=function(t){return Math.pow(2,t)},Transform.prototype.scaleZoom=function(t){return Math.log(t)/Math.LN2},Transform.prototype.project=function(t){return new Point(this.lngX(t.lng),this.latY(t.lat))},Transform.prototype.unproject=function(t){return new LngLat(this.xLng(t.x),this.yLat(t.y))},prototypeAccessors.x.get=function(){return this.lngX(this.center.lng)},prototypeAccessors.y.get=function(){return this.latY(this.center.lat)},prototypeAccessors.point.get=function(){return new Point(this.x,this.y)},Transform.prototype.lngX=function(t){return(180+t)*this.worldSize/360},Transform.prototype.latY=function(t){var i=180/Math.PI*Math.log(Math.tan(Math.PI/4+t*Math.PI/360));return(180-i)*this.worldSize/360},Transform.prototype.xLng=function(t){return 360*t/this.worldSize-180},Transform.prototype.yLat=function(t){var i=180-360*t/this.worldSize;return 360/Math.PI*Math.atan(Math.exp(i*Math.PI/180))-90},Transform.prototype.setLocationAtPoint=function(t,i){var o=this.pointCoordinate(i)._sub(this.pointCoordinate(this.centerPoint));this.center=this.coordinateLocation(this.locationCoordinate(t)._sub(o))},Transform.prototype.locationPoint=function(t){return this.coordinatePoint(this.locationCoordinate(t))},Transform.prototype.pointLocation=function(t){return this.coordinateLocation(this.pointCoordinate(t))},Transform.prototype.locationCoordinate=function(t){return new Coordinate(this.lngX(t.lng)/this.tileSize,this.latY(t.lat)/this.tileSize,this.zoom).zoomTo(this.tileZoom)},Transform.prototype.coordinateLocation=function(t){var i=t.zoomTo(this.zoom);return new LngLat(this.xLng(i.column*this.tileSize),this.yLat(i.row*this.tileSize))},Transform.prototype.pointCoordinate=function(t,i){void 0===i&&(i=this.tileZoom);var o=0,e=[t.x,t.y,0,1],r=[t.x,t.y,1,1];vec4.transformMat4(e,e,this.pixelMatrixInverse),vec4.transformMat4(r,r,this.pixelMatrixInverse);var n=e[3],s=r[3],a=e[0]/n,h=r[0]/s,c=e[1]/n,m=r[1]/s,p=e[2]/n,l=r[2]/s,u=p===l?0:(o-p)/(l-p);return new Coordinate(interp(a,h,u)/this.tileSize,interp(c,m,u)/this.tileSize,this.zoom)._zoomTo(i)},Transform.prototype.coordinatePoint=function(t){var i=t.zoomTo(this.zoom),o=[i.column*this.tileSize,i.row*this.tileSize,0,1];return vec4.transformMat4(o,o,this.pixelMatrix),new Point(o[0]/o[3],o[1]/o[3])},Transform.prototype.calculatePosMatrix=function(t,i){var o=t.toCoordinate(i),e=this.worldSize/this.zoomScale(o.zoom),r=mat4.identity(new Float64Array(16));return mat4.translate(r,r,[o.column*e,o.row*e,0]),mat4.scale(r,r,[e/EXTENT,e/EXTENT,1]),mat4.multiply(r,this.projMatrix,r),new Float32Array(r)},Transform.prototype._constrain=function(){if(this.center&&this.width&&this.height&&!this._constraining){this._constraining=!0;var t,i,o,e,r,n,s,a,h=this.size,c=this._unmodified;this.latRange&&(t=this.latY(this.latRange[1]),i=this.latY(this.latRange[0]),r=i-ti&&(a=i-l)}if(this.lngRange){var u=this.x,f=h.x/2;u-fe&&(s=e-f)}void 0===s&&void 0===a||(this.center=this.unproject(new Point(void 0!==s?s:this.x,void 0!==a?a:this.y))),this._unmodified=c,this._constraining=!1}},Transform.prototype._calcMatrices=function(){if(this.height){this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height;var t=this._fov/2,i=Math.PI/2+this._pitch,o=Math.sin(t)*this.cameraToCenterDistance/Math.sin(Math.PI-i-t),e=Math.cos(Math.PI/2-this._pitch)*o+this.cameraToCenterDistance,r=1.01*e,n=new Float64Array(16);mat4.perspective(n,this._fov,this.width/this.height,1,r),mat4.scale(n,n,[1,-1,1]),mat4.translate(n,n,[0,0,-this.cameraToCenterDistance]),mat4.rotateX(n,n,this._pitch),mat4.rotateZ(n,n,this.angle),mat4.translate(n,n,[-this.x,-this.y,0]);var s=this.worldSize/(2*Math.PI*6378137*Math.abs(Math.cos(this.center.lat*(Math.PI/180))));if(mat4.scale(n,n,[1,1,s,1]),this.projMatrix=n,n=mat4.create(),mat4.scale(n,n,[this.width/2,-this.height/2,1]),mat4.translate(n,n,[1,-1,0]),this.pixelMatrix=mat4.multiply(new Float64Array(16),n,this.projMatrix),n=mat4.invert(new Float64Array(16),this.pixelMatrix),!n)throw new Error(\"failed to invert matrix\");this.pixelMatrixInverse=n}},Object.defineProperties(Transform.prototype,prototypeAccessors),module.exports=Transform;\n},{\"../data/extent\":54,\"../source/tile_coord\":94,\"../util/interpolate\":204,\"../util/util\":212,\"./coordinate\":61,\"./lng_lat\":62,\"@mapbox/gl-matrix\":1,\"point-geometry\":26}],65:[function(require,module,exports){\n\"use strict\";var browser=require(\"./util/browser\"),mapboxgl=module.exports={};mapboxgl.version=require(\"../package.json\").version,mapboxgl.workerCount=Math.max(Math.floor(browser.hardwareConcurrency/2),1),mapboxgl.Map=require(\"./ui/map\"),mapboxgl.NavigationControl=require(\"./ui/control/navigation_control\"),mapboxgl.GeolocateControl=require(\"./ui/control/geolocate_control\"),mapboxgl.AttributionControl=require(\"./ui/control/attribution_control\"),mapboxgl.ScaleControl=require(\"./ui/control/scale_control\"),mapboxgl.FullscreenControl=require(\"./ui/control/fullscreen_control\"),mapboxgl.Popup=require(\"./ui/popup\"),mapboxgl.Marker=require(\"./ui/marker\"),mapboxgl.Style=require(\"./style/style\"),mapboxgl.LngLat=require(\"./geo/lng_lat\"),mapboxgl.LngLatBounds=require(\"./geo/lng_lat_bounds\"),mapboxgl.Point=require(\"point-geometry\"),mapboxgl.Evented=require(\"./util/evented\"),mapboxgl.supported=require(\"./util/browser\").supported;var config=require(\"./util/config\");mapboxgl.config=config;var rtlTextPlugin=require(\"./source/rtl_text_plugin\");mapboxgl.setRTLTextPlugin=rtlTextPlugin.setRTLTextPlugin,Object.defineProperty(mapboxgl,\"accessToken\",{get:function(){return config.ACCESS_TOKEN},set:function(o){config.ACCESS_TOKEN=o}});\n},{\"../package.json\":43,\"./geo/lng_lat\":62,\"./geo/lng_lat_bounds\":63,\"./source/rtl_text_plugin\":90,\"./style/style\":146,\"./ui/control/attribution_control\":173,\"./ui/control/fullscreen_control\":174,\"./ui/control/geolocate_control\":175,\"./ui/control/navigation_control\":177,\"./ui/control/scale_control\":178,\"./ui/map\":187,\"./ui/marker\":188,\"./ui/popup\":189,\"./util/browser\":192,\"./util/config\":196,\"./util/evented\":200,\"point-geometry\":26}],66:[function(require,module,exports){\n\"use strict\";function drawBackground(r,t,e){var a=r.gl,i=r.transform,n=i.tileSize,o=e.paint[\"background-color\"],l=e.paint[\"background-pattern\"],u=e.paint[\"background-opacity\"],f=!l&&1===o[3]&&1===u;if(r.isOpaquePass===f){a.disable(a.STENCIL_TEST),r.setDepthSublayer(0);var s;l?(s=r.useProgram(\"fillPattern\",r.basicFillProgramConfiguration),pattern.prepare(l,r,s),r.tileExtentPatternVAO.bind(a,s,r.tileExtentBuffer)):(s=r.useProgram(\"fill\",r.basicFillProgramConfiguration),a.uniform4fv(s.u_color,o),r.tileExtentVAO.bind(a,s,r.tileExtentBuffer)),a.uniform1f(s.u_opacity,u);for(var c=i.coveringTiles({tileSize:n}),g=0,p=c;g\":[24,[4,18,20,9,4,0]],\"?\":[18,[3,16,3,17,4,19,5,20,7,21,11,21,13,20,14,19,15,17,15,15,14,13,13,12,9,10,9,7,-1,-1,9,2,8,1,9,0,10,1,9,2]],\"@\":[27,[18,13,17,15,15,16,12,16,10,15,9,14,8,11,8,8,9,6,11,5,14,5,16,6,17,8,-1,-1,12,16,10,14,9,11,9,8,10,6,11,5,-1,-1,18,16,17,8,17,6,19,5,21,5,23,7,24,10,24,12,23,15,22,17,20,19,18,20,15,21,12,21,9,20,7,19,5,17,4,15,3,12,3,9,4,6,5,4,7,2,9,1,12,0,15,0,18,1,20,2,21,3,-1,-1,19,16,18,8,18,6,19,5]],A:[18,[9,21,1,0,-1,-1,9,21,17,0,-1,-1,4,7,14,7]],B:[21,[4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,15,17,13,16,12,13,11,-1,-1,4,11,13,11,16,10,17,9,18,7,18,4,17,2,16,1,13,0,4,0]],C:[21,[18,16,17,18,15,20,13,21,9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5]],D:[21,[4,21,4,0,-1,-1,4,21,11,21,14,20,16,18,17,16,18,13,18,8,17,5,16,3,14,1,11,0,4,0]],E:[19,[4,21,4,0,-1,-1,4,21,17,21,-1,-1,4,11,12,11,-1,-1,4,0,17,0]],F:[18,[4,21,4,0,-1,-1,4,21,17,21,-1,-1,4,11,12,11]],G:[21,[18,16,17,18,15,20,13,21,9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,18,8,-1,-1,13,8,18,8]],H:[22,[4,21,4,0,-1,-1,18,21,18,0,-1,-1,4,11,18,11]],I:[8,[4,21,4,0]],J:[16,[12,21,12,5,11,2,10,1,8,0,6,0,4,1,3,2,2,5,2,7]],K:[21,[4,21,4,0,-1,-1,18,21,4,7,-1,-1,9,12,18,0]],L:[17,[4,21,4,0,-1,-1,4,0,16,0]],M:[24,[4,21,4,0,-1,-1,4,21,12,0,-1,-1,20,21,12,0,-1,-1,20,21,20,0]],N:[22,[4,21,4,0,-1,-1,4,21,18,0,-1,-1,18,21,18,0]],O:[22,[9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,19,8,19,13,18,16,17,18,15,20,13,21,9,21]],P:[21,[4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,14,17,12,16,11,13,10,4,10]],Q:[22,[9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,19,8,19,13,18,16,17,18,15,20,13,21,9,21,-1,-1,12,4,18,-2]],R:[21,[4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,15,17,13,16,12,13,11,4,11,-1,-1,11,11,18,0]],S:[20,[17,18,15,20,12,21,8,21,5,20,3,18,3,16,4,14,5,13,7,12,13,10,15,9,16,8,17,6,17,3,15,1,12,0,8,0,5,1,3,3]],T:[16,[8,21,8,0,-1,-1,1,21,15,21]],U:[22,[4,21,4,6,5,3,7,1,10,0,12,0,15,1,17,3,18,6,18,21]],V:[18,[1,21,9,0,-1,-1,17,21,9,0]],W:[24,[2,21,7,0,-1,-1,12,21,7,0,-1,-1,12,21,17,0,-1,-1,22,21,17,0]],X:[20,[3,21,17,0,-1,-1,17,21,3,0]],Y:[18,[1,21,9,11,9,0,-1,-1,17,21,9,11]],Z:[20,[17,21,3,0,-1,-1,3,21,17,21,-1,-1,3,0,17,0]],\"[\":[14,[4,25,4,-7,-1,-1,5,25,5,-7,-1,-1,4,25,11,25,-1,-1,4,-7,11,-7]],\"\\\\\":[14,[0,21,14,-3]],\"]\":[14,[9,25,9,-7,-1,-1,10,25,10,-7,-1,-1,3,25,10,25,-1,-1,3,-7,10,-7]],\"^\":[16,[6,15,8,18,10,15,-1,-1,3,12,8,17,13,12,-1,-1,8,17,8,0]],_:[16,[0,-2,16,-2]],\"`\":[10,[6,21,5,20,4,18,4,16,5,15,6,16,5,17]],a:[19,[15,14,15,0,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],b:[19,[4,21,4,0,-1,-1,4,11,6,13,8,14,11,14,13,13,15,11,16,8,16,6,15,3,13,1,11,0,8,0,6,1,4,3]],c:[18,[15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],d:[19,[15,21,15,0,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],e:[18,[3,8,15,8,15,10,14,12,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],f:[12,[10,21,8,21,6,20,5,17,5,0,-1,-1,2,14,9,14]],g:[19,[15,14,15,-2,14,-5,13,-6,11,-7,8,-7,6,-6,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],h:[19,[4,21,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0]],i:[8,[3,21,4,20,5,21,4,22,3,21,-1,-1,4,14,4,0]],j:[10,[5,21,6,20,7,21,6,22,5,21,-1,-1,6,14,6,-3,5,-6,3,-7,1,-7]],k:[17,[4,21,4,0,-1,-1,14,14,4,4,-1,-1,8,8,15,0]],l:[8,[4,21,4,0]],m:[30,[4,14,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0,-1,-1,15,10,18,13,20,14,23,14,25,13,26,10,26,0]],n:[19,[4,14,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0]],o:[19,[8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3,16,6,16,8,15,11,13,13,11,14,8,14]],p:[19,[4,14,4,-7,-1,-1,4,11,6,13,8,14,11,14,13,13,15,11,16,8,16,6,15,3,13,1,11,0,8,0,6,1,4,3]],q:[19,[15,14,15,-7,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],r:[13,[4,14,4,0,-1,-1,4,8,5,11,7,13,9,14,12,14]],s:[17,[14,11,13,13,10,14,7,14,4,13,3,11,4,9,6,8,11,7,13,6,14,4,14,3,13,1,10,0,7,0,4,1,3,3]],t:[12,[5,21,5,4,6,1,8,0,10,0,-1,-1,2,14,9,14]],u:[19,[4,14,4,4,5,1,7,0,10,0,12,1,15,4,-1,-1,15,14,15,0]],v:[16,[2,14,8,0,-1,-1,14,14,8,0]],w:[22,[3,14,7,0,-1,-1,11,14,7,0,-1,-1,11,14,15,0,-1,-1,19,14,15,0]],x:[17,[3,14,14,0,-1,-1,14,14,3,0]],y:[16,[2,14,8,0,-1,-1,14,14,8,0,6,-4,4,-6,2,-7,1,-7]],z:[17,[14,14,3,0,-1,-1,3,14,14,14,-1,-1,3,0,14,0]],\"{\":[14,[9,25,7,24,6,23,5,21,5,19,6,17,7,16,8,14,8,12,6,10,-1,-1,7,24,6,22,6,20,7,18,8,17,9,15,9,13,8,11,4,9,8,7,9,5,9,3,8,1,7,0,6,-2,6,-4,7,-6,-1,-1,6,8,8,6,8,4,7,2,6,1,5,-1,5,-3,6,-5,7,-6,9,-7]],\"|\":[8,[4,25,4,-7]],\"}\":[14,[5,25,7,24,8,23,9,21,9,19,8,17,7,16,6,14,6,12,8,10,-1,-1,7,24,8,22,8,20,7,18,6,17,5,15,5,13,6,11,10,9,6,7,5,5,5,3,6,1,7,0,8,-2,8,-4,7,-6,-1,-1,8,8,6,6,6,4,7,2,8,1,9,-1,9,-3,8,-5,7,-6,5,-7]],\"~\":[24,[3,6,3,8,4,11,6,12,8,12,10,11,14,8,16,7,18,7,20,8,21,10,-1,-1,3,8,4,10,6,11,8,11,10,10,14,7,16,6,18,6,20,7,21,10,21,12]]};\n},{\"../data/buffer\":51,\"../data/extent\":54,\"../data/pos_array\":57,\"../util/browser\":192,\"./vertex_array_object\":80,\"@mapbox/gl-matrix\":1}],70:[function(require,module,exports){\n\"use strict\";function drawFill(t,e,r,i){var a=t.gl;a.enable(a.STENCIL_TEST);var l=!r.paint[\"fill-pattern\"]&&r.isPaintValueFeatureConstant(\"fill-color\")&&r.isPaintValueFeatureConstant(\"fill-opacity\")&&1===r.paint[\"fill-color\"][3]&&1===r.paint[\"fill-opacity\"];t.isOpaquePass===l&&(t.setDepthSublayer(1),drawFillTiles(t,e,r,i,drawFillTile)),!t.isOpaquePass&&r.paint[\"fill-antialias\"]&&(t.lineWidth(2),t.depthMask(!1),t.setDepthSublayer(r.getPaintProperty(\"fill-outline-color\")?2:0),drawFillTiles(t,e,r,i,drawStrokeTile))}function drawFillTiles(t,e,r,i,a){for(var l=!0,n=0,o=i;n0?1/(1-r):1+r}function saturationFactor(r){return r>0?1-1/(1.001-r):-r}function getFadeValues(r,t,e,a){var i=e.paint[\"raster-fade-duration\"];if(r.sourceCache&&i>0){var o=Date.now(),n=(o-r.timeAdded)/i,u=t?(o-t.timeAdded)/i:-1,s=r.sourceCache.getSource(),c=a.coveringZoomLevel({tileSize:s.tileSize,roundZoom:s.roundZoom}),f=!t||Math.abs(t.coord.z-c)>Math.abs(r.coord.z-c),d=f&&r.refreshedUponExpiration?1:util.clamp(f?n:1-u,0,1);return r.refreshedUponExpiration&&n>=1&&(r.refreshedUponExpiration=!1),t?{opacity:1,mix:1-d}:{opacity:d,mix:0}}return{opacity:1,mix:0}}var util=require(\"../util/util\");module.exports=drawRaster;\n},{\"../util/util\":212}],74:[function(require,module,exports){\n\"use strict\";function drawSymbols(e,t,a,i){if(!e.isOpaquePass){var o=!(a.layout[\"text-allow-overlap\"]||a.layout[\"icon-allow-overlap\"]||a.layout[\"text-ignore-placement\"]||a.layout[\"icon-ignore-placement\"]),r=e.gl;o?r.disable(r.STENCIL_TEST):r.enable(r.STENCIL_TEST),e.setDepthSublayer(0),e.depthMask(!1),drawLayerSymbols(e,t,a,i,!1,a.paint[\"icon-translate\"],a.paint[\"icon-translate-anchor\"],a.layout[\"icon-rotation-alignment\"],a.layout[\"icon-rotation-alignment\"],a.layout[\"icon-size\"]),drawLayerSymbols(e,t,a,i,!0,a.paint[\"text-translate\"],a.paint[\"text-translate-anchor\"],a.layout[\"text-rotation-alignment\"],a.layout[\"text-pitch-alignment\"],a.layout[\"text-size\"]),t.map.showCollisionBoxes&&drawCollisionDebug(e,t,a,i)}}function drawLayerSymbols(e,t,a,i,o,r,n,l,s,u){if(o||!e.style.sprite||e.style.sprite.loaded()){var f=e.gl,m=\"map\"===l,p=\"map\"===s,c=p;c?f.enable(f.DEPTH_TEST):f.disable(f.DEPTH_TEST);for(var d,_,h=0,g=i;hthis.previousZoom;a--)r.changeTimes[a]=e,r.changeOpacities[a]=r.opacities[a];for(a=0;a<256;a++){var s=e-r.changeTimes[a],o=255*(i?s/i:1);a<=t?r.opacities[a]=r.changeOpacities[a]+o:r.opacities[a]=r.changeOpacities[a]-o}this.changed=!0,this.previousZoom=t},FrameHistory.prototype.bind=function(e){this.texture?(e.bindTexture(e.TEXTURE_2D,this.texture),this.changed&&(e.texSubImage2D(e.TEXTURE_2D,0,0,0,256,1,e.ALPHA,e.UNSIGNED_BYTE,this.array),this.changed=!1)):(this.texture=e.createTexture(),e.bindTexture(e.TEXTURE_2D,this.texture),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texImage2D(e.TEXTURE_2D,0,e.ALPHA,256,1,0,e.ALPHA,e.UNSIGNED_BYTE,this.array))},module.exports=FrameHistory;\n},{}],76:[function(require,module,exports){\n\"use strict\";var util=require(\"../util/util\"),LineAtlas=function(t,i){this.width=t,this.height=i,this.nextRow=0,this.bytes=4,this.data=new Uint8Array(this.width*this.height*this.bytes),this.positions={}};LineAtlas.prototype.setSprite=function(t){this.sprite=t},LineAtlas.prototype.getDash=function(t,i){var e=t.join(\",\")+i;return this.positions[e]||(this.positions[e]=this.addDash(t,i)),this.positions[e]},LineAtlas.prototype.addDash=function(t,i){var e=this,h=i?7:0,s=2*h+1,a=128;if(this.nextRow+s>this.height)return util.warnOnce(\"LineAtlas out of space\"),null;for(var r=0,n=0;n0?r.pop():null},Painter.prototype.getViewportTexture=function(e,r){var t=this.reusableTextures.viewport;if(t)return t.width===e&&t.height===r?t:(this.gl.deleteTexture(t),void(this.reusableTextures.viewport=null))},Painter.prototype.lineWidth=function(e){this.gl.lineWidth(util.clamp(e,this.lineWidthRange[0],this.lineWidthRange[1]))},Painter.prototype.showOverdrawInspector=function(e){if(e||this._showOverdrawInspector){this._showOverdrawInspector=e;var r=this.gl;if(e){r.blendFunc(r.CONSTANT_COLOR,r.ONE);var t=8,i=1/t;r.blendColor(i,i,i,0),r.clearColor(0,0,0,1),r.clear(r.COLOR_BUFFER_BIT)}else r.blendFunc(r.ONE,r.ONE_MINUS_SRC_ALPHA)}},Painter.prototype.createProgram=function(e,r){var t=this.gl,i=t.createProgram(),a=shaders[e],s=\"#define MAPBOX_GL_JS\\n#define DEVICE_PIXEL_RATIO \"+browser.devicePixelRatio.toFixed(1)+\"\\n\";this._showOverdrawInspector&&(s+=\"#define OVERDRAW_INSPECTOR;\\n\");var o=r.applyPragmas(s+shaders.prelude.fragmentSource+a.fragmentSource,\"fragment\"),n=r.applyPragmas(s+shaders.prelude.vertexSource+a.vertexSource,\"vertex\"),l=t.createShader(t.FRAGMENT_SHADER);t.shaderSource(l,o),t.compileShader(l),t.attachShader(i,l);var h=t.createShader(t.VERTEX_SHADER);t.shaderSource(h,n),t.compileShader(h),t.attachShader(i,h),t.linkProgram(i);for(var u=t.getProgramParameter(i,t.ACTIVE_ATTRIBUTES),c={program:i,numAttributes:u},p=0;p>16,n>>16),o.uniform2f(i.u_pixel_coord_lower,65535&u,65535&n)};\n},{\"../source/pixels_to_tile_units\":87}],79:[function(require,module,exports){\n\"use strict\";var path=require(\"path\");module.exports={prelude:{fragmentSource:\"#ifdef GL_ES\\nprecision mediump float;\\n#else\\n\\n#if !defined(lowp)\\n#define lowp\\n#endif\\n\\n#if !defined(mediump)\\n#define mediump\\n#endif\\n\\n#if !defined(highp)\\n#define highp\\n#endif\\n\\n#endif\\n\",vertexSource:\"#ifdef GL_ES\\nprecision highp float;\\n#else\\n\\n#if !defined(lowp)\\n#define lowp\\n#endif\\n\\n#if !defined(mediump)\\n#define mediump\\n#endif\\n\\n#if !defined(highp)\\n#define highp\\n#endif\\n\\n#endif\\n\\nfloat evaluate_zoom_function_1(const vec4 values, const float t) {\\n if (t < 1.0) {\\n return mix(values[0], values[1], t);\\n } else if (t < 2.0) {\\n return mix(values[1], values[2], t - 1.0);\\n } else {\\n return mix(values[2], values[3], t - 2.0);\\n }\\n}\\nvec4 evaluate_zoom_function_4(const vec4 value0, const vec4 value1, const vec4 value2, const vec4 value3, const float t) {\\n if (t < 1.0) {\\n return mix(value0, value1, t);\\n } else if (t < 2.0) {\\n return mix(value1, value2, t - 1.0);\\n } else {\\n return mix(value2, value3, t - 2.0);\\n }\\n}\\n\\n\\n// To minimize the number of attributes needed in the mapbox-gl-native shaders,\\n// we encode a 4-component color into a pair of floats (i.e. a vec2) as follows:\\n// [ floor(color.r * 255) * 256 + color.g * 255,\\n// floor(color.b * 255) * 256 + color.g * 255 ]\\nvec4 decode_color(const vec2 encodedColor) {\\n float r = floor(encodedColor[0]/256.0)/255.0;\\n float g = (encodedColor[0] - r*256.0*255.0)/255.0;\\n float b = floor(encodedColor[1]/256.0)/255.0;\\n float a = (encodedColor[1] - b*256.0*255.0)/255.0;\\n return vec4(r, g, b, a);\\n}\\n\\n// Unpack a pair of paint values and interpolate between them.\\nfloat unpack_mix_vec2(const vec2 packedValue, const float t) {\\n return mix(packedValue[0], packedValue[1], t);\\n}\\n\\n// Unpack a pair of paint values and interpolate between them.\\nvec4 unpack_mix_vec4(const vec4 packedColors, const float t) {\\n vec4 minColor = decode_color(vec2(packedColors[0], packedColors[1]));\\n vec4 maxColor = decode_color(vec2(packedColors[2], packedColors[3]));\\n return mix(minColor, maxColor, t);\\n}\\n\\n// The offset depends on how many pixels are between the world origin and the edge of the tile:\\n// vec2 offset = mod(pixel_coord, size)\\n//\\n// At high zoom levels there are a ton of pixels between the world origin and the edge of the tile.\\n// The glsl spec only guarantees 16 bits of precision for highp floats. We need more than that.\\n//\\n// The pixel_coord is passed in as two 16 bit values:\\n// pixel_coord_upper = floor(pixel_coord / 2^16)\\n// pixel_coord_lower = mod(pixel_coord, 2^16)\\n//\\n// The offset is calculated in a series of steps that should preserve this precision:\\nvec2 get_pattern_pos(const vec2 pixel_coord_upper, const vec2 pixel_coord_lower,\\n const vec2 pattern_size, const float tile_units_to_pixels, const vec2 pos) {\\n\\n vec2 offset = mod(mod(mod(pixel_coord_upper, pattern_size) * 256.0, pattern_size) * 256.0 + pixel_coord_lower, pattern_size);\\n return (tile_units_to_pixels * pos + offset) / pattern_size;\\n}\\n\"},circle:{fragmentSource:\"#pragma mapbox: define lowp vec4 color\\n#pragma mapbox: define mediump float radius\\n#pragma mapbox: define lowp float blur\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define lowp vec4 stroke_color\\n#pragma mapbox: define mediump float stroke_width\\n#pragma mapbox: define lowp float stroke_opacity\\n\\nvarying vec2 v_extrude;\\nvarying lowp float v_antialiasblur;\\n\\nvoid main() {\\n #pragma mapbox: initialize lowp vec4 color\\n #pragma mapbox: initialize mediump float radius\\n #pragma mapbox: initialize lowp float blur\\n #pragma mapbox: initialize lowp float opacity\\n #pragma mapbox: initialize lowp vec4 stroke_color\\n #pragma mapbox: initialize mediump float stroke_width\\n #pragma mapbox: initialize lowp float stroke_opacity\\n\\n float extrude_length = length(v_extrude);\\n float antialiased_blur = -max(blur, v_antialiasblur);\\n\\n float opacity_t = smoothstep(0.0, antialiased_blur, extrude_length - 1.0);\\n\\n float color_t = stroke_width < 0.01 ? 0.0 : smoothstep(\\n antialiased_blur,\\n 0.0,\\n extrude_length - radius / (radius + stroke_width)\\n );\\n\\n gl_FragColor = opacity_t * mix(color * opacity, stroke_color * stroke_opacity, color_t);\\n\\n#ifdef OVERDRAW_INSPECTOR\\n gl_FragColor = vec4(1.0);\\n#endif\\n}\\n\",vertexSource:\"uniform mat4 u_matrix;\\nuniform bool u_scale_with_map;\\nuniform vec2 u_extrude_scale;\\n\\nattribute vec2 a_pos;\\n\\n#pragma mapbox: define lowp vec4 color\\n#pragma mapbox: define mediump float radius\\n#pragma mapbox: define lowp float blur\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define lowp vec4 stroke_color\\n#pragma mapbox: define mediump float stroke_width\\n#pragma mapbox: define lowp float stroke_opacity\\n\\nvarying vec2 v_extrude;\\nvarying lowp float v_antialiasblur;\\n\\nvoid main(void) {\\n #pragma mapbox: initialize lowp vec4 color\\n #pragma mapbox: initialize mediump float radius\\n #pragma mapbox: initialize lowp float blur\\n #pragma mapbox: initialize lowp float opacity\\n #pragma mapbox: initialize lowp vec4 stroke_color\\n #pragma mapbox: initialize mediump float stroke_width\\n #pragma mapbox: initialize lowp float stroke_opacity\\n\\n // unencode the extrusion vector that we snuck into the a_pos vector\\n v_extrude = vec2(mod(a_pos, 2.0) * 2.0 - 1.0);\\n\\n vec2 extrude = v_extrude * (radius + stroke_width) * u_extrude_scale;\\n // multiply a_pos by 0.5, since we had it * 2 in order to sneak\\n // in extrusion data\\n gl_Position = u_matrix * vec4(floor(a_pos * 0.5), 0, 1);\\n\\n if (u_scale_with_map) {\\n gl_Position.xy += extrude;\\n } else {\\n gl_Position.xy += extrude * gl_Position.w;\\n }\\n\\n // This is a minimum blur distance that serves as a faux-antialiasing for\\n // the circle. since blur is a ratio of the circle's size and the intent is\\n // to keep the blur at roughly 1px, the two are inversely related.\\n v_antialiasblur = 1.0 / DEVICE_PIXEL_RATIO / (radius + stroke_width);\\n}\\n\"},collisionBox:{fragmentSource:\"uniform float u_zoom;\\nuniform float u_maxzoom;\\n\\nvarying float v_max_zoom;\\nvarying float v_placement_zoom;\\n\\nvoid main() {\\n\\n float alpha = 0.5;\\n\\n gl_FragColor = vec4(0.0, 1.0, 0.0, 1.0) * alpha;\\n\\n if (v_placement_zoom > u_zoom) {\\n gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0) * alpha;\\n }\\n\\n if (u_zoom >= v_max_zoom) {\\n gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0) * alpha * 0.25;\\n }\\n\\n if (v_placement_zoom >= u_maxzoom) {\\n gl_FragColor = vec4(0.0, 0.0, 1.0, 1.0) * alpha * 0.2;\\n }\\n}\\n\",vertexSource:\"attribute vec2 a_pos;\\nattribute vec2 a_extrude;\\nattribute vec2 a_data;\\n\\nuniform mat4 u_matrix;\\nuniform float u_scale;\\n\\nvarying float v_max_zoom;\\nvarying float v_placement_zoom;\\n\\nvoid main() {\\n gl_Position = u_matrix * vec4(a_pos + a_extrude / u_scale, 0.0, 1.0);\\n\\n v_max_zoom = a_data.x;\\n v_placement_zoom = a_data.y;\\n}\\n\"},debug:{fragmentSource:\"uniform lowp vec4 u_color;\\n\\nvoid main() {\\n gl_FragColor = u_color;\\n}\\n\",vertexSource:\"attribute vec2 a_pos;\\n\\nuniform mat4 u_matrix;\\n\\nvoid main() {\\n gl_Position = u_matrix * vec4(a_pos, step(32767.0, a_pos.x), 1);\\n}\\n\"},fill:{fragmentSource:\"#pragma mapbox: define lowp vec4 color\\n#pragma mapbox: define lowp float opacity\\n\\nvoid main() {\\n #pragma mapbox: initialize lowp vec4 color\\n #pragma mapbox: initialize lowp float opacity\\n\\n gl_FragColor = color * opacity;\\n\\n#ifdef OVERDRAW_INSPECTOR\\n gl_FragColor = vec4(1.0);\\n#endif\\n}\\n\",vertexSource:\"attribute vec2 a_pos;\\n\\nuniform mat4 u_matrix;\\n\\n#pragma mapbox: define lowp vec4 color\\n#pragma mapbox: define lowp float opacity\\n\\nvoid main() {\\n #pragma mapbox: initialize lowp vec4 color\\n #pragma mapbox: initialize lowp float opacity\\n\\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\\n}\\n\"},fillOutline:{fragmentSource:\"#pragma mapbox: define lowp vec4 outline_color\\n#pragma mapbox: define lowp float opacity\\n\\nvarying vec2 v_pos;\\n\\nvoid main() {\\n #pragma mapbox: initialize lowp vec4 outline_color\\n #pragma mapbox: initialize lowp float opacity\\n\\n float dist = length(v_pos - gl_FragCoord.xy);\\n float alpha = smoothstep(1.0, 0.0, dist);\\n gl_FragColor = outline_color * (alpha * opacity);\\n\\n#ifdef OVERDRAW_INSPECTOR\\n gl_FragColor = vec4(1.0);\\n#endif\\n}\\n\",vertexSource:\"attribute vec2 a_pos;\\n\\nuniform mat4 u_matrix;\\nuniform vec2 u_world;\\n\\nvarying vec2 v_pos;\\n\\n#pragma mapbox: define lowp vec4 outline_color\\n#pragma mapbox: define lowp float opacity\\n\\nvoid main() {\\n #pragma mapbox: initialize lowp vec4 outline_color\\n #pragma mapbox: initialize lowp float opacity\\n\\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\\n v_pos = (gl_Position.xy / gl_Position.w + 1.0) / 2.0 * u_world;\\n}\\n\"},fillOutlinePattern:{fragmentSource:\"uniform vec2 u_pattern_tl_a;\\nuniform vec2 u_pattern_br_a;\\nuniform vec2 u_pattern_tl_b;\\nuniform vec2 u_pattern_br_b;\\nuniform float u_mix;\\n\\nuniform sampler2D u_image;\\n\\nvarying vec2 v_pos_a;\\nvarying vec2 v_pos_b;\\nvarying vec2 v_pos;\\n\\n#pragma mapbox: define lowp float opacity\\n\\nvoid main() {\\n #pragma mapbox: initialize lowp float opacity\\n\\n vec2 imagecoord = mod(v_pos_a, 1.0);\\n vec2 pos = mix(u_pattern_tl_a, u_pattern_br_a, imagecoord);\\n vec4 color1 = texture2D(u_image, pos);\\n\\n vec2 imagecoord_b = mod(v_pos_b, 1.0);\\n vec2 pos2 = mix(u_pattern_tl_b, u_pattern_br_b, imagecoord_b);\\n vec4 color2 = texture2D(u_image, pos2);\\n\\n // find distance to outline for alpha interpolation\\n\\n float dist = length(v_pos - gl_FragCoord.xy);\\n float alpha = smoothstep(1.0, 0.0, dist);\\n\\n\\n gl_FragColor = mix(color1, color2, u_mix) * alpha * opacity;\\n\\n#ifdef OVERDRAW_INSPECTOR\\n gl_FragColor = vec4(1.0);\\n#endif\\n}\\n\",vertexSource:\"uniform mat4 u_matrix;\\nuniform vec2 u_world;\\nuniform vec2 u_pattern_size_a;\\nuniform vec2 u_pattern_size_b;\\nuniform vec2 u_pixel_coord_upper;\\nuniform vec2 u_pixel_coord_lower;\\nuniform float u_scale_a;\\nuniform float u_scale_b;\\nuniform float u_tile_units_to_pixels;\\n\\nattribute vec2 a_pos;\\n\\nvarying vec2 v_pos_a;\\nvarying vec2 v_pos_b;\\nvarying vec2 v_pos;\\n\\n#pragma mapbox: define lowp float opacity\\n\\nvoid main() {\\n #pragma mapbox: initialize lowp float opacity\\n\\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\\n\\n v_pos_a = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_a * u_pattern_size_a, u_tile_units_to_pixels, a_pos);\\n v_pos_b = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_b * u_pattern_size_b, u_tile_units_to_pixels, a_pos);\\n\\n v_pos = (gl_Position.xy / gl_Position.w + 1.0) / 2.0 * u_world;\\n}\\n\"},fillPattern:{fragmentSource:\"uniform vec2 u_pattern_tl_a;\\nuniform vec2 u_pattern_br_a;\\nuniform vec2 u_pattern_tl_b;\\nuniform vec2 u_pattern_br_b;\\nuniform float u_mix;\\n\\nuniform sampler2D u_image;\\n\\nvarying vec2 v_pos_a;\\nvarying vec2 v_pos_b;\\n\\n#pragma mapbox: define lowp float opacity\\n\\nvoid main() {\\n #pragma mapbox: initialize lowp float opacity\\n\\n vec2 imagecoord = mod(v_pos_a, 1.0);\\n vec2 pos = mix(u_pattern_tl_a, u_pattern_br_a, imagecoord);\\n vec4 color1 = texture2D(u_image, pos);\\n\\n vec2 imagecoord_b = mod(v_pos_b, 1.0);\\n vec2 pos2 = mix(u_pattern_tl_b, u_pattern_br_b, imagecoord_b);\\n vec4 color2 = texture2D(u_image, pos2);\\n\\n gl_FragColor = mix(color1, color2, u_mix) * opacity;\\n\\n#ifdef OVERDRAW_INSPECTOR\\n gl_FragColor = vec4(1.0);\\n#endif\\n}\\n\",vertexSource:\"uniform mat4 u_matrix;\\nuniform vec2 u_pattern_size_a;\\nuniform vec2 u_pattern_size_b;\\nuniform vec2 u_pixel_coord_upper;\\nuniform vec2 u_pixel_coord_lower;\\nuniform float u_scale_a;\\nuniform float u_scale_b;\\nuniform float u_tile_units_to_pixels;\\n\\nattribute vec2 a_pos;\\n\\nvarying vec2 v_pos_a;\\nvarying vec2 v_pos_b;\\n\\n#pragma mapbox: define lowp float opacity\\n\\nvoid main() {\\n #pragma mapbox: initialize lowp float opacity\\n\\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\\n\\n v_pos_a = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_a * u_pattern_size_a, u_tile_units_to_pixels, a_pos);\\n v_pos_b = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_b * u_pattern_size_b, u_tile_units_to_pixels, a_pos);\\n}\\n\"},fillExtrusion:{fragmentSource:\"varying vec4 v_color;\\n#pragma mapbox: define lowp float base\\n#pragma mapbox: define lowp float height\\n#pragma mapbox: define lowp vec4 color\\n\\nvoid main() {\\n #pragma mapbox: initialize lowp float base\\n #pragma mapbox: initialize lowp float height\\n #pragma mapbox: initialize lowp vec4 color\\n\\n gl_FragColor = v_color;\\n\\n#ifdef OVERDRAW_INSPECTOR\\n gl_FragColor = vec4(1.0);\\n#endif\\n}\\n\",vertexSource:\"uniform mat4 u_matrix;\\nuniform vec3 u_lightcolor;\\nuniform lowp vec3 u_lightpos;\\nuniform lowp float u_lightintensity;\\n\\nattribute vec2 a_pos;\\nattribute vec3 a_normal;\\nattribute float a_edgedistance;\\n\\nvarying vec4 v_color;\\n\\n#pragma mapbox: define lowp float base\\n#pragma mapbox: define lowp float height\\n\\n#pragma mapbox: define lowp vec4 color\\n\\nvoid main() {\\n #pragma mapbox: initialize lowp float base\\n #pragma mapbox: initialize lowp float height\\n #pragma mapbox: initialize lowp vec4 color\\n\\n float ed = a_edgedistance; // use each attrib in order to not trip a VAO assert\\n float t = mod(a_normal.x, 2.0);\\n\\n gl_Position = u_matrix * vec4(a_pos, t > 0.0 ? height : base, 1);\\n\\n // Relative luminance (how dark/bright is the surface color?)\\n float colorvalue = color.r * 0.2126 + color.g * 0.7152 + color.b * 0.0722;\\n\\n v_color = vec4(0.0, 0.0, 0.0, 1.0);\\n\\n // Add slight ambient lighting so no extrusions are totally black\\n vec4 ambientlight = vec4(0.03, 0.03, 0.03, 1.0);\\n color += ambientlight;\\n\\n // Calculate cos(theta), where theta is the angle between surface normal and diffuse light ray\\n float directional = clamp(dot(a_normal / 16384.0, u_lightpos), 0.0, 1.0);\\n\\n // Adjust directional so that\\n // the range of values for highlight/shading is narrower\\n // with lower light intensity\\n // and with lighter/brighter surface colors\\n directional = mix((1.0 - u_lightintensity), max((1.0 - colorvalue + u_lightintensity), 1.0), directional);\\n\\n // Add gradient along z axis of side surfaces\\n if (a_normal.y != 0.0) {\\n directional *= clamp((t + base) * pow(height / 150.0, 0.5), mix(0.7, 0.98, 1.0 - u_lightintensity), 1.0);\\n }\\n\\n // Assign final color based on surface + ambient light color, diffuse light directional, and light color\\n // with lower bounds adjusted to hue of light\\n // so that shading is tinted with the complementary (opposite) color to the light color\\n v_color.r += clamp(color.r * directional * u_lightcolor.r, mix(0.0, 0.3, 1.0 - u_lightcolor.r), 1.0);\\n v_color.g += clamp(color.g * directional * u_lightcolor.g, mix(0.0, 0.3, 1.0 - u_lightcolor.g), 1.0);\\n v_color.b += clamp(color.b * directional * u_lightcolor.b, mix(0.0, 0.3, 1.0 - u_lightcolor.b), 1.0);\\n}\\n\"},fillExtrusionPattern:{fragmentSource:\"uniform vec2 u_pattern_tl_a;\\nuniform vec2 u_pattern_br_a;\\nuniform vec2 u_pattern_tl_b;\\nuniform vec2 u_pattern_br_b;\\nuniform float u_mix;\\n\\nuniform sampler2D u_image;\\n\\nvarying vec2 v_pos_a;\\nvarying vec2 v_pos_b;\\nvarying vec4 v_lighting;\\n\\n#pragma mapbox: define lowp float base\\n#pragma mapbox: define lowp float height\\n\\nvoid main() {\\n #pragma mapbox: initialize lowp float base\\n #pragma mapbox: initialize lowp float height\\n\\n vec2 imagecoord = mod(v_pos_a, 1.0);\\n vec2 pos = mix(u_pattern_tl_a, u_pattern_br_a, imagecoord);\\n vec4 color1 = texture2D(u_image, pos);\\n\\n vec2 imagecoord_b = mod(v_pos_b, 1.0);\\n vec2 pos2 = mix(u_pattern_tl_b, u_pattern_br_b, imagecoord_b);\\n vec4 color2 = texture2D(u_image, pos2);\\n\\n vec4 mixedColor = mix(color1, color2, u_mix);\\n\\n gl_FragColor = mixedColor * v_lighting;\\n\\n#ifdef OVERDRAW_INSPECTOR\\n gl_FragColor = vec4(1.0);\\n#endif\\n}\\n\",vertexSource:\"uniform mat4 u_matrix;\\nuniform vec2 u_pattern_size_a;\\nuniform vec2 u_pattern_size_b;\\nuniform vec2 u_pixel_coord_upper;\\nuniform vec2 u_pixel_coord_lower;\\nuniform float u_scale_a;\\nuniform float u_scale_b;\\nuniform float u_tile_units_to_pixels;\\nuniform float u_height_factor;\\n\\nuniform vec3 u_lightcolor;\\nuniform lowp vec3 u_lightpos;\\nuniform lowp float u_lightintensity;\\n\\nattribute vec2 a_pos;\\nattribute vec3 a_normal;\\nattribute float a_edgedistance;\\n\\nvarying vec2 v_pos_a;\\nvarying vec2 v_pos_b;\\nvarying vec4 v_lighting;\\nvarying float v_directional;\\n\\n#pragma mapbox: define lowp float base\\n#pragma mapbox: define lowp float height\\n\\nvoid main() {\\n #pragma mapbox: initialize lowp float base\\n #pragma mapbox: initialize lowp float height\\n\\n float t = mod(a_normal.x, 2.0);\\n float z = t > 0.0 ? height : base;\\n\\n gl_Position = u_matrix * vec4(a_pos, z, 1);\\n\\n vec2 pos = a_normal.x == 1.0 && a_normal.y == 0.0 && a_normal.z == 16384.0\\n ? a_pos // extrusion top\\n : vec2(a_edgedistance, z * u_height_factor); // extrusion side\\n\\n v_pos_a = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_a * u_pattern_size_a, u_tile_units_to_pixels, pos);\\n v_pos_b = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_b * u_pattern_size_b, u_tile_units_to_pixels, pos);\\n\\n v_lighting = vec4(0.0, 0.0, 0.0, 1.0);\\n float directional = clamp(dot(a_normal / 16383.0, u_lightpos), 0.0, 1.0);\\n directional = mix((1.0 - u_lightintensity), max((0.5 + u_lightintensity), 1.0), directional);\\n\\n if (a_normal.y != 0.0) {\\n directional *= clamp((t + base) * pow(height / 150.0, 0.5), mix(0.7, 0.98, 1.0 - u_lightintensity), 1.0);\\n }\\n\\n v_lighting.rgb += clamp(directional * u_lightcolor, mix(vec3(0.0), vec3(0.3), 1.0 - u_lightcolor), vec3(1.0));\\n}\\n\"},extrusionTexture:{fragmentSource:\"uniform sampler2D u_texture;\\nuniform float u_opacity;\\n\\nvarying vec2 v_pos;\\n\\nvoid main() {\\n gl_FragColor = texture2D(u_texture, v_pos) * u_opacity;\\n\\n#ifdef OVERDRAW_INSPECTOR\\n gl_FragColor = vec4(0.0);\\n#endif\\n}\\n\",vertexSource:\"uniform mat4 u_matrix;\\nuniform int u_xdim;\\nuniform int u_ydim;\\nattribute vec2 a_pos;\\nvarying vec2 v_pos;\\n\\nvoid main() {\\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\\n\\n v_pos.x = a_pos.x / float(u_xdim);\\n v_pos.y = 1.0 - a_pos.y / float(u_ydim);\\n}\\n\"},line:{fragmentSource:\"#pragma mapbox: define lowp vec4 color\\n#pragma mapbox: define lowp float blur\\n#pragma mapbox: define lowp float opacity\\n\\nvarying vec2 v_width2;\\nvarying vec2 v_normal;\\nvarying float v_gamma_scale;\\n\\nvoid main() {\\n #pragma mapbox: initialize lowp vec4 color\\n #pragma mapbox: initialize lowp float blur\\n #pragma mapbox: initialize lowp float opacity\\n\\n // Calculate the distance of the pixel from the line in pixels.\\n float dist = length(v_normal) * v_width2.s;\\n\\n // Calculate the antialiasing fade factor. This is either when fading in\\n // the line in case of an offset line (v_width2.t) or when fading out\\n // (v_width2.s)\\n float blur2 = (blur + 1.0 / DEVICE_PIXEL_RATIO) * v_gamma_scale;\\n float alpha = clamp(min(dist - (v_width2.t - blur2), v_width2.s - dist) / blur2, 0.0, 1.0);\\n\\n gl_FragColor = color * (alpha * opacity);\\n\\n#ifdef OVERDRAW_INSPECTOR\\n gl_FragColor = vec4(1.0);\\n#endif\\n}\\n\",vertexSource:\"\\n\\n// the distance over which the line edge fades out.\\n// Retina devices need a smaller distance to avoid aliasing.\\n#define ANTIALIASING 1.0 / DEVICE_PIXEL_RATIO / 2.0\\n\\n// floor(127 / 2) == 63.0\\n// the maximum allowed miter limit is 2.0 at the moment. the extrude normal is\\n// stored in a byte (-128..127). we scale regular normals up to length 63, but\\n// there are also \\\"special\\\" normals that have a bigger length (of up to 126 in\\n// this case).\\n// #define scale 63.0\\n#define scale 0.015873016\\n\\nattribute vec2 a_pos;\\nattribute vec4 a_data;\\n\\nuniform mat4 u_matrix;\\nuniform mediump float u_ratio;\\nuniform mediump float u_width;\\nuniform vec2 u_gl_units_to_pixels;\\n\\nvarying vec2 v_normal;\\nvarying vec2 v_width2;\\nvarying float v_gamma_scale;\\n\\n#pragma mapbox: define lowp vec4 color\\n#pragma mapbox: define lowp float blur\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define mediump float gapwidth\\n#pragma mapbox: define lowp float offset\\n\\nvoid main() {\\n #pragma mapbox: initialize lowp vec4 color\\n #pragma mapbox: initialize lowp float blur\\n #pragma mapbox: initialize lowp float opacity\\n #pragma mapbox: initialize mediump float gapwidth\\n #pragma mapbox: initialize lowp float offset\\n\\n vec2 a_extrude = a_data.xy - 128.0;\\n float a_direction = mod(a_data.z, 4.0) - 1.0;\\n\\n // We store the texture normals in the most insignificant bit\\n // transform y so that 0 => -1 and 1 => 1\\n // In the texture normal, x is 0 if the normal points straight up/down and 1 if it's a round cap\\n // y is 1 if the normal points up, and -1 if it points down\\n mediump vec2 normal = mod(a_pos, 2.0);\\n normal.y = sign(normal.y - 0.5);\\n v_normal = normal;\\n\\n\\n // these transformations used to be applied in the JS and native code bases. \\n // moved them into the shader for clarity and simplicity. \\n gapwidth = gapwidth / 2.0;\\n float width = u_width / 2.0;\\n offset = -1.0 * offset; \\n\\n float inset = gapwidth + (gapwidth > 0.0 ? ANTIALIASING : 0.0);\\n float outset = gapwidth + width * (gapwidth > 0.0 ? 2.0 : 1.0) + ANTIALIASING;\\n\\n // Scale the extrusion vector down to a normal and then up by the line width\\n // of this vertex.\\n mediump vec2 dist = outset * a_extrude * scale;\\n\\n // Calculate the offset when drawing a line that is to the side of the actual line.\\n // We do this by creating a vector that points towards the extrude, but rotate\\n // it when we're drawing round end points (a_direction = -1 or 1) since their\\n // extrude vector points in another direction.\\n mediump float u = 0.5 * a_direction;\\n mediump float t = 1.0 - abs(u);\\n mediump vec2 offset2 = offset * a_extrude * scale * normal.y * mat2(t, -u, u, t);\\n\\n // Remove the texture normal bit to get the position\\n vec2 pos = floor(a_pos * 0.5);\\n\\n vec4 projected_extrude = u_matrix * vec4(dist / u_ratio, 0.0, 0.0);\\n gl_Position = u_matrix * vec4(pos + offset2 / u_ratio, 0.0, 1.0) + projected_extrude;\\n\\n // calculate how much the perspective view squishes or stretches the extrude\\n float extrude_length_without_perspective = length(dist);\\n float extrude_length_with_perspective = length(projected_extrude.xy / gl_Position.w * u_gl_units_to_pixels);\\n v_gamma_scale = extrude_length_without_perspective / extrude_length_with_perspective;\\n\\n v_width2 = vec2(outset, inset);\\n}\\n\"},linePattern:{fragmentSource:\"uniform vec2 u_pattern_size_a;\\nuniform vec2 u_pattern_size_b;\\nuniform vec2 u_pattern_tl_a;\\nuniform vec2 u_pattern_br_a;\\nuniform vec2 u_pattern_tl_b;\\nuniform vec2 u_pattern_br_b;\\nuniform float u_fade;\\n\\nuniform sampler2D u_image;\\n\\nvarying vec2 v_normal;\\nvarying vec2 v_width2;\\nvarying float v_linesofar;\\nvarying float v_gamma_scale;\\n\\n#pragma mapbox: define lowp float blur\\n#pragma mapbox: define lowp float opacity\\n\\nvoid main() {\\n #pragma mapbox: initialize lowp float blur\\n #pragma mapbox: initialize lowp float opacity\\n\\n // Calculate the distance of the pixel from the line in pixels.\\n float dist = length(v_normal) * v_width2.s;\\n\\n // Calculate the antialiasing fade factor. This is either when fading in\\n // the line in case of an offset line (v_width2.t) or when fading out\\n // (v_width2.s)\\n float blur2 = (blur + 1.0 / DEVICE_PIXEL_RATIO) * v_gamma_scale;\\n float alpha = clamp(min(dist - (v_width2.t - blur2), v_width2.s - dist) / blur2, 0.0, 1.0);\\n\\n float x_a = mod(v_linesofar / u_pattern_size_a.x, 1.0);\\n float x_b = mod(v_linesofar / u_pattern_size_b.x, 1.0);\\n float y_a = 0.5 + (v_normal.y * v_width2.s / u_pattern_size_a.y);\\n float y_b = 0.5 + (v_normal.y * v_width2.s / u_pattern_size_b.y);\\n vec2 pos_a = mix(u_pattern_tl_a, u_pattern_br_a, vec2(x_a, y_a));\\n vec2 pos_b = mix(u_pattern_tl_b, u_pattern_br_b, vec2(x_b, y_b));\\n\\n vec4 color = mix(texture2D(u_image, pos_a), texture2D(u_image, pos_b), u_fade);\\n\\n gl_FragColor = color * alpha * opacity;\\n\\n#ifdef OVERDRAW_INSPECTOR\\n gl_FragColor = vec4(1.0);\\n#endif\\n}\\n\",vertexSource:\"// floor(127 / 2) == 63.0\\n// the maximum allowed miter limit is 2.0 at the moment. the extrude normal is\\n// stored in a byte (-128..127). we scale regular normals up to length 63, but\\n// there are also \\\"special\\\" normals that have a bigger length (of up to 126 in\\n// this case).\\n// #define scale 63.0\\n#define scale 0.015873016\\n\\n// We scale the distance before adding it to the buffers so that we can store\\n// long distances for long segments. Use this value to unscale the distance.\\n#define LINE_DISTANCE_SCALE 2.0\\n\\n// the distance over which the line edge fades out.\\n// Retina devices need a smaller distance to avoid aliasing.\\n#define ANTIALIASING 1.0 / DEVICE_PIXEL_RATIO / 2.0\\n\\nattribute vec2 a_pos;\\nattribute vec4 a_data;\\n\\nuniform mat4 u_matrix;\\nuniform mediump float u_ratio;\\nuniform mediump float u_width;\\nuniform vec2 u_gl_units_to_pixels;\\n\\nvarying vec2 v_normal;\\nvarying vec2 v_width2;\\nvarying float v_linesofar;\\nvarying float v_gamma_scale;\\n\\n#pragma mapbox: define lowp float blur\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define lowp float offset\\n#pragma mapbox: define mediump float gapwidth\\n\\nvoid main() {\\n #pragma mapbox: initialize lowp float blur\\n #pragma mapbox: initialize lowp float opacity\\n #pragma mapbox: initialize lowp float offset\\n #pragma mapbox: initialize mediump float gapwidth\\n\\n vec2 a_extrude = a_data.xy - 128.0;\\n float a_direction = mod(a_data.z, 4.0) - 1.0;\\n float a_linesofar = (floor(a_data.z / 4.0) + a_data.w * 64.0) * LINE_DISTANCE_SCALE;\\n\\n // We store the texture normals in the most insignificant bit\\n // transform y so that 0 => -1 and 1 => 1\\n // In the texture normal, x is 0 if the normal points straight up/down and 1 if it's a round cap\\n // y is 1 if the normal points up, and -1 if it points down\\n mediump vec2 normal = mod(a_pos, 2.0);\\n normal.y = sign(normal.y - 0.5);\\n v_normal = normal;\\n\\n // these transformations used to be applied in the JS and native code bases. \\n // moved them into the shader for clarity and simplicity. \\n gapwidth = gapwidth / 2.0;\\n float width = u_width / 2.0;\\n offset = -1.0 * offset; \\n\\n float inset = gapwidth + (gapwidth > 0.0 ? ANTIALIASING : 0.0);\\n float outset = gapwidth + width * (gapwidth > 0.0 ? 2.0 : 1.0) + ANTIALIASING;\\n\\n // Scale the extrusion vector down to a normal and then up by the line width\\n // of this vertex.\\n mediump vec2 dist = outset * a_extrude * scale;\\n\\n // Calculate the offset when drawing a line that is to the side of the actual line.\\n // We do this by creating a vector that points towards the extrude, but rotate\\n // it when we're drawing round end points (a_direction = -1 or 1) since their\\n // extrude vector points in another direction.\\n mediump float u = 0.5 * a_direction;\\n mediump float t = 1.0 - abs(u);\\n mediump vec2 offset2 = offset * a_extrude * scale * normal.y * mat2(t, -u, u, t);\\n\\n // Remove the texture normal bit to get the position\\n vec2 pos = floor(a_pos * 0.5);\\n\\n vec4 projected_extrude = u_matrix * vec4(dist / u_ratio, 0.0, 0.0);\\n gl_Position = u_matrix * vec4(pos + offset2 / u_ratio, 0.0, 1.0) + projected_extrude;\\n\\n // calculate how much the perspective view squishes or stretches the extrude\\n float extrude_length_without_perspective = length(dist);\\n float extrude_length_with_perspective = length(projected_extrude.xy / gl_Position.w * u_gl_units_to_pixels);\\n v_gamma_scale = extrude_length_without_perspective / extrude_length_with_perspective;\\n\\n v_linesofar = a_linesofar;\\n v_width2 = vec2(outset, inset);\\n}\\n\"},lineSDF:{fragmentSource:\"\\nuniform sampler2D u_image;\\nuniform float u_sdfgamma;\\nuniform float u_mix;\\n\\nvarying vec2 v_normal;\\nvarying vec2 v_width2;\\nvarying vec2 v_tex_a;\\nvarying vec2 v_tex_b;\\nvarying float v_gamma_scale;\\n\\n#pragma mapbox: define lowp vec4 color\\n#pragma mapbox: define lowp float blur\\n#pragma mapbox: define lowp float opacity\\n\\nvoid main() {\\n #pragma mapbox: initialize lowp vec4 color\\n #pragma mapbox: initialize lowp float blur\\n #pragma mapbox: initialize lowp float opacity\\n\\n // Calculate the distance of the pixel from the line in pixels.\\n float dist = length(v_normal) * v_width2.s;\\n\\n // Calculate the antialiasing fade factor. This is either when fading in\\n // the line in case of an offset line (v_width2.t) or when fading out\\n // (v_width2.s)\\n float blur2 = (blur + 1.0 / DEVICE_PIXEL_RATIO) * v_gamma_scale;\\n float alpha = clamp(min(dist - (v_width2.t - blur2), v_width2.s - dist) / blur2, 0.0, 1.0);\\n\\n float sdfdist_a = texture2D(u_image, v_tex_a).a;\\n float sdfdist_b = texture2D(u_image, v_tex_b).a;\\n float sdfdist = mix(sdfdist_a, sdfdist_b, u_mix);\\n alpha *= smoothstep(0.5 - u_sdfgamma, 0.5 + u_sdfgamma, sdfdist);\\n\\n gl_FragColor = color * (alpha * opacity);\\n\\n#ifdef OVERDRAW_INSPECTOR\\n gl_FragColor = vec4(1.0);\\n#endif\\n}\\n\",vertexSource:\"// floor(127 / 2) == 63.0\\n// the maximum allowed miter limit is 2.0 at the moment. the extrude normal is\\n// stored in a byte (-128..127). we scale regular normals up to length 63, but\\n// there are also \\\"special\\\" normals that have a bigger length (of up to 126 in\\n// this case).\\n// #define scale 63.0\\n#define scale 0.015873016\\n\\n// We scale the distance before adding it to the buffers so that we can store\\n// long distances for long segments. Use this value to unscale the distance.\\n#define LINE_DISTANCE_SCALE 2.0\\n\\n// the distance over which the line edge fades out.\\n// Retina devices need a smaller distance to avoid aliasing.\\n#define ANTIALIASING 1.0 / DEVICE_PIXEL_RATIO / 2.0\\n\\nattribute vec2 a_pos;\\nattribute vec4 a_data;\\n\\nuniform mat4 u_matrix;\\nuniform mediump float u_ratio;\\nuniform vec2 u_patternscale_a;\\nuniform float u_tex_y_a;\\nuniform vec2 u_patternscale_b;\\nuniform float u_tex_y_b;\\nuniform vec2 u_gl_units_to_pixels;\\nuniform mediump float u_width;\\n\\nvarying vec2 v_normal;\\nvarying vec2 v_width2;\\nvarying vec2 v_tex_a;\\nvarying vec2 v_tex_b;\\nvarying float v_gamma_scale;\\n\\n#pragma mapbox: define lowp vec4 color\\n#pragma mapbox: define lowp float blur\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define mediump float gapwidth\\n#pragma mapbox: define lowp float offset\\n\\nvoid main() {\\n #pragma mapbox: initialize lowp vec4 color\\n #pragma mapbox: initialize lowp float blur\\n #pragma mapbox: initialize lowp float opacity\\n #pragma mapbox: initialize mediump float gapwidth\\n #pragma mapbox: initialize lowp float offset\\n\\n vec2 a_extrude = a_data.xy - 128.0;\\n float a_direction = mod(a_data.z, 4.0) - 1.0;\\n float a_linesofar = (floor(a_data.z / 4.0) + a_data.w * 64.0) * LINE_DISTANCE_SCALE;\\n\\n // We store the texture normals in the most insignificant bit\\n // transform y so that 0 => -1 and 1 => 1\\n // In the texture normal, x is 0 if the normal points straight up/down and 1 if it's a round cap\\n // y is 1 if the normal points up, and -1 if it points down\\n mediump vec2 normal = mod(a_pos, 2.0);\\n normal.y = sign(normal.y - 0.5);\\n v_normal = normal;\\n\\n // these transformations used to be applied in the JS and native code bases. \\n // moved them into the shader for clarity and simplicity. \\n gapwidth = gapwidth / 2.0;\\n float width = u_width / 2.0;\\n offset = -1.0 * offset;\\n \\n float inset = gapwidth + (gapwidth > 0.0 ? ANTIALIASING : 0.0);\\n float outset = gapwidth + width * (gapwidth > 0.0 ? 2.0 : 1.0) + ANTIALIASING;\\n\\n // Scale the extrusion vector down to a normal and then up by the line width\\n // of this vertex.\\n mediump vec2 dist =outset * a_extrude * scale;\\n\\n // Calculate the offset when drawing a line that is to the side of the actual line.\\n // We do this by creating a vector that points towards the extrude, but rotate\\n // it when we're drawing round end points (a_direction = -1 or 1) since their\\n // extrude vector points in another direction.\\n mediump float u = 0.5 * a_direction;\\n mediump float t = 1.0 - abs(u);\\n mediump vec2 offset2 = offset * a_extrude * scale * normal.y * mat2(t, -u, u, t);\\n\\n // Remove the texture normal bit to get the position\\n vec2 pos = floor(a_pos * 0.5);\\n\\n vec4 projected_extrude = u_matrix * vec4(dist / u_ratio, 0.0, 0.0);\\n gl_Position = u_matrix * vec4(pos + offset2 / u_ratio, 0.0, 1.0) + projected_extrude;\\n\\n // calculate how much the perspective view squishes or stretches the extrude\\n float extrude_length_without_perspective = length(dist);\\n float extrude_length_with_perspective = length(projected_extrude.xy / gl_Position.w * u_gl_units_to_pixels);\\n v_gamma_scale = extrude_length_without_perspective / extrude_length_with_perspective;\\n\\n v_tex_a = vec2(a_linesofar * u_patternscale_a.x, normal.y * u_patternscale_a.y + u_tex_y_a);\\n v_tex_b = vec2(a_linesofar * u_patternscale_b.x, normal.y * u_patternscale_b.y + u_tex_y_b);\\n\\n v_width2 = vec2(outset, inset);\\n}\\n\"\n},raster:{fragmentSource:\"uniform float u_fade_t;\\nuniform float u_opacity;\\nuniform sampler2D u_image0;\\nuniform sampler2D u_image1;\\nvarying vec2 v_pos0;\\nvarying vec2 v_pos1;\\n\\nuniform float u_brightness_low;\\nuniform float u_brightness_high;\\n\\nuniform float u_saturation_factor;\\nuniform float u_contrast_factor;\\nuniform vec3 u_spin_weights;\\n\\nvoid main() {\\n\\n // read and cross-fade colors from the main and parent tiles\\n vec4 color0 = texture2D(u_image0, v_pos0);\\n vec4 color1 = texture2D(u_image1, v_pos1);\\n vec4 color = mix(color0, color1, u_fade_t);\\n color.a *= u_opacity;\\n vec3 rgb = color.rgb;\\n\\n // spin\\n rgb = vec3(\\n dot(rgb, u_spin_weights.xyz),\\n dot(rgb, u_spin_weights.zxy),\\n dot(rgb, u_spin_weights.yzx));\\n\\n // saturation\\n float average = (color.r + color.g + color.b) / 3.0;\\n rgb += (average - rgb) * u_saturation_factor;\\n\\n // contrast\\n rgb = (rgb - 0.5) * u_contrast_factor + 0.5;\\n\\n // brightness\\n vec3 u_high_vec = vec3(u_brightness_low, u_brightness_low, u_brightness_low);\\n vec3 u_low_vec = vec3(u_brightness_high, u_brightness_high, u_brightness_high);\\n\\n gl_FragColor = vec4(mix(u_high_vec, u_low_vec, rgb) * color.a, color.a);\\n\\n#ifdef OVERDRAW_INSPECTOR\\n gl_FragColor = vec4(1.0);\\n#endif\\n}\\n\",vertexSource:\"uniform mat4 u_matrix;\\nuniform vec2 u_tl_parent;\\nuniform float u_scale_parent;\\nuniform float u_buffer_scale;\\n\\nattribute vec2 a_pos;\\nattribute vec2 a_texture_pos;\\n\\nvarying vec2 v_pos0;\\nvarying vec2 v_pos1;\\n\\nvoid main() {\\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\\n v_pos0 = (((a_texture_pos / 32767.0) - 0.5) / u_buffer_scale ) + 0.5;\\n v_pos1 = (v_pos0 * u_scale_parent) + u_tl_parent;\\n}\\n\"},symbolIcon:{fragmentSource:\"uniform sampler2D u_texture;\\nuniform sampler2D u_fadetexture;\\n\\n#pragma mapbox: define lowp float opacity\\n\\nvarying vec2 v_tex;\\nvarying vec2 v_fade_tex;\\n\\nvoid main() {\\n #pragma mapbox: initialize lowp float opacity\\n\\n lowp float alpha = texture2D(u_fadetexture, v_fade_tex).a * opacity;\\n gl_FragColor = texture2D(u_texture, v_tex) * alpha;\\n\\n#ifdef OVERDRAW_INSPECTOR\\n gl_FragColor = vec4(1.0);\\n#endif\\n}\\n\",vertexSource:\"\\nattribute vec4 a_pos_offset;\\nattribute vec2 a_texture_pos;\\nattribute vec4 a_data;\\n\\n#pragma mapbox: define lowp float opacity\\n\\n// matrix is for the vertex position.\\nuniform mat4 u_matrix;\\n\\nuniform mediump float u_zoom;\\nuniform bool u_rotate_with_map;\\nuniform vec2 u_extrude_scale;\\n\\nuniform vec2 u_texsize;\\n\\nvarying vec2 v_tex;\\nvarying vec2 v_fade_tex;\\n\\nvoid main() {\\n #pragma mapbox: initialize lowp float opacity\\n\\n vec2 a_pos = a_pos_offset.xy;\\n vec2 a_offset = a_pos_offset.zw;\\n\\n vec2 a_tex = a_texture_pos.xy;\\n mediump float a_labelminzoom = a_data[0];\\n mediump vec2 a_zoom = a_data.pq;\\n mediump float a_minzoom = a_zoom[0];\\n mediump float a_maxzoom = a_zoom[1];\\n\\n // u_zoom is the current zoom level adjusted for the change in font size\\n mediump float z = 2.0 - step(a_minzoom, u_zoom) - (1.0 - step(a_maxzoom, u_zoom));\\n\\n vec2 extrude = u_extrude_scale * (a_offset / 64.0);\\n if (u_rotate_with_map) {\\n gl_Position = u_matrix * vec4(a_pos + extrude, 0, 1);\\n gl_Position.z += z * gl_Position.w;\\n } else {\\n gl_Position = u_matrix * vec4(a_pos, 0, 1) + vec4(extrude, 0, 0);\\n }\\n\\n v_tex = a_tex / u_texsize;\\n v_fade_tex = vec2(a_labelminzoom / 255.0, 0.0);\\n}\\n\"},symbolSDF:{fragmentSource:\"#define SDF_PX 8.0\\n#define EDGE_GAMMA 0.105/DEVICE_PIXEL_RATIO\\n\\nuniform bool u_is_halo;\\n#pragma mapbox: define lowp vec4 fill_color\\n#pragma mapbox: define lowp vec4 halo_color\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define lowp float halo_width\\n#pragma mapbox: define lowp float halo_blur\\n\\nuniform sampler2D u_texture;\\nuniform sampler2D u_fadetexture;\\nuniform lowp float u_font_scale;\\nuniform highp float u_gamma_scale;\\n\\nvarying vec2 v_tex;\\nvarying vec2 v_fade_tex;\\nvarying float v_gamma_scale;\\n\\nvoid main() {\\n #pragma mapbox: initialize lowp vec4 fill_color\\n #pragma mapbox: initialize lowp vec4 halo_color\\n #pragma mapbox: initialize lowp float opacity\\n #pragma mapbox: initialize lowp float halo_width\\n #pragma mapbox: initialize lowp float halo_blur\\n\\n lowp vec4 color = fill_color;\\n highp float gamma = EDGE_GAMMA / u_gamma_scale;\\n lowp float buff = (256.0 - 64.0) / 256.0;\\n if (u_is_halo) {\\n color = halo_color;\\n gamma = (halo_blur * 1.19 / SDF_PX + EDGE_GAMMA) / u_gamma_scale;\\n buff = (6.0 - halo_width / u_font_scale) / SDF_PX;\\n }\\n\\n lowp float dist = texture2D(u_texture, v_tex).a;\\n lowp float fade_alpha = texture2D(u_fadetexture, v_fade_tex).a;\\n highp float gamma_scaled = gamma * v_gamma_scale;\\n highp float alpha = smoothstep(buff - gamma_scaled, buff + gamma_scaled, dist) * fade_alpha;\\n\\n gl_FragColor = color * (alpha * opacity);\\n\\n#ifdef OVERDRAW_INSPECTOR\\n gl_FragColor = vec4(1.0);\\n#endif\\n}\\n\",vertexSource:\"const float PI = 3.141592653589793;\\n\\nattribute vec4 a_pos_offset;\\nattribute vec2 a_texture_pos;\\nattribute vec4 a_data;\\n\\n#pragma mapbox: define lowp vec4 fill_color\\n#pragma mapbox: define lowp vec4 halo_color\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define lowp float halo_width\\n#pragma mapbox: define lowp float halo_blur\\n\\n// matrix is for the vertex position.\\nuniform mat4 u_matrix;\\n\\nuniform mediump float u_zoom;\\nuniform bool u_rotate_with_map;\\nuniform bool u_pitch_with_map;\\nuniform mediump float u_pitch;\\nuniform mediump float u_bearing;\\nuniform mediump float u_aspect_ratio;\\nuniform vec2 u_extrude_scale;\\n\\nuniform vec2 u_texsize;\\n\\nvarying vec2 v_tex;\\nvarying vec2 v_fade_tex;\\nvarying float v_gamma_scale;\\n\\nvoid main() {\\n #pragma mapbox: initialize lowp vec4 fill_color\\n #pragma mapbox: initialize lowp vec4 halo_color\\n #pragma mapbox: initialize lowp float opacity\\n #pragma mapbox: initialize lowp float halo_width\\n #pragma mapbox: initialize lowp float halo_blur\\n\\n vec2 a_pos = a_pos_offset.xy;\\n vec2 a_offset = a_pos_offset.zw;\\n\\n vec2 a_tex = a_texture_pos.xy;\\n mediump float a_labelminzoom = a_data[0];\\n mediump vec2 a_zoom = a_data.pq;\\n mediump float a_minzoom = a_zoom[0];\\n mediump float a_maxzoom = a_zoom[1];\\n\\n // u_zoom is the current zoom level adjusted for the change in font size\\n mediump float z = 2.0 - step(a_minzoom, u_zoom) - (1.0 - step(a_maxzoom, u_zoom));\\n\\n // pitch-alignment: map\\n // rotation-alignment: map | viewport\\n if (u_pitch_with_map) {\\n lowp float angle = u_rotate_with_map ? (a_data[1] / 256.0 * 2.0 * PI) : u_bearing;\\n lowp float asin = sin(angle);\\n lowp float acos = cos(angle);\\n mat2 RotationMatrix = mat2(acos, asin, -1.0 * asin, acos);\\n vec2 offset = RotationMatrix * a_offset;\\n vec2 extrude = u_extrude_scale * (offset / 64.0);\\n gl_Position = u_matrix * vec4(a_pos + extrude, 0, 1);\\n gl_Position.z += z * gl_Position.w;\\n // pitch-alignment: viewport\\n // rotation-alignment: map\\n } else if (u_rotate_with_map) {\\n // foreshortening factor to apply on pitched maps\\n // as a label goes from horizontal <=> vertical in angle\\n // it goes from 0% foreshortening to up to around 70% foreshortening\\n lowp float pitchfactor = 1.0 - cos(u_pitch * sin(u_pitch * 0.75));\\n\\n lowp float lineangle = a_data[1] / 256.0 * 2.0 * PI;\\n\\n // use the lineangle to position points a,b along the line\\n // project the points and calculate the label angle in projected space\\n // this calculation allows labels to be rendered unskewed on pitched maps\\n vec4 a = u_matrix * vec4(a_pos, 0, 1);\\n vec4 b = u_matrix * vec4(a_pos + vec2(cos(lineangle),sin(lineangle)), 0, 1);\\n lowp float angle = atan((b[1]/b[3] - a[1]/a[3])/u_aspect_ratio, b[0]/b[3] - a[0]/a[3]);\\n lowp float asin = sin(angle);\\n lowp float acos = cos(angle);\\n mat2 RotationMatrix = mat2(acos, -1.0 * asin, asin, acos);\\n\\n vec2 offset = RotationMatrix * (vec2((1.0-pitchfactor)+(pitchfactor*cos(angle*2.0)), 1.0) * a_offset);\\n vec2 extrude = u_extrude_scale * (offset / 64.0);\\n gl_Position = u_matrix * vec4(a_pos, 0, 1) + vec4(extrude, 0, 0);\\n gl_Position.z += z * gl_Position.w;\\n // pitch-alignment: viewport\\n // rotation-alignment: viewport\\n } else {\\n vec2 extrude = u_extrude_scale * (a_offset / 64.0);\\n gl_Position = u_matrix * vec4(a_pos, 0, 1) + vec4(extrude, 0, 0);\\n }\\n\\n v_gamma_scale = gl_Position.w;\\n\\n v_tex = a_tex / u_texsize;\\n v_fade_tex = vec2(a_labelminzoom / 255.0, 0.0);\\n}\\n\"}};\n},{\"path\":23}],80:[function(require,module,exports){\n\"use strict\";var VertexArrayObject=function(){this.boundProgram=null,this.boundVertexBuffer=null,this.boundVertexBuffer2=null,this.boundElementBuffer=null,this.boundVertexOffset=null,this.vao=null};VertexArrayObject.prototype.bind=function(e,t,r,i,n,o){void 0===e.extVertexArrayObject&&(e.extVertexArrayObject=e.getExtension(\"OES_vertex_array_object\"));var s=!this.vao||this.boundProgram!==t||this.boundVertexBuffer!==r||this.boundVertexBuffer2!==n||this.boundElementBuffer!==i||this.boundVertexOffset!==o;!e.extVertexArrayObject||s?(this.freshBind(e,t,r,i,n,o),this.gl=e):e.extVertexArrayObject.bindVertexArrayOES(this.vao)},VertexArrayObject.prototype.freshBind=function(e,t,r,i,n,o){var s,u=t.numAttributes;if(e.extVertexArrayObject)this.vao&&this.destroy(),this.vao=e.extVertexArrayObject.createVertexArrayOES(),e.extVertexArrayObject.bindVertexArrayOES(this.vao),s=0,this.boundProgram=t,this.boundVertexBuffer=r,this.boundVertexBuffer2=n,this.boundElementBuffer=i,this.boundVertexOffset=o;else{s=e.currentNumAttributes||0;for(var b=u;bthis.maxzoom?Math.pow(2,t.coord.z-this.maxzoom):1,r={type:this.type,uid:t.uid,coord:t.coord,zoom:t.coord.z,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,overscaling:i,angle:this.map.transform.angle,pitch:this.map.transform.pitch,showCollisionBoxes:this.map.showCollisionBoxes};t.workerID=this.dispatcher.send(\"loadTile\",r,function(i,r){if(t.unloadVectorData(),!t.aborted)return i?e(i):(t.loadVectorData(r,o.map.painter),t.redoWhenDone&&(t.redoWhenDone=!1,t.redoPlacement(o)),e(null))},this.workerID)},e.prototype.abortTile=function(t){t.aborted=!0},e.prototype.unloadTile=function(t){t.unloadVectorData(),this.dispatcher.send(\"removeTile\",{uid:t.uid,type:this.type,source:this.id},function(){},t.workerID)},e.prototype.onRemove=function(){this.dispatcher.broadcast(\"removeSource\",{type:this.type,source:this.id},function(){})},e.prototype.serialize=function(){return{type:this.type,data:this._data}},e}(Evented);module.exports=GeoJSONSource;\n},{\"../data/extent\":54,\"../util/evented\":200,\"../util/util\":212,\"../util/window\":194}],83:[function(require,module,exports){\n\"use strict\";var ajax=require(\"../util/ajax\"),rewind=require(\"geojson-rewind\"),GeoJSONWrapper=require(\"./geojson_wrapper\"),vtpbf=require(\"vt-pbf\"),supercluster=require(\"supercluster\"),geojsonvt=require(\"geojson-vt\"),VectorTileWorkerSource=require(\"./vector_tile_worker_source\"),GeoJSONWorkerSource=function(e){function r(r,t,o){e.call(this,r,t),o&&(this.loadGeoJSON=o),this._geoJSONIndexes={}}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.loadVectorData=function(e,r){var t=e.source,o=e.coord;if(!this._geoJSONIndexes[t])return r(null,null);var n=this._geoJSONIndexes[t].getTile(Math.min(o.z,e.maxZoom),o.x,o.y);if(!n)return r(null,null);var u=new GeoJSONWrapper(n.features);u.name=\"_geojsonTileLayer\";var a=vtpbf({layers:{_geojsonTileLayer:u}});0===a.byteOffset&&a.byteLength===a.buffer.byteLength||(a=new Uint8Array(a)),u.rawData=a.buffer,r(null,u)},r.prototype.loadData=function(e,r){var t=function(t,o){var n=this;return t?r(t):\"object\"!=typeof o?r(new Error(\"Input data is not a valid GeoJSON object.\")):(rewind(o,!0),void this._indexData(o,e,function(t,o){return t?r(t):(n._geoJSONIndexes[e.source]=o,void r(null))}))}.bind(this);this.loadGeoJSON(e,t)},r.prototype.loadGeoJSON=function(e,r){if(e.url)ajax.getJSON(e.url,r);else{if(\"string\"!=typeof e.data)return r(new Error(\"Input data is not a valid GeoJSON object.\"));try{return r(null,JSON.parse(e.data))}catch(e){return r(new Error(\"Input data is not a valid GeoJSON object.\"))}}},r.prototype.removeSource=function(e){this._geoJSONIndexes[e.source]&&delete this._geoJSONIndexes[e.source]},r.prototype._indexData=function(e,r,t){try{r.cluster?t(null,supercluster(r.superclusterOptions).load(e.features)):t(null,geojsonvt(e,r.geojsonVtOptions))}catch(e){return t(e)}},r}(VectorTileWorkerSource);module.exports=GeoJSONWorkerSource;\n},{\"../util/ajax\":191,\"./geojson_wrapper\":84,\"./vector_tile_worker_source\":96,\"geojson-rewind\":7,\"geojson-vt\":11,\"supercluster\":29,\"vt-pbf\":38}],84:[function(require,module,exports){\n\"use strict\";var Point=require(\"point-geometry\"),VectorTileFeature=require(\"vector-tile\").VectorTileFeature,EXTENT=require(\"../data/extent\"),FeatureWrapper=function(e){var t=this;if(this.type=e.type,1===e.type){this.rawGeometry=[];for(var r=0;rt)){var n=Math.pow(2,Math.min(a.coord.z,i._source.maxzoom)-Math.min(e.z,i._source.maxzoom));if(Math.floor(a.coord.x/n)===e.x&&Math.floor(a.coord.y/n)===e.y)for(o[s]=!0,r=!0;a&&a.coord.z-1>e.z;){var d=a.coord.parent(i._source.maxzoom).id;a=i._tiles[d],a&&a.hasData()&&(delete o[s],o[d]=!0)}}}return r},t.prototype.findLoadedParent=function(e,t,o){for(var i=this,r=e.z-1;r>=t;r--){e=e.parent(i._source.maxzoom);var s=i._tiles[e.id];if(s&&s.hasData())return o[e.id]=!0,s;if(i._cache.has(e.id))return o[e.id]=!0,i._cache.getWithoutRemoving(e.id)}},t.prototype.updateCacheSize=function(e){var t=Math.ceil(e.width/e.tileSize)+1,o=Math.ceil(e.height/e.tileSize)+1,i=t*o,r=5;this._cache.setMaxSize(Math.floor(i*r))},t.prototype.update=function(e){var o=this;if(this.transform=e,this._sourceLoaded){var i,r,s,a;this.updateCacheSize(e);var n=(this._source.roundZoom?Math.round:Math.floor)(this.getZoom(e)),d=Math.max(n-t.maxOverzooming,this._source.minzoom),c=Math.max(n+t.maxUnderzooming,this._source.minzoom),h={};this._coveredTiles={};var u;for(u=this.used?this._source.coord?[this._source.coord]:e.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}):[],i=0;i=Date.now())&&(o.findLoadedChildren(r,c,h)&&(h[_]=!0),a=o.findLoadedParent(r,d,l),a&&o.addTile(a.coord))}var f;for(f in l)h[f]||(o._coveredTiles[f]=!0);for(f in l)h[f]=!0;var T=util.keysDifference(this._tiles,h);for(i=0;ithis._source.maxzoom?Math.pow(2,r-this._source.maxzoom):1;t=new Tile(o,this._source.tileSize*s,this._source.maxzoom),this.loadTile(t,this._tileLoaded.bind(this,t,e.id,t.state))}return t.uses++,this._tiles[e.id]=t,i||this._source.fire(\"dataloading\",{tile:t,coord:t.coord,dataType:\"source\"}),t},t.prototype._setTileReloadTimer=function(e,t){var o=this,i=t.getExpiryTimeout();i&&(this._timers[e]=setTimeout(function(){o.reloadTile(e,\"expired\"),o._timers[e]=void 0},i))},t.prototype._setCacheInvalidationTimer=function(e,t){var o=this,i=t.getExpiryTimeout();i&&(this._cacheTimers[e]=setTimeout(function(){o._cache.remove(e),o._cacheTimers[e]=void 0},i))},t.prototype.removeTile=function(e){var t=this._tiles[e];if(t&&(t.uses--,delete this._tiles[e],this._timers[e]&&(clearTimeout(this._timers[e]),this._timers[e]=void 0),!(t.uses>0)))if(t.hasData()){var o=t.coord.wrapped().id;this._cache.add(o,t),this._setCacheInvalidationTimer(o,t)}else t.aborted=!0,this.abortTile(t),this.unloadTile(t)},t.prototype.clearTiles=function(){var e=this;for(var t in e._tiles)e.removeTile(t);this._cache.reset()},t.prototype.tilesIn=function(e){for(var t=this,o={},i=this.getIds(),r=1/0,s=1/0,a=-(1/0),n=-(1/0),d=e[0].zoom,c=0;c=0&&p[1].y>=0){for(var _=[],f=0;fo)r=!1;else if(t)if(this.expirationTimei.row){var o=t;t=i,i=o}return{x0:t.column,y0:t.row,x1:i.column,y1:i.row,dx:i.column-t.column,dy:i.row-t.row}}function scanSpans(t,i,o,r,e){var n=Math.max(o,Math.floor(i.y0)),h=Math.min(r,Math.ceil(i.y1));if(t.x0===i.x0&&t.y0===i.y0?t.x0+i.dy/t.dy*t.dx0,l=i.dx<0,u=n;ua.dy&&(h=s,s=a,a=h),s.dy>d.dy&&(h=s,s=d,d=h),a.dy>d.dy&&(h=a,a=d,d=h),s.dy&&scanSpans(d,s,r,e,n),a.dy&&scanSpans(d,a,r,e,n)}function getQuadkey(t,i,o){for(var r,e=\"\",n=t;n>0;n--)r=1<t?new TileCoord(this.z-1,this.x,this.y,this.w):new TileCoord(this.z-1,Math.floor(this.x/2),Math.floor(this.y/2),this.w)},TileCoord.prototype.wrapped=function(){return new TileCoord(this.z,this.x,this.y,0)},TileCoord.prototype.children=function(t){if(this.z>=t)return[new TileCoord(this.z+1,this.x,this.y,this.w)];var i=this.z+1,o=2*this.x,r=2*this.y;return[new TileCoord(i,o,r,this.w),new TileCoord(i,o+1,r,this.w),new TileCoord(i,o,r+1,this.w),new TileCoord(i,o+1,r+1,this.w)]},TileCoord.cover=function(t,i,o,r){function e(t,i,e){var s,a,d,y;if(e>=0&&e<=n)for(s=t;sthis.maxzoom?Math.pow(2,e.coord.z-this.maxzoom):1,r={url:normalizeURL(e.coord.url(this.tiles,this.maxzoom,this.scheme),this.url),uid:e.uid,coord:e.coord,zoom:e.coord.z,tileSize:this.tileSize*o,type:this.type,source:this.id,overscaling:o,angle:this.map.transform.angle,pitch:this.map.transform.pitch,showCollisionBoxes:this.map.showCollisionBoxes};e.workerID&&\"expired\"!==e.state?\"loading\"===e.state?e.reloadCallback=t:this.dispatcher.send(\"reloadTile\",r,i.bind(this),e.workerID):e.workerID=this.dispatcher.send(\"loadTile\",r,i.bind(this))},t.prototype.abortTile=function(e){this.dispatcher.send(\"abortTile\",{uid:e.uid,type:this.type,source:this.id},null,e.workerID)},t.prototype.unloadTile=function(e){e.unloadVectorData(),this.dispatcher.send(\"removeTile\",{uid:e.uid,type:this.type,source:this.id},null,e.workerID)},t}(Evented);module.exports=VectorTileSource;\n},{\"../util/evented\":200,\"../util/mapbox\":208,\"../util/util\":212,\"./load_tilejson\":86}],96:[function(require,module,exports){\n\"use strict\";var ajax=require(\"../util/ajax\"),vt=require(\"vector-tile\"),Protobuf=require(\"pbf\"),WorkerTile=require(\"./worker_tile\"),util=require(\"../util/util\"),VectorTileWorkerSource=function(e,r,t){this.actor=e,this.layerIndex=r,t&&(this.loadVectorData=t),this.loading={},this.loaded={}};VectorTileWorkerSource.prototype.loadTile=function(e,r){function t(e,t){return delete this.loading[o][i],e?r(e):t?(a.vectorTile=t,a.parse(t,this.layerIndex,this.actor,function(e,o,i){if(e)return r(e);var a={};t.expires&&(a.expires=t.expires),t.cacheControl&&(a.cacheControl=t.cacheControl),r(null,util.extend({rawTileData:t.rawData},o,a),i)}),this.loaded[o]=this.loaded[o]||{},void(this.loaded[o][i]=a)):r(null,null)}var o=e.source,i=e.uid;this.loading[o]||(this.loading[o]={});var a=this.loading[o][i]=new WorkerTile(e);a.abort=this.loadVectorData(e,t.bind(this))},VectorTileWorkerSource.prototype.reloadTile=function(e,r){function t(e,t){if(this.reloadCallback){var o=this.reloadCallback;delete this.reloadCallback,this.parse(this.vectorTile,a.layerIndex,a.actor,o)}r(e,t)}var o=this.loaded[e.source],i=e.uid,a=this;if(o&&o[i]){var l=o[i];\"parsing\"===l.status?l.reloadCallback=r:\"done\"===l.status&&l.parse(l.vectorTile,this.layerIndex,this.actor,t.bind(l))}},VectorTileWorkerSource.prototype.abortTile=function(e){var r=this.loading[e.source],t=e.uid;r&&r[t]&&r[t].abort&&(r[t].abort(),delete r[t])},VectorTileWorkerSource.prototype.removeTile=function(e){var r=this.loaded[e.source],t=e.uid;r&&r[t]&&delete r[t]},VectorTileWorkerSource.prototype.loadVectorData=function(e,r){function t(e,t){if(e)return r(e);var o=new vt.VectorTile(new Protobuf(t.data));o.rawData=t.data,o.cacheControl=t.cacheControl,o.expires=t.expires,r(e,o)}var o=ajax.getArrayBuffer(e.url,t.bind(this));return function(){o.abort()}},VectorTileWorkerSource.prototype.redoPlacement=function(e,r){var t=this.loaded[e.source],o=this.loading[e.source],i=e.uid;if(t&&t[i]){var a=t[i],l=a.redoPlacement(e.angle,e.pitch,e.showCollisionBoxes);l.result&&r(null,l.result,l.transferables)}else o&&o[i]&&(o[i].angle=e.angle)},module.exports=VectorTileWorkerSource;\n},{\"../util/ajax\":191,\"../util/util\":212,\"./worker_tile\":99,\"pbf\":25,\"vector-tile\":34}],97:[function(require,module,exports){\n\"use strict\";var ajax=require(\"../util/ajax\"),ImageSource=require(\"./image_source\"),VideoSource=function(t){function e(e,o,i,r){t.call(this,e,o,i,r),this.roundZoom=!0,this.type=\"video\",this.options=o}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.load=function(){var t=this,e=this.options;this.urls=e.urls,ajax.getVideo(e.urls,function(e,o){if(e)return t.fire(\"error\",{error:e});t.video=o,t.video.loop=!0;var i;t.video.addEventListener(\"playing\",function(){i=t.map.style.animationLoop.set(1/0),t.map._rerender()}),t.video.addEventListener(\"pause\",function(){t.map.style.animationLoop.cancel(i)}),t.map&&t.video.play(),t._finishLoading()})},e.prototype.getVideo=function(){return this.video},e.prototype.onAdd=function(t){this.map||(this.load(),this.map=t,this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},e.prototype.prepare=function(){!this.tile||this.video.readyState<2||this._prepareImage(this.map.painter.gl,this.video)},e.prototype.serialize=function(){return{type:\"video\",urls:this.urls,coordinates:this.coordinates}},e}(ImageSource);module.exports=VideoSource;\n},{\"../util/ajax\":191,\"./image_source\":85}],98:[function(require,module,exports){\n\"use strict\";var Actor=require(\"../util/actor\"),StyleLayerIndex=require(\"../style/style_layer_index\"),VectorTileWorkerSource=require(\"./vector_tile_worker_source\"),GeoJSONWorkerSource=require(\"./geojson_worker_source\"),globalRTLTextPlugin=require(\"./rtl_text_plugin\"),Worker=function(e){var r=this;this.self=e,this.actor=new Actor(e,this),this.layerIndexes={},this.workerSourceTypes={vector:VectorTileWorkerSource,geojson:GeoJSONWorkerSource},this.workerSources={},this.self.registerWorkerSource=function(e,o){if(r.workerSourceTypes[e])throw new Error('Worker source with name \"'+e+'\" already registered.');r.workerSourceTypes[e]=o},this.self.registerRTLTextPlugin=function(e){if(globalRTLTextPlugin.applyArabicShaping||globalRTLTextPlugin.processBidirectionalText)throw new Error(\"RTL text plugin already registered.\");globalRTLTextPlugin.applyArabicShaping=e.applyArabicShaping,globalRTLTextPlugin.processBidirectionalText=e.processBidirectionalText}};Worker.prototype.setLayers=function(e,r){this.getLayerIndex(e).replace(r)},Worker.prototype.updateLayers=function(e,r){this.getLayerIndex(e).update(r.layers,r.removedIds,r.symbolOrder)},Worker.prototype.loadTile=function(e,r,o){this.getWorkerSource(e,r.type).loadTile(r,o)},Worker.prototype.reloadTile=function(e,r,o){this.getWorkerSource(e,r.type).reloadTile(r,o)},Worker.prototype.abortTile=function(e,r){this.getWorkerSource(e,r.type).abortTile(r)},Worker.prototype.removeTile=function(e,r){this.getWorkerSource(e,r.type).removeTile(r)},Worker.prototype.removeSource=function(e,r){var o=this.getWorkerSource(e,r.type);void 0!==o.removeSource&&o.removeSource(r)},Worker.prototype.redoPlacement=function(e,r,o){this.getWorkerSource(e,r.type).redoPlacement(r,o)},Worker.prototype.loadWorkerSource=function(e,r,o){try{this.self.importScripts(r.url),o()}catch(e){o(e)}},Worker.prototype.loadRTLTextPlugin=function(e,r,o){try{globalRTLTextPlugin.applyArabicShaping||globalRTLTextPlugin.processBidirectionalText||this.self.importScripts(r)}catch(e){o(e)}},Worker.prototype.getLayerIndex=function(e){var r=this.layerIndexes[e];return r||(r=this.layerIndexes[e]=new StyleLayerIndex),r},Worker.prototype.getWorkerSource=function(e,r){var o=this;if(this.workerSources[e]||(this.workerSources[e]={}),!this.workerSources[e][r]){var t={send:function(r,t,i,n){o.actor.send(r,t,i,n,e)}};this.workerSources[e][r]=new this.workerSourceTypes[r](t,this.getLayerIndex(e))}return this.workerSources[e][r]},module.exports=function(e){return new Worker(e)};\n},{\"../style/style_layer_index\":154,\"../util/actor\":190,\"./geojson_worker_source\":83,\"./rtl_text_plugin\":90,\"./vector_tile_worker_source\":96}],99:[function(require,module,exports){\n\"use strict\";function recalculateLayers(e,i){for(var r=0,o=e.layers;r=B.maxzoom||B.layout&&\"none\"===B.layout.visibility)){for(var b=0,k=x;b=0;w--){var A=n[i.symbolOrder[w]];A&&t.symbolBuckets.push(A)}if(0===this.symbolBuckets.length)return T(new CollisionTile(this.angle,this.pitch,this.collisionBoxArray));var D=0,I=Object.keys(c.iconDependencies),O=util.mapObject(c.glyphDependencies,function(e){return Object.keys(e).map(Number)}),L=function(e){if(e)return o(e);if(D++,2===D){for(var i=new CollisionTile(t.angle,t.pitch,t.collisionBoxArray),r=0,s=t.symbolBuckets;r\"===i||\"<=\"===i||\">=\"===i?compileComparisonOp(e[1],e[2],i,!0):\"any\"===i?compileLogicalOp(e.slice(1),\"||\"):\"all\"===i?compileLogicalOp(e.slice(1),\"&&\"):\"none\"===i?compileNegation(compileLogicalOp(e.slice(1),\"||\")):\"in\"===i?compileInOp(e[1],e.slice(2)):\"!in\"===i?compileNegation(compileInOp(e[1],e.slice(2))):\"has\"===i?compileHasOp(e[1]):\"!has\"===i?compileNegation(compileHasOp(e[1])):\"true\";return\"(\"+n+\")\"}function compilePropertyReference(e){return\"$type\"===e?\"f.type\":\"$id\"===e?\"f.id\":\"p[\"+JSON.stringify(e)+\"]\"}function compileComparisonOp(e,i,n,r){var o=compilePropertyReference(e),t=\"$type\"===e?types.indexOf(i):JSON.stringify(i);return(r?\"typeof \"+o+\"=== typeof \"+t+\"&&\":\"\")+o+n+t}function compileLogicalOp(e,i){return e.map(compile).join(i)}function compileInOp(e,i){\"$type\"===e&&(i=i.map(function(e){return types.indexOf(e)}));var n=JSON.stringify(i.sort(compare)),r=compilePropertyReference(e);return i.length<=200?n+\".indexOf(\"+r+\") !== -1\":\"function(v, a, i, j) {while (i <= j) { var m = (i + j) >> 1; if (a[m] === v) return true; if (a[m] > v) j = m - 1; else i = m + 1;}return false; }(\"+r+\", \"+n+\",0,\"+(i.length-1)+\")\"}function compileHasOp(e){return\"$id\"===e?'\"id\" in f':JSON.stringify(e)+\" in p\"}function compileNegation(e){return\"!(\"+e+\")\"}function compare(e,i){return ei?1:0}module.exports=createFilter;var types=[\"Unknown\",\"Point\",\"LineString\",\"Polygon\"];\n},{}],104:[function(require,module,exports){\n\"use strict\";function xyz2lab(r){return r>t3?Math.pow(r,1/3):r/t2+t0}function lab2xyz(r){return r>t1?r*r*r:t2*(r-t0)}function xyz2rgb(r){return 255*(r<=.0031308?12.92*r:1.055*Math.pow(r,1/2.4)-.055)}function rgb2xyz(r){return r/=255,r<=.04045?r/12.92:Math.pow((r+.055)/1.055,2.4)}function rgbToLab(r){var t=rgb2xyz(r[0]),a=rgb2xyz(r[1]),n=rgb2xyz(r[2]),b=xyz2lab((.4124564*t+.3575761*a+.1804375*n)/Xn),o=xyz2lab((.2126729*t+.7151522*a+.072175*n)/Yn),g=xyz2lab((.0193339*t+.119192*a+.9503041*n)/Zn);return[116*o-16,500*(b-o),200*(o-g),r[3]]}function labToRgb(r){var t=(r[0]+16)/116,a=isNaN(r[1])?t:t+r[1]/500,n=isNaN(r[2])?t:t-r[2]/200;return t=Yn*lab2xyz(t),a=Xn*lab2xyz(a),n=Zn*lab2xyz(n),[xyz2rgb(3.2404542*a-1.5371385*t-.4985314*n),xyz2rgb(-.969266*a+1.8760108*t+.041556*n),xyz2rgb(.0556434*a-.2040259*t+1.0572252*n),r[3]]}function rgbToHcl(r){var t=rgbToLab(r),a=t[0],n=t[1],b=t[2],o=Math.atan2(b,n)*rad2deg;return[o<0?o+360:o,Math.sqrt(n*n+b*b),a,r[3]]}function hclToRgb(r){var t=r[0]*deg2rad,a=r[1],n=r[2];return labToRgb([n,Math.cos(t)*a,Math.sin(t)*a,r[3]])}var Xn=.95047,Yn=1,Zn=1.08883,t0=4/29,t1=6/29,t2=3*t1*t1,t3=t1*t1*t1,deg2rad=Math.PI/180,rad2deg=180/Math.PI;module.exports={lab:{forward:rgbToLab,reverse:labToRgb},hcl:{forward:rgbToHcl,reverse:hclToRgb}};\n},{}],105:[function(require,module,exports){\n\"use strict\";function identityFunction(t){return t}function createFunction(t,e){var o,n=\"color\"===e.type;if(isFunctionDefinition(t)){var r=t.stops&&\"object\"==typeof t.stops[0][0],a=r||void 0!==t.property,i=r||!a,s=t.type||(\"interpolated\"===e.function?\"exponential\":\"interval\");n&&(t=extend({},t),t.stops&&(t.stops=t.stops.map(function(t){return[t[0],parseColor(t[1])]})),t.default?t.default=parseColor(t.default):t.default=parseColor(e.default));var u,p,l;if(\"exponential\"===s)u=evaluateExponentialFunction;else if(\"interval\"===s)u=evaluateIntervalFunction;else if(\"categorical\"===s){u=evaluateCategoricalFunction,p=Object.create(null);for(var c=0,f=t.stops;c=t.stops[n-1][0])return t.stops[n-1][1];var r=binarySearchForIndex(t.stops,o);return t.stops[r][1]}function evaluateExponentialFunction(t,e,o){var n=void 0!==t.base?t.base:1;if(\"number\"!==getType(o))return coalesce(t.default,e.default);var r=t.stops.length;if(1===r)return t.stops[0][1];if(o<=t.stops[0][0])return t.stops[0][1];if(o>=t.stops[r-1][0])return t.stops[r-1][1];var a=binarySearchForIndex(t.stops,o);return interpolate(o,n,t.stops[a][0],t.stops[a+1][0],t.stops[a][1],t.stops[a+1][1])}function evaluateIdentityFunction(t,e,o){return\"color\"===e.type?o=parseColor(o):getType(o)!==e.type&&(o=void 0),coalesce(o,t.default,e.default)}function binarySearchForIndex(t,e){for(var o,n,r=t.length,a=0,i=r-1,s=0;a<=i;){if(s=Math.floor((a+i)/2),o=t[s][0],n=t[s+1][0],e>=o&&ee&&(i=s-1)}return Math.max(s-1,0)}function interpolate(t,e,o,n,r,a){return\"function\"==typeof r?function(){var i=r.apply(void 0,arguments),s=a.apply(void 0,arguments);if(void 0!==i&&void 0!==s)return interpolate(t,e,o,n,i,s)}:r.length?interpolateArray(t,e,o,n,r,a):interpolateNumber(t,e,o,n,r,a)}function interpolateNumber(t,e,o,n,r,a){var i,s=n-o,u=t-o;return i=1===e?u/s:(Math.pow(e,u)-1)/(Math.pow(e,s)-1),r*(1-i)+a*i}function interpolateArray(t,e,o,n,r,a){for(var i=[],s=0;s255?255:e}function clamp_css_float(e){return e<0?0:e>1?1:e}function parse_css_int(e){return clamp_css_byte(\"%\"===e[e.length-1]?parseFloat(e)/100*255:parseInt(e))}function parse_css_float(e){return clamp_css_float(\"%\"===e[e.length-1]?parseFloat(e)/100:parseFloat(e))}function css_hue_to_rgb(e,r,l){return l<0?l+=1:l>1&&(l-=1),6*l<1?e+(r-e)*l*6:2*l<1?r:3*l<2?e+(r-e)*(2/3-l)*6:e}function parseCSSColor(e){var r=e.replace(/ /g,\"\").toLowerCase();if(r in kCSSColorTable)return kCSSColorTable[r].slice();if(\"#\"===r[0]){if(4===r.length){var l=parseInt(r.substr(1),16);return l>=0&&l<=4095?[(3840&l)>>4|(3840&l)>>8,240&l|(240&l)>>4,15&l|(15&l)<<4,1]:null}if(7===r.length){var l=parseInt(r.substr(1),16);return l>=0&&l<=16777215?[(16711680&l)>>16,(65280&l)>>8,255&l,1]:null}return null}var a=r.indexOf(\"(\"),t=r.indexOf(\")\");if(a!==-1&&t+1===r.length){var n=r.substr(0,a),s=r.substr(a+1,t-(a+1)).split(\",\"),o=1;switch(n){case\"rgba\":if(4!==s.length)return null;o=parse_css_float(s.pop());case\"rgb\":return 3!==s.length?null:[parse_css_int(s[0]),parse_css_int(s[1]),parse_css_int(s[2]),o];case\"hsla\":if(4!==s.length)return null;o=parse_css_float(s.pop());case\"hsl\":if(3!==s.length)return null;var i=(parseFloat(s[0])%360+360)%360/360,u=parse_css_float(s[1]),g=parse_css_float(s[2]),d=g<=.5?g*(u+1):g+u-g*u,c=2*g-d;return[clamp_css_byte(255*css_hue_to_rgb(c,d,i+1/3)),clamp_css_byte(255*css_hue_to_rgb(c,d,i)),clamp_css_byte(255*css_hue_to_rgb(c,d,i-1/3)),o];default:return null}}return null}var kCSSColorTable={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};try{exports.parseCSSColor=parseCSSColor}catch(e){}\n},{}],108:[function(require,module,exports){\nfunction sss(r){var e,t,s,n,u,a;switch(typeof r){case\"object\":if(null===r)return null;if(isArray(r)){for(s=\"[\",t=r.length-1,e=0;e-1&&(s+=sss(r[e])),s+\"]\"}for(n=objKeys(r).sort(),t=n.length,s=\"{\",u=n[e=0],a=t>0&&void 0!==r[u];e15?\"\\\\u00\"+e.toString(16):\"\\\\u000\"+e.toString(16)}};module.exports=function(r){if(void 0!==r)return\"\"+sss(r)},module.exports.stringSearch=strReg,module.exports.stringReplace=strReplace;\n},{}],109:[function(require,module,exports){\nfunction isObjectLike(r){return!!r&&\"object\"==typeof r}function arraySome(r,e){for(var a=-1,t=r.length;++as))return!1;for(;++c-1&&t%1==0&&t<=MAX_SAFE_INTEGER}function isObject(t){var e=typeof t;return!!t&&(\"object\"==e||\"function\"==e)}function isObjectLike(t){return!!t&&\"object\"==typeof t}var MAX_SAFE_INTEGER=9007199254740991,argsTag=\"[object Arguments]\",funcTag=\"[object Function]\",genTag=\"[object GeneratorFunction]\",objectProto=Object.prototype,hasOwnProperty=objectProto.hasOwnProperty,objectToString=objectProto.toString,propertyIsEnumerable=objectProto.propertyIsEnumerable;module.exports=isArguments;\n},{}],113:[function(require,module,exports){\nfunction isObjectLike(t){return!!t&&\"object\"==typeof t}function getNative(t,r){var e=null==t?void 0:t[r];return isNative(e)?e:void 0}function isLength(t){return\"number\"==typeof t&&t>-1&&t%1==0&&t<=MAX_SAFE_INTEGER}function isFunction(t){return isObject(t)&&objToString.call(t)==funcTag}function isObject(t){var r=typeof t;return!!t&&(\"object\"==r||\"function\"==r)}function isNative(t){return null!=t&&(isFunction(t)?reIsNative.test(fnToString.call(t)):isObjectLike(t)&&reIsHostCtor.test(t))}var arrayTag=\"[object Array]\",funcTag=\"[object Function]\",reIsHostCtor=/^\\[object .+?Constructor\\]$/,objectProto=Object.prototype,fnToString=Function.prototype.toString,hasOwnProperty=objectProto.hasOwnProperty,objToString=objectProto.toString,reIsNative=RegExp(\"^\"+fnToString.call(hasOwnProperty).replace(/[\\\\^$.*+?()[\\]{}|]/g,\"\\\\$&\").replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g,\"$1.*?\")+\"$\"),nativeIsArray=getNative(Array,\"isArray\"),MAX_SAFE_INTEGER=9007199254740991,isArray=nativeIsArray||function(t){return isObjectLike(t)&&isLength(t.length)&&objToString.call(t)==arrayTag};module.exports=isArray;\n},{}],114:[function(require,module,exports){\nfunction isEqual(a,l,i,e){i=\"function\"==typeof i?bindCallback(i,e,3):void 0;var s=i?i(a,l):void 0;return void 0===s?baseIsEqual(a,l,i):!!s}var baseIsEqual=require(\"lodash._baseisequal\"),bindCallback=require(\"lodash._bindcallback\");module.exports=isEqual;\n},{\"lodash._baseisequal\":109,\"lodash._bindcallback\":110}],115:[function(require,module,exports){\nfunction isLength(a){return\"number\"==typeof a&&a>-1&&a%1==0&&a<=MAX_SAFE_INTEGER}function isObjectLike(a){return!!a&&\"object\"==typeof a}function isTypedArray(a){return isObjectLike(a)&&isLength(a.length)&&!!typedArrayTags[objectToString.call(a)]}var MAX_SAFE_INTEGER=9007199254740991,argsTag=\"[object Arguments]\",arrayTag=\"[object Array]\",boolTag=\"[object Boolean]\",dateTag=\"[object Date]\",errorTag=\"[object Error]\",funcTag=\"[object Function]\",mapTag=\"[object Map]\",numberTag=\"[object Number]\",objectTag=\"[object Object]\",regexpTag=\"[object RegExp]\",setTag=\"[object Set]\",stringTag=\"[object String]\",weakMapTag=\"[object WeakMap]\",arrayBufferTag=\"[object ArrayBuffer]\",dataViewTag=\"[object DataView]\",float32Tag=\"[object Float32Array]\",float64Tag=\"[object Float64Array]\",int8Tag=\"[object Int8Array]\",int16Tag=\"[object Int16Array]\",int32Tag=\"[object Int32Array]\",uint8Tag=\"[object Uint8Array]\",uint8ClampedTag=\"[object Uint8ClampedArray]\",uint16Tag=\"[object Uint16Array]\",uint32Tag=\"[object Uint32Array]\",typedArrayTags={};typedArrayTags[float32Tag]=typedArrayTags[float64Tag]=typedArrayTags[int8Tag]=typedArrayTags[int16Tag]=typedArrayTags[int32Tag]=typedArrayTags[uint8Tag]=typedArrayTags[uint8ClampedTag]=typedArrayTags[uint16Tag]=typedArrayTags[uint32Tag]=!0,typedArrayTags[argsTag]=typedArrayTags[arrayTag]=typedArrayTags[arrayBufferTag]=typedArrayTags[boolTag]=typedArrayTags[dataViewTag]=typedArrayTags[dateTag]=typedArrayTags[errorTag]=typedArrayTags[funcTag]=typedArrayTags[mapTag]=typedArrayTags[numberTag]=typedArrayTags[objectTag]=typedArrayTags[regexpTag]=typedArrayTags[setTag]=typedArrayTags[stringTag]=typedArrayTags[weakMapTag]=!1;var objectProto=Object.prototype,objectToString=objectProto.toString;module.exports=isTypedArray;\n},{}],116:[function(require,module,exports){\nfunction baseProperty(e){return function(t){return null==t?void 0:t[e]}}function isArrayLike(e){return null!=e&&isLength(getLength(e))}function isIndex(e,t){return e=\"number\"==typeof e||reIsUint.test(e)?+e:-1,t=null==t?MAX_SAFE_INTEGER:t,e>-1&&e%1==0&&e-1&&e%1==0&&e<=MAX_SAFE_INTEGER}function shimKeys(e){for(var t=keysIn(e),r=t.length,n=r&&e.length,s=!!n&&isLength(n)&&(isArray(e)||isArguments(e)),o=-1,i=[];++o0;++n\":{},\">=\":{},\"<\":{},\"<=\":{},\"in\":{},\"!in\":{},\"all\":{},\"any\":{},\"none\":{},\"has\":{},\"!has\":{}}},\"geometry_type\":{\"type\":\"enum\",\"values\":{\"Point\":{},\"LineString\":{},\"Polygon\":{}}},\"function\":{\"stops\":{\"type\":\"array\",\"value\":\"function_stop\"},\"base\":{\"type\":\"number\",\"default\":1,\"minimum\":0},\"property\":{\"type\":\"string\",\"default\":\"$zoom\"},\"type\":{\"type\":\"enum\",\"values\":{\"identity\":{},\"exponential\":{},\"interval\":{},\"categorical\":{}},\"default\":\"exponential\"},\"colorSpace\":{\"type\":\"enum\",\"values\":{\"rgb\":{},\"lab\":{},\"hcl\":{}},\"default\":\"rgb\"},\"default\":{\"type\":\"*\",\"required\":false}},\"function_stop\":{\"type\":\"array\",\"minimum\":0,\"maximum\":22,\"value\":[\"number\",\"color\"],\"length\":2},\"light\":{\"anchor\":{\"type\":\"enum\",\"default\":\"viewport\",\"values\":{\"map\":{},\"viewport\":{}},\"transition\":false},\"position\":{\"type\":\"array\",\"default\":[1.15,210,30],\"length\":3,\"value\":\"number\",\"transition\":true,\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":false},\"color\":{\"type\":\"color\",\"default\":\"#ffffff\",\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":false,\"transition\":true},\"intensity\":{\"type\":\"number\",\"default\":0.5,\"minimum\":0,\"maximum\":1,\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":false,\"transition\":true}},\"paint\":[\"paint_fill\",\"paint_line\",\"paint_circle\",\"paint_fill-extrusion\",\"paint_symbol\",\"paint_raster\",\"paint_background\"],\"paint_fill\":{\"fill-antialias\":{\"type\":\"boolean\",\"function\":\"piecewise-constant\",\"zoom-function\":true,\"default\":true},\"fill-opacity\":{\"type\":\"number\",\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"default\":1,\"minimum\":0,\"maximum\":1,\"transition\":true},\"fill-color\":{\"type\":\"color\",\"default\":\"#000000\",\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true,\"requires\":[{\"!\":\"fill-pattern\"}]},\"fill-outline-color\":{\"type\":\"color\",\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true,\"requires\":[{\"!\":\"fill-pattern\"},{\"fill-antialias\":true}]},\"fill-translate\":{\"type\":\"array\",\"value\":\"number\",\"length\":2,\"default\":[0,0],\"function\":\"interpolated\",\"zoom-function\":true,\"transition\":true,\"units\":\"pixels\"},\"fill-translate-anchor\":{\"type\":\"enum\",\"function\":\"piecewise-constant\",\"zoom-function\":true,\"values\":{\"map\":{},\"viewport\":{}},\"default\":\"map\",\"requires\":[\"fill-translate\"]},\"fill-pattern\":{\"type\":\"string\",\"function\":\"piecewise-constant\",\"zoom-function\":true,\"transition\":true}},\"paint_fill-extrusion\":{\"fill-extrusion-opacity\":{\"type\":\"number\",\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":false,\"default\":1,\"minimum\":0,\"maximum\":1,\"transition\":true},\"fill-extrusion-color\":{\"type\":\"color\",\"default\":\"#000000\",\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true,\"requires\":[{\"!\":\"fill-extrusion-pattern\"}]},\"fill-extrusion-translate\":{\"type\":\"array\",\"value\":\"number\",\"length\":2,\"default\":[0,0],\"function\":\"interpolated\",\"zoom-function\":true,\"transition\":true,\"units\":\"pixels\"},\"fill-extrusion-translate-anchor\":{\"type\":\"enum\",\"function\":\"piecewise-constant\",\"zoom-function\":true,\"values\":{\"map\":{},\"viewport\":{}},\"default\":\"map\",\"requires\":[\"fill-extrusion-translate\"]},\"fill-extrusion-pattern\":{\"type\":\"string\",\"function\":\"piecewise-constant\",\"zoom-function\":true,\"transition\":true},\"fill-extrusion-height\":{\"type\":\"number\",\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"default\":0,\"minimum\":0,\"units\":\"meters\",\"transition\":true},\"fill-extrusion-base\":{\"type\":\"number\",\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"default\":0,\"minimum\":0,\"units\":\"meters\",\"transition\":true,\"requires\":[\"fill-extrusion-height\"]}},\"paint_line\":{\"line-opacity\":{\"type\":\"number\",\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"default\":1,\"minimum\":0,\"maximum\":1,\"transition\":true},\"line-color\":{\"type\":\"color\",\"default\":\"#000000\",\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true,\"requires\":[{\"!\":\"line-pattern\"}]},\"line-translate\":{\"type\":\"array\",\"value\":\"number\",\"length\":2,\"default\":[0,0],\"function\":\"interpolated\",\"zoom-function\":true,\"transition\":true,\"units\":\"pixels\"},\"line-translate-anchor\":{\"type\":\"enum\",\"function\":\"piecewise-constant\",\"zoom-function\":true,\"values\":{\"map\":{},\"viewport\":{}},\"default\":\"map\",\"requires\":[\"line-translate\"]},\"line-width\":{\"type\":\"number\",\"default\":1,\"minimum\":0,\"function\":\"interpolated\",\"zoom-function\":true,\"transition\":true,\"units\":\"pixels\"},\"line-gap-width\":{\"type\":\"number\",\"default\":0,\"minimum\":0,\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true,\"units\":\"pixels\"},\"line-offset\":{\"type\":\"number\",\"default\":0,\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true,\"units\":\"pixels\"},\"line-blur\":{\"type\":\"number\",\"default\":0,\"minimum\":0,\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true,\"units\":\"pixels\"},\"line-dasharray\":{\"type\":\"array\",\"value\":\"number\",\"function\":\"piecewise-constant\",\"zoom-function\":true,\"minimum\":0,\"transition\":true,\"units\":\"line widths\",\"requires\":[{\"!\":\"line-pattern\"}]},\"line-pattern\":{\"type\":\"string\",\"function\":\"piecewise-constant\",\"zoom-function\":true,\"transition\":true}},\"paint_circle\":{\"circle-radius\":{\"type\":\"number\",\"default\":5,\"minimum\":0,\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true,\"units\":\"pixels\"},\"circle-color\":{\"type\":\"color\",\"default\":\"#000000\",\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true},\"circle-blur\":{\"type\":\"number\",\"default\":0,\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true},\"circle-opacity\":{\"type\":\"number\",\"default\":1,\"minimum\":0,\"maximum\":1,\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true},\"circle-translate\":{\"type\":\"array\",\"value\":\"number\",\"length\":2,\"default\":[0,0],\"function\":\"interpolated\",\"zoom-function\":true,\"transition\":true,\"units\":\"pixels\"},\"circle-translate-anchor\":{\"type\":\"enum\",\"function\":\"piecewise-constant\",\"zoom-function\":true,\"values\":{\"map\":{},\"viewport\":{}},\"default\":\"map\",\"requires\":[\"circle-translate\"]},\"circle-pitch-scale\":{\"type\":\"enum\",\"function\":\"piecewise-constant\",\"zoom-function\":true,\"values\":{\"map\":{},\"viewport\":{}},\"default\":\"map\"},\"circle-stroke-width\":{\"type\":\"number\",\"default\":0,\"minimum\":0,\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true,\"units\":\"pixels\"},\"circle-stroke-color\":{\"type\":\"color\",\"default\":\"#000000\",\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true},\"circle-stroke-opacity\":{\"type\":\"number\",\"default\":1,\"minimum\":0,\"maximum\":1,\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true}},\"paint_symbol\":{\"icon-opacity\":{\"type\":\"number\",\"default\":1,\"minimum\":0,\"maximum\":1,\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true,\"requires\":[\"icon-image\"]},\"icon-color\":{\"type\":\"color\",\"default\":\"#000000\",\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true,\"requires\":[\"icon-image\"]},\"icon-halo-color\":{\"type\":\"color\",\"default\":\"rgba(0, 0, 0, 0)\",\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true,\"requires\":[\"icon-image\"]},\"icon-halo-width\":{\"type\":\"number\",\"default\":0,\"minimum\":0,\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true,\"units\":\"pixels\",\"requires\":[\"icon-image\"]},\"icon-halo-blur\":{\"type\":\"number\",\"default\":0,\"minimum\":0,\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true,\"units\":\"pixels\",\"requires\":[\"icon-image\"]},\"icon-translate\":{\"type\":\"array\",\"value\":\"number\",\"length\":2,\"default\":[0,0],\"function\":\"interpolated\",\"zoom-function\":true,\"transition\":true,\"units\":\"pixels\",\"requires\":[\"icon-image\"]},\"icon-translate-anchor\":{\"type\":\"enum\",\"function\":\"piecewise-constant\",\"zoom-function\":true,\"values\":{\"map\":{},\"viewport\":{}},\"default\":\"map\",\"requires\":[\"icon-image\",\"icon-translate\"]},\"text-opacity\":{\"type\":\"number\",\"default\":1,\"minimum\":0,\"maximum\":1,\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true,\"requires\":[\"text-field\"]},\"text-color\":{\"type\":\"color\",\"default\":\"#000000\",\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true,\"requires\":[\"text-field\"]},\"text-halo-color\":{\"type\":\"color\",\"default\":\"rgba(0, 0, 0, 0)\",\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true,\"requires\":[\"text-field\"]},\"text-halo-width\":{\"type\":\"number\",\"default\":0,\"minimum\":0,\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true,\"units\":\"pixels\",\"requires\":[\"text-field\"]},\"text-halo-blur\":{\"type\":\"number\",\"default\":0,\"minimum\":0,\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true,\"units\":\"pixels\",\"requires\":[\"text-field\"]},\"text-translate\":{\"type\":\"array\",\"value\":\"number\",\"length\":2,\"default\":[0,0],\"function\":\"interpolated\",\"zoom-function\":true,\"transition\":true,\"units\":\"pixels\",\"requires\":[\"text-field\"]},\"text-translate-anchor\":{\"type\":\"enum\",\"function\":\"piecewise-constant\",\"zoom-function\":true,\"values\":{\"map\":{},\"viewport\":{}},\"default\":\"map\",\"requires\":[\"text-field\",\"text-translate\"]}},\"paint_raster\":{\"raster-opacity\":{\"type\":\"number\",\"default\":1,\"minimum\":0,\"maximum\":1,\"function\":\"interpolated\",\"zoom-function\":true,\"transition\":true},\"raster-hue-rotate\":{\"type\":\"number\",\"default\":0,\"period\":360,\"function\":\"interpolated\",\"zoom-function\":true,\"transition\":true,\"units\":\"degrees\"},\"raster-brightness-min\":{\"type\":\"number\",\"function\":\"interpolated\",\"zoom-function\":true,\"default\":0,\"minimum\":0,\"maximum\":1,\"transition\":true},\"raster-brightness-max\":{\"type\":\"number\",\"function\":\"interpolated\",\"zoom-function\":true,\"default\":1,\"minimum\":0,\"maximum\":1,\"transition\":true},\"raster-saturation\":{\"type\":\"number\",\"default\":0,\"minimum\":-1,\"maximum\":1,\"function\":\"interpolated\",\"zoom-function\":true,\"transition\":true},\"raster-contrast\":{\"type\":\"number\",\"default\":0,\"minimum\":-1,\"maximum\":1,\"function\":\"interpolated\",\"zoom-function\":true,\"transition\":true},\"raster-fade-duration\":{\"type\":\"number\",\"default\":300,\"minimum\":0,\"function\":\"interpolated\",\"zoom-function\":true,\"transition\":true,\"units\":\"milliseconds\"}},\"paint_background\":{\"background-color\":{\"type\":\"color\",\"default\":\"#000000\",\"function\":\"interpolated\",\"zoom-function\":true,\"transition\":true,\"requires\":[{\"!\":\"background-pattern\"}]},\"background-pattern\":{\"type\":\"string\",\"function\":\"piecewise-constant\",\"zoom-function\":true,\"transition\":true},\"background-opacity\":{\"type\":\"number\",\"default\":1,\"minimum\":0,\"maximum\":1,\"function\":\"interpolated\",\"zoom-function\":true,\"transition\":true}},\"transition\":{\"duration\":{\"type\":\"number\",\"default\":300,\"minimum\":0,\"units\":\"milliseconds\"},\"delay\":{\"type\":\"number\",\"default\":0,\"minimum\":0,\"units\":\"milliseconds\"}}}\n},{}],119:[function(require,module,exports){\n\"use strict\";module.exports=function(r){for(var t=arguments,e=1;e7)return[new ValidationError(u,a,\"constants have been deprecated as of v8\")];if(!(a in l.constants))return[new ValidationError(u,a,'constant \"%s\" not found',a)];e=extend({},e,{value:l.constants[a]})}return n.function&&\"object\"===getType(a)?r(e):n.type&&i[n.type]?i[n.type](e):t(extend({},e,{valueSpec:n.type?o[n.type]:n}))};\n},{\"../error/validation_error\":102,\"../util/extend\":119,\"../util/get_type\":120,\"./validate_array\":125,\"./validate_boolean\":126,\"./validate_color\":127,\"./validate_constants\":128,\"./validate_enum\":129,\"./validate_filter\":130,\"./validate_function\":131,\"./validate_layer\":133,\"./validate_light\":135,\"./validate_number\":136,\"./validate_object\":137,\"./validate_source\":140,\"./validate_string\":141}],125:[function(require,module,exports){\n\"use strict\";var getType=require(\"../util/get_type\"),validate=require(\"./validate\"),ValidationError=require(\"../error/validation_error\");module.exports=function(e){var r=e.value,t=e.valueSpec,a=e.style,n=e.styleSpec,l=e.key,i=e.arrayElementValidator||validate;if(\"array\"!==getType(r))return[new ValidationError(l,r,\"array expected, %s found\",getType(r))];if(t.length&&r.length!==t.length)return[new ValidationError(l,r,\"array length %d expected, length %d found\",t.length,r.length)];if(t[\"min-length\"]&&r.length7)return t?[new ValidationError(e,t,\"constants have been deprecated as of v8\")]:[];var o=getType(t);if(\"object\"!==o)return[new ValidationError(e,t,\"object expected, %s found\",o)];var n=[];for(var i in t)\"@\"!==i[0]&&n.push(new ValidationError(e+\".\"+i,t[i],'constants must start with \"@\"'));return n};\n},{\"../error/validation_error\":102,\"../util/get_type\":120}],129:[function(require,module,exports){\n\"use strict\";var ValidationError=require(\"../error/validation_error\"),unbundle=require(\"../util/unbundle_jsonlint\");module.exports=function(e){var r=e.key,n=e.value,u=e.valueSpec,o=[];return Array.isArray(u.values)?u.values.indexOf(unbundle(n))===-1&&o.push(new ValidationError(r,n,\"expected one of [%s], %s found\",u.values.join(\", \"),n)):Object.keys(u.values).indexOf(unbundle(n))===-1&&o.push(new ValidationError(r,n,\"expected one of [%s], %s found\",Object.keys(u.values).join(\", \"),n)),o};\n},{\"../error/validation_error\":102,\"../util/unbundle_jsonlint\":123}],130:[function(require,module,exports){\n\"use strict\";var ValidationError=require(\"../error/validation_error\"),validateEnum=require(\"./validate_enum\"),getType=require(\"../util/get_type\"),unbundle=require(\"../util/unbundle_jsonlint\");module.exports=function e(r){var t,a=r.value,n=r.key,l=r.styleSpec,s=[];if(\"array\"!==getType(a))return[new ValidationError(n,a,\"array expected, %s found\",getType(a))];if(a.length<1)return[new ValidationError(n,a,\"filter array must have at least 1 element\")];switch(s=s.concat(validateEnum({key:n+\"[0]\",value:a[0],valueSpec:l.filter_operator,style:r.style,styleSpec:r.styleSpec})),unbundle(a[0])){case\"<\":case\"<=\":case\">\":case\">=\":a.length>=2&&\"$type\"===unbundle(a[1])&&s.push(new ValidationError(n,a,'\"$type\" cannot be use with operator \"%s\"',a[0]));case\"==\":case\"!=\":3!==a.length&&s.push(new ValidationError(n,a,'filter array for operator \"%s\" must have 3 elements',a[0]));case\"in\":case\"!in\":a.length>=2&&(t=getType(a[1]),\"string\"!==t&&s.push(new ValidationError(n+\"[1]\",a[1],\"string expected, %s found\",t)));for(var o=2;ounbundle(r[0].zoom))return[new ValidationError(o,r[0].zoom,\"stop zoom values must appear in ascending order\")];unbundle(r[0].zoom)!==l&&(l=unbundle(r[0].zoom),i=void 0,s={}),t=t.concat(validateObject({key:o+\"[0]\",value:r[0],valueSpec:{zoom:{}},style:e.style,styleSpec:e.styleSpec,objectElementValidators:{zoom:validateNumber,value:a}}))}else t=t.concat(a({key:o+\"[0]\",value:r[0],valueSpec:{},style:e.style,styleSpec:e.styleSpec}));return t.concat(validate({key:o+\"[1]\",value:r[1],valueSpec:u,style:e.style,styleSpec:e.styleSpec}))}function a(e){var t=getType(e.value),r=unbundle(e.value);if(n){if(t!==n)return[new ValidationError(e.key,e.value,\"%s stop domain type must match previous stop domain type %s\",t,n)]}else n=t;if(\"number\"!==t&&\"string\"!==t&&\"boolean\"!==t)return[new ValidationError(e.key,e.value,\"stop domain value must be a number, string, or boolean\")];if(\"number\"!==t&&\"categorical\"!==p){var a=\"number expected, %s found\";return u[\"property-function\"]&&void 0===p&&(a+='\\nIf you intended to use a categorical function, specify `\"type\": \"categorical\"`.'),[new ValidationError(e.key,e.value,a,t)]}return\"categorical\"!==p||\"number\"!==t||isFinite(r)&&Math.floor(r)===r?\"number\"===t&&void 0!==i&&r=8&&(d&&!e.valueSpec[\"property-function\"]?v.push(new ValidationError(e.key,e.value,\"property functions not supported\")):y&&!e.valueSpec[\"zoom-function\"]&&v.push(new ValidationError(e.key,e.value,\"zoom functions not supported\"))),\"categorical\"!==p&&!c||void 0!==e.value.property||v.push(new ValidationError(e.key,e.value,'\"property\" property is required')),v};\n},{\"../error/validation_error\":102,\"../util/get_type\":120,\"../util/unbundle_jsonlint\":123,\"./validate\":124,\"./validate_array\":125,\"./validate_number\":136,\"./validate_object\":137}],132:[function(require,module,exports){\n\"use strict\";var ValidationError=require(\"../error/validation_error\"),validateString=require(\"./validate_string\");module.exports=function(r){var e=r.value,t=r.key,a=validateString(r);return a.length?a:(e.indexOf(\"{fontstack}\")===-1&&a.push(new ValidationError(t,e,'\"glyphs\" url must include a \"{fontstack}\" token')),e.indexOf(\"{range}\")===-1&&a.push(new ValidationError(t,e,'\"glyphs\" url must include a \"{range}\" token')),a)};\n},{\"../error/validation_error\":102,\"./validate_string\":141}],133:[function(require,module,exports){\n\"use strict\";var ValidationError=require(\"../error/validation_error\"),unbundle=require(\"../util/unbundle_jsonlint\"),validateObject=require(\"./validate_object\"),validateFilter=require(\"./validate_filter\"),validatePaintProperty=require(\"./validate_paint_property\"),validateLayoutProperty=require(\"./validate_layout_property\"),extend=require(\"../util/extend\");module.exports=function(e){var r=[],t=e.value,a=e.key,i=e.style,l=e.styleSpec;t.type||t.ref||r.push(new ValidationError(a,t,'either \"type\" or \"ref\" is required'));var u=unbundle(t.type),n=unbundle(t.ref);if(t.id)for(var o=unbundle(t.id),s=0;sm.maximum?[new ValidationError(r,i,\"%s is greater than the maximum value %s\",i,m.maximum)]:[]};\n},{\"../error/validation_error\":102,\"../util/get_type\":120}],137:[function(require,module,exports){\n\"use strict\";var ValidationError=require(\"../error/validation_error\"),getType=require(\"../util/get_type\"),validateSpec=require(\"./validate\");module.exports=function(e){var r=e.key,t=e.value,i=e.valueSpec||{},a=e.objectElementValidators||{},o=e.style,l=e.styleSpec,n=[],u=getType(t);if(\"object\"!==u)return[new ValidationError(r,t,\"object expected, %s found\",u)];for(var d in t){var p=d.split(\".\")[0],s=i[p]||i[\"*\"],c=void 0;if(a[p])c=a[p];else if(i[p])c=validateSpec;else if(a[\"*\"])c=a[\"*\"];else{if(!i[\"*\"]){n.push(new ValidationError(r,t[d],'unknown property \"%s\"',d));continue}c=validateSpec}n=n.concat(c({key:(r?r+\".\":r)+d,value:t[d],valueSpec:s,style:o,styleSpec:l,object:t,objectKey:d}))}for(var v in i)i[v].required&&void 0===i[v].default&&void 0===t[v]&&n.push(new ValidationError(r,t,'missing required property \"%s\"',v));return n};\n},{\"../error/validation_error\":102,\"../util/get_type\":120,\"./validate\":124}],138:[function(require,module,exports){\n\"use strict\";var validateProperty=require(\"./validate_property\");module.exports=function(r){return validateProperty(r,\"paint\")};\n},{\"./validate_property\":139}],139:[function(require,module,exports){\n\"use strict\";var validate=require(\"./validate\"),ValidationError=require(\"../error/validation_error\"),getType=require(\"../util/get_type\");module.exports=function(e,t){var r=e.key,i=e.style,a=e.styleSpec,n=e.value,o=e.objectKey,l=a[t+\"_\"+e.layerType];if(!l)return[];var y=o.match(/^(.*)-transition$/);if(\"paint\"===t&&y&&l[y[1]]&&l[y[1]].transition)return validate({key:r,value:n,valueSpec:a.transition,style:i,styleSpec:a});var p=e.valueSpec||l[o];if(!p)return[new ValidationError(r,n,'unknown property \"%s\"',o)];var s;if(\"string\"===getType(n)&&p[\"property-function\"]&&!p.tokens&&(s=/^{([^}]+)}$/.exec(n)))return[new ValidationError(r,n,'\"%s\" does not support interpolation syntax\\nUse an identity property function instead: `{ \"type\": \"identity\", \"property\": %s` }`.',o,JSON.stringify(s[1]))];var u=[];return\"symbol\"===e.layerType&&\"text-field\"===o&&i&&!i.glyphs&&u.push(new ValidationError(r,n,'use of \"text-field\" requires a style \"glyphs\" property')),u.concat(validate({key:e.key,value:n,valueSpec:p,style:i,styleSpec:a}))};\n},{\"../error/validation_error\":102,\"../util/get_type\":120,\"./validate\":124}],140:[function(require,module,exports){\n\"use strict\";var ValidationError=require(\"../error/validation_error\"),unbundle=require(\"../util/unbundle_jsonlint\"),validateObject=require(\"./validate_object\"),validateEnum=require(\"./validate_enum\");module.exports=function(e){var a=e.value,t=e.key,r=e.styleSpec,l=e.style;if(!a.type)return[new ValidationError(t,a,'\"type\" is required')];var u=unbundle(a.type),i=[];switch(u){case\"vector\":case\"raster\":if(i=i.concat(validateObject({key:t,value:a,valueSpec:r.source_tile,style:e.style,styleSpec:r})),\"url\"in a)for(var s in a)[\"type\",\"url\",\"tileSize\"].indexOf(s)<0&&i.push(new ValidationError(t+\".\"+s,a[s],'a source with a \"url\" property may not include a \"%s\" property',s));return i;case\"geojson\":return validateObject({key:t,value:a,valueSpec:r.source_geojson,style:l,styleSpec:r});case\"video\":return validateObject({key:t,value:a,valueSpec:r.source_video,style:l,styleSpec:r});case\"image\":return validateObject({key:t,value:a,valueSpec:r.source_image,style:l,styleSpec:r});case\"canvas\":return validateObject({key:t,value:a,valueSpec:r.source_canvas,style:l,styleSpec:r});default:return validateEnum({key:t+\".type\",value:a.type,valueSpec:{values:[\"vector\",\"raster\",\"geojson\",\"video\",\"image\",\"canvas\"]},style:l,styleSpec:r})}};\n},{\"../error/validation_error\":102,\"../util/unbundle_jsonlint\":123,\"./validate_enum\":129,\"./validate_object\":137}],141:[function(require,module,exports){\n\"use strict\";var getType=require(\"../util/get_type\"),ValidationError=require(\"../error/validation_error\");module.exports=function(r){var e=r.value,t=r.key,i=getType(e);return\"string\"!==i?[new ValidationError(t,e,\"string expected, %s found\",i)]:[]};\n},{\"../error/validation_error\":102,\"../util/get_type\":120}],142:[function(require,module,exports){\n\"use strict\";function validateStyleMin(e,a){a=a||latestStyleSpec;var t=[];return t=t.concat(validate({key:\"\",value:e,valueSpec:a.$root,styleSpec:a,style:e,objectElementValidators:{glyphs:validateGlyphsURL,\"*\":function(){return[]}}})),a.$version>7&&e.constants&&(t=t.concat(validateConstants({key:\"constants\",value:e.constants,style:e,styleSpec:a}))),sortErrors(t)}function sortErrors(e){return[].concat(e).sort(function(e,a){return e.line-a.line})}function wrapCleanErrors(e){return function(){return sortErrors(e.apply(this,arguments))}}var validateConstants=require(\"./validate/validate_constants\"),validate=require(\"./validate/validate\"),latestStyleSpec=require(\"./reference/latest\"),validateGlyphsURL=require(\"./validate/validate_glyphs_url\");validateStyleMin.source=wrapCleanErrors(require(\"./validate/validate_source\")),validateStyleMin.light=wrapCleanErrors(require(\"./validate/validate_light\")),validateStyleMin.layer=wrapCleanErrors(require(\"./validate/validate_layer\")),validateStyleMin.filter=wrapCleanErrors(require(\"./validate/validate_filter\")),validateStyleMin.paintProperty=wrapCleanErrors(require(\"./validate/validate_paint_property\")),validateStyleMin.layoutProperty=wrapCleanErrors(require(\"./validate/validate_layout_property\")),module.exports=validateStyleMin;\n},{\"./reference/latest\":117,\"./validate/validate\":124,\"./validate/validate_constants\":128,\"./validate/validate_filter\":130,\"./validate/validate_glyphs_url\":132,\"./validate/validate_layer\":133,\"./validate/validate_layout_property\":134,\"./validate/validate_light\":135,\"./validate/validate_paint_property\":138,\"./validate/validate_source\":140}],143:[function(require,module,exports){\n\"use strict\";var AnimationLoop=function(){this.n=0,this.times=[]};AnimationLoop.prototype.stopped=function(){return this.times=this.times.filter(function(t){return t.time>=(new Date).getTime()}),!this.times.length},AnimationLoop.prototype.set=function(t){return this.times.push({id:this.n,time:t+(new Date).getTime()}),this.n++},AnimationLoop.prototype.cancel=function(t){this.times=this.times.filter(function(i){return i.id!==t})},module.exports=AnimationLoop;\n},{}],144:[function(require,module,exports){\n\"use strict\";var Evented=require(\"../util/evented\"),ajax=require(\"../util/ajax\"),browser=require(\"../util/browser\"),normalizeURL=require(\"../util/mapbox\").normalizeSpriteURL,SpritePosition=function(){this.x=0,this.y=0,this.width=0,this.height=0,this.pixelRatio=1,this.sdf=!1},ImageSprite=function(t){function i(i,e){var a=this;t.call(this),this.base=i,this.retina=browser.devicePixelRatio>1,this.setEventedParent(e);var r=this.retina?\"@2x\":\"\";ajax.getJSON(normalizeURL(i,r,\".json\"),function(t,i){return t?void a.fire(\"error\",{error:t}):(a.data=i,void(a.imgData&&a.fire(\"data\",{dataType:\"style\"})))}),ajax.getImage(normalizeURL(i,r,\".png\"),function(t,i){if(t)return void a.fire(\"error\",{error:t});a.imgData=browser.getImageData(i);for(var e=0;e1!==this.retina){var e=new i(this.base);e.on(\"data\",function(){t.data=e.data,t.imgData=e.imgData,t.width=e.width,t.retina=e.retina})}},i.prototype.getSpritePosition=function(t){if(!this.loaded())return new SpritePosition;var i=this.data&&this.data[t];return i&&this.imgData?i:new SpritePosition},i}(Evented);module.exports=ImageSprite;\n},{\"../util/ajax\":191,\"../util/browser\":192,\"../util/evented\":200,\"../util/mapbox\":208}],145:[function(require,module,exports){\n\"use strict\";var styleSpec=require(\"../style-spec/reference/latest\"),util=require(\"../util/util\"),Evented=require(\"../util/evented\"),validateStyle=require(\"./validate_style\"),StyleDeclaration=require(\"./style_declaration\"),StyleTransition=require(\"./style_transition\"),TRANSITION_SUFFIX=\"-transition\",Light=function(t){function i(i){t.call(this),this.properties=[\"anchor\",\"color\",\"position\",\"intensity\"],this._specifications=styleSpec.light,this.set(i)}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.set=function(t){var i=this;if(!this._validate(validateStyle.light,t)){this._declarations={},this._transitions={},this._transitionOptions={},this.calculated={},t=util.extend({anchor:this._specifications.anchor.default,color:this._specifications.color.default,position:this._specifications.position.default,intensity:this._specifications.intensity.default},t);for(var e=0,o=i.properties;eMath.floor(e)&&(t.lastIntegerZoom=Math.floor(e+1),t.lastIntegerZoomTime=Date.now()),t.lastZoom=e},t.prototype._checkLoaded=function(){if(!this._loaded)throw new Error(\"Style is not done loading\")},t.prototype.update=function(e,t){var r=this;if(this._changed){var i=Object.keys(this._updatedLayers),o=Object.keys(this._removedLayers);(i.length||o.length||this._updatedSymbolOrder)&&this._updateWorkerLayers(i,o);for(var s in r._updatedSources){var a=r._updatedSources[s];\"reload\"===a?r._reloadSource(s):\"clear\"===a&&r._clearSource(s)}this._applyClasses(e,t),this._resetUpdates(),this.fire(\"data\",{dataType:\"style\"})}},t.prototype._updateWorkerLayers=function(e,t){var r=this,i=this._updatedSymbolOrder?this._order.filter(function(e){return\"symbol\"===r._layers[e].type}):null;this.dispatcher.broadcast(\"updateLayers\",{layers:this._serializeLayers(e),removedIds:t,symbolOrder:i})},t.prototype._resetUpdates=function(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSymbolOrder=!1,this._updatedSources={},this._updatedPaintProps={},this._updatedAllPaintProps=!1},t.prototype.setState=function(e){var t=this;if(this._checkLoaded(),validateStyle.emitErrors(this,validateStyle(e)))return!1;e=util.extend({},e),e.layers=deref(e.layers);var r=diff(this.serialize(),e).filter(function(e){return!(e.command in ignoredDiffOperations)});if(0===r.length)return!1;var i=r.filter(function(e){return!(e.command in supportedDiffOperations)});if(i.length>0)throw new Error(\"Unimplemented: \"+i.map(function(e){return e.command}).join(\", \")+\".\");return r.forEach(function(e){\"setTransition\"!==e.command&&t[e.command].apply(t,e.args)}),this.stylesheet=e,!0},t.prototype.addSource=function(e,t,r){var i=this;if(this._checkLoaded(),void 0!==this.sourceCaches[e])throw new Error(\"There is already a source with this ID\");if(!t.type)throw new Error(\"The type property must be defined, but the only the following properties were given: \"+Object.keys(t)+\".\");var o=[\"vector\",\"raster\",\"geojson\",\"video\",\"image\",\"canvas\"],s=o.indexOf(t.type)>=0;if(!s||!this._validate(validateStyle.source,\"sources.\"+e,t,null,r)){var a=this.sourceCaches[e]=new SourceCache(e,t,this.dispatcher);a.style=this,a.setEventedParent(this,function(){return{isSourceLoaded:i.loaded(),source:a.serialize(),sourceId:e}}),a.onAdd(this.map),this._changed=!0}},t.prototype.removeSource=function(e){if(this._checkLoaded(),void 0===this.sourceCaches[e])throw new Error(\"There is no source with this ID\");var t=this.sourceCaches[e];delete this.sourceCaches[e],delete this._updatedSources[e],t.setEventedParent(null),t.clearTiles(),t.onRemove&&t.onRemove(this.map),this._changed=!0},t.prototype.getSource=function(e){return this.sourceCaches[e]&&this.sourceCaches[e].getSource()},t.prototype.addLayer=function(e,t,r){this._checkLoaded();var i=e.id;if(\"object\"==typeof e.source&&(this.addSource(i,e.source),e=util.extend(e,{source:i})),!this._validate(validateStyle.layer,\"layers.\"+i,e,{arrayIndex:-1},r)){var o=StyleLayer.create(e);this._validateLayer(o),o.setEventedParent(this,{layer:{id:i}});var s=t?this._order.indexOf(t):this._order.length;if(this._order.splice(s,0,i),this._layers[i]=o,this._removedLayers[i]&&o.source){var a=this._removedLayers[i];delete this._removedLayers[i],this._updatedSources[o.source]=a.type!==o.type?\"clear\":\"reload\"}this._updateLayer(o),\"symbol\"===o.type&&(this._updatedSymbolOrder=!0),this.updateClasses(i)}},t.prototype.moveLayer=function(e,t){this._checkLoaded(),this._changed=!0;var r=this._layers[e];if(!r)return void this.fire(\"error\",{error:new Error(\"The layer '\"+e+\"' does not exist in the map's style and cannot be moved.\")});var i=this._order.indexOf(e);this._order.splice(i,1);var o=t?this._order.indexOf(t):this._order.length;this._order.splice(o,0,e),\"symbol\"===r.type&&(this._updatedSymbolOrder=!0,r.source&&!this._updatedSources[r.source]&&(this._updatedSources[r.source]=\"reload\"))},t.prototype.removeLayer=function(e){this._checkLoaded();var t=this._layers[e];if(!t)return void this.fire(\"error\",{error:new Error(\"The layer '\"+e+\"' does not exist in the map's style and cannot be removed.\")});t.setEventedParent(null);var r=this._order.indexOf(e);this._order.splice(r,1),\"symbol\"===t.type&&(this._updatedSymbolOrder=!0),this._changed=!0,this._removedLayers[e]=t,delete this._layers[e],delete this._updatedLayers[e],delete this._updatedPaintProps[e]},t.prototype.getLayer=function(e){return this._layers[e]},t.prototype.setLayerZoomRange=function(e,t,r){this._checkLoaded();var i=this.getLayer(e);return i?void(i.minzoom===t&&i.maxzoom===r||(null!=t&&(i.minzoom=t),null!=r&&(i.maxzoom=r),this._updateLayer(i))):void this.fire(\"error\",{error:new Error(\"The layer '\"+e+\"' does not exist in the map's style and cannot have zoom extent.\")})},t.prototype.setFilter=function(e,t){this._checkLoaded();var r=this.getLayer(e);return r?void(null!==t&&void 0!==t&&this._validate(validateStyle.filter,\"layers.\"+r.id+\".filter\",t)||util.deepEqual(r.filter,t)||(r.filter=util.clone(t),this._updateLayer(r))):void this.fire(\"error\",{error:new Error(\"The layer '\"+e+\"' does not exist in the map's style and cannot be filtered.\")})},t.prototype.getFilter=function(e){return util.clone(this.getLayer(e).filter)},t.prototype.setLayoutProperty=function(e,t,r){this._checkLoaded();var i=this.getLayer(e);return i?void(util.deepEqual(i.getLayoutProperty(t),r)||(i.setLayoutProperty(t,r),this._updateLayer(i))):void this.fire(\"error\",{error:new Error(\"The layer '\"+e+\"' does not exist in the map's style and cannot be styled.\")})},t.prototype.getLayoutProperty=function(e,t){return this.getLayer(e).getLayoutProperty(t)},t.prototype.setPaintProperty=function(e,t,r,i){this._checkLoaded();var o=this.getLayer(e);if(!o)return void this.fire(\"error\",{error:new Error(\"The layer '\"+e+\"' does not exist in the map's style and cannot be styled.\")});if(!util.deepEqual(o.getPaintProperty(t,i),r)){var s=o.isPaintValueFeatureConstant(t);o.setPaintProperty(t,r,i);var a=!(r&&MapboxGLFunction.isFunctionDefinition(r)&&\"$zoom\"!==r.property&&void 0!==r.property);a&&s||this._updateLayer(o),this.updateClasses(e,t)}},t.prototype.getPaintProperty=function(e,t,r){return this.getLayer(e).getPaintProperty(t,r)},t.prototype.getTransition=function(){return util.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},t.prototype.updateClasses=function(e,t){if(this._changed=!0,e){var r=this._updatedPaintProps;r[e]||(r[e]={}),r[e][t||\"all\"]=!0}else this._updatedAllPaintProps=!0},t.prototype.serialize=function(){var e=this;return util.filterObject({version:this.stylesheet.version,name:this.stylesheet.name,metadata:this.stylesheet.metadata,light:this.stylesheet.light,center:this.stylesheet.center,zoom:this.stylesheet.zoom,bearing:this.stylesheet.bearing,pitch:this.stylesheet.pitch,sprite:this.stylesheet.sprite,glyphs:this.stylesheet.glyphs,transition:this.stylesheet.transition,sources:util.mapObject(this.sourceCaches,function(e){return e.serialize()}),layers:this._order.map(function(t){return e._layers[t].serialize()})},function(e){return void 0!==e})},t.prototype._updateLayer=function(e){this._updatedLayers[e.id]=!0,e.source&&!this._updatedSources[e.source]&&(this._updatedSources[e.source]=\"reload\"),this._changed=!0},t.prototype._flattenRenderedFeatures=function(e){for(var t=this,r=[],i=this._order.length-1;i>=0;i--)for(var o=t._order[i],s=0,a=e;s=this.maxzoom)||\"none\"===this.layout.visibility)},i.prototype.updatePaintTransitions=function(t,i,a,e,n){for(var o=this,r=util.extend({},this._paintDeclarations[\"\"]),s=0;s=this.endTime)return e;var a=this.oldTransition.calculate(t,i,this.startTime),n=util.easeCubicInOut((o-this.startTime-this.delay)/this.duration);return this.interp(a,e,n)},StyleTransition.prototype._calculateTargetValue=function(t,i){if(!this.zoomTransitioned)return this.declaration.calculate(t,i);var o=t.zoom,e=this.zoomHistory.lastIntegerZoom,a=o>e?2:.5,n=this.declaration.calculate({zoom:o>e?o-1:o+1},i),r=this.declaration.calculate({zoom:o},i),s=Math.min((Date.now()-this.zoomHistory.lastIntegerZoomTime)/this.duration,1),l=Math.abs(o-e),u=interpolate(s,1,l);return void 0!==n&&void 0!==r?{from:n,fromScale:a,to:r,toScale:1,t:u}:void 0},module.exports=StyleTransition;\n},{\"../util/interpolate\":204,\"../util/util\":212}],156:[function(require,module,exports){\n\"use strict\";module.exports=require(\"../style-spec/validate_style.min\"),module.exports.emitErrors=function(r,e){if(e&&e.length){for(var t=0;t-a/2;){if(s--,s<0)return!1;f-=e[s].dist(i),i=e[s]}f+=e[s].dist(e[s+1]),s++;for(var l=[],o=0;fr;)o-=l.shift().angleDelta;if(o>n)return!1;s++,f+=c.dist(g)}return!0}module.exports=checkMaxAngle;\n},{}],159:[function(require,module,exports){\n\"use strict\";function clipLine(n,x,y,o,e){for(var r=[],t=0;t=o&&w.x>=o||(P.x>=o?P=new Point(o,P.y+(w.y-P.y)*((o-P.x)/(w.x-P.x)))._round():w.x>=o&&(w=new Point(o,P.y+(w.y-P.y)*((o-P.x)/(w.x-P.x)))._round()),P.y>=e&&w.y>=e||(P.y>=e?P=new Point(P.x+(w.x-P.x)*((e-P.y)/(w.y-P.y)),e)._round():w.y>=e&&(w=new Point(P.x+(w.x-P.x)*((e-P.y)/(w.y-P.y)),e)._round()),u&&P.equals(u[u.length-1])||(u=[P],r.push(u)),u.push(w)))))}return r}var Point=require(\"point-geometry\");module.exports=clipLine;\n},{\"point-geometry\":26}],160:[function(require,module,exports){\n\"use strict\";var createStructArrayType=require(\"../util/struct_array\"),Point=require(\"point-geometry\"),CollisionBoxArray=createStructArrayType({members:[{type:\"Int16\",name:\"anchorPointX\"},{type:\"Int16\",name:\"anchorPointY\"},{type:\"Int16\",name:\"x1\"},{type:\"Int16\",name:\"y1\"},{type:\"Int16\",name:\"x2\"},{type:\"Int16\",name:\"y2\"},{type:\"Float32\",name:\"maxScale\"},{type:\"Uint32\",name:\"featureIndex\"},{type:\"Uint16\",name:\"sourceLayerIndex\"},{type:\"Uint16\",name:\"bucketIndex\"},{type:\"Int16\",name:\"bbox0\"},{type:\"Int16\",name:\"bbox1\"},{type:\"Int16\",name:\"bbox2\"},{type:\"Int16\",name:\"bbox3\"},{type:\"Float32\",name:\"placementScale\"}]});Object.defineProperty(CollisionBoxArray.prototype.StructType.prototype,\"anchorPoint\",{get:function(){return new Point(this.anchorPointX,this.anchorPointY)}}),module.exports=CollisionBoxArray;\n},{\"../util/struct_array\":210,\"point-geometry\":26}],161:[function(require,module,exports){\n\"use strict\";var CollisionFeature=function(t,e,i,o,s,a,n,r,l,d,u){var h=n.top*r-l,x=n.bottom*r+l,f=n.left*r-l,m=n.right*r+l;if(this.boxStartIndex=t.length,d){var _=x-h,b=m-f;if(_>0)if(_=Math.max(10*r,_),u){var v=e[i.segment+1].sub(e[i.segment])._unit()._mult(b),c=[i.sub(v),i.add(v)];this._addLineCollisionBoxes(t,c,i,0,b,_,o,s,a)}else this._addLineCollisionBoxes(t,e,i,i.segment,b,_,o,s,a)}else t.emplaceBack(i.x,i.y,f,h,m,x,1/0,o,s,a,0,0,0,0,0);this.boxEndIndex=t.length};CollisionFeature.prototype._addLineCollisionBoxes=function(t,e,i,o,s,a,n,r,l){var d=a/2,u=Math.floor(s/d),h=-a/2,x=this.boxes,f=i,m=o+1,_=h;do{if(m--,m<0)return x;_-=e[m].dist(f),f=e[m]}while(_>-s/2);for(var b=e[m].dist(e[m+1]),v=0;v=e.length)return x;b=e[m].dist(e[m+1])}var g=c-_,p=e[m],C=e[m+1],B=C.sub(p)._unit()._mult(g)._add(p)._round(),M=Math.max(Math.abs(c-h)-d/2,0),y=s/2/M;t.emplaceBack(B.x,B.y,-a/2,-a/2,a/2,a/2,y,n,r,l,0,0,0,0,0)}return x},module.exports=CollisionFeature;\n},{}],162:[function(require,module,exports){\n\"use strict\";var Point=require(\"point-geometry\"),EXTENT=require(\"../data/extent\"),Grid=require(\"grid-index\"),intersectionTests=require(\"../util/intersection_tests\"),CollisionTile=function(t,e,i){if(\"object\"==typeof t){var r=t;i=e,t=r.angle,e=r.pitch,this.grid=new Grid(r.grid),this.ignoredGrid=new Grid(r.ignoredGrid)}else this.grid=new Grid(EXTENT,12,6),this.ignoredGrid=new Grid(EXTENT,12,0);this.minScale=.5,this.maxScale=2,this.angle=t,this.pitch=e;var a=Math.sin(t),o=Math.cos(t);if(this.rotationMatrix=[o,-a,a,o],this.reverseRotationMatrix=[o,a,-a,o],this.yStretch=1/Math.cos(e/180*Math.PI),this.yStretch=Math.pow(this.yStretch,1.3),this.collisionBoxArray=i,0===i.length){i.emplaceBack();var n=32767;i.emplaceBack(0,0,0,-n,0,n,n,0,0,0,0,0,0,0,0,0),i.emplaceBack(EXTENT,0,0,-n,0,n,n,0,0,0,0,0,0,0,0,0),i.emplaceBack(0,0,-n,0,n,0,n,0,0,0,0,0,0,0,0,0),i.emplaceBack(0,EXTENT,-n,0,n,0,n,0,0,0,0,0,0,0,0,0)}this.tempCollisionBox=i.get(0),this.edges=[i.get(1),i.get(2),i.get(3),i.get(4)]};CollisionTile.prototype.serialize=function(t){var e=this.grid.toArrayBuffer(),i=this.ignoredGrid.toArrayBuffer();return t&&(t.push(e),t.push(i)),{angle:this.angle,pitch:this.pitch,grid:e,ignoredGrid:i}},CollisionTile.prototype.placeCollisionFeature=function(t,e,i){for(var r=this,a=this.collisionBoxArray,o=this.minScale,n=this.rotationMatrix,l=this.yStretch,h=t.boxStartIndex;h=r.maxScale)return o}if(i){var S=void 0;if(r.angle){var P=r.reverseRotationMatrix,b=new Point(s.x1,s.y1).matMult(P),T=new Point(s.x2,s.y1).matMult(P),w=new Point(s.x1,s.y2).matMult(P),N=new Point(s.x2,s.y2).matMult(P);S=r.tempCollisionBox,S.anchorPointX=s.anchorPoint.x,S.anchorPointY=s.anchorPoint.y,S.x1=Math.min(b.x,T.x,w.x,N.x),S.y1=Math.min(b.y,T.x,w.x,N.x),S.x2=Math.max(b.x,T.x,w.x,N.x),S.y2=Math.max(b.y,T.x,w.x,N.x),S.maxScale=s.maxScale}else S=s;for(var B=0;B=r.maxScale)return o}}}return o},CollisionTile.prototype.queryRenderedSymbols=function(t,e){var i={},r=[];if(0===t.length||0===this.grid.length&&0===this.ignoredGrid.length)return r;for(var a=this.collisionBoxArray,o=this.rotationMatrix,n=this.yStretch,l=[],h=1/0,s=1/0,x=-(1/0),c=-(1/0),g=0;gS.maxScale)){var T=S.anchorPoint.matMult(o),w=T.x+S.x1/e,N=T.y+S.y1/e*n,B=T.x+S.x2/e,G=T.y+S.y2/e*n,E=[new Point(w,N),new Point(B,N),new Point(B,G),new Point(w,G)];intersectionTests.polygonIntersectsPolygon(l,E)&&(i[P][b]=!0,r.push(u[v]))}}return r},CollisionTile.prototype.getPlacementScale=function(t,e,i,r,a){var o=e.x-r.x,n=e.y-r.y,l=(a.x1-i.x2)/o,h=(a.x2-i.x1)/o,s=(a.y1-i.y2)*this.yStretch/n,x=(a.y2-i.y1)*this.yStretch/n;(isNaN(l)||isNaN(h))&&(l=h=1),(isNaN(s)||isNaN(x))&&(s=x=1);var c=Math.min(Math.max(l,h),Math.max(s,x)),g=a.maxScale,y=i.maxScale;return c>g&&(c=g),c>y&&(c=y),c>t&&c>=a.placementScale&&(t=c),t},CollisionTile.prototype.insertCollisionFeature=function(t,e,i){for(var r=this,a=i?this.ignoredGrid:this.grid,o=this.collisionBoxArray,n=t.boxStartIndex;n=0&&k=0&&q=0&&p+c<=s){var M=new Anchor(k,q,y,f)._round();n&&!checkMaxAngle(e,M,l,n,a)||x.push(M)}}g+=A}return i||x.length||o||(x=resample(e,g/2,t,n,a,l,o,!0,h)),x}var interpolate=require(\"../util/interpolate\"),Anchor=require(\"../symbol/anchor\"),checkMaxAngle=require(\"./check_max_angle\");module.exports=getAnchors;\n},{\"../symbol/anchor\":157,\"../util/interpolate\":204,\"./check_max_angle\":158}],164:[function(require,module,exports){\n\"use strict\";var ShelfPack=require(\"@mapbox/shelf-pack\"),util=require(\"../util/util\"),SIZE_GROWTH_RATE=4,DEFAULT_SIZE=128,MAX_SIZE=2048,GlyphAtlas=function(){this.width=DEFAULT_SIZE,this.height=DEFAULT_SIZE,this.atlas=new ShelfPack(this.width,this.height),this.index={},this.ids={},this.data=new Uint8Array(this.width*this.height)};GlyphAtlas.prototype.getGlyphs=function(){var t,i,e,h=this,r={};for(var s in h.ids)t=s.split(\"#\"),i=t[0],e=t[1],r[i]||(r[i]=[]),r[i].push(e);return r},GlyphAtlas.prototype.getRects=function(){var t,i,e,h=this,r={};for(var s in h.ids)t=s.split(\"#\"),i=t[0],e=t[1],r[i]||(r[i]={}),r[i][e]=h.index[s];return r},GlyphAtlas.prototype.addGlyph=function(t,i,e,h){var r=this;if(!e)return null;var s=i+\"#\"+e.id;if(this.index[s])return this.ids[s].indexOf(t)<0&&this.ids[s].push(t),this.index[s];if(!e.bitmap)return null;var a=e.width+2*h,E=e.height+2*h,n=1,l=a+2*n,T=E+2*n;l+=4-l%4,T+=4-T%4;var u=this.atlas.packOne(l,T);if(u||(this.resize(),u=this.atlas.packOne(l,T)),!u)return util.warnOnce(\"glyph bitmap overflow\"),null;this.index[s]=u,this.ids[s]=[t];for(var d=this.data,p=e.bitmap,A=0;A=MAX_SIZE||e>=MAX_SIZE)){this.texture&&(this.gl&&this.gl.deleteTexture(this.texture),this.texture=null),this.width*=SIZE_GROWTH_RATE,this.height*=SIZE_GROWTH_RATE,this.atlas.resize(this.width,this.height);for(var h=new ArrayBuffer(this.width*this.height),r=0;r65535)return a(\"glyphs > 65535 not supported\");void 0===this.loading[t]&&(this.loading[t]={});var l=this.loading[t];if(l[e])l[e].push(a);else{l[e]=[a];var i=256*e+\"-\"+(256*e+255),r=glyphUrl(t,i,this.url);ajax.getArrayBuffer(r,function(t,a){for(var i=!t&&new Glyphs(new Protobuf(a.data)),r=0;r1?2:1,this.canvas&&(this.canvas.width=this.width*this.pixelRatio,this.canvas.height=this.height*this.pixelRatio)),this.sprite=t},i.prototype.addIcons=function(t,i){for(var e=this,r=0;r1||(b?(clearTimeout(b),b=null,h(\"dblclick\",t)):b=setTimeout(l,300))}function i(e){f(\"touchmove\",e)}function c(e){f(\"touchend\",e)}function d(e){f(\"touchcancel\",e)}function l(){b=null}function s(e){var t=DOM.mousePos(g,e);t.equals(L)&&h(\"click\",e)}function v(e){h(\"dblclick\",e),e.preventDefault()}function m(t){var n=e.dragRotate&&e.dragRotate.isActive();E||n?E&&(p=t):h(\"contextmenu\",t),t.preventDefault()}function h(t,n){var o=DOM.mousePos(g,n);return e.fire(t,{lngLat:e.unproject(o),point:o,originalEvent:n})}function f(t,n){var o=DOM.touchPos(g,n),r=o.reduce(function(e,t,n,o){return e.add(t.div(o.length))},new Point(0,0));return e.fire(t,{lngLat:e.unproject(r),point:r,lngLats:o.map(function(t){return e.unproject(t)},this),points:o,originalEvent:n})}var g=e.getCanvasContainer(),p=null,E=!1,L=null,b=null;for(var q in handlers)e[q]=new handlers[q](e,t),t.interactive&&t[q]&&e[q].enable(t[q]);g.addEventListener(\"mouseout\",n,!1),g.addEventListener(\"mousedown\",o,!1),g.addEventListener(\"mouseup\",r,!1),g.addEventListener(\"mousemove\",a,!1),g.addEventListener(\"touchstart\",u,!1),g.addEventListener(\"touchend\",c,!1),g.addEventListener(\"touchmove\",i,!1),g.addEventListener(\"touchcancel\",d,!1),g.addEventListener(\"click\",s,!1),g.addEventListener(\"dblclick\",v,!1),g.addEventListener(\"contextmenu\",m,!1)};\n},{\"../util/dom\":199,\"./handler/box_zoom\":179,\"./handler/dblclick_zoom\":180,\"./handler/drag_pan\":181,\"./handler/drag_rotate\":182,\"./handler/keyboard\":183,\"./handler/scroll_zoom\":184,\"./handler/touch_zoom_rotate\":185,\"point-geometry\":26}],172:[function(require,module,exports){\n\"use strict\";var util=require(\"../util/util\"),interpolate=require(\"../util/interpolate\"),browser=require(\"../util/browser\"),LngLat=require(\"../geo/lng_lat\"),LngLatBounds=require(\"../geo/lng_lat_bounds\"),Point=require(\"point-geometry\"),Evented=require(\"../util/evented\"),Camera=function(t){function i(i,e){t.call(this),this.moving=!1,this.transform=i,this._bearingSnap=e.bearingSnap}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.getCenter=function(){return this.transform.center},i.prototype.setCenter=function(t,i){return this.jumpTo({center:t},i),this},i.prototype.panBy=function(t,i,e){return this.panTo(this.transform.center,util.extend({offset:Point.convert(t).mult(-1)},i),e),this},i.prototype.panTo=function(t,i,e){return this.easeTo(util.extend({center:t},i),e)},i.prototype.getZoom=function(){return this.transform.zoom},i.prototype.setZoom=function(t,i){return this.jumpTo({zoom:t},i),this},i.prototype.zoomTo=function(t,i,e){return this.easeTo(util.extend({zoom:t},i),e)},i.prototype.zoomIn=function(t,i){return this.zoomTo(this.getZoom()+1,t,i),this},i.prototype.zoomOut=function(t,i){return this.zoomTo(this.getZoom()-1,t,i),this},i.prototype.getBearing=function(){return this.transform.bearing},i.prototype.setBearing=function(t,i){return this.jumpTo({bearing:t},i),this},i.prototype.rotateTo=function(t,i,e){return this.easeTo(util.extend({bearing:t},i),e)},i.prototype.resetNorth=function(t,i){return this.rotateTo(0,util.extend({duration:1e3},t),i),this},i.prototype.snapToNorth=function(t,i){return Math.abs(this.getBearing())i?1:0}),[\"bottom\",\"left\",\"right\",\"top\"]))return void util.warnOnce(\"options.padding must be a positive number, or an Object with keys 'bottom', 'left', 'right', 'top'\");t=LngLatBounds.convert(t);var n=[i.padding.left-i.padding.right,i.padding.top-i.padding.bottom],r=Math.min(i.padding.right,i.padding.left),s=Math.min(i.padding.top,i.padding.bottom);i.offset=[i.offset[0]+n[0],i.offset[1]+n[1]];var a=Point.convert(i.offset),h=this.transform,u=h.project(t.getNorthWest()),p=h.project(t.getSouthEast()),c=p.sub(u),g=(h.width-2*r-2*Math.abs(a.x))/c.x,m=(h.height-2*s-2*Math.abs(a.y))/c.y;return m<0||g<0?void util.warnOnce(\"Map cannot fit within canvas with the given bounds, padding, and/or offset.\"):(i.center=h.unproject(u.add(p).div(2)),i.zoom=Math.min(h.scaleZoom(h.scale*Math.min(g,m)),i.maxZoom),i.bearing=0,i.linear?this.easeTo(i,e):this.flyTo(i,e))},i.prototype.jumpTo=function(t,i){this.stop();var e=this.transform,o=!1,n=!1,r=!1;return\"zoom\"in t&&e.zoom!==+t.zoom&&(o=!0,e.zoom=+t.zoom),\"center\"in t&&(e.center=LngLat.convert(t.center)),\"bearing\"in t&&e.bearing!==+t.bearing&&(n=!0,e.bearing=+t.bearing),\"pitch\"in t&&e.pitch!==+t.pitch&&(r=!0,e.pitch=+t.pitch),this.fire(\"movestart\",i).fire(\"move\",i),o&&this.fire(\"zoomstart\",i).fire(\"zoom\",i).fire(\"zoomend\",i),n&&this.fire(\"rotate\",i),r&&this.fire(\"pitch\",i),this.fire(\"moveend\",i)},i.prototype.easeTo=function(t,i){var e=this;this.stop(),t=util.extend({offset:[0,0],duration:500,easing:util.ease},t);var o,n,r=this.transform,s=Point.convert(t.offset),a=this.getZoom(),h=this.getBearing(),u=this.getPitch(),p=\"zoom\"in t?+t.zoom:a,c=\"bearing\"in t?this._normalizeBearing(t.bearing,h):h,g=\"pitch\"in t?+t.pitch:u;\"center\"in t?(o=LngLat.convert(t.center),n=r.centerPoint.add(s)):\"around\"in t?(o=LngLat.convert(t.around),n=r.locationPoint(o)):(n=r.centerPoint.add(s),o=r.pointLocation(n));var m=r.locationPoint(o);return t.animate===!1&&(t.duration=0),this.zooming=p!==a,this.rotating=h!==c,this.pitching=g!==u,t.smoothEasing&&0!==t.duration&&(t.easing=this._smoothOutEasing(t.duration)),t.noMoveStart||(this.moving=!0,this.fire(\"movestart\",i)),this.zooming&&this.fire(\"zoomstart\",i),clearTimeout(this._onEaseEnd),this._ease(function(t){this.zooming&&(r.zoom=interpolate(a,p,t)),this.rotating&&(r.bearing=interpolate(h,c,t)),this.pitching&&(r.pitch=interpolate(u,g,t)),r.setLocationAtPoint(o,m.add(n.sub(m)._mult(t))),this.fire(\"move\",i),this.zooming&&this.fire(\"zoom\",i),this.rotating&&this.fire(\"rotate\",i),this.pitching&&this.fire(\"pitch\",i)},function(){t.delayEndEvents?e._onEaseEnd=setTimeout(e._easeToEnd.bind(e,i),t.delayEndEvents):e._easeToEnd(i)},t),this},i.prototype._easeToEnd=function(t){var i=this.zooming;this.moving=!1,this.zooming=!1,this.rotating=!1,this.pitching=!1,i&&this.fire(\"zoomend\",t),this.fire(\"moveend\",t)},i.prototype.flyTo=function(t,i){function e(t){var i=(y*y-z*z+(t?-1:1)*E*E*_*_)/(2*(t?y:z)*E*_);return Math.log(Math.sqrt(i*i+1)-i)}function o(t){return(Math.exp(t)-Math.exp(-t))/2}function n(t){return(Math.exp(t)+Math.exp(-t))/2}function r(t){return o(t)/n(t)}this.stop(),t=util.extend({offset:[0,0],speed:1.2,curve:1.42,easing:util.ease},t);var s=this.transform,a=Point.convert(t.offset),h=this.getZoom(),u=this.getBearing(),p=this.getPitch(),c=\"center\"in t?LngLat.convert(t.center):this.getCenter(),g=\"zoom\"in t?+t.zoom:h,m=\"bearing\"in t?this._normalizeBearing(t.bearing,u):u,f=\"pitch\"in t?+t.pitch:p;Math.abs(s.center.lng)+Math.abs(c.lng)>180&&(s.center.lng>0&&c.lng<0?c.lng+=360:s.center.lng<0&&c.lng>0&&(c.lng-=360));var d=s.zoomScale(g-h),l=s.point,v=\"center\"in t?s.project(c).sub(a.div(d)):l,b=t.curve,z=Math.max(s.width,s.height),y=z/d,_=v.sub(l).mag();if(\"minZoom\"in t){var M=util.clamp(Math.min(t.minZoom,h,g),s.minZoom,s.maxZoom),T=z/s.zoomScale(M-h);b=Math.sqrt(T/_*2)}var E=b*b,x=e(0),L=function(t){return n(x)/n(x+b*t)},Z=function(t){return z*((n(x)*r(x+b*t)-o(x))/E)/_},P=(e(1)-x)/b;if(Math.abs(_)<1e-6){if(Math.abs(z-y)<1e-6)return this.easeTo(t,i);var j=y=0)return!1;return!0}),this._container.innerHTML=i.join(\" | \"),this._editLink=null}},AttributionControl.prototype._updateCompact=function(){var t=this._map.getCanvasContainer().offsetWidth<=640;this._container.classList[t?\"add\":\"remove\"](\"compact\")},module.exports=AttributionControl;\n},{\"../../util/dom\":199,\"../../util/util\":212}],174:[function(require,module,exports){\n\"use strict\";var DOM=require(\"../../util/dom\"),util=require(\"../../util/util\"),window=require(\"../../util/window\"),FullscreenControl=function(){this._fullscreen=!1,util.bindAll([\"_onClickFullscreen\",\"_changeIcon\"],this),\"onfullscreenchange\"in window.document?this._fullscreenchange=\"fullscreenchange\":\"onmozfullscreenchange\"in window.document?this._fullscreenchange=\"mozfullscreenchange\":\"onwebkitfullscreenchange\"in window.document?this._fullscreenchange=\"webkitfullscreenchange\":\"onmsfullscreenchange\"in window.document&&(this._fullscreenchange=\"MSFullscreenChange\")};FullscreenControl.prototype.onAdd=function(e){var n=\"mapboxgl-ctrl\",t=this._container=DOM.create(\"div\",n+\" mapboxgl-ctrl-group\"),l=this._fullscreenButton=DOM.create(\"button\",n+\"-icon \"+n+\"-fullscreen\",this._container);return l.setAttribute(\"aria-label\",\"Toggle fullscreen\"),l.type=\"button\",this._fullscreenButton.addEventListener(\"click\",this._onClickFullscreen),this._mapContainer=e.getContainer(),window.document.addEventListener(this._fullscreenchange,this._changeIcon),t},FullscreenControl.prototype.onRemove=function(){this._container.parentNode.removeChild(this._container),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},FullscreenControl.prototype._isFullscreen=function(){return this._fullscreen},FullscreenControl.prototype._changeIcon=function(e){if(e.target===this._mapContainer){this._fullscreen=!this._fullscreen;var n=\"mapboxgl-ctrl\";this._fullscreenButton.classList.toggle(n+\"-shrink\"),this._fullscreenButton.classList.toggle(n+\"-fullscreen\")}},FullscreenControl.prototype._onClickFullscreen=function(){this._isFullscreen()?window.document.exitFullscreen?window.document.exitFullscreen():window.document.mozCancelFullScreen?window.document.mozCancelFullScreen():window.document.msExitFullscreen?window.document.msExitFullscreen():window.document.webkitCancelFullScreen&&window.document.webkitCancelFullScreen():this._mapContainer.requestFullscreen?this._mapContainer.requestFullscreen():this._mapContainer.mozRequestFullScreen?this._mapContainer.mozRequestFullScreen():this._mapContainer.msRequestFullscreen?this._mapContainer.msRequestFullscreen():this._mapContainer.webkitRequestFullscreen&&this._mapContainer.webkitRequestFullscreen()},module.exports=FullscreenControl;\n},{\"../../util/dom\":199,\"../../util/util\":212,\"../../util/window\":194}],175:[function(require,module,exports){\n\"use strict\";function checkGeolocationSupport(t){void 0!==supportsGeolocation?t(supportsGeolocation):void 0!==window.navigator.permissions?window.navigator.permissions.query({name:\"geolocation\"}).then(function(o){supportsGeolocation=\"denied\"!==o.state,t(supportsGeolocation)}):(supportsGeolocation=!!window.navigator.geolocation,t(supportsGeolocation))}var Evented=require(\"../../util/evented\"),DOM=require(\"../../util/dom\"),window=require(\"../../util/window\"),util=require(\"../../util/util\"),defaultGeoPositionOptions={enableHighAccuracy:!1,timeout:6e3},className=\"mapboxgl-ctrl\",supportsGeolocation,GeolocateControl=function(t){function o(o){t.call(this),this.options=o||{},util.bindAll([\"_onSuccess\",\"_onError\",\"_finish\",\"_setupUI\"],this)}return t&&(o.__proto__=t),o.prototype=Object.create(t&&t.prototype),o.prototype.constructor=o,o.prototype.onAdd=function(t){return this._map=t,this._container=DOM.create(\"div\",className+\" \"+className+\"-group\"),checkGeolocationSupport(this._setupUI),this._container},o.prototype.onRemove=function(){this._container.parentNode.removeChild(this._container),this._map=void 0},o.prototype._onSuccess=function(t){this._map.jumpTo({center:[t.coords.longitude,t.coords.latitude],zoom:17,bearing:0,pitch:0}),this.fire(\"geolocate\",t),this._finish()},o.prototype._onError=function(t){this.fire(\"error\",t),this._finish()},o.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},o.prototype._setupUI=function(t){t!==!1&&(this._container.addEventListener(\"contextmenu\",function(t){return t.preventDefault()}),this._geolocateButton=DOM.create(\"button\",className+\"-icon \"+className+\"-geolocate\",this._container),this._geolocateButton.type=\"button\",this._geolocateButton.setAttribute(\"aria-label\",\"Geolocate\"),this.options.watchPosition&&this._geolocateButton.setAttribute(\"aria-pressed\",!1),this._geolocateButton.addEventListener(\"click\",this._onClickGeolocate.bind(this)))},o.prototype._onClickGeolocate=function(){var t=util.extend(defaultGeoPositionOptions,this.options&&this.options.positionOptions||{});this.options.watchPosition?void 0!==this._geolocationWatchID?(this._geolocateButton.classList.remove(\"watching\"),this._geolocateButton.setAttribute(\"aria-pressed\",!1),window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0):(this._geolocateButton.classList.add(\"watching\"),this._geolocateButton.setAttribute(\"aria-pressed\",!0),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,t)):(window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,t),this._timeoutId=setTimeout(this._finish,1e4))},o}(Evented);module.exports=GeolocateControl;\n},{\"../../util/dom\":199,\"../../util/evented\":200,\"../../util/util\":212,\"../../util/window\":194}],176:[function(require,module,exports){\n\"use strict\";var DOM=require(\"../../util/dom\"),util=require(\"../../util/util\"),LogoControl=function(){util.bindAll([\"_updateLogo\"],this)};LogoControl.prototype.onAdd=function(o){return this._map=o,this._container=DOM.create(\"div\",\"mapboxgl-ctrl\"),this._map.on(\"sourcedata\",this._updateLogo),this._updateLogo(),this._container},LogoControl.prototype.onRemove=function(){this._container.parentNode.removeChild(this._container),this._map.off(\"sourcedata\",this._updateLogo)},LogoControl.prototype.getDefaultPosition=function(){return\"bottom-left\"},LogoControl.prototype._updateLogo=function(o){if(o&&\"metadata\"===o.sourceDataType)if(!this._container.childNodes.length&&this._logoRequired()){var t=DOM.create(\"a\",\"mapboxgl-ctrl-logo\");t.target=\"_blank\",t.href=\"https://www.mapbox.com/\",t.setAttribute(\"aria-label\",\"Mapbox logo\"),this._container.appendChild(t),this._map.off(\"data\",this._updateLogo)}else this._container.childNodes.length&&!this._logoRequired()&&this.onRemove()},LogoControl.prototype._logoRequired=function(){if(this._map.style){var o=this._map.style.sourceCaches;for(var t in o){var e=o[t].getSource();if(e.mapbox_logo)return!0}return!1}},module.exports=LogoControl;\n},{\"../../util/dom\":199,\"../../util/util\":212}],177:[function(require,module,exports){\n\"use strict\";function copyMouseEvent(t){return new window.MouseEvent(t.type,{button:2,buttons:2,bubbles:!0,cancelable:!0,detail:t.detail,view:t.view,screenX:t.screenX,screenY:t.screenY,clientX:t.clientX,clientY:t.clientY,movementX:t.movementX,movementY:t.movementY,ctrlKey:t.ctrlKey,shiftKey:t.shiftKey,altKey:t.altKey,metaKey:t.metaKey})}var DOM=require(\"../../util/dom\"),window=require(\"../../util/window\"),util=require(\"../../util/util\"),className=\"mapboxgl-ctrl\",NavigationControl=function(){util.bindAll([\"_rotateCompassArrow\"],this)};NavigationControl.prototype._rotateCompassArrow=function(){var t=\"rotate(\"+this._map.transform.angle*(180/Math.PI)+\"deg)\";this._compassArrow.style.transform=t},NavigationControl.prototype.onAdd=function(t){return this._map=t,this._container=DOM.create(\"div\",className+\" \"+className+\"-group\",t.getContainer()),this._container.addEventListener(\"contextmenu\",this._onContextMenu.bind(this)),this._zoomInButton=this._createButton(className+\"-icon \"+className+\"-zoom-in\",\"Zoom In\",t.zoomIn.bind(t)),this._zoomOutButton=this._createButton(className+\"-icon \"+className+\"-zoom-out\",\"Zoom Out\",t.zoomOut.bind(t)),this._compass=this._createButton(className+\"-icon \"+className+\"-compass\",\"Reset North\",t.resetNorth.bind(t)),this._compassArrow=DOM.create(\"span\",className+\"-compass-arrow\",this._compass),this._compass.addEventListener(\"mousedown\",this._onCompassDown.bind(this)),this._onCompassMove=this._onCompassMove.bind(this),this._onCompassUp=this._onCompassUp.bind(this),this._map.on(\"rotate\",this._rotateCompassArrow),this._rotateCompassArrow(),this._container},NavigationControl.prototype.onRemove=function(){this._container.parentNode.removeChild(this._container),this._map.off(\"rotate\",this._rotateCompassArrow),this._map=void 0},NavigationControl.prototype._onContextMenu=function(t){t.preventDefault()},NavigationControl.prototype._onCompassDown=function(t){0===t.button&&(DOM.disableDrag(),window.document.addEventListener(\"mousemove\",this._onCompassMove),window.document.addEventListener(\"mouseup\",this._onCompassUp),this._map.getCanvasContainer().dispatchEvent(copyMouseEvent(t)),t.stopPropagation())},NavigationControl.prototype._onCompassMove=function(t){0===t.button&&(this._map.getCanvasContainer().dispatchEvent(copyMouseEvent(t)),t.stopPropagation())},NavigationControl.prototype._onCompassUp=function(t){0===t.button&&(window.document.removeEventListener(\"mousemove\",this._onCompassMove),window.document.removeEventListener(\"mouseup\",this._onCompassUp),DOM.enableDrag(),this._map.getCanvasContainer().dispatchEvent(copyMouseEvent(t)),t.stopPropagation())},NavigationControl.prototype._createButton=function(t,o,e){var n=DOM.create(\"button\",t,this._container);return n.type=\"button\",n.setAttribute(\"aria-label\",o),n.addEventListener(\"click\",function(){e()}),n},module.exports=NavigationControl;\n},{\"../../util/dom\":199,\"../../util/util\":212,\"../../util/window\":194}],178:[function(require,module,exports){\n\"use strict\";function updateScale(t,e,o){var n=o&&o.maxWidth||100,i=t._container.clientHeight/2,a=getDistance(t.unproject([0,i]),t.unproject([n,i]));if(o&&\"imperial\"===o.unit){var r=3.2808*a;if(r>5280){var l=r/5280;setScale(e,n,l,\"mi\")}else setScale(e,n,r,\"ft\")}else setScale(e,n,a,\"m\")}function setScale(t,e,o,n){var i=getRoundNum(o),a=i/o;\"m\"===n&&i>=1e3&&(i/=1e3,n=\"km\"),t.style.width=e*a+\"px\",t.innerHTML=i+n}function getDistance(t,e){var o=6371e3,n=Math.PI/180,i=t.lat*n,a=e.lat*n,r=Math.sin(i)*Math.sin(a)+Math.cos(i)*Math.cos(a)*Math.cos((e.lng-t.lng)*n),l=o*Math.acos(Math.min(r,1));return l}function getRoundNum(t){var e=Math.pow(10,(\"\"+Math.floor(t)).length-1),o=t/e;return o=o>=10?10:o>=5?5:o>=3?3:o>=2?2:1,e*o}var DOM=require(\"../../util/dom\"),util=require(\"../../util/util\"),ScaleControl=function(t){this.options=t,util.bindAll([\"_onMove\"],this)};ScaleControl.prototype.getDefaultPosition=function(){return\"bottom-left\"},ScaleControl.prototype._onMove=function(){updateScale(this._map,this._container,this.options)},ScaleControl.prototype.onAdd=function(t){return this._map=t,this._container=DOM.create(\"div\",\"mapboxgl-ctrl mapboxgl-ctrl-scale\",t.getContainer()),this._map.on(\"move\",this._onMove),this._onMove(),this._container},ScaleControl.prototype.onRemove=function(){this._container.parentNode.removeChild(this._container),this._map.off(\"move\",this._onMove),this._map=void 0},module.exports=ScaleControl;\n},{\"../../util/dom\":199,\"../../util/util\":212}],179:[function(require,module,exports){\n\"use strict\";var DOM=require(\"../../util/dom\"),LngLatBounds=require(\"../../geo/lng_lat_bounds\"),util=require(\"../../util/util\"),window=require(\"../../util/window\"),BoxZoomHandler=function(o){this._map=o,this._el=o.getCanvasContainer(),this._container=o.getContainer(),util.bindAll([\"_onMouseDown\",\"_onMouseMove\",\"_onMouseUp\",\"_onKeyDown\"],this)};BoxZoomHandler.prototype.isEnabled=function(){return!!this._enabled},BoxZoomHandler.prototype.isActive=function(){return!!this._active},BoxZoomHandler.prototype.enable=function(){this.isEnabled()||(this._el.addEventListener(\"mousedown\",this._onMouseDown,!1),this._enabled=!0)},BoxZoomHandler.prototype.disable=function(){this.isEnabled()&&(this._el.removeEventListener(\"mousedown\",this._onMouseDown),this._enabled=!1)},BoxZoomHandler.prototype._onMouseDown=function(o){o.shiftKey&&0===o.button&&(window.document.addEventListener(\"mousemove\",this._onMouseMove,!1),window.document.addEventListener(\"keydown\",this._onKeyDown,!1),window.document.addEventListener(\"mouseup\",this._onMouseUp,!1),DOM.disableDrag(),this._startPos=DOM.mousePos(this._el,o),this._active=!0)},BoxZoomHandler.prototype._onMouseMove=function(o){var e=this._startPos,t=DOM.mousePos(this._el,o);this._box||(this._box=DOM.create(\"div\",\"mapboxgl-boxzoom\",this._container),this._container.classList.add(\"mapboxgl-crosshair\"),this._fireEvent(\"boxzoomstart\",o));var n=Math.min(e.x,t.x),i=Math.max(e.x,t.x),s=Math.min(e.y,t.y),r=Math.max(e.y,t.y);DOM.setTransform(this._box,\"translate(\"+n+\"px,\"+s+\"px)\"),this._box.style.width=i-n+\"px\",this._box.style.height=r-s+\"px\"},BoxZoomHandler.prototype._onMouseUp=function(o){if(0===o.button){var e=this._startPos,t=DOM.mousePos(this._el,o),n=(new LngLatBounds).extend(this._map.unproject(e)).extend(this._map.unproject(t));this._finish(),e.x===t.x&&e.y===t.y?this._fireEvent(\"boxzoomcancel\",o):this._map.fitBounds(n,{linear:!0}).fire(\"boxzoomend\",{originalEvent:o,boxZoomBounds:n})}},BoxZoomHandler.prototype._onKeyDown=function(o){27===o.keyCode&&(this._finish(),this._fireEvent(\"boxzoomcancel\",o))},BoxZoomHandler.prototype._finish=function(){this._active=!1,window.document.removeEventListener(\"mousemove\",this._onMouseMove,!1),window.document.removeEventListener(\"keydown\",this._onKeyDown,!1),window.document.removeEventListener(\"mouseup\",this._onMouseUp,!1),this._container.classList.remove(\"mapboxgl-crosshair\"),this._box&&(this._box.parentNode.removeChild(this._box),this._box=null),DOM.enableDrag()},BoxZoomHandler.prototype._fireEvent=function(o,e){return this._map.fire(o,{originalEvent:e})},module.exports=BoxZoomHandler;\n},{\"../../geo/lng_lat_bounds\":63,\"../../util/dom\":199,\"../../util/util\":212,\"../../util/window\":194}],180:[function(require,module,exports){\n\"use strict\";var DoubleClickZoomHandler=function(o){this._map=o,this._onDblClick=this._onDblClick.bind(this)};DoubleClickZoomHandler.prototype.isEnabled=function(){return!!this._enabled},DoubleClickZoomHandler.prototype.enable=function(){this.isEnabled()||(this._map.on(\"dblclick\",this._onDblClick),this._enabled=!0)},DoubleClickZoomHandler.prototype.disable=function(){this.isEnabled()&&(this._map.off(\"dblclick\",this._onDblClick),this._enabled=!1)},DoubleClickZoomHandler.prototype._onDblClick=function(o){this._map.zoomTo(this._map.getZoom()+(o.originalEvent.shiftKey?-1:1),{around:o.lngLat},o)},module.exports=DoubleClickZoomHandler;\n},{}],181:[function(require,module,exports){\n\"use strict\";var DOM=require(\"../../util/dom\"),util=require(\"../../util/util\"),window=require(\"../../util/window\"),inertiaLinearity=.3,inertiaEasing=util.bezier(0,0,inertiaLinearity,1),inertiaMaxSpeed=1400,inertiaDeceleration=2500,DragPanHandler=function(t){this._map=t,this._el=t.getCanvasContainer(),util.bindAll([\"_onDown\",\"_onMove\",\"_onUp\",\"_onTouchEnd\",\"_onMouseUp\"],this)};DragPanHandler.prototype.isEnabled=function(){return!!this._enabled},DragPanHandler.prototype.isActive=function(){return!!this._active},DragPanHandler.prototype.enable=function(){this.isEnabled()||(this._el.addEventListener(\"mousedown\",this._onDown),this._el.addEventListener(\"touchstart\",this._onDown),this._enabled=!0)},DragPanHandler.prototype.disable=function(){this.isEnabled()&&(this._el.removeEventListener(\"mousedown\",this._onDown),this._el.removeEventListener(\"touchstart\",this._onDown),this._enabled=!1)},DragPanHandler.prototype._onDown=function(t){this._ignoreEvent(t)||this.isActive()||(t.touches?(window.document.addEventListener(\"touchmove\",this._onMove),window.document.addEventListener(\"touchend\",this._onTouchEnd)):(window.document.addEventListener(\"mousemove\",this._onMove),window.document.addEventListener(\"mouseup\",this._onMouseUp)),window.addEventListener(\"blur\",this._onMouseUp),this._active=!1,this._startPos=this._pos=DOM.mousePos(this._el,t),this._inertia=[[Date.now(),this._pos]])},DragPanHandler.prototype._onMove=function(t){if(!this._ignoreEvent(t)){this.isActive()||(this._active=!0,this._map.moving=!0,this._fireEvent(\"dragstart\",t),this._fireEvent(\"movestart\",t));var e=DOM.mousePos(this._el,t),n=this._map;n.stop(),this._drainInertiaBuffer(),this._inertia.push([Date.now(),e]),n.transform.setLocationAtPoint(n.transform.pointLocation(this._pos),e),this._fireEvent(\"drag\",t),this._fireEvent(\"move\",t),this._pos=e,t.preventDefault()}},DragPanHandler.prototype._onUp=function(t){var e=this;if(this.isActive()){this._active=!1,this._fireEvent(\"dragend\",t),this._drainInertiaBuffer();var n=function(){e._map.moving=!1,e._fireEvent(\"moveend\",t)},i=this._inertia;if(i.length<2)return void n();var o=i[i.length-1],r=i[0],a=o[1].sub(r[1]),s=(o[0]-r[0])/1e3;if(0===s||o[1].equals(r[1]))return void n();var u=a.mult(inertiaLinearity/s),d=u.mag();d>inertiaMaxSpeed&&(d=inertiaMaxSpeed,u._unit()._mult(d));var h=d/(inertiaDeceleration*inertiaLinearity),v=u.mult(-h/2);this._map.panBy(v,{duration:1e3*h,easing:inertiaEasing,noMoveStart:!0},{originalEvent:t})}},DragPanHandler.prototype._onMouseUp=function(t){this._ignoreEvent(t)||(this._onUp(t),window.document.removeEventListener(\"mousemove\",this._onMove),window.document.removeEventListener(\"mouseup\",this._onMouseUp),window.removeEventListener(\"blur\",this._onMouseUp))},DragPanHandler.prototype._onTouchEnd=function(t){this._ignoreEvent(t)||(this._onUp(t),window.document.removeEventListener(\"touchmove\",this._onMove),window.document.removeEventListener(\"touchend\",this._onTouchEnd))},DragPanHandler.prototype._fireEvent=function(t,e){return this._map.fire(t,{originalEvent:e})},DragPanHandler.prototype._ignoreEvent=function(t){var e=this._map;if(e.boxZoom&&e.boxZoom.isActive())return!0;if(e.dragRotate&&e.dragRotate.isActive())return!0;if(t.touches)return t.touches.length>1;if(t.ctrlKey)return!0;var n=1,i=0;return\"mousemove\"===t.type?t.buttons&0===n:t.button&&t.button!==i},DragPanHandler.prototype._drainInertiaBuffer=function(){for(var t=this._inertia,e=Date.now(),n=160;t.length>0&&e-t[0][0]>n;)t.shift()},module.exports=DragPanHandler;\n},{\"../../util/dom\":199,\"../../util/util\":212,\"../../util/window\":194}],182:[function(require,module,exports){\n\"use strict\";var DOM=require(\"../../util/dom\"),util=require(\"../../util/util\"),window=require(\"../../util/window\"),inertiaLinearity=.25,inertiaEasing=util.bezier(0,0,inertiaLinearity,1),inertiaMaxSpeed=180,inertiaDeceleration=720,DragRotateHandler=function(t,e){this._map=t,this._el=t.getCanvasContainer(),this._bearingSnap=e.bearingSnap,this._pitchWithRotate=e.pitchWithRotate!==!1,util.bindAll([\"_onDown\",\"_onMove\",\"_onUp\"],this)};DragRotateHandler.prototype.isEnabled=function(){return!!this._enabled},DragRotateHandler.prototype.isActive=function(){return!!this._active},DragRotateHandler.prototype.enable=function(){this.isEnabled()||(this._el.addEventListener(\"mousedown\",this._onDown),this._enabled=!0)},DragRotateHandler.prototype.disable=function(){this.isEnabled()&&(this._el.removeEventListener(\"mousedown\",this._onDown),this._enabled=!1)},DragRotateHandler.prototype._onDown=function(t){this._ignoreEvent(t)||this.isActive()||(window.document.addEventListener(\"mousemove\",this._onMove),window.document.addEventListener(\"mouseup\",this._onUp),window.addEventListener(\"blur\",this._onUp),this._active=!1,this._inertia=[[Date.now(),this._map.getBearing()]],this._startPos=this._pos=DOM.mousePos(this._el,t),this._center=this._map.transform.centerPoint,t.preventDefault())},DragRotateHandler.prototype._onMove=function(t){if(!this._ignoreEvent(t)){this.isActive()||(this._active=!0,this._map.moving=!0,this._fireEvent(\"rotatestart\",t),this._fireEvent(\"movestart\",t));var e=this._map;e.stop();var i=this._pos,n=DOM.mousePos(this._el,t),r=.8*(i.x-n.x),a=(i.y-n.y)*-.5,o=e.getBearing()-r,s=e.getPitch()-a,h=this._inertia,v=h[h.length-1];this._drainInertiaBuffer(),h.push([Date.now(),e._normalizeBearing(o,v[1])]),e.transform.bearing=o,this._pitchWithRotate&&(e.transform.pitch=s),this._fireEvent(\"rotate\",t),this._fireEvent(\"move\",t),this._pos=n}},DragRotateHandler.prototype._onUp=function(t){var e=this;if(!this._ignoreEvent(t)&&(window.document.removeEventListener(\"mousemove\",this._onMove),window.document.removeEventListener(\"mouseup\",this._onUp),window.removeEventListener(\"blur\",this._onUp),this.isActive())){this._active=!1,this._fireEvent(\"rotateend\",t),this._drainInertiaBuffer();var i=this._map,n=i.getBearing(),r=this._inertia,a=function(){Math.abs(n)inertiaMaxSpeed&&(p=inertiaMaxSpeed);var l=p/(inertiaDeceleration*inertiaLinearity),g=u*p*(l/2);v+=g,Math.abs(i._normalizeBearing(v,0))1;var i=t.ctrlKey?1:2,n=t.ctrlKey?0:2,r=t.button;return\"undefined\"!=typeof InstallTrigger&&2===t.button&&t.ctrlKey&&window.navigator.platform.toUpperCase().indexOf(\"MAC\")>=0&&(r=0),\"mousemove\"===t.type?t.buttons&0===i:!this.isActive()&&r!==n},DragRotateHandler.prototype._drainInertiaBuffer=function(){for(var t=this._inertia,e=Date.now(),i=160;t.length>0&&e-t[0][0]>i;)t.shift()},module.exports=DragRotateHandler;\n},{\"../../util/dom\":199,\"../../util/util\":212,\"../../util/window\":194}],183:[function(require,module,exports){\n\"use strict\";function easeOut(e){return e*(2-e)}var panStep=100,bearingStep=15,pitchStep=10,KeyboardHandler=function(e){this._map=e,this._el=e.getCanvasContainer(),this._onKeyDown=this._onKeyDown.bind(this)};KeyboardHandler.prototype.isEnabled=function(){return!!this._enabled},KeyboardHandler.prototype.enable=function(){this.isEnabled()||(this._el.addEventListener(\"keydown\",this._onKeyDown,!1),this._enabled=!0)},KeyboardHandler.prototype.disable=function(){this.isEnabled()&&(this._el.removeEventListener(\"keydown\",this._onKeyDown),this._enabled=!1)},KeyboardHandler.prototype._onKeyDown=function(e){if(!(e.altKey||e.ctrlKey||e.metaKey)){var t=0,n=0,a=0,i=0,r=0;switch(e.keyCode){case 61:case 107:case 171:case 187:t=1;break;case 189:case 109:case 173:t=-1;break;case 37:e.shiftKey?n=-1:(e.preventDefault(),i=-1);break;case 39:e.shiftKey?n=1:(e.preventDefault(),i=1);break;case 38:e.shiftKey?a=1:(e.preventDefault(),r=-1);break;case 40:e.shiftKey?a=-1:(r=1,e.preventDefault())}var s=this._map,o=s.getZoom(),d={duration:300,delayEndEvents:500,easing:easeOut,zoom:t?Math.round(o)+t*(e.shiftKey?2:1):o,bearing:s.getBearing()+n*bearingStep,pitch:s.getPitch()+a*pitchStep,offset:[-i*panStep,-r*panStep],center:s.getCenter()};s.easeTo(d,{originalEvent:e})}},module.exports=KeyboardHandler;\n},{}],184:[function(require,module,exports){\n\"use strict\";var DOM=require(\"../../util/dom\"),util=require(\"../../util/util\"),browser=require(\"../../util/browser\"),window=require(\"../../util/window\"),ua=window.navigator.userAgent.toLowerCase(),firefox=ua.indexOf(\"firefox\")!==-1,safari=ua.indexOf(\"safari\")!==-1&&ua.indexOf(\"chrom\")===-1,ScrollZoomHandler=function(e){this._map=e,this._el=e.getCanvasContainer(),util.bindAll([\"_onWheel\",\"_onTimeout\"],this)};ScrollZoomHandler.prototype.isEnabled=function(){return!!this._enabled},ScrollZoomHandler.prototype.enable=function(e){this.isEnabled()||(this._el.addEventListener(\"wheel\",this._onWheel,!1),this._el.addEventListener(\"mousewheel\",this._onWheel,!1),this._enabled=!0,this._aroundCenter=e&&\"center\"===e.around)},ScrollZoomHandler.prototype.disable=function(){this.isEnabled()&&(this._el.removeEventListener(\"wheel\",this._onWheel),this._el.removeEventListener(\"mousewheel\",this._onWheel),this._enabled=!1)},ScrollZoomHandler.prototype._onWheel=function(e){var t;\"wheel\"===e.type?(t=e.deltaY,firefox&&e.deltaMode===window.WheelEvent.DOM_DELTA_PIXEL&&(t/=browser.devicePixelRatio),e.deltaMode===window.WheelEvent.DOM_DELTA_LINE&&(t*=40)):\"mousewheel\"===e.type&&(t=-e.wheelDeltaY,safari&&(t/=3));var o=browser.now(),i=o-(this._time||0);this._pos=DOM.mousePos(this._el,e),this._time=o,0!==t&&t%4.000244140625===0?this._type=\"wheel\":0!==t&&Math.abs(t)<4?this._type=\"trackpad\":i>400?(this._type=null,this._lastValue=t,this._timeout=setTimeout(this._onTimeout,40)):this._type||(this._type=Math.abs(i*t)<200?\"trackpad\":\"wheel\",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,t+=this._lastValue)),e.shiftKey&&t&&(t/=4),this._type&&this._zoom(-t,e),e.preventDefault()},ScrollZoomHandler.prototype._onTimeout=function(){this._type=\"wheel\",this._zoom(-this._lastValue)},ScrollZoomHandler.prototype._zoom=function(e,t){if(0!==e){var o=this._map,i=2/(1+Math.exp(-Math.abs(e/100)));e<0&&0!==i&&(i=1/i);var l=o.ease?o.ease.to:o.transform.scale,s=o.transform.scaleZoom(l*i);o.zoomTo(s,{duration:\"wheel\"===this._type?200:0,around:this._aroundCenter?o.getCenter():o.unproject(this._pos),delayEndEvents:200,smoothEasing:!0},{originalEvent:t})}},module.exports=ScrollZoomHandler;\n},{\"../../util/browser\":192,\"../../util/dom\":199,\"../../util/util\":212,\"../../util/window\":194}],185:[function(require,module,exports){\n\"use strict\";var DOM=require(\"../../util/dom\"),util=require(\"../../util/util\"),window=require(\"../../util/window\"),inertiaLinearity=.15,inertiaEasing=util.bezier(0,0,inertiaLinearity,1),inertiaDeceleration=12,inertiaMaxSpeed=2.5,significantScaleThreshold=.15,significantRotateThreshold=4,TouchZoomRotateHandler=function(t){this._map=t,this._el=t.getCanvasContainer(),util.bindAll([\"_onStart\",\"_onMove\",\"_onEnd\"],this)};TouchZoomRotateHandler.prototype.isEnabled=function(){return!!this._enabled},TouchZoomRotateHandler.prototype.enable=function(t){this.isEnabled()||(this._el.addEventListener(\"touchstart\",this._onStart,!1),this._enabled=!0,this._aroundCenter=t&&\"center\"===t.around)},TouchZoomRotateHandler.prototype.disable=function(){this.isEnabled()&&(this._el.removeEventListener(\"touchstart\",this._onStart),this._enabled=!1)},TouchZoomRotateHandler.prototype.disableRotation=function(){this._rotationDisabled=!0},TouchZoomRotateHandler.prototype.enableRotation=function(){this._rotationDisabled=!1},TouchZoomRotateHandler.prototype._onStart=function(t){if(2===t.touches.length){var e=DOM.mousePos(this._el,t.touches[0]),o=DOM.mousePos(this._el,t.touches[1]);this._startVec=e.sub(o),this._startScale=this._map.transform.scale,this._startBearing=this._map.transform.bearing,this._gestureIntent=void 0,this._inertia=[],window.document.addEventListener(\"touchmove\",this._onMove,!1),window.document.addEventListener(\"touchend\",this._onEnd,!1)}},TouchZoomRotateHandler.prototype._onMove=function(t){if(2===t.touches.length){var e=DOM.mousePos(this._el,t.touches[0]),o=DOM.mousePos(this._el,t.touches[1]),i=e.add(o).div(2),n=e.sub(o),a=n.mag()/this._startVec.mag(),r=this._rotationDisabled?0:180*n.angleWith(this._startVec)/Math.PI,s=this._map;if(this._gestureIntent){var h={duration:0,around:s.unproject(i)};\"rotate\"===this._gestureIntent&&(h.bearing=this._startBearing+r),\"zoom\"!==this._gestureIntent&&\"rotate\"!==this._gestureIntent||(h.zoom=s.transform.scaleZoom(this._startScale*a)),s.stop(),this._drainInertiaBuffer(),this._inertia.push([Date.now(),a,i]),s.easeTo(h,{originalEvent:t})}else{var u=Math.abs(1-a)>significantScaleThreshold,d=Math.abs(r)>significantRotateThreshold;d?this._gestureIntent=\"rotate\":u&&(this._gestureIntent=\"zoom\"),this._gestureIntent&&(this._startVec=n,this._startScale=s.transform.scale,this._startBearing=s.transform.bearing)}t.preventDefault()}},TouchZoomRotateHandler.prototype._onEnd=function(t){window.document.removeEventListener(\"touchmove\",this._onMove),window.document.removeEventListener(\"touchend\",this._onEnd),this._drainInertiaBuffer();var e=this._inertia,o=this._map;if(e.length<2)return void o.snapToNorth({},{originalEvent:t});var i=e[e.length-1],n=e[0],a=o.transform.scaleZoom(this._startScale*i[1]),r=o.transform.scaleZoom(this._startScale*n[1]),s=a-r,h=(i[0]-n[0])/1e3,u=i[2];if(0===h||a===r)return void o.snapToNorth({},{originalEvent:t});var d=s*inertiaLinearity/h;Math.abs(d)>inertiaMaxSpeed&&(d=d>0?inertiaMaxSpeed:-inertiaMaxSpeed);var l=1e3*Math.abs(d/(inertiaDeceleration*inertiaLinearity)),c=a+d*l/2e3;c<0&&(c=0),o.easeTo({zoom:c,duration:l,easing:inertiaEasing,around:this._aroundCenter?o.getCenter():o.unproject(u)},{originalEvent:t})},TouchZoomRotateHandler.prototype._drainInertiaBuffer=function(){for(var t=this._inertia,e=Date.now(),o=160;t.length>2&&e-t[0][0]>o;)t.shift()},module.exports=TouchZoomRotateHandler;\n},{\"../../util/dom\":199,\"../../util/util\":212,\"../../util/window\":194}],186:[function(require,module,exports){\n\"use strict\";var util=require(\"../util/util\"),window=require(\"../util/window\"),Hash=function(){util.bindAll([\"_onHashChange\",\"_updateHash\"],this)};Hash.prototype.addTo=function(t){return this._map=t,window.addEventListener(\"hashchange\",this._onHashChange,!1),this._map.on(\"moveend\",this._updateHash),this},Hash.prototype.remove=function(){return window.removeEventListener(\"hashchange\",this._onHashChange,!1),this._map.off(\"moveend\",this._updateHash),delete this._map,this},Hash.prototype._onHashChange=function(){var t=window.location.hash.replace(\"#\",\"\").split(\"/\");return t.length>=3&&(this._map.jumpTo({center:[+t[2],+t[1]],zoom:+t[0],bearing:+(t[3]||0),pitch:+(t[4]||0)}),!0)},Hash.prototype._updateHash=function(){var t=this._map.getCenter(),e=this._map.getZoom(),a=this._map.getBearing(),h=this._map.getPitch(),i=Math.max(0,Math.ceil(Math.log(e)/Math.LN2)),n=\"#\"+Math.round(100*e)/100+\"/\"+t.lat.toFixed(i)+\"/\"+t.lng.toFixed(i);(a||h)&&(n+=\"/\"+Math.round(10*a)/10),h&&(n+=\"/\"+Math.round(h)),window.history.replaceState(\"\",\"\",n)},module.exports=Hash;\n},{\"../util/util\":212,\"../util/window\":194}],187:[function(require,module,exports){\n\"use strict\";function removeNode(t){t.parentNode&&t.parentNode.removeChild(t)}var util=require(\"../util/util\"),browser=require(\"../util/browser\"),window=require(\"../util/window\"),DOM=require(\"../util/dom\"),Style=require(\"../style/style\"),AnimationLoop=require(\"../style/animation_loop\"),Painter=require(\"../render/painter\"),Transform=require(\"../geo/transform\"),Hash=require(\"./hash\"),bindHandlers=require(\"./bind_handlers\"),Camera=require(\"./camera\"),LngLat=require(\"../geo/lng_lat\"),LngLatBounds=require(\"../geo/lng_lat_bounds\"),Point=require(\"point-geometry\"),AttributionControl=require(\"./control/attribution_control\"),LogoControl=require(\"./control/logo_control\"),isSupported=require(\"mapbox-gl-supported\"),defaultMinZoom=0,defaultMaxZoom=22,defaultOptions={center:[0,0],zoom:0,bearing:0,pitch:0,minZoom:defaultMinZoom,maxZoom:defaultMaxZoom,interactive:!0,scrollZoom:!0,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,bearingSnap:7,hash:!1,attributionControl:!0,failIfMajorPerformanceCaveat:!1,preserveDrawingBuffer:!1,trackResize:!0,renderWorldCopies:!0,refreshExpiredTiles:!0},Map=function(t){function e(e){var o=this;if(e=util.extend({},defaultOptions,e),null!=e.minZoom&&null!=e.maxZoom&&e.minZoom>e.maxZoom)throw new Error(\"maxZoom must be greater than minZoom\");var i=new Transform(e.minZoom,e.maxZoom,e.renderWorldCopies);if(t.call(this,i,e),this._interactive=e.interactive,this._failIfMajorPerformanceCaveat=e.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=e.preserveDrawingBuffer,this._trackResize=e.trackResize,this._bearingSnap=e.bearingSnap,this._refreshExpiredTiles=e.refreshExpiredTiles,\"string\"==typeof e.container){if(this._container=window.document.getElementById(e.container),!this._container)throw new Error(\"Container '\"+e.container+\"' not found.\")}else this._container=e.container;this.animationLoop=new AnimationLoop,e.maxBounds&&this.setMaxBounds(e.maxBounds),util.bindAll([\"_onWindowOnline\",\"_onWindowResize\",\"_contextLost\",\"_contextRestored\",\"_update\",\"_render\",\"_onData\",\"_onDataLoading\"],this),this._setupContainer(),this._setupPainter(),this.on(\"move\",this._update.bind(this,!1)),this.on(\"zoom\",this._update.bind(this,!0)),this.on(\"moveend\",function(){o.animationLoop.set(300),o._rerender()}),\"undefined\"!=typeof window&&(window.addEventListener(\"online\",this._onWindowOnline,!1),window.addEventListener(\"resize\",this._onWindowResize,!1)),bindHandlers(this,e),this._hash=e.hash&&(new Hash).addTo(this),this._hash&&this._hash._onHashChange()||this.jumpTo({center:e.center,zoom:e.zoom,bearing:e.bearing,pitch:e.pitch}),this._classes=[],this.resize(),e.classes&&this.setClasses(e.classes),e.style&&this.setStyle(e.style),e.attributionControl&&this.addControl(new AttributionControl),this.addControl(new LogoControl,e.logoPosition),this.on(\"style.load\",function(){this.transform.unmodified&&this.jumpTo(this.style.stylesheet),this.style.update(this._classes,{transition:!1})}),this.on(\"data\",this._onData),this.on(\"dataloading\",this._onDataLoading)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var o={showTileBoundaries:{},showCollisionBoxes:{},showOverdrawInspector:{},repaint:{},vertices:{}};return e.prototype.addControl=function(t,e){void 0===e&&t.getDefaultPosition&&(e=t.getDefaultPosition()),void 0===e&&(e=\"top-right\");var o=t.onAdd(this),i=this._controlPositions[e];return e.indexOf(\"bottom\")!==-1?i.insertBefore(o,i.firstChild):i.appendChild(o),this},e.prototype.removeControl=function(t){return t.onRemove(this),this},e.prototype.addClass=function(t,e){return util.warnOnce(\"Style classes are deprecated and will be removed in an upcoming release of Mapbox GL JS.\"),this._classes.indexOf(t)>=0||\"\"===t?this:(this._classes.push(t),this._classOptions=e,this.style&&this.style.updateClasses(),this._update(!0))},e.prototype.removeClass=function(t,e){util.warnOnce(\"Style classes are deprecated and will be removed in an upcoming release of Mapbox GL JS.\");var o=this._classes.indexOf(t);return o<0||\"\"===t?this:(this._classes.splice(o,1),this._classOptions=e,this.style&&this.style.updateClasses(),this._update(!0))},e.prototype.setClasses=function(t,e){util.warnOnce(\"Style classes are deprecated and will be removed in an upcoming release of Mapbox GL JS.\");for(var o={},i=0;i=0},e.prototype.getClasses=function(){return util.warnOnce(\"Style classes are deprecated and will be removed in an upcoming release of Mapbox GL JS.\"),this._classes},e.prototype.resize=function(){var t=this._containerDimensions(),e=t[0],o=t[1];return this._resizeCanvas(e,o),this.transform.resize(e,o),this.painter.resize(e,o),this.fire(\"movestart\").fire(\"move\").fire(\"resize\").fire(\"moveend\")},e.prototype.getBounds=function(){var t=new LngLatBounds(this.transform.pointLocation(new Point(0,this.transform.height)),this.transform.pointLocation(new Point(this.transform.width,0)));return(this.transform.angle||this.transform.pitch)&&(t.extend(this.transform.pointLocation(new Point(this.transform.size.x,0))),t.extend(this.transform.pointLocation(new Point(0,this.transform.size.y)))),t},e.prototype.setMaxBounds=function(t){if(t){var e=LngLatBounds.convert(t);this.transform.lngRange=[e.getWest(),e.getEast()],this.transform.latRange=[e.getSouth(),e.getNorth()],this.transform._constrain(),this._update()}else null!==t&&void 0!==t||(this.transform.lngRange=[],this.transform.latRange=[],this._update());return this},e.prototype.setMinZoom=function(t){if(t=null===t||void 0===t?defaultMinZoom:t,t>=defaultMinZoom&&t<=this.transform.maxZoom)return this.transform.minZoom=t,this._update(),this.getZoom()=this.transform.minZoom)return this.transform.maxZoom=t,this._update(),this.getZoom()>t&&this.setZoom(t),this;throw new Error(\"maxZoom must be greater than the current minZoom\")},e.prototype.getMaxZoom=function(){return this.transform.maxZoom},e.prototype.project=function(t){return this.transform.locationPoint(LngLat.convert(t))},e.prototype.unproject=function(t){return this.transform.pointLocation(Point.convert(t))},e.prototype.queryRenderedFeatures=function(){function t(t){return t instanceof Point||Array.isArray(t)}var e,o={};return 2===arguments.length?(e=arguments[0],o=arguments[1]):1===arguments.length&&t(arguments[0])?e=arguments[0]:1===arguments.length&&(o=arguments[0]),this.style.queryRenderedFeatures(this._makeQueryGeometry(e),o,this.transform.zoom,this.transform.angle)},e.prototype._makeQueryGeometry=function(t){var e=this;void 0===t&&(t=[Point.convert([0,0]),Point.convert([this.transform.width,this.transform.height])]);var o,i=t instanceof Point||\"number\"==typeof t[0];if(i){var r=Point.convert(t);o=[r]}else{var s=[Point.convert(t[0]),Point.convert(t[1])];o=[s[0],new Point(s[1].x,s[0].y),s[1],new Point(s[0].x,s[1].y),s[0]]}return o=o.map(function(t){return e.transform.pointCoordinate(t)})},e.prototype.querySourceFeatures=function(t,e){return this.style.querySourceFeatures(t,e)},e.prototype.setStyle=function(t,e){var o=(!e||e.diff!==!1)&&this.style&&t&&!(t instanceof Style)&&\"string\"!=typeof t;if(o)try{return this.style.setState(t)&&this._update(!0),this}catch(t){util.warnOnce(\"Unable to perform style diff: \"+(t.message||t.error||t)+\". Rebuilding the style from scratch.\")}return this.style&&(this.style.setEventedParent(null),this.style._remove(),this.off(\"rotate\",this.style._redoPlacement),this.off(\"pitch\",this.style._redoPlacement)),t?(t instanceof Style?this.style=t:this.style=new Style(t,this),this.style.setEventedParent(this,{style:this.style}),this.on(\"rotate\",this.style._redoPlacement),this.on(\"pitch\",this.style._redoPlacement),this):(this.style=null,this)},e.prototype.getStyle=function(){if(this.style)return this.style.serialize()},e.prototype.addSource=function(t,e){return this.style.addSource(t,e),this._update(!0),this},e.prototype.isSourceLoaded=function(t){var e=this.style&&this.style.sourceCaches[t];return void 0===e?void this.fire(\"error\",{error:new Error(\"There is no source with ID '\"+t+\"'\")}):e.loaded()},e.prototype.addSourceType=function(t,e,o){return this.style.addSourceType(t,e,o)},e.prototype.removeSource=function(t){return this.style.removeSource(t),this._update(!0),this},e.prototype.getSource=function(t){return this.style.getSource(t)},e.prototype.addImage=function(t,e,o){this.style.spriteAtlas.addImage(t,e,o)},e.prototype.removeImage=function(t){this.style.spriteAtlas.removeImage(t)},e.prototype.addLayer=function(t,e){return this.style.addLayer(t,e),this._update(!0),this},e.prototype.moveLayer=function(t,e){return this.style.moveLayer(t,e),this._update(!0),this},e.prototype.removeLayer=function(t){return this.style.removeLayer(t),this._update(!0),this},e.prototype.getLayer=function(t){return this.style.getLayer(t)},e.prototype.setFilter=function(t,e){return this.style.setFilter(t,e),this._update(!0),this},e.prototype.setLayerZoomRange=function(t,e,o){return this.style.setLayerZoomRange(t,e,o),this._update(!0),this},e.prototype.getFilter=function(t){return this.style.getFilter(t)},e.prototype.setPaintProperty=function(t,e,o,i){return this.style.setPaintProperty(t,e,o,i),this._update(!0),this},e.prototype.getPaintProperty=function(t,e,o){return this.style.getPaintProperty(t,e,o)},e.prototype.setLayoutProperty=function(t,e,o){return this.style.setLayoutProperty(t,e,o),this._update(!0),this},e.prototype.getLayoutProperty=function(t,e){return this.style.getLayoutProperty(t,e)},e.prototype.setLight=function(t){return this.style.setLight(t),this._update(!0),this},e.prototype.getLight=function(){return this.style.getLight()},e.prototype.getContainer=function(){return this._container},e.prototype.getCanvasContainer=function(){return this._canvasContainer},e.prototype.getCanvas=function(){return this._canvas},e.prototype._containerDimensions=function(){var t=0,e=0;return this._container&&(t=this._container.offsetWidth||400,e=this._container.offsetHeight||300),[t,e]},e.prototype._setupContainer=function(){var t=this._container;t.classList.add(\"mapboxgl-map\");var e=this._canvasContainer=DOM.create(\"div\",\"mapboxgl-canvas-container\",t);this._interactive&&e.classList.add(\"mapboxgl-interactive\"),this._canvas=DOM.create(\"canvas\",\"mapboxgl-canvas\",e),this._canvas.style.position=\"absolute\",this._canvas.addEventListener(\"webglcontextlost\",this._contextLost,!1),this._canvas.addEventListener(\"webglcontextrestored\",this._contextRestored,!1),this._canvas.setAttribute(\"tabindex\",0),this._canvas.setAttribute(\"aria-label\",\"Map\");var o=this._containerDimensions();this._resizeCanvas(o[0],o[1]);var i=this._controlContainer=DOM.create(\"div\",\"mapboxgl-control-container\",t),r=this._controlPositions={};[\"top-left\",\"top-right\",\"bottom-left\",\"bottom-right\"].forEach(function(t){r[t]=DOM.create(\"div\",\"mapboxgl-ctrl-\"+t,i)})},e.prototype._resizeCanvas=function(t,e){var o=window.devicePixelRatio||1;this._canvas.width=o*t,this._canvas.height=o*e,this._canvas.style.width=t+\"px\",this._canvas.style.height=e+\"px\"},e.prototype._setupPainter=function(){var t=util.extend({failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer},isSupported.webGLContextAttributes),e=this._canvas.getContext(\"webgl\",t)||this._canvas.getContext(\"experimental-webgl\",t);return e?void(this.painter=new Painter(e,this.transform)):void this.fire(\"error\",{error:new Error(\"Failed to initialize WebGL\")})},e.prototype._contextLost=function(t){t.preventDefault(),this._frameId&&browser.cancelFrame(this._frameId),this.fire(\"webglcontextlost\",{originalEvent:t})},e.prototype._contextRestored=function(t){this._setupPainter(),this.resize(),this._update(),this.fire(\"webglcontextrestored\",{originalEvent:t})},e.prototype.loaded=function(){return!this._styleDirty&&!this._sourcesDirty&&!(!this.style||!this.style.loaded())},e.prototype._update=function(t){return this.style?(this._styleDirty=this._styleDirty||t,this._sourcesDirty=!0,this._rerender(),this):this},e.prototype._render=function(){return this.style&&this._styleDirty&&(this._styleDirty=!1,this.style.update(this._classes,this._classOptions),this._classOptions=null,this.style._recalculate(this.transform.zoom)),this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.rotating,zooming:this.zooming}),this.fire(\"render\"),this.loaded()&&!this._loaded&&(this._loaded=!0,this.fire(\"load\")),this._frameId=null,this.animationLoop.stopped()||(this._styleDirty=!0),(this._sourcesDirty||this._repaint||this._styleDirty)&&this._rerender(),this},e.prototype.remove=function(){this._hash&&this._hash.remove(),browser.cancelFrame(this._frameId),this.setStyle(null),\"undefined\"!=typeof window&&(window.removeEventListener(\"resize\",this._onWindowResize,!1),window.removeEventListener(\"online\",this._onWindowOnline,!1));var t=this.painter.gl.getExtension(\"WEBGL_lose_context\");t&&t.loseContext(),removeNode(this._canvasContainer),removeNode(this._controlContainer),this._container.classList.remove(\"mapboxgl-map\"),this.fire(\"remove\")},e.prototype._rerender=function(){this.style&&!this._frameId&&(this._frameId=browser.frame(this._render))},e.prototype._onWindowOnline=function(){this._update()},e.prototype._onWindowResize=function(){this._trackResize&&this.stop().resize()._update()},o.showTileBoundaries.get=function(){return!!this._showTileBoundaries},o.showTileBoundaries.set=function(t){this._showTileBoundaries!==t&&(this._showTileBoundaries=t,this._update())},o.showCollisionBoxes.get=function(){return!!this._showCollisionBoxes},o.showCollisionBoxes.set=function(t){this._showCollisionBoxes!==t&&(this._showCollisionBoxes=t,this.style._redoPlacement())},o.showOverdrawInspector.get=function(){return!!this._showOverdrawInspector},o.showOverdrawInspector.set=function(t){this._showOverdrawInspector!==t&&(this._showOverdrawInspector=t,this._update())},o.repaint.get=function(){return!!this._repaint},o.repaint.set=function(t){this._repaint=t,this._update()},o.vertices.get=function(){return!!this._vertices},o.vertices.set=function(t){this._vertices=t,this._update()},e.prototype._onData=function(t){this._update(\"style\"===t.dataType),this.fire(t.dataType+\"data\",t)},e.prototype._onDataLoading=function(t){this.fire(t.dataType+\"dataloading\",t)},Object.defineProperties(e.prototype,o),e}(Camera);module.exports=Map;\n},{\"../geo/lng_lat\":62,\"../geo/lng_lat_bounds\":63,\"../geo/transform\":64,\"../render/painter\":77,\"../style/animation_loop\":143,\"../style/style\":146,\"../util/browser\":192,\"../util/dom\":199,\"../util/util\":212,\"../util/window\":194,\"./bind_handlers\":171,\"./camera\":172,\"./control/attribution_control\":173,\"./control/logo_control\":176,\"./hash\":186,\"mapbox-gl-supported\":22,\"point-geometry\":26}],188:[function(require,module,exports){\n\"use strict\";var DOM=require(\"../util/dom\"),LngLat=require(\"../geo/lng_lat\"),Point=require(\"point-geometry\"),Marker=function(t,e){this._offset=Point.convert(e&&e.offset||[0,0]),this._update=this._update.bind(this),this._onMapClick=this._onMapClick.bind(this),t||(t=DOM.create(\"div\")),t.classList.add(\"mapboxgl-marker\"),this._element=t,this._popup=null};Marker.prototype.addTo=function(t){return this.remove(),this._map=t,t.getCanvasContainer().appendChild(this._element),t.on(\"move\",this._update),t.on(\"moveend\",this._update),this._update(),this._map.on(\"click\",this._onMapClick),this},Marker.prototype.remove=function(){return this._map&&(this._map.off(\"click\",this._onMapClick),this._map.off(\"move\",this._update),this._map.off(\"moveend\",this._update),this._map=null),DOM.remove(this._element),this._popup&&this._popup.remove(),this},Marker.prototype.getLngLat=function(){return this._lngLat},Marker.prototype.setLngLat=function(t){return this._lngLat=LngLat.convert(t),this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this},Marker.prototype.getElement=function(){return this._element},Marker.prototype.setPopup=function(t){return this._popup&&(this._popup.remove(),this._popup=null),t&&(this._popup=t,this._popup.setLngLat(this._lngLat)),this},Marker.prototype._onMapClick=function(t){var e=t.originalEvent.target,p=this._element;this._popup&&(e===p||p.contains(e))&&this.togglePopup()},Marker.prototype.getPopup=function(){return this._popup},Marker.prototype.togglePopup=function(){var t=this._popup;t&&(t.isOpen()?t.remove():t.addTo(this._map))},Marker.prototype._update=function(t){if(this._map){var e=this._map.project(this._lngLat)._add(this._offset);t&&\"moveend\"!==t.type||(e=e.round()),DOM.setTransform(this._element,\"translate(\"+e.x+\"px, \"+e.y+\"px)\")}},module.exports=Marker;\n},{\"../geo/lng_lat\":62,\"../util/dom\":199,\"point-geometry\":26}],189:[function(require,module,exports){\n\"use strict\";function normalizeOffset(t){if(t){if(\"number\"==typeof t){var o=Math.round(Math.sqrt(.5*Math.pow(t,2)));return{top:new Point(0,t),\"top-left\":new Point(o,o),\"top-right\":new Point(-o,o),bottom:new Point(0,-t),\"bottom-left\":new Point(o,-o),\"bottom-right\":new Point(-o,-o),left:new Point(t,0),right:new Point(-t,0)}}if(isPointLike(t)){var e=Point.convert(t);return{top:e,\"top-left\":e,\"top-right\":e,bottom:e,\"bottom-left\":e,\"bottom-right\":e,left:e,right:e}}return{top:Point.convert(t.top||[0,0]),\"top-left\":Point.convert(t[\"top-left\"]||[0,0]),\"top-right\":Point.convert(t[\"top-right\"]||[0,0]),bottom:Point.convert(t.bottom||[0,0]),\"bottom-left\":Point.convert(t[\"bottom-left\"]||[0,0]),\"bottom-right\":Point.convert(t[\"bottom-right\"]||[0,0]),left:Point.convert(t.left||[0,0]),right:Point.convert(t.right||[0,0])}}return normalizeOffset(new Point(0,0))}function isPointLike(t){return t instanceof Point||Array.isArray(t)}var util=require(\"../util/util\"),Evented=require(\"../util/evented\"),DOM=require(\"../util/dom\"),LngLat=require(\"../geo/lng_lat\"),Point=require(\"point-geometry\"),window=require(\"../util/window\"),defaultOptions={closeButton:!0,closeOnClick:!0},Popup=function(t){function o(o){t.call(this),this.options=util.extend(Object.create(defaultOptions),o),util.bindAll([\"_update\",\"_onClickClose\"],this)}return t&&(o.__proto__=t),o.prototype=Object.create(t&&t.prototype),o.prototype.constructor=o,o.prototype.addTo=function(t){return this._map=t,this._map.on(\"move\",this._update),this.options.closeOnClick&&this._map.on(\"click\",this._onClickClose),this._update(),this},o.prototype.isOpen=function(){return!!this._map},o.prototype.remove=function(){return this._content&&this._content.parentNode&&this._content.parentNode.removeChild(this._content),this._container&&(this._container.parentNode.removeChild(this._container),delete this._container),this._map&&(this._map.off(\"move\",this._update),this._map.off(\"click\",this._onClickClose),delete this._map),this.fire(\"close\"),this},o.prototype.getLngLat=function(){return this._lngLat},o.prototype.setLngLat=function(t){return this._lngLat=LngLat.convert(t),this._update(),this},o.prototype.setText=function(t){return this.setDOMContent(window.document.createTextNode(t))},o.prototype.setHTML=function(t){var o,e=window.document.createDocumentFragment(),n=window.document.createElement(\"body\");for(n.innerHTML=t;;){if(o=n.firstChild,!o)break;e.appendChild(o)}return this.setDOMContent(e)},o.prototype.setDOMContent=function(t){return this._createContent(),this._content.appendChild(t),this._update(),this},o.prototype._createContent=function(){this._content&&this._content.parentNode&&this._content.parentNode.removeChild(this._content),this._content=DOM.create(\"div\",\"mapboxgl-popup-content\",this._container),this.options.closeButton&&(this._closeButton=DOM.create(\"button\",\"mapboxgl-popup-close-button\",this._content),this._closeButton.type=\"button\",this._closeButton.innerHTML=\"×\",this._closeButton.addEventListener(\"click\",this._onClickClose))},o.prototype._update=function(){if(this._map&&this._lngLat&&this._content){this._container||(this._container=DOM.create(\"div\",\"mapboxgl-popup\",this._map.getContainer()),this._tip=DOM.create(\"div\",\"mapboxgl-popup-tip\",this._container),this._container.appendChild(this._content));var t=this.options.anchor,o=normalizeOffset(this.options.offset),e=this._map.project(this._lngLat).round();if(!t){var n=this._container.offsetWidth,i=this._container.offsetHeight;t=e.y+o.bottom.ythis._map.transform.height-i?[\"bottom\"]:[],e.xthis._map.transform.width-n/2&&t.push(\"right\"),t=0===t.length?\"bottom\":t.join(\"-\")}var r=e.add(o[t]),s={top:\"translate(-50%,0)\",\"top-left\":\"translate(0,0)\",\"top-right\":\"translate(-100%,0)\",bottom:\"translate(-50%,-100%)\",\"bottom-left\":\"translate(0,-100%)\",\"bottom-right\":\"translate(-100%,-100%)\",left:\"translate(0,-50%)\",right:\"translate(-100%,-50%)\"},p=this._container.classList;for(var a in s)p.remove(\"mapboxgl-popup-anchor-\"+a);p.add(\"mapboxgl-popup-anchor-\"+t),DOM.setTransform(this._container,s[t]+\" translate(\"+r.x+\"px,\"+r.y+\"px)\")}},o.prototype._onClickClose=function(){this.remove()},o}(Evented);module.exports=Popup;\n},{\"../geo/lng_lat\":62,\"../util/dom\":199,\"../util/evented\":200,\"../util/util\":212,\"../util/window\":194,\"point-geometry\":26}],190:[function(require,module,exports){\n\"use strict\";var Actor=function(t,e,a){this.target=t,this.parent=e,this.mapId=a,this.callbacks={},this.callbackID=0,this.receive=this.receive.bind(this),this.target.addEventListener(\"message\",this.receive,!1)};Actor.prototype.send=function(t,e,a,r,s){var i=a?this.mapId+\":\"+this.callbackID++:null;a&&(this.callbacks[i]=a),this.target.postMessage({targetMapId:s,sourceMapId:this.mapId,type:t,id:String(i),data:e},r)},Actor.prototype.receive=function(t){var e,a=this,r=t.data,s=r.id;if(!r.targetMapId||this.mapId===r.targetMapId){var i=function(t,e,r){a.target.postMessage({sourceMapId:a.mapId,type:\"\",id:String(s),error:t?String(t):null,data:e},r)};if(\"\"===r.type)e=this.callbacks[r.id],delete this.callbacks[r.id],e&&e(r.error||null,r.data);else if(\"undefined\"!=typeof r.id&&this.parent[r.type])this.parent[r.type](r.sourceMapId,r.data,i);else if(\"undefined\"!=typeof r.id&&this.parent.getWorkerSource){var p=r.type.split(\".\"),d=this.parent.getWorkerSource(r.sourceMapId,p[0]);d[p[1]](r.data,i)}else this.parent[r.type](r.data)}},Actor.prototype.remove=function(){this.target.removeEventListener(\"message\",this.receive,!1)},module.exports=Actor;\n},{}],191:[function(require,module,exports){\n\"use strict\";function sameOrigin(e){var t=window.document.createElement(\"a\");return t.href=e,t.protocol===window.document.location.protocol&&t.host===window.document.location.host}var window=require(\"./window\");exports.getJSON=function(e,t){var n=new window.XMLHttpRequest;return n.open(\"GET\",e,!0),n.setRequestHeader(\"Accept\",\"application/json\"),n.onerror=function(e){t(e)},n.onload=function(){if(n.status>=200&&n.status<300&&n.response){var e;try{e=JSON.parse(n.response)}catch(e){return t(e)}t(null,e)}else t(new Error(n.statusText))},n.send(),n},exports.getArrayBuffer=function(e,t){var n=new window.XMLHttpRequest;return n.open(\"GET\",e,!0),n.responseType=\"arraybuffer\",n.onerror=function(e){t(e)},n.onload=function(){return 0===n.response.byteLength&&200===n.status?t(new Error(\"http status 200 returned without content.\")):void(n.status>=200&&n.status<300&&n.response?t(null,{data:n.response,cacheControl:n.getResponseHeader(\"Cache-Control\"),expires:n.getResponseHeader(\"Expires\")}):t(new Error(n.statusText)))},n.send(),n};var transparentPngUrl=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=\";exports.getImage=function(e,t){return exports.getArrayBuffer(e,function(e,n){if(e)return t(e);var r=new window.Image,o=window.URL||window.webkitURL;r.onload=function(){t(null,r),o.revokeObjectURL(r.src)};var a=new window.Blob([new Uint8Array(n.data)],{type:\"image/png\"});r.cacheControl=n.cacheControl,r.expires=n.expires,r.src=n.data.byteLength?o.createObjectURL(a):transparentPngUrl})},exports.getVideo=function(e,t){var n=window.document.createElement(\"video\");n.onloadstart=function(){t(null,n)};for(var r=0;r=a+n?e.call(t,1):(e.call(t,(i-a)/n),exports.frame(o)))}if(!n)return e.call(t,1),null;var r=!1,a=module.exports.now();return exports.frame(o),function(){r=!0}},exports.getImageData=function(e){var n=window.document.createElement(\"canvas\"),t=n.getContext(\"2d\");return n.width=e.width,n.height=e.height,t.drawImage(e,0,0),t.getImageData(0,0,e.width,e.height).data},exports.supported=require(\"mapbox-gl-supported\"),exports.hardwareConcurrency=window.navigator.hardwareConcurrency||4,Object.defineProperty(exports,\"devicePixelRatio\",{get:function(){return window.devicePixelRatio}}),exports.supportsWebp=!1;var webpImgTest=window.document.createElement(\"img\");webpImgTest.onload=function(){exports.supportsWebp=!0},webpImgTest.src=\"data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=\";\n},{\"./window\":194,\"mapbox-gl-supported\":22}],193:[function(require,module,exports){\n\"use strict\";var WebWorkify=require(\"webworkify\"),window=require(\"../window\"),workerURL=window.URL.createObjectURL(new WebWorkify(require(\"../../source/worker\"),{bare:!0}));module.exports=function(){return new window.Worker(workerURL)};\n},{\"../../source/worker\":98,\"../window\":194,\"webworkify\":41}],194:[function(require,module,exports){\n\"use strict\";module.exports=self;\n},{}],195:[function(require,module,exports){\n\"use strict\";function compareAreas(e,r){return r.area-e.area}var quickselect=require(\"quickselect\"),calculateSignedArea=require(\"./util\").calculateSignedArea;module.exports=function(e,r){var a=e.length;if(a<=1)return[e];for(var t,u,c=[],i=0;i1)for(var n=0;n0||this._oneTimeListeners&&this._oneTimeListeners[e]&&this._oneTimeListeners[e].length>0||this._eventedParent&&this._eventedParent.listens(e)},Evented.prototype.setEventedParent=function(e,t){return this._eventedParent=e,this._eventedParentData=t,this},module.exports=Evented;\n},{\"./util\":212}],201:[function(require,module,exports){\n\"use strict\";function compareMax(e,t){return t.max-e.max}function Cell(e,t,n,r){this.p=new Point(e,t),this.h=n,this.d=pointToPolygonDist(this.p,r),this.max=this.d+this.h*Math.SQRT2}function pointToPolygonDist(e,t){for(var n=!1,r=1/0,o=0;oe.y!=h.y>e.y&&e.x<(h.x-a.x)*(e.y-a.y)/(h.y-a.y)+a.x&&(n=!n),r=Math.min(r,distToSegmentSquared(e,a,h))}return(n?1:-1)*Math.sqrt(r)}function getCentroidCell(e){for(var t=0,n=0,r=0,o=e[0],i=0,l=o.length,u=l-1;ii)&&(i=a.x),(!s||a.y>l)&&(l=a.y)}var h=i-r,p=l-o,y=Math.min(h,p),x=y/2,d=new Queue(null,compareMax);if(0===y)return[r,o];for(var g=r;gm.d||!m.d)&&(m=v,n&&console.log(\"found best %d after %d probes\",Math.round(1e4*v.d)/1e4,c)),v.max-m.d<=t||(x=v.h/2,d.push(new Cell(v.p.x-x,v.p.y-x,x,e)),d.push(new Cell(v.p.x+x,v.p.y-x,x,e)),d.push(new Cell(v.p.x-x,v.p.y+x,x,e)),d.push(new Cell(v.p.x+x,v.p.y+x,x,e)),c+=4)}return n&&(console.log(\"num probes: \"+c),console.log(\"best distance: \"+m.d)),m.p};\n},{\"./intersection_tests\":205,\"point-geometry\":26,\"tinyqueue\":30}],202:[function(require,module,exports){\n\"use strict\";var WorkerPool=require(\"./worker_pool\"),globalWorkerPool;module.exports=function(){return globalWorkerPool||(globalWorkerPool=new WorkerPool),globalWorkerPool};\n},{\"./worker_pool\":215}],203:[function(require,module,exports){\n\"use strict\";function Glyphs(a,e){this.stacks=a.readFields(readFontstacks,[],e)}function readFontstacks(a,e,r){if(1===a){var t=r.readMessage(readFontstack,{glyphs:{}});e.push(t)}}function readFontstack(a,e,r){if(1===a)e.name=r.readString();else if(2===a)e.range=r.readString();else if(3===a){var t=r.readMessage(readGlyph,{});e.glyphs[t.id]=t}}function readGlyph(a,e,r){1===a?e.id=r.readVarint():2===a?e.bitmap=r.readBytes():3===a?e.width=r.readVarint():4===a?e.height=r.readVarint():5===a?e.left=r.readSVarint():6===a?e.top=r.readSVarint():7===a&&(e.advance=r.readVarint())}module.exports=Glyphs;\n},{}],204:[function(require,module,exports){\n\"use strict\";function interpolate(t,e,n){return t*(1-n)+e*n}module.exports=interpolate,interpolate.number=interpolate,interpolate.vec2=function(t,e,n){return[interpolate(t[0],e[0],n),interpolate(t[1],e[1],n)]},interpolate.color=function(t,e,n){return[interpolate(t[0],e[0],n),interpolate(t[1],e[1],n),interpolate(t[2],e[2],n),interpolate(t[3],e[3],n)]},interpolate.array=function(t,e,n){return t.map(function(t,r){return interpolate(t,e[r],n)})};\n},{}],205:[function(require,module,exports){\n\"use strict\";function polygonIntersectsPolygon(n,t){for(var e=0;e=3)for(var u=0;u1){if(lineIntersectsLine(n,t))return!0;for(var r=0;r1?n.distSqr(e):n.distSqr(e.sub(t)._mult(o)._add(t))}function multiPolygonContainsPoint(n,t){for(var e,r,o,i=!1,l=0;lt.y!=o.y>t.y&&t.x<(o.x-r.x)*(t.y-r.y)/(o.y-r.y)+r.x&&(i=!i)}return i}function polygonContainsPoint(n,t){for(var e=!1,r=0,o=n.length-1;rt.y!=l.y>t.y&&t.x<(l.x-i.x)*(t.y-i.y)/(l.y-i.y)+i.x&&(e=!e)}return e}var isCounterClockwise=require(\"./util\").isCounterClockwise;module.exports={multiPolygonIntersectsBufferedMultiPoint:multiPolygonIntersectsBufferedMultiPoint,multiPolygonIntersectsMultiPolygon:multiPolygonIntersectsMultiPolygon,multiPolygonIntersectsBufferedMultiLine:multiPolygonIntersectsBufferedMultiLine,polygonIntersectsPolygon:polygonIntersectsPolygon,distToSegmentSquared:distToSegmentSquared};\n},{\"./util\":212}],206:[function(require,module,exports){\n\"use strict\";var unicodeBlockLookup={\"Latin-1 Supplement\":function(n){return n>=128&&n<=255},\"Hangul Jamo\":function(n){return n>=4352&&n<=4607},\"Unified Canadian Aboriginal Syllabics\":function(n){return n>=5120&&n<=5759},\"Unified Canadian Aboriginal Syllabics Extended\":function(n){return n>=6320&&n<=6399},\"General Punctuation\":function(n){return n>=8192&&n<=8303},\"Letterlike Symbols\":function(n){return n>=8448&&n<=8527},\"Number Forms\":function(n){return n>=8528&&n<=8591},\"Miscellaneous Technical\":function(n){return n>=8960&&n<=9215},\"Control Pictures\":function(n){return n>=9216&&n<=9279},\"Optical Character Recognition\":function(n){return n>=9280&&n<=9311},\"Enclosed Alphanumerics\":function(n){return n>=9312&&n<=9471},\"Geometric Shapes\":function(n){return n>=9632&&n<=9727},\"Miscellaneous Symbols\":function(n){return n>=9728&&n<=9983},\"Miscellaneous Symbols and Arrows\":function(n){return n>=11008&&n<=11263},\"CJK Radicals Supplement\":function(n){return n>=11904&&n<=12031},\"Kangxi Radicals\":function(n){return n>=12032&&n<=12255},\"Ideographic Description Characters\":function(n){return n>=12272&&n<=12287},\"CJK Symbols and Punctuation\":function(n){return n>=12288&&n<=12351},Hiragana:function(n){return n>=12352&&n<=12447},Katakana:function(n){return n>=12448&&n<=12543},Bopomofo:function(n){return n>=12544&&n<=12591},\"Hangul Compatibility Jamo\":function(n){return n>=12592&&n<=12687},Kanbun:function(n){return n>=12688&&n<=12703},\"Bopomofo Extended\":function(n){return n>=12704&&n<=12735},\"CJK Strokes\":function(n){return n>=12736&&n<=12783},\"Katakana Phonetic Extensions\":function(n){return n>=12784&&n<=12799},\"Enclosed CJK Letters and Months\":function(n){return n>=12800&&n<=13055},\"CJK Compatibility\":function(n){return n>=13056&&n<=13311},\"CJK Unified Ideographs Extension A\":function(n){return n>=13312&&n<=19903},\"Yijing Hexagram Symbols\":function(n){return n>=19904&&n<=19967},\"CJK Unified Ideographs\":function(n){return n>=19968&&n<=40959},\"Yi Syllables\":function(n){return n>=40960&&n<=42127},\"Yi Radicals\":function(n){return n>=42128&&n<=42191},\"Hangul Jamo Extended-A\":function(n){return n>=43360&&n<=43391},\"Hangul Syllables\":function(n){return n>=44032&&n<=55215},\"Hangul Jamo Extended-B\":function(n){return n>=55216&&n<=55295},\"Private Use Area\":function(n){return n>=57344&&n<=63743},\"CJK Compatibility Ideographs\":function(n){return n>=63744&&n<=64255},\"Vertical Forms\":function(n){return n>=65040&&n<=65055},\"CJK Compatibility Forms\":function(n){return n>=65072&&n<=65103},\"Small Form Variants\":function(n){return n>=65104&&n<=65135},\"Halfwidth and Fullwidth Forms\":function(n){return n>=65280&&n<=65519}};module.exports=unicodeBlockLookup;\n},{}],207:[function(require,module,exports){\n\"use strict\";var LRUCache=function(t,e){this.max=t,this.onRemove=e,this.reset()};LRUCache.prototype.reset=function(){var t=this;for(var e in t.data)t.onRemove(t.data[e]);return this.data={},this.order=[],this},LRUCache.prototype.add=function(t,e){if(this.has(t))this.order.splice(this.order.indexOf(t),1),this.data[t]=e,this.order.push(t);else if(this.data[t]=e,this.order.push(t),this.order.length>this.max){var r=this.get(this.order[0]);r&&this.onRemove(r)}return this},LRUCache.prototype.has=function(t){return t in this.data},LRUCache.prototype.keys=function(){return this.order},LRUCache.prototype.get=function(t){if(!this.has(t))return null;var e=this.data[t];return delete this.data[t],this.order.splice(this.order.indexOf(t),1),e},LRUCache.prototype.getWithoutRemoving=function(t){if(!this.has(t))return null;var e=this.data[t];return e},LRUCache.prototype.remove=function(t){if(!this.has(t))return this;var e=this.data[t];return delete this.data[t],this.onRemove(e),this.order.splice(this.order.indexOf(t),1),this},LRUCache.prototype.setMaxSize=function(t){var e=this;for(this.max=t;this.order.length>this.max;){var r=e.get(e.order[0]);r&&e.onRemove(r)}return this},module.exports=LRUCache;\n},{}],208:[function(require,module,exports){\n\"use strict\";function makeAPIURL(r,e){var t=parseUrl(config.API_URL);if(r.protocol=t.protocol,r.authority=t.authority,!config.REQUIRE_ACCESS_TOKEN)return formatUrl(r);if(e=e||config.ACCESS_TOKEN,!e)throw new Error(\"An API access token is required to use Mapbox GL. \"+help);if(\"s\"===e[0])throw new Error(\"Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). \"+help);return r.params.push(\"access_token=\"+e),formatUrl(r)}function isMapboxURL(r){return 0===r.indexOf(\"mapbox:\")}function replaceTempAccessToken(r){for(var e=0;e=2||512===t?\"@2x\":\"\",s=browser.supportsWebp?\".webp\":\"$1\";return o.path=o.path.replace(imageExtensionRe,\"\"+a+s),replaceTempAccessToken(o.params),formatUrl(o)};var urlRe=/^(\\w+):\\/\\/([^\\/?]+)(\\/[^?]+)?\\??(.+)?/;\n},{\"./browser\":192,\"./config\":196}],209:[function(require,module,exports){\n\"use strict\";var isChar=require(\"./is_char_in_unicode_block\");module.exports.allowsIdeographicBreaking=function(a){for(var i=0,r=a;i=65097&&a<=65103)||(!!isChar[\"CJK Compatibility Ideographs\"](a)||(!!isChar[\"CJK Compatibility\"](a)||(!!isChar[\"CJK Radicals Supplement\"](a)||(!!isChar[\"CJK Strokes\"](a)||(!(!isChar[\"CJK Symbols and Punctuation\"](a)||a>=12296&&a<=12305||a>=12308&&a<=12319||12336===a)||(!!isChar[\"CJK Unified Ideographs Extension A\"](a)||(!!isChar[\"CJK Unified Ideographs\"](a)||(!!isChar[\"Enclosed CJK Letters and Months\"](a)||(!!isChar[\"Hangul Compatibility Jamo\"](a)||(!!isChar[\"Hangul Jamo Extended-A\"](a)||(!!isChar[\"Hangul Jamo Extended-B\"](a)||(!!isChar[\"Hangul Jamo\"](a)||(!!isChar[\"Hangul Syllables\"](a)||(!!isChar.Hiragana(a)||(!!isChar[\"Ideographic Description Characters\"](a)||(!!isChar.Kanbun(a)||(!!isChar[\"Kangxi Radicals\"](a)||(!!isChar[\"Katakana Phonetic Extensions\"](a)||(!(!isChar.Katakana(a)||12540===a)||(!(!isChar[\"Halfwidth and Fullwidth Forms\"](a)||65288===a||65289===a||65293===a||a>=65306&&a<=65310||65339===a||65341===a||65343===a||a>=65371&&a<=65503||65507===a||a>=65512&&a<=65519)||(!(!isChar[\"Small Form Variants\"](a)||a>=65112&&a<=65118||a>=65123&&a<=65126)||(!!isChar[\"Unified Canadian Aboriginal Syllabics\"](a)||(!!isChar[\"Unified Canadian Aboriginal Syllabics Extended\"](a)||(!!isChar[\"Vertical Forms\"](a)||(!!isChar[\"Yijing Hexagram Symbols\"](a)||(!!isChar[\"Yi Syllables\"](a)||!!isChar[\"Yi Radicals\"](a))))))))))))))))))))))))))))))},exports.charHasNeutralVerticalOrientation=function(a){return!(!isChar[\"Latin-1 Supplement\"](a)||167!==a&&169!==a&&174!==a&&177!==a&&188!==a&&189!==a&&190!==a&&215!==a&&247!==a)||(!(!isChar[\"General Punctuation\"](a)||8214!==a&&8224!==a&&8225!==a&&8240!==a&&8241!==a&&8251!==a&&8252!==a&&8258!==a&&8263!==a&&8264!==a&&8265!==a&&8273!==a)||(!!isChar[\"Letterlike Symbols\"](a)||(!!isChar[\"Number Forms\"](a)||(!(!isChar[\"Miscellaneous Technical\"](a)||!(a>=8960&&a<=8967||a>=8972&&a<=8991||a>=8996&&a<=9e3||9003===a||a>=9085&&a<=9114||a>=9150&&a<=9165||9167===a||a>=9169&&a<=9179||a>=9186&&a<=9215))||(!(!isChar[\"Control Pictures\"](a)||9251===a)||(!!isChar[\"Optical Character Recognition\"](a)||(!!isChar[\"Enclosed Alphanumerics\"](a)||(!!isChar[\"Geometric Shapes\"](a)||(!(!isChar[\"Miscellaneous Symbols\"](a)||a>=9754&&a<=9759)||(!(!isChar[\"Miscellaneous Symbols and Arrows\"](a)||!(a>=11026&&a<=11055||a>=11088&&a<=11097||a>=11192&&a<=11243))||(!!isChar[\"CJK Symbols and Punctuation\"](a)||(!!isChar.Katakana(a)||(!!isChar[\"Private Use Area\"](a)||(!!isChar[\"CJK Compatibility Forms\"](a)||(!!isChar[\"Small Form Variants\"](a)||(!!isChar[\"Halfwidth and Fullwidth Forms\"](a)||(8734===a||8756===a||8757===a||a>=9984&&a<=10087||a>=10102&&a<=10131||65532===a||65533===a)))))))))))))))))},exports.charHasRotatedVerticalOrientation=function(a){return!(exports.charHasUprightVerticalOrientation(a)||exports.charHasNeutralVerticalOrientation(a))};\n},{\"./is_char_in_unicode_block\":206}],210:[function(require,module,exports){\n\"use strict\";function createStructArrayType(t){var e=JSON.stringify(t);if(structArrayTypeCache[e])return structArrayTypeCache[e];var r=void 0===t.alignment?1:t.alignment,i=0,n=0,a=[\"Uint8\"],o=t.members.map(function(t){a.indexOf(t.type)<0&&a.push(t.type);var e=sizeOf(t.type),o=i=align(i,Math.max(r,e)),s=t.components||1;return n=Math.max(n,e),i+=e*s,{name:t.name,type:t.type,components:s,offset:o}}),s=align(i,Math.max(n,r)),p=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Struct);p.prototype.alignment=r,p.prototype.size=s;for(var y=0,c=o;ythis.capacity){this.capacity=Math.max(t,Math.floor(this.capacity*RESIZE_MULTIPLIER),DEFAULT_CAPACITY),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var e=this.uint8;this._refreshViews(),e&&this.uint8.set(e)}},StructArray.prototype._refreshViews=function(){for(var t=this,e=0,r=t._usedTypes;e=1)return 1;var e=r*r,t=e*r;return 4*(r<.5?t:3*(r-e)+t-.75)},exports.bezier=function(r,e,t,n){var o=new UnitBezier(r,e,t,n);return function(r){return o.solve(r)}},exports.ease=exports.bezier(.25,.1,.25,1),exports.clamp=function(r,e,t){return Math.min(t,Math.max(e,r))},exports.wrap=function(r,e,t){var n=t-e,o=((r-e)%n+n)%n+e;return o===e?t:o},exports.asyncAll=function(r,e,t){if(!r.length)return t(null,[]);var n=r.length,o=new Array(r.length),a=null;r.forEach(function(r,i){e(r,function(r,e){r&&(a=r),o[i]=e,0===--n&&t(a,o)})})},exports.values=function(r){var e=[];for(var t in r)e.push(r[t]);return e},exports.keysDifference=function(r,e){var t=[];for(var n in r)n in e||t.push(n);return t},exports.extend=function(r,e,t,n){for(var o=arguments,a=1;a=0)return!0;return!1};var warnOnceHistory={};exports.warnOnce=function(r){warnOnceHistory[r]||(\"undefined\"!=typeof console&&console.warn(r),warnOnceHistory[r]=!0)},exports.isCounterClockwise=function(r,e,t){return(t.y-r.y)*(e.x-r.x)>(e.y-r.y)*(t.x-r.x)},exports.calculateSignedArea=function(r){for(var e=0,t=0,n=r.length,o=n-1,a=void 0,i=void 0;t0||Math.abs(e.y-t.y)>0)&&Math.abs(exports.calculateSignedArea(r))>.01},exports.sphericalToCartesian=function(r){var e=r[0],t=r[1],n=r[2];return t+=90,t*=Math.PI/180,n*=Math.PI/180,[e*Math.cos(t)*Math.sin(n),e*Math.sin(t)*Math.sin(n),e*Math.cos(n)]},exports.parseCacheControl=function(r){var e=/(?:^|(?:\\s*\\,\\s*))([^\\x00-\\x20\\(\\)<>@\\,;\\:\\\\\"\\/\\[\\]\\?\\=\\{\\}\\x7F]+)(?:\\=(?:([^\\x00-\\x20\\(\\)<>@\\,;\\:\\\\\"\\/\\[\\]\\?\\=\\{\\}\\x7F]+)|(?:\\\"((?:[^\"\\\\]|\\\\.)*)\\\")))?/g,t={};if(r.replace(e,function(r,e,n,o){var a=n||o;return t[e]=!a||a.toLowerCase(),\"\"}),t[\"max-age\"]){var n=parseInt(t[\"max-age\"],10);isNaN(n)?delete t[\"max-age\"]:t[\"max-age\"]=n}return t};\n},{\"../geo/coordinate\":61,\"@mapbox/unitbezier\":3,\"point-geometry\":26}],213:[function(require,module,exports){\n\"use strict\";var Feature=function(e,t,r,o){this.type=\"Feature\",this._vectorTileFeature=e,e._z=t,e._x=r,e._y=o,this.properties=e.properties,null!=e.id&&(this.id=e.id)},prototypeAccessors={geometry:{}};prototypeAccessors.geometry.get=function(){return void 0===this._geometry&&(this._geometry=this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x,this._vectorTileFeature._y,this._vectorTileFeature._z).geometry),this._geometry},prototypeAccessors.geometry.set=function(e){this._geometry=e},Feature.prototype.toJSON=function(){var e=this,t={geometry:this.geometry};for(var r in e)\"_geometry\"!==r&&\"_vectorTileFeature\"!==r&&(t[r]=e[r]);return t},Object.defineProperties(Feature.prototype,prototypeAccessors),module.exports=Feature;\n},{}],214:[function(require,module,exports){\n\"use strict\";var scriptDetection=require(\"./script_detection\");module.exports=function(t){for(var o=\"\",e=0;e\":\"﹀\",\"?\":\"︖\",\"@\":\"@\",\"[\":\"﹇\",\"\\\\\":\"\\",\"]\":\"﹈\",\"^\":\"^\",_:\"︳\",\"`\":\"`\",\"{\":\"︷\",\"|\":\"―\",\"}\":\"︸\",\"~\":\"~\",\"¢\":\"¢\",\"£\":\"£\",\"¥\":\"¥\",\"¦\":\"¦\",\"¬\":\"¬\",\"¯\":\" ̄\",\"–\":\"︲\",\"—\":\"︱\",\"‘\":\"﹃\",\"’\":\"﹄\",\"“\":\"﹁\",\"”\":\"﹂\",\"…\":\"︙\",\"‧\":\"・\",\"₩\":\"₩\",\"、\":\"︑\",\"。\":\"︒\",\"〈\":\"︿\",\"〉\":\"﹀\",\"《\":\"︽\",\"》\":\"︾\",\"「\":\"﹁\",\"」\":\"﹂\",\"『\":\"﹃\",\"』\":\"﹄\",\"【\":\"︻\",\"】\":\"︼\",\"〔\":\"︹\",\"〕\":\"︺\",\"〖\":\"︗\",\"〗\":\"︘\",\"!\":\"︕\",\"(\":\"︵\",\")\":\"︶\",\",\":\"︐\",\"-\":\"︲\",\".\":\"・\",\":\":\"︓\",\";\":\"︔\",\"<\":\"︿\",\">\":\"﹀\",\"?\":\"︖\",\"[\":\"﹇\",\"]\":\"﹈\",\"_\":\"︳\",\"{\":\"︷\",\"|\":\"―\",\"}\":\"︸\",\"⦅\":\"︵\",\"⦆\":\"︶\",\"。\":\"︒\",\"「\":\"﹁\",\"」\":\"﹂\"};\n},{\"./script_detection\":209}],215:[function(require,module,exports){\n\"use strict\";var WebWorker=require(\"./web_worker\"),WorkerPool=function(){this.active={}};WorkerPool.prototype.acquire=function(r){var e=this;if(!this.workers){var o=require(\"../\").workerCount;for(this.workers=[];this.workers.length {\n return string.split('-').map(([first,...rest]) => first.toUpperCase() + rest.join('').toLowerCase()).join(' ');\n};\n\nconst addMapTypeOption = (map, menu, option, checked = false) => {\n let input = document.createElement('input');\n input.setAttribute('id', option);\n input.setAttribute('type', 'radio');\n input.setAttribute('name', 'toggle');\n input.setAttribute('value', option);\n if (checked == true) {\n input.setAttribute('checked', 'checked');\n }\n input.addEventListener('click', function () {\n map.setStyle('mapbox://styles/mapbox/' + option + '-v9');\n });\n let label = document.createElement('label');\n label.setAttribute('for', option);\n label.appendChild(document.createTextNode(titlecase(option)));\n menu.appendChild(input);\n menu.appendChild(label);\n};\n\nconst makeMapMenu = (map) => {\n let mapMenu = document.createElement('div');\n mapMenu.classList.add('map-menu');\n addMapTypeOption(map, mapMenu, 'streets', true);\n addMapTypeOption(map, mapMenu, 'satellite-streets');\n return mapMenu;\n};\n\n//the main function\nexport default function addMap(div, position = null, places = null) {\n let dataLatitude = div.dataset.latitude;\n let dataLongitude = div.dataset.longitude;\n let dataId = div.dataset.id;\n let data = window['geojson'+dataId];\n if (data == null) {\n data = {\n 'type': 'FeatureCollection',\n 'features': [{\n 'type': 'Feature',\n 'geometry': {\n 'type': 'Point',\n 'coordinates': [dataLongitude, dataLatitude]\n },\n 'properties': {\n 'title': 'Current Location',\n 'icon': 'circle-stroked',\n 'uri': 'current-location'\n }\n }]\n };\n }\n if (places != null) {\n for (let place of places) {\n let placeLongitude = parseLocation(place.location).longitude;\n let placeLatitude = parseLocation(place.location).latitude;\n data.features.push({\n 'type': 'Feature',\n 'geometry': {\n 'type': 'Point',\n 'coordinates': [placeLongitude, placeLatitude]\n },\n 'properties': {\n 'title': place.name,\n 'icon': 'circle',\n 'uri': place.slug\n }\n });\n }\n }\n if (position != null) {\n dataLongitude = position.coords.longitude;\n dataLatitude = position.coords.latitude;\n }\n let map = new mapboxgl.Map({\n container: div,\n style: 'mapbox://styles/mapbox/streets-v9',\n center: [dataLongitude, dataLatitude],\n zoom: 15\n });\n if (position == null) {\n map.scrollZoom.disable();\n }\n map.addControl(new mapboxgl.NavigationControl());\n div.appendChild(makeMapMenu(map));\n map.on('load', function () {\n map.addSource('points', {\n 'type': 'geojson',\n 'data': data\n });\n map.addLayer({\n 'id': 'points',\n 'interactive': true,\n 'type': 'symbol',\n 'source': 'points',\n 'layout': {\n 'icon-image': '{icon}-15',\n 'text-field': '{title}',\n 'text-offset': [0, 1]\n }\n });\n });\n if (position != null) {\n map.on('click', function (e) {\n let features = map.queryRenderedFeatures(e.point, {\n layer: ['points']\n });\n // if there are features within the given radius of the click event,\n // fly to the location of the click event\n if (features.length) {\n // Get coordinates from the symbol and center the map on those coordinates\n map.flyTo({center: features[0].geometry.coordinates});\n selectPlaceInForm(features[0].properties.uri);\n }\n });\n }\n if (data.features && data.features.length > 1) {\n let bounds = new mapboxgl.LngLatBounds();\n for (let feature of data.features) {\n bounds.extend(feature.geometry.coordinates);\n }\n map.fitBounds(bounds, { padding: 65});\n }\n\n return map;\n}\n\n\n\n// WEBPACK FOOTER //\n// ./mapbox-utils.js","//select-place.js\n\nexport default function selectPlaceInForm(uri) {\n if (document.querySelector('select')) {\n if (uri == 'current-location') {\n document.querySelector('select [id=\"option-coords\"]').selected = true;\n } else {\n document.querySelector('select [value=\"' + uri + '\"]').selected = true;\n }\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./select-place.js","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction placeHoldersCount (b64) {\n var len = b64.length\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // the number of equal signs (place holders)\n // if there are two placeholders, than the two characters before it\n // represent one byte\n // if there is only one, then the three characters before it represent 2 bytes\n // this is just a cheap hack to not do indexOf twice\n return b64[len - 2] === '=' ? 2 : b64[len - 1] === '=' ? 1 : 0\n}\n\nfunction byteLength (b64) {\n // base64 is 4/3 + up to two characters of the original data\n return b64.length * 3 / 4 - placeHoldersCount(b64)\n}\n\nfunction toByteArray (b64) {\n var i, j, l, tmp, placeHolders, arr\n var len = b64.length\n placeHolders = placeHoldersCount(b64)\n\n arr = new Arr(len * 3 / 4 - placeHolders)\n\n // if there are placeholders, only get up to the last complete 4 chars\n l = placeHolders > 0 ? len - 4 : len\n\n var L = 0\n\n for (i = 0, j = 0; i < l; i += 4, j += 3) {\n tmp = (revLookup[b64.charCodeAt(i)] << 18) | (revLookup[b64.charCodeAt(i + 1)] << 12) | (revLookup[b64.charCodeAt(i + 2)] << 6) | revLookup[b64.charCodeAt(i + 3)]\n arr[L++] = (tmp >> 16) & 0xFF\n arr[L++] = (tmp >> 8) & 0xFF\n arr[L++] = tmp & 0xFF\n }\n\n if (placeHolders === 2) {\n tmp = (revLookup[b64.charCodeAt(i)] << 2) | (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[L++] = tmp & 0xFF\n } else if (placeHolders === 1) {\n tmp = (revLookup[b64.charCodeAt(i)] << 10) | (revLookup[b64.charCodeAt(i + 1)] << 4) | (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[L++] = (tmp >> 8) & 0xFF\n arr[L++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2])\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var output = ''\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n output += lookup[tmp >> 2]\n output += lookup[(tmp << 4) & 0x3F]\n output += '=='\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + (uint8[len - 1])\n output += lookup[tmp >> 10]\n output += lookup[(tmp >> 4) & 0x3F]\n output += lookup[(tmp << 2) & 0x3F]\n output += '='\n }\n\n parts.push(output)\n\n return parts.join('')\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/jonny/git/jonnybarnes.uk/~/base64-js/index.js\n// module id = 5\n// module chunks = 0 1","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nvar base64 = require('base64-js')\nvar ieee754 = require('ieee754')\nvar isArray = require('isarray')\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Use Object implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * Due to various browser bugs, sometimes the Object implementation will be used even\n * when the browser supports typed arrays.\n *\n * Note:\n *\n * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,\n * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.\n *\n * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.\n *\n * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of\n * incorrect length in some situations.\n\n * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they\n * get the Object implementation, which is slower but behaves correctly.\n */\nBuffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined\n ? global.TYPED_ARRAY_SUPPORT\n : typedArraySupport()\n\n/*\n * Export kMaxLength after typed array support is determined.\n */\nexports.kMaxLength = kMaxLength()\n\nfunction typedArraySupport () {\n try {\n var arr = new Uint8Array(1)\n arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}\n return arr.foo() === 42 && // typed array instances can be augmented\n typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`\n arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`\n } catch (e) {\n return false\n }\n}\n\nfunction kMaxLength () {\n return Buffer.TYPED_ARRAY_SUPPORT\n ? 0x7fffffff\n : 0x3fffffff\n}\n\nfunction createBuffer (that, length) {\n if (kMaxLength() < length) {\n throw new RangeError('Invalid typed array length')\n }\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = new Uint8Array(length)\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n if (that === null) {\n that = new Buffer(length)\n }\n that.length = length\n }\n\n return that\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n return new Buffer(arg, encodingOrOffset, length)\n }\n\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new Error(\n 'If encoding is specified then the first argument must be a string'\n )\n }\n return allocUnsafe(this, arg)\n }\n return from(this, arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\n// TODO: Legacy, not needed anymore. Remove in next major version.\nBuffer._augment = function (arr) {\n arr.__proto__ = Buffer.prototype\n return arr\n}\n\nfunction from (that, value, encodingOrOffset, length) {\n if (typeof value === 'number') {\n throw new TypeError('\"value\" argument must not be a number')\n }\n\n if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {\n return fromArrayBuffer(that, value, encodingOrOffset, length)\n }\n\n if (typeof value === 'string') {\n return fromString(that, value, encodingOrOffset)\n }\n\n return fromObject(that, value)\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(null, value, encodingOrOffset, length)\n}\n\nif (Buffer.TYPED_ARRAY_SUPPORT) {\n Buffer.prototype.__proto__ = Uint8Array.prototype\n Buffer.__proto__ = Uint8Array\n if (typeof Symbol !== 'undefined' && Symbol.species &&\n Buffer[Symbol.species] === Buffer) {\n // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97\n Object.defineProperty(Buffer, Symbol.species, {\n value: null,\n configurable: true\n })\n }\n}\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be a number')\n } else if (size < 0) {\n throw new RangeError('\"size\" argument must not be negative')\n }\n}\n\nfunction alloc (that, size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(that, size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpretted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(that, size).fill(fill, encoding)\n : createBuffer(that, size).fill(fill)\n }\n return createBuffer(that, size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(null, size, fill, encoding)\n}\n\nfunction allocUnsafe (that, size) {\n assertSize(size)\n that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n for (var i = 0; i < size; ++i) {\n that[i] = 0\n }\n }\n return that\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(null, size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(null, size)\n}\n\nfunction fromString (that, string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('\"encoding\" must be a valid string encoding')\n }\n\n var length = byteLength(string, encoding) | 0\n that = createBuffer(that, length)\n\n var actual = that.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n that = that.slice(0, actual)\n }\n\n return that\n}\n\nfunction fromArrayLike (that, array) {\n var length = array.length < 0 ? 0 : checked(array.length) | 0\n that = createBuffer(that, length)\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n}\n\nfunction fromArrayBuffer (that, array, byteOffset, length) {\n array.byteLength // this throws if `array` is not a valid ArrayBuffer\n\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\\'offset\\' is out of bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\\'length\\' is out of bounds')\n }\n\n if (byteOffset === undefined && length === undefined) {\n array = new Uint8Array(array)\n } else if (length === undefined) {\n array = new Uint8Array(array, byteOffset)\n } else {\n array = new Uint8Array(array, byteOffset, length)\n }\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = array\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n that = fromArrayLike(that, array)\n }\n return that\n}\n\nfunction fromObject (that, obj) {\n if (Buffer.isBuffer(obj)) {\n var len = checked(obj.length) | 0\n that = createBuffer(that, len)\n\n if (that.length === 0) {\n return that\n }\n\n obj.copy(that, 0, 0, len)\n return that\n }\n\n if (obj) {\n if ((typeof ArrayBuffer !== 'undefined' &&\n obj.buffer instanceof ArrayBuffer) || 'length' in obj) {\n if (typeof obj.length !== 'number' || isnan(obj.length)) {\n return createBuffer(that, 0)\n }\n return fromArrayLike(that, obj)\n }\n\n if (obj.type === 'Buffer' && isArray(obj.data)) {\n return fromArrayLike(that, obj.data)\n }\n }\n\n throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')\n}\n\nfunction checked (length) {\n // Note: cannot use `length < kMaxLength()` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= kMaxLength()) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + kMaxLength().toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return !!(b != null && b._isBuffer)\n}\n\nBuffer.compare = function compare (a, b) {\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError('Arguments must be Buffers')\n }\n\n if (a === b) return 0\n\n var x = a.length\n var y = b.length\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n var i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n var buffer = Buffer.allocUnsafe(length)\n var pos = 0\n for (i = 0; i < list.length; ++i) {\n var buf = list[i]\n if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n buf.copy(buffer, pos)\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&\n (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n string = '' + string\n }\n\n var len = string.length\n if (len === 0) return 0\n\n // Use a for loop to avoid recursion\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n case undefined:\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) return utf8ToBytes(string).length // assume utf8\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n var loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coersion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect\n// Buffer instances.\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n var i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n var len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (var i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n var len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (var i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n var len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (var i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n var length = this.length | 0\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n var str = ''\n var max = exports.INSPECT_MAX_BYTES\n if (this.length > 0) {\n str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')\n if (this.length > max) str += ' ... '\n }\n return ''\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (!Buffer.isBuffer(target)) {\n throw new TypeError('Argument must be a Buffer')\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n var x = thisEnd - thisStart\n var y = end - start\n var len = Math.min(x, y)\n\n var thisCopy = this.slice(thisStart, thisEnd)\n var targetCopy = target.slice(start, end)\n\n for (var i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n var indexSize = 1\n var arrLength = arr.length\n var valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n var i\n if (dir) {\n var foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n var found = true\n for (var j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n var remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n // must be an even number of digits\n var strLen = string.length\n if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n for (var i = 0; i < length; ++i) {\n var parsed = parseInt(string.substr(i * 2, 2), 16)\n if (isNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction latin1Write (buf, string, offset, length) {\n return asciiWrite(buf, string, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset | 0\n if (isFinite(length)) {\n length = length | 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n // legacy write(string, encoding, offset, length) - remove in v0.13\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n var remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n return asciiWrite(this, string, offset, length)\n\n case 'latin1':\n case 'binary':\n return latin1Write(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n var res = []\n\n var i = start\n while (i < end) {\n var firstByte = buf[i]\n var codePoint = null\n var bytesPerSequence = (firstByte > 0xEF) ? 4\n : (firstByte > 0xDF) ? 3\n : (firstByte > 0xBF) ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n var secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nvar MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n var len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n var res = ''\n var i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n var len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n var out = ''\n for (var i = start; i < end; ++i) {\n out += toHex(buf[i])\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n var bytes = buf.slice(start, end)\n var res = ''\n for (var i = 0; i < bytes.length; i += 2) {\n res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n var len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n var newBuf\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n newBuf = this.subarray(start, end)\n newBuf.__proto__ = Buffer.prototype\n } else {\n var sliceLen = end - start\n newBuf = new Buffer(sliceLen, undefined)\n for (var i = 0; i < sliceLen; ++i) {\n newBuf[i] = this[i + start]\n }\n }\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n var val = this[offset + --byteLength]\n var mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var i = byteLength\n var mul = 1\n var val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var mul = 1\n var i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var i = byteLength - 1\n var mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nfunction objectWriteUInt16 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {\n buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>\n (littleEndian ? i : 1 - i) * 8\n }\n}\n\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nfunction objectWriteUInt32 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffffffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {\n buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff\n }\n}\n\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = 0\n var mul = 1\n var sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = byteLength - 1\n var mul = 1\n var sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n var len = end - start\n var i\n\n if (this === target && start < targetStart && targetStart < end) {\n // descending copy from end\n for (i = len - 1; i >= 0; --i) {\n target[i + targetStart] = this[i + start]\n }\n } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {\n // ascending copy from start\n for (i = 0; i < len; ++i) {\n target[i + targetStart] = this[i + start]\n }\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, start + len),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (val.length === 1) {\n var code = val.charCodeAt(0)\n if (code < 256) {\n val = code\n }\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n } else if (typeof val === 'number') {\n val = val & 255\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n var i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n var bytes = Buffer.isBuffer(val)\n ? val\n : utf8ToBytes(new Buffer(val, encoding).toString())\n var len = bytes.length\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// HELPER FUNCTIONS\n// ================\n\nvar INVALID_BASE64_RE = /[^+\\/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = stringtrim(str).replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction stringtrim (str) {\n if (str.trim) return str.trim()\n return str.replace(/^\\s+|\\s+$/g, '')\n}\n\nfunction toHex (n) {\n if (n < 16) return '0' + n.toString(16)\n return n.toString(16)\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n var codePoint\n var length = string.length\n var leadSurrogate = null\n var bytes = []\n\n for (var i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n var c, hi, lo\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n for (var i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\nfunction isnan (val) {\n return val !== val // eslint-disable-line no-self-compare\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/jonny/git/jonnybarnes.uk/~/buffer/index.js\n// module id = 6\n// module chunks = 0 1","var toString = {}.toString;\n\nmodule.exports = Array.isArray || function (arr) {\n return toString.call(arr) == '[object Array]';\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/jonny/git/jonnybarnes.uk/~/buffer/~/isarray/index.js\n// module id = 7\n// module chunks = 0 1","exports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = nBytes * 8 - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = nBytes * 8 - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = (value * c - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/jonny/git/jonnybarnes.uk/~/ieee754/index.js\n// module id = 8\n// module chunks = 0 1","(function(f){if(typeof exports===\"object\"&&typeof module!==\"undefined\"){module.exports=f()}else if(typeof define===\"function\"&&define.amd){define([],f)}else{var g;if(typeof window!==\"undefined\"){g=window}else if(typeof global!==\"undefined\"){g=global}else if(typeof self!==\"undefined\"){g=self}else{g=this}g.mapboxgl = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o0){for(var o=0,a=0,u=0;uh.maxh||t>h.maxw||i<=h.maxh&&t<=h.maxw&&(r=h.maxw*h.maxh-t*i,rn.free)){if(i===n.h)return this.allocShelf(f,t,i,s);i>n.h||ic)&&(p=2*Math.max(t,c)),(uu)&&(l=2*Math.max(i,u)),this.resize(p,l),this.packOne(t,i,s)}return null},t.prototype.allocFreebin=function(t,e,i,s){var h=this.freebins.splice(t,1)[0];return h.id=s,h.w=e,h.h=i,h.refcount=0,this.bins[s]=h,this.ref(h),h},t.prototype.allocShelf=function(t,e,i,s){var h=this.shelves[t],n=h.alloc(e,i,s);return this.bins[s]=n,this.ref(n),n},t.prototype.getBin=function(t){return this.bins[t]},t.prototype.ref=function(t){if(1===++t.refcount){var e=t.h;this.stats[e]=(0|this.stats[e])+1}return t.refcount},t.prototype.unref=function(t){return 0===t.refcount?0:(0===--t.refcount&&(this.stats[t.h]--,delete this.bins[t.id],this.freebins.push(t)),t.refcount)},t.prototype.clear=function(){this.shelves=[],this.freebins=[],this.stats={},this.bins={},this.maxId=0},t.prototype.resize=function(t,e){this.w=t,this.h=e;for(var i=0;ithis.free||e>this.h)return null;var h=this.x;return this.x+=t,this.free-=t,new i(s,h,this.y,t,e,t,this.h)},e.prototype.resize=function(t){return this.free+=t-this.w,this.w=t,!0},t});\n},{}],3:[function(require,module,exports){\nfunction UnitBezier(t,i,e,r){this.cx=3*t,this.bx=3*(e-t)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*i,this.by=3*(r-i)-this.cy,this.ay=1-this.cy-this.by,this.p1x=t,this.p1y=r,this.p2x=e,this.p2y=r}module.exports=UnitBezier,UnitBezier.prototype.sampleCurveX=function(t){return((this.ax*t+this.bx)*t+this.cx)*t},UnitBezier.prototype.sampleCurveY=function(t){return((this.ay*t+this.by)*t+this.cy)*t},UnitBezier.prototype.sampleCurveDerivativeX=function(t){return(3*this.ax*t+2*this.bx)*t+this.cx},UnitBezier.prototype.solveCurveX=function(t,i){\"undefined\"==typeof i&&(i=1e-6);var e,r,s,h,n;for(s=t,n=0;n<8;n++){if(h=this.sampleCurveX(s)-t,Math.abs(h)r)return r;for(;eh?e=s:r=s,s=.5*(r-e)+e}return s},UnitBezier.prototype.solve=function(t,i){return this.sampleCurveY(this.solveCurveX(t,i))};\n},{}],4:[function(require,module,exports){\n!function(e,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?t(exports):\"function\"==typeof define&&define.amd?define([\"exports\"],t):t(e.WhooTS=e.WhooTS||{})}(this,function(e){function t(e,t,r,n,i,s){s=s||{};var f=e+\"?\"+[\"bbox=\"+o(r,n,i),\"format=\"+(s.format||\"image/png\"),\"service=\"+(s.service||\"WMS\"),\"version=\"+(s.version||\"1.1.1\"),\"request=\"+(s.request||\"GetMap\"),\"srs=\"+(s.srs||\"EPSG:3857\"),\"width=\"+(s.width||256),\"height=\"+(s.height||256),\"layers=\"+t].join(\"&\");return f}function o(e,t,o){t=Math.pow(2,o)-t-1;var n=r(256*e,256*t,o),i=r(256*(e+1),256*(t+1),o);return n[0]+\",\"+n[1]+\",\"+i[0]+\",\"+i[1]}function r(e,t,o){var r=2*Math.PI*6378137/256/Math.pow(2,o),n=e*r-2*Math.PI*6378137/2,i=t*r-2*Math.PI*6378137/2;return[n,i]}e.getURL=t,e.getTileBBox=o,e.getMercCoords=r,Object.defineProperty(e,\"__esModule\",{value:!0})});\n},{}],5:[function(require,module,exports){\n\"use strict\";function earcut(e,n,r){r=r||2;var t=n&&n.length,i=t?n[0]*r:e.length,x=linkedList(e,0,i,r,!0),a=[];if(!x)return a;var o,l,u,s,v,f,y;if(t&&(x=eliminateHoles(e,n,x,r)),e.length>80*r){o=u=e[0],l=s=e[1];for(var d=r;du&&(u=v),f>s&&(s=f);y=Math.max(u-o,s-l)}return earcutLinked(x,a,r,o,l,y),a}function linkedList(e,n,r,t,i){var x,a;if(i===signedArea(e,n,r,t)>0)for(x=n;x=n;x-=t)a=insertNode(x,e[x],e[x+1],a);return a&&equals(a,a.next)&&(removeNode(a),a=a.next),a}function filterPoints(e,n){if(!e)return e;n||(n=e);var r,t=e;do if(r=!1,t.steiner||!equals(t,t.next)&&0!==area(t.prev,t,t.next))t=t.next;else{if(removeNode(t),t=n=t.prev,t===t.next)return null;r=!0}while(r||t!==n);return n}function earcutLinked(e,n,r,t,i,x,a){if(e){!a&&x&&indexCurve(e,t,i,x);for(var o,l,u=e;e.prev!==e.next;)if(o=e.prev,l=e.next,x?isEarHashed(e,t,i,x):isEar(e))n.push(o.i/r),n.push(e.i/r),n.push(l.i/r),removeNode(e),e=l.next,u=l.next;else if(e=l,e===u){a?1===a?(e=cureLocalIntersections(e,n,r),earcutLinked(e,n,r,t,i,x,2)):2===a&&splitEarcut(e,n,r,t,i,x):earcutLinked(filterPoints(e),n,r,t,i,x,1);break}}}function isEar(e){var n=e.prev,r=e,t=e.next;if(area(n,r,t)>=0)return!1;for(var i=e.next.next;i!==e.prev;){if(pointInTriangle(n.x,n.y,r.x,r.y,t.x,t.y,i.x,i.y)&&area(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function isEarHashed(e,n,r,t){var i=e.prev,x=e,a=e.next;if(area(i,x,a)>=0)return!1;for(var o=i.xx.x?i.x>a.x?i.x:a.x:x.x>a.x?x.x:a.x,s=i.y>x.y?i.y>a.y?i.y:a.y:x.y>a.y?x.y:a.y,v=zOrder(o,l,n,r,t),f=zOrder(u,s,n,r,t),y=e.nextZ;y&&y.z<=f;){if(y!==e.prev&&y!==e.next&&pointInTriangle(i.x,i.y,x.x,x.y,a.x,a.y,y.x,y.y)&&area(y.prev,y,y.next)>=0)return!1;y=y.nextZ}for(y=e.prevZ;y&&y.z>=v;){if(y!==e.prev&&y!==e.next&&pointInTriangle(i.x,i.y,x.x,x.y,a.x,a.y,y.x,y.y)&&area(y.prev,y,y.next)>=0)return!1;y=y.prevZ}return!0}function cureLocalIntersections(e,n,r){var t=e;do{var i=t.prev,x=t.next.next;!equals(i,x)&&intersects(i,t,t.next,x)&&locallyInside(i,x)&&locallyInside(x,i)&&(n.push(i.i/r),n.push(t.i/r),n.push(x.i/r),removeNode(t),removeNode(t.next),t=e=x),t=t.next}while(t!==e);return t}function splitEarcut(e,n,r,t,i,x){var a=e;do{for(var o=a.next.next;o!==a.prev;){if(a.i!==o.i&&isValidDiagonal(a,o)){var l=splitPolygon(a,o);return a=filterPoints(a,a.next),l=filterPoints(l,l.next),earcutLinked(a,n,r,t,i,x),void earcutLinked(l,n,r,t,i,x)}o=o.next}a=a.next}while(a!==e)}function eliminateHoles(e,n,r,t){var i,x,a,o,l,u=[];for(i=0,x=n.length;i=t.next.y){var o=t.x+(x-t.y)*(t.next.x-t.x)/(t.next.y-t.y);if(o<=i&&o>a){if(a=o,o===i){if(x===t.y)return t;if(x===t.next.y)return t.next}r=t.x=t.x&&t.x>=s&&pointInTriangle(xr.x)&&locallyInside(t,e)&&(r=t,f=l)),t=t.next;return r}function indexCurve(e,n,r,t){var i=e;do null===i.z&&(i.z=zOrder(i.x,i.y,n,r,t)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next;while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,sortLinked(i)}function sortLinked(e){var n,r,t,i,x,a,o,l,u=1;do{for(r=e,e=null,x=null,a=0;r;){for(a++,t=r,o=0,n=0;n0||l>0&&t;)0===o?(i=t,t=t.nextZ,l--):0!==l&&t?r.z<=t.z?(i=r,r=r.nextZ,o--):(i=t,t=t.nextZ,l--):(i=r,r=r.nextZ,o--),x?x.nextZ=i:e=i,i.prevZ=x,x=i;r=t}x.nextZ=null,u*=2}while(a>1);return e}function zOrder(e,n,r,t,i){return e=32767*(e-r)/i,n=32767*(n-t)/i,e=16711935&(e|e<<8),e=252645135&(e|e<<4),e=858993459&(e|e<<2),e=1431655765&(e|e<<1),n=16711935&(n|n<<8),n=252645135&(n|n<<4),n=858993459&(n|n<<2),n=1431655765&(n|n<<1),e|n<<1}function getLeftmost(e){var n=e,r=e;do n.x=0&&(e-a)*(t-o)-(r-a)*(n-o)>=0&&(r-a)*(x-o)-(i-a)*(t-o)>=0}function isValidDiagonal(e,n){return e.next.i!==n.i&&e.prev.i!==n.i&&!intersectsPolygon(e,n)&&locallyInside(e,n)&&locallyInside(n,e)&&middleInside(e,n)}function area(e,n,r){return(n.y-e.y)*(r.x-n.x)-(n.x-e.x)*(r.y-n.y)}function equals(e,n){return e.x===n.x&&e.y===n.y}function intersects(e,n,r,t){return!!(equals(e,n)&&equals(r,t)||equals(e,t)&&equals(r,n))||area(e,n,r)>0!=area(e,n,t)>0&&area(r,t,e)>0!=area(r,t,n)>0}function intersectsPolygon(e,n){var r=e;do{if(r.i!==e.i&&r.next.i!==e.i&&r.i!==n.i&&r.next.i!==n.i&&intersects(r,r.next,e,n))return!0;r=r.next}while(r!==e);return!1}function locallyInside(e,n){return area(e.prev,e,e.next)<0?area(e,n,e.next)>=0&&area(e,e.prev,n)>=0:area(e,n,e.prev)<0||area(e,e.next,n)<0}function middleInside(e,n){var r=e,t=!1,i=(e.x+n.x)/2,x=(e.y+n.y)/2;do r.y>x!=r.next.y>x&&i<(r.next.x-r.x)*(x-r.y)/(r.next.y-r.y)+r.x&&(t=!t),r=r.next;while(r!==e);return t}function splitPolygon(e,n){var r=new Node(e.i,e.x,e.y),t=new Node(n.i,n.x,n.y),i=e.next,x=n.prev;return e.next=n,n.prev=e,r.next=i,i.prev=r,t.next=r,r.prev=t,x.next=t,t.prev=x,t}function insertNode(e,n,r,t){var i=new Node(e,n,r);return t?(i.next=t.next,i.prev=t,t.next.prev=i,t.next=i):(i.prev=i,i.next=i),i}function removeNode(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function Node(e,n,r){this.i=e,this.x=n,this.y=r,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function signedArea(e,n,r,t){for(var i=0,x=n,a=r-t;x0&&(t+=e[i-1].length,r.holes.push(t))}return r};\n},{}],6:[function(require,module,exports){\nfunction geometry(r){if(\"Polygon\"===r.type)return polygonArea(r.coordinates);if(\"MultiPolygon\"===r.type){for(var e=0,n=0;n0){e+=Math.abs(ringArea(r[0]));for(var n=1;n2){for(var n,t,o=0;o=0}var geojsonArea=require(\"geojson-area\");module.exports=rewind;\n},{\"geojson-area\":6}],8:[function(require,module,exports){\n\"use strict\";function clip(e,r,t,n,u,i,l,s){if(t/=r,n/=r,l>=t&&s<=n)return e;if(l>n||s=t&&c<=n)h.push(o);else if(!(a>n||c=r&&s<=t&&u.push(l)}return u}function clipGeometry(e,r,t,n,u,i){for(var l=[],s=0;st?(d.push(u(h,f,r),u(h,f,t)),i||(d=newSlice(l,d,v,m,w))):o>=r&&d.push(u(h,f,r)):c>t?ot&&(d.push(u(h,f,t)),i||(d=newSlice(l,d,v,m,w))));h=g[S-1],c=h[n],c>=r&&c<=t&&d.push(h),a=d[d.length-1],i&&a&&(d[0][0]!==a[0]||d[0][1]!==a[1])&&d.push(d[0]),newSlice(l,d,v,m,w)}return l}function newSlice(e,r,t,n,u){return r.length&&(r.area=t,r.dist=n,void 0!==u&&(r.outer=u),e.push(r)),[]}module.exports=clip;var createFeature=require(\"./feature\");\n},{\"./feature\":10}],9:[function(require,module,exports){\n\"use strict\";function convert(e,t){var r=[];if(\"FeatureCollection\"===e.type)for(var o=0;o1?1:o,[r,o,0]}function calcSize(e){for(var t,r,o=0,a=0,i=0;i1)return!1;var r=n.geometry[0].length;if(5!==r)return!1;for(var s=0;s1&&console.time(\"creation\"),m=this.tiles[d]=createTile(e,p,i,o,f,t===a.maxZoom),this.tileCoords.push({z:t,x:i,y:o}),u)){u>1&&(console.log(\"tile z%d-%d-%d (features: %d, points: %d, simplified: %d)\",t,i,o,m.numFeatures,m.numPoints,m.numSimplified),console.timeEnd(\"creation\"));var h=\"z\"+t;this.stats[h]=(this.stats[h]||0)+1,this.total++}if(m.source=e,n){if(t===a.maxZoom||t===n)continue;var x=1<1&&console.time(\"clipping\");var g,v,M,T,b,y,S=.5*a.buffer/a.extent,Z=.5-S,q=.5+S,w=1+S;g=v=M=T=null,b=clip(e,p,i-S,i+q,0,intersectX,m.min[0],m.max[0]),y=clip(e,p,i+Z,i+w,0,intersectX,m.min[0],m.max[0]),b&&(g=clip(b,p,o-S,o+q,1,intersectY,m.min[1],m.max[1]),v=clip(b,p,o+Z,o+w,1,intersectY,m.min[1],m.max[1])),y&&(M=clip(y,p,o-S,o+q,1,intersectY,m.min[1],m.max[1]),T=clip(y,p,o+Z,o+w,1,intersectY,m.min[1],m.max[1])),u>1&&console.timeEnd(\"clipping\"),e.length&&(l.push(g||[],t+1,2*i,2*o),l.push(v||[],t+1,2*i,2*o+1),l.push(M||[],t+1,2*i+1,2*o),l.push(T||[],t+1,2*i+1,2*o+1))}else n&&(c=t)}return c},GeoJSONVT.prototype.getTile=function(e,t,i){var o=this.options,n=o.extent,r=o.debug,s=1<1&&console.log(\"drilling down to z%d-%d-%d\",e,t,i);for(var a,u=e,c=t,p=i;!a&&u>0;)u--,c=Math.floor(c/2),p=Math.floor(p/2),a=this.tiles[toID(u,c,p)];if(!a||!a.source)return null;if(r>1&&console.log(\"found parent tile z%d-%d-%d\",u,c,p),isClippedSquare(a,n,o.buffer))return transform.tile(a,n);r>1&&console.time(\"drilling down\");var d=this.splitTile(a.source,u,c,p,e,t,i);if(r>1&&console.timeEnd(\"drilling down\"),null!==d){var m=1<p&&(s=e,p=r);p>o?(t[s][2]=p,g.push(u),g.push(s),u=s):(n=g.pop(),u=g.pop())}}function getSqSegDist(t,i,e){var p=i[0],r=i[1],s=e[0],o=e[1],f=t[0],u=t[1],n=s-p,g=o-r;if(0!==n||0!==g){var l=((f-p)*n+(u-r)*g)/(n*n+g*g);l>1?(p=s,r=o):l>0&&(p+=n*l,r+=g*l)}return n=f-p,g=u-r,n*n+g*g}module.exports=simplify;\n},{}],13:[function(require,module,exports){\n\"use strict\";function createTile(e,n,r,i,t,u){for(var a={features:[],numPoints:0,numSimplified:0,numFeatures:0,source:null,x:r,y:i,z2:n,transformed:!1,min:[2,1],max:[-1,0]},m=0;ma.max[0]&&(a.max[0]=l[0]),l[1]>a.max[1]&&(a.max[1]=l[1])}return a}function addFeature(e,n,r,i){var t,u,a,m,s=n.geometry,l=n.type,o=[],f=r*r;if(1===l)for(t=0;tf)&&(d.push(m),e.numSimplified++),e.numPoints++;3===l&&rewind(d,a.outer),o.push(d)}else e.numPoints+=a.length;if(o.length){var g={geometry:o,type:l,tags:n.tags||null};null!==n.id&&(g.id=n.id),e.features.push(g)}}function rewind(e,n){var r=signedArea(e);r<0===n&&e.reverse()}function signedArea(e){for(var n,r,i=0,t=0,u=e.length,a=u-1;t=a[u+0]&&s>=a[u+1]?(n[f]=!0,h.push(l[f])):n[f]=!1}}},GridIndex.prototype._forEachCell=function(t,r,e,s,i,h,n){for(var o=this._convertToCellCoord(t),l=this._convertToCellCoord(r),a=this._convertToCellCoord(e),d=this._convertToCellCoord(s),f=o;f<=a;f++)for(var u=l;u<=d;u++){var y=this.d*u+f;if(i.call(this,t,r,e,s,y,h,n))return}},GridIndex.prototype._convertToCellCoord=function(t){return Math.max(0,Math.min(this.d-1,Math.floor(t*this.scale)+this.padding))},GridIndex.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var t=this.cells,r=NUM_PARAMS+this.cells.length+1+1,e=0,s=0;s>1,i=-7,N=t?h-1:0,n=t?-1:1,s=a[o+N];for(N+=n,M=s&(1<<-i)-1,s>>=-i,i+=w;i>0;M=256*M+a[o+N],N+=n,i-=8);for(p=M&(1<<-i)-1,M>>=-i,i+=r;i>0;p=256*p+a[o+N],N+=n,i-=8);if(0===M)M=1-e;else{if(M===f)return p?NaN:(s?-1:1)*(1/0);p+=Math.pow(2,r),M-=e}return(s?-1:1)*p*Math.pow(2,M-r)},exports.write=function(a,o,t,r,h,M){var p,w,f,e=8*M-h-1,i=(1<>1,n=23===h?Math.pow(2,-24)-Math.pow(2,-77):0,s=r?0:M-1,u=r?1:-1,l=o<0||0===o&&1/o<0?1:0;for(o=Math.abs(o),isNaN(o)||o===1/0?(w=isNaN(o)?1:0,p=i):(p=Math.floor(Math.log(o)/Math.LN2),o*(f=Math.pow(2,-p))<1&&(p--,f*=2),o+=p+N>=1?n/f:n*Math.pow(2,1-N),o*f>=2&&(p++,f/=2),p+N>=i?(w=0,p=i):p+N>=1?(w=(o*f-1)*Math.pow(2,h),p+=N):(w=o*Math.pow(2,N-1)*Math.pow(2,h),p=0));h>=8;a[t+s]=255&w,s+=u,w/=256,h-=8);for(p=p<0;a[t+s]=255&p,s+=u,p/=256,e-=8);a[t+s-u]|=128*l};\n},{}],18:[function(require,module,exports){\n\"use strict\";function kdbush(t,i,e,s,n){return new KDBush(t,i,e,s,n)}function KDBush(t,i,e,s,n){i=i||defaultGetX,e=e||defaultGetY,n=n||Array,this.nodeSize=s||64,this.points=t,this.ids=new n(t.length),this.coords=new n(2*t.length);for(var r=0;r=s&&a<=h&&t>=u&&t<=e&&f.push(p[i]);else{var c=Math.floor((g+v)/2);a=r[2*c],t=r[2*c+1],a>=s&&a<=h&&t>=u&&t<=e&&f.push(p[c]);var d=(l+1)%2;(0===l?s<=a:u<=t)&&(n.push(g),n.push(c-1),n.push(d)),(0===l?h>=a:e>=t)&&(n.push(c+1),n.push(v),n.push(d))}}return f}module.exports=range;\n},{}],20:[function(require,module,exports){\n\"use strict\";function sortKD(t,a,o,s,r,e){if(!(r-s<=o)){var f=Math.floor((s+r)/2);select(t,a,f,s,r,e%2),sortKD(t,a,o,s,f-1,e+1),sortKD(t,a,o,f+1,r,e+1)}}function select(t,a,o,s,r,e){for(;r>s;){if(r-s>600){var f=r-s+1,p=o-s+1,w=Math.log(f),m=.5*Math.exp(2*w/3),n=.5*Math.sqrt(w*m*(f-m)/f)*(p-f/2<0?-1:1),c=Math.max(s,Math.floor(o-p*m/f+n)),h=Math.min(r,Math.floor(o+(f-p)*m/f+n));select(t,a,o,c,h,e)}var i=a[2*o+e],l=s,M=r;for(swapItem(t,a,s,o),a[2*r+e]>i&&swapItem(t,a,s,r);li;)M--}a[2*s+e]===i?swapItem(t,a,s,M):(M++,swapItem(t,a,M,r)),M<=o&&(s=M+1),o<=M&&(r=M-1)}}function swapItem(t,a,o,s){swap(t,o,s),swap(a,2*o,2*s),swap(a,2*o+1,2*s+1)}function swap(t,a,o){var s=t[a];t[a]=t[o],t[o]=s}module.exports=sortKD;\n},{}],21:[function(require,module,exports){\n\"use strict\";function within(s,p,r,t,u,h){for(var i=[0,s.length-1,0],o=[],n=u*u;i.length;){var e=i.pop(),a=i.pop(),f=i.pop();if(a-f<=h)for(var v=f;v<=a;v++)sqDist(p[2*v],p[2*v+1],r,t)<=n&&o.push(s[v]);else{var l=Math.floor((f+a)/2),c=p[2*l],q=p[2*l+1];sqDist(c,q,r,t)<=n&&o.push(s[l]);var D=(e+1)%2;(0===e?r-u<=c:t-u<=q)&&(i.push(f),i.push(l-1),i.push(D)),(0===e?r+u>=c:t+u>=q)&&(i.push(l+1),i.push(a),i.push(D))}}return o}function sqDist(s,p,r,t){var u=s-r,h=p-t;return u*u+h*h}module.exports=within;\n},{}],22:[function(require,module,exports){\n\"use strict\";function isSupported(e){return!!(isBrowser()&&isArraySupported()&&isFunctionSupported()&&isObjectSupported()&&isJSONSupported()&&isWorkerSupported()&&isUint8ClampedArraySupported()&&isWebGLSupportedCached(e&&e.failIfMajorPerformanceCaveat))}function isBrowser(){return\"undefined\"!=typeof window&&\"undefined\"!=typeof document}function isArraySupported(){return Array.prototype&&Array.prototype.every&&Array.prototype.filter&&Array.prototype.forEach&&Array.prototype.indexOf&&Array.prototype.lastIndexOf&&Array.prototype.map&&Array.prototype.some&&Array.prototype.reduce&&Array.prototype.reduceRight&&Array.isArray}function isFunctionSupported(){return Function.prototype&&Function.prototype.bind}function isObjectSupported(){return Object.keys&&Object.create&&Object.getPrototypeOf&&Object.getOwnPropertyNames&&Object.isSealed&&Object.isFrozen&&Object.isExtensible&&Object.getOwnPropertyDescriptor&&Object.defineProperty&&Object.defineProperties&&Object.seal&&Object.freeze&&Object.preventExtensions}function isJSONSupported(){return\"JSON\"in window&&\"parse\"in JSON&&\"stringify\"in JSON}function isWorkerSupported(){return\"Worker\"in window}function isUint8ClampedArraySupported(){return\"Uint8ClampedArray\"in window}function isWebGLSupportedCached(e){return void 0===isWebGLSupportedCache[e]&&(isWebGLSupportedCache[e]=isWebGLSupported(e)),isWebGLSupportedCache[e]}function isWebGLSupported(e){var t=document.createElement(\"canvas\"),r=Object.create(isSupported.webGLContextAttributes);return r.failIfMajorPerformanceCaveat=e,t.probablySupportsContext?t.probablySupportsContext(\"webgl\",r)||t.probablySupportsContext(\"experimental-webgl\",r):t.supportsContext?t.supportsContext(\"webgl\",r)||t.supportsContext(\"experimental-webgl\",r):t.getContext(\"webgl\",r)||t.getContext(\"experimental-webgl\",r)}\"undefined\"!=typeof module&&module.exports?module.exports=isSupported:window&&(window.mapboxgl=window.mapboxgl||{},window.mapboxgl.supported=isSupported);var isWebGLSupportedCache={};isSupported.webGLContextAttributes={antialias:!1,alpha:!0,stencil:!0,depth:!0};\n},{}],23:[function(require,module,exports){\n(function (process){\nfunction normalizeArray(r,t){for(var e=0,n=r.length-1;n>=0;n--){var s=r[n];\".\"===s?r.splice(n,1):\"..\"===s?(r.splice(n,1),e++):e&&(r.splice(n,1),e--)}if(t)for(;e--;e)r.unshift(\"..\");return r}function filter(r,t){if(r.filter)return r.filter(t);for(var e=[],n=0;n=-1&&!t;e--){var n=e>=0?arguments[e]:process.cwd();if(\"string\"!=typeof n)throw new TypeError(\"Arguments to path.resolve must be strings\");n&&(r=n+\"/\"+r,t=\"/\"===n.charAt(0))}return r=normalizeArray(filter(r.split(\"/\"),function(r){return!!r}),!t).join(\"/\"),(t?\"/\":\"\")+r||\".\"},exports.normalize=function(r){var t=exports.isAbsolute(r),e=\"/\"===substr(r,-1);return r=normalizeArray(filter(r.split(\"/\"),function(r){return!!r}),!t).join(\"/\"),r||t||(r=\".\"),r&&e&&(r+=\"/\"),(t?\"/\":\"\")+r},exports.isAbsolute=function(r){return\"/\"===r.charAt(0)},exports.join=function(){var r=Array.prototype.slice.call(arguments,0);return exports.normalize(filter(r,function(r,t){if(\"string\"!=typeof r)throw new TypeError(\"Arguments to path.join must be strings\");return r}).join(\"/\"))},exports.relative=function(r,t){function e(r){for(var t=0;t=0&&\"\"===r[e];e--);return t>e?[]:r.slice(t,e-t+1)}r=exports.resolve(r).substr(1),t=exports.resolve(t).substr(1);for(var n=e(r.split(\"/\")),s=e(t.split(\"/\")),i=Math.min(n.length,s.length),o=i,u=0;u55295&&e<57344){if(!r){e>56319||o+1===n?i.push(239,191,189):r=e;continue}if(e<56320){i.push(239,191,189),r=e;continue}e=r-55296<<10|e-56320|65536,r=null}else r&&(i.push(239,191,189),r=null);e<128?i.push(e):e<2048?i.push(e>>6|192,63&e|128):e<65536?i.push(e>>12|224,e>>6&63|128,63&e|128):i.push(e>>18|240,e>>12&63|128,e>>6&63|128,63&e|128)}return i}module.exports=Buffer;var ieee754=require(\"ieee754\"),BufferMethods,lastStr,lastStrEncoded;BufferMethods={readUInt32LE:function(t){return(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},writeUInt32LE:function(t,e){this[e]=t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24},readInt32LE:function(t){return(this[t]|this[t+1]<<8|this[t+2]<<16)+(this[t+3]<<24)},readFloatLE:function(t){return ieee754.read(this,t,!0,23,4)},readDoubleLE:function(t){return ieee754.read(this,t,!0,52,8)},writeFloatLE:function(t,e){return ieee754.write(this,t,e,!0,23,4)},writeDoubleLE:function(t,e){return ieee754.write(this,t,e,!0,52,8)},toString:function(t,e,r){var n=\"\",i=\"\";e=e||0,r=Math.min(this.length,r||this.length);for(var o=e;o=1;){if(i.pos>=e)throw new Error(\"Given varint doesn't fit into 10 bytes\");var r=255&t;i.buf[i.pos++]=r|(t>=128?128:0),t/=128}}function reallocForRawMessage(t,i,e){var r=i<=16383?1:i<=2097151?2:i<=268435455?3:Math.ceil(Math.log(i)/(7*Math.LN2));e.realloc(r);for(var s=e.pos-1;s>=t;s--)e.buf[s+r]=e.buf[s]}function writePackedVarint(t,i){for(var e=0;e>3,n=this.pos;t(s,i,this),this.pos===n&&this.skip(r)}return i},readMessage:function(t,i){return this.readFields(t,i,this.readVarint()+this.pos)},readFixed32:function(){var t=this.buf.readUInt32LE(this.pos);return this.pos+=4,t},readSFixed32:function(){var t=this.buf.readInt32LE(this.pos);return this.pos+=4,t},readFixed64:function(){var t=this.buf.readUInt32LE(this.pos)+this.buf.readUInt32LE(this.pos+4)*SHIFT_LEFT_32;return this.pos+=8,t},readSFixed64:function(){var t=this.buf.readUInt32LE(this.pos)+this.buf.readInt32LE(this.pos+4)*SHIFT_LEFT_32;return this.pos+=8,t},readFloat:function(){var t=this.buf.readFloatLE(this.pos);return this.pos+=4,t},readDouble:function(){var t=this.buf.readDoubleLE(this.pos);return this.pos+=8,t},readVarint:function(){var t,i,e=this.buf;return i=e[this.pos++],t=127&i,i<128?t:(i=e[this.pos++],t|=(127&i)<<7,i<128?t:(i=e[this.pos++],t|=(127&i)<<14,i<128?t:(i=e[this.pos++],t|=(127&i)<<21,i<128?t:readVarintRemainder(t,this))))},readVarint64:function(){var t=this.pos,i=this.readVarint();if(i127;);else if(i===Pbf.Bytes)this.pos=this.readVarint()+this.pos;else if(i===Pbf.Fixed32)this.pos+=4;else{if(i!==Pbf.Fixed64)throw new Error(\"Unimplemented type: \"+i);this.pos+=8}},writeTag:function(t,i){this.writeVarint(t<<3|i)},realloc:function(t){for(var i=this.length||16;i268435455?void writeBigVarint(t,this):(this.realloc(4),this.buf[this.pos++]=127&t|(t>127?128:0),void(t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=t>>>7&127)))))},writeSVarint:function(t){this.writeVarint(t<0?2*-t-1:2*t)},writeBoolean:function(t){this.writeVarint(Boolean(t))},writeString:function(t){t=String(t);var i=Buffer.byteLength(t);this.writeVarint(i),this.realloc(i),this.buf.write(t,this.pos),this.pos+=i},writeFloat:function(t){this.realloc(4),this.buf.writeFloatLE(t,this.pos),this.pos+=4},writeDouble:function(t){this.realloc(8),this.buf.writeDoubleLE(t,this.pos),this.pos+=8},writeBytes:function(t){var i=t.length;this.writeVarint(i),this.realloc(i);for(var e=0;e=128&&reallocForRawMessage(e,r,this),this.pos=e-1,this.writeVarint(r),this.pos+=r},writeMessage:function(t,i,e){this.writeTag(t,Pbf.Bytes),this.writeRawMessage(i,e)},writePackedVarint:function(t,i){this.writeMessage(t,writePackedVarint,i)},writePackedSVarint:function(t,i){this.writeMessage(t,writePackedSVarint,i)},writePackedBoolean:function(t,i){this.writeMessage(t,writePackedBoolean,i)},writePackedFloat:function(t,i){this.writeMessage(t,writePackedFloat,i)},writePackedDouble:function(t,i){this.writeMessage(t,writePackedDouble,i)},writePackedFixed32:function(t,i){this.writeMessage(t,writePackedFixed32,i)},writePackedSFixed32:function(t,i){this.writeMessage(t,writePackedSFixed32,i)},writePackedFixed64:function(t,i){this.writeMessage(t,writePackedFixed64,i)},writePackedSFixed64:function(t,i){this.writeMessage(t,writePackedSFixed64,i)},writeBytesField:function(t,i){this.writeTag(t,Pbf.Bytes),this.writeBytes(i)},writeFixed32Field:function(t,i){this.writeTag(t,Pbf.Fixed32),this.writeFixed32(i)},writeSFixed32Field:function(t,i){this.writeTag(t,Pbf.Fixed32),this.writeSFixed32(i)},writeFixed64Field:function(t,i){this.writeTag(t,Pbf.Fixed64),this.writeFixed64(i)},writeSFixed64Field:function(t,i){this.writeTag(t,Pbf.Fixed64),this.writeSFixed64(i)},writeVarintField:function(t,i){this.writeTag(t,Pbf.Varint),this.writeVarint(i)},writeSVarintField:function(t,i){this.writeTag(t,Pbf.Varint),this.writeSVarint(i)},writeStringField:function(t,i){this.writeTag(t,Pbf.Bytes),this.writeString(i)},writeFloatField:function(t,i){this.writeTag(t,Pbf.Fixed32),this.writeFloat(i)},writeDoubleField:function(t,i){this.writeTag(t,Pbf.Fixed64),this.writeDouble(i)},writeBooleanField:function(t,i){this.writeVarintField(t,Boolean(i))}};\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n\n},{\"./buffer\":24}],26:[function(require,module,exports){\n\"use strict\";function Point(t,n){this.x=t,this.y=n}module.exports=Point,Point.prototype={clone:function(){return new Point(this.x,this.y)},add:function(t){return this.clone()._add(t)},sub:function(t){return this.clone()._sub(t)},mult:function(t){return this.clone()._mult(t)},div:function(t){return this.clone()._div(t)},rotate:function(t){return this.clone()._rotate(t)},matMult:function(t){return this.clone()._matMult(t)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(t){return this.x===t.x&&this.y===t.y},dist:function(t){return Math.sqrt(this.distSqr(t))},distSqr:function(t){var n=t.x-this.x,i=t.y-this.y;return n*n+i*i},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(t){return Math.atan2(this.y-t.y,this.x-t.x)},angleWith:function(t){return this.angleWithSep(t.x,t.y)},angleWithSep:function(t,n){return Math.atan2(this.x*n-this.y*t,this.x*t+this.y*n)},_matMult:function(t){var n=t[0]*this.x+t[1]*this.y,i=t[2]*this.x+t[3]*this.y;return this.x=n,this.y=i,this},_add:function(t){return this.x+=t.x,this.y+=t.y,this},_sub:function(t){return this.x-=t.x,this.y-=t.y,this},_mult:function(t){return this.x*=t,this.y*=t,this},_div:function(t){return this.x/=t,this.y/=t,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var t=this.y;return this.y=this.x,this.x=-t,this},_rotate:function(t){var n=Math.cos(t),i=Math.sin(t),s=n*this.x-i*this.y,r=i*this.x+n*this.y;return this.x=s,this.y=r,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},Point.convert=function(t){return t instanceof Point?t:Array.isArray(t)?new Point(t[0],t[1]):t};\n},{}],27:[function(require,module,exports){\nfunction defaultSetTimout(){throw new Error(\"setTimeout has not been defined\")}function defaultClearTimeout(){throw new Error(\"clearTimeout has not been defined\")}function runTimeout(e){if(cachedSetTimeout===setTimeout)return setTimeout(e,0);if((cachedSetTimeout===defaultSetTimout||!cachedSetTimeout)&&setTimeout)return cachedSetTimeout=setTimeout,setTimeout(e,0);try{return cachedSetTimeout(e,0)}catch(t){try{return cachedSetTimeout.call(null,e,0)}catch(t){return cachedSetTimeout.call(this,e,0)}}}function runClearTimeout(e){if(cachedClearTimeout===clearTimeout)return clearTimeout(e);if((cachedClearTimeout===defaultClearTimeout||!cachedClearTimeout)&&clearTimeout)return cachedClearTimeout=clearTimeout,clearTimeout(e);try{return cachedClearTimeout(e)}catch(t){try{return cachedClearTimeout.call(null,e)}catch(t){return cachedClearTimeout.call(this,e)}}}function cleanUpNextTick(){draining&¤tQueue&&(draining=!1,currentQueue.length?queue=currentQueue.concat(queue):queueIndex=-1,queue.length&&drainQueue())}function drainQueue(){if(!draining){var e=runTimeout(cleanUpNextTick);draining=!0;for(var t=queue.length;t;){for(currentQueue=queue,queue=[];++queueIndex1)for(var u=1;ur;){if(o-r>600){var f=o-r+1,e=t-r+1,l=Math.log(f),s=.5*Math.exp(2*l/3),i=.5*Math.sqrt(l*s*(f-s)/f)*(e-f/2<0?-1:1),n=Math.max(r,Math.floor(t-e*s/f+i)),h=Math.min(o,Math.floor(t+(f-e)*s/f+i));partialSort(a,t,n,h,p)}var u=a[t],M=r,w=o;for(swap(a,r,t),p(a[o],u)>0&&swap(a,r,o);M0;)w--}0===p(a[r],u)?swap(a,r,w):(w++,swap(a,w,o)),w<=t&&(r=w+1),t<=w&&(o=w-1)}}function swap(a,t,r){var o=a[t];a[t]=a[r],a[r]=o}function defaultCompare(a,t){return at?1:0}module.exports=partialSort;\n},{}],29:[function(require,module,exports){\n\"use strict\";function supercluster(t){return new SuperCluster(t)}function SuperCluster(t){this.options=extend(Object.create(this.options),t),this.trees=new Array(this.options.maxZoom+1)}function createCluster(t,e,o,n){return{x:t,y:e,zoom:1/0,id:n,numPoints:o}}function createPointCluster(t,e){var o=t.geometry.coordinates;return createCluster(lngX(o[0]),latY(o[1]),1,e)}function getClusterJSON(t){return{type:\"Feature\",properties:getClusterProperties(t),geometry:{type:\"Point\",coordinates:[xLng(t.x),yLat(t.y)]}}}function getClusterProperties(t){var e=t.numPoints,o=e>=1e4?Math.round(e/1e3)+\"k\":e>=1e3?Math.round(e/100)/10+\"k\":e;return{cluster:!0,point_count:e,point_count_abbreviated:o}}function lngX(t){return t/360+.5}function latY(t){var e=Math.sin(t*Math.PI/180),o=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return o<0?0:o>1?1:o}function xLng(t){return 360*(t-.5)}function yLat(t){var e=(180-360*t)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}function extend(t,e){for(var o in e)t[o]=e[o];return t}function getX(t){return t.x}function getY(t){return t.y}var kdbush=require(\"kdbush\");module.exports=supercluster,SuperCluster.prototype={options:{minZoom:0,maxZoom:16,radius:40,extent:512,nodeSize:64,log:!1},load:function(t){var e=this.options.log;e&&console.time(\"total time\");var o=\"prepare \"+t.length+\" points\";e&&console.time(o),this.points=t;var n=t.map(createPointCluster);e&&console.timeEnd(o);for(var r=this.options.maxZoom;r>=this.options.minZoom;r--){var i=+Date.now();this.trees[r+1]=kdbush(n,getX,getY,this.options.nodeSize,Float32Array),n=this._cluster(n,r),e&&console.log(\"z%d: %d clusters in %dms\",r,n.length,+Date.now()-i)}return this.trees[this.options.minZoom]=kdbush(n,getX,getY,this.options.nodeSize,Float32Array),e&&console.timeEnd(\"total time\"),this},getClusters:function(t,e){for(var o=this.trees[this._limitZoom(e)],n=o.range(lngX(t[0]),latY(t[3]),lngX(t[2]),latY(t[1])),r=[],i=0;i=0;a--)this._down(a)}function defaultCompare(t,i){return ti?1:0}function swap(t,i,a){var n=t[i];t[i]=t[a],t[a]=n}module.exports=TinyQueue,TinyQueue.prototype={push:function(t){this.data.push(t),this.length++,this._up(this.length-1)},pop:function(){var t=this.data[0];return this.data[0]=this.data[this.length-1],this.length--,this.data.pop(),this._down(0),t},peek:function(){return this.data[0]},_up:function(t){for(var i=this.data,a=this.compare;t>0;){var n=Math.floor((t-1)/2);if(!(a(i[t],i[n])<0))break;swap(i,n,t),t=n}},_down:function(t){for(var i=this.data,a=this.compare,n=this.length;;){var e=2*t+1,h=e+1,s=t;if(e=3&&(t.depth=arguments[2]),arguments.length>=4&&(t.colors=arguments[3]),isBoolean(r)?t.showHidden=r:r&&exports._extend(t,r),isUndefined(t.showHidden)&&(t.showHidden=!1),isUndefined(t.depth)&&(t.depth=2),isUndefined(t.colors)&&(t.colors=!1),isUndefined(t.customInspect)&&(t.customInspect=!0),t.colors&&(t.stylize=stylizeWithColor),formatValue(t,e,t.depth)}function stylizeWithColor(e,r){var t=inspect.styles[r];return t?\"\u001b[\"+inspect.colors[t][0]+\"m\"+e+\"\u001b[\"+inspect.colors[t][1]+\"m\":e}function stylizeNoColor(e,r){return e}function arrayToHash(e){var r={};return e.forEach(function(e,t){r[e]=!0}),r}function formatValue(e,r,t){if(e.customInspect&&r&&isFunction(r.inspect)&&r.inspect!==exports.inspect&&(!r.constructor||r.constructor.prototype!==r)){var n=r.inspect(t,e);return isString(n)||(n=formatValue(e,n,t)),n}var i=formatPrimitive(e,r);if(i)return i;var o=Object.keys(r),s=arrayToHash(o);if(e.showHidden&&(o=Object.getOwnPropertyNames(r)),isError(r)&&(o.indexOf(\"message\")>=0||o.indexOf(\"description\")>=0))return formatError(r);if(0===o.length){if(isFunction(r)){var u=r.name?\": \"+r.name:\"\";return e.stylize(\"[Function\"+u+\"]\",\"special\")}if(isRegExp(r))return e.stylize(RegExp.prototype.toString.call(r),\"regexp\");if(isDate(r))return e.stylize(Date.prototype.toString.call(r),\"date\");if(isError(r))return formatError(r)}var c=\"\",a=!1,l=[\"{\",\"}\"];if(isArray(r)&&(a=!0,l=[\"[\",\"]\"]),isFunction(r)){var p=r.name?\": \"+r.name:\"\";c=\" [Function\"+p+\"]\"}if(isRegExp(r)&&(c=\" \"+RegExp.prototype.toString.call(r)),isDate(r)&&(c=\" \"+Date.prototype.toUTCString.call(r)),isError(r)&&(c=\" \"+formatError(r)),0===o.length&&(!a||0==r.length))return l[0]+c+l[1];if(t<0)return isRegExp(r)?e.stylize(RegExp.prototype.toString.call(r),\"regexp\"):e.stylize(\"[Object]\",\"special\");e.seen.push(r);var f;return f=a?formatArray(e,r,t,s,o):o.map(function(n){return formatProperty(e,r,t,s,n,a)}),e.seen.pop(),reduceToSingleString(f,c,l)}function formatPrimitive(e,r){if(isUndefined(r))return e.stylize(\"undefined\",\"undefined\");if(isString(r)){var t=\"'\"+JSON.stringify(r).replace(/^\"|\"$/g,\"\").replace(/'/g,\"\\\\'\").replace(/\\\\\"/g,'\"')+\"'\";return e.stylize(t,\"string\")}return isNumber(r)?e.stylize(\"\"+r,\"number\"):isBoolean(r)?e.stylize(\"\"+r,\"boolean\"):isNull(r)?e.stylize(\"null\",\"null\"):void 0}function formatError(e){return\"[\"+Error.prototype.toString.call(e)+\"]\"}function formatArray(e,r,t,n,i){for(var o=[],s=0,u=r.length;s-1&&(u=o?u.split(\"\\n\").map(function(e){return\" \"+e}).join(\"\\n\").substr(2):\"\\n\"+u.split(\"\\n\").map(function(e){return\" \"+e}).join(\"\\n\"))):u=e.stylize(\"[Circular]\",\"special\")),isUndefined(s)){if(o&&i.match(/^\\d+$/))return u;s=JSON.stringify(\"\"+i),s.match(/^\"([a-zA-Z_][a-zA-Z_0-9]*)\"$/)?(s=s.substr(1,s.length-2),s=e.stylize(s,\"name\")):(s=s.replace(/'/g,\"\\\\'\").replace(/\\\\\"/g,'\"').replace(/(^\"|\"$)/g,\"'\"),s=e.stylize(s,\"string\"))}return s+\": \"+u}function reduceToSingleString(e,r,t){var n=0,i=e.reduce(function(e,r){return n++,r.indexOf(\"\\n\")>=0&&n++,e+r.replace(/\\u001b\\[\\d\\d?m/g,\"\").length+1},0);return i>60?t[0]+(\"\"===r?\"\":r+\"\\n \")+\" \"+e.join(\",\\n \")+\" \"+t[1]:t[0]+r+\" \"+e.join(\", \")+\" \"+t[1]}function isArray(e){return Array.isArray(e)}function isBoolean(e){return\"boolean\"==typeof e}function isNull(e){return null===e}function isNullOrUndefined(e){return null==e}function isNumber(e){return\"number\"==typeof e}function isString(e){return\"string\"==typeof e}function isSymbol(e){return\"symbol\"==typeof e}function isUndefined(e){return void 0===e}function isRegExp(e){return isObject(e)&&\"[object RegExp]\"===objectToString(e)}function isObject(e){return\"object\"==typeof e&&null!==e}function isDate(e){return isObject(e)&&\"[object Date]\"===objectToString(e)}function isError(e){return isObject(e)&&(\"[object Error]\"===objectToString(e)||e instanceof Error)}function isFunction(e){return\"function\"==typeof e}function isPrimitive(e){return null===e||\"boolean\"==typeof e||\"number\"==typeof e||\"string\"==typeof e||\"symbol\"==typeof e||\"undefined\"==typeof e}function objectToString(e){return Object.prototype.toString.call(e)}function pad(e){return e<10?\"0\"+e.toString(10):e.toString(10)}function timestamp(){var e=new Date,r=[pad(e.getHours()),pad(e.getMinutes()),pad(e.getSeconds())].join(\":\");return[e.getDate(),months[e.getMonth()],r].join(\" \")}function hasOwnProperty(e,r){return Object.prototype.hasOwnProperty.call(e,r)}var formatRegExp=/%[sdj%]/g;exports.format=function(e){if(!isString(e)){for(var r=[],t=0;t=i)return e;switch(e){case\"%s\":return String(n[t++]);case\"%d\":return Number(n[t++]);case\"%j\":try{return JSON.stringify(n[t++])}catch(e){return\"[Circular]\"}default:return e}}),s=n[t];t>3}if(a--,1===i||2===i)o+=e.readSVarint(),n+=e.readSVarint(),1===i&&(t&&s.push(t),t=[]),t.push(new Point(o,n));else{if(7!==i)throw new Error(\"unknown command \"+i);t&&t.push(t[0].clone())}}return t&&s.push(t),s},VectorTileFeature.prototype.bbox=function(){var e=this._pbf;e.pos=this._geometry;for(var t=e.readVarint()+e.pos,r=1,i=0,a=0,o=0,n=1/0,s=-(1/0),p=1/0,h=-(1/0);e.pos>3}if(i--,1===r||2===r)a+=e.readSVarint(),o+=e.readSVarint(),as&&(s=a),oh&&(h=o);else if(7!==r)throw new Error(\"unknown command \"+r)}return[n,p,s,h]},VectorTileFeature.prototype.toGeoJSON=function(e,t,r){function i(e){for(var t=0;t>3;t=1===a?e.readString():2===a?e.readFloat():3===a?e.readDouble():4===a?e.readVarint64():5===a?e.readVarint():6===a?e.readSVarint():7===a?e.readBoolean():null}return t}var VectorTileFeature=require(\"./vectortilefeature.js\");module.exports=VectorTileLayer,VectorTileLayer.prototype.feature=function(e){if(e<0||e>=this._features.length)throw new Error(\"feature index out of bounds\");this._pbf.pos=this._features[e];var t=this._pbf.readVarint()+this._pbf.pos;return new VectorTileFeature(this._pbf,t,this.extent,this._keys,this._values)};\n},{\"./vectortilefeature.js\":36}],38:[function(require,module,exports){\nfunction fromVectorTileJs(e){var r=[];for(var o in e.layers)r.push(prepareLayer(e.layers[o]));var t=new Pbf;return vtpb.tile.write({layers:r},t),t.finish()}function fromGeojsonVt(e){var r={};for(var o in e)r[o]=new GeoJSONWrapper(e[o].features),r[o].name=o;return fromVectorTileJs({layers:r})}function prepareLayer(e){for(var r={name:e.name||\"\",version:e.version||1,extent:e.extent||4096,keys:[],values:[],features:[]},o={},t={},n=0;n>31}function encodeGeometry(e){for(var r=[],o=0,t=0,n=e.length,a=0;aArrayGroup.MAX_VERTEX_ARRAY_LENGTH)&&(e=new Segment(this.layoutVertexArray.length,this.elementArray.length),this.segments.push(e)),e},ArrayGroup.prototype.prepareSegment2=function(r){var e=this.segments2[this.segments2.length-1];return(!e||e.vertexLength+r>ArrayGroup.MAX_VERTEX_ARRAY_LENGTH)&&(e=new Segment(this.layoutVertexArray.length,this.elementArray2.length),this.segments2.push(e)),e},ArrayGroup.prototype.populatePaintArrays=function(r){var e=this;for(var t in e.layerData){var a=e.layerData[t];0!==a.paintVertexArray.bytesPerElement&&a.programConfiguration.populatePaintArray(a.layer,a.paintVertexArray,a.paintPropertyStatistics,e.layoutVertexArray.length,e.globalProperties,r)}},ArrayGroup.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},ArrayGroup.prototype.serialize=function(r){return{layoutVertexArray:this.layoutVertexArray.serialize(r),elementArray:this.elementArray&&this.elementArray.serialize(r),elementArray2:this.elementArray2&&this.elementArray2.serialize(r),paintVertexArrays:serializePaintVertexArrays(this.layerData,r),segments:this.segments,segments2:this.segments2}},ArrayGroup.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,module.exports=ArrayGroup;\n},{\"./program_configuration\":58}],45:[function(require,module,exports){\n\"use strict\";var ArrayGroup=require(\"./array_group\"),BufferGroup=require(\"./buffer_group\"),util=require(\"../util/util\"),Bucket=function(r,t){this.zoom=r.zoom,this.overscaling=r.overscaling,this.layers=r.layers,this.index=r.index,r.arrays?this.buffers=new BufferGroup(t,r.layers,r.zoom,r.arrays):this.arrays=new ArrayGroup(t,r.layers,r.zoom)};Bucket.prototype.populate=function(r,t){for(var e=this,i=0,a=r;i=EXTENT||o<0||o>=EXTENT)){var n=r.prepareSegment(4),u=n.vertexLength;addCircleVertex(r.layoutVertexArray,y,o,-1,-1),addCircleVertex(r.layoutVertexArray,y,o,1,-1),addCircleVertex(r.layoutVertexArray,y,o,1,1),addCircleVertex(r.layoutVertexArray,y,o,-1,1),r.elementArray.emplaceBack(u,u+1,u+2),r.elementArray.emplaceBack(u,u+3,u+2),n.vertexLength+=4,n.primitiveLength+=2}}r.populatePaintArrays(e.properties)},r}(Bucket);CircleBucket.programInterface=circleInterface,module.exports=CircleBucket;\n},{\"../bucket\":45,\"../element_array_type\":53,\"../extent\":54,\"../load_geometry\":56,\"../vertex_array_type\":60}],47:[function(require,module,exports){\n\"use strict\";var Bucket=require(\"../bucket\"),createVertexArrayType=require(\"../vertex_array_type\"),createElementArrayType=require(\"../element_array_type\"),loadGeometry=require(\"../load_geometry\"),earcut=require(\"earcut\"),classifyRings=require(\"../../util/classify_rings\"),EARCUT_MAX_RINGS=500,fillInterface={layoutVertexArrayType:createVertexArrayType([{name:\"a_pos\",components:2,type:\"Int16\"}]),elementArrayType:createElementArrayType(3),elementArrayType2:createElementArrayType(2),paintAttributes:[{property:\"fill-color\",type:\"Uint8\"},{property:\"fill-outline-color\",type:\"Uint8\"},{property:\"fill-opacity\",type:\"Uint8\",multiplier:255}]},FillBucket=function(e){function r(r){e.call(this,r,fillInterface)}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.addFeature=function(e){for(var r=this.arrays,t=0,a=classifyRings(loadGeometry(e),EARCUT_MAX_RINGS);tEXTENT)||e.y===r.y&&(e.y<0||e.y>EXTENT)}var Bucket=require(\"../bucket\"),createVertexArrayType=require(\"../vertex_array_type\"),createElementArrayType=require(\"../element_array_type\"),loadGeometry=require(\"../load_geometry\"),EXTENT=require(\"../extent\"),earcut=require(\"earcut\"),classifyRings=require(\"../../util/classify_rings\"),EARCUT_MAX_RINGS=500,fillExtrusionInterface={layoutVertexArrayType:createVertexArrayType([{name:\"a_pos\",components:2,type:\"Int16\"},{name:\"a_normal\",components:3,type:\"Int16\"},{name:\"a_edgedistance\",components:1,type:\"Int16\"}]),elementArrayType:createElementArrayType(3),paintAttributes:[{property:\"fill-extrusion-base\",type:\"Uint16\"},{property:\"fill-extrusion-height\",type:\"Uint16\"},{property:\"fill-extrusion-color\",type:\"Uint8\"}]},FACTOR=Math.pow(2,13),FillExtrusionBucket=function(e){function r(r){e.call(this,r,fillExtrusionInterface)}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.addFeature=function(e){for(var r=this.arrays,t=0,a=classifyRings(loadGeometry(e),EARCUT_MAX_RINGS);t=1){var A=d[h-1];if(!isBoundaryEdge(g,A)){var _=g.sub(A)._perp()._unit();addVertex(r.layoutVertexArray,g.x,g.y,_.x,_.y,0,0,m),addVertex(r.layoutVertexArray,g.x,g.y,_.x,_.y,0,1,m),m+=A.dist(g),addVertex(r.layoutVertexArray,A.x,A.y,_.x,_.y,0,0,m),addVertex(r.layoutVertexArray,A.x,A.y,_.x,_.y,0,1,m);var v=p.vertexLength;r.elementArray.emplaceBack(v,v+1,v+2),r.elementArray.emplaceBack(v+1,v+2,v+3),p.vertexLength+=4,p.primitiveLength+=2}}u.push(g.x),u.push(g.y)}}}for(var E=earcut(u,c),T=0;T>6)}var Bucket=require(\"../bucket\"),createVertexArrayType=require(\"../vertex_array_type\"),createElementArrayType=require(\"../element_array_type\"),loadGeometry=require(\"../load_geometry\"),EXTENT=require(\"../extent\"),VectorTileFeature=require(\"vector-tile\").VectorTileFeature,EXTRUDE_SCALE=63,COS_HALF_SHARP_CORNER=Math.cos(37.5*(Math.PI/180)),SHARP_CORNER_OFFSET=15,LINE_DISTANCE_BUFFER_BITS=15,LINE_DISTANCE_SCALE=.5,MAX_LINE_DISTANCE=Math.pow(2,LINE_DISTANCE_BUFFER_BITS-1)/LINE_DISTANCE_SCALE,lineInterface={layoutVertexArrayType:createVertexArrayType([{name:\"a_pos\",components:2,type:\"Int16\"},{name:\"a_data\",components:4,type:\"Uint8\"}]),paintAttributes:[{property:\"line-color\",type:\"Uint8\"},{property:\"line-blur\",multiplier:10,type:\"Uint8\"},{property:\"line-opacity\",multiplier:10,type:\"Uint8\"},{property:\"line-gap-width\",multiplier:10,type:\"Uint8\",name:\"a_gapwidth\"},{property:\"line-offset\",multiplier:1,type:\"Int8\"}],elementArrayType:createElementArrayType()},LineBucket=function(e){function t(t){e.call(this,t,lineInterface)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.addFeature=function(e){for(var t=this,r=this.layers[0].layout,i=r[\"line-join\"],a=r[\"line-cap\"],n=r[\"line-miter-limit\"],d=r[\"line-round-limit\"],s=0,u=loadGeometry(e,LINE_DISTANCE_BUFFER_BITS);s=2&&e[l-1].equals(e[l-2]);)l--;if(!(l<(u?3:2))){\"bevel\"===r&&(a=1.05);var o=SHARP_CORNER_OFFSET*(EXTENT/(512*this.overscaling)),p=e[0],c=this.arrays,_=c.prepareSegment(10*l);this.distance=0;var y,h,m,E,x,C,v,A=i,f=u?\"butt\":i,L=!0;this.e1=this.e2=this.e3=-1,u&&(y=e[l-2],x=p.sub(y)._unit()._perp());for(var V=0;V0){var b=y.dist(h);if(b>2*o){var R=y.sub(y.sub(h)._mult(o/b)._round());d.distance+=R.dist(h),d.addCurrentVertex(R,d.distance,E.mult(1),0,0,!1,_),h=R}}var g=h&&m,F=g?r:m?A:f;if(g&&\"round\"===F&&(Ia&&(F=\"bevel\"),\"bevel\"===F&&(I>2&&(F=\"flipbevel\"),I100)S=x.clone().mult(-1);else{var B=E.x*x.y-E.y*x.x>0?-1:1,k=I*E.add(x).mag()/E.sub(x).mag();S._perp()._mult(k*B)}d.addCurrentVertex(y,d.distance,S,0,0,!1,_),d.addCurrentVertex(y,d.distance,S.mult(-1),0,0,!1,_)}else if(\"bevel\"===F||\"fakeround\"===F){var D=E.x*x.y-E.y*x.x>0,P=-Math.sqrt(I*I-1);if(D?(v=0,C=P):(C=0,v=P),L||d.addCurrentVertex(y,d.distance,E,C,v,!1,_),\"fakeround\"===F){for(var U=Math.floor(8*(.5-(T-.5))),q=void 0,M=0;M=0;O--)q=E.mult((O+1)/(U+1))._add(x)._unit(),d.addPieSliceVertex(y,d.distance,q,D,_)}m&&d.addCurrentVertex(y,d.distance,x,-C,-v,!1,_)}else\"butt\"===F?(L||d.addCurrentVertex(y,d.distance,E,0,0,!1,_),m&&d.addCurrentVertex(y,d.distance,x,0,0,!1,_)):\"square\"===F?(L||(d.addCurrentVertex(y,d.distance,E,1,1,!1,_),d.e1=d.e2=-1),m&&d.addCurrentVertex(y,d.distance,x,-1,-1,!1,_)):\"round\"===F&&(L||(d.addCurrentVertex(y,d.distance,E,0,0,!1,_),d.addCurrentVertex(y,d.distance,E,1,1,!0,_),d.e1=d.e2=-1),m&&(d.addCurrentVertex(y,d.distance,x,-1,-1,!0,_),d.addCurrentVertex(y,d.distance,x,0,0,!1,_)));if(N&&V2*o){var H=y.add(m.sub(y)._mult(o/X)._round());d.distance+=H.dist(y),d.addCurrentVertex(H,d.distance,x.mult(1),0,0,!1,_),y=H}}L=!1}c.populatePaintArrays(s)}},t.prototype.addCurrentVertex=function(e,t,r,i,a,n,d){var s,u=n?1:0,l=this.arrays,o=l.layoutVertexArray,p=l.elementArray;s=r.clone(),i&&s._sub(r.perp()._mult(i)),addLineVertex(o,e,s,u,0,i,t),this.e3=d.vertexLength++,this.e1>=0&&this.e2>=0&&(p.emplaceBack(this.e1,this.e2,this.e3),d.primitiveLength++),this.e1=this.e2,this.e2=this.e3,s=r.mult(-1),a&&s._sub(r.perp()._mult(a)),addLineVertex(o,e,s,u,1,-a,t),this.e3=d.vertexLength++,this.e1>=0&&this.e2>=0&&(p.emplaceBack(this.e1,this.e2,this.e3),d.primitiveLength++),this.e1=this.e2,this.e2=this.e3,t>MAX_LINE_DISTANCE/2&&(this.distance=0,this.addCurrentVertex(e,this.distance,r,i,a,n,d))},t.prototype.addPieSliceVertex=function(e,t,r,i,a){var n=i?1:0;r=r.mult(i?-1:1);var d=this.arrays,s=d.layoutVertexArray,u=d.elementArray;addLineVertex(s,e,r,0,n,0,t),this.e3=a.vertexLength++,this.e1>=0&&this.e2>=0&&(u.emplaceBack(this.e1,this.e2,this.e3),a.primitiveLength++),i?this.e2=this.e3:this.e1=this.e3},t}(Bucket);LineBucket.programInterface=lineInterface,module.exports=LineBucket;\n},{\"../bucket\":45,\"../element_array_type\":53,\"../extent\":54,\"../load_geometry\":56,\"../vertex_array_type\":60,\"vector-tile\":34}],50:[function(require,module,exports){\n\"use strict\";function addVertex(e,t,o,r,a,i,n,l,s,c,y){e.emplaceBack(t,o,Math.round(64*r),Math.round(64*a),i/4,n/4,10*(c||0),y,10*(l||0),10*Math.min(s||25,25))}function addCollisionBoxVertex(e,t,o,r,a){return e.emplaceBack(t.x,t.y,Math.round(o.x),Math.round(o.y),10*r,10*a)}var Point=require(\"point-geometry\"),ArrayGroup=require(\"../array_group\"),BufferGroup=require(\"../buffer_group\"),createVertexArrayType=require(\"../vertex_array_type\"),createElementArrayType=require(\"../element_array_type\"),EXTENT=require(\"../extent\"),Anchor=require(\"../../symbol/anchor\"),getAnchors=require(\"../../symbol/get_anchors\"),resolveTokens=require(\"../../util/token\"),Quads=require(\"../../symbol/quads\"),Shaping=require(\"../../symbol/shaping\"),resolveText=require(\"../../symbol/resolve_text\"),mergeLines=require(\"../../symbol/mergelines\"),clipLine=require(\"../../symbol/clip_line\"),util=require(\"../../util/util\"),scriptDetection=require(\"../../util/script_detection\"),loadGeometry=require(\"../load_geometry\"),CollisionFeature=require(\"../../symbol/collision_feature\"),findPoleOfInaccessibility=require(\"../../util/find_pole_of_inaccessibility\"),classifyRings=require(\"../../util/classify_rings\"),VectorTileFeature=require(\"vector-tile\").VectorTileFeature,rtlTextPlugin=require(\"../../source/rtl_text_plugin\"),shapeText=Shaping.shapeText,shapeIcon=Shaping.shapeIcon,WritingMode=Shaping.WritingMode,getGlyphQuads=Quads.getGlyphQuads,getIconQuads=Quads.getIconQuads,elementArrayType=createElementArrayType(),layoutVertexArrayType=createVertexArrayType([{name:\"a_pos_offset\",components:4,type:\"Int16\"},{name:\"a_texture_pos\",components:2,type:\"Uint16\"},{name:\"a_data\",components:4,type:\"Uint8\"}]),symbolInterfaces={glyph:{layoutVertexArrayType:layoutVertexArrayType,elementArrayType:elementArrayType,paintAttributes:[{name:\"a_fill_color\",property:\"text-color\",type:\"Uint8\"},{name:\"a_halo_color\",property:\"text-halo-color\",type:\"Uint8\"},{name:\"a_halo_width\",property:\"text-halo-width\",type:\"Uint16\",multiplier:10},{name:\"a_halo_blur\",property:\"text-halo-blur\",type:\"Uint16\",multiplier:10},{name:\"a_opacity\",property:\"text-opacity\",type:\"Uint8\",multiplier:255}]},icon:{layoutVertexArrayType:layoutVertexArrayType,elementArrayType:elementArrayType,paintAttributes:[{name:\"a_fill_color\",property:\"icon-color\",type:\"Uint8\"},{name:\"a_halo_color\",property:\"icon-halo-color\",type:\"Uint8\"},{name:\"a_halo_width\",property:\"icon-halo-width\",type:\"Uint16\",multiplier:10},{name:\"a_halo_blur\",property:\"icon-halo-blur\",type:\"Uint16\",multiplier:10},{name:\"a_opacity\",property:\"icon-opacity\",type:\"Uint8\",multiplier:255}]},collisionBox:{layoutVertexArrayType:createVertexArrayType([{name:\"a_pos\",components:2,type:\"Int16\"},{name:\"a_extrude\",components:2,type:\"Int16\"},{name:\"a_data\",components:2,type:\"Uint8\"}]),elementArrayType:createElementArrayType(2)}},SymbolBucket=function(e){var t=this;if(this.collisionBoxArray=e.collisionBoxArray,this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.index=e.index,this.sdfIcons=e.sdfIcons,this.iconsNeedLinear=e.iconsNeedLinear,this.adjustedTextSize=e.adjustedTextSize,this.adjustedIconSize=e.adjustedIconSize,this.fontstack=e.fontstack,e.arrays){this.buffers={};for(var o in e.arrays)e.arrays[o]&&(t.buffers[o]=new BufferGroup(symbolInterfaces[o],e.layers,e.zoom,e.arrays[o]))}};SymbolBucket.prototype.populate=function(e,t){var o=this,r=this.layers[0],a=r.layout,i=a[\"text-font\"],n=a[\"icon-image\"],l=i&&(!r.isLayoutValueFeatureConstant(\"text-field\")||a[\"text-field\"]),s=n;if(this.features=[],l||s){for(var c=t.iconDependencies,y=t.glyphDependencies,p=y[i]=y[i]||{},x=0;xEXTENT||i.y<0||i.y>EXTENT);if(!x||n){var l=n||f;r.addSymbolInstance(i,a,t,o,r.layers[0],l,r.collisionBoxArray,e.index,e.sourceLayerIndex,r.index,s,h,m,y,u,g,{zoom:r.zoom},e.properties)}};if(\"line\"===b)for(var S=0,T=clipLine(e.geometry,0,0,EXTENT,EXTENT);S=0;i--)if(o.dist(a[i])7*Math.PI/4)continue}else if(r&&a&&d<=3*Math.PI/4||d>5*Math.PI/4)continue}else if(r&&a&&(d<=Math.PI/2||d>3*Math.PI/2))continue;var m=u.tl,g=u.tr,f=u.bl,b=u.br,v=u.tex,I=u.anchorPoint,S=Math.max(y+Math.log(u.minScale)/Math.LN2,p),T=Math.min(y+Math.log(u.maxScale)/Math.LN2,25);if(!(T<=S)){S===p&&(S=0);var M=Math.round(u.glyphAngle/(2*Math.PI)*256),B=e.prepareSegment(4),A=B.vertexLength;addVertex(c,I.x,I.y,m.x,m.y,v.x,v.y,S,T,p,M),addVertex(c,I.x,I.y,g.x,g.y,v.x+v.w,v.y,S,T,p,M),addVertex(c,I.x,I.y,f.x,f.y,v.x,v.y+v.h,S,T,p,M),addVertex(c,I.x,I.y,b.x,b.y,v.x+v.w,v.y+v.h,S,T,p,M),s.emplaceBack(A,A+1,A+2),s.emplaceBack(A+1,A+2,A+3),B.vertexLength+=4,B.primitiveLength+=2}}e.populatePaintArrays(n)},SymbolBucket.prototype.addToDebugBuffers=function(e){for(var t=this,o=this.arrays.collisionBox,r=o.layoutVertexArray,a=o.elementArray,i=-e.angle,n=e.yStretch,l=0,s=t.symbolInstances;lSymbolBucket.MAX_INSTANCES&&util.warnOnce(\"Too many symbols being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907\"),z>SymbolBucket.MAX_INSTANCES&&util.warnOnce(\"Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907\");var _=(o[WritingMode.vertical]?WritingMode.vertical:0)|(o[WritingMode.horizontal]?WritingMode.horizontal:0);this.symbolInstances.push({textBoxStartIndex:M,textBoxEndIndex:B,iconBoxStartIndex:A,iconBoxEndIndex:z,glyphQuads:I,iconQuads:v,anchor:e,featureIndex:l,featureProperties:g,writingModes:_})},SymbolBucket.programInterfaces=symbolInterfaces,SymbolBucket.MAX_INSTANCES=65535,module.exports=SymbolBucket;\n},{\"../../source/rtl_text_plugin\":90,\"../../symbol/anchor\":157,\"../../symbol/clip_line\":159,\"../../symbol/collision_feature\":161,\"../../symbol/get_anchors\":163,\"../../symbol/mergelines\":166,\"../../symbol/quads\":167,\"../../symbol/resolve_text\":168,\"../../symbol/shaping\":169,\"../../util/classify_rings\":195,\"../../util/find_pole_of_inaccessibility\":201,\"../../util/script_detection\":209,\"../../util/token\":211,\"../../util/util\":212,\"../array_group\":44,\"../buffer_group\":52,\"../element_array_type\":53,\"../extent\":54,\"../load_geometry\":56,\"../vertex_array_type\":60,\"point-geometry\":26,\"vector-tile\":34}],51:[function(require,module,exports){\n\"use strict\";var AttributeType={Int8:\"BYTE\",Uint8:\"UNSIGNED_BYTE\",Int16:\"SHORT\",Uint16:\"UNSIGNED_SHORT\"},Buffer=function(e,t,r){this.arrayBuffer=e.arrayBuffer,this.length=e.length,this.attributes=t.members,this.itemSize=t.bytesPerElement,this.type=r,this.arrayType=t};Buffer.fromStructArray=function(e,t){return new Buffer(e.serialize(),e.constructor.serialize(),t)},Buffer.prototype.bind=function(e){var t=e[this.type];this.buffer?e.bindBuffer(t,this.buffer):(this.gl=e,this.buffer=e.createBuffer(),e.bindBuffer(t,this.buffer),e.bufferData(t,this.arrayBuffer,e.STATIC_DRAW),this.arrayBuffer=null)},Buffer.prototype.setVertexAttribPointers=function(e,t,r){for(var f=this,i=0;i0?t+2*e:e}function translate(e,t,r,i,a){if(!t[0]&&!t[1])return e;t=Point.convert(t),\"viewport\"===r&&t._rotate(-i);for(var n=[],s=0;sr.max||d.yr.max)&&util.warnOnce(\"Geometry exceeds allowed extent, reduce your vector tile buffer size\")}return u};\n},{\"../util/util\":212,\"./extent\":54}],57:[function(require,module,exports){\n\"use strict\";var createStructArrayType=require(\"../util/struct_array\"),PosArray=createStructArrayType({members:[{name:\"a_pos\",type:\"Int16\",components:2}]});module.exports=PosArray;\n},{\"../util/struct_array\":210}],58:[function(require,module,exports){\n\"use strict\";function getPaintAttributeValue(t,r,e,i){if(!t.zoomStops)return r.getPaintValue(t.property,e,i);var a=t.zoomStops.map(function(a){return r.getPaintValue(t.property,util.extend({},e,{zoom:a}),i)});return 1===a.length?a[0]:a}function normalizePaintAttribute(t,r){var e=t.name;e||(e=t.property.replace(r.type+\"-\",\"\").replace(/-/g,\"_\"));var i=\"color\"===r._paintSpecifications[t.property].type;return util.extend({name:\"a_\"+e,components:i?4:1,multiplier:i?255:1,dimensions:i?4:1},t)}var createVertexArrayType=require(\"./vertex_array_type\"),util=require(\"../util/util\"),ProgramConfiguration=function(){this.attributes=[],this.uniforms=[],this.interpolationUniforms=[],this.pragmas={vertex:{},fragment:{}},this.cacheKey=\"\"};ProgramConfiguration.createDynamic=function(t,r,e){for(var i=new ProgramConfiguration,a=0,n=t;a90||this.lat<-90)throw new Error(\"Invalid LngLat latitude value: must be between -90 and 90\")};LngLat.prototype.wrap=function(){return new LngLat(wrap(this.lng,-180,180),this.lat)},LngLat.prototype.toArray=function(){return[this.lng,this.lat]},LngLat.prototype.toString=function(){return\"LngLat(\"+this.lng+\", \"+this.lat+\")\"},LngLat.convert=function(t){if(t instanceof LngLat)return t;if(t&&t.hasOwnProperty(\"lng\")&&t.hasOwnProperty(\"lat\"))return new LngLat(t.lng,t.lat);if(Array.isArray(t)&&2===t.length)return new LngLat(t[0],t[1]);throw new Error(\"`LngLatLike` argument must be specified as a LngLat instance, an object {lng: , lat: }, or an array of [, ]\")},module.exports=LngLat;\n},{\"../util/util\":212}],63:[function(require,module,exports){\n\"use strict\";var LngLat=require(\"./lng_lat\"),LngLatBounds=function(t,n){t&&(n?this.setSouthWest(t).setNorthEast(n):4===t.length?this.setSouthWest([t[0],t[1]]).setNorthEast([t[2],t[3]]):this.setSouthWest(t[0]).setNorthEast(t[1]))};LngLatBounds.prototype.setNorthEast=function(t){return this._ne=LngLat.convert(t),this},LngLatBounds.prototype.setSouthWest=function(t){return this._sw=LngLat.convert(t),this},LngLatBounds.prototype.extend=function(t){var n,e,s=this._sw,o=this._ne;if(t instanceof LngLat)n=t,e=t;else{if(!(t instanceof LngLatBounds))return Array.isArray(t)?t.every(Array.isArray)?this.extend(LngLatBounds.convert(t)):this.extend(LngLat.convert(t)):this;if(n=t._sw,e=t._ne,!n||!e)return this}return s||o?(s.lng=Math.min(n.lng,s.lng),s.lat=Math.min(n.lat,s.lat),o.lng=Math.max(e.lng,o.lng),o.lat=Math.max(e.lat,o.lat)):(this._sw=new LngLat(n.lng,n.lat),this._ne=new LngLat(e.lng,e.lat)),this},LngLatBounds.prototype.getCenter=function(){return new LngLat((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},LngLatBounds.prototype.getSouthWest=function(){return this._sw},LngLatBounds.prototype.getNorthEast=function(){return this._ne},LngLatBounds.prototype.getNorthWest=function(){return new LngLat(this.getWest(),this.getNorth())},LngLatBounds.prototype.getSouthEast=function(){return new LngLat(this.getEast(),this.getSouth())},LngLatBounds.prototype.getWest=function(){return this._sw.lng},LngLatBounds.prototype.getSouth=function(){return this._sw.lat},LngLatBounds.prototype.getEast=function(){return this._ne.lng},LngLatBounds.prototype.getNorth=function(){return this._ne.lat},LngLatBounds.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},LngLatBounds.prototype.toString=function(){return\"LngLatBounds(\"+this._sw.toString()+\", \"+this._ne.toString()+\")\"},LngLatBounds.convert=function(t){return!t||t instanceof LngLatBounds?t:new LngLatBounds(t)},module.exports=LngLatBounds;\n},{\"./lng_lat\":62}],64:[function(require,module,exports){\n\"use strict\";var LngLat=require(\"./lng_lat\"),Point=require(\"point-geometry\"),Coordinate=require(\"./coordinate\"),util=require(\"../util/util\"),interp=require(\"../util/interpolate\"),TileCoord=require(\"../source/tile_coord\"),EXTENT=require(\"../data/extent\"),glmatrix=require(\"@mapbox/gl-matrix\"),vec4=glmatrix.vec4,mat4=glmatrix.mat4,mat2=glmatrix.mat2,Transform=function(t,i,o){this.tileSize=512,this._renderWorldCopies=void 0===o||o,this._minZoom=t||0,this._maxZoom=i||22,this.latRange=[-85.05113,85.05113],this.width=0,this.height=0,this._center=new LngLat(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0},prototypeAccessors={minZoom:{},maxZoom:{},worldSize:{},centerPoint:{},size:{},bearing:{},pitch:{},fov:{},zoom:{},center:{},unmodified:{},x:{},y:{},point:{}};prototypeAccessors.minZoom.get=function(){return this._minZoom},prototypeAccessors.minZoom.set=function(t){this._minZoom!==t&&(this._minZoom=t,this.zoom=Math.max(this.zoom,t))},prototypeAccessors.maxZoom.get=function(){return this._maxZoom},prototypeAccessors.maxZoom.set=function(t){this._maxZoom!==t&&(this._maxZoom=t,this.zoom=Math.min(this.zoom,t))},prototypeAccessors.worldSize.get=function(){return this.tileSize*this.scale},prototypeAccessors.centerPoint.get=function(){return this.size._div(2)},prototypeAccessors.size.get=function(){return new Point(this.width,this.height)},prototypeAccessors.bearing.get=function(){return-this.angle/Math.PI*180},prototypeAccessors.bearing.set=function(t){var i=-util.wrap(t,-180,180)*Math.PI/180;this.angle!==i&&(this._unmodified=!1,this.angle=i,this._calcMatrices(),this.rotationMatrix=mat2.create(),mat2.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},prototypeAccessors.pitch.get=function(){return this._pitch/Math.PI*180},prototypeAccessors.pitch.set=function(t){var i=util.clamp(t,0,60)/180*Math.PI;this._pitch!==i&&(this._unmodified=!1,this._pitch=i,this._calcMatrices())},prototypeAccessors.fov.get=function(){return this._fov/Math.PI*180},prototypeAccessors.fov.set=function(t){t=Math.max(.01,Math.min(60,t)),this._fov!==t&&(this._unmodified=!1,this._fov=t/180*Math.PI,this._calcMatrices())},prototypeAccessors.zoom.get=function(){return this._zoom},prototypeAccessors.zoom.set=function(t){var i=Math.min(Math.max(t,this.minZoom),this.maxZoom);this._zoom!==i&&(this._unmodified=!1,this._zoom=i,this.scale=this.zoomScale(i),this.tileZoom=Math.floor(i),this.zoomFraction=i-this.tileZoom,this._constrain(),this._calcMatrices())},prototypeAccessors.center.get=function(){return this._center},prototypeAccessors.center.set=function(t){t.lat===this._center.lat&&t.lng===this._center.lng||(this._unmodified=!1,this._center=t,this._constrain(),this._calcMatrices())},Transform.prototype.coveringZoomLevel=function(t){return(t.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/t.tileSize))},Transform.prototype.coveringTiles=function(t){var i=this.coveringZoomLevel(t),o=i;if(it.maxzoom&&(i=t.maxzoom);var e=this.pointCoordinate(this.centerPoint,i),r=new Point(e.column-.5,e.row-.5),n=[this.pointCoordinate(new Point(0,0),i),this.pointCoordinate(new Point(this.width,0),i),this.pointCoordinate(new Point(this.width,this.height),i),this.pointCoordinate(new Point(0,this.height),i)];return TileCoord.cover(i,n,t.reparseOverscaled?o:i,this._renderWorldCopies).sort(function(t,i){return r.dist(t)-r.dist(i)})},Transform.prototype.resize=function(t,i){this.width=t,this.height=i,this.pixelsToGLUnits=[2/t,-2/i],this._constrain(),this._calcMatrices()},prototypeAccessors.unmodified.get=function(){return this._unmodified},Transform.prototype.zoomScale=function(t){return Math.pow(2,t)},Transform.prototype.scaleZoom=function(t){return Math.log(t)/Math.LN2},Transform.prototype.project=function(t){return new Point(this.lngX(t.lng),this.latY(t.lat))},Transform.prototype.unproject=function(t){return new LngLat(this.xLng(t.x),this.yLat(t.y))},prototypeAccessors.x.get=function(){return this.lngX(this.center.lng)},prototypeAccessors.y.get=function(){return this.latY(this.center.lat)},prototypeAccessors.point.get=function(){return new Point(this.x,this.y)},Transform.prototype.lngX=function(t){return(180+t)*this.worldSize/360},Transform.prototype.latY=function(t){var i=180/Math.PI*Math.log(Math.tan(Math.PI/4+t*Math.PI/360));return(180-i)*this.worldSize/360},Transform.prototype.xLng=function(t){return 360*t/this.worldSize-180},Transform.prototype.yLat=function(t){var i=180-360*t/this.worldSize;return 360/Math.PI*Math.atan(Math.exp(i*Math.PI/180))-90},Transform.prototype.setLocationAtPoint=function(t,i){var o=this.pointCoordinate(i)._sub(this.pointCoordinate(this.centerPoint));this.center=this.coordinateLocation(this.locationCoordinate(t)._sub(o))},Transform.prototype.locationPoint=function(t){return this.coordinatePoint(this.locationCoordinate(t))},Transform.prototype.pointLocation=function(t){return this.coordinateLocation(this.pointCoordinate(t))},Transform.prototype.locationCoordinate=function(t){return new Coordinate(this.lngX(t.lng)/this.tileSize,this.latY(t.lat)/this.tileSize,this.zoom).zoomTo(this.tileZoom)},Transform.prototype.coordinateLocation=function(t){var i=t.zoomTo(this.zoom);return new LngLat(this.xLng(i.column*this.tileSize),this.yLat(i.row*this.tileSize))},Transform.prototype.pointCoordinate=function(t,i){void 0===i&&(i=this.tileZoom);var o=0,e=[t.x,t.y,0,1],r=[t.x,t.y,1,1];vec4.transformMat4(e,e,this.pixelMatrixInverse),vec4.transformMat4(r,r,this.pixelMatrixInverse);var n=e[3],s=r[3],a=e[0]/n,h=r[0]/s,c=e[1]/n,m=r[1]/s,p=e[2]/n,l=r[2]/s,u=p===l?0:(o-p)/(l-p);return new Coordinate(interp(a,h,u)/this.tileSize,interp(c,m,u)/this.tileSize,this.zoom)._zoomTo(i)},Transform.prototype.coordinatePoint=function(t){var i=t.zoomTo(this.zoom),o=[i.column*this.tileSize,i.row*this.tileSize,0,1];return vec4.transformMat4(o,o,this.pixelMatrix),new Point(o[0]/o[3],o[1]/o[3])},Transform.prototype.calculatePosMatrix=function(t,i){var o=t.toCoordinate(i),e=this.worldSize/this.zoomScale(o.zoom),r=mat4.identity(new Float64Array(16));return mat4.translate(r,r,[o.column*e,o.row*e,0]),mat4.scale(r,r,[e/EXTENT,e/EXTENT,1]),mat4.multiply(r,this.projMatrix,r),new Float32Array(r)},Transform.prototype._constrain=function(){if(this.center&&this.width&&this.height&&!this._constraining){this._constraining=!0;var t,i,o,e,r,n,s,a,h=this.size,c=this._unmodified;this.latRange&&(t=this.latY(this.latRange[1]),i=this.latY(this.latRange[0]),r=i-ti&&(a=i-l)}if(this.lngRange){var u=this.x,f=h.x/2;u-fe&&(s=e-f)}void 0===s&&void 0===a||(this.center=this.unproject(new Point(void 0!==s?s:this.x,void 0!==a?a:this.y))),this._unmodified=c,this._constraining=!1}},Transform.prototype._calcMatrices=function(){if(this.height){this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height;var t=this._fov/2,i=Math.PI/2+this._pitch,o=Math.sin(t)*this.cameraToCenterDistance/Math.sin(Math.PI-i-t),e=Math.cos(Math.PI/2-this._pitch)*o+this.cameraToCenterDistance,r=1.01*e,n=new Float64Array(16);mat4.perspective(n,this._fov,this.width/this.height,1,r),mat4.scale(n,n,[1,-1,1]),mat4.translate(n,n,[0,0,-this.cameraToCenterDistance]),mat4.rotateX(n,n,this._pitch),mat4.rotateZ(n,n,this.angle),mat4.translate(n,n,[-this.x,-this.y,0]);var s=this.worldSize/(2*Math.PI*6378137*Math.abs(Math.cos(this.center.lat*(Math.PI/180))));if(mat4.scale(n,n,[1,1,s,1]),this.projMatrix=n,n=mat4.create(),mat4.scale(n,n,[this.width/2,-this.height/2,1]),mat4.translate(n,n,[1,-1,0]),this.pixelMatrix=mat4.multiply(new Float64Array(16),n,this.projMatrix),n=mat4.invert(new Float64Array(16),this.pixelMatrix),!n)throw new Error(\"failed to invert matrix\");this.pixelMatrixInverse=n}},Object.defineProperties(Transform.prototype,prototypeAccessors),module.exports=Transform;\n},{\"../data/extent\":54,\"../source/tile_coord\":94,\"../util/interpolate\":204,\"../util/util\":212,\"./coordinate\":61,\"./lng_lat\":62,\"@mapbox/gl-matrix\":1,\"point-geometry\":26}],65:[function(require,module,exports){\n\"use strict\";var browser=require(\"./util/browser\"),mapboxgl=module.exports={};mapboxgl.version=require(\"../package.json\").version,mapboxgl.workerCount=Math.max(Math.floor(browser.hardwareConcurrency/2),1),mapboxgl.Map=require(\"./ui/map\"),mapboxgl.NavigationControl=require(\"./ui/control/navigation_control\"),mapboxgl.GeolocateControl=require(\"./ui/control/geolocate_control\"),mapboxgl.AttributionControl=require(\"./ui/control/attribution_control\"),mapboxgl.ScaleControl=require(\"./ui/control/scale_control\"),mapboxgl.FullscreenControl=require(\"./ui/control/fullscreen_control\"),mapboxgl.Popup=require(\"./ui/popup\"),mapboxgl.Marker=require(\"./ui/marker\"),mapboxgl.Style=require(\"./style/style\"),mapboxgl.LngLat=require(\"./geo/lng_lat\"),mapboxgl.LngLatBounds=require(\"./geo/lng_lat_bounds\"),mapboxgl.Point=require(\"point-geometry\"),mapboxgl.Evented=require(\"./util/evented\"),mapboxgl.supported=require(\"./util/browser\").supported;var config=require(\"./util/config\");mapboxgl.config=config;var rtlTextPlugin=require(\"./source/rtl_text_plugin\");mapboxgl.setRTLTextPlugin=rtlTextPlugin.setRTLTextPlugin,Object.defineProperty(mapboxgl,\"accessToken\",{get:function(){return config.ACCESS_TOKEN},set:function(o){config.ACCESS_TOKEN=o}});\n},{\"../package.json\":43,\"./geo/lng_lat\":62,\"./geo/lng_lat_bounds\":63,\"./source/rtl_text_plugin\":90,\"./style/style\":146,\"./ui/control/attribution_control\":173,\"./ui/control/fullscreen_control\":174,\"./ui/control/geolocate_control\":175,\"./ui/control/navigation_control\":177,\"./ui/control/scale_control\":178,\"./ui/map\":187,\"./ui/marker\":188,\"./ui/popup\":189,\"./util/browser\":192,\"./util/config\":196,\"./util/evented\":200,\"point-geometry\":26}],66:[function(require,module,exports){\n\"use strict\";function drawBackground(r,t,e){var a=r.gl,i=r.transform,n=i.tileSize,o=e.paint[\"background-color\"],l=e.paint[\"background-pattern\"],u=e.paint[\"background-opacity\"],f=!l&&1===o[3]&&1===u;if(r.isOpaquePass===f){a.disable(a.STENCIL_TEST),r.setDepthSublayer(0);var s;l?(s=r.useProgram(\"fillPattern\",r.basicFillProgramConfiguration),pattern.prepare(l,r,s),r.tileExtentPatternVAO.bind(a,s,r.tileExtentBuffer)):(s=r.useProgram(\"fill\",r.basicFillProgramConfiguration),a.uniform4fv(s.u_color,o),r.tileExtentVAO.bind(a,s,r.tileExtentBuffer)),a.uniform1f(s.u_opacity,u);for(var c=i.coveringTiles({tileSize:n}),g=0,p=c;g\":[24,[4,18,20,9,4,0]],\"?\":[18,[3,16,3,17,4,19,5,20,7,21,11,21,13,20,14,19,15,17,15,15,14,13,13,12,9,10,9,7,-1,-1,9,2,8,1,9,0,10,1,9,2]],\"@\":[27,[18,13,17,15,15,16,12,16,10,15,9,14,8,11,8,8,9,6,11,5,14,5,16,6,17,8,-1,-1,12,16,10,14,9,11,9,8,10,6,11,5,-1,-1,18,16,17,8,17,6,19,5,21,5,23,7,24,10,24,12,23,15,22,17,20,19,18,20,15,21,12,21,9,20,7,19,5,17,4,15,3,12,3,9,4,6,5,4,7,2,9,1,12,0,15,0,18,1,20,2,21,3,-1,-1,19,16,18,8,18,6,19,5]],A:[18,[9,21,1,0,-1,-1,9,21,17,0,-1,-1,4,7,14,7]],B:[21,[4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,15,17,13,16,12,13,11,-1,-1,4,11,13,11,16,10,17,9,18,7,18,4,17,2,16,1,13,0,4,0]],C:[21,[18,16,17,18,15,20,13,21,9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5]],D:[21,[4,21,4,0,-1,-1,4,21,11,21,14,20,16,18,17,16,18,13,18,8,17,5,16,3,14,1,11,0,4,0]],E:[19,[4,21,4,0,-1,-1,4,21,17,21,-1,-1,4,11,12,11,-1,-1,4,0,17,0]],F:[18,[4,21,4,0,-1,-1,4,21,17,21,-1,-1,4,11,12,11]],G:[21,[18,16,17,18,15,20,13,21,9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,18,8,-1,-1,13,8,18,8]],H:[22,[4,21,4,0,-1,-1,18,21,18,0,-1,-1,4,11,18,11]],I:[8,[4,21,4,0]],J:[16,[12,21,12,5,11,2,10,1,8,0,6,0,4,1,3,2,2,5,2,7]],K:[21,[4,21,4,0,-1,-1,18,21,4,7,-1,-1,9,12,18,0]],L:[17,[4,21,4,0,-1,-1,4,0,16,0]],M:[24,[4,21,4,0,-1,-1,4,21,12,0,-1,-1,20,21,12,0,-1,-1,20,21,20,0]],N:[22,[4,21,4,0,-1,-1,4,21,18,0,-1,-1,18,21,18,0]],O:[22,[9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,19,8,19,13,18,16,17,18,15,20,13,21,9,21]],P:[21,[4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,14,17,12,16,11,13,10,4,10]],Q:[22,[9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,19,8,19,13,18,16,17,18,15,20,13,21,9,21,-1,-1,12,4,18,-2]],R:[21,[4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,15,17,13,16,12,13,11,4,11,-1,-1,11,11,18,0]],S:[20,[17,18,15,20,12,21,8,21,5,20,3,18,3,16,4,14,5,13,7,12,13,10,15,9,16,8,17,6,17,3,15,1,12,0,8,0,5,1,3,3]],T:[16,[8,21,8,0,-1,-1,1,21,15,21]],U:[22,[4,21,4,6,5,3,7,1,10,0,12,0,15,1,17,3,18,6,18,21]],V:[18,[1,21,9,0,-1,-1,17,21,9,0]],W:[24,[2,21,7,0,-1,-1,12,21,7,0,-1,-1,12,21,17,0,-1,-1,22,21,17,0]],X:[20,[3,21,17,0,-1,-1,17,21,3,0]],Y:[18,[1,21,9,11,9,0,-1,-1,17,21,9,11]],Z:[20,[17,21,3,0,-1,-1,3,21,17,21,-1,-1,3,0,17,0]],\"[\":[14,[4,25,4,-7,-1,-1,5,25,5,-7,-1,-1,4,25,11,25,-1,-1,4,-7,11,-7]],\"\\\\\":[14,[0,21,14,-3]],\"]\":[14,[9,25,9,-7,-1,-1,10,25,10,-7,-1,-1,3,25,10,25,-1,-1,3,-7,10,-7]],\"^\":[16,[6,15,8,18,10,15,-1,-1,3,12,8,17,13,12,-1,-1,8,17,8,0]],_:[16,[0,-2,16,-2]],\"`\":[10,[6,21,5,20,4,18,4,16,5,15,6,16,5,17]],a:[19,[15,14,15,0,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],b:[19,[4,21,4,0,-1,-1,4,11,6,13,8,14,11,14,13,13,15,11,16,8,16,6,15,3,13,1,11,0,8,0,6,1,4,3]],c:[18,[15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],d:[19,[15,21,15,0,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],e:[18,[3,8,15,8,15,10,14,12,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],f:[12,[10,21,8,21,6,20,5,17,5,0,-1,-1,2,14,9,14]],g:[19,[15,14,15,-2,14,-5,13,-6,11,-7,8,-7,6,-6,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],h:[19,[4,21,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0]],i:[8,[3,21,4,20,5,21,4,22,3,21,-1,-1,4,14,4,0]],j:[10,[5,21,6,20,7,21,6,22,5,21,-1,-1,6,14,6,-3,5,-6,3,-7,1,-7]],k:[17,[4,21,4,0,-1,-1,14,14,4,4,-1,-1,8,8,15,0]],l:[8,[4,21,4,0]],m:[30,[4,14,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0,-1,-1,15,10,18,13,20,14,23,14,25,13,26,10,26,0]],n:[19,[4,14,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0]],o:[19,[8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3,16,6,16,8,15,11,13,13,11,14,8,14]],p:[19,[4,14,4,-7,-1,-1,4,11,6,13,8,14,11,14,13,13,15,11,16,8,16,6,15,3,13,1,11,0,8,0,6,1,4,3]],q:[19,[15,14,15,-7,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],r:[13,[4,14,4,0,-1,-1,4,8,5,11,7,13,9,14,12,14]],s:[17,[14,11,13,13,10,14,7,14,4,13,3,11,4,9,6,8,11,7,13,6,14,4,14,3,13,1,10,0,7,0,4,1,3,3]],t:[12,[5,21,5,4,6,1,8,0,10,0,-1,-1,2,14,9,14]],u:[19,[4,14,4,4,5,1,7,0,10,0,12,1,15,4,-1,-1,15,14,15,0]],v:[16,[2,14,8,0,-1,-1,14,14,8,0]],w:[22,[3,14,7,0,-1,-1,11,14,7,0,-1,-1,11,14,15,0,-1,-1,19,14,15,0]],x:[17,[3,14,14,0,-1,-1,14,14,3,0]],y:[16,[2,14,8,0,-1,-1,14,14,8,0,6,-4,4,-6,2,-7,1,-7]],z:[17,[14,14,3,0,-1,-1,3,14,14,14,-1,-1,3,0,14,0]],\"{\":[14,[9,25,7,24,6,23,5,21,5,19,6,17,7,16,8,14,8,12,6,10,-1,-1,7,24,6,22,6,20,7,18,8,17,9,15,9,13,8,11,4,9,8,7,9,5,9,3,8,1,7,0,6,-2,6,-4,7,-6,-1,-1,6,8,8,6,8,4,7,2,6,1,5,-1,5,-3,6,-5,7,-6,9,-7]],\"|\":[8,[4,25,4,-7]],\"}\":[14,[5,25,7,24,8,23,9,21,9,19,8,17,7,16,6,14,6,12,8,10,-1,-1,7,24,8,22,8,20,7,18,6,17,5,15,5,13,6,11,10,9,6,7,5,5,5,3,6,1,7,0,8,-2,8,-4,7,-6,-1,-1,8,8,6,6,6,4,7,2,8,1,9,-1,9,-3,8,-5,7,-6,5,-7]],\"~\":[24,[3,6,3,8,4,11,6,12,8,12,10,11,14,8,16,7,18,7,20,8,21,10,-1,-1,3,8,4,10,6,11,8,11,10,10,14,7,16,6,18,6,20,7,21,10,21,12]]};\n},{\"../data/buffer\":51,\"../data/extent\":54,\"../data/pos_array\":57,\"../util/browser\":192,\"./vertex_array_object\":80,\"@mapbox/gl-matrix\":1}],70:[function(require,module,exports){\n\"use strict\";function drawFill(t,e,r,i){var a=t.gl;a.enable(a.STENCIL_TEST);var l=!r.paint[\"fill-pattern\"]&&r.isPaintValueFeatureConstant(\"fill-color\")&&r.isPaintValueFeatureConstant(\"fill-opacity\")&&1===r.paint[\"fill-color\"][3]&&1===r.paint[\"fill-opacity\"];t.isOpaquePass===l&&(t.setDepthSublayer(1),drawFillTiles(t,e,r,i,drawFillTile)),!t.isOpaquePass&&r.paint[\"fill-antialias\"]&&(t.lineWidth(2),t.depthMask(!1),t.setDepthSublayer(r.getPaintProperty(\"fill-outline-color\")?2:0),drawFillTiles(t,e,r,i,drawStrokeTile))}function drawFillTiles(t,e,r,i,a){for(var l=!0,n=0,o=i;n0?1/(1-r):1+r}function saturationFactor(r){return r>0?1-1/(1.001-r):-r}function getFadeValues(r,t,e,a){var i=e.paint[\"raster-fade-duration\"];if(r.sourceCache&&i>0){var o=Date.now(),n=(o-r.timeAdded)/i,u=t?(o-t.timeAdded)/i:-1,s=r.sourceCache.getSource(),c=a.coveringZoomLevel({tileSize:s.tileSize,roundZoom:s.roundZoom}),f=!t||Math.abs(t.coord.z-c)>Math.abs(r.coord.z-c),d=f&&r.refreshedUponExpiration?1:util.clamp(f?n:1-u,0,1);return r.refreshedUponExpiration&&n>=1&&(r.refreshedUponExpiration=!1),t?{opacity:1,mix:1-d}:{opacity:d,mix:0}}return{opacity:1,mix:0}}var util=require(\"../util/util\");module.exports=drawRaster;\n},{\"../util/util\":212}],74:[function(require,module,exports){\n\"use strict\";function drawSymbols(e,t,a,i){if(!e.isOpaquePass){var o=!(a.layout[\"text-allow-overlap\"]||a.layout[\"icon-allow-overlap\"]||a.layout[\"text-ignore-placement\"]||a.layout[\"icon-ignore-placement\"]),r=e.gl;o?r.disable(r.STENCIL_TEST):r.enable(r.STENCIL_TEST),e.setDepthSublayer(0),e.depthMask(!1),drawLayerSymbols(e,t,a,i,!1,a.paint[\"icon-translate\"],a.paint[\"icon-translate-anchor\"],a.layout[\"icon-rotation-alignment\"],a.layout[\"icon-rotation-alignment\"],a.layout[\"icon-size\"]),drawLayerSymbols(e,t,a,i,!0,a.paint[\"text-translate\"],a.paint[\"text-translate-anchor\"],a.layout[\"text-rotation-alignment\"],a.layout[\"text-pitch-alignment\"],a.layout[\"text-size\"]),t.map.showCollisionBoxes&&drawCollisionDebug(e,t,a,i)}}function drawLayerSymbols(e,t,a,i,o,r,n,l,s,u){if(o||!e.style.sprite||e.style.sprite.loaded()){var f=e.gl,m=\"map\"===l,p=\"map\"===s,c=p;c?f.enable(f.DEPTH_TEST):f.disable(f.DEPTH_TEST);for(var d,_,h=0,g=i;hthis.previousZoom;a--)r.changeTimes[a]=e,r.changeOpacities[a]=r.opacities[a];for(a=0;a<256;a++){var s=e-r.changeTimes[a],o=255*(i?s/i:1);a<=t?r.opacities[a]=r.changeOpacities[a]+o:r.opacities[a]=r.changeOpacities[a]-o}this.changed=!0,this.previousZoom=t},FrameHistory.prototype.bind=function(e){this.texture?(e.bindTexture(e.TEXTURE_2D,this.texture),this.changed&&(e.texSubImage2D(e.TEXTURE_2D,0,0,0,256,1,e.ALPHA,e.UNSIGNED_BYTE,this.array),this.changed=!1)):(this.texture=e.createTexture(),e.bindTexture(e.TEXTURE_2D,this.texture),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texImage2D(e.TEXTURE_2D,0,e.ALPHA,256,1,0,e.ALPHA,e.UNSIGNED_BYTE,this.array))},module.exports=FrameHistory;\n},{}],76:[function(require,module,exports){\n\"use strict\";var util=require(\"../util/util\"),LineAtlas=function(t,i){this.width=t,this.height=i,this.nextRow=0,this.bytes=4,this.data=new Uint8Array(this.width*this.height*this.bytes),this.positions={}};LineAtlas.prototype.setSprite=function(t){this.sprite=t},LineAtlas.prototype.getDash=function(t,i){var e=t.join(\",\")+i;return this.positions[e]||(this.positions[e]=this.addDash(t,i)),this.positions[e]},LineAtlas.prototype.addDash=function(t,i){var e=this,h=i?7:0,s=2*h+1,a=128;if(this.nextRow+s>this.height)return util.warnOnce(\"LineAtlas out of space\"),null;for(var r=0,n=0;n0?r.pop():null},Painter.prototype.getViewportTexture=function(e,r){var t=this.reusableTextures.viewport;if(t)return t.width===e&&t.height===r?t:(this.gl.deleteTexture(t),void(this.reusableTextures.viewport=null))},Painter.prototype.lineWidth=function(e){this.gl.lineWidth(util.clamp(e,this.lineWidthRange[0],this.lineWidthRange[1]))},Painter.prototype.showOverdrawInspector=function(e){if(e||this._showOverdrawInspector){this._showOverdrawInspector=e;var r=this.gl;if(e){r.blendFunc(r.CONSTANT_COLOR,r.ONE);var t=8,i=1/t;r.blendColor(i,i,i,0),r.clearColor(0,0,0,1),r.clear(r.COLOR_BUFFER_BIT)}else r.blendFunc(r.ONE,r.ONE_MINUS_SRC_ALPHA)}},Painter.prototype.createProgram=function(e,r){var t=this.gl,i=t.createProgram(),a=shaders[e],s=\"#define MAPBOX_GL_JS\\n#define DEVICE_PIXEL_RATIO \"+browser.devicePixelRatio.toFixed(1)+\"\\n\";this._showOverdrawInspector&&(s+=\"#define OVERDRAW_INSPECTOR;\\n\");var o=r.applyPragmas(s+shaders.prelude.fragmentSource+a.fragmentSource,\"fragment\"),n=r.applyPragmas(s+shaders.prelude.vertexSource+a.vertexSource,\"vertex\"),l=t.createShader(t.FRAGMENT_SHADER);t.shaderSource(l,o),t.compileShader(l),t.attachShader(i,l);var h=t.createShader(t.VERTEX_SHADER);t.shaderSource(h,n),t.compileShader(h),t.attachShader(i,h),t.linkProgram(i);for(var u=t.getProgramParameter(i,t.ACTIVE_ATTRIBUTES),c={program:i,numAttributes:u},p=0;p>16,n>>16),o.uniform2f(i.u_pixel_coord_lower,65535&u,65535&n)};\n},{\"../source/pixels_to_tile_units\":87}],79:[function(require,module,exports){\n\"use strict\";var path=require(\"path\");module.exports={prelude:{fragmentSource:\"#ifdef GL_ES\\nprecision mediump float;\\n#else\\n\\n#if !defined(lowp)\\n#define lowp\\n#endif\\n\\n#if !defined(mediump)\\n#define mediump\\n#endif\\n\\n#if !defined(highp)\\n#define highp\\n#endif\\n\\n#endif\\n\",vertexSource:\"#ifdef GL_ES\\nprecision highp float;\\n#else\\n\\n#if !defined(lowp)\\n#define lowp\\n#endif\\n\\n#if !defined(mediump)\\n#define mediump\\n#endif\\n\\n#if !defined(highp)\\n#define highp\\n#endif\\n\\n#endif\\n\\nfloat evaluate_zoom_function_1(const vec4 values, const float t) {\\n if (t < 1.0) {\\n return mix(values[0], values[1], t);\\n } else if (t < 2.0) {\\n return mix(values[1], values[2], t - 1.0);\\n } else {\\n return mix(values[2], values[3], t - 2.0);\\n }\\n}\\nvec4 evaluate_zoom_function_4(const vec4 value0, const vec4 value1, const vec4 value2, const vec4 value3, const float t) {\\n if (t < 1.0) {\\n return mix(value0, value1, t);\\n } else if (t < 2.0) {\\n return mix(value1, value2, t - 1.0);\\n } else {\\n return mix(value2, value3, t - 2.0);\\n }\\n}\\n\\n\\n// To minimize the number of attributes needed in the mapbox-gl-native shaders,\\n// we encode a 4-component color into a pair of floats (i.e. a vec2) as follows:\\n// [ floor(color.r * 255) * 256 + color.g * 255,\\n// floor(color.b * 255) * 256 + color.g * 255 ]\\nvec4 decode_color(const vec2 encodedColor) {\\n float r = floor(encodedColor[0]/256.0)/255.0;\\n float g = (encodedColor[0] - r*256.0*255.0)/255.0;\\n float b = floor(encodedColor[1]/256.0)/255.0;\\n float a = (encodedColor[1] - b*256.0*255.0)/255.0;\\n return vec4(r, g, b, a);\\n}\\n\\n// Unpack a pair of paint values and interpolate between them.\\nfloat unpack_mix_vec2(const vec2 packedValue, const float t) {\\n return mix(packedValue[0], packedValue[1], t);\\n}\\n\\n// Unpack a pair of paint values and interpolate between them.\\nvec4 unpack_mix_vec4(const vec4 packedColors, const float t) {\\n vec4 minColor = decode_color(vec2(packedColors[0], packedColors[1]));\\n vec4 maxColor = decode_color(vec2(packedColors[2], packedColors[3]));\\n return mix(minColor, maxColor, t);\\n}\\n\\n// The offset depends on how many pixels are between the world origin and the edge of the tile:\\n// vec2 offset = mod(pixel_coord, size)\\n//\\n// At high zoom levels there are a ton of pixels between the world origin and the edge of the tile.\\n// The glsl spec only guarantees 16 bits of precision for highp floats. We need more than that.\\n//\\n// The pixel_coord is passed in as two 16 bit values:\\n// pixel_coord_upper = floor(pixel_coord / 2^16)\\n// pixel_coord_lower = mod(pixel_coord, 2^16)\\n//\\n// The offset is calculated in a series of steps that should preserve this precision:\\nvec2 get_pattern_pos(const vec2 pixel_coord_upper, const vec2 pixel_coord_lower,\\n const vec2 pattern_size, const float tile_units_to_pixels, const vec2 pos) {\\n\\n vec2 offset = mod(mod(mod(pixel_coord_upper, pattern_size) * 256.0, pattern_size) * 256.0 + pixel_coord_lower, pattern_size);\\n return (tile_units_to_pixels * pos + offset) / pattern_size;\\n}\\n\"},circle:{fragmentSource:\"#pragma mapbox: define lowp vec4 color\\n#pragma mapbox: define mediump float radius\\n#pragma mapbox: define lowp float blur\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define lowp vec4 stroke_color\\n#pragma mapbox: define mediump float stroke_width\\n#pragma mapbox: define lowp float stroke_opacity\\n\\nvarying vec2 v_extrude;\\nvarying lowp float v_antialiasblur;\\n\\nvoid main() {\\n #pragma mapbox: initialize lowp vec4 color\\n #pragma mapbox: initialize mediump float radius\\n #pragma mapbox: initialize lowp float blur\\n #pragma mapbox: initialize lowp float opacity\\n #pragma mapbox: initialize lowp vec4 stroke_color\\n #pragma mapbox: initialize mediump float stroke_width\\n #pragma mapbox: initialize lowp float stroke_opacity\\n\\n float extrude_length = length(v_extrude);\\n float antialiased_blur = -max(blur, v_antialiasblur);\\n\\n float opacity_t = smoothstep(0.0, antialiased_blur, extrude_length - 1.0);\\n\\n float color_t = stroke_width < 0.01 ? 0.0 : smoothstep(\\n antialiased_blur,\\n 0.0,\\n extrude_length - radius / (radius + stroke_width)\\n );\\n\\n gl_FragColor = opacity_t * mix(color * opacity, stroke_color * stroke_opacity, color_t);\\n\\n#ifdef OVERDRAW_INSPECTOR\\n gl_FragColor = vec4(1.0);\\n#endif\\n}\\n\",vertexSource:\"uniform mat4 u_matrix;\\nuniform bool u_scale_with_map;\\nuniform vec2 u_extrude_scale;\\n\\nattribute vec2 a_pos;\\n\\n#pragma mapbox: define lowp vec4 color\\n#pragma mapbox: define mediump float radius\\n#pragma mapbox: define lowp float blur\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define lowp vec4 stroke_color\\n#pragma mapbox: define mediump float stroke_width\\n#pragma mapbox: define lowp float stroke_opacity\\n\\nvarying vec2 v_extrude;\\nvarying lowp float v_antialiasblur;\\n\\nvoid main(void) {\\n #pragma mapbox: initialize lowp vec4 color\\n #pragma mapbox: initialize mediump float radius\\n #pragma mapbox: initialize lowp float blur\\n #pragma mapbox: initialize lowp float opacity\\n #pragma mapbox: initialize lowp vec4 stroke_color\\n #pragma mapbox: initialize mediump float stroke_width\\n #pragma mapbox: initialize lowp float stroke_opacity\\n\\n // unencode the extrusion vector that we snuck into the a_pos vector\\n v_extrude = vec2(mod(a_pos, 2.0) * 2.0 - 1.0);\\n\\n vec2 extrude = v_extrude * (radius + stroke_width) * u_extrude_scale;\\n // multiply a_pos by 0.5, since we had it * 2 in order to sneak\\n // in extrusion data\\n gl_Position = u_matrix * vec4(floor(a_pos * 0.5), 0, 1);\\n\\n if (u_scale_with_map) {\\n gl_Position.xy += extrude;\\n } else {\\n gl_Position.xy += extrude * gl_Position.w;\\n }\\n\\n // This is a minimum blur distance that serves as a faux-antialiasing for\\n // the circle. since blur is a ratio of the circle's size and the intent is\\n // to keep the blur at roughly 1px, the two are inversely related.\\n v_antialiasblur = 1.0 / DEVICE_PIXEL_RATIO / (radius + stroke_width);\\n}\\n\"},collisionBox:{fragmentSource:\"uniform float u_zoom;\\nuniform float u_maxzoom;\\n\\nvarying float v_max_zoom;\\nvarying float v_placement_zoom;\\n\\nvoid main() {\\n\\n float alpha = 0.5;\\n\\n gl_FragColor = vec4(0.0, 1.0, 0.0, 1.0) * alpha;\\n\\n if (v_placement_zoom > u_zoom) {\\n gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0) * alpha;\\n }\\n\\n if (u_zoom >= v_max_zoom) {\\n gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0) * alpha * 0.25;\\n }\\n\\n if (v_placement_zoom >= u_maxzoom) {\\n gl_FragColor = vec4(0.0, 0.0, 1.0, 1.0) * alpha * 0.2;\\n }\\n}\\n\",vertexSource:\"attribute vec2 a_pos;\\nattribute vec2 a_extrude;\\nattribute vec2 a_data;\\n\\nuniform mat4 u_matrix;\\nuniform float u_scale;\\n\\nvarying float v_max_zoom;\\nvarying float v_placement_zoom;\\n\\nvoid main() {\\n gl_Position = u_matrix * vec4(a_pos + a_extrude / u_scale, 0.0, 1.0);\\n\\n v_max_zoom = a_data.x;\\n v_placement_zoom = a_data.y;\\n}\\n\"},debug:{fragmentSource:\"uniform lowp vec4 u_color;\\n\\nvoid main() {\\n gl_FragColor = u_color;\\n}\\n\",vertexSource:\"attribute vec2 a_pos;\\n\\nuniform mat4 u_matrix;\\n\\nvoid main() {\\n gl_Position = u_matrix * vec4(a_pos, step(32767.0, a_pos.x), 1);\\n}\\n\"},fill:{fragmentSource:\"#pragma mapbox: define lowp vec4 color\\n#pragma mapbox: define lowp float opacity\\n\\nvoid main() {\\n #pragma mapbox: initialize lowp vec4 color\\n #pragma mapbox: initialize lowp float opacity\\n\\n gl_FragColor = color * opacity;\\n\\n#ifdef OVERDRAW_INSPECTOR\\n gl_FragColor = vec4(1.0);\\n#endif\\n}\\n\",vertexSource:\"attribute vec2 a_pos;\\n\\nuniform mat4 u_matrix;\\n\\n#pragma mapbox: define lowp vec4 color\\n#pragma mapbox: define lowp float opacity\\n\\nvoid main() {\\n #pragma mapbox: initialize lowp vec4 color\\n #pragma mapbox: initialize lowp float opacity\\n\\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\\n}\\n\"},fillOutline:{fragmentSource:\"#pragma mapbox: define lowp vec4 outline_color\\n#pragma mapbox: define lowp float opacity\\n\\nvarying vec2 v_pos;\\n\\nvoid main() {\\n #pragma mapbox: initialize lowp vec4 outline_color\\n #pragma mapbox: initialize lowp float opacity\\n\\n float dist = length(v_pos - gl_FragCoord.xy);\\n float alpha = smoothstep(1.0, 0.0, dist);\\n gl_FragColor = outline_color * (alpha * opacity);\\n\\n#ifdef OVERDRAW_INSPECTOR\\n gl_FragColor = vec4(1.0);\\n#endif\\n}\\n\",vertexSource:\"attribute vec2 a_pos;\\n\\nuniform mat4 u_matrix;\\nuniform vec2 u_world;\\n\\nvarying vec2 v_pos;\\n\\n#pragma mapbox: define lowp vec4 outline_color\\n#pragma mapbox: define lowp float opacity\\n\\nvoid main() {\\n #pragma mapbox: initialize lowp vec4 outline_color\\n #pragma mapbox: initialize lowp float opacity\\n\\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\\n v_pos = (gl_Position.xy / gl_Position.w + 1.0) / 2.0 * u_world;\\n}\\n\"},fillOutlinePattern:{fragmentSource:\"uniform vec2 u_pattern_tl_a;\\nuniform vec2 u_pattern_br_a;\\nuniform vec2 u_pattern_tl_b;\\nuniform vec2 u_pattern_br_b;\\nuniform float u_mix;\\n\\nuniform sampler2D u_image;\\n\\nvarying vec2 v_pos_a;\\nvarying vec2 v_pos_b;\\nvarying vec2 v_pos;\\n\\n#pragma mapbox: define lowp float opacity\\n\\nvoid main() {\\n #pragma mapbox: initialize lowp float opacity\\n\\n vec2 imagecoord = mod(v_pos_a, 1.0);\\n vec2 pos = mix(u_pattern_tl_a, u_pattern_br_a, imagecoord);\\n vec4 color1 = texture2D(u_image, pos);\\n\\n vec2 imagecoord_b = mod(v_pos_b, 1.0);\\n vec2 pos2 = mix(u_pattern_tl_b, u_pattern_br_b, imagecoord_b);\\n vec4 color2 = texture2D(u_image, pos2);\\n\\n // find distance to outline for alpha interpolation\\n\\n float dist = length(v_pos - gl_FragCoord.xy);\\n float alpha = smoothstep(1.0, 0.0, dist);\\n\\n\\n gl_FragColor = mix(color1, color2, u_mix) * alpha * opacity;\\n\\n#ifdef OVERDRAW_INSPECTOR\\n gl_FragColor = vec4(1.0);\\n#endif\\n}\\n\",vertexSource:\"uniform mat4 u_matrix;\\nuniform vec2 u_world;\\nuniform vec2 u_pattern_size_a;\\nuniform vec2 u_pattern_size_b;\\nuniform vec2 u_pixel_coord_upper;\\nuniform vec2 u_pixel_coord_lower;\\nuniform float u_scale_a;\\nuniform float u_scale_b;\\nuniform float u_tile_units_to_pixels;\\n\\nattribute vec2 a_pos;\\n\\nvarying vec2 v_pos_a;\\nvarying vec2 v_pos_b;\\nvarying vec2 v_pos;\\n\\n#pragma mapbox: define lowp float opacity\\n\\nvoid main() {\\n #pragma mapbox: initialize lowp float opacity\\n\\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\\n\\n v_pos_a = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_a * u_pattern_size_a, u_tile_units_to_pixels, a_pos);\\n v_pos_b = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_b * u_pattern_size_b, u_tile_units_to_pixels, a_pos);\\n\\n v_pos = (gl_Position.xy / gl_Position.w + 1.0) / 2.0 * u_world;\\n}\\n\"},fillPattern:{fragmentSource:\"uniform vec2 u_pattern_tl_a;\\nuniform vec2 u_pattern_br_a;\\nuniform vec2 u_pattern_tl_b;\\nuniform vec2 u_pattern_br_b;\\nuniform float u_mix;\\n\\nuniform sampler2D u_image;\\n\\nvarying vec2 v_pos_a;\\nvarying vec2 v_pos_b;\\n\\n#pragma mapbox: define lowp float opacity\\n\\nvoid main() {\\n #pragma mapbox: initialize lowp float opacity\\n\\n vec2 imagecoord = mod(v_pos_a, 1.0);\\n vec2 pos = mix(u_pattern_tl_a, u_pattern_br_a, imagecoord);\\n vec4 color1 = texture2D(u_image, pos);\\n\\n vec2 imagecoord_b = mod(v_pos_b, 1.0);\\n vec2 pos2 = mix(u_pattern_tl_b, u_pattern_br_b, imagecoord_b);\\n vec4 color2 = texture2D(u_image, pos2);\\n\\n gl_FragColor = mix(color1, color2, u_mix) * opacity;\\n\\n#ifdef OVERDRAW_INSPECTOR\\n gl_FragColor = vec4(1.0);\\n#endif\\n}\\n\",vertexSource:\"uniform mat4 u_matrix;\\nuniform vec2 u_pattern_size_a;\\nuniform vec2 u_pattern_size_b;\\nuniform vec2 u_pixel_coord_upper;\\nuniform vec2 u_pixel_coord_lower;\\nuniform float u_scale_a;\\nuniform float u_scale_b;\\nuniform float u_tile_units_to_pixels;\\n\\nattribute vec2 a_pos;\\n\\nvarying vec2 v_pos_a;\\nvarying vec2 v_pos_b;\\n\\n#pragma mapbox: define lowp float opacity\\n\\nvoid main() {\\n #pragma mapbox: initialize lowp float opacity\\n\\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\\n\\n v_pos_a = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_a * u_pattern_size_a, u_tile_units_to_pixels, a_pos);\\n v_pos_b = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_b * u_pattern_size_b, u_tile_units_to_pixels, a_pos);\\n}\\n\"},fillExtrusion:{fragmentSource:\"varying vec4 v_color;\\n#pragma mapbox: define lowp float base\\n#pragma mapbox: define lowp float height\\n#pragma mapbox: define lowp vec4 color\\n\\nvoid main() {\\n #pragma mapbox: initialize lowp float base\\n #pragma mapbox: initialize lowp float height\\n #pragma mapbox: initialize lowp vec4 color\\n\\n gl_FragColor = v_color;\\n\\n#ifdef OVERDRAW_INSPECTOR\\n gl_FragColor = vec4(1.0);\\n#endif\\n}\\n\",vertexSource:\"uniform mat4 u_matrix;\\nuniform vec3 u_lightcolor;\\nuniform lowp vec3 u_lightpos;\\nuniform lowp float u_lightintensity;\\n\\nattribute vec2 a_pos;\\nattribute vec3 a_normal;\\nattribute float a_edgedistance;\\n\\nvarying vec4 v_color;\\n\\n#pragma mapbox: define lowp float base\\n#pragma mapbox: define lowp float height\\n\\n#pragma mapbox: define lowp vec4 color\\n\\nvoid main() {\\n #pragma mapbox: initialize lowp float base\\n #pragma mapbox: initialize lowp float height\\n #pragma mapbox: initialize lowp vec4 color\\n\\n float ed = a_edgedistance; // use each attrib in order to not trip a VAO assert\\n float t = mod(a_normal.x, 2.0);\\n\\n gl_Position = u_matrix * vec4(a_pos, t > 0.0 ? height : base, 1);\\n\\n // Relative luminance (how dark/bright is the surface color?)\\n float colorvalue = color.r * 0.2126 + color.g * 0.7152 + color.b * 0.0722;\\n\\n v_color = vec4(0.0, 0.0, 0.0, 1.0);\\n\\n // Add slight ambient lighting so no extrusions are totally black\\n vec4 ambientlight = vec4(0.03, 0.03, 0.03, 1.0);\\n color += ambientlight;\\n\\n // Calculate cos(theta), where theta is the angle between surface normal and diffuse light ray\\n float directional = clamp(dot(a_normal / 16384.0, u_lightpos), 0.0, 1.0);\\n\\n // Adjust directional so that\\n // the range of values for highlight/shading is narrower\\n // with lower light intensity\\n // and with lighter/brighter surface colors\\n directional = mix((1.0 - u_lightintensity), max((1.0 - colorvalue + u_lightintensity), 1.0), directional);\\n\\n // Add gradient along z axis of side surfaces\\n if (a_normal.y != 0.0) {\\n directional *= clamp((t + base) * pow(height / 150.0, 0.5), mix(0.7, 0.98, 1.0 - u_lightintensity), 1.0);\\n }\\n\\n // Assign final color based on surface + ambient light color, diffuse light directional, and light color\\n // with lower bounds adjusted to hue of light\\n // so that shading is tinted with the complementary (opposite) color to the light color\\n v_color.r += clamp(color.r * directional * u_lightcolor.r, mix(0.0, 0.3, 1.0 - u_lightcolor.r), 1.0);\\n v_color.g += clamp(color.g * directional * u_lightcolor.g, mix(0.0, 0.3, 1.0 - u_lightcolor.g), 1.0);\\n v_color.b += clamp(color.b * directional * u_lightcolor.b, mix(0.0, 0.3, 1.0 - u_lightcolor.b), 1.0);\\n}\\n\"},fillExtrusionPattern:{fragmentSource:\"uniform vec2 u_pattern_tl_a;\\nuniform vec2 u_pattern_br_a;\\nuniform vec2 u_pattern_tl_b;\\nuniform vec2 u_pattern_br_b;\\nuniform float u_mix;\\n\\nuniform sampler2D u_image;\\n\\nvarying vec2 v_pos_a;\\nvarying vec2 v_pos_b;\\nvarying vec4 v_lighting;\\n\\n#pragma mapbox: define lowp float base\\n#pragma mapbox: define lowp float height\\n\\nvoid main() {\\n #pragma mapbox: initialize lowp float base\\n #pragma mapbox: initialize lowp float height\\n\\n vec2 imagecoord = mod(v_pos_a, 1.0);\\n vec2 pos = mix(u_pattern_tl_a, u_pattern_br_a, imagecoord);\\n vec4 color1 = texture2D(u_image, pos);\\n\\n vec2 imagecoord_b = mod(v_pos_b, 1.0);\\n vec2 pos2 = mix(u_pattern_tl_b, u_pattern_br_b, imagecoord_b);\\n vec4 color2 = texture2D(u_image, pos2);\\n\\n vec4 mixedColor = mix(color1, color2, u_mix);\\n\\n gl_FragColor = mixedColor * v_lighting;\\n\\n#ifdef OVERDRAW_INSPECTOR\\n gl_FragColor = vec4(1.0);\\n#endif\\n}\\n\",vertexSource:\"uniform mat4 u_matrix;\\nuniform vec2 u_pattern_size_a;\\nuniform vec2 u_pattern_size_b;\\nuniform vec2 u_pixel_coord_upper;\\nuniform vec2 u_pixel_coord_lower;\\nuniform float u_scale_a;\\nuniform float u_scale_b;\\nuniform float u_tile_units_to_pixels;\\nuniform float u_height_factor;\\n\\nuniform vec3 u_lightcolor;\\nuniform lowp vec3 u_lightpos;\\nuniform lowp float u_lightintensity;\\n\\nattribute vec2 a_pos;\\nattribute vec3 a_normal;\\nattribute float a_edgedistance;\\n\\nvarying vec2 v_pos_a;\\nvarying vec2 v_pos_b;\\nvarying vec4 v_lighting;\\nvarying float v_directional;\\n\\n#pragma mapbox: define lowp float base\\n#pragma mapbox: define lowp float height\\n\\nvoid main() {\\n #pragma mapbox: initialize lowp float base\\n #pragma mapbox: initialize lowp float height\\n\\n float t = mod(a_normal.x, 2.0);\\n float z = t > 0.0 ? height : base;\\n\\n gl_Position = u_matrix * vec4(a_pos, z, 1);\\n\\n vec2 pos = a_normal.x == 1.0 && a_normal.y == 0.0 && a_normal.z == 16384.0\\n ? a_pos // extrusion top\\n : vec2(a_edgedistance, z * u_height_factor); // extrusion side\\n\\n v_pos_a = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_a * u_pattern_size_a, u_tile_units_to_pixels, pos);\\n v_pos_b = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_b * u_pattern_size_b, u_tile_units_to_pixels, pos);\\n\\n v_lighting = vec4(0.0, 0.0, 0.0, 1.0);\\n float directional = clamp(dot(a_normal / 16383.0, u_lightpos), 0.0, 1.0);\\n directional = mix((1.0 - u_lightintensity), max((0.5 + u_lightintensity), 1.0), directional);\\n\\n if (a_normal.y != 0.0) {\\n directional *= clamp((t + base) * pow(height / 150.0, 0.5), mix(0.7, 0.98, 1.0 - u_lightintensity), 1.0);\\n }\\n\\n v_lighting.rgb += clamp(directional * u_lightcolor, mix(vec3(0.0), vec3(0.3), 1.0 - u_lightcolor), vec3(1.0));\\n}\\n\"},extrusionTexture:{fragmentSource:\"uniform sampler2D u_texture;\\nuniform float u_opacity;\\n\\nvarying vec2 v_pos;\\n\\nvoid main() {\\n gl_FragColor = texture2D(u_texture, v_pos) * u_opacity;\\n\\n#ifdef OVERDRAW_INSPECTOR\\n gl_FragColor = vec4(0.0);\\n#endif\\n}\\n\",vertexSource:\"uniform mat4 u_matrix;\\nuniform int u_xdim;\\nuniform int u_ydim;\\nattribute vec2 a_pos;\\nvarying vec2 v_pos;\\n\\nvoid main() {\\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\\n\\n v_pos.x = a_pos.x / float(u_xdim);\\n v_pos.y = 1.0 - a_pos.y / float(u_ydim);\\n}\\n\"},line:{fragmentSource:\"#pragma mapbox: define lowp vec4 color\\n#pragma mapbox: define lowp float blur\\n#pragma mapbox: define lowp float opacity\\n\\nvarying vec2 v_width2;\\nvarying vec2 v_normal;\\nvarying float v_gamma_scale;\\n\\nvoid main() {\\n #pragma mapbox: initialize lowp vec4 color\\n #pragma mapbox: initialize lowp float blur\\n #pragma mapbox: initialize lowp float opacity\\n\\n // Calculate the distance of the pixel from the line in pixels.\\n float dist = length(v_normal) * v_width2.s;\\n\\n // Calculate the antialiasing fade factor. This is either when fading in\\n // the line in case of an offset line (v_width2.t) or when fading out\\n // (v_width2.s)\\n float blur2 = (blur + 1.0 / DEVICE_PIXEL_RATIO) * v_gamma_scale;\\n float alpha = clamp(min(dist - (v_width2.t - blur2), v_width2.s - dist) / blur2, 0.0, 1.0);\\n\\n gl_FragColor = color * (alpha * opacity);\\n\\n#ifdef OVERDRAW_INSPECTOR\\n gl_FragColor = vec4(1.0);\\n#endif\\n}\\n\",vertexSource:\"\\n\\n// the distance over which the line edge fades out.\\n// Retina devices need a smaller distance to avoid aliasing.\\n#define ANTIALIASING 1.0 / DEVICE_PIXEL_RATIO / 2.0\\n\\n// floor(127 / 2) == 63.0\\n// the maximum allowed miter limit is 2.0 at the moment. the extrude normal is\\n// stored in a byte (-128..127). we scale regular normals up to length 63, but\\n// there are also \\\"special\\\" normals that have a bigger length (of up to 126 in\\n// this case).\\n// #define scale 63.0\\n#define scale 0.015873016\\n\\nattribute vec2 a_pos;\\nattribute vec4 a_data;\\n\\nuniform mat4 u_matrix;\\nuniform mediump float u_ratio;\\nuniform mediump float u_width;\\nuniform vec2 u_gl_units_to_pixels;\\n\\nvarying vec2 v_normal;\\nvarying vec2 v_width2;\\nvarying float v_gamma_scale;\\n\\n#pragma mapbox: define lowp vec4 color\\n#pragma mapbox: define lowp float blur\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define mediump float gapwidth\\n#pragma mapbox: define lowp float offset\\n\\nvoid main() {\\n #pragma mapbox: initialize lowp vec4 color\\n #pragma mapbox: initialize lowp float blur\\n #pragma mapbox: initialize lowp float opacity\\n #pragma mapbox: initialize mediump float gapwidth\\n #pragma mapbox: initialize lowp float offset\\n\\n vec2 a_extrude = a_data.xy - 128.0;\\n float a_direction = mod(a_data.z, 4.0) - 1.0;\\n\\n // We store the texture normals in the most insignificant bit\\n // transform y so that 0 => -1 and 1 => 1\\n // In the texture normal, x is 0 if the normal points straight up/down and 1 if it's a round cap\\n // y is 1 if the normal points up, and -1 if it points down\\n mediump vec2 normal = mod(a_pos, 2.0);\\n normal.y = sign(normal.y - 0.5);\\n v_normal = normal;\\n\\n\\n // these transformations used to be applied in the JS and native code bases. \\n // moved them into the shader for clarity and simplicity. \\n gapwidth = gapwidth / 2.0;\\n float width = u_width / 2.0;\\n offset = -1.0 * offset; \\n\\n float inset = gapwidth + (gapwidth > 0.0 ? ANTIALIASING : 0.0);\\n float outset = gapwidth + width * (gapwidth > 0.0 ? 2.0 : 1.0) + ANTIALIASING;\\n\\n // Scale the extrusion vector down to a normal and then up by the line width\\n // of this vertex.\\n mediump vec2 dist = outset * a_extrude * scale;\\n\\n // Calculate the offset when drawing a line that is to the side of the actual line.\\n // We do this by creating a vector that points towards the extrude, but rotate\\n // it when we're drawing round end points (a_direction = -1 or 1) since their\\n // extrude vector points in another direction.\\n mediump float u = 0.5 * a_direction;\\n mediump float t = 1.0 - abs(u);\\n mediump vec2 offset2 = offset * a_extrude * scale * normal.y * mat2(t, -u, u, t);\\n\\n // Remove the texture normal bit to get the position\\n vec2 pos = floor(a_pos * 0.5);\\n\\n vec4 projected_extrude = u_matrix * vec4(dist / u_ratio, 0.0, 0.0);\\n gl_Position = u_matrix * vec4(pos + offset2 / u_ratio, 0.0, 1.0) + projected_extrude;\\n\\n // calculate how much the perspective view squishes or stretches the extrude\\n float extrude_length_without_perspective = length(dist);\\n float extrude_length_with_perspective = length(projected_extrude.xy / gl_Position.w * u_gl_units_to_pixels);\\n v_gamma_scale = extrude_length_without_perspective / extrude_length_with_perspective;\\n\\n v_width2 = vec2(outset, inset);\\n}\\n\"},linePattern:{fragmentSource:\"uniform vec2 u_pattern_size_a;\\nuniform vec2 u_pattern_size_b;\\nuniform vec2 u_pattern_tl_a;\\nuniform vec2 u_pattern_br_a;\\nuniform vec2 u_pattern_tl_b;\\nuniform vec2 u_pattern_br_b;\\nuniform float u_fade;\\n\\nuniform sampler2D u_image;\\n\\nvarying vec2 v_normal;\\nvarying vec2 v_width2;\\nvarying float v_linesofar;\\nvarying float v_gamma_scale;\\n\\n#pragma mapbox: define lowp float blur\\n#pragma mapbox: define lowp float opacity\\n\\nvoid main() {\\n #pragma mapbox: initialize lowp float blur\\n #pragma mapbox: initialize lowp float opacity\\n\\n // Calculate the distance of the pixel from the line in pixels.\\n float dist = length(v_normal) * v_width2.s;\\n\\n // Calculate the antialiasing fade factor. This is either when fading in\\n // the line in case of an offset line (v_width2.t) or when fading out\\n // (v_width2.s)\\n float blur2 = (blur + 1.0 / DEVICE_PIXEL_RATIO) * v_gamma_scale;\\n float alpha = clamp(min(dist - (v_width2.t - blur2), v_width2.s - dist) / blur2, 0.0, 1.0);\\n\\n float x_a = mod(v_linesofar / u_pattern_size_a.x, 1.0);\\n float x_b = mod(v_linesofar / u_pattern_size_b.x, 1.0);\\n float y_a = 0.5 + (v_normal.y * v_width2.s / u_pattern_size_a.y);\\n float y_b = 0.5 + (v_normal.y * v_width2.s / u_pattern_size_b.y);\\n vec2 pos_a = mix(u_pattern_tl_a, u_pattern_br_a, vec2(x_a, y_a));\\n vec2 pos_b = mix(u_pattern_tl_b, u_pattern_br_b, vec2(x_b, y_b));\\n\\n vec4 color = mix(texture2D(u_image, pos_a), texture2D(u_image, pos_b), u_fade);\\n\\n gl_FragColor = color * alpha * opacity;\\n\\n#ifdef OVERDRAW_INSPECTOR\\n gl_FragColor = vec4(1.0);\\n#endif\\n}\\n\",vertexSource:\"// floor(127 / 2) == 63.0\\n// the maximum allowed miter limit is 2.0 at the moment. the extrude normal is\\n// stored in a byte (-128..127). we scale regular normals up to length 63, but\\n// there are also \\\"special\\\" normals that have a bigger length (of up to 126 in\\n// this case).\\n// #define scale 63.0\\n#define scale 0.015873016\\n\\n// We scale the distance before adding it to the buffers so that we can store\\n// long distances for long segments. Use this value to unscale the distance.\\n#define LINE_DISTANCE_SCALE 2.0\\n\\n// the distance over which the line edge fades out.\\n// Retina devices need a smaller distance to avoid aliasing.\\n#define ANTIALIASING 1.0 / DEVICE_PIXEL_RATIO / 2.0\\n\\nattribute vec2 a_pos;\\nattribute vec4 a_data;\\n\\nuniform mat4 u_matrix;\\nuniform mediump float u_ratio;\\nuniform mediump float u_width;\\nuniform vec2 u_gl_units_to_pixels;\\n\\nvarying vec2 v_normal;\\nvarying vec2 v_width2;\\nvarying float v_linesofar;\\nvarying float v_gamma_scale;\\n\\n#pragma mapbox: define lowp float blur\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define lowp float offset\\n#pragma mapbox: define mediump float gapwidth\\n\\nvoid main() {\\n #pragma mapbox: initialize lowp float blur\\n #pragma mapbox: initialize lowp float opacity\\n #pragma mapbox: initialize lowp float offset\\n #pragma mapbox: initialize mediump float gapwidth\\n\\n vec2 a_extrude = a_data.xy - 128.0;\\n float a_direction = mod(a_data.z, 4.0) - 1.0;\\n float a_linesofar = (floor(a_data.z / 4.0) + a_data.w * 64.0) * LINE_DISTANCE_SCALE;\\n\\n // We store the texture normals in the most insignificant bit\\n // transform y so that 0 => -1 and 1 => 1\\n // In the texture normal, x is 0 if the normal points straight up/down and 1 if it's a round cap\\n // y is 1 if the normal points up, and -1 if it points down\\n mediump vec2 normal = mod(a_pos, 2.0);\\n normal.y = sign(normal.y - 0.5);\\n v_normal = normal;\\n\\n // these transformations used to be applied in the JS and native code bases. \\n // moved them into the shader for clarity and simplicity. \\n gapwidth = gapwidth / 2.0;\\n float width = u_width / 2.0;\\n offset = -1.0 * offset; \\n\\n float inset = gapwidth + (gapwidth > 0.0 ? ANTIALIASING : 0.0);\\n float outset = gapwidth + width * (gapwidth > 0.0 ? 2.0 : 1.0) + ANTIALIASING;\\n\\n // Scale the extrusion vector down to a normal and then up by the line width\\n // of this vertex.\\n mediump vec2 dist = outset * a_extrude * scale;\\n\\n // Calculate the offset when drawing a line that is to the side of the actual line.\\n // We do this by creating a vector that points towards the extrude, but rotate\\n // it when we're drawing round end points (a_direction = -1 or 1) since their\\n // extrude vector points in another direction.\\n mediump float u = 0.5 * a_direction;\\n mediump float t = 1.0 - abs(u);\\n mediump vec2 offset2 = offset * a_extrude * scale * normal.y * mat2(t, -u, u, t);\\n\\n // Remove the texture normal bit to get the position\\n vec2 pos = floor(a_pos * 0.5);\\n\\n vec4 projected_extrude = u_matrix * vec4(dist / u_ratio, 0.0, 0.0);\\n gl_Position = u_matrix * vec4(pos + offset2 / u_ratio, 0.0, 1.0) + projected_extrude;\\n\\n // calculate how much the perspective view squishes or stretches the extrude\\n float extrude_length_without_perspective = length(dist);\\n float extrude_length_with_perspective = length(projected_extrude.xy / gl_Position.w * u_gl_units_to_pixels);\\n v_gamma_scale = extrude_length_without_perspective / extrude_length_with_perspective;\\n\\n v_linesofar = a_linesofar;\\n v_width2 = vec2(outset, inset);\\n}\\n\"},lineSDF:{fragmentSource:\"\\nuniform sampler2D u_image;\\nuniform float u_sdfgamma;\\nuniform float u_mix;\\n\\nvarying vec2 v_normal;\\nvarying vec2 v_width2;\\nvarying vec2 v_tex_a;\\nvarying vec2 v_tex_b;\\nvarying float v_gamma_scale;\\n\\n#pragma mapbox: define lowp vec4 color\\n#pragma mapbox: define lowp float blur\\n#pragma mapbox: define lowp float opacity\\n\\nvoid main() {\\n #pragma mapbox: initialize lowp vec4 color\\n #pragma mapbox: initialize lowp float blur\\n #pragma mapbox: initialize lowp float opacity\\n\\n // Calculate the distance of the pixel from the line in pixels.\\n float dist = length(v_normal) * v_width2.s;\\n\\n // Calculate the antialiasing fade factor. This is either when fading in\\n // the line in case of an offset line (v_width2.t) or when fading out\\n // (v_width2.s)\\n float blur2 = (blur + 1.0 / DEVICE_PIXEL_RATIO) * v_gamma_scale;\\n float alpha = clamp(min(dist - (v_width2.t - blur2), v_width2.s - dist) / blur2, 0.0, 1.0);\\n\\n float sdfdist_a = texture2D(u_image, v_tex_a).a;\\n float sdfdist_b = texture2D(u_image, v_tex_b).a;\\n float sdfdist = mix(sdfdist_a, sdfdist_b, u_mix);\\n alpha *= smoothstep(0.5 - u_sdfgamma, 0.5 + u_sdfgamma, sdfdist);\\n\\n gl_FragColor = color * (alpha * opacity);\\n\\n#ifdef OVERDRAW_INSPECTOR\\n gl_FragColor = vec4(1.0);\\n#endif\\n}\\n\",vertexSource:\"// floor(127 / 2) == 63.0\\n// the maximum allowed miter limit is 2.0 at the moment. the extrude normal is\\n// stored in a byte (-128..127). we scale regular normals up to length 63, but\\n// there are also \\\"special\\\" normals that have a bigger length (of up to 126 in\\n// this case).\\n// #define scale 63.0\\n#define scale 0.015873016\\n\\n// We scale the distance before adding it to the buffers so that we can store\\n// long distances for long segments. Use this value to unscale the distance.\\n#define LINE_DISTANCE_SCALE 2.0\\n\\n// the distance over which the line edge fades out.\\n// Retina devices need a smaller distance to avoid aliasing.\\n#define ANTIALIASING 1.0 / DEVICE_PIXEL_RATIO / 2.0\\n\\nattribute vec2 a_pos;\\nattribute vec4 a_data;\\n\\nuniform mat4 u_matrix;\\nuniform mediump float u_ratio;\\nuniform vec2 u_patternscale_a;\\nuniform float u_tex_y_a;\\nuniform vec2 u_patternscale_b;\\nuniform float u_tex_y_b;\\nuniform vec2 u_gl_units_to_pixels;\\nuniform mediump float u_width;\\n\\nvarying vec2 v_normal;\\nvarying vec2 v_width2;\\nvarying vec2 v_tex_a;\\nvarying vec2 v_tex_b;\\nvarying float v_gamma_scale;\\n\\n#pragma mapbox: define lowp vec4 color\\n#pragma mapbox: define lowp float blur\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define mediump float gapwidth\\n#pragma mapbox: define lowp float offset\\n\\nvoid main() {\\n #pragma mapbox: initialize lowp vec4 color\\n #pragma mapbox: initialize lowp float blur\\n #pragma mapbox: initialize lowp float opacity\\n #pragma mapbox: initialize mediump float gapwidth\\n #pragma mapbox: initialize lowp float offset\\n\\n vec2 a_extrude = a_data.xy - 128.0;\\n float a_direction = mod(a_data.z, 4.0) - 1.0;\\n float a_linesofar = (floor(a_data.z / 4.0) + a_data.w * 64.0) * LINE_DISTANCE_SCALE;\\n\\n // We store the texture normals in the most insignificant bit\\n // transform y so that 0 => -1 and 1 => 1\\n // In the texture normal, x is 0 if the normal points straight up/down and 1 if it's a round cap\\n // y is 1 if the normal points up, and -1 if it points down\\n mediump vec2 normal = mod(a_pos, 2.0);\\n normal.y = sign(normal.y - 0.5);\\n v_normal = normal;\\n\\n // these transformations used to be applied in the JS and native code bases. \\n // moved them into the shader for clarity and simplicity. \\n gapwidth = gapwidth / 2.0;\\n float width = u_width / 2.0;\\n offset = -1.0 * offset;\\n \\n float inset = gapwidth + (gapwidth > 0.0 ? ANTIALIASING : 0.0);\\n float outset = gapwidth + width * (gapwidth > 0.0 ? 2.0 : 1.0) + ANTIALIASING;\\n\\n // Scale the extrusion vector down to a normal and then up by the line width\\n // of this vertex.\\n mediump vec2 dist =outset * a_extrude * scale;\\n\\n // Calculate the offset when drawing a line that is to the side of the actual line.\\n // We do this by creating a vector that points towards the extrude, but rotate\\n // it when we're drawing round end points (a_direction = -1 or 1) since their\\n // extrude vector points in another direction.\\n mediump float u = 0.5 * a_direction;\\n mediump float t = 1.0 - abs(u);\\n mediump vec2 offset2 = offset * a_extrude * scale * normal.y * mat2(t, -u, u, t);\\n\\n // Remove the texture normal bit to get the position\\n vec2 pos = floor(a_pos * 0.5);\\n\\n vec4 projected_extrude = u_matrix * vec4(dist / u_ratio, 0.0, 0.0);\\n gl_Position = u_matrix * vec4(pos + offset2 / u_ratio, 0.0, 1.0) + projected_extrude;\\n\\n // calculate how much the perspective view squishes or stretches the extrude\\n float extrude_length_without_perspective = length(dist);\\n float extrude_length_with_perspective = length(projected_extrude.xy / gl_Position.w * u_gl_units_to_pixels);\\n v_gamma_scale = extrude_length_without_perspective / extrude_length_with_perspective;\\n\\n v_tex_a = vec2(a_linesofar * u_patternscale_a.x, normal.y * u_patternscale_a.y + u_tex_y_a);\\n v_tex_b = vec2(a_linesofar * u_patternscale_b.x, normal.y * u_patternscale_b.y + u_tex_y_b);\\n\\n v_width2 = vec2(outset, inset);\\n}\\n\"\n},raster:{fragmentSource:\"uniform float u_fade_t;\\nuniform float u_opacity;\\nuniform sampler2D u_image0;\\nuniform sampler2D u_image1;\\nvarying vec2 v_pos0;\\nvarying vec2 v_pos1;\\n\\nuniform float u_brightness_low;\\nuniform float u_brightness_high;\\n\\nuniform float u_saturation_factor;\\nuniform float u_contrast_factor;\\nuniform vec3 u_spin_weights;\\n\\nvoid main() {\\n\\n // read and cross-fade colors from the main and parent tiles\\n vec4 color0 = texture2D(u_image0, v_pos0);\\n vec4 color1 = texture2D(u_image1, v_pos1);\\n vec4 color = mix(color0, color1, u_fade_t);\\n color.a *= u_opacity;\\n vec3 rgb = color.rgb;\\n\\n // spin\\n rgb = vec3(\\n dot(rgb, u_spin_weights.xyz),\\n dot(rgb, u_spin_weights.zxy),\\n dot(rgb, u_spin_weights.yzx));\\n\\n // saturation\\n float average = (color.r + color.g + color.b) / 3.0;\\n rgb += (average - rgb) * u_saturation_factor;\\n\\n // contrast\\n rgb = (rgb - 0.5) * u_contrast_factor + 0.5;\\n\\n // brightness\\n vec3 u_high_vec = vec3(u_brightness_low, u_brightness_low, u_brightness_low);\\n vec3 u_low_vec = vec3(u_brightness_high, u_brightness_high, u_brightness_high);\\n\\n gl_FragColor = vec4(mix(u_high_vec, u_low_vec, rgb) * color.a, color.a);\\n\\n#ifdef OVERDRAW_INSPECTOR\\n gl_FragColor = vec4(1.0);\\n#endif\\n}\\n\",vertexSource:\"uniform mat4 u_matrix;\\nuniform vec2 u_tl_parent;\\nuniform float u_scale_parent;\\nuniform float u_buffer_scale;\\n\\nattribute vec2 a_pos;\\nattribute vec2 a_texture_pos;\\n\\nvarying vec2 v_pos0;\\nvarying vec2 v_pos1;\\n\\nvoid main() {\\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\\n v_pos0 = (((a_texture_pos / 32767.0) - 0.5) / u_buffer_scale ) + 0.5;\\n v_pos1 = (v_pos0 * u_scale_parent) + u_tl_parent;\\n}\\n\"},symbolIcon:{fragmentSource:\"uniform sampler2D u_texture;\\nuniform sampler2D u_fadetexture;\\n\\n#pragma mapbox: define lowp float opacity\\n\\nvarying vec2 v_tex;\\nvarying vec2 v_fade_tex;\\n\\nvoid main() {\\n #pragma mapbox: initialize lowp float opacity\\n\\n lowp float alpha = texture2D(u_fadetexture, v_fade_tex).a * opacity;\\n gl_FragColor = texture2D(u_texture, v_tex) * alpha;\\n\\n#ifdef OVERDRAW_INSPECTOR\\n gl_FragColor = vec4(1.0);\\n#endif\\n}\\n\",vertexSource:\"\\nattribute vec4 a_pos_offset;\\nattribute vec2 a_texture_pos;\\nattribute vec4 a_data;\\n\\n#pragma mapbox: define lowp float opacity\\n\\n// matrix is for the vertex position.\\nuniform mat4 u_matrix;\\n\\nuniform mediump float u_zoom;\\nuniform bool u_rotate_with_map;\\nuniform vec2 u_extrude_scale;\\n\\nuniform vec2 u_texsize;\\n\\nvarying vec2 v_tex;\\nvarying vec2 v_fade_tex;\\n\\nvoid main() {\\n #pragma mapbox: initialize lowp float opacity\\n\\n vec2 a_pos = a_pos_offset.xy;\\n vec2 a_offset = a_pos_offset.zw;\\n\\n vec2 a_tex = a_texture_pos.xy;\\n mediump float a_labelminzoom = a_data[0];\\n mediump vec2 a_zoom = a_data.pq;\\n mediump float a_minzoom = a_zoom[0];\\n mediump float a_maxzoom = a_zoom[1];\\n\\n // u_zoom is the current zoom level adjusted for the change in font size\\n mediump float z = 2.0 - step(a_minzoom, u_zoom) - (1.0 - step(a_maxzoom, u_zoom));\\n\\n vec2 extrude = u_extrude_scale * (a_offset / 64.0);\\n if (u_rotate_with_map) {\\n gl_Position = u_matrix * vec4(a_pos + extrude, 0, 1);\\n gl_Position.z += z * gl_Position.w;\\n } else {\\n gl_Position = u_matrix * vec4(a_pos, 0, 1) + vec4(extrude, 0, 0);\\n }\\n\\n v_tex = a_tex / u_texsize;\\n v_fade_tex = vec2(a_labelminzoom / 255.0, 0.0);\\n}\\n\"},symbolSDF:{fragmentSource:\"#define SDF_PX 8.0\\n#define EDGE_GAMMA 0.105/DEVICE_PIXEL_RATIO\\n\\nuniform bool u_is_halo;\\n#pragma mapbox: define lowp vec4 fill_color\\n#pragma mapbox: define lowp vec4 halo_color\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define lowp float halo_width\\n#pragma mapbox: define lowp float halo_blur\\n\\nuniform sampler2D u_texture;\\nuniform sampler2D u_fadetexture;\\nuniform lowp float u_font_scale;\\nuniform highp float u_gamma_scale;\\n\\nvarying vec2 v_tex;\\nvarying vec2 v_fade_tex;\\nvarying float v_gamma_scale;\\n\\nvoid main() {\\n #pragma mapbox: initialize lowp vec4 fill_color\\n #pragma mapbox: initialize lowp vec4 halo_color\\n #pragma mapbox: initialize lowp float opacity\\n #pragma mapbox: initialize lowp float halo_width\\n #pragma mapbox: initialize lowp float halo_blur\\n\\n lowp vec4 color = fill_color;\\n highp float gamma = EDGE_GAMMA / u_gamma_scale;\\n lowp float buff = (256.0 - 64.0) / 256.0;\\n if (u_is_halo) {\\n color = halo_color;\\n gamma = (halo_blur * 1.19 / SDF_PX + EDGE_GAMMA) / u_gamma_scale;\\n buff = (6.0 - halo_width / u_font_scale) / SDF_PX;\\n }\\n\\n lowp float dist = texture2D(u_texture, v_tex).a;\\n lowp float fade_alpha = texture2D(u_fadetexture, v_fade_tex).a;\\n highp float gamma_scaled = gamma * v_gamma_scale;\\n highp float alpha = smoothstep(buff - gamma_scaled, buff + gamma_scaled, dist) * fade_alpha;\\n\\n gl_FragColor = color * (alpha * opacity);\\n\\n#ifdef OVERDRAW_INSPECTOR\\n gl_FragColor = vec4(1.0);\\n#endif\\n}\\n\",vertexSource:\"const float PI = 3.141592653589793;\\n\\nattribute vec4 a_pos_offset;\\nattribute vec2 a_texture_pos;\\nattribute vec4 a_data;\\n\\n#pragma mapbox: define lowp vec4 fill_color\\n#pragma mapbox: define lowp vec4 halo_color\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define lowp float halo_width\\n#pragma mapbox: define lowp float halo_blur\\n\\n// matrix is for the vertex position.\\nuniform mat4 u_matrix;\\n\\nuniform mediump float u_zoom;\\nuniform bool u_rotate_with_map;\\nuniform bool u_pitch_with_map;\\nuniform mediump float u_pitch;\\nuniform mediump float u_bearing;\\nuniform mediump float u_aspect_ratio;\\nuniform vec2 u_extrude_scale;\\n\\nuniform vec2 u_texsize;\\n\\nvarying vec2 v_tex;\\nvarying vec2 v_fade_tex;\\nvarying float v_gamma_scale;\\n\\nvoid main() {\\n #pragma mapbox: initialize lowp vec4 fill_color\\n #pragma mapbox: initialize lowp vec4 halo_color\\n #pragma mapbox: initialize lowp float opacity\\n #pragma mapbox: initialize lowp float halo_width\\n #pragma mapbox: initialize lowp float halo_blur\\n\\n vec2 a_pos = a_pos_offset.xy;\\n vec2 a_offset = a_pos_offset.zw;\\n\\n vec2 a_tex = a_texture_pos.xy;\\n mediump float a_labelminzoom = a_data[0];\\n mediump vec2 a_zoom = a_data.pq;\\n mediump float a_minzoom = a_zoom[0];\\n mediump float a_maxzoom = a_zoom[1];\\n\\n // u_zoom is the current zoom level adjusted for the change in font size\\n mediump float z = 2.0 - step(a_minzoom, u_zoom) - (1.0 - step(a_maxzoom, u_zoom));\\n\\n // pitch-alignment: map\\n // rotation-alignment: map | viewport\\n if (u_pitch_with_map) {\\n lowp float angle = u_rotate_with_map ? (a_data[1] / 256.0 * 2.0 * PI) : u_bearing;\\n lowp float asin = sin(angle);\\n lowp float acos = cos(angle);\\n mat2 RotationMatrix = mat2(acos, asin, -1.0 * asin, acos);\\n vec2 offset = RotationMatrix * a_offset;\\n vec2 extrude = u_extrude_scale * (offset / 64.0);\\n gl_Position = u_matrix * vec4(a_pos + extrude, 0, 1);\\n gl_Position.z += z * gl_Position.w;\\n // pitch-alignment: viewport\\n // rotation-alignment: map\\n } else if (u_rotate_with_map) {\\n // foreshortening factor to apply on pitched maps\\n // as a label goes from horizontal <=> vertical in angle\\n // it goes from 0% foreshortening to up to around 70% foreshortening\\n lowp float pitchfactor = 1.0 - cos(u_pitch * sin(u_pitch * 0.75));\\n\\n lowp float lineangle = a_data[1] / 256.0 * 2.0 * PI;\\n\\n // use the lineangle to position points a,b along the line\\n // project the points and calculate the label angle in projected space\\n // this calculation allows labels to be rendered unskewed on pitched maps\\n vec4 a = u_matrix * vec4(a_pos, 0, 1);\\n vec4 b = u_matrix * vec4(a_pos + vec2(cos(lineangle),sin(lineangle)), 0, 1);\\n lowp float angle = atan((b[1]/b[3] - a[1]/a[3])/u_aspect_ratio, b[0]/b[3] - a[0]/a[3]);\\n lowp float asin = sin(angle);\\n lowp float acos = cos(angle);\\n mat2 RotationMatrix = mat2(acos, -1.0 * asin, asin, acos);\\n\\n vec2 offset = RotationMatrix * (vec2((1.0-pitchfactor)+(pitchfactor*cos(angle*2.0)), 1.0) * a_offset);\\n vec2 extrude = u_extrude_scale * (offset / 64.0);\\n gl_Position = u_matrix * vec4(a_pos, 0, 1) + vec4(extrude, 0, 0);\\n gl_Position.z += z * gl_Position.w;\\n // pitch-alignment: viewport\\n // rotation-alignment: viewport\\n } else {\\n vec2 extrude = u_extrude_scale * (a_offset / 64.0);\\n gl_Position = u_matrix * vec4(a_pos, 0, 1) + vec4(extrude, 0, 0);\\n }\\n\\n v_gamma_scale = gl_Position.w;\\n\\n v_tex = a_tex / u_texsize;\\n v_fade_tex = vec2(a_labelminzoom / 255.0, 0.0);\\n}\\n\"}};\n},{\"path\":23}],80:[function(require,module,exports){\n\"use strict\";var VertexArrayObject=function(){this.boundProgram=null,this.boundVertexBuffer=null,this.boundVertexBuffer2=null,this.boundElementBuffer=null,this.boundVertexOffset=null,this.vao=null};VertexArrayObject.prototype.bind=function(e,t,r,i,n,o){void 0===e.extVertexArrayObject&&(e.extVertexArrayObject=e.getExtension(\"OES_vertex_array_object\"));var s=!this.vao||this.boundProgram!==t||this.boundVertexBuffer!==r||this.boundVertexBuffer2!==n||this.boundElementBuffer!==i||this.boundVertexOffset!==o;!e.extVertexArrayObject||s?(this.freshBind(e,t,r,i,n,o),this.gl=e):e.extVertexArrayObject.bindVertexArrayOES(this.vao)},VertexArrayObject.prototype.freshBind=function(e,t,r,i,n,o){var s,u=t.numAttributes;if(e.extVertexArrayObject)this.vao&&this.destroy(),this.vao=e.extVertexArrayObject.createVertexArrayOES(),e.extVertexArrayObject.bindVertexArrayOES(this.vao),s=0,this.boundProgram=t,this.boundVertexBuffer=r,this.boundVertexBuffer2=n,this.boundElementBuffer=i,this.boundVertexOffset=o;else{s=e.currentNumAttributes||0;for(var b=u;bthis.maxzoom?Math.pow(2,t.coord.z-this.maxzoom):1,r={type:this.type,uid:t.uid,coord:t.coord,zoom:t.coord.z,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,overscaling:i,angle:this.map.transform.angle,pitch:this.map.transform.pitch,showCollisionBoxes:this.map.showCollisionBoxes};t.workerID=this.dispatcher.send(\"loadTile\",r,function(i,r){if(t.unloadVectorData(),!t.aborted)return i?e(i):(t.loadVectorData(r,o.map.painter),t.redoWhenDone&&(t.redoWhenDone=!1,t.redoPlacement(o)),e(null))},this.workerID)},e.prototype.abortTile=function(t){t.aborted=!0},e.prototype.unloadTile=function(t){t.unloadVectorData(),this.dispatcher.send(\"removeTile\",{uid:t.uid,type:this.type,source:this.id},function(){},t.workerID)},e.prototype.onRemove=function(){this.dispatcher.broadcast(\"removeSource\",{type:this.type,source:this.id},function(){})},e.prototype.serialize=function(){return{type:this.type,data:this._data}},e}(Evented);module.exports=GeoJSONSource;\n},{\"../data/extent\":54,\"../util/evented\":200,\"../util/util\":212,\"../util/window\":194}],83:[function(require,module,exports){\n\"use strict\";var ajax=require(\"../util/ajax\"),rewind=require(\"geojson-rewind\"),GeoJSONWrapper=require(\"./geojson_wrapper\"),vtpbf=require(\"vt-pbf\"),supercluster=require(\"supercluster\"),geojsonvt=require(\"geojson-vt\"),VectorTileWorkerSource=require(\"./vector_tile_worker_source\"),GeoJSONWorkerSource=function(e){function r(r,t,o){e.call(this,r,t),o&&(this.loadGeoJSON=o),this._geoJSONIndexes={}}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.loadVectorData=function(e,r){var t=e.source,o=e.coord;if(!this._geoJSONIndexes[t])return r(null,null);var n=this._geoJSONIndexes[t].getTile(Math.min(o.z,e.maxZoom),o.x,o.y);if(!n)return r(null,null);var u=new GeoJSONWrapper(n.features);u.name=\"_geojsonTileLayer\";var a=vtpbf({layers:{_geojsonTileLayer:u}});0===a.byteOffset&&a.byteLength===a.buffer.byteLength||(a=new Uint8Array(a)),u.rawData=a.buffer,r(null,u)},r.prototype.loadData=function(e,r){var t=function(t,o){var n=this;return t?r(t):\"object\"!=typeof o?r(new Error(\"Input data is not a valid GeoJSON object.\")):(rewind(o,!0),void this._indexData(o,e,function(t,o){return t?r(t):(n._geoJSONIndexes[e.source]=o,void r(null))}))}.bind(this);this.loadGeoJSON(e,t)},r.prototype.loadGeoJSON=function(e,r){if(e.url)ajax.getJSON(e.url,r);else{if(\"string\"!=typeof e.data)return r(new Error(\"Input data is not a valid GeoJSON object.\"));try{return r(null,JSON.parse(e.data))}catch(e){return r(new Error(\"Input data is not a valid GeoJSON object.\"))}}},r.prototype.removeSource=function(e){this._geoJSONIndexes[e.source]&&delete this._geoJSONIndexes[e.source]},r.prototype._indexData=function(e,r,t){try{r.cluster?t(null,supercluster(r.superclusterOptions).load(e.features)):t(null,geojsonvt(e,r.geojsonVtOptions))}catch(e){return t(e)}},r}(VectorTileWorkerSource);module.exports=GeoJSONWorkerSource;\n},{\"../util/ajax\":191,\"./geojson_wrapper\":84,\"./vector_tile_worker_source\":96,\"geojson-rewind\":7,\"geojson-vt\":11,\"supercluster\":29,\"vt-pbf\":38}],84:[function(require,module,exports){\n\"use strict\";var Point=require(\"point-geometry\"),VectorTileFeature=require(\"vector-tile\").VectorTileFeature,EXTENT=require(\"../data/extent\"),FeatureWrapper=function(e){var t=this;if(this.type=e.type,1===e.type){this.rawGeometry=[];for(var r=0;rt)){var n=Math.pow(2,Math.min(a.coord.z,i._source.maxzoom)-Math.min(e.z,i._source.maxzoom));if(Math.floor(a.coord.x/n)===e.x&&Math.floor(a.coord.y/n)===e.y)for(o[s]=!0,r=!0;a&&a.coord.z-1>e.z;){var d=a.coord.parent(i._source.maxzoom).id;a=i._tiles[d],a&&a.hasData()&&(delete o[s],o[d]=!0)}}}return r},t.prototype.findLoadedParent=function(e,t,o){for(var i=this,r=e.z-1;r>=t;r--){e=e.parent(i._source.maxzoom);var s=i._tiles[e.id];if(s&&s.hasData())return o[e.id]=!0,s;if(i._cache.has(e.id))return o[e.id]=!0,i._cache.getWithoutRemoving(e.id)}},t.prototype.updateCacheSize=function(e){var t=Math.ceil(e.width/e.tileSize)+1,o=Math.ceil(e.height/e.tileSize)+1,i=t*o,r=5;this._cache.setMaxSize(Math.floor(i*r))},t.prototype.update=function(e){var o=this;if(this.transform=e,this._sourceLoaded){var i,r,s,a;this.updateCacheSize(e);var n=(this._source.roundZoom?Math.round:Math.floor)(this.getZoom(e)),d=Math.max(n-t.maxOverzooming,this._source.minzoom),c=Math.max(n+t.maxUnderzooming,this._source.minzoom),h={};this._coveredTiles={};var u;for(u=this.used?this._source.coord?[this._source.coord]:e.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}):[],i=0;i=Date.now())&&(o.findLoadedChildren(r,c,h)&&(h[_]=!0),a=o.findLoadedParent(r,d,l),a&&o.addTile(a.coord))}var f;for(f in l)h[f]||(o._coveredTiles[f]=!0);for(f in l)h[f]=!0;var T=util.keysDifference(this._tiles,h);for(i=0;ithis._source.maxzoom?Math.pow(2,r-this._source.maxzoom):1;t=new Tile(o,this._source.tileSize*s,this._source.maxzoom),this.loadTile(t,this._tileLoaded.bind(this,t,e.id,t.state))}return t.uses++,this._tiles[e.id]=t,i||this._source.fire(\"dataloading\",{tile:t,coord:t.coord,dataType:\"source\"}),t},t.prototype._setTileReloadTimer=function(e,t){var o=this,i=t.getExpiryTimeout();i&&(this._timers[e]=setTimeout(function(){o.reloadTile(e,\"expired\"),o._timers[e]=void 0},i))},t.prototype._setCacheInvalidationTimer=function(e,t){var o=this,i=t.getExpiryTimeout();i&&(this._cacheTimers[e]=setTimeout(function(){o._cache.remove(e),o._cacheTimers[e]=void 0},i))},t.prototype.removeTile=function(e){var t=this._tiles[e];if(t&&(t.uses--,delete this._tiles[e],this._timers[e]&&(clearTimeout(this._timers[e]),this._timers[e]=void 0),!(t.uses>0)))if(t.hasData()){var o=t.coord.wrapped().id;this._cache.add(o,t),this._setCacheInvalidationTimer(o,t)}else t.aborted=!0,this.abortTile(t),this.unloadTile(t)},t.prototype.clearTiles=function(){var e=this;for(var t in e._tiles)e.removeTile(t);this._cache.reset()},t.prototype.tilesIn=function(e){for(var t=this,o={},i=this.getIds(),r=1/0,s=1/0,a=-(1/0),n=-(1/0),d=e[0].zoom,c=0;c=0&&p[1].y>=0){for(var _=[],f=0;fo)r=!1;else if(t)if(this.expirationTimei.row){var o=t;t=i,i=o}return{x0:t.column,y0:t.row,x1:i.column,y1:i.row,dx:i.column-t.column,dy:i.row-t.row}}function scanSpans(t,i,o,r,e){var n=Math.max(o,Math.floor(i.y0)),h=Math.min(r,Math.ceil(i.y1));if(t.x0===i.x0&&t.y0===i.y0?t.x0+i.dy/t.dy*t.dx0,l=i.dx<0,u=n;ua.dy&&(h=s,s=a,a=h),s.dy>d.dy&&(h=s,s=d,d=h),a.dy>d.dy&&(h=a,a=d,d=h),s.dy&&scanSpans(d,s,r,e,n),a.dy&&scanSpans(d,a,r,e,n)}function getQuadkey(t,i,o){for(var r,e=\"\",n=t;n>0;n--)r=1<t?new TileCoord(this.z-1,this.x,this.y,this.w):new TileCoord(this.z-1,Math.floor(this.x/2),Math.floor(this.y/2),this.w)},TileCoord.prototype.wrapped=function(){return new TileCoord(this.z,this.x,this.y,0)},TileCoord.prototype.children=function(t){if(this.z>=t)return[new TileCoord(this.z+1,this.x,this.y,this.w)];var i=this.z+1,o=2*this.x,r=2*this.y;return[new TileCoord(i,o,r,this.w),new TileCoord(i,o+1,r,this.w),new TileCoord(i,o,r+1,this.w),new TileCoord(i,o+1,r+1,this.w)]},TileCoord.cover=function(t,i,o,r){function e(t,i,e){var s,a,d,y;if(e>=0&&e<=n)for(s=t;sthis.maxzoom?Math.pow(2,e.coord.z-this.maxzoom):1,r={url:normalizeURL(e.coord.url(this.tiles,this.maxzoom,this.scheme),this.url),uid:e.uid,coord:e.coord,zoom:e.coord.z,tileSize:this.tileSize*o,type:this.type,source:this.id,overscaling:o,angle:this.map.transform.angle,pitch:this.map.transform.pitch,showCollisionBoxes:this.map.showCollisionBoxes};e.workerID&&\"expired\"!==e.state?\"loading\"===e.state?e.reloadCallback=t:this.dispatcher.send(\"reloadTile\",r,i.bind(this),e.workerID):e.workerID=this.dispatcher.send(\"loadTile\",r,i.bind(this))},t.prototype.abortTile=function(e){this.dispatcher.send(\"abortTile\",{uid:e.uid,type:this.type,source:this.id},null,e.workerID)},t.prototype.unloadTile=function(e){e.unloadVectorData(),this.dispatcher.send(\"removeTile\",{uid:e.uid,type:this.type,source:this.id},null,e.workerID)},t}(Evented);module.exports=VectorTileSource;\n},{\"../util/evented\":200,\"../util/mapbox\":208,\"../util/util\":212,\"./load_tilejson\":86}],96:[function(require,module,exports){\n\"use strict\";var ajax=require(\"../util/ajax\"),vt=require(\"vector-tile\"),Protobuf=require(\"pbf\"),WorkerTile=require(\"./worker_tile\"),util=require(\"../util/util\"),VectorTileWorkerSource=function(e,r,t){this.actor=e,this.layerIndex=r,t&&(this.loadVectorData=t),this.loading={},this.loaded={}};VectorTileWorkerSource.prototype.loadTile=function(e,r){function t(e,t){return delete this.loading[o][i],e?r(e):t?(a.vectorTile=t,a.parse(t,this.layerIndex,this.actor,function(e,o,i){if(e)return r(e);var a={};t.expires&&(a.expires=t.expires),t.cacheControl&&(a.cacheControl=t.cacheControl),r(null,util.extend({rawTileData:t.rawData},o,a),i)}),this.loaded[o]=this.loaded[o]||{},void(this.loaded[o][i]=a)):r(null,null)}var o=e.source,i=e.uid;this.loading[o]||(this.loading[o]={});var a=this.loading[o][i]=new WorkerTile(e);a.abort=this.loadVectorData(e,t.bind(this))},VectorTileWorkerSource.prototype.reloadTile=function(e,r){function t(e,t){if(this.reloadCallback){var o=this.reloadCallback;delete this.reloadCallback,this.parse(this.vectorTile,a.layerIndex,a.actor,o)}r(e,t)}var o=this.loaded[e.source],i=e.uid,a=this;if(o&&o[i]){var l=o[i];\"parsing\"===l.status?l.reloadCallback=r:\"done\"===l.status&&l.parse(l.vectorTile,this.layerIndex,this.actor,t.bind(l))}},VectorTileWorkerSource.prototype.abortTile=function(e){var r=this.loading[e.source],t=e.uid;r&&r[t]&&r[t].abort&&(r[t].abort(),delete r[t])},VectorTileWorkerSource.prototype.removeTile=function(e){var r=this.loaded[e.source],t=e.uid;r&&r[t]&&delete r[t]},VectorTileWorkerSource.prototype.loadVectorData=function(e,r){function t(e,t){if(e)return r(e);var o=new vt.VectorTile(new Protobuf(t.data));o.rawData=t.data,o.cacheControl=t.cacheControl,o.expires=t.expires,r(e,o)}var o=ajax.getArrayBuffer(e.url,t.bind(this));return function(){o.abort()}},VectorTileWorkerSource.prototype.redoPlacement=function(e,r){var t=this.loaded[e.source],o=this.loading[e.source],i=e.uid;if(t&&t[i]){var a=t[i],l=a.redoPlacement(e.angle,e.pitch,e.showCollisionBoxes);l.result&&r(null,l.result,l.transferables)}else o&&o[i]&&(o[i].angle=e.angle)},module.exports=VectorTileWorkerSource;\n},{\"../util/ajax\":191,\"../util/util\":212,\"./worker_tile\":99,\"pbf\":25,\"vector-tile\":34}],97:[function(require,module,exports){\n\"use strict\";var ajax=require(\"../util/ajax\"),ImageSource=require(\"./image_source\"),VideoSource=function(t){function e(e,o,i,r){t.call(this,e,o,i,r),this.roundZoom=!0,this.type=\"video\",this.options=o}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.load=function(){var t=this,e=this.options;this.urls=e.urls,ajax.getVideo(e.urls,function(e,o){if(e)return t.fire(\"error\",{error:e});t.video=o,t.video.loop=!0;var i;t.video.addEventListener(\"playing\",function(){i=t.map.style.animationLoop.set(1/0),t.map._rerender()}),t.video.addEventListener(\"pause\",function(){t.map.style.animationLoop.cancel(i)}),t.map&&t.video.play(),t._finishLoading()})},e.prototype.getVideo=function(){return this.video},e.prototype.onAdd=function(t){this.map||(this.load(),this.map=t,this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},e.prototype.prepare=function(){!this.tile||this.video.readyState<2||this._prepareImage(this.map.painter.gl,this.video)},e.prototype.serialize=function(){return{type:\"video\",urls:this.urls,coordinates:this.coordinates}},e}(ImageSource);module.exports=VideoSource;\n},{\"../util/ajax\":191,\"./image_source\":85}],98:[function(require,module,exports){\n\"use strict\";var Actor=require(\"../util/actor\"),StyleLayerIndex=require(\"../style/style_layer_index\"),VectorTileWorkerSource=require(\"./vector_tile_worker_source\"),GeoJSONWorkerSource=require(\"./geojson_worker_source\"),globalRTLTextPlugin=require(\"./rtl_text_plugin\"),Worker=function(e){var r=this;this.self=e,this.actor=new Actor(e,this),this.layerIndexes={},this.workerSourceTypes={vector:VectorTileWorkerSource,geojson:GeoJSONWorkerSource},this.workerSources={},this.self.registerWorkerSource=function(e,o){if(r.workerSourceTypes[e])throw new Error('Worker source with name \"'+e+'\" already registered.');r.workerSourceTypes[e]=o},this.self.registerRTLTextPlugin=function(e){if(globalRTLTextPlugin.applyArabicShaping||globalRTLTextPlugin.processBidirectionalText)throw new Error(\"RTL text plugin already registered.\");globalRTLTextPlugin.applyArabicShaping=e.applyArabicShaping,globalRTLTextPlugin.processBidirectionalText=e.processBidirectionalText}};Worker.prototype.setLayers=function(e,r){this.getLayerIndex(e).replace(r)},Worker.prototype.updateLayers=function(e,r){this.getLayerIndex(e).update(r.layers,r.removedIds,r.symbolOrder)},Worker.prototype.loadTile=function(e,r,o){this.getWorkerSource(e,r.type).loadTile(r,o)},Worker.prototype.reloadTile=function(e,r,o){this.getWorkerSource(e,r.type).reloadTile(r,o)},Worker.prototype.abortTile=function(e,r){this.getWorkerSource(e,r.type).abortTile(r)},Worker.prototype.removeTile=function(e,r){this.getWorkerSource(e,r.type).removeTile(r)},Worker.prototype.removeSource=function(e,r){var o=this.getWorkerSource(e,r.type);void 0!==o.removeSource&&o.removeSource(r)},Worker.prototype.redoPlacement=function(e,r,o){this.getWorkerSource(e,r.type).redoPlacement(r,o)},Worker.prototype.loadWorkerSource=function(e,r,o){try{this.self.importScripts(r.url),o()}catch(e){o(e)}},Worker.prototype.loadRTLTextPlugin=function(e,r,o){try{globalRTLTextPlugin.applyArabicShaping||globalRTLTextPlugin.processBidirectionalText||this.self.importScripts(r)}catch(e){o(e)}},Worker.prototype.getLayerIndex=function(e){var r=this.layerIndexes[e];return r||(r=this.layerIndexes[e]=new StyleLayerIndex),r},Worker.prototype.getWorkerSource=function(e,r){var o=this;if(this.workerSources[e]||(this.workerSources[e]={}),!this.workerSources[e][r]){var t={send:function(r,t,i,n){o.actor.send(r,t,i,n,e)}};this.workerSources[e][r]=new this.workerSourceTypes[r](t,this.getLayerIndex(e))}return this.workerSources[e][r]},module.exports=function(e){return new Worker(e)};\n},{\"../style/style_layer_index\":154,\"../util/actor\":190,\"./geojson_worker_source\":83,\"./rtl_text_plugin\":90,\"./vector_tile_worker_source\":96}],99:[function(require,module,exports){\n\"use strict\";function recalculateLayers(e,i){for(var r=0,o=e.layers;r=B.maxzoom||B.layout&&\"none\"===B.layout.visibility)){for(var b=0,k=x;b=0;w--){var A=n[i.symbolOrder[w]];A&&t.symbolBuckets.push(A)}if(0===this.symbolBuckets.length)return T(new CollisionTile(this.angle,this.pitch,this.collisionBoxArray));var D=0,I=Object.keys(c.iconDependencies),O=util.mapObject(c.glyphDependencies,function(e){return Object.keys(e).map(Number)}),L=function(e){if(e)return o(e);if(D++,2===D){for(var i=new CollisionTile(t.angle,t.pitch,t.collisionBoxArray),r=0,s=t.symbolBuckets;r\"===i||\"<=\"===i||\">=\"===i?compileComparisonOp(e[1],e[2],i,!0):\"any\"===i?compileLogicalOp(e.slice(1),\"||\"):\"all\"===i?compileLogicalOp(e.slice(1),\"&&\"):\"none\"===i?compileNegation(compileLogicalOp(e.slice(1),\"||\")):\"in\"===i?compileInOp(e[1],e.slice(2)):\"!in\"===i?compileNegation(compileInOp(e[1],e.slice(2))):\"has\"===i?compileHasOp(e[1]):\"!has\"===i?compileNegation(compileHasOp(e[1])):\"true\";return\"(\"+n+\")\"}function compilePropertyReference(e){return\"$type\"===e?\"f.type\":\"$id\"===e?\"f.id\":\"p[\"+JSON.stringify(e)+\"]\"}function compileComparisonOp(e,i,n,r){var o=compilePropertyReference(e),t=\"$type\"===e?types.indexOf(i):JSON.stringify(i);return(r?\"typeof \"+o+\"=== typeof \"+t+\"&&\":\"\")+o+n+t}function compileLogicalOp(e,i){return e.map(compile).join(i)}function compileInOp(e,i){\"$type\"===e&&(i=i.map(function(e){return types.indexOf(e)}));var n=JSON.stringify(i.sort(compare)),r=compilePropertyReference(e);return i.length<=200?n+\".indexOf(\"+r+\") !== -1\":\"function(v, a, i, j) {while (i <= j) { var m = (i + j) >> 1; if (a[m] === v) return true; if (a[m] > v) j = m - 1; else i = m + 1;}return false; }(\"+r+\", \"+n+\",0,\"+(i.length-1)+\")\"}function compileHasOp(e){return\"$id\"===e?'\"id\" in f':JSON.stringify(e)+\" in p\"}function compileNegation(e){return\"!(\"+e+\")\"}function compare(e,i){return ei?1:0}module.exports=createFilter;var types=[\"Unknown\",\"Point\",\"LineString\",\"Polygon\"];\n},{}],104:[function(require,module,exports){\n\"use strict\";function xyz2lab(r){return r>t3?Math.pow(r,1/3):r/t2+t0}function lab2xyz(r){return r>t1?r*r*r:t2*(r-t0)}function xyz2rgb(r){return 255*(r<=.0031308?12.92*r:1.055*Math.pow(r,1/2.4)-.055)}function rgb2xyz(r){return r/=255,r<=.04045?r/12.92:Math.pow((r+.055)/1.055,2.4)}function rgbToLab(r){var t=rgb2xyz(r[0]),a=rgb2xyz(r[1]),n=rgb2xyz(r[2]),b=xyz2lab((.4124564*t+.3575761*a+.1804375*n)/Xn),o=xyz2lab((.2126729*t+.7151522*a+.072175*n)/Yn),g=xyz2lab((.0193339*t+.119192*a+.9503041*n)/Zn);return[116*o-16,500*(b-o),200*(o-g),r[3]]}function labToRgb(r){var t=(r[0]+16)/116,a=isNaN(r[1])?t:t+r[1]/500,n=isNaN(r[2])?t:t-r[2]/200;return t=Yn*lab2xyz(t),a=Xn*lab2xyz(a),n=Zn*lab2xyz(n),[xyz2rgb(3.2404542*a-1.5371385*t-.4985314*n),xyz2rgb(-.969266*a+1.8760108*t+.041556*n),xyz2rgb(.0556434*a-.2040259*t+1.0572252*n),r[3]]}function rgbToHcl(r){var t=rgbToLab(r),a=t[0],n=t[1],b=t[2],o=Math.atan2(b,n)*rad2deg;return[o<0?o+360:o,Math.sqrt(n*n+b*b),a,r[3]]}function hclToRgb(r){var t=r[0]*deg2rad,a=r[1],n=r[2];return labToRgb([n,Math.cos(t)*a,Math.sin(t)*a,r[3]])}var Xn=.95047,Yn=1,Zn=1.08883,t0=4/29,t1=6/29,t2=3*t1*t1,t3=t1*t1*t1,deg2rad=Math.PI/180,rad2deg=180/Math.PI;module.exports={lab:{forward:rgbToLab,reverse:labToRgb},hcl:{forward:rgbToHcl,reverse:hclToRgb}};\n},{}],105:[function(require,module,exports){\n\"use strict\";function identityFunction(t){return t}function createFunction(t,e){var o,n=\"color\"===e.type;if(isFunctionDefinition(t)){var r=t.stops&&\"object\"==typeof t.stops[0][0],a=r||void 0!==t.property,i=r||!a,s=t.type||(\"interpolated\"===e.function?\"exponential\":\"interval\");n&&(t=extend({},t),t.stops&&(t.stops=t.stops.map(function(t){return[t[0],parseColor(t[1])]})),t.default?t.default=parseColor(t.default):t.default=parseColor(e.default));var u,p,l;if(\"exponential\"===s)u=evaluateExponentialFunction;else if(\"interval\"===s)u=evaluateIntervalFunction;else if(\"categorical\"===s){u=evaluateCategoricalFunction,p=Object.create(null);for(var c=0,f=t.stops;c=t.stops[n-1][0])return t.stops[n-1][1];var r=binarySearchForIndex(t.stops,o);return t.stops[r][1]}function evaluateExponentialFunction(t,e,o){var n=void 0!==t.base?t.base:1;if(\"number\"!==getType(o))return coalesce(t.default,e.default);var r=t.stops.length;if(1===r)return t.stops[0][1];if(o<=t.stops[0][0])return t.stops[0][1];if(o>=t.stops[r-1][0])return t.stops[r-1][1];var a=binarySearchForIndex(t.stops,o);return interpolate(o,n,t.stops[a][0],t.stops[a+1][0],t.stops[a][1],t.stops[a+1][1])}function evaluateIdentityFunction(t,e,o){return\"color\"===e.type?o=parseColor(o):getType(o)!==e.type&&(o=void 0),coalesce(o,t.default,e.default)}function binarySearchForIndex(t,e){for(var o,n,r=t.length,a=0,i=r-1,s=0;a<=i;){if(s=Math.floor((a+i)/2),o=t[s][0],n=t[s+1][0],e>=o&&ee&&(i=s-1)}return Math.max(s-1,0)}function interpolate(t,e,o,n,r,a){return\"function\"==typeof r?function(){var i=r.apply(void 0,arguments),s=a.apply(void 0,arguments);if(void 0!==i&&void 0!==s)return interpolate(t,e,o,n,i,s)}:r.length?interpolateArray(t,e,o,n,r,a):interpolateNumber(t,e,o,n,r,a)}function interpolateNumber(t,e,o,n,r,a){var i,s=n-o,u=t-o;return i=1===e?u/s:(Math.pow(e,u)-1)/(Math.pow(e,s)-1),r*(1-i)+a*i}function interpolateArray(t,e,o,n,r,a){for(var i=[],s=0;s255?255:e}function clamp_css_float(e){return e<0?0:e>1?1:e}function parse_css_int(e){return clamp_css_byte(\"%\"===e[e.length-1]?parseFloat(e)/100*255:parseInt(e))}function parse_css_float(e){return clamp_css_float(\"%\"===e[e.length-1]?parseFloat(e)/100:parseFloat(e))}function css_hue_to_rgb(e,r,l){return l<0?l+=1:l>1&&(l-=1),6*l<1?e+(r-e)*l*6:2*l<1?r:3*l<2?e+(r-e)*(2/3-l)*6:e}function parseCSSColor(e){var r=e.replace(/ /g,\"\").toLowerCase();if(r in kCSSColorTable)return kCSSColorTable[r].slice();if(\"#\"===r[0]){if(4===r.length){var l=parseInt(r.substr(1),16);return l>=0&&l<=4095?[(3840&l)>>4|(3840&l)>>8,240&l|(240&l)>>4,15&l|(15&l)<<4,1]:null}if(7===r.length){var l=parseInt(r.substr(1),16);return l>=0&&l<=16777215?[(16711680&l)>>16,(65280&l)>>8,255&l,1]:null}return null}var a=r.indexOf(\"(\"),t=r.indexOf(\")\");if(a!==-1&&t+1===r.length){var n=r.substr(0,a),s=r.substr(a+1,t-(a+1)).split(\",\"),o=1;switch(n){case\"rgba\":if(4!==s.length)return null;o=parse_css_float(s.pop());case\"rgb\":return 3!==s.length?null:[parse_css_int(s[0]),parse_css_int(s[1]),parse_css_int(s[2]),o];case\"hsla\":if(4!==s.length)return null;o=parse_css_float(s.pop());case\"hsl\":if(3!==s.length)return null;var i=(parseFloat(s[0])%360+360)%360/360,u=parse_css_float(s[1]),g=parse_css_float(s[2]),d=g<=.5?g*(u+1):g+u-g*u,c=2*g-d;return[clamp_css_byte(255*css_hue_to_rgb(c,d,i+1/3)),clamp_css_byte(255*css_hue_to_rgb(c,d,i)),clamp_css_byte(255*css_hue_to_rgb(c,d,i-1/3)),o];default:return null}}return null}var kCSSColorTable={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};try{exports.parseCSSColor=parseCSSColor}catch(e){}\n},{}],108:[function(require,module,exports){\nfunction sss(r){var e,t,s,n,u,a;switch(typeof r){case\"object\":if(null===r)return null;if(isArray(r)){for(s=\"[\",t=r.length-1,e=0;e-1&&(s+=sss(r[e])),s+\"]\"}for(n=objKeys(r).sort(),t=n.length,s=\"{\",u=n[e=0],a=t>0&&void 0!==r[u];e15?\"\\\\u00\"+e.toString(16):\"\\\\u000\"+e.toString(16)}};module.exports=function(r){if(void 0!==r)return\"\"+sss(r)},module.exports.stringSearch=strReg,module.exports.stringReplace=strReplace;\n},{}],109:[function(require,module,exports){\nfunction isObjectLike(r){return!!r&&\"object\"==typeof r}function arraySome(r,e){for(var a=-1,t=r.length;++as))return!1;for(;++c-1&&t%1==0&&t<=MAX_SAFE_INTEGER}function isObject(t){var e=typeof t;return!!t&&(\"object\"==e||\"function\"==e)}function isObjectLike(t){return!!t&&\"object\"==typeof t}var MAX_SAFE_INTEGER=9007199254740991,argsTag=\"[object Arguments]\",funcTag=\"[object Function]\",genTag=\"[object GeneratorFunction]\",objectProto=Object.prototype,hasOwnProperty=objectProto.hasOwnProperty,objectToString=objectProto.toString,propertyIsEnumerable=objectProto.propertyIsEnumerable;module.exports=isArguments;\n},{}],113:[function(require,module,exports){\nfunction isObjectLike(t){return!!t&&\"object\"==typeof t}function getNative(t,r){var e=null==t?void 0:t[r];return isNative(e)?e:void 0}function isLength(t){return\"number\"==typeof t&&t>-1&&t%1==0&&t<=MAX_SAFE_INTEGER}function isFunction(t){return isObject(t)&&objToString.call(t)==funcTag}function isObject(t){var r=typeof t;return!!t&&(\"object\"==r||\"function\"==r)}function isNative(t){return null!=t&&(isFunction(t)?reIsNative.test(fnToString.call(t)):isObjectLike(t)&&reIsHostCtor.test(t))}var arrayTag=\"[object Array]\",funcTag=\"[object Function]\",reIsHostCtor=/^\\[object .+?Constructor\\]$/,objectProto=Object.prototype,fnToString=Function.prototype.toString,hasOwnProperty=objectProto.hasOwnProperty,objToString=objectProto.toString,reIsNative=RegExp(\"^\"+fnToString.call(hasOwnProperty).replace(/[\\\\^$.*+?()[\\]{}|]/g,\"\\\\$&\").replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g,\"$1.*?\")+\"$\"),nativeIsArray=getNative(Array,\"isArray\"),MAX_SAFE_INTEGER=9007199254740991,isArray=nativeIsArray||function(t){return isObjectLike(t)&&isLength(t.length)&&objToString.call(t)==arrayTag};module.exports=isArray;\n},{}],114:[function(require,module,exports){\nfunction isEqual(a,l,i,e){i=\"function\"==typeof i?bindCallback(i,e,3):void 0;var s=i?i(a,l):void 0;return void 0===s?baseIsEqual(a,l,i):!!s}var baseIsEqual=require(\"lodash._baseisequal\"),bindCallback=require(\"lodash._bindcallback\");module.exports=isEqual;\n},{\"lodash._baseisequal\":109,\"lodash._bindcallback\":110}],115:[function(require,module,exports){\nfunction isLength(a){return\"number\"==typeof a&&a>-1&&a%1==0&&a<=MAX_SAFE_INTEGER}function isObjectLike(a){return!!a&&\"object\"==typeof a}function isTypedArray(a){return isObjectLike(a)&&isLength(a.length)&&!!typedArrayTags[objectToString.call(a)]}var MAX_SAFE_INTEGER=9007199254740991,argsTag=\"[object Arguments]\",arrayTag=\"[object Array]\",boolTag=\"[object Boolean]\",dateTag=\"[object Date]\",errorTag=\"[object Error]\",funcTag=\"[object Function]\",mapTag=\"[object Map]\",numberTag=\"[object Number]\",objectTag=\"[object Object]\",regexpTag=\"[object RegExp]\",setTag=\"[object Set]\",stringTag=\"[object String]\",weakMapTag=\"[object WeakMap]\",arrayBufferTag=\"[object ArrayBuffer]\",dataViewTag=\"[object DataView]\",float32Tag=\"[object Float32Array]\",float64Tag=\"[object Float64Array]\",int8Tag=\"[object Int8Array]\",int16Tag=\"[object Int16Array]\",int32Tag=\"[object Int32Array]\",uint8Tag=\"[object Uint8Array]\",uint8ClampedTag=\"[object Uint8ClampedArray]\",uint16Tag=\"[object Uint16Array]\",uint32Tag=\"[object Uint32Array]\",typedArrayTags={};typedArrayTags[float32Tag]=typedArrayTags[float64Tag]=typedArrayTags[int8Tag]=typedArrayTags[int16Tag]=typedArrayTags[int32Tag]=typedArrayTags[uint8Tag]=typedArrayTags[uint8ClampedTag]=typedArrayTags[uint16Tag]=typedArrayTags[uint32Tag]=!0,typedArrayTags[argsTag]=typedArrayTags[arrayTag]=typedArrayTags[arrayBufferTag]=typedArrayTags[boolTag]=typedArrayTags[dataViewTag]=typedArrayTags[dateTag]=typedArrayTags[errorTag]=typedArrayTags[funcTag]=typedArrayTags[mapTag]=typedArrayTags[numberTag]=typedArrayTags[objectTag]=typedArrayTags[regexpTag]=typedArrayTags[setTag]=typedArrayTags[stringTag]=typedArrayTags[weakMapTag]=!1;var objectProto=Object.prototype,objectToString=objectProto.toString;module.exports=isTypedArray;\n},{}],116:[function(require,module,exports){\nfunction baseProperty(e){return function(t){return null==t?void 0:t[e]}}function isArrayLike(e){return null!=e&&isLength(getLength(e))}function isIndex(e,t){return e=\"number\"==typeof e||reIsUint.test(e)?+e:-1,t=null==t?MAX_SAFE_INTEGER:t,e>-1&&e%1==0&&e-1&&e%1==0&&e<=MAX_SAFE_INTEGER}function shimKeys(e){for(var t=keysIn(e),r=t.length,n=r&&e.length,s=!!n&&isLength(n)&&(isArray(e)||isArguments(e)),o=-1,i=[];++o0;++n\":{},\">=\":{},\"<\":{},\"<=\":{},\"in\":{},\"!in\":{},\"all\":{},\"any\":{},\"none\":{},\"has\":{},\"!has\":{}}},\"geometry_type\":{\"type\":\"enum\",\"values\":{\"Point\":{},\"LineString\":{},\"Polygon\":{}}},\"function\":{\"stops\":{\"type\":\"array\",\"value\":\"function_stop\"},\"base\":{\"type\":\"number\",\"default\":1,\"minimum\":0},\"property\":{\"type\":\"string\",\"default\":\"$zoom\"},\"type\":{\"type\":\"enum\",\"values\":{\"identity\":{},\"exponential\":{},\"interval\":{},\"categorical\":{}},\"default\":\"exponential\"},\"colorSpace\":{\"type\":\"enum\",\"values\":{\"rgb\":{},\"lab\":{},\"hcl\":{}},\"default\":\"rgb\"},\"default\":{\"type\":\"*\",\"required\":false}},\"function_stop\":{\"type\":\"array\",\"minimum\":0,\"maximum\":22,\"value\":[\"number\",\"color\"],\"length\":2},\"light\":{\"anchor\":{\"type\":\"enum\",\"default\":\"viewport\",\"values\":{\"map\":{},\"viewport\":{}},\"transition\":false},\"position\":{\"type\":\"array\",\"default\":[1.15,210,30],\"length\":3,\"value\":\"number\",\"transition\":true,\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":false},\"color\":{\"type\":\"color\",\"default\":\"#ffffff\",\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":false,\"transition\":true},\"intensity\":{\"type\":\"number\",\"default\":0.5,\"minimum\":0,\"maximum\":1,\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":false,\"transition\":true}},\"paint\":[\"paint_fill\",\"paint_line\",\"paint_circle\",\"paint_fill-extrusion\",\"paint_symbol\",\"paint_raster\",\"paint_background\"],\"paint_fill\":{\"fill-antialias\":{\"type\":\"boolean\",\"function\":\"piecewise-constant\",\"zoom-function\":true,\"default\":true},\"fill-opacity\":{\"type\":\"number\",\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"default\":1,\"minimum\":0,\"maximum\":1,\"transition\":true},\"fill-color\":{\"type\":\"color\",\"default\":\"#000000\",\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true,\"requires\":[{\"!\":\"fill-pattern\"}]},\"fill-outline-color\":{\"type\":\"color\",\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true,\"requires\":[{\"!\":\"fill-pattern\"},{\"fill-antialias\":true}]},\"fill-translate\":{\"type\":\"array\",\"value\":\"number\",\"length\":2,\"default\":[0,0],\"function\":\"interpolated\",\"zoom-function\":true,\"transition\":true,\"units\":\"pixels\"},\"fill-translate-anchor\":{\"type\":\"enum\",\"function\":\"piecewise-constant\",\"zoom-function\":true,\"values\":{\"map\":{},\"viewport\":{}},\"default\":\"map\",\"requires\":[\"fill-translate\"]},\"fill-pattern\":{\"type\":\"string\",\"function\":\"piecewise-constant\",\"zoom-function\":true,\"transition\":true}},\"paint_fill-extrusion\":{\"fill-extrusion-opacity\":{\"type\":\"number\",\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":false,\"default\":1,\"minimum\":0,\"maximum\":1,\"transition\":true},\"fill-extrusion-color\":{\"type\":\"color\",\"default\":\"#000000\",\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true,\"requires\":[{\"!\":\"fill-extrusion-pattern\"}]},\"fill-extrusion-translate\":{\"type\":\"array\",\"value\":\"number\",\"length\":2,\"default\":[0,0],\"function\":\"interpolated\",\"zoom-function\":true,\"transition\":true,\"units\":\"pixels\"},\"fill-extrusion-translate-anchor\":{\"type\":\"enum\",\"function\":\"piecewise-constant\",\"zoom-function\":true,\"values\":{\"map\":{},\"viewport\":{}},\"default\":\"map\",\"requires\":[\"fill-extrusion-translate\"]},\"fill-extrusion-pattern\":{\"type\":\"string\",\"function\":\"piecewise-constant\",\"zoom-function\":true,\"transition\":true},\"fill-extrusion-height\":{\"type\":\"number\",\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"default\":0,\"minimum\":0,\"units\":\"meters\",\"transition\":true},\"fill-extrusion-base\":{\"type\":\"number\",\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"default\":0,\"minimum\":0,\"units\":\"meters\",\"transition\":true,\"requires\":[\"fill-extrusion-height\"]}},\"paint_line\":{\"line-opacity\":{\"type\":\"number\",\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"default\":1,\"minimum\":0,\"maximum\":1,\"transition\":true},\"line-color\":{\"type\":\"color\",\"default\":\"#000000\",\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true,\"requires\":[{\"!\":\"line-pattern\"}]},\"line-translate\":{\"type\":\"array\",\"value\":\"number\",\"length\":2,\"default\":[0,0],\"function\":\"interpolated\",\"zoom-function\":true,\"transition\":true,\"units\":\"pixels\"},\"line-translate-anchor\":{\"type\":\"enum\",\"function\":\"piecewise-constant\",\"zoom-function\":true,\"values\":{\"map\":{},\"viewport\":{}},\"default\":\"map\",\"requires\":[\"line-translate\"]},\"line-width\":{\"type\":\"number\",\"default\":1,\"minimum\":0,\"function\":\"interpolated\",\"zoom-function\":true,\"transition\":true,\"units\":\"pixels\"},\"line-gap-width\":{\"type\":\"number\",\"default\":0,\"minimum\":0,\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true,\"units\":\"pixels\"},\"line-offset\":{\"type\":\"number\",\"default\":0,\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true,\"units\":\"pixels\"},\"line-blur\":{\"type\":\"number\",\"default\":0,\"minimum\":0,\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true,\"units\":\"pixels\"},\"line-dasharray\":{\"type\":\"array\",\"value\":\"number\",\"function\":\"piecewise-constant\",\"zoom-function\":true,\"minimum\":0,\"transition\":true,\"units\":\"line widths\",\"requires\":[{\"!\":\"line-pattern\"}]},\"line-pattern\":{\"type\":\"string\",\"function\":\"piecewise-constant\",\"zoom-function\":true,\"transition\":true}},\"paint_circle\":{\"circle-radius\":{\"type\":\"number\",\"default\":5,\"minimum\":0,\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true,\"units\":\"pixels\"},\"circle-color\":{\"type\":\"color\",\"default\":\"#000000\",\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true},\"circle-blur\":{\"type\":\"number\",\"default\":0,\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true},\"circle-opacity\":{\"type\":\"number\",\"default\":1,\"minimum\":0,\"maximum\":1,\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true},\"circle-translate\":{\"type\":\"array\",\"value\":\"number\",\"length\":2,\"default\":[0,0],\"function\":\"interpolated\",\"zoom-function\":true,\"transition\":true,\"units\":\"pixels\"},\"circle-translate-anchor\":{\"type\":\"enum\",\"function\":\"piecewise-constant\",\"zoom-function\":true,\"values\":{\"map\":{},\"viewport\":{}},\"default\":\"map\",\"requires\":[\"circle-translate\"]},\"circle-pitch-scale\":{\"type\":\"enum\",\"function\":\"piecewise-constant\",\"zoom-function\":true,\"values\":{\"map\":{},\"viewport\":{}},\"default\":\"map\"},\"circle-stroke-width\":{\"type\":\"number\",\"default\":0,\"minimum\":0,\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true,\"units\":\"pixels\"},\"circle-stroke-color\":{\"type\":\"color\",\"default\":\"#000000\",\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true},\"circle-stroke-opacity\":{\"type\":\"number\",\"default\":1,\"minimum\":0,\"maximum\":1,\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true}},\"paint_symbol\":{\"icon-opacity\":{\"type\":\"number\",\"default\":1,\"minimum\":0,\"maximum\":1,\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true,\"requires\":[\"icon-image\"]},\"icon-color\":{\"type\":\"color\",\"default\":\"#000000\",\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true,\"requires\":[\"icon-image\"]},\"icon-halo-color\":{\"type\":\"color\",\"default\":\"rgba(0, 0, 0, 0)\",\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true,\"requires\":[\"icon-image\"]},\"icon-halo-width\":{\"type\":\"number\",\"default\":0,\"minimum\":0,\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true,\"units\":\"pixels\",\"requires\":[\"icon-image\"]},\"icon-halo-blur\":{\"type\":\"number\",\"default\":0,\"minimum\":0,\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true,\"units\":\"pixels\",\"requires\":[\"icon-image\"]},\"icon-translate\":{\"type\":\"array\",\"value\":\"number\",\"length\":2,\"default\":[0,0],\"function\":\"interpolated\",\"zoom-function\":true,\"transition\":true,\"units\":\"pixels\",\"requires\":[\"icon-image\"]},\"icon-translate-anchor\":{\"type\":\"enum\",\"function\":\"piecewise-constant\",\"zoom-function\":true,\"values\":{\"map\":{},\"viewport\":{}},\"default\":\"map\",\"requires\":[\"icon-image\",\"icon-translate\"]},\"text-opacity\":{\"type\":\"number\",\"default\":1,\"minimum\":0,\"maximum\":1,\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true,\"requires\":[\"text-field\"]},\"text-color\":{\"type\":\"color\",\"default\":\"#000000\",\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true,\"requires\":[\"text-field\"]},\"text-halo-color\":{\"type\":\"color\",\"default\":\"rgba(0, 0, 0, 0)\",\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true,\"requires\":[\"text-field\"]},\"text-halo-width\":{\"type\":\"number\",\"default\":0,\"minimum\":0,\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true,\"units\":\"pixels\",\"requires\":[\"text-field\"]},\"text-halo-blur\":{\"type\":\"number\",\"default\":0,\"minimum\":0,\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true,\"units\":\"pixels\",\"requires\":[\"text-field\"]},\"text-translate\":{\"type\":\"array\",\"value\":\"number\",\"length\":2,\"default\":[0,0],\"function\":\"interpolated\",\"zoom-function\":true,\"transition\":true,\"units\":\"pixels\",\"requires\":[\"text-field\"]},\"text-translate-anchor\":{\"type\":\"enum\",\"function\":\"piecewise-constant\",\"zoom-function\":true,\"values\":{\"map\":{},\"viewport\":{}},\"default\":\"map\",\"requires\":[\"text-field\",\"text-translate\"]}},\"paint_raster\":{\"raster-opacity\":{\"type\":\"number\",\"default\":1,\"minimum\":0,\"maximum\":1,\"function\":\"interpolated\",\"zoom-function\":true,\"transition\":true},\"raster-hue-rotate\":{\"type\":\"number\",\"default\":0,\"period\":360,\"function\":\"interpolated\",\"zoom-function\":true,\"transition\":true,\"units\":\"degrees\"},\"raster-brightness-min\":{\"type\":\"number\",\"function\":\"interpolated\",\"zoom-function\":true,\"default\":0,\"minimum\":0,\"maximum\":1,\"transition\":true},\"raster-brightness-max\":{\"type\":\"number\",\"function\":\"interpolated\",\"zoom-function\":true,\"default\":1,\"minimum\":0,\"maximum\":1,\"transition\":true},\"raster-saturation\":{\"type\":\"number\",\"default\":0,\"minimum\":-1,\"maximum\":1,\"function\":\"interpolated\",\"zoom-function\":true,\"transition\":true},\"raster-contrast\":{\"type\":\"number\",\"default\":0,\"minimum\":-1,\"maximum\":1,\"function\":\"interpolated\",\"zoom-function\":true,\"transition\":true},\"raster-fade-duration\":{\"type\":\"number\",\"default\":300,\"minimum\":0,\"function\":\"interpolated\",\"zoom-function\":true,\"transition\":true,\"units\":\"milliseconds\"}},\"paint_background\":{\"background-color\":{\"type\":\"color\",\"default\":\"#000000\",\"function\":\"interpolated\",\"zoom-function\":true,\"transition\":true,\"requires\":[{\"!\":\"background-pattern\"}]},\"background-pattern\":{\"type\":\"string\",\"function\":\"piecewise-constant\",\"zoom-function\":true,\"transition\":true},\"background-opacity\":{\"type\":\"number\",\"default\":1,\"minimum\":0,\"maximum\":1,\"function\":\"interpolated\",\"zoom-function\":true,\"transition\":true}},\"transition\":{\"duration\":{\"type\":\"number\",\"default\":300,\"minimum\":0,\"units\":\"milliseconds\"},\"delay\":{\"type\":\"number\",\"default\":0,\"minimum\":0,\"units\":\"milliseconds\"}}}\n},{}],119:[function(require,module,exports){\n\"use strict\";module.exports=function(r){for(var t=arguments,e=1;e7)return[new ValidationError(u,a,\"constants have been deprecated as of v8\")];if(!(a in l.constants))return[new ValidationError(u,a,'constant \"%s\" not found',a)];e=extend({},e,{value:l.constants[a]})}return n.function&&\"object\"===getType(a)?r(e):n.type&&i[n.type]?i[n.type](e):t(extend({},e,{valueSpec:n.type?o[n.type]:n}))};\n},{\"../error/validation_error\":102,\"../util/extend\":119,\"../util/get_type\":120,\"./validate_array\":125,\"./validate_boolean\":126,\"./validate_color\":127,\"./validate_constants\":128,\"./validate_enum\":129,\"./validate_filter\":130,\"./validate_function\":131,\"./validate_layer\":133,\"./validate_light\":135,\"./validate_number\":136,\"./validate_object\":137,\"./validate_source\":140,\"./validate_string\":141}],125:[function(require,module,exports){\n\"use strict\";var getType=require(\"../util/get_type\"),validate=require(\"./validate\"),ValidationError=require(\"../error/validation_error\");module.exports=function(e){var r=e.value,t=e.valueSpec,a=e.style,n=e.styleSpec,l=e.key,i=e.arrayElementValidator||validate;if(\"array\"!==getType(r))return[new ValidationError(l,r,\"array expected, %s found\",getType(r))];if(t.length&&r.length!==t.length)return[new ValidationError(l,r,\"array length %d expected, length %d found\",t.length,r.length)];if(t[\"min-length\"]&&r.length7)return t?[new ValidationError(e,t,\"constants have been deprecated as of v8\")]:[];var o=getType(t);if(\"object\"!==o)return[new ValidationError(e,t,\"object expected, %s found\",o)];var n=[];for(var i in t)\"@\"!==i[0]&&n.push(new ValidationError(e+\".\"+i,t[i],'constants must start with \"@\"'));return n};\n},{\"../error/validation_error\":102,\"../util/get_type\":120}],129:[function(require,module,exports){\n\"use strict\";var ValidationError=require(\"../error/validation_error\"),unbundle=require(\"../util/unbundle_jsonlint\");module.exports=function(e){var r=e.key,n=e.value,u=e.valueSpec,o=[];return Array.isArray(u.values)?u.values.indexOf(unbundle(n))===-1&&o.push(new ValidationError(r,n,\"expected one of [%s], %s found\",u.values.join(\", \"),n)):Object.keys(u.values).indexOf(unbundle(n))===-1&&o.push(new ValidationError(r,n,\"expected one of [%s], %s found\",Object.keys(u.values).join(\", \"),n)),o};\n},{\"../error/validation_error\":102,\"../util/unbundle_jsonlint\":123}],130:[function(require,module,exports){\n\"use strict\";var ValidationError=require(\"../error/validation_error\"),validateEnum=require(\"./validate_enum\"),getType=require(\"../util/get_type\"),unbundle=require(\"../util/unbundle_jsonlint\");module.exports=function e(r){var t,a=r.value,n=r.key,l=r.styleSpec,s=[];if(\"array\"!==getType(a))return[new ValidationError(n,a,\"array expected, %s found\",getType(a))];if(a.length<1)return[new ValidationError(n,a,\"filter array must have at least 1 element\")];switch(s=s.concat(validateEnum({key:n+\"[0]\",value:a[0],valueSpec:l.filter_operator,style:r.style,styleSpec:r.styleSpec})),unbundle(a[0])){case\"<\":case\"<=\":case\">\":case\">=\":a.length>=2&&\"$type\"===unbundle(a[1])&&s.push(new ValidationError(n,a,'\"$type\" cannot be use with operator \"%s\"',a[0]));case\"==\":case\"!=\":3!==a.length&&s.push(new ValidationError(n,a,'filter array for operator \"%s\" must have 3 elements',a[0]));case\"in\":case\"!in\":a.length>=2&&(t=getType(a[1]),\"string\"!==t&&s.push(new ValidationError(n+\"[1]\",a[1],\"string expected, %s found\",t)));for(var o=2;ounbundle(r[0].zoom))return[new ValidationError(o,r[0].zoom,\"stop zoom values must appear in ascending order\")];unbundle(r[0].zoom)!==l&&(l=unbundle(r[0].zoom),i=void 0,s={}),t=t.concat(validateObject({key:o+\"[0]\",value:r[0],valueSpec:{zoom:{}},style:e.style,styleSpec:e.styleSpec,objectElementValidators:{zoom:validateNumber,value:a}}))}else t=t.concat(a({key:o+\"[0]\",value:r[0],valueSpec:{},style:e.style,styleSpec:e.styleSpec}));return t.concat(validate({key:o+\"[1]\",value:r[1],valueSpec:u,style:e.style,styleSpec:e.styleSpec}))}function a(e){var t=getType(e.value),r=unbundle(e.value);if(n){if(t!==n)return[new ValidationError(e.key,e.value,\"%s stop domain type must match previous stop domain type %s\",t,n)]}else n=t;if(\"number\"!==t&&\"string\"!==t&&\"boolean\"!==t)return[new ValidationError(e.key,e.value,\"stop domain value must be a number, string, or boolean\")];if(\"number\"!==t&&\"categorical\"!==p){var a=\"number expected, %s found\";return u[\"property-function\"]&&void 0===p&&(a+='\\nIf you intended to use a categorical function, specify `\"type\": \"categorical\"`.'),[new ValidationError(e.key,e.value,a,t)]}return\"categorical\"!==p||\"number\"!==t||isFinite(r)&&Math.floor(r)===r?\"number\"===t&&void 0!==i&&r=8&&(d&&!e.valueSpec[\"property-function\"]?v.push(new ValidationError(e.key,e.value,\"property functions not supported\")):y&&!e.valueSpec[\"zoom-function\"]&&v.push(new ValidationError(e.key,e.value,\"zoom functions not supported\"))),\"categorical\"!==p&&!c||void 0!==e.value.property||v.push(new ValidationError(e.key,e.value,'\"property\" property is required')),v};\n},{\"../error/validation_error\":102,\"../util/get_type\":120,\"../util/unbundle_jsonlint\":123,\"./validate\":124,\"./validate_array\":125,\"./validate_number\":136,\"./validate_object\":137}],132:[function(require,module,exports){\n\"use strict\";var ValidationError=require(\"../error/validation_error\"),validateString=require(\"./validate_string\");module.exports=function(r){var e=r.value,t=r.key,a=validateString(r);return a.length?a:(e.indexOf(\"{fontstack}\")===-1&&a.push(new ValidationError(t,e,'\"glyphs\" url must include a \"{fontstack}\" token')),e.indexOf(\"{range}\")===-1&&a.push(new ValidationError(t,e,'\"glyphs\" url must include a \"{range}\" token')),a)};\n},{\"../error/validation_error\":102,\"./validate_string\":141}],133:[function(require,module,exports){\n\"use strict\";var ValidationError=require(\"../error/validation_error\"),unbundle=require(\"../util/unbundle_jsonlint\"),validateObject=require(\"./validate_object\"),validateFilter=require(\"./validate_filter\"),validatePaintProperty=require(\"./validate_paint_property\"),validateLayoutProperty=require(\"./validate_layout_property\"),extend=require(\"../util/extend\");module.exports=function(e){var r=[],t=e.value,a=e.key,i=e.style,l=e.styleSpec;t.type||t.ref||r.push(new ValidationError(a,t,'either \"type\" or \"ref\" is required'));var u=unbundle(t.type),n=unbundle(t.ref);if(t.id)for(var o=unbundle(t.id),s=0;sm.maximum?[new ValidationError(r,i,\"%s is greater than the maximum value %s\",i,m.maximum)]:[]};\n},{\"../error/validation_error\":102,\"../util/get_type\":120}],137:[function(require,module,exports){\n\"use strict\";var ValidationError=require(\"../error/validation_error\"),getType=require(\"../util/get_type\"),validateSpec=require(\"./validate\");module.exports=function(e){var r=e.key,t=e.value,i=e.valueSpec||{},a=e.objectElementValidators||{},o=e.style,l=e.styleSpec,n=[],u=getType(t);if(\"object\"!==u)return[new ValidationError(r,t,\"object expected, %s found\",u)];for(var d in t){var p=d.split(\".\")[0],s=i[p]||i[\"*\"],c=void 0;if(a[p])c=a[p];else if(i[p])c=validateSpec;else if(a[\"*\"])c=a[\"*\"];else{if(!i[\"*\"]){n.push(new ValidationError(r,t[d],'unknown property \"%s\"',d));continue}c=validateSpec}n=n.concat(c({key:(r?r+\".\":r)+d,value:t[d],valueSpec:s,style:o,styleSpec:l,object:t,objectKey:d}))}for(var v in i)i[v].required&&void 0===i[v].default&&void 0===t[v]&&n.push(new ValidationError(r,t,'missing required property \"%s\"',v));return n};\n},{\"../error/validation_error\":102,\"../util/get_type\":120,\"./validate\":124}],138:[function(require,module,exports){\n\"use strict\";var validateProperty=require(\"./validate_property\");module.exports=function(r){return validateProperty(r,\"paint\")};\n},{\"./validate_property\":139}],139:[function(require,module,exports){\n\"use strict\";var validate=require(\"./validate\"),ValidationError=require(\"../error/validation_error\"),getType=require(\"../util/get_type\");module.exports=function(e,t){var r=e.key,i=e.style,a=e.styleSpec,n=e.value,o=e.objectKey,l=a[t+\"_\"+e.layerType];if(!l)return[];var y=o.match(/^(.*)-transition$/);if(\"paint\"===t&&y&&l[y[1]]&&l[y[1]].transition)return validate({key:r,value:n,valueSpec:a.transition,style:i,styleSpec:a});var p=e.valueSpec||l[o];if(!p)return[new ValidationError(r,n,'unknown property \"%s\"',o)];var s;if(\"string\"===getType(n)&&p[\"property-function\"]&&!p.tokens&&(s=/^{([^}]+)}$/.exec(n)))return[new ValidationError(r,n,'\"%s\" does not support interpolation syntax\\nUse an identity property function instead: `{ \"type\": \"identity\", \"property\": %s` }`.',o,JSON.stringify(s[1]))];var u=[];return\"symbol\"===e.layerType&&\"text-field\"===o&&i&&!i.glyphs&&u.push(new ValidationError(r,n,'use of \"text-field\" requires a style \"glyphs\" property')),u.concat(validate({key:e.key,value:n,valueSpec:p,style:i,styleSpec:a}))};\n},{\"../error/validation_error\":102,\"../util/get_type\":120,\"./validate\":124}],140:[function(require,module,exports){\n\"use strict\";var ValidationError=require(\"../error/validation_error\"),unbundle=require(\"../util/unbundle_jsonlint\"),validateObject=require(\"./validate_object\"),validateEnum=require(\"./validate_enum\");module.exports=function(e){var a=e.value,t=e.key,r=e.styleSpec,l=e.style;if(!a.type)return[new ValidationError(t,a,'\"type\" is required')];var u=unbundle(a.type),i=[];switch(u){case\"vector\":case\"raster\":if(i=i.concat(validateObject({key:t,value:a,valueSpec:r.source_tile,style:e.style,styleSpec:r})),\"url\"in a)for(var s in a)[\"type\",\"url\",\"tileSize\"].indexOf(s)<0&&i.push(new ValidationError(t+\".\"+s,a[s],'a source with a \"url\" property may not include a \"%s\" property',s));return i;case\"geojson\":return validateObject({key:t,value:a,valueSpec:r.source_geojson,style:l,styleSpec:r});case\"video\":return validateObject({key:t,value:a,valueSpec:r.source_video,style:l,styleSpec:r});case\"image\":return validateObject({key:t,value:a,valueSpec:r.source_image,style:l,styleSpec:r});case\"canvas\":return validateObject({key:t,value:a,valueSpec:r.source_canvas,style:l,styleSpec:r});default:return validateEnum({key:t+\".type\",value:a.type,valueSpec:{values:[\"vector\",\"raster\",\"geojson\",\"video\",\"image\",\"canvas\"]},style:l,styleSpec:r})}};\n},{\"../error/validation_error\":102,\"../util/unbundle_jsonlint\":123,\"./validate_enum\":129,\"./validate_object\":137}],141:[function(require,module,exports){\n\"use strict\";var getType=require(\"../util/get_type\"),ValidationError=require(\"../error/validation_error\");module.exports=function(r){var e=r.value,t=r.key,i=getType(e);return\"string\"!==i?[new ValidationError(t,e,\"string expected, %s found\",i)]:[]};\n},{\"../error/validation_error\":102,\"../util/get_type\":120}],142:[function(require,module,exports){\n\"use strict\";function validateStyleMin(e,a){a=a||latestStyleSpec;var t=[];return t=t.concat(validate({key:\"\",value:e,valueSpec:a.$root,styleSpec:a,style:e,objectElementValidators:{glyphs:validateGlyphsURL,\"*\":function(){return[]}}})),a.$version>7&&e.constants&&(t=t.concat(validateConstants({key:\"constants\",value:e.constants,style:e,styleSpec:a}))),sortErrors(t)}function sortErrors(e){return[].concat(e).sort(function(e,a){return e.line-a.line})}function wrapCleanErrors(e){return function(){return sortErrors(e.apply(this,arguments))}}var validateConstants=require(\"./validate/validate_constants\"),validate=require(\"./validate/validate\"),latestStyleSpec=require(\"./reference/latest\"),validateGlyphsURL=require(\"./validate/validate_glyphs_url\");validateStyleMin.source=wrapCleanErrors(require(\"./validate/validate_source\")),validateStyleMin.light=wrapCleanErrors(require(\"./validate/validate_light\")),validateStyleMin.layer=wrapCleanErrors(require(\"./validate/validate_layer\")),validateStyleMin.filter=wrapCleanErrors(require(\"./validate/validate_filter\")),validateStyleMin.paintProperty=wrapCleanErrors(require(\"./validate/validate_paint_property\")),validateStyleMin.layoutProperty=wrapCleanErrors(require(\"./validate/validate_layout_property\")),module.exports=validateStyleMin;\n},{\"./reference/latest\":117,\"./validate/validate\":124,\"./validate/validate_constants\":128,\"./validate/validate_filter\":130,\"./validate/validate_glyphs_url\":132,\"./validate/validate_layer\":133,\"./validate/validate_layout_property\":134,\"./validate/validate_light\":135,\"./validate/validate_paint_property\":138,\"./validate/validate_source\":140}],143:[function(require,module,exports){\n\"use strict\";var AnimationLoop=function(){this.n=0,this.times=[]};AnimationLoop.prototype.stopped=function(){return this.times=this.times.filter(function(t){return t.time>=(new Date).getTime()}),!this.times.length},AnimationLoop.prototype.set=function(t){return this.times.push({id:this.n,time:t+(new Date).getTime()}),this.n++},AnimationLoop.prototype.cancel=function(t){this.times=this.times.filter(function(i){return i.id!==t})},module.exports=AnimationLoop;\n},{}],144:[function(require,module,exports){\n\"use strict\";var Evented=require(\"../util/evented\"),ajax=require(\"../util/ajax\"),browser=require(\"../util/browser\"),normalizeURL=require(\"../util/mapbox\").normalizeSpriteURL,SpritePosition=function(){this.x=0,this.y=0,this.width=0,this.height=0,this.pixelRatio=1,this.sdf=!1},ImageSprite=function(t){function i(i,e){var a=this;t.call(this),this.base=i,this.retina=browser.devicePixelRatio>1,this.setEventedParent(e);var r=this.retina?\"@2x\":\"\";ajax.getJSON(normalizeURL(i,r,\".json\"),function(t,i){return t?void a.fire(\"error\",{error:t}):(a.data=i,void(a.imgData&&a.fire(\"data\",{dataType:\"style\"})))}),ajax.getImage(normalizeURL(i,r,\".png\"),function(t,i){if(t)return void a.fire(\"error\",{error:t});a.imgData=browser.getImageData(i);for(var e=0;e1!==this.retina){var e=new i(this.base);e.on(\"data\",function(){t.data=e.data,t.imgData=e.imgData,t.width=e.width,t.retina=e.retina})}},i.prototype.getSpritePosition=function(t){if(!this.loaded())return new SpritePosition;var i=this.data&&this.data[t];return i&&this.imgData?i:new SpritePosition},i}(Evented);module.exports=ImageSprite;\n},{\"../util/ajax\":191,\"../util/browser\":192,\"../util/evented\":200,\"../util/mapbox\":208}],145:[function(require,module,exports){\n\"use strict\";var styleSpec=require(\"../style-spec/reference/latest\"),util=require(\"../util/util\"),Evented=require(\"../util/evented\"),validateStyle=require(\"./validate_style\"),StyleDeclaration=require(\"./style_declaration\"),StyleTransition=require(\"./style_transition\"),TRANSITION_SUFFIX=\"-transition\",Light=function(t){function i(i){t.call(this),this.properties=[\"anchor\",\"color\",\"position\",\"intensity\"],this._specifications=styleSpec.light,this.set(i)}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.set=function(t){var i=this;if(!this._validate(validateStyle.light,t)){this._declarations={},this._transitions={},this._transitionOptions={},this.calculated={},t=util.extend({anchor:this._specifications.anchor.default,color:this._specifications.color.default,position:this._specifications.position.default,intensity:this._specifications.intensity.default},t);for(var e=0,o=i.properties;eMath.floor(e)&&(t.lastIntegerZoom=Math.floor(e+1),t.lastIntegerZoomTime=Date.now()),t.lastZoom=e},t.prototype._checkLoaded=function(){if(!this._loaded)throw new Error(\"Style is not done loading\")},t.prototype.update=function(e,t){var r=this;if(this._changed){var i=Object.keys(this._updatedLayers),o=Object.keys(this._removedLayers);(i.length||o.length||this._updatedSymbolOrder)&&this._updateWorkerLayers(i,o);for(var s in r._updatedSources){var a=r._updatedSources[s];\"reload\"===a?r._reloadSource(s):\"clear\"===a&&r._clearSource(s)}this._applyClasses(e,t),this._resetUpdates(),this.fire(\"data\",{dataType:\"style\"})}},t.prototype._updateWorkerLayers=function(e,t){var r=this,i=this._updatedSymbolOrder?this._order.filter(function(e){return\"symbol\"===r._layers[e].type}):null;this.dispatcher.broadcast(\"updateLayers\",{layers:this._serializeLayers(e),removedIds:t,symbolOrder:i})},t.prototype._resetUpdates=function(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSymbolOrder=!1,this._updatedSources={},this._updatedPaintProps={},this._updatedAllPaintProps=!1},t.prototype.setState=function(e){var t=this;if(this._checkLoaded(),validateStyle.emitErrors(this,validateStyle(e)))return!1;e=util.extend({},e),e.layers=deref(e.layers);var r=diff(this.serialize(),e).filter(function(e){return!(e.command in ignoredDiffOperations)});if(0===r.length)return!1;var i=r.filter(function(e){return!(e.command in supportedDiffOperations)});if(i.length>0)throw new Error(\"Unimplemented: \"+i.map(function(e){return e.command}).join(\", \")+\".\");return r.forEach(function(e){\"setTransition\"!==e.command&&t[e.command].apply(t,e.args)}),this.stylesheet=e,!0},t.prototype.addSource=function(e,t,r){var i=this;if(this._checkLoaded(),void 0!==this.sourceCaches[e])throw new Error(\"There is already a source with this ID\");if(!t.type)throw new Error(\"The type property must be defined, but the only the following properties were given: \"+Object.keys(t)+\".\");var o=[\"vector\",\"raster\",\"geojson\",\"video\",\"image\",\"canvas\"],s=o.indexOf(t.type)>=0;if(!s||!this._validate(validateStyle.source,\"sources.\"+e,t,null,r)){var a=this.sourceCaches[e]=new SourceCache(e,t,this.dispatcher);a.style=this,a.setEventedParent(this,function(){return{isSourceLoaded:i.loaded(),source:a.serialize(),sourceId:e}}),a.onAdd(this.map),this._changed=!0}},t.prototype.removeSource=function(e){if(this._checkLoaded(),void 0===this.sourceCaches[e])throw new Error(\"There is no source with this ID\");var t=this.sourceCaches[e];delete this.sourceCaches[e],delete this._updatedSources[e],t.setEventedParent(null),t.clearTiles(),t.onRemove&&t.onRemove(this.map),this._changed=!0},t.prototype.getSource=function(e){return this.sourceCaches[e]&&this.sourceCaches[e].getSource()},t.prototype.addLayer=function(e,t,r){this._checkLoaded();var i=e.id;if(\"object\"==typeof e.source&&(this.addSource(i,e.source),e=util.extend(e,{source:i})),!this._validate(validateStyle.layer,\"layers.\"+i,e,{arrayIndex:-1},r)){var o=StyleLayer.create(e);this._validateLayer(o),o.setEventedParent(this,{layer:{id:i}});var s=t?this._order.indexOf(t):this._order.length;if(this._order.splice(s,0,i),this._layers[i]=o,this._removedLayers[i]&&o.source){var a=this._removedLayers[i];delete this._removedLayers[i],this._updatedSources[o.source]=a.type!==o.type?\"clear\":\"reload\"}this._updateLayer(o),\"symbol\"===o.type&&(this._updatedSymbolOrder=!0),this.updateClasses(i)}},t.prototype.moveLayer=function(e,t){this._checkLoaded(),this._changed=!0;var r=this._layers[e];if(!r)return void this.fire(\"error\",{error:new Error(\"The layer '\"+e+\"' does not exist in the map's style and cannot be moved.\")});var i=this._order.indexOf(e);this._order.splice(i,1);var o=t?this._order.indexOf(t):this._order.length;this._order.splice(o,0,e),\"symbol\"===r.type&&(this._updatedSymbolOrder=!0,r.source&&!this._updatedSources[r.source]&&(this._updatedSources[r.source]=\"reload\"))},t.prototype.removeLayer=function(e){this._checkLoaded();var t=this._layers[e];if(!t)return void this.fire(\"error\",{error:new Error(\"The layer '\"+e+\"' does not exist in the map's style and cannot be removed.\")});t.setEventedParent(null);var r=this._order.indexOf(e);this._order.splice(r,1),\"symbol\"===t.type&&(this._updatedSymbolOrder=!0),this._changed=!0,this._removedLayers[e]=t,delete this._layers[e],delete this._updatedLayers[e],delete this._updatedPaintProps[e]},t.prototype.getLayer=function(e){return this._layers[e]},t.prototype.setLayerZoomRange=function(e,t,r){this._checkLoaded();var i=this.getLayer(e);return i?void(i.minzoom===t&&i.maxzoom===r||(null!=t&&(i.minzoom=t),null!=r&&(i.maxzoom=r),this._updateLayer(i))):void this.fire(\"error\",{error:new Error(\"The layer '\"+e+\"' does not exist in the map's style and cannot have zoom extent.\")})},t.prototype.setFilter=function(e,t){this._checkLoaded();var r=this.getLayer(e);return r?void(null!==t&&void 0!==t&&this._validate(validateStyle.filter,\"layers.\"+r.id+\".filter\",t)||util.deepEqual(r.filter,t)||(r.filter=util.clone(t),this._updateLayer(r))):void this.fire(\"error\",{error:new Error(\"The layer '\"+e+\"' does not exist in the map's style and cannot be filtered.\")})},t.prototype.getFilter=function(e){return util.clone(this.getLayer(e).filter)},t.prototype.setLayoutProperty=function(e,t,r){this._checkLoaded();var i=this.getLayer(e);return i?void(util.deepEqual(i.getLayoutProperty(t),r)||(i.setLayoutProperty(t,r),this._updateLayer(i))):void this.fire(\"error\",{error:new Error(\"The layer '\"+e+\"' does not exist in the map's style and cannot be styled.\")})},t.prototype.getLayoutProperty=function(e,t){return this.getLayer(e).getLayoutProperty(t)},t.prototype.setPaintProperty=function(e,t,r,i){this._checkLoaded();var o=this.getLayer(e);if(!o)return void this.fire(\"error\",{error:new Error(\"The layer '\"+e+\"' does not exist in the map's style and cannot be styled.\")});if(!util.deepEqual(o.getPaintProperty(t,i),r)){var s=o.isPaintValueFeatureConstant(t);o.setPaintProperty(t,r,i);var a=!(r&&MapboxGLFunction.isFunctionDefinition(r)&&\"$zoom\"!==r.property&&void 0!==r.property);a&&s||this._updateLayer(o),this.updateClasses(e,t)}},t.prototype.getPaintProperty=function(e,t,r){return this.getLayer(e).getPaintProperty(t,r)},t.prototype.getTransition=function(){return util.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},t.prototype.updateClasses=function(e,t){if(this._changed=!0,e){var r=this._updatedPaintProps;r[e]||(r[e]={}),r[e][t||\"all\"]=!0}else this._updatedAllPaintProps=!0},t.prototype.serialize=function(){var e=this;return util.filterObject({version:this.stylesheet.version,name:this.stylesheet.name,metadata:this.stylesheet.metadata,light:this.stylesheet.light,center:this.stylesheet.center,zoom:this.stylesheet.zoom,bearing:this.stylesheet.bearing,pitch:this.stylesheet.pitch,sprite:this.stylesheet.sprite,glyphs:this.stylesheet.glyphs,transition:this.stylesheet.transition,sources:util.mapObject(this.sourceCaches,function(e){return e.serialize()}),layers:this._order.map(function(t){return e._layers[t].serialize()})},function(e){return void 0!==e})},t.prototype._updateLayer=function(e){this._updatedLayers[e.id]=!0,e.source&&!this._updatedSources[e.source]&&(this._updatedSources[e.source]=\"reload\"),this._changed=!0},t.prototype._flattenRenderedFeatures=function(e){for(var t=this,r=[],i=this._order.length-1;i>=0;i--)for(var o=t._order[i],s=0,a=e;s=this.maxzoom)||\"none\"===this.layout.visibility)},i.prototype.updatePaintTransitions=function(t,i,a,e,n){for(var o=this,r=util.extend({},this._paintDeclarations[\"\"]),s=0;s=this.endTime)return e;var a=this.oldTransition.calculate(t,i,this.startTime),n=util.easeCubicInOut((o-this.startTime-this.delay)/this.duration);return this.interp(a,e,n)},StyleTransition.prototype._calculateTargetValue=function(t,i){if(!this.zoomTransitioned)return this.declaration.calculate(t,i);var o=t.zoom,e=this.zoomHistory.lastIntegerZoom,a=o>e?2:.5,n=this.declaration.calculate({zoom:o>e?o-1:o+1},i),r=this.declaration.calculate({zoom:o},i),s=Math.min((Date.now()-this.zoomHistory.lastIntegerZoomTime)/this.duration,1),l=Math.abs(o-e),u=interpolate(s,1,l);return void 0!==n&&void 0!==r?{from:n,fromScale:a,to:r,toScale:1,t:u}:void 0},module.exports=StyleTransition;\n},{\"../util/interpolate\":204,\"../util/util\":212}],156:[function(require,module,exports){\n\"use strict\";module.exports=require(\"../style-spec/validate_style.min\"),module.exports.emitErrors=function(r,e){if(e&&e.length){for(var t=0;t-a/2;){if(s--,s<0)return!1;f-=e[s].dist(i),i=e[s]}f+=e[s].dist(e[s+1]),s++;for(var l=[],o=0;fr;)o-=l.shift().angleDelta;if(o>n)return!1;s++,f+=c.dist(g)}return!0}module.exports=checkMaxAngle;\n},{}],159:[function(require,module,exports){\n\"use strict\";function clipLine(n,x,y,o,e){for(var r=[],t=0;t=o&&w.x>=o||(P.x>=o?P=new Point(o,P.y+(w.y-P.y)*((o-P.x)/(w.x-P.x)))._round():w.x>=o&&(w=new Point(o,P.y+(w.y-P.y)*((o-P.x)/(w.x-P.x)))._round()),P.y>=e&&w.y>=e||(P.y>=e?P=new Point(P.x+(w.x-P.x)*((e-P.y)/(w.y-P.y)),e)._round():w.y>=e&&(w=new Point(P.x+(w.x-P.x)*((e-P.y)/(w.y-P.y)),e)._round()),u&&P.equals(u[u.length-1])||(u=[P],r.push(u)),u.push(w)))))}return r}var Point=require(\"point-geometry\");module.exports=clipLine;\n},{\"point-geometry\":26}],160:[function(require,module,exports){\n\"use strict\";var createStructArrayType=require(\"../util/struct_array\"),Point=require(\"point-geometry\"),CollisionBoxArray=createStructArrayType({members:[{type:\"Int16\",name:\"anchorPointX\"},{type:\"Int16\",name:\"anchorPointY\"},{type:\"Int16\",name:\"x1\"},{type:\"Int16\",name:\"y1\"},{type:\"Int16\",name:\"x2\"},{type:\"Int16\",name:\"y2\"},{type:\"Float32\",name:\"maxScale\"},{type:\"Uint32\",name:\"featureIndex\"},{type:\"Uint16\",name:\"sourceLayerIndex\"},{type:\"Uint16\",name:\"bucketIndex\"},{type:\"Int16\",name:\"bbox0\"},{type:\"Int16\",name:\"bbox1\"},{type:\"Int16\",name:\"bbox2\"},{type:\"Int16\",name:\"bbox3\"},{type:\"Float32\",name:\"placementScale\"}]});Object.defineProperty(CollisionBoxArray.prototype.StructType.prototype,\"anchorPoint\",{get:function(){return new Point(this.anchorPointX,this.anchorPointY)}}),module.exports=CollisionBoxArray;\n},{\"../util/struct_array\":210,\"point-geometry\":26}],161:[function(require,module,exports){\n\"use strict\";var CollisionFeature=function(t,e,i,o,s,a,n,r,l,d,u){var h=n.top*r-l,x=n.bottom*r+l,f=n.left*r-l,m=n.right*r+l;if(this.boxStartIndex=t.length,d){var _=x-h,b=m-f;if(_>0)if(_=Math.max(10*r,_),u){var v=e[i.segment+1].sub(e[i.segment])._unit()._mult(b),c=[i.sub(v),i.add(v)];this._addLineCollisionBoxes(t,c,i,0,b,_,o,s,a)}else this._addLineCollisionBoxes(t,e,i,i.segment,b,_,o,s,a)}else t.emplaceBack(i.x,i.y,f,h,m,x,1/0,o,s,a,0,0,0,0,0);this.boxEndIndex=t.length};CollisionFeature.prototype._addLineCollisionBoxes=function(t,e,i,o,s,a,n,r,l){var d=a/2,u=Math.floor(s/d),h=-a/2,x=this.boxes,f=i,m=o+1,_=h;do{if(m--,m<0)return x;_-=e[m].dist(f),f=e[m]}while(_>-s/2);for(var b=e[m].dist(e[m+1]),v=0;v=e.length)return x;b=e[m].dist(e[m+1])}var g=c-_,p=e[m],C=e[m+1],B=C.sub(p)._unit()._mult(g)._add(p)._round(),M=Math.max(Math.abs(c-h)-d/2,0),y=s/2/M;t.emplaceBack(B.x,B.y,-a/2,-a/2,a/2,a/2,y,n,r,l,0,0,0,0,0)}return x},module.exports=CollisionFeature;\n},{}],162:[function(require,module,exports){\n\"use strict\";var Point=require(\"point-geometry\"),EXTENT=require(\"../data/extent\"),Grid=require(\"grid-index\"),intersectionTests=require(\"../util/intersection_tests\"),CollisionTile=function(t,e,i){if(\"object\"==typeof t){var r=t;i=e,t=r.angle,e=r.pitch,this.grid=new Grid(r.grid),this.ignoredGrid=new Grid(r.ignoredGrid)}else this.grid=new Grid(EXTENT,12,6),this.ignoredGrid=new Grid(EXTENT,12,0);this.minScale=.5,this.maxScale=2,this.angle=t,this.pitch=e;var a=Math.sin(t),o=Math.cos(t);if(this.rotationMatrix=[o,-a,a,o],this.reverseRotationMatrix=[o,a,-a,o],this.yStretch=1/Math.cos(e/180*Math.PI),this.yStretch=Math.pow(this.yStretch,1.3),this.collisionBoxArray=i,0===i.length){i.emplaceBack();var n=32767;i.emplaceBack(0,0,0,-n,0,n,n,0,0,0,0,0,0,0,0,0),i.emplaceBack(EXTENT,0,0,-n,0,n,n,0,0,0,0,0,0,0,0,0),i.emplaceBack(0,0,-n,0,n,0,n,0,0,0,0,0,0,0,0,0),i.emplaceBack(0,EXTENT,-n,0,n,0,n,0,0,0,0,0,0,0,0,0)}this.tempCollisionBox=i.get(0),this.edges=[i.get(1),i.get(2),i.get(3),i.get(4)]};CollisionTile.prototype.serialize=function(t){var e=this.grid.toArrayBuffer(),i=this.ignoredGrid.toArrayBuffer();return t&&(t.push(e),t.push(i)),{angle:this.angle,pitch:this.pitch,grid:e,ignoredGrid:i}},CollisionTile.prototype.placeCollisionFeature=function(t,e,i){for(var r=this,a=this.collisionBoxArray,o=this.minScale,n=this.rotationMatrix,l=this.yStretch,h=t.boxStartIndex;h=r.maxScale)return o}if(i){var S=void 0;if(r.angle){var P=r.reverseRotationMatrix,b=new Point(s.x1,s.y1).matMult(P),T=new Point(s.x2,s.y1).matMult(P),w=new Point(s.x1,s.y2).matMult(P),N=new Point(s.x2,s.y2).matMult(P);S=r.tempCollisionBox,S.anchorPointX=s.anchorPoint.x,S.anchorPointY=s.anchorPoint.y,S.x1=Math.min(b.x,T.x,w.x,N.x),S.y1=Math.min(b.y,T.x,w.x,N.x),S.x2=Math.max(b.x,T.x,w.x,N.x),S.y2=Math.max(b.y,T.x,w.x,N.x),S.maxScale=s.maxScale}else S=s;for(var B=0;B=r.maxScale)return o}}}return o},CollisionTile.prototype.queryRenderedSymbols=function(t,e){var i={},r=[];if(0===t.length||0===this.grid.length&&0===this.ignoredGrid.length)return r;for(var a=this.collisionBoxArray,o=this.rotationMatrix,n=this.yStretch,l=[],h=1/0,s=1/0,x=-(1/0),c=-(1/0),g=0;gS.maxScale)){var T=S.anchorPoint.matMult(o),w=T.x+S.x1/e,N=T.y+S.y1/e*n,B=T.x+S.x2/e,G=T.y+S.y2/e*n,E=[new Point(w,N),new Point(B,N),new Point(B,G),new Point(w,G)];intersectionTests.polygonIntersectsPolygon(l,E)&&(i[P][b]=!0,r.push(u[v]))}}return r},CollisionTile.prototype.getPlacementScale=function(t,e,i,r,a){var o=e.x-r.x,n=e.y-r.y,l=(a.x1-i.x2)/o,h=(a.x2-i.x1)/o,s=(a.y1-i.y2)*this.yStretch/n,x=(a.y2-i.y1)*this.yStretch/n;(isNaN(l)||isNaN(h))&&(l=h=1),(isNaN(s)||isNaN(x))&&(s=x=1);var c=Math.min(Math.max(l,h),Math.max(s,x)),g=a.maxScale,y=i.maxScale;return c>g&&(c=g),c>y&&(c=y),c>t&&c>=a.placementScale&&(t=c),t},CollisionTile.prototype.insertCollisionFeature=function(t,e,i){for(var r=this,a=i?this.ignoredGrid:this.grid,o=this.collisionBoxArray,n=t.boxStartIndex;n=0&&k=0&&q=0&&p+c<=s){var M=new Anchor(k,q,y,f)._round();n&&!checkMaxAngle(e,M,l,n,a)||x.push(M)}}g+=A}return i||x.length||o||(x=resample(e,g/2,t,n,a,l,o,!0,h)),x}var interpolate=require(\"../util/interpolate\"),Anchor=require(\"../symbol/anchor\"),checkMaxAngle=require(\"./check_max_angle\");module.exports=getAnchors;\n},{\"../symbol/anchor\":157,\"../util/interpolate\":204,\"./check_max_angle\":158}],164:[function(require,module,exports){\n\"use strict\";var ShelfPack=require(\"@mapbox/shelf-pack\"),util=require(\"../util/util\"),SIZE_GROWTH_RATE=4,DEFAULT_SIZE=128,MAX_SIZE=2048,GlyphAtlas=function(){this.width=DEFAULT_SIZE,this.height=DEFAULT_SIZE,this.atlas=new ShelfPack(this.width,this.height),this.index={},this.ids={},this.data=new Uint8Array(this.width*this.height)};GlyphAtlas.prototype.getGlyphs=function(){var t,i,e,h=this,r={};for(var s in h.ids)t=s.split(\"#\"),i=t[0],e=t[1],r[i]||(r[i]=[]),r[i].push(e);return r},GlyphAtlas.prototype.getRects=function(){var t,i,e,h=this,r={};for(var s in h.ids)t=s.split(\"#\"),i=t[0],e=t[1],r[i]||(r[i]={}),r[i][e]=h.index[s];return r},GlyphAtlas.prototype.addGlyph=function(t,i,e,h){var r=this;if(!e)return null;var s=i+\"#\"+e.id;if(this.index[s])return this.ids[s].indexOf(t)<0&&this.ids[s].push(t),this.index[s];if(!e.bitmap)return null;var a=e.width+2*h,E=e.height+2*h,n=1,l=a+2*n,T=E+2*n;l+=4-l%4,T+=4-T%4;var u=this.atlas.packOne(l,T);if(u||(this.resize(),u=this.atlas.packOne(l,T)),!u)return util.warnOnce(\"glyph bitmap overflow\"),null;this.index[s]=u,this.ids[s]=[t];for(var d=this.data,p=e.bitmap,A=0;A=MAX_SIZE||e>=MAX_SIZE)){this.texture&&(this.gl&&this.gl.deleteTexture(this.texture),this.texture=null),this.width*=SIZE_GROWTH_RATE,this.height*=SIZE_GROWTH_RATE,this.atlas.resize(this.width,this.height);for(var h=new ArrayBuffer(this.width*this.height),r=0;r65535)return a(\"glyphs > 65535 not supported\");void 0===this.loading[t]&&(this.loading[t]={});var l=this.loading[t];if(l[e])l[e].push(a);else{l[e]=[a];var i=256*e+\"-\"+(256*e+255),r=glyphUrl(t,i,this.url);ajax.getArrayBuffer(r,function(t,a){for(var i=!t&&new Glyphs(new Protobuf(a.data)),r=0;r1?2:1,this.canvas&&(this.canvas.width=this.width*this.pixelRatio,this.canvas.height=this.height*this.pixelRatio)),this.sprite=t},i.prototype.addIcons=function(t,i){for(var e=this,r=0;r1||(b?(clearTimeout(b),b=null,h(\"dblclick\",t)):b=setTimeout(l,300))}function i(e){f(\"touchmove\",e)}function c(e){f(\"touchend\",e)}function d(e){f(\"touchcancel\",e)}function l(){b=null}function s(e){var t=DOM.mousePos(g,e);t.equals(L)&&h(\"click\",e)}function v(e){h(\"dblclick\",e),e.preventDefault()}function m(t){var n=e.dragRotate&&e.dragRotate.isActive();E||n?E&&(p=t):h(\"contextmenu\",t),t.preventDefault()}function h(t,n){var o=DOM.mousePos(g,n);return e.fire(t,{lngLat:e.unproject(o),point:o,originalEvent:n})}function f(t,n){var o=DOM.touchPos(g,n),r=o.reduce(function(e,t,n,o){return e.add(t.div(o.length))},new Point(0,0));return e.fire(t,{lngLat:e.unproject(r),point:r,lngLats:o.map(function(t){return e.unproject(t)},this),points:o,originalEvent:n})}var g=e.getCanvasContainer(),p=null,E=!1,L=null,b=null;for(var q in handlers)e[q]=new handlers[q](e,t),t.interactive&&t[q]&&e[q].enable(t[q]);g.addEventListener(\"mouseout\",n,!1),g.addEventListener(\"mousedown\",o,!1),g.addEventListener(\"mouseup\",r,!1),g.addEventListener(\"mousemove\",a,!1),g.addEventListener(\"touchstart\",u,!1),g.addEventListener(\"touchend\",c,!1),g.addEventListener(\"touchmove\",i,!1),g.addEventListener(\"touchcancel\",d,!1),g.addEventListener(\"click\",s,!1),g.addEventListener(\"dblclick\",v,!1),g.addEventListener(\"contextmenu\",m,!1)};\n},{\"../util/dom\":199,\"./handler/box_zoom\":179,\"./handler/dblclick_zoom\":180,\"./handler/drag_pan\":181,\"./handler/drag_rotate\":182,\"./handler/keyboard\":183,\"./handler/scroll_zoom\":184,\"./handler/touch_zoom_rotate\":185,\"point-geometry\":26}],172:[function(require,module,exports){\n\"use strict\";var util=require(\"../util/util\"),interpolate=require(\"../util/interpolate\"),browser=require(\"../util/browser\"),LngLat=require(\"../geo/lng_lat\"),LngLatBounds=require(\"../geo/lng_lat_bounds\"),Point=require(\"point-geometry\"),Evented=require(\"../util/evented\"),Camera=function(t){function i(i,e){t.call(this),this.moving=!1,this.transform=i,this._bearingSnap=e.bearingSnap}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.getCenter=function(){return this.transform.center},i.prototype.setCenter=function(t,i){return this.jumpTo({center:t},i),this},i.prototype.panBy=function(t,i,e){return this.panTo(this.transform.center,util.extend({offset:Point.convert(t).mult(-1)},i),e),this},i.prototype.panTo=function(t,i,e){return this.easeTo(util.extend({center:t},i),e)},i.prototype.getZoom=function(){return this.transform.zoom},i.prototype.setZoom=function(t,i){return this.jumpTo({zoom:t},i),this},i.prototype.zoomTo=function(t,i,e){return this.easeTo(util.extend({zoom:t},i),e)},i.prototype.zoomIn=function(t,i){return this.zoomTo(this.getZoom()+1,t,i),this},i.prototype.zoomOut=function(t,i){return this.zoomTo(this.getZoom()-1,t,i),this},i.prototype.getBearing=function(){return this.transform.bearing},i.prototype.setBearing=function(t,i){return this.jumpTo({bearing:t},i),this},i.prototype.rotateTo=function(t,i,e){return this.easeTo(util.extend({bearing:t},i),e)},i.prototype.resetNorth=function(t,i){return this.rotateTo(0,util.extend({duration:1e3},t),i),this},i.prototype.snapToNorth=function(t,i){return Math.abs(this.getBearing())i?1:0}),[\"bottom\",\"left\",\"right\",\"top\"]))return void util.warnOnce(\"options.padding must be a positive number, or an Object with keys 'bottom', 'left', 'right', 'top'\");t=LngLatBounds.convert(t);var n=[i.padding.left-i.padding.right,i.padding.top-i.padding.bottom],r=Math.min(i.padding.right,i.padding.left),s=Math.min(i.padding.top,i.padding.bottom);i.offset=[i.offset[0]+n[0],i.offset[1]+n[1]];var a=Point.convert(i.offset),h=this.transform,u=h.project(t.getNorthWest()),p=h.project(t.getSouthEast()),c=p.sub(u),g=(h.width-2*r-2*Math.abs(a.x))/c.x,m=(h.height-2*s-2*Math.abs(a.y))/c.y;return m<0||g<0?void util.warnOnce(\"Map cannot fit within canvas with the given bounds, padding, and/or offset.\"):(i.center=h.unproject(u.add(p).div(2)),i.zoom=Math.min(h.scaleZoom(h.scale*Math.min(g,m)),i.maxZoom),i.bearing=0,i.linear?this.easeTo(i,e):this.flyTo(i,e))},i.prototype.jumpTo=function(t,i){this.stop();var e=this.transform,o=!1,n=!1,r=!1;return\"zoom\"in t&&e.zoom!==+t.zoom&&(o=!0,e.zoom=+t.zoom),\"center\"in t&&(e.center=LngLat.convert(t.center)),\"bearing\"in t&&e.bearing!==+t.bearing&&(n=!0,e.bearing=+t.bearing),\"pitch\"in t&&e.pitch!==+t.pitch&&(r=!0,e.pitch=+t.pitch),this.fire(\"movestart\",i).fire(\"move\",i),o&&this.fire(\"zoomstart\",i).fire(\"zoom\",i).fire(\"zoomend\",i),n&&this.fire(\"rotate\",i),r&&this.fire(\"pitch\",i),this.fire(\"moveend\",i)},i.prototype.easeTo=function(t,i){var e=this;this.stop(),t=util.extend({offset:[0,0],duration:500,easing:util.ease},t);var o,n,r=this.transform,s=Point.convert(t.offset),a=this.getZoom(),h=this.getBearing(),u=this.getPitch(),p=\"zoom\"in t?+t.zoom:a,c=\"bearing\"in t?this._normalizeBearing(t.bearing,h):h,g=\"pitch\"in t?+t.pitch:u;\"center\"in t?(o=LngLat.convert(t.center),n=r.centerPoint.add(s)):\"around\"in t?(o=LngLat.convert(t.around),n=r.locationPoint(o)):(n=r.centerPoint.add(s),o=r.pointLocation(n));var m=r.locationPoint(o);return t.animate===!1&&(t.duration=0),this.zooming=p!==a,this.rotating=h!==c,this.pitching=g!==u,t.smoothEasing&&0!==t.duration&&(t.easing=this._smoothOutEasing(t.duration)),t.noMoveStart||(this.moving=!0,this.fire(\"movestart\",i)),this.zooming&&this.fire(\"zoomstart\",i),clearTimeout(this._onEaseEnd),this._ease(function(t){this.zooming&&(r.zoom=interpolate(a,p,t)),this.rotating&&(r.bearing=interpolate(h,c,t)),this.pitching&&(r.pitch=interpolate(u,g,t)),r.setLocationAtPoint(o,m.add(n.sub(m)._mult(t))),this.fire(\"move\",i),this.zooming&&this.fire(\"zoom\",i),this.rotating&&this.fire(\"rotate\",i),this.pitching&&this.fire(\"pitch\",i)},function(){t.delayEndEvents?e._onEaseEnd=setTimeout(e._easeToEnd.bind(e,i),t.delayEndEvents):e._easeToEnd(i)},t),this},i.prototype._easeToEnd=function(t){var i=this.zooming;this.moving=!1,this.zooming=!1,this.rotating=!1,this.pitching=!1,i&&this.fire(\"zoomend\",t),this.fire(\"moveend\",t)},i.prototype.flyTo=function(t,i){function e(t){var i=(y*y-z*z+(t?-1:1)*E*E*_*_)/(2*(t?y:z)*E*_);return Math.log(Math.sqrt(i*i+1)-i)}function o(t){return(Math.exp(t)-Math.exp(-t))/2}function n(t){return(Math.exp(t)+Math.exp(-t))/2}function r(t){return o(t)/n(t)}this.stop(),t=util.extend({offset:[0,0],speed:1.2,curve:1.42,easing:util.ease},t);var s=this.transform,a=Point.convert(t.offset),h=this.getZoom(),u=this.getBearing(),p=this.getPitch(),c=\"center\"in t?LngLat.convert(t.center):this.getCenter(),g=\"zoom\"in t?+t.zoom:h,m=\"bearing\"in t?this._normalizeBearing(t.bearing,u):u,f=\"pitch\"in t?+t.pitch:p;Math.abs(s.center.lng)+Math.abs(c.lng)>180&&(s.center.lng>0&&c.lng<0?c.lng+=360:s.center.lng<0&&c.lng>0&&(c.lng-=360));var d=s.zoomScale(g-h),l=s.point,v=\"center\"in t?s.project(c).sub(a.div(d)):l,b=t.curve,z=Math.max(s.width,s.height),y=z/d,_=v.sub(l).mag();if(\"minZoom\"in t){var M=util.clamp(Math.min(t.minZoom,h,g),s.minZoom,s.maxZoom),T=z/s.zoomScale(M-h);b=Math.sqrt(T/_*2)}var E=b*b,x=e(0),L=function(t){return n(x)/n(x+b*t)},Z=function(t){return z*((n(x)*r(x+b*t)-o(x))/E)/_},P=(e(1)-x)/b;if(Math.abs(_)<1e-6){if(Math.abs(z-y)<1e-6)return this.easeTo(t,i);var j=y=0)return!1;return!0}),this._container.innerHTML=i.join(\" | \"),this._editLink=null}},AttributionControl.prototype._updateCompact=function(){var t=this._map.getCanvasContainer().offsetWidth<=640;this._container.classList[t?\"add\":\"remove\"](\"compact\")},module.exports=AttributionControl;\n},{\"../../util/dom\":199,\"../../util/util\":212}],174:[function(require,module,exports){\n\"use strict\";var DOM=require(\"../../util/dom\"),util=require(\"../../util/util\"),window=require(\"../../util/window\"),FullscreenControl=function(){this._fullscreen=!1,util.bindAll([\"_onClickFullscreen\",\"_changeIcon\"],this),\"onfullscreenchange\"in window.document?this._fullscreenchange=\"fullscreenchange\":\"onmozfullscreenchange\"in window.document?this._fullscreenchange=\"mozfullscreenchange\":\"onwebkitfullscreenchange\"in window.document?this._fullscreenchange=\"webkitfullscreenchange\":\"onmsfullscreenchange\"in window.document&&(this._fullscreenchange=\"MSFullscreenChange\")};FullscreenControl.prototype.onAdd=function(e){var n=\"mapboxgl-ctrl\",t=this._container=DOM.create(\"div\",n+\" mapboxgl-ctrl-group\"),l=this._fullscreenButton=DOM.create(\"button\",n+\"-icon \"+n+\"-fullscreen\",this._container);return l.setAttribute(\"aria-label\",\"Toggle fullscreen\"),l.type=\"button\",this._fullscreenButton.addEventListener(\"click\",this._onClickFullscreen),this._mapContainer=e.getContainer(),window.document.addEventListener(this._fullscreenchange,this._changeIcon),t},FullscreenControl.prototype.onRemove=function(){this._container.parentNode.removeChild(this._container),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},FullscreenControl.prototype._isFullscreen=function(){return this._fullscreen},FullscreenControl.prototype._changeIcon=function(e){if(e.target===this._mapContainer){this._fullscreen=!this._fullscreen;var n=\"mapboxgl-ctrl\";this._fullscreenButton.classList.toggle(n+\"-shrink\"),this._fullscreenButton.classList.toggle(n+\"-fullscreen\")}},FullscreenControl.prototype._onClickFullscreen=function(){this._isFullscreen()?window.document.exitFullscreen?window.document.exitFullscreen():window.document.mozCancelFullScreen?window.document.mozCancelFullScreen():window.document.msExitFullscreen?window.document.msExitFullscreen():window.document.webkitCancelFullScreen&&window.document.webkitCancelFullScreen():this._mapContainer.requestFullscreen?this._mapContainer.requestFullscreen():this._mapContainer.mozRequestFullScreen?this._mapContainer.mozRequestFullScreen():this._mapContainer.msRequestFullscreen?this._mapContainer.msRequestFullscreen():this._mapContainer.webkitRequestFullscreen&&this._mapContainer.webkitRequestFullscreen()},module.exports=FullscreenControl;\n},{\"../../util/dom\":199,\"../../util/util\":212,\"../../util/window\":194}],175:[function(require,module,exports){\n\"use strict\";function checkGeolocationSupport(t){void 0!==supportsGeolocation?t(supportsGeolocation):void 0!==window.navigator.permissions?window.navigator.permissions.query({name:\"geolocation\"}).then(function(o){supportsGeolocation=\"denied\"!==o.state,t(supportsGeolocation)}):(supportsGeolocation=!!window.navigator.geolocation,t(supportsGeolocation))}var Evented=require(\"../../util/evented\"),DOM=require(\"../../util/dom\"),window=require(\"../../util/window\"),util=require(\"../../util/util\"),defaultGeoPositionOptions={enableHighAccuracy:!1,timeout:6e3},className=\"mapboxgl-ctrl\",supportsGeolocation,GeolocateControl=function(t){function o(o){t.call(this),this.options=o||{},util.bindAll([\"_onSuccess\",\"_onError\",\"_finish\",\"_setupUI\"],this)}return t&&(o.__proto__=t),o.prototype=Object.create(t&&t.prototype),o.prototype.constructor=o,o.prototype.onAdd=function(t){return this._map=t,this._container=DOM.create(\"div\",className+\" \"+className+\"-group\"),checkGeolocationSupport(this._setupUI),this._container},o.prototype.onRemove=function(){this._container.parentNode.removeChild(this._container),this._map=void 0},o.prototype._onSuccess=function(t){this._map.jumpTo({center:[t.coords.longitude,t.coords.latitude],zoom:17,bearing:0,pitch:0}),this.fire(\"geolocate\",t),this._finish()},o.prototype._onError=function(t){this.fire(\"error\",t),this._finish()},o.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},o.prototype._setupUI=function(t){t!==!1&&(this._container.addEventListener(\"contextmenu\",function(t){return t.preventDefault()}),this._geolocateButton=DOM.create(\"button\",className+\"-icon \"+className+\"-geolocate\",this._container),this._geolocateButton.type=\"button\",this._geolocateButton.setAttribute(\"aria-label\",\"Geolocate\"),this.options.watchPosition&&this._geolocateButton.setAttribute(\"aria-pressed\",!1),this._geolocateButton.addEventListener(\"click\",this._onClickGeolocate.bind(this)))},o.prototype._onClickGeolocate=function(){var t=util.extend(defaultGeoPositionOptions,this.options&&this.options.positionOptions||{});this.options.watchPosition?void 0!==this._geolocationWatchID?(this._geolocateButton.classList.remove(\"watching\"),this._geolocateButton.setAttribute(\"aria-pressed\",!1),window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0):(this._geolocateButton.classList.add(\"watching\"),this._geolocateButton.setAttribute(\"aria-pressed\",!0),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,t)):(window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,t),this._timeoutId=setTimeout(this._finish,1e4))},o}(Evented);module.exports=GeolocateControl;\n},{\"../../util/dom\":199,\"../../util/evented\":200,\"../../util/util\":212,\"../../util/window\":194}],176:[function(require,module,exports){\n\"use strict\";var DOM=require(\"../../util/dom\"),util=require(\"../../util/util\"),LogoControl=function(){util.bindAll([\"_updateLogo\"],this)};LogoControl.prototype.onAdd=function(o){return this._map=o,this._container=DOM.create(\"div\",\"mapboxgl-ctrl\"),this._map.on(\"sourcedata\",this._updateLogo),this._updateLogo(),this._container},LogoControl.prototype.onRemove=function(){this._container.parentNode.removeChild(this._container),this._map.off(\"sourcedata\",this._updateLogo)},LogoControl.prototype.getDefaultPosition=function(){return\"bottom-left\"},LogoControl.prototype._updateLogo=function(o){if(o&&\"metadata\"===o.sourceDataType)if(!this._container.childNodes.length&&this._logoRequired()){var t=DOM.create(\"a\",\"mapboxgl-ctrl-logo\");t.target=\"_blank\",t.href=\"https://www.mapbox.com/\",t.setAttribute(\"aria-label\",\"Mapbox logo\"),this._container.appendChild(t),this._map.off(\"data\",this._updateLogo)}else this._container.childNodes.length&&!this._logoRequired()&&this.onRemove()},LogoControl.prototype._logoRequired=function(){if(this._map.style){var o=this._map.style.sourceCaches;for(var t in o){var e=o[t].getSource();if(e.mapbox_logo)return!0}return!1}},module.exports=LogoControl;\n},{\"../../util/dom\":199,\"../../util/util\":212}],177:[function(require,module,exports){\n\"use strict\";function copyMouseEvent(t){return new window.MouseEvent(t.type,{button:2,buttons:2,bubbles:!0,cancelable:!0,detail:t.detail,view:t.view,screenX:t.screenX,screenY:t.screenY,clientX:t.clientX,clientY:t.clientY,movementX:t.movementX,movementY:t.movementY,ctrlKey:t.ctrlKey,shiftKey:t.shiftKey,altKey:t.altKey,metaKey:t.metaKey})}var DOM=require(\"../../util/dom\"),window=require(\"../../util/window\"),util=require(\"../../util/util\"),className=\"mapboxgl-ctrl\",NavigationControl=function(){util.bindAll([\"_rotateCompassArrow\"],this)};NavigationControl.prototype._rotateCompassArrow=function(){var t=\"rotate(\"+this._map.transform.angle*(180/Math.PI)+\"deg)\";this._compassArrow.style.transform=t},NavigationControl.prototype.onAdd=function(t){return this._map=t,this._container=DOM.create(\"div\",className+\" \"+className+\"-group\",t.getContainer()),this._container.addEventListener(\"contextmenu\",this._onContextMenu.bind(this)),this._zoomInButton=this._createButton(className+\"-icon \"+className+\"-zoom-in\",\"Zoom In\",t.zoomIn.bind(t)),this._zoomOutButton=this._createButton(className+\"-icon \"+className+\"-zoom-out\",\"Zoom Out\",t.zoomOut.bind(t)),this._compass=this._createButton(className+\"-icon \"+className+\"-compass\",\"Reset North\",t.resetNorth.bind(t)),this._compassArrow=DOM.create(\"span\",className+\"-compass-arrow\",this._compass),this._compass.addEventListener(\"mousedown\",this._onCompassDown.bind(this)),this._onCompassMove=this._onCompassMove.bind(this),this._onCompassUp=this._onCompassUp.bind(this),this._map.on(\"rotate\",this._rotateCompassArrow),this._rotateCompassArrow(),this._container},NavigationControl.prototype.onRemove=function(){this._container.parentNode.removeChild(this._container),this._map.off(\"rotate\",this._rotateCompassArrow),this._map=void 0},NavigationControl.prototype._onContextMenu=function(t){t.preventDefault()},NavigationControl.prototype._onCompassDown=function(t){0===t.button&&(DOM.disableDrag(),window.document.addEventListener(\"mousemove\",this._onCompassMove),window.document.addEventListener(\"mouseup\",this._onCompassUp),this._map.getCanvasContainer().dispatchEvent(copyMouseEvent(t)),t.stopPropagation())},NavigationControl.prototype._onCompassMove=function(t){0===t.button&&(this._map.getCanvasContainer().dispatchEvent(copyMouseEvent(t)),t.stopPropagation())},NavigationControl.prototype._onCompassUp=function(t){0===t.button&&(window.document.removeEventListener(\"mousemove\",this._onCompassMove),window.document.removeEventListener(\"mouseup\",this._onCompassUp),DOM.enableDrag(),this._map.getCanvasContainer().dispatchEvent(copyMouseEvent(t)),t.stopPropagation())},NavigationControl.prototype._createButton=function(t,o,e){var n=DOM.create(\"button\",t,this._container);return n.type=\"button\",n.setAttribute(\"aria-label\",o),n.addEventListener(\"click\",function(){e()}),n},module.exports=NavigationControl;\n},{\"../../util/dom\":199,\"../../util/util\":212,\"../../util/window\":194}],178:[function(require,module,exports){\n\"use strict\";function updateScale(t,e,o){var n=o&&o.maxWidth||100,i=t._container.clientHeight/2,a=getDistance(t.unproject([0,i]),t.unproject([n,i]));if(o&&\"imperial\"===o.unit){var r=3.2808*a;if(r>5280){var l=r/5280;setScale(e,n,l,\"mi\")}else setScale(e,n,r,\"ft\")}else setScale(e,n,a,\"m\")}function setScale(t,e,o,n){var i=getRoundNum(o),a=i/o;\"m\"===n&&i>=1e3&&(i/=1e3,n=\"km\"),t.style.width=e*a+\"px\",t.innerHTML=i+n}function getDistance(t,e){var o=6371e3,n=Math.PI/180,i=t.lat*n,a=e.lat*n,r=Math.sin(i)*Math.sin(a)+Math.cos(i)*Math.cos(a)*Math.cos((e.lng-t.lng)*n),l=o*Math.acos(Math.min(r,1));return l}function getRoundNum(t){var e=Math.pow(10,(\"\"+Math.floor(t)).length-1),o=t/e;return o=o>=10?10:o>=5?5:o>=3?3:o>=2?2:1,e*o}var DOM=require(\"../../util/dom\"),util=require(\"../../util/util\"),ScaleControl=function(t){this.options=t,util.bindAll([\"_onMove\"],this)};ScaleControl.prototype.getDefaultPosition=function(){return\"bottom-left\"},ScaleControl.prototype._onMove=function(){updateScale(this._map,this._container,this.options)},ScaleControl.prototype.onAdd=function(t){return this._map=t,this._container=DOM.create(\"div\",\"mapboxgl-ctrl mapboxgl-ctrl-scale\",t.getContainer()),this._map.on(\"move\",this._onMove),this._onMove(),this._container},ScaleControl.prototype.onRemove=function(){this._container.parentNode.removeChild(this._container),this._map.off(\"move\",this._onMove),this._map=void 0},module.exports=ScaleControl;\n},{\"../../util/dom\":199,\"../../util/util\":212}],179:[function(require,module,exports){\n\"use strict\";var DOM=require(\"../../util/dom\"),LngLatBounds=require(\"../../geo/lng_lat_bounds\"),util=require(\"../../util/util\"),window=require(\"../../util/window\"),BoxZoomHandler=function(o){this._map=o,this._el=o.getCanvasContainer(),this._container=o.getContainer(),util.bindAll([\"_onMouseDown\",\"_onMouseMove\",\"_onMouseUp\",\"_onKeyDown\"],this)};BoxZoomHandler.prototype.isEnabled=function(){return!!this._enabled},BoxZoomHandler.prototype.isActive=function(){return!!this._active},BoxZoomHandler.prototype.enable=function(){this.isEnabled()||(this._el.addEventListener(\"mousedown\",this._onMouseDown,!1),this._enabled=!0)},BoxZoomHandler.prototype.disable=function(){this.isEnabled()&&(this._el.removeEventListener(\"mousedown\",this._onMouseDown),this._enabled=!1)},BoxZoomHandler.prototype._onMouseDown=function(o){o.shiftKey&&0===o.button&&(window.document.addEventListener(\"mousemove\",this._onMouseMove,!1),window.document.addEventListener(\"keydown\",this._onKeyDown,!1),window.document.addEventListener(\"mouseup\",this._onMouseUp,!1),DOM.disableDrag(),this._startPos=DOM.mousePos(this._el,o),this._active=!0)},BoxZoomHandler.prototype._onMouseMove=function(o){var e=this._startPos,t=DOM.mousePos(this._el,o);this._box||(this._box=DOM.create(\"div\",\"mapboxgl-boxzoom\",this._container),this._container.classList.add(\"mapboxgl-crosshair\"),this._fireEvent(\"boxzoomstart\",o));var n=Math.min(e.x,t.x),i=Math.max(e.x,t.x),s=Math.min(e.y,t.y),r=Math.max(e.y,t.y);DOM.setTransform(this._box,\"translate(\"+n+\"px,\"+s+\"px)\"),this._box.style.width=i-n+\"px\",this._box.style.height=r-s+\"px\"},BoxZoomHandler.prototype._onMouseUp=function(o){if(0===o.button){var e=this._startPos,t=DOM.mousePos(this._el,o),n=(new LngLatBounds).extend(this._map.unproject(e)).extend(this._map.unproject(t));this._finish(),e.x===t.x&&e.y===t.y?this._fireEvent(\"boxzoomcancel\",o):this._map.fitBounds(n,{linear:!0}).fire(\"boxzoomend\",{originalEvent:o,boxZoomBounds:n})}},BoxZoomHandler.prototype._onKeyDown=function(o){27===o.keyCode&&(this._finish(),this._fireEvent(\"boxzoomcancel\",o))},BoxZoomHandler.prototype._finish=function(){this._active=!1,window.document.removeEventListener(\"mousemove\",this._onMouseMove,!1),window.document.removeEventListener(\"keydown\",this._onKeyDown,!1),window.document.removeEventListener(\"mouseup\",this._onMouseUp,!1),this._container.classList.remove(\"mapboxgl-crosshair\"),this._box&&(this._box.parentNode.removeChild(this._box),this._box=null),DOM.enableDrag()},BoxZoomHandler.prototype._fireEvent=function(o,e){return this._map.fire(o,{originalEvent:e})},module.exports=BoxZoomHandler;\n},{\"../../geo/lng_lat_bounds\":63,\"../../util/dom\":199,\"../../util/util\":212,\"../../util/window\":194}],180:[function(require,module,exports){\n\"use strict\";var DoubleClickZoomHandler=function(o){this._map=o,this._onDblClick=this._onDblClick.bind(this)};DoubleClickZoomHandler.prototype.isEnabled=function(){return!!this._enabled},DoubleClickZoomHandler.prototype.enable=function(){this.isEnabled()||(this._map.on(\"dblclick\",this._onDblClick),this._enabled=!0)},DoubleClickZoomHandler.prototype.disable=function(){this.isEnabled()&&(this._map.off(\"dblclick\",this._onDblClick),this._enabled=!1)},DoubleClickZoomHandler.prototype._onDblClick=function(o){this._map.zoomTo(this._map.getZoom()+(o.originalEvent.shiftKey?-1:1),{around:o.lngLat},o)},module.exports=DoubleClickZoomHandler;\n},{}],181:[function(require,module,exports){\n\"use strict\";var DOM=require(\"../../util/dom\"),util=require(\"../../util/util\"),window=require(\"../../util/window\"),inertiaLinearity=.3,inertiaEasing=util.bezier(0,0,inertiaLinearity,1),inertiaMaxSpeed=1400,inertiaDeceleration=2500,DragPanHandler=function(t){this._map=t,this._el=t.getCanvasContainer(),util.bindAll([\"_onDown\",\"_onMove\",\"_onUp\",\"_onTouchEnd\",\"_onMouseUp\"],this)};DragPanHandler.prototype.isEnabled=function(){return!!this._enabled},DragPanHandler.prototype.isActive=function(){return!!this._active},DragPanHandler.prototype.enable=function(){this.isEnabled()||(this._el.addEventListener(\"mousedown\",this._onDown),this._el.addEventListener(\"touchstart\",this._onDown),this._enabled=!0)},DragPanHandler.prototype.disable=function(){this.isEnabled()&&(this._el.removeEventListener(\"mousedown\",this._onDown),this._el.removeEventListener(\"touchstart\",this._onDown),this._enabled=!1)},DragPanHandler.prototype._onDown=function(t){this._ignoreEvent(t)||this.isActive()||(t.touches?(window.document.addEventListener(\"touchmove\",this._onMove),window.document.addEventListener(\"touchend\",this._onTouchEnd)):(window.document.addEventListener(\"mousemove\",this._onMove),window.document.addEventListener(\"mouseup\",this._onMouseUp)),window.addEventListener(\"blur\",this._onMouseUp),this._active=!1,this._startPos=this._pos=DOM.mousePos(this._el,t),this._inertia=[[Date.now(),this._pos]])},DragPanHandler.prototype._onMove=function(t){if(!this._ignoreEvent(t)){this.isActive()||(this._active=!0,this._map.moving=!0,this._fireEvent(\"dragstart\",t),this._fireEvent(\"movestart\",t));var e=DOM.mousePos(this._el,t),n=this._map;n.stop(),this._drainInertiaBuffer(),this._inertia.push([Date.now(),e]),n.transform.setLocationAtPoint(n.transform.pointLocation(this._pos),e),this._fireEvent(\"drag\",t),this._fireEvent(\"move\",t),this._pos=e,t.preventDefault()}},DragPanHandler.prototype._onUp=function(t){var e=this;if(this.isActive()){this._active=!1,this._fireEvent(\"dragend\",t),this._drainInertiaBuffer();var n=function(){e._map.moving=!1,e._fireEvent(\"moveend\",t)},i=this._inertia;if(i.length<2)return void n();var o=i[i.length-1],r=i[0],a=o[1].sub(r[1]),s=(o[0]-r[0])/1e3;if(0===s||o[1].equals(r[1]))return void n();var u=a.mult(inertiaLinearity/s),d=u.mag();d>inertiaMaxSpeed&&(d=inertiaMaxSpeed,u._unit()._mult(d));var h=d/(inertiaDeceleration*inertiaLinearity),v=u.mult(-h/2);this._map.panBy(v,{duration:1e3*h,easing:inertiaEasing,noMoveStart:!0},{originalEvent:t})}},DragPanHandler.prototype._onMouseUp=function(t){this._ignoreEvent(t)||(this._onUp(t),window.document.removeEventListener(\"mousemove\",this._onMove),window.document.removeEventListener(\"mouseup\",this._onMouseUp),window.removeEventListener(\"blur\",this._onMouseUp))},DragPanHandler.prototype._onTouchEnd=function(t){this._ignoreEvent(t)||(this._onUp(t),window.document.removeEventListener(\"touchmove\",this._onMove),window.document.removeEventListener(\"touchend\",this._onTouchEnd))},DragPanHandler.prototype._fireEvent=function(t,e){return this._map.fire(t,{originalEvent:e})},DragPanHandler.prototype._ignoreEvent=function(t){var e=this._map;if(e.boxZoom&&e.boxZoom.isActive())return!0;if(e.dragRotate&&e.dragRotate.isActive())return!0;if(t.touches)return t.touches.length>1;if(t.ctrlKey)return!0;var n=1,i=0;return\"mousemove\"===t.type?t.buttons&0===n:t.button&&t.button!==i},DragPanHandler.prototype._drainInertiaBuffer=function(){for(var t=this._inertia,e=Date.now(),n=160;t.length>0&&e-t[0][0]>n;)t.shift()},module.exports=DragPanHandler;\n},{\"../../util/dom\":199,\"../../util/util\":212,\"../../util/window\":194}],182:[function(require,module,exports){\n\"use strict\";var DOM=require(\"../../util/dom\"),util=require(\"../../util/util\"),window=require(\"../../util/window\"),inertiaLinearity=.25,inertiaEasing=util.bezier(0,0,inertiaLinearity,1),inertiaMaxSpeed=180,inertiaDeceleration=720,DragRotateHandler=function(t,e){this._map=t,this._el=t.getCanvasContainer(),this._bearingSnap=e.bearingSnap,this._pitchWithRotate=e.pitchWithRotate!==!1,util.bindAll([\"_onDown\",\"_onMove\",\"_onUp\"],this)};DragRotateHandler.prototype.isEnabled=function(){return!!this._enabled},DragRotateHandler.prototype.isActive=function(){return!!this._active},DragRotateHandler.prototype.enable=function(){this.isEnabled()||(this._el.addEventListener(\"mousedown\",this._onDown),this._enabled=!0)},DragRotateHandler.prototype.disable=function(){this.isEnabled()&&(this._el.removeEventListener(\"mousedown\",this._onDown),this._enabled=!1)},DragRotateHandler.prototype._onDown=function(t){this._ignoreEvent(t)||this.isActive()||(window.document.addEventListener(\"mousemove\",this._onMove),window.document.addEventListener(\"mouseup\",this._onUp),window.addEventListener(\"blur\",this._onUp),this._active=!1,this._inertia=[[Date.now(),this._map.getBearing()]],this._startPos=this._pos=DOM.mousePos(this._el,t),this._center=this._map.transform.centerPoint,t.preventDefault())},DragRotateHandler.prototype._onMove=function(t){if(!this._ignoreEvent(t)){this.isActive()||(this._active=!0,this._map.moving=!0,this._fireEvent(\"rotatestart\",t),this._fireEvent(\"movestart\",t));var e=this._map;e.stop();var i=this._pos,n=DOM.mousePos(this._el,t),r=.8*(i.x-n.x),a=(i.y-n.y)*-.5,o=e.getBearing()-r,s=e.getPitch()-a,h=this._inertia,v=h[h.length-1];this._drainInertiaBuffer(),h.push([Date.now(),e._normalizeBearing(o,v[1])]),e.transform.bearing=o,this._pitchWithRotate&&(e.transform.pitch=s),this._fireEvent(\"rotate\",t),this._fireEvent(\"move\",t),this._pos=n}},DragRotateHandler.prototype._onUp=function(t){var e=this;if(!this._ignoreEvent(t)&&(window.document.removeEventListener(\"mousemove\",this._onMove),window.document.removeEventListener(\"mouseup\",this._onUp),window.removeEventListener(\"blur\",this._onUp),this.isActive())){this._active=!1,this._fireEvent(\"rotateend\",t),this._drainInertiaBuffer();var i=this._map,n=i.getBearing(),r=this._inertia,a=function(){Math.abs(n)inertiaMaxSpeed&&(p=inertiaMaxSpeed);var l=p/(inertiaDeceleration*inertiaLinearity),g=u*p*(l/2);v+=g,Math.abs(i._normalizeBearing(v,0))1;var i=t.ctrlKey?1:2,n=t.ctrlKey?0:2,r=t.button;return\"undefined\"!=typeof InstallTrigger&&2===t.button&&t.ctrlKey&&window.navigator.platform.toUpperCase().indexOf(\"MAC\")>=0&&(r=0),\"mousemove\"===t.type?t.buttons&0===i:!this.isActive()&&r!==n},DragRotateHandler.prototype._drainInertiaBuffer=function(){for(var t=this._inertia,e=Date.now(),i=160;t.length>0&&e-t[0][0]>i;)t.shift()},module.exports=DragRotateHandler;\n},{\"../../util/dom\":199,\"../../util/util\":212,\"../../util/window\":194}],183:[function(require,module,exports){\n\"use strict\";function easeOut(e){return e*(2-e)}var panStep=100,bearingStep=15,pitchStep=10,KeyboardHandler=function(e){this._map=e,this._el=e.getCanvasContainer(),this._onKeyDown=this._onKeyDown.bind(this)};KeyboardHandler.prototype.isEnabled=function(){return!!this._enabled},KeyboardHandler.prototype.enable=function(){this.isEnabled()||(this._el.addEventListener(\"keydown\",this._onKeyDown,!1),this._enabled=!0)},KeyboardHandler.prototype.disable=function(){this.isEnabled()&&(this._el.removeEventListener(\"keydown\",this._onKeyDown),this._enabled=!1)},KeyboardHandler.prototype._onKeyDown=function(e){if(!(e.altKey||e.ctrlKey||e.metaKey)){var t=0,n=0,a=0,i=0,r=0;switch(e.keyCode){case 61:case 107:case 171:case 187:t=1;break;case 189:case 109:case 173:t=-1;break;case 37:e.shiftKey?n=-1:(e.preventDefault(),i=-1);break;case 39:e.shiftKey?n=1:(e.preventDefault(),i=1);break;case 38:e.shiftKey?a=1:(e.preventDefault(),r=-1);break;case 40:e.shiftKey?a=-1:(r=1,e.preventDefault())}var s=this._map,o=s.getZoom(),d={duration:300,delayEndEvents:500,easing:easeOut,zoom:t?Math.round(o)+t*(e.shiftKey?2:1):o,bearing:s.getBearing()+n*bearingStep,pitch:s.getPitch()+a*pitchStep,offset:[-i*panStep,-r*panStep],center:s.getCenter()};s.easeTo(d,{originalEvent:e})}},module.exports=KeyboardHandler;\n},{}],184:[function(require,module,exports){\n\"use strict\";var DOM=require(\"../../util/dom\"),util=require(\"../../util/util\"),browser=require(\"../../util/browser\"),window=require(\"../../util/window\"),ua=window.navigator.userAgent.toLowerCase(),firefox=ua.indexOf(\"firefox\")!==-1,safari=ua.indexOf(\"safari\")!==-1&&ua.indexOf(\"chrom\")===-1,ScrollZoomHandler=function(e){this._map=e,this._el=e.getCanvasContainer(),util.bindAll([\"_onWheel\",\"_onTimeout\"],this)};ScrollZoomHandler.prototype.isEnabled=function(){return!!this._enabled},ScrollZoomHandler.prototype.enable=function(e){this.isEnabled()||(this._el.addEventListener(\"wheel\",this._onWheel,!1),this._el.addEventListener(\"mousewheel\",this._onWheel,!1),this._enabled=!0,this._aroundCenter=e&&\"center\"===e.around)},ScrollZoomHandler.prototype.disable=function(){this.isEnabled()&&(this._el.removeEventListener(\"wheel\",this._onWheel),this._el.removeEventListener(\"mousewheel\",this._onWheel),this._enabled=!1)},ScrollZoomHandler.prototype._onWheel=function(e){var t;\"wheel\"===e.type?(t=e.deltaY,firefox&&e.deltaMode===window.WheelEvent.DOM_DELTA_PIXEL&&(t/=browser.devicePixelRatio),e.deltaMode===window.WheelEvent.DOM_DELTA_LINE&&(t*=40)):\"mousewheel\"===e.type&&(t=-e.wheelDeltaY,safari&&(t/=3));var o=browser.now(),i=o-(this._time||0);this._pos=DOM.mousePos(this._el,e),this._time=o,0!==t&&t%4.000244140625===0?this._type=\"wheel\":0!==t&&Math.abs(t)<4?this._type=\"trackpad\":i>400?(this._type=null,this._lastValue=t,this._timeout=setTimeout(this._onTimeout,40)):this._type||(this._type=Math.abs(i*t)<200?\"trackpad\":\"wheel\",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,t+=this._lastValue)),e.shiftKey&&t&&(t/=4),this._type&&this._zoom(-t,e),e.preventDefault()},ScrollZoomHandler.prototype._onTimeout=function(){this._type=\"wheel\",this._zoom(-this._lastValue)},ScrollZoomHandler.prototype._zoom=function(e,t){if(0!==e){var o=this._map,i=2/(1+Math.exp(-Math.abs(e/100)));e<0&&0!==i&&(i=1/i);var l=o.ease?o.ease.to:o.transform.scale,s=o.transform.scaleZoom(l*i);o.zoomTo(s,{duration:\"wheel\"===this._type?200:0,around:this._aroundCenter?o.getCenter():o.unproject(this._pos),delayEndEvents:200,smoothEasing:!0},{originalEvent:t})}},module.exports=ScrollZoomHandler;\n},{\"../../util/browser\":192,\"../../util/dom\":199,\"../../util/util\":212,\"../../util/window\":194}],185:[function(require,module,exports){\n\"use strict\";var DOM=require(\"../../util/dom\"),util=require(\"../../util/util\"),window=require(\"../../util/window\"),inertiaLinearity=.15,inertiaEasing=util.bezier(0,0,inertiaLinearity,1),inertiaDeceleration=12,inertiaMaxSpeed=2.5,significantScaleThreshold=.15,significantRotateThreshold=4,TouchZoomRotateHandler=function(t){this._map=t,this._el=t.getCanvasContainer(),util.bindAll([\"_onStart\",\"_onMove\",\"_onEnd\"],this)};TouchZoomRotateHandler.prototype.isEnabled=function(){return!!this._enabled},TouchZoomRotateHandler.prototype.enable=function(t){this.isEnabled()||(this._el.addEventListener(\"touchstart\",this._onStart,!1),this._enabled=!0,this._aroundCenter=t&&\"center\"===t.around)},TouchZoomRotateHandler.prototype.disable=function(){this.isEnabled()&&(this._el.removeEventListener(\"touchstart\",this._onStart),this._enabled=!1)},TouchZoomRotateHandler.prototype.disableRotation=function(){this._rotationDisabled=!0},TouchZoomRotateHandler.prototype.enableRotation=function(){this._rotationDisabled=!1},TouchZoomRotateHandler.prototype._onStart=function(t){if(2===t.touches.length){var e=DOM.mousePos(this._el,t.touches[0]),o=DOM.mousePos(this._el,t.touches[1]);this._startVec=e.sub(o),this._startScale=this._map.transform.scale,this._startBearing=this._map.transform.bearing,this._gestureIntent=void 0,this._inertia=[],window.document.addEventListener(\"touchmove\",this._onMove,!1),window.document.addEventListener(\"touchend\",this._onEnd,!1)}},TouchZoomRotateHandler.prototype._onMove=function(t){if(2===t.touches.length){var e=DOM.mousePos(this._el,t.touches[0]),o=DOM.mousePos(this._el,t.touches[1]),i=e.add(o).div(2),n=e.sub(o),a=n.mag()/this._startVec.mag(),r=this._rotationDisabled?0:180*n.angleWith(this._startVec)/Math.PI,s=this._map;if(this._gestureIntent){var h={duration:0,around:s.unproject(i)};\"rotate\"===this._gestureIntent&&(h.bearing=this._startBearing+r),\"zoom\"!==this._gestureIntent&&\"rotate\"!==this._gestureIntent||(h.zoom=s.transform.scaleZoom(this._startScale*a)),s.stop(),this._drainInertiaBuffer(),this._inertia.push([Date.now(),a,i]),s.easeTo(h,{originalEvent:t})}else{var u=Math.abs(1-a)>significantScaleThreshold,d=Math.abs(r)>significantRotateThreshold;d?this._gestureIntent=\"rotate\":u&&(this._gestureIntent=\"zoom\"),this._gestureIntent&&(this._startVec=n,this._startScale=s.transform.scale,this._startBearing=s.transform.bearing)}t.preventDefault()}},TouchZoomRotateHandler.prototype._onEnd=function(t){window.document.removeEventListener(\"touchmove\",this._onMove),window.document.removeEventListener(\"touchend\",this._onEnd),this._drainInertiaBuffer();var e=this._inertia,o=this._map;if(e.length<2)return void o.snapToNorth({},{originalEvent:t});var i=e[e.length-1],n=e[0],a=o.transform.scaleZoom(this._startScale*i[1]),r=o.transform.scaleZoom(this._startScale*n[1]),s=a-r,h=(i[0]-n[0])/1e3,u=i[2];if(0===h||a===r)return void o.snapToNorth({},{originalEvent:t});var d=s*inertiaLinearity/h;Math.abs(d)>inertiaMaxSpeed&&(d=d>0?inertiaMaxSpeed:-inertiaMaxSpeed);var l=1e3*Math.abs(d/(inertiaDeceleration*inertiaLinearity)),c=a+d*l/2e3;c<0&&(c=0),o.easeTo({zoom:c,duration:l,easing:inertiaEasing,around:this._aroundCenter?o.getCenter():o.unproject(u)},{originalEvent:t})},TouchZoomRotateHandler.prototype._drainInertiaBuffer=function(){for(var t=this._inertia,e=Date.now(),o=160;t.length>2&&e-t[0][0]>o;)t.shift()},module.exports=TouchZoomRotateHandler;\n},{\"../../util/dom\":199,\"../../util/util\":212,\"../../util/window\":194}],186:[function(require,module,exports){\n\"use strict\";var util=require(\"../util/util\"),window=require(\"../util/window\"),Hash=function(){util.bindAll([\"_onHashChange\",\"_updateHash\"],this)};Hash.prototype.addTo=function(t){return this._map=t,window.addEventListener(\"hashchange\",this._onHashChange,!1),this._map.on(\"moveend\",this._updateHash),this},Hash.prototype.remove=function(){return window.removeEventListener(\"hashchange\",this._onHashChange,!1),this._map.off(\"moveend\",this._updateHash),delete this._map,this},Hash.prototype._onHashChange=function(){var t=window.location.hash.replace(\"#\",\"\").split(\"/\");return t.length>=3&&(this._map.jumpTo({center:[+t[2],+t[1]],zoom:+t[0],bearing:+(t[3]||0),pitch:+(t[4]||0)}),!0)},Hash.prototype._updateHash=function(){var t=this._map.getCenter(),e=this._map.getZoom(),a=this._map.getBearing(),h=this._map.getPitch(),i=Math.max(0,Math.ceil(Math.log(e)/Math.LN2)),n=\"#\"+Math.round(100*e)/100+\"/\"+t.lat.toFixed(i)+\"/\"+t.lng.toFixed(i);(a||h)&&(n+=\"/\"+Math.round(10*a)/10),h&&(n+=\"/\"+Math.round(h)),window.history.replaceState(\"\",\"\",n)},module.exports=Hash;\n},{\"../util/util\":212,\"../util/window\":194}],187:[function(require,module,exports){\n\"use strict\";function removeNode(t){t.parentNode&&t.parentNode.removeChild(t)}var util=require(\"../util/util\"),browser=require(\"../util/browser\"),window=require(\"../util/window\"),DOM=require(\"../util/dom\"),Style=require(\"../style/style\"),AnimationLoop=require(\"../style/animation_loop\"),Painter=require(\"../render/painter\"),Transform=require(\"../geo/transform\"),Hash=require(\"./hash\"),bindHandlers=require(\"./bind_handlers\"),Camera=require(\"./camera\"),LngLat=require(\"../geo/lng_lat\"),LngLatBounds=require(\"../geo/lng_lat_bounds\"),Point=require(\"point-geometry\"),AttributionControl=require(\"./control/attribution_control\"),LogoControl=require(\"./control/logo_control\"),isSupported=require(\"mapbox-gl-supported\"),defaultMinZoom=0,defaultMaxZoom=22,defaultOptions={center:[0,0],zoom:0,bearing:0,pitch:0,minZoom:defaultMinZoom,maxZoom:defaultMaxZoom,interactive:!0,scrollZoom:!0,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,bearingSnap:7,hash:!1,attributionControl:!0,failIfMajorPerformanceCaveat:!1,preserveDrawingBuffer:!1,trackResize:!0,renderWorldCopies:!0,refreshExpiredTiles:!0},Map=function(t){function e(e){var o=this;if(e=util.extend({},defaultOptions,e),null!=e.minZoom&&null!=e.maxZoom&&e.minZoom>e.maxZoom)throw new Error(\"maxZoom must be greater than minZoom\");var i=new Transform(e.minZoom,e.maxZoom,e.renderWorldCopies);if(t.call(this,i,e),this._interactive=e.interactive,this._failIfMajorPerformanceCaveat=e.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=e.preserveDrawingBuffer,this._trackResize=e.trackResize,this._bearingSnap=e.bearingSnap,this._refreshExpiredTiles=e.refreshExpiredTiles,\"string\"==typeof e.container){if(this._container=window.document.getElementById(e.container),!this._container)throw new Error(\"Container '\"+e.container+\"' not found.\")}else this._container=e.container;this.animationLoop=new AnimationLoop,e.maxBounds&&this.setMaxBounds(e.maxBounds),util.bindAll([\"_onWindowOnline\",\"_onWindowResize\",\"_contextLost\",\"_contextRestored\",\"_update\",\"_render\",\"_onData\",\"_onDataLoading\"],this),this._setupContainer(),this._setupPainter(),this.on(\"move\",this._update.bind(this,!1)),this.on(\"zoom\",this._update.bind(this,!0)),this.on(\"moveend\",function(){o.animationLoop.set(300),o._rerender()}),\"undefined\"!=typeof window&&(window.addEventListener(\"online\",this._onWindowOnline,!1),window.addEventListener(\"resize\",this._onWindowResize,!1)),bindHandlers(this,e),this._hash=e.hash&&(new Hash).addTo(this),this._hash&&this._hash._onHashChange()||this.jumpTo({center:e.center,zoom:e.zoom,bearing:e.bearing,pitch:e.pitch}),this._classes=[],this.resize(),e.classes&&this.setClasses(e.classes),e.style&&this.setStyle(e.style),e.attributionControl&&this.addControl(new AttributionControl),this.addControl(new LogoControl,e.logoPosition),this.on(\"style.load\",function(){this.transform.unmodified&&this.jumpTo(this.style.stylesheet),this.style.update(this._classes,{transition:!1})}),this.on(\"data\",this._onData),this.on(\"dataloading\",this._onDataLoading)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var o={showTileBoundaries:{},showCollisionBoxes:{},showOverdrawInspector:{},repaint:{},vertices:{}};return e.prototype.addControl=function(t,e){void 0===e&&t.getDefaultPosition&&(e=t.getDefaultPosition()),void 0===e&&(e=\"top-right\");var o=t.onAdd(this),i=this._controlPositions[e];return e.indexOf(\"bottom\")!==-1?i.insertBefore(o,i.firstChild):i.appendChild(o),this},e.prototype.removeControl=function(t){return t.onRemove(this),this},e.prototype.addClass=function(t,e){return util.warnOnce(\"Style classes are deprecated and will be removed in an upcoming release of Mapbox GL JS.\"),this._classes.indexOf(t)>=0||\"\"===t?this:(this._classes.push(t),this._classOptions=e,this.style&&this.style.updateClasses(),this._update(!0))},e.prototype.removeClass=function(t,e){util.warnOnce(\"Style classes are deprecated and will be removed in an upcoming release of Mapbox GL JS.\");var o=this._classes.indexOf(t);return o<0||\"\"===t?this:(this._classes.splice(o,1),this._classOptions=e,this.style&&this.style.updateClasses(),this._update(!0))},e.prototype.setClasses=function(t,e){util.warnOnce(\"Style classes are deprecated and will be removed in an upcoming release of Mapbox GL JS.\");for(var o={},i=0;i=0},e.prototype.getClasses=function(){return util.warnOnce(\"Style classes are deprecated and will be removed in an upcoming release of Mapbox GL JS.\"),this._classes},e.prototype.resize=function(){var t=this._containerDimensions(),e=t[0],o=t[1];return this._resizeCanvas(e,o),this.transform.resize(e,o),this.painter.resize(e,o),this.fire(\"movestart\").fire(\"move\").fire(\"resize\").fire(\"moveend\")},e.prototype.getBounds=function(){var t=new LngLatBounds(this.transform.pointLocation(new Point(0,this.transform.height)),this.transform.pointLocation(new Point(this.transform.width,0)));return(this.transform.angle||this.transform.pitch)&&(t.extend(this.transform.pointLocation(new Point(this.transform.size.x,0))),t.extend(this.transform.pointLocation(new Point(0,this.transform.size.y)))),t},e.prototype.setMaxBounds=function(t){if(t){var e=LngLatBounds.convert(t);this.transform.lngRange=[e.getWest(),e.getEast()],this.transform.latRange=[e.getSouth(),e.getNorth()],this.transform._constrain(),this._update()}else null!==t&&void 0!==t||(this.transform.lngRange=[],this.transform.latRange=[],this._update());return this},e.prototype.setMinZoom=function(t){if(t=null===t||void 0===t?defaultMinZoom:t,t>=defaultMinZoom&&t<=this.transform.maxZoom)return this.transform.minZoom=t,this._update(),this.getZoom()=this.transform.minZoom)return this.transform.maxZoom=t,this._update(),this.getZoom()>t&&this.setZoom(t),this;throw new Error(\"maxZoom must be greater than the current minZoom\")},e.prototype.getMaxZoom=function(){return this.transform.maxZoom},e.prototype.project=function(t){return this.transform.locationPoint(LngLat.convert(t))},e.prototype.unproject=function(t){return this.transform.pointLocation(Point.convert(t))},e.prototype.queryRenderedFeatures=function(){function t(t){return t instanceof Point||Array.isArray(t)}var e,o={};return 2===arguments.length?(e=arguments[0],o=arguments[1]):1===arguments.length&&t(arguments[0])?e=arguments[0]:1===arguments.length&&(o=arguments[0]),this.style.queryRenderedFeatures(this._makeQueryGeometry(e),o,this.transform.zoom,this.transform.angle)},e.prototype._makeQueryGeometry=function(t){var e=this;void 0===t&&(t=[Point.convert([0,0]),Point.convert([this.transform.width,this.transform.height])]);var o,i=t instanceof Point||\"number\"==typeof t[0];if(i){var r=Point.convert(t);o=[r]}else{var s=[Point.convert(t[0]),Point.convert(t[1])];o=[s[0],new Point(s[1].x,s[0].y),s[1],new Point(s[0].x,s[1].y),s[0]]}return o=o.map(function(t){return e.transform.pointCoordinate(t)})},e.prototype.querySourceFeatures=function(t,e){return this.style.querySourceFeatures(t,e)},e.prototype.setStyle=function(t,e){var o=(!e||e.diff!==!1)&&this.style&&t&&!(t instanceof Style)&&\"string\"!=typeof t;if(o)try{return this.style.setState(t)&&this._update(!0),this}catch(t){util.warnOnce(\"Unable to perform style diff: \"+(t.message||t.error||t)+\". Rebuilding the style from scratch.\")}return this.style&&(this.style.setEventedParent(null),this.style._remove(),this.off(\"rotate\",this.style._redoPlacement),this.off(\"pitch\",this.style._redoPlacement)),t?(t instanceof Style?this.style=t:this.style=new Style(t,this),this.style.setEventedParent(this,{style:this.style}),this.on(\"rotate\",this.style._redoPlacement),this.on(\"pitch\",this.style._redoPlacement),this):(this.style=null,this)},e.prototype.getStyle=function(){if(this.style)return this.style.serialize()},e.prototype.addSource=function(t,e){return this.style.addSource(t,e),this._update(!0),this},e.prototype.isSourceLoaded=function(t){var e=this.style&&this.style.sourceCaches[t];return void 0===e?void this.fire(\"error\",{error:new Error(\"There is no source with ID '\"+t+\"'\")}):e.loaded()},e.prototype.addSourceType=function(t,e,o){return this.style.addSourceType(t,e,o)},e.prototype.removeSource=function(t){return this.style.removeSource(t),this._update(!0),this},e.prototype.getSource=function(t){return this.style.getSource(t)},e.prototype.addImage=function(t,e,o){this.style.spriteAtlas.addImage(t,e,o)},e.prototype.removeImage=function(t){this.style.spriteAtlas.removeImage(t)},e.prototype.addLayer=function(t,e){return this.style.addLayer(t,e),this._update(!0),this},e.prototype.moveLayer=function(t,e){return this.style.moveLayer(t,e),this._update(!0),this},e.prototype.removeLayer=function(t){return this.style.removeLayer(t),this._update(!0),this},e.prototype.getLayer=function(t){return this.style.getLayer(t)},e.prototype.setFilter=function(t,e){return this.style.setFilter(t,e),this._update(!0),this},e.prototype.setLayerZoomRange=function(t,e,o){return this.style.setLayerZoomRange(t,e,o),this._update(!0),this},e.prototype.getFilter=function(t){return this.style.getFilter(t)},e.prototype.setPaintProperty=function(t,e,o,i){return this.style.setPaintProperty(t,e,o,i),this._update(!0),this},e.prototype.getPaintProperty=function(t,e,o){return this.style.getPaintProperty(t,e,o)},e.prototype.setLayoutProperty=function(t,e,o){return this.style.setLayoutProperty(t,e,o),this._update(!0),this},e.prototype.getLayoutProperty=function(t,e){return this.style.getLayoutProperty(t,e)},e.prototype.setLight=function(t){return this.style.setLight(t),this._update(!0),this},e.prototype.getLight=function(){return this.style.getLight()},e.prototype.getContainer=function(){return this._container},e.prototype.getCanvasContainer=function(){return this._canvasContainer},e.prototype.getCanvas=function(){return this._canvas},e.prototype._containerDimensions=function(){var t=0,e=0;return this._container&&(t=this._container.offsetWidth||400,e=this._container.offsetHeight||300),[t,e]},e.prototype._setupContainer=function(){var t=this._container;t.classList.add(\"mapboxgl-map\");var e=this._canvasContainer=DOM.create(\"div\",\"mapboxgl-canvas-container\",t);this._interactive&&e.classList.add(\"mapboxgl-interactive\"),this._canvas=DOM.create(\"canvas\",\"mapboxgl-canvas\",e),this._canvas.style.position=\"absolute\",this._canvas.addEventListener(\"webglcontextlost\",this._contextLost,!1),this._canvas.addEventListener(\"webglcontextrestored\",this._contextRestored,!1),this._canvas.setAttribute(\"tabindex\",0),this._canvas.setAttribute(\"aria-label\",\"Map\");var o=this._containerDimensions();this._resizeCanvas(o[0],o[1]);var i=this._controlContainer=DOM.create(\"div\",\"mapboxgl-control-container\",t),r=this._controlPositions={};[\"top-left\",\"top-right\",\"bottom-left\",\"bottom-right\"].forEach(function(t){r[t]=DOM.create(\"div\",\"mapboxgl-ctrl-\"+t,i)})},e.prototype._resizeCanvas=function(t,e){var o=window.devicePixelRatio||1;this._canvas.width=o*t,this._canvas.height=o*e,this._canvas.style.width=t+\"px\",this._canvas.style.height=e+\"px\"},e.prototype._setupPainter=function(){var t=util.extend({failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer},isSupported.webGLContextAttributes),e=this._canvas.getContext(\"webgl\",t)||this._canvas.getContext(\"experimental-webgl\",t);return e?void(this.painter=new Painter(e,this.transform)):void this.fire(\"error\",{error:new Error(\"Failed to initialize WebGL\")})},e.prototype._contextLost=function(t){t.preventDefault(),this._frameId&&browser.cancelFrame(this._frameId),this.fire(\"webglcontextlost\",{originalEvent:t})},e.prototype._contextRestored=function(t){this._setupPainter(),this.resize(),this._update(),this.fire(\"webglcontextrestored\",{originalEvent:t})},e.prototype.loaded=function(){return!this._styleDirty&&!this._sourcesDirty&&!(!this.style||!this.style.loaded())},e.prototype._update=function(t){return this.style?(this._styleDirty=this._styleDirty||t,this._sourcesDirty=!0,this._rerender(),this):this},e.prototype._render=function(){return this.style&&this._styleDirty&&(this._styleDirty=!1,this.style.update(this._classes,this._classOptions),this._classOptions=null,this.style._recalculate(this.transform.zoom)),this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.rotating,zooming:this.zooming}),this.fire(\"render\"),this.loaded()&&!this._loaded&&(this._loaded=!0,this.fire(\"load\")),this._frameId=null,this.animationLoop.stopped()||(this._styleDirty=!0),(this._sourcesDirty||this._repaint||this._styleDirty)&&this._rerender(),this},e.prototype.remove=function(){this._hash&&this._hash.remove(),browser.cancelFrame(this._frameId),this.setStyle(null),\"undefined\"!=typeof window&&(window.removeEventListener(\"resize\",this._onWindowResize,!1),window.removeEventListener(\"online\",this._onWindowOnline,!1));var t=this.painter.gl.getExtension(\"WEBGL_lose_context\");t&&t.loseContext(),removeNode(this._canvasContainer),removeNode(this._controlContainer),this._container.classList.remove(\"mapboxgl-map\"),this.fire(\"remove\")},e.prototype._rerender=function(){this.style&&!this._frameId&&(this._frameId=browser.frame(this._render))},e.prototype._onWindowOnline=function(){this._update()},e.prototype._onWindowResize=function(){this._trackResize&&this.stop().resize()._update()},o.showTileBoundaries.get=function(){return!!this._showTileBoundaries},o.showTileBoundaries.set=function(t){this._showTileBoundaries!==t&&(this._showTileBoundaries=t,this._update())},o.showCollisionBoxes.get=function(){return!!this._showCollisionBoxes},o.showCollisionBoxes.set=function(t){this._showCollisionBoxes!==t&&(this._showCollisionBoxes=t,this.style._redoPlacement())},o.showOverdrawInspector.get=function(){return!!this._showOverdrawInspector},o.showOverdrawInspector.set=function(t){this._showOverdrawInspector!==t&&(this._showOverdrawInspector=t,this._update())},o.repaint.get=function(){return!!this._repaint},o.repaint.set=function(t){this._repaint=t,this._update()},o.vertices.get=function(){return!!this._vertices},o.vertices.set=function(t){this._vertices=t,this._update()},e.prototype._onData=function(t){this._update(\"style\"===t.dataType),this.fire(t.dataType+\"data\",t)},e.prototype._onDataLoading=function(t){this.fire(t.dataType+\"dataloading\",t)},Object.defineProperties(e.prototype,o),e}(Camera);module.exports=Map;\n},{\"../geo/lng_lat\":62,\"../geo/lng_lat_bounds\":63,\"../geo/transform\":64,\"../render/painter\":77,\"../style/animation_loop\":143,\"../style/style\":146,\"../util/browser\":192,\"../util/dom\":199,\"../util/util\":212,\"../util/window\":194,\"./bind_handlers\":171,\"./camera\":172,\"./control/attribution_control\":173,\"./control/logo_control\":176,\"./hash\":186,\"mapbox-gl-supported\":22,\"point-geometry\":26}],188:[function(require,module,exports){\n\"use strict\";var DOM=require(\"../util/dom\"),LngLat=require(\"../geo/lng_lat\"),Point=require(\"point-geometry\"),Marker=function(t,e){this._offset=Point.convert(e&&e.offset||[0,0]),this._update=this._update.bind(this),this._onMapClick=this._onMapClick.bind(this),t||(t=DOM.create(\"div\")),t.classList.add(\"mapboxgl-marker\"),this._element=t,this._popup=null};Marker.prototype.addTo=function(t){return this.remove(),this._map=t,t.getCanvasContainer().appendChild(this._element),t.on(\"move\",this._update),t.on(\"moveend\",this._update),this._update(),this._map.on(\"click\",this._onMapClick),this},Marker.prototype.remove=function(){return this._map&&(this._map.off(\"click\",this._onMapClick),this._map.off(\"move\",this._update),this._map.off(\"moveend\",this._update),this._map=null),DOM.remove(this._element),this._popup&&this._popup.remove(),this},Marker.prototype.getLngLat=function(){return this._lngLat},Marker.prototype.setLngLat=function(t){return this._lngLat=LngLat.convert(t),this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this},Marker.prototype.getElement=function(){return this._element},Marker.prototype.setPopup=function(t){return this._popup&&(this._popup.remove(),this._popup=null),t&&(this._popup=t,this._popup.setLngLat(this._lngLat)),this},Marker.prototype._onMapClick=function(t){var e=t.originalEvent.target,p=this._element;this._popup&&(e===p||p.contains(e))&&this.togglePopup()},Marker.prototype.getPopup=function(){return this._popup},Marker.prototype.togglePopup=function(){var t=this._popup;t&&(t.isOpen()?t.remove():t.addTo(this._map))},Marker.prototype._update=function(t){if(this._map){var e=this._map.project(this._lngLat)._add(this._offset);t&&\"moveend\"!==t.type||(e=e.round()),DOM.setTransform(this._element,\"translate(\"+e.x+\"px, \"+e.y+\"px)\")}},module.exports=Marker;\n},{\"../geo/lng_lat\":62,\"../util/dom\":199,\"point-geometry\":26}],189:[function(require,module,exports){\n\"use strict\";function normalizeOffset(t){if(t){if(\"number\"==typeof t){var o=Math.round(Math.sqrt(.5*Math.pow(t,2)));return{top:new Point(0,t),\"top-left\":new Point(o,o),\"top-right\":new Point(-o,o),bottom:new Point(0,-t),\"bottom-left\":new Point(o,-o),\"bottom-right\":new Point(-o,-o),left:new Point(t,0),right:new Point(-t,0)}}if(isPointLike(t)){var e=Point.convert(t);return{top:e,\"top-left\":e,\"top-right\":e,bottom:e,\"bottom-left\":e,\"bottom-right\":e,left:e,right:e}}return{top:Point.convert(t.top||[0,0]),\"top-left\":Point.convert(t[\"top-left\"]||[0,0]),\"top-right\":Point.convert(t[\"top-right\"]||[0,0]),bottom:Point.convert(t.bottom||[0,0]),\"bottom-left\":Point.convert(t[\"bottom-left\"]||[0,0]),\"bottom-right\":Point.convert(t[\"bottom-right\"]||[0,0]),left:Point.convert(t.left||[0,0]),right:Point.convert(t.right||[0,0])}}return normalizeOffset(new Point(0,0))}function isPointLike(t){return t instanceof Point||Array.isArray(t)}var util=require(\"../util/util\"),Evented=require(\"../util/evented\"),DOM=require(\"../util/dom\"),LngLat=require(\"../geo/lng_lat\"),Point=require(\"point-geometry\"),window=require(\"../util/window\"),defaultOptions={closeButton:!0,closeOnClick:!0},Popup=function(t){function o(o){t.call(this),this.options=util.extend(Object.create(defaultOptions),o),util.bindAll([\"_update\",\"_onClickClose\"],this)}return t&&(o.__proto__=t),o.prototype=Object.create(t&&t.prototype),o.prototype.constructor=o,o.prototype.addTo=function(t){return this._map=t,this._map.on(\"move\",this._update),this.options.closeOnClick&&this._map.on(\"click\",this._onClickClose),this._update(),this},o.prototype.isOpen=function(){return!!this._map},o.prototype.remove=function(){return this._content&&this._content.parentNode&&this._content.parentNode.removeChild(this._content),this._container&&(this._container.parentNode.removeChild(this._container),delete this._container),this._map&&(this._map.off(\"move\",this._update),this._map.off(\"click\",this._onClickClose),delete this._map),this.fire(\"close\"),this},o.prototype.getLngLat=function(){return this._lngLat},o.prototype.setLngLat=function(t){return this._lngLat=LngLat.convert(t),this._update(),this},o.prototype.setText=function(t){return this.setDOMContent(window.document.createTextNode(t))},o.prototype.setHTML=function(t){var o,e=window.document.createDocumentFragment(),n=window.document.createElement(\"body\");for(n.innerHTML=t;;){if(o=n.firstChild,!o)break;e.appendChild(o)}return this.setDOMContent(e)},o.prototype.setDOMContent=function(t){return this._createContent(),this._content.appendChild(t),this._update(),this},o.prototype._createContent=function(){this._content&&this._content.parentNode&&this._content.parentNode.removeChild(this._content),this._content=DOM.create(\"div\",\"mapboxgl-popup-content\",this._container),this.options.closeButton&&(this._closeButton=DOM.create(\"button\",\"mapboxgl-popup-close-button\",this._content),this._closeButton.type=\"button\",this._closeButton.innerHTML=\"×\",this._closeButton.addEventListener(\"click\",this._onClickClose))},o.prototype._update=function(){if(this._map&&this._lngLat&&this._content){this._container||(this._container=DOM.create(\"div\",\"mapboxgl-popup\",this._map.getContainer()),this._tip=DOM.create(\"div\",\"mapboxgl-popup-tip\",this._container),this._container.appendChild(this._content));var t=this.options.anchor,o=normalizeOffset(this.options.offset),e=this._map.project(this._lngLat).round();if(!t){var n=this._container.offsetWidth,i=this._container.offsetHeight;t=e.y+o.bottom.ythis._map.transform.height-i?[\"bottom\"]:[],e.xthis._map.transform.width-n/2&&t.push(\"right\"),t=0===t.length?\"bottom\":t.join(\"-\")}var r=e.add(o[t]),s={top:\"translate(-50%,0)\",\"top-left\":\"translate(0,0)\",\"top-right\":\"translate(-100%,0)\",bottom:\"translate(-50%,-100%)\",\"bottom-left\":\"translate(0,-100%)\",\"bottom-right\":\"translate(-100%,-100%)\",left:\"translate(0,-50%)\",right:\"translate(-100%,-50%)\"},p=this._container.classList;for(var a in s)p.remove(\"mapboxgl-popup-anchor-\"+a);p.add(\"mapboxgl-popup-anchor-\"+t),DOM.setTransform(this._container,s[t]+\" translate(\"+r.x+\"px,\"+r.y+\"px)\")}},o.prototype._onClickClose=function(){this.remove()},o}(Evented);module.exports=Popup;\n},{\"../geo/lng_lat\":62,\"../util/dom\":199,\"../util/evented\":200,\"../util/util\":212,\"../util/window\":194,\"point-geometry\":26}],190:[function(require,module,exports){\n\"use strict\";var Actor=function(t,e,a){this.target=t,this.parent=e,this.mapId=a,this.callbacks={},this.callbackID=0,this.receive=this.receive.bind(this),this.target.addEventListener(\"message\",this.receive,!1)};Actor.prototype.send=function(t,e,a,r,s){var i=a?this.mapId+\":\"+this.callbackID++:null;a&&(this.callbacks[i]=a),this.target.postMessage({targetMapId:s,sourceMapId:this.mapId,type:t,id:String(i),data:e},r)},Actor.prototype.receive=function(t){var e,a=this,r=t.data,s=r.id;if(!r.targetMapId||this.mapId===r.targetMapId){var i=function(t,e,r){a.target.postMessage({sourceMapId:a.mapId,type:\"\",id:String(s),error:t?String(t):null,data:e},r)};if(\"\"===r.type)e=this.callbacks[r.id],delete this.callbacks[r.id],e&&e(r.error||null,r.data);else if(\"undefined\"!=typeof r.id&&this.parent[r.type])this.parent[r.type](r.sourceMapId,r.data,i);else if(\"undefined\"!=typeof r.id&&this.parent.getWorkerSource){var p=r.type.split(\".\"),d=this.parent.getWorkerSource(r.sourceMapId,p[0]);d[p[1]](r.data,i)}else this.parent[r.type](r.data)}},Actor.prototype.remove=function(){this.target.removeEventListener(\"message\",this.receive,!1)},module.exports=Actor;\n},{}],191:[function(require,module,exports){\n\"use strict\";function sameOrigin(e){var t=window.document.createElement(\"a\");return t.href=e,t.protocol===window.document.location.protocol&&t.host===window.document.location.host}var window=require(\"./window\");exports.getJSON=function(e,t){var n=new window.XMLHttpRequest;return n.open(\"GET\",e,!0),n.setRequestHeader(\"Accept\",\"application/json\"),n.onerror=function(e){t(e)},n.onload=function(){if(n.status>=200&&n.status<300&&n.response){var e;try{e=JSON.parse(n.response)}catch(e){return t(e)}t(null,e)}else t(new Error(n.statusText))},n.send(),n},exports.getArrayBuffer=function(e,t){var n=new window.XMLHttpRequest;return n.open(\"GET\",e,!0),n.responseType=\"arraybuffer\",n.onerror=function(e){t(e)},n.onload=function(){return 0===n.response.byteLength&&200===n.status?t(new Error(\"http status 200 returned without content.\")):void(n.status>=200&&n.status<300&&n.response?t(null,{data:n.response,cacheControl:n.getResponseHeader(\"Cache-Control\"),expires:n.getResponseHeader(\"Expires\")}):t(new Error(n.statusText)))},n.send(),n};var transparentPngUrl=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=\";exports.getImage=function(e,t){return exports.getArrayBuffer(e,function(e,n){if(e)return t(e);var r=new window.Image,o=window.URL||window.webkitURL;r.onload=function(){t(null,r),o.revokeObjectURL(r.src)};var a=new window.Blob([new Uint8Array(n.data)],{type:\"image/png\"});r.cacheControl=n.cacheControl,r.expires=n.expires,r.src=n.data.byteLength?o.createObjectURL(a):transparentPngUrl})},exports.getVideo=function(e,t){var n=window.document.createElement(\"video\");n.onloadstart=function(){t(null,n)};for(var r=0;r=a+n?e.call(t,1):(e.call(t,(i-a)/n),exports.frame(o)))}if(!n)return e.call(t,1),null;var r=!1,a=module.exports.now();return exports.frame(o),function(){r=!0}},exports.getImageData=function(e){var n=window.document.createElement(\"canvas\"),t=n.getContext(\"2d\");return n.width=e.width,n.height=e.height,t.drawImage(e,0,0),t.getImageData(0,0,e.width,e.height).data},exports.supported=require(\"mapbox-gl-supported\"),exports.hardwareConcurrency=window.navigator.hardwareConcurrency||4,Object.defineProperty(exports,\"devicePixelRatio\",{get:function(){return window.devicePixelRatio}}),exports.supportsWebp=!1;var webpImgTest=window.document.createElement(\"img\");webpImgTest.onload=function(){exports.supportsWebp=!0},webpImgTest.src=\"data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=\";\n},{\"./window\":194,\"mapbox-gl-supported\":22}],193:[function(require,module,exports){\n\"use strict\";var WebWorkify=require(\"webworkify\"),window=require(\"../window\"),workerURL=window.URL.createObjectURL(new WebWorkify(require(\"../../source/worker\"),{bare:!0}));module.exports=function(){return new window.Worker(workerURL)};\n},{\"../../source/worker\":98,\"../window\":194,\"webworkify\":41}],194:[function(require,module,exports){\n\"use strict\";module.exports=self;\n},{}],195:[function(require,module,exports){\n\"use strict\";function compareAreas(e,r){return r.area-e.area}var quickselect=require(\"quickselect\"),calculateSignedArea=require(\"./util\").calculateSignedArea;module.exports=function(e,r){var a=e.length;if(a<=1)return[e];for(var t,u,c=[],i=0;i1)for(var n=0;n0||this._oneTimeListeners&&this._oneTimeListeners[e]&&this._oneTimeListeners[e].length>0||this._eventedParent&&this._eventedParent.listens(e)},Evented.prototype.setEventedParent=function(e,t){return this._eventedParent=e,this._eventedParentData=t,this},module.exports=Evented;\n},{\"./util\":212}],201:[function(require,module,exports){\n\"use strict\";function compareMax(e,t){return t.max-e.max}function Cell(e,t,n,r){this.p=new Point(e,t),this.h=n,this.d=pointToPolygonDist(this.p,r),this.max=this.d+this.h*Math.SQRT2}function pointToPolygonDist(e,t){for(var n=!1,r=1/0,o=0;oe.y!=h.y>e.y&&e.x<(h.x-a.x)*(e.y-a.y)/(h.y-a.y)+a.x&&(n=!n),r=Math.min(r,distToSegmentSquared(e,a,h))}return(n?1:-1)*Math.sqrt(r)}function getCentroidCell(e){for(var t=0,n=0,r=0,o=e[0],i=0,l=o.length,u=l-1;ii)&&(i=a.x),(!s||a.y>l)&&(l=a.y)}var h=i-r,p=l-o,y=Math.min(h,p),x=y/2,d=new Queue(null,compareMax);if(0===y)return[r,o];for(var g=r;gm.d||!m.d)&&(m=v,n&&console.log(\"found best %d after %d probes\",Math.round(1e4*v.d)/1e4,c)),v.max-m.d<=t||(x=v.h/2,d.push(new Cell(v.p.x-x,v.p.y-x,x,e)),d.push(new Cell(v.p.x+x,v.p.y-x,x,e)),d.push(new Cell(v.p.x-x,v.p.y+x,x,e)),d.push(new Cell(v.p.x+x,v.p.y+x,x,e)),c+=4)}return n&&(console.log(\"num probes: \"+c),console.log(\"best distance: \"+m.d)),m.p};\n},{\"./intersection_tests\":205,\"point-geometry\":26,\"tinyqueue\":30}],202:[function(require,module,exports){\n\"use strict\";var WorkerPool=require(\"./worker_pool\"),globalWorkerPool;module.exports=function(){return globalWorkerPool||(globalWorkerPool=new WorkerPool),globalWorkerPool};\n},{\"./worker_pool\":215}],203:[function(require,module,exports){\n\"use strict\";function Glyphs(a,e){this.stacks=a.readFields(readFontstacks,[],e)}function readFontstacks(a,e,r){if(1===a){var t=r.readMessage(readFontstack,{glyphs:{}});e.push(t)}}function readFontstack(a,e,r){if(1===a)e.name=r.readString();else if(2===a)e.range=r.readString();else if(3===a){var t=r.readMessage(readGlyph,{});e.glyphs[t.id]=t}}function readGlyph(a,e,r){1===a?e.id=r.readVarint():2===a?e.bitmap=r.readBytes():3===a?e.width=r.readVarint():4===a?e.height=r.readVarint():5===a?e.left=r.readSVarint():6===a?e.top=r.readSVarint():7===a&&(e.advance=r.readVarint())}module.exports=Glyphs;\n},{}],204:[function(require,module,exports){\n\"use strict\";function interpolate(t,e,n){return t*(1-n)+e*n}module.exports=interpolate,interpolate.number=interpolate,interpolate.vec2=function(t,e,n){return[interpolate(t[0],e[0],n),interpolate(t[1],e[1],n)]},interpolate.color=function(t,e,n){return[interpolate(t[0],e[0],n),interpolate(t[1],e[1],n),interpolate(t[2],e[2],n),interpolate(t[3],e[3],n)]},interpolate.array=function(t,e,n){return t.map(function(t,r){return interpolate(t,e[r],n)})};\n},{}],205:[function(require,module,exports){\n\"use strict\";function polygonIntersectsPolygon(n,t){for(var e=0;e=3)for(var u=0;u1){if(lineIntersectsLine(n,t))return!0;for(var r=0;r1?n.distSqr(e):n.distSqr(e.sub(t)._mult(o)._add(t))}function multiPolygonContainsPoint(n,t){for(var e,r,o,i=!1,l=0;lt.y!=o.y>t.y&&t.x<(o.x-r.x)*(t.y-r.y)/(o.y-r.y)+r.x&&(i=!i)}return i}function polygonContainsPoint(n,t){for(var e=!1,r=0,o=n.length-1;rt.y!=l.y>t.y&&t.x<(l.x-i.x)*(t.y-i.y)/(l.y-i.y)+i.x&&(e=!e)}return e}var isCounterClockwise=require(\"./util\").isCounterClockwise;module.exports={multiPolygonIntersectsBufferedMultiPoint:multiPolygonIntersectsBufferedMultiPoint,multiPolygonIntersectsMultiPolygon:multiPolygonIntersectsMultiPolygon,multiPolygonIntersectsBufferedMultiLine:multiPolygonIntersectsBufferedMultiLine,polygonIntersectsPolygon:polygonIntersectsPolygon,distToSegmentSquared:distToSegmentSquared};\n},{\"./util\":212}],206:[function(require,module,exports){\n\"use strict\";var unicodeBlockLookup={\"Latin-1 Supplement\":function(n){return n>=128&&n<=255},\"Hangul Jamo\":function(n){return n>=4352&&n<=4607},\"Unified Canadian Aboriginal Syllabics\":function(n){return n>=5120&&n<=5759},\"Unified Canadian Aboriginal Syllabics Extended\":function(n){return n>=6320&&n<=6399},\"General Punctuation\":function(n){return n>=8192&&n<=8303},\"Letterlike Symbols\":function(n){return n>=8448&&n<=8527},\"Number Forms\":function(n){return n>=8528&&n<=8591},\"Miscellaneous Technical\":function(n){return n>=8960&&n<=9215},\"Control Pictures\":function(n){return n>=9216&&n<=9279},\"Optical Character Recognition\":function(n){return n>=9280&&n<=9311},\"Enclosed Alphanumerics\":function(n){return n>=9312&&n<=9471},\"Geometric Shapes\":function(n){return n>=9632&&n<=9727},\"Miscellaneous Symbols\":function(n){return n>=9728&&n<=9983},\"Miscellaneous Symbols and Arrows\":function(n){return n>=11008&&n<=11263},\"CJK Radicals Supplement\":function(n){return n>=11904&&n<=12031},\"Kangxi Radicals\":function(n){return n>=12032&&n<=12255},\"Ideographic Description Characters\":function(n){return n>=12272&&n<=12287},\"CJK Symbols and Punctuation\":function(n){return n>=12288&&n<=12351},Hiragana:function(n){return n>=12352&&n<=12447},Katakana:function(n){return n>=12448&&n<=12543},Bopomofo:function(n){return n>=12544&&n<=12591},\"Hangul Compatibility Jamo\":function(n){return n>=12592&&n<=12687},Kanbun:function(n){return n>=12688&&n<=12703},\"Bopomofo Extended\":function(n){return n>=12704&&n<=12735},\"CJK Strokes\":function(n){return n>=12736&&n<=12783},\"Katakana Phonetic Extensions\":function(n){return n>=12784&&n<=12799},\"Enclosed CJK Letters and Months\":function(n){return n>=12800&&n<=13055},\"CJK Compatibility\":function(n){return n>=13056&&n<=13311},\"CJK Unified Ideographs Extension A\":function(n){return n>=13312&&n<=19903},\"Yijing Hexagram Symbols\":function(n){return n>=19904&&n<=19967},\"CJK Unified Ideographs\":function(n){return n>=19968&&n<=40959},\"Yi Syllables\":function(n){return n>=40960&&n<=42127},\"Yi Radicals\":function(n){return n>=42128&&n<=42191},\"Hangul Jamo Extended-A\":function(n){return n>=43360&&n<=43391},\"Hangul Syllables\":function(n){return n>=44032&&n<=55215},\"Hangul Jamo Extended-B\":function(n){return n>=55216&&n<=55295},\"Private Use Area\":function(n){return n>=57344&&n<=63743},\"CJK Compatibility Ideographs\":function(n){return n>=63744&&n<=64255},\"Vertical Forms\":function(n){return n>=65040&&n<=65055},\"CJK Compatibility Forms\":function(n){return n>=65072&&n<=65103},\"Small Form Variants\":function(n){return n>=65104&&n<=65135},\"Halfwidth and Fullwidth Forms\":function(n){return n>=65280&&n<=65519}};module.exports=unicodeBlockLookup;\n},{}],207:[function(require,module,exports){\n\"use strict\";var LRUCache=function(t,e){this.max=t,this.onRemove=e,this.reset()};LRUCache.prototype.reset=function(){var t=this;for(var e in t.data)t.onRemove(t.data[e]);return this.data={},this.order=[],this},LRUCache.prototype.add=function(t,e){if(this.has(t))this.order.splice(this.order.indexOf(t),1),this.data[t]=e,this.order.push(t);else if(this.data[t]=e,this.order.push(t),this.order.length>this.max){var r=this.get(this.order[0]);r&&this.onRemove(r)}return this},LRUCache.prototype.has=function(t){return t in this.data},LRUCache.prototype.keys=function(){return this.order},LRUCache.prototype.get=function(t){if(!this.has(t))return null;var e=this.data[t];return delete this.data[t],this.order.splice(this.order.indexOf(t),1),e},LRUCache.prototype.getWithoutRemoving=function(t){if(!this.has(t))return null;var e=this.data[t];return e},LRUCache.prototype.remove=function(t){if(!this.has(t))return this;var e=this.data[t];return delete this.data[t],this.onRemove(e),this.order.splice(this.order.indexOf(t),1),this},LRUCache.prototype.setMaxSize=function(t){var e=this;for(this.max=t;this.order.length>this.max;){var r=e.get(e.order[0]);r&&e.onRemove(r)}return this},module.exports=LRUCache;\n},{}],208:[function(require,module,exports){\n\"use strict\";function makeAPIURL(r,e){var t=parseUrl(config.API_URL);if(r.protocol=t.protocol,r.authority=t.authority,!config.REQUIRE_ACCESS_TOKEN)return formatUrl(r);if(e=e||config.ACCESS_TOKEN,!e)throw new Error(\"An API access token is required to use Mapbox GL. \"+help);if(\"s\"===e[0])throw new Error(\"Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). \"+help);return r.params.push(\"access_token=\"+e),formatUrl(r)}function isMapboxURL(r){return 0===r.indexOf(\"mapbox:\")}function replaceTempAccessToken(r){for(var e=0;e=2||512===t?\"@2x\":\"\",s=browser.supportsWebp?\".webp\":\"$1\";return o.path=o.path.replace(imageExtensionRe,\"\"+a+s),replaceTempAccessToken(o.params),formatUrl(o)};var urlRe=/^(\\w+):\\/\\/([^\\/?]+)(\\/[^?]+)?\\??(.+)?/;\n},{\"./browser\":192,\"./config\":196}],209:[function(require,module,exports){\n\"use strict\";var isChar=require(\"./is_char_in_unicode_block\");module.exports.allowsIdeographicBreaking=function(a){for(var i=0,r=a;i=65097&&a<=65103)||(!!isChar[\"CJK Compatibility Ideographs\"](a)||(!!isChar[\"CJK Compatibility\"](a)||(!!isChar[\"CJK Radicals Supplement\"](a)||(!!isChar[\"CJK Strokes\"](a)||(!(!isChar[\"CJK Symbols and Punctuation\"](a)||a>=12296&&a<=12305||a>=12308&&a<=12319||12336===a)||(!!isChar[\"CJK Unified Ideographs Extension A\"](a)||(!!isChar[\"CJK Unified Ideographs\"](a)||(!!isChar[\"Enclosed CJK Letters and Months\"](a)||(!!isChar[\"Hangul Compatibility Jamo\"](a)||(!!isChar[\"Hangul Jamo Extended-A\"](a)||(!!isChar[\"Hangul Jamo Extended-B\"](a)||(!!isChar[\"Hangul Jamo\"](a)||(!!isChar[\"Hangul Syllables\"](a)||(!!isChar.Hiragana(a)||(!!isChar[\"Ideographic Description Characters\"](a)||(!!isChar.Kanbun(a)||(!!isChar[\"Kangxi Radicals\"](a)||(!!isChar[\"Katakana Phonetic Extensions\"](a)||(!(!isChar.Katakana(a)||12540===a)||(!(!isChar[\"Halfwidth and Fullwidth Forms\"](a)||65288===a||65289===a||65293===a||a>=65306&&a<=65310||65339===a||65341===a||65343===a||a>=65371&&a<=65503||65507===a||a>=65512&&a<=65519)||(!(!isChar[\"Small Form Variants\"](a)||a>=65112&&a<=65118||a>=65123&&a<=65126)||(!!isChar[\"Unified Canadian Aboriginal Syllabics\"](a)||(!!isChar[\"Unified Canadian Aboriginal Syllabics Extended\"](a)||(!!isChar[\"Vertical Forms\"](a)||(!!isChar[\"Yijing Hexagram Symbols\"](a)||(!!isChar[\"Yi Syllables\"](a)||!!isChar[\"Yi Radicals\"](a))))))))))))))))))))))))))))))},exports.charHasNeutralVerticalOrientation=function(a){return!(!isChar[\"Latin-1 Supplement\"](a)||167!==a&&169!==a&&174!==a&&177!==a&&188!==a&&189!==a&&190!==a&&215!==a&&247!==a)||(!(!isChar[\"General Punctuation\"](a)||8214!==a&&8224!==a&&8225!==a&&8240!==a&&8241!==a&&8251!==a&&8252!==a&&8258!==a&&8263!==a&&8264!==a&&8265!==a&&8273!==a)||(!!isChar[\"Letterlike Symbols\"](a)||(!!isChar[\"Number Forms\"](a)||(!(!isChar[\"Miscellaneous Technical\"](a)||!(a>=8960&&a<=8967||a>=8972&&a<=8991||a>=8996&&a<=9e3||9003===a||a>=9085&&a<=9114||a>=9150&&a<=9165||9167===a||a>=9169&&a<=9179||a>=9186&&a<=9215))||(!(!isChar[\"Control Pictures\"](a)||9251===a)||(!!isChar[\"Optical Character Recognition\"](a)||(!!isChar[\"Enclosed Alphanumerics\"](a)||(!!isChar[\"Geometric Shapes\"](a)||(!(!isChar[\"Miscellaneous Symbols\"](a)||a>=9754&&a<=9759)||(!(!isChar[\"Miscellaneous Symbols and Arrows\"](a)||!(a>=11026&&a<=11055||a>=11088&&a<=11097||a>=11192&&a<=11243))||(!!isChar[\"CJK Symbols and Punctuation\"](a)||(!!isChar.Katakana(a)||(!!isChar[\"Private Use Area\"](a)||(!!isChar[\"CJK Compatibility Forms\"](a)||(!!isChar[\"Small Form Variants\"](a)||(!!isChar[\"Halfwidth and Fullwidth Forms\"](a)||(8734===a||8756===a||8757===a||a>=9984&&a<=10087||a>=10102&&a<=10131||65532===a||65533===a)))))))))))))))))},exports.charHasRotatedVerticalOrientation=function(a){return!(exports.charHasUprightVerticalOrientation(a)||exports.charHasNeutralVerticalOrientation(a))};\n},{\"./is_char_in_unicode_block\":206}],210:[function(require,module,exports){\n\"use strict\";function createStructArrayType(t){var e=JSON.stringify(t);if(structArrayTypeCache[e])return structArrayTypeCache[e];var r=void 0===t.alignment?1:t.alignment,i=0,n=0,a=[\"Uint8\"],o=t.members.map(function(t){a.indexOf(t.type)<0&&a.push(t.type);var e=sizeOf(t.type),o=i=align(i,Math.max(r,e)),s=t.components||1;return n=Math.max(n,e),i+=e*s,{name:t.name,type:t.type,components:s,offset:o}}),s=align(i,Math.max(n,r)),p=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Struct);p.prototype.alignment=r,p.prototype.size=s;for(var y=0,c=o;ythis.capacity){this.capacity=Math.max(t,Math.floor(this.capacity*RESIZE_MULTIPLIER),DEFAULT_CAPACITY),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var e=this.uint8;this._refreshViews(),e&&this.uint8.set(e)}},StructArray.prototype._refreshViews=function(){for(var t=this,e=0,r=t._usedTypes;e=1)return 1;var e=r*r,t=e*r;return 4*(r<.5?t:3*(r-e)+t-.75)},exports.bezier=function(r,e,t,n){var o=new UnitBezier(r,e,t,n);return function(r){return o.solve(r)}},exports.ease=exports.bezier(.25,.1,.25,1),exports.clamp=function(r,e,t){return Math.min(t,Math.max(e,r))},exports.wrap=function(r,e,t){var n=t-e,o=((r-e)%n+n)%n+e;return o===e?t:o},exports.asyncAll=function(r,e,t){if(!r.length)return t(null,[]);var n=r.length,o=new Array(r.length),a=null;r.forEach(function(r,i){e(r,function(r,e){r&&(a=r),o[i]=e,0===--n&&t(a,o)})})},exports.values=function(r){var e=[];for(var t in r)e.push(r[t]);return e},exports.keysDifference=function(r,e){var t=[];for(var n in r)n in e||t.push(n);return t},exports.extend=function(r,e,t,n){for(var o=arguments,a=1;a=0)return!0;return!1};var warnOnceHistory={};exports.warnOnce=function(r){warnOnceHistory[r]||(\"undefined\"!=typeof console&&console.warn(r),warnOnceHistory[r]=!0)},exports.isCounterClockwise=function(r,e,t){return(t.y-r.y)*(e.x-r.x)>(e.y-r.y)*(t.x-r.x)},exports.calculateSignedArea=function(r){for(var e=0,t=0,n=r.length,o=n-1,a=void 0,i=void 0;t0||Math.abs(e.y-t.y)>0)&&Math.abs(exports.calculateSignedArea(r))>.01},exports.sphericalToCartesian=function(r){var e=r[0],t=r[1],n=r[2];return t+=90,t*=Math.PI/180,n*=Math.PI/180,[e*Math.cos(t)*Math.sin(n),e*Math.sin(t)*Math.sin(n),e*Math.cos(n)]},exports.parseCacheControl=function(r){var e=/(?:^|(?:\\s*\\,\\s*))([^\\x00-\\x20\\(\\)<>@\\,;\\:\\\\\"\\/\\[\\]\\?\\=\\{\\}\\x7F]+)(?:\\=(?:([^\\x00-\\x20\\(\\)<>@\\,;\\:\\\\\"\\/\\[\\]\\?\\=\\{\\}\\x7F]+)|(?:\\\"((?:[^\"\\\\]|\\\\.)*)\\\")))?/g,t={};if(r.replace(e,function(r,e,n,o){var a=n||o;return t[e]=!a||a.toLowerCase(),\"\"}),t[\"max-age\"]){var n=parseInt(t[\"max-age\"],10);isNaN(n)?delete t[\"max-age\"]:t[\"max-age\"]=n}return t};\n},{\"../geo/coordinate\":61,\"@mapbox/unitbezier\":3,\"point-geometry\":26}],213:[function(require,module,exports){\n\"use strict\";var Feature=function(e,t,r,o){this.type=\"Feature\",this._vectorTileFeature=e,e._z=t,e._x=r,e._y=o,this.properties=e.properties,null!=e.id&&(this.id=e.id)},prototypeAccessors={geometry:{}};prototypeAccessors.geometry.get=function(){return void 0===this._geometry&&(this._geometry=this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x,this._vectorTileFeature._y,this._vectorTileFeature._z).geometry),this._geometry},prototypeAccessors.geometry.set=function(e){this._geometry=e},Feature.prototype.toJSON=function(){var e=this,t={geometry:this.geometry};for(var r in e)\"_geometry\"!==r&&\"_vectorTileFeature\"!==r&&(t[r]=e[r]);return t},Object.defineProperties(Feature.prototype,prototypeAccessors),module.exports=Feature;\n},{}],214:[function(require,module,exports){\n\"use strict\";var scriptDetection=require(\"./script_detection\");module.exports=function(t){for(var o=\"\",e=0;e\":\"﹀\",\"?\":\"︖\",\"@\":\"@\",\"[\":\"﹇\",\"\\\\\":\"\\",\"]\":\"﹈\",\"^\":\"^\",_:\"︳\",\"`\":\"`\",\"{\":\"︷\",\"|\":\"―\",\"}\":\"︸\",\"~\":\"~\",\"¢\":\"¢\",\"£\":\"£\",\"¥\":\"¥\",\"¦\":\"¦\",\"¬\":\"¬\",\"¯\":\" ̄\",\"–\":\"︲\",\"—\":\"︱\",\"‘\":\"﹃\",\"’\":\"﹄\",\"“\":\"﹁\",\"”\":\"﹂\",\"…\":\"︙\",\"‧\":\"・\",\"₩\":\"₩\",\"、\":\"︑\",\"。\":\"︒\",\"〈\":\"︿\",\"〉\":\"﹀\",\"《\":\"︽\",\"》\":\"︾\",\"「\":\"﹁\",\"」\":\"﹂\",\"『\":\"﹃\",\"』\":\"﹄\",\"【\":\"︻\",\"】\":\"︼\",\"〔\":\"︹\",\"〕\":\"︺\",\"〖\":\"︗\",\"〗\":\"︘\",\"!\":\"︕\",\"(\":\"︵\",\")\":\"︶\",\",\":\"︐\",\"-\":\"︲\",\".\":\"・\",\":\":\"︓\",\";\":\"︔\",\"<\":\"︿\",\">\":\"﹀\",\"?\":\"︖\",\"[\":\"﹇\",\"]\":\"﹈\",\"_\":\"︳\",\"{\":\"︷\",\"|\":\"―\",\"}\":\"︸\",\"⦅\":\"︵\",\"⦆\":\"︶\",\"。\":\"︒\",\"「\":\"﹁\",\"」\":\"﹂\"};\n},{\"./script_detection\":209}],215:[function(require,module,exports){\n\"use strict\";var WebWorker=require(\"./web_worker\"),WorkerPool=function(){this.active={}};WorkerPool.prototype.acquire=function(r){var e=this;if(!this.workers){var o=require(\"../\").workerCount;for(this.workers=[];this.workers.length{{buttons}}",ok:"",cancel:""},input:"",message:"

{{message}}

",log:"
{{message}}
"},defaultDialogs:{buttons:{holder:"",ok:"",cancel:""},input:"",message:"

{{message}}

",log:"
{{message}}
"},build:function(t){var e=this.dialogs.buttons.ok,o="
"+this.dialogs.message.replace("{{message}}",t.message);return"confirm"!==t.type&&"prompt"!==t.type||(e=this.dialogs.buttons.cancel+this.dialogs.buttons.ok),"prompt"===t.type&&(o+=this.dialogs.input),o=(o+this.dialogs.buttons.holder+"
").replace("{{buttons}}",e).replace("{{ok}}",this.okLabel).replace("{{cancel}}",this.cancelLabel)},setCloseLogOnClick:function(t){this.closeLogOnClick=!!t},close:function(t,e){this.closeLogOnClick&&t.addEventListener("click",function(){o(t)}),e=e&&!isNaN(+e)?+e:this.delay,0>e?o(t):e>0&&setTimeout(function(){o(t)},e)},dialog:function(t,e,o,n){return this.setup({type:e,message:t,onOkay:o,onCancel:n})},log:function(t,e,o){var n=document.querySelectorAll(".alertify-logs > div");if(n){var i=n.length-this.maxLogItems;if(i>=0)for(var a=0,l=i+1;l>a;a++)this.close(n[a],-1)}this.notify(t,e,o)},setLogPosition:function(t){this.logContainerClass="alertify-logs "+t},setupLogContainer:function(){var t=document.querySelector(".alertify-logs"),e=this.logContainerClass;return t||(t=document.createElement("div"),t.className=e,this.parent.appendChild(t)),t.className!==e&&(t.className=e),t},notify:function(e,o,n){var i=this.setupLogContainer(),a=document.createElement("div");a.className=o||"default",t.logTemplateMethod?a.innerHTML=t.logTemplateMethod(e):a.innerHTML=e,"function"==typeof n&&a.addEventListener("click",n),i.appendChild(a),setTimeout(function(){a.className+=" show"},10),this.close(a,this.delay)},setup:function(t){function e(e){"function"!=typeof e&&(e=function(){}),i&&i.addEventListener("click",function(i){t.onOkay&&"function"==typeof t.onOkay&&(l?t.onOkay(l.value,i):t.onOkay(i)),e(l?{buttonClicked:"ok",inputValue:l.value,event:i}:{buttonClicked:"ok",event:i}),o(n)}),a&&a.addEventListener("click",function(i){t.onCancel&&"function"==typeof t.onCancel&&t.onCancel(i),e({buttonClicked:"cancel",event:i}),o(n)}),l&&l.addEventListener("keyup",function(t){13===t.which&&i.click()})}var n=document.createElement("div");n.className="alertify hide",n.innerHTML=this.build(t);var i=n.querySelector(".ok"),a=n.querySelector(".cancel"),l=n.querySelector("input"),s=n.querySelector("label");l&&("string"==typeof this.promptPlaceholder&&(s?s.textContent=this.promptPlaceholder:l.placeholder=this.promptPlaceholder),"string"==typeof this.promptValue&&(l.value=this.promptValue));var r;return"function"==typeof Promise?r=new Promise(e):e(),this.parent.appendChild(n),setTimeout(function(){n.classList.remove("hide"),l&&t.type&&"prompt"===t.type?(l.select(),l.focus()):i&&i.focus()},100),r},okBtn:function(t){return this.okLabel=t,this},setDelay:function(t){return t=t||0,this.delay=isNaN(t)?this.defaultDelay:parseInt(t,10),this},cancelBtn:function(t){return this.cancelLabel=t,this},setMaxLogItems:function(t){this.maxLogItems=parseInt(t||this.defaultMaxLogItems)},theme:function(t){switch(t.toLowerCase()){case"bootstrap":this.dialogs.buttons.ok="",this.dialogs.buttons.cancel="",this.dialogs.input="";break;case"purecss":this.dialogs.buttons.ok="",this.dialogs.buttons.cancel="";break;case"mdl":case"material-design-light":this.dialogs.buttons.ok="",this.dialogs.buttons.cancel="",this.dialogs.input="
";break;case"angular-material":this.dialogs.buttons.ok="",this.dialogs.buttons.cancel="",this.dialogs.input="
";break;case"default":default:this.dialogs.buttons.ok=this.defaultDialogs.buttons.ok,this.dialogs.buttons.cancel=this.defaultDialogs.buttons.cancel,this.dialogs.input=this.defaultDialogs.input}},reset:function(){this.parent=document.body,this.theme("default"),this.okBtn(this.defaultOkLabel),this.cancelBtn(this.defaultCancelLabel),this.setMaxLogItems(),this.promptValue="",this.promptPlaceholder="",this.delay=this.defaultDelay,this.setCloseLogOnClick(this.closeLogOnClickDefault),this.setLogPosition("bottom left"),this.logTemplateMethod=null},injectCSS:function(){if(!document.querySelector("#alertifyCSS")){var t=document.getElementsByTagName("head")[0],e=document.createElement("style");e.type="text/css",e.id="alertifyCSS",e.innerHTML=".alertify-logs>*{padding:12px 24px;color:#fff;box-shadow:0 2px 5px 0 rgba(0,0,0,.2);border-radius:1px}.alertify-logs>*,.alertify-logs>.default{background:rgba(0,0,0,.8)}.alertify-logs>.error{background:rgba(244,67,54,.8)}.alertify-logs>.success{background:rgba(76,175,80,.9)}.alertify{position:fixed;background-color:rgba(0,0,0,.3);left:0;right:0;top:0;bottom:0;width:100%;height:100%;z-index:1}.alertify.hide{opacity:0;pointer-events:none}.alertify,.alertify.show{box-sizing:border-box;transition:all .33s cubic-bezier(.25,.8,.25,1)}.alertify,.alertify *{box-sizing:border-box}.alertify .dialog{padding:12px}.alertify .alert,.alertify .dialog{width:100%;margin:0 auto;position:relative;top:50%;transform:translateY(-50%)}.alertify .alert>*,.alertify .dialog>*{width:400px;max-width:95%;margin:0 auto;text-align:center;padding:12px;background:#fff;box-shadow:0 2px 4px -1px rgba(0,0,0,.14),0 4px 5px 0 rgba(0,0,0,.098),0 1px 10px 0 rgba(0,0,0,.084)}.alertify .alert .msg,.alertify .dialog .msg{padding:12px;margin-bottom:12px;margin:0;text-align:left}.alertify .alert input:not(.form-control),.alertify .dialog input:not(.form-control){margin-bottom:15px;width:100%;font-size:100%;padding:12px}.alertify .alert input:not(.form-control):focus,.alertify .dialog input:not(.form-control):focus{outline-offset:-2px}.alertify .alert nav,.alertify .dialog nav{text-align:right}.alertify .alert nav button:not(.btn):not(.pure-button):not(.md-button):not(.mdl-button),.alertify .dialog nav button:not(.btn):not(.pure-button):not(.md-button):not(.mdl-button){background:transparent;box-sizing:border-box;color:rgba(0,0,0,.87);position:relative;outline:0;border:0;display:inline-block;-ms-flex-align:center;-ms-grid-row-align:center;align-items:center;padding:0 6px;margin:6px 8px;line-height:36px;min-height:36px;white-space:nowrap;min-width:88px;text-align:center;text-transform:uppercase;font-size:14px;text-decoration:none;cursor:pointer;border:1px solid transparent;border-radius:2px}.alertify .alert nav button:not(.btn):not(.pure-button):not(.md-button):not(.mdl-button):active,.alertify .alert nav button:not(.btn):not(.pure-button):not(.md-button):not(.mdl-button):hover,.alertify .dialog nav button:not(.btn):not(.pure-button):not(.md-button):not(.mdl-button):active,.alertify .dialog nav button:not(.btn):not(.pure-button):not(.md-button):not(.mdl-button):hover{background-color:rgba(0,0,0,.05)}.alertify .alert nav button:not(.btn):not(.pure-button):not(.md-button):not(.mdl-button):focus,.alertify .dialog nav button:not(.btn):not(.pure-button):not(.md-button):not(.mdl-button):focus{border:1px solid rgba(0,0,0,.1)}.alertify .alert nav button.btn,.alertify .dialog nav button.btn{margin:6px 4px}.alertify-logs{position:fixed;z-index:1}.alertify-logs.bottom,.alertify-logs:not(.top){bottom:16px}.alertify-logs.left,.alertify-logs:not(.right){left:16px}.alertify-logs.left>*,.alertify-logs:not(.right)>*{float:left;transform:translateZ(0);height:auto}.alertify-logs.left>.show,.alertify-logs:not(.right)>.show{left:0}.alertify-logs.left>*,.alertify-logs.left>.hide,.alertify-logs:not(.right)>*,.alertify-logs:not(.right)>.hide{left:-110%}.alertify-logs.right{right:16px}.alertify-logs.right>*{float:right;transform:translateZ(0)}.alertify-logs.right>.show{right:0;opacity:1}.alertify-logs.right>*,.alertify-logs.right>.hide{right:-110%;opacity:0}.alertify-logs.top{top:0}.alertify-logs>*{box-sizing:border-box;transition:all .4s cubic-bezier(.25,.8,.25,1);position:relative;clear:both;backface-visibility:hidden;perspective:1000;max-height:0;margin:0;padding:0;overflow:hidden;opacity:0;pointer-events:none}.alertify-logs>.show{margin-top:12px;opacity:1;max-height:1000px;padding:12px;pointer-events:auto}",t.insertBefore(e,t.firstChild)}},removeCSS:function(){var t=document.querySelector("#alertifyCSS");t&&t.parentNode&&t.parentNode.removeChild(t)}};return t.injectCSS(),{_$$alertify:t,parent:function(e){t.parent=e},reset:function(){return t.reset(),this},alert:function(e,o,n){return t.dialog(e,"alert",o,n)||this},confirm:function(e,o,n){return t.dialog(e,"confirm",o,n)||this},prompt:function(e,o,n){return t.dialog(e,"prompt",o,n)||this},log:function(e,o){return t.log(e,"default",o),this},theme:function(e){return t.theme(e),this},success:function(e,o){return t.log(e,"success",o),this},error:function(e,o){return t.log(e,"error",o),this},cancelBtn:function(e){return t.cancelBtn(e),this},okBtn:function(e){return t.okBtn(e),this},delay:function(e){return t.setDelay(e),this},placeholder:function(e){return t.promptPlaceholder=e,this},defaultValue:function(e){return t.promptValue=e,this},maxLogItems:function(e){return t.setMaxLogItems(e),this},closeLogOnClick:function(e){return t.setCloseLogOnClick(!!e),this},logPosition:function(e){return t.setLogPosition(e||""),this},setLogTemplate:function(e){return t.logTemplateMethod=e,this},clearLogs:function(){return t.setupLogContainer().innerHTML="",this},version:t.version}}var e=500,o=function(t){if(t){var o=function(){t&&t.parentNode&&t.parentNode.removeChild(t)};t.classList.remove("show"),t.classList.add("hide"),t.addEventListener("transitionend",o),setTimeout(o,e)}};if("undefined"!=typeof module&&module&&module.exports){module.exports=function(){return new t};var n=new t;for(var i in n)module.exports[i]=n[i]}else true?!(__WEBPACK_AMD_DEFINE_RESULT__ = function(){return new t}.call(exports, __webpack_require__, exports, module), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)):window.alertify=new t}(); -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(17)(module))) +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(21)(module))) /***/ }), /* 4 */ @@ -2843,7 +2843,7 @@ Object.defineProperty(exports, "__esModule", { }); exports.default = enableLocateButton; -var _newnoteGetlocation = __webpack_require__(13); +var _newnoteGetlocation = __webpack_require__(15); var _newnoteGetlocation2 = _interopRequireDefault(_newnoteGetlocation); @@ -2872,7 +2872,7 @@ Object.defineProperty(exports, "__esModule", { }); exports.default = persistFormData; -var _webStorage = __webpack_require__(16); +var _webStorage = __webpack_require__(20); var _webStorage2 = _interopRequireDefault(_webStorage); @@ -2912,7 +2912,9 @@ function persistFormData() { } /***/ }), -/* 12 */ +/* 12 */, +/* 13 */, +/* 14 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -2935,7 +2937,7 @@ var _parseLocation = __webpack_require__(1); var _parseLocation2 = _interopRequireDefault(_parseLocation); -var _newplaceMicropub = __webpack_require__(14); +var _newplaceMicropub = __webpack_require__(17); var _newplaceMicropub2 = _interopRequireDefault(_newplaceMicropub); @@ -2970,7 +2972,6 @@ var makeOptionsForForm = function makeOptionsForForm(map, position) { for (var _iterator = places[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { var place = _step.value; - console.log(place); var parsedCoords = (0, _parseLocation2.default)(place.location); var option = document.createElement('option'); option.setAttribute('value', place.uri); @@ -3042,7 +3043,7 @@ function addMapWithPlaces(div, position) { } /***/ }), -/* 13 */ +/* 15 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -3053,7 +3054,7 @@ Object.defineProperty(exports, "__esModule", { }); exports.default = getLocation; -var _nearbyPlaces = __webpack_require__(12); +var _nearbyPlaces = __webpack_require__(14); var _nearbyPlaces2 = _interopRequireDefault(_nearbyPlaces); @@ -3073,7 +3074,30 @@ function getLocation() { } //newnote-getlocation.js /***/ }), -/* 14 */ +/* 16 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _newnoteButton = __webpack_require__(10); + +var _newnoteButton2 = _interopRequireDefault(_newnoteButton); + +var _persistForm = __webpack_require__(11); + +var _persistForm2 = _interopRequireDefault(_persistForm); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +//newnote.js + +var button = document.querySelector('#locate'); +(0, _newnoteButton2.default)(button); +(0, _persistForm2.default)(); + +/***/ }), +/* 17 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -3084,7 +3108,7 @@ Object.defineProperty(exports, "__esModule", { }); exports.default = makeNewPlaceForm; -var _submitPlace = __webpack_require__(15); +var _submitPlace = __webpack_require__(19); var _submitPlace2 = _interopRequireDefault(_submitPlace); @@ -3167,7 +3191,8 @@ function makeNewPlaceForm(map) { } //newplace-micropub.js /***/ }), -/* 15 */ +/* 18 */, +/* 19 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -3275,7 +3300,7 @@ function submitNewPlace(map) { } //submit-place.js /***/ }), -/* 16 */ +/* 20 */ /***/ (function(module, exports, __webpack_require__) { /*! @@ -4036,7 +4061,7 @@ return /******/ (function(modules) { // webpackBootstrap //# sourceMappingURL=webStorage.js.map /***/ }), -/* 17 */ +/* 21 */ /***/ (function(module, exports) { module.exports = function(module) { @@ -4063,31 +4088,6 @@ module.exports = function(module) { }; -/***/ }), -/* 18 */, -/* 19 */, -/* 20 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var _newnoteButton = __webpack_require__(10); - -var _newnoteButton2 = _interopRequireDefault(_newnoteButton); - -var _persistForm = __webpack_require__(11); - -var _persistForm2 = _interopRequireDefault(_persistForm); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -//newnote.js - -var button = document.querySelector('#locate'); -(0, _newnoteButton2.default)(button); -(0, _persistForm2.default)(); - /***/ }) /******/ ]); //# sourceMappingURL=newnote.js.map \ No newline at end of file diff --git a/public/assets/js/newnote.js.br b/public/assets/js/newnote.js.br index c2422e76..d0640178 100644 Binary files a/public/assets/js/newnote.js.br and b/public/assets/js/newnote.js.br differ diff --git a/public/assets/js/newnote.js.gz b/public/assets/js/newnote.js.gz index e71e682d..a22d5ee3 100644 Binary files a/public/assets/js/newnote.js.gz and b/public/assets/js/newnote.js.gz differ diff --git a/public/assets/js/newnote.js.map b/public/assets/js/newnote.js.map index 68ce620b..d34d7b37 100644 --- a/public/assets/js/newnote.js.map +++ b/public/assets/js/newnote.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap 24cb5e5f339c421e8b0f","webpack:///(webpack)/buildin/global.js","webpack:///./parse-location.js","webpack:///./mapbox-utils.js","webpack:////home/jonny/git/jonnybarnes.uk/~/alertify.js/dist/js/alertify.js","webpack:///./select-place.js","webpack:////home/jonny/git/jonnybarnes.uk/~/base64-js/index.js","webpack:////home/jonny/git/jonnybarnes.uk/~/buffer/index.js","webpack:////home/jonny/git/jonnybarnes.uk/~/buffer/~/isarray/index.js","webpack:////home/jonny/git/jonnybarnes.uk/~/ieee754/index.js","webpack:////home/jonny/git/jonnybarnes.uk/~/mapbox-gl/dist/mapbox-gl.js","webpack:///./newnote-button.js","webpack:///./persist-form.js","webpack:///./nearby-places.js","webpack:///./newnote-getlocation.js","webpack:///./newplace-micropub.js","webpack:///./submit-place.js","webpack:////home/jonny/git/jonnybarnes.uk/~/webStorage/dist/webStorage.js","webpack:///(webpack)/buildin/module.js","webpack:///./newnote.js"],"names":["parseLocation","text","coords","exec","parsedLongitude","split","parsedLatitude","addMap","accessToken","titlecase","string","map","first","rest","toUpperCase","join","toLowerCase","addMapTypeOption","menu","option","checked","input","document","createElement","setAttribute","addEventListener","setStyle","label","appendChild","createTextNode","makeMapMenu","mapMenu","classList","add","div","position","places","dataLatitude","dataset","latitude","dataLongitude","longitude","dataId","id","data","window","place","placeLongitude","location","placeLatitude","features","push","name","slug","Map","container","style","center","zoom","scrollZoom","disable","addControl","NavigationControl","on","addSource","addLayer","e","queryRenderedFeatures","point","layer","length","flyTo","geometry","coordinates","properties","uri","bounds","LngLatBounds","feature","extend","fitBounds","padding","selectPlaceInForm","querySelector","selected","enableLocateButton","button","navigator","disabled","persistFormData","loadData","replyTo","value","getItem","content","saveData","setItem","success","clearData","removeItem","form","addMapWithPlaces","makeOptionsForForm","selectElement","noLocationOption","geoLocationOption","console","log","parsedCoords","optionLatitude","selectedIndex","optionLongitude","fetch","accuracy","credentials","method","then","response","ok","json","reset","error","error_description","flexboxDiv","options","newPlaceForm","insertBefore","catch","getLocation","mapDiv","geolocation","getCurrentPosition","makeNewPlaceForm","newLocationButton","newPlaceNameDiv","newPlaceNameLabel","newPlaceNameInput","newPlaceDescDiv","newPlaceDescLabel","newPlaceDescInput","newPlaceLatitudeDiv","newPlaceLatitudeLabel","newPlaceLatitudeInput","getCenter","lat","newPlaceLongitudeDiv","newPlaceLongitudeLabel","newPlaceLongitudeInput","lng","newPlaceSubmit","submitNewPlace","formData","FormData","append","body","placeJson","Error","labels","querySelectorAll","removeChild","parentNode","newPlaceButton","source","getSource","newFeatures","_data","filter","item","title","newSource","setData","newlyCreatedPlaceOption","placeError"],"mappings":";AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AA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AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,0CAA0C,UAAU;AACpD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;;;;;;;ACjHA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,qBAAqB,mDAAmD;AACxE;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,UAAU;AAC7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,YAAY;AAC7B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA,uCAAuC,SAAS;AAChD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC;AACA;AACA;;AAEA;AACA;AACA,aAAa,iBAAiB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,iBAAiB,SAAS;AAC1B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,iBAAiB,SAAS;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,iBAAiB,SAAS;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,gDAAgD,EAAE;AAClD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,iBAAiB,SAAS;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA,wBAAwB,eAAe;AACvC;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,wBAAwB,QAAQ;AAChC;AACA,qBAAqB,eAAe;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,YAAY;AAC7B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,qBAAqB,SAAS;AAC9B;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,qBAAqB,SAAS;AAC9B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,qBAAqB,SAAS;AAC9B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,kBAAkB;AACnC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,mBAAmB,cAAc;AACjC;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,uDAAuD,OAAO;AAC9D;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA,uDAAuD,OAAO;AAC9D;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB;AAClB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,qBAAqB,QAAQ;AAC7B;AACA;AACA,GAAG;AACH;AACA,eAAe,SAAS;AACxB;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,mBAAmB,SAAS;AAC5B;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,iBAAiB,YAAY;AAC7B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,iBAAiB,gBAAgB;AACjC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,gBAAgB;AACjC;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,iBAAiB,YAAY;AAC7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;AC5vDA,iBAAiB;;AAEjB;AACA;AACA;;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,QAAQ,WAAW;;AAEnB;AACA;AACA;AACA,QAAQ,WAAW;;AAEnB;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA,QAAQ,WAAW;;AAEnB;AACA;AACA,QAAQ,UAAU;;AAElB;AACA;;;;;;;kECnFA,yBAAa,SAA2D,mBAAmB,gDAAgD,aAAa,KAAK,MAAM,gCAAgC,SAAS,qCAAqC,SAAS,mCAAmC,OAAO,KAAK,OAAO,kBAAkB,aAAa,0BAA0B,0BAA0B,gBAAgB,UAAU,UAAU,0CAA0C,8BAAwB,oBAAoB,8CAA8C,kCAAkC,YAAY,YAAY,mCAAmC,iBAAiB,gBAAgB,sBAAsB,oBAAoB,0CAA0C,YAAY,WAAW,YAAY,SAAS,GAAG;AAC5yB,eAAe,uIAAuI,iBAAiB,aAAa,aAAa,0BAA0B,8BAA8B,kBA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,CAAC;AACD,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,EAAE;;AAEF,iCAAiC,2CAA2C,gBAAgB,kBAAkB,OAAO,2BAA2B,wDAAwD,gCAAgC,uDAAuD,2DAA2D,EAAE,EAAE,yDAAyD,qEAAqE,6DAA6D,oBAAoB,GAAG,EAAE;;AAEljB;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA,uCAAuC,uCAAuC,gBAAgB;;AAE9F,kDAAkD,0CAA0C,0DAA0D,EAAE;;AAExJ;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc,OAAO;AACrB;AACA;AACA;;AAEA,uCAAuC;;AAEvC;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc,OAAO;AACrB,eAAe,OAAO;AACtB;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAe;AACf,gBAAgB,OAAO;AACvB,iBAAiB;AACjB;;AAEA,IAAI;AACJ;AACA;AACA,yCAAyC;;AAEzC;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAe;AACf,gBAAgB,OAAO;AACvB,iBAAiB,MAAM;AACvB,iBAAiB,EAAE;AACnB;;AAEA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA,6BAA6B,gCAAgC;AAC7D;AACA,QAAQ;AACR,6BAA6B,oCAAoC;AACjE;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAe;AACf,gBAAgB,OAAO;AACvB,gBAAgB,EAAE;AAClB,iBAAiB,MAAM;AACvB,iBAAiB,EAAE;AACnB;;AAEA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,gCAAgC;AAC7D;AACA,QAAQ;AACR,6BAA6B,oCAAoC;AACjE;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAe;AACf,gBAAgB,OAAO;AACvB,iBAAiB;AACjB;;AAEA,IAAI;AACJ;AACA;AACA,2BAA2B,iCAAiC;AAC5D;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf,gBAAgB,QAAQ;AACxB,iBAAiB;AACjB;;AAEA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA,QAAQ;AACR;AACA;AACA,UAAU;AACV;;AAEA,2BAA2B,qBAAqB;AAChD;;AAEA;AACA;AACA;AACA;AACA,eAAe;AACf,iBAAiB,MAAM;AACvB;;AAEA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA,QAAQ;;AAER;AACA;;AAEA;AACA;AACA;AACA,eAAe;AACf,iBAAiB,OAAO;AACxB;;AAEA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA,QAAQ;;AAER;AACA;;AAEA;AACA;AACA;AACA,eAAe;AACf,gBAAgB,SAAS;AACzB,iBAAiB;AACjB;;AAEA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR;;AAEA;AACA;AACA;AACA,eAAe;AACf,iBAAiB,sBAAsB;AACvC;;AAEA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAQ;;AAER;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAe;AACf,iBAAiB,QAAQ,0CAA0C;AACnE;;AAEA,IAAI;AACJ;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA,EAAE;;AAEF;AACA;;AAEA,OAAO;AACP;AACA;;AAEA,mEAAmE;AACnE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA,EAAE;AACF;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB,gBAAgB,SAAS;AACzB,iBAAiB,UAAU;AAC3B,iBAAiB,OAAO;AACxB;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB,gBAAgB,SAAS;AACzB,iBAAiB,QAAQ,2EAA2E;AACpG;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB,gBAAgB,SAAS;AACzB,iBAAiB,OAAO;AACxB;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB,iBAAiB,OAAO;AACxB;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA,oBAAoB,YAAY;AAChC;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,OAAO;AACzB,mBAAmB,UAAU;AAC7B,mBAAmB,OAAO;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;;AAEJ;AACA,EAAE;;;AAGF,OAAO;AACP;AACA;;AAEA;;AAEA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;;AAEA,OAAO;AACP;AACA;;AAEA;;AAEA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;;AAEA,OAAO;AACP;AACA;;AAEA;;AAEA;AACA;AACA,EAAE;AACF;AACA;AACA,wCAAwC,OAAO;AAC/C;AACA,aAAa;AACb;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAO;AACP;AACA;;AAEA;;AAEA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA,YAAY,OAAO;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;;AAEA,OAAO;AACP;AACA;;AAEA;;AAEA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA,YAAY,OAAO;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;;AAEA,OAAO;AACP;AACA;;AAEA;;AAEA;AACA;AACA,EAAE;;AAEF;;AAEA;;AAEA,uCAAuC,uCAAuC,gBAAgB;;AAE9F;AACA;AACA;AACA;AACA,YAAY,OAAO;AACnB,YAAY,SAAS;AACrB,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;;AAEA,OAAO;AACP;AACA;;AAEA;;AAEA;AACA;AACA,EAAE;;AAEF;;AAEA;;AAEA,uCAAuC,uCAAuC,gBAAgB;;AAE9F;AACA;AACA;AACA;AACA,YAAY,OAAO;AACnB,YAAY,OAAO;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;;AAEA,OAAO;AACP;AACA;;AAEA;;AAEA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;AACD;AACA,sC;;;;;;ACnvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;;;;;;;;;;;ACnBA;;;;AACA;;;;;;AAHA;;AAKA,IAAItF,SAAShE,SAAS6D,aAAT,CAAuB,SAAvB,CAAb;AACA,6BAAmBG,MAAnB;AACA,6B","file":"newnote.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// identity function for calling harmony imports with the correct context\n \t__webpack_require__.i = function(value) { return value; };\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 20);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 24cb5e5f339c421e8b0f","var g;\r\n\r\n// This works in non-strict mode\r\ng = (function() {\r\n\treturn this;\r\n})();\r\n\r\ntry {\r\n\t// This works if eval is allowed (see CSP)\r\n\tg = g || Function(\"return this\")() || (1,eval)(\"this\");\r\n} catch(e) {\r\n\t// This works if the window reference is available\r\n\tif(typeof window === \"object\")\r\n\t\tg = window;\r\n}\r\n\r\n// g can still be undefined, but nothing to do about it...\r\n// We return undefined, instead of nothing here, so it's\r\n// easier to handle this case. if(!global) { ...}\r\n\r\nmodule.exports = g;\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// (webpack)/buildin/global.js\n// module id = 0\n// module chunks = 0 1","//parse-location.js\n\n//text = `POINT(lon lat)`\nexport default function parseLocation(text) {\n let coords = /POINT\\((.*)\\)/.exec(text);\n let parsedLongitude = coords[1].split(' ')[0];\n let parsedLatitude = coords[1].split(' ')[1];\n\n return {'latitude': parsedLatitude, 'longitude': parsedLongitude};\n}\n\n\n\n// WEBPACK FOOTER //\n// ./parse-location.js","//mapbox-utils.js\nimport mapboxgl from 'mapbox-gl/dist/mapbox-gl.js';\nimport parseLocation from './parse-location';\nimport selectPlaceInForm from './select-place';\n\nmapboxgl.accessToken = 'pk.eyJ1Ijoiam9ubnliYXJuZXMiLCJhIjoiY2l2cDhjYW04MDAwcjJ0cG1uZnhqcm82ayJ9.qA2zeVA-nsoMh9IFrd5KQw';\n\n//define some functions to be used in the default function.\nconst titlecase = (string) => {\n return string.split('-').map(([first,...rest]) => first.toUpperCase() + rest.join('').toLowerCase()).join(' ');\n};\n\nconst addMapTypeOption = (map, menu, option, checked = false) => {\n let input = document.createElement('input');\n input.setAttribute('id', option);\n input.setAttribute('type', 'radio');\n input.setAttribute('name', 'toggle');\n input.setAttribute('value', option);\n if (checked == true) {\n input.setAttribute('checked', 'checked');\n }\n input.addEventListener('click', function () {\n map.setStyle('mapbox://styles/mapbox/' + option + '-v9');\n });\n let label = document.createElement('label');\n label.setAttribute('for', option);\n label.appendChild(document.createTextNode(titlecase(option)));\n menu.appendChild(input);\n menu.appendChild(label);\n};\n\nconst makeMapMenu = (map) => {\n let mapMenu = document.createElement('div');\n mapMenu.classList.add('map-menu');\n addMapTypeOption(map, mapMenu, 'streets', true);\n addMapTypeOption(map, mapMenu, 'satellite-streets');\n return mapMenu;\n};\n\n//the main function\nexport default function addMap(div, position = null, places = null) {\n let dataLatitude = div.dataset.latitude;\n let dataLongitude = div.dataset.longitude;\n let dataId = div.dataset.id;\n let data = window['geojson'+dataId];\n if (data == null) {\n data = {\n 'type': 'FeatureCollection',\n 'features': [{\n 'type': 'Feature',\n 'geometry': {\n 'type': 'Point',\n 'coordinates': [dataLongitude, dataLatitude]\n },\n 'properties': {\n 'title': 'Current Location',\n 'icon': 'circle-stroked',\n 'uri': 'current-location'\n }\n }]\n };\n }\n if (places != null) {\n for (let place of places) {\n let placeLongitude = parseLocation(place.location).longitude;\n let placeLatitude = parseLocation(place.location).latitude;\n data.features.push({\n 'type': 'Feature',\n 'geometry': {\n 'type': 'Point',\n 'coordinates': [placeLongitude, placeLatitude]\n },\n 'properties': {\n 'title': place.name,\n 'icon': 'circle',\n 'uri': place.slug\n }\n });\n }\n }\n if (position != null) {\n dataLongitude = position.coords.longitude;\n dataLatitude = position.coords.latitude;\n }\n let map = new mapboxgl.Map({\n container: div,\n style: 'mapbox://styles/mapbox/streets-v9',\n center: [dataLongitude, dataLatitude],\n zoom: 15\n });\n if (position == null) {\n map.scrollZoom.disable();\n }\n map.addControl(new mapboxgl.NavigationControl());\n div.appendChild(makeMapMenu(map));\n map.on('load', function () {\n map.addSource('points', {\n 'type': 'geojson',\n 'data': data\n });\n map.addLayer({\n 'id': 'points',\n 'interactive': true,\n 'type': 'symbol',\n 'source': 'points',\n 'layout': {\n 'icon-image': '{icon}-15',\n 'text-field': '{title}',\n 'text-offset': [0, 1]\n }\n });\n });\n if (position != null) {\n map.on('click', function (e) {\n let features = map.queryRenderedFeatures(e.point, {\n layer: ['points']\n });\n // if there are features within the given radius of the click event,\n // fly to the location of the click event\n if (features.length) {\n // Get coordinates from the symbol and center the map on those coordinates\n map.flyTo({center: features[0].geometry.coordinates});\n selectPlaceInForm(features[0].properties.uri);\n }\n });\n }\n if (data.features && data.features.length > 1) {\n let bounds = new mapboxgl.LngLatBounds();\n for (let feature of data.features) {\n bounds.extend(feature.geometry.coordinates);\n }\n map.fitBounds(bounds, { padding: 65});\n }\n\n return map;\n}\n\n\n\n// WEBPACK FOOTER //\n// ./mapbox-utils.js","!function(){\"use strict\";function t(){var t={parent:document.body,version:\"1.0.12\",defaultOkLabel:\"Ok\",okLabel:\"Ok\",defaultCancelLabel:\"Cancel\",cancelLabel:\"Cancel\",defaultMaxLogItems:2,maxLogItems:2,promptValue:\"\",promptPlaceholder:\"\",closeLogOnClick:!1,closeLogOnClickDefault:!1,delay:5e3,defaultDelay:5e3,logContainerClass:\"alertify-logs\",logContainerDefaultClass:\"alertify-logs\",dialogs:{buttons:{holder:\"\",ok:\"\",cancel:\"\"},input:\"\",message:\"

{{message}}

\",log:\"
{{message}}
\"},defaultDialogs:{buttons:{holder:\"\",ok:\"\",cancel:\"\"},input:\"\",message:\"

{{message}}

\",log:\"
{{message}}
\"},build:function(t){var e=this.dialogs.buttons.ok,o=\"
\"+this.dialogs.message.replace(\"{{message}}\",t.message);return\"confirm\"!==t.type&&\"prompt\"!==t.type||(e=this.dialogs.buttons.cancel+this.dialogs.buttons.ok),\"prompt\"===t.type&&(o+=this.dialogs.input),o=(o+this.dialogs.buttons.holder+\"
\").replace(\"{{buttons}}\",e).replace(\"{{ok}}\",this.okLabel).replace(\"{{cancel}}\",this.cancelLabel)},setCloseLogOnClick:function(t){this.closeLogOnClick=!!t},close:function(t,e){this.closeLogOnClick&&t.addEventListener(\"click\",function(){o(t)}),e=e&&!isNaN(+e)?+e:this.delay,0>e?o(t):e>0&&setTimeout(function(){o(t)},e)},dialog:function(t,e,o,n){return this.setup({type:e,message:t,onOkay:o,onCancel:n})},log:function(t,e,o){var n=document.querySelectorAll(\".alertify-logs > div\");if(n){var i=n.length-this.maxLogItems;if(i>=0)for(var a=0,l=i+1;l>a;a++)this.close(n[a],-1)}this.notify(t,e,o)},setLogPosition:function(t){this.logContainerClass=\"alertify-logs \"+t},setupLogContainer:function(){var t=document.querySelector(\".alertify-logs\"),e=this.logContainerClass;return t||(t=document.createElement(\"div\"),t.className=e,this.parent.appendChild(t)),t.className!==e&&(t.className=e),t},notify:function(e,o,n){var i=this.setupLogContainer(),a=document.createElement(\"div\");a.className=o||\"default\",t.logTemplateMethod?a.innerHTML=t.logTemplateMethod(e):a.innerHTML=e,\"function\"==typeof n&&a.addEventListener(\"click\",n),i.appendChild(a),setTimeout(function(){a.className+=\" show\"},10),this.close(a,this.delay)},setup:function(t){function e(e){\"function\"!=typeof e&&(e=function(){}),i&&i.addEventListener(\"click\",function(i){t.onOkay&&\"function\"==typeof t.onOkay&&(l?t.onOkay(l.value,i):t.onOkay(i)),e(l?{buttonClicked:\"ok\",inputValue:l.value,event:i}:{buttonClicked:\"ok\",event:i}),o(n)}),a&&a.addEventListener(\"click\",function(i){t.onCancel&&\"function\"==typeof t.onCancel&&t.onCancel(i),e({buttonClicked:\"cancel\",event:i}),o(n)}),l&&l.addEventListener(\"keyup\",function(t){13===t.which&&i.click()})}var n=document.createElement(\"div\");n.className=\"alertify hide\",n.innerHTML=this.build(t);var i=n.querySelector(\".ok\"),a=n.querySelector(\".cancel\"),l=n.querySelector(\"input\"),s=n.querySelector(\"label\");l&&(\"string\"==typeof this.promptPlaceholder&&(s?s.textContent=this.promptPlaceholder:l.placeholder=this.promptPlaceholder),\"string\"==typeof this.promptValue&&(l.value=this.promptValue));var r;return\"function\"==typeof Promise?r=new Promise(e):e(),this.parent.appendChild(n),setTimeout(function(){n.classList.remove(\"hide\"),l&&t.type&&\"prompt\"===t.type?(l.select(),l.focus()):i&&i.focus()},100),r},okBtn:function(t){return this.okLabel=t,this},setDelay:function(t){return t=t||0,this.delay=isNaN(t)?this.defaultDelay:parseInt(t,10),this},cancelBtn:function(t){return this.cancelLabel=t,this},setMaxLogItems:function(t){this.maxLogItems=parseInt(t||this.defaultMaxLogItems)},theme:function(t){switch(t.toLowerCase()){case\"bootstrap\":this.dialogs.buttons.ok=\"\",this.dialogs.buttons.cancel=\"\",this.dialogs.input=\"\";break;case\"purecss\":this.dialogs.buttons.ok=\"\",this.dialogs.buttons.cancel=\"\";break;case\"mdl\":case\"material-design-light\":this.dialogs.buttons.ok=\"\",this.dialogs.buttons.cancel=\"\",this.dialogs.input=\"
\";break;case\"angular-material\":this.dialogs.buttons.ok=\"\",this.dialogs.buttons.cancel=\"\",this.dialogs.input=\"
\";break;case\"default\":default:this.dialogs.buttons.ok=this.defaultDialogs.buttons.ok,this.dialogs.buttons.cancel=this.defaultDialogs.buttons.cancel,this.dialogs.input=this.defaultDialogs.input}},reset:function(){this.parent=document.body,this.theme(\"default\"),this.okBtn(this.defaultOkLabel),this.cancelBtn(this.defaultCancelLabel),this.setMaxLogItems(),this.promptValue=\"\",this.promptPlaceholder=\"\",this.delay=this.defaultDelay,this.setCloseLogOnClick(this.closeLogOnClickDefault),this.setLogPosition(\"bottom left\"),this.logTemplateMethod=null},injectCSS:function(){if(!document.querySelector(\"#alertifyCSS\")){var t=document.getElementsByTagName(\"head\")[0],e=document.createElement(\"style\");e.type=\"text/css\",e.id=\"alertifyCSS\",e.innerHTML=\".alertify-logs>*{padding:12px 24px;color:#fff;box-shadow:0 2px 5px 0 rgba(0,0,0,.2);border-radius:1px}.alertify-logs>*,.alertify-logs>.default{background:rgba(0,0,0,.8)}.alertify-logs>.error{background:rgba(244,67,54,.8)}.alertify-logs>.success{background:rgba(76,175,80,.9)}.alertify{position:fixed;background-color:rgba(0,0,0,.3);left:0;right:0;top:0;bottom:0;width:100%;height:100%;z-index:1}.alertify.hide{opacity:0;pointer-events:none}.alertify,.alertify.show{box-sizing:border-box;transition:all .33s cubic-bezier(.25,.8,.25,1)}.alertify,.alertify *{box-sizing:border-box}.alertify .dialog{padding:12px}.alertify .alert,.alertify .dialog{width:100%;margin:0 auto;position:relative;top:50%;transform:translateY(-50%)}.alertify .alert>*,.alertify .dialog>*{width:400px;max-width:95%;margin:0 auto;text-align:center;padding:12px;background:#fff;box-shadow:0 2px 4px -1px rgba(0,0,0,.14),0 4px 5px 0 rgba(0,0,0,.098),0 1px 10px 0 rgba(0,0,0,.084)}.alertify .alert .msg,.alertify .dialog .msg{padding:12px;margin-bottom:12px;margin:0;text-align:left}.alertify .alert input:not(.form-control),.alertify .dialog input:not(.form-control){margin-bottom:15px;width:100%;font-size:100%;padding:12px}.alertify .alert input:not(.form-control):focus,.alertify .dialog input:not(.form-control):focus{outline-offset:-2px}.alertify .alert nav,.alertify .dialog nav{text-align:right}.alertify .alert nav button:not(.btn):not(.pure-button):not(.md-button):not(.mdl-button),.alertify .dialog nav button:not(.btn):not(.pure-button):not(.md-button):not(.mdl-button){background:transparent;box-sizing:border-box;color:rgba(0,0,0,.87);position:relative;outline:0;border:0;display:inline-block;-ms-flex-align:center;-ms-grid-row-align:center;align-items:center;padding:0 6px;margin:6px 8px;line-height:36px;min-height:36px;white-space:nowrap;min-width:88px;text-align:center;text-transform:uppercase;font-size:14px;text-decoration:none;cursor:pointer;border:1px solid transparent;border-radius:2px}.alertify .alert nav button:not(.btn):not(.pure-button):not(.md-button):not(.mdl-button):active,.alertify .alert nav button:not(.btn):not(.pure-button):not(.md-button):not(.mdl-button):hover,.alertify .dialog nav button:not(.btn):not(.pure-button):not(.md-button):not(.mdl-button):active,.alertify .dialog nav button:not(.btn):not(.pure-button):not(.md-button):not(.mdl-button):hover{background-color:rgba(0,0,0,.05)}.alertify .alert nav button:not(.btn):not(.pure-button):not(.md-button):not(.mdl-button):focus,.alertify .dialog nav button:not(.btn):not(.pure-button):not(.md-button):not(.mdl-button):focus{border:1px solid rgba(0,0,0,.1)}.alertify .alert nav button.btn,.alertify .dialog nav button.btn{margin:6px 4px}.alertify-logs{position:fixed;z-index:1}.alertify-logs.bottom,.alertify-logs:not(.top){bottom:16px}.alertify-logs.left,.alertify-logs:not(.right){left:16px}.alertify-logs.left>*,.alertify-logs:not(.right)>*{float:left;transform:translateZ(0);height:auto}.alertify-logs.left>.show,.alertify-logs:not(.right)>.show{left:0}.alertify-logs.left>*,.alertify-logs.left>.hide,.alertify-logs:not(.right)>*,.alertify-logs:not(.right)>.hide{left:-110%}.alertify-logs.right{right:16px}.alertify-logs.right>*{float:right;transform:translateZ(0)}.alertify-logs.right>.show{right:0;opacity:1}.alertify-logs.right>*,.alertify-logs.right>.hide{right:-110%;opacity:0}.alertify-logs.top{top:0}.alertify-logs>*{box-sizing:border-box;transition:all .4s cubic-bezier(.25,.8,.25,1);position:relative;clear:both;backface-visibility:hidden;perspective:1000;max-height:0;margin:0;padding:0;overflow:hidden;opacity:0;pointer-events:none}.alertify-logs>.show{margin-top:12px;opacity:1;max-height:1000px;padding:12px;pointer-events:auto}\",t.insertBefore(e,t.firstChild)}},removeCSS:function(){var t=document.querySelector(\"#alertifyCSS\");t&&t.parentNode&&t.parentNode.removeChild(t)}};return t.injectCSS(),{_$$alertify:t,parent:function(e){t.parent=e},reset:function(){return t.reset(),this},alert:function(e,o,n){return t.dialog(e,\"alert\",o,n)||this},confirm:function(e,o,n){return t.dialog(e,\"confirm\",o,n)||this},prompt:function(e,o,n){return t.dialog(e,\"prompt\",o,n)||this},log:function(e,o){return t.log(e,\"default\",o),this},theme:function(e){return t.theme(e),this},success:function(e,o){return t.log(e,\"success\",o),this},error:function(e,o){return t.log(e,\"error\",o),this},cancelBtn:function(e){return t.cancelBtn(e),this},okBtn:function(e){return t.okBtn(e),this},delay:function(e){return t.setDelay(e),this},placeholder:function(e){return t.promptPlaceholder=e,this},defaultValue:function(e){return t.promptValue=e,this},maxLogItems:function(e){return t.setMaxLogItems(e),this},closeLogOnClick:function(e){return t.setCloseLogOnClick(!!e),this},logPosition:function(e){return t.setLogPosition(e||\"\"),this},setLogTemplate:function(e){return t.logTemplateMethod=e,this},clearLogs:function(){return t.setupLogContainer().innerHTML=\"\",this},version:t.version}}var e=500,o=function(t){if(t){var o=function(){t&&t.parentNode&&t.parentNode.removeChild(t)};t.classList.remove(\"show\"),t.classList.add(\"hide\"),t.addEventListener(\"transitionend\",o),setTimeout(o,e)}};if(\"undefined\"!=typeof module&&module&&module.exports){module.exports=function(){return new t};var n=new t;for(var i in n)module.exports[i]=n[i]}else\"function\"==typeof define&&define.amd?define(function(){return new t}):window.alertify=new t}();\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/jonny/git/jonnybarnes.uk/~/alertify.js/dist/js/alertify.js\n// module id = 3\n// module chunks = 0","//select-place.js\n\nexport default function selectPlaceInForm(uri) {\n if (document.querySelector('select')) {\n if (uri == 'current-location') {\n document.querySelector('select [id=\"option-coords\"]').selected = true;\n } else {\n document.querySelector('select [value=\"' + uri + '\"]').selected = true;\n }\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./select-place.js","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction placeHoldersCount (b64) {\n var len = b64.length\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // the number of equal signs (place holders)\n // if there are two placeholders, than the two characters before it\n // represent one byte\n // if there is only one, then the three characters before it represent 2 bytes\n // this is just a cheap hack to not do indexOf twice\n return b64[len - 2] === '=' ? 2 : b64[len - 1] === '=' ? 1 : 0\n}\n\nfunction byteLength (b64) {\n // base64 is 4/3 + up to two characters of the original data\n return b64.length * 3 / 4 - placeHoldersCount(b64)\n}\n\nfunction toByteArray (b64) {\n var i, j, l, tmp, placeHolders, arr\n var len = b64.length\n placeHolders = placeHoldersCount(b64)\n\n arr = new Arr(len * 3 / 4 - placeHolders)\n\n // if there are placeholders, only get up to the last complete 4 chars\n l = placeHolders > 0 ? len - 4 : len\n\n var L = 0\n\n for (i = 0, j = 0; i < l; i += 4, j += 3) {\n tmp = (revLookup[b64.charCodeAt(i)] << 18) | (revLookup[b64.charCodeAt(i + 1)] << 12) | (revLookup[b64.charCodeAt(i + 2)] << 6) | revLookup[b64.charCodeAt(i + 3)]\n arr[L++] = (tmp >> 16) & 0xFF\n arr[L++] = (tmp >> 8) & 0xFF\n arr[L++] = tmp & 0xFF\n }\n\n if (placeHolders === 2) {\n tmp = (revLookup[b64.charCodeAt(i)] << 2) | (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[L++] = tmp & 0xFF\n } else if (placeHolders === 1) {\n tmp = (revLookup[b64.charCodeAt(i)] << 10) | (revLookup[b64.charCodeAt(i + 1)] << 4) | (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[L++] = (tmp >> 8) & 0xFF\n arr[L++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2])\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var output = ''\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n output += lookup[tmp >> 2]\n output += lookup[(tmp << 4) & 0x3F]\n output += '=='\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + (uint8[len - 1])\n output += lookup[tmp >> 10]\n output += lookup[(tmp >> 4) & 0x3F]\n output += lookup[(tmp << 2) & 0x3F]\n output += '='\n }\n\n parts.push(output)\n\n return parts.join('')\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/jonny/git/jonnybarnes.uk/~/base64-js/index.js\n// module id = 5\n// module chunks = 0 1","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nvar base64 = require('base64-js')\nvar ieee754 = require('ieee754')\nvar isArray = require('isarray')\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Use Object implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * Due to various browser bugs, sometimes the Object implementation will be used even\n * when the browser supports typed arrays.\n *\n * Note:\n *\n * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,\n * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.\n *\n * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.\n *\n * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of\n * incorrect length in some situations.\n\n * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they\n * get the Object implementation, which is slower but behaves correctly.\n */\nBuffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined\n ? global.TYPED_ARRAY_SUPPORT\n : typedArraySupport()\n\n/*\n * Export kMaxLength after typed array support is determined.\n */\nexports.kMaxLength = kMaxLength()\n\nfunction typedArraySupport () {\n try {\n var arr = new Uint8Array(1)\n arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}\n return arr.foo() === 42 && // typed array instances can be augmented\n typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`\n arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`\n } catch (e) {\n return false\n }\n}\n\nfunction kMaxLength () {\n return Buffer.TYPED_ARRAY_SUPPORT\n ? 0x7fffffff\n : 0x3fffffff\n}\n\nfunction createBuffer (that, length) {\n if (kMaxLength() < length) {\n throw new RangeError('Invalid typed array length')\n }\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = new Uint8Array(length)\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n if (that === null) {\n that = new Buffer(length)\n }\n that.length = length\n }\n\n return that\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n return new Buffer(arg, encodingOrOffset, length)\n }\n\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new Error(\n 'If encoding is specified then the first argument must be a string'\n )\n }\n return allocUnsafe(this, arg)\n }\n return from(this, arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\n// TODO: Legacy, not needed anymore. Remove in next major version.\nBuffer._augment = function (arr) {\n arr.__proto__ = Buffer.prototype\n return arr\n}\n\nfunction from (that, value, encodingOrOffset, length) {\n if (typeof value === 'number') {\n throw new TypeError('\"value\" argument must not be a number')\n }\n\n if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {\n return fromArrayBuffer(that, value, encodingOrOffset, length)\n }\n\n if (typeof value === 'string') {\n return fromString(that, value, encodingOrOffset)\n }\n\n return fromObject(that, value)\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(null, value, encodingOrOffset, length)\n}\n\nif (Buffer.TYPED_ARRAY_SUPPORT) {\n Buffer.prototype.__proto__ = Uint8Array.prototype\n Buffer.__proto__ = Uint8Array\n if (typeof Symbol !== 'undefined' && Symbol.species &&\n Buffer[Symbol.species] === Buffer) {\n // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97\n Object.defineProperty(Buffer, Symbol.species, {\n value: null,\n configurable: true\n })\n }\n}\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be a number')\n } else if (size < 0) {\n throw new RangeError('\"size\" argument must not be negative')\n }\n}\n\nfunction alloc (that, size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(that, size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpretted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(that, size).fill(fill, encoding)\n : createBuffer(that, size).fill(fill)\n }\n return createBuffer(that, size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(null, size, fill, encoding)\n}\n\nfunction allocUnsafe (that, size) {\n assertSize(size)\n that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n for (var i = 0; i < size; ++i) {\n that[i] = 0\n }\n }\n return that\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(null, size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(null, size)\n}\n\nfunction fromString (that, string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('\"encoding\" must be a valid string encoding')\n }\n\n var length = byteLength(string, encoding) | 0\n that = createBuffer(that, length)\n\n var actual = that.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n that = that.slice(0, actual)\n }\n\n return that\n}\n\nfunction fromArrayLike (that, array) {\n var length = array.length < 0 ? 0 : checked(array.length) | 0\n that = createBuffer(that, length)\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n}\n\nfunction fromArrayBuffer (that, array, byteOffset, length) {\n array.byteLength // this throws if `array` is not a valid ArrayBuffer\n\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\\'offset\\' is out of bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\\'length\\' is out of bounds')\n }\n\n if (byteOffset === undefined && length === undefined) {\n array = new Uint8Array(array)\n } else if (length === undefined) {\n array = new Uint8Array(array, byteOffset)\n } else {\n array = new Uint8Array(array, byteOffset, length)\n }\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = array\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n that = fromArrayLike(that, array)\n }\n return that\n}\n\nfunction fromObject (that, obj) {\n if (Buffer.isBuffer(obj)) {\n var len = checked(obj.length) | 0\n that = createBuffer(that, len)\n\n if (that.length === 0) {\n return that\n }\n\n obj.copy(that, 0, 0, len)\n return that\n }\n\n if (obj) {\n if ((typeof ArrayBuffer !== 'undefined' &&\n obj.buffer instanceof ArrayBuffer) || 'length' in obj) {\n if (typeof obj.length !== 'number' || isnan(obj.length)) {\n return createBuffer(that, 0)\n }\n return fromArrayLike(that, obj)\n }\n\n if (obj.type === 'Buffer' && isArray(obj.data)) {\n return fromArrayLike(that, obj.data)\n }\n }\n\n throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')\n}\n\nfunction checked (length) {\n // Note: cannot use `length < kMaxLength()` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= kMaxLength()) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + kMaxLength().toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return !!(b != null && b._isBuffer)\n}\n\nBuffer.compare = function compare (a, b) {\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError('Arguments must be Buffers')\n }\n\n if (a === b) return 0\n\n var x = a.length\n var y = b.length\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n var i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n var buffer = Buffer.allocUnsafe(length)\n var pos = 0\n for (i = 0; i < list.length; ++i) {\n var buf = list[i]\n if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n buf.copy(buffer, pos)\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&\n (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n string = '' + string\n }\n\n var len = string.length\n if (len === 0) return 0\n\n // Use a for loop to avoid recursion\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n case undefined:\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) return utf8ToBytes(string).length // assume utf8\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n var loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coersion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect\n// Buffer instances.\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n var i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n var len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (var i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n var len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (var i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n var len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (var i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n var length = this.length | 0\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n var str = ''\n var max = exports.INSPECT_MAX_BYTES\n if (this.length > 0) {\n str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')\n if (this.length > max) str += ' ... '\n }\n return ''\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (!Buffer.isBuffer(target)) {\n throw new TypeError('Argument must be a Buffer')\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n var x = thisEnd - thisStart\n var y = end - start\n var len = Math.min(x, y)\n\n var thisCopy = this.slice(thisStart, thisEnd)\n var targetCopy = target.slice(start, end)\n\n for (var i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n var indexSize = 1\n var arrLength = arr.length\n var valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n var i\n if (dir) {\n var foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n var found = true\n for (var j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n var remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n // must be an even number of digits\n var strLen = string.length\n if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n for (var i = 0; i < length; ++i) {\n var parsed = parseInt(string.substr(i * 2, 2), 16)\n if (isNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction latin1Write (buf, string, offset, length) {\n return asciiWrite(buf, string, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset | 0\n if (isFinite(length)) {\n length = length | 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n // legacy write(string, encoding, offset, length) - remove in v0.13\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n var remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n return asciiWrite(this, string, offset, length)\n\n case 'latin1':\n case 'binary':\n return latin1Write(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n var res = []\n\n var i = start\n while (i < end) {\n var firstByte = buf[i]\n var codePoint = null\n var bytesPerSequence = (firstByte > 0xEF) ? 4\n : (firstByte > 0xDF) ? 3\n : (firstByte > 0xBF) ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n var secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nvar MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n var len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n var res = ''\n var i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n var len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n var out = ''\n for (var i = start; i < end; ++i) {\n out += toHex(buf[i])\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n var bytes = buf.slice(start, end)\n var res = ''\n for (var i = 0; i < bytes.length; i += 2) {\n res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n var len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n var newBuf\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n newBuf = this.subarray(start, end)\n newBuf.__proto__ = Buffer.prototype\n } else {\n var sliceLen = end - start\n newBuf = new Buffer(sliceLen, undefined)\n for (var i = 0; i < sliceLen; ++i) {\n newBuf[i] = this[i + start]\n }\n }\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n var val = this[offset + --byteLength]\n var mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var i = byteLength\n var mul = 1\n var val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var mul = 1\n var i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var i = byteLength - 1\n var mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nfunction objectWriteUInt16 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {\n buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>\n (littleEndian ? i : 1 - i) * 8\n }\n}\n\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nfunction objectWriteUInt32 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffffffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {\n buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff\n }\n}\n\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = 0\n var mul = 1\n var sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = byteLength - 1\n var mul = 1\n var sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n var len = end - start\n var i\n\n if (this === target && start < targetStart && targetStart < end) {\n // descending copy from end\n for (i = len - 1; i >= 0; --i) {\n target[i + targetStart] = this[i + start]\n }\n } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {\n // ascending copy from start\n for (i = 0; i < len; ++i) {\n target[i + targetStart] = this[i + start]\n }\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, start + len),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (val.length === 1) {\n var code = val.charCodeAt(0)\n if (code < 256) {\n val = code\n }\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n } else if (typeof val === 'number') {\n val = val & 255\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n var i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n var bytes = Buffer.isBuffer(val)\n ? val\n : utf8ToBytes(new Buffer(val, encoding).toString())\n var len = bytes.length\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// HELPER FUNCTIONS\n// ================\n\nvar INVALID_BASE64_RE = /[^+\\/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = stringtrim(str).replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction stringtrim (str) {\n if (str.trim) return str.trim()\n return str.replace(/^\\s+|\\s+$/g, '')\n}\n\nfunction toHex (n) {\n if (n < 16) return '0' + n.toString(16)\n return n.toString(16)\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n var codePoint\n var length = string.length\n var leadSurrogate = null\n var bytes = []\n\n for (var i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n var c, hi, lo\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n for (var i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\nfunction isnan (val) {\n return val !== val // eslint-disable-line no-self-compare\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/jonny/git/jonnybarnes.uk/~/buffer/index.js\n// module id = 6\n// module chunks = 0 1","var toString = {}.toString;\n\nmodule.exports = Array.isArray || function (arr) {\n return toString.call(arr) == '[object Array]';\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/jonny/git/jonnybarnes.uk/~/buffer/~/isarray/index.js\n// module id = 7\n// module chunks = 0 1","exports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = nBytes * 8 - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = nBytes * 8 - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = (value * c - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/jonny/git/jonnybarnes.uk/~/ieee754/index.js\n// module id = 8\n// module chunks = 0 1","(function(f){if(typeof exports===\"object\"&&typeof module!==\"undefined\"){module.exports=f()}else if(typeof define===\"function\"&&define.amd){define([],f)}else{var g;if(typeof window!==\"undefined\"){g=window}else if(typeof global!==\"undefined\"){g=global}else if(typeof self!==\"undefined\"){g=self}else{g=this}g.mapboxgl = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o0){for(var o=0,a=0,u=0;uh.maxh||t>h.maxw||i<=h.maxh&&t<=h.maxw&&(r=h.maxw*h.maxh-t*i,rn.free)){if(i===n.h)return this.allocShelf(f,t,i,s);i>n.h||ic)&&(p=2*Math.max(t,c)),(uu)&&(l=2*Math.max(i,u)),this.resize(p,l),this.packOne(t,i,s)}return null},t.prototype.allocFreebin=function(t,e,i,s){var h=this.freebins.splice(t,1)[0];return h.id=s,h.w=e,h.h=i,h.refcount=0,this.bins[s]=h,this.ref(h),h},t.prototype.allocShelf=function(t,e,i,s){var h=this.shelves[t],n=h.alloc(e,i,s);return this.bins[s]=n,this.ref(n),n},t.prototype.getBin=function(t){return this.bins[t]},t.prototype.ref=function(t){if(1===++t.refcount){var e=t.h;this.stats[e]=(0|this.stats[e])+1}return t.refcount},t.prototype.unref=function(t){return 0===t.refcount?0:(0===--t.refcount&&(this.stats[t.h]--,delete this.bins[t.id],this.freebins.push(t)),t.refcount)},t.prototype.clear=function(){this.shelves=[],this.freebins=[],this.stats={},this.bins={},this.maxId=0},t.prototype.resize=function(t,e){this.w=t,this.h=e;for(var i=0;ithis.free||e>this.h)return null;var h=this.x;return this.x+=t,this.free-=t,new i(s,h,this.y,t,e,t,this.h)},e.prototype.resize=function(t){return this.free+=t-this.w,this.w=t,!0},t});\n},{}],3:[function(require,module,exports){\nfunction UnitBezier(t,i,e,r){this.cx=3*t,this.bx=3*(e-t)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*i,this.by=3*(r-i)-this.cy,this.ay=1-this.cy-this.by,this.p1x=t,this.p1y=r,this.p2x=e,this.p2y=r}module.exports=UnitBezier,UnitBezier.prototype.sampleCurveX=function(t){return((this.ax*t+this.bx)*t+this.cx)*t},UnitBezier.prototype.sampleCurveY=function(t){return((this.ay*t+this.by)*t+this.cy)*t},UnitBezier.prototype.sampleCurveDerivativeX=function(t){return(3*this.ax*t+2*this.bx)*t+this.cx},UnitBezier.prototype.solveCurveX=function(t,i){\"undefined\"==typeof i&&(i=1e-6);var e,r,s,h,n;for(s=t,n=0;n<8;n++){if(h=this.sampleCurveX(s)-t,Math.abs(h)r)return r;for(;eh?e=s:r=s,s=.5*(r-e)+e}return s},UnitBezier.prototype.solve=function(t,i){return this.sampleCurveY(this.solveCurveX(t,i))};\n},{}],4:[function(require,module,exports){\n!function(e,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?t(exports):\"function\"==typeof define&&define.amd?define([\"exports\"],t):t(e.WhooTS=e.WhooTS||{})}(this,function(e){function t(e,t,r,n,i,s){s=s||{};var f=e+\"?\"+[\"bbox=\"+o(r,n,i),\"format=\"+(s.format||\"image/png\"),\"service=\"+(s.service||\"WMS\"),\"version=\"+(s.version||\"1.1.1\"),\"request=\"+(s.request||\"GetMap\"),\"srs=\"+(s.srs||\"EPSG:3857\"),\"width=\"+(s.width||256),\"height=\"+(s.height||256),\"layers=\"+t].join(\"&\");return f}function o(e,t,o){t=Math.pow(2,o)-t-1;var n=r(256*e,256*t,o),i=r(256*(e+1),256*(t+1),o);return n[0]+\",\"+n[1]+\",\"+i[0]+\",\"+i[1]}function r(e,t,o){var r=2*Math.PI*6378137/256/Math.pow(2,o),n=e*r-2*Math.PI*6378137/2,i=t*r-2*Math.PI*6378137/2;return[n,i]}e.getURL=t,e.getTileBBox=o,e.getMercCoords=r,Object.defineProperty(e,\"__esModule\",{value:!0})});\n},{}],5:[function(require,module,exports){\n\"use strict\";function earcut(e,n,r){r=r||2;var t=n&&n.length,i=t?n[0]*r:e.length,x=linkedList(e,0,i,r,!0),a=[];if(!x)return a;var o,l,u,s,v,f,y;if(t&&(x=eliminateHoles(e,n,x,r)),e.length>80*r){o=u=e[0],l=s=e[1];for(var d=r;du&&(u=v),f>s&&(s=f);y=Math.max(u-o,s-l)}return earcutLinked(x,a,r,o,l,y),a}function linkedList(e,n,r,t,i){var x,a;if(i===signedArea(e,n,r,t)>0)for(x=n;x=n;x-=t)a=insertNode(x,e[x],e[x+1],a);return a&&equals(a,a.next)&&(removeNode(a),a=a.next),a}function filterPoints(e,n){if(!e)return e;n||(n=e);var r,t=e;do if(r=!1,t.steiner||!equals(t,t.next)&&0!==area(t.prev,t,t.next))t=t.next;else{if(removeNode(t),t=n=t.prev,t===t.next)return null;r=!0}while(r||t!==n);return n}function earcutLinked(e,n,r,t,i,x,a){if(e){!a&&x&&indexCurve(e,t,i,x);for(var o,l,u=e;e.prev!==e.next;)if(o=e.prev,l=e.next,x?isEarHashed(e,t,i,x):isEar(e))n.push(o.i/r),n.push(e.i/r),n.push(l.i/r),removeNode(e),e=l.next,u=l.next;else if(e=l,e===u){a?1===a?(e=cureLocalIntersections(e,n,r),earcutLinked(e,n,r,t,i,x,2)):2===a&&splitEarcut(e,n,r,t,i,x):earcutLinked(filterPoints(e),n,r,t,i,x,1);break}}}function isEar(e){var n=e.prev,r=e,t=e.next;if(area(n,r,t)>=0)return!1;for(var i=e.next.next;i!==e.prev;){if(pointInTriangle(n.x,n.y,r.x,r.y,t.x,t.y,i.x,i.y)&&area(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function isEarHashed(e,n,r,t){var i=e.prev,x=e,a=e.next;if(area(i,x,a)>=0)return!1;for(var o=i.xx.x?i.x>a.x?i.x:a.x:x.x>a.x?x.x:a.x,s=i.y>x.y?i.y>a.y?i.y:a.y:x.y>a.y?x.y:a.y,v=zOrder(o,l,n,r,t),f=zOrder(u,s,n,r,t),y=e.nextZ;y&&y.z<=f;){if(y!==e.prev&&y!==e.next&&pointInTriangle(i.x,i.y,x.x,x.y,a.x,a.y,y.x,y.y)&&area(y.prev,y,y.next)>=0)return!1;y=y.nextZ}for(y=e.prevZ;y&&y.z>=v;){if(y!==e.prev&&y!==e.next&&pointInTriangle(i.x,i.y,x.x,x.y,a.x,a.y,y.x,y.y)&&area(y.prev,y,y.next)>=0)return!1;y=y.prevZ}return!0}function cureLocalIntersections(e,n,r){var t=e;do{var i=t.prev,x=t.next.next;!equals(i,x)&&intersects(i,t,t.next,x)&&locallyInside(i,x)&&locallyInside(x,i)&&(n.push(i.i/r),n.push(t.i/r),n.push(x.i/r),removeNode(t),removeNode(t.next),t=e=x),t=t.next}while(t!==e);return t}function splitEarcut(e,n,r,t,i,x){var a=e;do{for(var o=a.next.next;o!==a.prev;){if(a.i!==o.i&&isValidDiagonal(a,o)){var l=splitPolygon(a,o);return a=filterPoints(a,a.next),l=filterPoints(l,l.next),earcutLinked(a,n,r,t,i,x),void earcutLinked(l,n,r,t,i,x)}o=o.next}a=a.next}while(a!==e)}function eliminateHoles(e,n,r,t){var i,x,a,o,l,u=[];for(i=0,x=n.length;i=t.next.y){var o=t.x+(x-t.y)*(t.next.x-t.x)/(t.next.y-t.y);if(o<=i&&o>a){if(a=o,o===i){if(x===t.y)return t;if(x===t.next.y)return t.next}r=t.x=t.x&&t.x>=s&&pointInTriangle(xr.x)&&locallyInside(t,e)&&(r=t,f=l)),t=t.next;return r}function indexCurve(e,n,r,t){var i=e;do null===i.z&&(i.z=zOrder(i.x,i.y,n,r,t)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next;while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,sortLinked(i)}function sortLinked(e){var n,r,t,i,x,a,o,l,u=1;do{for(r=e,e=null,x=null,a=0;r;){for(a++,t=r,o=0,n=0;n0||l>0&&t;)0===o?(i=t,t=t.nextZ,l--):0!==l&&t?r.z<=t.z?(i=r,r=r.nextZ,o--):(i=t,t=t.nextZ,l--):(i=r,r=r.nextZ,o--),x?x.nextZ=i:e=i,i.prevZ=x,x=i;r=t}x.nextZ=null,u*=2}while(a>1);return e}function zOrder(e,n,r,t,i){return e=32767*(e-r)/i,n=32767*(n-t)/i,e=16711935&(e|e<<8),e=252645135&(e|e<<4),e=858993459&(e|e<<2),e=1431655765&(e|e<<1),n=16711935&(n|n<<8),n=252645135&(n|n<<4),n=858993459&(n|n<<2),n=1431655765&(n|n<<1),e|n<<1}function getLeftmost(e){var n=e,r=e;do n.x=0&&(e-a)*(t-o)-(r-a)*(n-o)>=0&&(r-a)*(x-o)-(i-a)*(t-o)>=0}function isValidDiagonal(e,n){return e.next.i!==n.i&&e.prev.i!==n.i&&!intersectsPolygon(e,n)&&locallyInside(e,n)&&locallyInside(n,e)&&middleInside(e,n)}function area(e,n,r){return(n.y-e.y)*(r.x-n.x)-(n.x-e.x)*(r.y-n.y)}function equals(e,n){return e.x===n.x&&e.y===n.y}function intersects(e,n,r,t){return!!(equals(e,n)&&equals(r,t)||equals(e,t)&&equals(r,n))||area(e,n,r)>0!=area(e,n,t)>0&&area(r,t,e)>0!=area(r,t,n)>0}function intersectsPolygon(e,n){var r=e;do{if(r.i!==e.i&&r.next.i!==e.i&&r.i!==n.i&&r.next.i!==n.i&&intersects(r,r.next,e,n))return!0;r=r.next}while(r!==e);return!1}function locallyInside(e,n){return area(e.prev,e,e.next)<0?area(e,n,e.next)>=0&&area(e,e.prev,n)>=0:area(e,n,e.prev)<0||area(e,e.next,n)<0}function middleInside(e,n){var r=e,t=!1,i=(e.x+n.x)/2,x=(e.y+n.y)/2;do r.y>x!=r.next.y>x&&i<(r.next.x-r.x)*(x-r.y)/(r.next.y-r.y)+r.x&&(t=!t),r=r.next;while(r!==e);return t}function splitPolygon(e,n){var r=new Node(e.i,e.x,e.y),t=new Node(n.i,n.x,n.y),i=e.next,x=n.prev;return e.next=n,n.prev=e,r.next=i,i.prev=r,t.next=r,r.prev=t,x.next=t,t.prev=x,t}function insertNode(e,n,r,t){var i=new Node(e,n,r);return t?(i.next=t.next,i.prev=t,t.next.prev=i,t.next=i):(i.prev=i,i.next=i),i}function removeNode(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function Node(e,n,r){this.i=e,this.x=n,this.y=r,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function signedArea(e,n,r,t){for(var i=0,x=n,a=r-t;x0&&(t+=e[i-1].length,r.holes.push(t))}return r};\n},{}],6:[function(require,module,exports){\nfunction geometry(r){if(\"Polygon\"===r.type)return polygonArea(r.coordinates);if(\"MultiPolygon\"===r.type){for(var e=0,n=0;n0){e+=Math.abs(ringArea(r[0]));for(var n=1;n2){for(var n,t,o=0;o=0}var geojsonArea=require(\"geojson-area\");module.exports=rewind;\n},{\"geojson-area\":6}],8:[function(require,module,exports){\n\"use strict\";function clip(e,r,t,n,u,i,l,s){if(t/=r,n/=r,l>=t&&s<=n)return e;if(l>n||s=t&&c<=n)h.push(o);else if(!(a>n||c=r&&s<=t&&u.push(l)}return u}function clipGeometry(e,r,t,n,u,i){for(var l=[],s=0;st?(d.push(u(h,f,r),u(h,f,t)),i||(d=newSlice(l,d,v,m,w))):o>=r&&d.push(u(h,f,r)):c>t?ot&&(d.push(u(h,f,t)),i||(d=newSlice(l,d,v,m,w))));h=g[S-1],c=h[n],c>=r&&c<=t&&d.push(h),a=d[d.length-1],i&&a&&(d[0][0]!==a[0]||d[0][1]!==a[1])&&d.push(d[0]),newSlice(l,d,v,m,w)}return l}function newSlice(e,r,t,n,u){return r.length&&(r.area=t,r.dist=n,void 0!==u&&(r.outer=u),e.push(r)),[]}module.exports=clip;var createFeature=require(\"./feature\");\n},{\"./feature\":10}],9:[function(require,module,exports){\n\"use strict\";function convert(e,t){var r=[];if(\"FeatureCollection\"===e.type)for(var o=0;o1?1:o,[r,o,0]}function calcSize(e){for(var t,r,o=0,a=0,i=0;i1)return!1;var r=n.geometry[0].length;if(5!==r)return!1;for(var s=0;s1&&console.time(\"creation\"),m=this.tiles[d]=createTile(e,p,i,o,f,t===a.maxZoom),this.tileCoords.push({z:t,x:i,y:o}),u)){u>1&&(console.log(\"tile z%d-%d-%d (features: %d, points: %d, simplified: %d)\",t,i,o,m.numFeatures,m.numPoints,m.numSimplified),console.timeEnd(\"creation\"));var h=\"z\"+t;this.stats[h]=(this.stats[h]||0)+1,this.total++}if(m.source=e,n){if(t===a.maxZoom||t===n)continue;var x=1<1&&console.time(\"clipping\");var g,v,M,T,b,y,S=.5*a.buffer/a.extent,Z=.5-S,q=.5+S,w=1+S;g=v=M=T=null,b=clip(e,p,i-S,i+q,0,intersectX,m.min[0],m.max[0]),y=clip(e,p,i+Z,i+w,0,intersectX,m.min[0],m.max[0]),b&&(g=clip(b,p,o-S,o+q,1,intersectY,m.min[1],m.max[1]),v=clip(b,p,o+Z,o+w,1,intersectY,m.min[1],m.max[1])),y&&(M=clip(y,p,o-S,o+q,1,intersectY,m.min[1],m.max[1]),T=clip(y,p,o+Z,o+w,1,intersectY,m.min[1],m.max[1])),u>1&&console.timeEnd(\"clipping\"),e.length&&(l.push(g||[],t+1,2*i,2*o),l.push(v||[],t+1,2*i,2*o+1),l.push(M||[],t+1,2*i+1,2*o),l.push(T||[],t+1,2*i+1,2*o+1))}else n&&(c=t)}return c},GeoJSONVT.prototype.getTile=function(e,t,i){var o=this.options,n=o.extent,r=o.debug,s=1<1&&console.log(\"drilling down to z%d-%d-%d\",e,t,i);for(var a,u=e,c=t,p=i;!a&&u>0;)u--,c=Math.floor(c/2),p=Math.floor(p/2),a=this.tiles[toID(u,c,p)];if(!a||!a.source)return null;if(r>1&&console.log(\"found parent tile z%d-%d-%d\",u,c,p),isClippedSquare(a,n,o.buffer))return transform.tile(a,n);r>1&&console.time(\"drilling down\");var d=this.splitTile(a.source,u,c,p,e,t,i);if(r>1&&console.timeEnd(\"drilling down\"),null!==d){var m=1<p&&(s=e,p=r);p>o?(t[s][2]=p,g.push(u),g.push(s),u=s):(n=g.pop(),u=g.pop())}}function getSqSegDist(t,i,e){var p=i[0],r=i[1],s=e[0],o=e[1],f=t[0],u=t[1],n=s-p,g=o-r;if(0!==n||0!==g){var l=((f-p)*n+(u-r)*g)/(n*n+g*g);l>1?(p=s,r=o):l>0&&(p+=n*l,r+=g*l)}return n=f-p,g=u-r,n*n+g*g}module.exports=simplify;\n},{}],13:[function(require,module,exports){\n\"use strict\";function createTile(e,n,r,i,t,u){for(var a={features:[],numPoints:0,numSimplified:0,numFeatures:0,source:null,x:r,y:i,z2:n,transformed:!1,min:[2,1],max:[-1,0]},m=0;ma.max[0]&&(a.max[0]=l[0]),l[1]>a.max[1]&&(a.max[1]=l[1])}return a}function addFeature(e,n,r,i){var t,u,a,m,s=n.geometry,l=n.type,o=[],f=r*r;if(1===l)for(t=0;tf)&&(d.push(m),e.numSimplified++),e.numPoints++;3===l&&rewind(d,a.outer),o.push(d)}else e.numPoints+=a.length;if(o.length){var g={geometry:o,type:l,tags:n.tags||null};null!==n.id&&(g.id=n.id),e.features.push(g)}}function rewind(e,n){var r=signedArea(e);r<0===n&&e.reverse()}function signedArea(e){for(var n,r,i=0,t=0,u=e.length,a=u-1;t=a[u+0]&&s>=a[u+1]?(n[f]=!0,h.push(l[f])):n[f]=!1}}},GridIndex.prototype._forEachCell=function(t,r,e,s,i,h,n){for(var o=this._convertToCellCoord(t),l=this._convertToCellCoord(r),a=this._convertToCellCoord(e),d=this._convertToCellCoord(s),f=o;f<=a;f++)for(var u=l;u<=d;u++){var y=this.d*u+f;if(i.call(this,t,r,e,s,y,h,n))return}},GridIndex.prototype._convertToCellCoord=function(t){return Math.max(0,Math.min(this.d-1,Math.floor(t*this.scale)+this.padding))},GridIndex.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var t=this.cells,r=NUM_PARAMS+this.cells.length+1+1,e=0,s=0;s>1,i=-7,N=t?h-1:0,n=t?-1:1,s=a[o+N];for(N+=n,M=s&(1<<-i)-1,s>>=-i,i+=w;i>0;M=256*M+a[o+N],N+=n,i-=8);for(p=M&(1<<-i)-1,M>>=-i,i+=r;i>0;p=256*p+a[o+N],N+=n,i-=8);if(0===M)M=1-e;else{if(M===f)return p?NaN:(s?-1:1)*(1/0);p+=Math.pow(2,r),M-=e}return(s?-1:1)*p*Math.pow(2,M-r)},exports.write=function(a,o,t,r,h,M){var p,w,f,e=8*M-h-1,i=(1<>1,n=23===h?Math.pow(2,-24)-Math.pow(2,-77):0,s=r?0:M-1,u=r?1:-1,l=o<0||0===o&&1/o<0?1:0;for(o=Math.abs(o),isNaN(o)||o===1/0?(w=isNaN(o)?1:0,p=i):(p=Math.floor(Math.log(o)/Math.LN2),o*(f=Math.pow(2,-p))<1&&(p--,f*=2),o+=p+N>=1?n/f:n*Math.pow(2,1-N),o*f>=2&&(p++,f/=2),p+N>=i?(w=0,p=i):p+N>=1?(w=(o*f-1)*Math.pow(2,h),p+=N):(w=o*Math.pow(2,N-1)*Math.pow(2,h),p=0));h>=8;a[t+s]=255&w,s+=u,w/=256,h-=8);for(p=p<0;a[t+s]=255&p,s+=u,p/=256,e-=8);a[t+s-u]|=128*l};\n},{}],18:[function(require,module,exports){\n\"use strict\";function kdbush(t,i,e,s,n){return new KDBush(t,i,e,s,n)}function KDBush(t,i,e,s,n){i=i||defaultGetX,e=e||defaultGetY,n=n||Array,this.nodeSize=s||64,this.points=t,this.ids=new n(t.length),this.coords=new n(2*t.length);for(var r=0;r=s&&a<=h&&t>=u&&t<=e&&f.push(p[i]);else{var c=Math.floor((g+v)/2);a=r[2*c],t=r[2*c+1],a>=s&&a<=h&&t>=u&&t<=e&&f.push(p[c]);var d=(l+1)%2;(0===l?s<=a:u<=t)&&(n.push(g),n.push(c-1),n.push(d)),(0===l?h>=a:e>=t)&&(n.push(c+1),n.push(v),n.push(d))}}return f}module.exports=range;\n},{}],20:[function(require,module,exports){\n\"use strict\";function sortKD(t,a,o,s,r,e){if(!(r-s<=o)){var f=Math.floor((s+r)/2);select(t,a,f,s,r,e%2),sortKD(t,a,o,s,f-1,e+1),sortKD(t,a,o,f+1,r,e+1)}}function select(t,a,o,s,r,e){for(;r>s;){if(r-s>600){var f=r-s+1,p=o-s+1,w=Math.log(f),m=.5*Math.exp(2*w/3),n=.5*Math.sqrt(w*m*(f-m)/f)*(p-f/2<0?-1:1),c=Math.max(s,Math.floor(o-p*m/f+n)),h=Math.min(r,Math.floor(o+(f-p)*m/f+n));select(t,a,o,c,h,e)}var i=a[2*o+e],l=s,M=r;for(swapItem(t,a,s,o),a[2*r+e]>i&&swapItem(t,a,s,r);li;)M--}a[2*s+e]===i?swapItem(t,a,s,M):(M++,swapItem(t,a,M,r)),M<=o&&(s=M+1),o<=M&&(r=M-1)}}function swapItem(t,a,o,s){swap(t,o,s),swap(a,2*o,2*s),swap(a,2*o+1,2*s+1)}function swap(t,a,o){var s=t[a];t[a]=t[o],t[o]=s}module.exports=sortKD;\n},{}],21:[function(require,module,exports){\n\"use strict\";function within(s,p,r,t,u,h){for(var i=[0,s.length-1,0],o=[],n=u*u;i.length;){var e=i.pop(),a=i.pop(),f=i.pop();if(a-f<=h)for(var v=f;v<=a;v++)sqDist(p[2*v],p[2*v+1],r,t)<=n&&o.push(s[v]);else{var l=Math.floor((f+a)/2),c=p[2*l],q=p[2*l+1];sqDist(c,q,r,t)<=n&&o.push(s[l]);var D=(e+1)%2;(0===e?r-u<=c:t-u<=q)&&(i.push(f),i.push(l-1),i.push(D)),(0===e?r+u>=c:t+u>=q)&&(i.push(l+1),i.push(a),i.push(D))}}return o}function sqDist(s,p,r,t){var u=s-r,h=p-t;return u*u+h*h}module.exports=within;\n},{}],22:[function(require,module,exports){\n\"use strict\";function isSupported(e){return!!(isBrowser()&&isArraySupported()&&isFunctionSupported()&&isObjectSupported()&&isJSONSupported()&&isWorkerSupported()&&isUint8ClampedArraySupported()&&isWebGLSupportedCached(e&&e.failIfMajorPerformanceCaveat))}function isBrowser(){return\"undefined\"!=typeof window&&\"undefined\"!=typeof document}function isArraySupported(){return Array.prototype&&Array.prototype.every&&Array.prototype.filter&&Array.prototype.forEach&&Array.prototype.indexOf&&Array.prototype.lastIndexOf&&Array.prototype.map&&Array.prototype.some&&Array.prototype.reduce&&Array.prototype.reduceRight&&Array.isArray}function isFunctionSupported(){return Function.prototype&&Function.prototype.bind}function isObjectSupported(){return Object.keys&&Object.create&&Object.getPrototypeOf&&Object.getOwnPropertyNames&&Object.isSealed&&Object.isFrozen&&Object.isExtensible&&Object.getOwnPropertyDescriptor&&Object.defineProperty&&Object.defineProperties&&Object.seal&&Object.freeze&&Object.preventExtensions}function isJSONSupported(){return\"JSON\"in window&&\"parse\"in JSON&&\"stringify\"in JSON}function isWorkerSupported(){return\"Worker\"in window}function isUint8ClampedArraySupported(){return\"Uint8ClampedArray\"in window}function isWebGLSupportedCached(e){return void 0===isWebGLSupportedCache[e]&&(isWebGLSupportedCache[e]=isWebGLSupported(e)),isWebGLSupportedCache[e]}function isWebGLSupported(e){var t=document.createElement(\"canvas\"),r=Object.create(isSupported.webGLContextAttributes);return r.failIfMajorPerformanceCaveat=e,t.probablySupportsContext?t.probablySupportsContext(\"webgl\",r)||t.probablySupportsContext(\"experimental-webgl\",r):t.supportsContext?t.supportsContext(\"webgl\",r)||t.supportsContext(\"experimental-webgl\",r):t.getContext(\"webgl\",r)||t.getContext(\"experimental-webgl\",r)}\"undefined\"!=typeof module&&module.exports?module.exports=isSupported:window&&(window.mapboxgl=window.mapboxgl||{},window.mapboxgl.supported=isSupported);var isWebGLSupportedCache={};isSupported.webGLContextAttributes={antialias:!1,alpha:!0,stencil:!0,depth:!0};\n},{}],23:[function(require,module,exports){\n(function (process){\nfunction normalizeArray(r,t){for(var e=0,n=r.length-1;n>=0;n--){var s=r[n];\".\"===s?r.splice(n,1):\"..\"===s?(r.splice(n,1),e++):e&&(r.splice(n,1),e--)}if(t)for(;e--;e)r.unshift(\"..\");return r}function filter(r,t){if(r.filter)return r.filter(t);for(var e=[],n=0;n=-1&&!t;e--){var n=e>=0?arguments[e]:process.cwd();if(\"string\"!=typeof n)throw new TypeError(\"Arguments to path.resolve must be strings\");n&&(r=n+\"/\"+r,t=\"/\"===n.charAt(0))}return r=normalizeArray(filter(r.split(\"/\"),function(r){return!!r}),!t).join(\"/\"),(t?\"/\":\"\")+r||\".\"},exports.normalize=function(r){var t=exports.isAbsolute(r),e=\"/\"===substr(r,-1);return r=normalizeArray(filter(r.split(\"/\"),function(r){return!!r}),!t).join(\"/\"),r||t||(r=\".\"),r&&e&&(r+=\"/\"),(t?\"/\":\"\")+r},exports.isAbsolute=function(r){return\"/\"===r.charAt(0)},exports.join=function(){var r=Array.prototype.slice.call(arguments,0);return exports.normalize(filter(r,function(r,t){if(\"string\"!=typeof r)throw new TypeError(\"Arguments to path.join must be strings\");return r}).join(\"/\"))},exports.relative=function(r,t){function e(r){for(var t=0;t=0&&\"\"===r[e];e--);return t>e?[]:r.slice(t,e-t+1)}r=exports.resolve(r).substr(1),t=exports.resolve(t).substr(1);for(var n=e(r.split(\"/\")),s=e(t.split(\"/\")),i=Math.min(n.length,s.length),o=i,u=0;u55295&&e<57344){if(!r){e>56319||o+1===n?i.push(239,191,189):r=e;continue}if(e<56320){i.push(239,191,189),r=e;continue}e=r-55296<<10|e-56320|65536,r=null}else r&&(i.push(239,191,189),r=null);e<128?i.push(e):e<2048?i.push(e>>6|192,63&e|128):e<65536?i.push(e>>12|224,e>>6&63|128,63&e|128):i.push(e>>18|240,e>>12&63|128,e>>6&63|128,63&e|128)}return i}module.exports=Buffer;var ieee754=require(\"ieee754\"),BufferMethods,lastStr,lastStrEncoded;BufferMethods={readUInt32LE:function(t){return(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},writeUInt32LE:function(t,e){this[e]=t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24},readInt32LE:function(t){return(this[t]|this[t+1]<<8|this[t+2]<<16)+(this[t+3]<<24)},readFloatLE:function(t){return ieee754.read(this,t,!0,23,4)},readDoubleLE:function(t){return ieee754.read(this,t,!0,52,8)},writeFloatLE:function(t,e){return ieee754.write(this,t,e,!0,23,4)},writeDoubleLE:function(t,e){return ieee754.write(this,t,e,!0,52,8)},toString:function(t,e,r){var n=\"\",i=\"\";e=e||0,r=Math.min(this.length,r||this.length);for(var o=e;o=1;){if(i.pos>=e)throw new Error(\"Given varint doesn't fit into 10 bytes\");var r=255&t;i.buf[i.pos++]=r|(t>=128?128:0),t/=128}}function reallocForRawMessage(t,i,e){var r=i<=16383?1:i<=2097151?2:i<=268435455?3:Math.ceil(Math.log(i)/(7*Math.LN2));e.realloc(r);for(var s=e.pos-1;s>=t;s--)e.buf[s+r]=e.buf[s]}function writePackedVarint(t,i){for(var e=0;e>3,n=this.pos;t(s,i,this),this.pos===n&&this.skip(r)}return i},readMessage:function(t,i){return this.readFields(t,i,this.readVarint()+this.pos)},readFixed32:function(){var t=this.buf.readUInt32LE(this.pos);return this.pos+=4,t},readSFixed32:function(){var t=this.buf.readInt32LE(this.pos);return this.pos+=4,t},readFixed64:function(){var t=this.buf.readUInt32LE(this.pos)+this.buf.readUInt32LE(this.pos+4)*SHIFT_LEFT_32;return this.pos+=8,t},readSFixed64:function(){var t=this.buf.readUInt32LE(this.pos)+this.buf.readInt32LE(this.pos+4)*SHIFT_LEFT_32;return this.pos+=8,t},readFloat:function(){var t=this.buf.readFloatLE(this.pos);return this.pos+=4,t},readDouble:function(){var t=this.buf.readDoubleLE(this.pos);return this.pos+=8,t},readVarint:function(){var t,i,e=this.buf;return i=e[this.pos++],t=127&i,i<128?t:(i=e[this.pos++],t|=(127&i)<<7,i<128?t:(i=e[this.pos++],t|=(127&i)<<14,i<128?t:(i=e[this.pos++],t|=(127&i)<<21,i<128?t:readVarintRemainder(t,this))))},readVarint64:function(){var t=this.pos,i=this.readVarint();if(i127;);else if(i===Pbf.Bytes)this.pos=this.readVarint()+this.pos;else if(i===Pbf.Fixed32)this.pos+=4;else{if(i!==Pbf.Fixed64)throw new Error(\"Unimplemented type: \"+i);this.pos+=8}},writeTag:function(t,i){this.writeVarint(t<<3|i)},realloc:function(t){for(var i=this.length||16;i268435455?void writeBigVarint(t,this):(this.realloc(4),this.buf[this.pos++]=127&t|(t>127?128:0),void(t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=t>>>7&127)))))},writeSVarint:function(t){this.writeVarint(t<0?2*-t-1:2*t)},writeBoolean:function(t){this.writeVarint(Boolean(t))},writeString:function(t){t=String(t);var i=Buffer.byteLength(t);this.writeVarint(i),this.realloc(i),this.buf.write(t,this.pos),this.pos+=i},writeFloat:function(t){this.realloc(4),this.buf.writeFloatLE(t,this.pos),this.pos+=4},writeDouble:function(t){this.realloc(8),this.buf.writeDoubleLE(t,this.pos),this.pos+=8},writeBytes:function(t){var i=t.length;this.writeVarint(i),this.realloc(i);for(var e=0;e=128&&reallocForRawMessage(e,r,this),this.pos=e-1,this.writeVarint(r),this.pos+=r},writeMessage:function(t,i,e){this.writeTag(t,Pbf.Bytes),this.writeRawMessage(i,e)},writePackedVarint:function(t,i){this.writeMessage(t,writePackedVarint,i)},writePackedSVarint:function(t,i){this.writeMessage(t,writePackedSVarint,i)},writePackedBoolean:function(t,i){this.writeMessage(t,writePackedBoolean,i)},writePackedFloat:function(t,i){this.writeMessage(t,writePackedFloat,i)},writePackedDouble:function(t,i){this.writeMessage(t,writePackedDouble,i)},writePackedFixed32:function(t,i){this.writeMessage(t,writePackedFixed32,i)},writePackedSFixed32:function(t,i){this.writeMessage(t,writePackedSFixed32,i)},writePackedFixed64:function(t,i){this.writeMessage(t,writePackedFixed64,i)},writePackedSFixed64:function(t,i){this.writeMessage(t,writePackedSFixed64,i)},writeBytesField:function(t,i){this.writeTag(t,Pbf.Bytes),this.writeBytes(i)},writeFixed32Field:function(t,i){this.writeTag(t,Pbf.Fixed32),this.writeFixed32(i)},writeSFixed32Field:function(t,i){this.writeTag(t,Pbf.Fixed32),this.writeSFixed32(i)},writeFixed64Field:function(t,i){this.writeTag(t,Pbf.Fixed64),this.writeFixed64(i)},writeSFixed64Field:function(t,i){this.writeTag(t,Pbf.Fixed64),this.writeSFixed64(i)},writeVarintField:function(t,i){this.writeTag(t,Pbf.Varint),this.writeVarint(i)},writeSVarintField:function(t,i){this.writeTag(t,Pbf.Varint),this.writeSVarint(i)},writeStringField:function(t,i){this.writeTag(t,Pbf.Bytes),this.writeString(i)},writeFloatField:function(t,i){this.writeTag(t,Pbf.Fixed32),this.writeFloat(i)},writeDoubleField:function(t,i){this.writeTag(t,Pbf.Fixed64),this.writeDouble(i)},writeBooleanField:function(t,i){this.writeVarintField(t,Boolean(i))}};\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n\n},{\"./buffer\":24}],26:[function(require,module,exports){\n\"use strict\";function Point(t,n){this.x=t,this.y=n}module.exports=Point,Point.prototype={clone:function(){return new Point(this.x,this.y)},add:function(t){return this.clone()._add(t)},sub:function(t){return this.clone()._sub(t)},mult:function(t){return this.clone()._mult(t)},div:function(t){return this.clone()._div(t)},rotate:function(t){return this.clone()._rotate(t)},matMult:function(t){return this.clone()._matMult(t)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(t){return this.x===t.x&&this.y===t.y},dist:function(t){return Math.sqrt(this.distSqr(t))},distSqr:function(t){var n=t.x-this.x,i=t.y-this.y;return n*n+i*i},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(t){return Math.atan2(this.y-t.y,this.x-t.x)},angleWith:function(t){return this.angleWithSep(t.x,t.y)},angleWithSep:function(t,n){return Math.atan2(this.x*n-this.y*t,this.x*t+this.y*n)},_matMult:function(t){var n=t[0]*this.x+t[1]*this.y,i=t[2]*this.x+t[3]*this.y;return this.x=n,this.y=i,this},_add:function(t){return this.x+=t.x,this.y+=t.y,this},_sub:function(t){return this.x-=t.x,this.y-=t.y,this},_mult:function(t){return this.x*=t,this.y*=t,this},_div:function(t){return this.x/=t,this.y/=t,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var t=this.y;return this.y=this.x,this.x=-t,this},_rotate:function(t){var n=Math.cos(t),i=Math.sin(t),s=n*this.x-i*this.y,r=i*this.x+n*this.y;return this.x=s,this.y=r,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},Point.convert=function(t){return t instanceof Point?t:Array.isArray(t)?new Point(t[0],t[1]):t};\n},{}],27:[function(require,module,exports){\nfunction defaultSetTimout(){throw new Error(\"setTimeout has not been defined\")}function defaultClearTimeout(){throw new Error(\"clearTimeout has not been defined\")}function runTimeout(e){if(cachedSetTimeout===setTimeout)return setTimeout(e,0);if((cachedSetTimeout===defaultSetTimout||!cachedSetTimeout)&&setTimeout)return cachedSetTimeout=setTimeout,setTimeout(e,0);try{return cachedSetTimeout(e,0)}catch(t){try{return cachedSetTimeout.call(null,e,0)}catch(t){return cachedSetTimeout.call(this,e,0)}}}function runClearTimeout(e){if(cachedClearTimeout===clearTimeout)return clearTimeout(e);if((cachedClearTimeout===defaultClearTimeout||!cachedClearTimeout)&&clearTimeout)return cachedClearTimeout=clearTimeout,clearTimeout(e);try{return cachedClearTimeout(e)}catch(t){try{return cachedClearTimeout.call(null,e)}catch(t){return cachedClearTimeout.call(this,e)}}}function cleanUpNextTick(){draining&¤tQueue&&(draining=!1,currentQueue.length?queue=currentQueue.concat(queue):queueIndex=-1,queue.length&&drainQueue())}function drainQueue(){if(!draining){var e=runTimeout(cleanUpNextTick);draining=!0;for(var t=queue.length;t;){for(currentQueue=queue,queue=[];++queueIndex1)for(var u=1;ur;){if(o-r>600){var f=o-r+1,e=t-r+1,l=Math.log(f),s=.5*Math.exp(2*l/3),i=.5*Math.sqrt(l*s*(f-s)/f)*(e-f/2<0?-1:1),n=Math.max(r,Math.floor(t-e*s/f+i)),h=Math.min(o,Math.floor(t+(f-e)*s/f+i));partialSort(a,t,n,h,p)}var u=a[t],M=r,w=o;for(swap(a,r,t),p(a[o],u)>0&&swap(a,r,o);M0;)w--}0===p(a[r],u)?swap(a,r,w):(w++,swap(a,w,o)),w<=t&&(r=w+1),t<=w&&(o=w-1)}}function swap(a,t,r){var o=a[t];a[t]=a[r],a[r]=o}function defaultCompare(a,t){return at?1:0}module.exports=partialSort;\n},{}],29:[function(require,module,exports){\n\"use strict\";function supercluster(t){return new SuperCluster(t)}function SuperCluster(t){this.options=extend(Object.create(this.options),t),this.trees=new Array(this.options.maxZoom+1)}function createCluster(t,e,o,n){return{x:t,y:e,zoom:1/0,id:n,numPoints:o}}function createPointCluster(t,e){var o=t.geometry.coordinates;return createCluster(lngX(o[0]),latY(o[1]),1,e)}function getClusterJSON(t){return{type:\"Feature\",properties:getClusterProperties(t),geometry:{type:\"Point\",coordinates:[xLng(t.x),yLat(t.y)]}}}function getClusterProperties(t){var e=t.numPoints,o=e>=1e4?Math.round(e/1e3)+\"k\":e>=1e3?Math.round(e/100)/10+\"k\":e;return{cluster:!0,point_count:e,point_count_abbreviated:o}}function lngX(t){return t/360+.5}function latY(t){var e=Math.sin(t*Math.PI/180),o=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return o<0?0:o>1?1:o}function xLng(t){return 360*(t-.5)}function yLat(t){var e=(180-360*t)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}function extend(t,e){for(var o in e)t[o]=e[o];return t}function getX(t){return t.x}function getY(t){return t.y}var kdbush=require(\"kdbush\");module.exports=supercluster,SuperCluster.prototype={options:{minZoom:0,maxZoom:16,radius:40,extent:512,nodeSize:64,log:!1},load:function(t){var e=this.options.log;e&&console.time(\"total time\");var o=\"prepare \"+t.length+\" points\";e&&console.time(o),this.points=t;var n=t.map(createPointCluster);e&&console.timeEnd(o);for(var r=this.options.maxZoom;r>=this.options.minZoom;r--){var i=+Date.now();this.trees[r+1]=kdbush(n,getX,getY,this.options.nodeSize,Float32Array),n=this._cluster(n,r),e&&console.log(\"z%d: %d clusters in %dms\",r,n.length,+Date.now()-i)}return this.trees[this.options.minZoom]=kdbush(n,getX,getY,this.options.nodeSize,Float32Array),e&&console.timeEnd(\"total time\"),this},getClusters:function(t,e){for(var o=this.trees[this._limitZoom(e)],n=o.range(lngX(t[0]),latY(t[3]),lngX(t[2]),latY(t[1])),r=[],i=0;i=0;a--)this._down(a)}function defaultCompare(t,i){return ti?1:0}function swap(t,i,a){var n=t[i];t[i]=t[a],t[a]=n}module.exports=TinyQueue,TinyQueue.prototype={push:function(t){this.data.push(t),this.length++,this._up(this.length-1)},pop:function(){var t=this.data[0];return this.data[0]=this.data[this.length-1],this.length--,this.data.pop(),this._down(0),t},peek:function(){return this.data[0]},_up:function(t){for(var i=this.data,a=this.compare;t>0;){var n=Math.floor((t-1)/2);if(!(a(i[t],i[n])<0))break;swap(i,n,t),t=n}},_down:function(t){for(var i=this.data,a=this.compare,n=this.length;;){var e=2*t+1,h=e+1,s=t;if(e=3&&(t.depth=arguments[2]),arguments.length>=4&&(t.colors=arguments[3]),isBoolean(r)?t.showHidden=r:r&&exports._extend(t,r),isUndefined(t.showHidden)&&(t.showHidden=!1),isUndefined(t.depth)&&(t.depth=2),isUndefined(t.colors)&&(t.colors=!1),isUndefined(t.customInspect)&&(t.customInspect=!0),t.colors&&(t.stylize=stylizeWithColor),formatValue(t,e,t.depth)}function stylizeWithColor(e,r){var t=inspect.styles[r];return t?\"\u001b[\"+inspect.colors[t][0]+\"m\"+e+\"\u001b[\"+inspect.colors[t][1]+\"m\":e}function stylizeNoColor(e,r){return e}function arrayToHash(e){var r={};return e.forEach(function(e,t){r[e]=!0}),r}function formatValue(e,r,t){if(e.customInspect&&r&&isFunction(r.inspect)&&r.inspect!==exports.inspect&&(!r.constructor||r.constructor.prototype!==r)){var n=r.inspect(t,e);return isString(n)||(n=formatValue(e,n,t)),n}var i=formatPrimitive(e,r);if(i)return i;var o=Object.keys(r),s=arrayToHash(o);if(e.showHidden&&(o=Object.getOwnPropertyNames(r)),isError(r)&&(o.indexOf(\"message\")>=0||o.indexOf(\"description\")>=0))return formatError(r);if(0===o.length){if(isFunction(r)){var u=r.name?\": \"+r.name:\"\";return e.stylize(\"[Function\"+u+\"]\",\"special\")}if(isRegExp(r))return e.stylize(RegExp.prototype.toString.call(r),\"regexp\");if(isDate(r))return e.stylize(Date.prototype.toString.call(r),\"date\");if(isError(r))return formatError(r)}var c=\"\",a=!1,l=[\"{\",\"}\"];if(isArray(r)&&(a=!0,l=[\"[\",\"]\"]),isFunction(r)){var p=r.name?\": \"+r.name:\"\";c=\" [Function\"+p+\"]\"}if(isRegExp(r)&&(c=\" \"+RegExp.prototype.toString.call(r)),isDate(r)&&(c=\" \"+Date.prototype.toUTCString.call(r)),isError(r)&&(c=\" \"+formatError(r)),0===o.length&&(!a||0==r.length))return l[0]+c+l[1];if(t<0)return isRegExp(r)?e.stylize(RegExp.prototype.toString.call(r),\"regexp\"):e.stylize(\"[Object]\",\"special\");e.seen.push(r);var f;return f=a?formatArray(e,r,t,s,o):o.map(function(n){return formatProperty(e,r,t,s,n,a)}),e.seen.pop(),reduceToSingleString(f,c,l)}function formatPrimitive(e,r){if(isUndefined(r))return e.stylize(\"undefined\",\"undefined\");if(isString(r)){var t=\"'\"+JSON.stringify(r).replace(/^\"|\"$/g,\"\").replace(/'/g,\"\\\\'\").replace(/\\\\\"/g,'\"')+\"'\";return e.stylize(t,\"string\")}return isNumber(r)?e.stylize(\"\"+r,\"number\"):isBoolean(r)?e.stylize(\"\"+r,\"boolean\"):isNull(r)?e.stylize(\"null\",\"null\"):void 0}function formatError(e){return\"[\"+Error.prototype.toString.call(e)+\"]\"}function formatArray(e,r,t,n,i){for(var o=[],s=0,u=r.length;s-1&&(u=o?u.split(\"\\n\").map(function(e){return\" \"+e}).join(\"\\n\").substr(2):\"\\n\"+u.split(\"\\n\").map(function(e){return\" \"+e}).join(\"\\n\"))):u=e.stylize(\"[Circular]\",\"special\")),isUndefined(s)){if(o&&i.match(/^\\d+$/))return u;s=JSON.stringify(\"\"+i),s.match(/^\"([a-zA-Z_][a-zA-Z_0-9]*)\"$/)?(s=s.substr(1,s.length-2),s=e.stylize(s,\"name\")):(s=s.replace(/'/g,\"\\\\'\").replace(/\\\\\"/g,'\"').replace(/(^\"|\"$)/g,\"'\"),s=e.stylize(s,\"string\"))}return s+\": \"+u}function reduceToSingleString(e,r,t){var n=0,i=e.reduce(function(e,r){return n++,r.indexOf(\"\\n\")>=0&&n++,e+r.replace(/\\u001b\\[\\d\\d?m/g,\"\").length+1},0);return i>60?t[0]+(\"\"===r?\"\":r+\"\\n \")+\" \"+e.join(\",\\n \")+\" \"+t[1]:t[0]+r+\" \"+e.join(\", \")+\" \"+t[1]}function isArray(e){return Array.isArray(e)}function isBoolean(e){return\"boolean\"==typeof e}function isNull(e){return null===e}function isNullOrUndefined(e){return null==e}function isNumber(e){return\"number\"==typeof e}function isString(e){return\"string\"==typeof e}function isSymbol(e){return\"symbol\"==typeof e}function isUndefined(e){return void 0===e}function isRegExp(e){return isObject(e)&&\"[object RegExp]\"===objectToString(e)}function isObject(e){return\"object\"==typeof e&&null!==e}function isDate(e){return isObject(e)&&\"[object Date]\"===objectToString(e)}function isError(e){return isObject(e)&&(\"[object Error]\"===objectToString(e)||e instanceof Error)}function isFunction(e){return\"function\"==typeof e}function isPrimitive(e){return null===e||\"boolean\"==typeof e||\"number\"==typeof e||\"string\"==typeof e||\"symbol\"==typeof e||\"undefined\"==typeof e}function objectToString(e){return Object.prototype.toString.call(e)}function pad(e){return e<10?\"0\"+e.toString(10):e.toString(10)}function timestamp(){var e=new Date,r=[pad(e.getHours()),pad(e.getMinutes()),pad(e.getSeconds())].join(\":\");return[e.getDate(),months[e.getMonth()],r].join(\" \")}function hasOwnProperty(e,r){return Object.prototype.hasOwnProperty.call(e,r)}var formatRegExp=/%[sdj%]/g;exports.format=function(e){if(!isString(e)){for(var r=[],t=0;t=i)return e;switch(e){case\"%s\":return String(n[t++]);case\"%d\":return Number(n[t++]);case\"%j\":try{return JSON.stringify(n[t++])}catch(e){return\"[Circular]\"}default:return e}}),s=n[t];t>3}if(a--,1===i||2===i)o+=e.readSVarint(),n+=e.readSVarint(),1===i&&(t&&s.push(t),t=[]),t.push(new Point(o,n));else{if(7!==i)throw new Error(\"unknown command \"+i);t&&t.push(t[0].clone())}}return t&&s.push(t),s},VectorTileFeature.prototype.bbox=function(){var e=this._pbf;e.pos=this._geometry;for(var t=e.readVarint()+e.pos,r=1,i=0,a=0,o=0,n=1/0,s=-(1/0),p=1/0,h=-(1/0);e.pos>3}if(i--,1===r||2===r)a+=e.readSVarint(),o+=e.readSVarint(),as&&(s=a),oh&&(h=o);else if(7!==r)throw new Error(\"unknown command \"+r)}return[n,p,s,h]},VectorTileFeature.prototype.toGeoJSON=function(e,t,r){function i(e){for(var t=0;t>3;t=1===a?e.readString():2===a?e.readFloat():3===a?e.readDouble():4===a?e.readVarint64():5===a?e.readVarint():6===a?e.readSVarint():7===a?e.readBoolean():null}return t}var VectorTileFeature=require(\"./vectortilefeature.js\");module.exports=VectorTileLayer,VectorTileLayer.prototype.feature=function(e){if(e<0||e>=this._features.length)throw new Error(\"feature index out of bounds\");this._pbf.pos=this._features[e];var t=this._pbf.readVarint()+this._pbf.pos;return new VectorTileFeature(this._pbf,t,this.extent,this._keys,this._values)};\n},{\"./vectortilefeature.js\":36}],38:[function(require,module,exports){\nfunction fromVectorTileJs(e){var r=[];for(var o in e.layers)r.push(prepareLayer(e.layers[o]));var t=new Pbf;return vtpb.tile.write({layers:r},t),t.finish()}function fromGeojsonVt(e){var r={};for(var o in e)r[o]=new GeoJSONWrapper(e[o].features),r[o].name=o;return fromVectorTileJs({layers:r})}function prepareLayer(e){for(var r={name:e.name||\"\",version:e.version||1,extent:e.extent||4096,keys:[],values:[],features:[]},o={},t={},n=0;n>31}function encodeGeometry(e){for(var r=[],o=0,t=0,n=e.length,a=0;aArrayGroup.MAX_VERTEX_ARRAY_LENGTH)&&(e=new Segment(this.layoutVertexArray.length,this.elementArray.length),this.segments.push(e)),e},ArrayGroup.prototype.prepareSegment2=function(r){var e=this.segments2[this.segments2.length-1];return(!e||e.vertexLength+r>ArrayGroup.MAX_VERTEX_ARRAY_LENGTH)&&(e=new Segment(this.layoutVertexArray.length,this.elementArray2.length),this.segments2.push(e)),e},ArrayGroup.prototype.populatePaintArrays=function(r){var e=this;for(var t in e.layerData){var a=e.layerData[t];0!==a.paintVertexArray.bytesPerElement&&a.programConfiguration.populatePaintArray(a.layer,a.paintVertexArray,a.paintPropertyStatistics,e.layoutVertexArray.length,e.globalProperties,r)}},ArrayGroup.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},ArrayGroup.prototype.serialize=function(r){return{layoutVertexArray:this.layoutVertexArray.serialize(r),elementArray:this.elementArray&&this.elementArray.serialize(r),elementArray2:this.elementArray2&&this.elementArray2.serialize(r),paintVertexArrays:serializePaintVertexArrays(this.layerData,r),segments:this.segments,segments2:this.segments2}},ArrayGroup.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,module.exports=ArrayGroup;\n},{\"./program_configuration\":58}],45:[function(require,module,exports){\n\"use strict\";var ArrayGroup=require(\"./array_group\"),BufferGroup=require(\"./buffer_group\"),util=require(\"../util/util\"),Bucket=function(r,t){this.zoom=r.zoom,this.overscaling=r.overscaling,this.layers=r.layers,this.index=r.index,r.arrays?this.buffers=new BufferGroup(t,r.layers,r.zoom,r.arrays):this.arrays=new ArrayGroup(t,r.layers,r.zoom)};Bucket.prototype.populate=function(r,t){for(var e=this,i=0,a=r;i=EXTENT||o<0||o>=EXTENT)){var n=r.prepareSegment(4),u=n.vertexLength;addCircleVertex(r.layoutVertexArray,y,o,-1,-1),addCircleVertex(r.layoutVertexArray,y,o,1,-1),addCircleVertex(r.layoutVertexArray,y,o,1,1),addCircleVertex(r.layoutVertexArray,y,o,-1,1),r.elementArray.emplaceBack(u,u+1,u+2),r.elementArray.emplaceBack(u,u+3,u+2),n.vertexLength+=4,n.primitiveLength+=2}}r.populatePaintArrays(e.properties)},r}(Bucket);CircleBucket.programInterface=circleInterface,module.exports=CircleBucket;\n},{\"../bucket\":45,\"../element_array_type\":53,\"../extent\":54,\"../load_geometry\":56,\"../vertex_array_type\":60}],47:[function(require,module,exports){\n\"use strict\";var Bucket=require(\"../bucket\"),createVertexArrayType=require(\"../vertex_array_type\"),createElementArrayType=require(\"../element_array_type\"),loadGeometry=require(\"../load_geometry\"),earcut=require(\"earcut\"),classifyRings=require(\"../../util/classify_rings\"),EARCUT_MAX_RINGS=500,fillInterface={layoutVertexArrayType:createVertexArrayType([{name:\"a_pos\",components:2,type:\"Int16\"}]),elementArrayType:createElementArrayType(3),elementArrayType2:createElementArrayType(2),paintAttributes:[{property:\"fill-color\",type:\"Uint8\"},{property:\"fill-outline-color\",type:\"Uint8\"},{property:\"fill-opacity\",type:\"Uint8\",multiplier:255}]},FillBucket=function(e){function r(r){e.call(this,r,fillInterface)}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.addFeature=function(e){for(var r=this.arrays,t=0,a=classifyRings(loadGeometry(e),EARCUT_MAX_RINGS);tEXTENT)||e.y===r.y&&(e.y<0||e.y>EXTENT)}var Bucket=require(\"../bucket\"),createVertexArrayType=require(\"../vertex_array_type\"),createElementArrayType=require(\"../element_array_type\"),loadGeometry=require(\"../load_geometry\"),EXTENT=require(\"../extent\"),earcut=require(\"earcut\"),classifyRings=require(\"../../util/classify_rings\"),EARCUT_MAX_RINGS=500,fillExtrusionInterface={layoutVertexArrayType:createVertexArrayType([{name:\"a_pos\",components:2,type:\"Int16\"},{name:\"a_normal\",components:3,type:\"Int16\"},{name:\"a_edgedistance\",components:1,type:\"Int16\"}]),elementArrayType:createElementArrayType(3),paintAttributes:[{property:\"fill-extrusion-base\",type:\"Uint16\"},{property:\"fill-extrusion-height\",type:\"Uint16\"},{property:\"fill-extrusion-color\",type:\"Uint8\"}]},FACTOR=Math.pow(2,13),FillExtrusionBucket=function(e){function r(r){e.call(this,r,fillExtrusionInterface)}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.addFeature=function(e){for(var r=this.arrays,t=0,a=classifyRings(loadGeometry(e),EARCUT_MAX_RINGS);t=1){var A=d[h-1];if(!isBoundaryEdge(g,A)){var _=g.sub(A)._perp()._unit();addVertex(r.layoutVertexArray,g.x,g.y,_.x,_.y,0,0,m),addVertex(r.layoutVertexArray,g.x,g.y,_.x,_.y,0,1,m),m+=A.dist(g),addVertex(r.layoutVertexArray,A.x,A.y,_.x,_.y,0,0,m),addVertex(r.layoutVertexArray,A.x,A.y,_.x,_.y,0,1,m);var v=p.vertexLength;r.elementArray.emplaceBack(v,v+1,v+2),r.elementArray.emplaceBack(v+1,v+2,v+3),p.vertexLength+=4,p.primitiveLength+=2}}u.push(g.x),u.push(g.y)}}}for(var E=earcut(u,c),T=0;T>6)}var Bucket=require(\"../bucket\"),createVertexArrayType=require(\"../vertex_array_type\"),createElementArrayType=require(\"../element_array_type\"),loadGeometry=require(\"../load_geometry\"),EXTENT=require(\"../extent\"),VectorTileFeature=require(\"vector-tile\").VectorTileFeature,EXTRUDE_SCALE=63,COS_HALF_SHARP_CORNER=Math.cos(37.5*(Math.PI/180)),SHARP_CORNER_OFFSET=15,LINE_DISTANCE_BUFFER_BITS=15,LINE_DISTANCE_SCALE=.5,MAX_LINE_DISTANCE=Math.pow(2,LINE_DISTANCE_BUFFER_BITS-1)/LINE_DISTANCE_SCALE,lineInterface={layoutVertexArrayType:createVertexArrayType([{name:\"a_pos\",components:2,type:\"Int16\"},{name:\"a_data\",components:4,type:\"Uint8\"}]),paintAttributes:[{property:\"line-color\",type:\"Uint8\"},{property:\"line-blur\",multiplier:10,type:\"Uint8\"},{property:\"line-opacity\",multiplier:10,type:\"Uint8\"},{property:\"line-gap-width\",multiplier:10,type:\"Uint8\",name:\"a_gapwidth\"},{property:\"line-offset\",multiplier:1,type:\"Int8\"}],elementArrayType:createElementArrayType()},LineBucket=function(e){function t(t){e.call(this,t,lineInterface)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.addFeature=function(e){for(var t=this,r=this.layers[0].layout,i=r[\"line-join\"],a=r[\"line-cap\"],n=r[\"line-miter-limit\"],d=r[\"line-round-limit\"],s=0,u=loadGeometry(e,LINE_DISTANCE_BUFFER_BITS);s=2&&e[l-1].equals(e[l-2]);)l--;if(!(l<(u?3:2))){\"bevel\"===r&&(a=1.05);var o=SHARP_CORNER_OFFSET*(EXTENT/(512*this.overscaling)),p=e[0],c=this.arrays,_=c.prepareSegment(10*l);this.distance=0;var y,h,m,E,x,C,v,A=i,f=u?\"butt\":i,L=!0;this.e1=this.e2=this.e3=-1,u&&(y=e[l-2],x=p.sub(y)._unit()._perp());for(var V=0;V0){var b=y.dist(h);if(b>2*o){var R=y.sub(y.sub(h)._mult(o/b)._round());d.distance+=R.dist(h),d.addCurrentVertex(R,d.distance,E.mult(1),0,0,!1,_),h=R}}var g=h&&m,F=g?r:m?A:f;if(g&&\"round\"===F&&(Ia&&(F=\"bevel\"),\"bevel\"===F&&(I>2&&(F=\"flipbevel\"),I100)S=x.clone().mult(-1);else{var B=E.x*x.y-E.y*x.x>0?-1:1,k=I*E.add(x).mag()/E.sub(x).mag();S._perp()._mult(k*B)}d.addCurrentVertex(y,d.distance,S,0,0,!1,_),d.addCurrentVertex(y,d.distance,S.mult(-1),0,0,!1,_)}else if(\"bevel\"===F||\"fakeround\"===F){var D=E.x*x.y-E.y*x.x>0,P=-Math.sqrt(I*I-1);if(D?(v=0,C=P):(C=0,v=P),L||d.addCurrentVertex(y,d.distance,E,C,v,!1,_),\"fakeround\"===F){for(var U=Math.floor(8*(.5-(T-.5))),q=void 0,M=0;M=0;O--)q=E.mult((O+1)/(U+1))._add(x)._unit(),d.addPieSliceVertex(y,d.distance,q,D,_)}m&&d.addCurrentVertex(y,d.distance,x,-C,-v,!1,_)}else\"butt\"===F?(L||d.addCurrentVertex(y,d.distance,E,0,0,!1,_),m&&d.addCurrentVertex(y,d.distance,x,0,0,!1,_)):\"square\"===F?(L||(d.addCurrentVertex(y,d.distance,E,1,1,!1,_),d.e1=d.e2=-1),m&&d.addCurrentVertex(y,d.distance,x,-1,-1,!1,_)):\"round\"===F&&(L||(d.addCurrentVertex(y,d.distance,E,0,0,!1,_),d.addCurrentVertex(y,d.distance,E,1,1,!0,_),d.e1=d.e2=-1),m&&(d.addCurrentVertex(y,d.distance,x,-1,-1,!0,_),d.addCurrentVertex(y,d.distance,x,0,0,!1,_)));if(N&&V2*o){var H=y.add(m.sub(y)._mult(o/X)._round());d.distance+=H.dist(y),d.addCurrentVertex(H,d.distance,x.mult(1),0,0,!1,_),y=H}}L=!1}c.populatePaintArrays(s)}},t.prototype.addCurrentVertex=function(e,t,r,i,a,n,d){var s,u=n?1:0,l=this.arrays,o=l.layoutVertexArray,p=l.elementArray;s=r.clone(),i&&s._sub(r.perp()._mult(i)),addLineVertex(o,e,s,u,0,i,t),this.e3=d.vertexLength++,this.e1>=0&&this.e2>=0&&(p.emplaceBack(this.e1,this.e2,this.e3),d.primitiveLength++),this.e1=this.e2,this.e2=this.e3,s=r.mult(-1),a&&s._sub(r.perp()._mult(a)),addLineVertex(o,e,s,u,1,-a,t),this.e3=d.vertexLength++,this.e1>=0&&this.e2>=0&&(p.emplaceBack(this.e1,this.e2,this.e3),d.primitiveLength++),this.e1=this.e2,this.e2=this.e3,t>MAX_LINE_DISTANCE/2&&(this.distance=0,this.addCurrentVertex(e,this.distance,r,i,a,n,d))},t.prototype.addPieSliceVertex=function(e,t,r,i,a){var n=i?1:0;r=r.mult(i?-1:1);var d=this.arrays,s=d.layoutVertexArray,u=d.elementArray;addLineVertex(s,e,r,0,n,0,t),this.e3=a.vertexLength++,this.e1>=0&&this.e2>=0&&(u.emplaceBack(this.e1,this.e2,this.e3),a.primitiveLength++),i?this.e2=this.e3:this.e1=this.e3},t}(Bucket);LineBucket.programInterface=lineInterface,module.exports=LineBucket;\n},{\"../bucket\":45,\"../element_array_type\":53,\"../extent\":54,\"../load_geometry\":56,\"../vertex_array_type\":60,\"vector-tile\":34}],50:[function(require,module,exports){\n\"use strict\";function addVertex(e,t,o,r,a,i,n,l,s,c,y){e.emplaceBack(t,o,Math.round(64*r),Math.round(64*a),i/4,n/4,10*(c||0),y,10*(l||0),10*Math.min(s||25,25))}function addCollisionBoxVertex(e,t,o,r,a){return e.emplaceBack(t.x,t.y,Math.round(o.x),Math.round(o.y),10*r,10*a)}var Point=require(\"point-geometry\"),ArrayGroup=require(\"../array_group\"),BufferGroup=require(\"../buffer_group\"),createVertexArrayType=require(\"../vertex_array_type\"),createElementArrayType=require(\"../element_array_type\"),EXTENT=require(\"../extent\"),Anchor=require(\"../../symbol/anchor\"),getAnchors=require(\"../../symbol/get_anchors\"),resolveTokens=require(\"../../util/token\"),Quads=require(\"../../symbol/quads\"),Shaping=require(\"../../symbol/shaping\"),resolveText=require(\"../../symbol/resolve_text\"),mergeLines=require(\"../../symbol/mergelines\"),clipLine=require(\"../../symbol/clip_line\"),util=require(\"../../util/util\"),scriptDetection=require(\"../../util/script_detection\"),loadGeometry=require(\"../load_geometry\"),CollisionFeature=require(\"../../symbol/collision_feature\"),findPoleOfInaccessibility=require(\"../../util/find_pole_of_inaccessibility\"),classifyRings=require(\"../../util/classify_rings\"),VectorTileFeature=require(\"vector-tile\").VectorTileFeature,rtlTextPlugin=require(\"../../source/rtl_text_plugin\"),shapeText=Shaping.shapeText,shapeIcon=Shaping.shapeIcon,WritingMode=Shaping.WritingMode,getGlyphQuads=Quads.getGlyphQuads,getIconQuads=Quads.getIconQuads,elementArrayType=createElementArrayType(),layoutVertexArrayType=createVertexArrayType([{name:\"a_pos_offset\",components:4,type:\"Int16\"},{name:\"a_texture_pos\",components:2,type:\"Uint16\"},{name:\"a_data\",components:4,type:\"Uint8\"}]),symbolInterfaces={glyph:{layoutVertexArrayType:layoutVertexArrayType,elementArrayType:elementArrayType,paintAttributes:[{name:\"a_fill_color\",property:\"text-color\",type:\"Uint8\"},{name:\"a_halo_color\",property:\"text-halo-color\",type:\"Uint8\"},{name:\"a_halo_width\",property:\"text-halo-width\",type:\"Uint16\",multiplier:10},{name:\"a_halo_blur\",property:\"text-halo-blur\",type:\"Uint16\",multiplier:10},{name:\"a_opacity\",property:\"text-opacity\",type:\"Uint8\",multiplier:255}]},icon:{layoutVertexArrayType:layoutVertexArrayType,elementArrayType:elementArrayType,paintAttributes:[{name:\"a_fill_color\",property:\"icon-color\",type:\"Uint8\"},{name:\"a_halo_color\",property:\"icon-halo-color\",type:\"Uint8\"},{name:\"a_halo_width\",property:\"icon-halo-width\",type:\"Uint16\",multiplier:10},{name:\"a_halo_blur\",property:\"icon-halo-blur\",type:\"Uint16\",multiplier:10},{name:\"a_opacity\",property:\"icon-opacity\",type:\"Uint8\",multiplier:255}]},collisionBox:{layoutVertexArrayType:createVertexArrayType([{name:\"a_pos\",components:2,type:\"Int16\"},{name:\"a_extrude\",components:2,type:\"Int16\"},{name:\"a_data\",components:2,type:\"Uint8\"}]),elementArrayType:createElementArrayType(2)}},SymbolBucket=function(e){var t=this;if(this.collisionBoxArray=e.collisionBoxArray,this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.index=e.index,this.sdfIcons=e.sdfIcons,this.iconsNeedLinear=e.iconsNeedLinear,this.adjustedTextSize=e.adjustedTextSize,this.adjustedIconSize=e.adjustedIconSize,this.fontstack=e.fontstack,e.arrays){this.buffers={};for(var o in e.arrays)e.arrays[o]&&(t.buffers[o]=new BufferGroup(symbolInterfaces[o],e.layers,e.zoom,e.arrays[o]))}};SymbolBucket.prototype.populate=function(e,t){var o=this,r=this.layers[0],a=r.layout,i=a[\"text-font\"],n=a[\"icon-image\"],l=i&&(!r.isLayoutValueFeatureConstant(\"text-field\")||a[\"text-field\"]),s=n;if(this.features=[],l||s){for(var c=t.iconDependencies,y=t.glyphDependencies,p=y[i]=y[i]||{},x=0;xEXTENT||i.y<0||i.y>EXTENT);if(!x||n){var l=n||f;r.addSymbolInstance(i,a,t,o,r.layers[0],l,r.collisionBoxArray,e.index,e.sourceLayerIndex,r.index,s,h,m,y,u,g,{zoom:r.zoom},e.properties)}};if(\"line\"===b)for(var S=0,T=clipLine(e.geometry,0,0,EXTENT,EXTENT);S=0;i--)if(o.dist(a[i])7*Math.PI/4)continue}else if(r&&a&&d<=3*Math.PI/4||d>5*Math.PI/4)continue}else if(r&&a&&(d<=Math.PI/2||d>3*Math.PI/2))continue;var m=u.tl,g=u.tr,f=u.bl,b=u.br,v=u.tex,I=u.anchorPoint,S=Math.max(y+Math.log(u.minScale)/Math.LN2,p),T=Math.min(y+Math.log(u.maxScale)/Math.LN2,25);if(!(T<=S)){S===p&&(S=0);var M=Math.round(u.glyphAngle/(2*Math.PI)*256),B=e.prepareSegment(4),A=B.vertexLength;addVertex(c,I.x,I.y,m.x,m.y,v.x,v.y,S,T,p,M),addVertex(c,I.x,I.y,g.x,g.y,v.x+v.w,v.y,S,T,p,M),addVertex(c,I.x,I.y,f.x,f.y,v.x,v.y+v.h,S,T,p,M),addVertex(c,I.x,I.y,b.x,b.y,v.x+v.w,v.y+v.h,S,T,p,M),s.emplaceBack(A,A+1,A+2),s.emplaceBack(A+1,A+2,A+3),B.vertexLength+=4,B.primitiveLength+=2}}e.populatePaintArrays(n)},SymbolBucket.prototype.addToDebugBuffers=function(e){for(var t=this,o=this.arrays.collisionBox,r=o.layoutVertexArray,a=o.elementArray,i=-e.angle,n=e.yStretch,l=0,s=t.symbolInstances;lSymbolBucket.MAX_INSTANCES&&util.warnOnce(\"Too many symbols being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907\"),z>SymbolBucket.MAX_INSTANCES&&util.warnOnce(\"Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907\");var _=(o[WritingMode.vertical]?WritingMode.vertical:0)|(o[WritingMode.horizontal]?WritingMode.horizontal:0);this.symbolInstances.push({textBoxStartIndex:M,textBoxEndIndex:B,iconBoxStartIndex:A,iconBoxEndIndex:z,glyphQuads:I,iconQuads:v,anchor:e,featureIndex:l,featureProperties:g,writingModes:_})},SymbolBucket.programInterfaces=symbolInterfaces,SymbolBucket.MAX_INSTANCES=65535,module.exports=SymbolBucket;\n},{\"../../source/rtl_text_plugin\":90,\"../../symbol/anchor\":157,\"../../symbol/clip_line\":159,\"../../symbol/collision_feature\":161,\"../../symbol/get_anchors\":163,\"../../symbol/mergelines\":166,\"../../symbol/quads\":167,\"../../symbol/resolve_text\":168,\"../../symbol/shaping\":169,\"../../util/classify_rings\":195,\"../../util/find_pole_of_inaccessibility\":201,\"../../util/script_detection\":209,\"../../util/token\":211,\"../../util/util\":212,\"../array_group\":44,\"../buffer_group\":52,\"../element_array_type\":53,\"../extent\":54,\"../load_geometry\":56,\"../vertex_array_type\":60,\"point-geometry\":26,\"vector-tile\":34}],51:[function(require,module,exports){\n\"use strict\";var AttributeType={Int8:\"BYTE\",Uint8:\"UNSIGNED_BYTE\",Int16:\"SHORT\",Uint16:\"UNSIGNED_SHORT\"},Buffer=function(e,t,r){this.arrayBuffer=e.arrayBuffer,this.length=e.length,this.attributes=t.members,this.itemSize=t.bytesPerElement,this.type=r,this.arrayType=t};Buffer.fromStructArray=function(e,t){return new Buffer(e.serialize(),e.constructor.serialize(),t)},Buffer.prototype.bind=function(e){var t=e[this.type];this.buffer?e.bindBuffer(t,this.buffer):(this.gl=e,this.buffer=e.createBuffer(),e.bindBuffer(t,this.buffer),e.bufferData(t,this.arrayBuffer,e.STATIC_DRAW),this.arrayBuffer=null)},Buffer.prototype.setVertexAttribPointers=function(e,t,r){for(var f=this,i=0;i0?t+2*e:e}function translate(e,t,r,i,a){if(!t[0]&&!t[1])return e;t=Point.convert(t),\"viewport\"===r&&t._rotate(-i);for(var n=[],s=0;sr.max||d.yr.max)&&util.warnOnce(\"Geometry exceeds allowed extent, reduce your vector tile buffer size\")}return u};\n},{\"../util/util\":212,\"./extent\":54}],57:[function(require,module,exports){\n\"use strict\";var createStructArrayType=require(\"../util/struct_array\"),PosArray=createStructArrayType({members:[{name:\"a_pos\",type:\"Int16\",components:2}]});module.exports=PosArray;\n},{\"../util/struct_array\":210}],58:[function(require,module,exports){\n\"use strict\";function getPaintAttributeValue(t,r,e,i){if(!t.zoomStops)return r.getPaintValue(t.property,e,i);var a=t.zoomStops.map(function(a){return r.getPaintValue(t.property,util.extend({},e,{zoom:a}),i)});return 1===a.length?a[0]:a}function normalizePaintAttribute(t,r){var e=t.name;e||(e=t.property.replace(r.type+\"-\",\"\").replace(/-/g,\"_\"));var i=\"color\"===r._paintSpecifications[t.property].type;return util.extend({name:\"a_\"+e,components:i?4:1,multiplier:i?255:1,dimensions:i?4:1},t)}var createVertexArrayType=require(\"./vertex_array_type\"),util=require(\"../util/util\"),ProgramConfiguration=function(){this.attributes=[],this.uniforms=[],this.interpolationUniforms=[],this.pragmas={vertex:{},fragment:{}},this.cacheKey=\"\"};ProgramConfiguration.createDynamic=function(t,r,e){for(var i=new ProgramConfiguration,a=0,n=t;a90||this.lat<-90)throw new Error(\"Invalid LngLat latitude value: must be between -90 and 90\")};LngLat.prototype.wrap=function(){return new LngLat(wrap(this.lng,-180,180),this.lat)},LngLat.prototype.toArray=function(){return[this.lng,this.lat]},LngLat.prototype.toString=function(){return\"LngLat(\"+this.lng+\", \"+this.lat+\")\"},LngLat.convert=function(t){if(t instanceof LngLat)return t;if(t&&t.hasOwnProperty(\"lng\")&&t.hasOwnProperty(\"lat\"))return new LngLat(t.lng,t.lat);if(Array.isArray(t)&&2===t.length)return new LngLat(t[0],t[1]);throw new Error(\"`LngLatLike` argument must be specified as a LngLat instance, an object {lng: , lat: }, or an array of [, ]\")},module.exports=LngLat;\n},{\"../util/util\":212}],63:[function(require,module,exports){\n\"use strict\";var LngLat=require(\"./lng_lat\"),LngLatBounds=function(t,n){t&&(n?this.setSouthWest(t).setNorthEast(n):4===t.length?this.setSouthWest([t[0],t[1]]).setNorthEast([t[2],t[3]]):this.setSouthWest(t[0]).setNorthEast(t[1]))};LngLatBounds.prototype.setNorthEast=function(t){return this._ne=LngLat.convert(t),this},LngLatBounds.prototype.setSouthWest=function(t){return this._sw=LngLat.convert(t),this},LngLatBounds.prototype.extend=function(t){var n,e,s=this._sw,o=this._ne;if(t instanceof LngLat)n=t,e=t;else{if(!(t instanceof LngLatBounds))return Array.isArray(t)?t.every(Array.isArray)?this.extend(LngLatBounds.convert(t)):this.extend(LngLat.convert(t)):this;if(n=t._sw,e=t._ne,!n||!e)return this}return s||o?(s.lng=Math.min(n.lng,s.lng),s.lat=Math.min(n.lat,s.lat),o.lng=Math.max(e.lng,o.lng),o.lat=Math.max(e.lat,o.lat)):(this._sw=new LngLat(n.lng,n.lat),this._ne=new LngLat(e.lng,e.lat)),this},LngLatBounds.prototype.getCenter=function(){return new LngLat((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},LngLatBounds.prototype.getSouthWest=function(){return this._sw},LngLatBounds.prototype.getNorthEast=function(){return this._ne},LngLatBounds.prototype.getNorthWest=function(){return new LngLat(this.getWest(),this.getNorth())},LngLatBounds.prototype.getSouthEast=function(){return new LngLat(this.getEast(),this.getSouth())},LngLatBounds.prototype.getWest=function(){return this._sw.lng},LngLatBounds.prototype.getSouth=function(){return this._sw.lat},LngLatBounds.prototype.getEast=function(){return this._ne.lng},LngLatBounds.prototype.getNorth=function(){return this._ne.lat},LngLatBounds.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},LngLatBounds.prototype.toString=function(){return\"LngLatBounds(\"+this._sw.toString()+\", \"+this._ne.toString()+\")\"},LngLatBounds.convert=function(t){return!t||t instanceof LngLatBounds?t:new LngLatBounds(t)},module.exports=LngLatBounds;\n},{\"./lng_lat\":62}],64:[function(require,module,exports){\n\"use strict\";var LngLat=require(\"./lng_lat\"),Point=require(\"point-geometry\"),Coordinate=require(\"./coordinate\"),util=require(\"../util/util\"),interp=require(\"../util/interpolate\"),TileCoord=require(\"../source/tile_coord\"),EXTENT=require(\"../data/extent\"),glmatrix=require(\"@mapbox/gl-matrix\"),vec4=glmatrix.vec4,mat4=glmatrix.mat4,mat2=glmatrix.mat2,Transform=function(t,i,o){this.tileSize=512,this._renderWorldCopies=void 0===o||o,this._minZoom=t||0,this._maxZoom=i||22,this.latRange=[-85.05113,85.05113],this.width=0,this.height=0,this._center=new LngLat(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0},prototypeAccessors={minZoom:{},maxZoom:{},worldSize:{},centerPoint:{},size:{},bearing:{},pitch:{},fov:{},zoom:{},center:{},unmodified:{},x:{},y:{},point:{}};prototypeAccessors.minZoom.get=function(){return this._minZoom},prototypeAccessors.minZoom.set=function(t){this._minZoom!==t&&(this._minZoom=t,this.zoom=Math.max(this.zoom,t))},prototypeAccessors.maxZoom.get=function(){return this._maxZoom},prototypeAccessors.maxZoom.set=function(t){this._maxZoom!==t&&(this._maxZoom=t,this.zoom=Math.min(this.zoom,t))},prototypeAccessors.worldSize.get=function(){return this.tileSize*this.scale},prototypeAccessors.centerPoint.get=function(){return this.size._div(2)},prototypeAccessors.size.get=function(){return new Point(this.width,this.height)},prototypeAccessors.bearing.get=function(){return-this.angle/Math.PI*180},prototypeAccessors.bearing.set=function(t){var i=-util.wrap(t,-180,180)*Math.PI/180;this.angle!==i&&(this._unmodified=!1,this.angle=i,this._calcMatrices(),this.rotationMatrix=mat2.create(),mat2.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},prototypeAccessors.pitch.get=function(){return this._pitch/Math.PI*180},prototypeAccessors.pitch.set=function(t){var i=util.clamp(t,0,60)/180*Math.PI;this._pitch!==i&&(this._unmodified=!1,this._pitch=i,this._calcMatrices())},prototypeAccessors.fov.get=function(){return this._fov/Math.PI*180},prototypeAccessors.fov.set=function(t){t=Math.max(.01,Math.min(60,t)),this._fov!==t&&(this._unmodified=!1,this._fov=t/180*Math.PI,this._calcMatrices())},prototypeAccessors.zoom.get=function(){return this._zoom},prototypeAccessors.zoom.set=function(t){var i=Math.min(Math.max(t,this.minZoom),this.maxZoom);this._zoom!==i&&(this._unmodified=!1,this._zoom=i,this.scale=this.zoomScale(i),this.tileZoom=Math.floor(i),this.zoomFraction=i-this.tileZoom,this._constrain(),this._calcMatrices())},prototypeAccessors.center.get=function(){return this._center},prototypeAccessors.center.set=function(t){t.lat===this._center.lat&&t.lng===this._center.lng||(this._unmodified=!1,this._center=t,this._constrain(),this._calcMatrices())},Transform.prototype.coveringZoomLevel=function(t){return(t.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/t.tileSize))},Transform.prototype.coveringTiles=function(t){var i=this.coveringZoomLevel(t),o=i;if(it.maxzoom&&(i=t.maxzoom);var e=this.pointCoordinate(this.centerPoint,i),r=new Point(e.column-.5,e.row-.5),n=[this.pointCoordinate(new Point(0,0),i),this.pointCoordinate(new Point(this.width,0),i),this.pointCoordinate(new Point(this.width,this.height),i),this.pointCoordinate(new Point(0,this.height),i)];return TileCoord.cover(i,n,t.reparseOverscaled?o:i,this._renderWorldCopies).sort(function(t,i){return r.dist(t)-r.dist(i)})},Transform.prototype.resize=function(t,i){this.width=t,this.height=i,this.pixelsToGLUnits=[2/t,-2/i],this._constrain(),this._calcMatrices()},prototypeAccessors.unmodified.get=function(){return this._unmodified},Transform.prototype.zoomScale=function(t){return Math.pow(2,t)},Transform.prototype.scaleZoom=function(t){return Math.log(t)/Math.LN2},Transform.prototype.project=function(t){return new Point(this.lngX(t.lng),this.latY(t.lat))},Transform.prototype.unproject=function(t){return new LngLat(this.xLng(t.x),this.yLat(t.y))},prototypeAccessors.x.get=function(){return this.lngX(this.center.lng)},prototypeAccessors.y.get=function(){return this.latY(this.center.lat)},prototypeAccessors.point.get=function(){return new Point(this.x,this.y)},Transform.prototype.lngX=function(t){return(180+t)*this.worldSize/360},Transform.prototype.latY=function(t){var i=180/Math.PI*Math.log(Math.tan(Math.PI/4+t*Math.PI/360));return(180-i)*this.worldSize/360},Transform.prototype.xLng=function(t){return 360*t/this.worldSize-180},Transform.prototype.yLat=function(t){var i=180-360*t/this.worldSize;return 360/Math.PI*Math.atan(Math.exp(i*Math.PI/180))-90},Transform.prototype.setLocationAtPoint=function(t,i){var o=this.pointCoordinate(i)._sub(this.pointCoordinate(this.centerPoint));this.center=this.coordinateLocation(this.locationCoordinate(t)._sub(o))},Transform.prototype.locationPoint=function(t){return this.coordinatePoint(this.locationCoordinate(t))},Transform.prototype.pointLocation=function(t){return this.coordinateLocation(this.pointCoordinate(t))},Transform.prototype.locationCoordinate=function(t){return new Coordinate(this.lngX(t.lng)/this.tileSize,this.latY(t.lat)/this.tileSize,this.zoom).zoomTo(this.tileZoom)},Transform.prototype.coordinateLocation=function(t){var i=t.zoomTo(this.zoom);return new LngLat(this.xLng(i.column*this.tileSize),this.yLat(i.row*this.tileSize))},Transform.prototype.pointCoordinate=function(t,i){void 0===i&&(i=this.tileZoom);var o=0,e=[t.x,t.y,0,1],r=[t.x,t.y,1,1];vec4.transformMat4(e,e,this.pixelMatrixInverse),vec4.transformMat4(r,r,this.pixelMatrixInverse);var n=e[3],s=r[3],a=e[0]/n,h=r[0]/s,c=e[1]/n,m=r[1]/s,p=e[2]/n,l=r[2]/s,u=p===l?0:(o-p)/(l-p);return new Coordinate(interp(a,h,u)/this.tileSize,interp(c,m,u)/this.tileSize,this.zoom)._zoomTo(i)},Transform.prototype.coordinatePoint=function(t){var i=t.zoomTo(this.zoom),o=[i.column*this.tileSize,i.row*this.tileSize,0,1];return vec4.transformMat4(o,o,this.pixelMatrix),new Point(o[0]/o[3],o[1]/o[3])},Transform.prototype.calculatePosMatrix=function(t,i){var o=t.toCoordinate(i),e=this.worldSize/this.zoomScale(o.zoom),r=mat4.identity(new Float64Array(16));return mat4.translate(r,r,[o.column*e,o.row*e,0]),mat4.scale(r,r,[e/EXTENT,e/EXTENT,1]),mat4.multiply(r,this.projMatrix,r),new Float32Array(r)},Transform.prototype._constrain=function(){if(this.center&&this.width&&this.height&&!this._constraining){this._constraining=!0;var t,i,o,e,r,n,s,a,h=this.size,c=this._unmodified;this.latRange&&(t=this.latY(this.latRange[1]),i=this.latY(this.latRange[0]),r=i-ti&&(a=i-l)}if(this.lngRange){var u=this.x,f=h.x/2;u-fe&&(s=e-f)}void 0===s&&void 0===a||(this.center=this.unproject(new Point(void 0!==s?s:this.x,void 0!==a?a:this.y))),this._unmodified=c,this._constraining=!1}},Transform.prototype._calcMatrices=function(){if(this.height){this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height;var t=this._fov/2,i=Math.PI/2+this._pitch,o=Math.sin(t)*this.cameraToCenterDistance/Math.sin(Math.PI-i-t),e=Math.cos(Math.PI/2-this._pitch)*o+this.cameraToCenterDistance,r=1.01*e,n=new Float64Array(16);mat4.perspective(n,this._fov,this.width/this.height,1,r),mat4.scale(n,n,[1,-1,1]),mat4.translate(n,n,[0,0,-this.cameraToCenterDistance]),mat4.rotateX(n,n,this._pitch),mat4.rotateZ(n,n,this.angle),mat4.translate(n,n,[-this.x,-this.y,0]);var s=this.worldSize/(2*Math.PI*6378137*Math.abs(Math.cos(this.center.lat*(Math.PI/180))));if(mat4.scale(n,n,[1,1,s,1]),this.projMatrix=n,n=mat4.create(),mat4.scale(n,n,[this.width/2,-this.height/2,1]),mat4.translate(n,n,[1,-1,0]),this.pixelMatrix=mat4.multiply(new Float64Array(16),n,this.projMatrix),n=mat4.invert(new Float64Array(16),this.pixelMatrix),!n)throw new Error(\"failed to invert matrix\");this.pixelMatrixInverse=n}},Object.defineProperties(Transform.prototype,prototypeAccessors),module.exports=Transform;\n},{\"../data/extent\":54,\"../source/tile_coord\":94,\"../util/interpolate\":204,\"../util/util\":212,\"./coordinate\":61,\"./lng_lat\":62,\"@mapbox/gl-matrix\":1,\"point-geometry\":26}],65:[function(require,module,exports){\n\"use strict\";var browser=require(\"./util/browser\"),mapboxgl=module.exports={};mapboxgl.version=require(\"../package.json\").version,mapboxgl.workerCount=Math.max(Math.floor(browser.hardwareConcurrency/2),1),mapboxgl.Map=require(\"./ui/map\"),mapboxgl.NavigationControl=require(\"./ui/control/navigation_control\"),mapboxgl.GeolocateControl=require(\"./ui/control/geolocate_control\"),mapboxgl.AttributionControl=require(\"./ui/control/attribution_control\"),mapboxgl.ScaleControl=require(\"./ui/control/scale_control\"),mapboxgl.FullscreenControl=require(\"./ui/control/fullscreen_control\"),mapboxgl.Popup=require(\"./ui/popup\"),mapboxgl.Marker=require(\"./ui/marker\"),mapboxgl.Style=require(\"./style/style\"),mapboxgl.LngLat=require(\"./geo/lng_lat\"),mapboxgl.LngLatBounds=require(\"./geo/lng_lat_bounds\"),mapboxgl.Point=require(\"point-geometry\"),mapboxgl.Evented=require(\"./util/evented\"),mapboxgl.supported=require(\"./util/browser\").supported;var config=require(\"./util/config\");mapboxgl.config=config;var rtlTextPlugin=require(\"./source/rtl_text_plugin\");mapboxgl.setRTLTextPlugin=rtlTextPlugin.setRTLTextPlugin,Object.defineProperty(mapboxgl,\"accessToken\",{get:function(){return config.ACCESS_TOKEN},set:function(o){config.ACCESS_TOKEN=o}});\n},{\"../package.json\":43,\"./geo/lng_lat\":62,\"./geo/lng_lat_bounds\":63,\"./source/rtl_text_plugin\":90,\"./style/style\":146,\"./ui/control/attribution_control\":173,\"./ui/control/fullscreen_control\":174,\"./ui/control/geolocate_control\":175,\"./ui/control/navigation_control\":177,\"./ui/control/scale_control\":178,\"./ui/map\":187,\"./ui/marker\":188,\"./ui/popup\":189,\"./util/browser\":192,\"./util/config\":196,\"./util/evented\":200,\"point-geometry\":26}],66:[function(require,module,exports){\n\"use strict\";function drawBackground(r,t,e){var a=r.gl,i=r.transform,n=i.tileSize,o=e.paint[\"background-color\"],l=e.paint[\"background-pattern\"],u=e.paint[\"background-opacity\"],f=!l&&1===o[3]&&1===u;if(r.isOpaquePass===f){a.disable(a.STENCIL_TEST),r.setDepthSublayer(0);var s;l?(s=r.useProgram(\"fillPattern\",r.basicFillProgramConfiguration),pattern.prepare(l,r,s),r.tileExtentPatternVAO.bind(a,s,r.tileExtentBuffer)):(s=r.useProgram(\"fill\",r.basicFillProgramConfiguration),a.uniform4fv(s.u_color,o),r.tileExtentVAO.bind(a,s,r.tileExtentBuffer)),a.uniform1f(s.u_opacity,u);for(var c=i.coveringTiles({tileSize:n}),g=0,p=c;g\":[24,[4,18,20,9,4,0]],\"?\":[18,[3,16,3,17,4,19,5,20,7,21,11,21,13,20,14,19,15,17,15,15,14,13,13,12,9,10,9,7,-1,-1,9,2,8,1,9,0,10,1,9,2]],\"@\":[27,[18,13,17,15,15,16,12,16,10,15,9,14,8,11,8,8,9,6,11,5,14,5,16,6,17,8,-1,-1,12,16,10,14,9,11,9,8,10,6,11,5,-1,-1,18,16,17,8,17,6,19,5,21,5,23,7,24,10,24,12,23,15,22,17,20,19,18,20,15,21,12,21,9,20,7,19,5,17,4,15,3,12,3,9,4,6,5,4,7,2,9,1,12,0,15,0,18,1,20,2,21,3,-1,-1,19,16,18,8,18,6,19,5]],A:[18,[9,21,1,0,-1,-1,9,21,17,0,-1,-1,4,7,14,7]],B:[21,[4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,15,17,13,16,12,13,11,-1,-1,4,11,13,11,16,10,17,9,18,7,18,4,17,2,16,1,13,0,4,0]],C:[21,[18,16,17,18,15,20,13,21,9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5]],D:[21,[4,21,4,0,-1,-1,4,21,11,21,14,20,16,18,17,16,18,13,18,8,17,5,16,3,14,1,11,0,4,0]],E:[19,[4,21,4,0,-1,-1,4,21,17,21,-1,-1,4,11,12,11,-1,-1,4,0,17,0]],F:[18,[4,21,4,0,-1,-1,4,21,17,21,-1,-1,4,11,12,11]],G:[21,[18,16,17,18,15,20,13,21,9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,18,8,-1,-1,13,8,18,8]],H:[22,[4,21,4,0,-1,-1,18,21,18,0,-1,-1,4,11,18,11]],I:[8,[4,21,4,0]],J:[16,[12,21,12,5,11,2,10,1,8,0,6,0,4,1,3,2,2,5,2,7]],K:[21,[4,21,4,0,-1,-1,18,21,4,7,-1,-1,9,12,18,0]],L:[17,[4,21,4,0,-1,-1,4,0,16,0]],M:[24,[4,21,4,0,-1,-1,4,21,12,0,-1,-1,20,21,12,0,-1,-1,20,21,20,0]],N:[22,[4,21,4,0,-1,-1,4,21,18,0,-1,-1,18,21,18,0]],O:[22,[9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,19,8,19,13,18,16,17,18,15,20,13,21,9,21]],P:[21,[4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,14,17,12,16,11,13,10,4,10]],Q:[22,[9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,19,8,19,13,18,16,17,18,15,20,13,21,9,21,-1,-1,12,4,18,-2]],R:[21,[4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,15,17,13,16,12,13,11,4,11,-1,-1,11,11,18,0]],S:[20,[17,18,15,20,12,21,8,21,5,20,3,18,3,16,4,14,5,13,7,12,13,10,15,9,16,8,17,6,17,3,15,1,12,0,8,0,5,1,3,3]],T:[16,[8,21,8,0,-1,-1,1,21,15,21]],U:[22,[4,21,4,6,5,3,7,1,10,0,12,0,15,1,17,3,18,6,18,21]],V:[18,[1,21,9,0,-1,-1,17,21,9,0]],W:[24,[2,21,7,0,-1,-1,12,21,7,0,-1,-1,12,21,17,0,-1,-1,22,21,17,0]],X:[20,[3,21,17,0,-1,-1,17,21,3,0]],Y:[18,[1,21,9,11,9,0,-1,-1,17,21,9,11]],Z:[20,[17,21,3,0,-1,-1,3,21,17,21,-1,-1,3,0,17,0]],\"[\":[14,[4,25,4,-7,-1,-1,5,25,5,-7,-1,-1,4,25,11,25,-1,-1,4,-7,11,-7]],\"\\\\\":[14,[0,21,14,-3]],\"]\":[14,[9,25,9,-7,-1,-1,10,25,10,-7,-1,-1,3,25,10,25,-1,-1,3,-7,10,-7]],\"^\":[16,[6,15,8,18,10,15,-1,-1,3,12,8,17,13,12,-1,-1,8,17,8,0]],_:[16,[0,-2,16,-2]],\"`\":[10,[6,21,5,20,4,18,4,16,5,15,6,16,5,17]],a:[19,[15,14,15,0,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],b:[19,[4,21,4,0,-1,-1,4,11,6,13,8,14,11,14,13,13,15,11,16,8,16,6,15,3,13,1,11,0,8,0,6,1,4,3]],c:[18,[15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],d:[19,[15,21,15,0,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],e:[18,[3,8,15,8,15,10,14,12,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],f:[12,[10,21,8,21,6,20,5,17,5,0,-1,-1,2,14,9,14]],g:[19,[15,14,15,-2,14,-5,13,-6,11,-7,8,-7,6,-6,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],h:[19,[4,21,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0]],i:[8,[3,21,4,20,5,21,4,22,3,21,-1,-1,4,14,4,0]],j:[10,[5,21,6,20,7,21,6,22,5,21,-1,-1,6,14,6,-3,5,-6,3,-7,1,-7]],k:[17,[4,21,4,0,-1,-1,14,14,4,4,-1,-1,8,8,15,0]],l:[8,[4,21,4,0]],m:[30,[4,14,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0,-1,-1,15,10,18,13,20,14,23,14,25,13,26,10,26,0]],n:[19,[4,14,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0]],o:[19,[8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3,16,6,16,8,15,11,13,13,11,14,8,14]],p:[19,[4,14,4,-7,-1,-1,4,11,6,13,8,14,11,14,13,13,15,11,16,8,16,6,15,3,13,1,11,0,8,0,6,1,4,3]],q:[19,[15,14,15,-7,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],r:[13,[4,14,4,0,-1,-1,4,8,5,11,7,13,9,14,12,14]],s:[17,[14,11,13,13,10,14,7,14,4,13,3,11,4,9,6,8,11,7,13,6,14,4,14,3,13,1,10,0,7,0,4,1,3,3]],t:[12,[5,21,5,4,6,1,8,0,10,0,-1,-1,2,14,9,14]],u:[19,[4,14,4,4,5,1,7,0,10,0,12,1,15,4,-1,-1,15,14,15,0]],v:[16,[2,14,8,0,-1,-1,14,14,8,0]],w:[22,[3,14,7,0,-1,-1,11,14,7,0,-1,-1,11,14,15,0,-1,-1,19,14,15,0]],x:[17,[3,14,14,0,-1,-1,14,14,3,0]],y:[16,[2,14,8,0,-1,-1,14,14,8,0,6,-4,4,-6,2,-7,1,-7]],z:[17,[14,14,3,0,-1,-1,3,14,14,14,-1,-1,3,0,14,0]],\"{\":[14,[9,25,7,24,6,23,5,21,5,19,6,17,7,16,8,14,8,12,6,10,-1,-1,7,24,6,22,6,20,7,18,8,17,9,15,9,13,8,11,4,9,8,7,9,5,9,3,8,1,7,0,6,-2,6,-4,7,-6,-1,-1,6,8,8,6,8,4,7,2,6,1,5,-1,5,-3,6,-5,7,-6,9,-7]],\"|\":[8,[4,25,4,-7]],\"}\":[14,[5,25,7,24,8,23,9,21,9,19,8,17,7,16,6,14,6,12,8,10,-1,-1,7,24,8,22,8,20,7,18,6,17,5,15,5,13,6,11,10,9,6,7,5,5,5,3,6,1,7,0,8,-2,8,-4,7,-6,-1,-1,8,8,6,6,6,4,7,2,8,1,9,-1,9,-3,8,-5,7,-6,5,-7]],\"~\":[24,[3,6,3,8,4,11,6,12,8,12,10,11,14,8,16,7,18,7,20,8,21,10,-1,-1,3,8,4,10,6,11,8,11,10,10,14,7,16,6,18,6,20,7,21,10,21,12]]};\n},{\"../data/buffer\":51,\"../data/extent\":54,\"../data/pos_array\":57,\"../util/browser\":192,\"./vertex_array_object\":80,\"@mapbox/gl-matrix\":1}],70:[function(require,module,exports){\n\"use strict\";function drawFill(t,e,r,i){var a=t.gl;a.enable(a.STENCIL_TEST);var l=!r.paint[\"fill-pattern\"]&&r.isPaintValueFeatureConstant(\"fill-color\")&&r.isPaintValueFeatureConstant(\"fill-opacity\")&&1===r.paint[\"fill-color\"][3]&&1===r.paint[\"fill-opacity\"];t.isOpaquePass===l&&(t.setDepthSublayer(1),drawFillTiles(t,e,r,i,drawFillTile)),!t.isOpaquePass&&r.paint[\"fill-antialias\"]&&(t.lineWidth(2),t.depthMask(!1),t.setDepthSublayer(r.getPaintProperty(\"fill-outline-color\")?2:0),drawFillTiles(t,e,r,i,drawStrokeTile))}function drawFillTiles(t,e,r,i,a){for(var l=!0,n=0,o=i;n0?1/(1-r):1+r}function saturationFactor(r){return r>0?1-1/(1.001-r):-r}function getFadeValues(r,t,e,a){var i=e.paint[\"raster-fade-duration\"];if(r.sourceCache&&i>0){var o=Date.now(),n=(o-r.timeAdded)/i,u=t?(o-t.timeAdded)/i:-1,s=r.sourceCache.getSource(),c=a.coveringZoomLevel({tileSize:s.tileSize,roundZoom:s.roundZoom}),f=!t||Math.abs(t.coord.z-c)>Math.abs(r.coord.z-c),d=f&&r.refreshedUponExpiration?1:util.clamp(f?n:1-u,0,1);return r.refreshedUponExpiration&&n>=1&&(r.refreshedUponExpiration=!1),t?{opacity:1,mix:1-d}:{opacity:d,mix:0}}return{opacity:1,mix:0}}var util=require(\"../util/util\");module.exports=drawRaster;\n},{\"../util/util\":212}],74:[function(require,module,exports){\n\"use strict\";function drawSymbols(e,t,a,i){if(!e.isOpaquePass){var o=!(a.layout[\"text-allow-overlap\"]||a.layout[\"icon-allow-overlap\"]||a.layout[\"text-ignore-placement\"]||a.layout[\"icon-ignore-placement\"]),r=e.gl;o?r.disable(r.STENCIL_TEST):r.enable(r.STENCIL_TEST),e.setDepthSublayer(0),e.depthMask(!1),drawLayerSymbols(e,t,a,i,!1,a.paint[\"icon-translate\"],a.paint[\"icon-translate-anchor\"],a.layout[\"icon-rotation-alignment\"],a.layout[\"icon-rotation-alignment\"],a.layout[\"icon-size\"]),drawLayerSymbols(e,t,a,i,!0,a.paint[\"text-translate\"],a.paint[\"text-translate-anchor\"],a.layout[\"text-rotation-alignment\"],a.layout[\"text-pitch-alignment\"],a.layout[\"text-size\"]),t.map.showCollisionBoxes&&drawCollisionDebug(e,t,a,i)}}function drawLayerSymbols(e,t,a,i,o,r,n,l,s,u){if(o||!e.style.sprite||e.style.sprite.loaded()){var f=e.gl,m=\"map\"===l,p=\"map\"===s,c=p;c?f.enable(f.DEPTH_TEST):f.disable(f.DEPTH_TEST);for(var d,_,h=0,g=i;hthis.previousZoom;a--)r.changeTimes[a]=e,r.changeOpacities[a]=r.opacities[a];for(a=0;a<256;a++){var s=e-r.changeTimes[a],o=255*(i?s/i:1);a<=t?r.opacities[a]=r.changeOpacities[a]+o:r.opacities[a]=r.changeOpacities[a]-o}this.changed=!0,this.previousZoom=t},FrameHistory.prototype.bind=function(e){this.texture?(e.bindTexture(e.TEXTURE_2D,this.texture),this.changed&&(e.texSubImage2D(e.TEXTURE_2D,0,0,0,256,1,e.ALPHA,e.UNSIGNED_BYTE,this.array),this.changed=!1)):(this.texture=e.createTexture(),e.bindTexture(e.TEXTURE_2D,this.texture),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texImage2D(e.TEXTURE_2D,0,e.ALPHA,256,1,0,e.ALPHA,e.UNSIGNED_BYTE,this.array))},module.exports=FrameHistory;\n},{}],76:[function(require,module,exports){\n\"use strict\";var util=require(\"../util/util\"),LineAtlas=function(t,i){this.width=t,this.height=i,this.nextRow=0,this.bytes=4,this.data=new Uint8Array(this.width*this.height*this.bytes),this.positions={}};LineAtlas.prototype.setSprite=function(t){this.sprite=t},LineAtlas.prototype.getDash=function(t,i){var e=t.join(\",\")+i;return this.positions[e]||(this.positions[e]=this.addDash(t,i)),this.positions[e]},LineAtlas.prototype.addDash=function(t,i){var e=this,h=i?7:0,s=2*h+1,a=128;if(this.nextRow+s>this.height)return util.warnOnce(\"LineAtlas out of space\"),null;for(var r=0,n=0;n0?r.pop():null},Painter.prototype.getViewportTexture=function(e,r){var t=this.reusableTextures.viewport;if(t)return t.width===e&&t.height===r?t:(this.gl.deleteTexture(t),void(this.reusableTextures.viewport=null))},Painter.prototype.lineWidth=function(e){this.gl.lineWidth(util.clamp(e,this.lineWidthRange[0],this.lineWidthRange[1]))},Painter.prototype.showOverdrawInspector=function(e){if(e||this._showOverdrawInspector){this._showOverdrawInspector=e;var r=this.gl;if(e){r.blendFunc(r.CONSTANT_COLOR,r.ONE);var t=8,i=1/t;r.blendColor(i,i,i,0),r.clearColor(0,0,0,1),r.clear(r.COLOR_BUFFER_BIT)}else r.blendFunc(r.ONE,r.ONE_MINUS_SRC_ALPHA)}},Painter.prototype.createProgram=function(e,r){var t=this.gl,i=t.createProgram(),a=shaders[e],s=\"#define MAPBOX_GL_JS\\n#define DEVICE_PIXEL_RATIO \"+browser.devicePixelRatio.toFixed(1)+\"\\n\";this._showOverdrawInspector&&(s+=\"#define OVERDRAW_INSPECTOR;\\n\");var o=r.applyPragmas(s+shaders.prelude.fragmentSource+a.fragmentSource,\"fragment\"),n=r.applyPragmas(s+shaders.prelude.vertexSource+a.vertexSource,\"vertex\"),l=t.createShader(t.FRAGMENT_SHADER);t.shaderSource(l,o),t.compileShader(l),t.attachShader(i,l);var h=t.createShader(t.VERTEX_SHADER);t.shaderSource(h,n),t.compileShader(h),t.attachShader(i,h),t.linkProgram(i);for(var u=t.getProgramParameter(i,t.ACTIVE_ATTRIBUTES),c={program:i,numAttributes:u},p=0;p>16,n>>16),o.uniform2f(i.u_pixel_coord_lower,65535&u,65535&n)};\n},{\"../source/pixels_to_tile_units\":87}],79:[function(require,module,exports){\n\"use strict\";var path=require(\"path\");module.exports={prelude:{fragmentSource:\"#ifdef GL_ES\\nprecision mediump float;\\n#else\\n\\n#if !defined(lowp)\\n#define lowp\\n#endif\\n\\n#if !defined(mediump)\\n#define mediump\\n#endif\\n\\n#if !defined(highp)\\n#define highp\\n#endif\\n\\n#endif\\n\",vertexSource:\"#ifdef GL_ES\\nprecision highp float;\\n#else\\n\\n#if !defined(lowp)\\n#define lowp\\n#endif\\n\\n#if !defined(mediump)\\n#define mediump\\n#endif\\n\\n#if !defined(highp)\\n#define highp\\n#endif\\n\\n#endif\\n\\nfloat evaluate_zoom_function_1(const vec4 values, const float t) {\\n if (t < 1.0) {\\n return mix(values[0], values[1], t);\\n } else if (t < 2.0) {\\n return mix(values[1], values[2], t - 1.0);\\n } else {\\n return mix(values[2], values[3], t - 2.0);\\n }\\n}\\nvec4 evaluate_zoom_function_4(const vec4 value0, const vec4 value1, const vec4 value2, const vec4 value3, const float t) {\\n if (t < 1.0) {\\n return mix(value0, value1, t);\\n } else if (t < 2.0) {\\n return mix(value1, value2, t - 1.0);\\n } else {\\n return mix(value2, value3, t - 2.0);\\n }\\n}\\n\\n\\n// To minimize the number of attributes needed in the mapbox-gl-native shaders,\\n// we encode a 4-component color into a pair of floats (i.e. a vec2) as follows:\\n// [ floor(color.r * 255) * 256 + color.g * 255,\\n// floor(color.b * 255) * 256 + color.g * 255 ]\\nvec4 decode_color(const vec2 encodedColor) {\\n float r = floor(encodedColor[0]/256.0)/255.0;\\n float g = (encodedColor[0] - r*256.0*255.0)/255.0;\\n float b = floor(encodedColor[1]/256.0)/255.0;\\n float a = (encodedColor[1] - b*256.0*255.0)/255.0;\\n return vec4(r, g, b, a);\\n}\\n\\n// Unpack a pair of paint values and interpolate between them.\\nfloat unpack_mix_vec2(const vec2 packedValue, const float t) {\\n return mix(packedValue[0], packedValue[1], t);\\n}\\n\\n// Unpack a pair of paint values and interpolate between them.\\nvec4 unpack_mix_vec4(const vec4 packedColors, const float t) {\\n vec4 minColor = decode_color(vec2(packedColors[0], packedColors[1]));\\n vec4 maxColor = decode_color(vec2(packedColors[2], packedColors[3]));\\n return mix(minColor, maxColor, t);\\n}\\n\\n// The offset depends on how many pixels are between the world origin and the edge of the tile:\\n// vec2 offset = mod(pixel_coord, size)\\n//\\n// At high zoom levels there are a ton of pixels between the world origin and the edge of the tile.\\n// The glsl spec only guarantees 16 bits of precision for highp floats. We need more than that.\\n//\\n// The pixel_coord is passed in as two 16 bit values:\\n// pixel_coord_upper = floor(pixel_coord / 2^16)\\n// pixel_coord_lower = mod(pixel_coord, 2^16)\\n//\\n// The offset is calculated in a series of steps that should preserve this precision:\\nvec2 get_pattern_pos(const vec2 pixel_coord_upper, const vec2 pixel_coord_lower,\\n const vec2 pattern_size, const float tile_units_to_pixels, const vec2 pos) {\\n\\n vec2 offset = mod(mod(mod(pixel_coord_upper, pattern_size) * 256.0, pattern_size) * 256.0 + pixel_coord_lower, pattern_size);\\n return (tile_units_to_pixels * pos + offset) / pattern_size;\\n}\\n\"},circle:{fragmentSource:\"#pragma mapbox: define lowp vec4 color\\n#pragma mapbox: define mediump float radius\\n#pragma mapbox: define lowp float blur\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define lowp vec4 stroke_color\\n#pragma mapbox: define mediump float stroke_width\\n#pragma mapbox: define lowp float stroke_opacity\\n\\nvarying vec2 v_extrude;\\nvarying lowp float v_antialiasblur;\\n\\nvoid main() {\\n #pragma mapbox: initialize lowp vec4 color\\n #pragma mapbox: initialize mediump float radius\\n #pragma mapbox: initialize lowp float blur\\n #pragma mapbox: initialize lowp float opacity\\n #pragma mapbox: initialize lowp vec4 stroke_color\\n #pragma mapbox: initialize mediump float stroke_width\\n #pragma mapbox: initialize lowp float stroke_opacity\\n\\n float extrude_length = length(v_extrude);\\n float antialiased_blur = -max(blur, v_antialiasblur);\\n\\n float opacity_t = smoothstep(0.0, antialiased_blur, extrude_length - 1.0);\\n\\n float color_t = stroke_width < 0.01 ? 0.0 : smoothstep(\\n antialiased_blur,\\n 0.0,\\n extrude_length - radius / (radius + stroke_width)\\n );\\n\\n gl_FragColor = opacity_t * mix(color * opacity, stroke_color * stroke_opacity, color_t);\\n\\n#ifdef OVERDRAW_INSPECTOR\\n gl_FragColor = vec4(1.0);\\n#endif\\n}\\n\",vertexSource:\"uniform mat4 u_matrix;\\nuniform bool u_scale_with_map;\\nuniform vec2 u_extrude_scale;\\n\\nattribute vec2 a_pos;\\n\\n#pragma mapbox: define lowp vec4 color\\n#pragma mapbox: define mediump float radius\\n#pragma mapbox: define lowp float blur\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define lowp vec4 stroke_color\\n#pragma mapbox: define mediump float stroke_width\\n#pragma mapbox: define lowp float stroke_opacity\\n\\nvarying vec2 v_extrude;\\nvarying lowp float v_antialiasblur;\\n\\nvoid main(void) {\\n #pragma mapbox: initialize lowp vec4 color\\n #pragma mapbox: initialize mediump float radius\\n #pragma mapbox: initialize lowp float blur\\n #pragma mapbox: initialize lowp float opacity\\n #pragma mapbox: initialize lowp vec4 stroke_color\\n #pragma mapbox: initialize mediump float stroke_width\\n #pragma mapbox: initialize lowp float stroke_opacity\\n\\n // unencode the extrusion vector that we snuck into the a_pos vector\\n v_extrude = vec2(mod(a_pos, 2.0) * 2.0 - 1.0);\\n\\n vec2 extrude = v_extrude * (radius + stroke_width) * u_extrude_scale;\\n // multiply a_pos by 0.5, since we had it * 2 in order to sneak\\n // in extrusion data\\n gl_Position = u_matrix * vec4(floor(a_pos * 0.5), 0, 1);\\n\\n if (u_scale_with_map) {\\n gl_Position.xy += extrude;\\n } else {\\n gl_Position.xy += extrude * gl_Position.w;\\n }\\n\\n // This is a minimum blur distance that serves as a faux-antialiasing for\\n // the circle. since blur is a ratio of the circle's size and the intent is\\n // to keep the blur at roughly 1px, the two are inversely related.\\n v_antialiasblur = 1.0 / DEVICE_PIXEL_RATIO / (radius + stroke_width);\\n}\\n\"},collisionBox:{fragmentSource:\"uniform float u_zoom;\\nuniform float u_maxzoom;\\n\\nvarying float v_max_zoom;\\nvarying float v_placement_zoom;\\n\\nvoid main() {\\n\\n float alpha = 0.5;\\n\\n gl_FragColor = vec4(0.0, 1.0, 0.0, 1.0) * alpha;\\n\\n if (v_placement_zoom > u_zoom) {\\n gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0) * alpha;\\n }\\n\\n if (u_zoom >= v_max_zoom) {\\n gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0) * alpha * 0.25;\\n }\\n\\n if (v_placement_zoom >= u_maxzoom) {\\n gl_FragColor = vec4(0.0, 0.0, 1.0, 1.0) * alpha * 0.2;\\n }\\n}\\n\",vertexSource:\"attribute vec2 a_pos;\\nattribute vec2 a_extrude;\\nattribute vec2 a_data;\\n\\nuniform mat4 u_matrix;\\nuniform float u_scale;\\n\\nvarying float v_max_zoom;\\nvarying float v_placement_zoom;\\n\\nvoid main() {\\n gl_Position = u_matrix * vec4(a_pos + a_extrude / u_scale, 0.0, 1.0);\\n\\n v_max_zoom = a_data.x;\\n v_placement_zoom = a_data.y;\\n}\\n\"},debug:{fragmentSource:\"uniform lowp vec4 u_color;\\n\\nvoid main() {\\n gl_FragColor = u_color;\\n}\\n\",vertexSource:\"attribute vec2 a_pos;\\n\\nuniform mat4 u_matrix;\\n\\nvoid main() {\\n gl_Position = u_matrix * vec4(a_pos, step(32767.0, a_pos.x), 1);\\n}\\n\"},fill:{fragmentSource:\"#pragma mapbox: define lowp vec4 color\\n#pragma mapbox: define lowp float opacity\\n\\nvoid main() {\\n #pragma mapbox: initialize lowp vec4 color\\n #pragma mapbox: initialize lowp float opacity\\n\\n gl_FragColor = color * opacity;\\n\\n#ifdef OVERDRAW_INSPECTOR\\n gl_FragColor = vec4(1.0);\\n#endif\\n}\\n\",vertexSource:\"attribute vec2 a_pos;\\n\\nuniform mat4 u_matrix;\\n\\n#pragma mapbox: define lowp vec4 color\\n#pragma mapbox: define lowp float opacity\\n\\nvoid main() {\\n #pragma mapbox: initialize lowp vec4 color\\n #pragma mapbox: initialize lowp float opacity\\n\\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\\n}\\n\"},fillOutline:{fragmentSource:\"#pragma mapbox: define lowp vec4 outline_color\\n#pragma mapbox: define lowp float opacity\\n\\nvarying vec2 v_pos;\\n\\nvoid main() {\\n #pragma mapbox: initialize lowp vec4 outline_color\\n #pragma mapbox: initialize lowp float opacity\\n\\n float dist = length(v_pos - gl_FragCoord.xy);\\n float alpha = smoothstep(1.0, 0.0, dist);\\n gl_FragColor = outline_color * (alpha * opacity);\\n\\n#ifdef OVERDRAW_INSPECTOR\\n gl_FragColor = vec4(1.0);\\n#endif\\n}\\n\",vertexSource:\"attribute vec2 a_pos;\\n\\nuniform mat4 u_matrix;\\nuniform vec2 u_world;\\n\\nvarying vec2 v_pos;\\n\\n#pragma mapbox: define lowp vec4 outline_color\\n#pragma mapbox: define lowp float opacity\\n\\nvoid main() {\\n #pragma mapbox: initialize lowp vec4 outline_color\\n #pragma mapbox: initialize lowp float opacity\\n\\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\\n v_pos = (gl_Position.xy / gl_Position.w + 1.0) / 2.0 * u_world;\\n}\\n\"},fillOutlinePattern:{fragmentSource:\"uniform vec2 u_pattern_tl_a;\\nuniform vec2 u_pattern_br_a;\\nuniform vec2 u_pattern_tl_b;\\nuniform vec2 u_pattern_br_b;\\nuniform float u_mix;\\n\\nuniform sampler2D u_image;\\n\\nvarying vec2 v_pos_a;\\nvarying vec2 v_pos_b;\\nvarying vec2 v_pos;\\n\\n#pragma mapbox: define lowp float opacity\\n\\nvoid main() {\\n #pragma mapbox: initialize lowp float opacity\\n\\n vec2 imagecoord = mod(v_pos_a, 1.0);\\n vec2 pos = mix(u_pattern_tl_a, u_pattern_br_a, imagecoord);\\n vec4 color1 = texture2D(u_image, pos);\\n\\n vec2 imagecoord_b = mod(v_pos_b, 1.0);\\n vec2 pos2 = mix(u_pattern_tl_b, u_pattern_br_b, imagecoord_b);\\n vec4 color2 = texture2D(u_image, pos2);\\n\\n // find distance to outline for alpha interpolation\\n\\n float dist = length(v_pos - gl_FragCoord.xy);\\n float alpha = smoothstep(1.0, 0.0, dist);\\n\\n\\n gl_FragColor = mix(color1, color2, u_mix) * alpha * opacity;\\n\\n#ifdef OVERDRAW_INSPECTOR\\n gl_FragColor = vec4(1.0);\\n#endif\\n}\\n\",vertexSource:\"uniform mat4 u_matrix;\\nuniform vec2 u_world;\\nuniform vec2 u_pattern_size_a;\\nuniform vec2 u_pattern_size_b;\\nuniform vec2 u_pixel_coord_upper;\\nuniform vec2 u_pixel_coord_lower;\\nuniform float u_scale_a;\\nuniform float u_scale_b;\\nuniform float u_tile_units_to_pixels;\\n\\nattribute vec2 a_pos;\\n\\nvarying vec2 v_pos_a;\\nvarying vec2 v_pos_b;\\nvarying vec2 v_pos;\\n\\n#pragma mapbox: define lowp float opacity\\n\\nvoid main() {\\n #pragma mapbox: initialize lowp float opacity\\n\\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\\n\\n v_pos_a = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_a * u_pattern_size_a, u_tile_units_to_pixels, a_pos);\\n v_pos_b = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_b * u_pattern_size_b, u_tile_units_to_pixels, a_pos);\\n\\n v_pos = (gl_Position.xy / gl_Position.w + 1.0) / 2.0 * u_world;\\n}\\n\"},fillPattern:{fragmentSource:\"uniform vec2 u_pattern_tl_a;\\nuniform vec2 u_pattern_br_a;\\nuniform vec2 u_pattern_tl_b;\\nuniform vec2 u_pattern_br_b;\\nuniform float u_mix;\\n\\nuniform sampler2D u_image;\\n\\nvarying vec2 v_pos_a;\\nvarying vec2 v_pos_b;\\n\\n#pragma mapbox: define lowp float opacity\\n\\nvoid main() {\\n #pragma mapbox: initialize lowp float opacity\\n\\n vec2 imagecoord = mod(v_pos_a, 1.0);\\n vec2 pos = mix(u_pattern_tl_a, u_pattern_br_a, imagecoord);\\n vec4 color1 = texture2D(u_image, pos);\\n\\n vec2 imagecoord_b = mod(v_pos_b, 1.0);\\n vec2 pos2 = mix(u_pattern_tl_b, u_pattern_br_b, imagecoord_b);\\n vec4 color2 = texture2D(u_image, pos2);\\n\\n gl_FragColor = mix(color1, color2, u_mix) * opacity;\\n\\n#ifdef OVERDRAW_INSPECTOR\\n gl_FragColor = vec4(1.0);\\n#endif\\n}\\n\",vertexSource:\"uniform mat4 u_matrix;\\nuniform vec2 u_pattern_size_a;\\nuniform vec2 u_pattern_size_b;\\nuniform vec2 u_pixel_coord_upper;\\nuniform vec2 u_pixel_coord_lower;\\nuniform float u_scale_a;\\nuniform float u_scale_b;\\nuniform float u_tile_units_to_pixels;\\n\\nattribute vec2 a_pos;\\n\\nvarying vec2 v_pos_a;\\nvarying vec2 v_pos_b;\\n\\n#pragma mapbox: define lowp float opacity\\n\\nvoid main() {\\n #pragma mapbox: initialize lowp float opacity\\n\\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\\n\\n v_pos_a = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_a * u_pattern_size_a, u_tile_units_to_pixels, a_pos);\\n v_pos_b = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_b * u_pattern_size_b, u_tile_units_to_pixels, a_pos);\\n}\\n\"},fillExtrusion:{fragmentSource:\"varying vec4 v_color;\\n#pragma mapbox: define lowp float base\\n#pragma mapbox: define lowp float height\\n#pragma mapbox: define lowp vec4 color\\n\\nvoid main() {\\n #pragma mapbox: initialize lowp float base\\n #pragma mapbox: initialize lowp float height\\n #pragma mapbox: initialize lowp vec4 color\\n\\n gl_FragColor = v_color;\\n\\n#ifdef OVERDRAW_INSPECTOR\\n gl_FragColor = vec4(1.0);\\n#endif\\n}\\n\",vertexSource:\"uniform mat4 u_matrix;\\nuniform vec3 u_lightcolor;\\nuniform lowp vec3 u_lightpos;\\nuniform lowp float u_lightintensity;\\n\\nattribute vec2 a_pos;\\nattribute vec3 a_normal;\\nattribute float a_edgedistance;\\n\\nvarying vec4 v_color;\\n\\n#pragma mapbox: define lowp float base\\n#pragma mapbox: define lowp float height\\n\\n#pragma mapbox: define lowp vec4 color\\n\\nvoid main() {\\n #pragma mapbox: initialize lowp float base\\n #pragma mapbox: initialize lowp float height\\n #pragma mapbox: initialize lowp vec4 color\\n\\n float ed = a_edgedistance; // use each attrib in order to not trip a VAO assert\\n float t = mod(a_normal.x, 2.0);\\n\\n gl_Position = u_matrix * vec4(a_pos, t > 0.0 ? height : base, 1);\\n\\n // Relative luminance (how dark/bright is the surface color?)\\n float colorvalue = color.r * 0.2126 + color.g * 0.7152 + color.b * 0.0722;\\n\\n v_color = vec4(0.0, 0.0, 0.0, 1.0);\\n\\n // Add slight ambient lighting so no extrusions are totally black\\n vec4 ambientlight = vec4(0.03, 0.03, 0.03, 1.0);\\n color += ambientlight;\\n\\n // Calculate cos(theta), where theta is the angle between surface normal and diffuse light ray\\n float directional = clamp(dot(a_normal / 16384.0, u_lightpos), 0.0, 1.0);\\n\\n // Adjust directional so that\\n // the range of values for highlight/shading is narrower\\n // with lower light intensity\\n // and with lighter/brighter surface colors\\n directional = mix((1.0 - u_lightintensity), max((1.0 - colorvalue + u_lightintensity), 1.0), directional);\\n\\n // Add gradient along z axis of side surfaces\\n if (a_normal.y != 0.0) {\\n directional *= clamp((t + base) * pow(height / 150.0, 0.5), mix(0.7, 0.98, 1.0 - u_lightintensity), 1.0);\\n }\\n\\n // Assign final color based on surface + ambient light color, diffuse light directional, and light color\\n // with lower bounds adjusted to hue of light\\n // so that shading is tinted with the complementary (opposite) color to the light color\\n v_color.r += clamp(color.r * directional * u_lightcolor.r, mix(0.0, 0.3, 1.0 - u_lightcolor.r), 1.0);\\n v_color.g += clamp(color.g * directional * u_lightcolor.g, mix(0.0, 0.3, 1.0 - u_lightcolor.g), 1.0);\\n v_color.b += clamp(color.b * directional * u_lightcolor.b, mix(0.0, 0.3, 1.0 - u_lightcolor.b), 1.0);\\n}\\n\"},fillExtrusionPattern:{fragmentSource:\"uniform vec2 u_pattern_tl_a;\\nuniform vec2 u_pattern_br_a;\\nuniform vec2 u_pattern_tl_b;\\nuniform vec2 u_pattern_br_b;\\nuniform float u_mix;\\n\\nuniform sampler2D u_image;\\n\\nvarying vec2 v_pos_a;\\nvarying vec2 v_pos_b;\\nvarying vec4 v_lighting;\\n\\n#pragma mapbox: define lowp float base\\n#pragma mapbox: define lowp float height\\n\\nvoid main() {\\n #pragma mapbox: initialize lowp float base\\n #pragma mapbox: initialize lowp float height\\n\\n vec2 imagecoord = mod(v_pos_a, 1.0);\\n vec2 pos = mix(u_pattern_tl_a, u_pattern_br_a, imagecoord);\\n vec4 color1 = texture2D(u_image, pos);\\n\\n vec2 imagecoord_b = mod(v_pos_b, 1.0);\\n vec2 pos2 = mix(u_pattern_tl_b, u_pattern_br_b, imagecoord_b);\\n vec4 color2 = texture2D(u_image, pos2);\\n\\n vec4 mixedColor = mix(color1, color2, u_mix);\\n\\n gl_FragColor = mixedColor * v_lighting;\\n\\n#ifdef OVERDRAW_INSPECTOR\\n gl_FragColor = vec4(1.0);\\n#endif\\n}\\n\",vertexSource:\"uniform mat4 u_matrix;\\nuniform vec2 u_pattern_size_a;\\nuniform vec2 u_pattern_size_b;\\nuniform vec2 u_pixel_coord_upper;\\nuniform vec2 u_pixel_coord_lower;\\nuniform float u_scale_a;\\nuniform float u_scale_b;\\nuniform float u_tile_units_to_pixels;\\nuniform float u_height_factor;\\n\\nuniform vec3 u_lightcolor;\\nuniform lowp vec3 u_lightpos;\\nuniform lowp float u_lightintensity;\\n\\nattribute vec2 a_pos;\\nattribute vec3 a_normal;\\nattribute float a_edgedistance;\\n\\nvarying vec2 v_pos_a;\\nvarying vec2 v_pos_b;\\nvarying vec4 v_lighting;\\nvarying float v_directional;\\n\\n#pragma mapbox: define lowp float base\\n#pragma mapbox: define lowp float height\\n\\nvoid main() {\\n #pragma mapbox: initialize lowp float base\\n #pragma mapbox: initialize lowp float height\\n\\n float t = mod(a_normal.x, 2.0);\\n float z = t > 0.0 ? height : base;\\n\\n gl_Position = u_matrix * vec4(a_pos, z, 1);\\n\\n vec2 pos = a_normal.x == 1.0 && a_normal.y == 0.0 && a_normal.z == 16384.0\\n ? a_pos // extrusion top\\n : vec2(a_edgedistance, z * u_height_factor); // extrusion side\\n\\n v_pos_a = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_a * u_pattern_size_a, u_tile_units_to_pixels, pos);\\n v_pos_b = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_b * u_pattern_size_b, u_tile_units_to_pixels, pos);\\n\\n v_lighting = vec4(0.0, 0.0, 0.0, 1.0);\\n float directional = clamp(dot(a_normal / 16383.0, u_lightpos), 0.0, 1.0);\\n directional = mix((1.0 - u_lightintensity), max((0.5 + u_lightintensity), 1.0), directional);\\n\\n if (a_normal.y != 0.0) {\\n directional *= clamp((t + base) * pow(height / 150.0, 0.5), mix(0.7, 0.98, 1.0 - u_lightintensity), 1.0);\\n }\\n\\n v_lighting.rgb += clamp(directional * u_lightcolor, mix(vec3(0.0), vec3(0.3), 1.0 - u_lightcolor), vec3(1.0));\\n}\\n\"},extrusionTexture:{fragmentSource:\"uniform sampler2D u_texture;\\nuniform float u_opacity;\\n\\nvarying vec2 v_pos;\\n\\nvoid main() {\\n gl_FragColor = texture2D(u_texture, v_pos) * u_opacity;\\n\\n#ifdef OVERDRAW_INSPECTOR\\n gl_FragColor = vec4(0.0);\\n#endif\\n}\\n\",vertexSource:\"uniform mat4 u_matrix;\\nuniform int u_xdim;\\nuniform int u_ydim;\\nattribute vec2 a_pos;\\nvarying vec2 v_pos;\\n\\nvoid main() {\\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\\n\\n v_pos.x = a_pos.x / float(u_xdim);\\n v_pos.y = 1.0 - a_pos.y / float(u_ydim);\\n}\\n\"},line:{fragmentSource:\"#pragma mapbox: define lowp vec4 color\\n#pragma mapbox: define lowp float blur\\n#pragma mapbox: define lowp float opacity\\n\\nvarying vec2 v_width2;\\nvarying vec2 v_normal;\\nvarying float v_gamma_scale;\\n\\nvoid main() {\\n #pragma mapbox: initialize lowp vec4 color\\n #pragma mapbox: initialize lowp float blur\\n #pragma mapbox: initialize lowp float opacity\\n\\n // Calculate the distance of the pixel from the line in pixels.\\n float dist = length(v_normal) * v_width2.s;\\n\\n // Calculate the antialiasing fade factor. This is either when fading in\\n // the line in case of an offset line (v_width2.t) or when fading out\\n // (v_width2.s)\\n float blur2 = (blur + 1.0 / DEVICE_PIXEL_RATIO) * v_gamma_scale;\\n float alpha = clamp(min(dist - (v_width2.t - blur2), v_width2.s - dist) / blur2, 0.0, 1.0);\\n\\n gl_FragColor = color * (alpha * opacity);\\n\\n#ifdef OVERDRAW_INSPECTOR\\n gl_FragColor = vec4(1.0);\\n#endif\\n}\\n\",vertexSource:\"\\n\\n// the distance over which the line edge fades out.\\n// Retina devices need a smaller distance to avoid aliasing.\\n#define ANTIALIASING 1.0 / DEVICE_PIXEL_RATIO / 2.0\\n\\n// floor(127 / 2) == 63.0\\n// the maximum allowed miter limit is 2.0 at the moment. the extrude normal is\\n// stored in a byte (-128..127). we scale regular normals up to length 63, but\\n// there are also \\\"special\\\" normals that have a bigger length (of up to 126 in\\n// this case).\\n// #define scale 63.0\\n#define scale 0.015873016\\n\\nattribute vec2 a_pos;\\nattribute vec4 a_data;\\n\\nuniform mat4 u_matrix;\\nuniform mediump float u_ratio;\\nuniform mediump float u_width;\\nuniform vec2 u_gl_units_to_pixels;\\n\\nvarying vec2 v_normal;\\nvarying vec2 v_width2;\\nvarying float v_gamma_scale;\\n\\n#pragma mapbox: define lowp vec4 color\\n#pragma mapbox: define lowp float blur\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define mediump float gapwidth\\n#pragma mapbox: define lowp float offset\\n\\nvoid main() {\\n #pragma mapbox: initialize lowp vec4 color\\n #pragma mapbox: initialize lowp float blur\\n #pragma mapbox: initialize lowp float opacity\\n #pragma mapbox: initialize mediump float gapwidth\\n #pragma mapbox: initialize lowp float offset\\n\\n vec2 a_extrude = a_data.xy - 128.0;\\n float a_direction = mod(a_data.z, 4.0) - 1.0;\\n\\n // We store the texture normals in the most insignificant bit\\n // transform y so that 0 => -1 and 1 => 1\\n // In the texture normal, x is 0 if the normal points straight up/down and 1 if it's a round cap\\n // y is 1 if the normal points up, and -1 if it points down\\n mediump vec2 normal = mod(a_pos, 2.0);\\n normal.y = sign(normal.y - 0.5);\\n v_normal = normal;\\n\\n\\n // these transformations used to be applied in the JS and native code bases. \\n // moved them into the shader for clarity and simplicity. \\n gapwidth = gapwidth / 2.0;\\n float width = u_width / 2.0;\\n offset = -1.0 * offset; \\n\\n float inset = gapwidth + (gapwidth > 0.0 ? ANTIALIASING : 0.0);\\n float outset = gapwidth + width * (gapwidth > 0.0 ? 2.0 : 1.0) + ANTIALIASING;\\n\\n // Scale the extrusion vector down to a normal and then up by the line width\\n // of this vertex.\\n mediump vec2 dist = outset * a_extrude * scale;\\n\\n // Calculate the offset when drawing a line that is to the side of the actual line.\\n // We do this by creating a vector that points towards the extrude, but rotate\\n // it when we're drawing round end points (a_direction = -1 or 1) since their\\n // extrude vector points in another direction.\\n mediump float u = 0.5 * a_direction;\\n mediump float t = 1.0 - abs(u);\\n mediump vec2 offset2 = offset * a_extrude * scale * normal.y * mat2(t, -u, u, t);\\n\\n // Remove the texture normal bit to get the position\\n vec2 pos = floor(a_pos * 0.5);\\n\\n vec4 projected_extrude = u_matrix * vec4(dist / u_ratio, 0.0, 0.0);\\n gl_Position = u_matrix * vec4(pos + offset2 / u_ratio, 0.0, 1.0) + projected_extrude;\\n\\n // calculate how much the perspective view squishes or stretches the extrude\\n float extrude_length_without_perspective = length(dist);\\n float extrude_length_with_perspective = length(projected_extrude.xy / gl_Position.w * u_gl_units_to_pixels);\\n v_gamma_scale = extrude_length_without_perspective / extrude_length_with_perspective;\\n\\n v_width2 = vec2(outset, inset);\\n}\\n\"},linePattern:{fragmentSource:\"uniform vec2 u_pattern_size_a;\\nuniform vec2 u_pattern_size_b;\\nuniform vec2 u_pattern_tl_a;\\nuniform vec2 u_pattern_br_a;\\nuniform vec2 u_pattern_tl_b;\\nuniform vec2 u_pattern_br_b;\\nuniform float u_fade;\\n\\nuniform sampler2D u_image;\\n\\nvarying vec2 v_normal;\\nvarying vec2 v_width2;\\nvarying float v_linesofar;\\nvarying float v_gamma_scale;\\n\\n#pragma mapbox: define lowp float blur\\n#pragma mapbox: define lowp float opacity\\n\\nvoid main() {\\n #pragma mapbox: initialize lowp float blur\\n #pragma mapbox: initialize lowp float opacity\\n\\n // Calculate the distance of the pixel from the line in pixels.\\n float dist = length(v_normal) * v_width2.s;\\n\\n // Calculate the antialiasing fade factor. This is either when fading in\\n // the line in case of an offset line (v_width2.t) or when fading out\\n // (v_width2.s)\\n float blur2 = (blur + 1.0 / DEVICE_PIXEL_RATIO) * v_gamma_scale;\\n float alpha = clamp(min(dist - (v_width2.t - blur2), v_width2.s - dist) / blur2, 0.0, 1.0);\\n\\n float x_a = mod(v_linesofar / u_pattern_size_a.x, 1.0);\\n float x_b = mod(v_linesofar / u_pattern_size_b.x, 1.0);\\n float y_a = 0.5 + (v_normal.y * v_width2.s / u_pattern_size_a.y);\\n float y_b = 0.5 + (v_normal.y * v_width2.s / u_pattern_size_b.y);\\n vec2 pos_a = mix(u_pattern_tl_a, u_pattern_br_a, vec2(x_a, y_a));\\n vec2 pos_b = mix(u_pattern_tl_b, u_pattern_br_b, vec2(x_b, y_b));\\n\\n vec4 color = mix(texture2D(u_image, pos_a), texture2D(u_image, pos_b), u_fade);\\n\\n gl_FragColor = color * alpha * opacity;\\n\\n#ifdef OVERDRAW_INSPECTOR\\n gl_FragColor = vec4(1.0);\\n#endif\\n}\\n\",vertexSource:\"// floor(127 / 2) == 63.0\\n// the maximum allowed miter limit is 2.0 at the moment. the extrude normal is\\n// stored in a byte (-128..127). we scale regular normals up to length 63, but\\n// there are also \\\"special\\\" normals that have a bigger length (of up to 126 in\\n// this case).\\n// #define scale 63.0\\n#define scale 0.015873016\\n\\n// We scale the distance before adding it to the buffers so that we can store\\n// long distances for long segments. Use this value to unscale the distance.\\n#define LINE_DISTANCE_SCALE 2.0\\n\\n// the distance over which the line edge fades out.\\n// Retina devices need a smaller distance to avoid aliasing.\\n#define ANTIALIASING 1.0 / DEVICE_PIXEL_RATIO / 2.0\\n\\nattribute vec2 a_pos;\\nattribute vec4 a_data;\\n\\nuniform mat4 u_matrix;\\nuniform mediump float u_ratio;\\nuniform mediump float u_width;\\nuniform vec2 u_gl_units_to_pixels;\\n\\nvarying vec2 v_normal;\\nvarying vec2 v_width2;\\nvarying float v_linesofar;\\nvarying float v_gamma_scale;\\n\\n#pragma mapbox: define lowp float blur\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define lowp float offset\\n#pragma mapbox: define mediump float gapwidth\\n\\nvoid main() {\\n #pragma mapbox: initialize lowp float blur\\n #pragma mapbox: initialize lowp float opacity\\n #pragma mapbox: initialize lowp float offset\\n #pragma mapbox: initialize mediump float gapwidth\\n\\n vec2 a_extrude = a_data.xy - 128.0;\\n float a_direction = mod(a_data.z, 4.0) - 1.0;\\n float a_linesofar = (floor(a_data.z / 4.0) + a_data.w * 64.0) * LINE_DISTANCE_SCALE;\\n\\n // We store the texture normals in the most insignificant bit\\n // transform y so that 0 => -1 and 1 => 1\\n // In the texture normal, x is 0 if the normal points straight up/down and 1 if it's a round cap\\n // y is 1 if the normal points up, and -1 if it points down\\n mediump vec2 normal = mod(a_pos, 2.0);\\n normal.y = sign(normal.y - 0.5);\\n v_normal = normal;\\n\\n // these transformations used to be applied in the JS and native code bases. \\n // moved them into the shader for clarity and simplicity. \\n gapwidth = gapwidth / 2.0;\\n float width = u_width / 2.0;\\n offset = -1.0 * offset; \\n\\n float inset = gapwidth + (gapwidth > 0.0 ? ANTIALIASING : 0.0);\\n float outset = gapwidth + width * (gapwidth > 0.0 ? 2.0 : 1.0) + ANTIALIASING;\\n\\n // Scale the extrusion vector down to a normal and then up by the line width\\n // of this vertex.\\n mediump vec2 dist = outset * a_extrude * scale;\\n\\n // Calculate the offset when drawing a line that is to the side of the actual line.\\n // We do this by creating a vector that points towards the extrude, but rotate\\n // it when we're drawing round end points (a_direction = -1 or 1) since their\\n // extrude vector points in another direction.\\n mediump float u = 0.5 * a_direction;\\n mediump float t = 1.0 - abs(u);\\n mediump vec2 offset2 = offset * a_extrude * scale * normal.y * mat2(t, -u, u, t);\\n\\n // Remove the texture normal bit to get the position\\n vec2 pos = floor(a_pos * 0.5);\\n\\n vec4 projected_extrude = u_matrix * vec4(dist / u_ratio, 0.0, 0.0);\\n gl_Position = u_matrix * vec4(pos + offset2 / u_ratio, 0.0, 1.0) + projected_extrude;\\n\\n // calculate how much the perspective view squishes or stretches the extrude\\n float extrude_length_without_perspective = length(dist);\\n float extrude_length_with_perspective = length(projected_extrude.xy / gl_Position.w * u_gl_units_to_pixels);\\n v_gamma_scale = extrude_length_without_perspective / extrude_length_with_perspective;\\n\\n v_linesofar = a_linesofar;\\n v_width2 = vec2(outset, inset);\\n}\\n\"},lineSDF:{fragmentSource:\"\\nuniform sampler2D u_image;\\nuniform float u_sdfgamma;\\nuniform float u_mix;\\n\\nvarying vec2 v_normal;\\nvarying vec2 v_width2;\\nvarying vec2 v_tex_a;\\nvarying vec2 v_tex_b;\\nvarying float v_gamma_scale;\\n\\n#pragma mapbox: define lowp vec4 color\\n#pragma mapbox: define lowp float blur\\n#pragma mapbox: define lowp float opacity\\n\\nvoid main() {\\n #pragma mapbox: initialize lowp vec4 color\\n #pragma mapbox: initialize lowp float blur\\n #pragma mapbox: initialize lowp float opacity\\n\\n // Calculate the distance of the pixel from the line in pixels.\\n float dist = length(v_normal) * v_width2.s;\\n\\n // Calculate the antialiasing fade factor. This is either when fading in\\n // the line in case of an offset line (v_width2.t) or when fading out\\n // (v_width2.s)\\n float blur2 = (blur + 1.0 / DEVICE_PIXEL_RATIO) * v_gamma_scale;\\n float alpha = clamp(min(dist - (v_width2.t - blur2), v_width2.s - dist) / blur2, 0.0, 1.0);\\n\\n float sdfdist_a = texture2D(u_image, v_tex_a).a;\\n float sdfdist_b = texture2D(u_image, v_tex_b).a;\\n float sdfdist = mix(sdfdist_a, sdfdist_b, u_mix);\\n alpha *= smoothstep(0.5 - u_sdfgamma, 0.5 + u_sdfgamma, sdfdist);\\n\\n gl_FragColor = color * (alpha * opacity);\\n\\n#ifdef OVERDRAW_INSPECTOR\\n gl_FragColor = vec4(1.0);\\n#endif\\n}\\n\",vertexSource:\"// floor(127 / 2) == 63.0\\n// the maximum allowed miter limit is 2.0 at the moment. the extrude normal is\\n// stored in a byte (-128..127). we scale regular normals up to length 63, but\\n// there are also \\\"special\\\" normals that have a bigger length (of up to 126 in\\n// this case).\\n// #define scale 63.0\\n#define scale 0.015873016\\n\\n// We scale the distance before adding it to the buffers so that we can store\\n// long distances for long segments. Use this value to unscale the distance.\\n#define LINE_DISTANCE_SCALE 2.0\\n\\n// the distance over which the line edge fades out.\\n// Retina devices need a smaller distance to avoid aliasing.\\n#define ANTIALIASING 1.0 / DEVICE_PIXEL_RATIO / 2.0\\n\\nattribute vec2 a_pos;\\nattribute vec4 a_data;\\n\\nuniform mat4 u_matrix;\\nuniform mediump float u_ratio;\\nuniform vec2 u_patternscale_a;\\nuniform float u_tex_y_a;\\nuniform vec2 u_patternscale_b;\\nuniform float u_tex_y_b;\\nuniform vec2 u_gl_units_to_pixels;\\nuniform mediump float u_width;\\n\\nvarying vec2 v_normal;\\nvarying vec2 v_width2;\\nvarying vec2 v_tex_a;\\nvarying vec2 v_tex_b;\\nvarying float v_gamma_scale;\\n\\n#pragma mapbox: define lowp vec4 color\\n#pragma mapbox: define lowp float blur\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define mediump float gapwidth\\n#pragma mapbox: define lowp float offset\\n\\nvoid main() {\\n #pragma mapbox: initialize lowp vec4 color\\n #pragma mapbox: initialize lowp float blur\\n #pragma mapbox: initialize lowp float opacity\\n #pragma mapbox: initialize mediump float gapwidth\\n #pragma mapbox: initialize lowp float offset\\n\\n vec2 a_extrude = a_data.xy - 128.0;\\n float a_direction = mod(a_data.z, 4.0) - 1.0;\\n float a_linesofar = (floor(a_data.z / 4.0) + a_data.w * 64.0) * LINE_DISTANCE_SCALE;\\n\\n // We store the texture normals in the most insignificant bit\\n // transform y so that 0 => -1 and 1 => 1\\n // In the texture normal, x is 0 if the normal points straight up/down and 1 if it's a round cap\\n // y is 1 if the normal points up, and -1 if it points down\\n mediump vec2 normal = mod(a_pos, 2.0);\\n normal.y = sign(normal.y - 0.5);\\n v_normal = normal;\\n\\n // these transformations used to be applied in the JS and native code bases. \\n // moved them into the shader for clarity and simplicity. \\n gapwidth = gapwidth / 2.0;\\n float width = u_width / 2.0;\\n offset = -1.0 * offset;\\n \\n float inset = gapwidth + (gapwidth > 0.0 ? ANTIALIASING : 0.0);\\n float outset = gapwidth + width * (gapwidth > 0.0 ? 2.0 : 1.0) + ANTIALIASING;\\n\\n // Scale the extrusion vector down to a normal and then up by the line width\\n // of this vertex.\\n mediump vec2 dist =outset * a_extrude * scale;\\n\\n // Calculate the offset when drawing a line that is to the side of the actual line.\\n // We do this by creating a vector that points towards the extrude, but rotate\\n // it when we're drawing round end points (a_direction = -1 or 1) since their\\n // extrude vector points in another direction.\\n mediump float u = 0.5 * a_direction;\\n mediump float t = 1.0 - abs(u);\\n mediump vec2 offset2 = offset * a_extrude * scale * normal.y * mat2(t, -u, u, t);\\n\\n // Remove the texture normal bit to get the position\\n vec2 pos = floor(a_pos * 0.5);\\n\\n vec4 projected_extrude = u_matrix * vec4(dist / u_ratio, 0.0, 0.0);\\n gl_Position = u_matrix * vec4(pos + offset2 / u_ratio, 0.0, 1.0) + projected_extrude;\\n\\n // calculate how much the perspective view squishes or stretches the extrude\\n float extrude_length_without_perspective = length(dist);\\n float extrude_length_with_perspective = length(projected_extrude.xy / gl_Position.w * u_gl_units_to_pixels);\\n v_gamma_scale = extrude_length_without_perspective / extrude_length_with_perspective;\\n\\n v_tex_a = vec2(a_linesofar * u_patternscale_a.x, normal.y * u_patternscale_a.y + u_tex_y_a);\\n v_tex_b = vec2(a_linesofar * u_patternscale_b.x, normal.y * u_patternscale_b.y + u_tex_y_b);\\n\\n v_width2 = vec2(outset, inset);\\n}\\n\"\n},raster:{fragmentSource:\"uniform float u_fade_t;\\nuniform float u_opacity;\\nuniform sampler2D u_image0;\\nuniform sampler2D u_image1;\\nvarying vec2 v_pos0;\\nvarying vec2 v_pos1;\\n\\nuniform float u_brightness_low;\\nuniform float u_brightness_high;\\n\\nuniform float u_saturation_factor;\\nuniform float u_contrast_factor;\\nuniform vec3 u_spin_weights;\\n\\nvoid main() {\\n\\n // read and cross-fade colors from the main and parent tiles\\n vec4 color0 = texture2D(u_image0, v_pos0);\\n vec4 color1 = texture2D(u_image1, v_pos1);\\n vec4 color = mix(color0, color1, u_fade_t);\\n color.a *= u_opacity;\\n vec3 rgb = color.rgb;\\n\\n // spin\\n rgb = vec3(\\n dot(rgb, u_spin_weights.xyz),\\n dot(rgb, u_spin_weights.zxy),\\n dot(rgb, u_spin_weights.yzx));\\n\\n // saturation\\n float average = (color.r + color.g + color.b) / 3.0;\\n rgb += (average - rgb) * u_saturation_factor;\\n\\n // contrast\\n rgb = (rgb - 0.5) * u_contrast_factor + 0.5;\\n\\n // brightness\\n vec3 u_high_vec = vec3(u_brightness_low, u_brightness_low, u_brightness_low);\\n vec3 u_low_vec = vec3(u_brightness_high, u_brightness_high, u_brightness_high);\\n\\n gl_FragColor = vec4(mix(u_high_vec, u_low_vec, rgb) * color.a, color.a);\\n\\n#ifdef OVERDRAW_INSPECTOR\\n gl_FragColor = vec4(1.0);\\n#endif\\n}\\n\",vertexSource:\"uniform mat4 u_matrix;\\nuniform vec2 u_tl_parent;\\nuniform float u_scale_parent;\\nuniform float u_buffer_scale;\\n\\nattribute vec2 a_pos;\\nattribute vec2 a_texture_pos;\\n\\nvarying vec2 v_pos0;\\nvarying vec2 v_pos1;\\n\\nvoid main() {\\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\\n v_pos0 = (((a_texture_pos / 32767.0) - 0.5) / u_buffer_scale ) + 0.5;\\n v_pos1 = (v_pos0 * u_scale_parent) + u_tl_parent;\\n}\\n\"},symbolIcon:{fragmentSource:\"uniform sampler2D u_texture;\\nuniform sampler2D u_fadetexture;\\n\\n#pragma mapbox: define lowp float opacity\\n\\nvarying vec2 v_tex;\\nvarying vec2 v_fade_tex;\\n\\nvoid main() {\\n #pragma mapbox: initialize lowp float opacity\\n\\n lowp float alpha = texture2D(u_fadetexture, v_fade_tex).a * opacity;\\n gl_FragColor = texture2D(u_texture, v_tex) * alpha;\\n\\n#ifdef OVERDRAW_INSPECTOR\\n gl_FragColor = vec4(1.0);\\n#endif\\n}\\n\",vertexSource:\"\\nattribute vec4 a_pos_offset;\\nattribute vec2 a_texture_pos;\\nattribute vec4 a_data;\\n\\n#pragma mapbox: define lowp float opacity\\n\\n// matrix is for the vertex position.\\nuniform mat4 u_matrix;\\n\\nuniform mediump float u_zoom;\\nuniform bool u_rotate_with_map;\\nuniform vec2 u_extrude_scale;\\n\\nuniform vec2 u_texsize;\\n\\nvarying vec2 v_tex;\\nvarying vec2 v_fade_tex;\\n\\nvoid main() {\\n #pragma mapbox: initialize lowp float opacity\\n\\n vec2 a_pos = a_pos_offset.xy;\\n vec2 a_offset = a_pos_offset.zw;\\n\\n vec2 a_tex = a_texture_pos.xy;\\n mediump float a_labelminzoom = a_data[0];\\n mediump vec2 a_zoom = a_data.pq;\\n mediump float a_minzoom = a_zoom[0];\\n mediump float a_maxzoom = a_zoom[1];\\n\\n // u_zoom is the current zoom level adjusted for the change in font size\\n mediump float z = 2.0 - step(a_minzoom, u_zoom) - (1.0 - step(a_maxzoom, u_zoom));\\n\\n vec2 extrude = u_extrude_scale * (a_offset / 64.0);\\n if (u_rotate_with_map) {\\n gl_Position = u_matrix * vec4(a_pos + extrude, 0, 1);\\n gl_Position.z += z * gl_Position.w;\\n } else {\\n gl_Position = u_matrix * vec4(a_pos, 0, 1) + vec4(extrude, 0, 0);\\n }\\n\\n v_tex = a_tex / u_texsize;\\n v_fade_tex = vec2(a_labelminzoom / 255.0, 0.0);\\n}\\n\"},symbolSDF:{fragmentSource:\"#define SDF_PX 8.0\\n#define EDGE_GAMMA 0.105/DEVICE_PIXEL_RATIO\\n\\nuniform bool u_is_halo;\\n#pragma mapbox: define lowp vec4 fill_color\\n#pragma mapbox: define lowp vec4 halo_color\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define lowp float halo_width\\n#pragma mapbox: define lowp float halo_blur\\n\\nuniform sampler2D u_texture;\\nuniform sampler2D u_fadetexture;\\nuniform lowp float u_font_scale;\\nuniform highp float u_gamma_scale;\\n\\nvarying vec2 v_tex;\\nvarying vec2 v_fade_tex;\\nvarying float v_gamma_scale;\\n\\nvoid main() {\\n #pragma mapbox: initialize lowp vec4 fill_color\\n #pragma mapbox: initialize lowp vec4 halo_color\\n #pragma mapbox: initialize lowp float opacity\\n #pragma mapbox: initialize lowp float halo_width\\n #pragma mapbox: initialize lowp float halo_blur\\n\\n lowp vec4 color = fill_color;\\n highp float gamma = EDGE_GAMMA / u_gamma_scale;\\n lowp float buff = (256.0 - 64.0) / 256.0;\\n if (u_is_halo) {\\n color = halo_color;\\n gamma = (halo_blur * 1.19 / SDF_PX + EDGE_GAMMA) / u_gamma_scale;\\n buff = (6.0 - halo_width / u_font_scale) / SDF_PX;\\n }\\n\\n lowp float dist = texture2D(u_texture, v_tex).a;\\n lowp float fade_alpha = texture2D(u_fadetexture, v_fade_tex).a;\\n highp float gamma_scaled = gamma * v_gamma_scale;\\n highp float alpha = smoothstep(buff - gamma_scaled, buff + gamma_scaled, dist) * fade_alpha;\\n\\n gl_FragColor = color * (alpha * opacity);\\n\\n#ifdef OVERDRAW_INSPECTOR\\n gl_FragColor = vec4(1.0);\\n#endif\\n}\\n\",vertexSource:\"const float PI = 3.141592653589793;\\n\\nattribute vec4 a_pos_offset;\\nattribute vec2 a_texture_pos;\\nattribute vec4 a_data;\\n\\n#pragma mapbox: define lowp vec4 fill_color\\n#pragma mapbox: define lowp vec4 halo_color\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define lowp float halo_width\\n#pragma mapbox: define lowp float halo_blur\\n\\n// matrix is for the vertex position.\\nuniform mat4 u_matrix;\\n\\nuniform mediump float u_zoom;\\nuniform bool u_rotate_with_map;\\nuniform bool u_pitch_with_map;\\nuniform mediump float u_pitch;\\nuniform mediump float u_bearing;\\nuniform mediump float u_aspect_ratio;\\nuniform vec2 u_extrude_scale;\\n\\nuniform vec2 u_texsize;\\n\\nvarying vec2 v_tex;\\nvarying vec2 v_fade_tex;\\nvarying float v_gamma_scale;\\n\\nvoid main() {\\n #pragma mapbox: initialize lowp vec4 fill_color\\n #pragma mapbox: initialize lowp vec4 halo_color\\n #pragma mapbox: initialize lowp float opacity\\n #pragma mapbox: initialize lowp float halo_width\\n #pragma mapbox: initialize lowp float halo_blur\\n\\n vec2 a_pos = a_pos_offset.xy;\\n vec2 a_offset = a_pos_offset.zw;\\n\\n vec2 a_tex = a_texture_pos.xy;\\n mediump float a_labelminzoom = a_data[0];\\n mediump vec2 a_zoom = a_data.pq;\\n mediump float a_minzoom = a_zoom[0];\\n mediump float a_maxzoom = a_zoom[1];\\n\\n // u_zoom is the current zoom level adjusted for the change in font size\\n mediump float z = 2.0 - step(a_minzoom, u_zoom) - (1.0 - step(a_maxzoom, u_zoom));\\n\\n // pitch-alignment: map\\n // rotation-alignment: map | viewport\\n if (u_pitch_with_map) {\\n lowp float angle = u_rotate_with_map ? (a_data[1] / 256.0 * 2.0 * PI) : u_bearing;\\n lowp float asin = sin(angle);\\n lowp float acos = cos(angle);\\n mat2 RotationMatrix = mat2(acos, asin, -1.0 * asin, acos);\\n vec2 offset = RotationMatrix * a_offset;\\n vec2 extrude = u_extrude_scale * (offset / 64.0);\\n gl_Position = u_matrix * vec4(a_pos + extrude, 0, 1);\\n gl_Position.z += z * gl_Position.w;\\n // pitch-alignment: viewport\\n // rotation-alignment: map\\n } else if (u_rotate_with_map) {\\n // foreshortening factor to apply on pitched maps\\n // as a label goes from horizontal <=> vertical in angle\\n // it goes from 0% foreshortening to up to around 70% foreshortening\\n lowp float pitchfactor = 1.0 - cos(u_pitch * sin(u_pitch * 0.75));\\n\\n lowp float lineangle = a_data[1] / 256.0 * 2.0 * PI;\\n\\n // use the lineangle to position points a,b along the line\\n // project the points and calculate the label angle in projected space\\n // this calculation allows labels to be rendered unskewed on pitched maps\\n vec4 a = u_matrix * vec4(a_pos, 0, 1);\\n vec4 b = u_matrix * vec4(a_pos + vec2(cos(lineangle),sin(lineangle)), 0, 1);\\n lowp float angle = atan((b[1]/b[3] - a[1]/a[3])/u_aspect_ratio, b[0]/b[3] - a[0]/a[3]);\\n lowp float asin = sin(angle);\\n lowp float acos = cos(angle);\\n mat2 RotationMatrix = mat2(acos, -1.0 * asin, asin, acos);\\n\\n vec2 offset = RotationMatrix * (vec2((1.0-pitchfactor)+(pitchfactor*cos(angle*2.0)), 1.0) * a_offset);\\n vec2 extrude = u_extrude_scale * (offset / 64.0);\\n gl_Position = u_matrix * vec4(a_pos, 0, 1) + vec4(extrude, 0, 0);\\n gl_Position.z += z * gl_Position.w;\\n // pitch-alignment: viewport\\n // rotation-alignment: viewport\\n } else {\\n vec2 extrude = u_extrude_scale * (a_offset / 64.0);\\n gl_Position = u_matrix * vec4(a_pos, 0, 1) + vec4(extrude, 0, 0);\\n }\\n\\n v_gamma_scale = gl_Position.w;\\n\\n v_tex = a_tex / u_texsize;\\n v_fade_tex = vec2(a_labelminzoom / 255.0, 0.0);\\n}\\n\"}};\n},{\"path\":23}],80:[function(require,module,exports){\n\"use strict\";var VertexArrayObject=function(){this.boundProgram=null,this.boundVertexBuffer=null,this.boundVertexBuffer2=null,this.boundElementBuffer=null,this.boundVertexOffset=null,this.vao=null};VertexArrayObject.prototype.bind=function(e,t,r,i,n,o){void 0===e.extVertexArrayObject&&(e.extVertexArrayObject=e.getExtension(\"OES_vertex_array_object\"));var s=!this.vao||this.boundProgram!==t||this.boundVertexBuffer!==r||this.boundVertexBuffer2!==n||this.boundElementBuffer!==i||this.boundVertexOffset!==o;!e.extVertexArrayObject||s?(this.freshBind(e,t,r,i,n,o),this.gl=e):e.extVertexArrayObject.bindVertexArrayOES(this.vao)},VertexArrayObject.prototype.freshBind=function(e,t,r,i,n,o){var s,u=t.numAttributes;if(e.extVertexArrayObject)this.vao&&this.destroy(),this.vao=e.extVertexArrayObject.createVertexArrayOES(),e.extVertexArrayObject.bindVertexArrayOES(this.vao),s=0,this.boundProgram=t,this.boundVertexBuffer=r,this.boundVertexBuffer2=n,this.boundElementBuffer=i,this.boundVertexOffset=o;else{s=e.currentNumAttributes||0;for(var b=u;bthis.maxzoom?Math.pow(2,t.coord.z-this.maxzoom):1,r={type:this.type,uid:t.uid,coord:t.coord,zoom:t.coord.z,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,overscaling:i,angle:this.map.transform.angle,pitch:this.map.transform.pitch,showCollisionBoxes:this.map.showCollisionBoxes};t.workerID=this.dispatcher.send(\"loadTile\",r,function(i,r){if(t.unloadVectorData(),!t.aborted)return i?e(i):(t.loadVectorData(r,o.map.painter),t.redoWhenDone&&(t.redoWhenDone=!1,t.redoPlacement(o)),e(null))},this.workerID)},e.prototype.abortTile=function(t){t.aborted=!0},e.prototype.unloadTile=function(t){t.unloadVectorData(),this.dispatcher.send(\"removeTile\",{uid:t.uid,type:this.type,source:this.id},function(){},t.workerID)},e.prototype.onRemove=function(){this.dispatcher.broadcast(\"removeSource\",{type:this.type,source:this.id},function(){})},e.prototype.serialize=function(){return{type:this.type,data:this._data}},e}(Evented);module.exports=GeoJSONSource;\n},{\"../data/extent\":54,\"../util/evented\":200,\"../util/util\":212,\"../util/window\":194}],83:[function(require,module,exports){\n\"use strict\";var ajax=require(\"../util/ajax\"),rewind=require(\"geojson-rewind\"),GeoJSONWrapper=require(\"./geojson_wrapper\"),vtpbf=require(\"vt-pbf\"),supercluster=require(\"supercluster\"),geojsonvt=require(\"geojson-vt\"),VectorTileWorkerSource=require(\"./vector_tile_worker_source\"),GeoJSONWorkerSource=function(e){function r(r,t,o){e.call(this,r,t),o&&(this.loadGeoJSON=o),this._geoJSONIndexes={}}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.loadVectorData=function(e,r){var t=e.source,o=e.coord;if(!this._geoJSONIndexes[t])return r(null,null);var n=this._geoJSONIndexes[t].getTile(Math.min(o.z,e.maxZoom),o.x,o.y);if(!n)return r(null,null);var u=new GeoJSONWrapper(n.features);u.name=\"_geojsonTileLayer\";var a=vtpbf({layers:{_geojsonTileLayer:u}});0===a.byteOffset&&a.byteLength===a.buffer.byteLength||(a=new Uint8Array(a)),u.rawData=a.buffer,r(null,u)},r.prototype.loadData=function(e,r){var t=function(t,o){var n=this;return t?r(t):\"object\"!=typeof o?r(new Error(\"Input data is not a valid GeoJSON object.\")):(rewind(o,!0),void this._indexData(o,e,function(t,o){return t?r(t):(n._geoJSONIndexes[e.source]=o,void r(null))}))}.bind(this);this.loadGeoJSON(e,t)},r.prototype.loadGeoJSON=function(e,r){if(e.url)ajax.getJSON(e.url,r);else{if(\"string\"!=typeof e.data)return r(new Error(\"Input data is not a valid GeoJSON object.\"));try{return r(null,JSON.parse(e.data))}catch(e){return r(new Error(\"Input data is not a valid GeoJSON object.\"))}}},r.prototype.removeSource=function(e){this._geoJSONIndexes[e.source]&&delete this._geoJSONIndexes[e.source]},r.prototype._indexData=function(e,r,t){try{r.cluster?t(null,supercluster(r.superclusterOptions).load(e.features)):t(null,geojsonvt(e,r.geojsonVtOptions))}catch(e){return t(e)}},r}(VectorTileWorkerSource);module.exports=GeoJSONWorkerSource;\n},{\"../util/ajax\":191,\"./geojson_wrapper\":84,\"./vector_tile_worker_source\":96,\"geojson-rewind\":7,\"geojson-vt\":11,\"supercluster\":29,\"vt-pbf\":38}],84:[function(require,module,exports){\n\"use strict\";var Point=require(\"point-geometry\"),VectorTileFeature=require(\"vector-tile\").VectorTileFeature,EXTENT=require(\"../data/extent\"),FeatureWrapper=function(e){var t=this;if(this.type=e.type,1===e.type){this.rawGeometry=[];for(var r=0;rt)){var n=Math.pow(2,Math.min(a.coord.z,i._source.maxzoom)-Math.min(e.z,i._source.maxzoom));if(Math.floor(a.coord.x/n)===e.x&&Math.floor(a.coord.y/n)===e.y)for(o[s]=!0,r=!0;a&&a.coord.z-1>e.z;){var d=a.coord.parent(i._source.maxzoom).id;a=i._tiles[d],a&&a.hasData()&&(delete o[s],o[d]=!0)}}}return r},t.prototype.findLoadedParent=function(e,t,o){for(var i=this,r=e.z-1;r>=t;r--){e=e.parent(i._source.maxzoom);var s=i._tiles[e.id];if(s&&s.hasData())return o[e.id]=!0,s;if(i._cache.has(e.id))return o[e.id]=!0,i._cache.getWithoutRemoving(e.id)}},t.prototype.updateCacheSize=function(e){var t=Math.ceil(e.width/e.tileSize)+1,o=Math.ceil(e.height/e.tileSize)+1,i=t*o,r=5;this._cache.setMaxSize(Math.floor(i*r))},t.prototype.update=function(e){var o=this;if(this.transform=e,this._sourceLoaded){var i,r,s,a;this.updateCacheSize(e);var n=(this._source.roundZoom?Math.round:Math.floor)(this.getZoom(e)),d=Math.max(n-t.maxOverzooming,this._source.minzoom),c=Math.max(n+t.maxUnderzooming,this._source.minzoom),h={};this._coveredTiles={};var u;for(u=this.used?this._source.coord?[this._source.coord]:e.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}):[],i=0;i=Date.now())&&(o.findLoadedChildren(r,c,h)&&(h[_]=!0),a=o.findLoadedParent(r,d,l),a&&o.addTile(a.coord))}var f;for(f in l)h[f]||(o._coveredTiles[f]=!0);for(f in l)h[f]=!0;var T=util.keysDifference(this._tiles,h);for(i=0;ithis._source.maxzoom?Math.pow(2,r-this._source.maxzoom):1;t=new Tile(o,this._source.tileSize*s,this._source.maxzoom),this.loadTile(t,this._tileLoaded.bind(this,t,e.id,t.state))}return t.uses++,this._tiles[e.id]=t,i||this._source.fire(\"dataloading\",{tile:t,coord:t.coord,dataType:\"source\"}),t},t.prototype._setTileReloadTimer=function(e,t){var o=this,i=t.getExpiryTimeout();i&&(this._timers[e]=setTimeout(function(){o.reloadTile(e,\"expired\"),o._timers[e]=void 0},i))},t.prototype._setCacheInvalidationTimer=function(e,t){var o=this,i=t.getExpiryTimeout();i&&(this._cacheTimers[e]=setTimeout(function(){o._cache.remove(e),o._cacheTimers[e]=void 0},i))},t.prototype.removeTile=function(e){var t=this._tiles[e];if(t&&(t.uses--,delete this._tiles[e],this._timers[e]&&(clearTimeout(this._timers[e]),this._timers[e]=void 0),!(t.uses>0)))if(t.hasData()){var o=t.coord.wrapped().id;this._cache.add(o,t),this._setCacheInvalidationTimer(o,t)}else t.aborted=!0,this.abortTile(t),this.unloadTile(t)},t.prototype.clearTiles=function(){var e=this;for(var t in e._tiles)e.removeTile(t);this._cache.reset()},t.prototype.tilesIn=function(e){for(var t=this,o={},i=this.getIds(),r=1/0,s=1/0,a=-(1/0),n=-(1/0),d=e[0].zoom,c=0;c=0&&p[1].y>=0){for(var _=[],f=0;fo)r=!1;else if(t)if(this.expirationTimei.row){var o=t;t=i,i=o}return{x0:t.column,y0:t.row,x1:i.column,y1:i.row,dx:i.column-t.column,dy:i.row-t.row}}function scanSpans(t,i,o,r,e){var n=Math.max(o,Math.floor(i.y0)),h=Math.min(r,Math.ceil(i.y1));if(t.x0===i.x0&&t.y0===i.y0?t.x0+i.dy/t.dy*t.dx0,l=i.dx<0,u=n;ua.dy&&(h=s,s=a,a=h),s.dy>d.dy&&(h=s,s=d,d=h),a.dy>d.dy&&(h=a,a=d,d=h),s.dy&&scanSpans(d,s,r,e,n),a.dy&&scanSpans(d,a,r,e,n)}function getQuadkey(t,i,o){for(var r,e=\"\",n=t;n>0;n--)r=1<t?new TileCoord(this.z-1,this.x,this.y,this.w):new TileCoord(this.z-1,Math.floor(this.x/2),Math.floor(this.y/2),this.w)},TileCoord.prototype.wrapped=function(){return new TileCoord(this.z,this.x,this.y,0)},TileCoord.prototype.children=function(t){if(this.z>=t)return[new TileCoord(this.z+1,this.x,this.y,this.w)];var i=this.z+1,o=2*this.x,r=2*this.y;return[new TileCoord(i,o,r,this.w),new TileCoord(i,o+1,r,this.w),new TileCoord(i,o,r+1,this.w),new TileCoord(i,o+1,r+1,this.w)]},TileCoord.cover=function(t,i,o,r){function e(t,i,e){var s,a,d,y;if(e>=0&&e<=n)for(s=t;sthis.maxzoom?Math.pow(2,e.coord.z-this.maxzoom):1,r={url:normalizeURL(e.coord.url(this.tiles,this.maxzoom,this.scheme),this.url),uid:e.uid,coord:e.coord,zoom:e.coord.z,tileSize:this.tileSize*o,type:this.type,source:this.id,overscaling:o,angle:this.map.transform.angle,pitch:this.map.transform.pitch,showCollisionBoxes:this.map.showCollisionBoxes};e.workerID&&\"expired\"!==e.state?\"loading\"===e.state?e.reloadCallback=t:this.dispatcher.send(\"reloadTile\",r,i.bind(this),e.workerID):e.workerID=this.dispatcher.send(\"loadTile\",r,i.bind(this))},t.prototype.abortTile=function(e){this.dispatcher.send(\"abortTile\",{uid:e.uid,type:this.type,source:this.id},null,e.workerID)},t.prototype.unloadTile=function(e){e.unloadVectorData(),this.dispatcher.send(\"removeTile\",{uid:e.uid,type:this.type,source:this.id},null,e.workerID)},t}(Evented);module.exports=VectorTileSource;\n},{\"../util/evented\":200,\"../util/mapbox\":208,\"../util/util\":212,\"./load_tilejson\":86}],96:[function(require,module,exports){\n\"use strict\";var ajax=require(\"../util/ajax\"),vt=require(\"vector-tile\"),Protobuf=require(\"pbf\"),WorkerTile=require(\"./worker_tile\"),util=require(\"../util/util\"),VectorTileWorkerSource=function(e,r,t){this.actor=e,this.layerIndex=r,t&&(this.loadVectorData=t),this.loading={},this.loaded={}};VectorTileWorkerSource.prototype.loadTile=function(e,r){function t(e,t){return delete this.loading[o][i],e?r(e):t?(a.vectorTile=t,a.parse(t,this.layerIndex,this.actor,function(e,o,i){if(e)return r(e);var a={};t.expires&&(a.expires=t.expires),t.cacheControl&&(a.cacheControl=t.cacheControl),r(null,util.extend({rawTileData:t.rawData},o,a),i)}),this.loaded[o]=this.loaded[o]||{},void(this.loaded[o][i]=a)):r(null,null)}var o=e.source,i=e.uid;this.loading[o]||(this.loading[o]={});var a=this.loading[o][i]=new WorkerTile(e);a.abort=this.loadVectorData(e,t.bind(this))},VectorTileWorkerSource.prototype.reloadTile=function(e,r){function t(e,t){if(this.reloadCallback){var o=this.reloadCallback;delete this.reloadCallback,this.parse(this.vectorTile,a.layerIndex,a.actor,o)}r(e,t)}var o=this.loaded[e.source],i=e.uid,a=this;if(o&&o[i]){var l=o[i];\"parsing\"===l.status?l.reloadCallback=r:\"done\"===l.status&&l.parse(l.vectorTile,this.layerIndex,this.actor,t.bind(l))}},VectorTileWorkerSource.prototype.abortTile=function(e){var r=this.loading[e.source],t=e.uid;r&&r[t]&&r[t].abort&&(r[t].abort(),delete r[t])},VectorTileWorkerSource.prototype.removeTile=function(e){var r=this.loaded[e.source],t=e.uid;r&&r[t]&&delete r[t]},VectorTileWorkerSource.prototype.loadVectorData=function(e,r){function t(e,t){if(e)return r(e);var o=new vt.VectorTile(new Protobuf(t.data));o.rawData=t.data,o.cacheControl=t.cacheControl,o.expires=t.expires,r(e,o)}var o=ajax.getArrayBuffer(e.url,t.bind(this));return function(){o.abort()}},VectorTileWorkerSource.prototype.redoPlacement=function(e,r){var t=this.loaded[e.source],o=this.loading[e.source],i=e.uid;if(t&&t[i]){var a=t[i],l=a.redoPlacement(e.angle,e.pitch,e.showCollisionBoxes);l.result&&r(null,l.result,l.transferables)}else o&&o[i]&&(o[i].angle=e.angle)},module.exports=VectorTileWorkerSource;\n},{\"../util/ajax\":191,\"../util/util\":212,\"./worker_tile\":99,\"pbf\":25,\"vector-tile\":34}],97:[function(require,module,exports){\n\"use strict\";var ajax=require(\"../util/ajax\"),ImageSource=require(\"./image_source\"),VideoSource=function(t){function e(e,o,i,r){t.call(this,e,o,i,r),this.roundZoom=!0,this.type=\"video\",this.options=o}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.load=function(){var t=this,e=this.options;this.urls=e.urls,ajax.getVideo(e.urls,function(e,o){if(e)return t.fire(\"error\",{error:e});t.video=o,t.video.loop=!0;var i;t.video.addEventListener(\"playing\",function(){i=t.map.style.animationLoop.set(1/0),t.map._rerender()}),t.video.addEventListener(\"pause\",function(){t.map.style.animationLoop.cancel(i)}),t.map&&t.video.play(),t._finishLoading()})},e.prototype.getVideo=function(){return this.video},e.prototype.onAdd=function(t){this.map||(this.load(),this.map=t,this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},e.prototype.prepare=function(){!this.tile||this.video.readyState<2||this._prepareImage(this.map.painter.gl,this.video)},e.prototype.serialize=function(){return{type:\"video\",urls:this.urls,coordinates:this.coordinates}},e}(ImageSource);module.exports=VideoSource;\n},{\"../util/ajax\":191,\"./image_source\":85}],98:[function(require,module,exports){\n\"use strict\";var Actor=require(\"../util/actor\"),StyleLayerIndex=require(\"../style/style_layer_index\"),VectorTileWorkerSource=require(\"./vector_tile_worker_source\"),GeoJSONWorkerSource=require(\"./geojson_worker_source\"),globalRTLTextPlugin=require(\"./rtl_text_plugin\"),Worker=function(e){var r=this;this.self=e,this.actor=new Actor(e,this),this.layerIndexes={},this.workerSourceTypes={vector:VectorTileWorkerSource,geojson:GeoJSONWorkerSource},this.workerSources={},this.self.registerWorkerSource=function(e,o){if(r.workerSourceTypes[e])throw new Error('Worker source with name \"'+e+'\" already registered.');r.workerSourceTypes[e]=o},this.self.registerRTLTextPlugin=function(e){if(globalRTLTextPlugin.applyArabicShaping||globalRTLTextPlugin.processBidirectionalText)throw new Error(\"RTL text plugin already registered.\");globalRTLTextPlugin.applyArabicShaping=e.applyArabicShaping,globalRTLTextPlugin.processBidirectionalText=e.processBidirectionalText}};Worker.prototype.setLayers=function(e,r){this.getLayerIndex(e).replace(r)},Worker.prototype.updateLayers=function(e,r){this.getLayerIndex(e).update(r.layers,r.removedIds,r.symbolOrder)},Worker.prototype.loadTile=function(e,r,o){this.getWorkerSource(e,r.type).loadTile(r,o)},Worker.prototype.reloadTile=function(e,r,o){this.getWorkerSource(e,r.type).reloadTile(r,o)},Worker.prototype.abortTile=function(e,r){this.getWorkerSource(e,r.type).abortTile(r)},Worker.prototype.removeTile=function(e,r){this.getWorkerSource(e,r.type).removeTile(r)},Worker.prototype.removeSource=function(e,r){var o=this.getWorkerSource(e,r.type);void 0!==o.removeSource&&o.removeSource(r)},Worker.prototype.redoPlacement=function(e,r,o){this.getWorkerSource(e,r.type).redoPlacement(r,o)},Worker.prototype.loadWorkerSource=function(e,r,o){try{this.self.importScripts(r.url),o()}catch(e){o(e)}},Worker.prototype.loadRTLTextPlugin=function(e,r,o){try{globalRTLTextPlugin.applyArabicShaping||globalRTLTextPlugin.processBidirectionalText||this.self.importScripts(r)}catch(e){o(e)}},Worker.prototype.getLayerIndex=function(e){var r=this.layerIndexes[e];return r||(r=this.layerIndexes[e]=new StyleLayerIndex),r},Worker.prototype.getWorkerSource=function(e,r){var o=this;if(this.workerSources[e]||(this.workerSources[e]={}),!this.workerSources[e][r]){var t={send:function(r,t,i,n){o.actor.send(r,t,i,n,e)}};this.workerSources[e][r]=new this.workerSourceTypes[r](t,this.getLayerIndex(e))}return this.workerSources[e][r]},module.exports=function(e){return new Worker(e)};\n},{\"../style/style_layer_index\":154,\"../util/actor\":190,\"./geojson_worker_source\":83,\"./rtl_text_plugin\":90,\"./vector_tile_worker_source\":96}],99:[function(require,module,exports){\n\"use strict\";function recalculateLayers(e,i){for(var r=0,o=e.layers;r=B.maxzoom||B.layout&&\"none\"===B.layout.visibility)){for(var b=0,k=x;b=0;w--){var A=n[i.symbolOrder[w]];A&&t.symbolBuckets.push(A)}if(0===this.symbolBuckets.length)return T(new CollisionTile(this.angle,this.pitch,this.collisionBoxArray));var D=0,I=Object.keys(c.iconDependencies),O=util.mapObject(c.glyphDependencies,function(e){return Object.keys(e).map(Number)}),L=function(e){if(e)return o(e);if(D++,2===D){for(var i=new CollisionTile(t.angle,t.pitch,t.collisionBoxArray),r=0,s=t.symbolBuckets;r\"===i||\"<=\"===i||\">=\"===i?compileComparisonOp(e[1],e[2],i,!0):\"any\"===i?compileLogicalOp(e.slice(1),\"||\"):\"all\"===i?compileLogicalOp(e.slice(1),\"&&\"):\"none\"===i?compileNegation(compileLogicalOp(e.slice(1),\"||\")):\"in\"===i?compileInOp(e[1],e.slice(2)):\"!in\"===i?compileNegation(compileInOp(e[1],e.slice(2))):\"has\"===i?compileHasOp(e[1]):\"!has\"===i?compileNegation(compileHasOp(e[1])):\"true\";return\"(\"+n+\")\"}function compilePropertyReference(e){return\"$type\"===e?\"f.type\":\"$id\"===e?\"f.id\":\"p[\"+JSON.stringify(e)+\"]\"}function compileComparisonOp(e,i,n,r){var o=compilePropertyReference(e),t=\"$type\"===e?types.indexOf(i):JSON.stringify(i);return(r?\"typeof \"+o+\"=== typeof \"+t+\"&&\":\"\")+o+n+t}function compileLogicalOp(e,i){return e.map(compile).join(i)}function compileInOp(e,i){\"$type\"===e&&(i=i.map(function(e){return types.indexOf(e)}));var n=JSON.stringify(i.sort(compare)),r=compilePropertyReference(e);return i.length<=200?n+\".indexOf(\"+r+\") !== -1\":\"function(v, a, i, j) {while (i <= j) { var m = (i + j) >> 1; if (a[m] === v) return true; if (a[m] > v) j = m - 1; else i = m + 1;}return false; }(\"+r+\", \"+n+\",0,\"+(i.length-1)+\")\"}function compileHasOp(e){return\"$id\"===e?'\"id\" in f':JSON.stringify(e)+\" in p\"}function compileNegation(e){return\"!(\"+e+\")\"}function compare(e,i){return ei?1:0}module.exports=createFilter;var types=[\"Unknown\",\"Point\",\"LineString\",\"Polygon\"];\n},{}],104:[function(require,module,exports){\n\"use strict\";function xyz2lab(r){return r>t3?Math.pow(r,1/3):r/t2+t0}function lab2xyz(r){return r>t1?r*r*r:t2*(r-t0)}function xyz2rgb(r){return 255*(r<=.0031308?12.92*r:1.055*Math.pow(r,1/2.4)-.055)}function rgb2xyz(r){return r/=255,r<=.04045?r/12.92:Math.pow((r+.055)/1.055,2.4)}function rgbToLab(r){var t=rgb2xyz(r[0]),a=rgb2xyz(r[1]),n=rgb2xyz(r[2]),b=xyz2lab((.4124564*t+.3575761*a+.1804375*n)/Xn),o=xyz2lab((.2126729*t+.7151522*a+.072175*n)/Yn),g=xyz2lab((.0193339*t+.119192*a+.9503041*n)/Zn);return[116*o-16,500*(b-o),200*(o-g),r[3]]}function labToRgb(r){var t=(r[0]+16)/116,a=isNaN(r[1])?t:t+r[1]/500,n=isNaN(r[2])?t:t-r[2]/200;return t=Yn*lab2xyz(t),a=Xn*lab2xyz(a),n=Zn*lab2xyz(n),[xyz2rgb(3.2404542*a-1.5371385*t-.4985314*n),xyz2rgb(-.969266*a+1.8760108*t+.041556*n),xyz2rgb(.0556434*a-.2040259*t+1.0572252*n),r[3]]}function rgbToHcl(r){var t=rgbToLab(r),a=t[0],n=t[1],b=t[2],o=Math.atan2(b,n)*rad2deg;return[o<0?o+360:o,Math.sqrt(n*n+b*b),a,r[3]]}function hclToRgb(r){var t=r[0]*deg2rad,a=r[1],n=r[2];return labToRgb([n,Math.cos(t)*a,Math.sin(t)*a,r[3]])}var Xn=.95047,Yn=1,Zn=1.08883,t0=4/29,t1=6/29,t2=3*t1*t1,t3=t1*t1*t1,deg2rad=Math.PI/180,rad2deg=180/Math.PI;module.exports={lab:{forward:rgbToLab,reverse:labToRgb},hcl:{forward:rgbToHcl,reverse:hclToRgb}};\n},{}],105:[function(require,module,exports){\n\"use strict\";function identityFunction(t){return t}function createFunction(t,e){var o,n=\"color\"===e.type;if(isFunctionDefinition(t)){var r=t.stops&&\"object\"==typeof t.stops[0][0],a=r||void 0!==t.property,i=r||!a,s=t.type||(\"interpolated\"===e.function?\"exponential\":\"interval\");n&&(t=extend({},t),t.stops&&(t.stops=t.stops.map(function(t){return[t[0],parseColor(t[1])]})),t.default?t.default=parseColor(t.default):t.default=parseColor(e.default));var u,p,l;if(\"exponential\"===s)u=evaluateExponentialFunction;else if(\"interval\"===s)u=evaluateIntervalFunction;else if(\"categorical\"===s){u=evaluateCategoricalFunction,p=Object.create(null);for(var c=0,f=t.stops;c=t.stops[n-1][0])return t.stops[n-1][1];var r=binarySearchForIndex(t.stops,o);return t.stops[r][1]}function evaluateExponentialFunction(t,e,o){var n=void 0!==t.base?t.base:1;if(\"number\"!==getType(o))return coalesce(t.default,e.default);var r=t.stops.length;if(1===r)return t.stops[0][1];if(o<=t.stops[0][0])return t.stops[0][1];if(o>=t.stops[r-1][0])return t.stops[r-1][1];var a=binarySearchForIndex(t.stops,o);return interpolate(o,n,t.stops[a][0],t.stops[a+1][0],t.stops[a][1],t.stops[a+1][1])}function evaluateIdentityFunction(t,e,o){return\"color\"===e.type?o=parseColor(o):getType(o)!==e.type&&(o=void 0),coalesce(o,t.default,e.default)}function binarySearchForIndex(t,e){for(var o,n,r=t.length,a=0,i=r-1,s=0;a<=i;){if(s=Math.floor((a+i)/2),o=t[s][0],n=t[s+1][0],e>=o&&ee&&(i=s-1)}return Math.max(s-1,0)}function interpolate(t,e,o,n,r,a){return\"function\"==typeof r?function(){var i=r.apply(void 0,arguments),s=a.apply(void 0,arguments);if(void 0!==i&&void 0!==s)return interpolate(t,e,o,n,i,s)}:r.length?interpolateArray(t,e,o,n,r,a):interpolateNumber(t,e,o,n,r,a)}function interpolateNumber(t,e,o,n,r,a){var i,s=n-o,u=t-o;return i=1===e?u/s:(Math.pow(e,u)-1)/(Math.pow(e,s)-1),r*(1-i)+a*i}function interpolateArray(t,e,o,n,r,a){for(var i=[],s=0;s255?255:e}function clamp_css_float(e){return e<0?0:e>1?1:e}function parse_css_int(e){return clamp_css_byte(\"%\"===e[e.length-1]?parseFloat(e)/100*255:parseInt(e))}function parse_css_float(e){return clamp_css_float(\"%\"===e[e.length-1]?parseFloat(e)/100:parseFloat(e))}function css_hue_to_rgb(e,r,l){return l<0?l+=1:l>1&&(l-=1),6*l<1?e+(r-e)*l*6:2*l<1?r:3*l<2?e+(r-e)*(2/3-l)*6:e}function parseCSSColor(e){var r=e.replace(/ /g,\"\").toLowerCase();if(r in kCSSColorTable)return kCSSColorTable[r].slice();if(\"#\"===r[0]){if(4===r.length){var l=parseInt(r.substr(1),16);return l>=0&&l<=4095?[(3840&l)>>4|(3840&l)>>8,240&l|(240&l)>>4,15&l|(15&l)<<4,1]:null}if(7===r.length){var l=parseInt(r.substr(1),16);return l>=0&&l<=16777215?[(16711680&l)>>16,(65280&l)>>8,255&l,1]:null}return null}var a=r.indexOf(\"(\"),t=r.indexOf(\")\");if(a!==-1&&t+1===r.length){var n=r.substr(0,a),s=r.substr(a+1,t-(a+1)).split(\",\"),o=1;switch(n){case\"rgba\":if(4!==s.length)return null;o=parse_css_float(s.pop());case\"rgb\":return 3!==s.length?null:[parse_css_int(s[0]),parse_css_int(s[1]),parse_css_int(s[2]),o];case\"hsla\":if(4!==s.length)return null;o=parse_css_float(s.pop());case\"hsl\":if(3!==s.length)return null;var i=(parseFloat(s[0])%360+360)%360/360,u=parse_css_float(s[1]),g=parse_css_float(s[2]),d=g<=.5?g*(u+1):g+u-g*u,c=2*g-d;return[clamp_css_byte(255*css_hue_to_rgb(c,d,i+1/3)),clamp_css_byte(255*css_hue_to_rgb(c,d,i)),clamp_css_byte(255*css_hue_to_rgb(c,d,i-1/3)),o];default:return null}}return null}var kCSSColorTable={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};try{exports.parseCSSColor=parseCSSColor}catch(e){}\n},{}],108:[function(require,module,exports){\nfunction sss(r){var e,t,s,n,u,a;switch(typeof r){case\"object\":if(null===r)return null;if(isArray(r)){for(s=\"[\",t=r.length-1,e=0;e-1&&(s+=sss(r[e])),s+\"]\"}for(n=objKeys(r).sort(),t=n.length,s=\"{\",u=n[e=0],a=t>0&&void 0!==r[u];e15?\"\\\\u00\"+e.toString(16):\"\\\\u000\"+e.toString(16)}};module.exports=function(r){if(void 0!==r)return\"\"+sss(r)},module.exports.stringSearch=strReg,module.exports.stringReplace=strReplace;\n},{}],109:[function(require,module,exports){\nfunction isObjectLike(r){return!!r&&\"object\"==typeof r}function arraySome(r,e){for(var a=-1,t=r.length;++as))return!1;for(;++c-1&&t%1==0&&t<=MAX_SAFE_INTEGER}function isObject(t){var e=typeof t;return!!t&&(\"object\"==e||\"function\"==e)}function isObjectLike(t){return!!t&&\"object\"==typeof t}var MAX_SAFE_INTEGER=9007199254740991,argsTag=\"[object Arguments]\",funcTag=\"[object Function]\",genTag=\"[object GeneratorFunction]\",objectProto=Object.prototype,hasOwnProperty=objectProto.hasOwnProperty,objectToString=objectProto.toString,propertyIsEnumerable=objectProto.propertyIsEnumerable;module.exports=isArguments;\n},{}],113:[function(require,module,exports){\nfunction isObjectLike(t){return!!t&&\"object\"==typeof t}function getNative(t,r){var e=null==t?void 0:t[r];return isNative(e)?e:void 0}function isLength(t){return\"number\"==typeof t&&t>-1&&t%1==0&&t<=MAX_SAFE_INTEGER}function isFunction(t){return isObject(t)&&objToString.call(t)==funcTag}function isObject(t){var r=typeof t;return!!t&&(\"object\"==r||\"function\"==r)}function isNative(t){return null!=t&&(isFunction(t)?reIsNative.test(fnToString.call(t)):isObjectLike(t)&&reIsHostCtor.test(t))}var arrayTag=\"[object Array]\",funcTag=\"[object Function]\",reIsHostCtor=/^\\[object .+?Constructor\\]$/,objectProto=Object.prototype,fnToString=Function.prototype.toString,hasOwnProperty=objectProto.hasOwnProperty,objToString=objectProto.toString,reIsNative=RegExp(\"^\"+fnToString.call(hasOwnProperty).replace(/[\\\\^$.*+?()[\\]{}|]/g,\"\\\\$&\").replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g,\"$1.*?\")+\"$\"),nativeIsArray=getNative(Array,\"isArray\"),MAX_SAFE_INTEGER=9007199254740991,isArray=nativeIsArray||function(t){return isObjectLike(t)&&isLength(t.length)&&objToString.call(t)==arrayTag};module.exports=isArray;\n},{}],114:[function(require,module,exports){\nfunction isEqual(a,l,i,e){i=\"function\"==typeof i?bindCallback(i,e,3):void 0;var s=i?i(a,l):void 0;return void 0===s?baseIsEqual(a,l,i):!!s}var baseIsEqual=require(\"lodash._baseisequal\"),bindCallback=require(\"lodash._bindcallback\");module.exports=isEqual;\n},{\"lodash._baseisequal\":109,\"lodash._bindcallback\":110}],115:[function(require,module,exports){\nfunction isLength(a){return\"number\"==typeof a&&a>-1&&a%1==0&&a<=MAX_SAFE_INTEGER}function isObjectLike(a){return!!a&&\"object\"==typeof a}function isTypedArray(a){return isObjectLike(a)&&isLength(a.length)&&!!typedArrayTags[objectToString.call(a)]}var MAX_SAFE_INTEGER=9007199254740991,argsTag=\"[object Arguments]\",arrayTag=\"[object Array]\",boolTag=\"[object Boolean]\",dateTag=\"[object Date]\",errorTag=\"[object Error]\",funcTag=\"[object Function]\",mapTag=\"[object Map]\",numberTag=\"[object Number]\",objectTag=\"[object Object]\",regexpTag=\"[object RegExp]\",setTag=\"[object Set]\",stringTag=\"[object String]\",weakMapTag=\"[object WeakMap]\",arrayBufferTag=\"[object ArrayBuffer]\",dataViewTag=\"[object DataView]\",float32Tag=\"[object Float32Array]\",float64Tag=\"[object Float64Array]\",int8Tag=\"[object Int8Array]\",int16Tag=\"[object Int16Array]\",int32Tag=\"[object Int32Array]\",uint8Tag=\"[object Uint8Array]\",uint8ClampedTag=\"[object Uint8ClampedArray]\",uint16Tag=\"[object Uint16Array]\",uint32Tag=\"[object Uint32Array]\",typedArrayTags={};typedArrayTags[float32Tag]=typedArrayTags[float64Tag]=typedArrayTags[int8Tag]=typedArrayTags[int16Tag]=typedArrayTags[int32Tag]=typedArrayTags[uint8Tag]=typedArrayTags[uint8ClampedTag]=typedArrayTags[uint16Tag]=typedArrayTags[uint32Tag]=!0,typedArrayTags[argsTag]=typedArrayTags[arrayTag]=typedArrayTags[arrayBufferTag]=typedArrayTags[boolTag]=typedArrayTags[dataViewTag]=typedArrayTags[dateTag]=typedArrayTags[errorTag]=typedArrayTags[funcTag]=typedArrayTags[mapTag]=typedArrayTags[numberTag]=typedArrayTags[objectTag]=typedArrayTags[regexpTag]=typedArrayTags[setTag]=typedArrayTags[stringTag]=typedArrayTags[weakMapTag]=!1;var objectProto=Object.prototype,objectToString=objectProto.toString;module.exports=isTypedArray;\n},{}],116:[function(require,module,exports){\nfunction baseProperty(e){return function(t){return null==t?void 0:t[e]}}function isArrayLike(e){return null!=e&&isLength(getLength(e))}function isIndex(e,t){return e=\"number\"==typeof e||reIsUint.test(e)?+e:-1,t=null==t?MAX_SAFE_INTEGER:t,e>-1&&e%1==0&&e-1&&e%1==0&&e<=MAX_SAFE_INTEGER}function shimKeys(e){for(var t=keysIn(e),r=t.length,n=r&&e.length,s=!!n&&isLength(n)&&(isArray(e)||isArguments(e)),o=-1,i=[];++o0;++n\":{},\">=\":{},\"<\":{},\"<=\":{},\"in\":{},\"!in\":{},\"all\":{},\"any\":{},\"none\":{},\"has\":{},\"!has\":{}}},\"geometry_type\":{\"type\":\"enum\",\"values\":{\"Point\":{},\"LineString\":{},\"Polygon\":{}}},\"function\":{\"stops\":{\"type\":\"array\",\"value\":\"function_stop\"},\"base\":{\"type\":\"number\",\"default\":1,\"minimum\":0},\"property\":{\"type\":\"string\",\"default\":\"$zoom\"},\"type\":{\"type\":\"enum\",\"values\":{\"identity\":{},\"exponential\":{},\"interval\":{},\"categorical\":{}},\"default\":\"exponential\"},\"colorSpace\":{\"type\":\"enum\",\"values\":{\"rgb\":{},\"lab\":{},\"hcl\":{}},\"default\":\"rgb\"},\"default\":{\"type\":\"*\",\"required\":false}},\"function_stop\":{\"type\":\"array\",\"minimum\":0,\"maximum\":22,\"value\":[\"number\",\"color\"],\"length\":2},\"light\":{\"anchor\":{\"type\":\"enum\",\"default\":\"viewport\",\"values\":{\"map\":{},\"viewport\":{}},\"transition\":false},\"position\":{\"type\":\"array\",\"default\":[1.15,210,30],\"length\":3,\"value\":\"number\",\"transition\":true,\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":false},\"color\":{\"type\":\"color\",\"default\":\"#ffffff\",\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":false,\"transition\":true},\"intensity\":{\"type\":\"number\",\"default\":0.5,\"minimum\":0,\"maximum\":1,\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":false,\"transition\":true}},\"paint\":[\"paint_fill\",\"paint_line\",\"paint_circle\",\"paint_fill-extrusion\",\"paint_symbol\",\"paint_raster\",\"paint_background\"],\"paint_fill\":{\"fill-antialias\":{\"type\":\"boolean\",\"function\":\"piecewise-constant\",\"zoom-function\":true,\"default\":true},\"fill-opacity\":{\"type\":\"number\",\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"default\":1,\"minimum\":0,\"maximum\":1,\"transition\":true},\"fill-color\":{\"type\":\"color\",\"default\":\"#000000\",\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true,\"requires\":[{\"!\":\"fill-pattern\"}]},\"fill-outline-color\":{\"type\":\"color\",\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true,\"requires\":[{\"!\":\"fill-pattern\"},{\"fill-antialias\":true}]},\"fill-translate\":{\"type\":\"array\",\"value\":\"number\",\"length\":2,\"default\":[0,0],\"function\":\"interpolated\",\"zoom-function\":true,\"transition\":true,\"units\":\"pixels\"},\"fill-translate-anchor\":{\"type\":\"enum\",\"function\":\"piecewise-constant\",\"zoom-function\":true,\"values\":{\"map\":{},\"viewport\":{}},\"default\":\"map\",\"requires\":[\"fill-translate\"]},\"fill-pattern\":{\"type\":\"string\",\"function\":\"piecewise-constant\",\"zoom-function\":true,\"transition\":true}},\"paint_fill-extrusion\":{\"fill-extrusion-opacity\":{\"type\":\"number\",\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":false,\"default\":1,\"minimum\":0,\"maximum\":1,\"transition\":true},\"fill-extrusion-color\":{\"type\":\"color\",\"default\":\"#000000\",\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true,\"requires\":[{\"!\":\"fill-extrusion-pattern\"}]},\"fill-extrusion-translate\":{\"type\":\"array\",\"value\":\"number\",\"length\":2,\"default\":[0,0],\"function\":\"interpolated\",\"zoom-function\":true,\"transition\":true,\"units\":\"pixels\"},\"fill-extrusion-translate-anchor\":{\"type\":\"enum\",\"function\":\"piecewise-constant\",\"zoom-function\":true,\"values\":{\"map\":{},\"viewport\":{}},\"default\":\"map\",\"requires\":[\"fill-extrusion-translate\"]},\"fill-extrusion-pattern\":{\"type\":\"string\",\"function\":\"piecewise-constant\",\"zoom-function\":true,\"transition\":true},\"fill-extrusion-height\":{\"type\":\"number\",\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"default\":0,\"minimum\":0,\"units\":\"meters\",\"transition\":true},\"fill-extrusion-base\":{\"type\":\"number\",\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"default\":0,\"minimum\":0,\"units\":\"meters\",\"transition\":true,\"requires\":[\"fill-extrusion-height\"]}},\"paint_line\":{\"line-opacity\":{\"type\":\"number\",\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"default\":1,\"minimum\":0,\"maximum\":1,\"transition\":true},\"line-color\":{\"type\":\"color\",\"default\":\"#000000\",\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true,\"requires\":[{\"!\":\"line-pattern\"}]},\"line-translate\":{\"type\":\"array\",\"value\":\"number\",\"length\":2,\"default\":[0,0],\"function\":\"interpolated\",\"zoom-function\":true,\"transition\":true,\"units\":\"pixels\"},\"line-translate-anchor\":{\"type\":\"enum\",\"function\":\"piecewise-constant\",\"zoom-function\":true,\"values\":{\"map\":{},\"viewport\":{}},\"default\":\"map\",\"requires\":[\"line-translate\"]},\"line-width\":{\"type\":\"number\",\"default\":1,\"minimum\":0,\"function\":\"interpolated\",\"zoom-function\":true,\"transition\":true,\"units\":\"pixels\"},\"line-gap-width\":{\"type\":\"number\",\"default\":0,\"minimum\":0,\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true,\"units\":\"pixels\"},\"line-offset\":{\"type\":\"number\",\"default\":0,\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true,\"units\":\"pixels\"},\"line-blur\":{\"type\":\"number\",\"default\":0,\"minimum\":0,\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true,\"units\":\"pixels\"},\"line-dasharray\":{\"type\":\"array\",\"value\":\"number\",\"function\":\"piecewise-constant\",\"zoom-function\":true,\"minimum\":0,\"transition\":true,\"units\":\"line widths\",\"requires\":[{\"!\":\"line-pattern\"}]},\"line-pattern\":{\"type\":\"string\",\"function\":\"piecewise-constant\",\"zoom-function\":true,\"transition\":true}},\"paint_circle\":{\"circle-radius\":{\"type\":\"number\",\"default\":5,\"minimum\":0,\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true,\"units\":\"pixels\"},\"circle-color\":{\"type\":\"color\",\"default\":\"#000000\",\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true},\"circle-blur\":{\"type\":\"number\",\"default\":0,\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true},\"circle-opacity\":{\"type\":\"number\",\"default\":1,\"minimum\":0,\"maximum\":1,\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true},\"circle-translate\":{\"type\":\"array\",\"value\":\"number\",\"length\":2,\"default\":[0,0],\"function\":\"interpolated\",\"zoom-function\":true,\"transition\":true,\"units\":\"pixels\"},\"circle-translate-anchor\":{\"type\":\"enum\",\"function\":\"piecewise-constant\",\"zoom-function\":true,\"values\":{\"map\":{},\"viewport\":{}},\"default\":\"map\",\"requires\":[\"circle-translate\"]},\"circle-pitch-scale\":{\"type\":\"enum\",\"function\":\"piecewise-constant\",\"zoom-function\":true,\"values\":{\"map\":{},\"viewport\":{}},\"default\":\"map\"},\"circle-stroke-width\":{\"type\":\"number\",\"default\":0,\"minimum\":0,\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true,\"units\":\"pixels\"},\"circle-stroke-color\":{\"type\":\"color\",\"default\":\"#000000\",\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true},\"circle-stroke-opacity\":{\"type\":\"number\",\"default\":1,\"minimum\":0,\"maximum\":1,\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true}},\"paint_symbol\":{\"icon-opacity\":{\"type\":\"number\",\"default\":1,\"minimum\":0,\"maximum\":1,\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true,\"requires\":[\"icon-image\"]},\"icon-color\":{\"type\":\"color\",\"default\":\"#000000\",\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true,\"requires\":[\"icon-image\"]},\"icon-halo-color\":{\"type\":\"color\",\"default\":\"rgba(0, 0, 0, 0)\",\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true,\"requires\":[\"icon-image\"]},\"icon-halo-width\":{\"type\":\"number\",\"default\":0,\"minimum\":0,\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true,\"units\":\"pixels\",\"requires\":[\"icon-image\"]},\"icon-halo-blur\":{\"type\":\"number\",\"default\":0,\"minimum\":0,\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true,\"units\":\"pixels\",\"requires\":[\"icon-image\"]},\"icon-translate\":{\"type\":\"array\",\"value\":\"number\",\"length\":2,\"default\":[0,0],\"function\":\"interpolated\",\"zoom-function\":true,\"transition\":true,\"units\":\"pixels\",\"requires\":[\"icon-image\"]},\"icon-translate-anchor\":{\"type\":\"enum\",\"function\":\"piecewise-constant\",\"zoom-function\":true,\"values\":{\"map\":{},\"viewport\":{}},\"default\":\"map\",\"requires\":[\"icon-image\",\"icon-translate\"]},\"text-opacity\":{\"type\":\"number\",\"default\":1,\"minimum\":0,\"maximum\":1,\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true,\"requires\":[\"text-field\"]},\"text-color\":{\"type\":\"color\",\"default\":\"#000000\",\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true,\"requires\":[\"text-field\"]},\"text-halo-color\":{\"type\":\"color\",\"default\":\"rgba(0, 0, 0, 0)\",\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true,\"requires\":[\"text-field\"]},\"text-halo-width\":{\"type\":\"number\",\"default\":0,\"minimum\":0,\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true,\"units\":\"pixels\",\"requires\":[\"text-field\"]},\"text-halo-blur\":{\"type\":\"number\",\"default\":0,\"minimum\":0,\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true,\"units\":\"pixels\",\"requires\":[\"text-field\"]},\"text-translate\":{\"type\":\"array\",\"value\":\"number\",\"length\":2,\"default\":[0,0],\"function\":\"interpolated\",\"zoom-function\":true,\"transition\":true,\"units\":\"pixels\",\"requires\":[\"text-field\"]},\"text-translate-anchor\":{\"type\":\"enum\",\"function\":\"piecewise-constant\",\"zoom-function\":true,\"values\":{\"map\":{},\"viewport\":{}},\"default\":\"map\",\"requires\":[\"text-field\",\"text-translate\"]}},\"paint_raster\":{\"raster-opacity\":{\"type\":\"number\",\"default\":1,\"minimum\":0,\"maximum\":1,\"function\":\"interpolated\",\"zoom-function\":true,\"transition\":true},\"raster-hue-rotate\":{\"type\":\"number\",\"default\":0,\"period\":360,\"function\":\"interpolated\",\"zoom-function\":true,\"transition\":true,\"units\":\"degrees\"},\"raster-brightness-min\":{\"type\":\"number\",\"function\":\"interpolated\",\"zoom-function\":true,\"default\":0,\"minimum\":0,\"maximum\":1,\"transition\":true},\"raster-brightness-max\":{\"type\":\"number\",\"function\":\"interpolated\",\"zoom-function\":true,\"default\":1,\"minimum\":0,\"maximum\":1,\"transition\":true},\"raster-saturation\":{\"type\":\"number\",\"default\":0,\"minimum\":-1,\"maximum\":1,\"function\":\"interpolated\",\"zoom-function\":true,\"transition\":true},\"raster-contrast\":{\"type\":\"number\",\"default\":0,\"minimum\":-1,\"maximum\":1,\"function\":\"interpolated\",\"zoom-function\":true,\"transition\":true},\"raster-fade-duration\":{\"type\":\"number\",\"default\":300,\"minimum\":0,\"function\":\"interpolated\",\"zoom-function\":true,\"transition\":true,\"units\":\"milliseconds\"}},\"paint_background\":{\"background-color\":{\"type\":\"color\",\"default\":\"#000000\",\"function\":\"interpolated\",\"zoom-function\":true,\"transition\":true,\"requires\":[{\"!\":\"background-pattern\"}]},\"background-pattern\":{\"type\":\"string\",\"function\":\"piecewise-constant\",\"zoom-function\":true,\"transition\":true},\"background-opacity\":{\"type\":\"number\",\"default\":1,\"minimum\":0,\"maximum\":1,\"function\":\"interpolated\",\"zoom-function\":true,\"transition\":true}},\"transition\":{\"duration\":{\"type\":\"number\",\"default\":300,\"minimum\":0,\"units\":\"milliseconds\"},\"delay\":{\"type\":\"number\",\"default\":0,\"minimum\":0,\"units\":\"milliseconds\"}}}\n},{}],119:[function(require,module,exports){\n\"use strict\";module.exports=function(r){for(var t=arguments,e=1;e7)return[new ValidationError(u,a,\"constants have been deprecated as of v8\")];if(!(a in l.constants))return[new ValidationError(u,a,'constant \"%s\" not found',a)];e=extend({},e,{value:l.constants[a]})}return n.function&&\"object\"===getType(a)?r(e):n.type&&i[n.type]?i[n.type](e):t(extend({},e,{valueSpec:n.type?o[n.type]:n}))};\n},{\"../error/validation_error\":102,\"../util/extend\":119,\"../util/get_type\":120,\"./validate_array\":125,\"./validate_boolean\":126,\"./validate_color\":127,\"./validate_constants\":128,\"./validate_enum\":129,\"./validate_filter\":130,\"./validate_function\":131,\"./validate_layer\":133,\"./validate_light\":135,\"./validate_number\":136,\"./validate_object\":137,\"./validate_source\":140,\"./validate_string\":141}],125:[function(require,module,exports){\n\"use strict\";var getType=require(\"../util/get_type\"),validate=require(\"./validate\"),ValidationError=require(\"../error/validation_error\");module.exports=function(e){var r=e.value,t=e.valueSpec,a=e.style,n=e.styleSpec,l=e.key,i=e.arrayElementValidator||validate;if(\"array\"!==getType(r))return[new ValidationError(l,r,\"array expected, %s found\",getType(r))];if(t.length&&r.length!==t.length)return[new ValidationError(l,r,\"array length %d expected, length %d found\",t.length,r.length)];if(t[\"min-length\"]&&r.length7)return t?[new ValidationError(e,t,\"constants have been deprecated as of v8\")]:[];var o=getType(t);if(\"object\"!==o)return[new ValidationError(e,t,\"object expected, %s found\",o)];var n=[];for(var i in t)\"@\"!==i[0]&&n.push(new ValidationError(e+\".\"+i,t[i],'constants must start with \"@\"'));return n};\n},{\"../error/validation_error\":102,\"../util/get_type\":120}],129:[function(require,module,exports){\n\"use strict\";var ValidationError=require(\"../error/validation_error\"),unbundle=require(\"../util/unbundle_jsonlint\");module.exports=function(e){var r=e.key,n=e.value,u=e.valueSpec,o=[];return Array.isArray(u.values)?u.values.indexOf(unbundle(n))===-1&&o.push(new ValidationError(r,n,\"expected one of [%s], %s found\",u.values.join(\", \"),n)):Object.keys(u.values).indexOf(unbundle(n))===-1&&o.push(new ValidationError(r,n,\"expected one of [%s], %s found\",Object.keys(u.values).join(\", \"),n)),o};\n},{\"../error/validation_error\":102,\"../util/unbundle_jsonlint\":123}],130:[function(require,module,exports){\n\"use strict\";var ValidationError=require(\"../error/validation_error\"),validateEnum=require(\"./validate_enum\"),getType=require(\"../util/get_type\"),unbundle=require(\"../util/unbundle_jsonlint\");module.exports=function e(r){var t,a=r.value,n=r.key,l=r.styleSpec,s=[];if(\"array\"!==getType(a))return[new ValidationError(n,a,\"array expected, %s found\",getType(a))];if(a.length<1)return[new ValidationError(n,a,\"filter array must have at least 1 element\")];switch(s=s.concat(validateEnum({key:n+\"[0]\",value:a[0],valueSpec:l.filter_operator,style:r.style,styleSpec:r.styleSpec})),unbundle(a[0])){case\"<\":case\"<=\":case\">\":case\">=\":a.length>=2&&\"$type\"===unbundle(a[1])&&s.push(new ValidationError(n,a,'\"$type\" cannot be use with operator \"%s\"',a[0]));case\"==\":case\"!=\":3!==a.length&&s.push(new ValidationError(n,a,'filter array for operator \"%s\" must have 3 elements',a[0]));case\"in\":case\"!in\":a.length>=2&&(t=getType(a[1]),\"string\"!==t&&s.push(new ValidationError(n+\"[1]\",a[1],\"string expected, %s found\",t)));for(var o=2;ounbundle(r[0].zoom))return[new ValidationError(o,r[0].zoom,\"stop zoom values must appear in ascending order\")];unbundle(r[0].zoom)!==l&&(l=unbundle(r[0].zoom),i=void 0,s={}),t=t.concat(validateObject({key:o+\"[0]\",value:r[0],valueSpec:{zoom:{}},style:e.style,styleSpec:e.styleSpec,objectElementValidators:{zoom:validateNumber,value:a}}))}else t=t.concat(a({key:o+\"[0]\",value:r[0],valueSpec:{},style:e.style,styleSpec:e.styleSpec}));return t.concat(validate({key:o+\"[1]\",value:r[1],valueSpec:u,style:e.style,styleSpec:e.styleSpec}))}function a(e){var t=getType(e.value),r=unbundle(e.value);if(n){if(t!==n)return[new ValidationError(e.key,e.value,\"%s stop domain type must match previous stop domain type %s\",t,n)]}else n=t;if(\"number\"!==t&&\"string\"!==t&&\"boolean\"!==t)return[new ValidationError(e.key,e.value,\"stop domain value must be a number, string, or boolean\")];if(\"number\"!==t&&\"categorical\"!==p){var a=\"number expected, %s found\";return u[\"property-function\"]&&void 0===p&&(a+='\\nIf you intended to use a categorical function, specify `\"type\": \"categorical\"`.'),[new ValidationError(e.key,e.value,a,t)]}return\"categorical\"!==p||\"number\"!==t||isFinite(r)&&Math.floor(r)===r?\"number\"===t&&void 0!==i&&r=8&&(d&&!e.valueSpec[\"property-function\"]?v.push(new ValidationError(e.key,e.value,\"property functions not supported\")):y&&!e.valueSpec[\"zoom-function\"]&&v.push(new ValidationError(e.key,e.value,\"zoom functions not supported\"))),\"categorical\"!==p&&!c||void 0!==e.value.property||v.push(new ValidationError(e.key,e.value,'\"property\" property is required')),v};\n},{\"../error/validation_error\":102,\"../util/get_type\":120,\"../util/unbundle_jsonlint\":123,\"./validate\":124,\"./validate_array\":125,\"./validate_number\":136,\"./validate_object\":137}],132:[function(require,module,exports){\n\"use strict\";var ValidationError=require(\"../error/validation_error\"),validateString=require(\"./validate_string\");module.exports=function(r){var e=r.value,t=r.key,a=validateString(r);return a.length?a:(e.indexOf(\"{fontstack}\")===-1&&a.push(new ValidationError(t,e,'\"glyphs\" url must include a \"{fontstack}\" token')),e.indexOf(\"{range}\")===-1&&a.push(new ValidationError(t,e,'\"glyphs\" url must include a \"{range}\" token')),a)};\n},{\"../error/validation_error\":102,\"./validate_string\":141}],133:[function(require,module,exports){\n\"use strict\";var ValidationError=require(\"../error/validation_error\"),unbundle=require(\"../util/unbundle_jsonlint\"),validateObject=require(\"./validate_object\"),validateFilter=require(\"./validate_filter\"),validatePaintProperty=require(\"./validate_paint_property\"),validateLayoutProperty=require(\"./validate_layout_property\"),extend=require(\"../util/extend\");module.exports=function(e){var r=[],t=e.value,a=e.key,i=e.style,l=e.styleSpec;t.type||t.ref||r.push(new ValidationError(a,t,'either \"type\" or \"ref\" is required'));var u=unbundle(t.type),n=unbundle(t.ref);if(t.id)for(var o=unbundle(t.id),s=0;sm.maximum?[new ValidationError(r,i,\"%s is greater than the maximum value %s\",i,m.maximum)]:[]};\n},{\"../error/validation_error\":102,\"../util/get_type\":120}],137:[function(require,module,exports){\n\"use strict\";var ValidationError=require(\"../error/validation_error\"),getType=require(\"../util/get_type\"),validateSpec=require(\"./validate\");module.exports=function(e){var r=e.key,t=e.value,i=e.valueSpec||{},a=e.objectElementValidators||{},o=e.style,l=e.styleSpec,n=[],u=getType(t);if(\"object\"!==u)return[new ValidationError(r,t,\"object expected, %s found\",u)];for(var d in t){var p=d.split(\".\")[0],s=i[p]||i[\"*\"],c=void 0;if(a[p])c=a[p];else if(i[p])c=validateSpec;else if(a[\"*\"])c=a[\"*\"];else{if(!i[\"*\"]){n.push(new ValidationError(r,t[d],'unknown property \"%s\"',d));continue}c=validateSpec}n=n.concat(c({key:(r?r+\".\":r)+d,value:t[d],valueSpec:s,style:o,styleSpec:l,object:t,objectKey:d}))}for(var v in i)i[v].required&&void 0===i[v].default&&void 0===t[v]&&n.push(new ValidationError(r,t,'missing required property \"%s\"',v));return n};\n},{\"../error/validation_error\":102,\"../util/get_type\":120,\"./validate\":124}],138:[function(require,module,exports){\n\"use strict\";var validateProperty=require(\"./validate_property\");module.exports=function(r){return validateProperty(r,\"paint\")};\n},{\"./validate_property\":139}],139:[function(require,module,exports){\n\"use strict\";var validate=require(\"./validate\"),ValidationError=require(\"../error/validation_error\"),getType=require(\"../util/get_type\");module.exports=function(e,t){var r=e.key,i=e.style,a=e.styleSpec,n=e.value,o=e.objectKey,l=a[t+\"_\"+e.layerType];if(!l)return[];var y=o.match(/^(.*)-transition$/);if(\"paint\"===t&&y&&l[y[1]]&&l[y[1]].transition)return validate({key:r,value:n,valueSpec:a.transition,style:i,styleSpec:a});var p=e.valueSpec||l[o];if(!p)return[new ValidationError(r,n,'unknown property \"%s\"',o)];var s;if(\"string\"===getType(n)&&p[\"property-function\"]&&!p.tokens&&(s=/^{([^}]+)}$/.exec(n)))return[new ValidationError(r,n,'\"%s\" does not support interpolation syntax\\nUse an identity property function instead: `{ \"type\": \"identity\", \"property\": %s` }`.',o,JSON.stringify(s[1]))];var u=[];return\"symbol\"===e.layerType&&\"text-field\"===o&&i&&!i.glyphs&&u.push(new ValidationError(r,n,'use of \"text-field\" requires a style \"glyphs\" property')),u.concat(validate({key:e.key,value:n,valueSpec:p,style:i,styleSpec:a}))};\n},{\"../error/validation_error\":102,\"../util/get_type\":120,\"./validate\":124}],140:[function(require,module,exports){\n\"use strict\";var ValidationError=require(\"../error/validation_error\"),unbundle=require(\"../util/unbundle_jsonlint\"),validateObject=require(\"./validate_object\"),validateEnum=require(\"./validate_enum\");module.exports=function(e){var a=e.value,t=e.key,r=e.styleSpec,l=e.style;if(!a.type)return[new ValidationError(t,a,'\"type\" is required')];var u=unbundle(a.type),i=[];switch(u){case\"vector\":case\"raster\":if(i=i.concat(validateObject({key:t,value:a,valueSpec:r.source_tile,style:e.style,styleSpec:r})),\"url\"in a)for(var s in a)[\"type\",\"url\",\"tileSize\"].indexOf(s)<0&&i.push(new ValidationError(t+\".\"+s,a[s],'a source with a \"url\" property may not include a \"%s\" property',s));return i;case\"geojson\":return validateObject({key:t,value:a,valueSpec:r.source_geojson,style:l,styleSpec:r});case\"video\":return validateObject({key:t,value:a,valueSpec:r.source_video,style:l,styleSpec:r});case\"image\":return validateObject({key:t,value:a,valueSpec:r.source_image,style:l,styleSpec:r});case\"canvas\":return validateObject({key:t,value:a,valueSpec:r.source_canvas,style:l,styleSpec:r});default:return validateEnum({key:t+\".type\",value:a.type,valueSpec:{values:[\"vector\",\"raster\",\"geojson\",\"video\",\"image\",\"canvas\"]},style:l,styleSpec:r})}};\n},{\"../error/validation_error\":102,\"../util/unbundle_jsonlint\":123,\"./validate_enum\":129,\"./validate_object\":137}],141:[function(require,module,exports){\n\"use strict\";var getType=require(\"../util/get_type\"),ValidationError=require(\"../error/validation_error\");module.exports=function(r){var e=r.value,t=r.key,i=getType(e);return\"string\"!==i?[new ValidationError(t,e,\"string expected, %s found\",i)]:[]};\n},{\"../error/validation_error\":102,\"../util/get_type\":120}],142:[function(require,module,exports){\n\"use strict\";function validateStyleMin(e,a){a=a||latestStyleSpec;var t=[];return t=t.concat(validate({key:\"\",value:e,valueSpec:a.$root,styleSpec:a,style:e,objectElementValidators:{glyphs:validateGlyphsURL,\"*\":function(){return[]}}})),a.$version>7&&e.constants&&(t=t.concat(validateConstants({key:\"constants\",value:e.constants,style:e,styleSpec:a}))),sortErrors(t)}function sortErrors(e){return[].concat(e).sort(function(e,a){return e.line-a.line})}function wrapCleanErrors(e){return function(){return sortErrors(e.apply(this,arguments))}}var validateConstants=require(\"./validate/validate_constants\"),validate=require(\"./validate/validate\"),latestStyleSpec=require(\"./reference/latest\"),validateGlyphsURL=require(\"./validate/validate_glyphs_url\");validateStyleMin.source=wrapCleanErrors(require(\"./validate/validate_source\")),validateStyleMin.light=wrapCleanErrors(require(\"./validate/validate_light\")),validateStyleMin.layer=wrapCleanErrors(require(\"./validate/validate_layer\")),validateStyleMin.filter=wrapCleanErrors(require(\"./validate/validate_filter\")),validateStyleMin.paintProperty=wrapCleanErrors(require(\"./validate/validate_paint_property\")),validateStyleMin.layoutProperty=wrapCleanErrors(require(\"./validate/validate_layout_property\")),module.exports=validateStyleMin;\n},{\"./reference/latest\":117,\"./validate/validate\":124,\"./validate/validate_constants\":128,\"./validate/validate_filter\":130,\"./validate/validate_glyphs_url\":132,\"./validate/validate_layer\":133,\"./validate/validate_layout_property\":134,\"./validate/validate_light\":135,\"./validate/validate_paint_property\":138,\"./validate/validate_source\":140}],143:[function(require,module,exports){\n\"use strict\";var AnimationLoop=function(){this.n=0,this.times=[]};AnimationLoop.prototype.stopped=function(){return this.times=this.times.filter(function(t){return t.time>=(new Date).getTime()}),!this.times.length},AnimationLoop.prototype.set=function(t){return this.times.push({id:this.n,time:t+(new Date).getTime()}),this.n++},AnimationLoop.prototype.cancel=function(t){this.times=this.times.filter(function(i){return i.id!==t})},module.exports=AnimationLoop;\n},{}],144:[function(require,module,exports){\n\"use strict\";var Evented=require(\"../util/evented\"),ajax=require(\"../util/ajax\"),browser=require(\"../util/browser\"),normalizeURL=require(\"../util/mapbox\").normalizeSpriteURL,SpritePosition=function(){this.x=0,this.y=0,this.width=0,this.height=0,this.pixelRatio=1,this.sdf=!1},ImageSprite=function(t){function i(i,e){var a=this;t.call(this),this.base=i,this.retina=browser.devicePixelRatio>1,this.setEventedParent(e);var r=this.retina?\"@2x\":\"\";ajax.getJSON(normalizeURL(i,r,\".json\"),function(t,i){return t?void a.fire(\"error\",{error:t}):(a.data=i,void(a.imgData&&a.fire(\"data\",{dataType:\"style\"})))}),ajax.getImage(normalizeURL(i,r,\".png\"),function(t,i){if(t)return void a.fire(\"error\",{error:t});a.imgData=browser.getImageData(i);for(var e=0;e1!==this.retina){var e=new i(this.base);e.on(\"data\",function(){t.data=e.data,t.imgData=e.imgData,t.width=e.width,t.retina=e.retina})}},i.prototype.getSpritePosition=function(t){if(!this.loaded())return new SpritePosition;var i=this.data&&this.data[t];return i&&this.imgData?i:new SpritePosition},i}(Evented);module.exports=ImageSprite;\n},{\"../util/ajax\":191,\"../util/browser\":192,\"../util/evented\":200,\"../util/mapbox\":208}],145:[function(require,module,exports){\n\"use strict\";var styleSpec=require(\"../style-spec/reference/latest\"),util=require(\"../util/util\"),Evented=require(\"../util/evented\"),validateStyle=require(\"./validate_style\"),StyleDeclaration=require(\"./style_declaration\"),StyleTransition=require(\"./style_transition\"),TRANSITION_SUFFIX=\"-transition\",Light=function(t){function i(i){t.call(this),this.properties=[\"anchor\",\"color\",\"position\",\"intensity\"],this._specifications=styleSpec.light,this.set(i)}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.set=function(t){var i=this;if(!this._validate(validateStyle.light,t)){this._declarations={},this._transitions={},this._transitionOptions={},this.calculated={},t=util.extend({anchor:this._specifications.anchor.default,color:this._specifications.color.default,position:this._specifications.position.default,intensity:this._specifications.intensity.default},t);for(var e=0,o=i.properties;eMath.floor(e)&&(t.lastIntegerZoom=Math.floor(e+1),t.lastIntegerZoomTime=Date.now()),t.lastZoom=e},t.prototype._checkLoaded=function(){if(!this._loaded)throw new Error(\"Style is not done loading\")},t.prototype.update=function(e,t){var r=this;if(this._changed){var i=Object.keys(this._updatedLayers),o=Object.keys(this._removedLayers);(i.length||o.length||this._updatedSymbolOrder)&&this._updateWorkerLayers(i,o);for(var s in r._updatedSources){var a=r._updatedSources[s];\"reload\"===a?r._reloadSource(s):\"clear\"===a&&r._clearSource(s)}this._applyClasses(e,t),this._resetUpdates(),this.fire(\"data\",{dataType:\"style\"})}},t.prototype._updateWorkerLayers=function(e,t){var r=this,i=this._updatedSymbolOrder?this._order.filter(function(e){return\"symbol\"===r._layers[e].type}):null;this.dispatcher.broadcast(\"updateLayers\",{layers:this._serializeLayers(e),removedIds:t,symbolOrder:i})},t.prototype._resetUpdates=function(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSymbolOrder=!1,this._updatedSources={},this._updatedPaintProps={},this._updatedAllPaintProps=!1},t.prototype.setState=function(e){var t=this;if(this._checkLoaded(),validateStyle.emitErrors(this,validateStyle(e)))return!1;e=util.extend({},e),e.layers=deref(e.layers);var r=diff(this.serialize(),e).filter(function(e){return!(e.command in ignoredDiffOperations)});if(0===r.length)return!1;var i=r.filter(function(e){return!(e.command in supportedDiffOperations)});if(i.length>0)throw new Error(\"Unimplemented: \"+i.map(function(e){return e.command}).join(\", \")+\".\");return r.forEach(function(e){\"setTransition\"!==e.command&&t[e.command].apply(t,e.args)}),this.stylesheet=e,!0},t.prototype.addSource=function(e,t,r){var i=this;if(this._checkLoaded(),void 0!==this.sourceCaches[e])throw new Error(\"There is already a source with this ID\");if(!t.type)throw new Error(\"The type property must be defined, but the only the following properties were given: \"+Object.keys(t)+\".\");var o=[\"vector\",\"raster\",\"geojson\",\"video\",\"image\",\"canvas\"],s=o.indexOf(t.type)>=0;if(!s||!this._validate(validateStyle.source,\"sources.\"+e,t,null,r)){var a=this.sourceCaches[e]=new SourceCache(e,t,this.dispatcher);a.style=this,a.setEventedParent(this,function(){return{isSourceLoaded:i.loaded(),source:a.serialize(),sourceId:e}}),a.onAdd(this.map),this._changed=!0}},t.prototype.removeSource=function(e){if(this._checkLoaded(),void 0===this.sourceCaches[e])throw new Error(\"There is no source with this ID\");var t=this.sourceCaches[e];delete this.sourceCaches[e],delete this._updatedSources[e],t.setEventedParent(null),t.clearTiles(),t.onRemove&&t.onRemove(this.map),this._changed=!0},t.prototype.getSource=function(e){return this.sourceCaches[e]&&this.sourceCaches[e].getSource()},t.prototype.addLayer=function(e,t,r){this._checkLoaded();var i=e.id;if(\"object\"==typeof e.source&&(this.addSource(i,e.source),e=util.extend(e,{source:i})),!this._validate(validateStyle.layer,\"layers.\"+i,e,{arrayIndex:-1},r)){var o=StyleLayer.create(e);this._validateLayer(o),o.setEventedParent(this,{layer:{id:i}});var s=t?this._order.indexOf(t):this._order.length;if(this._order.splice(s,0,i),this._layers[i]=o,this._removedLayers[i]&&o.source){var a=this._removedLayers[i];delete this._removedLayers[i],this._updatedSources[o.source]=a.type!==o.type?\"clear\":\"reload\"}this._updateLayer(o),\"symbol\"===o.type&&(this._updatedSymbolOrder=!0),this.updateClasses(i)}},t.prototype.moveLayer=function(e,t){this._checkLoaded(),this._changed=!0;var r=this._layers[e];if(!r)return void this.fire(\"error\",{error:new Error(\"The layer '\"+e+\"' does not exist in the map's style and cannot be moved.\")});var i=this._order.indexOf(e);this._order.splice(i,1);var o=t?this._order.indexOf(t):this._order.length;this._order.splice(o,0,e),\"symbol\"===r.type&&(this._updatedSymbolOrder=!0,r.source&&!this._updatedSources[r.source]&&(this._updatedSources[r.source]=\"reload\"))},t.prototype.removeLayer=function(e){this._checkLoaded();var t=this._layers[e];if(!t)return void this.fire(\"error\",{error:new Error(\"The layer '\"+e+\"' does not exist in the map's style and cannot be removed.\")});t.setEventedParent(null);var r=this._order.indexOf(e);this._order.splice(r,1),\"symbol\"===t.type&&(this._updatedSymbolOrder=!0),this._changed=!0,this._removedLayers[e]=t,delete this._layers[e],delete this._updatedLayers[e],delete this._updatedPaintProps[e]},t.prototype.getLayer=function(e){return this._layers[e]},t.prototype.setLayerZoomRange=function(e,t,r){this._checkLoaded();var i=this.getLayer(e);return i?void(i.minzoom===t&&i.maxzoom===r||(null!=t&&(i.minzoom=t),null!=r&&(i.maxzoom=r),this._updateLayer(i))):void this.fire(\"error\",{error:new Error(\"The layer '\"+e+\"' does not exist in the map's style and cannot have zoom extent.\")})},t.prototype.setFilter=function(e,t){this._checkLoaded();var r=this.getLayer(e);return r?void(null!==t&&void 0!==t&&this._validate(validateStyle.filter,\"layers.\"+r.id+\".filter\",t)||util.deepEqual(r.filter,t)||(r.filter=util.clone(t),this._updateLayer(r))):void this.fire(\"error\",{error:new Error(\"The layer '\"+e+\"' does not exist in the map's style and cannot be filtered.\")})},t.prototype.getFilter=function(e){return util.clone(this.getLayer(e).filter)},t.prototype.setLayoutProperty=function(e,t,r){this._checkLoaded();var i=this.getLayer(e);return i?void(util.deepEqual(i.getLayoutProperty(t),r)||(i.setLayoutProperty(t,r),this._updateLayer(i))):void this.fire(\"error\",{error:new Error(\"The layer '\"+e+\"' does not exist in the map's style and cannot be styled.\")})},t.prototype.getLayoutProperty=function(e,t){return this.getLayer(e).getLayoutProperty(t)},t.prototype.setPaintProperty=function(e,t,r,i){this._checkLoaded();var o=this.getLayer(e);if(!o)return void this.fire(\"error\",{error:new Error(\"The layer '\"+e+\"' does not exist in the map's style and cannot be styled.\")});if(!util.deepEqual(o.getPaintProperty(t,i),r)){var s=o.isPaintValueFeatureConstant(t);o.setPaintProperty(t,r,i);var a=!(r&&MapboxGLFunction.isFunctionDefinition(r)&&\"$zoom\"!==r.property&&void 0!==r.property);a&&s||this._updateLayer(o),this.updateClasses(e,t)}},t.prototype.getPaintProperty=function(e,t,r){return this.getLayer(e).getPaintProperty(t,r)},t.prototype.getTransition=function(){return util.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},t.prototype.updateClasses=function(e,t){if(this._changed=!0,e){var r=this._updatedPaintProps;r[e]||(r[e]={}),r[e][t||\"all\"]=!0}else this._updatedAllPaintProps=!0},t.prototype.serialize=function(){var e=this;return util.filterObject({version:this.stylesheet.version,name:this.stylesheet.name,metadata:this.stylesheet.metadata,light:this.stylesheet.light,center:this.stylesheet.center,zoom:this.stylesheet.zoom,bearing:this.stylesheet.bearing,pitch:this.stylesheet.pitch,sprite:this.stylesheet.sprite,glyphs:this.stylesheet.glyphs,transition:this.stylesheet.transition,sources:util.mapObject(this.sourceCaches,function(e){return e.serialize()}),layers:this._order.map(function(t){return e._layers[t].serialize()})},function(e){return void 0!==e})},t.prototype._updateLayer=function(e){this._updatedLayers[e.id]=!0,e.source&&!this._updatedSources[e.source]&&(this._updatedSources[e.source]=\"reload\"),this._changed=!0},t.prototype._flattenRenderedFeatures=function(e){for(var t=this,r=[],i=this._order.length-1;i>=0;i--)for(var o=t._order[i],s=0,a=e;s=this.maxzoom)||\"none\"===this.layout.visibility)},i.prototype.updatePaintTransitions=function(t,i,a,e,n){for(var o=this,r=util.extend({},this._paintDeclarations[\"\"]),s=0;s=this.endTime)return e;var a=this.oldTransition.calculate(t,i,this.startTime),n=util.easeCubicInOut((o-this.startTime-this.delay)/this.duration);return this.interp(a,e,n)},StyleTransition.prototype._calculateTargetValue=function(t,i){if(!this.zoomTransitioned)return this.declaration.calculate(t,i);var o=t.zoom,e=this.zoomHistory.lastIntegerZoom,a=o>e?2:.5,n=this.declaration.calculate({zoom:o>e?o-1:o+1},i),r=this.declaration.calculate({zoom:o},i),s=Math.min((Date.now()-this.zoomHistory.lastIntegerZoomTime)/this.duration,1),l=Math.abs(o-e),u=interpolate(s,1,l);return void 0!==n&&void 0!==r?{from:n,fromScale:a,to:r,toScale:1,t:u}:void 0},module.exports=StyleTransition;\n},{\"../util/interpolate\":204,\"../util/util\":212}],156:[function(require,module,exports){\n\"use strict\";module.exports=require(\"../style-spec/validate_style.min\"),module.exports.emitErrors=function(r,e){if(e&&e.length){for(var t=0;t-a/2;){if(s--,s<0)return!1;f-=e[s].dist(i),i=e[s]}f+=e[s].dist(e[s+1]),s++;for(var l=[],o=0;f
r;)o-=l.shift().angleDelta;if(o>n)return!1;s++,f+=c.dist(g)}return!0}module.exports=checkMaxAngle;\n},{}],159:[function(require,module,exports){\n\"use strict\";function clipLine(n,x,y,o,e){for(var r=[],t=0;t=o&&w.x>=o||(P.x>=o?P=new Point(o,P.y+(w.y-P.y)*((o-P.x)/(w.x-P.x)))._round():w.x>=o&&(w=new Point(o,P.y+(w.y-P.y)*((o-P.x)/(w.x-P.x)))._round()),P.y>=e&&w.y>=e||(P.y>=e?P=new Point(P.x+(w.x-P.x)*((e-P.y)/(w.y-P.y)),e)._round():w.y>=e&&(w=new Point(P.x+(w.x-P.x)*((e-P.y)/(w.y-P.y)),e)._round()),u&&P.equals(u[u.length-1])||(u=[P],r.push(u)),u.push(w)))))}return r}var Point=require(\"point-geometry\");module.exports=clipLine;\n},{\"point-geometry\":26}],160:[function(require,module,exports){\n\"use strict\";var createStructArrayType=require(\"../util/struct_array\"),Point=require(\"point-geometry\"),CollisionBoxArray=createStructArrayType({members:[{type:\"Int16\",name:\"anchorPointX\"},{type:\"Int16\",name:\"anchorPointY\"},{type:\"Int16\",name:\"x1\"},{type:\"Int16\",name:\"y1\"},{type:\"Int16\",name:\"x2\"},{type:\"Int16\",name:\"y2\"},{type:\"Float32\",name:\"maxScale\"},{type:\"Uint32\",name:\"featureIndex\"},{type:\"Uint16\",name:\"sourceLayerIndex\"},{type:\"Uint16\",name:\"bucketIndex\"},{type:\"Int16\",name:\"bbox0\"},{type:\"Int16\",name:\"bbox1\"},{type:\"Int16\",name:\"bbox2\"},{type:\"Int16\",name:\"bbox3\"},{type:\"Float32\",name:\"placementScale\"}]});Object.defineProperty(CollisionBoxArray.prototype.StructType.prototype,\"anchorPoint\",{get:function(){return new Point(this.anchorPointX,this.anchorPointY)}}),module.exports=CollisionBoxArray;\n},{\"../util/struct_array\":210,\"point-geometry\":26}],161:[function(require,module,exports){\n\"use strict\";var CollisionFeature=function(t,e,i,o,s,a,n,r,l,d,u){var h=n.top*r-l,x=n.bottom*r+l,f=n.left*r-l,m=n.right*r+l;if(this.boxStartIndex=t.length,d){var _=x-h,b=m-f;if(_>0)if(_=Math.max(10*r,_),u){var v=e[i.segment+1].sub(e[i.segment])._unit()._mult(b),c=[i.sub(v),i.add(v)];this._addLineCollisionBoxes(t,c,i,0,b,_,o,s,a)}else this._addLineCollisionBoxes(t,e,i,i.segment,b,_,o,s,a)}else t.emplaceBack(i.x,i.y,f,h,m,x,1/0,o,s,a,0,0,0,0,0);this.boxEndIndex=t.length};CollisionFeature.prototype._addLineCollisionBoxes=function(t,e,i,o,s,a,n,r,l){var d=a/2,u=Math.floor(s/d),h=-a/2,x=this.boxes,f=i,m=o+1,_=h;do{if(m--,m<0)return x;_-=e[m].dist(f),f=e[m]}while(_>-s/2);for(var b=e[m].dist(e[m+1]),v=0;v=e.length)return x;b=e[m].dist(e[m+1])}var g=c-_,p=e[m],C=e[m+1],B=C.sub(p)._unit()._mult(g)._add(p)._round(),M=Math.max(Math.abs(c-h)-d/2,0),y=s/2/M;t.emplaceBack(B.x,B.y,-a/2,-a/2,a/2,a/2,y,n,r,l,0,0,0,0,0)}return x},module.exports=CollisionFeature;\n},{}],162:[function(require,module,exports){\n\"use strict\";var Point=require(\"point-geometry\"),EXTENT=require(\"../data/extent\"),Grid=require(\"grid-index\"),intersectionTests=require(\"../util/intersection_tests\"),CollisionTile=function(t,e,i){if(\"object\"==typeof t){var r=t;i=e,t=r.angle,e=r.pitch,this.grid=new Grid(r.grid),this.ignoredGrid=new Grid(r.ignoredGrid)}else this.grid=new Grid(EXTENT,12,6),this.ignoredGrid=new Grid(EXTENT,12,0);this.minScale=.5,this.maxScale=2,this.angle=t,this.pitch=e;var a=Math.sin(t),o=Math.cos(t);if(this.rotationMatrix=[o,-a,a,o],this.reverseRotationMatrix=[o,a,-a,o],this.yStretch=1/Math.cos(e/180*Math.PI),this.yStretch=Math.pow(this.yStretch,1.3),this.collisionBoxArray=i,0===i.length){i.emplaceBack();var n=32767;i.emplaceBack(0,0,0,-n,0,n,n,0,0,0,0,0,0,0,0,0),i.emplaceBack(EXTENT,0,0,-n,0,n,n,0,0,0,0,0,0,0,0,0),i.emplaceBack(0,0,-n,0,n,0,n,0,0,0,0,0,0,0,0,0),i.emplaceBack(0,EXTENT,-n,0,n,0,n,0,0,0,0,0,0,0,0,0)}this.tempCollisionBox=i.get(0),this.edges=[i.get(1),i.get(2),i.get(3),i.get(4)]};CollisionTile.prototype.serialize=function(t){var e=this.grid.toArrayBuffer(),i=this.ignoredGrid.toArrayBuffer();return t&&(t.push(e),t.push(i)),{angle:this.angle,pitch:this.pitch,grid:e,ignoredGrid:i}},CollisionTile.prototype.placeCollisionFeature=function(t,e,i){for(var r=this,a=this.collisionBoxArray,o=this.minScale,n=this.rotationMatrix,l=this.yStretch,h=t.boxStartIndex;h=r.maxScale)return o}if(i){var S=void 0;if(r.angle){var P=r.reverseRotationMatrix,b=new Point(s.x1,s.y1).matMult(P),T=new Point(s.x2,s.y1).matMult(P),w=new Point(s.x1,s.y2).matMult(P),N=new Point(s.x2,s.y2).matMult(P);S=r.tempCollisionBox,S.anchorPointX=s.anchorPoint.x,S.anchorPointY=s.anchorPoint.y,S.x1=Math.min(b.x,T.x,w.x,N.x),S.y1=Math.min(b.y,T.x,w.x,N.x),S.x2=Math.max(b.x,T.x,w.x,N.x),S.y2=Math.max(b.y,T.x,w.x,N.x),S.maxScale=s.maxScale}else S=s;for(var B=0;B=r.maxScale)return o}}}return o},CollisionTile.prototype.queryRenderedSymbols=function(t,e){var i={},r=[];if(0===t.length||0===this.grid.length&&0===this.ignoredGrid.length)return r;for(var a=this.collisionBoxArray,o=this.rotationMatrix,n=this.yStretch,l=[],h=1/0,s=1/0,x=-(1/0),c=-(1/0),g=0;gS.maxScale)){var T=S.anchorPoint.matMult(o),w=T.x+S.x1/e,N=T.y+S.y1/e*n,B=T.x+S.x2/e,G=T.y+S.y2/e*n,E=[new Point(w,N),new Point(B,N),new Point(B,G),new Point(w,G)];intersectionTests.polygonIntersectsPolygon(l,E)&&(i[P][b]=!0,r.push(u[v]))}}return r},CollisionTile.prototype.getPlacementScale=function(t,e,i,r,a){var o=e.x-r.x,n=e.y-r.y,l=(a.x1-i.x2)/o,h=(a.x2-i.x1)/o,s=(a.y1-i.y2)*this.yStretch/n,x=(a.y2-i.y1)*this.yStretch/n;(isNaN(l)||isNaN(h))&&(l=h=1),(isNaN(s)||isNaN(x))&&(s=x=1);var c=Math.min(Math.max(l,h),Math.max(s,x)),g=a.maxScale,y=i.maxScale;return c>g&&(c=g),c>y&&(c=y),c>t&&c>=a.placementScale&&(t=c),t},CollisionTile.prototype.insertCollisionFeature=function(t,e,i){for(var r=this,a=i?this.ignoredGrid:this.grid,o=this.collisionBoxArray,n=t.boxStartIndex;n=0&&k=0&&q=0&&p+c<=s){var M=new Anchor(k,q,y,f)._round();n&&!checkMaxAngle(e,M,l,n,a)||x.push(M)}}g+=A}return i||x.length||o||(x=resample(e,g/2,t,n,a,l,o,!0,h)),x}var interpolate=require(\"../util/interpolate\"),Anchor=require(\"../symbol/anchor\"),checkMaxAngle=require(\"./check_max_angle\");module.exports=getAnchors;\n},{\"../symbol/anchor\":157,\"../util/interpolate\":204,\"./check_max_angle\":158}],164:[function(require,module,exports){\n\"use strict\";var ShelfPack=require(\"@mapbox/shelf-pack\"),util=require(\"../util/util\"),SIZE_GROWTH_RATE=4,DEFAULT_SIZE=128,MAX_SIZE=2048,GlyphAtlas=function(){this.width=DEFAULT_SIZE,this.height=DEFAULT_SIZE,this.atlas=new ShelfPack(this.width,this.height),this.index={},this.ids={},this.data=new Uint8Array(this.width*this.height)};GlyphAtlas.prototype.getGlyphs=function(){var t,i,e,h=this,r={};for(var s in h.ids)t=s.split(\"#\"),i=t[0],e=t[1],r[i]||(r[i]=[]),r[i].push(e);return r},GlyphAtlas.prototype.getRects=function(){var t,i,e,h=this,r={};for(var s in h.ids)t=s.split(\"#\"),i=t[0],e=t[1],r[i]||(r[i]={}),r[i][e]=h.index[s];return r},GlyphAtlas.prototype.addGlyph=function(t,i,e,h){var r=this;if(!e)return null;var s=i+\"#\"+e.id;if(this.index[s])return this.ids[s].indexOf(t)<0&&this.ids[s].push(t),this.index[s];if(!e.bitmap)return null;var a=e.width+2*h,E=e.height+2*h,n=1,l=a+2*n,T=E+2*n;l+=4-l%4,T+=4-T%4;var u=this.atlas.packOne(l,T);if(u||(this.resize(),u=this.atlas.packOne(l,T)),!u)return util.warnOnce(\"glyph bitmap overflow\"),null;this.index[s]=u,this.ids[s]=[t];for(var d=this.data,p=e.bitmap,A=0;A=MAX_SIZE||e>=MAX_SIZE)){this.texture&&(this.gl&&this.gl.deleteTexture(this.texture),this.texture=null),this.width*=SIZE_GROWTH_RATE,this.height*=SIZE_GROWTH_RATE,this.atlas.resize(this.width,this.height);for(var h=new ArrayBuffer(this.width*this.height),r=0;r65535)return a(\"glyphs > 65535 not supported\");void 0===this.loading[t]&&(this.loading[t]={});var l=this.loading[t];if(l[e])l[e].push(a);else{l[e]=[a];var i=256*e+\"-\"+(256*e+255),r=glyphUrl(t,i,this.url);ajax.getArrayBuffer(r,function(t,a){for(var i=!t&&new Glyphs(new Protobuf(a.data)),r=0;r1?2:1,this.canvas&&(this.canvas.width=this.width*this.pixelRatio,this.canvas.height=this.height*this.pixelRatio)),this.sprite=t},i.prototype.addIcons=function(t,i){for(var e=this,r=0;r1||(b?(clearTimeout(b),b=null,h(\"dblclick\",t)):b=setTimeout(l,300))}function i(e){f(\"touchmove\",e)}function c(e){f(\"touchend\",e)}function d(e){f(\"touchcancel\",e)}function l(){b=null}function s(e){var t=DOM.mousePos(g,e);t.equals(L)&&h(\"click\",e)}function v(e){h(\"dblclick\",e),e.preventDefault()}function m(t){var n=e.dragRotate&&e.dragRotate.isActive();E||n?E&&(p=t):h(\"contextmenu\",t),t.preventDefault()}function h(t,n){var o=DOM.mousePos(g,n);return e.fire(t,{lngLat:e.unproject(o),point:o,originalEvent:n})}function f(t,n){var o=DOM.touchPos(g,n),r=o.reduce(function(e,t,n,o){return e.add(t.div(o.length))},new Point(0,0));return e.fire(t,{lngLat:e.unproject(r),point:r,lngLats:o.map(function(t){return e.unproject(t)},this),points:o,originalEvent:n})}var g=e.getCanvasContainer(),p=null,E=!1,L=null,b=null;for(var q in handlers)e[q]=new handlers[q](e,t),t.interactive&&t[q]&&e[q].enable(t[q]);g.addEventListener(\"mouseout\",n,!1),g.addEventListener(\"mousedown\",o,!1),g.addEventListener(\"mouseup\",r,!1),g.addEventListener(\"mousemove\",a,!1),g.addEventListener(\"touchstart\",u,!1),g.addEventListener(\"touchend\",c,!1),g.addEventListener(\"touchmove\",i,!1),g.addEventListener(\"touchcancel\",d,!1),g.addEventListener(\"click\",s,!1),g.addEventListener(\"dblclick\",v,!1),g.addEventListener(\"contextmenu\",m,!1)};\n},{\"../util/dom\":199,\"./handler/box_zoom\":179,\"./handler/dblclick_zoom\":180,\"./handler/drag_pan\":181,\"./handler/drag_rotate\":182,\"./handler/keyboard\":183,\"./handler/scroll_zoom\":184,\"./handler/touch_zoom_rotate\":185,\"point-geometry\":26}],172:[function(require,module,exports){\n\"use strict\";var util=require(\"../util/util\"),interpolate=require(\"../util/interpolate\"),browser=require(\"../util/browser\"),LngLat=require(\"../geo/lng_lat\"),LngLatBounds=require(\"../geo/lng_lat_bounds\"),Point=require(\"point-geometry\"),Evented=require(\"../util/evented\"),Camera=function(t){function i(i,e){t.call(this),this.moving=!1,this.transform=i,this._bearingSnap=e.bearingSnap}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.getCenter=function(){return this.transform.center},i.prototype.setCenter=function(t,i){return this.jumpTo({center:t},i),this},i.prototype.panBy=function(t,i,e){return this.panTo(this.transform.center,util.extend({offset:Point.convert(t).mult(-1)},i),e),this},i.prototype.panTo=function(t,i,e){return this.easeTo(util.extend({center:t},i),e)},i.prototype.getZoom=function(){return this.transform.zoom},i.prototype.setZoom=function(t,i){return this.jumpTo({zoom:t},i),this},i.prototype.zoomTo=function(t,i,e){return this.easeTo(util.extend({zoom:t},i),e)},i.prototype.zoomIn=function(t,i){return this.zoomTo(this.getZoom()+1,t,i),this},i.prototype.zoomOut=function(t,i){return this.zoomTo(this.getZoom()-1,t,i),this},i.prototype.getBearing=function(){return this.transform.bearing},i.prototype.setBearing=function(t,i){return this.jumpTo({bearing:t},i),this},i.prototype.rotateTo=function(t,i,e){return this.easeTo(util.extend({bearing:t},i),e)},i.prototype.resetNorth=function(t,i){return this.rotateTo(0,util.extend({duration:1e3},t),i),this},i.prototype.snapToNorth=function(t,i){return Math.abs(this.getBearing())i?1:0}),[\"bottom\",\"left\",\"right\",\"top\"]))return void util.warnOnce(\"options.padding must be a positive number, or an Object with keys 'bottom', 'left', 'right', 'top'\");t=LngLatBounds.convert(t);var n=[i.padding.left-i.padding.right,i.padding.top-i.padding.bottom],r=Math.min(i.padding.right,i.padding.left),s=Math.min(i.padding.top,i.padding.bottom);i.offset=[i.offset[0]+n[0],i.offset[1]+n[1]];var a=Point.convert(i.offset),h=this.transform,u=h.project(t.getNorthWest()),p=h.project(t.getSouthEast()),c=p.sub(u),g=(h.width-2*r-2*Math.abs(a.x))/c.x,m=(h.height-2*s-2*Math.abs(a.y))/c.y;return m<0||g<0?void util.warnOnce(\"Map cannot fit within canvas with the given bounds, padding, and/or offset.\"):(i.center=h.unproject(u.add(p).div(2)),i.zoom=Math.min(h.scaleZoom(h.scale*Math.min(g,m)),i.maxZoom),i.bearing=0,i.linear?this.easeTo(i,e):this.flyTo(i,e))},i.prototype.jumpTo=function(t,i){this.stop();var e=this.transform,o=!1,n=!1,r=!1;return\"zoom\"in t&&e.zoom!==+t.zoom&&(o=!0,e.zoom=+t.zoom),\"center\"in t&&(e.center=LngLat.convert(t.center)),\"bearing\"in t&&e.bearing!==+t.bearing&&(n=!0,e.bearing=+t.bearing),\"pitch\"in t&&e.pitch!==+t.pitch&&(r=!0,e.pitch=+t.pitch),this.fire(\"movestart\",i).fire(\"move\",i),o&&this.fire(\"zoomstart\",i).fire(\"zoom\",i).fire(\"zoomend\",i),n&&this.fire(\"rotate\",i),r&&this.fire(\"pitch\",i),this.fire(\"moveend\",i)},i.prototype.easeTo=function(t,i){var e=this;this.stop(),t=util.extend({offset:[0,0],duration:500,easing:util.ease},t);var o,n,r=this.transform,s=Point.convert(t.offset),a=this.getZoom(),h=this.getBearing(),u=this.getPitch(),p=\"zoom\"in t?+t.zoom:a,c=\"bearing\"in t?this._normalizeBearing(t.bearing,h):h,g=\"pitch\"in t?+t.pitch:u;\"center\"in t?(o=LngLat.convert(t.center),n=r.centerPoint.add(s)):\"around\"in t?(o=LngLat.convert(t.around),n=r.locationPoint(o)):(n=r.centerPoint.add(s),o=r.pointLocation(n));var m=r.locationPoint(o);return t.animate===!1&&(t.duration=0),this.zooming=p!==a,this.rotating=h!==c,this.pitching=g!==u,t.smoothEasing&&0!==t.duration&&(t.easing=this._smoothOutEasing(t.duration)),t.noMoveStart||(this.moving=!0,this.fire(\"movestart\",i)),this.zooming&&this.fire(\"zoomstart\",i),clearTimeout(this._onEaseEnd),this._ease(function(t){this.zooming&&(r.zoom=interpolate(a,p,t)),this.rotating&&(r.bearing=interpolate(h,c,t)),this.pitching&&(r.pitch=interpolate(u,g,t)),r.setLocationAtPoint(o,m.add(n.sub(m)._mult(t))),this.fire(\"move\",i),this.zooming&&this.fire(\"zoom\",i),this.rotating&&this.fire(\"rotate\",i),this.pitching&&this.fire(\"pitch\",i)},function(){t.delayEndEvents?e._onEaseEnd=setTimeout(e._easeToEnd.bind(e,i),t.delayEndEvents):e._easeToEnd(i)},t),this},i.prototype._easeToEnd=function(t){var i=this.zooming;this.moving=!1,this.zooming=!1,this.rotating=!1,this.pitching=!1,i&&this.fire(\"zoomend\",t),this.fire(\"moveend\",t)},i.prototype.flyTo=function(t,i){function e(t){var i=(y*y-z*z+(t?-1:1)*E*E*_*_)/(2*(t?y:z)*E*_);return Math.log(Math.sqrt(i*i+1)-i)}function o(t){return(Math.exp(t)-Math.exp(-t))/2}function n(t){return(Math.exp(t)+Math.exp(-t))/2}function r(t){return o(t)/n(t)}this.stop(),t=util.extend({offset:[0,0],speed:1.2,curve:1.42,easing:util.ease},t);var s=this.transform,a=Point.convert(t.offset),h=this.getZoom(),u=this.getBearing(),p=this.getPitch(),c=\"center\"in t?LngLat.convert(t.center):this.getCenter(),g=\"zoom\"in t?+t.zoom:h,m=\"bearing\"in t?this._normalizeBearing(t.bearing,u):u,f=\"pitch\"in t?+t.pitch:p;Math.abs(s.center.lng)+Math.abs(c.lng)>180&&(s.center.lng>0&&c.lng<0?c.lng+=360:s.center.lng<0&&c.lng>0&&(c.lng-=360));var d=s.zoomScale(g-h),l=s.point,v=\"center\"in t?s.project(c).sub(a.div(d)):l,b=t.curve,z=Math.max(s.width,s.height),y=z/d,_=v.sub(l).mag();if(\"minZoom\"in t){var M=util.clamp(Math.min(t.minZoom,h,g),s.minZoom,s.maxZoom),T=z/s.zoomScale(M-h);b=Math.sqrt(T/_*2)}var E=b*b,x=e(0),L=function(t){return n(x)/n(x+b*t)},Z=function(t){return z*((n(x)*r(x+b*t)-o(x))/E)/_},P=(e(1)-x)/b;if(Math.abs(_)<1e-6){if(Math.abs(z-y)<1e-6)return this.easeTo(t,i);var j=y=0)return!1;return!0}),this._container.innerHTML=i.join(\" | \"),this._editLink=null}},AttributionControl.prototype._updateCompact=function(){var t=this._map.getCanvasContainer().offsetWidth<=640;this._container.classList[t?\"add\":\"remove\"](\"compact\")},module.exports=AttributionControl;\n},{\"../../util/dom\":199,\"../../util/util\":212}],174:[function(require,module,exports){\n\"use strict\";var DOM=require(\"../../util/dom\"),util=require(\"../../util/util\"),window=require(\"../../util/window\"),FullscreenControl=function(){this._fullscreen=!1,util.bindAll([\"_onClickFullscreen\",\"_changeIcon\"],this),\"onfullscreenchange\"in window.document?this._fullscreenchange=\"fullscreenchange\":\"onmozfullscreenchange\"in window.document?this._fullscreenchange=\"mozfullscreenchange\":\"onwebkitfullscreenchange\"in window.document?this._fullscreenchange=\"webkitfullscreenchange\":\"onmsfullscreenchange\"in window.document&&(this._fullscreenchange=\"MSFullscreenChange\")};FullscreenControl.prototype.onAdd=function(e){var n=\"mapboxgl-ctrl\",t=this._container=DOM.create(\"div\",n+\" mapboxgl-ctrl-group\"),l=this._fullscreenButton=DOM.create(\"button\",n+\"-icon \"+n+\"-fullscreen\",this._container);return l.setAttribute(\"aria-label\",\"Toggle fullscreen\"),l.type=\"button\",this._fullscreenButton.addEventListener(\"click\",this._onClickFullscreen),this._mapContainer=e.getContainer(),window.document.addEventListener(this._fullscreenchange,this._changeIcon),t},FullscreenControl.prototype.onRemove=function(){this._container.parentNode.removeChild(this._container),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},FullscreenControl.prototype._isFullscreen=function(){return this._fullscreen},FullscreenControl.prototype._changeIcon=function(e){if(e.target===this._mapContainer){this._fullscreen=!this._fullscreen;var n=\"mapboxgl-ctrl\";this._fullscreenButton.classList.toggle(n+\"-shrink\"),this._fullscreenButton.classList.toggle(n+\"-fullscreen\")}},FullscreenControl.prototype._onClickFullscreen=function(){this._isFullscreen()?window.document.exitFullscreen?window.document.exitFullscreen():window.document.mozCancelFullScreen?window.document.mozCancelFullScreen():window.document.msExitFullscreen?window.document.msExitFullscreen():window.document.webkitCancelFullScreen&&window.document.webkitCancelFullScreen():this._mapContainer.requestFullscreen?this._mapContainer.requestFullscreen():this._mapContainer.mozRequestFullScreen?this._mapContainer.mozRequestFullScreen():this._mapContainer.msRequestFullscreen?this._mapContainer.msRequestFullscreen():this._mapContainer.webkitRequestFullscreen&&this._mapContainer.webkitRequestFullscreen()},module.exports=FullscreenControl;\n},{\"../../util/dom\":199,\"../../util/util\":212,\"../../util/window\":194}],175:[function(require,module,exports){\n\"use strict\";function checkGeolocationSupport(t){void 0!==supportsGeolocation?t(supportsGeolocation):void 0!==window.navigator.permissions?window.navigator.permissions.query({name:\"geolocation\"}).then(function(o){supportsGeolocation=\"denied\"!==o.state,t(supportsGeolocation)}):(supportsGeolocation=!!window.navigator.geolocation,t(supportsGeolocation))}var Evented=require(\"../../util/evented\"),DOM=require(\"../../util/dom\"),window=require(\"../../util/window\"),util=require(\"../../util/util\"),defaultGeoPositionOptions={enableHighAccuracy:!1,timeout:6e3},className=\"mapboxgl-ctrl\",supportsGeolocation,GeolocateControl=function(t){function o(o){t.call(this),this.options=o||{},util.bindAll([\"_onSuccess\",\"_onError\",\"_finish\",\"_setupUI\"],this)}return t&&(o.__proto__=t),o.prototype=Object.create(t&&t.prototype),o.prototype.constructor=o,o.prototype.onAdd=function(t){return this._map=t,this._container=DOM.create(\"div\",className+\" \"+className+\"-group\"),checkGeolocationSupport(this._setupUI),this._container},o.prototype.onRemove=function(){this._container.parentNode.removeChild(this._container),this._map=void 0},o.prototype._onSuccess=function(t){this._map.jumpTo({center:[t.coords.longitude,t.coords.latitude],zoom:17,bearing:0,pitch:0}),this.fire(\"geolocate\",t),this._finish()},o.prototype._onError=function(t){this.fire(\"error\",t),this._finish()},o.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},o.prototype._setupUI=function(t){t!==!1&&(this._container.addEventListener(\"contextmenu\",function(t){return t.preventDefault()}),this._geolocateButton=DOM.create(\"button\",className+\"-icon \"+className+\"-geolocate\",this._container),this._geolocateButton.type=\"button\",this._geolocateButton.setAttribute(\"aria-label\",\"Geolocate\"),this.options.watchPosition&&this._geolocateButton.setAttribute(\"aria-pressed\",!1),this._geolocateButton.addEventListener(\"click\",this._onClickGeolocate.bind(this)))},o.prototype._onClickGeolocate=function(){var t=util.extend(defaultGeoPositionOptions,this.options&&this.options.positionOptions||{});this.options.watchPosition?void 0!==this._geolocationWatchID?(this._geolocateButton.classList.remove(\"watching\"),this._geolocateButton.setAttribute(\"aria-pressed\",!1),window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0):(this._geolocateButton.classList.add(\"watching\"),this._geolocateButton.setAttribute(\"aria-pressed\",!0),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,t)):(window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,t),this._timeoutId=setTimeout(this._finish,1e4))},o}(Evented);module.exports=GeolocateControl;\n},{\"../../util/dom\":199,\"../../util/evented\":200,\"../../util/util\":212,\"../../util/window\":194}],176:[function(require,module,exports){\n\"use strict\";var DOM=require(\"../../util/dom\"),util=require(\"../../util/util\"),LogoControl=function(){util.bindAll([\"_updateLogo\"],this)};LogoControl.prototype.onAdd=function(o){return this._map=o,this._container=DOM.create(\"div\",\"mapboxgl-ctrl\"),this._map.on(\"sourcedata\",this._updateLogo),this._updateLogo(),this._container},LogoControl.prototype.onRemove=function(){this._container.parentNode.removeChild(this._container),this._map.off(\"sourcedata\",this._updateLogo)},LogoControl.prototype.getDefaultPosition=function(){return\"bottom-left\"},LogoControl.prototype._updateLogo=function(o){if(o&&\"metadata\"===o.sourceDataType)if(!this._container.childNodes.length&&this._logoRequired()){var t=DOM.create(\"a\",\"mapboxgl-ctrl-logo\");t.target=\"_blank\",t.href=\"https://www.mapbox.com/\",t.setAttribute(\"aria-label\",\"Mapbox logo\"),this._container.appendChild(t),this._map.off(\"data\",this._updateLogo)}else this._container.childNodes.length&&!this._logoRequired()&&this.onRemove()},LogoControl.prototype._logoRequired=function(){if(this._map.style){var o=this._map.style.sourceCaches;for(var t in o){var e=o[t].getSource();if(e.mapbox_logo)return!0}return!1}},module.exports=LogoControl;\n},{\"../../util/dom\":199,\"../../util/util\":212}],177:[function(require,module,exports){\n\"use strict\";function copyMouseEvent(t){return new window.MouseEvent(t.type,{button:2,buttons:2,bubbles:!0,cancelable:!0,detail:t.detail,view:t.view,screenX:t.screenX,screenY:t.screenY,clientX:t.clientX,clientY:t.clientY,movementX:t.movementX,movementY:t.movementY,ctrlKey:t.ctrlKey,shiftKey:t.shiftKey,altKey:t.altKey,metaKey:t.metaKey})}var DOM=require(\"../../util/dom\"),window=require(\"../../util/window\"),util=require(\"../../util/util\"),className=\"mapboxgl-ctrl\",NavigationControl=function(){util.bindAll([\"_rotateCompassArrow\"],this)};NavigationControl.prototype._rotateCompassArrow=function(){var t=\"rotate(\"+this._map.transform.angle*(180/Math.PI)+\"deg)\";this._compassArrow.style.transform=t},NavigationControl.prototype.onAdd=function(t){return this._map=t,this._container=DOM.create(\"div\",className+\" \"+className+\"-group\",t.getContainer()),this._container.addEventListener(\"contextmenu\",this._onContextMenu.bind(this)),this._zoomInButton=this._createButton(className+\"-icon \"+className+\"-zoom-in\",\"Zoom In\",t.zoomIn.bind(t)),this._zoomOutButton=this._createButton(className+\"-icon \"+className+\"-zoom-out\",\"Zoom Out\",t.zoomOut.bind(t)),this._compass=this._createButton(className+\"-icon \"+className+\"-compass\",\"Reset North\",t.resetNorth.bind(t)),this._compassArrow=DOM.create(\"span\",className+\"-compass-arrow\",this._compass),this._compass.addEventListener(\"mousedown\",this._onCompassDown.bind(this)),this._onCompassMove=this._onCompassMove.bind(this),this._onCompassUp=this._onCompassUp.bind(this),this._map.on(\"rotate\",this._rotateCompassArrow),this._rotateCompassArrow(),this._container},NavigationControl.prototype.onRemove=function(){this._container.parentNode.removeChild(this._container),this._map.off(\"rotate\",this._rotateCompassArrow),this._map=void 0},NavigationControl.prototype._onContextMenu=function(t){t.preventDefault()},NavigationControl.prototype._onCompassDown=function(t){0===t.button&&(DOM.disableDrag(),window.document.addEventListener(\"mousemove\",this._onCompassMove),window.document.addEventListener(\"mouseup\",this._onCompassUp),this._map.getCanvasContainer().dispatchEvent(copyMouseEvent(t)),t.stopPropagation())},NavigationControl.prototype._onCompassMove=function(t){0===t.button&&(this._map.getCanvasContainer().dispatchEvent(copyMouseEvent(t)),t.stopPropagation())},NavigationControl.prototype._onCompassUp=function(t){0===t.button&&(window.document.removeEventListener(\"mousemove\",this._onCompassMove),window.document.removeEventListener(\"mouseup\",this._onCompassUp),DOM.enableDrag(),this._map.getCanvasContainer().dispatchEvent(copyMouseEvent(t)),t.stopPropagation())},NavigationControl.prototype._createButton=function(t,o,e){var n=DOM.create(\"button\",t,this._container);return n.type=\"button\",n.setAttribute(\"aria-label\",o),n.addEventListener(\"click\",function(){e()}),n},module.exports=NavigationControl;\n},{\"../../util/dom\":199,\"../../util/util\":212,\"../../util/window\":194}],178:[function(require,module,exports){\n\"use strict\";function updateScale(t,e,o){var n=o&&o.maxWidth||100,i=t._container.clientHeight/2,a=getDistance(t.unproject([0,i]),t.unproject([n,i]));if(o&&\"imperial\"===o.unit){var r=3.2808*a;if(r>5280){var l=r/5280;setScale(e,n,l,\"mi\")}else setScale(e,n,r,\"ft\")}else setScale(e,n,a,\"m\")}function setScale(t,e,o,n){var i=getRoundNum(o),a=i/o;\"m\"===n&&i>=1e3&&(i/=1e3,n=\"km\"),t.style.width=e*a+\"px\",t.innerHTML=i+n}function getDistance(t,e){var o=6371e3,n=Math.PI/180,i=t.lat*n,a=e.lat*n,r=Math.sin(i)*Math.sin(a)+Math.cos(i)*Math.cos(a)*Math.cos((e.lng-t.lng)*n),l=o*Math.acos(Math.min(r,1));return l}function getRoundNum(t){var e=Math.pow(10,(\"\"+Math.floor(t)).length-1),o=t/e;return o=o>=10?10:o>=5?5:o>=3?3:o>=2?2:1,e*o}var DOM=require(\"../../util/dom\"),util=require(\"../../util/util\"),ScaleControl=function(t){this.options=t,util.bindAll([\"_onMove\"],this)};ScaleControl.prototype.getDefaultPosition=function(){return\"bottom-left\"},ScaleControl.prototype._onMove=function(){updateScale(this._map,this._container,this.options)},ScaleControl.prototype.onAdd=function(t){return this._map=t,this._container=DOM.create(\"div\",\"mapboxgl-ctrl mapboxgl-ctrl-scale\",t.getContainer()),this._map.on(\"move\",this._onMove),this._onMove(),this._container},ScaleControl.prototype.onRemove=function(){this._container.parentNode.removeChild(this._container),this._map.off(\"move\",this._onMove),this._map=void 0},module.exports=ScaleControl;\n},{\"../../util/dom\":199,\"../../util/util\":212}],179:[function(require,module,exports){\n\"use strict\";var DOM=require(\"../../util/dom\"),LngLatBounds=require(\"../../geo/lng_lat_bounds\"),util=require(\"../../util/util\"),window=require(\"../../util/window\"),BoxZoomHandler=function(o){this._map=o,this._el=o.getCanvasContainer(),this._container=o.getContainer(),util.bindAll([\"_onMouseDown\",\"_onMouseMove\",\"_onMouseUp\",\"_onKeyDown\"],this)};BoxZoomHandler.prototype.isEnabled=function(){return!!this._enabled},BoxZoomHandler.prototype.isActive=function(){return!!this._active},BoxZoomHandler.prototype.enable=function(){this.isEnabled()||(this._el.addEventListener(\"mousedown\",this._onMouseDown,!1),this._enabled=!0)},BoxZoomHandler.prototype.disable=function(){this.isEnabled()&&(this._el.removeEventListener(\"mousedown\",this._onMouseDown),this._enabled=!1)},BoxZoomHandler.prototype._onMouseDown=function(o){o.shiftKey&&0===o.button&&(window.document.addEventListener(\"mousemove\",this._onMouseMove,!1),window.document.addEventListener(\"keydown\",this._onKeyDown,!1),window.document.addEventListener(\"mouseup\",this._onMouseUp,!1),DOM.disableDrag(),this._startPos=DOM.mousePos(this._el,o),this._active=!0)},BoxZoomHandler.prototype._onMouseMove=function(o){var e=this._startPos,t=DOM.mousePos(this._el,o);this._box||(this._box=DOM.create(\"div\",\"mapboxgl-boxzoom\",this._container),this._container.classList.add(\"mapboxgl-crosshair\"),this._fireEvent(\"boxzoomstart\",o));var n=Math.min(e.x,t.x),i=Math.max(e.x,t.x),s=Math.min(e.y,t.y),r=Math.max(e.y,t.y);DOM.setTransform(this._box,\"translate(\"+n+\"px,\"+s+\"px)\"),this._box.style.width=i-n+\"px\",this._box.style.height=r-s+\"px\"},BoxZoomHandler.prototype._onMouseUp=function(o){if(0===o.button){var e=this._startPos,t=DOM.mousePos(this._el,o),n=(new LngLatBounds).extend(this._map.unproject(e)).extend(this._map.unproject(t));this._finish(),e.x===t.x&&e.y===t.y?this._fireEvent(\"boxzoomcancel\",o):this._map.fitBounds(n,{linear:!0}).fire(\"boxzoomend\",{originalEvent:o,boxZoomBounds:n})}},BoxZoomHandler.prototype._onKeyDown=function(o){27===o.keyCode&&(this._finish(),this._fireEvent(\"boxzoomcancel\",o))},BoxZoomHandler.prototype._finish=function(){this._active=!1,window.document.removeEventListener(\"mousemove\",this._onMouseMove,!1),window.document.removeEventListener(\"keydown\",this._onKeyDown,!1),window.document.removeEventListener(\"mouseup\",this._onMouseUp,!1),this._container.classList.remove(\"mapboxgl-crosshair\"),this._box&&(this._box.parentNode.removeChild(this._box),this._box=null),DOM.enableDrag()},BoxZoomHandler.prototype._fireEvent=function(o,e){return this._map.fire(o,{originalEvent:e})},module.exports=BoxZoomHandler;\n},{\"../../geo/lng_lat_bounds\":63,\"../../util/dom\":199,\"../../util/util\":212,\"../../util/window\":194}],180:[function(require,module,exports){\n\"use strict\";var DoubleClickZoomHandler=function(o){this._map=o,this._onDblClick=this._onDblClick.bind(this)};DoubleClickZoomHandler.prototype.isEnabled=function(){return!!this._enabled},DoubleClickZoomHandler.prototype.enable=function(){this.isEnabled()||(this._map.on(\"dblclick\",this._onDblClick),this._enabled=!0)},DoubleClickZoomHandler.prototype.disable=function(){this.isEnabled()&&(this._map.off(\"dblclick\",this._onDblClick),this._enabled=!1)},DoubleClickZoomHandler.prototype._onDblClick=function(o){this._map.zoomTo(this._map.getZoom()+(o.originalEvent.shiftKey?-1:1),{around:o.lngLat},o)},module.exports=DoubleClickZoomHandler;\n},{}],181:[function(require,module,exports){\n\"use strict\";var DOM=require(\"../../util/dom\"),util=require(\"../../util/util\"),window=require(\"../../util/window\"),inertiaLinearity=.3,inertiaEasing=util.bezier(0,0,inertiaLinearity,1),inertiaMaxSpeed=1400,inertiaDeceleration=2500,DragPanHandler=function(t){this._map=t,this._el=t.getCanvasContainer(),util.bindAll([\"_onDown\",\"_onMove\",\"_onUp\",\"_onTouchEnd\",\"_onMouseUp\"],this)};DragPanHandler.prototype.isEnabled=function(){return!!this._enabled},DragPanHandler.prototype.isActive=function(){return!!this._active},DragPanHandler.prototype.enable=function(){this.isEnabled()||(this._el.addEventListener(\"mousedown\",this._onDown),this._el.addEventListener(\"touchstart\",this._onDown),this._enabled=!0)},DragPanHandler.prototype.disable=function(){this.isEnabled()&&(this._el.removeEventListener(\"mousedown\",this._onDown),this._el.removeEventListener(\"touchstart\",this._onDown),this._enabled=!1)},DragPanHandler.prototype._onDown=function(t){this._ignoreEvent(t)||this.isActive()||(t.touches?(window.document.addEventListener(\"touchmove\",this._onMove),window.document.addEventListener(\"touchend\",this._onTouchEnd)):(window.document.addEventListener(\"mousemove\",this._onMove),window.document.addEventListener(\"mouseup\",this._onMouseUp)),window.addEventListener(\"blur\",this._onMouseUp),this._active=!1,this._startPos=this._pos=DOM.mousePos(this._el,t),this._inertia=[[Date.now(),this._pos]])},DragPanHandler.prototype._onMove=function(t){if(!this._ignoreEvent(t)){this.isActive()||(this._active=!0,this._map.moving=!0,this._fireEvent(\"dragstart\",t),this._fireEvent(\"movestart\",t));var e=DOM.mousePos(this._el,t),n=this._map;n.stop(),this._drainInertiaBuffer(),this._inertia.push([Date.now(),e]),n.transform.setLocationAtPoint(n.transform.pointLocation(this._pos),e),this._fireEvent(\"drag\",t),this._fireEvent(\"move\",t),this._pos=e,t.preventDefault()}},DragPanHandler.prototype._onUp=function(t){var e=this;if(this.isActive()){this._active=!1,this._fireEvent(\"dragend\",t),this._drainInertiaBuffer();var n=function(){e._map.moving=!1,e._fireEvent(\"moveend\",t)},i=this._inertia;if(i.length<2)return void n();var o=i[i.length-1],r=i[0],a=o[1].sub(r[1]),s=(o[0]-r[0])/1e3;if(0===s||o[1].equals(r[1]))return void n();var u=a.mult(inertiaLinearity/s),d=u.mag();d>inertiaMaxSpeed&&(d=inertiaMaxSpeed,u._unit()._mult(d));var h=d/(inertiaDeceleration*inertiaLinearity),v=u.mult(-h/2);this._map.panBy(v,{duration:1e3*h,easing:inertiaEasing,noMoveStart:!0},{originalEvent:t})}},DragPanHandler.prototype._onMouseUp=function(t){this._ignoreEvent(t)||(this._onUp(t),window.document.removeEventListener(\"mousemove\",this._onMove),window.document.removeEventListener(\"mouseup\",this._onMouseUp),window.removeEventListener(\"blur\",this._onMouseUp))},DragPanHandler.prototype._onTouchEnd=function(t){this._ignoreEvent(t)||(this._onUp(t),window.document.removeEventListener(\"touchmove\",this._onMove),window.document.removeEventListener(\"touchend\",this._onTouchEnd))},DragPanHandler.prototype._fireEvent=function(t,e){return this._map.fire(t,{originalEvent:e})},DragPanHandler.prototype._ignoreEvent=function(t){var e=this._map;if(e.boxZoom&&e.boxZoom.isActive())return!0;if(e.dragRotate&&e.dragRotate.isActive())return!0;if(t.touches)return t.touches.length>1;if(t.ctrlKey)return!0;var n=1,i=0;return\"mousemove\"===t.type?t.buttons&0===n:t.button&&t.button!==i},DragPanHandler.prototype._drainInertiaBuffer=function(){for(var t=this._inertia,e=Date.now(),n=160;t.length>0&&e-t[0][0]>n;)t.shift()},module.exports=DragPanHandler;\n},{\"../../util/dom\":199,\"../../util/util\":212,\"../../util/window\":194}],182:[function(require,module,exports){\n\"use strict\";var DOM=require(\"../../util/dom\"),util=require(\"../../util/util\"),window=require(\"../../util/window\"),inertiaLinearity=.25,inertiaEasing=util.bezier(0,0,inertiaLinearity,1),inertiaMaxSpeed=180,inertiaDeceleration=720,DragRotateHandler=function(t,e){this._map=t,this._el=t.getCanvasContainer(),this._bearingSnap=e.bearingSnap,this._pitchWithRotate=e.pitchWithRotate!==!1,util.bindAll([\"_onDown\",\"_onMove\",\"_onUp\"],this)};DragRotateHandler.prototype.isEnabled=function(){return!!this._enabled},DragRotateHandler.prototype.isActive=function(){return!!this._active},DragRotateHandler.prototype.enable=function(){this.isEnabled()||(this._el.addEventListener(\"mousedown\",this._onDown),this._enabled=!0)},DragRotateHandler.prototype.disable=function(){this.isEnabled()&&(this._el.removeEventListener(\"mousedown\",this._onDown),this._enabled=!1)},DragRotateHandler.prototype._onDown=function(t){this._ignoreEvent(t)||this.isActive()||(window.document.addEventListener(\"mousemove\",this._onMove),window.document.addEventListener(\"mouseup\",this._onUp),window.addEventListener(\"blur\",this._onUp),this._active=!1,this._inertia=[[Date.now(),this._map.getBearing()]],this._startPos=this._pos=DOM.mousePos(this._el,t),this._center=this._map.transform.centerPoint,t.preventDefault())},DragRotateHandler.prototype._onMove=function(t){if(!this._ignoreEvent(t)){this.isActive()||(this._active=!0,this._map.moving=!0,this._fireEvent(\"rotatestart\",t),this._fireEvent(\"movestart\",t));var e=this._map;e.stop();var i=this._pos,n=DOM.mousePos(this._el,t),r=.8*(i.x-n.x),a=(i.y-n.y)*-.5,o=e.getBearing()-r,s=e.getPitch()-a,h=this._inertia,v=h[h.length-1];this._drainInertiaBuffer(),h.push([Date.now(),e._normalizeBearing(o,v[1])]),e.transform.bearing=o,this._pitchWithRotate&&(e.transform.pitch=s),this._fireEvent(\"rotate\",t),this._fireEvent(\"move\",t),this._pos=n}},DragRotateHandler.prototype._onUp=function(t){var e=this;if(!this._ignoreEvent(t)&&(window.document.removeEventListener(\"mousemove\",this._onMove),window.document.removeEventListener(\"mouseup\",this._onUp),window.removeEventListener(\"blur\",this._onUp),this.isActive())){this._active=!1,this._fireEvent(\"rotateend\",t),this._drainInertiaBuffer();var i=this._map,n=i.getBearing(),r=this._inertia,a=function(){Math.abs(n)inertiaMaxSpeed&&(p=inertiaMaxSpeed);var l=p/(inertiaDeceleration*inertiaLinearity),g=u*p*(l/2);v+=g,Math.abs(i._normalizeBearing(v,0))1;var i=t.ctrlKey?1:2,n=t.ctrlKey?0:2,r=t.button;return\"undefined\"!=typeof InstallTrigger&&2===t.button&&t.ctrlKey&&window.navigator.platform.toUpperCase().indexOf(\"MAC\")>=0&&(r=0),\"mousemove\"===t.type?t.buttons&0===i:!this.isActive()&&r!==n},DragRotateHandler.prototype._drainInertiaBuffer=function(){for(var t=this._inertia,e=Date.now(),i=160;t.length>0&&e-t[0][0]>i;)t.shift()},module.exports=DragRotateHandler;\n},{\"../../util/dom\":199,\"../../util/util\":212,\"../../util/window\":194}],183:[function(require,module,exports){\n\"use strict\";function easeOut(e){return e*(2-e)}var panStep=100,bearingStep=15,pitchStep=10,KeyboardHandler=function(e){this._map=e,this._el=e.getCanvasContainer(),this._onKeyDown=this._onKeyDown.bind(this)};KeyboardHandler.prototype.isEnabled=function(){return!!this._enabled},KeyboardHandler.prototype.enable=function(){this.isEnabled()||(this._el.addEventListener(\"keydown\",this._onKeyDown,!1),this._enabled=!0)},KeyboardHandler.prototype.disable=function(){this.isEnabled()&&(this._el.removeEventListener(\"keydown\",this._onKeyDown),this._enabled=!1)},KeyboardHandler.prototype._onKeyDown=function(e){if(!(e.altKey||e.ctrlKey||e.metaKey)){var t=0,n=0,a=0,i=0,r=0;switch(e.keyCode){case 61:case 107:case 171:case 187:t=1;break;case 189:case 109:case 173:t=-1;break;case 37:e.shiftKey?n=-1:(e.preventDefault(),i=-1);break;case 39:e.shiftKey?n=1:(e.preventDefault(),i=1);break;case 38:e.shiftKey?a=1:(e.preventDefault(),r=-1);break;case 40:e.shiftKey?a=-1:(r=1,e.preventDefault())}var s=this._map,o=s.getZoom(),d={duration:300,delayEndEvents:500,easing:easeOut,zoom:t?Math.round(o)+t*(e.shiftKey?2:1):o,bearing:s.getBearing()+n*bearingStep,pitch:s.getPitch()+a*pitchStep,offset:[-i*panStep,-r*panStep],center:s.getCenter()};s.easeTo(d,{originalEvent:e})}},module.exports=KeyboardHandler;\n},{}],184:[function(require,module,exports){\n\"use strict\";var DOM=require(\"../../util/dom\"),util=require(\"../../util/util\"),browser=require(\"../../util/browser\"),window=require(\"../../util/window\"),ua=window.navigator.userAgent.toLowerCase(),firefox=ua.indexOf(\"firefox\")!==-1,safari=ua.indexOf(\"safari\")!==-1&&ua.indexOf(\"chrom\")===-1,ScrollZoomHandler=function(e){this._map=e,this._el=e.getCanvasContainer(),util.bindAll([\"_onWheel\",\"_onTimeout\"],this)};ScrollZoomHandler.prototype.isEnabled=function(){return!!this._enabled},ScrollZoomHandler.prototype.enable=function(e){this.isEnabled()||(this._el.addEventListener(\"wheel\",this._onWheel,!1),this._el.addEventListener(\"mousewheel\",this._onWheel,!1),this._enabled=!0,this._aroundCenter=e&&\"center\"===e.around)},ScrollZoomHandler.prototype.disable=function(){this.isEnabled()&&(this._el.removeEventListener(\"wheel\",this._onWheel),this._el.removeEventListener(\"mousewheel\",this._onWheel),this._enabled=!1)},ScrollZoomHandler.prototype._onWheel=function(e){var t;\"wheel\"===e.type?(t=e.deltaY,firefox&&e.deltaMode===window.WheelEvent.DOM_DELTA_PIXEL&&(t/=browser.devicePixelRatio),e.deltaMode===window.WheelEvent.DOM_DELTA_LINE&&(t*=40)):\"mousewheel\"===e.type&&(t=-e.wheelDeltaY,safari&&(t/=3));var o=browser.now(),i=o-(this._time||0);this._pos=DOM.mousePos(this._el,e),this._time=o,0!==t&&t%4.000244140625===0?this._type=\"wheel\":0!==t&&Math.abs(t)<4?this._type=\"trackpad\":i>400?(this._type=null,this._lastValue=t,this._timeout=setTimeout(this._onTimeout,40)):this._type||(this._type=Math.abs(i*t)<200?\"trackpad\":\"wheel\",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,t+=this._lastValue)),e.shiftKey&&t&&(t/=4),this._type&&this._zoom(-t,e),e.preventDefault()},ScrollZoomHandler.prototype._onTimeout=function(){this._type=\"wheel\",this._zoom(-this._lastValue)},ScrollZoomHandler.prototype._zoom=function(e,t){if(0!==e){var o=this._map,i=2/(1+Math.exp(-Math.abs(e/100)));e<0&&0!==i&&(i=1/i);var l=o.ease?o.ease.to:o.transform.scale,s=o.transform.scaleZoom(l*i);o.zoomTo(s,{duration:\"wheel\"===this._type?200:0,around:this._aroundCenter?o.getCenter():o.unproject(this._pos),delayEndEvents:200,smoothEasing:!0},{originalEvent:t})}},module.exports=ScrollZoomHandler;\n},{\"../../util/browser\":192,\"../../util/dom\":199,\"../../util/util\":212,\"../../util/window\":194}],185:[function(require,module,exports){\n\"use strict\";var DOM=require(\"../../util/dom\"),util=require(\"../../util/util\"),window=require(\"../../util/window\"),inertiaLinearity=.15,inertiaEasing=util.bezier(0,0,inertiaLinearity,1),inertiaDeceleration=12,inertiaMaxSpeed=2.5,significantScaleThreshold=.15,significantRotateThreshold=4,TouchZoomRotateHandler=function(t){this._map=t,this._el=t.getCanvasContainer(),util.bindAll([\"_onStart\",\"_onMove\",\"_onEnd\"],this)};TouchZoomRotateHandler.prototype.isEnabled=function(){return!!this._enabled},TouchZoomRotateHandler.prototype.enable=function(t){this.isEnabled()||(this._el.addEventListener(\"touchstart\",this._onStart,!1),this._enabled=!0,this._aroundCenter=t&&\"center\"===t.around)},TouchZoomRotateHandler.prototype.disable=function(){this.isEnabled()&&(this._el.removeEventListener(\"touchstart\",this._onStart),this._enabled=!1)},TouchZoomRotateHandler.prototype.disableRotation=function(){this._rotationDisabled=!0},TouchZoomRotateHandler.prototype.enableRotation=function(){this._rotationDisabled=!1},TouchZoomRotateHandler.prototype._onStart=function(t){if(2===t.touches.length){var e=DOM.mousePos(this._el,t.touches[0]),o=DOM.mousePos(this._el,t.touches[1]);this._startVec=e.sub(o),this._startScale=this._map.transform.scale,this._startBearing=this._map.transform.bearing,this._gestureIntent=void 0,this._inertia=[],window.document.addEventListener(\"touchmove\",this._onMove,!1),window.document.addEventListener(\"touchend\",this._onEnd,!1)}},TouchZoomRotateHandler.prototype._onMove=function(t){if(2===t.touches.length){var e=DOM.mousePos(this._el,t.touches[0]),o=DOM.mousePos(this._el,t.touches[1]),i=e.add(o).div(2),n=e.sub(o),a=n.mag()/this._startVec.mag(),r=this._rotationDisabled?0:180*n.angleWith(this._startVec)/Math.PI,s=this._map;if(this._gestureIntent){var h={duration:0,around:s.unproject(i)};\"rotate\"===this._gestureIntent&&(h.bearing=this._startBearing+r),\"zoom\"!==this._gestureIntent&&\"rotate\"!==this._gestureIntent||(h.zoom=s.transform.scaleZoom(this._startScale*a)),s.stop(),this._drainInertiaBuffer(),this._inertia.push([Date.now(),a,i]),s.easeTo(h,{originalEvent:t})}else{var u=Math.abs(1-a)>significantScaleThreshold,d=Math.abs(r)>significantRotateThreshold;d?this._gestureIntent=\"rotate\":u&&(this._gestureIntent=\"zoom\"),this._gestureIntent&&(this._startVec=n,this._startScale=s.transform.scale,this._startBearing=s.transform.bearing)}t.preventDefault()}},TouchZoomRotateHandler.prototype._onEnd=function(t){window.document.removeEventListener(\"touchmove\",this._onMove),window.document.removeEventListener(\"touchend\",this._onEnd),this._drainInertiaBuffer();var e=this._inertia,o=this._map;if(e.length<2)return void o.snapToNorth({},{originalEvent:t});var i=e[e.length-1],n=e[0],a=o.transform.scaleZoom(this._startScale*i[1]),r=o.transform.scaleZoom(this._startScale*n[1]),s=a-r,h=(i[0]-n[0])/1e3,u=i[2];if(0===h||a===r)return void o.snapToNorth({},{originalEvent:t});var d=s*inertiaLinearity/h;Math.abs(d)>inertiaMaxSpeed&&(d=d>0?inertiaMaxSpeed:-inertiaMaxSpeed);var l=1e3*Math.abs(d/(inertiaDeceleration*inertiaLinearity)),c=a+d*l/2e3;c<0&&(c=0),o.easeTo({zoom:c,duration:l,easing:inertiaEasing,around:this._aroundCenter?o.getCenter():o.unproject(u)},{originalEvent:t})},TouchZoomRotateHandler.prototype._drainInertiaBuffer=function(){for(var t=this._inertia,e=Date.now(),o=160;t.length>2&&e-t[0][0]>o;)t.shift()},module.exports=TouchZoomRotateHandler;\n},{\"../../util/dom\":199,\"../../util/util\":212,\"../../util/window\":194}],186:[function(require,module,exports){\n\"use strict\";var util=require(\"../util/util\"),window=require(\"../util/window\"),Hash=function(){util.bindAll([\"_onHashChange\",\"_updateHash\"],this)};Hash.prototype.addTo=function(t){return this._map=t,window.addEventListener(\"hashchange\",this._onHashChange,!1),this._map.on(\"moveend\",this._updateHash),this},Hash.prototype.remove=function(){return window.removeEventListener(\"hashchange\",this._onHashChange,!1),this._map.off(\"moveend\",this._updateHash),delete this._map,this},Hash.prototype._onHashChange=function(){var t=window.location.hash.replace(\"#\",\"\").split(\"/\");return t.length>=3&&(this._map.jumpTo({center:[+t[2],+t[1]],zoom:+t[0],bearing:+(t[3]||0),pitch:+(t[4]||0)}),!0)},Hash.prototype._updateHash=function(){var t=this._map.getCenter(),e=this._map.getZoom(),a=this._map.getBearing(),h=this._map.getPitch(),i=Math.max(0,Math.ceil(Math.log(e)/Math.LN2)),n=\"#\"+Math.round(100*e)/100+\"/\"+t.lat.toFixed(i)+\"/\"+t.lng.toFixed(i);(a||h)&&(n+=\"/\"+Math.round(10*a)/10),h&&(n+=\"/\"+Math.round(h)),window.history.replaceState(\"\",\"\",n)},module.exports=Hash;\n},{\"../util/util\":212,\"../util/window\":194}],187:[function(require,module,exports){\n\"use strict\";function removeNode(t){t.parentNode&&t.parentNode.removeChild(t)}var util=require(\"../util/util\"),browser=require(\"../util/browser\"),window=require(\"../util/window\"),DOM=require(\"../util/dom\"),Style=require(\"../style/style\"),AnimationLoop=require(\"../style/animation_loop\"),Painter=require(\"../render/painter\"),Transform=require(\"../geo/transform\"),Hash=require(\"./hash\"),bindHandlers=require(\"./bind_handlers\"),Camera=require(\"./camera\"),LngLat=require(\"../geo/lng_lat\"),LngLatBounds=require(\"../geo/lng_lat_bounds\"),Point=require(\"point-geometry\"),AttributionControl=require(\"./control/attribution_control\"),LogoControl=require(\"./control/logo_control\"),isSupported=require(\"mapbox-gl-supported\"),defaultMinZoom=0,defaultMaxZoom=22,defaultOptions={center:[0,0],zoom:0,bearing:0,pitch:0,minZoom:defaultMinZoom,maxZoom:defaultMaxZoom,interactive:!0,scrollZoom:!0,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,bearingSnap:7,hash:!1,attributionControl:!0,failIfMajorPerformanceCaveat:!1,preserveDrawingBuffer:!1,trackResize:!0,renderWorldCopies:!0,refreshExpiredTiles:!0},Map=function(t){function e(e){var o=this;if(e=util.extend({},defaultOptions,e),null!=e.minZoom&&null!=e.maxZoom&&e.minZoom>e.maxZoom)throw new Error(\"maxZoom must be greater than minZoom\");var i=new Transform(e.minZoom,e.maxZoom,e.renderWorldCopies);if(t.call(this,i,e),this._interactive=e.interactive,this._failIfMajorPerformanceCaveat=e.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=e.preserveDrawingBuffer,this._trackResize=e.trackResize,this._bearingSnap=e.bearingSnap,this._refreshExpiredTiles=e.refreshExpiredTiles,\"string\"==typeof e.container){if(this._container=window.document.getElementById(e.container),!this._container)throw new Error(\"Container '\"+e.container+\"' not found.\")}else this._container=e.container;this.animationLoop=new AnimationLoop,e.maxBounds&&this.setMaxBounds(e.maxBounds),util.bindAll([\"_onWindowOnline\",\"_onWindowResize\",\"_contextLost\",\"_contextRestored\",\"_update\",\"_render\",\"_onData\",\"_onDataLoading\"],this),this._setupContainer(),this._setupPainter(),this.on(\"move\",this._update.bind(this,!1)),this.on(\"zoom\",this._update.bind(this,!0)),this.on(\"moveend\",function(){o.animationLoop.set(300),o._rerender()}),\"undefined\"!=typeof window&&(window.addEventListener(\"online\",this._onWindowOnline,!1),window.addEventListener(\"resize\",this._onWindowResize,!1)),bindHandlers(this,e),this._hash=e.hash&&(new Hash).addTo(this),this._hash&&this._hash._onHashChange()||this.jumpTo({center:e.center,zoom:e.zoom,bearing:e.bearing,pitch:e.pitch}),this._classes=[],this.resize(),e.classes&&this.setClasses(e.classes),e.style&&this.setStyle(e.style),e.attributionControl&&this.addControl(new AttributionControl),this.addControl(new LogoControl,e.logoPosition),this.on(\"style.load\",function(){this.transform.unmodified&&this.jumpTo(this.style.stylesheet),this.style.update(this._classes,{transition:!1})}),this.on(\"data\",this._onData),this.on(\"dataloading\",this._onDataLoading)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var o={showTileBoundaries:{},showCollisionBoxes:{},showOverdrawInspector:{},repaint:{},vertices:{}};return e.prototype.addControl=function(t,e){void 0===e&&t.getDefaultPosition&&(e=t.getDefaultPosition()),void 0===e&&(e=\"top-right\");var o=t.onAdd(this),i=this._controlPositions[e];return e.indexOf(\"bottom\")!==-1?i.insertBefore(o,i.firstChild):i.appendChild(o),this},e.prototype.removeControl=function(t){return t.onRemove(this),this},e.prototype.addClass=function(t,e){return util.warnOnce(\"Style classes are deprecated and will be removed in an upcoming release of Mapbox GL JS.\"),this._classes.indexOf(t)>=0||\"\"===t?this:(this._classes.push(t),this._classOptions=e,this.style&&this.style.updateClasses(),this._update(!0))},e.prototype.removeClass=function(t,e){util.warnOnce(\"Style classes are deprecated and will be removed in an upcoming release of Mapbox GL JS.\");var o=this._classes.indexOf(t);return o<0||\"\"===t?this:(this._classes.splice(o,1),this._classOptions=e,this.style&&this.style.updateClasses(),this._update(!0))},e.prototype.setClasses=function(t,e){util.warnOnce(\"Style classes are deprecated and will be removed in an upcoming release of Mapbox GL JS.\");for(var o={},i=0;i=0},e.prototype.getClasses=function(){return util.warnOnce(\"Style classes are deprecated and will be removed in an upcoming release of Mapbox GL JS.\"),this._classes},e.prototype.resize=function(){var t=this._containerDimensions(),e=t[0],o=t[1];return this._resizeCanvas(e,o),this.transform.resize(e,o),this.painter.resize(e,o),this.fire(\"movestart\").fire(\"move\").fire(\"resize\").fire(\"moveend\")},e.prototype.getBounds=function(){var t=new LngLatBounds(this.transform.pointLocation(new Point(0,this.transform.height)),this.transform.pointLocation(new Point(this.transform.width,0)));return(this.transform.angle||this.transform.pitch)&&(t.extend(this.transform.pointLocation(new Point(this.transform.size.x,0))),t.extend(this.transform.pointLocation(new Point(0,this.transform.size.y)))),t},e.prototype.setMaxBounds=function(t){if(t){var e=LngLatBounds.convert(t);this.transform.lngRange=[e.getWest(),e.getEast()],this.transform.latRange=[e.getSouth(),e.getNorth()],this.transform._constrain(),this._update()}else null!==t&&void 0!==t||(this.transform.lngRange=[],this.transform.latRange=[],this._update());return this},e.prototype.setMinZoom=function(t){if(t=null===t||void 0===t?defaultMinZoom:t,t>=defaultMinZoom&&t<=this.transform.maxZoom)return this.transform.minZoom=t,this._update(),this.getZoom()=this.transform.minZoom)return this.transform.maxZoom=t,this._update(),this.getZoom()>t&&this.setZoom(t),this;throw new Error(\"maxZoom must be greater than the current minZoom\")},e.prototype.getMaxZoom=function(){return this.transform.maxZoom},e.prototype.project=function(t){return this.transform.locationPoint(LngLat.convert(t))},e.prototype.unproject=function(t){return this.transform.pointLocation(Point.convert(t))},e.prototype.queryRenderedFeatures=function(){function t(t){return t instanceof Point||Array.isArray(t)}var e,o={};return 2===arguments.length?(e=arguments[0],o=arguments[1]):1===arguments.length&&t(arguments[0])?e=arguments[0]:1===arguments.length&&(o=arguments[0]),this.style.queryRenderedFeatures(this._makeQueryGeometry(e),o,this.transform.zoom,this.transform.angle)},e.prototype._makeQueryGeometry=function(t){var e=this;void 0===t&&(t=[Point.convert([0,0]),Point.convert([this.transform.width,this.transform.height])]);var o,i=t instanceof Point||\"number\"==typeof t[0];if(i){var r=Point.convert(t);o=[r]}else{var s=[Point.convert(t[0]),Point.convert(t[1])];o=[s[0],new Point(s[1].x,s[0].y),s[1],new Point(s[0].x,s[1].y),s[0]]}return o=o.map(function(t){return e.transform.pointCoordinate(t)})},e.prototype.querySourceFeatures=function(t,e){return this.style.querySourceFeatures(t,e)},e.prototype.setStyle=function(t,e){var o=(!e||e.diff!==!1)&&this.style&&t&&!(t instanceof Style)&&\"string\"!=typeof t;if(o)try{return this.style.setState(t)&&this._update(!0),this}catch(t){util.warnOnce(\"Unable to perform style diff: \"+(t.message||t.error||t)+\". Rebuilding the style from scratch.\")}return this.style&&(this.style.setEventedParent(null),this.style._remove(),this.off(\"rotate\",this.style._redoPlacement),this.off(\"pitch\",this.style._redoPlacement)),t?(t instanceof Style?this.style=t:this.style=new Style(t,this),this.style.setEventedParent(this,{style:this.style}),this.on(\"rotate\",this.style._redoPlacement),this.on(\"pitch\",this.style._redoPlacement),this):(this.style=null,this)},e.prototype.getStyle=function(){if(this.style)return this.style.serialize()},e.prototype.addSource=function(t,e){return this.style.addSource(t,e),this._update(!0),this},e.prototype.isSourceLoaded=function(t){var e=this.style&&this.style.sourceCaches[t];return void 0===e?void this.fire(\"error\",{error:new Error(\"There is no source with ID '\"+t+\"'\")}):e.loaded()},e.prototype.addSourceType=function(t,e,o){return this.style.addSourceType(t,e,o)},e.prototype.removeSource=function(t){return this.style.removeSource(t),this._update(!0),this},e.prototype.getSource=function(t){return this.style.getSource(t)},e.prototype.addImage=function(t,e,o){this.style.spriteAtlas.addImage(t,e,o)},e.prototype.removeImage=function(t){this.style.spriteAtlas.removeImage(t)},e.prototype.addLayer=function(t,e){return this.style.addLayer(t,e),this._update(!0),this},e.prototype.moveLayer=function(t,e){return this.style.moveLayer(t,e),this._update(!0),this},e.prototype.removeLayer=function(t){return this.style.removeLayer(t),this._update(!0),this},e.prototype.getLayer=function(t){return this.style.getLayer(t)},e.prototype.setFilter=function(t,e){return this.style.setFilter(t,e),this._update(!0),this},e.prototype.setLayerZoomRange=function(t,e,o){return this.style.setLayerZoomRange(t,e,o),this._update(!0),this},e.prototype.getFilter=function(t){return this.style.getFilter(t)},e.prototype.setPaintProperty=function(t,e,o,i){return this.style.setPaintProperty(t,e,o,i),this._update(!0),this},e.prototype.getPaintProperty=function(t,e,o){return this.style.getPaintProperty(t,e,o)},e.prototype.setLayoutProperty=function(t,e,o){return this.style.setLayoutProperty(t,e,o),this._update(!0),this},e.prototype.getLayoutProperty=function(t,e){return this.style.getLayoutProperty(t,e)},e.prototype.setLight=function(t){return this.style.setLight(t),this._update(!0),this},e.prototype.getLight=function(){return this.style.getLight()},e.prototype.getContainer=function(){return this._container},e.prototype.getCanvasContainer=function(){return this._canvasContainer},e.prototype.getCanvas=function(){return this._canvas},e.prototype._containerDimensions=function(){var t=0,e=0;return this._container&&(t=this._container.offsetWidth||400,e=this._container.offsetHeight||300),[t,e]},e.prototype._setupContainer=function(){var t=this._container;t.classList.add(\"mapboxgl-map\");var e=this._canvasContainer=DOM.create(\"div\",\"mapboxgl-canvas-container\",t);this._interactive&&e.classList.add(\"mapboxgl-interactive\"),this._canvas=DOM.create(\"canvas\",\"mapboxgl-canvas\",e),this._canvas.style.position=\"absolute\",this._canvas.addEventListener(\"webglcontextlost\",this._contextLost,!1),this._canvas.addEventListener(\"webglcontextrestored\",this._contextRestored,!1),this._canvas.setAttribute(\"tabindex\",0),this._canvas.setAttribute(\"aria-label\",\"Map\");var o=this._containerDimensions();this._resizeCanvas(o[0],o[1]);var i=this._controlContainer=DOM.create(\"div\",\"mapboxgl-control-container\",t),r=this._controlPositions={};[\"top-left\",\"top-right\",\"bottom-left\",\"bottom-right\"].forEach(function(t){r[t]=DOM.create(\"div\",\"mapboxgl-ctrl-\"+t,i)})},e.prototype._resizeCanvas=function(t,e){var o=window.devicePixelRatio||1;this._canvas.width=o*t,this._canvas.height=o*e,this._canvas.style.width=t+\"px\",this._canvas.style.height=e+\"px\"},e.prototype._setupPainter=function(){var t=util.extend({failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer},isSupported.webGLContextAttributes),e=this._canvas.getContext(\"webgl\",t)||this._canvas.getContext(\"experimental-webgl\",t);return e?void(this.painter=new Painter(e,this.transform)):void this.fire(\"error\",{error:new Error(\"Failed to initialize WebGL\")})},e.prototype._contextLost=function(t){t.preventDefault(),this._frameId&&browser.cancelFrame(this._frameId),this.fire(\"webglcontextlost\",{originalEvent:t})},e.prototype._contextRestored=function(t){this._setupPainter(),this.resize(),this._update(),this.fire(\"webglcontextrestored\",{originalEvent:t})},e.prototype.loaded=function(){return!this._styleDirty&&!this._sourcesDirty&&!(!this.style||!this.style.loaded())},e.prototype._update=function(t){return this.style?(this._styleDirty=this._styleDirty||t,this._sourcesDirty=!0,this._rerender(),this):this},e.prototype._render=function(){return this.style&&this._styleDirty&&(this._styleDirty=!1,this.style.update(this._classes,this._classOptions),this._classOptions=null,this.style._recalculate(this.transform.zoom)),this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.rotating,zooming:this.zooming}),this.fire(\"render\"),this.loaded()&&!this._loaded&&(this._loaded=!0,this.fire(\"load\")),this._frameId=null,this.animationLoop.stopped()||(this._styleDirty=!0),(this._sourcesDirty||this._repaint||this._styleDirty)&&this._rerender(),this},e.prototype.remove=function(){this._hash&&this._hash.remove(),browser.cancelFrame(this._frameId),this.setStyle(null),\"undefined\"!=typeof window&&(window.removeEventListener(\"resize\",this._onWindowResize,!1),window.removeEventListener(\"online\",this._onWindowOnline,!1));var t=this.painter.gl.getExtension(\"WEBGL_lose_context\");t&&t.loseContext(),removeNode(this._canvasContainer),removeNode(this._controlContainer),this._container.classList.remove(\"mapboxgl-map\"),this.fire(\"remove\")},e.prototype._rerender=function(){this.style&&!this._frameId&&(this._frameId=browser.frame(this._render))},e.prototype._onWindowOnline=function(){this._update()},e.prototype._onWindowResize=function(){this._trackResize&&this.stop().resize()._update()},o.showTileBoundaries.get=function(){return!!this._showTileBoundaries},o.showTileBoundaries.set=function(t){this._showTileBoundaries!==t&&(this._showTileBoundaries=t,this._update())},o.showCollisionBoxes.get=function(){return!!this._showCollisionBoxes},o.showCollisionBoxes.set=function(t){this._showCollisionBoxes!==t&&(this._showCollisionBoxes=t,this.style._redoPlacement())},o.showOverdrawInspector.get=function(){return!!this._showOverdrawInspector},o.showOverdrawInspector.set=function(t){this._showOverdrawInspector!==t&&(this._showOverdrawInspector=t,this._update())},o.repaint.get=function(){return!!this._repaint},o.repaint.set=function(t){this._repaint=t,this._update()},o.vertices.get=function(){return!!this._vertices},o.vertices.set=function(t){this._vertices=t,this._update()},e.prototype._onData=function(t){this._update(\"style\"===t.dataType),this.fire(t.dataType+\"data\",t)},e.prototype._onDataLoading=function(t){this.fire(t.dataType+\"dataloading\",t)},Object.defineProperties(e.prototype,o),e}(Camera);module.exports=Map;\n},{\"../geo/lng_lat\":62,\"../geo/lng_lat_bounds\":63,\"../geo/transform\":64,\"../render/painter\":77,\"../style/animation_loop\":143,\"../style/style\":146,\"../util/browser\":192,\"../util/dom\":199,\"../util/util\":212,\"../util/window\":194,\"./bind_handlers\":171,\"./camera\":172,\"./control/attribution_control\":173,\"./control/logo_control\":176,\"./hash\":186,\"mapbox-gl-supported\":22,\"point-geometry\":26}],188:[function(require,module,exports){\n\"use strict\";var DOM=require(\"../util/dom\"),LngLat=require(\"../geo/lng_lat\"),Point=require(\"point-geometry\"),Marker=function(t,e){this._offset=Point.convert(e&&e.offset||[0,0]),this._update=this._update.bind(this),this._onMapClick=this._onMapClick.bind(this),t||(t=DOM.create(\"div\")),t.classList.add(\"mapboxgl-marker\"),this._element=t,this._popup=null};Marker.prototype.addTo=function(t){return this.remove(),this._map=t,t.getCanvasContainer().appendChild(this._element),t.on(\"move\",this._update),t.on(\"moveend\",this._update),this._update(),this._map.on(\"click\",this._onMapClick),this},Marker.prototype.remove=function(){return this._map&&(this._map.off(\"click\",this._onMapClick),this._map.off(\"move\",this._update),this._map.off(\"moveend\",this._update),this._map=null),DOM.remove(this._element),this._popup&&this._popup.remove(),this},Marker.prototype.getLngLat=function(){return this._lngLat},Marker.prototype.setLngLat=function(t){return this._lngLat=LngLat.convert(t),this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this},Marker.prototype.getElement=function(){return this._element},Marker.prototype.setPopup=function(t){return this._popup&&(this._popup.remove(),this._popup=null),t&&(this._popup=t,this._popup.setLngLat(this._lngLat)),this},Marker.prototype._onMapClick=function(t){var e=t.originalEvent.target,p=this._element;this._popup&&(e===p||p.contains(e))&&this.togglePopup()},Marker.prototype.getPopup=function(){return this._popup},Marker.prototype.togglePopup=function(){var t=this._popup;t&&(t.isOpen()?t.remove():t.addTo(this._map))},Marker.prototype._update=function(t){if(this._map){var e=this._map.project(this._lngLat)._add(this._offset);t&&\"moveend\"!==t.type||(e=e.round()),DOM.setTransform(this._element,\"translate(\"+e.x+\"px, \"+e.y+\"px)\")}},module.exports=Marker;\n},{\"../geo/lng_lat\":62,\"../util/dom\":199,\"point-geometry\":26}],189:[function(require,module,exports){\n\"use strict\";function normalizeOffset(t){if(t){if(\"number\"==typeof t){var o=Math.round(Math.sqrt(.5*Math.pow(t,2)));return{top:new Point(0,t),\"top-left\":new Point(o,o),\"top-right\":new Point(-o,o),bottom:new Point(0,-t),\"bottom-left\":new Point(o,-o),\"bottom-right\":new Point(-o,-o),left:new Point(t,0),right:new Point(-t,0)}}if(isPointLike(t)){var e=Point.convert(t);return{top:e,\"top-left\":e,\"top-right\":e,bottom:e,\"bottom-left\":e,\"bottom-right\":e,left:e,right:e}}return{top:Point.convert(t.top||[0,0]),\"top-left\":Point.convert(t[\"top-left\"]||[0,0]),\"top-right\":Point.convert(t[\"top-right\"]||[0,0]),bottom:Point.convert(t.bottom||[0,0]),\"bottom-left\":Point.convert(t[\"bottom-left\"]||[0,0]),\"bottom-right\":Point.convert(t[\"bottom-right\"]||[0,0]),left:Point.convert(t.left||[0,0]),right:Point.convert(t.right||[0,0])}}return normalizeOffset(new Point(0,0))}function isPointLike(t){return t instanceof Point||Array.isArray(t)}var util=require(\"../util/util\"),Evented=require(\"../util/evented\"),DOM=require(\"../util/dom\"),LngLat=require(\"../geo/lng_lat\"),Point=require(\"point-geometry\"),window=require(\"../util/window\"),defaultOptions={closeButton:!0,closeOnClick:!0},Popup=function(t){function o(o){t.call(this),this.options=util.extend(Object.create(defaultOptions),o),util.bindAll([\"_update\",\"_onClickClose\"],this)}return t&&(o.__proto__=t),o.prototype=Object.create(t&&t.prototype),o.prototype.constructor=o,o.prototype.addTo=function(t){return this._map=t,this._map.on(\"move\",this._update),this.options.closeOnClick&&this._map.on(\"click\",this._onClickClose),this._update(),this},o.prototype.isOpen=function(){return!!this._map},o.prototype.remove=function(){return this._content&&this._content.parentNode&&this._content.parentNode.removeChild(this._content),this._container&&(this._container.parentNode.removeChild(this._container),delete this._container),this._map&&(this._map.off(\"move\",this._update),this._map.off(\"click\",this._onClickClose),delete this._map),this.fire(\"close\"),this},o.prototype.getLngLat=function(){return this._lngLat},o.prototype.setLngLat=function(t){return this._lngLat=LngLat.convert(t),this._update(),this},o.prototype.setText=function(t){return this.setDOMContent(window.document.createTextNode(t))},o.prototype.setHTML=function(t){var o,e=window.document.createDocumentFragment(),n=window.document.createElement(\"body\");for(n.innerHTML=t;;){if(o=n.firstChild,!o)break;e.appendChild(o)}return this.setDOMContent(e)},o.prototype.setDOMContent=function(t){return this._createContent(),this._content.appendChild(t),this._update(),this},o.prototype._createContent=function(){this._content&&this._content.parentNode&&this._content.parentNode.removeChild(this._content),this._content=DOM.create(\"div\",\"mapboxgl-popup-content\",this._container),this.options.closeButton&&(this._closeButton=DOM.create(\"button\",\"mapboxgl-popup-close-button\",this._content),this._closeButton.type=\"button\",this._closeButton.innerHTML=\"×\",this._closeButton.addEventListener(\"click\",this._onClickClose))},o.prototype._update=function(){if(this._map&&this._lngLat&&this._content){this._container||(this._container=DOM.create(\"div\",\"mapboxgl-popup\",this._map.getContainer()),this._tip=DOM.create(\"div\",\"mapboxgl-popup-tip\",this._container),this._container.appendChild(this._content));var t=this.options.anchor,o=normalizeOffset(this.options.offset),e=this._map.project(this._lngLat).round();if(!t){var n=this._container.offsetWidth,i=this._container.offsetHeight;t=e.y+o.bottom.ythis._map.transform.height-i?[\"bottom\"]:[],e.xthis._map.transform.width-n/2&&t.push(\"right\"),t=0===t.length?\"bottom\":t.join(\"-\")}var r=e.add(o[t]),s={top:\"translate(-50%,0)\",\"top-left\":\"translate(0,0)\",\"top-right\":\"translate(-100%,0)\",bottom:\"translate(-50%,-100%)\",\"bottom-left\":\"translate(0,-100%)\",\"bottom-right\":\"translate(-100%,-100%)\",left:\"translate(0,-50%)\",right:\"translate(-100%,-50%)\"},p=this._container.classList;for(var a in s)p.remove(\"mapboxgl-popup-anchor-\"+a);p.add(\"mapboxgl-popup-anchor-\"+t),DOM.setTransform(this._container,s[t]+\" translate(\"+r.x+\"px,\"+r.y+\"px)\")}},o.prototype._onClickClose=function(){this.remove()},o}(Evented);module.exports=Popup;\n},{\"../geo/lng_lat\":62,\"../util/dom\":199,\"../util/evented\":200,\"../util/util\":212,\"../util/window\":194,\"point-geometry\":26}],190:[function(require,module,exports){\n\"use strict\";var Actor=function(t,e,a){this.target=t,this.parent=e,this.mapId=a,this.callbacks={},this.callbackID=0,this.receive=this.receive.bind(this),this.target.addEventListener(\"message\",this.receive,!1)};Actor.prototype.send=function(t,e,a,r,s){var i=a?this.mapId+\":\"+this.callbackID++:null;a&&(this.callbacks[i]=a),this.target.postMessage({targetMapId:s,sourceMapId:this.mapId,type:t,id:String(i),data:e},r)},Actor.prototype.receive=function(t){var e,a=this,r=t.data,s=r.id;if(!r.targetMapId||this.mapId===r.targetMapId){var i=function(t,e,r){a.target.postMessage({sourceMapId:a.mapId,type:\"\",id:String(s),error:t?String(t):null,data:e},r)};if(\"\"===r.type)e=this.callbacks[r.id],delete this.callbacks[r.id],e&&e(r.error||null,r.data);else if(\"undefined\"!=typeof r.id&&this.parent[r.type])this.parent[r.type](r.sourceMapId,r.data,i);else if(\"undefined\"!=typeof r.id&&this.parent.getWorkerSource){var p=r.type.split(\".\"),d=this.parent.getWorkerSource(r.sourceMapId,p[0]);d[p[1]](r.data,i)}else this.parent[r.type](r.data)}},Actor.prototype.remove=function(){this.target.removeEventListener(\"message\",this.receive,!1)},module.exports=Actor;\n},{}],191:[function(require,module,exports){\n\"use strict\";function sameOrigin(e){var t=window.document.createElement(\"a\");return t.href=e,t.protocol===window.document.location.protocol&&t.host===window.document.location.host}var window=require(\"./window\");exports.getJSON=function(e,t){var n=new window.XMLHttpRequest;return n.open(\"GET\",e,!0),n.setRequestHeader(\"Accept\",\"application/json\"),n.onerror=function(e){t(e)},n.onload=function(){if(n.status>=200&&n.status<300&&n.response){var e;try{e=JSON.parse(n.response)}catch(e){return t(e)}t(null,e)}else t(new Error(n.statusText))},n.send(),n},exports.getArrayBuffer=function(e,t){var n=new window.XMLHttpRequest;return n.open(\"GET\",e,!0),n.responseType=\"arraybuffer\",n.onerror=function(e){t(e)},n.onload=function(){return 0===n.response.byteLength&&200===n.status?t(new Error(\"http status 200 returned without content.\")):void(n.status>=200&&n.status<300&&n.response?t(null,{data:n.response,cacheControl:n.getResponseHeader(\"Cache-Control\"),expires:n.getResponseHeader(\"Expires\")}):t(new Error(n.statusText)))},n.send(),n};var transparentPngUrl=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=\";exports.getImage=function(e,t){return exports.getArrayBuffer(e,function(e,n){if(e)return t(e);var r=new window.Image,o=window.URL||window.webkitURL;r.onload=function(){t(null,r),o.revokeObjectURL(r.src)};var a=new window.Blob([new Uint8Array(n.data)],{type:\"image/png\"});r.cacheControl=n.cacheControl,r.expires=n.expires,r.src=n.data.byteLength?o.createObjectURL(a):transparentPngUrl})},exports.getVideo=function(e,t){var n=window.document.createElement(\"video\");n.onloadstart=function(){t(null,n)};for(var r=0;r=a+n?e.call(t,1):(e.call(t,(i-a)/n),exports.frame(o)))}if(!n)return e.call(t,1),null;var r=!1,a=module.exports.now();return exports.frame(o),function(){r=!0}},exports.getImageData=function(e){var n=window.document.createElement(\"canvas\"),t=n.getContext(\"2d\");return n.width=e.width,n.height=e.height,t.drawImage(e,0,0),t.getImageData(0,0,e.width,e.height).data},exports.supported=require(\"mapbox-gl-supported\"),exports.hardwareConcurrency=window.navigator.hardwareConcurrency||4,Object.defineProperty(exports,\"devicePixelRatio\",{get:function(){return window.devicePixelRatio}}),exports.supportsWebp=!1;var webpImgTest=window.document.createElement(\"img\");webpImgTest.onload=function(){exports.supportsWebp=!0},webpImgTest.src=\"data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=\";\n},{\"./window\":194,\"mapbox-gl-supported\":22}],193:[function(require,module,exports){\n\"use strict\";var WebWorkify=require(\"webworkify\"),window=require(\"../window\"),workerURL=window.URL.createObjectURL(new WebWorkify(require(\"../../source/worker\"),{bare:!0}));module.exports=function(){return new window.Worker(workerURL)};\n},{\"../../source/worker\":98,\"../window\":194,\"webworkify\":41}],194:[function(require,module,exports){\n\"use strict\";module.exports=self;\n},{}],195:[function(require,module,exports){\n\"use strict\";function compareAreas(e,r){return r.area-e.area}var quickselect=require(\"quickselect\"),calculateSignedArea=require(\"./util\").calculateSignedArea;module.exports=function(e,r){var a=e.length;if(a<=1)return[e];for(var t,u,c=[],i=0;i1)for(var n=0;n0||this._oneTimeListeners&&this._oneTimeListeners[e]&&this._oneTimeListeners[e].length>0||this._eventedParent&&this._eventedParent.listens(e)},Evented.prototype.setEventedParent=function(e,t){return this._eventedParent=e,this._eventedParentData=t,this},module.exports=Evented;\n},{\"./util\":212}],201:[function(require,module,exports){\n\"use strict\";function compareMax(e,t){return t.max-e.max}function Cell(e,t,n,r){this.p=new Point(e,t),this.h=n,this.d=pointToPolygonDist(this.p,r),this.max=this.d+this.h*Math.SQRT2}function pointToPolygonDist(e,t){for(var n=!1,r=1/0,o=0;oe.y!=h.y>e.y&&e.x<(h.x-a.x)*(e.y-a.y)/(h.y-a.y)+a.x&&(n=!n),r=Math.min(r,distToSegmentSquared(e,a,h))}return(n?1:-1)*Math.sqrt(r)}function getCentroidCell(e){for(var t=0,n=0,r=0,o=e[0],i=0,l=o.length,u=l-1;ii)&&(i=a.x),(!s||a.y>l)&&(l=a.y)}var h=i-r,p=l-o,y=Math.min(h,p),x=y/2,d=new Queue(null,compareMax);if(0===y)return[r,o];for(var g=r;gm.d||!m.d)&&(m=v,n&&console.log(\"found best %d after %d probes\",Math.round(1e4*v.d)/1e4,c)),v.max-m.d<=t||(x=v.h/2,d.push(new Cell(v.p.x-x,v.p.y-x,x,e)),d.push(new Cell(v.p.x+x,v.p.y-x,x,e)),d.push(new Cell(v.p.x-x,v.p.y+x,x,e)),d.push(new Cell(v.p.x+x,v.p.y+x,x,e)),c+=4)}return n&&(console.log(\"num probes: \"+c),console.log(\"best distance: \"+m.d)),m.p};\n},{\"./intersection_tests\":205,\"point-geometry\":26,\"tinyqueue\":30}],202:[function(require,module,exports){\n\"use strict\";var WorkerPool=require(\"./worker_pool\"),globalWorkerPool;module.exports=function(){return globalWorkerPool||(globalWorkerPool=new WorkerPool),globalWorkerPool};\n},{\"./worker_pool\":215}],203:[function(require,module,exports){\n\"use strict\";function Glyphs(a,e){this.stacks=a.readFields(readFontstacks,[],e)}function readFontstacks(a,e,r){if(1===a){var t=r.readMessage(readFontstack,{glyphs:{}});e.push(t)}}function readFontstack(a,e,r){if(1===a)e.name=r.readString();else if(2===a)e.range=r.readString();else if(3===a){var t=r.readMessage(readGlyph,{});e.glyphs[t.id]=t}}function readGlyph(a,e,r){1===a?e.id=r.readVarint():2===a?e.bitmap=r.readBytes():3===a?e.width=r.readVarint():4===a?e.height=r.readVarint():5===a?e.left=r.readSVarint():6===a?e.top=r.readSVarint():7===a&&(e.advance=r.readVarint())}module.exports=Glyphs;\n},{}],204:[function(require,module,exports){\n\"use strict\";function interpolate(t,e,n){return t*(1-n)+e*n}module.exports=interpolate,interpolate.number=interpolate,interpolate.vec2=function(t,e,n){return[interpolate(t[0],e[0],n),interpolate(t[1],e[1],n)]},interpolate.color=function(t,e,n){return[interpolate(t[0],e[0],n),interpolate(t[1],e[1],n),interpolate(t[2],e[2],n),interpolate(t[3],e[3],n)]},interpolate.array=function(t,e,n){return t.map(function(t,r){return interpolate(t,e[r],n)})};\n},{}],205:[function(require,module,exports){\n\"use strict\";function polygonIntersectsPolygon(n,t){for(var e=0;e=3)for(var u=0;u1){if(lineIntersectsLine(n,t))return!0;for(var r=0;r1?n.distSqr(e):n.distSqr(e.sub(t)._mult(o)._add(t))}function multiPolygonContainsPoint(n,t){for(var e,r,o,i=!1,l=0;lt.y!=o.y>t.y&&t.x<(o.x-r.x)*(t.y-r.y)/(o.y-r.y)+r.x&&(i=!i)}return i}function polygonContainsPoint(n,t){for(var e=!1,r=0,o=n.length-1;rt.y!=l.y>t.y&&t.x<(l.x-i.x)*(t.y-i.y)/(l.y-i.y)+i.x&&(e=!e)}return e}var isCounterClockwise=require(\"./util\").isCounterClockwise;module.exports={multiPolygonIntersectsBufferedMultiPoint:multiPolygonIntersectsBufferedMultiPoint,multiPolygonIntersectsMultiPolygon:multiPolygonIntersectsMultiPolygon,multiPolygonIntersectsBufferedMultiLine:multiPolygonIntersectsBufferedMultiLine,polygonIntersectsPolygon:polygonIntersectsPolygon,distToSegmentSquared:distToSegmentSquared};\n},{\"./util\":212}],206:[function(require,module,exports){\n\"use strict\";var unicodeBlockLookup={\"Latin-1 Supplement\":function(n){return n>=128&&n<=255},\"Hangul Jamo\":function(n){return n>=4352&&n<=4607},\"Unified Canadian Aboriginal Syllabics\":function(n){return n>=5120&&n<=5759},\"Unified Canadian Aboriginal Syllabics Extended\":function(n){return n>=6320&&n<=6399},\"General Punctuation\":function(n){return n>=8192&&n<=8303},\"Letterlike Symbols\":function(n){return n>=8448&&n<=8527},\"Number Forms\":function(n){return n>=8528&&n<=8591},\"Miscellaneous Technical\":function(n){return n>=8960&&n<=9215},\"Control Pictures\":function(n){return n>=9216&&n<=9279},\"Optical Character Recognition\":function(n){return n>=9280&&n<=9311},\"Enclosed Alphanumerics\":function(n){return n>=9312&&n<=9471},\"Geometric Shapes\":function(n){return n>=9632&&n<=9727},\"Miscellaneous Symbols\":function(n){return n>=9728&&n<=9983},\"Miscellaneous Symbols and Arrows\":function(n){return n>=11008&&n<=11263},\"CJK Radicals Supplement\":function(n){return n>=11904&&n<=12031},\"Kangxi Radicals\":function(n){return n>=12032&&n<=12255},\"Ideographic Description Characters\":function(n){return n>=12272&&n<=12287},\"CJK Symbols and Punctuation\":function(n){return n>=12288&&n<=12351},Hiragana:function(n){return n>=12352&&n<=12447},Katakana:function(n){return n>=12448&&n<=12543},Bopomofo:function(n){return n>=12544&&n<=12591},\"Hangul Compatibility Jamo\":function(n){return n>=12592&&n<=12687},Kanbun:function(n){return n>=12688&&n<=12703},\"Bopomofo Extended\":function(n){return n>=12704&&n<=12735},\"CJK Strokes\":function(n){return n>=12736&&n<=12783},\"Katakana Phonetic Extensions\":function(n){return n>=12784&&n<=12799},\"Enclosed CJK Letters and Months\":function(n){return n>=12800&&n<=13055},\"CJK Compatibility\":function(n){return n>=13056&&n<=13311},\"CJK Unified Ideographs Extension A\":function(n){return n>=13312&&n<=19903},\"Yijing Hexagram Symbols\":function(n){return n>=19904&&n<=19967},\"CJK Unified Ideographs\":function(n){return n>=19968&&n<=40959},\"Yi Syllables\":function(n){return n>=40960&&n<=42127},\"Yi Radicals\":function(n){return n>=42128&&n<=42191},\"Hangul Jamo Extended-A\":function(n){return n>=43360&&n<=43391},\"Hangul Syllables\":function(n){return n>=44032&&n<=55215},\"Hangul Jamo Extended-B\":function(n){return n>=55216&&n<=55295},\"Private Use Area\":function(n){return n>=57344&&n<=63743},\"CJK Compatibility Ideographs\":function(n){return n>=63744&&n<=64255},\"Vertical Forms\":function(n){return n>=65040&&n<=65055},\"CJK Compatibility Forms\":function(n){return n>=65072&&n<=65103},\"Small Form Variants\":function(n){return n>=65104&&n<=65135},\"Halfwidth and Fullwidth Forms\":function(n){return n>=65280&&n<=65519}};module.exports=unicodeBlockLookup;\n},{}],207:[function(require,module,exports){\n\"use strict\";var LRUCache=function(t,e){this.max=t,this.onRemove=e,this.reset()};LRUCache.prototype.reset=function(){var t=this;for(var e in t.data)t.onRemove(t.data[e]);return this.data={},this.order=[],this},LRUCache.prototype.add=function(t,e){if(this.has(t))this.order.splice(this.order.indexOf(t),1),this.data[t]=e,this.order.push(t);else if(this.data[t]=e,this.order.push(t),this.order.length>this.max){var r=this.get(this.order[0]);r&&this.onRemove(r)}return this},LRUCache.prototype.has=function(t){return t in this.data},LRUCache.prototype.keys=function(){return this.order},LRUCache.prototype.get=function(t){if(!this.has(t))return null;var e=this.data[t];return delete this.data[t],this.order.splice(this.order.indexOf(t),1),e},LRUCache.prototype.getWithoutRemoving=function(t){if(!this.has(t))return null;var e=this.data[t];return e},LRUCache.prototype.remove=function(t){if(!this.has(t))return this;var e=this.data[t];return delete this.data[t],this.onRemove(e),this.order.splice(this.order.indexOf(t),1),this},LRUCache.prototype.setMaxSize=function(t){var e=this;for(this.max=t;this.order.length>this.max;){var r=e.get(e.order[0]);r&&e.onRemove(r)}return this},module.exports=LRUCache;\n},{}],208:[function(require,module,exports){\n\"use strict\";function makeAPIURL(r,e){var t=parseUrl(config.API_URL);if(r.protocol=t.protocol,r.authority=t.authority,!config.REQUIRE_ACCESS_TOKEN)return formatUrl(r);if(e=e||config.ACCESS_TOKEN,!e)throw new Error(\"An API access token is required to use Mapbox GL. \"+help);if(\"s\"===e[0])throw new Error(\"Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). \"+help);return r.params.push(\"access_token=\"+e),formatUrl(r)}function isMapboxURL(r){return 0===r.indexOf(\"mapbox:\")}function replaceTempAccessToken(r){for(var e=0;e=2||512===t?\"@2x\":\"\",s=browser.supportsWebp?\".webp\":\"$1\";return o.path=o.path.replace(imageExtensionRe,\"\"+a+s),replaceTempAccessToken(o.params),formatUrl(o)};var urlRe=/^(\\w+):\\/\\/([^\\/?]+)(\\/[^?]+)?\\??(.+)?/;\n},{\"./browser\":192,\"./config\":196}],209:[function(require,module,exports){\n\"use strict\";var isChar=require(\"./is_char_in_unicode_block\");module.exports.allowsIdeographicBreaking=function(a){for(var i=0,r=a;i=65097&&a<=65103)||(!!isChar[\"CJK Compatibility Ideographs\"](a)||(!!isChar[\"CJK Compatibility\"](a)||(!!isChar[\"CJK Radicals Supplement\"](a)||(!!isChar[\"CJK Strokes\"](a)||(!(!isChar[\"CJK Symbols and Punctuation\"](a)||a>=12296&&a<=12305||a>=12308&&a<=12319||12336===a)||(!!isChar[\"CJK Unified Ideographs Extension A\"](a)||(!!isChar[\"CJK Unified Ideographs\"](a)||(!!isChar[\"Enclosed CJK Letters and Months\"](a)||(!!isChar[\"Hangul Compatibility Jamo\"](a)||(!!isChar[\"Hangul Jamo Extended-A\"](a)||(!!isChar[\"Hangul Jamo Extended-B\"](a)||(!!isChar[\"Hangul Jamo\"](a)||(!!isChar[\"Hangul Syllables\"](a)||(!!isChar.Hiragana(a)||(!!isChar[\"Ideographic Description Characters\"](a)||(!!isChar.Kanbun(a)||(!!isChar[\"Kangxi Radicals\"](a)||(!!isChar[\"Katakana Phonetic Extensions\"](a)||(!(!isChar.Katakana(a)||12540===a)||(!(!isChar[\"Halfwidth and Fullwidth Forms\"](a)||65288===a||65289===a||65293===a||a>=65306&&a<=65310||65339===a||65341===a||65343===a||a>=65371&&a<=65503||65507===a||a>=65512&&a<=65519)||(!(!isChar[\"Small Form Variants\"](a)||a>=65112&&a<=65118||a>=65123&&a<=65126)||(!!isChar[\"Unified Canadian Aboriginal Syllabics\"](a)||(!!isChar[\"Unified Canadian Aboriginal Syllabics Extended\"](a)||(!!isChar[\"Vertical Forms\"](a)||(!!isChar[\"Yijing Hexagram Symbols\"](a)||(!!isChar[\"Yi Syllables\"](a)||!!isChar[\"Yi Radicals\"](a))))))))))))))))))))))))))))))},exports.charHasNeutralVerticalOrientation=function(a){return!(!isChar[\"Latin-1 Supplement\"](a)||167!==a&&169!==a&&174!==a&&177!==a&&188!==a&&189!==a&&190!==a&&215!==a&&247!==a)||(!(!isChar[\"General Punctuation\"](a)||8214!==a&&8224!==a&&8225!==a&&8240!==a&&8241!==a&&8251!==a&&8252!==a&&8258!==a&&8263!==a&&8264!==a&&8265!==a&&8273!==a)||(!!isChar[\"Letterlike Symbols\"](a)||(!!isChar[\"Number Forms\"](a)||(!(!isChar[\"Miscellaneous Technical\"](a)||!(a>=8960&&a<=8967||a>=8972&&a<=8991||a>=8996&&a<=9e3||9003===a||a>=9085&&a<=9114||a>=9150&&a<=9165||9167===a||a>=9169&&a<=9179||a>=9186&&a<=9215))||(!(!isChar[\"Control Pictures\"](a)||9251===a)||(!!isChar[\"Optical Character Recognition\"](a)||(!!isChar[\"Enclosed Alphanumerics\"](a)||(!!isChar[\"Geometric Shapes\"](a)||(!(!isChar[\"Miscellaneous Symbols\"](a)||a>=9754&&a<=9759)||(!(!isChar[\"Miscellaneous Symbols and Arrows\"](a)||!(a>=11026&&a<=11055||a>=11088&&a<=11097||a>=11192&&a<=11243))||(!!isChar[\"CJK Symbols and Punctuation\"](a)||(!!isChar.Katakana(a)||(!!isChar[\"Private Use Area\"](a)||(!!isChar[\"CJK Compatibility Forms\"](a)||(!!isChar[\"Small Form Variants\"](a)||(!!isChar[\"Halfwidth and Fullwidth Forms\"](a)||(8734===a||8756===a||8757===a||a>=9984&&a<=10087||a>=10102&&a<=10131||65532===a||65533===a)))))))))))))))))},exports.charHasRotatedVerticalOrientation=function(a){return!(exports.charHasUprightVerticalOrientation(a)||exports.charHasNeutralVerticalOrientation(a))};\n},{\"./is_char_in_unicode_block\":206}],210:[function(require,module,exports){\n\"use strict\";function createStructArrayType(t){var e=JSON.stringify(t);if(structArrayTypeCache[e])return structArrayTypeCache[e];var r=void 0===t.alignment?1:t.alignment,i=0,n=0,a=[\"Uint8\"],o=t.members.map(function(t){a.indexOf(t.type)<0&&a.push(t.type);var e=sizeOf(t.type),o=i=align(i,Math.max(r,e)),s=t.components||1;return n=Math.max(n,e),i+=e*s,{name:t.name,type:t.type,components:s,offset:o}}),s=align(i,Math.max(n,r)),p=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Struct);p.prototype.alignment=r,p.prototype.size=s;for(var y=0,c=o;ythis.capacity){this.capacity=Math.max(t,Math.floor(this.capacity*RESIZE_MULTIPLIER),DEFAULT_CAPACITY),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var e=this.uint8;this._refreshViews(),e&&this.uint8.set(e)}},StructArray.prototype._refreshViews=function(){for(var t=this,e=0,r=t._usedTypes;e=1)return 1;var e=r*r,t=e*r;return 4*(r<.5?t:3*(r-e)+t-.75)},exports.bezier=function(r,e,t,n){var o=new UnitBezier(r,e,t,n);return function(r){return o.solve(r)}},exports.ease=exports.bezier(.25,.1,.25,1),exports.clamp=function(r,e,t){return Math.min(t,Math.max(e,r))},exports.wrap=function(r,e,t){var n=t-e,o=((r-e)%n+n)%n+e;return o===e?t:o},exports.asyncAll=function(r,e,t){if(!r.length)return t(null,[]);var n=r.length,o=new Array(r.length),a=null;r.forEach(function(r,i){e(r,function(r,e){r&&(a=r),o[i]=e,0===--n&&t(a,o)})})},exports.values=function(r){var e=[];for(var t in r)e.push(r[t]);return e},exports.keysDifference=function(r,e){var t=[];for(var n in r)n in e||t.push(n);return t},exports.extend=function(r,e,t,n){for(var o=arguments,a=1;a=0)return!0;return!1};var warnOnceHistory={};exports.warnOnce=function(r){warnOnceHistory[r]||(\"undefined\"!=typeof console&&console.warn(r),warnOnceHistory[r]=!0)},exports.isCounterClockwise=function(r,e,t){return(t.y-r.y)*(e.x-r.x)>(e.y-r.y)*(t.x-r.x)},exports.calculateSignedArea=function(r){for(var e=0,t=0,n=r.length,o=n-1,a=void 0,i=void 0;t0||Math.abs(e.y-t.y)>0)&&Math.abs(exports.calculateSignedArea(r))>.01},exports.sphericalToCartesian=function(r){var e=r[0],t=r[1],n=r[2];return t+=90,t*=Math.PI/180,n*=Math.PI/180,[e*Math.cos(t)*Math.sin(n),e*Math.sin(t)*Math.sin(n),e*Math.cos(n)]},exports.parseCacheControl=function(r){var e=/(?:^|(?:\\s*\\,\\s*))([^\\x00-\\x20\\(\\)<>@\\,;\\:\\\\\"\\/\\[\\]\\?\\=\\{\\}\\x7F]+)(?:\\=(?:([^\\x00-\\x20\\(\\)<>@\\,;\\:\\\\\"\\/\\[\\]\\?\\=\\{\\}\\x7F]+)|(?:\\\"((?:[^\"\\\\]|\\\\.)*)\\\")))?/g,t={};if(r.replace(e,function(r,e,n,o){var a=n||o;return t[e]=!a||a.toLowerCase(),\"\"}),t[\"max-age\"]){var n=parseInt(t[\"max-age\"],10);isNaN(n)?delete t[\"max-age\"]:t[\"max-age\"]=n}return t};\n},{\"../geo/coordinate\":61,\"@mapbox/unitbezier\":3,\"point-geometry\":26}],213:[function(require,module,exports){\n\"use strict\";var Feature=function(e,t,r,o){this.type=\"Feature\",this._vectorTileFeature=e,e._z=t,e._x=r,e._y=o,this.properties=e.properties,null!=e.id&&(this.id=e.id)},prototypeAccessors={geometry:{}};prototypeAccessors.geometry.get=function(){return void 0===this._geometry&&(this._geometry=this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x,this._vectorTileFeature._y,this._vectorTileFeature._z).geometry),this._geometry},prototypeAccessors.geometry.set=function(e){this._geometry=e},Feature.prototype.toJSON=function(){var e=this,t={geometry:this.geometry};for(var r in e)\"_geometry\"!==r&&\"_vectorTileFeature\"!==r&&(t[r]=e[r]);return t},Object.defineProperties(Feature.prototype,prototypeAccessors),module.exports=Feature;\n},{}],214:[function(require,module,exports){\n\"use strict\";var scriptDetection=require(\"./script_detection\");module.exports=function(t){for(var o=\"\",e=0;e\":\"﹀\",\"?\":\"︖\",\"@\":\"@\",\"[\":\"﹇\",\"\\\\\":\"\\",\"]\":\"﹈\",\"^\":\"^\",_:\"︳\",\"`\":\"`\",\"{\":\"︷\",\"|\":\"―\",\"}\":\"︸\",\"~\":\"~\",\"¢\":\"¢\",\"£\":\"£\",\"¥\":\"¥\",\"¦\":\"¦\",\"¬\":\"¬\",\"¯\":\" ̄\",\"–\":\"︲\",\"—\":\"︱\",\"‘\":\"﹃\",\"’\":\"﹄\",\"“\":\"﹁\",\"”\":\"﹂\",\"…\":\"︙\",\"‧\":\"・\",\"₩\":\"₩\",\"、\":\"︑\",\"。\":\"︒\",\"〈\":\"︿\",\"〉\":\"﹀\",\"《\":\"︽\",\"》\":\"︾\",\"「\":\"﹁\",\"」\":\"﹂\",\"『\":\"﹃\",\"』\":\"﹄\",\"【\":\"︻\",\"】\":\"︼\",\"〔\":\"︹\",\"〕\":\"︺\",\"〖\":\"︗\",\"〗\":\"︘\",\"!\":\"︕\",\"(\":\"︵\",\")\":\"︶\",\",\":\"︐\",\"-\":\"︲\",\".\":\"・\",\":\":\"︓\",\";\":\"︔\",\"<\":\"︿\",\">\":\"﹀\",\"?\":\"︖\",\"[\":\"﹇\",\"]\":\"﹈\",\"_\":\"︳\",\"{\":\"︷\",\"|\":\"―\",\"}\":\"︸\",\"⦅\":\"︵\",\"⦆\":\"︶\",\"。\":\"︒\",\"「\":\"﹁\",\"」\":\"﹂\"};\n},{\"./script_detection\":209}],215:[function(require,module,exports){\n\"use strict\";var WebWorker=require(\"./web_worker\"),WorkerPool=function(){this.active={}};WorkerPool.prototype.acquire=function(r){var e=this;if(!this.workers){var o=require(\"../\").workerCount;for(this.workers=[];this.workers.length {\n let replyTo = document.querySelector('#in-reply-to');\n replyTo.value = webStorage.getItem('replyTo');\n let content = document.querySelector('#content');\n content.value = webStorage.getItem('content');\n};\n\nconst saveData = () => {\n let replyTo = document.querySelector('#in-reply-to');\n let content = document.querySelector('#content');\n webStorage.setItem('replyTo', replyTo.value);\n webStorage.setItem('content', content.value);\n alertify.success('Auto-saved data');\n};\n\nconst clearData = () => {\n webStorage.removeItem('replyTo');\n webStorage.removeItem('content');\n};\n\nexport default function persistFormData()\n{\n let form = document.querySelector('form[name=\"micropub\"]');\n form.addEventListener('change', saveData);\n form.addEventListener('submit', clearData);\n loadData();\n}\n\n\n\n// WEBPACK FOOTER //\n// ./persist-form.js","//nearby-places.js\n\nimport alertify from 'alertify.js';\nimport addMap from './mapbox-utils';\nimport parseLocation from './parse-location';\nimport makeNewPlaceForm from './newplace-micropub';\n\nconst makeOptionsForForm = (map, position, places = null) => {\n //create the \",message:\"

{{message}}

\",log:\"
{{message}}
\"},defaultDialogs:{buttons:{holder:\"\",ok:\"\",cancel:\"\"},input:\"\",message:\"

{{message}}

\",log:\"
{{message}}
\"},build:function(t){var e=this.dialogs.buttons.ok,o=\"
\"+this.dialogs.message.replace(\"{{message}}\",t.message);return\"confirm\"!==t.type&&\"prompt\"!==t.type||(e=this.dialogs.buttons.cancel+this.dialogs.buttons.ok),\"prompt\"===t.type&&(o+=this.dialogs.input),o=(o+this.dialogs.buttons.holder+\"
\").replace(\"{{buttons}}\",e).replace(\"{{ok}}\",this.okLabel).replace(\"{{cancel}}\",this.cancelLabel)},setCloseLogOnClick:function(t){this.closeLogOnClick=!!t},close:function(t,e){this.closeLogOnClick&&t.addEventListener(\"click\",function(){o(t)}),e=e&&!isNaN(+e)?+e:this.delay,0>e?o(t):e>0&&setTimeout(function(){o(t)},e)},dialog:function(t,e,o,n){return this.setup({type:e,message:t,onOkay:o,onCancel:n})},log:function(t,e,o){var n=document.querySelectorAll(\".alertify-logs > div\");if(n){var i=n.length-this.maxLogItems;if(i>=0)for(var a=0,l=i+1;l>a;a++)this.close(n[a],-1)}this.notify(t,e,o)},setLogPosition:function(t){this.logContainerClass=\"alertify-logs \"+t},setupLogContainer:function(){var t=document.querySelector(\".alertify-logs\"),e=this.logContainerClass;return t||(t=document.createElement(\"div\"),t.className=e,this.parent.appendChild(t)),t.className!==e&&(t.className=e),t},notify:function(e,o,n){var i=this.setupLogContainer(),a=document.createElement(\"div\");a.className=o||\"default\",t.logTemplateMethod?a.innerHTML=t.logTemplateMethod(e):a.innerHTML=e,\"function\"==typeof n&&a.addEventListener(\"click\",n),i.appendChild(a),setTimeout(function(){a.className+=\" show\"},10),this.close(a,this.delay)},setup:function(t){function e(e){\"function\"!=typeof e&&(e=function(){}),i&&i.addEventListener(\"click\",function(i){t.onOkay&&\"function\"==typeof t.onOkay&&(l?t.onOkay(l.value,i):t.onOkay(i)),e(l?{buttonClicked:\"ok\",inputValue:l.value,event:i}:{buttonClicked:\"ok\",event:i}),o(n)}),a&&a.addEventListener(\"click\",function(i){t.onCancel&&\"function\"==typeof t.onCancel&&t.onCancel(i),e({buttonClicked:\"cancel\",event:i}),o(n)}),l&&l.addEventListener(\"keyup\",function(t){13===t.which&&i.click()})}var n=document.createElement(\"div\");n.className=\"alertify hide\",n.innerHTML=this.build(t);var i=n.querySelector(\".ok\"),a=n.querySelector(\".cancel\"),l=n.querySelector(\"input\"),s=n.querySelector(\"label\");l&&(\"string\"==typeof this.promptPlaceholder&&(s?s.textContent=this.promptPlaceholder:l.placeholder=this.promptPlaceholder),\"string\"==typeof this.promptValue&&(l.value=this.promptValue));var r;return\"function\"==typeof Promise?r=new Promise(e):e(),this.parent.appendChild(n),setTimeout(function(){n.classList.remove(\"hide\"),l&&t.type&&\"prompt\"===t.type?(l.select(),l.focus()):i&&i.focus()},100),r},okBtn:function(t){return this.okLabel=t,this},setDelay:function(t){return t=t||0,this.delay=isNaN(t)?this.defaultDelay:parseInt(t,10),this},cancelBtn:function(t){return this.cancelLabel=t,this},setMaxLogItems:function(t){this.maxLogItems=parseInt(t||this.defaultMaxLogItems)},theme:function(t){switch(t.toLowerCase()){case\"bootstrap\":this.dialogs.buttons.ok=\"\",this.dialogs.buttons.cancel=\"\",this.dialogs.input=\"\";break;case\"purecss\":this.dialogs.buttons.ok=\"\",this.dialogs.buttons.cancel=\"\";break;case\"mdl\":case\"material-design-light\":this.dialogs.buttons.ok=\"\",this.dialogs.buttons.cancel=\"\",this.dialogs.input=\"
\";break;case\"angular-material\":this.dialogs.buttons.ok=\"\",this.dialogs.buttons.cancel=\"\",this.dialogs.input=\"
\";break;case\"default\":default:this.dialogs.buttons.ok=this.defaultDialogs.buttons.ok,this.dialogs.buttons.cancel=this.defaultDialogs.buttons.cancel,this.dialogs.input=this.defaultDialogs.input}},reset:function(){this.parent=document.body,this.theme(\"default\"),this.okBtn(this.defaultOkLabel),this.cancelBtn(this.defaultCancelLabel),this.setMaxLogItems(),this.promptValue=\"\",this.promptPlaceholder=\"\",this.delay=this.defaultDelay,this.setCloseLogOnClick(this.closeLogOnClickDefault),this.setLogPosition(\"bottom left\"),this.logTemplateMethod=null},injectCSS:function(){if(!document.querySelector(\"#alertifyCSS\")){var t=document.getElementsByTagName(\"head\")[0],e=document.createElement(\"style\");e.type=\"text/css\",e.id=\"alertifyCSS\",e.innerHTML=\".alertify-logs>*{padding:12px 24px;color:#fff;box-shadow:0 2px 5px 0 rgba(0,0,0,.2);border-radius:1px}.alertify-logs>*,.alertify-logs>.default{background:rgba(0,0,0,.8)}.alertify-logs>.error{background:rgba(244,67,54,.8)}.alertify-logs>.success{background:rgba(76,175,80,.9)}.alertify{position:fixed;background-color:rgba(0,0,0,.3);left:0;right:0;top:0;bottom:0;width:100%;height:100%;z-index:1}.alertify.hide{opacity:0;pointer-events:none}.alertify,.alertify.show{box-sizing:border-box;transition:all .33s cubic-bezier(.25,.8,.25,1)}.alertify,.alertify *{box-sizing:border-box}.alertify .dialog{padding:12px}.alertify .alert,.alertify .dialog{width:100%;margin:0 auto;position:relative;top:50%;transform:translateY(-50%)}.alertify .alert>*,.alertify .dialog>*{width:400px;max-width:95%;margin:0 auto;text-align:center;padding:12px;background:#fff;box-shadow:0 2px 4px -1px rgba(0,0,0,.14),0 4px 5px 0 rgba(0,0,0,.098),0 1px 10px 0 rgba(0,0,0,.084)}.alertify .alert .msg,.alertify .dialog .msg{padding:12px;margin-bottom:12px;margin:0;text-align:left}.alertify .alert input:not(.form-control),.alertify .dialog input:not(.form-control){margin-bottom:15px;width:100%;font-size:100%;padding:12px}.alertify .alert input:not(.form-control):focus,.alertify .dialog input:not(.form-control):focus{outline-offset:-2px}.alertify .alert nav,.alertify .dialog nav{text-align:right}.alertify .alert nav button:not(.btn):not(.pure-button):not(.md-button):not(.mdl-button),.alertify .dialog nav button:not(.btn):not(.pure-button):not(.md-button):not(.mdl-button){background:transparent;box-sizing:border-box;color:rgba(0,0,0,.87);position:relative;outline:0;border:0;display:inline-block;-ms-flex-align:center;-ms-grid-row-align:center;align-items:center;padding:0 6px;margin:6px 8px;line-height:36px;min-height:36px;white-space:nowrap;min-width:88px;text-align:center;text-transform:uppercase;font-size:14px;text-decoration:none;cursor:pointer;border:1px solid transparent;border-radius:2px}.alertify .alert nav button:not(.btn):not(.pure-button):not(.md-button):not(.mdl-button):active,.alertify .alert nav button:not(.btn):not(.pure-button):not(.md-button):not(.mdl-button):hover,.alertify .dialog nav button:not(.btn):not(.pure-button):not(.md-button):not(.mdl-button):active,.alertify .dialog nav button:not(.btn):not(.pure-button):not(.md-button):not(.mdl-button):hover{background-color:rgba(0,0,0,.05)}.alertify .alert nav button:not(.btn):not(.pure-button):not(.md-button):not(.mdl-button):focus,.alertify .dialog nav button:not(.btn):not(.pure-button):not(.md-button):not(.mdl-button):focus{border:1px solid rgba(0,0,0,.1)}.alertify .alert nav button.btn,.alertify .dialog nav button.btn{margin:6px 4px}.alertify-logs{position:fixed;z-index:1}.alertify-logs.bottom,.alertify-logs:not(.top){bottom:16px}.alertify-logs.left,.alertify-logs:not(.right){left:16px}.alertify-logs.left>*,.alertify-logs:not(.right)>*{float:left;transform:translateZ(0);height:auto}.alertify-logs.left>.show,.alertify-logs:not(.right)>.show{left:0}.alertify-logs.left>*,.alertify-logs.left>.hide,.alertify-logs:not(.right)>*,.alertify-logs:not(.right)>.hide{left:-110%}.alertify-logs.right{right:16px}.alertify-logs.right>*{float:right;transform:translateZ(0)}.alertify-logs.right>.show{right:0;opacity:1}.alertify-logs.right>*,.alertify-logs.right>.hide{right:-110%;opacity:0}.alertify-logs.top{top:0}.alertify-logs>*{box-sizing:border-box;transition:all .4s cubic-bezier(.25,.8,.25,1);position:relative;clear:both;backface-visibility:hidden;perspective:1000;max-height:0;margin:0;padding:0;overflow:hidden;opacity:0;pointer-events:none}.alertify-logs>.show{margin-top:12px;opacity:1;max-height:1000px;padding:12px;pointer-events:auto}\",t.insertBefore(e,t.firstChild)}},removeCSS:function(){var t=document.querySelector(\"#alertifyCSS\");t&&t.parentNode&&t.parentNode.removeChild(t)}};return t.injectCSS(),{_$$alertify:t,parent:function(e){t.parent=e},reset:function(){return t.reset(),this},alert:function(e,o,n){return t.dialog(e,\"alert\",o,n)||this},confirm:function(e,o,n){return t.dialog(e,\"confirm\",o,n)||this},prompt:function(e,o,n){return t.dialog(e,\"prompt\",o,n)||this},log:function(e,o){return t.log(e,\"default\",o),this},theme:function(e){return t.theme(e),this},success:function(e,o){return t.log(e,\"success\",o),this},error:function(e,o){return t.log(e,\"error\",o),this},cancelBtn:function(e){return t.cancelBtn(e),this},okBtn:function(e){return t.okBtn(e),this},delay:function(e){return t.setDelay(e),this},placeholder:function(e){return t.promptPlaceholder=e,this},defaultValue:function(e){return t.promptValue=e,this},maxLogItems:function(e){return t.setMaxLogItems(e),this},closeLogOnClick:function(e){return t.setCloseLogOnClick(!!e),this},logPosition:function(e){return t.setLogPosition(e||\"\"),this},setLogTemplate:function(e){return t.logTemplateMethod=e,this},clearLogs:function(){return t.setupLogContainer().innerHTML=\"\",this},version:t.version}}var e=500,o=function(t){if(t){var o=function(){t&&t.parentNode&&t.parentNode.removeChild(t)};t.classList.remove(\"show\"),t.classList.add(\"hide\"),t.addEventListener(\"transitionend\",o),setTimeout(o,e)}};if(\"undefined\"!=typeof module&&module&&module.exports){module.exports=function(){return new t};var n=new t;for(var i in n)module.exports[i]=n[i]}else\"function\"==typeof define&&define.amd?define(function(){return new t}):window.alertify=new t}();\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/jonny/git/jonnybarnes.uk/~/alertify.js/dist/js/alertify.js\n// module id = 3\n// module chunks = 0","//select-place.js\n\nexport default function selectPlaceInForm(uri) {\n if (document.querySelector('select')) {\n if (uri == 'current-location') {\n document.querySelector('select [id=\"option-coords\"]').selected = true;\n } else {\n document.querySelector('select [value=\"' + uri + '\"]').selected = true;\n }\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./select-place.js","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction placeHoldersCount (b64) {\n var len = b64.length\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // the number of equal signs (place holders)\n // if there are two placeholders, than the two characters before it\n // represent one byte\n // if there is only one, then the three characters before it represent 2 bytes\n // this is just a cheap hack to not do indexOf twice\n return b64[len - 2] === '=' ? 2 : b64[len - 1] === '=' ? 1 : 0\n}\n\nfunction byteLength (b64) {\n // base64 is 4/3 + up to two characters of the original data\n return b64.length * 3 / 4 - placeHoldersCount(b64)\n}\n\nfunction toByteArray (b64) {\n var i, j, l, tmp, placeHolders, arr\n var len = b64.length\n placeHolders = placeHoldersCount(b64)\n\n arr = new Arr(len * 3 / 4 - placeHolders)\n\n // if there are placeholders, only get up to the last complete 4 chars\n l = placeHolders > 0 ? len - 4 : len\n\n var L = 0\n\n for (i = 0, j = 0; i < l; i += 4, j += 3) {\n tmp = (revLookup[b64.charCodeAt(i)] << 18) | (revLookup[b64.charCodeAt(i + 1)] << 12) | (revLookup[b64.charCodeAt(i + 2)] << 6) | revLookup[b64.charCodeAt(i + 3)]\n arr[L++] = (tmp >> 16) & 0xFF\n arr[L++] = (tmp >> 8) & 0xFF\n arr[L++] = tmp & 0xFF\n }\n\n if (placeHolders === 2) {\n tmp = (revLookup[b64.charCodeAt(i)] << 2) | (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[L++] = tmp & 0xFF\n } else if (placeHolders === 1) {\n tmp = (revLookup[b64.charCodeAt(i)] << 10) | (revLookup[b64.charCodeAt(i + 1)] << 4) | (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[L++] = (tmp >> 8) & 0xFF\n arr[L++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2])\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var output = ''\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n output += lookup[tmp >> 2]\n output += lookup[(tmp << 4) & 0x3F]\n output += '=='\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + (uint8[len - 1])\n output += lookup[tmp >> 10]\n output += lookup[(tmp >> 4) & 0x3F]\n output += lookup[(tmp << 2) & 0x3F]\n output += '='\n }\n\n parts.push(output)\n\n return parts.join('')\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/jonny/git/jonnybarnes.uk/~/base64-js/index.js\n// module id = 5\n// module chunks = 0 1","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nvar base64 = require('base64-js')\nvar ieee754 = require('ieee754')\nvar isArray = require('isarray')\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Use Object implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * Due to various browser bugs, sometimes the Object implementation will be used even\n * when the browser supports typed arrays.\n *\n * Note:\n *\n * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,\n * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.\n *\n * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.\n *\n * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of\n * incorrect length in some situations.\n\n * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they\n * get the Object implementation, which is slower but behaves correctly.\n */\nBuffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined\n ? global.TYPED_ARRAY_SUPPORT\n : typedArraySupport()\n\n/*\n * Export kMaxLength after typed array support is determined.\n */\nexports.kMaxLength = kMaxLength()\n\nfunction typedArraySupport () {\n try {\n var arr = new Uint8Array(1)\n arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}\n return arr.foo() === 42 && // typed array instances can be augmented\n typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`\n arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`\n } catch (e) {\n return false\n }\n}\n\nfunction kMaxLength () {\n return Buffer.TYPED_ARRAY_SUPPORT\n ? 0x7fffffff\n : 0x3fffffff\n}\n\nfunction createBuffer (that, length) {\n if (kMaxLength() < length) {\n throw new RangeError('Invalid typed array length')\n }\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = new Uint8Array(length)\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n if (that === null) {\n that = new Buffer(length)\n }\n that.length = length\n }\n\n return that\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n return new Buffer(arg, encodingOrOffset, length)\n }\n\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new Error(\n 'If encoding is specified then the first argument must be a string'\n )\n }\n return allocUnsafe(this, arg)\n }\n return from(this, arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\n// TODO: Legacy, not needed anymore. Remove in next major version.\nBuffer._augment = function (arr) {\n arr.__proto__ = Buffer.prototype\n return arr\n}\n\nfunction from (that, value, encodingOrOffset, length) {\n if (typeof value === 'number') {\n throw new TypeError('\"value\" argument must not be a number')\n }\n\n if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {\n return fromArrayBuffer(that, value, encodingOrOffset, length)\n }\n\n if (typeof value === 'string') {\n return fromString(that, value, encodingOrOffset)\n }\n\n return fromObject(that, value)\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(null, value, encodingOrOffset, length)\n}\n\nif (Buffer.TYPED_ARRAY_SUPPORT) {\n Buffer.prototype.__proto__ = Uint8Array.prototype\n Buffer.__proto__ = Uint8Array\n if (typeof Symbol !== 'undefined' && Symbol.species &&\n Buffer[Symbol.species] === Buffer) {\n // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97\n Object.defineProperty(Buffer, Symbol.species, {\n value: null,\n configurable: true\n })\n }\n}\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be a number')\n } else if (size < 0) {\n throw new RangeError('\"size\" argument must not be negative')\n }\n}\n\nfunction alloc (that, size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(that, size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpretted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(that, size).fill(fill, encoding)\n : createBuffer(that, size).fill(fill)\n }\n return createBuffer(that, size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(null, size, fill, encoding)\n}\n\nfunction allocUnsafe (that, size) {\n assertSize(size)\n that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n for (var i = 0; i < size; ++i) {\n that[i] = 0\n }\n }\n return that\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(null, size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(null, size)\n}\n\nfunction fromString (that, string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('\"encoding\" must be a valid string encoding')\n }\n\n var length = byteLength(string, encoding) | 0\n that = createBuffer(that, length)\n\n var actual = that.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n that = that.slice(0, actual)\n }\n\n return that\n}\n\nfunction fromArrayLike (that, array) {\n var length = array.length < 0 ? 0 : checked(array.length) | 0\n that = createBuffer(that, length)\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n}\n\nfunction fromArrayBuffer (that, array, byteOffset, length) {\n array.byteLength // this throws if `array` is not a valid ArrayBuffer\n\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\\'offset\\' is out of bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\\'length\\' is out of bounds')\n }\n\n if (byteOffset === undefined && length === undefined) {\n array = new Uint8Array(array)\n } else if (length === undefined) {\n array = new Uint8Array(array, byteOffset)\n } else {\n array = new Uint8Array(array, byteOffset, length)\n }\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = array\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n that = fromArrayLike(that, array)\n }\n return that\n}\n\nfunction fromObject (that, obj) {\n if (Buffer.isBuffer(obj)) {\n var len = checked(obj.length) | 0\n that = createBuffer(that, len)\n\n if (that.length === 0) {\n return that\n }\n\n obj.copy(that, 0, 0, len)\n return that\n }\n\n if (obj) {\n if ((typeof ArrayBuffer !== 'undefined' &&\n obj.buffer instanceof ArrayBuffer) || 'length' in obj) {\n if (typeof obj.length !== 'number' || isnan(obj.length)) {\n return createBuffer(that, 0)\n }\n return fromArrayLike(that, obj)\n }\n\n if (obj.type === 'Buffer' && isArray(obj.data)) {\n return fromArrayLike(that, obj.data)\n }\n }\n\n throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')\n}\n\nfunction checked (length) {\n // Note: cannot use `length < kMaxLength()` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= kMaxLength()) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + kMaxLength().toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return !!(b != null && b._isBuffer)\n}\n\nBuffer.compare = function compare (a, b) {\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError('Arguments must be Buffers')\n }\n\n if (a === b) return 0\n\n var x = a.length\n var y = b.length\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n var i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n var buffer = Buffer.allocUnsafe(length)\n var pos = 0\n for (i = 0; i < list.length; ++i) {\n var buf = list[i]\n if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n buf.copy(buffer, pos)\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&\n (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n string = '' + string\n }\n\n var len = string.length\n if (len === 0) return 0\n\n // Use a for loop to avoid recursion\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n case undefined:\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) return utf8ToBytes(string).length // assume utf8\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n var loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coersion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect\n// Buffer instances.\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n var i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n var len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (var i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n var len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (var i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n var len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (var i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n var length = this.length | 0\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n var str = ''\n var max = exports.INSPECT_MAX_BYTES\n if (this.length > 0) {\n str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')\n if (this.length > max) str += ' ... '\n }\n return ''\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (!Buffer.isBuffer(target)) {\n throw new TypeError('Argument must be a Buffer')\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n var x = thisEnd - thisStart\n var y = end - start\n var len = Math.min(x, y)\n\n var thisCopy = this.slice(thisStart, thisEnd)\n var targetCopy = target.slice(start, end)\n\n for (var i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n var indexSize = 1\n var arrLength = arr.length\n var valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n var i\n if (dir) {\n var foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n var found = true\n for (var j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n var remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n // must be an even number of digits\n var strLen = string.length\n if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n for (var i = 0; i < length; ++i) {\n var parsed = parseInt(string.substr(i * 2, 2), 16)\n if (isNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction latin1Write (buf, string, offset, length) {\n return asciiWrite(buf, string, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset | 0\n if (isFinite(length)) {\n length = length | 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n // legacy write(string, encoding, offset, length) - remove in v0.13\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n var remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n return asciiWrite(this, string, offset, length)\n\n case 'latin1':\n case 'binary':\n return latin1Write(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n var res = []\n\n var i = start\n while (i < end) {\n var firstByte = buf[i]\n var codePoint = null\n var bytesPerSequence = (firstByte > 0xEF) ? 4\n : (firstByte > 0xDF) ? 3\n : (firstByte > 0xBF) ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n var secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nvar MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n var len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n var res = ''\n var i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n var len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n var out = ''\n for (var i = start; i < end; ++i) {\n out += toHex(buf[i])\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n var bytes = buf.slice(start, end)\n var res = ''\n for (var i = 0; i < bytes.length; i += 2) {\n res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n var len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n var newBuf\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n newBuf = this.subarray(start, end)\n newBuf.__proto__ = Buffer.prototype\n } else {\n var sliceLen = end - start\n newBuf = new Buffer(sliceLen, undefined)\n for (var i = 0; i < sliceLen; ++i) {\n newBuf[i] = this[i + start]\n }\n }\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n var val = this[offset + --byteLength]\n var mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var i = byteLength\n var mul = 1\n var val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var mul = 1\n var i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var i = byteLength - 1\n var mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nfunction objectWriteUInt16 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {\n buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>\n (littleEndian ? i : 1 - i) * 8\n }\n}\n\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nfunction objectWriteUInt32 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffffffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {\n buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff\n }\n}\n\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = 0\n var mul = 1\n var sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = byteLength - 1\n var mul = 1\n var sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n var len = end - start\n var i\n\n if (this === target && start < targetStart && targetStart < end) {\n // descending copy from end\n for (i = len - 1; i >= 0; --i) {\n target[i + targetStart] = this[i + start]\n }\n } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {\n // ascending copy from start\n for (i = 0; i < len; ++i) {\n target[i + targetStart] = this[i + start]\n }\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, start + len),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (val.length === 1) {\n var code = val.charCodeAt(0)\n if (code < 256) {\n val = code\n }\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n } else if (typeof val === 'number') {\n val = val & 255\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n var i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n var bytes = Buffer.isBuffer(val)\n ? val\n : utf8ToBytes(new Buffer(val, encoding).toString())\n var len = bytes.length\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// HELPER FUNCTIONS\n// ================\n\nvar INVALID_BASE64_RE = /[^+\\/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = stringtrim(str).replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction stringtrim (str) {\n if (str.trim) return str.trim()\n return str.replace(/^\\s+|\\s+$/g, '')\n}\n\nfunction toHex (n) {\n if (n < 16) return '0' + n.toString(16)\n return n.toString(16)\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n var codePoint\n var length = string.length\n var leadSurrogate = null\n var bytes = []\n\n for (var i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n var c, hi, lo\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n for (var i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\nfunction isnan (val) {\n return val !== val // eslint-disable-line no-self-compare\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/jonny/git/jonnybarnes.uk/~/buffer/index.js\n// module id = 6\n// module chunks = 0 1","var toString = {}.toString;\n\nmodule.exports = Array.isArray || function (arr) {\n return toString.call(arr) == '[object Array]';\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/jonny/git/jonnybarnes.uk/~/buffer/~/isarray/index.js\n// module id = 7\n// module chunks = 0 1","exports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = nBytes * 8 - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = nBytes * 8 - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = (value * c - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/jonny/git/jonnybarnes.uk/~/ieee754/index.js\n// module id = 8\n// module chunks = 0 1","(function(f){if(typeof exports===\"object\"&&typeof module!==\"undefined\"){module.exports=f()}else if(typeof define===\"function\"&&define.amd){define([],f)}else{var g;if(typeof window!==\"undefined\"){g=window}else if(typeof global!==\"undefined\"){g=global}else if(typeof self!==\"undefined\"){g=self}else{g=this}g.mapboxgl = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o0){for(var o=0,a=0,u=0;uh.maxh||t>h.maxw||i<=h.maxh&&t<=h.maxw&&(r=h.maxw*h.maxh-t*i,rn.free)){if(i===n.h)return this.allocShelf(f,t,i,s);i>n.h||ic)&&(p=2*Math.max(t,c)),(uu)&&(l=2*Math.max(i,u)),this.resize(p,l),this.packOne(t,i,s)}return null},t.prototype.allocFreebin=function(t,e,i,s){var h=this.freebins.splice(t,1)[0];return h.id=s,h.w=e,h.h=i,h.refcount=0,this.bins[s]=h,this.ref(h),h},t.prototype.allocShelf=function(t,e,i,s){var h=this.shelves[t],n=h.alloc(e,i,s);return this.bins[s]=n,this.ref(n),n},t.prototype.getBin=function(t){return this.bins[t]},t.prototype.ref=function(t){if(1===++t.refcount){var e=t.h;this.stats[e]=(0|this.stats[e])+1}return t.refcount},t.prototype.unref=function(t){return 0===t.refcount?0:(0===--t.refcount&&(this.stats[t.h]--,delete this.bins[t.id],this.freebins.push(t)),t.refcount)},t.prototype.clear=function(){this.shelves=[],this.freebins=[],this.stats={},this.bins={},this.maxId=0},t.prototype.resize=function(t,e){this.w=t,this.h=e;for(var i=0;ithis.free||e>this.h)return null;var h=this.x;return this.x+=t,this.free-=t,new i(s,h,this.y,t,e,t,this.h)},e.prototype.resize=function(t){return this.free+=t-this.w,this.w=t,!0},t});\n},{}],3:[function(require,module,exports){\nfunction UnitBezier(t,i,e,r){this.cx=3*t,this.bx=3*(e-t)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*i,this.by=3*(r-i)-this.cy,this.ay=1-this.cy-this.by,this.p1x=t,this.p1y=r,this.p2x=e,this.p2y=r}module.exports=UnitBezier,UnitBezier.prototype.sampleCurveX=function(t){return((this.ax*t+this.bx)*t+this.cx)*t},UnitBezier.prototype.sampleCurveY=function(t){return((this.ay*t+this.by)*t+this.cy)*t},UnitBezier.prototype.sampleCurveDerivativeX=function(t){return(3*this.ax*t+2*this.bx)*t+this.cx},UnitBezier.prototype.solveCurveX=function(t,i){\"undefined\"==typeof i&&(i=1e-6);var e,r,s,h,n;for(s=t,n=0;n<8;n++){if(h=this.sampleCurveX(s)-t,Math.abs(h)r)return r;for(;eh?e=s:r=s,s=.5*(r-e)+e}return s},UnitBezier.prototype.solve=function(t,i){return this.sampleCurveY(this.solveCurveX(t,i))};\n},{}],4:[function(require,module,exports){\n!function(e,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?t(exports):\"function\"==typeof define&&define.amd?define([\"exports\"],t):t(e.WhooTS=e.WhooTS||{})}(this,function(e){function t(e,t,r,n,i,s){s=s||{};var f=e+\"?\"+[\"bbox=\"+o(r,n,i),\"format=\"+(s.format||\"image/png\"),\"service=\"+(s.service||\"WMS\"),\"version=\"+(s.version||\"1.1.1\"),\"request=\"+(s.request||\"GetMap\"),\"srs=\"+(s.srs||\"EPSG:3857\"),\"width=\"+(s.width||256),\"height=\"+(s.height||256),\"layers=\"+t].join(\"&\");return f}function o(e,t,o){t=Math.pow(2,o)-t-1;var n=r(256*e,256*t,o),i=r(256*(e+1),256*(t+1),o);return n[0]+\",\"+n[1]+\",\"+i[0]+\",\"+i[1]}function r(e,t,o){var r=2*Math.PI*6378137/256/Math.pow(2,o),n=e*r-2*Math.PI*6378137/2,i=t*r-2*Math.PI*6378137/2;return[n,i]}e.getURL=t,e.getTileBBox=o,e.getMercCoords=r,Object.defineProperty(e,\"__esModule\",{value:!0})});\n},{}],5:[function(require,module,exports){\n\"use strict\";function earcut(e,n,r){r=r||2;var t=n&&n.length,i=t?n[0]*r:e.length,x=linkedList(e,0,i,r,!0),a=[];if(!x)return a;var o,l,u,s,v,f,y;if(t&&(x=eliminateHoles(e,n,x,r)),e.length>80*r){o=u=e[0],l=s=e[1];for(var d=r;du&&(u=v),f>s&&(s=f);y=Math.max(u-o,s-l)}return earcutLinked(x,a,r,o,l,y),a}function linkedList(e,n,r,t,i){var x,a;if(i===signedArea(e,n,r,t)>0)for(x=n;x=n;x-=t)a=insertNode(x,e[x],e[x+1],a);return a&&equals(a,a.next)&&(removeNode(a),a=a.next),a}function filterPoints(e,n){if(!e)return e;n||(n=e);var r,t=e;do if(r=!1,t.steiner||!equals(t,t.next)&&0!==area(t.prev,t,t.next))t=t.next;else{if(removeNode(t),t=n=t.prev,t===t.next)return null;r=!0}while(r||t!==n);return n}function earcutLinked(e,n,r,t,i,x,a){if(e){!a&&x&&indexCurve(e,t,i,x);for(var o,l,u=e;e.prev!==e.next;)if(o=e.prev,l=e.next,x?isEarHashed(e,t,i,x):isEar(e))n.push(o.i/r),n.push(e.i/r),n.push(l.i/r),removeNode(e),e=l.next,u=l.next;else if(e=l,e===u){a?1===a?(e=cureLocalIntersections(e,n,r),earcutLinked(e,n,r,t,i,x,2)):2===a&&splitEarcut(e,n,r,t,i,x):earcutLinked(filterPoints(e),n,r,t,i,x,1);break}}}function isEar(e){var n=e.prev,r=e,t=e.next;if(area(n,r,t)>=0)return!1;for(var i=e.next.next;i!==e.prev;){if(pointInTriangle(n.x,n.y,r.x,r.y,t.x,t.y,i.x,i.y)&&area(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function isEarHashed(e,n,r,t){var i=e.prev,x=e,a=e.next;if(area(i,x,a)>=0)return!1;for(var o=i.xx.x?i.x>a.x?i.x:a.x:x.x>a.x?x.x:a.x,s=i.y>x.y?i.y>a.y?i.y:a.y:x.y>a.y?x.y:a.y,v=zOrder(o,l,n,r,t),f=zOrder(u,s,n,r,t),y=e.nextZ;y&&y.z<=f;){if(y!==e.prev&&y!==e.next&&pointInTriangle(i.x,i.y,x.x,x.y,a.x,a.y,y.x,y.y)&&area(y.prev,y,y.next)>=0)return!1;y=y.nextZ}for(y=e.prevZ;y&&y.z>=v;){if(y!==e.prev&&y!==e.next&&pointInTriangle(i.x,i.y,x.x,x.y,a.x,a.y,y.x,y.y)&&area(y.prev,y,y.next)>=0)return!1;y=y.prevZ}return!0}function cureLocalIntersections(e,n,r){var t=e;do{var i=t.prev,x=t.next.next;!equals(i,x)&&intersects(i,t,t.next,x)&&locallyInside(i,x)&&locallyInside(x,i)&&(n.push(i.i/r),n.push(t.i/r),n.push(x.i/r),removeNode(t),removeNode(t.next),t=e=x),t=t.next}while(t!==e);return t}function splitEarcut(e,n,r,t,i,x){var a=e;do{for(var o=a.next.next;o!==a.prev;){if(a.i!==o.i&&isValidDiagonal(a,o)){var l=splitPolygon(a,o);return a=filterPoints(a,a.next),l=filterPoints(l,l.next),earcutLinked(a,n,r,t,i,x),void earcutLinked(l,n,r,t,i,x)}o=o.next}a=a.next}while(a!==e)}function eliminateHoles(e,n,r,t){var i,x,a,o,l,u=[];for(i=0,x=n.length;i=t.next.y){var o=t.x+(x-t.y)*(t.next.x-t.x)/(t.next.y-t.y);if(o<=i&&o>a){if(a=o,o===i){if(x===t.y)return t;if(x===t.next.y)return t.next}r=t.x=t.x&&t.x>=s&&pointInTriangle(xr.x)&&locallyInside(t,e)&&(r=t,f=l)),t=t.next;return r}function indexCurve(e,n,r,t){var i=e;do null===i.z&&(i.z=zOrder(i.x,i.y,n,r,t)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next;while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,sortLinked(i)}function sortLinked(e){var n,r,t,i,x,a,o,l,u=1;do{for(r=e,e=null,x=null,a=0;r;){for(a++,t=r,o=0,n=0;n0||l>0&&t;)0===o?(i=t,t=t.nextZ,l--):0!==l&&t?r.z<=t.z?(i=r,r=r.nextZ,o--):(i=t,t=t.nextZ,l--):(i=r,r=r.nextZ,o--),x?x.nextZ=i:e=i,i.prevZ=x,x=i;r=t}x.nextZ=null,u*=2}while(a>1);return e}function zOrder(e,n,r,t,i){return e=32767*(e-r)/i,n=32767*(n-t)/i,e=16711935&(e|e<<8),e=252645135&(e|e<<4),e=858993459&(e|e<<2),e=1431655765&(e|e<<1),n=16711935&(n|n<<8),n=252645135&(n|n<<4),n=858993459&(n|n<<2),n=1431655765&(n|n<<1),e|n<<1}function getLeftmost(e){var n=e,r=e;do n.x=0&&(e-a)*(t-o)-(r-a)*(n-o)>=0&&(r-a)*(x-o)-(i-a)*(t-o)>=0}function isValidDiagonal(e,n){return e.next.i!==n.i&&e.prev.i!==n.i&&!intersectsPolygon(e,n)&&locallyInside(e,n)&&locallyInside(n,e)&&middleInside(e,n)}function area(e,n,r){return(n.y-e.y)*(r.x-n.x)-(n.x-e.x)*(r.y-n.y)}function equals(e,n){return e.x===n.x&&e.y===n.y}function intersects(e,n,r,t){return!!(equals(e,n)&&equals(r,t)||equals(e,t)&&equals(r,n))||area(e,n,r)>0!=area(e,n,t)>0&&area(r,t,e)>0!=area(r,t,n)>0}function intersectsPolygon(e,n){var r=e;do{if(r.i!==e.i&&r.next.i!==e.i&&r.i!==n.i&&r.next.i!==n.i&&intersects(r,r.next,e,n))return!0;r=r.next}while(r!==e);return!1}function locallyInside(e,n){return area(e.prev,e,e.next)<0?area(e,n,e.next)>=0&&area(e,e.prev,n)>=0:area(e,n,e.prev)<0||area(e,e.next,n)<0}function middleInside(e,n){var r=e,t=!1,i=(e.x+n.x)/2,x=(e.y+n.y)/2;do r.y>x!=r.next.y>x&&i<(r.next.x-r.x)*(x-r.y)/(r.next.y-r.y)+r.x&&(t=!t),r=r.next;while(r!==e);return t}function splitPolygon(e,n){var r=new Node(e.i,e.x,e.y),t=new Node(n.i,n.x,n.y),i=e.next,x=n.prev;return e.next=n,n.prev=e,r.next=i,i.prev=r,t.next=r,r.prev=t,x.next=t,t.prev=x,t}function insertNode(e,n,r,t){var i=new Node(e,n,r);return t?(i.next=t.next,i.prev=t,t.next.prev=i,t.next=i):(i.prev=i,i.next=i),i}function removeNode(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function Node(e,n,r){this.i=e,this.x=n,this.y=r,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function signedArea(e,n,r,t){for(var i=0,x=n,a=r-t;x0&&(t+=e[i-1].length,r.holes.push(t))}return r};\n},{}],6:[function(require,module,exports){\nfunction geometry(r){if(\"Polygon\"===r.type)return polygonArea(r.coordinates);if(\"MultiPolygon\"===r.type){for(var e=0,n=0;n0){e+=Math.abs(ringArea(r[0]));for(var n=1;n2){for(var n,t,o=0;o=0}var geojsonArea=require(\"geojson-area\");module.exports=rewind;\n},{\"geojson-area\":6}],8:[function(require,module,exports){\n\"use strict\";function clip(e,r,t,n,u,i,l,s){if(t/=r,n/=r,l>=t&&s<=n)return e;if(l>n||s=t&&c<=n)h.push(o);else if(!(a>n||c=r&&s<=t&&u.push(l)}return u}function clipGeometry(e,r,t,n,u,i){for(var l=[],s=0;st?(d.push(u(h,f,r),u(h,f,t)),i||(d=newSlice(l,d,v,m,w))):o>=r&&d.push(u(h,f,r)):c>t?ot&&(d.push(u(h,f,t)),i||(d=newSlice(l,d,v,m,w))));h=g[S-1],c=h[n],c>=r&&c<=t&&d.push(h),a=d[d.length-1],i&&a&&(d[0][0]!==a[0]||d[0][1]!==a[1])&&d.push(d[0]),newSlice(l,d,v,m,w)}return l}function newSlice(e,r,t,n,u){return r.length&&(r.area=t,r.dist=n,void 0!==u&&(r.outer=u),e.push(r)),[]}module.exports=clip;var createFeature=require(\"./feature\");\n},{\"./feature\":10}],9:[function(require,module,exports){\n\"use strict\";function convert(e,t){var r=[];if(\"FeatureCollection\"===e.type)for(var o=0;o1?1:o,[r,o,0]}function calcSize(e){for(var t,r,o=0,a=0,i=0;i1)return!1;var r=n.geometry[0].length;if(5!==r)return!1;for(var s=0;s1&&console.time(\"creation\"),m=this.tiles[d]=createTile(e,p,i,o,f,t===a.maxZoom),this.tileCoords.push({z:t,x:i,y:o}),u)){u>1&&(console.log(\"tile z%d-%d-%d (features: %d, points: %d, simplified: %d)\",t,i,o,m.numFeatures,m.numPoints,m.numSimplified),console.timeEnd(\"creation\"));var h=\"z\"+t;this.stats[h]=(this.stats[h]||0)+1,this.total++}if(m.source=e,n){if(t===a.maxZoom||t===n)continue;var x=1<1&&console.time(\"clipping\");var g,v,M,T,b,y,S=.5*a.buffer/a.extent,Z=.5-S,q=.5+S,w=1+S;g=v=M=T=null,b=clip(e,p,i-S,i+q,0,intersectX,m.min[0],m.max[0]),y=clip(e,p,i+Z,i+w,0,intersectX,m.min[0],m.max[0]),b&&(g=clip(b,p,o-S,o+q,1,intersectY,m.min[1],m.max[1]),v=clip(b,p,o+Z,o+w,1,intersectY,m.min[1],m.max[1])),y&&(M=clip(y,p,o-S,o+q,1,intersectY,m.min[1],m.max[1]),T=clip(y,p,o+Z,o+w,1,intersectY,m.min[1],m.max[1])),u>1&&console.timeEnd(\"clipping\"),e.length&&(l.push(g||[],t+1,2*i,2*o),l.push(v||[],t+1,2*i,2*o+1),l.push(M||[],t+1,2*i+1,2*o),l.push(T||[],t+1,2*i+1,2*o+1))}else n&&(c=t)}return c},GeoJSONVT.prototype.getTile=function(e,t,i){var o=this.options,n=o.extent,r=o.debug,s=1<1&&console.log(\"drilling down to z%d-%d-%d\",e,t,i);for(var a,u=e,c=t,p=i;!a&&u>0;)u--,c=Math.floor(c/2),p=Math.floor(p/2),a=this.tiles[toID(u,c,p)];if(!a||!a.source)return null;if(r>1&&console.log(\"found parent tile z%d-%d-%d\",u,c,p),isClippedSquare(a,n,o.buffer))return transform.tile(a,n);r>1&&console.time(\"drilling down\");var d=this.splitTile(a.source,u,c,p,e,t,i);if(r>1&&console.timeEnd(\"drilling down\"),null!==d){var m=1<p&&(s=e,p=r);p>o?(t[s][2]=p,g.push(u),g.push(s),u=s):(n=g.pop(),u=g.pop())}}function getSqSegDist(t,i,e){var p=i[0],r=i[1],s=e[0],o=e[1],f=t[0],u=t[1],n=s-p,g=o-r;if(0!==n||0!==g){var l=((f-p)*n+(u-r)*g)/(n*n+g*g);l>1?(p=s,r=o):l>0&&(p+=n*l,r+=g*l)}return n=f-p,g=u-r,n*n+g*g}module.exports=simplify;\n},{}],13:[function(require,module,exports){\n\"use strict\";function createTile(e,n,r,i,t,u){for(var a={features:[],numPoints:0,numSimplified:0,numFeatures:0,source:null,x:r,y:i,z2:n,transformed:!1,min:[2,1],max:[-1,0]},m=0;ma.max[0]&&(a.max[0]=l[0]),l[1]>a.max[1]&&(a.max[1]=l[1])}return a}function addFeature(e,n,r,i){var t,u,a,m,s=n.geometry,l=n.type,o=[],f=r*r;if(1===l)for(t=0;tf)&&(d.push(m),e.numSimplified++),e.numPoints++;3===l&&rewind(d,a.outer),o.push(d)}else e.numPoints+=a.length;if(o.length){var g={geometry:o,type:l,tags:n.tags||null};null!==n.id&&(g.id=n.id),e.features.push(g)}}function rewind(e,n){var r=signedArea(e);r<0===n&&e.reverse()}function signedArea(e){for(var n,r,i=0,t=0,u=e.length,a=u-1;t=a[u+0]&&s>=a[u+1]?(n[f]=!0,h.push(l[f])):n[f]=!1}}},GridIndex.prototype._forEachCell=function(t,r,e,s,i,h,n){for(var o=this._convertToCellCoord(t),l=this._convertToCellCoord(r),a=this._convertToCellCoord(e),d=this._convertToCellCoord(s),f=o;f<=a;f++)for(var u=l;u<=d;u++){var y=this.d*u+f;if(i.call(this,t,r,e,s,y,h,n))return}},GridIndex.prototype._convertToCellCoord=function(t){return Math.max(0,Math.min(this.d-1,Math.floor(t*this.scale)+this.padding))},GridIndex.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var t=this.cells,r=NUM_PARAMS+this.cells.length+1+1,e=0,s=0;s>1,i=-7,N=t?h-1:0,n=t?-1:1,s=a[o+N];for(N+=n,M=s&(1<<-i)-1,s>>=-i,i+=w;i>0;M=256*M+a[o+N],N+=n,i-=8);for(p=M&(1<<-i)-1,M>>=-i,i+=r;i>0;p=256*p+a[o+N],N+=n,i-=8);if(0===M)M=1-e;else{if(M===f)return p?NaN:(s?-1:1)*(1/0);p+=Math.pow(2,r),M-=e}return(s?-1:1)*p*Math.pow(2,M-r)},exports.write=function(a,o,t,r,h,M){var p,w,f,e=8*M-h-1,i=(1<>1,n=23===h?Math.pow(2,-24)-Math.pow(2,-77):0,s=r?0:M-1,u=r?1:-1,l=o<0||0===o&&1/o<0?1:0;for(o=Math.abs(o),isNaN(o)||o===1/0?(w=isNaN(o)?1:0,p=i):(p=Math.floor(Math.log(o)/Math.LN2),o*(f=Math.pow(2,-p))<1&&(p--,f*=2),o+=p+N>=1?n/f:n*Math.pow(2,1-N),o*f>=2&&(p++,f/=2),p+N>=i?(w=0,p=i):p+N>=1?(w=(o*f-1)*Math.pow(2,h),p+=N):(w=o*Math.pow(2,N-1)*Math.pow(2,h),p=0));h>=8;a[t+s]=255&w,s+=u,w/=256,h-=8);for(p=p<0;a[t+s]=255&p,s+=u,p/=256,e-=8);a[t+s-u]|=128*l};\n},{}],18:[function(require,module,exports){\n\"use strict\";function kdbush(t,i,e,s,n){return new KDBush(t,i,e,s,n)}function KDBush(t,i,e,s,n){i=i||defaultGetX,e=e||defaultGetY,n=n||Array,this.nodeSize=s||64,this.points=t,this.ids=new n(t.length),this.coords=new n(2*t.length);for(var r=0;r=s&&a<=h&&t>=u&&t<=e&&f.push(p[i]);else{var c=Math.floor((g+v)/2);a=r[2*c],t=r[2*c+1],a>=s&&a<=h&&t>=u&&t<=e&&f.push(p[c]);var d=(l+1)%2;(0===l?s<=a:u<=t)&&(n.push(g),n.push(c-1),n.push(d)),(0===l?h>=a:e>=t)&&(n.push(c+1),n.push(v),n.push(d))}}return f}module.exports=range;\n},{}],20:[function(require,module,exports){\n\"use strict\";function sortKD(t,a,o,s,r,e){if(!(r-s<=o)){var f=Math.floor((s+r)/2);select(t,a,f,s,r,e%2),sortKD(t,a,o,s,f-1,e+1),sortKD(t,a,o,f+1,r,e+1)}}function select(t,a,o,s,r,e){for(;r>s;){if(r-s>600){var f=r-s+1,p=o-s+1,w=Math.log(f),m=.5*Math.exp(2*w/3),n=.5*Math.sqrt(w*m*(f-m)/f)*(p-f/2<0?-1:1),c=Math.max(s,Math.floor(o-p*m/f+n)),h=Math.min(r,Math.floor(o+(f-p)*m/f+n));select(t,a,o,c,h,e)}var i=a[2*o+e],l=s,M=r;for(swapItem(t,a,s,o),a[2*r+e]>i&&swapItem(t,a,s,r);li;)M--}a[2*s+e]===i?swapItem(t,a,s,M):(M++,swapItem(t,a,M,r)),M<=o&&(s=M+1),o<=M&&(r=M-1)}}function swapItem(t,a,o,s){swap(t,o,s),swap(a,2*o,2*s),swap(a,2*o+1,2*s+1)}function swap(t,a,o){var s=t[a];t[a]=t[o],t[o]=s}module.exports=sortKD;\n},{}],21:[function(require,module,exports){\n\"use strict\";function within(s,p,r,t,u,h){for(var i=[0,s.length-1,0],o=[],n=u*u;i.length;){var e=i.pop(),a=i.pop(),f=i.pop();if(a-f<=h)for(var v=f;v<=a;v++)sqDist(p[2*v],p[2*v+1],r,t)<=n&&o.push(s[v]);else{var l=Math.floor((f+a)/2),c=p[2*l],q=p[2*l+1];sqDist(c,q,r,t)<=n&&o.push(s[l]);var D=(e+1)%2;(0===e?r-u<=c:t-u<=q)&&(i.push(f),i.push(l-1),i.push(D)),(0===e?r+u>=c:t+u>=q)&&(i.push(l+1),i.push(a),i.push(D))}}return o}function sqDist(s,p,r,t){var u=s-r,h=p-t;return u*u+h*h}module.exports=within;\n},{}],22:[function(require,module,exports){\n\"use strict\";function isSupported(e){return!!(isBrowser()&&isArraySupported()&&isFunctionSupported()&&isObjectSupported()&&isJSONSupported()&&isWorkerSupported()&&isUint8ClampedArraySupported()&&isWebGLSupportedCached(e&&e.failIfMajorPerformanceCaveat))}function isBrowser(){return\"undefined\"!=typeof window&&\"undefined\"!=typeof document}function isArraySupported(){return Array.prototype&&Array.prototype.every&&Array.prototype.filter&&Array.prototype.forEach&&Array.prototype.indexOf&&Array.prototype.lastIndexOf&&Array.prototype.map&&Array.prototype.some&&Array.prototype.reduce&&Array.prototype.reduceRight&&Array.isArray}function isFunctionSupported(){return Function.prototype&&Function.prototype.bind}function isObjectSupported(){return Object.keys&&Object.create&&Object.getPrototypeOf&&Object.getOwnPropertyNames&&Object.isSealed&&Object.isFrozen&&Object.isExtensible&&Object.getOwnPropertyDescriptor&&Object.defineProperty&&Object.defineProperties&&Object.seal&&Object.freeze&&Object.preventExtensions}function isJSONSupported(){return\"JSON\"in window&&\"parse\"in JSON&&\"stringify\"in JSON}function isWorkerSupported(){return\"Worker\"in window}function isUint8ClampedArraySupported(){return\"Uint8ClampedArray\"in window}function isWebGLSupportedCached(e){return void 0===isWebGLSupportedCache[e]&&(isWebGLSupportedCache[e]=isWebGLSupported(e)),isWebGLSupportedCache[e]}function isWebGLSupported(e){var t=document.createElement(\"canvas\"),r=Object.create(isSupported.webGLContextAttributes);return r.failIfMajorPerformanceCaveat=e,t.probablySupportsContext?t.probablySupportsContext(\"webgl\",r)||t.probablySupportsContext(\"experimental-webgl\",r):t.supportsContext?t.supportsContext(\"webgl\",r)||t.supportsContext(\"experimental-webgl\",r):t.getContext(\"webgl\",r)||t.getContext(\"experimental-webgl\",r)}\"undefined\"!=typeof module&&module.exports?module.exports=isSupported:window&&(window.mapboxgl=window.mapboxgl||{},window.mapboxgl.supported=isSupported);var isWebGLSupportedCache={};isSupported.webGLContextAttributes={antialias:!1,alpha:!0,stencil:!0,depth:!0};\n},{}],23:[function(require,module,exports){\n(function (process){\nfunction normalizeArray(r,t){for(var e=0,n=r.length-1;n>=0;n--){var s=r[n];\".\"===s?r.splice(n,1):\"..\"===s?(r.splice(n,1),e++):e&&(r.splice(n,1),e--)}if(t)for(;e--;e)r.unshift(\"..\");return r}function filter(r,t){if(r.filter)return r.filter(t);for(var e=[],n=0;n=-1&&!t;e--){var n=e>=0?arguments[e]:process.cwd();if(\"string\"!=typeof n)throw new TypeError(\"Arguments to path.resolve must be strings\");n&&(r=n+\"/\"+r,t=\"/\"===n.charAt(0))}return r=normalizeArray(filter(r.split(\"/\"),function(r){return!!r}),!t).join(\"/\"),(t?\"/\":\"\")+r||\".\"},exports.normalize=function(r){var t=exports.isAbsolute(r),e=\"/\"===substr(r,-1);return r=normalizeArray(filter(r.split(\"/\"),function(r){return!!r}),!t).join(\"/\"),r||t||(r=\".\"),r&&e&&(r+=\"/\"),(t?\"/\":\"\")+r},exports.isAbsolute=function(r){return\"/\"===r.charAt(0)},exports.join=function(){var r=Array.prototype.slice.call(arguments,0);return exports.normalize(filter(r,function(r,t){if(\"string\"!=typeof r)throw new TypeError(\"Arguments to path.join must be strings\");return r}).join(\"/\"))},exports.relative=function(r,t){function e(r){for(var t=0;t=0&&\"\"===r[e];e--);return t>e?[]:r.slice(t,e-t+1)}r=exports.resolve(r).substr(1),t=exports.resolve(t).substr(1);for(var n=e(r.split(\"/\")),s=e(t.split(\"/\")),i=Math.min(n.length,s.length),o=i,u=0;u55295&&e<57344){if(!r){e>56319||o+1===n?i.push(239,191,189):r=e;continue}if(e<56320){i.push(239,191,189),r=e;continue}e=r-55296<<10|e-56320|65536,r=null}else r&&(i.push(239,191,189),r=null);e<128?i.push(e):e<2048?i.push(e>>6|192,63&e|128):e<65536?i.push(e>>12|224,e>>6&63|128,63&e|128):i.push(e>>18|240,e>>12&63|128,e>>6&63|128,63&e|128)}return i}module.exports=Buffer;var ieee754=require(\"ieee754\"),BufferMethods,lastStr,lastStrEncoded;BufferMethods={readUInt32LE:function(t){return(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},writeUInt32LE:function(t,e){this[e]=t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24},readInt32LE:function(t){return(this[t]|this[t+1]<<8|this[t+2]<<16)+(this[t+3]<<24)},readFloatLE:function(t){return ieee754.read(this,t,!0,23,4)},readDoubleLE:function(t){return ieee754.read(this,t,!0,52,8)},writeFloatLE:function(t,e){return ieee754.write(this,t,e,!0,23,4)},writeDoubleLE:function(t,e){return ieee754.write(this,t,e,!0,52,8)},toString:function(t,e,r){var n=\"\",i=\"\";e=e||0,r=Math.min(this.length,r||this.length);for(var o=e;o=1;){if(i.pos>=e)throw new Error(\"Given varint doesn't fit into 10 bytes\");var r=255&t;i.buf[i.pos++]=r|(t>=128?128:0),t/=128}}function reallocForRawMessage(t,i,e){var r=i<=16383?1:i<=2097151?2:i<=268435455?3:Math.ceil(Math.log(i)/(7*Math.LN2));e.realloc(r);for(var s=e.pos-1;s>=t;s--)e.buf[s+r]=e.buf[s]}function writePackedVarint(t,i){for(var e=0;e>3,n=this.pos;t(s,i,this),this.pos===n&&this.skip(r)}return i},readMessage:function(t,i){return this.readFields(t,i,this.readVarint()+this.pos)},readFixed32:function(){var t=this.buf.readUInt32LE(this.pos);return this.pos+=4,t},readSFixed32:function(){var t=this.buf.readInt32LE(this.pos);return this.pos+=4,t},readFixed64:function(){var t=this.buf.readUInt32LE(this.pos)+this.buf.readUInt32LE(this.pos+4)*SHIFT_LEFT_32;return this.pos+=8,t},readSFixed64:function(){var t=this.buf.readUInt32LE(this.pos)+this.buf.readInt32LE(this.pos+4)*SHIFT_LEFT_32;return this.pos+=8,t},readFloat:function(){var t=this.buf.readFloatLE(this.pos);return this.pos+=4,t},readDouble:function(){var t=this.buf.readDoubleLE(this.pos);return this.pos+=8,t},readVarint:function(){var t,i,e=this.buf;return i=e[this.pos++],t=127&i,i<128?t:(i=e[this.pos++],t|=(127&i)<<7,i<128?t:(i=e[this.pos++],t|=(127&i)<<14,i<128?t:(i=e[this.pos++],t|=(127&i)<<21,i<128?t:readVarintRemainder(t,this))))},readVarint64:function(){var t=this.pos,i=this.readVarint();if(i127;);else if(i===Pbf.Bytes)this.pos=this.readVarint()+this.pos;else if(i===Pbf.Fixed32)this.pos+=4;else{if(i!==Pbf.Fixed64)throw new Error(\"Unimplemented type: \"+i);this.pos+=8}},writeTag:function(t,i){this.writeVarint(t<<3|i)},realloc:function(t){for(var i=this.length||16;i268435455?void writeBigVarint(t,this):(this.realloc(4),this.buf[this.pos++]=127&t|(t>127?128:0),void(t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=t>>>7&127)))))},writeSVarint:function(t){this.writeVarint(t<0?2*-t-1:2*t)},writeBoolean:function(t){this.writeVarint(Boolean(t))},writeString:function(t){t=String(t);var i=Buffer.byteLength(t);this.writeVarint(i),this.realloc(i),this.buf.write(t,this.pos),this.pos+=i},writeFloat:function(t){this.realloc(4),this.buf.writeFloatLE(t,this.pos),this.pos+=4},writeDouble:function(t){this.realloc(8),this.buf.writeDoubleLE(t,this.pos),this.pos+=8},writeBytes:function(t){var i=t.length;this.writeVarint(i),this.realloc(i);for(var e=0;e=128&&reallocForRawMessage(e,r,this),this.pos=e-1,this.writeVarint(r),this.pos+=r},writeMessage:function(t,i,e){this.writeTag(t,Pbf.Bytes),this.writeRawMessage(i,e)},writePackedVarint:function(t,i){this.writeMessage(t,writePackedVarint,i)},writePackedSVarint:function(t,i){this.writeMessage(t,writePackedSVarint,i)},writePackedBoolean:function(t,i){this.writeMessage(t,writePackedBoolean,i)},writePackedFloat:function(t,i){this.writeMessage(t,writePackedFloat,i)},writePackedDouble:function(t,i){this.writeMessage(t,writePackedDouble,i)},writePackedFixed32:function(t,i){this.writeMessage(t,writePackedFixed32,i)},writePackedSFixed32:function(t,i){this.writeMessage(t,writePackedSFixed32,i)},writePackedFixed64:function(t,i){this.writeMessage(t,writePackedFixed64,i)},writePackedSFixed64:function(t,i){this.writeMessage(t,writePackedSFixed64,i)},writeBytesField:function(t,i){this.writeTag(t,Pbf.Bytes),this.writeBytes(i)},writeFixed32Field:function(t,i){this.writeTag(t,Pbf.Fixed32),this.writeFixed32(i)},writeSFixed32Field:function(t,i){this.writeTag(t,Pbf.Fixed32),this.writeSFixed32(i)},writeFixed64Field:function(t,i){this.writeTag(t,Pbf.Fixed64),this.writeFixed64(i)},writeSFixed64Field:function(t,i){this.writeTag(t,Pbf.Fixed64),this.writeSFixed64(i)},writeVarintField:function(t,i){this.writeTag(t,Pbf.Varint),this.writeVarint(i)},writeSVarintField:function(t,i){this.writeTag(t,Pbf.Varint),this.writeSVarint(i)},writeStringField:function(t,i){this.writeTag(t,Pbf.Bytes),this.writeString(i)},writeFloatField:function(t,i){this.writeTag(t,Pbf.Fixed32),this.writeFloat(i)},writeDoubleField:function(t,i){this.writeTag(t,Pbf.Fixed64),this.writeDouble(i)},writeBooleanField:function(t,i){this.writeVarintField(t,Boolean(i))}};\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n\n},{\"./buffer\":24}],26:[function(require,module,exports){\n\"use strict\";function Point(t,n){this.x=t,this.y=n}module.exports=Point,Point.prototype={clone:function(){return new Point(this.x,this.y)},add:function(t){return this.clone()._add(t)},sub:function(t){return this.clone()._sub(t)},mult:function(t){return this.clone()._mult(t)},div:function(t){return this.clone()._div(t)},rotate:function(t){return this.clone()._rotate(t)},matMult:function(t){return this.clone()._matMult(t)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(t){return this.x===t.x&&this.y===t.y},dist:function(t){return Math.sqrt(this.distSqr(t))},distSqr:function(t){var n=t.x-this.x,i=t.y-this.y;return n*n+i*i},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(t){return Math.atan2(this.y-t.y,this.x-t.x)},angleWith:function(t){return this.angleWithSep(t.x,t.y)},angleWithSep:function(t,n){return Math.atan2(this.x*n-this.y*t,this.x*t+this.y*n)},_matMult:function(t){var n=t[0]*this.x+t[1]*this.y,i=t[2]*this.x+t[3]*this.y;return this.x=n,this.y=i,this},_add:function(t){return this.x+=t.x,this.y+=t.y,this},_sub:function(t){return this.x-=t.x,this.y-=t.y,this},_mult:function(t){return this.x*=t,this.y*=t,this},_div:function(t){return this.x/=t,this.y/=t,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var t=this.y;return this.y=this.x,this.x=-t,this},_rotate:function(t){var n=Math.cos(t),i=Math.sin(t),s=n*this.x-i*this.y,r=i*this.x+n*this.y;return this.x=s,this.y=r,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},Point.convert=function(t){return t instanceof Point?t:Array.isArray(t)?new Point(t[0],t[1]):t};\n},{}],27:[function(require,module,exports){\nfunction defaultSetTimout(){throw new Error(\"setTimeout has not been defined\")}function defaultClearTimeout(){throw new Error(\"clearTimeout has not been defined\")}function runTimeout(e){if(cachedSetTimeout===setTimeout)return setTimeout(e,0);if((cachedSetTimeout===defaultSetTimout||!cachedSetTimeout)&&setTimeout)return cachedSetTimeout=setTimeout,setTimeout(e,0);try{return cachedSetTimeout(e,0)}catch(t){try{return cachedSetTimeout.call(null,e,0)}catch(t){return cachedSetTimeout.call(this,e,0)}}}function runClearTimeout(e){if(cachedClearTimeout===clearTimeout)return clearTimeout(e);if((cachedClearTimeout===defaultClearTimeout||!cachedClearTimeout)&&clearTimeout)return cachedClearTimeout=clearTimeout,clearTimeout(e);try{return cachedClearTimeout(e)}catch(t){try{return cachedClearTimeout.call(null,e)}catch(t){return cachedClearTimeout.call(this,e)}}}function cleanUpNextTick(){draining&¤tQueue&&(draining=!1,currentQueue.length?queue=currentQueue.concat(queue):queueIndex=-1,queue.length&&drainQueue())}function drainQueue(){if(!draining){var e=runTimeout(cleanUpNextTick);draining=!0;for(var t=queue.length;t;){for(currentQueue=queue,queue=[];++queueIndex1)for(var u=1;ur;){if(o-r>600){var f=o-r+1,e=t-r+1,l=Math.log(f),s=.5*Math.exp(2*l/3),i=.5*Math.sqrt(l*s*(f-s)/f)*(e-f/2<0?-1:1),n=Math.max(r,Math.floor(t-e*s/f+i)),h=Math.min(o,Math.floor(t+(f-e)*s/f+i));partialSort(a,t,n,h,p)}var u=a[t],M=r,w=o;for(swap(a,r,t),p(a[o],u)>0&&swap(a,r,o);M0;)w--}0===p(a[r],u)?swap(a,r,w):(w++,swap(a,w,o)),w<=t&&(r=w+1),t<=w&&(o=w-1)}}function swap(a,t,r){var o=a[t];a[t]=a[r],a[r]=o}function defaultCompare(a,t){return at?1:0}module.exports=partialSort;\n},{}],29:[function(require,module,exports){\n\"use strict\";function supercluster(t){return new SuperCluster(t)}function SuperCluster(t){this.options=extend(Object.create(this.options),t),this.trees=new Array(this.options.maxZoom+1)}function createCluster(t,e,o,n){return{x:t,y:e,zoom:1/0,id:n,numPoints:o}}function createPointCluster(t,e){var o=t.geometry.coordinates;return createCluster(lngX(o[0]),latY(o[1]),1,e)}function getClusterJSON(t){return{type:\"Feature\",properties:getClusterProperties(t),geometry:{type:\"Point\",coordinates:[xLng(t.x),yLat(t.y)]}}}function getClusterProperties(t){var e=t.numPoints,o=e>=1e4?Math.round(e/1e3)+\"k\":e>=1e3?Math.round(e/100)/10+\"k\":e;return{cluster:!0,point_count:e,point_count_abbreviated:o}}function lngX(t){return t/360+.5}function latY(t){var e=Math.sin(t*Math.PI/180),o=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return o<0?0:o>1?1:o}function xLng(t){return 360*(t-.5)}function yLat(t){var e=(180-360*t)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}function extend(t,e){for(var o in e)t[o]=e[o];return t}function getX(t){return t.x}function getY(t){return t.y}var kdbush=require(\"kdbush\");module.exports=supercluster,SuperCluster.prototype={options:{minZoom:0,maxZoom:16,radius:40,extent:512,nodeSize:64,log:!1},load:function(t){var e=this.options.log;e&&console.time(\"total time\");var o=\"prepare \"+t.length+\" points\";e&&console.time(o),this.points=t;var n=t.map(createPointCluster);e&&console.timeEnd(o);for(var r=this.options.maxZoom;r>=this.options.minZoom;r--){var i=+Date.now();this.trees[r+1]=kdbush(n,getX,getY,this.options.nodeSize,Float32Array),n=this._cluster(n,r),e&&console.log(\"z%d: %d clusters in %dms\",r,n.length,+Date.now()-i)}return this.trees[this.options.minZoom]=kdbush(n,getX,getY,this.options.nodeSize,Float32Array),e&&console.timeEnd(\"total time\"),this},getClusters:function(t,e){for(var o=this.trees[this._limitZoom(e)],n=o.range(lngX(t[0]),latY(t[3]),lngX(t[2]),latY(t[1])),r=[],i=0;i=0;a--)this._down(a)}function defaultCompare(t,i){return ti?1:0}function swap(t,i,a){var n=t[i];t[i]=t[a],t[a]=n}module.exports=TinyQueue,TinyQueue.prototype={push:function(t){this.data.push(t),this.length++,this._up(this.length-1)},pop:function(){var t=this.data[0];return this.data[0]=this.data[this.length-1],this.length--,this.data.pop(),this._down(0),t},peek:function(){return this.data[0]},_up:function(t){for(var i=this.data,a=this.compare;t>0;){var n=Math.floor((t-1)/2);if(!(a(i[t],i[n])<0))break;swap(i,n,t),t=n}},_down:function(t){for(var i=this.data,a=this.compare,n=this.length;;){var e=2*t+1,h=e+1,s=t;if(e=3&&(t.depth=arguments[2]),arguments.length>=4&&(t.colors=arguments[3]),isBoolean(r)?t.showHidden=r:r&&exports._extend(t,r),isUndefined(t.showHidden)&&(t.showHidden=!1),isUndefined(t.depth)&&(t.depth=2),isUndefined(t.colors)&&(t.colors=!1),isUndefined(t.customInspect)&&(t.customInspect=!0),t.colors&&(t.stylize=stylizeWithColor),formatValue(t,e,t.depth)}function stylizeWithColor(e,r){var t=inspect.styles[r];return t?\"\u001b[\"+inspect.colors[t][0]+\"m\"+e+\"\u001b[\"+inspect.colors[t][1]+\"m\":e}function stylizeNoColor(e,r){return e}function arrayToHash(e){var r={};return e.forEach(function(e,t){r[e]=!0}),r}function formatValue(e,r,t){if(e.customInspect&&r&&isFunction(r.inspect)&&r.inspect!==exports.inspect&&(!r.constructor||r.constructor.prototype!==r)){var n=r.inspect(t,e);return isString(n)||(n=formatValue(e,n,t)),n}var i=formatPrimitive(e,r);if(i)return i;var o=Object.keys(r),s=arrayToHash(o);if(e.showHidden&&(o=Object.getOwnPropertyNames(r)),isError(r)&&(o.indexOf(\"message\")>=0||o.indexOf(\"description\")>=0))return formatError(r);if(0===o.length){if(isFunction(r)){var u=r.name?\": \"+r.name:\"\";return e.stylize(\"[Function\"+u+\"]\",\"special\")}if(isRegExp(r))return e.stylize(RegExp.prototype.toString.call(r),\"regexp\");if(isDate(r))return e.stylize(Date.prototype.toString.call(r),\"date\");if(isError(r))return formatError(r)}var c=\"\",a=!1,l=[\"{\",\"}\"];if(isArray(r)&&(a=!0,l=[\"[\",\"]\"]),isFunction(r)){var p=r.name?\": \"+r.name:\"\";c=\" [Function\"+p+\"]\"}if(isRegExp(r)&&(c=\" \"+RegExp.prototype.toString.call(r)),isDate(r)&&(c=\" \"+Date.prototype.toUTCString.call(r)),isError(r)&&(c=\" \"+formatError(r)),0===o.length&&(!a||0==r.length))return l[0]+c+l[1];if(t<0)return isRegExp(r)?e.stylize(RegExp.prototype.toString.call(r),\"regexp\"):e.stylize(\"[Object]\",\"special\");e.seen.push(r);var f;return f=a?formatArray(e,r,t,s,o):o.map(function(n){return formatProperty(e,r,t,s,n,a)}),e.seen.pop(),reduceToSingleString(f,c,l)}function formatPrimitive(e,r){if(isUndefined(r))return e.stylize(\"undefined\",\"undefined\");if(isString(r)){var t=\"'\"+JSON.stringify(r).replace(/^\"|\"$/g,\"\").replace(/'/g,\"\\\\'\").replace(/\\\\\"/g,'\"')+\"'\";return e.stylize(t,\"string\")}return isNumber(r)?e.stylize(\"\"+r,\"number\"):isBoolean(r)?e.stylize(\"\"+r,\"boolean\"):isNull(r)?e.stylize(\"null\",\"null\"):void 0}function formatError(e){return\"[\"+Error.prototype.toString.call(e)+\"]\"}function formatArray(e,r,t,n,i){for(var o=[],s=0,u=r.length;s-1&&(u=o?u.split(\"\\n\").map(function(e){return\" \"+e}).join(\"\\n\").substr(2):\"\\n\"+u.split(\"\\n\").map(function(e){return\" \"+e}).join(\"\\n\"))):u=e.stylize(\"[Circular]\",\"special\")),isUndefined(s)){if(o&&i.match(/^\\d+$/))return u;s=JSON.stringify(\"\"+i),s.match(/^\"([a-zA-Z_][a-zA-Z_0-9]*)\"$/)?(s=s.substr(1,s.length-2),s=e.stylize(s,\"name\")):(s=s.replace(/'/g,\"\\\\'\").replace(/\\\\\"/g,'\"').replace(/(^\"|\"$)/g,\"'\"),s=e.stylize(s,\"string\"))}return s+\": \"+u}function reduceToSingleString(e,r,t){var n=0,i=e.reduce(function(e,r){return n++,r.indexOf(\"\\n\")>=0&&n++,e+r.replace(/\\u001b\\[\\d\\d?m/g,\"\").length+1},0);return i>60?t[0]+(\"\"===r?\"\":r+\"\\n \")+\" \"+e.join(\",\\n \")+\" \"+t[1]:t[0]+r+\" \"+e.join(\", \")+\" \"+t[1]}function isArray(e){return Array.isArray(e)}function isBoolean(e){return\"boolean\"==typeof e}function isNull(e){return null===e}function isNullOrUndefined(e){return null==e}function isNumber(e){return\"number\"==typeof e}function isString(e){return\"string\"==typeof e}function isSymbol(e){return\"symbol\"==typeof e}function isUndefined(e){return void 0===e}function isRegExp(e){return isObject(e)&&\"[object RegExp]\"===objectToString(e)}function isObject(e){return\"object\"==typeof e&&null!==e}function isDate(e){return isObject(e)&&\"[object Date]\"===objectToString(e)}function isError(e){return isObject(e)&&(\"[object Error]\"===objectToString(e)||e instanceof Error)}function isFunction(e){return\"function\"==typeof e}function isPrimitive(e){return null===e||\"boolean\"==typeof e||\"number\"==typeof e||\"string\"==typeof e||\"symbol\"==typeof e||\"undefined\"==typeof e}function objectToString(e){return Object.prototype.toString.call(e)}function pad(e){return e<10?\"0\"+e.toString(10):e.toString(10)}function timestamp(){var e=new Date,r=[pad(e.getHours()),pad(e.getMinutes()),pad(e.getSeconds())].join(\":\");return[e.getDate(),months[e.getMonth()],r].join(\" \")}function hasOwnProperty(e,r){return Object.prototype.hasOwnProperty.call(e,r)}var formatRegExp=/%[sdj%]/g;exports.format=function(e){if(!isString(e)){for(var r=[],t=0;t=i)return e;switch(e){case\"%s\":return String(n[t++]);case\"%d\":return Number(n[t++]);case\"%j\":try{return JSON.stringify(n[t++])}catch(e){return\"[Circular]\"}default:return e}}),s=n[t];t>3}if(a--,1===i||2===i)o+=e.readSVarint(),n+=e.readSVarint(),1===i&&(t&&s.push(t),t=[]),t.push(new Point(o,n));else{if(7!==i)throw new Error(\"unknown command \"+i);t&&t.push(t[0].clone())}}return t&&s.push(t),s},VectorTileFeature.prototype.bbox=function(){var e=this._pbf;e.pos=this._geometry;for(var t=e.readVarint()+e.pos,r=1,i=0,a=0,o=0,n=1/0,s=-(1/0),p=1/0,h=-(1/0);e.pos>3}if(i--,1===r||2===r)a+=e.readSVarint(),o+=e.readSVarint(),as&&(s=a),oh&&(h=o);else if(7!==r)throw new Error(\"unknown command \"+r)}return[n,p,s,h]},VectorTileFeature.prototype.toGeoJSON=function(e,t,r){function i(e){for(var t=0;t>3;t=1===a?e.readString():2===a?e.readFloat():3===a?e.readDouble():4===a?e.readVarint64():5===a?e.readVarint():6===a?e.readSVarint():7===a?e.readBoolean():null}return t}var VectorTileFeature=require(\"./vectortilefeature.js\");module.exports=VectorTileLayer,VectorTileLayer.prototype.feature=function(e){if(e<0||e>=this._features.length)throw new Error(\"feature index out of bounds\");this._pbf.pos=this._features[e];var t=this._pbf.readVarint()+this._pbf.pos;return new VectorTileFeature(this._pbf,t,this.extent,this._keys,this._values)};\n},{\"./vectortilefeature.js\":36}],38:[function(require,module,exports){\nfunction fromVectorTileJs(e){var r=[];for(var o in e.layers)r.push(prepareLayer(e.layers[o]));var t=new Pbf;return vtpb.tile.write({layers:r},t),t.finish()}function fromGeojsonVt(e){var r={};for(var o in e)r[o]=new GeoJSONWrapper(e[o].features),r[o].name=o;return fromVectorTileJs({layers:r})}function prepareLayer(e){for(var r={name:e.name||\"\",version:e.version||1,extent:e.extent||4096,keys:[],values:[],features:[]},o={},t={},n=0;n>31}function encodeGeometry(e){for(var r=[],o=0,t=0,n=e.length,a=0;aArrayGroup.MAX_VERTEX_ARRAY_LENGTH)&&(e=new Segment(this.layoutVertexArray.length,this.elementArray.length),this.segments.push(e)),e},ArrayGroup.prototype.prepareSegment2=function(r){var e=this.segments2[this.segments2.length-1];return(!e||e.vertexLength+r>ArrayGroup.MAX_VERTEX_ARRAY_LENGTH)&&(e=new Segment(this.layoutVertexArray.length,this.elementArray2.length),this.segments2.push(e)),e},ArrayGroup.prototype.populatePaintArrays=function(r){var e=this;for(var t in e.layerData){var a=e.layerData[t];0!==a.paintVertexArray.bytesPerElement&&a.programConfiguration.populatePaintArray(a.layer,a.paintVertexArray,a.paintPropertyStatistics,e.layoutVertexArray.length,e.globalProperties,r)}},ArrayGroup.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},ArrayGroup.prototype.serialize=function(r){return{layoutVertexArray:this.layoutVertexArray.serialize(r),elementArray:this.elementArray&&this.elementArray.serialize(r),elementArray2:this.elementArray2&&this.elementArray2.serialize(r),paintVertexArrays:serializePaintVertexArrays(this.layerData,r),segments:this.segments,segments2:this.segments2}},ArrayGroup.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,module.exports=ArrayGroup;\n},{\"./program_configuration\":58}],45:[function(require,module,exports){\n\"use strict\";var ArrayGroup=require(\"./array_group\"),BufferGroup=require(\"./buffer_group\"),util=require(\"../util/util\"),Bucket=function(r,t){this.zoom=r.zoom,this.overscaling=r.overscaling,this.layers=r.layers,this.index=r.index,r.arrays?this.buffers=new BufferGroup(t,r.layers,r.zoom,r.arrays):this.arrays=new ArrayGroup(t,r.layers,r.zoom)};Bucket.prototype.populate=function(r,t){for(var e=this,i=0,a=r;i=EXTENT||o<0||o>=EXTENT)){var n=r.prepareSegment(4),u=n.vertexLength;addCircleVertex(r.layoutVertexArray,y,o,-1,-1),addCircleVertex(r.layoutVertexArray,y,o,1,-1),addCircleVertex(r.layoutVertexArray,y,o,1,1),addCircleVertex(r.layoutVertexArray,y,o,-1,1),r.elementArray.emplaceBack(u,u+1,u+2),r.elementArray.emplaceBack(u,u+3,u+2),n.vertexLength+=4,n.primitiveLength+=2}}r.populatePaintArrays(e.properties)},r}(Bucket);CircleBucket.programInterface=circleInterface,module.exports=CircleBucket;\n},{\"../bucket\":45,\"../element_array_type\":53,\"../extent\":54,\"../load_geometry\":56,\"../vertex_array_type\":60}],47:[function(require,module,exports){\n\"use strict\";var Bucket=require(\"../bucket\"),createVertexArrayType=require(\"../vertex_array_type\"),createElementArrayType=require(\"../element_array_type\"),loadGeometry=require(\"../load_geometry\"),earcut=require(\"earcut\"),classifyRings=require(\"../../util/classify_rings\"),EARCUT_MAX_RINGS=500,fillInterface={layoutVertexArrayType:createVertexArrayType([{name:\"a_pos\",components:2,type:\"Int16\"}]),elementArrayType:createElementArrayType(3),elementArrayType2:createElementArrayType(2),paintAttributes:[{property:\"fill-color\",type:\"Uint8\"},{property:\"fill-outline-color\",type:\"Uint8\"},{property:\"fill-opacity\",type:\"Uint8\",multiplier:255}]},FillBucket=function(e){function r(r){e.call(this,r,fillInterface)}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.addFeature=function(e){for(var r=this.arrays,t=0,a=classifyRings(loadGeometry(e),EARCUT_MAX_RINGS);tEXTENT)||e.y===r.y&&(e.y<0||e.y>EXTENT)}var Bucket=require(\"../bucket\"),createVertexArrayType=require(\"../vertex_array_type\"),createElementArrayType=require(\"../element_array_type\"),loadGeometry=require(\"../load_geometry\"),EXTENT=require(\"../extent\"),earcut=require(\"earcut\"),classifyRings=require(\"../../util/classify_rings\"),EARCUT_MAX_RINGS=500,fillExtrusionInterface={layoutVertexArrayType:createVertexArrayType([{name:\"a_pos\",components:2,type:\"Int16\"},{name:\"a_normal\",components:3,type:\"Int16\"},{name:\"a_edgedistance\",components:1,type:\"Int16\"}]),elementArrayType:createElementArrayType(3),paintAttributes:[{property:\"fill-extrusion-base\",type:\"Uint16\"},{property:\"fill-extrusion-height\",type:\"Uint16\"},{property:\"fill-extrusion-color\",type:\"Uint8\"}]},FACTOR=Math.pow(2,13),FillExtrusionBucket=function(e){function r(r){e.call(this,r,fillExtrusionInterface)}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.addFeature=function(e){for(var r=this.arrays,t=0,a=classifyRings(loadGeometry(e),EARCUT_MAX_RINGS);t=1){var A=d[h-1];if(!isBoundaryEdge(g,A)){var _=g.sub(A)._perp()._unit();addVertex(r.layoutVertexArray,g.x,g.y,_.x,_.y,0,0,m),addVertex(r.layoutVertexArray,g.x,g.y,_.x,_.y,0,1,m),m+=A.dist(g),addVertex(r.layoutVertexArray,A.x,A.y,_.x,_.y,0,0,m),addVertex(r.layoutVertexArray,A.x,A.y,_.x,_.y,0,1,m);var v=p.vertexLength;r.elementArray.emplaceBack(v,v+1,v+2),r.elementArray.emplaceBack(v+1,v+2,v+3),p.vertexLength+=4,p.primitiveLength+=2}}u.push(g.x),u.push(g.y)}}}for(var E=earcut(u,c),T=0;T>6)}var Bucket=require(\"../bucket\"),createVertexArrayType=require(\"../vertex_array_type\"),createElementArrayType=require(\"../element_array_type\"),loadGeometry=require(\"../load_geometry\"),EXTENT=require(\"../extent\"),VectorTileFeature=require(\"vector-tile\").VectorTileFeature,EXTRUDE_SCALE=63,COS_HALF_SHARP_CORNER=Math.cos(37.5*(Math.PI/180)),SHARP_CORNER_OFFSET=15,LINE_DISTANCE_BUFFER_BITS=15,LINE_DISTANCE_SCALE=.5,MAX_LINE_DISTANCE=Math.pow(2,LINE_DISTANCE_BUFFER_BITS-1)/LINE_DISTANCE_SCALE,lineInterface={layoutVertexArrayType:createVertexArrayType([{name:\"a_pos\",components:2,type:\"Int16\"},{name:\"a_data\",components:4,type:\"Uint8\"}]),paintAttributes:[{property:\"line-color\",type:\"Uint8\"},{property:\"line-blur\",multiplier:10,type:\"Uint8\"},{property:\"line-opacity\",multiplier:10,type:\"Uint8\"},{property:\"line-gap-width\",multiplier:10,type:\"Uint8\",name:\"a_gapwidth\"},{property:\"line-offset\",multiplier:1,type:\"Int8\"}],elementArrayType:createElementArrayType()},LineBucket=function(e){function t(t){e.call(this,t,lineInterface)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.addFeature=function(e){for(var t=this,r=this.layers[0].layout,i=r[\"line-join\"],a=r[\"line-cap\"],n=r[\"line-miter-limit\"],d=r[\"line-round-limit\"],s=0,u=loadGeometry(e,LINE_DISTANCE_BUFFER_BITS);s=2&&e[l-1].equals(e[l-2]);)l--;if(!(l<(u?3:2))){\"bevel\"===r&&(a=1.05);var o=SHARP_CORNER_OFFSET*(EXTENT/(512*this.overscaling)),p=e[0],c=this.arrays,_=c.prepareSegment(10*l);this.distance=0;var y,h,m,E,x,C,v,A=i,f=u?\"butt\":i,L=!0;this.e1=this.e2=this.e3=-1,u&&(y=e[l-2],x=p.sub(y)._unit()._perp());for(var V=0;V0){var b=y.dist(h);if(b>2*o){var R=y.sub(y.sub(h)._mult(o/b)._round());d.distance+=R.dist(h),d.addCurrentVertex(R,d.distance,E.mult(1),0,0,!1,_),h=R}}var g=h&&m,F=g?r:m?A:f;if(g&&\"round\"===F&&(Ia&&(F=\"bevel\"),\"bevel\"===F&&(I>2&&(F=\"flipbevel\"),I100)S=x.clone().mult(-1);else{var B=E.x*x.y-E.y*x.x>0?-1:1,k=I*E.add(x).mag()/E.sub(x).mag();S._perp()._mult(k*B)}d.addCurrentVertex(y,d.distance,S,0,0,!1,_),d.addCurrentVertex(y,d.distance,S.mult(-1),0,0,!1,_)}else if(\"bevel\"===F||\"fakeround\"===F){var D=E.x*x.y-E.y*x.x>0,P=-Math.sqrt(I*I-1);if(D?(v=0,C=P):(C=0,v=P),L||d.addCurrentVertex(y,d.distance,E,C,v,!1,_),\"fakeround\"===F){for(var U=Math.floor(8*(.5-(T-.5))),q=void 0,M=0;M=0;O--)q=E.mult((O+1)/(U+1))._add(x)._unit(),d.addPieSliceVertex(y,d.distance,q,D,_)}m&&d.addCurrentVertex(y,d.distance,x,-C,-v,!1,_)}else\"butt\"===F?(L||d.addCurrentVertex(y,d.distance,E,0,0,!1,_),m&&d.addCurrentVertex(y,d.distance,x,0,0,!1,_)):\"square\"===F?(L||(d.addCurrentVertex(y,d.distance,E,1,1,!1,_),d.e1=d.e2=-1),m&&d.addCurrentVertex(y,d.distance,x,-1,-1,!1,_)):\"round\"===F&&(L||(d.addCurrentVertex(y,d.distance,E,0,0,!1,_),d.addCurrentVertex(y,d.distance,E,1,1,!0,_),d.e1=d.e2=-1),m&&(d.addCurrentVertex(y,d.distance,x,-1,-1,!0,_),d.addCurrentVertex(y,d.distance,x,0,0,!1,_)));if(N&&V2*o){var H=y.add(m.sub(y)._mult(o/X)._round());d.distance+=H.dist(y),d.addCurrentVertex(H,d.distance,x.mult(1),0,0,!1,_),y=H}}L=!1}c.populatePaintArrays(s)}},t.prototype.addCurrentVertex=function(e,t,r,i,a,n,d){var s,u=n?1:0,l=this.arrays,o=l.layoutVertexArray,p=l.elementArray;s=r.clone(),i&&s._sub(r.perp()._mult(i)),addLineVertex(o,e,s,u,0,i,t),this.e3=d.vertexLength++,this.e1>=0&&this.e2>=0&&(p.emplaceBack(this.e1,this.e2,this.e3),d.primitiveLength++),this.e1=this.e2,this.e2=this.e3,s=r.mult(-1),a&&s._sub(r.perp()._mult(a)),addLineVertex(o,e,s,u,1,-a,t),this.e3=d.vertexLength++,this.e1>=0&&this.e2>=0&&(p.emplaceBack(this.e1,this.e2,this.e3),d.primitiveLength++),this.e1=this.e2,this.e2=this.e3,t>MAX_LINE_DISTANCE/2&&(this.distance=0,this.addCurrentVertex(e,this.distance,r,i,a,n,d))},t.prototype.addPieSliceVertex=function(e,t,r,i,a){var n=i?1:0;r=r.mult(i?-1:1);var d=this.arrays,s=d.layoutVertexArray,u=d.elementArray;addLineVertex(s,e,r,0,n,0,t),this.e3=a.vertexLength++,this.e1>=0&&this.e2>=0&&(u.emplaceBack(this.e1,this.e2,this.e3),a.primitiveLength++),i?this.e2=this.e3:this.e1=this.e3},t}(Bucket);LineBucket.programInterface=lineInterface,module.exports=LineBucket;\n},{\"../bucket\":45,\"../element_array_type\":53,\"../extent\":54,\"../load_geometry\":56,\"../vertex_array_type\":60,\"vector-tile\":34}],50:[function(require,module,exports){\n\"use strict\";function addVertex(e,t,o,r,a,i,n,l,s,c,y){e.emplaceBack(t,o,Math.round(64*r),Math.round(64*a),i/4,n/4,10*(c||0),y,10*(l||0),10*Math.min(s||25,25))}function addCollisionBoxVertex(e,t,o,r,a){return e.emplaceBack(t.x,t.y,Math.round(o.x),Math.round(o.y),10*r,10*a)}var Point=require(\"point-geometry\"),ArrayGroup=require(\"../array_group\"),BufferGroup=require(\"../buffer_group\"),createVertexArrayType=require(\"../vertex_array_type\"),createElementArrayType=require(\"../element_array_type\"),EXTENT=require(\"../extent\"),Anchor=require(\"../../symbol/anchor\"),getAnchors=require(\"../../symbol/get_anchors\"),resolveTokens=require(\"../../util/token\"),Quads=require(\"../../symbol/quads\"),Shaping=require(\"../../symbol/shaping\"),resolveText=require(\"../../symbol/resolve_text\"),mergeLines=require(\"../../symbol/mergelines\"),clipLine=require(\"../../symbol/clip_line\"),util=require(\"../../util/util\"),scriptDetection=require(\"../../util/script_detection\"),loadGeometry=require(\"../load_geometry\"),CollisionFeature=require(\"../../symbol/collision_feature\"),findPoleOfInaccessibility=require(\"../../util/find_pole_of_inaccessibility\"),classifyRings=require(\"../../util/classify_rings\"),VectorTileFeature=require(\"vector-tile\").VectorTileFeature,rtlTextPlugin=require(\"../../source/rtl_text_plugin\"),shapeText=Shaping.shapeText,shapeIcon=Shaping.shapeIcon,WritingMode=Shaping.WritingMode,getGlyphQuads=Quads.getGlyphQuads,getIconQuads=Quads.getIconQuads,elementArrayType=createElementArrayType(),layoutVertexArrayType=createVertexArrayType([{name:\"a_pos_offset\",components:4,type:\"Int16\"},{name:\"a_texture_pos\",components:2,type:\"Uint16\"},{name:\"a_data\",components:4,type:\"Uint8\"}]),symbolInterfaces={glyph:{layoutVertexArrayType:layoutVertexArrayType,elementArrayType:elementArrayType,paintAttributes:[{name:\"a_fill_color\",property:\"text-color\",type:\"Uint8\"},{name:\"a_halo_color\",property:\"text-halo-color\",type:\"Uint8\"},{name:\"a_halo_width\",property:\"text-halo-width\",type:\"Uint16\",multiplier:10},{name:\"a_halo_blur\",property:\"text-halo-blur\",type:\"Uint16\",multiplier:10},{name:\"a_opacity\",property:\"text-opacity\",type:\"Uint8\",multiplier:255}]},icon:{layoutVertexArrayType:layoutVertexArrayType,elementArrayType:elementArrayType,paintAttributes:[{name:\"a_fill_color\",property:\"icon-color\",type:\"Uint8\"},{name:\"a_halo_color\",property:\"icon-halo-color\",type:\"Uint8\"},{name:\"a_halo_width\",property:\"icon-halo-width\",type:\"Uint16\",multiplier:10},{name:\"a_halo_blur\",property:\"icon-halo-blur\",type:\"Uint16\",multiplier:10},{name:\"a_opacity\",property:\"icon-opacity\",type:\"Uint8\",multiplier:255}]},collisionBox:{layoutVertexArrayType:createVertexArrayType([{name:\"a_pos\",components:2,type:\"Int16\"},{name:\"a_extrude\",components:2,type:\"Int16\"},{name:\"a_data\",components:2,type:\"Uint8\"}]),elementArrayType:createElementArrayType(2)}},SymbolBucket=function(e){var t=this;if(this.collisionBoxArray=e.collisionBoxArray,this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.index=e.index,this.sdfIcons=e.sdfIcons,this.iconsNeedLinear=e.iconsNeedLinear,this.adjustedTextSize=e.adjustedTextSize,this.adjustedIconSize=e.adjustedIconSize,this.fontstack=e.fontstack,e.arrays){this.buffers={};for(var o in e.arrays)e.arrays[o]&&(t.buffers[o]=new BufferGroup(symbolInterfaces[o],e.layers,e.zoom,e.arrays[o]))}};SymbolBucket.prototype.populate=function(e,t){var o=this,r=this.layers[0],a=r.layout,i=a[\"text-font\"],n=a[\"icon-image\"],l=i&&(!r.isLayoutValueFeatureConstant(\"text-field\")||a[\"text-field\"]),s=n;if(this.features=[],l||s){for(var c=t.iconDependencies,y=t.glyphDependencies,p=y[i]=y[i]||{},x=0;xEXTENT||i.y<0||i.y>EXTENT);if(!x||n){var l=n||f;r.addSymbolInstance(i,a,t,o,r.layers[0],l,r.collisionBoxArray,e.index,e.sourceLayerIndex,r.index,s,h,m,y,u,g,{zoom:r.zoom},e.properties)}};if(\"line\"===b)for(var S=0,T=clipLine(e.geometry,0,0,EXTENT,EXTENT);S=0;i--)if(o.dist(a[i])7*Math.PI/4)continue}else if(r&&a&&d<=3*Math.PI/4||d>5*Math.PI/4)continue}else if(r&&a&&(d<=Math.PI/2||d>3*Math.PI/2))continue;var m=u.tl,g=u.tr,f=u.bl,b=u.br,v=u.tex,I=u.anchorPoint,S=Math.max(y+Math.log(u.minScale)/Math.LN2,p),T=Math.min(y+Math.log(u.maxScale)/Math.LN2,25);if(!(T<=S)){S===p&&(S=0);var M=Math.round(u.glyphAngle/(2*Math.PI)*256),B=e.prepareSegment(4),A=B.vertexLength;addVertex(c,I.x,I.y,m.x,m.y,v.x,v.y,S,T,p,M),addVertex(c,I.x,I.y,g.x,g.y,v.x+v.w,v.y,S,T,p,M),addVertex(c,I.x,I.y,f.x,f.y,v.x,v.y+v.h,S,T,p,M),addVertex(c,I.x,I.y,b.x,b.y,v.x+v.w,v.y+v.h,S,T,p,M),s.emplaceBack(A,A+1,A+2),s.emplaceBack(A+1,A+2,A+3),B.vertexLength+=4,B.primitiveLength+=2}}e.populatePaintArrays(n)},SymbolBucket.prototype.addToDebugBuffers=function(e){for(var t=this,o=this.arrays.collisionBox,r=o.layoutVertexArray,a=o.elementArray,i=-e.angle,n=e.yStretch,l=0,s=t.symbolInstances;lSymbolBucket.MAX_INSTANCES&&util.warnOnce(\"Too many symbols being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907\"),z>SymbolBucket.MAX_INSTANCES&&util.warnOnce(\"Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907\");var _=(o[WritingMode.vertical]?WritingMode.vertical:0)|(o[WritingMode.horizontal]?WritingMode.horizontal:0);this.symbolInstances.push({textBoxStartIndex:M,textBoxEndIndex:B,iconBoxStartIndex:A,iconBoxEndIndex:z,glyphQuads:I,iconQuads:v,anchor:e,featureIndex:l,featureProperties:g,writingModes:_})},SymbolBucket.programInterfaces=symbolInterfaces,SymbolBucket.MAX_INSTANCES=65535,module.exports=SymbolBucket;\n},{\"../../source/rtl_text_plugin\":90,\"../../symbol/anchor\":157,\"../../symbol/clip_line\":159,\"../../symbol/collision_feature\":161,\"../../symbol/get_anchors\":163,\"../../symbol/mergelines\":166,\"../../symbol/quads\":167,\"../../symbol/resolve_text\":168,\"../../symbol/shaping\":169,\"../../util/classify_rings\":195,\"../../util/find_pole_of_inaccessibility\":201,\"../../util/script_detection\":209,\"../../util/token\":211,\"../../util/util\":212,\"../array_group\":44,\"../buffer_group\":52,\"../element_array_type\":53,\"../extent\":54,\"../load_geometry\":56,\"../vertex_array_type\":60,\"point-geometry\":26,\"vector-tile\":34}],51:[function(require,module,exports){\n\"use strict\";var AttributeType={Int8:\"BYTE\",Uint8:\"UNSIGNED_BYTE\",Int16:\"SHORT\",Uint16:\"UNSIGNED_SHORT\"},Buffer=function(e,t,r){this.arrayBuffer=e.arrayBuffer,this.length=e.length,this.attributes=t.members,this.itemSize=t.bytesPerElement,this.type=r,this.arrayType=t};Buffer.fromStructArray=function(e,t){return new Buffer(e.serialize(),e.constructor.serialize(),t)},Buffer.prototype.bind=function(e){var t=e[this.type];this.buffer?e.bindBuffer(t,this.buffer):(this.gl=e,this.buffer=e.createBuffer(),e.bindBuffer(t,this.buffer),e.bufferData(t,this.arrayBuffer,e.STATIC_DRAW),this.arrayBuffer=null)},Buffer.prototype.setVertexAttribPointers=function(e,t,r){for(var f=this,i=0;i0?t+2*e:e}function translate(e,t,r,i,a){if(!t[0]&&!t[1])return e;t=Point.convert(t),\"viewport\"===r&&t._rotate(-i);for(var n=[],s=0;sr.max||d.yr.max)&&util.warnOnce(\"Geometry exceeds allowed extent, reduce your vector tile buffer size\")}return u};\n},{\"../util/util\":212,\"./extent\":54}],57:[function(require,module,exports){\n\"use strict\";var createStructArrayType=require(\"../util/struct_array\"),PosArray=createStructArrayType({members:[{name:\"a_pos\",type:\"Int16\",components:2}]});module.exports=PosArray;\n},{\"../util/struct_array\":210}],58:[function(require,module,exports){\n\"use strict\";function getPaintAttributeValue(t,r,e,i){if(!t.zoomStops)return r.getPaintValue(t.property,e,i);var a=t.zoomStops.map(function(a){return r.getPaintValue(t.property,util.extend({},e,{zoom:a}),i)});return 1===a.length?a[0]:a}function normalizePaintAttribute(t,r){var e=t.name;e||(e=t.property.replace(r.type+\"-\",\"\").replace(/-/g,\"_\"));var i=\"color\"===r._paintSpecifications[t.property].type;return util.extend({name:\"a_\"+e,components:i?4:1,multiplier:i?255:1,dimensions:i?4:1},t)}var createVertexArrayType=require(\"./vertex_array_type\"),util=require(\"../util/util\"),ProgramConfiguration=function(){this.attributes=[],this.uniforms=[],this.interpolationUniforms=[],this.pragmas={vertex:{},fragment:{}},this.cacheKey=\"\"};ProgramConfiguration.createDynamic=function(t,r,e){for(var i=new ProgramConfiguration,a=0,n=t;a90||this.lat<-90)throw new Error(\"Invalid LngLat latitude value: must be between -90 and 90\")};LngLat.prototype.wrap=function(){return new LngLat(wrap(this.lng,-180,180),this.lat)},LngLat.prototype.toArray=function(){return[this.lng,this.lat]},LngLat.prototype.toString=function(){return\"LngLat(\"+this.lng+\", \"+this.lat+\")\"},LngLat.convert=function(t){if(t instanceof LngLat)return t;if(t&&t.hasOwnProperty(\"lng\")&&t.hasOwnProperty(\"lat\"))return new LngLat(t.lng,t.lat);if(Array.isArray(t)&&2===t.length)return new LngLat(t[0],t[1]);throw new Error(\"`LngLatLike` argument must be specified as a LngLat instance, an object {lng: , lat: }, or an array of [, ]\")},module.exports=LngLat;\n},{\"../util/util\":212}],63:[function(require,module,exports){\n\"use strict\";var LngLat=require(\"./lng_lat\"),LngLatBounds=function(t,n){t&&(n?this.setSouthWest(t).setNorthEast(n):4===t.length?this.setSouthWest([t[0],t[1]]).setNorthEast([t[2],t[3]]):this.setSouthWest(t[0]).setNorthEast(t[1]))};LngLatBounds.prototype.setNorthEast=function(t){return this._ne=LngLat.convert(t),this},LngLatBounds.prototype.setSouthWest=function(t){return this._sw=LngLat.convert(t),this},LngLatBounds.prototype.extend=function(t){var n,e,s=this._sw,o=this._ne;if(t instanceof LngLat)n=t,e=t;else{if(!(t instanceof LngLatBounds))return Array.isArray(t)?t.every(Array.isArray)?this.extend(LngLatBounds.convert(t)):this.extend(LngLat.convert(t)):this;if(n=t._sw,e=t._ne,!n||!e)return this}return s||o?(s.lng=Math.min(n.lng,s.lng),s.lat=Math.min(n.lat,s.lat),o.lng=Math.max(e.lng,o.lng),o.lat=Math.max(e.lat,o.lat)):(this._sw=new LngLat(n.lng,n.lat),this._ne=new LngLat(e.lng,e.lat)),this},LngLatBounds.prototype.getCenter=function(){return new LngLat((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},LngLatBounds.prototype.getSouthWest=function(){return this._sw},LngLatBounds.prototype.getNorthEast=function(){return this._ne},LngLatBounds.prototype.getNorthWest=function(){return new LngLat(this.getWest(),this.getNorth())},LngLatBounds.prototype.getSouthEast=function(){return new LngLat(this.getEast(),this.getSouth())},LngLatBounds.prototype.getWest=function(){return this._sw.lng},LngLatBounds.prototype.getSouth=function(){return this._sw.lat},LngLatBounds.prototype.getEast=function(){return this._ne.lng},LngLatBounds.prototype.getNorth=function(){return this._ne.lat},LngLatBounds.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},LngLatBounds.prototype.toString=function(){return\"LngLatBounds(\"+this._sw.toString()+\", \"+this._ne.toString()+\")\"},LngLatBounds.convert=function(t){return!t||t instanceof LngLatBounds?t:new LngLatBounds(t)},module.exports=LngLatBounds;\n},{\"./lng_lat\":62}],64:[function(require,module,exports){\n\"use strict\";var LngLat=require(\"./lng_lat\"),Point=require(\"point-geometry\"),Coordinate=require(\"./coordinate\"),util=require(\"../util/util\"),interp=require(\"../util/interpolate\"),TileCoord=require(\"../source/tile_coord\"),EXTENT=require(\"../data/extent\"),glmatrix=require(\"@mapbox/gl-matrix\"),vec4=glmatrix.vec4,mat4=glmatrix.mat4,mat2=glmatrix.mat2,Transform=function(t,i,o){this.tileSize=512,this._renderWorldCopies=void 0===o||o,this._minZoom=t||0,this._maxZoom=i||22,this.latRange=[-85.05113,85.05113],this.width=0,this.height=0,this._center=new LngLat(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0},prototypeAccessors={minZoom:{},maxZoom:{},worldSize:{},centerPoint:{},size:{},bearing:{},pitch:{},fov:{},zoom:{},center:{},unmodified:{},x:{},y:{},point:{}};prototypeAccessors.minZoom.get=function(){return this._minZoom},prototypeAccessors.minZoom.set=function(t){this._minZoom!==t&&(this._minZoom=t,this.zoom=Math.max(this.zoom,t))},prototypeAccessors.maxZoom.get=function(){return this._maxZoom},prototypeAccessors.maxZoom.set=function(t){this._maxZoom!==t&&(this._maxZoom=t,this.zoom=Math.min(this.zoom,t))},prototypeAccessors.worldSize.get=function(){return this.tileSize*this.scale},prototypeAccessors.centerPoint.get=function(){return this.size._div(2)},prototypeAccessors.size.get=function(){return new Point(this.width,this.height)},prototypeAccessors.bearing.get=function(){return-this.angle/Math.PI*180},prototypeAccessors.bearing.set=function(t){var i=-util.wrap(t,-180,180)*Math.PI/180;this.angle!==i&&(this._unmodified=!1,this.angle=i,this._calcMatrices(),this.rotationMatrix=mat2.create(),mat2.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},prototypeAccessors.pitch.get=function(){return this._pitch/Math.PI*180},prototypeAccessors.pitch.set=function(t){var i=util.clamp(t,0,60)/180*Math.PI;this._pitch!==i&&(this._unmodified=!1,this._pitch=i,this._calcMatrices())},prototypeAccessors.fov.get=function(){return this._fov/Math.PI*180},prototypeAccessors.fov.set=function(t){t=Math.max(.01,Math.min(60,t)),this._fov!==t&&(this._unmodified=!1,this._fov=t/180*Math.PI,this._calcMatrices())},prototypeAccessors.zoom.get=function(){return this._zoom},prototypeAccessors.zoom.set=function(t){var i=Math.min(Math.max(t,this.minZoom),this.maxZoom);this._zoom!==i&&(this._unmodified=!1,this._zoom=i,this.scale=this.zoomScale(i),this.tileZoom=Math.floor(i),this.zoomFraction=i-this.tileZoom,this._constrain(),this._calcMatrices())},prototypeAccessors.center.get=function(){return this._center},prototypeAccessors.center.set=function(t){t.lat===this._center.lat&&t.lng===this._center.lng||(this._unmodified=!1,this._center=t,this._constrain(),this._calcMatrices())},Transform.prototype.coveringZoomLevel=function(t){return(t.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/t.tileSize))},Transform.prototype.coveringTiles=function(t){var i=this.coveringZoomLevel(t),o=i;if(it.maxzoom&&(i=t.maxzoom);var e=this.pointCoordinate(this.centerPoint,i),r=new Point(e.column-.5,e.row-.5),n=[this.pointCoordinate(new Point(0,0),i),this.pointCoordinate(new Point(this.width,0),i),this.pointCoordinate(new Point(this.width,this.height),i),this.pointCoordinate(new Point(0,this.height),i)];return TileCoord.cover(i,n,t.reparseOverscaled?o:i,this._renderWorldCopies).sort(function(t,i){return r.dist(t)-r.dist(i)})},Transform.prototype.resize=function(t,i){this.width=t,this.height=i,this.pixelsToGLUnits=[2/t,-2/i],this._constrain(),this._calcMatrices()},prototypeAccessors.unmodified.get=function(){return this._unmodified},Transform.prototype.zoomScale=function(t){return Math.pow(2,t)},Transform.prototype.scaleZoom=function(t){return Math.log(t)/Math.LN2},Transform.prototype.project=function(t){return new Point(this.lngX(t.lng),this.latY(t.lat))},Transform.prototype.unproject=function(t){return new LngLat(this.xLng(t.x),this.yLat(t.y))},prototypeAccessors.x.get=function(){return this.lngX(this.center.lng)},prototypeAccessors.y.get=function(){return this.latY(this.center.lat)},prototypeAccessors.point.get=function(){return new Point(this.x,this.y)},Transform.prototype.lngX=function(t){return(180+t)*this.worldSize/360},Transform.prototype.latY=function(t){var i=180/Math.PI*Math.log(Math.tan(Math.PI/4+t*Math.PI/360));return(180-i)*this.worldSize/360},Transform.prototype.xLng=function(t){return 360*t/this.worldSize-180},Transform.prototype.yLat=function(t){var i=180-360*t/this.worldSize;return 360/Math.PI*Math.atan(Math.exp(i*Math.PI/180))-90},Transform.prototype.setLocationAtPoint=function(t,i){var o=this.pointCoordinate(i)._sub(this.pointCoordinate(this.centerPoint));this.center=this.coordinateLocation(this.locationCoordinate(t)._sub(o))},Transform.prototype.locationPoint=function(t){return this.coordinatePoint(this.locationCoordinate(t))},Transform.prototype.pointLocation=function(t){return this.coordinateLocation(this.pointCoordinate(t))},Transform.prototype.locationCoordinate=function(t){return new Coordinate(this.lngX(t.lng)/this.tileSize,this.latY(t.lat)/this.tileSize,this.zoom).zoomTo(this.tileZoom)},Transform.prototype.coordinateLocation=function(t){var i=t.zoomTo(this.zoom);return new LngLat(this.xLng(i.column*this.tileSize),this.yLat(i.row*this.tileSize))},Transform.prototype.pointCoordinate=function(t,i){void 0===i&&(i=this.tileZoom);var o=0,e=[t.x,t.y,0,1],r=[t.x,t.y,1,1];vec4.transformMat4(e,e,this.pixelMatrixInverse),vec4.transformMat4(r,r,this.pixelMatrixInverse);var n=e[3],s=r[3],a=e[0]/n,h=r[0]/s,c=e[1]/n,m=r[1]/s,p=e[2]/n,l=r[2]/s,u=p===l?0:(o-p)/(l-p);return new Coordinate(interp(a,h,u)/this.tileSize,interp(c,m,u)/this.tileSize,this.zoom)._zoomTo(i)},Transform.prototype.coordinatePoint=function(t){var i=t.zoomTo(this.zoom),o=[i.column*this.tileSize,i.row*this.tileSize,0,1];return vec4.transformMat4(o,o,this.pixelMatrix),new Point(o[0]/o[3],o[1]/o[3])},Transform.prototype.calculatePosMatrix=function(t,i){var o=t.toCoordinate(i),e=this.worldSize/this.zoomScale(o.zoom),r=mat4.identity(new Float64Array(16));return mat4.translate(r,r,[o.column*e,o.row*e,0]),mat4.scale(r,r,[e/EXTENT,e/EXTENT,1]),mat4.multiply(r,this.projMatrix,r),new Float32Array(r)},Transform.prototype._constrain=function(){if(this.center&&this.width&&this.height&&!this._constraining){this._constraining=!0;var t,i,o,e,r,n,s,a,h=this.size,c=this._unmodified;this.latRange&&(t=this.latY(this.latRange[1]),i=this.latY(this.latRange[0]),r=i-ti&&(a=i-l)}if(this.lngRange){var u=this.x,f=h.x/2;u-fe&&(s=e-f)}void 0===s&&void 0===a||(this.center=this.unproject(new Point(void 0!==s?s:this.x,void 0!==a?a:this.y))),this._unmodified=c,this._constraining=!1}},Transform.prototype._calcMatrices=function(){if(this.height){this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height;var t=this._fov/2,i=Math.PI/2+this._pitch,o=Math.sin(t)*this.cameraToCenterDistance/Math.sin(Math.PI-i-t),e=Math.cos(Math.PI/2-this._pitch)*o+this.cameraToCenterDistance,r=1.01*e,n=new Float64Array(16);mat4.perspective(n,this._fov,this.width/this.height,1,r),mat4.scale(n,n,[1,-1,1]),mat4.translate(n,n,[0,0,-this.cameraToCenterDistance]),mat4.rotateX(n,n,this._pitch),mat4.rotateZ(n,n,this.angle),mat4.translate(n,n,[-this.x,-this.y,0]);var s=this.worldSize/(2*Math.PI*6378137*Math.abs(Math.cos(this.center.lat*(Math.PI/180))));if(mat4.scale(n,n,[1,1,s,1]),this.projMatrix=n,n=mat4.create(),mat4.scale(n,n,[this.width/2,-this.height/2,1]),mat4.translate(n,n,[1,-1,0]),this.pixelMatrix=mat4.multiply(new Float64Array(16),n,this.projMatrix),n=mat4.invert(new Float64Array(16),this.pixelMatrix),!n)throw new Error(\"failed to invert matrix\");this.pixelMatrixInverse=n}},Object.defineProperties(Transform.prototype,prototypeAccessors),module.exports=Transform;\n},{\"../data/extent\":54,\"../source/tile_coord\":94,\"../util/interpolate\":204,\"../util/util\":212,\"./coordinate\":61,\"./lng_lat\":62,\"@mapbox/gl-matrix\":1,\"point-geometry\":26}],65:[function(require,module,exports){\n\"use strict\";var browser=require(\"./util/browser\"),mapboxgl=module.exports={};mapboxgl.version=require(\"../package.json\").version,mapboxgl.workerCount=Math.max(Math.floor(browser.hardwareConcurrency/2),1),mapboxgl.Map=require(\"./ui/map\"),mapboxgl.NavigationControl=require(\"./ui/control/navigation_control\"),mapboxgl.GeolocateControl=require(\"./ui/control/geolocate_control\"),mapboxgl.AttributionControl=require(\"./ui/control/attribution_control\"),mapboxgl.ScaleControl=require(\"./ui/control/scale_control\"),mapboxgl.FullscreenControl=require(\"./ui/control/fullscreen_control\"),mapboxgl.Popup=require(\"./ui/popup\"),mapboxgl.Marker=require(\"./ui/marker\"),mapboxgl.Style=require(\"./style/style\"),mapboxgl.LngLat=require(\"./geo/lng_lat\"),mapboxgl.LngLatBounds=require(\"./geo/lng_lat_bounds\"),mapboxgl.Point=require(\"point-geometry\"),mapboxgl.Evented=require(\"./util/evented\"),mapboxgl.supported=require(\"./util/browser\").supported;var config=require(\"./util/config\");mapboxgl.config=config;var rtlTextPlugin=require(\"./source/rtl_text_plugin\");mapboxgl.setRTLTextPlugin=rtlTextPlugin.setRTLTextPlugin,Object.defineProperty(mapboxgl,\"accessToken\",{get:function(){return config.ACCESS_TOKEN},set:function(o){config.ACCESS_TOKEN=o}});\n},{\"../package.json\":43,\"./geo/lng_lat\":62,\"./geo/lng_lat_bounds\":63,\"./source/rtl_text_plugin\":90,\"./style/style\":146,\"./ui/control/attribution_control\":173,\"./ui/control/fullscreen_control\":174,\"./ui/control/geolocate_control\":175,\"./ui/control/navigation_control\":177,\"./ui/control/scale_control\":178,\"./ui/map\":187,\"./ui/marker\":188,\"./ui/popup\":189,\"./util/browser\":192,\"./util/config\":196,\"./util/evented\":200,\"point-geometry\":26}],66:[function(require,module,exports){\n\"use strict\";function drawBackground(r,t,e){var a=r.gl,i=r.transform,n=i.tileSize,o=e.paint[\"background-color\"],l=e.paint[\"background-pattern\"],u=e.paint[\"background-opacity\"],f=!l&&1===o[3]&&1===u;if(r.isOpaquePass===f){a.disable(a.STENCIL_TEST),r.setDepthSublayer(0);var s;l?(s=r.useProgram(\"fillPattern\",r.basicFillProgramConfiguration),pattern.prepare(l,r,s),r.tileExtentPatternVAO.bind(a,s,r.tileExtentBuffer)):(s=r.useProgram(\"fill\",r.basicFillProgramConfiguration),a.uniform4fv(s.u_color,o),r.tileExtentVAO.bind(a,s,r.tileExtentBuffer)),a.uniform1f(s.u_opacity,u);for(var c=i.coveringTiles({tileSize:n}),g=0,p=c;g\":[24,[4,18,20,9,4,0]],\"?\":[18,[3,16,3,17,4,19,5,20,7,21,11,21,13,20,14,19,15,17,15,15,14,13,13,12,9,10,9,7,-1,-1,9,2,8,1,9,0,10,1,9,2]],\"@\":[27,[18,13,17,15,15,16,12,16,10,15,9,14,8,11,8,8,9,6,11,5,14,5,16,6,17,8,-1,-1,12,16,10,14,9,11,9,8,10,6,11,5,-1,-1,18,16,17,8,17,6,19,5,21,5,23,7,24,10,24,12,23,15,22,17,20,19,18,20,15,21,12,21,9,20,7,19,5,17,4,15,3,12,3,9,4,6,5,4,7,2,9,1,12,0,15,0,18,1,20,2,21,3,-1,-1,19,16,18,8,18,6,19,5]],A:[18,[9,21,1,0,-1,-1,9,21,17,0,-1,-1,4,7,14,7]],B:[21,[4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,15,17,13,16,12,13,11,-1,-1,4,11,13,11,16,10,17,9,18,7,18,4,17,2,16,1,13,0,4,0]],C:[21,[18,16,17,18,15,20,13,21,9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5]],D:[21,[4,21,4,0,-1,-1,4,21,11,21,14,20,16,18,17,16,18,13,18,8,17,5,16,3,14,1,11,0,4,0]],E:[19,[4,21,4,0,-1,-1,4,21,17,21,-1,-1,4,11,12,11,-1,-1,4,0,17,0]],F:[18,[4,21,4,0,-1,-1,4,21,17,21,-1,-1,4,11,12,11]],G:[21,[18,16,17,18,15,20,13,21,9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,18,8,-1,-1,13,8,18,8]],H:[22,[4,21,4,0,-1,-1,18,21,18,0,-1,-1,4,11,18,11]],I:[8,[4,21,4,0]],J:[16,[12,21,12,5,11,2,10,1,8,0,6,0,4,1,3,2,2,5,2,7]],K:[21,[4,21,4,0,-1,-1,18,21,4,7,-1,-1,9,12,18,0]],L:[17,[4,21,4,0,-1,-1,4,0,16,0]],M:[24,[4,21,4,0,-1,-1,4,21,12,0,-1,-1,20,21,12,0,-1,-1,20,21,20,0]],N:[22,[4,21,4,0,-1,-1,4,21,18,0,-1,-1,18,21,18,0]],O:[22,[9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,19,8,19,13,18,16,17,18,15,20,13,21,9,21]],P:[21,[4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,14,17,12,16,11,13,10,4,10]],Q:[22,[9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,19,8,19,13,18,16,17,18,15,20,13,21,9,21,-1,-1,12,4,18,-2]],R:[21,[4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,15,17,13,16,12,13,11,4,11,-1,-1,11,11,18,0]],S:[20,[17,18,15,20,12,21,8,21,5,20,3,18,3,16,4,14,5,13,7,12,13,10,15,9,16,8,17,6,17,3,15,1,12,0,8,0,5,1,3,3]],T:[16,[8,21,8,0,-1,-1,1,21,15,21]],U:[22,[4,21,4,6,5,3,7,1,10,0,12,0,15,1,17,3,18,6,18,21]],V:[18,[1,21,9,0,-1,-1,17,21,9,0]],W:[24,[2,21,7,0,-1,-1,12,21,7,0,-1,-1,12,21,17,0,-1,-1,22,21,17,0]],X:[20,[3,21,17,0,-1,-1,17,21,3,0]],Y:[18,[1,21,9,11,9,0,-1,-1,17,21,9,11]],Z:[20,[17,21,3,0,-1,-1,3,21,17,21,-1,-1,3,0,17,0]],\"[\":[14,[4,25,4,-7,-1,-1,5,25,5,-7,-1,-1,4,25,11,25,-1,-1,4,-7,11,-7]],\"\\\\\":[14,[0,21,14,-3]],\"]\":[14,[9,25,9,-7,-1,-1,10,25,10,-7,-1,-1,3,25,10,25,-1,-1,3,-7,10,-7]],\"^\":[16,[6,15,8,18,10,15,-1,-1,3,12,8,17,13,12,-1,-1,8,17,8,0]],_:[16,[0,-2,16,-2]],\"`\":[10,[6,21,5,20,4,18,4,16,5,15,6,16,5,17]],a:[19,[15,14,15,0,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],b:[19,[4,21,4,0,-1,-1,4,11,6,13,8,14,11,14,13,13,15,11,16,8,16,6,15,3,13,1,11,0,8,0,6,1,4,3]],c:[18,[15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],d:[19,[15,21,15,0,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],e:[18,[3,8,15,8,15,10,14,12,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],f:[12,[10,21,8,21,6,20,5,17,5,0,-1,-1,2,14,9,14]],g:[19,[15,14,15,-2,14,-5,13,-6,11,-7,8,-7,6,-6,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],h:[19,[4,21,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0]],i:[8,[3,21,4,20,5,21,4,22,3,21,-1,-1,4,14,4,0]],j:[10,[5,21,6,20,7,21,6,22,5,21,-1,-1,6,14,6,-3,5,-6,3,-7,1,-7]],k:[17,[4,21,4,0,-1,-1,14,14,4,4,-1,-1,8,8,15,0]],l:[8,[4,21,4,0]],m:[30,[4,14,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0,-1,-1,15,10,18,13,20,14,23,14,25,13,26,10,26,0]],n:[19,[4,14,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0]],o:[19,[8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3,16,6,16,8,15,11,13,13,11,14,8,14]],p:[19,[4,14,4,-7,-1,-1,4,11,6,13,8,14,11,14,13,13,15,11,16,8,16,6,15,3,13,1,11,0,8,0,6,1,4,3]],q:[19,[15,14,15,-7,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],r:[13,[4,14,4,0,-1,-1,4,8,5,11,7,13,9,14,12,14]],s:[17,[14,11,13,13,10,14,7,14,4,13,3,11,4,9,6,8,11,7,13,6,14,4,14,3,13,1,10,0,7,0,4,1,3,3]],t:[12,[5,21,5,4,6,1,8,0,10,0,-1,-1,2,14,9,14]],u:[19,[4,14,4,4,5,1,7,0,10,0,12,1,15,4,-1,-1,15,14,15,0]],v:[16,[2,14,8,0,-1,-1,14,14,8,0]],w:[22,[3,14,7,0,-1,-1,11,14,7,0,-1,-1,11,14,15,0,-1,-1,19,14,15,0]],x:[17,[3,14,14,0,-1,-1,14,14,3,0]],y:[16,[2,14,8,0,-1,-1,14,14,8,0,6,-4,4,-6,2,-7,1,-7]],z:[17,[14,14,3,0,-1,-1,3,14,14,14,-1,-1,3,0,14,0]],\"{\":[14,[9,25,7,24,6,23,5,21,5,19,6,17,7,16,8,14,8,12,6,10,-1,-1,7,24,6,22,6,20,7,18,8,17,9,15,9,13,8,11,4,9,8,7,9,5,9,3,8,1,7,0,6,-2,6,-4,7,-6,-1,-1,6,8,8,6,8,4,7,2,6,1,5,-1,5,-3,6,-5,7,-6,9,-7]],\"|\":[8,[4,25,4,-7]],\"}\":[14,[5,25,7,24,8,23,9,21,9,19,8,17,7,16,6,14,6,12,8,10,-1,-1,7,24,8,22,8,20,7,18,6,17,5,15,5,13,6,11,10,9,6,7,5,5,5,3,6,1,7,0,8,-2,8,-4,7,-6,-1,-1,8,8,6,6,6,4,7,2,8,1,9,-1,9,-3,8,-5,7,-6,5,-7]],\"~\":[24,[3,6,3,8,4,11,6,12,8,12,10,11,14,8,16,7,18,7,20,8,21,10,-1,-1,3,8,4,10,6,11,8,11,10,10,14,7,16,6,18,6,20,7,21,10,21,12]]};\n},{\"../data/buffer\":51,\"../data/extent\":54,\"../data/pos_array\":57,\"../util/browser\":192,\"./vertex_array_object\":80,\"@mapbox/gl-matrix\":1}],70:[function(require,module,exports){\n\"use strict\";function drawFill(t,e,r,i){var a=t.gl;a.enable(a.STENCIL_TEST);var l=!r.paint[\"fill-pattern\"]&&r.isPaintValueFeatureConstant(\"fill-color\")&&r.isPaintValueFeatureConstant(\"fill-opacity\")&&1===r.paint[\"fill-color\"][3]&&1===r.paint[\"fill-opacity\"];t.isOpaquePass===l&&(t.setDepthSublayer(1),drawFillTiles(t,e,r,i,drawFillTile)),!t.isOpaquePass&&r.paint[\"fill-antialias\"]&&(t.lineWidth(2),t.depthMask(!1),t.setDepthSublayer(r.getPaintProperty(\"fill-outline-color\")?2:0),drawFillTiles(t,e,r,i,drawStrokeTile))}function drawFillTiles(t,e,r,i,a){for(var l=!0,n=0,o=i;n0?1/(1-r):1+r}function saturationFactor(r){return r>0?1-1/(1.001-r):-r}function getFadeValues(r,t,e,a){var i=e.paint[\"raster-fade-duration\"];if(r.sourceCache&&i>0){var o=Date.now(),n=(o-r.timeAdded)/i,u=t?(o-t.timeAdded)/i:-1,s=r.sourceCache.getSource(),c=a.coveringZoomLevel({tileSize:s.tileSize,roundZoom:s.roundZoom}),f=!t||Math.abs(t.coord.z-c)>Math.abs(r.coord.z-c),d=f&&r.refreshedUponExpiration?1:util.clamp(f?n:1-u,0,1);return r.refreshedUponExpiration&&n>=1&&(r.refreshedUponExpiration=!1),t?{opacity:1,mix:1-d}:{opacity:d,mix:0}}return{opacity:1,mix:0}}var util=require(\"../util/util\");module.exports=drawRaster;\n},{\"../util/util\":212}],74:[function(require,module,exports){\n\"use strict\";function drawSymbols(e,t,a,i){if(!e.isOpaquePass){var o=!(a.layout[\"text-allow-overlap\"]||a.layout[\"icon-allow-overlap\"]||a.layout[\"text-ignore-placement\"]||a.layout[\"icon-ignore-placement\"]),r=e.gl;o?r.disable(r.STENCIL_TEST):r.enable(r.STENCIL_TEST),e.setDepthSublayer(0),e.depthMask(!1),drawLayerSymbols(e,t,a,i,!1,a.paint[\"icon-translate\"],a.paint[\"icon-translate-anchor\"],a.layout[\"icon-rotation-alignment\"],a.layout[\"icon-rotation-alignment\"],a.layout[\"icon-size\"]),drawLayerSymbols(e,t,a,i,!0,a.paint[\"text-translate\"],a.paint[\"text-translate-anchor\"],a.layout[\"text-rotation-alignment\"],a.layout[\"text-pitch-alignment\"],a.layout[\"text-size\"]),t.map.showCollisionBoxes&&drawCollisionDebug(e,t,a,i)}}function drawLayerSymbols(e,t,a,i,o,r,n,l,s,u){if(o||!e.style.sprite||e.style.sprite.loaded()){var f=e.gl,m=\"map\"===l,p=\"map\"===s,c=p;c?f.enable(f.DEPTH_TEST):f.disable(f.DEPTH_TEST);for(var d,_,h=0,g=i;hthis.previousZoom;a--)r.changeTimes[a]=e,r.changeOpacities[a]=r.opacities[a];for(a=0;a<256;a++){var s=e-r.changeTimes[a],o=255*(i?s/i:1);a<=t?r.opacities[a]=r.changeOpacities[a]+o:r.opacities[a]=r.changeOpacities[a]-o}this.changed=!0,this.previousZoom=t},FrameHistory.prototype.bind=function(e){this.texture?(e.bindTexture(e.TEXTURE_2D,this.texture),this.changed&&(e.texSubImage2D(e.TEXTURE_2D,0,0,0,256,1,e.ALPHA,e.UNSIGNED_BYTE,this.array),this.changed=!1)):(this.texture=e.createTexture(),e.bindTexture(e.TEXTURE_2D,this.texture),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texImage2D(e.TEXTURE_2D,0,e.ALPHA,256,1,0,e.ALPHA,e.UNSIGNED_BYTE,this.array))},module.exports=FrameHistory;\n},{}],76:[function(require,module,exports){\n\"use strict\";var util=require(\"../util/util\"),LineAtlas=function(t,i){this.width=t,this.height=i,this.nextRow=0,this.bytes=4,this.data=new Uint8Array(this.width*this.height*this.bytes),this.positions={}};LineAtlas.prototype.setSprite=function(t){this.sprite=t},LineAtlas.prototype.getDash=function(t,i){var e=t.join(\",\")+i;return this.positions[e]||(this.positions[e]=this.addDash(t,i)),this.positions[e]},LineAtlas.prototype.addDash=function(t,i){var e=this,h=i?7:0,s=2*h+1,a=128;if(this.nextRow+s>this.height)return util.warnOnce(\"LineAtlas out of space\"),null;for(var r=0,n=0;n0?r.pop():null},Painter.prototype.getViewportTexture=function(e,r){var t=this.reusableTextures.viewport;if(t)return t.width===e&&t.height===r?t:(this.gl.deleteTexture(t),void(this.reusableTextures.viewport=null))},Painter.prototype.lineWidth=function(e){this.gl.lineWidth(util.clamp(e,this.lineWidthRange[0],this.lineWidthRange[1]))},Painter.prototype.showOverdrawInspector=function(e){if(e||this._showOverdrawInspector){this._showOverdrawInspector=e;var r=this.gl;if(e){r.blendFunc(r.CONSTANT_COLOR,r.ONE);var t=8,i=1/t;r.blendColor(i,i,i,0),r.clearColor(0,0,0,1),r.clear(r.COLOR_BUFFER_BIT)}else r.blendFunc(r.ONE,r.ONE_MINUS_SRC_ALPHA)}},Painter.prototype.createProgram=function(e,r){var t=this.gl,i=t.createProgram(),a=shaders[e],s=\"#define MAPBOX_GL_JS\\n#define DEVICE_PIXEL_RATIO \"+browser.devicePixelRatio.toFixed(1)+\"\\n\";this._showOverdrawInspector&&(s+=\"#define OVERDRAW_INSPECTOR;\\n\");var o=r.applyPragmas(s+shaders.prelude.fragmentSource+a.fragmentSource,\"fragment\"),n=r.applyPragmas(s+shaders.prelude.vertexSource+a.vertexSource,\"vertex\"),l=t.createShader(t.FRAGMENT_SHADER);t.shaderSource(l,o),t.compileShader(l),t.attachShader(i,l);var h=t.createShader(t.VERTEX_SHADER);t.shaderSource(h,n),t.compileShader(h),t.attachShader(i,h),t.linkProgram(i);for(var u=t.getProgramParameter(i,t.ACTIVE_ATTRIBUTES),c={program:i,numAttributes:u},p=0;p>16,n>>16),o.uniform2f(i.u_pixel_coord_lower,65535&u,65535&n)};\n},{\"../source/pixels_to_tile_units\":87}],79:[function(require,module,exports){\n\"use strict\";var path=require(\"path\");module.exports={prelude:{fragmentSource:\"#ifdef GL_ES\\nprecision mediump float;\\n#else\\n\\n#if !defined(lowp)\\n#define lowp\\n#endif\\n\\n#if !defined(mediump)\\n#define mediump\\n#endif\\n\\n#if !defined(highp)\\n#define highp\\n#endif\\n\\n#endif\\n\",vertexSource:\"#ifdef GL_ES\\nprecision highp float;\\n#else\\n\\n#if !defined(lowp)\\n#define lowp\\n#endif\\n\\n#if !defined(mediump)\\n#define mediump\\n#endif\\n\\n#if !defined(highp)\\n#define highp\\n#endif\\n\\n#endif\\n\\nfloat evaluate_zoom_function_1(const vec4 values, const float t) {\\n if (t < 1.0) {\\n return mix(values[0], values[1], t);\\n } else if (t < 2.0) {\\n return mix(values[1], values[2], t - 1.0);\\n } else {\\n return mix(values[2], values[3], t - 2.0);\\n }\\n}\\nvec4 evaluate_zoom_function_4(const vec4 value0, const vec4 value1, const vec4 value2, const vec4 value3, const float t) {\\n if (t < 1.0) {\\n return mix(value0, value1, t);\\n } else if (t < 2.0) {\\n return mix(value1, value2, t - 1.0);\\n } else {\\n return mix(value2, value3, t - 2.0);\\n }\\n}\\n\\n\\n// To minimize the number of attributes needed in the mapbox-gl-native shaders,\\n// we encode a 4-component color into a pair of floats (i.e. a vec2) as follows:\\n// [ floor(color.r * 255) * 256 + color.g * 255,\\n// floor(color.b * 255) * 256 + color.g * 255 ]\\nvec4 decode_color(const vec2 encodedColor) {\\n float r = floor(encodedColor[0]/256.0)/255.0;\\n float g = (encodedColor[0] - r*256.0*255.0)/255.0;\\n float b = floor(encodedColor[1]/256.0)/255.0;\\n float a = (encodedColor[1] - b*256.0*255.0)/255.0;\\n return vec4(r, g, b, a);\\n}\\n\\n// Unpack a pair of paint values and interpolate between them.\\nfloat unpack_mix_vec2(const vec2 packedValue, const float t) {\\n return mix(packedValue[0], packedValue[1], t);\\n}\\n\\n// Unpack a pair of paint values and interpolate between them.\\nvec4 unpack_mix_vec4(const vec4 packedColors, const float t) {\\n vec4 minColor = decode_color(vec2(packedColors[0], packedColors[1]));\\n vec4 maxColor = decode_color(vec2(packedColors[2], packedColors[3]));\\n return mix(minColor, maxColor, t);\\n}\\n\\n// The offset depends on how many pixels are between the world origin and the edge of the tile:\\n// vec2 offset = mod(pixel_coord, size)\\n//\\n// At high zoom levels there are a ton of pixels between the world origin and the edge of the tile.\\n// The glsl spec only guarantees 16 bits of precision for highp floats. We need more than that.\\n//\\n// The pixel_coord is passed in as two 16 bit values:\\n// pixel_coord_upper = floor(pixel_coord / 2^16)\\n// pixel_coord_lower = mod(pixel_coord, 2^16)\\n//\\n// The offset is calculated in a series of steps that should preserve this precision:\\nvec2 get_pattern_pos(const vec2 pixel_coord_upper, const vec2 pixel_coord_lower,\\n const vec2 pattern_size, const float tile_units_to_pixels, const vec2 pos) {\\n\\n vec2 offset = mod(mod(mod(pixel_coord_upper, pattern_size) * 256.0, pattern_size) * 256.0 + pixel_coord_lower, pattern_size);\\n return (tile_units_to_pixels * pos + offset) / pattern_size;\\n}\\n\"},circle:{fragmentSource:\"#pragma mapbox: define lowp vec4 color\\n#pragma mapbox: define mediump float radius\\n#pragma mapbox: define lowp float blur\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define lowp vec4 stroke_color\\n#pragma mapbox: define mediump float stroke_width\\n#pragma mapbox: define lowp float stroke_opacity\\n\\nvarying vec2 v_extrude;\\nvarying lowp float v_antialiasblur;\\n\\nvoid main() {\\n #pragma mapbox: initialize lowp vec4 color\\n #pragma mapbox: initialize mediump float radius\\n #pragma mapbox: initialize lowp float blur\\n #pragma mapbox: initialize lowp float opacity\\n #pragma mapbox: initialize lowp vec4 stroke_color\\n #pragma mapbox: initialize mediump float stroke_width\\n #pragma mapbox: initialize lowp float stroke_opacity\\n\\n float extrude_length = length(v_extrude);\\n float antialiased_blur = -max(blur, v_antialiasblur);\\n\\n float opacity_t = smoothstep(0.0, antialiased_blur, extrude_length - 1.0);\\n\\n float color_t = stroke_width < 0.01 ? 0.0 : smoothstep(\\n antialiased_blur,\\n 0.0,\\n extrude_length - radius / (radius + stroke_width)\\n );\\n\\n gl_FragColor = opacity_t * mix(color * opacity, stroke_color * stroke_opacity, color_t);\\n\\n#ifdef OVERDRAW_INSPECTOR\\n gl_FragColor = vec4(1.0);\\n#endif\\n}\\n\",vertexSource:\"uniform mat4 u_matrix;\\nuniform bool u_scale_with_map;\\nuniform vec2 u_extrude_scale;\\n\\nattribute vec2 a_pos;\\n\\n#pragma mapbox: define lowp vec4 color\\n#pragma mapbox: define mediump float radius\\n#pragma mapbox: define lowp float blur\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define lowp vec4 stroke_color\\n#pragma mapbox: define mediump float stroke_width\\n#pragma mapbox: define lowp float stroke_opacity\\n\\nvarying vec2 v_extrude;\\nvarying lowp float v_antialiasblur;\\n\\nvoid main(void) {\\n #pragma mapbox: initialize lowp vec4 color\\n #pragma mapbox: initialize mediump float radius\\n #pragma mapbox: initialize lowp float blur\\n #pragma mapbox: initialize lowp float opacity\\n #pragma mapbox: initialize lowp vec4 stroke_color\\n #pragma mapbox: initialize mediump float stroke_width\\n #pragma mapbox: initialize lowp float stroke_opacity\\n\\n // unencode the extrusion vector that we snuck into the a_pos vector\\n v_extrude = vec2(mod(a_pos, 2.0) * 2.0 - 1.0);\\n\\n vec2 extrude = v_extrude * (radius + stroke_width) * u_extrude_scale;\\n // multiply a_pos by 0.5, since we had it * 2 in order to sneak\\n // in extrusion data\\n gl_Position = u_matrix * vec4(floor(a_pos * 0.5), 0, 1);\\n\\n if (u_scale_with_map) {\\n gl_Position.xy += extrude;\\n } else {\\n gl_Position.xy += extrude * gl_Position.w;\\n }\\n\\n // This is a minimum blur distance that serves as a faux-antialiasing for\\n // the circle. since blur is a ratio of the circle's size and the intent is\\n // to keep the blur at roughly 1px, the two are inversely related.\\n v_antialiasblur = 1.0 / DEVICE_PIXEL_RATIO / (radius + stroke_width);\\n}\\n\"},collisionBox:{fragmentSource:\"uniform float u_zoom;\\nuniform float u_maxzoom;\\n\\nvarying float v_max_zoom;\\nvarying float v_placement_zoom;\\n\\nvoid main() {\\n\\n float alpha = 0.5;\\n\\n gl_FragColor = vec4(0.0, 1.0, 0.0, 1.0) * alpha;\\n\\n if (v_placement_zoom > u_zoom) {\\n gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0) * alpha;\\n }\\n\\n if (u_zoom >= v_max_zoom) {\\n gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0) * alpha * 0.25;\\n }\\n\\n if (v_placement_zoom >= u_maxzoom) {\\n gl_FragColor = vec4(0.0, 0.0, 1.0, 1.0) * alpha * 0.2;\\n }\\n}\\n\",vertexSource:\"attribute vec2 a_pos;\\nattribute vec2 a_extrude;\\nattribute vec2 a_data;\\n\\nuniform mat4 u_matrix;\\nuniform float u_scale;\\n\\nvarying float v_max_zoom;\\nvarying float v_placement_zoom;\\n\\nvoid main() {\\n gl_Position = u_matrix * vec4(a_pos + a_extrude / u_scale, 0.0, 1.0);\\n\\n v_max_zoom = a_data.x;\\n v_placement_zoom = a_data.y;\\n}\\n\"},debug:{fragmentSource:\"uniform lowp vec4 u_color;\\n\\nvoid main() {\\n gl_FragColor = u_color;\\n}\\n\",vertexSource:\"attribute vec2 a_pos;\\n\\nuniform mat4 u_matrix;\\n\\nvoid main() {\\n gl_Position = u_matrix * vec4(a_pos, step(32767.0, a_pos.x), 1);\\n}\\n\"},fill:{fragmentSource:\"#pragma mapbox: define lowp vec4 color\\n#pragma mapbox: define lowp float opacity\\n\\nvoid main() {\\n #pragma mapbox: initialize lowp vec4 color\\n #pragma mapbox: initialize lowp float opacity\\n\\n gl_FragColor = color * opacity;\\n\\n#ifdef OVERDRAW_INSPECTOR\\n gl_FragColor = vec4(1.0);\\n#endif\\n}\\n\",vertexSource:\"attribute vec2 a_pos;\\n\\nuniform mat4 u_matrix;\\n\\n#pragma mapbox: define lowp vec4 color\\n#pragma mapbox: define lowp float opacity\\n\\nvoid main() {\\n #pragma mapbox: initialize lowp vec4 color\\n #pragma mapbox: initialize lowp float opacity\\n\\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\\n}\\n\"},fillOutline:{fragmentSource:\"#pragma mapbox: define lowp vec4 outline_color\\n#pragma mapbox: define lowp float opacity\\n\\nvarying vec2 v_pos;\\n\\nvoid main() {\\n #pragma mapbox: initialize lowp vec4 outline_color\\n #pragma mapbox: initialize lowp float opacity\\n\\n float dist = length(v_pos - gl_FragCoord.xy);\\n float alpha = smoothstep(1.0, 0.0, dist);\\n gl_FragColor = outline_color * (alpha * opacity);\\n\\n#ifdef OVERDRAW_INSPECTOR\\n gl_FragColor = vec4(1.0);\\n#endif\\n}\\n\",vertexSource:\"attribute vec2 a_pos;\\n\\nuniform mat4 u_matrix;\\nuniform vec2 u_world;\\n\\nvarying vec2 v_pos;\\n\\n#pragma mapbox: define lowp vec4 outline_color\\n#pragma mapbox: define lowp float opacity\\n\\nvoid main() {\\n #pragma mapbox: initialize lowp vec4 outline_color\\n #pragma mapbox: initialize lowp float opacity\\n\\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\\n v_pos = (gl_Position.xy / gl_Position.w + 1.0) / 2.0 * u_world;\\n}\\n\"},fillOutlinePattern:{fragmentSource:\"uniform vec2 u_pattern_tl_a;\\nuniform vec2 u_pattern_br_a;\\nuniform vec2 u_pattern_tl_b;\\nuniform vec2 u_pattern_br_b;\\nuniform float u_mix;\\n\\nuniform sampler2D u_image;\\n\\nvarying vec2 v_pos_a;\\nvarying vec2 v_pos_b;\\nvarying vec2 v_pos;\\n\\n#pragma mapbox: define lowp float opacity\\n\\nvoid main() {\\n #pragma mapbox: initialize lowp float opacity\\n\\n vec2 imagecoord = mod(v_pos_a, 1.0);\\n vec2 pos = mix(u_pattern_tl_a, u_pattern_br_a, imagecoord);\\n vec4 color1 = texture2D(u_image, pos);\\n\\n vec2 imagecoord_b = mod(v_pos_b, 1.0);\\n vec2 pos2 = mix(u_pattern_tl_b, u_pattern_br_b, imagecoord_b);\\n vec4 color2 = texture2D(u_image, pos2);\\n\\n // find distance to outline for alpha interpolation\\n\\n float dist = length(v_pos - gl_FragCoord.xy);\\n float alpha = smoothstep(1.0, 0.0, dist);\\n\\n\\n gl_FragColor = mix(color1, color2, u_mix) * alpha * opacity;\\n\\n#ifdef OVERDRAW_INSPECTOR\\n gl_FragColor = vec4(1.0);\\n#endif\\n}\\n\",vertexSource:\"uniform mat4 u_matrix;\\nuniform vec2 u_world;\\nuniform vec2 u_pattern_size_a;\\nuniform vec2 u_pattern_size_b;\\nuniform vec2 u_pixel_coord_upper;\\nuniform vec2 u_pixel_coord_lower;\\nuniform float u_scale_a;\\nuniform float u_scale_b;\\nuniform float u_tile_units_to_pixels;\\n\\nattribute vec2 a_pos;\\n\\nvarying vec2 v_pos_a;\\nvarying vec2 v_pos_b;\\nvarying vec2 v_pos;\\n\\n#pragma mapbox: define lowp float opacity\\n\\nvoid main() {\\n #pragma mapbox: initialize lowp float opacity\\n\\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\\n\\n v_pos_a = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_a * u_pattern_size_a, u_tile_units_to_pixels, a_pos);\\n v_pos_b = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_b * u_pattern_size_b, u_tile_units_to_pixels, a_pos);\\n\\n v_pos = (gl_Position.xy / gl_Position.w + 1.0) / 2.0 * u_world;\\n}\\n\"},fillPattern:{fragmentSource:\"uniform vec2 u_pattern_tl_a;\\nuniform vec2 u_pattern_br_a;\\nuniform vec2 u_pattern_tl_b;\\nuniform vec2 u_pattern_br_b;\\nuniform float u_mix;\\n\\nuniform sampler2D u_image;\\n\\nvarying vec2 v_pos_a;\\nvarying vec2 v_pos_b;\\n\\n#pragma mapbox: define lowp float opacity\\n\\nvoid main() {\\n #pragma mapbox: initialize lowp float opacity\\n\\n vec2 imagecoord = mod(v_pos_a, 1.0);\\n vec2 pos = mix(u_pattern_tl_a, u_pattern_br_a, imagecoord);\\n vec4 color1 = texture2D(u_image, pos);\\n\\n vec2 imagecoord_b = mod(v_pos_b, 1.0);\\n vec2 pos2 = mix(u_pattern_tl_b, u_pattern_br_b, imagecoord_b);\\n vec4 color2 = texture2D(u_image, pos2);\\n\\n gl_FragColor = mix(color1, color2, u_mix) * opacity;\\n\\n#ifdef OVERDRAW_INSPECTOR\\n gl_FragColor = vec4(1.0);\\n#endif\\n}\\n\",vertexSource:\"uniform mat4 u_matrix;\\nuniform vec2 u_pattern_size_a;\\nuniform vec2 u_pattern_size_b;\\nuniform vec2 u_pixel_coord_upper;\\nuniform vec2 u_pixel_coord_lower;\\nuniform float u_scale_a;\\nuniform float u_scale_b;\\nuniform float u_tile_units_to_pixels;\\n\\nattribute vec2 a_pos;\\n\\nvarying vec2 v_pos_a;\\nvarying vec2 v_pos_b;\\n\\n#pragma mapbox: define lowp float opacity\\n\\nvoid main() {\\n #pragma mapbox: initialize lowp float opacity\\n\\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\\n\\n v_pos_a = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_a * u_pattern_size_a, u_tile_units_to_pixels, a_pos);\\n v_pos_b = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_b * u_pattern_size_b, u_tile_units_to_pixels, a_pos);\\n}\\n\"},fillExtrusion:{fragmentSource:\"varying vec4 v_color;\\n#pragma mapbox: define lowp float base\\n#pragma mapbox: define lowp float height\\n#pragma mapbox: define lowp vec4 color\\n\\nvoid main() {\\n #pragma mapbox: initialize lowp float base\\n #pragma mapbox: initialize lowp float height\\n #pragma mapbox: initialize lowp vec4 color\\n\\n gl_FragColor = v_color;\\n\\n#ifdef OVERDRAW_INSPECTOR\\n gl_FragColor = vec4(1.0);\\n#endif\\n}\\n\",vertexSource:\"uniform mat4 u_matrix;\\nuniform vec3 u_lightcolor;\\nuniform lowp vec3 u_lightpos;\\nuniform lowp float u_lightintensity;\\n\\nattribute vec2 a_pos;\\nattribute vec3 a_normal;\\nattribute float a_edgedistance;\\n\\nvarying vec4 v_color;\\n\\n#pragma mapbox: define lowp float base\\n#pragma mapbox: define lowp float height\\n\\n#pragma mapbox: define lowp vec4 color\\n\\nvoid main() {\\n #pragma mapbox: initialize lowp float base\\n #pragma mapbox: initialize lowp float height\\n #pragma mapbox: initialize lowp vec4 color\\n\\n float ed = a_edgedistance; // use each attrib in order to not trip a VAO assert\\n float t = mod(a_normal.x, 2.0);\\n\\n gl_Position = u_matrix * vec4(a_pos, t > 0.0 ? height : base, 1);\\n\\n // Relative luminance (how dark/bright is the surface color?)\\n float colorvalue = color.r * 0.2126 + color.g * 0.7152 + color.b * 0.0722;\\n\\n v_color = vec4(0.0, 0.0, 0.0, 1.0);\\n\\n // Add slight ambient lighting so no extrusions are totally black\\n vec4 ambientlight = vec4(0.03, 0.03, 0.03, 1.0);\\n color += ambientlight;\\n\\n // Calculate cos(theta), where theta is the angle between surface normal and diffuse light ray\\n float directional = clamp(dot(a_normal / 16384.0, u_lightpos), 0.0, 1.0);\\n\\n // Adjust directional so that\\n // the range of values for highlight/shading is narrower\\n // with lower light intensity\\n // and with lighter/brighter surface colors\\n directional = mix((1.0 - u_lightintensity), max((1.0 - colorvalue + u_lightintensity), 1.0), directional);\\n\\n // Add gradient along z axis of side surfaces\\n if (a_normal.y != 0.0) {\\n directional *= clamp((t + base) * pow(height / 150.0, 0.5), mix(0.7, 0.98, 1.0 - u_lightintensity), 1.0);\\n }\\n\\n // Assign final color based on surface + ambient light color, diffuse light directional, and light color\\n // with lower bounds adjusted to hue of light\\n // so that shading is tinted with the complementary (opposite) color to the light color\\n v_color.r += clamp(color.r * directional * u_lightcolor.r, mix(0.0, 0.3, 1.0 - u_lightcolor.r), 1.0);\\n v_color.g += clamp(color.g * directional * u_lightcolor.g, mix(0.0, 0.3, 1.0 - u_lightcolor.g), 1.0);\\n v_color.b += clamp(color.b * directional * u_lightcolor.b, mix(0.0, 0.3, 1.0 - u_lightcolor.b), 1.0);\\n}\\n\"},fillExtrusionPattern:{fragmentSource:\"uniform vec2 u_pattern_tl_a;\\nuniform vec2 u_pattern_br_a;\\nuniform vec2 u_pattern_tl_b;\\nuniform vec2 u_pattern_br_b;\\nuniform float u_mix;\\n\\nuniform sampler2D u_image;\\n\\nvarying vec2 v_pos_a;\\nvarying vec2 v_pos_b;\\nvarying vec4 v_lighting;\\n\\n#pragma mapbox: define lowp float base\\n#pragma mapbox: define lowp float height\\n\\nvoid main() {\\n #pragma mapbox: initialize lowp float base\\n #pragma mapbox: initialize lowp float height\\n\\n vec2 imagecoord = mod(v_pos_a, 1.0);\\n vec2 pos = mix(u_pattern_tl_a, u_pattern_br_a, imagecoord);\\n vec4 color1 = texture2D(u_image, pos);\\n\\n vec2 imagecoord_b = mod(v_pos_b, 1.0);\\n vec2 pos2 = mix(u_pattern_tl_b, u_pattern_br_b, imagecoord_b);\\n vec4 color2 = texture2D(u_image, pos2);\\n\\n vec4 mixedColor = mix(color1, color2, u_mix);\\n\\n gl_FragColor = mixedColor * v_lighting;\\n\\n#ifdef OVERDRAW_INSPECTOR\\n gl_FragColor = vec4(1.0);\\n#endif\\n}\\n\",vertexSource:\"uniform mat4 u_matrix;\\nuniform vec2 u_pattern_size_a;\\nuniform vec2 u_pattern_size_b;\\nuniform vec2 u_pixel_coord_upper;\\nuniform vec2 u_pixel_coord_lower;\\nuniform float u_scale_a;\\nuniform float u_scale_b;\\nuniform float u_tile_units_to_pixels;\\nuniform float u_height_factor;\\n\\nuniform vec3 u_lightcolor;\\nuniform lowp vec3 u_lightpos;\\nuniform lowp float u_lightintensity;\\n\\nattribute vec2 a_pos;\\nattribute vec3 a_normal;\\nattribute float a_edgedistance;\\n\\nvarying vec2 v_pos_a;\\nvarying vec2 v_pos_b;\\nvarying vec4 v_lighting;\\nvarying float v_directional;\\n\\n#pragma mapbox: define lowp float base\\n#pragma mapbox: define lowp float height\\n\\nvoid main() {\\n #pragma mapbox: initialize lowp float base\\n #pragma mapbox: initialize lowp float height\\n\\n float t = mod(a_normal.x, 2.0);\\n float z = t > 0.0 ? height : base;\\n\\n gl_Position = u_matrix * vec4(a_pos, z, 1);\\n\\n vec2 pos = a_normal.x == 1.0 && a_normal.y == 0.0 && a_normal.z == 16384.0\\n ? a_pos // extrusion top\\n : vec2(a_edgedistance, z * u_height_factor); // extrusion side\\n\\n v_pos_a = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_a * u_pattern_size_a, u_tile_units_to_pixels, pos);\\n v_pos_b = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_b * u_pattern_size_b, u_tile_units_to_pixels, pos);\\n\\n v_lighting = vec4(0.0, 0.0, 0.0, 1.0);\\n float directional = clamp(dot(a_normal / 16383.0, u_lightpos), 0.0, 1.0);\\n directional = mix((1.0 - u_lightintensity), max((0.5 + u_lightintensity), 1.0), directional);\\n\\n if (a_normal.y != 0.0) {\\n directional *= clamp((t + base) * pow(height / 150.0, 0.5), mix(0.7, 0.98, 1.0 - u_lightintensity), 1.0);\\n }\\n\\n v_lighting.rgb += clamp(directional * u_lightcolor, mix(vec3(0.0), vec3(0.3), 1.0 - u_lightcolor), vec3(1.0));\\n}\\n\"},extrusionTexture:{fragmentSource:\"uniform sampler2D u_texture;\\nuniform float u_opacity;\\n\\nvarying vec2 v_pos;\\n\\nvoid main() {\\n gl_FragColor = texture2D(u_texture, v_pos) * u_opacity;\\n\\n#ifdef OVERDRAW_INSPECTOR\\n gl_FragColor = vec4(0.0);\\n#endif\\n}\\n\",vertexSource:\"uniform mat4 u_matrix;\\nuniform int u_xdim;\\nuniform int u_ydim;\\nattribute vec2 a_pos;\\nvarying vec2 v_pos;\\n\\nvoid main() {\\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\\n\\n v_pos.x = a_pos.x / float(u_xdim);\\n v_pos.y = 1.0 - a_pos.y / float(u_ydim);\\n}\\n\"},line:{fragmentSource:\"#pragma mapbox: define lowp vec4 color\\n#pragma mapbox: define lowp float blur\\n#pragma mapbox: define lowp float opacity\\n\\nvarying vec2 v_width2;\\nvarying vec2 v_normal;\\nvarying float v_gamma_scale;\\n\\nvoid main() {\\n #pragma mapbox: initialize lowp vec4 color\\n #pragma mapbox: initialize lowp float blur\\n #pragma mapbox: initialize lowp float opacity\\n\\n // Calculate the distance of the pixel from the line in pixels.\\n float dist = length(v_normal) * v_width2.s;\\n\\n // Calculate the antialiasing fade factor. This is either when fading in\\n // the line in case of an offset line (v_width2.t) or when fading out\\n // (v_width2.s)\\n float blur2 = (blur + 1.0 / DEVICE_PIXEL_RATIO) * v_gamma_scale;\\n float alpha = clamp(min(dist - (v_width2.t - blur2), v_width2.s - dist) / blur2, 0.0, 1.0);\\n\\n gl_FragColor = color * (alpha * opacity);\\n\\n#ifdef OVERDRAW_INSPECTOR\\n gl_FragColor = vec4(1.0);\\n#endif\\n}\\n\",vertexSource:\"\\n\\n// the distance over which the line edge fades out.\\n// Retina devices need a smaller distance to avoid aliasing.\\n#define ANTIALIASING 1.0 / DEVICE_PIXEL_RATIO / 2.0\\n\\n// floor(127 / 2) == 63.0\\n// the maximum allowed miter limit is 2.0 at the moment. the extrude normal is\\n// stored in a byte (-128..127). we scale regular normals up to length 63, but\\n// there are also \\\"special\\\" normals that have a bigger length (of up to 126 in\\n// this case).\\n// #define scale 63.0\\n#define scale 0.015873016\\n\\nattribute vec2 a_pos;\\nattribute vec4 a_data;\\n\\nuniform mat4 u_matrix;\\nuniform mediump float u_ratio;\\nuniform mediump float u_width;\\nuniform vec2 u_gl_units_to_pixels;\\n\\nvarying vec2 v_normal;\\nvarying vec2 v_width2;\\nvarying float v_gamma_scale;\\n\\n#pragma mapbox: define lowp vec4 color\\n#pragma mapbox: define lowp float blur\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define mediump float gapwidth\\n#pragma mapbox: define lowp float offset\\n\\nvoid main() {\\n #pragma mapbox: initialize lowp vec4 color\\n #pragma mapbox: initialize lowp float blur\\n #pragma mapbox: initialize lowp float opacity\\n #pragma mapbox: initialize mediump float gapwidth\\n #pragma mapbox: initialize lowp float offset\\n\\n vec2 a_extrude = a_data.xy - 128.0;\\n float a_direction = mod(a_data.z, 4.0) - 1.0;\\n\\n // We store the texture normals in the most insignificant bit\\n // transform y so that 0 => -1 and 1 => 1\\n // In the texture normal, x is 0 if the normal points straight up/down and 1 if it's a round cap\\n // y is 1 if the normal points up, and -1 if it points down\\n mediump vec2 normal = mod(a_pos, 2.0);\\n normal.y = sign(normal.y - 0.5);\\n v_normal = normal;\\n\\n\\n // these transformations used to be applied in the JS and native code bases. \\n // moved them into the shader for clarity and simplicity. \\n gapwidth = gapwidth / 2.0;\\n float width = u_width / 2.0;\\n offset = -1.0 * offset; \\n\\n float inset = gapwidth + (gapwidth > 0.0 ? ANTIALIASING : 0.0);\\n float outset = gapwidth + width * (gapwidth > 0.0 ? 2.0 : 1.0) + ANTIALIASING;\\n\\n // Scale the extrusion vector down to a normal and then up by the line width\\n // of this vertex.\\n mediump vec2 dist = outset * a_extrude * scale;\\n\\n // Calculate the offset when drawing a line that is to the side of the actual line.\\n // We do this by creating a vector that points towards the extrude, but rotate\\n // it when we're drawing round end points (a_direction = -1 or 1) since their\\n // extrude vector points in another direction.\\n mediump float u = 0.5 * a_direction;\\n mediump float t = 1.0 - abs(u);\\n mediump vec2 offset2 = offset * a_extrude * scale * normal.y * mat2(t, -u, u, t);\\n\\n // Remove the texture normal bit to get the position\\n vec2 pos = floor(a_pos * 0.5);\\n\\n vec4 projected_extrude = u_matrix * vec4(dist / u_ratio, 0.0, 0.0);\\n gl_Position = u_matrix * vec4(pos + offset2 / u_ratio, 0.0, 1.0) + projected_extrude;\\n\\n // calculate how much the perspective view squishes or stretches the extrude\\n float extrude_length_without_perspective = length(dist);\\n float extrude_length_with_perspective = length(projected_extrude.xy / gl_Position.w * u_gl_units_to_pixels);\\n v_gamma_scale = extrude_length_without_perspective / extrude_length_with_perspective;\\n\\n v_width2 = vec2(outset, inset);\\n}\\n\"},linePattern:{fragmentSource:\"uniform vec2 u_pattern_size_a;\\nuniform vec2 u_pattern_size_b;\\nuniform vec2 u_pattern_tl_a;\\nuniform vec2 u_pattern_br_a;\\nuniform vec2 u_pattern_tl_b;\\nuniform vec2 u_pattern_br_b;\\nuniform float u_fade;\\n\\nuniform sampler2D u_image;\\n\\nvarying vec2 v_normal;\\nvarying vec2 v_width2;\\nvarying float v_linesofar;\\nvarying float v_gamma_scale;\\n\\n#pragma mapbox: define lowp float blur\\n#pragma mapbox: define lowp float opacity\\n\\nvoid main() {\\n #pragma mapbox: initialize lowp float blur\\n #pragma mapbox: initialize lowp float opacity\\n\\n // Calculate the distance of the pixel from the line in pixels.\\n float dist = length(v_normal) * v_width2.s;\\n\\n // Calculate the antialiasing fade factor. This is either when fading in\\n // the line in case of an offset line (v_width2.t) or when fading out\\n // (v_width2.s)\\n float blur2 = (blur + 1.0 / DEVICE_PIXEL_RATIO) * v_gamma_scale;\\n float alpha = clamp(min(dist - (v_width2.t - blur2), v_width2.s - dist) / blur2, 0.0, 1.0);\\n\\n float x_a = mod(v_linesofar / u_pattern_size_a.x, 1.0);\\n float x_b = mod(v_linesofar / u_pattern_size_b.x, 1.0);\\n float y_a = 0.5 + (v_normal.y * v_width2.s / u_pattern_size_a.y);\\n float y_b = 0.5 + (v_normal.y * v_width2.s / u_pattern_size_b.y);\\n vec2 pos_a = mix(u_pattern_tl_a, u_pattern_br_a, vec2(x_a, y_a));\\n vec2 pos_b = mix(u_pattern_tl_b, u_pattern_br_b, vec2(x_b, y_b));\\n\\n vec4 color = mix(texture2D(u_image, pos_a), texture2D(u_image, pos_b), u_fade);\\n\\n gl_FragColor = color * alpha * opacity;\\n\\n#ifdef OVERDRAW_INSPECTOR\\n gl_FragColor = vec4(1.0);\\n#endif\\n}\\n\",vertexSource:\"// floor(127 / 2) == 63.0\\n// the maximum allowed miter limit is 2.0 at the moment. the extrude normal is\\n// stored in a byte (-128..127). we scale regular normals up to length 63, but\\n// there are also \\\"special\\\" normals that have a bigger length (of up to 126 in\\n// this case).\\n// #define scale 63.0\\n#define scale 0.015873016\\n\\n// We scale the distance before adding it to the buffers so that we can store\\n// long distances for long segments. Use this value to unscale the distance.\\n#define LINE_DISTANCE_SCALE 2.0\\n\\n// the distance over which the line edge fades out.\\n// Retina devices need a smaller distance to avoid aliasing.\\n#define ANTIALIASING 1.0 / DEVICE_PIXEL_RATIO / 2.0\\n\\nattribute vec2 a_pos;\\nattribute vec4 a_data;\\n\\nuniform mat4 u_matrix;\\nuniform mediump float u_ratio;\\nuniform mediump float u_width;\\nuniform vec2 u_gl_units_to_pixels;\\n\\nvarying vec2 v_normal;\\nvarying vec2 v_width2;\\nvarying float v_linesofar;\\nvarying float v_gamma_scale;\\n\\n#pragma mapbox: define lowp float blur\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define lowp float offset\\n#pragma mapbox: define mediump float gapwidth\\n\\nvoid main() {\\n #pragma mapbox: initialize lowp float blur\\n #pragma mapbox: initialize lowp float opacity\\n #pragma mapbox: initialize lowp float offset\\n #pragma mapbox: initialize mediump float gapwidth\\n\\n vec2 a_extrude = a_data.xy - 128.0;\\n float a_direction = mod(a_data.z, 4.0) - 1.0;\\n float a_linesofar = (floor(a_data.z / 4.0) + a_data.w * 64.0) * LINE_DISTANCE_SCALE;\\n\\n // We store the texture normals in the most insignificant bit\\n // transform y so that 0 => -1 and 1 => 1\\n // In the texture normal, x is 0 if the normal points straight up/down and 1 if it's a round cap\\n // y is 1 if the normal points up, and -1 if it points down\\n mediump vec2 normal = mod(a_pos, 2.0);\\n normal.y = sign(normal.y - 0.5);\\n v_normal = normal;\\n\\n // these transformations used to be applied in the JS and native code bases. \\n // moved them into the shader for clarity and simplicity. \\n gapwidth = gapwidth / 2.0;\\n float width = u_width / 2.0;\\n offset = -1.0 * offset; \\n\\n float inset = gapwidth + (gapwidth > 0.0 ? ANTIALIASING : 0.0);\\n float outset = gapwidth + width * (gapwidth > 0.0 ? 2.0 : 1.0) + ANTIALIASING;\\n\\n // Scale the extrusion vector down to a normal and then up by the line width\\n // of this vertex.\\n mediump vec2 dist = outset * a_extrude * scale;\\n\\n // Calculate the offset when drawing a line that is to the side of the actual line.\\n // We do this by creating a vector that points towards the extrude, but rotate\\n // it when we're drawing round end points (a_direction = -1 or 1) since their\\n // extrude vector points in another direction.\\n mediump float u = 0.5 * a_direction;\\n mediump float t = 1.0 - abs(u);\\n mediump vec2 offset2 = offset * a_extrude * scale * normal.y * mat2(t, -u, u, t);\\n\\n // Remove the texture normal bit to get the position\\n vec2 pos = floor(a_pos * 0.5);\\n\\n vec4 projected_extrude = u_matrix * vec4(dist / u_ratio, 0.0, 0.0);\\n gl_Position = u_matrix * vec4(pos + offset2 / u_ratio, 0.0, 1.0) + projected_extrude;\\n\\n // calculate how much the perspective view squishes or stretches the extrude\\n float extrude_length_without_perspective = length(dist);\\n float extrude_length_with_perspective = length(projected_extrude.xy / gl_Position.w * u_gl_units_to_pixels);\\n v_gamma_scale = extrude_length_without_perspective / extrude_length_with_perspective;\\n\\n v_linesofar = a_linesofar;\\n v_width2 = vec2(outset, inset);\\n}\\n\"},lineSDF:{fragmentSource:\"\\nuniform sampler2D u_image;\\nuniform float u_sdfgamma;\\nuniform float u_mix;\\n\\nvarying vec2 v_normal;\\nvarying vec2 v_width2;\\nvarying vec2 v_tex_a;\\nvarying vec2 v_tex_b;\\nvarying float v_gamma_scale;\\n\\n#pragma mapbox: define lowp vec4 color\\n#pragma mapbox: define lowp float blur\\n#pragma mapbox: define lowp float opacity\\n\\nvoid main() {\\n #pragma mapbox: initialize lowp vec4 color\\n #pragma mapbox: initialize lowp float blur\\n #pragma mapbox: initialize lowp float opacity\\n\\n // Calculate the distance of the pixel from the line in pixels.\\n float dist = length(v_normal) * v_width2.s;\\n\\n // Calculate the antialiasing fade factor. This is either when fading in\\n // the line in case of an offset line (v_width2.t) or when fading out\\n // (v_width2.s)\\n float blur2 = (blur + 1.0 / DEVICE_PIXEL_RATIO) * v_gamma_scale;\\n float alpha = clamp(min(dist - (v_width2.t - blur2), v_width2.s - dist) / blur2, 0.0, 1.0);\\n\\n float sdfdist_a = texture2D(u_image, v_tex_a).a;\\n float sdfdist_b = texture2D(u_image, v_tex_b).a;\\n float sdfdist = mix(sdfdist_a, sdfdist_b, u_mix);\\n alpha *= smoothstep(0.5 - u_sdfgamma, 0.5 + u_sdfgamma, sdfdist);\\n\\n gl_FragColor = color * (alpha * opacity);\\n\\n#ifdef OVERDRAW_INSPECTOR\\n gl_FragColor = vec4(1.0);\\n#endif\\n}\\n\",vertexSource:\"// floor(127 / 2) == 63.0\\n// the maximum allowed miter limit is 2.0 at the moment. the extrude normal is\\n// stored in a byte (-128..127). we scale regular normals up to length 63, but\\n// there are also \\\"special\\\" normals that have a bigger length (of up to 126 in\\n// this case).\\n// #define scale 63.0\\n#define scale 0.015873016\\n\\n// We scale the distance before adding it to the buffers so that we can store\\n// long distances for long segments. Use this value to unscale the distance.\\n#define LINE_DISTANCE_SCALE 2.0\\n\\n// the distance over which the line edge fades out.\\n// Retina devices need a smaller distance to avoid aliasing.\\n#define ANTIALIASING 1.0 / DEVICE_PIXEL_RATIO / 2.0\\n\\nattribute vec2 a_pos;\\nattribute vec4 a_data;\\n\\nuniform mat4 u_matrix;\\nuniform mediump float u_ratio;\\nuniform vec2 u_patternscale_a;\\nuniform float u_tex_y_a;\\nuniform vec2 u_patternscale_b;\\nuniform float u_tex_y_b;\\nuniform vec2 u_gl_units_to_pixels;\\nuniform mediump float u_width;\\n\\nvarying vec2 v_normal;\\nvarying vec2 v_width2;\\nvarying vec2 v_tex_a;\\nvarying vec2 v_tex_b;\\nvarying float v_gamma_scale;\\n\\n#pragma mapbox: define lowp vec4 color\\n#pragma mapbox: define lowp float blur\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define mediump float gapwidth\\n#pragma mapbox: define lowp float offset\\n\\nvoid main() {\\n #pragma mapbox: initialize lowp vec4 color\\n #pragma mapbox: initialize lowp float blur\\n #pragma mapbox: initialize lowp float opacity\\n #pragma mapbox: initialize mediump float gapwidth\\n #pragma mapbox: initialize lowp float offset\\n\\n vec2 a_extrude = a_data.xy - 128.0;\\n float a_direction = mod(a_data.z, 4.0) - 1.0;\\n float a_linesofar = (floor(a_data.z / 4.0) + a_data.w * 64.0) * LINE_DISTANCE_SCALE;\\n\\n // We store the texture normals in the most insignificant bit\\n // transform y so that 0 => -1 and 1 => 1\\n // In the texture normal, x is 0 if the normal points straight up/down and 1 if it's a round cap\\n // y is 1 if the normal points up, and -1 if it points down\\n mediump vec2 normal = mod(a_pos, 2.0);\\n normal.y = sign(normal.y - 0.5);\\n v_normal = normal;\\n\\n // these transformations used to be applied in the JS and native code bases. \\n // moved them into the shader for clarity and simplicity. \\n gapwidth = gapwidth / 2.0;\\n float width = u_width / 2.0;\\n offset = -1.0 * offset;\\n \\n float inset = gapwidth + (gapwidth > 0.0 ? ANTIALIASING : 0.0);\\n float outset = gapwidth + width * (gapwidth > 0.0 ? 2.0 : 1.0) + ANTIALIASING;\\n\\n // Scale the extrusion vector down to a normal and then up by the line width\\n // of this vertex.\\n mediump vec2 dist =outset * a_extrude * scale;\\n\\n // Calculate the offset when drawing a line that is to the side of the actual line.\\n // We do this by creating a vector that points towards the extrude, but rotate\\n // it when we're drawing round end points (a_direction = -1 or 1) since their\\n // extrude vector points in another direction.\\n mediump float u = 0.5 * a_direction;\\n mediump float t = 1.0 - abs(u);\\n mediump vec2 offset2 = offset * a_extrude * scale * normal.y * mat2(t, -u, u, t);\\n\\n // Remove the texture normal bit to get the position\\n vec2 pos = floor(a_pos * 0.5);\\n\\n vec4 projected_extrude = u_matrix * vec4(dist / u_ratio, 0.0, 0.0);\\n gl_Position = u_matrix * vec4(pos + offset2 / u_ratio, 0.0, 1.0) + projected_extrude;\\n\\n // calculate how much the perspective view squishes or stretches the extrude\\n float extrude_length_without_perspective = length(dist);\\n float extrude_length_with_perspective = length(projected_extrude.xy / gl_Position.w * u_gl_units_to_pixels);\\n v_gamma_scale = extrude_length_without_perspective / extrude_length_with_perspective;\\n\\n v_tex_a = vec2(a_linesofar * u_patternscale_a.x, normal.y * u_patternscale_a.y + u_tex_y_a);\\n v_tex_b = vec2(a_linesofar * u_patternscale_b.x, normal.y * u_patternscale_b.y + u_tex_y_b);\\n\\n v_width2 = vec2(outset, inset);\\n}\\n\"\n},raster:{fragmentSource:\"uniform float u_fade_t;\\nuniform float u_opacity;\\nuniform sampler2D u_image0;\\nuniform sampler2D u_image1;\\nvarying vec2 v_pos0;\\nvarying vec2 v_pos1;\\n\\nuniform float u_brightness_low;\\nuniform float u_brightness_high;\\n\\nuniform float u_saturation_factor;\\nuniform float u_contrast_factor;\\nuniform vec3 u_spin_weights;\\n\\nvoid main() {\\n\\n // read and cross-fade colors from the main and parent tiles\\n vec4 color0 = texture2D(u_image0, v_pos0);\\n vec4 color1 = texture2D(u_image1, v_pos1);\\n vec4 color = mix(color0, color1, u_fade_t);\\n color.a *= u_opacity;\\n vec3 rgb = color.rgb;\\n\\n // spin\\n rgb = vec3(\\n dot(rgb, u_spin_weights.xyz),\\n dot(rgb, u_spin_weights.zxy),\\n dot(rgb, u_spin_weights.yzx));\\n\\n // saturation\\n float average = (color.r + color.g + color.b) / 3.0;\\n rgb += (average - rgb) * u_saturation_factor;\\n\\n // contrast\\n rgb = (rgb - 0.5) * u_contrast_factor + 0.5;\\n\\n // brightness\\n vec3 u_high_vec = vec3(u_brightness_low, u_brightness_low, u_brightness_low);\\n vec3 u_low_vec = vec3(u_brightness_high, u_brightness_high, u_brightness_high);\\n\\n gl_FragColor = vec4(mix(u_high_vec, u_low_vec, rgb) * color.a, color.a);\\n\\n#ifdef OVERDRAW_INSPECTOR\\n gl_FragColor = vec4(1.0);\\n#endif\\n}\\n\",vertexSource:\"uniform mat4 u_matrix;\\nuniform vec2 u_tl_parent;\\nuniform float u_scale_parent;\\nuniform float u_buffer_scale;\\n\\nattribute vec2 a_pos;\\nattribute vec2 a_texture_pos;\\n\\nvarying vec2 v_pos0;\\nvarying vec2 v_pos1;\\n\\nvoid main() {\\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\\n v_pos0 = (((a_texture_pos / 32767.0) - 0.5) / u_buffer_scale ) + 0.5;\\n v_pos1 = (v_pos0 * u_scale_parent) + u_tl_parent;\\n}\\n\"},symbolIcon:{fragmentSource:\"uniform sampler2D u_texture;\\nuniform sampler2D u_fadetexture;\\n\\n#pragma mapbox: define lowp float opacity\\n\\nvarying vec2 v_tex;\\nvarying vec2 v_fade_tex;\\n\\nvoid main() {\\n #pragma mapbox: initialize lowp float opacity\\n\\n lowp float alpha = texture2D(u_fadetexture, v_fade_tex).a * opacity;\\n gl_FragColor = texture2D(u_texture, v_tex) * alpha;\\n\\n#ifdef OVERDRAW_INSPECTOR\\n gl_FragColor = vec4(1.0);\\n#endif\\n}\\n\",vertexSource:\"\\nattribute vec4 a_pos_offset;\\nattribute vec2 a_texture_pos;\\nattribute vec4 a_data;\\n\\n#pragma mapbox: define lowp float opacity\\n\\n// matrix is for the vertex position.\\nuniform mat4 u_matrix;\\n\\nuniform mediump float u_zoom;\\nuniform bool u_rotate_with_map;\\nuniform vec2 u_extrude_scale;\\n\\nuniform vec2 u_texsize;\\n\\nvarying vec2 v_tex;\\nvarying vec2 v_fade_tex;\\n\\nvoid main() {\\n #pragma mapbox: initialize lowp float opacity\\n\\n vec2 a_pos = a_pos_offset.xy;\\n vec2 a_offset = a_pos_offset.zw;\\n\\n vec2 a_tex = a_texture_pos.xy;\\n mediump float a_labelminzoom = a_data[0];\\n mediump vec2 a_zoom = a_data.pq;\\n mediump float a_minzoom = a_zoom[0];\\n mediump float a_maxzoom = a_zoom[1];\\n\\n // u_zoom is the current zoom level adjusted for the change in font size\\n mediump float z = 2.0 - step(a_minzoom, u_zoom) - (1.0 - step(a_maxzoom, u_zoom));\\n\\n vec2 extrude = u_extrude_scale * (a_offset / 64.0);\\n if (u_rotate_with_map) {\\n gl_Position = u_matrix * vec4(a_pos + extrude, 0, 1);\\n gl_Position.z += z * gl_Position.w;\\n } else {\\n gl_Position = u_matrix * vec4(a_pos, 0, 1) + vec4(extrude, 0, 0);\\n }\\n\\n v_tex = a_tex / u_texsize;\\n v_fade_tex = vec2(a_labelminzoom / 255.0, 0.0);\\n}\\n\"},symbolSDF:{fragmentSource:\"#define SDF_PX 8.0\\n#define EDGE_GAMMA 0.105/DEVICE_PIXEL_RATIO\\n\\nuniform bool u_is_halo;\\n#pragma mapbox: define lowp vec4 fill_color\\n#pragma mapbox: define lowp vec4 halo_color\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define lowp float halo_width\\n#pragma mapbox: define lowp float halo_blur\\n\\nuniform sampler2D u_texture;\\nuniform sampler2D u_fadetexture;\\nuniform lowp float u_font_scale;\\nuniform highp float u_gamma_scale;\\n\\nvarying vec2 v_tex;\\nvarying vec2 v_fade_tex;\\nvarying float v_gamma_scale;\\n\\nvoid main() {\\n #pragma mapbox: initialize lowp vec4 fill_color\\n #pragma mapbox: initialize lowp vec4 halo_color\\n #pragma mapbox: initialize lowp float opacity\\n #pragma mapbox: initialize lowp float halo_width\\n #pragma mapbox: initialize lowp float halo_blur\\n\\n lowp vec4 color = fill_color;\\n highp float gamma = EDGE_GAMMA / u_gamma_scale;\\n lowp float buff = (256.0 - 64.0) / 256.0;\\n if (u_is_halo) {\\n color = halo_color;\\n gamma = (halo_blur * 1.19 / SDF_PX + EDGE_GAMMA) / u_gamma_scale;\\n buff = (6.0 - halo_width / u_font_scale) / SDF_PX;\\n }\\n\\n lowp float dist = texture2D(u_texture, v_tex).a;\\n lowp float fade_alpha = texture2D(u_fadetexture, v_fade_tex).a;\\n highp float gamma_scaled = gamma * v_gamma_scale;\\n highp float alpha = smoothstep(buff - gamma_scaled, buff + gamma_scaled, dist) * fade_alpha;\\n\\n gl_FragColor = color * (alpha * opacity);\\n\\n#ifdef OVERDRAW_INSPECTOR\\n gl_FragColor = vec4(1.0);\\n#endif\\n}\\n\",vertexSource:\"const float PI = 3.141592653589793;\\n\\nattribute vec4 a_pos_offset;\\nattribute vec2 a_texture_pos;\\nattribute vec4 a_data;\\n\\n#pragma mapbox: define lowp vec4 fill_color\\n#pragma mapbox: define lowp vec4 halo_color\\n#pragma mapbox: define lowp float opacity\\n#pragma mapbox: define lowp float halo_width\\n#pragma mapbox: define lowp float halo_blur\\n\\n// matrix is for the vertex position.\\nuniform mat4 u_matrix;\\n\\nuniform mediump float u_zoom;\\nuniform bool u_rotate_with_map;\\nuniform bool u_pitch_with_map;\\nuniform mediump float u_pitch;\\nuniform mediump float u_bearing;\\nuniform mediump float u_aspect_ratio;\\nuniform vec2 u_extrude_scale;\\n\\nuniform vec2 u_texsize;\\n\\nvarying vec2 v_tex;\\nvarying vec2 v_fade_tex;\\nvarying float v_gamma_scale;\\n\\nvoid main() {\\n #pragma mapbox: initialize lowp vec4 fill_color\\n #pragma mapbox: initialize lowp vec4 halo_color\\n #pragma mapbox: initialize lowp float opacity\\n #pragma mapbox: initialize lowp float halo_width\\n #pragma mapbox: initialize lowp float halo_blur\\n\\n vec2 a_pos = a_pos_offset.xy;\\n vec2 a_offset = a_pos_offset.zw;\\n\\n vec2 a_tex = a_texture_pos.xy;\\n mediump float a_labelminzoom = a_data[0];\\n mediump vec2 a_zoom = a_data.pq;\\n mediump float a_minzoom = a_zoom[0];\\n mediump float a_maxzoom = a_zoom[1];\\n\\n // u_zoom is the current zoom level adjusted for the change in font size\\n mediump float z = 2.0 - step(a_minzoom, u_zoom) - (1.0 - step(a_maxzoom, u_zoom));\\n\\n // pitch-alignment: map\\n // rotation-alignment: map | viewport\\n if (u_pitch_with_map) {\\n lowp float angle = u_rotate_with_map ? (a_data[1] / 256.0 * 2.0 * PI) : u_bearing;\\n lowp float asin = sin(angle);\\n lowp float acos = cos(angle);\\n mat2 RotationMatrix = mat2(acos, asin, -1.0 * asin, acos);\\n vec2 offset = RotationMatrix * a_offset;\\n vec2 extrude = u_extrude_scale * (offset / 64.0);\\n gl_Position = u_matrix * vec4(a_pos + extrude, 0, 1);\\n gl_Position.z += z * gl_Position.w;\\n // pitch-alignment: viewport\\n // rotation-alignment: map\\n } else if (u_rotate_with_map) {\\n // foreshortening factor to apply on pitched maps\\n // as a label goes from horizontal <=> vertical in angle\\n // it goes from 0% foreshortening to up to around 70% foreshortening\\n lowp float pitchfactor = 1.0 - cos(u_pitch * sin(u_pitch * 0.75));\\n\\n lowp float lineangle = a_data[1] / 256.0 * 2.0 * PI;\\n\\n // use the lineangle to position points a,b along the line\\n // project the points and calculate the label angle in projected space\\n // this calculation allows labels to be rendered unskewed on pitched maps\\n vec4 a = u_matrix * vec4(a_pos, 0, 1);\\n vec4 b = u_matrix * vec4(a_pos + vec2(cos(lineangle),sin(lineangle)), 0, 1);\\n lowp float angle = atan((b[1]/b[3] - a[1]/a[3])/u_aspect_ratio, b[0]/b[3] - a[0]/a[3]);\\n lowp float asin = sin(angle);\\n lowp float acos = cos(angle);\\n mat2 RotationMatrix = mat2(acos, -1.0 * asin, asin, acos);\\n\\n vec2 offset = RotationMatrix * (vec2((1.0-pitchfactor)+(pitchfactor*cos(angle*2.0)), 1.0) * a_offset);\\n vec2 extrude = u_extrude_scale * (offset / 64.0);\\n gl_Position = u_matrix * vec4(a_pos, 0, 1) + vec4(extrude, 0, 0);\\n gl_Position.z += z * gl_Position.w;\\n // pitch-alignment: viewport\\n // rotation-alignment: viewport\\n } else {\\n vec2 extrude = u_extrude_scale * (a_offset / 64.0);\\n gl_Position = u_matrix * vec4(a_pos, 0, 1) + vec4(extrude, 0, 0);\\n }\\n\\n v_gamma_scale = gl_Position.w;\\n\\n v_tex = a_tex / u_texsize;\\n v_fade_tex = vec2(a_labelminzoom / 255.0, 0.0);\\n}\\n\"}};\n},{\"path\":23}],80:[function(require,module,exports){\n\"use strict\";var VertexArrayObject=function(){this.boundProgram=null,this.boundVertexBuffer=null,this.boundVertexBuffer2=null,this.boundElementBuffer=null,this.boundVertexOffset=null,this.vao=null};VertexArrayObject.prototype.bind=function(e,t,r,i,n,o){void 0===e.extVertexArrayObject&&(e.extVertexArrayObject=e.getExtension(\"OES_vertex_array_object\"));var s=!this.vao||this.boundProgram!==t||this.boundVertexBuffer!==r||this.boundVertexBuffer2!==n||this.boundElementBuffer!==i||this.boundVertexOffset!==o;!e.extVertexArrayObject||s?(this.freshBind(e,t,r,i,n,o),this.gl=e):e.extVertexArrayObject.bindVertexArrayOES(this.vao)},VertexArrayObject.prototype.freshBind=function(e,t,r,i,n,o){var s,u=t.numAttributes;if(e.extVertexArrayObject)this.vao&&this.destroy(),this.vao=e.extVertexArrayObject.createVertexArrayOES(),e.extVertexArrayObject.bindVertexArrayOES(this.vao),s=0,this.boundProgram=t,this.boundVertexBuffer=r,this.boundVertexBuffer2=n,this.boundElementBuffer=i,this.boundVertexOffset=o;else{s=e.currentNumAttributes||0;for(var b=u;bthis.maxzoom?Math.pow(2,t.coord.z-this.maxzoom):1,r={type:this.type,uid:t.uid,coord:t.coord,zoom:t.coord.z,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,overscaling:i,angle:this.map.transform.angle,pitch:this.map.transform.pitch,showCollisionBoxes:this.map.showCollisionBoxes};t.workerID=this.dispatcher.send(\"loadTile\",r,function(i,r){if(t.unloadVectorData(),!t.aborted)return i?e(i):(t.loadVectorData(r,o.map.painter),t.redoWhenDone&&(t.redoWhenDone=!1,t.redoPlacement(o)),e(null))},this.workerID)},e.prototype.abortTile=function(t){t.aborted=!0},e.prototype.unloadTile=function(t){t.unloadVectorData(),this.dispatcher.send(\"removeTile\",{uid:t.uid,type:this.type,source:this.id},function(){},t.workerID)},e.prototype.onRemove=function(){this.dispatcher.broadcast(\"removeSource\",{type:this.type,source:this.id},function(){})},e.prototype.serialize=function(){return{type:this.type,data:this._data}},e}(Evented);module.exports=GeoJSONSource;\n},{\"../data/extent\":54,\"../util/evented\":200,\"../util/util\":212,\"../util/window\":194}],83:[function(require,module,exports){\n\"use strict\";var ajax=require(\"../util/ajax\"),rewind=require(\"geojson-rewind\"),GeoJSONWrapper=require(\"./geojson_wrapper\"),vtpbf=require(\"vt-pbf\"),supercluster=require(\"supercluster\"),geojsonvt=require(\"geojson-vt\"),VectorTileWorkerSource=require(\"./vector_tile_worker_source\"),GeoJSONWorkerSource=function(e){function r(r,t,o){e.call(this,r,t),o&&(this.loadGeoJSON=o),this._geoJSONIndexes={}}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.loadVectorData=function(e,r){var t=e.source,o=e.coord;if(!this._geoJSONIndexes[t])return r(null,null);var n=this._geoJSONIndexes[t].getTile(Math.min(o.z,e.maxZoom),o.x,o.y);if(!n)return r(null,null);var u=new GeoJSONWrapper(n.features);u.name=\"_geojsonTileLayer\";var a=vtpbf({layers:{_geojsonTileLayer:u}});0===a.byteOffset&&a.byteLength===a.buffer.byteLength||(a=new Uint8Array(a)),u.rawData=a.buffer,r(null,u)},r.prototype.loadData=function(e,r){var t=function(t,o){var n=this;return t?r(t):\"object\"!=typeof o?r(new Error(\"Input data is not a valid GeoJSON object.\")):(rewind(o,!0),void this._indexData(o,e,function(t,o){return t?r(t):(n._geoJSONIndexes[e.source]=o,void r(null))}))}.bind(this);this.loadGeoJSON(e,t)},r.prototype.loadGeoJSON=function(e,r){if(e.url)ajax.getJSON(e.url,r);else{if(\"string\"!=typeof e.data)return r(new Error(\"Input data is not a valid GeoJSON object.\"));try{return r(null,JSON.parse(e.data))}catch(e){return r(new Error(\"Input data is not a valid GeoJSON object.\"))}}},r.prototype.removeSource=function(e){this._geoJSONIndexes[e.source]&&delete this._geoJSONIndexes[e.source]},r.prototype._indexData=function(e,r,t){try{r.cluster?t(null,supercluster(r.superclusterOptions).load(e.features)):t(null,geojsonvt(e,r.geojsonVtOptions))}catch(e){return t(e)}},r}(VectorTileWorkerSource);module.exports=GeoJSONWorkerSource;\n},{\"../util/ajax\":191,\"./geojson_wrapper\":84,\"./vector_tile_worker_source\":96,\"geojson-rewind\":7,\"geojson-vt\":11,\"supercluster\":29,\"vt-pbf\":38}],84:[function(require,module,exports){\n\"use strict\";var Point=require(\"point-geometry\"),VectorTileFeature=require(\"vector-tile\").VectorTileFeature,EXTENT=require(\"../data/extent\"),FeatureWrapper=function(e){var t=this;if(this.type=e.type,1===e.type){this.rawGeometry=[];for(var r=0;rt)){var n=Math.pow(2,Math.min(a.coord.z,i._source.maxzoom)-Math.min(e.z,i._source.maxzoom));if(Math.floor(a.coord.x/n)===e.x&&Math.floor(a.coord.y/n)===e.y)for(o[s]=!0,r=!0;a&&a.coord.z-1>e.z;){var d=a.coord.parent(i._source.maxzoom).id;a=i._tiles[d],a&&a.hasData()&&(delete o[s],o[d]=!0)}}}return r},t.prototype.findLoadedParent=function(e,t,o){for(var i=this,r=e.z-1;r>=t;r--){e=e.parent(i._source.maxzoom);var s=i._tiles[e.id];if(s&&s.hasData())return o[e.id]=!0,s;if(i._cache.has(e.id))return o[e.id]=!0,i._cache.getWithoutRemoving(e.id)}},t.prototype.updateCacheSize=function(e){var t=Math.ceil(e.width/e.tileSize)+1,o=Math.ceil(e.height/e.tileSize)+1,i=t*o,r=5;this._cache.setMaxSize(Math.floor(i*r))},t.prototype.update=function(e){var o=this;if(this.transform=e,this._sourceLoaded){var i,r,s,a;this.updateCacheSize(e);var n=(this._source.roundZoom?Math.round:Math.floor)(this.getZoom(e)),d=Math.max(n-t.maxOverzooming,this._source.minzoom),c=Math.max(n+t.maxUnderzooming,this._source.minzoom),h={};this._coveredTiles={};var u;for(u=this.used?this._source.coord?[this._source.coord]:e.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}):[],i=0;i=Date.now())&&(o.findLoadedChildren(r,c,h)&&(h[_]=!0),a=o.findLoadedParent(r,d,l),a&&o.addTile(a.coord))}var f;for(f in l)h[f]||(o._coveredTiles[f]=!0);for(f in l)h[f]=!0;var T=util.keysDifference(this._tiles,h);for(i=0;ithis._source.maxzoom?Math.pow(2,r-this._source.maxzoom):1;t=new Tile(o,this._source.tileSize*s,this._source.maxzoom),this.loadTile(t,this._tileLoaded.bind(this,t,e.id,t.state))}return t.uses++,this._tiles[e.id]=t,i||this._source.fire(\"dataloading\",{tile:t,coord:t.coord,dataType:\"source\"}),t},t.prototype._setTileReloadTimer=function(e,t){var o=this,i=t.getExpiryTimeout();i&&(this._timers[e]=setTimeout(function(){o.reloadTile(e,\"expired\"),o._timers[e]=void 0},i))},t.prototype._setCacheInvalidationTimer=function(e,t){var o=this,i=t.getExpiryTimeout();i&&(this._cacheTimers[e]=setTimeout(function(){o._cache.remove(e),o._cacheTimers[e]=void 0},i))},t.prototype.removeTile=function(e){var t=this._tiles[e];if(t&&(t.uses--,delete this._tiles[e],this._timers[e]&&(clearTimeout(this._timers[e]),this._timers[e]=void 0),!(t.uses>0)))if(t.hasData()){var o=t.coord.wrapped().id;this._cache.add(o,t),this._setCacheInvalidationTimer(o,t)}else t.aborted=!0,this.abortTile(t),this.unloadTile(t)},t.prototype.clearTiles=function(){var e=this;for(var t in e._tiles)e.removeTile(t);this._cache.reset()},t.prototype.tilesIn=function(e){for(var t=this,o={},i=this.getIds(),r=1/0,s=1/0,a=-(1/0),n=-(1/0),d=e[0].zoom,c=0;c=0&&p[1].y>=0){for(var _=[],f=0;fo)r=!1;else if(t)if(this.expirationTimei.row){var o=t;t=i,i=o}return{x0:t.column,y0:t.row,x1:i.column,y1:i.row,dx:i.column-t.column,dy:i.row-t.row}}function scanSpans(t,i,o,r,e){var n=Math.max(o,Math.floor(i.y0)),h=Math.min(r,Math.ceil(i.y1));if(t.x0===i.x0&&t.y0===i.y0?t.x0+i.dy/t.dy*t.dx0,l=i.dx<0,u=n;ua.dy&&(h=s,s=a,a=h),s.dy>d.dy&&(h=s,s=d,d=h),a.dy>d.dy&&(h=a,a=d,d=h),s.dy&&scanSpans(d,s,r,e,n),a.dy&&scanSpans(d,a,r,e,n)}function getQuadkey(t,i,o){for(var r,e=\"\",n=t;n>0;n--)r=1<t?new TileCoord(this.z-1,this.x,this.y,this.w):new TileCoord(this.z-1,Math.floor(this.x/2),Math.floor(this.y/2),this.w)},TileCoord.prototype.wrapped=function(){return new TileCoord(this.z,this.x,this.y,0)},TileCoord.prototype.children=function(t){if(this.z>=t)return[new TileCoord(this.z+1,this.x,this.y,this.w)];var i=this.z+1,o=2*this.x,r=2*this.y;return[new TileCoord(i,o,r,this.w),new TileCoord(i,o+1,r,this.w),new TileCoord(i,o,r+1,this.w),new TileCoord(i,o+1,r+1,this.w)]},TileCoord.cover=function(t,i,o,r){function e(t,i,e){var s,a,d,y;if(e>=0&&e<=n)for(s=t;sthis.maxzoom?Math.pow(2,e.coord.z-this.maxzoom):1,r={url:normalizeURL(e.coord.url(this.tiles,this.maxzoom,this.scheme),this.url),uid:e.uid,coord:e.coord,zoom:e.coord.z,tileSize:this.tileSize*o,type:this.type,source:this.id,overscaling:o,angle:this.map.transform.angle,pitch:this.map.transform.pitch,showCollisionBoxes:this.map.showCollisionBoxes};e.workerID&&\"expired\"!==e.state?\"loading\"===e.state?e.reloadCallback=t:this.dispatcher.send(\"reloadTile\",r,i.bind(this),e.workerID):e.workerID=this.dispatcher.send(\"loadTile\",r,i.bind(this))},t.prototype.abortTile=function(e){this.dispatcher.send(\"abortTile\",{uid:e.uid,type:this.type,source:this.id},null,e.workerID)},t.prototype.unloadTile=function(e){e.unloadVectorData(),this.dispatcher.send(\"removeTile\",{uid:e.uid,type:this.type,source:this.id},null,e.workerID)},t}(Evented);module.exports=VectorTileSource;\n},{\"../util/evented\":200,\"../util/mapbox\":208,\"../util/util\":212,\"./load_tilejson\":86}],96:[function(require,module,exports){\n\"use strict\";var ajax=require(\"../util/ajax\"),vt=require(\"vector-tile\"),Protobuf=require(\"pbf\"),WorkerTile=require(\"./worker_tile\"),util=require(\"../util/util\"),VectorTileWorkerSource=function(e,r,t){this.actor=e,this.layerIndex=r,t&&(this.loadVectorData=t),this.loading={},this.loaded={}};VectorTileWorkerSource.prototype.loadTile=function(e,r){function t(e,t){return delete this.loading[o][i],e?r(e):t?(a.vectorTile=t,a.parse(t,this.layerIndex,this.actor,function(e,o,i){if(e)return r(e);var a={};t.expires&&(a.expires=t.expires),t.cacheControl&&(a.cacheControl=t.cacheControl),r(null,util.extend({rawTileData:t.rawData},o,a),i)}),this.loaded[o]=this.loaded[o]||{},void(this.loaded[o][i]=a)):r(null,null)}var o=e.source,i=e.uid;this.loading[o]||(this.loading[o]={});var a=this.loading[o][i]=new WorkerTile(e);a.abort=this.loadVectorData(e,t.bind(this))},VectorTileWorkerSource.prototype.reloadTile=function(e,r){function t(e,t){if(this.reloadCallback){var o=this.reloadCallback;delete this.reloadCallback,this.parse(this.vectorTile,a.layerIndex,a.actor,o)}r(e,t)}var o=this.loaded[e.source],i=e.uid,a=this;if(o&&o[i]){var l=o[i];\"parsing\"===l.status?l.reloadCallback=r:\"done\"===l.status&&l.parse(l.vectorTile,this.layerIndex,this.actor,t.bind(l))}},VectorTileWorkerSource.prototype.abortTile=function(e){var r=this.loading[e.source],t=e.uid;r&&r[t]&&r[t].abort&&(r[t].abort(),delete r[t])},VectorTileWorkerSource.prototype.removeTile=function(e){var r=this.loaded[e.source],t=e.uid;r&&r[t]&&delete r[t]},VectorTileWorkerSource.prototype.loadVectorData=function(e,r){function t(e,t){if(e)return r(e);var o=new vt.VectorTile(new Protobuf(t.data));o.rawData=t.data,o.cacheControl=t.cacheControl,o.expires=t.expires,r(e,o)}var o=ajax.getArrayBuffer(e.url,t.bind(this));return function(){o.abort()}},VectorTileWorkerSource.prototype.redoPlacement=function(e,r){var t=this.loaded[e.source],o=this.loading[e.source],i=e.uid;if(t&&t[i]){var a=t[i],l=a.redoPlacement(e.angle,e.pitch,e.showCollisionBoxes);l.result&&r(null,l.result,l.transferables)}else o&&o[i]&&(o[i].angle=e.angle)},module.exports=VectorTileWorkerSource;\n},{\"../util/ajax\":191,\"../util/util\":212,\"./worker_tile\":99,\"pbf\":25,\"vector-tile\":34}],97:[function(require,module,exports){\n\"use strict\";var ajax=require(\"../util/ajax\"),ImageSource=require(\"./image_source\"),VideoSource=function(t){function e(e,o,i,r){t.call(this,e,o,i,r),this.roundZoom=!0,this.type=\"video\",this.options=o}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.load=function(){var t=this,e=this.options;this.urls=e.urls,ajax.getVideo(e.urls,function(e,o){if(e)return t.fire(\"error\",{error:e});t.video=o,t.video.loop=!0;var i;t.video.addEventListener(\"playing\",function(){i=t.map.style.animationLoop.set(1/0),t.map._rerender()}),t.video.addEventListener(\"pause\",function(){t.map.style.animationLoop.cancel(i)}),t.map&&t.video.play(),t._finishLoading()})},e.prototype.getVideo=function(){return this.video},e.prototype.onAdd=function(t){this.map||(this.load(),this.map=t,this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},e.prototype.prepare=function(){!this.tile||this.video.readyState<2||this._prepareImage(this.map.painter.gl,this.video)},e.prototype.serialize=function(){return{type:\"video\",urls:this.urls,coordinates:this.coordinates}},e}(ImageSource);module.exports=VideoSource;\n},{\"../util/ajax\":191,\"./image_source\":85}],98:[function(require,module,exports){\n\"use strict\";var Actor=require(\"../util/actor\"),StyleLayerIndex=require(\"../style/style_layer_index\"),VectorTileWorkerSource=require(\"./vector_tile_worker_source\"),GeoJSONWorkerSource=require(\"./geojson_worker_source\"),globalRTLTextPlugin=require(\"./rtl_text_plugin\"),Worker=function(e){var r=this;this.self=e,this.actor=new Actor(e,this),this.layerIndexes={},this.workerSourceTypes={vector:VectorTileWorkerSource,geojson:GeoJSONWorkerSource},this.workerSources={},this.self.registerWorkerSource=function(e,o){if(r.workerSourceTypes[e])throw new Error('Worker source with name \"'+e+'\" already registered.');r.workerSourceTypes[e]=o},this.self.registerRTLTextPlugin=function(e){if(globalRTLTextPlugin.applyArabicShaping||globalRTLTextPlugin.processBidirectionalText)throw new Error(\"RTL text plugin already registered.\");globalRTLTextPlugin.applyArabicShaping=e.applyArabicShaping,globalRTLTextPlugin.processBidirectionalText=e.processBidirectionalText}};Worker.prototype.setLayers=function(e,r){this.getLayerIndex(e).replace(r)},Worker.prototype.updateLayers=function(e,r){this.getLayerIndex(e).update(r.layers,r.removedIds,r.symbolOrder)},Worker.prototype.loadTile=function(e,r,o){this.getWorkerSource(e,r.type).loadTile(r,o)},Worker.prototype.reloadTile=function(e,r,o){this.getWorkerSource(e,r.type).reloadTile(r,o)},Worker.prototype.abortTile=function(e,r){this.getWorkerSource(e,r.type).abortTile(r)},Worker.prototype.removeTile=function(e,r){this.getWorkerSource(e,r.type).removeTile(r)},Worker.prototype.removeSource=function(e,r){var o=this.getWorkerSource(e,r.type);void 0!==o.removeSource&&o.removeSource(r)},Worker.prototype.redoPlacement=function(e,r,o){this.getWorkerSource(e,r.type).redoPlacement(r,o)},Worker.prototype.loadWorkerSource=function(e,r,o){try{this.self.importScripts(r.url),o()}catch(e){o(e)}},Worker.prototype.loadRTLTextPlugin=function(e,r,o){try{globalRTLTextPlugin.applyArabicShaping||globalRTLTextPlugin.processBidirectionalText||this.self.importScripts(r)}catch(e){o(e)}},Worker.prototype.getLayerIndex=function(e){var r=this.layerIndexes[e];return r||(r=this.layerIndexes[e]=new StyleLayerIndex),r},Worker.prototype.getWorkerSource=function(e,r){var o=this;if(this.workerSources[e]||(this.workerSources[e]={}),!this.workerSources[e][r]){var t={send:function(r,t,i,n){o.actor.send(r,t,i,n,e)}};this.workerSources[e][r]=new this.workerSourceTypes[r](t,this.getLayerIndex(e))}return this.workerSources[e][r]},module.exports=function(e){return new Worker(e)};\n},{\"../style/style_layer_index\":154,\"../util/actor\":190,\"./geojson_worker_source\":83,\"./rtl_text_plugin\":90,\"./vector_tile_worker_source\":96}],99:[function(require,module,exports){\n\"use strict\";function recalculateLayers(e,i){for(var r=0,o=e.layers;r=B.maxzoom||B.layout&&\"none\"===B.layout.visibility)){for(var b=0,k=x;b=0;w--){var A=n[i.symbolOrder[w]];A&&t.symbolBuckets.push(A)}if(0===this.symbolBuckets.length)return T(new CollisionTile(this.angle,this.pitch,this.collisionBoxArray));var D=0,I=Object.keys(c.iconDependencies),O=util.mapObject(c.glyphDependencies,function(e){return Object.keys(e).map(Number)}),L=function(e){if(e)return o(e);if(D++,2===D){for(var i=new CollisionTile(t.angle,t.pitch,t.collisionBoxArray),r=0,s=t.symbolBuckets;r\"===i||\"<=\"===i||\">=\"===i?compileComparisonOp(e[1],e[2],i,!0):\"any\"===i?compileLogicalOp(e.slice(1),\"||\"):\"all\"===i?compileLogicalOp(e.slice(1),\"&&\"):\"none\"===i?compileNegation(compileLogicalOp(e.slice(1),\"||\")):\"in\"===i?compileInOp(e[1],e.slice(2)):\"!in\"===i?compileNegation(compileInOp(e[1],e.slice(2))):\"has\"===i?compileHasOp(e[1]):\"!has\"===i?compileNegation(compileHasOp(e[1])):\"true\";return\"(\"+n+\")\"}function compilePropertyReference(e){return\"$type\"===e?\"f.type\":\"$id\"===e?\"f.id\":\"p[\"+JSON.stringify(e)+\"]\"}function compileComparisonOp(e,i,n,r){var o=compilePropertyReference(e),t=\"$type\"===e?types.indexOf(i):JSON.stringify(i);return(r?\"typeof \"+o+\"=== typeof \"+t+\"&&\":\"\")+o+n+t}function compileLogicalOp(e,i){return e.map(compile).join(i)}function compileInOp(e,i){\"$type\"===e&&(i=i.map(function(e){return types.indexOf(e)}));var n=JSON.stringify(i.sort(compare)),r=compilePropertyReference(e);return i.length<=200?n+\".indexOf(\"+r+\") !== -1\":\"function(v, a, i, j) {while (i <= j) { var m = (i + j) >> 1; if (a[m] === v) return true; if (a[m] > v) j = m - 1; else i = m + 1;}return false; }(\"+r+\", \"+n+\",0,\"+(i.length-1)+\")\"}function compileHasOp(e){return\"$id\"===e?'\"id\" in f':JSON.stringify(e)+\" in p\"}function compileNegation(e){return\"!(\"+e+\")\"}function compare(e,i){return ei?1:0}module.exports=createFilter;var types=[\"Unknown\",\"Point\",\"LineString\",\"Polygon\"];\n},{}],104:[function(require,module,exports){\n\"use strict\";function xyz2lab(r){return r>t3?Math.pow(r,1/3):r/t2+t0}function lab2xyz(r){return r>t1?r*r*r:t2*(r-t0)}function xyz2rgb(r){return 255*(r<=.0031308?12.92*r:1.055*Math.pow(r,1/2.4)-.055)}function rgb2xyz(r){return r/=255,r<=.04045?r/12.92:Math.pow((r+.055)/1.055,2.4)}function rgbToLab(r){var t=rgb2xyz(r[0]),a=rgb2xyz(r[1]),n=rgb2xyz(r[2]),b=xyz2lab((.4124564*t+.3575761*a+.1804375*n)/Xn),o=xyz2lab((.2126729*t+.7151522*a+.072175*n)/Yn),g=xyz2lab((.0193339*t+.119192*a+.9503041*n)/Zn);return[116*o-16,500*(b-o),200*(o-g),r[3]]}function labToRgb(r){var t=(r[0]+16)/116,a=isNaN(r[1])?t:t+r[1]/500,n=isNaN(r[2])?t:t-r[2]/200;return t=Yn*lab2xyz(t),a=Xn*lab2xyz(a),n=Zn*lab2xyz(n),[xyz2rgb(3.2404542*a-1.5371385*t-.4985314*n),xyz2rgb(-.969266*a+1.8760108*t+.041556*n),xyz2rgb(.0556434*a-.2040259*t+1.0572252*n),r[3]]}function rgbToHcl(r){var t=rgbToLab(r),a=t[0],n=t[1],b=t[2],o=Math.atan2(b,n)*rad2deg;return[o<0?o+360:o,Math.sqrt(n*n+b*b),a,r[3]]}function hclToRgb(r){var t=r[0]*deg2rad,a=r[1],n=r[2];return labToRgb([n,Math.cos(t)*a,Math.sin(t)*a,r[3]])}var Xn=.95047,Yn=1,Zn=1.08883,t0=4/29,t1=6/29,t2=3*t1*t1,t3=t1*t1*t1,deg2rad=Math.PI/180,rad2deg=180/Math.PI;module.exports={lab:{forward:rgbToLab,reverse:labToRgb},hcl:{forward:rgbToHcl,reverse:hclToRgb}};\n},{}],105:[function(require,module,exports){\n\"use strict\";function identityFunction(t){return t}function createFunction(t,e){var o,n=\"color\"===e.type;if(isFunctionDefinition(t)){var r=t.stops&&\"object\"==typeof t.stops[0][0],a=r||void 0!==t.property,i=r||!a,s=t.type||(\"interpolated\"===e.function?\"exponential\":\"interval\");n&&(t=extend({},t),t.stops&&(t.stops=t.stops.map(function(t){return[t[0],parseColor(t[1])]})),t.default?t.default=parseColor(t.default):t.default=parseColor(e.default));var u,p,l;if(\"exponential\"===s)u=evaluateExponentialFunction;else if(\"interval\"===s)u=evaluateIntervalFunction;else if(\"categorical\"===s){u=evaluateCategoricalFunction,p=Object.create(null);for(var c=0,f=t.stops;c=t.stops[n-1][0])return t.stops[n-1][1];var r=binarySearchForIndex(t.stops,o);return t.stops[r][1]}function evaluateExponentialFunction(t,e,o){var n=void 0!==t.base?t.base:1;if(\"number\"!==getType(o))return coalesce(t.default,e.default);var r=t.stops.length;if(1===r)return t.stops[0][1];if(o<=t.stops[0][0])return t.stops[0][1];if(o>=t.stops[r-1][0])return t.stops[r-1][1];var a=binarySearchForIndex(t.stops,o);return interpolate(o,n,t.stops[a][0],t.stops[a+1][0],t.stops[a][1],t.stops[a+1][1])}function evaluateIdentityFunction(t,e,o){return\"color\"===e.type?o=parseColor(o):getType(o)!==e.type&&(o=void 0),coalesce(o,t.default,e.default)}function binarySearchForIndex(t,e){for(var o,n,r=t.length,a=0,i=r-1,s=0;a<=i;){if(s=Math.floor((a+i)/2),o=t[s][0],n=t[s+1][0],e>=o&&ee&&(i=s-1)}return Math.max(s-1,0)}function interpolate(t,e,o,n,r,a){return\"function\"==typeof r?function(){var i=r.apply(void 0,arguments),s=a.apply(void 0,arguments);if(void 0!==i&&void 0!==s)return interpolate(t,e,o,n,i,s)}:r.length?interpolateArray(t,e,o,n,r,a):interpolateNumber(t,e,o,n,r,a)}function interpolateNumber(t,e,o,n,r,a){var i,s=n-o,u=t-o;return i=1===e?u/s:(Math.pow(e,u)-1)/(Math.pow(e,s)-1),r*(1-i)+a*i}function interpolateArray(t,e,o,n,r,a){for(var i=[],s=0;s255?255:e}function clamp_css_float(e){return e<0?0:e>1?1:e}function parse_css_int(e){return clamp_css_byte(\"%\"===e[e.length-1]?parseFloat(e)/100*255:parseInt(e))}function parse_css_float(e){return clamp_css_float(\"%\"===e[e.length-1]?parseFloat(e)/100:parseFloat(e))}function css_hue_to_rgb(e,r,l){return l<0?l+=1:l>1&&(l-=1),6*l<1?e+(r-e)*l*6:2*l<1?r:3*l<2?e+(r-e)*(2/3-l)*6:e}function parseCSSColor(e){var r=e.replace(/ /g,\"\").toLowerCase();if(r in kCSSColorTable)return kCSSColorTable[r].slice();if(\"#\"===r[0]){if(4===r.length){var l=parseInt(r.substr(1),16);return l>=0&&l<=4095?[(3840&l)>>4|(3840&l)>>8,240&l|(240&l)>>4,15&l|(15&l)<<4,1]:null}if(7===r.length){var l=parseInt(r.substr(1),16);return l>=0&&l<=16777215?[(16711680&l)>>16,(65280&l)>>8,255&l,1]:null}return null}var a=r.indexOf(\"(\"),t=r.indexOf(\")\");if(a!==-1&&t+1===r.length){var n=r.substr(0,a),s=r.substr(a+1,t-(a+1)).split(\",\"),o=1;switch(n){case\"rgba\":if(4!==s.length)return null;o=parse_css_float(s.pop());case\"rgb\":return 3!==s.length?null:[parse_css_int(s[0]),parse_css_int(s[1]),parse_css_int(s[2]),o];case\"hsla\":if(4!==s.length)return null;o=parse_css_float(s.pop());case\"hsl\":if(3!==s.length)return null;var i=(parseFloat(s[0])%360+360)%360/360,u=parse_css_float(s[1]),g=parse_css_float(s[2]),d=g<=.5?g*(u+1):g+u-g*u,c=2*g-d;return[clamp_css_byte(255*css_hue_to_rgb(c,d,i+1/3)),clamp_css_byte(255*css_hue_to_rgb(c,d,i)),clamp_css_byte(255*css_hue_to_rgb(c,d,i-1/3)),o];default:return null}}return null}var kCSSColorTable={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};try{exports.parseCSSColor=parseCSSColor}catch(e){}\n},{}],108:[function(require,module,exports){\nfunction sss(r){var e,t,s,n,u,a;switch(typeof r){case\"object\":if(null===r)return null;if(isArray(r)){for(s=\"[\",t=r.length-1,e=0;e-1&&(s+=sss(r[e])),s+\"]\"}for(n=objKeys(r).sort(),t=n.length,s=\"{\",u=n[e=0],a=t>0&&void 0!==r[u];e15?\"\\\\u00\"+e.toString(16):\"\\\\u000\"+e.toString(16)}};module.exports=function(r){if(void 0!==r)return\"\"+sss(r)},module.exports.stringSearch=strReg,module.exports.stringReplace=strReplace;\n},{}],109:[function(require,module,exports){\nfunction isObjectLike(r){return!!r&&\"object\"==typeof r}function arraySome(r,e){for(var a=-1,t=r.length;++as))return!1;for(;++c-1&&t%1==0&&t<=MAX_SAFE_INTEGER}function isObject(t){var e=typeof t;return!!t&&(\"object\"==e||\"function\"==e)}function isObjectLike(t){return!!t&&\"object\"==typeof t}var MAX_SAFE_INTEGER=9007199254740991,argsTag=\"[object Arguments]\",funcTag=\"[object Function]\",genTag=\"[object GeneratorFunction]\",objectProto=Object.prototype,hasOwnProperty=objectProto.hasOwnProperty,objectToString=objectProto.toString,propertyIsEnumerable=objectProto.propertyIsEnumerable;module.exports=isArguments;\n},{}],113:[function(require,module,exports){\nfunction isObjectLike(t){return!!t&&\"object\"==typeof t}function getNative(t,r){var e=null==t?void 0:t[r];return isNative(e)?e:void 0}function isLength(t){return\"number\"==typeof t&&t>-1&&t%1==0&&t<=MAX_SAFE_INTEGER}function isFunction(t){return isObject(t)&&objToString.call(t)==funcTag}function isObject(t){var r=typeof t;return!!t&&(\"object\"==r||\"function\"==r)}function isNative(t){return null!=t&&(isFunction(t)?reIsNative.test(fnToString.call(t)):isObjectLike(t)&&reIsHostCtor.test(t))}var arrayTag=\"[object Array]\",funcTag=\"[object Function]\",reIsHostCtor=/^\\[object .+?Constructor\\]$/,objectProto=Object.prototype,fnToString=Function.prototype.toString,hasOwnProperty=objectProto.hasOwnProperty,objToString=objectProto.toString,reIsNative=RegExp(\"^\"+fnToString.call(hasOwnProperty).replace(/[\\\\^$.*+?()[\\]{}|]/g,\"\\\\$&\").replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g,\"$1.*?\")+\"$\"),nativeIsArray=getNative(Array,\"isArray\"),MAX_SAFE_INTEGER=9007199254740991,isArray=nativeIsArray||function(t){return isObjectLike(t)&&isLength(t.length)&&objToString.call(t)==arrayTag};module.exports=isArray;\n},{}],114:[function(require,module,exports){\nfunction isEqual(a,l,i,e){i=\"function\"==typeof i?bindCallback(i,e,3):void 0;var s=i?i(a,l):void 0;return void 0===s?baseIsEqual(a,l,i):!!s}var baseIsEqual=require(\"lodash._baseisequal\"),bindCallback=require(\"lodash._bindcallback\");module.exports=isEqual;\n},{\"lodash._baseisequal\":109,\"lodash._bindcallback\":110}],115:[function(require,module,exports){\nfunction isLength(a){return\"number\"==typeof a&&a>-1&&a%1==0&&a<=MAX_SAFE_INTEGER}function isObjectLike(a){return!!a&&\"object\"==typeof a}function isTypedArray(a){return isObjectLike(a)&&isLength(a.length)&&!!typedArrayTags[objectToString.call(a)]}var MAX_SAFE_INTEGER=9007199254740991,argsTag=\"[object Arguments]\",arrayTag=\"[object Array]\",boolTag=\"[object Boolean]\",dateTag=\"[object Date]\",errorTag=\"[object Error]\",funcTag=\"[object Function]\",mapTag=\"[object Map]\",numberTag=\"[object Number]\",objectTag=\"[object Object]\",regexpTag=\"[object RegExp]\",setTag=\"[object Set]\",stringTag=\"[object String]\",weakMapTag=\"[object WeakMap]\",arrayBufferTag=\"[object ArrayBuffer]\",dataViewTag=\"[object DataView]\",float32Tag=\"[object Float32Array]\",float64Tag=\"[object Float64Array]\",int8Tag=\"[object Int8Array]\",int16Tag=\"[object Int16Array]\",int32Tag=\"[object Int32Array]\",uint8Tag=\"[object Uint8Array]\",uint8ClampedTag=\"[object Uint8ClampedArray]\",uint16Tag=\"[object Uint16Array]\",uint32Tag=\"[object Uint32Array]\",typedArrayTags={};typedArrayTags[float32Tag]=typedArrayTags[float64Tag]=typedArrayTags[int8Tag]=typedArrayTags[int16Tag]=typedArrayTags[int32Tag]=typedArrayTags[uint8Tag]=typedArrayTags[uint8ClampedTag]=typedArrayTags[uint16Tag]=typedArrayTags[uint32Tag]=!0,typedArrayTags[argsTag]=typedArrayTags[arrayTag]=typedArrayTags[arrayBufferTag]=typedArrayTags[boolTag]=typedArrayTags[dataViewTag]=typedArrayTags[dateTag]=typedArrayTags[errorTag]=typedArrayTags[funcTag]=typedArrayTags[mapTag]=typedArrayTags[numberTag]=typedArrayTags[objectTag]=typedArrayTags[regexpTag]=typedArrayTags[setTag]=typedArrayTags[stringTag]=typedArrayTags[weakMapTag]=!1;var objectProto=Object.prototype,objectToString=objectProto.toString;module.exports=isTypedArray;\n},{}],116:[function(require,module,exports){\nfunction baseProperty(e){return function(t){return null==t?void 0:t[e]}}function isArrayLike(e){return null!=e&&isLength(getLength(e))}function isIndex(e,t){return e=\"number\"==typeof e||reIsUint.test(e)?+e:-1,t=null==t?MAX_SAFE_INTEGER:t,e>-1&&e%1==0&&e-1&&e%1==0&&e<=MAX_SAFE_INTEGER}function shimKeys(e){for(var t=keysIn(e),r=t.length,n=r&&e.length,s=!!n&&isLength(n)&&(isArray(e)||isArguments(e)),o=-1,i=[];++o0;++n\":{},\">=\":{},\"<\":{},\"<=\":{},\"in\":{},\"!in\":{},\"all\":{},\"any\":{},\"none\":{},\"has\":{},\"!has\":{}}},\"geometry_type\":{\"type\":\"enum\",\"values\":{\"Point\":{},\"LineString\":{},\"Polygon\":{}}},\"function\":{\"stops\":{\"type\":\"array\",\"value\":\"function_stop\"},\"base\":{\"type\":\"number\",\"default\":1,\"minimum\":0},\"property\":{\"type\":\"string\",\"default\":\"$zoom\"},\"type\":{\"type\":\"enum\",\"values\":{\"identity\":{},\"exponential\":{},\"interval\":{},\"categorical\":{}},\"default\":\"exponential\"},\"colorSpace\":{\"type\":\"enum\",\"values\":{\"rgb\":{},\"lab\":{},\"hcl\":{}},\"default\":\"rgb\"},\"default\":{\"type\":\"*\",\"required\":false}},\"function_stop\":{\"type\":\"array\",\"minimum\":0,\"maximum\":22,\"value\":[\"number\",\"color\"],\"length\":2},\"light\":{\"anchor\":{\"type\":\"enum\",\"default\":\"viewport\",\"values\":{\"map\":{},\"viewport\":{}},\"transition\":false},\"position\":{\"type\":\"array\",\"default\":[1.15,210,30],\"length\":3,\"value\":\"number\",\"transition\":true,\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":false},\"color\":{\"type\":\"color\",\"default\":\"#ffffff\",\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":false,\"transition\":true},\"intensity\":{\"type\":\"number\",\"default\":0.5,\"minimum\":0,\"maximum\":1,\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":false,\"transition\":true}},\"paint\":[\"paint_fill\",\"paint_line\",\"paint_circle\",\"paint_fill-extrusion\",\"paint_symbol\",\"paint_raster\",\"paint_background\"],\"paint_fill\":{\"fill-antialias\":{\"type\":\"boolean\",\"function\":\"piecewise-constant\",\"zoom-function\":true,\"default\":true},\"fill-opacity\":{\"type\":\"number\",\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"default\":1,\"minimum\":0,\"maximum\":1,\"transition\":true},\"fill-color\":{\"type\":\"color\",\"default\":\"#000000\",\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true,\"requires\":[{\"!\":\"fill-pattern\"}]},\"fill-outline-color\":{\"type\":\"color\",\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true,\"requires\":[{\"!\":\"fill-pattern\"},{\"fill-antialias\":true}]},\"fill-translate\":{\"type\":\"array\",\"value\":\"number\",\"length\":2,\"default\":[0,0],\"function\":\"interpolated\",\"zoom-function\":true,\"transition\":true,\"units\":\"pixels\"},\"fill-translate-anchor\":{\"type\":\"enum\",\"function\":\"piecewise-constant\",\"zoom-function\":true,\"values\":{\"map\":{},\"viewport\":{}},\"default\":\"map\",\"requires\":[\"fill-translate\"]},\"fill-pattern\":{\"type\":\"string\",\"function\":\"piecewise-constant\",\"zoom-function\":true,\"transition\":true}},\"paint_fill-extrusion\":{\"fill-extrusion-opacity\":{\"type\":\"number\",\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":false,\"default\":1,\"minimum\":0,\"maximum\":1,\"transition\":true},\"fill-extrusion-color\":{\"type\":\"color\",\"default\":\"#000000\",\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true,\"requires\":[{\"!\":\"fill-extrusion-pattern\"}]},\"fill-extrusion-translate\":{\"type\":\"array\",\"value\":\"number\",\"length\":2,\"default\":[0,0],\"function\":\"interpolated\",\"zoom-function\":true,\"transition\":true,\"units\":\"pixels\"},\"fill-extrusion-translate-anchor\":{\"type\":\"enum\",\"function\":\"piecewise-constant\",\"zoom-function\":true,\"values\":{\"map\":{},\"viewport\":{}},\"default\":\"map\",\"requires\":[\"fill-extrusion-translate\"]},\"fill-extrusion-pattern\":{\"type\":\"string\",\"function\":\"piecewise-constant\",\"zoom-function\":true,\"transition\":true},\"fill-extrusion-height\":{\"type\":\"number\",\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"default\":0,\"minimum\":0,\"units\":\"meters\",\"transition\":true},\"fill-extrusion-base\":{\"type\":\"number\",\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"default\":0,\"minimum\":0,\"units\":\"meters\",\"transition\":true,\"requires\":[\"fill-extrusion-height\"]}},\"paint_line\":{\"line-opacity\":{\"type\":\"number\",\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"default\":1,\"minimum\":0,\"maximum\":1,\"transition\":true},\"line-color\":{\"type\":\"color\",\"default\":\"#000000\",\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true,\"requires\":[{\"!\":\"line-pattern\"}]},\"line-translate\":{\"type\":\"array\",\"value\":\"number\",\"length\":2,\"default\":[0,0],\"function\":\"interpolated\",\"zoom-function\":true,\"transition\":true,\"units\":\"pixels\"},\"line-translate-anchor\":{\"type\":\"enum\",\"function\":\"piecewise-constant\",\"zoom-function\":true,\"values\":{\"map\":{},\"viewport\":{}},\"default\":\"map\",\"requires\":[\"line-translate\"]},\"line-width\":{\"type\":\"number\",\"default\":1,\"minimum\":0,\"function\":\"interpolated\",\"zoom-function\":true,\"transition\":true,\"units\":\"pixels\"},\"line-gap-width\":{\"type\":\"number\",\"default\":0,\"minimum\":0,\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true,\"units\":\"pixels\"},\"line-offset\":{\"type\":\"number\",\"default\":0,\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true,\"units\":\"pixels\"},\"line-blur\":{\"type\":\"number\",\"default\":0,\"minimum\":0,\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true,\"units\":\"pixels\"},\"line-dasharray\":{\"type\":\"array\",\"value\":\"number\",\"function\":\"piecewise-constant\",\"zoom-function\":true,\"minimum\":0,\"transition\":true,\"units\":\"line widths\",\"requires\":[{\"!\":\"line-pattern\"}]},\"line-pattern\":{\"type\":\"string\",\"function\":\"piecewise-constant\",\"zoom-function\":true,\"transition\":true}},\"paint_circle\":{\"circle-radius\":{\"type\":\"number\",\"default\":5,\"minimum\":0,\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true,\"units\":\"pixels\"},\"circle-color\":{\"type\":\"color\",\"default\":\"#000000\",\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true},\"circle-blur\":{\"type\":\"number\",\"default\":0,\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true},\"circle-opacity\":{\"type\":\"number\",\"default\":1,\"minimum\":0,\"maximum\":1,\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true},\"circle-translate\":{\"type\":\"array\",\"value\":\"number\",\"length\":2,\"default\":[0,0],\"function\":\"interpolated\",\"zoom-function\":true,\"transition\":true,\"units\":\"pixels\"},\"circle-translate-anchor\":{\"type\":\"enum\",\"function\":\"piecewise-constant\",\"zoom-function\":true,\"values\":{\"map\":{},\"viewport\":{}},\"default\":\"map\",\"requires\":[\"circle-translate\"]},\"circle-pitch-scale\":{\"type\":\"enum\",\"function\":\"piecewise-constant\",\"zoom-function\":true,\"values\":{\"map\":{},\"viewport\":{}},\"default\":\"map\"},\"circle-stroke-width\":{\"type\":\"number\",\"default\":0,\"minimum\":0,\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true,\"units\":\"pixels\"},\"circle-stroke-color\":{\"type\":\"color\",\"default\":\"#000000\",\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true},\"circle-stroke-opacity\":{\"type\":\"number\",\"default\":1,\"minimum\":0,\"maximum\":1,\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true}},\"paint_symbol\":{\"icon-opacity\":{\"type\":\"number\",\"default\":1,\"minimum\":0,\"maximum\":1,\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true,\"requires\":[\"icon-image\"]},\"icon-color\":{\"type\":\"color\",\"default\":\"#000000\",\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true,\"requires\":[\"icon-image\"]},\"icon-halo-color\":{\"type\":\"color\",\"default\":\"rgba(0, 0, 0, 0)\",\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true,\"requires\":[\"icon-image\"]},\"icon-halo-width\":{\"type\":\"number\",\"default\":0,\"minimum\":0,\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true,\"units\":\"pixels\",\"requires\":[\"icon-image\"]},\"icon-halo-blur\":{\"type\":\"number\",\"default\":0,\"minimum\":0,\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true,\"units\":\"pixels\",\"requires\":[\"icon-image\"]},\"icon-translate\":{\"type\":\"array\",\"value\":\"number\",\"length\":2,\"default\":[0,0],\"function\":\"interpolated\",\"zoom-function\":true,\"transition\":true,\"units\":\"pixels\",\"requires\":[\"icon-image\"]},\"icon-translate-anchor\":{\"type\":\"enum\",\"function\":\"piecewise-constant\",\"zoom-function\":true,\"values\":{\"map\":{},\"viewport\":{}},\"default\":\"map\",\"requires\":[\"icon-image\",\"icon-translate\"]},\"text-opacity\":{\"type\":\"number\",\"default\":1,\"minimum\":0,\"maximum\":1,\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true,\"requires\":[\"text-field\"]},\"text-color\":{\"type\":\"color\",\"default\":\"#000000\",\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true,\"requires\":[\"text-field\"]},\"text-halo-color\":{\"type\":\"color\",\"default\":\"rgba(0, 0, 0, 0)\",\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true,\"requires\":[\"text-field\"]},\"text-halo-width\":{\"type\":\"number\",\"default\":0,\"minimum\":0,\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true,\"units\":\"pixels\",\"requires\":[\"text-field\"]},\"text-halo-blur\":{\"type\":\"number\",\"default\":0,\"minimum\":0,\"function\":\"interpolated\",\"zoom-function\":true,\"property-function\":true,\"transition\":true,\"units\":\"pixels\",\"requires\":[\"text-field\"]},\"text-translate\":{\"type\":\"array\",\"value\":\"number\",\"length\":2,\"default\":[0,0],\"function\":\"interpolated\",\"zoom-function\":true,\"transition\":true,\"units\":\"pixels\",\"requires\":[\"text-field\"]},\"text-translate-anchor\":{\"type\":\"enum\",\"function\":\"piecewise-constant\",\"zoom-function\":true,\"values\":{\"map\":{},\"viewport\":{}},\"default\":\"map\",\"requires\":[\"text-field\",\"text-translate\"]}},\"paint_raster\":{\"raster-opacity\":{\"type\":\"number\",\"default\":1,\"minimum\":0,\"maximum\":1,\"function\":\"interpolated\",\"zoom-function\":true,\"transition\":true},\"raster-hue-rotate\":{\"type\":\"number\",\"default\":0,\"period\":360,\"function\":\"interpolated\",\"zoom-function\":true,\"transition\":true,\"units\":\"degrees\"},\"raster-brightness-min\":{\"type\":\"number\",\"function\":\"interpolated\",\"zoom-function\":true,\"default\":0,\"minimum\":0,\"maximum\":1,\"transition\":true},\"raster-brightness-max\":{\"type\":\"number\",\"function\":\"interpolated\",\"zoom-function\":true,\"default\":1,\"minimum\":0,\"maximum\":1,\"transition\":true},\"raster-saturation\":{\"type\":\"number\",\"default\":0,\"minimum\":-1,\"maximum\":1,\"function\":\"interpolated\",\"zoom-function\":true,\"transition\":true},\"raster-contrast\":{\"type\":\"number\",\"default\":0,\"minimum\":-1,\"maximum\":1,\"function\":\"interpolated\",\"zoom-function\":true,\"transition\":true},\"raster-fade-duration\":{\"type\":\"number\",\"default\":300,\"minimum\":0,\"function\":\"interpolated\",\"zoom-function\":true,\"transition\":true,\"units\":\"milliseconds\"}},\"paint_background\":{\"background-color\":{\"type\":\"color\",\"default\":\"#000000\",\"function\":\"interpolated\",\"zoom-function\":true,\"transition\":true,\"requires\":[{\"!\":\"background-pattern\"}]},\"background-pattern\":{\"type\":\"string\",\"function\":\"piecewise-constant\",\"zoom-function\":true,\"transition\":true},\"background-opacity\":{\"type\":\"number\",\"default\":1,\"minimum\":0,\"maximum\":1,\"function\":\"interpolated\",\"zoom-function\":true,\"transition\":true}},\"transition\":{\"duration\":{\"type\":\"number\",\"default\":300,\"minimum\":0,\"units\":\"milliseconds\"},\"delay\":{\"type\":\"number\",\"default\":0,\"minimum\":0,\"units\":\"milliseconds\"}}}\n},{}],119:[function(require,module,exports){\n\"use strict\";module.exports=function(r){for(var t=arguments,e=1;e7)return[new ValidationError(u,a,\"constants have been deprecated as of v8\")];if(!(a in l.constants))return[new ValidationError(u,a,'constant \"%s\" not found',a)];e=extend({},e,{value:l.constants[a]})}return n.function&&\"object\"===getType(a)?r(e):n.type&&i[n.type]?i[n.type](e):t(extend({},e,{valueSpec:n.type?o[n.type]:n}))};\n},{\"../error/validation_error\":102,\"../util/extend\":119,\"../util/get_type\":120,\"./validate_array\":125,\"./validate_boolean\":126,\"./validate_color\":127,\"./validate_constants\":128,\"./validate_enum\":129,\"./validate_filter\":130,\"./validate_function\":131,\"./validate_layer\":133,\"./validate_light\":135,\"./validate_number\":136,\"./validate_object\":137,\"./validate_source\":140,\"./validate_string\":141}],125:[function(require,module,exports){\n\"use strict\";var getType=require(\"../util/get_type\"),validate=require(\"./validate\"),ValidationError=require(\"../error/validation_error\");module.exports=function(e){var r=e.value,t=e.valueSpec,a=e.style,n=e.styleSpec,l=e.key,i=e.arrayElementValidator||validate;if(\"array\"!==getType(r))return[new ValidationError(l,r,\"array expected, %s found\",getType(r))];if(t.length&&r.length!==t.length)return[new ValidationError(l,r,\"array length %d expected, length %d found\",t.length,r.length)];if(t[\"min-length\"]&&r.length7)return t?[new ValidationError(e,t,\"constants have been deprecated as of v8\")]:[];var o=getType(t);if(\"object\"!==o)return[new ValidationError(e,t,\"object expected, %s found\",o)];var n=[];for(var i in t)\"@\"!==i[0]&&n.push(new ValidationError(e+\".\"+i,t[i],'constants must start with \"@\"'));return n};\n},{\"../error/validation_error\":102,\"../util/get_type\":120}],129:[function(require,module,exports){\n\"use strict\";var ValidationError=require(\"../error/validation_error\"),unbundle=require(\"../util/unbundle_jsonlint\");module.exports=function(e){var r=e.key,n=e.value,u=e.valueSpec,o=[];return Array.isArray(u.values)?u.values.indexOf(unbundle(n))===-1&&o.push(new ValidationError(r,n,\"expected one of [%s], %s found\",u.values.join(\", \"),n)):Object.keys(u.values).indexOf(unbundle(n))===-1&&o.push(new ValidationError(r,n,\"expected one of [%s], %s found\",Object.keys(u.values).join(\", \"),n)),o};\n},{\"../error/validation_error\":102,\"../util/unbundle_jsonlint\":123}],130:[function(require,module,exports){\n\"use strict\";var ValidationError=require(\"../error/validation_error\"),validateEnum=require(\"./validate_enum\"),getType=require(\"../util/get_type\"),unbundle=require(\"../util/unbundle_jsonlint\");module.exports=function e(r){var t,a=r.value,n=r.key,l=r.styleSpec,s=[];if(\"array\"!==getType(a))return[new ValidationError(n,a,\"array expected, %s found\",getType(a))];if(a.length<1)return[new ValidationError(n,a,\"filter array must have at least 1 element\")];switch(s=s.concat(validateEnum({key:n+\"[0]\",value:a[0],valueSpec:l.filter_operator,style:r.style,styleSpec:r.styleSpec})),unbundle(a[0])){case\"<\":case\"<=\":case\">\":case\">=\":a.length>=2&&\"$type\"===unbundle(a[1])&&s.push(new ValidationError(n,a,'\"$type\" cannot be use with operator \"%s\"',a[0]));case\"==\":case\"!=\":3!==a.length&&s.push(new ValidationError(n,a,'filter array for operator \"%s\" must have 3 elements',a[0]));case\"in\":case\"!in\":a.length>=2&&(t=getType(a[1]),\"string\"!==t&&s.push(new ValidationError(n+\"[1]\",a[1],\"string expected, %s found\",t)));for(var o=2;ounbundle(r[0].zoom))return[new ValidationError(o,r[0].zoom,\"stop zoom values must appear in ascending order\")];unbundle(r[0].zoom)!==l&&(l=unbundle(r[0].zoom),i=void 0,s={}),t=t.concat(validateObject({key:o+\"[0]\",value:r[0],valueSpec:{zoom:{}},style:e.style,styleSpec:e.styleSpec,objectElementValidators:{zoom:validateNumber,value:a}}))}else t=t.concat(a({key:o+\"[0]\",value:r[0],valueSpec:{},style:e.style,styleSpec:e.styleSpec}));return t.concat(validate({key:o+\"[1]\",value:r[1],valueSpec:u,style:e.style,styleSpec:e.styleSpec}))}function a(e){var t=getType(e.value),r=unbundle(e.value);if(n){if(t!==n)return[new ValidationError(e.key,e.value,\"%s stop domain type must match previous stop domain type %s\",t,n)]}else n=t;if(\"number\"!==t&&\"string\"!==t&&\"boolean\"!==t)return[new ValidationError(e.key,e.value,\"stop domain value must be a number, string, or boolean\")];if(\"number\"!==t&&\"categorical\"!==p){var a=\"number expected, %s found\";return u[\"property-function\"]&&void 0===p&&(a+='\\nIf you intended to use a categorical function, specify `\"type\": \"categorical\"`.'),[new ValidationError(e.key,e.value,a,t)]}return\"categorical\"!==p||\"number\"!==t||isFinite(r)&&Math.floor(r)===r?\"number\"===t&&void 0!==i&&r=8&&(d&&!e.valueSpec[\"property-function\"]?v.push(new ValidationError(e.key,e.value,\"property functions not supported\")):y&&!e.valueSpec[\"zoom-function\"]&&v.push(new ValidationError(e.key,e.value,\"zoom functions not supported\"))),\"categorical\"!==p&&!c||void 0!==e.value.property||v.push(new ValidationError(e.key,e.value,'\"property\" property is required')),v};\n},{\"../error/validation_error\":102,\"../util/get_type\":120,\"../util/unbundle_jsonlint\":123,\"./validate\":124,\"./validate_array\":125,\"./validate_number\":136,\"./validate_object\":137}],132:[function(require,module,exports){\n\"use strict\";var ValidationError=require(\"../error/validation_error\"),validateString=require(\"./validate_string\");module.exports=function(r){var e=r.value,t=r.key,a=validateString(r);return a.length?a:(e.indexOf(\"{fontstack}\")===-1&&a.push(new ValidationError(t,e,'\"glyphs\" url must include a \"{fontstack}\" token')),e.indexOf(\"{range}\")===-1&&a.push(new ValidationError(t,e,'\"glyphs\" url must include a \"{range}\" token')),a)};\n},{\"../error/validation_error\":102,\"./validate_string\":141}],133:[function(require,module,exports){\n\"use strict\";var ValidationError=require(\"../error/validation_error\"),unbundle=require(\"../util/unbundle_jsonlint\"),validateObject=require(\"./validate_object\"),validateFilter=require(\"./validate_filter\"),validatePaintProperty=require(\"./validate_paint_property\"),validateLayoutProperty=require(\"./validate_layout_property\"),extend=require(\"../util/extend\");module.exports=function(e){var r=[],t=e.value,a=e.key,i=e.style,l=e.styleSpec;t.type||t.ref||r.push(new ValidationError(a,t,'either \"type\" or \"ref\" is required'));var u=unbundle(t.type),n=unbundle(t.ref);if(t.id)for(var o=unbundle(t.id),s=0;sm.maximum?[new ValidationError(r,i,\"%s is greater than the maximum value %s\",i,m.maximum)]:[]};\n},{\"../error/validation_error\":102,\"../util/get_type\":120}],137:[function(require,module,exports){\n\"use strict\";var ValidationError=require(\"../error/validation_error\"),getType=require(\"../util/get_type\"),validateSpec=require(\"./validate\");module.exports=function(e){var r=e.key,t=e.value,i=e.valueSpec||{},a=e.objectElementValidators||{},o=e.style,l=e.styleSpec,n=[],u=getType(t);if(\"object\"!==u)return[new ValidationError(r,t,\"object expected, %s found\",u)];for(var d in t){var p=d.split(\".\")[0],s=i[p]||i[\"*\"],c=void 0;if(a[p])c=a[p];else if(i[p])c=validateSpec;else if(a[\"*\"])c=a[\"*\"];else{if(!i[\"*\"]){n.push(new ValidationError(r,t[d],'unknown property \"%s\"',d));continue}c=validateSpec}n=n.concat(c({key:(r?r+\".\":r)+d,value:t[d],valueSpec:s,style:o,styleSpec:l,object:t,objectKey:d}))}for(var v in i)i[v].required&&void 0===i[v].default&&void 0===t[v]&&n.push(new ValidationError(r,t,'missing required property \"%s\"',v));return n};\n},{\"../error/validation_error\":102,\"../util/get_type\":120,\"./validate\":124}],138:[function(require,module,exports){\n\"use strict\";var validateProperty=require(\"./validate_property\");module.exports=function(r){return validateProperty(r,\"paint\")};\n},{\"./validate_property\":139}],139:[function(require,module,exports){\n\"use strict\";var validate=require(\"./validate\"),ValidationError=require(\"../error/validation_error\"),getType=require(\"../util/get_type\");module.exports=function(e,t){var r=e.key,i=e.style,a=e.styleSpec,n=e.value,o=e.objectKey,l=a[t+\"_\"+e.layerType];if(!l)return[];var y=o.match(/^(.*)-transition$/);if(\"paint\"===t&&y&&l[y[1]]&&l[y[1]].transition)return validate({key:r,value:n,valueSpec:a.transition,style:i,styleSpec:a});var p=e.valueSpec||l[o];if(!p)return[new ValidationError(r,n,'unknown property \"%s\"',o)];var s;if(\"string\"===getType(n)&&p[\"property-function\"]&&!p.tokens&&(s=/^{([^}]+)}$/.exec(n)))return[new ValidationError(r,n,'\"%s\" does not support interpolation syntax\\nUse an identity property function instead: `{ \"type\": \"identity\", \"property\": %s` }`.',o,JSON.stringify(s[1]))];var u=[];return\"symbol\"===e.layerType&&\"text-field\"===o&&i&&!i.glyphs&&u.push(new ValidationError(r,n,'use of \"text-field\" requires a style \"glyphs\" property')),u.concat(validate({key:e.key,value:n,valueSpec:p,style:i,styleSpec:a}))};\n},{\"../error/validation_error\":102,\"../util/get_type\":120,\"./validate\":124}],140:[function(require,module,exports){\n\"use strict\";var ValidationError=require(\"../error/validation_error\"),unbundle=require(\"../util/unbundle_jsonlint\"),validateObject=require(\"./validate_object\"),validateEnum=require(\"./validate_enum\");module.exports=function(e){var a=e.value,t=e.key,r=e.styleSpec,l=e.style;if(!a.type)return[new ValidationError(t,a,'\"type\" is required')];var u=unbundle(a.type),i=[];switch(u){case\"vector\":case\"raster\":if(i=i.concat(validateObject({key:t,value:a,valueSpec:r.source_tile,style:e.style,styleSpec:r})),\"url\"in a)for(var s in a)[\"type\",\"url\",\"tileSize\"].indexOf(s)<0&&i.push(new ValidationError(t+\".\"+s,a[s],'a source with a \"url\" property may not include a \"%s\" property',s));return i;case\"geojson\":return validateObject({key:t,value:a,valueSpec:r.source_geojson,style:l,styleSpec:r});case\"video\":return validateObject({key:t,value:a,valueSpec:r.source_video,style:l,styleSpec:r});case\"image\":return validateObject({key:t,value:a,valueSpec:r.source_image,style:l,styleSpec:r});case\"canvas\":return validateObject({key:t,value:a,valueSpec:r.source_canvas,style:l,styleSpec:r});default:return validateEnum({key:t+\".type\",value:a.type,valueSpec:{values:[\"vector\",\"raster\",\"geojson\",\"video\",\"image\",\"canvas\"]},style:l,styleSpec:r})}};\n},{\"../error/validation_error\":102,\"../util/unbundle_jsonlint\":123,\"./validate_enum\":129,\"./validate_object\":137}],141:[function(require,module,exports){\n\"use strict\";var getType=require(\"../util/get_type\"),ValidationError=require(\"../error/validation_error\");module.exports=function(r){var e=r.value,t=r.key,i=getType(e);return\"string\"!==i?[new ValidationError(t,e,\"string expected, %s found\",i)]:[]};\n},{\"../error/validation_error\":102,\"../util/get_type\":120}],142:[function(require,module,exports){\n\"use strict\";function validateStyleMin(e,a){a=a||latestStyleSpec;var t=[];return t=t.concat(validate({key:\"\",value:e,valueSpec:a.$root,styleSpec:a,style:e,objectElementValidators:{glyphs:validateGlyphsURL,\"*\":function(){return[]}}})),a.$version>7&&e.constants&&(t=t.concat(validateConstants({key:\"constants\",value:e.constants,style:e,styleSpec:a}))),sortErrors(t)}function sortErrors(e){return[].concat(e).sort(function(e,a){return e.line-a.line})}function wrapCleanErrors(e){return function(){return sortErrors(e.apply(this,arguments))}}var validateConstants=require(\"./validate/validate_constants\"),validate=require(\"./validate/validate\"),latestStyleSpec=require(\"./reference/latest\"),validateGlyphsURL=require(\"./validate/validate_glyphs_url\");validateStyleMin.source=wrapCleanErrors(require(\"./validate/validate_source\")),validateStyleMin.light=wrapCleanErrors(require(\"./validate/validate_light\")),validateStyleMin.layer=wrapCleanErrors(require(\"./validate/validate_layer\")),validateStyleMin.filter=wrapCleanErrors(require(\"./validate/validate_filter\")),validateStyleMin.paintProperty=wrapCleanErrors(require(\"./validate/validate_paint_property\")),validateStyleMin.layoutProperty=wrapCleanErrors(require(\"./validate/validate_layout_property\")),module.exports=validateStyleMin;\n},{\"./reference/latest\":117,\"./validate/validate\":124,\"./validate/validate_constants\":128,\"./validate/validate_filter\":130,\"./validate/validate_glyphs_url\":132,\"./validate/validate_layer\":133,\"./validate/validate_layout_property\":134,\"./validate/validate_light\":135,\"./validate/validate_paint_property\":138,\"./validate/validate_source\":140}],143:[function(require,module,exports){\n\"use strict\";var AnimationLoop=function(){this.n=0,this.times=[]};AnimationLoop.prototype.stopped=function(){return this.times=this.times.filter(function(t){return t.time>=(new Date).getTime()}),!this.times.length},AnimationLoop.prototype.set=function(t){return this.times.push({id:this.n,time:t+(new Date).getTime()}),this.n++},AnimationLoop.prototype.cancel=function(t){this.times=this.times.filter(function(i){return i.id!==t})},module.exports=AnimationLoop;\n},{}],144:[function(require,module,exports){\n\"use strict\";var Evented=require(\"../util/evented\"),ajax=require(\"../util/ajax\"),browser=require(\"../util/browser\"),normalizeURL=require(\"../util/mapbox\").normalizeSpriteURL,SpritePosition=function(){this.x=0,this.y=0,this.width=0,this.height=0,this.pixelRatio=1,this.sdf=!1},ImageSprite=function(t){function i(i,e){var a=this;t.call(this),this.base=i,this.retina=browser.devicePixelRatio>1,this.setEventedParent(e);var r=this.retina?\"@2x\":\"\";ajax.getJSON(normalizeURL(i,r,\".json\"),function(t,i){return t?void a.fire(\"error\",{error:t}):(a.data=i,void(a.imgData&&a.fire(\"data\",{dataType:\"style\"})))}),ajax.getImage(normalizeURL(i,r,\".png\"),function(t,i){if(t)return void a.fire(\"error\",{error:t});a.imgData=browser.getImageData(i);for(var e=0;e1!==this.retina){var e=new i(this.base);e.on(\"data\",function(){t.data=e.data,t.imgData=e.imgData,t.width=e.width,t.retina=e.retina})}},i.prototype.getSpritePosition=function(t){if(!this.loaded())return new SpritePosition;var i=this.data&&this.data[t];return i&&this.imgData?i:new SpritePosition},i}(Evented);module.exports=ImageSprite;\n},{\"../util/ajax\":191,\"../util/browser\":192,\"../util/evented\":200,\"../util/mapbox\":208}],145:[function(require,module,exports){\n\"use strict\";var styleSpec=require(\"../style-spec/reference/latest\"),util=require(\"../util/util\"),Evented=require(\"../util/evented\"),validateStyle=require(\"./validate_style\"),StyleDeclaration=require(\"./style_declaration\"),StyleTransition=require(\"./style_transition\"),TRANSITION_SUFFIX=\"-transition\",Light=function(t){function i(i){t.call(this),this.properties=[\"anchor\",\"color\",\"position\",\"intensity\"],this._specifications=styleSpec.light,this.set(i)}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.set=function(t){var i=this;if(!this._validate(validateStyle.light,t)){this._declarations={},this._transitions={},this._transitionOptions={},this.calculated={},t=util.extend({anchor:this._specifications.anchor.default,color:this._specifications.color.default,position:this._specifications.position.default,intensity:this._specifications.intensity.default},t);for(var e=0,o=i.properties;eMath.floor(e)&&(t.lastIntegerZoom=Math.floor(e+1),t.lastIntegerZoomTime=Date.now()),t.lastZoom=e},t.prototype._checkLoaded=function(){if(!this._loaded)throw new Error(\"Style is not done loading\")},t.prototype.update=function(e,t){var r=this;if(this._changed){var i=Object.keys(this._updatedLayers),o=Object.keys(this._removedLayers);(i.length||o.length||this._updatedSymbolOrder)&&this._updateWorkerLayers(i,o);for(var s in r._updatedSources){var a=r._updatedSources[s];\"reload\"===a?r._reloadSource(s):\"clear\"===a&&r._clearSource(s)}this._applyClasses(e,t),this._resetUpdates(),this.fire(\"data\",{dataType:\"style\"})}},t.prototype._updateWorkerLayers=function(e,t){var r=this,i=this._updatedSymbolOrder?this._order.filter(function(e){return\"symbol\"===r._layers[e].type}):null;this.dispatcher.broadcast(\"updateLayers\",{layers:this._serializeLayers(e),removedIds:t,symbolOrder:i})},t.prototype._resetUpdates=function(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSymbolOrder=!1,this._updatedSources={},this._updatedPaintProps={},this._updatedAllPaintProps=!1},t.prototype.setState=function(e){var t=this;if(this._checkLoaded(),validateStyle.emitErrors(this,validateStyle(e)))return!1;e=util.extend({},e),e.layers=deref(e.layers);var r=diff(this.serialize(),e).filter(function(e){return!(e.command in ignoredDiffOperations)});if(0===r.length)return!1;var i=r.filter(function(e){return!(e.command in supportedDiffOperations)});if(i.length>0)throw new Error(\"Unimplemented: \"+i.map(function(e){return e.command}).join(\", \")+\".\");return r.forEach(function(e){\"setTransition\"!==e.command&&t[e.command].apply(t,e.args)}),this.stylesheet=e,!0},t.prototype.addSource=function(e,t,r){var i=this;if(this._checkLoaded(),void 0!==this.sourceCaches[e])throw new Error(\"There is already a source with this ID\");if(!t.type)throw new Error(\"The type property must be defined, but the only the following properties were given: \"+Object.keys(t)+\".\");var o=[\"vector\",\"raster\",\"geojson\",\"video\",\"image\",\"canvas\"],s=o.indexOf(t.type)>=0;if(!s||!this._validate(validateStyle.source,\"sources.\"+e,t,null,r)){var a=this.sourceCaches[e]=new SourceCache(e,t,this.dispatcher);a.style=this,a.setEventedParent(this,function(){return{isSourceLoaded:i.loaded(),source:a.serialize(),sourceId:e}}),a.onAdd(this.map),this._changed=!0}},t.prototype.removeSource=function(e){if(this._checkLoaded(),void 0===this.sourceCaches[e])throw new Error(\"There is no source with this ID\");var t=this.sourceCaches[e];delete this.sourceCaches[e],delete this._updatedSources[e],t.setEventedParent(null),t.clearTiles(),t.onRemove&&t.onRemove(this.map),this._changed=!0},t.prototype.getSource=function(e){return this.sourceCaches[e]&&this.sourceCaches[e].getSource()},t.prototype.addLayer=function(e,t,r){this._checkLoaded();var i=e.id;if(\"object\"==typeof e.source&&(this.addSource(i,e.source),e=util.extend(e,{source:i})),!this._validate(validateStyle.layer,\"layers.\"+i,e,{arrayIndex:-1},r)){var o=StyleLayer.create(e);this._validateLayer(o),o.setEventedParent(this,{layer:{id:i}});var s=t?this._order.indexOf(t):this._order.length;if(this._order.splice(s,0,i),this._layers[i]=o,this._removedLayers[i]&&o.source){var a=this._removedLayers[i];delete this._removedLayers[i],this._updatedSources[o.source]=a.type!==o.type?\"clear\":\"reload\"}this._updateLayer(o),\"symbol\"===o.type&&(this._updatedSymbolOrder=!0),this.updateClasses(i)}},t.prototype.moveLayer=function(e,t){this._checkLoaded(),this._changed=!0;var r=this._layers[e];if(!r)return void this.fire(\"error\",{error:new Error(\"The layer '\"+e+\"' does not exist in the map's style and cannot be moved.\")});var i=this._order.indexOf(e);this._order.splice(i,1);var o=t?this._order.indexOf(t):this._order.length;this._order.splice(o,0,e),\"symbol\"===r.type&&(this._updatedSymbolOrder=!0,r.source&&!this._updatedSources[r.source]&&(this._updatedSources[r.source]=\"reload\"))},t.prototype.removeLayer=function(e){this._checkLoaded();var t=this._layers[e];if(!t)return void this.fire(\"error\",{error:new Error(\"The layer '\"+e+\"' does not exist in the map's style and cannot be removed.\")});t.setEventedParent(null);var r=this._order.indexOf(e);this._order.splice(r,1),\"symbol\"===t.type&&(this._updatedSymbolOrder=!0),this._changed=!0,this._removedLayers[e]=t,delete this._layers[e],delete this._updatedLayers[e],delete this._updatedPaintProps[e]},t.prototype.getLayer=function(e){return this._layers[e]},t.prototype.setLayerZoomRange=function(e,t,r){this._checkLoaded();var i=this.getLayer(e);return i?void(i.minzoom===t&&i.maxzoom===r||(null!=t&&(i.minzoom=t),null!=r&&(i.maxzoom=r),this._updateLayer(i))):void this.fire(\"error\",{error:new Error(\"The layer '\"+e+\"' does not exist in the map's style and cannot have zoom extent.\")})},t.prototype.setFilter=function(e,t){this._checkLoaded();var r=this.getLayer(e);return r?void(null!==t&&void 0!==t&&this._validate(validateStyle.filter,\"layers.\"+r.id+\".filter\",t)||util.deepEqual(r.filter,t)||(r.filter=util.clone(t),this._updateLayer(r))):void this.fire(\"error\",{error:new Error(\"The layer '\"+e+\"' does not exist in the map's style and cannot be filtered.\")})},t.prototype.getFilter=function(e){return util.clone(this.getLayer(e).filter)},t.prototype.setLayoutProperty=function(e,t,r){this._checkLoaded();var i=this.getLayer(e);return i?void(util.deepEqual(i.getLayoutProperty(t),r)||(i.setLayoutProperty(t,r),this._updateLayer(i))):void this.fire(\"error\",{error:new Error(\"The layer '\"+e+\"' does not exist in the map's style and cannot be styled.\")})},t.prototype.getLayoutProperty=function(e,t){return this.getLayer(e).getLayoutProperty(t)},t.prototype.setPaintProperty=function(e,t,r,i){this._checkLoaded();var o=this.getLayer(e);if(!o)return void this.fire(\"error\",{error:new Error(\"The layer '\"+e+\"' does not exist in the map's style and cannot be styled.\")});if(!util.deepEqual(o.getPaintProperty(t,i),r)){var s=o.isPaintValueFeatureConstant(t);o.setPaintProperty(t,r,i);var a=!(r&&MapboxGLFunction.isFunctionDefinition(r)&&\"$zoom\"!==r.property&&void 0!==r.property);a&&s||this._updateLayer(o),this.updateClasses(e,t)}},t.prototype.getPaintProperty=function(e,t,r){return this.getLayer(e).getPaintProperty(t,r)},t.prototype.getTransition=function(){return util.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},t.prototype.updateClasses=function(e,t){if(this._changed=!0,e){var r=this._updatedPaintProps;r[e]||(r[e]={}),r[e][t||\"all\"]=!0}else this._updatedAllPaintProps=!0},t.prototype.serialize=function(){var e=this;return util.filterObject({version:this.stylesheet.version,name:this.stylesheet.name,metadata:this.stylesheet.metadata,light:this.stylesheet.light,center:this.stylesheet.center,zoom:this.stylesheet.zoom,bearing:this.stylesheet.bearing,pitch:this.stylesheet.pitch,sprite:this.stylesheet.sprite,glyphs:this.stylesheet.glyphs,transition:this.stylesheet.transition,sources:util.mapObject(this.sourceCaches,function(e){return e.serialize()}),layers:this._order.map(function(t){return e._layers[t].serialize()})},function(e){return void 0!==e})},t.prototype._updateLayer=function(e){this._updatedLayers[e.id]=!0,e.source&&!this._updatedSources[e.source]&&(this._updatedSources[e.source]=\"reload\"),this._changed=!0},t.prototype._flattenRenderedFeatures=function(e){for(var t=this,r=[],i=this._order.length-1;i>=0;i--)for(var o=t._order[i],s=0,a=e;s=this.maxzoom)||\"none\"===this.layout.visibility)},i.prototype.updatePaintTransitions=function(t,i,a,e,n){for(var o=this,r=util.extend({},this._paintDeclarations[\"\"]),s=0;s=this.endTime)return e;var a=this.oldTransition.calculate(t,i,this.startTime),n=util.easeCubicInOut((o-this.startTime-this.delay)/this.duration);return this.interp(a,e,n)},StyleTransition.prototype._calculateTargetValue=function(t,i){if(!this.zoomTransitioned)return this.declaration.calculate(t,i);var o=t.zoom,e=this.zoomHistory.lastIntegerZoom,a=o>e?2:.5,n=this.declaration.calculate({zoom:o>e?o-1:o+1},i),r=this.declaration.calculate({zoom:o},i),s=Math.min((Date.now()-this.zoomHistory.lastIntegerZoomTime)/this.duration,1),l=Math.abs(o-e),u=interpolate(s,1,l);return void 0!==n&&void 0!==r?{from:n,fromScale:a,to:r,toScale:1,t:u}:void 0},module.exports=StyleTransition;\n},{\"../util/interpolate\":204,\"../util/util\":212}],156:[function(require,module,exports){\n\"use strict\";module.exports=require(\"../style-spec/validate_style.min\"),module.exports.emitErrors=function(r,e){if(e&&e.length){for(var t=0;t-a/2;){if(s--,s<0)return!1;f-=e[s].dist(i),i=e[s]}f+=e[s].dist(e[s+1]),s++;for(var l=[],o=0;f
r;)o-=l.shift().angleDelta;if(o>n)return!1;s++,f+=c.dist(g)}return!0}module.exports=checkMaxAngle;\n},{}],159:[function(require,module,exports){\n\"use strict\";function clipLine(n,x,y,o,e){for(var r=[],t=0;t=o&&w.x>=o||(P.x>=o?P=new Point(o,P.y+(w.y-P.y)*((o-P.x)/(w.x-P.x)))._round():w.x>=o&&(w=new Point(o,P.y+(w.y-P.y)*((o-P.x)/(w.x-P.x)))._round()),P.y>=e&&w.y>=e||(P.y>=e?P=new Point(P.x+(w.x-P.x)*((e-P.y)/(w.y-P.y)),e)._round():w.y>=e&&(w=new Point(P.x+(w.x-P.x)*((e-P.y)/(w.y-P.y)),e)._round()),u&&P.equals(u[u.length-1])||(u=[P],r.push(u)),u.push(w)))))}return r}var Point=require(\"point-geometry\");module.exports=clipLine;\n},{\"point-geometry\":26}],160:[function(require,module,exports){\n\"use strict\";var createStructArrayType=require(\"../util/struct_array\"),Point=require(\"point-geometry\"),CollisionBoxArray=createStructArrayType({members:[{type:\"Int16\",name:\"anchorPointX\"},{type:\"Int16\",name:\"anchorPointY\"},{type:\"Int16\",name:\"x1\"},{type:\"Int16\",name:\"y1\"},{type:\"Int16\",name:\"x2\"},{type:\"Int16\",name:\"y2\"},{type:\"Float32\",name:\"maxScale\"},{type:\"Uint32\",name:\"featureIndex\"},{type:\"Uint16\",name:\"sourceLayerIndex\"},{type:\"Uint16\",name:\"bucketIndex\"},{type:\"Int16\",name:\"bbox0\"},{type:\"Int16\",name:\"bbox1\"},{type:\"Int16\",name:\"bbox2\"},{type:\"Int16\",name:\"bbox3\"},{type:\"Float32\",name:\"placementScale\"}]});Object.defineProperty(CollisionBoxArray.prototype.StructType.prototype,\"anchorPoint\",{get:function(){return new Point(this.anchorPointX,this.anchorPointY)}}),module.exports=CollisionBoxArray;\n},{\"../util/struct_array\":210,\"point-geometry\":26}],161:[function(require,module,exports){\n\"use strict\";var CollisionFeature=function(t,e,i,o,s,a,n,r,l,d,u){var h=n.top*r-l,x=n.bottom*r+l,f=n.left*r-l,m=n.right*r+l;if(this.boxStartIndex=t.length,d){var _=x-h,b=m-f;if(_>0)if(_=Math.max(10*r,_),u){var v=e[i.segment+1].sub(e[i.segment])._unit()._mult(b),c=[i.sub(v),i.add(v)];this._addLineCollisionBoxes(t,c,i,0,b,_,o,s,a)}else this._addLineCollisionBoxes(t,e,i,i.segment,b,_,o,s,a)}else t.emplaceBack(i.x,i.y,f,h,m,x,1/0,o,s,a,0,0,0,0,0);this.boxEndIndex=t.length};CollisionFeature.prototype._addLineCollisionBoxes=function(t,e,i,o,s,a,n,r,l){var d=a/2,u=Math.floor(s/d),h=-a/2,x=this.boxes,f=i,m=o+1,_=h;do{if(m--,m<0)return x;_-=e[m].dist(f),f=e[m]}while(_>-s/2);for(var b=e[m].dist(e[m+1]),v=0;v=e.length)return x;b=e[m].dist(e[m+1])}var g=c-_,p=e[m],C=e[m+1],B=C.sub(p)._unit()._mult(g)._add(p)._round(),M=Math.max(Math.abs(c-h)-d/2,0),y=s/2/M;t.emplaceBack(B.x,B.y,-a/2,-a/2,a/2,a/2,y,n,r,l,0,0,0,0,0)}return x},module.exports=CollisionFeature;\n},{}],162:[function(require,module,exports){\n\"use strict\";var Point=require(\"point-geometry\"),EXTENT=require(\"../data/extent\"),Grid=require(\"grid-index\"),intersectionTests=require(\"../util/intersection_tests\"),CollisionTile=function(t,e,i){if(\"object\"==typeof t){var r=t;i=e,t=r.angle,e=r.pitch,this.grid=new Grid(r.grid),this.ignoredGrid=new Grid(r.ignoredGrid)}else this.grid=new Grid(EXTENT,12,6),this.ignoredGrid=new Grid(EXTENT,12,0);this.minScale=.5,this.maxScale=2,this.angle=t,this.pitch=e;var a=Math.sin(t),o=Math.cos(t);if(this.rotationMatrix=[o,-a,a,o],this.reverseRotationMatrix=[o,a,-a,o],this.yStretch=1/Math.cos(e/180*Math.PI),this.yStretch=Math.pow(this.yStretch,1.3),this.collisionBoxArray=i,0===i.length){i.emplaceBack();var n=32767;i.emplaceBack(0,0,0,-n,0,n,n,0,0,0,0,0,0,0,0,0),i.emplaceBack(EXTENT,0,0,-n,0,n,n,0,0,0,0,0,0,0,0,0),i.emplaceBack(0,0,-n,0,n,0,n,0,0,0,0,0,0,0,0,0),i.emplaceBack(0,EXTENT,-n,0,n,0,n,0,0,0,0,0,0,0,0,0)}this.tempCollisionBox=i.get(0),this.edges=[i.get(1),i.get(2),i.get(3),i.get(4)]};CollisionTile.prototype.serialize=function(t){var e=this.grid.toArrayBuffer(),i=this.ignoredGrid.toArrayBuffer();return t&&(t.push(e),t.push(i)),{angle:this.angle,pitch:this.pitch,grid:e,ignoredGrid:i}},CollisionTile.prototype.placeCollisionFeature=function(t,e,i){for(var r=this,a=this.collisionBoxArray,o=this.minScale,n=this.rotationMatrix,l=this.yStretch,h=t.boxStartIndex;h=r.maxScale)return o}if(i){var S=void 0;if(r.angle){var P=r.reverseRotationMatrix,b=new Point(s.x1,s.y1).matMult(P),T=new Point(s.x2,s.y1).matMult(P),w=new Point(s.x1,s.y2).matMult(P),N=new Point(s.x2,s.y2).matMult(P);S=r.tempCollisionBox,S.anchorPointX=s.anchorPoint.x,S.anchorPointY=s.anchorPoint.y,S.x1=Math.min(b.x,T.x,w.x,N.x),S.y1=Math.min(b.y,T.x,w.x,N.x),S.x2=Math.max(b.x,T.x,w.x,N.x),S.y2=Math.max(b.y,T.x,w.x,N.x),S.maxScale=s.maxScale}else S=s;for(var B=0;B=r.maxScale)return o}}}return o},CollisionTile.prototype.queryRenderedSymbols=function(t,e){var i={},r=[];if(0===t.length||0===this.grid.length&&0===this.ignoredGrid.length)return r;for(var a=this.collisionBoxArray,o=this.rotationMatrix,n=this.yStretch,l=[],h=1/0,s=1/0,x=-(1/0),c=-(1/0),g=0;gS.maxScale)){var T=S.anchorPoint.matMult(o),w=T.x+S.x1/e,N=T.y+S.y1/e*n,B=T.x+S.x2/e,G=T.y+S.y2/e*n,E=[new Point(w,N),new Point(B,N),new Point(B,G),new Point(w,G)];intersectionTests.polygonIntersectsPolygon(l,E)&&(i[P][b]=!0,r.push(u[v]))}}return r},CollisionTile.prototype.getPlacementScale=function(t,e,i,r,a){var o=e.x-r.x,n=e.y-r.y,l=(a.x1-i.x2)/o,h=(a.x2-i.x1)/o,s=(a.y1-i.y2)*this.yStretch/n,x=(a.y2-i.y1)*this.yStretch/n;(isNaN(l)||isNaN(h))&&(l=h=1),(isNaN(s)||isNaN(x))&&(s=x=1);var c=Math.min(Math.max(l,h),Math.max(s,x)),g=a.maxScale,y=i.maxScale;return c>g&&(c=g),c>y&&(c=y),c>t&&c>=a.placementScale&&(t=c),t},CollisionTile.prototype.insertCollisionFeature=function(t,e,i){for(var r=this,a=i?this.ignoredGrid:this.grid,o=this.collisionBoxArray,n=t.boxStartIndex;n=0&&k=0&&q=0&&p+c<=s){var M=new Anchor(k,q,y,f)._round();n&&!checkMaxAngle(e,M,l,n,a)||x.push(M)}}g+=A}return i||x.length||o||(x=resample(e,g/2,t,n,a,l,o,!0,h)),x}var interpolate=require(\"../util/interpolate\"),Anchor=require(\"../symbol/anchor\"),checkMaxAngle=require(\"./check_max_angle\");module.exports=getAnchors;\n},{\"../symbol/anchor\":157,\"../util/interpolate\":204,\"./check_max_angle\":158}],164:[function(require,module,exports){\n\"use strict\";var ShelfPack=require(\"@mapbox/shelf-pack\"),util=require(\"../util/util\"),SIZE_GROWTH_RATE=4,DEFAULT_SIZE=128,MAX_SIZE=2048,GlyphAtlas=function(){this.width=DEFAULT_SIZE,this.height=DEFAULT_SIZE,this.atlas=new ShelfPack(this.width,this.height),this.index={},this.ids={},this.data=new Uint8Array(this.width*this.height)};GlyphAtlas.prototype.getGlyphs=function(){var t,i,e,h=this,r={};for(var s in h.ids)t=s.split(\"#\"),i=t[0],e=t[1],r[i]||(r[i]=[]),r[i].push(e);return r},GlyphAtlas.prototype.getRects=function(){var t,i,e,h=this,r={};for(var s in h.ids)t=s.split(\"#\"),i=t[0],e=t[1],r[i]||(r[i]={}),r[i][e]=h.index[s];return r},GlyphAtlas.prototype.addGlyph=function(t,i,e,h){var r=this;if(!e)return null;var s=i+\"#\"+e.id;if(this.index[s])return this.ids[s].indexOf(t)<0&&this.ids[s].push(t),this.index[s];if(!e.bitmap)return null;var a=e.width+2*h,E=e.height+2*h,n=1,l=a+2*n,T=E+2*n;l+=4-l%4,T+=4-T%4;var u=this.atlas.packOne(l,T);if(u||(this.resize(),u=this.atlas.packOne(l,T)),!u)return util.warnOnce(\"glyph bitmap overflow\"),null;this.index[s]=u,this.ids[s]=[t];for(var d=this.data,p=e.bitmap,A=0;A=MAX_SIZE||e>=MAX_SIZE)){this.texture&&(this.gl&&this.gl.deleteTexture(this.texture),this.texture=null),this.width*=SIZE_GROWTH_RATE,this.height*=SIZE_GROWTH_RATE,this.atlas.resize(this.width,this.height);for(var h=new ArrayBuffer(this.width*this.height),r=0;r65535)return a(\"glyphs > 65535 not supported\");void 0===this.loading[t]&&(this.loading[t]={});var l=this.loading[t];if(l[e])l[e].push(a);else{l[e]=[a];var i=256*e+\"-\"+(256*e+255),r=glyphUrl(t,i,this.url);ajax.getArrayBuffer(r,function(t,a){for(var i=!t&&new Glyphs(new Protobuf(a.data)),r=0;r1?2:1,this.canvas&&(this.canvas.width=this.width*this.pixelRatio,this.canvas.height=this.height*this.pixelRatio)),this.sprite=t},i.prototype.addIcons=function(t,i){for(var e=this,r=0;r1||(b?(clearTimeout(b),b=null,h(\"dblclick\",t)):b=setTimeout(l,300))}function i(e){f(\"touchmove\",e)}function c(e){f(\"touchend\",e)}function d(e){f(\"touchcancel\",e)}function l(){b=null}function s(e){var t=DOM.mousePos(g,e);t.equals(L)&&h(\"click\",e)}function v(e){h(\"dblclick\",e),e.preventDefault()}function m(t){var n=e.dragRotate&&e.dragRotate.isActive();E||n?E&&(p=t):h(\"contextmenu\",t),t.preventDefault()}function h(t,n){var o=DOM.mousePos(g,n);return e.fire(t,{lngLat:e.unproject(o),point:o,originalEvent:n})}function f(t,n){var o=DOM.touchPos(g,n),r=o.reduce(function(e,t,n,o){return e.add(t.div(o.length))},new Point(0,0));return e.fire(t,{lngLat:e.unproject(r),point:r,lngLats:o.map(function(t){return e.unproject(t)},this),points:o,originalEvent:n})}var g=e.getCanvasContainer(),p=null,E=!1,L=null,b=null;for(var q in handlers)e[q]=new handlers[q](e,t),t.interactive&&t[q]&&e[q].enable(t[q]);g.addEventListener(\"mouseout\",n,!1),g.addEventListener(\"mousedown\",o,!1),g.addEventListener(\"mouseup\",r,!1),g.addEventListener(\"mousemove\",a,!1),g.addEventListener(\"touchstart\",u,!1),g.addEventListener(\"touchend\",c,!1),g.addEventListener(\"touchmove\",i,!1),g.addEventListener(\"touchcancel\",d,!1),g.addEventListener(\"click\",s,!1),g.addEventListener(\"dblclick\",v,!1),g.addEventListener(\"contextmenu\",m,!1)};\n},{\"../util/dom\":199,\"./handler/box_zoom\":179,\"./handler/dblclick_zoom\":180,\"./handler/drag_pan\":181,\"./handler/drag_rotate\":182,\"./handler/keyboard\":183,\"./handler/scroll_zoom\":184,\"./handler/touch_zoom_rotate\":185,\"point-geometry\":26}],172:[function(require,module,exports){\n\"use strict\";var util=require(\"../util/util\"),interpolate=require(\"../util/interpolate\"),browser=require(\"../util/browser\"),LngLat=require(\"../geo/lng_lat\"),LngLatBounds=require(\"../geo/lng_lat_bounds\"),Point=require(\"point-geometry\"),Evented=require(\"../util/evented\"),Camera=function(t){function i(i,e){t.call(this),this.moving=!1,this.transform=i,this._bearingSnap=e.bearingSnap}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.getCenter=function(){return this.transform.center},i.prototype.setCenter=function(t,i){return this.jumpTo({center:t},i),this},i.prototype.panBy=function(t,i,e){return this.panTo(this.transform.center,util.extend({offset:Point.convert(t).mult(-1)},i),e),this},i.prototype.panTo=function(t,i,e){return this.easeTo(util.extend({center:t},i),e)},i.prototype.getZoom=function(){return this.transform.zoom},i.prototype.setZoom=function(t,i){return this.jumpTo({zoom:t},i),this},i.prototype.zoomTo=function(t,i,e){return this.easeTo(util.extend({zoom:t},i),e)},i.prototype.zoomIn=function(t,i){return this.zoomTo(this.getZoom()+1,t,i),this},i.prototype.zoomOut=function(t,i){return this.zoomTo(this.getZoom()-1,t,i),this},i.prototype.getBearing=function(){return this.transform.bearing},i.prototype.setBearing=function(t,i){return this.jumpTo({bearing:t},i),this},i.prototype.rotateTo=function(t,i,e){return this.easeTo(util.extend({bearing:t},i),e)},i.prototype.resetNorth=function(t,i){return this.rotateTo(0,util.extend({duration:1e3},t),i),this},i.prototype.snapToNorth=function(t,i){return Math.abs(this.getBearing())i?1:0}),[\"bottom\",\"left\",\"right\",\"top\"]))return void util.warnOnce(\"options.padding must be a positive number, or an Object with keys 'bottom', 'left', 'right', 'top'\");t=LngLatBounds.convert(t);var n=[i.padding.left-i.padding.right,i.padding.top-i.padding.bottom],r=Math.min(i.padding.right,i.padding.left),s=Math.min(i.padding.top,i.padding.bottom);i.offset=[i.offset[0]+n[0],i.offset[1]+n[1]];var a=Point.convert(i.offset),h=this.transform,u=h.project(t.getNorthWest()),p=h.project(t.getSouthEast()),c=p.sub(u),g=(h.width-2*r-2*Math.abs(a.x))/c.x,m=(h.height-2*s-2*Math.abs(a.y))/c.y;return m<0||g<0?void util.warnOnce(\"Map cannot fit within canvas with the given bounds, padding, and/or offset.\"):(i.center=h.unproject(u.add(p).div(2)),i.zoom=Math.min(h.scaleZoom(h.scale*Math.min(g,m)),i.maxZoom),i.bearing=0,i.linear?this.easeTo(i,e):this.flyTo(i,e))},i.prototype.jumpTo=function(t,i){this.stop();var e=this.transform,o=!1,n=!1,r=!1;return\"zoom\"in t&&e.zoom!==+t.zoom&&(o=!0,e.zoom=+t.zoom),\"center\"in t&&(e.center=LngLat.convert(t.center)),\"bearing\"in t&&e.bearing!==+t.bearing&&(n=!0,e.bearing=+t.bearing),\"pitch\"in t&&e.pitch!==+t.pitch&&(r=!0,e.pitch=+t.pitch),this.fire(\"movestart\",i).fire(\"move\",i),o&&this.fire(\"zoomstart\",i).fire(\"zoom\",i).fire(\"zoomend\",i),n&&this.fire(\"rotate\",i),r&&this.fire(\"pitch\",i),this.fire(\"moveend\",i)},i.prototype.easeTo=function(t,i){var e=this;this.stop(),t=util.extend({offset:[0,0],duration:500,easing:util.ease},t);var o,n,r=this.transform,s=Point.convert(t.offset),a=this.getZoom(),h=this.getBearing(),u=this.getPitch(),p=\"zoom\"in t?+t.zoom:a,c=\"bearing\"in t?this._normalizeBearing(t.bearing,h):h,g=\"pitch\"in t?+t.pitch:u;\"center\"in t?(o=LngLat.convert(t.center),n=r.centerPoint.add(s)):\"around\"in t?(o=LngLat.convert(t.around),n=r.locationPoint(o)):(n=r.centerPoint.add(s),o=r.pointLocation(n));var m=r.locationPoint(o);return t.animate===!1&&(t.duration=0),this.zooming=p!==a,this.rotating=h!==c,this.pitching=g!==u,t.smoothEasing&&0!==t.duration&&(t.easing=this._smoothOutEasing(t.duration)),t.noMoveStart||(this.moving=!0,this.fire(\"movestart\",i)),this.zooming&&this.fire(\"zoomstart\",i),clearTimeout(this._onEaseEnd),this._ease(function(t){this.zooming&&(r.zoom=interpolate(a,p,t)),this.rotating&&(r.bearing=interpolate(h,c,t)),this.pitching&&(r.pitch=interpolate(u,g,t)),r.setLocationAtPoint(o,m.add(n.sub(m)._mult(t))),this.fire(\"move\",i),this.zooming&&this.fire(\"zoom\",i),this.rotating&&this.fire(\"rotate\",i),this.pitching&&this.fire(\"pitch\",i)},function(){t.delayEndEvents?e._onEaseEnd=setTimeout(e._easeToEnd.bind(e,i),t.delayEndEvents):e._easeToEnd(i)},t),this},i.prototype._easeToEnd=function(t){var i=this.zooming;this.moving=!1,this.zooming=!1,this.rotating=!1,this.pitching=!1,i&&this.fire(\"zoomend\",t),this.fire(\"moveend\",t)},i.prototype.flyTo=function(t,i){function e(t){var i=(y*y-z*z+(t?-1:1)*E*E*_*_)/(2*(t?y:z)*E*_);return Math.log(Math.sqrt(i*i+1)-i)}function o(t){return(Math.exp(t)-Math.exp(-t))/2}function n(t){return(Math.exp(t)+Math.exp(-t))/2}function r(t){return o(t)/n(t)}this.stop(),t=util.extend({offset:[0,0],speed:1.2,curve:1.42,easing:util.ease},t);var s=this.transform,a=Point.convert(t.offset),h=this.getZoom(),u=this.getBearing(),p=this.getPitch(),c=\"center\"in t?LngLat.convert(t.center):this.getCenter(),g=\"zoom\"in t?+t.zoom:h,m=\"bearing\"in t?this._normalizeBearing(t.bearing,u):u,f=\"pitch\"in t?+t.pitch:p;Math.abs(s.center.lng)+Math.abs(c.lng)>180&&(s.center.lng>0&&c.lng<0?c.lng+=360:s.center.lng<0&&c.lng>0&&(c.lng-=360));var d=s.zoomScale(g-h),l=s.point,v=\"center\"in t?s.project(c).sub(a.div(d)):l,b=t.curve,z=Math.max(s.width,s.height),y=z/d,_=v.sub(l).mag();if(\"minZoom\"in t){var M=util.clamp(Math.min(t.minZoom,h,g),s.minZoom,s.maxZoom),T=z/s.zoomScale(M-h);b=Math.sqrt(T/_*2)}var E=b*b,x=e(0),L=function(t){return n(x)/n(x+b*t)},Z=function(t){return z*((n(x)*r(x+b*t)-o(x))/E)/_},P=(e(1)-x)/b;if(Math.abs(_)<1e-6){if(Math.abs(z-y)<1e-6)return this.easeTo(t,i);var j=y=0)return!1;return!0}),this._container.innerHTML=i.join(\" | \"),this._editLink=null}},AttributionControl.prototype._updateCompact=function(){var t=this._map.getCanvasContainer().offsetWidth<=640;this._container.classList[t?\"add\":\"remove\"](\"compact\")},module.exports=AttributionControl;\n},{\"../../util/dom\":199,\"../../util/util\":212}],174:[function(require,module,exports){\n\"use strict\";var DOM=require(\"../../util/dom\"),util=require(\"../../util/util\"),window=require(\"../../util/window\"),FullscreenControl=function(){this._fullscreen=!1,util.bindAll([\"_onClickFullscreen\",\"_changeIcon\"],this),\"onfullscreenchange\"in window.document?this._fullscreenchange=\"fullscreenchange\":\"onmozfullscreenchange\"in window.document?this._fullscreenchange=\"mozfullscreenchange\":\"onwebkitfullscreenchange\"in window.document?this._fullscreenchange=\"webkitfullscreenchange\":\"onmsfullscreenchange\"in window.document&&(this._fullscreenchange=\"MSFullscreenChange\")};FullscreenControl.prototype.onAdd=function(e){var n=\"mapboxgl-ctrl\",t=this._container=DOM.create(\"div\",n+\" mapboxgl-ctrl-group\"),l=this._fullscreenButton=DOM.create(\"button\",n+\"-icon \"+n+\"-fullscreen\",this._container);return l.setAttribute(\"aria-label\",\"Toggle fullscreen\"),l.type=\"button\",this._fullscreenButton.addEventListener(\"click\",this._onClickFullscreen),this._mapContainer=e.getContainer(),window.document.addEventListener(this._fullscreenchange,this._changeIcon),t},FullscreenControl.prototype.onRemove=function(){this._container.parentNode.removeChild(this._container),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},FullscreenControl.prototype._isFullscreen=function(){return this._fullscreen},FullscreenControl.prototype._changeIcon=function(e){if(e.target===this._mapContainer){this._fullscreen=!this._fullscreen;var n=\"mapboxgl-ctrl\";this._fullscreenButton.classList.toggle(n+\"-shrink\"),this._fullscreenButton.classList.toggle(n+\"-fullscreen\")}},FullscreenControl.prototype._onClickFullscreen=function(){this._isFullscreen()?window.document.exitFullscreen?window.document.exitFullscreen():window.document.mozCancelFullScreen?window.document.mozCancelFullScreen():window.document.msExitFullscreen?window.document.msExitFullscreen():window.document.webkitCancelFullScreen&&window.document.webkitCancelFullScreen():this._mapContainer.requestFullscreen?this._mapContainer.requestFullscreen():this._mapContainer.mozRequestFullScreen?this._mapContainer.mozRequestFullScreen():this._mapContainer.msRequestFullscreen?this._mapContainer.msRequestFullscreen():this._mapContainer.webkitRequestFullscreen&&this._mapContainer.webkitRequestFullscreen()},module.exports=FullscreenControl;\n},{\"../../util/dom\":199,\"../../util/util\":212,\"../../util/window\":194}],175:[function(require,module,exports){\n\"use strict\";function checkGeolocationSupport(t){void 0!==supportsGeolocation?t(supportsGeolocation):void 0!==window.navigator.permissions?window.navigator.permissions.query({name:\"geolocation\"}).then(function(o){supportsGeolocation=\"denied\"!==o.state,t(supportsGeolocation)}):(supportsGeolocation=!!window.navigator.geolocation,t(supportsGeolocation))}var Evented=require(\"../../util/evented\"),DOM=require(\"../../util/dom\"),window=require(\"../../util/window\"),util=require(\"../../util/util\"),defaultGeoPositionOptions={enableHighAccuracy:!1,timeout:6e3},className=\"mapboxgl-ctrl\",supportsGeolocation,GeolocateControl=function(t){function o(o){t.call(this),this.options=o||{},util.bindAll([\"_onSuccess\",\"_onError\",\"_finish\",\"_setupUI\"],this)}return t&&(o.__proto__=t),o.prototype=Object.create(t&&t.prototype),o.prototype.constructor=o,o.prototype.onAdd=function(t){return this._map=t,this._container=DOM.create(\"div\",className+\" \"+className+\"-group\"),checkGeolocationSupport(this._setupUI),this._container},o.prototype.onRemove=function(){this._container.parentNode.removeChild(this._container),this._map=void 0},o.prototype._onSuccess=function(t){this._map.jumpTo({center:[t.coords.longitude,t.coords.latitude],zoom:17,bearing:0,pitch:0}),this.fire(\"geolocate\",t),this._finish()},o.prototype._onError=function(t){this.fire(\"error\",t),this._finish()},o.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},o.prototype._setupUI=function(t){t!==!1&&(this._container.addEventListener(\"contextmenu\",function(t){return t.preventDefault()}),this._geolocateButton=DOM.create(\"button\",className+\"-icon \"+className+\"-geolocate\",this._container),this._geolocateButton.type=\"button\",this._geolocateButton.setAttribute(\"aria-label\",\"Geolocate\"),this.options.watchPosition&&this._geolocateButton.setAttribute(\"aria-pressed\",!1),this._geolocateButton.addEventListener(\"click\",this._onClickGeolocate.bind(this)))},o.prototype._onClickGeolocate=function(){var t=util.extend(defaultGeoPositionOptions,this.options&&this.options.positionOptions||{});this.options.watchPosition?void 0!==this._geolocationWatchID?(this._geolocateButton.classList.remove(\"watching\"),this._geolocateButton.setAttribute(\"aria-pressed\",!1),window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0):(this._geolocateButton.classList.add(\"watching\"),this._geolocateButton.setAttribute(\"aria-pressed\",!0),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,t)):(window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,t),this._timeoutId=setTimeout(this._finish,1e4))},o}(Evented);module.exports=GeolocateControl;\n},{\"../../util/dom\":199,\"../../util/evented\":200,\"../../util/util\":212,\"../../util/window\":194}],176:[function(require,module,exports){\n\"use strict\";var DOM=require(\"../../util/dom\"),util=require(\"../../util/util\"),LogoControl=function(){util.bindAll([\"_updateLogo\"],this)};LogoControl.prototype.onAdd=function(o){return this._map=o,this._container=DOM.create(\"div\",\"mapboxgl-ctrl\"),this._map.on(\"sourcedata\",this._updateLogo),this._updateLogo(),this._container},LogoControl.prototype.onRemove=function(){this._container.parentNode.removeChild(this._container),this._map.off(\"sourcedata\",this._updateLogo)},LogoControl.prototype.getDefaultPosition=function(){return\"bottom-left\"},LogoControl.prototype._updateLogo=function(o){if(o&&\"metadata\"===o.sourceDataType)if(!this._container.childNodes.length&&this._logoRequired()){var t=DOM.create(\"a\",\"mapboxgl-ctrl-logo\");t.target=\"_blank\",t.href=\"https://www.mapbox.com/\",t.setAttribute(\"aria-label\",\"Mapbox logo\"),this._container.appendChild(t),this._map.off(\"data\",this._updateLogo)}else this._container.childNodes.length&&!this._logoRequired()&&this.onRemove()},LogoControl.prototype._logoRequired=function(){if(this._map.style){var o=this._map.style.sourceCaches;for(var t in o){var e=o[t].getSource();if(e.mapbox_logo)return!0}return!1}},module.exports=LogoControl;\n},{\"../../util/dom\":199,\"../../util/util\":212}],177:[function(require,module,exports){\n\"use strict\";function copyMouseEvent(t){return new window.MouseEvent(t.type,{button:2,buttons:2,bubbles:!0,cancelable:!0,detail:t.detail,view:t.view,screenX:t.screenX,screenY:t.screenY,clientX:t.clientX,clientY:t.clientY,movementX:t.movementX,movementY:t.movementY,ctrlKey:t.ctrlKey,shiftKey:t.shiftKey,altKey:t.altKey,metaKey:t.metaKey})}var DOM=require(\"../../util/dom\"),window=require(\"../../util/window\"),util=require(\"../../util/util\"),className=\"mapboxgl-ctrl\",NavigationControl=function(){util.bindAll([\"_rotateCompassArrow\"],this)};NavigationControl.prototype._rotateCompassArrow=function(){var t=\"rotate(\"+this._map.transform.angle*(180/Math.PI)+\"deg)\";this._compassArrow.style.transform=t},NavigationControl.prototype.onAdd=function(t){return this._map=t,this._container=DOM.create(\"div\",className+\" \"+className+\"-group\",t.getContainer()),this._container.addEventListener(\"contextmenu\",this._onContextMenu.bind(this)),this._zoomInButton=this._createButton(className+\"-icon \"+className+\"-zoom-in\",\"Zoom In\",t.zoomIn.bind(t)),this._zoomOutButton=this._createButton(className+\"-icon \"+className+\"-zoom-out\",\"Zoom Out\",t.zoomOut.bind(t)),this._compass=this._createButton(className+\"-icon \"+className+\"-compass\",\"Reset North\",t.resetNorth.bind(t)),this._compassArrow=DOM.create(\"span\",className+\"-compass-arrow\",this._compass),this._compass.addEventListener(\"mousedown\",this._onCompassDown.bind(this)),this._onCompassMove=this._onCompassMove.bind(this),this._onCompassUp=this._onCompassUp.bind(this),this._map.on(\"rotate\",this._rotateCompassArrow),this._rotateCompassArrow(),this._container},NavigationControl.prototype.onRemove=function(){this._container.parentNode.removeChild(this._container),this._map.off(\"rotate\",this._rotateCompassArrow),this._map=void 0},NavigationControl.prototype._onContextMenu=function(t){t.preventDefault()},NavigationControl.prototype._onCompassDown=function(t){0===t.button&&(DOM.disableDrag(),window.document.addEventListener(\"mousemove\",this._onCompassMove),window.document.addEventListener(\"mouseup\",this._onCompassUp),this._map.getCanvasContainer().dispatchEvent(copyMouseEvent(t)),t.stopPropagation())},NavigationControl.prototype._onCompassMove=function(t){0===t.button&&(this._map.getCanvasContainer().dispatchEvent(copyMouseEvent(t)),t.stopPropagation())},NavigationControl.prototype._onCompassUp=function(t){0===t.button&&(window.document.removeEventListener(\"mousemove\",this._onCompassMove),window.document.removeEventListener(\"mouseup\",this._onCompassUp),DOM.enableDrag(),this._map.getCanvasContainer().dispatchEvent(copyMouseEvent(t)),t.stopPropagation())},NavigationControl.prototype._createButton=function(t,o,e){var n=DOM.create(\"button\",t,this._container);return n.type=\"button\",n.setAttribute(\"aria-label\",o),n.addEventListener(\"click\",function(){e()}),n},module.exports=NavigationControl;\n},{\"../../util/dom\":199,\"../../util/util\":212,\"../../util/window\":194}],178:[function(require,module,exports){\n\"use strict\";function updateScale(t,e,o){var n=o&&o.maxWidth||100,i=t._container.clientHeight/2,a=getDistance(t.unproject([0,i]),t.unproject([n,i]));if(o&&\"imperial\"===o.unit){var r=3.2808*a;if(r>5280){var l=r/5280;setScale(e,n,l,\"mi\")}else setScale(e,n,r,\"ft\")}else setScale(e,n,a,\"m\")}function setScale(t,e,o,n){var i=getRoundNum(o),a=i/o;\"m\"===n&&i>=1e3&&(i/=1e3,n=\"km\"),t.style.width=e*a+\"px\",t.innerHTML=i+n}function getDistance(t,e){var o=6371e3,n=Math.PI/180,i=t.lat*n,a=e.lat*n,r=Math.sin(i)*Math.sin(a)+Math.cos(i)*Math.cos(a)*Math.cos((e.lng-t.lng)*n),l=o*Math.acos(Math.min(r,1));return l}function getRoundNum(t){var e=Math.pow(10,(\"\"+Math.floor(t)).length-1),o=t/e;return o=o>=10?10:o>=5?5:o>=3?3:o>=2?2:1,e*o}var DOM=require(\"../../util/dom\"),util=require(\"../../util/util\"),ScaleControl=function(t){this.options=t,util.bindAll([\"_onMove\"],this)};ScaleControl.prototype.getDefaultPosition=function(){return\"bottom-left\"},ScaleControl.prototype._onMove=function(){updateScale(this._map,this._container,this.options)},ScaleControl.prototype.onAdd=function(t){return this._map=t,this._container=DOM.create(\"div\",\"mapboxgl-ctrl mapboxgl-ctrl-scale\",t.getContainer()),this._map.on(\"move\",this._onMove),this._onMove(),this._container},ScaleControl.prototype.onRemove=function(){this._container.parentNode.removeChild(this._container),this._map.off(\"move\",this._onMove),this._map=void 0},module.exports=ScaleControl;\n},{\"../../util/dom\":199,\"../../util/util\":212}],179:[function(require,module,exports){\n\"use strict\";var DOM=require(\"../../util/dom\"),LngLatBounds=require(\"../../geo/lng_lat_bounds\"),util=require(\"../../util/util\"),window=require(\"../../util/window\"),BoxZoomHandler=function(o){this._map=o,this._el=o.getCanvasContainer(),this._container=o.getContainer(),util.bindAll([\"_onMouseDown\",\"_onMouseMove\",\"_onMouseUp\",\"_onKeyDown\"],this)};BoxZoomHandler.prototype.isEnabled=function(){return!!this._enabled},BoxZoomHandler.prototype.isActive=function(){return!!this._active},BoxZoomHandler.prototype.enable=function(){this.isEnabled()||(this._el.addEventListener(\"mousedown\",this._onMouseDown,!1),this._enabled=!0)},BoxZoomHandler.prototype.disable=function(){this.isEnabled()&&(this._el.removeEventListener(\"mousedown\",this._onMouseDown),this._enabled=!1)},BoxZoomHandler.prototype._onMouseDown=function(o){o.shiftKey&&0===o.button&&(window.document.addEventListener(\"mousemove\",this._onMouseMove,!1),window.document.addEventListener(\"keydown\",this._onKeyDown,!1),window.document.addEventListener(\"mouseup\",this._onMouseUp,!1),DOM.disableDrag(),this._startPos=DOM.mousePos(this._el,o),this._active=!0)},BoxZoomHandler.prototype._onMouseMove=function(o){var e=this._startPos,t=DOM.mousePos(this._el,o);this._box||(this._box=DOM.create(\"div\",\"mapboxgl-boxzoom\",this._container),this._container.classList.add(\"mapboxgl-crosshair\"),this._fireEvent(\"boxzoomstart\",o));var n=Math.min(e.x,t.x),i=Math.max(e.x,t.x),s=Math.min(e.y,t.y),r=Math.max(e.y,t.y);DOM.setTransform(this._box,\"translate(\"+n+\"px,\"+s+\"px)\"),this._box.style.width=i-n+\"px\",this._box.style.height=r-s+\"px\"},BoxZoomHandler.prototype._onMouseUp=function(o){if(0===o.button){var e=this._startPos,t=DOM.mousePos(this._el,o),n=(new LngLatBounds).extend(this._map.unproject(e)).extend(this._map.unproject(t));this._finish(),e.x===t.x&&e.y===t.y?this._fireEvent(\"boxzoomcancel\",o):this._map.fitBounds(n,{linear:!0}).fire(\"boxzoomend\",{originalEvent:o,boxZoomBounds:n})}},BoxZoomHandler.prototype._onKeyDown=function(o){27===o.keyCode&&(this._finish(),this._fireEvent(\"boxzoomcancel\",o))},BoxZoomHandler.prototype._finish=function(){this._active=!1,window.document.removeEventListener(\"mousemove\",this._onMouseMove,!1),window.document.removeEventListener(\"keydown\",this._onKeyDown,!1),window.document.removeEventListener(\"mouseup\",this._onMouseUp,!1),this._container.classList.remove(\"mapboxgl-crosshair\"),this._box&&(this._box.parentNode.removeChild(this._box),this._box=null),DOM.enableDrag()},BoxZoomHandler.prototype._fireEvent=function(o,e){return this._map.fire(o,{originalEvent:e})},module.exports=BoxZoomHandler;\n},{\"../../geo/lng_lat_bounds\":63,\"../../util/dom\":199,\"../../util/util\":212,\"../../util/window\":194}],180:[function(require,module,exports){\n\"use strict\";var DoubleClickZoomHandler=function(o){this._map=o,this._onDblClick=this._onDblClick.bind(this)};DoubleClickZoomHandler.prototype.isEnabled=function(){return!!this._enabled},DoubleClickZoomHandler.prototype.enable=function(){this.isEnabled()||(this._map.on(\"dblclick\",this._onDblClick),this._enabled=!0)},DoubleClickZoomHandler.prototype.disable=function(){this.isEnabled()&&(this._map.off(\"dblclick\",this._onDblClick),this._enabled=!1)},DoubleClickZoomHandler.prototype._onDblClick=function(o){this._map.zoomTo(this._map.getZoom()+(o.originalEvent.shiftKey?-1:1),{around:o.lngLat},o)},module.exports=DoubleClickZoomHandler;\n},{}],181:[function(require,module,exports){\n\"use strict\";var DOM=require(\"../../util/dom\"),util=require(\"../../util/util\"),window=require(\"../../util/window\"),inertiaLinearity=.3,inertiaEasing=util.bezier(0,0,inertiaLinearity,1),inertiaMaxSpeed=1400,inertiaDeceleration=2500,DragPanHandler=function(t){this._map=t,this._el=t.getCanvasContainer(),util.bindAll([\"_onDown\",\"_onMove\",\"_onUp\",\"_onTouchEnd\",\"_onMouseUp\"],this)};DragPanHandler.prototype.isEnabled=function(){return!!this._enabled},DragPanHandler.prototype.isActive=function(){return!!this._active},DragPanHandler.prototype.enable=function(){this.isEnabled()||(this._el.addEventListener(\"mousedown\",this._onDown),this._el.addEventListener(\"touchstart\",this._onDown),this._enabled=!0)},DragPanHandler.prototype.disable=function(){this.isEnabled()&&(this._el.removeEventListener(\"mousedown\",this._onDown),this._el.removeEventListener(\"touchstart\",this._onDown),this._enabled=!1)},DragPanHandler.prototype._onDown=function(t){this._ignoreEvent(t)||this.isActive()||(t.touches?(window.document.addEventListener(\"touchmove\",this._onMove),window.document.addEventListener(\"touchend\",this._onTouchEnd)):(window.document.addEventListener(\"mousemove\",this._onMove),window.document.addEventListener(\"mouseup\",this._onMouseUp)),window.addEventListener(\"blur\",this._onMouseUp),this._active=!1,this._startPos=this._pos=DOM.mousePos(this._el,t),this._inertia=[[Date.now(),this._pos]])},DragPanHandler.prototype._onMove=function(t){if(!this._ignoreEvent(t)){this.isActive()||(this._active=!0,this._map.moving=!0,this._fireEvent(\"dragstart\",t),this._fireEvent(\"movestart\",t));var e=DOM.mousePos(this._el,t),n=this._map;n.stop(),this._drainInertiaBuffer(),this._inertia.push([Date.now(),e]),n.transform.setLocationAtPoint(n.transform.pointLocation(this._pos),e),this._fireEvent(\"drag\",t),this._fireEvent(\"move\",t),this._pos=e,t.preventDefault()}},DragPanHandler.prototype._onUp=function(t){var e=this;if(this.isActive()){this._active=!1,this._fireEvent(\"dragend\",t),this._drainInertiaBuffer();var n=function(){e._map.moving=!1,e._fireEvent(\"moveend\",t)},i=this._inertia;if(i.length<2)return void n();var o=i[i.length-1],r=i[0],a=o[1].sub(r[1]),s=(o[0]-r[0])/1e3;if(0===s||o[1].equals(r[1]))return void n();var u=a.mult(inertiaLinearity/s),d=u.mag();d>inertiaMaxSpeed&&(d=inertiaMaxSpeed,u._unit()._mult(d));var h=d/(inertiaDeceleration*inertiaLinearity),v=u.mult(-h/2);this._map.panBy(v,{duration:1e3*h,easing:inertiaEasing,noMoveStart:!0},{originalEvent:t})}},DragPanHandler.prototype._onMouseUp=function(t){this._ignoreEvent(t)||(this._onUp(t),window.document.removeEventListener(\"mousemove\",this._onMove),window.document.removeEventListener(\"mouseup\",this._onMouseUp),window.removeEventListener(\"blur\",this._onMouseUp))},DragPanHandler.prototype._onTouchEnd=function(t){this._ignoreEvent(t)||(this._onUp(t),window.document.removeEventListener(\"touchmove\",this._onMove),window.document.removeEventListener(\"touchend\",this._onTouchEnd))},DragPanHandler.prototype._fireEvent=function(t,e){return this._map.fire(t,{originalEvent:e})},DragPanHandler.prototype._ignoreEvent=function(t){var e=this._map;if(e.boxZoom&&e.boxZoom.isActive())return!0;if(e.dragRotate&&e.dragRotate.isActive())return!0;if(t.touches)return t.touches.length>1;if(t.ctrlKey)return!0;var n=1,i=0;return\"mousemove\"===t.type?t.buttons&0===n:t.button&&t.button!==i},DragPanHandler.prototype._drainInertiaBuffer=function(){for(var t=this._inertia,e=Date.now(),n=160;t.length>0&&e-t[0][0]>n;)t.shift()},module.exports=DragPanHandler;\n},{\"../../util/dom\":199,\"../../util/util\":212,\"../../util/window\":194}],182:[function(require,module,exports){\n\"use strict\";var DOM=require(\"../../util/dom\"),util=require(\"../../util/util\"),window=require(\"../../util/window\"),inertiaLinearity=.25,inertiaEasing=util.bezier(0,0,inertiaLinearity,1),inertiaMaxSpeed=180,inertiaDeceleration=720,DragRotateHandler=function(t,e){this._map=t,this._el=t.getCanvasContainer(),this._bearingSnap=e.bearingSnap,this._pitchWithRotate=e.pitchWithRotate!==!1,util.bindAll([\"_onDown\",\"_onMove\",\"_onUp\"],this)};DragRotateHandler.prototype.isEnabled=function(){return!!this._enabled},DragRotateHandler.prototype.isActive=function(){return!!this._active},DragRotateHandler.prototype.enable=function(){this.isEnabled()||(this._el.addEventListener(\"mousedown\",this._onDown),this._enabled=!0)},DragRotateHandler.prototype.disable=function(){this.isEnabled()&&(this._el.removeEventListener(\"mousedown\",this._onDown),this._enabled=!1)},DragRotateHandler.prototype._onDown=function(t){this._ignoreEvent(t)||this.isActive()||(window.document.addEventListener(\"mousemove\",this._onMove),window.document.addEventListener(\"mouseup\",this._onUp),window.addEventListener(\"blur\",this._onUp),this._active=!1,this._inertia=[[Date.now(),this._map.getBearing()]],this._startPos=this._pos=DOM.mousePos(this._el,t),this._center=this._map.transform.centerPoint,t.preventDefault())},DragRotateHandler.prototype._onMove=function(t){if(!this._ignoreEvent(t)){this.isActive()||(this._active=!0,this._map.moving=!0,this._fireEvent(\"rotatestart\",t),this._fireEvent(\"movestart\",t));var e=this._map;e.stop();var i=this._pos,n=DOM.mousePos(this._el,t),r=.8*(i.x-n.x),a=(i.y-n.y)*-.5,o=e.getBearing()-r,s=e.getPitch()-a,h=this._inertia,v=h[h.length-1];this._drainInertiaBuffer(),h.push([Date.now(),e._normalizeBearing(o,v[1])]),e.transform.bearing=o,this._pitchWithRotate&&(e.transform.pitch=s),this._fireEvent(\"rotate\",t),this._fireEvent(\"move\",t),this._pos=n}},DragRotateHandler.prototype._onUp=function(t){var e=this;if(!this._ignoreEvent(t)&&(window.document.removeEventListener(\"mousemove\",this._onMove),window.document.removeEventListener(\"mouseup\",this._onUp),window.removeEventListener(\"blur\",this._onUp),this.isActive())){this._active=!1,this._fireEvent(\"rotateend\",t),this._drainInertiaBuffer();var i=this._map,n=i.getBearing(),r=this._inertia,a=function(){Math.abs(n)inertiaMaxSpeed&&(p=inertiaMaxSpeed);var l=p/(inertiaDeceleration*inertiaLinearity),g=u*p*(l/2);v+=g,Math.abs(i._normalizeBearing(v,0))1;var i=t.ctrlKey?1:2,n=t.ctrlKey?0:2,r=t.button;return\"undefined\"!=typeof InstallTrigger&&2===t.button&&t.ctrlKey&&window.navigator.platform.toUpperCase().indexOf(\"MAC\")>=0&&(r=0),\"mousemove\"===t.type?t.buttons&0===i:!this.isActive()&&r!==n},DragRotateHandler.prototype._drainInertiaBuffer=function(){for(var t=this._inertia,e=Date.now(),i=160;t.length>0&&e-t[0][0]>i;)t.shift()},module.exports=DragRotateHandler;\n},{\"../../util/dom\":199,\"../../util/util\":212,\"../../util/window\":194}],183:[function(require,module,exports){\n\"use strict\";function easeOut(e){return e*(2-e)}var panStep=100,bearingStep=15,pitchStep=10,KeyboardHandler=function(e){this._map=e,this._el=e.getCanvasContainer(),this._onKeyDown=this._onKeyDown.bind(this)};KeyboardHandler.prototype.isEnabled=function(){return!!this._enabled},KeyboardHandler.prototype.enable=function(){this.isEnabled()||(this._el.addEventListener(\"keydown\",this._onKeyDown,!1),this._enabled=!0)},KeyboardHandler.prototype.disable=function(){this.isEnabled()&&(this._el.removeEventListener(\"keydown\",this._onKeyDown),this._enabled=!1)},KeyboardHandler.prototype._onKeyDown=function(e){if(!(e.altKey||e.ctrlKey||e.metaKey)){var t=0,n=0,a=0,i=0,r=0;switch(e.keyCode){case 61:case 107:case 171:case 187:t=1;break;case 189:case 109:case 173:t=-1;break;case 37:e.shiftKey?n=-1:(e.preventDefault(),i=-1);break;case 39:e.shiftKey?n=1:(e.preventDefault(),i=1);break;case 38:e.shiftKey?a=1:(e.preventDefault(),r=-1);break;case 40:e.shiftKey?a=-1:(r=1,e.preventDefault())}var s=this._map,o=s.getZoom(),d={duration:300,delayEndEvents:500,easing:easeOut,zoom:t?Math.round(o)+t*(e.shiftKey?2:1):o,bearing:s.getBearing()+n*bearingStep,pitch:s.getPitch()+a*pitchStep,offset:[-i*panStep,-r*panStep],center:s.getCenter()};s.easeTo(d,{originalEvent:e})}},module.exports=KeyboardHandler;\n},{}],184:[function(require,module,exports){\n\"use strict\";var DOM=require(\"../../util/dom\"),util=require(\"../../util/util\"),browser=require(\"../../util/browser\"),window=require(\"../../util/window\"),ua=window.navigator.userAgent.toLowerCase(),firefox=ua.indexOf(\"firefox\")!==-1,safari=ua.indexOf(\"safari\")!==-1&&ua.indexOf(\"chrom\")===-1,ScrollZoomHandler=function(e){this._map=e,this._el=e.getCanvasContainer(),util.bindAll([\"_onWheel\",\"_onTimeout\"],this)};ScrollZoomHandler.prototype.isEnabled=function(){return!!this._enabled},ScrollZoomHandler.prototype.enable=function(e){this.isEnabled()||(this._el.addEventListener(\"wheel\",this._onWheel,!1),this._el.addEventListener(\"mousewheel\",this._onWheel,!1),this._enabled=!0,this._aroundCenter=e&&\"center\"===e.around)},ScrollZoomHandler.prototype.disable=function(){this.isEnabled()&&(this._el.removeEventListener(\"wheel\",this._onWheel),this._el.removeEventListener(\"mousewheel\",this._onWheel),this._enabled=!1)},ScrollZoomHandler.prototype._onWheel=function(e){var t;\"wheel\"===e.type?(t=e.deltaY,firefox&&e.deltaMode===window.WheelEvent.DOM_DELTA_PIXEL&&(t/=browser.devicePixelRatio),e.deltaMode===window.WheelEvent.DOM_DELTA_LINE&&(t*=40)):\"mousewheel\"===e.type&&(t=-e.wheelDeltaY,safari&&(t/=3));var o=browser.now(),i=o-(this._time||0);this._pos=DOM.mousePos(this._el,e),this._time=o,0!==t&&t%4.000244140625===0?this._type=\"wheel\":0!==t&&Math.abs(t)<4?this._type=\"trackpad\":i>400?(this._type=null,this._lastValue=t,this._timeout=setTimeout(this._onTimeout,40)):this._type||(this._type=Math.abs(i*t)<200?\"trackpad\":\"wheel\",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,t+=this._lastValue)),e.shiftKey&&t&&(t/=4),this._type&&this._zoom(-t,e),e.preventDefault()},ScrollZoomHandler.prototype._onTimeout=function(){this._type=\"wheel\",this._zoom(-this._lastValue)},ScrollZoomHandler.prototype._zoom=function(e,t){if(0!==e){var o=this._map,i=2/(1+Math.exp(-Math.abs(e/100)));e<0&&0!==i&&(i=1/i);var l=o.ease?o.ease.to:o.transform.scale,s=o.transform.scaleZoom(l*i);o.zoomTo(s,{duration:\"wheel\"===this._type?200:0,around:this._aroundCenter?o.getCenter():o.unproject(this._pos),delayEndEvents:200,smoothEasing:!0},{originalEvent:t})}},module.exports=ScrollZoomHandler;\n},{\"../../util/browser\":192,\"../../util/dom\":199,\"../../util/util\":212,\"../../util/window\":194}],185:[function(require,module,exports){\n\"use strict\";var DOM=require(\"../../util/dom\"),util=require(\"../../util/util\"),window=require(\"../../util/window\"),inertiaLinearity=.15,inertiaEasing=util.bezier(0,0,inertiaLinearity,1),inertiaDeceleration=12,inertiaMaxSpeed=2.5,significantScaleThreshold=.15,significantRotateThreshold=4,TouchZoomRotateHandler=function(t){this._map=t,this._el=t.getCanvasContainer(),util.bindAll([\"_onStart\",\"_onMove\",\"_onEnd\"],this)};TouchZoomRotateHandler.prototype.isEnabled=function(){return!!this._enabled},TouchZoomRotateHandler.prototype.enable=function(t){this.isEnabled()||(this._el.addEventListener(\"touchstart\",this._onStart,!1),this._enabled=!0,this._aroundCenter=t&&\"center\"===t.around)},TouchZoomRotateHandler.prototype.disable=function(){this.isEnabled()&&(this._el.removeEventListener(\"touchstart\",this._onStart),this._enabled=!1)},TouchZoomRotateHandler.prototype.disableRotation=function(){this._rotationDisabled=!0},TouchZoomRotateHandler.prototype.enableRotation=function(){this._rotationDisabled=!1},TouchZoomRotateHandler.prototype._onStart=function(t){if(2===t.touches.length){var e=DOM.mousePos(this._el,t.touches[0]),o=DOM.mousePos(this._el,t.touches[1]);this._startVec=e.sub(o),this._startScale=this._map.transform.scale,this._startBearing=this._map.transform.bearing,this._gestureIntent=void 0,this._inertia=[],window.document.addEventListener(\"touchmove\",this._onMove,!1),window.document.addEventListener(\"touchend\",this._onEnd,!1)}},TouchZoomRotateHandler.prototype._onMove=function(t){if(2===t.touches.length){var e=DOM.mousePos(this._el,t.touches[0]),o=DOM.mousePos(this._el,t.touches[1]),i=e.add(o).div(2),n=e.sub(o),a=n.mag()/this._startVec.mag(),r=this._rotationDisabled?0:180*n.angleWith(this._startVec)/Math.PI,s=this._map;if(this._gestureIntent){var h={duration:0,around:s.unproject(i)};\"rotate\"===this._gestureIntent&&(h.bearing=this._startBearing+r),\"zoom\"!==this._gestureIntent&&\"rotate\"!==this._gestureIntent||(h.zoom=s.transform.scaleZoom(this._startScale*a)),s.stop(),this._drainInertiaBuffer(),this._inertia.push([Date.now(),a,i]),s.easeTo(h,{originalEvent:t})}else{var u=Math.abs(1-a)>significantScaleThreshold,d=Math.abs(r)>significantRotateThreshold;d?this._gestureIntent=\"rotate\":u&&(this._gestureIntent=\"zoom\"),this._gestureIntent&&(this._startVec=n,this._startScale=s.transform.scale,this._startBearing=s.transform.bearing)}t.preventDefault()}},TouchZoomRotateHandler.prototype._onEnd=function(t){window.document.removeEventListener(\"touchmove\",this._onMove),window.document.removeEventListener(\"touchend\",this._onEnd),this._drainInertiaBuffer();var e=this._inertia,o=this._map;if(e.length<2)return void o.snapToNorth({},{originalEvent:t});var i=e[e.length-1],n=e[0],a=o.transform.scaleZoom(this._startScale*i[1]),r=o.transform.scaleZoom(this._startScale*n[1]),s=a-r,h=(i[0]-n[0])/1e3,u=i[2];if(0===h||a===r)return void o.snapToNorth({},{originalEvent:t});var d=s*inertiaLinearity/h;Math.abs(d)>inertiaMaxSpeed&&(d=d>0?inertiaMaxSpeed:-inertiaMaxSpeed);var l=1e3*Math.abs(d/(inertiaDeceleration*inertiaLinearity)),c=a+d*l/2e3;c<0&&(c=0),o.easeTo({zoom:c,duration:l,easing:inertiaEasing,around:this._aroundCenter?o.getCenter():o.unproject(u)},{originalEvent:t})},TouchZoomRotateHandler.prototype._drainInertiaBuffer=function(){for(var t=this._inertia,e=Date.now(),o=160;t.length>2&&e-t[0][0]>o;)t.shift()},module.exports=TouchZoomRotateHandler;\n},{\"../../util/dom\":199,\"../../util/util\":212,\"../../util/window\":194}],186:[function(require,module,exports){\n\"use strict\";var util=require(\"../util/util\"),window=require(\"../util/window\"),Hash=function(){util.bindAll([\"_onHashChange\",\"_updateHash\"],this)};Hash.prototype.addTo=function(t){return this._map=t,window.addEventListener(\"hashchange\",this._onHashChange,!1),this._map.on(\"moveend\",this._updateHash),this},Hash.prototype.remove=function(){return window.removeEventListener(\"hashchange\",this._onHashChange,!1),this._map.off(\"moveend\",this._updateHash),delete this._map,this},Hash.prototype._onHashChange=function(){var t=window.location.hash.replace(\"#\",\"\").split(\"/\");return t.length>=3&&(this._map.jumpTo({center:[+t[2],+t[1]],zoom:+t[0],bearing:+(t[3]||0),pitch:+(t[4]||0)}),!0)},Hash.prototype._updateHash=function(){var t=this._map.getCenter(),e=this._map.getZoom(),a=this._map.getBearing(),h=this._map.getPitch(),i=Math.max(0,Math.ceil(Math.log(e)/Math.LN2)),n=\"#\"+Math.round(100*e)/100+\"/\"+t.lat.toFixed(i)+\"/\"+t.lng.toFixed(i);(a||h)&&(n+=\"/\"+Math.round(10*a)/10),h&&(n+=\"/\"+Math.round(h)),window.history.replaceState(\"\",\"\",n)},module.exports=Hash;\n},{\"../util/util\":212,\"../util/window\":194}],187:[function(require,module,exports){\n\"use strict\";function removeNode(t){t.parentNode&&t.parentNode.removeChild(t)}var util=require(\"../util/util\"),browser=require(\"../util/browser\"),window=require(\"../util/window\"),DOM=require(\"../util/dom\"),Style=require(\"../style/style\"),AnimationLoop=require(\"../style/animation_loop\"),Painter=require(\"../render/painter\"),Transform=require(\"../geo/transform\"),Hash=require(\"./hash\"),bindHandlers=require(\"./bind_handlers\"),Camera=require(\"./camera\"),LngLat=require(\"../geo/lng_lat\"),LngLatBounds=require(\"../geo/lng_lat_bounds\"),Point=require(\"point-geometry\"),AttributionControl=require(\"./control/attribution_control\"),LogoControl=require(\"./control/logo_control\"),isSupported=require(\"mapbox-gl-supported\"),defaultMinZoom=0,defaultMaxZoom=22,defaultOptions={center:[0,0],zoom:0,bearing:0,pitch:0,minZoom:defaultMinZoom,maxZoom:defaultMaxZoom,interactive:!0,scrollZoom:!0,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,bearingSnap:7,hash:!1,attributionControl:!0,failIfMajorPerformanceCaveat:!1,preserveDrawingBuffer:!1,trackResize:!0,renderWorldCopies:!0,refreshExpiredTiles:!0},Map=function(t){function e(e){var o=this;if(e=util.extend({},defaultOptions,e),null!=e.minZoom&&null!=e.maxZoom&&e.minZoom>e.maxZoom)throw new Error(\"maxZoom must be greater than minZoom\");var i=new Transform(e.minZoom,e.maxZoom,e.renderWorldCopies);if(t.call(this,i,e),this._interactive=e.interactive,this._failIfMajorPerformanceCaveat=e.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=e.preserveDrawingBuffer,this._trackResize=e.trackResize,this._bearingSnap=e.bearingSnap,this._refreshExpiredTiles=e.refreshExpiredTiles,\"string\"==typeof e.container){if(this._container=window.document.getElementById(e.container),!this._container)throw new Error(\"Container '\"+e.container+\"' not found.\")}else this._container=e.container;this.animationLoop=new AnimationLoop,e.maxBounds&&this.setMaxBounds(e.maxBounds),util.bindAll([\"_onWindowOnline\",\"_onWindowResize\",\"_contextLost\",\"_contextRestored\",\"_update\",\"_render\",\"_onData\",\"_onDataLoading\"],this),this._setupContainer(),this._setupPainter(),this.on(\"move\",this._update.bind(this,!1)),this.on(\"zoom\",this._update.bind(this,!0)),this.on(\"moveend\",function(){o.animationLoop.set(300),o._rerender()}),\"undefined\"!=typeof window&&(window.addEventListener(\"online\",this._onWindowOnline,!1),window.addEventListener(\"resize\",this._onWindowResize,!1)),bindHandlers(this,e),this._hash=e.hash&&(new Hash).addTo(this),this._hash&&this._hash._onHashChange()||this.jumpTo({center:e.center,zoom:e.zoom,bearing:e.bearing,pitch:e.pitch}),this._classes=[],this.resize(),e.classes&&this.setClasses(e.classes),e.style&&this.setStyle(e.style),e.attributionControl&&this.addControl(new AttributionControl),this.addControl(new LogoControl,e.logoPosition),this.on(\"style.load\",function(){this.transform.unmodified&&this.jumpTo(this.style.stylesheet),this.style.update(this._classes,{transition:!1})}),this.on(\"data\",this._onData),this.on(\"dataloading\",this._onDataLoading)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var o={showTileBoundaries:{},showCollisionBoxes:{},showOverdrawInspector:{},repaint:{},vertices:{}};return e.prototype.addControl=function(t,e){void 0===e&&t.getDefaultPosition&&(e=t.getDefaultPosition()),void 0===e&&(e=\"top-right\");var o=t.onAdd(this),i=this._controlPositions[e];return e.indexOf(\"bottom\")!==-1?i.insertBefore(o,i.firstChild):i.appendChild(o),this},e.prototype.removeControl=function(t){return t.onRemove(this),this},e.prototype.addClass=function(t,e){return util.warnOnce(\"Style classes are deprecated and will be removed in an upcoming release of Mapbox GL JS.\"),this._classes.indexOf(t)>=0||\"\"===t?this:(this._classes.push(t),this._classOptions=e,this.style&&this.style.updateClasses(),this._update(!0))},e.prototype.removeClass=function(t,e){util.warnOnce(\"Style classes are deprecated and will be removed in an upcoming release of Mapbox GL JS.\");var o=this._classes.indexOf(t);return o<0||\"\"===t?this:(this._classes.splice(o,1),this._classOptions=e,this.style&&this.style.updateClasses(),this._update(!0))},e.prototype.setClasses=function(t,e){util.warnOnce(\"Style classes are deprecated and will be removed in an upcoming release of Mapbox GL JS.\");for(var o={},i=0;i=0},e.prototype.getClasses=function(){return util.warnOnce(\"Style classes are deprecated and will be removed in an upcoming release of Mapbox GL JS.\"),this._classes},e.prototype.resize=function(){var t=this._containerDimensions(),e=t[0],o=t[1];return this._resizeCanvas(e,o),this.transform.resize(e,o),this.painter.resize(e,o),this.fire(\"movestart\").fire(\"move\").fire(\"resize\").fire(\"moveend\")},e.prototype.getBounds=function(){var t=new LngLatBounds(this.transform.pointLocation(new Point(0,this.transform.height)),this.transform.pointLocation(new Point(this.transform.width,0)));return(this.transform.angle||this.transform.pitch)&&(t.extend(this.transform.pointLocation(new Point(this.transform.size.x,0))),t.extend(this.transform.pointLocation(new Point(0,this.transform.size.y)))),t},e.prototype.setMaxBounds=function(t){if(t){var e=LngLatBounds.convert(t);this.transform.lngRange=[e.getWest(),e.getEast()],this.transform.latRange=[e.getSouth(),e.getNorth()],this.transform._constrain(),this._update()}else null!==t&&void 0!==t||(this.transform.lngRange=[],this.transform.latRange=[],this._update());return this},e.prototype.setMinZoom=function(t){if(t=null===t||void 0===t?defaultMinZoom:t,t>=defaultMinZoom&&t<=this.transform.maxZoom)return this.transform.minZoom=t,this._update(),this.getZoom()=this.transform.minZoom)return this.transform.maxZoom=t,this._update(),this.getZoom()>t&&this.setZoom(t),this;throw new Error(\"maxZoom must be greater than the current minZoom\")},e.prototype.getMaxZoom=function(){return this.transform.maxZoom},e.prototype.project=function(t){return this.transform.locationPoint(LngLat.convert(t))},e.prototype.unproject=function(t){return this.transform.pointLocation(Point.convert(t))},e.prototype.queryRenderedFeatures=function(){function t(t){return t instanceof Point||Array.isArray(t)}var e,o={};return 2===arguments.length?(e=arguments[0],o=arguments[1]):1===arguments.length&&t(arguments[0])?e=arguments[0]:1===arguments.length&&(o=arguments[0]),this.style.queryRenderedFeatures(this._makeQueryGeometry(e),o,this.transform.zoom,this.transform.angle)},e.prototype._makeQueryGeometry=function(t){var e=this;void 0===t&&(t=[Point.convert([0,0]),Point.convert([this.transform.width,this.transform.height])]);var o,i=t instanceof Point||\"number\"==typeof t[0];if(i){var r=Point.convert(t);o=[r]}else{var s=[Point.convert(t[0]),Point.convert(t[1])];o=[s[0],new Point(s[1].x,s[0].y),s[1],new Point(s[0].x,s[1].y),s[0]]}return o=o.map(function(t){return e.transform.pointCoordinate(t)})},e.prototype.querySourceFeatures=function(t,e){return this.style.querySourceFeatures(t,e)},e.prototype.setStyle=function(t,e){var o=(!e||e.diff!==!1)&&this.style&&t&&!(t instanceof Style)&&\"string\"!=typeof t;if(o)try{return this.style.setState(t)&&this._update(!0),this}catch(t){util.warnOnce(\"Unable to perform style diff: \"+(t.message||t.error||t)+\". Rebuilding the style from scratch.\")}return this.style&&(this.style.setEventedParent(null),this.style._remove(),this.off(\"rotate\",this.style._redoPlacement),this.off(\"pitch\",this.style._redoPlacement)),t?(t instanceof Style?this.style=t:this.style=new Style(t,this),this.style.setEventedParent(this,{style:this.style}),this.on(\"rotate\",this.style._redoPlacement),this.on(\"pitch\",this.style._redoPlacement),this):(this.style=null,this)},e.prototype.getStyle=function(){if(this.style)return this.style.serialize()},e.prototype.addSource=function(t,e){return this.style.addSource(t,e),this._update(!0),this},e.prototype.isSourceLoaded=function(t){var e=this.style&&this.style.sourceCaches[t];return void 0===e?void this.fire(\"error\",{error:new Error(\"There is no source with ID '\"+t+\"'\")}):e.loaded()},e.prototype.addSourceType=function(t,e,o){return this.style.addSourceType(t,e,o)},e.prototype.removeSource=function(t){return this.style.removeSource(t),this._update(!0),this},e.prototype.getSource=function(t){return this.style.getSource(t)},e.prototype.addImage=function(t,e,o){this.style.spriteAtlas.addImage(t,e,o)},e.prototype.removeImage=function(t){this.style.spriteAtlas.removeImage(t)},e.prototype.addLayer=function(t,e){return this.style.addLayer(t,e),this._update(!0),this},e.prototype.moveLayer=function(t,e){return this.style.moveLayer(t,e),this._update(!0),this},e.prototype.removeLayer=function(t){return this.style.removeLayer(t),this._update(!0),this},e.prototype.getLayer=function(t){return this.style.getLayer(t)},e.prototype.setFilter=function(t,e){return this.style.setFilter(t,e),this._update(!0),this},e.prototype.setLayerZoomRange=function(t,e,o){return this.style.setLayerZoomRange(t,e,o),this._update(!0),this},e.prototype.getFilter=function(t){return this.style.getFilter(t)},e.prototype.setPaintProperty=function(t,e,o,i){return this.style.setPaintProperty(t,e,o,i),this._update(!0),this},e.prototype.getPaintProperty=function(t,e,o){return this.style.getPaintProperty(t,e,o)},e.prototype.setLayoutProperty=function(t,e,o){return this.style.setLayoutProperty(t,e,o),this._update(!0),this},e.prototype.getLayoutProperty=function(t,e){return this.style.getLayoutProperty(t,e)},e.prototype.setLight=function(t){return this.style.setLight(t),this._update(!0),this},e.prototype.getLight=function(){return this.style.getLight()},e.prototype.getContainer=function(){return this._container},e.prototype.getCanvasContainer=function(){return this._canvasContainer},e.prototype.getCanvas=function(){return this._canvas},e.prototype._containerDimensions=function(){var t=0,e=0;return this._container&&(t=this._container.offsetWidth||400,e=this._container.offsetHeight||300),[t,e]},e.prototype._setupContainer=function(){var t=this._container;t.classList.add(\"mapboxgl-map\");var e=this._canvasContainer=DOM.create(\"div\",\"mapboxgl-canvas-container\",t);this._interactive&&e.classList.add(\"mapboxgl-interactive\"),this._canvas=DOM.create(\"canvas\",\"mapboxgl-canvas\",e),this._canvas.style.position=\"absolute\",this._canvas.addEventListener(\"webglcontextlost\",this._contextLost,!1),this._canvas.addEventListener(\"webglcontextrestored\",this._contextRestored,!1),this._canvas.setAttribute(\"tabindex\",0),this._canvas.setAttribute(\"aria-label\",\"Map\");var o=this._containerDimensions();this._resizeCanvas(o[0],o[1]);var i=this._controlContainer=DOM.create(\"div\",\"mapboxgl-control-container\",t),r=this._controlPositions={};[\"top-left\",\"top-right\",\"bottom-left\",\"bottom-right\"].forEach(function(t){r[t]=DOM.create(\"div\",\"mapboxgl-ctrl-\"+t,i)})},e.prototype._resizeCanvas=function(t,e){var o=window.devicePixelRatio||1;this._canvas.width=o*t,this._canvas.height=o*e,this._canvas.style.width=t+\"px\",this._canvas.style.height=e+\"px\"},e.prototype._setupPainter=function(){var t=util.extend({failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer},isSupported.webGLContextAttributes),e=this._canvas.getContext(\"webgl\",t)||this._canvas.getContext(\"experimental-webgl\",t);return e?void(this.painter=new Painter(e,this.transform)):void this.fire(\"error\",{error:new Error(\"Failed to initialize WebGL\")})},e.prototype._contextLost=function(t){t.preventDefault(),this._frameId&&browser.cancelFrame(this._frameId),this.fire(\"webglcontextlost\",{originalEvent:t})},e.prototype._contextRestored=function(t){this._setupPainter(),this.resize(),this._update(),this.fire(\"webglcontextrestored\",{originalEvent:t})},e.prototype.loaded=function(){return!this._styleDirty&&!this._sourcesDirty&&!(!this.style||!this.style.loaded())},e.prototype._update=function(t){return this.style?(this._styleDirty=this._styleDirty||t,this._sourcesDirty=!0,this._rerender(),this):this},e.prototype._render=function(){return this.style&&this._styleDirty&&(this._styleDirty=!1,this.style.update(this._classes,this._classOptions),this._classOptions=null,this.style._recalculate(this.transform.zoom)),this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.rotating,zooming:this.zooming}),this.fire(\"render\"),this.loaded()&&!this._loaded&&(this._loaded=!0,this.fire(\"load\")),this._frameId=null,this.animationLoop.stopped()||(this._styleDirty=!0),(this._sourcesDirty||this._repaint||this._styleDirty)&&this._rerender(),this},e.prototype.remove=function(){this._hash&&this._hash.remove(),browser.cancelFrame(this._frameId),this.setStyle(null),\"undefined\"!=typeof window&&(window.removeEventListener(\"resize\",this._onWindowResize,!1),window.removeEventListener(\"online\",this._onWindowOnline,!1));var t=this.painter.gl.getExtension(\"WEBGL_lose_context\");t&&t.loseContext(),removeNode(this._canvasContainer),removeNode(this._controlContainer),this._container.classList.remove(\"mapboxgl-map\"),this.fire(\"remove\")},e.prototype._rerender=function(){this.style&&!this._frameId&&(this._frameId=browser.frame(this._render))},e.prototype._onWindowOnline=function(){this._update()},e.prototype._onWindowResize=function(){this._trackResize&&this.stop().resize()._update()},o.showTileBoundaries.get=function(){return!!this._showTileBoundaries},o.showTileBoundaries.set=function(t){this._showTileBoundaries!==t&&(this._showTileBoundaries=t,this._update())},o.showCollisionBoxes.get=function(){return!!this._showCollisionBoxes},o.showCollisionBoxes.set=function(t){this._showCollisionBoxes!==t&&(this._showCollisionBoxes=t,this.style._redoPlacement())},o.showOverdrawInspector.get=function(){return!!this._showOverdrawInspector},o.showOverdrawInspector.set=function(t){this._showOverdrawInspector!==t&&(this._showOverdrawInspector=t,this._update())},o.repaint.get=function(){return!!this._repaint},o.repaint.set=function(t){this._repaint=t,this._update()},o.vertices.get=function(){return!!this._vertices},o.vertices.set=function(t){this._vertices=t,this._update()},e.prototype._onData=function(t){this._update(\"style\"===t.dataType),this.fire(t.dataType+\"data\",t)},e.prototype._onDataLoading=function(t){this.fire(t.dataType+\"dataloading\",t)},Object.defineProperties(e.prototype,o),e}(Camera);module.exports=Map;\n},{\"../geo/lng_lat\":62,\"../geo/lng_lat_bounds\":63,\"../geo/transform\":64,\"../render/painter\":77,\"../style/animation_loop\":143,\"../style/style\":146,\"../util/browser\":192,\"../util/dom\":199,\"../util/util\":212,\"../util/window\":194,\"./bind_handlers\":171,\"./camera\":172,\"./control/attribution_control\":173,\"./control/logo_control\":176,\"./hash\":186,\"mapbox-gl-supported\":22,\"point-geometry\":26}],188:[function(require,module,exports){\n\"use strict\";var DOM=require(\"../util/dom\"),LngLat=require(\"../geo/lng_lat\"),Point=require(\"point-geometry\"),Marker=function(t,e){this._offset=Point.convert(e&&e.offset||[0,0]),this._update=this._update.bind(this),this._onMapClick=this._onMapClick.bind(this),t||(t=DOM.create(\"div\")),t.classList.add(\"mapboxgl-marker\"),this._element=t,this._popup=null};Marker.prototype.addTo=function(t){return this.remove(),this._map=t,t.getCanvasContainer().appendChild(this._element),t.on(\"move\",this._update),t.on(\"moveend\",this._update),this._update(),this._map.on(\"click\",this._onMapClick),this},Marker.prototype.remove=function(){return this._map&&(this._map.off(\"click\",this._onMapClick),this._map.off(\"move\",this._update),this._map.off(\"moveend\",this._update),this._map=null),DOM.remove(this._element),this._popup&&this._popup.remove(),this},Marker.prototype.getLngLat=function(){return this._lngLat},Marker.prototype.setLngLat=function(t){return this._lngLat=LngLat.convert(t),this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this},Marker.prototype.getElement=function(){return this._element},Marker.prototype.setPopup=function(t){return this._popup&&(this._popup.remove(),this._popup=null),t&&(this._popup=t,this._popup.setLngLat(this._lngLat)),this},Marker.prototype._onMapClick=function(t){var e=t.originalEvent.target,p=this._element;this._popup&&(e===p||p.contains(e))&&this.togglePopup()},Marker.prototype.getPopup=function(){return this._popup},Marker.prototype.togglePopup=function(){var t=this._popup;t&&(t.isOpen()?t.remove():t.addTo(this._map))},Marker.prototype._update=function(t){if(this._map){var e=this._map.project(this._lngLat)._add(this._offset);t&&\"moveend\"!==t.type||(e=e.round()),DOM.setTransform(this._element,\"translate(\"+e.x+\"px, \"+e.y+\"px)\")}},module.exports=Marker;\n},{\"../geo/lng_lat\":62,\"../util/dom\":199,\"point-geometry\":26}],189:[function(require,module,exports){\n\"use strict\";function normalizeOffset(t){if(t){if(\"number\"==typeof t){var o=Math.round(Math.sqrt(.5*Math.pow(t,2)));return{top:new Point(0,t),\"top-left\":new Point(o,o),\"top-right\":new Point(-o,o),bottom:new Point(0,-t),\"bottom-left\":new Point(o,-o),\"bottom-right\":new Point(-o,-o),left:new Point(t,0),right:new Point(-t,0)}}if(isPointLike(t)){var e=Point.convert(t);return{top:e,\"top-left\":e,\"top-right\":e,bottom:e,\"bottom-left\":e,\"bottom-right\":e,left:e,right:e}}return{top:Point.convert(t.top||[0,0]),\"top-left\":Point.convert(t[\"top-left\"]||[0,0]),\"top-right\":Point.convert(t[\"top-right\"]||[0,0]),bottom:Point.convert(t.bottom||[0,0]),\"bottom-left\":Point.convert(t[\"bottom-left\"]||[0,0]),\"bottom-right\":Point.convert(t[\"bottom-right\"]||[0,0]),left:Point.convert(t.left||[0,0]),right:Point.convert(t.right||[0,0])}}return normalizeOffset(new Point(0,0))}function isPointLike(t){return t instanceof Point||Array.isArray(t)}var util=require(\"../util/util\"),Evented=require(\"../util/evented\"),DOM=require(\"../util/dom\"),LngLat=require(\"../geo/lng_lat\"),Point=require(\"point-geometry\"),window=require(\"../util/window\"),defaultOptions={closeButton:!0,closeOnClick:!0},Popup=function(t){function o(o){t.call(this),this.options=util.extend(Object.create(defaultOptions),o),util.bindAll([\"_update\",\"_onClickClose\"],this)}return t&&(o.__proto__=t),o.prototype=Object.create(t&&t.prototype),o.prototype.constructor=o,o.prototype.addTo=function(t){return this._map=t,this._map.on(\"move\",this._update),this.options.closeOnClick&&this._map.on(\"click\",this._onClickClose),this._update(),this},o.prototype.isOpen=function(){return!!this._map},o.prototype.remove=function(){return this._content&&this._content.parentNode&&this._content.parentNode.removeChild(this._content),this._container&&(this._container.parentNode.removeChild(this._container),delete this._container),this._map&&(this._map.off(\"move\",this._update),this._map.off(\"click\",this._onClickClose),delete this._map),this.fire(\"close\"),this},o.prototype.getLngLat=function(){return this._lngLat},o.prototype.setLngLat=function(t){return this._lngLat=LngLat.convert(t),this._update(),this},o.prototype.setText=function(t){return this.setDOMContent(window.document.createTextNode(t))},o.prototype.setHTML=function(t){var o,e=window.document.createDocumentFragment(),n=window.document.createElement(\"body\");for(n.innerHTML=t;;){if(o=n.firstChild,!o)break;e.appendChild(o)}return this.setDOMContent(e)},o.prototype.setDOMContent=function(t){return this._createContent(),this._content.appendChild(t),this._update(),this},o.prototype._createContent=function(){this._content&&this._content.parentNode&&this._content.parentNode.removeChild(this._content),this._content=DOM.create(\"div\",\"mapboxgl-popup-content\",this._container),this.options.closeButton&&(this._closeButton=DOM.create(\"button\",\"mapboxgl-popup-close-button\",this._content),this._closeButton.type=\"button\",this._closeButton.innerHTML=\"×\",this._closeButton.addEventListener(\"click\",this._onClickClose))},o.prototype._update=function(){if(this._map&&this._lngLat&&this._content){this._container||(this._container=DOM.create(\"div\",\"mapboxgl-popup\",this._map.getContainer()),this._tip=DOM.create(\"div\",\"mapboxgl-popup-tip\",this._container),this._container.appendChild(this._content));var t=this.options.anchor,o=normalizeOffset(this.options.offset),e=this._map.project(this._lngLat).round();if(!t){var n=this._container.offsetWidth,i=this._container.offsetHeight;t=e.y+o.bottom.ythis._map.transform.height-i?[\"bottom\"]:[],e.xthis._map.transform.width-n/2&&t.push(\"right\"),t=0===t.length?\"bottom\":t.join(\"-\")}var r=e.add(o[t]),s={top:\"translate(-50%,0)\",\"top-left\":\"translate(0,0)\",\"top-right\":\"translate(-100%,0)\",bottom:\"translate(-50%,-100%)\",\"bottom-left\":\"translate(0,-100%)\",\"bottom-right\":\"translate(-100%,-100%)\",left:\"translate(0,-50%)\",right:\"translate(-100%,-50%)\"},p=this._container.classList;for(var a in s)p.remove(\"mapboxgl-popup-anchor-\"+a);p.add(\"mapboxgl-popup-anchor-\"+t),DOM.setTransform(this._container,s[t]+\" translate(\"+r.x+\"px,\"+r.y+\"px)\")}},o.prototype._onClickClose=function(){this.remove()},o}(Evented);module.exports=Popup;\n},{\"../geo/lng_lat\":62,\"../util/dom\":199,\"../util/evented\":200,\"../util/util\":212,\"../util/window\":194,\"point-geometry\":26}],190:[function(require,module,exports){\n\"use strict\";var Actor=function(t,e,a){this.target=t,this.parent=e,this.mapId=a,this.callbacks={},this.callbackID=0,this.receive=this.receive.bind(this),this.target.addEventListener(\"message\",this.receive,!1)};Actor.prototype.send=function(t,e,a,r,s){var i=a?this.mapId+\":\"+this.callbackID++:null;a&&(this.callbacks[i]=a),this.target.postMessage({targetMapId:s,sourceMapId:this.mapId,type:t,id:String(i),data:e},r)},Actor.prototype.receive=function(t){var e,a=this,r=t.data,s=r.id;if(!r.targetMapId||this.mapId===r.targetMapId){var i=function(t,e,r){a.target.postMessage({sourceMapId:a.mapId,type:\"\",id:String(s),error:t?String(t):null,data:e},r)};if(\"\"===r.type)e=this.callbacks[r.id],delete this.callbacks[r.id],e&&e(r.error||null,r.data);else if(\"undefined\"!=typeof r.id&&this.parent[r.type])this.parent[r.type](r.sourceMapId,r.data,i);else if(\"undefined\"!=typeof r.id&&this.parent.getWorkerSource){var p=r.type.split(\".\"),d=this.parent.getWorkerSource(r.sourceMapId,p[0]);d[p[1]](r.data,i)}else this.parent[r.type](r.data)}},Actor.prototype.remove=function(){this.target.removeEventListener(\"message\",this.receive,!1)},module.exports=Actor;\n},{}],191:[function(require,module,exports){\n\"use strict\";function sameOrigin(e){var t=window.document.createElement(\"a\");return t.href=e,t.protocol===window.document.location.protocol&&t.host===window.document.location.host}var window=require(\"./window\");exports.getJSON=function(e,t){var n=new window.XMLHttpRequest;return n.open(\"GET\",e,!0),n.setRequestHeader(\"Accept\",\"application/json\"),n.onerror=function(e){t(e)},n.onload=function(){if(n.status>=200&&n.status<300&&n.response){var e;try{e=JSON.parse(n.response)}catch(e){return t(e)}t(null,e)}else t(new Error(n.statusText))},n.send(),n},exports.getArrayBuffer=function(e,t){var n=new window.XMLHttpRequest;return n.open(\"GET\",e,!0),n.responseType=\"arraybuffer\",n.onerror=function(e){t(e)},n.onload=function(){return 0===n.response.byteLength&&200===n.status?t(new Error(\"http status 200 returned without content.\")):void(n.status>=200&&n.status<300&&n.response?t(null,{data:n.response,cacheControl:n.getResponseHeader(\"Cache-Control\"),expires:n.getResponseHeader(\"Expires\")}):t(new Error(n.statusText)))},n.send(),n};var transparentPngUrl=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=\";exports.getImage=function(e,t){return exports.getArrayBuffer(e,function(e,n){if(e)return t(e);var r=new window.Image,o=window.URL||window.webkitURL;r.onload=function(){t(null,r),o.revokeObjectURL(r.src)};var a=new window.Blob([new Uint8Array(n.data)],{type:\"image/png\"});r.cacheControl=n.cacheControl,r.expires=n.expires,r.src=n.data.byteLength?o.createObjectURL(a):transparentPngUrl})},exports.getVideo=function(e,t){var n=window.document.createElement(\"video\");n.onloadstart=function(){t(null,n)};for(var r=0;r=a+n?e.call(t,1):(e.call(t,(i-a)/n),exports.frame(o)))}if(!n)return e.call(t,1),null;var r=!1,a=module.exports.now();return exports.frame(o),function(){r=!0}},exports.getImageData=function(e){var n=window.document.createElement(\"canvas\"),t=n.getContext(\"2d\");return n.width=e.width,n.height=e.height,t.drawImage(e,0,0),t.getImageData(0,0,e.width,e.height).data},exports.supported=require(\"mapbox-gl-supported\"),exports.hardwareConcurrency=window.navigator.hardwareConcurrency||4,Object.defineProperty(exports,\"devicePixelRatio\",{get:function(){return window.devicePixelRatio}}),exports.supportsWebp=!1;var webpImgTest=window.document.createElement(\"img\");webpImgTest.onload=function(){exports.supportsWebp=!0},webpImgTest.src=\"data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=\";\n},{\"./window\":194,\"mapbox-gl-supported\":22}],193:[function(require,module,exports){\n\"use strict\";var WebWorkify=require(\"webworkify\"),window=require(\"../window\"),workerURL=window.URL.createObjectURL(new WebWorkify(require(\"../../source/worker\"),{bare:!0}));module.exports=function(){return new window.Worker(workerURL)};\n},{\"../../source/worker\":98,\"../window\":194,\"webworkify\":41}],194:[function(require,module,exports){\n\"use strict\";module.exports=self;\n},{}],195:[function(require,module,exports){\n\"use strict\";function compareAreas(e,r){return r.area-e.area}var quickselect=require(\"quickselect\"),calculateSignedArea=require(\"./util\").calculateSignedArea;module.exports=function(e,r){var a=e.length;if(a<=1)return[e];for(var t,u,c=[],i=0;i1)for(var n=0;n0||this._oneTimeListeners&&this._oneTimeListeners[e]&&this._oneTimeListeners[e].length>0||this._eventedParent&&this._eventedParent.listens(e)},Evented.prototype.setEventedParent=function(e,t){return this._eventedParent=e,this._eventedParentData=t,this},module.exports=Evented;\n},{\"./util\":212}],201:[function(require,module,exports){\n\"use strict\";function compareMax(e,t){return t.max-e.max}function Cell(e,t,n,r){this.p=new Point(e,t),this.h=n,this.d=pointToPolygonDist(this.p,r),this.max=this.d+this.h*Math.SQRT2}function pointToPolygonDist(e,t){for(var n=!1,r=1/0,o=0;oe.y!=h.y>e.y&&e.x<(h.x-a.x)*(e.y-a.y)/(h.y-a.y)+a.x&&(n=!n),r=Math.min(r,distToSegmentSquared(e,a,h))}return(n?1:-1)*Math.sqrt(r)}function getCentroidCell(e){for(var t=0,n=0,r=0,o=e[0],i=0,l=o.length,u=l-1;ii)&&(i=a.x),(!s||a.y>l)&&(l=a.y)}var h=i-r,p=l-o,y=Math.min(h,p),x=y/2,d=new Queue(null,compareMax);if(0===y)return[r,o];for(var g=r;gm.d||!m.d)&&(m=v,n&&console.log(\"found best %d after %d probes\",Math.round(1e4*v.d)/1e4,c)),v.max-m.d<=t||(x=v.h/2,d.push(new Cell(v.p.x-x,v.p.y-x,x,e)),d.push(new Cell(v.p.x+x,v.p.y-x,x,e)),d.push(new Cell(v.p.x-x,v.p.y+x,x,e)),d.push(new Cell(v.p.x+x,v.p.y+x,x,e)),c+=4)}return n&&(console.log(\"num probes: \"+c),console.log(\"best distance: \"+m.d)),m.p};\n},{\"./intersection_tests\":205,\"point-geometry\":26,\"tinyqueue\":30}],202:[function(require,module,exports){\n\"use strict\";var WorkerPool=require(\"./worker_pool\"),globalWorkerPool;module.exports=function(){return globalWorkerPool||(globalWorkerPool=new WorkerPool),globalWorkerPool};\n},{\"./worker_pool\":215}],203:[function(require,module,exports){\n\"use strict\";function Glyphs(a,e){this.stacks=a.readFields(readFontstacks,[],e)}function readFontstacks(a,e,r){if(1===a){var t=r.readMessage(readFontstack,{glyphs:{}});e.push(t)}}function readFontstack(a,e,r){if(1===a)e.name=r.readString();else if(2===a)e.range=r.readString();else if(3===a){var t=r.readMessage(readGlyph,{});e.glyphs[t.id]=t}}function readGlyph(a,e,r){1===a?e.id=r.readVarint():2===a?e.bitmap=r.readBytes():3===a?e.width=r.readVarint():4===a?e.height=r.readVarint():5===a?e.left=r.readSVarint():6===a?e.top=r.readSVarint():7===a&&(e.advance=r.readVarint())}module.exports=Glyphs;\n},{}],204:[function(require,module,exports){\n\"use strict\";function interpolate(t,e,n){return t*(1-n)+e*n}module.exports=interpolate,interpolate.number=interpolate,interpolate.vec2=function(t,e,n){return[interpolate(t[0],e[0],n),interpolate(t[1],e[1],n)]},interpolate.color=function(t,e,n){return[interpolate(t[0],e[0],n),interpolate(t[1],e[1],n),interpolate(t[2],e[2],n),interpolate(t[3],e[3],n)]},interpolate.array=function(t,e,n){return t.map(function(t,r){return interpolate(t,e[r],n)})};\n},{}],205:[function(require,module,exports){\n\"use strict\";function polygonIntersectsPolygon(n,t){for(var e=0;e=3)for(var u=0;u1){if(lineIntersectsLine(n,t))return!0;for(var r=0;r1?n.distSqr(e):n.distSqr(e.sub(t)._mult(o)._add(t))}function multiPolygonContainsPoint(n,t){for(var e,r,o,i=!1,l=0;lt.y!=o.y>t.y&&t.x<(o.x-r.x)*(t.y-r.y)/(o.y-r.y)+r.x&&(i=!i)}return i}function polygonContainsPoint(n,t){for(var e=!1,r=0,o=n.length-1;rt.y!=l.y>t.y&&t.x<(l.x-i.x)*(t.y-i.y)/(l.y-i.y)+i.x&&(e=!e)}return e}var isCounterClockwise=require(\"./util\").isCounterClockwise;module.exports={multiPolygonIntersectsBufferedMultiPoint:multiPolygonIntersectsBufferedMultiPoint,multiPolygonIntersectsMultiPolygon:multiPolygonIntersectsMultiPolygon,multiPolygonIntersectsBufferedMultiLine:multiPolygonIntersectsBufferedMultiLine,polygonIntersectsPolygon:polygonIntersectsPolygon,distToSegmentSquared:distToSegmentSquared};\n},{\"./util\":212}],206:[function(require,module,exports){\n\"use strict\";var unicodeBlockLookup={\"Latin-1 Supplement\":function(n){return n>=128&&n<=255},\"Hangul Jamo\":function(n){return n>=4352&&n<=4607},\"Unified Canadian Aboriginal Syllabics\":function(n){return n>=5120&&n<=5759},\"Unified Canadian Aboriginal Syllabics Extended\":function(n){return n>=6320&&n<=6399},\"General Punctuation\":function(n){return n>=8192&&n<=8303},\"Letterlike Symbols\":function(n){return n>=8448&&n<=8527},\"Number Forms\":function(n){return n>=8528&&n<=8591},\"Miscellaneous Technical\":function(n){return n>=8960&&n<=9215},\"Control Pictures\":function(n){return n>=9216&&n<=9279},\"Optical Character Recognition\":function(n){return n>=9280&&n<=9311},\"Enclosed Alphanumerics\":function(n){return n>=9312&&n<=9471},\"Geometric Shapes\":function(n){return n>=9632&&n<=9727},\"Miscellaneous Symbols\":function(n){return n>=9728&&n<=9983},\"Miscellaneous Symbols and Arrows\":function(n){return n>=11008&&n<=11263},\"CJK Radicals Supplement\":function(n){return n>=11904&&n<=12031},\"Kangxi Radicals\":function(n){return n>=12032&&n<=12255},\"Ideographic Description Characters\":function(n){return n>=12272&&n<=12287},\"CJK Symbols and Punctuation\":function(n){return n>=12288&&n<=12351},Hiragana:function(n){return n>=12352&&n<=12447},Katakana:function(n){return n>=12448&&n<=12543},Bopomofo:function(n){return n>=12544&&n<=12591},\"Hangul Compatibility Jamo\":function(n){return n>=12592&&n<=12687},Kanbun:function(n){return n>=12688&&n<=12703},\"Bopomofo Extended\":function(n){return n>=12704&&n<=12735},\"CJK Strokes\":function(n){return n>=12736&&n<=12783},\"Katakana Phonetic Extensions\":function(n){return n>=12784&&n<=12799},\"Enclosed CJK Letters and Months\":function(n){return n>=12800&&n<=13055},\"CJK Compatibility\":function(n){return n>=13056&&n<=13311},\"CJK Unified Ideographs Extension A\":function(n){return n>=13312&&n<=19903},\"Yijing Hexagram Symbols\":function(n){return n>=19904&&n<=19967},\"CJK Unified Ideographs\":function(n){return n>=19968&&n<=40959},\"Yi Syllables\":function(n){return n>=40960&&n<=42127},\"Yi Radicals\":function(n){return n>=42128&&n<=42191},\"Hangul Jamo Extended-A\":function(n){return n>=43360&&n<=43391},\"Hangul Syllables\":function(n){return n>=44032&&n<=55215},\"Hangul Jamo Extended-B\":function(n){return n>=55216&&n<=55295},\"Private Use Area\":function(n){return n>=57344&&n<=63743},\"CJK Compatibility Ideographs\":function(n){return n>=63744&&n<=64255},\"Vertical Forms\":function(n){return n>=65040&&n<=65055},\"CJK Compatibility Forms\":function(n){return n>=65072&&n<=65103},\"Small Form Variants\":function(n){return n>=65104&&n<=65135},\"Halfwidth and Fullwidth Forms\":function(n){return n>=65280&&n<=65519}};module.exports=unicodeBlockLookup;\n},{}],207:[function(require,module,exports){\n\"use strict\";var LRUCache=function(t,e){this.max=t,this.onRemove=e,this.reset()};LRUCache.prototype.reset=function(){var t=this;for(var e in t.data)t.onRemove(t.data[e]);return this.data={},this.order=[],this},LRUCache.prototype.add=function(t,e){if(this.has(t))this.order.splice(this.order.indexOf(t),1),this.data[t]=e,this.order.push(t);else if(this.data[t]=e,this.order.push(t),this.order.length>this.max){var r=this.get(this.order[0]);r&&this.onRemove(r)}return this},LRUCache.prototype.has=function(t){return t in this.data},LRUCache.prototype.keys=function(){return this.order},LRUCache.prototype.get=function(t){if(!this.has(t))return null;var e=this.data[t];return delete this.data[t],this.order.splice(this.order.indexOf(t),1),e},LRUCache.prototype.getWithoutRemoving=function(t){if(!this.has(t))return null;var e=this.data[t];return e},LRUCache.prototype.remove=function(t){if(!this.has(t))return this;var e=this.data[t];return delete this.data[t],this.onRemove(e),this.order.splice(this.order.indexOf(t),1),this},LRUCache.prototype.setMaxSize=function(t){var e=this;for(this.max=t;this.order.length>this.max;){var r=e.get(e.order[0]);r&&e.onRemove(r)}return this},module.exports=LRUCache;\n},{}],208:[function(require,module,exports){\n\"use strict\";function makeAPIURL(r,e){var t=parseUrl(config.API_URL);if(r.protocol=t.protocol,r.authority=t.authority,!config.REQUIRE_ACCESS_TOKEN)return formatUrl(r);if(e=e||config.ACCESS_TOKEN,!e)throw new Error(\"An API access token is required to use Mapbox GL. \"+help);if(\"s\"===e[0])throw new Error(\"Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). \"+help);return r.params.push(\"access_token=\"+e),formatUrl(r)}function isMapboxURL(r){return 0===r.indexOf(\"mapbox:\")}function replaceTempAccessToken(r){for(var e=0;e=2||512===t?\"@2x\":\"\",s=browser.supportsWebp?\".webp\":\"$1\";return o.path=o.path.replace(imageExtensionRe,\"\"+a+s),replaceTempAccessToken(o.params),formatUrl(o)};var urlRe=/^(\\w+):\\/\\/([^\\/?]+)(\\/[^?]+)?\\??(.+)?/;\n},{\"./browser\":192,\"./config\":196}],209:[function(require,module,exports){\n\"use strict\";var isChar=require(\"./is_char_in_unicode_block\");module.exports.allowsIdeographicBreaking=function(a){for(var i=0,r=a;i=65097&&a<=65103)||(!!isChar[\"CJK Compatibility Ideographs\"](a)||(!!isChar[\"CJK Compatibility\"](a)||(!!isChar[\"CJK Radicals Supplement\"](a)||(!!isChar[\"CJK Strokes\"](a)||(!(!isChar[\"CJK Symbols and Punctuation\"](a)||a>=12296&&a<=12305||a>=12308&&a<=12319||12336===a)||(!!isChar[\"CJK Unified Ideographs Extension A\"](a)||(!!isChar[\"CJK Unified Ideographs\"](a)||(!!isChar[\"Enclosed CJK Letters and Months\"](a)||(!!isChar[\"Hangul Compatibility Jamo\"](a)||(!!isChar[\"Hangul Jamo Extended-A\"](a)||(!!isChar[\"Hangul Jamo Extended-B\"](a)||(!!isChar[\"Hangul Jamo\"](a)||(!!isChar[\"Hangul Syllables\"](a)||(!!isChar.Hiragana(a)||(!!isChar[\"Ideographic Description Characters\"](a)||(!!isChar.Kanbun(a)||(!!isChar[\"Kangxi Radicals\"](a)||(!!isChar[\"Katakana Phonetic Extensions\"](a)||(!(!isChar.Katakana(a)||12540===a)||(!(!isChar[\"Halfwidth and Fullwidth Forms\"](a)||65288===a||65289===a||65293===a||a>=65306&&a<=65310||65339===a||65341===a||65343===a||a>=65371&&a<=65503||65507===a||a>=65512&&a<=65519)||(!(!isChar[\"Small Form Variants\"](a)||a>=65112&&a<=65118||a>=65123&&a<=65126)||(!!isChar[\"Unified Canadian Aboriginal Syllabics\"](a)||(!!isChar[\"Unified Canadian Aboriginal Syllabics Extended\"](a)||(!!isChar[\"Vertical Forms\"](a)||(!!isChar[\"Yijing Hexagram Symbols\"](a)||(!!isChar[\"Yi Syllables\"](a)||!!isChar[\"Yi Radicals\"](a))))))))))))))))))))))))))))))},exports.charHasNeutralVerticalOrientation=function(a){return!(!isChar[\"Latin-1 Supplement\"](a)||167!==a&&169!==a&&174!==a&&177!==a&&188!==a&&189!==a&&190!==a&&215!==a&&247!==a)||(!(!isChar[\"General Punctuation\"](a)||8214!==a&&8224!==a&&8225!==a&&8240!==a&&8241!==a&&8251!==a&&8252!==a&&8258!==a&&8263!==a&&8264!==a&&8265!==a&&8273!==a)||(!!isChar[\"Letterlike Symbols\"](a)||(!!isChar[\"Number Forms\"](a)||(!(!isChar[\"Miscellaneous Technical\"](a)||!(a>=8960&&a<=8967||a>=8972&&a<=8991||a>=8996&&a<=9e3||9003===a||a>=9085&&a<=9114||a>=9150&&a<=9165||9167===a||a>=9169&&a<=9179||a>=9186&&a<=9215))||(!(!isChar[\"Control Pictures\"](a)||9251===a)||(!!isChar[\"Optical Character Recognition\"](a)||(!!isChar[\"Enclosed Alphanumerics\"](a)||(!!isChar[\"Geometric Shapes\"](a)||(!(!isChar[\"Miscellaneous Symbols\"](a)||a>=9754&&a<=9759)||(!(!isChar[\"Miscellaneous Symbols and Arrows\"](a)||!(a>=11026&&a<=11055||a>=11088&&a<=11097||a>=11192&&a<=11243))||(!!isChar[\"CJK Symbols and Punctuation\"](a)||(!!isChar.Katakana(a)||(!!isChar[\"Private Use Area\"](a)||(!!isChar[\"CJK Compatibility Forms\"](a)||(!!isChar[\"Small Form Variants\"](a)||(!!isChar[\"Halfwidth and Fullwidth Forms\"](a)||(8734===a||8756===a||8757===a||a>=9984&&a<=10087||a>=10102&&a<=10131||65532===a||65533===a)))))))))))))))))},exports.charHasRotatedVerticalOrientation=function(a){return!(exports.charHasUprightVerticalOrientation(a)||exports.charHasNeutralVerticalOrientation(a))};\n},{\"./is_char_in_unicode_block\":206}],210:[function(require,module,exports){\n\"use strict\";function createStructArrayType(t){var e=JSON.stringify(t);if(structArrayTypeCache[e])return structArrayTypeCache[e];var r=void 0===t.alignment?1:t.alignment,i=0,n=0,a=[\"Uint8\"],o=t.members.map(function(t){a.indexOf(t.type)<0&&a.push(t.type);var e=sizeOf(t.type),o=i=align(i,Math.max(r,e)),s=t.components||1;return n=Math.max(n,e),i+=e*s,{name:t.name,type:t.type,components:s,offset:o}}),s=align(i,Math.max(n,r)),p=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Struct);p.prototype.alignment=r,p.prototype.size=s;for(var y=0,c=o;ythis.capacity){this.capacity=Math.max(t,Math.floor(this.capacity*RESIZE_MULTIPLIER),DEFAULT_CAPACITY),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var e=this.uint8;this._refreshViews(),e&&this.uint8.set(e)}},StructArray.prototype._refreshViews=function(){for(var t=this,e=0,r=t._usedTypes;e=1)return 1;var e=r*r,t=e*r;return 4*(r<.5?t:3*(r-e)+t-.75)},exports.bezier=function(r,e,t,n){var o=new UnitBezier(r,e,t,n);return function(r){return o.solve(r)}},exports.ease=exports.bezier(.25,.1,.25,1),exports.clamp=function(r,e,t){return Math.min(t,Math.max(e,r))},exports.wrap=function(r,e,t){var n=t-e,o=((r-e)%n+n)%n+e;return o===e?t:o},exports.asyncAll=function(r,e,t){if(!r.length)return t(null,[]);var n=r.length,o=new Array(r.length),a=null;r.forEach(function(r,i){e(r,function(r,e){r&&(a=r),o[i]=e,0===--n&&t(a,o)})})},exports.values=function(r){var e=[];for(var t in r)e.push(r[t]);return e},exports.keysDifference=function(r,e){var t=[];for(var n in r)n in e||t.push(n);return t},exports.extend=function(r,e,t,n){for(var o=arguments,a=1;a=0)return!0;return!1};var warnOnceHistory={};exports.warnOnce=function(r){warnOnceHistory[r]||(\"undefined\"!=typeof console&&console.warn(r),warnOnceHistory[r]=!0)},exports.isCounterClockwise=function(r,e,t){return(t.y-r.y)*(e.x-r.x)>(e.y-r.y)*(t.x-r.x)},exports.calculateSignedArea=function(r){for(var e=0,t=0,n=r.length,o=n-1,a=void 0,i=void 0;t0||Math.abs(e.y-t.y)>0)&&Math.abs(exports.calculateSignedArea(r))>.01},exports.sphericalToCartesian=function(r){var e=r[0],t=r[1],n=r[2];return t+=90,t*=Math.PI/180,n*=Math.PI/180,[e*Math.cos(t)*Math.sin(n),e*Math.sin(t)*Math.sin(n),e*Math.cos(n)]},exports.parseCacheControl=function(r){var e=/(?:^|(?:\\s*\\,\\s*))([^\\x00-\\x20\\(\\)<>@\\,;\\:\\\\\"\\/\\[\\]\\?\\=\\{\\}\\x7F]+)(?:\\=(?:([^\\x00-\\x20\\(\\)<>@\\,;\\:\\\\\"\\/\\[\\]\\?\\=\\{\\}\\x7F]+)|(?:\\\"((?:[^\"\\\\]|\\\\.)*)\\\")))?/g,t={};if(r.replace(e,function(r,e,n,o){var a=n||o;return t[e]=!a||a.toLowerCase(),\"\"}),t[\"max-age\"]){var n=parseInt(t[\"max-age\"],10);isNaN(n)?delete t[\"max-age\"]:t[\"max-age\"]=n}return t};\n},{\"../geo/coordinate\":61,\"@mapbox/unitbezier\":3,\"point-geometry\":26}],213:[function(require,module,exports){\n\"use strict\";var Feature=function(e,t,r,o){this.type=\"Feature\",this._vectorTileFeature=e,e._z=t,e._x=r,e._y=o,this.properties=e.properties,null!=e.id&&(this.id=e.id)},prototypeAccessors={geometry:{}};prototypeAccessors.geometry.get=function(){return void 0===this._geometry&&(this._geometry=this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x,this._vectorTileFeature._y,this._vectorTileFeature._z).geometry),this._geometry},prototypeAccessors.geometry.set=function(e){this._geometry=e},Feature.prototype.toJSON=function(){var e=this,t={geometry:this.geometry};for(var r in e)\"_geometry\"!==r&&\"_vectorTileFeature\"!==r&&(t[r]=e[r]);return t},Object.defineProperties(Feature.prototype,prototypeAccessors),module.exports=Feature;\n},{}],214:[function(require,module,exports){\n\"use strict\";var scriptDetection=require(\"./script_detection\");module.exports=function(t){for(var o=\"\",e=0;e\":\"﹀\",\"?\":\"︖\",\"@\":\"@\",\"[\":\"﹇\",\"\\\\\":\"\\",\"]\":\"﹈\",\"^\":\"^\",_:\"︳\",\"`\":\"`\",\"{\":\"︷\",\"|\":\"―\",\"}\":\"︸\",\"~\":\"~\",\"¢\":\"¢\",\"£\":\"£\",\"¥\":\"¥\",\"¦\":\"¦\",\"¬\":\"¬\",\"¯\":\" ̄\",\"–\":\"︲\",\"—\":\"︱\",\"‘\":\"﹃\",\"’\":\"﹄\",\"“\":\"﹁\",\"”\":\"﹂\",\"…\":\"︙\",\"‧\":\"・\",\"₩\":\"₩\",\"、\":\"︑\",\"。\":\"︒\",\"〈\":\"︿\",\"〉\":\"﹀\",\"《\":\"︽\",\"》\":\"︾\",\"「\":\"﹁\",\"」\":\"﹂\",\"『\":\"﹃\",\"』\":\"﹄\",\"【\":\"︻\",\"】\":\"︼\",\"〔\":\"︹\",\"〕\":\"︺\",\"〖\":\"︗\",\"〗\":\"︘\",\"!\":\"︕\",\"(\":\"︵\",\")\":\"︶\",\",\":\"︐\",\"-\":\"︲\",\".\":\"・\",\":\":\"︓\",\";\":\"︔\",\"<\":\"︿\",\">\":\"﹀\",\"?\":\"︖\",\"[\":\"﹇\",\"]\":\"﹈\",\"_\":\"︳\",\"{\":\"︷\",\"|\":\"―\",\"}\":\"︸\",\"⦅\":\"︵\",\"⦆\":\"︶\",\"。\":\"︒\",\"「\":\"﹁\",\"」\":\"﹂\"};\n},{\"./script_detection\":209}],215:[function(require,module,exports){\n\"use strict\";var WebWorker=require(\"./web_worker\"),WorkerPool=function(){this.active={}};WorkerPool.prototype.acquire=function(r){var e=this;if(!this.workers){var o=require(\"../\").workerCount;for(this.workers=[];this.workers.length {\n let replyTo = document.querySelector('#in-reply-to');\n replyTo.value = webStorage.getItem('replyTo');\n let content = document.querySelector('#content');\n content.value = webStorage.getItem('content');\n};\n\nconst saveData = () => {\n let replyTo = document.querySelector('#in-reply-to');\n let content = document.querySelector('#content');\n webStorage.setItem('replyTo', replyTo.value);\n webStorage.setItem('content', content.value);\n alertify.success('Auto-saved data');\n};\n\nconst clearData = () => {\n webStorage.removeItem('replyTo');\n webStorage.removeItem('content');\n};\n\nexport default function persistFormData()\n{\n let form = document.querySelector('form[name=\"micropub\"]');\n form.addEventListener('change', saveData);\n form.addEventListener('submit', clearData);\n loadData();\n}\n\n\n\n// WEBPACK FOOTER //\n// ./persist-form.js","//nearby-places.js\n\nimport alertify from 'alertify.js';\nimport addMap from './mapbox-utils';\nimport parseLocation from './parse-location';\nimport makeNewPlaceForm from './newplace-micropub';\n\nconst makeOptionsForForm = (map, position, places = null) => {\n //create the