(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[785],{840:function(a,b,c){var d;!function(e,f,g,h){"use strict";var i,j=["","webkit","Moz","MS","ms","o"],k=f.createElement("div"),l=Math.round,m=Math.abs,n=Date.now;function o(a,b,c){return setTimeout(v(a,c),b)}function p(a,b,c){return!!Array.isArray(a)&&(q(a,c[b],c),!0)}function q(a,b,c){var d;if(a)if(a.forEach)a.forEach(b,c);else if(h!==a.length)for(d=0;d\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",f=e.console&&(e.console.warn||e.console.log);return f&&f.call(e.console,d,c),a.apply(this,arguments)}}i="function"!=typeof Object.assign?function(a){if(a===h||null===a)throw new TypeError("Cannot convert undefined or null to object");for(var b=Object(a),c=1;c -1}function C(a){return a.trim().split(/\s+/g)}function D(a,b,c){if(a.indexOf&&!c)return a.indexOf(b);for(var d=0;dD(e,g)&&d.push(a[f]),e[f]=g,f++}return c&&(d=b?d.sort(function(a,c){return a[b]>c[b]}):d.sort()),d}function G(a,b){for(var c,d,e=b[0].toUpperCase()+b.slice(1),f=0;f1&&!c.firstMultiple?c.firstMultiple=V(b):1===e&&(c.firstMultiple=!1);var f=c.firstInput,g=c.firstMultiple,h=g?g.center:f.center,i=b.center=W(d);b.timeStamp=n(),b.deltaTime=b.timeStamp-f.timeStamp,b.angle=$(h,i),b.distance=Z(h,i),T(c,b),b.offsetDirection=Y(b.deltaX,b.deltaY);var j=X(b.deltaTime,b.deltaX,b.deltaY);b.overallVelocityX=j.x,b.overallVelocityY=j.y,b.overallVelocity=m(j.x)>m(j.y)?j.x:j.y,b.scale=g?aa(g.pointers,d):1,b.rotation=g?_(g.pointers,d):0,b.maxPointers=c.prevInput?b.pointers.length>c.prevInput.maxPointers?b.pointers.length:c.prevInput.maxPointers:b.pointers.length,U(c,b);var k=a.element;A(b.srcEvent.target,k)&&(k=b.srcEvent.target),b.target=k}function T(a,b){var c=b.center,d=a.offsetDelta||{},e=a.prevDelta||{},f=a.prevInput||{};(1===b.eventType||4===f.eventType)&&(e=a.prevDelta={x:f.deltaX||0,y:f.deltaY||0},d=a.offsetDelta={x:c.x,y:c.y}),b.deltaX=e.x+(c.x-d.x),b.deltaY=e.y+(c.y-d.y)}function U(a,b){var c,d,e,f,g=a.lastInterval||b,i=b.timeStamp-g.timeStamp;if(8!=b.eventType&&(i>25||h===g.velocity)){var j=b.deltaX-g.deltaX,k=b.deltaY-g.deltaY,l=X(i,j,k);d=l.x,e=l.y,c=m(l.x)>m(l.y)?l.x:l.y,f=Y(j,k),a.lastInterval=b}else c=g.velocity,d=g.velocityX,e=g.velocityY,f=g.direction;b.velocity=c,b.velocityX=d,b.velocityY=e,b.direction=f}function V(a){for(var b=[],c=0;c=m(b)?a<0?2:4:b<0?8:16}function Z(a,b,c){c||(c=O);var d=b[c[0]]-a[c[0]],e=b[c[1]]-a[c[1]];return Math.sqrt(d*d+e*e)}function $(a,b,c){c||(c=O);var d=b[c[0]]-a[c[0]],e=b[c[1]]-a[c[1]];return 180*Math.atan2(e,d)/Math.PI}function _(a,b){return $(b[1],b[0],P)+$(a[1],a[0],P)}function aa(a,b){return Z(b[0],b[1],P)/Z(a[0],a[1],P)}Q.prototype={handler:function(){},init:function(){this.evEl&&y(this.element,this.evEl,this.domHandler),this.evTarget&&y(this.target,this.evTarget,this.domHandler),this.evWin&&y(I(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&z(this.element,this.evEl,this.domHandler),this.evTarget&&z(this.target,this.evTarget,this.domHandler),this.evWin&&z(I(this.element),this.evWin,this.domHandler)}};var ba={mousedown:1,mousemove:2,mouseup:4};function ca(){this.evEl="mousedown",this.evWin="mousemove mouseup",this.pressed=!1,Q.apply(this,arguments)}u(ca,Q,{handler:function(a){var b=ba[a.type];1&b&&0===a.button&&(this.pressed=!0),2&b&&1!==a.which&&(b=4),this.pressed&&(4&b&&(this.pressed=!1),this.callback(this.manager,b,{pointers:[a],changedPointers:[a],pointerType:N,srcEvent:a}))}});var da={pointerdown:1,pointermove:2,pointerup:4,pointercancel:8,pointerout:8},ea={2:M,3:"pen",4:N,5:"kinect"},fa="pointerdown",ga="pointermove pointerup pointercancel";function ha(){this.evEl=fa,this.evWin=ga,Q.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}e.MSPointerEvent&&!e.PointerEvent&&(fa="MSPointerDown",ga="MSPointerMove MSPointerUp MSPointerCancel"),u(ha,Q,{handler:function(a){var b=this.store,c=!1,d=da[a.type.toLowerCase().replace("ms","")],e=ea[a.pointerType]||a.pointerType,f=D(b,a.pointerId,"pointerId");1&d&&(0===a.button||e==M)?f<0&&(b.push(a),f=b.length-1):12&d&&(c=!0),!(f<0)&&(b[f]=a,this.callback(this.manager,d,{pointers:b,changedPointers:[a],pointerType:e,srcEvent:a}),c&&b.splice(f,1))}});var ia={touchstart:1,touchmove:2,touchend:4,touchcancel:8};function ja(){this.evTarget="touchstart",this.evWin="touchstart touchmove touchend touchcancel",this.started=!1,Q.apply(this,arguments)}function ka(a,b){var c=E(a.touches),d=E(a.changedTouches);return 12&b&&(c=F(c.concat(d),"identifier",!0)),[c,d]}u(ja,Q,{handler:function(a){var b=ia[a.type];if(1===b&&(this.started=!0),this.started){var c=ka.call(this,a,b);12&b&&c[0].length-c[1].length==0&&(this.started=!1),this.callback(this.manager,b,{pointers:c[0],changedPointers:c[1],pointerType:M,srcEvent:a})}}});var la={touchstart:1,touchmove:2,touchend:4,touchcancel:8};function ma(){this.evTarget="touchstart touchmove touchend touchcancel",this.targetIds={},Q.apply(this,arguments)}function na(a,b){var c=E(a.touches),d=this.targetIds;if(3&b&&1===c.length)return d[c[0].identifier]=!0,[c,c];var e,f,g=E(a.changedTouches),h=[],i=this.target;if(f=c.filter(function(a){return A(a.target,i)}),1===b)for(e=0;e -1&&d.splice(a,1)},2500)}}function ra(a){for(var b=a.srcEvent.clientX,c=a.srcEvent.clientY,d=0;d -1&&this.requireFail.splice(b,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(a){return!!this.simultaneous[a.id]},emit:function(a){var b=this,c=this.state;function d(c){b.manager.emit(c,a)}c<8&&d(b.options.event+Da(c)),d(b.options.event),a.additionalEvent&&d(a.additionalEvent),c>=8&&d(b.options.event+Da(c))},tryEmit:function(a){if(this.canEmit())return this.emit(a);this.state=32},canEmit:function(){for(var a=0;ab.threshold&&e&b.direction},attrTest:function(a){return Ga.prototype.attrTest.call(this,a)&&(2&this.state|| !(2&this.state)&&this.directionTest(a))},emit:function(a){this.pX=a.deltaX,this.pY=a.deltaY;var b=Ea(a.direction);b&&(a.additionalEvent=this.options.event+b),this._super.emit.call(this,a)}}),u(Ia,Ga,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[xa]},attrTest:function(a){return this._super.attrTest.call(this,a)&&(Math.abs(a.scale-1)>this.options.threshold||2&this.state)},emit:function(a){if(1!==a.scale){var b=a.scale<1?"in":"out";a.additionalEvent=this.options.event+b}this._super.emit.call(this,a)}}),u(Ja,Ca,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[va]},process:function(a){var b=this.options,c=a.pointers.length===b.pointers,d=a.distanceb.time;if(this._input=a,d&&c&&(!(12&a.eventType)||e)){if(1&a.eventType)this.reset(),this._timer=o(function(){this.state=8,this.tryEmit()},b.time,this);else if(4&a.eventType)return 8}else this.reset();return 32},reset:function(){clearTimeout(this._timer)},emit:function(a){8===this.state&&(a&&4&a.eventType?this.manager.emit(this.options.event+"up",a):(this._input.timeStamp=n(),this.manager.emit(this.options.event,this._input)))}}),u(Ka,Ga,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[xa]},attrTest:function(a){return this._super.attrTest.call(this,a)&&(Math.abs(a.rotation)>this.options.threshold||2&this.state)}}),u(La,Ga,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:30,pointers:1},getTouchAction:function(){return Ha.prototype.getTouchAction.call(this)},attrTest:function(a){var b,c=this.options.direction;return 30&c?b=a.overallVelocity:6&c?b=a.overallVelocityX:24&c&&(b=a.overallVelocityY),this._super.attrTest.call(this,a)&&c&a.offsetDirection&&a.distance>this.options.threshold&&a.maxPointers==this.options.pointers&&m(b)>this.options.velocity&&4&a.eventType},emit:function(a){var b=Ea(a.offsetDirection);b&&this.manager.emit(this.options.event+b,a),this.manager.emit(this.options.event,a)}}),u(Ma,Ca,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[wa]},process:function(a){var b=this.options,c=a.pointers.length===b.pointers,d=a.distance1)for(var c=1;ca.length)&&(b=a.length);for(var c=0,d=new Array(b);cc?c:a}Math.PI,Math.hypot||(Math.hypot=function(){for(var a=0,b=arguments.length;b--;)a+=arguments[b]*arguments[b];return Math.sqrt(a)}),l=new m(4),m!=Float32Array&&(l[0]=0,l[1]=0,l[2]=0,l[3]=0);const s=Math.log2||function(a){return Math.log(a)*Math.LOG2E};function t(a,b,c){var d=b[0],e=b[1],f=b[2],g=b[3],h=b[4],i=b[5],j=b[6],k=b[7],l=b[8],m=b[9],n=b[10],o=b[11],p=b[12],q=b[13],r=b[14],s=b[15],t=c[0],u=c[1],v=c[2],w=c[3];return a[0]=t*d+u*h+v*l+w*p,a[1]=t*e+u*i+v*m+w*q,a[2]=t*f+u*j+v*n+w*r,a[3]=t*g+u*k+v*o+w*s,t=c[4],u=c[5],v=c[6],w=c[7],a[4]=t*d+u*h+v*l+w*p,a[5]=t*e+u*i+v*m+w*q,a[6]=t*f+u*j+v*n+w*r,a[7]=t*g+u*k+v*o+w*s,t=c[8],u=c[9],v=c[10],w=c[11],a[8]=t*d+u*h+v*l+w*p,a[9]=t*e+u*i+v*m+w*q,a[10]=t*f+u*j+v*n+w*r,a[11]=t*g+u*k+v*o+w*s,t=c[12],u=c[13],v=c[14],w=c[15],a[12]=t*d+u*h+v*l+w*p,a[13]=t*e+u*i+v*m+w*q,a[14]=t*f+u*j+v*n+w*r,a[15]=t*g+u*k+v*o+w*s,a}function u(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p=c[0],q=c[1],r=c[2];return b===a?(a[12]=b[0]*p+b[4]*q+b[8]*r+b[12],a[13]=b[1]*p+b[5]*q+b[9]*r+b[13],a[14]=b[2]*p+b[6]*q+b[10]*r+b[14],a[15]=b[3]*p+b[7]*q+b[11]*r+b[15]):(d=b[0],e=b[1],f=b[2],g=b[3],h=b[4],i=b[5],j=b[6],k=b[7],l=b[8],m=b[9],n=b[10],o=b[11],a[0]=d,a[1]=e,a[2]=f,a[3]=g,a[4]=h,a[5]=i,a[6]=j,a[7]=k,a[8]=l,a[9]=m,a[10]=n,a[11]=o,a[12]=d*p+h*q+l*r+b[12],a[13]=e*p+i*q+m*r+b[13],a[14]=f*p+j*q+n*r+b[14],a[15]=g*p+k*q+o*r+b[15]),a}function v(a,b,c){var d=c[0],e=c[1],f=c[2];return a[0]=b[0]*d,a[1]=b[1]*d,a[2]=b[2]*d,a[3]=b[3]*d,a[4]=b[4]*e,a[5]=b[5]*e,a[6]=b[6]*e,a[7]=b[7]*e,a[8]=b[8]*f,a[9]=b[9]*f,a[10]=b[10]*f,a[11]=b[11]*f,a[12]=b[12],a[13]=b[13],a[14]=b[14],a[15]=b[15],a}function w(a,b){var c=a[0],d=a[1],e=a[2],f=a[3],g=a[4],h=a[5],i=a[6],j=a[7],k=a[8],l=a[9],m=a[10],n=a[11],o=a[12],p=a[13],q=a[14],r=a[15],s=b[0],t=b[1],u=b[2],v=b[3],w=b[4],x=b[5],y=b[6],z=b[7],A=b[8],B=b[9],C=b[10],D=b[11],E=b[12],F=b[13],G=b[14],H=b[15];return Math.abs(c-s)<=1e-6*Math.max(1,Math.abs(c),Math.abs(s))&&Math.abs(d-t)<=1e-6*Math.max(1,Math.abs(d),Math.abs(t))&&Math.abs(e-u)<=1e-6*Math.max(1,Math.abs(e),Math.abs(u))&&Math.abs(f-v)<=1e-6*Math.max(1,Math.abs(f),Math.abs(v))&&Math.abs(g-w)<=1e-6*Math.max(1,Math.abs(g),Math.abs(w))&&Math.abs(h-x)<=1e-6*Math.max(1,Math.abs(h),Math.abs(x))&&Math.abs(i-y)<=1e-6*Math.max(1,Math.abs(i),Math.abs(y))&&Math.abs(j-z)<=1e-6*Math.max(1,Math.abs(j),Math.abs(z))&&Math.abs(k-A)<=1e-6*Math.max(1,Math.abs(k),Math.abs(A))&&Math.abs(l-B)<=1e-6*Math.max(1,Math.abs(l),Math.abs(B))&&Math.abs(m-C)<=1e-6*Math.max(1,Math.abs(m),Math.abs(C))&&Math.abs(n-D)<=1e-6*Math.max(1,Math.abs(n),Math.abs(D))&&Math.abs(o-E)<=1e-6*Math.max(1,Math.abs(o),Math.abs(E))&&Math.abs(p-F)<=1e-6*Math.max(1,Math.abs(p),Math.abs(F))&&Math.abs(q-G)<=1e-6*Math.max(1,Math.abs(q),Math.abs(G))&&Math.abs(r-H)<=1e-6*Math.max(1,Math.abs(r),Math.abs(H))}function x(a,b,c){return a[0]=b[0]+c[0],a[1]=b[1]+c[1],a}function y(a,b,c,d){var e=b[0],f=b[1];return a[0]=e+d*(c[0]-e),a[1]=f+d*(c[1]-f),a}function z(a,b){if(!a)throw new Error(b||"@math.gl/web-mercator: assertion failed.")}mc=new m(2),m!=Float32Array&&(mc[0]=0,mc[1]=0),nc=new m(3),m!=Float32Array&&(nc[0]=0,nc[1]=0,nc[2]=0);const A=Math.PI,B=A/4,C=A/180,D=180/A;function E(a){return Math.pow(2,a)}function F([a,b]){return z(Number.isFinite(a)),z(Number.isFinite(b)&&b>= -90&&b<=90,"invalid latitude"),[512*(a*C+A)/(2*A),512*(A+Math.log(Math.tan(B+.5*(b*C))))/(2*A)]}function G([a,b]){return[(a/512*(2*A)-A)*D,2*(Math.atan(Math.exp(b/512*(2*A)-A))-B)*D]}function H(a){return 2*Math.atan(.5/a)*D}function I(a){return .5/Math.tan(.5*a*C)}function J(a,b,c=0){const[d,e,f]=a;if(z(Number.isFinite(d)&&Number.isFinite(e),"invalid pixel coordinate"),Number.isFinite(f)){const g=o(b,[d,e,f,1]);return g}const h=o(b,[d,e,0,1]),i=o(b,[d,e,1,1]),j=h[2],k=i[2];return y([],h,i,j===k?0:((c||0)-j)/(k-j))}const K=Math.PI/180;function L(a,b,c){const{pixelUnprojectionMatrix:d}=a,e=o(d,[b,0,1,1]),f=o(d,[b,a.height,1,1]),g=c*a.distanceScales.unitsPerMeter[2],h=(g-e[2])/(f[2]-e[2]),i=y([],e,f,h),j=G(i);return j[2]=c,j}class M{constructor({width:N,height:O,latitude:P=0,longitude:Q=0,zoom:R=0,pitch:S=0,bearing:T=0,altitude:U=null,fovy:V=null,position:W=null,nearZMultiplier:X=.02,farZMultiplier:Y=1.01}={width:1,height:1}){N=N||1,O=O||1,null===V&&null===U?V=H(U=1.5):null===V?V=H(U):null===U&&(U=I(V));const Z=E(R);U=Math.max(.75,U);const $=function({latitude:a,longitude:b,highPrecision:c=!1}){z(Number.isFinite(a)&&Number.isFinite(b));const d={},e=Math.cos(a*C),f=1.4222222222222223/e,g=12790407194604047e-21/e;if(d.unitsPerMeter=[g,g,g],d.metersPerUnit=[1/g,1/g,1/g],d.unitsPerDegree=[1.4222222222222223,f,g],d.degreesPerUnit=[.703125,1/f,1/g],c){const h=C*Math.tan(a*C)/e,i=1.4222222222222223*h/2,j=12790407194604047e-21*h,k=j/f*g;d.unitsPerDegree2=[0,i,j],d.unitsPerMeter2=[k,0,k]}return d}({longitude:Q,latitude:P}),_=F([Q,P]);if(_[2]=0,W){var aa,ba,ca,da,ea,fa;da=_,ea=_,aa=[],ba=W,ca=$.unitsPerMeter,aa[0]=ba[0]*ca[0],aa[1]=ba[1]*ca[1],aa[2]=ba[2]*ca[2],fa=aa,da[0]=ea[0]+fa[0],da[1]=ea[1]+fa[1],da[2]=ea[2]+fa[2]}this.projectionMatrix=(function({width:a,height:b,pitch:c,altitude:d,fovy:e,nearZMultiplier:f,farZMultiplier:g}){var h,i,j,k,l,m,n;const{fov:o,aspect:p,near:q,far:r}=function({width:a,height:b,fovy:c=H(1.5),altitude:d,pitch:e=0,nearZMultiplier:f=1,farZMultiplier:g=1}){void 0!==d&&(c=H(d));const h=.5*c*C,i=I(c),j=e*C;return{fov:2*h,aspect:a/b,focalDistance:i,near:f,far:(Math.sin(j)*(Math.sin(h)*i/Math.sin(Math.min(Math.max(Math.PI/2-j-h,.01),Math.PI-.01)))+i)*g}}({width:a,height:b,altitude:d,fovy:e,pitch:c,nearZMultiplier:f,farZMultiplier:g}),s=(h=[],i=o,j=p,k=q,l=r,n=1/Math.tan(i/2),h[0]=n/j,h[1]=0,h[2]=0,h[3]=0,h[4]=0,h[5]=n,h[6]=0,h[7]=0,h[8]=0,h[9]=0,h[11]=-1,h[12]=0,h[13]=0,h[15]=0,null!=l&&l!==1/0?(m=1/(k-l),h[10]=(l+k)*m,h[14]=2*l*k*m):(h[10]=-1,h[14]=-2*k),h);return s})({width:N,height:O,pitch:S,fovy:V,nearZMultiplier:X,farZMultiplier:Y}),this.viewMatrix=(function({height:a,pitch:b,bearing:c,altitude:d,scale:e,center:f=null}){var g,h,i,j,k,l,m,o,p,q,r,s,t,w,x,y,z,A,B,D,E,F,G,H,I,J,K,L;const M=n();return u(M,M,[0,0,-d]),g=M,h=M,i=-b*C,j=Math.sin(i),k=Math.cos(i),l=h[4],m=h[5],o=h[6],p=h[7],q=h[8],r=h[9],s=h[10],t=h[11],h!==g&&(g[0]=h[0],g[1]=h[1],g[2]=h[2],g[3]=h[3],g[12]=h[12],g[13]=h[13],g[14]=h[14],g[15]=h[15]),g[4]=l*k+q*j,g[5]=m*k+r*j,g[6]=o*k+s*j,g[7]=p*k+t*j,g[8]=q*k-l*j,g[9]=r*k-m*j,g[10]=s*k-o*j,g[11]=t*k-p*j,w=M,x=M,y=c*C,z=Math.sin(y),A=Math.cos(y),B=x[0],D=x[1],E=x[2],F=x[3],G=x[4],H=x[5],I=x[6],J=x[7],x!==w&&(w[8]=x[8],w[9]=x[9],w[10]=x[10],w[11]=x[11],w[12]=x[12],w[13]=x[13],w[14]=x[14],w[15]=x[15]),w[0]=B*A+G*z,w[1]=D*A+H*z,w[2]=E*A+I*z,w[3]=F*A+J*z,w[4]=G*A-B*z,w[5]=H*A-D*z,w[6]=I*A-E*z,w[7]=J*A-F*z,v(M,M,[e/=a,e,e]),f&&u(M,M,(K=[],L=f,K[0]=-L[0],K[1]=-L[1],K[2]=-L[2],K)),M})({height:O,scale:Z,center:_,pitch:S,bearing:T,altitude:U}),this.width=N,this.height=O,this.scale=Z,this.latitude=P,this.longitude=Q,this.zoom=R,this.pitch=S,this.bearing=T,this.altitude=U,this.fovy=V,this.center=_,this.meterOffset=W||[0,0,0],this.distanceScales=$,this._initMatrices(),this.equals=this.equals.bind(this),this.project=this.project.bind(this),this.unproject=this.unproject.bind(this),this.projectPosition=this.projectPosition.bind(this),this.unprojectPosition=this.unprojectPosition.bind(this),Object.freeze(this)}_initMatrices(){var ga,ha,ia,ja,ka,la,ma,na,oa,pa,qa,ra,sa,ta,ua,va,wa,xa,ya,za,Aa,Ba,Ca,Da,Ea,Fa,Ga,Ha,Ia,Ja,Ka;const{width:La,height:Ma,projectionMatrix:Na,viewMatrix:Oa}=this,Pa=n();t(Pa,Pa,Na),t(Pa,Pa,Oa),this.viewProjectionMatrix=Pa;const Qa=n();v(Qa,Qa,[La/2,-Ma/2,1]),u(Qa,Qa,[1,-1,0]),t(Qa,Qa,Pa);const Ra=(ga=n(),ia=(ha=Qa)[0],ja=ha[1],ka=ha[2],la=ha[3],ma=ha[4],na=ha[5],oa=ha[6],pa=ha[7],qa=ha[8],ra=ha[9],sa=ha[10],ta=ha[11],ua=ha[12],va=ha[13],wa=ha[14],xa=ha[15],ya=ia*na-ja*ma,za=ia*oa-ka*ma,Aa=ia*pa-la*ma,Ba=ja*oa-ka*na,Ca=ja*pa-la*na,Da=ka*pa-la*oa,Ea=qa*va-ra*ua,Fa=qa*wa-sa*ua,Ga=qa*xa-ta*ua,Ha=ra*wa-sa*va,Ia=ra*xa-ta*va,Ja=sa*xa-ta*wa,Ka=ya*Ja-za*Ia+Aa*Ha+Ba*Ga-Ca*Fa+Da*Ea,Ka?(Ka=1/Ka,ga[0]=(na*Ja-oa*Ia+pa*Ha)*Ka,ga[1]=(ka*Ia-ja*Ja-la*Ha)*Ka,ga[2]=(va*Da-wa*Ca+xa*Ba)*Ka,ga[3]=(sa*Ca-ra*Da-ta*Ba)*Ka,ga[4]=(oa*Ga-ma*Ja-pa*Fa)*Ka,ga[5]=(ia*Ja-ka*Ga+la*Fa)*Ka,ga[6]=(wa*Aa-ua*Da-xa*za)*Ka,ga[7]=(qa*Da-sa*Aa+ta*za)*Ka,ga[8]=(ma*Ia-na*Ga+pa*Ea)*Ka,ga[9]=(ja*Ga-ia*Ia-la*Ea)*Ka,ga[10]=(ua*Ca-va*Aa+xa*ya)*Ka,ga[11]=(ra*Aa-qa*Ca-ta*ya)*Ka,ga[12]=(na*Fa-ma*Ha-oa*Ea)*Ka,ga[13]=(ia*Ha-ja*Fa+ka*Ea)*Ka,ga[14]=(va*za-ua*Ba-wa*ya)*Ka,ga[15]=(qa*Ba-ra*za+sa*ya)*Ka,ga):null);if(!Ra)throw new Error("Pixel project matrix not invertible");this.pixelProjectionMatrix=Qa,this.pixelUnprojectionMatrix=Ra}equals(Sa){return Sa instanceof M&&Sa.width===this.width&&Sa.height===this.height&&w(Sa.projectionMatrix,this.projectionMatrix)&&w(Sa.viewMatrix,this.viewMatrix)}project(Ta,{topLeft:Ua=!0}={}){const Va=this.projectPosition(Ta),Wa=function(a,b){const[c,d,e=0]=a;return z(Number.isFinite(c)&&Number.isFinite(d)&&Number.isFinite(e)),o(b,[c,d,e,1])}(Va,this.pixelProjectionMatrix),[Xa,Ya]=Wa,Za=Ua?Ya:this.height-Ya;return 2===Ta.length?[Xa,Za]:[Xa,Za,Wa[2]]}unproject($a,{topLeft:_a=!0,targetZ:ab}={}){const[bb,cb,db]=$a,eb=_a?cb:this.height-cb,fb=ab&&ab*this.distanceScales.unitsPerMeter[2],gb=J([bb,eb,db],this.pixelUnprojectionMatrix,fb),[hb,ib,jb]=this.unprojectPosition(gb);return Number.isFinite(db)?[hb,ib,jb]:Number.isFinite(ab)?[hb,ib,ab]:[hb,ib]}projectPosition(kb){const[lb,mb]=F(kb),nb=(kb[2]||0)*this.distanceScales.unitsPerMeter[2];return[lb,mb,nb]}unprojectPosition(ob){const[pb,qb]=G(ob),rb=(ob[2]||0)*this.distanceScales.metersPerUnit[2];return[pb,qb,rb]}projectFlat(sb){return F(sb)}unprojectFlat(tb){return G(tb)}getMapCenterByLngLatPosition({lngLat:ub,pos:vb}){var wb,xb;const yb=J(vb,this.pixelUnprojectionMatrix),zb=F(ub),Ab=x([],zb,(wb=[],xb=yb,wb[0]=-xb[0],wb[1]=-xb[1],wb)),Bb=x([],this.center,Ab);return G(Bb)}getLocationAtPoint({lngLat:Cb,pos:Db}){return this.getMapCenterByLngLatPosition({lngLat:Cb,pos:Db})}fitBounds(Eb,Fb={}){const{width:Gb,height:Hb}=this,{longitude:Ib,latitude:Jb,zoom:Kb}=function({width:a,height:b,bounds:c,minExtent:d=0,maxZoom:e=24,padding:f=0,offset:g=[0,0]}){const[[h,i],[j,k]]=c;if(Number.isFinite(f)){const l=f;f={top:l,bottom:l,left:l,right:l}}else z(Number.isFinite(f.top)&&Number.isFinite(f.bottom)&&Number.isFinite(f.left)&&Number.isFinite(f.right));const m=F([h,r(k,-85.051129,85.051129)]),n=F([j,r(i,-85.051129,85.051129)]),o=[Math.max(Math.abs(n[0]-m[0]),d),Math.max(Math.abs(n[1]-m[1]),d)],p=[a-f.left-f.right-2*Math.abs(g[0]),b-f.top-f.bottom-2*Math.abs(g[1])];z(p[0]>0&&p[1]>0);const q=p[0]/o[0],t=p[1]/o[1],u=(f.right-f.left)/2/q,v=(f.bottom-f.top)/2/t,w=[(n[0]+m[0])/2+u,(n[1]+m[1])/2+v],x=G(w),y=Math.min(e,s(Math.abs(Math.min(q,t))));return z(Number.isFinite(y)),{longitude:x[0],latitude:x[1],zoom:y}}(Object.assign({width:Gb,height:Hb,bounds:Eb},Fb));return new M({width:Gb,height:Hb,longitude:Ib,latitude:Jb,zoom:Kb})}getBounds(Lb){const Mb=this.getBoundingRegion(Lb),Nb=Math.min(...Mb.map(a=>a[0])),Ob=Math.max(...Mb.map(a=>a[0])),Pb=Math.min(...Mb.map(a=>a[1])),Qb=Math.max(...Mb.map(a=>a[1]));return[[Nb,Pb],[Ob,Qb]]}getBoundingRegion(Rb={}){return(function(a,b=0){const{width:c,height:d,unproject:e}=a,f={targetZ:b},g=e([0,d],f),h=e([c,d],f);let i,j;const k=a.fovy?.5*a.fovy*K:Math.atan(.5/a.altitude),l=(90-a.pitch)*K;return k>l-.01?(i=L(a,0,b),j=L(a,c,b)):(i=e([0,0],f),j=e([c,0],f)),[g,h,j,i]})(this,Rb.z||0)}}const Sb=["longitude","latitude","zoom"],Tb={curve:1.414,speed:1.2};function Ub(a,b,c){var d,e,f,g,h,i;c=Object.assign({},Tb,c);const j=c.curve,k=a.zoom,l=[a.longitude,a.latitude],m=E(k),n=b.zoom,o=[b.longitude,b.latitude],p=E(n-k),q=F(l),r=F(o),s=(d=[],e=r,f=q,d[0]=e[0]-f[0],d[1]=e[1]-f[1],d),t=Math.max(a.width,a.height),u=t/p,v=(h=(g=s)[0],i=g[1],Math.hypot(h,i)*m),w=Math.max(v,.01),x=j*j,y=(u*u-t*t+x*x*w*w)/(2*t*x*w),z=(u*u-t*t-x*x*w*w)/(2*u*x*w),A=Math.log(Math.sqrt(y*y+1)-y),B=Math.log(Math.sqrt(z*z+1)-z);return{startZoom:k,startCenterXY:q,uDelta:s,w0:t,u1:v,S:(B-A)/j,rho:j,rho2:x,r0:A,r1:B}}var Vb=function(){if("undefined"!=typeof Map)return Map;function a(a,b){var c=-1;return a.some(function(a,d){return a[0]===b&&(c=d,!0)}),c}return(function(){function b(){this.__entries__=[]}return Object.defineProperty(b.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),b.prototype.get=function(b){var c=a(this.__entries__,b),d=this.__entries__[c];return d&&d[1]},b.prototype.set=function(b,c){var d=a(this.__entries__,b);~d?this.__entries__[d][1]=c:this.__entries__.push([b,c])},b.prototype.delete=function(b){var c=this.__entries__,d=a(c,b);~d&&c.splice(d,1)},b.prototype.has=function(b){return!!~a(this.__entries__,b)},b.prototype.clear=function(){this.__entries__.splice(0)},b.prototype.forEach=function(a,b){void 0===b&&(b=null);for(var c=0,d=this.__entries__;c0},a.prototype.connect_=function(){!Wb||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),$b?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},a.prototype.disconnect_=function(){Wb&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},a.prototype.onTransitionEnd_=function(a){var b=a.propertyName,c=void 0===b?"":b;Zb.some(function(a){return!!~c.indexOf(a)})&&this.refresh()},a.getInstance=function(){return this.instance_||(this.instance_=new a()),this.instance_},a.instance_=null,a}(),ac=function(a,b){for(var c=0,d=Object.keys(b);c0},a}(),kc="undefined"!=typeof WeakMap?new WeakMap():new Vb(),lc=function(){function a(b){if(!(this instanceof a))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var c=_b.getInstance(),d=new jc(b,c,this);kc.set(this,d)}return a}();["observe","unobserve","disconnect"].forEach(function(a){lc.prototype[a]=function(){var b;return(b=kc.get(this))[a].apply(b,arguments)}});var mc,nc,oc=void 0!==Xb.ResizeObserver?Xb.ResizeObserver:lc;function pc(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function qc(a,b){for(var c=0;c=a.length?{done:!0}:{done:!1,value:a[c++]}},e:function(a){throw a},f:d}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var e,f,g=!0,h=!1;return{s:function(){e=a[Symbol.iterator]()},n:function(){var a=e.next();return g=a.done,a},e:function(a){h=!0,f=a},f:function(){try{g||null==e.return||e.return()}finally{if(h)throw f}}}}function wc(a,b){if(a){if("string"==typeof a)return xc(a,b);var c=Object.prototype.toString.call(a).slice(8,-1);if("Object"===c&&a.constructor&&(c=a.constructor.name),"Map"===c||"Set"===c)return Array.from(a);if("Arguments"===c||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c))return xc(a,b)}}function xc(a,b){(null==b||b>a.length)&&(b=a.length);for(var c=0,d=new Array(b);c1&& void 0!==arguments[1]?arguments[1]:"component";a.debug&&j.checkPropTypes(Bc,a,"prop",b)}var Ec=function(){function a(b){var c=this;if(pc(this,a),g(this,"props",Cc),g(this,"width",0),g(this,"height",0),g(this,"_fireLoadEvent",function(){c.props.onLoad({type:"load",target:c._map})}),g(this,"_handleError",function(a){c.props.onError(a)}),!b.mapboxgl)throw new Error("Mapbox not available");this.mapboxgl=b.mapboxgl,a.initialized||(a.initialized=!0,this._checkStyleSheet(this.mapboxgl.version)),this._initialize(b)}return rc(a,[{key:"finalize",value:function(){return this._destroy(),this}},{key:"setProps",value:function(a){return this._update(this.props,a),this}},{key:"redraw",value:function(){var a=this._map;a.style&&(a._frame&&(a._frame.cancel(),a._frame=null),a._render())}},{key:"getMap",value:function(){return this._map}},{key:"_reuse",value:function(b){this._map=a.savedMap;var c=this._map.getContainer(),d=b.container;for(d.classList.add("mapboxgl-map");c.childNodes.length>0;)d.appendChild(c.childNodes[0]);this._map._container=d,a.savedMap=null,b.mapStyle&&this._map.setStyle(zc(b.mapStyle),{diff:!1}),this._map.isStyleLoaded()?this._fireLoadEvent():this._map.once("styledata",this._fireLoadEvent)}},{key:"_create",value:function(b){if(b.reuseMaps&&a.savedMap)this._reuse(b);else{if(b.gl){var c=HTMLCanvasElement.prototype.getContext;HTMLCanvasElement.prototype.getContext=function(){return HTMLCanvasElement.prototype.getContext=c,b.gl}}var d={container:b.container,center:[0,0],zoom:8,pitch:0,bearing:0,maxZoom:24,style:zc(b.mapStyle),interactive:!1,trackResize:!1,attributionControl:b.attributionControl,preserveDrawingBuffer:b.preserveDrawingBuffer};b.transformRequest&&(d.transformRequest=b.transformRequest),this._map=new this.mapboxgl.Map(Object.assign({},d,b.mapOptions)),this._map.once("load",this._fireLoadEvent),this._map.on("error",this._handleError)}return this}},{key:"_destroy",value:function(){this._map&&(this.props.reuseMaps&&!a.savedMap?(a.savedMap=this._map,this._map.off("load",this._fireLoadEvent),this._map.off("error",this._handleError),this._map.off("styledata",this._fireLoadEvent)):this._map.remove(),this._map=null)}},{key:"_initialize",value:function(a){var b=this;Dc(a=Object.assign({},Cc,a),"Mapbox"),this.mapboxgl.accessToken=a.mapboxApiAccessToken||Cc.mapboxApiAccessToken,this.mapboxgl.baseApiUrl=a.mapboxApiUrl,this._create(a);var c=a.container;Object.defineProperty(c,"offsetWidth",{configurable:!0,get:function(){return b.width}}),Object.defineProperty(c,"clientWidth",{configurable:!0,get:function(){return b.width}}),Object.defineProperty(c,"offsetHeight",{configurable:!0,get:function(){return b.height}}),Object.defineProperty(c,"clientHeight",{configurable:!0,get:function(){return b.height}});var d=this._map.getCanvas();d&&(d.style.outline="none"),this._updateMapViewport({},a),this._updateMapSize({},a),this.props=a}},{key:"_update",value:function(a,b){if(this._map){Dc(b=Object.assign({},this.props,b),"Mapbox");var c=this._updateMapViewport(a,b),d=this._updateMapSize(a,b);this._updateMapStyle(a,b),!b.asyncRender&&(c||d)&&this.redraw(),this.props=b}}},{key:"_updateMapStyle",value:function(a,b){a.mapStyle!==b.mapStyle&&this._map.setStyle(zc(b.mapStyle),{diff:!b.preventStyleDiffing})}},{key:"_updateMapSize",value:function(a,b){var c=a.width!==b.width||a.height!==b.height;return c&&(this.width=b.width,this.height=b.height,this._map.resize()),c}},{key:"_updateMapViewport",value:function(a,b){var c=this._getViewState(a),d=this._getViewState(b),e=d.latitude!==c.latitude||d.longitude!==c.longitude||d.zoom!==c.zoom||d.pitch!==c.pitch||d.bearing!==c.bearing||d.altitude!==c.altitude;return e&&(this._map.jumpTo(this._viewStateToMapboxProps(d)),d.altitude!==c.altitude&&(this._map.transform.altitude=d.altitude)),e}},{key:"_getViewState",value:function(a){var b=a.viewState||a,c=b.longitude,d=b.latitude,e=b.zoom,f=b.pitch,g=b.bearing,h=b.altitude;return{longitude:c,latitude:d,zoom:e,pitch:void 0===f?0:f,bearing:void 0===g?0:g,altitude:void 0===h?1.5:h}}},{key:"_checkStyleSheet",value:function(){var a=arguments.length>0&& void 0!==arguments[0]?arguments[0]:"0.47.0";if(void 0!==sc)try{var b=sc.createElement("div");if(b.className="mapboxgl-map",b.style.display="none",sc.body.appendChild(b),!("static"!==window.getComputedStyle(b).position)){var c=sc.createElement("link");c.setAttribute("rel","stylesheet"),c.setAttribute("type","text/css"),c.setAttribute("href","https://api.tiles.mapbox.com/mapbox-gl-js/v".concat(a,"/mapbox-gl.css")),sc.head.appendChild(c)}}catch(d){}}},{key:"_viewStateToMapboxProps",value:function(a){return{center:[a.longitude,a.latitude],zoom:a.zoom,bearing:a.bearing,pitch:a.pitch}}}]),a}();g(Ec,"initialized",!1),g(Ec,"propTypes",Bc),g(Ec,"defaultProps",Cc),g(Ec,"savedMap",null);var Fc=c(6158),Gc=c.n(Fc);function Hc(a){return Array.isArray(a)||ArrayBuffer.isView(a)}function Ic(a,b){if(a===b)return!0;if(Hc(a)&&Hc(b)){if(a.length!==b.length)return!1;for(var c=0;c=Math.abs(a-b)}function Jc(a,b,c){return Math.max(b,Math.min(c,a))}function Kc(a,b,c){return Hc(a)?a.map(function(a,d){return Kc(a,b[d],c)}):c*b+(1-c)*a}function Lc(a,b){if(!a)throw new Error(b||"react-map-gl: assertion failed.")}function Mc(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function Nc(a){for(var b=1;b0,"`scale` must be a positive number");var e=this._state,f=e.startZoom,g=e.startZoomLngLat;Number.isFinite(f)||(f=this._viewportProps.zoom,g=this._unproject(c)||this._unproject(b)),Lc(g,"`startZoomLngLat` prop is required for zoom behavior to calculate where to position the map.");var h=this._calculateNewZoom({scale:d,startZoom:f||0}),i=new M(Object.assign({},this._viewportProps,{zoom:h})),j=i.getMapCenterByLngLatPosition({lngLat:g,pos:b}),l=k(j,2),m=l[0],n=l[1];return this._getUpdatedMapState({zoom:h,longitude:m,latitude:n})}},{key:"zoomEnd",value:function(){return this._getUpdatedMapState({startZoomLngLat:null,startZoom:null})}},{key:"_getUpdatedMapState",value:function(b){return new a(Object.assign({},this._viewportProps,this._state,b))}},{key:"_applyConstraints",value:function(a){var b=a.maxZoom,c=a.minZoom,d=a.zoom;a.zoom=Jc(d,c,b);var e=a.maxPitch,f=a.minPitch,g=a.pitch;return a.pitch=Jc(g,f,e),Object.assign(a,function({width:a,height:b,longitude:c,latitude:d,zoom:e,pitch:f=0,bearing:g=0}){(c< -180||c>180)&&(c=p(c+180,360)-180),(g< -180||g>180)&&(g=p(g+180,360)-180);const h=s(b/512);if(e<=h)e=h,d=0;else{const i=b/2/Math.pow(2,e),j=G([0,i])[1];if(dk&&(d=k)}}return{width:a,height:b,longitude:c,latitude:d,zoom:e,pitch:f,bearing:g}}(a)),a}},{key:"_unproject",value:function(a){var b=new M(this._viewportProps);return a&&b.unproject(a)}},{key:"_calculateNewLngLat",value:function(a){var b=a.startPanLngLat,c=a.pos,d=new M(this._viewportProps);return d.getMapCenterByLngLatPosition({lngLat:b,pos:c})}},{key:"_calculateNewZoom",value:function(a){var b=a.scale,c=a.startZoom,d=this._viewportProps,e=d.maxZoom,f=d.minZoom;return Jc(c+Math.log2(b),f,e)}},{key:"_calculateNewPitchAndBearing",value:function(a){var b=a.deltaScaleX,c=a.deltaScaleY,d=a.startBearing,e=a.startPitch;c=Jc(c,-1,1);var f=this._viewportProps,g=f.minPitch,h=f.maxPitch,i=e;return c>0?i=e+c*(h-e):c<0&&(i=e-c*(g-e)),{pitch:i,bearing:d+180*b}}},{key:"_getRotationParams",value:function(a,b){var c=a[0]-b[0],d=a[1]-b[1],e=a[1],f=b[1],g=this._viewportProps,h=g.width,i=g.height,j=0;return d>0?Math.abs(i-f)>5&&(j=d/(f-i)*1.2):d<0&&f>5&&(j=1-e/f),{deltaScaleX:c/h,deltaScaleY:j=Math.min(1,Math.max(-1,j))}}}]),a}();function Rc(a){return a[0].toLowerCase()+a.slice(1)}function Sc(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function Tc(a){for(var b=1;b1&& void 0!==arguments[1]?arguments[1]:{},d=a.current&&a.current.getMap();return d&&d.queryRenderedFeatures(b,c)}}},[]);var q=(0,i.useCallback)(function(a){var b=a.target;b===n.current&&b.scrollTo(0,0)},[]),r=p&&i.createElement(Vc,{value:$c($c({},o),{},{viewport:o.viewport||ad($c({map:p,props:a},g)),map:p,container:o.container||m.current})},i.createElement("div",{key:"map-overlays",className:"overlays",ref:n,style:bd,onScroll:q},a.children)),s=a.className,t=a.width,u=a.height,v=a.style,w=a.visibilityConstraints,x=Object.assign({position:"relative"},v,{width:t,height:u}),y=a.visible&&function(a){var b=arguments.length>1&& void 0!==arguments[1]?arguments[1]:Oc;for(var c in b){var d=c.slice(0,3),e=Rc(c.slice(3));if("min"===d&&a[e]b[c])return!1}return!0}(a.viewState||a,w),z=Object.assign({},bd,{visibility:y?"inherit":"hidden"});return i.createElement("div",{key:"map-container",ref:m,style:x},i.createElement("div",{key:"map-mapbox",ref:l,style:z,className:s}),r,!d&&!a.disableTokenWarning&&i.createElement(ed,null))});fd.supported=function(){return Gc()&&Gc().supported()},fd.propTypes=cd,fd.defaultProps=dd;var gd=fd;function hd(a,b){(null==b||b>a.length)&&(b=a.length);for(var c=0,d=new Array(b);c=a.length?{done:!0}:{done:!1,value:a[c++]}},e:function(a){throw a},f:d}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var e,f,g=!0,h=!1;return{s:function(){e=a[Symbol.iterator]()},n:function(){var a=e.next();return g=a.done,a},e:function(a){h=!0,f=a},f:function(){try{g||null==e.return||e.return()}finally{if(h)throw f}}}}(this.propNames||[]);try{for(d.s();!(c=d.n()).done;){var e=c.value;if(!Ic(a[e],b[e]))return!1}}catch(f){d.e(f)}finally{d.f()}return!0}},{key:"initializeProps",value:function(a,b){return{start:a,end:b}}},{key:"interpolateProps",value:function(a,b,c){Lc(!1,"interpolateProps is not implemented")}},{key:"getDuration",value:function(a,b){return b.transitionDuration}}]),a}();function jd(a){if(void 0===a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function kd(a,b){return(kd=Object.setPrototypeOf||function(a,b){return a.__proto__=b,a})(a,b)}function ld(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),Object.defineProperty(a,"prototype",{writable:!1}),b&&kd(a,b)}function md(a){return(md="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a})(a)}function nd(a,b){if(b&&("object"===md(b)||"function"==typeof b))return b;if(void 0!==b)throw new TypeError("Derived constructors may only return object or undefined");return jd(a)}function od(a){return(od=Object.setPrototypeOf?Object.getPrototypeOf:function(a){return a.__proto__||Object.getPrototypeOf(a)})(a)}var pd={longitude:1,bearing:1};function qd(a){return Number.isFinite(a)||Array.isArray(a)}function rd(a,b,c){return a in pd&&Math.abs(c-b)>180&&(c=c<0?c+360:c-360),c}function sd(a,b){if("undefined"==typeof Symbol||null==a[Symbol.iterator]){if(Array.isArray(a)||(e=td(a))||b&&a&&"number"==typeof a.length){e&&(a=e);var c=0,d=function(){};return{s:d,n:function(){return c>=a.length?{done:!0}:{done:!1,value:a[c++]}},e:function(a){throw a},f:d}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var e,f,g=!0,h=!1;return{s:function(){e=a[Symbol.iterator]()},n:function(){var a=e.next();return g=a.done,a},e:function(a){h=!0,f=a},f:function(){try{g||null==e.return||e.return()}finally{if(h)throw f}}}}function td(a,b){if(a){if("string"==typeof a)return ud(a,b);var c=Object.prototype.toString.call(a).slice(8,-1);if("Object"===c&&a.constructor&&(c=a.constructor.name),"Map"===c||"Set"===c)return Array.from(a);if("Arguments"===c||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c))return ud(a,b)}}function ud(a,b){(null==b||b>a.length)&&(b=a.length);for(var c=0,d=new Array(b);c=a.length?{done:!0}:{done:!1,value:a[c++]}},e:function(a){throw a},f:d}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var e,f,g=!0,h=!1;return{s:function(){e=a[Symbol.iterator]()},n:function(){var a=e.next();return g=a.done,a},e:function(a){h=!0,f=a},f:function(){try{g||null==e.return||e.return()}finally{if(h)throw f}}}}function Ad(a,b){if(a){if("string"==typeof a)return Bd(a,b);var c=Object.prototype.toString.call(a).slice(8,-1);if("Object"===c&&a.constructor&&(c=a.constructor.name),"Map"===c||"Set"===c)return Array.from(a);if("Arguments"===c||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c))return Bd(a,b)}}function Bd(a,b){(null==b||b>a.length)&&(b=a.length);for(var c=0,d=new Array(b);c0&& void 0!==arguments[0]?arguments[0]:{};return pc(this,e),g(jd(a=d.call(this)),"propNames",vd),a.props=Object.assign({},yd,b),a}rc(e,[{key:"initializeProps",value:function(a,b){var c,d={},e={},f=sd(wd);try{for(f.s();!(c=f.n()).done;){var g=c.value,h=a[g],i=b[g];Lc(qd(h)&&qd(i),"".concat(g," must be supplied for transition")),d[g]=h,e[g]=rd(g,h,i)}}catch(j){f.e(j)}finally{f.f()}var k,l=sd(xd);try{for(l.s();!(k=l.n()).done;){var m=k.value,n=a[m]||0,o=b[m]||0;d[m]=n,e[m]=rd(m,n,o)}}catch(p){l.e(p)}finally{l.f()}return{start:d,end:e}}},{key:"interpolateProps",value:function(a,b,c){var d,e=function(a,b,c,d={}){var e,f,g;const h={},{startZoom:i,startCenterXY:j,uDelta:k,w0:l,u1:m,S:n,rho:o,rho2:p,r0:r}=Ub(a,b,d);if(m<.01){for(const t of Sb){const u=a[t],v=b[t];h[t]=q(u,v,c)}return h}const w=c*n,y=i+s(1/(Math.cosh(r)/Math.cosh(r+o*w))),z=(e=[],f=k,g=l*((Math.cosh(r)*Math.tanh(r+o*w)-Math.sinh(r))/p)/m,e[0]=f[0]*g,e[1]=f[1]*g,e);x(z,z,j);const A=G(z);return h.longitude=A[0],h.latitude=A[1],h.zoom=y,h}(a,b,c,this.props),f=sd(xd);try{for(f.s();!(d=f.n()).done;){var g=d.value;e[g]=Kc(a[g],b[g],c)}}catch(h){f.e(h)}finally{f.f()}return e}},{key:"getDuration",value:function(a,b){var c=b.transitionDuration;return"auto"===c&&(c=(function(a,b,c={}){c=Object.assign({},Tb,c);const{screenSpeed:d,speed:e,maxDuration:f}=c,{S:g,rho:h}=Ub(a,b,c),i=1e3*g;let j;return j=Number.isFinite(d)?i/(d/h):i/e,Number.isFinite(f)&&j>f?0:j})(a,b,this.props)),c}}])}(id);var Cd=["longitude","latitude","zoom","bearing","pitch"],Dd=function(a){ld(e,a);var b,c,d=(b=e,c=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(a){return!1}}(),function(){var a,d=od(b);if(c){var e=od(this).constructor;a=Reflect.construct(d,arguments,e)}else a=d.apply(this,arguments);return nd(this,a)});function e(){var a,b=arguments.length>0&& void 0!==arguments[0]?arguments[0]:{};return pc(this,e),a=d.call(this),Array.isArray(b)&&(b={transitionProps:b}),a.propNames=b.transitionProps||Cd,b.around&&(a.around=b.around),a}return rc(e,[{key:"initializeProps",value:function(a,b){var c={},d={};if(this.around){c.around=this.around;var e=new M(a).unproject(this.around);Object.assign(d,b,{around:new M(b).project(e),aroundLngLat:e})}var f,g=zd(this.propNames);try{for(g.s();!(f=g.n()).done;){var h=f.value,i=a[h],j=b[h];Lc(qd(i)&&qd(j),"".concat(h," must be supplied for transition")),c[h]=i,d[h]=rd(h,i,j)}}catch(k){g.e(k)}finally{g.f()}return{start:c,end:d}}},{key:"interpolateProps",value:function(a,b,c){var d,e={},f=zd(this.propNames);try{for(f.s();!(d=f.n()).done;){var g=d.value;e[g]=Kc(a[g],b[g],c)}}catch(h){f.e(h)}finally{f.f()}if(b.around){var i=k(new M(Object.assign({},b,e)).getMapCenterByLngLatPosition({lngLat:b.aroundLngLat,pos:Kc(a.around,b.around,c)}),2),j=i[0],l=i[1];e.longitude=j,e.latitude=l}return e}}]),e}(id),Ed=function(){},Fd={BREAK:1,SNAP_TO_END:2,IGNORE:3,UPDATE:4},Gd={transitionDuration:0,transitionEasing:function(a){return a},transitionInterpolator:new Dd(),transitionInterruption:Fd.BREAK,onTransitionStart:Ed,onTransitionInterrupt:Ed,onTransitionEnd:Ed},Hd=function(){function a(){var b=this,c=arguments.length>0&& void 0!==arguments[0]?arguments[0]:{};pc(this,a),g(this,"_animationFrame",null),g(this,"_onTransitionFrame",function(){b._animationFrame=requestAnimationFrame(b._onTransitionFrame),b._updateViewport()}),this.props=null,this.onViewportChange=c.onViewportChange||Ed,this.onStateChange=c.onStateChange||Ed,this.time=c.getTime||Date.now}return rc(a,[{key:"getViewportInTransition",value:function(){return this._animationFrame?this.state.propsInTransition:null}},{key:"processViewportChange",value:function(a){var b=this.props;if(this.props=a,!b||this._shouldIgnoreViewportChange(b,a))return!1;if(this._isTransitionEnabled(a)){var c=Object.assign({},b),d=Object.assign({},a);if(this._isTransitionInProgress()&&(b.onTransitionInterrupt(),this.state.interruption===Fd.SNAP_TO_END?Object.assign(c,this.state.endProps):Object.assign(c,this.state.propsInTransition),this.state.interruption===Fd.UPDATE)){var e,f,g,h=this.time(),i=(h-this.state.startTime)/this.state.duration;d.transitionDuration=this.state.duration-(h-this.state.startTime),g=(e=this.state.easing)(f=i),d.transitionEasing=function(a){return 1/(1-g)*(e(a*(1-f)+f)-g)},d.transitionInterpolator=c.transitionInterpolator}return d.onTransitionStart(),this._triggerTransition(c,d),!0}return this._isTransitionInProgress()&&(b.onTransitionInterrupt(),this._endTransition()),!1}},{key:"_isTransitionInProgress",value:function(){return Boolean(this._animationFrame)}},{key:"_isTransitionEnabled",value:function(a){var b=a.transitionDuration,c=a.transitionInterpolator;return(b>0||"auto"===b)&&Boolean(c)}},{key:"_isUpdateDueToCurrentTransition",value:function(a){return!!this.state.propsInTransition&&this.state.interpolator.arePropsEqual(a,this.state.propsInTransition)}},{key:"_shouldIgnoreViewportChange",value:function(a,b){return!a||(this._isTransitionInProgress()?this.state.interruption===Fd.IGNORE||this._isUpdateDueToCurrentTransition(b):!this._isTransitionEnabled(b)||b.transitionInterpolator.arePropsEqual(a,b))}},{key:"_triggerTransition",value:function(a,b){Lc(this._isTransitionEnabled(b)),this._animationFrame&&cancelAnimationFrame(this._animationFrame);var c=b.transitionInterpolator,d=c.getDuration?c.getDuration(a,b):b.transitionDuration;if(0!==d){var e=b.transitionInterpolator.initializeProps(a,b),f={inTransition:!0,isZooming:a.zoom!==b.zoom,isPanning:a.longitude!==b.longitude||a.latitude!==b.latitude,isRotating:a.bearing!==b.bearing||a.pitch!==b.pitch};this.state={duration:d,easing:b.transitionEasing,interpolator:b.transitionInterpolator,interruption:b.transitionInterruption,startTime:this.time(),startProps:e.start,endProps:e.end,animation:null,propsInTransition:{}},this._onTransitionFrame(),this.onStateChange(f)}}},{key:"_endTransition",value:function(){this._animationFrame&&(cancelAnimationFrame(this._animationFrame),this._animationFrame=null),this.onStateChange({inTransition:!1,isZooming:!1,isPanning:!1,isRotating:!1})}},{key:"_updateViewport",value:function(){var a=this.time(),b=this.state,c=b.startTime,d=b.duration,e=b.easing,f=b.interpolator,g=b.startProps,h=b.endProps,i=!1,j=(a-c)/d;j>=1&&(j=1,i=!0),j=e(j);var k=f.interpolateProps(g,h,j),l=new Qc(Object.assign({},this.props,k));this.state.propsInTransition=l.getViewportProps(),this.onViewportChange(this.state.propsInTransition,this.props),i&&(this._endTransition(),this.props.onTransitionEnd())}}]),a}();g(Hd,"defaultProps",Gd);var Id=c(840),Jd=c.n(Id);const Kd={mousedown:1,mousemove:2,mouseup:4};!function(a){const b=a.prototype.handler;a.prototype.handler=function(a){const c=this.store;a.button>0&&"pointerdown"===a.type&& !function(a,b){for(let c=0;cb.pointerId===a.pointerId)&&c.push(a),b.call(this,a)}}(Jd().PointerEventInput),Jd().MouseInput.prototype.handler=function(a){let b=Kd[a.type];1&b&&a.button>=0&&(this.pressed=!0),2&b&&0===a.which&&(b=4),this.pressed&&(4&b&&(this.pressed=!1),this.callback(this.manager,b,{pointers:[a],changedPointers:[a],pointerType:"mouse",srcEvent:a}))};const Ld=Jd().Manager;var Md=Jd();const Nd=Md?[[Md.Pan,{event:"tripan",pointers:3,threshold:0,enable:!1}],[Md.Rotate,{enable:!1}],[Md.Pinch,{enable:!1}],[Md.Swipe,{enable:!1}],[Md.Pan,{threshold:0,enable:!1}],[Md.Press,{enable:!1}],[Md.Tap,{event:"doubletap",taps:2,enable:!1}],[Md.Tap,{event:"anytap",enable:!1}],[Md.Tap,{enable:!1}]]:null,Od={tripan:["rotate","pinch","pan"],rotate:["pinch"],pinch:["pan"],pan:["press","doubletap","anytap","tap"],doubletap:["anytap"],anytap:["tap"]},Pd={doubletap:["tap"]},Qd={pointerdown:"pointerdown",pointermove:"pointermove",pointerup:"pointerup",touchstart:"pointerdown",touchmove:"pointermove",touchend:"pointerup",mousedown:"pointerdown",mousemove:"pointermove",mouseup:"pointerup"},Rd={KEY_EVENTS:["keydown","keyup"],MOUSE_EVENTS:["mousedown","mousemove","mouseup","mouseover","mouseout","mouseleave"],WHEEL_EVENTS:["wheel","mousewheel"]},Sd={tap:"tap",anytap:"anytap",doubletap:"doubletap",press:"press",pinch:"pinch",pinchin:"pinch",pinchout:"pinch",pinchstart:"pinch",pinchmove:"pinch",pinchend:"pinch",pinchcancel:"pinch",rotate:"rotate",rotatestart:"rotate",rotatemove:"rotate",rotateend:"rotate",rotatecancel:"rotate",tripan:"tripan",tripanstart:"tripan",tripanmove:"tripan",tripanup:"tripan",tripandown:"tripan",tripanleft:"tripan",tripanright:"tripan",tripanend:"tripan",tripancancel:"tripan",pan:"pan",panstart:"pan",panmove:"pan",panup:"pan",pandown:"pan",panleft:"pan",panright:"pan",panend:"pan",pancancel:"pan",swipe:"swipe",swipeleft:"swipe",swiperight:"swipe",swipeup:"swipe",swipedown:"swipe"},Td={click:"tap",anyclick:"anytap",dblclick:"doubletap",mousedown:"pointerdown",mousemove:"pointermove",mouseup:"pointerup",mouseover:"pointerover",mouseout:"pointerout",mouseleave:"pointerleave"},Ud="undefined"!=typeof navigator&&navigator.userAgent?navigator.userAgent.toLowerCase():"",Vd="undefined"!=typeof window?window:c.g;void 0!==c.g&&c.g;let Wd=!1;try{const Xd={get passive(){return Wd=!0,!0}};Vd.addEventListener("test",Xd,Xd),Vd.removeEventListener("test",Xd,Xd)}catch(Yd){}const Zd=-1!==Ud.indexOf("firefox"),{WHEEL_EVENTS:$d}=Rd,_d="wheel";class ae{constructor(be,ce,de={}){this.element=be,this.callback=ce,this.options=Object.assign({enable:!0},de),this.events=$d.concat(de.events||[]),this.handleEvent=this.handleEvent.bind(this),this.events.forEach(a=>be.addEventListener(a,this.handleEvent,!!Wd&&{passive:!1}))}destroy(){this.events.forEach(a=>this.element.removeEventListener(a,this.handleEvent))}enableEventType(ee,fe){ee===_d&&(this.options.enable=fe)}handleEvent(ge){if(!this.options.enable)return;let he=ge.deltaY;Vd.WheelEvent&&(Zd&&ge.deltaMode===Vd.WheelEvent.DOM_DELTA_PIXEL&&(he/=Vd.devicePixelRatio),ge.deltaMode===Vd.WheelEvent.DOM_DELTA_LINE&&(he*=40));const ie={x:ge.clientX,y:ge.clientY};0!==he&&he%4.000244140625==0&&(he=Math.floor(he/4.000244140625)),ge.shiftKey&&he&&(he*=.25),this._onWheel(ge,-he,ie)}_onWheel(je,ke,le){this.callback({type:_d,center:le,delta:ke,srcEvent:je,pointerType:"mouse",target:je.target})}}const{MOUSE_EVENTS:me}=Rd,ne="pointermove",oe="pointerover",pe="pointerout",qe="pointerleave";class re{constructor(se,te,ue={}){this.element=se,this.callback=te,this.pressed=!1,this.options=Object.assign({enable:!0},ue),this.enableMoveEvent=this.options.enable,this.enableLeaveEvent=this.options.enable,this.enableOutEvent=this.options.enable,this.enableOverEvent=this.options.enable,this.events=me.concat(ue.events||[]),this.handleEvent=this.handleEvent.bind(this),this.events.forEach(a=>se.addEventListener(a,this.handleEvent))}destroy(){this.events.forEach(a=>this.element.removeEventListener(a,this.handleEvent))}enableEventType(ve,we){ve===ne&&(this.enableMoveEvent=we),ve===oe&&(this.enableOverEvent=we),ve===pe&&(this.enableOutEvent=we),ve===qe&&(this.enableLeaveEvent=we)}handleEvent(xe){this.handleOverEvent(xe),this.handleOutEvent(xe),this.handleLeaveEvent(xe),this.handleMoveEvent(xe)}handleOverEvent(ye){this.enableOverEvent&&"mouseover"===ye.type&&this.callback({type:oe,srcEvent:ye,pointerType:"mouse",target:ye.target})}handleOutEvent(ze){this.enableOutEvent&&"mouseout"===ze.type&&this.callback({type:pe,srcEvent:ze,pointerType:"mouse",target:ze.target})}handleLeaveEvent(Ae){this.enableLeaveEvent&&"mouseleave"===Ae.type&&this.callback({type:qe,srcEvent:Ae,pointerType:"mouse",target:Ae.target})}handleMoveEvent(Be){if(this.enableMoveEvent)switch(Be.type){case"mousedown":Be.button>=0&&(this.pressed=!0);break;case"mousemove":0===Be.which&&(this.pressed=!1),this.pressed||this.callback({type:ne,srcEvent:Be,pointerType:"mouse",target:Be.target});break;case"mouseup":this.pressed=!1;break;default:}}}const{KEY_EVENTS:Ce}=Rd,De="keydown",Ee="keyup";class Fe{constructor(Ge,He,Ie={}){this.element=Ge,this.callback=He,this.options=Object.assign({enable:!0},Ie),this.enableDownEvent=this.options.enable,this.enableUpEvent=this.options.enable,this.events=Ce.concat(Ie.events||[]),this.handleEvent=this.handleEvent.bind(this),Ge.tabIndex=Ie.tabIndex||0,Ge.style.outline="none",this.events.forEach(a=>Ge.addEventListener(a,this.handleEvent))}destroy(){this.events.forEach(a=>this.element.removeEventListener(a,this.handleEvent))}enableEventType(Je,Ke){Je===De&&(this.enableDownEvent=Ke),Je===Ee&&(this.enableUpEvent=Ke)}handleEvent(Le){const Me=Le.target||Le.srcElement;("INPUT"!==Me.tagName||"text"!==Me.type)&&"TEXTAREA"!==Me.tagName&&(this.enableDownEvent&&"keydown"===Le.type&&this.callback({type:De,srcEvent:Le,key:Le.key,target:Le.target}),this.enableUpEvent&&"keyup"===Le.type&&this.callback({type:Ee,srcEvent:Le,key:Le.key,target:Le.target}))}}const Ne="contextmenu";class Oe{constructor(Pe,Qe,Re={}){this.element=Pe,this.callback=Qe,this.options=Object.assign({enable:!0},Re),this.handleEvent=this.handleEvent.bind(this),Pe.addEventListener("contextmenu",this.handleEvent)}destroy(){this.element.removeEventListener("contextmenu",this.handleEvent)}enableEventType(Se,Te){Se===Ne&&(this.options.enable=Te)}handleEvent(Ue){this.options.enable&&this.callback({type:Ne,center:{x:Ue.clientX,y:Ue.clientY},srcEvent:Ue,pointerType:"mouse",target:Ue.target})}}const Ve={pointerdown:1,pointermove:2,pointerup:4,mousedown:1,mousemove:2,mouseup:4},We={srcElement:"root",priority:0};class Xe{constructor(Ye){this.eventManager=Ye,this.handlers=[],this.handlersByElement=new Map(),this.handleEvent=this.handleEvent.bind(this),this._active=!1}isEmpty(){return!this._active}add(Ze,$e,_e,af=!1,bf=!1){const{handlers:cf,handlersByElement:df}=this;_e&&("object"!=typeof _e||_e.addEventListener)&&(_e={srcElement:_e}),_e=_e?Object.assign({},We,_e):We;let ef=df.get(_e.srcElement);ef||(ef=[],df.set(_e.srcElement,ef));const ff={type:Ze,handler:$e,srcElement:_e.srcElement,priority:_e.priority};af&&(ff.once=!0),bf&&(ff.passive=!0),cf.push(ff),this._active=this._active||!ff.passive;let gf=ef.length-1;for(;gf>=0;){if(ef[gf].priority>=ff.priority)break;gf--}ef.splice(gf+1,0,ff)}remove(hf,jf){const{handlers:kf,handlersByElement:lf}=this;for(let mf=kf.length-1;mf>=0;mf--){const nf=kf[mf];if(nf.type===hf&&nf.handler===jf){kf.splice(mf,1);const of=lf.get(nf.srcElement);of.splice(of.indexOf(nf),1),0===of.length&&lf.delete(nf.srcElement)}}this._active=kf.some(a=>!a.passive)}handleEvent(pf){if(this.isEmpty())return;const qf=this._normalizeEvent(pf);let rf=pf.srcEvent.target;for(;rf&&rf!==qf.rootElement;){if(this._emit(qf,rf),qf.handled)return;rf=rf.parentNode}this._emit(qf,"root")}_emit(sf,tf){const uf=this.handlersByElement.get(tf);if(uf){let vf=!1;const wf=()=>{sf.handled=!0},xf=()=>{sf.handled=!0,vf=!0},yf=[];for(let zf=0;zf{const b=this.manager.get(a);b&&Od[a].forEach(a=>{b.recognizeWith(a)})}),Nf.recognizerOptions){const Qf=this.manager.get(Pf);if(Qf){const Rf=Nf.recognizerOptions[Pf];delete Rf.enable,Qf.set(Rf)}}for(const[Sf,Tf]of(this.wheelInput=new ae(Mf,this._onOtherEvent,{enable:!1}),this.moveInput=new re(Mf,this._onOtherEvent,{enable:!1}),this.keyInput=new Fe(Mf,this._onOtherEvent,{enable:!1,tabIndex:Nf.tabIndex}),this.contextmenuInput=new Oe(Mf,this._onOtherEvent,{enable:!1}),this.events))Tf.isEmpty()||(this._toggleRecognizer(Tf.recognizerName,!0),this.manager.on(Sf,Tf.handleEvent))}destroy(){this.element&&(this.wheelInput.destroy(),this.moveInput.destroy(),this.keyInput.destroy(),this.contextmenuInput.destroy(),this.manager.destroy(),this.wheelInput=null,this.moveInput=null,this.keyInput=null,this.contextmenuInput=null,this.manager=null,this.element=null)}on(Uf,Vf,Wf){this._addEventHandler(Uf,Vf,Wf,!1)}once(Xf,Yf,Zf){this._addEventHandler(Xf,Yf,Zf,!0)}watch($f,_f,ag){this._addEventHandler($f,_f,ag,!1,!0)}off(bg,cg){this._removeEventHandler(bg,cg)}_toggleRecognizer(dg,eg){const{manager:fg}=this;if(!fg)return;const gg=fg.get(dg);if(gg&&gg.options.enable!==eg){gg.set({enable:eg});const hg=Pd[dg];hg&&!this.options.recognizers&&hg.forEach(a=>{const b=fg.get(a);eg?(b.requireFailure(dg),gg.dropRequireFailure(a)):b.dropRequireFailure(dg)})}this.wheelInput.enableEventType(dg,eg),this.moveInput.enableEventType(dg,eg),this.keyInput.enableEventType(dg,eg),this.contextmenuInput.enableEventType(dg,eg)}_addEventHandler(ig,jg,kg,lg,mg){if("string"!=typeof ig){for(const ng in kg=jg,ig)this._addEventHandler(ng,ig[ng],kg,lg,mg);return}const{manager:og,events:pg}=this,qg=Td[ig]||ig;let rg=pg.get(qg);!rg&&(rg=new Xe(this),pg.set(qg,rg),rg.recognizerName=Sd[qg]||qg,og&&og.on(qg,rg.handleEvent)),rg.add(ig,jg,kg,lg,mg),rg.isEmpty()||this._toggleRecognizer(rg.recognizerName,!0)}_removeEventHandler(sg,tg){if("string"!=typeof sg){for(const ug in sg)this._removeEventHandler(ug,sg[ug]);return}const{events:vg}=this,wg=Td[sg]||sg,xg=vg.get(wg);if(xg&&(xg.remove(sg,tg),xg.isEmpty())){const{recognizerName:yg}=xg;let zg=!1;for(const Ag of vg.values())if(Ag.recognizerName===yg&&!Ag.isEmpty()){zg=!0;break}zg||this._toggleRecognizer(yg,!1)}}_onBasicInput(Bg){const{srcEvent:Cg}=Bg,Dg=Qd[Cg.type];Dg&&this.manager.emit(Dg,Bg)}_onOtherEvent(Eg){this.manager.emit(Eg.type,Eg)}}function Fg(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function Gg(a){for(var b=1;b0),g=f&&!this.state.isHovering,h=!f&&this.state.isHovering;(d||g)&&(a.features=b,d&&d(a)),g&&Sg.call(this,"onMouseEnter",a),h&&Sg.call(this,"onMouseLeave",a),(g||h)&&this.setState({isHovering:f})}}function Wg(a){var b=this.props,c=b.onClick,d=b.onNativeClick,e=b.onDblClick,f=b.doubleClickZoom,g=[],h=e||f;switch(a.type){case"anyclick":g.push(d),h||g.push(c);break;case"click":h&&g.push(c);break;default:}(g=g.filter(Boolean)).length&&((a=Qg.call(this,a)).features=Rg.call(this,a.point),g.forEach(function(b){return b(a)}))}var Xg=(0,i.forwardRef)(function(a,b){var c,g,h=(0,i.useContext)(Wc),j=(0,i.useMemo)(function(){return a.controller||new Lg()},[]),k=(0,i.useMemo)(function(){return new If(null,{touchAction:a.touchAction,recognizerOptions:a.eventRecognizerOptions})},[]),l=(0,i.useRef)(null),m=(0,i.useRef)(null),n=(0,i.useRef)({width:0,height:0,state:{isHovering:!1,isDragging:!1}}).current;n.props=a,n.map=m.current&&m.current.getMap(),n.setState=function(b){n.state=Ng(Ng({},n.state),b),l.current.style.cursor=a.getCursor(n.state)};var o=!0,p=function(a,b,d){if(o){c=[a,b,d];return}var e=n.props,f=e.onViewStateChange,g=e.onViewportChange;Object.defineProperty(a,"position",{get:function(){return[0,0,Yc(n.map,a)]}}),f&&f({viewState:a,interactionState:b,oldViewState:d}),g&&g(a,b,d)};(0,i.useImperativeHandle)(b,function(){var a;return{getMap:(a=m).current&&a.current.getMap,queryRenderedFeatures:a.current&&a.current.queryRenderedFeatures}},[]);var q=(0,i.useMemo)(function(){return Ng(Ng({},h),{},{eventManager:k,container:h.container||l.current})},[h,l.current]);q.onViewportChange=p,q.viewport=h.viewport||ad(n),n.viewport=q.viewport;var r=function(a){var b=a.isDragging,c=void 0!==b&&b;if(c!==n.state.isDragging&&n.setState({isDragging:c}),o){g=a;return}var d=n.props.onInteractionStateChange;d&&d(a)},s=function(){n.width&&n.height&&j.setOptions(Ng(Ng(Ng({},n.props),n.props.viewState),{},{isInteractive:Boolean(n.props.onViewStateChange||n.props.onViewportChange),onViewportChange:p,onStateChange:r,eventManager:k,width:n.width,height:n.height}))},t=function(a){var b=a.width,c=a.height;n.width=b,n.height=c,s(),n.props.onResize({width:b,height:c})};(0,i.useEffect)(function(){return k.setElement(l.current),k.on({pointerdown:Tg.bind(n),pointermove:Vg.bind(n),pointerup:Ug.bind(n),pointerleave:Sg.bind(n,"onMouseOut"),click:Wg.bind(n),anyclick:Wg.bind(n),dblclick:Sg.bind(n,"onDblClick"),wheel:Sg.bind(n,"onWheel"),contextmenu:Sg.bind(n,"onContextMenu")}),function(){k.destroy()}},[]),Xc(function(){if(c){var a;p.apply(void 0,function(a){if(Array.isArray(a))return e(a)}(a=c)||function(a){if("undefined"!=typeof Symbol&&null!=a[Symbol.iterator]||null!=a["@@iterator"])return Array.from(a)}(a)||f(a)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())}g&&r(g)}),s();var u=a.width,v=a.height,w=a.style,x=a.getCursor,y=(0,i.useMemo)(function(){return Ng(Ng({position:"relative"},w),{},{width:u,height:v,cursor:x(n.state)})},[w,u,v,x,n.state]);return c&&n._child||(n._child=i.createElement(Vc,{value:q},i.createElement("div",{key:"event-canvas",ref:l,style:y},i.createElement(gd,d({},a,{width:"100%",height:"100%",style:null,onResize:t,ref:m}))))),o=!1,n._child});Xg.supported=gd.supported,Xg.propTypes=Og,Xg.defaultProps=Pg;var Yg=Xg;function Zg(a,b){if(a===b)return!0;if(!a||!b)return!1;if(Array.isArray(a)){if(!Array.isArray(b)||a.length!==b.length)return!1;for(var c=0;c prop: ".concat(d))}})(l,a,c.current):l=(function(a,b,c){if(a.style&&a.style._loaded){var d=function(a){for(var b=1;b=0||(e[c]=a[c]);return e}(a,b);if(Object.getOwnPropertySymbols){var f=Object.getOwnPropertySymbols(a);for(d=0;d=0)&&Object.prototype.propertyIsEnumerable.call(a,c)&&(e[c]=a[c])}return e}(c,["layout","paint","filter","minzoom","maxzoom","beforeId"]);if(l!==d.beforeId&&a.moveLayer(b,l),f!==d.layout){var n=d.layout||{};for(var o in f)Zg(f[o],n[o])||a.setLayoutProperty(b,o,f[o]);for(var p in n)f.hasOwnProperty(p)||a.setLayoutProperty(b,p,void 0)}if(h!==d.paint){var q=d.paint||{};for(var r in h)Zg(h[r],q[r])||a.setPaintProperty(b,r,h[r]);for(var s in q)h.hasOwnProperty(s)||a.setPaintProperty(b,s,void 0)}for(var t in Zg(i,d.filter)||a.setFilter(b,i),(j!==d.minzoom||k!==d.maxzoom)&&a.setLayerZoomRange(b,j,k),m)Zg(m[t],d[t])||a.setLayerProperty(b,t,m[t])}(a,b,c,d)}catch(e){console.warn(e)}})(h,g,a,c.current):(function(a,b,c){if(a.style&&a.style._loaded){var d=ch(ch({},c),{},{id:b});delete d.beforeId,a.addLayer(d,c.beforeId)}})(h,g,a),c.current=a,null}).propTypes=dh;var fh={captureScroll:!1,captureDrag:!0,captureClick:!0,captureDoubleClick:!0,capturePointerMove:!1},gh={captureScroll:j.bool,captureDrag:j.bool,captureClick:j.bool,captureDoubleClick:j.bool,capturePointerMove:j.bool};function hh(){var a=arguments.length>0&& void 0!==arguments[0]?arguments[0]:{},b=(0,i.useContext)(Wc),c=(0,i.useRef)(null),d=(0,i.useRef)({props:a,state:{},context:b,containerRef:c}),e=d.current;return e.props=a,e.context=b,(0,i.useEffect)(function(){return(function(a){var b=a.containerRef.current,c=a.context.eventManager;if(b&&c){var d={wheel:function(b){var c=a.props;c.captureScroll&&b.stopPropagation(),c.onScroll&&c.onScroll(b,a)},panstart:function(b){var c=a.props;c.captureDrag&&b.stopPropagation(),c.onDragStart&&c.onDragStart(b,a)},anyclick:function(b){var c=a.props;c.captureClick&&b.stopPropagation(),c.onNativeClick&&c.onNativeClick(b,a)},click:function(b){var c=a.props;c.captureClick&&b.stopPropagation(),c.onClick&&c.onClick(b,a)},dblclick:function(b){var c=a.props;c.captureDoubleClick&&b.stopPropagation(),c.onDoubleClick&&c.onDoubleClick(b,a)},pointermove:function(b){var c=a.props;c.capturePointerMove&&b.stopPropagation(),c.onPointerMove&&c.onPointerMove(b,a)}};return c.watch(d,b),function(){c.off(d)}}})(e)},[b.eventManager]),e}function ih(a){var b=a.instance,c=hh(a),d=c.context,e=c.containerRef;return b._context=d,b._containerRef=e,b._render()}var jh=function(a){ld(f,a);var b,c,e=(b=f,c=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(a){return!1}}(),function(){var a,d=od(b);if(c){var e=od(this).constructor;a=Reflect.construct(d,arguments,e)}else a=d.apply(this,arguments);return nd(this,a)});function f(){var a;pc(this,f);for(var b=arguments.length,c=new Array(b),d=0;d2&& void 0!==arguments[2]?arguments[2]:"x";if(null===a)return b;var d="x"===c?a.offsetWidth:a.offsetHeight;return sh(b/100*d)/d*100};function uh(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}var vh=Object.assign({},mh,{className:j.string,longitude:j.number.isRequired,latitude:j.number.isRequired,style:j.object}),wh=Object.assign({},nh,{className:""});function xh(a){var b,c,d,e,f,h,j,l,m=(b=a,d=(c=k((0,i.useState)(null),2))[0],e=c[1],f=k((0,i.useState)(null),2),h=f[0],j=f[1],l=hh(lh(lh({},b),{},{onDragStart:qh})),l.callbacks=b,l.state.dragPos=d,l.state.setDragPos=e,l.state.dragOffset=h,l.state.setDragOffset=j,(0,i.useEffect)(function(){return(function(a){var b=a.context.eventManager;if(b&&a.state.dragPos){var c={panmove:function(b){return(function(a,b){var c=b.props,d=b.callbacks,e=b.state,f=b.context;a.stopPropagation();var g=oh(a);e.setDragPos(g);var h=e.dragOffset;if(d.onDrag&&h){var i=Object.assign({},a);i.lngLat=ph(g,h,c,f),d.onDrag(i)}})(b,a)},panend:function(b){return(function(a,b){var c=b.props,d=b.callbacks,e=b.state,f=b.context;a.stopPropagation();var g=e.dragPos,h=e.dragOffset;if(e.setDragPos(null),e.setDragOffset(null),d.onDragEnd&&g&&h){var i=Object.assign({},a);i.lngLat=ph(g,h,c,f),d.onDragEnd(i)}})(b,a)},pancancel:function(b){var c,d;return c=b,d=a.state,void(c.stopPropagation(),d.setDragPos(null),d.setDragOffset(null))}};return b.watch(c),function(){b.off(c)}}})(l)},[l.context.eventManager,Boolean(d)]),l),n=m.state,o=m.containerRef,p=a.children,q=a.className,r=a.draggable,s=a.style,t=n.dragPos,u=function(a){var b=a.props,c=a.state,d=a.context,e=b.longitude,f=b.latitude,g=b.offsetLeft,h=b.offsetTop,i=c.dragPos,j=c.dragOffset,l=d.viewport,m=d.map;if(i&&j)return[i[0]+j[0],i[1]+j[1]];var n=Yc(m,{longitude:e,latitude:f}),o=k(l.project([e,f,n]),2),p=o[0],q=o[1];return[p+=g,q+=h]}(m),v=k(u,2),w=v[0],x=v[1],y="translate(".concat(sh(w),"px, ").concat(sh(x),"px)"),z=r?t?"grabbing":"grab":"auto",A=(0,i.useMemo)(function(){var a=function(a){for(var b=1;b0){var q=m,r=p;for(m=0;m<=1;m+=.5)o=(n=c-m*g)+g,p=Math.max(0,j-n)+Math.max(0,o-e+j),p0){var w=l,x=v;for(l=0;l<=1;l+=s)u=(t=b-l*f)+f,v=Math.max(0,j-t)+Math.max(0,u-d+j),v1||I< -1||G<0||G>B.width||H<0||H>B.height?P.display="none":P.zIndex=Math.floor((1-I)/2*1e5)),P),T=(0,i.useCallback)(function(a){c.props.onClose();var b=c.context.eventManager;b&&b.once("click",function(a){return a.stopPropagation()},a.target)},[]);return i.createElement("div",{className:"mapboxgl-popup mapboxgl-popup-anchor-".concat(R," ").concat(j),style:S,ref:e},i.createElement("div",{key:"tip",className:"mapboxgl-popup-tip",style:{borderWidth:n}}),i.createElement("div",{key:"content",ref:b,className:"mapboxgl-popup-content"},o&&i.createElement("button",{key:"close-button",className:"mapboxgl-popup-close-button",type:"button",onClick:T},"\xd7"),p))}function Dh(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}Ch.propTypes=Ah,Ch.defaultProps=Bh,i.memo(Ch);var Eh=Object.assign({},gh,{toggleLabel:j.string,className:j.string,style:j.object,compact:j.bool,customAttribution:j.oneOfType([j.string,j.arrayOf(j.string)])}),Fh=Object.assign({},fh,{className:"",toggleLabel:"Toggle Attribution"});function Gh(a){var b=hh(a),c=b.context,d=b.containerRef,e=(0,i.useRef)(null),f=k((0,i.useState)(!1),2),h=f[0],j=f[1];(0,i.useEffect)(function(){var b,f,g,h,i,j;return c.map&&(b=(f={customAttribution:a.customAttribution},g=c.map,h=d.current,i=e.current,(j=new(Gc()).AttributionControl(f))._map=g,j._container=h,j._innerContainer=i,j._updateAttributions(),j._updateEditLink(),g.on("styledata",j._updateData),g.on("sourcedata",j._updateData),j)),function(){var a;return b&&void((a=b)._map.off("styledata",a._updateData),a._map.off("sourcedata",a._updateData))}},[c.map]);var l=void 0===a.compact?c.viewport.width<=640:a.compact;(0,i.useEffect)(function(){!l&&h&&j(!1)},[l]);var m=(0,i.useCallback)(function(){return j(function(a){return!a})},[]),n=(0,i.useMemo)(function(){return(function(a){for(var b=1;bg)return 1}return 0})(b.map.version,"1.6.0")>=0?2:1:2},[b.map]),d=b.viewport.bearing,e={transform:"rotate(".concat(-d,"deg)")},2===c?i.createElement("span",{className:"mapboxgl-ctrl-icon","aria-hidden":"true",style:e}):i.createElement("span",{className:"mapboxgl-ctrl-compass-arrow",style:e})))))}function Xh(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}Wh.propTypes=Sh,Wh.defaultProps=Th,i.memo(Wh);var Yh=Object.assign({},gh,{className:j.string,style:j.object,maxWidth:j.number,unit:j.oneOf(["imperial","metric","nautical"])}),Zh=Object.assign({},fh,{className:"",maxWidth:100,unit:"metric"});function $h(a){var b=hh(a),c=b.context,d=b.containerRef,e=k((0,i.useState)(null),2),f=e[0],h=e[1];(0,i.useEffect)(function(){if(c.map){var a=new(Gc()).ScaleControl();a._map=c.map,a._container=d.current,h(a)}},[c.map]),f&&(f.options=a,f._onMove());var j=(0,i.useMemo)(function(){return(function(a){for(var b=1;b