@idmwx/idmui-gl3 3.4.7 → 3.4.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -483,7 +483,7 @@ function Yt(i, e, t, r, a, s) {
483
483
  ], 4)
484
484
  ])) : O("", !0);
485
485
  }
486
- const qt = /* @__PURE__ */ k(Ut, [["render", Yt], ["__scopeId", "data-v-fc7a24ef"]]);
486
+ const qt = /* @__PURE__ */ k(Ut, [["render", Yt], ["__scopeId", "data-v-f285f28f"]]);
487
487
  class Ue {
488
488
  constructor(e) {
489
489
  M(this, "map");
@@ -3210,7 +3210,7 @@ const fr = {
3210
3210
  }
3211
3211
  }
3212
3212
  }
3213
- }, J = (i) => (U("data-v-a7923724"), i = i(), G(), i), yr = {
3213
+ }, J = (i) => (U("data-v-fb5b12d6"), i = i(), G(), i), yr = {
3214
3214
  id: "point-meteo",
3215
3215
  class: "point-meteo"
3216
3216
  }, gr = { class: "meteo-box" }, br = { class: "header-box" }, vr = { class: "main" }, Lr = { class: "sub" }, _r = { class: "main-box" }, wr = { class: "flex-space" }, xr = /* @__PURE__ */ J(() => /* @__PURE__ */ l("label", null, "Wind", -1)), Cr = { class: "flex-space" }, Sr = /* @__PURE__ */ J(() => /* @__PURE__ */ l("label", null, "Wind.Wave", -1)), Pr = { class: "flex-space" }, Tr = /* @__PURE__ */ J(() => /* @__PURE__ */ l("label", null, "Swell", -1)), Er = { class: "flex-space" }, kr = /* @__PURE__ */ J(() => /* @__PURE__ */ l("label", null, "Sig.Wave", -1)), Rr = { class: "flex-space" }, Ir = /* @__PURE__ */ J(() => /* @__PURE__ */ l("label", null, "Current", -1)), Ar = { class: "flex-space" }, $r = /* @__PURE__ */ J(() => /* @__PURE__ */ l("label", null, "Precip", -1)), Dr = { class: "flex-space" }, zr = /* @__PURE__ */ J(() => /* @__PURE__ */ l("label", null, "Visibility", -1)), Mr = { class: "flex-space" }, Br = /* @__PURE__ */ J(() => /* @__PURE__ */ l("label", null, "Temp", -1)), Or = { class: "flex-space" }, Wr = /* @__PURE__ */ J(() => /* @__PURE__ */ l("label", null, "Water Temp", -1)), Nr = {
@@ -3276,7 +3276,7 @@ function Vr(i, e, t, r, a, s) {
3276
3276
  [Me, a.showMeteo]
3277
3277
  ]);
3278
3278
  }
3279
- const Ur = /* @__PURE__ */ k(fr, [["render", Vr], ["__scopeId", "data-v-a7923724"]]), Gr = {
3279
+ const Ur = /* @__PURE__ */ k(fr, [["render", Vr], ["__scopeId", "data-v-fb5b12d6"]]), Gr = {
3280
3280
  name: "IdmWarZone",
3281
3281
  props: {
3282
3282
  map: {
@@ -1,4 +1,4 @@
1
- (function(k,v){typeof exports=="object"&&typeof module<"u"?v(exports,require("@idmwx/idmwx-base"),require("vue"),require("@turf/turf"),require("@mapbox/sphericalmercator"),require("moment"),require("mapbox-gl"),require("@idm-plugin/geo"),require("axios")):typeof define=="function"&&define.amd?define(["exports","@idmwx/idmwx-base","vue","@turf/turf","@mapbox/sphericalmercator","moment","mapbox-gl","@idm-plugin/geo","axios"],v):(k=typeof globalThis<"u"?globalThis:k||self,v(k["idm-gl"]={},k["@idmwx/idmwx-base"],k.Vue,k["@turf/turf"],k["@mapbox/sphericalmercator"],k.moment,k["mapbox-gl"],k["@idm-plugin/geo"],k.axios))})(this,function(k,v,i,Ae,ze,W,U,ke,H){"use strict";var xr=Object.defineProperty;var Cr=(k,v,i)=>v in k?xr(k,v,{enumerable:!0,configurable:!0,writable:!0,value:i}):k[v]=i;var V=(k,v,i)=>(Cr(k,typeof v!="symbol"?v+"":v,i),i);function Me(a){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const t in a)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(a,t);Object.defineProperty(e,t,o.get?o:{enumerable:!0,get:()=>a[t]})}}return e.default=a,Object.freeze(e)}const E=Me(Ae),Sr="",kr="",C=(a,e)=>{const t=a.__vccOpts||a;for(const[o,r]of e)t[o]=r;return t},Oe={name:"IdmGlLayer",props:{map:{type:Object},top:{type:Number,default:60},toggleMenu:{type:Boolean,default:!1},toggleVersion:{type:Number},isLogin:{type:Boolean,default:void 0}},emits:["weather","other","coordinate","measure","point","3d","toggleVersion","menu","showLayers"],data(){return{showLayers:!1,source:"",weatherLayers:[],activeWeatherLayers:[],autoActive:!0,otherLayers:[],layers:{weather:[...v.LayerHelper.WEATHER_LAYERS],other:[...v.LayerHelper.OTHER_LAYERS]},weatherLayersCache:"weatherLayersCache",autoActiveCache:"autoActiveCache",otherLayersCache:"otherLayersCache",sourceCache:"defaultSourceCache",showCoord:!1,showMeasure:!1,showPoint:!1,show3d:!1,version:{v:"0.0.5",k:"glCacheVersion"},right:10}},computed:{computeLayerClass(){return function(a,e){return a.enabled?e.some(t=>t.key===a.key)?"layer active":"layer":"layer disabled"}}},watch:{showLayers:{handler(){this.$nextTick(()=>{var a,e;this.$emit("menu",this.showLayers?!1:this.toggleMenu),this.$emit("toggleVersion",Math.random()),this.right=(((a=document.getElementsByClassName("available-layers-show")[0])==null?void 0:a.clientWidth)||0)+(((e=document.getElementsByClassName("fleet-list-container")[0])==null?void 0:e.clientWidth)||0)+10})}},toggleMenu:{handler(){this.$nextTick(()=>{var a,e;this.showLayers=this.toggleMenu?!1:this.showLayers,this.$emit("toggleVersion",Math.random()),this.right=(((a=document.getElementsByClassName("available-layers-show")[0])==null?void 0:a.clientWidth)||0)+(((e=document.getElementsByClassName("fleet-list-container")[0])==null?void 0:e.clientWidth)||0)+10})}}},mounted(){const a=localStorage.getItem(this.version.k);this.version.v!==a&&(localStorage.removeItem(this.weatherLayersCache),localStorage.setItem(this.version.k,this.version.v));let e=localStorage.getItem(this.autoActiveCache);this.autoActive=e!=="false",e=localStorage.getItem(this.weatherLayersCache);let t=JSON.parse(e||'[{"weight":1,"name":"Wind","key":"wind","enabled":true,"type":"json","particle":true},{"weight":4096,"name":"Pressure","key":"prmsl","enabled":true,"type":"json"},{"weight":256,"name":"Tropicals","key":"tropicals","enabled":true,"type":"json"}]');this.weatherLayers=t,this.autoActive&&(this.activeWeatherLayers=[...t]),e=localStorage.getItem(this.otherLayersCache),t=JSON.parse(e||'[{"weight":2048,"name":"ENC","key":"enc","enabled":true,"type":"json"},{"weight":4,"name":"ECA Zones","key":"eca-zones","enabled":true,"type":"json"}]'),this.otherLayers=t,e=localStorage.getItem(this.sourceCache),this.source=e||"GFS",this.handleConfirm()},methods:{handleConfirm(){this.$emit("weather",this.weatherLayers,this.activeWeatherLayers,this.source),this.$emit("other",this.otherLayers),localStorage.setItem(this.autoActiveCache,this.autoActive),localStorage.setItem(this.sourceCache,this.source)},handleWeatherLayerPick(a){this.weatherLayers.some(e=>e.key===a.key)?(this.weatherLayers=this.weatherLayers.filter(e=>e.key!==a.key),this.activeWeatherLayers=this.activeWeatherLayers.filter(e=>e.key!==a.key)):this.weatherLayers.length<12&&a.enabled&&(["png","jpg"].includes(a.type)&&(this.weatherLayers=this.weatherLayers.filter(e=>e.type==="json"),this.activeWeatherLayers=this.activeWeatherLayers.filter(e=>e.type==="json")),this.weatherLayers.push(a),this.activeWeatherLayers.push(a)),localStorage.setItem(this.weatherLayersCache,JSON.stringify(this.weatherLayers)),this.$emit("weather",this.weatherLayers,this.activeWeatherLayers,this.source),localStorage.setItem(this.autoActiveCache,this.autoActive),localStorage.setItem(this.sourceCache,this.source)},handleActiveWeatherLayerPick(a){if(this.activeWeatherLayers.some(e=>e.key===a.key))this.activeWeatherLayers=this.activeWeatherLayers.filter(e=>e.key!==a.key);else if(a.enabled){this.activeWeatherLayers.push(a);for(const e of this.weatherLayers)a.weight>e.weight&&a.weight&e.weight&&this.activeWeatherLayers.push(e)}this.$emit("weather",this.weatherLayers,this.activeWeatherLayers,this.source)},handleOtherLayerPick(a){this.otherLayers.some(e=>e.key===a.key)?this.otherLayers=this.otherLayers.filter(e=>e.key!==a.key):a.enabled&&this.otherLayers.push(a),localStorage.setItem(this.otherLayersCache,JSON.stringify(this.otherLayers)),this.$emit("other",this.otherLayers)},handleMenuToggle(){this.showLayers=!this.showLayers},handleCoordToggle(){this.showCoord=!this.showCoord,this.$emit("coordinate",this.showCoord)},handlePointToggle(){this.isLogin?(this.showPoint=!this.showPoint,this.$emit("point",this.showPoint)):this.$emit("toggleVersion",Math.random())},handleMeasureToggle(){this.showMeasure=!this.showMeasure,this.$emit("measure",this.showMeasure)},handle3DToggle(){this.show3d=!this.show3d,this.$emit("3d",this.show3d)},handleSourceToggle(a){this.source=a,this.handleConfirm()}}},A=a=>(i.pushScopeId("data-v-4df358dd"),a=a(),i.popScopeId(),a),We={class:"idm-gl-layer"},je={class:"bar-item layer-bars"},Fe=[A(()=>i.createElementVNode("span",{class:"iconfont"},"",-1))],Ue={class:"bar-item tool-bars"},He=[A(()=>i.createElementVNode("span",{class:"iconfont"},"",-1))],Ge=[A(()=>i.createElementVNode("span",{class:"iconfont"},"",-1))],Xe=[A(()=>i.createElementVNode("span",{class:"iconfont"},"",-1))],Ze=[A(()=>i.createElementVNode("span",{class:"iconfont"},"",-1))],Je=["onClick"],qe=A(()=>i.createElementVNode("div",{class:"checkbox"},null,-1)),Ye=[A(()=>i.createElementVNode("i",{class:"iconfont"},"",-1))],Ke={class:"weather-layers"},Qe={class:"layers-title",style:{display:"flex","align-items":"center","justify-content":"space-between"}},et={style:{"font-size":"12px"}},tt={class:"layers-body"},at=["onClick"],it=A(()=>i.createElementVNode("div",{class:"checkbox"},null,-1)),rt={class:"other-layers"},ot=A(()=>i.createElementVNode("div",{class:"layers-title"},"Other Layers",-1)),st={class:"layers-body"},nt=["onClick"],lt=A(()=>i.createElementVNode("div",{class:"checkbox"},null,-1)),ct={class:"source-layers"},ht=A(()=>i.createElementVNode("span",{class:"layers-title"},"Forecast Model",-1)),dt={class:"layers-body model-box"};function pt(a,e,t,o,r,s){const l=i.resolveComponent("ElScrollbar");return i.openBlock(),i.createElementBlock("div",We,[i.createElementVNode("div",{class:"menu-bar-box",style:i.normalizeStyle({top:t.top+10+"px",right:r.right+"px"})},[i.createElementVNode("div",je,[i.createElementVNode("div",{class:i.normalizeClass(r.showLayers?"menu-icon active":"menu-icon"),onClick:e[0]||(e[0]=(...n)=>s.handleMenuToggle&&s.handleMenuToggle(...n))},Fe,2)])],4),i.createElementVNode("div",{class:"menu-bar-box",style:i.normalizeStyle({top:t.top+160+"px",right:r.right+"px"})},[i.createElementVNode("div",Ue,[i.createElementVNode("div",{class:i.normalizeClass(r.showMeasure?"menu-icon active":"menu-icon"),onClick:e[1]||(e[1]=(...n)=>s.handleMeasureToggle&&s.handleMeasureToggle(...n))},He,2),i.createElementVNode("div",{class:i.normalizeClass(r.showPoint?"menu-icon active":"menu-icon"),onClick:e[2]||(e[2]=(...n)=>s.handlePointToggle&&s.handlePointToggle(...n))},Ge,2),i.createElementVNode("div",{class:i.normalizeClass(r.showCoord?"menu-icon active":"menu-icon"),onClick:e[3]||(e[3]=(...n)=>s.handleCoordToggle&&s.handleCoordToggle(...n))},Xe,2),i.createElementVNode("div",{class:i.normalizeClass(r.show3d?"menu-icon active":"menu-icon"),onClick:e[4]||(e[4]=(...n)=>s.handle3DToggle&&s.handle3DToggle(...n))},Ze,2)])],4),i.createElementVNode("div",{class:"active-layers",style:i.normalizeStyle({right:r.right+"px",bottom:"100px"})},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(r.weatherLayers,n=>(i.openBlock(),i.createElementBlock("div",{key:n.key,class:i.normalizeClass(s.computeLayerClass(n,r.activeWeatherLayers)),onClick:c=>s.handleActiveWeatherLayerPick(n)},[qe,i.createElementVNode("span",null,i.toDisplayString(n.name),1)],10,Je))),128))],4),i.createElementVNode("div",{class:"available-layers flex-center",style:i.normalizeStyle({top:t.top+"px",right:r.showLayers?"0px":"-240px"})},[i.createElementVNode("div",{class:"side-bar",style:i.normalizeStyle({right:r.showLayers?"0px":"-240px"}),onClick:e[5]||(e[5]=(...n)=>s.handleMenuToggle&&s.handleMenuToggle(...n))},Ye,4),i.createElementVNode("div",{class:i.normalizeClass(["list-box",r.showLayers?"available-layers-show":""])},[i.createVNode(l,{style:{flex:"1"}},{default:i.withCtx(()=>[i.createElementVNode("div",Ke,[i.createElementVNode("div",Qe,[i.createElementVNode("div",null,[i.createTextVNode(" Weather Layers "),i.createElementVNode("span",et,"("+i.toDisplayString(r.weatherLayers.length)+"/12)",1)])]),i.createElementVNode("div",tt,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(r.layers.weather,n=>(i.openBlock(),i.createElementBlock(i.Fragment,{key:n.key},[n.hide?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("div",{key:0,class:i.normalizeClass(s.computeLayerClass(n,r.weatherLayers)),onClick:c=>s.handleWeatherLayerPick(n)},[it,i.createElementVNode("span",null,i.toDisplayString(n.name),1)],10,at))],64))),128))])]),i.createElementVNode("div",rt,[ot,i.createElementVNode("div",st,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(r.layers.other,n=>(i.openBlock(),i.createElementBlock("div",{key:n.key,class:i.normalizeClass(s.computeLayerClass(n,r.otherLayers)),onClick:c=>s.handleOtherLayerPick(n)},[lt,i.createElementVNode("span",null,i.toDisplayString(n.name),1)],10,nt))),128))])]),i.createElementVNode("div",ct,[ht,i.createElementVNode("div",dt,[i.createElementVNode("span",{class:i.normalizeClass(r.source==="GFS"?"text active":"text"),onClick:e[6]||(e[6]=n=>s.handleSourceToggle("GFS"))},"GFS",2),i.createElementVNode("span",{class:i.normalizeClass(r.source==="CMEMS"?"text active":"text"),onClick:e[7]||(e[7]=n=>s.handleSourceToggle("CMEMS"))},"ECMWF",2)])])]),_:1})],2)],4)])}const mt=C(Oe,[["render",pt],["__scopeId","data-v-4df358dd"]]),Rr="",yt={name:"IdmWindBarb",props:{map:{type:Object},wind:{type:Object},current:{type:Object},beforeLayer:{type:String},showParticle:{type:Boolean,default:!1},toggleVersion:{type:Number},weatherLayers:{type:Object}},emits:["particle"],data(){return{source:"wind-barb-source",barbs:[0,2,5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100,105],empty:E.featureCollection([]),showFeather:!1,right:10,bottom:125,windBarbLoaded:!1}},watch:{"wind.version":{handler(){var a;(a=this.wind)!=null&&a.active&&this.showFeather?this.handleRender():this.handleClear()},deep:!0},showParticle:{handler(){this.showFeather=!this.showParticle},immediate:!0},showFeather:{handler(){this.handleToggle()},immediate:!0},toggleVersion:{handler(){var a,e;this.right=(((a=document.getElementsByClassName("available-layers-show")[0])==null?void 0:a.clientWidth)||0)+(((e=document.getElementsByClassName("fleet-list-container")[0])==null?void 0:e.clientWidth)||0)+10},immediate:!0},"current.version":{handler(){var a,e,t;this.bottom=(a=this.current)!=null&&a.active?(((e=document.getElementsByClassName("active-layers")[0])==null?void 0:e.clientHeight)||0)+135:(((t=document.getElementsByClassName("active-layers")[0])==null?void 0:t.clientHeight)||0)+105},immediate:!0},weatherLayers:{handler(){var a,e,t;this.bottom=(a=this.current)!=null&&a.active?(((e=document.getElementsByClassName("active-layers")[0])==null?void 0:e.clientHeight)||0)+135:(((t=document.getElementsByClassName("active-layers")[0])==null?void 0:t.clientHeight)||0)+105},immediate:!0}},methods:{handleParticle(){this.$emit("particle",{particle:!this.showParticle,key:"wind",weight:1})},handleRender(){var a,e,t,o;if(!this.map)setTimeout(()=>{this.handleRender()},500);else if(this.wind){const r=new Date().valueOf();let s=0,l=0,n=this.empty;if((a=this.wind)!=null&&a.active&&(n=(e=this.wind)==null?void 0:e.data),(t=this.map)!=null&&t.getSource(this.source))(o=this.map)==null||o.getSource(this.source).setData(n),l=new Date().valueOf()-(r+s),console.log("[wind] update elapsed: ",l,", total: ",s+=l);else{this.map.addSource(this.source,{type:"geojson",data:n});for(let c=0;c<(this.barbs??[]).length-1;c++){const h=(this.barbs??[])[c]||0,f=(this.barbs??[])[c+1]||0,d=h<10?`00${h}kts`:h<100?`0${h}kts`:`${h}kts`;this.map.addLayer({id:d,type:"symbol",filter:["all",[">=","spd",h],["<","spd",f]],source:this.source,layout:{"symbol-placement":"point","icon-image":d,"icon-size":.14,"icon-offset":[0,-20],"icon-allow-overlap":!0,"icon-rotation-alignment":"map","icon-rotate":{property:"val",stops:[[0,0],[360,360]]}},paint:{"icon-opacity":1,"text-color":"#222"}},this.beforeLayer)}this.windBarbLoaded=!0,l=new Date().valueOf()-(r+s),console.log("[wind] add elapsed: ",l,", total: ",s+=l)}}},handleToggle(){if(!this.windBarbLoaded)this.handleRender();else for(const a of this.barbs??[]){const e=a<10?`00${a}kts`:a<100?`0${a}kts`:`${a}kts`;this.map.getLayer(e)&&this.map.setLayoutProperty(e,"visibility",this.showFeather?"visible":"none")}},handleClear(){for(const a of this.barbs??[]){const e=a<10?`00${a}kts`:a<100?`0${a}kts`:`${a}kts`;this.map.getLayer(e)&&this.map.removeLayer(e)}this.map.getSource(this.source)&&this.map.removeSource(this.source),this.windBarbLoaded=!1}}},ft={key:0},gt={key:0,class:"iconfont active"},ut={key:1,class:"iconfont"},bt={key:0,class:"iconfont active"},_t={key:1,class:"iconfont"};function Lt(a,e,t,o,r,s){var l;return(l=t.wind)!=null&&l.active?(i.openBlock(),i.createElementBlock("div",ft,[i.createElementVNode("div",{class:"flex-center tool-bars",style:i.normalizeStyle([{position:"absolute"},{right:r.right+"px",bottom:r.bottom+"px"}])},[i.createElementVNode("div",{class:"flex-start",onClick:e[0]||(e[0]=(...n)=>s.handleParticle&&s.handleParticle(...n))},[t.showParticle?(i.openBlock(),i.createElementBlock("i",gt,"")):(i.openBlock(),i.createElementBlock("i",ut,"")),i.createElementVNode("span",{class:i.normalizeClass(t.showParticle?"active":"")},"Wind Particles",2)]),t.showParticle?(i.openBlock(),i.createElementBlock("div",{key:0,class:"flex-start",style:{"margin-left":"16px"},onClick:e[1]||(e[1]=n=>r.showFeather=!r.showFeather)},[r.showFeather?(i.openBlock(),i.createElementBlock("i",bt,"")):(i.openBlock(),i.createElementBlock("i",_t,"")),i.createElementVNode("span",{class:i.normalizeClass(r.showFeather?"active":"")},"Wind Feather",2)])):i.createCommentVNode("",!0)],4)])):i.createCommentVNode("",!0)}const wt=C(yt,[["render",Lt],["__scopeId","data-v-fc7a24ef"]]);class ve{constructor(e){V(this,"map");V(this,"mercator");V(this,"rampColorLayer");V(this,"rampColorSource");V(this,"particleLayer");V(this,"particleSource");V(this,"rampColorCanvas");V(this,"particleCanvas");V(this,"ratio");this.map=e,this.mercator=new ze,this.rampColorLayer="ramp-color-layer",this.rampColorSource="ramp-color-source",this.particleLayer="particle-layer",this.particleSource="particle-source",this.rampColorCanvas=document.createElement("canvas"),this.particleCanvas=document.createElement("canvas"),this.ratio=window.devicePixelRatio}convertNLng(e,t=0){return e>180?this.convertNLng(e-360,t+1):e<-180?this.convertNLng(e+360,t+1):[e,t]}getBoundLngLat(){const e=this.map.getBounds();return[[e._sw.lng,e._ne.lat],[e._ne.lng,e._ne.lat],[e._ne.lng,e._sw.lat],[e._sw.lng,e._sw.lat]]}getBoundPixel(){const e=this.map.getBounds(),t=this.map.getZoom()+1,o=[e._ne.lng,e._ne.lat],r=[e._sw.lng,e._sw.lat],[s,l]=this.convertNLng(o[0]),[n,c]=this.convertNLng(r[0]),[h,f]=this.mercator.px([s,o[1]],t),[d,m]=this.mercator.px([n,r[1]],t),y=Math.round(this.mercator.size*Math.pow(2,t)*(l+c));return[d,m,h+y,f]}getBoundRange(){const e=this.map.getZoom()+1,t=this.mercator.size*Math.pow(2,e),o=this.getBoundPixel();return[o[0]/t,o[2]/t,o[3]/t,o[1]/t]}getWorldCopy(e,t){const o=2**t,[r,s,l,n]=e.map(f=>~~(f/(o*256))),c=[];for(let f=n;f<=s;f++)for(let d=r;d<=l;d++)c.push([d,f]);return c.map(f=>{const d=2**t*256;return[f[0]*d,f[1]*d,d]})}resize(){let e=this.map.getSource(this.rampColorSource);e.setCoordinates(this.getBoundLngLat()),e=this.map.getSource(this.particleSource),e.setCoordinates(this.getBoundLngLat()),this.rampColorCanvas.width=this.map._canvas.clientWidth,this.rampColorCanvas.height=this.map._canvas.clientHeight,this.particleCanvas.width=this.map._canvas.clientWidth,this.particleCanvas.height=this.map._canvas.clientHeight}toggle(e){const t=this.map.getLayoutProperty(this.rampColorLayer,"visibility"),o=e?"visible":"none";t!==o&&this.map.setLayoutProperty(this.rampColorLayer,"visibility",o)}toggleParticle(e){const t=this.map.getLayoutProperty(this.particleLayer,"visibility"),o=e?"visible":"none";t!==o&&this.map.setLayoutProperty(this.particleLayer,"visibility",o)}}class Y{createShader(e,t,o){const r=e.createShader(t);if(r&&(e.shaderSource(r,o),e.compileShader(r),!e.getShaderParameter(r,e.COMPILE_STATUS)))throw new Error(e.getShaderInfoLog(r)||"error happened while create shader...");return r}createTexture(e,t,o,r,s,l,n){const c=e.createTexture();return e.bindTexture(e.TEXTURE_2D,c),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,t),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,o),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,r),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,r),s instanceof Uint8Array?e.texImage2D(e.TEXTURE_2D,0,e.RGBA,l,n,0,e.RGBA,e.UNSIGNED_BYTE,s):e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,s),e.bindTexture(e.TEXTURE_2D,null),c}createDataBuffer(e,t,o){if(e){const r=e.createBuffer();return t==="array"?(e.bindBuffer(e.ARRAY_BUFFER,r),o&&e.bufferData(e.ARRAY_BUFFER,o,e.STATIC_DRAW)):t==="element"&&(e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,r),o&&e.bufferData(e.ELEMENT_ARRAY_BUFFER,o,e.STATIC_DRAW)),r}return null}createProgram(e,t,o){const r=e.createProgram(),s=this.createShader(e,e.VERTEX_SHADER,t),l=this.createShader(e,e.FRAGMENT_SHADER,o);if(r&&s&&l&&(e.attachShader(r,s),e.attachShader(r,l),e.linkProgram(r),!e.getProgramParameter(r,e.LINK_STATUS)))throw new Error(e.getProgramInfoLog(r)||"error happened while creating ramp color program");return r}createProgramWrapper(e,t,o){const r=this.createProgram(e,t,o);if(r){const s={program:r},l=e.getProgramParameter(r,e.ACTIVE_ATTRIBUTES);for(let c=0;c<l;c++){const h=e.getActiveAttrib(r,c);s[h.name]=e.getAttribLocation(r,h.name)}const n=e.getProgramParameter(r,e.ACTIVE_UNIFORMS);for(let c=0;c<n;c++){const h=e.getActiveUniform(r,c);s[h.name]=e.getUniformLocation(r,h.name)}return s}}setup(e,t,o=!1,r,s){const l=document.createElement("canvas");l.width=256,l.height=1;const n=l.getContext("2d");if(n&&e){const c=n==null?void 0:n.createLinearGradient(0,0,256,0);return t.forEach(([h,f])=>{c.addColorStop(h,f)}),n.fillStyle=c,n.fillRect(0,0,256,1),{canvas:l,texture:this.createTexture(e,e.LINEAR,e.LINEAR,e.CLAMP_TO_EDGE,o?new Uint8Array(n.getImageData(0,0,256,1).data):l,r,s)}}}setupParticle(e,t=1e3){const o=Math.ceil(Math.sqrt(t)),r=o*o,s=new Uint8Array(r*4);for(let f=0;f<s.length;f++)s[f]=Math.floor(Math.random()*256);const l=this.createTexture(e,e.NEAREST,e.NEAREST,e.CLAMP_TO_EDGE,s,o,o),n=this.createTexture(e,e.NEAREST,e.NEAREST,e.CLAMP_TO_EDGE,s,o,o),c=new Float32Array(r);for(let f=0;f<r;f++)c[f]=f;const h=this.createDataBuffer(e,"array",c);return{resolution:o,total:r,texture0:l,texture1:n,indexBuffer:h}}bind(e,t,o){const r=this.createProgram(e,t,o);if(r){const s=this.createDataBuffer(e,"array",void 0),l=e.getAttribLocation(r,"a_position");e.enableVertexAttribArray(l),e.vertexAttribPointer(l,2,e.FLOAT,!1,0,0);const n=new Float32Array([0,0,1,0,0,1,0,1,1,0,1,1]);this.createDataBuffer(e,"array",n);const c=e.getAttribLocation(r,"a_texCoord");return e.enableVertexAttribArray(c),e.vertexAttribPointer(c,2,e.FLOAT,!1,0,0),{program:r,aPositionBuffer:s}}return{}}bindParticle(e,t,o,r,s,l){const n=this.createProgramWrapper(e,t,o),c=this.createProgramWrapper(e,r,s),h=this.createProgramWrapper(e,r,l),f=this.createDataBuffer(e,"array",new Float32Array([0,0,1,0,0,1,0,1,1,0,1,1])),d=e.createFramebuffer();return{particle:n,screen:c,update:h,quadBuffer:f,frameBuffer:d}}draw(e,t,o,r,s,l,n){var c,h;if(t&&o){e.resize(),t==null||t.viewport(0,0,(c=t==null?void 0:t.canvas)==null?void 0:c.width,(h=t==null?void 0:t.canvas)==null?void 0:h.height),t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT);try{const f=t.getUniformLocation(o,"u_resolution"),d=t.getUniformLocation(o,"u_image"),m=t.getUniformLocation(o,"u_color");if(t.useProgram(o),t.uniform2f(f,t.canvas.width*e.ratio,t.canvas.height*e.ratio),t.activeTexture(t.TEXTURE0),t.bindTexture(t.TEXTURE_2D,r),t.uniform1i(d,0),t.activeTexture(t.TEXTURE1),t.bindTexture(t.TEXTURE_2D,s),t.uniform1i(m,1),n!=null&&n.uvRange&&(n!=null&&n.sRange)){const p=t.getUniformLocation(o,"u_range_u_v"),_=t.getUniformLocation(o,"u_range_s");t.uniform2f(p,n.uvRange[0],n.uvRange[1]),t.uniform2f(_,n.sRange[0],n.sRange[1])}const y=e.getBoundPixel(),u=e.map.getZoom()+1,g=e.getWorldCopy(y,u);for(const p of g){const _=(p[0]-y[0])*e.ratio,b=(p[1]-y[3])*e.ratio,w=p[2]*e.ratio,[x,L,S,N]=[_,w+_,b,w+b],T=new Float32Array([x,S,L,S,x,N,x,N,L,S,L,N]);t.bindBuffer(t.ARRAY_BUFFER,l),t.bufferData(t.ARRAY_BUFFER,T,t.STATIC_DRAW),t.drawArrays(t.TRIANGLES,0,6)}}catch(f){console.log(`render failed...${f}`)}}}drawParticle(e,t,o,r,s){var l,n;t&&(t==null||t.viewport(0,0,(l=t==null?void 0:t.canvas)==null?void 0:l.width,(n=t==null?void 0:t.canvas)==null?void 0:n.height),t.disable(t.DEPTH_TEST),t.disable(t.STENCIL_TEST),t.activeTexture(t.TEXTURE0),t.bindTexture(t.TEXTURE_2D,o),t.activeTexture(t.TEXTURE1),t.bindTexture(t.TEXTURE_2D,r.texture0),this.renderScreen(e,t,r,s),this.updateParticles(e,t,r,s))}renderScreen(e,t,o,r){t.bindFramebuffer(t.FRAMEBUFFER,o.frameBuffer),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,o.screenTexture,0),t.viewport(0,0,t.canvas.width,t.canvas.height),this.renderScreenTexture(t,o.backgroundTexture,o.screen,o.quadBuffer,.95),this.renderParticles(e,t,o,r),t.bindFramebuffer(t.FRAMEBUFFER,null),this.renderScreenTexture(t,o.screenTexture,o.screen,o.quadBuffer,1);const s=o.backgroundTexture;o.backgroundTexture=o.screenTexture,o.screenTexture=s}renderScreenTexture(e,t,o,r,s){e&&(e.useProgram(o.program),e.bindBuffer(e.ARRAY_BUFFER,r),e.enableVertexAttribArray(o.a_pos),e.vertexAttribPointer(o.a_pos,2,e.FLOAT,!1,0,0),e.activeTexture(e.TEXTURE2),e.bindTexture(e.TEXTURE_2D,t),e.uniform1i(o.u_screen,2),e.uniform1f(o.u_opacity,s),e.drawArrays(e.TRIANGLES,0,6))}renderParticles(e,t,o,r){if(t){t.useProgram(o.particle.program),t.bindBuffer(t.ARRAY_BUFFER,o.indexBuffer),t.enableVertexAttribArray(o.particle.a_index),t.vertexAttribPointer(o.particle.a_index,1,t.FLOAT,!1,0,0),t.activeTexture(t.TEXTURE2),t.bindTexture(t.TEXTURE_2D,o.color.texture),t.uniform1i(o.particle.u_factor,0),t.uniform1i(o.particle.u_particles,1),t.uniform1i(o.particle.u_color_ramp,2),t.uniform1f(o.particle.u_particles_resolution,o.resolution*e.ratio),t.uniform1f(o.particle.u_point,e.ratio);const s=e.getBoundRange();t.uniform4f(o.particle.u_viewport,s[0],s[1],s[2],s[3]),t.uniform2f(o.particle.u_factor_min,r.uvRange[0],r.uvRange[0]),t.uniform2f(o.particle.u_factor_max,r.uvRange[1],r.uvRange[1]),t.drawArrays(t.POINTS,0,o.total)}}updateParticles(e,t,o,r){var l,n;if(t){t.bindFramebuffer(t.FRAMEBUFFER,o.frameBuffer),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,o.texture1,0),t.viewport(0,0,o.resolution,o.resolution),t.useProgram(o.update.program),t.bindBuffer(t.ARRAY_BUFFER,o.quadBuffer),t.enableVertexAttribArray(o.update.a_pos),t.vertexAttribPointer(o.update.a_pos,2,t.FLOAT,!1,0,0),t.uniform1i(o.update.u_factor,0),t.uniform1i(o.update.u_particles,1);const c=e.getBoundRange();t.uniform4f(o.update.u_viewport,c[0],c[1],c[2],c[3]),t.uniform1f(o.update.u_rand_seed,Math.random()),t.uniform2f(o.update.u_factor_res,(l=o==null?void 0:o.image)==null?void 0:l.width,(n=o==null?void 0:o.image)==null?void 0:n.height),t.uniform2f(o.update.u_factor_min,r.uvRange[0],r.uvRange[0]),t.uniform2f(o.update.u_factor_max,r.uvRange[1],r.uvRange[1]),t.uniform1f(o.update.u_speed_factor,r.speedFactor*e.ratio),t.uniform1f(o.update.u_drop_rate,r.dropRate),t.uniform1f(o.update.u_drop_rate_bump,r.dropRateBump),t.drawArrays(t.TRIANGLES,0,6)}const s=o.texture0;o.texture0=o.texture1,o.texture1=s}resize(e,t){e.resize();const o=new Uint8Array(t.canvas.width*t.canvas.height*4).fill(0,0,t.canvas.width*t.canvas.height*4),r=this.createTexture(t,t.NEAREST,t.NEAREST,t.CLAMP_TO_EDGE,o,t.canvas.width,t.canvas.height),s=this.createTexture(t,t.NEAREST,t.NEAREST,t.CLAMP_TO_EDGE,o,t.canvas.width,t.canvas.height);return{screenTexture:r,backgroundTexture:s}}async loadImg(e){return new Promise(t=>{const o=new Blob([e],{type:e.type}),r=URL.createObjectURL(o),s=new Image;s.crossOrigin="anonymous",s.src=r,s.onload=()=>t(s)})}}class I{}V(I,"vertexSchema",`
1
+ (function(k,v){typeof exports=="object"&&typeof module<"u"?v(exports,require("@idmwx/idmwx-base"),require("vue"),require("@turf/turf"),require("@mapbox/sphericalmercator"),require("moment"),require("mapbox-gl"),require("@idm-plugin/geo"),require("axios")):typeof define=="function"&&define.amd?define(["exports","@idmwx/idmwx-base","vue","@turf/turf","@mapbox/sphericalmercator","moment","mapbox-gl","@idm-plugin/geo","axios"],v):(k=typeof globalThis<"u"?globalThis:k||self,v(k["idm-gl"]={},k["@idmwx/idmwx-base"],k.Vue,k["@turf/turf"],k["@mapbox/sphericalmercator"],k.moment,k["mapbox-gl"],k["@idm-plugin/geo"],k.axios))})(this,function(k,v,i,Ae,ze,W,U,ke,H){"use strict";var xr=Object.defineProperty;var Cr=(k,v,i)=>v in k?xr(k,v,{enumerable:!0,configurable:!0,writable:!0,value:i}):k[v]=i;var V=(k,v,i)=>(Cr(k,typeof v!="symbol"?v+"":v,i),i);function Me(a){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const t in a)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(a,t);Object.defineProperty(e,t,o.get?o:{enumerable:!0,get:()=>a[t]})}}return e.default=a,Object.freeze(e)}const E=Me(Ae),Sr="",kr="",C=(a,e)=>{const t=a.__vccOpts||a;for(const[o,r]of e)t[o]=r;return t},Oe={name:"IdmGlLayer",props:{map:{type:Object},top:{type:Number,default:60},toggleMenu:{type:Boolean,default:!1},toggleVersion:{type:Number},isLogin:{type:Boolean,default:void 0}},emits:["weather","other","coordinate","measure","point","3d","toggleVersion","menu","showLayers"],data(){return{showLayers:!1,source:"",weatherLayers:[],activeWeatherLayers:[],autoActive:!0,otherLayers:[],layers:{weather:[...v.LayerHelper.WEATHER_LAYERS],other:[...v.LayerHelper.OTHER_LAYERS]},weatherLayersCache:"weatherLayersCache",autoActiveCache:"autoActiveCache",otherLayersCache:"otherLayersCache",sourceCache:"defaultSourceCache",showCoord:!1,showMeasure:!1,showPoint:!1,show3d:!1,version:{v:"0.0.5",k:"glCacheVersion"},right:10}},computed:{computeLayerClass(){return function(a,e){return a.enabled?e.some(t=>t.key===a.key)?"layer active":"layer":"layer disabled"}}},watch:{showLayers:{handler(){this.$nextTick(()=>{var a,e;this.$emit("menu",this.showLayers?!1:this.toggleMenu),this.$emit("toggleVersion",Math.random()),this.right=(((a=document.getElementsByClassName("available-layers-show")[0])==null?void 0:a.clientWidth)||0)+(((e=document.getElementsByClassName("fleet-list-container")[0])==null?void 0:e.clientWidth)||0)+10})}},toggleMenu:{handler(){this.$nextTick(()=>{var a,e;this.showLayers=this.toggleMenu?!1:this.showLayers,this.$emit("toggleVersion",Math.random()),this.right=(((a=document.getElementsByClassName("available-layers-show")[0])==null?void 0:a.clientWidth)||0)+(((e=document.getElementsByClassName("fleet-list-container")[0])==null?void 0:e.clientWidth)||0)+10})}}},mounted(){const a=localStorage.getItem(this.version.k);this.version.v!==a&&(localStorage.removeItem(this.weatherLayersCache),localStorage.setItem(this.version.k,this.version.v));let e=localStorage.getItem(this.autoActiveCache);this.autoActive=e!=="false",e=localStorage.getItem(this.weatherLayersCache);let t=JSON.parse(e||'[{"weight":1,"name":"Wind","key":"wind","enabled":true,"type":"json","particle":true},{"weight":4096,"name":"Pressure","key":"prmsl","enabled":true,"type":"json"},{"weight":256,"name":"Tropicals","key":"tropicals","enabled":true,"type":"json"}]');this.weatherLayers=t,this.autoActive&&(this.activeWeatherLayers=[...t]),e=localStorage.getItem(this.otherLayersCache),t=JSON.parse(e||'[{"weight":2048,"name":"ENC","key":"enc","enabled":true,"type":"json"},{"weight":4,"name":"ECA Zones","key":"eca-zones","enabled":true,"type":"json"}]'),this.otherLayers=t,e=localStorage.getItem(this.sourceCache),this.source=e||"GFS",this.handleConfirm()},methods:{handleConfirm(){this.$emit("weather",this.weatherLayers,this.activeWeatherLayers,this.source),this.$emit("other",this.otherLayers),localStorage.setItem(this.autoActiveCache,this.autoActive),localStorage.setItem(this.sourceCache,this.source)},handleWeatherLayerPick(a){this.weatherLayers.some(e=>e.key===a.key)?(this.weatherLayers=this.weatherLayers.filter(e=>e.key!==a.key),this.activeWeatherLayers=this.activeWeatherLayers.filter(e=>e.key!==a.key)):this.weatherLayers.length<12&&a.enabled&&(["png","jpg"].includes(a.type)&&(this.weatherLayers=this.weatherLayers.filter(e=>e.type==="json"),this.activeWeatherLayers=this.activeWeatherLayers.filter(e=>e.type==="json")),this.weatherLayers.push(a),this.activeWeatherLayers.push(a)),localStorage.setItem(this.weatherLayersCache,JSON.stringify(this.weatherLayers)),this.$emit("weather",this.weatherLayers,this.activeWeatherLayers,this.source),localStorage.setItem(this.autoActiveCache,this.autoActive),localStorage.setItem(this.sourceCache,this.source)},handleActiveWeatherLayerPick(a){if(this.activeWeatherLayers.some(e=>e.key===a.key))this.activeWeatherLayers=this.activeWeatherLayers.filter(e=>e.key!==a.key);else if(a.enabled){this.activeWeatherLayers.push(a);for(const e of this.weatherLayers)a.weight>e.weight&&a.weight&e.weight&&this.activeWeatherLayers.push(e)}this.$emit("weather",this.weatherLayers,this.activeWeatherLayers,this.source)},handleOtherLayerPick(a){this.otherLayers.some(e=>e.key===a.key)?this.otherLayers=this.otherLayers.filter(e=>e.key!==a.key):a.enabled&&this.otherLayers.push(a),localStorage.setItem(this.otherLayersCache,JSON.stringify(this.otherLayers)),this.$emit("other",this.otherLayers)},handleMenuToggle(){this.showLayers=!this.showLayers},handleCoordToggle(){this.showCoord=!this.showCoord,this.$emit("coordinate",this.showCoord)},handlePointToggle(){this.isLogin?(this.showPoint=!this.showPoint,this.$emit("point",this.showPoint)):this.$emit("toggleVersion",Math.random())},handleMeasureToggle(){this.showMeasure=!this.showMeasure,this.$emit("measure",this.showMeasure)},handle3DToggle(){this.show3d=!this.show3d,this.$emit("3d",this.show3d)},handleSourceToggle(a){this.source=a,this.handleConfirm()}}},A=a=>(i.pushScopeId("data-v-4df358dd"),a=a(),i.popScopeId(),a),We={class:"idm-gl-layer"},je={class:"bar-item layer-bars"},Fe=[A(()=>i.createElementVNode("span",{class:"iconfont"},"",-1))],Ue={class:"bar-item tool-bars"},He=[A(()=>i.createElementVNode("span",{class:"iconfont"},"",-1))],Ge=[A(()=>i.createElementVNode("span",{class:"iconfont"},"",-1))],Xe=[A(()=>i.createElementVNode("span",{class:"iconfont"},"",-1))],Ze=[A(()=>i.createElementVNode("span",{class:"iconfont"},"",-1))],Je=["onClick"],qe=A(()=>i.createElementVNode("div",{class:"checkbox"},null,-1)),Ye=[A(()=>i.createElementVNode("i",{class:"iconfont"},"",-1))],Ke={class:"weather-layers"},Qe={class:"layers-title",style:{display:"flex","align-items":"center","justify-content":"space-between"}},et={style:{"font-size":"12px"}},tt={class:"layers-body"},at=["onClick"],it=A(()=>i.createElementVNode("div",{class:"checkbox"},null,-1)),rt={class:"other-layers"},ot=A(()=>i.createElementVNode("div",{class:"layers-title"},"Other Layers",-1)),st={class:"layers-body"},nt=["onClick"],lt=A(()=>i.createElementVNode("div",{class:"checkbox"},null,-1)),ct={class:"source-layers"},ht=A(()=>i.createElementVNode("span",{class:"layers-title"},"Forecast Model",-1)),dt={class:"layers-body model-box"};function pt(a,e,t,o,r,s){const l=i.resolveComponent("ElScrollbar");return i.openBlock(),i.createElementBlock("div",We,[i.createElementVNode("div",{class:"menu-bar-box",style:i.normalizeStyle({top:t.top+10+"px",right:r.right+"px"})},[i.createElementVNode("div",je,[i.createElementVNode("div",{class:i.normalizeClass(r.showLayers?"menu-icon active":"menu-icon"),onClick:e[0]||(e[0]=(...n)=>s.handleMenuToggle&&s.handleMenuToggle(...n))},Fe,2)])],4),i.createElementVNode("div",{class:"menu-bar-box",style:i.normalizeStyle({top:t.top+160+"px",right:r.right+"px"})},[i.createElementVNode("div",Ue,[i.createElementVNode("div",{class:i.normalizeClass(r.showMeasure?"menu-icon active":"menu-icon"),onClick:e[1]||(e[1]=(...n)=>s.handleMeasureToggle&&s.handleMeasureToggle(...n))},He,2),i.createElementVNode("div",{class:i.normalizeClass(r.showPoint?"menu-icon active":"menu-icon"),onClick:e[2]||(e[2]=(...n)=>s.handlePointToggle&&s.handlePointToggle(...n))},Ge,2),i.createElementVNode("div",{class:i.normalizeClass(r.showCoord?"menu-icon active":"menu-icon"),onClick:e[3]||(e[3]=(...n)=>s.handleCoordToggle&&s.handleCoordToggle(...n))},Xe,2),i.createElementVNode("div",{class:i.normalizeClass(r.show3d?"menu-icon active":"menu-icon"),onClick:e[4]||(e[4]=(...n)=>s.handle3DToggle&&s.handle3DToggle(...n))},Ze,2)])],4),i.createElementVNode("div",{class:"active-layers",style:i.normalizeStyle({right:r.right+"px",bottom:"100px"})},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(r.weatherLayers,n=>(i.openBlock(),i.createElementBlock("div",{key:n.key,class:i.normalizeClass(s.computeLayerClass(n,r.activeWeatherLayers)),onClick:c=>s.handleActiveWeatherLayerPick(n)},[qe,i.createElementVNode("span",null,i.toDisplayString(n.name),1)],10,Je))),128))],4),i.createElementVNode("div",{class:"available-layers flex-center",style:i.normalizeStyle({top:t.top+"px",right:r.showLayers?"0px":"-240px"})},[i.createElementVNode("div",{class:"side-bar",style:i.normalizeStyle({right:r.showLayers?"0px":"-240px"}),onClick:e[5]||(e[5]=(...n)=>s.handleMenuToggle&&s.handleMenuToggle(...n))},Ye,4),i.createElementVNode("div",{class:i.normalizeClass(["list-box",r.showLayers?"available-layers-show":""])},[i.createVNode(l,{style:{flex:"1"}},{default:i.withCtx(()=>[i.createElementVNode("div",Ke,[i.createElementVNode("div",Qe,[i.createElementVNode("div",null,[i.createTextVNode(" Weather Layers "),i.createElementVNode("span",et,"("+i.toDisplayString(r.weatherLayers.length)+"/12)",1)])]),i.createElementVNode("div",tt,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(r.layers.weather,n=>(i.openBlock(),i.createElementBlock(i.Fragment,{key:n.key},[n.hide?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("div",{key:0,class:i.normalizeClass(s.computeLayerClass(n,r.weatherLayers)),onClick:c=>s.handleWeatherLayerPick(n)},[it,i.createElementVNode("span",null,i.toDisplayString(n.name),1)],10,at))],64))),128))])]),i.createElementVNode("div",rt,[ot,i.createElementVNode("div",st,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(r.layers.other,n=>(i.openBlock(),i.createElementBlock("div",{key:n.key,class:i.normalizeClass(s.computeLayerClass(n,r.otherLayers)),onClick:c=>s.handleOtherLayerPick(n)},[lt,i.createElementVNode("span",null,i.toDisplayString(n.name),1)],10,nt))),128))])]),i.createElementVNode("div",ct,[ht,i.createElementVNode("div",dt,[i.createElementVNode("span",{class:i.normalizeClass(r.source==="GFS"?"text active":"text"),onClick:e[6]||(e[6]=n=>s.handleSourceToggle("GFS"))},"GFS",2),i.createElementVNode("span",{class:i.normalizeClass(r.source==="CMEMS"?"text active":"text"),onClick:e[7]||(e[7]=n=>s.handleSourceToggle("CMEMS"))},"ECMWF",2)])])]),_:1})],2)],4)])}const mt=C(Oe,[["render",pt],["__scopeId","data-v-4df358dd"]]),Rr="",yt={name:"IdmWindBarb",props:{map:{type:Object},wind:{type:Object},current:{type:Object},beforeLayer:{type:String},showParticle:{type:Boolean,default:!1},toggleVersion:{type:Number},weatherLayers:{type:Object}},emits:["particle"],data(){return{source:"wind-barb-source",barbs:[0,2,5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100,105],empty:E.featureCollection([]),showFeather:!1,right:10,bottom:125,windBarbLoaded:!1}},watch:{"wind.version":{handler(){var a;(a=this.wind)!=null&&a.active&&this.showFeather?this.handleRender():this.handleClear()},deep:!0},showParticle:{handler(){this.showFeather=!this.showParticle},immediate:!0},showFeather:{handler(){this.handleToggle()},immediate:!0},toggleVersion:{handler(){var a,e;this.right=(((a=document.getElementsByClassName("available-layers-show")[0])==null?void 0:a.clientWidth)||0)+(((e=document.getElementsByClassName("fleet-list-container")[0])==null?void 0:e.clientWidth)||0)+10},immediate:!0},"current.version":{handler(){var a,e,t;this.bottom=(a=this.current)!=null&&a.active?(((e=document.getElementsByClassName("active-layers")[0])==null?void 0:e.clientHeight)||0)+135:(((t=document.getElementsByClassName("active-layers")[0])==null?void 0:t.clientHeight)||0)+105},immediate:!0},weatherLayers:{handler(){var a,e,t;this.bottom=(a=this.current)!=null&&a.active?(((e=document.getElementsByClassName("active-layers")[0])==null?void 0:e.clientHeight)||0)+135:(((t=document.getElementsByClassName("active-layers")[0])==null?void 0:t.clientHeight)||0)+105},immediate:!0}},methods:{handleParticle(){this.$emit("particle",{particle:!this.showParticle,key:"wind",weight:1})},handleRender(){var a,e,t,o;if(!this.map)setTimeout(()=>{this.handleRender()},500);else if(this.wind){const r=new Date().valueOf();let s=0,l=0,n=this.empty;if((a=this.wind)!=null&&a.active&&(n=(e=this.wind)==null?void 0:e.data),(t=this.map)!=null&&t.getSource(this.source))(o=this.map)==null||o.getSource(this.source).setData(n),l=new Date().valueOf()-(r+s),console.log("[wind] update elapsed: ",l,", total: ",s+=l);else{this.map.addSource(this.source,{type:"geojson",data:n});for(let c=0;c<(this.barbs??[]).length-1;c++){const h=(this.barbs??[])[c]||0,f=(this.barbs??[])[c+1]||0,d=h<10?`00${h}kts`:h<100?`0${h}kts`:`${h}kts`;this.map.addLayer({id:d,type:"symbol",filter:["all",[">=","spd",h],["<","spd",f]],source:this.source,layout:{"symbol-placement":"point","icon-image":d,"icon-size":.14,"icon-offset":[0,-20],"icon-allow-overlap":!0,"icon-rotation-alignment":"map","icon-rotate":{property:"val",stops:[[0,0],[360,360]]}},paint:{"icon-opacity":1,"text-color":"#222"}},this.beforeLayer)}this.windBarbLoaded=!0,l=new Date().valueOf()-(r+s),console.log("[wind] add elapsed: ",l,", total: ",s+=l)}}},handleToggle(){if(!this.windBarbLoaded)this.handleRender();else for(const a of this.barbs??[]){const e=a<10?`00${a}kts`:a<100?`0${a}kts`:`${a}kts`;this.map.getLayer(e)&&this.map.setLayoutProperty(e,"visibility",this.showFeather?"visible":"none")}},handleClear(){for(const a of this.barbs??[]){const e=a<10?`00${a}kts`:a<100?`0${a}kts`:`${a}kts`;this.map.getLayer(e)&&this.map.removeLayer(e)}this.map.getSource(this.source)&&this.map.removeSource(this.source),this.windBarbLoaded=!1}}},ft={key:0},gt={key:0,class:"iconfont active"},ut={key:1,class:"iconfont"},bt={key:0,class:"iconfont active"},_t={key:1,class:"iconfont"};function Lt(a,e,t,o,r,s){var l;return(l=t.wind)!=null&&l.active?(i.openBlock(),i.createElementBlock("div",ft,[i.createElementVNode("div",{class:"flex-center tool-bars",style:i.normalizeStyle([{position:"absolute"},{right:r.right+"px",bottom:r.bottom+"px"}])},[i.createElementVNode("div",{class:"flex-start",onClick:e[0]||(e[0]=(...n)=>s.handleParticle&&s.handleParticle(...n))},[t.showParticle?(i.openBlock(),i.createElementBlock("i",gt,"")):(i.openBlock(),i.createElementBlock("i",ut,"")),i.createElementVNode("span",{class:i.normalizeClass(t.showParticle?"active":"")},"Wind Particles",2)]),t.showParticle?(i.openBlock(),i.createElementBlock("div",{key:0,class:"flex-start",style:{"margin-left":"16px"},onClick:e[1]||(e[1]=n=>r.showFeather=!r.showFeather)},[r.showFeather?(i.openBlock(),i.createElementBlock("i",bt,"")):(i.openBlock(),i.createElementBlock("i",_t,"")),i.createElementVNode("span",{class:i.normalizeClass(r.showFeather?"active":"")},"Wind Feather",2)])):i.createCommentVNode("",!0)],4)])):i.createCommentVNode("",!0)}const wt=C(yt,[["render",Lt],["__scopeId","data-v-f285f28f"]]);class ve{constructor(e){V(this,"map");V(this,"mercator");V(this,"rampColorLayer");V(this,"rampColorSource");V(this,"particleLayer");V(this,"particleSource");V(this,"rampColorCanvas");V(this,"particleCanvas");V(this,"ratio");this.map=e,this.mercator=new ze,this.rampColorLayer="ramp-color-layer",this.rampColorSource="ramp-color-source",this.particleLayer="particle-layer",this.particleSource="particle-source",this.rampColorCanvas=document.createElement("canvas"),this.particleCanvas=document.createElement("canvas"),this.ratio=window.devicePixelRatio}convertNLng(e,t=0){return e>180?this.convertNLng(e-360,t+1):e<-180?this.convertNLng(e+360,t+1):[e,t]}getBoundLngLat(){const e=this.map.getBounds();return[[e._sw.lng,e._ne.lat],[e._ne.lng,e._ne.lat],[e._ne.lng,e._sw.lat],[e._sw.lng,e._sw.lat]]}getBoundPixel(){const e=this.map.getBounds(),t=this.map.getZoom()+1,o=[e._ne.lng,e._ne.lat],r=[e._sw.lng,e._sw.lat],[s,l]=this.convertNLng(o[0]),[n,c]=this.convertNLng(r[0]),[h,f]=this.mercator.px([s,o[1]],t),[d,m]=this.mercator.px([n,r[1]],t),y=Math.round(this.mercator.size*Math.pow(2,t)*(l+c));return[d,m,h+y,f]}getBoundRange(){const e=this.map.getZoom()+1,t=this.mercator.size*Math.pow(2,e),o=this.getBoundPixel();return[o[0]/t,o[2]/t,o[3]/t,o[1]/t]}getWorldCopy(e,t){const o=2**t,[r,s,l,n]=e.map(f=>~~(f/(o*256))),c=[];for(let f=n;f<=s;f++)for(let d=r;d<=l;d++)c.push([d,f]);return c.map(f=>{const d=2**t*256;return[f[0]*d,f[1]*d,d]})}resize(){let e=this.map.getSource(this.rampColorSource);e.setCoordinates(this.getBoundLngLat()),e=this.map.getSource(this.particleSource),e.setCoordinates(this.getBoundLngLat()),this.rampColorCanvas.width=this.map._canvas.clientWidth,this.rampColorCanvas.height=this.map._canvas.clientHeight,this.particleCanvas.width=this.map._canvas.clientWidth,this.particleCanvas.height=this.map._canvas.clientHeight}toggle(e){const t=this.map.getLayoutProperty(this.rampColorLayer,"visibility"),o=e?"visible":"none";t!==o&&this.map.setLayoutProperty(this.rampColorLayer,"visibility",o)}toggleParticle(e){const t=this.map.getLayoutProperty(this.particleLayer,"visibility"),o=e?"visible":"none";t!==o&&this.map.setLayoutProperty(this.particleLayer,"visibility",o)}}class Y{createShader(e,t,o){const r=e.createShader(t);if(r&&(e.shaderSource(r,o),e.compileShader(r),!e.getShaderParameter(r,e.COMPILE_STATUS)))throw new Error(e.getShaderInfoLog(r)||"error happened while create shader...");return r}createTexture(e,t,o,r,s,l,n){const c=e.createTexture();return e.bindTexture(e.TEXTURE_2D,c),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,t),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,o),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,r),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,r),s instanceof Uint8Array?e.texImage2D(e.TEXTURE_2D,0,e.RGBA,l,n,0,e.RGBA,e.UNSIGNED_BYTE,s):e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,s),e.bindTexture(e.TEXTURE_2D,null),c}createDataBuffer(e,t,o){if(e){const r=e.createBuffer();return t==="array"?(e.bindBuffer(e.ARRAY_BUFFER,r),o&&e.bufferData(e.ARRAY_BUFFER,o,e.STATIC_DRAW)):t==="element"&&(e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,r),o&&e.bufferData(e.ELEMENT_ARRAY_BUFFER,o,e.STATIC_DRAW)),r}return null}createProgram(e,t,o){const r=e.createProgram(),s=this.createShader(e,e.VERTEX_SHADER,t),l=this.createShader(e,e.FRAGMENT_SHADER,o);if(r&&s&&l&&(e.attachShader(r,s),e.attachShader(r,l),e.linkProgram(r),!e.getProgramParameter(r,e.LINK_STATUS)))throw new Error(e.getProgramInfoLog(r)||"error happened while creating ramp color program");return r}createProgramWrapper(e,t,o){const r=this.createProgram(e,t,o);if(r){const s={program:r},l=e.getProgramParameter(r,e.ACTIVE_ATTRIBUTES);for(let c=0;c<l;c++){const h=e.getActiveAttrib(r,c);s[h.name]=e.getAttribLocation(r,h.name)}const n=e.getProgramParameter(r,e.ACTIVE_UNIFORMS);for(let c=0;c<n;c++){const h=e.getActiveUniform(r,c);s[h.name]=e.getUniformLocation(r,h.name)}return s}}setup(e,t,o=!1,r,s){const l=document.createElement("canvas");l.width=256,l.height=1;const n=l.getContext("2d");if(n&&e){const c=n==null?void 0:n.createLinearGradient(0,0,256,0);return t.forEach(([h,f])=>{c.addColorStop(h,f)}),n.fillStyle=c,n.fillRect(0,0,256,1),{canvas:l,texture:this.createTexture(e,e.LINEAR,e.LINEAR,e.CLAMP_TO_EDGE,o?new Uint8Array(n.getImageData(0,0,256,1).data):l,r,s)}}}setupParticle(e,t=1e3){const o=Math.ceil(Math.sqrt(t)),r=o*o,s=new Uint8Array(r*4);for(let f=0;f<s.length;f++)s[f]=Math.floor(Math.random()*256);const l=this.createTexture(e,e.NEAREST,e.NEAREST,e.CLAMP_TO_EDGE,s,o,o),n=this.createTexture(e,e.NEAREST,e.NEAREST,e.CLAMP_TO_EDGE,s,o,o),c=new Float32Array(r);for(let f=0;f<r;f++)c[f]=f;const h=this.createDataBuffer(e,"array",c);return{resolution:o,total:r,texture0:l,texture1:n,indexBuffer:h}}bind(e,t,o){const r=this.createProgram(e,t,o);if(r){const s=this.createDataBuffer(e,"array",void 0),l=e.getAttribLocation(r,"a_position");e.enableVertexAttribArray(l),e.vertexAttribPointer(l,2,e.FLOAT,!1,0,0);const n=new Float32Array([0,0,1,0,0,1,0,1,1,0,1,1]);this.createDataBuffer(e,"array",n);const c=e.getAttribLocation(r,"a_texCoord");return e.enableVertexAttribArray(c),e.vertexAttribPointer(c,2,e.FLOAT,!1,0,0),{program:r,aPositionBuffer:s}}return{}}bindParticle(e,t,o,r,s,l){const n=this.createProgramWrapper(e,t,o),c=this.createProgramWrapper(e,r,s),h=this.createProgramWrapper(e,r,l),f=this.createDataBuffer(e,"array",new Float32Array([0,0,1,0,0,1,0,1,1,0,1,1])),d=e.createFramebuffer();return{particle:n,screen:c,update:h,quadBuffer:f,frameBuffer:d}}draw(e,t,o,r,s,l,n){var c,h;if(t&&o){e.resize(),t==null||t.viewport(0,0,(c=t==null?void 0:t.canvas)==null?void 0:c.width,(h=t==null?void 0:t.canvas)==null?void 0:h.height),t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT);try{const f=t.getUniformLocation(o,"u_resolution"),d=t.getUniformLocation(o,"u_image"),m=t.getUniformLocation(o,"u_color");if(t.useProgram(o),t.uniform2f(f,t.canvas.width*e.ratio,t.canvas.height*e.ratio),t.activeTexture(t.TEXTURE0),t.bindTexture(t.TEXTURE_2D,r),t.uniform1i(d,0),t.activeTexture(t.TEXTURE1),t.bindTexture(t.TEXTURE_2D,s),t.uniform1i(m,1),n!=null&&n.uvRange&&(n!=null&&n.sRange)){const p=t.getUniformLocation(o,"u_range_u_v"),_=t.getUniformLocation(o,"u_range_s");t.uniform2f(p,n.uvRange[0],n.uvRange[1]),t.uniform2f(_,n.sRange[0],n.sRange[1])}const y=e.getBoundPixel(),u=e.map.getZoom()+1,g=e.getWorldCopy(y,u);for(const p of g){const _=(p[0]-y[0])*e.ratio,b=(p[1]-y[3])*e.ratio,w=p[2]*e.ratio,[x,L,S,N]=[_,w+_,b,w+b],T=new Float32Array([x,S,L,S,x,N,x,N,L,S,L,N]);t.bindBuffer(t.ARRAY_BUFFER,l),t.bufferData(t.ARRAY_BUFFER,T,t.STATIC_DRAW),t.drawArrays(t.TRIANGLES,0,6)}}catch(f){console.log(`render failed...${f}`)}}}drawParticle(e,t,o,r,s){var l,n;t&&(t==null||t.viewport(0,0,(l=t==null?void 0:t.canvas)==null?void 0:l.width,(n=t==null?void 0:t.canvas)==null?void 0:n.height),t.disable(t.DEPTH_TEST),t.disable(t.STENCIL_TEST),t.activeTexture(t.TEXTURE0),t.bindTexture(t.TEXTURE_2D,o),t.activeTexture(t.TEXTURE1),t.bindTexture(t.TEXTURE_2D,r.texture0),this.renderScreen(e,t,r,s),this.updateParticles(e,t,r,s))}renderScreen(e,t,o,r){t.bindFramebuffer(t.FRAMEBUFFER,o.frameBuffer),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,o.screenTexture,0),t.viewport(0,0,t.canvas.width,t.canvas.height),this.renderScreenTexture(t,o.backgroundTexture,o.screen,o.quadBuffer,.95),this.renderParticles(e,t,o,r),t.bindFramebuffer(t.FRAMEBUFFER,null),this.renderScreenTexture(t,o.screenTexture,o.screen,o.quadBuffer,1);const s=o.backgroundTexture;o.backgroundTexture=o.screenTexture,o.screenTexture=s}renderScreenTexture(e,t,o,r,s){e&&(e.useProgram(o.program),e.bindBuffer(e.ARRAY_BUFFER,r),e.enableVertexAttribArray(o.a_pos),e.vertexAttribPointer(o.a_pos,2,e.FLOAT,!1,0,0),e.activeTexture(e.TEXTURE2),e.bindTexture(e.TEXTURE_2D,t),e.uniform1i(o.u_screen,2),e.uniform1f(o.u_opacity,s),e.drawArrays(e.TRIANGLES,0,6))}renderParticles(e,t,o,r){if(t){t.useProgram(o.particle.program),t.bindBuffer(t.ARRAY_BUFFER,o.indexBuffer),t.enableVertexAttribArray(o.particle.a_index),t.vertexAttribPointer(o.particle.a_index,1,t.FLOAT,!1,0,0),t.activeTexture(t.TEXTURE2),t.bindTexture(t.TEXTURE_2D,o.color.texture),t.uniform1i(o.particle.u_factor,0),t.uniform1i(o.particle.u_particles,1),t.uniform1i(o.particle.u_color_ramp,2),t.uniform1f(o.particle.u_particles_resolution,o.resolution*e.ratio),t.uniform1f(o.particle.u_point,e.ratio);const s=e.getBoundRange();t.uniform4f(o.particle.u_viewport,s[0],s[1],s[2],s[3]),t.uniform2f(o.particle.u_factor_min,r.uvRange[0],r.uvRange[0]),t.uniform2f(o.particle.u_factor_max,r.uvRange[1],r.uvRange[1]),t.drawArrays(t.POINTS,0,o.total)}}updateParticles(e,t,o,r){var l,n;if(t){t.bindFramebuffer(t.FRAMEBUFFER,o.frameBuffer),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,o.texture1,0),t.viewport(0,0,o.resolution,o.resolution),t.useProgram(o.update.program),t.bindBuffer(t.ARRAY_BUFFER,o.quadBuffer),t.enableVertexAttribArray(o.update.a_pos),t.vertexAttribPointer(o.update.a_pos,2,t.FLOAT,!1,0,0),t.uniform1i(o.update.u_factor,0),t.uniform1i(o.update.u_particles,1);const c=e.getBoundRange();t.uniform4f(o.update.u_viewport,c[0],c[1],c[2],c[3]),t.uniform1f(o.update.u_rand_seed,Math.random()),t.uniform2f(o.update.u_factor_res,(l=o==null?void 0:o.image)==null?void 0:l.width,(n=o==null?void 0:o.image)==null?void 0:n.height),t.uniform2f(o.update.u_factor_min,r.uvRange[0],r.uvRange[0]),t.uniform2f(o.update.u_factor_max,r.uvRange[1],r.uvRange[1]),t.uniform1f(o.update.u_speed_factor,r.speedFactor*e.ratio),t.uniform1f(o.update.u_drop_rate,r.dropRate),t.uniform1f(o.update.u_drop_rate_bump,r.dropRateBump),t.drawArrays(t.TRIANGLES,0,6)}const s=o.texture0;o.texture0=o.texture1,o.texture1=s}resize(e,t){e.resize();const o=new Uint8Array(t.canvas.width*t.canvas.height*4).fill(0,0,t.canvas.width*t.canvas.height*4),r=this.createTexture(t,t.NEAREST,t.NEAREST,t.CLAMP_TO_EDGE,o,t.canvas.width,t.canvas.height),s=this.createTexture(t,t.NEAREST,t.NEAREST,t.CLAMP_TO_EDGE,o,t.canvas.width,t.canvas.height);return{screenTexture:r,backgroundTexture:s}}async loadImg(e){return new Promise(t=>{const o=new Blob([e],{type:e.type}),r=URL.createObjectURL(o),s=new Image;s.crossOrigin="anonymous",s.src=r,s.onload=()=>t(s)})}}class I{}V(I,"vertexSchema",`
2
2
  //canvas 坐标系上的坐标 (x, y)
3
3
  attribute vec2 a_position; //像素坐标
4
4
  attribute vec2 a_texCoord; //纹理坐标
@@ -201,4 +201,4 @@
201
201
  <path
202
202
  d="M420.66666667 959.17a16.08 16.08 0 0 1-15.91-13.49A15.89 15.89 0 0 1 415.50666667 928c1.49-0.55 38.88-14.76 72.79-65.52A354.55 354.55 0 0 1 162.66666667 509.17a450.14 450.14 0 0 1 450.5-450.5 16.07 16.07 0 0 1 15.91 13.48 15.88 15.88 0 0 1-10.75 17.66c-1.58 0.58-39.13 14.9-73.07 65.95A354.22 354.22 0 0 1 871.66666667 509.17a16 16 0 0 1-0.52 4.05A450.14 450.14 0 0 1 420.66666667 959.17zM554.80666667 94.72C351.57666667 123.2 194.66666667 298.21 194.66666667 509.17c0 177.08 144.06 321.74 321.13 322.48a16 16 0 0 1 14.07 23.49c-16.11 30.42-34.27 52.37-50.85 68C682.25666667 894.63 839.16666667 719.63 839.16666667 508.67a15.94 15.94 0 0 1 0.47-3.86C837.30666667 329.33 693.82666667 187 517.80666667 186.67A16 16 0 0 1 503.66666667 163.21c16.21-30.69 34.47-52.79 51.14-68.49z"
203
203
  fill="#ffffff" p-id="18386"></path>
204
- </svg>`,j=document.createElement("div");j.className="hurricane-hourly-marker",j.innerHTML=`<div class="${P.geometry.coordinates[1]>=0?"center north":"center south"}">${re}</div>`;const Q=new U.Marker(j).setLngLat(P.geometry.coordinates).addTo(this.map);this.interpolateMarkers.push(Q)}}else(R=this.map)!=null&&R.getSource(this.interpolateSource)&&((z=this.map)==null||z.getSource(this.interpolateSource).setData(this.empty))},handleClick(a){var s,l,n,c,h,f;const e=a.features[0],t=(l=(s=this.tropicals)==null?void 0:s.data)==null?void 0:l.features.filter(d=>{var m;return d.geometry.type==="LineString"&&d.properties.type==="forecast"&&d.properties.name===((m=e==null?void 0:e.properties)==null?void 0:m.name)});t.sort((d,m)=>{var y,u,g,p;return((y=d.properties)==null?void 0:y.model)==="cma"?-1:((u=d.properties)==null?void 0:u.model)==="jma"?((g=m.properties)==null?void 0:g.model)==="cma"?1:-1:d.properties.model==="ecmwf"?["jma","cma"].includes((p=m.properties)==null?void 0:p.model)?1:-1:0});const o=(c=(n=this.tropicals)==null?void 0:n.data)==null?void 0:c.features.filter(d=>{var m;return d.geometry.type==="LineString"&&d.properties.type==="history"&&d.properties.name===((m=e==null?void 0:e.properties)==null?void 0:m.name)});this.activeTropicals={name:(h=e==null?void 0:e.properties)==null?void 0:h.name,forecasts:t.map(d=>d.properties),history:(f=o[0])==null?void 0:f.properties},this.showTropicals=!0;const r=document.getElementById("active-tropical");this.activeTropicalsMarker?this.activeTropicalsMarker.setLngLat([a.lngLat.lng,a.lngLat.lat]):this.activeTropicalsMarker=new U.Marker(r).setLngLat([a.lngLat.lng,a.lngLat.lat]).setOffset([220,0]).addTo(this.map)},handleForecastToggle(a){var o,r,s,l,n,c;a.disabled=!a.disabled;const e=`${a.name}-${a.model}`,t=(r=(o=this.map)==null?void 0:o.getSource(this.source)._data)==null?void 0:r.features;t.forEach(h=>{h.properties.category===e&&(h.properties.disabled=a.disabled)}),this.interpolateData.forEach(h=>{h.properties.category===e&&(h.properties.disabled=a.disabled)}),(l=(s=this.map)==null?void 0:s.getSource(this.source))==null||l.setData(E.featureCollection(t)),(c=(n=this.map)==null?void 0:n.getSource(this.clusterSource))==null||c.setData(E.featureCollection(t)),this.handleDateChange()},handleStrikeProbability(a){this.$emit("tropicalProbability",a)},handleComputePolygons(a){const e=[];for(const t of a){const o=t.properties.wind,r={ne:o.r7ne>=0?o.r7ne:void 0,se:o.r7se>=0?o.r7se:void 0,sw:o.r7sw>=0?o.r7sw:void 0,nw:o.r7nw>=0?o.r7nw:void 0},s=this.handleComputeArc(t.geometry.coordinates,r,{...t.properties,level:7});e.push(s);const l={ne:o.r10ne>=0?o.r10ne:void 0,se:o.r10se>=0?o.r10se:void 0,sw:o.r10sw>=0?o.r10sw:void 0,nw:o.r10nw>=0?o.r10nw:void 0},n=this.handleComputeArc(t.geometry.coordinates,l,{...t.properties,level:10});e.push(n)}return e},handleComputeArc(a,e,t){var s;const o=[];for(const l in e){const n=e[l]??0;let c;switch(l){case"ne":c=E.lineArc(a,n*1.852,0,90,{steps:n>0?64:1});break;case"se":c=E.lineArc(a,n*1.852,90,180,{steps:n>0?64:1});break;case"sw":c=E.lineArc(a,n*1.852,180,270,{steps:n>0?64:1});break;case"nw":c=E.lineArc(a,n*1.852,270,360,{steps:n>0?64:1});break}o.push(...(s=c==null?void 0:c.geometry)==null?void 0:s.coordinates)}const r=E.lineString(o);return E.lineToPolygon(r,{properties:t})}}},Ee=a=>(i.pushScopeId("data-v-bb8414b4"),a=a(),i.popScopeId(),a),Qt={id:"active-tropical",class:"active-tropical"},ea={class:"header-box"},ta={class:"main"},aa={key:0},ia={class:"sub"},ra={id:"meteoBox",class:"main-box"},oa={class:"content"},sa={class:"row"},na={class:"col col-left",style:{"justify-content":"flex-start"}},la=Ee(()=>i.createElementVNode("label",null,"Wind speed : ",-1)),ca={class:"col col-right",style:{"justify-content":"flex-start"}},ha=Ee(()=>i.createElementVNode("label",null,"Pressure : ",-1)),da={class:"row"},pa={class:"col col-24",style:{"justify-content":"flex-start"}},ma=Ee(()=>i.createElementVNode("label",{style:{width:"max-content"}},"Forecast Models : ",-1)),ya={class:"forecast-models"},fa=["onClick"],ga=i.createStaticVNode('<div class="row" style="padding:0;height:1px;margin:10px 0;background:var(--idm-black-1);" data-v-bb8414b4></div><div class="row" style="padding:2px 10px;" data-v-bb8414b4><div class="legend" data-v-bb8414b4><div class="icon td" data-v-bb8414b4></div><div class="label" data-v-bb8414b4>TD</div></div><div class="legend" data-v-bb8414b4><div class="icon ts" data-v-bb8414b4></div><div class="label" data-v-bb8414b4>TS</div></div><div class="legend" data-v-bb8414b4><div class="icon sts" data-v-bb8414b4></div><div class="label" data-v-bb8414b4>STS</div></div><div class="legend" data-v-bb8414b4><div class="icon ty" data-v-bb8414b4></div><div class="label" data-v-bb8414b4>TY</div></div><div class="legend" data-v-bb8414b4><div class="icon sty" data-v-bb8414b4></div><div class="label" data-v-bb8414b4>STY</div></div><div class="legend" data-v-bb8414b4><div class="icon supper-ty" data-v-bb8414b4></div><div class="label" data-v-bb8414b4>Super TY</div></div></div><div class="row" style="padding:2px 10px;" data-v-bb8414b4><div class="legend" data-v-bb8414b4><div class="icon history" data-v-bb8414b4></div><div class="label" data-v-bb8414b4>History</div></div><div class="legend" data-v-bb8414b4><div class="icon r7" data-v-bb8414b4></div><div class="label" data-v-bb8414b4>35kts Radii</div></div><div class="legend" data-v-bb8414b4><div class="icon r10" data-v-bb8414b4></div><div class="label" data-v-bb8414b4>50kts Radii</div></div></div>',3),ua={class:"more"};function ba(a,e,t,o,r,s){var l,n,c,h,f,d,m,y,u,g,p,_,b,w,x;return i.withDirectives((i.openBlock(),i.createElementBlock("div",Qt,[i.createElementVNode("div",ea,[i.createElementVNode("div",{class:"iconfont close-btn",onClick:e[0]||(e[0]=L=>r.showTropicals=!1)},""),i.createElementVNode("div",ta,[(n=(l=r.activeTropicals)==null?void 0:l.history)!=null&&n.level?(i.openBlock(),i.createElementBlock("span",aa,i.toDisplayString((h=(c=r.activeTropicals)==null?void 0:c.history)==null?void 0:h.level)+" , ",1)):i.createCommentVNode("",!0),i.createTextVNode(i.toDisplayString((f=r.activeTropicals)==null?void 0:f.name),1)]),i.createElementVNode("div",ia," Last update: "+i.toDisplayString(s.computeTime(((m=(d=r.activeTropicals)==null?void 0:d.history)==null?void 0:m.updated)||((g=(u=(y=r.activeTropicals)==null?void 0:y.forecasts)==null?void 0:u.filter(L=>!L.disabled)[0])==null?void 0:g.date))),1)]),i.createElementVNode("div",ra,[i.createElementVNode("div",oa,[i.createElementVNode("div",sa,[i.createElementVNode("div",na,[la,i.createElementVNode("span",null,i.toDisplayString(((_=(p=r.activeTropicals)==null?void 0:p.history)==null?void 0:_.kts)||"-")+"[kts]",1)]),i.createElementVNode("div",ca,[ha,i.createElementVNode("span",null,i.toDisplayString(((w=(b=r.activeTropicals)==null?void 0:b.history)==null?void 0:w.pressure)||"-")+"[hPa]",1)])]),i.createElementVNode("div",da,[i.createElementVNode("div",pa,[ma,i.createElementVNode("div",ya,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList((x=r.activeTropicals)==null?void 0:x.forecasts,(L,S)=>{var N,T,$,R;return i.openBlock(),i.createElementBlock("div",{key:S,class:i.normalizeClass(["model",L.disabled?"":"active",S>0&&S<((T=(N=r.activeTropicals)==null?void 0:N.forecasts)==null?void 0:T.length)-1&&((R=($=r.activeTropicals)==null?void 0:$.forecasts)==null?void 0:R.length)>2?"center-child":""]),onClick:z=>s.handleForecastToggle(L)},[i.createElementVNode("span",{class:i.normalizeClass(L.model)},i.toDisplayString(L.model),3)],10,fa)}),128))])])]),ga]),i.createElementVNode("div",ua,[i.createElementVNode("div",{class:"button",onClick:e[1]||(e[1]=L=>s.handleStrikeProbability(r.activeTropicals))},"Strike Probability >>")])])],512)),[[i.vShow,r.showTropicals]])}const xe=C(Kt,[["render",ba],["__scopeId","data-v-bb8414b4"]]),eo="",_a={name:"IdmPrecip3h",props:{factor:{type:Object},viewport:{type:Object},bottom:{type:String,default:"70px"},toggleVersion:{type:Number}},data(){return{program:void 0,context:void 0,texture:void 0,rampColor:void 0,aPositionBuffer:void 0,webgl:new Y,etime:void 0,right:10}},watch:{"factor.version":{handler(){var a;(a=this.factor)!=null&&a.active?this.handleRender():this.handleClear()},deep:!0},toggleVersion:{handler(){var a,e;this.right=(((a=document.getElementsByClassName("available-layers-show")[0])==null?void 0:a.clientWidth)||0)+(((e=document.getElementsByClassName("fleet-list-container")[0])==null?void 0:e.clientWidth)||0)+10},immediate:!0}},methods:{handleRender(){if(!this.viewport)setTimeout(()=>{this.handleRender()},500);else if(this.factor){const a=new Date().valueOf();let e=0,t=0;this.handleDraw(),t=new Date().valueOf()-(a+e),console.log("[precip3h] add elapsed: ",t,", total: ",e+=t)}},handleClear(){this.context=void 0,this.etime=void 0,this.viewport.toggle(!1)},handleSetup(){if(!this.context){this.context=this.viewport.rampColorCanvas.getContext("webgl");const a=[[0,"rgba(59, 126, 162, 0)"],[14/255,"rgba(84,170,230, 0)"],[15/255,"rgba(172, 210, 255, 0.8)"],[20/255,"rgba(51,202,248,0.8)"],[30/255,"rgba(3,248,103,0.8)"],[49/255,"rgba(14,201,3,0.8)"],[57/255,"rgba(190,226,2,0.8)"],[73/255,"rgba(248,1,1,0.8)"],[82/255,"rgba(197,5,58,0.8)"],[1,"rgba(197,5,58,0.8)"]];this.rampColor=this.webgl.setup(this.context,a);const{program:e,aPositionBuffer:t}=this.webgl.bind(this.context,I.vertexSchema,I.fragmentSchema);this.program=e,this.aPositionBuffer=t}},async handleDraw(){if(this.handleSetup(),this.etime!==this.factor.etime){this.etime=this.factor.etime;const a=await this.webgl.loadImg(this.factor.raw);this.texture=this.webgl.createTexture(this.context,this.context.NEAREST,this.context.LINEAR,this.context.CLAMP_TO_EDGE,a)}this.webgl.draw(this.viewport,this.context,this.program,this.texture,this.rampColor.texture,this.aPositionBuffer),this.viewport.toggle(!0)}}},X=a=>(i.pushScopeId("data-v-42b977ed"),a=a(),i.popScopeId(),a),La={key:0},wa=[X(()=>i.createElementVNode("span",null,"mm",-1)),X(()=>i.createElementVNode("span",null,"1.5",-1)),X(()=>i.createElementVNode("span",null,"2",-1)),X(()=>i.createElementVNode("span",null,"3",-1)),X(()=>i.createElementVNode("span",null,"7",-1)),X(()=>i.createElementVNode("span",null,"10",-1)),X(()=>i.createElementVNode("span",null,"20",-1)),X(()=>i.createElementVNode("span",null,"30",-1))];function va(a,e,t,o,r,s){var l;return(l=t.factor)!=null&&l.active?(i.openBlock(),i.createElementBlock("div",La,[i.createElementVNode("div",{class:"legend-bars flex-center",style:i.normalizeStyle([{position:"absolute"},{right:r.right+"px",bottom:t.bottom}])},wa,4)])):i.createCommentVNode("",!0)}const Ea=C(_a,[["render",va],["__scopeId","data-v-42b977ed"]]),co="",xa={name:"IdmVisibility",props:{factor:{type:Object},viewport:{type:Object},bottom:{type:String,default:"70px"},toggleVersion:{type:Number}},data(){return{program:void 0,context:void 0,texture:void 0,rampColor:void 0,aPositionBuffer:void 0,webgl:new Y,etime:void 0}},watch:{"factor.version":{handler(){var a;(a=this.factor)!=null&&a.active?this.handleRender():this.handleClear()},deep:!0},toggleVersion:{handler(){var a,e;this.right=(((a=document.getElementsByClassName("available-layers-show")[0])==null?void 0:a.clientWidth)||0)+(((e=document.getElementsByClassName("fleet-list-container")[0])==null?void 0:e.clientWidth)||0)+10},immediate:!0}},methods:{handleRender(){if(!this.viewport)setTimeout(()=>{this.handleRender()},500);else if(this.factor){const a=new Date().valueOf();let e=0,t=0;this.handleDraw(),t=new Date().valueOf()-(a+e),console.log("[visibility] add elapsed: ",t,", total: ",e+=t)}},handleClear(){this.context=void 0,this.etime=void 0,this.viewport.toggle(!1)},handleSetup(){if(!this.context){this.context=this.viewport.rampColorCanvas.getContext("webgl");const a=[[0,"rgba(189,50,160,0.8)"],[8/255,"rgba(208,56,56,0.8)"],[27/255,"rgba(190,226,2,0.8)"],[60/255,"rgba(3,236,118,0.8)"],[160/255,"rgba(172, 210,255,0.8)"],[161/255,"rgba(172, 210,255,0)"],[1,"rgba(144,144,144,0)"]];this.rampColor=this.webgl.setup(this.context,a);const{program:e,aPositionBuffer:t}=this.webgl.bind(this.context,I.vertexSchema,I.fragmentSchema);this.program=e,this.aPositionBuffer=t}},async handleDraw(){if(this.handleSetup(),this.etime!==this.factor.etime){this.etime=this.factor.etime;const a=await this.webgl.loadImg(this.factor.raw);this.texture=this.webgl.createTexture(this.context,this.context.NEAREST,this.context.LINEAR,this.context.CLAMP_TO_EDGE,a)}this.webgl.draw(this.viewport,this.context,this.program,this.texture,this.rampColor.texture,this.aPositionBuffer),this.viewport.toggle(!0)}}},ee=a=>(i.pushScopeId("data-v-2a5fbadd"),a=a(),i.popScopeId(),a),Ca={key:0},Sa=[ee(()=>i.createElementVNode("span",null,"nm",-1)),ee(()=>i.createElementVNode("span",null,"0",-1)),ee(()=>i.createElementVNode("span",null,"0.5",-1)),ee(()=>i.createElementVNode("span",null,"1.5",-1)),ee(()=>i.createElementVNode("span",null,"3",-1)),ee(()=>i.createElementVNode("span",null,"9",-1))];function ka(a,e,t,o,r,s){var l;return(l=t.factor)!=null&&l.active?(i.openBlock(),i.createElementBlock("div",Ca,[i.createElementVNode("div",{class:"legend-bars flex-center",style:i.normalizeStyle([{position:"absolute"},{right:a.right+"px",bottom:t.bottom}])},Sa,4)])):i.createCommentVNode("",!0)}const Pa=C(xa,[["render",ka],["__scopeId","data-v-2a5fbadd"]]),uo="",Na={name:"IdmWaterTemp",props:{factor:{type:Object},viewport:{type:Object},bottom:{type:String,default:"70px"},toggleVersion:{type:Number}},data(){return{program:void 0,context:void 0,texture:void 0,rampColor:void 0,aPositionBuffer:void 0,webgl:new Y,etime:void 0,right:10}},watch:{"factor.version":{handler(){var a;(a=this.factor)!=null&&a.active?this.handleRender():this.handleClear()},deep:!0},toggleVersion:{handler(){var a,e;this.right=(((a=document.getElementsByClassName("available-layers-show")[0])==null?void 0:a.clientWidth)||0)+(((e=document.getElementsByClassName("fleet-list-container")[0])==null?void 0:e.clientWidth)||0)+10},immediate:!0}},methods:{handleRender(){if(!this.viewport)setTimeout(()=>{this.handleRender()},500);else if(this.factor){const a=new Date().valueOf();let e=0,t=0;this.handleDraw(),t=new Date().valueOf()-(a+e),console.log("[water-temp] add elapsed: ",t,", total: ",e+=t)}},handleClear(){this.context=void 0,this.etime=void 0,this.viewport.toggle(!1)},handleSetup(){if(!this.context){this.context=this.viewport.rampColorCanvas.getContext("webgl");const a=[[0,"rgba(95, 143, 197)"],[46/255,"rgba(95, 143, 197)"],[69/255,"rgb(80, 140, 62)"],[92/255,"rgb(121, 146, 28)"],[115/255,"rgb(171, 161, 14)"],[138/255,"rgb(223, 177, 69)"],[161/255,"rgb(243, 150, 6)"],[184/255,"rgb(236, 95, 21)"],[207/255,"rgb(190, 65, 18)"],[230/255,"rgb(138, 43, 10)"],[1,"rgb(138, 43, 10)"]];this.rampColor=this.webgl.setup(this.context,a);const{program:e,aPositionBuffer:t}=this.webgl.bind(this.context,I.vertexSchema,I.fragmentSchema);this.program=e,this.aPositionBuffer=t}},async handleDraw(){if(this.handleSetup(),this.etime!==this.factor.etime){this.etime=this.factor.etime;const a=await this.webgl.loadImg(this.factor.raw);this.texture=this.webgl.createTexture(this.context,this.context.NEAREST,this.context.LINEAR,this.context.CLAMP_TO_EDGE,a)}this.webgl.draw(this.viewport,this.context,this.program,this.texture,this.rampColor.texture,this.aPositionBuffer),this.viewport.toggle(!0)}}},te=a=>(i.pushScopeId("data-v-5b28deaf"),a=a(),i.popScopeId(),a),Ta={key:0},Va=[te(()=>i.createElementVNode("span",null,"°C",-1)),te(()=>i.createElementVNode("span",null,"0",-1)),te(()=>i.createElementVNode("span",null,"10",-1)),te(()=>i.createElementVNode("span",null,"20",-1)),te(()=>i.createElementVNode("span",null,"30",-1)),te(()=>i.createElementVNode("span",null,"40",-1))];function Ia(a,e,t,o,r,s){var l;return(l=t.factor)!=null&&l.active?(i.openBlock(),i.createElementBlock("div",Ta,[i.createElementVNode("div",{class:"legend-bars flex-center",style:i.normalizeStyle([{position:"absolute"},{right:r.right+"px",bottom:t.bottom}])},Va,4)])):i.createCommentVNode("",!0)}const $a=C(Na,[["render",Ia],["__scopeId","data-v-5b28deaf"]]),xo="",Ra={name:"IdmTemp",props:{factor:{type:Object},viewport:{type:Object},bottom:{type:String,default:"70px"},toggleVersion:{type:Number}},data(){return{program:void 0,context:void 0,texture:void 0,rampColor:void 0,aPositionBuffer:void 0,webgl:new Y,etime:void 0,right:10}},watch:{"factor.version":{handler(){var a;(a=this.factor)!=null&&a.active?this.handleRender():this.handleClear()},deep:!0},toggleVersion:{handler(){var a,e;this.right=(((a=document.getElementsByClassName("available-layers-show")[0])==null?void 0:a.clientWidth)||0)+(((e=document.getElementsByClassName("fleet-list-container")[0])==null?void 0:e.clientWidth)||0)+10},immediate:!0}},methods:{handleRender(){if(!this.viewport)setTimeout(()=>{this.handleRender()},500);else if(this.factor){const a=new Date().valueOf();let e=0,t=0;this.handleDraw(),t=new Date().valueOf()-(a+e),console.log("[water-temp] add elapsed: ",t,", total: ",e+=t)}},handleClear(){this.context=void 0,this.etime=void 0,this.viewport.toggle(!1)},handleSetup(){if(!this.context){this.context=this.viewport.rampColorCanvas.getContext("webgl");const a=[[0,"rgb(149, 137, 211)"],[100/255,"rgb(149, 137, 211)"],[110/255,"rgb(150, 209, 216)"],[120/255,"rgb(129, 204, 197)"],[130/255,"rgb(103, 180, 186)"],[140/255,"rgb(95, 143, 197)"],[150/255,"rgb(80, 140, 62)"],[160/255,"rgb(121, 146, 28)"],[170/255,"rgb(171, 161, 14)"],[180/255,"rgb(223, 177, 6)"],[190/255,"rgb(243, 150, 6)"],[200/255,"rgb(236, 95, 21)"],[210/255,"rgb(190, 65, 18)"],[220/255,"rgb(138, 43, 10)"],[1,"rgb(138, 43, 10)"]];this.rampColor=this.webgl.setup(this.context,a);const{program:e,aPositionBuffer:t}=this.webgl.bind(this.context,I.vertexSchema,I.fragmentSchema);this.program=e,this.aPositionBuffer=t}},async handleDraw(){if(this.handleSetup(),this.etime!==this.factor.etime){this.etime=this.factor.etime;const a=await this.webgl.loadImg(this.factor.raw);this.texture=this.webgl.createTexture(this.context,this.context.NEAREST,this.context.LINEAR,this.context.CLAMP_TO_EDGE,a)}this.webgl.draw(this.viewport,this.context,this.program,this.texture,this.rampColor.texture,this.aPositionBuffer),this.viewport.toggle(!0)}}},Z=a=>(i.pushScopeId("data-v-72cd9cf1"),a=a(),i.popScopeId(),a),Da={key:0},Ba=[Z(()=>i.createElementVNode("span",null,"°C",-1)),Z(()=>i.createElementVNode("span",null,"-20",-1)),Z(()=>i.createElementVNode("span",null,"-10",-1)),Z(()=>i.createElementVNode("span",null,"0",-1)),Z(()=>i.createElementVNode("span",null,"10",-1)),Z(()=>i.createElementVNode("span",null,"20",-1)),Z(()=>i.createElementVNode("span",null,"30",-1)),Z(()=>i.createElementVNode("span",null,"40",-1))];function Aa(a,e,t,o,r,s){var l;return(l=t.factor)!=null&&l.active?(i.openBlock(),i.createElementBlock("div",Da,[i.createElementVNode("div",{class:"legend-bars flex-center",style:i.normalizeStyle([{position:"absolute"},{right:r.right+"px",bottom:t.bottom}])},Ba,4)])):i.createCommentVNode("",!0)}const za=C(Ra,[["render",Aa],["__scopeId","data-v-72cd9cf1"]]),$o="",Ma={name:"IdmArctic",props:{factor:{type:Object},viewport:{type:Object},bottom:{type:String,default:"70px"},toggleVersion:{type:Number}},data(){return{program:void 0,context:void 0,texture:void 0,rampColor:void 0,aPositionBuffer:void 0,webgl:new Y,etime:void 0,right:10}},watch:{"factor.version":{handler(){var a;(a=this.factor)!=null&&a.active?this.handleRender():this.handleClear()},deep:!0},toggleVersion:{handler(){var a,e;this.right=(((a=document.getElementsByClassName("available-layers-show")[0])==null?void 0:a.clientWidth)||0)+(((e=document.getElementsByClassName("fleet-list-container")[0])==null?void 0:e.clientWidth)||0)+10},immediate:!0}},methods:{handleRender(){if(!this.viewport)setTimeout(()=>{this.handleRender()},500);else if(this.factor){const a=new Date().valueOf();let e=0,t=0;this.handleDraw(),t=new Date().valueOf()-(a+e),console.log("[water-temp] add elapsed: ",t,", total: ",e+=t)}},handleClear(){this.context=void 0,this.etime=void 0,this.viewport.toggle(!1)},handleSetup(){if(!this.context){this.context=this.viewport.rampColorCanvas.getContext("webgl");const a=[[0,"rgba(76, 165, 228, 0)"],[50/255,"rgba(76, 165, 228, 0)"],[51/255,"rgb(76, 165, 228)"],[102/255,"rgb(129, 204, 197)"],[153/255,"rgb(150, 209, 216)"],[204/255,"rgb(180, 209, 216)"],[1,"rgb(180, 209, 216)"]];this.rampColor=this.webgl.setup(this.context,a);const{program:e,aPositionBuffer:t}=this.webgl.bind(this.context,I.vertexSchema,I.fragmentSchema);this.program=e,this.aPositionBuffer=t}},async handleDraw(){if(this.handleSetup(),this.etime!==this.factor.etime){this.etime=this.factor.etime;const a=await this.webgl.loadImg(this.factor.raw);this.texture=this.webgl.createTexture(this.context,this.context.NEAREST,this.context.LINEAR,this.context.CLAMP_TO_EDGE,a)}this.webgl.draw(this.viewport,this.context,this.program,this.texture,this.rampColor.texture,this.aPositionBuffer),this.viewport.toggle(!0)}}},ae=a=>(i.pushScopeId("data-v-2092df03"),a=a(),i.popScopeId(),a),Oa={key:0},Wa=[ae(()=>i.createElementVNode("span",null,"m",-1)),ae(()=>i.createElementVNode("span",null,"0",-1)),ae(()=>i.createElementVNode("span",null,"0.5",-1)),ae(()=>i.createElementVNode("span",null,"1",-1)),ae(()=>i.createElementVNode("span",null,"1.5",-1)),ae(()=>i.createElementVNode("span",null,"2",-1))];function ja(a,e,t,o,r,s){var l;return(l=t.factor)!=null&&l.active?(i.openBlock(),i.createElementBlock("div",Oa,[i.createElementVNode("div",{class:"legend-bars flex-center",style:i.normalizeStyle([{position:"absolute"},{right:r.right+"px",bottom:t.bottom}])},Wa,4)])):i.createCommentVNode("",!0)}const Fa=C(Ma,[["render",ja],["__scopeId","data-v-2092df03"]]),Oo="",Ua={name:"IdmPoint",emits:["point","more"],props:{map:{type:Object},show:{type:Boolean},meteo:{type:Object}},data(){return{showMeteo:!1,meteoMarker:void 0,helper:v.CompanyHelper}},watch:{show:{handler(){this.handleBind()},immediate:!0},map:{handler(){this.map&&this.show&&this.handleBind()}},meteo:{handler(){this.meteo?(this.showMeteo=!0,this.handleRender()):this.showMeteo=!1}}},computed:{computeTime(){return function(a){return a?`${W(a).utc().format("MMM-DD,HHmm[Z]")}`:"-"}},computeLat(){return function(a,e=4){return v.LngLatHelper.lat2pretty(a,e).pretty}},computeLng(){return function(a,e=4){return v.LngLatHelper.lng2pretty(a,e).pretty}},roundPrecision(){return function(a,e=4){return isNaN(a)?"-":v.LngLatHelper.roundPrecision(a,e)}}},methods:{handleBind(){var a,e;this.show?(a=this.map)==null||a.on("click",this.handleClick):((e=this.map)==null||e.off("click",this.handleClick),this.showMeteo=!1)},handleClick(a){a.originalEvent.stopPropagation();const e=a.originalEvent.target.className;e.indexOf("close")>-1?this.showMeteo=!1:e==="more"?this.$emit("more",this.meteo):this.$emit("point",a.lngLat)},handleRender(){var a;if(this.meteo){const e=document.getElementById("point-meteo");this.meteoMarker?(a=this.meteoMarker)==null||a.setLngLat([this.meteo.lng,this.meteo.lat]):this.meteoMarker=new U.Marker(e).setLngLat([this.meteo.lng,this.meteo.lat]).addTo(this.map)}}}},M=a=>(i.pushScopeId("data-v-a7923724"),a=a(),i.popScopeId(),a),Ha={id:"point-meteo",class:"point-meteo"},Ga={class:"meteo-box"},Xa={class:"header-box"},Za={class:"main"},Ja={class:"sub"},qa={class:"main-box"},Ya={class:"flex-space"},Ka=M(()=>i.createElementVNode("label",null,"Wind",-1)),Qa={class:"flex-space"},ei=M(()=>i.createElementVNode("label",null,"Wind.Wave",-1)),ti={class:"flex-space"},ai=M(()=>i.createElementVNode("label",null,"Swell",-1)),ii={class:"flex-space"},ri=M(()=>i.createElementVNode("label",null,"Sig.Wave",-1)),oi={class:"flex-space"},si=M(()=>i.createElementVNode("label",null,"Current",-1)),ni={class:"flex-space"},li=M(()=>i.createElementVNode("label",null,"Precip",-1)),ci={class:"flex-space"},hi=M(()=>i.createElementVNode("label",null,"Visibility",-1)),di={class:"flex-space"},pi=M(()=>i.createElementVNode("label",null,"Temp",-1)),mi={class:"flex-space"},yi=M(()=>i.createElementVNode("label",null,"Water Temp",-1)),fi={key:0,class:"flex-space",style:{"justify-content":"flex-end"}},gi=[M(()=>i.createElementVNode("span",{class:"more"},"More >>",-1))];function ui(a,e,t,o,r,s){var l,n,c,h,f,d,m,y,u,g,p,_,b,w,x,L,S,N,T,$,R,z,O,J,ie,q,P,B,re,j,Q,oe,se,ne,le,ce,he,de,pe,me,ye,fe,ge,ue,be,_e,Le;return i.withDirectives((i.openBlock(),i.createElementBlock("div",Ha,[i.createElementVNode("div",Ga,[i.createElementVNode("div",Xa,[i.createElementVNode("div",{class:"iconfont close",onClick:e[0]||(e[0]=Se=>r.showMeteo=!1)},""),i.createElementVNode("div",Za,i.toDisplayString(s.computeLat((l=t.meteo)==null?void 0:l.lat))+","+i.toDisplayString(s.computeLng((n=t.meteo)==null?void 0:n.lng)),1),i.createElementVNode("div",Ja,i.toDisplayString(s.computeTime((c=t.meteo)==null?void 0:c.utc)),1)]),i.createElementVNode("div",qa,[i.createElementVNode("div",Ya,[Ka,i.createElementVNode("span",null,i.toDisplayString(((f=(h=t.meteo)==null?void 0:h.wind)==null?void 0:f.direction)||"-")+"/"+i.toDisplayString(s.roundPrecision((m=(d=t.meteo)==null?void 0:d.wind)==null?void 0:m.kts,1))+"[kts]/"+i.toDisplayString((u=(y=t.meteo)==null?void 0:y.wind)==null?void 0:u.scale)+"[BF]/"+i.toDisplayString(s.roundPrecision((p=(g=t.meteo)==null?void 0:g.gusts)==null?void 0:p.kts,1))+"[kts]",1)]),i.createElementVNode("div",Qa,[ei,i.createElementVNode("span",null,i.toDisplayString(((w=(b=(_=t.meteo)==null?void 0:_.wave)==null?void 0:b.wd)==null?void 0:w.direction)||"-")+"/"+i.toDisplayString(s.roundPrecision((S=(L=(x=t.meteo)==null?void 0:x.wave)==null?void 0:L.wd)==null?void 0:S.height,1))+"[m]/"+i.toDisplayString(s.roundPrecision(($=(T=(N=t.meteo)==null?void 0:N.wave)==null?void 0:T.wd)==null?void 0:$.period,1))+"[s]",1)]),i.createElementVNode("div",ti,[ai,i.createElementVNode("span",null,i.toDisplayString(((O=(z=(R=t.meteo)==null?void 0:R.wave)==null?void 0:z.swell)==null?void 0:O.direction)||"-")+"/"+i.toDisplayString(s.roundPrecision((q=(ie=(J=t.meteo)==null?void 0:J.wave)==null?void 0:ie.swell)==null?void 0:q.height,1))+"[m]/"+i.toDisplayString(s.roundPrecision((re=(B=(P=t.meteo)==null?void 0:P.wave)==null?void 0:B.swell)==null?void 0:re.period,1))+"[s]",1)]),i.createElementVNode("div",ii,[ri,i.createElementVNode("span",null,i.toDisplayString(((oe=(Q=(j=t.meteo)==null?void 0:j.wave)==null?void 0:Q.sig)==null?void 0:oe.direction)||"-")+"/"+i.toDisplayString(s.roundPrecision((le=(ne=(se=t.meteo)==null?void 0:se.wave)==null?void 0:ne.sig)==null?void 0:le.height,1))+"[m]/"+i.toDisplayString(s.roundPrecision((de=(he=(ce=t.meteo)==null?void 0:ce.wave)==null?void 0:he.sig)==null?void 0:de.period,1))+"[s]",1)]),i.createElementVNode("div",oi,[si,i.createElementVNode("span",null,i.toDisplayString(((me=(pe=t.meteo)==null?void 0:pe.current)==null?void 0:me.direction)||"-")+"/"+i.toDisplayString(s.roundPrecision((fe=(ye=t.meteo)==null?void 0:ye.current)==null?void 0:fe.kts,2))+"[kts]",1)]),i.createElementVNode("div",ni,[li,i.createElementVNode("span",null,i.toDisplayString(s.roundPrecision((ue=(ge=t.meteo)==null?void 0:ge.precip)==null?void 0:ue.inter6h,2))+"[mm]",1)]),i.createElementVNode("div",ci,[hi,i.createElementVNode("span",null,i.toDisplayString(s.roundPrecision(((be=t.meteo)==null?void 0:be.visibility)/1852,0))+"[nm]",1)]),i.createElementVNode("div",di,[pi,i.createElementVNode("span",null,i.toDisplayString(s.roundPrecision((_e=t.meteo)==null?void 0:_e.temp,0))+"[°C]",1)]),i.createElementVNode("div",mi,[yi,i.createElementVNode("span",null,i.toDisplayString(s.roundPrecision((Le=t.meteo)==null?void 0:Le.waterTemp,2))+"[°C]",1)])]),a.$attrs.permission&r.helper.LEVEL.Prime?(i.openBlock(),i.createElementBlock("div",fi,gi)):i.createCommentVNode("",!0)])],512)),[[i.vShow,r.showMeteo]])}const bi=C(Ua,[["render",ui],["__scopeId","data-v-a7923724"]]),_i={name:"IdmWarZone",props:{map:{type:Object},zone:{type:Object},beforeLayer:{type:String}},data(){return{source:"war-zone-source",zoneLayer:"war-zone-layer",zoneLabelLayer:"war-zone-label-layer"}},watch:{zone:{handler(){this.handleRender()}}},methods:{handleRender(){this.map?(this.handleClear(),this.zone&&(this.map.addSource(this.source,{type:"geojson",data:this.zone}),this.map.addLayer({id:this.zoneLayer,type:"fill",source:this.source,filter:["==","$type","Polygon"],paint:{"fill-outline-color":"silver","fill-color":"#f44336","fill-opacity":.4}},this.beforeLayer),this.map.addLayer({id:this.zoneLayer+"-border",type:"line",source:this.source,filter:["==","$type","Polygon"],paint:{"line-width":1,"line-opacity":1,"line-color":"#f44336"}},this.beforeLayer),this.map.addLayer({id:this.zoneLabelLayer,type:"symbol",source:this.source,filter:["==","$type","Point"],layout:{"symbol-placement":"point","icon-size":.1,"icon-image":"identify","text-anchor":"top","text-field":"{lbl}","text-rotation-alignment":"viewport","text-size":10,"text-offset":[0,-1]},paint:{"icon-opacity":.8,"text-color":"#000","text-halo-color":"#fff","text-halo-width":1}}))):setTimeout(()=>{this.handleRender()},500)},handleClear(){this.map.getLayer(this.zoneLayer)&&this.map.removeLayer(this.zoneLayer),this.map.getLayer(this.zoneLayer+"-border")&&this.map.removeLayer(this.zoneLayer+"-border"),this.map.getLayer(this.zoneLabelLayer)&&this.map.removeLayer(this.zoneLabelLayer),this.map.getSource(this.source)&&this.map.removeSource(this.source)}}};function Li(a,e,t,o,r,s){return i.openBlock(),i.createElementBlock("div")}const wi=C(_i,[["render",Li]]),vi={name:"IdmGmdssArea",props:{map:{type:Object},area:{type:Object},beforeLayer:{type:String}},data(){return{source:"gmdss-area-source",areaLayer:"gmdss-area-layer",areaLabelLayer:"gmdss-area-label-layer"}},watch:{area:{handler(){this.handleRender()}}},methods:{handleRender(){this.map?(this.handleClear(),this.area&&(this.map.addSource(this.source,{type:"geojson",data:this.area}),this.map.addLayer({id:this.areaLayer,type:"fill",source:this.source,filter:["==","$type","Polygon"],paint:{"fill-outline-color":"silver","fill-opacity":.5,"fill-color":["match",["get","val"],"AreaI","#EB8996","AreaII","#6F448B","AreaIII","#3E8BD3","AreaIV","#5EBCC4","AreaV","#00AAE7","AreaVI","#9CCE6D","AreaVII","#F4AE00","AreaVIII","#EF9A85","AreaIX","#00AAA7","AreaX","#7AC49F","AreaXI","#DFDFDF","AreaXII","#FFF974","AreaXIII","#EF9A85","AreaXIV","#86A2D1","AreaXV","#EC8972","AreaXVI","#EAC2DA","AreaXVII","#B9C8E7","AreaXVIII","#BBA1C8","AreaXIX","#FAE0BD","AreaXX","#DBECC8","AreaXXI","#D496AF","#ffffff"]}},this.beforeLayer),this.map.addLayer({id:this.areaLabelLayer,type:"symbol",source:this.source,filter:["==","$type","Point"],layout:{"symbol-placement":"point","icon-size":.1,"icon-image":"identify","text-anchor":"top","text-field":"{lbl}","text-rotation-alignment":"viewport","text-size":12,"text-offset":[0,-3.5]},paint:{"icon-opacity":.8,"text-opacity":.8,"text-color":"#000"}}))):setTimeout(()=>{this.handleRender()},500)},handleClear(){this.map.getLayer(this.areaLayer)&&this.map.removeLayer(this.areaLayer),this.map.getLayer(this.areaLabelLayer)&&this.map.removeLayer(this.areaLabelLayer),this.map.getSource(this.source)&&this.map.removeSource(this.source)}}};function Ei(a,e,t,o,r,s){return i.openBlock(),i.createElementBlock("div")}const xi=C(vi,[["render",Ei]]),Ci={name:"IdmEcaZone",props:{map:{type:Object},zone:{type:Object},beforeLayer:{type:String}},data(){return{source:"eca-zone-source",zoneLayer:"eca-zone-layer",zoneLabelLayer:"eca-zone-label-layer"}},watch:{zone:{handler(){this.zone?this.handleRender():this.handleClear()}}},methods:{handleRender(){var a;this.map?(this.handleClear(),this.zone&&(this.map.getSource(this.source)?(a=this.map)==null||a.getSource(this.source).setData(this.zone):(this.map.addSource(this.source,{type:"geojson",data:this.zone}),this.map.addLayer({id:this.zoneLayer,type:"fill",source:this.source,filter:["all",["==","$type","Polygon"],["!=","disabled",!0]],paint:{"fill-outline-color":"silver","fill-opacity":.4,"fill-color":"#05f324"}}),this.map.addLayer({id:this.zoneLayer+"-border",type:"line",source:this.source,filter:["all",["==","$type","Polygon"],["!=","disabled",!0]],paint:{"line-color":"#04c021","line-width":1,"line-opacity":1}},this.beforeLayer),this.map.addLayer({id:this.zoneLabelLayer,type:"symbol",source:this.source,filter:["all",["==","$type","Point"],["!=","disabled",!0]],layout:{"symbol-placement":"point","icon-size":.1,"icon-image":"identify","text-max-width":16,"text-justify":"left","text-anchor":"top","text-field":"{lbl}","text-rotation-alignment":"viewport","text-size":10,"text-offset":[0,-3.5]},paint:{"icon-opacity":.8,"text-color":"#000","text-halo-color":"#fff","text-halo-width":1}})))):setTimeout(()=>{this.handleRender()},500)},handleClear(){this.map.getLayer(this.zoneLayer)&&this.map.removeLayer(this.zoneLayer),this.map.getLayer(this.zoneLayer+"-border")&&this.map.removeLayer(this.zoneLayer+"-border"),this.map.getLayer(this.zoneLabelLayer)&&this.map.removeLayer(this.zoneLabelLayer),this.map.getSource(this.source)&&this.map.removeSource(this.source)}}};function Si(a,e,t,o,r,s){return i.openBlock(),i.createElementBlock("div")}const ki=C(Ci,[["render",Si]]),jo="",Pi={name:"IdmAlertZone",props:{map:{type:Object},zone:{type:Object},beforeLayer:{type:String}},data(){return{source:"alert-zone-source",polygonLayer:"alert-zone-polygon-layer",polygonLabelLayer:"alert-zone-polygon-label-layer",lineLayer:"alert-zone-line-layer",lineLabelLayer:"alert-zone-line-label-layer",pointLayer:"alert-zone-point-layer",showZone:!1,form:{}}},watch:{zone:{handler(){var a,e;this.zone?(this.handleRender(),(a=this.map)==null||a.on("click",[this.polygonLabelLayer,this.lineLabelLayer,this.pointLayer],this.handleClick)):(this.handleClear(),(e=this.map)==null||e.off("click",[this.polygonLabelLayer,this.lineLabelLayer,this.pointLayer],this.handleClick))}}},methods:{handleClick(a){var o;const e=a.features[0],t=(o=this.zone)==null?void 0:o.features.filter(r=>{var s;return r.properties.id===((s=e==null?void 0:e.properties)==null?void 0:s.id)})[0];t&&(this.showZone=!0,this.form={...t.properties})},handleRender(){var a;this.map?(this.handleClear(),this.zone&&(this.map.getSource(this.source)?(a=this.map)==null||a.getSource(this.source).setData(this.zone):(this.map.addSource(this.source,{type:"geojson",data:this.zone}),this.map.addLayer({id:this.polygonLayer,type:"fill",source:this.source,filter:["all",["==","$type","Polygon"],["!=","disabled",!0]],paint:{"fill-outline-color":"#d57d02","fill-opacity":.4,"fill-color":"#d57d02"}}),this.map.addLayer({id:this.polygonLayer+"-border",type:"line",source:this.source,filter:["all",["==","$type","Polygon"],["!=","disabled",!0]],paint:{"line-width":1,"line-color":"#d57d02"}}),this.map.addLayer({id:this.lineLayer,type:"line",source:this.source,filter:["all",["==","$type","LineString"],["!=","disabled",!0]],paint:{"line-color":"#d57d02","line-width":2}}),this.map.addLayer({id:this.polygonLabelLayer,type:"symbol",source:this.source,filter:["all",["==","$type","Polygon"],["!=","disabled",!0]],layout:{"symbol-placement":"point","icon-image":"alert","icon-size":.1,"icon-allow-overlap":!0,"icon-rotation-alignment":"viewport"},paint:{"icon-opacity":.8}}),this.map.addLayer({id:this.lineLabelLayer,type:"symbol",source:this.source,filter:["all",["==","$type","LineString"],["!=","disabled",!0]],layout:{"symbol-placement":"line-center","icon-image":"alert","icon-size":.1,"icon-allow-overlap":!0,"icon-rotation-alignment":"viewport"},paint:{"icon-opacity":.8}}),this.map.addLayer({id:this.pointLayer,type:"symbol",source:this.source,filter:["all",["==","$type","Point"],["!=","disabled",!0]],layout:{"symbol-placement":"point","icon-image":"alert","icon-size":.1},paint:{"icon-opacity":.8}})))):setTimeout(()=>{this.handleRender()},500)},handleClear(){this.map.getLayer(this.polygonLayer)&&this.map.removeLayer(this.polygonLayer),this.map.getLayer(this.polygonLayer+"-border")&&this.map.removeLayer(this.polygonLayer+"-border"),this.map.getLayer(this.polygonLabelLayer)&&this.map.removeLayer(this.polygonLabelLayer),this.map.getLayer(this.lineLayer)&&this.map.removeLayer(this.lineLayer),this.map.getLayer(this.lineLabelLayer)&&this.map.removeLayer(this.lineLabelLayer),this.map.getLayer(this.pointLayer)&&this.map.removeLayer(this.pointLayer),this.map.getSource(this.source)&&this.map.removeSource(this.source)}}},Ni={id:"zone-info"},Ti=["innerHTML"];function Vi(a,e,t,o,r,s){var l;return i.withDirectives((i.openBlock(),i.createElementBlock("div",Ni,[i.createElementVNode("div",{class:"iconfont close",onClick:e[0]||(e[0]=n=>r.showZone=!1)},""),i.createElementVNode("div",{class:"rich-context",innerHTML:(l=r.form)==null?void 0:l.name},null,8,Ti)],512)),[[i.vShow,r.showZone]])}const Ii=C(Pi,[["render",Vi],["__scopeId","data-v-d1cb4e6e"]]),Fo="",$i={name:"IdmPort",props:{map:{type:Object},port:{type:Object},beforeLayer:{type:String}},emits:["port"],data(){return{source:"port-source",layer:"port-layer",showPort:!1,form:{},marker:void 0}},computed:{computeLat(){return function(a){return v.LngLatHelper.lat2pretty(a,4).pretty}},computeLng(){return function(a){return v.LngLatHelper.lng2pretty(a,4).pretty}}},watch:{port:{handler(){var a,e;this.port?(this.handleRender(),(a=this.map)==null||a.on("click",[this.layer],this.handleClick)):(this.handleClear(),(e=this.map)==null||e.off("click",[this.layer],this.handleClick))}}},methods:{handleClick(a){var o;const e=a.features[0],t=(o=this.port)==null?void 0:o.features.filter(r=>{var s;return r.properties.id===((s=e==null?void 0:e.properties)==null?void 0:s.id)})[0];if(t){this.showPort=!0,this.form={...t.properties},this.form.lng=t.geometry.coordinates[0],this.form.lat=t.geometry.coordinates[1];const r=document.getElementById("port-info");this.marker?this.marker.setLngLat([a.lngLat.lng,a.lngLat.lat]):this.marker=new U.Marker(r).setLngLat([a.lngLat.lng,a.lngLat.lat]).setOffset([0,-85]).addTo(this.map)}},handleEmit(){this.$emit("port",this.form)},handleRender(){var a;this.map?this.port&&(this.map.getSource(this.source)?(a=this.map)==null||a.getSource(this.source).setData(this.port):(this.map.addSource(this.source,{type:"geojson",data:this.port}),this.map.addLayer({id:this.layer,type:"symbol",source:this.source,filter:["all",["==","$type","Point"],["!=","disabled",!0]],layout:{"symbol-placement":"point","icon-size":.1,"icon-image":"port","text-anchor":"left","text-field":"{name}","text-rotation-alignment":"viewport","text-size":10,"text-offset":[1,0]},paint:{"text-color":"rgba(0, 0, 0, 0.8)","text-halo-color":"#fff","text-halo-width":1}}))):setTimeout(()=>{this.handleRender()},500)},handleClear(){this.showPort=!1,this.map.getLayer(this.layer)&&this.map.removeLayer(this.layer),this.map.getSource(this.source)&&this.map.removeSource(this.source)}}},we=a=>(i.pushScopeId("data-v-6fdfee96"),a=a(),i.popScopeId(),a),Ri={id:"port-info"},Di={class:"port-box"},Bi={class:"flex-start"},Ai=we(()=>i.createElementVNode("label",null,"Name : ",-1)),zi={class:"flex-start"},Mi=we(()=>i.createElementVNode("label",null,"Position : ",-1)),Oi={class:"flex-start"},Wi=we(()=>i.createElementVNode("label",null,"LoCode : ",-1)),ji={class:"flex-start",style:{"align-items":"flex-start"}},Fi=we(()=>i.createElementVNode("label",null,"Region : ",-1));function Ui(a,e,t,o,r,s){return i.withDirectives((i.openBlock(),i.createElementBlock("div",Ri,[i.createElementVNode("div",{class:"close iconfont",onClick:e[0]||(e[0]=l=>r.showPort=!1)},""),i.createElementVNode("div",Di,[i.createElementVNode("div",Bi,[Ai,i.createElementVNode("span",{onClick:e[1]||(e[1]=(...l)=>s.handleEmit&&s.handleEmit(...l))},i.toDisplayString(r.form.name),1)]),i.createElementVNode("div",zi,[Mi,i.createElementVNode("span",null,i.toDisplayString(s.computeLat(r.form.lat))+", "+i.toDisplayString(s.computeLng(r.form.lng)),1)]),i.createElementVNode("div",Oi,[Wi,i.createElementVNode("span",null,i.toDisplayString(r.form.loCode||"-"),1)]),i.createElementVNode("div",ji,[Fi,i.createElementVNode("span",null,i.toDisplayString(r.form.city||"-")+", "+i.toDisplayString(r.form.country||"-"),1)])])],512)),[[i.vShow,r.showPort]])}const Hi=C($i,[["render",Ui],["__scopeId","data-v-6fdfee96"]]),Gi={name:"IdmLoadLine",props:{map:{type:Object},line:{type:Object},beforeLayer:{type:String}},data(){return{source:"load-line-source",lineLayer:"load-line-layer",lineLabelLayer:"load-line-label-layer"}},watch:{line:{handler(){this.handleRender()}}},methods:{handleRender(){this.map?(this.handleClear(),this.line&&(this.map.addSource(this.source,{type:"geojson",data:this.line}),this.map.addLayer({id:this.lineLayer,type:"fill",source:this.source,filter:["==","$type","Polygon"],paint:{"fill-outline-color":"silver","fill-opacity":.75,"fill-color":["match",["get","val"],"LLGreen","#A0C0C0","LLRed","#F5A39D","LLBlue","#6B94E4","#ffffff"]}},this.beforeLayer),this.map.addLayer({id:this.lineLabelLayer,type:"symbol",source:this.source,filter:["==","$type","Point"],layout:{"symbol-placement":"point","text-field":"{lbl} (Length < {shipLength}, {start} - {end})","text-rotation-alignment":"viewport","text-offset":[0,1],"text-size":10,"text-allow-overlap":!0},paint:{"text-opacity":.8}}))):setTimeout(()=>{this.handleRender()},500)},handleClear(){this.map.getLayer(this.lineLayer)&&this.map.removeLayer(this.lineLayer),this.map.getLayer(this.lineLabelLayer)&&this.map.removeLayer(this.lineLabelLayer),this.map.getSource(this.source)&&this.map.removeSource(this.source)}}};function Xi(a,e,t,o,r,s){return i.openBlock(),i.createElementBlock("div")}const Zi=C(Gi,[["render",Xi]]),Ji={name:"IdmTimezone",props:{map:{type:Object},zone:{type:Object},beforeLayer:{type:String}},data(){return{source:"time-zone-source",zoneLayer:"time-zone-layer",zoneLabelLayer:"time-zone-label-layer"}},watch:{zone:{handler(){this.handleRender()}}},methods:{handleRender(){this.map?(this.handleClear(),this.zone&&(this.map.addSource(this.source,{type:"geojson",data:this.zone}),this.map.addLayer({id:this.zoneLayer,type:"fill",source:this.source,filter:["==","$type","Polygon"],paint:{"fill-outline-color":"silver","fill-opacity":.5,"fill-color":["match",["get","offSet"],"-11.5","rgba(255,0,0,0.4)","-11","rgba(0,255,0,0.3)","-10.5","rgba(0,255,0,0.3)","-10","rgba(0,0,255,0.3)","-9.5","rgba(0,0,255,0.3)","-9","rgba(255,0,0,0.4)","-8.5","rgba(255,0,0,0.4)","-8","rgba(0,255,0,0.3)","-7.5","rgba(0,255,0,0.3)","-7","rgba(0,0,255,0.3)","-6.5","rgba(0,0,255,0.3)","-6","rgba(255,0,0,0.4)","-5.5","rgba(255,0,0,0.4)","-5","rgba(0,255,0,0.3)","-4.5","rgba(0,255,0,0.3)","-4","rgba(0,0,255,0.3)","-3.5","rgba(0,0,255,0.3)","-3","rgba(255,0,0,0.4)","-2.5","rgba(255,0,0,0.4)","-2","rgba(0,255,0,0.3)","-1.5","rgba(0,255,0,0.3)","-1","rgba(0,0,255,0.3)","-0.5","rgba(0,0,255,0.3)","+0","rgba(255,0,0,0.4)","+0.5","rgba(255,0,0,0.4)","+1","rgba(0,255,0,0.3)","+1.5","rgba(0,255,0,0.3)","+2","rgba(0,0,255,0.3)","+2.5","rgba(0,0,255,0.3)","+3","rgba(255,0,0,0.4)","+3.5","rgba(255,0,0,0.4)","+4","rgba(0,255,0,0.3)","+4.5","rgba(0,255,0,0.3)","+5","rgba(0,0,255,0.3)","+5.5","rgba(0,0,255,0.3)","+6","rgba(255,0,0,0.4)","+6.5","rgba(255,0,0,0.4)","+7","rgba(0,255,0,0.3)","+7.5","rgba(0,255,0,0.3)","+8","rgba(0,0,255,0.3)","+8.5","rgba(0,0,255,0.3)","+9","rgba(255,0,0,0.4)","+9.5","rgba(255,0,0,0.4)","+10","rgba(0,255,0,0.3)","+10.5","rgba(0,255,0,0.3)","+11","rgba(0,0,255,0.3)","+11.5","rgba(0,0,255,0.3)","rgba(255,0,0,0.4)"]}}),this.map.addLayer({id:this.zoneLabelLayer,type:"symbol",source:this.source,filter:["==","$type","Point"],layout:{"symbol-placement":"point","text-field":"{offSet}","text-rotation-alignment":"viewport","text-size":12,"text-offset":[0,1]},paint:{"text-opacity":.8,"text-color":"#fff"}}))):setTimeout(()=>{this.handleRender()},500)},handleClear(){this.map.getLayer(this.zoneLayer)&&this.map.removeLayer(this.zoneLayer),this.map.getLayer(this.zoneLabelLayer)&&this.map.removeLayer(this.zoneLabelLayer),this.map.getSource(this.source)&&this.map.removeSource(this.source)}}};function qi(a,e,t,o,r,s){return i.openBlock(),i.createElementBlock("div")}const Yi=C(Ji,[["render",qi]]),Ki={name:"IdmVoluntaryReportingArea",props:{map:{type:Object},area:{type:Object},beforeLayer:{type:String}},data(){return{source:"vra-source",areaLayer:"vra-layer",areaLabelLayer:"vra-label-layer"}},watch:{area:{handler(){this.handleRender()}}},methods:{handleRender(){this.map?(this.handleClear(),this.area&&(this.map.addSource(this.source,{type:"geojson",data:this.area}),this.map.addLayer({id:this.areaLayer,type:"fill",source:this.source,filter:["==","$type","Polygon"],paint:{"fill-outline-color":"silver","fill-opacity":.4,"fill-color":"#9f30f9"}},this.beforeLayer),this.map.addLayer({id:this.areaLayer+"-border",type:"line",source:this.source,filter:["==","$type","Polygon"],paint:{"line-width":1,"line-opacity":1,"line-color":"#9f30f9"}},this.beforeLayer),this.map.addLayer({id:this.areaLabelLayer,type:"symbol",source:this.source,filter:["==","$type","Point"],layout:{"symbol-placement":"point","icon-size":.1,"icon-image":"identify","text-anchor":"top","text-field":"{lbl}","text-rotation-alignment":"viewport","text-size":10,"text-offset":[0,-3.5]},paint:{"icon-opacity":.8,"text-color":"#000","text-halo-color":"#fff","text-halo-width":1}}))):setTimeout(()=>{this.handleRender()},500)},handleClear(){this.map.getLayer(this.areaLayer)&&this.map.removeLayer(this.areaLayer),this.map.getLayer(this.areaLayer+"-border")&&this.map.removeLayer(this.areaLayer+"-border"),this.map.getLayer(this.areaLabelLayer)&&this.map.removeLayer(this.areaLabelLayer),this.map.getSource(this.source)&&this.map.removeSource(this.source)}}};function Qi(a,e,t,o,r,s){return i.openBlock(),i.createElementBlock("div")}const er=C(Ki,[["render",Qi]]),tr={name:"IdmSpecialArea",props:{map:{type:Object},area:{type:Object},beforeLayer:{type:String}},data(){return{source:"special-area-source",areaLayer:"special-area-layer",areaLabelLayer:"special-area-label-layer"}},watch:{area:{handler(){this.handleRender()}}},methods:{handleRender(){this.map?(this.handleClear(),this.area&&(this.area.features.forEach(a=>{a.geometry.type==="Polygon"&&a.geometry.coordinates.forEach(e=>v.convertToMonotonicLng2(e))}),this.map.addSource(this.source,{type:"geojson",data:this.area}),this.map.addLayer({id:this.areaLayer,type:"fill",source:this.source,filter:["==","$type","Polygon"],paint:{"fill-outline-color":"silver","fill-opacity":.4,"fill-color":["match",["get","val"],"DefaultStyle","rgb(0,0,0)","JWCriskArea","rgb(0,0,0)","rgb(0,0,0)"]}},this.beforeLayer),this.map.addLayer({id:this.areaLayer+"-border",type:"line",source:this.source,filter:["==","$type","Polygon"],paint:{"line-width":1,"line-opacity":.4,"line-color":"rgb(0,0,0)"}},this.beforeLayer),this.map.addLayer({id:this.areaLabelLayer,type:"symbol",source:this.source,filter:["==","$type","Point"],layout:{"symbol-placement":"point","icon-size":.1,"icon-image":"identify","text-anchor":"top","text-field":"{lbl}","text-rotation-alignment":"viewport","text-size":10,"text-offset":[0,-3.5]},paint:{"icon-opacity":.8,"text-color":"#000","text-halo-color":"#fff","text-halo-width":1}}))):setTimeout(()=>{this.handleRender()},500)},handleClear(){this.map.getLayer(this.areaLayer)&&this.map.removeLayer(this.areaLayer),this.map.getLayer(this.areaLayer+"-border")&&this.map.removeLayer(this.areaLayer+"-border"),this.map.getLayer(this.areaLabelLayer)&&this.map.removeLayer(this.areaLabelLayer),this.map.getSource(this.source)&&this.map.removeSource(this.source)}}};function ar(a,e,t,o,r,s){return i.openBlock(),i.createElementBlock("div")}const ir=C(tr,[["render",ar]]),rr={name:"IdmTerminator",props:{map:{type:Object},area:{type:Object}},data(){return{source:"terminator-source",layer:"terminator-layer"}},watch:{area:{handler(){this.handleRender()}}},methods:{handleRender(){this.map?(this.handleClear(),this.area&&(this.map.addSource(this.source,{type:"geojson",data:this.area}),this.map.addLayer({id:this.layer,type:"fill",source:this.source,filter:["==","$type","Polygon"],paint:{"fill-outline-color":"silver","fill-opacity":.5,"fill-color":"rgba(0, 0, 0, 0.4)"}}))):setTimeout(()=>{this.handleRender()},500)},handleClear(){this.map.getLayer(this.layer)&&this.map.removeLayer(this.layer),this.map.getSource(this.source)&&this.map.removeSource(this.source)}}};function or(a,e,t,o,r,s){return i.openBlock(),i.createElementBlock("div")}const sr=C(rr,[["render",or]]),Uo="",nr={name:"IdmLatLng",props:{map:{type:Object},show:{type:Boolean},bottom:{type:String,default:"70px"},toggleVersion:{type:Number}},data(){return{lngLat:void 0,source:"idm-lat-lng-source",layer:"idm-lat-lng-layer",labelLayer:"idm-lat-lng-label-layer",right:10}},watch:{show:{handler(){this.handleBind()},immediate:!0},map:{handler(){var a;this.map&&((a=this.map)==null||a.on("mousemove",this.handleMouseMove))},immediate:!0},toggleVersion:{handler(){var a,e,t;this.right=(((a=document.getElementsByClassName("legend-bars")[0])==null?void 0:a.clientWidth)||-10)+(((e=document.getElementsByClassName("available-layers-show")[0])==null?void 0:e.clientWidth)||0)+(((t=document.getElementsByClassName("fleet-list-container")[0])==null?void 0:t.clientWidth)||0)+20},immediate:!0}},methods:{handleBind(){var a,e;this.show?((a=this.map)==null||a.on("zoomend",this.handleZoomEnd),this.handleRender()):(this.handleClear(),(e=this.map)==null||e.off("zoomend",this.handleZoomEnd))},handleMouseMove(a){const e=a.lngLat,t=v.LngLatHelper.lng2pretty(e.lng,2),o=v.LngLatHelper.lat2pretty(e.lat,2);this.lngLat={lng:t,lat:o}},handleComputeLatLngs(){var o;const a=(o=this.map)==null?void 0:o.getZoom();console.log(a);let e=30;a>4?e=10:a>3&&(e=15);const t=[];for(let r=-60;r<90;r+=e)t.push({type:"Feature",geometry:{type:"LineString",coordinates:[[-180,r],[180,r]]}});for(let r=-180;r<180;r+=e)t.push({type:"Feature",geometry:{type:"LineString",coordinates:[[r,-90],[r,90]]}});for(let r=180;r>-180;r-=e)for(let s=-60;s<90;s+=e)t.push({type:"Feature",geometry:{type:"Point",coordinates:[r,s]},properties:{val:`${s>0?s+" N":s===0?s:s*-1+" S"}, ${r>0?r+" E":r*-1+" W"}`}});return t},handleZoomEnd(){var e;const a=this.handleComputeLatLngs();(e=this.map)==null||e.getSource(this.source).setData(E.featureCollection(a))},handleRender(){if(this.map){const a=this.handleComputeLatLngs();this.map.addSource(this.source,{type:"geojson",data:{type:"FeatureCollection",features:a}}),this.map.addLayer({id:this.layer,type:"line",source:this.source,filter:["==","$type","LineString"],layout:{"line-join":"round","line-cap":"round"},paint:{"line-color":"rgba(0, 0, 0, 0.3)","line-width":1}}),this.map.addLayer({id:this.labelLayer,type:"symbol",source:this.source,filter:["==","$type","Point"],layout:{"symbol-placement":"point","text-field":"{val}","text-rotation-alignment":"viewport","text-offset":[0,1],"text-size":10,"text-allow-overlap":!0},paint:{"text-opacity":.8}})}},handleClear(){var a,e,t,o,r,s;(a=this.map)!=null&&a.getLayer(this.layer)&&((e=this.map)==null||e.removeLayer(this.layer)),(t=this.map)!=null&&t.getLayer(this.labelLayer)&&((o=this.map)==null||o.removeLayer(this.labelLayer)),(r=this.map)!=null&&r.getSource(this.source)&&((s=this.map)==null||s.removeSource(this.source))}}},lr=(a=>(i.pushScopeId("data-v-9f51b3f9"),a=a(),i.popScopeId(),a))(()=>i.createElementVNode("span",null,", ",-1));function cr(a,e,t,o,r,s){return r.lngLat?(i.openBlock(),i.createElementBlock("div",{key:0,class:"lat-lng-tip",style:i.normalizeStyle({right:r.right+"px",bottom:t.bottom})},[i.createElementVNode("span",null,i.toDisplayString(r.lngLat.lat.pretty),1),lr,i.createElementVNode("span",null,i.toDisplayString(r.lngLat.lng.pretty),1)],4)):i.createCommentVNode("",!0)}const Ce=C(nr,[["render",cr],["__scopeId","data-v-9f51b3f9"]]),hr={name:"IdmMeasure",props:{map:{type:Object},show:{type:Boolean}},data(){return{geojson:[],source:"measure-source",layer:"measure-layer",labelLayer:"measure-label-layer",tmpSource:"measure-tmp-source",tmpLayer:"measure-tmp-layer",tmpLabelLayer:"measure-tmp-label-layer",closeMarkers:{},pointMarkers:{},tipMarker:void 0,contextmenu:void 0,navigation:"RL"}},watch:{show:{handler(){this.handleBind()},immediate:!0},map:{handler(){this.map&&this.handleBind()}}},methods:{handleBind(){var a,e,t,o,r,s,l,n,c,h;if(this.show)(a=this.map)==null||a.getCanvas().addEventListener("keydown",this.handleKeydown),(e=this.map)==null||e.on("mousemove",this.handleMove),(t=this.map)==null||t.on("dblclick",this.handleDblClick),(o=this.map)==null||o.on("click",this.handleClick),(r=this.map)==null||r.on("contextmenu",this.handleContextmenu),this.map&&(this.map.getCanvas().style.cursor="crosshair");else{(s=this.map)==null||s.getCanvas().removeEventListener("keydown",this.handleKeydown),(l=this.map)==null||l.off("mousemove",this.handleMove),(n=this.map)==null||n.off("dblclick",this.handleDblClick),(c=this.map)==null||c.off("click",this.handleClick),(h=this.map)==null||h.off("contextmenu",this.handleContextmenu);for(const f of this.geojson)this.handleClear(f,!0);this.geojson=[],this.map&&(this.map.getCanvas().style.cursor="grab")}},handleKeydown(a){if(a.key==="Shift"){this.navigation=this.navigation==="RL"?"GC":"RL";const t=this.geojson.at(-1).features.filter(o=>o.geometry.type==="Point");t.length&&(t.at(-1).properties.mode=this.navigation)}},handleDrag(a){var t,o,r,s,l,n,c,h,f,d;const e=(o=(t=a.target)==null?void 0:t._element)==null?void 0:o.id;if((e==null?void 0:e.split("-").length)===2){const m=this.geojson.filter(p=>p.id===e.split("-")[0])[0];this.pointMarkers[m.id].filter(p=>{var _;return((_=p._element)==null?void 0:_.id)===e})[0].setLngLat([(s=(r=a.target)==null?void 0:r._lngLat)==null?void 0:s.lng,(n=(l=a.target)==null?void 0:l._lngLat)==null?void 0:n.lat]);let u;m.features.forEach((p,_)=>{if(p.geometry.type==="Point"&&p.properties.id==e.split("-")[1]){u=_;return}});const g=m.features.filter(p=>p.geometry.type==="Point");this.handleTmpPointUpdate(m,g[u-1],{lng:(h=(c=a.target)==null?void 0:c._lngLat)==null?void 0:h.lng,lat:(d=(f=a.target)==null?void 0:f._lngLat)==null?void 0:d.lat,properties:g[u].properties},u===g.length-1?void 0:g[u+1])}},handleDragEnd(a){var t,o,r,s,l,n,c,h,f,d;const e=(o=(t=a.target)==null?void 0:t._element)==null?void 0:o.id;if((e==null?void 0:e.split("-").length)===2){const m=this.geojson.filter(g=>g.id===e.split("-")[0])[0];this.pointMarkers[m.id].filter(g=>{var p;return((p=g._element)==null?void 0:p.id)===e})[0].setLngLat([(s=(r=a.target)==null?void 0:r._lngLat)==null?void 0:s.lng,(n=(l=a.target)==null?void 0:l._lngLat)==null?void 0:n.lat]);const u=m.features.filter(g=>g.geometry.type==="Point"&&g.properties.id==e.split("-")[1])[0];u.geometry.coordinates=[(h=(c=a.target)==null?void 0:c._lngLat)==null?void 0:h.lng,(d=(f=a.target)==null?void 0:f._lngLat)==null?void 0:d.lat],m.features=m.features.filter(g=>g.geometry.type==="Point"),this.handlePointUpdate(m)}},handleContextmenu(a){var t,o,r,s;a.preventDefault(),(t=this.contextmenu)==null||t.remove();const e=(s=(r=(o=a.originalEvent)==null?void 0:o.target)==null?void 0:r.parentElement)==null?void 0:s.id;if((e==null?void 0:e.split("-").length)===2){const n=this.geojson.filter(c=>c.id===e.split("-")[0])[0].features.filter(c=>c.geometry.type==="Point");if(n.length>2&&n.filter(h=>h.properties.id===(e==null?void 0:e.split("-")[1]))[0]){const h=document.createElement("div");h.className="point-contextmenu-marker",h.innerHTML=`<span id="del-${e}" class="del-point">Del</span>`,this.contextmenu=new U.Marker(h).setOffset([24,0]).setLngLat([a.lngLat.lng,a.lngLat.lat]).addTo(this.map)}}},handleClick(a){var t,o,r,s,l;(t=this.contextmenu)==null||t.remove();const e=a.originalEvent.target.className;if(e==="marker-close"){const n=(r=(o=a.originalEvent)==null?void 0:o.srcElement)==null?void 0:r.id,c=this.geojson.filter(h=>h.id===n)[0];c&&this.handleClear(c,!0),this.geojson=this.geojson.filter(h=>h.id!==n)}else if(e==="del-point"){const n=(l=(s=a.originalEvent.target.id)==null?void 0:s.replace("del-",""))==null?void 0:l.split("-"),c=this.geojson.filter(h=>h.id===n[0])[0];c.features=c.features.filter(h=>h.geometry.type==="Point"&&h.properties.id!==n[1]),this.handlePointUpdate(c)}else if(e!=="marker-label"){let n=this.geojson.at(-1);n||(n=E.featureCollection([],{id:new Date().getTime().toString()}),this.geojson.push(n)),n.features=n.features.filter(h=>h.geometry.type==="Point");const c=E.feature({type:"Point",coordinates:[a.lngLat.lng,a.lngLat.lat]},{id:new Date().getTime().toString(),mode:this.navigation});n.features.push(c),this.handlePointUpdate(n)}},handlePointUpdate(a){const e=a.features;if(e.length>1){let t=0;const o=[];for(let r=1;r<e.length;r++){const s=e[r-1],l=e[r],n=s.properties,c={lng:s.geometry.coordinates[0],lat:s.geometry.coordinates[1]},h={lng:l.geometry.coordinates[0],lat:l.geometry.coordinates[1]},f=v.calculateDistance(c,h,n.mode==="RL",2),d=v.calculateBearing(c,h,n.mode==="RL",2);t=v.LngLatHelper.roundPrecision(t+f,2);let m;n.mode==="RL"?m=v.convertToMonotonicLng([c,h]):m=v.convertToMonotonicLng(v.interpolateCoordinates(c,h,200));const y=E.lineString(m.map(u=>[u.lng,u.lat]));y.properties.dist=f,y.properties.bearing=d,y.properties.total=t,o.push(y)}e.push(...o),a.total=t}return this.handleRender(a),a},handleTmpPointUpdate(a,e,t,o){const r=E.featureCollection([]);let s,l;if(e){const c=e.properties,h={lng:e.geometry.coordinates[0],lat:e.geometry.coordinates[1]},f={lng:t.lng,lat:t.lat};s=v.calculateDistance(h,f,c.mode==="RL",2),l=v.calculateBearing(h,f,c.mode==="RL",2);let d;c.mode==="RL"?d=v.convertToMonotonicLng([h,f]):d=v.convertToMonotonicLng(v.interpolateCoordinates(h,f,200));const m=E.lineString(d.map(y=>[y.lng,y.lat]));m.properties.dist=s,m.properties.bearing=l,r.features.push(m)}if(o){const c=t.properties,h=t,f={lng:o.geometry.coordinates[0],lat:o.geometry.coordinates[1]};s=v.calculateDistance(h,f,c.mode==="RL",2),l=v.calculateBearing(h,f,c.mode==="RL",2);let d;c.mode==="RL"?d=v.convertToMonotonicLng([h,f]):d=v.convertToMonotonicLng(v.interpolateCoordinates(h,f,200));const m=E.lineString(d.map(y=>[y.lng,y.lat]));m.properties.dist=s,m.properties.bearing=l,r.features.push(m)}this.map.getSource(this.tmpSource)?this.map.getSource(this.tmpSource).setData(r):this.map.addSource(this.tmpSource,{type:"geojson",data:r}),this.map.getLayer(this.tmpLayer)||this.map.addLayer({id:this.tmpLayer,type:"line",source:this.tmpSource,filter:["==","$type","LineString"],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#f56c6c","line-width":2,"line-opacity":.85,"line-dasharray":[3,2]}}),this.map.getLayer(this.tmpLabelLayer)||this.map.addLayer({id:this.tmpLabelLayer,type:"symbol",source:this.tmpSource,filter:["==","$type","LineString"],layout:{"symbol-placement":"line-center","text-field":"{dist} nm","text-rotation-alignment":"map","text-size":12},paint:{"text-opacity":1,"text-color":"#fff","text-halo-color":"#f56c6c","text-halo-width":4,"text-halo-blur":0}});let n;if(o?n='<div class="marker-label">Drag and drop</div>':n=`<div class="marker-label">Tol distance: <b>${v.LngLatHelper.roundPrecision((a.total??0)+s,2)}</b>nm, bearing: <b>${l}</b>°</div><div class="marker-label">${this.navigation==="RL"?"RL":"GC"} mode, using 'Shift' to switch</div><div class="marker-label">Double click to end</div>`,this.tipMarker)this.tipMarker._element.innerHTML=n,this.tipMarker.setLngLat([t.lng,t.lat]);else{const c=document.createElement("div");c.className="tip-marker",c.innerHTML=n,this.tipMarker=new U.Marker(c).setOffset([140,0]).setLngLat([t.lng,t.lat]).addTo(this.map)}},handleMove(a){this.map.getCanvas().style.cursor="crosshair";let e=this.geojson.at(-1);e||(e=E.featureCollection([],{id:new Date().getTime().toString()}),this.geojson.push(e));const t=e.features.filter(o=>o.geometry.type==="Point");t!=null&&t.length&&this.handleTmpPointUpdate(e,t.at(-1),{lng:a.lngLat.lng,lat:a.lngLat.lat})},handleDblClick(a){a.preventDefault();let e=this.geojson.at(-1);e.closed=!0,this.handleRender(e),e=E.featureCollection([],{id:new Date().getTime().toString()}),this.geojson.push(e)},handleRender(a){var e;if((e=a==null?void 0:a.features)!=null&&e.length){const t=`${a.id}-${this.source}`,o=`${a.id}-${this.layer}`,r=`${a.id}-${this.labelLayer}`;this.map.getSource(t)?this.map.getSource(t).setData(a):this.map.addSource(t,{type:"geojson",data:a}),this.handleClear(a,!1),this.map.addLayer({id:o,type:"line",source:t,filter:["==","$type","LineString"],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#f56c6c","line-width":2}}),this.map.addLayer({id:r,type:"symbol",source:t,filter:["==","$type","LineString"],layout:{"symbol-placement":"line-center","text-field":"{dist}nm,{bearing}°","text-rotation-alignment":"map","text-size":12},paint:{"text-opacity":1,"text-color":"#fff","text-halo-color":"#f56c6c","text-halo-width":4,"text-halo-blur":0}});const s=a.features.filter(l=>l.geometry.type==="Point");for(const l of s){const n=document.createElement("div");n.id=`${a.id}-${l.properties.id}`,n.className=`${a.closed?"point-marker closed":"point-marker"}`,n.innerHTML='<div class="marker-circle"></div>';const c=new U.Marker({element:n,draggable:!0,contextmenu:!0}).setLngLat(l.geometry.coordinates).addTo(this.map);c.on("drag",this.handleDrag),c.on("dragend",this.handleDragEnd),this.pointMarkers[a.id]?this.pointMarkers[a.id].push(c):this.pointMarkers[a.id]=[c]}if(a.closed){const l=s.at(-1),c=a.features.filter(f=>f.geometry.type==="LineString").at(-1),h=document.createElement("div");h.className="point-summary-marker",h.innerHTML=`<div id="${a.id}" class="marker-close">×</div><div class="marker-label">Tol: ${c.properties.total}nm</div>`,this.closeMarkers[a.id]=new U.Marker(h).setOffset([60,0]).setLngLat(l.geometry.coordinates).addTo(this.map)}}},handleClear(a,e=!0){var s,l,n,c,h,f,d,m,y;const t=`${a.id}-${this.source}`,o=`${a.id}-${this.layer}`,r=`${a.id}-${this.labelLayer}`;(s=this.map)!=null&&s.getLayer(o)&&this.map.removeLayer(o),(l=this.map)!=null&&l.getLayer(r)&&this.map.removeLayer(r),(n=this.map)!=null&&n.getLayer(this.tmpLayer)&&this.map.removeLayer(this.tmpLayer),(c=this.map)!=null&&c.getLayer(this.tmpLabelLayer)&&this.map.removeLayer(this.tmpLabelLayer),(h=this.closeMarkers[a.id])==null||h.remove(),this.closeMarkers[a.id]=void 0,(f=this.pointMarkers[a.id])==null||f.forEach(u=>{u==null||u.remove()}),this.pointMarkers[a.id]=[],(d=this.tipMarker)==null||d.remove(),this.tipMarker=void 0,e&&((m=this.map)!=null&&m.getSource(t))&&this.map.removeSource(t),e&&((y=this.map)!=null&&y.getSource(this.tmpSource))&&this.map.removeSource(this.tmpSource)}}};function dr(a,e,t,o,r,s){return i.openBlock(),i.createElementBlock("div")}const pr=C(hr,[["render",dr]]),Go="",mr={name:"IdmENC",props:{map:{type:Object},enabled:{type:Boolean},beforeLayer:{type:String,default:"grayland"},bottom:{type:String,default:"260px"},token:{type:String,default:""},toggleVersion:{type:Number},permission:{type:Number}},emits:["enc"],data(){return{helper:v.CompanyHelper,vendor:this.$attrs.permission&v.CompanyHelper.LEVEL.Supper?"hi":"i4",right:10}},watch:{vendor:{handler(){this.$emit("enc",this.vendor)},immediate:!0},toggleVersion:{handler(){var a,e;this.right=(((a=document.getElementsByClassName("available-layers-show")[0])==null?void 0:a.clientWidth)||0)+(((e=document.getElementsByClassName("fleet-list-container")[0])==null?void 0:e.clientWidth)||0)+10},immediate:!0}},methods:{}},Pe=a=>(i.pushScopeId("data-v-2d85e33b"),a=a(),i.popScopeId(),a),yr={key:0},fr={class:"bar-item"},gr=[Pe(()=>i.createElementVNode("span",{class:"iconfont"},"HI",-1))],ur=[Pe(()=>i.createElementVNode("span",{class:"iconfont"},"I4",-1))];function br(a,e,t,o,r,s){return t.enabled&&t.permission&r.helper.LEVEL.Supper?(i.openBlock(),i.createElementBlock("div",yr,[i.createElementVNode("div",{class:"menu-bar-box",style:i.normalizeStyle({position:"absolute",right:r.right+"px",bottom:t.bottom})},[i.createElementVNode("div",fr,[i.createElementVNode("div",{class:i.normalizeClass(r.vendor==="hi"?"menu-icon active":"menu-icon"),onClick:e[0]||(e[0]=l=>r.vendor="hi")},gr,2),i.createElementVNode("div",{class:i.normalizeClass(r.vendor==="i4"?"menu-icon active":"menu-icon"),onClick:e[1]||(e[1]=l=>r.vendor="i4")},ur,2)])],4)])):i.createCommentVNode("",!0)}const _r=C(mr,[["render",br],["__scopeId","data-v-2d85e33b"]]),Jo="",Lr={name:"IdmGLV2",components:{IdmGlLayer:mt,IdmWindBarb:wt,IdmWindParticle:St,IdmCurrents:Rt,IdmCurrentParticle:Mt,IdmSigWave:jt,IdmSwell:Ht,IdmPrmsl:Zt,IdmIceberg:Yt,IdmTropicals:xe,IdmPrecip3h:Ea,IdmVisibility:Pa,IdmWaterTemp:$a,IdmTemp:za,IdmArctic:Fa,IdmWarZone:wi,IdmGmdssArea:xi,IdmEcaZone:ki,IdmAlertZone:Ii,IdmPort:Hi,IdmLoadLine:Zi,IdmTimezone:Yi,IdmVRA:er,IdmSpecialArea:ir,IdmTerminator:sr,IdmLatLng:Ce,IdmMeasure:pr,IdmPoint:bi,IdmENC:_r},props:{map:{type:Object},token:{type:String},ts:{type:String},beforeLayer:{type:String,default:""}},data(){return{weatherLayers:{},activeWeatherLayers:[],weatherWeight:0,otherLayers:{},otherWeight:0,showCoord:!1,showMeasure:!1,showPoint:!1,show3d:!1,meteo:void 0,source:"",gateway:"https://cbe.idmwx.com",zoom:6,viewport:void 0,particleFactor:void 0,showRampColor:!1,activeWindLayer:!1,showWindParticle:!1,showCurrentParticle:!1,toggleVersion:0,enc:"i4",defaultMeteoToken:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6ImNseTVudHJzYzAwNWUwbHBsZHkyaDRqczMiLCJyb2xlIjoxLCJuYW1lIjoiZmFrZUBvcm13eC5jb20iLCJwbGF0SWQiOiJnZDBtdDFkIiwiY29tcGFueSI6eyJpZCI6bnVsbCwiY2hpbGRyZW4iOltdfSwiaWF0IjoxNzIzMDI0MDI0LCJleHAiOjM5MzA1NDQwMjR9.RrKcdcMnq-FxBLJQ-i6lx2FscDE46y8EvHIemPW4HTg"}},watch:{ts:{handler(a,e){a&&e&&W(a).utc().format("yyyy-MM-DD HH")!==W(e).utc().format("yyyy-MM-DD HH")&&this.$nextTick(()=>{this.handleDateChange({tropicals:!1})})},immediate:!0},map:{handler(){var a,e,t,o,r,s,l,n,c,h,f,d,m,y,u,g,p;this.map&&(this.map.on("zoomend",this.handleDragEndWithZoom4Json),this.map.on("dragend",this.handleDragEndWithZoom4Json),this.map.on("move",this.handleDragEndWithZoom4Image),this.viewport=new ve(this.map),this.handleRampColorInitial(),console.log(888,this.activeWeatherLayers),this.activeWeatherLayers.some(_=>["wind","current"].includes(_.key))&&((a=this.particleFactor)!=null&&a.particle)||this.activeWeatherLayers.some(_=>["temp","water-temp"].includes(_.key))?((t=(e=this.map)==null?void 0:e.getLayer("grayland"))==null||t.setLayoutProperty("visibility","visible"),(r=(o=this.map)==null?void 0:o.getLayer("darkmap"))==null||r.setLayoutProperty("visibility","visible"),(s=this.map)!=null&&s.getLayer("grayland")&&((n=this.map)==null||n.moveLayer((l=this.viewport)==null?void 0:l.rampColorLayer,"grayland")),(c=this.map)!=null&&c.getLayer("grayland")&&((f=this.map)==null||f.moveLayer((h=this.viewport)==null?void 0:h.particleLayer,"grayland"))):((m=this.map)==null||m.moveLayer((d=this.viewport)==null?void 0:d.rampColorLayer,null),(u=(y=this.map)==null?void 0:y.getLayer("grayland"))==null||u.setLayoutProperty("visibility","none"),(p=(g=this.map)==null?void 0:g.getLayer("darkmap"))==null||p.setLayoutProperty("visibility","none")))},immediate:!0},activeWeatherLayers:{handler(){var a,e,t,o,r,s,l,n,c,h,f,d,m,y,u,g,p;if(console.log(999,this.activeWeatherLayers),!this.map)return!1;this.activeWeatherLayers.some(_=>["wind","current"].includes(_.key))&&((a=this.particleFactor)!=null&&a.particle)||this.activeWeatherLayers.some(_=>["temp","water-temp"].includes(_.key))?((t=(e=this.map)==null?void 0:e.getLayer("grayland"))==null||t.setLayoutProperty("visibility","visible"),(r=(o=this.map)==null?void 0:o.getLayer("darkmap"))==null||r.setLayoutProperty("visibility","visible"),(s=this.map)!=null&&s.getLayer("grayland")&&((n=this.map)==null||n.moveLayer((l=this.viewport)==null?void 0:l.rampColorLayer,"grayland")),(c=this.map)!=null&&c.getLayer("grayland")&&((f=this.map)==null||f.moveLayer((h=this.viewport)==null?void 0:h.particleLayer,"grayland"))):((m=this.map)==null||m.moveLayer((d=this.viewport)==null?void 0:d.rampColorLayer,null),(u=(y=this.map)==null?void 0:y.getLayer("grayland"))==null||u.setLayoutProperty("visibility","none"),(p=(g=this.map)==null?void 0:g.getLayer("darkmap"))==null||p.setLayoutProperty("visibility","none"))},immediate:!0},"particleFactor.particle":{handler(){var a,e,t,o,r,s,l;this.activeWeatherLayers.some(n=>["wind","current"].includes(n.key))&&!((a=this.particleFactor)!=null&&a.particle)&&!this.activeWeatherLayers.some(n=>["temp","water-temp"].includes(n.key))&&((t=this.map)==null||t.moveLayer((e=this.viewport)==null?void 0:e.rampColorLayer,null),(r=(o=this.map)==null?void 0:o.getLayer("grayland"))==null||r.setLayoutProperty("visibility","none"),(l=(s=this.map)==null?void 0:s.getLayer("darkmap"))==null||l.setLayoutProperty("visibility","none"))},immediate:!0},enc:{handler(a,e){var t,o,r,s;this.activeWeatherLayers.some(l=>["wind","temp","current"].includes(l.key))||((o=(t=this.map)==null?void 0:t.getLayer(a))==null||o.setLayoutProperty("visibility","visible"),(s=(r=this.map)==null?void 0:r.getLayer(e))==null||s.setLayoutProperty("visibility","none"))}}},methods:{async fetchWeatherLayers(a={tropicals:!1}){var r,s,l,n,c,h,f,d;const e=new Date().valueOf();let t=0,o=0;if(this.map){const m=((r=this.map)==null?void 0:r.getZoom())+1,y=(s=this.map)==null?void 0:s.getBounds(),u=`${y._sw.lng},${y._sw.lat},${y._ne.lng},${y._ne.lat}`;if(this.handleRampColorState(),this.particleFactor){const g=v.LayerHelper.WEATHER_LAYERS.find(p=>{var _;return((_=p.peer)==null?void 0:_.weight)===this.particleFactor.weight});this.particleFactor.particle?this.weatherWeight=this.weatherWeight&g.weight?this.weatherWeight:this.weatherWeight+g.weight:this.weatherWeight=this.weatherWeight&g.weight?this.weatherWeight-g.weight:this.weatherWeight}if(this.weatherWeight>0){let g=this.weatherWeight,p;if(a.tropicals||this.weatherWeight&256&&(p=this.weatherLayers.tropicals,p&&(g-=256,p.version=Math.random()+1)),g>0){const _=await H.get(`${this.gateway}/api/arc/weather/layers/links?l=${g}&v=${this.source}&z=${m}&bbox=${u}&t=${this.ts}`,{headers:{Authorization:this.token||this.defaultMeteoToken}});if(o=new Date().valueOf()-(e+t),console.log("weather links elapsed: ",o,", total: ",t+=o),((l=_==null?void 0:_.data)==null?void 0:l.code)===0){const b=(n=_==null?void 0:_.data)==null?void 0:n.data,w=[];for(const L in b)L==="ice-edge"&&(b[L]="https://idm-hz.oss-cn-hangzhou.aliyuncs.com/test/sea_ice_contours.geojson"),L!=="tropicals"&&w.push(H.get(b[L],{headers:{Authorization:this.token||this.defaultMeteoToken,key:L},responseType:/\.(jpg|png)$/.test(b[L])?"blob":"json"}).catch(S=>{console.log(`[${L}] fetch layer error: ${S}`)}));const x=await Promise.all(w);this.weatherLayers={},x.map(L=>{var T,$,R,z;const S=((T=L==null?void 0:L.data)==null?void 0:T.data)||(L==null?void 0:L.data),N=(R=($=L==null?void 0:L.config)==null?void 0:$.headers)==null?void 0:R.key;N&&S&&(this.weatherLayers[N]={raw:S,type:((z=L==null?void 0:L.config)==null?void 0:z.responseType)==="blob"?"image":"json",etime:this.ts})}),b.tropicals&&H.get(b.tropicals,{headers:{Authorization:this.token||this.defaultMeteoToken,key:"tropicals"}}).then(L=>{var T,$,R;const S=ke.TropicalHelper.convert2Geojson(((T=L==null?void 0:L.data)==null?void 0:T.data)||(L==null?void 0:L.data)),N=(R=($=L==null?void 0:L.config)==null?void 0:$.headers)==null?void 0:R.key;this.weatherLayers[N]={data:S,active:!0,cached:!1,type:"json",etime:this.ts,version:Math.random()+1}})}if(o=new Date().valueOf()-(e+t),console.log("weather layers elapsed: ",o,", total: ",t+=o),this.weatherLayers["swell-direction"]||this.weatherLayers["swell-height"]){const b=(c=this.weatherLayers["swell-direction"])==null?void 0:c.raw,w=(h=this.weatherLayers["swell-height"])==null?void 0:h.raw;delete this.weatherLayers["swell-direction"],delete this.weatherLayers["swell-height"],this.weatherLayers.swell={type:"json",direction:b,height:{raw:w},etime:this.ts}}if(this.weatherLayers["current-direction"]||this.weatherLayers["current-speed"]){const b=(f=this.weatherLayers["current-direction"])==null?void 0:f.raw,w=(d=this.weatherLayers["current-speed"])==null?void 0:d.raw;delete this.weatherLayers["current-direction"],delete this.weatherLayers["current-speed"],this.weatherLayers.current={type:"json",direction:b,speed:{raw:w},etime:this.ts}}}p&&(p.etime=this.ts,p.cached=!0,this.weatherLayers.tropicals=p)}this.handleWeatherLayerToggle(),this.handleDragEndWithZoom4Json()}this.toggleVersion=Math.random()},async fetchOtherLayers(a={all:!1,dayNight:!1,enc:!1}){var e,t,o,r;if(this.map){let s=this.otherWeight;if(s){let l=!1;if(this.otherWeight&2048&&(s=this.otherWeight-2048,l=!0),s){if(a.all){const n=await H.get(`${this.gateway}/api/arc/other/layers/links?l=${s}&t=${this.ts}`,{headers:{Authorization:this.token||this.defaultMeteoToken}});if(((e=n==null?void 0:n.data)==null?void 0:e.code)===0){const c=(t=n==null?void 0:n.data)==null?void 0:t.data,h=[];for(const d in c)h.push(H.get(c[d],{headers:{Authorization:this.token||this.defaultMeteoToken,key:d}}));const f=await Promise.all(h);this.otherLayers={enc:l},f.map(d=>{var u,g,p;const m=((u=d==null?void 0:d.data)==null?void 0:u.data)||(d==null?void 0:d.data),y=(p=(g=d==null?void 0:d.config)==null?void 0:g.headers)==null?void 0:p.key;this.otherLayers[y]=m})}}else if(a.dayNight&&s&1024){const n=await H.get(`${this.gateway}/api/arc/other/layers/links?l=1024&t=${this.ts}`,{headers:{Authorization:this.token||this.defaultMeteoToken}});if(((o=n==null?void 0:n.data)==null?void 0:o.code)===0){const c=(r=n==null?void 0:n.data)==null?void 0:r.data,h=[];for(const d in c)h.push(H.get(c[d],{headers:{Authorization:this.token||this.defaultMeteoToken,key:d}}));(await Promise.all(h)).map(d=>{var u,g,p;const m=((u=d==null?void 0:d.data)==null?void 0:u.data)||(d==null?void 0:d.data),y=(p=(g=d==null?void 0:d.config)==null?void 0:g.headers)==null?void 0:p.key;this.otherLayers[y]=m})}}}else this.otherLayers={enc:l}}else this.otherLayers={};this.handleBeforeLayerToggle()}},handleRampColorState(){var a;if(this.showRampColor=!1,this.showWindParticle=!1,this.showCurrentParticle=!1,(a=this.particleFactor)!=null&&a.particle)this.showRampColor=!0,this.showWindParticle=this.particleFactor.key==="wind",this.showCurrentParticle=this.particleFactor.key==="current",this.activeWeatherLayers=this.activeWeatherLayers.filter(e=>e.type==="json");else for(const e of this.activeWeatherLayers)["png","jpg"].includes(e.type)&&(this.showRampColor=!0);this.activeWindLayer=!!this.activeWeatherLayers.find(e=>e.key==="wind"),this.$refs.layer&&(this.$refs.layer.activeWeatherLayers=this.activeWeatherLayers)},handleRampColorInitial(){var a,e,t,o,r,s,l,n,c,h,f,d;this.viewport.map.getSource((a=this.viewport)==null?void 0:a.rampColorSource)||this.viewport.map.addSource((e=this.viewport)==null?void 0:e.rampColorSource,{type:"canvas",canvas:(t=this.viewport)==null?void 0:t.rampColorCanvas,animate:!0,coordinates:this.viewport.getBoundLngLat()}),this.viewport.map.getLayer((o=this.viewport)==null?void 0:o.rampColorLayer)||this.viewport.map.addLayer({type:"raster",id:(r=this.viewport)==null?void 0:r.rampColorLayer,source:(s=this.viewport)==null?void 0:s.rampColorSource,layout:{visibility:"none"}},this.beforeLayer),this.viewport.map.getSource((l=this.viewport)==null?void 0:l.particleSource)||this.viewport.map.addSource((n=this.viewport)==null?void 0:n.particleSource,{type:"canvas",canvas:(c=this.viewport)==null?void 0:c.particleCanvas,animate:!0,coordinates:this.viewport.getBoundLngLat()}),this.viewport.map.getLayer((h=this.viewport)==null?void 0:h.particleLayer)||this.viewport.map.addLayer({type:"raster",id:(f=this.viewport)==null?void 0:f.particleLayer,source:(d=this.viewport)==null?void 0:d.particleSource,layout:{visibility:"none"}},this.beforeLayer)},handleDragEndWithZoom4Json(){var h,f,d,m;const a=new Date().valueOf();let e=0,t=0;const o=(h=this.map)==null?void 0:h.getBounds(),r=this.map.getZoom(),s=v.convertToStandardLng(o._sw.lng),l=v.convertToStandardLng(o._ne.lng),n=Math.floor(o._sw.lat),c=Math.ceil(o._ne.lat);for(const y in this.weatherLayers)if(this.weatherLayers[y].active&&this.weatherLayers[y].type==="json"){this.weatherLayers[y].active=!1,this.weatherLayers[y].version=Math.random()+1;let u=[];if(["swell","current"].includes(y)){const g=((f=this.weatherLayers[y])==null?void 0:f.direction)||{};for(const p in g)if(p>n&&p<c&&(!(r<=this.zoom)||p%(r<this.zoom/2?5:3)===0)){const _=g[p].lng;s>l?_.forEach((b,w)=>{var x;if((b>=s&&b<=180||b>=-180&&b<=l)&&(!(r<=this.zoom)||b%(r<this.zoom/2?5:3)===0)){const L=E.point([b,p],{val:g[p].val[w],spd:(x=g[p].spd)==null?void 0:x[w]});u.push(L)}}):_.forEach((b,w)=>{var x;if(b>=s&&b<=l&&(!(r<=this.zoom)||b%(r<this.zoom/2?5:3)===0)){const L=E.point([b,p],{val:g[p].val[w],spd:(x=g[p].spd)==null?void 0:x[w]});u.push(L)}})}if(t=new Date().valueOf()-(a+e),console.log("direction elapsed: ",t,", total: ",e+=t),y==="swell"){const p=this.weatherLayers[y].height;if(p){if(!p.data){const _=[];for(const b in(d=p.raw)==null?void 0:d.LineString){const w=p.raw.LineString[b];for(const x of w)_.push(E.lineString(x,{val:Number(b)}));p.data=E.featureCollection(_)}}if(p.data){const _=this.handleBboxClip(p.data,o);u=u.concat(_)}t=new Date().valueOf()-(a+e),console.log("height elapsed: ",t,", total: ",e+=t)}}if(y==="current"){const p=this.weatherLayers[y].speed;if(p){if(!p.data){const b=[];for(const w in(m=p.raw)==null?void 0:m.Polygon){const x=p.raw.Polygon[w];for(const L of x)b.push(E.polygon(L,{val:Number(w)}))}p.data=E.featureCollection(b)}const _=r<this.zoom?p.data.features.filter(b=>b.properties.val>.5):p.data.features;u=u.concat(_),t=new Date().valueOf()-(a+e),console.log("speed elapsed: ",t,", total: ",e+=t)}}}else if(y==="wind"){const g=this.weatherLayers.wind.raw;for(const p in g)if(p>n&&p<c&&(!(r<=this.zoom)||p%(r<this.zoom/2?5:3)===0)){const _=g[p].lng;s>l?_.forEach((b,w)=>{if((b>=s&&b<=180||b>=-180&&b<=l)&&(!(r<=this.zoom)||b%(r<this.zoom/2?5:3)===0)){const x=E.point([b,p],{val:g[p].val[w],spd:g[p].spd[w]});u.push(x)}}):_.forEach((b,w)=>{if(b>=s&&b<=l&&(!(r<=this.zoom)||b%(r<this.zoom/2?5:3)===0)){const x=E.point([b,p],{val:g[p].val[w],spd:g[p].spd[w]});u.push(x)}})}t=new Date().valueOf()-(a+e),console.log("wind barb elapsed: ",t,", total: ",e+=t)}else if(y==="sig-wave-height"){if(this.weatherLayers[y].data)u=this.weatherLayers[y].data;else{const g=this.weatherLayers[y].raw;if(g){const p=[];for(const _ in g.Polygon){const b=g.Polygon[_];for(const w of b)p.push(E.polygon(w,{val:Number(_)}))}u=u.concat(p)}}t=new Date().valueOf()-(a+e),console.log("sigWave elapsed: ",t,", total: ",e+=t)}else if(y==="prmsl"){if(this.weatherLayers[y].data)u=this.weatherLayers[y].data;else{const g=this.weatherLayers[y].raw;if(g){const p=[];for(const _ in g.LineString){const b=g.LineString[_];for(const w of b)p.push(E.lineString(w,{val:Number(_)}))}for(const _ in g.Point)g.Point[_].lng.forEach((b,w)=>{b=v.convertToStandardLng(b),p.push(E.point([b,_],{val:g.Point[_].val[w],type:g.Point[_].type[w]}))});u=u.concat(p)}}t=new Date().valueOf()-(a+e),console.log("prmsl elapsed: ",t,", total: ",e+=t)}else if(y==="arctic"||y==="iceberg"){if(this.weatherLayers[y].data)u=this.weatherLayers[y].data;else{const g=this.weatherLayers[y].raw;if(g){const p=[];for(const _ in g.LineString){const b=g.LineString[_];for(const w of b)p.push(E.lineString(w,{val:Number(_)}))}u=u.concat(p)}}t=new Date().valueOf()-(a+e)}console.log(y," elapsed: ",t,", total: ",e+=t),u.length&&(this.weatherLayers[y].data=E.featureCollection(u)),this.weatherLayers[y].active=!0,this.weatherLayers[y].version=Math.random()+1}},handleDragEndWithZoom4Image(){for(const a in this.weatherLayers)this.weatherLayers[a].active&&this.weatherLayers[a].type==="image"&&(this.weatherLayers[a].active=!0,this.weatherLayers[a].version=Math.random()+1)},handleBboxClip(a,e){const t=[],o=v.convertToStandardLng(e._sw.lng),r=v.convertToStandardLng(e._ne.lng);return a.features.forEach(s=>{if(s.geometry.type!=="Point")if(o>r){let l=[o,e._sw.lat,180,e._ne.lat],n=E.bboxClip(s,l);n.geometry.coordinates.length&&t.push(n),l=[-180,e._sw.lat,r,e._ne.lat],n=E.bboxClip(s,l),n.geometry.coordinates.length&&t.push(n)}else{const l=[o,e._sw.lat,r,e._ne.lat],n=E.bboxClip(s,l);n.geometry.coordinates.length&&t.push(n)}else t.push(s)}),t},handleWeatherLayerToggle(){var a;for(const e in this.weatherLayers)this.weatherLayers[e].active=!1,this.weatherLayers[e].version=Math.random()+1;for(const e of this.activeWeatherLayers){let t=e.key;t.indexOf("swell")>-1?t="swell":t.indexOf("current")>-1&&(t="current"),this.weatherLayers[t]&&(this.weatherLayers[t].active=!0,this.weatherLayers[t].version=Math.random()+1,((a=this.particleFactor)==null?void 0:a.key)===t&&this.weatherLayers[`${t}-particle`]&&(this.weatherLayers[`${t}-particle`].active=this.particleFactor.particle))}this.handleBeforeLayerToggle()},handleBeforeLayerToggle(){var a,e,t,o,r,s,l,n,c,h,f,d,m;(a=this.map)!=null&&a.getLayer(this.beforeLayer)&&((e=this.activeWeatherLayers)!=null&&e.length||(t=this.otherLayers)!=null&&t["war-zones"]||(o=this.otherLayers)!=null&&o["gmdss-areas"]||(r=this.otherLayers)!=null&&r["load-lines"]||(s=this.otherLayers)!=null&&s["high-risk-area"]||(l=this.otherLayers)!=null&&l["time-zones"]||(n=this.otherLayers)!=null&&n.pirates||(c=this.otherLayers)!=null&&c.ports||(h=this.otherLayers)!=null&&h.enc||(f=this.otherLayers)!=null&&f["voluntary-reporting-area"]||(d=this.otherLayers)!=null&&d["eca-zones"]||(m=this.otherLayers)!=null&&m["special-area"])&&this.map.setLayoutProperty(this.beforeLayer,"visibility","visible")},handleDateChange(a={tropicals:!1}){this.fetchWeatherLayers(a),this.fetchOtherLayers({dayNight:!0})},handleWeatherLayerChange(a,e,t){if(!this.map)setTimeout(()=>{this.handleWeatherLayerChange(a,e,t)},500);else{this.activeWeatherLayers=e;const o=this.activeWeatherLayers.some(l=>["wind","current"].includes(l.key)),r=this.activeWeatherLayers.some(l=>["png","jpg"].includes(l.type));o&&!r?(this.particleFactor=this.activeWeatherLayers.find(l=>["wind","current"].includes(l.key)),this.particleFactor.particle=!0):r&&this.particleFactor&&(this.particleFactor.particle=!1);const s=e==null?void 0:e.reduce((l,n)=>l+(l&(n==null?void 0:n.weight)?0:n==null?void 0:n.weight),0);this.weatherWeight!==s||this.source!==t?(this.source=t,this.weatherWeight=s,this.fetchWeatherLayers({tropicals:!1})):this.handleWeatherLayerToggle()}},handleOtherLayerChange(a){if(!this.map)setTimeout(()=>{this.handleOtherLayerChange(a)},500);else{const e=a==null?void 0:a.reduce((t,o)=>t+(o==null?void 0:o.weight),0);this.otherWeight!=e&&(this.otherWeight=e,this.fetchOtherLayers({all:!0}))}},async handlePointChange(a){const e=this.ts?W(this.ts):W(),t={lat:a.lat,lng:a.lng,ts:e.utc().format(),wt:!0,src:this.source},o=await H.get(`${this.gateway}/api/arc/meteo/query`,{params:t,headers:{Authorization:this.token||this.defaultMeteoToken}});(o==null?void 0:o.status)===200&&(this.meteo={...o==null?void 0:o.data,...a})},handle3dToggle(a){a?this.map.setProjection("globe"):this.map.setProjection("mercator")},handleParticle(a){this.particleFactor=a,this.fetchWeatherLayers({tropicals:!1})}}},wr={key:0,class:"map-gl-home"};function vr(a,e,t,o,r,s){var j,Q,oe,se,ne,le,ce,he,de,pe,me,ye,fe,ge,ue,be,_e,Le,Se,Te,Ve,Ie,$e,Re,De,Be;const l=i.resolveComponent("IdmGlLayer"),n=i.resolveComponent("IdmENC"),c=i.resolveComponent("IdmSigWave"),h=i.resolveComponent("IdmSwell"),f=i.resolveComponent("IdmPrmsl"),d=i.resolveComponent("IdmIceberg"),m=i.resolveComponent("IdmTropicals"),y=i.resolveComponent("IdmCurrents"),u=i.resolveComponent("IdmCurrentParticle"),g=i.resolveComponent("IdmWindBarb"),p=i.resolveComponent("IdmWindParticle"),_=i.resolveComponent("IdmPrecip3h"),b=i.resolveComponent("IdmVisibility"),w=i.resolveComponent("IdmWaterTemp"),x=i.resolveComponent("IdmTemp"),L=i.resolveComponent("IdmArctic"),S=i.resolveComponent("IdmWarZone"),N=i.resolveComponent("IdmGmdssArea"),T=i.resolveComponent("IdmEcaZone"),$=i.resolveComponent("IdmAlertZone"),R=i.resolveComponent("IdmPort"),z=i.resolveComponent("IdmLoadLine"),O=i.resolveComponent("IdmTimezone"),J=i.resolveComponent("IdmVRA"),ie=i.resolveComponent("IdmSpecialArea"),q=i.resolveComponent("IdmTerminator"),P=i.resolveComponent("IdmLatLng"),B=i.resolveComponent("IdmMeasure"),re=i.resolveComponent("IdmPoint");return t.map?(i.openBlock(),i.createElementBlock("div",wr,[i.createVNode(l,i.mergeProps({ref:"layer",map:t.map,"toggle-version":r.toggleVersion},a.$attrs,{onWeather:s.handleWeatherLayerChange,onOther:s.handleOtherLayerChange,onCoordinate:e[0]||(e[0]=F=>r.showCoord=F),onMeasure:e[1]||(e[1]=F=>r.showMeasure=F),onPoint:e[2]||(e[2]=F=>r.showPoint=F),on3d:s.handle3dToggle,onToggleVersion:e[3]||(e[3]=F=>r.toggleVersion=F)}),null,16,["map","toggle-version","onWeather","onOther","on3d"]),i.createVNode(n,i.mergeProps({map:t.map,token:t.token,enabled:(j=r.otherLayers)==null?void 0:j.enc,"toggle-version":r.toggleVersion},a.$attrs,{onEnc:e[4]||(e[4]=F=>r.enc=F)}),null,16,["map","token","enabled","toggle-version"]),i.createVNode(c,i.mergeProps({map:t.map,"sig-wave":(Q=r.weatherLayers)==null?void 0:Q["sig-wave-height"],"before-layer":t.beforeLayer},a.$attrs),null,16,["map","sig-wave","before-layer"]),i.createVNode(h,i.mergeProps({map:t.map,swell:(oe=r.weatherLayers)==null?void 0:oe.swell,"before-layer":t.beforeLayer},a.$attrs),null,16,["map","swell","before-layer"]),i.createVNode(f,i.mergeProps({map:t.map,prmsl:(se=r.weatherLayers)==null?void 0:se.prmsl,"before-layer":t.beforeLayer},a.$attrs),null,16,["map","prmsl","before-layer"]),i.createVNode(d,i.mergeProps({map:t.map,iceberg:(ne=r.weatherLayers)==null?void 0:ne.iceberg,"before-layer":t.beforeLayer},a.$attrs),null,16,["map","iceberg","before-layer"]),i.createVNode(m,i.mergeProps({map:t.map,date:t.ts,tropicals:(le=r.weatherLayers)==null?void 0:le.tropicals,"before-layer":t.beforeLayer},a.$attrs),null,16,["map","date","tropicals","before-layer"]),i.createVNode(y,i.mergeProps({map:t.map,current:(ce=r.weatherLayers)==null?void 0:ce.current,"before-layer":t.beforeLayer,"show-particle":r.showCurrentParticle,"margin-bottom":r.activeWindLayer?r.showRampColor?"84px":"56px":r.showRampColor?"56px":"30px","toggle-version":r.toggleVersion,"weather-layers":r.weatherLayers},a.$attrs,{onParticle:s.handleParticle}),null,16,["map","current","before-layer","show-particle","margin-bottom","toggle-version","weather-layers","onParticle"]),i.createVNode(u,i.mergeProps({viewport:r.viewport,factor:(he=r.weatherLayers)==null?void 0:he["current-particle"],"before-layer":t.beforeLayer,"toggle-version":r.toggleVersion},a.$attrs),null,16,["viewport","factor","before-layer","toggle-version"]),i.createVNode(g,i.mergeProps({ref:"windBarb",map:t.map,wind:(de=r.weatherLayers)==null?void 0:de.wind,current:(pe=r.weatherLayers)==null?void 0:pe.current,"before-layer":t.beforeLayer,"margin-bottom":r.showRampColor?"56px":"30px","show-particle":r.showWindParticle},a.$attrs,{"toggle-version":r.toggleVersion,"weather-layers":r.weatherLayers,onParticle:s.handleParticle}),null,16,["map","wind","current","before-layer","margin-bottom","show-particle","toggle-version","weather-layers","onParticle"]),i.createVNode(p,i.mergeProps({viewport:r.viewport,factor:(me=r.weatherLayers)==null?void 0:me["wind-particle"],"before-layer":t.beforeLayer,"toggle-version":r.toggleVersion},a.$attrs),null,16,["viewport","factor","before-layer","toggle-version"]),i.createVNode(_,i.mergeProps({viewport:r.viewport,factor:(ye=r.weatherLayers)==null?void 0:ye.precip3h,"before-layer":t.beforeLayer,"toggle-version":r.toggleVersion},a.$attrs),null,16,["viewport","factor","before-layer","toggle-version"]),i.createVNode(b,i.mergeProps({viewport:r.viewport,factor:(fe=r.weatherLayers)==null?void 0:fe.visibility,"before-layer":t.beforeLayer,"toggle-version":r.toggleVersion},a.$attrs),null,16,["viewport","factor","before-layer","toggle-version"]),i.createVNode(w,i.mergeProps({viewport:r.viewport,factor:(ge=r.weatherLayers)==null?void 0:ge["water-temp"],"before-layer":t.beforeLayer,"toggle-version":r.toggleVersion},a.$attrs),null,16,["viewport","factor","before-layer","toggle-version"]),i.createVNode(x,i.mergeProps({viewport:r.viewport,factor:(ue=r.weatherLayers)==null?void 0:ue.temp,"before-layer":t.beforeLayer,"toggle-version":r.toggleVersion},a.$attrs),null,16,["viewport","factor","before-layer","toggle-version"]),i.createVNode(L,i.mergeProps({viewport:r.viewport,factor:(be=r.weatherLayers)==null?void 0:be.arctic,"before-layer":t.beforeLayer,"toggle-version":r.toggleVersion},a.$attrs),null,16,["viewport","factor","before-layer","toggle-version"]),i.createVNode(S,i.mergeProps({map:t.map,zone:(_e=r.otherLayers)==null?void 0:_e["war-zones"],"before-layer":t.beforeLayer},a.$attrs),null,16,["map","zone","before-layer"]),i.createVNode(N,i.mergeProps({map:t.map,area:(Le=r.otherLayers)==null?void 0:Le["gmdss-areas"],"before-layer":t.beforeLayer},a.$attrs),null,16,["map","area","before-layer"]),i.createVNode(T,i.mergeProps({map:t.map,zone:(Se=r.otherLayers)==null?void 0:Se["eca-zones"],"before-layer":t.beforeLayer},a.$attrs),null,16,["map","zone","before-layer"]),i.createVNode($,i.mergeProps({map:t.map,zone:(Te=r.otherLayers)==null?void 0:Te["alert-zones"],"before-layer":t.beforeLayer},a.$attrs),null,16,["map","zone","before-layer"]),i.createVNode(R,i.mergeProps({map:t.map,port:(Ve=r.otherLayers)==null?void 0:Ve.ports,"before-layer":t.beforeLayer},a.$attrs),null,16,["map","port","before-layer"]),i.createVNode(z,i.mergeProps({map:t.map,line:(Ie=r.otherLayers)==null?void 0:Ie["load-lines"],"before-layer":t.beforeLayer},a.$attrs),null,16,["map","line","before-layer"]),i.createVNode(O,i.mergeProps({map:t.map,zone:($e=r.otherLayers)==null?void 0:$e["time-zones"],"before-layer":t.beforeLayer},a.$attrs),null,16,["map","zone","before-layer"]),i.createVNode(J,i.mergeProps({map:t.map,area:(Re=r.otherLayers)==null?void 0:Re["voluntary-reporting-area"],"before-layer":t.beforeLayer},a.$attrs),null,16,["map","area","before-layer"]),i.createVNode(ie,i.mergeProps({map:t.map,area:(De=r.otherLayers)==null?void 0:De["special-area"],"before-layer":t.beforeLayer},a.$attrs),null,16,["map","area","before-layer"]),i.createVNode(q,i.mergeProps({map:t.map,area:(Be=r.otherLayers)==null?void 0:Be["day-night"]},a.$attrs),null,16,["map","area"]),i.createVNode(P,i.mergeProps({map:t.map,show:r.showCoord,"toggle-version":r.toggleVersion},a.$attrs),null,16,["map","show","toggle-version"]),i.createVNode(B,i.mergeProps({map:t.map,show:r.showMeasure},a.$attrs),null,16,["map","show"]),i.createVNode(re,i.mergeProps({map:t.map,show:r.showPoint,meteo:r.meteo},a.$attrs,{onPoint:s.handlePointChange}),null,16,["map","show","meteo","onPoint"])])):i.createCommentVNode("",!0)}const Ne=C(Lr,[["render",vr]]),Er={install(a){a.component("MapboxGL",Ne),a.component("TropicalGL",xe),a.component("LatLngGL",Ce)}};k.LatLngGL=Ce,k.MapboxGL=Ne,k.MapboxGLPlugin=Er,k.TropicalGL=xe,Object.defineProperty(k,Symbol.toStringTag,{value:"Module"})});
204
+ </svg>`,j=document.createElement("div");j.className="hurricane-hourly-marker",j.innerHTML=`<div class="${P.geometry.coordinates[1]>=0?"center north":"center south"}">${re}</div>`;const Q=new U.Marker(j).setLngLat(P.geometry.coordinates).addTo(this.map);this.interpolateMarkers.push(Q)}}else(R=this.map)!=null&&R.getSource(this.interpolateSource)&&((z=this.map)==null||z.getSource(this.interpolateSource).setData(this.empty))},handleClick(a){var s,l,n,c,h,f;const e=a.features[0],t=(l=(s=this.tropicals)==null?void 0:s.data)==null?void 0:l.features.filter(d=>{var m;return d.geometry.type==="LineString"&&d.properties.type==="forecast"&&d.properties.name===((m=e==null?void 0:e.properties)==null?void 0:m.name)});t.sort((d,m)=>{var y,u,g,p;return((y=d.properties)==null?void 0:y.model)==="cma"?-1:((u=d.properties)==null?void 0:u.model)==="jma"?((g=m.properties)==null?void 0:g.model)==="cma"?1:-1:d.properties.model==="ecmwf"?["jma","cma"].includes((p=m.properties)==null?void 0:p.model)?1:-1:0});const o=(c=(n=this.tropicals)==null?void 0:n.data)==null?void 0:c.features.filter(d=>{var m;return d.geometry.type==="LineString"&&d.properties.type==="history"&&d.properties.name===((m=e==null?void 0:e.properties)==null?void 0:m.name)});this.activeTropicals={name:(h=e==null?void 0:e.properties)==null?void 0:h.name,forecasts:t.map(d=>d.properties),history:(f=o[0])==null?void 0:f.properties},this.showTropicals=!0;const r=document.getElementById("active-tropical");this.activeTropicalsMarker?this.activeTropicalsMarker.setLngLat([a.lngLat.lng,a.lngLat.lat]):this.activeTropicalsMarker=new U.Marker(r).setLngLat([a.lngLat.lng,a.lngLat.lat]).setOffset([220,0]).addTo(this.map)},handleForecastToggle(a){var o,r,s,l,n,c;a.disabled=!a.disabled;const e=`${a.name}-${a.model}`,t=(r=(o=this.map)==null?void 0:o.getSource(this.source)._data)==null?void 0:r.features;t.forEach(h=>{h.properties.category===e&&(h.properties.disabled=a.disabled)}),this.interpolateData.forEach(h=>{h.properties.category===e&&(h.properties.disabled=a.disabled)}),(l=(s=this.map)==null?void 0:s.getSource(this.source))==null||l.setData(E.featureCollection(t)),(c=(n=this.map)==null?void 0:n.getSource(this.clusterSource))==null||c.setData(E.featureCollection(t)),this.handleDateChange()},handleStrikeProbability(a){this.$emit("tropicalProbability",a)},handleComputePolygons(a){const e=[];for(const t of a){const o=t.properties.wind,r={ne:o.r7ne>=0?o.r7ne:void 0,se:o.r7se>=0?o.r7se:void 0,sw:o.r7sw>=0?o.r7sw:void 0,nw:o.r7nw>=0?o.r7nw:void 0},s=this.handleComputeArc(t.geometry.coordinates,r,{...t.properties,level:7});e.push(s);const l={ne:o.r10ne>=0?o.r10ne:void 0,se:o.r10se>=0?o.r10se:void 0,sw:o.r10sw>=0?o.r10sw:void 0,nw:o.r10nw>=0?o.r10nw:void 0},n=this.handleComputeArc(t.geometry.coordinates,l,{...t.properties,level:10});e.push(n)}return e},handleComputeArc(a,e,t){var s;const o=[];for(const l in e){const n=e[l]??0;let c;switch(l){case"ne":c=E.lineArc(a,n*1.852,0,90,{steps:n>0?64:1});break;case"se":c=E.lineArc(a,n*1.852,90,180,{steps:n>0?64:1});break;case"sw":c=E.lineArc(a,n*1.852,180,270,{steps:n>0?64:1});break;case"nw":c=E.lineArc(a,n*1.852,270,360,{steps:n>0?64:1});break}o.push(...(s=c==null?void 0:c.geometry)==null?void 0:s.coordinates)}const r=E.lineString(o);return E.lineToPolygon(r,{properties:t})}}},Ee=a=>(i.pushScopeId("data-v-bb8414b4"),a=a(),i.popScopeId(),a),Qt={id:"active-tropical",class:"active-tropical"},ea={class:"header-box"},ta={class:"main"},aa={key:0},ia={class:"sub"},ra={id:"meteoBox",class:"main-box"},oa={class:"content"},sa={class:"row"},na={class:"col col-left",style:{"justify-content":"flex-start"}},la=Ee(()=>i.createElementVNode("label",null,"Wind speed : ",-1)),ca={class:"col col-right",style:{"justify-content":"flex-start"}},ha=Ee(()=>i.createElementVNode("label",null,"Pressure : ",-1)),da={class:"row"},pa={class:"col col-24",style:{"justify-content":"flex-start"}},ma=Ee(()=>i.createElementVNode("label",{style:{width:"max-content"}},"Forecast Models : ",-1)),ya={class:"forecast-models"},fa=["onClick"],ga=i.createStaticVNode('<div class="row" style="padding:0;height:1px;margin:10px 0;background:var(--idm-black-1);" data-v-bb8414b4></div><div class="row" style="padding:2px 10px;" data-v-bb8414b4><div class="legend" data-v-bb8414b4><div class="icon td" data-v-bb8414b4></div><div class="label" data-v-bb8414b4>TD</div></div><div class="legend" data-v-bb8414b4><div class="icon ts" data-v-bb8414b4></div><div class="label" data-v-bb8414b4>TS</div></div><div class="legend" data-v-bb8414b4><div class="icon sts" data-v-bb8414b4></div><div class="label" data-v-bb8414b4>STS</div></div><div class="legend" data-v-bb8414b4><div class="icon ty" data-v-bb8414b4></div><div class="label" data-v-bb8414b4>TY</div></div><div class="legend" data-v-bb8414b4><div class="icon sty" data-v-bb8414b4></div><div class="label" data-v-bb8414b4>STY</div></div><div class="legend" data-v-bb8414b4><div class="icon supper-ty" data-v-bb8414b4></div><div class="label" data-v-bb8414b4>Super TY</div></div></div><div class="row" style="padding:2px 10px;" data-v-bb8414b4><div class="legend" data-v-bb8414b4><div class="icon history" data-v-bb8414b4></div><div class="label" data-v-bb8414b4>History</div></div><div class="legend" data-v-bb8414b4><div class="icon r7" data-v-bb8414b4></div><div class="label" data-v-bb8414b4>35kts Radii</div></div><div class="legend" data-v-bb8414b4><div class="icon r10" data-v-bb8414b4></div><div class="label" data-v-bb8414b4>50kts Radii</div></div></div>',3),ua={class:"more"};function ba(a,e,t,o,r,s){var l,n,c,h,f,d,m,y,u,g,p,_,b,w,x;return i.withDirectives((i.openBlock(),i.createElementBlock("div",Qt,[i.createElementVNode("div",ea,[i.createElementVNode("div",{class:"iconfont close-btn",onClick:e[0]||(e[0]=L=>r.showTropicals=!1)},""),i.createElementVNode("div",ta,[(n=(l=r.activeTropicals)==null?void 0:l.history)!=null&&n.level?(i.openBlock(),i.createElementBlock("span",aa,i.toDisplayString((h=(c=r.activeTropicals)==null?void 0:c.history)==null?void 0:h.level)+" , ",1)):i.createCommentVNode("",!0),i.createTextVNode(i.toDisplayString((f=r.activeTropicals)==null?void 0:f.name),1)]),i.createElementVNode("div",ia," Last update: "+i.toDisplayString(s.computeTime(((m=(d=r.activeTropicals)==null?void 0:d.history)==null?void 0:m.updated)||((g=(u=(y=r.activeTropicals)==null?void 0:y.forecasts)==null?void 0:u.filter(L=>!L.disabled)[0])==null?void 0:g.date))),1)]),i.createElementVNode("div",ra,[i.createElementVNode("div",oa,[i.createElementVNode("div",sa,[i.createElementVNode("div",na,[la,i.createElementVNode("span",null,i.toDisplayString(((_=(p=r.activeTropicals)==null?void 0:p.history)==null?void 0:_.kts)||"-")+"[kts]",1)]),i.createElementVNode("div",ca,[ha,i.createElementVNode("span",null,i.toDisplayString(((w=(b=r.activeTropicals)==null?void 0:b.history)==null?void 0:w.pressure)||"-")+"[hPa]",1)])]),i.createElementVNode("div",da,[i.createElementVNode("div",pa,[ma,i.createElementVNode("div",ya,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList((x=r.activeTropicals)==null?void 0:x.forecasts,(L,S)=>{var N,T,$,R;return i.openBlock(),i.createElementBlock("div",{key:S,class:i.normalizeClass(["model",L.disabled?"":"active",S>0&&S<((T=(N=r.activeTropicals)==null?void 0:N.forecasts)==null?void 0:T.length)-1&&((R=($=r.activeTropicals)==null?void 0:$.forecasts)==null?void 0:R.length)>2?"center-child":""]),onClick:z=>s.handleForecastToggle(L)},[i.createElementVNode("span",{class:i.normalizeClass(L.model)},i.toDisplayString(L.model),3)],10,fa)}),128))])])]),ga]),i.createElementVNode("div",ua,[i.createElementVNode("div",{class:"button",onClick:e[1]||(e[1]=L=>s.handleStrikeProbability(r.activeTropicals))},"Strike Probability >>")])])],512)),[[i.vShow,r.showTropicals]])}const xe=C(Kt,[["render",ba],["__scopeId","data-v-bb8414b4"]]),eo="",_a={name:"IdmPrecip3h",props:{factor:{type:Object},viewport:{type:Object},bottom:{type:String,default:"70px"},toggleVersion:{type:Number}},data(){return{program:void 0,context:void 0,texture:void 0,rampColor:void 0,aPositionBuffer:void 0,webgl:new Y,etime:void 0,right:10}},watch:{"factor.version":{handler(){var a;(a=this.factor)!=null&&a.active?this.handleRender():this.handleClear()},deep:!0},toggleVersion:{handler(){var a,e;this.right=(((a=document.getElementsByClassName("available-layers-show")[0])==null?void 0:a.clientWidth)||0)+(((e=document.getElementsByClassName("fleet-list-container")[0])==null?void 0:e.clientWidth)||0)+10},immediate:!0}},methods:{handleRender(){if(!this.viewport)setTimeout(()=>{this.handleRender()},500);else if(this.factor){const a=new Date().valueOf();let e=0,t=0;this.handleDraw(),t=new Date().valueOf()-(a+e),console.log("[precip3h] add elapsed: ",t,", total: ",e+=t)}},handleClear(){this.context=void 0,this.etime=void 0,this.viewport.toggle(!1)},handleSetup(){if(!this.context){this.context=this.viewport.rampColorCanvas.getContext("webgl");const a=[[0,"rgba(59, 126, 162, 0)"],[14/255,"rgba(84,170,230, 0)"],[15/255,"rgba(172, 210, 255, 0.8)"],[20/255,"rgba(51,202,248,0.8)"],[30/255,"rgba(3,248,103,0.8)"],[49/255,"rgba(14,201,3,0.8)"],[57/255,"rgba(190,226,2,0.8)"],[73/255,"rgba(248,1,1,0.8)"],[82/255,"rgba(197,5,58,0.8)"],[1,"rgba(197,5,58,0.8)"]];this.rampColor=this.webgl.setup(this.context,a);const{program:e,aPositionBuffer:t}=this.webgl.bind(this.context,I.vertexSchema,I.fragmentSchema);this.program=e,this.aPositionBuffer=t}},async handleDraw(){if(this.handleSetup(),this.etime!==this.factor.etime){this.etime=this.factor.etime;const a=await this.webgl.loadImg(this.factor.raw);this.texture=this.webgl.createTexture(this.context,this.context.NEAREST,this.context.LINEAR,this.context.CLAMP_TO_EDGE,a)}this.webgl.draw(this.viewport,this.context,this.program,this.texture,this.rampColor.texture,this.aPositionBuffer),this.viewport.toggle(!0)}}},X=a=>(i.pushScopeId("data-v-42b977ed"),a=a(),i.popScopeId(),a),La={key:0},wa=[X(()=>i.createElementVNode("span",null,"mm",-1)),X(()=>i.createElementVNode("span",null,"1.5",-1)),X(()=>i.createElementVNode("span",null,"2",-1)),X(()=>i.createElementVNode("span",null,"3",-1)),X(()=>i.createElementVNode("span",null,"7",-1)),X(()=>i.createElementVNode("span",null,"10",-1)),X(()=>i.createElementVNode("span",null,"20",-1)),X(()=>i.createElementVNode("span",null,"30",-1))];function va(a,e,t,o,r,s){var l;return(l=t.factor)!=null&&l.active?(i.openBlock(),i.createElementBlock("div",La,[i.createElementVNode("div",{class:"legend-bars flex-center",style:i.normalizeStyle([{position:"absolute"},{right:r.right+"px",bottom:t.bottom}])},wa,4)])):i.createCommentVNode("",!0)}const Ea=C(_a,[["render",va],["__scopeId","data-v-42b977ed"]]),co="",xa={name:"IdmVisibility",props:{factor:{type:Object},viewport:{type:Object},bottom:{type:String,default:"70px"},toggleVersion:{type:Number}},data(){return{program:void 0,context:void 0,texture:void 0,rampColor:void 0,aPositionBuffer:void 0,webgl:new Y,etime:void 0}},watch:{"factor.version":{handler(){var a;(a=this.factor)!=null&&a.active?this.handleRender():this.handleClear()},deep:!0},toggleVersion:{handler(){var a,e;this.right=(((a=document.getElementsByClassName("available-layers-show")[0])==null?void 0:a.clientWidth)||0)+(((e=document.getElementsByClassName("fleet-list-container")[0])==null?void 0:e.clientWidth)||0)+10},immediate:!0}},methods:{handleRender(){if(!this.viewport)setTimeout(()=>{this.handleRender()},500);else if(this.factor){const a=new Date().valueOf();let e=0,t=0;this.handleDraw(),t=new Date().valueOf()-(a+e),console.log("[visibility] add elapsed: ",t,", total: ",e+=t)}},handleClear(){this.context=void 0,this.etime=void 0,this.viewport.toggle(!1)},handleSetup(){if(!this.context){this.context=this.viewport.rampColorCanvas.getContext("webgl");const a=[[0,"rgba(189,50,160,0.8)"],[8/255,"rgba(208,56,56,0.8)"],[27/255,"rgba(190,226,2,0.8)"],[60/255,"rgba(3,236,118,0.8)"],[160/255,"rgba(172, 210,255,0.8)"],[161/255,"rgba(172, 210,255,0)"],[1,"rgba(144,144,144,0)"]];this.rampColor=this.webgl.setup(this.context,a);const{program:e,aPositionBuffer:t}=this.webgl.bind(this.context,I.vertexSchema,I.fragmentSchema);this.program=e,this.aPositionBuffer=t}},async handleDraw(){if(this.handleSetup(),this.etime!==this.factor.etime){this.etime=this.factor.etime;const a=await this.webgl.loadImg(this.factor.raw);this.texture=this.webgl.createTexture(this.context,this.context.NEAREST,this.context.LINEAR,this.context.CLAMP_TO_EDGE,a)}this.webgl.draw(this.viewport,this.context,this.program,this.texture,this.rampColor.texture,this.aPositionBuffer),this.viewport.toggle(!0)}}},ee=a=>(i.pushScopeId("data-v-2a5fbadd"),a=a(),i.popScopeId(),a),Ca={key:0},Sa=[ee(()=>i.createElementVNode("span",null,"nm",-1)),ee(()=>i.createElementVNode("span",null,"0",-1)),ee(()=>i.createElementVNode("span",null,"0.5",-1)),ee(()=>i.createElementVNode("span",null,"1.5",-1)),ee(()=>i.createElementVNode("span",null,"3",-1)),ee(()=>i.createElementVNode("span",null,"9",-1))];function ka(a,e,t,o,r,s){var l;return(l=t.factor)!=null&&l.active?(i.openBlock(),i.createElementBlock("div",Ca,[i.createElementVNode("div",{class:"legend-bars flex-center",style:i.normalizeStyle([{position:"absolute"},{right:a.right+"px",bottom:t.bottom}])},Sa,4)])):i.createCommentVNode("",!0)}const Pa=C(xa,[["render",ka],["__scopeId","data-v-2a5fbadd"]]),uo="",Na={name:"IdmWaterTemp",props:{factor:{type:Object},viewport:{type:Object},bottom:{type:String,default:"70px"},toggleVersion:{type:Number}},data(){return{program:void 0,context:void 0,texture:void 0,rampColor:void 0,aPositionBuffer:void 0,webgl:new Y,etime:void 0,right:10}},watch:{"factor.version":{handler(){var a;(a=this.factor)!=null&&a.active?this.handleRender():this.handleClear()},deep:!0},toggleVersion:{handler(){var a,e;this.right=(((a=document.getElementsByClassName("available-layers-show")[0])==null?void 0:a.clientWidth)||0)+(((e=document.getElementsByClassName("fleet-list-container")[0])==null?void 0:e.clientWidth)||0)+10},immediate:!0}},methods:{handleRender(){if(!this.viewport)setTimeout(()=>{this.handleRender()},500);else if(this.factor){const a=new Date().valueOf();let e=0,t=0;this.handleDraw(),t=new Date().valueOf()-(a+e),console.log("[water-temp] add elapsed: ",t,", total: ",e+=t)}},handleClear(){this.context=void 0,this.etime=void 0,this.viewport.toggle(!1)},handleSetup(){if(!this.context){this.context=this.viewport.rampColorCanvas.getContext("webgl");const a=[[0,"rgba(95, 143, 197)"],[46/255,"rgba(95, 143, 197)"],[69/255,"rgb(80, 140, 62)"],[92/255,"rgb(121, 146, 28)"],[115/255,"rgb(171, 161, 14)"],[138/255,"rgb(223, 177, 69)"],[161/255,"rgb(243, 150, 6)"],[184/255,"rgb(236, 95, 21)"],[207/255,"rgb(190, 65, 18)"],[230/255,"rgb(138, 43, 10)"],[1,"rgb(138, 43, 10)"]];this.rampColor=this.webgl.setup(this.context,a);const{program:e,aPositionBuffer:t}=this.webgl.bind(this.context,I.vertexSchema,I.fragmentSchema);this.program=e,this.aPositionBuffer=t}},async handleDraw(){if(this.handleSetup(),this.etime!==this.factor.etime){this.etime=this.factor.etime;const a=await this.webgl.loadImg(this.factor.raw);this.texture=this.webgl.createTexture(this.context,this.context.NEAREST,this.context.LINEAR,this.context.CLAMP_TO_EDGE,a)}this.webgl.draw(this.viewport,this.context,this.program,this.texture,this.rampColor.texture,this.aPositionBuffer),this.viewport.toggle(!0)}}},te=a=>(i.pushScopeId("data-v-5b28deaf"),a=a(),i.popScopeId(),a),Ta={key:0},Va=[te(()=>i.createElementVNode("span",null,"°C",-1)),te(()=>i.createElementVNode("span",null,"0",-1)),te(()=>i.createElementVNode("span",null,"10",-1)),te(()=>i.createElementVNode("span",null,"20",-1)),te(()=>i.createElementVNode("span",null,"30",-1)),te(()=>i.createElementVNode("span",null,"40",-1))];function Ia(a,e,t,o,r,s){var l;return(l=t.factor)!=null&&l.active?(i.openBlock(),i.createElementBlock("div",Ta,[i.createElementVNode("div",{class:"legend-bars flex-center",style:i.normalizeStyle([{position:"absolute"},{right:r.right+"px",bottom:t.bottom}])},Va,4)])):i.createCommentVNode("",!0)}const $a=C(Na,[["render",Ia],["__scopeId","data-v-5b28deaf"]]),xo="",Ra={name:"IdmTemp",props:{factor:{type:Object},viewport:{type:Object},bottom:{type:String,default:"70px"},toggleVersion:{type:Number}},data(){return{program:void 0,context:void 0,texture:void 0,rampColor:void 0,aPositionBuffer:void 0,webgl:new Y,etime:void 0,right:10}},watch:{"factor.version":{handler(){var a;(a=this.factor)!=null&&a.active?this.handleRender():this.handleClear()},deep:!0},toggleVersion:{handler(){var a,e;this.right=(((a=document.getElementsByClassName("available-layers-show")[0])==null?void 0:a.clientWidth)||0)+(((e=document.getElementsByClassName("fleet-list-container")[0])==null?void 0:e.clientWidth)||0)+10},immediate:!0}},methods:{handleRender(){if(!this.viewport)setTimeout(()=>{this.handleRender()},500);else if(this.factor){const a=new Date().valueOf();let e=0,t=0;this.handleDraw(),t=new Date().valueOf()-(a+e),console.log("[water-temp] add elapsed: ",t,", total: ",e+=t)}},handleClear(){this.context=void 0,this.etime=void 0,this.viewport.toggle(!1)},handleSetup(){if(!this.context){this.context=this.viewport.rampColorCanvas.getContext("webgl");const a=[[0,"rgb(149, 137, 211)"],[100/255,"rgb(149, 137, 211)"],[110/255,"rgb(150, 209, 216)"],[120/255,"rgb(129, 204, 197)"],[130/255,"rgb(103, 180, 186)"],[140/255,"rgb(95, 143, 197)"],[150/255,"rgb(80, 140, 62)"],[160/255,"rgb(121, 146, 28)"],[170/255,"rgb(171, 161, 14)"],[180/255,"rgb(223, 177, 6)"],[190/255,"rgb(243, 150, 6)"],[200/255,"rgb(236, 95, 21)"],[210/255,"rgb(190, 65, 18)"],[220/255,"rgb(138, 43, 10)"],[1,"rgb(138, 43, 10)"]];this.rampColor=this.webgl.setup(this.context,a);const{program:e,aPositionBuffer:t}=this.webgl.bind(this.context,I.vertexSchema,I.fragmentSchema);this.program=e,this.aPositionBuffer=t}},async handleDraw(){if(this.handleSetup(),this.etime!==this.factor.etime){this.etime=this.factor.etime;const a=await this.webgl.loadImg(this.factor.raw);this.texture=this.webgl.createTexture(this.context,this.context.NEAREST,this.context.LINEAR,this.context.CLAMP_TO_EDGE,a)}this.webgl.draw(this.viewport,this.context,this.program,this.texture,this.rampColor.texture,this.aPositionBuffer),this.viewport.toggle(!0)}}},Z=a=>(i.pushScopeId("data-v-72cd9cf1"),a=a(),i.popScopeId(),a),Da={key:0},Ba=[Z(()=>i.createElementVNode("span",null,"°C",-1)),Z(()=>i.createElementVNode("span",null,"-20",-1)),Z(()=>i.createElementVNode("span",null,"-10",-1)),Z(()=>i.createElementVNode("span",null,"0",-1)),Z(()=>i.createElementVNode("span",null,"10",-1)),Z(()=>i.createElementVNode("span",null,"20",-1)),Z(()=>i.createElementVNode("span",null,"30",-1)),Z(()=>i.createElementVNode("span",null,"40",-1))];function Aa(a,e,t,o,r,s){var l;return(l=t.factor)!=null&&l.active?(i.openBlock(),i.createElementBlock("div",Da,[i.createElementVNode("div",{class:"legend-bars flex-center",style:i.normalizeStyle([{position:"absolute"},{right:r.right+"px",bottom:t.bottom}])},Ba,4)])):i.createCommentVNode("",!0)}const za=C(Ra,[["render",Aa],["__scopeId","data-v-72cd9cf1"]]),$o="",Ma={name:"IdmArctic",props:{factor:{type:Object},viewport:{type:Object},bottom:{type:String,default:"70px"},toggleVersion:{type:Number}},data(){return{program:void 0,context:void 0,texture:void 0,rampColor:void 0,aPositionBuffer:void 0,webgl:new Y,etime:void 0,right:10}},watch:{"factor.version":{handler(){var a;(a=this.factor)!=null&&a.active?this.handleRender():this.handleClear()},deep:!0},toggleVersion:{handler(){var a,e;this.right=(((a=document.getElementsByClassName("available-layers-show")[0])==null?void 0:a.clientWidth)||0)+(((e=document.getElementsByClassName("fleet-list-container")[0])==null?void 0:e.clientWidth)||0)+10},immediate:!0}},methods:{handleRender(){if(!this.viewport)setTimeout(()=>{this.handleRender()},500);else if(this.factor){const a=new Date().valueOf();let e=0,t=0;this.handleDraw(),t=new Date().valueOf()-(a+e),console.log("[water-temp] add elapsed: ",t,", total: ",e+=t)}},handleClear(){this.context=void 0,this.etime=void 0,this.viewport.toggle(!1)},handleSetup(){if(!this.context){this.context=this.viewport.rampColorCanvas.getContext("webgl");const a=[[0,"rgba(76, 165, 228, 0)"],[50/255,"rgba(76, 165, 228, 0)"],[51/255,"rgb(76, 165, 228)"],[102/255,"rgb(129, 204, 197)"],[153/255,"rgb(150, 209, 216)"],[204/255,"rgb(180, 209, 216)"],[1,"rgb(180, 209, 216)"]];this.rampColor=this.webgl.setup(this.context,a);const{program:e,aPositionBuffer:t}=this.webgl.bind(this.context,I.vertexSchema,I.fragmentSchema);this.program=e,this.aPositionBuffer=t}},async handleDraw(){if(this.handleSetup(),this.etime!==this.factor.etime){this.etime=this.factor.etime;const a=await this.webgl.loadImg(this.factor.raw);this.texture=this.webgl.createTexture(this.context,this.context.NEAREST,this.context.LINEAR,this.context.CLAMP_TO_EDGE,a)}this.webgl.draw(this.viewport,this.context,this.program,this.texture,this.rampColor.texture,this.aPositionBuffer),this.viewport.toggle(!0)}}},ae=a=>(i.pushScopeId("data-v-2092df03"),a=a(),i.popScopeId(),a),Oa={key:0},Wa=[ae(()=>i.createElementVNode("span",null,"m",-1)),ae(()=>i.createElementVNode("span",null,"0",-1)),ae(()=>i.createElementVNode("span",null,"0.5",-1)),ae(()=>i.createElementVNode("span",null,"1",-1)),ae(()=>i.createElementVNode("span",null,"1.5",-1)),ae(()=>i.createElementVNode("span",null,"2",-1))];function ja(a,e,t,o,r,s){var l;return(l=t.factor)!=null&&l.active?(i.openBlock(),i.createElementBlock("div",Oa,[i.createElementVNode("div",{class:"legend-bars flex-center",style:i.normalizeStyle([{position:"absolute"},{right:r.right+"px",bottom:t.bottom}])},Wa,4)])):i.createCommentVNode("",!0)}const Fa=C(Ma,[["render",ja],["__scopeId","data-v-2092df03"]]),Oo="",Ua={name:"IdmPoint",emits:["point","more"],props:{map:{type:Object},show:{type:Boolean},meteo:{type:Object}},data(){return{showMeteo:!1,meteoMarker:void 0,helper:v.CompanyHelper}},watch:{show:{handler(){this.handleBind()},immediate:!0},map:{handler(){this.map&&this.show&&this.handleBind()}},meteo:{handler(){this.meteo?(this.showMeteo=!0,this.handleRender()):this.showMeteo=!1}}},computed:{computeTime(){return function(a){return a?`${W(a).utc().format("MMM-DD,HHmm[Z]")}`:"-"}},computeLat(){return function(a,e=4){return v.LngLatHelper.lat2pretty(a,e).pretty}},computeLng(){return function(a,e=4){return v.LngLatHelper.lng2pretty(a,e).pretty}},roundPrecision(){return function(a,e=4){return isNaN(a)?"-":v.LngLatHelper.roundPrecision(a,e)}}},methods:{handleBind(){var a,e;this.show?(a=this.map)==null||a.on("click",this.handleClick):((e=this.map)==null||e.off("click",this.handleClick),this.showMeteo=!1)},handleClick(a){a.originalEvent.stopPropagation();const e=a.originalEvent.target.className;e.indexOf("close")>-1?this.showMeteo=!1:e==="more"?this.$emit("more",this.meteo):this.$emit("point",a.lngLat)},handleRender(){var a;if(this.meteo){const e=document.getElementById("point-meteo");this.meteoMarker?(a=this.meteoMarker)==null||a.setLngLat([this.meteo.lng,this.meteo.lat]):this.meteoMarker=new U.Marker(e).setLngLat([this.meteo.lng,this.meteo.lat]).addTo(this.map)}}}},M=a=>(i.pushScopeId("data-v-fb5b12d6"),a=a(),i.popScopeId(),a),Ha={id:"point-meteo",class:"point-meteo"},Ga={class:"meteo-box"},Xa={class:"header-box"},Za={class:"main"},Ja={class:"sub"},qa={class:"main-box"},Ya={class:"flex-space"},Ka=M(()=>i.createElementVNode("label",null,"Wind",-1)),Qa={class:"flex-space"},ei=M(()=>i.createElementVNode("label",null,"Wind.Wave",-1)),ti={class:"flex-space"},ai=M(()=>i.createElementVNode("label",null,"Swell",-1)),ii={class:"flex-space"},ri=M(()=>i.createElementVNode("label",null,"Sig.Wave",-1)),oi={class:"flex-space"},si=M(()=>i.createElementVNode("label",null,"Current",-1)),ni={class:"flex-space"},li=M(()=>i.createElementVNode("label",null,"Precip",-1)),ci={class:"flex-space"},hi=M(()=>i.createElementVNode("label",null,"Visibility",-1)),di={class:"flex-space"},pi=M(()=>i.createElementVNode("label",null,"Temp",-1)),mi={class:"flex-space"},yi=M(()=>i.createElementVNode("label",null,"Water Temp",-1)),fi={key:0,class:"flex-space",style:{"justify-content":"flex-end"}},gi=[M(()=>i.createElementVNode("span",{class:"more"},"More >>",-1))];function ui(a,e,t,o,r,s){var l,n,c,h,f,d,m,y,u,g,p,_,b,w,x,L,S,N,T,$,R,z,O,J,ie,q,P,B,re,j,Q,oe,se,ne,le,ce,he,de,pe,me,ye,fe,ge,ue,be,_e,Le;return i.withDirectives((i.openBlock(),i.createElementBlock("div",Ha,[i.createElementVNode("div",Ga,[i.createElementVNode("div",Xa,[i.createElementVNode("div",{class:"iconfont close",onClick:e[0]||(e[0]=Se=>r.showMeteo=!1)},""),i.createElementVNode("div",Za,i.toDisplayString(s.computeLat((l=t.meteo)==null?void 0:l.lat))+","+i.toDisplayString(s.computeLng((n=t.meteo)==null?void 0:n.lng)),1),i.createElementVNode("div",Ja,i.toDisplayString(s.computeTime((c=t.meteo)==null?void 0:c.utc)),1)]),i.createElementVNode("div",qa,[i.createElementVNode("div",Ya,[Ka,i.createElementVNode("span",null,i.toDisplayString(((f=(h=t.meteo)==null?void 0:h.wind)==null?void 0:f.direction)||"-")+"/"+i.toDisplayString(s.roundPrecision((m=(d=t.meteo)==null?void 0:d.wind)==null?void 0:m.kts,1))+"[kts]/"+i.toDisplayString((u=(y=t.meteo)==null?void 0:y.wind)==null?void 0:u.scale)+"[BF]/"+i.toDisplayString(s.roundPrecision((p=(g=t.meteo)==null?void 0:g.gusts)==null?void 0:p.kts,1))+"[kts]",1)]),i.createElementVNode("div",Qa,[ei,i.createElementVNode("span",null,i.toDisplayString(((w=(b=(_=t.meteo)==null?void 0:_.wave)==null?void 0:b.wd)==null?void 0:w.direction)||"-")+"/"+i.toDisplayString(s.roundPrecision((S=(L=(x=t.meteo)==null?void 0:x.wave)==null?void 0:L.wd)==null?void 0:S.height,1))+"[m]/"+i.toDisplayString(s.roundPrecision(($=(T=(N=t.meteo)==null?void 0:N.wave)==null?void 0:T.wd)==null?void 0:$.period,1))+"[s]",1)]),i.createElementVNode("div",ti,[ai,i.createElementVNode("span",null,i.toDisplayString(((O=(z=(R=t.meteo)==null?void 0:R.wave)==null?void 0:z.swell)==null?void 0:O.direction)||"-")+"/"+i.toDisplayString(s.roundPrecision((q=(ie=(J=t.meteo)==null?void 0:J.wave)==null?void 0:ie.swell)==null?void 0:q.height,1))+"[m]/"+i.toDisplayString(s.roundPrecision((re=(B=(P=t.meteo)==null?void 0:P.wave)==null?void 0:B.swell)==null?void 0:re.period,1))+"[s]",1)]),i.createElementVNode("div",ii,[ri,i.createElementVNode("span",null,i.toDisplayString(((oe=(Q=(j=t.meteo)==null?void 0:j.wave)==null?void 0:Q.sig)==null?void 0:oe.direction)||"-")+"/"+i.toDisplayString(s.roundPrecision((le=(ne=(se=t.meteo)==null?void 0:se.wave)==null?void 0:ne.sig)==null?void 0:le.height,1))+"[m]/"+i.toDisplayString(s.roundPrecision((de=(he=(ce=t.meteo)==null?void 0:ce.wave)==null?void 0:he.sig)==null?void 0:de.period,1))+"[s]",1)]),i.createElementVNode("div",oi,[si,i.createElementVNode("span",null,i.toDisplayString(((me=(pe=t.meteo)==null?void 0:pe.current)==null?void 0:me.direction)||"-")+"/"+i.toDisplayString(s.roundPrecision((fe=(ye=t.meteo)==null?void 0:ye.current)==null?void 0:fe.kts,2))+"[kts]",1)]),i.createElementVNode("div",ni,[li,i.createElementVNode("span",null,i.toDisplayString(s.roundPrecision((ue=(ge=t.meteo)==null?void 0:ge.precip)==null?void 0:ue.inter6h,2))+"[mm]",1)]),i.createElementVNode("div",ci,[hi,i.createElementVNode("span",null,i.toDisplayString(s.roundPrecision(((be=t.meteo)==null?void 0:be.visibility)/1852,0))+"[nm]",1)]),i.createElementVNode("div",di,[pi,i.createElementVNode("span",null,i.toDisplayString(s.roundPrecision((_e=t.meteo)==null?void 0:_e.temp,0))+"[°C]",1)]),i.createElementVNode("div",mi,[yi,i.createElementVNode("span",null,i.toDisplayString(s.roundPrecision((Le=t.meteo)==null?void 0:Le.waterTemp,2))+"[°C]",1)])]),a.$attrs.permission&r.helper.LEVEL.Prime?(i.openBlock(),i.createElementBlock("div",fi,gi)):i.createCommentVNode("",!0)])],512)),[[i.vShow,r.showMeteo]])}const bi=C(Ua,[["render",ui],["__scopeId","data-v-fb5b12d6"]]),_i={name:"IdmWarZone",props:{map:{type:Object},zone:{type:Object},beforeLayer:{type:String}},data(){return{source:"war-zone-source",zoneLayer:"war-zone-layer",zoneLabelLayer:"war-zone-label-layer"}},watch:{zone:{handler(){this.handleRender()}}},methods:{handleRender(){this.map?(this.handleClear(),this.zone&&(this.map.addSource(this.source,{type:"geojson",data:this.zone}),this.map.addLayer({id:this.zoneLayer,type:"fill",source:this.source,filter:["==","$type","Polygon"],paint:{"fill-outline-color":"silver","fill-color":"#f44336","fill-opacity":.4}},this.beforeLayer),this.map.addLayer({id:this.zoneLayer+"-border",type:"line",source:this.source,filter:["==","$type","Polygon"],paint:{"line-width":1,"line-opacity":1,"line-color":"#f44336"}},this.beforeLayer),this.map.addLayer({id:this.zoneLabelLayer,type:"symbol",source:this.source,filter:["==","$type","Point"],layout:{"symbol-placement":"point","icon-size":.1,"icon-image":"identify","text-anchor":"top","text-field":"{lbl}","text-rotation-alignment":"viewport","text-size":10,"text-offset":[0,-1]},paint:{"icon-opacity":.8,"text-color":"#000","text-halo-color":"#fff","text-halo-width":1}}))):setTimeout(()=>{this.handleRender()},500)},handleClear(){this.map.getLayer(this.zoneLayer)&&this.map.removeLayer(this.zoneLayer),this.map.getLayer(this.zoneLayer+"-border")&&this.map.removeLayer(this.zoneLayer+"-border"),this.map.getLayer(this.zoneLabelLayer)&&this.map.removeLayer(this.zoneLabelLayer),this.map.getSource(this.source)&&this.map.removeSource(this.source)}}};function Li(a,e,t,o,r,s){return i.openBlock(),i.createElementBlock("div")}const wi=C(_i,[["render",Li]]),vi={name:"IdmGmdssArea",props:{map:{type:Object},area:{type:Object},beforeLayer:{type:String}},data(){return{source:"gmdss-area-source",areaLayer:"gmdss-area-layer",areaLabelLayer:"gmdss-area-label-layer"}},watch:{area:{handler(){this.handleRender()}}},methods:{handleRender(){this.map?(this.handleClear(),this.area&&(this.map.addSource(this.source,{type:"geojson",data:this.area}),this.map.addLayer({id:this.areaLayer,type:"fill",source:this.source,filter:["==","$type","Polygon"],paint:{"fill-outline-color":"silver","fill-opacity":.5,"fill-color":["match",["get","val"],"AreaI","#EB8996","AreaII","#6F448B","AreaIII","#3E8BD3","AreaIV","#5EBCC4","AreaV","#00AAE7","AreaVI","#9CCE6D","AreaVII","#F4AE00","AreaVIII","#EF9A85","AreaIX","#00AAA7","AreaX","#7AC49F","AreaXI","#DFDFDF","AreaXII","#FFF974","AreaXIII","#EF9A85","AreaXIV","#86A2D1","AreaXV","#EC8972","AreaXVI","#EAC2DA","AreaXVII","#B9C8E7","AreaXVIII","#BBA1C8","AreaXIX","#FAE0BD","AreaXX","#DBECC8","AreaXXI","#D496AF","#ffffff"]}},this.beforeLayer),this.map.addLayer({id:this.areaLabelLayer,type:"symbol",source:this.source,filter:["==","$type","Point"],layout:{"symbol-placement":"point","icon-size":.1,"icon-image":"identify","text-anchor":"top","text-field":"{lbl}","text-rotation-alignment":"viewport","text-size":12,"text-offset":[0,-3.5]},paint:{"icon-opacity":.8,"text-opacity":.8,"text-color":"#000"}}))):setTimeout(()=>{this.handleRender()},500)},handleClear(){this.map.getLayer(this.areaLayer)&&this.map.removeLayer(this.areaLayer),this.map.getLayer(this.areaLabelLayer)&&this.map.removeLayer(this.areaLabelLayer),this.map.getSource(this.source)&&this.map.removeSource(this.source)}}};function Ei(a,e,t,o,r,s){return i.openBlock(),i.createElementBlock("div")}const xi=C(vi,[["render",Ei]]),Ci={name:"IdmEcaZone",props:{map:{type:Object},zone:{type:Object},beforeLayer:{type:String}},data(){return{source:"eca-zone-source",zoneLayer:"eca-zone-layer",zoneLabelLayer:"eca-zone-label-layer"}},watch:{zone:{handler(){this.zone?this.handleRender():this.handleClear()}}},methods:{handleRender(){var a;this.map?(this.handleClear(),this.zone&&(this.map.getSource(this.source)?(a=this.map)==null||a.getSource(this.source).setData(this.zone):(this.map.addSource(this.source,{type:"geojson",data:this.zone}),this.map.addLayer({id:this.zoneLayer,type:"fill",source:this.source,filter:["all",["==","$type","Polygon"],["!=","disabled",!0]],paint:{"fill-outline-color":"silver","fill-opacity":.4,"fill-color":"#05f324"}}),this.map.addLayer({id:this.zoneLayer+"-border",type:"line",source:this.source,filter:["all",["==","$type","Polygon"],["!=","disabled",!0]],paint:{"line-color":"#04c021","line-width":1,"line-opacity":1}},this.beforeLayer),this.map.addLayer({id:this.zoneLabelLayer,type:"symbol",source:this.source,filter:["all",["==","$type","Point"],["!=","disabled",!0]],layout:{"symbol-placement":"point","icon-size":.1,"icon-image":"identify","text-max-width":16,"text-justify":"left","text-anchor":"top","text-field":"{lbl}","text-rotation-alignment":"viewport","text-size":10,"text-offset":[0,-3.5]},paint:{"icon-opacity":.8,"text-color":"#000","text-halo-color":"#fff","text-halo-width":1}})))):setTimeout(()=>{this.handleRender()},500)},handleClear(){this.map.getLayer(this.zoneLayer)&&this.map.removeLayer(this.zoneLayer),this.map.getLayer(this.zoneLayer+"-border")&&this.map.removeLayer(this.zoneLayer+"-border"),this.map.getLayer(this.zoneLabelLayer)&&this.map.removeLayer(this.zoneLabelLayer),this.map.getSource(this.source)&&this.map.removeSource(this.source)}}};function Si(a,e,t,o,r,s){return i.openBlock(),i.createElementBlock("div")}const ki=C(Ci,[["render",Si]]),jo="",Pi={name:"IdmAlertZone",props:{map:{type:Object},zone:{type:Object},beforeLayer:{type:String}},data(){return{source:"alert-zone-source",polygonLayer:"alert-zone-polygon-layer",polygonLabelLayer:"alert-zone-polygon-label-layer",lineLayer:"alert-zone-line-layer",lineLabelLayer:"alert-zone-line-label-layer",pointLayer:"alert-zone-point-layer",showZone:!1,form:{}}},watch:{zone:{handler(){var a,e;this.zone?(this.handleRender(),(a=this.map)==null||a.on("click",[this.polygonLabelLayer,this.lineLabelLayer,this.pointLayer],this.handleClick)):(this.handleClear(),(e=this.map)==null||e.off("click",[this.polygonLabelLayer,this.lineLabelLayer,this.pointLayer],this.handleClick))}}},methods:{handleClick(a){var o;const e=a.features[0],t=(o=this.zone)==null?void 0:o.features.filter(r=>{var s;return r.properties.id===((s=e==null?void 0:e.properties)==null?void 0:s.id)})[0];t&&(this.showZone=!0,this.form={...t.properties})},handleRender(){var a;this.map?(this.handleClear(),this.zone&&(this.map.getSource(this.source)?(a=this.map)==null||a.getSource(this.source).setData(this.zone):(this.map.addSource(this.source,{type:"geojson",data:this.zone}),this.map.addLayer({id:this.polygonLayer,type:"fill",source:this.source,filter:["all",["==","$type","Polygon"],["!=","disabled",!0]],paint:{"fill-outline-color":"#d57d02","fill-opacity":.4,"fill-color":"#d57d02"}}),this.map.addLayer({id:this.polygonLayer+"-border",type:"line",source:this.source,filter:["all",["==","$type","Polygon"],["!=","disabled",!0]],paint:{"line-width":1,"line-color":"#d57d02"}}),this.map.addLayer({id:this.lineLayer,type:"line",source:this.source,filter:["all",["==","$type","LineString"],["!=","disabled",!0]],paint:{"line-color":"#d57d02","line-width":2}}),this.map.addLayer({id:this.polygonLabelLayer,type:"symbol",source:this.source,filter:["all",["==","$type","Polygon"],["!=","disabled",!0]],layout:{"symbol-placement":"point","icon-image":"alert","icon-size":.1,"icon-allow-overlap":!0,"icon-rotation-alignment":"viewport"},paint:{"icon-opacity":.8}}),this.map.addLayer({id:this.lineLabelLayer,type:"symbol",source:this.source,filter:["all",["==","$type","LineString"],["!=","disabled",!0]],layout:{"symbol-placement":"line-center","icon-image":"alert","icon-size":.1,"icon-allow-overlap":!0,"icon-rotation-alignment":"viewport"},paint:{"icon-opacity":.8}}),this.map.addLayer({id:this.pointLayer,type:"symbol",source:this.source,filter:["all",["==","$type","Point"],["!=","disabled",!0]],layout:{"symbol-placement":"point","icon-image":"alert","icon-size":.1},paint:{"icon-opacity":.8}})))):setTimeout(()=>{this.handleRender()},500)},handleClear(){this.map.getLayer(this.polygonLayer)&&this.map.removeLayer(this.polygonLayer),this.map.getLayer(this.polygonLayer+"-border")&&this.map.removeLayer(this.polygonLayer+"-border"),this.map.getLayer(this.polygonLabelLayer)&&this.map.removeLayer(this.polygonLabelLayer),this.map.getLayer(this.lineLayer)&&this.map.removeLayer(this.lineLayer),this.map.getLayer(this.lineLabelLayer)&&this.map.removeLayer(this.lineLabelLayer),this.map.getLayer(this.pointLayer)&&this.map.removeLayer(this.pointLayer),this.map.getSource(this.source)&&this.map.removeSource(this.source)}}},Ni={id:"zone-info"},Ti=["innerHTML"];function Vi(a,e,t,o,r,s){var l;return i.withDirectives((i.openBlock(),i.createElementBlock("div",Ni,[i.createElementVNode("div",{class:"iconfont close",onClick:e[0]||(e[0]=n=>r.showZone=!1)},""),i.createElementVNode("div",{class:"rich-context",innerHTML:(l=r.form)==null?void 0:l.name},null,8,Ti)],512)),[[i.vShow,r.showZone]])}const Ii=C(Pi,[["render",Vi],["__scopeId","data-v-d1cb4e6e"]]),Fo="",$i={name:"IdmPort",props:{map:{type:Object},port:{type:Object},beforeLayer:{type:String}},emits:["port"],data(){return{source:"port-source",layer:"port-layer",showPort:!1,form:{},marker:void 0}},computed:{computeLat(){return function(a){return v.LngLatHelper.lat2pretty(a,4).pretty}},computeLng(){return function(a){return v.LngLatHelper.lng2pretty(a,4).pretty}}},watch:{port:{handler(){var a,e;this.port?(this.handleRender(),(a=this.map)==null||a.on("click",[this.layer],this.handleClick)):(this.handleClear(),(e=this.map)==null||e.off("click",[this.layer],this.handleClick))}}},methods:{handleClick(a){var o;const e=a.features[0],t=(o=this.port)==null?void 0:o.features.filter(r=>{var s;return r.properties.id===((s=e==null?void 0:e.properties)==null?void 0:s.id)})[0];if(t){this.showPort=!0,this.form={...t.properties},this.form.lng=t.geometry.coordinates[0],this.form.lat=t.geometry.coordinates[1];const r=document.getElementById("port-info");this.marker?this.marker.setLngLat([a.lngLat.lng,a.lngLat.lat]):this.marker=new U.Marker(r).setLngLat([a.lngLat.lng,a.lngLat.lat]).setOffset([0,-85]).addTo(this.map)}},handleEmit(){this.$emit("port",this.form)},handleRender(){var a;this.map?this.port&&(this.map.getSource(this.source)?(a=this.map)==null||a.getSource(this.source).setData(this.port):(this.map.addSource(this.source,{type:"geojson",data:this.port}),this.map.addLayer({id:this.layer,type:"symbol",source:this.source,filter:["all",["==","$type","Point"],["!=","disabled",!0]],layout:{"symbol-placement":"point","icon-size":.1,"icon-image":"port","text-anchor":"left","text-field":"{name}","text-rotation-alignment":"viewport","text-size":10,"text-offset":[1,0]},paint:{"text-color":"rgba(0, 0, 0, 0.8)","text-halo-color":"#fff","text-halo-width":1}}))):setTimeout(()=>{this.handleRender()},500)},handleClear(){this.showPort=!1,this.map.getLayer(this.layer)&&this.map.removeLayer(this.layer),this.map.getSource(this.source)&&this.map.removeSource(this.source)}}},we=a=>(i.pushScopeId("data-v-6fdfee96"),a=a(),i.popScopeId(),a),Ri={id:"port-info"},Di={class:"port-box"},Bi={class:"flex-start"},Ai=we(()=>i.createElementVNode("label",null,"Name : ",-1)),zi={class:"flex-start"},Mi=we(()=>i.createElementVNode("label",null,"Position : ",-1)),Oi={class:"flex-start"},Wi=we(()=>i.createElementVNode("label",null,"LoCode : ",-1)),ji={class:"flex-start",style:{"align-items":"flex-start"}},Fi=we(()=>i.createElementVNode("label",null,"Region : ",-1));function Ui(a,e,t,o,r,s){return i.withDirectives((i.openBlock(),i.createElementBlock("div",Ri,[i.createElementVNode("div",{class:"close iconfont",onClick:e[0]||(e[0]=l=>r.showPort=!1)},""),i.createElementVNode("div",Di,[i.createElementVNode("div",Bi,[Ai,i.createElementVNode("span",{onClick:e[1]||(e[1]=(...l)=>s.handleEmit&&s.handleEmit(...l))},i.toDisplayString(r.form.name),1)]),i.createElementVNode("div",zi,[Mi,i.createElementVNode("span",null,i.toDisplayString(s.computeLat(r.form.lat))+", "+i.toDisplayString(s.computeLng(r.form.lng)),1)]),i.createElementVNode("div",Oi,[Wi,i.createElementVNode("span",null,i.toDisplayString(r.form.loCode||"-"),1)]),i.createElementVNode("div",ji,[Fi,i.createElementVNode("span",null,i.toDisplayString(r.form.city||"-")+", "+i.toDisplayString(r.form.country||"-"),1)])])],512)),[[i.vShow,r.showPort]])}const Hi=C($i,[["render",Ui],["__scopeId","data-v-6fdfee96"]]),Gi={name:"IdmLoadLine",props:{map:{type:Object},line:{type:Object},beforeLayer:{type:String}},data(){return{source:"load-line-source",lineLayer:"load-line-layer",lineLabelLayer:"load-line-label-layer"}},watch:{line:{handler(){this.handleRender()}}},methods:{handleRender(){this.map?(this.handleClear(),this.line&&(this.map.addSource(this.source,{type:"geojson",data:this.line}),this.map.addLayer({id:this.lineLayer,type:"fill",source:this.source,filter:["==","$type","Polygon"],paint:{"fill-outline-color":"silver","fill-opacity":.75,"fill-color":["match",["get","val"],"LLGreen","#A0C0C0","LLRed","#F5A39D","LLBlue","#6B94E4","#ffffff"]}},this.beforeLayer),this.map.addLayer({id:this.lineLabelLayer,type:"symbol",source:this.source,filter:["==","$type","Point"],layout:{"symbol-placement":"point","text-field":"{lbl} (Length < {shipLength}, {start} - {end})","text-rotation-alignment":"viewport","text-offset":[0,1],"text-size":10,"text-allow-overlap":!0},paint:{"text-opacity":.8}}))):setTimeout(()=>{this.handleRender()},500)},handleClear(){this.map.getLayer(this.lineLayer)&&this.map.removeLayer(this.lineLayer),this.map.getLayer(this.lineLabelLayer)&&this.map.removeLayer(this.lineLabelLayer),this.map.getSource(this.source)&&this.map.removeSource(this.source)}}};function Xi(a,e,t,o,r,s){return i.openBlock(),i.createElementBlock("div")}const Zi=C(Gi,[["render",Xi]]),Ji={name:"IdmTimezone",props:{map:{type:Object},zone:{type:Object},beforeLayer:{type:String}},data(){return{source:"time-zone-source",zoneLayer:"time-zone-layer",zoneLabelLayer:"time-zone-label-layer"}},watch:{zone:{handler(){this.handleRender()}}},methods:{handleRender(){this.map?(this.handleClear(),this.zone&&(this.map.addSource(this.source,{type:"geojson",data:this.zone}),this.map.addLayer({id:this.zoneLayer,type:"fill",source:this.source,filter:["==","$type","Polygon"],paint:{"fill-outline-color":"silver","fill-opacity":.5,"fill-color":["match",["get","offSet"],"-11.5","rgba(255,0,0,0.4)","-11","rgba(0,255,0,0.3)","-10.5","rgba(0,255,0,0.3)","-10","rgba(0,0,255,0.3)","-9.5","rgba(0,0,255,0.3)","-9","rgba(255,0,0,0.4)","-8.5","rgba(255,0,0,0.4)","-8","rgba(0,255,0,0.3)","-7.5","rgba(0,255,0,0.3)","-7","rgba(0,0,255,0.3)","-6.5","rgba(0,0,255,0.3)","-6","rgba(255,0,0,0.4)","-5.5","rgba(255,0,0,0.4)","-5","rgba(0,255,0,0.3)","-4.5","rgba(0,255,0,0.3)","-4","rgba(0,0,255,0.3)","-3.5","rgba(0,0,255,0.3)","-3","rgba(255,0,0,0.4)","-2.5","rgba(255,0,0,0.4)","-2","rgba(0,255,0,0.3)","-1.5","rgba(0,255,0,0.3)","-1","rgba(0,0,255,0.3)","-0.5","rgba(0,0,255,0.3)","+0","rgba(255,0,0,0.4)","+0.5","rgba(255,0,0,0.4)","+1","rgba(0,255,0,0.3)","+1.5","rgba(0,255,0,0.3)","+2","rgba(0,0,255,0.3)","+2.5","rgba(0,0,255,0.3)","+3","rgba(255,0,0,0.4)","+3.5","rgba(255,0,0,0.4)","+4","rgba(0,255,0,0.3)","+4.5","rgba(0,255,0,0.3)","+5","rgba(0,0,255,0.3)","+5.5","rgba(0,0,255,0.3)","+6","rgba(255,0,0,0.4)","+6.5","rgba(255,0,0,0.4)","+7","rgba(0,255,0,0.3)","+7.5","rgba(0,255,0,0.3)","+8","rgba(0,0,255,0.3)","+8.5","rgba(0,0,255,0.3)","+9","rgba(255,0,0,0.4)","+9.5","rgba(255,0,0,0.4)","+10","rgba(0,255,0,0.3)","+10.5","rgba(0,255,0,0.3)","+11","rgba(0,0,255,0.3)","+11.5","rgba(0,0,255,0.3)","rgba(255,0,0,0.4)"]}}),this.map.addLayer({id:this.zoneLabelLayer,type:"symbol",source:this.source,filter:["==","$type","Point"],layout:{"symbol-placement":"point","text-field":"{offSet}","text-rotation-alignment":"viewport","text-size":12,"text-offset":[0,1]},paint:{"text-opacity":.8,"text-color":"#fff"}}))):setTimeout(()=>{this.handleRender()},500)},handleClear(){this.map.getLayer(this.zoneLayer)&&this.map.removeLayer(this.zoneLayer),this.map.getLayer(this.zoneLabelLayer)&&this.map.removeLayer(this.zoneLabelLayer),this.map.getSource(this.source)&&this.map.removeSource(this.source)}}};function qi(a,e,t,o,r,s){return i.openBlock(),i.createElementBlock("div")}const Yi=C(Ji,[["render",qi]]),Ki={name:"IdmVoluntaryReportingArea",props:{map:{type:Object},area:{type:Object},beforeLayer:{type:String}},data(){return{source:"vra-source",areaLayer:"vra-layer",areaLabelLayer:"vra-label-layer"}},watch:{area:{handler(){this.handleRender()}}},methods:{handleRender(){this.map?(this.handleClear(),this.area&&(this.map.addSource(this.source,{type:"geojson",data:this.area}),this.map.addLayer({id:this.areaLayer,type:"fill",source:this.source,filter:["==","$type","Polygon"],paint:{"fill-outline-color":"silver","fill-opacity":.4,"fill-color":"#9f30f9"}},this.beforeLayer),this.map.addLayer({id:this.areaLayer+"-border",type:"line",source:this.source,filter:["==","$type","Polygon"],paint:{"line-width":1,"line-opacity":1,"line-color":"#9f30f9"}},this.beforeLayer),this.map.addLayer({id:this.areaLabelLayer,type:"symbol",source:this.source,filter:["==","$type","Point"],layout:{"symbol-placement":"point","icon-size":.1,"icon-image":"identify","text-anchor":"top","text-field":"{lbl}","text-rotation-alignment":"viewport","text-size":10,"text-offset":[0,-3.5]},paint:{"icon-opacity":.8,"text-color":"#000","text-halo-color":"#fff","text-halo-width":1}}))):setTimeout(()=>{this.handleRender()},500)},handleClear(){this.map.getLayer(this.areaLayer)&&this.map.removeLayer(this.areaLayer),this.map.getLayer(this.areaLayer+"-border")&&this.map.removeLayer(this.areaLayer+"-border"),this.map.getLayer(this.areaLabelLayer)&&this.map.removeLayer(this.areaLabelLayer),this.map.getSource(this.source)&&this.map.removeSource(this.source)}}};function Qi(a,e,t,o,r,s){return i.openBlock(),i.createElementBlock("div")}const er=C(Ki,[["render",Qi]]),tr={name:"IdmSpecialArea",props:{map:{type:Object},area:{type:Object},beforeLayer:{type:String}},data(){return{source:"special-area-source",areaLayer:"special-area-layer",areaLabelLayer:"special-area-label-layer"}},watch:{area:{handler(){this.handleRender()}}},methods:{handleRender(){this.map?(this.handleClear(),this.area&&(this.area.features.forEach(a=>{a.geometry.type==="Polygon"&&a.geometry.coordinates.forEach(e=>v.convertToMonotonicLng2(e))}),this.map.addSource(this.source,{type:"geojson",data:this.area}),this.map.addLayer({id:this.areaLayer,type:"fill",source:this.source,filter:["==","$type","Polygon"],paint:{"fill-outline-color":"silver","fill-opacity":.4,"fill-color":["match",["get","val"],"DefaultStyle","rgb(0,0,0)","JWCriskArea","rgb(0,0,0)","rgb(0,0,0)"]}},this.beforeLayer),this.map.addLayer({id:this.areaLayer+"-border",type:"line",source:this.source,filter:["==","$type","Polygon"],paint:{"line-width":1,"line-opacity":.4,"line-color":"rgb(0,0,0)"}},this.beforeLayer),this.map.addLayer({id:this.areaLabelLayer,type:"symbol",source:this.source,filter:["==","$type","Point"],layout:{"symbol-placement":"point","icon-size":.1,"icon-image":"identify","text-anchor":"top","text-field":"{lbl}","text-rotation-alignment":"viewport","text-size":10,"text-offset":[0,-3.5]},paint:{"icon-opacity":.8,"text-color":"#000","text-halo-color":"#fff","text-halo-width":1}}))):setTimeout(()=>{this.handleRender()},500)},handleClear(){this.map.getLayer(this.areaLayer)&&this.map.removeLayer(this.areaLayer),this.map.getLayer(this.areaLayer+"-border")&&this.map.removeLayer(this.areaLayer+"-border"),this.map.getLayer(this.areaLabelLayer)&&this.map.removeLayer(this.areaLabelLayer),this.map.getSource(this.source)&&this.map.removeSource(this.source)}}};function ar(a,e,t,o,r,s){return i.openBlock(),i.createElementBlock("div")}const ir=C(tr,[["render",ar]]),rr={name:"IdmTerminator",props:{map:{type:Object},area:{type:Object}},data(){return{source:"terminator-source",layer:"terminator-layer"}},watch:{area:{handler(){this.handleRender()}}},methods:{handleRender(){this.map?(this.handleClear(),this.area&&(this.map.addSource(this.source,{type:"geojson",data:this.area}),this.map.addLayer({id:this.layer,type:"fill",source:this.source,filter:["==","$type","Polygon"],paint:{"fill-outline-color":"silver","fill-opacity":.5,"fill-color":"rgba(0, 0, 0, 0.4)"}}))):setTimeout(()=>{this.handleRender()},500)},handleClear(){this.map.getLayer(this.layer)&&this.map.removeLayer(this.layer),this.map.getSource(this.source)&&this.map.removeSource(this.source)}}};function or(a,e,t,o,r,s){return i.openBlock(),i.createElementBlock("div")}const sr=C(rr,[["render",or]]),Uo="",nr={name:"IdmLatLng",props:{map:{type:Object},show:{type:Boolean},bottom:{type:String,default:"70px"},toggleVersion:{type:Number}},data(){return{lngLat:void 0,source:"idm-lat-lng-source",layer:"idm-lat-lng-layer",labelLayer:"idm-lat-lng-label-layer",right:10}},watch:{show:{handler(){this.handleBind()},immediate:!0},map:{handler(){var a;this.map&&((a=this.map)==null||a.on("mousemove",this.handleMouseMove))},immediate:!0},toggleVersion:{handler(){var a,e,t;this.right=(((a=document.getElementsByClassName("legend-bars")[0])==null?void 0:a.clientWidth)||-10)+(((e=document.getElementsByClassName("available-layers-show")[0])==null?void 0:e.clientWidth)||0)+(((t=document.getElementsByClassName("fleet-list-container")[0])==null?void 0:t.clientWidth)||0)+20},immediate:!0}},methods:{handleBind(){var a,e;this.show?((a=this.map)==null||a.on("zoomend",this.handleZoomEnd),this.handleRender()):(this.handleClear(),(e=this.map)==null||e.off("zoomend",this.handleZoomEnd))},handleMouseMove(a){const e=a.lngLat,t=v.LngLatHelper.lng2pretty(e.lng,2),o=v.LngLatHelper.lat2pretty(e.lat,2);this.lngLat={lng:t,lat:o}},handleComputeLatLngs(){var o;const a=(o=this.map)==null?void 0:o.getZoom();console.log(a);let e=30;a>4?e=10:a>3&&(e=15);const t=[];for(let r=-60;r<90;r+=e)t.push({type:"Feature",geometry:{type:"LineString",coordinates:[[-180,r],[180,r]]}});for(let r=-180;r<180;r+=e)t.push({type:"Feature",geometry:{type:"LineString",coordinates:[[r,-90],[r,90]]}});for(let r=180;r>-180;r-=e)for(let s=-60;s<90;s+=e)t.push({type:"Feature",geometry:{type:"Point",coordinates:[r,s]},properties:{val:`${s>0?s+" N":s===0?s:s*-1+" S"}, ${r>0?r+" E":r*-1+" W"}`}});return t},handleZoomEnd(){var e;const a=this.handleComputeLatLngs();(e=this.map)==null||e.getSource(this.source).setData(E.featureCollection(a))},handleRender(){if(this.map){const a=this.handleComputeLatLngs();this.map.addSource(this.source,{type:"geojson",data:{type:"FeatureCollection",features:a}}),this.map.addLayer({id:this.layer,type:"line",source:this.source,filter:["==","$type","LineString"],layout:{"line-join":"round","line-cap":"round"},paint:{"line-color":"rgba(0, 0, 0, 0.3)","line-width":1}}),this.map.addLayer({id:this.labelLayer,type:"symbol",source:this.source,filter:["==","$type","Point"],layout:{"symbol-placement":"point","text-field":"{val}","text-rotation-alignment":"viewport","text-offset":[0,1],"text-size":10,"text-allow-overlap":!0},paint:{"text-opacity":.8}})}},handleClear(){var a,e,t,o,r,s;(a=this.map)!=null&&a.getLayer(this.layer)&&((e=this.map)==null||e.removeLayer(this.layer)),(t=this.map)!=null&&t.getLayer(this.labelLayer)&&((o=this.map)==null||o.removeLayer(this.labelLayer)),(r=this.map)!=null&&r.getSource(this.source)&&((s=this.map)==null||s.removeSource(this.source))}}},lr=(a=>(i.pushScopeId("data-v-9f51b3f9"),a=a(),i.popScopeId(),a))(()=>i.createElementVNode("span",null,", ",-1));function cr(a,e,t,o,r,s){return r.lngLat?(i.openBlock(),i.createElementBlock("div",{key:0,class:"lat-lng-tip",style:i.normalizeStyle({right:r.right+"px",bottom:t.bottom})},[i.createElementVNode("span",null,i.toDisplayString(r.lngLat.lat.pretty),1),lr,i.createElementVNode("span",null,i.toDisplayString(r.lngLat.lng.pretty),1)],4)):i.createCommentVNode("",!0)}const Ce=C(nr,[["render",cr],["__scopeId","data-v-9f51b3f9"]]),hr={name:"IdmMeasure",props:{map:{type:Object},show:{type:Boolean}},data(){return{geojson:[],source:"measure-source",layer:"measure-layer",labelLayer:"measure-label-layer",tmpSource:"measure-tmp-source",tmpLayer:"measure-tmp-layer",tmpLabelLayer:"measure-tmp-label-layer",closeMarkers:{},pointMarkers:{},tipMarker:void 0,contextmenu:void 0,navigation:"RL"}},watch:{show:{handler(){this.handleBind()},immediate:!0},map:{handler(){this.map&&this.handleBind()}}},methods:{handleBind(){var a,e,t,o,r,s,l,n,c,h;if(this.show)(a=this.map)==null||a.getCanvas().addEventListener("keydown",this.handleKeydown),(e=this.map)==null||e.on("mousemove",this.handleMove),(t=this.map)==null||t.on("dblclick",this.handleDblClick),(o=this.map)==null||o.on("click",this.handleClick),(r=this.map)==null||r.on("contextmenu",this.handleContextmenu),this.map&&(this.map.getCanvas().style.cursor="crosshair");else{(s=this.map)==null||s.getCanvas().removeEventListener("keydown",this.handleKeydown),(l=this.map)==null||l.off("mousemove",this.handleMove),(n=this.map)==null||n.off("dblclick",this.handleDblClick),(c=this.map)==null||c.off("click",this.handleClick),(h=this.map)==null||h.off("contextmenu",this.handleContextmenu);for(const f of this.geojson)this.handleClear(f,!0);this.geojson=[],this.map&&(this.map.getCanvas().style.cursor="grab")}},handleKeydown(a){if(a.key==="Shift"){this.navigation=this.navigation==="RL"?"GC":"RL";const t=this.geojson.at(-1).features.filter(o=>o.geometry.type==="Point");t.length&&(t.at(-1).properties.mode=this.navigation)}},handleDrag(a){var t,o,r,s,l,n,c,h,f,d;const e=(o=(t=a.target)==null?void 0:t._element)==null?void 0:o.id;if((e==null?void 0:e.split("-").length)===2){const m=this.geojson.filter(p=>p.id===e.split("-")[0])[0];this.pointMarkers[m.id].filter(p=>{var _;return((_=p._element)==null?void 0:_.id)===e})[0].setLngLat([(s=(r=a.target)==null?void 0:r._lngLat)==null?void 0:s.lng,(n=(l=a.target)==null?void 0:l._lngLat)==null?void 0:n.lat]);let u;m.features.forEach((p,_)=>{if(p.geometry.type==="Point"&&p.properties.id==e.split("-")[1]){u=_;return}});const g=m.features.filter(p=>p.geometry.type==="Point");this.handleTmpPointUpdate(m,g[u-1],{lng:(h=(c=a.target)==null?void 0:c._lngLat)==null?void 0:h.lng,lat:(d=(f=a.target)==null?void 0:f._lngLat)==null?void 0:d.lat,properties:g[u].properties},u===g.length-1?void 0:g[u+1])}},handleDragEnd(a){var t,o,r,s,l,n,c,h,f,d;const e=(o=(t=a.target)==null?void 0:t._element)==null?void 0:o.id;if((e==null?void 0:e.split("-").length)===2){const m=this.geojson.filter(g=>g.id===e.split("-")[0])[0];this.pointMarkers[m.id].filter(g=>{var p;return((p=g._element)==null?void 0:p.id)===e})[0].setLngLat([(s=(r=a.target)==null?void 0:r._lngLat)==null?void 0:s.lng,(n=(l=a.target)==null?void 0:l._lngLat)==null?void 0:n.lat]);const u=m.features.filter(g=>g.geometry.type==="Point"&&g.properties.id==e.split("-")[1])[0];u.geometry.coordinates=[(h=(c=a.target)==null?void 0:c._lngLat)==null?void 0:h.lng,(d=(f=a.target)==null?void 0:f._lngLat)==null?void 0:d.lat],m.features=m.features.filter(g=>g.geometry.type==="Point"),this.handlePointUpdate(m)}},handleContextmenu(a){var t,o,r,s;a.preventDefault(),(t=this.contextmenu)==null||t.remove();const e=(s=(r=(o=a.originalEvent)==null?void 0:o.target)==null?void 0:r.parentElement)==null?void 0:s.id;if((e==null?void 0:e.split("-").length)===2){const n=this.geojson.filter(c=>c.id===e.split("-")[0])[0].features.filter(c=>c.geometry.type==="Point");if(n.length>2&&n.filter(h=>h.properties.id===(e==null?void 0:e.split("-")[1]))[0]){const h=document.createElement("div");h.className="point-contextmenu-marker",h.innerHTML=`<span id="del-${e}" class="del-point">Del</span>`,this.contextmenu=new U.Marker(h).setOffset([24,0]).setLngLat([a.lngLat.lng,a.lngLat.lat]).addTo(this.map)}}},handleClick(a){var t,o,r,s,l;(t=this.contextmenu)==null||t.remove();const e=a.originalEvent.target.className;if(e==="marker-close"){const n=(r=(o=a.originalEvent)==null?void 0:o.srcElement)==null?void 0:r.id,c=this.geojson.filter(h=>h.id===n)[0];c&&this.handleClear(c,!0),this.geojson=this.geojson.filter(h=>h.id!==n)}else if(e==="del-point"){const n=(l=(s=a.originalEvent.target.id)==null?void 0:s.replace("del-",""))==null?void 0:l.split("-"),c=this.geojson.filter(h=>h.id===n[0])[0];c.features=c.features.filter(h=>h.geometry.type==="Point"&&h.properties.id!==n[1]),this.handlePointUpdate(c)}else if(e!=="marker-label"){let n=this.geojson.at(-1);n||(n=E.featureCollection([],{id:new Date().getTime().toString()}),this.geojson.push(n)),n.features=n.features.filter(h=>h.geometry.type==="Point");const c=E.feature({type:"Point",coordinates:[a.lngLat.lng,a.lngLat.lat]},{id:new Date().getTime().toString(),mode:this.navigation});n.features.push(c),this.handlePointUpdate(n)}},handlePointUpdate(a){const e=a.features;if(e.length>1){let t=0;const o=[];for(let r=1;r<e.length;r++){const s=e[r-1],l=e[r],n=s.properties,c={lng:s.geometry.coordinates[0],lat:s.geometry.coordinates[1]},h={lng:l.geometry.coordinates[0],lat:l.geometry.coordinates[1]},f=v.calculateDistance(c,h,n.mode==="RL",2),d=v.calculateBearing(c,h,n.mode==="RL",2);t=v.LngLatHelper.roundPrecision(t+f,2);let m;n.mode==="RL"?m=v.convertToMonotonicLng([c,h]):m=v.convertToMonotonicLng(v.interpolateCoordinates(c,h,200));const y=E.lineString(m.map(u=>[u.lng,u.lat]));y.properties.dist=f,y.properties.bearing=d,y.properties.total=t,o.push(y)}e.push(...o),a.total=t}return this.handleRender(a),a},handleTmpPointUpdate(a,e,t,o){const r=E.featureCollection([]);let s,l;if(e){const c=e.properties,h={lng:e.geometry.coordinates[0],lat:e.geometry.coordinates[1]},f={lng:t.lng,lat:t.lat};s=v.calculateDistance(h,f,c.mode==="RL",2),l=v.calculateBearing(h,f,c.mode==="RL",2);let d;c.mode==="RL"?d=v.convertToMonotonicLng([h,f]):d=v.convertToMonotonicLng(v.interpolateCoordinates(h,f,200));const m=E.lineString(d.map(y=>[y.lng,y.lat]));m.properties.dist=s,m.properties.bearing=l,r.features.push(m)}if(o){const c=t.properties,h=t,f={lng:o.geometry.coordinates[0],lat:o.geometry.coordinates[1]};s=v.calculateDistance(h,f,c.mode==="RL",2),l=v.calculateBearing(h,f,c.mode==="RL",2);let d;c.mode==="RL"?d=v.convertToMonotonicLng([h,f]):d=v.convertToMonotonicLng(v.interpolateCoordinates(h,f,200));const m=E.lineString(d.map(y=>[y.lng,y.lat]));m.properties.dist=s,m.properties.bearing=l,r.features.push(m)}this.map.getSource(this.tmpSource)?this.map.getSource(this.tmpSource).setData(r):this.map.addSource(this.tmpSource,{type:"geojson",data:r}),this.map.getLayer(this.tmpLayer)||this.map.addLayer({id:this.tmpLayer,type:"line",source:this.tmpSource,filter:["==","$type","LineString"],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#f56c6c","line-width":2,"line-opacity":.85,"line-dasharray":[3,2]}}),this.map.getLayer(this.tmpLabelLayer)||this.map.addLayer({id:this.tmpLabelLayer,type:"symbol",source:this.tmpSource,filter:["==","$type","LineString"],layout:{"symbol-placement":"line-center","text-field":"{dist} nm","text-rotation-alignment":"map","text-size":12},paint:{"text-opacity":1,"text-color":"#fff","text-halo-color":"#f56c6c","text-halo-width":4,"text-halo-blur":0}});let n;if(o?n='<div class="marker-label">Drag and drop</div>':n=`<div class="marker-label">Tol distance: <b>${v.LngLatHelper.roundPrecision((a.total??0)+s,2)}</b>nm, bearing: <b>${l}</b>°</div><div class="marker-label">${this.navigation==="RL"?"RL":"GC"} mode, using 'Shift' to switch</div><div class="marker-label">Double click to end</div>`,this.tipMarker)this.tipMarker._element.innerHTML=n,this.tipMarker.setLngLat([t.lng,t.lat]);else{const c=document.createElement("div");c.className="tip-marker",c.innerHTML=n,this.tipMarker=new U.Marker(c).setOffset([140,0]).setLngLat([t.lng,t.lat]).addTo(this.map)}},handleMove(a){this.map.getCanvas().style.cursor="crosshair";let e=this.geojson.at(-1);e||(e=E.featureCollection([],{id:new Date().getTime().toString()}),this.geojson.push(e));const t=e.features.filter(o=>o.geometry.type==="Point");t!=null&&t.length&&this.handleTmpPointUpdate(e,t.at(-1),{lng:a.lngLat.lng,lat:a.lngLat.lat})},handleDblClick(a){a.preventDefault();let e=this.geojson.at(-1);e.closed=!0,this.handleRender(e),e=E.featureCollection([],{id:new Date().getTime().toString()}),this.geojson.push(e)},handleRender(a){var e;if((e=a==null?void 0:a.features)!=null&&e.length){const t=`${a.id}-${this.source}`,o=`${a.id}-${this.layer}`,r=`${a.id}-${this.labelLayer}`;this.map.getSource(t)?this.map.getSource(t).setData(a):this.map.addSource(t,{type:"geojson",data:a}),this.handleClear(a,!1),this.map.addLayer({id:o,type:"line",source:t,filter:["==","$type","LineString"],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#f56c6c","line-width":2}}),this.map.addLayer({id:r,type:"symbol",source:t,filter:["==","$type","LineString"],layout:{"symbol-placement":"line-center","text-field":"{dist}nm,{bearing}°","text-rotation-alignment":"map","text-size":12},paint:{"text-opacity":1,"text-color":"#fff","text-halo-color":"#f56c6c","text-halo-width":4,"text-halo-blur":0}});const s=a.features.filter(l=>l.geometry.type==="Point");for(const l of s){const n=document.createElement("div");n.id=`${a.id}-${l.properties.id}`,n.className=`${a.closed?"point-marker closed":"point-marker"}`,n.innerHTML='<div class="marker-circle"></div>';const c=new U.Marker({element:n,draggable:!0,contextmenu:!0}).setLngLat(l.geometry.coordinates).addTo(this.map);c.on("drag",this.handleDrag),c.on("dragend",this.handleDragEnd),this.pointMarkers[a.id]?this.pointMarkers[a.id].push(c):this.pointMarkers[a.id]=[c]}if(a.closed){const l=s.at(-1),c=a.features.filter(f=>f.geometry.type==="LineString").at(-1),h=document.createElement("div");h.className="point-summary-marker",h.innerHTML=`<div id="${a.id}" class="marker-close">×</div><div class="marker-label">Tol: ${c.properties.total}nm</div>`,this.closeMarkers[a.id]=new U.Marker(h).setOffset([60,0]).setLngLat(l.geometry.coordinates).addTo(this.map)}}},handleClear(a,e=!0){var s,l,n,c,h,f,d,m,y;const t=`${a.id}-${this.source}`,o=`${a.id}-${this.layer}`,r=`${a.id}-${this.labelLayer}`;(s=this.map)!=null&&s.getLayer(o)&&this.map.removeLayer(o),(l=this.map)!=null&&l.getLayer(r)&&this.map.removeLayer(r),(n=this.map)!=null&&n.getLayer(this.tmpLayer)&&this.map.removeLayer(this.tmpLayer),(c=this.map)!=null&&c.getLayer(this.tmpLabelLayer)&&this.map.removeLayer(this.tmpLabelLayer),(h=this.closeMarkers[a.id])==null||h.remove(),this.closeMarkers[a.id]=void 0,(f=this.pointMarkers[a.id])==null||f.forEach(u=>{u==null||u.remove()}),this.pointMarkers[a.id]=[],(d=this.tipMarker)==null||d.remove(),this.tipMarker=void 0,e&&((m=this.map)!=null&&m.getSource(t))&&this.map.removeSource(t),e&&((y=this.map)!=null&&y.getSource(this.tmpSource))&&this.map.removeSource(this.tmpSource)}}};function dr(a,e,t,o,r,s){return i.openBlock(),i.createElementBlock("div")}const pr=C(hr,[["render",dr]]),Go="",mr={name:"IdmENC",props:{map:{type:Object},enabled:{type:Boolean},beforeLayer:{type:String,default:"grayland"},bottom:{type:String,default:"260px"},token:{type:String,default:""},toggleVersion:{type:Number},permission:{type:Number}},emits:["enc"],data(){return{helper:v.CompanyHelper,vendor:this.$attrs.permission&v.CompanyHelper.LEVEL.Supper?"hi":"i4",right:10}},watch:{vendor:{handler(){this.$emit("enc",this.vendor)},immediate:!0},toggleVersion:{handler(){var a,e;this.right=(((a=document.getElementsByClassName("available-layers-show")[0])==null?void 0:a.clientWidth)||0)+(((e=document.getElementsByClassName("fleet-list-container")[0])==null?void 0:e.clientWidth)||0)+10},immediate:!0}},methods:{}},Pe=a=>(i.pushScopeId("data-v-2d85e33b"),a=a(),i.popScopeId(),a),yr={key:0},fr={class:"bar-item"},gr=[Pe(()=>i.createElementVNode("span",{class:"iconfont"},"HI",-1))],ur=[Pe(()=>i.createElementVNode("span",{class:"iconfont"},"I4",-1))];function br(a,e,t,o,r,s){return t.enabled&&t.permission&r.helper.LEVEL.Supper?(i.openBlock(),i.createElementBlock("div",yr,[i.createElementVNode("div",{class:"menu-bar-box",style:i.normalizeStyle({position:"absolute",right:r.right+"px",bottom:t.bottom})},[i.createElementVNode("div",fr,[i.createElementVNode("div",{class:i.normalizeClass(r.vendor==="hi"?"menu-icon active":"menu-icon"),onClick:e[0]||(e[0]=l=>r.vendor="hi")},gr,2),i.createElementVNode("div",{class:i.normalizeClass(r.vendor==="i4"?"menu-icon active":"menu-icon"),onClick:e[1]||(e[1]=l=>r.vendor="i4")},ur,2)])],4)])):i.createCommentVNode("",!0)}const _r=C(mr,[["render",br],["__scopeId","data-v-2d85e33b"]]),Jo="",Lr={name:"IdmGLV2",components:{IdmGlLayer:mt,IdmWindBarb:wt,IdmWindParticle:St,IdmCurrents:Rt,IdmCurrentParticle:Mt,IdmSigWave:jt,IdmSwell:Ht,IdmPrmsl:Zt,IdmIceberg:Yt,IdmTropicals:xe,IdmPrecip3h:Ea,IdmVisibility:Pa,IdmWaterTemp:$a,IdmTemp:za,IdmArctic:Fa,IdmWarZone:wi,IdmGmdssArea:xi,IdmEcaZone:ki,IdmAlertZone:Ii,IdmPort:Hi,IdmLoadLine:Zi,IdmTimezone:Yi,IdmVRA:er,IdmSpecialArea:ir,IdmTerminator:sr,IdmLatLng:Ce,IdmMeasure:pr,IdmPoint:bi,IdmENC:_r},props:{map:{type:Object},token:{type:String},ts:{type:String},beforeLayer:{type:String,default:""}},data(){return{weatherLayers:{},activeWeatherLayers:[],weatherWeight:0,otherLayers:{},otherWeight:0,showCoord:!1,showMeasure:!1,showPoint:!1,show3d:!1,meteo:void 0,source:"",gateway:"https://cbe.idmwx.com",zoom:6,viewport:void 0,particleFactor:void 0,showRampColor:!1,activeWindLayer:!1,showWindParticle:!1,showCurrentParticle:!1,toggleVersion:0,enc:"i4",defaultMeteoToken:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6ImNseTVudHJzYzAwNWUwbHBsZHkyaDRqczMiLCJyb2xlIjoxLCJuYW1lIjoiZmFrZUBvcm13eC5jb20iLCJwbGF0SWQiOiJnZDBtdDFkIiwiY29tcGFueSI6eyJpZCI6bnVsbCwiY2hpbGRyZW4iOltdfSwiaWF0IjoxNzIzMDI0MDI0LCJleHAiOjM5MzA1NDQwMjR9.RrKcdcMnq-FxBLJQ-i6lx2FscDE46y8EvHIemPW4HTg"}},watch:{ts:{handler(a,e){a&&e&&W(a).utc().format("yyyy-MM-DD HH")!==W(e).utc().format("yyyy-MM-DD HH")&&this.$nextTick(()=>{this.handleDateChange({tropicals:!1})})},immediate:!0},map:{handler(){var a,e,t,o,r,s,l,n,c,h,f,d,m,y,u,g,p;this.map&&(this.map.on("zoomend",this.handleDragEndWithZoom4Json),this.map.on("dragend",this.handleDragEndWithZoom4Json),this.map.on("move",this.handleDragEndWithZoom4Image),this.viewport=new ve(this.map),this.handleRampColorInitial(),console.log(888,this.activeWeatherLayers),this.activeWeatherLayers.some(_=>["wind","current"].includes(_.key))&&((a=this.particleFactor)!=null&&a.particle)||this.activeWeatherLayers.some(_=>["temp","water-temp"].includes(_.key))?((t=(e=this.map)==null?void 0:e.getLayer("grayland"))==null||t.setLayoutProperty("visibility","visible"),(r=(o=this.map)==null?void 0:o.getLayer("darkmap"))==null||r.setLayoutProperty("visibility","visible"),(s=this.map)!=null&&s.getLayer("grayland")&&((n=this.map)==null||n.moveLayer((l=this.viewport)==null?void 0:l.rampColorLayer,"grayland")),(c=this.map)!=null&&c.getLayer("grayland")&&((f=this.map)==null||f.moveLayer((h=this.viewport)==null?void 0:h.particleLayer,"grayland"))):((m=this.map)==null||m.moveLayer((d=this.viewport)==null?void 0:d.rampColorLayer,null),(u=(y=this.map)==null?void 0:y.getLayer("grayland"))==null||u.setLayoutProperty("visibility","none"),(p=(g=this.map)==null?void 0:g.getLayer("darkmap"))==null||p.setLayoutProperty("visibility","none")))},immediate:!0},activeWeatherLayers:{handler(){var a,e,t,o,r,s,l,n,c,h,f,d,m,y,u,g,p;if(console.log(999,this.activeWeatherLayers),!this.map)return!1;this.activeWeatherLayers.some(_=>["wind","current"].includes(_.key))&&((a=this.particleFactor)!=null&&a.particle)||this.activeWeatherLayers.some(_=>["temp","water-temp"].includes(_.key))?((t=(e=this.map)==null?void 0:e.getLayer("grayland"))==null||t.setLayoutProperty("visibility","visible"),(r=(o=this.map)==null?void 0:o.getLayer("darkmap"))==null||r.setLayoutProperty("visibility","visible"),(s=this.map)!=null&&s.getLayer("grayland")&&((n=this.map)==null||n.moveLayer((l=this.viewport)==null?void 0:l.rampColorLayer,"grayland")),(c=this.map)!=null&&c.getLayer("grayland")&&((f=this.map)==null||f.moveLayer((h=this.viewport)==null?void 0:h.particleLayer,"grayland"))):((m=this.map)==null||m.moveLayer((d=this.viewport)==null?void 0:d.rampColorLayer,null),(u=(y=this.map)==null?void 0:y.getLayer("grayland"))==null||u.setLayoutProperty("visibility","none"),(p=(g=this.map)==null?void 0:g.getLayer("darkmap"))==null||p.setLayoutProperty("visibility","none"))},immediate:!0},"particleFactor.particle":{handler(){var a,e,t,o,r,s,l;this.activeWeatherLayers.some(n=>["wind","current"].includes(n.key))&&!((a=this.particleFactor)!=null&&a.particle)&&!this.activeWeatherLayers.some(n=>["temp","water-temp"].includes(n.key))&&((t=this.map)==null||t.moveLayer((e=this.viewport)==null?void 0:e.rampColorLayer,null),(r=(o=this.map)==null?void 0:o.getLayer("grayland"))==null||r.setLayoutProperty("visibility","none"),(l=(s=this.map)==null?void 0:s.getLayer("darkmap"))==null||l.setLayoutProperty("visibility","none"))},immediate:!0},enc:{handler(a,e){var t,o,r,s;this.activeWeatherLayers.some(l=>["wind","temp","current"].includes(l.key))||((o=(t=this.map)==null?void 0:t.getLayer(a))==null||o.setLayoutProperty("visibility","visible"),(s=(r=this.map)==null?void 0:r.getLayer(e))==null||s.setLayoutProperty("visibility","none"))}}},methods:{async fetchWeatherLayers(a={tropicals:!1}){var r,s,l,n,c,h,f,d;const e=new Date().valueOf();let t=0,o=0;if(this.map){const m=((r=this.map)==null?void 0:r.getZoom())+1,y=(s=this.map)==null?void 0:s.getBounds(),u=`${y._sw.lng},${y._sw.lat},${y._ne.lng},${y._ne.lat}`;if(this.handleRampColorState(),this.particleFactor){const g=v.LayerHelper.WEATHER_LAYERS.find(p=>{var _;return((_=p.peer)==null?void 0:_.weight)===this.particleFactor.weight});this.particleFactor.particle?this.weatherWeight=this.weatherWeight&g.weight?this.weatherWeight:this.weatherWeight+g.weight:this.weatherWeight=this.weatherWeight&g.weight?this.weatherWeight-g.weight:this.weatherWeight}if(this.weatherWeight>0){let g=this.weatherWeight,p;if(a.tropicals||this.weatherWeight&256&&(p=this.weatherLayers.tropicals,p&&(g-=256,p.version=Math.random()+1)),g>0){const _=await H.get(`${this.gateway}/api/arc/weather/layers/links?l=${g}&v=${this.source}&z=${m}&bbox=${u}&t=${this.ts}`,{headers:{Authorization:this.token||this.defaultMeteoToken}});if(o=new Date().valueOf()-(e+t),console.log("weather links elapsed: ",o,", total: ",t+=o),((l=_==null?void 0:_.data)==null?void 0:l.code)===0){const b=(n=_==null?void 0:_.data)==null?void 0:n.data,w=[];for(const L in b)L==="ice-edge"&&(b[L]="https://idm-hz.oss-cn-hangzhou.aliyuncs.com/test/sea_ice_contours.geojson"),L!=="tropicals"&&w.push(H.get(b[L],{headers:{Authorization:this.token||this.defaultMeteoToken,key:L},responseType:/\.(jpg|png)$/.test(b[L])?"blob":"json"}).catch(S=>{console.log(`[${L}] fetch layer error: ${S}`)}));const x=await Promise.all(w);this.weatherLayers={},x.map(L=>{var T,$,R,z;const S=((T=L==null?void 0:L.data)==null?void 0:T.data)||(L==null?void 0:L.data),N=(R=($=L==null?void 0:L.config)==null?void 0:$.headers)==null?void 0:R.key;N&&S&&(this.weatherLayers[N]={raw:S,type:((z=L==null?void 0:L.config)==null?void 0:z.responseType)==="blob"?"image":"json",etime:this.ts})}),b.tropicals&&H.get(b.tropicals,{headers:{Authorization:this.token||this.defaultMeteoToken,key:"tropicals"}}).then(L=>{var T,$,R;const S=ke.TropicalHelper.convert2Geojson(((T=L==null?void 0:L.data)==null?void 0:T.data)||(L==null?void 0:L.data)),N=(R=($=L==null?void 0:L.config)==null?void 0:$.headers)==null?void 0:R.key;this.weatherLayers[N]={data:S,active:!0,cached:!1,type:"json",etime:this.ts,version:Math.random()+1}})}if(o=new Date().valueOf()-(e+t),console.log("weather layers elapsed: ",o,", total: ",t+=o),this.weatherLayers["swell-direction"]||this.weatherLayers["swell-height"]){const b=(c=this.weatherLayers["swell-direction"])==null?void 0:c.raw,w=(h=this.weatherLayers["swell-height"])==null?void 0:h.raw;delete this.weatherLayers["swell-direction"],delete this.weatherLayers["swell-height"],this.weatherLayers.swell={type:"json",direction:b,height:{raw:w},etime:this.ts}}if(this.weatherLayers["current-direction"]||this.weatherLayers["current-speed"]){const b=(f=this.weatherLayers["current-direction"])==null?void 0:f.raw,w=(d=this.weatherLayers["current-speed"])==null?void 0:d.raw;delete this.weatherLayers["current-direction"],delete this.weatherLayers["current-speed"],this.weatherLayers.current={type:"json",direction:b,speed:{raw:w},etime:this.ts}}}p&&(p.etime=this.ts,p.cached=!0,this.weatherLayers.tropicals=p)}this.handleWeatherLayerToggle(),this.handleDragEndWithZoom4Json()}this.toggleVersion=Math.random()},async fetchOtherLayers(a={all:!1,dayNight:!1,enc:!1}){var e,t,o,r;if(this.map){let s=this.otherWeight;if(s){let l=!1;if(this.otherWeight&2048&&(s=this.otherWeight-2048,l=!0),s){if(a.all){const n=await H.get(`${this.gateway}/api/arc/other/layers/links?l=${s}&t=${this.ts}`,{headers:{Authorization:this.token||this.defaultMeteoToken}});if(((e=n==null?void 0:n.data)==null?void 0:e.code)===0){const c=(t=n==null?void 0:n.data)==null?void 0:t.data,h=[];for(const d in c)h.push(H.get(c[d],{headers:{Authorization:this.token||this.defaultMeteoToken,key:d}}));const f=await Promise.all(h);this.otherLayers={enc:l},f.map(d=>{var u,g,p;const m=((u=d==null?void 0:d.data)==null?void 0:u.data)||(d==null?void 0:d.data),y=(p=(g=d==null?void 0:d.config)==null?void 0:g.headers)==null?void 0:p.key;this.otherLayers[y]=m})}}else if(a.dayNight&&s&1024){const n=await H.get(`${this.gateway}/api/arc/other/layers/links?l=1024&t=${this.ts}`,{headers:{Authorization:this.token||this.defaultMeteoToken}});if(((o=n==null?void 0:n.data)==null?void 0:o.code)===0){const c=(r=n==null?void 0:n.data)==null?void 0:r.data,h=[];for(const d in c)h.push(H.get(c[d],{headers:{Authorization:this.token||this.defaultMeteoToken,key:d}}));(await Promise.all(h)).map(d=>{var u,g,p;const m=((u=d==null?void 0:d.data)==null?void 0:u.data)||(d==null?void 0:d.data),y=(p=(g=d==null?void 0:d.config)==null?void 0:g.headers)==null?void 0:p.key;this.otherLayers[y]=m})}}}else this.otherLayers={enc:l}}else this.otherLayers={};this.handleBeforeLayerToggle()}},handleRampColorState(){var a;if(this.showRampColor=!1,this.showWindParticle=!1,this.showCurrentParticle=!1,(a=this.particleFactor)!=null&&a.particle)this.showRampColor=!0,this.showWindParticle=this.particleFactor.key==="wind",this.showCurrentParticle=this.particleFactor.key==="current",this.activeWeatherLayers=this.activeWeatherLayers.filter(e=>e.type==="json");else for(const e of this.activeWeatherLayers)["png","jpg"].includes(e.type)&&(this.showRampColor=!0);this.activeWindLayer=!!this.activeWeatherLayers.find(e=>e.key==="wind"),this.$refs.layer&&(this.$refs.layer.activeWeatherLayers=this.activeWeatherLayers)},handleRampColorInitial(){var a,e,t,o,r,s,l,n,c,h,f,d;this.viewport.map.getSource((a=this.viewport)==null?void 0:a.rampColorSource)||this.viewport.map.addSource((e=this.viewport)==null?void 0:e.rampColorSource,{type:"canvas",canvas:(t=this.viewport)==null?void 0:t.rampColorCanvas,animate:!0,coordinates:this.viewport.getBoundLngLat()}),this.viewport.map.getLayer((o=this.viewport)==null?void 0:o.rampColorLayer)||this.viewport.map.addLayer({type:"raster",id:(r=this.viewport)==null?void 0:r.rampColorLayer,source:(s=this.viewport)==null?void 0:s.rampColorSource,layout:{visibility:"none"}},this.beforeLayer),this.viewport.map.getSource((l=this.viewport)==null?void 0:l.particleSource)||this.viewport.map.addSource((n=this.viewport)==null?void 0:n.particleSource,{type:"canvas",canvas:(c=this.viewport)==null?void 0:c.particleCanvas,animate:!0,coordinates:this.viewport.getBoundLngLat()}),this.viewport.map.getLayer((h=this.viewport)==null?void 0:h.particleLayer)||this.viewport.map.addLayer({type:"raster",id:(f=this.viewport)==null?void 0:f.particleLayer,source:(d=this.viewport)==null?void 0:d.particleSource,layout:{visibility:"none"}},this.beforeLayer)},handleDragEndWithZoom4Json(){var h,f,d,m;const a=new Date().valueOf();let e=0,t=0;const o=(h=this.map)==null?void 0:h.getBounds(),r=this.map.getZoom(),s=v.convertToStandardLng(o._sw.lng),l=v.convertToStandardLng(o._ne.lng),n=Math.floor(o._sw.lat),c=Math.ceil(o._ne.lat);for(const y in this.weatherLayers)if(this.weatherLayers[y].active&&this.weatherLayers[y].type==="json"){this.weatherLayers[y].active=!1,this.weatherLayers[y].version=Math.random()+1;let u=[];if(["swell","current"].includes(y)){const g=((f=this.weatherLayers[y])==null?void 0:f.direction)||{};for(const p in g)if(p>n&&p<c&&(!(r<=this.zoom)||p%(r<this.zoom/2?5:3)===0)){const _=g[p].lng;s>l?_.forEach((b,w)=>{var x;if((b>=s&&b<=180||b>=-180&&b<=l)&&(!(r<=this.zoom)||b%(r<this.zoom/2?5:3)===0)){const L=E.point([b,p],{val:g[p].val[w],spd:(x=g[p].spd)==null?void 0:x[w]});u.push(L)}}):_.forEach((b,w)=>{var x;if(b>=s&&b<=l&&(!(r<=this.zoom)||b%(r<this.zoom/2?5:3)===0)){const L=E.point([b,p],{val:g[p].val[w],spd:(x=g[p].spd)==null?void 0:x[w]});u.push(L)}})}if(t=new Date().valueOf()-(a+e),console.log("direction elapsed: ",t,", total: ",e+=t),y==="swell"){const p=this.weatherLayers[y].height;if(p){if(!p.data){const _=[];for(const b in(d=p.raw)==null?void 0:d.LineString){const w=p.raw.LineString[b];for(const x of w)_.push(E.lineString(x,{val:Number(b)}));p.data=E.featureCollection(_)}}if(p.data){const _=this.handleBboxClip(p.data,o);u=u.concat(_)}t=new Date().valueOf()-(a+e),console.log("height elapsed: ",t,", total: ",e+=t)}}if(y==="current"){const p=this.weatherLayers[y].speed;if(p){if(!p.data){const b=[];for(const w in(m=p.raw)==null?void 0:m.Polygon){const x=p.raw.Polygon[w];for(const L of x)b.push(E.polygon(L,{val:Number(w)}))}p.data=E.featureCollection(b)}const _=r<this.zoom?p.data.features.filter(b=>b.properties.val>.5):p.data.features;u=u.concat(_),t=new Date().valueOf()-(a+e),console.log("speed elapsed: ",t,", total: ",e+=t)}}}else if(y==="wind"){const g=this.weatherLayers.wind.raw;for(const p in g)if(p>n&&p<c&&(!(r<=this.zoom)||p%(r<this.zoom/2?5:3)===0)){const _=g[p].lng;s>l?_.forEach((b,w)=>{if((b>=s&&b<=180||b>=-180&&b<=l)&&(!(r<=this.zoom)||b%(r<this.zoom/2?5:3)===0)){const x=E.point([b,p],{val:g[p].val[w],spd:g[p].spd[w]});u.push(x)}}):_.forEach((b,w)=>{if(b>=s&&b<=l&&(!(r<=this.zoom)||b%(r<this.zoom/2?5:3)===0)){const x=E.point([b,p],{val:g[p].val[w],spd:g[p].spd[w]});u.push(x)}})}t=new Date().valueOf()-(a+e),console.log("wind barb elapsed: ",t,", total: ",e+=t)}else if(y==="sig-wave-height"){if(this.weatherLayers[y].data)u=this.weatherLayers[y].data;else{const g=this.weatherLayers[y].raw;if(g){const p=[];for(const _ in g.Polygon){const b=g.Polygon[_];for(const w of b)p.push(E.polygon(w,{val:Number(_)}))}u=u.concat(p)}}t=new Date().valueOf()-(a+e),console.log("sigWave elapsed: ",t,", total: ",e+=t)}else if(y==="prmsl"){if(this.weatherLayers[y].data)u=this.weatherLayers[y].data;else{const g=this.weatherLayers[y].raw;if(g){const p=[];for(const _ in g.LineString){const b=g.LineString[_];for(const w of b)p.push(E.lineString(w,{val:Number(_)}))}for(const _ in g.Point)g.Point[_].lng.forEach((b,w)=>{b=v.convertToStandardLng(b),p.push(E.point([b,_],{val:g.Point[_].val[w],type:g.Point[_].type[w]}))});u=u.concat(p)}}t=new Date().valueOf()-(a+e),console.log("prmsl elapsed: ",t,", total: ",e+=t)}else if(y==="arctic"||y==="iceberg"){if(this.weatherLayers[y].data)u=this.weatherLayers[y].data;else{const g=this.weatherLayers[y].raw;if(g){const p=[];for(const _ in g.LineString){const b=g.LineString[_];for(const w of b)p.push(E.lineString(w,{val:Number(_)}))}u=u.concat(p)}}t=new Date().valueOf()-(a+e)}console.log(y," elapsed: ",t,", total: ",e+=t),u.length&&(this.weatherLayers[y].data=E.featureCollection(u)),this.weatherLayers[y].active=!0,this.weatherLayers[y].version=Math.random()+1}},handleDragEndWithZoom4Image(){for(const a in this.weatherLayers)this.weatherLayers[a].active&&this.weatherLayers[a].type==="image"&&(this.weatherLayers[a].active=!0,this.weatherLayers[a].version=Math.random()+1)},handleBboxClip(a,e){const t=[],o=v.convertToStandardLng(e._sw.lng),r=v.convertToStandardLng(e._ne.lng);return a.features.forEach(s=>{if(s.geometry.type!=="Point")if(o>r){let l=[o,e._sw.lat,180,e._ne.lat],n=E.bboxClip(s,l);n.geometry.coordinates.length&&t.push(n),l=[-180,e._sw.lat,r,e._ne.lat],n=E.bboxClip(s,l),n.geometry.coordinates.length&&t.push(n)}else{const l=[o,e._sw.lat,r,e._ne.lat],n=E.bboxClip(s,l);n.geometry.coordinates.length&&t.push(n)}else t.push(s)}),t},handleWeatherLayerToggle(){var a;for(const e in this.weatherLayers)this.weatherLayers[e].active=!1,this.weatherLayers[e].version=Math.random()+1;for(const e of this.activeWeatherLayers){let t=e.key;t.indexOf("swell")>-1?t="swell":t.indexOf("current")>-1&&(t="current"),this.weatherLayers[t]&&(this.weatherLayers[t].active=!0,this.weatherLayers[t].version=Math.random()+1,((a=this.particleFactor)==null?void 0:a.key)===t&&this.weatherLayers[`${t}-particle`]&&(this.weatherLayers[`${t}-particle`].active=this.particleFactor.particle))}this.handleBeforeLayerToggle()},handleBeforeLayerToggle(){var a,e,t,o,r,s,l,n,c,h,f,d,m;(a=this.map)!=null&&a.getLayer(this.beforeLayer)&&((e=this.activeWeatherLayers)!=null&&e.length||(t=this.otherLayers)!=null&&t["war-zones"]||(o=this.otherLayers)!=null&&o["gmdss-areas"]||(r=this.otherLayers)!=null&&r["load-lines"]||(s=this.otherLayers)!=null&&s["high-risk-area"]||(l=this.otherLayers)!=null&&l["time-zones"]||(n=this.otherLayers)!=null&&n.pirates||(c=this.otherLayers)!=null&&c.ports||(h=this.otherLayers)!=null&&h.enc||(f=this.otherLayers)!=null&&f["voluntary-reporting-area"]||(d=this.otherLayers)!=null&&d["eca-zones"]||(m=this.otherLayers)!=null&&m["special-area"])&&this.map.setLayoutProperty(this.beforeLayer,"visibility","visible")},handleDateChange(a={tropicals:!1}){this.fetchWeatherLayers(a),this.fetchOtherLayers({dayNight:!0})},handleWeatherLayerChange(a,e,t){if(!this.map)setTimeout(()=>{this.handleWeatherLayerChange(a,e,t)},500);else{this.activeWeatherLayers=e;const o=this.activeWeatherLayers.some(l=>["wind","current"].includes(l.key)),r=this.activeWeatherLayers.some(l=>["png","jpg"].includes(l.type));o&&!r?(this.particleFactor=this.activeWeatherLayers.find(l=>["wind","current"].includes(l.key)),this.particleFactor.particle=!0):r&&this.particleFactor&&(this.particleFactor.particle=!1);const s=e==null?void 0:e.reduce((l,n)=>l+(l&(n==null?void 0:n.weight)?0:n==null?void 0:n.weight),0);this.weatherWeight!==s||this.source!==t?(this.source=t,this.weatherWeight=s,this.fetchWeatherLayers({tropicals:!1})):this.handleWeatherLayerToggle()}},handleOtherLayerChange(a){if(!this.map)setTimeout(()=>{this.handleOtherLayerChange(a)},500);else{const e=a==null?void 0:a.reduce((t,o)=>t+(o==null?void 0:o.weight),0);this.otherWeight!=e&&(this.otherWeight=e,this.fetchOtherLayers({all:!0}))}},async handlePointChange(a){const e=this.ts?W(this.ts):W(),t={lat:a.lat,lng:a.lng,ts:e.utc().format(),wt:!0,src:this.source},o=await H.get(`${this.gateway}/api/arc/meteo/query`,{params:t,headers:{Authorization:this.token||this.defaultMeteoToken}});(o==null?void 0:o.status)===200&&(this.meteo={...o==null?void 0:o.data,...a})},handle3dToggle(a){a?this.map.setProjection("globe"):this.map.setProjection("mercator")},handleParticle(a){this.particleFactor=a,this.fetchWeatherLayers({tropicals:!1})}}},wr={key:0,class:"map-gl-home"};function vr(a,e,t,o,r,s){var j,Q,oe,se,ne,le,ce,he,de,pe,me,ye,fe,ge,ue,be,_e,Le,Se,Te,Ve,Ie,$e,Re,De,Be;const l=i.resolveComponent("IdmGlLayer"),n=i.resolveComponent("IdmENC"),c=i.resolveComponent("IdmSigWave"),h=i.resolveComponent("IdmSwell"),f=i.resolveComponent("IdmPrmsl"),d=i.resolveComponent("IdmIceberg"),m=i.resolveComponent("IdmTropicals"),y=i.resolveComponent("IdmCurrents"),u=i.resolveComponent("IdmCurrentParticle"),g=i.resolveComponent("IdmWindBarb"),p=i.resolveComponent("IdmWindParticle"),_=i.resolveComponent("IdmPrecip3h"),b=i.resolveComponent("IdmVisibility"),w=i.resolveComponent("IdmWaterTemp"),x=i.resolveComponent("IdmTemp"),L=i.resolveComponent("IdmArctic"),S=i.resolveComponent("IdmWarZone"),N=i.resolveComponent("IdmGmdssArea"),T=i.resolveComponent("IdmEcaZone"),$=i.resolveComponent("IdmAlertZone"),R=i.resolveComponent("IdmPort"),z=i.resolveComponent("IdmLoadLine"),O=i.resolveComponent("IdmTimezone"),J=i.resolveComponent("IdmVRA"),ie=i.resolveComponent("IdmSpecialArea"),q=i.resolveComponent("IdmTerminator"),P=i.resolveComponent("IdmLatLng"),B=i.resolveComponent("IdmMeasure"),re=i.resolveComponent("IdmPoint");return t.map?(i.openBlock(),i.createElementBlock("div",wr,[i.createVNode(l,i.mergeProps({ref:"layer",map:t.map,"toggle-version":r.toggleVersion},a.$attrs,{onWeather:s.handleWeatherLayerChange,onOther:s.handleOtherLayerChange,onCoordinate:e[0]||(e[0]=F=>r.showCoord=F),onMeasure:e[1]||(e[1]=F=>r.showMeasure=F),onPoint:e[2]||(e[2]=F=>r.showPoint=F),on3d:s.handle3dToggle,onToggleVersion:e[3]||(e[3]=F=>r.toggleVersion=F)}),null,16,["map","toggle-version","onWeather","onOther","on3d"]),i.createVNode(n,i.mergeProps({map:t.map,token:t.token,enabled:(j=r.otherLayers)==null?void 0:j.enc,"toggle-version":r.toggleVersion},a.$attrs,{onEnc:e[4]||(e[4]=F=>r.enc=F)}),null,16,["map","token","enabled","toggle-version"]),i.createVNode(c,i.mergeProps({map:t.map,"sig-wave":(Q=r.weatherLayers)==null?void 0:Q["sig-wave-height"],"before-layer":t.beforeLayer},a.$attrs),null,16,["map","sig-wave","before-layer"]),i.createVNode(h,i.mergeProps({map:t.map,swell:(oe=r.weatherLayers)==null?void 0:oe.swell,"before-layer":t.beforeLayer},a.$attrs),null,16,["map","swell","before-layer"]),i.createVNode(f,i.mergeProps({map:t.map,prmsl:(se=r.weatherLayers)==null?void 0:se.prmsl,"before-layer":t.beforeLayer},a.$attrs),null,16,["map","prmsl","before-layer"]),i.createVNode(d,i.mergeProps({map:t.map,iceberg:(ne=r.weatherLayers)==null?void 0:ne.iceberg,"before-layer":t.beforeLayer},a.$attrs),null,16,["map","iceberg","before-layer"]),i.createVNode(m,i.mergeProps({map:t.map,date:t.ts,tropicals:(le=r.weatherLayers)==null?void 0:le.tropicals,"before-layer":t.beforeLayer},a.$attrs),null,16,["map","date","tropicals","before-layer"]),i.createVNode(y,i.mergeProps({map:t.map,current:(ce=r.weatherLayers)==null?void 0:ce.current,"before-layer":t.beforeLayer,"show-particle":r.showCurrentParticle,"margin-bottom":r.activeWindLayer?r.showRampColor?"84px":"56px":r.showRampColor?"56px":"30px","toggle-version":r.toggleVersion,"weather-layers":r.weatherLayers},a.$attrs,{onParticle:s.handleParticle}),null,16,["map","current","before-layer","show-particle","margin-bottom","toggle-version","weather-layers","onParticle"]),i.createVNode(u,i.mergeProps({viewport:r.viewport,factor:(he=r.weatherLayers)==null?void 0:he["current-particle"],"before-layer":t.beforeLayer,"toggle-version":r.toggleVersion},a.$attrs),null,16,["viewport","factor","before-layer","toggle-version"]),i.createVNode(g,i.mergeProps({ref:"windBarb",map:t.map,wind:(de=r.weatherLayers)==null?void 0:de.wind,current:(pe=r.weatherLayers)==null?void 0:pe.current,"before-layer":t.beforeLayer,"margin-bottom":r.showRampColor?"56px":"30px","show-particle":r.showWindParticle},a.$attrs,{"toggle-version":r.toggleVersion,"weather-layers":r.weatherLayers,onParticle:s.handleParticle}),null,16,["map","wind","current","before-layer","margin-bottom","show-particle","toggle-version","weather-layers","onParticle"]),i.createVNode(p,i.mergeProps({viewport:r.viewport,factor:(me=r.weatherLayers)==null?void 0:me["wind-particle"],"before-layer":t.beforeLayer,"toggle-version":r.toggleVersion},a.$attrs),null,16,["viewport","factor","before-layer","toggle-version"]),i.createVNode(_,i.mergeProps({viewport:r.viewport,factor:(ye=r.weatherLayers)==null?void 0:ye.precip3h,"before-layer":t.beforeLayer,"toggle-version":r.toggleVersion},a.$attrs),null,16,["viewport","factor","before-layer","toggle-version"]),i.createVNode(b,i.mergeProps({viewport:r.viewport,factor:(fe=r.weatherLayers)==null?void 0:fe.visibility,"before-layer":t.beforeLayer,"toggle-version":r.toggleVersion},a.$attrs),null,16,["viewport","factor","before-layer","toggle-version"]),i.createVNode(w,i.mergeProps({viewport:r.viewport,factor:(ge=r.weatherLayers)==null?void 0:ge["water-temp"],"before-layer":t.beforeLayer,"toggle-version":r.toggleVersion},a.$attrs),null,16,["viewport","factor","before-layer","toggle-version"]),i.createVNode(x,i.mergeProps({viewport:r.viewport,factor:(ue=r.weatherLayers)==null?void 0:ue.temp,"before-layer":t.beforeLayer,"toggle-version":r.toggleVersion},a.$attrs),null,16,["viewport","factor","before-layer","toggle-version"]),i.createVNode(L,i.mergeProps({viewport:r.viewport,factor:(be=r.weatherLayers)==null?void 0:be.arctic,"before-layer":t.beforeLayer,"toggle-version":r.toggleVersion},a.$attrs),null,16,["viewport","factor","before-layer","toggle-version"]),i.createVNode(S,i.mergeProps({map:t.map,zone:(_e=r.otherLayers)==null?void 0:_e["war-zones"],"before-layer":t.beforeLayer},a.$attrs),null,16,["map","zone","before-layer"]),i.createVNode(N,i.mergeProps({map:t.map,area:(Le=r.otherLayers)==null?void 0:Le["gmdss-areas"],"before-layer":t.beforeLayer},a.$attrs),null,16,["map","area","before-layer"]),i.createVNode(T,i.mergeProps({map:t.map,zone:(Se=r.otherLayers)==null?void 0:Se["eca-zones"],"before-layer":t.beforeLayer},a.$attrs),null,16,["map","zone","before-layer"]),i.createVNode($,i.mergeProps({map:t.map,zone:(Te=r.otherLayers)==null?void 0:Te["alert-zones"],"before-layer":t.beforeLayer},a.$attrs),null,16,["map","zone","before-layer"]),i.createVNode(R,i.mergeProps({map:t.map,port:(Ve=r.otherLayers)==null?void 0:Ve.ports,"before-layer":t.beforeLayer},a.$attrs),null,16,["map","port","before-layer"]),i.createVNode(z,i.mergeProps({map:t.map,line:(Ie=r.otherLayers)==null?void 0:Ie["load-lines"],"before-layer":t.beforeLayer},a.$attrs),null,16,["map","line","before-layer"]),i.createVNode(O,i.mergeProps({map:t.map,zone:($e=r.otherLayers)==null?void 0:$e["time-zones"],"before-layer":t.beforeLayer},a.$attrs),null,16,["map","zone","before-layer"]),i.createVNode(J,i.mergeProps({map:t.map,area:(Re=r.otherLayers)==null?void 0:Re["voluntary-reporting-area"],"before-layer":t.beforeLayer},a.$attrs),null,16,["map","area","before-layer"]),i.createVNode(ie,i.mergeProps({map:t.map,area:(De=r.otherLayers)==null?void 0:De["special-area"],"before-layer":t.beforeLayer},a.$attrs),null,16,["map","area","before-layer"]),i.createVNode(q,i.mergeProps({map:t.map,area:(Be=r.otherLayers)==null?void 0:Be["day-night"]},a.$attrs),null,16,["map","area"]),i.createVNode(P,i.mergeProps({map:t.map,show:r.showCoord,"toggle-version":r.toggleVersion},a.$attrs),null,16,["map","show","toggle-version"]),i.createVNode(B,i.mergeProps({map:t.map,show:r.showMeasure},a.$attrs),null,16,["map","show"]),i.createVNode(re,i.mergeProps({map:t.map,show:r.showPoint,meteo:r.meteo},a.$attrs,{onPoint:s.handlePointChange}),null,16,["map","show","meteo","onPoint"])])):i.createCommentVNode("",!0)}const Ne=C(Lr,[["render",vr]]),Er={install(a){a.component("MapboxGL",Ne),a.component("TropicalGL",xe),a.component("LatLngGL",Ce)}};k.LatLngGL=Ce,k.MapboxGL=Ne,k.MapboxGLPlugin=Er,k.TropicalGL=xe,Object.defineProperty(k,Symbol.toStringTag,{value:"Module"})});
package/dist/style.css CHANGED
@@ -1 +1 @@
1
- @charset "UTF-8";:root{--idm-white: rgba(255, 255, 255, 1);--idm-white-9: rgba(255, 255, 255, .9);--idm-white-8: rgba(255, 255, 255, .8);--idm-white-7: rgba(255, 255, 255, .7);--idm-white-6: rgba(255, 255, 255, .6);--idm-white-5: rgba(255, 255, 255, .5);--idm-white-4: rgba(255, 255, 255, .4);--idm-white-3: rgba(255, 255, 255, .3);--idm-white-2: rgba(255, 255, 255, .2);--idm-white-1: rgba(255, 255, 255, .1);--idm-black: rgba(0, 0, 0, 1);--idm-black-9: rgba(0, 0, 0, .9);--idm-black-8: rgba(0, 0, 0, .8);--idm-black-7: rgba(0, 0, 0, .7);--idm-black-6: rgba(0, 0, 0, .6);--idm-black-5: rgba(0, 0, 0, .5);--idm-black-4: rgba(0, 0, 0, .4);--idm-black-3: rgba(0, 0, 0, .3);--idm-black-2: rgba(0, 0, 0, .2);--idm-black-1: rgba(0, 0, 0, .1);--idm-gray-light: rgba(239, 239, 239, 1);--idm-primary-color: rgba(42, 87, 183, 1);--idm-primary-color-light: #6c8ad9;--idm-primary-color-light2: #a7c4ff;--idm-primary-color-dark: #053a7e;--idm-primary-color-dark2: #002e6b;--idm-primary-color-9: rgba(42, 87, 183, .9);--idm-primary-color-8: rgba(42, 87, 183, .8);--idm-primary-color-7: rgba(42, 87, 183, .7);--idm-primary-color-6: rgba(42, 87, 183, .6);--idm-primary-color-5: rgba(42, 87, 183, .5);--idm-primary-color-4: rgba(42, 87, 183, .4);--idm-primary-color-3: rgba(42, 87, 183, .3);--idm-primary-color-2: rgba(42, 87, 183, .2);--idm-primary-color-1: rgba(42, 87, 183, .1);--idm-success-color: #0ddd9f;--idm-success-color-light: #92f7d9;--idm-success-color-dark: #06a074;--idm-success-color-dark2: #06694c;--idm-warning-color: #ff9500;--idm-warning-color-light: #ffcc00;--idm-warning-color-dark: #c77402;--idm-danger-color: #f44336;--idm-danger-color-light: #fb796e;--idm-danger-color-dark: #ad251b;--idm-info-color: #6e6e6e;--idm-info-color-light: #969696;--idm-info-color-light2: #c0c0c0;--idm-info-color-light3: #e2e2e2;--idm-info-color-dark: #494949;--idm-dangerous: #f44336;--idm-severe: #ff9500;--idm-heavy: #ffff00;--idm-vessel-cargo-color: lightgreen;--idm-vessel-tanker-color: red;--idm-vessel-passenger-color: blue;--idm-vessel-other-color: lightgrey;--idm-perf-cii-a: var(--idm-success-color);--idm-perf-cii-b: var(--idm-success-color-light);--idm-perf-cii-c: var(--idm-warning-color);--idm-perf-cii-d: var(--idm-danger-color-light);--idm-perf-cii-e: var(--idm-danger-color);--idm-text-shadow: 0px 0px 4px rgba(0, 0, 0, 1);--idm-dashed-border: 1px dashed var(--idm-white-5);--idm-solid-border: 1px solid var(--idm-white-4);--idm-background-color: var(--idm-primary-color-9);--idm-background-color-dark: var(--idm-primary-color-dark);--idm-background-color-light: var(--idm-primary-color-light);--idm-background-color-light2: #f3f5f8;--idm-active-background-light: linear-gradient(130deg, rgba(142, 163, 255, .93) 20%, rgb(90 67 193 / 93%) 100%);--idm-active-text-shadow-light: 0 0 7px rgb(194, 255, 247), 0 0 21px rgb(194, 255, 247), 0 0 30px rgba(182, 211, 207, .4), 0 0 12px rgba(15, 115, 223, .6), 0 0 22px rgba(15, 115, 223, .8), 0 0 38px rgba(15, 115, 223, .9), 0 0 60px rgba(15, 115, 223, 1);--idm-background-opaque-linear-gradient-top: linear-gradient(to top, rgba(41, 32, 165) 0%, rgba(44, 93, 184) 80%, rgba(32, 90, 165) 100%);--idm-background-linear-gradient-top: linear-gradient(to top, rgba(19, 23, 152, .85) 0%, rgba(44, 93, 184, .85) 80%, rgba(64, 110, 196, .85) 100%);--idm-background-linear-gradient-bottom: linear-gradient(to bottom, rgba(19, 23, 152, .85) 0%, rgba(44, 93, 184, .85) 80%, rgba(64, 110, 196, .85) 100%);--idm-background-linear-gradient-right: linear-gradient(to right, rgba(19, 23, 152, .85) 0%, rgba(44, 93, 184, .85) 80%, rgba(64, 110, 196, .85) 100%);--idm-background-linear-gradient-left: linear-gradient(to left, rgba(19, 23, 152, .85) 0%, rgba(44, 93, 184, .85) 80%, rgba(64, 110, 196, .85) 100%);--idm-blink-animation: blink .8s ease-out infinite alternate}:root[colorTheme=black]{--idm-background-opaque-linear-gradient-top: linear-gradient(to top, rgba(0, 0, 0, .8) 0%, rgba(0, 0, 0, .8) 80%, rgb(0, 0, 0, .8) 100%);--idm-background-linear-gradient-top: linear-gradient(to top, rgba(0, 0, 0, .6) 0%, rgba(0, 0, 0, .7) 70%, rgb(0, 0, 0, .7) 100%);--idm-background-linear-gradient-bottom: linear-gradient(to top, rgba(0, 0, 0, .6) 0%, rgba(0, 0, 0, .7) 70%, rgb(0, 0, 0, .7) 100%);--idm-background-linear-gradient-right: linear-gradient(to top, rgba(0, 0, 0, .6) 0%, rgba(0, 0, 0, .7) 70%, rgb(0, 0, 0, .7) 100%);--idm-background-linear-gradient-left: linear-gradient(to top, rgba(0, 0, 0, .6) 0%, rgba(0, 0, 0, .7) 70%, rgb(0, 0, 0, .7) 100%);--idm-active-background-light: linear-gradient(130deg, rgba(117, 117, 117, .93) 30%, rgba(200, 200, 200, .93) 100%);--idm-active-text-shadow-light: 0 0 7px rgb(253, 253, 253), 0 0 21px rgb(226, 226, 226), 0 0 30px rgba(185, 185, 185, .4), 0 0 12px rgba(67, 67, 67, .6), 0 0 22px rgba(27, 27, 27, .8), 0 0 38px rgba(15, 115, 223, .9), 0 0 60px rgba(15, 115, 223, 1);--idm-primary-color: rgba(0, 0, 0, .7);--idm-primary-color-light: #757575;--idm-primary-color-light2: #a5a5a5;--idm-primary-color-dark: rgba(0, 0, 0, .8);--idm-primary-color-dark2: rgba(0, 0, 0, 1);--idm-primary-color-9: rgba(0, 0, 0, .9);--idm-primary-color-7: rgba(0, 0, 0, .7);--idm-primary-color-5: rgba(0, 0, 0, .5);--idm-primary-color-3: rgba(0, 0, 0, .3);--idm-primary-color-1: rgba(0, 0, 0, .1)}:root[colorTheme=blue]{--idm-background-opaque-linear-gradient-top: linear-gradient(to top, rgba(41, 32, 165) 0%, rgba(44, 93, 184) 80%, rgba(32, 90, 165) 100%);--idm-background-linear-gradient-top: linear-gradient(to top, rgba(19, 23, 152, .85) 0%, rgba(44, 93, 184, .85) 80%, rgba(64, 110, 196, .85) 100%);--idm-background-linear-gradient-bottom: linear-gradient(to bottom, rgba(19, 23, 152, .85) 0%, rgba(44, 93, 184, .85) 80%, rgba(64, 110, 196, .85) 100%);--idm-background-linear-gradient-right: linear-gradient(to right, rgba(19, 23, 152, .85) 0%, rgba(44, 93, 184, .85) 80%, rgba(64, 110, 196, .85) 100%);--idm-background-linear-gradient-left: linear-gradient(to left, rgba(19, 23, 152, .85) 0%, rgba(44, 93, 184, .85) 80%, rgba(64, 110, 196, .85) 100%);--idm-active-background-light: linear-gradient(130deg, rgba(142, 163, 255, .93) 20%, rgb(90 67 193 / 93%) 100%);--idm-active-text-shadow-light: 0 0 7px rgb(194, 255, 247), 0 0 21px rgb(194, 255, 247), 0 0 30px rgba(182, 211, 207, .4), 0 0 12px rgba(15, 115, 223, .6), 0 0 22px rgba(15, 115, 223, .8), 0 0 38px rgba(15, 115, 223, .9), 0 0 60px rgba(15, 115, 223, 1);--idm-primary-color: rgba(42, 87, 183, 1);--idm-primary-color-light: #6c8ad9;--idm-primary-color-light2: #a7c4ff;--idm-primary-color-dark: #053a7e;--idm-primary-color-dark2: #002e6b;--idm-primary-color-9: rgba(42, 87, 183, .9);--idm-primary-color-8: rgba(42, 87, 183, .8);--idm-primary-color-7: rgba(42, 87, 183, .7);--idm-primary-color-6: rgba(42, 87, 183, .6);--idm-primary-color-5: rgba(42, 87, 183, .5);--idm-primary-color-4: rgba(42, 87, 183, .4);--idm-primary-color-3: rgba(42, 87, 183, .3);--idm-primary-color-2: rgba(42, 87, 183, .2);--idm-primary-color-1: rgba(42, 87, 183, .1)}:root[colorTheme=dark-blue]{--idm-background-opaque-linear-gradient-top: linear-gradient(to top, rgba(16, 22, 79, .85) 0%, rgba(15, 41, 89, .85) 80%, rgba(19, 47, 108, .85) 100%);--idm-background-linear-gradient-top: linear-gradient(to top, rgba(16, 22, 79, .85) 0%, rgba(15, 41, 89, .85) 80%, rgba(19, 47, 108, .85) 100%);--idm-background-linear-gradient-bottom: linear-gradient(to bottom, rgba(16, 22, 79, .85) 0%, rgba(15, 41, 89, .85) 80%, rgba(19, 47, 108, .85) 100%);--idm-background-linear-gradient-right: linear-gradient(to right, rgba(16, 22, 79, .85) 0%, rgba(15, 41, 89, .85) 80%, rgba(19, 47, 108, .85) 100%);--idm-background-linear-gradient-left: linear-gradient(to left, rgba(16, 22, 79, .85) 0%, rgba(15, 41, 89, .85) 80%, rgba(19, 47, 108, .85) 100%);--idm-active-background-light: linear-gradient(130deg, rgba(104, 104, 226, .93) 20%, rgba(22, 49, 182, .93) 100%);--idm-active-text-shadow-light: 0 0 7px rgb(194, 255, 247), 0 0 21px rgb(194, 255, 247), 0 0 30px rgba(182, 211, 207, .4), 0 0 12px rgba(15, 115, 223, .6), 0 0 22px rgba(15, 115, 223, .8), 0 0 38px rgba(15, 115, 223, .9), 0 0 60px rgba(15, 115, 223, 1);--idm-primary-color: rgba(42, 87, 183, 1);--idm-primary-color-light: #6266e0;--idm-primary-color-light2: #89b0ff;--idm-primary-color-dark: #00224e;--idm-primary-color-dark2: #021a39;--idm-primary-color-9: rgba(19, 47, 108, .9);--idm-primary-color-7: rgba(19, 47, 108, .7);--idm-primary-color-5: rgba(19, 47, 108, .5);--idm-primary-color-3: rgba(19, 47, 108, .3);--idm-primary-color-1: rgba(19, 47, 108, .1)}@font-face{font-family:iconfont;src:url(https://iconfont.idmwx.com/iconfont.woff2) format("woff2"),url(https://iconfont.idmwx.com/iconfont.woff) format("woff"),url(https://iconfont.idmwx.com/iconfont.ttf) format("truetype"),url(https://iconfont.idmwx.com/iconfont.svg?#iconfont) format("svg")}.iconfont{font-family:iconfont!important;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}*,*:before,*:after{box-sizing:border-box;margin:0}.text-ellipsis{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.flex-start{display:flex;align-items:center;justify-content:flex-start}.flex-end{display:flex;align-items:center;justify-content:flex-end}.flex-center{display:flex;align-items:center;justify-content:center}.flex-space{display:flex;align-items:center;justify-content:space-between}.flex-around{display:flex;align-items:center;justify-content:space-around}.flex-evenly{display:flex;align-items:center;justify-content:space-evenly}.flex{flex:1}.dropdown{position:relative;display:inline-block!important}.dropdown .dropdown-content{display:none;position:absolute;z-index:1}.dropdown:hover .dropdown-content{display:block}.loading{position:fixed;top:0;left:0;right:0;bottom:0;background:var(--idm-black-5);z-index:1000;display:flex;justify-content:center;align-items:center;flex-direction:column}.loading i{font-size:30px;color:var(--idm-white);margin-bottom:16px;animation:rotate 2s linear infinite}.loading div{color:var(--idm-white);font-size:16px}@keyframes blink{0%{box-shadow:0 0 20px var(--idm-warning-color-dark) inset}to{box-shadow:0 0 20px var(--idm-success-color) inset}}@keyframes rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.idm-gl-layer .fade-enter-active[data-v-4df358dd],.idm-gl-layer .fade-leave-active[data-v-4df358dd]{transition:opacity .4s}.idm-gl-layer .fade-enter[data-v-4df358dd],.idm-gl-layer .fade-leave-to[data-v-4df358dd]{opacity:0}.idm-gl-layer .menu-bar-box[data-v-4df358dd]{position:absolute;overflow-y:hidden;box-sizing:border-box;display:flex;flex-direction:column;align-items:flex-end;justify-content:flex-start;transition:all .4s ease-in-out;z-index:2}.idm-gl-layer .menu-bar-box .bar-item[data-v-4df358dd]{position:relative;margin-bottom:15px;border-radius:5px;background:var(--idm-white);cursor:pointer;box-shadow:0 2px 12px #0003}.idm-gl-layer .menu-bar-box .bar-item .menu-icon[data-v-4df358dd]{padding:8px;display:flex}.idm-gl-layer .menu-bar-box .bar-item .menu-icon[data-v-4df358dd]:first-child{border-top-left-radius:5px;border-top-right-radius:5px}.idm-gl-layer .menu-bar-box .bar-item .menu-icon[data-v-4df358dd]:last-child{border-bottom-left-radius:5px;border-bottom-right-radius:5px}.idm-gl-layer .menu-bar-box .bar-item .menu-icon span[data-v-4df358dd]{font-size:20px;font-weight:600;color:var(--idm-black-8)}.idm-gl-layer .menu-bar-box .bar-item .menu-icon.active[data-v-4df358dd]{background:var(--idm-primary-color)}.idm-gl-layer .menu-bar-box .bar-item .menu-icon.active span[data-v-4df358dd]{color:var(--idm-white)}.idm-gl-layer .layer[data-v-4df358dd]{cursor:pointer;display:inline-flex;align-items:center;padding:5px 0}.idm-gl-layer .layer.disabled[data-v-4df358dd]{cursor:not-allowed}.idm-gl-layer .layer.disabled span[data-v-4df358dd]{color:var(--idm-black-6)}.idm-gl-layer .layer.active .checkbox[data-v-4df358dd]{border:var(--idm-primary-color);background:var(--idm-primary-color)}.idm-gl-layer .layer.active .checkbox[data-v-4df358dd]:after{content:"✔";color:var(--idm-white);font-size:12px;display:flex;align-items:center;justify-content:center}.idm-gl-layer .layer.active span[data-v-4df358dd]{color:var(--idm-primary-color)}.idm-gl-layer .layer .checkbox[data-v-4df358dd]{width:16px;height:16px;margin-right:4px;border:1px solid var(--idm-black-8)}.idm-gl-layer .layer span[data-v-4df358dd]{color:var(--idm-black-8);font-size:14px;width:max-content}.idm-gl-layer .other-bars[data-v-4df358dd]{position:absolute;top:36px;border-radius:5px;background:var(--idm-background-linear-gradient-top);box-shadow:0 2px 12px #0003}.idm-gl-layer .active-layers[data-v-4df358dd]{position:absolute;max-width:250px;min-width:200px;display:flex;flex-wrap:wrap;align-items:center;background:var(--idm-white);border-radius:5px;box-shadow:0 2px 12px #0003;transition:all .4s ease-in-out}.idm-gl-layer .active-layers .layer[data-v-4df358dd]{width:auto;padding:5px}.idm-gl-layer .available-layers[data-v-4df358dd]{position:absolute;height:calc(100vh - 120px);box-sizing:border-box;transition:all .4s ease-in-out}.idm-gl-layer .available-layers .side-bar[data-v-4df358dd]{margin-right:10px;box-sizing:border-box}.idm-gl-layer .available-layers .side-bar i[data-v-4df358dd]{padding:15px 1px;background:var(--idm-white-7);border-radius:5px;cursor:pointer;font-size:18px;font-weight:600;color:var(--idm-black)}.idm-gl-layer .available-layers .list-box[data-v-4df358dd]{height:inherit;width:200px;padding:10px 0;overflow-y:auto;color:var(--idm-black-8);background:var(--idm-white);display:flex;flex-direction:column;box-shadow:0 2px 12px #0003;z-index:1}.idm-gl-layer .available-layers .list-box .layers-title[data-v-4df358dd]{font-size:16px;font-weight:600;padding:0 10px 10px;color:var(--idm-black-8);border-bottom:var(--idm-dashed-border)}.idm-gl-layer .available-layers .list-box .layers-body[data-v-4df358dd]{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-start;padding:0 10px;font-size:14px}.idm-gl-layer .available-layers .list-box .layers-body .layer[data-v-4df358dd]{width:140px}.idm-gl-layer .available-layers .list-box .model-box[data-v-4df358dd]{display:flex;align-items:center;justify-content:flex-start;margin:10px 0;cursor:pointer}.idm-gl-layer .available-layers .list-box .model-box span[data-v-4df358dd]{padding:3px 10px;border:1px solid #cecece}.idm-gl-layer .available-layers .list-box .model-box span.active[data-v-4df358dd]{color:var(--idm-white);border:1px solid var(--idm-primary-color);background:var(--idm-primary-color)}.idm-gl-layer .available-layers .list-box .model-box span[data-v-4df358dd]:first-child{border-top-left-radius:5px;border-bottom-left-radius:5px}.idm-gl-layer .available-layers .list-box .model-box span[data-v-4df358dd]:last-child{border-top-right-radius:5px;border-bottom-right-radius:5px;border-left:none}.tool-bars[data-v-fc7a24ef]{transition:all .4s ease-in-out}.tool-bars i[data-v-fc7a24ef]{cursor:pointer;font-size:30px;color:var(--idm-white-8);text-shadow:var(--idm-text-shadow)}.tool-bars i.active[data-v-fc7a24ef]{color:var(--idm-white)}.tool-bars span[data-v-fc7a24ef]{cursor:pointer;font-size:12px;color:var(--idm-black-8);margin-left:4px;background:var(--idm-white-8);padding:2px 4px;border-radius:5px;box-shadow:0 2px 12px #0003}.tool-bars span.active[data-v-fc7a24ef]{color:var(--idm-white);background:var(--idm-primary-color)}.legend-bars[data-v-bc5ff165]{transition:all .4s ease-in-out;background:linear-gradient(to right,rgb(98,113,184),rgb(98,113,184),rgb(98,113,184),rgb(98,113,184),rgb(61,110,163),rgb(74,148,170),rgb(74,146,148),rgb(77,142,124),rgb(76,164,76),rgb(103,164,54),rgb(162,135,64),rgb(162,109,92),rgb(141,63,92),rgb(151,75,145),rgb(95,100,160),rgb(91,136,161),rgb(91,136,161));padding:2px 0;border-radius:10px;box-shadow:var(--idm-gl-box-shadow)}.legend-bars span[data-v-bc5ff165]{font-size:12px;text-align:center;color:var(--idm-white-8);width:32px}.tool-bars[data-v-ce5e09b8]{transition:all .4s ease-in-out}.tool-bars i[data-v-ce5e09b8]{cursor:pointer;font-size:30px;color:var(--idm-white-8);text-shadow:var(--idm-text-shadow)}.tool-bars i.active[data-v-ce5e09b8]{color:var(--idm-white)}.tool-bars span[data-v-ce5e09b8]{cursor:pointer;font-size:12px;color:var(--idm-black-8);margin-left:4px;background:var(--idm-white-8);padding:2px 4px;border-radius:5px;box-shadow:0 2px 12px #0003}.tool-bars span.active[data-v-ce5e09b8]{color:var(--idm-white);background:var(--idm-primary-color)}.legend-bars[data-v-5f45c14c]{transition:all .4s ease-in-out;background:linear-gradient(to right,rgb(84,170,230),rgb(84,170,230),rgb(84,170,230),rgb(84,170,230),rgb(64,127,115),rgb(58,164,58),rgb(191,182,67),rgb(197,154,68),rgb(160,70,94),rgb(138,84,166),rgb(82,113,165),rgb(84,142,152),rgb(150,181,184),rgb(195,194,194),rgb(195,194,194));padding:2px 0;border-radius:10px;box-shadow:var(--idm-gl-box-shadow)}.legend-bars span[data-v-5f45c14c]{font-size:12px;text-align:center;color:var(--idm-white);width:36px}.active-tropical[data-v-bb8414b4]{bottom:unset;background:var(--idm-white-9);padding:10px;border-radius:5px;z-index:5}.active-tropical .header-box[data-v-bb8414b4]{min-width:360px;margin-bottom:10px;box-sizing:border-box;color:var(--idm-black-8)}.active-tropical .header-box .close-btn[data-v-bb8414b4]{position:relative;height:0px;text-align:right;font-size:22px;color:var(--idm-primary-color)}.active-tropical .header-box .main[data-v-bb8414b4]{font-size:16px}.active-tropical .header-box .sub[data-v-bb8414b4]{margin:3px 0;font-size:12px;color:var(--idm-info-color)}.active-tropical .main-box[data-v-bb8414b4]{min-width:360px;color:var(--idm-black-8);overflow-y:auto;box-sizing:border-box;font-size:12px;z-index:4}.active-tropical .main-box .content[data-v-bb8414b4]{padding:5px 0;border-radius:5px;background:var(--idm-gray-light)}.active-tropical .main-box .row[data-v-bb8414b4]{width:100%;padding:4px 10px;box-sizing:border-box;display:flex;align-items:center;justify-content:space-between}.active-tropical .main-box .row .col[data-v-bb8414b4]{display:flex;align-items:center;justify-content:space-between}.active-tropical .main-box .row .col label[data-v-bb8414b4]{width:82px;margin-right:4px;color:var(--idm-info-color)}.active-tropical .main-box .row .col.col-24[data-v-bb8414b4]{width:100%}.active-tropical .main-box .row .col.col-left[data-v-bb8414b4]{width:55%}.active-tropical .main-box .row .col.col-right[data-v-bb8414b4]{width:40%}.forecast-models[data-v-bb8414b4]{display:flex;justify-content:flex-end;flex:1;margin-left:5px;flex-wrap:wrap}.forecast-models .model[data-v-bb8414b4]{font-size:12px;padding:0 6px 4px;display:flex;border:1px solid var(--idm-primary-color)}.forecast-models .model span[data-v-bb8414b4]{border-bottom:2px dashed var(--idm-white)}.forecast-models .model span.cma[data-v-bb8414b4]{border-color:#e2ea03cc}.forecast-models .model span.jma[data-v-bb8414b4]{border-color:#01d2b7cc}.forecast-models .model span.ecmwf[data-v-bb8414b4]{border-color:#f582f2cc}.forecast-models .model span.ukm[data-v-bb8414b4]{border-color:#4783f5cc}.forecast-models .model span.noaa-at[data-v-bb8414b4],.forecast-models .model span.noaa-ep[data-v-bb8414b4]{border-color:#9758fbcc}.forecast-models .model.active[data-v-bb8414b4]{border:1px solid var(--idm-primary-color);background-color:var(--idm-primary-color);color:var(--idm-white)}.forecast-models .model[data-v-bb8414b4]:first-child{border-top-left-radius:6px;border-bottom-left-radius:6px}.forecast-models .model.center-child[data-v-bb8414b4]{border-left:1px solid var(--idm-primary-color);border-right:1px solid var(--idm-primary-color)}.forecast-models .model[data-v-bb8414b4]:last-child{border-top-right-radius:6px;border-bottom-right-radius:6px}.legend[data-v-bb8414b4]{display:flex;align-items:center;color:var(--idm-info-color)}.legend .icon[data-v-bb8414b4]{height:14px;width:14px;border-radius:50%;border:3px solid #fff;margin-right:3px}.legend .icon.td[data-v-bb8414b4]{background-color:var(--idm-tropicals-td)}.legend .icon.ts[data-v-bb8414b4]{background-color:var(--idm-tropicals-ts)}.legend .icon.sts[data-v-bb8414b4]{background-color:var(--idm-tropicals-sts)}.legend .icon.ty[data-v-bb8414b4]{background-color:var(--idm-tropicals-ty)}.legend .icon.sty[data-v-bb8414b4]{background-color:var(--idm-tropicals-sty)}.legend .icon.supper-ty[data-v-bb8414b4]{background-color:var(--idm-tropicals-super-ty)}.legend .icon.r7[data-v-bb8414b4]{border:1.5px solid var(--idm-tropicals-r7)}.legend .icon.r10[data-v-bb8414b4]{border:1.5px solid var(--idm-tropicals-r10)}.legend .icon.history[data-v-bb8414b4]{border:none;border-radius:0;height:4px;background:var(--idm-black-5)}.legend .button[data-v-bb8414b4]{cursor:pointer;padding:0 4px;border-radius:4px;border:1px solid var(--idm-primary-color);color:var(--idm-primary-color)}.more[data-v-bb8414b4]{display:flex;align-items:center;justify-content:flex-end;color:var(--idm-primary-color);font-weight:700;margin-top:5px}.legend-bars[data-v-42b977ed]{transition:all .4s ease-in-out;background:linear-gradient(to right,rgba(59,126,162,0),rgb(172,210,255),rgb(172,210,255),rgb(3,248,103),rgb(14,201,3),rgb(190,226,2),rgb(248,1,1),rgb(197,5,58),rgb(197,5,58));padding:2px 0;border-radius:10px;box-shadow:var(--idm-gl-box-shadow)}.legend-bars span[data-v-42b977ed]{font-size:12px;text-align:center;color:var(--idm-white);width:35px}.legend-bars[data-v-2a5fbadd]{transition:all .4s ease-in-out;background:linear-gradient(to right,rgb(189,50,160),rgb(189,50,160),rgb(189,50,160),rgb(189,50,160),rgb(208,56,56),rgb(208,56,56),rgb(190,226,2),rgb(190,226,2),rgb(4,210,64),rgb(4,210,64),rgb(172,210,255),rgb(172,210,255));padding:2px 0;border-radius:10px;box-shadow:var(--idm-gl-box-shadow)}.legend-bars span[data-v-2a5fbadd]{font-size:12px;text-align:center;color:var(--idm-white);width:40px}.legend-bars[data-v-5b28deaf]{transition:all .4s ease-in-out;background:linear-gradient(to right,rgb(95,143,197),rgb(95,143,197),rgb(95,143,197),rgb(95,143,197),rgb(80,140,62),rgb(121,146,28),rgb(171,161,14),rgb(223,177,6),rgb(243,150,6),rgb(236,95,21),rgb(190,65,18),rgb(138,43,10),rgb(138,43,10));padding:2px 0;border-radius:10px;box-shadow:var(--idm-gl-box-shadow)}.legend-bars span[data-v-5b28deaf]{font-size:12px;text-align:center;color:var(--idm-white);width:32px}.legend-bars[data-v-72cd9cf1]{transition:all .4s ease-in-out;background:linear-gradient(to right,rgb(149,137,211),rgb(149,137,211),rgb(149,137,211),rgb(149,137,211),rgb(150,209,216),rgb(129,204,197),rgb(103,180,186),rgb(95,143,197),rgb(80,140,62),rgb(121,146,28),rgb(171,161,14),rgb(223,177,6),rgb(243,150,6),rgb(236,95,21),rgb(190,65,18),rgb(138,43,10),rgb(138,43,10));padding:2px 0;border-radius:10px;box-shadow:var(--idm-gl-box-shadow)}.legend-bars span[data-v-72cd9cf1]{font-size:12px;text-align:center;color:var(--idm-white);width:32px}.legend-bars[data-v-2092df03]{transition:all .4s ease-in-out;background:linear-gradient(to right,rgb(76,165,228),rgb(76,165,228),rgb(76,165,228),rgb(76,165,228),rgb(103,180,186),rgb(129,204,197),rgb(150,209,216),rgb(180,209,216));padding:2px 0;border-radius:10px;box-shadow:var(--idm-gl-box-shadow)}.legend-bars span[data-v-2092df03]{font-size:12px;text-align:center;color:var(--idm-white);width:40px}.point-meteo[data-v-a7923724]{bottom:unset}.point-meteo .meteo-box[data-v-a7923724]{position:absolute;color:var(--idm-black-8);top:0;left:5px;padding:10px;background-color:var(--idm-white-9);-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);width:260px;border-top-right-radius:5px;border-bottom-right-radius:5px;z-index:2}.point-meteo .meteo-box .header-box[data-v-a7923724]{margin-bottom:10px;box-sizing:border-box;color:var(--idm-black-8)}.point-meteo .meteo-box .header-box .close[data-v-a7923724]{position:relative;height:0px;text-align:right;font-size:22px;color:var(--idm-primary-color)}.point-meteo .meteo-box .header-box .main[data-v-a7923724]{font-size:16px}.point-meteo .meteo-box .header-box .sub[data-v-a7923724]{margin:3px 0;font-size:12px;color:var(--idm-info-color)}.point-meteo .meteo-box .main-box[data-v-a7923724]{padding:0 5px;border-radius:5px;background:var(--idm-gray-light)}.point-meteo .meteo-box .main-box .flex-space[data-v-a7923724]{padding:3px 0;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--idm-white);box-sizing:border-box}.point-meteo .meteo-box .main-box .flex-space label[data-v-a7923724]{color:var(--idm-black-8)}.point-meteo .meteo-box .main-box .flex-space label[data-v-a7923724]:after{content:":"}.point-meteo .meteo-box .main-box .flex-space[data-v-a7923724]:last-child{border-bottom:none}.point-meteo .meteo-box .more[data-v-a7923724]{margin-top:5px;color:var(--idm-primary-color);font-weight:700;cursor:pointer}.point-meteo[data-v-a7923724]:after{display:block;width:8px;height:8px;border-radius:50%;content:"";background-color:var(--idm-white-9);margin-bottom:360px}.point-meteo[data-v-a7923724]:before{display:block;content:"";width:2px;height:360px;margin-left:3px;border-left:2px solid var(--idm-white-9)}#zone-info[data-v-d1cb4e6e]{position:absolute;background:var(--idm-white);color:var(--idm-black-8);z-index:10}#zone-info .rich-context[data-v-d1cb4e6e]{width:100vw;height:100vh;padding:10px;font-size:14px;font-weight:400;color:var(--idm-black-8)!important;overflow-y:auto}#zone-info .close[data-v-d1cb4e6e]{position:relative;color:var(--idm-info-color-light2);font-size:24px;height:0;text-align:right;margin:5px 5px 0 0}#port-info[data-v-6fdfee96]{position:absolute;background:var(--idm-white);color:var(--idm-black-8);padding:10px;border-radius:6px;cursor:default;z-index:1000;height:fit-content}#port-info .port-box[data-v-6fdfee96]{margin-top:10px;max-width:240px}#port-info .port-box .flex-start[data-v-6fdfee96]{line-height:2}#port-info .port-box .flex-start label[data-v-6fdfee96]{color:var(--idm-info-color);margin-right:10px;width:50px}#port-info .port-box .flex-start span[data-v-6fdfee96]{flex:1;flex-wrap:wrap;text-align:justify-all;color:var(--idm-black-8)}#port-info .port-box .flex-start span.link[data-v-6fdfee96]{cursor:pointer;text-decoration:underline}#port-info .port-box .flex-start span.link[data-v-6fdfee96]:hover{font-weight:600}#port-info .close[data-v-6fdfee96]{position:relative;text-align:right;height:0px;color:var(--idm-info-color-light2);font-size:24px}.lat-lng-tip[data-v-9f51b3f9]{position:absolute;padding:2px 10px;border-radius:5px;color:var(--idm-primary-color);font-size:12px;top:unset;background:var(--idm-white);box-shadow:0 2px 12px #0003;transition:all .4s ease-in-out}.menu-bar-box[data-v-2d85e33b]{display:flex;flex-direction:column;align-items:flex-end;justify-content:flex-start;transition:all .4s ease-in-out}.menu-bar-box .bar-item[data-v-2d85e33b]{position:relative;margin-bottom:15px;border-radius:5px;background:var(--idm-white);cursor:pointer;box-shadow:0 2px 12px #0003}.menu-bar-box .bar-item .menu-icon[data-v-2d85e33b]{padding:8px;display:flex}.menu-bar-box .bar-item .menu-icon[data-v-2d85e33b]:first-child{border-top-left-radius:5px;border-top-right-radius:5px}.menu-bar-box .bar-item .menu-icon[data-v-2d85e33b]:last-child{border-bottom-left-radius:5px;border-bottom-right-radius:5px}.menu-bar-box .bar-item .menu-icon span[data-v-2d85e33b]{font-size:18px;font-weight:500;color:var(--idm-black-8)}.menu-bar-box .bar-item .menu-icon.active[data-v-2d85e33b]{background:var(--idm-primary-color)}.menu-bar-box .bar-item .menu-icon.active span[data-v-2d85e33b]{color:var(--idm-white)}:root{--idm-tropicals-td: #03f869;--idm-tropicals-ts: #f2f202;--idm-tropicals-sts: #ff9100;--idm-tropicals-ty: #f44336;--idm-tropicals-sty: #c604a4;--idm-tropicals-super-ty: #6b05bb;--idm-tropicals-r7: #ff9100;--idm-tropicals-r10: #f44336;--idm-gl-box-shadow-color: rgba(0, 0, 0, .5);--idm-gl-box-shadow: 0px 12px 32px 4px rgba(0, 0, 0, .04), 0px 8px 20px rgba(0, 0, 0, .08);--idm-gl-box-shadow-light: 0px 0px 12px rgba(0, 0, 0, .12);--idm-gl-box-shadow-lighter: 0px 0px 6px rgba(0, 0, 0, .12);--idm-gl-box-shadow-dark: 0px 16px 48px 16px rgba(0, 0, 0, .08), 0px 12px 32px rgba(0, 0, 0, .12), 0px 8px 16px -8px rgba(0, 0, 0, .16)}.point-marker{pointer-events:none!important}.point-marker .marker-circle{pointer-events:inherit;width:12px;height:12px;border-radius:50%;border:2px solid var(--idm-white);background:var(--idm-danger-color)}.point-marker .marker-circle:hover{cursor:pointer}.point-marker.closed{pointer-events:auto!important}.point-summary-marker,.point-contextmenu-marker{color:var(--idm-white);font-size:12px;background:var(--idm-danger-color);border:1px solid var(--idm-white);padding:2px 5px;border-radius:5px;cursor:pointer}.point-summary-marker .marker-close,.point-contextmenu-marker .marker-close{pointer-events:auto;position:absolute;background:var(--idm-danger-color);border:1px dashed var(--idm-white);display:flex;align-items:center;justify-content:center;width:20px;height:20px;right:-17px;top:-17px;cursor:pointer;font-size:20px}.tip-marker{color:var(--idm-white);font-size:12px;text-shadow:var(--idm-text-shadow);background-color:var(--idm-black-6);padding:2px 5px;border-radius:5px;cursor:pointer}.tip-marker .marker-label{border-bottom:var(--idm-dashed-border)}.tip-marker .marker-label:last-child{border-bottom:none}.tip-marker .marker-label b{font-weight:600;color:var(--idm-danger-color)}.hurricane-hourly-marker .iconfont{font-size:34px!important;color:var(--idm-danger-color)}.hurricane-hourly-marker svg{height:34px;width:34px}.hurricane-hourly-marker .center{box-sizing:border-box;display:flex;align-items:center;justify-content:center}.hurricane-hourly-marker .center.north{animation:anticlockwise 2s linear infinite}.hurricane-hourly-marker .center.south{animation:clockwise 2s linear infinite}@keyframes clockwise{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes anticlockwise{0%{transform:rotate(0)}to{transform:rotate(-360deg)}}
1
+ @charset "UTF-8";:root{--idm-white: rgba(255, 255, 255, 1);--idm-white-9: rgba(255, 255, 255, .9);--idm-white-8: rgba(255, 255, 255, .8);--idm-white-7: rgba(255, 255, 255, .7);--idm-white-6: rgba(255, 255, 255, .6);--idm-white-5: rgba(255, 255, 255, .5);--idm-white-4: rgba(255, 255, 255, .4);--idm-white-3: rgba(255, 255, 255, .3);--idm-white-2: rgba(255, 255, 255, .2);--idm-white-1: rgba(255, 255, 255, .1);--idm-black: rgba(0, 0, 0, 1);--idm-black-9: rgba(0, 0, 0, .9);--idm-black-8: rgba(0, 0, 0, .8);--idm-black-7: rgba(0, 0, 0, .7);--idm-black-6: rgba(0, 0, 0, .6);--idm-black-5: rgba(0, 0, 0, .5);--idm-black-4: rgba(0, 0, 0, .4);--idm-black-3: rgba(0, 0, 0, .3);--idm-black-2: rgba(0, 0, 0, .2);--idm-black-1: rgba(0, 0, 0, .1);--idm-gray-light: rgba(239, 239, 239, 1);--idm-primary-color: rgba(42, 87, 183, 1);--idm-primary-color-light: #6c8ad9;--idm-primary-color-light2: #a7c4ff;--idm-primary-color-dark: #053a7e;--idm-primary-color-dark2: #002e6b;--idm-primary-color-9: rgba(42, 87, 183, .9);--idm-primary-color-8: rgba(42, 87, 183, .8);--idm-primary-color-7: rgba(42, 87, 183, .7);--idm-primary-color-6: rgba(42, 87, 183, .6);--idm-primary-color-5: rgba(42, 87, 183, .5);--idm-primary-color-4: rgba(42, 87, 183, .4);--idm-primary-color-3: rgba(42, 87, 183, .3);--idm-primary-color-2: rgba(42, 87, 183, .2);--idm-primary-color-1: rgba(42, 87, 183, .1);--idm-success-color: #0ddd9f;--idm-success-color-light: #92f7d9;--idm-success-color-dark: #06a074;--idm-success-color-dark2: #06694c;--idm-warning-color: #ff9500;--idm-warning-color-light: #ffcc00;--idm-warning-color-dark: #c77402;--idm-danger-color: #f44336;--idm-danger-color-light: #fb796e;--idm-danger-color-dark: #ad251b;--idm-info-color: #6e6e6e;--idm-info-color-light: #969696;--idm-info-color-light2: #c0c0c0;--idm-info-color-light3: #e2e2e2;--idm-info-color-dark: #494949;--idm-dangerous: #f44336;--idm-severe: #ff9500;--idm-heavy: #ffff00;--idm-vessel-cargo-color: lightgreen;--idm-vessel-tanker-color: red;--idm-vessel-passenger-color: blue;--idm-vessel-other-color: lightgrey;--idm-perf-cii-a: var(--idm-success-color);--idm-perf-cii-b: var(--idm-success-color-light);--idm-perf-cii-c: var(--idm-warning-color);--idm-perf-cii-d: var(--idm-danger-color-light);--idm-perf-cii-e: var(--idm-danger-color);--idm-text-shadow: 0px 0px 4px rgba(0, 0, 0, 1);--idm-dashed-border: 1px dashed var(--idm-white-5);--idm-solid-border: 1px solid var(--idm-white-4);--idm-background-color: var(--idm-primary-color-9);--idm-background-color-dark: var(--idm-primary-color-dark);--idm-background-color-light: var(--idm-primary-color-light);--idm-background-color-light2: #f3f5f8;--idm-active-background-light: linear-gradient(130deg, rgba(142, 163, 255, .93) 20%, rgb(90 67 193 / 93%) 100%);--idm-active-text-shadow-light: 0 0 7px rgb(194, 255, 247), 0 0 21px rgb(194, 255, 247), 0 0 30px rgba(182, 211, 207, .4), 0 0 12px rgba(15, 115, 223, .6), 0 0 22px rgba(15, 115, 223, .8), 0 0 38px rgba(15, 115, 223, .9), 0 0 60px rgba(15, 115, 223, 1);--idm-background-opaque-linear-gradient-top: linear-gradient(to top, rgba(41, 32, 165) 0%, rgba(44, 93, 184) 80%, rgba(32, 90, 165) 100%);--idm-background-linear-gradient-top: linear-gradient(to top, rgba(19, 23, 152, .85) 0%, rgba(44, 93, 184, .85) 80%, rgba(64, 110, 196, .85) 100%);--idm-background-linear-gradient-bottom: linear-gradient(to bottom, rgba(19, 23, 152, .85) 0%, rgba(44, 93, 184, .85) 80%, rgba(64, 110, 196, .85) 100%);--idm-background-linear-gradient-right: linear-gradient(to right, rgba(19, 23, 152, .85) 0%, rgba(44, 93, 184, .85) 80%, rgba(64, 110, 196, .85) 100%);--idm-background-linear-gradient-left: linear-gradient(to left, rgba(19, 23, 152, .85) 0%, rgba(44, 93, 184, .85) 80%, rgba(64, 110, 196, .85) 100%);--idm-blink-animation: blink .8s ease-out infinite alternate}:root[colorTheme=black]{--idm-background-opaque-linear-gradient-top: linear-gradient(to top, rgba(0, 0, 0, .8) 0%, rgba(0, 0, 0, .8) 80%, rgb(0, 0, 0, .8) 100%);--idm-background-linear-gradient-top: linear-gradient(to top, rgba(0, 0, 0, .6) 0%, rgba(0, 0, 0, .7) 70%, rgb(0, 0, 0, .7) 100%);--idm-background-linear-gradient-bottom: linear-gradient(to top, rgba(0, 0, 0, .6) 0%, rgba(0, 0, 0, .7) 70%, rgb(0, 0, 0, .7) 100%);--idm-background-linear-gradient-right: linear-gradient(to top, rgba(0, 0, 0, .6) 0%, rgba(0, 0, 0, .7) 70%, rgb(0, 0, 0, .7) 100%);--idm-background-linear-gradient-left: linear-gradient(to top, rgba(0, 0, 0, .6) 0%, rgba(0, 0, 0, .7) 70%, rgb(0, 0, 0, .7) 100%);--idm-active-background-light: linear-gradient(130deg, rgba(117, 117, 117, .93) 30%, rgba(200, 200, 200, .93) 100%);--idm-active-text-shadow-light: 0 0 7px rgb(253, 253, 253), 0 0 21px rgb(226, 226, 226), 0 0 30px rgba(185, 185, 185, .4), 0 0 12px rgba(67, 67, 67, .6), 0 0 22px rgba(27, 27, 27, .8), 0 0 38px rgba(15, 115, 223, .9), 0 0 60px rgba(15, 115, 223, 1);--idm-primary-color: rgba(0, 0, 0, .7);--idm-primary-color-light: #757575;--idm-primary-color-light2: #a5a5a5;--idm-primary-color-dark: rgba(0, 0, 0, .8);--idm-primary-color-dark2: rgba(0, 0, 0, 1);--idm-primary-color-9: rgba(0, 0, 0, .9);--idm-primary-color-7: rgba(0, 0, 0, .7);--idm-primary-color-5: rgba(0, 0, 0, .5);--idm-primary-color-3: rgba(0, 0, 0, .3);--idm-primary-color-1: rgba(0, 0, 0, .1)}:root[colorTheme=blue]{--idm-background-opaque-linear-gradient-top: linear-gradient(to top, rgba(41, 32, 165) 0%, rgba(44, 93, 184) 80%, rgba(32, 90, 165) 100%);--idm-background-linear-gradient-top: linear-gradient(to top, rgba(19, 23, 152, .85) 0%, rgba(44, 93, 184, .85) 80%, rgba(64, 110, 196, .85) 100%);--idm-background-linear-gradient-bottom: linear-gradient(to bottom, rgba(19, 23, 152, .85) 0%, rgba(44, 93, 184, .85) 80%, rgba(64, 110, 196, .85) 100%);--idm-background-linear-gradient-right: linear-gradient(to right, rgba(19, 23, 152, .85) 0%, rgba(44, 93, 184, .85) 80%, rgba(64, 110, 196, .85) 100%);--idm-background-linear-gradient-left: linear-gradient(to left, rgba(19, 23, 152, .85) 0%, rgba(44, 93, 184, .85) 80%, rgba(64, 110, 196, .85) 100%);--idm-active-background-light: linear-gradient(130deg, rgba(142, 163, 255, .93) 20%, rgb(90 67 193 / 93%) 100%);--idm-active-text-shadow-light: 0 0 7px rgb(194, 255, 247), 0 0 21px rgb(194, 255, 247), 0 0 30px rgba(182, 211, 207, .4), 0 0 12px rgba(15, 115, 223, .6), 0 0 22px rgba(15, 115, 223, .8), 0 0 38px rgba(15, 115, 223, .9), 0 0 60px rgba(15, 115, 223, 1);--idm-primary-color: rgba(42, 87, 183, 1);--idm-primary-color-light: #6c8ad9;--idm-primary-color-light2: #a7c4ff;--idm-primary-color-dark: #053a7e;--idm-primary-color-dark2: #002e6b;--idm-primary-color-9: rgba(42, 87, 183, .9);--idm-primary-color-8: rgba(42, 87, 183, .8);--idm-primary-color-7: rgba(42, 87, 183, .7);--idm-primary-color-6: rgba(42, 87, 183, .6);--idm-primary-color-5: rgba(42, 87, 183, .5);--idm-primary-color-4: rgba(42, 87, 183, .4);--idm-primary-color-3: rgba(42, 87, 183, .3);--idm-primary-color-2: rgba(42, 87, 183, .2);--idm-primary-color-1: rgba(42, 87, 183, .1)}:root[colorTheme=dark-blue]{--idm-background-opaque-linear-gradient-top: linear-gradient(to top, rgba(16, 22, 79, .85) 0%, rgba(15, 41, 89, .85) 80%, rgba(19, 47, 108, .85) 100%);--idm-background-linear-gradient-top: linear-gradient(to top, rgba(16, 22, 79, .85) 0%, rgba(15, 41, 89, .85) 80%, rgba(19, 47, 108, .85) 100%);--idm-background-linear-gradient-bottom: linear-gradient(to bottom, rgba(16, 22, 79, .85) 0%, rgba(15, 41, 89, .85) 80%, rgba(19, 47, 108, .85) 100%);--idm-background-linear-gradient-right: linear-gradient(to right, rgba(16, 22, 79, .85) 0%, rgba(15, 41, 89, .85) 80%, rgba(19, 47, 108, .85) 100%);--idm-background-linear-gradient-left: linear-gradient(to left, rgba(16, 22, 79, .85) 0%, rgba(15, 41, 89, .85) 80%, rgba(19, 47, 108, .85) 100%);--idm-active-background-light: linear-gradient(130deg, rgba(104, 104, 226, .93) 20%, rgba(22, 49, 182, .93) 100%);--idm-active-text-shadow-light: 0 0 7px rgb(194, 255, 247), 0 0 21px rgb(194, 255, 247), 0 0 30px rgba(182, 211, 207, .4), 0 0 12px rgba(15, 115, 223, .6), 0 0 22px rgba(15, 115, 223, .8), 0 0 38px rgba(15, 115, 223, .9), 0 0 60px rgba(15, 115, 223, 1);--idm-primary-color: rgba(42, 87, 183, 1);--idm-primary-color-light: #6266e0;--idm-primary-color-light2: #89b0ff;--idm-primary-color-dark: #00224e;--idm-primary-color-dark2: #021a39;--idm-primary-color-9: rgba(19, 47, 108, .9);--idm-primary-color-7: rgba(19, 47, 108, .7);--idm-primary-color-5: rgba(19, 47, 108, .5);--idm-primary-color-3: rgba(19, 47, 108, .3);--idm-primary-color-1: rgba(19, 47, 108, .1)}@font-face{font-family:iconfont;src:url(https://iconfont.idmwx.com/iconfont.woff2) format("woff2"),url(https://iconfont.idmwx.com/iconfont.woff) format("woff"),url(https://iconfont.idmwx.com/iconfont.ttf) format("truetype"),url(https://iconfont.idmwx.com/iconfont.svg?#iconfont) format("svg")}.iconfont{font-family:iconfont!important;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}*,*:before,*:after{box-sizing:border-box;margin:0}.text-ellipsis{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.flex-start{display:flex;align-items:center;justify-content:flex-start}.flex-end{display:flex;align-items:center;justify-content:flex-end}.flex-center{display:flex;align-items:center;justify-content:center}.flex-space{display:flex;align-items:center;justify-content:space-between}.flex-around{display:flex;align-items:center;justify-content:space-around}.flex-evenly{display:flex;align-items:center;justify-content:space-evenly}.flex{flex:1}.dropdown{position:relative;display:inline-block!important}.dropdown .dropdown-content{display:none;position:absolute;z-index:1}.dropdown:hover .dropdown-content{display:block}.loading{position:fixed;top:0;left:0;right:0;bottom:0;background:var(--idm-black-5);z-index:1000;display:flex;justify-content:center;align-items:center;flex-direction:column}.loading i{font-size:30px;color:var(--idm-white);margin-bottom:16px;animation:rotate 2s linear infinite}.loading div{color:var(--idm-white);font-size:16px}@keyframes blink{0%{box-shadow:0 0 20px var(--idm-warning-color-dark) inset}to{box-shadow:0 0 20px var(--idm-success-color) inset}}@keyframes rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.idm-gl-layer .fade-enter-active[data-v-4df358dd],.idm-gl-layer .fade-leave-active[data-v-4df358dd]{transition:opacity .4s}.idm-gl-layer .fade-enter[data-v-4df358dd],.idm-gl-layer .fade-leave-to[data-v-4df358dd]{opacity:0}.idm-gl-layer .menu-bar-box[data-v-4df358dd]{position:absolute;overflow-y:hidden;box-sizing:border-box;display:flex;flex-direction:column;align-items:flex-end;justify-content:flex-start;transition:all .4s ease-in-out;z-index:2}.idm-gl-layer .menu-bar-box .bar-item[data-v-4df358dd]{position:relative;margin-bottom:15px;border-radius:5px;background:var(--idm-white);cursor:pointer;box-shadow:0 2px 12px #0003}.idm-gl-layer .menu-bar-box .bar-item .menu-icon[data-v-4df358dd]{padding:8px;display:flex}.idm-gl-layer .menu-bar-box .bar-item .menu-icon[data-v-4df358dd]:first-child{border-top-left-radius:5px;border-top-right-radius:5px}.idm-gl-layer .menu-bar-box .bar-item .menu-icon[data-v-4df358dd]:last-child{border-bottom-left-radius:5px;border-bottom-right-radius:5px}.idm-gl-layer .menu-bar-box .bar-item .menu-icon span[data-v-4df358dd]{font-size:20px;font-weight:600;color:var(--idm-black-8)}.idm-gl-layer .menu-bar-box .bar-item .menu-icon.active[data-v-4df358dd]{background:var(--idm-primary-color)}.idm-gl-layer .menu-bar-box .bar-item .menu-icon.active span[data-v-4df358dd]{color:var(--idm-white)}.idm-gl-layer .layer[data-v-4df358dd]{cursor:pointer;display:inline-flex;align-items:center;padding:5px 0}.idm-gl-layer .layer.disabled[data-v-4df358dd]{cursor:not-allowed}.idm-gl-layer .layer.disabled span[data-v-4df358dd]{color:var(--idm-black-6)}.idm-gl-layer .layer.active .checkbox[data-v-4df358dd]{border:var(--idm-primary-color);background:var(--idm-primary-color)}.idm-gl-layer .layer.active .checkbox[data-v-4df358dd]:after{content:"✔";color:var(--idm-white);font-size:12px;display:flex;align-items:center;justify-content:center}.idm-gl-layer .layer.active span[data-v-4df358dd]{color:var(--idm-primary-color)}.idm-gl-layer .layer .checkbox[data-v-4df358dd]{width:16px;height:16px;margin-right:4px;border:1px solid var(--idm-black-8)}.idm-gl-layer .layer span[data-v-4df358dd]{color:var(--idm-black-8);font-size:14px;width:max-content}.idm-gl-layer .other-bars[data-v-4df358dd]{position:absolute;top:36px;border-radius:5px;background:var(--idm-background-linear-gradient-top);box-shadow:0 2px 12px #0003}.idm-gl-layer .active-layers[data-v-4df358dd]{position:absolute;max-width:250px;min-width:200px;display:flex;flex-wrap:wrap;align-items:center;background:var(--idm-white);border-radius:5px;box-shadow:0 2px 12px #0003;transition:all .4s ease-in-out}.idm-gl-layer .active-layers .layer[data-v-4df358dd]{width:auto;padding:5px}.idm-gl-layer .available-layers[data-v-4df358dd]{position:absolute;height:calc(100vh - 120px);box-sizing:border-box;transition:all .4s ease-in-out}.idm-gl-layer .available-layers .side-bar[data-v-4df358dd]{margin-right:10px;box-sizing:border-box}.idm-gl-layer .available-layers .side-bar i[data-v-4df358dd]{padding:15px 1px;background:var(--idm-white-7);border-radius:5px;cursor:pointer;font-size:18px;font-weight:600;color:var(--idm-black)}.idm-gl-layer .available-layers .list-box[data-v-4df358dd]{height:inherit;width:200px;padding:10px 0;overflow-y:auto;color:var(--idm-black-8);background:var(--idm-white);display:flex;flex-direction:column;box-shadow:0 2px 12px #0003;z-index:1}.idm-gl-layer .available-layers .list-box .layers-title[data-v-4df358dd]{font-size:16px;font-weight:600;padding:0 10px 10px;color:var(--idm-black-8);border-bottom:var(--idm-dashed-border)}.idm-gl-layer .available-layers .list-box .layers-body[data-v-4df358dd]{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-start;padding:0 10px;font-size:14px}.idm-gl-layer .available-layers .list-box .layers-body .layer[data-v-4df358dd]{width:140px}.idm-gl-layer .available-layers .list-box .model-box[data-v-4df358dd]{display:flex;align-items:center;justify-content:flex-start;margin:10px 0;cursor:pointer}.idm-gl-layer .available-layers .list-box .model-box span[data-v-4df358dd]{padding:3px 10px;border:1px solid #cecece}.idm-gl-layer .available-layers .list-box .model-box span.active[data-v-4df358dd]{color:var(--idm-white);border:1px solid var(--idm-primary-color);background:var(--idm-primary-color)}.idm-gl-layer .available-layers .list-box .model-box span[data-v-4df358dd]:first-child{border-top-left-radius:5px;border-bottom-left-radius:5px}.idm-gl-layer .available-layers .list-box .model-box span[data-v-4df358dd]:last-child{border-top-right-radius:5px;border-bottom-right-radius:5px;border-left:none}.tool-bars[data-v-f285f28f]{transition:all .4s ease-in-out}.tool-bars i[data-v-f285f28f]{cursor:pointer;font-size:30px;color:var(--idm-white-8);text-shadow:var(--idm-text-shadow)}.tool-bars i.active[data-v-f285f28f]{color:var(--idm-white)}.tool-bars span[data-v-f285f28f]{cursor:pointer;font-size:12px;color:var(--idm-black-8);margin-left:4px;background:var(--idm-white-8);padding:2px 4px;border-radius:5px;box-shadow:0 2px 12px #0003}.tool-bars span.active[data-v-f285f28f]{color:var(--idm-white);background:var(--idm-primary-color)}.legend-bars[data-v-bc5ff165]{transition:all .4s ease-in-out;background:linear-gradient(to right,rgb(98,113,184),rgb(98,113,184),rgb(98,113,184),rgb(98,113,184),rgb(61,110,163),rgb(74,148,170),rgb(74,146,148),rgb(77,142,124),rgb(76,164,76),rgb(103,164,54),rgb(162,135,64),rgb(162,109,92),rgb(141,63,92),rgb(151,75,145),rgb(95,100,160),rgb(91,136,161),rgb(91,136,161));padding:2px 0;border-radius:10px;box-shadow:var(--idm-gl-box-shadow)}.legend-bars span[data-v-bc5ff165]{font-size:12px;text-align:center;color:var(--idm-white-8);width:32px}.tool-bars[data-v-ce5e09b8]{transition:all .4s ease-in-out}.tool-bars i[data-v-ce5e09b8]{cursor:pointer;font-size:30px;color:var(--idm-white-8);text-shadow:var(--idm-text-shadow)}.tool-bars i.active[data-v-ce5e09b8]{color:var(--idm-white)}.tool-bars span[data-v-ce5e09b8]{cursor:pointer;font-size:12px;color:var(--idm-black-8);margin-left:4px;background:var(--idm-white-8);padding:2px 4px;border-radius:5px;box-shadow:0 2px 12px #0003}.tool-bars span.active[data-v-ce5e09b8]{color:var(--idm-white);background:var(--idm-primary-color)}.legend-bars[data-v-5f45c14c]{transition:all .4s ease-in-out;background:linear-gradient(to right,rgb(84,170,230),rgb(84,170,230),rgb(84,170,230),rgb(84,170,230),rgb(64,127,115),rgb(58,164,58),rgb(191,182,67),rgb(197,154,68),rgb(160,70,94),rgb(138,84,166),rgb(82,113,165),rgb(84,142,152),rgb(150,181,184),rgb(195,194,194),rgb(195,194,194));padding:2px 0;border-radius:10px;box-shadow:var(--idm-gl-box-shadow)}.legend-bars span[data-v-5f45c14c]{font-size:12px;text-align:center;color:var(--idm-white);width:36px}.active-tropical[data-v-bb8414b4]{bottom:unset;background:var(--idm-white-9);padding:10px;border-radius:5px;z-index:5}.active-tropical .header-box[data-v-bb8414b4]{min-width:360px;margin-bottom:10px;box-sizing:border-box;color:var(--idm-black-8)}.active-tropical .header-box .close-btn[data-v-bb8414b4]{position:relative;height:0px;text-align:right;font-size:22px;color:var(--idm-primary-color)}.active-tropical .header-box .main[data-v-bb8414b4]{font-size:16px}.active-tropical .header-box .sub[data-v-bb8414b4]{margin:3px 0;font-size:12px;color:var(--idm-info-color)}.active-tropical .main-box[data-v-bb8414b4]{min-width:360px;color:var(--idm-black-8);overflow-y:auto;box-sizing:border-box;font-size:12px;z-index:4}.active-tropical .main-box .content[data-v-bb8414b4]{padding:5px 0;border-radius:5px;background:var(--idm-gray-light)}.active-tropical .main-box .row[data-v-bb8414b4]{width:100%;padding:4px 10px;box-sizing:border-box;display:flex;align-items:center;justify-content:space-between}.active-tropical .main-box .row .col[data-v-bb8414b4]{display:flex;align-items:center;justify-content:space-between}.active-tropical .main-box .row .col label[data-v-bb8414b4]{width:82px;margin-right:4px;color:var(--idm-info-color)}.active-tropical .main-box .row .col.col-24[data-v-bb8414b4]{width:100%}.active-tropical .main-box .row .col.col-left[data-v-bb8414b4]{width:55%}.active-tropical .main-box .row .col.col-right[data-v-bb8414b4]{width:40%}.forecast-models[data-v-bb8414b4]{display:flex;justify-content:flex-end;flex:1;margin-left:5px;flex-wrap:wrap}.forecast-models .model[data-v-bb8414b4]{font-size:12px;padding:0 6px 4px;display:flex;border:1px solid var(--idm-primary-color)}.forecast-models .model span[data-v-bb8414b4]{border-bottom:2px dashed var(--idm-white)}.forecast-models .model span.cma[data-v-bb8414b4]{border-color:#e2ea03cc}.forecast-models .model span.jma[data-v-bb8414b4]{border-color:#01d2b7cc}.forecast-models .model span.ecmwf[data-v-bb8414b4]{border-color:#f582f2cc}.forecast-models .model span.ukm[data-v-bb8414b4]{border-color:#4783f5cc}.forecast-models .model span.noaa-at[data-v-bb8414b4],.forecast-models .model span.noaa-ep[data-v-bb8414b4]{border-color:#9758fbcc}.forecast-models .model.active[data-v-bb8414b4]{border:1px solid var(--idm-primary-color);background-color:var(--idm-primary-color);color:var(--idm-white)}.forecast-models .model[data-v-bb8414b4]:first-child{border-top-left-radius:6px;border-bottom-left-radius:6px}.forecast-models .model.center-child[data-v-bb8414b4]{border-left:1px solid var(--idm-primary-color);border-right:1px solid var(--idm-primary-color)}.forecast-models .model[data-v-bb8414b4]:last-child{border-top-right-radius:6px;border-bottom-right-radius:6px}.legend[data-v-bb8414b4]{display:flex;align-items:center;color:var(--idm-info-color)}.legend .icon[data-v-bb8414b4]{height:14px;width:14px;border-radius:50%;border:3px solid #fff;margin-right:3px}.legend .icon.td[data-v-bb8414b4]{background-color:var(--idm-tropicals-td)}.legend .icon.ts[data-v-bb8414b4]{background-color:var(--idm-tropicals-ts)}.legend .icon.sts[data-v-bb8414b4]{background-color:var(--idm-tropicals-sts)}.legend .icon.ty[data-v-bb8414b4]{background-color:var(--idm-tropicals-ty)}.legend .icon.sty[data-v-bb8414b4]{background-color:var(--idm-tropicals-sty)}.legend .icon.supper-ty[data-v-bb8414b4]{background-color:var(--idm-tropicals-super-ty)}.legend .icon.r7[data-v-bb8414b4]{border:1.5px solid var(--idm-tropicals-r7)}.legend .icon.r10[data-v-bb8414b4]{border:1.5px solid var(--idm-tropicals-r10)}.legend .icon.history[data-v-bb8414b4]{border:none;border-radius:0;height:4px;background:var(--idm-black-5)}.legend .button[data-v-bb8414b4]{cursor:pointer;padding:0 4px;border-radius:4px;border:1px solid var(--idm-primary-color);color:var(--idm-primary-color)}.more[data-v-bb8414b4]{display:flex;align-items:center;justify-content:flex-end;color:var(--idm-primary-color);font-weight:700;margin-top:5px}.legend-bars[data-v-42b977ed]{transition:all .4s ease-in-out;background:linear-gradient(to right,rgba(59,126,162,0),rgb(172,210,255),rgb(172,210,255),rgb(3,248,103),rgb(14,201,3),rgb(190,226,2),rgb(248,1,1),rgb(197,5,58),rgb(197,5,58));padding:2px 0;border-radius:10px;box-shadow:var(--idm-gl-box-shadow)}.legend-bars span[data-v-42b977ed]{font-size:12px;text-align:center;color:var(--idm-white);width:35px}.legend-bars[data-v-2a5fbadd]{transition:all .4s ease-in-out;background:linear-gradient(to right,rgb(189,50,160),rgb(189,50,160),rgb(189,50,160),rgb(189,50,160),rgb(208,56,56),rgb(208,56,56),rgb(190,226,2),rgb(190,226,2),rgb(4,210,64),rgb(4,210,64),rgb(172,210,255),rgb(172,210,255));padding:2px 0;border-radius:10px;box-shadow:var(--idm-gl-box-shadow)}.legend-bars span[data-v-2a5fbadd]{font-size:12px;text-align:center;color:var(--idm-white);width:40px}.legend-bars[data-v-5b28deaf]{transition:all .4s ease-in-out;background:linear-gradient(to right,rgb(95,143,197),rgb(95,143,197),rgb(95,143,197),rgb(95,143,197),rgb(80,140,62),rgb(121,146,28),rgb(171,161,14),rgb(223,177,6),rgb(243,150,6),rgb(236,95,21),rgb(190,65,18),rgb(138,43,10),rgb(138,43,10));padding:2px 0;border-radius:10px;box-shadow:var(--idm-gl-box-shadow)}.legend-bars span[data-v-5b28deaf]{font-size:12px;text-align:center;color:var(--idm-white);width:32px}.legend-bars[data-v-72cd9cf1]{transition:all .4s ease-in-out;background:linear-gradient(to right,rgb(149,137,211),rgb(149,137,211),rgb(149,137,211),rgb(149,137,211),rgb(150,209,216),rgb(129,204,197),rgb(103,180,186),rgb(95,143,197),rgb(80,140,62),rgb(121,146,28),rgb(171,161,14),rgb(223,177,6),rgb(243,150,6),rgb(236,95,21),rgb(190,65,18),rgb(138,43,10),rgb(138,43,10));padding:2px 0;border-radius:10px;box-shadow:var(--idm-gl-box-shadow)}.legend-bars span[data-v-72cd9cf1]{font-size:12px;text-align:center;color:var(--idm-white);width:32px}.legend-bars[data-v-2092df03]{transition:all .4s ease-in-out;background:linear-gradient(to right,rgb(76,165,228),rgb(76,165,228),rgb(76,165,228),rgb(76,165,228),rgb(103,180,186),rgb(129,204,197),rgb(150,209,216),rgb(180,209,216));padding:2px 0;border-radius:10px;box-shadow:var(--idm-gl-box-shadow)}.legend-bars span[data-v-2092df03]{font-size:12px;text-align:center;color:var(--idm-white);width:40px}.point-meteo[data-v-fb5b12d6]{bottom:unset}.point-meteo .meteo-box[data-v-fb5b12d6]{position:absolute;color:var(--idm-black-8);top:0;left:5px;padding:10px;background-color:var(--idm-white-9);-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);width:260px;border-top-right-radius:5px;border-bottom-right-radius:5px;z-index:2}.point-meteo .meteo-box .header-box[data-v-fb5b12d6]{margin-bottom:10px;box-sizing:border-box;color:var(--idm-black-8)}.point-meteo .meteo-box .header-box .close[data-v-fb5b12d6]{position:relative;height:0px;text-align:right;font-size:22px;color:var(--idm-primary-color)}.point-meteo .meteo-box .header-box .main[data-v-fb5b12d6]{font-size:16px}.point-meteo .meteo-box .header-box .sub[data-v-fb5b12d6]{margin:3px 0;font-size:12px;color:var(--idm-info-color)}.point-meteo .meteo-box .main-box[data-v-fb5b12d6]{padding:0 5px;border-radius:5px;background:var(--idm-gray-light)}.point-meteo .meteo-box .main-box .flex-space[data-v-fb5b12d6]{padding:3px 0;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--idm-white);box-sizing:border-box}.point-meteo .meteo-box .main-box .flex-space label[data-v-fb5b12d6]{color:var(--idm-black-8)}.point-meteo .meteo-box .main-box .flex-space label[data-v-fb5b12d6]:after{content:":"}.point-meteo .meteo-box .main-box .flex-space[data-v-fb5b12d6]:last-child{border-bottom:none}.point-meteo .meteo-box .more[data-v-fb5b12d6]{margin-top:5px;color:var(--idm-primary-color);font-weight:700;cursor:pointer}.point-meteo[data-v-fb5b12d6]:after{display:block;width:8px;height:8px;border-radius:50%;content:"";background-color:var(--idm-white-9);margin-bottom:360px}.point-meteo[data-v-fb5b12d6]:before{display:block;content:"";width:2px;height:360px;margin-left:3px;border-left:2px solid var(--idm-white-9)}#zone-info[data-v-d1cb4e6e]{position:absolute;background:var(--idm-white);color:var(--idm-black-8);z-index:10}#zone-info .rich-context[data-v-d1cb4e6e]{width:100vw;height:100vh;padding:10px;font-size:14px;font-weight:400;color:var(--idm-black-8)!important;overflow-y:auto}#zone-info .close[data-v-d1cb4e6e]{position:relative;color:var(--idm-info-color-light2);font-size:24px;height:0;text-align:right;margin:5px 5px 0 0}#port-info[data-v-6fdfee96]{position:absolute;background:var(--idm-white);color:var(--idm-black-8);padding:10px;border-radius:6px;cursor:default;z-index:1000;height:fit-content}#port-info .port-box[data-v-6fdfee96]{margin-top:10px;max-width:240px}#port-info .port-box .flex-start[data-v-6fdfee96]{line-height:2}#port-info .port-box .flex-start label[data-v-6fdfee96]{color:var(--idm-info-color);margin-right:10px;width:50px}#port-info .port-box .flex-start span[data-v-6fdfee96]{flex:1;flex-wrap:wrap;text-align:justify-all;color:var(--idm-black-8)}#port-info .port-box .flex-start span.link[data-v-6fdfee96]{cursor:pointer;text-decoration:underline}#port-info .port-box .flex-start span.link[data-v-6fdfee96]:hover{font-weight:600}#port-info .close[data-v-6fdfee96]{position:relative;text-align:right;height:0px;color:var(--idm-info-color-light2);font-size:24px}.lat-lng-tip[data-v-9f51b3f9]{position:absolute;padding:2px 10px;border-radius:5px;color:var(--idm-primary-color);font-size:12px;top:unset;background:var(--idm-white);box-shadow:0 2px 12px #0003;transition:all .4s ease-in-out}.menu-bar-box[data-v-2d85e33b]{display:flex;flex-direction:column;align-items:flex-end;justify-content:flex-start;transition:all .4s ease-in-out}.menu-bar-box .bar-item[data-v-2d85e33b]{position:relative;margin-bottom:15px;border-radius:5px;background:var(--idm-white);cursor:pointer;box-shadow:0 2px 12px #0003}.menu-bar-box .bar-item .menu-icon[data-v-2d85e33b]{padding:8px;display:flex}.menu-bar-box .bar-item .menu-icon[data-v-2d85e33b]:first-child{border-top-left-radius:5px;border-top-right-radius:5px}.menu-bar-box .bar-item .menu-icon[data-v-2d85e33b]:last-child{border-bottom-left-radius:5px;border-bottom-right-radius:5px}.menu-bar-box .bar-item .menu-icon span[data-v-2d85e33b]{font-size:18px;font-weight:500;color:var(--idm-black-8)}.menu-bar-box .bar-item .menu-icon.active[data-v-2d85e33b]{background:var(--idm-primary-color)}.menu-bar-box .bar-item .menu-icon.active span[data-v-2d85e33b]{color:var(--idm-white)}:root{--idm-tropicals-td: #03f869;--idm-tropicals-ts: #f2f202;--idm-tropicals-sts: #ff9100;--idm-tropicals-ty: #f44336;--idm-tropicals-sty: #c604a4;--idm-tropicals-super-ty: #6b05bb;--idm-tropicals-r7: #ff9100;--idm-tropicals-r10: #f44336;--idm-gl-box-shadow-color: rgba(0, 0, 0, .5);--idm-gl-box-shadow: 0px 12px 32px 4px rgba(0, 0, 0, .04), 0px 8px 20px rgba(0, 0, 0, .08);--idm-gl-box-shadow-light: 0px 0px 12px rgba(0, 0, 0, .12);--idm-gl-box-shadow-lighter: 0px 0px 6px rgba(0, 0, 0, .12);--idm-gl-box-shadow-dark: 0px 16px 48px 16px rgba(0, 0, 0, .08), 0px 12px 32px rgba(0, 0, 0, .12), 0px 8px 16px -8px rgba(0, 0, 0, .16)}.point-marker{pointer-events:none!important}.point-marker .marker-circle{pointer-events:inherit;width:12px;height:12px;border-radius:50%;border:2px solid var(--idm-white);background:var(--idm-danger-color)}.point-marker .marker-circle:hover{cursor:pointer}.point-marker.closed{pointer-events:auto!important}.point-summary-marker,.point-contextmenu-marker{color:var(--idm-white);font-size:12px;background:var(--idm-danger-color);border:1px solid var(--idm-white);padding:2px 5px;border-radius:5px;cursor:pointer}.point-summary-marker .marker-close,.point-contextmenu-marker .marker-close{pointer-events:auto;position:absolute;background:var(--idm-danger-color);border:1px dashed var(--idm-white);display:flex;align-items:center;justify-content:center;width:20px;height:20px;right:-17px;top:-17px;cursor:pointer;font-size:20px}.tip-marker{color:var(--idm-white);font-size:12px;text-shadow:var(--idm-text-shadow);background-color:var(--idm-black-6);padding:2px 5px;border-radius:5px;cursor:pointer}.tip-marker .marker-label{border-bottom:var(--idm-dashed-border)}.tip-marker .marker-label:last-child{border-bottom:none}.tip-marker .marker-label b{font-weight:600;color:var(--idm-danger-color)}.hurricane-hourly-marker .iconfont{font-size:34px!important;color:var(--idm-danger-color)}.hurricane-hourly-marker svg{height:34px;width:34px}.hurricane-hourly-marker .center{box-sizing:border-box;display:flex;align-items:center;justify-content:center}.hurricane-hourly-marker .center.north{animation:anticlockwise 2s linear infinite}.hurricane-hourly-marker .center.south{animation:clockwise 2s linear infinite}@keyframes clockwise{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes anticlockwise{0%{transform:rotate(0)}to{transform:rotate(-360deg)}}
package/package.json CHANGED
@@ -1,70 +1,70 @@
1
- {
2
- "name": "@idmwx/idmui-gl3",
3
- "private": false,
4
- "version": "3.4.7",
5
- "description": "idm webgl3",
6
- "type": "module",
7
- "keywords": [
8
- "idm",
9
- "idmwx",
10
- "webgl3"
11
- ],
12
- "author": "idm",
13
- "contributors": [
14
- "ChenHeng"
15
- ],
16
- "license": "GPL",
17
- "files": [
18
- "dist"
19
- ],
20
- "main": "./dist/index.umd.cjs",
21
- "module": "./dist/index.js",
22
- "types": "index.d.ts",
23
- "scripts": {
24
- "dev": "vite --host 0.0.0.0 --config ./build/base.config.ts",
25
- "build": "vue-tsc --noEmit && vite build --config ./build/lib.config.ts",
26
- "lint:fix": "eslint --fix --ext .js,.ts,.vue .",
27
- "prettier": "yarn lint:fix && prettier --write '**/*.{js,ts,vue}'",
28
- "release": "yarn build && yarn publish --access public"
29
- },
30
- "dependencies": {
31
- "@idm-plugin/geo": "^1.0.4",
32
- "@idmwx/idmwx-base": "^2.8.7",
33
- "@mapbox/sphericalmercator": "^1.2.0",
34
- "@turf/turf": "^6.5.0",
35
- "axios": "^1.3.5",
36
- "element-plus": "^2.3.5",
37
- "js-md5": "^0.7.3",
38
- "mapbox-gl": "3.0.0",
39
- "moment": "^2.29.4",
40
- "vue": "^3.2.36"
41
- },
42
- "devDependencies": {
43
- "@types/mapbox-gl": "^3.1.0",
44
- "@types/node": "^18.14.2",
45
- "@typescript-eslint/eslint-plugin": "^5.53.0",
46
- "@typescript-eslint/parser": "^5.53.0",
47
- "@vitejs/plugin-vue": "^4.0.0",
48
- "eslint": "^8.35.0",
49
- "eslint-config-prettier": "^8.6.0",
50
- "eslint-define-config": "^1.15.0",
51
- "eslint-plugin-prettier": "^4.2.1",
52
- "eslint-plugin-vue": "^9.9.0",
53
- "lint-staged": "^13.1.2",
54
- "prettier": "^2.8.4",
55
- "sass": "^1.58.3",
56
- "simple-git-hooks": "^2.8.1",
57
- "stylelint": "^15.2.0",
58
- "typescript": "^4.9.3",
59
- "vite": "^4.1.0",
60
- "vite-plugin-dts": "^2.0.2",
61
- "vue-tsc": "^1.0.24"
62
- },
63
- "lint-staged": {
64
- "*.{ts,tsx,js,vue}": "eslint --fix",
65
- "*.{ts,tsx,js,vue,scss}": "prettier --write"
66
- },
67
- "simple-git-hooks": {
68
- "pre-commit": "npx lint-staged"
69
- }
70
- }
1
+ {
2
+ "name": "@idmwx/idmui-gl3",
3
+ "private": false,
4
+ "version": "3.4.8",
5
+ "description": "idm webgl3",
6
+ "type": "module",
7
+ "keywords": [
8
+ "idm",
9
+ "idmwx",
10
+ "webgl3"
11
+ ],
12
+ "author": "idm",
13
+ "contributors": [
14
+ "ChenHeng"
15
+ ],
16
+ "license": "GPL",
17
+ "files": [
18
+ "dist"
19
+ ],
20
+ "main": "./dist/index.umd.cjs",
21
+ "module": "./dist/index.js",
22
+ "types": "index.d.ts",
23
+ "scripts": {
24
+ "dev": "vite --host 0.0.0.0 --config ./build/base.config.ts",
25
+ "build": "vue-tsc --noEmit && vite build --config ./build/lib.config.ts",
26
+ "lint:fix": "eslint --fix --ext .js,.ts,.vue .",
27
+ "prettier": "yarn lint:fix && prettier --write '**/*.{js,ts,vue}'",
28
+ "release": "yarn build && yarn publish --access public"
29
+ },
30
+ "dependencies": {
31
+ "@idm-plugin/geo": "^1.0.4",
32
+ "@idmwx/idmwx-base": "^2.8.7",
33
+ "@mapbox/sphericalmercator": "^1.2.0",
34
+ "@turf/turf": "^6.5.0",
35
+ "axios": "^1.3.5",
36
+ "element-plus": "^2.3.5",
37
+ "js-md5": "^0.7.3",
38
+ "mapbox-gl": "3.0.0",
39
+ "moment": "^2.29.4",
40
+ "vue": "^3.2.36"
41
+ },
42
+ "devDependencies": {
43
+ "@types/mapbox-gl": "^3.1.0",
44
+ "@types/node": "^18.14.2",
45
+ "@typescript-eslint/eslint-plugin": "^5.53.0",
46
+ "@typescript-eslint/parser": "^5.53.0",
47
+ "@vitejs/plugin-vue": "^4.0.0",
48
+ "eslint": "^8.35.0",
49
+ "eslint-config-prettier": "^8.6.0",
50
+ "eslint-define-config": "^1.15.0",
51
+ "eslint-plugin-prettier": "^4.2.1",
52
+ "eslint-plugin-vue": "^9.9.0",
53
+ "lint-staged": "^13.1.2",
54
+ "prettier": "^2.8.4",
55
+ "sass": "^1.58.3",
56
+ "simple-git-hooks": "^2.8.1",
57
+ "stylelint": "^15.2.0",
58
+ "typescript": "^4.9.3",
59
+ "vite": "^4.1.0",
60
+ "vite-plugin-dts": "^2.0.2",
61
+ "vue-tsc": "^1.0.24"
62
+ },
63
+ "lint-staged": {
64
+ "*.{ts,tsx,js,vue}": "eslint --fix",
65
+ "*.{ts,tsx,js,vue,scss}": "prettier --write"
66
+ },
67
+ "simple-git-hooks": {
68
+ "pre-commit": "npx lint-staged"
69
+ }
70
+ }