You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2 lines
376 KiB

/*! For license information please see peta.js.LICENSE.txt */
(()=>{var t={8898:t=>{t.exports=function(t,e){return!(t[0]>e[2]||t[2]<e[0]||t[3]<e[1]||t[1]>e[3])}},9348:function(t,e){var n,i;n=function(t,e){"use strict";var n=5e3,i="callback";function o(t){try{delete window[t]}catch(e){window[t]=void 0}}function r(t){var e=document.getElementById(t);e&&document.getElementsByTagName("head")[0].removeChild(e)}e.exports=function(t){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],a=t,s=e.timeout||n,l=e.jsonpCallback||i,u=void 0;return new Promise((function(n,i){var c=e.jsonpCallbackFunction||"jsonp_"+Date.now()+"_"+Math.ceil(1e5*Math.random()),h=l+"_"+c;window[c]=function(t){n({ok:!0,json:function(){return Promise.resolve(t)}}),u&&clearTimeout(u),r(h),o(c)},a+=-1===a.indexOf("?")?"?":"&";var d=document.createElement("script");d.setAttribute("src",""+a+l+"="+c),e.charset&&d.setAttribute("charset",e.charset),e.nonce&&d.setAttribute("nonce",e.nonce),e.referrerPolicy&&d.setAttribute("referrerPolicy",e.referrerPolicy),e.crossorigin&&d.setAttribute("crossorigin","true"),d.id=h,document.getElementsByTagName("head")[0].appendChild(d),u=setTimeout((function(){i(new Error("JSONP request to "+t+" timed out")),o(c),r(h),window[c]=function(){o(c)}}),s),d.onerror=function(){i(new Error("JSONP request to "+t+" failed")),o(c),r(h),u&&clearTimeout(u)}}))}},void 0===(i=n.apply(e,[e,t]))||(t.exports=i)},251:(t,e)=>{e.read=function(t,e,n,i,o){var r,a,s=8*o-i-1,l=(1<<s)-1,u=l>>1,c=-7,h=n?o-1:0,d=n?-1:1,f=t[e+h];for(h+=d,r=f&(1<<-c)-1,f>>=-c,c+=s;c>0;r=256*r+t[e+h],h+=d,c-=8);for(a=r&(1<<-c)-1,r>>=-c,c+=i;c>0;a=256*a+t[e+h],h+=d,c-=8);if(0===r)r=1-u;else{if(r===l)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,i),r-=u}return(f?-1:1)*a*Math.pow(2,r-i)},e.write=function(t,e,n,i,o,r){var a,s,l,u=8*r-o-1,c=(1<<u)-1,h=c>>1,d=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,f=i?0:r-1,p=i?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=c):(a=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-a))<1&&(a--,l*=2),(e+=a+h>=1?d/l:d*Math.pow(2,1-h))*l>=2&&(a++,l/=2),a+h>=c?(s=0,a=c):a+h>=1?(s=(e*l-1)*Math.pow(2,o),a+=h):(s=e*Math.pow(2,h-1)*Math.pow(2,o),a=0));o>=8;t[n+f]=255&s,f+=p,s/=256,o-=8);for(a=a<<o|s,u+=o;u>0;t[n+f]=255&a,f+=p,a/=256,u-=8);t[n+f-p]|=128*m}},891:(t,e,n)=>{var i=n(3481),o=n(9348),r=n(8898),a=["Aerial","AerialWithLabels","AerialWithLabelsOnDemand","Road","RoadOnDemand","CanvasLight","CanvasDark","CanvasGray","OrdnanceSurvey"],s=["AerialWithLabelsOnDemand","RoadOnDemand"];i.TileLayer.Bing=i.TileLayer.extend({options:{bingMapsKey:null,imagerySet:"Aerial",culture:"en-US",minZoom:1,minNativeZoom:1,maxNativeZoom:19},statics:{METADATA_URL:"https://dev.virtualearth.net/REST/v1/Imagery/Metadata/{imagerySet}?key={bingMapsKey}&include=ImageryProviders&uriScheme=https&c={culture}",POINT_METADATA_URL:"https://dev.virtualearth.net/REST/v1/Imagery/Metadata/{imagerySet}/{lat},{lng}?zl={z}&key={bingMapsKey}&uriScheme=https&c={culture}"},initialize:function(t){if("string"==typeof t&&(t={bingMapsKey:t}),t&&t.BingMapsKey&&(t.bingMapsKey=t.BingMapsKey,console.warn("use options.bingMapsKey instead of options.BingMapsKey")),!t||!t.bingMapsKey)throw new Error("Must supply options.BingMapsKey");if(t=i.setOptions(this,t),a.indexOf(t.imagerySet)<0)throw new Error("'"+t.imagerySet+"' is an invalid imagerySet, see https://github.com/digidem/leaflet-bing-layer#parameters");t&&t.style&&s.indexOf(t.imagerySet)<0&&console.warn("Dynamic styles will only work with these imagerySet choices: "+s.join(", "));var e=i.Util.template(i.TileLayer.Bing.METADATA_URL,{bingMapsKey:this.options.bingMapsKey,imagerySet:this.options.imagerySet,culture:this.options.culture});this._imageryProviders=[],this._attributions=[],this._fetch=o(e,{jsonpCallback:"jsonp"}).then((function(t){return t.json()})).then(this._metaDataOnLoad.bind(this)).catch(console.error.bind(console)),i.Browser.android||this.on("tileunload",this._onTileRemove)},createTile:function(t,e){var n=document.createElement("img");return i.DomEvent.on(n,"load",i.bind(this._tileOnLoad,this,e,n)),i.DomEvent.on(n,"error",i.bind(this._tileOnError,this,e,n)),thi