Submit
Path:
~
/
/
usr
/
share
/
grafana
/
public
/
build
/
File Content:
9320.c403e78b78aa6df1d0bd.js
(self.webpackChunkgrafana=self.webpackChunkgrafana||[]).push([[9320],{4417:Bt=>{"use strict";Bt.exports=function(Re,C){return C||(C={}),Re&&(Re=String(Re.__esModule?Re.default:Re),/^['"].*['"]$/.test(Re)&&(Re=Re.slice(1,-1)),C.hash&&(Re+=C.hash),/["'() \t\n]|(%20)/.test(Re)||C.needQuotes?'"'.concat(Re.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):Re)}},66570:Bt=>{"use strict";Bt.exports=Re,Bt.exports.default=Re;function Re(x,S,E){E=E||2;var F=S&&S.length,M=F?S[0]*E:x.length,O=C(x,0,M,E,!0),k=[];if(!O||O.next===O.prev)return k;var W,oe,ne,Me,Ae,ve,We;if(F&&(O=hi(x,S,O,E)),x.length>80*E){W=ne=x[0],oe=Me=x[1];for(var be=E;be<M;be+=E)Ae=x[be],ve=x[be+1],Ae<W&&(W=Ae),ve<oe&&(oe=ve),Ae>ne&&(ne=Ae),ve>Me&&(Me=ve);We=Math.max(ne-W,Me-oe),We=We!==0?32767/We:0}return se(O,k,E,W,oe,We,0),k}function C(x,S,E,F,M){var O,k;if(M===gt(x,S,E,F)>0)for(O=S;O<E;O+=F)k=Fe(O,x[O],x[O+1],k);else for(O=E-F;O>=S;O-=F)k=Fe(O,x[O],x[O+1],k);return k&&T(k,k.next)&&(je(k),k=k.next),k}function _(x,S){if(!x)return x;S||(S=x);var E=x,F;do if(F=!1,!E.steiner&&(T(E,E.next)||G(E.prev,E,E.next)===0)){if(je(E),E=S=E.prev,E===E.next)break;F=!0}else E=E.next;while(F||E!==S);return S}function se(x,S,E,F,M,O,k){if(x){!k&&O&&ue(x,F,M,O);for(var W=x,oe,ne;x.prev!==x.next;){if(oe=x.prev,ne=x.next,O?it(x,F,M,O):tt(x)){S.push(oe.i/E|0),S.push(x.i/E|0),S.push(ne.i/E|0),je(x),x=ne.next,W=ne.next;continue}if(x=ne,x===W){k?k===1?(x=ie(_(x),S,E),se(x,S,E,F,M,O,2)):k===2&&nt(x,S,E,F,M,O):se(_(x),S,E,F,M,O,1);break}}}}function tt(x){var S=x.prev,E=x,F=x.next;if(G(S,E,F)>=0)return!1;for(var M=S.x,O=E.x,k=F.x,W=S.y,oe=E.y,ne=F.y,Me=M<O?M<k?M:k:O<k?O:k,Ae=W<oe?W<ne?W:ne:oe<ne?oe:ne,ve=M>O?M>k?M:k:O>k?O:k,We=W>oe?W>ne?W:ne:oe>ne?oe:ne,be=F.next;be!==S;){if(be.x>=Me&&be.x<=ve&&be.y>=Ae&&be.y<=We&&A(M,W,O,oe,k,ne,be.x,be.y)&&G(be.prev,be,be.next)>=0)return!1;be=be.next}return!0}function it(x,S,E,F){var M=x.prev,O=x,k=x.next;if(G(M,O,k)>=0)return!1;for(var W=M.x,oe=O.x,ne=k.x,Me=M.y,Ae=O.y,ve=k.y,We=W<oe?W<ne?W:ne:oe<ne?oe:ne,be=Me<Ae?Me<ve?Me:ve:Ae<ve?Ae:ve,ui=W>oe?W>ne?W:ne:oe>ne?oe:ne,di=Me>Ae?Me>ve?Me:ve:Ae>ve?Ae:ve,_n=lt(We,be,S,E,F),xn=lt(ui,di,S,E,F),de=x.prevZ,Ee=x.nextZ;de&&de.z>=_n&&Ee&&Ee.z<=xn;){if(de.x>=We&&de.x<=ui&&de.y>=be&&de.y<=di&&de!==M&&de!==k&&A(W,Me,oe,Ae,ne,ve,de.x,de.y)&&G(de.prev,de,de.next)>=0||(de=de.prevZ,Ee.x>=We&&Ee.x<=ui&&Ee.y>=be&&Ee.y<=di&&Ee!==M&&Ee!==k&&A(W,Me,oe,Ae,ne,ve,Ee.x,Ee.y)&&G(Ee.prev,Ee,Ee.next)>=0))return!1;Ee=Ee.nextZ}for(;de&&de.z>=_n;){if(de.x>=We&&de.x<=ui&&de.y>=be&&de.y<=di&&de!==M&&de!==k&&A(W,Me,oe,Ae,ne,ve,de.x,de.y)&&G(de.prev,de,de.next)>=0)return!1;de=de.prevZ}for(;Ee&&Ee.z<=xn;){if(Ee.x>=We&&Ee.x<=ui&&Ee.y>=be&&Ee.y<=di&&Ee!==M&&Ee!==k&&A(W,Me,oe,Ae,ne,ve,Ee.x,Ee.y)&&G(Ee.prev,Ee,Ee.next)>=0)return!1;Ee=Ee.nextZ}return!0}function ie(x,S,E){var F=x;do{var M=F.prev,O=F.next.next;!T(M,O)&&j(M,F,F.next,O)&&ce(M,O)&&ce(O,M)&&(S.push(M.i/E|0),S.push(F.i/E|0),S.push(O.i/E|0),je(F),je(F.next),F=x=O),F=F.next}while(F!==x);return _(F)}function nt(x,S,E,F,M,O){var k=x;do{for(var W=k.next.next;W!==k.prev;){if(k.i!==W.i&&z(k,W)){var oe=_e(k,W);k=_(k,k.next),oe=_(oe,oe.next),se(k,S,E,F,M,O,0),se(oe,S,E,F,M,O,0);return}W=W.next}k=k.next}while(k!==x)}function hi(x,S,E,F){var M=[],O,k,W,oe,ne;for(O=0,k=S.length;O<k;O++)W=S[O]*F,oe=O<k-1?S[O+1]*F:x.length,ne=C(x,W,oe,F,!1),ne===ne.next&&(ne.steiner=!0),M.push(I(ne));for(M.sort(ci),O=0;O<M.length;O++)E=De(M[O],E);return E}function ci(x,S){return x.x-S.x}function De(x,S){var E=Be(x,S);if(!E)return S;var F=_e(E,x);return _(F,F.next),_(E,E.next)}function Be(x,S){var E=S,F=x.x,M=x.y,O=-1/0,k;do{if(M<=E.y&&M>=E.next.y&&E.next.y!==E.y){var W=E.x+(M-E.y)*(E.next.x-E.x)/(E.next.y-E.y);if(W<=F&&W>O&&(O=W,k=E.x<E.next.x?E:E.next,W===F))return k}E=E.next}while(E!==S);if(!k)return null;var oe=k,ne=k.x,Me=k.y,Ae=1/0,ve;E=k;do F>=E.x&&E.x>=ne&&F!==E.x&&A(M<Me?F:O,M,ne,Me,M<Me?O:F,M,E.x,E.y)&&(ve=Math.abs(M-E.y)/(F-E.x),ce(E,x)&&(ve<Ae||ve===Ae&&(E.x>k.x||E.x===k.x&&X(k,E)))&&(k=E,Ae=ve)),E=E.next;while(E!==oe);return k}function X(x,S){return G(x.prev,x,S.prev)<0&&G(S.next,x,x.next)<0}function ue(x,S,E,F){var M=x;do M.z===0&&(M.z=lt(M.x,M.y,S,E,F)),M.prevZ=M.prev,M.nextZ=M.next,M=M.next;while(M!==x);M.prevZ.nextZ=null,M.prevZ=null,Pe(M)}function Pe(x){var S,E,F,M,O,k,W,oe,ne=1;do{for(E=x,x=null,O=null,k=0;E;){for(k++,F=E,W=0,S=0;S<ne&&(W++,F=F.nextZ,!!F);S++);for(oe=ne;W>0||oe>0&&F;)W!==0&&(oe===0||!F||E.z<=F.z)?(M=E,E=E.nextZ,W--):(M=F,F=F.nextZ,oe--),O?O.nextZ=M:x=M,M.prevZ=O,O=M;E=F}O.nextZ=null,ne*=2}while(k>1);return x}function lt(x,S,E,F,M){return x=(x-E)*M|0,S=(S-F)*M|0,x=(x|x<<8)&16711935,x=(x|x<<4)&252645135,x=(x|x<<2)&858993459,x=(x|x<<1)&1431655765,S=(S|S<<8)&16711935,S=(S|S<<4)&252645135,S=(S|S<<2)&858993459,S=(S|S<<1)&1431655765,x|S<<1}function I(x){var S=x,E=x;do(S.x<E.x||S.x===E.x&&S.y<E.y)&&(E=S),S=S.next;while(S!==x);return E}function A(x,S,E,F,M,O,k,W){return(M-k)*(S-W)>=(x-k)*(O-W)&&(x-k)*(F-W)>=(E-k)*(S-W)&&(E-k)*(O-W)>=(M-k)*(F-W)}function z(x,S){return x.next.i!==S.i&&x.prev.i!==S.i&&!ge(x,S)&&(ce(x,S)&&ce(S,x)&&ye(x,S)&&(G(x.prev,x,S.prev)||G(x,S.prev,S))||T(x,S)&&G(x.prev,x,x.next)>0&&G(S.prev,S,S.next)>0)}function G(x,S,E){return(S.y-x.y)*(E.x-S.x)-(S.x-x.x)*(E.y-S.y)}function T(x,S){return x.x===S.x&&x.y===S.y}function j(x,S,E,F){var M=ee(G(x,S,E)),O=ee(G(x,S,F)),k=ee(G(E,F,x)),W=ee(G(E,F,S));return!!(M!==O&&k!==W||M===0&&K(x,E,S)||O===0&&K(x,F,S)||k===0&&K(E,x,F)||W===0&&K(E,S,F))}function K(x,S,E){return S.x<=Math.max(x.x,E.x)&&S.x>=Math.min(x.x,E.x)&&S.y<=Math.max(x.y,E.y)&&S.y>=Math.min(x.y,E.y)}function ee(x){return x>0?1:x<0?-1:0}function ge(x,S){var E=x;do{if(E.i!==x.i&&E.next.i!==x.i&&E.i!==S.i&&E.next.i!==S.i&&j(E,E.next,x,S))return!0;E=E.next}while(E!==x);return!1}function ce(x,S){return G(x.prev,x,x.next)<0?G(x,S,x.next)>=0&&G(x,x.prev,S)>=0:G(x,S,x.prev)<0||G(x,x.next,S)<0}function ye(x,S){var E=x,F=!1,M=(x.x+S.x)/2,O=(x.y+S.y)/2;do E.y>O!=E.next.y>O&&E.next.y!==E.y&&M<(E.next.x-E.x)*(O-E.y)/(E.next.y-E.y)+E.x&&(F=!F),E=E.next;while(E!==x);return F}function _e(x,S){var E=new He(x.i,x.x,x.y),F=new He(S.i,S.x,S.y),M=x.next,O=S.prev;return x.next=S,S.prev=x,E.next=M,M.prev=E,F.next=E,E.prev=F,O.next=F,F.prev=O,F}function Fe(x,S,E,F){var M=new He(x,S,E);return F?(M.next=F.next,M.prev=F,F.next.prev=M,F.next=M):(M.prev=M,M.next=M),M}function je(x){x.next.prev=x.prev,x.prev.next=x.next,x.prevZ&&(x.prevZ.nextZ=x.nextZ),x.nextZ&&(x.nextZ.prevZ=x.prevZ)}function He(x,S,E){this.i=x,this.x=S,this.y=E,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}Re.deviation=function(x,S,E,F){var M=S&&S.length,O=M?S[0]*E:x.length,k=Math.abs(gt(x,0,O,E));if(M)for(var W=0,oe=S.length;W<oe;W++){var ne=S[W]*E,Me=W<oe-1?S[W+1]*E:x.length;k-=Math.abs(gt(x,ne,Me,E))}var Ae=0;for(W=0;W<F.length;W+=3){var ve=F[W]*E,We=F[W+1]*E,be=F[W+2]*E;Ae+=Math.abs((x[ve]-x[be])*(x[We+1]-x[ve+1])-(x[ve]-x[We])*(x[be+1]-x[ve+1]))}return k===0&&Ae===0?0:Math.abs((Ae-k)/k)};function gt(x,S,E,F){for(var M=0,O=S,k=E-F;O<E;O+=F)M+=(x[k]-x[O])*(x[O+1]+x[k+1]),k=O;return M}Re.flatten=function(x){for(var S=x[0][0].length,E={vertices:[],holes:[],dimensions:S},F=0,M=0;M<x.length;M++){for(var O=0;O<x[M].length;O++)for(var k=0;k<S;k++)E.vertices.push(x[M][O][k]);M>0&&(F+=x[M-1].length,E.holes.push(F))}return E}},96589:(Bt,Re,C)=>{"use strict";C.d(Re,{w:()=>ie});var _=C(32196),se=C(96540),tt=C(40845);const it=10,ie=({colorPalette:De,min:Be,max:X,display:ue,hoverValue:Pe,useStopsPercentage:lt})=>{const[I,A]=(0,se.useState)([]),[z,G]=(0,se.useState)({isShown:!1,value:0}),[T,j]=(0,se.useState)(null),K=(0,tt.$j)(),ee=ci(K,I);(0,se.useEffect)(()=>{A(nt({colorArray:De,stops:it,useStopsPercentage:lt}))},[De,lt]);const ge=ye=>{const _e=ye.nativeEvent.offsetX,Fe=ye.currentTarget.offsetWidth,je=Math.floor(_e*100/Fe+1),He=Math.floor((X-Be)*je/100+Be);G({isShown:!0,value:He}),j(je)},ce=()=>{G({isShown:!1,value:0})};return(0,se.useEffect)(()=>{j(Pe==null?null:hi((Pe-Be)/(X-Be)))},[Pe,Be,X]),se.createElement("div",{className:ee.scaleWrapper,onMouseMove:ge,onMouseLeave:ce},se.createElement("div",{className:ee.scaleGradient},ue&&(z.isShown||Pe!==void 0)&&se.createElement("div",{className:ee.followerContainer},se.createElement("div",{className:ee.follower,style:{left:`${T}%`}}))),ue&&se.createElement("div",{className:ee.followerContainer},se.createElement("div",{className:ee.legendValues},se.createElement("span",{className:ee.disabled},ue(Be)),se.createElement("span",{className:ee.disabled},ue(X))),T!=null&&(z.isShown||Pe!==void 0)&&se.createElement("span",{className:ee.hoverValue,style:{left:`${T}%`}},ue(Pe??z.value))))},nt=({colorArray:De,stops:Be,useStopsPercentage:X=!0})=>{const ue=De.length;if(X&&ue<=20){const A=1/ue*100;let z=0;const G=[];for(const T of De)z>0?G.push(`${T} ${z}%`):G.push(T),z+=A,G.push(`${T} ${z}%`);return G}const Pe=De[ue-1],lt=Math.ceil(ue/Be),I=new Set;for(let A=0;A<ue;A+=lt)I.add(De[A]);return I.add(Pe),[...I]};function hi(De){return De>1?100:De<0?0:De*100}const ci=(De,Be)=>({scaleWrapper:(0,_.css)({width:"100%",fontSize:"11px",opacity:1}),scaleGradient:(0,_.css)({background:`linear-gradient(90deg, ${Be.join()})`,height:"9px",pointerEvents:"none",borderRadius:De.shape.radius.default}),legendValues:(0,_.css)({display:"flex",justifyContent:"space-between",pointerEvents:"none"}),hoverValue:(0,_.css)({position:"absolute",marginTop:"-14px",padding:"3px 15px",transform:"translateX(-50%)"}),followerContainer:(0,_.css)({position:"relative",pointerEvents:"none",whiteSpace:"nowrap"}),follower:(0,_.css)({position:"absolute",height:"13px",width:"13px",borderRadius:De.shape.radius.default,transform:"translateX(-50%) translateY(-50%)",border:`2px solid ${De.colors.text.primary}`,top:"5px"}),disabled:(0,_.css)({color:De.colors.text.disabled})})},58313:(Bt,Re,C)=>{"use strict";C.d(Re,{r:()=>tt});var _=C(96540),se=C(51986);const tt=({onChange:it,options:ie,label:nt})=>_.createElement(se.i,{icon:"plus",label:nt,variant:"secondary",options:ie,onChange:it,isFullWidth:!0})},63928:(Bt,Re,C)=>{"use strict";C.r(Re),C.d(Re,{plugin:()=>_u});var _=C(96540),se=C(65158),tt=C(32264),it=C(11404),ie=C(32196),nt=C(94659),hi=C(91765),ci=C(57456),De=C(10972),Be=C(25176),X=C(22796),ue=C(90588);const Pe="units",lt=[1,2,5],I=25.4/.28;class A extends De.A{constructor(e){e=e||{};const t=document.createElement("div");t.style.pointerEvents="none",super({element:t,render:e.render,target:e.target}),this.on,this.once,this.un;const i=e.className!==void 0?e.className:e.bar?"ol-scale-bar":"ol-scale-line";this.innerElement_=document.createElement("div"),this.innerElement_.className=i+"-inner",this.element.className=i+" "+Be.XI,this.element.appendChild(this.innerElement_),this.viewState_=null,this.minWidth_=e.minWidth!==void 0?e.minWidth:64,this.maxWidth_=e.maxWidth,this.renderedVisible_=!1,this.renderedWidth_=void 0,this.renderedHTML_="",this.addChangeListener(Pe,this.handleUnitsChanged_),this.setUnits(e.units||"metric"),this.scaleBar_=e.bar||!1,this.scaleBarSteps_=e.steps||4,this.scaleBarText_=e.text||!1,this.dpi_=e.dpi||void 0}getUnits(){return this.get(Pe)}handleUnitsChanged_(){this.updateElement_()}setUnits(e){this.set(Pe,e)}setDpi(e){this.dpi_=e}updateElement_(){const e=this.viewState_;if(!e){this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1);return}const t=e.center,i=e.projection,n=this.getUnits(),s=n=="degrees"?"degrees":"m";let o=(0,X.hO)(i,e.resolution,t,s);const a=this.minWidth_*(this.dpi_||I)/I,l=this.maxWidth_!==void 0?this.maxWidth_*(this.dpi_||I)/I:void 0;let h=a*o,c="";if(n=="degrees"){const w=X.Ig.degrees;h*=w,h<w/60?(c="\u2033",o*=3600):h<w?(c="\u2032",o*=60):c="\xB0"}else n=="imperial"?h<.9144?(c="in",o/=.0254):h<1609.344?(c="ft",o/=.3048):(c="mi",o/=1609.344):n=="nautical"?(o/=1852,c="NM"):n=="metric"?h<.001?(c="\u03BCm",o*=1e6):h<1?(c="mm",o*=1e3):h<1e3?c="m":(c="km",o/=1e3):n=="us"?h<.9144?(c="in",o*=39.37):h<1609.344?(c="ft",o/=.30480061):(c="mi",o/=1609.3472):(0,ue.v)(!1,33);let d=3*Math.floor(Math.log(a*o)/Math.log(10)),u,f,g,m,p,v;for(;;){g=Math.floor(d/3);const w=Math.pow(10,g);if(u=lt[(d%3+3)%3]*w,f=Math.round(u/o),isNaN(f)){this.element.style.display="none",this.renderedVisible_=!1;return}if(l!==void 0&&f>=l){u=m,f=p,g=v;break}else if(f>=a)break;m=u,p=f,v=g,++d}const y=this.scaleBar_?this.createScaleBar(f,u,c):u.toFixed(g<0?-g:0)+" "+c;this.renderedHTML_!=y&&(this.innerElement_.innerHTML=y,this.renderedHTML_=y),this.renderedWidth_!=f&&(this.innerElement_.style.width=f+"px",this.renderedWidth_=f),this.renderedVisible_||(this.element.style.display="",this.renderedVisible_=!0)}createScaleBar(e,t,i){const n=this.getScaleForResolution(),s=n<1?Math.round(1/n).toLocaleString()+" : 1":"1 : "+Math.round(n).toLocaleString(),o=this.scaleBarSteps_,a=e/o,l=[this.createMarker("absolute")];for(let c=0;c<o;++c){const d=c%2===0?"ol-scale-singlebar-odd":"ol-scale-singlebar-even";l.push(`<div><div class="ol-scale-singlebar ${d}" style="width: ${a}px;"></div>`+this.createMarker("relative")+(c%2===0||o===2?this.createStepText(c,e,!1,t,i):"")+"</div>")}return l.push(this.createStepText(o,e,!0,t,i)),(this.scaleBarText_?`<div class="ol-scale-text" style="width: ${e}px;">`+s+"</div>":"")+l.join("")}createMarker(e){return`<div class="ol-scale-step-marker" style="position: ${e}; top: ${e==="absolute"?3:-10}px;"></div>`}createStepText(e,t,i,n,s){const a=(e===0?0:Math.round(n/this.scaleBarSteps_*e*100)/100)+(e===0?"":" "+s),l=e===0?-3:t/this.scaleBarSteps_*-1,h=e===0?0:t/this.scaleBarSteps_*2;return`<div class="ol-scale-step-text" style="margin-left: ${l}px;text-align: ${e===0?"left":"center"};min-width: ${h}px;left: ${i?t+"px":"unset"};">`+a+"</div>"}getScaleForResolution(){const e=(0,X.hO)(this.viewState_.projection,this.viewState_.resolution,this.viewState_.center,"m"),t=this.dpi_||I,i=1e3/25.4;return e*i*t}render(e){const t=e.frameState;t?this.viewState_=t.viewState:this.viewState_=null,this.updateElement_()}}const z=A;var G=C(69186),T=C(70915),j=C(88751),K=C(64423),ee=C(69129),ge=C(79041),ce=C(28444),ye=C(40845);const _e=({topRight1:r,topRight2:e,bottomLeft:t,blStyle:i})=>{const n=(r&&r.length>0)??!1,s=(0,ye.of)(Fe(n));return _.createElement("div",{className:s.overlay},!!r?.length&&_.createElement("div",{className:s.TR1},r),!!e?.length&&_.createElement("div",{className:s.TR2},e),!!t?.length&&_.createElement("div",{className:s.BL,style:i},t))},Fe=r=>e=>({overlay:(0,ie.css)({position:"absolute",width:"100%",height:"100%",zIndex:500,pointerEvents:"none"}),TR1:(0,ie.css)({right:"0.5em",pointerEvents:"auto",position:"absolute",top:"0.5em"}),TR2:(0,ie.css)({position:"absolute",top:r?"80px":"8px",right:"8px",pointerEvents:"auto"}),BL:(0,ie.css)({position:"absolute",bottom:"8px",left:"8px",pointerEvents:"auto"})});var je=C(80279),He=C(82148),gt=C(17464),x=C(69503),S=C(25469),E=C(2543),F=C(11261),M=C(28240),O=C(40980),k=C(82762),W=C(61994),oe=C(33948),ne=C(1819);const Me=({feature:r})=>{let e,t=0;if(!r)return null;if(e=r.get("frame"),e)t=r.get("rowIndex");else{const{geometry:i,...n}=r.getProperties();e=new oe.f([n])}return _.createElement(ne.e,{data:e,rowIndex:t})},Ae=({layers:r,activeTabIndex:e})=>{const t=(0,ye.of)(We),[i,n]=(0,_.useState)(new Map),s=(o,a)=>{n(new Map(i.set(o,a)))};return _.createElement(O.J,null,r.map((o,a)=>a===e&&_.createElement("div",{key:o.layer.getName()},_.createElement("div",null,o.features.map((l,h)=>{const c=l.getId()??h;return o.features.length>1?_.createElement(k.S,{key:c,collapsible:!0,label:ve(l,h),isOpen:i.get(c),onToggle:()=>{s(c,!i.get(c))},className:t.collapsibleRow},_.createElement(Me,{feature:l})):_.createElement(Me,{key:c,feature:l})})))))},ve=(r,e)=>{const t=["Name","name","Title","ID","id"];let i=r.getProperties(),n="";const s=r.get("frame");if(s){const o=r.get("rowIndex");for(const a of s.fields)if(a.type===F.PU.string){const l=(0,M.Ct)(a,s);n||(n=l),i[l]=a.values[o]}}for(let o of t){const a=i[o];if(a)return a}if(n)return _.createElement("span",null,n,": ",(0,W.A)(i[n]));for(let o of Object.keys(i)){const a=i[o];if((0,E.isString)(a))return _.createElement("span",null,o,": ",(0,W.A)(a))}return`Match: ${e+1}`},We=r=>({collapsibleRow:(0,ie.css)` margin-bottom: 0; `});var be=C(63021),ui=C(40675);const di=({layers:r,setActiveTabIndex:e,activeTabIndex:t})=>_.createElement(be.U,null,r&&r.map((i,n)=>_.createElement(ui.o,{key:n,label:i.layer.getName(),active:n===t,counter:i.features.length>1?i.features.length:null,onChangeTab:()=>{e(n)}}))),_n=({layers:r,onClose:e,isOpen:t})=>{const[i,n]=(0,_.useState)(0);return r?_.createElement(_.Fragment,null,t&&_.createElement(S.J,{style:{zIndex:1},onClick:e}),_.createElement(di,{layers:r,setActiveTabIndex:n,activeTabIndex:i}),_.createElement(Ae,{layers:r,activeTabIndex:i})):null},xn=({ttip:r,onClose:e,isOpen:t})=>{const i=(0,_.createRef)(),{overlayProps:n}=(0,He.e)({onClose:e,isDismissable:!0,isOpen:t},i),{dialogProps:s}=(0,je.s)({},i);return _.createElement(_.Fragment,null,r&&r.layers&&_.createElement(gt.ZL,null,_.createElement(x.o,{position:{x:r.pageX,y:r.pageY},offset:{x:10,y:10},allowPointerEvents:!0},_.createElement("section",{ref:i,...n,...s},_.createElement(_n,{layers:r.layers,isOpen:t,onClose:e})))))};var de=C(84140),Ee=C(13544),fi=C(2913);class ha extends _.PureComponent{constructor(e){super(e),this.style=ca(fi.$W.theme2),this.updateViewState=()=>{const t=this.props.map.getView();this.setState({zoom:t.getZoom(),center:(0,X.pd)(t.getCenter(),t.getProjection(),"EPSG:4326")})},this.state={zoom:0,center:[0,0]}}componentDidMount(){this.props.map.on("moveend",this.updateViewState),this.updateViewState()}render(){const{zoom:e,center:t}=this.state;return _.createElement("div",{className:this.style.infoWrap,"aria-label":Ee.Tp.components.DebugOverlay.wrapper},_.createElement("table",null,_.createElement("tbody",null,_.createElement("tr",null,_.createElement("th",null,"Zoom:"),_.createElement("td",null,e?.toFixed(1))),_.createElement("tr",null,_.createElement("th",null,"Center:\xA0"),_.createElement("td",null,t[0].toFixed(5),", ",t[1].toFixed(5))))))}}const ca=r=>({infoWrap:(0,ie.css)({color:r.colors.text.primary,background:(0,de.A)(r.components.panel.background).setAlpha(.7).toString(),borderRadius:r.shape.radius.default,padding:r.spacing(1)})});var wi=C(94354),yn=C(55852),Ti=C(88323),ss=C(29158),mt=C(83195);const Ke=[{value:"length",label:"Length",geometry:"LineString",units:[{label:"Metric (m/km)",value:"m",format:r=>(0,mt.j_)("lengthm")(r)},{label:"Feet (ft)",value:"ft",format:r=>(0,mt.j_)("lengthft")(r*3.28084)},{label:"Miles (mi)",value:"mi",format:r=>(0,mt.j_)("lengthmi")(r/1609)},{label:"Nautical miles (nmi)",value:"nmi",format:r=>(0,mt.j_)("nmi")(r/1852)}],getUnit:r=>{const e=Ke[0].units;return r?.endsWith("2")&&(r=r.substring(0,r.length-1)),e.find(t=>t.value===r)??e[0]}},{value:"area",label:"Area",geometry:"Polygon",units:[{label:"Square Meters (m\xB2)",value:"m2",format:r=>(0,mt.j_)("areaM2")(r)},{label:"Square Kilometers (km\xB2)",value:"km2",format:r=>(0,mt.G8)("km\xB2")(r*1e-6)},{label:"Square Feet (ft\xB2)",value:"ft2",format:r=>(0,mt.j_)("areaF2")(r*10.76391)},{label:"Square Miles (mi\xB2)",value:"mi2",format:r=>(0,mt.j_)("areaMI2")(r*3861e-10)},{label:"Acres",value:"acre2",format:r=>(0,mt.G8)("acre")(r*247105e-9)},{label:"Hectare",value:"hectare2",format:r=>(0,mt.G8)("ha")(r*1e-4)}],getUnit:r=>{const e=Ke[1].units;return r?.endsWith("2")||(r+="2"),e.find(t=>t.value===r)??e[0]}}];var Lt=C(71064),ze=C(11217),Tt=C(44294),rs=C(50071),vn=C(32135),En=C(1685),st=C(6837),Ue=C(86717),pt=C(73445),lr=C(21409),hr=C(35341),$=C(4087),Zi=C(43530);class ua{constructor(e){this.rbush_=new hr(e),this.items_={}}insert(e,t){const i={minX:e[0],minY:e[1],maxX:e[2],maxY:e[3],value:t};this.rbush_.insert(i),this.items_[(0,$.v6)(t)]=i}load(e,t){const i=new Array(t.length);for(let n=0,s=t.length;n<s;n++){const o=e[n],a=t[n],l={minX:o[0],minY:o[1],maxX:o[2],maxY:o[3],value:a};i[n]=l,this.items_[(0,$.v6)(a)]=l}this.rbush_.load(i)}remove(e){const t=(0,$.v6)(e),i=this.items_[t];return delete this.items_[t],this.rbush_.remove(i)!==null}update(e,t){const i=this.items_[(0,$.v6)(t)],n=[i.minX,i.minY,i.maxX,i.maxY];(0,T.aI)(n,e)||(this.remove(t),this.insert(e,t))}getAll(){return this.rbush_.all().map(function(t){return t.value})}getInExtent(e){const t={minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]};return this.rbush_.search(t).map(function(n){return n.value})}forEach(e){return this.forEach_(this.getAll(),e)}forEachInExtent(e,t){return this.forEach_(this.getInExtent(e),t)}forEach_(e,t){let i;for(let n=0,s=e.length;n<s;n++)if(i=t(e[n]),i)return i;return i}isEmpty(){return(0,Zi.p)(this.items_)}clear(){this.rbush_.clear(),this.items_={}}getExtent(e){const t=this.rbush_.toJSON();return(0,T.N)(t.minX,t.minY,t.maxX,t.maxY,e)}concat(e){this.rbush_.load(e.rbush_.all());for(const t in e.items_)this.items_[t]=e.items_[t]}}const os=ua,Xe={ADDFEATURE:"addfeature",CHANGEFEATURE:"changefeature",CLEAR:"clear",REMOVEFEATURE:"removefeature",FEATURESLOADSTART:"featuresloadstart",FEATURESLOADEND:"featuresloadend",FEATURESLOADERROR:"featuresloaderror"};var cr=C(60764);const Se={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4};var ht=C(6782);class as{constructor(e){this.opacity_=e.opacity,this.rotateWithView_=e.rotateWithView,this.rotation_=e.rotation,this.scale_=e.scale,this.scaleArray_=(0,ht.xq)(e.scale),this.displacement_=e.displacement,this.declutterMode_=e.declutterMode}clone(){const e=this.getScale();return new as({opacity:this.getOpacity(),scale:Array.isArray(e)?e.slice():e,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})}getOpacity(){return this.opacity_}getRotateWithView(){return this.rotateWithView_}getRotation(){return this.rotation_}getScale(){return this.scale_}getScaleArray(){return this.scaleArray_}getDisplacement(){return this.displacement_}getDeclutterMode(){return this.declutterMode_}getAnchor(){return(0,$.b0)()}getImage(e){return(0,$.b0)()}getHitDetectionImage(){return(0,$.b0)()}getPixelRatio(e){return 1}getImageState(){return(0,$.b0)()}getImageSize(){return(0,$.b0)()}getOrigin(){return(0,$.b0)()}getSize(){return(0,$.b0)()}setDisplacement(e){this.displacement_=e}setOpacity(e){this.opacity_=e}setRotateWithView(e){this.rotateWithView_=e}setRotation(e){this.rotation_=e}setScale(e){this.scale_=e,this.scaleArray_=(0,ht.xq)(e)}listenImageChange(e){(0,$.b0)()}load(){(0,$.b0)()}unlistenImageChange(e){(0,$.b0)()}}const ur=as;var _t=C(89352);function Mt(r){return Array.isArray(r)?(0,_t.dI)(r):r}var Ge=C(68711),V=C(38774);class ls extends ur{constructor(e){const t=e.rotateWithView!==void 0?e.rotateWithView:!1;super({opacity:1,rotateWithView:t,rotation:e.rotation!==void 0?e.rotation:0,scale:e.scale!==void 0?e.scale:1,displacement:e.displacement!==void 0?e.displacement:[0,0],declutterMode:e.declutterMode}),this.canvas_=void 0,this.hitDetectionCanvas_=null,this.fill_=e.fill!==void 0?e.fill:null,this.origin_=[0,0],this.points_=e.points,this.radius_=e.radius!==void 0?e.radius:e.radius1,this.radius2_=e.radius2,this.angle_=e.angle!==void 0?e.angle:0,this.stroke_=e.stroke!==void 0?e.stroke:null,this.size_=null,this.renderOptions_=null,this.render()}clone(){const e=this.getScale(),t=new ls({fill:this.getFill()?this.getFill().clone():void 0,points:this.getPoints(),radius:this.getRadius(),radius2:this.getRadius2(),angle:this.getAngle(),stroke:this.getStroke()?this.getStroke().clone():void 0,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(e)?e.slice():e,displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return t.setOpacity(this.getOpacity()),t}getAnchor(){const e=this.size_;if(!e)return null;const t=this.getDisplacement(),i=this.getScaleArray();return[e[0]/2-t[0]/i[0],e[1]/2+t[1]/i[1]]}getAngle(){return this.angle_}getFill(){return this.fill_}setFill(e){this.fill_=e,this.render()}getHitDetectionImage(){return this.hitDetectionCanvas_||this.createHitDetectionCanvas_(this.renderOptions_),this.hitDetectionCanvas_}getImage(e){let t=this.canvas_[e];if(!t){const i=this.renderOptions_,n=(0,Ge.Y)(i.size*e,i.size*e);this.draw_(i,n,e),t=n.canvas,this.canvas_[e]=t}return t}getPixelRatio(e){return e}getImageSize(){return this.size_}getImageState(){return Se.LOADED}getOrigin(){return this.origin_}getPoints(){return this.points_}getRadius(){return this.radius_}getRadius2(){return this.radius2_}getSize(){return this.size_}getStroke(){return this.stroke_}setStroke(e){this.stroke_=e,this.render()}listenImageChange(e){}load(){}unlistenImageChange(e){}calculateLineJoinSize_(e,t,i){if(t===0||this.points_===1/0||e!=="bevel"&&e!=="miter")return t;let n=this.radius_,s=this.radius2_===void 0?n:this.radius2_;if(n<s){const D=n;n=s,s=D}const o=this.radius2_===void 0?this.points_:this.points_*2,a=2*Math.PI/o,l=s*Math.sin(a),h=Math.sqrt(s*s-l*l),c=n-h,d=Math.sqrt(l*l+c*c),u=d/l;if(e==="miter"&&u<=i)return u*t;const f=t/2/u,g=t/2*(c/d),p=Math.sqrt((n+f)*(n+f)+g*g)-n;if(this.radius2_===void 0||e==="bevel")return p*2;const v=n*Math.sin(a),y=Math.sqrt(n*n-v*v),w=s-y,L=Math.sqrt(v*v+w*w)/v;if(L<=i){const D=L*t/2-s-n;return 2*Math.max(p,D)}return p*2}createRenderOptions(){let e=V._K,t=0,i=null,n=0,s,o=0;this.stroke_&&(s=this.stroke_.getColor(),s===null&&(s=V.NT),s=Mt(s),o=this.stroke_.getWidth(),o===void 0&&(o=V.aq),i=this.stroke_.getLineDash(),n=this.stroke_.getLineDashOffset(),e=this.stroke_.getLineJoin(),e===void 0&&(e=V._K),t=this.stroke_.getMiterLimit(),t===void 0&&(t=V.eL));const a=this.calculateLineJoinSize_(e,o,t),l=Math.max(this.radius_,this.radius2_||0),h=Math.ceil(2*l+a);return{strokeStyle:s,strokeWidth:o,size:h,lineDash:i,lineDashOffset:n,lineJoin:e,miterLimit:t}}render(){this.renderOptions_=this.createRenderOptions();const e=this.renderOptions_.size;this.canvas_={},this.size_=[e,e]}draw_(e,t,i){if(t.scale(i,i),t.translate(e.size/2,e.size/2),this.createPath_(t),this.fill_){let n=this.fill_.getColor();n===null&&(n=V.qY),t.fillStyle=Mt(n),t.fill()}this.stroke_&&(t.strokeStyle=e.strokeStyle,t.lineWidth=e.strokeWidth,e.lineDash&&(t.setLineDash(e.lineDash),t.lineDashOffset=e.lineDashOffset),t.lineJoin=e.lineJoin,t.miterLimit=e.miterLimit,t.stroke())}createHitDetectionCanvas_(e){if(this.fill_){let t=this.fill_.getColor(),i=0;if(typeof t=="string"&&(t=(0,_t._j)(t)),t===null?i=1:Array.isArray(t)&&(i=t.length===4?t[3]:1),i===0){const n=(0,Ge.Y)(e.size,e.size);this.hitDetectionCanvas_=n.canvas,this.drawHitDetectionCanvas_(e,n)}}this.hitDetectionCanvas_||(this.hitDetectionCanvas_=this.getImage(1))}createPath_(e){let t=this.points_;const i=this.radius_;if(t===1/0)e.arc(0,0,i,0,2*Math.PI);else{const n=this.radius2_===void 0?i:this.radius2_;this.radius2_!==void 0&&(t*=2);const s=this.angle_-Math.PI/2,o=2*Math.PI/t;for(let a=0;a<t;a++){const l=s+a*o,h=a%2===0?i:n;e.lineTo(h*Math.cos(l),h*Math.sin(l))}e.closePath()}}drawHitDetectionCanvas_(e,t){t.translate(e.size/2,e.size/2),this.createPath_(t),t.fillStyle=V.qY,t.fill(),this.stroke_&&(t.strokeStyle=e.strokeStyle,t.lineWidth=e.strokeWidth,e.lineDash&&(t.setLineDash(e.lineDash),t.lineDashOffset=e.lineDashOffset),t.lineJoin=e.lineJoin,t.miterLimit=e.miterLimit,t.stroke())}}const Ze=ls;class hs extends Ze{constructor(e){e=e||{radius:5},super({points:1/0,fill:e.fill,radius:e.radius,stroke:e.stroke,scale:e.scale!==void 0?e.scale:1,rotation:e.rotation!==void 0?e.rotation:0,rotateWithView:e.rotateWithView!==void 0?e.rotateWithView:!1,displacement:e.displacement!==void 0?e.displacement:[0,0],declutterMode:e.declutterMode})}clone(){const e=this.getScale(),t=new hs({fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,radius:this.getRadius(),scale:Array.isArray(e)?e.slice():e,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return t.setOpacity(this.getOpacity()),t}setRadius(e){this.radius_=e,this.render()}}const Ct=hs;class cs{constructor(e){e=e||{},this.color_=e.color!==void 0?e.color:null}clone(){const e=this.getColor();return new cs({color:Array.isArray(e)?e.slice():e||void 0})}getColor(){return this.color_}setColor(e){this.color_=e}}const Ie=cs;class us{constructor(e){e=e||{},this.color_=e.color!==void 0?e.color:null,this.lineCap_=e.lineCap,this.lineDash_=e.lineDash!==void 0?e.lineDash:null,this.lineDashOffset_=e.lineDashOffset,this.lineJoin_=e.lineJoin,this.miterLimit_=e.miterLimit,this.width_=e.width}clone(){const e=this.getColor();return new us({color:Array.isArray(e)?e.slice():e||void 0,lineCap:this.getLineCap(),lineDash:this.getLineDash()?this.getLineDash().slice():void 0,lineDashOffset:this.getLineDashOffset(),lineJoin:this.getLineJoin(),miterLimit:this.getMiterLimit(),width:this.getWidth()})}getColor(){return this.color_}getLineCap(){return this.lineCap_}getLineDash(){return this.lineDash_}getLineDashOffset(){return this.lineDashOffset_}getLineJoin(){return this.lineJoin_}getMiterLimit(){return this.miterLimit_}getWidth(){return this.width_}setColor(e){this.color_=e}setLineCap(e){this.lineCap_=e}setLineDash(e){this.lineDash_=e}setLineDashOffset(e){this.lineDashOffset_=e}setLineJoin(e){this.lineJoin_=e}setMiterLimit(e){this.miterLimit_=e}setWidth(e){this.width_=e}}const Te=us;class Zt{constructor(e){e=e||{},this.geometry_=null,this.geometryFunction_=fr,e.geometry!==void 0&&this.setGeometry(e.geometry),this.fill_=e.fill!==void 0?e.fill:null,this.image_=e.image!==void 0?e.image:null,this.renderer_=e.renderer!==void 0?e.renderer:null,this.hitDetectionRenderer_=e.hitDetectionRenderer!==void 0?e.hitDetectionRenderer:null,this.stroke_=e.stroke!==void 0?e.stroke:null,this.text_=e.text!==void 0?e.text:null,this.zIndex_=e.zIndex}clone(){let e=this.getGeometry();return e&&typeof e=="object"&&(e=e.clone()),new Zt({geometry:e,fill:this.getFill()?this.getFill().clone():void 0,image:this.getImage()?this.getImage().clone():void 0,renderer:this.getRenderer(),stroke:this.getStroke()?this.getStroke().clone():void 0,text:this.getText()?this.getText().clone():void 0,zIndex:this.getZIndex()})}getRenderer(){return this.renderer_}setRenderer(e){this.renderer_=e}setHitDetectionRenderer(e){this.hitDetectionRenderer_=e}getHitDetectionRenderer(){return this.hitDetectionRenderer_}getGeometry(){return this.geometry_}getGeometryFunction(){return this.geometryFunction_}getFill(){return this.fill_}setFill(e){this.fill_=e}getImage(){return this.image_}setImage(e){this.image_=e}getStroke(){return this.stroke_}setStroke(e){this.stroke_=e}getText(){return this.text_}setText(e){this.text_=e}getZIndex(){return this.zIndex_}setGeometry(e){typeof e=="function"?this.geometryFunction_=e:typeof e=="string"?this.geometryFunction_=function(t){return t.get(e)}:e?e!==void 0&&(this.geometryFunction_=function(){return e}):this.geometryFunction_=fr,this.geometry_=e}setZIndex(e){this.zIndex_=e}}function da(r){let e;if(typeof r=="function")e=r;else{let t;Array.isArray(r)?t=r:((0,ue.v)(typeof r.getZIndex=="function",41),t=[r]),e=function(){return t}}return e}let ds=null;function fa(r,e){if(!ds){const t=new Ie({color:"rgba(255,255,255,0.4)"}),i=new Te({color:"#3399CC",width:1.25});ds=[new Zt({image:new Ct({fill:t,stroke:i,radius:5}),fill:t,stroke:i})]}return ds}function dr(){const r={},e=[255,255,255,1],t=[0,153,255,1],i=3;return r.Polygon=[new Zt({fill:new Ie({color:[255,255,255,.5]})})],r.MultiPolygon=r.Polygon,r.LineString=[new Zt({stroke:new Te({color:e,width:i+2})}),new Zt({stroke:new Te({color:t,width:i})})],r.MultiLineString=r.LineString,r.Circle=r.Polygon.concat(r.LineString),r.Point=[new Zt({image:new Ct({radius:i*2,fill:new Ie({color:t}),stroke:new Te({color:e,width:i/2})}),zIndex:1/0})],r.MultiPoint=r.Point,r.GeometryCollection=r.Polygon.concat(r.LineString,r.Point),r}function fr(r){return r.getGeometry()}const fe=Zt;var fs=C(79332),gr=C(4622);class ga extends fs.A{constructor(e,t,i,n){super(),this.extent=e,this.pixelRatio_=i,this.resolution=t,this.state=n}changed(){this.dispatchEvent(st.A.CHANGE)}getExtent(){return this.extent}getImage(){return(0,$.b0)()}getPixelRatio(){return this.pixelRatio_}getResolution(){return this.resolution}getState(){return this.state}load(){(0,$.b0)()}}const ma=ga;var mr=C(7771),Je=C(9438);class Eu extends ma{constructor(e,t,i,n,s,o,a){super(e,t,i,Se.IDLE),this.src_=n,this.image_=new Image,s!==null&&(this.image_.crossOrigin=s),this.context_=a,this.unlisten_=null,this.state=Se.IDLE,this.imageLoadFunction_=o}getImage(){if(this.state==Se.LOADED&&this.context_&&!(this.image_ instanceof HTMLCanvasElement)){const e=this.context_.canvas;e.width=this.image_.width,e.height=this.image_.height,this.context_.drawImage(this.image_,0,0),this.image_=this.context_.canvas}return this.image_}handleImageError_(){this.state=Se.ERROR,this.unlistenImage_(),this.changed()}handleImageLoad_(){this.resolution===void 0&&(this.resolution=(0,T.Oq)(this.extent)/this.image_.height),this.state=Se.LOADED,this.unlistenImage_(),this.changed()}load(){(this.state==Se.IDLE||this.state==Se.ERROR)&&(this.state=Se.LOADING,this.changed(),this.imageLoadFunction_(this,this.src_),this.unlisten_=gs(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))}setImage(e){this.image_=e,this.resolution=(0,T.Oq)(this.extent)/this.image_.height}unlistenImage_(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)}}function gs(r,e,t){const i=r;let n=!0,s=!1,o=!1;const a=[(0,Je.Jz)(i,st.A.LOAD,function(){o=!0,s||e()})];return i.src&&mr.DT?(s=!0,i.decode().then(function(){n&&e()}).catch(function(l){n&&(o?e():t())})):a.push((0,Je.Jz)(i,st.A.ERROR,t)),function(){n=!1,a.forEach(Je.JH)}}const wu=null;let Hi=null;class pa extends fs.A{constructor(e,t,i,n,s,o){super(),this.hitDetectionImage_=null,this.image_=e,this.crossOrigin_=n,this.canvas_={},this.color_=o,this.unlisten_=null,this.imageState_=s,this.size_=i,this.src_=t,this.tainted_}initializeImage_(){this.image_=new Image,this.crossOrigin_!==null&&(this.image_.crossOrigin=this.crossOrigin_)}isTainted_(){if(this.tainted_===void 0&&this.imageState_===Se.LOADED){Hi||(Hi=(0,Ge.Y)(1,1,void 0,{willReadFrequently:!0})),Hi.drawImage(this.image_,0,0);try{Hi.getImageData(0,0,1,1),this.tainted_=!1}catch{Hi=null,this.tainted_=!0}}return this.tainted_===!0}dispatchChangeEvent_(){this.dispatchEvent(st.A.CHANGE)}handleImageError_(){this.imageState_=Se.ERROR,this.unlistenImage_(),this.dispatchChangeEvent_()}handleImageLoad_(){this.imageState_=Se.LOADED,this.size_?(this.image_.width=this.size_[0],this.image_.height=this.size_[1]):this.size_=[this.image_.width,this.image_.height],this.unlistenImage_(),this.dispatchChangeEvent_()}getImage(e){return this.image_||this.initializeImage_(),this.replaceColor_(e),this.canvas_[e]?this.canvas_[e]:this.image_}getPixelRatio(e){return this.replaceColor_(e),this.canvas_[e]?e:1}getImageState(){return this.imageState_}getHitDetectionImage(){if(this.image_||this.initializeImage_(),!this.hitDetectionImage_)if(this.isTainted_()){const e=this.size_[0],t=this.size_[1],i=(0,Ge.Y)(e,t);i.fillRect(0,0,e,t),this.hitDetectionImage_=i.canvas}else this.hitDetectionImage_=this.image_;return this.hitDetectionImage_}getSize(){return this.size_}getSrc(){return this.src_}load(){if(this.imageState_===Se.IDLE){this.image_||this.initializeImage_(),this.imageState_=Se.LOADING;try{this.image_.src=this.src_}catch{this.handleImageError_()}this.unlisten_=gs(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this))}}replaceColor_(e){if(!this.color_||this.canvas_[e]||this.imageState_!==Se.LOADED)return;const t=this.image_,i=document.createElement("canvas");i.width=Math.ceil(t.width*e),i.height=Math.ceil(t.height*e);const n=i.getContext("2d");n.scale(e,e),n.drawImage(t,0,0),n.globalCompositeOperation="multiply",n.fillStyle=(0,_t.oJ)(this.color_),n.fillRect(0,0,i.width/e,i.height/e),n.globalCompositeOperation="destination-in",n.drawImage(t,0,0),this.canvas_[e]=i}unlistenImage_(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)}}function _a(r,e,t,i,n,s){let o=gr.u.get(e,i,s);return o||(o=new pa(r,e,t,i,n,s),gr.u.set(e,i,s,o)),o}const Tu=null;function pr(r,e,t,i){return t!==void 0&&i!==void 0?[t/r,i/e]:t!==void 0?t/r:i!==void 0?i/e:1}class ms extends ur{constructor(e){e=e||{};const t=e.opacity!==void 0?e.opacity:1,i=e.rotation!==void 0?e.rotation:0,n=e.scale!==void 0?e.scale:1,s=e.rotateWithView!==void 0?e.rotateWithView:!1;super({opacity:t,rotation:i,scale:n,displacement:e.displacement!==void 0?e.displacement:[0,0],rotateWithView:s,declutterMode:e.declutterMode}),this.anchor_=e.anchor!==void 0?e.anchor:[.5,.5],this.normalizedAnchor_=null,this.anchorOrigin_=e.anchorOrigin!==void 0?e.anchorOrigin:"top-left",this.anchorXUnits_=e.anchorXUnits!==void 0?e.anchorXUnits:"fraction",this.anchorYUnits_=e.anchorYUnits!==void 0?e.anchorYUnits:"fraction",this.crossOrigin_=e.crossOrigin!==void 0?e.crossOrigin:null;const o=e.img!==void 0?e.img:null;this.imgSize_=e.imgSize;let a=e.src;(0,ue.v)(!(a!==void 0&&o),4),(0,ue.v)(!o||o&&this.imgSize_,5),(a===void 0||a.length===0)&&o&&(a=o.src||(0,$.v6)(o)),(0,ue.v)(a!==void 0&&a.length>0,6),(0,ue.v)(!((e.width!==void 0||e.height!==void 0)&&e.scale!==void 0),69);const l=e.src!==void 0?Se.IDLE:Se.LOADED;if(this.color_=e.color!==void 0?(0,_t._j)(e.color):null,this.iconImage_=_a(o,a,this.imgSize_!==void 0?this.imgSize_:null,this.crossOrigin_,l,this.color_),this.offset_=e.offset!==void 0?e.offset:[0,0],this.offsetOrigin_=e.offsetOrigin!==void 0?e.offsetOrigin:"top-left",this.origin_=null,this.size_=e.size!==void 0?e.size:null,e.width!==void 0||e.height!==void 0){let h,c;if(e.size)[h,c]=e.size;else{const d=this.getImage(1);if(d instanceof HTMLCanvasElement||d.src&&d.complete)h=d.width,c=d.height;else{this.initialOptions_=e;const u=()=>{if(this.unlistenImageChange(u),!this.initialOptions_)return;const f=this.iconImage_.getSize();this.setScale(pr(f[0],f[1],e.width,e.height))};this.listenImageChange(u);return}}h!==void 0&&this.setScale(pr(h,c,e.width,e.height))}}clone(){let e,t,i;return this.initialOptions_?(t=this.initialOptions_.width,i=this.initialOptions_.height):(e=this.getScale(),e=Array.isArray(e)?e.slice():e),new ms({anchor:this.anchor_.slice(),anchorOrigin:this.anchorOrigin_,anchorXUnits:this.anchorXUnits_,anchorYUnits:this.anchorYUnits_,color:this.color_&&this.color_.slice?this.color_.slice():this.color_||void 0,crossOrigin:this.crossOrigin_,imgSize:this.imgSize_,offset:this.offset_.slice(),offsetOrigin:this.offsetOrigin_,opacity:this.getOpacity(),rotateWithView:this.getRotateWithView(),rotation:this.getRotation(),scale:e,width:t,height:i,size:this.size_!==null?this.size_.slice():void 0,src:this.getSrc(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})}getAnchor(){let e=this.normalizedAnchor_;if(!e){e=this.anchor_;const n=this.getSize();if(this.anchorXUnits_=="fraction"||this.anchorYUnits_=="fraction"){if(!n)return null;e=this.anchor_.slice(),this.anchorXUnits_=="fraction"&&(e[0]*=n[0]),this.anchorYUnits_=="fraction"&&(e[1]*=n[1])}if(this.anchorOrigin_!="top-left"){if(!n)return null;e===this.anchor_&&(e=this.anchor_.slice()),(this.anchorOrigin_=="top-right"||this.anchorOrigin_=="bottom-right")&&(e[0]=-e[0]+n[0]),(this.anchorOrigin_=="bottom-left"||this.anchorOrigin_=="bottom-right")&&(e[1]=-e[1]+n[1])}this.normalizedAnchor_=e}const t=this.getDisplacement(),i=this.getScaleArray();return[e[0]-t[0]/i[0],e[1]+t[1]/i[1]]}setAnchor(e){this.anchor_=e,this.normalizedAnchor_=null}getColor(){return this.color_}getImage(e){return this.iconImage_.getImage(e)}getPixelRatio(e){return this.iconImage_.getPixelRatio(e)}getImageSize(){return this.iconImage_.getSize()}getImageState(){return this.iconImage_.getImageState()}getHitDetectionImage(){return this.iconImage_.getHitDetectionImage()}getOrigin(){if(this.origin_)return this.origin_;let e=this.offset_;if(this.offsetOrigin_!="top-left"){const t=this.getSize(),i=this.iconImage_.getSize();if(!t||!i)return null;e=e.slice(),(this.offsetOrigin_=="top-right"||this.offsetOrigin_=="bottom-right")&&(e[0]=i[0]-t[0]-e[0]),(this.offsetOrigin_=="bottom-left"||this.offsetOrigin_=="bottom-right")&&(e[1]=i[1]-t[1]-e[1])}return this.origin_=e,this.origin_}getSrc(){return this.iconImage_.getSrc()}getSize(){return this.size_?this.size_:this.iconImage_.getSize()}getWidth(){const e=this.getScaleArray();if(this.size_)return this.size_[0]*e[0];if(this.iconImage_.getImageState()==Se.LOADED)return this.iconImage_.getSize()[0]*e[0]}getHeight(){const e=this.getScaleArray();if(this.size_)return this.size_[1]*e[1];if(this.iconImage_.getImageState()==Se.LOADED)return this.iconImage_.getSize()[1]*e[1]}setScale(e){delete this.initialOptions_,super.setScale(e)}listenImageChange(e){this.iconImage_.addEventListener(st.A.CHANGE,e)}load(){this.iconImage_.load()}unlistenImageChange(e){this.iconImage_.removeEventListener(st.A.CHANGE,e)}}const wn=ms,xa="#333";class ps{constructor(e){e=e||{},this.font_=e.font,this.rotation_=e.rotation,this.rotateWithView_=e.rotateWithView,this.scale_=e.scale,this.scaleArray_=(0,ht.xq)(e.scale!==void 0?e.scale:1),this.text_=e.text,this.textAlign_=e.textAlign,this.justify_=e.justify,this.repeat_=e.repeat,this.textBaseline_=e.textBaseline,this.fill_=e.fill!==void 0?e.fill:new Ie({color:xa}),this.maxAngle_=e.maxAngle!==void 0?e.maxAngle:Math.PI/4,this.placement_=e.placement!==void 0?e.placement:"point",this.overflow_=!!e.overflow,this.stroke_=e.stroke!==void 0?e.stroke:null,this.offsetX_=e.offsetX!==void 0?e.offsetX:0,this.offsetY_=e.offsetY!==void 0?e.offsetY:0,this.backgroundFill_=e.backgroundFill?e.backgroundFill:null,this.backgroundStroke_=e.backgroundStroke?e.backgroundStroke:null,this.padding_=e.padding===void 0?null:e.padding}clone(){const e=this.getScale();return new ps({font:this.getFont(),placement:this.getPlacement(),repeat:this.getRepeat(),maxAngle:this.getMaxAngle(),overflow:this.getOverflow(),rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(e)?e.slice():e,text:this.getText(),textAlign:this.getTextAlign(),justify:this.getJustify(),textBaseline:this.getTextBaseline(),fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,offsetX:this.getOffsetX(),offsetY:this.getOffsetY(),backgroundFill:this.getBackgroundFill()?this.getBackgroundFill().clone():void 0,backgroundStroke:this.getBackgroundStroke()?this.getBackgroundStroke().clone():void 0,padding:this.getPadding()||void 0})}getOverflow(){return this.overflow_}getFont(){return this.font_}getMaxAngle(){return this.maxAngle_}getPlacement(){return this.placement_}getRepeat(){return this.repeat_}getOffsetX(){return this.offsetX_}getOffsetY(){return this.offsetY_}getFill(){return this.fill_}getRotateWithView(){return this.rotateWithView_}getRotation(){return this.rotation_}getScale(){return this.scale_}getScaleArray(){return this.scaleArray_}getStroke(){return this.stroke_}getText(){return this.text_}getTextAlign(){return this.textAlign_}getJustify(){return this.justify_}getTextBaseline(){return this.textBaseline_}getBackgroundFill(){return this.backgroundFill_}getBackgroundStroke(){return this.backgroundStroke_}getPadding(){return this.padding_}setOverflow(e){this.overflow_=e}setFont(e){this.font_=e}setMaxAngle(e){this.maxAngle_=e}setOffsetX(e){this.offsetX_=e}setOffsetY(e){this.offsetY_=e}setPlacement(e){this.placement_=e}setRepeat(e){this.repeat_=e}setRotateWithView(e){this.rotateWithView_=e}setFill(e){this.fill_=e}setRotation(e){this.rotation_=e}setScale(e){this.scale_=e,this.scaleArray_=(0,ht.xq)(e!==void 0?e:1)}setStroke(e){this.stroke_=e}setText(e){this.text_=e}setTextAlign(e){this.textAlign_=e}setJustify(e){this.justify_=e}setTextBaseline(e){this.textBaseline_=e}setBackgroundFill(e){this.backgroundFill_=e}setBackgroundStroke(e){this.backgroundStroke_=e}setPadding(e){this.padding_=e}}const gi=ps;function _r(r){return new fe({fill:Ki(r,""),stroke:Ji(r,""),text:ya(r),image:va(r)})}function Ki(r,e){const t=r[e+"fill-color"];if(t)return new Ie({color:t})}function Ji(r,e){const t=r[e+"stroke-width"],i=r[e+"stroke-color"];if(!(!t&&!i))return new Te({width:t,color:i,lineCap:r[e+"stroke-line-cap"],lineJoin:r[e+"stroke-line-join"],lineDash:r[e+"stroke-line-dash"],lineDashOffset:r[e+"stroke-line-dash-offset"],miterLimit:r[e+"stroke-miter-limit"]})}function ya(r){const e=r["text-value"];return e?new gi({text:e,font:r["text-font"],maxAngle:r["text-max-angle"],offsetX:r["text-offset-x"],offsetY:r["text-offset-y"],overflow:r["text-overflow"],placement:r["text-placement"],repeat:r["text-repeat"],scale:r["text-scale"],rotateWithView:r["text-rotate-with-view"],rotation:r["text-rotation"],textAlign:r["text-align"],justify:r["text-justify"],textBaseline:r["text-baseline"],padding:r["text-padding"],fill:Ki(r,"text-"),backgroundFill:Ki(r,"text-background-"),stroke:Ji(r,"text-"),backgroundStroke:Ji(r,"text-background-")}):void 0}function va(r){const e=r["icon-src"],t=r["icon-img"];if(e||t)return new wn({src:e,img:t,imgSize:r["icon-img-size"],anchor:r["icon-anchor"],anchorOrigin:r["icon-anchor-origin"],anchorXUnits:r["icon-anchor-x-units"],anchorYUnits:r["icon-anchor-y-units"],color:r["icon-color"],crossOrigin:r["icon-cross-origin"],offset:r["icon-offset"],displacement:r["icon-displacement"],opacity:r["icon-opacity"],scale:r["icon-scale"],width:r["icon-width"],height:r["icon-height"],rotation:r["icon-rotation"],rotateWithView:r["icon-rotate-with-view"],size:r["icon-size"],declutterMode:r["icon-declutter-mode"]});const i=r["shape-points"];if(i){const s="shape-";return new Ze({points:i,fill:Ki(r,s),stroke:Ji(r,s),radius:r["shape-radius"],radius1:r["shape-radius1"],radius2:r["shape-radius2"],angle:r["shape-angle"],displacement:r["shape-displacement"],rotation:r["shape-rotation"],rotateWithView:r["shape-rotate-with-view"],scale:r["shape-scale"],declutterMode:r["shape-declutter-mode"]})}const n=r["circle-radius"];if(n){const s="circle-";return new Ct({radius:n,fill:Ki(r,s),stroke:Ji(r,s),displacement:r["circle-displacement"],scale:r["circle-scale"],rotation:r["circle-rotation"],rotateWithView:r["circle-rotate-with-view"],declutterMode:r["circle-declutter-mode"]})}}const xr={RENDER_ORDER:"renderOrder"};class Ea extends cr.A{constructor(e){e=e||{};const t=Object.assign({},e);delete t.style,delete t.renderBuffer,delete t.updateWhileAnimating,delete t.updateWhileInteracting,super(t),this.declutter_=e.declutter!==void 0?e.declutter:!1,this.renderBuffer_=e.renderBuffer!==void 0?e.renderBuffer:100,this.style_=null,this.styleFunction_=void 0,this.setStyle(e.style),this.updateWhileAnimating_=e.updateWhileAnimating!==void 0?e.updateWhileAnimating:!1,this.updateWhileInteracting_=e.updateWhileInteracting!==void 0?e.updateWhileInteracting:!1}getDeclutter(){return this.declutter_}getFeatures(e){return super.getFeatures(e)}getRenderBuffer(){return this.renderBuffer_}getRenderOrder(){return this.get(xr.RENDER_ORDER)}getStyle(){return this.style_}getStyleFunction(){return this.styleFunction_}getUpdateWhileAnimating(){return this.updateWhileAnimating_}getUpdateWhileInteracting(){return this.updateWhileInteracting_}renderDeclutter(e){e.declutterTree||(e.declutterTree=new hr(9)),this.getRenderer().renderDeclutter(e)}setRenderOrder(e){this.set(xr.RENDER_ORDER,e)}setStyle(e){let t;if(e===void 0)t=fa;else if(e===null)t=null;else if(typeof e=="function")t=e;else if(e instanceof fe)t=e;else if(Array.isArray(e)){const i=e.length,n=new Array(i);for(let s=0;s<i;++s){const o=e[s];o instanceof fe?n[s]=o:n[s]=_r(o)}t=n}else t=_r(e);this.style_=t,this.styleFunction_=e===null?void 0:da(this.style_),this.changed()}}const _s=Ea,$i={BEGIN_GEOMETRY:0,BEGIN_PATH:1,CIRCLE:2,CLOSE_PATH:3,CUSTOM:4,DRAW_CHARS:5,DRAW_IMAGE:6,END_GEOMETRY:7,FILL:8,MOVE_TO_LINE_TO:9,SET_FILL_STYLE:10,SET_STROKE_STYLE:11,STROKE:12},Tn=[$i.FILL],Ht=[$i.STROKE],mi=[$i.BEGIN_PATH],yr=[$i.CLOSE_PATH],re=$i;var wa=C(11580);class Ta{drawCustom(e,t,i,n){}drawGeometry(e){}setStyle(e){}drawCircle(e,t){}drawFeature(e,t){}drawGeometryCollection(e,t){}drawLineString(e,t){}drawMultiLineString(e,t){}drawMultiPoint(e,t){}drawMultiPolygon(e,t){}drawPoint(e,t){}drawPolygon(e,t){}drawText(e,t){}setFillStrokeStyle(e,t){}setImageStyle(e,t){}setTextStyle(e,t){}}const vr=Ta;var $e=C(66514),Kt=C(78742);class Ca extends vr{constructor(e,t,i,n){super(),this.tolerance=e,this.maxExtent=t,this.pixelRatio=n,this.maxLineWidth=0,this.resolution=i,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_=null,this.bufferedMaxExtent_=null,this.instructions=[],this.coordinates=[],this.tmpCoordinate_=[],this.hitDetectionInstructions=[],this.state={}}applyPixelRatio(e){const t=this.pixelRatio;return t==1?e:e.map(function(i){return i*t})}appendFlatPointCoordinates(e,t){const i=this.getBufferedMaxExtent(),n=this.tmpCoordinate_,s=this.coordinates;let o=s.length;for(let a=0,l=e.length;a<l;a+=t)n[0]=e[a],n[1]=e[a+1],(0,T.Ym)(i,n)&&(s[o++]=n[0],s[o++]=n[1]);return o}appendFlatLineCoordinates(e,t,i,n,s,o){const a=this.coordinates;let l=a.length;const h=this.getBufferedMaxExtent();o&&(t+=n);let c=e[t],d=e[t+1];const u=this.tmpCoordinate_;let f=!0,g,m,p;for(g=t+n;g<i;g+=n)u[0]=e[g],u[1]=e[g+1],p=(0,T.vz)(h,u),p!==m?(f&&(a[l++]=c,a[l++]=d,f=!1),a[l++]=u[0],a[l++]=u[1]):p===wa.A.INTERSECTING?(a[l++]=u[0],a[l++]=u[1],f=!1):f=!0,c=u[0],d=u[1],m=p;return(s&&f||g===t+n)&&(a[l++]=c,a[l++]=d),l}drawCustomCoordinates_(e,t,i,n,s){for(let o=0,a=i.length;o<a;++o){const l=i[o],h=this.appendFlatLineCoordinates(e,t,l,n,!1,!1);s.push(h),t=l}return t}drawCustom(e,t,i,n){this.beginGeometry(e,t);const s=e.getType(),o=e.getStride(),a=this.coordinates.length;let l,h,c,d,u;switch(s){case"MultiPolygon":l=e.getOrientedFlatCoordinates(),d=[];const f=e.getEndss();u=0;for(let g=0,m=f.length;g<m;++g){const p=[];u=this.drawCustomCoordinates_(l,u,f[g],o,p),d.push(p)}this.instructions.push([re.CUSTOM,a,d,e,i,Kt.Dz]),this.hitDetectionInstructions.push([re.CUSTOM,a,d,e,n||i,Kt.Dz]);break;case"Polygon":case"MultiLineString":c=[],l=s=="Polygon"?e.getOrientedFlatCoordinates():e.getFlatCoordinates(),u=this.drawCustomCoordinates_(l,0,e.getEnds(),o,c),this.instructions.push([re.CUSTOM,a,c,e,i,Kt.cD]),this.hitDetectionInstructions.push([re.CUSTOM,a,c,e,n||i,Kt.cD]);break;case"LineString":case"Circle":l=e.getFlatCoordinates(),h=this.appendFlatLineCoordinates(l,0,l.length,o,!1,!1),this.instructions.push([re.CUSTOM,a,h,e,i,Kt.n2]),this.hitDetectionInstructions.push([re.CUSTOM,a,h,e,n||i,Kt.n2]);break;case"MultiPoint":l=e.getFlatCoordinates(),h=this.appendFlatPointCoordinates(l,o),h>a&&(this.instructions.push([re.CUSTOM,a,h,e,i,Kt.n2]),this.hitDetectionInstructions.push([re.CUSTOM,a,h,e,n||i,Kt.n2]));break;case"Point":l=e.getFlatCoordinates(),this.coordinates.push(l[0],l[1]),h=this.coordinates.length,this.instructions.push([re.CUSTOM,a,h,e,i]),this.hitDetectionInstructions.push([re.CUSTOM,a,h,e,n||i]);break;default:}this.endGeometry(t)}beginGeometry(e,t){this.beginGeometryInstruction1_=[re.BEGIN_GEOMETRY,t,0,e],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[re.BEGIN_GEOMETRY,t,0,e],this.hitDetectionInstructions.push(this.beginGeometryInstruction2_)}finish(){return{instructions:this.instructions,hitDetectionInstructions:this.hitDetectionInstructions,coordinates:this.coordinates}}reverseHitDetectionInstructions(){const e=this.hitDetectionInstructions;e.reverse();let t;const i=e.length;let n,s,o=-1;for(t=0;t<i;++t)n=e[t],s=n[0],s==re.END_GEOMETRY?o=t:s==re.BEGIN_GEOMETRY&&(n[2]=t,(0,$e.gI)(this.hitDetectionInstructions,o,t),o=-1)}setFillStrokeStyle(e,t){const i=this.state;if(e){const n=e.getColor();i.fillStyle=Mt(n||V.qY)}else i.fillStyle=void 0;if(t){const n=t.getColor();i.strokeStyle=Mt(n||V.NT);const s=t.getLineCap();i.lineCap=s!==void 0?s:V._m;const o=t.getLineDash();i.lineDash=o?o.slice():V.Oq;const a=t.getLineDashOffset();i.lineDashOffset=a||V.vk;const l=t.getLineJoin();i.lineJoin=l!==void 0?l:V._K;const h=t.getWidth();i.lineWidth=h!==void 0?h:V.aq;const c=t.getMiterLimit();i.miterLimit=c!==void 0?c:V.eL,i.lineWidth>this.maxLineWidth&&(this.maxLineWidth=i.lineWidth,this.bufferedMaxExtent_=null)}else i.strokeStyle=void 0,i.lineCap=void 0,i.lineDash=null,i.lineDashOffset=void 0,i.lineJoin=void 0,i.lineWidth=void 0,i.miterLimit=void 0}createFill(e){const t=e.fillStyle,i=[re.SET_FILL_STYLE,t];return typeof t!="string"&&i.push(!0),i}applyStroke(e){this.instructions.push(this.createStroke(e))}createStroke(e){return[re.SET_STROKE_STYLE,e.strokeStyle,e.lineWidth*this.pixelRatio,e.lineCap,e.lineJoin,e.miterLimit,this.applyPixelRatio(e.lineDash),e.lineDashOffset*this.pixelRatio]}updateFillStyle(e,t){const i=e.fillStyle;(typeof i!="string"||e.currentFillStyle!=i)&&(i!==void 0&&this.instructions.push(t.call(this,e)),e.currentFillStyle=i)}updateStrokeStyle(e,t){const i=e.strokeStyle,n=e.lineCap,s=e.lineDash,o=e.lineDashOffset,a=e.lineJoin,l=e.lineWidth,h=e.miterLimit;(e.currentStrokeStyle!=i||e.currentLineCap!=n||s!=e.currentLineDash&&!(0,$e.aI)(e.currentLineDash,s)||e.currentLineDashOffset!=o||e.currentLineJoin!=a||e.currentLineWidth!=l||e.currentMiterLimit!=h)&&(i!==void 0&&t.call(this,e),e.currentStrokeStyle=i,e.currentLineCap=n,e.currentLineDash=s,e.currentLineDashOffset=o,e.currentLineJoin=a,e.currentLineWidth=l,e.currentMiterLimit=h)}endGeometry(e){this.beginGeometryInstruction1_[2]=this.instructions.length,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_[2]=this.hitDetectionInstructions.length,this.beginGeometryInstruction2_=null;const t=[re.END_GEOMETRY,e];this.instructions.push(t),this.hitDetectionInstructions.push(t)}getBufferedMaxExtent(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=(0,T.o8)(this.maxExtent),this.maxLineWidth>0)){const e=this.resolution*(this.maxLineWidth+1)/2;(0,T.r)(this.bufferedMaxExtent_,e,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_}}const qi=Ca;class Sa extends qi{constructor(e,t,i,n){super(e,t,i,n),this.hitDetectionImage_=null,this.image_=null,this.imagePixelRatio_=void 0,this.anchorX_=void 0,this.anchorY_=void 0,this.height_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.scale_=void 0,this.width_=void 0,this.declutterMode_=void 0,this.declutterImageWithText_=void 0}drawPoint(e,t){if(!this.image_)return;this.beginGeometry(e,t);const i=e.getFlatCoordinates(),n=e.getStride(),s=this.coordinates.length,o=this.appendFlatPointCoordinates(i,n);this.instructions.push([re.DRAW_IMAGE,s,o,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_*this.imagePixelRatio_,this.originY_*this.imagePixelRatio_,this.rotateWithView_,this.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRatio/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_),this.declutterMode_,this.declutterImageWithText_]),this.hitDetectionInstructions.push([re.DRAW_IMAGE,s,o,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterMode_,this.declutterImageWithText_]),this.endGeometry(t)}drawMultiPoint(e,t){if(!this.image_)return;this.beginGeometry(e,t);const i=e.getFlatCoordinates(),n=e.getStride(),s=this.coordinates.length,o=this.appendFlatPointCoordinates(i,n);this.instructions.push([re.DRAW_IMAGE,s,o,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_*this.imagePixelRatio_,this.originY_*this.imagePixelRatio_,this.rotateWithView_,this.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRatio/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_),this.declutterMode_,this.declutterImageWithText_]),this.hitDetectionInstructions.push([re.DRAW_IMAGE,s,o,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterMode_,this.declutterImageWithText_]),this.endGeometry(t)}finish(){return this.reverseHitDetectionInstructions(),this.anchorX_=void 0,this.anchorY_=void 0,this.hitDetectionImage_=null,this.image_=null,this.imagePixelRatio_=void 0,this.height_=void 0,this.scale_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.width_=void 0,super.finish()}setImageStyle(e,t){const i=e.getAnchor(),n=e.getSize(),s=e.getOrigin();this.imagePixelRatio_=e.getPixelRatio(this.pixelRatio),this.anchorX_=i[0],this.anchorY_=i[1],this.hitDetectionImage_=e.getHitDetectionImage(),this.image_=e.getImage(this.pixelRatio),this.height_=n[1],this.opacity_=e.getOpacity(),this.originX_=s[0],this.originY_=s[1],this.rotateWithView_=e.getRotateWithView(),this.rotation_=e.getRotation(),this.scale_=e.getScaleArray(),this.width_=n[0],this.declutterMode_=e.getDeclutterMode(),this.declutterImageWithText_=t}}const Ia=Sa;class Ra extends qi{constructor(e,t,i,n){super(e,t,i,n)}drawFlatCoordinates_(e,t,i,n){const s=this.coordinates.length,o=this.appendFlatLineCoordinates(e,t,i,n,!1,!1),a=[re.MOVE_TO_LINE_TO,s,o];return this.instructions.push(a),this.hitDetectionInstructions.push(a),i}drawLineString(e,t){const i=this.state,n=i.strokeStyle,s=i.lineWidth;if(n===void 0||s===void 0)return;this.updateStrokeStyle(i,this.applyStroke),this.beginGeometry(e,t),this.hitDetectionInstructions.push([re.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,V.Oq,V.vk],mi);const o=e.getFlatCoordinates(),a=e.getStride();this.drawFlatCoordinates_(o,0,o.length,a),this.hitDetectionInstructions.push(Ht),this.endGeometry(t)}drawMultiLineString(e,t){const i=this.state,n=i.strokeStyle,s=i.lineWidth;if(n===void 0||s===void 0)return;this.updateStrokeStyle(i,this.applyStroke),this.beginGeometry(e,t),this.hitDetectionInstructions.push([re.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset],mi);const o=e.getEnds(),a=e.getFlatCoordinates(),l=e.getStride();let h=0;for(let c=0,d=o.length;c<d;++c)h=this.drawFlatCoordinates_(a,h,o[c],l);this.hitDetectionInstructions.push(Ht),this.endGeometry(t)}finish(){const e=this.state;return e.lastStroke!=null&&e.lastStroke!=this.coordinates.length&&this.instructions.push(Ht),this.reverseHitDetectionInstructions(),this.state=null,super.finish()}applyStroke(e){e.lastStroke!=null&&e.lastStroke!=this.coordinates.length&&(this.instructions.push(Ht),e.lastStroke=this.coordinates.length),e.lastStroke=0,super.applyStroke(e),this.instructions.push(mi)}}const Aa=Ra;var ba=C(83671);class La extends qi{constructor(e,t,i,n){super(e,t,i,n)}drawFlatCoordinatess_(e,t,i,n){const s=this.state,o=s.fillStyle!==void 0,a=s.strokeStyle!==void 0,l=i.length;this.instructions.push(mi),this.hitDetectionInstructions.push(mi);for(let h=0;h<l;++h){const c=i[h],d=this.coordinates.length,u=this.appendFlatLineCoordinates(e,t,c,n,!0,!a),f=[re.MOVE_TO_LINE_TO,d,u];this.instructions.push(f),this.hitDetectionInstructions.push(f),a&&(this.instructions.push(yr),this.hitDetectionInstructions.push(yr)),t=c}return o&&(this.instructions.push(Tn),this.hitDetectionInstructions.push(Tn)),a&&(this.instructions.push(Ht),this.hitDetectionInstructions.push(Ht)),t}drawCircle(e,t){const i=this.state,n=i.fillStyle,s=i.strokeStyle;if(n===void 0&&s===void 0)return;this.setFillStrokeStyles_(),this.beginGeometry(e,t),i.fillStyle!==void 0&&this.hitDetectionInstructions.push([re.SET_FILL_STYLE,V.qY]),i.strokeStyle!==void 0&&this.hitDetectionInstructions.push([re.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset]);const o=e.getFlatCoordinates(),a=e.getStride(),l=this.coordinates.length;this.appendFlatLineCoordinates(o,0,o.length,a,!1,!1);const h=[re.CIRCLE,l];this.instructions.push(mi,h),this.hitDetectionInstructions.push(mi,h),i.fillStyle!==void 0&&(this.instructions.push(Tn),this.hitDetectionInstructions.push(Tn)),i.strokeStyle!==void 0&&(this.instructions.push(Ht),this.hitDetectionInstructions.push(Ht)),this.endGeometry(t)}drawPolygon(e,t){const i=this.state,n=i.fillStyle,s=i.strokeStyle;if(n===void 0&&s===void 0)return;this.setFillStrokeStyles_(),this.beginGeometry(e,t),i.fillStyle!==void 0&&this.hitDetectionInstructions.push([re.SET_FILL_STYLE,V.qY]),i.strokeStyle!==void 0&&this.hitDetectionInstructions.push([re.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset]);const o=e.getEnds(),a=e.getOrientedFlatCoordinates(),l=e.getStride();this.drawFlatCoordinatess_(a,0,o,l),this.endGeometry(t)}drawMultiPolygon(e,t){const i=this.state,n=i.fillStyle,s=i.strokeStyle;if(n===void 0&&s===void 0)return;this.setFillStrokeStyles_(),this.beginGeometry(e,t),i.fillStyle!==void 0&&this.hitDetectionInstructions.push([re.SET_FILL_STYLE,V.qY]),i.strokeStyle!==void 0&&this.hitDetectionInstructions.push([re.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset]);const o=e.getEndss(),a=e.getOrientedFlatCoordinates(),l=e.getStride();let h=0;for(let c=0,d=o.length;c<d;++c)h=this.drawFlatCoordinatess_(a,h,o[c],l);this.endGeometry(t)}finish(){this.reverseHitDetectionInstructions(),this.state=null;const e=this.tolerance;if(e!==0){const t=this.coordinates;for(let i=0,n=t.length;i<n;++i)t[i]=(0,ba.n$)(t[i],e)}return super.finish()}setFillStrokeStyles_(){const e=this.state;e.fillStyle!==void 0&&this.updateFillStyle(e,this.createFill),e.strokeStyle!==void 0&&this.updateStrokeStyle(e,this.applyStroke)}}const Er=La;var xe=C(61597);function Ma(r,e,t,i,n){const s=[];let o=t,a=0,l=e.slice(t,2);for(;a<r&&o+n<i;){const[h,c]=l.slice(-2),d=e[o+n],u=e[o+n+1],f=Math.sqrt((d-h)*(d-h)+(u-c)*(u-c));if(a+=f,a>=r){const g=(r-a+f)/f,m=(0,xe.Cc)(h,d,g),p=(0,xe.Cc)(c,u,g);l.push(m,p),s.push(l),l=[m,p],a==r&&(o+=n),a=0}else if(a<r)l.push(e[o+n],e[o+n+1]),o+=n;else{const g=f-a,m=(0,xe.Cc)(h,d,g/f),p=(0,xe.Cc)(c,u,g/f);l.push(m,p),s.push(l),l=[m,p],a=0,o+=n}}return a>0&&s.push(l),s}function Fa(r,e,t,i,n){let s=t,o=t,a=0,l=0,h=t,c,d,u,f,g,m,p,v,y,w;for(d=t;d<i;d+=n){const R=e[d],L=e[d+1];g!==void 0&&(y=R-g,w=L-m,f=Math.sqrt(y*y+w*w),p!==void 0&&(l+=u,c=Math.acos((p*y+v*w)/(u*f)),c>r&&(l>a&&(a=l,s=h,o=d),l=0,h=d-n)),u=f,p=y,v=w),g=R,m=L}return l+=f,l>a?[h,d]:[s,o]}const Qi={left:0,end:0,center:.5,right:1,start:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1};class Da extends qi{constructor(e,t,i,n){super(e,t,i,n),this.labels_=null,this.text_="",this.textOffsetX_=0,this.textOffsetY_=0,this.textRotateWithView_=void 0,this.textRotation_=0,this.textFillState_=null,this.fillStates={},this.textStrokeState_=null,this.strokeStates={},this.textState_={},this.textStates={},this.textKey_="",this.fillKey_="",this.strokeKey_="",this.declutterImageWithText_=void 0}finish(){const e=super.finish();return e.textStates=this.textStates,e.fillStates=this.fillStates,e.strokeStates=this.strokeStates,e}drawText(e,t){const i=this.textFillState_,n=this.textStrokeState_,s=this.textState_;if(this.text_===""||!s||!i&&!n)return;const o=this.coordinates;let a=o.length;const l=e.getType();let h=null,c=e.getStride();if(s.placement==="line"&&(l=="LineString"||l=="MultiLineString"||l=="Polygon"||l=="MultiPolygon")){if(!(0,T.HY)(this.getBufferedMaxExtent(),e.getExtent()))return;let d;if(h=e.getFlatCoordinates(),l=="LineString")d=[h.length];else if(l=="MultiLineString")d=e.getEnds();else if(l=="Polygon")d=e.getEnds().slice(0,1);else if(l=="MultiPolygon"){const m=e.getEndss();d=[];for(let p=0,v=m.length;p<v;++p)d.push(m[p][0])}this.beginGeometry(e,t);const u=s.repeat,f=u?void 0:s.textAlign;let g=0;for(let m=0,p=d.length;m<p;++m){let v;u?v=Ma(u*this.resolution,h,g,d[m],c):v=[h.slice(g,d[m])];for(let y=0,w=v.length;y<w;++y){const R=v[y];let L=0,D=R.length;if(f==null){const N=Fa(s.maxAngle,R,0,R.length,2);L=N[0],D=N[1]}for(let N=L;N<D;N+=c)o.push(R[N],R[N+1]);const b=o.length;g=d[m],this.drawChars_(a,b),a=b}}this.endGeometry(t)}else{let d=s.overflow?null:[];switch(l){case"Point":case"MultiPoint":h=e.getFlatCoordinates();break;case"LineString":h=e.getFlatMidpoint();break;case"Circle":h=e.getCenter();break;case"MultiLineString":h=e.getFlatMidpoints(),c=2;break;case"Polygon":h=e.getFlatInteriorPoint(),s.overflow||d.push(h[2]/this.resolution),c=3;break;case"MultiPolygon":const p=e.getFlatInteriorPoints();h=[];for(let v=0,y=p.length;v<y;v+=3)s.overflow||d.push(p[v+2]/this.resolution),h.push(p[v],p[v+1]);if(h.length===0)return;c=2;break;default:}const u=this.appendFlatPointCoordinates(h,c);if(u===a)return;if(d&&(u-a)/2!==h.length/c){let p=a/2;d=d.filter((v,y)=>{const w=o[(p+y)*2]===h[y*c]&&o[(p+y)*2+1]===h[y*c+1];return w||--p,w})}this.saveTextStates_(),(s.backgroundFill||s.backgroundStroke)&&(this.setFillStrokeStyle(s.backgroundFill,s.backgroundStroke),s.backgroundFill&&(this.updateFillStyle(this.state,this.createFill),this.hitDetectionInstructions.push(this.createFill(this.state))),s.backgroundStroke&&(this.updateStrokeStyle(this.state,this.applyStroke),this.hitDetectionInstructions.push(this.createStroke(this.state)))),this.beginGeometry(e,t);let f=s.padding;if(f!=V.Tq&&(s.scale[0]<0||s.scale[1]<0)){let p=s.padding[0],v=s.padding[1],y=s.padding[2],w=s.padding[3];s.scale[0]<0&&(v=-v,w=-w),s.scale[1]<0&&(p=-p,y=-y),f=[p,v,y,w]}const g=this.pixelRatio;this.instructions.push([re.DRAW_IMAGE,a,u,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[1,1],NaN,void 0,this.declutterImageWithText_,f==V.Tq?V.Tq:f.map(function(p){return p*g}),!!s.backgroundFill,!!s.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,d]);const m=1/g;this.hitDetectionInstructions.push([re.DRAW_IMAGE,a,u,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[m,m],NaN,void 0,this.declutterImageWithText_,f,!!s.backgroundFill,!!s.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,d]),this.endGeometry(t)}}saveTextStates_(){const e=this.textStrokeState_,t=this.textState_,i=this.textFillState_,n=this.strokeKey_;e&&(n in this.strokeStates||(this.strokeStates[n]={strokeStyle:e.strokeStyle,lineCap:e.lineCap,lineDashOffset:e.lineDashOffset,lineWidth:e.lineWidth,lineJoin:e.lineJoin,miterLimit:e.miterLimit,lineDash:e.lineDash}));const s=this.textKey_;s in this.textStates||(this.textStates[s]={font:t.font,textAlign:t.textAlign||V.MY,justify:t.justify,textBaseline:t.textBaseline||V.M8,scale:t.scale});const o=this.fillKey_;i&&(o in this.fillStates||(this.fillStates[o]={fillStyle:i.fillStyle}))}drawChars_(e,t){const i=this.textStrokeState_,n=this.textState_,s=this.strokeKey_,o=this.textKey_,a=this.fillKey_;this.saveTextStates_();const l=this.pixelRatio,h=Qi[n.textBaseline],c=this.textOffsetY_*l,d=this.text_,u=i?i.lineWidth*Math.abs(n.scale[0])/2:0;this.instructions.push([re.DRAW_CHARS,e,t,h,n.overflow,a,n.maxAngle,l,c,s,u*l,d,o,1]),this.hitDetectionInstructions.push([re.DRAW_CHARS,e,t,h,n.overflow,a,n.maxAngle,1,c,s,u,d,o,1/l])}setTextStyle(e,t){let i,n,s;if(!e)this.text_="";else{const o=e.getFill();o?(n=this.textFillState_,n||(n={},this.textFillState_=n),n.fillStyle=Mt(o.getColor()||V.qY)):(n=null,this.textFillState_=n);const a=e.getStroke();if(!a)s=null,this.textStrokeState_=s;else{s=this.textStrokeState_,s||(s={},this.textStrokeState_=s);const g=a.getLineDash(),m=a.getLineDashOffset(),p=a.getWidth(),v=a.getMiterLimit();s.lineCap=a.getLineCap()||V._m,s.lineDash=g?g.slice():V.Oq,s.lineDashOffset=m===void 0?V.vk:m,s.lineJoin=a.getLineJoin()||V._K,s.lineWidth=p===void 0?V.aq:p,s.miterLimit=v===void 0?V.eL:v,s.strokeStyle=Mt(a.getColor()||V.NT)}i=this.textState_;const l=e.getFont()||V.ZV;(0,V.fZ)(l);const h=e.getScaleArray();i.overflow=e.getOverflow(),i.font=l,i.maxAngle=e.getMaxAngle(),i.placement=e.getPlacement(),i.textAlign=e.getTextAlign(),i.repeat=e.getRepeat(),i.justify=e.getJustify(),i.textBaseline=e.getTextBaseline()||V.M8,i.backgroundFill=e.getBackgroundFill(),i.backgroundStroke=e.getBackgroundStroke(),i.padding=e.getPadding()||V.Tq,i.scale=h===void 0?[1,1]:h;const c=e.getOffsetX(),d=e.getOffsetY(),u=e.getRotateWithView(),f=e.getRotation();this.text_=e.getText()||"",this.textOffsetX_=c===void 0?0:c,this.textOffsetY_=d===void 0?0:d,this.textRotateWithView_=u===void 0?!1:u,this.textRotation_=f===void 0?0:f,this.strokeKey_=s?(typeof s.strokeStyle=="string"?s.strokeStyle:(0,$.v6)(s.strokeStyle))+s.lineCap+s.lineDashOffset+"|"+s.lineWidth+s.lineJoin+s.miterLimit+"["+s.lineDash.join()+"]":"",this.textKey_=i.font+i.scale+(i.textAlign||"?")+(i.repeat||"?")+(i.justify||"?")+(i.textBaseline||"?"),this.fillKey_=n?typeof n.fillStyle=="string"?n.fillStyle:"|"+(0,$.v6)(n.fillStyle):""}this.declutterImageWithText_=t}}const Pa={Circle:Er,Default:qi,Image:Ia,LineString:Aa,Polygon:Er,Text:Da};class Oa{constructor(e,t,i,n){this.tolerance_=e,this.maxExtent_=t,this.pixelRatio_=n,this.resolution_=i,this.buildersByZIndex_={}}finish(){const e={};for(const t in this.buildersByZIndex_){e[t]=e[t]||{};const i=this.buildersByZIndex_[t];for(const n in i){const s=i[n].finish();e[t][n]=s}}return e}getBuilder(e,t){const i=e!==void 0?e.toString():"0";let n=this.buildersByZIndex_[i];n===void 0&&(n={},this.buildersByZIndex_[i]=n);let s=n[t];if(s===void 0){const o=Pa[t];s=new o(this.tolerance_,this.maxExtent_,this.resolution_,this.pixelRatio_),n[t]=s}return s}}const wr=Oa;var xs=C(11854);class ka extends xs.A{constructor(e){super(),this.ready=!0,this.boundHandleImageChange_=this.handleImageChange_.bind(this),this.layer_=e,this.declutterExecutorGroup=null}getFeatures(e){return(0,$.b0)()}getData(e){return null}prepareFrame(e){return(0,$.b0)()}renderFrame(e,t){return(0,$.b0)()}loadedTileCallback(e,t,i){e[t]||(e[t]={}),e[t][i.tileCoord.toString()]=i}createLoadedTileFinder(e,t,i){return(n,s)=>{const o=this.loadedTileCallback.bind(this,i,n);return e.forEachLoadedTile(t,n,s,o)}}forEachFeatureAtCoordinate(e,t,i,n,s){}getLayer(){return this.layer_}handleFontsChanged(){}handleImageChange_(e){e.target.getState()===Se.LOADED&&this.renderIfReadyAndVisible()}loadImage(e){let t=e.getState();return t!=Se.LOADED&&t!=Se.ERROR&&e.addEventListener(st.A.CHANGE,this.boundHandleImageChange_),t==Se.IDLE&&(e.load(),t=e.getState()),t==Se.LOADED}renderIfReadyAndVisible(){const e=this.getLayer();e&&e.getVisible()&&e.getSourceState()==="ready"&&e.changed()}disposeInternal(){delete this.layer_,super.disposeInternal()}}const Tr=ka;var Cn=C(9960),Jt=C(83984),te=C(9703);const Cr=[];let Ci=null;function Ba(){Ci=(0,Ge.Y)(1,1,void 0,{willReadFrequently:!0})}class za extends Tr{constructor(e){super(e),this.container=null,this.renderedResolution,this.tempTransform=(0,te.vt)(),this.pixelTransform=(0,te.vt)(),this.inversePixelTransform=(0,te.vt)(),this.context=null,this.containerReused=!1,this.pixelContext_=null,this.frameState=null}getImageData(e,t,i){Ci||Ba(),Ci.clearRect(0,0,1,1);let n;try{Ci.drawImage(e,t,i,1,1,0,0,1,1),n=Ci.getImageData(0,0,1,1).data}catch{return Ci=null,null}return n}getBackground(e){let i=this.getLayer().getBackground();return typeof i=="function"&&(i=i(e.viewState.resolution)),i||void 0}useContainer(e,t,i){const n=this.getLayer().getClassName();let s,o;if(e&&e.className===n&&(!i||e&&e.style.backgroundColor&&(0,$e.aI)((0,_t._j)(e.style.backgroundColor),(0,_t._j)(i)))){const a=e.firstElementChild;a instanceof HTMLCanvasElement&&(o=a.getContext("2d"))}if(o&&o.canvas.style.transform===t?(this.container=e,this.context=o,this.containerReused=!0):this.containerReused&&(this.container=null,this.context=null,this.containerReused=!1),!this.container){s=document.createElement("div"),s.className=n;let a=s.style;a.position="absolute",a.width="100%",a.height="100%",o=(0,Ge.Y)();const l=o.canvas;s.appendChild(l),a=l.style,a.position="absolute",a.left="0",a.transformOrigin="top left",this.container=s,this.context=o}!this.containerReused&&i&&!this.container.style.backgroundColor&&(this.container.style.backgroundColor=i)}clipUnrotated(e,t,i){const n=(0,T.Py)(i),s=(0,T.WU)(i),o=(0,T.k_)(i),a=(0,T.R)(i);(0,te.Bb)(t.coordinateToPixelTransform,n),(0,te.Bb)(t.coordinateToPixelTransform,s),(0,te.Bb)(t.coordinateToPixelTransform,o),(0,te.Bb)(t.coordinateToPixelTransform,a);const l=this.inversePixelTransform;(0,te.Bb)(l,n),(0,te.Bb)(l,s),(0,te.Bb)(l,o),(0,te.Bb)(l,a),e.save(),e.beginPath(),e.moveTo(Math.round(n[0]),Math.round(n[1])),e.lineTo(Math.round(s[0]),Math.round(s[1])),e.lineTo(Math.round(o[0]),Math.round(o[1])),e.lineTo(Math.round(a[0]),Math.round(a[1])),e.clip()}dispatchRenderEvent_(e,t,i){const n=this.getLayer();if(n.hasListener(e)){const s=new Cn.A(e,this.inversePixelTransform,i,t);n.dispatchEvent(s)}}preRender(e,t){this.frameState=t,this.dispatchRenderEvent_(Jt.A.PRERENDER,e,t)}postRender(e,t){this.dispatchRenderEvent_(Jt.A.POSTRENDER,e,t)}getRenderTransform(e,t,i,n,s,o,a){const l=s/2,h=o/2,c=n/t,d=-c,u=-e[0]+a,f=-e[1];return(0,te.Zz)(this.tempTransform,l,h,c,d,-i,u,f)}disposeInternal(){delete this.frameState,super.disposeInternal()}}const Sr=za;var pi=C(87622);function Ga(r,e,t,i,n,s,o,a,l,h,c,d){let u=r[e],f=r[e+1],g=0,m=0,p=0,v=0;function y(){g=u,m=f,e+=i,u=r[e],f=r[e+1],v+=p,p=Math.sqrt((u-g)*(u-g)+(f-m)*(f-m))}do y();while(e<t-i&&v+p<s);let w=p===0?0:(s-v)/p;const R=(0,xe.Cc)(g,u,w),L=(0,xe.Cc)(m,f,w),D=e-i,b=v,N=s+a*l(h,n,c);for(;e<t-i&&v+p<N;)y();w=p===0?0:(N-v)/p;const Z=(0,xe.Cc)(g,u,w),q=(0,xe.Cc)(m,f,w);let he;if(d){const Y=[R,L,Z,q];(0,pi.e$)(Y,0,4,2,d,Y,Y),he=Y[0]>Y[2]}else he=R>Z;const le=Math.PI,Q=[],me=D+i===e;e=D,p=0,v=b,u=r[e],f=r[e+1];let J;if(me){y(),J=Math.atan2(f-m,u-g),he&&(J+=J>0?-le:le);const Y=(Z+R)/2,U=(q+L)/2;return Q[0]=[Y,U,(N-s)/2,J,n],Q}n=n.replace(/\n/g," ");for(let Y=0,U=n.length;Y<U;){y();let H=Math.atan2(f-m,u-g);if(he&&(H+=H>0?-le:le),J!==void 0){let Ce=H-J;if(Ce+=Ce>le?-2*le:Ce<-le?2*le:0,Math.abs(Ce)>o)return null}J=H;const pe=Y;let we=0;for(;Y<U;++Y){const Ce=he?U-Y-1:Y,Le=a*l(h,n[Ce],c);if(e+i<t&&v+p<s+we+Le/2)break;we+=Le}if(Y===pe)continue;const ke=he?n.substring(U-pe,U-Y):n.substring(pe,Y);w=p===0?0:(s+we/2-v)/p;const B=(0,xe.Cc)(g,u,w),Qe=(0,xe.Cc)(m,f,w);Q.push([B,Qe,we/2,H,ke]),s+=we}return Q}var Na=C(50904);const Si=(0,T.S5)(),$t=[],zt=[],Gt=[],qt=[];function Ir(r){return r[3].declutterBox}const Wa=new RegExp("["+String.fromCharCode(1425)+"-"+String.fromCharCode(2303)+String.fromCharCode(64285)+"-"+String.fromCharCode(65023)+String.fromCharCode(65136)+"-"+String.fromCharCode(65276)+String.fromCharCode(67584)+"-"+String.fromCharCode(69631)+String.fromCharCode(124928)+"-"+String.fromCharCode(126975)+"]");function Rr(r,e){return(e==="start"||e==="end")&&!Wa.test(r)&&(e=e==="start"?"left":"right"),Qi[e]}function Ua(r,e,t){return t>0&&r.push(` `,""),r.push(e,""),r}class Ya{constructor(e,t,i,n){this.overlaps=i,this.pixelRatio=t,this.resolution=e,this.alignFill_,this.instructions=n.instructions,this.coordinates=n.coordinates,this.coordinateCache_={},this.renderedTransform_=(0,te.vt)(),this.hitDetectionInstructions=n.hitDetectionInstructions,this.pixelCoordinates_=null,this.viewRotation_=0,this.fillStates=n.fillStates||{},this.strokeStates=n.strokeStates||{},this.textStates=n.textStates||{},this.widths_={},this.labels_={}}createLabel(e,t,i,n){const s=e+t+i+n;if(this.labels_[s])return this.labels_[s];const o=n?this.strokeStates[n]:null,a=i?this.fillStates[i]:null,l=this.textStates[t],h=this.pixelRatio,c=[l.scale[0]*h,l.scale[1]*h],d=Array.isArray(e),u=l.justify?Qi[l.justify]:Rr(Array.isArray(e)?e[0]:e,l.textAlign||V.MY),f=n&&o.lineWidth?o.lineWidth:0,g=d?e:e.split(` `).reduce(Ua,[]),{width:m,height:p,widths:v,heights:y,lineWidths:w}=(0,V.jT)(l,g),R=m+f,L=[],D=(R+2)*c[0],b=(p+f)*c[1],N={width:D<0?Math.floor(D):Math.ceil(D),height:b<0?Math.floor(b):Math.ceil(b),contextInstructions:L};(c[0]!=1||c[1]!=1)&&L.push("scale",c),n&&(L.push("strokeStyle",o.strokeStyle),L.push("lineWidth",f),L.push("lineCap",o.lineCap),L.push("lineJoin",o.lineJoin),L.push("miterLimit",o.miterLimit),L.push("setLineDash",[o.lineDash]),L.push("lineDashOffset",o.lineDashOffset)),i&&L.push("fillStyle",a.fillStyle),L.push("textBaseline","middle"),L.push("textAlign","center");const Z=.5-u;let q=u*R+Z*f;const he=[],le=[];let Q=0,me=0,J=0,Y=0,U;for(let H=0,pe=g.length;H<pe;H+=2){const we=g[H];if(we===` `){me+=Q,Q=0,q=u*R+Z*f,++Y;continue}const ke=g[H+1]||l.font;ke!==U&&(n&&he.push("font",ke),i&&le.push("font",ke),U=ke),Q=Math.max(Q,y[J]);const B=[we,q+Z*v[J]+u*(v[J]-w[Y]),.5*(f+Q)+me];q+=v[J],n&&he.push("strokeText",B),i&&le.push("fillText",B),++J}return Array.prototype.push.apply(L,he),Array.prototype.push.apply(L,le),this.labels_[s]=N,N}replayTextBackground_(e,t,i,n,s,o,a){e.beginPath(),e.moveTo.apply(e,t),e.lineTo.apply(e,i),e.lineTo.apply(e,n),e.lineTo.apply(e,s),e.lineTo.apply(e,t),o&&(this.alignFill_=o[2],this.fill_(e)),a&&(this.setStrokeStyle_(e,a),e.stroke())}calculateImageOrLabelDimensions_(e,t,i,n,s,o,a,l,h,c,d,u,f,g,m,p){a*=u[0],l*=u[1];let v=i-a,y=n-l;const w=s+h>e?e-h:s,R=o+c>t?t-c:o,L=g[3]+w*u[0]+g[1],D=g[0]+R*u[1]+g[2],b=v-g[3],N=y-g[0];(m||d!==0)&&($t[0]=b,qt[0]=b,$t[1]=N,zt[1]=N,zt[0]=b+L,Gt[0]=zt[0],Gt[1]=N+D,qt[1]=Gt[1]);let Z;return d!==0?(Z=(0,te.Zz)((0,te.vt)(),i,n,1,1,d,-i,-n),(0,te.Bb)(Z,$t),(0,te.Bb)(Z,zt),(0,te.Bb)(Z,Gt),(0,te.Bb)(Z,qt),(0,T.N)(Math.min($t[0],zt[0],Gt[0],qt[0]),Math.min($t[1],zt[1],Gt[1],qt[1]),Math.max($t[0],zt[0],Gt[0],qt[0]),Math.max($t[1],zt[1],Gt[1],qt[1]),Si)):(0,T.N)(Math.min(b,b+L),Math.min(N,N+D),Math.max(b,b+L),Math.max(N,N+D),Si),f&&(v=Math.round(v),y=Math.round(y)),{drawImageX:v,drawImageY:y,drawImageW:w,drawImageH:R,originX:h,originY:c,declutterBox:{minX:Si[0],minY:Si[1],maxX:Si[2],maxY:Si[3],value:p},canvasTransform:Z,scale:u}}replayImageOrLabel_(e,t,i,n,s,o,a){const l=!!(o||a),h=n.declutterBox,c=e.canvas,d=a?a[2]*n.scale[0]/2:0;return h.minX-d<=c.width/t&&h.maxX+d>=0&&h.minY-d<=c.height/t&&h.maxY+d>=0&&(l&&this.replayTextBackground_(e,$t,zt,Gt,qt,o,a),(0,V.Jw)(e,n.canvasTransform,s,i,n.originX,n.originY,n.drawImageW,n.drawImageH,n.drawImageX,n.drawImageY,n.scale)),!0}fill_(e){if(this.alignFill_){const t=(0,te.Bb)(this.renderedTransform_,[0,0]),i=512*this.pixelRatio;e.save(),e.translate(t[0]%i,t[1]%i),e.rotate(this.viewRotation_)}e.fill(),this.alignFill_&&e.restore()}setStrokeStyle_(e,t){e.strokeStyle=t[1],e.lineWidth=t[2],e.lineCap=t[3],e.lineJoin=t[4],e.miterLimit=t[5],e.lineDashOffset=t[7],e.setLineDash(t[6])}drawLabelWithPointPlacement_(e,t,i,n){const s=this.textStates[t],o=this.createLabel(e,t,n,i),a=this.strokeStates[i],l=this.pixelRatio,h=Rr(Array.isArray(e)?e[0]:e,s.textAlign||V.MY),c=Qi[s.textBaseline||V.M8],d=a&&a.lineWidth?a.lineWidth:0,u=o.width/l-2*s.scale[0],f=h*u+2*(.5-h)*d,g=c*o.height/l+2*(.5-c)*d;return{label:o,anchorX:f,anchorY:g}}execute_(e,t,i,n,s,o,a,l){let h;this.pixelCoordinates_&&(0,$e.aI)(i,this.renderedTransform_)?h=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),h=(0,pi.Rc)(this.coordinates,0,this.coordinates.length,2,i,this.pixelCoordinates_),(0,te.k3)(this.renderedTransform_,i));let c=0;const d=n.length;let u=0,f,g,m,p,v,y,w,R,L,D,b,N,Z=0,q=0,he=null,le=null;const Q=this.coordinateCache_,me=this.viewRotation_,J=Math.round(Math.atan2(-i[1],i[0])*1e12)/1e12,Y={context:e,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:me},U=this.instructions!=n||this.overlaps?0:200;let H,pe,we,ke;for(;c<d;){const B=n[c];switch(B[0]){case re.BEGIN_GEOMETRY:H=B[1],ke=B[3],H.getGeometry()?a!==void 0&&!(0,T.HY)(a,ke.getExtent())?c=B[2]+1:++c:c=B[2];break;case re.BEGIN_PATH:Z>U&&(this.fill_(e),Z=0),q>U&&(e.stroke(),q=0),!Z&&!q&&(e.beginPath(),p=NaN,v=NaN),++c;break;case re.CIRCLE:u=B[1];const Ce=h[u],Le=h[u+1],ri=h[u+2],kt=h[u+3],Ve=ri-Ce,Yt=kt-Le,Wi=Math.sqrt(Ve*Ve+Yt*Yt);e.moveTo(Ce+Wi,Le),e.arc(Ce,Le,Wi,0,2*Math.PI,!0),++c;break;case re.CLOSE_PATH:e.closePath(),++c;break;case re.CUSTOM:u=B[1],f=B[2];const Jn=B[3],Ui=B[4],$n=B.length==6?B[5]:void 0;Y.geometry=Jn,Y.feature=H,c in Q||(Q[c]=[]);const oi=Q[c];$n?$n(h,u,f,2,oi):(oi[0]=h[u],oi[1]=h[u+1],oi.length=2),Ui(oi,Y),++c;break;case re.DRAW_IMAGE:u=B[1],f=B[2],R=B[3],g=B[4],m=B[5];let fn=B[6];const ai=B[7],qn=B[8],Qn=B[9],es=B[10];let Yi=B[11];const sr=B[12];let ot=B[13];const vt=B[14],bt=B[15];if(!R&&B.length>=20){L=B[19],D=B[20],b=B[21],N=B[22];const dt=this.drawLabelWithPointPlacement_(L,D,b,N);R=dt.label,B[3]=R;const ji=B[23];g=(dt.anchorX-ji)*this.pixelRatio,B[4]=g;const Et=B[24];m=(dt.anchorY-Et)*this.pixelRatio,B[5]=m,fn=R.height,B[6]=fn,ot=R.width,B[13]=ot}let Xt;B.length>25&&(Xt=B[25]);let Xi,Ei,li;B.length>17?(Xi=B[16],Ei=B[17],li=B[18]):(Xi=V.Tq,Ei=!1,li=!1),es&&J?Yi+=me:!es&&!J&&(Yi-=me);let Vi=0;for(;u<f;u+=2){if(Xt&&Xt[Vi++]<ot/this.pixelRatio)continue;const dt=this.calculateImageOrLabelDimensions_(R.width,R.height,h[u],h[u+1],ot,fn,g,m,qn,Qn,Yi,sr,s,Xi,Ei||li,H),ji=[e,t,R,dt,ai,Ei?he:null,li?le:null];if(l){if(vt==="none")continue;if(vt==="obstacle"){l.insert(dt.declutterBox);continue}else{let Et,Vt;if(bt){const ft=f-u;if(!bt[ft]){bt[ft]=ji;continue}if(Et=bt[ft],delete bt[ft],Vt=Ir(Et),l.collides(Vt))continue}if(l.collides(dt.declutterBox))continue;Et&&(l.insert(Vt),this.replayImageOrLabel_.apply(this,Et)),l.insert(dt.declutterBox)}}this.replayImageOrLabel_.apply(this,ji)}++c;break;case re.DRAW_CHARS:const ts=B[1],et=B[2],rr=B[3],xu=B[4];N=B[5];const yu=B[6],sa=B[7],ra=B[8];b=B[9];const or=B[10];L=B[11],D=B[12];const oa=[B[13],B[13]],ar=this.textStates[D],gn=ar.font,mn=[ar.scale[0]*sa,ar.scale[1]*sa];let pn;gn in this.widths_?pn=this.widths_[gn]:(pn={},this.widths_[gn]=pn);const aa=(0,Na.k)(h,ts,et,2),la=Math.abs(mn[0])*(0,V.TA)(gn,L,pn);if(xu||la<=aa){const dt=this.textStates[D].textAlign,ji=(aa-la)*Qi[dt],Et=Ga(h,ts,et,2,L,ji,yu,Math.abs(mn[0]),V.TA,gn,pn,J?0:this.viewRotation_);e:if(Et){const Vt=[];let ft,is,ns,at,wt;if(b)for(ft=0,is=Et.length;ft<is;++ft){wt=Et[ft],ns=wt[4],at=this.createLabel(ns,D,"",b),g=wt[2]+(mn[0]<0?-or:or),m=rr*at.height+(.5-rr)*2*or*mn[1]/mn[0]-ra;const jt=this.calculateImageOrLabelDimensions_(at.width,at.height,wt[0],wt[1],at.width,at.height,g,m,0,0,wt[3],oa,!1,V.Tq,!1,H);if(l&&l.collides(jt.declutterBox))break e;Vt.push([e,t,at,jt,1,null,null])}if(N)for(ft=0,is=Et.length;ft<is;++ft){wt=Et[ft],ns=wt[4],at=this.createLabel(ns,D,N,""),g=wt[2],m=rr*at.height-ra;const jt=this.calculateImageOrLabelDimensions_(at.width,at.height,wt[0],wt[1],at.width,at.height,g,m,0,0,wt[3],oa,!1,V.Tq,!1,H);if(l&&l.collides(jt.declutterBox))break e;Vt.push([e,t,at,jt,1,null,null])}l&&l.load(Vt.map(Ir));for(let jt=0,vu=Vt.length;jt<vu;++jt)this.replayImageOrLabel_.apply(this,Vt[jt])}}++c;break;case re.END_GEOMETRY:if(o!==void 0){H=B[1];const dt=o(H,ke);if(dt)return dt}++c;break;case re.FILL:U?Z++:this.fill_(e),++c;break;case re.MOVE_TO_LINE_TO:for(u=B[1],f=B[2],pe=h[u],we=h[u+1],y=pe+.5|0,w=we+.5|0,(y!==p||w!==v)&&(e.moveTo(pe,we),p=y,v=w),u+=2;u<f;u+=2)pe=h[u],we=h[u+1],y=pe+.5|0,w=we+.5|0,(u==f-2||y!==p||w!==v)&&(e.lineTo(pe,we),p=y,v=w);++c;break;case re.SET_FILL_STYLE:he=B,this.alignFill_=B[2],Z&&(this.fill_(e),Z=0,q&&(e.stroke(),q=0)),e.fillStyle=B[1],++c;break;case re.SET_STROKE_STYLE:le=B,q&&(e.stroke(),q=0),this.setStrokeStyle_(e,B),++c;break;case re.STROKE:U?q++:e.stroke(),++c;break;default:++c;break}}Z&&this.fill_(e),q&&e.stroke()}execute(e,t,i,n,s,o){this.viewRotation_=n,this.execute_(e,t,i,this.instructions,s,void 0,void 0,o)}executeHitDetection(e,t,i,n,s){return this.viewRotation_=i,this.execute_(e,1,t,this.hitDetectionInstructions,!0,n,s)}}const Xa=Ya,ys=["Polygon","Circle","LineString","Image","Text","Default"];class Va{constructor(e,t,i,n,s,o){this.maxExtent_=e,this.overlaps_=n,this.pixelRatio_=i,this.resolution_=t,this.renderBuffer_=o,this.executorsByZIndex_={},this.hitDetectionContext_=null,this.hitDetectionTransform_=(0,te.vt)(),this.createExecutors_(s)}clip(e,t){const i=this.getClipCoords(t);e.beginPath(),e.moveTo(i[0],i[1]),e.lineTo(i[2],i[3]),e.lineTo(i[4],i[5]),e.lineTo(i[6],i[7]),e.clip()}createExecutors_(e){for(const t in e){let i=this.executorsByZIndex_[t];i===void 0&&(i={},this.executorsByZIndex_[t]=i);const n=e[t];for(const s in n){const o=n[s];i[s]=new Xa(this.resolution_,this.pixelRatio_,this.overlaps_,o)}}}hasExecutors(e){for(const t in this.executorsByZIndex_){const i=this.executorsByZIndex_[t];for(let n=0,s=e.length;n<s;++n)if(e[n]in i)return!0}return!1}forEachFeatureAtCoordinate(e,t,i,n,s,o){n=Math.round(n);const a=n*2+1,l=(0,te.Zz)(this.hitDetectionTransform_,n+.5,n+.5,1/t,-1/t,-i,-e[0],-e[1]),h=!this.hitDetectionContext_;h&&(this.hitDetectionContext_=(0,Ge.Y)(a,a,void 0,{willReadFrequently:!0}));const c=this.hitDetectionContext_;c.canvas.width!==a||c.canvas.height!==a?(c.canvas.width=a,c.canvas.height=a):h||c.clearRect(0,0,a,a);let d;this.renderBuffer_!==void 0&&(d=(0,T.S5)(),(0,T.$C)(d,e),(0,T.r)(d,t*(this.renderBuffer_+n),d));const u=ja(n);let f;function g(L,D){const b=c.getImageData(0,0,a,a).data;for(let N=0,Z=u.length;N<Z;N++)if(b[u[N]]>0){if(!o||f!=="Image"&&f!=="Text"||o.includes(L)){const q=(u[N]-3)/4,he=n-q%a,le=n-(q/a|0),Q=s(L,D,he*he+le*le);if(Q)return Q}c.clearRect(0,0,a,a);break}}const m=Object.keys(this.executorsByZIndex_).map(Number);m.sort($e.V_);let p,v,y,w,R;for(p=m.length-1;p>=0;--p){const L=m[p].toString();for(y=this.executorsByZIndex_[L],v=ys.length-1;v>=0;--v)if(f=ys[v],w=y[f],w!==void 0&&(R=w.executeHitDetection(c,l,i,g,d),R))return R}}getClipCoords(e){const t=this.maxExtent_;if(!t)return null;const i=t[0],n=t[1],s=t[2],o=t[3],a=[i,n,i,o,s,o,s,n];return(0,pi.Rc)(a,0,8,2,e,a),a}isEmpty(){return(0,Zi.p)(this.executorsByZIndex_)}execute(e,t,i,n,s,o,a){const l=Object.keys(this.executorsByZIndex_).map(Number);l.sort($e.V_),this.maxExtent_&&(e.save(),this.clip(e,i)),o=o||ys;let h,c,d,u,f,g;for(a&&l.reverse(),h=0,c=l.length;h<c;++h){const m=l[h].toString();for(f=this.executorsByZIndex_[m],d=0,u=o.length;d<u;++d){const p=o[d];g=f[p],g!==void 0&&g.execute(e,t,i,n,s,a)}}this.maxExtent_&&e.restore()}}const vs={};function ja(r){if(vs[r]!==void 0)return vs[r];const e=r*2+1,t=r*r,i=new Array(t+1);for(let s=0;s<=r;++s)for(let o=0;o<=r;++o){const a=s*s+o*o;if(a>t)break;let l=i[a];l||(l=[],i[a]=l),l.push(((r+s)*e+(r+o))*4+3),s>0&&l.push(((r-s)*e+(r+o))*4+3),o>0&&(l.push(((r+s)*e+(r-o))*4+3),s>0&&l.push(((r-s)*e+(r-o))*4+3))}const n=[];for(let s=0,o=i.length;s<o;++s)i[s]&&n.push(...i[s]);return vs[r]=n,n}const Ar=Va;var Ii=C(62703),Ri=C(62096);class Za extends vr{constructor(e,t,i,n,s,o,a){super(),this.context_=e,this.pixelRatio_=t,this.extent_=i,this.transform_=n,this.transformRotation_=n?(0,xe.Mg)(Math.atan2(n[1],n[0]),10):0,this.viewRotation_=s,this.squaredTolerance_=o,this.userTransform_=a,this.contextFillState_=null,this.contextStrokeState_=null,this.contextTextState_=null,this.fillState_=null,this.strokeState_=null,this.image_=null,this.imageAnchorX_=0,this.imageAnchorY_=0,this.imageHeight_=0,this.imageOpacity_=0,this.imageOriginX_=0,this.imageOriginY_=0,this.imageRotateWithView_=!1,this.imageRotation_=0,this.imageScale_=[0,0],this.imageWidth_=0,this.text_="",this.textOffsetX_=0,this.textOffsetY_=0,this.textRotateWithView_=!1,this.textRotation_=0,this.textScale_=[0,0],this.textFillState_=null,this.textStrokeState_=null,this.textState_=null,this.pixelCoordinates_=[],this.tmpLocalTransform_=(0,te.vt)()}drawImages_(e,t,i,n){if(!this.image_)return;const s=(0,pi.Rc)(e,t,i,n,this.transform_,this.pixelCoordinates_),o=this.context_,a=this.tmpLocalTransform_,l=o.globalAlpha;this.imageOpacity_!=1&&(o.globalAlpha=l*this.imageOpacity_);let h=this.imageRotation_;this.transformRotation_===0&&(h-=this.viewRotation_),this.imageRotateWithView_&&(h+=this.viewRotation_);for(let c=0,d=s.length;c<d;c+=2){const u=s[c]-this.imageAnchorX_,f=s[c+1]-this.imageAnchorY_;if(h!==0||this.imageScale_[0]!=1||this.imageScale_[1]!=1){const g=u+this.imageAnchorX_,m=f+this.imageAnchorY_;(0,te.Zz)(a,g,m,1,1,h,-g,-m),o.setTransform.apply(o,a),o.translate(g,m),o.scale(this.imageScale_[0],this.imageScale_[1]),o.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,-this.imageAnchorX_,-this.imageAnchorY_,this.imageWidth_,this.imageHeight_),o.setTransform(1,0,0,1,0,0)}else o.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,u,f,this.imageWidth_,this.imageHeight_)}this.imageOpacity_!=1&&(o.globalAlpha=l)}drawText_(e,t,i,n){if(!this.textState_||this.text_==="")return;this.textFillState_&&this.setContextFillState_(this.textFillState_),this.textStrokeState_&&this.setContextStrokeState_(this.textStrokeState_),this.setContextTextState_(this.textState_);const s=(0,pi.Rc)(e,t,i,n,this.transform_,this.pixelCoordinates_),o=this.context_;let a=this.textRotation_;for(this.transformRotation_===0&&(a-=this.viewRotation_),this.textRotateWithView_&&(a+=this.viewRotation_);t<i;t+=n){const l=s[t]+this.textOffsetX_,h=s[t+1]+this.textOffsetY_;a!==0||this.textScale_[0]!=1||this.textScale_[1]!=1?(o.translate(l-this.textOffsetX_,h-this.textOffsetY_),o.rotate(a),o.translate(this.textOffsetX_,this.textOffsetY_),o.scale(this.textScale_[0],this.textScale_[1]),this.textStrokeState_&&o.strokeText(this.text_,0,0),this.textFillState_&&o.fillText(this.text_,0,0),o.setTransform(1,0,0,1,0,0)):(this.textStrokeState_&&o.strokeText(this.text_,l,h),this.textFillState_&&o.fillText(this.text_,l,h))}}moveToLineTo_(e,t,i,n,s){const o=this.context_,a=(0,pi.Rc)(e,t,i,n,this.transform_,this.pixelCoordinates_);o.moveTo(a[0],a[1]);let l=a.length;s&&(l-=2);for(let h=2;h<l;h+=2)o.lineTo(a[h],a[h+1]);return s&&o.closePath(),i}drawRings_(e,t,i,n){for(let s=0,o=i.length;s<o;++s)t=this.moveToLineTo_(e,t,i[s],n,!0);return t}drawCircle(e){if(this.squaredTolerance_&&(e=e.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),!!(0,T.HY)(this.extent_,e.getExtent())){if(this.fillState_||this.strokeState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);const t=(0,Ri.v7)(e,this.transform_,this.pixelCoordinates_),i=t[2]-t[0],n=t[3]-t[1],s=Math.sqrt(i*i+n*n),o=this.context_;o.beginPath(),o.arc(t[0],t[1],s,0,2*Math.PI),this.fillState_&&o.fill(),this.strokeState_&&o.stroke()}this.text_!==""&&this.drawText_(e.getCenter(),0,2,2)}}setStyle(e){this.setFillStrokeStyle(e.getFill(),e.getStroke()),this.setImageStyle(e.getImage()),this.setTextStyle(e.getText())}setTransform(e){this.transform_=e}drawGeometry(e){switch(e.getType()){case"Point":this.drawPoint(e);break;case"LineString":this.drawLineString(e);break;case"Polygon":this.drawPolygon(e);break;case"MultiPoint":this.drawMultiPoint(e);break;case"MultiLineString":this.drawMultiLineString(e);break;case"MultiPolygon":this.drawMultiPolygon(e);break;case"GeometryCollection":this.drawGeometryCollection(e);break;case"Circle":this.drawCircle(e);break;default:}}drawFeature(e,t){const i=t.getGeometryFunction()(e);i&&(this.setStyle(t),this.drawGeometry(i))}drawGeometryCollection(e){const t=e.getGeometriesArray();for(let i=0,n=t.length;i<n;++i)this.drawGeometry(t[i])}drawPoint(e){this.squaredTolerance_&&(e=e.simplifyTransformed(this.squaredTolerance_,this.userTransform_));const t=e.getFlatCoordinates(),i=e.getStride();this.image_&&this.drawImages_(t,0,t.length,i),this.text_!==""&&this.drawText_(t,0,t.length,i)}drawMultiPoint(e){this.squaredTolerance_&&(e=e.simplifyTransformed(this.squaredTolerance_,this.userTransform_));const t=e.getFlatCoordinates(),i=e.getStride();this.image_&&this.drawImages_(t,0,t.length,i),this.text_!==""&&this.drawText_(t,0,t.length,i)}drawLineString(e){if(this.squaredTolerance_&&(e=e.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),!!(0,T.HY)(this.extent_,e.getExtent())){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);const t=this.context_,i=e.getFlatCoordinates();t.beginPath(),this.moveToLineTo_(i,0,i.length,e.getStride(),!1),t.stroke()}if(this.text_!==""){const t=e.getFlatMidpoint();this.drawText_(t,0,2,2)}}}drawMultiLineString(e){this.squaredTolerance_&&(e=e.simplifyTransformed(this.squaredTolerance_,this.userTransform_));const t=e.getExtent();if((0,T.HY)(this.extent_,t)){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);const i=this.context_,n=e.getFlatCoordinates();let s=0;const o=e.getEnds(),a=e.getStride();i.beginPath();for(let l=0,h=o.length;l<h;++l)s=this.moveToLineTo_(n,s,o[l],a,!1);i.stroke()}if(this.text_!==""){const i=e.getFlatMidpoints();this.drawText_(i,0,i.length,2)}}}drawPolygon(e){if(this.squaredTolerance_&&(e=e.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),!!(0,T.HY)(this.extent_,e.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);const t=this.context_;t.beginPath(),this.drawRings_(e.getOrientedFlatCoordinates(),0,e.getEnds(),e.getStride()),this.fillState_&&t.fill(),this.strokeState_&&t.stroke()}if(this.text_!==""){const t=e.getFlatInteriorPoint();this.drawText_(t,0,2,2)}}}drawMultiPolygon(e){if(this.squaredTolerance_&&(e=e.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),!!(0,T.HY)(this.extent_,e.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);const t=this.context_,i=e.getOrientedFlatCoordinates();let n=0;const s=e.getEndss(),o=e.getStride();t.beginPath();for(let a=0,l=s.length;a<l;++a){const h=s[a];n=this.drawRings_(i,n,h,o)}this.fillState_&&t.fill(),this.strokeState_&&t.stroke()}if(this.text_!==""){const t=e.getFlatInteriorPoints();this.drawText_(t,0,t.length,2)}}}setContextFillState_(e){const t=this.context_,i=this.contextFillState_;i?i.fillStyle!=e.fillStyle&&(i.fillStyle=e.fillStyle,t.fillStyle=e.fillStyle):(t.fillStyle=e.fillStyle,this.contextFillState_={fillStyle:e.fillStyle})}setContextStrokeState_(e){const t=this.context_,i=this.contextStrokeState_;i?(i.lineCap!=e.lineCap&&(i.lineCap=e.lineCap,t.lineCap=e.lineCap),(0,$e.aI)(i.lineDash,e.lineDash)||t.setLineDash(i.lineDash=e.lineDash),i.lineDashOffset!=e.lineDashOffset&&(i.lineDashOffset=e.lineDashOffset,t.lineDashOffset=e.lineDashOffset),i.lineJoin!=e.lineJoin&&(i.lineJoin=e.lineJoin,t.lineJoin=e.lineJoin),i.lineWidth!=e.lineWidth&&(i.lineWidth=e.lineWidth,t.lineWidth=e.lineWidth),i.miterLimit!=e.miterLimit&&(i.miterLimit=e.miterLimit,t.miterLimit=e.miterLimit),i.strokeStyle!=e.strokeStyle&&(i.strokeStyle=e.strokeStyle,t.strokeStyle=e.strokeStyle)):(t.lineCap=e.lineCap,t.setLineDash(e.lineDash),t.lineDashOffset=e.lineDashOffset,t.lineJoin=e.lineJoin,t.lineWidth=e.lineWidth,t.miterLimit=e.miterLimit,t.strokeStyle=e.strokeStyle,this.contextStrokeState_={lineCap:e.lineCap,lineDash:e.lineDash,lineDashOffset:e.lineDashOffset,lineJoin:e.lineJoin,lineWidth:e.lineWidth,miterLimit:e.miterLimit,strokeStyle:e.strokeStyle})}setContextTextState_(e){const t=this.context_,i=this.contextTextState_,n=e.textAlign?e.textAlign:V.MY;i?(i.font!=e.font&&(i.font=e.font,t.font=e.font),i.textAlign!=n&&(i.textAlign=n,t.textAlign=n),i.textBaseline!=e.textBaseline&&(i.textBaseline=e.textBaseline,t.textBaseline=e.textBaseline)):(t.font=e.font,t.textAlign=n,t.textBaseline=e.textBaseline,this.contextTextState_={font:e.font,textAlign:n,textBaseline:e.textBaseline})}setFillStrokeStyle(e,t){if(!e)this.fillState_=null;else{const i=e.getColor();this.fillState_={fillStyle:Mt(i||V.qY)}}if(!t)this.strokeState_=null;else{const i=t.getColor(),n=t.getLineCap(),s=t.getLineDash(),o=t.getLineDashOffset(),a=t.getLineJoin(),l=t.getWidth(),h=t.getMiterLimit(),c=s||V.Oq;this.strokeState_={lineCap:n!==void 0?n:V._m,lineDash:this.pixelRatio_===1?c:c.map(d=>d*this.pixelRatio_),lineDashOffset:(o||V.vk)*this.pixelRatio_,lineJoin:a!==void 0?a:V._K,lineWidth:(l!==void 0?l:V.aq)*this.pixelRatio_,miterLimit:h!==void 0?h:V.eL,strokeStyle:Mt(i||V.NT)}}}setImageStyle(e){let t;if(!e||!(t=e.getSize())){this.image_=null;return}const i=e.getPixelRatio(this.pixelRatio_),n=e.getAnchor(),s=e.getOrigin();this.image_=e.getImage(this.pixelRatio_),this.imageAnchorX_=n[0]*i,this.imageAnchorY_=n[1]*i,this.imageHeight_=t[1]*i,this.imageOpacity_=e.getOpacity(),this.imageOriginX_=s[0],this.imageOriginY_=s[1],this.imageRotateWithView_=e.getRotateWithView(),this.imageRotation_=e.getRotation();const o=e.getScaleArray();this.imageScale_=[o[0]*this.pixelRatio_/i,o[1]*this.pixelRatio_/i],this.imageWidth_=t[0]*i}setTextStyle(e){if(!e)this.text_="";else{const t=e.getFill();if(!t)this.textFillState_=null;else{const f=t.getColor();this.textFillState_={fillStyle:Mt(f||V.qY)}}const i=e.getStroke();if(!i)this.textStrokeState_=null;else{const f=i.getColor(),g=i.getLineCap(),m=i.getLineDash(),p=i.getLineDashOffset(),v=i.getLineJoin(),y=i.getWidth(),w=i.getMiterLimit();this.textStrokeState_={lineCap:g!==void 0?g:V._m,lineDash:m||V.Oq,lineDashOffset:p||V.vk,lineJoin:v!==void 0?v:V._K,lineWidth:y!==void 0?y:V.aq,miterLimit:w!==void 0?w:V.eL,strokeStyle:Mt(f||V.NT)}}const n=e.getFont(),s=e.getOffsetX(),o=e.getOffsetY(),a=e.getRotateWithView(),l=e.getRotation(),h=e.getScaleArray(),c=e.getText(),d=e.getTextAlign(),u=e.getTextBaseline();this.textState_={font:n!==void 0?n:V.ZV,textAlign:d!==void 0?d:V.MY,textBaseline:u!==void 0?u:V.M8},this.text_=c!==void 0?Array.isArray(c)?c.reduce((f,g,m)=>f+=m%2?" ":g,""):c:"",this.textOffsetX_=s!==void 0?this.pixelRatio_*s:0,this.textOffsetY_=o!==void 0?this.pixelRatio_*o:0,this.textRotateWithView_=a!==void 0?a:!1,this.textRotation_=l!==void 0?l:0,this.textScale_=[this.pixelRatio_*h[0],this.pixelRatio_*h[1]]}}}const Ha=Za,Ft=.5;function Ka(r,e,t,i,n,s,o){const a=r[0]*Ft,l=r[1]*Ft,h=(0,Ge.Y)(a,l);h.imageSmoothingEnabled=!1;const c=h.canvas,d=new Ha(h,Ft,n,null,o),u=t.length,f=Math.floor((256*256*256-1)/u),g={};for(let p=1;p<=u;++p){const v=t[p-1],y=v.getStyleFunction()||i;if(!i)continue;let w=y(v,s);if(!w)continue;Array.isArray(w)||(w=[w]);const L=(p*f).toString(16).padStart(7,"#00000");for(let D=0,b=w.length;D<b;++D){const N=w[D],Z=N.getGeometryFunction()(v);if(!Z||!(0,T.HY)(n,Z.getExtent()))continue;const q=N.clone(),he=q.getFill();he&&he.setColor(L);const le=q.getStroke();le&&(le.setColor(L),le.setLineDash(null)),q.setText(void 0);const Q=N.getImage();if(Q&&Q.getOpacity()!==0){const U=Q.getImageSize();if(!U)continue;const H=(0,Ge.Y)(U[0],U[1],void 0,{alpha:!1}),pe=H.canvas;H.fillStyle=L,H.fillRect(0,0,pe.width,pe.height),q.setImage(new wn({img:pe,imgSize:U,anchor:Q.getAnchor(),anchorXUnits:"pixels",anchorYUnits:"pixels",offset:Q.getOrigin(),opacity:1,size:Q.getSize(),scale:Q.getScale(),rotation:Q.getRotation(),rotateWithView:Q.getRotateWithView()}))}const me=q.getZIndex()||0;let J=g[me];J||(J={},g[me]=J,J.Polygon=[],J.Circle=[],J.LineString=[],J.Point=[]);const Y=Z.getType();if(Y==="GeometryCollection"){const U=Z.getGeometriesArrayRecursive();for(let H=0,pe=U.length;H<pe;++H){const we=U[H];J[we.getType().replace("Multi","")].push(we,q)}}else J[Y.replace("Multi","")].push(Z,q)}}const m=Object.keys(g).map(Number).sort($e.V_);for(let p=0,v=m.length;p<v;++p){const y=g[m[p]];for(const w in y){const R=y[w];for(let L=0,D=R.length;L<D;L+=2){d.setStyle(R[L+1]);for(let b=0,N=e.length;b<N;++b)d.setTransform(e[b]),d.drawGeometry(R[L])}}}return h.getImageData(0,0,c.width,c.height)}function Ja(r,e,t){const i=[];if(t){const n=Math.floor(Math.round(r[0])*Ft),s=Math.floor(Math.round(r[1])*Ft),o=((0,xe.qE)(n,0,t.width-1)+(0,xe.qE)(s,0,t.height-1)*t.width)*4,a=t.data[o],l=t.data[o+1],c=t.data[o+2]+256*(l+256*a),d=Math.floor((256*256*256-1)/e.length);c&&c%d===0&&i.push(e[c/d-1])}return i}const $a=.5,br={Point:ol,LineString:nl,Polygon:ll,MultiPoint:al,MultiLineString:sl,MultiPolygon:rl,GeometryCollection:il,Circle:el};function qa(r,e){return parseInt((0,$.v6)(r),10)-parseInt((0,$.v6)(e),10)}function Qa(r,e){const t=Es(r,e);return t*t}function Es(r,e){return $a*r/e}function el(r,e,t,i,n){const s=t.getFill(),o=t.getStroke();if(s||o){const l=r.getBuilder(t.getZIndex(),"Circle");l.setFillStrokeStyle(s,o),l.drawCircle(e,i)}const a=t.getText();if(a&&a.getText()){const l=(n||r).getBuilder(t.getZIndex(),"Text");l.setTextStyle(a),l.drawText(e,i)}}function Lr(r,e,t,i,n,s,o){let a=!1;const l=t.getImage();if(l){const h=l.getImageState();h==Se.LOADED||h==Se.ERROR?l.unlistenImageChange(n):(h==Se.IDLE&&l.load(),l.listenImageChange(n),a=!0)}return tl(r,e,t,i,s,o),a}function tl(r,e,t,i,n,s){const o=t.getGeometryFunction()(e);if(!o)return;const a=o.simplifyTransformed(i,n);if(t.getRenderer())Mr(r,a,t,e);else{const h=br[a.getType()];h(r,a,t,e,s)}}function Mr(r,e,t,i){if(e.getType()=="GeometryCollection"){const s=e.getGeometries();for(let o=0,a=s.length;o<a;++o)Mr(r,s[o],t,i);return}r.getBuilder(t.getZIndex(),"Default").drawCustom(e,i,t.getRenderer(),t.getHitDetectionRenderer())}function il(r,e,t,i,n){const s=e.getGeometriesArray();let o,a;for(o=0,a=s.length;o<a;++o){const l=br[s[o].getType()];l(r,s[o],t,i,n)}}function nl(r,e,t,i,n){const s=t.getStroke();if(s){const a=r.getBuilder(t.getZIndex(),"LineString");a.setFillStrokeStyle(null,s),a.drawLineString(e,i)}const o=t.getText();if(o&&o.getText()){const a=(n||r).getBuilder(t.getZIndex(),"Text");a.setTextStyle(o),a.drawText(e,i)}}function sl(r,e,t,i,n){const s=t.getStroke();if(s){const a=r.getBuilder(t.getZIndex(),"LineString");a.setFillStrokeStyle(null,s),a.drawMultiLineString(e,i)}const o=t.getText();if(o&&o.getText()){const a=(n||r).getBuilder(t.getZIndex(),"Text");a.setTextStyle(o),a.drawText(e,i)}}function rl(r,e,t,i,n){const s=t.getFill(),o=t.getStroke();if(o||s){const l=r.getBuilder(t.getZIndex(),"Polygon");l.setFillStrokeStyle(s,o),l.drawMultiPolygon(e,i)}const a=t.getText();if(a&&a.getText()){const l=(n||r).getBuilder(t.getZIndex(),"Text");l.setTextStyle(a),l.drawText(e,i)}}function ol(r,e,t,i,n){const s=t.getImage(),o=t.getText();let a;if(s){if(s.getImageState()!=Se.LOADED)return;let l=r;if(n){const c=s.getDeclutterMode();if(c!=="none")if(l=n,c==="obstacle"){const d=r.getBuilder(t.getZIndex(),"Image");d.setImageStyle(s,a),d.drawPoint(e,i)}else o&&o.getText()&&(a={})}const h=l.getBuilder(t.getZIndex(),"Image");h.setImageStyle(s,a),h.drawPoint(e,i)}if(o&&o.getText()){let l=r;n&&(l=n);const h=l.getBuilder(t.getZIndex(),"Text");h.setTextStyle(o,a),h.drawText(e,i)}}function al(r,e,t,i,n){const s=t.getImage(),o=t.getText();let a;if(s){if(s.getImageState()!=Se.LOADED)return;let l=r;if(n){const c=s.getDeclutterMode();if(c!=="none")if(l=n,c==="obstacle"){const d=r.getBuilder(t.getZIndex(),"Image");d.setImageStyle(s,a),d.drawMultiPoint(e,i)}else o&&o.getText()&&(a={})}const h=l.getBuilder(t.getZIndex(),"Image");h.setImageStyle(s,a),h.drawMultiPoint(e,i)}if(o&&o.getText()){let l=r;n&&(l=n);const h=l.getBuilder(t.getZIndex(),"Text");h.setTextStyle(o,a),h.drawText(e,i)}}function ll(r,e,t,i,n){const s=t.getFill(),o=t.getStroke();if(s||o){const l=r.getBuilder(t.getZIndex(),"Polygon");l.setFillStrokeStyle(s,o),l.drawPolygon(e,i)}const a=t.getText();if(a&&a.getText()){const l=(n||r).getBuilder(t.getZIndex(),"Text");l.setTextStyle(a),l.drawText(e,i)}}var Ye=C(6933);class hl extends Sr{constructor(e){super(e),this.boundHandleStyleImageChange_=this.handleStyleImageChange_.bind(this),this.animatingOrInteracting_,this.hitDetectionImageData_=null,this.renderedFeatures_=null,this.renderedRevision_=-1,this.renderedResolution_=NaN,this.renderedExtent_=(0,T.S5)(),this.wrappedRenderedExtent_=(0,T.S5)(),this.renderedRotation_,this.renderedCenter_=null,this.renderedProjection_=null,this.renderedRenderOrder_=null,this.replayGroup_=null,this.replayGroupChanged=!0,this.declutterExecutorGroup=null,this.clipping=!0,this.compositionContext_=null,this.opacity_=1}renderWorlds(e,t,i){const n=t.extent,s=t.viewState,o=s.center,a=s.resolution,l=s.projection,h=s.rotation,c=l.getExtent(),d=this.getLayer().getSource(),u=t.pixelRatio,f=t.viewHints,g=!(f[Ii.A.ANIMATING]||f[Ii.A.INTERACTING]),m=this.compositionContext_,p=Math.round(t.size[0]*u),v=Math.round(t.size[1]*u),y=d.getWrapX()&&l.canWrapX(),w=y?(0,T.RG)(c):null,R=y?Math.ceil((n[2]-c[2])/w)+1:1;let L=y?Math.floor((n[0]-c[0])/w):0;do{const D=this.getRenderTransform(o,a,h,u,p,v,L*w);e.execute(m,1,D,h,g,void 0,i)}while(++L<R)}setupCompositionContext_(){if(this.opacity_!==1){const e=(0,Ge.Y)(this.context.canvas.width,this.context.canvas.height,Cr);this.compositionContext_=e}else this.compositionContext_=this.context}releaseCompositionContext_(){if(this.opacity_!==1){const e=this.context.globalAlpha;this.context.globalAlpha=this.opacity_,this.context.drawImage(this.compositionContext_.canvas,0,0),this.context.globalAlpha=e,(0,Ge.Yg)(this.compositionContext_),Cr.push(this.compositionContext_.canvas),this.compositionContext_=null}}renderDeclutter(e){this.declutterExecutorGroup&&(this.setupCompositionContext_(),this.renderWorlds(this.declutterExecutorGroup,e,e.declutterTree),this.releaseCompositionContext_())}renderFrame(e,t){const i=e.pixelRatio,n=e.layerStatesArray[e.layerIndex];(0,te.rQ)(this.pixelTransform,1/i,1/i),(0,te.T9)(this.inversePixelTransform,this.pixelTransform);const s=(0,te.dI)(this.pixelTransform);this.useContainer(t,s,this.getBackground(e));const o=this.context,a=o.canvas,l=this.replayGroup_,h=this.declutterExecutorGroup;if((!l||l.isEmpty())&&(!h||h.isEmpty()))return null;const c=Math.round(e.size[0]*i),d=Math.round(e.size[1]*i);a.width!=c||a.height!=d?(a.width=c,a.height=d,a.style.transform!==s&&(a.style.transform=s)):this.containerReused||o.clearRect(0,0,c,d),this.preRender(o,e);const u=e.viewState,f=u.projection;this.opacity_=n.opacity,this.setupCompositionContext_();let g=!1,m=!0;if(n.extent&&this.clipping){const p=(0,X.SD)(n.extent,f);m=(0,T.HY)(p,e.extent),g=m&&!(0,T.ms)(p,e.extent),g&&this.clipUnrotated(this.compositionContext_,e,p)}return m&&this.renderWorlds(l,e),g&&this.compositionContext_.restore(),this.releaseCompositionContext_(),this.postRender(o,e),this.renderedRotation_!==u.rotation&&(this.renderedRotation_=u.rotation,this.hitDetectionImageData_=null),this.container}getFeatures(e){return new Promise(t=>{if(!this.hitDetectionImageData_&&!this.animatingOrInteracting_){const i=[this.context.canvas.width,this.context.canvas.height];(0,te.Bb)(this.pixelTransform,i);const n=this.renderedCenter_,s=this.renderedResolution_,o=this.renderedRotation_,a=this.renderedProjection_,l=this.wrappedRenderedExtent_,h=this.getLayer(),c=[],d=i[0]*Ft,u=i[1]*Ft;c.push(this.getRenderTransform(n,s,o,Ft,d,u,0).slice());const f=h.getSource(),g=a.getExtent();if(f.getWrapX()&&a.canWrapX()&&!(0,T.ms)(g,l)){let m=l[0];const p=(0,T.RG)(g);let v=0,y;for(;m<g[0];)--v,y=p*v,c.push(this.getRenderTransform(n,s,o,Ft,d,u,y).slice()),m+=p;for(v=0,m=l[2];m>g[2];)++v,y=p*v,c.push(this.getRenderTransform(n,s,o,Ft,d,u,y).slice()),m-=p}this.hitDetectionImageData_=Ka(i,c,this.renderedFeatures_,h.getStyleFunction(),l,s,o)}t(Ja(e,this.renderedFeatures_,this.hitDetectionImageData_))})}forEachFeatureAtCoordinate(e,t,i,n,s){if(!this.replayGroup_)return;const o=t.viewState.resolution,a=t.viewState.rotation,l=this.getLayer(),h={},c=function(f,g,m){const p=(0,$.v6)(f),v=h[p];if(v){if(v!==!0&&m<v.distanceSq){if(m===0)return h[p]=!0,s.splice(s.lastIndexOf(v),1),n(f,l,g);v.geometry=g,v.distanceSq=m}}else{if(m===0)return h[p]=!0,n(f,l,g);s.push(h[p]={feature:f,layer:l,geometry:g,distanceSq:m,callback:n})}};let d;const u=[this.replayGroup_];return this.declutterExecutorGroup&&u.push(this.declutterExecutorGroup),u.some(f=>d=f.forEachFeatureAtCoordinate(e,o,a,i,c,f===this.declutterExecutorGroup&&t.declutterTree?t.declutterTree.all().map(g=>g.value):null)),d}handleFontsChanged(){const e=this.getLayer();e.getVisible()&&this.replayGroup_&&e.changed()}handleStyleImageChange_(e){this.renderIfReadyAndVisible()}prepareFrame(e){const t=this.getLayer(),i=t.getSource();if(!i)return!1;const n=e.viewHints[Ii.A.ANIMATING],s=e.viewHints[Ii.A.INTERACTING],o=t.getUpdateWhileAnimating(),a=t.getUpdateWhileInteracting();if(this.ready&&!o&&n||!a&&s)return this.animatingOrInteracting_=!0,!0;this.animatingOrInteracting_=!1;const l=e.extent,h=e.viewState,c=h.projection,d=h.resolution,u=e.pixelRatio,f=t.getRevision(),g=t.getRenderBuffer();let m=t.getRenderOrder();m===void 0&&(m=qa);const p=h.center.slice(),v=(0,T.r)(l,g*d),y=v.slice(),w=[v.slice()],R=c.getExtent();if(i.getWrapX()&&c.canWrapX()&&!(0,T.ms)(R,e.extent)){const Y=(0,T.RG)(R),U=Math.max((0,T.RG)(v)/2,Y);v[0]=R[0]-U,v[2]=R[2]+U,(0,Ye.Li)(p,c);const H=(0,T.Li)(w[0],c);H[0]<R[0]&&H[2]<R[2]?w.push([H[0]+Y,H[1],H[2]+Y,H[3]]):H[0]>R[0]&&H[2]>R[2]&&w.push([H[0]-Y,H[1],H[2]-Y,H[3]])}if(this.ready&&this.renderedResolution_==d&&this.renderedRevision_==f&&this.renderedRenderOrder_==m&&(0,T.ms)(this.wrappedRenderedExtent_,v))return(0,$e.aI)(this.renderedExtent_,y)||(this.hitDetectionImageData_=null,this.renderedExtent_=y),this.renderedCenter_=p,this.replayGroupChanged=!1,!0;this.replayGroup_=null;const L=new wr(Es(d,u),v,d,u);let D;this.getLayer().getDeclutter()&&(D=new wr(Es(d,u),v,d,u));const b=(0,X.Tf)();let N;if(b){for(let Y=0,U=w.length;Y<U;++Y){const H=w[Y],pe=(0,X.JR)(H,c);i.loadFeatures(pe,(0,X.vN)(d,c),b)}N=(0,X.FO)(b,c)}else for(let Y=0,U=w.length;Y<U;++Y)i.loadFeatures(w[Y],d,c);const Z=Qa(d,u);let q=!0;const he=Y=>{let U;const H=Y.getStyleFunction()||t.getStyleFunction();if(H&&(U=H(Y,d)),U){const pe=this.renderFeature(Y,Z,U,L,N,D);q=q&&!pe}},le=(0,X.JR)(v,c),Q=i.getFeaturesInExtent(le);m&&Q.sort(m);for(let Y=0,U=Q.length;Y<U;++Y)he(Q[Y]);this.renderedFeatures_=Q,this.ready=q;const me=L.finish(),J=new Ar(v,d,u,i.getOverlaps(),me,t.getRenderBuffer());return D&&(this.declutterExecutorGroup=new Ar(v,d,u,i.getOverlaps(),D.finish(),t.getRenderBuffer())),this.renderedResolution_=d,this.renderedRevision_=f,this.renderedRenderOrder_=m,this.renderedExtent_=y,this.wrappedRenderedExtent_=v,this.renderedCenter_=p,this.renderedProjection_=c,this.replayGroup_=J,this.hitDetectionImageData_=null,this.replayGroupChanged=!0,!0}renderFeature(e,t,i,n,s,o){if(!i)return!1;let a=!1;if(Array.isArray(i))for(let l=0,h=i.length;l<h;++l)a=Lr(n,e,i[l],t,this.boundHandleStyleImageChange_,s,o)||a;else a=Lr(n,e,i,t,this.boundHandleStyleImageChange_,s,o);return a}}const cl=hl;class ul extends _s{constructor(e){super(e)}createRenderer(){return new cl(this)}}const Oe=ul;var dl=C(28450),fl=C(34120);class gl extends fl.A{constructor(e){super(),this.projection=(0,X.Jt)(e.projection),this.attributions_=Fr(e.attributions),this.attributionsCollapsible_=e.attributionsCollapsible!==void 0?e.attributionsCollapsible:!0,this.loading=!1,this.state_=e.state!==void 0?e.state:"ready",this.wrapX_=e.wrapX!==void 0?e.wrapX:!1,this.interpolate_=!!e.interpolate,this.viewResolver=null,this.viewRejector=null;const t=this;this.viewPromise_=new Promise(function(i,n){t.viewResolver=i,t.viewRejector=n})}getAttributions(){return this.attributions_}getAttributionsCollapsible(){return this.attributionsCollapsible_}getProjection(){return this.projection}getResolutions(e){return null}getView(){return this.viewPromise_}getState(){return this.state_}getWrapX(){return this.wrapX_}getInterpolate(){return this.interpolate_}refresh(){this.changed()}setAttributions(e){this.attributions_=Fr(e),this.changed()}setState(e){this.state_=e,this.changed()}}function Fr(r){return r?Array.isArray(r)?function(e){return r}:typeof r=="function"?r:function(e){return[r]}:null}const Dr=gl;var en=C(74238);function Pr(r,e){return[[-1/0,-1/0,1/0,1/0]]}function Su(r,e){return[r]}function Iu(r){return function(e,t,i){const n=r.getZForResolution(fromUserResolution(t,i)),s=r.getTileRangeForExtentAndZ(fromUserExtent(e,i),n),o=[],a=[n,0,0];for(a[1]=s.minX;a[1]<=s.maxX;++a[1])for(a[2]=s.minY;a[2]<=s.maxY;++a[2])o.push(toUserExtent(r.getTileCoordExtent(a),i));return o}}let Or=!1;function ml(r,e,t,i,n,s,o){const a=new XMLHttpRequest;a.open("GET",typeof r=="function"?r(t,i,n):r,!0),e.getType()=="arraybuffer"&&(a.responseType="arraybuffer"),a.withCredentials=Or,a.onload=function(l){if(!a.status||a.status>=200&&a.status<300){const h=e.getType();let c;h=="json"||h=="text"?c=a.responseText:h=="xml"?(c=a.responseXML,c||(c=new DOMParser().parseFromString(a.responseText,"application/xml"))):h=="arraybuffer"&&(c=a.response),c?s(e.readFeatures(c,{extent:t,featureProjection:n}),e.readProjection(c)):o()}else o()},a.onerror=o,a.send()}function kr(r,e){return function(t,i,n,s,o){const a=this;ml(r,e,t,i,n,function(l,h){a.addFeatures(l),s!==void 0&&s(l)},o||en.tV)}}function Ru(r){Or=r}class Qt extends En.Ay{constructor(e,t,i){super(e),this.feature=t,this.features=i}}class pl extends Dr{constructor(e){e=e||{},super({attributions:e.attributions,interpolate:!0,projection:void 0,state:"ready",wrapX:e.wrapX!==void 0?e.wrapX:!0}),this.on,this.once,this.un,this.loader_=en.tV,this.format_=e.format,this.overlaps_=e.overlaps===void 0?!0:e.overlaps,this.url_=e.url,e.loader!==void 0?this.loader_=e.loader:this.url_!==void 0&&((0,ue.v)(this.format_,7),this.loader_=kr(this.url_,this.format_)),this.strategy_=e.strategy!==void 0?e.strategy:Pr;const t=e.useSpatialIndex!==void 0?e.useSpatialIndex:!0;this.featuresRtree_=t?new os:null,this.loadedExtentsRtree_=new os,this.loadingExtentsCount_=0,this.nullGeometryFeatures_={},this.idIndex_={},this.uidIndex_={},this.featureChangeKeys_={},this.featuresCollection_=null;let i,n;Array.isArray(e.features)?n=e.features:e.features&&(i=e.features,n=i.getArray()),!t&&i===void 0&&(i=new rs.A(n)),n!==void 0&&this.addFeaturesInternal(n),i!==void 0&&this.bindFeaturesCollection_(i)}addFeature(e){this.addFeatureInternal(e),this.changed()}addFeatureInternal(e){const t=(0,$.v6)(e);if(!this.addToIndex_(t,e)){this.featuresCollection_&&this.featuresCollection_.remove(e);return}this.setupChangeEvents_(t,e);const i=e.getGeometry();if(i){const n=i.getExtent();this.featuresRtree_&&this.featuresRtree_.insert(n,e)}else this.nullGeometryFeatures_[t]=e;this.dispatchEvent(new Qt(Xe.ADDFEATURE,e))}setupChangeEvents_(e,t){this.featureChangeKeys_[e]=[(0,Je.KT)(t,st.A.CHANGE,this.handleFeatureChange_,this),(0,Je.KT)(t,dl.A.PROPERTYCHANGE,this.handleFeatureChange_,this)]}addToIndex_(e,t){let i=!0;const n=t.getId();return n!==void 0&&(n.toString()in this.idIndex_?i=!1:this.idIndex_[n.toString()]=t),i&&((0,ue.v)(!(e in this.uidIndex_),30),this.uidIndex_[e]=t),i}addFeatures(e){this.addFeaturesInternal(e),this.changed()}addFeaturesInternal(e){const t=[],i=[],n=[];for(let s=0,o=e.length;s<o;s++){const a=e[s],l=(0,$.v6)(a);this.addToIndex_(l,a)&&i.push(a)}for(let s=0,o=i.length;s<o;s++){const a=i[s],l=(0,$.v6)(a);this.setupChangeEvents_(l,a);const h=a.getGeometry();if(h){const c=h.getExtent();t.push(c),n.push(a)}else this.nullGeometryFeatures_[l]=a}if(this.featuresRtree_&&this.featuresRtree_.load(t,n),this.hasListener(Xe.ADDFEATURE))for(let s=0,o=i.length;s<o;s++)this.dispatchEvent(new Qt(Xe.ADDFEATURE,i[s]))}bindFeaturesCollection_(e){let t=!1;this.addEventListener(Xe.ADDFEATURE,function(i){t||(t=!0,e.push(i.feature),t=!1)}),this.addEventListener(Xe.REMOVEFEATURE,function(i){t||(t=!0,e.remove(i.feature),t=!1)}),e.addEventListener(vn.A.ADD,i=>{t||(t=!0,this.addFeature(i.element),t=!1)}),e.addEventListener(vn.A.REMOVE,i=>{t||(t=!0,this.removeFeature(i.element),t=!1)}),this.featuresCollection_=e}clear(e){if(e){for(const i in this.featureChangeKeys_)this.featureChangeKeys_[i].forEach(Je.JH);this.featuresCollection_||(this.featureChangeKeys_={},this.idIndex_={},this.uidIndex_={})}else if(this.featuresRtree_){const i=n=>{this.removeFeatureInternal(n)};this.featuresRtree_.forEach(i);for(const n in this.nullGeometryFeatures_)this.removeFeatureInternal(this.nullGeometryFeatures_[n])}this.featuresCollection_&&this.featuresCollection_.clear(),this.featuresRtree_&&this.featuresRtree_.clear(),this.nullGeometryFeatures_={};const t=new Qt(Xe.CLEAR);this.dispatchEvent(t),this.changed()}forEachFeature(e){if(this.featuresRtree_)return this.featuresRtree_.forEach(e);this.featuresCollection_&&this.featuresCollection_.forEach(e)}forEachFeatureAtCoordinateDirect(e,t){const i=[e[0],e[1],e[0],e[1]];return this.forEachFeatureInExtent(i,function(n){if(n.getGeometry().intersectsCoordinate(e))return t(n)})}forEachFeatureInExtent(e,t){if(this.featuresRtree_)return this.featuresRtree_.forEachInExtent(e,t);this.featuresCollection_&&this.featuresCollection_.forEach(t)}forEachFeatureIntersectingExtent(e,t){return this.forEachFeatureInExtent(e,function(i){if(i.getGeometry().intersectsExtent(e)){const s=t(i);if(s)return s}})}getFeaturesCollection(){return this.featuresCollection_}getFeatures(){let e;return this.featuresCollection_?e=this.featuresCollection_.getArray().slice(0):this.featuresRtree_&&(e=this.featuresRtree_.getAll(),(0,Zi.p)(this.nullGeometryFeatures_)||(0,$e.X$)(e,Object.values(this.nullGeometryFeatures_))),e}getFeaturesAtCoordinate(e){const t=[];return this.forEachFeatureAtCoordinateDirect(e,function(i){t.push(i)}),t}getFeaturesInExtent(e,t){if(this.featuresRtree_){if(!(t&&t.canWrapX()&&this.getWrapX()))return this.featuresRtree_.getInExtent(e);const n=(0,T.QJ)(e,t);return[].concat(...n.map(s=>this.featuresRtree_.getInExtent(s)))}return this.featuresCollection_?this.featuresCollection_.getArray().slice(0):[]}getClosestFeatureToCoordinate(e,t){const i=e[0],n=e[1];let s=null;const o=[NaN,NaN];let a=1/0;const l=[-1/0,-1/0,1/0,1/0];return t=t||en.rT,this.featuresRtree_.forEachInExtent(l,function(h){if(t(h)){const c=h.getGeometry(),d=a;if(a=c.closestPointXY(i,n,o,a),a<d){s=h;const u=Math.sqrt(a);l[0]=i-u,l[1]=n-u,l[2]=i+u,l[3]=n+u}}}),s}getExtent(e){return this.featuresRtree_.getExtent(e)}getFeatureById(e){const t=this.idIndex_[e.toString()];return t!==void 0?t:null}getFeatureByUid(e){const t=this.uidIndex_[e];return t!==void 0?t:null}getFormat(){return this.format_}getOverlaps(){return this.overlaps_}getUrl(){return this.url_}handleFeatureChange_(e){const t=e.target,i=(0,$.v6)(t),n=t.getGeometry();if(!n)i in this.nullGeometryFeatures_||(this.featuresRtree_&&this.featuresRtree_.remove(t),this.nullGeometryFeatures_[i]=t);else{const o=n.getExtent();i in this.nullGeometryFeatures_?(delete this.nullGeometryFeatures_[i],this.featuresRtree_&&this.featuresRtree_.insert(o,t)):this.featuresRtree_&&this.featuresRtree_.update(o,t)}const s=t.getId();if(s!==void 0){const o=s.toString();this.idIndex_[o]!==t&&(this.removeFromIdIndex_(t),this.idIndex_[o]=t)}else this.removeFromIdIndex_(t),this.uidIndex_[i]=t;this.changed(),this.dispatchEvent(new Qt(Xe.CHANGEFEATURE,t))}hasFeature(e){const t=e.getId();return t!==void 0?t in this.idIndex_:(0,$.v6)(e)in this.uidIndex_}isEmpty(){return this.featuresRtree_?this.featuresRtree_.isEmpty()&&(0,Zi.p)(this.nullGeometryFeatures_):this.featuresCollection_?this.featuresCollection_.getLength()===0:!0}loadFeatures(e,t,i){const n=this.loadedExtentsRtree_,s=this.strategy_(e,t,i);for(let o=0,a=s.length;o<a;++o){const l=s[o];n.forEachInExtent(l,function(c){return(0,T.ms)(c.extent,l)})||(++this.loadingExtentsCount_,this.dispatchEvent(new Qt(Xe.FEATURESLOADSTART)),this.loader_.call(this,l,t,i,c=>{--this.loadingExtentsCount_,this.dispatchEvent(new Qt(Xe.FEATURESLOADEND,void 0,c))},()=>{--this.loadingExtentsCount_,this.dispatchEvent(new Qt(Xe.FEATURESLOADERROR))}),n.insert(l,{extent:l.slice()}))}this.loading=this.loader_.length<4?!1:this.loadingExtentsCount_>0}refresh(){this.clear(!0),this.loadedExtentsRtree_.clear(),super.refresh()}removeLoadedExtent(e){const t=this.loadedExtentsRtree_;let i;t.forEachInExtent(e,function(n){if((0,T.aI)(n.extent,e))return i=n,!0}),i&&t.remove(i)}removeFeature(e){if(!e)return;const t=(0,$.v6)(e);t in this.nullGeometryFeatures_?delete this.nullGeometryFeatures_[t]:this.featuresRtree_&&this.featuresRtree_.remove(e),this.removeFeatureInternal(e)&&this.changed()}removeFeatureInternal(e){const t=(0,$.v6)(e),i=this.featureChangeKeys_[t];if(!i)return;i.forEach(Je.JH),delete this.featureChangeKeys_[t];const n=e.getId();return n!==void 0&&delete this.idIndex_[n.toString()],delete this.uidIndex_[t],this.dispatchEvent(new Qt(Xe.REMOVEFEATURE,e)),e}removeFromIdIndex_(e){let t=!1;for(const i in this.idIndex_)if(this.idIndex_[i]===e){delete this.idIndex_[i],t=!0;break}return t}setLoader(e){this.loader_=e}setUrl(e){(0,ue.v)(this.format_,7),this.url_=e,this.setLoader(kr(e,this.format_))}}const ct=pl;var Nt=C(58704);const Br=0,tn=1,zr=[0,0,0,0],Ai=[],ws={MODIFYSTART:"modifystart",MODIFYEND:"modifyend"};class Ts extends En.Ay{constructor(e,t,i){super(e),this.features=t,this.mapBrowserEvent=i}}class _l extends lr.A{constructor(e){super(e),this.on,this.once,this.un,this.boundHandleFeatureChange_=this.handleFeatureChange_.bind(this),this.condition_=e.condition?e.condition:Nt.fs,this.defaultDeleteCondition_=function(i){return(0,Nt.Js)(i)&&(0,Nt.t5)(i)},this.deleteCondition_=e.deleteCondition?e.deleteCondition:this.defaultDeleteCondition_,this.insertVertexCondition_=e.insertVertexCondition?e.insertVertexCondition:Nt.Gk,this.vertexFeature_=null,this.vertexSegments_=null,this.lastPixel_=[0,0],this.ignoreNextSingleClick_=!1,this.featuresBeingModified_=null,this.rBush_=new os,this.pixelTolerance_=e.pixelTolerance!==void 0?e.pixelTolerance:10,this.snappedToVertex_=!1,this.changingFeature_=!1,this.dragSegments_=[],this.overlay_=new Oe({source:new ct({useSpatialIndex:!1,wrapX:!!e.wrapX}),style:e.style?e.style:yl(),updateWhileAnimating:!0,updateWhileInteracting:!0}),this.SEGMENT_WRITERS_={Point:this.writePointGeometry_.bind(this),LineString:this.writeLineStringGeometry_.bind(this),LinearRing:this.writeLineStringGeometry_.bind(this),Polygon:this.writePolygonGeometry_.bind(this),MultiPoint:this.writeMultiPointGeometry_.bind(this),MultiLineString:this.writeMultiLineStringGeometry_.bind(this),MultiPolygon:this.writeMultiPolygonGeometry_.bind(this),Circle:this.writeCircleGeometry_.bind(this),GeometryCollection:this.writeGeometryCollectionGeometry_.bind(this)},this.source_=null,this.hitDetection_=null;let t;if(e.features?t=e.features:e.source&&(this.source_=e.source,t=new rs.A(this.source_.getFeatures()),this.source_.addEventListener(Xe.ADDFEATURE,this.handleSourceAdd_.bind(this)),this.source_.addEventListener(Xe.REMOVEFEATURE,this.handleSourceRemove_.bind(this))),!t)throw new Error("The modify interaction requires features, a source or a layer");e.hitDetection&&(this.hitDetection_=e.hitDetection),this.features_=t,this.features_.forEach(this.addFeature_.bind(this)),this.features_.addEventListener(vn.A.ADD,this.handleFeatureAdd_.bind(this)),this.features_.addEventListener(vn.A.REMOVE,this.handleFeatureRemove_.bind(this)),this.lastPointerEvent_=null,this.delta_=[0,0],this.snapToPointer_=e.snapToPointer===void 0?!this.hitDetection_:e.snapToPointer}addFeature_(e){const t=e.getGeometry();if(t){const n=this.SEGMENT_WRITERS_[t.getType()];n&&n(e,t)}const i=this.getMap();i&&i.isRendered()&&this.getActive()&&this.handlePointerAtPixel_(this.lastPixel_,i),e.addEventListener(st.A.CHANGE,this.boundHandleFeatureChange_)}willModifyFeatures_(e,t){if(!this.featuresBeingModified_){this.featuresBeingModified_=new rs.A;const i=this.featuresBeingModified_.getArray();for(let n=0,s=t.length;n<s;++n){const o=t[n];for(let a=0,l=o.length;a<l;++a){const h=o[a].feature;h&&!i.includes(h)&&this.featuresBeingModified_.push(h)}}this.featuresBeingModified_.getLength()===0?this.featuresBeingModified_=null:this.dispatchEvent(new Ts(ws.MODIFYSTART,this.featuresBeingModified_,e))}}removeFeature_(e){this.removeFeatureSegmentData_(e),this.vertexFeature_&&this.features_.getLength()===0&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),e.removeEventListener(st.A.CHANGE,this.boundHandleFeatureChange_)}removeFeatureSegmentData_(e){const t=this.rBush_,i=[];t.forEach(function(n){e===n.feature&&i.push(n)});for(let n=i.length-1;n>=0;--n){const s=i[n];for(let o=this.dragSegments_.length-1;o>=0;--o)this.dragSegments_[o][0]===s&&this.dragSegments_.splice(o,1);t.remove(s)}}setActive(e){this.vertexFeature_&&!e&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),super.setActive(e)}setMap(e){this.overlay_.setMap(e),super.setMap(e)}getOverlay(){return this.overlay_}handleSourceAdd_(e){e.feature&&this.features_.push(e.feature)}handleSourceRemove_(e){e.feature&&this.features_.remove(e.feature)}handleFeatureAdd_(e){this.addFeature_(e.element)}handleFeatureChange_(e){if(!this.changingFeature_){const t=e.target;this.removeFeature_(t),this.addFeature_(t)}}handleFeatureRemove_(e){this.removeFeature_(e.element)}writePointGeometry_(e,t){const i=t.getCoordinates(),n={feature:e,geometry:t,segment:[i,i]};this.rBush_.insert(t.getExtent(),n)}writeMultiPointGeometry_(e,t){const i=t.getCoordinates();for(let n=0,s=i.length;n<s;++n){const o=i[n],a={feature:e,geometry:t,depth:[n],index:n,segment:[o,o]};this.rBush_.insert(t.getExtent(),a)}}writeLineStringGeometry_(e,t){const i=t.getCoordinates();for(let n=0,s=i.length-1;n<s;++n){const o=i.slice(n,n+2),a={feature:e,geometry:t,index:n,segment:o};this.rBush_.insert((0,T.Tr)(o),a)}}writeMultiLineStringGeometry_(e,t){const i=t.getCoordinates();for(let n=0,s=i.length;n<s;++n){const o=i[n];for(let a=0,l=o.length-1;a<l;++a){const h=o.slice(a,a+2),c={feature:e,geometry:t,depth:[n],index:a,segment:h};this.rBush_.insert((0,T.Tr)(h),c)}}}writePolygonGeometry_(e,t){const i=t.getCoordinates();for(let n=0,s=i.length;n<s;++n){const o=i[n];for(let a=0,l=o.length-1;a<l;++a){const h=o.slice(a,a+2),c={feature:e,geometry:t,depth:[n],index:a,segment:h};this.rBush_.insert((0,T.Tr)(h),c)}}}writeMultiPolygonGeometry_(e,t){const i=t.getCoordinates();for(let n=0,s=i.length;n<s;++n){const o=i[n];for(let a=0,l=o.length;a<l;++a){const h=o[a];for(let c=0,d=h.length-1;c<d;++c){const u=h.slice(c,c+2),f={feature:e,geometry:t,depth:[a,n],index:c,segment:u};this.rBush_.insert((0,T.Tr)(u),f)}}}}writeCircleGeometry_(e,t){const i=t.getCenter(),n={feature:e,geometry:t,index:Br,segment:[i,i]},s={feature:e,geometry:t,index:tn,segment:[i,i]},o=[n,s];n.featureSegments=o,s.featureSegments=o,this.rBush_.insert((0,T.dP)(i),n);let a=t;const l=(0,X.Tf)();if(l&&this.getMap()){const h=this.getMap().getView().getProjection();a=a.clone().transform(l,h),a=(0,Lt.nD)(a).transform(h,l)}this.rBush_.insert(a.getExtent(),s)}writeGeometryCollectionGeometry_(e,t){const i=t.getGeometriesArray();for(let n=0;n<i.length;++n){const s=i[n],o=this.SEGMENT_WRITERS_[s.getType()];o(e,s)}}createOrUpdateVertexFeature_(e,t,i){let n=this.vertexFeature_;return n?n.getGeometry().setCoordinates(e):(n=new Ue.A(new Tt.A(e)),this.vertexFeature_=n,this.overlay_.getSource().addFeature(n)),n.set("features",t),n.set("geometries",i),n}handleEvent(e){if(!e.originalEvent)return!0;this.lastPointerEvent_=e;let t;return!e.map.getView().getInteracting()&&e.type==pt.A.POINTERMOVE&&!this.handlingDownUpSequence&&this.handlePointerMove_(e),this.vertexFeature_&&this.deleteCondition_(e)&&(e.type!=pt.A.SINGLECLICK||!this.ignoreNextSingleClick_?t=this.removePoint():t=!0),e.type==pt.A.SINGLECLICK&&(this.ignoreNextSingleClick_=!1),super.handleEvent(e)&&!t}handleDragEvent(e){this.ignoreNextSingleClick_=!1,this.willModifyFeatures_(e,this.dragSegments_);const t=[e.coordinate[0]+this.delta_[0],e.coordinate[1]+this.delta_[1]],i=[],n=[];for(let s=0,o=this.dragSegments_.length;s<o;++s){const a=this.dragSegments_[s],l=a[0],h=l.feature;i.includes(h)||i.push(h);const c=l.geometry;n.includes(c)||n.push(c);const d=l.depth;let u;const f=l.segment,g=a[1];for(;t.length<c.getStride();)t.push(f[g][t.length]);switch(c.getType()){case"Point":u=t,f[0]=t,f[1]=t;break;case"MultiPoint":u=c.getCoordinates(),u[l.index]=t,f[0]=t,f[1]=t;break;case"LineString":u=c.getCoordinates(),u[l.index+g]=t,f[g]=t;break;case"MultiLineString":u=c.getCoordinates(),u[d[0]][l.index+g]=t,f[g]=t;break;case"Polygon":u=c.getCoordinates(),u[d[0]][l.index+g]=t,f[g]=t;break;case"MultiPolygon":u=c.getCoordinates(),u[d[1]][d[0]][l.index+g]=t,f[g]=t;break;case"Circle":if(f[0]=t,f[1]=t,l.index===Br)this.changingFeature_=!0,c.setCenter(t),this.changingFeature_=!1;else{this.changingFeature_=!0;const m=e.map.getView().getProjection();let p=(0,Ye.Io)((0,X.Ad)(c.getCenter(),m),(0,X.Ad)(t,m));const v=(0,X.Tf)();if(v){const y=c.clone().transform(v,m);y.setRadius(p),p=y.transform(m,v).getRadius()}c.setRadius(p),this.changingFeature_=!1}break;default:}u&&this.setGeometryCoordinates_(c,u)}this.createOrUpdateVertexFeature_(t,i,n)}handleDownEvent(e){if(!this.condition_(e))return!1;const t=e.coordinate;this.handlePointerAtPixel_(e.pixel,e.map,t),this.dragSegments_.length=0,this.featuresBeingModified_=null;const i=this.vertexFeature_;if(i){const n=e.map.getView().getProjection(),s=[],o=i.getGeometry().getCoordinates(),a=(0,T.Tr)([o]),l=this.rBush_.getInExtent(a),h={};l.sort(xl);for(let c=0,d=l.length;c<d;++c){const u=l[c],f=u.segment;let g=(0,$.v6)(u.geometry);const m=u.depth;if(m&&(g+="-"+m.join("-")),h[g]||(h[g]=new Array(2)),u.geometry.getType()==="Circle"&&u.index===tn){const p=Nr(t,u,n);(0,Ye.aI)(p,o)&&!h[g][0]&&(this.dragSegments_.push([u,0]),h[g][0]=u);continue}if((0,Ye.aI)(f[0],o)&&!h[g][0]){this.dragSegments_.push([u,0]),h[g][0]=u;continue}if((0,Ye.aI)(f[1],o)&&!h[g][1]){if(h[g][0]&&h[g][0].index===0){let p=u.geometry.getCoordinates();switch(u.geometry.getType()){case"LineString":case"MultiLineString":continue;case"MultiPolygon":p=p[m[1]];case"Polygon":if(u.index!==p[m[0]].length-2)continue;break;default:}}this.dragSegments_.push([u,1]),h[g][1]=u;continue}(0,$.v6)(f)in this.vertexSegments_&&!h[g][0]&&!h[g][1]&&this.insertVertexCondition_(e)&&s.push(u)}s.length&&this.willModifyFeatures_(e,[s]);for(let c=s.length-1;c>=0;--c)this.insertVertex_(s[c],o)}return!!this.vertexFeature_}handleUpEvent(e){for(let t=this.dragSegments_.length-1;t>=0;--t){const i=this.dragSegments_[t][0],n=i.geometry;if(n.getType()==="Circle"){const s=n.getCenter(),o=i.featureSegments[0],a=i.featureSegments[1];o.segment[0]=s,o.segment[1]=s,a.segment[0]=s,a.segment[1]=s,this.rBush_.update((0,T.dP)(s),o);let l=n;const h=(0,X.Tf)();if(h){const c=e.map.getView().getProjection();l=l.clone().transform(h,c),l=(0,Lt.nD)(l).transform(c,h)}this.rBush_.update(l.getExtent(),a)}else this.rBush_.update((0,T.Tr)(i.segment),i)}return this.featuresBeingModified_&&(this.dispatchEvent(new Ts(ws.MODIFYEND,this.featuresBeingModified_,e)),this.featuresBeingModified_=null),!1}handlePointerMove_(e){this.lastPixel_=e.pixel,this.handlePointerAtPixel_(e.pixel,e.map,e.coordinate)}handlePointerAtPixel_(e,t,i){const n=i||t.getCoordinateFromPixel(e),s=t.getView().getProjection(),o=function(h,c){return Gr(n,h,s)-Gr(n,c,s)};let a,l;if(this.hitDetection_){const h=typeof this.hitDetection_=="object"?c=>c===this.hitDetection_:void 0;t.forEachFeatureAtPixel(e,(c,d,u)=>{u&&(u=new Tt.A((0,X.te)(u.getCoordinates(),s)));const f=u||c.getGeometry();if(f.getType()==="Point"&&c instanceof Ue.A&&this.features_.getArray().includes(c)){l=f;const g=c.getGeometry().getFlatCoordinates().slice(0,2);a=[{feature:c,geometry:l,segment:[g,g]}]}return!0},{layerFilter:h})}if(!a){const h=(0,X.SD)((0,T.dP)(n,zr),s),c=t.getView().getResolution()*this.pixelTolerance_,d=(0,X.JR)((0,T.r)(h,c,zr),s);a=this.rBush_.getInExtent(d)}if(a&&a.length>0){const h=a.sort(o)[0],c=h.segment;let d=Nr(n,h,s);const u=t.getPixelFromCoordinate(d);let f=(0,Ye.Io)(e,u);if(l||f<=this.pixelTolerance_){const g={};if(g[(0,$.v6)(c)]=!0,this.snapToPointer_||(this.delta_[0]=d[0]-n[0],this.delta_[1]=d[1]-n[1]),h.geometry.getType()==="Circle"&&h.index===tn)this.snappedToVertex_=!0,this.createOrUpdateVertexFeature_(d,[h.feature],[h.geometry]);else{const m=t.getPixelFromCoordinate(c[0]),p=t.getPixelFromCoordinate(c[1]),v=(0,Ye.hG)(u,m),y=(0,Ye.hG)(u,p);f=Math.sqrt(Math.min(v,y)),this.snappedToVertex_=f<=this.pixelTolerance_,this.snappedToVertex_&&(d=v>y?c[1]:c[0]),this.createOrUpdateVertexFeature_(d,[h.feature],[h.geometry]);const w={};w[(0,$.v6)(h.geometry)]=!0;for(let R=1,L=a.length;R<L;++R){const D=a[R].segment;if((0,Ye.aI)(c[0],D[0])&&(0,Ye.aI)(c[1],D[1])||(0,Ye.aI)(c[0],D[1])&&(0,Ye.aI)(c[1],D[0])){const b=(0,$.v6)(a[R].geometry);b in w||(w[b]=!0,g[(0,$.v6)(D)]=!0)}else break}}this.vertexSegments_=g;return}}this.vertexFeature_&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null)}insertVertex_(e,t){const i=e.segment,n=e.feature,s=e.geometry,o=e.depth,a=e.index;let l;for(;t.length<s.getStride();)t.push(0);switch(s.getType()){case"MultiLineString":l=s.getCoordinates(),l[o[0]].splice(a+1,0,t);break;case"Polygon":l=s.getCoordinates(),l[o[0]].splice(a+1,0,t);break;case"MultiPolygon":l=s.getCoordinates(),l[o[1]][o[0]].splice(a+1,0,t);break;case"LineString":l=s.getCoordinates(),l.splice(a+1,0,t);break;default:return}this.setGeometryCoordinates_(s,l);const h=this.rBush_;h.remove(e),this.updateSegmentIndices_(s,a,o,1);const c={segment:[i[0],t],feature:n,geometry:s,depth:o,index:a};h.insert((0,T.Tr)(c.segment),c),this.dragSegments_.push([c,1]);const d={segment:[t,i[1]],feature:n,geometry:s,depth:o,index:a+1};h.insert((0,T.Tr)(d.segment),d),this.dragSegments_.push([d,0]),this.ignoreNextSingleClick_=!0}removePoint(){if(this.lastPointerEvent_&&this.lastPointerEvent_.type!=pt.A.POINTERDRAG){const e=this.lastPointerEvent_;this.willModifyFeatures_(e,this.dragSegments_);const t=this.removeVertex_();return this.featuresBeingModified_&&this.dispatchEvent(new Ts(ws.MODIFYEND,this.featuresBeingModified_,e)),this.featuresBeingModified_=null,t}return!1}removeVertex_(){const e=this.dragSegments_,t={};let i=!1,n,s,o,a,l,h,c,d,u,f,g;for(l=e.length-1;l>=0;--l)o=e[l],f=o[0],g=(0,$.v6)(f.feature),f.depth&&(g+="-"+f.depth.join("-")),g in t||(t[g]={}),o[1]===0?(t[g].right=f,t[g].index=f.index):o[1]==1&&(t[g].left=f,t[g].index=f.index+1);for(g in t){switch(u=t[g].right,c=t[g].left,h=t[g].index,d=h-1,c!==void 0?f=c:f=u,d<0&&(d=0),a=f.geometry,s=a.getCoordinates(),n=s,i=!1,a.getType()){case"MultiLineString":s[f.depth[0]].length>2&&(s[f.depth[0]].splice(h,1),i=!0);break;case"LineString":s.length>2&&(s.splice(h,1),i=!0);break;case"MultiPolygon":n=n[f.depth[1]];case"Polygon":n=n[f.depth[0]],n.length>4&&(h==n.length-1&&(h=0),n.splice(h,1),i=!0,h===0&&(n.pop(),n.push(n[0]),d=n.length-1));break;default:}if(i){this.setGeometryCoordinates_(a,s);const m=[];if(c!==void 0&&(this.rBush_.remove(c),m.push(c.segment[0])),u!==void 0&&(this.rBush_.remove(u),m.push(u.segment[1])),c!==void 0&&u!==void 0){const p={depth:f.depth,feature:f.feature,geometry:f.geometry,index:d,segment:m};this.rBush_.insert((0,T.Tr)(p.segment),p)}this.updateSegmentIndices_(a,h,f.depth,-1),this.vertexFeature_&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),e.length=0}}return i}setGeometryCoordinates_(e,t){this.changingFeature_=!0,e.setCoordinates(t),this.changingFeature_=!1}updateSegmentIndices_(e,t,i,n){this.rBush_.forEachInExtent(e.getExtent(),function(s){s.geometry===e&&(i===void 0||s.depth===void 0||(0,$e.aI)(s.depth,i))&&s.index>t&&(s.index+=n)})}}function xl(r,e){return r.index-e.index}function Gr(r,e,t){const i=e.geometry;if(i.getType()==="Circle"){let s=i;if(e.index===tn){const o=(0,X.Tf)();o&&(s=s.clone().transform(o,t));const a=(0,Ye.hG)(s.getCenter(),(0,X.Ad)(r,t)),l=Math.sqrt(a)-s.getRadius();return l*l}}const n=(0,X.Ad)(r,t);return Ai[0]=(0,X.Ad)(e.segment[0],t),Ai[1]=(0,X.Ad)(e.segment[1],t),(0,Ye.$x)(n,Ai)}function Nr(r,e,t){const i=e.geometry;if(i.getType()==="Circle"&&e.index===tn){let s=i;const o=(0,X.Tf)();return o&&(s=s.clone().transform(o,t)),(0,X.te)(s.getClosestPoint((0,X.Ad)(r,t)),t)}const n=(0,X.Ad)(r,t);return Ai[0]=(0,X.Ad)(e.segment[0],t),Ai[1]=(0,X.Ad)(e.segment[1],t),(0,X.te)((0,Ye.sG)(n,Ai),t)}function yl(){const r=dr();return function(e,t){return r.Point}}const vl=_l;var El=C(92497);class Sn extends Ri.Ay{constructor(e,t,i){super(),i!==void 0&&t===void 0?this.setFlatCoordinates(i,e):(t=t||0,this.setCenterAndRadius(e,t,i))}clone(){const e=new Sn(this.flatCoordinates.slice(),void 0,this.layout);return e.applyProperties(this),e}closestPointXY(e,t,i,n){const s=this.flatCoordinates,o=e-s[0],a=t-s[1],l=o*o+a*a;if(l<n){if(l===0)for(let h=0;h<this.stride;++h)i[h]=s[h];else{const h=this.getRadius()/Math.sqrt(l);i[0]=s[0]+h*o,i[1]=s[1]+h*a;for(let c=2;c<this.stride;++c)i[c]=s[c]}return i.length=this.stride,l}return n}containsXY(e,t){const i=this.flatCoordinates,n=e-i[0],s=t-i[1];return n*n+s*s<=this.getRadiusSquared_()}getCenter(){return this.flatCoordinates.slice(0,this.stride)}computeExtent(e){const t=this.flatCoordinates,i=t[this.stride]-t[0];return(0,T.N)(t[0]-i,t[1]-i,t[0]+i,t[1]+i,e)}getRadius(){return Math.sqrt(this.getRadiusSquared_())}getRadiusSquared_(){const e=this.flatCoordinates[this.stride]-this.flatCoordinates[0],t=this.flatCoordinates[this.stride+1]-this.flatCoordinates[1];return e*e+t*t}getType(){return"Circle"}intersectsExtent(e){const t=this.getExtent();if((0,T.HY)(e,t)){const i=this.getCenter();return e[0]<=i[0]&&e[2]>=i[0]||e[1]<=i[1]&&e[3]>=i[1]?!0:(0,T.sB)(e,this.intersectsCoordinate.bind(this))}return!1}setCenter(e){const t=this.stride,i=this.flatCoordinates[t]-this.flatCoordinates[0],n=e.slice();n[t]=n[0]+i;for(let s=1;s<t;++s)n[t+s]=e[s];this.setFlatCoordinates(this.layout,n),this.changed()}setCenterAndRadius(e,t,i){this.setLayout(i,e,0),this.flatCoordinates||(this.flatCoordinates=[]);const n=this.flatCoordinates;let s=(0,El._n)(n,0,e,this.stride);n[s++]=n[0]+t;for(let o=1,a=this.stride;o<a;++o)n[s++]=n[o];n.length=s,this.changed()}getCoordinates(){return null}setCoordinates(e,t){}setRadius(e){this.flatCoordinates[this.stride]=this.flatCoordinates[0]+e,this.changed()}rotate(e,t){const i=this.getCenter(),n=this.getStride();this.setCenter((0,pi.e$)(i,0,i.length,n,e,t,i)),this.changed()}}Sn.prototype.transform;const Wr=Sn;var wl=C(34338),Tl=C(82187),Cl=C(10277),In=C(96702),Sl=C(30503),bi=C(83123);const Rn={DRAWSTART:"drawstart",DRAWEND:"drawend",DRAWABORT:"drawabort"};class An extends En.Ay{constructor(e,t){super(e),this.feature=t}}function Il(r,e){const t=[];for(let i=0;i<e.length;++i){const s=e[i].getGeometry();Ur(r,s,t)}return t}function bn(r,e){return(0,xe.hG)(r[0],r[1],e[0],e[1])}function Li(r,e){const t=r.length;return e<0?r[e+t]:e>=t?r[e-t]:r[e]}function Ln(r,e,t){let i,n;e<t?(i=e,n=t):(i=t,n=e);const s=Math.ceil(i),o=Math.floor(n);if(s>o){const l=Mi(r,i),h=Mi(r,n);return bn(l,h)}let a=0;if(i<s){const l=Mi(r,i),h=Li(r,s);a+=bn(l,h)}if(o<n){const l=Li(r,o),h=Mi(r,n);a+=bn(l,h)}for(let l=s;l<o-1;++l){const h=Li(r,l),c=Li(r,l+1);a+=bn(h,c)}return a}function Ur(r,e,t){if(e instanceof ze.A){Mn(r,e.getCoordinates(),!1,t);return}if(e instanceof In.A){const i=e.getCoordinates();for(let n=0,s=i.length;n<s;++n)Mn(r,i[n],!1,t);return}if(e instanceof Lt.Ay){const i=e.getCoordinates();for(let n=0,s=i.length;n<s;++n)Mn(r,i[n],!0,t);return}if(e instanceof bi.A){const i=e.getCoordinates();for(let n=0,s=i.length;n<s;++n){const o=i[n];for(let a=0,l=o.length;a<l;++a)Mn(r,o[a],!0,t)}return}if(e instanceof wl.A){const i=e.getGeometries();for(let n=0;n<i.length;++n)Ur(r,i[n],t);return}}const Cs={index:-1,endIndex:NaN};function Rl(r,e,t,i){const n=r[0],s=r[1];let o=1/0,a=-1,l=NaN;for(let d=0;d<e.targets.length;++d){const u=e.targets[d],f=u.coordinates;let g=1/0,m;for(let p=0;p<f.length-1;++p){const v=f[p],y=f[p+1],w=Yr(n,s,v,y);w.squaredDistance<g&&(g=w.squaredDistance,m=p+w.along)}g<o&&(o=g,u.ring&&e.targetIndex===d&&(u.endIndex>u.startIndex?m<u.startIndex&&(m+=f.length):u.endIndex<u.startIndex&&m>u.startIndex&&(m-=f.length)),l=m,a=d)}const h=e.targets[a];let c=h.ring;if(e.targetIndex===a&&c){const d=Mi(h.coordinates,l),u=t.getPixelFromCoordinate(d);(0,Ye.Io)(u,e.startPx)>i&&(c=!1)}if(c){const d=h.coordinates,u=d.length,f=h.startIndex,g=l;if(f<g){const m=Ln(d,f,g);Ln(d,f,g-u)<m&&(l-=u)}else{const m=Ln(d,f,g);Ln(d,f,g+u)<m&&(l+=u)}}return Cs.index=a,Cs.endIndex=l,Cs}function Mn(r,e,t,i){const n=r[0],s=r[1];for(let o=0,a=e.length-1;o<a;++o){const l=e[o],h=e[o+1],c=Yr(n,s,l,h);if(c.squaredDistance===0){const d=o+c.along;i.push({coordinates:e,ring:t,startIndex:d,endIndex:d});return}}}const Ss={along:0,squaredDistance:0};function Yr(r,e,t,i){const n=t[0],s=t[1],o=i[0],a=i[1],l=o-n,h=a-s;let c=0,d=n,u=s;return(l!==0||h!==0)&&(c=(0,xe.qE)(((r-n)*l+(e-s)*h)/(l*l+h*h),0,1),d+=l*c,u+=h*c),Ss.along=c,Ss.squaredDistance=(0,xe.Mg)((0,xe.hG)(r,e,d,u),10),Ss}function Mi(r,e){const t=r.length;let i=Math.floor(e);const n=e-i;i>=t?i-=t:i<0&&(i+=t);let s=i+1;s>=t&&(s-=t);const o=r[i],a=o[0],l=o[1],h=r[s],c=h[0]-a,d=h[1]-l;return[a+c*n,l+d*n]}class Al extends lr.A{constructor(e){const t=e;t.stopDown||(t.stopDown=en.W8),super(t),this.on,this.once,this.un,this.shouldHandle_=!1,this.downPx_=null,this.downTimeout_,this.lastDragTime_,this.pointerType_,this.freehand_=!1,this.source_=e.source?e.source:null,this.features_=e.features?e.features:null,this.snapTolerance_=e.snapTolerance?e.snapTolerance:12,this.type_=e.type,this.mode_=Ll(this.type_),this.stopClick_=!!e.stopClick,this.minPoints_=e.minPoints?e.minPoints:this.mode_==="Polygon"?3:2,this.maxPoints_=this.mode_==="Circle"?2:e.maxPoints?e.maxPoints:1/0,this.finishCondition_=e.finishCondition?e.finishCondition:en.rT,this.geometryLayout_=e.geometryLayout?e.geometryLayout:"XY";let i=e.geometryFunction;if(!i){const n=this.mode_;if(n==="Circle")i=function(s,o,a){const l=o||new Wr([NaN,NaN]),h=(0,X.Ad)(s[0],a),c=(0,Ye.hG)(h,(0,X.Ad)(s[s.length-1],a));l.setCenterAndRadius(h,Math.sqrt(c),this.geometryLayout_);const d=(0,X.Tf)();return d&&l.transform(a,d),l};else{let s;n==="Point"?s=Tt.A:n==="LineString"?s=ze.A:n==="Polygon"&&(s=Lt.Ay),i=function(o,a,l){return a?n==="Polygon"?o[0].length?a.setCoordinates([o[0].concat([o[0][0]])],this.geometryLayout_):a.setCoordinates([],this.geometryLayout_):a.setCoordinates(o,this.geometryLayout_):a=new s(o,this.geometryLayout_),a}}}this.geometryFunction_=i,this.dragVertexDelay_=e.dragVertexDelay!==void 0?e.dragVertexDelay:500,this.finishCoordinate_=null,this.sketchFeature_=null,this.sketchPoint_=null,this.sketchCoords_=null,this.sketchLine_=null,this.sketchLineCoords_=null,this.squaredClickTolerance_=e.clickTolerance?e.clickTolerance*e.clickTolerance:36,this.overlay_=new Oe({source:new ct({useSpatialIndex:!1,wrapX:e.wrapX?e.wrapX:!1}),style:e.style?e.style:bl(),updateWhileInteracting:!0}),this.geometryName_=e.geometryName,this.condition_=e.condition?e.condition:Nt.TS,this.freehandCondition_,e.freehand?this.freehandCondition_=Nt.Gk:this.freehandCondition_=e.freehandCondition?e.freehandCondition:Nt.Kg,this.traceCondition_,this.setTrace(e.trace||!1),this.traceState_={active:!1},this.traceSource_=e.traceSource||e.source||null,this.addChangeListener(Tl.A.ACTIVE,this.updateState_)}setTrace(e){let t;e?e===!0?t=Nt.Gk:t=e:t=Nt.Zm,this.traceCondition_=t}setMap(e){super.setMap(e),this.updateState_()}getOverlay(){return this.overlay_}handleEvent(e){e.originalEvent.type===st.A.CONTEXTMENU&&e.originalEvent.preventDefault(),this.freehand_=this.mode_!=="Point"&&this.freehandCondition_(e);let t=e.type===pt.A.POINTERMOVE,i=!0;return!this.freehand_&&this.lastDragTime_&&e.type===pt.A.POINTERDRAG&&(Date.now()-this.lastDragTime_>=this.dragVertexDelay_?(this.downPx_=e.pixel,this.shouldHandle_=!this.freehand_,t=!0):this.lastDragTime_=void 0,this.shouldHandle_&&this.downTimeout_!==void 0&&(clearTimeout(this.downTimeout_),this.downTimeout_=void 0)),this.freehand_&&e.type===pt.A.POINTERDRAG&&this.sketchFeature_!==null?(this.addToDrawing_(e.coordinate),i=!1):this.freehand_&&e.type===pt.A.POINTERDOWN?i=!1:t&&this.getPointerCount()<2?(i=e.type===pt.A.POINTERMOVE,i&&this.freehand_?(this.handlePointerMove_(e),this.shouldHandle_&&e.originalEvent.preventDefault()):(e.originalEvent.pointerType==="mouse"||e.type===pt.A.POINTERDRAG&&this.downTimeout_===void 0)&&this.handlePointerMove_(e)):e.type===pt.A.DBLCLICK&&(i=!1),super.handleEvent(e)&&i}handleDownEvent(e){return this.shouldHandle_=!this.freehand_,this.freehand_?(this.downPx_=e.pixel,this.finishCoordinate_||this.startDrawing_(e.coordinate),!0):this.condition_(e)?(this.lastDragTime_=Date.now(),this.downTimeout_=setTimeout(()=>{this.handlePointerMove_(new Cl.A(pt.A.POINTERMOVE,e.map,e.originalEvent,!1,e.frameState))},this.dragVertexDelay_),this.downPx_=e.pixel,!0):(this.lastDragTime_=void 0,!1)}deactivateTrace_(){this.traceState_={active:!1}}toggleTraceState_(e){if(!this.traceSource_||!this.traceCondition_(e))return;if(this.traceState_.active){this.deactivateTrace_();return}const t=this.getMap(),i=t.getCoordinateFromPixel([e.pixel[0]-this.snapTolerance_,e.pixel[1]+this.snapTolerance_]),n=t.getCoordinateFromPixel([e.pixel[0]+this.snapTolerance_,e.pixel[1]-this.snapTolerance_]),s=(0,T.Tr)([i,n]),o=this.traceSource_.getFeaturesInExtent(s);if(o.length===0)return;const a=Il(e.coordinate,o);a.length&&(this.traceState_={active:!0,startPx:e.pixel.slice(),targets:a,targetIndex:-1})}addOrRemoveTracedCoordinates_(e,t){const i=e.startIndex<=e.endIndex,n=e.startIndex<=t;i===n?i&&t>e.endIndex||!i&&t<e.endIndex?this.addTracedCoordinates_(e,e.endIndex,t):(i&&t<e.endIndex||!i&&t>e.endIndex)&&this.removeTracedCoordinates_(t,e.endIndex):(this.removeTracedCoordinates_(e.startIndex,e.endIndex),this.addTracedCoordinates_(e,e.startIndex,t))}removeTracedCoordinates_(e,t){if(e===t)return;let i=0;if(e<t){const n=Math.ceil(e);let s=Math.floor(t);s===t&&(s-=1),i=s-n+1}else{const n=Math.floor(e);let s=Math.ceil(t);s===t&&(s+=1),i=n-s+1}i>0&&this.removeLastPoints_(i)}addTracedCoordinates_(e,t,i){if(t===i)return;const n=[];if(t<i){const s=Math.ceil(t);let o=Math.floor(i);o===i&&(o-=1);for(let a=s;a<=o;++a)n.push(Li(e.coordinates,a))}else{const s=Math.floor(t);let o=Math.ceil(i);o===i&&(o+=1);for(let a=s;a>=o;--a)n.push(Li(e.coordinates,a))}n.length&&this.appendCoordinates(n)}updateTrace_(e){const t=this.traceState_;if(!t.active||t.targetIndex===-1&&(0,Ye.Io)(t.startPx,e.pixel)<this.snapTolerance_)return;const i=Rl(e.coordinate,t,this.getMap(),this.snapTolerance_);if(t.targetIndex!==i.index){if(t.targetIndex!==-1){const l=t.targets[t.targetIndex];this.removeTracedCoordinates_(l.startIndex,l.endIndex)}const a=t.targets[i.index];this.addTracedCoordinates_(a,a.startIndex,i.endIndex)}else{const a=t.targets[t.targetIndex];this.addOrRemoveTracedCoordinates_(a,i.endIndex)}t.targetIndex=i.index;const n=t.targets[t.targetIndex];n.endIndex=i.endIndex;const s=Mi(n.coordinates,n.endIndex),o=this.getMap().getPixelFromCoordinate(s);e.coordinate=s,e.pixel=[Math.round(o[0]),Math.round(o[1])]}handleUpEvent(e){let t=!0;if(this.getPointerCount()===0){this.downTimeout_&&(clearTimeout(this.downTimeout_),this.downTimeout_=void 0),this.handlePointerMove_(e);const i=this.traceState_.active;if(this.toggleTraceState_(e),this.shouldHandle_){const n=!this.finishCoordinate_;n&&this.startDrawing_(e.coordinate),!n&&this.freehand_?this.finishDrawing():!this.freehand_&&(!n||this.mode_==="Point")&&(this.atFinish_(e.pixel,i)?this.finishCondition_(e)&&this.finishDrawing():this.addToDrawing_(e.coordinate)),t=!1}else this.freehand_&&this.abortDrawing()}return!t&&this.stopClick_&&e.preventDefault(),t}handlePointerMove_(e){if(this.pointerType_=e.originalEvent.pointerType,this.downPx_&&(!this.freehand_&&this.shouldHandle_||this.freehand_&&!this.shouldHandle_)){const t=this.downPx_,i=e.pixel,n=t[0]-i[0],s=t[1]-i[1],o=n*n+s*s;if(this.shouldHandle_=this.freehand_?o>this.squaredClickTolerance_:o<=this.squaredClickTolerance_,!this.shouldHandle_)return}if(!this.finishCoordinate_){this.createOrUpdateSketchPoint_(e.coordinate.slice());return}this.updateTrace_(e),this.modifyDrawing_(e.coordinate)}atFinish_(e,t){let i=!1;if(this.sketchFeature_){let n=!1,s=[this.finishCoordinate_];const o=this.mode_;if(o==="Point")i=!0;else if(o==="Circle")i=this.sketchCoords_.length===2;else if(o==="LineString")n=!t&&this.sketchCoords_.length>this.minPoints_;else if(o==="Polygon"){const a=this.sketchCoords_;n=a[0].length>this.minPoints_,s=[a[0][0],a[0][a[0].length-2]],t?s=[a[0][0]]:s=[a[0][0],a[0][a[0].length-2]]}if(n){const a=this.getMap();for(let l=0,h=s.length;l<h;l++){const c=s[l],d=a.getPixelFromCoordinate(c),u=e[0]-d[0],f=e[1]-d[1],g=this.freehand_?1:this.snapTolerance_;if(i=Math.sqrt(u*u+f*f)<=g,i){this.finishCoordinate_=c;break}}}}return i}createOrUpdateSketchPoint_(e){this.sketchPoint_?this.sketchPoint_.getGeometry().setCoordinates(e):(this.sketchPoint_=new Ue.A(new Tt.A(e)),this.updateSketchFeatures_())}createOrUpdateCustomSketchLine_(e){this.sketchLine_||(this.sketchLine_=new Ue.A);const t=e.getLinearRing(0);let i=this.sketchLine_.getGeometry();i?(i.setFlatCoordinates(t.getLayout(),t.getFlatCoordinates()),i.changed()):(i=new ze.A(t.getFlatCoordinates(),t.getLayout()),this.sketchLine_.setGeometry(i))}startDrawing_(e){const t=this.getMap().getView().getProjection(),i=(0,Ri.dn)(this.geometryLayout_);for(;e.length<i;)e.push(0);this.finishCoordinate_=e,this.mode_==="Point"?this.sketchCoords_=e.slice():this.mode_==="Polygon"?(this.sketchCoords_=[[e.slice(),e.slice()]],this.sketchLineCoords_=this.sketchCoords_[0]):this.sketchCoords_=[e.slice(),e.slice()],this.sketchLineCoords_&&(this.sketchLine_=new Ue.A(new ze.A(this.sketchLineCoords_)));const n=this.geometryFunction_(this.sketchCoords_,void 0,t);this.sketchFeature_=new Ue.A,this.geometryName_&&this.sketchFeature_.setGeometryName(this.geometryName_),this.sketchFeature_.setGeometry(n),this.updateSketchFeatures_(),this.dispatchEvent(new An(Rn.DRAWSTART,this.sketchFeature_))}modifyDrawing_(e){const t=this.getMap(),i=this.sketchFeature_.getGeometry(),n=t.getView().getProjection(),s=(0,Ri.dn)(this.geometryLayout_);let o,a;for(;e.length<s;)e.push(0);this.mode_==="Point"?a=this.sketchCoords_:this.mode_==="Polygon"?(o=this.sketchCoords_[0],a=o[o.length-1],this.atFinish_(t.getPixelFromCoordinate(e))&&(e=this.finishCoordinate_.slice())):(o=this.sketchCoords_,a=o[o.length-1]),a[0]=e[0],a[1]=e[1],this.geometryFunction_(this.sketchCoords_,i,n),this.sketchPoint_&&this.sketchPoint_.getGeometry().setCoordinates(e),i.getType()==="Polygon"&&this.mode_!=="Polygon"?this.createOrUpdateCustomSketchLine_(i):this.sketchLineCoords_&&this.sketchLine_.getGeometry().setCoordinates(this.sketchLineCoords_),this.updateSketchFeatures_()}addToDrawing_(e){const t=this.sketchFeature_.getGeometry(),i=this.getMap().getView().getProjection();let n,s;const o=this.mode_;o==="LineString"||o==="Circle"?(this.finishCoordinate_=e.slice(),s=this.sketchCoords_,s.length>=this.maxPoints_&&(this.freehand_?s.pop():n=!0),s.push(e.slice()),this.geometryFunction_(s,t,i)):o==="Polygon"&&(s=this.sketchCoords_[0],s.length>=this.maxPoints_&&(this.freehand_?s.pop():n=!0),s.push(e.slice()),n&&(this.finishCoordinate_=s[0]),this.geometryFunction_(this.sketchCoords_,t,i)),this.createOrUpdateSketchPoint_(e.slice()),this.updateSketchFeatures_(),n&&this.finishDrawing()}removeLastPoints_(e){if(!this.sketchFeature_)return;const t=this.sketchFeature_.getGeometry(),i=this.getMap().getView().getProjection(),n=this.mode_;for(let s=0;s<e;++s){let o;if(n==="LineString"||n==="Circle"){if(o=this.sketchCoords_,o.splice(-2,1),o.length>=2){this.finishCoordinate_=o[o.length-2].slice();const a=this.finishCoordinate_.slice();o[o.length-1]=a,this.createOrUpdateSketchPoint_(a)}this.geometryFunction_(o,t,i),t.getType()==="Polygon"&&this.sketchLine_&&this.createOrUpdateCustomSketchLine_(t)}else if(n==="Polygon"){o=this.sketchCoords_[0],o.splice(-2,1);const a=this.sketchLine_.getGeometry();if(o.length>=2){const l=o[o.length-2].slice();o[o.length-1]=l,this.createOrUpdateSketchPoint_(l)}a.setCoordinates(o),this.geometryFunction_(this.sketchCoords_,t,i)}if(o.length===1){this.abortDrawing();break}}this.updateSketchFeatures_()}removeLastPoint(){this.removeLastPoints_(1)}finishDrawing(){const e=this.abortDrawing_();if(!e)return;let t=this.sketchCoords_;const i=e.getGeometry(),n=this.getMap().getView().getProjection();this.mode_==="LineString"?(t.pop(),this.geometryFunction_(t,i,n)):this.mode_==="Polygon"&&(t[0].pop(),this.geometryFunction_(t,i,n),t=i.getCoordinates()),this.type_==="MultiPoint"?e.setGeometry(new Sl.A([t])):this.type_==="MultiLineString"?e.setGeometry(new In.A([t])):this.type_==="MultiPolygon"&&e.setGeometry(new bi.A([t])),this.dispatchEvent(new An(Rn.DRAWEND,e)),this.features_&&this.features_.push(e),this.source_&&this.source_.addFeature(e)}abortDrawing_(){this.finishCoordinate_=null;const e=this.sketchFeature_;return this.sketchFeature_=null,this.sketchPoint_=null,this.sketchLine_=null,this.overlay_.getSource().clear(!0),this.deactivateTrace_(),e}abortDrawing(){const e=this.abortDrawing_();e&&this.dispatchEvent(new An(Rn.DRAWABORT,e))}appendCoordinates(e){const t=this.mode_,i=!this.sketchFeature_;i&&this.startDrawing_(e[0]);let n;if(t==="LineString"||t==="Circle")n=this.sketchCoords_;else if(t==="Polygon")n=this.sketchCoords_&&this.sketchCoords_.length?this.sketchCoords_[0]:[];else return;i&&n.shift(),n.pop();for(let o=0;o<e.length;o++)this.addToDrawing_(e[o]);const s=e[e.length-1];this.addToDrawing_(s),this.modifyDrawing_(s)}extend(e){const i=e.getGeometry();this.sketchFeature_=e,this.sketchCoords_=i.getCoordinates();const n=this.sketchCoords_[this.sketchCoords_.length-1];this.finishCoordinate_=n.slice(),this.sketchCoords_.push(n.slice()),this.sketchPoint_=new Ue.A(new Tt.A(n)),this.updateSketchFeatures_(),this.dispatchEvent(new An(Rn.DRAWSTART,this.sketchFeature_))}updateSketchFeatures_(){const e=[];this.sketchFeature_&&e.push(this.sketchFeature_),this.sketchLine_&&e.push(this.sketchLine_),this.sketchPoint_&&e.push(this.sketchPoint_);const t=this.overlay_.getSource();t.clear(!0),t.addFeatures(e)}updateState_(){const e=this.getMap(),t=this.getActive();(!e||!t)&&this.abortDrawing(),this.overlay_.setMap(t?e:null)}}function bl(){const r=dr();return function(e,t){return r[e.getGeometry().getType()]}}function Au(r,e){return function(t,i,n){const s=fromUserCoordinate(t[0],n),o=fromUserCoordinate(t[t.length-1],n),a=Math.sqrt(squaredCoordinateDistance(s,o));i=i||fromCircle(new Circle(s),r);let l=e;if(!e&&e!==0){const c=o[0]-s[0],d=o[1]-s[1];l=Math.atan2(d,c)}makeRegular(i,s,a,l);const h=getUserProjection();return h&&i.transform(n,h),i}}function bu(){return function(r,e,t){const i=boundingExtent([r[0],r[r.length-1]].map(function(o){return fromUserCoordinate(o,t)})),n=[[getBottomLeft(i),getBottomRight(i),getTopRight(i),getTopLeft(i),getBottomLeft(i)]];e?e.setCoordinates(n):e=new Polygon(n);const s=getUserProjection();return s&&e.transform(t,s),e}}function Ll(r){switch(r){case"Point":case"MultiPoint":return"Point";case"LineString":case"MultiLineString":return"LineString";case"Polygon":case"MultiPolygon":return"Polygon";case"Circle":return"Circle";default:throw new Error("Invalid type: "+r)}}const Ml=Al;var Xr=C(52490);class Vr extends Oe{constructor(){super({source:new ct}),this.opts={action:"length",unit:"m"},this.segmentStyle=new fe({text:new gi({font:"12px Calibri,sans-serif",fill:new Ie({color:"rgba(255, 255, 255, 1)"}),backgroundFill:new Ie({color:"rgba(0, 0, 0, 0.4)"}),padding:[2,2,2,2],textBaseline:"bottom",offsetY:-12}),image:new Ze({radius:6,points:3,angle:Math.PI,displacement:[0,8],fill:new Ie({color:"rgba(0, 0, 0, 0.4)"})})}),this.segmentStyles=[this.segmentStyle],this.shapeStyle=[new fe({fill:new Ie({color:"rgba(255, 255, 255, 0.2)"}),image:new Ct({radius:5,stroke:new Te({color:"rgba(0, 0, 0, 0.7)"}),fill:new Ie({color:"rgba(255, 255, 255, 0.2)"})})}),new fe({stroke:new Te({color:[0,0,0,1],width:2,lineDash:[4,8],lineDashOffset:6})}),new fe({stroke:new Te({color:[255,255,255,1],width:2,lineDash:[4,8]})})],this.labelStyle=new fe({text:new gi({font:"14px Calibri,sans-serif",fill:new Ie({color:"rgba(255, 255, 255, 1)"}),backgroundFill:new Ie({color:"rgba(0, 0, 0, 0.7)"}),padding:[3,3,3,3],textBaseline:"bottom",offsetY:-15}),image:new Ze({radius:8,points:3,angle:Math.PI,displacement:[0,10],fill:new Ie({color:"rgba(0, 0, 0, 0.7)"})})}),this.tipStyle=new fe({text:new gi({font:"12px Calibri,sans-serif",fill:new Ie({color:"rgba(255, 255, 255, 1)"}),backgroundFill:new Ie({color:"rgba(0, 0, 0, 0.4)"}),padding:[2,2,2,2],textAlign:"left",offsetX:15})}),this.modifyStyle=new fe({image:new Ct({radius:5,stroke:new Te({color:"rgba(0, 0, 0, 0.7)"}),fill:new Ie({color:"rgba(0, 0, 0, 0.4)"})}),text:new gi({text:"Drag to modify",font:"12px Calibri,sans-serif",fill:new Ie({color:"rgba(255, 255, 255, 1)"}),backgroundFill:new Ie({color:"rgba(0, 0, 0, 0.7)"}),padding:[2,2,2,2],textAlign:"left",offsetX:15})}),this.modify=new vl({source:this.getSource(),style:this.modifyStyle}),this.setStyle(e=>this.styleFunction(e,!1)),this.setVisible(!0)}setOptions(e){this.opts=e,this.getSource()?.refresh()}getMapMeasurement(e){let t=0,i=Ke[0];return this.opts.action==="area"?(i=Ke[1],t=(0,Xr.UG)(e)):t=(0,Xr.R3)(e),(0,mt.cN)(i.getUnit(this.opts.unit).format(t))}styleFunction(e,t,i,n){const s=[...this.shapeStyle],o=e.getGeometry();if(o){const a=o.getType();let l,h,c;if((!i||i===a)&&(a==="Polygon"&&o instanceof Lt.Ay?(l=o.getInteriorPoint(),h=this.getMapMeasurement(o),c=new ze.A(o.getCoordinates()[0])):a==="LineString"&&o instanceof ze.A&&(l=new Tt.A(o.getLastCoordinate()),h=this.getMapMeasurement(o))),t&&c){let d=0;c.forEachSegment((u,f)=>{const g=new ze.A([u,f]),m=this.getMapMeasurement(g);this.segmentStyles.length-1<d&&this.segmentStyles.push(this.segmentStyle.clone());const p=new Tt.A(g.getCoordinateAt(.5));this.segmentStyles[d].setGeometry(p),this.segmentStyles[d].getText().setText(m),s.push(this.segmentStyles[d]),d++})}h&&(this.labelStyle.setGeometry(l),this.labelStyle.getText().setText(h),s.push(this.labelStyle)),n&&a==="Point"&&o instanceof Tt.A&&!this.modify.getOverlay().getSource().getFeatures().length&&(this.tipPoint=o,this.tipStyle.getText().setText(n),s.push(this.tipStyle))}return s}addInteraction(e,t,i,n){const s=t,o=" Click to continue "+(s==="Polygon"?"polygon":"line")+` (double-click to end) `,a=" Click to start ";let l=a;this.draw=new Ml({source:this.getSource(),type:s,style:h=>this.styleFunction(h,i,s,l)}),this.draw.on("drawstart",()=>{n&&this.getSource().clear(),this.modify.setActive(!1),l=o}),this.draw.on("drawend",()=>{this.modifyStyle.setGeometry(this.tipPoint),this.modify.setActive(!0),e.once("pointermove",()=>{this.modifyStyle.setGeometry("")}),l=a}),this.modify.setActive(!0),e.addInteraction(this.draw)}}const Fl=({map:r,menuActiveState:e})=>{const t=(0,_.useRef)(new Vr),i=Dl(fi.$W.theme2),[n,s]=(0,_.useState)(!0),[o,a]=(0,_.useState)(!1),[l,h]=(0,_.useState)({action:Ke[0].value,unit:Ke[0].units[0].value}),c=(0,_.useMemo)(()=>{const g=Ke.find(p=>p.value===l.action)??Ke[0],m=g.getUnit(l.unit);return t.current.setOptions(l),{current:m,options:g.units}},[l]),d=!0,u=!1;function f(){if(a(!o),e(!o),o)r.removeInteraction(t.current.draw),t.current.setVisible(!1);else{n&&(s(!1),t.current.setZIndex(1),r.addLayer(t.current),r.addInteraction(t.current.modify)),t.current.setVisible(!0),r.removeInteraction(t.current.draw);const g=Ke.find(m=>m.value===l.action)??Ke[0];t.current.addInteraction(r,g.geometry,u,d)}}return _.createElement("div",{className:`${i.infoWrap} ${o?null:i.infoWrapClosed}`},o?_.createElement("div",null,_.createElement("div",{className:i.rowGroup},_.createElement(wi.z,{value:l.action,options:Ke,size:"md",fullWidth:!1,onChange:g=>{r.removeInteraction(t.current.draw);const m=Ke.find(v=>v.value===g)??Ke[0],p=m.getUnit(l.unit);h({...l,action:m.value,unit:p.value}),t.current.addInteraction(r,m.geometry,u,d)}}),_.createElement(yn.$n,{className:i.button,icon:"times",variant:"secondary",size:"sm",onClick:f})),_.createElement(Ti.l6,{className:i.unitSelect,value:c.current,options:c.options,isSearchable:!1,onChange:g=>{const m=Ke.find(v=>v.value===l.action)??Ke[0],p=m.getUnit(g.value)??m.units[0];h({...l,unit:p.value})}})):_.createElement(ss.K,{className:i.icon,name:"ruler-combined",tooltip:"show measure tools",tooltipPlacement:"left",onClick:f}))},Dl=r=>({button:(0,ie.css)({marginLeft:"auto"}),icon:(0,ie.css)({backgroundColor:r.colors.secondary.main,display:"inline-block",height:"19.25px",margin:"1px",width:"19.25px"}),infoWrap:(0,ie.css)({color:`${r.colors.text}`,backgroundColor:r.colors.background.secondary,borderRadius:"4px",padding:"2px"}),infoWrapClosed:(0,ie.css)({height:"25.25px",width:"25.25px"}),rowGroup:(0,ie.css)({display:"flex",justifyContent:"flex-end"}),unitSelect:(0,ie.css)({minWidth:"200px"})});var Lu=C(25045),Mu=C(97544);function Pl(r){return(0,nt.css)({".ol-scale-line":{background:r.colors.border.weak},".ol-scale-line-inner":{border:`1px solid ${r.colors.text.primary}`,borderTop:0,color:r.colors.text.primary},".ol-control":{backgroundColor:r.colors.background.primary},".ol-control:hover":{backgroundColor:r.colors.background.secondary},".ol-control button":{color:r.colors.secondary.text,backgroundColor:r.colors.secondary.main},".ol-control button:hover":{color:r.colors.secondary.text,backgroundColor:r.colors.secondary.shade},".ol-control button:focus":{color:r.colors.secondary.text,backgroundColor:r.colors.secondary.main},".ol-attribution ul":{color:r.colors.text.primary,textShadow:"none"},".ol-attribution:not(.ol-collapsed)":{backgroundColor:r.colors.background.secondary}})}var Fn=C(39741),Ne=C(52622),St=C(31484);class nn extends ct{constructor(e){super({}),this.location=e}update(e){this.clear(!0);const t=(0,St.FM)(e,this.location);if(!t.field){this.changed();return}for(let i=0;i<e.length;i++)this.addFeatureInternal(new Ue.A({frame:e,rowIndex:i,geometry:t.field.values[i]}));this.changed()}updateLineString(e){this.clear(!0);const t=(0,St.FM)(e,this.location);if(!t.field){this.changed();return}const i=t.field,n=new ze.A(i.values.map(s=>s.getCoordinates()));this.addFeatureInternal(new Ue.A({frame:e,rowIndex:0,geometry:n})),this.changed()}}var Dn=C(24120),jr=C(62467),Zr=C(8066),Ol=C(58563),kl=C(96589),Bl=C(47694),zl=C(28895);function Hr(r){const{layerName:e,styleConfig:t,layer:i}=r,n=(0,ye.of)(Gl),s=(0,Dn.A)(i?.__state?.mouseEvents??(0,jr.of)(void 0)),o=t?.dims?.color?.field,a=(0,_.useMemo)(()=>{if(!o||!s)return;const g=s.getProperties();if(!g.frame)return;const p=g.rowIndex;return o.values[p]},[s,o]);if(!t)return _.createElement(_.Fragment,null);const{color:l,opacity:h}=t?.base??{},c=t?.config.symbol?.fixed;if(l&&c&&!o)return _.createElement("div",{className:n.infoWrap},_.createElement("div",{className:n.layerName},e),_.createElement("div",{className:(0,ie.cx)(n.layerBody,n.fixedColorContainer)},_.createElement(Bl.y,{src:`public/${c}`,className:n.legendSymbol,title:"Symbol",style:{fill:l,opacity:h}})));if(!o)return _.createElement(_.Fragment,null);const d=(0,Zr.Qi)(o);if(d.isContinuous&&d.getColors){const g=d.getColors(fi.$W.theme2),m=(0,Ol.AP)(o),p=o.display?v=>(0,mt.cN)(o.display(v)):v=>`${v}`;return _.createElement("div",{className:n.infoWrap},_.createElement("div",{className:n.layerName},e),_.createElement("div",{className:(0,ie.cx)(n.layerBody,n.colorScaleWrapper)},_.createElement(kl.w,{hoverValue:a,colorPalette:g,min:m.min??0,max:m.max??100,display:p,useStopsPercentage:!1})))}const u=o?.config?.thresholds;if(!u||u.steps.length<2)return _.createElement("div",null);const f=(0,zl.EI)(o.config,fi.$W.theme2);return _.createElement("div",{className:n.infoWrap},_.createElement("div",{className:n.layerName},e),_.createElement("div",{className:(0,ie.cx)(n.layerBody,n.legend)},f.map((g,m)=>_.createElement("div",{key:`${m}/${g.label}`,className:n.legendItem},_.createElement("i",{style:{background:g.color}}),g.label))))}const Gl=r=>({infoWrap:(0,ie.css)({display:"flex",flexDirection:"column",background:r.colors.background.secondary,borderRadius:"1px",padding:r.spacing(1),borderBottom:`2px solid ${r.colors.border.strong}`,minWidth:"150px"}),layerName:(0,ie.css)({fontSize:r.typography.body.fontSize}),layerBody:(0,ie.css)({paddingLeft:"10px"}),legend:(0,ie.css)({lineHeight:"18px",display:"flex",flexDirection:"column",fontSize:r.typography.bodySmall.fontSize,padding:"5px 10px 0",i:{width:"15px",height:"15px",float:"left",marginRight:"8px",opacity:.7,borderRadius:r.shape.radius.circle}}),legendItem:(0,ie.css)({whiteSpace:"nowrap"}),fixedColorContainer:(0,ie.css)({minWidth:"80px",fontSize:r.typography.bodySmall.fontSize,paddingTop:"5px"}),legendSymbol:(0,ie.css)({height:"18px",width:"18px",margin:"auto"}),colorScaleWrapper:(0,ie.css)({minWidth:"200px",fontSize:r.typography.bodySmall.fontSize,paddingTop:"10px"})});class Kr extends _.Component{constructor(e){super(e),this.state={subProps:e.initialSubProps}}componentDidMount(){this.sub=this.props.watch.subscribe({next:e=>{this.setState({subProps:e})},complete:()=>{},error:e=>{}})}componentWillUnmount(){this.sub&&this.sub.unsubscribe()}render(){const{subProps:e}=this.state;return _.createElement(this.props.child,{...e})}}var It=C(39268),ut=C(14186),rt=C(88575),Nl=C(76892),Wl=C(83598),Is=C(66864),Rs=C(72626),Jr=C(57602),ei=C(78437),Pn=C(80744),P=C(33744),$r=C(40672),On=C(83077),kn=C(63577),Ul=(r=>(r.circle="circle",r.square="square",r.triangle="triangle",r.star="star",r.cross="cross",r.x="x",r))(Ul||{});const Fi={circle:"img/icons/marker/circle.svg",square:"img/icons/marker/square.svg",triangle:"img/icons/marker/triangle.svg",star:"img/icons/marker/star.svg",cross:"img/icons/marker/cross.svg",x:"img/icons/marker/x-mark.svg"};function Di(r){const e=r.opacity==null?.8:r.opacity;if(e===1)return new Ie({color:r.color});if(e>0){const t=(0,de.A)(r.color).setAlpha(e).toRgbString();return new Ie({color:t})}}function Yl(r){const e=r.opacity==null?.8:r.opacity;if(e===1)return new Te({color:r.color,width:r.lineWidth??1});if(e>0){const t=(0,de.A)(r.color).setAlpha(e).toRgbString();return new Te({color:t,width:r.lineWidth??1})}}const Dt=r=>{if(!r.text)return;const e=tt.$.theme2.typography.fontFamily,t={...P.T5.textConfig,...r.textConfig};return new gi({text:r.text,fill:new Ie({color:r.color??P.T5.color.fixed}),font:`normal ${t.fontSize}px ${e}`,...t})},Xl=r=>new fe({text:Dt(r)}),qr=r=>{const e=new Te({color:r.color,width:r.lineWidth??1}),t=r.size??P._7;return new fe({image:new Ct({stroke:e,fill:Di(r),radius:t,displacement:_i(r.symbolAlign??P.T5.symbolAlign,t)}),text:Dt(r),stroke:e})},sn=r=>new fe({fill:Di(r),stroke:new Te({color:r.color,width:r.lineWidth??1}),text:Dt(r)}),As=r=>new fe({fill:Di(r),stroke:Yl(r),text:Dt(r)}),Qr=r=>{const e=r.size??P._7,t=new Te({color:"#F00",width:1});return[new fe({image:new Ze({stroke:t,points:4,radius:e,angle:Math.PI/4})}),new fe({image:new Ze({stroke:t,points:4,radius:e,radius2:0,angle:0})})]},Vl=[{id:"circle",name:"Circle",aliasIds:[Fi.circle],make:qr},{id:"square",name:"Square",aliasIds:[Fi.square],make:r=>{const e=r.size??P._7,t=r.rotation??0;return new fe({image:new Ze({stroke:new Te({color:r.color,width:r.lineWidth??1}),fill:Di(r),points:4,radius:e,angle:Math.PI/4,rotation:t*Math.PI/180,displacement:_i(r.symbolAlign??P.T5.symbolAlign,e)}),text:Dt(r)})}},{id:"triangle",name:"Triangle",aliasIds:[Fi.triangle],make:r=>{const e=r.size??P._7,t=r.rotation??0;return new fe({image:new Ze({stroke:new Te({color:r.color,width:r.lineWidth??1}),fill:Di(r),points:3,radius:e,rotation:t*Math.PI/180,angle:0,displacement:_i(r.symbolAlign??P.T5.symbolAlign,e)}),text:Dt(r)})}},{id:"star",name:"Star",aliasIds:[Fi.star],make:r=>{const e=r.size??P._7,t=r.rotation??0;return new fe({image:new Ze({stroke:new Te({color:r.color,width:r.lineWidth??1}),fill:Di(r),points:5,radius:e,radius2:e*.4,angle:0,rotation:t*Math.PI/180,displacement:_i(r.symbolAlign??P.T5.symbolAlign,e)}),text:Dt(r)})}},{id:"cross",name:"Cross",aliasIds:[Fi.cross],make:r=>{const e=r.size??P._7,t=r.rotation??0;return new fe({image:new Ze({stroke:new Te({color:r.color,width:r.lineWidth??1}),points:4,radius:e,radius2:0,angle:0,rotation:t*Math.PI/180,displacement:_i(r.symbolAlign??P.T5.symbolAlign,e)}),text:Dt(r)})}},{id:"x",name:"X",aliasIds:[Fi.x],make:r=>{const e=r.size??P._7,t=r.rotation??0;return new fe({image:new Ze({stroke:new Te({color:r.color,width:r.lineWidth??1}),points:4,radius:e,radius2:0,angle:Math.PI/4,rotation:t*Math.PI/180,displacement:_i(r.symbolAlign??P.T5.symbolAlign,e)}),text:Dt(r)})}}];async function jl(r,e){return fetch(r,{method:"GET"}).then(t=>t.text()).then(t=>{t=$r.sQ.sanitizeSVGContent(t);const s=new DOMParser().parseFromString(t,"image/svg+xml").getElementsByTagName("svg")[0];if(!s)return"";const o=e??100,a=s.getAttribute("width")??o,l=s.getAttribute("height")??o;s.setAttribute("fill","#fff"),s.setAttribute("width",`${a}px`),s.setAttribute("height",`${l}px`);const h=new XMLSerializer().serializeToString(s);return`data:image/svg+xml,${encodeURIComponent(h)}`}).catch(t=>(console.error(t),""))}const bs=new On.O(()=>Vl);function Zl(r){const e=bs.getIfExists(r);if(e?.aliasIds?.length)return e.aliasIds[0]}async function Hl(r,e){if(!r)return e?Xl:qr;let t=bs.getIfExists(r);if(t)return t.make;if(r.endsWith(".svg")){const i=await jl((0,kn.getPublicOrAbsoluteUrl)(r));return t={id:r,name:r,aliasIds:[],make:i?n=>{const s=n.size??P._7,o=n.rotation??0;return[new fe({image:new wn({src:i,color:n.color,opacity:n.opacity??1,scale:(P._7+s)/100,rotation:o*Math.PI/180,displacement:_i(n.symbolAlign??P.T5.symbolAlign,s/2)}),text:n?.text?Dt(n):void 0}),new fe({image:new Ze({fill:new Ie({color:"rgba(0,0,0,0)"}),points:4,radius:n.size,rotation:o*Math.PI/180+Math.PI/4})})]}:Qr},bs.register(t),t.make}return Qr}function eo(r){const e=r?.text;return e?!!(e.mode===Ne.RU.Fixed&&e.fixed?.length||e.mode===Ne.RU.Field&&e.field?.length):!1}async function Wt(r){r||(r=P.T5);const e=eo(r),t={},i=await Hl(r.symbol?.fixed,e),n={config:r,hasText:e,fields:t,base:{color:tt.$.theme2.visualization.getColorByName(r.color?.fixed??P.T5.color.fixed),opacity:r.opacity??P.T5.opacity,lineWidth:r.lineWidth??1,size:r.size?.fixed??P.T5.size.fixed,rotation:r.rotation?.fixed??P.T5.rotation.fixed,symbolAlign:r.symbolAlign??P.T5.symbolAlign},maker:i};return r.color?.field?.length&&(t.color=r.color.field),r.size?.field?.length&&(t.size=r.size.field),r.rotation?.field?.length&&(t.rotation=r.rotation.field),e&&(n.base.text=r.text?.fixed,n.base.textConfig=r.textConfig??P.T5.textConfig,r.text?.field?.length&&(t.text=r.text.field)),Object.keys(t).length||(n.fields=void 0),n}function _i(r,e){const t=[0,0];return r?.horizontal===P.wq.Left?t[0]=-e:r?.horizontal===P.wq.Right&&(t[0]=e),r?.vertical===P.G4.Top?t[1]=e:r?.vertical===P.G4.Bottom&&(t[1]=-e),t}const ti=r=>{const{value:e,onChange:t,item:i}=r,n=(0,_.useMemo)(()=>i.settings?.frameMatcher?{...r.context,data:r.context.data.filter(i.settings.frameMatcher)}:r.context,[r.context,i.settings]),s=i.settings,o=b=>{t({...e,size:b})},a=b=>{t({...e,symbol:b})},l=b=>{t({...e,color:b})},h=b=>{t({...e,opacity:b})},c=b=>{t({...e,rotation:b})},d=b=>{t({...e,text:b})},u=b=>{t({...e,textConfig:{...e.textConfig,fontSize:b}})},f=b=>{t({...e,textConfig:{...e.textConfig,offsetX:b}})},g=b=>{t({...e,textConfig:{...e.textConfig,offsetY:b}})},m=b=>{t({...e,textConfig:{...e.textConfig,textAlign:b}})},p=b=>{t({...e,textConfig:{...e.textConfig,textBaseline:b}})},v=b=>{t({...e,symbolAlign:{...e?.symbolAlign,horizontal:b}})},y=b=>{t({...e,symbolAlign:{...e?.symbolAlign,vertical:b}})},R=(0,Dn.A)(s?.layerInfo??(0,jr.of)())?.geometryType===P.W_.Point,L=eo(e),D=2e3;return s?.simpleFixedValues?_.createElement(_.Fragment,null,R&&_.createElement(_.Fragment,null,_.createElement(It.C,null,_.createElement(ut.I,{label:"Symbol"},_.createElement(ei.mj,{value:e?.symbol??P.T5.symbol,context:n,onChange:a,item:{settings:{resourceType:"icon",folderName:Pn.Iu.Marker,placeholderText:L?"Select a symbol":"Select a symbol or add a text label",placeholderValue:P.T5.symbol.fixed,showSourceRadio:!1,maxFiles:D}}}))),_.createElement(rt.D,{label:"Rotation angle"},_.createElement(ei.AW,{value:e?.rotation??P.T5.rotation,context:n,onChange:c,item:{settings:{min:P.T5.rotation.min,max:P.T5.rotation.max}}}))),_.createElement(It.C,null,_.createElement(ut.I,{label:"Color",labelWidth:10},_.createElement(Nl.c,{width:4},_.createElement(Wl.sk,{color:e?.color?.fixed??P.T5.color.fixed,onChange:b=>{l({fixed:b})}})))),_.createElement(It.C,null,_.createElement(ut.I,{label:"Opacity",labelWidth:10,grow:!0},_.createElement(Jr.G,{value:e?.opacity??P.T5.opacity,context:n,onChange:h,item:{settings:{min:0,max:1,step:.1}}})))):_.createElement(_.Fragment,null,_.createElement(rt.D,{label:"Size"},_.createElement(ei.gm,{value:e?.size??P.T5.size,context:n,onChange:o,item:{settings:{min:1,max:100}}})),!s?.hideSymbol&&_.createElement(_.Fragment,null,_.createElement(rt.D,{label:"Symbol"},_.createElement(ei.mj,{value:e?.symbol??P.T5.symbol,context:n,onChange:a,item:{settings:{resourceType:Pn.zu.Icon,folderName:Pn.Iu.Marker,placeholderText:L?"Select a symbol":"Select a symbol or add a text label",placeholderValue:P.T5.symbol.fixed,showSourceRadio:!1,maxFiles:D}}})),_.createElement(rt.D,{label:"Symbol Vertical Align"},_.createElement(wi.z,{value:e?.symbolAlign?.vertical??P.T5.symbolAlign.vertical,onChange:y,options:[{value:P.G4.Top,label:(0,E.capitalize)(P.G4.Top)},{value:P.G4.Center,label:(0,E.capitalize)(P.G4.Center)},{value:P.G4.Bottom,label:(0,E.capitalize)(P.G4.Bottom)}]})),_.createElement(rt.D,{label:"Symbol Horizontal Align"},_.createElement(wi.z,{value:e?.symbolAlign?.horizontal??P.T5.symbolAlign.horizontal,onChange:v,options:[{value:P.wq.Left,label:(0,E.capitalize)(P.wq.Left)},{value:P.wq.Center,label:(0,E.capitalize)(P.wq.Center)},{value:P.wq.Right,label:(0,E.capitalize)(P.wq.Right)}]}))),_.createElement(rt.D,{label:"Color"},_.createElement(ei.NO,{value:e?.color??P.T5.color,context:n,onChange:l,item:{}})),_.createElement(rt.D,{label:"Fill opacity"},_.createElement(Jr.G,{value:e?.opacity??P.T5.opacity,context:n,onChange:h,item:{settings:{min:0,max:1,step:.1}}})),s?.displayRotation&&_.createElement(rt.D,{label:"Rotation angle"},_.createElement(ei.AW,{value:e?.rotation??P.T5.rotation,context:n,onChange:c,item:{settings:{min:P.T5.rotation.min,max:P.T5.rotation.max}}})),_.createElement(rt.D,{label:"Text label"},_.createElement(ei.hj,{value:e?.text??Pn.nG,context:n,onChange:d,item:{}})),L&&_.createElement(_.Fragment,null,_.createElement(Is.Gy,null,_.createElement(rt.D,{label:"Font size"},_.createElement(Rs.w,{value:e?.textConfig?.fontSize??P.T5.textConfig.fontSize,context:n,onChange:u,item:{}})),_.createElement(rt.D,{label:"X offset"},_.createElement(Rs.w,{value:e?.textConfig?.offsetX??P.T5.textConfig.offsetX,context:n,onChange:f,item:{}})),_.createElement(rt.D,{label:"Y offset"},_.createElement(Rs.w,{value:e?.textConfig?.offsetY??P.T5.textConfig.offsetY,context:n,onChange:g,item:{}}))),_.createElement(rt.D,{label:"Align"},_.createElement(wi.z,{value:e?.textConfig?.textAlign??P.T5.textConfig.textAlign,onChange:m,options:[{value:P.DY.Left,label:(0,E.capitalize)(P.DY.Left)},{value:P.DY.Center,label:(0,E.capitalize)(P.DY.Center)},{value:P.DY.Right,label:(0,E.capitalize)(P.DY.Right)}]})),_.createElement(rt.D,{label:"Baseline"},_.createElement(wi.z,{value:e?.textConfig?.textBaseline??P.T5.textConfig.textBaseline,onChange:p,options:[{value:P.fX.Top,label:(0,E.capitalize)(P.fX.Top)},{value:P.fX.Middle,label:(0,E.capitalize)(P.fX.Middle)},{value:P.fX.Bottom,label:(0,E.capitalize)(P.fX.Bottom)}]}))))};var qe=C(5636);const rn={style:P.T5,showLegend:!0},Ls="markers",Ms={type:Ls,name:"",config:rn,location:{mode:Ne.aG.Auto},tooltip:!0},Kl={id:Ls,name:"Markers",description:"Use markers to render each data point",isBaseMap:!1,showLocation:!0,hideOpacity:!0,create:async(r,e,t,i)=>{const n={...rn,...e?.config},s=await Wt(n.style),o=await(0,St.nE)(e.location),a=new nn(o),l=new Oe({source:a}),h=new Fn.m(1);let c=null;return n.showLegend&&(c=_.createElement(Kr,{watch:h,initialSubProps:{},child:Hr})),s.fields?l.setStyle(d=>{const u=d.get("rowIndex"),f=s.dims;if(!f||!(0,E.isNumber)(u))return s.maker(s.base);const g={...s.base};return f.color&&(g.color=f.color.get(u)),f.size&&(g.size=f.size.get(u)),f.text&&(g.text=f.text.get(u)),f.rotation&&(g.rotation=f.rotation.get(u)),s.maker(g)}):l.setStyle(s.maker(s.base)),{init:()=>l,legend:c,update:d=>{if(!d.series?.length){a.clear();return}for(const u of d.series){s.dims=(0,qe.ue)(u,s,i),c&&h.next({styleConfig:s,size:s.dims?.size,layerName:e.name,layer:l}),a.update(u);break}},registerOptionsUI:d=>{d.addCustomEditor({id:"config.style",path:"config.style",name:"Styles",editor:ti,settings:{displayRotation:!0},defaultValue:rn.style}).addBooleanSwitch({path:"config.showLegend",name:"Show legend",description:"Show map legend",defaultValue:rn.showLegend})}}},defaultOptions:rn};var xi=C(43429);const Bn={PRELOAD:"preload",USE_INTERIM_TILES_ON_ERROR:"useInterimTilesOnError"};class Jl extends cr.A{constructor(e){e=e||{};const t=Object.assign({},e);delete t.preload,delete t.useInterimTilesOnError,super(t),this.on,this.once,this.un,this.setPreload(e.preload!==void 0?e.preload:0),this.setUseInterimTilesOnError(e.useInterimTilesOnError!==void 0?e.useInterimTilesOnError:!0)}getPreload(){return this.get(Bn.PRELOAD)}setPreload(e){this.set(Bn.PRELOAD,e)}getUseInterimTilesOnError(){return this.get(Bn.USE_INTERIM_TILES_ON_ERROR)}setUseInterimTilesOnError(e){this.set(Bn.USE_INTERIM_TILES_ON_ERROR,e)}getData(e){return super.getData(e)}}const $l=Jl;var ae=C(11078),ql=C(93474);class Ql extends fs.A{constructor(e,t,i){super(),i=i||{},this.tileCoord=e,this.state=t,this.interimTile=null,this.key="",this.transition_=i.transition===void 0?250:i.transition,this.transitionStarts_={},this.interpolate=!!i.interpolate}changed(){this.dispatchEvent(st.A.CHANGE)}release(){this.state===ae.A.ERROR&&this.setState(ae.A.EMPTY)}getKey(){return this.key+"/"+this.tileCoord}getInterimTile(){if(!this.interimTile)return this;let e=this.interimTile;do{if(e.getState()==ae.A.LOADED)return this.transition_=0,e;e=e.interimTile}while(e);return this}refreshInterimChain(){if(!this.interimTile)return;let e=this.interimTile,t=this;do{if(e.getState()==ae.A.LOADED){e.interimTile=null;break}else e.getState()==ae.A.LOADING?t=e:e.getState()==ae.A.IDLE?t.interimTile=e.interimTile:t=e;e=t.interimTile}while(e)}getTileCoord(){return this.tileCoord}getState(){return this.state}setState(e){if(this.state!==ae.A.ERROR&&this.state>e)throw new Error("Tile load sequence violation");this.state=e,this.changed()}load(){(0,$.b0)()}getAlpha(e,t){if(!this.transition_)return 1;let i=this.transitionStarts_[e];if(!i)i=t,this.transitionStarts_[e]=i;else if(i===-1)return 1;const n=t-i+1e3/60;return n>=this.transition_?1:(0,ql.a6)(n/this.transition_)}inTransition(e){return this.transition_?this.transitionStarts_[e]!==-1:!1}endTransition(e){this.transition_&&(this.transitionStarts_[e]=-1)}}const to=Ql;class eh extends to{constructor(e,t,i,n,s,o){super(e,t,o),this.crossOrigin_=n,this.src_=i,this.key=i,this.image_=new Image,n!==null&&(this.image_.crossOrigin=n),this.unlisten_=null,this.tileLoadFunction_=s}getImage(){return this.image_}setImage(e){this.image_=e,this.state=ae.A.LOADED,this.unlistenImage_(),this.changed()}handleImageError_(){this.state=ae.A.ERROR,this.unlistenImage_(),this.image_=th(),this.changed()}handleImageLoad_(){const e=this.image_;e.naturalWidth&&e.naturalHeight?this.state=ae.A.LOADED:this.state=ae.A.EMPTY,this.unlistenImage_(),this.changed()}load(){this.state==ae.A.ERROR&&(this.state=ae.A.IDLE,this.image_=new Image,this.crossOrigin_!==null&&(this.image_.crossOrigin=this.crossOrigin_)),this.state==ae.A.IDLE&&(this.state=ae.A.LOADING,this.changed(),this.tileLoadFunction_(this,this.src_),this.unlisten_=gs(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))}unlistenImage_(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)}}function th(){const r=(0,Ge.Y)(1,1);return r.fillStyle="rgba(0,0,0,0)",r.fillRect(0,0,1,1),r.canvas}const io=eh,ih=.5,nh=10,no=.25;class sh{constructor(e,t,i,n,s,o){this.sourceProj_=e,this.targetProj_=t;let a={};const l=(0,X.RG)(this.targetProj_,this.sourceProj_);this.transformInv_=function(y){const w=y[0]+"/"+y[1];return a[w]||(a[w]=l(y)),a[w]},this.maxSourceExtent_=n,this.errorThresholdSquared_=s*s,this.triangles_=[],this.wrapsXInSource_=!1,this.canWrapXInSource_=this.sourceProj_.canWrapX()&&!!n&&!!this.sourceProj_.getExtent()&&(0,T.RG)(n)>=(0,T.RG)(this.sourceProj_.getExtent()),this.sourceWorldWidth_=this.sourceProj_.getExtent()?(0,T.RG)(this.sourceProj_.getExtent()):null,this.targetWorldWidth_=this.targetProj_.getExtent()?(0,T.RG)(this.targetProj_.getExtent()):null;const h=(0,T.Py)(i),c=(0,T.WU)(i),d=(0,T.k_)(i),u=(0,T.R)(i),f=this.transformInv_(h),g=this.transformInv_(c),m=this.transformInv_(d),p=this.transformInv_(u),v=nh+(o?Math.max(0,Math.ceil(Math.log2((0,T.UG)(i)/(o*o*256*256)))):0);if(this.addQuad_(h,c,d,u,f,g,m,p,v),this.wrapsXInSource_){let y=1/0;this.triangles_.forEach(function(w,R,L){y=Math.min(y,w.source[0][0],w.source[1][0],w.source[2][0])}),this.triangles_.forEach(w=>{if(Math.max(w.source[0][0],w.source[1][0],w.source[2][0])-y>this.sourceWorldWidth_/2){const R=[[w.source[0][0],w.source[0][1]],[w.source[1][0],w.source[1][1]],[w.source[2][0],w.source[2][1]]];R[0][0]-y>this.sourceWorldWidth_/2&&(R[0][0]-=this.sourceWorldWidth_),R[1][0]-y>this.sourceWorldWidth_/2&&(R[1][0]-=this.sourceWorldWidth_),R[2][0]-y>this.sourceWorldWidth_/2&&(R[2][0]-=this.sourceWorldWidth_);const L=Math.min(R[0][0],R[1][0],R[2][0]);Math.max(R[0][0],R[1][0],R[2][0])-L<this.sourceWorldWidth_/2&&(w.source=R)}})}a={}}addTriangle_(e,t,i,n,s,o){this.triangles_.push({source:[n,s,o],target:[e,t,i]})}addQuad_(e,t,i,n,s,o,a,l,h){const c=(0,T.Tr)([s,o,a,l]),d=this.sourceWorldWidth_?(0,T.RG)(c)/this.sourceWorldWidth_:null,u=this.sourceWorldWidth_,f=this.sourceProj_.canWrapX()&&d>.5&&d<1;let g=!1;if(h>0){if(this.targetProj_.isGlobal()&&this.targetWorldWidth_){const p=(0,T.Tr)([e,t,i,n]);g=(0,T.RG)(p)/this.targetWorldWidth_>no||g}!f&&this.sourceProj_.isGlobal()&&d&&(g=d>no||g)}if(!g&&this.maxSourceExtent_&&isFinite(c[0])&&isFinite(c[1])&&isFinite(c[2])&&isFinite(c[3])&&!(0,T.HY)(c,this.maxSourceExtent_))return;let m=0;if(!g&&(!isFinite(s[0])||!isFinite(s[1])||!isFinite(o[0])||!isFinite(o[1])||!isFinite(a[0])||!isFinite(a[1])||!isFinite(l[0])||!isFinite(l[1]))){if(h>0)g=!0;else if(m=(!isFinite(s[0])||!isFinite(s[1])?8:0)+(!isFinite(o[0])||!isFinite(o[1])?4:0)+(!isFinite(a[0])||!isFinite(a[1])?2:0)+(!isFinite(l[0])||!isFinite(l[1])?1:0),m!=1&&m!=2&&m!=4&&m!=8)return}if(h>0){if(!g){const p=[(e[0]+i[0])/2,(e[1]+i[1])/2],v=this.transformInv_(p);let y;f?y=((0,xe.xP)(s[0],u)+(0,xe.xP)(a[0],u))/2-(0,xe.xP)(v[0],u):y=(s[0]+a[0])/2-v[0];const w=(s[1]+a[1])/2-v[1];g=y*y+w*w>this.errorThresholdSquared_}if(g){if(Math.abs(e[0]-i[0])<=Math.abs(e[1]-i[1])){const p=[(t[0]+i[0])/2,(t[1]+i[1])/2],v=this.transformInv_(p),y=[(n[0]+e[0])/2,(n[1]+e[1])/2],w=this.transformInv_(y);this.addQuad_(e,t,p,y,s,o,v,w,h-1),this.addQuad_(y,p,i,n,w,v,a,l,h-1)}else{const p=[(e[0]+t[0])/2,(e[1]+t[1])/2],v=this.transformInv_(p),y=[(i[0]+n[0])/2,(i[1]+n[1])/2],w=this.transformInv_(y);this.addQuad_(e,p,y,n,s,v,w,l,h-1),this.addQuad_(p,t,i,y,v,o,a,w,h-1)}return}}if(f){if(!this.canWrapXInSource_)return;this.wrapsXInSource_=!0}m&11||this.addTriangle_(e,i,n,s,a,l),m&14||this.addTriangle_(e,i,t,s,a,o),m&&(m&13||this.addTriangle_(t,n,e,o,l,s),m&7||this.addTriangle_(t,n,i,o,l,a))}calculateSourceExtent(){const e=(0,T.S5)();return this.triangles_.forEach(function(t,i,n){const s=t.source;(0,T.$C)(e,s[0]),(0,T.$C)(e,s[1]),(0,T.$C)(e,s[2])}),e}getTriangles(){return this.triangles_}}const rh=sh;let Fs;const Pi=[];function so(r,e,t,i,n){r.beginPath(),r.moveTo(0,0),r.lineTo(e,t),r.lineTo(i,n),r.closePath(),r.save(),r.clip(),r.fillRect(0,0,Math.max(e,i)+1,Math.max(t,n)),r.restore()}function Ds(r,e){return Math.abs(r[e*4]-210)>2||Math.abs(r[e*4+3]-.75*255)>2}function oh(){if(Fs===void 0){const r=(0,Ge.Y)(6,6,Pi);r.globalCompositeOperation="lighter",r.fillStyle="rgba(210, 0, 0, 0.75)",so(r,4,5,4,0),so(r,4,5,0,5);const e=r.getImageData(0,0,3,3).data;Fs=Ds(e,0)||Ds(e,4)||Ds(e,8),(0,Ge.Yg)(r),Pi.push(r.canvas)}return Fs}function ro(r,e,t,i){const n=(0,X.pd)(t,e,r);let s=(0,X.hO)(e,i,t);const o=e.getMetersPerUnit();o!==void 0&&(s*=o);const a=r.getMetersPerUnit();a!==void 0&&(s/=a);const l=r.getExtent();if(!l||(0,T.Ym)(l,n)){const h=(0,X.hO)(r,s,n)/s;isFinite(h)&&h>0&&(s/=h)}return s}function ah(r,e,t,i){const n=(0,T.q1)(t);let s=ro(r,e,n,i);return(!isFinite(s)||s<=0)&&(0,T.sB)(t,function(o){return s=ro(r,e,o,i),isFinite(s)&&s>0}),s}function lh(r,e,t,i,n,s,o,a,l,h,c,d){const u=(0,Ge.Y)(Math.round(t*r),Math.round(t*e),Pi);if(d||(u.imageSmoothingEnabled=!1),l.length===0)return u.canvas;u.scale(t,t);function f(R){return Math.round(R*t)/t}u.globalCompositeOperation="lighter";const g=(0,T.S5)();l.forEach(function(R,L,D){(0,T.X$)(g,R.extent)});const m=(0,T.RG)(g),p=(0,T.Oq)(g),v=(0,Ge.Y)(Math.round(t*m/i),Math.round(t*p/i),Pi);d||(v.imageSmoothingEnabled=!1);const y=t/i;l.forEach(function(R,L,D){const b=R.extent[0]-g[0],N=-(R.extent[3]-g[3]),Z=(0,T.RG)(R.extent),q=(0,T.Oq)(R.extent);R.image.width>0&&R.image.height>0&&v.drawImage(R.image,h,h,R.image.width-2*h,R.image.height-2*h,b*y,N*y,Z*y,q*y)});const w=(0,T.Py)(o);return a.getTriangles().forEach(function(R,L,D){const b=R.source,N=R.target;let Z=b[0][0],q=b[0][1],he=b[1][0],le=b[1][1],Q=b[2][0],me=b[2][1];const J=f((N[0][0]-w[0])/s),Y=f(-(N[0][1]-w[1])/s),U=f((N[1][0]-w[0])/s),H=f(-(N[1][1]-w[1])/s),pe=f((N[2][0]-w[0])/s),we=f(-(N[2][1]-w[1])/s),ke=Z,B=q;Z=0,q=0,he-=ke,le-=B,Q-=ke,me-=B;const Qe=[[he,le,0,0,U-J],[Q,me,0,0,pe-J],[0,0,he,le,H-Y],[0,0,Q,me,we-Y]],Ce=(0,xe.KU)(Qe);if(Ce){if(u.save(),u.beginPath(),oh()||!d){u.moveTo(U,H);const Le=4,ri=J-U,kt=Y-H;for(let Ve=0;Ve<Le;Ve++)u.lineTo(U+f((Ve+1)*ri/Le),H+f(Ve*kt/(Le-1))),Ve!=Le-1&&u.lineTo(U+f((Ve+1)*ri/Le),H+f((Ve+1)*kt/(Le-1)));u.lineTo(pe,we)}else u.moveTo(U,H),u.lineTo(J,Y),u.lineTo(pe,we);u.clip(),u.transform(Ce[0],Ce[2],Ce[1],Ce[3],J,Y),u.translate(g[0]-ke,g[3]-B),u.scale(i/t,-i/t),u.drawImage(v.canvas,0,0),u.restore()}}),(0,Ge.Yg)(v),Pi.push(v.canvas),c&&(u.save(),u.globalCompositeOperation="source-over",u.strokeStyle="black",u.lineWidth=1,a.getTriangles().forEach(function(R,L,D){const b=R.target,N=(b[0][0]-w[0])/s,Z=-(b[0][1]-w[1])/s,q=(b[1][0]-w[0])/s,he=-(b[1][1]-w[1])/s,le=(b[2][0]-w[0])/s,Q=-(b[2][1]-w[1])/s;u.beginPath(),u.moveTo(q,he),u.lineTo(N,Z),u.lineTo(le,Q),u.closePath(),u.stroke()}),u.restore()),u.canvas}class hh extends to{constructor(e,t,i,n,s,o,a,l,h,c,d,u){super(s,ae.A.IDLE,{interpolate:!!u}),this.renderEdges_=d!==void 0?d:!1,this.pixelRatio_=a,this.gutter_=l,this.canvas_=null,this.sourceTileGrid_=t,this.targetTileGrid_=n,this.wrappedTileCoord_=o||s,this.sourceTiles_=[],this.sourcesListenerKeys_=null,this.sourceZ_=0;const f=n.getTileCoordExtent(this.wrappedTileCoord_),g=this.targetTileGrid_.getExtent();let m=this.sourceTileGrid_.getExtent();const p=g?(0,T._N)(f,g):f;if((0,T.UG)(p)===0){this.state=ae.A.EMPTY;return}const v=e.getExtent();v&&(m?m=(0,T._N)(m,v):m=v);const y=n.getResolution(this.wrappedTileCoord_[0]),w=ah(e,i,p,y);if(!isFinite(w)||w<=0){this.state=ae.A.EMPTY;return}const R=c!==void 0?c:ih;if(this.triangulation_=new rh(e,i,p,m,w*R,y),this.triangulation_.getTriangles().length===0){this.state=ae.A.EMPTY;return}this.sourceZ_=t.getZForResolution(w);let L=this.triangulation_.calculateSourceExtent();if(m&&(e.canWrapX()?(L[1]=(0,xe.qE)(L[1],m[1],m[3]),L[3]=(0,xe.qE)(L[3],m[1],m[3])):L=(0,T._N)(L,m)),!(0,T.UG)(L))this.state=ae.A.EMPTY;else{const D=t.getTileRangeForExtentAndZ(L,this.sourceZ_);for(let b=D.minX;b<=D.maxX;b++)for(let N=D.minY;N<=D.maxY;N++){const Z=h(this.sourceZ_,b,N,a);Z&&this.sourceTiles_.push(Z)}this.sourceTiles_.length===0&&(this.state=ae.A.EMPTY)}}getImage(){return this.canvas_}reproject_(){const e=[];if(this.sourceTiles_.forEach(t=>{t&&t.getState()==ae.A.LOADED&&e.push({extent:this.sourceTileGrid_.getTileCoordExtent(t.tileCoord),image:t.getImage()})}),this.sourceTiles_.length=0,e.length===0)this.state=ae.A.ERROR;else{const t=this.wrappedTileCoord_[0],i=this.targetTileGrid_.getTileSize(t),n=typeof i=="number"?i:i[0],s=typeof i=="number"?i:i[1],o=this.targetTileGrid_.getResolution(t),a=this.sourceTileGrid_.getResolution(this.sourceZ_),l=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_);this.canvas_=lh(n,s,this.pixelRatio_,a,this.sourceTileGrid_.getExtent(),o,l,this.triangulation_,e,this.gutter_,this.renderEdges_,this.interpolate),this.state=ae.A.LOADED}this.changed()}load(){if(this.state==ae.A.IDLE){this.state=ae.A.LOADING,this.changed();let e=0;this.sourcesListenerKeys_=[],this.sourceTiles_.forEach(t=>{const i=t.getState();if(i==ae.A.IDLE||i==ae.A.LOADING){e++;const n=(0,Je.KT)(t,st.A.CHANGE,function(s){const o=t.getState();(o==ae.A.LOADED||o==ae.A.ERROR||o==ae.A.EMPTY)&&((0,Je.JH)(n),e--,e===0&&(this.unlistenSources_(),this.reproject_()))},this);this.sourcesListenerKeys_.push(n)}}),e===0?setTimeout(this.reproject_.bind(this),0):this.sourceTiles_.forEach(function(t,i,n){t.getState()==ae.A.IDLE&&t.load()})}}unlistenSources_(){this.sourcesListenerKeys_.forEach(Je.JH),this.sourcesListenerKeys_=null}release(){this.canvas_&&((0,Ge.Yg)(this.canvas_.getContext("2d")),Pi.push(this.canvas_),this.canvas_=null),super.release()}}const Ps=hh;class oo{constructor(e,t,i,n){this.minX=e,this.maxX=t,this.minY=i,this.maxY=n}contains(e){return this.containsXY(e[1],e[2])}containsTileRange(e){return this.minX<=e.minX&&e.maxX<=this.maxX&&this.minY<=e.minY&&e.maxY<=this.maxY}containsXY(e,t){return this.minX<=e&&e<=this.maxX&&this.minY<=t&&t<=this.maxY}equals(e){return this.minX==e.minX&&this.minY==e.minY&&this.maxX==e.maxX&&this.maxY==e.maxY}extend(e){e.minX<this.minX&&(this.minX=e.minX),e.maxX>this.maxX&&(this.maxX=e.maxX),e.minY<this.minY&&(this.minY=e.minY),e.maxY>this.maxY&&(this.maxY=e.maxY)}getHeight(){return this.maxY-this.minY+1}getSize(){return[this.getWidth(),this.getHeight()]}getWidth(){return this.maxX-this.minX+1}intersects(e){return this.minX<=e.maxX&&this.maxX>=e.minX&&this.minY<=e.maxY&&this.maxY>=e.minY}}function Oi(r,e,t,i,n){return n!==void 0?(n.minX=r,n.maxX=e,n.minY=t,n.maxY=i,n):new oo(r,e,t,i)}const ao=oo;class ch extends Sr{constructor(e){super(e),this.extentChanged=!0,this.renderedExtent_=null,this.renderedPixelRatio,this.renderedProjection=null,this.renderedRevision,this.renderedTiles=[],this.newTiles_=!1,this.tmpExtent=(0,T.S5)(),this.tmpTileRange_=new ao(0,0,0,0)}isDrawableTile(e){const t=this.getLayer(),i=e.getState(),n=t.getUseInterimTilesOnError();return i==ae.A.LOADED||i==ae.A.EMPTY||i==ae.A.ERROR&&!n}getTile(e,t,i,n){const s=n.pixelRatio,o=n.viewState.projection,a=this.getLayer();let h=a.getSource().getTile(e,t,i,s,o);return h.getState()==ae.A.ERROR&&a.getUseInterimTilesOnError()&&a.getPreload()>0&&(this.newTiles_=!0),this.isDrawableTile(h)||(h=h.getInterimTile()),h}getData(e){const t=this.frameState;if(!t)return null;const i=this.getLayer(),n=(0,te.Bb)(t.pixelToCoordinateTransform,e.slice()),s=i.getExtent();if(s&&!(0,T.Ym)(s,n))return null;const o=t.pixelRatio,a=t.viewState.projection,l=t.viewState,h=i.getRenderSource(),c=h.getTileGridForProjection(l.projection),d=h.getTilePixelRatio(t.pixelRatio);for(let u=c.getZForResolution(l.resolution);u>=c.getMinZoom();--u){const f=c.getTileCoordForCoordAndZ(n,u),g=h.getTile(u,f[1],f[2],o,a);if(!(g instanceof io||g instanceof Ps)||g instanceof Ps&&g.getState()===ae.A.EMPTY)return null;if(g.getState()!==ae.A.LOADED)continue;const m=c.getOrigin(u),p=(0,ht.xq)(c.getTileSize(u)),v=c.getResolution(u),y=Math.floor(d*((n[0]-m[0])/v-f[1]*p[0])),w=Math.floor(d*((m[1]-n[1])/v-f[2]*p[1])),R=Math.round(d*h.getGutterForProjection(l.projection));return this.getImageData(g.getImage(),y+R,w+R)}return null}loadedTileCallback(e,t,i){return this.isDrawableTile(i)?super.loadedTileCallback(e,t,i):!1}prepareFrame(e){return!!this.getLayer().getSource()}renderFrame(e,t){const i=e.layerStatesArray[e.layerIndex],n=e.viewState,s=n.projection,o=n.resolution,a=n.center,l=n.rotation,h=e.pixelRatio,c=this.getLayer(),d=c.getSource(),u=d.getRevision(),f=d.getTileGridForProjection(s),g=f.getZForResolution(o,d.zDirection),m=f.getResolution(g);let p=e.extent;const v=e.viewState.resolution,y=d.getTilePixelRatio(h),w=Math.round((0,T.RG)(p)/v*h),R=Math.round((0,T.Oq)(p)/v*h),L=i.extent&&(0,X.SD)(i.extent,s);L&&(p=(0,T._N)(p,(0,X.SD)(i.extent,s)));const D=m*w/2/y,b=m*R/2/y,N=[a[0]-D,a[1]-b,a[0]+D,a[1]+b],Z=f.getTileRangeForExtentAndZ(p,g),q={};q[g]={};const he=this.createLoadedTileFinder(d,s,q),le=this.tmpExtent,Q=this.tmpTileRange_;this.newTiles_=!1;const me=l?(0,T.Yw)(n.center,v,l,e.size):void 0;for(let Qe=Z.minX;Qe<=Z.maxX;++Qe)for(let Ce=Z.minY;Ce<=Z.maxY;++Ce){if(l&&!f.tileCoordIntersectsViewport([g,Qe,Ce],me))continue;const Le=this.getTile(g,Qe,Ce,e);if(this.isDrawableTile(Le)){const Ve=(0,$.v6)(this);if(Le.getState()==ae.A.LOADED){q[g][Le.tileCoord.toString()]=Le;let Yt=Le.inTransition(Ve);Yt&&i.opacity!==1&&(Le.endTransition(Ve),Yt=!1),!this.newTiles_&&(Yt||!this.renderedTiles.includes(Le))&&(this.newTiles_=!0)}if(Le.getAlpha(Ve,e.time)===1)continue}const ri=f.getTileCoordChildTileRange(Le.tileCoord,Q,le);let kt=!1;ri&&(kt=he(g+1,ri)),kt||f.forEachTileCoordParentTileRange(Le.tileCoord,he,Q,le)}const J=m/o*h/y;(0,te.Zz)(this.pixelTransform,e.size[0]/2,e.size[1]/2,1/h,1/h,l,-w/2,-R/2);const Y=(0,te.dI)(this.pixelTransform);this.useContainer(t,Y,this.getBackground(e));const U=this.context,H=U.canvas;(0,te.T9)(this.inversePixelTransform,this.pixelTransform),(0,te.Zz)(this.tempTransform,w/2,R/2,J,J,0,-w/2,-R/2),H.width!=w||H.height!=R?(H.width=w,H.height=R):this.containerReused||U.clearRect(0,0,w,R),L&&this.clipUnrotated(U,e,L),d.getInterpolate()||(U.imageSmoothingEnabled=!1),this.preRender(U,e),this.renderedTiles.length=0;let pe=Object.keys(q).map(Number);pe.sort($e.V_);let we,ke,B;i.opacity===1&&(!this.containerReused||d.getOpaque(e.viewState.projection))?pe=pe.reverse():(we=[],ke=[]);for(let Qe=pe.length-1;Qe>=0;--Qe){const Ce=pe[Qe],Le=d.getTilePixelSize(Ce,h,s),kt=f.getResolution(Ce)/m,Ve=Le[0]*kt*J,Yt=Le[1]*kt*J,Wi=f.getTileCoordForCoordAndZ((0,T.Py)(N),Ce),Jn=f.getTileCoordExtent(Wi),Ui=(0,te.Bb)(this.tempTransform,[y*(Jn[0]-N[0])/m,y*(N[3]-Jn[3])/m]),$n=y*d.getGutterForProjection(s),oi=q[Ce];for(const fn in oi){const ai=oi[fn],qn=ai.tileCoord,Qn=Wi[1]-qn[1],es=Math.round(Ui[0]-(Qn-1)*Ve),Yi=Wi[2]-qn[2],sr=Math.round(Ui[1]-(Yi-1)*Yt),ot=Math.round(Ui[0]-Qn*Ve),vt=Math.round(Ui[1]-Yi*Yt),bt=es-ot,Xt=sr-vt,Xi=g===Ce,Ei=Xi&&ai.getAlpha((0,$.v6)(this),e.time)!==1;let li=!1;if(!Ei)if(we){B=[ot,vt,ot+bt,vt,ot+bt,vt+Xt,ot,vt+Xt];for(let Vi=0,ts=we.length;Vi<ts;++Vi)if(g!==Ce&&Ce<ke[Vi]){const et=we[Vi];(0,T.HY)([ot,vt,ot+bt,vt+Xt],[et[0],et[3],et[4],et[7]])&&(li||(U.save(),li=!0),U.beginPath(),U.moveTo(B[0],B[1]),U.lineTo(B[2],B[3]),U.lineTo(B[4],B[5]),U.lineTo(B[6],B[7]),U.moveTo(et[6],et[7]),U.lineTo(et[4],et[5]),U.lineTo(et[2],et[3]),U.lineTo(et[0],et[1]),U.clip())}we.push(B),ke.push(Ce)}else U.clearRect(ot,vt,bt,Xt);this.drawTileImage(ai,e,ot,vt,bt,Xt,$n,Xi),we&&!Ei?(li&&U.restore(),this.renderedTiles.unshift(ai)):this.renderedTiles.push(ai),this.updateUsedTiles(e.usedTiles,d,ai)}}return this.renderedRevision=u,this.renderedResolution=m,this.extentChanged=!this.renderedExtent_||!(0,T.aI)(this.renderedExtent_,N),this.renderedExtent_=N,this.renderedPixelRatio=h,this.renderedProjection=s,this.manageTilePyramid(e,d,f,h,s,p,g,c.getPreload()),this.scheduleExpireCache(e,d),this.postRender(U,e),i.extent&&U.restore(),U.imageSmoothingEnabled=!0,Y!==H.style.transform&&(H.style.transform=Y),this.container}drawTileImage(e,t,i,n,s,o,a,l){const h=this.getTileImage(e);if(!h)return;const c=(0,$.v6)(this),d=t.layerStatesArray[t.layerIndex],u=d.opacity*(l?e.getAlpha(c,t.time):1),f=u!==this.context.globalAlpha;f&&(this.context.save(),this.context.globalAlpha=u),this.context.drawImage(h,a,a,h.width-2*a,h.height-2*a,i,n,s,o),f&&this.context.restore(),u!==d.opacity?t.animate=!0:l&&e.endTransition(c)}getImage(){const e=this.context;return e?e.canvas:null}getTileImage(e){return e.getImage()}scheduleExpireCache(e,t){if(t.canExpireCache()){const i=function(n,s,o){const a=(0,$.v6)(n);a in o.usedTiles&&n.expireCache(o.viewState.projection,o.usedTiles[a])}.bind(null,t);e.postRenderFunctions.push(i)}}updateUsedTiles(e,t,i){const n=(0,$.v6)(t);n in e||(e[n]={}),e[n][i.getKey()]=!0}manageTilePyramid(e,t,i,n,s,o,a,l,h){const c=(0,$.v6)(t);c in e.wantedTiles||(e.wantedTiles[c]={});const d=e.wantedTiles[c],u=e.tileQueue,f=i.getMinZoom(),g=e.viewState.rotation,m=g?(0,T.Yw)(e.viewState.center,e.viewState.resolution,g,e.size):void 0;let p=0,v,y,w,R,L,D;for(D=f;D<=a;++D)for(y=i.getTileRangeForExtentAndZ(o,D,y),w=i.getResolution(D),R=y.minX;R<=y.maxX;++R)for(L=y.minY;L<=y.maxY;++L)g&&!i.tileCoordIntersectsViewport([D,R,L],m)||(a-D<=l?(++p,v=t.getTile(D,R,L,n,s),v.getState()==ae.A.IDLE&&(d[v.getKey()]=!0,u.isKeyQueued(v.getKey())||u.enqueue([v,c,i.getTileCoordCenter(v.tileCoord),w])),h!==void 0&&h(v)):t.useTile(D,R,L,s));t.updateCacheSize(p,s)}}const uh=ch;class dh extends $l{constructor(e){super(e)}createRenderer(){return new uh(this)}}const Os=dh;class fh{constructor(e){this.highWaterMark=e!==void 0?e:2048,this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null}canExpireCache(){return this.highWaterMark>0&&this.getCount()>this.highWaterMark}expireCache(e){for(;this.canExpireCache();)this.pop()}clear(){this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null}containsKey(e){return this.entries_.hasOwnProperty(e)}forEach(e){let t=this.oldest_;for(;t;)e(t.value_,t.key_,this),t=t.newer}get(e,t){const i=this.entries_[e];return(0,ue.v)(i!==void 0,15),i===this.newest_||(i===this.oldest_?(this.oldest_=this.oldest_.newer,this.oldest_.older=null):(i.newer.older=i.older,i.older.newer=i.newer),i.newer=null,i.older=this.newest_,this.newest_.newer=i,this.newest_=i),i.value_}remove(e){const t=this.entries_[e];return(0,ue.v)(t!==void 0,15),t===this.newest_?(this.newest_=t.older,this.newest_&&(this.newest_.newer=null)):t===this.oldest_?(this.oldest_=t.newer,this.oldest_&&(this.oldest_.older=null)):(t.newer.older=t.older,t.older.newer=t.newer),delete this.entries_[e],--this.count_,t.value_}getCount(){return this.count_}getKeys(){const e=new Array(this.count_);let t=0,i;for(i=this.newest_;i;i=i.older)e[t++]=i.key_;return e}getValues(){const e=new Array(this.count_);let t=0,i;for(i=this.newest_;i;i=i.older)e[t++]=i.value_;return e}peekLast(){return this.oldest_.value_}peekLastKey(){return this.oldest_.key_}peekFirstKey(){return this.newest_.key_}peek(e){if(this.containsKey(e))return this.entries_[e].value_}pop(){const e=this.oldest_;return delete this.entries_[e.key_],e.newer&&(e.newer.older=null),this.oldest_=e.newer,this.oldest_||(this.newest_=null),--this.count_,e.value_}replace(e,t){this.get(e),this.entries_[e].value_=t}set(e,t){(0,ue.v)(!(e in this.entries_),16);const i={key_:e,newer:null,older:this.newest_,value_:t};this.newest_?this.newest_.newer=i:this.oldest_=i,this.newest_=i,this.entries_[e]=i,++this.count_}setSize(e){this.highWaterMark=e}}const gh=fh;function lo(r,e,t,i){return i!==void 0?(i[0]=r,i[1]=e,i[2]=t,i):[r,e,t]}function on(r,e,t){return r+"/"+e+"/"+t}function ho(r){return on(r[0],r[1],r[2])}function Fu(r){const[e,t,i]=r.substring(r.lastIndexOf("/")+1,r.length).split(",").map(Number);return on(e,t,i)}function mh(r){return r.split("/").map(Number)}function ph(r){return(r[1]<<r[0])+r[2]}function _h(r,e){const t=r[0],i=r[1],n=r[2];if(e.getMinZoom()>t||t>e.getMaxZoom())return!1;const s=e.getFullTileRange(t);return s?s.containsXY(i,n):!0}class xh extends gh{clear(){for(;this.getCount()>0;)this.pop().release();super.clear()}expireCache(e){for(;this.canExpireCache()&&!(this.peekLast().getKey()in e);)this.pop().release()}pruneExceptNewestZ(){if(this.getCount()===0)return;const e=this.peekFirstKey(),i=mh(e)[0];this.forEach(n=>{n.tileCoord[0]!==i&&(this.remove(ho(n.tileCoord)),n.release())})}}const co=xh,ks={TILELOADSTART:"tileloadstart",TILELOADEND:"tileloadend",TILELOADERROR:"tileloaderror"};var Bs=C(57115),yh=C(4350);const ki=[0,0,0],ii=5;class vh{constructor(e){this.minZoom=e.minZoom!==void 0?e.minZoom:0,this.resolutions_=e.resolutions,(0,ue.v)((0,$e.WC)(this.resolutions_,function(n,s){return s-n},!0),17);let t;if(!e.origins){for(let n=0,s=this.resolutions_.length-1;n<s;++n)if(!t)t=this.resolutions_[n]/this.resolutions_[n+1];else if(this.resolutions_[n]/this.resolutions_[n+1]!==t){t=void 0;break}}this.zoomFactor_=t,this.maxZoom=this.resolutions_.length-1,this.origin_=e.origin!==void 0?e.origin:null,this.origins_=null,e.origins!==void 0&&(this.origins_=e.origins,(0,ue.v)(this.origins_.length==this.resolutions_.length,20));const i=e.extent;i!==void 0&&!this.origin_&&!this.origins_&&(this.origin_=(0,T.Py)(i)),(0,ue.v)(!this.origin_&&this.origins_||this.origin_&&!this.origins_,18),this.tileSizes_=null,e.tileSizes!==void 0&&(this.tileSizes_=e.tileSizes,(0,ue.v)(this.tileSizes_.length==this.resolutions_.length,19)),this.tileSize_=e.tileSize!==void 0?e.tileSize:this.tileSizes_?null:Bs.R,(0,ue.v)(!this.tileSize_&&this.tileSizes_||this.tileSize_&&!this.tileSizes_,22),this.extent_=i!==void 0?i:null,this.fullTileRanges_=null,this.tmpSize_=[0,0],this.tmpExtent_=[0,0,0,0],e.sizes!==void 0?this.fullTileRanges_=e.sizes.map(function(n,s){const o=new ao(Math.min(0,n[0]),Math.max(n[0]-1,-1),Math.min(0,n[1]),Math.max(n[1]-1,-1));if(i){const a=this.getTileRangeForExtentAndZ(i,s);o.minX=Math.max(a.minX,o.minX),o.maxX=Math.min(a.maxX,o.maxX),o.minY=Math.max(a.minY,o.minY),o.maxY=Math.min(a.maxY,o.maxY)}return o},this):i&&this.calculateTileRanges_(i)}forEachTileCoord(e,t,i){const n=this.getTileRangeForExtentAndZ(e,t);for(let s=n.minX,o=n.maxX;s<=o;++s)for(let a=n.minY,l=n.maxY;a<=l;++a)i([t,s,a])}forEachTileCoordParentTileRange(e,t,i,n){let s,o,a,l=null,h=e[0]-1;for(this.zoomFactor_===2?(o=e[1],a=e[2]):l=this.getTileCoordExtent(e,n);h>=this.minZoom;){if(this.zoomFactor_===2?(o=Math.floor(o/2),a=Math.floor(a/2),s=Oi(o,o,a,a,i)):s=this.getTileRangeForExtentAndZ(l,h,i),t(h,s))return!0;--h}return!1}getExtent(){return this.extent_}getMaxZoom(){return this.maxZoom}getMinZoom(){return this.minZoom}getOrigin(e){return this.origin_?this.origin_:this.origins_[e]}getResolution(e){return this.resolutions_[e]}getResolutions(){return this.resolutions_}getTileCoordChildTileRange(e,t,i){if(e[0]<this.maxZoom){if(this.zoomFactor_===2){const s=e[1]*2,o=e[2]*2;return Oi(s,s+1,o,o+1,t)}const n=this.getTileCoordExtent(e,i||this.tmpExtent_);return this.getTileRangeForExtentAndZ(n,e[0]+1,t)}return null}getTileRangeForTileCoordAndZ(e,t,i){if(t>this.maxZoom||t<this.minZoom)return null;const n=e[0],s=e[1],o=e[2];if(t===n)return Oi(s,o,s,o,i);if(this.zoomFactor_){const l=Math.pow(this.zoomFactor_,t-n),h=Math.floor(s*l),c=Math.floor(o*l);if(t<n)return Oi(h,h,c,c,i);const d=Math.floor(l*(s+1))-1,u=Math.floor(l*(o+1))-1;return Oi(h,d,c,u,i)}const a=this.getTileCoordExtent(e,this.tmpExtent_);return this.getTileRangeForExtentAndZ(a,t,i)}getTileRangeForExtentAndZ(e,t,i){this.getTileCoordForXYAndZ_(e[0],e[3],t,!1,ki);const n=ki[1],s=ki[2];this.getTileCoordForXYAndZ_(e[2],e[1],t,!0,ki);const o=ki[1],a=ki[2];return Oi(n,o,s,a,i)}getTileCoordCenter(e){const t=this.getOrigin(e[0]),i=this.getResolution(e[0]),n=(0,ht.xq)(this.getTileSize(e[0]),this.tmpSize_);return[t[0]+(e[1]+.5)*n[0]*i,t[1]-(e[2]+.5)*n[1]*i]}getTileCoordExtent(e,t){const i=this.getOrigin(e[0]),n=this.getResolution(e[0]),s=(0,ht.xq)(this.getTileSize(e[0]),this.tmpSize_),o=i[0]+e[1]*s[0]*n,a=i[1]-(e[2]+1)*s[1]*n,l=o+s[0]*n,h=a+s[1]*n;return(0,T.N)(o,a,l,h,t)}getTileCoordForCoordAndResolution(e,t,i){return this.getTileCoordForXYAndResolution_(e[0],e[1],t,!1,i)}getTileCoordForXYAndResolution_(e,t,i,n,s){const o=this.getZForResolution(i),a=i/this.getResolution(o),l=this.getOrigin(o),h=(0,ht.xq)(this.getTileSize(o),this.tmpSize_);let c=a*(e-l[0])/i/h[0],d=a*(l[1]-t)/i/h[1];return n?(c=(0,xe.mk)(c,ii)-1,d=(0,xe.mk)(d,ii)-1):(c=(0,xe.RI)(c,ii),d=(0,xe.RI)(d,ii)),lo(o,c,d,s)}getTileCoordForXYAndZ_(e,t,i,n,s){const o=this.getOrigin(i),a=this.getResolution(i),l=(0,ht.xq)(this.getTileSize(i),this.tmpSize_);let h=(e-o[0])/a/l[0],c=(o[1]-t)/a/l[1];return n?(h=(0,xe.mk)(h,ii)-1,c=(0,xe.mk)(c,ii)-1):(h=(0,xe.RI)(h,ii),c=(0,xe.RI)(c,ii)),lo(i,h,c,s)}getTileCoordForCoordAndZ(e,t,i){return this.getTileCoordForXYAndZ_(e[0],e[1],t,!1,i)}getTileCoordResolution(e){return this.resolutions_[e[0]]}getTileSize(e){return this.tileSize_?this.tileSize_:this.tileSizes_[e]}getFullTileRange(e){return this.fullTileRanges_?this.fullTileRanges_[e]:this.extent_?this.getTileRangeForExtentAndZ(this.extent_,e):null}getZForResolution(e,t){const i=(0,$e.FT)(this.resolutions_,e,t||0);return(0,xe.qE)(i,this.minZoom,this.maxZoom)}tileCoordIntersectsViewport(e,t){return(0,yh.sj)(t,0,t.length,2,this.getTileCoordExtent(e))}calculateTileRanges_(e){const t=this.resolutions_.length,i=new Array(t);for(let n=this.minZoom;n<t;++n)i[n]=this.getTileRangeForExtentAndZ(e,n);this.fullTileRanges_=i}}const uo=vh;function fo(r){let e=r.getDefaultTileGrid();return e||(e=Ch(r),r.setDefaultTileGrid(e)),e}function Eh(r,e,t){const i=e[0],n=r.getTileCoordCenter(e),s=zs(t);if(!(0,T.Ym)(s,n)){const o=(0,T.RG)(s),a=Math.ceil((s[0]-n[0])/o);return n[0]+=o*a,r.getTileCoordForCoordAndZ(n,i)}return e}function wh(r,e,t,i){i=i!==void 0?i:"top-left";const n=go(r,e,t);return new uo({extent:r,origin:(0,T.qF)(r,i),resolutions:n,tileSize:t})}function Th(r){const e=r||{},t=e.extent||(0,X.Jt)("EPSG:3857").getExtent(),i={extent:t,minZoom:e.minZoom,tileSize:e.tileSize,resolutions:go(t,e.maxZoom,e.tileSize,e.maxResolution)};return new uo(i)}function go(r,e,t,i){e=e!==void 0?e:Bs.L,t=(0,ht.xq)(t!==void 0?t:Bs.R);const n=(0,T.Oq)(r),s=(0,T.RG)(r);i=i>0?i:Math.max(s/t[0],n/t[1]);const o=e+1,a=new Array(o);for(let l=0;l<o;++l)a[l]=i/Math.pow(2,l);return a}function Ch(r,e,t,i){const n=zs(r);return wh(n,e,t,i)}function zs(r){r=(0,X.Jt)(r);let e=r.getExtent();if(!e){const t=180*X.Ig.degrees/r.getMetersPerUnit();e=(0,T.N)(-t,-t,t,t)}return e}class Sh extends Dr{constructor(e){super({attributions:e.attributions,attributionsCollapsible:e.attributionsCollapsible,projection:e.projection,state:e.state,wrapX:e.wrapX,interpolate:e.interpolate}),this.on,this.once,this.un,this.opaque_=e.opaque!==void 0?e.opaque:!1,this.tilePixelRatio_=e.tilePixelRatio!==void 0?e.tilePixelRatio:1,this.tileGrid=e.tileGrid!==void 0?e.tileGrid:null;const t=[256,256];this.tileGrid&&(0,ht.xq)(this.tileGrid.getTileSize(this.tileGrid.getMinZoom()),t),this.tileCache=new co(e.cacheSize||0),this.tmpSize=[0,0],this.key_=e.key||"",this.tileOptions={transition:e.transition,interpolate:e.interpolate},this.zDirection=e.zDirection?e.zDirection:0}canExpireCache(){return this.tileCache.canExpireCache()}expireCache(e,t){const i=this.getTileCacheForProjection(e);i&&i.expireCache(t)}forEachLoadedTile(e,t,i,n){const s=this.getTileCacheForProjection(e);if(!s)return!1;let o=!0,a,l,h;for(let c=i.minX;c<=i.maxX;++c)for(let d=i.minY;d<=i.maxY;++d)l=on(t,c,d),h=!1,s.containsKey(l)&&(a=s.get(l),h=a.getState()===ae.A.LOADED,h&&(h=n(a)!==!1)),h||(o=!1);return o}getGutterForProjection(e){return 0}getKey(){return this.key_}setKey(e){this.key_!==e&&(this.key_=e,this.changed())}getOpaque(e){return this.opaque_}getResolutions(e){const t=e?this.getTileGridForProjection(e):this.tileGrid;return t?t.getResolutions():null}getTile(e,t,i,n,s){return(0,$.b0)()}getTileGrid(){return this.tileGrid}getTileGridForProjection(e){return this.tileGrid?this.tileGrid:fo(e)}getTileCacheForProjection(e){const t=this.getProjection();return(0,ue.v)(t===null||(0,X.tI)(t,e),68),this.tileCache}getTilePixelRatio(e){return this.tilePixelRatio_}getTilePixelSize(e,t,i){const n=this.getTileGridForProjection(i),s=this.getTilePixelRatio(t),o=(0,ht.xq)(n.getTileSize(e),this.tmpSize);return s==1?o:(0,ht.hs)(o,s,this.tmpSize)}getTileCoordForTileUrlFunction(e,t){t=t!==void 0?t:this.getProjection();const i=this.getTileGridForProjection(t);return this.getWrapX()&&t.isGlobal()&&(e=Eh(i,e,t)),_h(e,i)?e:null}clear(){this.tileCache.clear()}refresh(){this.clear(),super.refresh()}updateCacheSize(e,t){const i=this.getTileCacheForProjection(t);e>i.highWaterMark&&(i.highWaterMark=e)}useTile(e,t,i,n){}}class Ih extends En.Ay{constructor(e,t){super(e),this.tile=t}}const Rh=Sh;function Ah(r,e){const t=/\{z\}/g,i=/\{x\}/g,n=/\{y\}/g,s=/\{-y\}/g;return function(o,a,l){if(o)return r.replace(t,o[0].toString()).replace(i,o[1].toString()).replace(n,o[2].toString()).replace(s,function(){const h=o[0],c=e.getFullTileRange(h);return(0,ue.v)(c,55),(c.getHeight()-o[2]-1).toString()})}}function bh(r,e){const t=r.length,i=new Array(t);for(let n=0;n<t;++n)i[n]=Ah(r[n],e);return Lh(i)}function Lh(r){return r.length===1?r[0]:function(e,t,i){if(!e)return;const n=ph(e),s=(0,xe.xP)(n,r.length);return r[s](e,t,i)}}function Du(r,e,t){}function Mh(r){const e=[];let t=/\{([a-z])-([a-z])\}/.exec(r);if(t){const i=t[1].charCodeAt(0),n=t[2].charCodeAt(0);let s;for(s=i;s<=n;++s)e.push(r.replace(t[0],String.fromCharCode(s)));return e}if(t=/\{(\d+)-(\d+)\}/.exec(r),t){const i=parseInt(t[2],10);for(let n=parseInt(t[1],10);n<=i;n++)e.push(r.replace(t[0],n.toString()));return e}return e.push(r),e}class Gs extends Rh{constructor(e){super({attributions:e.attributions,cacheSize:e.cacheSize,opaque:e.opaque,projection:e.projection,state:e.state,tileGrid:e.tileGrid,tilePixelRatio:e.tilePixelRatio,wrapX:e.wrapX,transition:e.transition,interpolate:e.interpolate,key:e.key,attributionsCollapsible:e.attributionsCollapsible,zDirection:e.zDirection}),this.generateTileUrlFunction_=this.tileUrlFunction===Gs.prototype.tileUrlFunction,this.tileLoadFunction=e.tileLoadFunction,e.tileUrlFunction&&(this.tileUrlFunction=e.tileUrlFunction),this.urls=null,e.urls?this.setUrls(e.urls):e.url&&this.setUrl(e.url),this.tileLoadingKeys_={}}getTileLoadFunction(){return this.tileLoadFunction}getTileUrlFunction(){return Object.getPrototypeOf(this).tileUrlFunction===this.tileUrlFunction?this.tileUrlFunction.bind(this):this.tileUrlFunction}getUrls(){return this.urls}handleTileChange(e){const t=e.target,i=(0,$.v6)(t),n=t.getState();let s;n==ae.A.LOADING?(this.tileLoadingKeys_[i]=!0,s=ks.TILELOADSTART):i in this.tileLoadingKeys_&&(delete this.tileLoadingKeys_[i],s=n==ae.A.ERROR?ks.TILELOADERROR:n==ae.A.LOADED?ks.TILELOADEND:void 0),s!=null&&this.dispatchEvent(new Ih(s,t))}setTileLoadFunction(e){this.tileCache.clear(),this.tileLoadFunction=e,this.changed()}setTileUrlFunction(e,t){this.tileUrlFunction=e,this.tileCache.pruneExceptNewestZ(),typeof t<"u"?this.setKey(t):this.changed()}setUrl(e){const t=Mh(e);this.urls=t,this.setUrls(t)}setUrls(e){this.urls=e;const t=e.join(` `);this.generateTileUrlFunction_?this.setTileUrlFunction(bh(e,this.tileGrid),t):this.setKey(t)}tileUrlFunction(e,t,i){}useTile(e,t,i){const n=on(e,t,i);this.tileCache.containsKey(n)&&this.tileCache.get(n)}}const Fh=Gs;class Dh extends Fh{constructor(e){super({attributions:e.attributions,cacheSize:e.cacheSize,opaque:e.opaque,projection:e.projection,state:e.state,tileGrid:e.tileGrid,tileLoadFunction:e.tileLoadFunction?e.tileLoadFunction:Ph,tilePixelRatio:e.tilePixelRatio,tileUrlFunction:e.tileUrlFunction,url:e.url,urls:e.urls,wrapX:e.wrapX,transition:e.transition,interpolate:e.interpolate!==void 0?e.interpolate:!0,key:e.key,attributionsCollapsible:e.attributionsCollapsible,zDirection:e.zDirection}),this.crossOrigin=e.crossOrigin!==void 0?e.crossOrigin:null,this.tileClass=e.tileClass!==void 0?e.tileClass:io,this.tileCacheForProjection={},this.tileGridForProjection={},this.reprojectionErrorThreshold_=e.reprojectionErrorThreshold,this.renderReprojectionEdges_=!1}canExpireCache(){if(this.tileCache.canExpireCache())return!0;for(const e in this.tileCacheForProjection)if(this.tileCacheForProjection[e].canExpireCache())return!0;return!1}expireCache(e,t){const i=this.getTileCacheForProjection(e);this.tileCache.expireCache(this.tileCache==i?t:{});for(const n in this.tileCacheForProjection){const s=this.tileCacheForProjection[n];s.expireCache(s==i?t:{})}}getGutterForProjection(e){return this.getProjection()&&e&&!(0,X.tI)(this.getProjection(),e)?0:this.getGutter()}getGutter(){return 0}getKey(){let e=super.getKey();return this.getInterpolate()||(e+=":disable-interpolation"),e}getOpaque(e){return this.getProjection()&&e&&!(0,X.tI)(this.getProjection(),e)?!1:super.getOpaque(e)}getTileGridForProjection(e){const t=this.getProjection();if(this.tileGrid&&(!t||(0,X.tI)(t,e)))return this.tileGrid;const i=(0,$.v6)(e);return i in this.tileGridForProjection||(this.tileGridForProjection[i]=fo(e)),this.tileGridForProjection[i]}getTileCacheForProjection(e){const t=this.getProjection();if(!t||(0,X.tI)(t,e))return this.tileCache;const i=(0,$.v6)(e);return i in this.tileCacheForProjection||(this.tileCacheForProjection[i]=new co(this.tileCache.highWaterMark)),this.tileCacheForProjection[i]}createTile_(e,t,i,n,s,o){const a=[e,t,i],l=this.getTileCoordForTileUrlFunction(a,s),h=l?this.tileUrlFunction(l,n,s):void 0,c=new this.tileClass(a,h!==void 0?ae.A.IDLE:ae.A.EMPTY,h!==void 0?h:"",this.crossOrigin,this.tileLoadFunction,this.tileOptions);return c.key=o,c.addEventListener(st.A.CHANGE,this.handleTileChange.bind(this)),c}getTile(e,t,i,n,s){const o=this.getProjection();if(!o||!s||(0,X.tI)(o,s))return this.getTileInternal(e,t,i,n,o||s);const a=this.getTileCacheForProjection(s),l=[e,t,i];let h;const c=ho(l);a.containsKey(c)&&(h=a.get(c));const d=this.getKey();if(h&&h.key==d)return h;const u=this.getTileGridForProjection(o),f=this.getTileGridForProjection(s),g=this.getTileCoordForTileUrlFunction(l,s),m=new Ps(o,u,s,f,l,g,this.getTilePixelRatio(n),this.getGutter(),(p,v,y,w)=>this.getTileInternal(p,v,y,w,o),this.reprojectionErrorThreshold_,this.renderReprojectionEdges_,this.getInterpolate());return m.key=d,h?(m.interimTile=h,m.refreshInterimChain(),a.replace(c,m)):a.set(c,m),m}getTileInternal(e,t,i,n,s){let o=null;const a=on(e,t,i),l=this.getKey();if(!this.tileCache.containsKey(a))o=this.createTile_(e,t,i,n,s,l),this.tileCache.set(a,o);else if(o=this.tileCache.get(a),o.key!=l){const h=o;o=this.createTile_(e,t,i,n,s,l),h.getState()==ae.A.IDLE?o.interimTile=h.interimTile:o.interimTile=h,o.refreshInterimChain(),this.tileCache.replace(a,o)}return o}setRenderReprojectionEdges(e){if(this.renderReprojectionEdges_!=e){this.renderReprojectionEdges_=e;for(const t in this.tileCacheForProjection)this.tileCacheForProjection[t].clear();this.changed()}}setTileGridForProjection(e,t){const i=(0,X.Jt)(e);if(i){const n=(0,$.v6)(i);n in this.tileGridForProjection||(this.tileGridForProjection[n]=t)}}clear(){super.clear();for(const e in this.tileCacheForProjection)this.tileCacheForProjection[e].clear()}}function Ph(r,e){r.getImage().src=e}const Oh=Dh;class kh extends Oh{constructor(e){e=e||{};const t=e.projection!==void 0?e.projection:"EPSG:3857",i=e.tileGrid!==void 0?e.tileGrid:Th({extent:zs(t),maxResolution:e.maxResolution,maxZoom:e.maxZoom,minZoom:e.minZoom,tileSize:e.tileSize});super({attributions:e.attributions,cacheSize:e.cacheSize,crossOrigin:e.crossOrigin,interpolate:e.interpolate,opaque:e.opaque,projection:t,reprojectionErrorThreshold:e.reprojectionErrorThreshold,tileGrid:i,tileLoadFunction:e.tileLoadFunction,tilePixelRatio:e.tilePixelRatio,tileUrlFunction:e.tileUrlFunction,url:e.url,urls:e.urls,wrapX:e.wrapX!==void 0?e.wrapX:!0,transition:e.transition,attributionsCollapsible:e.attributionsCollapsible,zDirection:e.zDirection}),this.gutter_=e.gutter!==void 0?e.gutter:0}getGutter(){return this.gutter_}}const Ns=kh;var Bh=(r=>(r.Auto="auto",r.Light="light",r.Dark="dark",r))(Bh||{});const zn={theme:"auto",showLabels:!0},mo={id:"carto",name:"CARTO basemap",description:"Add layer CARTO Raster basemaps",isBaseMap:!0,defaultOptions:zn,create:async(r,e,t,i)=>({init:()=>{const n={...zn,...e.config};let s=n.theme;return(!s||s==="auto")&&(s=i.isDark?"dark":"light"),n.showLabels?s+="_all":s+="_nolabels",new Os({source:new Ns({attributions:'<a href="https://carto.com/attribution/">\xA9 CARTO</a>',url:`https://{1-4}.basemaps.cartocdn.com/${s}/{z}/{x}/{y}.png`})})},registerOptionsUI:n=>{n.addRadio({path:"config.theme",name:"Theme",settings:{options:[{value:"auto",label:"Auto",description:"Match grafana theme"},{value:"light",label:"Light"},{value:"dark",label:"Dark"}]},defaultValue:zn.theme}).addBooleanSwitch({path:"config.showLabels",name:"Show labels",description:"",defaultValue:zn.showLabels})}})},zh=[mo],po="https://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer",Bi={url:po+"/tile/{z}/{y}/{x}",attribution:`Tiles \xA9 <a href="${po}">ArcGIS</a>`},_o={id:"xyz",name:"XYZ Tile layer",description:"Add map from a generic tile layer",isBaseMap:!0,create:async(r,e,t,i)=>({init:()=>{const n={...e.config};return n.url||(n.url=Bi.url,n.attribution=n.attribution??Bi.attribution),new Os({source:new Ns({url:n.url,attributions:n.attribution}),minZoom:n.minZoom,maxZoom:n.maxZoom})},registerOptionsUI:n=>{n.addTextInput({path:"config.url",name:"URL template",description:"Must include {x}, {y} or {-y}, and {z} placeholders",settings:{placeholder:Bi.url}}).addTextInput({path:"config.attribution",name:"Attribution",settings:{placeholder:Bi.attribution}})}})},Gh=[_o],Gn="custom",Ws="streets",xo=new On.O(()=>[{id:Ws,name:"World Street Map",slug:"World_Street_Map"},{id:"world-imagery",name:"World Imagery",slug:"World_Imagery"},{id:"world-physical",name:"World Physical",slug:"World_Physical_Map"},{id:"topo",name:"Topographic",slug:"World_Topo_Map"},{id:"usa-topo",name:"USA Topographic",slug:"USA_Topo_Maps"},{id:"ocean",name:"World Ocean",slug:"Ocean/World_Ocean_Base"},{id:Gn,name:"Custom MapServer",description:"Use a custom MapServer with pre-cached values",slug:""}]),Nh=[{id:"esri-xyz",name:"ArcGIS MapServer",description:"Add layer from an ESRI ArcGIS MapServer",isBaseMap:!0,create:async(r,e,t,i)=>{const n={...e.config},s=xo.getIfExists(n.server??Ws);if(s.id!==Gn){const a="https://services.arcgisonline.com/ArcGIS/rest/services/";n.url=`${a}${s.slug}/MapServer/tile/{z}/{y}/{x}`,n.attribution=`Tiles \xA9 <a href="${a}${s.slug}/MapServer">ArcGIS</a>`}const o={...e,config:n};return _o.create(r,o,t,i).then(a=>(a.registerOptionsUI=l=>{l.addSelect({path:"config.server",name:"Server instance",settings:{options:xo.selectOptions().options}}).addTextInput({path:"config.url",name:"URL template",description:"Must include {x}, {y} or {-y}, and {z} placeholders",settings:{placeholder:Bi.url},showIf:h=>h.config?.server===Gn}).addTextInput({path:"config.attribution",name:"Attribution",settings:{placeholder:Bi.attribution},showIf:h=>h.config?.server===Gn})},a))},defaultOptions:{server:Ws}}],Wh='© <a href="https://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a> contributors.';class Uh extends Ns{constructor(e){e=e||{};let t;e.attributions!==void 0?t=e.attributions:t=[Wh];const i=e.crossOrigin!==void 0?e.crossOrigin:"anonymous",n=e.url!==void 0?e.url:"https://tile.openstreetmap.org/{z}/{x}/{y}.png";super({attributions:t,attributionsCollapsible:!1,cacheSize:e.cacheSize,crossOrigin:i,interpolate:e.interpolate,maxZoom:e.maxZoom!==void 0?e.maxZoom:19,opaque:e.opaque!==void 0?e.opaque:!0,reprojectionErrorThreshold:e.reprojectionErrorThreshold,tileLoadFunction:e.tileLoadFunction,transition:e.transition,url:n,wrapX:e.wrapX,zDirection:e.zDirection})}}const Yh=Uh,Us=[...[{id:"osm-standard",name:"Open Street Map",description:"Add map from a collaborative free geographic world database",isBaseMap:!0,create:async(r,e,t)=>({init:()=>new Os({source:new Yh})})}],...zh,...Nh,...Gh];var Nn=C(35598),Pt=class extends ct{constructor(e){e=e||{},e.strategy=Pr,super(e),this.setLoader(this._loader),this.set("time",e.time||new Date),this.set("step",e.step||1)}static _sunEclipticPosition(e){var t=Math.PI/180,i=e-2451545,n=280.46+.9856474*i;n%=360;var s=357.528+.9856003*i;s%=360;var o=n+1.915*Math.sin(s*t)+.02*Math.sin(2*s*t),a=1.00014-.01671*Math.cos(s*t)-.0014*Math.cos(2*s*t);return{lambda:o,R:a}}static _eclipticObliquity(e){var t=e-2451545,i=t/36525,n=23.43929111-i*(46.836769/3600-i*(1831e-7/3600+i*(.0020034/3600-i*(576e-9/3600-i*434e-10/3600))));return n}static _sunEquatorialPosition(e,t){var i=180/Math.PI,n=Math.PI/180,s=Math.atan(Math.cos(t*n)*Math.tan(e*n))*i,o=Math.asin(Math.sin(t*n)*Math.sin(e*n))*i,a=Math.floor(e/90)*90,l=Math.floor(s/90)*90;return s=s+(a-l),{alpha:s,delta:o}}static getNightLat(e,t){var i=180/Math.PI,n=Math.PI/180,s=t?new Date(t):new Date,o=s/864e5+24405875e-1,a=(18.697374558+24.06570982441908*(o-2451545))%24,l=Pt._sunEclipticPosition(o),h=Pt._eclipticObliquity(o),c=Pt._sunEquatorialPosition(l.lambda,h),d=a*15+e-c.alpha,u=Math.atan(-Math.cos(d*n)/Math.tan(c.delta*n))*i;return u}_loader(e,t,i){var n=this.getCoordinates(this.get("time")),s=new Lt.Ay([n]);s.transform("EPSG:4326",i),this.addFeature(new Ue.A(s))}setTime(e){this.set("time",e),this.refresh()}getSunPosition(e){var t=e?new Date(e):new Date,i=t/864e5+24405875e-1,n=(18.697374558+24.06570982441908*(i-2451545))%24,s=Pt._sunEclipticPosition(i),o=Pt._eclipticObliquity(i),a=Pt._sunEquatorialPosition(s.lambda,o);return[a.alpha-n*15,a.delta]}getCoordinates(e,t){for(var i=180/Math.PI,n=Math.PI/180,s=e?new Date(e):new Date,o=s/864e5+24405875e-1,a=(18.697374558+24.06570982441908*(o-2451545))%24,l=[],h=Pt._sunEclipticPosition(o),c=Pt._eclipticObliquity(o),d=Pt._sunEquatorialPosition(h.lambda,c),u=this.get("step")||1,f=-180;f<=180;f+=u){var g=f,m=a*15+g-d.alpha,p=Math.atan(-Math.cos(m*n)/Math.tan(d.delta*n))*i;l.push([g,p])}switch(t){case"line":break;case"day":d.delta*=-1;default:{p=d.delta<0?90:-90;for(var v=180;v>=-180;v-=u)l.push([v,p]);l.push(l[0]);break}}if(t==="daynight"){var y=[];l.forEach(function(w){y.push(w.slice())}),y[0][1]=-y[0][1],y[y.length-1][1]=-y[0][1],y[y.length-1][1]=-y[0][1],l=[l,y]}return l}};const yo=Pt;var Xh=(r=>(r.From="from",r.To="to",r))(Xh||{});const yi={show:"to",sun:!1,nightColor:"#a7a6ba4D"},vo="dayNight",Bu={type:vo,name:"",config:yi,tooltip:!0},Vh={id:vo,name:"Night / Day",description:"Show day and night regions",isBaseMap:!1,create:async(r,e,t,i)=>{const n={...yi,...e?.config},s=new yo({}),o=Object.getPrototypeOf(s),a=new yo({}),l=Object.getPrototypeOf(a),h=new Oe({source:s,style:new fe({fill:new Ie({color:i.visualization.getColorByName(n.nightColor)})})}),c=new Oe({source:new ct({features:[]}),style:new fe({stroke:new Te({color:"#607D8B",width:1.5,lineDash:[2,3]})})}),d=new Ue.A({geometry:new Tt.A([])}),u=new Oe({source:new ct({features:[d]}),style:new fe({image:new Ct({radius:13,fill:new Ie({color:"rgb(253,184,19)"})})})}),f=new Ue.A({geometry:new Tt.A([])}),g=new fe({image:new Ct({radius:13,stroke:new Te({color:"rgb(253,184,19)",width:1.5})})}),m=new fe({image:new Ct({radius:15,stroke:new Te({color:"#607D8B",width:1.5,lineDash:[2,3]})})}),p=new Oe({source:new ct({features:[f]}),style:[m,g]}),v=new Nn.A({layers:n.sun?[h,u,p,c]:[h,c]}),y=new K.yU;return{init:()=>v,dispose:()=>y.unsubscribe(),update:w=>{const R=new Date(w.timeRange.from.valueOf()),L=new Date(w.timeRange.to.valueOf());let D=new Date,b=[];n.show==="from"?D=R:D=L,s.setTime(D),n.sun&&(b=o.getSunPosition(D),d.getGeometry()?.setCoordinates((0,X.Rb)(b)))},registerOptionsUI:w=>{e.config?.nightColor||(e.config={...yi,...e.config}),w.addRadio({path:"config.show",name:"Show",settings:{options:[{label:"From",value:"from"},{label:"To",value:"to"}]},defaultValue:yi.show}),w.addColorPicker({path:"config.nightColor",name:"Night region color",description:"Pick color of night region",defaultValue:yi.nightColor,settings:[{enableNamedColors:!1}]}),w.addBooleanSwitch({path:"config.sun",name:"Display sun",description:"Show the sun",defaultValue:yi.sun})}}},defaultOptions:yi};var Eo=C(11365),wo=C(57532),To=C(81160),jh=C(98358);const Co=(r,e)=>{const t=e.get(r.property);return(0,jh.c)(t,r.operation,r.value)};function So(r){const e=new Set,t=new Set;r.some((n,s)=>{for(const o of Object.keys(n.getProperties())){if(o==="geometry")continue;t.add(o);const a=n.getGeometry();a&&e.add(a.getType())}return s>10});let i=P.W_.Any;if(e.size===1)switch(e.values().next().value){case"Point":case"MultiPoint":i=P.W_.Point;break;case"Line":case"MultiLine":i=P.W_.Line;break;case"Polygon":i=P.W_.Polygon}return{geometryType:i,propertes:Array.from(t.keys()).map(n=>({label:n,value:n}))}}function Zh(r,e){const t=new Set;for(const n of r){const s=n.get(e);s!=null&&t.add(`${s}`)}const i=Array.from(t);return i.sort(),i}const an={src:"public/maps/countries.geojson",rules:[],style:P.T5,dataStyle:{}},zu={style:P.T5,check:{property:"",operation:Ne.zT.EQ,value:""}},Hh={id:"dynamic-geojson",name:"Dynamic GeoJSON",description:"Style a geojson file based on query results",isBaseMap:!1,state:xi.pn.alpha,create:async(r,e,t,i)=>{const n={...an,...e.config},s=new ct({url:n.src,format:new Eo.A}),o=new Fn.m,a=s.on("change",()=>{s.getState()==="ready"&&((0,xs.e)(a),o.next(s.getFeatures()))}),l=[];if(n.rules){for(const u of n.rules)if(u.style){const f=await Wt(u.style);l.push({state:f,rule:u.check})}}{const u=await Wt(n.style);l.push({state:u})}const h=await Wt(n.style),c=new Map,d=new Oe({source:s,style:u=>{const f=c.get(u.getId()),g=h.dims;if(f&&g)return new fe({fill:new Ie({color:g.color?.get(f)}),stroke:new Te({color:h.base.color,width:h.base.lineWidth??1})});const m=u.getGeometry()?.getType()==="Point";for(const p of l)if(!(p.rule&&!Co(p.rule,u))){if(p.state.fields){const v={...p.state.base},{text:y}=p.state.fields;return y&&(v.text=`${u.get(y)}`),m?p.state.maker(v):sn(v)}return m?(p.point||(p.point=p.state.maker(p.state.base)),p.point):(p.poly||(p.poly=sn(p.state.base)),p.poly)}}});return{init:()=>d,update:u=>{const f=u.series[0];if(f){const g=(0,kn.findField)(f,n.idField);g&&(c.clear(),g.values.forEach((m,p)=>c.set(m,p))),h.dims=(0,qe.ue)(f,h,i,n.dataStyle)}d.changed()},registerOptionsUI:u=>{const f=o.pipe((0,wo.$)(),(0,To.T)(g=>So(g)));u.addSelect({path:"config.src",name:"GeoJSON URL",settings:{options:(0,qe.G_)()??[],allowCustomValue:!0},defaultValue:an.src}).addFieldNamePicker({path:"config.idField",name:"ID Field"}).addCustomEditor({id:"config.dataStyle",path:"config.dataStyle",name:"Data style",editor:ti,settings:{displayRotation:!1},defaultValue:an.dataStyle}).addCustomEditor({id:"config.style",path:"config.style",name:"Default style",description:"The style to apply when no rules above match",editor:ti,settings:{simpleFixedValues:!0,layerInfo:f},defaultValue:an.style})}}},defaultOptions:an};var Io=C(19346),ln=C(60188);function Ro(r,e){if(r&&!e){const i={label:`${r}`,value:r};return{options:[i],current:i}}e||(e=[]);let t=e.find(i=>i.value===r);return r&&!t&&(t={label:`${r} (not found)`,value:r},e.push(t)),{options:e,current:t}}const Kh=({value:r,onChange:e,item:t,context:i})=>{const n=t.settings,{features:s,layerInfo:o}=n,a=(0,Dn.A)(o),l=(0,Dn.A)(s),h=(0,_.useMemo)(()=>{const L=r?.check?.property;return L&&l&&r.check?.operation===Ne.zT.EQ?Zh(l,L).map(D=>{let b;return!isNaN(Number(D))?b={value:Number(D),label:D}:b={value:D,label:D},b}):[]},[l,r]),c=(0,ye.of)(Jh),d=10,u=(0,_.useCallback)(L=>{e({...r,check:{...r.check,property:L?.value}})},[e,r]),f=(0,_.useCallback)(L=>{e({...r,check:{...r.check,operation:L.value??Ne.zT.EQ}})},[e,r]),g=(0,_.useCallback)(L=>{e({...r,check:{...r.check,value:L?.value}})},[e,r]),m=(0,_.useCallback)(L=>{e({...r,check:{...r.check,value:L}})},[e,r]),p=(0,_.useCallback)(L=>{e({...r,style:L})},[e,r]),v=(0,_.useCallback)(()=>{e(void 0)},[e]),y=r.check??Ao.check,w=Ro(y.property,a?.propertes),R=Ro(y.value,h);return _.createElement("div",{className:c.rule},_.createElement(It.C,{className:c.row},_.createElement(ut.I,{label:"Rule",labelWidth:d,grow:!0},_.createElement(Ti.l6,{placeholder:"Feature property",value:w.current,options:w.options,onChange:u,"aria-label":"Feature property",isClearable:!0,allowCustomValue:!0})),_.createElement(ut.I,{className:c.inline},_.createElement(Ti.l6,{value:Io.N.find(L=>L.value===y.operation),options:Io.N,onChange:f,"aria-label":"Comparison operator",width:8})),_.createElement(ut.I,{className:c.inline,grow:!0},_.createElement("div",{className:c.flexRow},(y.operation===Ne.zT.EQ||y.operation===Ne.zT.NEQ)&&_.createElement(Ti.l6,{placeholder:"value",value:R.current,options:R.options,onChange:g,"aria-label":"Comparison value",isClearable:!0,allowCustomValue:!0}),y.operation!==Ne.zT.EQ&&_.createElement(ln.Q,{key:`${y.property}/${y.operation}`,value:isNaN(Number(y.value))?0:Number(y.value),placeholder:"numeric value",onChange:m}))),_.createElement(yn.$n,{size:"md",icon:"trash-alt",onClick:()=>v(),variant:"secondary","aria-label":"Delete style rule",className:c.button})),_.createElement("div",null,_.createElement(ti,{value:r.style??P.T5,context:i,onChange:p,item:{settings:{simpleFixedValues:!0,layerInfo:o}}})))},Jh=r=>({rule:(0,ie.css)({marginBottom:r.spacing(1)}),row:(0,ie.css)({display:"flex",marginBottom:"4px"}),inline:(0,ie.css)({marginBottom:0,marginLeft:"4px"}),button:(0,ie.css)({marginLeft:"4px"}),flexRow:(0,ie.css)({display:"flex",flexDirection:"row",alignItems:"flex-start"})}),$h=({value:r,onChange:e,context:t,item:i})=>{const n=(0,ye.$j)(),s=i.settings,o=(0,_.useCallback)(()=>{const{palette:h}=n.visualization,c={fixed:h[Math.floor(Math.random()*h.length)]},d=[...r,{...Ao,style:{...P.T5,color:c}}];e(d)},[e,r,n.visualization]),a=(0,_.useCallback)(h=>c=>{const d=[...r];c?d[h]=c:d.splice(h,1),e(d)},[e,r]),l=r&&r.map((h,c)=>{const d={settings:s};return _.createElement(Kh,{value:h,onChange:a(c),context:t,item:d,key:`${c}-${h.check?.property}`})});return _.createElement(_.Fragment,null,l,_.createElement(yn.$n,{size:"sm",icon:"plus",onClick:o,variant:"secondary","aria-label":"Add geomap style rule"},"Add style rule"))},Wn={src:"public/maps/countries.geojson",rules:[],style:P.T5},Ao={style:P.T5,check:{property:"",operation:Ne.zT.EQ,value:""}},qh={id:"geojson",name:"GeoJSON",description:"Load static data from a geojson file",isBaseMap:!1,create:async(r,e,t,i)=>{const n={...Wn,...e.config},s=new ct({url:n.src,format:new Eo.A}),o=new Fn.m,a=s.on("change",()=>{s.getState()==="ready"&&((0,xs.e)(a),o.next(s.getFeatures()))}),l=[];if(n.rules){for(const f of n.rules)if(f.style){const g=await Wt(f.style);l.push({state:g,rule:f.check})}}{const f=await Wt(n.style);l.push({state:f})}const h=Object.values(P.Sq),c=Object.values(P.yQ),d=Object.values(P.yu),u=new Oe({source:s,style:f=>{const g=f.getGeometry()?.getType(),m=g==="Point"||g==="MultiPoint",p=g==="Polygon"||g==="MultiPolygon",v=g==="LineString"||g==="MultiLineString";for(const y of l){if(y.rule&&!Co(y.rule,f))continue;if(y.state.fields){const R={...y.state.base},{text:L}=y.state.fields;return L&&(R.text=`${f.get(L)}`),m?y.state.maker(R):sn(R)}const w=f.getProperties();if(p&&Object.keys(w).some(R=>h.includes(R))){const R={color:w[P.Sq.color]??y.state.base.color,opacity:w[P.Sq.opacity]??y.state.base.opacity,lineWidth:w[P.Sq.lineWidth]??y.state.base.lineWidth};return sn(R)}else if(v&&Object.keys(w).some(R=>d.includes(R))){const R={color:w[P.yu.color]??y.state.base.color,lineWidth:w[P.yu.lineWidth]??y.state.base.lineWidth};return y.state.maker(R)}else if(m&&Object.keys(w).some(R=>c.includes(R))){const R={color:w[P.yQ.color]??y.state.base.color,size:w[P.yQ.size]??y.state.base.size};return y.state.maker(R)}return m?(y.point||(y.point=y.state.maker(y.state.base)),y.point):(y.poly||(y.poly=sn(y.state.base)),y.poly)}}});return{init:()=>u,registerOptionsUI:f=>{const g=o.pipe((0,wo.$)(),(0,To.T)(m=>So(m)));f.addSelect({path:"config.src",name:"GeoJSON URL",settings:{options:(0,qe.G_)()??[],allowCustomValue:!0},defaultValue:Wn.src}).addCustomEditor({id:"config.style",path:"config.style",name:"Default style",description:"The style to apply when no rules above match",editor:ti,settings:{simpleFixedValues:!0,layerInfo:g},defaultValue:Wn.style}).addCustomEditor({id:"config.rules",path:"config.rules",name:"Style rules",description:"Apply styles based on feature properties",editor:$h,settings:{features:o,layerInfo:g},defaultValue:[]})}}},defaultOptions:Wn},Un=34962,Ys=34963,Qh=35040,ec=35044,Yn=35048,tc=5121,ic=5123,nc=5125,bo=5126,Lo=["experimental-webgl","webgl","webkit-3d","moz-webgl"];function Xs(r,e){e=Object.assign({preserveDrawingBuffer:!0,antialias:!mr.oF},e);const t=Lo.length;for(let i=0;i<t;++i)try{const n=r.getContext(Lo[i],e);if(n)return n}catch{}return null}let Vs;function Gu(){if(!Vs){const r=document.createElement("canvas"),e=Xs(r);e&&(Vs=e.getSupportedExtensions())}return Vs}const sc={STATIC_DRAW:ec,STREAM_DRAW:Qh,DYNAMIC_DRAW:Yn};class rc{constructor(e,t){this.array=null,this.type=e,(0,ue.v)(e===Un||e===Ys,62),this.usage=t!==void 0?t:sc.STATIC_DRAW}ofSize(e){return this.array=new(js(this.type))(e),this}fromArray(e){return this.array=js(this.type).from(e),this}fromArrayBuffer(e){return this.array=new(js(this.type))(e),this}getType(){return this.type}getArray(){return this.array}getUsage(){return this.usage}getSize(){return this.array?this.array.length:0}}function js(r){switch(r){case Un:return Float32Array;case Ys:return Uint32Array;default:return Float32Array}}const Zs=rc;var oc=C(75332);const Xn={LOST:"webglcontextlost",RESTORED:"webglcontextrestored"};var ac=C(90025);const lc=` precision mediump float; attribute vec2 a_position; varying vec2 v_texCoord; varying vec2 v_screenCoord; uniform vec2 u_screenSize; void main() { v_texCoord = a_position * 0.5 + 0.5; v_screenCoord = v_texCoord * u_screenSize; gl_Position = vec4(a_position, 0.0, 1.0); } `,hc=` precision mediump float; uniform sampler2D u_image; uniform float u_opacity; varying vec2 v_texCoord; void main() { gl_FragColor = texture2D(u_image, v_texCoord) * u_opacity; } `;class cc{constructor(e){this.gl_=e.webGlContext;const t=this.gl_;this.scaleRatio_=e.scaleRatio||1,this.renderTargetTexture_=t.createTexture(),this.renderTargetTextureSize_=null,this.frameBuffer_=t.createFramebuffer();const i=t.createShader(t.VERTEX_SHADER);t.shaderSource(i,e.vertexShader||lc),t.compileShader(i);const n=t.createShader(t.FRAGMENT_SHADER);t.shaderSource(n,e.fragmentShader||hc),t.compileShader(n),this.renderTargetProgram_=t.createProgram(),t.attachShader(this.renderTargetProgram_,i),t.attachShader(this.renderTargetProgram_,n),t.linkProgram(this.renderTargetProgram_),this.renderTargetVerticesBuffer_=t.createBuffer();const s=[-1,-1,1,-1,-1,1,1,-1,1,1,-1,1];t.bindBuffer(t.ARRAY_BUFFER,this.renderTargetVerticesBuffer_),t.bufferData(t.ARRAY_BUFFER,new Float32Array(s),t.STATIC_DRAW),this.renderTargetAttribLocation_=t.getAttribLocation(this.renderTargetProgram_,"a_position"),this.renderTargetUniformLocation_=t.getUniformLocation(this.renderTargetProgram_,"u_screenSize"),this.renderTargetOpacityLocation_=t.getUniformLocation(this.renderTargetProgram_,"u_opacity"),this.renderTargetTextureLocation_=t.getUniformLocation(this.renderTargetProgram_,"u_image"),this.uniforms_=[],e.uniforms&&Object.keys(e.uniforms).forEach(o=>{this.uniforms_.push({value:e.uniforms[o],location:t.getUniformLocation(this.renderTargetProgram_,o)})})}getGL(){return this.gl_}init(e){const t=this.getGL(),i=[t.drawingBufferWidth*this.scaleRatio_,t.drawingBufferHeight*this.scaleRatio_];if(t.bindFramebuffer(t.FRAMEBUFFER,this.getFrameBuffer()),t.viewport(0,0,i[0],i[1]),!this.renderTargetTextureSize_||this.renderTargetTextureSize_[0]!==i[0]||this.renderTargetTextureSize_[1]!==i[1]){this.renderTargetTextureSize_=i;const n=0,s=t.RGBA,o=0,a=t.RGBA,l=t.UNSIGNED_BYTE,h=null;t.bindTexture(t.TEXTURE_2D,this.renderTargetTexture_),t.texImage2D(t.TEXTURE_2D,n,s,i[0],i[1],o,a,l,h),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,this.renderTargetTexture_,0)}}apply(e,t,i,n){const s=this.getGL(),o=e.size;if(s.bindFramebuffer(s.FRAMEBUFFER,t?t.getFrameBuffer():null),s.activeTexture(s.TEXTURE0),s.bindTexture(s.TEXTURE_2D,this.renderTargetTexture_),!t){const l=(0,$.v6)(s.canvas);if(!e.renderTargets[l]){const h=s.getContextAttributes();h&&h.preserveDrawingBuffer&&(s.clearColor(0,0,0,0),s.clear(s.COLOR_BUFFER_BIT)),e.renderTargets[l]=!0}}s.enable(s.BLEND),s.blendFunc(s.ONE,s.ONE_MINUS_SRC_ALPHA),s.viewport(0,0,s.drawingBufferWidth,s.drawingBufferHeight),s.bindBuffer(s.ARRAY_BUFFER,this.renderTargetVerticesBuffer_),s.useProgram(this.renderTargetProgram_),s.enableVertexAttribArray(this.renderTargetAttribLocation_),s.vertexAttribPointer(this.renderTargetAttribLocation_,2,s.FLOAT,!1,0,0),s.uniform2f(this.renderTargetUniformLocation_,o[0],o[1]),s.uniform1i(this.renderTargetTextureLocation_,0);const a=e.layerStatesArray[e.layerIndex].opacity;s.uniform1f(this.renderTargetOpacityLocation_,a),this.applyUniforms(e),i&&i(s,e),s.drawArrays(s.TRIANGLES,0,6),n&&n(s,e)}getFrameBuffer(){return this.frameBuffer_}applyUniforms(e){const t=this.getGL();let i,n=1;this.uniforms_.forEach(function(s){if(i=typeof s.value=="function"?s.value(e):s.value,i instanceof HTMLCanvasElement||i instanceof ImageData)s.texture||(s.texture=t.createTexture()),t.activeTexture(t[`TEXTURE${n}`]),t.bindTexture(t.TEXTURE_2D,s.texture),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),i instanceof ImageData?t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,i.width,i.height,0,t.UNSIGNED_BYTE,new Uint8Array(i.data)):t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,i),t.uniform1i(s.location,n++);else if(Array.isArray(i))switch(i.length){case 2:t.uniform2f(s.location,i[0],i[1]);return;case 3:t.uniform3f(s.location,i[0],i[1],i[2]);return;case 4:t.uniform4f(s.location,i[0],i[1],i[2],i[3]);return;default:return}else typeof i=="number"&&t.uniform1f(s.location,i)})}}const Mo=cc;function uc(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function Hs(r,e){return r[0]=e[0],r[1]=e[1],r[4]=e[2],r[5]=e[3],r[12]=e[4],r[13]=e[5],r}const Nu={FRAGMENT_SHADER:35632,VERTEX_SHADER:35633},ni={PROJECTION_MATRIX:"u_projectionMatrix",OFFSET_SCALE_MATRIX:"u_offsetScaleMatrix",OFFSET_ROTATION_MATRIX:"u_offsetRotateMatrix",TIME:"u_time",ZOOM:"u_zoom",RESOLUTION:"u_resolution",VIEWPORT_SIZE_PX:"u_viewportSizePx",PIXEL_RATIO:"u_pixelRatio"},Rt={UNSIGNED_BYTE:tc,UNSIGNED_SHORT:ic,UNSIGNED_INT:nc,FLOAT:bo},Vn={};function Fo(r){return"shared/"+r}let Do=0;function dc(){const r="unique/"+Do;return Do+=1,r}function fc(r){let e=Vn[r];if(!e){const t=document.createElement("canvas");t.style.position="absolute",t.style.left="0",e={users:0,canvas:t},Vn[r]=e}return e.users+=1,e.canvas}function gc(r){const e=Vn[r];if(!e||(e.users-=1,e.users>0))return;const t=e.canvas,n=Xs(t).getExtension("WEBGL_lose_context");n&&n.loseContext(),delete Vn[r]}class mc extends ac.A{constructor(e){super(),e=e||{},this.boundHandleWebGLContextLost_=this.handleWebGLContextLost.bind(this),this.boundHandleWebGLContextRestored_=this.handleWebGLContextRestored.bind(this),this.canvasCacheKey_=e.canvasCacheKey?Fo(e.canvasCacheKey):dc(),this.canvas_=fc(this.canvasCacheKey_),this.gl_=Xs(this.canvas_),this.bufferCache_={},this.extensionCache_={},this.currentProgram_=null,this.canvas_.addEventListener(Xn.LOST,this.boundHandleWebGLContextLost_),this.canvas_.addEventListener(Xn.RESTORED,this.boundHandleWebGLContextRestored_),this.offsetRotateMatrix_=(0,te.vt)(),this.offsetScaleMatrix_=(0,te.vt)(),this.tmpMat4_=uc(),this.uniformLocationsByProgram_={},this.attribLocationsByProgram_={},this.uniforms_=[],e.uniforms&&this.setUniforms(e.uniforms),this.postProcessPasses_=e.postProcesses?e.postProcesses.map(t=>new Mo({webGlContext:this.gl_,scaleRatio:t.scaleRatio,vertexShader:t.vertexShader,fragmentShader:t.fragmentShader,uniforms:t.uniforms})):[new Mo({webGlContext:this.gl_})],this.shaderCompileErrors_=null,this.startTime_=Date.now()}setUniforms(e){this.uniforms_=[];for(const t in e)this.uniforms_.push({name:t,value:e[t]})}canvasCacheKeyMatches(e){return this.canvasCacheKey_===Fo(e)}getExtension(e){if(e in this.extensionCache_)return this.extensionCache_[e];const t=this.gl_.getExtension(e);return this.extensionCache_[e]=t,t}bindBuffer(e){const t=this.gl_,i=(0,$.v6)(e);let n=this.bufferCache_[i];if(!n){const s=t.createBuffer();n={buffer:e,webGlBuffer:s},this.bufferCache_[i]=n}t.bindBuffer(e.getType(),n.webGlBuffer)}flushBufferData(e){const t=this.gl_;this.bindBuffer(e),t.bufferData(e.getType(),e.getArray(),e.getUsage())}deleteBuffer(e){const t=this.gl_,i=(0,$.v6)(e),n=this.bufferCache_[i];n&&!t.isContextLost()&&t.deleteBuffer(n.webGlBuffer),delete this.bufferCache_[i]}disposeInternal(){this.canvas_.removeEventListener(Xn.LOST,this.boundHandleWebGLContextLost_),this.canvas_.removeEventListener(Xn.RESTORED,this.boundHandleWebGLContextRestored_),gc(this.canvasCacheKey_),delete this.gl_,delete this.canvas_}prepareDraw(e,t){const i=this.gl_,n=this.getCanvas(),s=e.size,o=e.pixelRatio;(n.width!==s[0]*o||n.height!==s[1]*o)&&(n.width=s[0]*o,n.height=s[1]*o,n.style.width=s[0]+"px",n.style.height=s[1]+"px");for(let a=this.postProcessPasses_.length-1;a>=0;a--)this.postProcessPasses_[a].init(e);i.bindTexture(i.TEXTURE_2D,null),i.clearColor(0,0,0,0),i.clear(i.COLOR_BUFFER_BIT),i.enable(i.BLEND),i.blendFunc(i.ONE,t?i.ZERO:i.ONE_MINUS_SRC_ALPHA)}bindTexture(e,t,i){const n=this.gl_;n.activeTexture(n.TEXTURE0+t),n.bindTexture(n.TEXTURE_2D,e),n.uniform1i(this.getUniformLocation(i),t)}prepareDrawToRenderTarget(e,t,i){const n=this.gl_,s=t.getSize();n.bindFramebuffer(n.FRAMEBUFFER,t.getFramebuffer()),n.viewport(0,0,s[0],s[1]),n.bindTexture(n.TEXTURE_2D,t.getTexture()),n.clearColor(0,0,0,0),n.clear(n.COLOR_BUFFER_BIT),n.enable(n.BLEND),n.blendFunc(n.ONE,i?n.ZERO:n.ONE_MINUS_SRC_ALPHA)}drawElements(e,t){const i=this.gl_;this.getExtension("OES_element_index_uint");const n=i.UNSIGNED_INT,s=4,o=t-e,a=e*s;i.drawElements(i.TRIANGLES,o,n,a)}finalizeDraw(e,t,i){for(let n=0,s=this.postProcessPasses_.length;n<s;n++)n===s-1?this.postProcessPasses_[n].apply(e,null,t,i):this.postProcessPasses_[n].apply(e,this.postProcessPasses_[n+1])}getCanvas(){return this.canvas_}getGL(){return this.gl_}applyFrameState(e){const t=e.size,i=e.viewState.rotation,n=e.pixelRatio,s=(0,te.cL)(this.offsetScaleMatrix_);(0,te.hs)(s,2/t[0],2/t[1]);const o=(0,te.cL)(this.offsetRotateMatrix_);i!==0&&(0,te.e$)(o,-i),this.setUniformMatrixValue(ni.OFFSET_SCALE_MATRIX,Hs(this.tmpMat4_,s)),this.setUniformMatrixValue(ni.OFFSET_ROTATION_MATRIX,Hs(this.tmpMat4_,o)),this.setUniformFloatValue(ni.TIME,(Date.now()-this.startTime_)*.001),this.setUniformFloatValue(ni.ZOOM,e.viewState.zoom),this.setUniformFloatValue(ni.RESOLUTION,e.viewState.resolution),this.setUniformFloatValue(ni.PIXEL_RATIO,n),this.setUniformFloatVec2(ni.VIEWPORT_SIZE_PX,[t[0],t[1]])}applyUniforms(e){const t=this.gl_;let i,n=0;this.uniforms_.forEach(s=>{if(i=typeof s.value=="function"?s.value(e):s.value,i instanceof HTMLCanvasElement||i instanceof HTMLImageElement||i instanceof ImageData)s.texture||(s.prevValue=void 0,s.texture=t.createTexture()),t.activeTexture(t[`TEXTURE${n}`]),t.bindTexture(t.TEXTURE_2D,s.texture),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),(!(i instanceof HTMLImageElement)||i.complete)&&s.prevValue!==i&&(s.prevValue=i,t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,i)),t.uniform1i(this.getUniformLocation(s.name),n++);else if(Array.isArray(i)&&i.length===6)this.setUniformMatrixValue(s.name,Hs(this.tmpMat4_,i));else if(Array.isArray(i)&&i.length<=4)switch(i.length){case 2:t.uniform2f(this.getUniformLocation(s.name),i[0],i[1]);return;case 3:t.uniform3f(this.getUniformLocation(s.name),i[0],i[1],i[2]);return;case 4:t.uniform4f(this.getUniformLocation(s.name),i[0],i[1],i[2],i[3]);return;default:return}else typeof i=="number"&&t.uniform1f(this.getUniformLocation(s.name),i)})}useProgram(e,t){this.gl_.useProgram(e),this.currentProgram_=e,this.applyFrameState(t),this.applyUniforms(t)}compileShader(e,t){const i=this.gl_,n=i.createShader(t);return i.shaderSource(n,e),i.compileShader(n),n}getProgram(e,t){const i=this.gl_,n=this.compileShader(e,i.FRAGMENT_SHADER),s=this.compileShader(t,i.VERTEX_SHADER),o=i.createProgram();if(i.attachShader(o,n),i.attachShader(o,s),i.linkProgram(o),!i.getShaderParameter(n,i.COMPILE_STATUS)){const a=`Fragment shader compilation failed: ${i.getShaderInfoLog(n)}`;throw new Error(a)}if(i.deleteShader(n),!i.getShaderParameter(s,i.COMPILE_STATUS)){const a=`Vertex shader compilation failed: ${i.getShaderInfoLog(s)}`;throw new Error(a)}if(i.deleteShader(s),!i.getProgramParameter(o,i.LINK_STATUS)){const a=`GL program linking failed: ${i.getProgramInfoLog(o)}`;throw new Error(a)}return o}getUniformLocation(e){const t=(0,$.v6)(this.currentProgram_);return this.uniformLocationsByProgram_[t]===void 0&&(this.uniformLocationsByProgram_[t]={}),this.uniformLocationsByProgram_[t][e]===void 0&&(this.uniformLocationsByProgram_[t][e]=this.gl_.getUniformLocation(this.currentProgram_,e)),this.uniformLocationsByProgram_[t][e]}getAttributeLocation(e){const t=(0,$.v6)(this.currentProgram_);return this.attribLocationsByProgram_[t]===void 0&&(this.attribLocationsByProgram_[t]={}),this.attribLocationsByProgram_[t][e]===void 0&&(this.attribLocationsByProgram_[t][e]=this.gl_.getAttribLocation(this.currentProgram_,e)),this.attribLocationsByProgram_[t][e]}makeProjectionTransform(e,t){const i=e.size,n=e.viewState.rotation,s=e.viewState.resolution,o=e.viewState.center;return(0,te.Zz)(t,0,0,2/(s*i[0]),2/(s*i[1]),-n,-o[0],-o[1]),t}setUniformFloatValue(e,t){this.gl_.uniform1f(this.getUniformLocation(e),t)}setUniformFloatVec2(e,t){this.gl_.uniform2fv(this.getUniformLocation(e),t)}setUniformFloatVec4(e,t){this.gl_.uniform4fv(this.getUniformLocation(e),t)}setUniformMatrixValue(e,t){this.gl_.uniformMatrix4fv(this.getUniformLocation(e),!1,t)}enableAttributeArray_(e,t,i,n,s){const o=this.getAttributeLocation(e);o<0||(this.gl_.enableVertexAttribArray(o),this.gl_.vertexAttribPointer(o,t,i,!1,n,s))}enableAttributes(e){const t=pc(e);let i=0;for(let n=0;n<e.length;n++){const s=e[n];this.enableAttributeArray_(s.name,s.size,s.type||bo,t,i),i+=s.size*Po(s.type)}}handleWebGLContextLost(){(0,Zi.I)(this.bufferCache_),this.currentProgram_=null}handleWebGLContextRestored(){}createTexture(e,t,i){const n=this.gl_;i=i||n.createTexture();const s=0,o=n.RGBA,a=0,l=n.RGBA,h=n.UNSIGNED_BYTE;return n.bindTexture(n.TEXTURE_2D,i),t?n.texImage2D(n.TEXTURE_2D,s,o,l,h,t):n.texImage2D(n.TEXTURE_2D,s,o,e[0],e[1],a,l,h,null),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MIN_FILTER,n.LINEAR),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_S,n.CLAMP_TO_EDGE),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_T,n.CLAMP_TO_EDGE),i}}function pc(r){let e=0;for(let t=0;t<r.length;t++){const i=r[t];e+=i.size*Po(i.type)}return e}function Po(r){switch(r){case Rt.UNSIGNED_BYTE:return Uint8Array.BYTES_PER_ELEMENT;case Rt.UNSIGNED_SHORT:return Uint16Array.BYTES_PER_ELEMENT;case Rt.UNSIGNED_INT:return Uint32Array.BYTES_PER_ELEMENT;case Rt.FLOAT:default:return Float32Array.BYTES_PER_ELEMENT}}const _c=mc;class Ks extends Tr{constructor(e,t){super(e),t=t||{},this.inversePixelTransform_=(0,te.vt)(),this.pixelContext_=null,this.postProcesses_=t.postProcesses,this.uniforms_=t.uniforms,this.helper,e.addChangeListener(oc.A.MAP,this.removeHelper.bind(this)),this.dispatchPreComposeEvent=this.dispatchPreComposeEvent.bind(this),this.dispatchPostComposeEvent=this.dispatchPostComposeEvent.bind(this)}dispatchPreComposeEvent(e,t){const i=this.getLayer();if(i.hasListener(Jt.A.PRECOMPOSE)){const n=new Cn.A(Jt.A.PRECOMPOSE,void 0,t,e);i.dispatchEvent(n)}}dispatchPostComposeEvent(e,t){const i=this.getLayer();if(i.hasListener(Jt.A.POSTCOMPOSE)){const n=new Cn.A(Jt.A.POSTCOMPOSE,void 0,t,e);i.dispatchEvent(n)}}reset(e){this.uniforms_=e.uniforms,this.helper&&this.helper.setUniforms(this.uniforms_)}removeHelper(){this.helper&&(this.helper.dispose(),delete this.helper)}prepareFrame(e){if(this.getLayer().getRenderSource()){let t=!0,i=-1,n;for(let o=0,a=e.layerStatesArray.length;o<a;o++){const l=e.layerStatesArray[o].layer,h=l.getRenderer();if(!(h instanceof Ks)){t=!0;continue}const c=l.getClassName();if((t||c!==n)&&(i+=1,t=!1),n=c,h===this)break}const s="map/"+e.mapId+"/group/"+i;(!this.helper||!this.helper.canvasCacheKeyMatches(s))&&(this.removeHelper(),this.helper=new _c({postProcesses:this.postProcesses_,uniforms:this.uniforms_,canvasCacheKey:s}),n&&(this.helper.getCanvas().className=n),this.afterHelperCreated())}return this.prepareFrameInternal(e)}afterHelperCreated(){}prepareFrameInternal(e){return!0}disposeInternal(){this.removeHelper(),super.disposeInternal()}dispatchRenderEvent_(e,t,i){const n=this.getLayer();if(n.hasListener(e)){(0,te.Zz)(this.inversePixelTransform_,0,0,i.pixelRatio,-i.pixelRatio,0,0,-i.size[1]);const s=new Cn.A(e,this.inversePixelTransform_,i,t);n.dispatchEvent(s)}}preRender(e,t){this.dispatchRenderEvent_(Jt.A.PRERENDER,e,t)}postRender(e,t){this.dispatchRenderEvent_(Jt.A.POSTRENDER,e,t)}}const xc=Ks,Ot=new Uint8Array(4);class yc{constructor(e,t){this.helper_=e;const i=e.getGL();this.texture_=i.createTexture(),this.framebuffer_=i.createFramebuffer(),this.size_=t||[1,1],this.data_=new Uint8Array(0),this.dataCacheDirty_=!0,this.updateSize_()}setSize(e){(0,$e.aI)(e,this.size_)||(this.size_[0]=e[0],this.size_[1]=e[1],this.updateSize_())}getSize(){return this.size_}clearCachedData(){this.dataCacheDirty_=!0}readAll(){if(this.dataCacheDirty_){const e=this.size_,t=this.helper_.getGL();t.bindFramebuffer(t.FRAMEBUFFER,this.framebuffer_),t.readPixels(0,0,e[0],e[1],t.RGBA,t.UNSIGNED_BYTE,this.data_),this.dataCacheDirty_=!1}return this.data_}readPixel(e,t){if(e<0||t<0||e>this.size_[0]||t>=this.size_[1])return Ot[0]=0,Ot[1]=0,Ot[2]=0,Ot[3]=0,Ot;this.readAll();const i=Math.floor(e)+(this.size_[1]-Math.floor(t)-1)*this.size_[0];return Ot[0]=this.data_[i*4],Ot[1]=this.data_[i*4+1],Ot[2]=this.data_[i*4+2],Ot[3]=this.data_[i*4+3],Ot}getTexture(){return this.texture_}getFramebuffer(){return this.framebuffer_}updateSize_(){const e=this.size_,t=this.helper_.getGL();this.texture_=this.helper_.createTexture(e,null,this.texture_),t.bindFramebuffer(t.FRAMEBUFFER,this.framebuffer_),t.viewport(0,0,e[0],e[1]),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,this.texture_,0),this.data_=new Uint8Array(e[0]*e[1]*4)}}const vc=yc,Js={GENERATE_POLYGON_BUFFERS:"GENERATE_POLYGON_BUFFERS",GENERATE_POINT_BUFFERS:"GENERATE_POINT_BUFFERS",GENERATE_LINE_STRING_BUFFERS:"GENERATE_LINE_STRING_BUFFERS"};var Wu=C(66570);const Ec=null,$s={vertexPosition:0,indexPosition:0};function jn(r,e,t,i,n){r[e+0]=t,r[e+1]=i,r[e+2]=n}function Uu(r,e,t,i,n,s){const l=3+n,h=r[e+0],c=r[e+1],d=Ec;d.length=n;for(let m=0;m<d.length;m++)d[m]=r[e+2+m];let u=s?s.vertexPosition:0,f=s?s.indexPosition:0;const g=u/l;return jn(t,u,h,c,0),d.length&&t.set(d,u+3),u+=l,jn(t,u,h,c,1),d.length&&t.set(d,u+3),u+=l,jn(t,u,h,c,2),d.length&&t.set(d,u+3),u+=l,jn(t,u,h,c,3),d.length&&t.set(d,u+3),u+=l,i[f++]=g,i[f++]=g+1,i[f++]=g+3,i[f++]=g+1,i[f++]=g+2,i[f++]=g+3,$s.vertexPosition=u,$s.indexPosition=f,$s}function Yu(r,e,t,i,n,s,o,a,l,h){const d=5+a.length,u=s.length/d,f=[r[e+0],r[e+1]],g=[r[t],r[t+1]],m=applyTransform(h,[...f]),p=applyTransform(h,[...g]);function v(b,N,Z){return Math.round(N*1500)+Math.round(Z*1500)*1e4+b*1e4*1e4}function y(b,N,Z){const q=Math.sqrt((N[0]-b[0])*(N[0]-b[0])+(N[1]-b[1])*(N[1]-b[1])),he=[(N[0]-b[0])/q,(N[1]-b[1])/q],le=[-he[1],he[0]],Q=Math.sqrt((Z[0]-b[0])*(Z[0]-b[0])+(Z[1]-b[1])*(Z[1]-b[1])),me=[(Z[0]-b[0])/Q,(Z[1]-b[1])/Q],J=q===0||Q===0?0:Math.acos(clamp(me[0]*he[0]+me[1]*he[1],-1,1));return me[0]*le[0]+me[1]*le[1]>0?J:Math.PI*2-J}const w=i!==null,R=n!==null;let L=0,D=0;if(w){const b=[r[i],r[i+1]],N=applyTransform(h,[...b]);L=y(m,p,N)}if(R){const b=[r[n],r[n+1]],N=applyTransform(h,[...b]);D=y(p,m,N)}s.push(f[0],f[1],g[0],g[1],v(0,L,D)),s.push(...a),s.push(f[0],f[1],g[0],g[1],v(1,L,D)),s.push(...a),s.push(f[0],f[1],g[0],g[1],v(2,L,D)),s.push(...a),s.push(f[0],f[1],g[0],g[1],v(3,L,D)),s.push(...a),o.push(u,u+1,u+2,u+1,u+3,u+2)}function Xu(r,e,t,i,n){const o=2+n;let a=e;const l=r.slice(a,a+n);a+=n;const h=r[a++];let c=0;const d=new Array(h-1);for(let g=0;g<h;g++)c+=r[a++],g<h-1&&(d[g]=c);const u=r.slice(a,a+c*2),f=earcut(u,d,2);for(let g=0;g<f.length;g++)i.push(f[g]+t.length/o);for(let g=0;g<u.length;g+=2)t.push(u[g],u[g+1],...l);return a+c*2}function Vu(){const e=document.createElement("canvas").getContext("2d").createImageData(1,1);return e.data[0]=255,e.data[1]=255,e.data[2]=255,e.data[3]=255,e}function wc(r,e){e=e||[];const t=256,i=t-1;return e[0]=Math.floor(r/t/t/t)/i,e[1]=Math.floor(r/t/t)%t/i,e[2]=Math.floor(r/t)%t/i,e[3]=r%t/i,e}function Tc(r){let e=0;const t=256,i=t-1;return e+=Math.round(r[0]*t*t*t*i),e+=Math.round(r[1]*t*t*i),e+=Math.round(r[2]*t*i),e+=Math.round(r[3]*i),e}var Cc=C(48287).Buffer;function Sc(){const r='const e="GENERATE_POLYGON_BUFFERS",t="GENERATE_POINT_BUFFERS",n="GENERATE_LINE_STRING_BUFFERS",r={1:"The view center is not defined",2:"The view resolution is not defined",3:"The view rotation is not defined",4:"`image` and `src` cannot be provided at the same time",5:"`imgSize` must be set when `image` is provided",7:"`format` must be set when `url` is set",8:"Unknown `serverType` configured",9:"`url` must be configured or set using `#setUrl()`",10:"The default `geometryFunction` can only handle `Point` geometries",11:"`options.featureTypes` must be an Array",12:"`options.geometryName` must also be provided when `options.bbox` is set",13:"Invalid corner",14:"Invalid color",15:"Tried to get a value for a key that does not exist in the cache",16:"Tried to set a value for a key that is used already",17:"`resolutions` must be sorted in descending order",18:"Either `origin` or `origins` must be configured, never both",19:"Number of `tileSizes` and `resolutions` must be equal",20:"Number of `origins` and `resolutions` must be equal",22:"Either `tileSize` or `tileSizes` must be configured, never both",24:"Invalid extent or geometry provided as `geometry`",25:"Cannot fit empty extent provided as `geometry`",26:"Features must have an id set",27:"Features must have an id set",28:\'`renderMode` must be `"hybrid"` or `"vector"`\',30:"The passed `feature` was already added to the source",31:"Tried to enqueue an `element` that was already added to the queue",32:"Transformation matrix cannot be inverted",33:"Invalid units",34:"Invalid geometry layout",36:"Unknown SRS type",37:"Unknown geometry type found",38:"`styleMapValue` has an unknown type",39:"Unknown geometry type",40:"Expected `feature` to have a geometry",41:"Expected an `ol/style/Style` or an array of `ol/style/Style.js`",42:"Question unknown, the answer is 42",43:"Expected `layers` to be an array or a `Collection`",47:"Expected `controls` to be an array or an `ol/Collection`",48:"Expected `interactions` to be an array or an `ol/Collection`",49:"Expected `overlays` to be an array or an `ol/Collection`",50:"`options.featureTypes` should be an Array",51:"Either `url` or `tileJSON` options must be provided",52:"Unknown `serverType` configured",53:"Unknown `tierSizeCalculation` configured",55:"The {-y} placeholder requires a tile grid with extent",56:"mapBrowserEvent must originate from a pointer event",57:"At least 2 conditions are required",59:"Invalid command found in the PBF",60:"Missing or invalid `size`",61:"Cannot determine IIIF Image API version from provided image information JSON",62:"A `WebGLArrayBuffer` must either be of type `ELEMENT_ARRAY_BUFFER` or `ARRAY_BUFFER`",64:"Layer opacity must be a number",66:"`forEachFeatureAtCoordinate` cannot be used on a WebGL layer if the hit detection logic has not been enabled. This is done by providing adequate shaders using the `hitVertexShader` and `hitFragmentShader` properties of `WebGLPointsLayerRenderer`",67:"A layer can only be added to the map once. Use either `layer.setMap()` or `map.addLayer()`, not both",68:"A VectorTile source can only be rendered if it has a projection compatible with the view projection",69:"`width` or `height` cannot be provided together with `scale`"};class o extends Error{constructor(e){const t=r[e];super(t),this.code=e,this.name="AssertionError",this.message=t}}var i=o;function a(e,t){const n=t[0],r=t[1];return t[0]=e[0]*n+e[2]*r+e[4],t[1]=e[1]*n+e[3]*r+e[5],t}function s(e,t){const n=(r=t)[0]*r[3]-r[1]*r[2];var r;!function(e,t){if(!e)throw new i(t)}(0!==n,32);const o=t[0],a=t[1],s=t[2],u=t[3],f=t[4],x=t[5];return e[0]=u/n,e[1]=-a/n,e[2]=-s/n,e[3]=o/n,e[4]=(s*x-u*f)/n,e[5]=-(o*x-a*f)/n,e}function u(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}new Array(6);var f={exports:{}};function x(e,t,n){n=n||2;var r,o,i,a,s,u,f,x=t&&t.length,h=x?t[0]*n:e.length,v=l(e,0,h,n,!0),d=[];if(!v||v.next===v.prev)return d;if(x&&(v=function(e,t,n,r){var o,i,a,s=[];for(o=0,i=t.length;o<i;o++)(a=l(e,t[o]*r,o<i-1?t[o+1]*r:e.length,r,!1))===a.next&&(a.steiner=!0),s.push(A(a));for(s.sort(b),o=0;o<s.length;o++)n=g(s[o],n);return n}(e,t,v,n)),e.length>80*n){r=i=e[0],o=a=e[1];for(var y=n;y<h;y+=n)(s=e[y])<r&&(r=s),(u=e[y+1])<o&&(o=u),s>i&&(i=s),u>a&&(a=u);f=0!==(f=Math.max(i-r,a-o))?32767/f:0}return c(v,d,n,r,o,f,0),d}function l(e,t,n,r,o){var i,a;if(o===P(e,t,n,r)>0)for(i=t;i<n;i+=r)a=k(i,e[i],e[i+1],a);else for(i=n-r;i>=t;i-=r)a=k(i,e[i],e[i+1],a);return a&&F(a,a.next)&&(R(a),a=a.next),a}function h(e,t){if(!e)return e;t||(t=e);var n,r=e;do{if(n=!1,r.steiner||!F(r,r.next)&&0!==Z(r.prev,r,r.next))r=r.next;else{if(R(r),(r=t=r.prev)===r.next)break;n=!0}}while(n||r!==t);return t}function c(e,t,n,r,o,i,a){if(e){!a&&i&&function(e,t,n,r){var o=e;do{0===o.z&&(o.z=w(o.x,o.y,t,n,r)),o.prevZ=o.prev,o.nextZ=o.next,o=o.next}while(o!==e);o.prevZ.nextZ=null,o.prevZ=null,function(e){var t,n,r,o,i,a,s,u,f=1;do{for(n=e,e=null,i=null,a=0;n;){for(a++,r=n,s=0,t=0;t<f&&(s++,r=r.nextZ);t++);for(u=f;s>0||u>0&&r;)0!==s&&(0===u||!r||n.z<=r.z)?(o=n,n=n.nextZ,s--):(o=r,r=r.nextZ,u--),i?i.nextZ=o:e=o,o.prevZ=i,i=o;n=r}i.nextZ=null,f*=2}while(a>1)}(o)}(e,r,o,i);for(var s,u,f=e;e.prev!==e.next;)if(s=e.prev,u=e.next,i?d(e,r,o,i):v(e))t.push(s.i/n|0),t.push(e.i/n|0),t.push(u.i/n|0),R(e),e=u.next,f=u.next;else if((e=u)===f){a?1===a?c(e=y(h(e),t,n),t,n,r,o,i,2):2===a&&p(e,t,n,r,o,i):c(h(e),t,n,r,o,i,1);break}}}function v(e){var t=e.prev,n=e,r=e.next;if(Z(t,n,r)>=0)return!1;for(var o=t.x,i=n.x,a=r.x,s=t.y,u=n.y,f=r.y,x=o<i?o<a?o:a:i<a?i:a,l=s<u?s<f?s:f:u<f?u:f,h=o>i?o>a?o:a:i>a?i:a,c=s>u?s>f?s:f:u>f?u:f,v=r.next;v!==t;){if(v.x>=x&&v.x<=h&&v.y>=l&&v.y<=c&&E(o,s,i,u,a,f,v.x,v.y)&&Z(v.prev,v,v.next)>=0)return!1;v=v.next}return!0}function d(e,t,n,r){var o=e.prev,i=e,a=e.next;if(Z(o,i,a)>=0)return!1;for(var s=o.x,u=i.x,f=a.x,x=o.y,l=i.y,h=a.y,c=s<u?s<f?s:f:u<f?u:f,v=x<l?x<h?x:h:l<h?l:h,d=s>u?s>f?s:f:u>f?u:f,y=x>l?x>h?x:h:l>h?l:h,p=w(c,v,t,n,r),b=w(d,y,t,n,r),g=e.prevZ,m=e.nextZ;g&&g.z>=p&&m&&m.z<=b;){if(g.x>=c&&g.x<=d&&g.y>=v&&g.y<=y&&g!==o&&g!==a&&E(s,x,u,l,f,h,g.x,g.y)&&Z(g.prev,g,g.next)>=0)return!1;if(g=g.prevZ,m.x>=c&&m.x<=d&&m.y>=v&&m.y<=y&&m!==o&&m!==a&&E(s,x,u,l,f,h,m.x,m.y)&&Z(m.prev,m,m.next)>=0)return!1;m=m.nextZ}for(;g&&g.z>=p;){if(g.x>=c&&g.x<=d&&g.y>=v&&g.y<=y&&g!==o&&g!==a&&E(s,x,u,l,f,h,g.x,g.y)&&Z(g.prev,g,g.next)>=0)return!1;g=g.prevZ}for(;m&&m.z<=b;){if(m.x>=c&&m.x<=d&&m.y>=v&&m.y<=y&&m!==o&&m!==a&&E(s,x,u,l,f,h,m.x,m.y)&&Z(m.prev,m,m.next)>=0)return!1;m=m.nextZ}return!0}function y(e,t,n){var r=e;do{var o=r.prev,i=r.next.next;!F(o,i)&&T(o,r,r.next,i)&&z(o,i)&&z(i,o)&&(t.push(o.i/n|0),t.push(r.i/n|0),t.push(i.i/n|0),R(r),R(r.next),r=e=i),r=r.next}while(r!==e);return h(r)}function p(e,t,n,r,o,i){var a=e;do{for(var s=a.next.next;s!==a.prev;){if(a.i!==s.i&&M(a,s)){var u=U(a,s);return a=h(a,a.next),u=h(u,u.next),c(a,t,n,r,o,i,0),void c(u,t,n,r,o,i,0)}s=s.next}a=a.next}while(a!==e)}function b(e,t){return e.x-t.x}function g(e,t){var n=function(e,t){var n,r=t,o=e.x,i=e.y,a=-1/0;do{if(i<=r.y&&i>=r.next.y&&r.next.y!==r.y){var s=r.x+(i-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(s<=o&&s>a&&(a=s,n=r.x<r.next.x?r:r.next,s===o))return n}r=r.next}while(r!==t);if(!n)return null;var u,f=n,x=n.x,l=n.y,h=1/0;r=n;do{o>=r.x&&r.x>=x&&o!==r.x&&E(i<l?o:a,i,x,l,i<l?a:o,i,r.x,r.y)&&(u=Math.abs(i-r.y)/(o-r.x),z(r,e)&&(u<h||u===h&&(r.x>n.x||r.x===n.x&&m(n,r)))&&(n=r,h=u)),r=r.next}while(r!==f);return n}(e,t);if(!n)return t;var r=U(n,e);return h(r,r.next),h(n,n.next)}function m(e,t){return Z(e.prev,e,t.prev)<0&&Z(t.next,e,e.next)<0}function w(e,t,n,r,o){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-n)*o|0)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-r)*o|0)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function A(e){var t=e,n=e;do{(t.x<n.x||t.x===n.x&&t.y<n.y)&&(n=t),t=t.next}while(t!==e);return n}function E(e,t,n,r,o,i,a,s){return(o-a)*(t-s)>=(e-a)*(i-s)&&(e-a)*(r-s)>=(n-a)*(t-s)&&(n-a)*(i-s)>=(o-a)*(r-s)}function M(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){var n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&T(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}(e,t)&&(z(e,t)&&z(t,e)&&function(e,t){var n=e,r=!1,o=(e.x+t.x)/2,i=(e.y+t.y)/2;do{n.y>i!=n.next.y>i&&n.next.y!==n.y&&o<(n.next.x-n.x)*(i-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==e);return r}(e,t)&&(Z(e.prev,e,t.prev)||Z(e,t.prev,t))||F(e,t)&&Z(e.prev,e,e.next)>0&&Z(t.prev,t,t.next)>0)}function Z(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function F(e,t){return e.x===t.x&&e.y===t.y}function T(e,t,n,r){var o=S(Z(e,t,n)),i=S(Z(e,t,r)),a=S(Z(n,r,e)),s=S(Z(n,r,t));return o!==i&&a!==s||(!(0!==o||!I(e,n,t))||(!(0!==i||!I(e,r,t))||(!(0!==a||!I(n,e,r))||!(0!==s||!I(n,t,r)))))}function I(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function S(e){return e>0?1:e<0?-1:0}function z(e,t){return Z(e.prev,e,e.next)<0?Z(e,t,e.next)>=0&&Z(e,e.prev,t)>=0:Z(e,t,e.prev)<0||Z(e,e.next,t)<0}function U(e,t){var n=new B(e.i,e.x,e.y),r=new B(t.i,t.x,t.y),o=e.next,i=t.prev;return e.next=t,t.prev=e,n.next=o,o.prev=n,r.next=n,n.prev=r,i.next=r,r.prev=i,r}function k(e,t,n,r){var o=new B(e,t,n);return r?(o.next=r.next,o.prev=r,r.next.prev=o,r.next=o):(o.prev=o,o.next=o),o}function R(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function B(e,t,n){this.i=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function P(e,t,n,r){for(var o=0,i=t,a=n-r;i<n;i+=r)o+=(e[a]-e[i])*(e[i+1]+e[a+1]),a=i;return o}f.exports=x,f.exports.default=x,x.deviation=function(e,t,n,r){var o=t&&t.length,i=o?t[0]*n:e.length,a=Math.abs(P(e,0,i,n));if(o)for(var s=0,u=t.length;s<u;s++){var f=t[s]*n,x=s<u-1?t[s+1]*n:e.length;a-=Math.abs(P(e,f,x,n))}var l=0;for(s=0;s<r.length;s+=3){var h=r[s]*n,c=r[s+1]*n,v=r[s+2]*n;l+=Math.abs((e[h]-e[v])*(e[c+1]-e[h+1])-(e[h]-e[c])*(e[v+1]-e[h+1]))}return 0===a&&0===l?0:Math.abs((l-a)/a)},x.flatten=function(e){for(var t=e[0][0].length,n={vertices:[],holes:[],dimensions:t},r=0,o=0;o<e.length;o++){for(var i=0;i<e[o].length;i++)for(var a=0;a<t;a++)n.vertices.push(e[o][i][a]);o>0&&(r+=e[o-1].length,n.holes.push(r))}return n};var N=u(f.exports);const _=[],O={vertexPosition:0,indexPosition:0};function q(e,t,n,r,o){e[t+0]=n,e[t+1]=r,e[t+2]=o}function L(e,t,n,r,o,i){const a=3+o,s=e[t+0],u=e[t+1],f=_;f.length=o;for(let n=0;n<f.length;n++)f[n]=e[t+2+n];let x=i?i.vertexPosition:0,l=i?i.indexPosition:0;const h=x/a;return q(n,x,s,u,0),f.length&&n.set(f,x+3),x+=a,q(n,x,s,u,1),f.length&&n.set(f,x+3),x+=a,q(n,x,s,u,2),f.length&&n.set(f,x+3),x+=a,q(n,x,s,u,3),f.length&&n.set(f,x+3),x+=a,r[l++]=h,r[l++]=h+1,r[l++]=h+3,r[l++]=h+1,r[l++]=h+2,r[l++]=h+3,O.vertexPosition=x,O.indexPosition=l,O}function C(e,t,n,r,o,i,s,u,f,x){const l=5+u.length,h=i.length/l,c=[e[t+0],e[t+1]],v=[e[n],e[n+1]],d=a(x,[...c]),y=a(x,[...v]);function p(e,t,n){const r=1e4;return Math.round(1500*t)+Math.round(1500*n)*r+e*r*r}function b(e,t,n){const r=Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])),o=[(t[0]-e[0])/r,(t[1]-e[1])/r],i=[-o[1],o[0]],a=Math.sqrt((n[0]-e[0])*(n[0]-e[0])+(n[1]-e[1])*(n[1]-e[1])),s=[(n[0]-e[0])/a,(n[1]-e[1])/a],u=0===r||0===a?0:Math.acos((f=s[0]*o[0]+s[1]*o[1],x=-1,l=1,Math.min(Math.max(f,x),l)));var f,x,l;return s[0]*i[0]+s[1]*i[1]>0?u:2*Math.PI-u}const g=null!==o;let m=0,w=0;if(null!==r){m=b(d,y,a(x,[...[e[r],e[r+1]]]))}if(g){w=b(y,d,a(x,[...[e[o],e[o+1]]]))}i.push(c[0],c[1],v[0],v[1],p(0,m,w)),i.push(...u),i.push(c[0],c[1],v[0],v[1],p(1,m,w)),i.push(...u),i.push(c[0],c[1],v[0],v[1],p(2,m,w)),i.push(...u),i.push(c[0],c[1],v[0],v[1],p(3,m,w)),i.push(...u),s.push(h,h+1,h+2,h+1,h+3,h+2)}function G(e,t,n,r,o){const i=2+o;let a=t;const s=e.slice(a,a+o);a+=o;const u=e[a++];let f=0;const x=new Array(u-1);for(let t=0;t<u;t++)f+=e[a++],t<u-1&&(x[t]=f);const l=e.slice(a,a+2*f),h=N(l,x,2);for(let e=0;e<h.length;e++)r.push(h[e]+n.length/i);for(let e=0;e<l.length;e+=2)n.push(l[e],l[e+1],...s);return a+2*f}const j=self;j.onmessage=r=>{const o=r.data;switch(o.type){case t:{const e=3,t=2,n=o.customAttributesSize,r=t+n,i=new Float32Array(o.renderInstructions),a=i.length/r,s=4*a*(n+e),u=new Uint32Array(6*a),f=new Float32Array(s);let x;for(let e=0;e<i.length;e+=r)x=L(i,e,f,u,n,x);const l=Object.assign({vertexBuffer:f.buffer,indexBuffer:u.buffer,renderInstructions:i.buffer},o);j.postMessage(l,[f.buffer,u.buffer,i.buffer]);break}case n:{const e=[],t=[],n=o.customAttributesSize,r=2,i=new Float32Array(o.renderInstructions);let a=0;const u=o.renderInstructionsTransform,f=[1,0,0,1,0,0];let x,l;for(s(f,u);a<i.length;){l=Array.from(i.slice(a,a+n)),a+=n,x=i[a++];for(let n=0;n<x-1;n++)C(i,a+n*r,a+(n+1)*r,n>0?a+(n-1)*r:null,n<x-2?a+(n+2)*r:null,e,t,l,0,f);a+=x*r}const h=Uint32Array.from(t),c=Float32Array.from(e),v=Object.assign({vertexBuffer:c.buffer,indexBuffer:h.buffer,renderInstructions:i.buffer},o);j.postMessage(v,[c.buffer,h.buffer,i.buffer]);break}case e:{const e=[],t=[],n=o.customAttributesSize,r=new Float32Array(o.renderInstructions);let i=0;for(;i<r.length;)i=G(r,i,e,t,n);const a=Uint32Array.from(t),s=Float32Array.from(e),u=Object.assign({vertexBuffer:s.buffer,indexBuffer:a.buffer,renderInstructions:r.buffer},o);j.postMessage(u,[s.buffer,a.buffer,r.buffer]);break}}};';return new Worker(typeof Blob>"u"?"data:application/javascript;base64,"+Cc.from(r,"binary").toString("base64"):URL.createObjectURL(new Blob([r],{type:"application/javascript"})))}class Ic extends xc{constructor(e,t){const i=t.uniforms||{},n=(0,te.vt)();i[ni.PROJECTION_MATRIX]=n,super(e,{uniforms:i,postProcesses:t.postProcesses}),this.sourceRevision_=-1,this.verticesBuffer_=new Zs(Un,Yn),this.hitVerticesBuffer_=new Zs(Un,Yn),this.indicesBuffer_=new Zs(Ys,Yn),this.vertexShader_=t.vertexShader,this.fragmentShader_=t.fragmentShader,this.program_,this.hitDetectionEnabled_=!!(t.hitFragmentShader&&t.hitVertexShader),this.hitVertexShader_=t.hitVertexShader,this.hitFragmentShader_=t.hitFragmentShader,this.hitProgram_;const s=t.attributes?t.attributes.map(function(a){return{name:"a_"+a.name,size:1,type:Rt.FLOAT}}):[];this.attributes=[{name:"a_position",size:2,type:Rt.FLOAT},{name:"a_index",size:1,type:Rt.FLOAT}].concat(s),this.hitDetectionAttributes=[{name:"a_position",size:2,type:Rt.FLOAT},{name:"a_index",size:1,type:Rt.FLOAT},{name:"a_hitColor",size:4,type:Rt.FLOAT},{name:"a_featureUid",size:1,type:Rt.FLOAT}].concat(s),this.customAttributes=t.attributes?t.attributes:[],this.previousExtent_=(0,T.S5)(),this.currentTransform_=n,this.renderTransform_=(0,te.vt)(),this.invertRenderTransform_=(0,te.vt)(),this.renderInstructions_=new Float32Array(0),this.hitRenderInstructions_=new Float32Array(0),this.hitRenderTarget_,this.lastSentId=0,this.worker_=Sc(),this.worker_.addEventListener("message",a=>{const l=a.data;if(l.type===Js.GENERATE_POINT_BUFFERS){const h=l.projectionTransform;l.hitDetection?(this.hitVerticesBuffer_.fromArrayBuffer(l.vertexBuffer),this.helper.flushBufferData(this.hitVerticesBuffer_)):(this.verticesBuffer_.fromArrayBuffer(l.vertexBuffer),this.helper.flushBufferData(this.verticesBuffer_)),this.indicesBuffer_.fromArrayBuffer(l.indexBuffer),this.helper.flushBufferData(this.indicesBuffer_),this.renderTransform_=h,(0,te.T9)(this.invertRenderTransform_,this.renderTransform_),l.hitDetection?this.hitRenderInstructions_=new Float32Array(a.data.renderInstructions):(this.renderInstructions_=new Float32Array(a.data.renderInstructions),l.id===this.lastSentId&&(this.ready=!0)),this.getLayer().changed()}}),this.featureCache_={},this.featureCount_=0;const o=this.getLayer().getSource();this.sourceListenKeys_=[(0,Je.KT)(o,Xe.ADDFEATURE,this.handleSourceFeatureAdded_,this),(0,Je.KT)(o,Xe.CHANGEFEATURE,this.handleSourceFeatureChanged_,this),(0,Je.KT)(o,Xe.REMOVEFEATURE,this.handleSourceFeatureDelete_,this),(0,Je.KT)(o,Xe.CLEAR,this.handleSourceFeatureClear_,this)],o.forEachFeature(a=>{this.featureCache_[(0,$.v6)(a)]={feature:a,properties:a.getProperties(),geometry:a.getGeometry()},this.featureCount_++})}afterHelperCreated(){this.program_=this.helper.getProgram(this.fragmentShader_,this.vertexShader_),this.hitDetectionEnabled_&&(this.hitProgram_=this.helper.getProgram(this.hitFragmentShader_,this.hitVertexShader_),this.hitRenderTarget_=new vc(this.helper))}handleSourceFeatureAdded_(e){const t=e.feature;this.featureCache_[(0,$.v6)(t)]={feature:t,properties:t.getProperties(),geometry:t.getGeometry()},this.featureCount_++}handleSourceFeatureChanged_(e){const t=e.feature;this.featureCache_[(0,$.v6)(t)]={feature:t,properties:t.getProperties(),geometry:t.getGeometry()}}handleSourceFeatureDelete_(e){const t=e.feature;delete this.featureCache_[(0,$.v6)(t)],this.featureCount_--}handleSourceFeatureClear_(){this.featureCache_={},this.featureCount_=0}renderFrame(e){const t=this.helper.getGL();this.preRender(t,e);const i=e.viewState.projection,o=this.getLayer().getSource().getWrapX()&&i.canWrapX(),a=i.getExtent(),l=e.extent,h=o?(0,T.RG)(a):null,c=o?Math.ceil((l[2]-a[2])/h)+1:1,d=o?Math.floor((l[0]-a[0])/h):0;let u=d;const f=this.indicesBuffer_.getSize();do this.helper.makeProjectionTransform(e,this.currentTransform_),(0,te.Tl)(this.currentTransform_,u*h,0),(0,te.lw)(this.currentTransform_,this.invertRenderTransform_),this.helper.applyUniforms(e),this.helper.drawElements(0,f);while(++u<c);this.helper.finalizeDraw(e,this.dispatchPreComposeEvent,this.dispatchPostComposeEvent);const g=this.helper.getCanvas();return this.hitDetectionEnabled_&&(this.renderHitDetection(e,d,c,h),this.hitRenderTarget_.clearCachedData()),this.postRender(t,e),g}prepareFrameInternal(e){const t=this.getLayer(),i=t.getSource(),n=e.viewState,s=!e.viewHints[Ii.A.ANIMATING]&&!e.viewHints[Ii.A.INTERACTING],o=!(0,T.aI)(this.previousExtent_,e.extent),a=this.sourceRevision_<i.getRevision();if(a&&(this.sourceRevision_=i.getRevision()),s&&(o||a)){const l=n.projection,h=n.resolution,c=t instanceof _s?t.getRenderBuffer():0,d=(0,T.r)(e.extent,c*h);i.loadFeatures(d,h,l),this.rebuildBuffers_(e),this.previousExtent_=e.extent.slice()}return this.helper.useProgram(this.program_,e),this.helper.prepareDraw(e),this.helper.bindBuffer(this.verticesBuffer_),this.helper.bindBuffer(this.indicesBuffer_),this.helper.enableAttributes(this.attributes),!0}rebuildBuffers_(e){const t=(0,te.vt)();this.helper.makeProjectionTransform(e,t);const i=(2+this.customAttributes.length)*this.featureCount_;if((!this.renderInstructions_||this.renderInstructions_.length!==i)&&(this.renderInstructions_=new Float32Array(i)),this.hitDetectionEnabled_){const u=(7+this.customAttributes.length)*this.featureCount_;(!this.hitRenderInstructions_||this.hitRenderInstructions_.length!==u)&&(this.hitRenderInstructions_=new Float32Array(u))}let n,s;const o=[],a=[];let l=0,h=0,c;for(const u in this.featureCache_){if(n=this.featureCache_[u],s=n.geometry,!s||s.getType()!=="Point")continue;o[0]=s.getFlatCoordinates()[0],o[1]=s.getFlatCoordinates()[1],(0,te.Bb)(t,o),c=wc(h+6,a),this.renderInstructions_[l++]=o[0],this.renderInstructions_[l++]=o[1],this.hitDetectionEnabled_&&(this.hitRenderInstructions_[h++]=o[0],this.hitRenderInstructions_[h++]=o[1],this.hitRenderInstructions_[h++]=c[0],this.hitRenderInstructions_[h++]=c[1],this.hitRenderInstructions_[h++]=c[2],this.hitRenderInstructions_[h++]=c[3],this.hitRenderInstructions_[h++]=Number(u));let f;for(let g=0;g<this.customAttributes.length;g++)f=this.customAttributes[g].callback(n.feature,n.properties),this.renderInstructions_[l++]=f,this.hitDetectionEnabled_&&(this.hitRenderInstructions_[h++]=f)}const d={id:++this.lastSentId,type:Js.GENERATE_POINT_BUFFERS,renderInstructions:this.renderInstructions_.buffer,customAttributesSize:this.customAttributes.length};if(d.projectionTransform=t,this.ready=!1,this.worker_.postMessage(d,[this.renderInstructions_.buffer]),this.renderInstructions_=null,this.hitDetectionEnabled_){const u={id:0,type:Js.GENERATE_POINT_BUFFERS,renderInstructions:this.hitRenderInstructions_.buffer,customAttributesSize:5+this.customAttributes.length};u.projectionTransform=t,u.hitDetection=!0,this.worker_.postMessage(u,[this.hitRenderInstructions_.buffer]),this.hitRenderInstructions_=null}}forEachFeatureAtCoordinate(e,t,i,n,s){if((0,ue.v)(this.hitDetectionEnabled_,66),!this.hitRenderInstructions_)return;const o=(0,te.Bb)(t.coordinateToPixelTransform,e.slice()),a=this.hitRenderTarget_.readPixel(o[0]/2,o[1]/2),l=[a[0]/255,a[1]/255,a[2]/255,a[3]/255],h=Tc(l),c=this.hitRenderInstructions_[h],d=Math.floor(c).toString(),f=this.getLayer().getSource().getFeatureByUid(d);if(f)return n(f,this.getLayer(),null)}renderHitDetection(e,t,i,n){if(!this.hitVerticesBuffer_.getSize())return;let s=t;this.hitRenderTarget_.setSize([Math.floor(e.size[0]/2),Math.floor(e.size[1]/2)]),this.helper.useProgram(this.hitProgram_,e),this.helper.prepareDrawToRenderTarget(e,this.hitRenderTarget_,!0),this.helper.bindBuffer(this.hitVerticesBuffer_),this.helper.bindBuffer(this.indicesBuffer_),this.helper.enableAttributes(this.hitDetectionAttributes);do{this.helper.makeProjectionTransform(e,this.currentTransform_),(0,te.Tl)(this.currentTransform_,s*n,0),(0,te.lw)(this.currentTransform_,this.invertRenderTransform_),this.helper.applyUniforms(e);const o=this.indicesBuffer_.getSize();this.helper.drawElements(0,o)}while(++s<i)}disposeInternal(){this.worker_.terminate(),this.layer_=null,this.sourceListenKeys_.forEach(function(e){(0,Je.JH)(e)}),this.sourceListenKeys_=null,super.disposeInternal()}}const Rc=Ic,At={BLUR:"blur",GRADIENT:"gradient",RADIUS:"radius"},Ac=["#00f","#0ff","#0f0","#ff0","#f00"];class bc extends _s{constructor(e){e=e||{};const t=Object.assign({},e);delete t.gradient,delete t.radius,delete t.blur,delete t.weight,super(t),this.gradient_=null,this.addChangeListener(At.GRADIENT,this.handleGradientChanged_),this.setGradient(e.gradient?e.gradient:Ac),this.setBlur(e.blur!==void 0?e.blur:15),this.setRadius(e.radius!==void 0?e.radius:8);const i=e.weight?e.weight:"weight";typeof i=="string"?this.weightFunction_=function(n){return n.get(i)}:this.weightFunction_=i,this.setRenderOrder(null)}getBlur(){return this.get(At.BLUR)}getGradient(){return this.get(At.GRADIENT)}getRadius(){return this.get(At.RADIUS)}handleGradientChanged_(){this.gradient_=Lc(this.getGradient())}setBlur(e){this.set(At.BLUR,e)}setGradient(e){this.set(At.GRADIENT,e)}setRadius(e){this.set(At.RADIUS,e)}createRenderer(){return new Rc(this,{className:this.getClassName(),attributes:[{name:"weight",callback:e=>{const t=this.weightFunction_(e);return t!==void 0?(0,xe.qE)(t,0,1):1}}],vertexShader:` precision mediump float; uniform mat4 u_projectionMatrix; uniform mat4 u_offsetScaleMatrix; uniform float u_size; attribute vec2 a_position; attribute float a_index; attribute float a_weight; varying vec2 v_texCoord; varying float v_weight; void main(void) { mat4 offsetMatrix = u_offsetScaleMatrix; float offsetX = a_index == 0.0 || a_index == 3.0 ? -u_size / 2.0 : u_size / 2.0; float offsetY = a_index == 0.0 || a_index == 1.0 ? -u_size / 2.0 : u_size / 2.0; vec4 offsets = offsetMatrix * vec4(offsetX, offsetY, 0.0, 0.0); gl_Position = u_projectionMatrix * vec4(a_position, 0.0, 1.0) + offsets; float u = a_index == 0.0 || a_index == 3.0 ? 0.0 : 1.0; float v = a_index == 0.0 || a_index == 1.0 ? 0.0 : 1.0; v_texCoord = vec2(u, v); v_weight = a_weight; }`,fragmentShader:` precision mediump float; uniform float u_blurSlope; varying vec2 v_texCoord; varying float v_weight; void main(void) { vec2 texCoord = v_texCoord * 2.0 - vec2(1.0, 1.0); float sqRadius = texCoord.x * texCoord.x + texCoord.y * texCoord.y; float value = (1.0 - sqrt(sqRadius)) * u_blurSlope; float alpha = smoothstep(0.0, 1.0, value) * v_weight; gl_FragColor = vec4(alpha, alpha, alpha, alpha); }`,hitVertexShader:` precision mediump float; uniform mat4 u_projectionMatrix; uniform mat4 u_offsetScaleMatrix; uniform float u_size; attribute vec2 a_position; attribute float a_index; attribute float a_weight; attribute vec4 a_hitColor; varying vec2 v_texCoord; varying float v_weight; varying vec4 v_hitColor; void main(void) { mat4 offsetMatrix = u_offsetScaleMatrix; float offsetX = a_index == 0.0 || a_index == 3.0 ? -u_size / 2.0 : u_size / 2.0; float offsetY = a_index == 0.0 || a_index == 1.0 ? -u_size / 2.0 : u_size / 2.0; vec4 offsets = offsetMatrix * vec4(offsetX, offsetY, 0.0, 0.0); gl_Position = u_projectionMatrix * vec4(a_position, 0.0, 1.0) + offsets; float u = a_index == 0.0 || a_index == 3.0 ? 0.0 : 1.0; float v = a_index == 0.0 || a_index == 1.0 ? 0.0 : 1.0; v_texCoord = vec2(u, v); v_hitColor = a_hitColor; v_weight = a_weight; }`,hitFragmentShader:` precision mediump float; uniform float u_blurSlope; varying vec2 v_texCoord; varying float v_weight; varying vec4 v_hitColor; void main(void) { vec2 texCoord = v_texCoord * 2.0 - vec2(1.0, 1.0); float sqRadius = texCoord.x * texCoord.x + texCoord.y * texCoord.y; float value = (1.0 - sqrt(sqRadius)) * u_blurSlope; float alpha = smoothstep(0.0, 1.0, value) * v_weight; if (alpha < 0.05) { discard; } gl_FragColor = v_hitColor; }`,uniforms:{u_size:()=>(this.get(At.RADIUS)+this.get(At.BLUR))*2,u_blurSlope:()=>this.get(At.RADIUS)/Math.max(1,this.get(At.BLUR))},postProcesses:[{fragmentShader:` precision mediump float; uniform sampler2D u_image; uniform sampler2D u_gradientTexture; uniform float u_opacity; varying vec2 v_texCoord; void main() { vec4 color = texture2D(u_image, v_texCoord); gl_FragColor.a = color.a * u_opacity; gl_FragColor.rgb = texture2D(u_gradientTexture, vec2(0.5, color.a)).rgb; gl_FragColor.rgb *= gl_FragColor.a; }`,uniforms:{u_gradientTexture:()=>this.gradient_,u_opacity:()=>this.getOpacity()}}]})}renderDeclutter(){}}function Lc(r){const i=(0,Ge.Y)(1,256),n=i.createLinearGradient(0,0,1,256),s=1/(r.length-1);for(let o=0,a=r.length;o<a;++o)n.addColorStop(o*s,r[o]);return i.fillStyle=n,i.fillRect(0,0,1,256),i.canvas}const Mc=bc,Zn={weight:{fixed:1,min:0,max:1},blur:15,radius:5},Fc={id:"heatmap",name:"Heatmap",description:"Visualizes a heatmap of the data",isBaseMap:!1,showLocation:!0,create:async(r,e,t,i)=>{const n={...Zn,...e.config},s=await(0,St.nE)(e.location),o=new nn(s),a="_weight",l=new Mc({source:o,blur:n.blur,radius:n.radius,weight:h=>h.get(a)});return{init:()=>l,update:h=>{const c=h.series[0];if(!c)return;o.update(c);const d=(0,kn.getScaledDimension)(c,n.weight);o.forEachFeature(g=>{const m=g.get("rowIndex");m!=null&&g.set(a,d.get(m))});let u=["#00f","#0ff","#0f0","#ff0","#f00"];const f=d.field??c.fields.find(g=>g.type===F.PU.number);if(f){const g=(0,Zr.Qi)(f);g.isContinuous&&g.getColors&&(u=g.getColors(i))}l.setGradient(u)},registerOptionsUI:h=>{h.addCustomEditor({id:"config.weight",path:"config.weight",name:"Weight values",description:"Scale the distribution for each row",editor:ei.gm,settings:{min:0,max:1,hideRange:!0},defaultValue:{fixed:1,min:0,max:1}}).addSliderInput({path:"config.radius",description:"Configures the size of clusters",name:"Radius",defaultValue:Zn.radius,settings:{min:1,max:50,step:1}}).addSliderInput({path:"config.blur",description:"Configures the amount of blur of clusters",name:"Blur",defaultValue:Zn.blur,settings:{min:1,max:50,step:1}})}}},defaultOptions:Zn},Oo={icon:"https://openlayers.org/en/latest/examples/data/icon.png"},Dc={id:"last-point-tracker",name:"Icon at last point",description:"Show an icon at the last point",isBaseMap:!1,showLocation:!0,state:xi.pn.alpha,create:async(r,e,t,i)=>{const n=new Ue.A({}),s={...Oo,...e.config};n.setStyle(new fe({image:new wn({src:s.icon})}));const o=new ct({features:[n]}),a=new Oe({source:o}),l=await(0,St.nE)(e.location);return{init:()=>a,update:h=>{const c=h.series[0];if(c&&c.length){const d=(0,St.FM)(c,l);if(!d.field)return;n.setGeometry(d.field.values[c.length-1])}}}},defaultOptions:Oo};var xt=function(r,e){var t=r[0]-e[0],i=r[1]-e[1];return Math.sqrt(t*t+i*i)},si=function(r,e){return r[0]==e[0]&&r[1]==e[1]},ju=function(r){return Pc(r.getGeometry())},Pc=function(r){switch(r.getType()){case"Point":return r.getCoordinates();case"MultiPolygon":r=r.getPolygon(0);case"Polygon":return r.getInteriorPoint().getCoordinates();default:return r.getClosestPoint(ol_extent_getCenter(r.getExtent()))}},Zu=function(r,e){var t=[],i=r.length-1,n=i,s,o,a,l,h,c,d,u,f,g,m,p,v,y=si(r[0],r[i]);y||(m=r[0],p=r[1],v=[m[0]+(p[1]-m[1])/xt(m,p)*e,m[1]-(p[0]-m[0])/xt(m,p)*e],t.push(v),r.push(r[i]),i++,n--);for(var w=0;w<n;w++)m=r[w],p=r[(w+1)%i],v=r[(w+2)%i],s=(p[1]-m[1])/(p[0]-m[0]),o=(v[1]-p[1])/(v[0]-p[0]),Math.abs(s-o)>1e-10&&(a=Math.sqrt((p[0]-m[0])*(p[0]-m[0])+(p[1]-m[1])*(p[1]-m[1])),l=Math.sqrt((v[0]-p[0])*(v[0]-p[0])+(v[1]-p[1])*(v[1]-p[1])),h=m[0]+e*(p[1]-m[1])/a,c=p[0]+e*(v[1]-p[1])/l,d=m[1]-e*(p[0]-m[0])/a,u=p[1]-e*(v[0]-p[0])/l,f=(o*c-s*h+d-u)/(o-s),g=(s*o*(c-h)+o*d-s*u)/(o-s),p[0]-m[0]==0&&(f=p[0]+e*(p[1]-m[1])/Math.abs(p[1]-m[1]),g=o*f-o*c+u),v[0]-p[0]==0&&(f=v[0]+e*(v[1]-p[1])/Math.abs(v[1]-p[1]),g=s*f-s*h+d),t.push([f,g]));return y?t.push(t[0]):(r.pop(),m=r[r.length-1],p=r[r.length-2],v=[m[0]-(p[1]-m[1])/xt(m,p)*e,m[1]+(p[0]-m[0])/xt(m,p)*e],t.push(v)),t},Hu=function(r,e){for(var t=0;t<e.length-1;t++){var i=e[t],n=e[t+1];if(si(r,i)||si(r,n))return{index:1,segment:[i,n]};var s=xt(i,n),o=[(n[0]-i[0])/s,(n[1]-i[1])/s],a=xt(i,r),l=[(r[0]-i[0])/a,(r[1]-i[1])/a];if(Math.abs(o[0]*l[1]-o[1]*l[0])<1e-10)return{index:1,segment:[i,n]}}return{index:-1}},Ku=function(r,e,t){for(var i,n,s=[],o=0;o<r.length-1;o++)!r[o].length||!r[o+1].length||(r[o][1]<=e&&r[o+1][1]>e||r[o][1]>=e&&r[o+1][1]<e)&&(n=(e-r[o][1])/(r[o+1][1]-r[o][1]),i=n*(r[o+1][0]-r[o][0])+r[o][0],s.push({contour:t,index:o,pt:[i,e],abs:n}));s.sort(function(h,c){return h.pt[0]-c.pt[0]});for(var a=[],l=0;l<s.length-1;l+=2)a.push([s[l],s[l+1]]);return a},Ju=function(r,e){switch(r){case"LineString":return new ol_geom_LineString(e);case"LinearRing":return new ol_geom_LinearRing(e);case"MultiLineString":return new ol_geom_MultiLineString(e);case"MultiPoint":return new ol_geom_MultiPoint(e);case"MultiPolygon":return new ol_geom_MultiPolygon(e);case"Point":return new ol_geom_Point(e);case"Polygon":return new ol_geom_Polygon(e);default:return console.error("[createFromType] Unsupported type: "+r),null}},$u=function(r,e){var t=r[1][0]-r[0][0],i=r[1][1]-r[0][1],n=e[1][0]-e[0][0],s=e[1][1]-e[0][1],o=t*s-i*n;if(o!=0){var a=(t*r[0][1]-t*e[0][1]-i*r[0][0]+i*e[0][0])/o;return[e[0][0]+a*n,e[0][1]+a*s]}else return!1},ko;(function(){function r(t,i){var n;for(let s=t.length-1;s>0;s--)(t[s][0]>i&&t[s-1][0]<i||t[s][0]<i&&t[s-1][0]>i)&&(n=[i,(i-t[s][0])/(t[s-1][0]-t[s][0])*(t[s-1][1]-t[s][1])+t[s][1]],t.splice(s,0,n))}function e(t,i){var n;for(let s=t.length-1;s>0;s--)(t[s][1]>i&&t[s-1][1]<i||t[s][1]<i&&t[s-1][1]>i)&&(n=[(i-t[s][1])/(t[s-1][1]-t[s][1])*(t[s-1][0]-t[s][0])+t[s][0],i],t.splice(s,0,n))}ko=function(t,i){var n=i.getType()==="Polygon";if(!n&&i.getType()!=="MultiPolygon")return null;var s=i.getCoordinates();return n&&(s=[s]),s.forEach(function(o){o.forEach(function(a){r(a,t[0]),r(a,t[2]),e(a,t[1]),e(a,t[3])})}),s.forEach(function(o){o.forEach(function(a){a.forEach(function(l){l[0]<t[0]?l[0]=t[0]:l[0]>t[2]&&(l[0]=t[2]),l[1]<t[1]?l[1]=t[1]:l[1]>t[3]&&(l[1]=t[3])})})}),n?new Lt.Ay(s[0]):new bi.A(s)}})();var Hn=function(r,e,t,i){var n=[];i!==!1&&n.push(r);var s=xt(r,e);if(s){var o=Math.round(s/t);if(o>1)for(var a=(e[0]-r[0])/o,l=(e[1]-r[1])/o,h=1;h<o;h++)n.push([r[0]+a*h,r[1]+l*h])}return n.push(e),n};ze.A.prototype.sampleAt=function(r){for(var e=this.getCoordinates(),t=[],i=1;i<e.length;i++)t=t.concat(Hn(e[i-1],e[i],r,i===1));return new ze.A(t)},In.A.prototype.sampleAt=function(r){var e=this.getCoordinates(),t=[];return e.forEach(function(i){for(var n=[],s=1;s<i.length;s++)n=n.concat(Hn(i[s-1],i[s],r,s===1));t.push(n)}),new In.A(t)},Lt.Ay.prototype.sampleAt=function(r){var e=this.getCoordinates(),t=[];return e.forEach(function(i){for(var n=[],s=1;s<i.length;s++)n=n.concat(Hn(i[s-1],i[s],r,s===1));t.push(n)}),new Lt.Ay(t)},bi.A.prototype.sampleAt=function(r){var e=this.getCoordinates(),t=[];return e.forEach(function(i){var n=[];t.push(n),i.forEach(function(s){for(var o=[],a=1;a<s.length;a++)o=o.concat(Hn(s[a-1],s[a],r,a===1));n.push(o)})}),new bi.A(t)},Wr.prototype.intersection=function(r,e){if(r.sampleAt){var t=(0,T.r)(this.getCenter().concat(this.getCenter()),this.getRadius());r=ko(t,r),r=r.simplify(e);var i=this.getCenter(),n=this.getRadius(),s=r.sampleAt(e).getCoordinates();switch(r.getType()){case"Polygon":s=[s];case"MultiPolygon":{var o=!1,a=[];return s.forEach(function(l){var h=[];a.push(h),l.forEach(function(c){var d=[];h.push(d),c.forEach(function(u){var f=xt(i,u);f>n?(o=!0,d.push([i[0]+n/f*(u[0]-i[0]),i[1]+n/f*(u[1]-i[1])])):d.push(u)})})}),o?r.getType()==="Polygon"?new Lt.Ay(a[0]):new bi.A(a):r}}}else console.warn("[ol/geom/Circle~intersection] Unsupported geometry type: "+r.getType());return r},ze.A.prototype.splitAt=function(r,e){var t;if(!r)return[this];if(e||(e=1e-10),r.length&&r[0].length){var i=[this];for(t=0;t<r.length;t++){for(var n=[],s=0;s<i.length;s++){var o=i[s].splitAt(r[t],e);n=n.concat(o)}i=n}return i}if(si(r,this.getFirstCoordinate())||si(r,this.getLastCoordinate()))return[this];var a=this.getCoordinates(),l=[a[0]],h=[];for(t=0;t<a.length-1;t++)if(!si(a[t],a[t+1])){if(si(r,a[t+1]))l.push(a[t+1]),h.push(new ze.A(l)),l=[];else if(!si(r,a[t])){var c,d,u=!1;a[t][0]==a[t+1][0]?(c=(a[t][1]-r[1])/(a[t][1]-a[t+1][1]),u=a[t][0]==r[0]&&0<c&&c<=1):a[t][1]==a[t+1][1]?(c=(a[t][0]-r[0])/(a[t][0]-a[t+1][0]),u=a[t][1]==r[1]&&0<c&&c<=1):(c=(a[t][0]-r[0])/(a[t][0]-a[t+1][0]),d=(a[t][1]-r[1])/(a[t][1]-a[t+1][1]),u=Math.abs(c-d)<=e&&0<c&&c<=1),u&&(l.push(r),h.push(new ze.A(l)),l=[r])}l.push(a[t+1])}return l.length>1&&h.push(new ze.A(l)),h.length?h:[this]};var Oc=class extends fe{constructor(e){e=e||{},super({stroke:e.stroke,text:e.text,zIndex:e.zIndex,geometry:e.geometry}),this.setRenderer(this._render.bind(this)),this._visible=e.visible!==!1,typeof e.width=="function"?this._widthFn=e.width:this.setWidth(e.width),this.setWidth2(e.width2),typeof e.color=="function"?this._colorFn=e.color:this.setColor(e.color),this.setColor2(e.color2),this.setLineCap(e.lineCap),this.setArrow(e.arrow),this.setArrowSize(e.arrowSize),this.setArrowColor(e.arrowColor),this._offset=[0,0],this.setOffset(e.offset0,0),this.setOffset(e.offset1,1),this._noOverlap=e.noOverlap}setWidth(e){this._width=e||0}setWidth2(e){this._width2=e}getOffset(e){return this._offset[e]}setOffset(e,t){switch(e=Math.max(0,parseFloat(e)),t){case 0:{this._offset[0]=e;break}case 1:{this._offset[1]=e;break}}}setLineCap(e){this._lineCap=e==="round"?"round":"butt"}getWidth(e,t){if(this._widthFn)return this._widthFn(e,t);var i=typeof this._width2=="number"?this._width2:this._width;return this._width+(i-this._width)*t}setColor(e){try{this._color=(0,_t._j)(e)}catch{this._color=[0,0,0,1]}}setColor2(e){try{this._color2=(0,_t._j)(e)}catch{this._color2=null}}setArrowColor(e){try{this._acolor=(0,_t.oJ)(e)}catch{this._acolor=null}}getColor(e,t){if(this._colorFn)return(0,_t.oJ)(this._colorFn(e,t));var i=this._color,n=this._color2||this._color;return"rgba("+ +Math.round(i[0]+(n[0]-i[0])*t)+","+Math.round(i[1]+(n[1]-i[1])*t)+","+Math.round(i[2]+(n[2]-i[2])*t)+","+(i[3]+(n[3]-i[3])*t)+")"}getArrow(){return this._arrow}setArrow(e){this._arrow=parseInt(e),(this._arrow<-1||this._arrow>2)&&(this._arrow=0)}getArrowSize(){return this._arrowSize||[16,16]}setArrowSize(e){Array.isArray(e)?this._arrowSize=e:typeof e=="number"&&(this._arrowSize=[e,e])}drawArrow(e,t,i,n,s){var o=this.getArrowSize()[0]*s,a=xt(t,i),l=(t[0]-i[0])/a,h=(t[1]-i[1])/a;n=Math.max(this.getArrowSize()[1]/2,n/2)*s,e.beginPath(),e.moveTo(t[0],t[1]),e.lineTo(t[0]-o*l+n*h,t[1]-o*h-n*l),e.lineTo(t[0]-o*l-n*h,t[1]-o*h+n*l),e.lineTo(t[0],t[1]),e.fill()}_render(e,t){if(t.geometry.getType()==="LineString"){var i,n,s,o=t.context;if(!this._visible){var a=t.pixelRatio/t.resolution,l=Math.cos(t.rotation),h=Math.sin(t.rotation);n=t.geometry.getCoordinates();var c=e[0][0]-n[0][0]*a*l-n[0][1]*a*h,d=e[0][1]-n[0][0]*a*h+n[0][1]*a*l;for(e=[],i=0;s=n[i];i++)e[i]=[c+s[0]*a*l+s[1]*a*h,d+s[0]*a*h-s[1]*a*l,s[2]]}var u=this.getArrowSize()[0]*t.pixelRatio;o.save(),this.getOffset(0)&&this._splitAsize(e,this.getOffset(0)*t.pixelRatio),this.getOffset(1)&&this._splitAsize(e,this.getOffset(1)*t.pixelRatio,!0),e.length>1&&(this.getArrow()===-1||this.getArrow()===2)&&(s=this._splitAsize(e,u),this._acolor?o.fillStyle=this._acolor:o.fillStyle=this.getColor(t.feature,0),this.drawArrow(o,s[0],s[1],this.getWidth(t.feature,0),t.pixelRatio)),e.length>1&&this.getArrow()>0&&(s=this._splitAsize(e,u,!0),this._acolor?o.fillStyle=this._acolor:o.fillStyle=this.getColor(t.feature,1),this.drawArrow(o,s[0],s[1],this.getWidth(t.feature,1),t.pixelRatio));var f=this._splitInto(e,255,2),g=0,m=f.length;if(o.lineJoin="round",o.lineCap=this._lineCap||"butt",f.length>1)for(g=0;g<f.length;g++){var p=g/m;for(n=f[g],o.lineWidth=this.getWidth(t.feature,p)*t.pixelRatio,o.strokeStyle=this.getColor(t.feature,p),o.beginPath(),o.moveTo(n[0][0],n[0][1]),i=1;s=n[i];i++)o.lineTo(s[0],s[1]);o.stroke()}o.restore()}}_splitAsize(e,t,i){var n,s,o,a,l=0;for(i?o=e.pop():o=e.shift(),n=o;e.length;){if(i?s=e.pop():s=e.shift(),a=xt(n,s),l+a>t){n=[n[0]+(s[0]-n[0])*(t-l)/a,n[1]+(s[1]-n[1])*(t-l)/a],a=xt(n,o),i?(e.push(s),e.push(n),e.push([n[0]+(o[0]-n[0])/a,n[1]+(o[1]-n[1])/a])):(e.unshift(s),e.unshift(n),e.unshift([n[0]+(o[0]-n[0])/a,n[1]+(o[1]-n[1])/a]));break}l+=a,n=s}return[o,n]}_splitInto(e,t,i){var n,s,o=this._noOverlap?1:.9,a=[],l,h=0;for(n=1;s=e[n];n++)h+=xt(e[n-1],s);var c=Math.max(i||2,h/(t||255)),d=e[0];h=0;var u=[d];for(n=1,s=e[1];n<e.length;){var f=s[0]-d[0],g=s[1]-d[1];if(l=Math.sqrt(f*f+g*g),h+l>c){var m=(c-h)/l;u.push([d[0]+f*m,d[1]+g*m]),a.push(u),d=[d[0]+f*m*o,d[1]+g*m*o],u=[d],h=0}else h+=l,d=s,u.push(d),n++,s=e[n]}return a.push(u),a}};const Bo=Oc;var zo=C(48543);const vi={style:P.T5,showLegend:!1,edgeStyle:P.T5,arrow:0},Go="network",qu={type:Go,name:"",config:vi,location:{mode:Ne.aG.Auto}},kc={id:Go,name:"Network",description:"Render a node graph as a map layer",isBaseMap:!1,showLocation:!0,hideOpacity:!0,state:xi.pn.beta,create:async(r,e,t,i)=>{const n={...vi,...e?.config},s=await Wt(n.style),o=await Wt(n.edgeStyle),a=await(0,St.nE)(e.location),l=new nn(a),h=new Oe({source:l}),c=n.arrow===1||n.arrow===-1||n.arrow===2,d=new Fn.m(1);let u=null;return n.showLegend&&(u=_.createElement(Kr,{watch:d,initialSubProps:{},child:Hr})),h.setStyle(f=>{const g=f.getGeometry(),m=f.get("rowIndex"),p=s.dims;if(!s.fields&&!o.fields&&!c&&g?.getType()!=="LineString")return s.maker(s.base);if(g?.getType()==="LineString"&&g instanceof Ri.Ay){const y=o.dims,w=o.config.textConfig,R=Number(f.getId()),L=g.getCoordinates(),D=o.config.opacity??1;if(L&&y){const b=L[0],N=L[1],Z=(0,de.A)(i.visualization.getColorByName((y.color&&y.color.get(R))??o.base.color)).setAlpha(D).toString(),q=(0,de.A)(i.visualization.getColorByName((y.color&&y.color.get(R))??o.base.color)).setAlpha(D).toString(),he=(y.size&&y.size.get(R))??o.base.size,le=(y.size&&y.size.get(R))??o.base.size,Q=[],me=new Bo({visible:!0,lineCap:n.arrow===0?"round":"square",color:Z,color2:q,width:(y.size&&y.size.get(R))??o.base.size,width2:(y.size&&y.size.get(R))??o.base.size});n.arrow&&(me.setArrow(n.arrow),n.arrow>0?(me.setArrowColor(q),me.setArrowSize((le??0)*2)):(me.setArrowColor(Z),me.setArrowSize((he??0)*2)));const J=new ze.A([b,N]);me.setGeometry(J);const Y=i.typography.fontFamily;if(y.text||o.config.text?.mode===Ne.RU.Fixed){const U=new fe({zIndex:10,text:new gi({text:y.text?.get(R)??o.config.text?.fixed,font:`normal ${w?.fontSize}px ${Y}`,fill:new Ie({color:Z??P.T5.color.fixed}),stroke:new Te({color:(0,de.A)(i.visualization.getColorByName("text")).setAlpha(D).toString(),width:Math.max(w?.fontSize/10,1)}),...w})});U.setGeometry(J),Q.push(U)}return Q.push(me),Q}}if(!p||!(0,E.isNumber)(m))return s.maker(s.base);const v={...s.base};return p.color&&(v.color=p.color.get(m)),p.size&&(v.size=p.size.get(m)),p.text&&(v.text=p.text.get(m)),p.rotation&&(v.rotation=p.rotation.get(m)),s.maker(v)}),{init:()=>h,legend:u,update:f=>{if(!f.series?.length){l.clear();return}u&&d.next({styleConfig:s,size:s.dims?.size,layerName:e.name,layer:h});const g=(0,zo.CP)(f.series);for(const m of f.series)m===g.edges[0]?o.dims=(0,qe.ue)(m,o,i):s.dims=(0,qe.ue)(m,s,i),Bc(l,g)},registerOptionsUI:(f,g)=>{const m=(0,zo.CP)(g.data),p=m.nodes[0],v=m.edges[0];f.addCustomEditor({id:"config.style",category:["Node Styles"],path:"config.style",name:"Node Styles",editor:ti,settings:{displayRotation:!0,frameMatcher:y=>y===p},defaultValue:vi.style}).addCustomEditor({id:"config.edgeStyle",category:["Edge Styles"],path:"config.edgeStyle",name:"Edge Styles",editor:ti,settings:{hideSymbol:!0,frameMatcher:y=>y===v},defaultValue:vi.style}).addRadio({path:"config.arrow",name:"Arrow",settings:{options:[{label:"None",value:0},{label:"Forward",value:1},{label:"Reverse",value:-1},{label:"Both",value:2}]},defaultValue:vi.arrow}).addBooleanSwitch({path:"config.showLegend",name:"Show legend",description:"Show map legend",defaultValue:vi.showLegend})}}},defaultOptions:vi};function Bc(r,e){r.clear(!0);const t=e.nodes[0],i=e.edges[0];if(!t||!i)return;const n=(0,St.FM)(t,r.location);if(!n.field){r.changed();return}const s=n.field,o=t.fields.findIndex(u=>u.name==="id"),a=t.fields[o].values,l=i.fields.findIndex(u=>u.name==="source"),h=i.fields.findIndex(u=>u.name==="target"),c=i.fields[l].values,d=i.fields[h].values;for(let u=0;u<c.length;u++){const f=c[u],g=d[u],m=a.findIndex(w=>w===f),p=a.findIndex(w=>w===g);if(!s.values[m]||!s.values[p])continue;const v=new ze.A([s.values[m].getCoordinates(),s.values[p].getCoordinates()]),y=new Ue.A({geometry:v});y.setId(u),r.addFeatureInternal(y)}for(let u=0;u<t.length;u++)r.addFeatureInternal(new Ue.A({frameNodes:t,rowIndex:u,geometry:n.field.values[u]}));r.changed()}var No=class extends Ze{constructor(e){e=e||{},e.displacement||(e.displacement=[e.offsetX||0,-e.offsetY||0]);var t=e.kind==="anchored"?8:0,i=Number(e.shadow)||0;e.stroke||(e.stroke=new Te({width:0,color:"#000"}));var n=e.stroke.getWidth();if(n<0&&(n=0),e.kind=="folio"&&(n+=6),e.stroke.setWidth(n),super({radius:e.radius+n+t/2+i/2,points:0,displacement:[e.displacement[0]||0,(e.displacement[1]||0)+t],fill:Ze.prototype.render?new Ie({color:[0,0,0,0]}):null,declutterMode:e.declutterMode}),this.sanchor_=t,this._shadow=i,!this.getHitDetectionImage){var s=super.getImage.call(this);if(!this.hitDetectionCanvas_){for(var o in this)if(this[o]&&this[o].getContext&&this[o]!==s){this.hitDetectionCanvas_=this[o];break}}this.hitDetectionCanvas_=document.createElement("canvas"),this.hitDetectionCanvas_.width=s.width,this.hitDetectionCanvas_.height=s.height;var a=this.hitDetectionCanvas_;this.getHitDetectionImage=function(){return a}}this._stroke=e.stroke,this._fill=e.fill,this._crop=e.crop,this._crossOrigin=e.crossOrigin,this._kind=e.kind||"default",this._radius=e.radius,this._src=e.src,this._offset=[e.offsetX?e.offsetX:0,e.offsetY?e.offsetY:0],this._onload=e.onload,this._onerror=e.onerror,typeof e.opacity=="number"&&this.setOpacity(e.opacity),typeof e.rotation=="number"&&this.setRotation(e.rotation),this.getImage()}setOffset(e){this._offset=[e[0]||0,e[1]||0],this.getImage()}clone(){var e=new No({stroke:this._stroke,fill:this._fill,shadow:this._shadow,crop:this._crop,crossOrigin:this._crossOrigin,kind:this._kind,radius:this._radius,src:this._src,offsetX:this._offset[0],offsetY:this._offset[1],opacity:this.getOpacity(),rotation:this.getRotation(),declutterMode:this.getDeclutterMode?this.getDeclutterMode():null});return e.getImage(),e}drawBack_(e,t,i,n){var s=this._shadow,o=e.canvas;e.beginPath(),e.fillStyle=t,e.clearRect(0,0,o.width,o.height);var a=o.width/n,l=o.height/n;switch(this._kind){case"square":{e.rect(0,0,a-s,l-s);break}case"circle":{e.arc(this._radius+i,this._radius+i,this._radius+i,0,2*Math.PI,!1);break}case"folio":{var h=6;i-=h,e.strokeStyle="rgba(0,0,0,0.5)",e.lineWidth=1;var c=a-s-2*h,d=Math.atan(6/c);e.save(),e.rotate(-d),e.translate(-6,2),e.beginPath(),e.rect(h,h,c,c),e.stroke(),e.fill(),e.restore(),e.save(),e.translate(6,-1),e.rotate(d),e.beginPath(),e.rect(h,h,c,c),e.stroke(),e.fill(),e.restore(),e.beginPath(),e.rect(h,h,c,c),e.stroke();break}case"anchored":{e.roundRect(this.sanchor_/2,0,a-this.sanchor_-s,l-this.sanchor_-s,i),e.moveTo(a/2-this.sanchor_-s/2,l-this.sanchor_-s),e.lineTo(a/2+this.sanchor_-s/2,l-this.sanchor_-s),e.lineTo(a/2-s/2,l-s);break}default:{e.roundRect(0,0,a-s,l-s,i);break}}e.closePath()}getImage(e){e=e||window.devicePixelRatio;var t=Ze.prototype.getImage.call(this,e);if((this._gethit||this.img_)&&this._currentRatio===e)return t;this._currentRatio=e;var i,n=0;this._stroke&&(i=(0,_t.oJ)(this._stroke.getColor()),n=this._stroke.getWidth()),this._gethit=!0;var s=this.getHitDetectionImage().getContext("2d");s.save(),s.setTransform(1,0,0,1,0,0),this.drawBack_(s,"#000",n,1),s.fill(),s.restore(),this._gethit=!1,s=t.getContext("2d"),s.save(),s.setTransform(e,0,0,e,0,0),this.drawBack_(s,i,n,e),this._shadow&&(s.shadowColor="rgba(0,0,0,0.5)",s.shadowBlur=e*this._shadow/2,s.shadowOffsetX=e*this._shadow/2,s.shadowOffsetY=e*this._shadow/2),s.fill(),s.restore();var o=this,a=this.img_=new Image;if(this._crossOrigin&&(a.crossOrigin=this._crossOrigin),a.src=this._src,a.width?o.drawImage_(t,a,e):(a.onload=function(){o.drawImage_(t,a,e),o._onload&&o._onload()},o._onerror&&(a.onerror=function(){o._onerror()})),!this.getDisplacement){var l=this.getAnchor();l[0]=(t.width/e-this._shadow)/2-this._offset[0],this.sanchor_?l[1]=t.height/e-this._shadow-this._offset[1]:l[1]=(t.height/e-this._shadow)/2-this._offset[1]}return t}getPhoto(){return this.img_}drawImage_(e,t,i){var n=e.getContext("2d"),s=0;this._stroke&&(s=this._stroke.getWidth());var o=2*this._radius;n.save(),Ze.prototype.render&&n.setTransform(i,0,0,i,0,0),this._kind=="circle"&&(n.beginPath(),n.arc(this._radius+s,this._radius+s,this._radius,0,2*Math.PI,!1),n.clip());var a,l,h,c,d,u,f,g,m;this._crop?(a=Math.min(t.width/o,t.height/o),g=m=a*o,u=(t.width-g)/2,f=(t.height-m)/2,l=h=0,c=d=o+1):(a=Math.min(o/t.width,o/t.height),u=f=0,g=t.width,m=t.height,c=a*g,d=a*m,l=(o-c)/2,h=(o-d)/2),l+=s+this.sanchor_/2,h+=s,n.drawImage(t,u,f,g,m,l,h,c,d),this._kind=="circle"&&s&&(n.beginPath(),n.strokeStyle=(0,_t.oJ)(this._stroke.getColor()),n.lineWidth=s/4,n.arc(this._radius+s,this._radius+s,this._radius,0,2*Math.PI,!1),n.stroke()),n.restore()}};CanvasRenderingContext2D.prototype.roundRect=function(r,e,t,i,n){return n?(t<2*n&&(n=t/2),i<2*n&&(n=i/2),this.beginPath(),this.moveTo(r+n,e),this.arcTo(r+t,e,r+t,e+i,n),this.arcTo(r+t,e+i,r,e+i,n),this.arcTo(r,e+i,r,e,n),this.arcTo(r,e,r+t,e,n),this.closePath()):this.rect(r,e,t,i),this};const qs=No,Ut={kind:"square",border:2,shadow:!0,crop:!0,radius:20,color:"rgb(200, 200, 200)"},Wo="photos",Qu={type:Wo,name:"",config:Ut,location:{mode:Ne.aG.Auto},tooltip:!0},Qs="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiBjbGFzcz0iY3NzLWV5eDRkbyI+PHBhdGggZD0iTTExLjI5LDE1LjI5YTEuNTgsMS41OCwwLDAsMC0uMTIuMTUuNzYuNzYsMCwwLDAtLjA5LjE4LjY0LjY0LDAsMCwwLS4wNi4xOCwxLjM2LDEuMzYsMCwwLDAsMCwuMi44NC44NCwwLDAsMCwuMDguMzguOS45LDAsMCwwLC41NC41NC45NC45NCwwLDAsMCwuNzYsMCwuOS45LDAsMCwwLC41NC0uNTRBMSwxLDAsMCwwLDEzLDE2YTEsMSwwLDAsMC0uMjktLjcxQTEsMSwwLDAsMCwxMS4yOSwxNS4yOVpNMTIsMkExMCwxMCwwLDEsMCwyMiwxMiwxMCwxMCwwLDAsMCwxMiwyWm0wLDE4YTgsOCwwLDEsMSw4LThBOCw4LDAsMCwxLDEyLDIwWk0xMiw3QTMsMywwLDAsMCw5LjQsOC41YTEsMSwwLDEsMCwxLjczLDFBMSwxLDAsMCwxLDEyLDlhMSwxLDAsMCwxLDAsMiwxLDEsMCwwLDAtMSwxdjFhMSwxLDAsMCwwLDIsMHYtLjE4QTMsMywwLDAsMCwxMiw3WiI+PC9wYXRoPjwvc3ZnPgo=",zc="data:image/svg+xml;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==";let hn=[];const Gc={id:Wo,name:"Photos",description:"Render photos at each data point",isBaseMap:!1,showLocation:!0,hideOpacity:!0,state:xi.pn.beta,create:async(r,e,t,i)=>{const n={...Ut,...e?.config},s=await(0,St.nE)(e.location),o=new nn(s),a=new Oe({source:o});let l=[];return a.setStyle(h=>{let c=Qs,d=1/0;l.length>0&&(d=h.get("rowIndex"),c=l[d]??Qs);const u=new fe({image:new qs({src:c,radius:n.radius,crop:n.crop,kind:n.kind,shadow:!1,stroke:new Te({width:0,color:"rgba(0,0,0,0)"}),onload:()=>{a.changed(),hn&&!hn.includes(d)&&hn.push(d)}})}),f=new fe({image:new qs({src:zc,radius:n.radius,crop:!1,kind:n.kind,shadow:n.shadow,stroke:new Te({width:n.border??0,color:i.visualization.getColorByName(n.color)}),onload:()=>{a.changed()}})}),g=new fe({image:new qs({src:Qs,radius:n.radius,crop:!1,kind:n.kind,shadow:!1,stroke:new Te({width:0,color:"rgba(0,0,0,0)"}),onload:()=>{a.changed()}})});return hn&&hn.includes(d)?[f,u]:[f,g,u]}),{init:()=>a,update:h=>{if(!h.series?.length){o.clear();return}for(const c of h.series){if(o.update(c),n.src){const d=(0,kn.findField)(c,n.src);d&&(l=d?.values)}else for(let d=0;d<c.fields.length;d++){const u=c.fields[d];if(u.type===F.PU.string){l=u.values;break}}break}},registerOptionsUI:h=>{h.addFieldNamePicker({path:"config.src",name:"Image Source field",settings:{filter:c=>c.type===F.PU.string,noFieldsMessage:"No string fields found"}}).addRadio({path:"config.kind",name:"Kind",settings:{options:[{label:"Square",value:"square"},{label:"Circle",value:"circle"},{label:"Anchored",value:"anchored"},{label:"Folio",value:"folio"}]},defaultValue:Ut.kind}).addBooleanSwitch({path:"config.crop",name:"Crop",settings:{},defaultValue:Ut.crop}).addBooleanSwitch({path:"config.shadow",name:"Shadow",settings:{},defaultValue:Ut.shadow}).addSliderInput({path:"config.border",name:"Border",settings:{min:0,max:10},defaultValue:Ut.border}).addColorPicker({path:"config.color",name:"Border color",defaultValue:Ut.color,settings:[{enableNamedColors:!1}]}).addSliderInput({path:"config.radius",name:"Radius",settings:{min:1,max:100},defaultValue:Ut.radius})}}},defaultOptions:Ut};var Nc=C(99165),Uo=C(23596);const cn={style:{...P.T5,opacity:1,lineWidth:2},arrow:0},Yo="route",ed={type:Yo,name:"",config:cn,location:{mode:Ne.aG.Auto},tooltip:!1};var Wc=(r=>(r[r.x1=0]="x1",r[r.y1=1]="y1",r[r.x2=2]="x2",r[r.y2=3]="y2",r))(Wc||{});const er="#607D8B",Uc={id:Yo,name:"Route",description:"Render data points as a route",isBaseMap:!1,showLocation:!0,state:xi.pn.beta,create:async(r,e,t,i)=>{const n={...cn,...e?.config},s=await Wt(n.style),o=await(0,St.nE)(e.location),a=new nn(o),l=new Oe({source:a}),h=n.arrow===1||n.arrow===-1;if(!s.fields&&!h){const L=As(s.base);s.config.size&&s.config.size.fixed&&L.getStroke().setWidth(s.config.size.fixed),l.setStyle(L)}else l.setStyle(L=>{const D=L.get("rowIndex"),b=s.dims;if(!b||!(0,E.isNumber)(D))return As(s.base);const N=[],Z=L.getGeometry(),q=s.config.opacity??1;if(Z instanceof Ri.Ay){const le=Z.getCoordinates();if(le){let Q=0;const me=2;for(let J=0;J<le.length-1;J++){const Y=le[Q],U=le[J+1],H=(0,de.A)(i.visualization.getColorByName((b.color&&b.color.get(Q))??s.base.color)).setAlpha(q).toString(),pe=(0,de.A)(i.visualization.getColorByName((b.color&&b.color.get(J+1))??s.base.color)).setAlpha(q).toString(),we=(b.size&&b.size.get(Q))??s.base.size,ke=(b.size&&b.size.get(J+1))??s.base.size,B=new Bo({visible:!0,lineCap:n.arrow===0?"round":"square",color:H,color2:pe,width:(b.size&&b.size.get(Q))??s.base.size,width2:(b.size&&b.size.get(J+1))??s.base.size});if(n.arrow&&(B.setArrow(n.arrow),n.arrow>0?(B.setArrowColor(pe),B.setArrowSize((ke??0)*1.5)):(B.setArrowColor(H),B.setArrowSize((we??0)*1.5))),(0,qe.o3)(r,me,Y,U)){const Qe=new ze.A([Y,U]);B.setGeometry(Qe),N.push(B),Q=J+1}}if(N.length===0){const J=new Tt.A(le[0]),Y=((b.size&&b.size.get(0))??s.base.size??10)/2,U=(0,de.A)(i.visualization.getColorByName((b.color&&b.color.get(0))??s.base.color)).setAlpha(q).toString(),H=new fe({image:new Ct({radius:Y,fill:new Ie({color:U})})});H.setGeometry(J),N.push(H)}}return N}const he={...s.base};return b.color&&(he.color=b.color.get(D)),As(he)});const c=new Ue.A({}),d=new Ue.A({}),u=new Ue.A({}),f=[d,u],g=(s.base.lineWidth||6)+3,m=new fe({image:new Ct({radius:g,stroke:new Te({color:(0,Uo.alpha)(er,1),width:1}),fill:new Ie({color:(0,Uo.alpha)(er,.4)})})}),p=new fe({stroke:new Te({color:er,width:1,lineDash:[3,3],lineCap:"square"})}),v=new Oe({source:new ct({features:[c]}),style:m}),y=new Oe({source:new ct({features:f}),style:p}),w=new Nn.A({layers:[l,v,y]}),R=new K.yU;return R.add(t.getStream(ee.b_).pipe((0,Nc.c)(8)).subscribe({next:L=>{const D=r.getView().calculateExtent(r.getSize()),N=a.getFeatures()[0]?.get("frame"),Z=L.payload?.point?.time;if(N&&Z){const q=N.fields.find(he=>he.type===F.PU.time);if(q){const he=q.values,le=Yc(he,Z);if(le!==null){const Q=(0,St.FM)(N,o);if(Q.field){const me=Q.field.values[le],J=me.getCoordinates();c.setGeometry(me),c.setStyle(m),d.setGeometry(new ze.A([[D[0],J[1]],[D[2],J[1]]])),u.setGeometry(new ze.A([[J[0],D[1]],[J[0],D[3]]])),f.forEach(Y=>Y.setStyle(p))}}}}}})),R.add(t.subscribe(ee.ql,L=>{c.setStyle(new fe({})),f.forEach(D=>D.setStyle(new fe({})))})),{init:()=>w,dispose:()=>R.unsubscribe(),update:L=>{if(L.series?.length)for(const D of L.series){(s.fields||h)&&(s.dims=(0,qe.ue)(D,s,i)),a.updateLineString(D);break}},registerOptionsUI:L=>{L.addCustomEditor({id:"config.style",path:"config.style",name:"Style",editor:ti,settings:{simpleFixedValues:!1},defaultValue:cn.style}).addRadio({path:"config.arrow",name:"Arrow",settings:{options:[{label:"None",value:0},{label:"Forward",value:1},{label:"Reverse",value:-1}]},defaultValue:cn.arrow})}}},defaultOptions:cn};function Yc(r,e){if(r.length===0)return null;if(r.length===1)return 0;const t=r.length-1;if(e<r[0])return 0;if(e>r[t])return t;const i=Math.abs(Math.round(t*(e-r[0])/(r[t]-r[0])));if(e<r[i]){for(let n=i;n>0;n--)if(e>r[n])return n<t?n+1:t;return 0}else{for(let n=i;n<t;n++)if(e<r[n])return n>0?n-1:0;return t}}const Xo=[Kl,Fc,Dc,qh,Hh,Vh,Uc,Gc,kc],zi={type:"default",name:"",config:{}},Vo={id:zi.type,name:"Default base layer",isBaseMap:!0,create:(r,e,t,i)=>{const n=fi.$W?.geomapDefaultBaseLayerConfig?.type;if(n){const s=un.getIfExists(n);if(!s)throw new Error("Invalid basemap configuration on server");return s.create(r,fi.$W.geomapDefaultBaseLayerConfig,t,i)}return mo.create(r,e,t,i)}},un=new On.O(()=>[Vo,...Us,...Xo]);function jo(r,e){const t={options:[],current:[]},i=[];for(const n of r){const s={label:n.name,value:n.id,description:n.description};switch(n.state){case xi.pn.alpha:if(!fi.yn)break;s.label=`${n.name} (Alpha)`,s.icon="bolt",i.push(s);break;case xi.pn.beta:s.label=`${n.name} (Beta)`;default:t.options.push(s)}n.id===e&&t.current.push(s)}for(const n of i)t.options.push(n);return t}function Zo(r,e){return jo(r?[Vo,...Us]:[...Xo,...Us],e)}const td={layers:[]},Ho={allLayers:!0,id:"zero",lat:0,lon:0,zoom:1};var Gi=(r=>(r.Details="details",r.None="none",r))(Gi||{}),Xc=(r=>(r.Coords="coords",r.Fit="fit",r.Zero="zero",r))(Xc||{}),Vc=C(13752),Ko=C(85200);const tr=(r,e,t)=>{if(r.update){let i=t;if(e.filterData){const n=(0,Ko.Dq)(e.filterData);i={...i,series:i.series.filter(n)}}r.update(i)}};async function jc(r,e,t){if(!r.map)return!1;const i=r.byName.get(e);if(!i)return!1;let n=-1;const s=r.map?.getLayers();for(let a=0;a<s?.getLength();a++)if(s.item(a)===i.layer){n=a;break}if(t.name!==e){if(!t.name)t.name=e;else if(r.byName.has(t.name))return!1;r.byName.delete(e),e=t.name,r.byName.set(e,i)}i.options.type,t.type;const o=r.layers.slice(0);try{const a=await Kn(r,r.map,t,i.isBasemap);o[n]?.handler.dispose?.(),o[n]=a,s.setAt(n,a.layer),tr(a.handler,t,r.props.data)}catch(a){return console.warn("ERROR",a),!1}return r.setState({legends:[]}),r.layers=o,r.doOptionsUpdate(n),!0}async function Kn(r,e,t,i){i&&(!t?.type||tt.$.geomapDisableCustomBaseLayer)&&(t=zi),t?.type||(t={type:Ls,name:(0,qe.q)(r),config:{}});const n=un.getIfExists(t.type);if(!n)return Promise.reject("unknown layer: "+t.type);t.config?.attribution&&(t.config.attribution=$r.sQ.sanitizeTextPanelContent(t.config.attribution));const s=await n.create(e,t,r.props.eventBus,tt.$.theme2),o=s.init();t.opacity!=null&&o.setOpacity(t.opacity),t.name||(t.name=(0,qe.q)(r));const a=t.name,l={isBasemap:i,options:t,layer:o,handler:s,mouseEvents:new Vc.B,getName:()=>a,onChange:h=>{jc(r,a,h)}};return r.byName.set(a,l),l.layer.__state=l,tr(s,t,r.props.data),l}const Jo=r=>r?.__state,Zc=r=>({selectLayer:t=>{const i=r.layers.findIndex(n=>n.options.name===t);r.panelContext&&r.panelContext.onInstanceStateChange&&r.panelContext.onInstanceStateChange({map:r.map,layers:r.layers,selected:i,actions:r.actions})},canRename:t=>!r.byName.has(t),deleteLayer:t=>{const i=[];for(const n of r.layers)n.options.name===t?r.map?.removeLayer(n.layer):i.push(n);r.layers=i,r.doOptionsUpdate(0)},addlayer:t=>{const i=un.getIfExists(t);i&&Kn(r,r.map,{type:i.id,name:(0,qe.q)(r),config:(0,E.cloneDeep)(i.defaultOptions),location:i.showLocation?{mode:Ne.aG.Auto}:void 0,tooltip:!0,...!i.hideOpacity&&{opacity:P.T5.opacity}},!1).then(n=>{r.layers=r.layers.slice(0),r.layers.push(n),r.map?.addLayer(n.layer),r.doOptionsUpdate(r.layers.length-1)})},reorder:(t,i)=>{const n=Array.from(r.layers),[s]=n.splice(t,1);n.splice(i,0,s),r.layers=n,r.doOptionsUpdate(i);const o=r.map?.getLayers();o.clear(),r.layers.forEach(a=>o.push(a.layer))}});function Hc(r=[],e=!1,t=!1,i){return r.filter(n=>n.layer instanceof Oe||n.layer instanceof Nn.A).flatMap(n=>{const s=n.layer;if(s instanceof Nn.A)return Kc(s);if(s instanceof Oe){if(e)return[s.getSource().getExtent()];if(t&&i===n.options.name){const o=s.getSource().getFeatures(),l=o[o.length-1]?.getGeometry();return l?[l.getExtent()]:[]}else if(!t&&i===n.options.name)return[s.getSource().getExtent()];return[]}else return[]}).reduce(T.X$,(0,T.S5)())}function Kc(r){return r.getLayers().getArray().filter(e=>e instanceof Oe).map(e=>e instanceof Oe?e.getSource().getExtent()??[]:[])}const Jc=r=>{r.map?.on("singleclick",r.pointerClickListener),r.map?.on("pointermove",(0,E.debounce)(r.pointerMoveListener,200)),r.map?.getViewport().addEventListener("mouseout",e=>{r.props.eventBus.publish(new ee.ql)})},$c=(r,e)=>{$o(r,e)&&(r.preventDefault(),r.stopPropagation(),e.mapDiv.style.cursor="auto",e.setState({ttipOpen:!0}))},$o=(r,e)=>{if(e.state.measureMenuActive)return!0;if(!e.map||e.state.ttipOpen&&e.state?.ttip?.layers?.length)return!1;const t=r.originalEvent,i=e.map.getEventPixel(t),n=(0,X.WP)(e.map.getCoordinateFromPixel(i)),{hoverPayload:s}=e;s.pageX=t.pageX,s.pageY=t.pageY,s.point={lat:n[1],lon:n[0]},s.data=void 0,s.columnIndex=void 0,s.rowIndex=void 0,s.layers=void 0;const o=[],a=new Map;let l={};e.map.forEachFeatureAtPixel(i,(c,d,u)=>{const f=Jo(d);if(!s.data){const g=c.getProperties(),m=g.frame;m&&(s.data=l.data=m,s.rowIndex=l.rowIndex=g.rowIndex),f?.mouseEvents&&f.mouseEvents.next(c)}if(f){let g=a.get(f);g||(g={layer:f,features:[]},a.set(f,g),o.push(g)),g.features.push(c)}},{layerFilter:c=>Jo(c)?.options?.tooltip!==!1}),e.hoverPayload.layers=o.length?o:void 0,e.props.eventBus.publish(e.hoverEvent),(e.state.ttip===void 0||e.state.ttip?.layers!==s.layers||s.layers)&&e.setState({ttip:{...s}}),o.length||e.layers.forEach(c=>{c.mouseEvents.next(void 0)});const h=!!o.length;return e.mapDiv.style.cursor=h?"pointer":"auto",h};var yt=(r=>(r.Zero="zero",r.Coordinates="coords",r.Fit="fit",r))(yt||{});const dn=new On.O(()=>[{id:"fit",name:"Fit to data",zoom:15},{id:"zero",name:"(0\xB0, 0\xB0)",lat:0,lon:0},{id:"coords",name:"Coordinates"},{id:"north-america",name:"North America",lat:40,lon:-100,zoom:4},{id:"south-america",name:"South America",lat:-20,lon:-60,zoom:3},{id:"europe",name:"Europe",lat:46,lon:14,zoom:4},{id:"africa",name:"Africa",lat:0,lon:30,zoom:3},{id:"west-asia",name:"West Asia",lat:26,lon:53,zoom:4},{id:"s-asia",name:"South Asia",lat:19.5,lon:80,zoom:4},{id:"se-asia",name:"South-East Asia",lat:10,lon:106,zoom:4},{id:"e-asia",name:"East Asia",lat:33,lon:120,zoom:4},{id:"australia",name:"Australia",lat:-25,lon:135,zoom:4},{id:"oceania",name:"Oceania",lat:-10,lon:-140,zoom:3}]);let ir;class qo extends _.Component{constructor(e){super(e),this.panelContext=void 0,this.subs=new K.yU,this.globalCSS=Pl(tt.$.theme2),this.hoverPayload={point:{},pageX:-1,pageY:-1},this.hoverEvent=new ee.b_(this.hoverPayload),this.layers=[],this.byName=new Map,this.actions=Zc(this),this.initMapRef=async t=>{if(!t)return;this.mapDiv=t,this.map&&this.map.dispose();const{options:i}=this.props,n=(0,qe.rd)(this,i,t);this.byName.clear();const s=[];try{s.push(await Kn(this,n,i.basemap??zi,!0)),i.layers||(i.layers=[Ms]);for(const o of i.layers)s.push(await Kn(this,n,o,!1))}catch(o){console.error("error loading layers",o)}for(const o of s)n.addLayer(o.layer);this.layers=s,this.map=n,this.initViewExtent(n.getView(),i.view),this.mouseWheelZoom=new j.A,this.map?.addInteraction(this.mouseWheelZoom),(0,qe.cA)(this,i),Jc(this),(0,qe.Bz)(this,s,s.length-1),this.setState({legends:this.getLegends()})},this.clearTooltip=()=>{this.state.ttip&&!this.state.ttipOpen&&this.tooltipPopupClosed()},this.tooltipPopupClosed=()=>{this.setState({ttipOpen:!1,ttip:void 0})},this.pointerClickListener=t=>{$c(t,this)},this.pointerMoveListener=t=>{$o(t,this)},this.initMapView=t=>{let i=new hi.Ay({center:[0,0],zoom:1,showFullExtent:!0});return t.shared&&(ir?i=ir:ir=i),this.initViewExtent(i,t),i},this.state={ttipOpen:!1,legends:[]},this.subs.add(this.props.eventBus.subscribe(ce.i0,t=>{this.mapDiv&&this.props.id===t.payload&&this.initMapRef(this.mapDiv)}))}componentDidMount(){this.panelContext=this.context}componentWillUnmount(){this.subs.unsubscribe();for(const e of this.layers)e.handler.dispose?.();this.map?.dispose()}shouldComponentUpdate(e){return this.map&&((this.props.height!==e.height||this.props.width!==e.width)&&this.map.updateSize(),this.props.data!==e.data&&this.dataChanged(e.data),this.props.options!==e.options&&this.optionsChanged(e.options)),!0}componentDidUpdate(e){this.map&&(this.props.height!==e.height||this.props.width!==e.width)&&this.map.updateSize(),this.map&&this.props.data!==e.data&&this.dataChanged(this.props.data)}doOptionsUpdate(e){const{options:t,onOptionsChange:i}=this.props,n=this.layers;this.map?.getLayers().forEach(s=>{s instanceof Vr&&(this.map?.removeLayer(s),this.map?.addLayer(s))}),i({...t,basemap:n[0].options,layers:n.slice(1).map(s=>s.options)}),(0,qe.Bz)(this,n,e),this.setState({legends:this.getLegends()})}optionsChanged(e){const t=this.props.options;if(e.view!==t.view){const i=this.initMapView(e.view);this.map&&i&&this.map.setView(i)}e.controls!==t.controls&&this.initControls(e.controls??{showZoom:!0,showAttribution:!0})}dataChanged(e){if(e===this.props.data)for(const i of this.layers)tr(i.handler,i.options,this.props.data);const t=dn.getIfExists(this.props.options.view.id);if(t&&t.id===yt.Fit){const i=this.initMapView(this.props.options.view);this.map&&i&&this.map.setView(i)}}initViewExtent(e,t){const i=dn.getIfExists(t.id);if(i){let n;if(i.lat==null){if(i.id===yt.Coordinates)n=[t.lon??0,t.lat??0];else if(i.id===yt.Fit){const s=Hc(this.layers,t.allLayers,t.lastOnly,t.layer);if(!(0,T.Im)(s)){const o=t.padding??5,a=e.getResolutionForExtent(s,this.map?.getSize()),l=t.zoom??t.maxZoom;e.fit(s,{maxZoom:l}),e.setResolution(a*(o/100+1));const h=e.getZoom();h&&l&&h>l&&e.setZoom(l)}}}else n=[i.lon??0,i.lat??0];n&&e.setCenter((0,X.Rb)(n))}t.maxZoom&&e.setMaxZoom(t.maxZoom),t.minZoom&&e.setMaxZoom(t.minZoom),t.zoom&&i?.id!==yt.Fit&&e.setZoom(t.zoom)}initControls(e){if(!this.map)return;this.map.getControls().clear(),e.showZoom&&this.map.addControl(new G.A),e.showScale&&this.map.addControl(new z({units:e.scaleUnits,minWidth:100})),this.mouseWheelZoom.setActive(!!e.mouseWheelZoom),e.showAttribution&&this.map.addControl(new ci.A({collapsed:!0,collapsible:!0}));let t=[];e.showMeasure&&(t=[_.createElement(Fl,{key:"measure",map:this.map,menuActiveState:n=>{this.setState({ttipOpen:n,measureMenuActive:n})}})]);let i=[];e.showDebug&&(i=[_.createElement(ha,{key:"debug",map:this.map})]),this.setState({topRight1:t,topRight2:i})}getLegends(){const e=[];for(const t of this.layers)t.handler.legend&&e.push(_.createElement("div",{key:t.options.name},t.handler.legend));return e}render(){let{ttip:e,ttipOpen:t,topRight1:i,legends:n,topRight2:s}=this.state;const{options:o}=this.props,a=o.controls.showScale;return!t&&o.tooltip?.mode===Gi.None&&(e=void 0),_.createElement(_.Fragment,null,_.createElement(nt.Global,{styles:this.globalCSS}),_.createElement("div",{className:Qo.wrap,onMouseLeave:this.clearTooltip},_.createElement("div",{className:Qo.map,ref:this.initMapRef}),_.createElement(_e,{bottomLeft:n,topRight1:i,topRight2:s,blStyle:{bottom:a?"35px":"8px"}})),_.createElement(xn,{ttip:e,isOpen:t,onClose:this.tooltipPopupClosed}))}}qo.contextType=ge.e4;const Qo={wrap:(0,ie.css)({position:"relative",width:"100%",height:"100%"}),map:(0,ie.css)({position:"absolute",zIndex:0,width:"100%",height:"100%"})};var qc=C(58313),nr=C(75494),Qc=C(14578),eu=C(54391);const tu="layer-drag-drop-list",ea=({layers:r,getLayerInfo:e,onDragEnd:t,onSelect:i,onDelete:n,onDuplicate:s,showActions:o,selection:a,excludeBaseLayer:l,onNameChange:h,verifyLayerNameUniqueness:c})=>{const d=(0,ye.of)(iu),u=f=>f?`${d.row} ${d.sel}`:d.row;return _.createElement(nr.JY,{onDragEnd:t},_.createElement(nr.gL,{droppableId:"droppable"},(f,g)=>_.createElement("div",{...f.droppableProps,ref:f.innerRef,"data-testid":tu},(()=>{const m=[],p=l?1:0,v=l?2:1;for(let y=r.length-1;y>=p;y--){const w=r[y],R=w.getName(),L=!!a?.includes(R);m.push(_.createElement(nr.sx,{key:R,draggableId:R,index:m.length},(D,b)=>_.createElement("div",{className:u(L),ref:D.innerRef,...D.draggableProps,...D.dragHandleProps,onMouseDown:()=>i(w),role:"button",tabIndex:0},_.createElement(eu.R,{name:R,onChange:N=>h(w,N),verifyLayerNameUniqueness:c??void 0}),_.createElement("div",{className:d.textWrapper},"\xA0 ",e(w)),o(w)&&_.createElement(_.Fragment,null,s?_.createElement(ss.K,{name:"copy",tooltip:"Duplicate",className:d.actionIcon,onClick:()=>s(w)}):null,_.createElement(ss.K,{name:"trash-alt",tooltip:"Remove",className:(0,ie.cx)(d.actionIcon,d.dragIcon),onClick:()=>n(w)})),r.length>v&&_.createElement(Qc.I,{"aria-label":"Drag and drop icon",title:"Drag and drop to reorder",name:"draggabledots",size:"lg",className:d.dragIcon}))))}return m})(),f.placeholder)))};ea.defaultProps={isGroup:()=>!1};const iu=r=>({wrapper:(0,ie.css)({marginBottom:r.spacing(2)}),row:(0,ie.css)({padding:r.spacing(.5,1),borderRadius:r.shape.radius.default,background:r.colors.background.secondary,minHeight:r.spacing(4),display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"3px",cursor:"pointer",border:`1px solid ${r.components.input.borderColor}`,"&:hover":{border:`1px solid ${r.components.input.borderHover}`}}),sel:(0,ie.css)({border:`1px solid ${r.colors.primary.border}`,"&:hover":{border:`1px solid ${r.colors.primary.border}`}}),dragIcon:(0,ie.css)({cursor:"drag"}),actionIcon:(0,ie.css)({color:r.colors.text.secondary,"&:hover":{color:r.colors.text.primary}}),typeWrapper:(0,ie.css)({color:r.colors.primary.text,marginRight:"5px"}),textWrapper:(0,ie.css)({display:"flex",alignItems:"center",flexGrow:1,overflow:"hidden",marginRight:r.spacing(1)})}),nu=r=>{const{layers:e,selected:t,actions:i}=r.context.instanceState??{};if(!e||!i)return _.createElement("div",null,"No layers?");const n=c=>{if(!c.destination)return;const{layers:d,actions:u}=r.context.instanceState??{};if(!d||!u)return;const f=d.length-1,g=(c.source.index-f)*-1,m=(c.destination.index-f)*-1;u.reorder(g,m)},s=c=>{i.selectLayer(c.options.name)},o=c=>{i.deleteLayer(c.options.name)},a=c=>c.options.type,l=(c,d)=>{c.onChange({...c.options,name:d})},h=t?[e[t]?.getName()]:[];return _.createElement(_.Fragment,null,_.createElement(Is.mc,null,_.createElement(qc.r,{onChange:c=>i.addlayer(c.value),options:Zo(!1).options,label:"Add layer"})),_.createElement("br",null),_.createElement(ea,{layers:e,showActions:()=>e.length>2,getLayerInfo:a,onDragEnd:n,onSelect:s,onDelete:o,selection:h,excludeBaseLayer:!0,onNameChange:l,verifyLayerNameUniqueness:i.canRename}))},su=({labelWidth:r,value:e,onChange:t})=>{const i=s=>{t({...e,lat:s})},n=s=>{t({...e,lon:s})};return _.createElement(_.Fragment,null,_.createElement(It.C,null,_.createElement(ut.I,{label:"Latitude",labelWidth:r,grow:!0},_.createElement(ln.Q,{value:e.lat,min:-90,max:90,step:.001,onChange:i}))),_.createElement(It.C,null,_.createElement(ut.I,{label:"Longitude",labelWidth:r,grow:!0},_.createElement(ln.Q,{value:e.lon,min:-180,max:180,step:.001,onChange:n}))))};var ta=(r=>(r.all="all",r.layer="layer",r.last="last",r))(ta||{}),ia=(r=>(r.all="All layers",r.layer="Layer",r.last="Last value",r))(ia||{});const ru=Object.values(ta).map(r=>({label:ia[r],value:r})),ou=({labelWidth:r,value:e,onChange:t,context:i})=>{const n=(0,_.useMemo)(()=>i.options?.layers?i.options.layers.map(d=>({label:d.name,value:d.name,description:void 0})):[],[i.options?.layers]),s=(0,_.useCallback)(d=>{t({...e,layer:d.value})},[e,t]),o=_.createElement(It.C,null,_.createElement(ut.I,{label:"Layer",labelWidth:r,grow:!0},_.createElement(Ti.l6,{options:n,onChange:s,placeholder:n[0]?.label}))),a=d=>{t({...e,padding:d})},l=_.createElement(It.C,null,_.createElement(ut.I,{label:"Padding",labelWidth:r,grow:!0,tooltip:"sets padding in relative percent beyond data extent"},_.createElement(ln.Q,{value:e?.padding??5,min:0,step:1,onChange:a}))),h=e.allLayers?"all":!e.allLayers&&e.lastOnly?"last":"layer",c=d=>{d!=="all"&&!e.layer?t({...e,allLayers:d==="all",lastOnly:d==="last",layer:n[0].value}):t({...e,allLayers:d==="all",lastOnly:d==="last"})};return _.createElement(_.Fragment,null,_.createElement(It.C,null,_.createElement(ut.I,{label:"Data",labelWidth:r,grow:!0},_.createElement(wi.z,{value:h,options:ru,onChange:c}))),!e?.allLayers&&o,!e?.lastOnly&&l)},au=({value:r,onChange:e,context:t})=>{const n=(0,_.useMemo)(()=>{const a=[];return r?.id?a.push(r.id):a.push(dn.list()[0].id),dn.selectOptions(a)},[r?.id]),s=(0,_.useCallback)(()=>{const a=t.instanceState?.map;if(a){const l=a.getView(),h=l.getCenter();if(h){const c=(0,X.WP)(h,l.getProjection());e({...r,id:yt.Coordinates,lon:+c[0].toFixed(6),lat:+c[1].toFixed(6),zoom:+l.getZoom().toFixed(2)})}}},[r,e,t.instanceState]),o=(0,_.useCallback)(a=>{const l=dn.getIfExists(a.value);l&&e({...r,id:l.id,lat:l.lat??r?.lat,lon:l.lon??r?.lon,zoom:l.zoom??r?.zoom})},[r,e]);return _.createElement(_.Fragment,null,_.createElement(It.C,null,_.createElement(ut.I,{label:"View",labelWidth:10,grow:!0},_.createElement(Ti.l6,{options:n.options,value:n.current,onChange:o}))),r.id===yt.Coordinates&&_.createElement(su,{labelWidth:10,value:r,onChange:e}),r.id===yt.Fit&&_.createElement(ou,{labelWidth:10,value:r,onChange:e,context:t}),_.createElement(It.C,null,_.createElement(ut.I,{label:r?.id===yt.Fit?"Max Zoom":"Zoom",labelWidth:10,grow:!0},_.createElement(ln.Q,{value:r?.zoom??1,min:1,max:18,step:.01,onChange:a=>{e({...r,zoom:a})}}))),_.createElement(Is.gW,null,_.createElement(yn.$n,{variant:"secondary",size:"sm",fullWidth:!0,onClick:s},_.createElement("span",null,"Use current map settings"))))};var lu=C(54612),hu=C(61983),cu=C(19743);function na(r){return{category:r.category,path:"--",defaultValue:r.basemaps?zi:Ms,values:e=>({getContext:t=>({...t,options:r.state.options,instanceState:r.state}),getValue:t=>(0,E.get)(r.state.options,t),onChange:(t,i)=>{const{state:n}=r,{options:s}=n;if(t==="type"&&i){const o=un.getIfExists(i);if(o){const a={...s,type:o.id,config:{...o.defaultOptions}};o.showLocation&&(a.location?.mode?delete a.location:a.location={mode:Ne.aG.Auto}),n.onChange(a);return}}n.onChange((0,lu.Sf)(s,t,i))}}),build:(e,t)=>{if(!r.state)return;const{handler:i,options:n}=r.state,s=un.getIfExists(n?.type),o=Zo(r.basemaps,n?.type?n.type:zi.type);if(e.addSelect({path:"type",name:"Layer type",settings:{options:o.options}}),i.update&&e.addCustomEditor({id:"filterData",path:"filterData",name:"Data",editor:cu.x,defaultValue:void 0}),!!s&&n.type!==zi.type){if(s.showLocation){let a=t.data;if(n.filterData){const l=(0,Ko.Dq)(n.filterData);a=a.filter(l)}(0,hu.G)("Location","location.",e,n.location,a)}i.registerOptionsUI&&i.registerOptionsUI(e,t),(0,E.isEqual)(r.category,["Base layer"])||(s.hideOpacity||e.addSliderInput({path:"opacity",name:"Opacity",defaultValue:1,settings:{min:0,max:1,step:.1}}),e.addBooleanSwitch({path:"tooltip",name:"Display tooltip",description:"Show the tooltip for layer",defaultValue:!0}))}}}}var uu=C(75059),du=C(18282),fu=C(50082);const gu=(r,e,t,i)=>{if(e==="grafana-worldmap-panel"&&t.angular){const{fieldConfig:n,options:s,xform:o}=mu({...t.angular,fieldConfig:i});return o?.id?.length&&(r.transformations=r.transformations?[...r.transformations,o]:[o]),r.fieldConfig=n,s}return{}};function mu(r){const e={defaults:{},overrides:[]},t=(0,E.cloneDeep)(Ms),i={view:{id:yt.Zero},controls:{showZoom:!0,mouseWheelZoom:!!r.mouseWheelZoom},basemap:{type:"default",name:"Basemap"},layers:[t],tooltip:{mode:Gi.Details}};let n=Ni(r.decimals);n&&(e.defaults.decimals=n);const s=t.config.style;n=Ni(r.circleMaxSize),n&&(s.size.max=n),n=Ni(r.circleMinSize),n&&(s.size.min=n);let o;const a=uu.AS.getIfExists(r.valueName);if(a&&r.locationData?.length)switch(o={id:du.F.reduce,options:{reducers:[a.id]}},r.locationData){case"countries":case"countries_3letter":t.location={mode:Ne.aG.Lookup,gazetteer:"public/gazetteer/countries.json",lookup:void 0};break;case"states":t.location={mode:Ne.aG.Lookup,gazetteer:"public/gazetteer/usa-states.json",lookup:void 0};break}if(r.thresholds&&r.colors){const h=r.thresholds.split(",").map(d=>Number(d.trim())),c=[];for(const d of r.colors){const u=c.length-1;u>=0?c.push({value:h[u],color:d}):c.push({value:-1/0,color:d})}e.defaults.thresholds={mode:fu.O.Absolute,steps:c}}n=Ni(r.initialZoom),n&&(i.view.zoom=n);const l={"(0\xB0, 0\xB0)":yt.Zero,"North America":"north-america",Europe:"europe","West Asia":"west-asia","SE Asia":"se-asia","Last GeoHash":yt.Coordinates};return i.view.id=l[r.mapCenter],i.view.lat=Ni(r.mapCenterLatitude),i.view.lon=Ni(r.mapCenterLongitude),{fieldConfig:e,options:i,xform:o}}function Ni(r){const e=Number(r);return isNaN(e)?void 0:e}const pu=r=>{const e=r?.pluginVersion??"";if((e.startsWith("8.1")||e.startsWith("8.2"))&&r.options?.layers?.length===1){const i=r.options.layers[0];if(i?.type==="markers"&&i.config){const n=i.config,s={style:(0,E.cloneDeep)(P.T5),showLegend:!!n.showLegend};n.size&&(s.style.size=n.size),n.color&&(s.style.color=n.color),n.fillOpacity&&(s.style.opacity=n.fillOpacity);const o=Zl(n.shape);return o&&(s.style.symbol={fixed:o,mode:Ne.q_.Fixed}),{...r.options,layers:[{...i,config:s}]}}}return r.options},_u=new se.m(qo).setNoPadding().setPanelChangeHandler(gu).setMigrationHandler(pu).useFieldConfig({useCustomConfig:r=>{it.e(r)}}).setPanelOptions((r,e)=>{let t=["Map view"];r.addCustomEditor({category:t,id:"view",path:"view",name:"Initial view",description:"This location will show when the panel first loads.",editor:au,defaultValue:Ho}),r.addBooleanSwitch({category:t,path:"view.shared",description:"Use the same view across multiple panels. Note: this may require a dashboard reload.",name:"Share view",defaultValue:Ho.shared});const i=e.instanceState;if(i?.layers){const n=["Map layers"],s=["Basemap layer"];r.addCustomEditor({category:n,id:"layers",path:"",name:"",editor:nu});const o=i.layers[i.selected];i.selected&&o&&r.addNestedOptions(na({state:o,category:n,basemaps:!1}));const a=i.layers[0];tt.$.geomapDisableCustomBaseLayer?r.addCustomEditor({category:s,id:"layers",path:"",name:"",editor:()=>_.createElement("div",null,"The basemap layer is configured by the server admin.")}):a&&r.addNestedOptions(na({state:a,category:s,basemaps:!0}))}t=["Map controls"],r.addBooleanSwitch({category:t,path:"controls.showZoom",description:"Show zoom control buttons in the upper left corner",name:"Show zoom control",defaultValue:!0}).addBooleanSwitch({category:t,path:"controls.mouseWheelZoom",description:"Enable zoom control via mouse wheel",name:"Mouse wheel zoom",defaultValue:!0}).addBooleanSwitch({category:t,path:"controls.showAttribution",name:"Show attribution",description:"Show the map source attribution info in the lower right",defaultValue:!0}).addBooleanSwitch({category:t,path:"controls.showScale",name:"Show scale",description:"Indicate map scale",defaultValue:!1}).addBooleanSwitch({category:t,path:"controls.showMeasure",name:"Show measure tools",description:"Show tools for making measurements on the map",defaultValue:!1}).addBooleanSwitch({category:t,path:"controls.showDebug",name:"Show debug",description:"Show map info",defaultValue:!1}).addRadio({category:t,path:"tooltip.mode",name:"Tooltip",defaultValue:Gi.Details,settings:{options:[{label:"None",value:Gi.None,description:"Show contents on click, not hover"},{label:"Details",value:Gi.Details,description:"Show popup on hover"}]}})})},35341:function(Bt){(function(Re,C){Bt.exports=C()})(this,function(){"use strict";function Re(I,A,z,G,T){(function j(K,ee,ge,ce,ye){for(;ce>ge;){if(ce-ge>600){var _e=ce-ge+1,Fe=ee-ge+1,je=Math.log(_e),He=.5*Math.exp(2*je/3),gt=.5*Math.sqrt(je*He*(_e-He)/_e)*(Fe-_e/2<0?-1:1),x=Math.max(ge,Math.floor(ee-Fe*He/_e+gt)),S=Math.min(ce,Math.floor(ee+(_e-Fe)*He/_e+gt));j(K,ee,x,S,ye)}var E=K[ee],F=ge,M=ce;for(C(K,ge,ee),ye(K[ce],E)>0&&C(K,ge,ce);F<M;){for(C(K,F,M),F++,M--;ye(K[F],E)<0;)F++;for(;ye(K[M],E)>0;)M--}ye(K[ge],E)===0?C(K,ge,M):C(K,++M,ce),M<=ee&&(ge=M+1),ee<=M&&(ce=M-1)}})(I,A,z||0,G||I.length-1,T||_)}function C(I,A,z){var G=I[A];I[A]=I[z],I[z]=G}function _(I,A){return I<A?-1:I>A?1:0}var se=function(I){I===void 0&&(I=9),this._maxEntries=Math.max(4,I),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function tt(I,A,z){if(!z)return A.indexOf(I);for(var G=0;G<A.length;G++)if(z(I,A[G]))return G;return-1}function it(I,A){ie(I,0,I.children.length,A,I)}function ie(I,A,z,G,T){T||(T=Pe(null)),T.minX=1/0,T.minY=1/0,T.maxX=-1/0,T.maxY=-1/0;for(var j=A;j<z;j++){var K=I.children[j];nt(T,I.leaf?G(K):K)}return T}function nt(I,A){return I.minX=Math.min(I.minX,A.minX),I.minY=Math.min(I.minY,A.minY),I.maxX=Math.max(I.maxX,A.maxX),I.maxY=Math.max(I.maxY,A.maxY),I}function hi(I,A){return I.minX-A.minX}function ci(I,A){return I.minY-A.minY}function De(I){return(I.maxX-I.minX)*(I.maxY-I.minY)}function Be(I){return I.maxX-I.minX+(I.maxY-I.minY)}function X(I,A){return I.minX<=A.minX&&I.minY<=A.minY&&A.maxX<=I.maxX&&A.maxY<=I.maxY}function ue(I,A){return A.minX<=I.maxX&&A.minY<=I.maxY&&A.maxX>=I.minX&&A.maxY>=I.minY}function Pe(I){return{children:I,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function lt(I,A,z,G,T){for(var j=[A,z];j.length;)if(!((z=j.pop())-(A=j.pop())<=G)){var K=A+Math.ceil((z-A)/G/2)*G;Re(I,K,A,z,T),j.push(A,K,K,z)}}return se.prototype.all=function(){return this._all(this.data,[])},se.prototype.search=function(I){var A=this.data,z=[];if(!ue(I,A))return z;for(var G=this.toBBox,T=[];A;){for(var j=0;j<A.children.length;j++){var K=A.children[j],ee=A.leaf?G(K):K;ue(I,ee)&&(A.leaf?z.push(K):X(I,ee)?this._all(K,z):T.push(K))}A=T.pop()}return z},se.prototype.collides=function(I){var A=this.data;if(!ue(I,A))return!1;for(var z=[];A;){for(var G=0;G<A.children.length;G++){var T=A.children[G],j=A.leaf?this.toBBox(T):T;if(ue(I,j)){if(A.leaf||X(I,j))return!0;z.push(T)}}A=z.pop()}return!1},se.prototype.load=function(I){if(!I||!I.length)return this;if(I.length<this._minEntries){for(var A=0;A<I.length;A++)this.insert(I[A]);return this}var z=this._build(I.slice(),0,I.length-1,0);if(this.data.children.length)if(this.data.height===z.height)this._splitRoot(this.data,z);else{if(this.data.height<z.height){var G=this.data;this.data=z,z=G}this._insert(z,this.data.height-z.height-1,!0)}else this.data=z;return this},se.prototype.insert=function(I){return I&&this._insert(I,this.data.height-1),this},se.prototype.clear=function(){return this.data=Pe([]),this},se.prototype.remove=function(I,A){if(!I)return this;for(var z,G,T,j=this.data,K=this.toBBox(I),ee=[],ge=[];j||ee.length;){if(j||(j=ee.pop(),G=ee[ee.length-1],z=ge.pop(),T=!0),j.leaf){var ce=tt(I,j.children,A);if(ce!==-1)return j.children.splice(ce,1),ee.push(j),this._condense(ee),this}T||j.leaf||!X(j,K)?G?(z++,j=G.children[z],T=!1):j=null:(ee.push(j),ge.push(z),z=0,G=j,j=j.children[0])}return this},se.prototype.toBBox=function(I){return I},se.prototype.compareMinX=function(I,A){return I.minX-A.minX},se.prototype.compareMinY=function(I,A){return I.minY-A.minY},se.prototype.toJSON=function(){return this.data},se.prototype.fromJSON=function(I){return this.data=I,this},se.prototype._all=function(I,A){for(var z=[];I;)I.leaf?A.push.apply(A,I.children):z.push.apply(z,I.children),I=z.pop();return A},se.prototype._build=function(I,A,z,G){var T,j=z-A+1,K=this._maxEntries;if(j<=K)return it(T=Pe(I.slice(A,z+1)),this.toBBox),T;G||(G=Math.ceil(Math.log(j)/Math.log(K)),K=Math.ceil(j/Math.pow(K,G-1))),(T=Pe([])).leaf=!1,T.height=G;var ee=Math.ceil(j/K),ge=ee*Math.ceil(Math.sqrt(K));lt(I,A,z,ge,this.compareMinX);for(var ce=A;ce<=z;ce+=ge){var ye=Math.min(ce+ge-1,z);lt(I,ce,ye,ee,this.compareMinY);for(var _e=ce;_e<=ye;_e+=ee){var Fe=Math.min(_e+ee-1,ye);T.children.push(this._build(I,_e,Fe,G-1))}}return it(T,this.toBBox),T},se.prototype._chooseSubtree=function(I,A,z,G){for(;G.push(A),!A.leaf&&G.length-1!==z;){for(var T=1/0,j=1/0,K=void 0,ee=0;ee<A.children.length;ee++){var ge=A.children[ee],ce=De(ge),ye=(_e=I,Fe=ge,(Math.max(Fe.maxX,_e.maxX)-Math.min(Fe.minX,_e.minX))*(Math.max(Fe.maxY,_e.maxY)-Math.min(Fe.minY,_e.minY))-ce);ye<j?(j=ye,T=ce<T?ce:T,K=ge):ye===j&&ce<T&&(T=ce,K=ge)}A=K||A.children[0]}var _e,Fe;return A},se.prototype._insert=function(I,A,z){var G=z?I:this.toBBox(I),T=[],j=this._chooseSubtree(G,this.data,A,T);for(j.children.push(I),nt(j,G);A>=0&&T[A].children.length>this._maxEntries;)this._split(T,A),A--;this._adjustParentBBoxes(G,T,A)},se.prototype._split=function(I,A){var z=I[A],G=z.children.length,T=this._minEntries;this._chooseSplitAxis(z,T,G);var j=this._chooseSplitIndex(z,T,G),K=Pe(z.children.splice(j,z.children.length-j));K.height=z.height,K.leaf=z.leaf,it(z,this.toBBox),it(K,this.toBBox),A?I[A-1].children.push(K):this._splitRoot(z,K)},se.prototype._splitRoot=function(I,A){this.data=Pe([I,A]),this.data.height=I.height+1,this.data.leaf=!1,it(this.data,this.toBBox)},se.prototype._chooseSplitIndex=function(I,A,z){for(var G,T,j,K,ee,ge,ce,ye=1/0,_e=1/0,Fe=A;Fe<=z-A;Fe++){var je=ie(I,0,Fe,this.toBBox),He=ie(I,Fe,z,this.toBBox),gt=(T=je,j=He,K=void 0,ee=void 0,ge=void 0,ce=void 0,K=Math.max(T.minX,j.minX),ee=Math.max(T.minY,j.minY),ge=Math.min(T.maxX,j.maxX),ce=Math.min(T.maxY,j.maxY),Math.max(0,ge-K)*Math.max(0,ce-ee)),x=De(je)+De(He);gt<ye?(ye=gt,G=Fe,_e=x<_e?x:_e):gt===ye&&x<_e&&(_e=x,G=Fe)}return G||z-A},se.prototype._chooseSplitAxis=function(I,A,z){var G=I.leaf?this.compareMinX:hi,T=I.leaf?this.compareMinY:ci;this._allDistMargin(I,A,z,G)<this._allDistMargin(I,A,z,T)&&I.children.sort(G)},se.prototype._allDistMargin=function(I,A,z,G){I.children.sort(G);for(var T=this.toBBox,j=ie(I,0,A,T),K=ie(I,z-A,z,T),ee=Be(j)+Be(K),ge=A;ge<z-A;ge++){var ce=I.children[ge];nt(j,I.leaf?T(ce):ce),ee+=Be(j)}for(var ye=z-A-1;ye>=A;ye--){var _e=I.children[ye];nt(K,I.leaf?T(_e):_e),ee+=Be(K)}return ee},se.prototype._adjustParentBBoxes=function(I,A,z){for(var G=z;G>=0;G--)nt(A[G],I)},se.prototype._condense=function(I){for(var A=I.length-1,z=void 0;A>=0;A--)I[A].children.length===0?A>0?(z=I[A-1].children).splice(z.indexOf(I[A]),1):this.clear():it(I[A],this.toBBox)},se})}}]); //# sourceMappingURL=9320.c403e78b78aa6df1d0bd.js.map
Edit
Rename
Chmod
Delete
FILE
FOLDER
INFO
Name
Size
Permission
Action
static
---
0755
0.c88fc16b6533c8976681.js
11857 bytes
0644
0.c88fc16b6533c8976681.js.map
46011 bytes
0644
1118.6d1cbbd2070e00a7483d.js
9459 bytes
0644
1118.6d1cbbd2070e00a7483d.js.map
22012 bytes
0644
1121.6c31bf81768d3312b0d4.js
11557 bytes
0644
1121.6c31bf81768d3312b0d4.js.map
40274 bytes
0644
1122.1b3b5a9bdf4a2fc70a83.js
4310 bytes
0644
1122.1b3b5a9bdf4a2fc70a83.js.map
9301 bytes
0644
1133.cd705902767ed2e9bf55.js
107191 bytes
0644
1133.cd705902767ed2e9bf55.js.map
459177 bytes
0644
1216.ddb58ad09e0c4e3f4079.js
12860 bytes
0644
1216.ddb58ad09e0c4e3f4079.js.map
47906 bytes
0644
1282.2347f27d5b3a18a42a1e.js
2965 bytes
0644
1282.2347f27d5b3a18a42a1e.js.map
6699 bytes
0644
1345.8570fef914aafab94513.js
2223 bytes
0644
1345.8570fef914aafab94513.js.map
5201 bytes
0644
1347.8ad23b870a6e21306189.js
32035 bytes
0644
1347.8ad23b870a6e21306189.js.map
89851 bytes
0644
1420.f2553cafc235b7c32261.js
14576 bytes
0644
1420.f2553cafc235b7c32261.js.map
32839 bytes
0644
1438.897db349b7f48a15b9eb.js
2830 bytes
0644
1438.897db349b7f48a15b9eb.js.map
6911 bytes
0644
1446.babd36e7134aac1046c4.js
1832 bytes
0644
1446.babd36e7134aac1046c4.js.map
3282 bytes
0644
1488.ff35935a06f41b02b6cc.js
316 bytes
0644
1488.ff35935a06f41b02b6cc.js.map
1206 bytes
0644
1560.30962127c91e5eae9982.js
8916 bytes
0644
1560.30962127c91e5eae9982.js.map
20515 bytes
0644
1660.e1f66118fb028d12074f.js
21866 bytes
0644
1660.e1f66118fb028d12074f.js.map
71039 bytes
0644
1698.68ff1ef08e94a87836b3.js
12570 bytes
0644
1698.68ff1ef08e94a87836b3.js.map
46006 bytes
0644
1708.f42a783c0f6c7a317d49.js
2249 bytes
0644
1708.f42a783c0f6c7a317d49.js.map
2954 bytes
0644
1710.d96221051fceaf8c89dd.js
10172 bytes
0644
1710.d96221051fceaf8c89dd.js.map
22097 bytes
0644
1740.e57d920c47a11759ade4.js
6204 bytes
0644
1740.e57d920c47a11759ade4.js.map
13740 bytes
0644
1888.0ede69d3190c536744b9.js
6822 bytes
0644
1888.0ede69d3190c536744b9.js.map
15421 bytes
0644
1914.58113477b565d57e8bfe.js
10710 bytes
0644
1914.58113477b565d57e8bfe.js.map
23555 bytes
0644
198.b84c0e4f5759344ae05a.js
8267 bytes
0644
198.b84c0e4f5759344ae05a.js.map
19446 bytes
0644
205.6c51b5e35c8147226738.js
3542 bytes
0644
205.6c51b5e35c8147226738.js.map
8376 bytes
0644
2058.0e5df44647184aaf02e2.js
1252 bytes
0644
2058.0e5df44647184aaf02e2.js.map
4744 bytes
0644
2077.12b2df3682085a92a810.js
34133 bytes
0644
2077.12b2df3682085a92a810.js.map
122011 bytes
0644
2094.259625d8acf28b9c7361.js
16518 bytes
0644
2094.259625d8acf28b9c7361.js.map
41269 bytes
0644
21.afca69f2d336e287a655.js
6172 bytes
0644
21.afca69f2d336e287a655.js.map
17305 bytes
0644
2136.9c8dcd43d3af327f51f5.js
498667 bytes
0644
2136.9c8dcd43d3af327f51f5.js.map
1908011 bytes
0644
2228.cf629cf4a83c5b6c2671.js
269 bytes
0644
2228.cf629cf4a83c5b6c2671.js.map
457 bytes
0644
2244.9324c28eca7d2ffb7568.js
3396 bytes
0644
2244.9324c28eca7d2ffb7568.js.map
7683 bytes
0644
2261.ac6a26854d5acee00776.js
106373 bytes
0644
2261.ac6a26854d5acee00776.js.map
478562 bytes
0644
2278.bdd73b14b6337c6b14e4.js
5754 bytes
0644
2278.bdd73b14b6337c6b14e4.js.map
13399 bytes
0644
2398.3de0e7aa3057b7dcf9da.js
8016 bytes
0644
2398.3de0e7aa3057b7dcf9da.js.map
18383 bytes
0644
2514.c86950e9813e27962050.js
1983 bytes
0644
2514.c86950e9813e27962050.js.map
4863 bytes
0644
2571.345ecfd2b82551018f2e.js
162139 bytes
0644
2571.345ecfd2b82551018f2e.js.map
2046 bytes
0644
2586.972e9a7d564398afee76.js
6385 bytes
0644
2586.972e9a7d564398afee76.js.map
14676 bytes
0644
2658.f4100815829c4d37d35c.js
5432 bytes
0644
2658.f4100815829c4d37d35c.js.map
13650 bytes
0644
2686.2fbaa7db9c01d59cad8d.js
2815 bytes
0644
2686.2fbaa7db9c01d59cad8d.js.map
6564 bytes
0644
2692.20098ad0182743d98d62.js
2282 bytes
0644
2692.20098ad0182743d98d62.js.map
5680 bytes
0644
2694.a31d749361a36eb167da.js
2726 bytes
0644
2694.a31d749361a36eb167da.js.map
3618 bytes
0644
2745.2e5ec1fdf377d2940fb4.js
33584 bytes
0644
2745.2e5ec1fdf377d2940fb4.js.map
120277 bytes
0644
2962.4c3147d8ee365fe296ef.js
7640 bytes
0644
2962.4c3147d8ee365fe296ef.js.map
17621 bytes
0644
3042.248a4194805a8500fd28.js
19010 bytes
0644
3042.248a4194805a8500fd28.js.map
38148 bytes
0644
3062.4e9a427c2a59d53f902e.js
4663 bytes
0644
3062.4e9a427c2a59d53f902e.js.map
10650 bytes
0644
3082.c09cff56c35d736ee8b6.js
52872 bytes
0644
3082.c09cff56c35d736ee8b6.js.map
56822 bytes
0644
3096.8d41728a4f5010bc56a2.js
4378 bytes
0644
3096.8d41728a4f5010bc56a2.js.map
10739 bytes
0644
3098.f22ad6dab13d06477be0.js
31462 bytes
0644
3098.f22ad6dab13d06477be0.js.map
85588 bytes
0644
3182.1d531f28507c00e391fc.js
13817 bytes
0644
3182.1d531f28507c00e391fc.js.map
26653 bytes
0644
3407.666eb88a718e66b93f72.js
34425 bytes
0644
3407.666eb88a718e66b93f72.js.map
103716 bytes
0644
3418.d31d882b87bd5a2ef66f.js
33061 bytes
0644
3418.d31d882b87bd5a2ef66f.js.map
114234 bytes
0644
3541.8d063e3d43d55745d89b.js
20582 bytes
0644
3541.8d063e3d43d55745d89b.js.map
67154 bytes
0644
3543.eecef49ce94da5ee0418.js
136752 bytes
0644
3543.eecef49ce94da5ee0418.js.map
446118 bytes
0644
3622.976b1aef94b333e450b9.js
1260 bytes
0644
3622.976b1aef94b333e450b9.js.map
2819 bytes
0644
3686.102abfc00452299017bb.js
87 bytes
0644
3718.3993946b7a0eb8f64b4d.js
23620 bytes
0644
3718.3993946b7a0eb8f64b4d.js.map
92024 bytes
0644
3726.3adfe210678d2cd26969.js
31765 bytes
0644
3726.3adfe210678d2cd26969.js.map
118227 bytes
0644
398.4e93ffb675609ea7a9c6.js
2990 bytes
0644
398.4e93ffb675609ea7a9c6.js.map
7145 bytes
0644
4114.953b39a9ce57caa0e87a.js
2536 bytes
0644
4114.953b39a9ce57caa0e87a.js.map
6028 bytes
0644
4120.67bf5d203ed4a2eb5f1b.js
3229 bytes
0644
4120.67bf5d203ed4a2eb5f1b.js.map
7533 bytes
0644
4209.c7060d489834063658f5.js
17352 bytes
0644
4209.c7060d489834063658f5.js.map
30980 bytes
0644
4254.c5f4a5512b252e3a5796.js
71716 bytes
0644
4254.c5f4a5512b252e3a5796.js.map
237783 bytes
0644
4289.d5662b0904798ff437e9.js
16496 bytes
0644
4289.d5662b0904798ff437e9.js.map
32015 bytes
0644
4334.bc078c368a20ed3257b6.js
2598 bytes
0644
4334.bc078c368a20ed3257b6.js.map
6308 bytes
0644
4630.b604ea691184ba563d59.js
5585 bytes
0644
4630.b604ea691184ba563d59.js.map
11866 bytes
0644
4680.358dfdd92851f69ecc97.js
4573 bytes
0644
4680.358dfdd92851f69ecc97.js.map
10841 bytes
0644
4698.696713071ff5d9929a11.js
3682 bytes
0644
4698.696713071ff5d9929a11.js.map
8967 bytes
0644
4787.bd938ea7cb58d64ee246.js
738 bytes
0644
4787.bd938ea7cb58d64ee246.js.map
2168 bytes
0644
4839.17a10e0ceca3eb8954b4.js
39585 bytes
0644
4839.17a10e0ceca3eb8954b4.js.map
145699 bytes
0644
494.8cf705bc1ea509187c88.js
3796 bytes
0644
494.8cf705bc1ea509187c88.js.map
8987 bytes
0644
4958.cd447d877778fc5af081.js
4923 bytes
0644
4958.cd447d877778fc5af081.js.map
11000 bytes
0644
4962.0da526ad79f816a15985.js
2242 bytes
0644
4962.0da526ad79f816a15985.js.map
4978 bytes
0644
50.7b1e44d5b9dbbed566be.js
617497 bytes
0644
50.7b1e44d5b9dbbed566be.js.map
2271464 bytes
0644
5017.003cacead1bba1cba035.js
3567142 bytes
0644
5017.003cacead1bba1cba035.js.map
13214665 bytes
0644
5130.4d31108de97088a3b014.js
2850 bytes
0644
5130.4d31108de97088a3b014.js.map
6536 bytes
0644
5196.064b914693b6a5591a48.js
4035 bytes
0644
5196.064b914693b6a5591a48.js.map
10273 bytes
0644
5240.eceb5f73f807ac22d800.js
704 bytes
0644
5240.eceb5f73f807ac22d800.js.map
2618 bytes
0644
5277.ce6608b6f47246e32767.js
269 bytes
0644
5277.ce6608b6f47246e32767.js.map
457 bytes
0644
5280.4348c762594edebf7d0e.js
16657 bytes
0644
5280.4348c762594edebf7d0e.js.map
89146 bytes
0644
5356.eabc0dc2021a3814a65f.js
10156 bytes
0644
5356.eabc0dc2021a3814a65f.js.map
25249 bytes
0644
5358.7c5e9e1b192582f3082d.js
6173 bytes
0644
5358.7c5e9e1b192582f3082d.js.map
19652 bytes
0644
5364.ac21c32fd45a27bc998a.js
3070 bytes
0644
5364.ac21c32fd45a27bc998a.js.map
7368 bytes
0644
5398.d0c11aa7c1232f4afe44.js
81872 bytes
0644
5398.d0c11aa7c1232f4afe44.js.map
769414 bytes
0644
5428.e85b0800b30feca9d7dc.js
330175 bytes
0644
5428.e85b0800b30feca9d7dc.js.map
530929 bytes
0644
5511.93023985e5c5efe49ae2.js
21275 bytes
0644
5511.93023985e5c5efe49ae2.js.map
93188 bytes
0644
5550.9284e42acc3f2bbdfc9d.js
7039 bytes
0644
5550.9284e42acc3f2bbdfc9d.js.map
16382 bytes
0644
558.701e8b4db7b852c4a10d.js
12211 bytes
0644
558.701e8b4db7b852c4a10d.js.map
24505 bytes
0644
5618.638c32d58d896f3f7261.js
3348 bytes
0644
5618.638c32d58d896f3f7261.js.map
8181 bytes
0644
5648.cb3fd92dbbc06f7d45d2.js
57392 bytes
0644
5648.cb3fd92dbbc06f7d45d2.js.map
60585 bytes
0644
5786.db7abc3b8e4f474a8f7b.js
5325 bytes
0644
5786.db7abc3b8e4f474a8f7b.js.map
11885 bytes
0644
5807.f05d997ece5811bbc849.js
2922915 bytes
0644
5807.f05d997ece5811bbc849.js.map
10524334 bytes
0644
5950.30ec6aaa9dcece6c3b3c.js
4616249 bytes
0644
5950.30ec6aaa9dcece6c3b3c.js.map
19277501 bytes
0644
6018.f4de7ac19ac8f0c774e6.js
5861 bytes
0644
6018.f4de7ac19ac8f0c774e6.js.map
13314 bytes
0644
6029.0549a3fcb50e73c4b256.js
409895 bytes
0644
6029.0549a3fcb50e73c4b256.js.map
998408 bytes
0644
6185.883629fcc773b4968b24.js
2258 bytes
0644
6185.883629fcc773b4968b24.js.map
4788 bytes
0644
6263.e4ef9aaa3073ebacc3a5.js
54594 bytes
0644
6263.e4ef9aaa3073ebacc3a5.js.map
242030 bytes
0644
6302.257b2eb06c25ee74090e.js
8440 bytes
0644
6302.257b2eb06c25ee74090e.js.map
19322 bytes
0644
6359.f824c85233ec703f8cea.js
11411 bytes
0644
6359.f824c85233ec703f8cea.js.map
41881 bytes
0644
6377.45d36c143a694fc45bd3.js
20571 bytes
0644
6377.45d36c143a694fc45bd3.js.map
79590 bytes
0644
6378.27b1e6d863a0a3b85962.js
977993 bytes
0644
6378.27b1e6d863a0a3b85962.js.map
3865587 bytes
0644
6414.192cf271de6ecbbbcb11.js
3984 bytes
0644
6414.192cf271de6ecbbbcb11.js.map
9134 bytes
0644
6446.b4b93ee91aa1bb57ea93.js
7731 bytes
0644
6446.b4b93ee91aa1bb57ea93.js.map
17485 bytes
0644
6464.f379e014f9909e621de6.js
34429 bytes
0644
6464.f379e014f9909e621de6.js.map
113303 bytes
0644
6499.9f52e0855fd4782a8b45.js
78297 bytes
0644
6499.9f52e0855fd4782a8b45.js.map
273155 bytes
0644
6587.bfb1ca0c32c6f325b0df.js
135004 bytes
0644
6587.bfb1ca0c32c6f325b0df.js.map
541974 bytes
0644
660.838743295c2108f3492d.js
43101 bytes
0644
660.838743295c2108f3492d.js.map
100340 bytes
0644
6678.a615dbe07b8a3e591e66.js
14725 bytes
0644
6678.a615dbe07b8a3e591e66.js.map
51145 bytes
0644
680.1a328432fae403eacab3.js
53846 bytes
0644
680.1a328432fae403eacab3.js.map
57615 bytes
0644
6830.0c200fec1efc2be388e2.js
5811 bytes
0644
6830.0c200fec1efc2be388e2.js.map
13972 bytes
0644
6934.fa19d392db34411fb300.js
168944 bytes
0644
6934.fa19d392db34411fb300.js.map
540337 bytes
0644
6940.9c5d3a2dcf9d7d58fa2c.js
3408 bytes
0644
6940.9c5d3a2dcf9d7d58fa2c.js.map
8039 bytes
0644
6969.f8f153735314f9426000.js
1119 bytes
0644
6969.f8f153735314f9426000.js.map
4230 bytes
0644
6990.cc2f5674128929a3f870.js
4418 bytes
0644
6990.cc2f5674128929a3f870.js.map
10503 bytes
0644
7048.117de444b1e1cb5a1360.js
4365 bytes
0644
7048.117de444b1e1cb5a1360.js.map
10316 bytes
0644
7166.480da6892ee84ee8bb53.js
593985 bytes
0644
7166.480da6892ee84ee8bb53.js.map
2430098 bytes
0644
7200.dc60128b9d612fc7b5b0.js
3634 bytes
0644
7200.dc60128b9d612fc7b5b0.js.map
8184 bytes
0644
7246.3adf293a34fa2043387b.js
4306 bytes
0644
7246.3adf293a34fa2043387b.js.map
9084 bytes
0644
7400.024c96bd5b99b8b47a63.js
14112 bytes
0644
7400.024c96bd5b99b8b47a63.js.map
64001 bytes
0644
7409.24316c87d08c1053c46a.js
3287 bytes
0644
7409.24316c87d08c1053c46a.js.map
11649 bytes
0644
7455.845968885abe369e6479.js
19801 bytes
0644
7455.845968885abe369e6479.js.map
77213 bytes
0644
7466.09e6e197d2507f62097d.js
11670 bytes
0644
7466.09e6e197d2507f62097d.js.map
24830 bytes
0644
7515.95323f0dfbd0de010e5c.js
1083 bytes
0644
7515.95323f0dfbd0de010e5c.js.map
1321 bytes
0644
7613.6334cff4df12cc157522.js
808779 bytes
0644
7613.6334cff4df12cc157522.js.map
991378 bytes
0644
7836.6a7e4207e70fc2dc235f.js
7192 bytes
0644
7836.6a7e4207e70fc2dc235f.js.map
17613 bytes
0644
7882.1a3cc418752c83396970.js
3743 bytes
0644
7882.1a3cc418752c83396970.js.map
14950 bytes
0644
7886.485c46f14540aa23cf70.js
8668 bytes
0644
7886.485c46f14540aa23cf70.js.map
20124 bytes
0644
7914.2b1a06c504df18e20fe4.js
2390 bytes
0644
7914.2b1a06c504df18e20fe4.js.map
6418 bytes
0644
7982.6761217193d3060dbf0e.js
188973 bytes
0644
7982.6761217193d3060dbf0e.js.map
1737667 bytes
0644
8054.094788468423bb88ee68.js
38124 bytes
0644
8054.094788468423bb88ee68.js.map
132296 bytes
0644
8107.92bd414247a1d05c014f.js
5144 bytes
0644
8107.92bd414247a1d05c014f.js.map
15320 bytes
0644
8230.2eedae6021a4715c6dea.js
2413 bytes
0644
8230.2eedae6021a4715c6dea.js.map
5812 bytes
0644
8332.f4b05d2f028641445650.js
3177 bytes
0644
8332.f4b05d2f028641445650.js.map
7186 bytes
0644
8334.c95ec0eb6900c0cf7e89.js
7803 bytes
0644
8334.c95ec0eb6900c0cf7e89.js.map
17714 bytes
0644
8390.1fd9505094c8cf8830ab.js
2096 bytes
0644
8390.1fd9505094c8cf8830ab.js.map
5157 bytes
0644
84.a6f8658e6a033d642231.js
30608 bytes
0644
84.a6f8658e6a033d642231.js.map
142543 bytes
0644
8494.4470c87b7093ddf70db7.js
2180 bytes
0644
8494.4470c87b7093ddf70db7.js.map
4863 bytes
0644
8542.1391ab96a455b01963a7.js
1514 bytes
0644
8542.1391ab96a455b01963a7.js.map
3249 bytes
0644
8566.e05562713181c6ca30fe.js
3852 bytes
0644
8566.e05562713181c6ca30fe.js.map
8781 bytes
0644
8730.3dcdd8cbf22c63b45d78.js
2109 bytes
0644
8730.3dcdd8cbf22c63b45d78.js.map
2893 bytes
0644
8786.1b0e43b80c82c73e2096.js
1535 bytes
0644
8786.1b0e43b80c82c73e2096.js.map
4055 bytes
0644
8902.37d0b14aa6ef24687b7b.js
2673 bytes
0644
8902.37d0b14aa6ef24687b7b.js.map
5993 bytes
0644
8990.5a822b8788ebf0bdba81.js
3969 bytes
0644
8990.5a822b8788ebf0bdba81.js.map
9161 bytes
0644
9034.200fc7a09b466256c9a9.js
3486 bytes
0644
9034.200fc7a09b466256c9a9.js.map
8180 bytes
0644
9038.7ae2448b9cc5c423aeca.js
4937 bytes
0644
9038.7ae2448b9cc5c423aeca.js.map
11973 bytes
0644
9118.3121c6b96ec7dc211973.js
48311 bytes
0644
9118.3121c6b96ec7dc211973.js.map
62149 bytes
0644
9150.9eb62d45f9b21cb38850.js
10056 bytes
0644
9150.9eb62d45f9b21cb38850.js.map
21143 bytes
0644
9199.9897e268d6d13e834d4c.js
2307 bytes
0644
9199.9897e268d6d13e834d4c.js.map
8853 bytes
0644
9320.c403e78b78aa6df1d0bd.js
336139 bytes
0644
9320.c403e78b78aa6df1d0bd.js.map
1624993 bytes
0644
9355.421530b20c759bb75633.js
22098 bytes
0644
9355.421530b20c759bb75633.js.map
66961 bytes
0644
9384.a0d5fc49f1b15b3e311e.js
2855 bytes
0644
9384.a0d5fc49f1b15b3e311e.js.map
3717 bytes
0644
9390.fa2af7f3d3d9600c08ee.js
4201 bytes
0644
9390.fa2af7f3d3d9600c08ee.js.map
9682 bytes
0644
946.f2494c0c39a9590349b9.js
9194 bytes
0644
946.f2494c0c39a9590349b9.js.map
22193 bytes
0644
9510.4cfa85a51931dc20573a.js
2949 bytes
0644
9510.4cfa85a51931dc20573a.js.map
6939 bytes
0644
9521.de2a74ca5eb365810ca5.js
46306 bytes
0644
9521.de2a74ca5eb365810ca5.js.map
51040 bytes
0644
9538.996ade7a03ccdb01942d.js
64493 bytes
0644
9538.996ade7a03ccdb01942d.js.map
49212 bytes
0644
9569.a8d60b39654a160cb917.js
27965 bytes
0644
9569.a8d60b39654a160cb917.js.map
99160 bytes
0644
9643.b408884004ca73c102bc.js
627 bytes
0644
9643.b408884004ca73c102bc.js.map
2195 bytes
0644
968.22e079d28acb4131d34c.js
4001 bytes
0644
968.22e079d28acb4131d34c.js.map
9740 bytes
0644
970.a61e37b9b897c8098261.js
5239 bytes
0644
970.a61e37b9b897c8098261.js.map
13858 bytes
0644
9711.d6e977bd60f0e5ba673d.js
13555 bytes
0644
9711.d6e977bd60f0e5ba673d.js.map
43973 bytes
0644
9737.3340c89ea96d33307cc7.js
1001 bytes
0644
9737.3340c89ea96d33307cc7.js.map
3504 bytes
0644
9739.5a801055fcf72bf4d06f.js
1147 bytes
0644
9739.5a801055fcf72bf4d06f.js.map
4390 bytes
0644
9772.49e918c9331237552c0b.js
141 bytes
0644
9772.49e918c9331237552c0b.js.map
416 bytes
0644
9838.b8f01dc360f0c2151291.js
4003 bytes
0644
9838.b8f01dc360f0c2151291.js.map
8118 bytes
0644
AdminAuthentication.b7044adf53b669e61a87.js
22504 bytes
0644
AdminAuthentication.b7044adf53b669e61a87.js.map
67352 bytes
0644
AdminEditOrgPage.96fb6c37346641f44246.js
6369 bytes
0644
AdminEditOrgPage.96fb6c37346641f44246.js.map
20602 bytes
0644
AdminFeatureTogglesPage.22157fe31f358f1c4f09.js
4939 bytes
0644
AdminFeatureTogglesPage.22157fe31f358f1c4f09.js.map
16531 bytes
0644
AdminListOrgsPage.f01c8496fd635e20124b.js
2702 bytes
0644
AdminListOrgsPage.f01c8496fd635e20124b.js.map
7735 bytes
0644
AdminSettings.845c6def917892a0c1f9.js
1903 bytes
0644
AdminSettings.845c6def917892a0c1f9.js.map
5580 bytes
0644
AlertAmRoutes.10a0d9a23a082caf12c8.js
54554 bytes
0644
AlertAmRoutes.10a0d9a23a082caf12c8.js.map
208792 bytes
0644
AlertGroups.efd523dc41621f9f7935.js
10088 bytes
0644
AlertGroups.efd523dc41621f9f7935.js.map
39108 bytes
0644
AlertRuleListIndex.f0b17a6119cc5ea575ed.js
44623 bytes
0644
AlertRuleListIndex.f0b17a6119cc5ea575ed.js.map
156842 bytes
0644
AlertRuleListLegacy.8e675db4469232c87308.js
6270 bytes
0644
AlertRuleListLegacy.8e675db4469232c87308.js.map
18086 bytes
0644
AlertSilences.4ff252ad4c0057124d5d.js
24687 bytes
0644
AlertSilences.4ff252ad4c0057124d5d.js.map
83377 bytes
0644
AlertTabCtrl.d3377d127a336a69beb5.js
9844 bytes
0644
AlertTabCtrl.d3377d127a336a69beb5.js.map
27934 bytes
0644
AlertingAdmin.e62f9c73a69abe6a1ac0.js
10523 bytes
0644
AlertingAdmin.e62f9c73a69abe6a1ac0.js.map
37393 bytes
0644
AlertingFeatureTogglePage.f971bb7b2ad4ceb0acbd.js
672 bytes
0644
AlertingFeatureTogglePage.f971bb7b2ad4ceb0acbd.js.map
1220 bytes
0644
AlertingHome.0d6be993ef4a3df37345.js
33492 bytes
0644
AlertingHome.0d6be993ef4a3df37345.js.map
106868 bytes
0644
AlertingRedirectToRule.37a0040f89e20b99b751.js
3648 bytes
0644
AlertingRedirectToRule.37a0040f89e20b99b751.js.map
10875 bytes
0644
AlertingRuleForm.66bb5b2724b31ae6a5a4.js
79931 bytes
0644
AlertingRuleForm.66bb5b2724b31ae6a5a4.js.map
292923 bytes
0644
AlertingUpgrade.c757b99e306db50cdb16.js
31333 bytes
0644
AlertingUpgrade.c757b99e306db50cdb16.js.map
98330 bytes
0644
AngularApp.7e72879caebef22a5217.js
72809 bytes
0644
AngularApp.7e72879caebef22a5217.js.map
102853 bytes
0644
ApiKeysPage.12b0cd511f7b1e9c50dc.js
8422 bytes
0644
ApiKeysPage.12b0cd511f7b1e9c50dc.js.map
23375 bytes
0644
BenchmarksPage.3a183df3d44714f9a96a.js
2941 bytes
0644
BenchmarksPage.3a183df3d44714f9a96a.js.map
9749 bytes
0644
ChangePasswordPage.5e0562f6a9674bd95cfe.js
470 bytes
0644
ChangePasswordPage.5e0562f6a9674bd95cfe.js.map
1195 bytes
0644
Connections.b53c715b9b9a782d8647.js
32448 bytes
0644
Connections.b53c715b9b9a782d8647.js.map
112998 bytes
0644
CorrelationsFeatureToggle.71addced22f59948b708.js
674 bytes
0644
CorrelationsFeatureToggle.71addced22f59948b708.js.map
1149 bytes
0644
CorrelationsPage.4e02feddf752bdf7cfe6.js
22725 bytes
0644
CorrelationsPage.4e02feddf752bdf7cfe6.js.map
69262 bytes
0644
CreateTeam.dbde5b87278cf087cc5e.js
3046 bytes
0644
CreateTeam.dbde5b87278cf087cc5e.js.map
9594 bytes
0644
DashboardImport.06e6c4c03113061aae6c.js
18153 bytes
0644
DashboardImport.06e6c4c03113061aae6c.js.map
58242 bytes
0644
DashboardListPage.dac1fe75fbaa4f9b1c23.js
30967 bytes
0644
DashboardListPage.dac1fe75fbaa4f9b1c23.js.map
108517 bytes
0644
DashboardPage.5e50193556ad6b828f5d.js
2786 bytes
0644
DashboardPage.5e50193556ad6b828f5d.js.map
8754 bytes
0644
DashboardPageProxy.9a6d60e5cac89c11c71c.js
65136 bytes
0644
DashboardPageProxy.9a6d60e5cac89c11c71c.js.map
226791 bytes
0644
DataTrailsPage.aa19ca6750eb3f91ac5d.js
331 bytes
0644
DataTrailsPage.aa19ca6750eb3f91ac5d.js.map
582 bytes
0644
EditNotificationChannelLegacy.75122e6dbfb215d89d81.js
10507 bytes
0644
EditNotificationChannelLegacy.75122e6dbfb215d89d81.js.map
37444 bytes
0644
EmbeddedDashboard.3856404d3d608c739864.js
1768 bytes
0644
EmbeddedDashboard.3856404d3d608c739864.js.map
5917 bytes
0644
FolderAlerting.a0fe69e3574320c8a74a.js
9633 bytes
0644
FolderAlerting.a0fe69e3574320c8a74a.js.map
29985 bytes
0644
FolderLibraryPanelsPage.95dd7bf6735e202a79d2.js
8599 bytes
0644
FolderLibraryPanelsPage.95dd7bf6735e202a79d2.js.map
25919 bytes
0644
LibraryPanelsPage.4a952d4aa9c21984995a.js
2704 bytes
0644
LibraryPanelsPage.4a952d4aa9c21984995a.js.map
7623 bytes
0644
ListPublicDashboardPage.469a693c4011a5193fcd.js
4713 bytes
0644
ListPublicDashboardPage.469a693c4011a5193fcd.js.map
14309 bytes
0644
MuteTimings.cb66b37f52c9ee3ce1da.js
20855 bytes
0644
MuteTimings.cb66b37f52c9ee3ce1da.js.map
58932 bytes
0644
NewNotificationChannelLegacy.1d57814bc534bb1a3681.js
9785 bytes
0644
NewNotificationChannelLegacy.1d57814bc534bb1a3681.js.map
32951 bytes
0644
NewOrgPage.2bb0e1cab09f0cbd0310.js
1325 bytes
0644
NewOrgPage.2bb0e1cab09f0cbd0310.js.map
3158 bytes
0644
NotificationsListLegacyPage.33212668898a6db361a8.js
2547 bytes
0644
NotificationsListLegacyPage.33212668898a6db361a8.js.map
6671 bytes
0644
NotificationsListPage.1eb9cb05bf88eee08291.js
1620 bytes
0644
NotificationsListPage.1eb9cb05bf88eee08291.js.map
3378 bytes
0644
NotificationsPage.d26b90d7348139106351.js
4646 bytes
0644
NotificationsPage.d26b90d7348139106351.js.map
25381 bytes
0644
OrgDetailsPage.2d5c98f188683c2e1d3b.js
6742 bytes
0644
OrgDetailsPage.2d5c98f188683c2e1d3b.js.map
17850 bytes
0644
PlaylistEditPage.d14b3673a1bb03ca0dbb.js
6892 bytes
0644
PlaylistEditPage.d14b3673a1bb03ca0dbb.js.map
19989 bytes
0644
PlaylistNewPage.13696f39b95b8416ede2.js
6583 bytes
0644
PlaylistNewPage.13696f39b95b8416ede2.js.map
19084 bytes
0644
PlaylistPage.8f45dcc09add615f90e8.js
7895 bytes
0644
PlaylistPage.8f45dcc09add615f90e8.js.map
25502 bytes
0644
PlaylistStartPage.8be462b13a24cddee188.js
275 bytes
0644
PlaylistStartPage.8be462b13a24cddee188.js.map
698 bytes
0644
PluginListPage.815b65d32380d0a800f7.js
12167 bytes
0644
PluginListPage.815b65d32380d0a800f7.js.map
43537 bytes
0644
PluginPage.c790de5e17a0b728dd3a.js
314 bytes
0644
PluginPage.c790de5e17a0b728dd3a.js.map
668 bytes
0644
ProfileFeatureTogglePage.a14257ebc5da1e8c85e0.js
552 bytes
0644
ProfileFeatureTogglePage.a14257ebc5da1e8c85e0.js.map
1012 bytes
0644
PublicDashboardPage.51c7c24941781e091898.js
4295 bytes
0644
PublicDashboardPage.51c7c24941781e091898.js.map
14393 bytes
0644
SelectOrgPage.695c19a5101a3a03ee28.js
1124 bytes
0644
SelectOrgPage.695c19a5101a3a03ee28.js.map
2993 bytes
0644
SendResetMailPage.f16b7172a87070f57227.js
1736 bytes
0644
SendResetMailPage.f16b7172a87070f57227.js.map
4350 bytes
0644
ServerStats.3fbd2493deb8f4598755.js
3863 bytes
0644
ServerStats.3fbd2493deb8f4598755.js.map
11534 bytes
0644
ServiceAccountCreatePage.4f989fb6cd2a41193ff0.js
2440 bytes
0644
ServiceAccountCreatePage.4f989fb6cd2a41193ff0.js.map
7939 bytes
0644
ServiceAccountPage.bc7c35b63b03ccc89628.js
14806 bytes
0644
ServiceAccountPage.bc7c35b63b03ccc89628.js.map
51593 bytes
0644
ServiceAccountsPage.baaa08c045390c05e276.js
14565 bytes
0644
ServiceAccountsPage.baaa08c045390c05e276.js.map
46399 bytes
0644
SignupInvited.81ad56aceb8dd1839e15.js
2360 bytes
0644
SignupInvited.81ad56aceb8dd1839e15.js.map
6096 bytes
0644
SnapshotListPage.519c760ed66124a771ff.js
3061 bytes
0644
SnapshotListPage.519c760ed66124a771ff.js.map
9043 bytes
0644
SoloPanelPage.c729750a88c3fa90d1cc.js
3229 bytes
0644
SoloPanelPage.c729750a88c3fa90d1cc.js.map
12316 bytes
0644
SoloPanelPageOld.6518c21ccaf29701fa97.js
1727 bytes
0644
SoloPanelPageOld.6518c21ccaf29701fa97.js.map
5509 bytes
0644
StoragePage.9b93a99e75f7f2842c11.js
14081 bytes
0644
StoragePage.9b93a99e75f7f2842c11.js.map
48740 bytes
0644
SupportBundles.567d512b3f919b8112e4.js
3058 bytes
0644
SupportBundles.567d512b3f919b8112e4.js.map
8751 bytes
0644
SupportBundlesCreate.fc6b6e4cf6366f751081.js
2779 bytes
0644
SupportBundlesCreate.fc6b6e4cf6366f751081.js.map
8882 bytes
0644
TeamList.2e23d37c91734f608f09.js
9019 bytes
0644
TeamList.2e23d37c91734f608f09.js.map
30348 bytes
0644
TeamPages.4f6177b4c6ec769c72d8.js
22839 bytes
0644
TeamPages.4f6177b4c6ec769c72d8.js.map
66001 bytes
0644
TestStuffPage.8ddabdd17d265b771b17.js
2654 bytes
0644
TestStuffPage.8ddabdd17d265b771b17.js.map
8058 bytes
0644
UserCreatePage.72e86cf2c9a3ce50cff3.js
1470 bytes
0644
UserCreatePage.72e86cf2c9a3ce50cff3.js.map
3788 bytes
0644
UserInvitePage.c8243c9cee4b06e10222.js
2576 bytes
0644
UserInvitePage.c8243c9cee4b06e10222.js.map
6594 bytes
0644
UserListPage.acbb5778a782ca90c7ba.js
25463 bytes
0644
UserListPage.acbb5778a782ca90c7ba.js.map
79671 bytes
0644
UserProfileEditPage.7cc4c218d9e4664250e3.js
14593 bytes
0644
UserProfileEditPage.7cc4c218d9e4664250e3.js.map
42901 bytes
0644
UsersListPage.1b61c82d62ca416b6f2f.js
8800 bytes
0644
UsersListPage.1b61c82d62ca416b6f2f.js.map
30059 bytes
0644
alert-rules-drawer-content.1fd9de3b496d077a5f3a.js
957 bytes
0644
alert-rules-drawer-content.1fd9de3b496d077a5f3a.js.map
3199 bytes
0644
alert-rules-toolbar-button.6f275f0d03748b6c297d.js
1429 bytes
0644
alert-rules-toolbar-button.6f275f0d03748b6c297d.js.map
4041 bytes
0644
alertmanagerPlugin.d13ca72afb3f996bb284.js
3810 bytes
0644
alertmanagerPlugin.d13ca72afb3f996bb284.js.map
10753 bytes
0644
app.b11fde05d43f9632a473.js
920821 bytes
0644
app.b11fde05d43f9632a473.js.map
69088 bytes
0644
assets-manifest.json
280835 bytes
0644
azureMonitorPlugin.0bc37a9d4e3bd8421cc0.js
232 bytes
0644
azureMonitorPlugin.0bc37a9d4e3bd8421cc0.js.map
600 bytes
0644
brace.fcd4b1c7e8b9264ab02c.js
371235 bytes
0644
brace.fcd4b1c7e8b9264ab02c.js.map
1132097 bytes
0644
canvasPanel.a46aa5e57d26b1fcc380.js
485254 bytes
0644
canvasPanel.a46aa5e57d26b1fcc380.js.map
2136916 bytes
0644
cloudMonitoringPlugin.c6ea431eae8e9ad2c7b1.js
198 bytes
0644
cloudMonitoringPlugin.c6ea431eae8e9ad2c7b1.js.map
555 bytes
0644
cloudwatchPlugin.06ef34f60000c4f7ea37.js
192 bytes
0644
cloudwatchPlugin.06ef34f60000c4f7ea37.js.map
544 bytes
0644
dark.7fa24d1908c1c96e6fcc.js
134 bytes
0644
elasticsearchPlugin.3f2edb012f5162b48903.js
214 bytes
0644
elasticsearchPlugin.3f2edb012f5162b48903.js.map
583 bytes
0644
explore-feature-toggle-page.897d9f08c342ad4c0702.js
612 bytes
0644
explore-feature-toggle-page.897d9f08c342ad4c0702.js.map
1280 bytes
0644
explore.476912733278e2a99729.js
165810 bytes
0644
explore.476912733278e2a99729.js.map
579148 bytes
0644
geomapPanel.14b9605971a38c51d262.js
417078 bytes
0644
geomapPanel.14b9605971a38c51d262.js.map
540371 bytes
0644
grafana.dark.8c716fbcf630eae84ced.css
209089 bytes
0644
grafana.light.b8b3904788f25480f4a1.css
209047 bytes
0644
grafanaPlugin.1cb208185a89de28dc3a.js
8654 bytes
0644
grafanaPlugin.1cb208185a89de28dc3a.js.map
28174 bytes
0644
graphPlugin.f47f722cdfc0ceb85136.js
70277 bytes
0644
graphPlugin.f47f722cdfc0ceb85136.js.map
243430 bytes
0644
graphitePlugin.d59175976346917781fe.js
75305 bytes
0644
graphitePlugin.d59175976346917781fe.js.map
272016 bytes
0644
heatmapPanel.f6f29a53ed0f682b4404.js
37545 bytes
0644
heatmapPanel.f6f29a53ed0f682b4404.js.map
158066 bytes
0644
influxdbPlugin.140a7777089f9559c11c.js
68843 bytes
0644
influxdbPlugin.140a7777089f9559c11c.js.map
265085 bytes
0644
jaegerPlugin.d254fd4a19ef0cb5b4f5.js
19727 bytes
0644
jaegerPlugin.d254fd4a19ef0cb5b4f5.js.map
65603 bytes
0644
light.af65e5ce03b9ed0aa2b1.js
134 bytes
0644
loki-query-field.a588d587d9d762b18f22.js
191 bytes
0644
loki-query-field.a588d587d9d762b18f22.js.map
548 bytes
0644
lokiPlugin.77364509de280321b6f8.js
185 bytes
0644
lokiPlugin.77364509de280321b6f8.js.map
536 bytes
0644
mixedPlugin.f36bd557a883d9a67538.js
180 bytes
0644
mssqlPlugin.88775f59ced74c2283c5.js
20457 bytes
0644
mssqlPlugin.88775f59ced74c2283c5.js.map
61420 bytes
0644
mysqlPlugin.72fb44411afd8165d201.js
17323 bytes
0644
mysqlPlugin.72fb44411afd8165d201.js.map
45415 bytes
0644
nodeGraphPanel.9a7cdd8efdae281cbe28.js
2107 bytes
0644
nodeGraphPanel.9a7cdd8efdae281cbe28.js.map
7132 bytes
0644
opentsdbPlugin.418b8c8ea0d97ed99edb.js
22866 bytes
0644
opentsdbPlugin.418b8c8ea0d97ed99edb.js.map
82180 bytes
0644
parcaPlugin.7f2e6dde7161b08ceed2.js
11184 bytes
0644
parcaPlugin.7f2e6dde7161b08ceed2.js.map
42340 bytes
0644
postgresPlugin.f88c598bae2653ae177b.js
18902 bytes
0644
postgresPlugin.f88c598bae2653ae177b.js.map
54304 bytes
0644
prom-query-field.ff217c474ea457bdd65e.js
14104 bytes
0644
prom-query-field.ff217c474ea457bdd65e.js.map
76811 bytes
0644
prometheusPlugin.2ba02c28d3f7293e903e.js
224 bytes
0644
prometheusPlugin.2ba02c28d3f7293e903e.js.map
699 bytes
0644
pyroscopePlugin.eb14b78419d619d90dca.js
22269 bytes
0644
pyroscopePlugin.eb14b78419d619d90dca.js.map
86896 bytes
0644
react-monaco-editor.988b1aa5e90b11f9941a.js
15759 bytes
0644
react-monaco-editor.988b1aa5e90b11f9941a.js.map
51544 bytes
0644
runtime.4b7e1b5735d2ed64b824.js
13640 bytes
0644
runtime.4b7e1b5735d2ed64b824.js.map
35122 bytes
0644
tableOldPlugin.8c72b8399d197aeebe16.js
25242 bytes
0644
tableOldPlugin.8c72b8399d197aeebe16.js.map
80497 bytes
0644
tempoPlugin.efa8c2a55984263b4b61.js
182 bytes
0644
tempoPlugin.efa8c2a55984263b4b61.js.map
529 bytes
0644
testDataDSPlugin.9717509b124d754e4f35.js
120550 bytes
0644
testDataDSPlugin.9717509b124d754e4f35.js.map
303302 bytes
0644
visjs-network.d93b3aa71ac24c8cde84.js
459653 bytes
0644
visjs-network.d93b3aa71ac24c8cde84.js.map
1951742 bytes
0644
zipkinPlugin.70f0f24b6d0b6e673ccb.js
13172 bytes
0644
zipkinPlugin.70f0f24b6d0b6e673ccb.js.map
46861 bytes
0644
N4ST4R_ID | Naxtarrr