显示客户端IP的详细信息
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.

43 lines
805 KiB

/* Mapbox GL JS is Copyright © 2020 Mapbox and subject to the Mapbox Terms of Service ((https://www.mapbox.com/legal/tos/). */
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global = global || self, global.mapboxgl = factory());
}(this, (function () { 'use strict';
/* eslint-disable */
var shared, worker, mapboxgl;
// define gets called three times: one for each chunk. we rely on the order
// they're imported to know which is which
function define(_, chunk) {
if (!shared) {
shared = chunk;
} else if (!worker) {
worker = chunk;
} else {
var workerBundleString = 'var sharedChunk = {}; (' + shared + ')(sharedChunk); (' + worker + ')(sharedChunk);'
var sharedChunk = {};
shared(sharedChunk);
mapboxgl = chunk(sharedChunk);
if (typeof window !== 'undefined') {
mapboxgl.workerUrl = window.URL.createObjectURL(new Blob([workerBundleString], { type: 'text/javascript' }));
}
}
}
define(["exports"],(function(t){"use strict";var e=r;function r(t,e,r,i){this.cx=3*t,this.bx=3*(r-t)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*e,this.by=3*(i-e)-this.cy,this.ay=1-this.cy-this.by,this.p1x=t,this.p1y=i,this.p2x=r,this.p2y=i;}r.prototype.sampleCurveX=function(t){return ((this.ax*t+this.bx)*t+this.cx)*t},r.prototype.sampleCurveY=function(t){return ((this.ay*t+this.by)*t+this.cy)*t},r.prototype.sampleCurveDerivativeX=function(t){return (3*this.ax*t+2*this.bx)*t+this.cx},r.prototype.solveCurveX=function(t,e){var r,i,n,s,a;for(void 0===e&&(e=1e-6),n=t,a=0;a<8;a++){if(s=this.sampleCurveX(n)-t,Math.abs(s)<e)return n;var o=this.sampleCurveDerivativeX(n);if(Math.abs(o)<1e-6)break;n-=s/o;}if((n=t)<(r=0))return r;if(n>(i=1))return i;for(;r<i;){if(s=this.sampleCurveX(n),Math.abs(s-t)<e)return n;t>s?r=n:i=n,n=.5*(i-r)+r;}return n},r.prototype.solve=function(t,e){return this.sampleCurveY(this.solveCurveX(t,e))};var i=n;function n(t,e){this.x=t,this.y=e;}n.prototype={clone:function(){return new n(this.x,this.y)},add:function(t){return this.clone()._add(t)},sub:function(t){return this.clone()._sub(t)},multByPoint:function(t){return this.clone()._multByPoint(t)},divByPoint:function(t){return this.clone()._divByPoint(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)},rotateAround:function(t,e){return this.clone()._rotateAround(t,e)},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 e=t.x-this.x,r=t.y-this.y;return e*e+r*r},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,e){return Math.atan2(this.x*e-this.y*t,this.x*t+this.y*e)},_matMult:function(t){var e=t[2]*this.x+t[3]*this.y;return this.x=t[0]*this.x+t[1]*this.y,this.y=e,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},_multByPoint:function(t){return this.x*=t.x,this.y*=t.y,this},_divByPoint:function(t){return this.x/=t.x,this.y/=t.y,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 e=Math.cos(t),r=Math.sin(t),i=r*this.x+e*this.y;return this.x=e*this.x-r*this.y,this.y=i,this},_rotateAround:function(t,e){var r=Math.cos(t),i=Math.sin(t),n=e.y+i*(this.x-e.x)+r*(this.y-e.y);return this.x=e.x+r*(this.x-e.x)-i*(this.y-e.y),this.y=n,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},n.convert=function(t){return t instanceof n?t:Array.isArray(t)?new n(t[0],t[1]):t};var s="undefined"!=typeof self?self:{};function a(t,e){if(Array.isArray(t)){if(!Array.isArray(e)||t.length!==e.length)return !1;for(let r=0;r<t.length;r++)if(!a(t[r],e[r]))return !1;return !0}if("object"==typeof t&&null!==t&&null!==e){if("object"!=typeof e)return !1;if(Object.keys(t).length!==Object.keys(e).length)return !1;for(const r in t)if(!a(t[r],e[r]))return !1;return !0}return t===e}const o=Math.pow(2,53)-1,l=Math.PI/180,u=180/Math.PI;function c(t){return t*l}function h(t){if(t<=0)return 0;if(t>=1)return 1;const e=t*t,r=e*t;return 4*(t<.5?r:3*(t-e)+r-.75)}function p(t,r,i,n){const s=new e(t,r,i,n);return function(t){return s.solve(t)}}const d=p(.25,.1,.25,1);function f(t,e,r){return Math.min(r,Math.max(e,t))}function y(t,e,r){const i=r-e,n=((t-e)%i+i)%i+e;return n===e?r:n}function m(t,e,r){if(!t.length)return r(null,[]);let i=t.length;const n=new Array(t.length);let s=null;t.forEach((t,a)=>{e(t,(t,e)=>{t&&(s=t),n[a]=e,0==--i&&r(s,n);});});}functio
define(["./shared"],(function(e){"use strict";function t(e){const r=typeof e;if("number"===r||"boolean"===r||"string"===r||null==e)return JSON.stringify(e);if(Array.isArray(e)){let r="[";for(const n of e)r+=`${t(n)},`;return `${r}]`}const n=Object.keys(e).sort();let o="{";for(let r=0;r<n.length;r++)o+=`${JSON.stringify(n[r])}:${t(e[n[r]])},`;return `${o}}`}function r(r){let n="";for(const o of e.refProperties)n+=`/${t(r[o])}`;return n}class n{constructor(e){this.keyCache={},e&&this.replace(e);}replace(e){this._layerConfigs={},this._layers={},this.update(e,[]);}update(t,n){for(const r of t){this._layerConfigs[r.id]=r;const t=this._layers[r.id]=e.createStyleLayer(r);t._featureFilter=e.featureFilter(t.filter),this.keyCache[r.id]&&delete this.keyCache[r.id];}for(const e of n)delete this.keyCache[e],delete this._layerConfigs[e],delete this._layers[e];this.familiesBySource={};const o=function(e,t){const n={};for(let o=0;o<e.length;o++){const i=t&&t[e[o].id]||r(e[o]);t&&(t[e[o].id]=i);let s=n[i];s||(s=n[i]=[]),s.push(e[o]);}const o=[];for(const e in n)o.push(n[e]);return o}(e.values(this._layerConfigs),this.keyCache);for(const e of o){const t=e.map(e=>this._layers[e.id]),r=t[0];if("none"===r.visibility)continue;const n=r.source||"";let o=this.familiesBySource[n];o||(o=this.familiesBySource[n]={});const i=r.sourceLayer||"_geojsonTileLayer";let s=o[i];s||(s=o[i]=[]),s.push(t);}}}const{ImageBitmap:o}=e.window;class i{loadTile(t,r){const{uid:n,encoding:i,rawImageData:s,padding:a,buildQuadTree:l}=t,u=o&&s instanceof o?this.getImageData(s,a):s;r(null,new e.DEMData(n,u,i,a<1,l));}getImageData(t,r){this.offscreenCanvas&&this.offscreenCanvasContext||(this.offscreenCanvas=new OffscreenCanvas(t.width,t.height),this.offscreenCanvasContext=this.offscreenCanvas.getContext("2d")),this.offscreenCanvas.width=t.width,this.offscreenCanvas.height=t.height,this.offscreenCanvasContext.drawImage(t,0,0,t.width,t.height);const n=this.offscreenCanvasContext.getImageData(-r,-r,t.width+2*r,t.height+2*r);return this.offscreenCanvasContext.clearRect(0,0,this.offscreenCanvas.width,this.offscreenCanvas.height),new e.RGBAImage({width:n.width,height:n.height},n.data)}}function s(e,t){if(0!==e.length){a(e[0],t);for(var r=1;r<e.length;r++)a(e[r],!t);}}function a(e,t){for(var r=0,n=0,o=e.length,i=o-1;n<o;i=n++)r+=(e[n][0]-e[i][0])*(e[i][1]+e[n][1]);r>=0!=!!t&&e.reverse();}const l=e.vectorTile.VectorTileFeature.prototype.toGeoJSON;class u{constructor(t){this._feature=t,this.extent=e.EXTENT,this.type=t.type,this.properties=t.tags,"id"in t&&!isNaN(t.id)&&(this.id=parseInt(t.id,10));}loadGeometry(){if(1===this._feature.type){const t=[];for(const r of this._feature.geometry)t.push([new e.Point$1(r[0],r[1])]);return t}{const t=[];for(const r of this._feature.geometry){const n=[];for(const t of r)n.push(new e.Point$1(t[0],t[1]));t.push(n);}return t}}toGeoJSON(e,t,r){return l.call(this,e,t,r)}}class h{constructor(t){this.layers={_geojsonTileLayer:this},this.name="_geojsonTileLayer",this.extent=e.EXTENT,this.length=t.length,this._features=t;}feature(e){return new u(this._features[e])}}var c=e.vectorTile.VectorTileFeature,f=p;function p(e,t){this.options=t||{},this.features=e,this.length=e.length;}function d(e,t){this.id="number"==typeof e.id?e.id:void 0,this.type=e.type,this.rawGeometry=1===e.type?[e.geometry]:e.geometry,this.properties=e.tags,this.extent=t||4096;}p.prototype.feature=function(e){return new d(this.features[e],this.options.extent)},d.prototype.loadGeometry=function(){var t=this.rawGeometry;this.geometry=[];for(var r=0;r<t.length;r++){for(var n=t[r],o=[],i=0;i<n.length;i++)o.push(new e.Point$1(n[i][0],n[i][1]));this.geometry.push(o);}return this.geometry},d.prototype.bbox=function(){this.geometry||this.loadGeometry();for(var e=this.geometry,t=1/0,r=-1/0,n=1/0,o=-1/0,i=0;i<e.length;i++)for(var s=e[i],a=0;a<s.length;a++){var l=s[a];t=Math.min(t,l.x),r=Math.max(r,l.x),n=Math.min(n,l.y),o=Math.max(o,l.y);}return [t,n,r,o]},d.prototype.toGeoJSON=c.prototype.toGeoJSON;var g=y,m=f;function y(t){var r=new e.pbf;return function(e,t){for(var r in e.layers)t.writeMessa
define(["./shared"],(function(e){"use strict";var t=i;function i(e){return !function(e){return "undefined"==typeof window||"undefined"==typeof document?"not a browser":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.prototype&&Function.prototype.bind?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?"JSON"in window&&"parse"in JSON&&"stringify"in JSON?function(){if(!("Worker"in window&&"Blob"in window&&"URL"in window))return !1;var e,t,i=new Blob([""],{type:"text/javascript"}),o=URL.createObjectURL(i);try{t=new Worker(o),e=!0;}catch(t){e=!1;}return t&&t.terminate(),URL.revokeObjectURL(o),e}()?"Uint8ClampedArray"in window?ArrayBuffer.isView?function(){var e=document.createElement("canvas");e.width=e.height=1;var t=e.getContext("2d");if(!t)return !1;var i=t.getImageData(0,0,1,1);return i&&i.width===e.width}()?(void 0===o[t=e&&e.failIfMajorPerformanceCaveat]&&(o[t]=function(e){var t,o=function(e){var t=document.createElement("canvas"),o=Object.create(i.webGLContextAttributes);return o.failIfMajorPerformanceCaveat=e,t.getContext("webgl",o)||t.getContext("experimental-webgl",o)}(e);if(!o)return !1;try{t=o.createShader(o.VERTEX_SHADER);}catch(e){return !1}return !(!t||o.isContextLost())&&(o.shaderSource(t,"void main() {}"),o.compileShader(t),!0===o.getShaderParameter(t,o.COMPILE_STATUS))}(t)),o[t]?document.documentMode?"insufficient ECMAScript 6 support":void 0:"insufficient WebGL support"):"insufficient Canvas/getImageData support":"insufficient ArrayBuffer support":"insufficient Uint8ClampedArray support":"insufficient worker support":"insufficient JSON support":"insufficient Object support":"insufficient Function support":"insufficent Array support";var t;}(e)}var o={};i.webGLContextAttributes={antialias:!1,alpha:!0,stencil:!0,depth:!0};const a={create:function(t,i,o){const a=e.window.document.createElement(t);return void 0!==i&&(a.className=i),o&&o.appendChild(a),a},createNS:function(t,i){return e.window.document.createElementNS(t,i)}},r=e.window.document&&e.window.document.documentElement.style,n=r&&void 0!==r.userSelect?"userSelect":"WebkitUserSelect";let s;a.disableDrag=function(){r&&n&&(s=r[n],r[n]="none");},a.enableDrag=function(){r&&n&&(r[n]=s);},a.setTransform=function(e,t){e.style.transform=t;};let l=!1;try{const t=Object.defineProperty({},"passive",{get(){l=!0;}});e.window.addEventListener("test",t,t),e.window.removeEventListener("test",t,t);}catch(e){l=!1;}a.addEventListener=function(e,t,i,o={}){e.addEventListener(t,i,"passive"in o&&l?o:o.capture);},a.removeEventListener=function(e,t,i,o={}){e.removeEventListener(t,i,"passive"in o&&l?o:o.capture);};const c=function(t){t.preventDefault(),t.stopPropagation(),e.window.removeEventListener("click",c,!0);};function h(e){const{userImage:t}=e;return !!(t&&t.render&&t.render())&&(e.data.replace(new Uint8Array(t.data.buffer)),!0)}a.suppressClick=function(){e.window.addEventListener("click",c,!0),e.window.setTimeout(()=>{e.window.removeEventListener("click",c,!0);},0);},a.mousePos=function(t,i){const o=t.getBoundingClientRect();return new e.Point(i.clientX-o.left-t.clientLeft,i.clientY-o.top-t.clientTop)},a.touchPos=function(t,i){const o=t.getBoundingClientRect(),a=[];for(let r=0;r<i.length;r++)a.push(new e.Point(i[r].clientX-o.left-t.clientLeft,i[r].clientY-o.top-t.clientTop));return a},a.mouseButton=function(t){return void 0!==e.window.InstallTrigger&&2===t.button&&t.ctrlKey&&e.window.navigator.platform.toUpperCase().indexOf("MAC")>=0?0:t.button},a.remove=function(e){e.parentNode&&e.parentNode.removeChild(e);};class u extends e.Evented{constructor(){super(),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this
//
return mapboxgl;
})));
//# sourceMappingURL=mapbox-gl.js.map