(self.webpackChunkgrafana=self.webpackChunkgrafana||[]).push([[4195],{"./public/app/core/components/Layers/AddLayerButton.tsx":(t,e,i)=>{"use strict";i.d(e,{f:()=>r});i("../../opt/drone/yarncache/react-npm-17.0.2-99ba37d931-b254cc17ce.zip/node_modules/react/index.js");var n=i("./packages/grafana-ui/src/index.ts"),o=i("../../opt/drone/yarncache/react-npm-17.0.2-99ba37d931-b254cc17ce.zip/node_modules/react/jsx-runtime.js");const r=t=>{let{onChange:e,options:i,label:r}=t;return(0,o.jsx)(n.ValuePicker,{icon:"plus",label:r,variant:"secondary",options:i,onChange:e,isFullWidth:!0})}},"./public/app/core/components/Layers/LayerDragDropList.tsx":(t,e,i)=>{"use strict";i.d(e,{E:()=>h});var n=i("../../opt/drone/yarncache/react-npm-17.0.2-99ba37d931-b254cc17ce.zip/node_modules/react/index.js"),o=i("./.yarn/__virtual__/react-beautiful-dnd-virtual-27e4b658e7/3/opt/drone/yarncache/react-beautiful-dnd-npm-13.1.0-fcf5568b1c-12b7e9fbe8.zip/node_modules/react-beautiful-dnd/dist/react-beautiful-dnd.esm.js"),r=i("./.yarn/__virtual__/@emotion-css-virtual-72c314ddb1/3/opt/drone/yarncache/@emotion-css-npm-11.7.1-25ff8755a7-ac1f56656f.zip/node_modules/@emotion/css/dist/emotion-css.esm.js"),a=i("./packages/grafana-ui/src/index.ts"),s=i("./packages/grafana-runtime/src/index.ts"),l=i("../../opt/drone/yarncache/react-npm-17.0.2-99ba37d931-b254cc17ce.zip/node_modules/react/jsx-runtime.js");const c=t=>{let{name:e,onChange:i,verifyLayerNameUniqueness:o}=t;const r=(0,a.useStyles)(u),[s,c]=(0,n.useState)(!1),[h,p]=(0,n.useState)(null),d=t=>{c(!1),h?p(null):e!==t&&i(t)};return(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)("div",{className:r.wrapper,children:[!s&&(0,l.jsxs)("button",{className:r.layerNameWrapper,title:"Edit layer name",onClick:t=>{c(!0)},"data-testid":"layer-name-div",children:[(0,l.jsx)("span",{className:r.layerName,children:e}),(0,l.jsx)(a.Icon,{name:"pen",className:r.layerEditIcon,size:"sm"})]}),s&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(a.Input,{type:"text",defaultValue:e,onBlur:t=>{d(t.currentTarget.value.trim())},autoFocus:!0,onKeyDown:t=>{"Enter"===t.key&&d(t.target.value)},onFocus:t=>{t.target.select()},invalid:null!==h,onChange:t=>{const i=t.currentTarget.value.trim();0!==i.length?!o||o(i)||i===e?h&&p(null):p("Layer name already exists"):p("An empty layer name is not allowed")},className:r.layerNameInput,"data-testid":"layer-name-input"}),h&&(0,l.jsx)(a.FieldValidationMessage,{horizontal:!0,children:h})]})]})})},u=t=>({wrapper:r.css`
      label: Wrapper;
      display: flex;
      align-items: center;
      margin-left: ${t.spacing.xs};
    `,layerNameWrapper:r.css`
      display: flex;
      cursor: pointer;
      border: 1px solid transparent;
      border-radius: ${t.border.radius.md};
      align-items: center;
      padding: 0 0 0 ${t.spacing.xs};
      margin: 0;
      background: transparent;

      &:hover {
        background: ${t.colors.bg3};
        border: 1px dashed ${t.colors.border3};
      }

      &:focus {
        border: 2px solid ${t.colors.formInputBorderActive};
      }

      &:hover,
      &:focus {
        .query-name-edit-icon {
          visibility: visible;
        }
      }
    `,layerName:r.css`
      font-weight: ${t.typography.weight.semibold};
      color: ${t.colors.textBlue};
      cursor: pointer;
      overflow: hidden;
      margin-left: ${t.spacing.xs};
    `,layerEditIcon:(0,r.cx)(r.css`
        margin-left: ${t.spacing.md};
        visibility: hidden;
      `,"query-name-edit-icon"),layerNameInput:r.css`
      max-width: 300px;
      margin: -4px 0;
    `}),h=t=>{let{layers:e,getLayerInfo:i,onDragEnd:n,onSelect:u,onDelete:h,onDuplicate:d,isGroup:f,selection:g,excludeBaseLayer:_,onNameChange:y,verifyLayerNameUniqueness:v}=t;const m=p(s.config.theme),x=t=>t?`${m.row} ${m.sel}`:m.row;return(0,l.jsx)(o.Z5,{onDragEnd:n,children:(0,l.jsx)(o.bK,{droppableId:"droppable",children:(t,n)=>(0,l.jsxs)("div",Object.assign({},t.droppableProps,{ref:t.innerRef,children:[(()=>{const t=[],n=_?1:0,s=_?2:1;for(let p=e.length-1;p>=n;p--){const n=e[p],_=n.getName(),b=Boolean(null==g?void 0:g.includes(_));t.push((0,l.jsx)(o._l,{draggableId:_,index:t.length,children:(t,o)=>(0,l.jsxs)("div",Object.assign({className:x(b),ref:t.innerRef},t.draggableProps,t.dragHandleProps,{onMouseDown:()=>u(n),children:[(0,l.jsx)(c,{name:_,onChange:t=>y(n,t),verifyLayerNameUniqueness:null!=v?v:void 0}),(0,l.jsxs)("div",{className:m.textWrapper,children:["  ",i(n)]}),!f(n)&&(0,l.jsxs)(l.Fragment,{children:[d?(0,l.jsx)(a.IconButton,{name:"copy",title:"Duplicate",className:m.actionIcon,onClick:()=>d(n),surface:"header"}):null,(0,l.jsx)(a.IconButton,{name:"trash-alt",title:"remove",className:(0,r.cx)(m.actionIcon,m.dragIcon),onClick:()=>h(n),surface:"header"}),e.length>s&&(0,l.jsx)(a.Icon,{title:"Drag and drop to reorder",name:"draggabledots",size:"lg",className:m.dragIcon})]})]}))},_))}return t})(),t.placeholder]}))})})};h.defaultProps={isGroup:()=>!1};const p=(0,a.stylesFactory)((t=>({wrapper:r.css`
    margin-bottom: ${t.spacing.md};
  `,row:r.css`
    padding: ${t.spacing.xs} ${t.spacing.sm};
    border-radius: ${t.border.radius.sm};
    background: ${t.colors.bg2};
    min-height: ${t.spacing.formInputHeight}px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 3px;
    cursor: pointer;

    border: 1px solid ${t.colors.formInputBorder};
    &:hover {
      border: 1px solid ${t.colors.formInputBorderHover};
    }
  `,sel:r.css`
    border: 1px solid ${t.colors.formInputBorderActive};
    &:hover {
      border: 1px solid ${t.colors.formInputBorderActive};
    }
  `,dragIcon:r.css`
    cursor: drag;
  `,actionIcon:r.css`
    color: ${t.colors.textWeak};
    &:hover {
      color: ${t.colors.text};
    }
  `,typeWrapper:r.css`
    color: ${t.colors.textBlue};
    margin-right: 5px;
  `,textWrapper:r.css`
    display: flex;
    align-items: center;
    flex-grow: 1;
    overflow: hidden;
    margin-right: ${t.spacing.sm};
  `})))},"./public/app/plugins/panel/geomap/module.tsx":(t,e,i)=>{"use strict";i.r(e),i.d(e,{plugin:()=>wu});var n=i("../../opt/drone/yarncache/react-npm-17.0.2-99ba37d931-b254cc17ce.zip/node_modules/react/index.js"),o=i("./packages/grafana-data/src/index.ts"),r=i("../../opt/drone/yarncache/ol-npm-6.12.0-aa56e5c786-a0eb5766bd.zip/node_modules/ol/events/EventType.js"),a=i("../../opt/drone/yarncache/ol-npm-6.12.0-aa56e5c786-a0eb5766bd.zip/node_modules/ol/events/Target.js");const s=0,l=1,c=2,u=3,h=4;var p=i("../../opt/drone/yarncache/ol-npm-6.12.0-aa56e5c786-a0eb5766bd.zip/node_modules/ol/util.js");function d(t){return Math.pow(t,3)}function f(t){return 1-d(1-t)}function g(t){return 3*t*t-2*t*t*t}function _(t){return t}var y,v=(y=function(t,e){return y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},y(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}y(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),m=function(t){function e(e,i,n){var o=t.call(this)||this,r=n||{};return o.tileCoord=e,o.state=i,o.interimTile=null,o.key="",o.transition_=void 0===r.transition?250:r.transition,o.transitionStarts_={},o.interpolate=!!r.interpolate,o}return v(e,t),e.prototype.changed=function(){this.dispatchEvent(r.Z.CHANGE)},e.prototype.release=function(){},e.prototype.getKey=function(){return this.key+"/"+this.tileCoord},e.prototype.getInterimTile=function(){if(!this.interimTile)return this;var t=this.interimTile;do{if(t.getState()==c)return this.transition_=0,t;t=t.interimTile}while(t);return this},e.prototype.refreshInterimChain=function(){if(this.interimTile){var t=this.interimTile,e=this;do{if(t.getState()==c){t.interimTile=null;break}t.getState()==l?e=t:t.getState()==s?e.interimTile=t.interimTile:e=t,t=e.interimTile}while(t)}},e.prototype.getTileCoord=function(){return this.tileCoord},e.prototype.getState=function(){return this.state},e.prototype.setState=function(t){if(this.state!==u&&this.state>t)throw new Error("Tile load sequence violation");this.state=t,this.changed()},e.prototype.load=function(){(0,p.O3)()},e.prototype.getAlpha=function(t,e){if(!this.transition_)return 1;var i=this.transitionStarts_[t];if(i){if(-1===i)return 1}else i=e,this.transitionStarts_[t]=i;var n=e-i+1e3/60;return n>=this.transition_?1:d(n/this.transition_)},e.prototype.inTransition=function(t){return!!this.transition_&&-1!==this.transitionStarts_[t]},e.prototype.endTransition=function(t){this.transition_&&(this.transitionStarts_[t]=-1)},e}(a.Z);const x=m;var b=i("../../opt/drone/yarncache/ol-npm-6.12.0-aa56e5c786-a0eb5766bd.zip/node_modules/ol/has.js");function w(t,e,i,n){var o;return o=i&&i.length?i.shift():b.Id?new OffscreenCanvas(t||300,e||300):document.createElement("canvas"),t&&(o.width=t),e&&(o.height=e),o.getContext("2d",n)}function C(t,e){var i=e.parentNode;i&&i.replaceChild(t,e)}function S(t){return t&&t.parentNode?t.parentNode.removeChild(t):null}var E=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();const T=function(t){function e(e,i,n,o){var r=t.call(this)||this;return r.extent=e,r.pixelRatio_=n,r.resolution=i,r.state=o,r}return E(e,t),e.prototype.changed=function(){this.dispatchEvent(r.Z.CHANGE)},e.prototype.getExtent=function(){return this.extent},e.prototype.getImage=function(){return(0,p.O3)()},e.prototype.getPixelRatio=function(){return this.pixelRatio_},e.prototype.getResolution=function(){return this.resolution},e.prototype.getState=function(){return this.state},e.prototype.load=function(){(0,p.O3)()},e}(a.Z),R=0,O=1,I=2,L=3;var P=i("../../opt/drone/yarncache/ol-npm-6.12.0-aa56e5c786-a0eb5766bd.zip/node_modules/ol/extent.js"),F=i("../../opt/drone/yarncache/ol-npm-6.12.0-aa56e5c786-a0eb5766bd.zip/node_modules/ol/events.js"),A=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();!function(t){function e(e,i,n,o,r,a){var s=t.call(this,e,i,n,R)||this;return s.src_=o,s.image_=new Image,null!==r&&(s.image_.crossOrigin=r),s.unlisten_=null,s.state=R,s.imageLoadFunction_=a,s}A(e,t),e.prototype.getImage=function(){return this.image_},e.prototype.handleImageError_=function(){this.state=L,this.unlistenImage_(),this.changed()},e.prototype.handleImageLoad_=function(){void 0===this.resolution&&(this.resolution=(0,P.Cr)(this.extent)/this.image_.height),this.state=I,this.unlistenImage_(),this.changed()},e.prototype.load=function(){this.state!=R&&this.state!=L||(this.state=O,this.changed(),this.imageLoadFunction_(this,this.src_),this.unlisten_=j(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))},e.prototype.setImage=function(t){this.image_=t,this.resolution=(0,P.Cr)(this.extent)/this.image_.height},e.prototype.unlistenImage_=function(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)}}(T);function j(t,e,i){var n=t,o=!0,a=!1,s=!1,l=[(0,F.Vx)(n,r.Z.LOAD,(function(){s=!0,a||e()}))];return n.src&&b.Tp?(a=!0,n.decode().then((function(){o&&e()})).catch((function(t){o&&(s?e():i())}))):l.push((0,F.Vx)(n,r.Z.ERROR,i)),function(){o=!1,l.forEach(F.bN)}}var M=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),k=function(t){function e(e,i,n,o,r,a){var s=t.call(this,e,i,a)||this;return s.crossOrigin_=o,s.src_=n,s.key=n,s.image_=new Image,null!==o&&(s.image_.crossOrigin=o),s.unlisten_=null,s.tileLoadFunction_=r,s}return M(e,t),e.prototype.getImage=function(){return this.image_},e.prototype.setImage=function(t){this.image_=t,this.state=c,this.unlistenImage_(),this.changed()},e.prototype.handleImageError_=function(){var t;this.state=u,this.unlistenImage_(),this.image_=((t=w(1,1)).fillStyle="rgba(0,0,0,0)",t.fillRect(0,0,1,1),t.canvas),this.changed()},e.prototype.handleImageLoad_=function(){var t=this.image_;t.naturalWidth&&t.naturalHeight?this.state=c:this.state=h,this.unlistenImage_(),this.changed()},e.prototype.load=function(){this.state==u&&(this.state=s,this.image_=new Image,null!==this.crossOrigin_&&(this.image_.crossOrigin=this.crossOrigin_)),this.state==s&&(this.state=l,this.changed(),this.tileLoadFunction_(this,this.src_),this.unlisten_=j(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))},e.prototype.unlistenImage_=function(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)},e}(x);const D=k;var z=i("../../opt/drone/yarncache/ol-npm-6.12.0-aa56e5c786-a0eb5766bd.zip/node_modules/ol/proj.js"),N=i("../../opt/drone/yarncache/ol-npm-6.12.0-aa56e5c786-a0eb5766bd.zip/node_modules/ol/math.js"),B=function(){function t(t,e,i,n,o,r){this.sourceProj_=t,this.targetProj_=e;var a={},s=(0,z.Ck)(this.targetProj_,this.sourceProj_);this.transformInv_=function(t){var e=t[0]+"/"+t[1];return a[e]||(a[e]=s(t)),a[e]},this.maxSourceExtent_=n,this.errorThresholdSquared_=o*o,this.triangles_=[],this.wrapsXInSource_=!1,this.canWrapXInSource_=this.sourceProj_.canWrapX()&&!!n&&!!this.sourceProj_.getExtent()&&(0,P.dz)(n)==(0,P.dz)(this.sourceProj_.getExtent()),this.sourceWorldWidth_=this.sourceProj_.getExtent()?(0,P.dz)(this.sourceProj_.getExtent()):null,this.targetWorldWidth_=this.targetProj_.getExtent()?(0,P.dz)(this.targetProj_.getExtent()):null;var l=(0,P.rL)(i),c=(0,P.Xv)(i),u=(0,P.w$)(i),h=(0,P.hC)(i),p=this.transformInv_(l),d=this.transformInv_(c),f=this.transformInv_(u),g=this.transformInv_(h),_=10+(r?Math.max(0,Math.ceil((0,N.k3)((0,P.bg)(i)/(r*r*256*256)))):0);if(this.addQuad_(l,c,u,h,p,d,f,g,_),this.wrapsXInSource_){var y=1/0;this.triangles_.forEach((function(t,e,i){y=Math.min(y,t.source[0][0],t.source[1][0],t.source[2][0])})),this.triangles_.forEach(function(t){if(Math.max(t.source[0][0],t.source[1][0],t.source[2][0])-y>this.sourceWorldWidth_/2){var e=[[t.source[0][0],t.source[0][1]],[t.source[1][0],t.source[1][1]],[t.source[2][0],t.source[2][1]]];e[0][0]-y>this.sourceWorldWidth_/2&&(e[0][0]-=this.sourceWorldWidth_),e[1][0]-y>this.sourceWorldWidth_/2&&(e[1][0]-=this.sourceWorldWidth_),e[2][0]-y>this.sourceWorldWidth_/2&&(e[2][0]-=this.sourceWorldWidth_);var i=Math.min(e[0][0],e[1][0],e[2][0]);Math.max(e[0][0],e[1][0],e[2][0])-i<this.sourceWorldWidth_/2&&(t.source=e)}}.bind(this))}a={}}return t.prototype.addTriangle_=function(t,e,i,n,o,r){this.triangles_.push({source:[n,o,r],target:[t,e,i]})},t.prototype.addQuad_=function(t,e,i,n,o,r,a,s,l){var c=(0,P.hI)([o,r,a,s]),u=this.sourceWorldWidth_?(0,P.dz)(c)/this.sourceWorldWidth_:null,h=this.sourceWorldWidth_,p=this.sourceProj_.canWrapX()&&u>.5&&u<1,d=!1;if(l>0){if(this.targetProj_.isGlobal()&&this.targetWorldWidth_){var f=(0,P.hI)([t,e,i,n]);d=(0,P.dz)(f)/this.targetWorldWidth_>.25||d}!p&&this.sourceProj_.isGlobal()&&u&&(d=u>.25||d)}if(!(!d&&this.maxSourceExtent_&&isFinite(c[0])&&isFinite(c[1])&&isFinite(c[2])&&isFinite(c[3]))||(0,P.kK)(c,this.maxSourceExtent_)){var g=0;if(!(d||isFinite(o[0])&&isFinite(o[1])&&isFinite(r[0])&&isFinite(r[1])&&isFinite(a[0])&&isFinite(a[1])&&isFinite(s[0])&&isFinite(s[1])))if(l>0)d=!0;else if(1!=(g=(isFinite(o[0])&&isFinite(o[1])?0:8)+(isFinite(r[0])&&isFinite(r[1])?0:4)+(isFinite(a[0])&&isFinite(a[1])?0:2)+(isFinite(s[0])&&isFinite(s[1])?0:1))&&2!=g&&4!=g&&8!=g)return;if(l>0){if(!d){var _=[(t[0]+i[0])/2,(t[1]+i[1])/2],y=this.transformInv_(_),v=void 0;if(p)v=((0,N.$W)(o[0],h)+(0,N.$W)(a[0],h))/2-(0,N.$W)(y[0],h);else v=(o[0]+a[0])/2-y[0];var m=(o[1]+a[1])/2-y[1];d=v*v+m*m>this.errorThresholdSquared_}if(d){if(Math.abs(t[0]-i[0])<=Math.abs(t[1]-i[1])){var x=[(e[0]+i[0])/2,(e[1]+i[1])/2],b=this.transformInv_(x),w=[(n[0]+t[0])/2,(n[1]+t[1])/2],C=this.transformInv_(w);this.addQuad_(t,e,x,w,o,r,b,C,l-1),this.addQuad_(w,x,i,n,C,b,a,s,l-1)}else{var S=[(t[0]+e[0])/2,(t[1]+e[1])/2],E=this.transformInv_(S),T=[(i[0]+n[0])/2,(i[1]+n[1])/2],R=this.transformInv_(T);this.addQuad_(t,S,T,n,o,E,R,s,l-1),this.addQuad_(S,e,i,T,E,r,a,R,l-1)}return}}if(p){if(!this.canWrapXInSource_)return;this.wrapsXInSource_=!0}0==(11&g)&&this.addTriangle_(t,i,n,o,a,s),0==(14&g)&&this.addTriangle_(t,i,e,o,a,r),g&&(0==(13&g)&&this.addTriangle_(e,n,t,r,s,o),0==(7&g)&&this.addTriangle_(e,n,i,r,s,a))}},t.prototype.calculateSourceExtent=function(){var t=(0,P.lJ)();return this.triangles_.forEach((function(e,i,n){var o=e.source;(0,P.Wj)(t,o[0]),(0,P.Wj)(t,o[1]),(0,P.Wj)(t,o[2])})),t},t.prototype.getTriangles=function(){return this.triangles_},t}();const G=B;var Z,W={imageSmoothingEnabled:!1,msImageSmoothingEnabled:!1},U={imageSmoothingEnabled:!0,msImageSmoothingEnabled:!0},X=i("../../opt/drone/yarncache/ol-npm-6.12.0-aa56e5c786-a0eb5766bd.zip/node_modules/ol/obj.js");function Y(t,e,i,n,o){t.beginPath(),t.moveTo(0,0),t.lineTo(e,i),t.lineTo(n,o),t.closePath(),t.save(),t.clip(),t.fillRect(0,0,Math.max(e,n)+1,Math.max(i,o)),t.restore()}function V(t,e){return Math.abs(t[4*e]-210)>2||Math.abs(t[4*e+3]-191.25)>2}function K(t,e,i,n){var o=(0,z.vs)(i,e,t),r=(0,z._Q)(e,n,i),a=e.getMetersPerUnit();void 0!==a&&(r*=a);var s=t.getMetersPerUnit();void 0!==s&&(r/=s);var l=t.getExtent();if(!l||(0,P.b8)(l,o)){var c=(0,z._Q)(t,r,o)/r;isFinite(c)&&c>0&&(r/=c)}return r}function H(t,e,i,n,o,r,a,s,l,c,u,h){var p=w(Math.round(i*t),Math.round(i*e));if(h||(0,X.f0)(p,W),0===l.length)return p.canvas;function d(t){return Math.round(t*i)/i}p.scale(i,i),p.globalCompositeOperation="lighter";var f=(0,P.lJ)();l.forEach((function(t,e,i){(0,P.l7)(f,t.extent)}));var g=(0,P.dz)(f),_=(0,P.Cr)(f),y=w(Math.round(i*g/n),Math.round(i*_/n));h||(0,X.f0)(y,W);var v=i/n;l.forEach((function(t,e,i){var n=t.extent[0]-f[0],o=-(t.extent[3]-f[3]),r=(0,P.dz)(t.extent),a=(0,P.Cr)(t.extent);t.image.width>0&&t.image.height>0&&y.drawImage(t.image,c,c,t.image.width-2*c,t.image.height-2*c,n*v,o*v,r*v,a*v)}));var m=(0,P.rL)(a);return s.getTriangles().forEach((function(t,e,o){var a=t.source,s=t.target,l=a[0][0],c=a[0][1],u=a[1][0],g=a[1][1],_=a[2][0],v=a[2][1],x=d((s[0][0]-m[0])/r),b=d(-(s[0][1]-m[1])/r),w=d((s[1][0]-m[0])/r),C=d(-(s[1][1]-m[1])/r),S=d((s[2][0]-m[0])/r),E=d(-(s[2][1]-m[1])/r),T=l,R=c;l=0,c=0;var O=[[u-=T,g-=R,0,0,w-x],[_-=T,v-=R,0,0,S-x],[0,0,u,g,C-b],[0,0,_,v,E-b]],I=(0,N.SV)(O);if(I){if(p.save(),p.beginPath(),function(){if(void 0===Z){var t=document.createElement("canvas").getContext("2d");t.globalCompositeOperation="lighter",t.fillStyle="rgba(210, 0, 0, 0.75)",Y(t,4,5,4,0),Y(t,4,5,0,5);var e=t.getImageData(0,0,3,3).data;Z=V(e,0)||V(e,4)||V(e,8)}return Z}()||!h){p.moveTo(w,C);for(var L=x-w,P=b-C,F=0;F<4;F++)p.lineTo(w+d((F+1)*L/4),C+d(F*P/3)),3!=F&&p.lineTo(w+d((F+1)*L/4),C+d((F+1)*P/3));p.lineTo(S,E)}else p.moveTo(w,C),p.lineTo(x,b),p.lineTo(S,E);p.clip(),p.transform(I[0],I[2],I[1],I[3],x,b),p.translate(f[0]-T,f[3]-R),p.scale(n/i,-n/i),p.drawImage(y.canvas,0,0),p.restore()}})),u&&(p.save(),p.globalCompositeOperation="source-over",p.strokeStyle="black",p.lineWidth=1,s.getTriangles().forEach((function(t,e,i){var n=t.target,o=(n[0][0]-m[0])/r,a=-(n[0][1]-m[1])/r,s=(n[1][0]-m[0])/r,l=-(n[1][1]-m[1])/r,c=(n[2][0]-m[0])/r,u=-(n[2][1]-m[1])/r;p.beginPath(),p.moveTo(s,l),p.lineTo(o,a),p.lineTo(c,u),p.closePath(),p.stroke()})),p.restore()),p.canvas}var q=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),$=function(t){function e(e,i,n,o,r,a,l,c,u,p,d,f){var g=t.call(this,r,s,{interpolate:!!f})||this;g.renderEdges_=void 0!==d&&d,g.pixelRatio_=l,g.gutter_=c,g.canvas_=null,g.sourceTileGrid_=i,g.targetTileGrid_=o,g.wrappedTileCoord_=a||r,g.sourceTiles_=[],g.sourcesListenerKeys_=null,g.sourceZ_=0;var _=o.getTileCoordExtent(g.wrappedTileCoord_),y=g.targetTileGrid_.getExtent(),v=g.sourceTileGrid_.getExtent(),m=y?(0,P.Ed)(_,y):_;if(0===(0,P.bg)(m))return g.state=h,g;var x=e.getExtent();x&&(v=v?(0,P.Ed)(v,x):x);var b=o.getResolution(g.wrappedTileCoord_[0]),w=function(t,e,i,n){var o=(0,P.qg)(i),r=K(t,e,o,n);return(!isFinite(r)||r<=0)&&(0,P.H6)(i,(function(i){return r=K(t,e,i,n),isFinite(r)&&r>0})),r}(e,n,m,b);if(!isFinite(w)||w<=0)return g.state=h,g;var C=void 0!==p?p:.5;if(g.triangulation_=new G(e,n,m,v,w*C,b),0===g.triangulation_.getTriangles().length)return g.state=h,g;g.sourceZ_=i.getZForResolution(w);var S=g.triangulation_.calculateSourceExtent();if(v&&(e.canWrapX()?(S[1]=(0,N.uZ)(S[1],v[1],v[3]),S[3]=(0,N.uZ)(S[3],v[1],v[3])):S=(0,P.Ed)(S,v)),(0,P.bg)(S)){for(var E=i.getTileRangeForExtentAndZ(S,g.sourceZ_),T=E.minX;T<=E.maxX;T++)for(var R=E.minY;R<=E.maxY;R++){var O=u(g.sourceZ_,T,R,l);O&&g.sourceTiles_.push(O)}0===g.sourceTiles_.length&&(g.state=h)}else g.state=h;return g}return q(e,t),e.prototype.getImage=function(){return this.canvas_},e.prototype.reproject_=function(){var t=[];if(this.sourceTiles_.forEach(function(e,i,n){e&&e.getState()==c&&t.push({extent:this.sourceTileGrid_.getTileCoordExtent(e.tileCoord),image:e.getImage()})}.bind(this)),this.sourceTiles_.length=0,0===t.length)this.state=u;else{var e=this.wrappedTileCoord_[0],i=this.targetTileGrid_.getTileSize(e),n="number"==typeof i?i:i[0],o="number"==typeof i?i:i[1],r=this.targetTileGrid_.getResolution(e),a=this.sourceTileGrid_.getResolution(this.sourceZ_),s=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_);this.canvas_=H(n,o,this.pixelRatio_,a,this.sourceTileGrid_.getExtent(),r,s,this.triangulation_,t,this.gutter_,this.renderEdges_,this.interpolate),this.state=c}this.changed()},e.prototype.load=function(){if(this.state==s){this.state=l,this.changed();var t=0;this.sourcesListenerKeys_=[],this.sourceTiles_.forEach(function(e,i,n){var o=e.getState();if(o==s||o==l){t++;var a=(0,F.oL)(e,r.Z.CHANGE,(function(i){var n=e.getState();n!=c&&n!=u&&n!=h||((0,F.bN)(a),0===--t&&(this.unlistenSources_(),this.reproject_()))}),this);this.sourcesListenerKeys_.push(a)}}.bind(this)),0===t?setTimeout(this.reproject_.bind(this),0):this.sourceTiles_.forEach((function(t,e,i){t.getState()==s&&t.load()}))}},e.prototype.unlistenSources_=function(){this.sourcesListenerKeys_.forEach(F.bN),this.sourcesListenerKeys_=null},e}(x);const J=$;var Q=i("../../opt/drone/yarncache/ol-npm-6.12.0-aa56e5c786-a0eb5766bd.zip/node_modules/ol/asserts.js");const tt=function(){function t(t){this.highWaterMark=void 0!==t?t:2048,this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null}return t.prototype.canExpireCache=function(){return this.highWaterMark>0&&this.getCount()>this.highWaterMark},t.prototype.clear=function(){this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null},t.prototype.containsKey=function(t){return this.entries_.hasOwnProperty(t)},t.prototype.forEach=function(t){for(var e=this.oldest_;e;)t(e.value_,e.key_,this),e=e.newer},t.prototype.get=function(t,e){var i=this.entries_[t];return(0,Q.h)(void 0!==i,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_},t.prototype.remove=function(t){var e=this.entries_[t];return(0,Q.h)(void 0!==e,15),e===this.newest_?(this.newest_=e.older,this.newest_&&(this.newest_.newer=null)):e===this.oldest_?(this.oldest_=e.newer,this.oldest_&&(this.oldest_.older=null)):(e.newer.older=e.older,e.older.newer=e.newer),delete this.entries_[t],--this.count_,e.value_},t.prototype.getCount=function(){return this.count_},t.prototype.getKeys=function(){var t,e=new Array(this.count_),i=0;for(t=this.newest_;t;t=t.older)e[i++]=t.key_;return e},t.prototype.getValues=function(){var t,e=new Array(this.count_),i=0;for(t=this.newest_;t;t=t.older)e[i++]=t.value_;return e},t.prototype.peekLast=function(){return this.oldest_.value_},t.prototype.peekLastKey=function(){return this.oldest_.key_},t.prototype.peekFirstKey=function(){return this.newest_.key_},t.prototype.pop=function(){var t=this.oldest_;return delete this.entries_[t.key_],t.newer&&(t.newer.older=null),this.oldest_=t.newer,this.oldest_||(this.newest_=null),--this.count_,t.value_},t.prototype.replace=function(t,e){this.get(t),this.entries_[t].value_=e},t.prototype.set=function(t,e){(0,Q.h)(!(t in this.entries_),16);var i={key_:t,newer:null,older:this.newest_,value_:e};this.newest_?this.newest_.newer=i:this.oldest_=i,this.newest_=i,this.entries_[t]=i,++this.count_},t.prototype.setSize=function(t){this.highWaterMark=t},t}();function et(t,e,i,n){return void 0!==n?(n[0]=t,n[1]=e,n[2]=i,n):[t,e,i]}function it(t,e,i){return t+"/"+e+"/"+i}function nt(t){return it(t[0],t[1],t[2])}var ot=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),rt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ot(e,t),e.prototype.expireCache=function(t){for(;this.canExpireCache();){if(this.peekLast().getKey()in t)break;this.pop().release()}},e.prototype.pruneExceptNewestZ=function(){if(0!==this.getCount()){var t=function(t){return t.split("/").map(Number)}(this.peekFirstKey()),e=t[0];this.forEach(function(t){t.tileCoord[0]!==e&&(this.remove(nt(t.tileCoord)),t.release())}.bind(this))}},e}(tt);const at=rt,st="tileloadstart",lt="tileloadend",ct="tileloaderror";var ut=i("../../opt/drone/yarncache/ol-npm-6.12.0-aa56e5c786-a0eb5766bd.zip/node_modules/ol/events/Event.js"),ht=i("../../opt/drone/yarncache/ol-npm-6.12.0-aa56e5c786-a0eb5766bd.zip/node_modules/ol/Object.js");const pt="undefined",dt="ready";var ft=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();function gt(t){return t?Array.isArray(t)?function(e){return t}:"function"==typeof t?t:function(e){return[t]}:null}const _t=function(t){function e(e){var i=t.call(this)||this;i.projection=(0,z.U2)(e.projection),i.attributions_=gt(e.attributions),i.attributionsCollapsible_=void 0===e.attributionsCollapsible||e.attributionsCollapsible,i.loading=!1,i.state_=void 0!==e.state?e.state:dt,i.wrapX_=void 0!==e.wrapX&&e.wrapX,i.interpolate_=!!e.interpolate,i.viewResolver=null,i.viewRejector=null;var n=i;return i.viewPromise_=new Promise((function(t,e){n.viewResolver=t,n.viewRejector=e})),i}return ft(e,t),e.prototype.getAttributions=function(){return this.attributions_},e.prototype.getAttributionsCollapsible=function(){return this.attributionsCollapsible_},e.prototype.getProjection=function(){return this.projection},e.prototype.getResolutions=function(){return(0,p.O3)()},e.prototype.getView=function(){return this.viewPromise_},e.prototype.getState=function(){return this.state_},e.prototype.getWrapX=function(){return this.wrapX_},e.prototype.getInterpolate=function(){return this.interpolate_},e.prototype.refresh=function(){this.changed()},e.prototype.setAttributions=function(t){this.attributions_=gt(t),this.changed()},e.prototype.setState=function(t){this.state_=t,this.changed()},e}(ht.Z);var yt=i("../../opt/drone/yarncache/ol-npm-6.12.0-aa56e5c786-a0eb5766bd.zip/node_modules/ol/extent/Corner.js"),vt=function(){function t(t,e,i,n){this.minX=t,this.maxX=e,this.minY=i,this.maxY=n}return t.prototype.contains=function(t){return this.containsXY(t[1],t[2])},t.prototype.containsTileRange=function(t){return this.minX<=t.minX&&t.maxX<=this.maxX&&this.minY<=t.minY&&t.maxY<=this.maxY},t.prototype.containsXY=function(t,e){return this.minX<=t&&t<=this.maxX&&this.minY<=e&&e<=this.maxY},t.prototype.equals=function(t){return this.minX==t.minX&&this.minY==t.minY&&this.maxX==t.maxX&&this.maxY==t.maxY},t.prototype.extend=function(t){t.minX<this.minX&&(this.minX=t.minX),t.maxX>this.maxX&&(this.maxX=t.maxX),t.minY<this.minY&&(this.minY=t.minY),t.maxY>this.maxY&&(this.maxY=t.maxY)},t.prototype.getHeight=function(){return this.maxY-this.minY+1},t.prototype.getSize=function(){return[this.getWidth(),this.getHeight()]},t.prototype.getWidth=function(){return this.maxX-this.minX+1},t.prototype.intersects=function(t){return this.minX<=t.maxX&&this.maxX>=t.minX&&this.minY<=t.maxY&&this.maxY>=t.minY},t}();function mt(t,e,i,n,o){return void 0!==o?(o.minX=t,o.maxX=e,o.minY=i,o.maxY=n,o):new vt(t,e,i,n)}const xt=vt;var bt=256,wt=i("../../opt/drone/yarncache/ol-npm-6.12.0-aa56e5c786-a0eb5766bd.zip/node_modules/ol/array.js");function Ct(t){return t[0]>0&&t[1]>0}function St(t,e){return Array.isArray(t)?t:(void 0===e?e=[t,t]:(e[0]=t,e[1]=t),e)}var Et=[0,0,0],Tt=function(){function t(t){var e;if(this.minZoom=void 0!==t.minZoom?t.minZoom:0,this.resolutions_=t.resolutions,(0,Q.h)((0,wt.pT)(this.resolutions_,(function(t,e){return e-t}),!0),17),!t.origins)for(var i=0,n=this.resolutions_.length-1;i<n;++i)if(e){if(this.resolutions_[i]/this.resolutions_[i+1]!==e){e=void 0;break}}else e=this.resolutions_[i]/this.resolutions_[i+1];this.zoomFactor_=e,this.maxZoom=this.resolutions_.length-1,this.origin_=void 0!==t.origin?t.origin:null,this.origins_=null,void 0!==t.origins&&(this.origins_=t.origins,(0,Q.h)(this.origins_.length==this.resolutions_.length,20));var o=t.extent;void 0===o||this.origin_||this.origins_||(this.origin_=(0,P.rL)(o)),(0,Q.h)(!this.origin_&&this.origins_||this.origin_&&!this.origins_,18),this.tileSizes_=null,void 0!==t.tileSizes&&(this.tileSizes_=t.tileSizes,(0,Q.h)(this.tileSizes_.length==this.resolutions_.length,19)),this.tileSize_=void 0!==t.tileSize?t.tileSize:this.tileSizes_?null:256,(0,Q.h)(!this.tileSize_&&this.tileSizes_||this.tileSize_&&!this.tileSizes_,22),this.extent_=void 0!==o?o:null,this.fullTileRanges_=null,this.tmpSize_=[0,0],this.tmpExtent_=[0,0,0,0],void 0!==t.sizes?this.fullTileRanges_=t.sizes.map((function(t,e){var i=new xt(Math.min(0,t[0]),Math.max(t[0]-1,-1),Math.min(0,t[1]),Math.max(t[1]-1,-1));if(o){var n=this.getTileRangeForExtentAndZ(o,e);i.minX=Math.max(n.minX,i.minX),i.maxX=Math.min(n.maxX,i.maxX),i.minY=Math.max(n.minY,i.minY),i.maxY=Math.min(n.maxY,i.maxY)}return i}),this):o&&this.calculateTileRanges_(o)}return t.prototype.forEachTileCoord=function(t,e,i){for(var n=this.getTileRangeForExtentAndZ(t,e),o=n.minX,r=n.maxX;o<=r;++o)for(var a=n.minY,s=n.maxY;a<=s;++a)i([e,o,a])},t.prototype.forEachTileCoordParentTileRange=function(t,e,i,n){var o,r,a=null,s=t[0]-1;for(2===this.zoomFactor_?(o=t[1],r=t[2]):a=this.getTileCoordExtent(t,n);s>=this.minZoom;){if(e(s,2===this.zoomFactor_?mt(o=Math.floor(o/2),o,r=Math.floor(r/2),r,i):this.getTileRangeForExtentAndZ(a,s,i)))return!0;--s}return!1},t.prototype.getExtent=function(){return this.extent_},t.prototype.getMaxZoom=function(){return this.maxZoom},t.prototype.getMinZoom=function(){return this.minZoom},t.prototype.getOrigin=function(t){return this.origin_?this.origin_:this.origins_[t]},t.prototype.getResolution=function(t){return this.resolutions_[t]},t.prototype.getResolutions=function(){return this.resolutions_},t.prototype.getTileCoordChildTileRange=function(t,e,i){if(t[0]<this.maxZoom){if(2===this.zoomFactor_){var n=2*t[1],o=2*t[2];return mt(n,n+1,o,o+1,e)}var r=this.getTileCoordExtent(t,i||this.tmpExtent_);return this.getTileRangeForExtentAndZ(r,t[0]+1,e)}return null},t.prototype.getTileRangeForTileCoordAndZ=function(t,e,i){if(e>this.maxZoom||e<this.minZoom)return null;var n=t[0],o=t[1],r=t[2];if(e===n)return mt(o,r,o,r,i);if(this.zoomFactor_){var a=Math.pow(this.zoomFactor_,e-n),s=Math.floor(o*a),l=Math.floor(r*a);return e<n?mt(s,s,l,l,i):mt(s,Math.floor(a*(o+1))-1,l,Math.floor(a*(r+1))-1,i)}var c=this.getTileCoordExtent(t,this.tmpExtent_);return this.getTileRangeForExtentAndZ(c,e,i)},t.prototype.getTileRangeExtent=function(t,e,i){var n=this.getOrigin(t),o=this.getResolution(t),r=St(this.getTileSize(t),this.tmpSize_),a=n[0]+e.minX*r[0]*o,s=n[0]+(e.maxX+1)*r[0]*o,l=n[1]+e.minY*r[1]*o,c=n[1]+(e.maxY+1)*r[1]*o;return(0,P.T9)(a,l,s,c,i)},t.prototype.getTileRangeForExtentAndZ=function(t,e,i){var n=Et;this.getTileCoordForXYAndZ_(t[0],t[3],e,!1,n);var o=n[1],r=n[2];return this.getTileCoordForXYAndZ_(t[2],t[1],e,!0,n),mt(o,n[1],r,n[2],i)},t.prototype.getTileCoordCenter=function(t){var e=this.getOrigin(t[0]),i=this.getResolution(t[0]),n=St(this.getTileSize(t[0]),this.tmpSize_);return[e[0]+(t[1]+.5)*n[0]*i,e[1]-(t[2]+.5)*n[1]*i]},t.prototype.getTileCoordExtent=function(t,e){var i=this.getOrigin(t[0]),n=this.getResolution(t[0]),o=St(this.getTileSize(t[0]),this.tmpSize_),r=i[0]+t[1]*o[0]*n,a=i[1]-(t[2]+1)*o[1]*n,s=r+o[0]*n,l=a+o[1]*n;return(0,P.T9)(r,a,s,l,e)},t.prototype.getTileCoordForCoordAndResolution=function(t,e,i){return this.getTileCoordForXYAndResolution_(t[0],t[1],e,!1,i)},t.prototype.getTileCoordForXYAndResolution_=function(t,e,i,n,o){var r=this.getZForResolution(i),a=i/this.getResolution(r),s=this.getOrigin(r),l=St(this.getTileSize(r),this.tmpSize_),c=a*(t-s[0])/i/l[0],u=a*(s[1]-e)/i/l[1];return n?(c=(0,N.mD)(c,5)-1,u=(0,N.mD)(u,5)-1):(c=(0,N.GW)(c,5),u=(0,N.GW)(u,5)),et(r,c,u,o)},t.prototype.getTileCoordForXYAndZ_=function(t,e,i,n,o){var r=this.getOrigin(i),a=this.getResolution(i),s=St(this.getTileSize(i),this.tmpSize_),l=(t-r[0])/a/s[0],c=(r[1]-e)/a/s[1];return n?(l=(0,N.mD)(l,5)-1,c=(0,N.mD)(c,5)-1):(l=(0,N.GW)(l,5),c=(0,N.GW)(c,5)),et(i,l,c,o)},t.prototype.getTileCoordForCoordAndZ=function(t,e,i){return this.getTileCoordForXYAndZ_(t[0],t[1],e,!1,i)},t.prototype.getTileCoordResolution=function(t){return this.resolutions_[t[0]]},t.prototype.getTileSize=function(t){return this.tileSize_?this.tileSize_:this.tileSizes_[t]},t.prototype.getFullTileRange=function(t){return this.fullTileRanges_?this.fullTileRanges_[t]:this.extent_?this.getTileRangeForExtentAndZ(this.extent_,t):null},t.prototype.getZForResolution=function(t,e){var i=(0,wt.h7)(this.resolutions_,t,e||0);return(0,N.uZ)(i,this.minZoom,this.maxZoom)},t.prototype.calculateTileRanges_=function(t){for(var e=this.resolutions_.length,i=new Array(e),n=this.minZoom;n<e;++n)i[n]=this.getTileRangeForExtentAndZ(t,n);this.fullTileRanges_=i},t}();const Rt=Tt;var Ot=i("../../opt/drone/yarncache/ol-npm-6.12.0-aa56e5c786-a0eb5766bd.zip/node_modules/ol/proj/Units.js");function It(t){var e=t.getDefaultTileGrid();return e||(e=function(t,e,i,n){return function(t,e,i,n){var o=void 0!==n?n:yt.Z.TOP_LEFT,r=Lt(t,e,i);return new Rt({extent:t,origin:(0,P.g0)(t,o),resolutions:r,tileSize:i})}(Pt(t),e,i,n)}(t),t.setDefaultTileGrid(e)),e}function Lt(t,e,i,n){for(var o=void 0!==e?e:42,r=(0,P.Cr)(t),a=(0,P.dz)(t),s=St(void 0!==i?i:256),l=n>0?n:Math.max(a/s[0],r/s[1]),c=o+1,u=new Array(c),h=0;h<c;++h)u[h]=l/Math.pow(2,h);return u}function Pt(t){var e=(t=(0,z.U2)(t)).getExtent();if(!e){var i=180*z.Wm[Ot.ZP.DEGREES]/t.getMetersPerUnit();e=(0,P.T9)(-i,-i,i,i)}return e}var Ft=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),At=function(t){function e(e){var i=t.call(this,{attributions:e.attributions,attributionsCollapsible:e.attributionsCollapsible,projection:e.projection,state:e.state,wrapX:e.wrapX,interpolate:e.interpolate})||this;i.on,i.once,i.un,i.opaque_=void 0!==e.opaque&&e.opaque,i.tilePixelRatio_=void 0!==e.tilePixelRatio?e.tilePixelRatio:1,i.tileGrid=void 0!==e.tileGrid?e.tileGrid:null;var n=e.tileGrid;return n&&St(n.getTileSize(n.getMinZoom()),[256,256]),i.tileCache=new at(e.cacheSize||0),i.tmpSize=[0,0],i.key_=e.key||"",i.tileOptions={transition:e.transition,interpolate:e.interpolate},i.zDirection=e.zDirection?e.zDirection:0,i}return Ft(e,t),e.prototype.canExpireCache=function(){return this.tileCache.canExpireCache()},e.prototype.expireCache=function(t,e){var i=this.getTileCacheForProjection(t);i&&i.expireCache(e)},e.prototype.forEachLoadedTile=function(t,e,i,n){var o=this.getTileCacheForProjection(t);if(!o)return!1;for(var r,a,s,l=!0,u=i.minX;u<=i.maxX;++u)for(var h=i.minY;h<=i.maxY;++h)a=it(e,u,h),s=!1,o.containsKey(a)&&(s=(r=o.get(a)).getState()===c)&&(s=!1!==n(r)),s||(l=!1);return l},e.prototype.getGutterForProjection=function(t){return 0},e.prototype.getKey=function(){return this.key_},e.prototype.setKey=function(t){this.key_!==t&&(this.key_=t,this.changed())},e.prototype.getOpaque=function(t){return this.opaque_},e.prototype.getResolutions=function(){return this.tileGrid.getResolutions()},e.prototype.getTile=function(t,e,i,n,o){return(0,p.O3)()},e.prototype.getTileGrid=function(){return this.tileGrid},e.prototype.getTileGridForProjection=function(t){return this.tileGrid?this.tileGrid:It(t)},e.prototype.getTileCacheForProjection=function(t){return(0,Q.h)((0,z.OP)(this.getProjection(),t),68),this.tileCache},e.prototype.getTilePixelRatio=function(t){return this.tilePixelRatio_},e.prototype.getTilePixelSize=function(t,e,i){var n,o,r,a=this.getTileGridForProjection(i),s=this.getTilePixelRatio(e),l=St(a.getTileSize(t),this.tmpSize);return 1==s?l:(n=l,o=s,void 0===(r=this.tmpSize)&&(r=[0,0]),r[0]=n[0]*o+.5|0,r[1]=n[1]*o+.5|0,r)},e.prototype.getTileCoordForTileUrlFunction=function(t,e){var i=void 0!==e?e:this.getProjection(),n=this.getTileGridForProjection(i);return this.getWrapX()&&i.isGlobal()&&(t=function(t,e,i){var n=e[0],o=t.getTileCoordCenter(e),r=Pt(i);if((0,P.b8)(r,o))return e;var a=(0,P.dz)(r),s=Math.ceil((r[0]-o[0])/a);return o[0]+=a*s,t.getTileCoordForCoordAndZ(o,n)}(n,t,i)),function(t,e){var i=t[0],n=t[1],o=t[2];if(e.getMinZoom()>i||i>e.getMaxZoom())return!1;var r=e.getFullTileRange(i);return!r||r.containsXY(n,o)}(t,n)?t:null},e.prototype.clear=function(){this.tileCache.clear()},e.prototype.refresh=function(){this.clear(),t.prototype.refresh.call(this)},e.prototype.updateCacheSize=function(t,e){var i=this.getTileCacheForProjection(e);t>i.highWaterMark&&(i.highWaterMark=t)},e.prototype.useTile=function(t,e,i,n){},e}(_t),jt=function(t){function e(e,i){var n=t.call(this,e)||this;return n.tile=i,n}return Ft(e,t),e}(ut.ZP);const Mt=At;function kt(t,e){var i=/\{z\}/g,n=/\{x\}/g,o=/\{y\}/g,r=/\{-y\}/g;return function(a,s,l){return a?t.replace(i,a[0].toString()).replace(n,a[1].toString()).replace(o,a[2].toString()).replace(r,(function(){var t=a[0],i=e.getFullTileRange(t);return(0,Q.h)(i,55),(i.getHeight()-a[2]-1).toString()})):void 0}}function Dt(t,e){for(var i=t.length,n=new Array(i),o=0;o<i;++o)n[o]=kt(t[o],e);return function(t){if(1===t.length)return t[0];return function(e,i,n){if(e){var o=function(t){return(t[1]<<t[0])+t[2]}(e),r=(0,N.$W)(o,t.length);return t[r](e,i,n)}}}(n)}var zt=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Nt=function(t){function e(i){var n=t.call(this,{attributions:i.attributions,cacheSize:i.cacheSize,opaque:i.opaque,projection:i.projection,state:i.state,tileGrid:i.tileGrid,tilePixelRatio:i.tilePixelRatio,wrapX:i.wrapX,transition:i.transition,interpolate:i.interpolate,key:i.key,attributionsCollapsible:i.attributionsCollapsible,zDirection:i.zDirection})||this;return n.generateTileUrlFunction_=n.tileUrlFunction===e.prototype.tileUrlFunction,n.tileLoadFunction=i.tileLoadFunction,i.tileUrlFunction&&(n.tileUrlFunction=i.tileUrlFunction),n.urls=null,i.urls?n.setUrls(i.urls):i.url&&n.setUrl(i.url),n.tileLoadingKeys_={},n}return zt(e,t),e.prototype.getTileLoadFunction=function(){return this.tileLoadFunction},e.prototype.getTileUrlFunction=function(){return Object.getPrototypeOf(this).tileUrlFunction===this.tileUrlFunction?this.tileUrlFunction.bind(this):this.tileUrlFunction},e.prototype.getUrls=function(){return this.urls},e.prototype.handleTileChange=function(t){var e,i=t.target,n=(0,p.sq)(i),o=i.getState();o==l?(this.tileLoadingKeys_[n]=!0,e=st):n in this.tileLoadingKeys_&&(delete this.tileLoadingKeys_[n],e=o==u?ct:o==c?lt:void 0),null!=e&&this.dispatchEvent(new jt(e,i))},e.prototype.setTileLoadFunction=function(t){this.tileCache.clear(),this.tileLoadFunction=t,this.changed()},e.prototype.setTileUrlFunction=function(t,e){this.tileUrlFunction=t,this.tileCache.pruneExceptNewestZ(),void 0!==e?this.setKey(e):this.changed()},e.prototype.setUrl=function(t){var e=function(t){var e=[],i=/\{([a-z])-([a-z])\}/.exec(t);if(i){var n=i[1].charCodeAt(0),o=i[2].charCodeAt(0),r=void 0;for(r=n;r<=o;++r)e.push(t.replace(i[0],String.fromCharCode(r)));return e}if(i=/\{(\d+)-(\d+)\}/.exec(t)){for(var a=parseInt(i[2],10),s=parseInt(i[1],10);s<=a;s++)e.push(t.replace(i[0],s.toString()));return e}return e.push(t),e}(t);this.urls=e,this.setUrls(e)},e.prototype.setUrls=function(t){this.urls=t;var e=t.join("\n");this.generateTileUrlFunction_?this.setTileUrlFunction(Dt(t,this.tileGrid),e):this.setKey(e)},e.prototype.tileUrlFunction=function(t,e,i){},e.prototype.useTile=function(t,e,i){var n=it(t,e,i);this.tileCache.containsKey(n)&&this.tileCache.get(n)},e}(Mt);const Bt=Nt;var Gt=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Zt=function(t){function e(e){var i=this,n=void 0===e.imageSmoothing||e.imageSmoothing;return void 0!==e.interpolate&&(n=e.interpolate),(i=t.call(this,{attributions:e.attributions,cacheSize:e.cacheSize,opaque:e.opaque,projection:e.projection,state:e.state,tileGrid:e.tileGrid,tileLoadFunction:e.tileLoadFunction?e.tileLoadFunction:Wt,tilePixelRatio:e.tilePixelRatio,tileUrlFunction:e.tileUrlFunction,url:e.url,urls:e.urls,wrapX:e.wrapX,transition:e.transition,interpolate:n,key:e.key,attributionsCollapsible:e.attributionsCollapsible,zDirection:e.zDirection})||this).crossOrigin=void 0!==e.crossOrigin?e.crossOrigin:null,i.tileClass=void 0!==e.tileClass?e.tileClass:D,i.tileCacheForProjection={},i.tileGridForProjection={},i.reprojectionErrorThreshold_=e.reprojectionErrorThreshold,i.renderReprojectionEdges_=!1,i}return Gt(e,t),e.prototype.canExpireCache=function(){if(this.tileCache.canExpireCache())return!0;for(var t in this.tileCacheForProjection)if(this.tileCacheForProjection[t].canExpireCache())return!0;return!1},e.prototype.expireCache=function(t,e){var i=this.getTileCacheForProjection(t);for(var n in this.tileCache.expireCache(this.tileCache==i?e:{}),this.tileCacheForProjection){var o=this.tileCacheForProjection[n];o.expireCache(o==i?e:{})}},e.prototype.getGutterForProjection=function(t){return this.getProjection()&&t&&!(0,z.OP)(this.getProjection(),t)?0:this.getGutter()},e.prototype.getGutter=function(){return 0},e.prototype.getKey=function(){var e=t.prototype.getKey.call(this);return this.getInterpolate()||(e+=":disable-interpolation"),e},e.prototype.getOpaque=function(e){return!(this.getProjection()&&e&&!(0,z.OP)(this.getProjection(),e))&&t.prototype.getOpaque.call(this,e)},e.prototype.getTileGridForProjection=function(t){var e=this.getProjection();if(!this.tileGrid||e&&!(0,z.OP)(e,t)){var i=(0,p.sq)(t);return i in this.tileGridForProjection||(this.tileGridForProjection[i]=It(t)),this.tileGridForProjection[i]}return this.tileGrid},e.prototype.getTileCacheForProjection=function(t){var e=this.getProjection();if(!e||(0,z.OP)(e,t))return this.tileCache;var i=(0,p.sq)(t);return i in this.tileCacheForProjection||(this.tileCacheForProjection[i]=new at(this.tileCache.highWaterMark)),this.tileCacheForProjection[i]},e.prototype.createTile_=function(t,e,i,n,o,a){var l=[t,e,i],c=this.getTileCoordForTileUrlFunction(l,o),u=c?this.tileUrlFunction(c,n,o):void 0,p=new this.tileClass(l,void 0!==u?s:h,void 0!==u?u:"",this.crossOrigin,this.tileLoadFunction,this.tileOptions);return p.key=a,p.addEventListener(r.Z.CHANGE,this.handleTileChange.bind(this)),p},e.prototype.getTile=function(t,e,i,n,o){var r=this.getProjection();if(r&&o&&!(0,z.OP)(r,o)){var a=this.getTileCacheForProjection(o),s=[t,e,i],l=void 0,c=nt(s);a.containsKey(c)&&(l=a.get(c));var u=this.getKey();if(l&&l.key==u)return l;var h=this.getTileGridForProjection(r),p=this.getTileGridForProjection(o),d=this.getTileCoordForTileUrlFunction(s,o),f=new J(r,h,o,p,s,d,this.getTilePixelRatio(n),this.getGutter(),function(t,e,i,n){return this.getTileInternal(t,e,i,n,r)}.bind(this),this.reprojectionErrorThreshold_,this.renderReprojectionEdges_,this.getInterpolate());return f.key=u,l?(f.interimTile=l,f.refreshInterimChain(),a.replace(c,f)):a.set(c,f),f}return this.getTileInternal(t,e,i,n,r||o)},e.prototype.getTileInternal=function(t,e,i,n,o){var r=null,a=it(t,e,i),l=this.getKey();if(this.tileCache.containsKey(a)){if((r=this.tileCache.get(a)).key!=l){var c=r;r=this.createTile_(t,e,i,n,o,l),c.getState()==s?r.interimTile=c.interimTile:r.interimTile=c,r.refreshInterimChain(),this.tileCache.replace(a,r)}}else r=this.createTile_(t,e,i,n,o,l),this.tileCache.set(a,r);return r},e.prototype.setRenderReprojectionEdges=function(t){if(this.renderReprojectionEdges_!=t){for(var e in this.renderReprojectionEdges_=t,this.tileCacheForProjection)this.tileCacheForProjection[e].clear();this.changed()}},e.prototype.setTileGridForProjection=function(t,e){var i=(0,z.U2)(t);if(i){var n=(0,p.sq)(i);n in this.tileGridForProjection||(this.tileGridForProjection[n]=e)}},e}(Bt);function Wt(t,e){t.getImage().src=e}const Ut=Zt;var Xt=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();const Yt=function(t){function e(e){var i=e||{},n=void 0===i.imageSmoothing||i.imageSmoothing;void 0!==i.interpolate&&(n=i.interpolate);var o=void 0!==i.projection?i.projection:"EPSG:3857",r=void 0!==i.tileGrid?i.tileGrid:function(t){var e=t||{},i=e.extent||(0,z.U2)("EPSG:3857").getExtent(),n={extent:i,minZoom:e.minZoom,tileSize:e.tileSize,resolutions:Lt(i,e.maxZoom,e.tileSize,e.maxResolution)};return new Rt(n)}({extent:Pt(o),maxResolution:i.maxResolution,maxZoom:i.maxZoom,minZoom:i.minZoom,tileSize:i.tileSize});return t.call(this,{attributions:i.attributions,cacheSize:i.cacheSize,crossOrigin:i.crossOrigin,interpolate:n,opaque:i.opaque,projection:o,reprojectionErrorThreshold:i.reprojectionErrorThreshold,tileGrid:r,tileLoadFunction:i.tileLoadFunction,tilePixelRatio:i.tilePixelRatio,tileUrlFunction:i.tileUrlFunction,url:i.url,urls:i.urls,wrapX:void 0===i.wrapX||i.wrapX,transition:i.transition,attributionsCollapsible:i.attributionsCollapsible,zDirection:i.zDirection})||this}return Xt(e,t),e}(Ut),Vt="opacity",Kt="visible",Ht="extent",qt="zIndex",$t="maxResolution",Jt="minResolution",Qt="maxZoom",te="minZoom",ee="source",ie="map";var ne=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();const oe=function(t){function e(e){var i=t.call(this)||this;i.on,i.once,i.un,i.background_=e.background;var n=(0,X.f0)({},e);return"object"==typeof e.properties&&(delete n.properties,(0,X.f0)(n,e.properties)),n[Vt]=void 0!==e.opacity?e.opacity:1,(0,Q.h)("number"==typeof n[Vt],64),n[Kt]=void 0===e.visible||e.visible,n[qt]=e.zIndex,n[$t]=void 0!==e.maxResolution?e.maxResolution:1/0,n[Jt]=void 0!==e.minResolution?e.minResolution:0,n[te]=void 0!==e.minZoom?e.minZoom:-1/0,n[Qt]=void 0!==e.maxZoom?e.maxZoom:1/0,i.className_=void 0!==n.className?e.className:"ol-layer",delete n.className,i.setProperties(n),i.state_=null,i}return ne(e,t),e.prototype.getBackground=function(){return this.background_},e.prototype.getClassName=function(){return this.className_},e.prototype.getLayerState=function(t){var e=this.state_||{layer:this,managed:void 0===t||t},i=this.getZIndex();return e.opacity=(0,N.uZ)(Math.round(100*this.getOpacity())/100,0,1),e.sourceState=this.getSourceState(),e.visible=this.getVisible(),e.extent=this.getExtent(),e.zIndex=void 0!==i||e.managed?i:1/0,e.maxResolution=this.getMaxResolution(),e.minResolution=Math.max(this.getMinResolution(),0),e.minZoom=this.getMinZoom(),e.maxZoom=this.getMaxZoom(),this.state_=e,e},e.prototype.getLayersArray=function(t){return(0,p.O3)()},e.prototype.getLayerStatesArray=function(t){return(0,p.O3)()},e.prototype.getExtent=function(){return this.get(Ht)},e.prototype.getMaxResolution=function(){return this.get($t)},e.prototype.getMinResolution=function(){return this.get(Jt)},e.prototype.getMinZoom=function(){return this.get(te)},e.prototype.getMaxZoom=function(){return this.get(Qt)},e.prototype.getOpacity=function(){return this.get(Vt)},e.prototype.getSourceState=function(){return(0,p.O3)()},e.prototype.getVisible=function(){return this.get(Kt)},e.prototype.getZIndex=function(){return this.get(qt)},e.prototype.setBackground=function(t){this.background_=t,this.changed()},e.prototype.setExtent=function(t){this.set(Ht,t)},e.prototype.setMaxResolution=function(t){this.set($t,t)},e.prototype.setMinResolution=function(t){this.set(Jt,t)},e.prototype.setMaxZoom=function(t){this.set(Qt,t)},e.prototype.setMinZoom=function(t){this.set(te,t)},e.prototype.setOpacity=function(t){(0,Q.h)("number"==typeof t,64),this.set(Vt,t)},e.prototype.setVisible=function(t){this.set(Kt,t)},e.prototype.setZIndex=function(t){this.set(qt,t)},e.prototype.disposeInternal=function(){this.state_&&(this.state_.layer=null,this.state_=null),t.prototype.disposeInternal.call(this)},e}(ht.Z),re="prerender",ae="postrender",se="precompose",le="postcompose",ce="rendercomplete";var ue=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),he=function(t){function e(e){var i=this,n=(0,X.f0)({},e);delete n.source,(i=t.call(this,n)||this).on,i.once,i.un,i.mapPrecomposeKey_=null,i.mapRenderKey_=null,i.sourceChangeKey_=null,i.renderer_=null,e.render&&(i.render=e.render),e.map&&i.setMap(e.map),i.addChangeListener(ee,i.handleSourcePropertyChange_);var o=e.source?e.source:null;return i.setSource(o),i}return ue(e,t),e.prototype.getLayersArray=function(t){var e=t||[];return e.push(this),e},e.prototype.getLayerStatesArray=function(t){var e=t||[];return e.push(this.getLayerState()),e},e.prototype.getSource=function(){return this.get(ee)||null},e.prototype.getSourceState=function(){var t=this.getSource();return t?t.getState():pt},e.prototype.handleSourceChange_=function(){this.changed()},e.prototype.handleSourcePropertyChange_=function(){this.sourceChangeKey_&&((0,F.bN)(this.sourceChangeKey_),this.sourceChangeKey_=null);var t=this.getSource();t&&(this.sourceChangeKey_=(0,F.oL)(t,r.Z.CHANGE,this.handleSourceChange_,this)),this.changed()},e.prototype.getFeatures=function(t){return this.renderer_?this.renderer_.getFeatures(t):new Promise((function(t){return t([])}))},e.prototype.render=function(t,e){var i=this.getRenderer();if(i.prepareFrame(t))return i.renderFrame(t,e)},e.prototype.setMapInternal=function(t){this.set(ie,t)},e.prototype.getMapInternal=function(){return this.get(ie)},e.prototype.setMap=function(t){this.mapPrecomposeKey_&&((0,F.bN)(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),t||this.changed(),this.mapRenderKey_&&((0,F.bN)(this.mapRenderKey_),this.mapRenderKey_=null),t&&(this.mapPrecomposeKey_=(0,F.oL)(t,se,(function(t){var e=t.frameState.layerStatesArray,i=this.getLayerState(!1);(0,Q.h)(!e.some((function(t){return t.layer===i.layer})),67),e.push(i)}),this),this.mapRenderKey_=(0,F.oL)(this,r.Z.CHANGE,t.render,t),this.changed())},e.prototype.setSource=function(t){this.set(ee,t)},e.prototype.getRenderer=function(){return this.renderer_||(this.renderer_=this.createRenderer()),this.renderer_},e.prototype.hasRenderer=function(){return!!this.renderer_},e.prototype.createRenderer=function(){return null},e.prototype.disposeInternal=function(){this.renderer_&&(this.renderer_.dispose(),delete this.renderer_),this.setSource(null),t.prototype.disposeInternal.call(this)},e}(oe);function pe(t,e){if(!t.visible)return!1;var i=e.resolution;if(i<t.minResolution||i>=t.maxResolution)return!1;var n=e.zoom;return n>t.minZoom&&n<=t.maxZoom}const de=he,fe="preload",ge="useInterimTilesOnError";var _e=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();const ye=function(t){function e(e){var i=this,n=e||{},o=(0,X.f0)({},n);return delete o.preload,delete o.useInterimTilesOnError,(i=t.call(this,o)||this).on,i.once,i.un,i.setPreload(void 0!==n.preload?n.preload:0),i.setUseInterimTilesOnError(void 0===n.useInterimTilesOnError||n.useInterimTilesOnError),i}return _e(e,t),e.prototype.getPreload=function(){return this.get(fe)},e.prototype.setPreload=function(t){this.set(fe,t)},e.prototype.getUseInterimTilesOnError=function(){return this.get(ge)},e.prototype.setUseInterimTilesOnError=function(t){this.set(ge,t)},e}(de);var ve=i("../../opt/drone/yarncache/ol-npm-6.12.0-aa56e5c786-a0eb5766bd.zip/node_modules/ol/Observable.js"),me=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),xe=function(t){function e(e){var i=t.call(this)||this;return i.boundHandleImageChange_=i.handleImageChange_.bind(i),i.layer_=e,i.declutterExecutorGroup=null,i}return me(e,t),e.prototype.getFeatures=function(t){return(0,p.O3)()},e.prototype.prepareFrame=function(t){return(0,p.O3)()},e.prototype.renderFrame=function(t,e){return(0,p.O3)()},e.prototype.loadedTileCallback=function(t,e,i){t[e]||(t[e]={}),t[e][i.tileCoord.toString()]=i},e.prototype.createLoadedTileFinder=function(t,e,i){return function(n,o){var r=this.loadedTileCallback.bind(this,i,n);return t.forEachLoadedTile(e,n,o,r)}.bind(this)},e.prototype.forEachFeatureAtCoordinate=function(t,e,i,n,o){},e.prototype.getDataAtPixel=function(t,e,i){return null},e.prototype.getLayer=function(){return this.layer_},e.prototype.handleFontsChanged=function(){},e.prototype.handleImageChange_=function(t){t.target.getState()===I&&this.renderIfReadyAndVisible()},e.prototype.loadImage=function(t){var e=t.getState();return e!=I&&e!=L&&t.addEventListener(r.Z.CHANGE,this.boundHandleImageChange_),e==R&&(t.load(),e=t.getState()),e==I},e.prototype.renderIfReadyAndVisible=function(){var t=this.getLayer();t.getVisible()&&t.getSourceState()==dt&&t.changed()},e}(ve.Z);const be=xe;var we=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();const Ce=function(t){function e(e,i,n,o){var r=t.call(this,e)||this;return r.inversePixelTransform=i,r.frameState=n,r.context=o,r}return we(e,t),e}(ut.ZP);var Se=i("../../opt/drone/yarncache/ol-npm-6.12.0-aa56e5c786-a0eb5766bd.zip/node_modules/ol/transform.js"),Ee=/^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i,Te=/^([a-z]*)$|^hsla?\(.*\)$/i;function Re(t){return"string"==typeof t?t:je(t)}function Oe(t){var e=document.createElement("div");if(e.style.color=t,""!==e.style.color){document.body.appendChild(e);var i=getComputedStyle(e).color;return document.body.removeChild(e),i}return""}var Ie,Le,Pe=(Ie={},Le=0,function(t){var e;if(Ie.hasOwnProperty(t))e=Ie[t];else{if(Le>=1024){var i=0;for(var n in Ie)0==(3&i++)&&(delete Ie[n],--Le)}e=function(t){var e,i,n,o,r;if(Te.exec(t)&&(t=Oe(t)),Ee.exec(t)){var a=t.length-1,s=void 0;s=a<=4?1:2;var l=4===a||8===a;e=parseInt(t.substr(1+0*s,s),16),i=parseInt(t.substr(1+1*s,s),16),n=parseInt(t.substr(1+2*s,s),16),o=l?parseInt(t.substr(1+3*s,s),16):255,1==s&&(e=(e<<4)+e,i=(i<<4)+i,n=(n<<4)+n,l&&(o=(o<<4)+o)),r=[e,i,n,o/255]}else 0==t.indexOf("rgba(")?Ae(r=t.slice(5,-1).split(",").map(Number)):0==t.indexOf("rgb(")?((r=t.slice(4,-1).split(",").map(Number)).push(1),Ae(r)):(0,Q.h)(!1,14);return r}(t),Ie[t]=e,++Le}return e});function Fe(t){return Array.isArray(t)?t:Pe(t)}function Ae(t){return t[0]=(0,N.uZ)(t[0]+.5|0,0,255),t[1]=(0,N.uZ)(t[1]+.5|0,0,255),t[2]=(0,N.uZ)(t[2]+.5|0,0,255),t[3]=(0,N.uZ)(t[3],0,1),t}function je(t){var e=t[0];e!=(0|e)&&(e=e+.5|0);var i=t[1];i!=(0|i)&&(i=i+.5|0);var n=t[2];return n!=(0|n)&&(n=n+.5|0),"rgba("+e+","+i+","+n+","+(void 0===t[3]?1:Math.round(100*t[3])/100)+")"}var Me=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();const ke=function(t){function e(e){var i=t.call(this,e)||this;return i.container=null,i.renderedResolution,i.tempTransform=(0,Se.Ue)(),i.pixelTransform=(0,Se.Ue)(),i.inversePixelTransform=(0,Se.Ue)(),i.context=null,i.containerReused=!1,i.pixelContext_=null,i}return Me(e,t),e.prototype.getBackground=function(t){var e=this.getLayer().getBackground();return"function"==typeof e&&(e=e(t.viewState.resolution)),e||void 0},e.prototype.useContainer=function(t,e,i,n){var o,r,a=this.getLayer().getClassName();t&&t.className===a&&""===t.style.opacity&&1===i&&(!n||t.style.backgroundColor&&(0,wt.fS)(Fe(t.style.backgroundColor),Fe(n)))&&((l=t.firstElementChild)instanceof HTMLCanvasElement&&(r=l.getContext("2d")));if(r&&r.canvas.style.transform===e?(this.container=t,this.context=r,this.containerReused=!0):this.containerReused&&(this.container=null,this.context=null,this.containerReused=!1),!this.container){(o=document.createElement("div")).className=a;var s=o.style;s.position="absolute",s.width="100%",s.height="100%",n&&(s.backgroundColor=n);var l=(r=w()).canvas;o.appendChild(l),(s=l.style).position="absolute",s.left="0",s.transformOrigin="top left",this.container=o,this.context=r}},e.prototype.clipUnrotated=function(t,e,i){var n=(0,P.rL)(i),o=(0,P.Xv)(i),r=(0,P.w$)(i),a=(0,P.hC)(i);(0,Se.nn)(e.coordinateToPixelTransform,n),(0,Se.nn)(e.coordinateToPixelTransform,o),(0,Se.nn)(e.coordinateToPixelTransform,r),(0,Se.nn)(e.coordinateToPixelTransform,a);var s=this.inversePixelTransform;(0,Se.nn)(s,n),(0,Se.nn)(s,o),(0,Se.nn)(s,r),(0,Se.nn)(s,a),t.save(),t.beginPath(),t.moveTo(Math.round(n[0]),Math.round(n[1])),t.lineTo(Math.round(o[0]),Math.round(o[1])),t.lineTo(Math.round(r[0]),Math.round(r[1])),t.lineTo(Math.round(a[0]),Math.round(a[1])),t.clip()},e.prototype.dispatchRenderEvent_=function(t,e,i){var n=this.getLayer();if(n.hasListener(t)){var o=new Ce(t,this.inversePixelTransform,i,e);n.dispatchEvent(o)}},e.prototype.preRender=function(t,e){this.dispatchRenderEvent_(re,t,e)},e.prototype.postRender=function(t,e){this.dispatchRenderEvent_(ae,t,e)},e.prototype.getRenderTransform=function(t,e,i,n,o,r,a){var s=o/2,l=r/2,c=n/e,u=-c,h=-t[0]+a,p=-t[1];return(0,Se.qC)(this.tempTransform,s,l,c,u,-i,h,p)},e.prototype.getDataAtPixel=function(t,e,i){var n=(0,Se.nn)(this.inversePixelTransform,t.slice()),o=this.context,r=this.getLayer().getExtent();if(r){var a=(0,Se.nn)(e.pixelToCoordinateTransform,t.slice());if(!(0,P.b8)(r,a))return null}var s,l=Math.round(n[0]),c=Math.round(n[1]),u=this.pixelContext_;if(!u){var h=document.createElement("canvas");h.width=1,h.height=1,u=h.getContext("2d"),this.pixelContext_=u}u.clearRect(0,0,1,1);try{u.drawImage(o.canvas,l,c,1,1,0,0,1,1),s=u.getImageData(0,0,1,1).data}catch(t){return"SecurityError"===t.name?(this.pixelContext_=null,new Uint8Array):s}return 0===s[3]?null:s},e}(be);var De="ol-hidden",ze="ol-unselectable",Ne="ol-control",Be="ol-collapsed",Ge=new RegExp(["^\\s*(?=(?:(?:[-a-z]+\\s*){0,2}(italic|oblique))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(small-caps))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(bold(?:er)?|lighter|[1-9]00 ))?)","(?:(?:normal|\\1|\\2|\\3)\\s*){0,3}((?:xx?-)?","(?:small|large)|medium|smaller|larger|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx]))","(?:\\s*\\/\\s*(normal|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx])?))","?\\s*([-,\\\"\\'\\sa-z]+?)\\s*$"].join(""),"i"),Ze=["style","variant","weight","size","lineHeight","family"],We=function(t){var e=t.match(Ge);if(!e)return null;for(var i={lineHeight:"normal",size:"1.2em",style:"normal",weight:"normal",variant:"normal"},n=0,o=Ze.length;n<o;++n){var r=e[n+1];void 0!==r&&(i[Ze[n]]=r)}return i.families=i.family.split(/,\s?/),i};function Ue(t){return 1===t?"":String(Math.round(100*t)/100)}var Xe=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Ye=function(t){function e(e){var i=t.call(this,e)||this;return i.extentChanged=!0,i.renderedExtent_=null,i.renderedPixelRatio,i.renderedProjection=null,i.renderedRevision,i.renderedTiles=[],i.newTiles_=!1,i.tmpExtent=(0,P.lJ)(),i.tmpTileRange_=new xt(0,0,0,0),i}return Xe(e,t),e.prototype.isDrawableTile=function(t){var e=this.getLayer(),i=t.getState(),n=e.getUseInterimTilesOnError();return i==c||i==h||i==u&&!n},e.prototype.getTile=function(t,e,i,n){var o=n.pixelRatio,r=n.viewState.projection,a=this.getLayer(),s=a.getSource().getTile(t,e,i,o,r);return s.getState()==u&&(a.getUseInterimTilesOnError()?a.getPreload()>0&&(this.newTiles_=!0):s.setState(c)),this.isDrawableTile(s)||(s=s.getInterimTile()),s},e.prototype.loadedTileCallback=function(e,i,n){return!!this.isDrawableTile(n)&&t.prototype.loadedTileCallback.call(this,e,i,n)},e.prototype.prepareFrame=function(t){return!!this.getLayer().getSource()},e.prototype.renderFrame=function(t,e){var i=t.layerStatesArray[t.layerIndex],n=t.viewState,o=n.projection,r=n.resolution,a=n.center,s=n.rotation,l=t.pixelRatio,u=this.getLayer(),h=u.getSource(),d=h.getRevision(),f=h.getTileGridForProjection(o),g=f.getZForResolution(r,h.zDirection),_=f.getResolution(g),y=t.extent,v=i.extent&&(0,z.dY)(i.extent,o);v&&(y=(0,P.Ed)(y,(0,z.dY)(i.extent,o)));var m=h.getTilePixelRatio(l),x=Math.round(t.size[0]*m),b=Math.round(t.size[1]*m);if(s){var w=Math.round(Math.sqrt(x*x+b*b));x=w,b=w}var C=_*x/2/m,S=_*b/2/m,E=[a[0]-C,a[1]-S,a[0]+C,a[1]+S],T=f.getTileRangeForExtentAndZ(y,g),R={};R[g]={};var O=this.createLoadedTileFinder(h,o,R),I=this.tmpExtent,L=this.tmpTileRange_;this.newTiles_=!1;for(var F=T.minX;F<=T.maxX;++F)for(var A=T.minY;A<=T.maxY;++A){var j=this.getTile(g,F,A,t);if(this.isDrawableTile(j)){var M=(0,p.sq)(this);if(j.getState()==c){R[g][j.tileCoord.toString()]=j;var k=j.inTransition(M);this.newTiles_||!k&&-1!==this.renderedTiles.indexOf(j)||(this.newTiles_=!0)}if(1===j.getAlpha(M,t.time))continue}var D=f.getTileCoordChildTileRange(j.tileCoord,L,I),N=!1;D&&(N=O(g+1,D)),N||f.forEachTileCoordParentTileRange(j.tileCoord,O,L,I)}var B=_/r;(0,Se.qC)(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/m,1/m,s,-x/2,-b/2);var G=(0,Se.BB)(this.pixelTransform);this.useContainer(e,G,i.opacity,this.getBackground(t));var Z=this.context,Y=Z.canvas;(0,Se.nb)(this.inversePixelTransform,this.pixelTransform),(0,Se.qC)(this.tempTransform,x/2,b/2,B,B,0,-x/2,-b/2),Y.width!=x||Y.height!=b?(Y.width=x,Y.height=b):this.containerReused||Z.clearRect(0,0,x,b),v&&this.clipUnrotated(Z,t,v),h.getInterpolate()||(0,X.f0)(Z,W),this.preRender(Z,t),this.renderedTiles.length=0;var V,K,H,q=Object.keys(R).map(Number);q.sort(wt.kK),1!==i.opacity||this.containerReused&&!h.getOpaque(t.viewState.projection)?(V=[],K=[]):q=q.reverse();for(var $=q.length-1;$>=0;--$){var J=q[$],Q=h.getTilePixelSize(J,l,o),tt=f.getResolution(J)/_,et=Q[0]*tt*B,it=Q[1]*tt*B,nt=f.getTileCoordForCoordAndZ((0,P.rL)(E),J),ot=f.getTileCoordExtent(nt),rt=(0,Se.nn)(this.tempTransform,[m*(ot[0]-E[0])/_,m*(E[3]-ot[3])/_]),at=m*h.getGutterForProjection(o),st=R[J];for(var lt in st){var ct=(j=st[lt]).tileCoord,ut=nt[1]-ct[1],ht=Math.round(rt[0]-(ut-1)*et),pt=nt[2]-ct[2],dt=Math.round(rt[1]-(pt-1)*it),ft=ht-(F=Math.round(rt[0]-ut*et)),gt=dt-(A=Math.round(rt[1]-pt*it)),_t=g===J;if(!(k=_t&&1!==j.getAlpha((0,p.sq)(this),t.time)))if(V){Z.save(),H=[F,A,F+ft,A,F+ft,A+gt,F,A+gt];for(var yt=0,vt=V.length;yt<vt;++yt)if(g!==J&&J<K[yt]){var mt=V[yt];Z.beginPath(),Z.moveTo(H[0],H[1]),Z.lineTo(H[2],H[3]),Z.lineTo(H[4],H[5]),Z.lineTo(H[6],H[7]),Z.moveTo(mt[6],mt[7]),Z.lineTo(mt[4],mt[5]),Z.lineTo(mt[2],mt[3]),Z.lineTo(mt[0],mt[1]),Z.clip()}V.push(H),K.push(J)}else Z.clearRect(F,A,ft,gt);this.drawTileImage(j,t,F,A,ft,gt,at,_t),V&&!k?(Z.restore(),this.renderedTiles.unshift(j)):this.renderedTiles.push(j),this.updateUsedTiles(t.usedTiles,h,j)}}this.renderedRevision=d,this.renderedResolution=_,this.extentChanged=!this.renderedExtent_||!(0,P.fS)(this.renderedExtent_,E),this.renderedExtent_=E,this.renderedPixelRatio=l,this.renderedProjection=o,this.manageTilePyramid(t,h,f,l,o,y,g,u.getPreload()),this.scheduleExpireCache(t,h),this.postRender(Z,t),i.extent&&Z.restore(),(0,X.f0)(Z,U),G!==Y.style.transform&&(Y.style.transform=G);var xt=Ue(i.opacity),bt=this.container;return xt!==bt.style.opacity&&(bt.style.opacity=xt),this.container},e.prototype.drawTileImage=function(t,e,i,n,o,r,a,s){var l=this.getTileImage(t);if(l){var c=(0,p.sq)(this),u=s?t.getAlpha(c,e.time):1,h=u!==this.context.globalAlpha;h&&(this.context.save(),this.context.globalAlpha=u),this.context.drawImage(l,a,a,l.width-2*a,l.height-2*a,i,n,o,r),h&&this.context.restore(),1!==u?e.animate=!0:s&&t.endTransition(c)}},e.prototype.getImage=function(){var t=this.context;return t?t.canvas:null},e.prototype.getTileImage=function(t){return t.getImage()},e.prototype.scheduleExpireCache=function(t,e){if(e.canExpireCache()){var i=function(t,e,i){var n=(0,p.sq)(t);n in i.usedTiles&&t.expireCache(i.viewState.projection,i.usedTiles[n])}.bind(null,e);t.postRenderFunctions.push(i)}},e.prototype.updateUsedTiles=function(t,e,i){var n=(0,p.sq)(e);n in t||(t[n]={}),t[n][i.getKey()]=!0},e.prototype.manageTilePyramid=function(t,e,i,n,o,r,a,l,c){var u=(0,p.sq)(e);u in t.wantedTiles||(t.wantedTiles[u]={});var h,d,f,g,_,y,v=t.wantedTiles[u],m=t.tileQueue,x=0;for(y=i.getMinZoom();y<=a;++y)for(d=i.getTileRangeForExtentAndZ(r,y,d),f=i.getResolution(y),g=d.minX;g<=d.maxX;++g)for(_=d.minY;_<=d.maxY;++_)a-y<=l?(++x,(h=e.getTile(y,g,_,n,o)).getState()==s&&(v[h.getKey()]=!0,m.isKeyQueued(h.getKey())||m.enqueue([h,u,i.getTileCoordCenter(h.tileCoord),f])),void 0!==c&&c(h)):e.useTile(y,g,_,o);e.updateCacheSize(x,o)},e}(ke);Ye.prototype.getLayer;const Ve=Ye;var Ke=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();const He=function(t){function e(e){return t.call(this,e)||this}return Ke(e,t),e.prototype.createRenderer=function(){return new Ve(this)},e}(ye);let qe;!function(t){t.Auto="auto",t.Light="light",t.Dark="dark"}(qe||(qe={}));const $e={theme:qe.Auto,showLabels:!0},Je={id:"carto",name:"CARTO reference map",isBaseMap:!0,defaultOptions:$e,create:async(t,e,i)=>({init:()=>{const t=Object.assign({},$e,e.config);let n=t.theme;return n&&n!==qe.Auto||(n=i.isDark?"dark":"light"),t.showLabels?n+="_all":n+="_nolabels",new He({source:new Yt({attributions:'<a href="https://carto.com/attribution/">© CARTO</a>',url:`https://{1-4}.basemaps.cartocdn.com/${n}/{z}/{x}/{y}.png`})})},registerOptionsUI:t=>{t.addRadio({path:"config.theme",name:"Theme",settings:{options:[{value:qe.Auto,label:"Auto",description:"Match grafana theme"},{value:qe.Light,label:"Light"},{value:qe.Dark,label:"Dark"}]},defaultValue:$e.theme}).addBooleanSwitch({path:"config.showLabels",name:"Show labels",description:"",defaultValue:$e.showLabels})}})},Qe=[Je];var ti=i("./public/app/core/config.ts");const ei="https://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer",ii={url:ei+"/tile/{z}/{y}/{x}",attribution:`Tiles © <a href="${ei}">ArcGIS</a>`},ni={id:"xyz",name:"XYZ Tile layer",isBaseMap:!0,create:async(t,e,i)=>({init:()=>{const t=Object.assign({},e.config);var i;t.url||(t.url=ii.url,t.attribution=null!==(i=t.attribution)&&void 0!==i?i:ii.attribution);return new He({source:new Yt({url:t.url,attributions:t.attribution}),minZoom:t.minZoom,maxZoom:t.maxZoom})},registerOptionsUI:t=>{t.addTextInput({path:"config.url",name:"URL template",description:"Must include {x}, {y} or {-y}, and {z} placeholders",settings:{placeholder:ii.url}}).addTextInput({path:"config.attribution",name:"Attribution",settings:{placeholder:ii.attribution}})}})},oi=[ni],ri="custom",ai="streets",si=new o.Registry((()=>[{id:ai,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:ri,name:"Custom MapServer",description:"Use a custom MapServer with pre-cached values",slug:""}])),li=[{id:"esri-xyz",name:"ArcGIS MapServer",isBaseMap:!0,create:async(t,e,i)=>{var n;const o=Object.assign({},e.config),r=si.getIfExists(null!==(n=o.server)&&void 0!==n?n:ai);if(r.id!==ri){const t="https://services.arcgisonline.com/ArcGIS/rest/services/";o.url=`${t}${r.slug}/MapServer/tile/{z}/{y}/{x}`,o.attribution=`Tiles © <a href="${t}${r.slug}/MapServer">ArcGIS</a>`}const a=Object.assign({},e,{config:o});return ni.create(t,a,i).then((t=>(t.registerOptionsUI=t=>{t.addSelect({path:"config.server",name:"Server instance",settings:{options:si.selectOptions().options}}).addTextInput({path:"config.url",name:"URL template",description:"Must include {x}, {y} or {-y}, and {z} placeholders",settings:{placeholder:ii.url},showIf:t=>{var e;return(null===(e=t.config)||void 0===e?void 0:e.server)===ri}}).addTextInput({path:"config.attribution",name:"Attribution",settings:{placeholder:ii.attribution},showIf:t=>{var e;return(null===(e=t.config)||void 0===e?void 0:e.server)===ri}})},t)))},defaultOptions:{server:ai}}];var ci=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();const ui=function(t){function e(e){var i,n=e||{},o=void 0===n.imageSmoothing||n.imageSmoothing;void 0!==n.interpolate&&(o=n.interpolate),i=void 0!==n.attributions?n.attributions:['&#169; <a href="https://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a> contributors.'];var r=void 0!==n.crossOrigin?n.crossOrigin:"anonymous",a=void 0!==n.url?n.url:"https://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png";return t.call(this,{attributions:i,attributionsCollapsible:!1,cacheSize:n.cacheSize,crossOrigin:r,interpolate:o,maxZoom:void 0!==n.maxZoom?n.maxZoom:19,opaque:void 0===n.opaque||n.opaque,reprojectionErrorThreshold:n.reprojectionErrorThreshold,tileLoadFunction:n.tileLoadFunction,transition:n.transition,url:a,wrapX:n.wrapX,zDirection:n.zDirection})||this}return ci(e,t),e}(Yt),hi=[...[{id:"osm-standard",name:"Open Street Map",isBaseMap:!0,create:async(t,e)=>({init:()=>new He({source:new ui})})}],...Qe,...li,...oi];var pi=i("./public/app/features/geo/utils/location.ts"),di=i("./public/app/features/dimensions/index.ts"),fi=i("../../opt/drone/yarncache/react-npm-17.0.2-99ba37d931-b254cc17ce.zip/node_modules/react/jsx-runtime.js");class gi extends n.Component{constructor(t){super(t),function(t,e,i){e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i}(this,"sub",void 0),this.state={subProps:t.initialSubProps}}componentDidMount(){this.sub=this.props.watch.subscribe({next:t=>{this.setState({subProps:t})},complete:()=>{},error:t=>{}})}componentWillUnmount(){this.sub&&this.sub.unsubscribe()}render(){const{subProps:t}=this.state;return(0,fi.jsx)(this.props.child,Object.assign({},t))}}var _i,yi=i("./packages/grafana-ui/src/index.ts"),vi=i("./.yarn/__virtual__/@emotion-css-virtual-72c314ddb1/3/opt/drone/yarncache/@emotion-css-npm-11.7.1-25ff8755a7-ac1f56656f.zip/node_modules/@emotion/css/dist/emotion-css.esm.js"),mi=i("./public/app/plugins/panel/state-timeline/utils.ts"),xi=i("./packages/grafana-data/src/field/scale.ts"),bi=i("./.yarn/__virtual__/react-inlinesvg-virtual-f6307798ef/3/opt/drone/yarncache/react-inlinesvg-npm-2.3.0-9b0402e461-ea43f6ec06.zip/node_modules/react-inlinesvg/esm/index.js");function wi(t){var e,i,n,r,a,s;const{layerName:l,styleConfig:c}=t,u=(0,yi.useTheme2)(),h=Ci(u);if(!c)return(0,fi.jsx)(fi.Fragment,{});const{color:p,opacity:d}=null!==(e=null==c?void 0:c.base)&&void 0!==e?e:{},f=null==c||null===(i=c.config.symbol)||void 0===i?void 0:i.fixed,g=null===(n=c.dims)||void 0===n||null===(r=n.color)||void 0===r?void 0:r.field;if(p&&f&&!g)return(0,fi.jsx)("div",{className:h.infoWrap,children:(0,fi.jsxs)("div",{className:h.fixedColorContainer,children:[(0,fi.jsx)(bi.Z,{src:`public/${f}`,className:h.legendSymbol,title:"Symbol",style:{fill:p,opacity:d}}),a||(a=(0,fi.jsx)("span",{children:l}))]})});if(!g)return(0,fi.jsx)(fi.Fragment,{});const _=t=>`${(0,o.formattedValueToString)(g.display(t))}`,y=(0,o.getFieldColorModeForField)(g);if(y.isContinuous&&y.getColors){const t=y.getColors(ti.vc.theme2),e=(0,xi.dz)(g);return(0,fi.jsxs)(fi.Fragment,{children:[(0,fi.jsx)(yi.Label,{children:null==g?void 0:g.name}),(0,fi.jsxs)("div",{className:h.gradientContainer,style:{backgroundImage:`linear-gradient(to right, ${t.map((t=>t)).join(", ")}`},children:[(0,fi.jsx)("div",{style:{color:u.colors.getContrastText(t[0])},children:_(e.min)}),(0,fi.jsx)("div",{style:{color:u.colors.getContrastText(t[t.length-1])},children:_(e.max)})]})]})}const v=null==g||null===(s=g.config)||void 0===s?void 0:s.thresholds;if(!v||v.steps.length<2)return _i||(_i=(0,fi.jsx)("div",{}));const m=(0,mi.Ur)(g.config,ti.vc.theme2);return(0,fi.jsx)("div",{className:h.infoWrap,children:(0,fi.jsx)("div",{className:h.legend,children:m.map(((t,e)=>(0,fi.jsxs)("div",{className:h.legendItem,children:[(0,fi.jsx)("i",{style:{background:t.color}}),t.label]},`${e}/${t.label}`)))})})}const Ci=(0,yi.stylesFactory)((t=>({infoWrap:vi.css`
    background: ${t.colors.background.secondary};
    border-radius: 2px;
    padding: ${t.spacing(1)};
  `,legend:vi.css`
    line-height: 18px;
    display: flex;
    flex-direction: column;
    font-size: ${t.typography.bodySmall.fontSize};

    i {
      width: 18px;
      height: 18px;
      float: left;
      margin-right: 8px;
      opacity: 0.7;
    }
  `,legendItem:vi.css`
    white-space: nowrap;
  `,fixedColorContainer:vi.css`
    min-width: 80px;
    font-size: ${t.typography.bodySmall.fontSize};
  `,legendSymbol:vi.css`
    height: 10px;
    width: 10px;
    margin: auto;
    margin-right: 4px;
  `,gradientContainer:vi.css`
    min-width: 200px;
    display: flex;
    justify-content: space-between;
    font-size: ${t.typography.bodySmall.fontSize};
    padding: ${t.spacing(0,.5)};
  `})));var Si=i("../../opt/drone/yarncache/rxjs-npm-7.5.1-ce59cbb6a3-78e3eecb16.zip/node_modules/rxjs/dist/esm5/internal/ReplaySubject.js");let Ei;!function(t){t.Point="point",t.Line="line",t.Polygon="polygon",t.Any="*any*"}(Ei||(Ei={}));let Ti,Ri;!function(t){t.Left="left",t.Center="center",t.Right="right"}(Ti||(Ti={})),function(t){t.Top="top",t.Middle="middle",t.Bottom="bottom"}(Ri||(Ri={}));const Oi=Object.freeze({size:{fixed:5,min:2,max:15},color:{fixed:"dark-green"},opacity:.4,symbol:{mode:di.Q8.Fixed,fixed:"img/icons/marker/circle.svg"},textConfig:{fontSize:12,textAlign:Ti.Center,textBaseline:Ri.Middle,offsetX:0,offsetY:0},rotation:{fixed:0,mode:di.eK.Mod,min:-360,max:360}});var Ii=i("./.yarn/__virtual__/react-use-virtual-00326e70ba/3/opt/drone/yarncache/react-use-npm-17.3.2-a032cbeb01-7379460f51.zip/node_modules/react-use/esm/useObservable.js"),Li=i("../../opt/drone/yarncache/lodash-npm-4.17.21-6382451519-eb835a2e51.zip/node_modules/lodash/lodash.js"),Pi=i("./public/app/features/dimensions/editors/index.ts"),Fi=i("./public/app/features/dimensions/types.ts"),Ai=i("./packages/grafana-runtime/src/index.ts");const ji=function(){function t(t){var e=t||{};this.color_=void 0!==e.color?e.color:null}return t.prototype.clone=function(){var e=this.getColor();return new t({color:Array.isArray(e)?e.slice():e||void 0})},t.prototype.getColor=function(){return this.color_},t.prototype.setColor=function(t){this.color_=t},t}(),Mi="point",ki="line";var Di=function(){function t(t){var e=t||{};this.font_=e.font,this.rotation_=e.rotation,this.rotateWithView_=e.rotateWithView,this.scale_=e.scale,this.scaleArray_=St(void 0!==e.scale?e.scale:1),this.text_=e.text,this.textAlign_=e.textAlign,this.textBaseline_=e.textBaseline,this.fill_=void 0!==e.fill?e.fill:new ji({color:"#333"}),this.maxAngle_=void 0!==e.maxAngle?e.maxAngle:Math.PI/4,this.placement_=void 0!==e.placement?e.placement:Mi,this.overflow_=!!e.overflow,this.stroke_=void 0!==e.stroke?e.stroke:null,this.offsetX_=void 0!==e.offsetX?e.offsetX:0,this.offsetY_=void 0!==e.offsetY?e.offsetY:0,this.backgroundFill_=e.backgroundFill?e.backgroundFill:null,this.backgroundStroke_=e.backgroundStroke?e.backgroundStroke:null,this.padding_=void 0===e.padding?null:e.padding}return t.prototype.clone=function(){var e=this.getScale();return new t({font:this.getFont(),placement:this.getPlacement(),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(),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()})},t.prototype.getOverflow=function(){return this.overflow_},t.prototype.getFont=function(){return this.font_},t.prototype.getMaxAngle=function(){return this.maxAngle_},t.prototype.getPlacement=function(){return this.placement_},t.prototype.getOffsetX=function(){return this.offsetX_},t.prototype.getOffsetY=function(){return this.offsetY_},t.prototype.getFill=function(){return this.fill_},t.prototype.getRotateWithView=function(){return this.rotateWithView_},t.prototype.getRotation=function(){return this.rotation_},t.prototype.getScale=function(){return this.scale_},t.prototype.getScaleArray=function(){return this.scaleArray_},t.prototype.getStroke=function(){return this.stroke_},t.prototype.getText=function(){return this.text_},t.prototype.getTextAlign=function(){return this.textAlign_},t.prototype.getTextBaseline=function(){return this.textBaseline_},t.prototype.getBackgroundFill=function(){return this.backgroundFill_},t.prototype.getBackgroundStroke=function(){return this.backgroundStroke_},t.prototype.getPadding=function(){return this.padding_},t.prototype.setOverflow=function(t){this.overflow_=t},t.prototype.setFont=function(t){this.font_=t},t.prototype.setMaxAngle=function(t){this.maxAngle_=t},t.prototype.setOffsetX=function(t){this.offsetX_=t},t.prototype.setOffsetY=function(t){this.offsetY_=t},t.prototype.setPlacement=function(t){this.placement_=t},t.prototype.setRotateWithView=function(t){this.rotateWithView_=t},t.prototype.setFill=function(t){this.fill_=t},t.prototype.setRotation=function(t){this.rotation_=t},t.prototype.setScale=function(t){this.scale_=t,this.scaleArray_=St(void 0!==t?t:1)},t.prototype.setStroke=function(t){this.stroke_=t},t.prototype.setText=function(t){this.text_=t},t.prototype.setTextAlign=function(t){this.textAlign_=t},t.prototype.setTextBaseline=function(t){this.textBaseline_=t},t.prototype.setBackgroundFill=function(t){this.backgroundFill_=t},t.prototype.setBackgroundStroke=function(t){this.backgroundStroke_=t},t.prototype.setPadding=function(t){this.padding_=t},t}();const zi=Di;var Ni=function(){function t(t){this.opacity_=t.opacity,this.rotateWithView_=t.rotateWithView,this.rotation_=t.rotation,this.scale_=t.scale,this.scaleArray_=St(t.scale),this.displacement_=t.displacement}return t.prototype.clone=function(){var e=this.getScale();return new t({opacity:this.getOpacity(),scale:Array.isArray(e)?e.slice():e,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice()})},t.prototype.getOpacity=function(){return this.opacity_},t.prototype.getRotateWithView=function(){return this.rotateWithView_},t.prototype.getRotation=function(){return this.rotation_},t.prototype.getScale=function(){return this.scale_},t.prototype.getScaleArray=function(){return this.scaleArray_},t.prototype.getDisplacement=function(){return this.displacement_},t.prototype.getAnchor=function(){return(0,p.O3)()},t.prototype.getImage=function(t){return(0,p.O3)()},t.prototype.getHitDetectionImage=function(){return(0,p.O3)()},t.prototype.getPixelRatio=function(t){return 1},t.prototype.getImageState=function(){return(0,p.O3)()},t.prototype.getImageSize=function(){return(0,p.O3)()},t.prototype.getOrigin=function(){return(0,p.O3)()},t.prototype.getSize=function(){return(0,p.O3)()},t.prototype.setDisplacement=function(t){this.displacement_=t},t.prototype.setOpacity=function(t){this.opacity_=t},t.prototype.setRotateWithView=function(t){this.rotateWithView_=t},t.prototype.setRotation=function(t){this.rotation_=t},t.prototype.setScale=function(t){this.scale_=t,this.scaleArray_=St(t)},t.prototype.listenImageChange=function(t){(0,p.O3)()},t.prototype.load=function(){(0,p.O3)()},t.prototype.unlistenImageChange=function(t){(0,p.O3)()},t}();const Bi=Ni;function Gi(t){return Array.isArray(t)?je(t):t}var Zi="10px sans-serif",Wi="#000",Ui="round",Xi=[],Yi="round",Vi="#000",Ki="center",Hi="middle",qi=[0,0,0,0],$i=new ht.Z;(new a.Z).setSize=function(){console.warn("labelCache is deprecated.")};var Ji,Qi,tn=null,en={},nn=function(){var t,e,i="32px ",n=["monospace","serif"],o=n.length,r="wmytzilWMYTZIL@#/&?$%10";function a(t,a,s){for(var l=!0,c=0;c<o;++c){var u=n[c];if(e=an(t+" "+a+" "+i+u,r),s!=u){var h=an(t+" "+a+" "+i+s+","+u,r);l=l&&h!=e}}return!!l}function s(){for(var e=!0,i=$i.getKeys(),n=0,o=i.length;n<o;++n){var r=i[n];$i.get(r)<100&&(a.apply(this,r.split("\n"))?((0,X.ZH)(en),tn=null,Ji=void 0,$i.set(r,100)):($i.set(r,$i.get(r)+1,!0),e=!1))}e&&(clearInterval(t),t=void 0)}return function(e){var i=We(e);if(i)for(var n=i.families,o=0,r=n.length;o<r;++o){var l=n[o],c=i.style+"\n"+i.weight+"\n"+l;void 0===$i.get(c)&&($i.set(c,100,!0),a(i.style,i.weight,l)||($i.set(c,0,!0),void 0===t&&(t=setInterval(s,32))))}}}(),on=function(t){var e=en[t];if(null==e){if(b.Id){var i=We(t),n=rn(t,"Žg");e=(isNaN(Number(i.lineHeight))?1.2:Number(i.lineHeight))*(n.actualBoundingBoxAscent+n.actualBoundingBoxDescent)}else Qi||((Qi=document.createElement("div")).innerHTML="M",Qi.style.minHeight="0",Qi.style.maxHeight="none",Qi.style.height="auto",Qi.style.padding="0",Qi.style.border="none",Qi.style.position="absolute",Qi.style.display="block",Qi.style.left="-99999px"),Qi.style.font=t,document.body.appendChild(Qi),e=Qi.offsetHeight,document.body.removeChild(Qi);en[t]=e}return e};function rn(t,e){return tn||(tn=w(1,1)),t!=Ji&&(tn.font=t,Ji=tn.font),tn.measureText(e)}function an(t,e){return rn(t,e).width}function sn(t,e,i){if(e in i)return i[e];var n=an(t,e);return i[e]=n,n}function ln(t,e,i,n,o,r,a,s,l,c,u){t.save(),1!==i&&(t.globalAlpha*=i),e&&t.setTransform.apply(t,e),n.contextInstructions?(t.translate(l,c),t.scale(u[0],u[1]),function(t,e){for(var i=t.contextInstructions,n=0,o=i.length;n<o;n+=2)Array.isArray(i[n+1])?e[i[n]].apply(e,i[n+1]):e[i[n]]=i[n+1]}(n,t)):u[0]<0||u[1]<0?(t.translate(l,c),t.scale(u[0],u[1]),t.drawImage(n,o,r,a,s,0,0,a,s)):t.drawImage(n,o,r,a,s,l,c,a*u[0],s*u[1]),t.restore()}var cn=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),un=function(t){function e(e){var i=this,n=void 0!==e.rotateWithView&&e.rotateWithView;return(i=t.call(this,{opacity:1,rotateWithView:n,rotation:void 0!==e.rotation?e.rotation:0,scale:void 0!==e.scale?e.scale:1,displacement:void 0!==e.displacement?e.displacement:[0,0]})||this).canvas_=void 0,i.hitDetectionCanvas_=null,i.fill_=void 0!==e.fill?e.fill:null,i.origin_=[0,0],i.points_=e.points,i.radius_=void 0!==e.radius?e.radius:e.radius1,i.radius2_=e.radius2,i.angle_=void 0!==e.angle?e.angle:0,i.stroke_=void 0!==e.stroke?e.stroke:null,i.size_=null,i.renderOptions_=null,i.render(),i}return cn(e,t),e.prototype.clone=function(){var t=this.getScale(),i=new e({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(t)?t.slice():t,displacement:this.getDisplacement().slice()});return i.setOpacity(this.getOpacity()),i},e.prototype.getAnchor=function(){var t=this.size_;if(!t)return null;var e=this.getDisplacement();return[t[0]/2-e[0],t[1]/2+e[1]]},e.prototype.getAngle=function(){return this.angle_},e.prototype.getFill=function(){return this.fill_},e.prototype.getHitDetectionImage=function(){return this.hitDetectionCanvas_||this.createHitDetectionCanvas_(this.renderOptions_),this.hitDetectionCanvas_},e.prototype.getImage=function(t){var e=this.canvas_[t];if(!e){var i=this.renderOptions_,n=w(i.size*t,i.size*t);this.draw_(i,n,t),e=n.canvas,this.canvas_[t]=e}return e},e.prototype.getPixelRatio=function(t){return t},e.prototype.getImageSize=function(){return this.size_},e.prototype.getImageState=function(){return I},e.prototype.getOrigin=function(){return this.origin_},e.prototype.getPoints=function(){return this.points_},e.prototype.getRadius=function(){return this.radius_},e.prototype.getRadius2=function(){return this.radius2_},e.prototype.getSize=function(){return this.size_},e.prototype.getStroke=function(){return this.stroke_},e.prototype.listenImageChange=function(t){},e.prototype.load=function(){},e.prototype.unlistenImageChange=function(t){},e.prototype.calculateLineJoinSize_=function(t,e,i){if(0===e||this.points_===1/0||"bevel"!==t&&"miter"!==t)return e;var n=this.radius_,o=void 0===this.radius2_?n:this.radius2_;if(n<o){var r=n;n=o,o=r}var a=void 0===this.radius2_?this.points_:2*this.points_,s=2*Math.PI/a,l=o*Math.sin(s),c=n-Math.sqrt(o*o-l*l),u=Math.sqrt(l*l+c*c),h=u/l;if("miter"===t&&h<=i)return h*e;var p=e/2/h,d=e/2*(c/u),f=Math.sqrt((n+p)*(n+p)+d*d)-n;if(void 0===this.radius2_||"bevel"===t)return 2*f;var g=n*Math.sin(s),_=o-Math.sqrt(n*n-g*g),y=Math.sqrt(g*g+_*_)/g;if(y<=i){var v=y*e/2-o-n;return 2*Math.max(f,v)}return 2*f},e.prototype.createRenderOptions=function(){var t,e=Yi,i=0,n=null,o=0,r=0;this.stroke_&&(null===(t=this.stroke_.getColor())&&(t=Vi),t=Gi(t),void 0===(r=this.stroke_.getWidth())&&(r=1),n=this.stroke_.getLineDash(),o=this.stroke_.getLineDashOffset(),void 0===(e=this.stroke_.getLineJoin())&&(e=Yi),void 0===(i=this.stroke_.getMiterLimit())&&(i=10));var a=this.calculateLineJoinSize_(e,r,i),s=Math.max(this.radius_,this.radius2_||0);return{strokeStyle:t,strokeWidth:r,size:Math.ceil(2*s+a),lineDash:n,lineDashOffset:o,lineJoin:e,miterLimit:i}},e.prototype.render=function(){this.renderOptions_=this.createRenderOptions();var t=this.renderOptions_.size;this.canvas_={},this.size_=[t,t]},e.prototype.draw_=function(t,e,i){if(e.scale(i,i),e.translate(t.size/2,t.size/2),this.createPath_(e),this.fill_){var n=this.fill_.getColor();null===n&&(n=Wi),e.fillStyle=Gi(n),e.fill()}this.stroke_&&(e.strokeStyle=t.strokeStyle,e.lineWidth=t.strokeWidth,e.setLineDash&&t.lineDash&&(e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset),e.lineJoin=t.lineJoin,e.miterLimit=t.miterLimit,e.stroke())},e.prototype.createHitDetectionCanvas_=function(t){if(this.fill_){var e=this.fill_.getColor(),i=0;if("string"==typeof e&&(e=Fe(e)),null===e?i=1:Array.isArray(e)&&(i=4===e.length?e[3]:1),0===i){var n=w(t.size,t.size);this.hitDetectionCanvas_=n.canvas,this.drawHitDetectionCanvas_(t,n)}}this.hitDetectionCanvas_||(this.hitDetectionCanvas_=this.getImage(1))},e.prototype.createPath_=function(t){var e=this.points_,i=this.radius_;if(e===1/0)t.arc(0,0,i,0,2*Math.PI);else{var n=void 0===this.radius2_?i:this.radius2_;void 0!==this.radius2_&&(e*=2);for(var o=this.angle_-Math.PI/2,r=2*Math.PI/e,a=0;a<e;a++){var s=o+a*r,l=a%2==0?i:n;t.lineTo(l*Math.cos(s),l*Math.sin(s))}t.closePath()}},e.prototype.drawHitDetectionCanvas_=function(t,e){e.translate(t.size/2,t.size/2),this.createPath_(e),e.fillStyle=Wi,e.fill(),this.stroke_&&(e.strokeStyle=t.strokeStyle,e.lineWidth=t.strokeWidth,t.lineDash&&(e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset),e.lineJoin=t.lineJoin,e.miterLimit=t.miterLimit,e.stroke())},e}(Bi);const hn=un;var pn=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),dn=function(t){function e(e){var i=e||{};return t.call(this,{points:1/0,fill:i.fill,radius:i.radius,stroke:i.stroke,scale:void 0!==i.scale?i.scale:1,rotation:void 0!==i.rotation?i.rotation:0,rotateWithView:void 0!==i.rotateWithView&&i.rotateWithView,displacement:void 0!==i.displacement?i.displacement:[0,0]})||this}return pn(e,t),e.prototype.clone=function(){var t=this.getScale(),i=new e({fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,radius:this.getRadius(),scale:Array.isArray(t)?t.slice():t,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice()});return i.setOpacity(this.getOpacity()),i},e.prototype.setRadius=function(t){this.radius_=t,this.render()},e}(hn);const fn=dn;const gn=function(){function t(t){var e=t||{};this.color_=void 0!==e.color?e.color:null,this.lineCap_=e.lineCap,this.lineDash_=void 0!==e.lineDash?e.lineDash:null,this.lineDashOffset_=e.lineDashOffset,this.lineJoin_=e.lineJoin,this.miterLimit_=e.miterLimit,this.width_=e.width}return t.prototype.clone=function(){var e=this.getColor();return new t({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()})},t.prototype.getColor=function(){return this.color_},t.prototype.getLineCap=function(){return this.lineCap_},t.prototype.getLineDash=function(){return this.lineDash_},t.prototype.getLineDashOffset=function(){return this.lineDashOffset_},t.prototype.getLineJoin=function(){return this.lineJoin_},t.prototype.getMiterLimit=function(){return this.miterLimit_},t.prototype.getWidth=function(){return this.width_},t.prototype.setColor=function(t){this.color_=t},t.prototype.setLineCap=function(t){this.lineCap_=t},t.prototype.setLineDash=function(t){this.lineDash_=t},t.prototype.setLineDashOffset=function(t){this.lineDashOffset_=t},t.prototype.setLineJoin=function(t){this.lineJoin_=t},t.prototype.setMiterLimit=function(t){this.miterLimit_=t},t.prototype.setWidth=function(t){this.width_=t},t}();var _n=function(){function t(t){var e=t||{};this.geometry_=null,this.geometryFunction_=mn,void 0!==e.geometry&&this.setGeometry(e.geometry),this.fill_=void 0!==e.fill?e.fill:null,this.image_=void 0!==e.image?e.image:null,this.renderer_=void 0!==e.renderer?e.renderer:null,this.hitDetectionRenderer_=void 0!==e.hitDetectionRenderer?e.hitDetectionRenderer:null,this.stroke_=void 0!==e.stroke?e.stroke:null,this.text_=void 0!==e.text?e.text:null,this.zIndex_=e.zIndex}return t.prototype.clone=function(){var e=this.getGeometry();return e&&"object"==typeof e&&(e=e.clone()),new t({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()})},t.prototype.getRenderer=function(){return this.renderer_},t.prototype.setRenderer=function(t){this.renderer_=t},t.prototype.setHitDetectionRenderer=function(t){this.hitDetectionRenderer_=t},t.prototype.getHitDetectionRenderer=function(){return this.hitDetectionRenderer_},t.prototype.getGeometry=function(){return this.geometry_},t.prototype.getGeometryFunction=function(){return this.geometryFunction_},t.prototype.getFill=function(){return this.fill_},t.prototype.setFill=function(t){this.fill_=t},t.prototype.getImage=function(){return this.image_},t.prototype.setImage=function(t){this.image_=t},t.prototype.getStroke=function(){return this.stroke_},t.prototype.setStroke=function(t){this.stroke_=t},t.prototype.getText=function(){return this.text_},t.prototype.setText=function(t){this.text_=t},t.prototype.getZIndex=function(){return this.zIndex_},t.prototype.setGeometry=function(t){"function"==typeof t?this.geometryFunction_=t:"string"==typeof t?this.geometryFunction_=function(e){return e.get(t)}:t?void 0!==t&&(this.geometryFunction_=function(){return t}):this.geometryFunction_=mn,this.geometry_=t},t.prototype.setZIndex=function(t){this.zIndex_=t},t}();var yn=null;function vn(t,e){if(!yn){var i=new ji({color:"rgba(255,255,255,0.4)"}),n=new gn({color:"#3399CC",width:1.25});yn=[new _n({image:new fn({fill:i,stroke:n,radius:5}),fill:i,stroke:n})]}return yn}function mn(t){return t.getGeometry()}const xn=_n,bn="fraction",wn="pixels",Cn="bottom-left",Sn="bottom-right",En="top-left",Tn="top-right";var Rn=function(){function t(){this.cache_={},this.cacheSize_=0,this.maxCacheSize_=32}return t.prototype.clear=function(){this.cache_={},this.cacheSize_=0},t.prototype.canExpireCache=function(){return this.cacheSize_>this.maxCacheSize_},t.prototype.expire=function(){if(this.canExpireCache()){var t=0;for(var e in this.cache_){var i=this.cache_[e];0!=(3&t++)||i.hasListener()||(delete this.cache_[e],--this.cacheSize_)}}},t.prototype.get=function(t,e,i){var n=On(t,e,i);return n in this.cache_?this.cache_[n]:null},t.prototype.set=function(t,e,i,n){var o=On(t,e,i);this.cache_[o]=n,++this.cacheSize_},t.prototype.setSize=function(t){this.maxCacheSize_=t,this.expire()},t}();function On(t,e,i){return e+":"+t+":"+(i?Re(i):"null")}var In=new Rn,Ln=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Pn=null,Fn=function(t){function e(e,i,n,o,r,a){var s=t.call(this)||this;return s.hitDetectionImage_=null,s.image_=e||new Image,null!==o&&(s.image_.crossOrigin=o),s.canvas_={},s.color_=a,s.unlisten_=null,s.imageState_=r,s.size_=n,s.src_=i,s.tainted_,s}return Ln(e,t),e.prototype.isTainted_=function(){if(void 0===this.tainted_&&this.imageState_===I){Pn||(Pn=w(1,1)),Pn.drawImage(this.image_,0,0);try{Pn.getImageData(0,0,1,1),this.tainted_=!1}catch(t){Pn=null,this.tainted_=!0}}return!0===this.tainted_},e.prototype.dispatchChangeEvent_=function(){this.dispatchEvent(r.Z.CHANGE)},e.prototype.handleImageError_=function(){this.imageState_=L,this.unlistenImage_(),this.dispatchChangeEvent_()},e.prototype.handleImageLoad_=function(){this.imageState_=I,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_()},e.prototype.getImage=function(t){return this.replaceColor_(t),this.canvas_[t]?this.canvas_[t]:this.image_},e.prototype.getPixelRatio=function(t){return this.replaceColor_(t),this.canvas_[t]?t:1},e.prototype.getImageState=function(){return this.imageState_},e.prototype.getHitDetectionImage=function(){if(!this.hitDetectionImage_)if(this.isTainted_()){var t=this.size_[0],e=this.size_[1],i=w(t,e);i.fillRect(0,0,t,e),this.hitDetectionImage_=i.canvas}else this.hitDetectionImage_=this.image_;return this.hitDetectionImage_},e.prototype.getSize=function(){return this.size_},e.prototype.getSrc=function(){return this.src_},e.prototype.load=function(){if(this.imageState_==R){this.imageState_=O;try{this.image_.src=this.src_}catch(t){this.handleImageError_()}this.unlisten_=j(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this))}},e.prototype.replaceColor_=function(t){if(this.color_&&!this.canvas_[t]&&this.imageState_===I){var e=document.createElement("canvas");this.canvas_[t]=e,e.width=Math.ceil(this.image_.width*t),e.height=Math.ceil(this.image_.height*t);var i=e.getContext("2d");if(i.scale(t,t),i.drawImage(this.image_,0,0),i.globalCompositeOperation="multiply","multiply"===i.globalCompositeOperation||this.isTainted_())i.fillStyle=Re(this.color_),i.fillRect(0,0,e.width/t,e.height/t),i.globalCompositeOperation="destination-in",i.drawImage(this.image_,0,0);else{for(var n=i.getImageData(0,0,e.width,e.height),o=n.data,r=this.color_[0]/255,a=this.color_[1]/255,s=this.color_[2]/255,l=this.color_[3],c=0,u=o.length;c<u;c+=4)o[c]*=r,o[c+1]*=a,o[c+2]*=s,o[c+3]*=l;i.putImageData(n,0,0)}}},e.prototype.unlistenImage_=function(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)},e}(a.Z);var An=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),jn=function(t){function e(e){var i=this,n=e||{},o=void 0!==n.opacity?n.opacity:1,r=void 0!==n.rotation?n.rotation:0,a=void 0!==n.scale?n.scale:1,s=void 0!==n.rotateWithView&&n.rotateWithView;(i=t.call(this,{opacity:o,rotation:r,scale:a,displacement:void 0!==n.displacement?n.displacement:[0,0],rotateWithView:s})||this).anchor_=void 0!==n.anchor?n.anchor:[.5,.5],i.normalizedAnchor_=null,i.anchorOrigin_=void 0!==n.anchorOrigin?n.anchorOrigin:En,i.anchorXUnits_=void 0!==n.anchorXUnits?n.anchorXUnits:bn,i.anchorYUnits_=void 0!==n.anchorYUnits?n.anchorYUnits:bn,i.crossOrigin_=void 0!==n.crossOrigin?n.crossOrigin:null;var l=void 0!==n.img?n.img:null,c=void 0!==n.imgSize?n.imgSize:null,u=n.src;(0,Q.h)(!(void 0!==u&&l),4),(0,Q.h)(!l||l&&c,5),void 0!==u&&0!==u.length||!l||(u=l.src||(0,p.sq)(l)),(0,Q.h)(void 0!==u&&u.length>0,6);var h=void 0!==n.src?R:I;return i.color_=void 0!==n.color?Fe(n.color):null,i.iconImage_=function(t,e,i,n,o,r){var a=In.get(e,n,r);return a||(a=new Fn(t,e,i,n,o,r),In.set(e,n,r,a)),a}(l,u,c,i.crossOrigin_,h,i.color_),i.offset_=void 0!==n.offset?n.offset:[0,0],i.offsetOrigin_=void 0!==n.offsetOrigin?n.offsetOrigin:En,i.origin_=null,i.size_=void 0!==n.size?n.size:null,i}return An(e,t),e.prototype.clone=function(){var t=this.getScale();return new e({anchor:this.anchor_.slice(),anchorOrigin:this.anchorOrigin_,anchorXUnits:this.anchorXUnits_,anchorYUnits:this.anchorYUnits_,crossOrigin:this.crossOrigin_,color:this.color_&&this.color_.slice?this.color_.slice():this.color_||void 0,src:this.getSrc(),offset:this.offset_.slice(),offsetOrigin:this.offsetOrigin_,size:null!==this.size_?this.size_.slice():void 0,opacity:this.getOpacity(),scale:Array.isArray(t)?t.slice():t,rotation:this.getRotation(),rotateWithView:this.getRotateWithView()})},e.prototype.getAnchor=function(){var t=this.normalizedAnchor_;if(!t){t=this.anchor_;var e=this.getSize();if(this.anchorXUnits_==bn||this.anchorYUnits_==bn){if(!e)return null;t=this.anchor_.slice(),this.anchorXUnits_==bn&&(t[0]*=e[0]),this.anchorYUnits_==bn&&(t[1]*=e[1])}if(this.anchorOrigin_!=En){if(!e)return null;t===this.anchor_&&(t=this.anchor_.slice()),this.anchorOrigin_!=Tn&&this.anchorOrigin_!=Sn||(t[0]=-t[0]+e[0]),this.anchorOrigin_!=Cn&&this.anchorOrigin_!=Sn||(t[1]=-t[1]+e[1])}this.normalizedAnchor_=t}var i=this.getDisplacement();return[t[0]-i[0],t[1]+i[1]]},e.prototype.setAnchor=function(t){this.anchor_=t,this.normalizedAnchor_=null},e.prototype.getColor=function(){return this.color_},e.prototype.getImage=function(t){return this.iconImage_.getImage(t)},e.prototype.getPixelRatio=function(t){return this.iconImage_.getPixelRatio(t)},e.prototype.getImageSize=function(){return this.iconImage_.getSize()},e.prototype.getImageState=function(){return this.iconImage_.getImageState()},e.prototype.getHitDetectionImage=function(){return this.iconImage_.getHitDetectionImage()},e.prototype.getOrigin=function(){if(this.origin_)return this.origin_;var t=this.offset_;if(this.offsetOrigin_!=En){var e=this.getSize(),i=this.iconImage_.getSize();if(!e||!i)return null;t=t.slice(),this.offsetOrigin_!=Tn&&this.offsetOrigin_!=Sn||(t[0]=i[0]-e[0]-t[0]),this.offsetOrigin_!=Cn&&this.offsetOrigin_!=Sn||(t[1]=i[1]-e[1]-t[1])}return this.origin_=t,this.origin_},e.prototype.getSrc=function(){return this.iconImage_.getSrc()},e.prototype.getSize=function(){return this.size_?this.size_:this.iconImage_.getSize()},e.prototype.listenImageChange=function(t){this.iconImage_.addEventListener(r.Z.CHANGE,t)},e.prototype.load=function(){this.iconImage_.load()},e.prototype.unlistenImageChange=function(t){this.iconImage_.removeEventListener(r.Z.CHANGE,t)},e}(Bi);const Mn=jn;var kn,Dn=i("../../opt/drone/yarncache/tinycolor2-npm-1.4.2-462ba30c26-57ed262e08.zip/node_modules/tinycolor2/tinycolor.js"),zn=i.n(Dn);!function(t){t.circle="circle",t.square="square",t.triangle="triangle",t.star="star",t.cross="cross",t.x="x"}(kn||(kn={}));const Nn="img/icons/marker/circle.svg",Bn="img/icons/marker/square.svg",Gn="img/icons/marker/triangle.svg",Zn="img/icons/marker/star.svg",Wn="img/icons/marker/cross.svg",Un="img/icons/marker/x-mark.svg";function Xn(t){const e=null==t.opacity?.8:t.opacity;if(1===e)return new ji({color:t.color});if(e>0){const i=zn()(t.color).setAlpha(e).toRgbString();return new ji({color:i})}}const Yn=t=>{var e;if(!t.text)return;const i=Ai.config.theme2.typography.fontFamily,n=Object.assign({},Oi.textConfig,t.textConfig);return new zi(Object.assign({text:t.text,fill:new ji({color:null!==(e=t.color)&&void 0!==e?e:Oi.color.fixed}),font:`normal ${n.fontSize}px ${i}`},n))},Vn=t=>new xn({text:Yn(t)}),Kn=t=>{var e,i;const n=new gn({color:t.color,width:null!==(e=t.lineWidth)&&void 0!==e?e:1});return new xn({image:new fn({stroke:n,fill:Xn(t),radius:null!==(i=t.size)&&void 0!==i?i:5}),text:Yn(t),stroke:n})},Hn=t=>{var e;return new xn({fill:Xn(t),stroke:new gn({color:t.color,width:null!==(e=t.lineWidth)&&void 0!==e?e:1}),text:Yn(t)})},qn=t=>{var e;const i=null!==(e=t.size)&&void 0!==e?e:5,n=new gn({color:"#F00",width:1});return[new xn({image:new hn({stroke:n,points:4,radius:i,angle:Math.PI/4})}),new xn({image:new hn({stroke:n,points:4,radius:i,radius2:0,angle:0})})]},$n=[{id:kn.circle,name:"Circle",aliasIds:[Nn],make:Kn},{id:kn.square,name:"Square",aliasIds:[Bn],make:t=>{var e,i,n;const o=null!==(e=t.size)&&void 0!==e?e:5,r=null!==(i=t.rotation)&&void 0!==i?i:0;return new xn({image:new hn({stroke:new gn({color:t.color,width:null!==(n=t.lineWidth)&&void 0!==n?n:1}),fill:Xn(t),points:4,radius:o,rotation:r*Math.PI/180+Math.PI/4}),text:Yn(t)})}},{id:kn.triangle,name:"Triangle",aliasIds:[Gn],make:t=>{var e,i,n;const o=null!==(e=t.size)&&void 0!==e?e:5,r=null!==(i=t.rotation)&&void 0!==i?i:0;return new xn({image:new hn({stroke:new gn({color:t.color,width:null!==(n=t.lineWidth)&&void 0!==n?n:1}),fill:Xn(t),points:3,radius:o,rotation:r*Math.PI/180,angle:0}),text:Yn(t)})}},{id:kn.star,name:"Star",aliasIds:[Zn],make:t=>{var e,i,n;const o=null!==(e=t.size)&&void 0!==e?e:5,r=null!==(i=t.rotation)&&void 0!==i?i:0;return new xn({image:new hn({stroke:new gn({color:t.color,width:null!==(n=t.lineWidth)&&void 0!==n?n:1}),fill:Xn(t),points:5,radius:o,radius2:.4*o,angle:0,rotation:r*Math.PI/180}),text:Yn(t)})}},{id:kn.cross,name:"Cross",aliasIds:[Wn],make:t=>{var e,i,n;const o=null!==(e=t.size)&&void 0!==e?e:5,r=null!==(i=t.rotation)&&void 0!==i?i:0;return new xn({image:new hn({stroke:new gn({color:t.color,width:null!==(n=t.lineWidth)&&void 0!==n?n:1}),points:4,radius:o,radius2:0,angle:0,rotation:r*Math.PI/180}),text:Yn(t)})}},{id:kn.x,name:"X",aliasIds:[Un],make:t=>{var e,i,n;const o=null!==(e=t.size)&&void 0!==e?e:5,r=null!==(i=t.rotation)&&void 0!==i?i:0;return new xn({image:new hn({stroke:new gn({color:t.color,width:null!==(n=t.lineWidth)&&void 0!==n?n:1}),points:4,radius:o,radius2:0,rotation:r*Math.PI/180+Math.PI/4}),text:Yn(t)})}}];const Jn=new o.Registry((()=>$n));async function Qn(t,e){if(!t)return e?Vn:Kn;let i=Jn.getIfExists(t);if(i)return i.make;if(t.endsWith(".svg")){const e=await async function(t,e){return fetch(t,{method:"GET"}).then((t=>t.text())).then((t=>{var i,n;const o=(new DOMParser).parseFromString(t,"image/svg+xml").getElementsByTagName("svg")[0];if(!o)return"";const r=null!=e?e:100,a=null!==(i=o.getAttribute("width"))&&void 0!==i?i:r,s=null!==(n=o.getAttribute("height"))&&void 0!==n?n:r;o.setAttribute("fill","#fff"),o.setAttribute("width",`${a}px`),o.setAttribute("height",`${s}px`);const l=(new XMLSerializer).serializeToString(o);return`data:image/svg+xml,${encodeURIComponent(l)}`})).catch((t=>(console.error(t),"")))}((0,di.t7)(t));return i={id:t,name:t,aliasIds:[],make:e?t=>{var i,n,o;const r=null!==(i=t.size)&&void 0!==i?i:5,a=null!==(n=t.rotation)&&void 0!==n?n:0;return[new xn({image:new Mn({src:e,color:t.color,opacity:null!==(o=t.opacity)&&void 0!==o?o:1,scale:(5+r)/100,rotation:a*Math.PI/180}),text:null!=t&&t.text?Yn(t):void 0}),new xn({image:new hn({fill:new ji({color:"rgba(0,0,0,0)"}),points:4,radius:t.size,rotation:a*Math.PI/180+Math.PI/4})})]}:qn},Jn.register(i),i.make}return qn}function to(t){var e,i;const n=null==t?void 0:t.text;return!!n&&(!(n.mode!==di.xy.Fixed||null===(e=n.fixed)||void 0===e||!e.length)||!(n.mode!==di.xy.Field||null===(i=n.field)||void 0===i||!i.length))}async function eo(t){var e,i,n,o,r,a,s,l,c,u,h,p,d,f,g;t||(t=Oi);const _=to(t),y={},v=await Qn(null===(e=t.symbol)||void 0===e?void 0:e.fixed,_),m={config:t,hasText:_,fields:y,base:{color:Ai.config.theme2.visualization.getColorByName(null!==(i=null===(n=t.color)||void 0===n?void 0:n.fixed)&&void 0!==i?i:Oi.color.fixed),opacity:null!==(o=t.opacity)&&void 0!==o?o:Oi.opacity,lineWidth:null!==(r=t.lineWidth)&&void 0!==r?r:1,size:null!==(a=null===(s=t.size)||void 0===s?void 0:s.fixed)&&void 0!==a?a:Oi.size.fixed,rotation:null!==(l=null===(c=t.rotation)||void 0===c?void 0:c.fixed)&&void 0!==l?l:Oi.rotation.fixed},maker:v};var x,b,w,C;(null!==(u=t.color)&&void 0!==u&&null!==(h=u.field)&&void 0!==h&&h.length&&(y.color=t.color.field),null!==(p=t.size)&&void 0!==p&&null!==(d=p.field)&&void 0!==d&&d.length&&(y.size=t.size.field),null!==(f=t.rotation)&&void 0!==f&&null!==(g=f.field)&&void 0!==g&&g.length&&(y.rotation=t.rotation.field),_)&&(m.base.text=null===(x=t.text)||void 0===x?void 0:x.fixed,m.base.textConfig=null!==(b=t.textConfig)&&void 0!==b?b:Oi.textConfig,null!==(w=t.text)&&void 0!==w&&null!==(C=w.field)&&void 0!==C&&C.length&&(y.text=t.text.field));return Object.keys(y).length||(m.fields=void 0),m}const io=t=>{var e,i,n,o,r,a,s,l,c,u,h,p,d,f,g,_;let{value:y,context:v,onChange:m,item:x}=t;const b=x.settings,w=t=>{m(Object.assign({},y,{symbol:t}))},C=t=>{m(Object.assign({},y,{color:t}))},S=t=>{m(Object.assign({},y,{opacity:t}))},E=t=>{m(Object.assign({},y,{rotation:t}))};let T=!1;if(null!=b&&b.layerInfo){const t=(0,Ii.Z)(null==b?void 0:b.layerInfo);T=(null==t?void 0:t.geometryType)===Ei.Point}const R=to(y);var O,I,L,P,F;return null!=b&&b.simpleFixedValues?(0,fi.jsxs)(fi.Fragment,{children:[T&&(0,fi.jsxs)(fi.Fragment,{children:[(0,fi.jsx)(yi.InlineFieldRow,{children:(0,fi.jsx)(yi.InlineField,{label:"Symbol",children:(0,fi.jsx)(Pi.Lv,{value:null!==(O=null==y?void 0:y.symbol)&&void 0!==O?O:Oi.symbol,context:v,onChange:w,item:{settings:{resourceType:"icon",folderName:Fi.QS.Marker,placeholderText:R?"Select a symbol":"Select a symbol or add a text label",placeholderValue:Oi.symbol.fixed,showSourceRadio:!1}}})})}),(0,fi.jsx)(yi.Field,{label:"Rotation angle",children:(0,fi.jsx)(Pi.k9,{value:null!==(I=null==y?void 0:y.rotation)&&void 0!==I?I:Oi.rotation,context:v,onChange:E,item:{settings:{min:Oi.rotation.min,max:Oi.rotation.max}}})})]}),(0,fi.jsx)(yi.InlineFieldRow,{children:(0,fi.jsx)(yi.InlineField,{label:"Color",labelWidth:10,children:(0,fi.jsx)(yi.InlineLabel,{width:4,children:(0,fi.jsx)(yi.ColorPicker,{color:null!==(L=null==y||null===(P=y.color)||void 0===P?void 0:P.fixed)&&void 0!==L?L:Oi.color.fixed,onChange:t=>{C({fixed:t})}})})})}),(0,fi.jsx)(yi.InlineFieldRow,{children:(0,fi.jsx)(yi.InlineField,{label:"Opacity",labelWidth:10,grow:!0,children:(0,fi.jsx)(yi.SliderValueEditor,{value:null!==(F=null==y?void 0:y.opacity)&&void 0!==F?F:Oi.opacity,context:v,onChange:S,item:{settings:{min:0,max:1,step:.1}}})})})]}):(0,fi.jsxs)(fi.Fragment,{children:[(0,fi.jsx)(yi.Field,{label:"Size",children:(0,fi.jsx)(Pi.cL,{value:null!==(e=null==y?void 0:y.size)&&void 0!==e?e:Oi.size,context:v,onChange:t=>{m(Object.assign({},y,{size:t}))},item:{settings:{min:1,max:100}}})}),(0,fi.jsx)(yi.Field,{label:"Symbol",children:(0,fi.jsx)(Pi.Lv,{value:null!==(i=null==y?void 0:y.symbol)&&void 0!==i?i:Oi.symbol,context:v,onChange:w,item:{settings:{resourceType:"icon",folderName:Fi.QS.Marker,placeholderText:R?"Select a symbol":"Select a symbol or add a text label",placeholderValue:Oi.symbol.fixed,showSourceRadio:!1}}})}),(0,fi.jsx)(yi.Field,{label:"Color",children:(0,fi.jsx)(Pi.Lm,{value:null!==(n=null==y?void 0:y.color)&&void 0!==n?n:Oi.color,context:v,onChange:C,item:{}})}),(0,fi.jsx)(yi.Field,{label:"Fill opacity",children:(0,fi.jsx)(yi.SliderValueEditor,{value:null!==(o=null==y?void 0:y.opacity)&&void 0!==o?o:Oi.opacity,context:v,onChange:S,item:{settings:{min:0,max:1,step:.1}}})}),(null==b?void 0:b.displayRotation)&&(0,fi.jsx)(yi.Field,{label:"Rotation angle",children:(0,fi.jsx)(Pi.k9,{value:null!==(r=null==y?void 0:y.rotation)&&void 0!==r?r:Oi.rotation,context:v,onChange:E,item:{settings:{min:Oi.rotation.min,max:Oi.rotation.max}}})}),(0,fi.jsx)(yi.Field,{label:"Text label",children:(0,fi.jsx)(Pi.$2,{value:null!==(a=null==y?void 0:y.text)&&void 0!==a?a:Fi.qj,context:v,onChange:t=>{m(Object.assign({},y,{text:t}))},item:{}})}),R&&(0,fi.jsxs)(fi.Fragment,{children:[(0,fi.jsxs)(yi.HorizontalGroup,{children:[(0,fi.jsx)(yi.Field,{label:"Font size",children:(0,fi.jsx)(yi.NumberValueEditor,{value:null!==(s=null==y||null===(l=y.textConfig)||void 0===l?void 0:l.fontSize)&&void 0!==s?s:Oi.textConfig.fontSize,context:v,onChange:t=>{m(Object.assign({},y,{textConfig:Object.assign({},y.textConfig,{fontSize:t})}))},item:{}})}),(0,fi.jsx)(yi.Field,{label:"X offset",children:(0,fi.jsx)(yi.NumberValueEditor,{value:null!==(c=null==y||null===(u=y.textConfig)||void 0===u?void 0:u.offsetX)&&void 0!==c?c:Oi.textConfig.offsetX,context:v,onChange:t=>{m(Object.assign({},y,{textConfig:Object.assign({},y.textConfig,{offsetX:t})}))},item:{}})}),(0,fi.jsx)(yi.Field,{label:"Y offset",children:(0,fi.jsx)(yi.NumberValueEditor,{value:null!==(h=null==y||null===(p=y.textConfig)||void 0===p?void 0:p.offsetY)&&void 0!==h?h:Oi.textConfig.offsetY,context:v,onChange:t=>{m(Object.assign({},y,{textConfig:Object.assign({},y.textConfig,{offsetY:t})}))},item:{}})})]}),(0,fi.jsx)(yi.Field,{label:"Align",children:(0,fi.jsx)(yi.RadioButtonGroup,{value:null!==(d=null==y||null===(f=y.textConfig)||void 0===f?void 0:f.textAlign)&&void 0!==d?d:Oi.textConfig.textAlign,onChange:t=>{m(Object.assign({},y,{textConfig:Object.assign({},y.textConfig,{textAlign:t})}))},options:[{value:Ti.Left,label:(0,Li.capitalize)(Ti.Left)},{value:Ti.Center,label:(0,Li.capitalize)(Ti.Center)},{value:Ti.Right,label:(0,Li.capitalize)(Ti.Right)}]})}),(0,fi.jsx)(yi.Field,{label:"Baseline",children:(0,fi.jsx)(yi.RadioButtonGroup,{value:null!==(g=null==y||null===(_=y.textConfig)||void 0===_?void 0:_.textBaseline)&&void 0!==g?g:Oi.textConfig.textBaseline,onChange:t=>{m(Object.assign({},y,{textConfig:Object.assign({},y.textConfig,{textBaseline:t})}))},options:[{value:Ri.Top,label:(0,Li.capitalize)(Ri.Top)},{value:Ri.Middle,label:(0,Li.capitalize)(Ri.Middle)},{value:Ri.Bottom,label:(0,Li.capitalize)(Ri.Bottom)}]})})]})]})};var no=i("../../opt/drone/yarncache/rbush-npm-3.0.1-9fc2a71778-b7def5ba76.zip/node_modules/rbush/rbush.min.js"),oo=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),ro="renderOrder",ao=function(t){function e(e){var i=this,n=e||{},o=(0,X.f0)({},n);return delete o.style,delete o.renderBuffer,delete o.updateWhileAnimating,delete o.updateWhileInteracting,(i=t.call(this,o)||this).declutter_=void 0!==n.declutter&&n.declutter,i.renderBuffer_=void 0!==n.renderBuffer?n.renderBuffer:100,i.style_=null,i.styleFunction_=void 0,i.setStyle(n.style),i.updateWhileAnimating_=void 0!==n.updateWhileAnimating&&n.updateWhileAnimating,i.updateWhileInteracting_=void 0!==n.updateWhileInteracting&&n.updateWhileInteracting,i}return oo(e,t),e.prototype.getDeclutter=function(){return this.declutter_},e.prototype.getFeatures=function(e){return t.prototype.getFeatures.call(this,e)},e.prototype.getRenderBuffer=function(){return this.renderBuffer_},e.prototype.getRenderOrder=function(){return this.get(ro)},e.prototype.getStyle=function(){return this.style_},e.prototype.getStyleFunction=function(){return this.styleFunction_},e.prototype.getUpdateWhileAnimating=function(){return this.updateWhileAnimating_},e.prototype.getUpdateWhileInteracting=function(){return this.updateWhileInteracting_},e.prototype.renderDeclutter=function(t){t.declutterTree||(t.declutterTree=new no(9)),this.getRenderer().renderDeclutter(t)},e.prototype.setRenderOrder=function(t){this.set(ro,t)},e.prototype.setStyle=function(t){this.style_=void 0!==t?t:vn,this.styleFunction_=null===t?void 0:function(t){var e;if("function"==typeof t)e=t;else{var i;Array.isArray(t)?i=t:((0,Q.h)("function"==typeof t.getZIndex,41),i=[t]),e=function(){return i}}return e}(this.style_),this.changed()},e}(de);const so=ao;var lo={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},co=[lo.FILL],uo=[lo.STROKE],ho=[lo.BEGIN_PATH],po=[lo.CLOSE_PATH];const fo=lo;var go=i("../../opt/drone/yarncache/ol-npm-6.12.0-aa56e5c786-a0eb5766bd.zip/node_modules/ol/geom/GeometryType.js"),_o=i("../../opt/drone/yarncache/ol-npm-6.12.0-aa56e5c786-a0eb5766bd.zip/node_modules/ol/extent/Relationship.js");const yo=function(){function t(){}return t.prototype.drawCustom=function(t,e,i,n){},t.prototype.drawGeometry=function(t){},t.prototype.setStyle=function(t){},t.prototype.drawCircle=function(t,e){},t.prototype.drawFeature=function(t,e){},t.prototype.drawGeometryCollection=function(t,e){},t.prototype.drawLineString=function(t,e){},t.prototype.drawMultiLineString=function(t,e){},t.prototype.drawMultiPoint=function(t,e){},t.prototype.drawMultiPolygon=function(t,e){},t.prototype.drawPoint=function(t,e){},t.prototype.drawPolygon=function(t,e){},t.prototype.drawText=function(t,e){},t.prototype.setFillStrokeStyle=function(t,e){},t.prototype.setImageStyle=function(t,e){},t.prototype.setTextStyle=function(t,e){},t}();var vo=i("../../opt/drone/yarncache/ol-npm-6.12.0-aa56e5c786-a0eb5766bd.zip/node_modules/ol/geom/flat/inflate.js"),mo=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),xo=function(t){function e(e,i,n,o){var r=t.call(this)||this;return r.tolerance=e,r.maxExtent=i,r.pixelRatio=o,r.maxLineWidth=0,r.resolution=n,r.beginGeometryInstruction1_=null,r.beginGeometryInstruction2_=null,r.bufferedMaxExtent_=null,r.instructions=[],r.coordinates=[],r.tmpCoordinate_=[],r.hitDetectionInstructions=[],r.state={},r}return mo(e,t),e.prototype.applyPixelRatio=function(t){var e=this.pixelRatio;return 1==e?t:t.map((function(t){return t*e}))},e.prototype.appendFlatPointCoordinates=function(t,e){for(var i=this.getBufferedMaxExtent(),n=this.tmpCoordinate_,o=this.coordinates,r=o.length,a=0,s=t.length;a<s;a+=e)n[0]=t[a],n[1]=t[a+1],(0,P.b8)(i,n)&&(o[r++]=n[0],o[r++]=n[1]);return r},e.prototype.appendFlatLineCoordinates=function(t,e,i,n,o,r){var a=this.coordinates,s=a.length,l=this.getBufferedMaxExtent();r&&(e+=n);var c,u,h,p=t[e],d=t[e+1],f=this.tmpCoordinate_,g=!0;for(c=e+n;c<i;c+=n)f[0]=t[c],f[1]=t[c+1],(h=(0,P.pX)(l,f))!==u?(g&&(a[s++]=p,a[s++]=d,g=!1),a[s++]=f[0],a[s++]=f[1]):h===_o.Z.INTERSECTING?(a[s++]=f[0],a[s++]=f[1],g=!1):g=!0,p=f[0],d=f[1],u=h;return(o&&g||c===e+n)&&(a[s++]=p,a[s++]=d),s},e.prototype.drawCustomCoordinates_=function(t,e,i,n,o){for(var r=0,a=i.length;r<a;++r){var s=i[r],l=this.appendFlatLineCoordinates(t,e,s,n,!1,!1);o.push(l),e=s}return e},e.prototype.drawCustom=function(t,e,i,n){this.beginGeometry(t,e);var o,r,a,s,l,c=t.getType(),u=t.getStride(),h=this.coordinates.length;switch(c){case go.Z.MULTI_POLYGON:o=t.getOrientedFlatCoordinates(),s=[];var p=t.getEndss();l=0;for(var d=0,f=p.length;d<f;++d){var g=[];l=this.drawCustomCoordinates_(o,l,p[d],u,g),s.push(g)}this.instructions.push([fo.CUSTOM,h,s,t,i,vo.ug]),this.hitDetectionInstructions.push([fo.CUSTOM,h,s,t,n||i,vo.ug]);break;case go.Z.POLYGON:case go.Z.MULTI_LINE_STRING:a=[],o=c==go.Z.POLYGON?t.getOrientedFlatCoordinates():t.getFlatCoordinates(),l=this.drawCustomCoordinates_(o,0,t.getEnds(),u,a),this.instructions.push([fo.CUSTOM,h,a,t,i,vo.o1]),this.hitDetectionInstructions.push([fo.CUSTOM,h,a,t,n||i,vo.o1]);break;case go.Z.LINE_STRING:case go.Z.CIRCLE:o=t.getFlatCoordinates(),r=this.appendFlatLineCoordinates(o,0,o.length,u,!1,!1),this.instructions.push([fo.CUSTOM,h,r,t,i,vo.Ml]),this.hitDetectionInstructions.push([fo.CUSTOM,h,r,t,n||i,vo.Ml]);break;case go.Z.MULTI_POINT:o=t.getFlatCoordinates(),(r=this.appendFlatPointCoordinates(o,u))>h&&(this.instructions.push([fo.CUSTOM,h,r,t,i,vo.Ml]),this.hitDetectionInstructions.push([fo.CUSTOM,h,r,t,n||i,vo.Ml]));break;case go.Z.POINT:o=t.getFlatCoordinates(),this.coordinates.push(o[0],o[1]),r=this.coordinates.length,this.instructions.push([fo.CUSTOM,h,r,t,i]),this.hitDetectionInstructions.push([fo.CUSTOM,h,r,t,n||i])}this.endGeometry(e)},e.prototype.beginGeometry=function(t,e){this.beginGeometryInstruction1_=[fo.BEGIN_GEOMETRY,e,0,t],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[fo.BEGIN_GEOMETRY,e,0,t],this.hitDetectionInstructions.push(this.beginGeometryInstruction2_)},e.prototype.finish=function(){return{instructions:this.instructions,hitDetectionInstructions:this.hitDetectionInstructions,coordinates:this.coordinates}},e.prototype.reverseHitDetectionInstructions=function(){var t,e=this.hitDetectionInstructions;e.reverse();var i,n,o=e.length,r=-1;for(t=0;t<o;++t)(n=(i=e[t])[0])==fo.END_GEOMETRY?r=t:n==fo.BEGIN_GEOMETRY&&(i[2]=t,(0,wt.FZ)(this.hitDetectionInstructions,r,t),r=-1)},e.prototype.setFillStrokeStyle=function(t,e){var i=this.state;if(t){var n=t.getColor();i.fillStyle=Gi(n||Wi)}else i.fillStyle=void 0;if(e){var o=e.getColor();i.strokeStyle=Gi(o||Vi);var r=e.getLineCap();i.lineCap=void 0!==r?r:Ui;var a=e.getLineDash();i.lineDash=a?a.slice():Xi;var s=e.getLineDashOffset();i.lineDashOffset=s||0;var l=e.getLineJoin();i.lineJoin=void 0!==l?l:Yi;var c=e.getWidth();i.lineWidth=void 0!==c?c:1;var u=e.getMiterLimit();i.miterLimit=void 0!==u?u:10,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},e.prototype.createFill=function(t){var e=t.fillStyle,i=[fo.SET_FILL_STYLE,e];return"string"!=typeof e&&i.push(!0),i},e.prototype.applyStroke=function(t){this.instructions.push(this.createStroke(t))},e.prototype.createStroke=function(t){return[fo.SET_STROKE_STYLE,t.strokeStyle,t.lineWidth*this.pixelRatio,t.lineCap,t.lineJoin,t.miterLimit,this.applyPixelRatio(t.lineDash),t.lineDashOffset*this.pixelRatio]},e.prototype.updateFillStyle=function(t,e){var i=t.fillStyle;"string"==typeof i&&t.currentFillStyle==i||(void 0!==i&&this.instructions.push(e.call(this,t)),t.currentFillStyle=i)},e.prototype.updateStrokeStyle=function(t,e){var i=t.strokeStyle,n=t.lineCap,o=t.lineDash,r=t.lineDashOffset,a=t.lineJoin,s=t.lineWidth,l=t.miterLimit;(t.currentStrokeStyle!=i||t.currentLineCap!=n||o!=t.currentLineDash&&!(0,wt.fS)(t.currentLineDash,o)||t.currentLineDashOffset!=r||t.currentLineJoin!=a||t.currentLineWidth!=s||t.currentMiterLimit!=l)&&(void 0!==i&&e.call(this,t),t.currentStrokeStyle=i,t.currentLineCap=n,t.currentLineDash=o,t.currentLineDashOffset=r,t.currentLineJoin=a,t.currentLineWidth=s,t.currentMiterLimit=l)},e.prototype.endGeometry=function(t){this.beginGeometryInstruction1_[2]=this.instructions.length,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_[2]=this.hitDetectionInstructions.length,this.beginGeometryInstruction2_=null;var e=[fo.END_GEOMETRY,t];this.instructions.push(e),this.hitDetectionInstructions.push(e)},e.prototype.getBufferedMaxExtent=function(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=(0,P.d9)(this.maxExtent),this.maxLineWidth>0)){var t=this.resolution*(this.maxLineWidth+1)/2;(0,P.f3)(this.bufferedMaxExtent_,t,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_},e}(yo);const bo=xo;var wo=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();const Co=function(t){function e(e,i,n,o){var r=t.call(this,e,i,n,o)||this;return r.hitDetectionImage_=null,r.image_=null,r.imagePixelRatio_=void 0,r.anchorX_=void 0,r.anchorY_=void 0,r.height_=void 0,r.opacity_=void 0,r.originX_=void 0,r.originY_=void 0,r.rotateWithView_=void 0,r.rotation_=void 0,r.scale_=void 0,r.width_=void 0,r.declutterImageWithText_=void 0,r}return wo(e,t),e.prototype.drawPoint=function(t,e){if(this.image_){this.beginGeometry(t,e);var i=t.getFlatCoordinates(),n=t.getStride(),o=this.coordinates.length,r=this.appendFlatPointCoordinates(i,n);this.instructions.push([fo.DRAW_IMAGE,o,r,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_,this.originY_,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.declutterImageWithText_]),this.hitDetectionInstructions.push([fo.DRAW_IMAGE,o,r,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterImageWithText_]),this.endGeometry(e)}},e.prototype.drawMultiPoint=function(t,e){if(this.image_){this.beginGeometry(t,e);var i=t.getFlatCoordinates(),n=t.getStride(),o=this.coordinates.length,r=this.appendFlatPointCoordinates(i,n);this.instructions.push([fo.DRAW_IMAGE,o,r,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_,this.originY_,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.declutterImageWithText_]),this.hitDetectionInstructions.push([fo.DRAW_IMAGE,o,r,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterImageWithText_]),this.endGeometry(e)}},e.prototype.finish=function(){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,t.prototype.finish.call(this)},e.prototype.setImageStyle=function(t,e){var i=t.getAnchor(),n=t.getSize(),o=t.getHitDetectionImage(),r=t.getImage(this.pixelRatio),a=t.getOrigin();this.imagePixelRatio_=t.getPixelRatio(this.pixelRatio),this.anchorX_=i[0],this.anchorY_=i[1],this.hitDetectionImage_=o,this.image_=r,this.height_=n[1],this.opacity_=t.getOpacity(),this.originX_=a[0]*this.imagePixelRatio_,this.originY_=a[1]*this.imagePixelRatio_,this.rotateWithView_=t.getRotateWithView(),this.rotation_=t.getRotation(),this.scale_=t.getScaleArray(),this.width_=n[0],this.declutterImageWithText_=e},e}(bo);var So=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();const Eo=function(t){function e(e,i,n,o){return t.call(this,e,i,n,o)||this}return So(e,t),e.prototype.drawFlatCoordinates_=function(t,e,i,n){var o=this.coordinates.length,r=this.appendFlatLineCoordinates(t,e,i,n,!1,!1),a=[fo.MOVE_TO_LINE_TO,o,r];return this.instructions.push(a),this.hitDetectionInstructions.push(a),i},e.prototype.drawLineString=function(t,e){var i=this.state,n=i.strokeStyle,o=i.lineWidth;if(void 0!==n&&void 0!==o){this.updateStrokeStyle(i,this.applyStroke),this.beginGeometry(t,e),this.hitDetectionInstructions.push([fo.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,Xi,0],ho);var r=t.getFlatCoordinates(),a=t.getStride();this.drawFlatCoordinates_(r,0,r.length,a),this.hitDetectionInstructions.push(uo),this.endGeometry(e)}},e.prototype.drawMultiLineString=function(t,e){var i=this.state,n=i.strokeStyle,o=i.lineWidth;if(void 0!==n&&void 0!==o){this.updateStrokeStyle(i,this.applyStroke),this.beginGeometry(t,e),this.hitDetectionInstructions.push([fo.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset],ho);for(var r=t.getEnds(),a=t.getFlatCoordinates(),s=t.getStride(),l=0,c=0,u=r.length;c<u;++c)l=this.drawFlatCoordinates_(a,l,r[c],s);this.hitDetectionInstructions.push(uo),this.endGeometry(e)}},e.prototype.finish=function(){var e=this.state;return null!=e.lastStroke&&e.lastStroke!=this.coordinates.length&&this.instructions.push(uo),this.reverseHitDetectionInstructions(),this.state=null,t.prototype.finish.call(this)},e.prototype.applyStroke=function(e){null!=e.lastStroke&&e.lastStroke!=this.coordinates.length&&(this.instructions.push(uo),e.lastStroke=this.coordinates.length),e.lastStroke=0,t.prototype.applyStroke.call(this,e),this.instructions.push(ho)},e}(bo);var To=i("../../opt/drone/yarncache/ol-npm-6.12.0-aa56e5c786-a0eb5766bd.zip/node_modules/ol/geom/flat/simplify.js"),Ro=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();const Oo=function(t){function e(e,i,n,o){return t.call(this,e,i,n,o)||this}return Ro(e,t),e.prototype.drawFlatCoordinatess_=function(t,e,i,n){var o=this.state,r=void 0!==o.fillStyle,a=void 0!==o.strokeStyle,s=i.length;this.instructions.push(ho),this.hitDetectionInstructions.push(ho);for(var l=0;l<s;++l){var c=i[l],u=this.coordinates.length,h=this.appendFlatLineCoordinates(t,e,c,n,!0,!a),p=[fo.MOVE_TO_LINE_TO,u,h];this.instructions.push(p),this.hitDetectionInstructions.push(p),a&&(this.instructions.push(po),this.hitDetectionInstructions.push(po)),e=c}return r&&(this.instructions.push(co),this.hitDetectionInstructions.push(co)),a&&(this.instructions.push(uo),this.hitDetectionInstructions.push(uo)),e},e.prototype.drawCircle=function(t,e){var i=this.state,n=i.fillStyle,o=i.strokeStyle;if(void 0!==n||void 0!==o){this.setFillStrokeStyles_(),this.beginGeometry(t,e),void 0!==i.fillStyle&&this.hitDetectionInstructions.push([fo.SET_FILL_STYLE,Wi]),void 0!==i.strokeStyle&&this.hitDetectionInstructions.push([fo.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset]);var r=t.getFlatCoordinates(),a=t.getStride(),s=this.coordinates.length;this.appendFlatLineCoordinates(r,0,r.length,a,!1,!1);var l=[fo.CIRCLE,s];this.instructions.push(ho,l),this.hitDetectionInstructions.push(ho,l),void 0!==i.fillStyle&&(this.instructions.push(co),this.hitDetectionInstructions.push(co)),void 0!==i.strokeStyle&&(this.instructions.push(uo),this.hitDetectionInstructions.push(uo)),this.endGeometry(e)}},e.prototype.drawPolygon=function(t,e){var i=this.state,n=i.fillStyle,o=i.strokeStyle;if(void 0!==n||void 0!==o){this.setFillStrokeStyles_(),this.beginGeometry(t,e),void 0!==i.fillStyle&&this.hitDetectionInstructions.push([fo.SET_FILL_STYLE,Wi]),void 0!==i.strokeStyle&&this.hitDetectionInstructions.push([fo.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset]);var r=t.getEnds(),a=t.getOrientedFlatCoordinates(),s=t.getStride();this.drawFlatCoordinatess_(a,0,r,s),this.endGeometry(e)}},e.prototype.drawMultiPolygon=function(t,e){var i=this.state,n=i.fillStyle,o=i.strokeStyle;if(void 0!==n||void 0!==o){this.setFillStrokeStyles_(),this.beginGeometry(t,e),void 0!==i.fillStyle&&this.hitDetectionInstructions.push([fo.SET_FILL_STYLE,Wi]),void 0!==i.strokeStyle&&this.hitDetectionInstructions.push([fo.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset]);for(var r=t.getEndss(),a=t.getOrientedFlatCoordinates(),s=t.getStride(),l=0,c=0,u=r.length;c<u;++c)l=this.drawFlatCoordinatess_(a,l,r[c],s);this.endGeometry(e)}},e.prototype.finish=function(){this.reverseHitDetectionInstructions(),this.state=null;var e=this.tolerance;if(0!==e)for(var i=this.coordinates,n=0,o=i.length;n<o;++n)i[n]=(0,To.uZ)(i[n],e);return t.prototype.finish.call(this)},e.prototype.setFillStrokeStyles_=function(){var t=this.state;void 0!==t.fillStyle&&this.updateFillStyle(t,this.createFill),void 0!==t.strokeStyle&&this.updateStrokeStyle(t,this.applyStroke)},e}(bo);function Io(t,e,i,n,o){var r,a,s,l,c,u,h,p,d,f=i,g=i,_=0,y=0,v=i;for(r=i;r<n;r+=o){var m=e[r],x=e[r+1];void 0!==l&&(p=m-l,d=x-c,s=Math.sqrt(p*p+d*d),void 0!==u&&(y+=a,Math.acos((u*p+h*d)/(a*s))>t&&(y>_&&(_=y,f=v,g=r),y=0,v=r-o)),a=s,u=p,h=d),l=m,c=x}return(y+=s)>_?[v,r]:[f,g]}var Lo=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Po={left:0,end:0,center:.5,right:1,start:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1},Fo=function(t){function e(e,i,n,o){var r=t.call(this,e,i,n,o)||this;return r.labels_=null,r.text_="",r.textOffsetX_=0,r.textOffsetY_=0,r.textRotateWithView_=void 0,r.textRotation_=0,r.textFillState_=null,r.fillStates={},r.textStrokeState_=null,r.strokeStates={},r.textState_={},r.textStates={},r.textKey_="",r.fillKey_="",r.strokeKey_="",r.declutterImageWithText_=void 0,r}return Lo(e,t),e.prototype.finish=function(){var e=t.prototype.finish.call(this);return e.textStates=this.textStates,e.fillStates=this.fillStates,e.strokeStates=this.strokeStates,e},e.prototype.drawText=function(t,e){var i=this.textFillState_,n=this.textStrokeState_,o=this.textState_;if(""!==this.text_&&o&&(i||n)){var r=this.coordinates,a=r.length,s=t.getType(),l=null,c=t.getStride();if(o.placement!==ki||s!=go.Z.LINE_STRING&&s!=go.Z.MULTI_LINE_STRING&&s!=go.Z.POLYGON&&s!=go.Z.MULTI_POLYGON){var u=o.overflow?null:[];switch(s){case go.Z.POINT:case go.Z.MULTI_POINT:l=t.getFlatCoordinates();break;case go.Z.LINE_STRING:l=t.getFlatMidpoint();break;case go.Z.CIRCLE:l=t.getCenter();break;case go.Z.MULTI_LINE_STRING:l=t.getFlatMidpoints(),c=2;break;case go.Z.POLYGON:l=t.getFlatInteriorPoint(),o.overflow||u.push(l[2]/this.resolution),c=3;break;case go.Z.MULTI_POLYGON:var h=t.getFlatInteriorPoints();l=[];for(w=0,C=h.length;w<C;w+=3)o.overflow||u.push(h[w+2]/this.resolution),l.push(h[w],h[w+1]);if(0===l.length)return;c=2}if((L=this.appendFlatPointCoordinates(l,c))===a)return;if(u&&(L-a)/2!=l.length/c){var p=a/2;u=u.filter((function(t,e){var i=r[2*(p+e)]===l[e*c]&&r[2*(p+e)+1]===l[e*c+1];return i||--p,i}))}this.saveTextStates_(),(o.backgroundFill||o.backgroundStroke)&&(this.setFillStrokeStyle(o.backgroundFill,o.backgroundStroke),o.backgroundFill&&(this.updateFillStyle(this.state,this.createFill),this.hitDetectionInstructions.push(this.createFill(this.state))),o.backgroundStroke&&(this.updateStrokeStyle(this.state,this.applyStroke),this.hitDetectionInstructions.push(this.createStroke(this.state)))),this.beginGeometry(t,e);var d=o.padding;if(d!=qi&&(o.scale[0]<0||o.scale[1]<0)){var f=o.padding[0],g=o.padding[1],_=o.padding[2],y=o.padding[3];o.scale[0]<0&&(g=-g,y=-y),o.scale[1]<0&&(f=-f,_=-_),d=[f,g,_,y]}var v=this.pixelRatio;this.instructions.push([fo.DRAW_IMAGE,a,L,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[1,1],NaN,this.declutterImageWithText_,d==qi?qi:d.map((function(t){return t*v})),!!o.backgroundFill,!!o.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,u]);var m=1/v;this.hitDetectionInstructions.push([fo.DRAW_IMAGE,a,L,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[m,m],NaN,this.declutterImageWithText_,d,!!o.backgroundFill,!!o.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,u]),this.endGeometry(e)}else{if(!(0,P.kK)(this.getBufferedMaxExtent(),t.getExtent()))return;var x=void 0;if(l=t.getFlatCoordinates(),s==go.Z.LINE_STRING)x=[l.length];else if(s==go.Z.MULTI_LINE_STRING)x=t.getEnds();else if(s==go.Z.POLYGON)x=t.getEnds().slice(0,1);else if(s==go.Z.MULTI_POLYGON){var b=t.getEndss();x=[];for(var w=0,C=b.length;w<C;++w)x.push(b[w][0])}this.beginGeometry(t,e);for(var S=o.textAlign,E=0,T=void 0,R=0,O=x.length;R<O;++R){if(null==S){var I=Io(o.maxAngle,l,E,x[R],c);E=I[0],T=I[1]}else T=x[R];for(var w=E;w<T;w+=c)r.push(l[w],l[w+1]);var L=r.length;E=x[R],this.drawChars_(a,L),a=L}this.endGeometry(e)}}},e.prototype.saveTextStates_=function(){var t=this.textStrokeState_,e=this.textState_,i=this.textFillState_,n=this.strokeKey_;t&&(n in this.strokeStates||(this.strokeStates[n]={strokeStyle:t.strokeStyle,lineCap:t.lineCap,lineDashOffset:t.lineDashOffset,lineWidth:t.lineWidth,lineJoin:t.lineJoin,miterLimit:t.miterLimit,lineDash:t.lineDash}));var o=this.textKey_;o in this.textStates||(this.textStates[o]={font:e.font,textAlign:e.textAlign||Ki,textBaseline:e.textBaseline||Hi,scale:e.scale});var r=this.fillKey_;i&&(r in this.fillStates||(this.fillStates[r]={fillStyle:i.fillStyle}))},e.prototype.drawChars_=function(t,e){var i=this.textStrokeState_,n=this.textState_,o=this.strokeKey_,r=this.textKey_,a=this.fillKey_;this.saveTextStates_();var s=this.pixelRatio,l=Po[n.textBaseline],c=this.textOffsetY_*s,u=this.text_,h=i?i.lineWidth*Math.abs(n.scale[0])/2:0;this.instructions.push([fo.DRAW_CHARS,t,e,l,n.overflow,a,n.maxAngle,s,c,o,h*s,u,r,1]),this.hitDetectionInstructions.push([fo.DRAW_CHARS,t,e,l,n.overflow,a,n.maxAngle,1,c,o,h,u,r,1/s])},e.prototype.setTextStyle=function(t,e){var i,n,o;if(t){var r=t.getFill();r?((n=this.textFillState_)||(n={},this.textFillState_=n),n.fillStyle=Gi(r.getColor()||Wi)):(n=null,this.textFillState_=n);var a=t.getStroke();if(a){(o=this.textStrokeState_)||(o={},this.textStrokeState_=o);var s=a.getLineDash(),l=a.getLineDashOffset(),c=a.getWidth(),u=a.getMiterLimit();o.lineCap=a.getLineCap()||Ui,o.lineDash=s?s.slice():Xi,o.lineDashOffset=void 0===l?0:l,o.lineJoin=a.getLineJoin()||Yi,o.lineWidth=void 0===c?1:c,o.miterLimit=void 0===u?10:u,o.strokeStyle=Gi(a.getColor()||Vi)}else o=null,this.textStrokeState_=o;i=this.textState_;var h=t.getFont()||Zi;nn(h);var d=t.getScaleArray();i.overflow=t.getOverflow(),i.font=h,i.maxAngle=t.getMaxAngle(),i.placement=t.getPlacement(),i.textAlign=t.getTextAlign(),i.textBaseline=t.getTextBaseline()||Hi,i.backgroundFill=t.getBackgroundFill(),i.backgroundStroke=t.getBackgroundStroke(),i.padding=t.getPadding()||qi,i.scale=void 0===d?[1,1]:d;var f=t.getOffsetX(),g=t.getOffsetY(),_=t.getRotateWithView(),y=t.getRotation();this.text_=t.getText()||"",this.textOffsetX_=void 0===f?0:f,this.textOffsetY_=void 0===g?0:g,this.textRotateWithView_=void 0!==_&&_,this.textRotation_=void 0===y?0:y,this.strokeKey_=o?("string"==typeof o.strokeStyle?o.strokeStyle:(0,p.sq)(o.strokeStyle))+o.lineCap+o.lineDashOffset+"|"+o.lineWidth+o.lineJoin+o.miterLimit+"["+o.lineDash.join()+"]":"",this.textKey_=i.font+i.scale+(i.textAlign||"?")+(i.textBaseline||"?"),this.fillKey_=n?"string"==typeof n.fillStyle?n.fillStyle:"|"+(0,p.sq)(n.fillStyle):""}else this.text_="";this.declutterImageWithText_=e},e}(bo);var Ao={Circle:Oo,Default:bo,Image:Co,LineString:Eo,Polygon:Oo,Text:Fo};const jo=function(){function t(t,e,i,n){this.tolerance_=t,this.maxExtent_=e,this.pixelRatio_=n,this.resolution_=i,this.buildersByZIndex_={}}return t.prototype.finish=function(){var t={};for(var e in this.buildersByZIndex_){t[e]=t[e]||{};var i=this.buildersByZIndex_[e];for(var n in i){var o=i[n].finish();t[e][n]=o}}return t},t.prototype.getBuilder=function(t,e){var i=void 0!==t?t.toString():"0",n=this.buildersByZIndex_[i];void 0===n&&(n={},this.buildersByZIndex_[i]=n);var o=n[e];void 0===o&&(o=new(0,Ao[e])(this.tolerance_,this.maxExtent_,this.resolution_,this.pixelRatio_),n[e]=o);return o},t}(),Mo="Circle",ko="Default",Do="Image",zo="LineString",No="Polygon",Bo="Text";var Go=i("../../opt/drone/yarncache/ol-npm-6.12.0-aa56e5c786-a0eb5766bd.zip/node_modules/ol/geom/flat/transform.js");function Zo(t,e,i,n,o,r,a,s,l,c,u,h){var p=t[e],d=t[e+1],f=0,g=0,_=0,y=0;function v(){f=p,g=d,p=t[e+=n],d=t[e+1],y+=_,_=Math.sqrt((p-f)*(p-f)+(d-g)*(d-g))}do{v()}while(e<i-n&&y+_<r);for(var m=0===_?0:(r-y)/_,x=(0,N.t7)(f,p,m),b=(0,N.t7)(g,d,m),w=e-n,C=y,S=r+s*l(c,o,u);e<i-n&&y+_<S;)v();m=0===_?0:(S-y)/_;var E,T=(0,N.t7)(f,p,m),R=(0,N.t7)(g,d,m);if(h){var O=[x,b,T,R];(0,Go.U1)(O,0,4,2,h,O,O),E=O[0]>O[2]}else E=x>T;var I,L=Math.PI,P=[],F=w+n===e;if(_=0,y=C,p=t[e=w],d=t[e+1],F){v(),I=Math.atan2(d-g,p-f),E&&(I+=I>0?-L:L);var A=(T+x)/2,j=(R+b)/2;return P[0]=[A,j,(S-r)/2,I,o],P}for(var M=0,k=o.length;M<k;){v();var D=Math.atan2(d-g,p-f);if(E&&(D+=D>0?-L:L),void 0!==I){var z=D-I;if(z+=z>L?-2*L:z<-L?2*L:0,Math.abs(z)>a)return null}I=D;for(var B=M,G=0;M<k;++M){var Z=s*l(c,o[E?k-M-1:M],u);if(e+n<i&&y+_<r+G+Z/2)break;G+=Z}if(M!==B){var W=E?o.substring(k-B,k-M):o.substring(B,M);m=0===_?0:(r+G/2-y)/_;A=(0,N.t7)(f,p,m),j=(0,N.t7)(g,d,m);P.push([A,j,G/2,D,W]),r+=G}}return P}var Wo=i("../../opt/drone/yarncache/ol-npm-6.12.0-aa56e5c786-a0eb5766bd.zip/node_modules/ol/geom/flat/length.js"),Uo=(0,P.lJ)(),Xo=[],Yo=[],Vo=[],Ko=[];function Ho(t){return t[3].declutterBox}var qo=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 $o(t,e){return"start"!==e&&"end"!==e||qo.test(t)||(e="start"===e?"left":"right"),Po[e]}var Jo=function(){function t(t,e,i,n){this.overlaps=i,this.pixelRatio=e,this.resolution=t,this.alignFill_,this.instructions=n.instructions,this.coordinates=n.coordinates,this.coordinateCache_={},this.renderedTransform_=(0,Se.Ue)(),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_={}}return t.prototype.createLabel=function(t,e,i,n){var o=t+e+i+n;if(this.labels_[o])return this.labels_[o];var r=n?this.strokeStates[n]:null,a=i?this.fillStates[i]:null,s=this.textStates[e],l=this.pixelRatio,c=[s.scale[0]*l,s.scale[1]*l],u=$o(t,s.textAlign||Ki),h=n&&r.lineWidth?r.lineWidth:0,p=t.split("\n"),d=p.length,f=[],g=function(t,e,i){for(var n=e.length,o=0,r=0;r<n;++r){var a=an(t,e[r]);o=Math.max(o,a),i.push(a)}return o}(s.font,p,f),_=on(s.font),y=g+h,v=[],m=(y+2)*c[0],x=(_*d+h)*c[1],w={width:m<0?Math.floor(m):Math.ceil(m),height:x<0?Math.floor(x):Math.ceil(x),contextInstructions:v};(1==c[0]&&1==c[1]||v.push("scale",c),v.push("font",s.font),n)&&(v.push("strokeStyle",r.strokeStyle),v.push("lineWidth",h),v.push("lineCap",r.lineCap),v.push("lineJoin",r.lineJoin),v.push("miterLimit",r.miterLimit),(b.Id?OffscreenCanvasRenderingContext2D:CanvasRenderingContext2D).prototype.setLineDash&&(v.push("setLineDash",[r.lineDash]),v.push("lineDashOffset",r.lineDashOffset)));i&&v.push("fillStyle",a.fillStyle),v.push("textBaseline","middle"),v.push("textAlign","center");var C,S=.5-u,E=u*y+S*h;if(n)for(C=0;C<d;++C)v.push("strokeText",[p[C],E+S*f[C],.5*(h+_)+C*_]);if(i)for(C=0;C<d;++C)v.push("fillText",[p[C],E+S*f[C],.5*(h+_)+C*_]);return this.labels_[o]=w,w},t.prototype.replayTextBackground_=function(t,e,i,n,o,r,a){t.beginPath(),t.moveTo.apply(t,e),t.lineTo.apply(t,i),t.lineTo.apply(t,n),t.lineTo.apply(t,o),t.lineTo.apply(t,e),r&&(this.alignFill_=r[2],this.fill_(t)),a&&(this.setStrokeStyle_(t,a),t.stroke())},t.prototype.calculateImageOrLabelDimensions_=function(t,e,i,n,o,r,a,s,l,c,u,h,p,d,f,g){var _,y=i-(a*=h[0]),v=n-(s*=h[1]),m=o+l>t?t-l:o,x=r+c>e?e-c:r,b=d[3]+m*h[0]+d[1],w=d[0]+x*h[1]+d[2],C=y-d[3],S=v-d[0];return(f||0!==u)&&(Xo[0]=C,Ko[0]=C,Xo[1]=S,Yo[1]=S,Yo[0]=C+b,Vo[0]=Yo[0],Vo[1]=S+w,Ko[1]=Vo[1]),0!==u?(_=(0,Se.qC)((0,Se.Ue)(),i,n,1,1,u,-i,-n),(0,Se.nn)(_,Xo),(0,Se.nn)(_,Yo),(0,Se.nn)(_,Vo),(0,Se.nn)(_,Ko),(0,P.T9)(Math.min(Xo[0],Yo[0],Vo[0],Ko[0]),Math.min(Xo[1],Yo[1],Vo[1],Ko[1]),Math.max(Xo[0],Yo[0],Vo[0],Ko[0]),Math.max(Xo[1],Yo[1],Vo[1],Ko[1]),Uo)):(0,P.T9)(Math.min(C,C+b),Math.min(S,S+w),Math.max(C,C+b),Math.max(S,S+w),Uo),p&&(y=Math.round(y),v=Math.round(v)),{drawImageX:y,drawImageY:v,drawImageW:m,drawImageH:x,originX:l,originY:c,declutterBox:{minX:Uo[0],minY:Uo[1],maxX:Uo[2],maxY:Uo[3],value:g},canvasTransform:_,scale:h}},t.prototype.replayImageOrLabel_=function(t,e,i,n,o,r,a){var s=!(!r&&!a),l=n.declutterBox,c=t.canvas,u=a?a[2]*n.scale[0]/2:0;return l.minX-u<=c.width/e&&l.maxX+u>=0&&l.minY-u<=c.height/e&&l.maxY+u>=0&&(s&&this.replayTextBackground_(t,Xo,Yo,Vo,Ko,r,a),ln(t,n.canvasTransform,o,i,n.originX,n.originY,n.drawImageW,n.drawImageH,n.drawImageX,n.drawImageY,n.scale)),!0},t.prototype.fill_=function(t){if(this.alignFill_){var e=(0,Se.nn)(this.renderedTransform_,[0,0]),i=512*this.pixelRatio;t.save(),t.translate(e[0]%i,e[1]%i),t.rotate(this.viewRotation_)}t.fill(),this.alignFill_&&t.restore()},t.prototype.setStrokeStyle_=function(t,e){t.strokeStyle=e[1],t.lineWidth=e[2],t.lineCap=e[3],t.lineJoin=e[4],t.miterLimit=e[5],t.setLineDash&&(t.lineDashOffset=e[7],t.setLineDash(e[6]))},t.prototype.drawLabelWithPointPlacement_=function(t,e,i,n){var o=this.textStates[e],r=this.createLabel(t,e,n,i),a=this.strokeStates[i],s=this.pixelRatio,l=$o(t,o.textAlign||Ki),c=Po[o.textBaseline||Hi],u=a&&a.lineWidth?a.lineWidth:0;return{label:r,anchorX:l*(r.width/s-2*o.scale[0])+2*(.5-l)*u,anchorY:c*r.height/s+2*(.5-c)*u}},t.prototype.execute_=function(t,e,i,n,o,r,a,s){var l;this.pixelCoordinates_&&(0,wt.fS)(i,this.renderedTransform_)?l=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),l=(0,Go.vT)(this.coordinates,0,this.coordinates.length,2,i,this.pixelCoordinates_),(0,Se.lk)(this.renderedTransform_,i));for(var c,u,h,p,d,f,g,_,y,v,m,x,b,w,C,S,E=0,T=n.length,R=0,O=0,I=0,L=null,F=null,A=this.coordinateCache_,j=this.viewRotation_,M=Math.round(1e12*Math.atan2(-i[1],i[0]))/1e12,k={context:t,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:j},D=this.instructions!=n||this.overlaps?0:200;E<T;){var z=n[E];switch(z[0]){case fo.BEGIN_GEOMETRY:b=z[1],S=z[3],b.getGeometry()?void 0===a||(0,P.kK)(a,S.getExtent())?++E:E=z[2]+1:E=z[2];break;case fo.BEGIN_PATH:O>D&&(this.fill_(t),O=0),I>D&&(t.stroke(),I=0),O||I||(t.beginPath(),p=NaN,d=NaN),++E;break;case fo.CIRCLE:var N=l[R=z[1]],B=l[R+1],G=l[R+2]-N,Z=l[R+3]-B,W=Math.sqrt(G*G+Z*Z);t.moveTo(N+W,B),t.arc(N,B,W,0,2*Math.PI,!0),++E;break;case fo.CLOSE_PATH:t.closePath(),++E;break;case fo.CUSTOM:R=z[1],c=z[2];var U=z[3],X=z[4],Y=6==z.length?z[5]:void 0;k.geometry=U,k.feature=b,E in A||(A[E]=[]);var V=A[E];Y?Y(l,R,c,2,V):(V[0]=l[R],V[1]=l[R+1],V.length=2),X(V,k),++E;break;case fo.DRAW_IMAGE:R=z[1],c=z[2],_=z[3],u=z[4],h=z[5];var K=z[6],H=z[7],q=z[8],$=z[9],J=z[10],Q=z[11],tt=z[12],et=z[13],it=z[14];if(!_&&z.length>=19){y=z[18],v=z[19],m=z[20],x=z[21];var nt=this.drawLabelWithPointPlacement_(y,v,m,x);_=nt.label,z[3]=_;var ot=z[22];u=(nt.anchorX-ot)*this.pixelRatio,z[4]=u;var rt=z[23];h=(nt.anchorY-rt)*this.pixelRatio,z[5]=h,K=_.height,z[6]=K,et=_.width,z[13]=et}var at=void 0;z.length>24&&(at=z[24]);var st=void 0,lt=void 0,ct=void 0;z.length>16?(st=z[15],lt=z[16],ct=z[17]):(st=qi,lt=!1,ct=!1),J&&M?Q+=j:J||M||(Q-=j);for(var ut=0;R<c;R+=2)if(!(at&&at[ut++]<et/this.pixelRatio)){var ht=[t,e,_,Nt=this.calculateImageOrLabelDimensions_(_.width,_.height,l[R],l[R+1],et,K,u,h,q,$,Q,tt,o,st,lt||ct,b),H,lt?L:null,ct?F:null],pt=void 0,dt=void 0;if(s&&it){var ft=c-R;if(!it[ft]){it[ft]=ht;continue}if(pt=it[ft],delete it[ft],dt=Ho(pt),s.collides(dt))continue}s&&s.collides(Nt.declutterBox)||(pt&&(s&&s.insert(dt),this.replayImageOrLabel_.apply(this,pt)),s&&s.insert(Nt.declutterBox),this.replayImageOrLabel_.apply(this,ht))}++E;break;case fo.DRAW_CHARS:var gt=z[1],_t=z[2],yt=z[3],vt=z[4];x=z[5];var mt=z[6],xt=z[7],bt=z[8];m=z[9];var Ct=z[10];y=z[11],v=z[12];var St=[z[13],z[13]],Et=this.textStates[v],Tt=Et.font,Rt=[Et.scale[0]*xt,Et.scale[1]*xt],Ot=void 0;Tt in this.widths_?Ot=this.widths_[Tt]:(Ot={},this.widths_[Tt]=Ot);var It=(0,Wo.W)(l,gt,_t,2),Lt=Math.abs(Rt[0])*sn(Tt,y,Ot);if(vt||Lt<=It){var Pt=this.textStates[v].textAlign,Ft=Zo(l,gt,_t,2,y,(It-Lt)*Po[Pt],mt,Math.abs(Rt[0]),sn,Tt,Ot,M?0:this.viewRotation_);t:if(Ft){var At=[],jt=void 0,Mt=void 0,kt=void 0,Dt=void 0,zt=void 0;if(m)for(jt=0,Mt=Ft.length;jt<Mt;++jt){kt=(zt=Ft[jt])[4],Dt=this.createLabel(kt,v,"",m),u=zt[2]+(Rt[0]<0?-Ct:Ct),h=yt*Dt.height+2*(.5-yt)*Ct*Rt[1]/Rt[0]-bt;var Nt=this.calculateImageOrLabelDimensions_(Dt.width,Dt.height,zt[0],zt[1],Dt.width,Dt.height,u,h,0,0,zt[3],St,!1,qi,!1,b);if(s&&s.collides(Nt.declutterBox))break t;At.push([t,e,Dt,Nt,1,null,null])}if(x)for(jt=0,Mt=Ft.length;jt<Mt;++jt){kt=(zt=Ft[jt])[4],Dt=this.createLabel(kt,v,x,""),u=zt[2],h=yt*Dt.height-bt;Nt=this.calculateImageOrLabelDimensions_(Dt.width,Dt.height,zt[0],zt[1],Dt.width,Dt.height,u,h,0,0,zt[3],St,!1,qi,!1,b);if(s&&s.collides(Nt.declutterBox))break t;At.push([t,e,Dt,Nt,1,null,null])}s&&s.load(At.map(Ho));for(var Bt=0,Gt=At.length;Bt<Gt;++Bt)this.replayImageOrLabel_.apply(this,At[Bt])}}++E;break;case fo.END_GEOMETRY:if(void 0!==r){var Zt=r(b=z[1],S);if(Zt)return Zt}++E;break;case fo.FILL:D?O++:this.fill_(t),++E;break;case fo.MOVE_TO_LINE_TO:for(R=z[1],c=z[2],w=l[R],g=(C=l[R+1])+.5|0,(f=w+.5|0)===p&&g===d||(t.moveTo(w,C),p=f,d=g),R+=2;R<c;R+=2)f=(w=l[R])+.5|0,g=(C=l[R+1])+.5|0,R!=c-2&&f===p&&g===d||(t.lineTo(w,C),p=f,d=g);++E;break;case fo.SET_FILL_STYLE:L=z,this.alignFill_=z[2],O&&(this.fill_(t),O=0,I&&(t.stroke(),I=0)),t.fillStyle=z[1],++E;break;case fo.SET_STROKE_STYLE:F=z,I&&(t.stroke(),I=0),this.setStrokeStyle_(t,z),++E;break;case fo.STROKE:D?I++:t.stroke(),++E;break;default:++E}}O&&this.fill_(t),I&&t.stroke()},t.prototype.execute=function(t,e,i,n,o,r){this.viewRotation_=n,this.execute_(t,e,i,this.instructions,o,void 0,void 0,r)},t.prototype.executeHitDetection=function(t,e,i,n,o){return this.viewRotation_=i,this.execute_(t,1,e,this.hitDetectionInstructions,!0,n,o)},t}();const Qo=Jo;var tr=[No,Mo,zo,Do,Bo,ko],er=function(){function t(t,e,i,n,o,r){this.maxExtent_=t,this.overlaps_=n,this.pixelRatio_=i,this.resolution_=e,this.renderBuffer_=r,this.executorsByZIndex_={},this.hitDetectionContext_=null,this.hitDetectionTransform_=(0,Se.Ue)(),this.createExecutors_(o)}return t.prototype.clip=function(t,e){var i=this.getClipCoords(e);t.beginPath(),t.moveTo(i[0],i[1]),t.lineTo(i[2],i[3]),t.lineTo(i[4],i[5]),t.lineTo(i[6],i[7]),t.clip()},t.prototype.createExecutors_=function(t){for(var e in t){var i=this.executorsByZIndex_[e];void 0===i&&(i={},this.executorsByZIndex_[e]=i);var n=t[e];for(var o in n){var r=n[o];i[o]=new Qo(this.resolution_,this.pixelRatio_,this.overlaps_,r)}}},t.prototype.hasExecutors=function(t){for(var e in this.executorsByZIndex_)for(var i=this.executorsByZIndex_[e],n=0,o=t.length;n<o;++n)if(t[n]in i)return!0;return!1},t.prototype.forEachFeatureAtCoordinate=function(t,e,i,n,o,r){var a=2*(n=Math.round(n))+1,s=(0,Se.qC)(this.hitDetectionTransform_,n+.5,n+.5,1/e,-1/e,-i,-t[0],-t[1]),l=!this.hitDetectionContext_;l&&(this.hitDetectionContext_=w(a,a));var c,u=this.hitDetectionContext_;u.canvas.width!==a||u.canvas.height!==a?(u.canvas.width=a,u.canvas.height=a):l||u.clearRect(0,0,a,a),void 0!==this.renderBuffer_&&(c=(0,P.lJ)(),(0,P.Wj)(c,t),(0,P.f3)(c,e*(this.renderBuffer_+n),c));var h,p=function(t){if(void 0!==ir[t])return ir[t];for(var e=2*t+1,i=t*t,n=new Array(i+1),o=0;o<=t;++o)for(var r=0;r<=t;++r){var a=o*o+r*r;if(a>i)break;var s=n[a];s||(s=[],n[a]=s),s.push(4*((t+o)*e+(t+r))+3),o>0&&s.push(4*((t-o)*e+(t+r))+3),r>0&&(s.push(4*((t+o)*e+(t-r))+3),o>0&&s.push(4*((t-o)*e+(t-r))+3))}for(var l=[],c=(o=0,n.length);o<c;++o)n[o]&&l.push.apply(l,n[o]);return ir[t]=l,l}(n);function d(t,e){for(var i=u.getImageData(0,0,a,a).data,s=0,l=p.length;s<l;s++)if(i[p[s]]>0){if(!r||h!==Do&&h!==Bo||-1!==r.indexOf(t)){var c=(p[s]-3)/4,d=n-c%a,f=n-(c/a|0),g=o(t,e,d*d+f*f);if(g)return g}u.clearRect(0,0,a,a);break}}var f,g,_,y,v,m=Object.keys(this.executorsByZIndex_).map(Number);for(m.sort(wt.kK),f=m.length-1;f>=0;--f){var x=m[f].toString();for(_=this.executorsByZIndex_[x],g=tr.length-1;g>=0;--g)if(void 0!==(y=_[h=tr[g]])&&(v=y.executeHitDetection(u,s,i,d,c)))return v}},t.prototype.getClipCoords=function(t){var e=this.maxExtent_;if(!e)return null;var i=e[0],n=e[1],o=e[2],r=e[3],a=[i,n,i,r,o,r,o,n];return(0,Go.vT)(a,0,8,2,t,a),a},t.prototype.isEmpty=function(){return(0,X.xb)(this.executorsByZIndex_)},t.prototype.execute=function(t,e,i,n,o,r,a){var s=Object.keys(this.executorsByZIndex_).map(Number);s.sort(wt.kK),this.maxExtent_&&(t.save(),this.clip(t,i));var l,c,u,h,p,d,f=r||tr;for(a&&s.reverse(),l=0,c=s.length;l<c;++l){var g=s[l].toString();for(p=this.executorsByZIndex_[g],u=0,h=f.length;u<h;++u){void 0!==(d=p[f[u]])&&d.execute(t,e,i,n,o,a)}}this.maxExtent_&&t.restore()},t}(),ir={};const nr=er,or=0,rr=1;var ar=i("../../opt/drone/yarncache/ol-npm-6.12.0-aa56e5c786-a0eb5766bd.zip/node_modules/ol/geom/SimpleGeometry.js"),sr=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();const lr=function(t){function e(e,i,n,o,r,a,s){var l=t.call(this)||this;return l.context_=e,l.pixelRatio_=i,l.extent_=n,l.transform_=o,l.viewRotation_=r,l.squaredTolerance_=a,l.userTransform_=s,l.contextFillState_=null,l.contextStrokeState_=null,l.contextTextState_=null,l.fillState_=null,l.strokeState_=null,l.image_=null,l.imageAnchorX_=0,l.imageAnchorY_=0,l.imageHeight_=0,l.imageOpacity_=0,l.imageOriginX_=0,l.imageOriginY_=0,l.imageRotateWithView_=!1,l.imageRotation_=0,l.imageScale_=[0,0],l.imageWidth_=0,l.text_="",l.textOffsetX_=0,l.textOffsetY_=0,l.textRotateWithView_=!1,l.textRotation_=0,l.textScale_=[0,0],l.textFillState_=null,l.textStrokeState_=null,l.textState_=null,l.pixelCoordinates_=[],l.tmpLocalTransform_=(0,Se.Ue)(),l}return sr(e,t),e.prototype.drawImages_=function(t,e,i,n){if(this.image_){var o=(0,Go.vT)(t,e,i,n,this.transform_,this.pixelCoordinates_),r=this.context_,a=this.tmpLocalTransform_,s=r.globalAlpha;1!=this.imageOpacity_&&(r.globalAlpha=s*this.imageOpacity_);var l=this.imageRotation_;this.imageRotateWithView_&&(l+=this.viewRotation_);for(var c=0,u=o.length;c<u;c+=2){var h=o[c]-this.imageAnchorX_,p=o[c+1]-this.imageAnchorY_;if(0!==l||1!=this.imageScale_[0]||1!=this.imageScale_[1]){var d=h+this.imageAnchorX_,f=p+this.imageAnchorY_;(0,Se.qC)(a,d,f,1,1,l,-d,-f),r.setTransform.apply(r,a),r.translate(d,f),r.scale(this.imageScale_[0],this.imageScale_[1]),r.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,-this.imageAnchorX_,-this.imageAnchorY_,this.imageWidth_,this.imageHeight_),r.setTransform(1,0,0,1,0,0)}else r.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,h,p,this.imageWidth_,this.imageHeight_)}1!=this.imageOpacity_&&(r.globalAlpha=s)}},e.prototype.drawText_=function(t,e,i,n){if(this.textState_&&""!==this.text_){this.textFillState_&&this.setContextFillState_(this.textFillState_),this.textStrokeState_&&this.setContextStrokeState_(this.textStrokeState_),this.setContextTextState_(this.textState_);var o=(0,Go.vT)(t,e,i,n,this.transform_,this.pixelCoordinates_),r=this.context_,a=this.textRotation_;for(this.textRotateWithView_&&(a+=this.viewRotation_);e<i;e+=n){var s=o[e]+this.textOffsetX_,l=o[e+1]+this.textOffsetY_;if(0!==a||1!=this.textScale_[0]||1!=this.textScale_[1]){var c=(0,Se.qC)(this.tmpLocalTransform_,s,l,1,1,a,-s,-l);r.setTransform.apply(r,c),r.translate(s,l),r.scale(this.textScale_[0],this.textScale_[1]),this.textStrokeState_&&r.strokeText(this.text_,0,0),this.textFillState_&&r.fillText(this.text_,0,0),r.setTransform(1,0,0,1,0,0)}else this.textStrokeState_&&r.strokeText(this.text_,s,l),this.textFillState_&&r.fillText(this.text_,s,l)}}},e.prototype.moveToLineTo_=function(t,e,i,n,o){var r=this.context_,a=(0,Go.vT)(t,e,i,n,this.transform_,this.pixelCoordinates_);r.moveTo(a[0],a[1]);var s=a.length;o&&(s-=2);for(var l=2;l<s;l+=2)r.lineTo(a[l],a[l+1]);return o&&r.closePath(),i},e.prototype.drawRings_=function(t,e,i,n){for(var o=0,r=i.length;o<r;++o)e=this.moveToLineTo_(t,e,i[o],n,!0);return e},e.prototype.drawCircle=function(t){if((0,P.kK)(this.extent_,t.getExtent())){if(this.fillState_||this.strokeState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);var e=(0,ar.Kr)(t,this.transform_,this.pixelCoordinates_),i=e[2]-e[0],n=e[3]-e[1],o=Math.sqrt(i*i+n*n),r=this.context_;r.beginPath(),r.arc(e[0],e[1],o,0,2*Math.PI),this.fillState_&&r.fill(),this.strokeState_&&r.stroke()}""!==this.text_&&this.drawText_(t.getCenter(),0,2,2)}},e.prototype.setStyle=function(t){this.setFillStrokeStyle(t.getFill(),t.getStroke()),this.setImageStyle(t.getImage()),this.setTextStyle(t.getText())},e.prototype.setTransform=function(t){this.transform_=t},e.prototype.drawGeometry=function(t){switch(t.getType()){case go.Z.POINT:this.drawPoint(t);break;case go.Z.LINE_STRING:this.drawLineString(t);break;case go.Z.POLYGON:this.drawPolygon(t);break;case go.Z.MULTI_POINT:this.drawMultiPoint(t);break;case go.Z.MULTI_LINE_STRING:this.drawMultiLineString(t);break;case go.Z.MULTI_POLYGON:this.drawMultiPolygon(t);break;case go.Z.GEOMETRY_COLLECTION:this.drawGeometryCollection(t);break;case go.Z.CIRCLE:this.drawCircle(t)}},e.prototype.drawFeature=function(t,e){var i=e.getGeometryFunction()(t);i&&(0,P.kK)(this.extent_,i.getExtent())&&(this.setStyle(e),this.drawGeometry(i))},e.prototype.drawGeometryCollection=function(t){for(var e=t.getGeometriesArray(),i=0,n=e.length;i<n;++i)this.drawGeometry(e[i])},e.prototype.drawPoint=function(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));var e=t.getFlatCoordinates(),i=t.getStride();this.image_&&this.drawImages_(e,0,e.length,i),""!==this.text_&&this.drawText_(e,0,e.length,i)},e.prototype.drawMultiPoint=function(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));var e=t.getFlatCoordinates(),i=t.getStride();this.image_&&this.drawImages_(e,0,e.length,i),""!==this.text_&&this.drawText_(e,0,e.length,i)},e.prototype.drawLineString=function(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),(0,P.kK)(this.extent_,t.getExtent())){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);var e=this.context_,i=t.getFlatCoordinates();e.beginPath(),this.moveToLineTo_(i,0,i.length,t.getStride(),!1),e.stroke()}if(""!==this.text_){var n=t.getFlatMidpoint();this.drawText_(n,0,2,2)}}},e.prototype.drawMultiLineString=function(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));var e=t.getExtent();if((0,P.kK)(this.extent_,e)){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);var i=this.context_,n=t.getFlatCoordinates(),o=0,r=t.getEnds(),a=t.getStride();i.beginPath();for(var s=0,l=r.length;s<l;++s)o=this.moveToLineTo_(n,o,r[s],a,!1);i.stroke()}if(""!==this.text_){var c=t.getFlatMidpoints();this.drawText_(c,0,c.length,2)}}},e.prototype.drawPolygon=function(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),(0,P.kK)(this.extent_,t.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);var e=this.context_;e.beginPath(),this.drawRings_(t.getOrientedFlatCoordinates(),0,t.getEnds(),t.getStride()),this.fillState_&&e.fill(),this.strokeState_&&e.stroke()}if(""!==this.text_){var i=t.getFlatInteriorPoint();this.drawText_(i,0,2,2)}}},e.prototype.drawMultiPolygon=function(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),(0,P.kK)(this.extent_,t.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);var e=this.context_,i=t.getOrientedFlatCoordinates(),n=0,o=t.getEndss(),r=t.getStride();e.beginPath();for(var a=0,s=o.length;a<s;++a){var l=o[a];n=this.drawRings_(i,n,l,r)}this.fillState_&&e.fill(),this.strokeState_&&e.stroke()}if(""!==this.text_){var c=t.getFlatInteriorPoints();this.drawText_(c,0,c.length,2)}}},e.prototype.setContextFillState_=function(t){var e=this.context_,i=this.contextFillState_;i?i.fillStyle!=t.fillStyle&&(i.fillStyle=t.fillStyle,e.fillStyle=t.fillStyle):(e.fillStyle=t.fillStyle,this.contextFillState_={fillStyle:t.fillStyle})},e.prototype.setContextStrokeState_=function(t){var e=this.context_,i=this.contextStrokeState_;i?(i.lineCap!=t.lineCap&&(i.lineCap=t.lineCap,e.lineCap=t.lineCap),e.setLineDash&&((0,wt.fS)(i.lineDash,t.lineDash)||e.setLineDash(i.lineDash=t.lineDash),i.lineDashOffset!=t.lineDashOffset&&(i.lineDashOffset=t.lineDashOffset,e.lineDashOffset=t.lineDashOffset)),i.lineJoin!=t.lineJoin&&(i.lineJoin=t.lineJoin,e.lineJoin=t.lineJoin),i.lineWidth!=t.lineWidth&&(i.lineWidth=t.lineWidth,e.lineWidth=t.lineWidth),i.miterLimit!=t.miterLimit&&(i.miterLimit=t.miterLimit,e.miterLimit=t.miterLimit),i.strokeStyle!=t.strokeStyle&&(i.strokeStyle=t.strokeStyle,e.strokeStyle=t.strokeStyle)):(e.lineCap=t.lineCap,e.setLineDash&&(e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset),e.lineJoin=t.lineJoin,e.lineWidth=t.lineWidth,e.miterLimit=t.miterLimit,e.strokeStyle=t.strokeStyle,this.contextStrokeState_={lineCap:t.lineCap,lineDash:t.lineDash,lineDashOffset:t.lineDashOffset,lineJoin:t.lineJoin,lineWidth:t.lineWidth,miterLimit:t.miterLimit,strokeStyle:t.strokeStyle})},e.prototype.setContextTextState_=function(t){var e=this.context_,i=this.contextTextState_,n=t.textAlign?t.textAlign:Ki;i?(i.font!=t.font&&(i.font=t.font,e.font=t.font),i.textAlign!=n&&(i.textAlign=n,e.textAlign=n),i.textBaseline!=t.textBaseline&&(i.textBaseline=t.textBaseline,e.textBaseline=t.textBaseline)):(e.font=t.font,e.textAlign=n,e.textBaseline=t.textBaseline,this.contextTextState_={font:t.font,textAlign:n,textBaseline:t.textBaseline})},e.prototype.setFillStrokeStyle=function(t,e){var i=this;if(t){var n=t.getColor();this.fillState_={fillStyle:Gi(n||Wi)}}else this.fillState_=null;if(e){var o=e.getColor(),r=e.getLineCap(),a=e.getLineDash(),s=e.getLineDashOffset(),l=e.getLineJoin(),c=e.getWidth(),u=e.getMiterLimit(),h=a||Xi;this.strokeState_={lineCap:void 0!==r?r:Ui,lineDash:1===this.pixelRatio_?h:h.map((function(t){return t*i.pixelRatio_})),lineDashOffset:(s||0)*this.pixelRatio_,lineJoin:void 0!==l?l:Yi,lineWidth:(void 0!==c?c:1)*this.pixelRatio_,miterLimit:void 0!==u?u:10,strokeStyle:Gi(o||Vi)}}else this.strokeState_=null},e.prototype.setImageStyle=function(t){var e;if(t&&(e=t.getSize())){var i=t.getAnchor(),n=t.getOrigin();this.image_=t.getImage(this.pixelRatio_),this.imageAnchorX_=i[0]*this.pixelRatio_,this.imageAnchorY_=i[1]*this.pixelRatio_,this.imageHeight_=e[1]*this.pixelRatio_,this.imageOpacity_=t.getOpacity(),this.imageOriginX_=n[0],this.imageOriginY_=n[1],this.imageRotateWithView_=t.getRotateWithView(),this.imageRotation_=t.getRotation(),this.imageScale_=t.getScaleArray(),this.imageWidth_=e[0]*this.pixelRatio_}else this.image_=null},e.prototype.setTextStyle=function(t){if(t){var e=t.getFill();if(e){var i=e.getColor();this.textFillState_={fillStyle:Gi(i||Wi)}}else this.textFillState_=null;var n=t.getStroke();if(n){var o=n.getColor(),r=n.getLineCap(),a=n.getLineDash(),s=n.getLineDashOffset(),l=n.getLineJoin(),c=n.getWidth(),u=n.getMiterLimit();this.textStrokeState_={lineCap:void 0!==r?r:Ui,lineDash:a||Xi,lineDashOffset:s||0,lineJoin:void 0!==l?l:Yi,lineWidth:void 0!==c?c:1,miterLimit:void 0!==u?u:10,strokeStyle:Gi(o||Vi)}}else this.textStrokeState_=null;var h=t.getFont(),p=t.getOffsetX(),d=t.getOffsetY(),f=t.getRotateWithView(),g=t.getRotation(),_=t.getScaleArray(),y=t.getText(),v=t.getTextAlign(),m=t.getTextBaseline();this.textState_={font:void 0!==h?h:Zi,textAlign:void 0!==v?v:Ki,textBaseline:void 0!==m?m:Hi},this.text_=void 0!==y?y:"",this.textOffsetX_=void 0!==p?this.pixelRatio_*p:0,this.textOffsetY_=void 0!==d?this.pixelRatio_*d:0,this.textRotateWithView_=void 0!==f&&f,this.textRotation_=void 0!==g?g:0,this.textScale_=[this.pixelRatio_*_[0],this.pixelRatio_*_[1]]}else this.text_=""},e}(yo);var cr=.5;var ur={Point:function(t,e,i,n,o){var r,a=i.getImage(),s=i.getText();o&&(t=o,r=a&&s&&s.getText()?{}:void 0);if(a){if(a.getImageState()!=I)return;var l=t.getBuilder(i.getZIndex(),Do);l.setImageStyle(a,r),l.drawPoint(e,n)}if(s&&s.getText()){var c=t.getBuilder(i.getZIndex(),Bo);c.setTextStyle(s,r),c.drawText(e,n)}},LineString:function(t,e,i,n,o){var r=i.getStroke();if(r){var a=t.getBuilder(i.getZIndex(),zo);a.setFillStrokeStyle(null,r),a.drawLineString(e,n)}var s=i.getText();if(s&&s.getText()){var l=(o||t).getBuilder(i.getZIndex(),Bo);l.setTextStyle(s),l.drawText(e,n)}},Polygon:function(t,e,i,n,o){var r=i.getFill(),a=i.getStroke();if(r||a){var s=t.getBuilder(i.getZIndex(),No);s.setFillStrokeStyle(r,a),s.drawPolygon(e,n)}var l=i.getText();if(l&&l.getText()){var c=(o||t).getBuilder(i.getZIndex(),Bo);c.setTextStyle(l),c.drawText(e,n)}},MultiPoint:function(t,e,i,n,o){var r,a=i.getImage(),s=i.getText();o&&(t=o,r=a&&s&&s.getText()?{}:void 0);if(a){if(a.getImageState()!=I)return;var l=t.getBuilder(i.getZIndex(),Do);l.setImageStyle(a,r),l.drawMultiPoint(e,n)}if(s&&s.getText()){var c=(o||t).getBuilder(i.getZIndex(),Bo);c.setTextStyle(s,r),c.drawText(e,n)}},MultiLineString:function(t,e,i,n,o){var r=i.getStroke();if(r){var a=t.getBuilder(i.getZIndex(),zo);a.setFillStrokeStyle(null,r),a.drawMultiLineString(e,n)}var s=i.getText();if(s&&s.getText()){var l=(o||t).getBuilder(i.getZIndex(),Bo);l.setTextStyle(s),l.drawText(e,n)}},MultiPolygon:function(t,e,i,n,o){var r=i.getFill(),a=i.getStroke();if(a||r){var s=t.getBuilder(i.getZIndex(),No);s.setFillStrokeStyle(r,a),s.drawMultiPolygon(e,n)}var l=i.getText();if(l&&l.getText()){var c=(o||t).getBuilder(i.getZIndex(),Bo);c.setTextStyle(l),c.drawText(e,n)}},GeometryCollection:function(t,e,i,n,o){var r,a,s=e.getGeometriesArray();for(r=0,a=s.length;r<a;++r){(0,ur[s[r].getType()])(t,s[r],i,n,o)}},Circle:function(t,e,i,n,o){var r=i.getFill(),a=i.getStroke();if(r||a){var s=t.getBuilder(i.getZIndex(),Mo);s.setFillStrokeStyle(r,a),s.drawCircle(e,n)}var l=i.getText();if(l&&l.getText()){var c=(o||t).getBuilder(i.getZIndex(),Bo);c.setTextStyle(l),c.drawText(e,n)}}};function hr(t,e){return parseInt((0,p.sq)(t),10)-parseInt((0,p.sq)(e),10)}function pr(t,e){return.5*t/e}function dr(t,e,i,n,o,r,a){var s=!1,l=i.getImage();if(l){var c=l.getImageState();c==I||c==L?l.unlistenImageChange(o):(c==R&&l.load(),c=l.getImageState(),l.listenImageChange(o),s=!0)}return function(t,e,i,n,o,r){var a=i.getGeometryFunction()(e);if(!a)return;var s=a.simplifyTransformed(n,o);if(i.getRenderer())fr(t,s,i,e);else{(0,ur[s.getType()])(t,s,i,e,r)}}(t,e,i,n,r,a),s}function fr(t,e,i,n){if(e.getType()!=go.Z.GEOMETRY_COLLECTION)t.getBuilder(i.getZIndex(),ko).drawCustom(e,n,i.getRenderer(),i.getHitDetectionRenderer());else for(var o=e.getGeometries(),r=0,a=o.length;r<a;++r)fr(t,o[r],i,n)}function gr(t,e){for(var i=!0,n=t.length-1;n>=0;--n)if(t[n]!=e[n]){i=!1;break}return i}function _r(t,e){var i=Math.cos(e),n=Math.sin(e),o=t[0]*i-t[1]*n,r=t[1]*i+t[0]*n;return t[0]=o,t[1]=r,t}function yr(t,e){if(e.canWrapX()){var i=(0,P.dz)(e.getExtent()),n=function(t,e,i){var n=e.getExtent(),o=0;if(e.canWrapX()&&(t[0]<n[0]||t[0]>n[2])){var r=i||(0,P.dz)(n);o=Math.floor((t[0]-n[0])/r)}return o}(t,e,i);n&&(t[0]-=n*i)}return t}var vr=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),mr=function(t){function e(e){var i=t.call(this,e)||this;return i.boundHandleStyleImageChange_=i.handleStyleImageChange_.bind(i),i.animatingOrInteracting_,i.dirty_=!1,i.hitDetectionImageData_=null,i.renderedFeatures_=null,i.renderedRevision_=-1,i.renderedResolution_=NaN,i.renderedExtent_=(0,P.lJ)(),i.wrappedRenderedExtent_=(0,P.lJ)(),i.renderedRotation_,i.renderedCenter_=null,i.renderedProjection_=null,i.renderedRenderOrder_=null,i.replayGroup_=null,i.replayGroupChanged=!0,i.declutterExecutorGroup=null,i.clipping=!0,i}return vr(e,t),e.prototype.renderWorlds=function(t,e,i){var n=e.extent,o=e.viewState,r=o.center,a=o.resolution,s=o.projection,l=o.rotation,c=s.getExtent(),u=this.getLayer().getSource(),h=e.pixelRatio,p=e.viewHints,d=!(p[or]||p[rr]),f=this.context,g=Math.round(e.size[0]*h),_=Math.round(e.size[1]*h),y=u.getWrapX()&&s.canWrapX(),v=y?(0,P.dz)(c):null,m=y?Math.ceil((n[2]-c[2])/v)+1:1,x=y?Math.floor((n[0]-c[0])/v):0;do{var b=this.getRenderTransform(r,a,l,h,g,_,x*v);t.execute(f,1,b,l,d,void 0,i)}while(++x<m)},e.prototype.renderDeclutter=function(t){this.declutterExecutorGroup&&this.renderWorlds(this.declutterExecutorGroup,t,t.declutterTree)},e.prototype.renderFrame=function(t,e){var i=t.pixelRatio,n=t.layerStatesArray[t.layerIndex];(0,Se.n3)(this.pixelTransform,1/i,1/i),(0,Se.nb)(this.inversePixelTransform,this.pixelTransform);var o=(0,Se.BB)(this.pixelTransform);this.useContainer(e,o,n.opacity,this.getBackground(t));var r=this.context,a=r.canvas,s=this.replayGroup_,l=this.declutterExecutorGroup;if((!s||s.isEmpty())&&(!l||l.isEmpty()))return null;var c=Math.round(t.size[0]*i),u=Math.round(t.size[1]*i);a.width!=c||a.height!=u?(a.width=c,a.height=u,a.style.transform!==o&&(a.style.transform=o)):this.containerReused||r.clearRect(0,0,c,u),this.preRender(r,t);var h=t.viewState,p=h.projection,d=!1,f=!0;if(n.extent&&this.clipping){var g=(0,z.dY)(n.extent,p);(d=(f=(0,P.kK)(g,t.extent))&&!(0,P.r4)(g,t.extent))&&this.clipUnrotated(r,t,g)}f&&this.renderWorlds(s,t),d&&r.restore(),this.postRender(r,t);var _=Ue(n.opacity),y=this.container;return _!==y.style.opacity&&(y.style.opacity=_),this.renderedRotation_!==h.rotation&&(this.renderedRotation_=h.rotation,this.hitDetectionImageData_=null),this.container},e.prototype.getFeatures=function(t){return new Promise(function(e){if(!this.hitDetectionImageData_&&!this.animatingOrInteracting_){var i=[this.context.canvas.width,this.context.canvas.height];(0,Se.nn)(this.pixelTransform,i);var n=this.renderedCenter_,o=this.renderedResolution_,r=this.renderedRotation_,a=this.renderedProjection_,s=this.wrappedRenderedExtent_,l=this.getLayer(),c=[],u=i[0]*cr,h=i[1]*cr;c.push(this.getRenderTransform(n,o,r,cr,u,h,0).slice());var p=l.getSource(),d=a.getExtent();if(p.getWrapX()&&a.canWrapX()&&!(0,P.r4)(d,s)){for(var f=s[0],g=(0,P.dz)(d),_=0,y=void 0;f<d[0];)y=g*--_,c.push(this.getRenderTransform(n,o,r,cr,u,h,y).slice()),f+=g;for(_=0,f=s[2];f>d[2];)y=g*++_,c.push(this.getRenderTransform(n,o,r,cr,u,h,y).slice()),f-=g}this.hitDetectionImageData_=function(t,e,i,n,o,r,a){var s=w(t[0]*cr,t[1]*cr);s.imageSmoothingEnabled=!1;for(var l=s.canvas,c=new lr(s,cr,o,null,a),u=i.length,h=Math.floor(16777215/u),p={},d=1;d<=u;++d){var f=i[d-1],g=f.getStyleFunction()||n;if(n){var _=g(f,r);if(_){Array.isArray(_)||(_=[_]);for(var y="#"+("000000"+(d*h).toString(16)).slice(-6),v=0,m=_.length;v<m;++v){var x=_[v],b=x.getGeometryFunction()(f);if(b&&(0,P.kK)(o,b.getExtent())){var C=x.clone(),S=C.getFill();S&&S.setColor(y);var E=C.getStroke();E&&(E.setColor(y),E.setLineDash(null)),C.setText(void 0);var T=x.getImage();if(T&&0!==T.getOpacity()){var R=T.getImageSize();if(!R)continue;var O=w(R[0],R[1],void 0,{alpha:!1}),I=O.canvas;O.fillStyle=y,O.fillRect(0,0,I.width,I.height),C.setImage(new Mn({img:I,imgSize:R,anchor:T.getAnchor(),anchorXUnits:wn,anchorYUnits:wn,offset:T.getOrigin(),opacity:1,size:T.getSize(),scale:T.getScale(),rotation:T.getRotation(),rotateWithView:T.getRotateWithView()}))}var L=C.getZIndex()||0;(j=p[L])||(j={},p[L]=j,j[go.Z.POLYGON]=[],j[go.Z.CIRCLE]=[],j[go.Z.LINE_STRING]=[],j[go.Z.POINT]=[]),j[b.getType().replace("Multi","")].push(b,C)}}}}}for(var F=Object.keys(p).map(Number).sort(wt.kK),A=(d=0,F.length);d<A;++d){var j=p[F[d]];for(var M in j){var k=j[M];for(v=0,m=k.length;v<m;v+=2){c.setStyle(k[v+1]);for(var D=0,z=e.length;D<z;++D)c.setTransform(e[D]),c.drawGeometry(k[v])}}}return s.getImageData(0,0,l.width,l.height)}(i,c,this.renderedFeatures_,l.getStyleFunction(),s,o,r)}e(function(t,e,i){var n=[];if(i){var o=Math.floor(Math.round(t[0])*cr),r=Math.floor(Math.round(t[1])*cr),a=4*((0,N.uZ)(o,0,i.width-1)+(0,N.uZ)(r,0,i.height-1)*i.width),s=i.data[a],l=i.data[a+1],c=i.data[a+2]+256*(l+256*s),u=Math.floor(16777215/e.length);c&&c%u==0&&n.push(e[c/u-1])}return n}(t,this.renderedFeatures_,this.hitDetectionImageData_))}.bind(this))},e.prototype.forEachFeatureAtCoordinate=function(t,e,i,n,o){var r=this;if(this.replayGroup_){var a,s=e.viewState.resolution,l=e.viewState.rotation,c=this.getLayer(),u={},h=function(t,e,i){var r=(0,p.sq)(t),a=u[r];if(a){if(!0!==a&&i<a.distanceSq){if(0===i)return u[r]=!0,o.splice(o.lastIndexOf(a),1),n(t,c,e);a.geometry=e,a.distanceSq=i}}else{if(0===i)return u[r]=!0,n(t,c,e);o.push(u[r]={feature:t,layer:c,geometry:e,distanceSq:i,callback:n})}},d=[this.replayGroup_];return this.declutterExecutorGroup&&d.push(this.declutterExecutorGroup),d.some((function(n){return a=n.forEachFeatureAtCoordinate(t,s,l,i,h,n===r.declutterExecutorGroup&&e.declutterTree?e.declutterTree.all().map((function(t){return t.value})):null)})),a}},e.prototype.handleFontsChanged=function(){var t=this.getLayer();t.getVisible()&&this.replayGroup_&&t.changed()},e.prototype.handleStyleImageChange_=function(t){this.renderIfReadyAndVisible()},e.prototype.prepareFrame=function(t){var e=this.getLayer(),i=e.getSource();if(!i)return!1;var n=t.viewHints[or],o=t.viewHints[rr],r=e.getUpdateWhileAnimating(),a=e.getUpdateWhileInteracting();if(!this.dirty_&&!r&&n||!a&&o)return this.animatingOrInteracting_=!0,!0;this.animatingOrInteracting_=!1;var s=t.extent,l=t.viewState,c=l.projection,u=l.resolution,h=t.pixelRatio,p=e.getRevision(),d=e.getRenderBuffer(),f=e.getRenderOrder();void 0===f&&(f=hr);var g=l.center.slice(),_=(0,P.f3)(s,d*u),y=_.slice(),v=[_.slice()],m=c.getExtent();if(i.getWrapX()&&c.canWrapX()&&!(0,P.r4)(m,t.extent)){var x=(0,P.dz)(m),b=Math.max((0,P.dz)(_)/2,x);_[0]=m[0]-b,_[2]=m[2]+b,yr(g,c);var w=(0,P.Cf)(v[0],c);w[0]<m[0]&&w[2]<m[2]?v.push([w[0]+x,w[1],w[2]+x,w[3]]):w[0]>m[0]&&w[2]>m[2]&&v.push([w[0]-x,w[1],w[2]-x,w[3]])}if(!this.dirty_&&this.renderedResolution_==u&&this.renderedRevision_==p&&this.renderedRenderOrder_==f&&(0,P.r4)(this.wrappedRenderedExtent_,_))return(0,wt.fS)(this.renderedExtent_,y)||(this.hitDetectionImageData_=null,this.renderedExtent_=y),this.renderedCenter_=g,this.replayGroupChanged=!1,!0;this.replayGroup_=null,this.dirty_=!1;var C,S=new jo(pr(u,h),_,u,h);this.getLayer().getDeclutter()&&(C=new jo(pr(u,h),_,u,h));var E,T=(0,z.Cs)();if(T){for(var R=0,O=v.length;R<O;++R){var I=v[R],L=(0,z.Fj)(I,c);i.loadFeatures(L,(0,z.on)(u,c),T)}E=(0,z.WO)(T,c)}else for(R=0,O=v.length;R<O;++R)i.loadFeatures(v[R],u,c);var F=function(t,e){var i=pr(t,e);return i*i}(u,h),A=function(t){var i,n=t.getStyleFunction()||e.getStyleFunction();if(n&&(i=n(t,u)),i){var o=this.renderFeature(t,F,i,S,E,C);this.dirty_=this.dirty_||o}}.bind(this),j=(0,z.Fj)(_,c),M=i.getFeaturesInExtent(j);f&&M.sort(f);for(R=0,O=M.length;R<O;++R)A(M[R]);this.renderedFeatures_=M;var k=S.finish(),D=new nr(_,u,h,i.getOverlaps(),k,e.getRenderBuffer());return C&&(this.declutterExecutorGroup=new nr(_,u,h,i.getOverlaps(),C.finish(),e.getRenderBuffer())),this.renderedResolution_=u,this.renderedRevision_=p,this.renderedRenderOrder_=f,this.renderedExtent_=y,this.wrappedRenderedExtent_=_,this.renderedCenter_=g,this.renderedProjection_=c,this.replayGroup_=D,this.hitDetectionImageData_=null,this.replayGroupChanged=!0,!0},e.prototype.renderFeature=function(t,e,i,n,o,r){if(!i)return!1;var a=!1;if(Array.isArray(i))for(var s=0,l=i.length;s<l;++s)a=dr(n,t,i[s],e,this.boundHandleStyleImageChange_,o,r)||a;else a=dr(n,t,i,e,this.boundHandleStyleImageChange_,o,r);return a},e}(ke);const xr=mr;var br=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();const wr=function(t){function e(e){return t.call(this,e)||this}return br(e,t),e.prototype.createRenderer=function(){return new xr(this)},e}(so);var Cr=i("../../opt/drone/yarncache/ol-npm-6.12.0-aa56e5c786-a0eb5766bd.zip/node_modules/ol/Feature.js"),Sr=i("../../opt/drone/yarncache/ol-npm-6.12.0-aa56e5c786-a0eb5766bd.zip/node_modules/ol/AssertionError.js");const Er="add",Tr="remove";var Rr=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Or="length",Ir=function(t){function e(e,i,n){var o=t.call(this,e)||this;return o.element=i,o.index=n,o}return Rr(e,t),e}(ut.ZP),Lr=function(t){function e(e,i){var n=t.call(this)||this;n.on,n.once,n.un;var o=i||{};if(n.unique_=!!o.unique,n.array_=e||[],n.unique_)for(var r=0,a=n.array_.length;r<a;++r)n.assertUnique_(n.array_[r],r);return n.updateLength_(),n}return Rr(e,t),e.prototype.clear=function(){for(;this.getLength()>0;)this.pop()},e.prototype.extend=function(t){for(var e=0,i=t.length;e<i;++e)this.push(t[e]);return this},e.prototype.forEach=function(t){for(var e=this.array_,i=0,n=e.length;i<n;++i)t(e[i],i,e)},e.prototype.getArray=function(){return this.array_},e.prototype.item=function(t){return this.array_[t]},e.prototype.getLength=function(){return this.get(Or)},e.prototype.insertAt=function(t,e){this.unique_&&this.assertUnique_(e),this.array_.splice(t,0,e),this.updateLength_(),this.dispatchEvent(new Ir(Er,e,t))},e.prototype.pop=function(){return this.removeAt(this.getLength()-1)},e.prototype.push=function(t){this.unique_&&this.assertUnique_(t);var e=this.getLength();return this.insertAt(e,t),this.getLength()},e.prototype.remove=function(t){for(var e=this.array_,i=0,n=e.length;i<n;++i)if(e[i]===t)return this.removeAt(i)},e.prototype.removeAt=function(t){var e=this.array_[t];return this.array_.splice(t,1),this.updateLength_(),this.dispatchEvent(new Ir(Tr,e,t)),e},e.prototype.setAt=function(t,e){var i=this.getLength();if(t<i){this.unique_&&this.assertUnique_(e,t);var n=this.array_[t];this.array_[t]=e,this.dispatchEvent(new Ir(Tr,n,t)),this.dispatchEvent(new Ir(Er,e,t))}else{for(var o=i;o<t;++o)this.insertAt(o,void 0);this.insertAt(t,e)}},e.prototype.updateLength_=function(){this.set(Or,this.array_.length)},e.prototype.assertUnique_=function(t,e){for(var i=0,n=this.array_.length;i<n;++i)if(this.array_[i]===t&&i!==e)throw new Sr.Z(58)},e}(ht.Z);const Pr=Lr;var Fr=i("../../opt/drone/yarncache/ol-npm-6.12.0-aa56e5c786-a0eb5766bd.zip/node_modules/ol/ObjectEventType.js"),Ar=function(){function t(t){this.rbush_=new no(t),this.items_={}}return t.prototype.insert=function(t,e){var i={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3],value:e};this.rbush_.insert(i),this.items_[(0,p.sq)(e)]=i},t.prototype.load=function(t,e){for(var i=new Array(e.length),n=0,o=e.length;n<o;n++){var r=t[n],a=e[n],s={minX:r[0],minY:r[1],maxX:r[2],maxY:r[3],value:a};i[n]=s,this.items_[(0,p.sq)(a)]=s}this.rbush_.load(i)},t.prototype.remove=function(t){var e=(0,p.sq)(t),i=this.items_[e];return delete this.items_[e],null!==this.rbush_.remove(i)},t.prototype.update=function(t,e){var i=this.items_[(0,p.sq)(e)],n=[i.minX,i.minY,i.maxX,i.maxY];(0,P.fS)(n,t)||(this.remove(e),this.insert(t,e))},t.prototype.getAll=function(){return this.rbush_.all().map((function(t){return t.value}))},t.prototype.getInExtent=function(t){var e={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]};return this.rbush_.search(e).map((function(t){return t.value}))},t.prototype.forEach=function(t){return this.forEach_(this.getAll(),t)},t.prototype.forEachInExtent=function(t,e){return this.forEach_(this.getInExtent(t),e)},t.prototype.forEach_=function(t,e){for(var i,n=0,o=t.length;n<o;n++)if(i=e(t[n]))return i;return i},t.prototype.isEmpty=function(){return(0,X.xb)(this.items_)},t.prototype.clear=function(){this.rbush_.clear(),this.items_={}},t.prototype.getExtent=function(t){var e=this.rbush_.toJSON();return(0,P.T9)(e.minX,e.minY,e.maxX,e.maxY,t)},t.prototype.concat=function(t){for(var e in this.rbush_.load(t.rbush_.all()),t.items_)this.items_[e]=t.items_[e]},t}();const jr=Ar,Mr="addfeature",kr="changefeature",Dr="clear",zr="removefeature",Nr="featuresloadstart",Br="featuresloadend",Gr="featuresloaderror";var Zr=i("../../opt/drone/yarncache/ol-npm-6.12.0-aa56e5c786-a0eb5766bd.zip/node_modules/ol/functions.js");function Wr(t,e){return[[-1/0,-1/0,1/0,1/0]]}var Ur=i("../../opt/drone/yarncache/ol-npm-6.12.0-aa56e5c786-a0eb5766bd.zip/node_modules/ol/format/FormatType.js"),Xr=!1;function Yr(t,e){return function(i,n,o,r,a){var s=this;!function(t,e,i,n,o,r,a){var s=new XMLHttpRequest;s.open("GET","function"==typeof t?t(i,n,o):t,!0),e.getType()==Ur.Z.ARRAY_BUFFER&&(s.responseType="arraybuffer"),s.withCredentials=Xr,s.onload=function(t){if(!s.status||s.status>=200&&s.status<300){var n=e.getType(),l=void 0;n==Ur.Z.JSON||n==Ur.Z.TEXT?l=s.responseText:n==Ur.Z.XML?(l=s.responseXML)||(l=(new DOMParser).parseFromString(s.responseText,"application/xml")):n==Ur.Z.ARRAY_BUFFER&&(l=s.response),l?r(e.readFeatures(l,{extent:i,featureProjection:o}),e.readProjection(l)):a()}else a()},s.onerror=a,s.send()}(t,e,i,n,o,(function(t,e){s.addFeatures(t),void 0!==r&&r(t)}),a||Zr.Zn)}}var Vr=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Kr=function(t){function e(e,i,n){var o=t.call(this,e)||this;return o.feature=i,o.features=n,o}return Vr(e,t),e}(ut.ZP),Hr=function(t){function e(e){var i=this,n=e||{};(i=t.call(this,{attributions:n.attributions,interpolate:!0,projection:void 0,state:dt,wrapX:void 0===n.wrapX||n.wrapX})||this).on,i.once,i.un,i.loader_=Zr.Zn,i.format_=n.format,i.overlaps_=void 0===n.overlaps||n.overlaps,i.url_=n.url,void 0!==n.loader?i.loader_=n.loader:void 0!==i.url_&&((0,Q.h)(i.format_,7),i.loader_=Yr(i.url_,i.format_)),i.strategy_=void 0!==n.strategy?n.strategy:Wr;var o,r,a=void 0===n.useSpatialIndex||n.useSpatialIndex;return i.featuresRtree_=a?new jr:null,i.loadedExtentsRtree_=new jr,i.loadingExtentsCount_=0,i.nullGeometryFeatures_={},i.idIndex_={},i.uidIndex_={},i.featureChangeKeys_={},i.featuresCollection_=null,Array.isArray(n.features)?r=n.features:n.features&&(r=(o=n.features).getArray()),a||void 0!==o||(o=new Pr(r)),void 0!==r&&i.addFeaturesInternal(r),void 0!==o&&i.bindFeaturesCollection_(o),i}return Vr(e,t),e.prototype.addFeature=function(t){this.addFeatureInternal(t),this.changed()},e.prototype.addFeatureInternal=function(t){var e=(0,p.sq)(t);if(this.addToIndex_(e,t)){this.setupChangeEvents_(e,t);var i=t.getGeometry();if(i){var n=i.getExtent();this.featuresRtree_&&this.featuresRtree_.insert(n,t)}else this.nullGeometryFeatures_[e]=t;this.dispatchEvent(new Kr(Mr,t))}else this.featuresCollection_&&this.featuresCollection_.remove(t)},e.prototype.setupChangeEvents_=function(t,e){this.featureChangeKeys_[t]=[(0,F.oL)(e,r.Z.CHANGE,this.handleFeatureChange_,this),(0,F.oL)(e,Fr.Z.PROPERTYCHANGE,this.handleFeatureChange_,this)]},e.prototype.addToIndex_=function(t,e){var i=!0,n=e.getId();return void 0!==n&&(n.toString()in this.idIndex_?i=!1:this.idIndex_[n.toString()]=e),i&&((0,Q.h)(!(t in this.uidIndex_),30),this.uidIndex_[t]=e),i},e.prototype.addFeatures=function(t){this.addFeaturesInternal(t),this.changed()},e.prototype.addFeaturesInternal=function(t){for(var e=[],i=[],n=[],o=0,r=t.length;o<r;o++){var a=t[o],s=(0,p.sq)(a);this.addToIndex_(s,a)&&i.push(a)}o=0;for(var l=i.length;o<l;o++){a=i[o],s=(0,p.sq)(a);this.setupChangeEvents_(s,a);var c=a.getGeometry();if(c){var u=c.getExtent();e.push(u),n.push(a)}else this.nullGeometryFeatures_[s]=a}this.featuresRtree_&&this.featuresRtree_.load(e,n);o=0;for(var h=i.length;o<h;o++)this.dispatchEvent(new Kr(Mr,i[o]))},e.prototype.bindFeaturesCollection_=function(t){var e=!1;this.addEventListener(Mr,(function(i){e||(e=!0,t.push(i.feature),e=!1)})),this.addEventListener(zr,(function(i){e||(e=!0,t.remove(i.feature),e=!1)})),t.addEventListener(Er,function(t){e||(e=!0,this.addFeature(t.element),e=!1)}.bind(this)),t.addEventListener(Tr,function(t){e||(e=!0,this.removeFeature(t.element),e=!1)}.bind(this)),this.featuresCollection_=t},e.prototype.clear=function(t){if(t){for(var e in this.featureChangeKeys_){this.featureChangeKeys_[e].forEach(F.bN)}this.featuresCollection_||(this.featureChangeKeys_={},this.idIndex_={},this.uidIndex_={})}else if(this.featuresRtree_){var i=function(t){this.removeFeatureInternal(t)}.bind(this);for(var n in this.featuresRtree_.forEach(i),this.nullGeometryFeatures_)this.removeFeatureInternal(this.nullGeometryFeatures_[n])}this.featuresCollection_&&this.featuresCollection_.clear(),this.featuresRtree_&&this.featuresRtree_.clear(),this.nullGeometryFeatures_={};var o=new Kr(Dr);this.dispatchEvent(o),this.changed()},e.prototype.forEachFeature=function(t){if(this.featuresRtree_)return this.featuresRtree_.forEach(t);this.featuresCollection_&&this.featuresCollection_.forEach(t)},e.prototype.forEachFeatureAtCoordinateDirect=function(t,e){var i=[t[0],t[1],t[0],t[1]];return this.forEachFeatureInExtent(i,(function(i){return i.getGeometry().intersectsCoordinate(t)?e(i):void 0}))},e.prototype.forEachFeatureInExtent=function(t,e){if(this.featuresRtree_)return this.featuresRtree_.forEachInExtent(t,e);this.featuresCollection_&&this.featuresCollection_.forEach(e)},e.prototype.forEachFeatureIntersectingExtent=function(t,e){return this.forEachFeatureInExtent(t,(function(i){if(i.getGeometry().intersectsExtent(t)){var n=e(i);if(n)return n}}))},e.prototype.getFeaturesCollection=function(){return this.featuresCollection_},e.prototype.getFeatures=function(){var t;return this.featuresCollection_?t=this.featuresCollection_.getArray().slice(0):this.featuresRtree_&&(t=this.featuresRtree_.getAll(),(0,X.xb)(this.nullGeometryFeatures_)||(0,wt.l7)(t,(0,X.KX)(this.nullGeometryFeatures_))),t},e.prototype.getFeaturesAtCoordinate=function(t){var e=[];return this.forEachFeatureAtCoordinateDirect(t,(function(t){e.push(t)})),e},e.prototype.getFeaturesInExtent=function(t){return this.featuresRtree_?this.featuresRtree_.getInExtent(t):this.featuresCollection_?this.featuresCollection_.getArray().slice(0):[]},e.prototype.getClosestFeatureToCoordinate=function(t,e){var i=t[0],n=t[1],o=null,r=[NaN,NaN],a=1/0,s=[-1/0,-1/0,1/0,1/0],l=e||Zr.uX;return this.featuresRtree_.forEachInExtent(s,(function(t){if(l(t)){var e=t.getGeometry(),c=a;if((a=e.closestPointXY(i,n,r,a))<c){o=t;var u=Math.sqrt(a);s[0]=i-u,s[1]=n-u,s[2]=i+u,s[3]=n+u}}})),o},e.prototype.getExtent=function(t){return this.featuresRtree_.getExtent(t)},e.prototype.getFeatureById=function(t){var e=this.idIndex_[t.toString()];return void 0!==e?e:null},e.prototype.getFeatureByUid=function(t){var e=this.uidIndex_[t];return void 0!==e?e:null},e.prototype.getFormat=function(){return this.format_},e.prototype.getOverlaps=function(){return this.overlaps_},e.prototype.getUrl=function(){return this.url_},e.prototype.handleFeatureChange_=function(t){var e=t.target,i=(0,p.sq)(e),n=e.getGeometry();if(n){var o=n.getExtent();i in this.nullGeometryFeatures_?(delete this.nullGeometryFeatures_[i],this.featuresRtree_&&this.featuresRtree_.insert(o,e)):this.featuresRtree_&&this.featuresRtree_.update(o,e)}else i in this.nullGeometryFeatures_||(this.featuresRtree_&&this.featuresRtree_.remove(e),this.nullGeometryFeatures_[i]=e);var r=e.getId();if(void 0!==r){var a=r.toString();this.idIndex_[a]!==e&&(this.removeFromIdIndex_(e),this.idIndex_[a]=e)}else this.removeFromIdIndex_(e),this.uidIndex_[i]=e;this.changed(),this.dispatchEvent(new Kr(kr,e))},e.prototype.hasFeature=function(t){var e=t.getId();return void 0!==e?e in this.idIndex_:(0,p.sq)(t)in this.uidIndex_},e.prototype.isEmpty=function(){return this.featuresRtree_.isEmpty()&&(0,X.xb)(this.nullGeometryFeatures_)},e.prototype.loadFeatures=function(t,e,i){for(var n=this.loadedExtentsRtree_,o=this.strategy_(t,e,i),r=function(t,r){var s=o[t];n.forEachInExtent(s,(function(t){return(0,P.r4)(t.extent,s)}))||(++a.loadingExtentsCount_,a.dispatchEvent(new Kr(Nr)),a.loader_.call(a,s,e,i,function(t){--this.loadingExtentsCount_,this.dispatchEvent(new Kr(Br,void 0,t))}.bind(a),function(){--this.loadingExtentsCount_,this.dispatchEvent(new Kr(Gr))}.bind(a)),n.insert(s,{extent:s.slice()}))},a=this,s=0,l=o.length;s<l;++s)r(s);this.loading=!(this.loader_.length<4)&&this.loadingExtentsCount_>0},e.prototype.refresh=function(){this.clear(!0),this.loadedExtentsRtree_.clear(),t.prototype.refresh.call(this)},e.prototype.removeLoadedExtent=function(t){var e,i=this.loadedExtentsRtree_;i.forEachInExtent(t,(function(i){if((0,P.fS)(i.extent,t))return e=i,!0})),e&&i.remove(e)},e.prototype.removeFeature=function(t){if(t){var e=(0,p.sq)(t);e in this.nullGeometryFeatures_?delete this.nullGeometryFeatures_[e]:this.featuresRtree_&&this.featuresRtree_.remove(t),this.removeFeatureInternal(t)&&this.changed()}},e.prototype.removeFeatureInternal=function(t){var e=(0,p.sq)(t),i=this.featureChangeKeys_[e];if(i){i.forEach(F.bN),delete this.featureChangeKeys_[e];var n=t.getId();return void 0!==n&&delete this.idIndex_[n.toString()],delete this.uidIndex_[e],this.dispatchEvent(new Kr(zr,t)),t}},e.prototype.removeFromIdIndex_=function(t){var e=!1;for(var i in this.idIndex_)if(this.idIndex_[i]===t){delete this.idIndex_[i],e=!0;break}return e},e.prototype.setLoader=function(t){this.loader_=t},e.prototype.setUrl=function(t){(0,Q.h)(this.format_,7),this.url_=t,this.setLoader(Yr(t,this.format_))},e}(_t);const qr=Hr;class $r extends qr{constructor(t){super({}),this.location=t}update(t){this.clear(!0);const e=(0,pi.g6)(t,this.location);if(e.field){for(let i=0;i<t.length;i++)this.addFeatureInternal(new Cr.Z({frame:t,rowIndex:i,geometry:e.field.values.get(i)}));this.changed()}else this.changed()}}const Jr={style:Oi,showLegend:!0},Qr="markers",ta={type:Qr,name:"",config:Jr,location:{mode:o.FrameGeometrySourceMode.Auto},tooltip:!0},ea={id:Qr,name:"Markers",description:"Use markers to render each data point",isBaseMap:!1,showLocation:!0,create:async(t,e,i)=>{const n=Object.assign({},Jr,null==e?void 0:e.config),o=new Si.t(1);let r=null;n.showLegend&&(r=(0,fi.jsx)(gi,{watch:o,initialSubProps:{},child:wi}));const a=await eo(n.style),s=await(0,pi.cJ)(e.location),l=new $r(s),c=new wr({source:l});return a.fields?c.setStyle((t=>{const e=t.get("rowIndex"),i=a.dims;if(!i||!(0,Li.isNumber)(e))return a.maker(a.base);const n=Object.assign({},a.base);return i.color&&(n.color=i.color.get(e)),i.size&&(n.size=i.size.get(e)),i.text&&(n.text=i.text.get(e)),i.rotation&&(n.rotation=i.rotation.get(e)),a.maker(n)})):c.setStyle(a.maker(a.base)),{init:()=>c,legend:r,update:t=>{var n;if(null!==(n=t.series)&&void 0!==n&&n.length)for(const n of t.series){if(a.fields){const t={};var s,c,u;if(a.fields.color)t.color=(0,di.PX)(n,null!==(s=a.config.color)&&void 0!==s?s:Oi.color,i);if(a.fields.size)t.size=(0,di.W8)(n,null!==(c=a.config.size)&&void 0!==c?c:Oi.size);if(a.fields.text&&(t.text=(0,di.Bw)(n,a.config.text)),a.fields.rotation)t.rotation=(0,di.yq)(n,null!==(u=a.config.rotation)&&void 0!==u?u:Oi.rotation);a.dims=t}var h;if(r)o.next({styleConfig:a,size:null===(h=a.dims)||void 0===h?void 0:h.size,layerName:e.name});l.update(n);break}else l.clear()},registerOptionsUI:t=>{t.addCustomEditor({id:"config.style",path:"config.style",name:"Styles",editor:io,settings:{displayRotation:!0},defaultValue:Jr.style}).addBooleanSwitch({path:"config.showLegend",name:"Show legend",description:"Show map legend",defaultValue:Jr.showLegend})}}},defaultOptions:Jr};var ia=i("../../opt/drone/yarncache/ol-npm-6.12.0-aa56e5c786-a0eb5766bd.zip/node_modules/ol/format/GeoJSON.js");let na;!function(t){t.Zero="zero",t.Coordinates="coords"}(na||(na={}));const oa=new o.Registry((()=>[{id:na.Zero,name:"(0°, 0°)",lat:0,lon:0},{id:"north-america",name:"North America",lat:40,lon:-100,zoom:4},{id:"europe",name:"Europe",lat:46,lon:14,zoom:4},{id:"west-asia",name:"West Asia",lat:26,lon:53,zoom:4},{id:"se-asia",name:"South-east Asia",lat:10,lon:106,zoom:4},{id:na.Coordinates,name:"Coordinates"}])),ra={id:na.Zero,lat:0,lon:0,zoom:1};let aa;!function(t){t.EQ="eq",t.NEQ="neq",t.LT="lt",t.LTE="lte",t.GT="gt",t.GTE="gte"}(aa||(aa={}));const sa=(t,e)=>{const i=e.get(t.property);switch(t.operation){case aa.EQ:return`${i}`==`${t.value}`;case aa.NEQ:return i!==t.value;case aa.GT:return i>t.value;case aa.GTE:return i>=t.value;case aa.LT:return i<t.value;case aa.LTE:return i<=t.value;default:return!1}};function la(t,e){if(t&&!e){const e={label:`${t}`,value:t};return{options:[e],current:e}}e||(e=[]);let i=e.find((e=>e.value===t));return t&&!i&&(i={label:`${t} (not found)`,value:t},e.push(i)),{options:e,current:i}}var ca=i("./public/app/features/dimensions/editors/NumberInput.tsx");const ua=[{label:"==",value:aa.EQ},{label:"!=",value:aa.NEQ},{label:">",value:aa.GT},{label:">=",value:aa.GTE},{label:"<",value:aa.LT},{label:"<=",value:aa.LTE}],ha=t=>{var e,i;const{value:o,onChange:r,item:a,context:s}=t,l=a.settings,{features:c,layerInfo:u}=l,h=(0,Ii.Z)(u),p=(0,Ii.Z)(c),d=(0,n.useMemo)((()=>{var t,e;const i=null==o||null===(t=o.check)||void 0===t?void 0:t.property;return i&&p&&(null===(e=o.check)||void 0===e?void 0:e.operation)===aa.EQ?function(t,e){const i=new Set;for(const n of t){const t=n.get(e);null!=t&&i.add(`${t}`)}const n=Array.from(i);return n.sort(),n}(p,i).map((t=>{let e;return e=!isNaN(Number(t))?{value:Number(t),label:t}:{value:t,label:t},e})):[]}),[p,o]),f=(0,yi.useStyles2)(pa),g=(0,n.useCallback)((t=>{r(Object.assign({},o,{check:Object.assign({},o.check,{property:null==t?void 0:t.value})}))}),[r,o]),_=(0,n.useCallback)((t=>{var e;r(Object.assign({},o,{check:Object.assign({},o.check,{operation:null!==(e=t.value)&&void 0!==e?e:aa.EQ})}))}),[r,o]),y=(0,n.useCallback)((t=>{r(Object.assign({},o,{check:Object.assign({},o.check,{value:null==t?void 0:t.value})}))}),[r,o]),v=(0,n.useCallback)((t=>{r(Object.assign({},o,{check:Object.assign({},o.check,{value:t})}))}),[r,o]),m=(0,n.useCallback)((t=>{r(Object.assign({},o,{style:t}))}),[r,o]),x=(0,n.useCallback)((()=>{r(void 0)}),[r]),b=null!==(e=o.check)&&void 0!==e?e:ya.check,w=la(b.property,null==h?void 0:h.propertes),C=la(b.value,d);return(0,fi.jsxs)("div",{className:f.rule,children:[(0,fi.jsxs)(yi.InlineFieldRow,{className:f.row,children:[(0,fi.jsx)(yi.InlineField,{label:"Rule",labelWidth:10,grow:!0,children:(0,fi.jsx)(yi.Select,{menuShouldPortal:!0,placeholder:"Feature property",value:w.current,options:w.options,onChange:g,"aria-label":"Feature property",isClearable:!0,allowCustomValue:!0})}),(0,fi.jsx)(yi.InlineField,{className:f.inline,children:(0,fi.jsx)(yi.Select,{menuShouldPortal:!0,value:ua.find((t=>t.value===b.operation)),options:ua,onChange:_,"aria-label":"Comparison operator",width:8})}),(0,fi.jsx)(yi.InlineField,{className:f.inline,grow:!0,children:(0,fi.jsxs)("div",{className:f.flexRow,children:[(b.operation===aa.EQ||b.operation===aa.NEQ)&&(0,fi.jsx)(yi.Select,{menuShouldPortal:!0,placeholder:"value",value:C.current,options:C.options,onChange:y,"aria-label":"Comparison value",isClearable:!0,allowCustomValue:!0}),b.operation!==aa.EQ&&(0,fi.jsx)(ca.Y,{value:isNaN(Number(b.value))?0:Number(b.value),placeholder:"numeric value",onChange:v},`${b.property}/${b.operation}`)]})}),(0,fi.jsx)(yi.Button,{size:"md",icon:"trash-alt",onClick:()=>x(),variant:"secondary","aria-label":"Delete style rule",className:f.button})]}),(0,fi.jsx)("div",{children:(0,fi.jsx)(io,{value:null!==(i=o.style)&&void 0!==i?i:Oi,context:s,onChange:m,item:{settings:{simpleFixedValues:!0,layerInfo:u}}})})]})},pa=t=>({rule:vi.css`
    margin-bottom: ${t.spacing(1)};
  `,row:vi.css`
    display: flex;
    margin-bottom: 4px;
  `,inline:vi.css`
    margin-bottom: 0;
    margin-left: 4px;
  `,button:vi.css`
    margin-left: 4px;
  `,flexRow:vi.css`
    display: flex;
    flex-direction: row;
    align-items: flex-start;
  `}),da=t=>{const{value:e,onChange:i,context:o,item:r}=t,a=(0,yi.useTheme2)(),s=r.settings,l=(0,n.useCallback)((()=>{const{palette:t}=a.visualization,n={fixed:t[Math.floor(Math.random()*t.length)]},o=[...e,Object.assign({},ya,{style:Object.assign({},Oi,{color:n})})];i(o)}),[i,e,a.visualization]),c=(0,n.useCallback)((t=>n=>{const o=[...e];n?o[t]=n:o.splice(t,1),i(o)}),[i,e]),u=e&&e.map(((t,e)=>{var i;const n={settings:s};return(0,fi.jsx)(ha,{value:t,onChange:c(e),context:o,item:n},`${e}-${null===(i=t.check)||void 0===i?void 0:i.property}`)}));return(0,fi.jsxs)(fi.Fragment,{children:[u,(0,fi.jsx)(yi.Button,{size:"sm",icon:"plus",onClick:l,variant:"secondary","aria-label":"Add geomap style rule",children:"Add style rule"})]})};var fa=i("../../opt/drone/yarncache/rxjs-npm-7.5.1-ce59cbb6a3-78e3eecb16.zip/node_modules/rxjs/dist/esm5/internal/operators/first.js"),ga=i("../../opt/drone/yarncache/rxjs-npm-7.5.1-ce59cbb6a3-78e3eecb16.zip/node_modules/rxjs/dist/esm5/internal/operators/map.js");const _a={src:"public/maps/countries.geojson",rules:[],style:Oi},ya={style:Oi,check:{property:"",operation:aa.EQ,value:""}};let va;const ma={id:"geojson",name:"GeoJSON",description:"Load static data from a geojson file",isBaseMap:!1,state:o.PluginState.beta,create:async(t,e,i)=>{const n=Object.assign({},_a,e.config),o=new qr({url:n.src,format:new ia.Z}),r=new Si.t,a=o.on("change",(()=>{"ready"==o.getState()&&((0,ve.B)(a),r.next(o.getFeatures()))})),s=[];if(n.rules)for(const t of n.rules)if(t.style){const e=await eo(t.style);s.push({state:e,rule:t.check})}{const t=await eo(n.style);s.push({state:t})}const l=new wr({source:o,style:t=>{var e;const i="Point"===(null===(e=t.getGeometry())||void 0===e?void 0:e.getType());for(const e of s)if(!e.rule||sa(e.rule,t)){if(e.state.fields){const n=Object.assign({},e.state.base),{text:o}=e.state.fields;return o&&(n.text=`${t.get(o)}`),i?e.state.maker(n):Hn(n)}return i?(e.point||(e.point=e.state.maker(e.state.base)),e.point):(e.poly||(e.poly=Hn(e.state.base)),e.poly)}}});return{init:()=>l,update:t=>{console.log("todo... find values matching the ID and update")},registerOptionsUI:t=>{var e;const i=r.pipe((0,fa.P)(),(0,ga.U)((t=>function(t){const e=new Set,i=new Set;t.some(((t,n)=>{for(const n of Object.keys(t.getProperties())){if("geometry"===n)continue;i.add(n);const o=t.getGeometry();o&&e.add(o.getType())}return n>10}));let n=Ei.Any;if(1===e.size)switch(e.values().next().value){case"Point":case"MultiPoint":n=Ei.Point;break;case"Line":case"MultiLine":n=Ei.Line;break;case"Polygon":n=Ei.Polygon}return{geometryType:n,propertes:Array.from(i.keys()).map((t=>({label:t,value:t})))}}(t))));va||async function(){if(va)return;va=[];const t=await(0,Ai.getDataSourceSrv)().get("-- Grafana --");for(let e of["maps","gazetteer"])t.listFiles(e).subscribe({next:t=>{t.forEach((t=>{if(t.name.endsWith(".geojson")){const i=`public/${e}/${t.name}`;va.push({value:i,label:i})}}))}})}(),t.addSelect({path:"config.src",name:"GeoJSON URL",settings:{options:null!==(e=va)&&void 0!==e?e:[],allowCustomValue:!0},defaultValue:_a.src}).addCustomEditor({id:"config.style",path:"config.style",name:"Default style",description:"The style to apply when no rules above match",editor:io,settings:{simpleFixedValues:!0,layerInfo:i},defaultValue:_a.style}).addCustomEditor({id:"config.rules",path:"config.rules",name:"Style rules",description:"Apply styles based on feature properties",editor:da,settings:{features:r,layerInfo:i},defaultValue:[]})}}},defaultOptions:_a};var xa=34962,ba=34963,wa=35048,Ca=["experimental-webgl","webgl","webkit-3d","moz-webgl"];function Sa(t,e){for(var i=(0,X.f0)({preserveDrawingBuffer:!0},e),n=Ca.length,o=0;o<n;++o)try{var r=t.getContext(Ca[o],i);if(r)return r}catch(t){}return null}var Ea=35044,Ta=function(){function t(t,e){this.array=null,this.type=t,(0,Q.h)(t===xa||t===ba,62),this.usage=void 0!==e?e:Ea}return t.prototype.ofSize=function(t){this.array=new(Ra(this.type))(t)},t.prototype.fromArray=function(t){var e=Ra(this.type);this.array=e.from?e.from(t):new e(t)},t.prototype.fromArrayBuffer=function(t){this.array=new(Ra(this.type))(t)},t.prototype.getType=function(){return this.type},t.prototype.getArray=function(){return this.array},t.prototype.getUsage=function(){return this.usage},t.prototype.getSize=function(){return this.array?this.array.length:0},t}();function Ra(t){return t===ba?Uint32Array:Float32Array}const Oa=Ta,Ia="webglcontextlost",La="webglcontextrestored";var Pa=i("../../opt/drone/yarncache/ol-npm-6.12.0-aa56e5c786-a0eb5766bd.zip/node_modules/ol/Disposable.js"),Fa=function(){function t(t){this.gl_=t.webGlContext;var e=this.gl_;this.scaleRatio_=t.scaleRatio||1,this.renderTargetTexture_=e.createTexture(),this.renderTargetTextureSize_=null,this.frameBuffer_=e.createFramebuffer();var i=e.createShader(e.VERTEX_SHADER);e.shaderSource(i,t.vertexShader||"\n  precision mediump float;\n  \n  attribute vec2 a_position;\n  varying vec2 v_texCoord;\n  varying vec2 v_screenCoord;\n  \n  uniform vec2 u_screenSize;\n   \n  void main() {\n    v_texCoord = a_position * 0.5 + 0.5;\n    v_screenCoord = v_texCoord * u_screenSize;\n    gl_Position = vec4(a_position, 0.0, 1.0);\n  }\n"),e.compileShader(i);var n=e.createShader(e.FRAGMENT_SHADER);e.shaderSource(n,t.fragmentShader||"\n  precision mediump float;\n   \n  uniform sampler2D u_image;\n  uniform float u_opacity;\n   \n  varying vec2 v_texCoord;\n   \n  void main() {\n    gl_FragColor = texture2D(u_image, v_texCoord) * u_opacity;\n  }\n"),e.compileShader(n),this.renderTargetProgram_=e.createProgram(),e.attachShader(this.renderTargetProgram_,i),e.attachShader(this.renderTargetProgram_,n),e.linkProgram(this.renderTargetProgram_),this.renderTargetVerticesBuffer_=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,this.renderTargetVerticesBuffer_),e.bufferData(e.ARRAY_BUFFER,new Float32Array([-1,-1,1,-1,-1,1,1,-1,1,1,-1,1]),e.STATIC_DRAW),this.renderTargetAttribLocation_=e.getAttribLocation(this.renderTargetProgram_,"a_position"),this.renderTargetUniformLocation_=e.getUniformLocation(this.renderTargetProgram_,"u_screenSize"),this.renderTargetOpacityLocation_=e.getUniformLocation(this.renderTargetProgram_,"u_opacity"),this.renderTargetTextureLocation_=e.getUniformLocation(this.renderTargetProgram_,"u_image"),this.uniforms_=[],t.uniforms&&Object.keys(t.uniforms).forEach(function(i){this.uniforms_.push({value:t.uniforms[i],location:e.getUniformLocation(this.renderTargetProgram_,i)})}.bind(this))}return t.prototype.getGL=function(){return this.gl_},t.prototype.init=function(t){var e=this.getGL(),i=[e.drawingBufferWidth*this.scaleRatio_,e.drawingBufferHeight*this.scaleRatio_];if(e.bindFramebuffer(e.FRAMEBUFFER,this.getFrameBuffer()),e.viewport(0,0,i[0],i[1]),!this.renderTargetTextureSize_||this.renderTargetTextureSize_[0]!==i[0]||this.renderTargetTextureSize_[1]!==i[1]){this.renderTargetTextureSize_=i;var n=e.RGBA,o=e.RGBA,r=e.UNSIGNED_BYTE;e.bindTexture(e.TEXTURE_2D,this.renderTargetTexture_),e.texImage2D(e.TEXTURE_2D,0,n,i[0],i[1],0,o,r,null),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,this.renderTargetTexture_,0)}},t.prototype.apply=function(t,e,i,n){var o=this.getGL(),r=t.size;if(o.bindFramebuffer(o.FRAMEBUFFER,e?e.getFrameBuffer():null),o.activeTexture(o.TEXTURE0),o.bindTexture(o.TEXTURE_2D,this.renderTargetTexture_),!e){var a=(0,p.sq)(o.canvas);if(!t.renderTargets[a]){var s=o.getContextAttributes();s&&s.preserveDrawingBuffer&&(o.clearColor(0,0,0,0),o.clear(o.COLOR_BUFFER_BIT)),t.renderTargets[a]=!0}}o.enable(o.BLEND),o.blendFunc(o.ONE,o.ONE_MINUS_SRC_ALPHA),o.viewport(0,0,o.drawingBufferWidth,o.drawingBufferHeight),o.bindBuffer(o.ARRAY_BUFFER,this.renderTargetVerticesBuffer_),o.useProgram(this.renderTargetProgram_),o.enableVertexAttribArray(this.renderTargetAttribLocation_),o.vertexAttribPointer(this.renderTargetAttribLocation_,2,o.FLOAT,!1,0,0),o.uniform2f(this.renderTargetUniformLocation_,r[0],r[1]),o.uniform1i(this.renderTargetTextureLocation_,0);var l=t.layerStatesArray[t.layerIndex].opacity;o.uniform1f(this.renderTargetOpacityLocation_,l),this.applyUniforms(t),i&&i(o,t),o.drawArrays(o.TRIANGLES,0,6),n&&n(o,t)},t.prototype.getFrameBuffer=function(){return this.frameBuffer_},t.prototype.applyUniforms=function(t){var e,i=this.getGL(),n=1;this.uniforms_.forEach((function(o){if((e="function"==typeof o.value?o.value(t):o.value)instanceof HTMLCanvasElement||e instanceof ImageData)o.texture||(o.texture=i.createTexture()),i.activeTexture(i["TEXTURE"+n]),i.bindTexture(i.TEXTURE_2D,o.texture),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,i.LINEAR),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_S,i.CLAMP_TO_EDGE),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_T,i.CLAMP_TO_EDGE),e instanceof ImageData?i.texImage2D(i.TEXTURE_2D,0,i.RGBA,i.RGBA,e.width,e.height,0,i.UNSIGNED_BYTE,new Uint8Array(e.data)):i.texImage2D(i.TEXTURE_2D,0,i.RGBA,i.RGBA,i.UNSIGNED_BYTE,e),i.uniform1i(o.location,n++);else if(Array.isArray(e))switch(e.length){case 2:return void i.uniform2f(o.location,e[0],e[1]);case 3:return void i.uniform3f(o.location,e[0],e[1],e[2]);case 4:return void i.uniform4f(o.location,e[0],e[1],e[2],e[3]);default:return}else"number"==typeof e&&i.uniform1f(o.location,e)}))},t}();const Aa=Fa;function ja(t,e){return t[0]=e[0],t[1]=e[1],t[4]=e[2],t[5]=e[3],t[12]=e[4],t[13]=e[5],t}var Ma=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),ka="u_projectionMatrix",Da="u_offsetScaleMatrix",za="u_offsetRotateMatrix",Na="u_time",Ba="u_zoom",Ga="u_resolution",Za={UNSIGNED_BYTE:5121,UNSIGNED_SHORT:5123,UNSIGNED_INT:5125,FLOAT:5126},Wa={};function Ua(t){return"shared/"+t}var Xa=0;var Ya=function(t){function e(e){var i,n=t.call(this)||this,o=e||{};n.boundHandleWebGLContextLost_=n.handleWebGLContextLost.bind(n),n.boundHandleWebGLContextRestored_=n.handleWebGLContextRestored.bind(n),n.canvasCacheKey_=o.canvasCacheKey?Ua(o.canvasCacheKey):(i="unique/"+Xa,Xa+=1,i),n.canvas_=function(t){var e=Wa[t];if(!e){var i=document.createElement("canvas");i.style.position="absolute",i.style.left="0",e={users:0,canvas:i},Wa[t]=e}return e.users+=1,e.canvas}(n.canvasCacheKey_),n.gl_=Sa(n.canvas_),n.bufferCache_={},n.extensionCache_={},n.currentProgram_=null,n.canvas_.addEventListener(Ia,n.boundHandleWebGLContextLost_),n.canvas_.addEventListener(La,n.boundHandleWebGLContextRestored_),n.offsetRotateMatrix_=(0,Se.Ue)(),n.offsetScaleMatrix_=(0,Se.Ue)(),n.tmpMat4_=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],n.uniformLocations_={},n.attribLocations_={},n.uniforms_=[],o.uniforms&&n.setUniforms(o.uniforms);var r=n.getGL();return n.postProcessPasses_=o.postProcesses?o.postProcesses.map((function(t){return new Aa({webGlContext:r,scaleRatio:t.scaleRatio,vertexShader:t.vertexShader,fragmentShader:t.fragmentShader,uniforms:t.uniforms})})):[new Aa({webGlContext:r})],n.shaderCompileErrors_=null,n.startTime_=Date.now(),n}return Ma(e,t),e.prototype.setUniforms=function(t){for(var e in this.uniforms_=[],t)this.uniforms_.push({name:e,value:t[e]});this.uniformLocations_={}},e.prototype.canvasCacheKeyMatches=function(t){return this.canvasCacheKey_===Ua(t)},e.prototype.getExtension=function(t){if(t in this.extensionCache_)return this.extensionCache_[t];var e=this.gl_.getExtension(t);return this.extensionCache_[t]=e,e},e.prototype.bindBuffer=function(t){var e=this.getGL(),i=(0,p.sq)(t),n=this.bufferCache_[i];n||(n={buffer:t,webGlBuffer:e.createBuffer()},this.bufferCache_[i]=n);e.bindBuffer(t.getType(),n.webGlBuffer)},e.prototype.flushBufferData=function(t){var e=this.getGL();this.bindBuffer(t),e.bufferData(t.getType(),t.getArray(),t.getUsage())},e.prototype.deleteBuffer=function(t){var e=this.getGL(),i=(0,p.sq)(t),n=this.bufferCache_[i];n&&!e.isContextLost()&&e.deleteBuffer(n.webGlBuffer),delete this.bufferCache_[i]},e.prototype.disposeInternal=function(){this.canvas_.removeEventListener(Ia,this.boundHandleWebGLContextLost_),this.canvas_.removeEventListener(La,this.boundHandleWebGLContextRestored_),function(t){var e=Wa[t];if(e&&(e.users-=1,!(e.users>0))){var i=Sa(e.canvas).getExtension("WEBGL_lose_context");i&&i.loseContext(),delete Wa[t]}}(this.canvasCacheKey_),delete this.gl_,delete this.canvas_},e.prototype.prepareDraw=function(t,e){var i=this.getGL(),n=this.getCanvas(),o=t.size,r=t.pixelRatio;n.width=o[0]*r,n.height=o[1]*r,n.style.width=o[0]+"px",n.style.height=o[1]+"px",i.useProgram(this.currentProgram_);for(var a=this.postProcessPasses_.length-1;a>=0;a--)this.postProcessPasses_[a].init(t);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,e?i.ZERO:i.ONE_MINUS_SRC_ALPHA),i.useProgram(this.currentProgram_),this.applyFrameState(t),this.applyUniforms(t)},e.prototype.prepareDrawToRenderTarget=function(t,e,i){var n=this.getGL(),o=e.getSize();n.bindFramebuffer(n.FRAMEBUFFER,e.getFramebuffer()),n.viewport(0,0,o[0],o[1]),n.bindTexture(n.TEXTURE_2D,e.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),n.useProgram(this.currentProgram_),this.applyFrameState(t),this.applyUniforms(t)},e.prototype.drawElements=function(t,e){var i=this.getGL();this.getExtension("OES_element_index_uint");var n=i.UNSIGNED_INT,o=e-t,r=4*t;i.drawElements(i.TRIANGLES,o,n,r)},e.prototype.finalizeDraw=function(t,e,i){for(var n=0,o=this.postProcessPasses_.length;n<o;n++)n===o-1?this.postProcessPasses_[n].apply(t,null,e,i):this.postProcessPasses_[n].apply(t,this.postProcessPasses_[n+1])},e.prototype.getCanvas=function(){return this.canvas_},e.prototype.getGL=function(){return this.gl_},e.prototype.applyFrameState=function(t){var e=t.size,i=t.viewState.rotation,n=(0,Se.mc)(this.offsetScaleMatrix_);(0,Se.bA)(n,2/e[0],2/e[1]);var o=(0,Se.mc)(this.offsetRotateMatrix_);0!==i&&(0,Se.U1)(o,-i),this.setUniformMatrixValue(Da,ja(this.tmpMat4_,n)),this.setUniformMatrixValue(za,ja(this.tmpMat4_,o)),this.setUniformFloatValue(Na,.001*(Date.now()-this.startTime_)),this.setUniformFloatValue(Ba,t.viewState.zoom),this.setUniformFloatValue(Ga,t.viewState.resolution)},e.prototype.applyUniforms=function(t){var e,i=this.getGL(),n=0;this.uniforms_.forEach(function(o){if((e="function"==typeof o.value?o.value(t):o.value)instanceof HTMLCanvasElement||e instanceof HTMLImageElement||e instanceof ImageData)o.texture||(o.prevValue=void 0,o.texture=i.createTexture()),i.activeTexture(i["TEXTURE"+n]),i.bindTexture(i.TEXTURE_2D,o.texture),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,i.LINEAR),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_S,i.CLAMP_TO_EDGE),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_T,i.CLAMP_TO_EDGE),(!(e instanceof HTMLImageElement)||e.complete)&&o.prevValue!==e&&(o.prevValue=e,i.texImage2D(i.TEXTURE_2D,0,i.RGBA,i.RGBA,i.UNSIGNED_BYTE,e)),i.uniform1i(this.getUniformLocation(o.name),n++);else if(Array.isArray(e)&&6===e.length)this.setUniformMatrixValue(o.name,ja(this.tmpMat4_,e));else if(Array.isArray(e)&&e.length<=4)switch(e.length){case 2:return void i.uniform2f(this.getUniformLocation(o.name),e[0],e[1]);case 3:return void i.uniform3f(this.getUniformLocation(o.name),e[0],e[1],e[2]);case 4:return void i.uniform4f(this.getUniformLocation(o.name),e[0],e[1],e[2],e[3]);default:return}else"number"==typeof e&&i.uniform1f(this.getUniformLocation(o.name),e)}.bind(this))},e.prototype.useProgram=function(t){return t!=this.currentProgram_&&(this.getGL().useProgram(t),this.currentProgram_=t,this.uniformLocations_={},this.attribLocations_={},!0)},e.prototype.compileShader=function(t,e){var i=this.getGL(),n=i.createShader(e);return i.shaderSource(n,t),i.compileShader(n),n},e.prototype.getProgram=function(t,e){var i=this.getGL(),n=this.compileShader(t,i.FRAGMENT_SHADER),o=this.compileShader(e,i.VERTEX_SHADER),r=i.createProgram();if(i.attachShader(r,n),i.attachShader(r,o),i.linkProgram(r),!i.getShaderParameter(n,i.COMPILE_STATUS)){var a="Fragment shader compliation failed: "+i.getShaderInfoLog(n);throw new Error(a)}if(i.deleteShader(n),!i.getShaderParameter(o,i.COMPILE_STATUS)){a="Vertex shader compilation failed: "+i.getShaderInfoLog(o);throw new Error(a)}if(i.deleteShader(o),!i.getProgramParameter(r,i.LINK_STATUS)){a="GL program linking failed: "+i.getShaderInfoLog(o);throw new Error(a)}return r},e.prototype.getUniformLocation=function(t){return void 0===this.uniformLocations_[t]&&(this.uniformLocations_[t]=this.getGL().getUniformLocation(this.currentProgram_,t)),this.uniformLocations_[t]},e.prototype.getAttributeLocation=function(t){return void 0===this.attribLocations_[t]&&(this.attribLocations_[t]=this.getGL().getAttribLocation(this.currentProgram_,t)),this.attribLocations_[t]},e.prototype.makeProjectionTransform=function(t,e){var i=t.size,n=t.viewState.rotation,o=t.viewState.resolution,r=t.viewState.center;return(0,Se.mc)(e),(0,Se.qC)(e,0,0,2/(o*i[0]),2/(o*i[1]),-n,-r[0],-r[1]),e},e.prototype.setUniformFloatValue=function(t,e){this.getGL().uniform1f(this.getUniformLocation(t),e)},e.prototype.setUniformMatrixValue=function(t,e){this.getGL().uniformMatrix4fv(this.getUniformLocation(t),!1,e)},e.prototype.enableAttributeArray_=function(t,e,i,n,o){var r=this.getAttributeLocation(t);r<0||(this.getGL().enableVertexAttribArray(r),this.getGL().vertexAttribPointer(r,e,i,!1,n,o))},e.prototype.enableAttributes=function(t){for(var e=function(t){for(var e=0,i=0;i<t.length;i++){var n=t[i];e+=n.size*Va(n.type)}return e}(t),i=0,n=0;n<t.length;n++){var o=t[n];this.enableAttributeArray_(o.name,o.size,o.type||5126,e,i),i+=o.size*Va(o.type)}},e.prototype.handleWebGLContextLost=function(){(0,X.ZH)(this.bufferCache_),this.currentProgram_=null},e.prototype.handleWebGLContextRestored=function(){},e.prototype.createTexture=function(t,e,i){var n=this.getGL(),o=i||n.createTexture(),r=n.RGBA,a=n.RGBA,s=n.UNSIGNED_BYTE;return n.bindTexture(n.TEXTURE_2D,o),e?n.texImage2D(n.TEXTURE_2D,0,r,a,s,e):n.texImage2D(n.TEXTURE_2D,0,r,t[0],t[1],0,a,s,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),o},e}(Pa.Z);function Va(t){switch(t){case Za.UNSIGNED_BYTE:return Uint8Array.BYTES_PER_ELEMENT;case Za.UNSIGNED_SHORT:return Uint16Array.BYTES_PER_ELEMENT;case Za.UNSIGNED_INT:return Uint32Array.BYTES_PER_ELEMENT;case Za.FLOAT:default:return Float32Array.BYTES_PER_ELEMENT}}const Ka=Ya;var Ha=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),qa="GENERATE_BUFFERS",$a=function(t){function e(e,i){var n=t.call(this,e)||this,o=i||{};return n.inversePixelTransform_=(0,Se.Ue)(),n.pixelContext_=null,n.postProcesses_=o.postProcesses,n.uniforms_=o.uniforms,n.helper,e.addChangeListener(ie,n.removeHelper_.bind(n)),n.dispatchPreComposeEvent=n.dispatchPreComposeEvent.bind(n),n.dispatchPostComposeEvent=n.dispatchPostComposeEvent.bind(n),n}return Ha(e,t),e.prototype.dispatchPreComposeEvent=function(t,e){var i=this.getLayer();if(i.hasListener(se)){var n=new Ce(se,void 0,e,t);i.dispatchEvent(n)}},e.prototype.dispatchPostComposeEvent=function(t,e){var i=this.getLayer();if(i.hasListener(le)){var n=new Ce(le,void 0,e,t);i.dispatchEvent(n)}},e.prototype.reset=function(t){this.uniforms_=t.uniforms,this.helper&&this.helper.setUniforms(this.uniforms_)},e.prototype.removeHelper_=function(){this.helper&&(this.helper.dispose(),delete this.helper)},e.prototype.prepareFrame=function(t){if(this.getLayer().getSource()){for(var i=!0,n=-1,o=void 0,r=0,a=t.layerStatesArray.length;r<a;r++){var s=t.layerStatesArray[r].layer,l=s.getRenderer();if(l instanceof e){var c=s.getClassName();if((i||c!==o)&&(n+=1,i=!1),o=c,l===this)break}else i=!0}var u="map/"+t.mapId+"/group/"+n;this.helper&&this.helper.canvasCacheKeyMatches(u)||(this.helper&&this.helper.dispose(),this.helper=new Ka({postProcesses:this.postProcesses_,uniforms:this.uniforms_,canvasCacheKey:u}),o&&(this.helper.getCanvas().className=o),this.afterHelperCreated())}return this.prepareFrameInternal(t)},e.prototype.afterHelperCreated=function(){},e.prototype.prepareFrameInternal=function(t){return!0},e.prototype.disposeInternal=function(){this.removeHelper_(),t.prototype.disposeInternal.call(this)},e.prototype.dispatchRenderEvent_=function(t,e,i){var n=this.getLayer();if(n.hasListener(t)){(0,Se.qC)(this.inversePixelTransform_,0,0,i.pixelRatio,-i.pixelRatio,0,0,-i.size[1]);var o=new Ce(t,this.inversePixelTransform_,i,e);n.dispatchEvent(o)}},e.prototype.preRender=function(t,e){this.dispatchRenderEvent_(re,t,e)},e.prototype.postRender=function(t,e){this.dispatchRenderEvent_(ae,t,e)},e.prototype.getDataAtPixel=function(t,e,i){var n=(0,Se.nn)([e.pixelRatio,0,0,e.pixelRatio,0,0],t.slice()),o=this.helper.getGL();if(!o)return null;var r=this.getLayer().getExtent();if(r){var a=(0,Se.nn)(e.pixelToCoordinateTransform,t.slice());if(!(0,P.b8)(r,a))return null}var s=o.getContextAttributes();if(!s||!s.preserveDrawingBuffer)return new Uint8Array;var l,c=Math.round(n[0]),u=Math.round(n[1]),h=this.pixelContext_;if(!h){var p=document.createElement("canvas");p.width=1,p.height=1,h=p.getContext("2d"),this.pixelContext_=h}h.clearRect(0,0,1,1);try{h.drawImage(o.canvas,c,u,1,1,0,0,1,1),l=h.getImageData(0,0,1,1).data}catch(t){return l}return 0===l[3]?null:l},e}(be);function Ja(t,e){var i=e||[],n=256,o=255;return i[0]=Math.floor(t/n/n/n)/o,i[1]=Math.floor(t/n/n)%n/o,i[2]=Math.floor(t/n)%n/o,i[3]=t%n/o,i}const Qa=$a;var ts=new Uint8Array(4);const es=function(){function t(t,e){this.helper_=t;var i=t.getGL();this.texture_=i.createTexture(),this.framebuffer_=i.createFramebuffer(),this.size_=e||[1,1],this.data_=new Uint8Array(0),this.dataCacheDirty_=!0,this.updateSize_()}return t.prototype.setSize=function(t){(0,wt.fS)(t,this.size_)||(this.size_[0]=t[0],this.size_[1]=t[1],this.updateSize_())},t.prototype.getSize=function(){return this.size_},t.prototype.clearCachedData=function(){this.dataCacheDirty_=!0},t.prototype.readAll=function(){if(this.dataCacheDirty_){var t=this.size_,e=this.helper_.getGL();e.bindFramebuffer(e.FRAMEBUFFER,this.framebuffer_),e.readPixels(0,0,t[0],t[1],e.RGBA,e.UNSIGNED_BYTE,this.data_),this.dataCacheDirty_=!1}return this.data_},t.prototype.readPixel=function(t,e){if(t<0||e<0||t>this.size_[0]||e>=this.size_[1])return ts[0]=0,ts[1]=0,ts[2]=0,ts[3]=0,ts;this.readAll();var i=Math.floor(t)+(this.size_[1]-Math.floor(e)-1)*this.size_[0];return ts[0]=this.data_[4*i],ts[1]=this.data_[4*i+1],ts[2]=this.data_[4*i+2],ts[3]=this.data_[4*i+3],ts},t.prototype.getTexture=function(){return this.texture_},t.prototype.getFramebuffer=function(){return this.framebuffer_},t.prototype.updateSize_=function(){var t=this.size_,e=this.helper_.getGL();this.texture_=this.helper_.createTexture(t,null,this.texture_),e.bindFramebuffer(e.FRAMEBUFFER,this.framebuffer_),e.viewport(0,0,t[0],t[1]),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,this.texture_,0),this.data_=new Uint8Array(t[0]*t[1]*4)},t}();var is=i("?3bd6").Buffer;var ns=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();const os=function(t){function e(e,i){var n=this,o=i.uniforms||{},r=(0,Se.Ue)();o[ka]=r,(n=t.call(this,e,{uniforms:o,postProcesses:i.postProcesses})||this).sourceRevision_=-1,n.verticesBuffer_=new Oa(xa,wa),n.hitVerticesBuffer_=new Oa(xa,wa),n.indicesBuffer_=new Oa(ba,wa),n.vertexShader_=i.vertexShader,n.fragmentShader_=i.fragmentShader,n.program_,n.hitDetectionEnabled_=!(!i.hitFragmentShader||!i.hitVertexShader),n.hitVertexShader_=i.hitVertexShader,n.hitFragmentShader_=i.hitFragmentShader,n.hitProgram_;var a=i.attributes?i.attributes.map((function(t){return{name:"a_"+t.name,size:1,type:Za.FLOAT}})):[];n.attributes=[{name:"a_position",size:2,type:Za.FLOAT},{name:"a_index",size:1,type:Za.FLOAT}].concat(a),n.hitDetectionAttributes=[{name:"a_position",size:2,type:Za.FLOAT},{name:"a_index",size:1,type:Za.FLOAT},{name:"a_hitColor",size:4,type:Za.FLOAT},{name:"a_featureUid",size:1,type:Za.FLOAT}].concat(a),n.customAttributes=i.attributes?i.attributes:[],n.previousExtent_=(0,P.lJ)(),n.currentTransform_=r,n.renderTransform_=(0,Se.Ue)(),n.invertRenderTransform_=(0,Se.Ue)(),n.renderInstructions_=new Float32Array(0),n.hitRenderInstructions_=new Float32Array(0),n.hitRenderTarget_,n.worker_=function(){var t='var e="function"==typeof Object.assign?Object.assign:function(e,n){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),r=1,o=arguments.length;r<o;++r){var i=arguments[r];if(null!=i)for(var f in i)i.hasOwnProperty(f)&&(t[f]=i[f])}return t},n="GENERATE_BUFFERS",t=[],r={vertexPosition:0,indexPosition:0};function o(e,n,t,r,o){e[n+0]=t,e[n+1]=r,e[n+2]=o}function i(e,n,i,f,s,u){var a=3+s,l=e[n+0],v=e[n+1],c=t;c.length=s;for(var g=0;g<c.length;g++)c[g]=e[n+2+g];var b=u?u.vertexPosition:0,h=u?u.indexPosition:0,d=b/a;return o(i,b,l,v,0),c.length&&i.set(c,b+3),o(i,b+=a,l,v,1),c.length&&i.set(c,b+3),o(i,b+=a,l,v,2),c.length&&i.set(c,b+3),o(i,b+=a,l,v,3),c.length&&i.set(c,b+3),b+=a,f[h++]=d,f[h++]=d+1,f[h++]=d+3,f[h++]=d+1,f[h++]=d+2,f[h++]=d+3,r.vertexPosition=b,r.indexPosition=h,r}var f=self;f.onmessage=function(t){var r=t.data;if(r.type===n){for(var o=r.customAttributesCount,s=2+o,u=new Float32Array(r.renderInstructions),a=u.length/s,l=4*a*(o+3),v=new Uint32Array(6*a),c=new Float32Array(l),g=null,b=0;b<u.length;b+=s)g=i(u,b,c,v,o,g);var h=e({vertexBuffer:c.buffer,indexBuffer:v.buffer,renderInstructions:u.buffer},r);f.postMessage(h,[c.buffer,v.buffer,u.buffer])}};';return new Worker("undefined"==typeof Blob?"data:application/javascript;base64,"+is.from(t,"binary").toString("base64"):URL.createObjectURL(new Blob([t],{type:"application/javascript"})))}(),n.worker_.addEventListener("message",function(t){var e=t.data;if(e.type===qa){var i=e.projectionTransform;e.hitDetection?(this.hitVerticesBuffer_.fromArrayBuffer(e.vertexBuffer),this.helper.flushBufferData(this.hitVerticesBuffer_)):(this.verticesBuffer_.fromArrayBuffer(e.vertexBuffer),this.helper.flushBufferData(this.verticesBuffer_)),this.indicesBuffer_.fromArrayBuffer(e.indexBuffer),this.helper.flushBufferData(this.indicesBuffer_),this.renderTransform_=i,(0,Se.nb)(this.invertRenderTransform_,this.renderTransform_),e.hitDetection?this.hitRenderInstructions_=new Float32Array(t.data.renderInstructions):this.renderInstructions_=new Float32Array(t.data.renderInstructions),this.getLayer().changed()}}.bind(n)),n.featureCache_={},n.featureCount_=0;var s=n.getLayer().getSource();return n.sourceListenKeys_=[(0,F.oL)(s,Mr,n.handleSourceFeatureAdded_,n),(0,F.oL)(s,kr,n.handleSourceFeatureChanged_,n),(0,F.oL)(s,zr,n.handleSourceFeatureDelete_,n),(0,F.oL)(s,Dr,n.handleSourceFeatureClear_,n)],s.forEachFeature(function(t){this.featureCache_[(0,p.sq)(t)]={feature:t,properties:t.getProperties(),geometry:t.getGeometry()},this.featureCount_++}.bind(n)),n}return ns(e,t),e.prototype.afterHelperCreated=function(){this.program_=this.helper.getProgram(this.fragmentShader_,this.vertexShader_),this.hitDetectionEnabled_&&(this.hitProgram_=this.helper.getProgram(this.hitFragmentShader_,this.hitVertexShader_),this.hitRenderTarget_=new es(this.helper))},e.prototype.handleSourceFeatureAdded_=function(t){var e=t.feature;this.featureCache_[(0,p.sq)(e)]={feature:e,properties:e.getProperties(),geometry:e.getGeometry()},this.featureCount_++},e.prototype.handleSourceFeatureChanged_=function(t){var e=t.feature;this.featureCache_[(0,p.sq)(e)]={feature:e,properties:e.getProperties(),geometry:e.getGeometry()}},e.prototype.handleSourceFeatureDelete_=function(t){var e=t.feature;delete this.featureCache_[(0,p.sq)(e)],this.featureCount_--},e.prototype.handleSourceFeatureClear_=function(){this.featureCache_={},this.featureCount_=0},e.prototype.renderFrame=function(t){var e=this.helper.getGL();this.preRender(e,t);var i=this.indicesBuffer_.getSize();this.helper.drawElements(0,i),this.helper.finalizeDraw(t,this.dispatchPreComposeEvent,this.dispatchPostComposeEvent);var n=this.helper.getCanvas();return this.hitDetectionEnabled_&&(this.renderHitDetection(t),this.hitRenderTarget_.clearCachedData()),this.postRender(e,t),n},e.prototype.prepareFrameInternal=function(t){var e=this.getLayer(),i=e.getSource(),n=t.viewState,o=!t.viewHints[or]&&!t.viewHints[rr],r=!(0,P.fS)(this.previousExtent_,t.extent),a=this.sourceRevision_<i.getRevision();if(a&&(this.sourceRevision_=i.getRevision()),o&&(r||a)){var s=n.projection,l=n.resolution,c=e instanceof so?e.getRenderBuffer():0,u=(0,P.f3)(t.extent,c*l);i.loadFeatures(u,l,s),this.rebuildBuffers_(t),this.previousExtent_=t.extent.slice()}return this.helper.makeProjectionTransform(t,this.currentTransform_),(0,Se.Jp)(this.currentTransform_,this.invertRenderTransform_),this.helper.useProgram(this.program_),this.helper.prepareDraw(t),this.helper.bindBuffer(this.verticesBuffer_),this.helper.bindBuffer(this.indicesBuffer_),this.helper.enableAttributes(this.attributes),!0},e.prototype.rebuildBuffers_=function(t){var e=(0,Se.Ue)();this.helper.makeProjectionTransform(t,e);var i,n,o=(2+this.customAttributes.length)*this.featureCount_;if(this.renderInstructions_&&this.renderInstructions_.length===o||(this.renderInstructions_=new Float32Array(o)),this.hitDetectionEnabled_){var r=(7+this.customAttributes.length)*this.featureCount_;this.hitRenderInstructions_&&this.hitRenderInstructions_.length===r||(this.hitRenderInstructions_=new Float32Array(r))}var a,s=[],l=[],c=0,u=0;for(var h in this.featureCache_)if((n=(i=this.featureCache_[h]).geometry)&&n.getType()===go.Z.POINT){s[0]=n.getFlatCoordinates()[0],s[1]=n.getFlatCoordinates()[1],(0,Se.nn)(e,s),a=Ja(u+6,l),this.renderInstructions_[c++]=s[0],this.renderInstructions_[c++]=s[1],this.hitDetectionEnabled_&&(this.hitRenderInstructions_[u++]=s[0],this.hitRenderInstructions_[u++]=s[1],this.hitRenderInstructions_[u++]=a[0],this.hitRenderInstructions_[u++]=a[1],this.hitRenderInstructions_[u++]=a[2],this.hitRenderInstructions_[u++]=a[3],this.hitRenderInstructions_[u++]=Number(h));for(var p=void 0,d=0;d<this.customAttributes.length;d++)p=this.customAttributes[d].callback(i.feature,i.properties),this.renderInstructions_[c++]=p,this.hitDetectionEnabled_&&(this.hitRenderInstructions_[u++]=p)}var f={type:qa,renderInstructions:this.renderInstructions_.buffer,customAttributesCount:this.customAttributes.length};if(f.projectionTransform=e,this.worker_.postMessage(f,[this.renderInstructions_.buffer]),this.renderInstructions_=null,this.hitDetectionEnabled_){var g={type:qa,renderInstructions:this.hitRenderInstructions_.buffer,customAttributesCount:5+this.customAttributes.length};g.projectionTransform=e,g.hitDetection=!0,this.worker_.postMessage(g,[this.hitRenderInstructions_.buffer]),this.hitRenderInstructions_=null}},e.prototype.forEachFeatureAtCoordinate=function(t,e,i,n,o){if((0,Q.h)(this.hitDetectionEnabled_,66),this.hitRenderInstructions_){var r=(0,Se.nn)(e.coordinateToPixelTransform,t.slice()),a=this.hitRenderTarget_.readPixel(r[0]/2,r[1]/2),s=function(t){var e=0,i=256,n=255;return e+=Math.round(t[0]*i*i*i*n),e+=Math.round(t[1]*i*i*n),e+=Math.round(t[2]*i*n),e+Math.round(t[3]*n)}([a[0]/255,a[1]/255,a[2]/255,a[3]/255]),l=this.hitRenderInstructions_[s],c=Math.floor(l).toString(),u=this.getLayer().getSource().getFeatureByUid(c);return u?n(u,this.getLayer(),null):void 0}},e.prototype.renderHitDetection=function(t){if(this.hitVerticesBuffer_.getSize()){this.hitRenderTarget_.setSize([Math.floor(t.size[0]/2),Math.floor(t.size[1]/2)]),this.helper.useProgram(this.hitProgram_),this.helper.prepareDrawToRenderTarget(t,this.hitRenderTarget_,!0),this.helper.bindBuffer(this.hitVerticesBuffer_),this.helper.bindBuffer(this.indicesBuffer_),this.helper.enableAttributes(this.hitDetectionAttributes);var e=this.indicesBuffer_.getSize();this.helper.drawElements(0,e)}},e.prototype.disposeInternal=function(){this.worker_.terminate(),this.layer_=null,this.sourceListenKeys_.forEach((function(t){(0,F.bN)(t)})),this.sourceListenKeys_=null,t.prototype.disposeInternal.call(this)},e}(Qa);var rs=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),as="blur",ss="gradient",ls="radius",cs=["#00f","#0ff","#0f0","#ff0","#f00"];const us=function(t){function e(e){var i=this,n=e||{},o=(0,X.f0)({},n);delete o.gradient,delete o.radius,delete o.blur,delete o.weight,(i=t.call(this,o)||this).gradient_=null,i.addChangeListener(ss,i.handleGradientChanged_),i.setGradient(n.gradient?n.gradient:cs),i.setBlur(void 0!==n.blur?n.blur:15),i.setRadius(void 0!==n.radius?n.radius:8);var r=n.weight?n.weight:"weight";return i.weightFunction_="string"==typeof r?function(t){return t.get(r)}:r,i.setRenderOrder(null),i}return rs(e,t),e.prototype.getBlur=function(){return this.get(as)},e.prototype.getGradient=function(){return this.get(ss)},e.prototype.getRadius=function(){return this.get(ls)},e.prototype.handleGradientChanged_=function(){this.gradient_=function(t){for(var e=1,i=256,n=w(e,i),o=n.createLinearGradient(0,0,e,i),r=1/(t.length-1),a=0,s=t.length;a<s;++a)o.addColorStop(a*r,t[a]);return n.fillStyle=o,n.fillRect(0,0,e,i),n.canvas}(this.getGradient())},e.prototype.setBlur=function(t){this.set(as,t)},e.prototype.setGradient=function(t){this.set(ss,t)},e.prototype.setRadius=function(t){this.set(ls,t)},e.prototype.createRenderer=function(){return new os(this,{className:this.getClassName(),attributes:[{name:"weight",callback:function(t){var e=this.weightFunction_(t);return void 0!==e?(0,N.uZ)(e,0,1):1}.bind(this)}],vertexShader:"\n        precision mediump float;\n        uniform mat4 u_projectionMatrix;\n        uniform mat4 u_offsetScaleMatrix;\n        uniform float u_size;\n        attribute vec2 a_position;\n        attribute float a_index;\n        attribute float a_weight;\n\n        varying vec2 v_texCoord;\n        varying float v_weight;\n\n        void main(void) {\n          mat4 offsetMatrix = u_offsetScaleMatrix;\n          float offsetX = a_index == 0.0 || a_index == 3.0 ? -u_size / 2.0 : u_size / 2.0;\n          float offsetY = a_index == 0.0 || a_index == 1.0 ? -u_size / 2.0 : u_size / 2.0;\n          vec4 offsets = offsetMatrix * vec4(offsetX, offsetY, 0.0, 0.0);\n          gl_Position = u_projectionMatrix * vec4(a_position, 0.0, 1.0) + offsets;\n          float u = a_index == 0.0 || a_index == 3.0 ? 0.0 : 1.0;\n          float v = a_index == 0.0 || a_index == 1.0 ? 0.0 : 1.0;\n          v_texCoord = vec2(u, v);\n          v_weight = a_weight;\n        }",fragmentShader:"\n        precision mediump float;\n        uniform float u_blurSlope;\n\n        varying vec2 v_texCoord;\n        varying float v_weight;\n\n        void main(void) {\n          vec2 texCoord = v_texCoord * 2.0 - vec2(1.0, 1.0);\n          float sqRadius = texCoord.x * texCoord.x + texCoord.y * texCoord.y;\n          float value = (1.0 - sqrt(sqRadius)) * u_blurSlope;\n          float alpha = smoothstep(0.0, 1.0, value) * v_weight;\n          gl_FragColor = vec4(alpha, alpha, alpha, alpha);\n        }",hitVertexShader:"\n        precision mediump float;\n        uniform mat4 u_projectionMatrix;\n        uniform mat4 u_offsetScaleMatrix;\n        uniform float u_size;\n        attribute vec2 a_position;\n        attribute float a_index;\n        attribute float a_weight;\n        attribute vec4 a_hitColor;\n\n        varying vec2 v_texCoord;\n        varying float v_weight;\n        varying vec4 v_hitColor;\n\n        void main(void) {\n          mat4 offsetMatrix = u_offsetScaleMatrix;\n          float offsetX = a_index == 0.0 || a_index == 3.0 ? -u_size / 2.0 : u_size / 2.0;\n          float offsetY = a_index == 0.0 || a_index == 1.0 ? -u_size / 2.0 : u_size / 2.0;\n          vec4 offsets = offsetMatrix * vec4(offsetX, offsetY, 0.0, 0.0);\n          gl_Position = u_projectionMatrix * vec4(a_position, 0.0, 1.0) + offsets;\n          float u = a_index == 0.0 || a_index == 3.0 ? 0.0 : 1.0;\n          float v = a_index == 0.0 || a_index == 1.0 ? 0.0 : 1.0;\n          v_texCoord = vec2(u, v);\n          v_hitColor = a_hitColor;\n          v_weight = a_weight;\n        }",hitFragmentShader:"\n        precision mediump float;\n        uniform float u_blurSlope;\n\n        varying vec2 v_texCoord;\n        varying float v_weight;\n        varying vec4 v_hitColor;\n\n        void main(void) {\n          vec2 texCoord = v_texCoord * 2.0 - vec2(1.0, 1.0);\n          float sqRadius = texCoord.x * texCoord.x + texCoord.y * texCoord.y;\n          float value = (1.0 - sqrt(sqRadius)) * u_blurSlope;\n          float alpha = smoothstep(0.0, 1.0, value) * v_weight;\n          if (alpha < 0.05) {\n            discard;\n          }\n\n          gl_FragColor = v_hitColor;\n        }",uniforms:{u_size:function(){return 2*(this.get(ls)+this.get(as))}.bind(this),u_blurSlope:function(){return this.get(ls)/Math.max(1,this.get(as))}.bind(this)},postProcesses:[{fragmentShader:"\n            precision mediump float;\n\n            uniform sampler2D u_image;\n            uniform sampler2D u_gradientTexture;\n            uniform float u_opacity;\n\n            varying vec2 v_texCoord;\n\n            void main() {\n              vec4 color = texture2D(u_image, v_texCoord);\n              gl_FragColor.a = color.a * u_opacity;\n              gl_FragColor.rgb = texture2D(u_gradientTexture, vec2(0.5, color.a)).rgb;\n              gl_FragColor.rgb *= gl_FragColor.a;\n            }",uniforms:{u_gradientTexture:function(){return this.gradient_}.bind(this),u_opacity:function(){return this.getOpacity()}.bind(this)}}]})},e.prototype.renderDeclutter=function(){},e}(so),hs={weight:{fixed:1,min:0,max:1},blur:15,radius:5},ps={id:"heatmap",name:"Heatmap",description:"Visualizes a heatmap of the data",isBaseMap:!1,showLocation:!0,create:async(t,e,i)=>{const n=Object.assign({},hs,e.config),r=await(0,pi.cJ)(e.location),a=new $r(r),s="_weight",l=new us({source:a,blur:n.blur,radius:n.radius,weight:t=>t.get(s)});return{init:()=>l,update:t=>{var e;const r=t.series[0];if(!r)return;a.update(r);const c=(0,di.W8)(r,n.weight);a.forEachFeature((t=>{const e=t.get("rowIndex");null!=e&&t.set(s,c.get(e))}));let u=["#00f","#0ff","#0f0","#ff0","#f00"];const h=null!==(e=c.field)&&void 0!==e?e:r.fields.find((t=>t.type===o.FieldType.number));if(h){const t=(0,o.getFieldColorModeForField)(h);t.isContinuous&&t.getColors&&(u=t.getColors(i))}l.setGradient(u)},registerOptionsUI:t=>{t.addCustomEditor({id:"config.weight",path:"config.weight",name:"Weight values",description:"Scale the distribution for each row",editor:Pi.cL,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:hs.radius,settings:{min:1,max:50,step:1}}).addSliderInput({path:"config.blur",description:"Configures the amount of blur of clusters",name:"Blur",defaultValue:hs.blur,settings:{min:1,max:50,step:1}})}}},defaultOptions:hs},ds={icon:"https://openlayers.org/en/latest/examples/data/icon.png"},fs={id:"last-point-tracker",name:"Icon at last point",description:"Show an icon at the last point",isBaseMap:!1,showLocation:!0,state:o.PluginState.alpha,create:async(t,e,i)=>{const n=new Cr.Z({}),o=Object.assign({},ds,e.config);n.setStyle(new xn({image:new Mn({src:o.icon})}));const r=new qr({features:[n]}),a=new wr({source:r}),s=await(0,pi.cJ)(e.location);return{init:()=>a,update:t=>{const e=t.series[0];if(e&&e.length){const t=(0,pi.g6)(e,s);if(!t.field)return;n.setGeometry(t.field.values.get(e.length-1))}}}},defaultOptions:ds},gs=[ea,ps,fs,ma],_s={type:"default",name:"",config:{}},ys={id:_s.type,name:"Default base layer",isBaseMap:!0,create:(t,e,i)=>{var n;const o=null===ti.vc||void 0===ti.vc||null===(n=ti.vc.geomapDefaultBaseLayerConfig)||void 0===n?void 0:n.type;if(o){const e=vs.getIfExists(o);if(!e)throw new Error("Invalid basemap configuration on server");return e.create(t,ti.vc.geomapDefaultBaseLayerConfig,i)}return Je.create(t,e,i)}},vs=new o.Registry((()=>[ys,...hi,...gs]));var ms=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();function xs(t,e){In.expire()}const bs=function(t){function e(e){var i=t.call(this)||this;return i.map_=e,i}return ms(e,t),e.prototype.dispatchRenderEvent=function(t,e){(0,p.O3)()},e.prototype.calculateMatrices2D=function(t){var e=t.viewState,i=t.coordinateToPixelTransform,n=t.pixelToCoordinateTransform;(0,Se.qC)(i,t.size[0]/2,t.size[1]/2,1/e.resolution,-1/e.resolution,-e.rotation,-e.center[0],-e.center[1]),(0,Se.nb)(n,i)},e.prototype.forEachFeatureAtCoordinate=function(t,e,i,n,o,r,a,s){var l,c=e.viewState;function u(t,e,i,n){return o.call(r,e,t?i:null,n)}var h=c.projection,p=yr(t.slice(),h),d=[[0,0]];if(h.canWrapX()&&n){var f=h.getExtent(),g=(0,P.dz)(f);d.push([-g,0],[g,0])}for(var _=e.layerStatesArray,y=_.length,v=[],m=[],x=0;x<d.length;x++)for(var b=y-1;b>=0;--b){var w=_[b],C=w.layer;if(C.hasRenderer()&&pe(w,c)&&a.call(s,C)){var S=C.getRenderer(),E=C.getSource();if(S&&E){var T=E.getWrapX()?p:t,R=u.bind(null,w.managed);m[0]=T[0]+d[x][0],m[1]=T[1]+d[x][1],l=S.forEachFeatureAtCoordinate(m,e,i,R,v)}if(l)return l}}if(0!==v.length){var O=1/v.length;return v.forEach((function(t,e){return t.distanceSq+=e*O})),v.sort((function(t,e){return t.distanceSq-e.distanceSq})),v.some((function(t){return l=t.callback(t.feature,t.layer,t.geometry)})),l}},e.prototype.forEachLayerAtPixel=function(t,e,i,n,o){return(0,p.O3)()},e.prototype.hasFeatureAtCoordinate=function(t,e,i,n,o,r){return void 0!==this.forEachFeatureAtCoordinate(t,e,i,n,Zr.uX,this,o,r)},e.prototype.getMap=function(){return this.map_},e.prototype.renderFrame=function(t){(0,p.O3)()},e.prototype.scheduleExpireIconCache=function(t){In.canExpireCache()&&t.postRenderFunctions.push(xs)},e}(Pa.Z);var ws=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();const Cs=function(t){function e(e){var i=t.call(this,e)||this;i.fontChangeListenerKey_=(0,F.oL)($i,Fr.Z.PROPERTYCHANGE,e.redrawText.bind(e)),i.element_=document.createElement("div");var n=i.element_.style;n.position="absolute",n.width="100%",n.height="100%",n.zIndex="0",i.element_.className="ol-unselectable ol-layers";var o=e.getViewport();return o.insertBefore(i.element_,o.firstChild||null),i.children_=[],i.renderedVisible_=!0,i}return ws(e,t),e.prototype.dispatchRenderEvent=function(t,e){var i=this.getMap();if(i.hasListener(t)){var n=new Ce(t,void 0,e);i.dispatchEvent(n)}},e.prototype.disposeInternal=function(){(0,F.bN)(this.fontChangeListenerKey_),this.element_.parentNode.removeChild(this.element_),t.prototype.disposeInternal.call(this)},e.prototype.renderFrame=function(t){if(t){this.calculateMatrices2D(t),this.dispatchRenderEvent(se,t);var e=t.layerStatesArray.sort((function(t,e){return t.zIndex-e.zIndex})),i=t.viewState;this.children_.length=0;for(var n=[],o=null,r=0,a=e.length;r<a;++r){var s=e[r];if(t.layerIndex=r,pe(s,i)&&(s.sourceState==dt||s.sourceState==pt)){var l=s.layer,c=l.render(t,o);c&&(c!==o&&(this.children_.push(c),o=c),"getDeclutter"in l&&n.push(l))}}for(r=n.length-1;r>=0;--r)n[r].renderDeclutter(t);!function(t,e){for(var i=t.childNodes,n=0;;++n){var o=i[n],r=e[n];if(!o&&!r)break;o!==r&&(o?r?t.insertBefore(r,o):(t.removeChild(o),--n):t.appendChild(r))}}(this.element_,this.children_),this.dispatchRenderEvent(le,t),this.renderedVisible_||(this.element_.style.display="",this.renderedVisible_=!0),this.scheduleExpireIconCache(t)}else this.renderedVisible_&&(this.element_.style.display="none",this.renderedVisible_=!1)},e.prototype.forEachLayerAtPixel=function(t,e,i,n,o){for(var r=e.viewState,a=e.layerStatesArray,s=a.length-1;s>=0;--s){var l=a[s],c=l.layer;if(c.hasRenderer()&&pe(l,r)&&o(c)){var u=c.getRenderer().getDataAtPixel(t,e,i);if(u){var h=n(c,u);if(h)return h}}}},e}(bs);var Ss=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Es=function(t){function e(e,i){var n=t.call(this,e)||this;return n.layer=i,n}return Ss(e,t),e}(ut.ZP),Ts="layers",Rs=function(t){function e(e){var i=this,n=e||{},o=(0,X.f0)({},n);delete o.layers;var r=n.layers;return(i=t.call(this,o)||this).on,i.once,i.un,i.layersListenerKeys_=[],i.listenerKeys_={},i.addChangeListener(Ts,i.handleLayersChanged_),r?Array.isArray(r)?r=new Pr(r.slice(),{unique:!0}):(0,Q.h)("function"==typeof r.getArray,43):r=new Pr(void 0,{unique:!0}),i.setLayers(r),i}return Ss(e,t),e.prototype.handleLayerChange_=function(){this.changed()},e.prototype.handleLayersChanged_=function(){this.layersListenerKeys_.forEach(F.bN),this.layersListenerKeys_.length=0;var t=this.getLayers();for(var e in this.layersListenerKeys_.push((0,F.oL)(t,Er,this.handleLayersAdd_,this),(0,F.oL)(t,Tr,this.handleLayersRemove_,this)),this.listenerKeys_)this.listenerKeys_[e].forEach(F.bN);(0,X.ZH)(this.listenerKeys_);for(var i=t.getArray(),n=0,o=i.length;n<o;n++){var r=i[n];this.registerLayerListeners_(r),this.dispatchEvent(new Es("addlayer",r))}this.changed()},e.prototype.registerLayerListeners_=function(t){var i=[(0,F.oL)(t,Fr.Z.PROPERTYCHANGE,this.handleLayerChange_,this),(0,F.oL)(t,r.Z.CHANGE,this.handleLayerChange_,this)];t instanceof e&&i.push((0,F.oL)(t,"addlayer",this.handleLayerGroupAdd_,this),(0,F.oL)(t,"removelayer",this.handleLayerGroupRemove_,this)),this.listenerKeys_[(0,p.sq)(t)]=i},e.prototype.handleLayerGroupAdd_=function(t){this.dispatchEvent(new Es("addlayer",t.layer))},e.prototype.handleLayerGroupRemove_=function(t){this.dispatchEvent(new Es("removelayer",t.layer))},e.prototype.handleLayersAdd_=function(t){var e=t.element;this.registerLayerListeners_(e),this.dispatchEvent(new Es("addlayer",e)),this.changed()},e.prototype.handleLayersRemove_=function(t){var e=t.element,i=(0,p.sq)(e);this.listenerKeys_[i].forEach(F.bN),delete this.listenerKeys_[i],this.dispatchEvent(new Es("removelayer",e)),this.changed()},e.prototype.getLayers=function(){return this.get(Ts)},e.prototype.setLayers=function(t){var e=this.getLayers();if(e)for(var i=e.getArray(),n=0,o=i.length;n<o;++n)this.dispatchEvent(new Es("removelayer",i[n]));this.set(Ts,t)},e.prototype.getLayersArray=function(t){var e=void 0!==t?t:[];return this.getLayers().forEach((function(t){t.getLayersArray(e)})),e},e.prototype.getLayerStatesArray=function(t){var e=void 0!==t?t:[],i=e.length;this.getLayers().forEach((function(t){t.getLayerStatesArray(e)}));var n=this.getLayerState(),o=n.zIndex;t||void 0!==n.zIndex||(o=0);for(var r=i,a=e.length;r<a;r++){var s=e[r];s.opacity*=n.opacity,s.visible=s.visible&&n.visible,s.maxResolution=Math.min(s.maxResolution,n.maxResolution),s.minResolution=Math.max(s.minResolution,n.minResolution),s.minZoom=Math.max(s.minZoom,n.minZoom),s.maxZoom=Math.min(s.maxZoom,n.maxZoom),void 0!==n.extent&&(void 0!==s.extent?s.extent=(0,P.Ed)(s.extent,n.extent):s.extent=n.extent),void 0===s.zIndex&&(s.zIndex=o)}return e},e.prototype.getSourceState=function(){return dt},e}(oe);const Os=Rs;var Is=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();const Ls=function(t){function e(e,i,n){var o=t.call(this,e)||this;return o.map=i,o.frameState=void 0!==n?n:null,o}return Is(e,t),e}(ut.ZP);var Ps=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();const Fs=function(t){function e(e,i,n,o,r){var a=t.call(this,e,i,r)||this;return a.originalEvent=n,a.pixel_=null,a.coordinate_=null,a.dragging=void 0!==o&&o,a}return Ps(e,t),Object.defineProperty(e.prototype,"pixel",{get:function(){return this.pixel_||(this.pixel_=this.map.getEventPixel(this.originalEvent)),this.pixel_},set:function(t){this.pixel_=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"coordinate",{get:function(){return this.coordinate_||(this.coordinate_=this.map.getCoordinateFromPixel(this.pixel)),this.coordinate_},set:function(t){this.coordinate_=t},enumerable:!1,configurable:!0}),e.prototype.preventDefault=function(){t.prototype.preventDefault.call(this),"preventDefault"in this.originalEvent&&this.originalEvent.preventDefault()},e.prototype.stopPropagation=function(){t.prototype.stopPropagation.call(this),"stopPropagation"in this.originalEvent&&this.originalEvent.stopPropagation()},e}(Ls),As={SINGLECLICK:"singleclick",CLICK:r.Z.CLICK,DBLCLICK:r.Z.DBLCLICK,POINTERDRAG:"pointerdrag",POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"},js="pointermove",Ms="pointerdown";var ks=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();const Ds=function(t){function e(e,i){var n=t.call(this,e)||this;n.map_=e,n.clickTimeoutId_,n.emulateClicks_=!1,n.dragging_=!1,n.dragListenerKeys_=[],n.moveTolerance_=void 0===i?1:i,n.down_=null;var o=n.map_.getViewport();return n.activePointers_=0,n.trackedTouches_={},n.element_=o,n.pointerdownListenerKey_=(0,F.oL)(o,Ms,n.handlePointerDown_,n),n.originalPointerMoveEvent_,n.relayedListenerKey_=(0,F.oL)(o,js,n.relayEvent_,n),n.boundHandleTouchMove_=n.handleTouchMove_.bind(n),n.element_.addEventListener(r.Z.TOUCHMOVE,n.boundHandleTouchMove_,!!b.bM&&{passive:!1}),n}return ks(e,t),e.prototype.emulateClick_=function(t){var e=new Fs(As.CLICK,this.map_,t);this.dispatchEvent(e),void 0!==this.clickTimeoutId_?(clearTimeout(this.clickTimeoutId_),this.clickTimeoutId_=void 0,e=new Fs(As.DBLCLICK,this.map_,t),this.dispatchEvent(e)):this.clickTimeoutId_=setTimeout(function(){this.clickTimeoutId_=void 0;var e=new Fs(As.SINGLECLICK,this.map_,t);this.dispatchEvent(e)}.bind(this),250)},e.prototype.updateActivePointers_=function(t){var e=t;e.type==As.POINTERUP||e.type==As.POINTERCANCEL?delete this.trackedTouches_[e.pointerId]:e.type==As.POINTERDOWN&&(this.trackedTouches_[e.pointerId]=!0),this.activePointers_=Object.keys(this.trackedTouches_).length},e.prototype.handlePointerUp_=function(t){this.updateActivePointers_(t);var e=new Fs(As.POINTERUP,this.map_,t);this.dispatchEvent(e),this.emulateClicks_&&!e.defaultPrevented&&!this.dragging_&&this.isMouseActionButton_(t)&&this.emulateClick_(this.down_),0===this.activePointers_&&(this.dragListenerKeys_.forEach(F.bN),this.dragListenerKeys_.length=0,this.dragging_=!1,this.down_=null)},e.prototype.isMouseActionButton_=function(t){return 0===t.button},e.prototype.handlePointerDown_=function(t){this.emulateClicks_=0===this.activePointers_,this.updateActivePointers_(t);var e=new Fs(As.POINTERDOWN,this.map_,t);for(var i in this.dispatchEvent(e),this.down_={},t){var n=t[i];this.down_[i]="function"==typeof n?Zr.Zn:n}if(0===this.dragListenerKeys_.length){var o=this.map_.getOwnerDocument();this.dragListenerKeys_.push((0,F.oL)(o,As.POINTERMOVE,this.handlePointerMove_,this),(0,F.oL)(o,As.POINTERUP,this.handlePointerUp_,this),(0,F.oL)(this.element_,As.POINTERCANCEL,this.handlePointerUp_,this)),this.element_.getRootNode&&this.element_.getRootNode()!==o&&this.dragListenerKeys_.push((0,F.oL)(this.element_.getRootNode(),As.POINTERUP,this.handlePointerUp_,this))}},e.prototype.handlePointerMove_=function(t){if(this.isMoving_(t)){this.dragging_=!0;var e=new Fs(As.POINTERDRAG,this.map_,t,this.dragging_);this.dispatchEvent(e)}},e.prototype.relayEvent_=function(t){this.originalPointerMoveEvent_=t;var e=!(!this.down_||!this.isMoving_(t));this.dispatchEvent(new Fs(t.type,this.map_,t,e))},e.prototype.handleTouchMove_=function(t){var e=this.originalPointerMoveEvent_;e&&!e.defaultPrevented||"boolean"==typeof t.cancelable&&!0!==t.cancelable||t.preventDefault()},e.prototype.isMoving_=function(t){return this.dragging_||Math.abs(t.clientX-this.down_.clientX)>this.moveTolerance_||Math.abs(t.clientY-this.down_.clientY)>this.moveTolerance_},e.prototype.disposeInternal=function(){this.relayedListenerKey_&&((0,F.bN)(this.relayedListenerKey_),this.relayedListenerKey_=null),this.element_.removeEventListener(r.Z.TOUCHMOVE,this.boundHandleTouchMove_),this.pointerdownListenerKey_&&((0,F.bN)(this.pointerdownListenerKey_),this.pointerdownListenerKey_=null),this.dragListenerKeys_.forEach(F.bN),this.dragListenerKeys_.length=0,this.element_=null,t.prototype.disposeInternal.call(this)},e}(a.Z),zs="postrender",Ns="movestart",Bs="moveend",Gs="layergroup",Zs="size",Ws="target",Us="view";var Xs=1/0;const Ys=function(){function t(t,e){this.priorityFunction_=t,this.keyFunction_=e,this.elements_=[],this.priorities_=[],this.queuedElements_={}}return t.prototype.clear=function(){this.elements_.length=0,this.priorities_.length=0,(0,X.ZH)(this.queuedElements_)},t.prototype.dequeue=function(){var t=this.elements_,e=this.priorities_,i=t[0];1==t.length?(t.length=0,e.length=0):(t[0]=t.pop(),e[0]=e.pop(),this.siftUp_(0));var n=this.keyFunction_(i);return delete this.queuedElements_[n],i},t.prototype.enqueue=function(t){(0,Q.h)(!(this.keyFunction_(t)in this.queuedElements_),31);var e=this.priorityFunction_(t);return e!=Xs&&(this.elements_.push(t),this.priorities_.push(e),this.queuedElements_[this.keyFunction_(t)]=!0,this.siftDown_(0,this.elements_.length-1),!0)},t.prototype.getCount=function(){return this.elements_.length},t.prototype.getLeftChildIndex_=function(t){return 2*t+1},t.prototype.getRightChildIndex_=function(t){return 2*t+2},t.prototype.getParentIndex_=function(t){return t-1>>1},t.prototype.heapify_=function(){var t;for(t=(this.elements_.length>>1)-1;t>=0;t--)this.siftUp_(t)},t.prototype.isEmpty=function(){return 0===this.elements_.length},t.prototype.isKeyQueued=function(t){return t in this.queuedElements_},t.prototype.isQueued=function(t){return this.isKeyQueued(this.keyFunction_(t))},t.prototype.siftUp_=function(t){for(var e=this.elements_,i=this.priorities_,n=e.length,o=e[t],r=i[t],a=t;t<n>>1;){var s=this.getLeftChildIndex_(t),l=this.getRightChildIndex_(t),c=l<n&&i[l]<i[s]?l:s;e[t]=e[c],i[t]=i[c],t=c}e[t]=o,i[t]=r,this.siftDown_(a,t)},t.prototype.siftDown_=function(t,e){for(var i=this.elements_,n=this.priorities_,o=i[e],r=n[e];e>t;){var a=this.getParentIndex_(e);if(!(n[a]>r))break;i[e]=i[a],n[e]=n[a],e=a}i[e]=o,n[e]=r},t.prototype.reprioritize=function(){var t,e,i,n=this.priorityFunction_,o=this.elements_,r=this.priorities_,a=0,s=o.length;for(e=0;e<s;++e)(i=n(t=o[e]))==Xs?delete this.queuedElements_[this.keyFunction_(t)]:(r[a]=i,o[a++]=t);o.length=a,r.length=a,this.heapify_()},t}();var Vs=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Ks=function(t){function e(e,i){var n=t.call(this,(function(t){return e.apply(null,t)}),(function(t){return t[0].getKey()}))||this;return n.boundHandleTileChange_=n.handleTileChange.bind(n),n.tileChangeCallback_=i,n.tilesLoading_=0,n.tilesLoadingKeys_={},n}return Vs(e,t),e.prototype.enqueue=function(e){var i=t.prototype.enqueue.call(this,e);i&&e[0].addEventListener(r.Z.CHANGE,this.boundHandleTileChange_);return i},e.prototype.getTilesLoading=function(){return this.tilesLoading_},e.prototype.handleTileChange=function(t){var e=t.target,i=e.getState();if(i===c||i===u||i===h){e.removeEventListener(r.Z.CHANGE,this.boundHandleTileChange_);var n=e.getKey();n in this.tilesLoadingKeys_&&(delete this.tilesLoadingKeys_[n],--this.tilesLoading_),this.tileChangeCallback_()}},e.prototype.loadMoreTiles=function(t,e){for(var i,n,o=0;this.tilesLoading_<t&&o<e&&this.getCount()>0;)n=(i=this.dequeue()[0]).getKey(),i.getState()!==s||n in this.tilesLoadingKeys_||(this.tilesLoadingKeys_[n]=!0,++this.tilesLoading_,++o,i.load())},e}(Ys);const Hs=Ks;const qs={CENTER:"center",RESOLUTION:"resolution",ROTATION:"rotation"};function $s(t,e,i){return function(n,o,r,a,s){if(n){var l=e?0:r[0]*o,c=e?0:r[1]*o,u=s?s[0]:0,h=s?s[1]:0,p=t[0]+l/2+u,d=t[2]-l/2+u,f=t[1]+c/2+h,g=t[3]-c/2+h;p>d&&(d=p=(d+p)/2),f>g&&(g=f=(g+f)/2);var _=(0,N.uZ)(n[0],p,d),y=(0,N.uZ)(n[1],f,g),v=30*o;return a&&i&&(_+=-v*Math.log(1+Math.max(0,p-n[0])/v)+v*Math.log(1+Math.max(0,n[0]-d)/v),y+=-v*Math.log(1+Math.max(0,f-n[1])/v)+v*Math.log(1+Math.max(0,n[1]-g)/v)),[_,y]}}}function Js(t){return t}function Qs(t,e,i,n){var o=(0,P.dz)(e)/i[0],r=(0,P.Cr)(e)/i[1];return n?Math.min(t,Math.max(o,r)):Math.min(t,Math.min(o,r))}function tl(t,e,i){var n=Math.min(t,e);return n*=Math.log(1+50*Math.max(0,t/e-1))/50+1,i&&(n=Math.max(n,i),n/=Math.log(1+50*Math.max(0,i/t-1))/50+1),(0,N.uZ)(n,i/2,2*e)}function el(t,e,i,n,o){return function(r,a,s,l){if(void 0!==r){var c=n?Qs(t,n,s,o):t;return(void 0===i||i)&&l?tl(r,c,e):(0,N.uZ)(r,e,c)}}}function il(t){return void 0!==t?0:void 0}function nl(t){return void 0!==t?t:void 0}var ol=i("../../opt/drone/yarncache/ol-npm-6.12.0-aa56e5c786-a0eb5766bd.zip/node_modules/ol/geom/Polygon.js"),rl=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();function al(t,e){setTimeout((function(){t(e)}),0)}function sl(t){return!(t.sourceCenter&&t.targetCenter&&!gr(t.sourceCenter,t.targetCenter))&&(t.sourceResolution===t.targetResolution&&t.sourceRotation===t.targetRotation)}function ll(t,e,i,n,o){var r=Math.cos(-o),a=Math.sin(-o),s=t[0]*r-t[1]*a,l=t[1]*r+t[0]*a;return[(s+=(e[0]/2-i[0])*n)*r-(l+=(i[1]-e[1]/2)*n)*(a=-a),l*r+s*a]}const cl=function(t){function e(e){var i=t.call(this)||this;i.on,i.once,i.un;var n=(0,X.f0)({},e);return i.hints_=[0,0],i.animations_=[],i.updateAnimationKey_,i.projection_=(0,z.UQ)(n.projection,"EPSG:3857"),i.viewportSize_=[100,100],i.targetCenter_=null,i.targetResolution_,i.targetRotation_,i.nextCenter_=null,i.nextResolution_,i.nextRotation_,i.cancelAnchor_=void 0,n.center&&(n.center=(0,z.Vs)(n.center,i.projection_)),n.extent&&(n.extent=(0,z.dY)(n.extent,i.projection_)),i.applyOptions_(n),i}return rl(e,t),e.prototype.applyOptions_=function(t){var e=(0,X.f0)({},t);for(var i in qs)delete e[i];this.setProperties(e,!0);var n=function(t){var e,i,n,o=28,r=2,a=void 0!==t.minZoom?t.minZoom:0,s=void 0!==t.maxZoom?t.maxZoom:o,l=void 0!==t.zoomFactor?t.zoomFactor:r,c=void 0!==t.multiWorld&&t.multiWorld,u=void 0===t.smoothResolutionConstraint||t.smoothResolutionConstraint,h=void 0!==t.showFullExtent&&t.showFullExtent,p=(0,z.UQ)(t.projection,"EPSG:3857"),d=p.getExtent(),f=t.constrainOnlyCenter,g=t.extent;c||g||!p.isGlobal()||(f=!1,g=d);if(void 0!==t.resolutions){var _=t.resolutions;i=_[a],n=void 0!==_[s]?_[s]:_[_.length-1],e=t.constrainResolution?function(t,e,i,n){return function(o,r,a,s){if(void 0!==o){var l=t[0],c=t[t.length-1],u=i?Qs(l,i,a,n):l;if(s)return void 0===e||e?tl(o,u,c):(0,N.uZ)(o,c,u);var h=Math.min(u,o),p=Math.floor((0,wt.h7)(t,h,r));return t[p]>u&&p<t.length-1?t[p+1]:t[p]}}}(_,u,!f&&g,h):el(i,n,u,!f&&g,h)}else{var y=(d?Math.max((0,P.dz)(d),(0,P.Cr)(d)):360*z.Wm[Ot.ZP.DEGREES]/p.getMetersPerUnit())/bt/Math.pow(r,0),v=y/Math.pow(r,o-0);void 0!==(i=t.maxResolution)?a=0:i=y/Math.pow(l,a),void 0===(n=t.minResolution)&&(n=void 0!==t.maxZoom?void 0!==t.maxResolution?i/Math.pow(l,s):y/Math.pow(l,s):v),s=a+Math.floor(Math.log(i/n)/Math.log(l)),n=i/Math.pow(l,s-a),e=t.constrainResolution?function(t,e,i,n,o,r){return function(a,s,l,c){if(void 0!==a){var u=o?Qs(e,o,l,r):e,h=void 0!==i?i:0;if(c)return void 0===n||n?tl(a,u,h):(0,N.uZ)(a,h,u);var p=Math.ceil(Math.log(e/u)/Math.log(t)-1e-9),d=-s*(.5-1e-9)+.5,f=Math.min(u,a),g=Math.floor(Math.log(e/f)/Math.log(t)+d),_=Math.max(p,g),y=e/Math.pow(t,_);return(0,N.uZ)(y,h,u)}}}(l,i,n,u,!f&&g,h):el(i,n,u,!f&&g,h)}return{constraint:e,maxResolution:i,minResolution:n,minZoom:a,zoomFactor:l}}(t);this.maxResolution_=n.maxResolution,this.minResolution_=n.minResolution,this.zoomFactor_=n.zoomFactor,this.resolutions_=t.resolutions,this.padding_=t.padding,this.minZoom_=n.minZoom;var o=function(t){if(void 0!==t.extent){var e=void 0===t.smoothExtentConstraint||t.smoothExtentConstraint;return $s(t.extent,t.constrainOnlyCenter,e)}var i=(0,z.UQ)(t.projection,"EPSG:3857");if(!0!==t.multiWorld&&i.isGlobal()){var n=i.getExtent().slice();return n[0]=-1/0,n[2]=1/0,$s(n,!1,!1)}return Js}(t),r=n.constraint,a=function(t){if(void 0===t.enableRotation||t.enableRotation){var e=t.constrainRotation;return void 0===e||!0===e?(r=o||(0,N.Yr)(5),function(t,e){return e?t:void 0!==t?Math.abs(t)<=r?0:t:void 0}):!1===e?nl:"number"==typeof e?(i=e,n=2*Math.PI/i,function(t,e){return e?t:void 0!==t?t=Math.floor(t/n+.5)*n:void 0}):nl}return il;var i,n;var o,r}(t);this.constraints_={center:o,resolution:r,rotation:a},this.setRotation(void 0!==t.rotation?t.rotation:0),this.setCenterInternal(void 0!==t.center?t.center:null),void 0!==t.resolution?this.setResolution(t.resolution):void 0!==t.zoom&&this.setZoom(t.zoom)},Object.defineProperty(e.prototype,"padding",{get:function(){return this.padding_},set:function(t){var e=this.padding_;this.padding_=t;var i=this.getCenter();if(i){var n=t||[0,0,0,0];e=e||[0,0,0,0];var o=this.getResolution(),r=o/2*(n[3]-e[3]+e[1]-n[1]),a=o/2*(n[0]-e[0]+e[2]-n[2]);this.setCenterInternal([i[0]+r,i[1]-a])}},enumerable:!1,configurable:!0}),e.prototype.getUpdatedOptions_=function(t){var e=this.getProperties();return void 0!==e.resolution?e.resolution=this.getResolution():e.zoom=this.getZoom(),e.center=this.getCenterInternal(),e.rotation=this.getRotation(),(0,X.f0)({},e,t)},e.prototype.animate=function(t){this.isDef()&&!this.getAnimating()&&this.resolveConstraints(0);for(var e=new Array(arguments.length),i=0;i<e.length;++i){var n=arguments[i];n.center&&((n=(0,X.f0)({},n)).center=(0,z.Vs)(n.center,this.getProjection())),n.anchor&&((n=(0,X.f0)({},n)).anchor=(0,z.Vs)(n.anchor,this.getProjection())),e[i]=n}this.animateInternal.apply(this,e)},e.prototype.animateInternal=function(t){var e,i=arguments.length;i>1&&"function"==typeof arguments[i-1]&&(e=arguments[i-1],--i);for(var n=0;n<i&&!this.isDef();++n){var o=arguments[n];o.center&&this.setCenterInternal(o.center),void 0!==o.zoom?this.setZoom(o.zoom):o.resolution&&this.setResolution(o.resolution),void 0!==o.rotation&&this.setRotation(o.rotation)}if(n!==i){for(var r=Date.now(),a=this.targetCenter_.slice(),s=this.targetResolution_,l=this.targetRotation_,c=[];n<i;++n){var u=arguments[n],h={start:r,complete:!1,anchor:u.anchor,duration:void 0!==u.duration?u.duration:1e3,easing:u.easing||g,callback:e};if(u.center&&(h.sourceCenter=a,h.targetCenter=u.center.slice(),a=h.targetCenter),void 0!==u.zoom?(h.sourceResolution=s,h.targetResolution=this.getResolutionForZoom(u.zoom),s=h.targetResolution):u.resolution&&(h.sourceResolution=s,h.targetResolution=u.resolution,s=h.targetResolution),void 0!==u.rotation){h.sourceRotation=l;var p=(0,N.$W)(u.rotation-l+Math.PI,2*Math.PI)-Math.PI;h.targetRotation=l+p,l=h.targetRotation}sl(h)?h.complete=!0:r+=h.duration,c.push(h)}this.animations_.push(c),this.setHint(or,1),this.updateAnimations_()}else e&&al(e,!0)},e.prototype.getAnimating=function(){return this.hints_[or]>0},e.prototype.getInteracting=function(){return this.hints_[rr]>0},e.prototype.cancelAnimations=function(){var t;this.setHint(or,-this.hints_[or]);for(var e=0,i=this.animations_.length;e<i;++e){var n=this.animations_[e];if(n[0].callback&&al(n[0].callback,!1),!t)for(var o=0,r=n.length;o<r;++o){var a=n[o];if(!a.complete){t=a.anchor;break}}}this.animations_.length=0,this.cancelAnchor_=t,this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN},e.prototype.updateAnimations_=function(){if(void 0!==this.updateAnimationKey_&&(cancelAnimationFrame(this.updateAnimationKey_),this.updateAnimationKey_=void 0),this.getAnimating()){for(var t=Date.now(),e=!1,i=this.animations_.length-1;i>=0;--i){for(var n=this.animations_[i],o=!0,r=0,a=n.length;r<a;++r){var s=n[r];if(!s.complete){var l=t-s.start,c=s.duration>0?l/s.duration:1;c>=1?(s.complete=!0,c=1):o=!1;var u=s.easing(c);if(s.sourceCenter){var h=s.sourceCenter[0],p=s.sourceCenter[1],d=s.targetCenter[0],f=s.targetCenter[1];this.nextCenter_=s.targetCenter;var g=h+u*(d-h),_=p+u*(f-p);this.targetCenter_=[g,_]}if(s.sourceResolution&&s.targetResolution){var y=1===u?s.targetResolution:s.sourceResolution+u*(s.targetResolution-s.sourceResolution);if(s.anchor){var v=this.getViewportSize_(this.getRotation()),m=this.constraints_.resolution(y,0,v,!0);this.targetCenter_=this.calculateCenterZoom(m,s.anchor)}this.nextResolution_=s.targetResolution,this.targetResolution_=y,this.applyTargetState_(!0)}if(void 0!==s.sourceRotation&&void 0!==s.targetRotation){var x=1===u?(0,N.$W)(s.targetRotation+Math.PI,2*Math.PI)-Math.PI:s.sourceRotation+u*(s.targetRotation-s.sourceRotation);if(s.anchor){var b=this.constraints_.rotation(x,!0);this.targetCenter_=this.calculateCenterRotate(b,s.anchor)}this.nextRotation_=s.targetRotation,this.targetRotation_=x}if(this.applyTargetState_(!0),e=!0,!s.complete)break}}if(o){this.animations_[i]=null,this.setHint(or,-1),this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN;var w=n[0].callback;w&&al(w,!0)}}this.animations_=this.animations_.filter(Boolean),e&&void 0===this.updateAnimationKey_&&(this.updateAnimationKey_=requestAnimationFrame(this.updateAnimations_.bind(this)))}},e.prototype.calculateCenterRotate=function(t,e){var i,n,o,r=this.getCenterInternal();return void 0!==r&&(_r(i=[r[0]-e[0],r[1]-e[1]],t-this.getRotation()),o=e,(n=i)[0]+=+o[0],n[1]+=+o[1]),i},e.prototype.calculateCenterZoom=function(t,e){var i,n=this.getCenterInternal(),o=this.getResolution();void 0!==n&&void 0!==o&&(i=[e[0]-t*(e[0]-n[0])/o,e[1]-t*(e[1]-n[1])/o]);return i},e.prototype.getViewportSize_=function(t){var e=this.viewportSize_;if(t){var i=e[0],n=e[1];return[Math.abs(i*Math.cos(t))+Math.abs(n*Math.sin(t)),Math.abs(i*Math.sin(t))+Math.abs(n*Math.cos(t))]}return e},e.prototype.setViewportSize=function(t){this.viewportSize_=Array.isArray(t)?t.slice():[100,100],this.getAnimating()||this.resolveConstraints(0)},e.prototype.getCenter=function(){var t=this.getCenterInternal();return t?(0,z.lO)(t,this.getProjection()):t},e.prototype.getCenterInternal=function(){return this.get(qs.CENTER)},e.prototype.getConstraints=function(){return this.constraints_},e.prototype.getConstrainResolution=function(){return this.get("constrainResolution")},e.prototype.getHints=function(t){return void 0!==t?(t[0]=this.hints_[0],t[1]=this.hints_[1],t):this.hints_.slice()},e.prototype.calculateExtent=function(t){var e=this.calculateExtentInternal(t);return(0,z.Fj)(e,this.getProjection())},e.prototype.calculateExtentInternal=function(t){var e=t||this.getViewportSizeMinusPadding_(),i=this.getCenterInternal();(0,Q.h)(i,1);var n=this.getResolution();(0,Q.h)(void 0!==n,2);var o=this.getRotation();return(0,Q.h)(void 0!==o,3),(0,P.p8)(i,n,o,e)},e.prototype.getMaxResolution=function(){return this.maxResolution_},e.prototype.getMinResolution=function(){return this.minResolution_},e.prototype.getMaxZoom=function(){return this.getZoomForResolution(this.minResolution_)},e.prototype.setMaxZoom=function(t){this.applyOptions_(this.getUpdatedOptions_({maxZoom:t}))},e.prototype.getMinZoom=function(){return this.getZoomForResolution(this.maxResolution_)},e.prototype.setMinZoom=function(t){this.applyOptions_(this.getUpdatedOptions_({minZoom:t}))},e.prototype.setConstrainResolution=function(t){this.applyOptions_(this.getUpdatedOptions_({constrainResolution:t}))},e.prototype.getProjection=function(){return this.projection_},e.prototype.getResolution=function(){return this.get(qs.RESOLUTION)},e.prototype.getResolutions=function(){return this.resolutions_},e.prototype.getResolutionForExtent=function(t,e){return this.getResolutionForExtentInternal((0,z.dY)(t,this.getProjection()),e)},e.prototype.getResolutionForExtentInternal=function(t,e){var i=e||this.getViewportSizeMinusPadding_(),n=(0,P.dz)(t)/i[0],o=(0,P.Cr)(t)/i[1];return Math.max(n,o)},e.prototype.getResolutionForValueFunction=function(t){var e=t||2,i=this.getConstrainedResolution(this.maxResolution_),n=this.minResolution_,o=Math.log(i/n)/Math.log(e);return function(t){return i/Math.pow(e,t*o)}},e.prototype.getRotation=function(){return this.get(qs.ROTATION)},e.prototype.getValueForResolutionFunction=function(t){var e=Math.log(t||2),i=this.getConstrainedResolution(this.maxResolution_),n=this.minResolution_,o=Math.log(i/n)/e;return function(t){return Math.log(i/t)/e/o}},e.prototype.getViewportSizeMinusPadding_=function(t){var e=this.getViewportSize_(t),i=this.padding_;return i&&(e=[e[0]-i[1]-i[3],e[1]-i[0]-i[2]]),e},e.prototype.getState=function(){var t=this.getProjection(),e=this.getResolution(),i=this.getRotation(),n=this.getCenterInternal(),o=this.padding_;if(o){var r=this.getViewportSizeMinusPadding_();n=ll(n,this.getViewportSize_(),[r[0]/2+o[3],r[1]/2+o[0]],e,i)}return{center:n.slice(0),projection:void 0!==t?t:null,resolution:e,nextCenter:this.nextCenter_,nextResolution:this.nextResolution_,nextRotation:this.nextRotation_,rotation:i,zoom:this.getZoom()}},e.prototype.getZoom=function(){var t,e=this.getResolution();return void 0!==e&&(t=this.getZoomForResolution(e)),t},e.prototype.getZoomForResolution=function(t){var e,i,n=this.minZoom_||0;if(this.resolutions_){var o=(0,wt.h7)(this.resolutions_,t,1);n=o,e=this.resolutions_[o],i=o==this.resolutions_.length-1?2:e/this.resolutions_[o+1]}else e=this.maxResolution_,i=this.zoomFactor_;return n+Math.log(e/t)/Math.log(i)},e.prototype.getResolutionForZoom=function(t){if(this.resolutions_){if(this.resolutions_.length<=1)return 0;var e=(0,N.uZ)(Math.floor(t),0,this.resolutions_.length-2),i=this.resolutions_[e]/this.resolutions_[e+1];return this.resolutions_[e]/Math.pow(i,(0,N.uZ)(t-e,0,1))}return this.maxResolution_/Math.pow(this.zoomFactor_,t-this.minZoom_)},e.prototype.fit=function(t,e){var i;if((0,Q.h)(Array.isArray(t)||"function"==typeof t.getSimplifiedGeometry,24),Array.isArray(t)){(0,Q.h)(!(0,P.xb)(t),25);var n=(0,z.dY)(t,this.getProjection());i=(0,ol.oJ)(n)}else if(t.getType()===go.Z.CIRCLE){n=(0,z.dY)(t.getExtent(),this.getProjection());(i=(0,ol.oJ)(n)).rotate(this.getRotation(),(0,P.qg)(n))}else{var o=(0,z.Cs)();i=o?t.clone().transform(o,this.getProjection()):t}this.fitInternal(i,e)},e.prototype.rotatedExtentForGeometry=function(t){for(var e=this.getRotation(),i=Math.cos(e),n=Math.sin(-e),o=t.getFlatCoordinates(),r=t.getStride(),a=1/0,s=1/0,l=-1/0,c=-1/0,u=0,h=o.length;u<h;u+=r){var p=o[u]*i-o[u+1]*n,d=o[u]*n+o[u+1]*i;a=Math.min(a,p),s=Math.min(s,d),l=Math.max(l,p),c=Math.max(c,d)}return[a,s,l,c]},e.prototype.fitInternal=function(t,e){var i=e||{},n=i.size;n||(n=this.getViewportSizeMinusPadding_());var o,r=void 0!==i.padding?i.padding:[0,0,0,0],a=void 0!==i.nearest&&i.nearest;o=void 0!==i.minResolution?i.minResolution:void 0!==i.maxZoom?this.getResolutionForZoom(i.maxZoom):0;var s=this.rotatedExtentForGeometry(t),l=this.getResolutionForExtentInternal(s,[n[0]-r[1]-r[3],n[1]-r[0]-r[2]]);l=isNaN(l)?o:Math.max(l,o),l=this.getConstrainedResolution(l,a?0:1);var c=this.getRotation(),u=Math.sin(c),h=Math.cos(c),p=(0,P.qg)(s);p[0]+=(r[1]-r[3])/2*l,p[1]+=(r[0]-r[2])/2*l;var d=p[0]*h-p[1]*u,f=p[1]*h+p[0]*u,g=this.getConstrainedCenter([d,f],l),_=i.callback?i.callback:Zr.Zn;void 0!==i.duration?this.animateInternal({resolution:l,center:g,duration:i.duration,easing:i.easing},_):(this.targetResolution_=l,this.targetCenter_=g,this.applyTargetState_(!1,!0),al(_,!0))},e.prototype.centerOn=function(t,e,i){this.centerOnInternal((0,z.Vs)(t,this.getProjection()),e,i)},e.prototype.centerOnInternal=function(t,e,i){this.setCenterInternal(ll(t,e,i,this.getResolution(),this.getRotation()))},e.prototype.calculateCenterShift=function(t,e,i,n){var o,r=this.padding_;if(r&&t){var a=this.getViewportSizeMinusPadding_(-i),s=ll(t,n,[a[0]/2+r[3],a[1]/2+r[0]],e,i);o=[t[0]-s[0],t[1]-s[1]]}return o},e.prototype.isDef=function(){return!!this.getCenterInternal()&&void 0!==this.getResolution()},e.prototype.adjustCenter=function(t){var e=(0,z.lO)(this.targetCenter_,this.getProjection());this.setCenter([e[0]+t[0],e[1]+t[1]])},e.prototype.adjustCenterInternal=function(t){var e=this.targetCenter_;this.setCenterInternal([e[0]+t[0],e[1]+t[1]])},e.prototype.adjustResolution=function(t,e){var i=e&&(0,z.Vs)(e,this.getProjection());this.adjustResolutionInternal(t,i)},e.prototype.adjustResolutionInternal=function(t,e){var i=this.getAnimating()||this.getInteracting(),n=this.getViewportSize_(this.getRotation()),o=this.constraints_.resolution(this.targetResolution_*t,0,n,i);e&&(this.targetCenter_=this.calculateCenterZoom(o,e)),this.targetResolution_*=t,this.applyTargetState_()},e.prototype.adjustZoom=function(t,e){this.adjustResolution(Math.pow(this.zoomFactor_,-t),e)},e.prototype.adjustRotation=function(t,e){e&&(e=(0,z.Vs)(e,this.getProjection())),this.adjustRotationInternal(t,e)},e.prototype.adjustRotationInternal=function(t,e){var i=this.getAnimating()||this.getInteracting(),n=this.constraints_.rotation(this.targetRotation_+t,i);e&&(this.targetCenter_=this.calculateCenterRotate(n,e)),this.targetRotation_+=t,this.applyTargetState_()},e.prototype.setCenter=function(t){this.setCenterInternal((0,z.Vs)(t,this.getProjection()))},e.prototype.setCenterInternal=function(t){this.targetCenter_=t,this.applyTargetState_()},e.prototype.setHint=function(t,e){return this.hints_[t]+=e,this.changed(),this.hints_[t]},e.prototype.setResolution=function(t){this.targetResolution_=t,this.applyTargetState_()},e.prototype.setRotation=function(t){this.targetRotation_=t,this.applyTargetState_()},e.prototype.setZoom=function(t){this.setResolution(this.getResolutionForZoom(t))},e.prototype.applyTargetState_=function(t,e){var i=this.getAnimating()||this.getInteracting()||e,n=this.constraints_.rotation(this.targetRotation_,i),o=this.getViewportSize_(n),r=this.constraints_.resolution(this.targetResolution_,0,o,i),a=this.constraints_.center(this.targetCenter_,r,o,i,this.calculateCenterShift(this.targetCenter_,r,n,o));this.get(qs.ROTATION)!==n&&this.set(qs.ROTATION,n),this.get(qs.RESOLUTION)!==r&&(this.set(qs.RESOLUTION,r),this.set("zoom",this.getZoom(),!0)),a&&this.get(qs.CENTER)&&gr(this.get(qs.CENTER),a)||this.set(qs.CENTER,a),this.getAnimating()&&!t&&this.cancelAnimations(),this.cancelAnchor_=void 0},e.prototype.resolveConstraints=function(t,e,i){var n=void 0!==t?t:200,o=e||0,r=this.constraints_.rotation(this.targetRotation_),a=this.getViewportSize_(r),s=this.constraints_.resolution(this.targetResolution_,o,a),l=this.constraints_.center(this.targetCenter_,s,a,!1,this.calculateCenterShift(this.targetCenter_,s,r,a));if(0===n&&!this.cancelAnchor_)return this.targetResolution_=s,this.targetRotation_=r,this.targetCenter_=l,void this.applyTargetState_();var c=i||(0===n?this.cancelAnchor_:void 0);this.cancelAnchor_=void 0,this.getResolution()===s&&this.getRotation()===r&&this.getCenterInternal()&&gr(this.getCenterInternal(),l)||(this.getAnimating()&&this.cancelAnimations(),this.animateInternal({rotation:r,center:l,resolution:s,duration:n,easing:f,anchor:c}))},e.prototype.beginInteraction=function(){this.resolveConstraints(0),this.setHint(rr,1)},e.prototype.endInteraction=function(t,e,i){var n=i&&(0,z.Vs)(i,this.getProjection());this.endInteractionInternal(t,e,n)},e.prototype.endInteractionInternal=function(t,e,i){this.setHint(rr,-1),this.resolveConstraints(t,e,i)},e.prototype.getConstrainedCenter=function(t,e){var i=this.getViewportSize_(this.getRotation());return this.constraints_.center(t,e||this.getResolution(),i)},e.prototype.getConstrainedZoom=function(t,e){var i=this.getResolutionForZoom(t);return this.getZoomForResolution(this.getConstrainedResolution(i,e))},e.prototype.getConstrainedResolution=function(t,e){var i=e||0,n=this.getViewportSize_(this.getRotation());return this.constraints_.resolution(t,i,n)},e}(ht.Z);var ul=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();function hl(t){t instanceof de?t.setMapInternal(null):t instanceof Os&&t.getLayers().forEach(hl)}function pl(t,e){if(t instanceof de)t.setMapInternal(e);else if(t instanceof Os)for(var i=t.getLayers().getArray(),n=0,o=i.length;n<o;++n)pl(i[n],e)}var dl=function(t){function e(e){var i=t.call(this)||this;i.on,i.once,i.un;var n=function(t){var e=null;void 0!==t.keyboardEventTarget&&(e="string"==typeof t.keyboardEventTarget?document.getElementById(t.keyboardEventTarget):t.keyboardEventTarget);var i,n,o,r={},a=t.layers&&"function"==typeof t.layers.getLayers?t.layers:new Os({layers:t.layers});r[Gs]=a,r[Ws]=t.target,r[Us]=t.view instanceof cl?t.view:new cl,void 0!==t.controls&&(Array.isArray(t.controls)?i=new Pr(t.controls.slice()):((0,Q.h)("function"==typeof t.controls.getArray,47),i=t.controls));void 0!==t.interactions&&(Array.isArray(t.interactions)?n=new Pr(t.interactions.slice()):((0,Q.h)("function"==typeof t.interactions.getArray,48),n=t.interactions));void 0!==t.overlays?Array.isArray(t.overlays)?o=new Pr(t.overlays.slice()):((0,Q.h)("function"==typeof t.overlays.getArray,49),o=t.overlays):o=new Pr;return{controls:i,interactions:n,keyboardEventTarget:e,overlays:o,values:r}}(e);i.renderComplete_,i.boundHandleBrowserEvent_=i.handleBrowserEvent.bind(i),i.maxTilesLoading_=void 0!==e.maxTilesLoading?e.maxTilesLoading:16,i.pixelRatio_=void 0!==e.pixelRatio?e.pixelRatio:b.MP,i.postRenderTimeoutHandle_,i.animationDelayKey_,i.animationDelay_=function(){this.animationDelayKey_=void 0,this.renderFrame_(Date.now())}.bind(i),i.coordinateToPixelTransform_=(0,Se.Ue)(),i.pixelToCoordinateTransform_=(0,Se.Ue)(),i.frameIndex_=0,i.frameState_=null,i.previousExtent_=null,i.viewPropertyListenerKey_=null,i.viewChangeListenerKey_=null,i.layerGroupPropertyListenerKeys_=null,i.viewport_=document.createElement("div"),i.viewport_.className="ol-viewport"+("ontouchstart"in window?" ol-touch":""),i.viewport_.style.position="relative",i.viewport_.style.overflow="hidden",i.viewport_.style.width="100%",i.viewport_.style.height="100%",i.overlayContainer_=document.createElement("div"),i.overlayContainer_.style.position="absolute",i.overlayContainer_.style.zIndex="0",i.overlayContainer_.style.width="100%",i.overlayContainer_.style.height="100%",i.overlayContainer_.style.pointerEvents="none",i.overlayContainer_.className="ol-overlaycontainer",i.viewport_.appendChild(i.overlayContainer_),i.overlayContainerStopEvent_=document.createElement("div"),i.overlayContainerStopEvent_.style.position="absolute",i.overlayContainerStopEvent_.style.zIndex="0",i.overlayContainerStopEvent_.style.width="100%",i.overlayContainerStopEvent_.style.height="100%",i.overlayContainerStopEvent_.style.pointerEvents="none",i.overlayContainerStopEvent_.className="ol-overlaycontainer-stopevent",i.viewport_.appendChild(i.overlayContainerStopEvent_),i.mapBrowserEventHandler_=null,i.moveTolerance_=e.moveTolerance,i.keyboardEventTarget_=n.keyboardEventTarget,i.targetChangeHandlerKeys_=null,i.controls=n.controls||new Pr,i.interactions=n.interactions||new Pr,i.overlays_=n.overlays,i.overlayIdIndex_={},i.renderer_=null,i.postRenderFunctions_=[],i.tileQueue_=new Hs(i.getTilePriority.bind(i),i.handleTileChange_.bind(i)),i.addChangeListener(Gs,i.handleLayerGroupChanged_),i.addChangeListener(Us,i.handleViewChanged_),i.addChangeListener(Zs,i.handleSizeChanged_),i.addChangeListener(Ws,i.handleTargetChanged_),i.setProperties(n.values);var o=i;return!e.view||e.view instanceof cl||e.view.then((function(t){o.setView(new cl(t))})),i.controls.addEventListener(Er,function(t){t.element.setMap(this)}.bind(i)),i.controls.addEventListener(Tr,function(t){t.element.setMap(null)}.bind(i)),i.interactions.addEventListener(Er,function(t){t.element.setMap(this)}.bind(i)),i.interactions.addEventListener(Tr,function(t){t.element.setMap(null)}.bind(i)),i.overlays_.addEventListener(Er,function(t){this.addOverlayInternal_(t.element)}.bind(i)),i.overlays_.addEventListener(Tr,function(t){var e=t.element.getId();void 0!==e&&delete this.overlayIdIndex_[e.toString()],t.element.setMap(null)}.bind(i)),i.controls.forEach(function(t){t.setMap(this)}.bind(i)),i.interactions.forEach(function(t){t.setMap(this)}.bind(i)),i.overlays_.forEach(i.addOverlayInternal_.bind(i)),i}return ul(e,t),e.prototype.createRenderer=function(){throw new Error("Use a map type that has a createRenderer method")},e.prototype.addControl=function(t){this.getControls().push(t)},e.prototype.addInteraction=function(t){this.getInteractions().push(t)},e.prototype.addLayer=function(t){this.getLayerGroup().getLayers().push(t)},e.prototype.handleLayerAdd_=function(t){pl(t.layer,this)},e.prototype.addOverlay=function(t){this.getOverlays().push(t)},e.prototype.addOverlayInternal_=function(t){var e=t.getId();void 0!==e&&(this.overlayIdIndex_[e.toString()]=t),t.setMap(this)},e.prototype.disposeInternal=function(){this.setTarget(null),t.prototype.disposeInternal.call(this)},e.prototype.forEachFeatureAtPixel=function(t,e,i){if(this.frameState_){var n=this.getCoordinateFromPixelInternal(t),o=void 0!==(i=void 0!==i?i:{}).hitTolerance?i.hitTolerance:0,r=void 0!==i.layerFilter?i.layerFilter:Zr.uX,a=!1!==i.checkWrapped;return this.renderer_.forEachFeatureAtCoordinate(n,this.frameState_,o,a,e,null,r,null)}},e.prototype.getFeaturesAtPixel=function(t,e){var i=[];return this.forEachFeatureAtPixel(t,(function(t){i.push(t)}),e),i},e.prototype.getAllLayers=function(){var t=[];return function e(i){i.forEach((function(i){i instanceof Os?e(i.getLayers()):t.push(i)}))}(this.getLayers()),t},e.prototype.forEachLayerAtPixel=function(t,e,i){if(this.frameState_){var n=i||{},o=void 0!==n.hitTolerance?n.hitTolerance:0,r=n.layerFilter||Zr.uX;return this.renderer_.forEachLayerAtPixel(t,this.frameState_,o,e,r)}},e.prototype.hasFeatureAtPixel=function(t,e){if(!this.frameState_)return!1;var i=this.getCoordinateFromPixelInternal(t),n=void 0!==(e=void 0!==e?e:{}).layerFilter?e.layerFilter:Zr.uX,o=void 0!==e.hitTolerance?e.hitTolerance:0,r=!1!==e.checkWrapped;return this.renderer_.hasFeatureAtCoordinate(i,this.frameState_,o,r,n,null)},e.prototype.getEventCoordinate=function(t){return this.getCoordinateFromPixel(this.getEventPixel(t))},e.prototype.getEventCoordinateInternal=function(t){return this.getCoordinateFromPixelInternal(this.getEventPixel(t))},e.prototype.getEventPixel=function(t){var e=this.viewport_.getBoundingClientRect(),i="changedTouches"in t?t.changedTouches[0]:t;return[i.clientX-e.left,i.clientY-e.top]},e.prototype.getTarget=function(){return this.get(Ws)},e.prototype.getTargetElement=function(){var t=this.getTarget();return void 0!==t?"string"==typeof t?document.getElementById(t):t:null},e.prototype.getCoordinateFromPixel=function(t){return(0,z.lO)(this.getCoordinateFromPixelInternal(t),this.getView().getProjection())},e.prototype.getCoordinateFromPixelInternal=function(t){var e=this.frameState_;return e?(0,Se.nn)(e.pixelToCoordinateTransform,t.slice()):null},e.prototype.getControls=function(){return this.controls},e.prototype.getOverlays=function(){return this.overlays_},e.prototype.getOverlayById=function(t){var e=this.overlayIdIndex_[t.toString()];return void 0!==e?e:null},e.prototype.getInteractions=function(){return this.interactions},e.prototype.getLayerGroup=function(){return this.get(Gs)},e.prototype.setLayers=function(t){var e=this.getLayerGroup();if(t instanceof Pr)e.setLayers(t);else{var i=e.getLayers();i.clear(),i.extend(t)}},e.prototype.getLayers=function(){return this.getLayerGroup().getLayers()},e.prototype.getLoading=function(){for(var t=this.getLayerGroup().getLayerStatesArray(),e=0,i=t.length;e<i;++e){var n=t[e].layer.getSource();if(n&&n.loading)return!0}return!1},e.prototype.getPixelFromCoordinate=function(t){var e=(0,z.Vs)(t,this.getView().getProjection());return this.getPixelFromCoordinateInternal(e)},e.prototype.getPixelFromCoordinateInternal=function(t){var e=this.frameState_;return e?(0,Se.nn)(e.coordinateToPixelTransform,t.slice(0,2)):null},e.prototype.getRenderer=function(){return this.renderer_},e.prototype.getSize=function(){return this.get(Zs)},e.prototype.getView=function(){return this.get(Us)},e.prototype.getViewport=function(){return this.viewport_},e.prototype.getOverlayContainer=function(){return this.overlayContainer_},e.prototype.getOverlayContainerStopEvent=function(){return this.overlayContainerStopEvent_},e.prototype.getOwnerDocument=function(){var t=this.getTargetElement();return t?t.ownerDocument:document},e.prototype.getTilePriority=function(t,e,i,n){return function(t,e,i,n,o){if(!t||!(i in t.wantedTiles))return Xs;if(!t.wantedTiles[i][e.getKey()])return Xs;var r=t.viewState.center,a=n[0]-r[0],s=n[1]-r[1];return 65536*Math.log(o)+Math.sqrt(a*a+s*s)/o}(this.frameState_,t,e,i,n)},e.prototype.handleBrowserEvent=function(t,e){var i=e||t.type,n=new Fs(i,this,t);this.handleMapBrowserEvent(n)},e.prototype.handleMapBrowserEvent=function(t){if(this.frameState_){var e=t.originalEvent,i=e.type;if(i===Ms||i===r.Z.WHEEL||i===r.Z.KEYDOWN){var n=this.getOwnerDocument(),o=this.viewport_.getRootNode?this.viewport_.getRootNode():n,a=e.target;if(this.overlayContainerStopEvent_.contains(a)||!(o===n?n.documentElement:o).contains(a))return}if(t.frameState=this.frameState_,!1!==this.dispatchEvent(t))for(var s=this.getInteractions().getArray().slice(),l=s.length-1;l>=0;l--){var c=s[l];if(c.getMap()===this&&c.getActive()&&this.getTargetElement())if(!c.handleEvent(t)||t.propagationStopped)break}}},e.prototype.handlePostRender=function(){var t=this.frameState_,e=this.tileQueue_;if(!e.isEmpty()){var i=this.maxTilesLoading_,n=i;if(t){var o=t.viewHints;if(o[or]||o[rr]){var r=Date.now()-t.time>8;i=r?0:8,n=r?0:2}}e.getTilesLoading()<i&&(e.reprioritize(),e.loadMoreTiles(i,n))}t&&this.hasListener(ce)&&!t.animate&&this.renderComplete_&&this.renderer_.dispatchRenderEvent(ce,t);for(var a=this.postRenderFunctions_,s=0,l=a.length;s<l;++s)a[s](this,t);a.length=0},e.prototype.handleSizeChanged_=function(){this.getView()&&!this.getView().getAnimating()&&this.getView().resolveConstraints(0),this.render()},e.prototype.handleTargetChanged_=function(){if(this.mapBrowserEventHandler_){for(var t=0,e=this.targetChangeHandlerKeys_.length;t<e;++t)(0,F.bN)(this.targetChangeHandlerKeys_[t]);this.targetChangeHandlerKeys_=null,this.viewport_.removeEventListener(r.Z.CONTEXTMENU,this.boundHandleBrowserEvent_),this.viewport_.removeEventListener(r.Z.WHEEL,this.boundHandleBrowserEvent_),this.mapBrowserEventHandler_.dispose(),this.mapBrowserEventHandler_=null,S(this.viewport_)}var i=this.getTargetElement();if(i){for(var n in i.appendChild(this.viewport_),this.renderer_||(this.renderer_=this.createRenderer()),this.mapBrowserEventHandler_=new Ds(this,this.moveTolerance_),As)this.mapBrowserEventHandler_.addEventListener(As[n],this.handleMapBrowserEvent.bind(this));this.viewport_.addEventListener(r.Z.CONTEXTMENU,this.boundHandleBrowserEvent_,!1),this.viewport_.addEventListener(r.Z.WHEEL,this.boundHandleBrowserEvent_,!!b.bM&&{passive:!1});var o=this.getOwnerDocument().defaultView,a=this.keyboardEventTarget_?this.keyboardEventTarget_:i;this.targetChangeHandlerKeys_=[(0,F.oL)(a,r.Z.KEYDOWN,this.handleBrowserEvent,this),(0,F.oL)(a,r.Z.KEYPRESS,this.handleBrowserEvent,this),(0,F.oL)(o,r.Z.RESIZE,this.updateSize,this)]}else this.renderer_&&(clearTimeout(this.postRenderTimeoutHandle_),this.postRenderTimeoutHandle_=void 0,this.postRenderFunctions_.length=0,this.renderer_.dispose(),this.renderer_=null),this.animationDelayKey_&&(cancelAnimationFrame(this.animationDelayKey_),this.animationDelayKey_=void 0);this.updateSize()},e.prototype.handleTileChange_=function(){this.render()},e.prototype.handleViewPropertyChanged_=function(){this.render()},e.prototype.handleViewChanged_=function(){this.viewPropertyListenerKey_&&((0,F.bN)(this.viewPropertyListenerKey_),this.viewPropertyListenerKey_=null),this.viewChangeListenerKey_&&((0,F.bN)(this.viewChangeListenerKey_),this.viewChangeListenerKey_=null);var t=this.getView();t&&(this.updateViewportSize_(),this.viewPropertyListenerKey_=(0,F.oL)(t,Fr.Z.PROPERTYCHANGE,this.handleViewPropertyChanged_,this),this.viewChangeListenerKey_=(0,F.oL)(t,r.Z.CHANGE,this.handleViewPropertyChanged_,this),t.resolveConstraints(0)),this.render()},e.prototype.handleLayerGroupChanged_=function(){this.layerGroupPropertyListenerKeys_&&(this.layerGroupPropertyListenerKeys_.forEach(F.bN),this.layerGroupPropertyListenerKeys_=null);var t=this.getLayerGroup();t&&(this.handleLayerAdd_(new Es("addlayer",t)),this.layerGroupPropertyListenerKeys_=[(0,F.oL)(t,Fr.Z.PROPERTYCHANGE,this.render,this),(0,F.oL)(t,r.Z.CHANGE,this.render,this),(0,F.oL)(t,"addlayer",this.handleLayerAdd_,this),(0,F.oL)(t,"removelayer",this.handleLayerRemove_,this)]),this.render()},e.prototype.isRendered=function(){return!!this.frameState_},e.prototype.renderSync=function(){this.animationDelayKey_&&cancelAnimationFrame(this.animationDelayKey_),this.animationDelay_()},e.prototype.redrawText=function(){for(var t=this.getLayerGroup().getLayerStatesArray(),e=0,i=t.length;e<i;++e){var n=t[e].layer;n.hasRenderer()&&n.getRenderer().handleFontsChanged()}},e.prototype.render=function(){this.renderer_&&void 0===this.animationDelayKey_&&(this.animationDelayKey_=requestAnimationFrame(this.animationDelay_))},e.prototype.removeControl=function(t){return this.getControls().remove(t)},e.prototype.removeInteraction=function(t){return this.getInteractions().remove(t)},e.prototype.removeLayer=function(t){return this.getLayerGroup().getLayers().remove(t)},e.prototype.handleLayerRemove_=function(t){hl(t.layer)},e.prototype.removeOverlay=function(t){return this.getOverlays().remove(t)},e.prototype.renderFrame_=function(t){var e=this,i=this.getSize(),n=this.getView(),o=this.frameState_,r=null;if(void 0!==i&&Ct(i)&&n&&n.isDef()){var a=n.getHints(this.frameState_?this.frameState_.viewHints:void 0),s=n.getState();if(r={animate:!1,coordinateToPixelTransform:this.coordinateToPixelTransform_,declutterTree:null,extent:(0,P.p8)(s.center,s.resolution,s.rotation,i),index:this.frameIndex_++,layerIndex:0,layerStatesArray:this.getLayerGroup().getLayerStatesArray(),pixelRatio:this.pixelRatio_,pixelToCoordinateTransform:this.pixelToCoordinateTransform_,postRenderFunctions:[],size:i,tileQueue:this.tileQueue_,time:t,usedTiles:{},viewState:s,viewHints:a,wantedTiles:{},mapId:(0,p.sq)(this),renderTargets:{}},s.nextCenter&&s.nextResolution){var l=isNaN(s.nextRotation)?s.rotation:s.nextRotation;r.nextExtent=(0,P.p8)(s.nextCenter,s.nextResolution,l,i)}}if(this.frameState_=r,this.renderer_.renderFrame(r),r){if(r.animate&&this.render(),Array.prototype.push.apply(this.postRenderFunctions_,r.postRenderFunctions),o)(!this.previousExtent_||!(0,P.xb)(this.previousExtent_)&&!(0,P.fS)(r.extent,this.previousExtent_))&&(this.dispatchEvent(new Ls(Ns,this,o)),this.previousExtent_=(0,P.YN)(this.previousExtent_));this.previousExtent_&&!r.viewHints[or]&&!r.viewHints[rr]&&!(0,P.fS)(r.extent,this.previousExtent_)&&(this.dispatchEvent(new Ls(Bs,this,r)),(0,P.d9)(r.extent,this.previousExtent_))}this.dispatchEvent(new Ls(zs,this,r)),this.renderComplete_=!this.tileQueue_.getTilesLoading()&&!this.tileQueue_.getCount()&&!this.getLoading(),this.postRenderTimeoutHandle_||(this.postRenderTimeoutHandle_=setTimeout((function(){e.postRenderTimeoutHandle_=void 0,e.handlePostRender()}),0))},e.prototype.setLayerGroup=function(t){var e=this.getLayerGroup();e&&this.handleLayerRemove_(new Es("removelayer",e)),this.set(Gs,t)},e.prototype.setSize=function(t){this.set(Zs,t)},e.prototype.setTarget=function(t){this.set(Ws,t)},e.prototype.setView=function(t){if(!t||t instanceof cl)this.set(Us,t);else{this.set(Us,new cl);var e=this;t.then((function(t){e.setView(new cl(t))}))}},e.prototype.updateSize=function(){var t=this.getTargetElement(),e=void 0;if(t){var i=getComputedStyle(t),n=t.offsetWidth-parseFloat(i.borderLeftWidth)-parseFloat(i.paddingLeft)-parseFloat(i.paddingRight)-parseFloat(i.borderRightWidth),o=t.offsetHeight-parseFloat(i.borderTopWidth)-parseFloat(i.paddingTop)-parseFloat(i.paddingBottom)-parseFloat(i.borderBottomWidth);isNaN(n)||isNaN(o)||!Ct(e=[n,o])&&(t.offsetWidth||t.offsetHeight||t.getClientRects().length)&&console.warn("No map visible because the map container's width or height are 0.")}this.setSize(e),this.updateViewportSize_()},e.prototype.updateViewportSize_=function(){var t=this.getView();if(t){var e=void 0,i=getComputedStyle(this.viewport_);i.width&&i.height&&(e=[parseInt(i.width,10),parseInt(i.height,10)]),t.setViewportSize(e)}},e}(ht.Z);const fl=dl;var gl=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();const _l=function(t){function e(e){var i=t.call(this)||this,n=e.element;return!n||e.target||n.style.pointerEvents||(n.style.pointerEvents="auto"),i.element=n||null,i.target_=null,i.map_=null,i.listenerKeys=[],e.render&&(i.render=e.render),e.target&&i.setTarget(e.target),i}return gl(e,t),e.prototype.disposeInternal=function(){S(this.element),t.prototype.disposeInternal.call(this)},e.prototype.getMap=function(){return this.map_},e.prototype.setMap=function(t){this.map_&&S(this.element);for(var e=0,i=this.listenerKeys.length;e<i;++e)(0,F.bN)(this.listenerKeys[e]);(this.listenerKeys.length=0,this.map_=t,this.map_)&&((this.target_?this.target_:t.getOverlayContainerStopEvent()).appendChild(this.element),this.render!==Zr.Zn&&this.listenerKeys.push((0,F.oL)(t,zs,this.render,this)),t.render())},e.prototype.render=function(t){},e.prototype.setTarget=function(t){this.target_="string"==typeof t?document.getElementById(t):t},e}(ht.Z);var yl=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();const vl=function(t){function e(e){var i=this,n=e||{};(i=t.call(this,{element:document.createElement("div"),render:n.render,target:n.target})||this).ulElement_=document.createElement("ul"),i.collapsed_=void 0===n.collapsed||n.collapsed,i.userCollapsed_=i.collapsed_,i.overrideCollapsible_=void 0!==n.collapsible,i.collapsible_=void 0===n.collapsible||n.collapsible,i.collapsible_||(i.collapsed_=!1);var o=void 0!==n.className?n.className:"ol-attribution",a=void 0!==n.tipLabel?n.tipLabel:"Attributions",s=void 0!==n.expandClassName?n.expandClassName:o+"-expand",l=void 0!==n.collapseLabel?n.collapseLabel:"›",c=void 0!==n.collapseClassName?n.collapseClassName:o+"-collpase";"string"==typeof l?(i.collapseLabel_=document.createElement("span"),i.collapseLabel_.textContent=l,i.collapseLabel_.className=c):i.collapseLabel_=l;var u=void 0!==n.label?n.label:"i";"string"==typeof u?(i.label_=document.createElement("span"),i.label_.textContent=u,i.label_.className=s):i.label_=u;var h=i.collapsible_&&!i.collapsed_?i.collapseLabel_:i.label_;i.toggleButton_=document.createElement("button"),i.toggleButton_.setAttribute("type","button"),i.toggleButton_.setAttribute("aria-expanded",String(!i.collapsed_)),i.toggleButton_.title=a,i.toggleButton_.appendChild(h),i.toggleButton_.addEventListener(r.Z.CLICK,i.handleClick_.bind(i),!1);var p=o+" "+"ol-unselectable "+Ne+(i.collapsed_&&i.collapsible_?" ol-collapsed":"")+(i.collapsible_?"":" ol-uncollapsible"),d=i.element;return d.className=p,d.appendChild(i.toggleButton_),d.appendChild(i.ulElement_),i.renderedAttributions_=[],i.renderedVisible_=!0,i}return yl(e,t),e.prototype.collectSourceAttributions_=function(t){for(var e={},i=[],n=!0,o=t.layerStatesArray,r=0,a=o.length;r<a;++r){var s=o[r];if(pe(s,t.viewState)){var l=s.layer.getSource();if(l){var c=l.getAttributions();if(c){var u=c(t);if(u)if(n=n&&!1!==l.getAttributionsCollapsible(),Array.isArray(u))for(var h=0,p=u.length;h<p;++h)u[h]in e||(i.push(u[h]),e[u[h]]=!0);else u in e||(i.push(u),e[u]=!0)}}}}return this.overrideCollapsible_||this.setCollapsible(n),i},e.prototype.updateElement_=function(t){if(t){var e=this.collectSourceAttributions_(t),i=e.length>0;if(this.renderedVisible_!=i&&(this.element.style.display=i?"":"none",this.renderedVisible_=i),!(0,wt.fS)(e,this.renderedAttributions_)){!function(t){for(;t.lastChild;)t.removeChild(t.lastChild)}(this.ulElement_);for(var n=0,o=e.length;n<o;++n){var r=document.createElement("li");r.innerHTML=e[n],this.ulElement_.appendChild(r)}this.renderedAttributions_=e}}else this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1)},e.prototype.handleClick_=function(t){t.preventDefault(),this.handleToggle_(),this.userCollapsed_=this.collapsed_},e.prototype.handleToggle_=function(){this.element.classList.toggle(Be),this.collapsed_?C(this.collapseLabel_,this.label_):C(this.label_,this.collapseLabel_),this.collapsed_=!this.collapsed_,this.toggleButton_.setAttribute("aria-expanded",String(!this.collapsed_))},e.prototype.getCollapsible=function(){return this.collapsible_},e.prototype.setCollapsible=function(t){this.collapsible_!==t&&(this.collapsible_=t,this.element.classList.toggle("ol-uncollapsible"),this.userCollapsed_&&this.handleToggle_())},e.prototype.setCollapsed=function(t){this.userCollapsed_=t,this.collapsible_&&this.collapsed_!==t&&this.handleToggle_()},e.prototype.getCollapsed=function(){return this.collapsed_},e.prototype.render=function(t){this.updateElement_(t.frameState)},e}(_l);var ml=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();const xl=function(t){function e(e){var i=this,n=e||{};i=t.call(this,{element:document.createElement("div"),render:n.render,target:n.target})||this;var o=void 0!==n.className?n.className:"ol-rotate",a=void 0!==n.label?n.label:"⇧",s=void 0!==n.compassClassName?n.compassClassName:"ol-compass";i.label_=null,"string"==typeof a?(i.label_=document.createElement("span"),i.label_.className=s,i.label_.textContent=a):(i.label_=a,i.label_.classList.add(s));var l=n.tipLabel?n.tipLabel:"Reset rotation",c=document.createElement("button");c.className=o+"-reset",c.setAttribute("type","button"),c.title=l,c.appendChild(i.label_),c.addEventListener(r.Z.CLICK,i.handleClick_.bind(i),!1);var u=o+" "+"ol-unselectable "+Ne,h=i.element;return h.className=u,h.appendChild(c),i.callResetNorth_=n.resetNorth?n.resetNorth:void 0,i.duration_=void 0!==n.duration?n.duration:250,i.autoHide_=void 0===n.autoHide||n.autoHide,i.rotation_=void 0,i.autoHide_&&i.element.classList.add(De),i}return ml(e,t),e.prototype.handleClick_=function(t){t.preventDefault(),void 0!==this.callResetNorth_?this.callResetNorth_():this.resetNorth_()},e.prototype.resetNorth_=function(){var t=this.getMap().getView();if(t){var e=t.getRotation();void 0!==e&&(this.duration_>0&&e%(2*Math.PI)!=0?t.animate({rotation:0,duration:this.duration_,easing:f}):t.setRotation(0))}},e.prototype.render=function(t){var e=t.frameState;if(e){var i=e.viewState.rotation;if(i!=this.rotation_){var n="rotate("+i+"rad)";if(this.autoHide_){var o=this.element.classList.contains(De);o||0!==i?o&&0!==i&&this.element.classList.remove(De):this.element.classList.add(De)}this.label_.style.transform=n}this.rotation_=i}},e}(_l);var bl=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();const wl=function(t){function e(e){var i=this,n=e||{};i=t.call(this,{element:document.createElement("div"),target:n.target})||this;var o=void 0!==n.className?n.className:"ol-zoom",a=void 0!==n.delta?n.delta:1,s=void 0!==n.zoomInClassName?n.zoomInClassName:o+"-in",l=void 0!==n.zoomOutClassName?n.zoomOutClassName:o+"-out",c=void 0!==n.zoomInLabel?n.zoomInLabel:"+",u=void 0!==n.zoomOutLabel?n.zoomOutLabel:"–",h=void 0!==n.zoomInTipLabel?n.zoomInTipLabel:"Zoom in",p=void 0!==n.zoomOutTipLabel?n.zoomOutTipLabel:"Zoom out",d=document.createElement("button");d.className=s,d.setAttribute("type","button"),d.title=h,d.appendChild("string"==typeof c?document.createTextNode(c):c),d.addEventListener(r.Z.CLICK,i.handleClick_.bind(i,a),!1);var f=document.createElement("button");f.className=l,f.setAttribute("type","button"),f.title=p,f.appendChild("string"==typeof u?document.createTextNode(u):u),f.addEventListener(r.Z.CLICK,i.handleClick_.bind(i,-a),!1);var g=o+" "+"ol-unselectable "+Ne,_=i.element;return _.className=g,_.appendChild(d),_.appendChild(f),i.duration_=void 0!==n.duration?n.duration:250,i}return bl(e,t),e.prototype.handleClick_=function(t,e){e.preventDefault(),this.zoomByDelta_(t)},e.prototype.zoomByDelta_=function(t){var e=this.getMap().getView();if(e){var i=e.getZoom();if(void 0!==i){var n=e.getConstrainedZoom(i+t);this.duration_>0?(e.getAnimating()&&e.cancelAnimations(),e.animate({zoom:n,duration:this.duration_,easing:f})):e.setZoom(n)}}},e}(_l);const Cl="active";var Sl=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();function El(t,e,i,n){var o=t.getZoom();if(void 0!==o){var r=t.getConstrainedZoom(o+e),a=t.getResolutionForZoom(r);t.getAnimating()&&t.cancelAnimations(),t.animate({resolution:a,anchor:i,duration:void 0!==n?n:250,easing:f})}}const Tl=function(t){function e(e){var i=t.call(this)||this;return i.on,i.once,i.un,e&&e.handleEvent&&(i.handleEvent=e.handleEvent),i.map_=null,i.setActive(!0),i}return Sl(e,t),e.prototype.getActive=function(){return this.get(Cl)},e.prototype.getMap=function(){return this.map_},e.prototype.handleEvent=function(t){return!0},e.prototype.setActive=function(t){this.set(Cl,t)},e.prototype.setMap=function(t){this.map_=t},e}(ht.Z);var Rl=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();const Ol=function(t){function e(e){var i=t.call(this)||this,n=e||{};return i.delta_=n.delta?n.delta:1,i.duration_=void 0!==n.duration?n.duration:250,i}return Rl(e,t),e.prototype.handleEvent=function(t){var e=!1;if(t.type==As.DBLCLICK){var i=t.originalEvent,n=t.map,o=t.coordinate,r=i.shiftKey?-this.delta_:this.delta_;El(n.getView(),r,o,this.duration_),i.preventDefault(),e=!0}return!e},e}(Tl);var Il=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();function Ll(t){for(var e=t.length,i=0,n=0,o=0;o<e;o++)i+=t[o].clientX,n+=t[o].clientY;return[i/e,n/e]}const Pl=function(t){function e(e){var i=this,n=e||{};return i=t.call(this,n)||this,n.handleDownEvent&&(i.handleDownEvent=n.handleDownEvent),n.handleDragEvent&&(i.handleDragEvent=n.handleDragEvent),n.handleMoveEvent&&(i.handleMoveEvent=n.handleMoveEvent),n.handleUpEvent&&(i.handleUpEvent=n.handleUpEvent),n.stopDown&&(i.stopDown=n.stopDown),i.handlingDownUpSequence=!1,i.trackedPointers_={},i.targetPointers=[],i}return Il(e,t),e.prototype.getPointerCount=function(){return this.targetPointers.length},e.prototype.handleDownEvent=function(t){return!1},e.prototype.handleDragEvent=function(t){},e.prototype.handleEvent=function(t){if(!t.originalEvent)return!0;var e=!1;if(this.updateTrackedPointers_(t),this.handlingDownUpSequence){if(t.type==As.POINTERDRAG)this.handleDragEvent(t),t.originalEvent.preventDefault();else if(t.type==As.POINTERUP){var i=this.handleUpEvent(t);this.handlingDownUpSequence=i&&this.targetPointers.length>0}}else if(t.type==As.POINTERDOWN){var n=this.handleDownEvent(t);this.handlingDownUpSequence=n,e=this.stopDown(n)}else t.type==As.POINTERMOVE&&this.handleMoveEvent(t);return!e},e.prototype.handleMoveEvent=function(t){},e.prototype.handleUpEvent=function(t){return!1},e.prototype.stopDown=function(t){return t},e.prototype.updateTrackedPointers_=function(t){if(function(t){var e=t.type;return e===As.POINTERDOWN||e===As.POINTERDRAG||e===As.POINTERUP}(t)){var e=t.originalEvent,i=e.pointerId.toString();t.type==As.POINTERUP?delete this.trackedPointers_[i]:(t.type==As.POINTERDOWN||i in this.trackedPointers_)&&(this.trackedPointers_[i]=e),this.targetPointers=(0,X.KX)(this.trackedPointers_)}},e}(Tl);function Fl(t){var e=arguments;return function(t){for(var i=!0,n=0,o=e.length;n<o&&(i=i&&e[n](t));++n);return i}}var Al=function(t){var e=t.originalEvent;return e.altKey&&!(e.metaKey||e.ctrlKey)&&e.shiftKey},jl=function(t){return!t.map.getTargetElement().hasAttribute("tabindex")||function(t){var e=t.map.getTargetElement(),i=t.map.getOwnerDocument().activeElement;return e.contains(i)}(t)},Ml=Zr.uX,kl=function(t){var e=t.originalEvent;return 0==e.button&&!(b.G$&&b.tK&&e.ctrlKey)},Dl=function(t){var e=t.originalEvent;return!e.altKey&&!(e.metaKey||e.ctrlKey)&&!e.shiftKey},zl=function(t){var e=t.originalEvent;return!e.altKey&&!(e.metaKey||e.ctrlKey)&&e.shiftKey},Nl=function(t){var e=t.originalEvent.target.tagName;return"INPUT"!==e&&"SELECT"!==e&&"TEXTAREA"!==e},Bl=function(t){var e=t.originalEvent;return(0,Q.h)(void 0!==e,56),"mouse"==e.pointerType},Gl=function(t){var e=t.originalEvent;return(0,Q.h)(void 0!==e,56),e.isPrimary&&0===e.button},Zl=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Wl=function(t){function e(e){var i=t.call(this,{stopDown:Zr.Dv})||this,n=e||{};i.kinetic_=n.kinetic,i.lastCentroid=null,i.lastPointersCount_,i.panning_=!1;var o=n.condition?n.condition:Fl(Dl,Gl);return i.condition_=n.onFocusOnly?Fl(jl,o):o,i.noKinetic_=!1,i}return Zl(e,t),e.prototype.handleDragEvent=function(t){this.panning_||(this.panning_=!0,this.getMap().getView().beginInteraction());var e=this.targetPointers,i=Ll(e);if(e.length==this.lastPointersCount_){if(this.kinetic_&&this.kinetic_.update(i[0],i[1]),this.lastCentroid){var n=[this.lastCentroid[0]-i[0],i[1]-this.lastCentroid[1]],o=t.map.getView();!function(t,e){t[0]*=e,t[1]*=e}(n,o.getResolution()),_r(n,o.getRotation()),o.adjustCenterInternal(n)}}else this.kinetic_&&this.kinetic_.begin();this.lastCentroid=i,this.lastPointersCount_=e.length,t.originalEvent.preventDefault()},e.prototype.handleUpEvent=function(t){var e=t.map,i=e.getView();if(0===this.targetPointers.length){if(!this.noKinetic_&&this.kinetic_&&this.kinetic_.end()){var n=this.kinetic_.getDistance(),o=this.kinetic_.getAngle(),r=i.getCenterInternal(),a=e.getPixelFromCoordinateInternal(r),s=e.getCoordinateFromPixelInternal([a[0]-n*Math.cos(o),a[1]-n*Math.sin(o)]);i.animateInternal({center:i.getConstrainedCenter(s),duration:500,easing:f})}return this.panning_&&(this.panning_=!1,i.endInteraction()),!1}return this.kinetic_&&this.kinetic_.begin(),this.lastCentroid=null,!0},e.prototype.handleDownEvent=function(t){if(this.targetPointers.length>0&&this.condition_(t)){var e=t.map.getView();return this.lastCentroid=null,e.getAnimating()&&e.cancelAnimations(),this.kinetic_&&this.kinetic_.begin(),this.noKinetic_=this.targetPointers.length>1,!0}return!1},e}(Pl);const Ul=Wl;var Xl=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();const Yl=function(t){function e(e){var i=this,n=e||{};return(i=t.call(this,{stopDown:Zr.Dv})||this).condition_=n.condition?n.condition:Al,i.lastAngle_=void 0,i.duration_=void 0!==n.duration?n.duration:250,i}return Xl(e,t),e.prototype.handleDragEvent=function(t){if(Bl(t)){var e=t.map,i=e.getView();if(i.getConstraints().rotation!==il){var n=e.getSize(),o=t.pixel,r=Math.atan2(n[1]/2-o[1],o[0]-n[0]/2);if(void 0!==this.lastAngle_){var a=r-this.lastAngle_;i.adjustRotationInternal(-a)}this.lastAngle_=r}}},e.prototype.handleUpEvent=function(t){return!Bl(t)||(t.map.getView().endInteraction(this.duration_),!1)},e.prototype.handleDownEvent=function(t){return!!Bl(t)&&(!(!kl(t)||!this.condition_(t))&&(t.map.getView().beginInteraction(),this.lastAngle_=void 0,!0))},e}(Pl);var Vl=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();const Kl=function(t){function e(e){var i=t.call(this)||this;return i.geometry_=null,i.element_=document.createElement("div"),i.element_.style.position="absolute",i.element_.style.pointerEvents="auto",i.element_.className="ol-box "+e,i.map_=null,i.startPixel_=null,i.endPixel_=null,i}return Vl(e,t),e.prototype.disposeInternal=function(){this.setMap(null)},e.prototype.render_=function(){var t=this.startPixel_,e=this.endPixel_,i="px",n=this.element_.style;n.left=Math.min(t[0],e[0])+i,n.top=Math.min(t[1],e[1])+i,n.width=Math.abs(e[0]-t[0])+i,n.height=Math.abs(e[1]-t[1])+i},e.prototype.setMap=function(t){if(this.map_){this.map_.getOverlayContainer().removeChild(this.element_);var e=this.element_.style;e.left="inherit",e.top="inherit",e.width="inherit",e.height="inherit"}this.map_=t,this.map_&&this.map_.getOverlayContainer().appendChild(this.element_)},e.prototype.setPixels=function(t,e){this.startPixel_=t,this.endPixel_=e,this.createOrUpdateGeometry(),this.render_()},e.prototype.createOrUpdateGeometry=function(){var t=this.startPixel_,e=this.endPixel_,i=[t,[t[0],e[1]],e,[e[0],t[1]]].map(this.map_.getCoordinateFromPixelInternal,this.map_);i[4]=i[0].slice(),this.geometry_?this.geometry_.setCoordinates([i]):this.geometry_=new ol.ZP([i])},e.prototype.getGeometry=function(){return this.geometry_},e}(Pa.Z);var Hl=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),ql="boxstart",$l="boxdrag",Jl="boxend",Ql="boxcancel",tc=function(t){function e(e,i,n){var o=t.call(this,e)||this;return o.coordinate=i,o.mapBrowserEvent=n,o}return Hl(e,t),e}(ut.ZP);const ec=function(t){function e(e){var i=t.call(this)||this;i.on,i.once,i.un;var n=e||{};return i.box_=new Kl(n.className||"ol-dragbox"),i.minArea_=void 0!==n.minArea?n.minArea:64,n.onBoxEnd&&(i.onBoxEnd=n.onBoxEnd),i.startPixel_=null,i.condition_=n.condition?n.condition:kl,i.boxEndCondition_=n.boxEndCondition?n.boxEndCondition:i.defaultBoxEndCondition,i}return Hl(e,t),e.prototype.defaultBoxEndCondition=function(t,e,i){var n=i[0]-e[0],o=i[1]-e[1];return n*n+o*o>=this.minArea_},e.prototype.getGeometry=function(){return this.box_.getGeometry()},e.prototype.handleDragEvent=function(t){this.box_.setPixels(this.startPixel_,t.pixel),this.dispatchEvent(new tc($l,t.coordinate,t))},e.prototype.handleUpEvent=function(t){this.box_.setMap(null);var e=this.boxEndCondition_(t,this.startPixel_,t.pixel);return e&&this.onBoxEnd(t),this.dispatchEvent(new tc(e?Jl:Ql,t.coordinate,t)),!1},e.prototype.handleDownEvent=function(t){return!!this.condition_(t)&&(this.startPixel_=t.pixel,this.box_.setMap(t.map),this.box_.setPixels(this.startPixel_,this.startPixel_),this.dispatchEvent(new tc(ql,t.coordinate,t)),!0)},e.prototype.onBoxEnd=function(t){},e}(Pl);var ic=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();const nc=function(t){function e(e){var i=this,n=e||{},o=n.condition?n.condition:zl;return(i=t.call(this,{condition:o,className:n.className||"ol-dragzoom",minArea:n.minArea})||this).duration_=void 0!==n.duration?n.duration:200,i.out_=void 0!==n.out&&n.out,i}return ic(e,t),e.prototype.onBoxEnd=function(t){var e=this.getMap().getView(),i=this.getGeometry();if(this.out_){var n=e.rotatedExtentForGeometry(i),o=e.getResolutionForExtentInternal(n),r=e.getResolution()/o;(i=i.clone()).scale(r*r)}e.fitInternal(i,{duration:this.duration_,easing:f})},e}(ec),oc=37,rc=38,ac=39,sc=40;var lc=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();const cc=function(t){function e(e){var i=t.call(this)||this,n=e||{};return i.defaultCondition_=function(t){return Dl(t)&&Nl(t)},i.condition_=void 0!==n.condition?n.condition:i.defaultCondition_,i.duration_=void 0!==n.duration?n.duration:100,i.pixelDelta_=void 0!==n.pixelDelta?n.pixelDelta:128,i}return lc(e,t),e.prototype.handleEvent=function(t){var e=!1;if(t.type==r.Z.KEYDOWN){var i=t.originalEvent,n=i.keyCode;if(this.condition_(t)&&(n==sc||n==oc||n==ac||n==rc)){var o=t.map.getView(),a=o.getResolution()*this.pixelDelta_,s=0,l=0;n==sc?l=-a:n==oc?s=-a:n==ac?s=a:l=a;var c=[s,l];_r(c,o.getRotation()),function(t,e,i){var n=t.getCenterInternal();if(n){var o=[n[0]+e[0],n[1]+e[1]];t.animateInternal({duration:void 0!==i?i:250,easing:_,center:t.getConstrainedCenter(o)})}}(o,c,this.duration_),i.preventDefault(),e=!0}}return!e},e}(Tl);var uc=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();const hc=function(t){function e(e){var i=t.call(this)||this,n=e||{};return i.condition_=n.condition?n.condition:Nl,i.delta_=n.delta?n.delta:1,i.duration_=void 0!==n.duration?n.duration:100,i}return uc(e,t),e.prototype.handleEvent=function(t){var e=!1;if(t.type==r.Z.KEYDOWN||t.type==r.Z.KEYPRESS){var i=t.originalEvent,n=i.charCode;if(this.condition_(t)&&(n=="+".charCodeAt(0)||n=="-".charCodeAt(0))){var o=t.map,a=n=="+".charCodeAt(0)?this.delta_:-this.delta_;El(o.getView(),a,void 0,this.duration_),i.preventDefault(),e=!0}}return!e},e}(Tl);const pc=function(){function t(t,e,i){this.decay_=t,this.minVelocity_=e,this.delay_=i,this.points_=[],this.angle_=0,this.initialVelocity_=0}return t.prototype.begin=function(){this.points_.length=0,this.angle_=0,this.initialVelocity_=0},t.prototype.update=function(t,e){this.points_.push(t,e,Date.now())},t.prototype.end=function(){if(this.points_.length<6)return!1;var t=Date.now()-this.delay_,e=this.points_.length-3;if(this.points_[e+2]<t)return!1;for(var i=e-3;i>0&&this.points_[i+2]>t;)i-=3;var n=this.points_[e+2]-this.points_[i+2];if(n<1e3/60)return!1;var o=this.points_[e]-this.points_[i],r=this.points_[e+1]-this.points_[i+1];return this.angle_=Math.atan2(r,o),this.initialVelocity_=Math.sqrt(o*o+r*r)/n,this.initialVelocity_>this.minVelocity_},t.prototype.getDistance=function(){return(this.minVelocity_-this.initialVelocity_)/this.decay_},t.prototype.getAngle=function(){return this.angle_},t}();var dc=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),fc="trackpad",gc="wheel";const _c=function(t){function e(e){var i=this,n=e||{};(i=t.call(this,n)||this).totalDelta_=0,i.lastDelta_=0,i.maxDelta_=void 0!==n.maxDelta?n.maxDelta:1,i.duration_=void 0!==n.duration?n.duration:250,i.timeout_=void 0!==n.timeout?n.timeout:80,i.useAnchor_=void 0===n.useAnchor||n.useAnchor,i.constrainResolution_=void 0!==n.constrainResolution&&n.constrainResolution;var o=n.condition?n.condition:Ml;return i.condition_=n.onFocusOnly?Fl(jl,o):o,i.lastAnchor_=null,i.startTime_=void 0,i.timeoutId_,i.mode_=void 0,i.trackpadEventGap_=400,i.trackpadTimeoutId_,i.deltaPerZoom_=300,i}return dc(e,t),e.prototype.endInteraction_=function(){this.trackpadTimeoutId_=void 0,this.getMap().getView().endInteraction(void 0,this.lastDelta_?this.lastDelta_>0?1:-1:0,this.lastAnchor_)},e.prototype.handleEvent=function(t){if(!this.condition_(t))return!0;if(t.type!==r.Z.WHEEL)return!0;var e,i=t.map,n=t.originalEvent;if(n.preventDefault(),this.useAnchor_&&(this.lastAnchor_=t.coordinate),t.type==r.Z.WHEEL&&(e=n.deltaY,b.V&&n.deltaMode===WheelEvent.DOM_DELTA_PIXEL&&(e/=b.MP),n.deltaMode===WheelEvent.DOM_DELTA_LINE&&(e*=40)),0===e)return!1;this.lastDelta_=e;var o=Date.now();void 0===this.startTime_&&(this.startTime_=o),(!this.mode_||o-this.startTime_>this.trackpadEventGap_)&&(this.mode_=Math.abs(e)<4?fc:gc);var a=i.getView();if(this.mode_===fc&&!a.getConstrainResolution()&&!this.constrainResolution_)return this.trackpadTimeoutId_?clearTimeout(this.trackpadTimeoutId_):(a.getAnimating()&&a.cancelAnimations(),a.beginInteraction()),this.trackpadTimeoutId_=setTimeout(this.endInteraction_.bind(this),this.timeout_),a.adjustZoom(-e/this.deltaPerZoom_,this.lastAnchor_),this.startTime_=o,!1;this.totalDelta_+=e;var s=Math.max(this.timeout_-(o-this.startTime_),0);return clearTimeout(this.timeoutId_),this.timeoutId_=setTimeout(this.handleWheelZoom_.bind(this,i),s),!1},e.prototype.handleWheelZoom_=function(t){var e=t.getView();e.getAnimating()&&e.cancelAnimations();var i=-(0,N.uZ)(this.totalDelta_,-this.maxDelta_*this.deltaPerZoom_,this.maxDelta_*this.deltaPerZoom_)/this.deltaPerZoom_;(e.getConstrainResolution()||this.constrainResolution_)&&(i=i?i>0?1:-1:0),El(e,i,this.lastAnchor_,this.duration_),this.mode_=void 0,this.totalDelta_=0,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_=void 0},e.prototype.setMouseAnchor=function(t){this.useAnchor_=t,t||(this.lastAnchor_=null)},e}(Tl);var yc=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();const vc=function(t){function e(e){var i=this,n=e||{},o=n;return o.stopDown||(o.stopDown=Zr.Dv),(i=t.call(this,o)||this).anchor_=null,i.lastAngle_=void 0,i.rotating_=!1,i.rotationDelta_=0,i.threshold_=void 0!==n.threshold?n.threshold:.3,i.duration_=void 0!==n.duration?n.duration:250,i}return yc(e,t),e.prototype.handleDragEvent=function(t){var e=0,i=this.targetPointers[0],n=this.targetPointers[1],o=Math.atan2(n.clientY-i.clientY,n.clientX-i.clientX);if(void 0!==this.lastAngle_){var r=o-this.lastAngle_;this.rotationDelta_+=r,!this.rotating_&&Math.abs(this.rotationDelta_)>this.threshold_&&(this.rotating_=!0),e=r}this.lastAngle_=o;var a=t.map,s=a.getView();if(s.getConstraints().rotation!==il){var l=a.getViewport().getBoundingClientRect(),c=Ll(this.targetPointers);c[0]-=l.left,c[1]-=l.top,this.anchor_=a.getCoordinateFromPixelInternal(c),this.rotating_&&(a.render(),s.adjustRotationInternal(e,this.anchor_))}},e.prototype.handleUpEvent=function(t){return!(this.targetPointers.length<2)||(t.map.getView().endInteraction(this.duration_),!1)},e.prototype.handleDownEvent=function(t){if(this.targetPointers.length>=2){var e=t.map;return this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.handlingDownUpSequence||e.getView().beginInteraction(),!0}return!1},e}(Pl);var mc=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),xc=function(t){function e(e){var i=this,n=e||{},o=n;return o.stopDown||(o.stopDown=Zr.Dv),(i=t.call(this,o)||this).anchor_=null,i.duration_=void 0!==n.duration?n.duration:400,i.lastDistance_=void 0,i.lastScaleDelta_=1,i}return mc(e,t),e.prototype.handleDragEvent=function(t){var e=1,i=this.targetPointers[0],n=this.targetPointers[1],o=i.clientX-n.clientX,r=i.clientY-n.clientY,a=Math.sqrt(o*o+r*r);void 0!==this.lastDistance_&&(e=this.lastDistance_/a),this.lastDistance_=a;var s=t.map,l=s.getView();1!=e&&(this.lastScaleDelta_=e);var c=s.getViewport().getBoundingClientRect(),u=Ll(this.targetPointers);u[0]-=c.left,u[1]-=c.top,this.anchor_=s.getCoordinateFromPixelInternal(u),s.render(),l.adjustResolutionInternal(e,this.anchor_)},e.prototype.handleUpEvent=function(t){if(this.targetPointers.length<2){var e=t.map.getView(),i=this.lastScaleDelta_>1?1:-1;return e.endInteraction(this.duration_,i),!1}return!0},e.prototype.handleDownEvent=function(t){if(this.targetPointers.length>=2){var e=t.map;return this.anchor_=null,this.lastDistance_=void 0,this.lastScaleDelta_=1,this.handlingDownUpSequence||e.getView().beginInteraction(),!0}return!1},e}(Pl);const bc=xc;function wc(t){var e=t||{},i=new Pr,n=new pc(-.005,.05,100);return(void 0===e.altShiftDragRotate||e.altShiftDragRotate)&&i.push(new Yl),(void 0===e.doubleClickZoom||e.doubleClickZoom)&&i.push(new Ol({delta:e.zoomDelta,duration:e.zoomDuration})),(void 0===e.dragPan||e.dragPan)&&i.push(new Ul({onFocusOnly:e.onFocusOnly,kinetic:n})),(void 0===e.pinchRotate||e.pinchRotate)&&i.push(new vc),(void 0===e.pinchZoom||e.pinchZoom)&&i.push(new bc({duration:e.zoomDuration})),(void 0===e.keyboard||e.keyboard)&&(i.push(new cc),i.push(new hc({delta:e.zoomDelta,duration:e.zoomDuration}))),(void 0===e.mouseWheelZoom||e.mouseWheelZoom)&&i.push(new _c({onFocusOnly:e.onFocusOnly,duration:e.zoomDuration})),(void 0===e.shiftDragZoom||e.shiftDragZoom)&&i.push(new nc({duration:e.zoomDuration})),i}var Cc=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();const Sc=function(t){function e(e){return(e=(0,X.f0)({},e)).controls||(e.controls=function(t){var e=t||{},i=new Pr;return(void 0===e.zoom||e.zoom)&&i.push(new wl(e.zoomOptions)),(void 0===e.rotate||e.rotate)&&i.push(new xl(e.rotateOptions)),(void 0===e.attribution||e.attribution)&&i.push(new vl(e.attributionOptions)),i}()),e.interactions||(e.interactions=wc({onFocusOnly:!0})),t.call(this,e)||this}return Cc(e,t),e.prototype.createRenderer=function(){return new Cs(this)},e}(fl);var Ec=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Tc="units",Rc="degrees",Oc="imperial",Ic="nautical",Lc="metric",Pc="us",Fc=[1,2,5],Ac=25.4/.28,jc=function(t){function e(e){var i=this,n=e||{},o=void 0!==n.className?n.className:n.bar?"ol-scale-bar":"ol-scale-line";return(i=t.call(this,{element:document.createElement("div"),render:n.render,target:n.target})||this).on,i.once,i.un,i.innerElement_=document.createElement("div"),i.innerElement_.className=o+"-inner",i.element.className=o+" "+ze,i.element.appendChild(i.innerElement_),i.viewState_=null,i.minWidth_=void 0!==n.minWidth?n.minWidth:64,i.renderedVisible_=!1,i.renderedWidth_=void 0,i.renderedHTML_="",i.addChangeListener(Tc,i.handleUnitsChanged_),i.setUnits(n.units||Lc),i.scaleBar_=n.bar||!1,i.scaleBarSteps_=n.steps||4,i.scaleBarText_=n.text||!1,i.dpi_=n.dpi||void 0,i}return Ec(e,t),e.prototype.getUnits=function(){return this.get(Tc)},e.prototype.handleUnitsChanged_=function(){this.updateElement_()},e.prototype.setUnits=function(t){this.set(Tc,t)},e.prototype.setDpi=function(t){this.dpi_=t},e.prototype.updateElement_=function(){var t=this.viewState_;if(t){var e=t.center,i=t.projection,n=this.getUnits(),o=n==Rc?Ot.ZP.DEGREES:Ot.ZP.METERS,r=(0,z._Q)(i,t.resolution,e,o),a=this.minWidth_*(this.dpi_||Ac)/Ac,s=a*r,l="";if(n==Rc){var c=z.Wm[Ot.ZP.DEGREES];(s*=c)<c/60?(l="″",r*=3600):s<c?(l="′",r*=60):l="°"}else n==Oc?s<.9144?(l="in",r/=.0254):s<1609.344?(l="ft",r/=.3048):(l="mi",r/=1609.344):n==Ic?(r/=1852,l="nm"):n==Lc?s<.001?(l="μm",r*=1e6):s<1?(l="mm",r*=1e3):s<1e3?l="m":(l="km",r/=1e3):n==Pc?s<.9144?(l="in",r*=39.37):s<1609.344?(l="ft",r/=.30480061):(l="mi",r/=1609.3472):(0,Q.h)(!1,33);for(var u,h,p,d,f=3*Math.floor(Math.log(a*r)/Math.log(10));;){p=Math.floor(f/3);var g=Math.pow(10,p);if(u=Fc[(f%3+3)%3]*g,h=Math.round(u/r),isNaN(h))return this.element.style.display="none",void(this.renderedVisible_=!1);if(h>=a)break;++f}d=this.scaleBar_?this.createScaleBar(h,u,l):u.toFixed(p<0?-p:0)+" "+l,this.renderedHTML_!=d&&(this.innerElement_.innerHTML=d,this.renderedHTML_=d),this.renderedWidth_!=h&&(this.innerElement_.style.width=h+"px",this.renderedWidth_=h),this.renderedVisible_||(this.element.style.display="",this.renderedVisible_=!0)}else this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1)},e.prototype.createScaleBar=function(t,e,i){for(var n="1 : "+Math.round(this.getScaleForResolution()).toLocaleString(),o=[],r=t/this.scaleBarSteps_,a="#ffffff",s=0;s<this.scaleBarSteps_;s++)0===s&&o.push(this.createMarker("absolute",s)),o.push('<div><div class="ol-scale-singlebar" style="width: '+r+"px;background-color: "+a+';"></div>'+this.createMarker("relative",s)+(s%2==0||2===this.scaleBarSteps_?this.createStepText(s,t,!1,e,i):"")+"</div>"),s===this.scaleBarSteps_-1&&o.push(this.createStepText(s+1,t,!0,e,i)),a="#ffffff"===a?"#000000":"#ffffff";return'<div style="display: flex;">'+(this.scaleBarText_?'<div class="ol-scale-text" style="width: '+t+'px;">'+n+"</div>":"")+o.join("")+"</div>"},e.prototype.createMarker=function(t,e){return'<div class="ol-scale-step-marker" style="position: '+t+";top: "+("absolute"===t?3:-10)+'px;"></div>'},e.prototype.createStepText=function(t,e,i,n,o){var r=(0===t?0:Math.round(n/this.scaleBarSteps_*t*100)/100)+(0===t?"":" "+o);return'<div class="ol-scale-step-text" style="margin-left: '+(0===t?-3:e/this.scaleBarSteps_*-1)+"px;text-align: "+(0===t?"left":"center")+"; min-width: "+(0===t?0:e/this.scaleBarSteps_*2)+"px;left: "+(i?e+"px":"unset")+';">'+r+"</div>"},e.prototype.getScaleForResolution=function(){var t=(0,z._Q)(this.viewState_.projection,this.viewState_.resolution,this.viewState_.center,Ot.ZP.METERS),e=this.dpi_||Ac;return parseFloat(t.toString())*(1e3/25.4)*e},e.prototype.render=function(t){var e=t.frameState;this.viewState_=e?e.viewState:null,this.updateElement_()},e}(_l);const Mc=jc;class kc extends n.PureComponent{constructor(t){super(t),function(t,e,i){e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i}(this,"style",Dc(Ai.config.theme))}render(){const{topRight:t,bottomLeft:e}=this.props;return(0,fi.jsxs)("div",{className:this.style.overlay,children:[Boolean(null==t?void 0:t.length)&&(0,fi.jsx)("div",{className:this.style.TR,children:t}),Boolean(null==e?void 0:e.length)&&(0,fi.jsx)("div",{className:this.style.BL,children:e})]})}}const Dc=(0,yi.stylesFactory)((t=>({overlay:vi.css`
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 500;
    pointer-events: none;
  `,TR:vi.css`
    position: absolute;
    top: 8px;
    right: 8px;
    pointer-events: auto;
  `,BL:vi.css`
    position: absolute;
    bottom: 8px;
    left: 8px;
    pointer-events: auto;
  `})));var zc,Nc;function Bc(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}class Gc extends n.PureComponent{constructor(t){super(t),Bc(this,"style",Zc(ti.vc.theme)),Bc(this,"updateViewState",(()=>{const t=this.props.map.getView();this.setState({zoom:t.getZoom(),center:(0,z.vs)(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:t,center:e}=this.state;return(0,fi.jsx)("div",{className:this.style.infoWrap,children:(0,fi.jsx)("table",{children:(0,fi.jsxs)("tbody",{children:[(0,fi.jsxs)("tr",{children:[zc||(zc=(0,fi.jsx)("th",{children:"Zoom:"})),(0,fi.jsx)("td",{children:null==t?void 0:t.toFixed(1)})]}),(0,fi.jsxs)("tr",{children:[Nc||(Nc=(0,fi.jsx)("th",{children:"Center: "})),(0,fi.jsxs)("td",{children:[e[0].toFixed(5),", ",e[1].toFixed(5)]})]})]})})})}}const Zc=(0,yi.stylesFactory)((t=>({infoWrap:vi.css`
    color: ${t.colors.text};
    background: ${zn()(t.colors.panelBg).setAlpha(.7).toString()};
    border-radius: 2px;
    padding: 8px;
  `})));var Wc=i("./.yarn/__virtual__/@emotion-react-virtual-a8cfa8ca23/3/opt/drone/yarncache/@emotion-react-npm-11.7.1-29be6cd15f-3392aa71f9.zip/node_modules/@emotion/react/dist/emotion-react.browser.esm.js");i("../../opt/drone/yarncache/ol-npm-6.12.0-aa56e5c786-a0eb5766bd.zip/node_modules/ol/ol.css");var Uc=i("../../opt/drone/yarncache/rxjs-npm-7.5.1-ce59cbb6a3-78e3eecb16.zip/node_modules/rxjs/dist/esm5/internal/Subscription.js"),Xc=i("./public/app/types/events.ts"),Yc=i("./.yarn/__virtual__/@react-aria-dialog-virtual-7978b78bbe/3/opt/drone/yarncache/@react-aria-dialog-npm-3.1.4-2a0ffc453b-968328a9b2.zip/node_modules/@react-aria/dialog/dist/module.js"),Vc=i("./.yarn/__virtual__/@react-aria-overlays-virtual-66213eeb57/3/opt/drone/yarncache/@react-aria-overlays-npm-3.7.3-408f244e82-3fffe82df9.zip/node_modules/@react-aria/overlays/dist/module.js");const Kc=t=>{let{layers:e,setActiveTabIndex:i,activeTabIndex:n}=t;return(0,fi.jsx)(yi.TabsBar,{children:e&&e.map(((t,e)=>(0,fi.jsx)(yi.Tab,{label:t.layer.getName(),active:e===n,counter:t.features.length>1?t.features.length:null,onChangeTab:()=>{i(e)}},e)))})};var Hc=i("./public/app/plugins/panel/geomap/components/DataHoverView.tsx");const qc=["geometry"];const $c=t=>{let e,{feature:i}=t,n=0;if(!i)return null;if(e=i.get("frame"),e)n=i.get("rowIndex");else{const t=function(t,e){if(null==t)return{};var i,n,o={},r=Object.keys(t);for(n=0;n<r.length;n++)i=r[n],e.indexOf(i)>=0||(o[i]=t[i]);return o}(i.getProperties(),qc);e=new o.ArrayDataFrame([t])}return(0,fi.jsx)(Hc.H,{data:e,rowIndex:n})},Jc=t=>{let{layers:e,activeTabIndex:i}=t;const o=(0,yi.useStyles2)(tu),[r,a]=(0,n.useState)(new Map);return(0,fi.jsx)(yi.TabContent,{children:e.map(((t,e)=>e===i&&(0,fi.jsx)("div",{children:(0,fi.jsx)("div",{children:t.features.map(((e,i)=>{var n;const s=null!==(n=e.getId())&&void 0!==n?n:i;return t.features.length>1?(0,fi.jsx)(yi.Collapse,{collapsible:!0,label:Qc(e,i),isOpen:r.get(s),onToggle:()=>{((t,e)=>{a(new Map(r.set(t,e)))})(s,!r.get(s))},className:o.collapsibleRow,children:(0,fi.jsx)($c,{feature:e})},s):(0,fi.jsx)($c,{feature:e},s)}))})},t.layer.getName())))})},Qc=(t,e)=>{const i=["Name","name","Title","ID","id"];let n=t.getProperties(),r="";const a=t.get("frame");if(a){const e=t.get("rowIndex");for(const t of a.fields)if(t.type===o.FieldType.string){const i=(0,o.getFieldDisplayName)(t,a);r||(r=i),n[i]=t.values.get(e)}}for(let t of i){const e=n[t];if(e)return e}if(r)return`${r}: ${n[r]}`;for(let t of Object.keys(n)){const e=n[t];if((0,Li.isString)(e))return`${t}: ${e}`}return`Match: ${e+1}`},tu=t=>({collapsibleRow:vi.css`
    margin-bottom: 0px;
  `});var eu=i("./public/app/core/components/CloseButton/CloseButton.tsx");const iu=t=>{let{layers:e,onClose:i,isOpen:o}=t;const[r,a]=(0,n.useState)(0);return e?(0,fi.jsxs)(fi.Fragment,{children:[o&&(0,fi.jsx)(eu.P,{style:{zIndex:1},onClick:i}),(0,fi.jsx)(Kc,{layers:e,setActiveTabIndex:a,activeTabIndex:r}),(0,fi.jsx)(Jc,{layers:e,activeTabIndex:r})]}):null},nu=t=>{let{ttip:e,onClose:i,isOpen:o}=t;const r=(0,n.createRef)(),{overlayProps:a}=(0,Vc.Ir)({onClose:i,isDismissable:!0,isOpen:o},r),{dialogProps:s}=(0,Yc.R)({},r);return(0,fi.jsx)(fi.Fragment,{children:e&&e.layers&&(0,fi.jsx)(yi.VizTooltipContainer,{position:{x:e.pageX,y:e.pageY},offset:{x:10,y:10},allowPointerEvents:!0,children:(0,fi.jsx)("section",Object.assign({ref:r},a,s,{children:(0,fi.jsx)(iu,{layers:e.layers,isOpen:o,onClose:i})}))})})};function ou(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}let ru;class au extends n.Component{constructor(t){var e;super(t),ou(this,"panelContext",{}),ou(this,"subs",new Uc.w0),ou(this,"globalCSS",(e=Ai.config.theme2,Wc.iv`
    .ol-scale-line {
      background: ${e.colors.border.weak}; // rgba(0,60,136,0.3);
    }
    .ol-scale-line-inner {
      border: 1px solid ${e.colors.text.primary}; // #eee;
      border-top: 0px;
      color: ${e.colors.text.primary}; //  #eee;
    }
    .ol-control {
      background-color: ${e.colors.background.secondary}; //rgba(255,255,255,0.4);
    }
    .ol-control:hover {
      background-color: ${e.colors.action.hover}; // rgba(255,255,255,0.6);
    }
    .ol-control button {
      color: ${e.colors.secondary.text}; // white;
      background-color: ${e.colors.secondary.main}; // rgba(0,60,136,0.5);
    }
    .ol-control button:hover {
      background-color: ${e.colors.secondary.shade}; // rgba(0,60,136,0.5);
    }
    .ol-control button:focus {
      background-color: ${e.colors.secondary.main}; // rgba(0,60,136,0.5);
    }
    .ol-attribution ul {
      color: ${e.colors.text.primary}; //  #000;
      text-shadow: none;
    }
    .ol-attribution:not(.ol-collapsed) {
      background-color: ${e.colors.background.secondary}; // rgba(255,255,255,0.8);
    }
  `)),ou(this,"mouseWheelZoom",void 0),ou(this,"style",su(Ai.config.theme)),ou(this,"hoverPayload",{point:{},pageX:-1,pageY:-1}),ou(this,"hoverEvent",new o.DataHoverEvent(this.hoverPayload)),ou(this,"map",void 0),ou(this,"mapDiv",void 0),ou(this,"layers",[]),ou(this,"byName",new Map),ou(this,"getNextLayerName",(()=>{let t=this.layers.length;for(;t<100;){const e="Layer "+t++;if(!this.byName.has(e))return e}return`Layer ${Date.now()}`})),ou(this,"actions",{selectLayer:t=>{const e=this.layers.findIndex((e=>e.options.name===t));this.panelContext.onInstanceStateChange&&this.panelContext.onInstanceStateChange({map:this.map,layers:this.layers,selected:e,actions:this.actions})},canRename:t=>!this.byName.has(t),deleteLayer:t=>{const e=[];for(const n of this.layers){var i;if(n.options.name===t)null===(i=this.map)||void 0===i||i.removeLayer(n.layer);else e.push(n)}this.layers=e,this.doOptionsUpdate(0)},addlayer:t=>{const e=vs.getIfExists(t);e&&this.initLayer(this.map,{type:e.id,name:this.getNextLayerName(),config:(0,Li.cloneDeep)(e.defaultOptions),location:e.showLocation?{mode:o.FrameGeometrySourceMode.Auto}:void 0,tooltip:!0},!1).then((t=>{var e;this.layers=this.layers.slice(0),this.layers.push(t),null===(e=this.map)||void 0===e||e.addLayer(t.layer),this.doOptionsUpdate(this.layers.length-1)}))},reorder:(t,e)=>{var i;const n=Array.from(this.layers),[o]=n.splice(t,1);n.splice(e,0,o),this.layers=n,this.doOptionsUpdate(e);const r=null===(i=this.map)||void 0===i?void 0:i.getLayers();r.clear(),this.layers.forEach((t=>r.push(t.layer)))}}),ou(this,"initMapRef",(async t=>{if(this.mapDiv=t,this.map&&this.map.dispose(),!t)return void(this.map=void 0);const{options:e}=this.props,i=this.map=new Sc({view:this.initMapView(e.view),pixelRatio:1,layers:[],controls:[],target:t,interactions:wc({mouseWheelZoom:!1})});this.byName.clear();const n=[];try{var r,a;n.push(await this.initLayer(i,null!==(r=e.basemap)&&void 0!==r?r:_s,!0));const t=null!==(a=e.layers)&&void 0!==a?a:[ta];for(const e of t)n.push(await this.initLayer(i,e,!1))}catch(t){console.error("error loading layers",t)}for(const t of n)i.addLayer(t.layer);this.layers=n,this.map=i,this.mouseWheelZoom=new _c,this.map.addInteraction(this.mouseWheelZoom),this.initControls(e.controls),this.forceUpdate(),this.map.on("singleclick",this.pointerClickListener),this.map.on("pointermove",this.pointerMoveListener),this.map.getViewport().addEventListener("mouseout",(t=>{this.props.eventBus.publish(new o.DataHoverClearEvent)})),this.panelContext.onInstanceStateChange&&this.panelContext.onInstanceStateChange({map:this.map,layers:n,selected:n.length-1,actions:this.actions}),this.setState({legends:this.getLegends()})})),ou(this,"clearTooltip",(()=>{this.state.ttip&&!this.state.ttipOpen&&this.tooltipPopupClosed()})),ou(this,"tooltipPopupClosed",(()=>{this.setState({ttipOpen:!1,ttip:void 0})})),ou(this,"pointerClickListener",(t=>{this.pointerMoveListener(t)&&(t.preventDefault(),t.stopPropagation(),this.setState({ttipOpen:!0}))})),ou(this,"pointerMoveListener",(t=>{if(!this.map||this.state.ttipOpen)return!1;const e=t.originalEvent,i=this.map.getEventPixel(e),n=(0,z.bU)(this.map.getCoordinateFromPixel(i)),{hoverPayload:o}=this;o.pageX=e.pageX,o.pageY=e.pageY,o.point={lat:n[1],lon:n[0]},o.data=void 0,o.columnIndex=void 0,o.rowIndex=void 0,o.layers=void 0;const r=[],a=new Map;let s={};return this.map.forEachFeatureAtPixel(i,((t,e,i)=>{if(!o.data){const e=t.getProperties(),i=e.frame;i&&(o.data=s.data=i,o.rowIndex=s.rowIndex=e.rowIndex)}const n=e.__state;if(n){let e=a.get(n);e||(e={layer:n,features:[]},a.set(n,e),r.push(e)),e.features.push(t)}}),{layerFilter:t=>!1!==t.__state.options.tooltip}),this.hoverPayload.layers=r.length?r:void 0,this.props.eventBus.publish(this.hoverEvent),this.setState({ttip:Object.assign({},o)}),!!r.length})),ou(this,"updateLayer",(async(t,e)=>{var i;if(!this.map)return!1;const n=this.byName.get(t);if(!n)return!1;let o=-1;const r=null===(i=this.map)||void 0===i?void 0:i.getLayers();for(let t=0;t<(null==r?void 0:r.getLength());t++)if(r.item(t)===n.layer){o=t;break}if(e.name!==t){if(e.name){if(this.byName.has(e.name))return!1}else e.name=t;console.log("Layer name changed",t,">>>",e.name),this.byName.delete(t),t=e.name,this.byName.set(t,n)}n.options.type,e.type;const a=this.layers.slice(0);try{const t=await this.initLayer(this.map,e,n.isBasemap);a[o]=t,r.setAt(o,t.layer),t.handler.update&&t.handler.update(this.props.data)}catch(t){return console.warn("ERROR",t),!1}return this.setState({legends:[]}),this.layers=a,this.doOptionsUpdate(o),!0})),this.state={ttipOpen:!1,legends:[]},this.subs.add(this.props.eventBus.subscribe(Xc.Yr,(t=>{this.mapDiv&&this.props.id===t.payload&&this.initMapRef(this.mapDiv)})))}componentDidMount(){this.panelContext=this.context}shouldComponentUpdate(t){return!this.map||(this.props.height===t.height&&this.props.width===t.width||this.map.updateSize(),this.props.data!==t.data&&this.dataChanged(t.data),this.props.options!==t.options&&this.optionsChanged(t.options),!0)}componentDidUpdate(t){!this.map||this.props.height===t.height&&this.props.width===t.width||this.map.updateSize()}doOptionsUpdate(t){const{options:e,onOptionsChange:i}=this.props,n=this.layers;i(Object.assign({},e,{basemap:n[0].options,layers:n.slice(1).map((t=>t.options))})),this.panelContext.onInstanceStateChange&&this.panelContext.onInstanceStateChange({map:this.map,layers:n,selected:t,actions:this.actions}),this.setState({legends:this.getLegends()})}optionsChanged(t){const e=this.props.options;var i;(console.log("options changed!",t),t.view!==e.view&&(console.log("View changed"),this.map.setView(this.initMapView(t.view))),t.controls!==e.controls)&&(console.log("Controls changed"),this.initControls(null!==(i=t.controls)&&void 0!==i?i:{showZoom:!0,showAttribution:!0}))}dataChanged(t){for(const e of this.layers)e.handler.update&&e.handler.update(t)}async initLayer(t,e,i){var n,o;!i||null!==(n=e)&&void 0!==n&&n.type&&!Ai.config.geomapDisableCustomBaseLayer||(e=_s),null!==(o=e)&&void 0!==o&&o.type||(e={type:Qr,name:this.getNextLayerName(),config:{}});const r=vs.getIfExists(e.type);if(!r)return Promise.reject("unknown layer: "+e.type);const a=await r.create(t,e,Ai.config.theme2),s=a.init();a.update&&a.update(this.props.data),e.name||(e.name=this.getNextLayerName());const l=e.name,c={isBasemap:i,options:e,layer:s,handler:a,getName:()=>l,onChange:t=>{this.updateLayer(l,t)}};return this.byName.set(l,c),c.layer.__state=c,c}initMapView(t){let e=new cl({center:[0,0],zoom:1,showFullExtent:!0});t.shared&&(ru?e=ru:ru=e);const i=oa.getIfExists(t.id);if(i){let s;var n,o,r,a;if(null==i.lat)if(i.id===na.Coordinates)s=[null!==(n=t.lon)&&void 0!==n?n:0,null!==(o=t.lat)&&void 0!==o?o:0];else console.log("TODO, view requires special handling",i);else s=[null!==(r=i.lon)&&void 0!==r?r:0,null!==(a=i.lat)&&void 0!==a?a:0];s&&e.setCenter((0,z.mi)(s))}return t.maxZoom&&e.setMaxZoom(t.maxZoom),t.minZoom&&e.setMaxZoom(t.minZoom),t.zoom&&e.setZoom(t.zoom),e}initControls(t){if(!this.map)return;this.map.getControls().clear(),t.showZoom&&this.map.addControl(new wl),t.showScale&&this.map.addControl(new Mc({units:t.scaleUnits,minWidth:100})),this.mouseWheelZoom.setActive(Boolean(t.mouseWheelZoom)),t.showAttribution&&this.map.addControl(new vl({collapsed:!0,collapsible:!0}));let e=[];t.showDebug&&(e=[(0,fi.jsx)(Gc,{map:this.map},"debug")]),this.setState({topRight:e})}getLegends(){const t=[];for(const e of this.layers)e.handler.legend&&t.push((0,fi.jsx)("div",{children:e.handler.legend},e.options.name));return t}render(){const{ttip:t,ttipOpen:e,topRight:i,legends:n}=this.state;return(0,fi.jsxs)(fi.Fragment,{children:[(0,fi.jsx)(Wc.xB,{styles:this.globalCSS}),(0,fi.jsxs)("div",{className:this.style.wrap,onMouseLeave:this.clearTooltip,children:[(0,fi.jsx)("div",{className:this.style.map,ref:this.initMapRef}),(0,fi.jsx)(kc,{bottomLeft:n,topRight:i})]}),(0,fi.jsx)(nu,{ttip:t,isOpen:e,onClose:this.tooltipPopupClosed})]})}}ou(au,"contextType",yi.PanelContextRoot);const su=(0,yi.stylesFactory)((t=>({wrap:vi.css`
    position: relative;
    width: 100%;
    height: 100%;
  `,map:vi.css`
    position: absolute;
    z-index: 0;
    width: 100%;
    height: 100%;
  `})));var lu;const cu=t=>{var e;let{value:i,onChange:o,context:r}=t;const a=(0,n.useMemo)((()=>{const t=[];return null!=i&&i.id?t.push(i.id):t.push(oa.list()[0].id),oa.selectOptions(t)}),[null==i?void 0:i.id]),s=(0,n.useCallback)((()=>{var t;const e=null===(t=r.instanceState)||void 0===t?void 0:t.map;if(e){const t=e.getView(),n=t.getCenter();if(n){const e=(0,z.bU)(n,t.getProjection());o(Object.assign({},i,{id:na.Coordinates,lon:+e[0].toFixed(6),lat:+e[1].toFixed(6),zoom:+t.getZoom().toFixed(2)}))}}}),[i,o,r.instanceState]),l=(0,n.useCallback)((t=>{const e=oa.getIfExists(t.value);var n,r,a;e&&o(Object.assign({},i,{id:e.id,lat:null!==(n=e.lat)&&void 0!==n?n:null==i?void 0:i.lat,lon:null!==(r=e.lon)&&void 0!==r?r:null==i?void 0:i.lon,zoom:null!==(a=e.zoom)&&void 0!==a?a:null==i?void 0:i.zoom}))}),[i,o]);return(0,fi.jsxs)(fi.Fragment,{children:[(0,fi.jsx)(yi.InlineFieldRow,{children:(0,fi.jsx)(yi.InlineField,{label:"View",labelWidth:10,grow:!0,children:(0,fi.jsx)(yi.Select,{menuShouldPortal:!0,options:a.options,value:a.current,onChange:l})})}),(null==i?void 0:i.id)===na.Coordinates&&(0,fi.jsxs)(fi.Fragment,{children:[(0,fi.jsx)(yi.InlineFieldRow,{children:(0,fi.jsx)(yi.InlineField,{label:"Latitude",labelWidth:10,grow:!0,children:(0,fi.jsx)(ca.Y,{value:i.lat,min:-90,max:90,step:.001,onChange:t=>{o(Object.assign({},i,{lat:t}))}})})}),(0,fi.jsx)(yi.InlineFieldRow,{children:(0,fi.jsx)(yi.InlineField,{label:"Longitude",labelWidth:10,grow:!0,children:(0,fi.jsx)(ca.Y,{value:i.lon,min:-180,max:180,step:.001,onChange:t=>{o(Object.assign({},i,{lon:t}))}})})})]}),(0,fi.jsx)(yi.InlineFieldRow,{children:(0,fi.jsx)(yi.InlineField,{label:"Zoom",labelWidth:10,grow:!0,children:(0,fi.jsx)(ca.Y,{value:null!==(e=null==i?void 0:i.zoom)&&void 0!==e?e:1,min:1,max:18,step:.01,onChange:t=>{o(Object.assign({},i,{zoom:t}))}})})}),(0,fi.jsx)(yi.VerticalGroup,{children:(0,fi.jsx)(yi.Button,{variant:"secondary",size:"sm",fullWidth:!0,onClick:s,children:lu||(lu=(0,fi.jsx)("span",{children:"Use current map settings"}))})})]})};function uu(t){const e=+t;return isNaN(e)?void 0:e}var hu=i("./public/app/features/dashboard/components/PanelEditor/utils.ts"),pu=i("./public/app/features/geo/editor/locationEditor.ts");function du(t){return{category:t.category,path:"--",defaultValue:t.basemaps?_s:ta,values:e=>({getContext:e=>Object.assign({},e,{options:t.state.options,instanceState:t.state}),getValue:e=>(0,Li.get)(t.state.options,e),onChange:(e,i)=>{const{state:n}=t,{options:r}=n;if("type"===e&&i){const t=vs.getIfExists(i);if(t){console.log("Change layer type:",i,n);const e=Object.assign({},r,{type:t.id,config:Object.assign({},t.defaultOptions)});var a;if(t.showLocation)null!==(a=e.location)&&void 0!==a&&a.mode?delete e.location:e.location={mode:o.FrameGeometrySourceMode.Auto};return void n.onChange(e)}}n.onChange((0,hu.hs)(r,e,i))}}),build:(e,i)=>{if(!t.state)return void console.log("MISSING LAYER!!!",t);const{handler:n,options:o}=t.state,r=vs.getIfExists(null==o?void 0:o.type),a=vs.selectOptions(null!=o&&o.type?[o.type]:[_s.type],t.basemaps?fu:gu);e.addSelect({path:"type",name:"Layer type",settings:{options:a.options}}),r&&o.type!==_s.type&&(r.showLocation&&(0,pu.C)("Location","location.",e,o.location),n.registerOptionsUI&&n.registerOptionsUI(e),r.showOpacity,(0,Li.isEqual)(t.category,["Base layer"])||e.addBooleanSwitch({path:"tooltip",name:"Display tooltip",description:"Show the tooltip for layer",defaultValue:!0}))}}}function fu(t){return!!t.isBaseMap&&(t.state!==o.PluginState.alpha||ti.Oh)}function gu(t){return!t.isBaseMap&&(t.state!==o.PluginState.alpha||ti.Oh)}var _u,yu,vu=i("./public/app/core/components/Layers/AddLayerButton.tsx"),mu=i("./public/app/core/components/Layers/LayerDragDropList.tsx");const xu=t=>{var e,i;const{layers:n,selected:o,actions:r}=null!==(e=t.context.instanceState)&&void 0!==e?e:{};if(!n||!r)return _u||(_u=(0,fi.jsx)("div",{children:"No layers?"}));const a=o?[null===(i=n[o])||void 0===i?void 0:i.getName()]:[];return(0,fi.jsxs)(fi.Fragment,{children:[(0,fi.jsx)(yi.Container,{children:(0,fi.jsx)(vu.f,{onChange:t=>r.addlayer(t.value),options:vs.selectOptions(void 0,gu).options,label:"Add layer"})}),yu||(yu=(0,fi.jsx)("br",{})),(0,fi.jsx)(mu.E,{layers:n,getLayerInfo:t=>t.options.type,onDragEnd:e=>{var i;if(!e.destination)return;const{layers:n,actions:o}=null!==(i=t.context.instanceState)&&void 0!==i?i:{};if(!n||!o)return;const r=n.length-1,a=-1*(e.source.index-r),s=-1*(e.destination.index-r);o.reorder(a,s)},onSelect:t=>{r.selectLayer(t.options.name)},onDelete:t=>{r.deleteLayer(t.options.name)},selection:a,excludeBaseLayer:!0,onNameChange:(t,e)=>{t.onChange(Object.assign({},t.options,{name:e}))},verifyLayerNameUniqueness:r.canRename})]})};var bu;const wu=new o.PanelPlugin(au).setNoPadding().setPanelChangeHandler(((t,e,i,n)=>{if("grafana-worldmap-panel"===e&&i.angular){const{fieldConfig:e,options:r}=function(t){const e={defaults:{},overrides:[]},i={view:{id:na.Zero},controls:{showZoom:!0,mouseWheelZoom:Boolean(t.mouseWheelZoom)},basemap:{type:"default",name:"Basemap"},layers:[]};let n=uu(t.decimals);n&&(e.defaults.decimals=n);if(t.thresholds&&t.colors){const i=t.thresholds.split(",").map((t=>Number(t.trim()))),n=[];for(const e of t.colors){const t=n.length-1;t>=0?n.push({value:i[t],color:e}):n.push({value:-1/0,color:e})}e.defaults.thresholds={mode:o.ThresholdsMode.Absolute,steps:n}}n=uu(t.initialZoom),n&&(i.view.zoom=n);const r={"(0°, 0°)":na.Zero,"North America":"north-america",Europe:"europe","West Asia":"west-asia","SE Asia":"se-asia","Last GeoHash":na.Coordinates};return i.view.id=r[t.mapCenter],i.view.lat=uu(t.mapCenterLatitude),i.view.lon=uu(t.mapCenterLongitude),{fieldConfig:e,options:i}}(Object.assign({},i.angular,{fieldConfig:n}));return t.fieldConfig=e,r}return{}})).setMigrationHandler((t=>{var e;const i=null!==(e=null==t?void 0:t.pluginVersion)&&void 0!==e?e:"";if(i.startsWith("8.1")||i.startsWith("8.2")){var n;const e=null===(n=t.options)||void 0===n?void 0:n.layers;if(1===(null==e?void 0:e.length)){const e=t.options.layers[0];if("markers"===(null==e?void 0:e.type)&&e.config){const i=e.config,n={style:(0,Li.cloneDeep)(Oi),showLegend:Boolean(i.showLegend)};i.size&&(n.style.size=i.size),i.color&&(n.style.color=i.color),i.fillOpacity&&(n.style.opacity=i.fillOpacity);const o=function(t){var e;const i=Jn.getIfExists(t);if(null!=i&&null!==(e=i.aliasIds)&&void 0!==e&&e.length)return i.aliasIds[0]}(i.shape);return o&&(n.style.symbol={fixed:o,mode:di.Q8.Fixed}),Object.assign({},t.options,{layers:[Object.assign({},e,{config:n})]})}}}return t.options})).useFieldConfig({useCustomConfig:t=>{yi.commonOptionsBuilder.addHideFrom(t)}}).setPanelOptions(((t,e)=>{let i=["Map view"];t.addCustomEditor({category:i,id:"view",path:"view",name:"Initial view",description:"This location will show when the panel first loads.",editor:cu,defaultValue:ra}),t.addBooleanSwitch({category:i,path:"view.shared",description:"Use the same view across multiple panels.  Note: this may require a dashboard reload.",name:"Share view",defaultValue:ra.shared});const n=e.instanceState;if(null!=n&&n.layers){t.addCustomEditor({category:["Data layer"],id:"layers",path:"",name:"",editor:xu});const e=n.layers[n.selected];n.selected&&e&&t.addNestedOptions(du({state:e,category:["Data layer"],basemaps:!1}));const i=n.layers[0];Ai.config.geomapDisableCustomBaseLayer?t.addCustomEditor({category:["Base layer"],id:"layers",path:"",name:"",editor:()=>bu||(bu=(0,fi.jsx)("div",{children:"The base layer is configured by the server admin."}))}):i&&t.addNestedOptions(du({state:i,category:["Base layer"],basemaps:!0}))}else;i=["Map controls"],t.addBooleanSwitch({category:i,path:"controls.showZoom",description:"Show zoom control buttons in the upper left corner",name:"Show zoom control",defaultValue:!0}).addBooleanSwitch({category:i,path:"controls.mouseWheelZoom",description:"Enable zoom control via mouse wheel",name:"Mouse wheel zoom",defaultValue:!0}).addBooleanSwitch({category:i,path:"controls.showAttribution",name:"Show attribution",description:"Show the map source attribution info in the lower right",defaultValue:!0}).addBooleanSwitch({category:i,path:"controls.showScale",name:"Show scale",description:"Indicate map scale",defaultValue:!1}).addBooleanSwitch({category:i,path:"controls.showDebug",name:"Show debug",description:"Show map info",defaultValue:!1})}))},"./.yarn/__virtual__/css-loader-virtual-9151e766c9/3/opt/drone/yarncache/css-loader-npm-6.5.1-a34b2a752f-5a3bedecb4.zip/node_modules/css-loader/dist/runtime/api.js":t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var i="",n=void 0!==e[5];return e[4]&&(i+="@supports (".concat(e[4],") {")),e[2]&&(i+="@media ".concat(e[2]," {")),n&&(i+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),i+=t(e),n&&(i+="}"),e[2]&&(i+="}"),e[4]&&(i+="}"),i})).join("")},e.i=function(t,i,n,o,r){"string"==typeof t&&(t=[[null,t,void 0]]);var a={};if(n)for(var s=0;s<this.length;s++){var l=this[s][0];null!=l&&(a[l]=!0)}for(var c=0;c<t.length;c++){var u=[].concat(t[c]);n&&a[u[0]]||(void 0!==r&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=r),i&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=i):u[2]=i),o&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=o):u[4]="".concat(o)),e.push(u))}},e}},"./.yarn/__virtual__/css-loader-virtual-9151e766c9/3/opt/drone/yarncache/css-loader-npm-6.5.1-a34b2a752f-5a3bedecb4.zip/node_modules/css-loader/dist/runtime/sourceMaps.js":t=>{"use strict";t.exports=function(t){var e=t[1],i=t[3];if(!i)return e;if("function"==typeof btoa){var n=btoa(unescape(encodeURIComponent(JSON.stringify(i)))),o="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(n),r="/*# ".concat(o," */"),a=i.sources.map((function(t){return"/*# sourceURL=".concat(i.sourceRoot||"").concat(t," */")}));return[e].concat(a).concat([r]).join("\n")}return[e].join("\n")}},"./.yarn/__virtual__/react-use-virtual-00326e70ba/3/opt/drone/yarncache/react-use-npm-17.3.2-a032cbeb01-7379460f51.zip/node_modules/react-use/esm/useObservable.js":(t,e,i)=>{"use strict";i.d(e,{Z:()=>r});var n=i("../../opt/drone/yarncache/react-npm-17.0.2-99ba37d931-b254cc17ce.zip/node_modules/react/index.js"),o=i("./.yarn/__virtual__/react-use-virtual-00326e70ba/3/opt/drone/yarncache/react-use-npm-17.3.2-a032cbeb01-7379460f51.zip/node_modules/react-use/esm/useIsomorphicLayoutEffect.js");const r=function(t,e){var i=(0,n.useState)(e),r=i[0],a=i[1];return(0,o.Z)((function(){var e=t.subscribe(a);return function(){return e.unsubscribe()}}),[t]),r}},"./.yarn/__virtual__/style-loader-virtual-d3a1f2e0f4/3/opt/drone/yarncache/style-loader-npm-3.3.1-4bbb6ec77f-470feef680.zip/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js":t=>{"use strict";var e=[];function i(t){for(var i=-1,n=0;n<e.length;n++)if(e[n].identifier===t){i=n;break}return i}function n(t,n){for(var r={},a=[],s=0;s<t.length;s++){var l=t[s],c=n.base?l[0]+n.base:l[0],u=r[c]||0,h="".concat(c," ").concat(u);r[c]=u+1;var p=i(h),d={css:l[1],media:l[2],sourceMap:l[3],supports:l[4],layer:l[5]};if(-1!==p)e[p].references++,e[p].updater(d);else{var f=o(d,n);n.byIndex=s,e.splice(s,0,{identifier:h,updater:f,references:1})}a.push(h)}return a}function o(t,e){var i=e.domAPI(e);i.update(t);return function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap&&e.supports===t.supports&&e.layer===t.layer)return;i.update(t=e)}else i.remove()}}t.exports=function(t,o){var r=n(t=t||[],o=o||{});return function(t){t=t||[];for(var a=0;a<r.length;a++){var s=i(r[a]);e[s].references--}for(var l=n(t,o),c=0;c<r.length;c++){var u=i(r[c]);0===e[u].references&&(e[u].updater(),e.splice(u,1))}r=l}}},"./.yarn/__virtual__/style-loader-virtual-d3a1f2e0f4/3/opt/drone/yarncache/style-loader-npm-3.3.1-4bbb6ec77f-470feef680.zip/node_modules/style-loader/dist/runtime/insertBySelector.js":t=>{"use strict";var e={};t.exports=function(t,i){var n=function(t){if(void 0===e[t]){var i=document.querySelector(t);if(window.HTMLIFrameElement&&i instanceof window.HTMLIFrameElement)try{i=i.contentDocument.head}catch(t){i=null}e[t]=i}return e[t]}(t);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(i)}},"./.yarn/__virtual__/style-loader-virtual-d3a1f2e0f4/3/opt/drone/yarncache/style-loader-npm-3.3.1-4bbb6ec77f-470feef680.zip/node_modules/style-loader/dist/runtime/insertStyleElement.js":t=>{"use strict";t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},"./.yarn/__virtual__/style-loader-virtual-d3a1f2e0f4/3/opt/drone/yarncache/style-loader-npm-3.3.1-4bbb6ec77f-470feef680.zip/node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js":(t,e,i)=>{"use strict";t.exports=function(t){var e=i.nc;e&&t.setAttribute("nonce",e)}},"./.yarn/__virtual__/style-loader-virtual-d3a1f2e0f4/3/opt/drone/yarncache/style-loader-npm-3.3.1-4bbb6ec77f-470feef680.zip/node_modules/style-loader/dist/runtime/styleDomAPI.js":t=>{"use strict";t.exports=function(t){var e=t.insertStyleElement(t);return{update:function(i){!function(t,e,i){var n="";i.supports&&(n+="@supports (".concat(i.supports,") {")),i.media&&(n+="@media ".concat(i.media," {"));var o=void 0!==i.layer;o&&(n+="@layer".concat(i.layer.length>0?" ".concat(i.layer):""," {")),n+=i.css,o&&(n+="}"),i.media&&(n+="}"),i.supports&&(n+="}");var r=i.sourceMap;r&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(r))))," */")),e.styleTagTransform(n,t,e.options)}(e,t,i)},remove:function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(e)}}}},"./.yarn/__virtual__/style-loader-virtual-d3a1f2e0f4/3/opt/drone/yarncache/style-loader-npm-3.3.1-4bbb6ec77f-470feef680.zip/node_modules/style-loader/dist/runtime/styleTagTransform.js":t=>{"use strict";t.exports=function(t,e){if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}},"../../opt/drone/yarncache/rbush-npm-3.0.1-9fc2a71778-b7def5ba76.zip/node_modules/rbush/rbush.min.js":function(t){t.exports=function(){"use strict";function t(t,n,o,r,a){!function t(i,n,o,r,a){for(;r>o;){if(r-o>600){var s=r-o+1,l=n-o+1,c=Math.log(s),u=.5*Math.exp(2*c/3),h=.5*Math.sqrt(c*u*(s-u)/s)*(l-s/2<0?-1:1);t(i,n,Math.max(o,Math.floor(n-l*u/s+h)),Math.min(r,Math.floor(n+(s-l)*u/s+h)),a)}var p=i[n],d=o,f=r;for(e(i,o,n),a(i[r],p)>0&&e(i,o,r);d<f;){for(e(i,d,f),d++,f--;a(i[d],p)<0;)d++;for(;a(i[f],p)>0;)f--}0===a(i[o],p)?e(i,o,f):e(i,++f,r),f<=n&&(o=f+1),n<=f&&(r=f-1)}}(t,n,o||0,r||t.length-1,a||i)}function e(t,e,i){var n=t[e];t[e]=t[i],t[i]=n}function i(t,e){return t<e?-1:t>e?1:0}var n=function(t){void 0===t&&(t=9),this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function o(t,e,i){if(!i)return e.indexOf(t);for(var n=0;n<e.length;n++)if(i(t,e[n]))return n;return-1}function r(t,e){a(t,0,t.children.length,e,t)}function a(t,e,i,n,o){o||(o=f(null)),o.minX=1/0,o.minY=1/0,o.maxX=-1/0,o.maxY=-1/0;for(var r=e;r<i;r++){var a=t.children[r];s(o,t.leaf?n(a):a)}return o}function s(t,e){return t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY),t}function l(t,e){return t.minX-e.minX}function c(t,e){return t.minY-e.minY}function u(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function h(t){return t.maxX-t.minX+(t.maxY-t.minY)}function p(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function d(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function f(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function g(e,i,n,o,r){for(var a=[i,n];a.length;)if(!((n=a.pop())-(i=a.pop())<=o)){var s=i+Math.ceil((n-i)/o/2)*o;t(e,s,i,n,r),a.push(i,s,s,n)}}return n.prototype.all=function(){return this._all(this.data,[])},n.prototype.search=function(t){var e=this.data,i=[];if(!d(t,e))return i;for(var n=this.toBBox,o=[];e;){for(var r=0;r<e.children.length;r++){var a=e.children[r],s=e.leaf?n(a):a;d(t,s)&&(e.leaf?i.push(a):p(t,s)?this._all(a,i):o.push(a))}e=o.pop()}return i},n.prototype.collides=function(t){var e=this.data;if(!d(t,e))return!1;for(var i=[];e;){for(var n=0;n<e.children.length;n++){var o=e.children[n],r=e.leaf?this.toBBox(o):o;if(d(t,r)){if(e.leaf||p(t,r))return!0;i.push(o)}}e=i.pop()}return!1},n.prototype.load=function(t){if(!t||!t.length)return this;if(t.length<this._minEntries){for(var e=0;e<t.length;e++)this.insert(t[e]);return this}var i=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(this.data.height===i.height)this._splitRoot(this.data,i);else{if(this.data.height<i.height){var n=this.data;this.data=i,i=n}this._insert(i,this.data.height-i.height-1,!0)}else this.data=i;return this},n.prototype.insert=function(t){return t&&this._insert(t,this.data.height-1),this},n.prototype.clear=function(){return this.data=f([]),this},n.prototype.remove=function(t,e){if(!t)return this;for(var i,n,r,a=this.data,s=this.toBBox(t),l=[],c=[];a||l.length;){if(a||(a=l.pop(),n=l[l.length-1],i=c.pop(),r=!0),a.leaf){var u=o(t,a.children,e);if(-1!==u)return a.children.splice(u,1),l.push(a),this._condense(l),this}r||a.leaf||!p(a,s)?n?(i++,a=n.children[i],r=!1):a=null:(l.push(a),c.push(i),i=0,n=a,a=a.children[0])}return this},n.prototype.toBBox=function(t){return t},n.prototype.compareMinX=function(t,e){return t.minX-e.minX},n.prototype.compareMinY=function(t,e){return t.minY-e.minY},n.prototype.toJSON=function(){return this.data},n.prototype.fromJSON=function(t){return this.data=t,this},n.prototype._all=function(t,e){for(var i=[];t;)t.leaf?e.push.apply(e,t.children):i.push.apply(i,t.children),t=i.pop();return e},n.prototype._build=function(t,e,i,n){var o,a=i-e+1,s=this._maxEntries;if(a<=s)return r(o=f(t.slice(e,i+1)),this.toBBox),o;n||(n=Math.ceil(Math.log(a)/Math.log(s)),s=Math.ceil(a/Math.pow(s,n-1))),(o=f([])).leaf=!1,o.height=n;var l=Math.ceil(a/s),c=l*Math.ceil(Math.sqrt(s));g(t,e,i,c,this.compareMinX);for(var u=e;u<=i;u+=c){var h=Math.min(u+c-1,i);g(t,u,h,l,this.compareMinY);for(var p=u;p<=h;p+=l){var d=Math.min(p+l-1,h);o.children.push(this._build(t,p,d,n-1))}}return r(o,this.toBBox),o},n.prototype._chooseSubtree=function(t,e,i,n){for(;n.push(e),!e.leaf&&n.length-1!==i;){for(var o=1/0,r=1/0,a=void 0,s=0;s<e.children.length;s++){var l=e.children[s],c=u(l),h=(p=t,d=l,(Math.max(d.maxX,p.maxX)-Math.min(d.minX,p.minX))*(Math.max(d.maxY,p.maxY)-Math.min(d.minY,p.minY))-c);h<r?(r=h,o=c<o?c:o,a=l):h===r&&c<o&&(o=c,a=l)}e=a||e.children[0]}var p,d;return e},n.prototype._insert=function(t,e,i){var n=i?t:this.toBBox(t),o=[],r=this._chooseSubtree(n,this.data,e,o);for(r.children.push(t),s(r,n);e>=0&&o[e].children.length>this._maxEntries;)this._split(o,e),e--;this._adjustParentBBoxes(n,o,e)},n.prototype._split=function(t,e){var i=t[e],n=i.children.length,o=this._minEntries;this._chooseSplitAxis(i,o,n);var a=this._chooseSplitIndex(i,o,n),s=f(i.children.splice(a,i.children.length-a));s.height=i.height,s.leaf=i.leaf,r(i,this.toBBox),r(s,this.toBBox),e?t[e-1].children.push(s):this._splitRoot(i,s)},n.prototype._splitRoot=function(t,e){this.data=f([t,e]),this.data.height=t.height+1,this.data.leaf=!1,r(this.data,this.toBBox)},n.prototype._chooseSplitIndex=function(t,e,i){for(var n,o,r,s,l,c,h,p=1/0,d=1/0,f=e;f<=i-e;f++){var g=a(t,0,f,this.toBBox),_=a(t,f,i,this.toBBox),y=(o=g,r=_,s=void 0,l=void 0,c=void 0,h=void 0,s=Math.max(o.minX,r.minX),l=Math.max(o.minY,r.minY),c=Math.min(o.maxX,r.maxX),h=Math.min(o.maxY,r.maxY),Math.max(0,c-s)*Math.max(0,h-l)),v=u(g)+u(_);y<p?(p=y,n=f,d=v<d?v:d):y===p&&v<d&&(d=v,n=f)}return n||i-e},n.prototype._chooseSplitAxis=function(t,e,i){var n=t.leaf?this.compareMinX:l,o=t.leaf?this.compareMinY:c;this._allDistMargin(t,e,i,n)<this._allDistMargin(t,e,i,o)&&t.children.sort(n)},n.prototype._allDistMargin=function(t,e,i,n){t.children.sort(n);for(var o=this.toBBox,r=a(t,0,e,o),l=a(t,i-e,i,o),c=h(r)+h(l),u=e;u<i-e;u++){var p=t.children[u];s(r,t.leaf?o(p):p),c+=h(r)}for(var d=i-e-1;d>=e;d--){var f=t.children[d];s(l,t.leaf?o(f):f),c+=h(l)}return c},n.prototype._adjustParentBBoxes=function(t,e,i){for(var n=i;n>=0;n--)s(e[n],t)},n.prototype._condense=function(t){for(var e=t.length-1,i=void 0;e>=0;e--)0===t[e].children.length?e>0?(i=t[e-1].children).splice(i.indexOf(t[e]),1):this.clear():r(t[e],this.toBBox)},n}()}}]);
//# sourceMappingURL=4195.cd4ada1146b53ad3284f.js.map