zh-mapbox 0.1.18 → 0.1.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see index.js.LICENSE.txt */
|
|
2
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("zMapUtil",[],t):"object"==typeof exports?exports.zMapUtil=t():e.zMapUtil=t()}(this,(()=>{return t={481:function(e,t){var r;void 0!==(t="function"==typeof(r=function(){var e=function(e){return e.reduce((function(e,t){return 2*e+t}),0)},t=function(e){for(var t=[],r=7;r>=0;r--)t.push(!!(e&1<<r));return t},r=function(e){this.data=e,this.len=this.data.length,this.pos=0,this.readByte=function(){if(this.pos>=this.data.length)throw new Error("Attempted to read past end of stream.");return e instanceof Uint8Array?e[this.pos++]:255&e.charCodeAt(this.pos++)},this.readBytes=function(e){for(var t=[],r=0;r<e;r++)t.push(this.readByte());return t},this.read=function(e){for(var t="",r=0;r<e;r++)t+=String.fromCharCode(this.readByte());return t},this.readUnsigned=function(){var e=this.readBytes(2);return(e[1]<<8)+e[0]}},n=function(r,n){n||(n={});var i=function(e){for(var t=[],n=0;n<e;n++)t.push(r.readBytes(3));return t},o=function(){var e,t;t="";do{e=r.readByte(),t+=r.read(e)}while(0!==e);return t},a=function(){var s={};switch(s.sentinel=r.readByte(),String.fromCharCode(s.sentinel)){case"!":s.type="ext",function(i){switch(i.label=r.readByte(),i.label){case 249:i.extType="gce",function(i){r.readByte();var o=t(r.readByte());i.reserved=o.splice(0,3),i.disposalMethod=e(o.splice(0,3)),i.userInput=o.shift(),i.transparencyGiven=o.shift(),i.delayTime=r.readUnsigned(),i.transparencyIndex=r.readByte(),i.terminator=r.readByte(),n.gce&&n.gce(i)}(i);break;case 254:i.extType="com",function(e){e.comment=o(),n.com&&n.com(e)}(i);break;case 1:i.extType="pte",function(e){r.readByte(),e.ptHeader=r.readBytes(12),e.ptData=o(),n.pte&&n.pte(e)}(i);break;case 255:i.extType="app",function(e){r.readByte(),e.identifier=r.read(8),e.authCode=r.read(3),"NETSCAPE"===e.identifier?function(e){r.readByte(),e.unknown=r.readByte(),e.iterations=r.readUnsigned(),e.terminator=r.readByte(),n.app&&n.app.NETSCAPE&&n.app.NETSCAPE(e)}(e):function(e){e.appData=o(),n.app&&n.app[e.identifier]&&n.app[e.identifier](e)}(e)}(i);break;default:i.extType="unknown",function(e){e.data=o(),n.unknown&&n.unknown(e)}(i)}}(s);break;case",":s.type="img",function(a){a.leftPos=r.readUnsigned(),a.topPos=r.readUnsigned(),a.width=r.readUnsigned(),a.height=r.readUnsigned();var s=t(r.readByte());a.lctFlag=s.shift(),a.interlaced=s.shift(),a.sorted=s.shift(),a.reserved=s.splice(0,2),a.lctSize=e(s.splice(0,3)),a.lctFlag&&(a.lct=i(1<<a.lctSize+1)),a.lzwMinCodeSize=r.readByte();var l=o();a.pixels=function(e,t){for(var r,n,i=0,o=function(e){for(var r=0,n=0;n<e;n++)t.charCodeAt(i>>3)&1<<(7&i)&&(r|=1<<n),i++;return r},a=[],s=1<<e,l=s+1,u=e+1,c=[],h=function(){c=[],u=e+1;for(var t=0;t<s;t++)c[t]=[t];c[s]=[],c[l]=null};;)if(n=r,(r=o(u))!==s){if(r===l)break;if(r<c.length)n!==s&&c.push(c[n].concat(c[r][0]));else{if(r!==c.length)throw new Error("Invalid LZW code.");c.push(c[n].concat(c[n][0]))}a.push.apply(a,c[r]),c.length===1<<u&&u<12&&u++}else h();return a}(a.lzwMinCodeSize,l),a.interlaced&&(a.pixels=function(e,t){for(var r=new Array(e.length),n=e.length/t,i=function(n,i){var o=e.slice(i*t,(i+1)*t);r.splice.apply(r,[n*t,t].concat(o))},o=[0,4,2,1],a=[8,8,4,2],s=0,l=0;l<4;l++)for(var u=o[l];u<n;u+=a[l])i(u,s),s++;return r}(a.pixels,a.width)),n.img&&n.img(a)}(s);break;case";":s.type="eof",n.eof&&n.eof(s);break;default:throw new Error("Unknown block: 0x"+s.sentinel.toString(16))}"eof"!==s.type&&setTimeout(a,0)};!function(){var o={};if(o.sig=r.read(3),o.ver=r.read(3),"GIF"!==o.sig)throw new Error("Not a GIF file.");o.width=r.readUnsigned(),o.height=r.readUnsigned();var a=t(r.readByte());o.gctFlag=a.shift(),o.colorRes=e(a.splice(0,3)),o.sorted=a.shift(),o.gctSize=e(a.splice(0,3)),o.bgColor=r.readByte(),o.pixelAspectRatio=r.readByte(),o.gctFlag&&(o.gct=i(1<<o.gctSize+1)),n.hdr&&n.hdr(o)}(),setTimeout(a,0)};return function(e){var t,i,o={vp_l:0,vp_t:0,vp_w:null,vp_h:null,c_w:null,c_h:null};for(var a in e)o[a]=e[a];o.vp_w&&o.vp_h&&(o.is_vp=!0);var s=null,l=!1,u=null,c=null,h=null,p=null,f=null,d=null,y=null,m=!0,v=!1,g=[],_=[],b=o.gif;void 0===o.auto_play&&(o.auto_play=!b.getAttribute("rel:auto_play")||"1"==b.getAttribute("rel:auto_play"));var w,x,L,P,M=o.hasOwnProperty("on_end")?o.on_end:null,E=o.hasOwnProperty("loop_delay")?o.loop_delay:0,k=o.hasOwnProperty("loop_mode")?o.loop_mode:"auto",C=!o.hasOwnProperty("draw_while_loading")||o.draw_while_loading,A=!!C&&(!o.hasOwnProperty("show_progress_bar")||o.show_progress_bar),N=o.hasOwnProperty("progressbar_height")?o.progressbar_height:25,S=o.hasOwnProperty("progressbar_background_color")?o.progressbar_background_color:"rgba(255,255,255,0.4)",T=o.hasOwnProperty("progressbar_foreground_color")?o.progressbar_foreground_color:"rgba(255,0,22,.8)",I=function(){u=null,c=null,f=h,h=null,d=null},R=function(){try{n(t,H)}catch(e){B("parse")}},j=function(e,t){w.width=e*X(),w.height=t*X(),L.style.minWidth=e*X()+"px",P.width=e,P.height=t,P.style.width=e+"px",P.style.height=t+"px",P.getContext("2d").setTransform(1,0,0,1,0,0)},O=function(e,t,r){if(r&&A){var n,i,a,s=N;o.is_vp?v?(i=(o.vp_t+o.vp_h-s)/X(),s/=X(),n=o.vp_l/X()+e/t*(o.vp_w/X()),a=w.width/X()):(i=o.vp_t+o.vp_h-s,n=o.vp_l+e/t*o.vp_w,a=w.width):(i=(w.height-s)/(v?X():1),n=e/t*w.width/(v?X():1),a=w.width/(v?X():1),s/=v?X():1),x.fillStyle=S,x.fillRect(n,i,a-n,s),x.fillStyle=T,x.fillRect(0,i,n,s)}},B=function(e){s=e,i={width:b.width,height:b.height},g=[],x.fillStyle="black",x.fillRect(0,0,o.c_w?o.c_w:i.width,o.c_h?o.c_h:i.height),x.strokeStyle="red",x.lineWidth=3,x.moveTo(0,0),x.lineTo(o.c_w?o.c_w:i.width,o.c_h?o.c_h:i.height),x.moveTo(0,o.c_h?o.c_h:i.height),x.lineTo(o.c_w?o.c_w:i.width,0),x.stroke()},F=function(){d&&(g.push({data:d.getImageData(0,0,i.width,i.height),delay:c}),_.push({x:0,y:0}))},D=function(){var e=-1,t=0,r=function(t){e+=t,i()},n=function(){var n=!1,i=function(){null!==M&&M(b),t++,!1!==k||t<0?o():(n=!1,m=!1)},o=function(){if(n=m){r(1);var t=10*g[e].delay;t||(t=100),0==(e+1+g.length)%g.length?(t+=E,setTimeout(i,t)):setTimeout(o,t)}};return function(){n||setTimeout(o,0)}}(),i=function(){var t;(e=parseInt(e,10))>g.length-1&&(e=0),e<0&&(e=0),t=_[e],P.getContext("2d").putImageData(g[e].data,t.x,t.y),x.globalCompositeOperation="copy",x.drawImage(P,0,0)};return{init:function(){s||(o.c_w&&o.c_h||x.scale(X(),X()),o.auto_play?n():(e=0,i()))},step:n,play:function(){m=!0,n()},pause:function(){m=!1},playing:m,move_relative:r,current_frame:function(){return e},length:function(){return g.length},move_to:function(t){e=t,i()}}}(),G=function(e){O(t.pos,t.data.length,e)},U=function(){},z=function(e,t){return function(r){e(r),G(t)}},H={hdr:z((function(e){j((i=e).width,i.height)})),gce:z((function(e){F(),I(),u=e.transparencyGiven?e.transparencyIndex:null,c=e.delayTime,h=e.disposalMethod})),com:z(U),app:{NETSCAPE:z(U)},img:z((function(e){d||(d=P.getContext("2d"));var t=g.length,r=e.lctFlag?e.lct:i.gct;t>0&&(3===f?null!==p?d.putImageData(g[p].data,0,0):d.clearRect(y.leftPos,y.topPos,y.width,y.height):p=t-1,2===f&&d.clearRect(y.leftPos,y.topPos,y.width,y.height));var n=d.getImageData(e.leftPos,e.topPos,e.width,e.height);e.pixels.forEach((function(e,t){e!==u&&(n.data[4*t+0]=r[e][0],n.data[4*t+1]=r[e][1],n.data[4*t+2]=r[e][2],n.data[4*t+3]=255)})),d.putImageData(n,e.leftPos,e.topPos),v||(x.scale(X(),X()),v=!0),C&&(x.drawImage(P,0,0),C=o.auto_play),y=e}),!0),eof:function(e){F(),G(!1),o.c_w&&o.c_h||(w.width=i.width*X(),w.height=i.height*X()),D.init(),l=!1,J&&J(b)}},q=function(){var e=b.parentNode,t=document.createElement("div");w=document.createElement("canvas"),x=w.getContext("2d"),L=document.createElement("div"),P=document.createElement("canvas"),t.width=w.width=b.width,t.height=w.height=b.height,L.style.minWidth=b.width+"px",t.className="jsgif",L.className="jsgif_toolbar",t.appendChild(w),t.appendChild(L),e.insertBefore(t,b),e.removeChild(b),o.c_w&&o.c_h&&j(o.c_w,o.c_h),W=!0},X=function(){return o.max_width&&i&&i.width>o.max_width?o.max_width/i.width:1},W=!1,J=!1,Y=function(e){return!l&&(J=e||!1,l=!0,g=[],I(),p=null,f=null,d=null,y=null,!0)},V=function(){return g.reduce((function(e,t){return e+t.delay}),0)};return{play:D.play,pause:D.pause,move_relative:D.move_relative,move_to:D.move_to,get_playing:function(){return m},get_canvas:function(){return w},get_canvas_scale:function(){return X()},get_loading:function(){return l},get_auto_play:function(){return o.auto_play},get_length:function(){return D.length()},get_frames:function(){return g},get_duration:function(){return V()},get_duration_ms:function(){return 10*V()},get_current_frame:function(){return D.current_frame()},load_url:function(e,n){if(Y(n)){var i=new XMLHttpRequest;i.open("GET",e,!0),"overrideMimeType"in i?i.overrideMimeType("text/plain; charset=x-user-defined"):"responseType"in i?i.responseType="arraybuffer":i.setRequestHeader("Accept-Charset","x-user-defined"),i.onloadstart=function(){W||q()},i.onload=function(e){200!=this.status&&B("xhr - response"),"response"in this||(this.response=new VBArray(this.responseText).toArray().map(String.fromCharCode).join(""));var n=this.response;n.toString().indexOf("ArrayBuffer")>0&&(n=new Uint8Array(n)),t=new r(n),setTimeout(R,0)},i.onprogress=function(e){e.lengthComputable&&O(e.loaded,e.total,!0)},i.onerror=function(){B("xhr")},i.send()}},load:function(e){this.load_url(b.getAttribute("rel:animated_src")||b.src,e)},load_raw:function(e,n){Y(n)&&(W||q(),t=new r(e),setTimeout(R,0))},set_frame_offset:function(e,t){_[e]?(void 0!==t.x&&(_[e].x=t.x),void 0!==t.y&&(_[e].y=t.y)):_[e]=t}}}})?r.apply(t,[]):r)&&(e.exports=t)},61:(e,t,r)=>{var n=r(698).default;e.exports=function(){"use strict";e.exports=function(){return r},e.exports.__esModule=!0,e.exports.default=e.exports;var t,r={},i=Object.prototype,o=i.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},s=(w="function"==typeof Symbol?Symbol:{}).iterator||"@@iterator",l=w.asyncIterator||"@@asyncIterator",u=w.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(t){c=function(e,t,r){return e[t]=r}}function h(e,r,n,i){var o,s,l,u;return r=r&&r.prototype instanceof g?r:g,r=Object.create(r.prototype),i=new C(i||[]),a(r,"_invoke",{value:(o=e,s=n,l=i,u=f,function(e,r){if(u===y)throw new Error("Generator is already running");if(u===m){if("throw"===e)throw r;return{value:t,done:!0}}for(l.method=e,l.arg=r;;){var n=l.delegate;if(n&&(n=function e(r,n){var i=n.method,o=r.iterator[i];return o===t?(n.delegate=null,"throw"===i&&r.iterator.return&&(n.method="return",n.arg=t,e(r,n),"throw"===n.method)||"return"!==i&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+i+"' method")),v):"throw"===(i=p(o,r.iterator,n.arg)).type?(n.method="throw",n.arg=i.arg,n.delegate=null,v):(o=i.arg)?o.done?(n[r.resultName]=o.value,n.next=r.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,v):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}(n,l),n)){if(n===v)continue;return n}if("next"===l.method)l.sent=l._sent=l.arg;else if("throw"===l.method){if(u===f)throw u=m,l.arg;l.dispatchException(l.arg)}else"return"===l.method&&l.abrupt("return",l.arg);if(u=y,"normal"===(n=p(o,s,l)).type){if(u=l.done?m:d,n.arg===v)continue;return{value:n.arg,done:l.done}}"throw"===n.type&&(u=m,l.method="throw",l.arg=n.arg)}})}),r}function p(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}r.wrap=h;var f="suspendedStart",d="suspendedYield",y="executing",m="completed",v={};function g(){}function _(){}function b(){}var w,x,L=(c(w={},s,(function(){return this})),(x=(x=Object.getPrototypeOf)&&x(x(A([]))))&&x!==i&&o.call(x,s)&&(w=x),b.prototype=g.prototype=Object.create(w));function P(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function M(e,t){var r;a(this,"_invoke",{value:function(i,a){function s(){return new t((function(r,s){!function r(i,a,s,l){var u;if("throw"!==(i=p(e[i],e,a)).type)return(a=(u=i.arg).value)&&"object"==n(a)&&o.call(a,"__await")?t.resolve(a.__await).then((function(e){r("next",e,s,l)}),(function(e){r("throw",e,s,l)})):t.resolve(a).then((function(e){u.value=e,s(u)}),(function(e){return r("throw",e,s,l)}));l(i.arg)}(i,a,r,s)}))}return r=r?r.then(s,s):s()}})}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function k(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function A(e){if(e||""===e){var r,i=e[s];if(i)return i.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return r=-1,(i=function n(){for(;++r<e.length;)if(o.call(e,r))return n.value=e[r],n.done=!1,n;return n.value=t,n.done=!0,n}).next=i}throw new TypeError(n(e)+" is not iterable")}return a(L,"constructor",{value:_.prototype=b,configurable:!0}),a(b,"constructor",{value:_,configurable:!0}),_.displayName=c(b,u,"GeneratorFunction"),r.isGeneratorFunction=function(e){return!!(e="function"==typeof e&&e.constructor)&&(e===_||"GeneratorFunction"===(e.displayName||e.name))},r.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,c(e,u,"GeneratorFunction")),e.prototype=Object.create(L),e},r.awrap=function(e){return{__await:e}},P(M.prototype),c(M.prototype,l,(function(){return this})),r.AsyncIterator=M,r.async=function(e,t,n,i,o){void 0===o&&(o=Promise);var a=new M(h(e,t,n,i),o);return r.isGeneratorFunction(t)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},P(L),c(L,u,"Generator"),c(L,s,(function(){return this})),c(L,"toString",(function(){return"[object Generator]"})),r.keys=function(e){var t,r=Object(e),n=[];for(t in r)n.push(t);return n.reverse(),function e(){for(;n.length;){var t=n.pop();if(t in r)return e.value=t,e.done=!1,e}return e.done=!0,e}},r.values=A,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(k),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,i){return s.type="throw",s.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var i=this.tryEntries.length-1;0<=i;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var l=o.call(a,"catchLoc"),u=o.call(a,"finallyLoc");if(l&&u){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;0<=r;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}var a=(i=i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc?null:i)?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;0<=t;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),k(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;0<=t;--t){var r,n,i=this.tryEntries[t];if(i.tryLoc===e)return"throw"===(r=i.completion).type&&(n=r.arg,k(i)),n}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:A(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},r},e.exports.__esModule=!0,e.exports.default=e.exports},698:e=>{function t(r){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},687:(e,t,r)=>{r=r(61)(),e.exports=r;try{regeneratorRuntime=r}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}}},r={},e.n=t=>{var r=t&&t.__esModule?()=>t.default:()=>t;return e.d(r,{a:r}),r},e.d=(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},e.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),e.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n={},(()=>{"use strict";function t(e,t,r,n,i,o,a){try{var s=e[o](a),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,i)}function r(e){return function(){var r=this,n=arguments;return new Promise((function(i,o){var a=e.apply(r,n);function s(e){t(a,i,o,s,l,"next",e)}function l(e){t(a,i,o,s,l,"throw",e)}s(void 0)}))}}function i(e,t){if(null==e)return{};for(var r,n={},i=Object.keys(e),o=0;o<i.length;o++)r=i[o],0<=t.indexOf(r)||(n[r]=e[r]);return n}function o(){return(o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r,n=arguments[t];for(r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}e.r(n),e.d(n,{MapLayer:()=>te,RegisterMapBoxMethod:()=>function(e,t){if(e&&e.Map){Ke=e,-1===(window.mapboxgl=Ke).Map.prototype._setupPainter.toString().indexOf("webgl2")&&(n=Ke.Map.prototype._setupPainter,Ke.Map.prototype._setupPainter=function(){var e=this._canvas.getContext;this._canvas.getContext=function(t,r){return e.apply(this,["webgl2",r])||e.apply(this,["webgl",r])||e.apply(this,["experimental-webgl",r])},n.apply(this),this._canvas.getContext=e});var n,a,c=e.Map,h=function(e,t){var n=e.prototype.setStyle,a=e.prototype.addControl;return{initData:function(){var e;this[it]||(this[it]={},e=[],st(this,{source:e=t&&Array.isArray(t)&&0<t.length&&t.every((function(e){return"string"==typeof e}))?t:e,defaultSources:e,layerSource:{layers:[],sources:[]},customLayer:[],images:{},layerIndex:[],showHeader:!1,bounds:null,cameraOptions:{},measure:{line:0,circle:0,polygon:0}}))},clearData:function(){st(this,{source:lt(this,"defaultSources"),layerSource:{layers:[],sources:[]},customLayer:[],images:{},layerIndex:[],showHeader:!1,bounds:null,cameraOptions:{}})},setPaint:function(e,t){at(this,e,t,"setPaintProperty")},setLayout:function(e,t){at(this,e,t,"setLayoutProperty")},customStyle:function(e){if(e&&"object"==typeof e)for(var t in e){var r,n=e[t];"string"==typeof n?ot(this,t,n):Array.isArray(n)&&(Qe(n[0])||Array.isArray(n[0]))&&(r=null,"number"!=typeof n[1]&&!Array.isArray(n[1])||(r=n[1]),ot(this,t,n[0],r))}},getAllLayerAndSource:function(e,t){void 0===t&&(t=!0),null==e&&(e=lt(this,"source"));for(var r,n=this.getStyle(),i=n.layers,o=n.sources,a={layers:[],sources:[]},s=0;s<i.length;)"background"===i[s].type||e.includes(i[s].source)||(r=i[s].id,this.getLayer(r)&&(a.layers.push(l(i[s])),t||this.removeLayer(r))),s++;var u,c=[];for(u in o)c.push(u);for(var h=0;h<c.length;){var p=c[h];e.includes(p)||this.isSourceLoaded(p)&&(a.sources.push({name:p,source:l(o[p])}),t||this.removeSource(p)),h++}return a},removeAllCustomLayer:function(){var e=this,t=lt(this,"customLayer");t.forEach((function(t){e.getLayer(t.layer.id)&&e.removeLayer(t.layer.id)})),t.length=0},removeAllLayerAndSource:function(e){return null==e&&(e=lt(this,"source")),this.removeAllCustomLayer(),this.getAllLayerAndSource(e,!1)},removeEvents:function(e){var t=this;void 0===e&&(e=["click","mousemove","mouseout"]),Array.isArray(e)&&e.forEach((function(e){e in t._listeners&&(t._listeners[e]=[])}))},removePopup:function(e){e&&"string"==typeof e?["tooltip","popup"].includes(e)&&this._popups.forEach((function(t){t.options.type===e&&t.remove()})):this._popups.forEach((function(e){e.remove()}))},findCustomLayer:function(e,t){null==t&&(t=lt(this,"source"));for(var r=this.getStyle().layers,n=[],i=0;i<r.length;)"background"===r[i].type||t.includes(r[i].source)||n.push(r[i]),i++;if(e){if("string"==typeof e)return n.filter((function(t){return t.type===e}));if(Array.isArray(e)&&0<e.length)return n.filter((function(t){return e.includes(t.type)}))}return n},MapTooltip:function(e,t){return new E(this,e,t)},MapPopup:function(e,t){return new C(this,e,t)},addLayer:function(e,t){void 0===this._layers&&(this._layers=[],this._sortLayers=[]),e.id&&this._layers.push(e),"zIndex"in e&&this._sortLayers.push(e),this._lazyInitEmptyStyle();var r=lt(this,"layerIndex"),n=lt(this,"customLayer");return"custom"===e.type&&n.push({layer:e,beforeId:t}),t?-1!==(n=r.findIndex((function(e){return e.id===t})))&&r.splice(n,0,{type:e.type,id:e.id}):r.push({type:e.type,id:e.id}),this.style.addLayer(e,t),"zIndex"in e&&(n=this._sortLayers.sort((function(e,t){return e.zIndex-t.zIndex})),this.orderLayers(n.map((function(e){return e.id})))),this.fire("layerdata",o({},e,{add:!0})),this._update(!0)},removeLayer:function(e){var t=this.style.getLayer(e),r=(this._layers=this._layers.filter((function(t){return t.id!==e})),this._sortLayers=this._sortLayers.filter((function(t){return t.id!==e})),lt(this,"customLayer")),n=lt(this,"layerIndex"),i=r.findIndex((function(t){return t.layer.id===e}));return-1!==i&&r.splice(i,1),r=n.findIndex((function(t){return t.id===e})),-1!==r&&n.splice(r,1),this.style.removeLayer(e),this.fire("layerdata",o({},t,{add:!1})),this._update(!0)},moveLayer:function(e,t){var r,n=lt(this,"layerIndex"),i=n.findIndex((function(t){return t.id===e})),o=n.findIndex((function(e){return e.id===t}));return-1!==i&&-1!==o&&(r=n.splice(i,1)[0],o<0?o=0:o>n.length&&(o=n.length),n.splice(o,0,r)),this.style.moveLayer(e,t),this._update(!0)},MapLine:function(){return new N(this)},MapCustom:function(){return new S(this)},fitBoundsGeoJson:function(e,t,r){e&&(e=[[(e=W(e)).bbox[0],e.bbox[1]],[e.bbox[2],e.bbox[3]]],this.fitBoundsPosition(e,t,r))},fitBoundsPosition:function(e,t,r){var n,a,s,l;Array.isArray(e)&&0!==(null==e?void 0:e.length)&&(n=void 0===(n=(t=null!=t?t:{}).padding)?40:n,a=void 0===(a=t.animate)||a,s=void 0===(s=t.maxZoom)?15:s,l=void 0===(l=t.essential)||l,t=i(t,Ve),this.fitBounds(e,o({linear:!1,padding:n,animate:a,essential:l,maxZoom:s},t),r))},getInvertMask:function(e,t){var r;if(u(e)&&0!==(e=null!=(e=e.features[0].geometry.coordinates)?e:[]).length)return r=[],e.forEach((function(e){r.push(e[0])})),t=(e=null!=t?t:{}).id,e=void 0===(e=e.layerConfig)?{paint:{"fill-color":"rgba(0,0,0,0.8)"},layout:{visibility:"visible"}}:e,o({id:void 0===t?"mask":t,type:"fill",source:{type:"geojson",data:{type:"Feature",geometry:{type:"Polygon",coordinates:[[[-180,90],[180,90],[180,-90],[-180,-90]]].concat(r)}}}},e)},fitMap:function(){for(var e={},t=!1,r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];var a=void 0===(a=n[0])?null:a,s=void 0===(s=n[1])?null:s,l=lt(this,"bounds"),c=lt(this,"cameraOptions");a?u(a)?(t=!1,l=a,s&&!u(s)&&"object"==typeof s&&(c=s)):"object"==typeof a&&(t=!0,e=a):l&&(t=!0),t&&l&&this.fitBoundsGeoJson(l,o({},c,e))},loadImages:function(e){var t=this;return new Promise((function(r){var n={};if(e&&0!==Object.keys(e).length)for(var o in e){var a,s,l=e[o];"string"==typeof l?t.loadImage(l,u(o)):"object"==typeof l&&(l.url?(a=l.url,s=i(l,Ze),t.loadImage(a,u(o,s))):l.layer&&l.layer.render&&"function"==typeof l.layer.render&&u(o,l.config||{})(null,l.layer))}else r(n);function u(t,i){return function(o,a){n[t]={data:i,url:o?null:a},Object.keys(n).length===Object.keys(e).length&&r(n)}}}))},loadAddImages:function(e){var t=this;return new Promise((function(r){t.loadImages(e).then((function(e){for(var n in e){var i=e[n],a=o({},null==i?void 0:i.data,{type:"custom"});t.hasImage(n)||t.addImage(n,i.url,a)}r()}))}))},MapCircle:function(){return new Z(this)},MapEvent:function(e){return new K(this,e)},MapMoreCustom:function(){return new ee(this)},removeLayerSource:function(e){function t(e){r.getSource(e)&&(r.removeLayer(e),r.removeSource(e))}var r=this,n=e.name,i=null!=(i=e.sources)?i:[];e=null!=(e=e.layers)?e:[],Array.isArray(n)&&0<n.length?n.forEach((function(e){t(e)})):"string"==typeof n&&t(n),0<(null==i?void 0:i.length)&&0<(null==e?void 0:e.length)&&(e.forEach((function(e){r.getLayer(e)&&r.removeLayer(e)})),i.forEach((function(e){r.getSource(e)&&r.removeSource(e)})))},removeLayerEvent:function(e,t){if(void 0===t&&(t=!0),"object"==typeof e&&null!=e)if(e.destroy&&"function"==typeof e.destroy)e.destroy();else for(var r in e)e[r]&&e[r].destroy&&"function"==typeof e[r].destroy&&(e[r].destroy(),t)&&(e[r]=null)},MapMarker:function(e){return new se(this,e)},findCustomIcon:function(){var e,t=this.style.imageManager.images,r={};for(e in t)"custom"===t[e].type&&(r[e]=t[e]);return r},getCustomLayer:function(){var e=this,t=lt(this,"customLayer"),r=[];return t.map((function(t){e.getLayer(t.layer.id)&&r.push(t.layer)})),r},setStyle:function(e,t,r){var i,o,a,s,l,u,c=this;return null!=t&&t.save&&(a=(o=null!=t?t:{}).source,o=void 0!==(o=o.custom)&&o,a=null!=(i=a=void 0===a?[]:a)?i:[],lt(this,"images"),s=lt(this,"layerSource"),l=lt(this,"customLayer"),u=this.findCustomIcon(),Array.isArray(a)&&0!==a.length?o||(a=Array.from(new Set([].concat(a,["composite","mapbox://mapbox.satellite"])))):a=["composite","mapbox://mapbox.satellite"],s=this.getAllLayerAndSource(a),this.once("style.load",(function(n){var i,o=[];for(i in u)o.push(i),c.style.imageManager.images[i]=u[i];var a=[];s.sources.map((function(e){var t=s.layers.filter((function(t){return t.source===e.name}));a.push({name:e.name,source:e.source,layer:t})})),null!=t&&t.log&&console.log(a),a.map((function(e){c.getSource(e.name)||c.addSource(e.name,e.source),e.layer.map((function(e){c.getLayer(e.id)||c.addLayer(e)}))})),l.forEach((function(e){c.getLayer(e.layer.id)||c.addLayer(e.layer,e.beforeId)})),r&&"function"==typeof r&&r({style:e,images:o,layerSource:s})}))),n.call(this,e,t)},getLayerIndex:function(e){var t=lt(this,"layerIndex");if(e){var r=t.findIndex((function(t){return t.id===e}));if(-1!==r)return r}return 0===t.length?0:t.length-1},getLayerId:function(e,t){void 0===t&&(t=0);var r=lt(this,"layerIndex");return e+=t,t=Number(e),isNaN(t)||e<0&&e>=r.length?"":null!=(r=null==r||null==(t=r[e])?void 0:t.id)?r:void 0},getMinLayerId:function(){var e=lt(this,"layerIndex");return null!=(e=null==e||null==(e=e[0])?void 0:e.id)?e:void 0},getMaxLayerId:function(){var e=lt(this,"layerIndex");return null!=(e=null==e||null==(e=e[e.length-1])?void 0:e.id)?e:void 0},getAllLayerId:function(){return lt(this,"layerIndex").map((function(e){return e.id}))},getAllLayer:function(){return lt(this,"layerIndex")},getLineLayer:function(){return lt(this,"layerIndex").map((function(e,t){return"line"!==e.type?null:{index:t,id:e.id}})).filter(Boolean)},AnimateLine:function(e,t){return new le(this,e,t)},addHeader:function(e,t){var r,n=lt(this,"showHeader");t&&"function"==typeof t&&!n&&(r=this._requestManager.transformRequest,this._requestManager.transformRequest=function(i,a){return a=r.call(this,i,a),(i=t(i))&&"boolean"==typeof i?(n=!0,o({headers:e},a)):a})},getTileByPosition:function(e,t){var r,n;return e&&Array.isArray(e)&&2<=e.length&&e.every((function(e){return"number"==typeof e}))?(r=(e=Ke.MercatorCoordinate.fromLngLat({lng:e[0],lat:e[1]})).x,e=e.y,t=null!=(n=t)?n:this.getZoom(),n=Math.floor(t),t=Math.pow(2,n),[Math.floor(r*t),Math.floor(e*t),n]):[]},getPositionByTile:function(e){var t,r,n,i;return!(e&&Array.isArray(e)&&3===e.length&&e.every((function(e){return"number"==typeof e})))||(i=e[0],t=e[1],e=Math.floor(e[2]),e=Math.pow(2,e),i<0)||t<0||e<=i||e<=t?[]:(r=w(t/e),n=b(i/e),i=b((i+1)/e),[n,w((t+1)/e),i,r])},getTilesByBounds:function(e,t){var r=void 0===(r=(t=null!=(t=t=void 0===t?{}:t)?t:{}).expand)?0:r,n=(t=void 0!==(t=t.reversal)&&t,e=null!=(i=e)?i:this.getZoom(),Math.floor(e)),i=this.getBounds().toArray(),o=(e=this.getTileByPosition(i[0],n))[0],a=e[1],s=(e=this.getTileByPosition(i[1],n))[0],l=e[1];if(l-=r="number"!=typeof r||r<0||2<r?0:r,s+=r,a+=r,!(_(o-=r)&&_(s)&&_(l)&&_(a)))return[];var u=[];if(t)for(var c=l;c<=a;c++)for(var h=o;h<=s;h++)u.push([h,c,n]);else for(var p=o;p<=s;p++)for(var f=l;f<=a;f++)u.push([p,f,n]);var d=Math.pow(2,n);return u.forEach((function(e){e[0]<0&&(e[0]=e[0]+d)})),u.filter((function(e){return 0<=e[1]}))},loadSpriteGraph:function(e){var t=this;return new Promise(function(){var n=r(s().mark((function n(i){var o,a,l,u;return s().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(e)return o=[],"object"==typeof e&&e.image&&e.json?o=[e]:Array.isArray(e)&&e.every((function(e){return"object"==typeof e&&e.image&&e.json}))&&(o=e),a={},l=function(){var e=r(s().mark((function e(){var t,r,n,i,l,u,c,h,p,f,d,y,m,v,g,_,b;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=0;case 1:if(t<o.length){if(r=o[t].image,n=o[t].json,i={},"string"==typeof n)return e.next=8,fetch(n).then((function(e){return e.json()}));e.next=12}else e.next=20;break;case 8:l=e.sent,i="object"==typeof l?l:{},e.next=13;break;case 12:"object"==typeof n&&(i=n);case 13:return e.next=15,function(){return he.apply(this,arguments)}(r);case 15:for(c in u=e.sent,i)_=i[c],h=_.width,p=_.height,f=_.x,d=_.y,y=_.sdf,m=_.pixelRatio,v=_.stretchX,g=_.stretchY,_=_.content,b=new ue({width:h,height:p}),ue.copy(u,b,{x:f,y:d},{x:0,y:0},{width:h,height:p}),a[c]={data:b,pixelRatio:m,sdf:y,stretchX:v,stretchY:g,content:_};case 17:t++,e.next=1;break;case 20:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),n.next=7,l();n.next=9;break;case 7:for(u in a)t.style.addImage(u,a[u]);i();case 9:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}())},MapClusterMarker:function(e){return new fe(this,e)},MapSourceEvent:function(e,t){return new ye(this,e,t)},TileByGeoJson:function(e){return new Ee(this,e)},MapMenu:function(e){return new Se(this,e)},MapMeasure:function(e){return new Xe(this,e,it)},addControl:function(e,t){return this.initData(),a.call(this,e,t)},MapTileClusterCustom:function(e){return new Ye(this,e)},updateGlyphs:function(e){this.style.updateGlyphs(e)},orderLayers:function(e){void 0===e&&(e=[]);var t=this.style._layers,r=Object.keys(t).map((function(e){return t[e]})),n=[],i=[];return e.forEach((function(e){var t;e&&(t=r.find((function(t){return t.id===e})))&&n.push(t)})),r.forEach((function(e){n.find((function(t){return t.id===e.id}))||i.push(e)})),e=i.concat(n),this.style._checkLoaded(),this.style._changed=!0,this.style._order=e.map((function(e){return e.id})),this.style._layerOrderChanged=!0,e}}}(c,t);for(a in new Event("layerdata"),h)c.prototype[a]=h[a];var p,f=Ke.Style,d=function(e){var t=e.prototype.addImage,r=e.prototype.updateImage,n=e.prototype._loadSprite,i=e.prototype.queryRenderedFeatures,o=e.prototype.addLayer,a=e.prototype.removeLayer;return{addImage:function(e,r){return r.type="custom",t.call(this,e,r),this},updateImage:function(e,t){t.type="custom",r.call(this,e,t)},_loadSprite:function(e,t){var r,i=this;void 0===t&&(t=!1),n.call(this,e),t&&(r=this._availableImages.length,this.map.on("data",(function e(t){var n=i._availableImages.length;if("style"===t.dataType&&n!==r&&r<n){for(var o=i._availableImages.slice(r),a=0;a<o.length;a++)i.imageManager.images[o[a]].type="custom";i.map.off("data",e)}})))},loadSprite:function(e){this._loadSprite(e,!0)},addLayer:function(e,t){for(var r=void 0===(r=e.interactive)||r,n=(null!=this&&null!=(n=this[it])&&n.layerObject||st(this,{layerObject:{}}),this),i=["layerObject",e.id],a=n[it],s=0;s<i.length-1;s++){var l=i[s];a[l]||(a[l]={}),a=a[l]}a[i[i.length-1]]=r,o.call(this,e,t)},removeLayer:function(e){var t=["layerObject",e];if(t.reduce((function(e,t){return e[t]}),this[it])){for(var r=this[it],n=0;n<t.length-1;n++)r=r[t[n]];r&&t[t.length-1]in r&&delete r[t[t.length-1]]}a.call(this,e)},queryRenderedFeatures:function(e,t,r){var n=i.call(this,e,t,r);if(0<n.length)for(var o=0;o<n.length;o++){var a=lt(this,["layerObject",n[o].layer.id]);n[o].layer.interactive=null==a||a}return n.filter((function(e){return e.layer.interactive}))},updateGlyphs:function(e){this.glyphManager.setURL(e)}}}(f);for(p in d)f.prototype[p]=d[p];var y=(e=Ke.Popup).prototype.setDOMContent;e.prototype._closeClick=function(){},e.prototype.setDOMContent=function(e){return e=y.call(this,e),this._closeButton&&this._closeButton.addEventListener("click",this._closeClick),e}}},RegisterMapBoxModel:()=>function(e,t){if(Ke&&e&&t){($e=e).GLTFLoader=t,window.THREE=$e;var r,n=Ke.Map,i={initGLTF:function(e,t,r){return new A(e,t,r)}};for(r in i)n.prototype[r]=i[r]}},RegisterMapClass:()=>function(e,t){var r;e&&(r=(t=null!=t?t:{}).tooltipClass,t=t.popupClass,e.tooltipClass=null!=r?r:"commonTooltip",e.popupClass=null!=t?t:"commonPopup")},deepClone:()=>l,gcj02ToWgs84:()=>xe,getArrayDepth:()=>m,getGifSymbol:()=>function(e){var t,r=void 0===(t=(e=null!=e?e:{}).width)?50:t,n=void 0===(t=e.height)?50:t,i=void 0===(t=e.duration)?100:t,o=void 0===(t=e.url)?"":t;return new Promise((function(e){var t,a,s;o&&("gif"===(s=(a=o).split("/"))[s.length-1].split(".").pop().toLowerCase()||a.startsWith("data:image/gif"))?(s=document.createElement("div"),(a=document.createElement("img")).setAttribute("rel:animated_src",o),a.setAttribute("rel:auto_play","0"),s.appendChild(a),(t=new(P())({gif:a})).load((function(){for(var o,a=[],s=1;s<=t.get_length();s++){t.move_to(s);var l=((l=t.get_canvas().getContext("2d")).drawImage(t.get_canvas(),0,0,r,n),l.getImageData(0,0,r,n).data);a.push(l)}0<a.length?(o={width:r,height:n,data:new Uint8Array(r*n*4),onAdd:function(e){this.map=e,(e=document.createElement("canvas")).width=this.width,e.height=this.height,this.canvas=e,this.context=e.getContext("2d"),this.index=0,this.duration=i,this.dataNow=performance.now()},render:function(){var e=a[this.index];return performance.now()-this.dataNow>this.duration&&(this.index++,this.index>=a.length&&(this.index=0),this.dataNow=performance.now()),this.data=e,this.map.triggerRepaint(),!0}},e(o)):e(null)}))):e(null)}))},getPositionType:()=>d,getSymbolRipple:()=>function(e){var t,r=void 0===(t=(e=null!=e?e:{}).size)?30:t,n=void 0===(t=e.duration)?1e3:t,i=void 0===(t=e.color)?"#f00":t,o=e.custom,a=v(i,!0),s=!1;return o&&"function"==typeof o&&(s=!0),{width:r,height:r,data:new Uint8Array(r*r*4),onAdd:function(e){this.map=e,(e=document.createElement("canvas")).width=this.width,e.height=this.height,this.context=e.getContext("2d")},render:function(){var e,t,l,u=this.context;return s?u=o({width:this.width,height:this.height,duration:n,color:i,context:u}):(e=performance.now()%n/n,t=r/2*.2,l=r/2*e,u.clearRect(0,0,this.width,this.height),u.beginPath(),u.arc(this.width/2,this.height/2,l,0,2*Math.PI),u.strokeStyle="rgba("+a[0]+","+a[1]+","+a[2]+","+(1-e+.1)+")",u.lineWidth=2,u.stroke(),u.fillStyle="rgba("+a[0]+","+a[1]+","+a[2]+","+(1-e)+")",u.fill(),u.beginPath(),u.arc(this.width/2,this.height/2,t,0,2*Math.PI),u.fillStyle="rgba("+a[0]+","+a[1]+","+a[2]+","+(1-e)+")",u.lineWidth=2+4*(1-e),u.fill()),this.data=u.getImageData(0,0,this.width,this.height).data,this.map.triggerRepaint(),!0}}},hexToRgba:()=>v,isClosedGraph:()=>y,isGeoJSON:()=>u,isNumber:()=>g,isValidNumber:()=>_,judgeSizeLngLat:()=>h,latFromMercatorY:()=>w,lngFromMercatorX:()=>b,mergeGeoJson:()=>function(){for(var e={type:"FeatureCollection",features:[]},t=[],r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];for(var o=0;o<n.length;o++)Array.isArray(n[o])?t.push.apply(t,n[o]):n[o]&&"object"==typeof n[o]&&t.push(n[o]);for(var a,s=0;s<t.length;s++){var l=t[s];u(l)&&(l=l.features,(a=e.features).push.apply(a,l))}return e},object2Geojson:()=>function(e,t,r){var n=l(e);if(!Array.isArray(n))return null;e={type:"FeatureCollection"};for(var i=[],o=function(e){var o=n[e],a=function(e,t){if(t)if("string"==typeof t){var r=t.split(".").filter(Boolean);if(1!==r.length)return f(e,r);if(r=e[r[0]])return[p(r)]}else if(Array.isArray(t)){if(2===t.length)return[[e[t[0]],e[t[1]]].filter(Boolean)];if(3===t.length&&t[2])return f(e,r=t[2].split(".").filter(Boolean),[t[0],t[1]])}return[]}(o,t);0<a.length&&a.map((function(t){var a=d(t),s=!1;(s=!(!a||!("type"===a||0<t.length||"Feature"===a||"GeometryCollection"===a))||s)&&("GeometryCollection"===a?(null!=(s=t.geometries)?s:[]).forEach((function(t){var o={type:"Feature"};o.geometry=t,r&&r.key&&"string"==typeof r.key&&(r.alias&&"string"==typeof r.alias?o[r.alias]=n[e][r.key]:o[r.key]=n[e][r.key]),i.push(o)})):(s={type:"Feature"},"Feature"!==a?(s.properties=o,s.geometry="type"===a?t:{type:a,coordinates:t}):s=t,r&&r.key&&"string"==typeof r.key&&(r.alias&&"string"==typeof r.alias?s[r.alias]=n[e][r.key]:s[r.key]=n[e][r.key]),i.push(s)))}))},a=0;a<n.length;a++)o(a);return e.features=i,e},outOfChina:()=>we,parseValue:()=>L,performChunk:()=>function(e,t,r){var n,i,o=[];"number"==typeof e?o=new Array(e):Array.isArray(e)&&(o=e),0!==o.length&&"function"==typeof t&&(!(n="function"==typeof r?r:null)&&globalThis.requestIdleCallback&&(n=function(e){requestIdleCallback((function(t){e((function(){return 0<t.timeRemaining()}))}))}),i=0,function e(){i!==o.length&&n((function(r){for(var n=Date.now();r(Date.now()-n)&&i<o.length;){var a=o[i];t(a,i),i++}e()}))}())},resversalGeojson:()=>function(e,t){if(void 0===t&&(t=!0),u(e)){for(var r={type:"FeatureCollection",features:[]},n=e.features,i=0;i<n.length;i++){var a,s=n[i],l={};for(a in s)"geometry"!==a&&"properties"!==a&&"type"!==a&&(l[a]=s[a]);var p=s.geometry.coordinates,f=s.geometry.type,d={type:f,coordinates:null};d.coordinates=("Point"===f?h:c)(p,t),r.features.push(o({type:"Feature",geometry:d,properties:s.properties},l))}return r}return null},reversalLngLat:()=>c,transformGeojson:()=>function(e,t){return u(e)&&"function"==typeof t?((e=l(e)).features.forEach((function(e){var r=e.geometry;e.geometry.coordinates=x(r.coordinates,t)})),e):null},transformLngLat:()=>x,wgs84ToGcj02:()=>function(e,t){var r,n,i,o,a;return we(e=+e,t=+t)?[e,t]:(r=_e(e-105,t-35),n=be(e-105,t-35),i=t/180*me,o=Math.sin(i),o=1-ge*o*o,a=Math.sqrt(o),r=180*r/(ve*(1-ge)/(o*a)*me),[e+(n=180*n/(ve/a*Math.cos(i)*me)),t+r])}});var a=e(687),s=e.n(a),l=function e(t){var r,n,i="object"!=(i=typeof(r=t))?i:Object.prototype.toString.call(r).replace(/^\[object (\S+)\]$/,"$1");if("Array"===i)n=[];else{if("Object"!==i)return t;n={}}if("Array"===i)for(var o=0,a=t.length;o<a;o++)n.push(e(t[o]));else if("Object"===i)for(var s in t)n[s]=e(t[s]);return n};function u(e){return"object"==typeof e&&null!==e&&"FeatureCollection"===e.type&&Array.isArray(e.features)}function c(e,t){return void 0===t&&(t=!0),e&&("string"==typeof e&&(e=JSON.parse(e)),Array.isArray(e))?g(e[0])?h(e,t):function e(t){for(var r=[],n=0;n<t.length;n++){var i=t[n];g(i[0])?r.push(h(i)):r.push(e(i))}return r}(e):[]}function h(e,t){void 0===t&&(t=!0);var r=Number(e[0]);return e=Number(e[1]),t&&r<e?[e,r]:[r,e]}function p(e){return"string"==typeof e?JSON.parse(e):e}function f(e,t,r){var n=[],i=2===(r=void 0===r?[]:r).length;return function e(t,o){var a;t&&o.length&&(a=o.shift(),t.hasOwnProperty(a))&&(t=L(t[a]),Array.isArray(t)?0!==o.length||i?t.forEach((function(t){i?n.push([t[r[0]],t[r[1]]]):e(t,l(o))})):t&&(a=p(t),n.push(a)):"object"==typeof t?0===o.length?n.push(i?[t[r[0]],t[r[1]]]:t):e(t,o):0===o.length&&t&&(a=p(t),n.push(a)))}(e,t),n}function d(e){if(Array.isArray(e)){var t=m(e=e.filter(Boolean));if(0!==t)switch(t){case 1:return"Point";case 2:return"LineString";case 3:return y(e.map((function(e){return[e[0],e[e.length-1]]})))?"Polygon":"MultiLineString";case 4:return"MultiPolygon";default:return null}}else if(e&&"object"==typeof e){if(["Point","LineString","Polygon","MultiLineString","MultiPolygon"].includes(e.type))return"type";if("Feature"===e.type)return"Feature";if("GeometryCollection"===e.type)return"GeometryCollection"}return null}function y(e){if(0===e.length)return!1;function t(e,t,r){return void 0===r&&(r=1e-9),Math.abs(e[0]-t[0])<r&&Math.abs(e[1]-t[1])<r}for(var r=0;r<e.length-1;r++)if(!t(e[r][1],e[r+1][0]))return!1;return t(e[0][0],e[e.length-1][1])}function m(e){return Array.isArray(e)?Array.isArray(e[0])?1+m(e[0]):1:0}function v(e,t){void 0===t&&(t=!1);var r,n,i=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(function(e,t,r,n){return t+t+r+r+n+n}));return(i=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(i))?(r=parseInt(i[1],16),n=parseInt(i[2],16),i=parseInt(i[3],16),t?[r,n,i,1]:"rgba("+r+","+n+","+i+",1)"):e}function g(e){return"number"==typeof e||!("string"!=typeof e||!e||e.includes(" ")||isNaN(Number(e)))}function _(e){return isFinite(e)&&!isNaN(e)}function b(e){return 360*e-180}function w(e){return 360/Math.PI*Math.atan(Math.exp((180-360*e)*Math.PI/180))-90}function x(e,t){return e&&"function"==typeof t&&("string"==typeof e&&(e=JSON.parse(e)),Array.isArray(e))?g(e[0])?t(e):function e(t,r){for(var n=[],i=0;i<t.length;i++){var o=t[i];g(o[0])?n.push(r(o)):n.push(e(o,r))}return n}(e,t):[]}function L(e){try{return"string"==typeof e?JSON.parse(e):e}catch(t){return e}}a=e(481);var P=e.n(a),M=["customName"],E=function(){function e(e,t,n){var a=this,l=(this._mouseEnter=function(){var e=r(s().mark((function e(t){var r,n,i,o,l,u,c,h,p,f,d;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("Map"!==t.originalEvent.target.ariaLabel)return e.abrupt("return");e.next=2;break;case 2:if(r=t.point,n=t.lngLat,i=a.map.queryRenderedFeatures(r),u=null!=(u=i[0])?u:{},o=u.properties,l=u.geometry,u.source,u=u.layer,a.layerName.includes(u.id)){e.next=8;break}return null!=(u=a.popup)&&u.remove(),e.abrupt("return");case 8:if(u=l.coordinates,c=[n.lng,n.lat],"mouseenter"===a.mouseType&&(c=a._getPosition(u)),!(0<(null==(f=c)?void 0:f.length))){e.next=19;break}for(p in h={},o)if("string"==typeof o[p]&&isNaN(Number(o[p])))try{h[p]=JSON.parse(o[p])}catch(e){h[p]=o[p]}else h[p]=o[p];return e.next=16,a.htmlCallBack(h,c,{lngLat:n,geometry:l,point:r,features:i,feature:i[0]});case 16:f=e.sent,d=function(e){a.popup.setLngLat(c).setHTML(e).addTo(a.map)},"object"==typeof f?f.hasOwnProperty("nodeType")?d(f):f.hasOwnProperty("show")&&"boolean"==typeof f.show?f.show&&d(f.data):d(""):"string"!=typeof f&&"number"!=typeof f||d(f);case 19:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this._mouseLeave=function(){a.popup.remove()},this.map=e,"string"==typeof t?this.layerName=[t]:Array.isArray(t)&&(this.layerName=t),e=null!=(t=e.tooltipClass)?t:"commonTooltip",void 0!==(l=(t=null!=n?n:{}).customName)&&l);t=i(t,M),l=l?"":e+" ",this.className=l,null!=n&&n.className&&(l+=n.className),l=l.split(" ").filter(Boolean).join(" "),this.fullName=l,this.popup=new mapboxgl.Popup(o({},t,{className:l,closeButton:null!=(e=null==n?void 0:n.closeButton)&&e,closeOnClick:null!=(t=null==n?void 0:n.closeOnClick)&&t,anchor:null!=(l=null==n?void 0:n.anchor)?l:"left",type:"tooltip"}))}var t=e.prototype;return t.show=function(e,t){var r=this;"function"==typeof(this.htmlCallBack=e)&&(this.mouseType="mouseenter","move"===t&&(this.mouseType="mousemove"),0<(null==(e=this.layerName)?void 0:e.length))&&this.layerName.forEach((function(e){r.map.on(r.mouseType,e,r._mouseEnter).on("mouseleave",e,r._mouseLeave)}))},t.setClassName=function(e,t){var r=this;void 0===t&&(t=!1),this.popup&&"string"==typeof e&&e!==this.oldClassName&&(Array.from(this.popup._classList).map((function(e){e&&e.replaceAll(" ","")&&r.popup.addClassName(e)})),(t?this.fullName+" "+e:this.className+" "+e).split(" ").filter(Boolean).map((function(e){r.popup.addClassName(e)})),this.oldClassName=e)},t.destroy=function(){var e,t=this;null!=(e=this.popup)&&e.remove(),null!=(e=this.layerName)&&e.forEach((function(e){t.map.off(t.mouseType,e,t._mouseEnter).off("mouseleave",e,t._mouseLeave)}))},t._getPosition=function(e){return function e(t){return Array.isArray(t[0])?e(t[0]):t}(e)},e}(),k=["destroyComponent","customClick","popupClose","closeOther","noCloseLayerName","customName","offset","closeClick"],C=function(){function e(e,t,n){var a=this,l=(this._closeOtherPopup=function(){var e;a.closeOther&&null!=(e=a.map)&&null!=(e=e._popups)&&e.forEach((function(e){var t;"popup"===e.options.type&&(Array.isArray(a.noCloseLayerName)&&0<a.noCloseLayerName.length?(t=e.options.sourceName.join("|"),new RegExp(t).test(a.noCloseLayerName)&&null!=e&&null!=(t=e._onClose)&&t.call(e)):null!=e&&null!=(t=e._onClose)&&t.call(e))}))},this._click=function(){var e=r(s().mark((function e(t){var r,n,i,o,l,u,c,h,p,f,d,y,m,v;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("Map"!==t.originalEvent.target.ariaLabel)return e.abrupt("return");e.next=2;break;case 2:if(a._closeOtherPopup(),r=t.point,n=t.lngLat,i=a.map.queryRenderedFeatures(r),c=null!=(c=i[0])?c:{},o=c.properties,l=c.geometry,c.source,c=c.layer,a.layerName.includes(c.id)){e.next=8;break}return e.abrupt("return");case 8:if(a.customClick){e.next=30;break}for(p in h={},o)if("string"==typeof o[p]&&isNaN(Number(o[p])))try{h[p]=JSON.parse(o[p])}catch(e){h[p]=o[p]}else h[p]=o[p];return f=l.coordinates,d=l.type,e.next=14,null==(c=a.componentCallBack)?void 0:c.call(a,{properties:h,lngLat:n,coordinates:f,point:r,features:i,feature:i[0]});case 14:if(e.t1=u=e.sent,e.t0=null!==e.t1,!e.t0){e.next=18;break}e.t0=void 0!==u;case 18:e.t0?(e.t2=u,e.next=23):e.next=22;break;case 22:e.t2={};case 23:m=e.t2,y=m.component,m=m.instance,v=n,"Point"===d&&(v=f),a.vueInstance=m,y&&(a.popup.setOffset(a.offset),a.popup.setLngLat(v).setDOMContent(y).addTo(a.map));case 30:"function"==typeof a.callBack&&a.callBack({lngLat:n,properties:o,geometry:l,point:r});case 31:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.map=e,this.popup=null,"string"==typeof t?this.layerName=[t]:Array.isArray(t)&&(this.layerName=t),void 0!==(u=(t=n||{}).destroyComponent)&&u),u=void 0!==(u=t.customClick)&&u,c=void 0!==(c=t.popupClose)&&c,h=void 0===(h=t.closeOther)||h,p=void 0===(p=t.noCloseLayerName)?[]:p,f=void 0!==(f=t.customName)&&f,d=void 0===(d=t.offset)?[0,0]:d,y=t.closeClick;t=i(t,k),e=null!=(e=e.popupClass)?e:"commonPopup",f=f?"":e+" ",this.className=f,null!=n&&n.className&&(f+=n.className),f=f.split(" ").filter(Boolean).join(" "),this.fullName=f,this.noCloseLayerName=p,this.noCloseLayerName=[],this.customClick=u,this.popupCloseSign=c,this.closeOther=h,this.offset=d="number"==typeof d?[d,d]:d,this.vueInstance=null,this.closeCallback=null,this.customClick||(this.popup=new mapboxgl.Popup(o({},t,{offset:d,className:f,closeButton:null!=(e=null==t?void 0:t.closeButton)&&e,closeOnClick:null!=(n=null==t?void 0:t.closeOnClick)&&n,anchor:null!=(p=null==t?void 0:t.anchor)?p:"bottom",focusAfterOpen:null!=(u=null==t?void 0:t.focusAfterOpen)&&u,type:"popup",sourceName:this.layerName})),y&&"function"==typeof y&&(this.popup._closeClick=y),null!=(c=this.popup)&&c.on("close",(function(e){"function"==typeof a.closeCallback&&a.closeCallback(e),a.popupCloseSign&&null!=(e=a.vueInstance)&&e.popupClose&&"function"==typeof a.vueInstance.popupClose&&a.vueInstance.popupClose(),a.vueInstance&&l&&null!=(e=a.vueInstance)&&e.$destroy()})))}var t=e.prototype;return t.show=function(e,t){var r=this;this.componentCallBack=e,this.callBack=t,0<(null==(e=this.layerName)?void 0:e.length)&&this.layerName.forEach((function(e){r.map.on("click",e,r._click)}))},t.setClassName=function(e,t){var r=this;void 0===t&&(t=!1),this.popup&&"string"==typeof e&&e!==this.oldClassName&&(Array.from(this.popup._classList).map((function(e){r.popup.removeClassName(e)})),(t?this.fullName+" "+e:this.className+" "+e).split(" ").filter(Boolean).map((function(e){e&&e.replaceAll(" ","")&&r.popup.addClassName(e)})),this.oldClassName=e)},t.showPosition=function(e,t,r,n){e&&(this._closeOtherPopup(),(r=(null!=r?r:{}).offset)&&this.popup.setOffset(r),this.popup.setLngLat(e).setDOMContent(t).addTo(this.map),n)&&"function"==typeof n&&n()},t.close=function(){var e;null!=(e=this.popup)&&e._onClose()},t.closeBack=function(e){this.closeCallback=e},t.destroy=function(){var e,t=this;null!=(e=this.popup)&&e.remove(),null!=(e=this.layerName)&&e.forEach((function(e){t.map.off("click",e,t._click)}))},e}(),A=function(){function e(e,t,r){var n=this,i=(this.clickEvent=function(e){var t=new THREE.Vector2,r=n.map.getCanvas();t.x=(e.clientX-r.getBoundingClientRect().left)/r.offsetWidth*2-1,t.y=-(e.clientY-r.getBoundingClientRect().top)/r.offsetHeight*2+1,e=(new THREE.Matrix4).getInverse(n.camera.projectionMatrix),r=(new THREE.Vector3).applyMatrix4(e),t=new THREE.Vector3(t.x,t.y,1).applyMatrix4(e).clone().sub(r).normalize(),(e=new THREE.Raycaster).set(r,t),r=e.intersectObjects(n.scene.children,!0),n.callback&&0<r.length&&(t=r[0],e=n.findProperties(t.object),n.callback(e))},this.findProperties=function(e){var t={},r=null;return"Scene"!==e.type&&(r=(e.lngLat?(t=e.properties,e):(t=(e=n.findProperties(e.parent)).properties,e)).lngLat),{properties:t,lngLat:r}},this.id="3d-"+e,this.type="custom",this.renderingMode="3d","function"==typeof r&&(this.callback=r),e=t.lngLat,r=t.url,void 0===(i=t.scale)?1:i),o=void 0===(o=t.height)?0:o,a=void 0===(a=t.rotate)?[Math.PI/2,0,0]:a,s=void 0===(s=t.properties)?{}:s,l=void 0===(l=t.AmbientLight)?{show:!0,color:16777215,intensity:.5}:l,u=void 0===(u=t.DirectionalLight)?[]:u,c=void 0===(c=t.PointLight)?[]:c;t=void 0!==(t=t.click)&&t,this.lngLat=e,this.url=r,this.scale=i,this.height=o,this.rotate=a,this.properties=s,this.AmbientLight=l,this.DirectionalLight=u,this.PointLight=c,this.click=t,this.modelAsMercatorCoordinate=mapboxgl.MercatorCoordinate.fromLngLat(e,o),this.modelTransform={translateX:this.modelAsMercatorCoordinate.x,translateY:this.modelAsMercatorCoordinate.y,translateZ:this.modelAsMercatorCoordinate.z,rotateX:a[0],rotateY:a[1],rotateZ:a[2],scale:i*this.modelAsMercatorCoordinate.meterInMercatorCoordinateUnits()}}var t=e.prototype;return t.onAdd=function(e,t){var r,n,i=this;this.map=e,e=this.map.getCanvas(),this.camera=new THREE.PerspectiveCamera(50,e.innerWidth/e.innerHeight,.1,1e4),this.scene=new THREE.Scene,this.AmbientLight&&this.AmbientLight.show&&(n=this.AmbientLight.color||16777215,r=this.AmbientLight.intensity||.5,n=new THREE.AmbientLight(n,r),this.scene.add(n)),this.DirectionalLight&&Array.isArray(this.DirectionalLight)&&this.DirectionalLight.forEach((function(e){var t=e.color||16777215,r=e.intensity||1;e=e.position||[0,0,0],(t=new THREE.DirectionalLight(t,r)).position.set(e[0],e[1],e[2]).normalize(),i.scene.add(t)})),this.PointLight&&Array.isArray(this.PointLight)&&this.PointLight.forEach((function(e){var t=e.color||16777215,r=e.intensity||1,n=e.distance||0,o=e.decay||2;e=e.position||[0,0,0],(t=new THREE.PointLight(t,r,n,o)).position.set(e[0],e[1],e[2]).normalize(),i.scene.add(t)})),(new THREE.GLTFLoader).load(this.url,(function(e){for(var t=0;t<e.scene.children.length;t++)e.scene.children[t].properties=i.properties,e.scene.children[t].lngLat=i.lngLat;i.scene.add(e.scene)})),this.renderer=new THREE.WebGLRenderer({canvas:e,context:t,antialias:!0}),this.renderer.autoClear=!1,this.click&&this.renderer.domElement.addEventListener("click",this.clickEvent)},t.render=function(e,t){var r=(new THREE.Matrix4).makeRotationAxis(new THREE.Vector3(1,0,0),this.modelTransform.rotateX),n=(new THREE.Matrix4).makeRotationAxis(new THREE.Vector3(0,1,0),this.modelTransform.rotateY),i=(new THREE.Matrix4).makeRotationAxis(new THREE.Vector3(0,0,1),this.modelTransform.rotateZ),o=(new THREE.Matrix4).fromArray(t);r=(new THREE.Matrix4).makeTranslation(this.modelTransform.translateX,this.modelTransform.translateY,this.modelTransform.translateZ).scale(new THREE.Vector3(this.modelTransform.scale,-this.modelTransform.scale,this.modelTransform.scale)).multiply(r).multiply(n).multiply(i),this.camera.projectionMatrix.elements=t,this.camera.projectionMatrix=o.multiply(r),this.renderer.state.reset(),this.renderer.render(this.scene,this.camera),this.map.triggerRepaint()},t.onRemove=function(){this.click&&this.renderer.domElement.removeEventListener("click",this.clickEvent),this.renderer&&(this.renderer.dispose(),this.renderer=null),this.scene&&(this.scene.clear(),this.scene=null)},e}(),N=function(){function e(e){this.map=e,this.sourceName=[],this.sourceType="geojson"}var t=e.prototype;return t.draw=function(e,t,r){if(e&&this.map)return"vector"===e.type?(this.sourceName=[t],this.sourceType="vector",this._clearSource(),this._addSourceLayer(t,e,r),this.sourceName):"FeatureCollection"===e.type||Array.isArray(e.features)?(this.sourceName=[t],this._clearSource(),this._addSourceLayer(t,e,r),r.lineConfig?[].concat(this.sourceName,[this.lineName]):this.sourceName):void 0},t.destroy=function(){this._clearSource()},t.visible=function(e){var t,r=this;"boolean"==typeof e&&null!=(t=this.sourceName)&&t.forEach((function(t){r.map.getLayer(t)&&r.map.setLayoutProperty(t,"visibility",e?"visible":"none")}))},t._addSourceLayer=function(e,t,r){"vector"===this.sourceType?this.map.addSource(e,o({},t,r.sourceConfig)):this.map.addSource(e,o({type:"geojson",data:t},r.sourceConfig)),(t=r.beforeId||null)&&!this.map.getLayer(t)&&(t=null),this.map.addLayer(o({id:e,type:"line",source:e},r.layerConfig),t),r.lineConfig&&(this.lineName=e+"-highlight",this.map.addLayer(o({id:this.lineName,type:"line",source:e},r.lineConfig)))},t._clearSource=function(){var e,t=this;null!=(e=this.sourceName)&&e.forEach((function(e){var r;(null==(r=t.map)?void 0:r.getSource(e))&&(t.map.getLayer(e)&&t.map.removeLayer(e),t.lineName&&t.map.getLayer(e+"-highlight")&&t.map.removeLayer(e+"-highlight"),t.map.removeSource(e))}))},e}(),S=function(){function e(e){this.map=e,this.sourceName=[],this.type="symbol",this.sourceType="geojson"}var t=e.prototype;return t.draw=function(e,t,r){if(e&&this.map){if("vector"===e.type)return this.sourceType="vector",this._addSourceLayer(t,e,r),this.sourceName=[t],this.sourceName;var n;if("FeatureCollection"===e.type||Array.isArray(e.features)){this.type=null!=(n=r.type)?n:"symbol";var i=r.sliceNum;if(!i||i<1e3)this.sourceName=[t],this._clearSource(),this._addSourceLayer(t,e,r);else{this._clearSource();for(var o=0,a=0;a<e.features.length;a+=i){var s={type:"FeatureCollection",features:[]},l=e.features.slice(a,i);s.features=[].concat(l),l=t+"-"+o,this.sourceName.push(l),this._addSourceLayer(l,s,r),o++}}return this.sourceName}}},t.destroy=function(){this._clearSource()},t.visible=function(e){var t,r=this;"boolean"==typeof e&&null!=(t=this.sourceName)&&t.forEach((function(t){r.map.getLayer(t)&&r.map.setLayoutProperty(t,"visibility",e?"visible":"none")}))},t._clearSource=function(){var e,t=this;null!=(e=this.sourceName)&&e.forEach((function(e){var r;(null==(r=t.map)?void 0:r.getSource(e))&&(t.map.getLayer(e)&&t.map.removeLayer(e),t.map.removeSource(e))}))},t._addSourceLayer=function(e,t,r){"vector"===this.sourceType?this.map.addSource(e,o({},t,r.sourceConfig)):this.map.addSource(e,o({type:"geojson",data:t},r.sourceConfig)),(t=r.beforeId||null)&&!this.map.getLayer(t)&&(t=null),this.map.addLayer(o({id:e,type:this.type,source:e},r.layerConfig),t)},e}(),T={centimeters:100*(a=6371008.8),centimetres:100*a,degrees:a/111325,feet:3.28084*a,inches:39.37*a,kilometers:a/1e3,kilometres:a/1e3,meters:a,metres:a,miles:a/1609.344,millimeters:1e3*a,millimetres:1e3*a,nauticalmiles:a/1852,radians:1,yards:1.0936*a};function I(e,t,r){var n={type:"Feature"};return 0!==(r=void 0===r?{}:r).id&&!r.id||(n.id=r.id),r.bbox&&(n.bbox=r.bbox),n.properties=t||{},n.geometry=e,n}function R(e,t,r){if(void 0===r&&(r={}),!e)throw new Error("coordinates is required");if(!Array.isArray(e))throw new Error("coordinates must be an Array");if(e.length<2)throw new Error("coordinates must be at least 2 numbers long");if(G(e[0])&&G(e[1]))return I({type:"Point",coordinates:e},t,r);throw new Error("coordinates must contain numbers")}function j(e,t,r){void 0===r&&(r={});for(var n=0,i=e;n<i.length;n++){var o=i[n];if(o.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var a=0;a<o[o.length-1].length;a++)if(o[o.length-1][a]!==o[0][a])throw new Error("First and last Position are not equivalent.")}return I({type:"Polygon",coordinates:e},t,r)}function O(e,t,r){if(void 0===r&&(r={}),e.length<2)throw new Error("coordinates must be an array of two or more positions");return I({type:"LineString",coordinates:e},t,r)}function B(e,t){var r={type:"FeatureCollection"};return(t=void 0===t?{}:t).id&&(r.id=t.id),t.bbox&&(r.bbox=t.bbox),r.features=e,r}function F(e){return e%(2*Math.PI)*180/Math.PI}function D(e){return e%360*Math.PI/180}function G(e){return!isNaN(e)&&null!==e&&!Array.isArray(e)}function U(e,t,r){if(null!==e)for(var n,i,o,a=0,s=e.type,l="FeatureCollection"===s,u="Feature"===s,c=l?e.features.length:1,h=0;h<c;h++)for(var p,f,d=(f=!!(p=l?e.features[h].geometry:u?e.geometry:e)&&"GeometryCollection"===p.type)?p.geometries.length:1,y=0;y<d;y++){var m=0,v=0,g=f?p.geometries[y]:p;if(null!==g){var _=g.coordinates,b=g.type,w=!r||"Polygon"!==b&&"MultiPolygon"!==b?0:1;switch(b){case null:break;case"Point":if(!1===t(_,a,h,m,v))return!1;a++,m++;break;case"LineString":case"MultiPoint":for(n=0;n<_.length;n++){if(!1===t(_[n],a,h,m,v))return!1;a++,"MultiPoint"===b&&m++}"LineString"===b&&m++;break;case"Polygon":case"MultiLineString":for(n=0;n<_.length;n++){for(i=0;i<_[n].length-w;i++){if(!1===t(_[n][i],a,h,m,v))return!1;a++}"MultiLineString"===b&&m++,"Polygon"===b&&v++}"Polygon"===b&&m++;break;case"MultiPolygon":for(n=0;n<_.length;n++){for(i=v=0;i<_[n].length;i++){for(o=0;o<_[n][i].length-w;o++){if(!1===t(_[n][i][o],a,h,m,v))return!1;a++}v++}m++}break;case"GeometryCollection":for(n=0;n<g.geometries.length;n++)if(!1===U(g.geometries[n],t,r))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}function z(e,t){for(var r,n,i,o,a,s,l,u,c,h=0,p="FeatureCollection"===e.type,f="Feature"===e.type,d=p?e.features.length:1,y=0;y<d;y++){for(a=p?e.features[y].geometry:f?e.geometry:e,l=p?e.features[y].properties:f?e.properties:{},u=p?e.features[y].bbox:f?e.bbox:void 0,c=p?e.features[y].id:f?e.id:void 0,o=(s=!!a&&"GeometryCollection"===a.type)?a.geometries.length:1,n=0;n<o;n++)if(null===(i=s?a.geometries[n]:a)){if(!1===t(null,h,l,u,c))return}else switch(i.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":if(!1===t(i,h,l,u,c))return;break;case"GeometryCollection":for(r=0;r<i.geometries.length;r++)if(!1===t(i.geometries[r],h,l,u,c))return;break;default:throw new Error("Unknown Geometry Type")}h++}}function H(e){var t=[1/0,1/0,-1/0,-1/0];return U(e,(function(e){t[0]>e[0]&&(t[0]=e[0]),t[1]>e[1]&&(t[1]=e[1]),t[2]<e[0]&&(t[2]=e[0]),t[3]<e[1]&&(t[3]=e[1])})),t}const q=H.default=H;function X(e,t){void 0===t&&(t={});var r=Number(e[0]),n=Number(e[1]),i=Number(e[2]),o=Number(e[3]);if(6===e.length)throw new Error("@turf/bbox-polygon does not support BBox with 6 positions");var a=[r,n];return j([[a,[i,n],[i,o],[r,o],a]],t.properties,{bbox:e,id:t.id})}const W=function(e){return X(q(e))};function J(e){if(!e)throw new Error("coord is required");if(!Array.isArray(e)){if("Feature"===e.type&&null!==e.geometry&&"Point"===e.geometry.type)return e.geometry.coordinates;if("Point"===e.type)return e.coordinates}if(Array.isArray(e)&&2<=e.length&&!Array.isArray(e[0])&&!Array.isArray(e[1]))return e;throw new Error("coord must be GeoJSON Point or an Array of numbers")}function Y(e,t,r,n){void 0===n&&(n={});var i=D((e=J(e))[0]),o=(e=D(e[1]),r=D(r),t=function(e,t){var r=T[t=void 0===t?"kilometers":t];if(r)return e/r;throw new Error(t+" units is invalid")}(t,n.units),Math.asin(Math.sin(e)*Math.cos(t)+Math.cos(e)*Math.sin(t)*Math.cos(r)));return R([F(i+Math.atan2(Math.sin(r)*Math.sin(t)*Math.cos(e),Math.cos(t)-Math.sin(e)*Math.sin(o))),F(o)],n.properties)}const V=function(e,t,r){for(var n=(r=void 0===r?{}:r).steps||64,i=r.properties||(!Array.isArray(e)&&"Feature"===e.type&&e.properties?e.properties:{}),o=[],a=0;a<n;a++)o.push(Y(e,t,-360*a/n,r).geometry.coordinates);return o.push(o[0]),j([o],i)};var Z=function(){function e(e){this.map=e,this.sourceName=[],this.lineName=""}var t=e.prototype;return t.draw=function(e,t,r){if(e){this.sourceName=[t];var n,i=null!=r?r:{},o=void 0===(n=i.radius)?0:n,a=void 0===(n=i.steps)?64:n,s=i.endRadius,l=[];if("object"==typeof e){if("FeatureCollection"!==e.type&&!Array.isArray(e.features))return;for(var u=e.features,c=0;c<u.length;c++){var h,p,f,d,y,m=u[c].geometry.coordinates;"number"==typeof m[0]&&"number"==typeof m[1]&&(m[0]<m[1]&&(h=[m[1],m[0]],m[0]=h[0],m[1]=h[1]),h=!1,p=0<(p=(h="string"==typeof o||h)?u[c].properties[o]:o)?p:0,f={steps:a,units:"kilometers",properties:u[c].properties},d=V(m,p,f),s?(y=!1,y=0<(y=(y="string"==typeof s||y)?u[c].properties[s]:s)?y:0,m=V(m,s,f),l.push(p===y?d:p<y?this._getRingJson(m.geometry.coordinates[0],d.geometry.coordinates[0],d.properties):this._getRingJson(d.geometry.coordinates[0],m.geometry.coordinates[0],d.properties))):l.push(d))}}return this._addSourceLayer(t,{type:"FeatureCollection",features:l},r),r.lineConfig?[].concat(this.sourceName,[this.lineName]):this.sourceName}},t._getRingJson=function(e,t,r){return{type:"Feature",geometry:{coordinates:[e,t],type:"Polygon"},properties:r}},t._addSourceLayer=function(e,t,r){this.lineName=e+"-line",r.lineConfig&&null!=(n=this.map)&&n.getLayer(this.lineName)&&this.map.removeLayer(this.lineName),null!=(n=this.map)&&n.getLayer(e)&&this.map.removeLayer(e),null!=(n=this.map)&&n.getSource(e)&&this.map.removeSource(e),this.map.addSource(e,o({type:"geojson",data:t},r.sourceConfig));var n=(null!=r?r:{}).beforeId;n&&!this.map.getLayer(n)&&(n=null),this.map.addLayer(o({id:e,type:"fill",source:e},r.layerConfig),n),r.lineConfig&&this.map.addLayer(o({id:this.lineName,type:"line",source:e},r.lineConfig),n)},t.destroy=function(){this._clearSource()},t.visible=function(e){var t,r=this;"boolean"==typeof e&&(null!=(t=this.sourceName)&&t.forEach((function(t){r.map.getLayer(t)&&r.map.setLayoutProperty(t,"visibility",e?"visible":"none")})),this.lineName)&&this.map.getLayer(this.lineName)&&this.map.setLayoutProperty(this.lineName,"visibility",e?"visible":"none")},t._clearSource=function(){var e,t=this;null!=(e=this.sourceName)&&e.forEach((function(e){t.map.getSource(e)&&(t.map.getLayer(e)&&t.map.removeLayer(e),t.lineName&&t.map.getLayer(e+"-line")&&t.map.removeLayer(e+"-line"),t.map.removeSource(e))}))},e}(),K=function(){function e(e,t){this.map=e,this.name=[],"string"==typeof t?this.name=[t]:Array.isArray(t)&&t.every((function(e){return"string"==typeof e}))&&(this.name=t),this.event=[]}var t=e.prototype;return t.add=function(e){var t,r=this;if(0===(null==(t=this.event)?void 0:t.length)&&e&&"object"==typeof e){var n,i=function(t){var n,i;r.event.push(t),0<(null==(i=r.name)?void 0:i.length)?null!=(i=r.name)&&i.forEach((function(n){function i(r){var n;"Map"===(null==r||null==(n=r.originalEvent)||null==(n=n.target)?void 0:n.ariaLabel)&&e[t](r)}var o;r[t]=i,null!=(o=r.map)&&o.on(t,n,i)})):(r[t]=i=function(r){var n;"Map"===(null==r||null==(n=r.originalEvent)||null==(n=n.target)?void 0:n.ariaLabel)&&e[t](r)},null!=(n=r.map)&&n.on(t,i))};for(n in e)i(n)}},t.destroy=function(e){var t,r=this;e&&Array.isArray(e)&&e.every((function(e){return"string"==typeof e}))?null!=(t=this.name)&&t.forEach((function(t){e.forEach((function(e){var n,i;r.event.includes(e)&&(i=r[e],null!=(n=r.map))&&n.off(e,t,i)}))})):0<(null==(t=this.name)?void 0:t.length)?null!=(t=this.name)&&t.forEach((function(e){r.event.forEach((function(t){var n,i=r[t];null!=(n=r.map)&&n.off(t,e,i)}))})):this.event.forEach((function(e){var t,n=r[e];null!=(t=r.map)&&t.off(e,n)}))},e}(),$=["id","type"],Q=["id","type","beforeId"],ee=function(){function e(e){this.map=e,this.sourceName=[]}var t=e.prototype;return t.draw=function(e,t){var r,n,a,s,l,c=this;return u(e)||"vector"===e.type?(r=(a=null!=(a=t.sourceConfig)?a:{}).id,n=void 0===(n=a.type)?"geojson":n,a=i(a,$),s=r,t=null!=(t=t.layerConfig)?t:{},l=[],Array.isArray(t)?l=t:"object"==typeof t&&l.push(t),l.forEach((function(e){var t;(e=e.id)&&null!=(t=c.map)&&t.getLayer(e)&&c.map.removeLayer(e)})),null!=(t=this.map)&&t.getSource(s)&&this.map.removeSource(s),"vector"===e.type?this.map.addSource(r,o({},a,e)):this.map.addSource(r,o({type:n,data:e},a)),l.forEach((function(e){var t=e.id,r=e.type,n=e.beforeId;e=i(e,Q),n&&!c.map.getLayer(n)&&(n=null),c.map.addLayer(o({id:t,type:r,source:s},e),n)})),this.sourceName=[s].concat(l.map((function(e){return e.id}))).filter(Boolean),this.sourceName=Array.from(new Set(this.sourceName)),this.sourceName):[]},t.destroy=function(){var e,t,r=this;0<(null==(t=this.sourceName)?void 0:t.length)&&(1===this.sourceName.length?this.map.getSource(this.sourceName[0])&&(this.map.removeLayer(this.sourceName[0]),this.map.removeSource(this.sourceName[0])):(e=(t=this.sourceName)[0],t=t.slice(1),this.map.getSource(e)&&(this.map.getLayer(e)&&this.map.removeLayer(e),t.forEach((function(e){r.map.removeLayer(e)})),this.map.removeSource(e))))},t.visible=function(e){var t,r=this;"boolean"==typeof e&&null!=(t=this.sourceName)&&t.forEach((function(t){r.map.getLayer(t)&&r.map.setLayoutProperty(t,"visibility",e?"visible":"none")}))},e}(),te=function(){function e(t,r,n){if((this instanceof e?this.constructor:void 0)!==e)throw new Error("MapLayer is a constructor and should be called with the new keyword");var i={layer:null,tooltip:null,popup:null};return r&&"object"==typeof r&&(i=o({},i,r)),this.name=t,this.layers=i,this.prop=null!=n?n:{},new Proxy(this,{deleteProperty:function(e,t){return(e!==this||"layers"!==t&&"name"!==t)&&(delete e[t],!0)},set:function(e,t,r){return(e!==this||"layers"!==t&&"name"!==t)&&(e[t]=r,!0)}})}var t=e.prototype;return t.addLayer=function(e){if(e&&"object"==typeof e)for(var t in e)this.layers[t]=e[t]},t.addProp=function(e){if(e&&"object"==typeof e)for(var t in e)this.prop[t]=e[t]},e}();function re(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var ne,ie,oe,ae,se=function(){function e(e,t){this.map=e,this.markers=[],this.options=t,this.properties=[]}var t=e.prototype;return t.draw=function(e,t){if(u(e))for(var r,n=null!=(r=this.options)?r:{},i=0,a=function(e,t){var r,n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){var r;if(e)return"string"==typeof e?re(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?re(e,t):void 0}(e)))return n&&(e=n),r=0,function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(e.features);!(c=a()).done;){var s,l,c=c.value;"Point"===c.geometry.type&&(s=n,t&&"function"==typeof t&&1===(null==(l=t({lngLat:c.geometry.coordinates,properties:c.properties,index:i}))?void 0:l.nodeType)&&(s=o({},s,{element:l})),l=new mapboxgl.Marker(s).setLngLat(c.geometry.coordinates).addTo(this.map),this.markers.push(l),this.properties.push(c.properties),i++)}},t.addEvent=function(e){var t=this;if(e&&"object"==typeof e)for(var r=0;r<this.markers.length;r++)!function(r){["dragstart","drag","dragend"].forEach((function(n){e[n]&&"function"==typeof e[n]&&t.markers[r].on(n,(function(i){e[n](o({},i,{properties:t.properties[r]}))}))}))}(r)},t.destroy=function(){for(var e=0;e<this.markers.length;e++)this.markers[e].remove();this.markers=[]},t.visible=function(e){var t;"boolean"==typeof e&&null!=(t=this.markers)&&t.forEach((function(t){t.getElement().style.display=e?"block":"none"}))},e}(),le=function(){function e(e,t,r){var n;r=null!=(n=r)?n:{},this.map=e,this.name=t,this.dash=Array.isArray(r.dash)?r.dash:[[0,4,3],[.5,4,2.5],[1,4,2],[1.5,4,1.5],[2,4,1],[2.5,4,.5],[3,4,0],[0,.5,3,3.5],[0,1,3,3],[0,1.5,3,2.5],[0,2,3,2],[0,2.5,3,1.5],[0,3,3,1],[0,3.5,3,.5]],this.step=null!=(n=r.step)?n:50,this.animateId=null}var t=e.prototype;return t.animate=function(){var e,t=this;this.name&&this.map.getLayer(this.name)&&function r(n){(n=parseInt(n/t.step%t.dash.length))!==e&&(t.map.setPaintProperty(t.name,"line-dasharray",t.dash[e]),e=n),t.animateId=requestAnimationFrame(r)}(e=0)},t.destroy=function(){this.animateId&&(cancelAnimationFrame(this.animateId),this.animateId=null)},e}(),ue=(a={},function(){function e(e,t){this.width=void 0,this.height=void 0,this.data=void 0;var r=this,n=e.width;if(e=e.height,t){if(t instanceof Uint8ClampedArray)t=new Uint8Array(t.buffer);else if(t.length!==n*e*4)throw new RangeError("mismatched image size")}else t=new Uint8Array(n*e*4);r.width=n,r.height=e,r.data=t}var t=e.prototype;return t.resize=function(t){var r,n,i;r=this,n=(t=new e(t)).width,i=t.height,n===r.width&&i===r.height||(ce(r,t,{x:0,y:0},{x:0,y:0},{width:Math.min(r.width,n),height:Math.min(r.height,i)},4),r.width=n,r.height=i,r.data=t.data)},t.replace=function(e,t){t?this.data.set(e):e instanceof Uint8ClampedArray?this.data=new Uint8Array(e.buffer):this.data=e},t.clone=function(){return new e({width:this.width,height:this.height},new Uint8Array(this.data))},e.copy=function(e,t,r,n,i){ce(e,t,r,n,i,4)},e}());function ce(e,t,r,n,i,o){if(0!==i.width&&0!==i.height){if(i.width>e.width||i.height>e.height||r.x>e.width-i.width||r.y>e.height-i.height)throw new RangeError("out of range source coordinates for image copy");if(i.width>t.width||i.height>t.height||n.x>t.width-i.width||n.y>t.height-i.height)throw new RangeError("out of range destination coordinates for image copy");var a=e.data,s=t.data;if(a===s)throw new RangeError("image is the same");for(var l=0;l<i.height;l++)for(var u=((r.y+l)*e.width+r.x)*o,c=((n.y+l)*t.width+n.x)*o,h=0;h<i.width*o;h++)s[c+h]=a[u+h]}}function he(){return(he=r(s().mark((function e(t,r){var n;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return void 0===r&&(r=0),e.next=3,new Promise((function(e){var n=new Image;n.src=t,n.crossOrigin="Anonymous",n.onload=function(){var t=n.width,i=n.height,o=(ne=ne||window.document.createElement("canvas")).getContext("2d",{willReadFrequently:!0});if(!o)throw new Error("failed to create canvas 2d context");(t>ne.width||i>ne.height)&&(ne.width=t,ne.height=i),o.clearRect(-r,-r,t+2*r,i+2*r),o.drawImage(n,0,0,t,i),e(o.getImageData(-r,-r,t+2*r,i+2*r))}}));case 3:return n=e.sent,e.abrupt("return",n);case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function pe(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}ie=ue,void 0===ae&&(ae={}),(oe="RGBAImage")?a[oe]?console.error(oe+" is already registered."):(Object.defineProperty(ie,"_classRegistryKey",{value:oe,writeable:!1}),a[oe]={klass:ie,omit:ae.omit||[]}):console.error("Can't register a class without a name.");var fe=function(){function e(e,t){this.map=e,this.options=null!=t?t:{key:"id"},this.markers={},this.mapEvent=null}var t=e.prototype;return t.draw=function(e,t){var r=this,n={};this.mapEvent=function(){if(r.map.getSource(e)&&r.map.isSourceLoaded(e)){for(var i,a={},s=function(e,t){var r,n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){var r;if(e)return"string"==typeof e?pe(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?pe(e,t):void 0}(e)))return n&&(e=n),r=0,function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(r.map.querySourceFeatures(e));!(h=s()).done;){var l,u,c,h,p=(h=h.value).geometry.coordinates;(h=h.properties).cluster||(l=h[r.options.key],(c=r.markers[l])?(u=c.getLngLat().toArray())[0]===p[0]&&u[1]===p[1]||c.setLngLat(p):(u=null,u="function"==typeof t?t({properties:h,lngLat:p}):document.createElement("div"),c=r.markers[l]=new mapboxgl.Marker(o({},r.options,{element:u})).setLngLat(p)),a[l]=c,n[l])||c.addTo(r.map)}for(i in n)a[i]||n[i].remove();n=a}},this.map.on("render",this.mapEvent)},t.destroy=function(){for(var e in this.markers)null!=(e=this.markers[e])&&e.remove();this.markers={},this.mapEvent&&this.map.off("render",this.mapEvent)},t.visible=function(e){if("boolean"==typeof e)for(var t in this.markers)this.markers[t]&&this.markers.hasOwnProperty(t)&&(this.markers[t].getElement().style.display=e?"block":"none")},e}(),de=["once"],ye=function(){function e(e,t,r){this.map=e,this.options=null!=r?r:{},this.sourceName=t,r=void 0===(t=(e=(this.mapEvent=null)!=r?r:{}).once)||t,t=i(e,de),this.once=r,this.other=t}var t=e.prototype;return t.open=function(e){var t=this;this.sourceName&&(this.mapEvent=function(){var r;t.map.getSource(t.sourceName)&&t.map.isSourceLoaded(t.sourceName)&&"function"==typeof e&&(r=t.map.querySourceFeatures(t.sourceName,t.other),e(r),t.once)&&t.destroy()},this.map.on("render",this.mapEvent))},t.destroy=function(){var e;null!=(e=this.map)&&e.off("render",this.mapEvent),this.mapEvent=null},e}(),me=Math.PI,ve=6378245,ge=.006693421622965943;function _e(e,t){var r=2*(e=+e)-100+3*(t=+t)+.2*t*t+.1*e*t+.2*Math.sqrt(Math.abs(e));return(r+=2*(20*Math.sin(6*e*me)+20*Math.sin(2*e*me))/3)+2*(20*Math.sin(t*me)+40*Math.sin(t/3*me))/3+2*(160*Math.sin(t/12*me)+320*Math.sin(t*me/30))/3}function be(e,t){return t=300+(e=+e)+2*(t=+t)+.1*e*e+.1*e*t+.1*Math.sqrt(Math.abs(e)),(t+=2*(20*Math.sin(6*e*me)+20*Math.sin(2*e*me))/3)+2*(20*Math.sin(e*me)+40*Math.sin(e/3*me))/3+2*(150*Math.sin(e/12*me)+300*Math.sin(e/30*me))/3}function we(e,t){return t=+t,!(73.66<(e=+e)&&e<135.05&&3.86<t&&t<53.55)}function xe(e,t){var r,n,i,o,a;return we(e,t)?[e,t]:(o=_e(e-105,t-35),a=be(e-105,t-35),r=t/180*me,n=Math.sin(r),n=1-ge*n*n,i=Math.sqrt(n),o=180*o/(ve*(1-ge)/(n*i)*me),[2*e-(e+(a=180*a/(ve/i*Math.cos(r)*me))),2*t-(t+o)])}function Le(e,t,r){if(void 0===r&&(r={}),!e)throw new Error("point is required");if(!t)throw new Error("polygon is required");var n=J(e),i=(e="Feature"===(e=t).type?e.geometry:e).type,o=(t=t.bbox,e.coordinates);if(t&&0==(e=n,t[0]<=e[0]&&t[1]<=e[1]&&t[2]>=e[0]&&t[3]>=e[1]))return!1;"Polygon"===i&&(o=[o]);for(var a=!1,s=0;s<o.length&&!a;s++)if(Pe(n,o[s][0],r.ignoreBoundary)){for(var l=!1,u=1;u<o[s].length&&!l;)Pe(n,o[s][u],!r.ignoreBoundary)&&(l=!0),u++;l||(a=!0)}return a}function Pe(e,t,r){for(var n=!1,i=0,o=(t=t[0][0]===t[t.length-1][0]&&t[0][1]===t[t.length-1][1]?t.slice(0,t.length-1):t).length-1;i<t.length;o=i++){var a=t[i][0],s=t[i][1],l=t[o][0],u=t[o][1];if(e[1]*(a-l)+s*(l-e[0])+u*(e[0]-a)==0&&(a-e[0])*(l-e[0])<=0&&(s-e[1])*(u-e[1])<=0)return!r;s>e[1]!=u>e[1]&&e[0]<(l-a)*(e[1]-s)/(u-s)+a&&(n=!n)}return n}function Me(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Ee=function(){function e(e,t){this.map=e,this.options=null!=t?t:{}}var t=e.prototype;return t.draw=function(e,t,r){var n;e&&t&&u(e)&&r&&(this.id=r,n=W(e).bbox,this.destroy(),this.map.addLayer(function(e,t,r){function n(e){if("FeatureCollection"===d.type){for(var t=0;t<d.features.length;t++)if(Le(e,d.features[t]))return!0;return!1}if("Feature"===d.type)return Le(e,d.geometry)}var i,o=r.bbox,a=r.isGCJ,s=r.replaceUrl,l=null!=(i=r.isJudgement)&&i,u=r.judgementBox,c=r.judgementPoint,h=null!=(i=r.maxZoom)?i:18,p=null!=(i=r.minZoom)?i:0,f=null!=(i=r.expand)?i:0,d=null!=(i=r.json)?i:{},y=document.createElement("canvas");return{id:e,type:"custom",onAdd:function(e,t){var r=this,n=(this.map=e,this.tileCache={},this.gridCache={},this.showTiles=[],e=t.createShader(t.VERTEX_SHADER),t.shaderSource(e,"\nuniform mat4 u_matrix;\nattribute vec3 a_pos;\nattribute vec2 a_uv;\nvarying vec2 v_uv;\nvoid main() {\n v_uv = a_uv;\n gl_Position = u_matrix * vec4(a_pos, 1.0);\n}"),t.compileShader(e),t.createShader(t.FRAGMENT_SHADER));t.shaderSource(n,"\nprecision mediump float;\nvarying vec2 v_uv;\nuniform sampler2D u_sampler;\nvoid main() {\n gl_FragColor = texture2D(u_sampler, v_uv);\n}"),t.compileShader(n),this.program=t.createProgram(),t.attachShader(this.program,e),t.attachShader(this.program,n),t.linkProgram(this.program),this.map.on("move",(function(e){r.updateLayer(t)})),this.updateLayer(t)},updateLayer:function(e){var t=this;if(!(this.map.getZoom()<p||this.map.getZoom()>h)){for(var r=parseInt(this.map.getZoom()+1.4),n=[(n=this.map.getBounds().toArray())[0][0],n[0][1],n[1][0],n[1][1]],i=Math.min(n[2],o[2]),a=Math.min(n[3],o[3]),s=Math.max(n[0],o[0]),l=(n=Math.max(n[1],o[1]),s=this.map.getTileByPosition([s,n],r),n=this.map.getTileByPosition([i,a],r),i=s[0]-f,n[0]+f),u=n[1]-f,c=s[1]+f,d=[],y=i;y<=l;y++)for(var m=u;m<=c;m++){var v={x:y,y:m,z:r};d.push(v),this.addGridCache(v,0,0),y===l&&this.addGridCache(v,1,0),m===c&&this.addGridCache(v,0,1),y===l&&m===c&&this.addGridCache(v,1,1)}a=this.map.getCenter();var g=this.map.getTileByPosition([a.lng,a.lat],r);d.sort((function(e,r){return t.tileDistance(e,g)-t.tileDistance(r,g)})),this.showTiles=[];for(var _=0,b=d;_<b.length;_++){var w,x=b[_];this.tileCache[this.createTileKey(x)]?this.showTiles.push(this.tileCache[this.createTileKey(x)]):(w=this.createTile(e,x),this.showTiles.push(w),this.tileCache[this.createTileKey(x)]=w)}}},tileDistance:function(e,t){return Math.sqrt(Math.pow(e.x-t[0],2)+Math.pow(e.y-t[1],2))},addGridCache:function(e,t,r){var n,i=this.createTileKey(e.x+t,e.y+r,e.z);this.gridCache[i]||(r=(t=this.map.getPositionByTile([e.x+t,e.y+r,e.z]))[0],e=t[1],n=t[2],t=t[3],void 0!==e&&void 0!==t&&void 0!==n&&void 0!==r&&(a?(e=xe(r,t),this.gridCache[i]={lng:e[0],lat:e[1]}):this.gridCache[i]={lng:r,lat:t}))},createTileKey:function(e,t,r){return e instanceof Object?e.z+"/"+e.x+"/"+e.y:r+"/"+e+"/"+t},createTile:function(e,r){var i,o,a,u,h,p,f,d,m=this,v=s&&"function"==typeof s?s(t,r):t.replace("{z}",r.z).replace("{x}",r.x).replace("{y}",r.y),g={xyz:r},_=this.gridCache[this.createTileKey(r)],b=this.gridCache[this.createTileKey(r.x+1,r.y,r.z)],w=this.gridCache[this.createTileKey(r.x,r.y+1,r.z)];return r=this.gridCache[this.createTileKey(r.x+1,r.y+1,r.z)],w&&b&&w&&r&&(w=mapboxgl.MercatorCoordinate.fromLngLat(w),i=mapboxgl.MercatorCoordinate.fromLngLat(r),b=mapboxgl.MercatorCoordinate.fromLngLat(b),o=mapboxgl.MercatorCoordinate.fromLngLat(_),a=_.lat,u=_.lng,_=r.lat,r=r.lng,h=(r-u)/256,p=(a-_)/256,f=this.getAllIn(u,_,r,a),_=new Float32Array([w.x,w.y,w.z,0,0,i.x,i.y,i.z,1,0,b.x,b.y,b.z,1,1,w.x,w.y,w.z,0,0,b.x,b.y,b.z,1,1,o.x,o.y,o.z,0,1]),g.aPos=e.getAttribLocation(this.program,"a_pos"),g.aUv=e.getAttribLocation(this.program,"a_uv"),g.uSamplerLoc=e.getUniformLocation(this.program,"u_sampler"),g.texture=e.createTexture(),(d=new Image).src=v,d.crossOrigin="anonymous",d.onload=function(){y.width=d.width,y.height=d.height;var t=y.getContext("2d");if(t.drawImage(d,0,0),l&&!f){for(var r=t.getImageData(0,0,y.width,y.height),i=r.data.length,o=0;o<i;o+=4){var s=(v=Math.floor(o/4))%256,v=Math.floor(v/256),_=n([s=u+s*h,v=a-v*p]);c&&"function"==typeof c&&(_=null==(s=c(s,v))||s),r.data[o+3]=_?255:0}t.putImageData(r,0,0)}e.bindTexture(e.TEXTURE_2D,g.texture),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,!0),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,y),g.isLoad=!0,m.map.triggerRepaint()},g.buffer=e.createBuffer(),e.bindBuffer(e.ARRAY_BUFFER,g.buffer),e.bufferData(e.ARRAY_BUFFER,_,e.STATIC_DRAW)),g},getAllIn:function(e,t,r,i){var o;return u&&"function"==typeof u?null==(o=u(e,t,r,i))||o:[[e,i],[e,t],[r,t],[r,i],[(e+r)/2,i],[r,(t+i)/2],[(e+r)/2,t],[e,(t+i)/2],[(e+r)/2,(t+i)/2]].every(n)},render:function(e,t){e.useProgram(this.program),e.uniformMatrix4fv(e.getUniformLocation(this.program,"u_matrix"),!1,t);for(var r=function(e,t){var r,n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){var r;if(e)return"string"==typeof e?Me(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Me(e,t):void 0}(e)))return n&&(e=n),r=0,function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(this.showTiles);!(n=r()).done;){var n=n.value;n.isLoad&&(e.bindTexture(e.TEXTURE_2D,n.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_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.bindBuffer(e.ARRAY_BUFFER,n.buffer),e.enableVertexAttribArray(n.aPos),e.enableVertexAttribArray(n.aUv),e.vertexAttribPointer(n.aPos,3,e.FLOAT,!1,20,0),e.vertexAttribPointer(n.aUv,2,e.FLOAT,!1,20,12),e.enable(e.BLEND),e.blendFunc(e.SRC_ALPHA,e.ONE_MINUS_SRC_ALPHA),e.drawArrays(e.TRIANGLES,0,6))}}}}(r,t,o({},this.options,{bbox:n,isGCJ:null!=(r=this.options.isGCJ)&&r,json:e}))))},t.destroy=function(){this.map.getLayer(this.id)&&this.map.removeLayer(this.id),this.map.getSource(this.id)&&this.map.removeSource(this.id)},e}();function ke(e){return(ke="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ce(e){return e=function(e,t){if("object"!==ke(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0===r)return String(e);if("object"!==ke(r=r.call(e,"string")))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}(e),"symbol"===ke(e)?e:String(e)}function Ae(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Ce(n.key),n)}}function Ne(e,t,r){t&&Ae(e.prototype,t),r&&Ae(e,r),Object.defineProperty(e,"prototype",{writable:!1})}var Se=function(){function e(e,t){this.map=e,this._contextMenu=null,this._moveMenu=null,this._context=null,t=(e=(this._position=null)!=t?t:{}).move,e=void 0===(e=e.className)?"mapMenu":e,this._move=void 0!==t&&t,this._className=e}var t=e.prototype;return t.init=function(e,t){var r,n=this;this.map&&!this._context&&((r=document.createElement("div")).className=this._className,r.style.display="none",r.style.position="absolute",this.map.getCanvas().offsetParent.appendChild(r),e instanceof Element?r.appendChild(e):"string"==typeof e&&(r.innerHTML=e),this._context=r,this._contextMenu=function(e){var r;n._position=e.lngLat,t&&"function"==typeof t?(r=n.map.queryRenderedFeatures(e.point),"boolean"==typeof(r=void 0===(r=(null!=(r=t(o({},e,{features:r})))?r:{}).show)||r)&&(n.visible(r),n.updateXY(e.point))):(n.visible(!0),n.updateXY(e.point))},this.map.on("contextmenu",this._contextMenu),this._move)&&(this._moveMenu=function(e){var t;n._context&&"none"!==n._context.style.display&&n._position&&(t=n.map.project([n._position.lng,n._position.lat]),n.updateXY(t))},this.map.on("move",this._moveMenu),window.addEventListener("resize",this._moveMenu))},t.visible=function(e){this._context&&(this._context.style.display=e?"block":"none")},t.updateXY=function(e){var t,r,n,i,o;this._context&&e&&(t=isNaN(Number(e.x))?0:Number(e.x),e=isNaN(Number(e.y))?0:Number(e.y),this._move||(r=(n=this._context).offsetWidth,n=n.offsetHeight,(o=(i=this.map.getCanvas()).offsetWidth)<t+r&&(t=o-r),(o=i.offsetHeight)<e+n&&(e=o-n)),this._context.style.top=e+"px",this._context.style.left=t+"px")},t.destroy=function(){this.map&&(this.map.off("contextmenu",this._contextMenu),this._contextMenu=null,this._context&&(this._context.remove(),this._context=null),this._move)&&(this.map.off("move",this._moveMenu),window.removeEventListener("resize",this._moveMenu),this._moveMenu=null)},Ne(e,[{key:"show",get:function(){var e;return null!=(e=this._context&&"none"!==this._context.style.display)&&e}}]),e}();const Te=function(e,t,r){void 0===r&&(r={}),e=J(e);var n=D((t=J(t))[1]-e[1]),i=D(t[0]-e[0]);return e=D(e[1]),t=D(t[1]),n=Math.pow(Math.sin(n/2),2)+Math.pow(Math.sin(i/2),2)*Math.cos(e)*Math.cos(t),function(e,t){var r=T[t=void 0===t?"kilometers":t];if(r)return e*r;throw new Error(t+" units is invalid")}(2*Math.atan2(Math.sqrt(n),Math.sqrt(1-n)),r.units)};function Ie(e,t){return void 0===t&&(t={}),function(e,t,r){var n,i=r,o=!1;return n=function(e,n,a,s,l){i=!1===o&&void 0===r?e:t(i,e,n,a,s,l),o=!0},function(e,t){z(e,(function(e,r,n,i,o){var a,s=null===e?null:e.type;switch(s){case null:case"Point":case"LineString":case"Polygon":return!1!==t(I(e,n,{bbox:i,id:o}),r,0)&&void 0}switch(s){case"MultiPoint":a="Point";break;case"MultiLineString":a="LineString";break;case"MultiPolygon":a="Polygon"}for(var l=0;l<e.coordinates.length;l++){var u=e.coordinates[l];if(!1===t(I({type:a,coordinates:u},n),r,l))return!1}}))}(e,(function(e,t,r){var i=0;if(e.geometry){var o,a,s,l,u=e.geometry.type;if("Point"!==u&&"MultiPoint"!==u)return l=s=a=0,!1!==U(e,(function(u,c,h,p,f){if(void 0===o||a<t||s<p||l<f)o=u,a=t,s=p,l=f,i=0;else{if(p=O([o,u],e.properties),!1===n(p,t,r,f,i))return!1;i++,o=u}}))&&void 0}})),i}(e,(function(e,r){return r=r.geometry.coordinates,e+Te(r[0],r[1],t)}),0)}function Re(e,t,r){var n,i;return!0===(r=void 0===r?{}:r).final?(Re(t,e)+180)%360:(r=J(e),e=J(t),t=D(r[0]),n=D(e[0]),r=D(r[1]),e=D(e[1]),i=Math.sin(n-t)*Math.cos(e),r=Math.cos(r)*Math.sin(e)-Math.sin(r)*Math.cos(e)*Math.cos(n-t),F(Math.atan2(i,r)))}const je=function(e,t){return Y(e,Te(e,t)/2,Re(e,t))};var Oe=6378137;function Be(e){var t=0;if(e&&0<e.length){t+=Math.abs(Fe(e[0]));for(var r=1;r<e.length;r++)t-=Math.abs(Fe(e[r]))}return t}function Fe(e){var t,r,n,i,o,a,s=0,l=e.length;if(2<l){for(a=0;a<l;a++)o=a===l-2?(n=l-2,i=l-1,0):a===l-1?(n=l-1,i=0,1):(i=(n=a)+1,a+2),t=e[n],r=e[i],s+=(De(e[o][0])-De(t[0]))*Math.sin(De(r[1]));s=s*Oe*Oe/2}return s}function De(e){return e*Math.PI/180}const Ge=function(e,t){void 0===t&&(t={});var r=0,n=0,i=0;return U(e,(function(e){r+=e[0],n+=e[1],i++}),!0),R([r/i,n/i],t.properties)};function Ue(e){return(e%=360)<0&&(e+=360),e}function ze(e){return(e%=360)<0&&(e+=360),e}const He=function(e,t,r,n,i){if(!(s=i=i||{})||s.constructor!==Object)throw new Error("options is invalid");var o,a,s=i.properties;if(!e)throw new Error("center is required");if(null==r)throw new Error("bearing1 is required");if(null==n)throw new Error("bearing2 is required");if(!t)throw new Error("radius is required");if("object"!=typeof i)throw new Error("options must be an object");return ze(r)===ze(n)?V(e,t,i):(o=function(e){if(Array.isArray(e))return e;if("Feature"===e.type){if(null!==e.geometry)return e.geometry.coordinates}else if(e.coordinates)return e.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}(e),e=function(e,t,r,n,i){var o=(i=void 0===i?{}:i).steps||64,a=(r=Ue(r),n=Ue(n),Array.isArray(e)||"Feature"!==e.type?{}:e.properties);if(r===n)return O(V(e,t,i).geometry.coordinates[0],a);for(var s=r,l=r<n?n:n+360,u=s,c=[],h=0;u<l;)c.push(Y(e,t,u,i).geometry.coordinates),u=s+360*++h/o;return l<u&&c.push(Y(e,t,l,i).geometry.coordinates),O(c,a)}(e,t,r,n,i),a=[[o]],U(e,(function(e){a[0].push(e)})),a[0].push(o),j(a,s))};var qe="zh_measure_",Xe=function(){function e(e,t,r){var n=this,i=(this._click=function(e){var t,r=e.originalEvent.target.ariaLabel;n.isOpen&&"measure"!==r&&(n.isDraw||(n.isDraw=!0,n.positions.push(n.currentPosition),n.texts.push(n.currentText)),t=e.lngLat.toArray(),r=function(){n.currentPosition.push(t),n._drawPoint(),n._drawLine(),n._measureDistance(t)},0<n.currentPosition.length?"line"===n.type||"polygon"===n.type?(e=n.currentPosition[n.currentPosition.length-1],t[0]!==e[0]||t[1]!==e[1]?r():"polygon"===n.type?2<n.currentPosition.length?(n._createTextRemove(n.index),e=[].concat(n.currentPosition,[n.currentPosition[0]]),n._updateLine(e,n.index),e=Ge(j([e])),n._measureArea(e.geometry.coordinates),n._callback()):1===n.currentPosition.length&&(n._removeMarker(n.index),n._removePoint(n.index),n._removeLine(n.index),n._callback()):(n._createTextRemove(n.index),1===n.currentPosition.length&&(n._removeMarker(n.index),n._removePoint(n.index),n._removeLine(n.index)),n._callback())):"sector"===n.type&&(e=n.currentPosition[n.currentPosition.length-1],t[0]===e[0]&&t[1]===e[1]||1!==n.currentPosition.length||r()):r())},this._move=function(e){n.isOpen&&(e=e.lngLat.toArray(),n.isDraw&&0<n.currentPosition.length&&("line"===n.type?n._drawMoveLine(e):"circle"===n.type?(n._drawCircle(e),n._drawMoveLine(e)):"polygon"===n.type?(1<n.currentPosition.length&&n._drawPolygon(e),n._drawMoveLine(e)):"rect"===n.type?(n._drawRect(e),n._drawMoveLine(e)):"sector"===n.type&&(1<n.currentPosition.length?n._drawSector(e):n._drawMoveLine(e))),n._drawMovePoint(e))},this._dblclick=function(e){if(n.isOpen&&n.isDraw&&("circle"===n.type&&(t=e.lngLat.toArray(),!(r=n.currentPosition[0])||r[0]===t[0]&&r[1]===t[1]?(n._removeMarker(n.index),n._removePoint(n.index),n._removeLine(n.index),n._removeCircle(n.index)):(n.currentPosition.push(t),n._drawPoint(),n._drawCircle(t,!1),n._drawLine(),r=je(R(t),R(n.currentPosition[0])),n._measureDistance(t),n._measureArea(r.geometry.coordinates),n._createTextRemove(n.index),n._callback())),!("polygon"===n.type&&0<n.currentPosition.length&&n.currentPosition.length<3))){if("rect"===n.type&&(t=e.lngLat.toArray(),!(r=n.currentPosition[0])||r[0]===t[0]&&r[1]===t[1]?(n._removeMarker(n.index),n._removePoint(n.index),n._removeLine(n.index),n._removeRect(n.index)):(n.currentPosition.push(t),n._drawPoint(),n._drawRect(t,!1),r=je(R(t),R(n.currentPosition[0])),n._measureDistance(t),n._measureArea(r.geometry.coordinates),n._createTextRemove(n.index),n._callback())),"sector"===n.type){var t=e.lngLat.toArray(),r=n.currentPosition[n.currentPosition.length-1];if(2!==n.currentPosition.length||t[0]===r[0]&&t[1]===r[1]){if(1!==n.currentPosition.length)return;n._removeMarker(n.index),n._removePoint(n.index),n._removeLine(n.index),n._removeSector(n.index)}else n._drawSector(t,!1),e=Ge(n.map.getSource(n.moveSectorName)._data),n._measureArea(e.geometry.coordinates),n._createTextRemove(n.index),n._callback()}null!=(r=n.moveLineLayers[n.index])&&r.destroy(),n.moveLineLayers.splice(n.index,1),n._removeMoveMarker(),n.isDraw=!1,n.currentPosition=[],n.currentText=[],n.index++}},this.map=e,e=null!=(e=(t=null!=(e=t)?e:{}).point)?e:{},null!=(i=t.pointMove)?i:{}),o=null!=(o=t.fixed)?o:[2,2],a=(this.calcAll=null==(l=t.calcAll)||l,"number"==typeof o?this.fixed=[o,o]:Array.isArray(o)&&o.every((function(e){return"number"==typeof e}))?this.fixed=o:this.fixed=[2,2],this.dash=null==(l=t.dash)||l,this.type=null!=(o=t.type)?o:"line",["line","circle","polygon","rect","sector"].includes(this.type)||(this.type="line"),this.units={line:["km","m"],circle:["km²","m²"],polygon:["km²","m²"],rect:["km²","m²"],sector:["km²","m²"]},t.units);if(a)for(var s in this.units)a[s]&&Array.isArray(a[s])&&a[s].all((function(e){return"string"==typeof e}))&&(this.units[s][0]=a[s][0],this.units[s][1]=a[s][1]);this.className=null!=(l=t.className)?l:"",this.pointMoveProps={color:null!=(o=i.color)?o:"#ffffff",radius:null!=(l=i.radius)?l:10,opacity:null!=(o=i.opacity)?o:.01,strokeWidth:null!=(l=i.strokeWidth)?l:2,strokeColor:null!=(o=i.strokeColor)?o:"#ffffff",strokeOpacity:null!=(l=i.strokeOpacity)?l:.01},this.pointProps={color:null!=(o=e.color)?o:"rgb(255,255,255)",radius:null!=(i=e.radius)?i:4,strokeWidth:null!=(l=e.strokeWidth)?l:2,strokeColor:null!=(o=e.strokeColor)?o:"#00ccff"};var l=null!=(i=t.line)?i:{};this.lineProps={color:null!=(e=l.color)?e:"#00ccff",width:null!=(o=l.width)?o:2,dasharray:null!=(i=l.dasharray)?i:[5,5]},o=null!=(e=t.fill)?e:{},this.fillProps={color:null!=(l=o.color)?l:"rgba(0,230,255,0.1)"},this._custom=r,this.isOpen=!1,this.moveMarker=null,this._init()}var t=e.prototype;return t._init=function(){var e;this.positions=[],this.currentPosition=[],this.index=null!=(e=null==(e=this.map[this._custom])||null==(e=e.measure)?void 0:e[this.type])?e:0,this.isDraw=!1,this.pointLayers=[],this.movepointLayers=[],this.lineLayers=[],this.moveLineLayers=[],this.moveCircleLayers=[],this.movePolygonLayers=[],this.moveRectLayers=[],this.moveSectorLayers=[],this.texts=[],this.currentText=[]},t.draw=function(e){e&&"function"==typeof e&&(this.callback=e),this.isOpen||(this.isOpen=!0,this.map.on("click",this._click),this.map.on("mousemove",this._move),this.map.on("dblclick",this._dblclick))},t._callback=function(){this.callback&&"function"==typeof this.callback&&this.callback()},t._drawPoint=function(){var e,t=this,r=B(this.currentPosition.map((function(e,r){return R(e,{pointIndex:r,lineIndex:t.index})})));this.pointLayer?this.map.getSource(this.pointName).setData(r):((e=this.map.MapCustom()).draw(r,this.pointName,{layerConfig:{type:"circle",paint:{"circle-color":this.pointProps.color,"circle-radius":this.pointProps.radius,"circle-stroke-width":this.pointProps.strokeWidth,"circle-stroke-color":this.pointProps.strokeColor}}}),this.pointLayers.push(e))},t._drawMovePoint=function(e){var t;e={type:"FeatureCollection",features:[{type:"Feature",geometry:{type:"Point",coordinates:e},properties:{pointIndex:0,lineIndex:this.index}}]},this.movePointLayer?this.map.getSource(this.movePointName).setData(e):((t=this.map.MapCustom()).draw(e,this.movePointName,{layerConfig:{type:"circle",paint:{"circle-opacity":this.pointMoveProps.opacity,"circle-color":this.pointMoveProps.color,"circle-radius":this.pointMoveProps.radius,"circle-stroke-width":this.pointMoveProps.strokeWidth,"circle-stroke-color":this.pointMoveProps.strokeColor,"circle-stroke-opacity":this.pointMoveProps.strokeOpacity}}}),this.movepointLayers.push(t))},t._drawLine=function(){var e,t=B([O(1<this.currentPosition.length?this.currentPosition:[this.currentPosition[0],this.currentPosition[0]],{lineIndex:this.index})]);this.lineLayer?(this.map.getSource(this.lineName).setData(t),this.map.moveLayer(this.lineName,this.pointName)):((e=this.map.MapLine()).draw(t,this.lineName,{layerConfig:{paint:{"line-color":this.lineProps.color,"line-width":this.lineProps.width}},beforeId:this.pointName}),this.lineLayers.push(e))},t._drawMoveLine=function(e){var t=B([O([this.currentPosition[this.currentPosition.length-1],e],{lineIndex:this.index})]),r=("polygon"===this.type&&1<this.currentPosition.length&&(t=B([O([this.currentPosition[0],e,this.currentPosition[this.currentPosition.length-1]],{lineIndex:this.index})])),this.moveLineLayer?this.map.getSource(this.moveLineName).setData(t):((r=this.map.MapLine()).draw(t,this.moveLineName,{layerConfig:{paint:{"line-color":this.lineProps.color,"line-width":this.lineProps.width,"line-dasharray":this.dash?this.lineProps.dasharray:[]}},beforeId:this.pointName}),this.moveLineLayers.push(r)),B([O([].concat(this.currentPosition,[e]))]));this._drawMoveMarker(this.calcAll?r:t,e)},t._drawMoveMarker=function(e,t){e=this._calcLength(e),this.moveMarker?(this.moveMarker.getElement().children[0].innerHTML=e,this.moveMarker.setLngLat(t)):(this.moveMarker=this._createMoveText(e),this.moveMarker.setLngLat(t).addTo(this.map))},t._removeMoveMarker=function(){this.moveMarker&&(this.moveMarker.remove(),this.moveMarker=null)},t._drawCircle=function(e,t){void 0===t&&(t=!0);var r,n=this.currentPosition[0],i=B([R(n,{circleIndex:this.index})]);e=Ie(B([O([n,e],{circleIndex:this.index})]),{units:"kilometers"}),this.moveCircleLayer?(r={steps:64,units:"kilometers",properties:{circleIndex:this.index}},n=B([V(n,e,r)]),this.map.getSource(this.moveCircleName).setData(n),t||this.map.setPaintProperty(this.moveCircleLayer.lineName,"line-dasharray",[])):((r=this.map.MapCircle()).draw(i,this.moveCircleName,{endRadius:e,layerConfig:{paint:{"fill-color":this.fillProps.color}},lineConfig:{paint:{"line-color":this.lineProps.color,"line-width":this.lineProps.width,"line-dasharray":this.dash?this.lineProps.dasharray:[]}},beforeId:this.pointName}),this.moveCircleLayers.push(r))},t._drawPolygon=function(e){var t;e=B([j([[].concat(this.currentPosition,[e,this.currentPosition[0]])],{polygonIndex:this.index})]),this.movePolygonLayer?this.map.getSource(this.movePolygonName).setData(e):((t=this.map.MapMoreCustom()).draw(e,{sourceConfig:{id:this.movePolygonName,type:"geojson",data:e},layerConfig:[{id:this.movePolygonName,type:"fill",paint:{"fill-color":this.fillProps.color},beforeId:this.moveLineName}]}),this.movePolygonLayers.push(t))},t._drawRect=function(e,t){void 0===t&&(t=!0),e=B([X(q(O([this.currentPosition[0],e])),{properties:{rectIndex:this.index}})]),this.moveRectLayer?(this.map.getSource(this.moveRectName).setData(e),t||this.map.setPaintProperty(this.moveRectName+"-line","line-dasharray",[])):((t=this.map.MapMoreCustom()).draw(e,{sourceConfig:{id:this.moveRectName,type:"geojson",data:e},layerConfig:[{id:this.moveRectName,type:"fill",paint:{"fill-color":this.fillProps.color},beforeId:this.pointName},{id:this.moveRectName+"-line",type:"line",paint:{"line-color":this.lineProps.color,"line-width":this.lineProps.width,"line-dasharray":this.dash?this.lineProps.dasharray:[]},beforeId:this.pointName}]}),this.moveRectLayers.push(t))},t._drawSector=function(e,t){void 0===t&&(t=!0);var r=Ie(O(this.currentPosition,{units:"kilometers"})),n=Re(this.currentPosition[0],this.currentPosition[1]);e=Re(this.currentPosition[0],e),r=B([He(this.currentPosition[0],r,n,e,{units:"kilometers",properties:{sectorIndex:this.index}})]),this.moveSectorLayer?(this.map.getSource(this.moveSectorName).setData(r),t||this.map.setPaintProperty(this.moveSectorName+"-line","line-dasharray",[])):((n=this.map.MapMoreCustom()).draw(r,{sourceConfig:{id:this.moveSectorName,type:"geojson",data:r},layerConfig:[{id:this.moveSectorName,type:"fill",paint:{"fill-color":this.fillProps.color},beforeId:this.pointName},{id:this.moveSectorName+"-line",type:"line",paint:{"line-color":this.lineProps.color,"line-width":this.lineProps.width,"line-dasharray":this.dash?this.lineProps.dasharray:[]},beforeId:this.pointName}]}),this.moveSectorLayers.push(n))},t._removeRect=function(e){var t=this.moveRectLayers[e];t&&(t.destroy(),this.moveRectLayers[e]=null)},t._removeSector=function(e){var t=this.moveSectorLayers[e];t&&(t.destroy(),this.moveSectorLayers[e]=null)},t._createText=function(e,t,r){var n,i=this,o=(void 0===e&&(e="起点"),void 0===r&&(r=!0),document.createElement("div"));return((o.style.background="#ffffff",o.style.cursor="default",o.style.padding="0 5px",o.style.borderRadius="3px",o.style.display="flex",o.style.alignItems="center",o.className=this.className?this.className+" measure-box":"measure-box",o.ariaLabel="measure",n=document.createElement("span")).className="measure-text",n.innerHTML=e,n.ariaLabel="measure",o.appendChild(n),r&&((e=document.createElement("span")).className="measure-close",e.style.paddingLeft="5px",e.innerHTML="x",e.ariaLabel="measure",e.addEventListener("click",(function(e){i.isDraw||(e=e.target.parentNode._marker)&&i._removeGroup(e)})),o.appendChild(e)),n=new mapboxgl.Marker({element:o,offset:[10,0],anchor:"left"})).pointIndex=t,n.lineIndex=this.index,n.showBtn=r,this.currentText.push(n),o._marker=n},t._createMoveText=function(e){var t=document.createElement("div"),r=(t.style.background="#ffffff",t.style.cursor="default",t.style.padding="0 5px",t.style.borderRadius="3px",t.style.display="flex",t.style.alignItems="center",t.className=this.className?this.className+" measure-box":"measure-box",t.ariaLabel="measure",document.createElement("span"));return r.className="measure-text",r.innerHTML=e,r.ariaLabel="measure",t.appendChild(r),new mapboxgl.Marker({element:t,offset:[10,0],anchor:"left"})},t._createTextRemove=function(e){for(var t=this,r=document.createElement("div"),n=(r.className="measure-remove",r.style.width="15px",r.style.height="14px",r.style.marginLeft="5px",r.ariaLabel="measure",r.style.backgroundImage='url(\'data:image/svg+xml;utf8,%3Csvg xmlns="http://www.w3.org/2000/svg" width="20" height="20">%3Cpath d="M10,3.4 c-0.8,0-1.5,0.5-1.8,1.2H5l-1,1v1h12v-1l-1-1h-3.2C11.5,3.9,10.8,3.4,10,3.4z M5,8v7c0,1,1,2,2,2h6c1,0,2-1,2-2V8h-2v5.5h-1.5V8h-3 v5.5H7V8H5z"/>%3C/svg>\')',r.style.backgroundSize="100% 100%",r.addEventListener("click",(function(e){t.isDraw||(e=e.target.parentNode._marker)&&t._removeGroupLine(e)})),this.texts[e]),i=null,o=n.length-1;0<=o;o--)if(n[o].showBtn){i=o;break}(null!==i?n[i]:n[n.length-1]).getElement().appendChild(r)},t._measureDistance=function(e){var t="起点",r=(1<this.currentPosition.length&&(r=B([O(this.currentPosition,{lineIndex:this.index})]),t=this._calcLength(r)),this._createText(t,this.currentPosition.length-1,"circle"!==this.type&&"rect"!==this.type&&"sector"!==this.type));return r.setLngLat(e).addTo(this.map),r},t._measureArea=function(e){var t,r,n;["circle","polygon","rect","sector"].includes(this.type)&&(r=null,"circle"===this.type?(n=Ie(B([O(this.currentPosition)]),{units:"kilometers"}),t={steps:64,units:"kilometers",properties:{circleIndex:this.index}},r=V(this.currentPosition[0],n,t)):"polygon"===this.type?r=j([[].concat(this.currentPosition,[this.currentPosition[0]])]):"rect"===this.type?r=X(q(O(this.currentPosition)),{properties:{rectIndex:this.index}}):"sector"===this.type&&(r=this.map.getSource(this.moveSectorName)._data.features[0]),null!==r)&&(n=this._calcArea(r),this._createText(n,this.currentPosition.length,!1).setLngLat(e).addTo(this.map))},t._calcLength=function(e){return 1e3<(e=Ie(e,{units:"meters"}))?Number((e/1e3).toFixed(this.fixed[0]))+this.units.line[0]:Number(e.toFixed(this.fixed[1]))+this.units.line[1]},t._calcArea=function(e){return e=function(e){return t=function(e,t){return e+function(e){var t,r=0;switch(e.type){case"Polygon":return Be(e.coordinates);case"MultiPolygon":for(t=0;t<e.coordinates.length;t++)r+=Be(e.coordinates[t]);return r;case"Point":case"MultiPoint":case"LineString":case"MultiLineString":return 0}return 0}(t)},r=0,z(e,(function(e,n,i,o,a){r=t(r,e)})),r;var t,r}(e),1e6<e?Number((e/1e6).toFixed(this.fixed[0]))+this.units[this.type][0]:Number(e.toFixed(this.fixed[1]))+this.units[this.type][1]},t._removeGroup=function(e){var t,r,n,i=e.lineIndex,o=e.pointIndex;e.remove(),this.texts[i].splice(o,1),this.positions[i].splice(o,1),e=this.positions[i],this._updateLine(e,i),this._updatePoint(e,i),this._updateText(e,i),"polygon"===this.type?(this._updatePolygon(e,i),n=[].concat(e,[e[0]]),this._updateLine(n,i),e.length<3?(this._removeMarker(i),this._removePoint(i),this._removeLine(i)):e.length===o&&this._createTextRemove(i),2<e.length&&(n=j([n]),t=Ge(n),0<(r=this.texts[i]).length)&&(r=r[r.length-1],n=this._calcArea(n),this._updateMarkerText(r,n),r.setLngLat(t.geometry.coordinates).addTo(this.map))):"line"===this.type&&(e.length<2?this._removeMarker(i):e.length===o&&this._createTextRemove(i))},t._removeGroupLine=function(e){e=e.lineIndex,this._removeMarker(e),this._removePoint(e),this._removeLine(e),"circle"===this.type?this._removeCircle(e):"polygon"===this.type?this._removePolygon(e):"rect"===this.type?this._removeRect(e):"sector"===this.type&&this._removeSector(e)},t._removeMarker=function(e){this.texts[e].forEach((function(e){e.remove()})),this.texts[e]=[]},t._updateLine=function(e,t){var r=qe+"_"+this.type+"_"+t+"_line";e.length<2?this._removeLine(t):(e=B([O(e,{lineIndex:t})]),this.map.getSource(r).setData(e))},t._updatePolygon=function(e,t){var r=qe+"_"+this.type+"_"+t+"_polygon_move";e.length<3?this._removePolygon(t):(t=B([j([[].concat(e,[e[0]])])]),this.map.getSource(r).setData(t))},t._removePolygon=function(e){var t=this.movePolygonLayers[e];t&&(t.destroy(),this.movePolygonLayers[e]=null)},t._removeLine=function(e){var t=this.lineLayers[e];t&&(t.destroy(),this.lineLayers[e]=null),this.currentPosition=[]},t._removeCircle=function(e){var t=this.moveCircleLayers[e];t&&(t.destroy(),this.moveCircleLayers[e]=null)},t._updatePoint=function(e,t){var r=qe+"_"+this.type+"_"+t+"_point";e.length<2?this._removePoint(t):(e=B(e.map((function(e,r){return R(e,{pointIndex:r,lineIndex:t})}))),this.map.getSource(r).setData(e))},t._removePoint=function(e){var t=this.pointLayers[e];t&&(t.destroy(),this.pointLayers[e]=null)},t._updateText=function(e,t){var r=this,n=this.texts[t];e.forEach((function(t,i){var o,a="起点";0!==i&&(o=B([O(e.slice(0,i+1))]),a=r._calcLength(o)),n[i]&&(n[i].pointIndex=i,r._updateMarkerText(n[i],a))}))},t._updateMarkerText=function(e,t){e.getElement().children[0].innerHTML=t},t.off=function(){this.isDraw||(this.map.off("click",this._click),this.map.off("mousemove",this._move),this.map.off("dblclick",this._dblclick))},t.remove=function(){this.isDraw||(this.pointLayers.forEach((function(e){null!=e&&e.destroy()})),this.movepointLayers.forEach((function(e){null!=e&&e.destroy()})),this.lineLayers.forEach((function(e){null!=e&&e.destroy()})),this.moveLineLayers.forEach((function(e){null!=e&&e.destroy()})),this.texts.forEach((function(e){null!=e&&e.forEach((function(e){e.remove()}))})),this.moveCircleLayers.forEach((function(e){null!=e&&e.destroy()})),this.movePolygonLayers.forEach((function(e){null!=e&&e.destroy()})),this.moveRectLayers.forEach((function(e){null!=e&&e.destroy()})),this.moveSectorLayers.forEach((function(e){null!=e&&e.destroy()})),this._removeMoveMarker(),this._init())},t.visible=function(e){"boolean"!=typeof e||this.isDraw||(this.pointLayers.forEach((function(t){null!=t&&t.visible(e)})),this.movepointLayers.forEach((function(t){null!=t&&t.visible(e)})),this.lineLayers.forEach((function(t){null!=t&&t.visible(e)})),this.moveLineLayers.forEach((function(t){null!=t&&t.visible(e)})),this.texts.forEach((function(t){null!=t&&t.forEach((function(t){t.getElement().style.display=e?"flex":"none"}))})),this.moveCircleLayers.forEach((function(t){null!=t&&t.visible(e)})),this.movePolygonLayers.forEach((function(t){null!=t&&t.visible(e)})),this.moveRectLayers.forEach((function(t){null!=t&&t.visible(e)})),this.moveSectorLayers.forEach((function(t){null!=t&&t.visible(e)})))},t.destroy=function(){this.isOpen=!1,this.isDraw=!1,this.remove(),this.off()},Ne(e,[{key:"pointName",get:function(){return qe+"_"+this.type+"_"+this.index+"_point"}},{key:"movePointName",get:function(){return qe+"_"+this.type+"_"+this.index+"_point_move"}},{key:"lineName",get:function(){return qe+"_"+this.type+"_"+this.index+"_line"}},{key:"moveLineName",get:function(){return qe+"_"+this.type+"_"+this.index+"_line_move"}},{key:"moveCircleName",get:function(){return qe+"_"+this.type+"_"+this.index+"_circle_move"}},{key:"movePolygonName",get:function(){return qe+"_"+this.type+"_"+this.index+"_polygon_move"}},{key:"moveRectName",get:function(){return qe+"_"+this.type+"_"+this.index+"_rect_move"}},{key:"moveSectorName",get:function(){return qe+"_"+this.type+"_"+this.index+"_sector_move"}},{key:"pointLayer",get:function(){return this.pointLayers[this.index]}},{key:"movePointLayer",get:function(){return this.movepointLayers[this.index]}},{key:"lineLayer",get:function(){return this.lineLayers[this.index]}},{key:"moveLineLayer",get:function(){return this.moveLineLayers[this.index]}},{key:"moveCircleLayer",get:function(){return this.moveCircleLayers[this.index]}},{key:"movePolygonLayer",get:function(){return this.movePolygonLayers[this.index]}},{key:"moveRectLayer",get:function(){return this.moveRectLayers[this.index]}},{key:"moveSectorLayer",get:function(){return this.moveSectorLayers[this.index]}}]),e}(),We=["id"],Je=["id","type","beforeId","source-layer"],Ye=function(){function e(e,t){void 0===t&&(t={}),this.map=e,this.sourceName=[],this.layerName=[],this.type="symbol",this.custom=null!=(t=null==(e=t)?void 0:e.custom)&&t,this.isInit=!1,this.callback=null,this.mapEvent=null}var t=e.prototype;return t.draw=function(e,t,r){if(e&&this.map)return this.callback=r,"vector"===e.type?(this.type=null!=(r=t.type)?r:"symbol",this._addSourceLayer(e,t),{source:this.sourceName,layer:this.layerName}):void 0},t.destroy=function(){this._clearSource(),this.mapEvent&&this.map.off("render",this.mapEvent)},t.visible=function(e){var t,r=this;"boolean"==typeof e&&null!=(t=this.layerName)&&t.filter((function(e){return!e.includes("__copy")})).forEach((function(t){r.map.getLayer(t)&&r.map.setLayoutProperty(t,"visibility",e?"visible":"none")}))},t._addSourceLayer=function(e,t){var r,n,a=this,s=(this.sourceName=[],this.layerName=[],n=null!=(n=t.sourceConfig)?n:{}).id,u=i(n,We),c=s,h=(this.map.addSource(c,o({},e,u)),this.sourceName.push(c),(n=t.beforeId||null)&&this.map.getLayer(n),s=l(t.layerConfig),[]);Array.isArray(s)?h=s:"object"==typeof s&&h.push(s),0<h.length&&(e=h[0],n={id:c+"__copy",type:"circle",source:c,"source-layer":e["source-layer"],paint:{"circle-radius":1,"circle-opacity":0},interactive:!1},this.map.addLayer(n),this.layerName.push(c+"__copy"),r={sourceLayer:e["source-layer"]},this.mapEvent=function(e){var t,n=a.map.getSource(c);n&&n.loaded()&&a.map.isSourceLoaded(c)&&(n={type:"FeatureCollection",features:a.map.querySourceFeatures(c,r)},a.custom?a.callback&&"function"==typeof a.callback&&a.callback(n):(t=c+"__geojson",a.isInit?a.map.getSource(t)&&a.map.getSource(t).setData(n):(a.map.addSource(t,o({type:"geojson",data:n},u)),a.sourceName.push(t),h.forEach((function(e){var r=(e=l(e)).id,n=e.type,s=e.beforeId;e["source-layer"],e=i(e,Je),s&&!a.map.getLayer(s)&&(s=null),a.map.addLayer(o({id:r,type:n},e,{source:t}),s),a.layerName.push(r)})),a.isInit=!0)))},this.map.on("render",this.mapEvent))},t._clearSource=function(){var e,t=this;null!=(e=this.layerName)&&e.forEach((function(e){var r;(null==(r=t.map)?void 0:r.getLayer(e))&&t.map.removeLayer(e)})),null!=(e=this.sourceName)&&e.forEach((function(e){var r;(null==(r=t.map)?void 0:r.getSource(e))&&t.map.removeSource(e)}))},e}(),Ve=["padding","animate","maxZoom","essential"],Ze=["url"],Ke=null,$e=null,Qe=function(e){return/^#([0-9a-fA-F]{3}){1,2}$/.test(e)},et=["line-color","line-opacity"],tt=["fill-color","fill-opacity"],rt=["background-color","background-opacity"],nt=["text-color","text-opacity"],it="zh_custom",ot=function(e,t,r,n){if(r&&(Qe(r)||Array.isArray(r))){var i=e.getLayer(t);if(i){var o=[];switch(i.type){case"line":o=et;break;case"fill":o=tt;break;case"background":o=rt;break;case"symbol":o=nt}0<o.length&&(e.setPaintProperty(t,o[0],r),null!==n)&&e.setPaintProperty(t,o[1],n)}}},at=function(e,t,r,n){if(t&&r&&"string"==typeof t&&e.getLayer(t)&&"object"==typeof r)for(var i in r)null!==r[i]&&void 0!==r[i]&&e[n](t,i,r[i])};function st(e,t){if(e&&(void 0!==e[it]&&null!==e[it]||(e[it]={}),t)&&"object"==typeof t){var r,n=l(t);for(r in n)e[it][r]=n[r]}}function lt(e,t){var r=[];return"string"==typeof t?r=t.split(".").filter(Boolean):Array.isArray(t)&&(r=t),0===r.length?null:r.reduce((function(e,t){return e[t]}),e[it])}})(),n;function e(n){var i=r[n];return void 0!==i||(i=r[n]={exports:{}},t[n].call(i.exports,i,i.exports,e)),i.exports}var t,r,n}));
|
|
2
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("zMapUtil",[],t):"object"==typeof exports?exports.zMapUtil=t():e.zMapUtil=t()}(this,(()=>{return t={481:function(e,t){var r;void 0!==(t="function"==typeof(r=function(){var e=function(e){return e.reduce((function(e,t){return 2*e+t}),0)},t=function(e){for(var t=[],r=7;r>=0;r--)t.push(!!(e&1<<r));return t},r=function(e){this.data=e,this.len=this.data.length,this.pos=0,this.readByte=function(){if(this.pos>=this.data.length)throw new Error("Attempted to read past end of stream.");return e instanceof Uint8Array?e[this.pos++]:255&e.charCodeAt(this.pos++)},this.readBytes=function(e){for(var t=[],r=0;r<e;r++)t.push(this.readByte());return t},this.read=function(e){for(var t="",r=0;r<e;r++)t+=String.fromCharCode(this.readByte());return t},this.readUnsigned=function(){var e=this.readBytes(2);return(e[1]<<8)+e[0]}},n=function(r,n){n||(n={});var i=function(e){for(var t=[],n=0;n<e;n++)t.push(r.readBytes(3));return t},o=function(){var e,t;t="";do{e=r.readByte(),t+=r.read(e)}while(0!==e);return t},a=function(){var s={};switch(s.sentinel=r.readByte(),String.fromCharCode(s.sentinel)){case"!":s.type="ext",function(i){switch(i.label=r.readByte(),i.label){case 249:i.extType="gce",function(i){r.readByte();var o=t(r.readByte());i.reserved=o.splice(0,3),i.disposalMethod=e(o.splice(0,3)),i.userInput=o.shift(),i.transparencyGiven=o.shift(),i.delayTime=r.readUnsigned(),i.transparencyIndex=r.readByte(),i.terminator=r.readByte(),n.gce&&n.gce(i)}(i);break;case 254:i.extType="com",function(e){e.comment=o(),n.com&&n.com(e)}(i);break;case 1:i.extType="pte",function(e){r.readByte(),e.ptHeader=r.readBytes(12),e.ptData=o(),n.pte&&n.pte(e)}(i);break;case 255:i.extType="app",function(e){r.readByte(),e.identifier=r.read(8),e.authCode=r.read(3),"NETSCAPE"===e.identifier?function(e){r.readByte(),e.unknown=r.readByte(),e.iterations=r.readUnsigned(),e.terminator=r.readByte(),n.app&&n.app.NETSCAPE&&n.app.NETSCAPE(e)}(e):function(e){e.appData=o(),n.app&&n.app[e.identifier]&&n.app[e.identifier](e)}(e)}(i);break;default:i.extType="unknown",function(e){e.data=o(),n.unknown&&n.unknown(e)}(i)}}(s);break;case",":s.type="img",function(a){a.leftPos=r.readUnsigned(),a.topPos=r.readUnsigned(),a.width=r.readUnsigned(),a.height=r.readUnsigned();var s=t(r.readByte());a.lctFlag=s.shift(),a.interlaced=s.shift(),a.sorted=s.shift(),a.reserved=s.splice(0,2),a.lctSize=e(s.splice(0,3)),a.lctFlag&&(a.lct=i(1<<a.lctSize+1)),a.lzwMinCodeSize=r.readByte();var l=o();a.pixels=function(e,t){for(var r,n,i=0,o=function(e){for(var r=0,n=0;n<e;n++)t.charCodeAt(i>>3)&1<<(7&i)&&(r|=1<<n),i++;return r},a=[],s=1<<e,l=s+1,u=e+1,c=[],h=function(){c=[],u=e+1;for(var t=0;t<s;t++)c[t]=[t];c[s]=[],c[l]=null};;)if(n=r,(r=o(u))!==s){if(r===l)break;if(r<c.length)n!==s&&c.push(c[n].concat(c[r][0]));else{if(r!==c.length)throw new Error("Invalid LZW code.");c.push(c[n].concat(c[n][0]))}a.push.apply(a,c[r]),c.length===1<<u&&u<12&&u++}else h();return a}(a.lzwMinCodeSize,l),a.interlaced&&(a.pixels=function(e,t){for(var r=new Array(e.length),n=e.length/t,i=function(n,i){var o=e.slice(i*t,(i+1)*t);r.splice.apply(r,[n*t,t].concat(o))},o=[0,4,2,1],a=[8,8,4,2],s=0,l=0;l<4;l++)for(var u=o[l];u<n;u+=a[l])i(u,s),s++;return r}(a.pixels,a.width)),n.img&&n.img(a)}(s);break;case";":s.type="eof",n.eof&&n.eof(s);break;default:throw new Error("Unknown block: 0x"+s.sentinel.toString(16))}"eof"!==s.type&&setTimeout(a,0)};!function(){var o={};if(o.sig=r.read(3),o.ver=r.read(3),"GIF"!==o.sig)throw new Error("Not a GIF file.");o.width=r.readUnsigned(),o.height=r.readUnsigned();var a=t(r.readByte());o.gctFlag=a.shift(),o.colorRes=e(a.splice(0,3)),o.sorted=a.shift(),o.gctSize=e(a.splice(0,3)),o.bgColor=r.readByte(),o.pixelAspectRatio=r.readByte(),o.gctFlag&&(o.gct=i(1<<o.gctSize+1)),n.hdr&&n.hdr(o)}(),setTimeout(a,0)};return function(e){var t,i,o={vp_l:0,vp_t:0,vp_w:null,vp_h:null,c_w:null,c_h:null};for(var a in e)o[a]=e[a];o.vp_w&&o.vp_h&&(o.is_vp=!0);var s=null,l=!1,u=null,c=null,h=null,p=null,f=null,d=null,y=null,m=!0,v=!1,g=[],_=[],b=o.gif;void 0===o.auto_play&&(o.auto_play=!b.getAttribute("rel:auto_play")||"1"==b.getAttribute("rel:auto_play"));var w,x,L,P,M=o.hasOwnProperty("on_end")?o.on_end:null,E=o.hasOwnProperty("loop_delay")?o.loop_delay:0,k=o.hasOwnProperty("loop_mode")?o.loop_mode:"auto",C=!o.hasOwnProperty("draw_while_loading")||o.draw_while_loading,A=!!C&&(!o.hasOwnProperty("show_progress_bar")||o.show_progress_bar),N=o.hasOwnProperty("progressbar_height")?o.progressbar_height:25,S=o.hasOwnProperty("progressbar_background_color")?o.progressbar_background_color:"rgba(255,255,255,0.4)",T=o.hasOwnProperty("progressbar_foreground_color")?o.progressbar_foreground_color:"rgba(255,0,22,.8)",I=function(){u=null,c=null,f=h,h=null,d=null},R=function(){try{n(t,H)}catch(e){B("parse")}},j=function(e,t){w.width=e*X(),w.height=t*X(),L.style.minWidth=e*X()+"px",P.width=e,P.height=t,P.style.width=e+"px",P.style.height=t+"px",P.getContext("2d").setTransform(1,0,0,1,0,0)},O=function(e,t,r){if(r&&A){var n,i,a,s=N;o.is_vp?v?(i=(o.vp_t+o.vp_h-s)/X(),s/=X(),n=o.vp_l/X()+e/t*(o.vp_w/X()),a=w.width/X()):(i=o.vp_t+o.vp_h-s,n=o.vp_l+e/t*o.vp_w,a=w.width):(i=(w.height-s)/(v?X():1),n=e/t*w.width/(v?X():1),a=w.width/(v?X():1),s/=v?X():1),x.fillStyle=S,x.fillRect(n,i,a-n,s),x.fillStyle=T,x.fillRect(0,i,n,s)}},B=function(e){s=e,i={width:b.width,height:b.height},g=[],x.fillStyle="black",x.fillRect(0,0,o.c_w?o.c_w:i.width,o.c_h?o.c_h:i.height),x.strokeStyle="red",x.lineWidth=3,x.moveTo(0,0),x.lineTo(o.c_w?o.c_w:i.width,o.c_h?o.c_h:i.height),x.moveTo(0,o.c_h?o.c_h:i.height),x.lineTo(o.c_w?o.c_w:i.width,0),x.stroke()},F=function(){d&&(g.push({data:d.getImageData(0,0,i.width,i.height),delay:c}),_.push({x:0,y:0}))},D=function(){var e=-1,t=0,r=function(t){e+=t,i()},n=function(){var n=!1,i=function(){null!==M&&M(b),t++,!1!==k||t<0?o():(n=!1,m=!1)},o=function(){if(n=m){r(1);var t=10*g[e].delay;t||(t=100),0==(e+1+g.length)%g.length?(t+=E,setTimeout(i,t)):setTimeout(o,t)}};return function(){n||setTimeout(o,0)}}(),i=function(){var t;(e=parseInt(e,10))>g.length-1&&(e=0),e<0&&(e=0),t=_[e],P.getContext("2d").putImageData(g[e].data,t.x,t.y),x.globalCompositeOperation="copy",x.drawImage(P,0,0)};return{init:function(){s||(o.c_w&&o.c_h||x.scale(X(),X()),o.auto_play?n():(e=0,i()))},step:n,play:function(){m=!0,n()},pause:function(){m=!1},playing:m,move_relative:r,current_frame:function(){return e},length:function(){return g.length},move_to:function(t){e=t,i()}}}(),G=function(e){O(t.pos,t.data.length,e)},U=function(){},z=function(e,t){return function(r){e(r),G(t)}},H={hdr:z((function(e){j((i=e).width,i.height)})),gce:z((function(e){F(),I(),u=e.transparencyGiven?e.transparencyIndex:null,c=e.delayTime,h=e.disposalMethod})),com:z(U),app:{NETSCAPE:z(U)},img:z((function(e){d||(d=P.getContext("2d"));var t=g.length,r=e.lctFlag?e.lct:i.gct;t>0&&(3===f?null!==p?d.putImageData(g[p].data,0,0):d.clearRect(y.leftPos,y.topPos,y.width,y.height):p=t-1,2===f&&d.clearRect(y.leftPos,y.topPos,y.width,y.height));var n=d.getImageData(e.leftPos,e.topPos,e.width,e.height);e.pixels.forEach((function(e,t){e!==u&&(n.data[4*t+0]=r[e][0],n.data[4*t+1]=r[e][1],n.data[4*t+2]=r[e][2],n.data[4*t+3]=255)})),d.putImageData(n,e.leftPos,e.topPos),v||(x.scale(X(),X()),v=!0),C&&(x.drawImage(P,0,0),C=o.auto_play),y=e}),!0),eof:function(e){F(),G(!1),o.c_w&&o.c_h||(w.width=i.width*X(),w.height=i.height*X()),D.init(),l=!1,J&&J(b)}},q=function(){var e=b.parentNode,t=document.createElement("div");w=document.createElement("canvas"),x=w.getContext("2d"),L=document.createElement("div"),P=document.createElement("canvas"),t.width=w.width=b.width,t.height=w.height=b.height,L.style.minWidth=b.width+"px",t.className="jsgif",L.className="jsgif_toolbar",t.appendChild(w),t.appendChild(L),e.insertBefore(t,b),e.removeChild(b),o.c_w&&o.c_h&&j(o.c_w,o.c_h),W=!0},X=function(){return o.max_width&&i&&i.width>o.max_width?o.max_width/i.width:1},W=!1,J=!1,Y=function(e){return!l&&(J=e||!1,l=!0,g=[],I(),p=null,f=null,d=null,y=null,!0)},V=function(){return g.reduce((function(e,t){return e+t.delay}),0)};return{play:D.play,pause:D.pause,move_relative:D.move_relative,move_to:D.move_to,get_playing:function(){return m},get_canvas:function(){return w},get_canvas_scale:function(){return X()},get_loading:function(){return l},get_auto_play:function(){return o.auto_play},get_length:function(){return D.length()},get_frames:function(){return g},get_duration:function(){return V()},get_duration_ms:function(){return 10*V()},get_current_frame:function(){return D.current_frame()},load_url:function(e,n){if(Y(n)){var i=new XMLHttpRequest;i.open("GET",e,!0),"overrideMimeType"in i?i.overrideMimeType("text/plain; charset=x-user-defined"):"responseType"in i?i.responseType="arraybuffer":i.setRequestHeader("Accept-Charset","x-user-defined"),i.onloadstart=function(){W||q()},i.onload=function(e){200!=this.status&&B("xhr - response"),"response"in this||(this.response=new VBArray(this.responseText).toArray().map(String.fromCharCode).join(""));var n=this.response;n.toString().indexOf("ArrayBuffer")>0&&(n=new Uint8Array(n)),t=new r(n),setTimeout(R,0)},i.onprogress=function(e){e.lengthComputable&&O(e.loaded,e.total,!0)},i.onerror=function(){B("xhr")},i.send()}},load:function(e){this.load_url(b.getAttribute("rel:animated_src")||b.src,e)},load_raw:function(e,n){Y(n)&&(W||q(),t=new r(e),setTimeout(R,0))},set_frame_offset:function(e,t){_[e]?(void 0!==t.x&&(_[e].x=t.x),void 0!==t.y&&(_[e].y=t.y)):_[e]=t}}}})?r.apply(t,[]):r)&&(e.exports=t)},61:(e,t,r)=>{var n=r(698).default;e.exports=function(){"use strict";e.exports=function(){return r},e.exports.__esModule=!0,e.exports.default=e.exports;var t,r={},i=Object.prototype,o=i.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},s=(w="function"==typeof Symbol?Symbol:{}).iterator||"@@iterator",l=w.asyncIterator||"@@asyncIterator",u=w.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(t){c=function(e,t,r){return e[t]=r}}function h(e,r,n,i){var o,s,l,u;return r=r&&r.prototype instanceof g?r:g,r=Object.create(r.prototype),i=new C(i||[]),a(r,"_invoke",{value:(o=e,s=n,l=i,u=f,function(e,r){if(u===y)throw new Error("Generator is already running");if(u===m){if("throw"===e)throw r;return{value:t,done:!0}}for(l.method=e,l.arg=r;;){var n=l.delegate;if(n&&(n=function e(r,n){var i=n.method,o=r.iterator[i];return o===t?(n.delegate=null,"throw"===i&&r.iterator.return&&(n.method="return",n.arg=t,e(r,n),"throw"===n.method)||"return"!==i&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+i+"' method")),v):"throw"===(i=p(o,r.iterator,n.arg)).type?(n.method="throw",n.arg=i.arg,n.delegate=null,v):(o=i.arg)?o.done?(n[r.resultName]=o.value,n.next=r.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,v):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}(n,l),n)){if(n===v)continue;return n}if("next"===l.method)l.sent=l._sent=l.arg;else if("throw"===l.method){if(u===f)throw u=m,l.arg;l.dispatchException(l.arg)}else"return"===l.method&&l.abrupt("return",l.arg);if(u=y,"normal"===(n=p(o,s,l)).type){if(u=l.done?m:d,n.arg===v)continue;return{value:n.arg,done:l.done}}"throw"===n.type&&(u=m,l.method="throw",l.arg=n.arg)}})}),r}function p(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}r.wrap=h;var f="suspendedStart",d="suspendedYield",y="executing",m="completed",v={};function g(){}function _(){}function b(){}var w,x,L=(c(w={},s,(function(){return this})),(x=(x=Object.getPrototypeOf)&&x(x(A([]))))&&x!==i&&o.call(x,s)&&(w=x),b.prototype=g.prototype=Object.create(w));function P(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function M(e,t){var r;a(this,"_invoke",{value:function(i,a){function s(){return new t((function(r,s){!function r(i,a,s,l){var u;if("throw"!==(i=p(e[i],e,a)).type)return(a=(u=i.arg).value)&&"object"==n(a)&&o.call(a,"__await")?t.resolve(a.__await).then((function(e){r("next",e,s,l)}),(function(e){r("throw",e,s,l)})):t.resolve(a).then((function(e){u.value=e,s(u)}),(function(e){return r("throw",e,s,l)}));l(i.arg)}(i,a,r,s)}))}return r=r?r.then(s,s):s()}})}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function k(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function A(e){if(e||""===e){var r,i=e[s];if(i)return i.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return r=-1,(i=function n(){for(;++r<e.length;)if(o.call(e,r))return n.value=e[r],n.done=!1,n;return n.value=t,n.done=!0,n}).next=i}throw new TypeError(n(e)+" is not iterable")}return a(L,"constructor",{value:_.prototype=b,configurable:!0}),a(b,"constructor",{value:_,configurable:!0}),_.displayName=c(b,u,"GeneratorFunction"),r.isGeneratorFunction=function(e){return!!(e="function"==typeof e&&e.constructor)&&(e===_||"GeneratorFunction"===(e.displayName||e.name))},r.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,c(e,u,"GeneratorFunction")),e.prototype=Object.create(L),e},r.awrap=function(e){return{__await:e}},P(M.prototype),c(M.prototype,l,(function(){return this})),r.AsyncIterator=M,r.async=function(e,t,n,i,o){void 0===o&&(o=Promise);var a=new M(h(e,t,n,i),o);return r.isGeneratorFunction(t)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},P(L),c(L,u,"Generator"),c(L,s,(function(){return this})),c(L,"toString",(function(){return"[object Generator]"})),r.keys=function(e){var t,r=Object(e),n=[];for(t in r)n.push(t);return n.reverse(),function e(){for(;n.length;){var t=n.pop();if(t in r)return e.value=t,e.done=!1,e}return e.done=!0,e}},r.values=A,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(k),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,i){return s.type="throw",s.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var i=this.tryEntries.length-1;0<=i;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var l=o.call(a,"catchLoc"),u=o.call(a,"finallyLoc");if(l&&u){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;0<=r;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}var a=(i=i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc?null:i)?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;0<=t;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),k(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;0<=t;--t){var r,n,i=this.tryEntries[t];if(i.tryLoc===e)return"throw"===(r=i.completion).type&&(n=r.arg,k(i)),n}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:A(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},r},e.exports.__esModule=!0,e.exports.default=e.exports},698:e=>{function t(r){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},687:(e,t,r)=>{r=r(61)(),e.exports=r;try{regeneratorRuntime=r}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}}},r={},e.n=t=>{var r=t&&t.__esModule?()=>t.default:()=>t;return e.d(r,{a:r}),r},e.d=(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},e.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),e.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n={},(()=>{"use strict";function t(e,t,r,n,i,o,a){try{var s=e[o](a),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,i)}function r(e){return function(){var r=this,n=arguments;return new Promise((function(i,o){var a=e.apply(r,n);function s(e){t(a,i,o,s,l,"next",e)}function l(e){t(a,i,o,s,l,"throw",e)}s(void 0)}))}}function i(e,t){if(null==e)return{};for(var r,n={},i=Object.keys(e),o=0;o<i.length;o++)r=i[o],0<=t.indexOf(r)||(n[r]=e[r]);return n}function o(){return(o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r,n=arguments[t];for(r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}e.r(n),e.d(n,{MapLayer:()=>te,RegisterMapBoxMethod:()=>function(e,t){if(e&&e.Map){Ke=e,-1===(window.mapboxgl=Ke).Map.prototype._setupPainter.toString().indexOf("webgl2")&&(n=Ke.Map.prototype._setupPainter,Ke.Map.prototype._setupPainter=function(){var e=this._canvas.getContext;this._canvas.getContext=function(t,r){return e.apply(this,["webgl2",r])||e.apply(this,["webgl",r])||e.apply(this,["experimental-webgl",r])},n.apply(this),this._canvas.getContext=e});var n,a,c=e.Map,h=function(e,t){var n=e.prototype.setStyle,a=e.prototype.addControl;return{initData:function(){var e;this[it]||(this[it]={},this.style[it]={},e=[],st(this,{source:e=t&&Array.isArray(t)&&0<t.length&&t.every((function(e){return"string"==typeof e}))?t:e,defaultSources:e,layerSource:{layers:[],sources:[]},customLayer:[],images:{},layerIndex:[],showHeader:!1,bounds:null,cameraOptions:{},measure:{line:0,circle:0,polygon:0}}),st(this.style,{layerObject:{}}))},clearData:function(){st(this,{source:lt(this,"defaultSources"),layerSource:{layers:[],sources:[]},customLayer:[],images:{},layerIndex:[],showHeader:!1,bounds:null,cameraOptions:{}})},setPaint:function(e,t){at(this,e,t,"setPaintProperty")},setLayout:function(e,t){at(this,e,t,"setLayoutProperty")},customStyle:function(e){if(e&&"object"==typeof e)for(var t in e){var r,n=e[t];"string"==typeof n?ot(this,t,n):Array.isArray(n)&&(Qe(n[0])||Array.isArray(n[0]))&&(r=null,"number"!=typeof n[1]&&!Array.isArray(n[1])||(r=n[1]),ot(this,t,n[0],r))}},getAllLayerAndSource:function(e,t){void 0===t&&(t=!0),null==e&&(e=lt(this,"source"));for(var r,n=this.getStyle(),i=n.layers,o=n.sources,a={layers:[],sources:[]},s=0;s<i.length;)"background"===i[s].type||e.includes(i[s].source)||(r=i[s].id,this.getLayer(r)&&(a.layers.push(l(i[s])),t||this.removeLayer(r))),s++;var u,c=[];for(u in o)c.push(u);for(var h=0;h<c.length;){var p=c[h];e.includes(p)||this.isSourceLoaded(p)&&(a.sources.push({name:p,source:l(o[p])}),t||this.removeSource(p)),h++}return a},removeAllCustomLayer:function(){var e=this,t=lt(this,"customLayer");t.forEach((function(t){e.getLayer(t.layer.id)&&e.removeLayer(t.layer.id)})),t.length=0},removeAllLayerAndSource:function(e){return null==e&&(e=lt(this,"source")),this.removeAllCustomLayer(),this.getAllLayerAndSource(e,!1)},removeEvents:function(e){var t=this;void 0===e&&(e=["click","mousemove","mouseout"]),Array.isArray(e)&&e.forEach((function(e){e in t._listeners&&(t._listeners[e]=[])}))},removePopup:function(e){e&&"string"==typeof e?["tooltip","popup"].includes(e)&&this._popups.forEach((function(t){t.options.type===e&&t.remove()})):this._popups.forEach((function(e){e.remove()}))},findCustomLayer:function(e,t){null==t&&(t=lt(this,"source"));for(var r=this.getStyle().layers,n=[],i=0;i<r.length;)"background"===r[i].type||t.includes(r[i].source)||n.push(r[i]),i++;if(e){if("string"==typeof e)return n.filter((function(t){return t.type===e}));if(Array.isArray(e)&&0<e.length)return n.filter((function(t){return e.includes(t.type)}))}return n},MapTooltip:function(e,t){return new E(this,e,t)},MapPopup:function(e,t){return new C(this,e,t)},addLayer:function(e,t){void 0===this._layers&&(this._layers=[],this._sortLayers=[]),e.id&&this._layers.push(e),"zIndex"in e&&this._sortLayers.push(e),this._lazyInitEmptyStyle();var r=lt(this,"layerIndex"),n=lt(this,"customLayer");return"custom"===e.type&&n.push({layer:e,beforeId:t}),t?-1!==(n=r.findIndex((function(e){return e.id===t})))&&r.splice(n,0,{type:e.type,id:e.id}):r.push({type:e.type,id:e.id}),this.style.addLayer(e,t),"zIndex"in e&&(n=this._sortLayers.sort((function(e,t){return e.zIndex-t.zIndex})),this.orderLayers(n.map((function(e){return e.id})))),this.fire("layerdata",o({},e,{add:!0})),this._update(!0)},removeLayer:function(e){var t=this.style.getLayer(e),r=(this._layers=this._layers.filter((function(t){return t.id!==e})),this._sortLayers=this._sortLayers.filter((function(t){return t.id!==e})),lt(this,"customLayer")),n=lt(this,"layerIndex"),i=r.findIndex((function(t){return t.layer.id===e}));return-1!==i&&r.splice(i,1),r=n.findIndex((function(t){return t.id===e})),-1!==r&&n.splice(r,1),this.style.removeLayer(e),this.fire("layerdata",o({},t,{add:!1})),this._update(!0)},moveLayer:function(e,t){var r,n=lt(this,"layerIndex"),i=n.findIndex((function(t){return t.id===e})),o=n.findIndex((function(e){return e.id===t}));return-1!==i&&-1!==o&&(r=n.splice(i,1)[0],o<0?o=0:o>n.length&&(o=n.length),n.splice(o,0,r)),this.style.moveLayer(e,t),this._update(!0)},MapLine:function(){return new N(this)},MapCustom:function(){return new S(this)},fitBoundsGeoJson:function(e,t,r){e&&(e=[[(e=W(e)).bbox[0],e.bbox[1]],[e.bbox[2],e.bbox[3]]],this.fitBoundsPosition(e,t,r))},fitBoundsPosition:function(e,t,r){var n,a,s,l;Array.isArray(e)&&0!==(null==e?void 0:e.length)&&(n=void 0===(n=(t=null!=t?t:{}).padding)?40:n,a=void 0===(a=t.animate)||a,s=void 0===(s=t.maxZoom)?15:s,l=void 0===(l=t.essential)||l,t=i(t,Ve),this.fitBounds(e,o({linear:!1,padding:n,animate:a,essential:l,maxZoom:s},t),r))},getInvertMask:function(e,t){var r;if(u(e)&&0!==(e=null!=(e=e.features[0].geometry.coordinates)?e:[]).length)return r=[],e.forEach((function(e){r.push(e[0])})),t=(e=null!=t?t:{}).id,e=void 0===(e=e.layerConfig)?{paint:{"fill-color":"rgba(0,0,0,0.8)"},layout:{visibility:"visible"}}:e,o({id:void 0===t?"mask":t,type:"fill",source:{type:"geojson",data:{type:"Feature",geometry:{type:"Polygon",coordinates:[[[-180,90],[180,90],[180,-90],[-180,-90]]].concat(r)}}}},e)},fitMap:function(){for(var e={},t=!1,r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];var a=void 0===(a=n[0])?null:a,s=void 0===(s=n[1])?null:s,l=lt(this,"bounds"),c=lt(this,"cameraOptions");a?u(a)?(t=!1,l=a,s&&!u(s)&&"object"==typeof s&&(c=s)):"object"==typeof a&&(t=!0,e=a):l&&(t=!0),t&&l&&this.fitBoundsGeoJson(l,o({},c,e))},loadImages:function(e){var t=this;return new Promise((function(r){var n={};if(e&&0!==Object.keys(e).length)for(var o in e){var a,s,l=e[o];"string"==typeof l?t.loadImage(l,u(o)):"object"==typeof l&&(l.url?(a=l.url,s=i(l,Ze),t.loadImage(a,u(o,s))):l.layer&&l.layer.render&&"function"==typeof l.layer.render&&u(o,l.config||{})(null,l.layer))}else r(n);function u(t,i){return function(o,a){n[t]={data:i,url:o?null:a},Object.keys(n).length===Object.keys(e).length&&r(n)}}}))},loadAddImages:function(e){var t=this;return new Promise((function(r){t.loadImages(e).then((function(e){for(var n in e){var i=e[n],a=o({},null==i?void 0:i.data,{type:"custom"});t.hasImage(n)||t.addImage(n,i.url,a)}r()}))}))},MapCircle:function(){return new Z(this)},MapEvent:function(e){return new K(this,e)},MapMoreCustom:function(){return new ee(this)},removeLayerSource:function(e){function t(e){r.getSource(e)&&(r.removeLayer(e),r.removeSource(e))}var r=this,n=e.name,i=null!=(i=e.sources)?i:[];e=null!=(e=e.layers)?e:[],Array.isArray(n)&&0<n.length?n.forEach((function(e){t(e)})):"string"==typeof n&&t(n),0<(null==i?void 0:i.length)&&0<(null==e?void 0:e.length)&&(e.forEach((function(e){r.getLayer(e)&&r.removeLayer(e)})),i.forEach((function(e){r.getSource(e)&&r.removeSource(e)})))},removeLayerEvent:function(e,t){if(void 0===t&&(t=!0),"object"==typeof e&&null!=e)if(e.destroy&&"function"==typeof e.destroy)e.destroy();else for(var r in e)e[r]&&e[r].destroy&&"function"==typeof e[r].destroy&&(e[r].destroy(),t)&&(e[r]=null)},MapMarker:function(e){return new se(this,e)},findCustomIcon:function(){var e,t=this.style.imageManager.images,r={};for(e in t)"custom"===t[e].type&&(r[e]=t[e]);return r},getCustomLayer:function(){var e=this,t=lt(this,"customLayer"),r=[];return t.map((function(t){e.getLayer(t.layer.id)&&r.push(t.layer)})),r},setStyle:function(e,t,r){var i,o,a,s,l,u,c=this;return null!=t&&t.save&&(a=(o=null!=t?t:{}).source,o=void 0!==(o=o.custom)&&o,a=null!=(i=a=void 0===a?[]:a)?i:[],lt(this,"images"),s=lt(this,"layerSource"),l=lt(this,"customLayer"),u=this.findCustomIcon(),Array.isArray(a)&&0!==a.length?o||(a=Array.from(new Set([].concat(a,["composite","mapbox://mapbox.satellite"])))):a=["composite","mapbox://mapbox.satellite"],s=this.getAllLayerAndSource(a),this.once("style.load",(function(n){var i,o=[];for(i in u)o.push(i),c.style.imageManager.images[i]=u[i];var a=[];s.sources.map((function(e){var t=s.layers.filter((function(t){return t.source===e.name}));a.push({name:e.name,source:e.source,layer:t})})),null!=t&&t.log&&console.log(a),a.map((function(e){c.getSource(e.name)||c.addSource(e.name,e.source),e.layer.map((function(e){c.getLayer(e.id)||c.addLayer(e)}))})),l.forEach((function(e){c.getLayer(e.layer.id)||c.addLayer(e.layer,e.beforeId)})),r&&"function"==typeof r&&r({style:e,images:o,layerSource:s})}))),n.call(this,e,t)},getLayerIndex:function(e){var t=lt(this,"layerIndex");if(e){var r=t.findIndex((function(t){return t.id===e}));if(-1!==r)return r}return 0===t.length?0:t.length-1},getLayerId:function(e,t){void 0===t&&(t=0);var r=lt(this,"layerIndex");return e+=t,t=Number(e),isNaN(t)||e<0&&e>=r.length?"":null!=(r=null==r||null==(t=r[e])?void 0:t.id)?r:void 0},getMinLayerId:function(){var e=lt(this,"layerIndex");return null!=(e=null==e||null==(e=e[0])?void 0:e.id)?e:void 0},getMaxLayerId:function(){var e=lt(this,"layerIndex");return null!=(e=null==e||null==(e=e[e.length-1])?void 0:e.id)?e:void 0},getAllLayerId:function(){return lt(this,"layerIndex").map((function(e){return e.id}))},getAllLayer:function(){return lt(this,"layerIndex")},getLineLayer:function(){return lt(this,"layerIndex").map((function(e,t){return"line"!==e.type?null:{index:t,id:e.id}})).filter(Boolean)},AnimateLine:function(e,t){return new le(this,e,t)},addHeader:function(e,t){var r,n=lt(this,"showHeader");t&&"function"==typeof t&&!n&&(r=this._requestManager.transformRequest,this._requestManager.transformRequest=function(i,a){return a=r.call(this,i,a),(i=t(i))&&"boolean"==typeof i?(n=!0,o({headers:e},a)):a})},getTileByPosition:function(e,t){var r,n;return e&&Array.isArray(e)&&2<=e.length&&e.every((function(e){return"number"==typeof e}))?(r=(e=Ke.MercatorCoordinate.fromLngLat({lng:e[0],lat:e[1]})).x,e=e.y,t=null!=(n=t)?n:this.getZoom(),n=Math.floor(t),t=Math.pow(2,n),[Math.floor(r*t),Math.floor(e*t),n]):[]},getPositionByTile:function(e){var t,r,n,i;return!(e&&Array.isArray(e)&&3===e.length&&e.every((function(e){return"number"==typeof e})))||(i=e[0],t=e[1],e=Math.floor(e[2]),e=Math.pow(2,e),i<0)||t<0||e<=i||e<=t?[]:(r=w(t/e),n=b(i/e),i=b((i+1)/e),[n,w((t+1)/e),i,r])},getTilesByBounds:function(e,t){var r=void 0===(r=(t=null!=(t=t=void 0===t?{}:t)?t:{}).expand)?0:r,n=(t=void 0!==(t=t.reversal)&&t,e=null!=(i=e)?i:this.getZoom(),Math.floor(e)),i=this.getBounds().toArray(),o=(e=this.getTileByPosition(i[0],n))[0],a=e[1],s=(e=this.getTileByPosition(i[1],n))[0],l=e[1];if(l-=r="number"!=typeof r||r<0||2<r?0:r,s+=r,a+=r,!(_(o-=r)&&_(s)&&_(l)&&_(a)))return[];var u=[];if(t)for(var c=l;c<=a;c++)for(var h=o;h<=s;h++)u.push([h,c,n]);else for(var p=o;p<=s;p++)for(var f=l;f<=a;f++)u.push([p,f,n]);var d=Math.pow(2,n);return u.forEach((function(e){e[0]<0&&(e[0]=e[0]+d)})),u.filter((function(e){return 0<=e[1]}))},loadSpriteGraph:function(e){var t=this;return new Promise(function(){var n=r(s().mark((function n(i){var o,a,l,u;return s().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(e)return o=[],"object"==typeof e&&e.image&&e.json?o=[e]:Array.isArray(e)&&e.every((function(e){return"object"==typeof e&&e.image&&e.json}))&&(o=e),a={},l=function(){var e=r(s().mark((function e(){var t,r,n,i,l,u,c,h,p,f,d,y,m,v,g,_,b;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=0;case 1:if(t<o.length){if(r=o[t].image,n=o[t].json,i={},"string"==typeof n)return e.next=8,fetch(n).then((function(e){return e.json()}));e.next=12}else e.next=20;break;case 8:l=e.sent,i="object"==typeof l?l:{},e.next=13;break;case 12:"object"==typeof n&&(i=n);case 13:return e.next=15,function(){return he.apply(this,arguments)}(r);case 15:for(c in u=e.sent,i)_=i[c],h=_.width,p=_.height,f=_.x,d=_.y,y=_.sdf,m=_.pixelRatio,v=_.stretchX,g=_.stretchY,_=_.content,b=new ue({width:h,height:p}),ue.copy(u,b,{x:f,y:d},{x:0,y:0},{width:h,height:p}),a[c]={data:b,pixelRatio:m,sdf:y,stretchX:v,stretchY:g,content:_};case 17:t++,e.next=1;break;case 20:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),n.next=7,l();n.next=9;break;case 7:for(u in a)t.style.addImage(u,a[u]);i();case 9:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}())},MapClusterMarker:function(e){return new fe(this,e)},MapSourceEvent:function(e,t){return new ye(this,e,t)},TileByGeoJson:function(e){return new Ee(this,e)},MapMenu:function(e){return new Se(this,e)},MapMeasure:function(e){return new Xe(this,e,it)},addControl:function(e,t){return this.initData(),a.call(this,e,t)},MapTileClusterCustom:function(e){return new Ye(this,e)},updateGlyphs:function(e){this.style.updateGlyphs(e)},orderLayers:function(e){void 0===e&&(e=[]);var t=this.style._layers,r=Object.keys(t).map((function(e){return t[e]})),n=[],i=[];return e.forEach((function(e){var t;e&&(t=r.find((function(t){return t.id===e})))&&n.push(t)})),r.forEach((function(e){n.find((function(t){return t.id===e.id}))||i.push(e)})),e=i.concat(n),this.style._checkLoaded(),this.style._changed=!0,this.style._order=e.map((function(e){return e.id})),this.style._layerOrderChanged=!0,e}}}(c,t);for(a in new Event("layerdata"),h)c.prototype[a]=h[a];var p,f=Ke.Style,d=function(e){var t=e.prototype.addImage,r=e.prototype.updateImage,n=e.prototype._loadSprite,i=e.prototype.queryRenderedFeatures,o=e.prototype.addLayer,a=e.prototype.removeLayer;return{addImage:function(e,r){return r.type="custom",t.call(this,e,r),this},updateImage:function(e,t){t.type="custom",r.call(this,e,t)},_loadSprite:function(e,t){var r,i=this;void 0===t&&(t=!1),n.call(this,e),t&&(r=this._availableImages.length,this.map.on("data",(function e(t){var n=i._availableImages.length;if("style"===t.dataType&&n!==r&&r<n){for(var o=i._availableImages.slice(r),a=0;a<o.length;a++)i.imageManager.images[o[a]].type="custom";i.map.off("data",e)}})))},loadSprite:function(e){this._loadSprite(e,!0)},addLayer:function(e,t){for(var r=void 0===(r=e.interactive)||r,n=(null!=this&&null!=(n=this[it])&&n.layerObject||st(this,{layerObject:{}}),this),i=["layerObject",e.id],a=n[it],s=0;s<i.length-1;s++){var l=i[s];a[l]||(a[l]={}),a=a[l]}a[i[i.length-1]]=r,o.call(this,e,t)},removeLayer:function(e){var t=["layerObject",e];if(t.reduce((function(e,t){return e[t]}),this[it])){for(var r=this[it],n=0;n<t.length-1;n++)r=r[t[n]];r&&t[t.length-1]in r&&delete r[t[t.length-1]]}a.call(this,e)},queryRenderedFeatures:function(e,t,r){var n=i.call(this,e,t,r);if(0<n.length)for(var o=0;o<n.length;o++){var a=lt(this,["layerObject",n[o].layer.id]);n[o].layer.interactive=null==a||a}return n.filter((function(e){return e.layer.interactive}))},updateGlyphs:function(e){this.glyphManager.setURL(e)}}}(f);for(p in d)f.prototype[p]=d[p];var y=(e=Ke.Popup).prototype.setDOMContent;e.prototype._closeClick=function(){},e.prototype.setDOMContent=function(e){return e=y.call(this,e),this._closeButton&&this._closeButton.addEventListener("click",this._closeClick),e}}},RegisterMapBoxModel:()=>function(e,t){if(Ke&&e&&t){($e=e).GLTFLoader=t,window.THREE=$e;var r,n=Ke.Map,i={initGLTF:function(e,t,r){return new A(e,t,r)}};for(r in i)n.prototype[r]=i[r]}},RegisterMapClass:()=>function(e,t){var r;e&&(r=(t=null!=t?t:{}).tooltipClass,t=t.popupClass,e.tooltipClass=null!=r?r:"commonTooltip",e.popupClass=null!=t?t:"commonPopup")},deepClone:()=>l,gcj02ToWgs84:()=>xe,getArrayDepth:()=>m,getGifSymbol:()=>function(e){var t,r=void 0===(t=(e=null!=e?e:{}).width)?50:t,n=void 0===(t=e.height)?50:t,i=void 0===(t=e.duration)?100:t,o=void 0===(t=e.url)?"":t;return new Promise((function(e){var t,a,s;o&&("gif"===(s=(a=o).split("/"))[s.length-1].split(".").pop().toLowerCase()||a.startsWith("data:image/gif"))?(s=document.createElement("div"),(a=document.createElement("img")).setAttribute("rel:animated_src",o),a.setAttribute("rel:auto_play","0"),s.appendChild(a),(t=new(P())({gif:a})).load((function(){for(var o,a=[],s=1;s<=t.get_length();s++){t.move_to(s);var l=((l=t.get_canvas().getContext("2d")).drawImage(t.get_canvas(),0,0,r,n),l.getImageData(0,0,r,n).data);a.push(l)}0<a.length?(o={width:r,height:n,data:new Uint8Array(r*n*4),onAdd:function(e){this.map=e,(e=document.createElement("canvas")).width=this.width,e.height=this.height,this.canvas=e,this.context=e.getContext("2d"),this.index=0,this.duration=i,this.dataNow=performance.now()},render:function(){var e=a[this.index];return performance.now()-this.dataNow>this.duration&&(this.index++,this.index>=a.length&&(this.index=0),this.dataNow=performance.now()),this.data=e,this.map.triggerRepaint(),!0}},e(o)):e(null)}))):e(null)}))},getPositionType:()=>d,getSymbolRipple:()=>function(e){var t,r=void 0===(t=(e=null!=e?e:{}).size)?30:t,n=void 0===(t=e.duration)?1e3:t,i=void 0===(t=e.color)?"#f00":t,o=e.custom,a=v(i,!0),s=!1;return o&&"function"==typeof o&&(s=!0),{width:r,height:r,data:new Uint8Array(r*r*4),onAdd:function(e){this.map=e,(e=document.createElement("canvas")).width=this.width,e.height=this.height,this.context=e.getContext("2d")},render:function(){var e,t,l,u=this.context;return s?u=o({width:this.width,height:this.height,duration:n,color:i,context:u}):(e=performance.now()%n/n,t=r/2*.2,l=r/2*e,u.clearRect(0,0,this.width,this.height),u.beginPath(),u.arc(this.width/2,this.height/2,l,0,2*Math.PI),u.strokeStyle="rgba("+a[0]+","+a[1]+","+a[2]+","+(1-e+.1)+")",u.lineWidth=2,u.stroke(),u.fillStyle="rgba("+a[0]+","+a[1]+","+a[2]+","+(1-e)+")",u.fill(),u.beginPath(),u.arc(this.width/2,this.height/2,t,0,2*Math.PI),u.fillStyle="rgba("+a[0]+","+a[1]+","+a[2]+","+(1-e)+")",u.lineWidth=2+4*(1-e),u.fill()),this.data=u.getImageData(0,0,this.width,this.height).data,this.map.triggerRepaint(),!0}}},hexToRgba:()=>v,isClosedGraph:()=>y,isGeoJSON:()=>u,isNumber:()=>g,isValidNumber:()=>_,judgeSizeLngLat:()=>h,latFromMercatorY:()=>w,lngFromMercatorX:()=>b,mergeGeoJson:()=>function(){for(var e={type:"FeatureCollection",features:[]},t=[],r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];for(var o=0;o<n.length;o++)Array.isArray(n[o])?t.push.apply(t,n[o]):n[o]&&"object"==typeof n[o]&&t.push(n[o]);for(var a,s=0;s<t.length;s++){var l=t[s];u(l)&&(l=l.features,(a=e.features).push.apply(a,l))}return e},object2Geojson:()=>function(e,t,r){var n=l(e);if(!Array.isArray(n))return null;e={type:"FeatureCollection"};for(var i=[],o=function(e){var o=n[e],a=function(e,t){if(t)if("string"==typeof t){var r=t.split(".").filter(Boolean);if(1!==r.length)return f(e,r);if(r=e[r[0]])return[p(r)]}else if(Array.isArray(t)){if(2===t.length)return[[e[t[0]],e[t[1]]].filter(Boolean)];if(3===t.length&&t[2])return f(e,r=t[2].split(".").filter(Boolean),[t[0],t[1]])}return[]}(o,t);0<a.length&&a.map((function(t){var a=d(t),s=!1;(s=!(!a||!("type"===a||0<t.length||"Feature"===a||"GeometryCollection"===a))||s)&&("GeometryCollection"===a?(null!=(s=t.geometries)?s:[]).forEach((function(t){var o={type:"Feature"};o.geometry=t,r&&r.key&&"string"==typeof r.key&&(r.alias&&"string"==typeof r.alias?o[r.alias]=n[e][r.key]:o[r.key]=n[e][r.key]),i.push(o)})):(s={type:"Feature"},"Feature"!==a?(s.properties=o,s.geometry="type"===a?t:{type:a,coordinates:t}):s=t,r&&r.key&&"string"==typeof r.key&&(r.alias&&"string"==typeof r.alias?s[r.alias]=n[e][r.key]:s[r.key]=n[e][r.key]),i.push(s)))}))},a=0;a<n.length;a++)o(a);return e.features=i,e},outOfChina:()=>we,parseValue:()=>L,performChunk:()=>function(e,t,r){var n,i,o=[];"number"==typeof e?o=new Array(e):Array.isArray(e)&&(o=e),0!==o.length&&"function"==typeof t&&(!(n="function"==typeof r?r:null)&&globalThis.requestIdleCallback&&(n=function(e){requestIdleCallback((function(t){e((function(){return 0<t.timeRemaining()}))}))}),i=0,function e(){i!==o.length&&n((function(r){for(var n=Date.now();r(Date.now()-n)&&i<o.length;){var a=o[i];t(a,i),i++}e()}))}())},resversalGeojson:()=>function(e,t){if(void 0===t&&(t=!0),u(e)){for(var r={type:"FeatureCollection",features:[]},n=e.features,i=0;i<n.length;i++){var a,s=n[i],l={};for(a in s)"geometry"!==a&&"properties"!==a&&"type"!==a&&(l[a]=s[a]);var p=s.geometry.coordinates,f=s.geometry.type,d={type:f,coordinates:null};d.coordinates=("Point"===f?h:c)(p,t),r.features.push(o({type:"Feature",geometry:d,properties:s.properties},l))}return r}return null},reversalLngLat:()=>c,transformGeojson:()=>function(e,t){return u(e)&&"function"==typeof t?((e=l(e)).features.forEach((function(e){var r=e.geometry;e.geometry.coordinates=x(r.coordinates,t)})),e):null},transformLngLat:()=>x,wgs84ToGcj02:()=>function(e,t){var r,n,i,o,a;return we(e=+e,t=+t)?[e,t]:(r=_e(e-105,t-35),n=be(e-105,t-35),i=t/180*me,o=Math.sin(i),o=1-ge*o*o,a=Math.sqrt(o),r=180*r/(ve*(1-ge)/(o*a)*me),[e+(n=180*n/(ve/a*Math.cos(i)*me)),t+r])}});var a=e(687),s=e.n(a),l=function e(t){var r,n,i="object"!=(i=typeof(r=t))?i:Object.prototype.toString.call(r).replace(/^\[object (\S+)\]$/,"$1");if("Array"===i)n=[];else{if("Object"!==i)return t;n={}}if("Array"===i)for(var o=0,a=t.length;o<a;o++)n.push(e(t[o]));else if("Object"===i)for(var s in t)n[s]=e(t[s]);return n};function u(e){return"object"==typeof e&&null!==e&&"FeatureCollection"===e.type&&Array.isArray(e.features)}function c(e,t){return void 0===t&&(t=!0),e&&("string"==typeof e&&(e=JSON.parse(e)),Array.isArray(e))?g(e[0])?h(e,t):function e(t){for(var r=[],n=0;n<t.length;n++){var i=t[n];g(i[0])?r.push(h(i)):r.push(e(i))}return r}(e):[]}function h(e,t){void 0===t&&(t=!0);var r=Number(e[0]);return e=Number(e[1]),t&&r<e?[e,r]:[r,e]}function p(e){return"string"==typeof e?JSON.parse(e):e}function f(e,t,r){var n=[],i=2===(r=void 0===r?[]:r).length;return function e(t,o){var a;t&&o.length&&(a=o.shift(),t.hasOwnProperty(a))&&(t=L(t[a]),Array.isArray(t)?0!==o.length||i?t.forEach((function(t){i?n.push([t[r[0]],t[r[1]]]):e(t,l(o))})):t&&(a=p(t),n.push(a)):"object"==typeof t?0===o.length?n.push(i?[t[r[0]],t[r[1]]]:t):e(t,o):0===o.length&&t&&(a=p(t),n.push(a)))}(e,t),n}function d(e){if(Array.isArray(e)){var t=m(e=e.filter(Boolean));if(0!==t)switch(t){case 1:return"Point";case 2:return"LineString";case 3:return y(e.map((function(e){return[e[0],e[e.length-1]]})))?"Polygon":"MultiLineString";case 4:return"MultiPolygon";default:return null}}else if(e&&"object"==typeof e){if(["Point","LineString","Polygon","MultiLineString","MultiPolygon"].includes(e.type))return"type";if("Feature"===e.type)return"Feature";if("GeometryCollection"===e.type)return"GeometryCollection"}return null}function y(e){if(0===e.length)return!1;function t(e,t,r){return void 0===r&&(r=1e-9),Math.abs(e[0]-t[0])<r&&Math.abs(e[1]-t[1])<r}for(var r=0;r<e.length-1;r++)if(!t(e[r][1],e[r+1][0]))return!1;return t(e[0][0],e[e.length-1][1])}function m(e){return Array.isArray(e)?Array.isArray(e[0])?1+m(e[0]):1:0}function v(e,t){void 0===t&&(t=!1);var r,n,i=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(function(e,t,r,n){return t+t+r+r+n+n}));return(i=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(i))?(r=parseInt(i[1],16),n=parseInt(i[2],16),i=parseInt(i[3],16),t?[r,n,i,1]:"rgba("+r+","+n+","+i+",1)"):e}function g(e){return"number"==typeof e||!("string"!=typeof e||!e||e.includes(" ")||isNaN(Number(e)))}function _(e){return isFinite(e)&&!isNaN(e)}function b(e){return 360*e-180}function w(e){return 360/Math.PI*Math.atan(Math.exp((180-360*e)*Math.PI/180))-90}function x(e,t){return e&&"function"==typeof t&&("string"==typeof e&&(e=JSON.parse(e)),Array.isArray(e))?g(e[0])?t(e):function e(t,r){for(var n=[],i=0;i<t.length;i++){var o=t[i];g(o[0])?n.push(r(o)):n.push(e(o,r))}return n}(e,t):[]}function L(e){try{return"string"==typeof e?JSON.parse(e):e}catch(t){return e}}a=e(481);var P=e.n(a),M=["customName"],E=function(){function e(e,t,n){var a=this,l=(this._mouseEnter=function(){var e=r(s().mark((function e(t){var r,n,i,o,l,u,c,h,p,f,d;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("Map"!==t.originalEvent.target.ariaLabel)return e.abrupt("return");e.next=2;break;case 2:if(r=t.point,n=t.lngLat,i=a.map.queryRenderedFeatures(r),u=null!=(u=i[0])?u:{},o=u.properties,l=u.geometry,u.source,u=u.layer,a.layerName.includes(u.id)){e.next=8;break}return null!=(u=a.popup)&&u.remove(),e.abrupt("return");case 8:if(u=l.coordinates,c=[n.lng,n.lat],"mouseenter"===a.mouseType&&(c=a._getPosition(u)),!(0<(null==(f=c)?void 0:f.length))){e.next=19;break}for(p in h={},o)if("string"==typeof o[p]&&isNaN(Number(o[p])))try{h[p]=JSON.parse(o[p])}catch(e){h[p]=o[p]}else h[p]=o[p];return e.next=16,a.htmlCallBack(h,c,{lngLat:n,geometry:l,point:r,features:i,feature:i[0]});case 16:f=e.sent,d=function(e){a.popup.setLngLat(c).setHTML(e).addTo(a.map)},"object"==typeof f?f.hasOwnProperty("nodeType")?d(f):f.hasOwnProperty("show")&&"boolean"==typeof f.show?f.show&&d(f.data):d(""):"string"!=typeof f&&"number"!=typeof f||d(f);case 19:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this._mouseLeave=function(){a.popup.remove()},this.map=e,"string"==typeof t?this.layerName=[t]:Array.isArray(t)&&(this.layerName=t),e=null!=(t=e.tooltipClass)?t:"commonTooltip",void 0!==(l=(t=null!=n?n:{}).customName)&&l);t=i(t,M),l=l?"":e+" ",this.className=l,null!=n&&n.className&&(l+=n.className),l=l.split(" ").filter(Boolean).join(" "),this.fullName=l,this.popup=new mapboxgl.Popup(o({},t,{className:l,closeButton:null!=(e=null==n?void 0:n.closeButton)&&e,closeOnClick:null!=(t=null==n?void 0:n.closeOnClick)&&t,anchor:null!=(l=null==n?void 0:n.anchor)?l:"left",type:"tooltip"}))}var t=e.prototype;return t.show=function(e,t){var r=this;"function"==typeof(this.htmlCallBack=e)&&(this.mouseType="mouseenter","move"===t&&(this.mouseType="mousemove"),0<(null==(e=this.layerName)?void 0:e.length))&&this.layerName.forEach((function(e){r.map.on(r.mouseType,e,r._mouseEnter).on("mouseleave",e,r._mouseLeave)}))},t.setClassName=function(e,t){var r=this;void 0===t&&(t=!1),this.popup&&"string"==typeof e&&e!==this.oldClassName&&(Array.from(this.popup._classList).map((function(e){e&&e.replaceAll(" ","")&&r.popup.addClassName(e)})),(t?this.fullName+" "+e:this.className+" "+e).split(" ").filter(Boolean).map((function(e){r.popup.addClassName(e)})),this.oldClassName=e)},t.destroy=function(){var e,t=this;null!=(e=this.popup)&&e.remove(),null!=(e=this.layerName)&&e.forEach((function(e){t.map.off(t.mouseType,e,t._mouseEnter).off("mouseleave",e,t._mouseLeave)}))},t._getPosition=function(e){return function e(t){return Array.isArray(t[0])?e(t[0]):t}(e)},e}(),k=["destroyComponent","customClick","popupClose","closeOther","noCloseLayerName","customName","offset","closeClick"],C=function(){function e(e,t,n){var a=this,l=(this._closeOtherPopup=function(){var e;a.closeOther&&null!=(e=a.map)&&null!=(e=e._popups)&&e.forEach((function(e){var t;"popup"===e.options.type&&(Array.isArray(a.noCloseLayerName)&&0<a.noCloseLayerName.length?(t=e.options.sourceName.join("|"),new RegExp(t).test(a.noCloseLayerName)&&null!=e&&null!=(t=e._onClose)&&t.call(e)):null!=e&&null!=(t=e._onClose)&&t.call(e))}))},this._click=function(){var e=r(s().mark((function e(t){var r,n,i,o,l,u,c,h,p,f,d,y,m,v;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("Map"!==t.originalEvent.target.ariaLabel)return e.abrupt("return");e.next=2;break;case 2:if(a._closeOtherPopup(),r=t.point,n=t.lngLat,i=a.map.queryRenderedFeatures(r),c=null!=(c=i[0])?c:{},o=c.properties,l=c.geometry,c.source,c=c.layer,a.layerName.includes(c.id)){e.next=8;break}return e.abrupt("return");case 8:if(a.customClick){e.next=30;break}for(p in h={},o)if("string"==typeof o[p]&&isNaN(Number(o[p])))try{h[p]=JSON.parse(o[p])}catch(e){h[p]=o[p]}else h[p]=o[p];return f=l.coordinates,d=l.type,e.next=14,null==(c=a.componentCallBack)?void 0:c.call(a,{properties:h,lngLat:n,coordinates:f,point:r,features:i,feature:i[0]});case 14:if(e.t1=u=e.sent,e.t0=null!==e.t1,!e.t0){e.next=18;break}e.t0=void 0!==u;case 18:e.t0?(e.t2=u,e.next=23):e.next=22;break;case 22:e.t2={};case 23:m=e.t2,y=m.component,m=m.instance,v=n,"Point"===d&&(v=f),a.vueInstance=m,y&&(a.popup.setOffset(a.offset),a.popup.setLngLat(v).setDOMContent(y).addTo(a.map));case 30:"function"==typeof a.callBack&&a.callBack({lngLat:n,properties:o,geometry:l,point:r});case 31:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.map=e,this.popup=null,"string"==typeof t?this.layerName=[t]:Array.isArray(t)&&(this.layerName=t),void 0!==(u=(t=n||{}).destroyComponent)&&u),u=void 0!==(u=t.customClick)&&u,c=void 0!==(c=t.popupClose)&&c,h=void 0===(h=t.closeOther)||h,p=void 0===(p=t.noCloseLayerName)?[]:p,f=void 0!==(f=t.customName)&&f,d=void 0===(d=t.offset)?[0,0]:d,y=t.closeClick;t=i(t,k),e=null!=(e=e.popupClass)?e:"commonPopup",f=f?"":e+" ",this.className=f,null!=n&&n.className&&(f+=n.className),f=f.split(" ").filter(Boolean).join(" "),this.fullName=f,this.noCloseLayerName=p,this.noCloseLayerName=[],this.customClick=u,this.popupCloseSign=c,this.closeOther=h,this.offset=d="number"==typeof d?[d,d]:d,this.vueInstance=null,this.closeCallback=null,this.customClick||(this.popup=new mapboxgl.Popup(o({},t,{offset:d,className:f,closeButton:null!=(e=null==t?void 0:t.closeButton)&&e,closeOnClick:null!=(n=null==t?void 0:t.closeOnClick)&&n,anchor:null!=(p=null==t?void 0:t.anchor)?p:"bottom",focusAfterOpen:null!=(u=null==t?void 0:t.focusAfterOpen)&&u,type:"popup",sourceName:this.layerName})),y&&"function"==typeof y&&(this.popup._closeClick=y),null!=(c=this.popup)&&c.on("close",(function(e){"function"==typeof a.closeCallback&&a.closeCallback(e),a.popupCloseSign&&null!=(e=a.vueInstance)&&e.popupClose&&"function"==typeof a.vueInstance.popupClose&&a.vueInstance.popupClose(),a.vueInstance&&l&&null!=(e=a.vueInstance)&&e.$destroy()})))}var t=e.prototype;return t.show=function(e,t){var r=this;this.componentCallBack=e,this.callBack=t,0<(null==(e=this.layerName)?void 0:e.length)&&this.layerName.forEach((function(e){r.map.on("click",e,r._click)}))},t.setClassName=function(e,t){var r=this;void 0===t&&(t=!1),this.popup&&"string"==typeof e&&e!==this.oldClassName&&(Array.from(this.popup._classList).map((function(e){r.popup.removeClassName(e)})),(t?this.fullName+" "+e:this.className+" "+e).split(" ").filter(Boolean).map((function(e){e&&e.replaceAll(" ","")&&r.popup.addClassName(e)})),this.oldClassName=e)},t.showPosition=function(e,t,r,n){e&&(this._closeOtherPopup(),(r=(null!=r?r:{}).offset)&&this.popup.setOffset(r),this.popup.setLngLat(e).setDOMContent(t).addTo(this.map),n)&&"function"==typeof n&&n()},t.close=function(){var e;null!=(e=this.popup)&&e._onClose()},t.closeBack=function(e){this.closeCallback=e},t.destroy=function(){var e,t=this;null!=(e=this.popup)&&e.remove(),null!=(e=this.layerName)&&e.forEach((function(e){t.map.off("click",e,t._click)}))},e}(),A=function(){function e(e,t,r){var n=this,i=(this.clickEvent=function(e){var t=new THREE.Vector2,r=n.map.getCanvas();t.x=(e.clientX-r.getBoundingClientRect().left)/r.offsetWidth*2-1,t.y=-(e.clientY-r.getBoundingClientRect().top)/r.offsetHeight*2+1,e=(new THREE.Matrix4).getInverse(n.camera.projectionMatrix),r=(new THREE.Vector3).applyMatrix4(e),t=new THREE.Vector3(t.x,t.y,1).applyMatrix4(e).clone().sub(r).normalize(),(e=new THREE.Raycaster).set(r,t),r=e.intersectObjects(n.scene.children,!0),n.callback&&0<r.length&&(t=r[0],e=n.findProperties(t.object),n.callback(e))},this.findProperties=function(e){var t={},r=null;return"Scene"!==e.type&&(r=(e.lngLat?(t=e.properties,e):(t=(e=n.findProperties(e.parent)).properties,e)).lngLat),{properties:t,lngLat:r}},this.id="3d-"+e,this.type="custom",this.renderingMode="3d","function"==typeof r&&(this.callback=r),e=t.lngLat,r=t.url,void 0===(i=t.scale)?1:i),o=void 0===(o=t.height)?0:o,a=void 0===(a=t.rotate)?[Math.PI/2,0,0]:a,s=void 0===(s=t.properties)?{}:s,l=void 0===(l=t.AmbientLight)?{show:!0,color:16777215,intensity:.5}:l,u=void 0===(u=t.DirectionalLight)?[]:u,c=void 0===(c=t.PointLight)?[]:c;t=void 0!==(t=t.click)&&t,this.lngLat=e,this.url=r,this.scale=i,this.height=o,this.rotate=a,this.properties=s,this.AmbientLight=l,this.DirectionalLight=u,this.PointLight=c,this.click=t,this.modelAsMercatorCoordinate=mapboxgl.MercatorCoordinate.fromLngLat(e,o),this.modelTransform={translateX:this.modelAsMercatorCoordinate.x,translateY:this.modelAsMercatorCoordinate.y,translateZ:this.modelAsMercatorCoordinate.z,rotateX:a[0],rotateY:a[1],rotateZ:a[2],scale:i*this.modelAsMercatorCoordinate.meterInMercatorCoordinateUnits()}}var t=e.prototype;return t.onAdd=function(e,t){var r,n,i=this;this.map=e,e=this.map.getCanvas(),this.camera=new THREE.PerspectiveCamera(50,e.innerWidth/e.innerHeight,.1,1e4),this.scene=new THREE.Scene,this.AmbientLight&&this.AmbientLight.show&&(n=this.AmbientLight.color||16777215,r=this.AmbientLight.intensity||.5,n=new THREE.AmbientLight(n,r),this.scene.add(n)),this.DirectionalLight&&Array.isArray(this.DirectionalLight)&&this.DirectionalLight.forEach((function(e){var t=e.color||16777215,r=e.intensity||1;e=e.position||[0,0,0],(t=new THREE.DirectionalLight(t,r)).position.set(e[0],e[1],e[2]).normalize(),i.scene.add(t)})),this.PointLight&&Array.isArray(this.PointLight)&&this.PointLight.forEach((function(e){var t=e.color||16777215,r=e.intensity||1,n=e.distance||0,o=e.decay||2;e=e.position||[0,0,0],(t=new THREE.PointLight(t,r,n,o)).position.set(e[0],e[1],e[2]).normalize(),i.scene.add(t)})),(new THREE.GLTFLoader).load(this.url,(function(e){for(var t=0;t<e.scene.children.length;t++)e.scene.children[t].properties=i.properties,e.scene.children[t].lngLat=i.lngLat;i.scene.add(e.scene)})),this.renderer=new THREE.WebGLRenderer({canvas:e,context:t,antialias:!0}),this.renderer.autoClear=!1,this.click&&this.renderer.domElement.addEventListener("click",this.clickEvent)},t.render=function(e,t){var r=(new THREE.Matrix4).makeRotationAxis(new THREE.Vector3(1,0,0),this.modelTransform.rotateX),n=(new THREE.Matrix4).makeRotationAxis(new THREE.Vector3(0,1,0),this.modelTransform.rotateY),i=(new THREE.Matrix4).makeRotationAxis(new THREE.Vector3(0,0,1),this.modelTransform.rotateZ),o=(new THREE.Matrix4).fromArray(t);r=(new THREE.Matrix4).makeTranslation(this.modelTransform.translateX,this.modelTransform.translateY,this.modelTransform.translateZ).scale(new THREE.Vector3(this.modelTransform.scale,-this.modelTransform.scale,this.modelTransform.scale)).multiply(r).multiply(n).multiply(i),this.camera.projectionMatrix.elements=t,this.camera.projectionMatrix=o.multiply(r),this.renderer.state.reset(),this.renderer.render(this.scene,this.camera),this.map.triggerRepaint()},t.onRemove=function(){this.click&&this.renderer.domElement.removeEventListener("click",this.clickEvent),this.renderer&&(this.renderer.dispose(),this.renderer=null),this.scene&&(this.scene.clear(),this.scene=null)},e}(),N=function(){function e(e){this.map=e,this.sourceName=[],this.sourceType="geojson"}var t=e.prototype;return t.draw=function(e,t,r){if(e&&this.map)return"vector"===e.type?(this.sourceName=[t],this.sourceType="vector",this._clearSource(),this._addSourceLayer(t,e,r),this.sourceName):"FeatureCollection"===e.type||Array.isArray(e.features)?(this.sourceName=[t],this._clearSource(),this._addSourceLayer(t,e,r),r.lineConfig?[].concat(this.sourceName,[this.lineName]):this.sourceName):void 0},t.destroy=function(){this._clearSource()},t.visible=function(e){var t,r=this;"boolean"==typeof e&&null!=(t=this.sourceName)&&t.forEach((function(t){r.map.getLayer(t)&&r.map.setLayoutProperty(t,"visibility",e?"visible":"none")}))},t._addSourceLayer=function(e,t,r){"vector"===this.sourceType?this.map.addSource(e,o({},t,r.sourceConfig)):this.map.addSource(e,o({type:"geojson",data:t},r.sourceConfig)),(t=r.beforeId||null)&&!this.map.getLayer(t)&&(t=null),this.map.addLayer(o({id:e,type:"line",source:e},r.layerConfig),t),r.lineConfig&&(this.lineName=e+"-highlight",this.map.addLayer(o({id:this.lineName,type:"line",source:e},r.lineConfig)))},t._clearSource=function(){var e,t=this;null!=(e=this.sourceName)&&e.forEach((function(e){var r;(null==(r=t.map)?void 0:r.getSource(e))&&(t.map.getLayer(e)&&t.map.removeLayer(e),t.lineName&&t.map.getLayer(e+"-highlight")&&t.map.removeLayer(e+"-highlight"),t.map.removeSource(e))}))},e}(),S=function(){function e(e){this.map=e,this.sourceName=[],this.type="symbol",this.sourceType="geojson"}var t=e.prototype;return t.draw=function(e,t,r){if(e&&this.map){if("vector"===e.type)return this.sourceType="vector",this._addSourceLayer(t,e,r),this.sourceName=[t],this.sourceName;var n;if("FeatureCollection"===e.type||Array.isArray(e.features)){this.type=null!=(n=r.type)?n:"symbol";var i=r.sliceNum;if(!i||i<1e3)this.sourceName=[t],this._clearSource(),this._addSourceLayer(t,e,r);else{this._clearSource();for(var o=0,a=0;a<e.features.length;a+=i){var s={type:"FeatureCollection",features:[]},l=e.features.slice(a,i);s.features=[].concat(l),l=t+"-"+o,this.sourceName.push(l),this._addSourceLayer(l,s,r),o++}}return this.sourceName}}},t.destroy=function(){this._clearSource()},t.visible=function(e){var t,r=this;"boolean"==typeof e&&null!=(t=this.sourceName)&&t.forEach((function(t){r.map.getLayer(t)&&r.map.setLayoutProperty(t,"visibility",e?"visible":"none")}))},t._clearSource=function(){var e,t=this;null!=(e=this.sourceName)&&e.forEach((function(e){var r;(null==(r=t.map)?void 0:r.getSource(e))&&(t.map.getLayer(e)&&t.map.removeLayer(e),t.map.removeSource(e))}))},t._addSourceLayer=function(e,t,r){"vector"===this.sourceType?this.map.addSource(e,o({},t,r.sourceConfig)):this.map.addSource(e,o({type:"geojson",data:t},r.sourceConfig)),(t=r.beforeId||null)&&!this.map.getLayer(t)&&(t=null),this.map.addLayer(o({id:e,type:this.type,source:e},r.layerConfig),t)},e}(),T={centimeters:100*(a=6371008.8),centimetres:100*a,degrees:a/111325,feet:3.28084*a,inches:39.37*a,kilometers:a/1e3,kilometres:a/1e3,meters:a,metres:a,miles:a/1609.344,millimeters:1e3*a,millimetres:1e3*a,nauticalmiles:a/1852,radians:1,yards:1.0936*a};function I(e,t,r){var n={type:"Feature"};return 0!==(r=void 0===r?{}:r).id&&!r.id||(n.id=r.id),r.bbox&&(n.bbox=r.bbox),n.properties=t||{},n.geometry=e,n}function R(e,t,r){if(void 0===r&&(r={}),!e)throw new Error("coordinates is required");if(!Array.isArray(e))throw new Error("coordinates must be an Array");if(e.length<2)throw new Error("coordinates must be at least 2 numbers long");if(G(e[0])&&G(e[1]))return I({type:"Point",coordinates:e},t,r);throw new Error("coordinates must contain numbers")}function j(e,t,r){void 0===r&&(r={});for(var n=0,i=e;n<i.length;n++){var o=i[n];if(o.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var a=0;a<o[o.length-1].length;a++)if(o[o.length-1][a]!==o[0][a])throw new Error("First and last Position are not equivalent.")}return I({type:"Polygon",coordinates:e},t,r)}function O(e,t,r){if(void 0===r&&(r={}),e.length<2)throw new Error("coordinates must be an array of two or more positions");return I({type:"LineString",coordinates:e},t,r)}function B(e,t){var r={type:"FeatureCollection"};return(t=void 0===t?{}:t).id&&(r.id=t.id),t.bbox&&(r.bbox=t.bbox),r.features=e,r}function F(e){return e%(2*Math.PI)*180/Math.PI}function D(e){return e%360*Math.PI/180}function G(e){return!isNaN(e)&&null!==e&&!Array.isArray(e)}function U(e,t,r){if(null!==e)for(var n,i,o,a=0,s=e.type,l="FeatureCollection"===s,u="Feature"===s,c=l?e.features.length:1,h=0;h<c;h++)for(var p,f,d=(f=!!(p=l?e.features[h].geometry:u?e.geometry:e)&&"GeometryCollection"===p.type)?p.geometries.length:1,y=0;y<d;y++){var m=0,v=0,g=f?p.geometries[y]:p;if(null!==g){var _=g.coordinates,b=g.type,w=!r||"Polygon"!==b&&"MultiPolygon"!==b?0:1;switch(b){case null:break;case"Point":if(!1===t(_,a,h,m,v))return!1;a++,m++;break;case"LineString":case"MultiPoint":for(n=0;n<_.length;n++){if(!1===t(_[n],a,h,m,v))return!1;a++,"MultiPoint"===b&&m++}"LineString"===b&&m++;break;case"Polygon":case"MultiLineString":for(n=0;n<_.length;n++){for(i=0;i<_[n].length-w;i++){if(!1===t(_[n][i],a,h,m,v))return!1;a++}"MultiLineString"===b&&m++,"Polygon"===b&&v++}"Polygon"===b&&m++;break;case"MultiPolygon":for(n=0;n<_.length;n++){for(i=v=0;i<_[n].length;i++){for(o=0;o<_[n][i].length-w;o++){if(!1===t(_[n][i][o],a,h,m,v))return!1;a++}v++}m++}break;case"GeometryCollection":for(n=0;n<g.geometries.length;n++)if(!1===U(g.geometries[n],t,r))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}function z(e,t){for(var r,n,i,o,a,s,l,u,c,h=0,p="FeatureCollection"===e.type,f="Feature"===e.type,d=p?e.features.length:1,y=0;y<d;y++){for(a=p?e.features[y].geometry:f?e.geometry:e,l=p?e.features[y].properties:f?e.properties:{},u=p?e.features[y].bbox:f?e.bbox:void 0,c=p?e.features[y].id:f?e.id:void 0,o=(s=!!a&&"GeometryCollection"===a.type)?a.geometries.length:1,n=0;n<o;n++)if(null===(i=s?a.geometries[n]:a)){if(!1===t(null,h,l,u,c))return}else switch(i.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":if(!1===t(i,h,l,u,c))return;break;case"GeometryCollection":for(r=0;r<i.geometries.length;r++)if(!1===t(i.geometries[r],h,l,u,c))return;break;default:throw new Error("Unknown Geometry Type")}h++}}function H(e){var t=[1/0,1/0,-1/0,-1/0];return U(e,(function(e){t[0]>e[0]&&(t[0]=e[0]),t[1]>e[1]&&(t[1]=e[1]),t[2]<e[0]&&(t[2]=e[0]),t[3]<e[1]&&(t[3]=e[1])})),t}const q=H.default=H;function X(e,t){void 0===t&&(t={});var r=Number(e[0]),n=Number(e[1]),i=Number(e[2]),o=Number(e[3]);if(6===e.length)throw new Error("@turf/bbox-polygon does not support BBox with 6 positions");var a=[r,n];return j([[a,[i,n],[i,o],[r,o],a]],t.properties,{bbox:e,id:t.id})}const W=function(e){return X(q(e))};function J(e){if(!e)throw new Error("coord is required");if(!Array.isArray(e)){if("Feature"===e.type&&null!==e.geometry&&"Point"===e.geometry.type)return e.geometry.coordinates;if("Point"===e.type)return e.coordinates}if(Array.isArray(e)&&2<=e.length&&!Array.isArray(e[0])&&!Array.isArray(e[1]))return e;throw new Error("coord must be GeoJSON Point or an Array of numbers")}function Y(e,t,r,n){void 0===n&&(n={});var i=D((e=J(e))[0]),o=(e=D(e[1]),r=D(r),t=function(e,t){var r=T[t=void 0===t?"kilometers":t];if(r)return e/r;throw new Error(t+" units is invalid")}(t,n.units),Math.asin(Math.sin(e)*Math.cos(t)+Math.cos(e)*Math.sin(t)*Math.cos(r)));return R([F(i+Math.atan2(Math.sin(r)*Math.sin(t)*Math.cos(e),Math.cos(t)-Math.sin(e)*Math.sin(o))),F(o)],n.properties)}const V=function(e,t,r){for(var n=(r=void 0===r?{}:r).steps||64,i=r.properties||(!Array.isArray(e)&&"Feature"===e.type&&e.properties?e.properties:{}),o=[],a=0;a<n;a++)o.push(Y(e,t,-360*a/n,r).geometry.coordinates);return o.push(o[0]),j([o],i)};var Z=function(){function e(e){this.map=e,this.sourceName=[],this.lineName=""}var t=e.prototype;return t.draw=function(e,t,r){if(e){this.sourceName=[t];var n,i=null!=r?r:{},o=void 0===(n=i.radius)?0:n,a=void 0===(n=i.steps)?64:n,s=i.endRadius,l=[];if("object"==typeof e){if("FeatureCollection"!==e.type&&!Array.isArray(e.features))return;for(var u=e.features,c=0;c<u.length;c++){var h,p,f,d,y,m=u[c].geometry.coordinates;"number"==typeof m[0]&&"number"==typeof m[1]&&(m[0]<m[1]&&(h=[m[1],m[0]],m[0]=h[0],m[1]=h[1]),h=!1,p=0<(p=(h="string"==typeof o||h)?u[c].properties[o]:o)?p:0,f={steps:a,units:"kilometers",properties:u[c].properties},d=V(m,p,f),s?(y=!1,y=0<(y=(y="string"==typeof s||y)?u[c].properties[s]:s)?y:0,m=V(m,s,f),l.push(p===y?d:p<y?this._getRingJson(m.geometry.coordinates[0],d.geometry.coordinates[0],d.properties):this._getRingJson(d.geometry.coordinates[0],m.geometry.coordinates[0],d.properties))):l.push(d))}}return this._addSourceLayer(t,{type:"FeatureCollection",features:l},r),r.lineConfig?[].concat(this.sourceName,[this.lineName]):this.sourceName}},t._getRingJson=function(e,t,r){return{type:"Feature",geometry:{coordinates:[e,t],type:"Polygon"},properties:r}},t._addSourceLayer=function(e,t,r){this.lineName=e+"-line",r.lineConfig&&null!=(n=this.map)&&n.getLayer(this.lineName)&&this.map.removeLayer(this.lineName),null!=(n=this.map)&&n.getLayer(e)&&this.map.removeLayer(e),null!=(n=this.map)&&n.getSource(e)&&this.map.removeSource(e),this.map.addSource(e,o({type:"geojson",data:t},r.sourceConfig));var n=(null!=r?r:{}).beforeId;n&&!this.map.getLayer(n)&&(n=null),this.map.addLayer(o({id:e,type:"fill",source:e},r.layerConfig),n),r.lineConfig&&this.map.addLayer(o({id:this.lineName,type:"line",source:e},r.lineConfig),n)},t.destroy=function(){this._clearSource()},t.visible=function(e){var t,r=this;"boolean"==typeof e&&(null!=(t=this.sourceName)&&t.forEach((function(t){r.map.getLayer(t)&&r.map.setLayoutProperty(t,"visibility",e?"visible":"none")})),this.lineName)&&this.map.getLayer(this.lineName)&&this.map.setLayoutProperty(this.lineName,"visibility",e?"visible":"none")},t._clearSource=function(){var e,t=this;null!=(e=this.sourceName)&&e.forEach((function(e){t.map.getSource(e)&&(t.map.getLayer(e)&&t.map.removeLayer(e),t.lineName&&t.map.getLayer(e+"-line")&&t.map.removeLayer(e+"-line"),t.map.removeSource(e))}))},e}(),K=function(){function e(e,t){this.map=e,this.name=[],"string"==typeof t?this.name=[t]:Array.isArray(t)&&t.every((function(e){return"string"==typeof e}))&&(this.name=t),this.event=[]}var t=e.prototype;return t.add=function(e){var t,r=this;if(0===(null==(t=this.event)?void 0:t.length)&&e&&"object"==typeof e){var n,i=function(t){var n,i;r.event.push(t),0<(null==(i=r.name)?void 0:i.length)?null!=(i=r.name)&&i.forEach((function(n){function i(r){var n;"Map"===(null==r||null==(n=r.originalEvent)||null==(n=n.target)?void 0:n.ariaLabel)&&e[t](r)}var o;r[t]=i,null!=(o=r.map)&&o.on(t,n,i)})):(r[t]=i=function(r){var n;"Map"===(null==r||null==(n=r.originalEvent)||null==(n=n.target)?void 0:n.ariaLabel)&&e[t](r)},null!=(n=r.map)&&n.on(t,i))};for(n in e)i(n)}},t.destroy=function(e){var t,r=this;e&&Array.isArray(e)&&e.every((function(e){return"string"==typeof e}))?null!=(t=this.name)&&t.forEach((function(t){e.forEach((function(e){var n,i;r.event.includes(e)&&(i=r[e],null!=(n=r.map))&&n.off(e,t,i)}))})):0<(null==(t=this.name)?void 0:t.length)?null!=(t=this.name)&&t.forEach((function(e){r.event.forEach((function(t){var n,i=r[t];null!=(n=r.map)&&n.off(t,e,i)}))})):this.event.forEach((function(e){var t,n=r[e];null!=(t=r.map)&&t.off(e,n)}))},e}(),$=["id","type"],Q=["id","type","beforeId"],ee=function(){function e(e){this.map=e,this.sourceName=[]}var t=e.prototype;return t.draw=function(e,t){var r,n,a,s,l,c=this;return u(e)||"vector"===e.type?(r=(a=null!=(a=t.sourceConfig)?a:{}).id,n=void 0===(n=a.type)?"geojson":n,a=i(a,$),s=r,t=null!=(t=t.layerConfig)?t:{},l=[],Array.isArray(t)?l=t:"object"==typeof t&&l.push(t),l.forEach((function(e){var t;(e=e.id)&&null!=(t=c.map)&&t.getLayer(e)&&c.map.removeLayer(e)})),null!=(t=this.map)&&t.getSource(s)&&this.map.removeSource(s),"vector"===e.type?this.map.addSource(r,o({},a,e)):this.map.addSource(r,o({type:n,data:e},a)),l.forEach((function(e){var t=e.id,r=e.type,n=e.beforeId;e=i(e,Q),n&&!c.map.getLayer(n)&&(n=null),c.map.addLayer(o({id:t,type:r,source:s},e),n)})),this.sourceName=[s].concat(l.map((function(e){return e.id}))).filter(Boolean),this.sourceName=Array.from(new Set(this.sourceName)),this.sourceName):[]},t.destroy=function(){var e,t,r=this;0<(null==(t=this.sourceName)?void 0:t.length)&&(1===this.sourceName.length?this.map.getSource(this.sourceName[0])&&(this.map.removeLayer(this.sourceName[0]),this.map.removeSource(this.sourceName[0])):(e=(t=this.sourceName)[0],t=t.slice(1),this.map.getSource(e)&&(this.map.getLayer(e)&&this.map.removeLayer(e),t.forEach((function(e){r.map.removeLayer(e)})),this.map.removeSource(e))))},t.visible=function(e){var t,r=this;"boolean"==typeof e&&null!=(t=this.sourceName)&&t.forEach((function(t){r.map.getLayer(t)&&r.map.setLayoutProperty(t,"visibility",e?"visible":"none")}))},e}(),te=function(){function e(t,r,n){if((this instanceof e?this.constructor:void 0)!==e)throw new Error("MapLayer is a constructor and should be called with the new keyword");var i={layer:null,tooltip:null,popup:null};return r&&"object"==typeof r&&(i=o({},i,r)),this.name=t,this.layers=i,this.prop=null!=n?n:{},new Proxy(this,{deleteProperty:function(e,t){return(e!==this||"layers"!==t&&"name"!==t)&&(delete e[t],!0)},set:function(e,t,r){return(e!==this||"layers"!==t&&"name"!==t)&&(e[t]=r,!0)}})}var t=e.prototype;return t.addLayer=function(e){if(e&&"object"==typeof e)for(var t in e)this.layers[t]=e[t]},t.addProp=function(e){if(e&&"object"==typeof e)for(var t in e)this.prop[t]=e[t]},e}();function re(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var ne,ie,oe,ae,se=function(){function e(e,t){this.map=e,this.markers=[],this.options=t,this.properties=[]}var t=e.prototype;return t.draw=function(e,t){if(u(e))for(var r,n=null!=(r=this.options)?r:{},i=0,a=function(e,t){var r,n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){var r;if(e)return"string"==typeof e?re(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?re(e,t):void 0}(e)))return n&&(e=n),r=0,function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(e.features);!(c=a()).done;){var s,l,c=c.value;"Point"===c.geometry.type&&(s=n,t&&"function"==typeof t&&1===(null==(l=t({lngLat:c.geometry.coordinates,properties:c.properties,index:i}))?void 0:l.nodeType)&&(s=o({},s,{element:l})),l=new mapboxgl.Marker(s).setLngLat(c.geometry.coordinates).addTo(this.map),this.markers.push(l),this.properties.push(c.properties),i++)}},t.addEvent=function(e){var t=this;if(e&&"object"==typeof e)for(var r=0;r<this.markers.length;r++)!function(r){["dragstart","drag","dragend"].forEach((function(n){e[n]&&"function"==typeof e[n]&&t.markers[r].on(n,(function(i){e[n](o({},i,{properties:t.properties[r]}))}))}))}(r)},t.destroy=function(){for(var e=0;e<this.markers.length;e++)this.markers[e].remove();this.markers=[]},t.visible=function(e){var t;"boolean"==typeof e&&null!=(t=this.markers)&&t.forEach((function(t){t.getElement().style.display=e?"block":"none"}))},e}(),le=function(){function e(e,t,r){var n;r=null!=(n=r)?n:{},this.map=e,this.name=t,this.dash=Array.isArray(r.dash)?r.dash:[[0,4,3],[.5,4,2.5],[1,4,2],[1.5,4,1.5],[2,4,1],[2.5,4,.5],[3,4,0],[0,.5,3,3.5],[0,1,3,3],[0,1.5,3,2.5],[0,2,3,2],[0,2.5,3,1.5],[0,3,3,1],[0,3.5,3,.5]],this.step=null!=(n=r.step)?n:50,this.animateId=null}var t=e.prototype;return t.animate=function(){var e,t=this;this.name&&this.map.getLayer(this.name)&&function r(n){(n=parseInt(n/t.step%t.dash.length))!==e&&(t.map.setPaintProperty(t.name,"line-dasharray",t.dash[e]),e=n),t.animateId=requestAnimationFrame(r)}(e=0)},t.destroy=function(){this.animateId&&(cancelAnimationFrame(this.animateId),this.animateId=null)},e}(),ue=(a={},function(){function e(e,t){this.width=void 0,this.height=void 0,this.data=void 0;var r=this,n=e.width;if(e=e.height,t){if(t instanceof Uint8ClampedArray)t=new Uint8Array(t.buffer);else if(t.length!==n*e*4)throw new RangeError("mismatched image size")}else t=new Uint8Array(n*e*4);r.width=n,r.height=e,r.data=t}var t=e.prototype;return t.resize=function(t){var r,n,i;r=this,n=(t=new e(t)).width,i=t.height,n===r.width&&i===r.height||(ce(r,t,{x:0,y:0},{x:0,y:0},{width:Math.min(r.width,n),height:Math.min(r.height,i)},4),r.width=n,r.height=i,r.data=t.data)},t.replace=function(e,t){t?this.data.set(e):e instanceof Uint8ClampedArray?this.data=new Uint8Array(e.buffer):this.data=e},t.clone=function(){return new e({width:this.width,height:this.height},new Uint8Array(this.data))},e.copy=function(e,t,r,n,i){ce(e,t,r,n,i,4)},e}());function ce(e,t,r,n,i,o){if(0!==i.width&&0!==i.height){if(i.width>e.width||i.height>e.height||r.x>e.width-i.width||r.y>e.height-i.height)throw new RangeError("out of range source coordinates for image copy");if(i.width>t.width||i.height>t.height||n.x>t.width-i.width||n.y>t.height-i.height)throw new RangeError("out of range destination coordinates for image copy");var a=e.data,s=t.data;if(a===s)throw new RangeError("image is the same");for(var l=0;l<i.height;l++)for(var u=((r.y+l)*e.width+r.x)*o,c=((n.y+l)*t.width+n.x)*o,h=0;h<i.width*o;h++)s[c+h]=a[u+h]}}function he(){return(he=r(s().mark((function e(t,r){var n;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return void 0===r&&(r=0),e.next=3,new Promise((function(e){var n=new Image;n.src=t,n.crossOrigin="Anonymous",n.onload=function(){var t=n.width,i=n.height,o=(ne=ne||window.document.createElement("canvas")).getContext("2d",{willReadFrequently:!0});if(!o)throw new Error("failed to create canvas 2d context");(t>ne.width||i>ne.height)&&(ne.width=t,ne.height=i),o.clearRect(-r,-r,t+2*r,i+2*r),o.drawImage(n,0,0,t,i),e(o.getImageData(-r,-r,t+2*r,i+2*r))}}));case 3:return n=e.sent,e.abrupt("return",n);case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function pe(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}ie=ue,void 0===ae&&(ae={}),(oe="RGBAImage")?a[oe]?console.error(oe+" is already registered."):(Object.defineProperty(ie,"_classRegistryKey",{value:oe,writeable:!1}),a[oe]={klass:ie,omit:ae.omit||[]}):console.error("Can't register a class without a name.");var fe=function(){function e(e,t){this.map=e,this.options=null!=t?t:{key:"id"},this.markers={},this.mapEvent=null}var t=e.prototype;return t.draw=function(e,t){var r=this,n={};this.mapEvent=function(){if(r.map.getSource(e)&&r.map.isSourceLoaded(e)){for(var i,a={},s=function(e,t){var r,n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){var r;if(e)return"string"==typeof e?pe(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?pe(e,t):void 0}(e)))return n&&(e=n),r=0,function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(r.map.querySourceFeatures(e));!(h=s()).done;){var l,u,c,h,p=(h=h.value).geometry.coordinates;(h=h.properties).cluster||(l=h[r.options.key],(c=r.markers[l])?(u=c.getLngLat().toArray())[0]===p[0]&&u[1]===p[1]||c.setLngLat(p):(u=null,u="function"==typeof t?t({properties:h,lngLat:p}):document.createElement("div"),c=r.markers[l]=new mapboxgl.Marker(o({},r.options,{element:u})).setLngLat(p)),a[l]=c,n[l])||c.addTo(r.map)}for(i in n)a[i]||n[i].remove();n=a}},this.map.on("render",this.mapEvent)},t.destroy=function(){for(var e in this.markers)null!=(e=this.markers[e])&&e.remove();this.markers={},this.mapEvent&&this.map.off("render",this.mapEvent)},t.visible=function(e){if("boolean"==typeof e)for(var t in this.markers)this.markers[t]&&this.markers.hasOwnProperty(t)&&(this.markers[t].getElement().style.display=e?"block":"none")},e}(),de=["once"],ye=function(){function e(e,t,r){this.map=e,this.options=null!=r?r:{},this.sourceName=t,r=void 0===(t=(e=(this.mapEvent=null)!=r?r:{}).once)||t,t=i(e,de),this.once=r,this.other=t}var t=e.prototype;return t.open=function(e){var t=this;this.sourceName&&(this.mapEvent=function(){var r;t.map.getSource(t.sourceName)&&t.map.isSourceLoaded(t.sourceName)&&"function"==typeof e&&(r=t.map.querySourceFeatures(t.sourceName,t.other),e(r),t.once)&&t.destroy()},this.map.on("render",this.mapEvent))},t.destroy=function(){var e;null!=(e=this.map)&&e.off("render",this.mapEvent),this.mapEvent=null},e}(),me=Math.PI,ve=6378245,ge=.006693421622965943;function _e(e,t){var r=2*(e=+e)-100+3*(t=+t)+.2*t*t+.1*e*t+.2*Math.sqrt(Math.abs(e));return(r+=2*(20*Math.sin(6*e*me)+20*Math.sin(2*e*me))/3)+2*(20*Math.sin(t*me)+40*Math.sin(t/3*me))/3+2*(160*Math.sin(t/12*me)+320*Math.sin(t*me/30))/3}function be(e,t){return t=300+(e=+e)+2*(t=+t)+.1*e*e+.1*e*t+.1*Math.sqrt(Math.abs(e)),(t+=2*(20*Math.sin(6*e*me)+20*Math.sin(2*e*me))/3)+2*(20*Math.sin(e*me)+40*Math.sin(e/3*me))/3+2*(150*Math.sin(e/12*me)+300*Math.sin(e/30*me))/3}function we(e,t){return t=+t,!(73.66<(e=+e)&&e<135.05&&3.86<t&&t<53.55)}function xe(e,t){var r,n,i,o,a;return we(e,t)?[e,t]:(o=_e(e-105,t-35),a=be(e-105,t-35),r=t/180*me,n=Math.sin(r),n=1-ge*n*n,i=Math.sqrt(n),o=180*o/(ve*(1-ge)/(n*i)*me),[2*e-(e+(a=180*a/(ve/i*Math.cos(r)*me))),2*t-(t+o)])}function Le(e,t,r){if(void 0===r&&(r={}),!e)throw new Error("point is required");if(!t)throw new Error("polygon is required");var n=J(e),i=(e="Feature"===(e=t).type?e.geometry:e).type,o=(t=t.bbox,e.coordinates);if(t&&0==(e=n,t[0]<=e[0]&&t[1]<=e[1]&&t[2]>=e[0]&&t[3]>=e[1]))return!1;"Polygon"===i&&(o=[o]);for(var a=!1,s=0;s<o.length&&!a;s++)if(Pe(n,o[s][0],r.ignoreBoundary)){for(var l=!1,u=1;u<o[s].length&&!l;)Pe(n,o[s][u],!r.ignoreBoundary)&&(l=!0),u++;l||(a=!0)}return a}function Pe(e,t,r){for(var n=!1,i=0,o=(t=t[0][0]===t[t.length-1][0]&&t[0][1]===t[t.length-1][1]?t.slice(0,t.length-1):t).length-1;i<t.length;o=i++){var a=t[i][0],s=t[i][1],l=t[o][0],u=t[o][1];if(e[1]*(a-l)+s*(l-e[0])+u*(e[0]-a)==0&&(a-e[0])*(l-e[0])<=0&&(s-e[1])*(u-e[1])<=0)return!r;s>e[1]!=u>e[1]&&e[0]<(l-a)*(e[1]-s)/(u-s)+a&&(n=!n)}return n}function Me(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Ee=function(){function e(e,t){this.map=e,this.options=null!=t?t:{}}var t=e.prototype;return t.draw=function(e,t,r){var n;e&&t&&u(e)&&r&&(this.id=r,n=W(e).bbox,this.destroy(),this.map.addLayer(function(e,t,r){function n(e){if("FeatureCollection"===d.type){for(var t=0;t<d.features.length;t++)if(Le(e,d.features[t]))return!0;return!1}if("Feature"===d.type)return Le(e,d.geometry)}var i,o=r.bbox,a=r.isGCJ,s=r.replaceUrl,l=null!=(i=r.isJudgement)&&i,u=r.judgementBox,c=r.judgementPoint,h=null!=(i=r.maxZoom)?i:18,p=null!=(i=r.minZoom)?i:0,f=null!=(i=r.expand)?i:0,d=null!=(i=r.json)?i:{},y=document.createElement("canvas");return{id:e,type:"custom",onAdd:function(e,t){var r=this,n=(this.map=e,this.tileCache={},this.gridCache={},this.showTiles=[],e=t.createShader(t.VERTEX_SHADER),t.shaderSource(e,"\nuniform mat4 u_matrix;\nattribute vec3 a_pos;\nattribute vec2 a_uv;\nvarying vec2 v_uv;\nvoid main() {\n v_uv = a_uv;\n gl_Position = u_matrix * vec4(a_pos, 1.0);\n}"),t.compileShader(e),t.createShader(t.FRAGMENT_SHADER));t.shaderSource(n,"\nprecision mediump float;\nvarying vec2 v_uv;\nuniform sampler2D u_sampler;\nvoid main() {\n gl_FragColor = texture2D(u_sampler, v_uv);\n}"),t.compileShader(n),this.program=t.createProgram(),t.attachShader(this.program,e),t.attachShader(this.program,n),t.linkProgram(this.program),this.map.on("move",(function(e){r.updateLayer(t)})),this.updateLayer(t)},updateLayer:function(e){var t=this;if(!(this.map.getZoom()<p||this.map.getZoom()>h)){for(var r=parseInt(this.map.getZoom()+1.4),n=[(n=this.map.getBounds().toArray())[0][0],n[0][1],n[1][0],n[1][1]],i=Math.min(n[2],o[2]),a=Math.min(n[3],o[3]),s=Math.max(n[0],o[0]),l=(n=Math.max(n[1],o[1]),s=this.map.getTileByPosition([s,n],r),n=this.map.getTileByPosition([i,a],r),i=s[0]-f,n[0]+f),u=n[1]-f,c=s[1]+f,d=[],y=i;y<=l;y++)for(var m=u;m<=c;m++){var v={x:y,y:m,z:r};d.push(v),this.addGridCache(v,0,0),y===l&&this.addGridCache(v,1,0),m===c&&this.addGridCache(v,0,1),y===l&&m===c&&this.addGridCache(v,1,1)}a=this.map.getCenter();var g=this.map.getTileByPosition([a.lng,a.lat],r);d.sort((function(e,r){return t.tileDistance(e,g)-t.tileDistance(r,g)})),this.showTiles=[];for(var _=0,b=d;_<b.length;_++){var w,x=b[_];this.tileCache[this.createTileKey(x)]?this.showTiles.push(this.tileCache[this.createTileKey(x)]):(w=this.createTile(e,x),this.showTiles.push(w),this.tileCache[this.createTileKey(x)]=w)}}},tileDistance:function(e,t){return Math.sqrt(Math.pow(e.x-t[0],2)+Math.pow(e.y-t[1],2))},addGridCache:function(e,t,r){var n,i=this.createTileKey(e.x+t,e.y+r,e.z);this.gridCache[i]||(r=(t=this.map.getPositionByTile([e.x+t,e.y+r,e.z]))[0],e=t[1],n=t[2],t=t[3],void 0!==e&&void 0!==t&&void 0!==n&&void 0!==r&&(a?(e=xe(r,t),this.gridCache[i]={lng:e[0],lat:e[1]}):this.gridCache[i]={lng:r,lat:t}))},createTileKey:function(e,t,r){return e instanceof Object?e.z+"/"+e.x+"/"+e.y:r+"/"+e+"/"+t},createTile:function(e,r){var i,o,a,u,h,p,f,d,m=this,v=s&&"function"==typeof s?s(t,r):t.replace("{z}",r.z).replace("{x}",r.x).replace("{y}",r.y),g={xyz:r},_=this.gridCache[this.createTileKey(r)],b=this.gridCache[this.createTileKey(r.x+1,r.y,r.z)],w=this.gridCache[this.createTileKey(r.x,r.y+1,r.z)];return r=this.gridCache[this.createTileKey(r.x+1,r.y+1,r.z)],w&&b&&w&&r&&(w=mapboxgl.MercatorCoordinate.fromLngLat(w),i=mapboxgl.MercatorCoordinate.fromLngLat(r),b=mapboxgl.MercatorCoordinate.fromLngLat(b),o=mapboxgl.MercatorCoordinate.fromLngLat(_),a=_.lat,u=_.lng,_=r.lat,r=r.lng,h=(r-u)/256,p=(a-_)/256,f=this.getAllIn(u,_,r,a),_=new Float32Array([w.x,w.y,w.z,0,0,i.x,i.y,i.z,1,0,b.x,b.y,b.z,1,1,w.x,w.y,w.z,0,0,b.x,b.y,b.z,1,1,o.x,o.y,o.z,0,1]),g.aPos=e.getAttribLocation(this.program,"a_pos"),g.aUv=e.getAttribLocation(this.program,"a_uv"),g.uSamplerLoc=e.getUniformLocation(this.program,"u_sampler"),g.texture=e.createTexture(),(d=new Image).src=v,d.crossOrigin="anonymous",d.onload=function(){y.width=d.width,y.height=d.height;var t=y.getContext("2d");if(t.drawImage(d,0,0),l&&!f){for(var r=t.getImageData(0,0,y.width,y.height),i=r.data.length,o=0;o<i;o+=4){var s=(v=Math.floor(o/4))%256,v=Math.floor(v/256),_=n([s=u+s*h,v=a-v*p]);c&&"function"==typeof c&&(_=null==(s=c(s,v))||s),r.data[o+3]=_?255:0}t.putImageData(r,0,0)}e.bindTexture(e.TEXTURE_2D,g.texture),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,!0),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,y),g.isLoad=!0,m.map.triggerRepaint()},g.buffer=e.createBuffer(),e.bindBuffer(e.ARRAY_BUFFER,g.buffer),e.bufferData(e.ARRAY_BUFFER,_,e.STATIC_DRAW)),g},getAllIn:function(e,t,r,i){var o;return u&&"function"==typeof u?null==(o=u(e,t,r,i))||o:[[e,i],[e,t],[r,t],[r,i],[(e+r)/2,i],[r,(t+i)/2],[(e+r)/2,t],[e,(t+i)/2],[(e+r)/2,(t+i)/2]].every(n)},render:function(e,t){e.useProgram(this.program),e.uniformMatrix4fv(e.getUniformLocation(this.program,"u_matrix"),!1,t);for(var r=function(e,t){var r,n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){var r;if(e)return"string"==typeof e?Me(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Me(e,t):void 0}(e)))return n&&(e=n),r=0,function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(this.showTiles);!(n=r()).done;){var n=n.value;n.isLoad&&(e.bindTexture(e.TEXTURE_2D,n.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_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.bindBuffer(e.ARRAY_BUFFER,n.buffer),e.enableVertexAttribArray(n.aPos),e.enableVertexAttribArray(n.aUv),e.vertexAttribPointer(n.aPos,3,e.FLOAT,!1,20,0),e.vertexAttribPointer(n.aUv,2,e.FLOAT,!1,20,12),e.enable(e.BLEND),e.blendFunc(e.SRC_ALPHA,e.ONE_MINUS_SRC_ALPHA),e.drawArrays(e.TRIANGLES,0,6))}}}}(r,t,o({},this.options,{bbox:n,isGCJ:null!=(r=this.options.isGCJ)&&r,json:e}))))},t.destroy=function(){this.map.getLayer(this.id)&&this.map.removeLayer(this.id),this.map.getSource(this.id)&&this.map.removeSource(this.id)},e}();function ke(e){return(ke="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ce(e){return e=function(e,t){if("object"!==ke(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0===r)return String(e);if("object"!==ke(r=r.call(e,"string")))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}(e),"symbol"===ke(e)?e:String(e)}function Ae(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Ce(n.key),n)}}function Ne(e,t,r){t&&Ae(e.prototype,t),r&&Ae(e,r),Object.defineProperty(e,"prototype",{writable:!1})}var Se=function(){function e(e,t){this.map=e,this._contextMenu=null,this._moveMenu=null,this._context=null,t=(e=(this._position=null)!=t?t:{}).move,e=void 0===(e=e.className)?"mapMenu":e,this._move=void 0!==t&&t,this._className=e}var t=e.prototype;return t.init=function(e,t){var r,n=this;this.map&&!this._context&&((r=document.createElement("div")).className=this._className,r.style.display="none",r.style.position="absolute",this.map.getCanvas().offsetParent.appendChild(r),e instanceof Element?r.appendChild(e):"string"==typeof e&&(r.innerHTML=e),this._context=r,this._contextMenu=function(e){var r;n._position=e.lngLat,t&&"function"==typeof t?(r=n.map.queryRenderedFeatures(e.point),"boolean"==typeof(r=void 0===(r=(null!=(r=t(o({},e,{features:r})))?r:{}).show)||r)&&(n.visible(r),n.updateXY(e.point))):(n.visible(!0),n.updateXY(e.point))},this.map.on("contextmenu",this._contextMenu),this._move)&&(this._moveMenu=function(e){var t;n._context&&"none"!==n._context.style.display&&n._position&&(t=n.map.project([n._position.lng,n._position.lat]),n.updateXY(t))},this.map.on("move",this._moveMenu),window.addEventListener("resize",this._moveMenu))},t.visible=function(e){this._context&&(this._context.style.display=e?"block":"none")},t.updateXY=function(e){var t,r,n,i,o;this._context&&e&&(t=isNaN(Number(e.x))?0:Number(e.x),e=isNaN(Number(e.y))?0:Number(e.y),this._move||(r=(n=this._context).offsetWidth,n=n.offsetHeight,(o=(i=this.map.getCanvas()).offsetWidth)<t+r&&(t=o-r),(o=i.offsetHeight)<e+n&&(e=o-n)),this._context.style.top=e+"px",this._context.style.left=t+"px")},t.destroy=function(){this.map&&(this.map.off("contextmenu",this._contextMenu),this._contextMenu=null,this._context&&(this._context.remove(),this._context=null),this._move)&&(this.map.off("move",this._moveMenu),window.removeEventListener("resize",this._moveMenu),this._moveMenu=null)},Ne(e,[{key:"show",get:function(){var e;return null!=(e=this._context&&"none"!==this._context.style.display)&&e}}]),e}();const Te=function(e,t,r){void 0===r&&(r={}),e=J(e);var n=D((t=J(t))[1]-e[1]),i=D(t[0]-e[0]);return e=D(e[1]),t=D(t[1]),n=Math.pow(Math.sin(n/2),2)+Math.pow(Math.sin(i/2),2)*Math.cos(e)*Math.cos(t),function(e,t){var r=T[t=void 0===t?"kilometers":t];if(r)return e*r;throw new Error(t+" units is invalid")}(2*Math.atan2(Math.sqrt(n),Math.sqrt(1-n)),r.units)};function Ie(e,t){return void 0===t&&(t={}),function(e,t,r){var n,i=r,o=!1;return n=function(e,n,a,s,l){i=!1===o&&void 0===r?e:t(i,e,n,a,s,l),o=!0},function(e,t){z(e,(function(e,r,n,i,o){var a,s=null===e?null:e.type;switch(s){case null:case"Point":case"LineString":case"Polygon":return!1!==t(I(e,n,{bbox:i,id:o}),r,0)&&void 0}switch(s){case"MultiPoint":a="Point";break;case"MultiLineString":a="LineString";break;case"MultiPolygon":a="Polygon"}for(var l=0;l<e.coordinates.length;l++){var u=e.coordinates[l];if(!1===t(I({type:a,coordinates:u},n),r,l))return!1}}))}(e,(function(e,t,r){var i=0;if(e.geometry){var o,a,s,l,u=e.geometry.type;if("Point"!==u&&"MultiPoint"!==u)return l=s=a=0,!1!==U(e,(function(u,c,h,p,f){if(void 0===o||a<t||s<p||l<f)o=u,a=t,s=p,l=f,i=0;else{if(p=O([o,u],e.properties),!1===n(p,t,r,f,i))return!1;i++,o=u}}))&&void 0}})),i}(e,(function(e,r){return r=r.geometry.coordinates,e+Te(r[0],r[1],t)}),0)}function Re(e,t,r){var n,i;return!0===(r=void 0===r?{}:r).final?(Re(t,e)+180)%360:(r=J(e),e=J(t),t=D(r[0]),n=D(e[0]),r=D(r[1]),e=D(e[1]),i=Math.sin(n-t)*Math.cos(e),r=Math.cos(r)*Math.sin(e)-Math.sin(r)*Math.cos(e)*Math.cos(n-t),F(Math.atan2(i,r)))}const je=function(e,t){return Y(e,Te(e,t)/2,Re(e,t))};var Oe=6378137;function Be(e){var t=0;if(e&&0<e.length){t+=Math.abs(Fe(e[0]));for(var r=1;r<e.length;r++)t-=Math.abs(Fe(e[r]))}return t}function Fe(e){var t,r,n,i,o,a,s=0,l=e.length;if(2<l){for(a=0;a<l;a++)o=a===l-2?(n=l-2,i=l-1,0):a===l-1?(n=l-1,i=0,1):(i=(n=a)+1,a+2),t=e[n],r=e[i],s+=(De(e[o][0])-De(t[0]))*Math.sin(De(r[1]));s=s*Oe*Oe/2}return s}function De(e){return e*Math.PI/180}const Ge=function(e,t){void 0===t&&(t={});var r=0,n=0,i=0;return U(e,(function(e){r+=e[0],n+=e[1],i++}),!0),R([r/i,n/i],t.properties)};function Ue(e){return(e%=360)<0&&(e+=360),e}function ze(e){return(e%=360)<0&&(e+=360),e}const He=function(e,t,r,n,i){if(!(s=i=i||{})||s.constructor!==Object)throw new Error("options is invalid");var o,a,s=i.properties;if(!e)throw new Error("center is required");if(null==r)throw new Error("bearing1 is required");if(null==n)throw new Error("bearing2 is required");if(!t)throw new Error("radius is required");if("object"!=typeof i)throw new Error("options must be an object");return ze(r)===ze(n)?V(e,t,i):(o=function(e){if(Array.isArray(e))return e;if("Feature"===e.type){if(null!==e.geometry)return e.geometry.coordinates}else if(e.coordinates)return e.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}(e),e=function(e,t,r,n,i){var o=(i=void 0===i?{}:i).steps||64,a=(r=Ue(r),n=Ue(n),Array.isArray(e)||"Feature"!==e.type?{}:e.properties);if(r===n)return O(V(e,t,i).geometry.coordinates[0],a);for(var s=r,l=r<n?n:n+360,u=s,c=[],h=0;u<l;)c.push(Y(e,t,u,i).geometry.coordinates),u=s+360*++h/o;return l<u&&c.push(Y(e,t,l,i).geometry.coordinates),O(c,a)}(e,t,r,n,i),a=[[o]],U(e,(function(e){a[0].push(e)})),a[0].push(o),j(a,s))};var qe="zh_measure_",Xe=function(){function e(e,t,r){var n=this,i=(this._click=function(e){var t,r=e.originalEvent.target.ariaLabel;n.isOpen&&"measure"!==r&&(n.isDraw||(n.isDraw=!0,n.positions.push(n.currentPosition),n.texts.push(n.currentText)),t=e.lngLat.toArray(),r=function(){n.currentPosition.push(t),n._drawPoint(),n._drawLine(),n._measureDistance(t)},0<n.currentPosition.length?"line"===n.type||"polygon"===n.type?(e=n.currentPosition[n.currentPosition.length-1],t[0]!==e[0]||t[1]!==e[1]?r():"polygon"===n.type?2<n.currentPosition.length?(n._createTextRemove(n.index),e=[].concat(n.currentPosition,[n.currentPosition[0]]),n._updateLine(e,n.index),e=Ge(j([e])),n._measureArea(e.geometry.coordinates),n._callback()):1===n.currentPosition.length&&(n._removeMarker(n.index),n._removePoint(n.index),n._removeLine(n.index),n._callback()):(n._createTextRemove(n.index),1===n.currentPosition.length&&(n._removeMarker(n.index),n._removePoint(n.index),n._removeLine(n.index)),n._callback())):"sector"===n.type&&(e=n.currentPosition[n.currentPosition.length-1],t[0]===e[0]&&t[1]===e[1]||1!==n.currentPosition.length||r()):r())},this._move=function(e){n.isOpen&&(e=e.lngLat.toArray(),n.isDraw&&0<n.currentPosition.length&&("line"===n.type?n._drawMoveLine(e):"circle"===n.type?(n._drawCircle(e),n._drawMoveLine(e)):"polygon"===n.type?(1<n.currentPosition.length&&n._drawPolygon(e),n._drawMoveLine(e)):"rect"===n.type?(n._drawRect(e),n._drawMoveLine(e)):"sector"===n.type&&(1<n.currentPosition.length?n._drawSector(e):n._drawMoveLine(e))),n._drawMovePoint(e))},this._dblclick=function(e){if(n.isOpen&&n.isDraw&&("circle"===n.type&&(t=e.lngLat.toArray(),!(r=n.currentPosition[0])||r[0]===t[0]&&r[1]===t[1]?(n._removeMarker(n.index),n._removePoint(n.index),n._removeLine(n.index),n._removeCircle(n.index)):(n.currentPosition.push(t),n._drawPoint(),n._drawCircle(t,!1),n._drawLine(),r=je(R(t),R(n.currentPosition[0])),n._measureDistance(t),n._measureArea(r.geometry.coordinates),n._createTextRemove(n.index),n._callback())),!("polygon"===n.type&&0<n.currentPosition.length&&n.currentPosition.length<3))){if("rect"===n.type&&(t=e.lngLat.toArray(),!(r=n.currentPosition[0])||r[0]===t[0]&&r[1]===t[1]?(n._removeMarker(n.index),n._removePoint(n.index),n._removeLine(n.index),n._removeRect(n.index)):(n.currentPosition.push(t),n._drawPoint(),n._drawRect(t,!1),r=je(R(t),R(n.currentPosition[0])),n._measureDistance(t),n._measureArea(r.geometry.coordinates),n._createTextRemove(n.index),n._callback())),"sector"===n.type){var t=e.lngLat.toArray(),r=n.currentPosition[n.currentPosition.length-1];if(2!==n.currentPosition.length||t[0]===r[0]&&t[1]===r[1]){if(1!==n.currentPosition.length)return;n._removeMarker(n.index),n._removePoint(n.index),n._removeLine(n.index),n._removeSector(n.index)}else n._drawSector(t,!1),e=Ge(n.map.getSource(n.moveSectorName)._data),n._measureArea(e.geometry.coordinates),n._createTextRemove(n.index),n._callback()}null!=(r=n.moveLineLayers[n.index])&&r.destroy(),n.moveLineLayers.splice(n.index,1),n._removeMoveMarker(),n.isDraw=!1,n.currentPosition=[],n.currentText=[],n.index++}},this.map=e,e=null!=(e=(t=null!=(e=t)?e:{}).point)?e:{},null!=(i=t.pointMove)?i:{}),o=null!=(o=t.fixed)?o:[2,2],a=(this.calcAll=null==(l=t.calcAll)||l,"number"==typeof o?this.fixed=[o,o]:Array.isArray(o)&&o.every((function(e){return"number"==typeof e}))?this.fixed=o:this.fixed=[2,2],this.dash=null==(l=t.dash)||l,this.type=null!=(o=t.type)?o:"line",["line","circle","polygon","rect","sector"].includes(this.type)||(this.type="line"),this.units={line:["km","m"],circle:["km²","m²"],polygon:["km²","m²"],rect:["km²","m²"],sector:["km²","m²"]},t.units);if(a)for(var s in this.units)a[s]&&Array.isArray(a[s])&&a[s].all((function(e){return"string"==typeof e}))&&(this.units[s][0]=a[s][0],this.units[s][1]=a[s][1]);this.className=null!=(l=t.className)?l:"",this.pointMoveProps={color:null!=(o=i.color)?o:"#ffffff",radius:null!=(l=i.radius)?l:10,opacity:null!=(o=i.opacity)?o:.01,strokeWidth:null!=(l=i.strokeWidth)?l:2,strokeColor:null!=(o=i.strokeColor)?o:"#ffffff",strokeOpacity:null!=(l=i.strokeOpacity)?l:.01},this.pointProps={color:null!=(o=e.color)?o:"rgb(255,255,255)",radius:null!=(i=e.radius)?i:4,strokeWidth:null!=(l=e.strokeWidth)?l:2,strokeColor:null!=(o=e.strokeColor)?o:"#00ccff"};var l=null!=(i=t.line)?i:{};this.lineProps={color:null!=(e=l.color)?e:"#00ccff",width:null!=(o=l.width)?o:2,dasharray:null!=(i=l.dasharray)?i:[5,5]},o=null!=(e=t.fill)?e:{},this.fillProps={color:null!=(l=o.color)?l:"rgba(0,230,255,0.1)"},this._custom=r,this.isOpen=!1,this.moveMarker=null,this._init()}var t=e.prototype;return t._init=function(){var e;this.positions=[],this.currentPosition=[],this.index=null!=(e=null==(e=this.map[this._custom])||null==(e=e.measure)?void 0:e[this.type])?e:0,this.isDraw=!1,this.pointLayers=[],this.movepointLayers=[],this.lineLayers=[],this.moveLineLayers=[],this.moveCircleLayers=[],this.movePolygonLayers=[],this.moveRectLayers=[],this.moveSectorLayers=[],this.texts=[],this.currentText=[]},t.draw=function(e){e&&"function"==typeof e&&(this.callback=e),this.isOpen||(this.isOpen=!0,this.map.on("click",this._click),this.map.on("mousemove",this._move),this.map.on("dblclick",this._dblclick))},t._callback=function(){this.callback&&"function"==typeof this.callback&&this.callback()},t._drawPoint=function(){var e,t=this,r=B(this.currentPosition.map((function(e,r){return R(e,{pointIndex:r,lineIndex:t.index})})));this.pointLayer?this.map.getSource(this.pointName).setData(r):((e=this.map.MapCustom()).draw(r,this.pointName,{layerConfig:{type:"circle",paint:{"circle-color":this.pointProps.color,"circle-radius":this.pointProps.radius,"circle-stroke-width":this.pointProps.strokeWidth,"circle-stroke-color":this.pointProps.strokeColor}}}),this.pointLayers.push(e))},t._drawMovePoint=function(e){var t;e={type:"FeatureCollection",features:[{type:"Feature",geometry:{type:"Point",coordinates:e},properties:{pointIndex:0,lineIndex:this.index}}]},this.movePointLayer?this.map.getSource(this.movePointName).setData(e):((t=this.map.MapCustom()).draw(e,this.movePointName,{layerConfig:{type:"circle",paint:{"circle-opacity":this.pointMoveProps.opacity,"circle-color":this.pointMoveProps.color,"circle-radius":this.pointMoveProps.radius,"circle-stroke-width":this.pointMoveProps.strokeWidth,"circle-stroke-color":this.pointMoveProps.strokeColor,"circle-stroke-opacity":this.pointMoveProps.strokeOpacity}}}),this.movepointLayers.push(t))},t._drawLine=function(){var e,t=B([O(1<this.currentPosition.length?this.currentPosition:[this.currentPosition[0],this.currentPosition[0]],{lineIndex:this.index})]);this.lineLayer?(this.map.getSource(this.lineName).setData(t),this.map.moveLayer(this.lineName,this.pointName)):((e=this.map.MapLine()).draw(t,this.lineName,{layerConfig:{paint:{"line-color":this.lineProps.color,"line-width":this.lineProps.width}},beforeId:this.pointName}),this.lineLayers.push(e))},t._drawMoveLine=function(e){var t=B([O([this.currentPosition[this.currentPosition.length-1],e],{lineIndex:this.index})]),r=("polygon"===this.type&&1<this.currentPosition.length&&(t=B([O([this.currentPosition[0],e,this.currentPosition[this.currentPosition.length-1]],{lineIndex:this.index})])),this.moveLineLayer?this.map.getSource(this.moveLineName).setData(t):((r=this.map.MapLine()).draw(t,this.moveLineName,{layerConfig:{paint:{"line-color":this.lineProps.color,"line-width":this.lineProps.width,"line-dasharray":this.dash?this.lineProps.dasharray:[]}},beforeId:this.pointName}),this.moveLineLayers.push(r)),B([O([].concat(this.currentPosition,[e]))]));this._drawMoveMarker(this.calcAll?r:t,e)},t._drawMoveMarker=function(e,t){e=this._calcLength(e),this.moveMarker?(this.moveMarker.getElement().children[0].innerHTML=e,this.moveMarker.setLngLat(t)):(this.moveMarker=this._createMoveText(e),this.moveMarker.setLngLat(t).addTo(this.map))},t._removeMoveMarker=function(){this.moveMarker&&(this.moveMarker.remove(),this.moveMarker=null)},t._drawCircle=function(e,t){void 0===t&&(t=!0);var r,n=this.currentPosition[0],i=B([R(n,{circleIndex:this.index})]);e=Ie(B([O([n,e],{circleIndex:this.index})]),{units:"kilometers"}),this.moveCircleLayer?(r={steps:64,units:"kilometers",properties:{circleIndex:this.index}},n=B([V(n,e,r)]),this.map.getSource(this.moveCircleName).setData(n),t||this.map.setPaintProperty(this.moveCircleLayer.lineName,"line-dasharray",[])):((r=this.map.MapCircle()).draw(i,this.moveCircleName,{endRadius:e,layerConfig:{paint:{"fill-color":this.fillProps.color}},lineConfig:{paint:{"line-color":this.lineProps.color,"line-width":this.lineProps.width,"line-dasharray":this.dash?this.lineProps.dasharray:[]}},beforeId:this.pointName}),this.moveCircleLayers.push(r))},t._drawPolygon=function(e){var t;e=B([j([[].concat(this.currentPosition,[e,this.currentPosition[0]])],{polygonIndex:this.index})]),this.movePolygonLayer?this.map.getSource(this.movePolygonName).setData(e):((t=this.map.MapMoreCustom()).draw(e,{sourceConfig:{id:this.movePolygonName,type:"geojson",data:e},layerConfig:[{id:this.movePolygonName,type:"fill",paint:{"fill-color":this.fillProps.color},beforeId:this.moveLineName}]}),this.movePolygonLayers.push(t))},t._drawRect=function(e,t){void 0===t&&(t=!0),e=B([X(q(O([this.currentPosition[0],e])),{properties:{rectIndex:this.index}})]),this.moveRectLayer?(this.map.getSource(this.moveRectName).setData(e),t||this.map.setPaintProperty(this.moveRectName+"-line","line-dasharray",[])):((t=this.map.MapMoreCustom()).draw(e,{sourceConfig:{id:this.moveRectName,type:"geojson",data:e},layerConfig:[{id:this.moveRectName,type:"fill",paint:{"fill-color":this.fillProps.color},beforeId:this.pointName},{id:this.moveRectName+"-line",type:"line",paint:{"line-color":this.lineProps.color,"line-width":this.lineProps.width,"line-dasharray":this.dash?this.lineProps.dasharray:[]},beforeId:this.pointName}]}),this.moveRectLayers.push(t))},t._drawSector=function(e,t){void 0===t&&(t=!0);var r=Ie(O(this.currentPosition,{units:"kilometers"})),n=Re(this.currentPosition[0],this.currentPosition[1]);e=Re(this.currentPosition[0],e),r=B([He(this.currentPosition[0],r,n,e,{units:"kilometers",properties:{sectorIndex:this.index}})]),this.moveSectorLayer?(this.map.getSource(this.moveSectorName).setData(r),t||this.map.setPaintProperty(this.moveSectorName+"-line","line-dasharray",[])):((n=this.map.MapMoreCustom()).draw(r,{sourceConfig:{id:this.moveSectorName,type:"geojson",data:r},layerConfig:[{id:this.moveSectorName,type:"fill",paint:{"fill-color":this.fillProps.color},beforeId:this.pointName},{id:this.moveSectorName+"-line",type:"line",paint:{"line-color":this.lineProps.color,"line-width":this.lineProps.width,"line-dasharray":this.dash?this.lineProps.dasharray:[]},beforeId:this.pointName}]}),this.moveSectorLayers.push(n))},t._removeRect=function(e){var t=this.moveRectLayers[e];t&&(t.destroy(),this.moveRectLayers[e]=null)},t._removeSector=function(e){var t=this.moveSectorLayers[e];t&&(t.destroy(),this.moveSectorLayers[e]=null)},t._createText=function(e,t,r){var n,i=this,o=(void 0===e&&(e="起点"),void 0===r&&(r=!0),document.createElement("div"));return((o.style.background="#ffffff",o.style.cursor="default",o.style.padding="0 5px",o.style.borderRadius="3px",o.style.display="flex",o.style.alignItems="center",o.className=this.className?this.className+" measure-box":"measure-box",o.ariaLabel="measure",n=document.createElement("span")).className="measure-text",n.innerHTML=e,n.ariaLabel="measure",o.appendChild(n),r&&((e=document.createElement("span")).className="measure-close",e.style.paddingLeft="5px",e.innerHTML="x",e.ariaLabel="measure",e.addEventListener("click",(function(e){i.isDraw||(e=e.target.parentNode._marker)&&i._removeGroup(e)})),o.appendChild(e)),n=new mapboxgl.Marker({element:o,offset:[10,0],anchor:"left"})).pointIndex=t,n.lineIndex=this.index,n.showBtn=r,this.currentText.push(n),o._marker=n},t._createMoveText=function(e){var t=document.createElement("div"),r=(t.style.background="#ffffff",t.style.cursor="default",t.style.padding="0 5px",t.style.borderRadius="3px",t.style.display="flex",t.style.alignItems="center",t.className=this.className?this.className+" measure-box":"measure-box",t.ariaLabel="measure",document.createElement("span"));return r.className="measure-text",r.innerHTML=e,r.ariaLabel="measure",t.appendChild(r),new mapboxgl.Marker({element:t,offset:[10,0],anchor:"left"})},t._createTextRemove=function(e){for(var t=this,r=document.createElement("div"),n=(r.className="measure-remove",r.style.width="15px",r.style.height="14px",r.style.marginLeft="5px",r.ariaLabel="measure",r.style.backgroundImage='url(\'data:image/svg+xml;utf8,%3Csvg xmlns="http://www.w3.org/2000/svg" width="20" height="20">%3Cpath d="M10,3.4 c-0.8,0-1.5,0.5-1.8,1.2H5l-1,1v1h12v-1l-1-1h-3.2C11.5,3.9,10.8,3.4,10,3.4z M5,8v7c0,1,1,2,2,2h6c1,0,2-1,2-2V8h-2v5.5h-1.5V8h-3 v5.5H7V8H5z"/>%3C/svg>\')',r.style.backgroundSize="100% 100%",r.addEventListener("click",(function(e){t.isDraw||(e=e.target.parentNode._marker)&&t._removeGroupLine(e)})),this.texts[e]),i=null,o=n.length-1;0<=o;o--)if(n[o].showBtn){i=o;break}(null!==i?n[i]:n[n.length-1]).getElement().appendChild(r)},t._measureDistance=function(e){var t="起点",r=(1<this.currentPosition.length&&(r=B([O(this.currentPosition,{lineIndex:this.index})]),t=this._calcLength(r)),this._createText(t,this.currentPosition.length-1,"circle"!==this.type&&"rect"!==this.type&&"sector"!==this.type));return r.setLngLat(e).addTo(this.map),r},t._measureArea=function(e){var t,r,n;["circle","polygon","rect","sector"].includes(this.type)&&(r=null,"circle"===this.type?(n=Ie(B([O(this.currentPosition)]),{units:"kilometers"}),t={steps:64,units:"kilometers",properties:{circleIndex:this.index}},r=V(this.currentPosition[0],n,t)):"polygon"===this.type?r=j([[].concat(this.currentPosition,[this.currentPosition[0]])]):"rect"===this.type?r=X(q(O(this.currentPosition)),{properties:{rectIndex:this.index}}):"sector"===this.type&&(r=this.map.getSource(this.moveSectorName)._data.features[0]),null!==r)&&(n=this._calcArea(r),this._createText(n,this.currentPosition.length,!1).setLngLat(e).addTo(this.map))},t._calcLength=function(e){return 1e3<(e=Ie(e,{units:"meters"}))?Number((e/1e3).toFixed(this.fixed[0]))+this.units.line[0]:Number(e.toFixed(this.fixed[1]))+this.units.line[1]},t._calcArea=function(e){return e=function(e){return t=function(e,t){return e+function(e){var t,r=0;switch(e.type){case"Polygon":return Be(e.coordinates);case"MultiPolygon":for(t=0;t<e.coordinates.length;t++)r+=Be(e.coordinates[t]);return r;case"Point":case"MultiPoint":case"LineString":case"MultiLineString":return 0}return 0}(t)},r=0,z(e,(function(e,n,i,o,a){r=t(r,e)})),r;var t,r}(e),1e6<e?Number((e/1e6).toFixed(this.fixed[0]))+this.units[this.type][0]:Number(e.toFixed(this.fixed[1]))+this.units[this.type][1]},t._removeGroup=function(e){var t,r,n,i=e.lineIndex,o=e.pointIndex;e.remove(),this.texts[i].splice(o,1),this.positions[i].splice(o,1),e=this.positions[i],this._updateLine(e,i),this._updatePoint(e,i),this._updateText(e,i),"polygon"===this.type?(this._updatePolygon(e,i),n=[].concat(e,[e[0]]),this._updateLine(n,i),e.length<3?(this._removeMarker(i),this._removePoint(i),this._removeLine(i)):e.length===o&&this._createTextRemove(i),2<e.length&&(n=j([n]),t=Ge(n),0<(r=this.texts[i]).length)&&(r=r[r.length-1],n=this._calcArea(n),this._updateMarkerText(r,n),r.setLngLat(t.geometry.coordinates).addTo(this.map))):"line"===this.type&&(e.length<2?this._removeMarker(i):e.length===o&&this._createTextRemove(i))},t._removeGroupLine=function(e){e=e.lineIndex,this._removeMarker(e),this._removePoint(e),this._removeLine(e),"circle"===this.type?this._removeCircle(e):"polygon"===this.type?this._removePolygon(e):"rect"===this.type?this._removeRect(e):"sector"===this.type&&this._removeSector(e)},t._removeMarker=function(e){this.texts[e].forEach((function(e){e.remove()})),this.texts[e]=[]},t._updateLine=function(e,t){var r=qe+"_"+this.type+"_"+t+"_line";e.length<2?this._removeLine(t):(e=B([O(e,{lineIndex:t})]),this.map.getSource(r).setData(e))},t._updatePolygon=function(e,t){var r=qe+"_"+this.type+"_"+t+"_polygon_move";e.length<3?this._removePolygon(t):(t=B([j([[].concat(e,[e[0]])])]),this.map.getSource(r).setData(t))},t._removePolygon=function(e){var t=this.movePolygonLayers[e];t&&(t.destroy(),this.movePolygonLayers[e]=null)},t._removeLine=function(e){var t=this.lineLayers[e];t&&(t.destroy(),this.lineLayers[e]=null),this.currentPosition=[]},t._removeCircle=function(e){var t=this.moveCircleLayers[e];t&&(t.destroy(),this.moveCircleLayers[e]=null)},t._updatePoint=function(e,t){var r=qe+"_"+this.type+"_"+t+"_point";e.length<2?this._removePoint(t):(e=B(e.map((function(e,r){return R(e,{pointIndex:r,lineIndex:t})}))),this.map.getSource(r).setData(e))},t._removePoint=function(e){var t=this.pointLayers[e];t&&(t.destroy(),this.pointLayers[e]=null)},t._updateText=function(e,t){var r=this,n=this.texts[t];e.forEach((function(t,i){var o,a="起点";0!==i&&(o=B([O(e.slice(0,i+1))]),a=r._calcLength(o)),n[i]&&(n[i].pointIndex=i,r._updateMarkerText(n[i],a))}))},t._updateMarkerText=function(e,t){e.getElement().children[0].innerHTML=t},t.off=function(){this.isDraw||(this.map.off("click",this._click),this.map.off("mousemove",this._move),this.map.off("dblclick",this._dblclick))},t.remove=function(){this.isDraw||(this.pointLayers.forEach((function(e){null!=e&&e.destroy()})),this.movepointLayers.forEach((function(e){null!=e&&e.destroy()})),this.lineLayers.forEach((function(e){null!=e&&e.destroy()})),this.moveLineLayers.forEach((function(e){null!=e&&e.destroy()})),this.texts.forEach((function(e){null!=e&&e.forEach((function(e){e.remove()}))})),this.moveCircleLayers.forEach((function(e){null!=e&&e.destroy()})),this.movePolygonLayers.forEach((function(e){null!=e&&e.destroy()})),this.moveRectLayers.forEach((function(e){null!=e&&e.destroy()})),this.moveSectorLayers.forEach((function(e){null!=e&&e.destroy()})),this._removeMoveMarker(),this._init())},t.visible=function(e){"boolean"!=typeof e||this.isDraw||(this.pointLayers.forEach((function(t){null!=t&&t.visible(e)})),this.movepointLayers.forEach((function(t){null!=t&&t.visible(e)})),this.lineLayers.forEach((function(t){null!=t&&t.visible(e)})),this.moveLineLayers.forEach((function(t){null!=t&&t.visible(e)})),this.texts.forEach((function(t){null!=t&&t.forEach((function(t){t.getElement().style.display=e?"flex":"none"}))})),this.moveCircleLayers.forEach((function(t){null!=t&&t.visible(e)})),this.movePolygonLayers.forEach((function(t){null!=t&&t.visible(e)})),this.moveRectLayers.forEach((function(t){null!=t&&t.visible(e)})),this.moveSectorLayers.forEach((function(t){null!=t&&t.visible(e)})))},t.destroy=function(){this.isOpen=!1,this.isDraw=!1,this.remove(),this.off()},Ne(e,[{key:"pointName",get:function(){return qe+"_"+this.type+"_"+this.index+"_point"}},{key:"movePointName",get:function(){return qe+"_"+this.type+"_"+this.index+"_point_move"}},{key:"lineName",get:function(){return qe+"_"+this.type+"_"+this.index+"_line"}},{key:"moveLineName",get:function(){return qe+"_"+this.type+"_"+this.index+"_line_move"}},{key:"moveCircleName",get:function(){return qe+"_"+this.type+"_"+this.index+"_circle_move"}},{key:"movePolygonName",get:function(){return qe+"_"+this.type+"_"+this.index+"_polygon_move"}},{key:"moveRectName",get:function(){return qe+"_"+this.type+"_"+this.index+"_rect_move"}},{key:"moveSectorName",get:function(){return qe+"_"+this.type+"_"+this.index+"_sector_move"}},{key:"pointLayer",get:function(){return this.pointLayers[this.index]}},{key:"movePointLayer",get:function(){return this.movepointLayers[this.index]}},{key:"lineLayer",get:function(){return this.lineLayers[this.index]}},{key:"moveLineLayer",get:function(){return this.moveLineLayers[this.index]}},{key:"moveCircleLayer",get:function(){return this.moveCircleLayers[this.index]}},{key:"movePolygonLayer",get:function(){return this.movePolygonLayers[this.index]}},{key:"moveRectLayer",get:function(){return this.moveRectLayers[this.index]}},{key:"moveSectorLayer",get:function(){return this.moveSectorLayers[this.index]}}]),e}(),We=["id"],Je=["id","type","beforeId","source-layer"],Ye=function(){function e(e,t){void 0===t&&(t={}),this.map=e,this.sourceName=[],this.layerName=[],this.type="symbol",this.custom=null!=(t=null==(e=t)?void 0:e.custom)&&t,this.isInit=!1,this.callback=null,this.mapEvent=null}var t=e.prototype;return t.draw=function(e,t,r){if(e&&this.map)return this.callback=r,"vector"===e.type?(this.type=null!=(r=t.type)?r:"symbol",this._addSourceLayer(e,t),{source:this.sourceName,layer:this.layerName}):void 0},t.destroy=function(){this._clearSource(),this.mapEvent&&this.map.off("render",this.mapEvent)},t.visible=function(e){var t,r=this;"boolean"==typeof e&&null!=(t=this.layerName)&&t.filter((function(e){return!e.includes("__copy")})).forEach((function(t){r.map.getLayer(t)&&r.map.setLayoutProperty(t,"visibility",e?"visible":"none")}))},t._addSourceLayer=function(e,t){var r,n,a=this,s=(this.sourceName=[],this.layerName=[],n=null!=(n=t.sourceConfig)?n:{}).id,u=i(n,We),c=s,h=(this.map.addSource(c,o({},e,u)),this.sourceName.push(c),(n=t.beforeId||null)&&this.map.getLayer(n),s=l(t.layerConfig),[]);Array.isArray(s)?h=s:"object"==typeof s&&h.push(s),0<h.length&&(e=h[0],n={id:c+"__copy",type:"circle",source:c,"source-layer":e["source-layer"],paint:{"circle-radius":1,"circle-opacity":0},interactive:!1},this.map.addLayer(n),this.layerName.push(c+"__copy"),r={sourceLayer:e["source-layer"]},this.mapEvent=function(e){var t,n=a.map.getSource(c);n&&n.loaded()&&a.map.isSourceLoaded(c)&&(n={type:"FeatureCollection",features:a.map.querySourceFeatures(c,r)},a.custom?a.callback&&"function"==typeof a.callback&&a.callback(n):(t=c+"__geojson",a.isInit?a.map.getSource(t)&&a.map.getSource(t).setData(n):(a.map.addSource(t,o({type:"geojson",data:n},u)),a.sourceName.push(t),h.forEach((function(e){var r=(e=l(e)).id,n=e.type,s=e.beforeId;e["source-layer"],e=i(e,Je),s&&!a.map.getLayer(s)&&(s=null),a.map.addLayer(o({id:r,type:n},e,{source:t}),s),a.layerName.push(r)})),a.isInit=!0)))},this.map.on("render",this.mapEvent))},t._clearSource=function(){var e,t=this;null!=(e=this.layerName)&&e.forEach((function(e){var r;(null==(r=t.map)?void 0:r.getLayer(e))&&t.map.removeLayer(e)})),null!=(e=this.sourceName)&&e.forEach((function(e){var r;(null==(r=t.map)?void 0:r.getSource(e))&&t.map.removeSource(e)}))},e}(),Ve=["padding","animate","maxZoom","essential"],Ze=["url"],Ke=null,$e=null,Qe=function(e){return/^#([0-9a-fA-F]{3}){1,2}$/.test(e)},et=["line-color","line-opacity"],tt=["fill-color","fill-opacity"],rt=["background-color","background-opacity"],nt=["text-color","text-opacity"],it="zh_custom",ot=function(e,t,r,n){if(r&&(Qe(r)||Array.isArray(r))){var i=e.getLayer(t);if(i){var o=[];switch(i.type){case"line":o=et;break;case"fill":o=tt;break;case"background":o=rt;break;case"symbol":o=nt}0<o.length&&(e.setPaintProperty(t,o[0],r),null!==n)&&e.setPaintProperty(t,o[1],n)}}},at=function(e,t,r,n){if(t&&r&&"string"==typeof t&&e.getLayer(t)&&"object"==typeof r)for(var i in r)null!==r[i]&&void 0!==r[i]&&e[n](t,i,r[i])};function st(e,t){if(e&&(void 0!==e[it]&&null!==e[it]||(e[it]={}),t)&&"object"==typeof t){var r,n=l(t);for(r in n)e[it][r]=n[r]}}function lt(e,t){var r=[];return"string"==typeof t?r=t.split(".").filter(Boolean):Array.isArray(t)&&(r=t),0===r.length?null:r.reduce((function(e,t){return e[t]}),e[it])}})(),n;function e(n){var i=r[n];return void 0!==i||(i=r[n]={exports:{}},t[n].call(i.exports,i,i.exports,e)),i.exports}var t,r,n}));
|