@idmwx/idmui-gl3 3.4.3 → 3.4.4

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
@@ -559,10 +559,12 @@ class Ue {
559
559
  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;
560
560
  }
561
561
  toggle(e) {
562
- this.map.setLayoutProperty(this.rampColorLayer, "visibility", e ? "visible" : "none");
562
+ const t = this.map.getLayoutProperty(this.rampColorLayer, "visibility"), r = e ? "visible" : "none";
563
+ t !== r && this.map.setLayoutProperty(this.rampColorLayer, "visibility", r);
563
564
  }
564
565
  toggleParticle(e) {
565
- this.map.setLayoutProperty(this.particleLayer, "visibility", e ? "visible" : "none");
566
+ const t = this.map.getLayoutProperty(this.particleLayer, "visibility"), r = e ? "visible" : "none";
567
+ t !== r && this.map.setLayoutProperty(this.particleLayer, "visibility", r);
566
568
  }
567
569
  }
568
570
  class le {
@@ -1030,8 +1032,8 @@ const Kt = {
1030
1032
  }
1031
1033
  },
1032
1034
  handleClear() {
1033
- var i, e, t, r, a, s, n;
1034
- (i = this.viewport) == null || i.toggle(!1), this.context = void 0, this.particleContext = void 0, this.etime = void 0, this.initial = !0, (t = (e = this.viewport) == null ? void 0 : e.map) == null || t.off("resize", this.handleResize), (a = (r = this.viewport) == null ? void 0 : r.map) == null || a.off("movestart", this.handlePause), (n = (s = this.viewport) == null ? void 0 : s.map) == null || n.off("moveend", this.handlePlay), this.handlePause();
1035
+ var i, e, t, r, a, s, n, o;
1036
+ (i = this.viewport) == null || i.toggle(!1), (e = this.viewport) == null || e.toggleParticle(!1), this.context = void 0, this.particleContext = void 0, this.etime = void 0, this.initial = !0, (r = (t = this.viewport) == null ? void 0 : t.map) == null || r.off("resize", this.handleResize), (s = (a = this.viewport) == null ? void 0 : a.map) == null || s.off("movestart", this.handlePause), (o = (n = this.viewport) == null ? void 0 : n.map) == null || o.off("moveend", this.handlePlay), this.handlePause();
1035
1037
  },
1036
1038
  handleSetup() {
1037
1039
  if (!this.context) {
@@ -1114,7 +1116,7 @@ const Kt = {
1114
1116
  });
1115
1117
  }
1116
1118
  }
1117
- }, re = (i) => (U("data-v-b7e5940e"), i = i(), G(), i), Qt = { key: 0 }, ei = /* @__PURE__ */ re(() => /* @__PURE__ */ l("span", null, "kts", -1)), ti = /* @__PURE__ */ re(() => /* @__PURE__ */ l("span", null, "0", -1)), ii = /* @__PURE__ */ re(() => /* @__PURE__ */ l("span", null, "5", -1)), ai = /* @__PURE__ */ re(() => /* @__PURE__ */ l("span", null, "10", -1)), ri = /* @__PURE__ */ re(() => /* @__PURE__ */ l("span", null, "20", -1)), si = /* @__PURE__ */ re(() => /* @__PURE__ */ l("span", null, "30", -1)), oi = /* @__PURE__ */ re(() => /* @__PURE__ */ l("span", null, "40", -1)), ni = /* @__PURE__ */ re(() => /* @__PURE__ */ l("span", null, "60", -1)), li = [
1119
+ }, re = (i) => (U("data-v-bc5ff165"), i = i(), G(), i), Qt = { key: 0 }, ei = /* @__PURE__ */ re(() => /* @__PURE__ */ l("span", null, "kts", -1)), ti = /* @__PURE__ */ re(() => /* @__PURE__ */ l("span", null, "0", -1)), ii = /* @__PURE__ */ re(() => /* @__PURE__ */ l("span", null, "5", -1)), ai = /* @__PURE__ */ re(() => /* @__PURE__ */ l("span", null, "10", -1)), ri = /* @__PURE__ */ re(() => /* @__PURE__ */ l("span", null, "20", -1)), si = /* @__PURE__ */ re(() => /* @__PURE__ */ l("span", null, "30", -1)), oi = /* @__PURE__ */ re(() => /* @__PURE__ */ l("span", null, "40", -1)), ni = /* @__PURE__ */ re(() => /* @__PURE__ */ l("span", null, "60", -1)), li = [
1118
1120
  ei,
1119
1121
  ti,
1120
1122
  ii,
@@ -1133,7 +1135,7 @@ function hi(i, e, t, r, a, s) {
1133
1135
  }, li, 4)
1134
1136
  ])) : j("", !0);
1135
1137
  }
1136
- const ci = /* @__PURE__ */ k(Kt, [["render", hi], ["__scopeId", "data-v-b7e5940e"]]);
1138
+ const ci = /* @__PURE__ */ k(Kt, [["render", hi], ["__scopeId", "data-v-bc5ff165"]]);
1137
1139
  const di = {
1138
1140
  name: "IdmCurrent",
1139
1141
  props: {
@@ -1425,8 +1427,8 @@ const bi = {
1425
1427
  }
1426
1428
  },
1427
1429
  handleClear() {
1428
- var i, e, t, r, a, s, n;
1429
- (i = this.viewport) == null || i.toggle(!1), this.context = void 0, this.particleContext = void 0, this.etime = void 0, this.initial = !0, (t = (e = this.viewport) == null ? void 0 : e.map) == null || t.off("resize", this.handleResize), (a = (r = this.viewport) == null ? void 0 : r.map) == null || a.off("movestart", this.handlePause), (n = (s = this.viewport) == null ? void 0 : s.map) == null || n.off("moveend", this.handlePlay), this.handlePause();
1430
+ var i, e, t, r, a, s, n, o;
1431
+ (i = this.viewport) == null || i.toggle(!1), (e = this.viewport) == null || e.toggleParticle(!1), this.context = void 0, this.particleContext = void 0, this.etime = void 0, this.initial = !0, (r = (t = this.viewport) == null ? void 0 : t.map) == null || r.off("resize", this.handleResize), (s = (a = this.viewport) == null ? void 0 : a.map) == null || s.off("movestart", this.handlePause), (o = (n = this.viewport) == null ? void 0 : n.map) == null || o.off("moveend", this.handlePlay), this.handlePause();
1430
1432
  },
1431
1433
  handleSetup() {
1432
1434
  if (!this.context) {
@@ -1504,7 +1506,7 @@ const bi = {
1504
1506
  });
1505
1507
  }
1506
1508
  }
1507
- }, he = (i) => (U("data-v-911e159b"), i = i(), G(), i), _i = { key: 0 }, Li = /* @__PURE__ */ he(() => /* @__PURE__ */ l("span", null, "kts", -1)), wi = /* @__PURE__ */ he(() => /* @__PURE__ */ l("span", null, "0", -1)), xi = /* @__PURE__ */ he(() => /* @__PURE__ */ l("span", null, "0.4", -1)), Ci = /* @__PURE__ */ he(() => /* @__PURE__ */ l("span", null, "0.8", -1)), Si = /* @__PURE__ */ he(() => /* @__PURE__ */ l("span", null, "1.6", -1)), Pi = /* @__PURE__ */ he(() => /* @__PURE__ */ l("span", null, "2", -1)), Ti = /* @__PURE__ */ he(() => /* @__PURE__ */ l("span", null, "3.2", -1)), Ei = [
1509
+ }, he = (i) => (U("data-v-5f45c14c"), i = i(), G(), i), _i = { key: 0 }, Li = /* @__PURE__ */ he(() => /* @__PURE__ */ l("span", null, "kts", -1)), wi = /* @__PURE__ */ he(() => /* @__PURE__ */ l("span", null, "0", -1)), xi = /* @__PURE__ */ he(() => /* @__PURE__ */ l("span", null, "0.4", -1)), Ci = /* @__PURE__ */ he(() => /* @__PURE__ */ l("span", null, "0.8", -1)), Si = /* @__PURE__ */ he(() => /* @__PURE__ */ l("span", null, "1.6", -1)), Pi = /* @__PURE__ */ he(() => /* @__PURE__ */ l("span", null, "2", -1)), Ti = /* @__PURE__ */ he(() => /* @__PURE__ */ l("span", null, "3.2", -1)), Ei = [
1508
1510
  Li,
1509
1511
  wi,
1510
1512
  xi,
@@ -1522,7 +1524,7 @@ function ki(i, e, t, r, a, s) {
1522
1524
  }, Ei, 4)
1523
1525
  ])) : j("", !0);
1524
1526
  }
1525
- const Ri = /* @__PURE__ */ k(bi, [["render", ki], ["__scopeId", "data-v-911e159b"]]), Ii = {
1527
+ const Ri = /* @__PURE__ */ k(bi, [["render", ki], ["__scopeId", "data-v-5f45c14c"]]), Ii = {
1526
1528
  name: "IdmSigWave",
1527
1529
  props: {
1528
1530
  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,O,U,ke,H){"use strict";var vr=Object.defineProperty;var Er=(k,v,i)=>v in k?vr(k,v,{enumerable:!0,configurable:!0,writable:!0,value:i}):k[v]=i;var V=(k,v,i)=>(Er(k,typeof v!="symbol"?v+"":v,i),i);function Me(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const a in t)if(a!=="default"){const o=Object.getOwnPropertyDescriptor(t,a);Object.defineProperty(e,a,o.get?o:{enumerable:!0,get:()=>t[a]})}}return e.default=t,Object.freeze(e)}const E=Me(Ae),xr="",Cr="",C=(t,e)=>{const a=t.__vccOpts||t;for(const[o,r]of e)a[o]=r;return a},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(t,e){return t.enabled?e.some(a=>a.key===t.key)?"layer active":"layer":"layer disabled"}}},watch:{showLayers:{handler(){this.$nextTick(()=>{var t,e;this.$emit("menu",this.showLayers?!1:this.toggleMenu),this.$emit("toggleVersion",Math.random()),this.right=(((t=document.getElementsByClassName("available-layers-show")[0])==null?void 0:t.clientWidth)||0)+(((e=document.getElementsByClassName("fleet-list-container")[0])==null?void 0:e.clientWidth)||0)+10})}},toggleMenu:{handler(){this.$nextTick(()=>{var t,e;this.showLayers=this.toggleMenu?!1:this.showLayers,this.$emit("toggleVersion",Math.random()),this.right=(((t=document.getElementsByClassName("available-layers-show")[0])==null?void 0:t.clientWidth)||0)+(((e=document.getElementsByClassName("fleet-list-container")[0])==null?void 0:e.clientWidth)||0)+10})}}},mounted(){const t=localStorage.getItem(this.version.k);this.version.v!==t&&(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 a=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=a,this.autoActive&&(this.activeWeatherLayers=[...a]),e=localStorage.getItem(this.otherLayersCache),a=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=a,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(t){this.weatherLayers.some(e=>e.key===t.key)?(this.weatherLayers=this.weatherLayers.filter(e=>e.key!==t.key),this.activeWeatherLayers=this.activeWeatherLayers.filter(e=>e.key!==t.key)):this.weatherLayers.length<12&&t.enabled&&(["png","jpg"].includes(t.type)&&(this.weatherLayers=this.weatherLayers.filter(e=>e.type==="json"),this.activeWeatherLayers=this.activeWeatherLayers.filter(e=>e.type==="json")),this.weatherLayers.push(t),this.activeWeatherLayers.push(t)),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(t){if(this.activeWeatherLayers.some(e=>e.key===t.key))this.activeWeatherLayers=this.activeWeatherLayers.filter(e=>e.key!==t.key);else if(t.enabled){this.activeWeatherLayers.push(t);for(const e of this.weatherLayers)t.weight>e.weight&&t.weight&e.weight&&this.activeWeatherLayers.push(e)}this.$emit("weather",this.weatherLayers,this.activeWeatherLayers,this.source)},handleOtherLayerPick(t){this.otherLayers.some(e=>e.key===t.key)?this.otherLayers=this.otherLayers.filter(e=>e.key!==t.key):t.enabled&&this.otherLayers.push(t),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(t){this.source=t,this.handleConfirm()}}},A=t=>(i.pushScopeId("data-v-66a5718f"),t=t(),i.popScopeId(),t),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(t,e,a,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:a.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:a.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:a.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-66a5718f"]]),Ir="",ft={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 t;(t=this.wind)!=null&&t.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 t,e;this.right=(((t=document.getElementsByClassName("available-layers-show")[0])==null?void 0:t.clientWidth)||0)+(((e=document.getElementsByClassName("fleet-list-container")[0])==null?void 0:e.clientWidth)||0)+10},immediate:!0},"current.version":{handler(){var t,e,a;this.bottom=(t=this.current)!=null&&t.active?(((e=document.getElementsByClassName("active-layers")[0])==null?void 0:e.clientHeight)||0)+135:(((a=document.getElementsByClassName("active-layers")[0])==null?void 0:a.clientHeight)||0)+105},immediate:!0},weatherLayers:{handler(){var t,e,a;this.bottom=(t=this.current)!=null&&t.active?(((e=document.getElementsByClassName("active-layers")[0])==null?void 0:e.clientHeight)||0)+135:(((a=document.getElementsByClassName("active-layers")[0])==null?void 0:a.clientHeight)||0)+105},immediate:!0}},methods:{handleParticle(){this.$emit("particle",{particle:!this.showParticle,key:"wind",weight:1})},handleRender(){var t,e,a,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((t=this.wind)!=null&&t.active&&(n=(e=this.wind)==null?void 0:e.data),(a=this.map)!=null&&a.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,y=(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",y]],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,"icon-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 t of this.barbs??[]){const e=t<10?`00${t}kts`:t<100?`0${t}kts`:`${t}kts`;this.map.getLayer(e)&&this.map.setLayoutProperty(e,"visibility",this.showFeather?"visible":"none")}},handleClear(){for(const t of this.barbs??[]){const e=t<10?`00${t}kts`:t<100?`0${t}kts`:`${t}kts`;this.map.getLayer(e)&&this.map.removeLayer(e)}this.map.getSource(this.source)&&this.map.removeSource(this.source),this.windBarbLoaded=!1}}},yt={key:0},gt={key:0,class:"iconfont active"},ut={key:1,class:"iconfont"},_t={key:0,class:"iconfont active"},bt={key:1,class:"iconfont"};function Lt(t,e,a,o,r,s){var l;return(l=a.wind)!=null&&l.active?(i.openBlock(),i.createElementBlock("div",yt,[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))},[a.showParticle?(i.openBlock(),i.createElementBlock("i",gt,"")):(i.openBlock(),i.createElementBlock("i",ut,"")),i.createElementVNode("span",{class:i.normalizeClass(a.showParticle?"active":"")},"Wind Particles",2)]),a.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",_t,"")):(i.openBlock(),i.createElementBlock("i",bt,"")),i.createElementVNode("span",{class:i.normalizeClass(r.showFeather?"active":"")},"Wind Feather",2)])):i.createCommentVNode("",!0)],4)])):i.createCommentVNode("",!0)}const wt=C(ft,[["render",Lt],["__scopeId","data-v-59d56055"]]);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,a=0){return e>180?this.convertNLng(e-360,a+1):e<-180?this.convertNLng(e+360,a+1):[e,a]}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(),a=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,y]=this.mercator.px([s,o[1]],a),[d,m]=this.mercator.px([n,r[1]],a),f=Math.round(this.mercator.size*Math.pow(2,a)*(l+c));return[d,m,h+f,y]}getBoundRange(){const e=this.map.getZoom()+1,a=this.mercator.size*Math.pow(2,e),o=this.getBoundPixel();return[o[0]/a,o[2]/a,o[3]/a,o[1]/a]}getWorldCopy(e,a){const o=2**a,[r,s,l,n]=e.map(y=>~~(y/(o*256))),c=[];for(let y=n;y<=s;y++)for(let d=r;d<=l;d++)c.push([d,y]);return c.map(y=>{const d=2**a*256;return[y[0]*d,y[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){this.map.setLayoutProperty(this.rampColorLayer,"visibility",e?"visible":"none")}toggleParticle(e){this.map.setLayoutProperty(this.particleLayer,"visibility",e?"visible":"none")}}class Y{createShader(e,a,o){const r=e.createShader(a);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,a,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,a),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,a,o){if(e){const r=e.createBuffer();return a==="array"?(e.bindBuffer(e.ARRAY_BUFFER,r),o&&e.bufferData(e.ARRAY_BUFFER,o,e.STATIC_DRAW)):a==="element"&&(e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,r),o&&e.bufferData(e.ELEMENT_ARRAY_BUFFER,o,e.STATIC_DRAW)),r}return null}createProgram(e,a,o){const r=e.createProgram(),s=this.createShader(e,e.VERTEX_SHADER,a),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,a,o){const r=this.createProgram(e,a,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,a,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 a.forEach(([h,y])=>{c.addColorStop(h,y)}),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,a=1e3){const o=Math.ceil(Math.sqrt(a)),r=o*o,s=new Uint8Array(r*4);for(let y=0;y<s.length;y++)s[y]=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 y=0;y<r;y++)c[y]=y;const h=this.createDataBuffer(e,"array",c);return{resolution:o,total:r,texture0:l,texture1:n,indexBuffer:h}}bind(e,a,o){const r=this.createProgram(e,a,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,a,o,r,s,l){const n=this.createProgramWrapper(e,a,o),c=this.createProgramWrapper(e,r,s),h=this.createProgramWrapper(e,r,l),y=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:y,frameBuffer:d}}draw(e,a,o,r,s,l,n){var c,h;if(a&&o){e.resize(),a==null||a.viewport(0,0,(c=a==null?void 0:a.canvas)==null?void 0:c.width,(h=a==null?void 0:a.canvas)==null?void 0:h.height),a.clearColor(0,0,0,0),a.clear(a.COLOR_BUFFER_BIT|a.DEPTH_BUFFER_BIT);try{const y=a.getUniformLocation(o,"u_resolution"),d=a.getUniformLocation(o,"u_image"),m=a.getUniformLocation(o,"u_color");if(a.useProgram(o),a.uniform2f(y,a.canvas.width*e.ratio,a.canvas.height*e.ratio),a.activeTexture(a.TEXTURE0),a.bindTexture(a.TEXTURE_2D,r),a.uniform1i(d,0),a.activeTexture(a.TEXTURE1),a.bindTexture(a.TEXTURE_2D,s),a.uniform1i(m,1),n!=null&&n.uvRange&&(n!=null&&n.sRange)){const p=a.getUniformLocation(o,"u_range_u_v"),b=a.getUniformLocation(o,"u_range_s");a.uniform2f(p,n.uvRange[0],n.uvRange[1]),a.uniform2f(b,n.sRange[0],n.sRange[1])}const f=e.getBoundPixel(),u=e.map.getZoom()+1,g=e.getWorldCopy(f,u);for(const p of g){const b=(p[0]-f[0])*e.ratio,_=(p[1]-f[3])*e.ratio,w=p[2]*e.ratio,[x,L,S,N]=[b,w+b,_,w+_],T=new Float32Array([x,S,L,S,x,N,x,N,L,S,L,N]);a.bindBuffer(a.ARRAY_BUFFER,l),a.bufferData(a.ARRAY_BUFFER,T,a.STATIC_DRAW),a.drawArrays(a.TRIANGLES,0,6)}}catch(y){console.log(`render failed...${y}`)}}}drawParticle(e,a,o,r,s){var l,n;a&&(a==null||a.viewport(0,0,(l=a==null?void 0:a.canvas)==null?void 0:l.width,(n=a==null?void 0:a.canvas)==null?void 0:n.height),a.disable(a.DEPTH_TEST),a.disable(a.STENCIL_TEST),a.activeTexture(a.TEXTURE0),a.bindTexture(a.TEXTURE_2D,o),a.activeTexture(a.TEXTURE1),a.bindTexture(a.TEXTURE_2D,r.texture0),this.renderScreen(e,a,r,s),this.updateParticles(e,a,r,s))}renderScreen(e,a,o,r){a.bindFramebuffer(a.FRAMEBUFFER,o.frameBuffer),a.framebufferTexture2D(a.FRAMEBUFFER,a.COLOR_ATTACHMENT0,a.TEXTURE_2D,o.screenTexture,0),a.viewport(0,0,a.canvas.width,a.canvas.height),this.renderScreenTexture(a,o.backgroundTexture,o.screen,o.quadBuffer,.95),this.renderParticles(e,a,o,r),a.bindFramebuffer(a.FRAMEBUFFER,null),this.renderScreenTexture(a,o.screenTexture,o.screen,o.quadBuffer,1);const s=o.backgroundTexture;o.backgroundTexture=o.screenTexture,o.screenTexture=s}renderScreenTexture(e,a,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,a),e.uniform1i(o.u_screen,2),e.uniform1f(o.u_opacity,s),e.drawArrays(e.TRIANGLES,0,6))}renderParticles(e,a,o,r){if(a){a.useProgram(o.particle.program),a.bindBuffer(a.ARRAY_BUFFER,o.indexBuffer),a.enableVertexAttribArray(o.particle.a_index),a.vertexAttribPointer(o.particle.a_index,1,a.FLOAT,!1,0,0),a.activeTexture(a.TEXTURE2),a.bindTexture(a.TEXTURE_2D,o.color.texture),a.uniform1i(o.particle.u_factor,0),a.uniform1i(o.particle.u_particles,1),a.uniform1i(o.particle.u_color_ramp,2),a.uniform1f(o.particle.u_particles_resolution,o.resolution*e.ratio),a.uniform1f(o.particle.u_point,e.ratio);const s=e.getBoundRange();a.uniform4f(o.particle.u_viewport,s[0],s[1],s[2],s[3]),a.uniform2f(o.particle.u_factor_min,r.uvRange[0],r.uvRange[0]),a.uniform2f(o.particle.u_factor_max,r.uvRange[1],r.uvRange[1]),a.drawArrays(a.POINTS,0,o.total)}}updateParticles(e,a,o,r){var l,n;if(a){a.bindFramebuffer(a.FRAMEBUFFER,o.frameBuffer),a.framebufferTexture2D(a.FRAMEBUFFER,a.COLOR_ATTACHMENT0,a.TEXTURE_2D,o.texture1,0),a.viewport(0,0,o.resolution,o.resolution),a.useProgram(o.update.program),a.bindBuffer(a.ARRAY_BUFFER,o.quadBuffer),a.enableVertexAttribArray(o.update.a_pos),a.vertexAttribPointer(o.update.a_pos,2,a.FLOAT,!1,0,0),a.uniform1i(o.update.u_factor,0),a.uniform1i(o.update.u_particles,1);const c=e.getBoundRange();a.uniform4f(o.update.u_viewport,c[0],c[1],c[2],c[3]),a.uniform1f(o.update.u_rand_seed,Math.random()),a.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),a.uniform2f(o.update.u_factor_min,r.uvRange[0],r.uvRange[0]),a.uniform2f(o.update.u_factor_max,r.uvRange[1],r.uvRange[1]),a.uniform1f(o.update.u_speed_factor,r.speedFactor*e.ratio),a.uniform1f(o.update.u_drop_rate,r.dropRate),a.uniform1f(o.update.u_drop_rate_bump,r.dropRateBump),a.drawArrays(a.TRIANGLES,0,6)}const s=o.texture0;o.texture0=o.texture1,o.texture1=s}resize(e,a){e.resize();const o=new Uint8Array(a.canvas.width*a.canvas.height*4).fill(0,0,a.canvas.width*a.canvas.height*4),r=this.createTexture(a,a.NEAREST,a.NEAREST,a.CLAMP_TO_EDGE,o,a.canvas.width,a.canvas.height),s=this.createTexture(a,a.NEAREST,a.NEAREST,a.CLAMP_TO_EDGE,o,a.canvas.width,a.canvas.height);return{screenTexture:r,backgroundTexture:s}}async loadImg(e){return new Promise(a=>{const o=new Blob([e],{type:e.type}),r=URL.createObjectURL(o),s=new Image;s.crossOrigin="anonymous",s.src=r,s.onload=()=>a(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,O,U,ke,H){"use strict";var vr=Object.defineProperty;var Er=(k,v,i)=>v in k?vr(k,v,{enumerable:!0,configurable:!0,writable:!0,value:i}):k[v]=i;var V=(k,v,i)=>(Er(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),xr="",Cr="",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-66a5718f"),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-66a5718f"]]),Ir="",ft={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,y=(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",y]],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,"icon-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}}},yt={key:0},gt={key:0,class:"iconfont active"},ut={key:1,class:"iconfont"},_t={key:0,class:"iconfont active"},bt={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",yt,[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",_t,"")):(i.openBlock(),i.createElementBlock("i",bt,"")),i.createElementVNode("span",{class:i.normalizeClass(r.showFeather?"active":"")},"Wind Feather",2)])):i.createCommentVNode("",!0)],4)])):i.createCommentVNode("",!0)}const wt=C(ft,[["render",Lt],["__scopeId","data-v-59d56055"]]);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,y]=this.mercator.px([s,o[1]],t),[d,m]=this.mercator.px([n,r[1]],t),f=Math.round(this.mercator.size*Math.pow(2,t)*(l+c));return[d,m,h+f,y]}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(y=>~~(y/(o*256))),c=[];for(let y=n;y<=s;y++)for(let d=r;d<=l;d++)c.push([d,y]);return c.map(y=>{const d=2**t*256;return[y[0]*d,y[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,y])=>{c.addColorStop(h,y)}),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 y=0;y<s.length;y++)s[y]=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 y=0;y<r;y++)c[y]=y;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),y=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:y,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 y=t.getUniformLocation(o,"u_resolution"),d=t.getUniformLocation(o,"u_image"),m=t.getUniformLocation(o,"u_color");if(t.useProgram(o),t.uniform2f(y,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"),b=t.getUniformLocation(o,"u_range_s");t.uniform2f(p,n.uvRange[0],n.uvRange[1]),t.uniform2f(b,n.sRange[0],n.sRange[1])}const f=e.getBoundPixel(),u=e.map.getZoom()+1,g=e.getWorldCopy(f,u);for(const p of g){const b=(p[0]-f[0])*e.ratio,_=(p[1]-f[3])*e.ratio,w=p[2]*e.ratio,[x,L,S,N]=[b,w+b,_,w+_],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(y){console.log(`render failed...${y}`)}}}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; //纹理坐标
@@ -186,8 +186,8 @@
186
186
  gl_FragColor = vec4(
187
187
  fract(pos * 255.0),
188
188
  floor(pos * 255.0) / 255.0);
189
- }`);const $r="",vt={name:"IdmWindParticle",props:{factor:{type:Object},viewport:{type:ve},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,wrapper:void 0,animation:void 0,particleContext:void 0,particleTexture:void 0,particleOptions:{fadeOpacity:.9,speedFactor:.25,dropRate:.003,dropRateBump:.01,uvRange:[-25,26],sRange:[0,31.985]},paused:!1,initial:!0,right:10}},watch:{"factor.version":{handler(){var t;(t=this.factor)!=null&&t.active?this.handleRender():this.handleClear()},deep:!0},toggleVersion:{handler(){var t,e;this.right=(((t=document.getElementsByClassName("available-layers-show")[0])==null?void 0:t.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 t=new Date().valueOf();let e=0,a=0;this.handleDraw(),a=new Date().valueOf()-(t+e),console.log("[wind-particle] add elapsed: ",a,", total: ",e+=a)}},handleClear(){var t,e,a,o,r,s,l;(t=this.viewport)==null||t.toggle(!1),this.context=void 0,this.particleContext=void 0,this.etime=void 0,this.initial=!0,(a=(e=this.viewport)==null?void 0:e.map)==null||a.off("resize",this.handleResize),(r=(o=this.viewport)==null?void 0:o.map)==null||r.off("movestart",this.handlePause),(l=(s=this.viewport)==null?void 0:s.map)==null||l.off("moveend",this.handlePlay),this.handlePause()},handleSetup(){if(!this.context){this.context=this.viewport.rampColorCanvas.getContext("webgl");const t=[[0,"rgb(98, 113, 184, 0.8)"],[12/255,"rgb(98, 113, 184)"],[24/255,"rgb(61, 110, 163)"],[32/255,"rgb(74, 146, 148)"],[40/255,"rgb(77, 142, 124)"],[60/255,"rgb(76, 164, 76)"],[80/255,"rgb(103, 164, 54)"],[100/255,"rgb(162, 135, 64)"],[120/255,"rgb(162, 109, 92)"],[140/255,"rgb(141, 63, 92)"],[160/255,"rgb(151, 75, 145)"],[200/255,"rgb(95, 100, 160)"],[240/255,"rgb(91, 136, 161)"],[1,"rgb(91, 136, 161)"]];this.rampColor=this.webgl.setup(this.context,t);const{program:e,aPositionBuffer:a}=this.webgl.bind(this.context,I.vertexSchema,I.uvFragmentSchema);this.program=e,this.aPositionBuffer=a}this.handleParticleSetup()},handleParticleSetup(){if(!this.particleContext){this.particleContext=this.viewport.particleCanvas.getContext("webgl");const t=[[0,"rgb(205,255,255)"],[1,"rgb(235,255,255)"]];this.wrapper=this.webgl.bindParticle(this.particleContext,D.vertexSchema,D.fragmentSchema,D.quadVertSchema,D.screenFragmentSchema,D.updateFragmentSchema),this.wrapper.color=this.webgl.setup(this.particleContext,t,!0,16,16),this.wrapper={...this.wrapper,...this.webgl.setupParticle(this.particleContext,9e3),...this.webgl.resize(this.viewport,this.particleContext)},this.viewport.map.on("resize",this.handleResize),this.viewport.map.on("movestart",this.handlePause),this.viewport.map.on("moveend",this.handlePlay)}},async handleDraw(){if(this.handleSetup(),this.etime!==this.factor.etime){this.etime=this.factor.etime;const t=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,t),this.particleTexture=this.webgl.createTexture(this.particleContext,this.particleContext.NEAREST,this.particleContext.LINEAR,this.particleContext.CLAMP_TO_EDGE,t),this.wrapper.image=t}this.initial&&(this.initial=!1,this.handlePlay()),this.webgl.draw(this.viewport,this.context,this.program,this.texture,this.rampColor.texture,this.aPositionBuffer,this.particleOptions),this.viewport.toggle(!0)},handleResize(){this.wrapper={...this.wrapper,...this.webgl.resize(this.viewport,this.particleContext)}},handlePause(){this.paused=!0,this.animation&&(cancelAnimationFrame(this.animation),this.viewport.toggleParticle(!1))},handlePlay(){this.paused=!1,this.animation=requestAnimationFrame(()=>{this.webgl.drawParticle(this.viewport,this.particleContext,this.particleTexture,this.wrapper,this.particleOptions),this.viewport.toggleParticle(!0),this.handlePlay()})}}},G=t=>(i.pushScopeId("data-v-b7e5940e"),t=t(),i.popScopeId(),t),Et={key:0},xt=[G(()=>i.createElementVNode("span",null,"kts",-1)),G(()=>i.createElementVNode("span",null,"0",-1)),G(()=>i.createElementVNode("span",null,"5",-1)),G(()=>i.createElementVNode("span",null,"10",-1)),G(()=>i.createElementVNode("span",null,"20",-1)),G(()=>i.createElementVNode("span",null,"30",-1)),G(()=>i.createElementVNode("span",null,"40",-1)),G(()=>i.createElementVNode("span",null,"60",-1))];function Ct(t,e,a,o,r,s){var l;return(l=a.factor)!=null&&l.active?(i.openBlock(),i.createElementBlock("div",Et,[i.createElementVNode("div",{class:"legend-bars flex-center",style:i.normalizeStyle([{position:"absolute"},{right:r.right+"px",bottom:a.bottom}])},xt,4)])):i.createCommentVNode("",!0)}const St=C(vt,[["render",Ct],["__scopeId","data-v-b7e5940e"]]),jr="",kt={name:"IdmCurrent",props:{map:{type:Object},current:{type:Object},beforeLayer:{type:String},showParticle:{type:Boolean,default:!1},marginBottom:{type:String,default:"30px"},toggleVersion:{type:Number},weatherLayers:{type:Object}},emits:["particle"],data(){return{source:"current-source",directionLayer:"current-direction-layer",speedLayer:"current-speed-layer",speedLabelLayer:"current-speed-label-layer",empty:E.featureCollection([]),showJson:!1,right:10,bottom:95}},watch:{"current.version":{handler(){var t;(t=this.current)!=null&&t.active?this.handleRender():this.handleClear()},deep:!0},showParticle:{handler(){this.showJson=!this.showParticle},immediate:!0},showJson:{handler(){this.handleToggle()},immediate:!0},toggleVersion:{handler(){var t,e;this.right=(((t=document.getElementsByClassName("available-layers-show")[0])==null?void 0:t.clientWidth)||0)+(((e=document.getElementsByClassName("fleet-list-container")[0])==null?void 0:e.clientWidth)||0)+10},immediate:!0},weatherLayers:{handler(){var t;this.bottom=(((t=document.getElementsByClassName("active-layers")[0])==null?void 0:t.clientHeight)||0)+105},immediate:!0}},methods:{handleParticle(){this.$emit("particle",{particle:!this.showParticle,key:"current",weight:96})},handleRender(){var t,e;if(!this.map)setTimeout(()=>{this.handleRender()},500);else if(this.current){const a=new Date().valueOf();let o=0,r=0,s=this.empty;this.current.active&&(s=this.current.data),(t=this.map)!=null&&t.getSource(this.source)?((e=this.map)==null||e.getSource(this.source).setData(s),r=new Date().valueOf()-(a+o),console.log("[current] update elapsed: ",r,", total: ",o+=r)):(this.map.addSource(this.source,{type:"geojson",data:s}),this.map.addLayer({id:this.speedLayer,type:"fill",source:this.source,filter:["==","$type","Polygon"],paint:{"fill-outline-color":"silver","fill-opacity":.5,"fill-color":["step",["get","val"],"#e1ffb3",1,"#ffff00",3,"#ff9500",4,"#f44336",5,"#f44336"]}},this.beforeLayer),this.map.addLayer({id:this.speedLabelLayer,type:"symbol",source:this.source,filter:["==","$type","Polygon"],layout:{"symbol-placement":"line","text-field":"{val} kts","text-allow-overlap":!0,"text-rotation-alignment":"viewport","text-size":12},paint:{"text-color":"rgba(0, 0, 0, 0.8)"}},this.beforeLayer),this.map.addLayer({id:this.directionLayer,type:"symbol",source:this.source,filter:["==","$type","Point"],layout:{"symbol-placement":"point","icon-image":"arrow-red","icon-size":["interpolate",["linear"],["get","spd"],.5,.14,3,.28],"icon-offset":[0,-20],"icon-allow-overlap":!0,"icon-rotation-alignment":"map","icon-rotate":{property:"val",stops:[[0,0],[360,360]]}},paint:{"icon-opacity":.6}},this.beforeLayer),r=new Date().valueOf()-(a+o),console.log("[current] add elapsed: ",r,", total: ",o+=r)),this.handleToggle()}},handleToggle(){this.map.getLayer(this.speedLayer)&&this.map.setLayoutProperty(this.speedLayer,"visibility",this.showJson?"visible":"none"),this.map.getLayer(this.speedLabelLayer)&&this.map.setLayoutProperty(this.speedLabelLayer,"visibility",this.showJson?"visible":"none"),this.map.getLayer(this.directionLayer)&&this.map.setLayoutProperty(this.directionLayer,"visibility",this.showJson?"visible":"none")},handleClear(){this.map.getLayer(this.speedLayer)&&this.map.removeLayer(this.speedLayer),this.map.getLayer(this.speedLabelLayer)&&this.map.removeLayer(this.speedLabelLayer),this.map.getLayer(this.directionLayer)&&this.map.removeLayer(this.directionLayer),this.map.getSource(this.source)&&this.map.removeSource(this.source)}}},Pt={key:0},Nt={key:0,class:"iconfont active"},Tt={key:1,class:"iconfont"},Vt={key:0,class:"iconfont active"},It={key:1,class:"iconfont"};function $t(t,e,a,o,r,s){var l;return(l=a.current)!=null&&l.active?(i.openBlock(),i.createElementBlock("div",Pt,[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))},[a.showParticle?(i.openBlock(),i.createElementBlock("i",Nt,"")):(i.openBlock(),i.createElementBlock("i",Tt,"")),i.createElementVNode("span",{class:i.normalizeClass(a.showParticle?"active":"")},"Current Particles",2)]),a.showParticle?(i.openBlock(),i.createElementBlock("div",{key:0,class:"flex-start",style:{"margin-left":"16px"},onClick:e[1]||(e[1]=n=>r.showJson=!r.showJson)},[r.showJson?(i.openBlock(),i.createElementBlock("i",Vt,"")):(i.openBlock(),i.createElementBlock("i",It,"")),i.createElementVNode("span",{class:i.normalizeClass(r.showJson?"active":"")},"Current",2)])):i.createCommentVNode("",!0)],4)])):i.createCommentVNode("",!0)}const Rt=C(kt,[["render",$t],["__scopeId","data-v-ce5e09b8"]]),Fr="",Dt={name:"IdmCurrentParticle",props:{factor:{type:Object},viewport:{type:ve},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,wrapper:void 0,animation:void 0,particleContext:void 0,particleTexture:void 0,particleOptions:{fadeOpacity:.96,speedFactor:4,dropRate:.005,dropRateBump:.01,uvRange:[-2.5,2.6],sRange:[0,3]},paused:!1,initial:!0,right:10}},watch:{"factor.version":{handler(){var t;(t=this.factor)!=null&&t.active?this.handleRender():this.handleClear()},deep:!0},toggleVersion:{handler(){var t,e;this.right=(((t=document.getElementsByClassName("available-layers-show")[0])==null?void 0:t.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 t=new Date().valueOf();let e=0,a=0;this.handleDraw(),a=new Date().valueOf()-(t+e),console.log("[current-particle] add elapsed: ",a,", total: ",e+=a)}},handleClear(){var t,e,a,o,r,s,l;(t=this.viewport)==null||t.toggle(!1),this.context=void 0,this.particleContext=void 0,this.etime=void 0,this.initial=!0,(a=(e=this.viewport)==null?void 0:e.map)==null||a.off("resize",this.handleResize),(r=(o=this.viewport)==null?void 0:o.map)==null||r.off("movestart",this.handlePause),(l=(s=this.viewport)==null?void 0:s.map)==null||l.off("moveend",this.handlePlay),this.handlePause()},handleSetup(){if(!this.context){this.context=this.viewport.rampColorCanvas.getContext("webgl");const t=[[0/255,"rgba(95, 143, 197,1)"],[5/255,"rgba(64,127,115,1)"],[10/255,"rgb(58,164,58)"],[15/255,"rgb(191,182,67)"],[20/255,"rgb(197,154,68)"],[30/255,"rgb(160,70,94)"],[40/255,"rgb(138,84,166)"],[45/255,"rgb(82,113,165)"],[50/255,"rgb(84,142,152)"],[65/255,"rgb(150,181,184)"],[80/255,"rgb(195,194,194)"],[254/255,"rgb(195,194,194)"],[1,"rgb(195,194,194)"]];this.rampColor=this.webgl.setup(this.context,t);const{program:e,aPositionBuffer:a}=this.webgl.bind(this.context,I.vertexSchema,I.uvFragmentSchema);this.program=e,this.aPositionBuffer=a}this.handleParticleSetup()},handleParticleSetup(){if(!this.particleContext){this.particleContext=this.viewport.particleCanvas.getContext("webgl");const t=[[0,"rgb(205,255,255)"],[1,"rgb(235,255,255)"]];this.wrapper=this.webgl.bindParticle(this.particleContext,D.vertexSchema,D.fragmentSchema,D.quadVertSchema,D.screenFragmentSchema,D.updateFragmentSchema),this.wrapper.color=this.webgl.setup(this.particleContext,t,!0,16,16),this.wrapper={...this.wrapper,...this.webgl.setupParticle(this.particleContext,12e3),...this.webgl.resize(this.viewport,this.particleContext)},this.viewport.map.on("resize",this.handleResize),this.viewport.map.on("movestart",this.handlePause),this.viewport.map.on("moveend",this.handlePlay)}},async handleDraw(){if(this.handleSetup(),this.etime!==this.factor.etime){this.etime=this.factor.etime;const t=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,t),this.particleTexture=this.webgl.createTexture(this.particleContext,this.particleContext.NEAREST,this.particleContext.LINEAR,this.particleContext.CLAMP_TO_EDGE,t),this.wrapper.image=t}this.initial&&(this.initial=!1,this.handlePlay()),this.webgl.draw(this.viewport,this.context,this.program,this.texture,this.rampColor.texture,this.aPositionBuffer,this.particleOptions),this.viewport.toggle(!0)},handleResize(){this.wrapper={...this.wrapper,...this.webgl.resize(this.viewport,this.particleContext)}},handlePause(){this.paused=!0,this.animation&&(cancelAnimationFrame(this.animation),this.viewport.toggleParticle(!1))},handlePlay(){this.paused=!1,this.animation=requestAnimationFrame(()=>{this.webgl.drawParticle(this.viewport,this.particleContext,this.particleTexture,this.wrapper,this.particleOptions),this.viewport.toggleParticle(!0),this.handlePlay()})}}},K=t=>(i.pushScopeId("data-v-911e159b"),t=t(),i.popScopeId(),t),Bt={key:0},At=[K(()=>i.createElementVNode("span",null,"kts",-1)),K(()=>i.createElementVNode("span",null,"0",-1)),K(()=>i.createElementVNode("span",null,"0.4",-1)),K(()=>i.createElementVNode("span",null,"0.8",-1)),K(()=>i.createElementVNode("span",null,"1.6",-1)),K(()=>i.createElementVNode("span",null,"2",-1)),K(()=>i.createElementVNode("span",null,"3.2",-1))];function zt(t,e,a,o,r,s){var l;return(l=a.factor)!=null&&l.active?(i.openBlock(),i.createElementBlock("div",Bt,[i.createElementVNode("div",{class:"legend-bars flex-center",style:i.normalizeStyle([{position:"absolute"},{right:r.right+"px",bottom:a.bottom}])},At,4)])):i.createCommentVNode("",!0)}const Mt=C(Dt,[["render",zt],["__scopeId","data-v-911e159b"]]),Ot={name:"IdmSigWave",props:{map:{type:Object},sigWave:{type:Object},beforeLayer:{type:String}},data(){return{source:"sig-wave-source",heightLayer:"sig-wave-height-layer",heightLabelLayer:"sig-wave-height-label-layer",empty:E.featureCollection([])}},watch:{"sigWave.version":{handler(){var t;(t=this.sigWave)!=null&&t.active?this.handleRender():this.handleClear()},deep:!0}},methods:{handleRender(){var t,e;if(!this.map)setTimeout(()=>{this.handleRender()},500);else if(this.sigWave){const a=new Date().valueOf();let o=0,r=0,s=this.empty;this.sigWave.active&&(s=this.sigWave.data),(t=this.map)!=null&&t.getSource(this.source)?((e=this.map)==null||e.getSource(this.source).setData(s),r=new Date().valueOf()-(a+o),console.log("[sig.wave] update elapsed: ",r,", total: ",o+=r)):(this.map.addSource(this.source,{type:"geojson",data:s}),this.map.addLayer({id:this.heightLayer,type:"fill",source:this.source,filter:["==","$type","Polygon"],layout:{"fill-sort-key":["get","val"]},paint:{"fill-outline-color":"#888","fill-opacity":.6,"fill-color":["step",["get","val"],"#7bf9f7",3,"#7bf9d1",4,"#81f98d",5,"#c2fb63",6,"#ffff63",7,"#fcd95a",8,"#fca157",9,"#fc5d5d",10,"#f72f7a",11,"#f259f2",12,"#d118b3",13,"#780178"]}},this.beforeLayer),this.map.addLayer({id:this.heightLabelLayer,type:"symbol",source:this.source,filter:["==","$type","Polygon"],layout:{"symbol-placement":"line","symbol-avoid-edges":!0,"symbol-sort-key":["get","val"],"text-field":"{val} m","text-rotation-alignment":"viewport","text-size":10},paint:{"text-opacity":.7}},this.beforeLayer),r=new Date().valueOf()-(a+o),console.log("[sig.wave] add elapsed: ",r,", total: ",o+=r))}},handleClear(){this.map.getLayer(this.heightLayer)&&this.map.removeLayer(this.heightLayer),this.map.getLayer(this.heightLabelLayer)&&this.map.removeLayer(this.heightLabelLayer),this.map.getSource(this.source)&&this.map.removeSource(this.source)}}};function Wt(t,e,a,o,r,s){return i.openBlock(),i.createElementBlock("div")}const jt=C(Ot,[["render",Wt]]),Ft={name:"IdmSwell",props:{map:{type:Object},swell:{type:Object},beforeLayer:{type:String}},data(){return{source:"swell-source",directionLayer:"swell-direction-layer",heightLayer:"swell-height-layer",heightLabelLayer:"swell-height-label-layer",empty:E.featureCollection([])}},watch:{"swell.version":{handler(){var t;(t=this.swell)!=null&&t.active?this.handleRender():this.handleClear()},deep:!0}},methods:{handleRender(){var t,e;if(!this.map)setTimeout(()=>{this.handleRender()},500);else if(this.swell){const a=new Date().valueOf();let o=0,r=0,s=this.empty;this.swell.active&&(s=this.swell.data),(t=this.map)!=null&&t.getSource(this.source)?((e=this.map)==null||e.getSource(this.source).setData(s),r=new Date().valueOf()-(a+o),console.log("[swell] update elapsed: ",r,", total: ",o+=r)):(this.map.addSource(this.source,{type:"geojson",data:s}),this.map.addLayer({id:this.heightLayer,type:"line",source:this.source,filter:["==","$type","LineString"],paint:{"line-opacity":1,"line-width":2,"line-color":["match",["get","val"],2,"rgba(255,255,0,0.9)",3,"rgba(255,149,0,0.9)",4,"rgba(244,67,54,0.9)",5,"rgba(162,2,31,0.9)",6,"rgba(162,2,31,0.9)","rgba(162,2,31,0.9)"]}},this.beforeLayer),this.map.addLayer({id:this.heightLabelLayer,type:"symbol",source:this.source,filter:["==","$type","LineString"],layout:{"symbol-placement":"line","text-rotation-alignment":"viewport","text-field":"{val}M","text-size":12},paint:{"text-color":["step",["get","val"],"black",4,"white",5,"white",6,"white"],"text-halo-color":["match",["get","val"],2,"rgba(255,255,0,0.7)",3,"rgba(255,149,0,0.7)",4,"rgba(244,67,54,0.7)",5,"rgba(162,13,2,0.7)",6,"rgba(162,13,2,0.7)","rgba(162,13,2,0.7)"],"text-halo-width":4}}),this.map.addLayer({id:this.directionLayer,type:"symbol",source:this.source,filter:["==","$type","Point"],layout:{"symbol-placement":"point","icon-image":"arrow-yellow","icon-size":{base:1,stops:[[2,.14],[6,.28]]},"icon-offset":[0,-20],"icon-allow-overlap":!0,"icon-rotation-alignment":"map","icon-rotate":{property:"val",stops:[[0,180],[360,540]]}},paint:{"icon-opacity":.8}},this.beforeLayer),r=new Date().valueOf()-(a+o),console.log("[swell] add elapsed: ",r,", total: ",o+=r))}},handleClear(){this.map.getLayer(this.heightLayer)&&this.map.removeLayer(this.heightLayer),this.map.getLayer(this.heightLabelLayer)&&this.map.removeLayer(this.heightLabelLayer),this.map.getLayer(this.directionLayer)&&this.map.removeLayer(this.directionLayer),this.map.getSource(this.source)&&this.map.removeSource(this.source)}}};function Ut(t,e,a,o,r,s){return i.openBlock(),i.createElementBlock("div")}const Ht=C(Ft,[["render",Ut]]),Gt={name:"IdmPrmsl",props:{map:{type:Object},prmsl:{type:Object},beforeLayer:{type:String}},data(){return{source:"prmsl-source",layer:"prmsl-layer",labelLayer:"prmsl-label-layer",pointLabelLayer:"prmsl-point-label-layer",empty:E.featureCollection([])}},watch:{"prmsl.version":{handler(){var t;(t=this.prmsl)!=null&&t.active?this.handleRender():this.handleClear()},deep:!0}},methods:{handleRender(){var t,e,a;if(!this.map)setTimeout(()=>{this.handleRender()},500);else if(this.prmsl){const o=new Date().valueOf();let r=0,s=0,l=this.empty;this.prmsl.active&&(l=this.prmsl.data),(t=this.map)!=null&&t.getSource(this.source)?((e=this.map)==null||e.getSource(this.source).setData(l),s=new Date().valueOf()-(o+r),console.log("[prmsl] update elapsed: ",s,", total: ",r+=s)):(this.map.addSource(this.source,{type:"geojson",data:l}),this.map.addLayer({id:this.layer,type:"line",source:this.source,filter:["==","$type","LineString"],paint:{"line-color":["step",["get","val"],"rgba(162,13,2,1)",920,"rgba(244,67,54,1)",980,"rgba(255,255,0,1)",1100,"rgba(199,171,250,1)"],"line-width":1,"line-opacity":1}},this.beforeLayer),(a=this.map)==null||a.addLayer({id:this.labelLayer,type:"symbol",source:this.source,minzoom:4,filter:["==","$type","LineString"],layout:{"symbol-placement":"line","text-rotation-alignment":"viewport","text-field":"{val}","text-size":12},paint:{"text-color":"black","text-opacity":.7}},this.beforeLayer),setTimeout(()=>{this.map.addLayer({id:this.pointLabelLayer,type:"symbol",source:this.source,filter:["==","$type","Point"],layout:{"symbol-placement":"point","text-field":["format",["get","type"],{"font-scale":1.03},`
190
- `,["get","val"],{"font-scale":1}],"text-rotation-alignment":"map","text-line-height":1.3,"text-size":12},paint:{"text-opacity":1,"text-color":["step",["get","val"],"white",980,"black",1100,"black"],"text-halo-color":["step",["get","val"],"rgba(162,13,2,0.9)",920,"rgba(244,67,54,0.9)",980,"rgba(255,255,0,0.9)",1100,"rgba(199,171,250,0.9)"],"text-halo-width":4}},this.beforeLayer)},1e3),s=new Date().valueOf()-(o+r),console.log("[prmsl] add elapsed: ",s,", total: ",r+=s))}},handleClear(){this.map.getLayer(this.pointLabelLayer)&&this.map.removeLayer(this.pointLabelLayer),this.map.getLayer(this.labelLayer)&&this.map.removeLayer(this.labelLayer),this.map.getLayer(this.layer)&&this.map.removeLayer(this.layer),this.map.getSource(this.source)&&this.map.removeSource(this.source)}}};function Xt(t,e,a,o,r,s){return i.openBlock(),i.createElementBlock("div")}const Zt=C(Gt,[["render",Xt]]),Jt={name:"IdmIceberg",props:{map:{type:Object},iceberg:{type:Object},beforeLayer:{type:String}},data(){return{source:"iceberg-source",layer:"iceberg-layer",empty:E.featureCollection([])}},watch:{"iceberg.version":{handler(){var t;(t=this.iceberg)!=null&&t.active?this.handleRender():this.handleClear()},deep:!0}},methods:{handleRender(){var t,e;if(!this.map)setTimeout(()=>{this.handleRender()},500);else if(this.iceberg){const a=new Date().valueOf();let o=0,r=0,s=this.empty;this.iceberg.active&&(s=this.iceberg.data),(t=this.map)!=null&&t.getSource(this.source)?((e=this.map)==null||e.getSource(this.source).setData(s),r=new Date().valueOf()-(a+o),console.log("[iceberg] update elapsed: ",r,", total: ",o+=r)):(this.map.addSource(this.source,{type:"geojson",data:s}),this.map.addLayer({id:this.layer,type:"line",source:this.source,filter:["==","$type","LineString"],paint:{"line-color":"rgba(255,255,255, 0.8)","line-width":2,"line-opacity":1}}),r=new Date().valueOf()-(a+o),console.log("[iceberg] add elapsed: ",r,", total: ",o+=r))}},handleClear(){this.map.getLayer(this.layer)&&this.map.removeLayer(this.layer),this.map.getSource(this.source)&&this.map.removeSource(this.source)}}};function qt(t,e,a,o,r,s){return i.openBlock(),i.createElementBlock("div")}const Yt=C(Jt,[["render",qt]]),Yr="",Kt={name:"IdmTropicals",props:{map:{type:Object},tropicals:{type:Object},date:{type:String}},emits:["tropical"],data(){return{source:"tropicals-source",clusterSource:"tropicals-cluster-source",historyLayer:"tropicals-history-layer",forecastLayer:"tropicals-forecast-layer",forecastModelLayer:"tropicals-forecast-model-layer",forecastNameLayer:"tropicals-forecast-name-layer",pointCircleLayer:"tropicals-point-circle-layer",pointLabelLayer:"tropicals-point-label-layer",historyPointCircleLayer:"history-tropicals-point-circle-layer",historyPointLabelLayer:"history-tropicals-point-label-layer",interpolateData:[],interpolateMarkers:[],interpolateSource:"tropicals-interpolate-source",interpolateLineLayer:"tropicals-interpolate-line-layer",showTropicals:!1,activeTropicals:void 0,activeTropicalsMarker:void 0,empty:E.featureCollection([])}},computed:{computeTime(){return function(t){if(t){const e=O(t).utc();return`${e.format("MMM-DD,HHmm[Z]")} (${e==null?void 0:e.fromNow()})`}return"-"}}},watch:{"tropicals.active":{handler(){this.handleInit()},immediate:!0},showTropicals:{handler(){this.$emit("tropical",this.showTropicals)},immediate:!0},"tropicals.version":{handler(){var o,r;const t=((r=(o=this.tropicals)==null?void 0:o.data)==null?void 0:r.features)||[],e=O().utc().hour(),a=[];t.forEach(s=>{var l,n,c;(l=s.properties)!=null&&l.name&&!a.includes((n=s.properties)==null?void 0:n.name)&&a.push((c=s.properties)==null?void 0:c.name)}),a.forEach(s=>{var d;let l=0,n,c="",h="";const y=t.filter(m=>{var f,u;return((u=(f=m.properties)==null?void 0:f.category)==null?void 0:u.split("-")[0])===s});c=(d=y.filter(m=>{var f,u;return((f=m.geometry)==null?void 0:f.type)==="LineString"&&((u=m.properties)==null?void 0:u.type)==="forecast"})[0])==null?void 0:d.properties.model,y.forEach((m,f)=>{var u,g,p,b,_,w;((u=m.geometry)==null?void 0:u.type)==="Point"&&((g=m.properties)==null?void 0:g.type)==="history"&&(l=f,n=n===void 0?f:n),((p=m.geometry)==null?void 0:p.type)==="Point"&&((b=m.properties)==null?void 0:b.type)==="forecast"&&n===void 0&&(n=f),((_=m.geometry)==null?void 0:_.type)==="LineString"&&((w=m.properties)==null?void 0:w.type)==="forecast"&&(h=`${s}-${c}`)}),y.map((m,f)=>{var u,g,p,b,_,w,x,L,S,N;if(((u=m.geometry)==null?void 0:u.type)==="LineString"&&((g=m.properties)==null?void 0:g.type)==="forecast"&&(m.properties.disabled=((p=m.properties)==null?void 0:p.model)!==c),((b=m.geometry)==null?void 0:b.type)==="Point"&&((_=m.properties)==null?void 0:_.type)==="forecast"&&(m.properties.disabled=((w=m.properties)==null?void 0:w.category)!==h,m.properties.name=s),((x=m.geometry)==null?void 0:x.type)==="Point"&&((L=m.properties)==null?void 0:L.type)==="history"){const T=((N=(S=m.properties)==null?void 0:S.format)==null?void 0:N.slice(7,12))===O().utc().hour(Math.floor(e/6)*6).minute("00").format("HHmm")+"Z";m.properties.showHistoryLabel=T||f===l,m.properties.showNameLabel=f===l,m.properties.name=s}return m})}),this.handleInit()}}},methods:{handleInit(){var t,e;this.tropicals&&this.tropicals.active?(this.handleRender(),(t=this.map)==null||t.on("click",[this.forecastNameLayer,this.forecastLayer,this.historyLayer,this.forecastModelLayer,this.pointCircleLayer,this.pointLabelLayer,this.historyPointCircleLayer,this.historyPointLabelLayer],this.handleClick)):(this.handleClear(),(e=this.map)==null||e.off("click",[this.forecastNameLayer,this.forecastLayer,this.historyLayer,this.forecastModelLayer,this.pointCircleLayer,this.pointLabelLayer,this.historyPointCircleLayer,this.historyPointLabelLayer],this.handleClick))},handleRender(){var t,e,a,o,r,s,l,n,c,h,y;if(!this.map)setTimeout(()=>{this.handleRender()},500);else{if(this.tropicals){const d=new Date().valueOf();let m=0,f=0;(t=this.map)!=null&&t.getSource(this.source)?((a=this.map)==null||a.getSource(this.source).setData((e=this.tropicals)!=null&&e.active?this.tropicals.data:this.empty),f=new Date().valueOf()-(d+m),console.log("[tropicals] update elapsed: ",f,", total: ",m+=f)):(this.map.addSource(this.source,{type:"geojson",data:(o=this.tropicals)!=null&&o.active?(r=this.tropicals)==null?void 0:r.data:this.empty}),this.map.addLayer({id:this.historyLayer,type:"line",source:this.source,filter:["all",["==","$type","LineString"],["==","type","history"],["!=","disabled",!0]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#000","line-width":4,"line-opacity":.5}}),this.map.addLayer({id:this.forecastLayer,type:"line",source:this.source,filter:["all",["==","$type","LineString"],["==","type","forecast"],["!=","disabled",!0]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":["match",["get","model"],"cma","#e2ea03","jma","#01d2b7","ecmwf","#f582f2","ukm","#4783f5","noaa-at","#9758fb","noaa-ep","#9758fb","#fff"],"line-width":3,"line-opacity":.9,"line-dasharray":[1,2]}}),this.map.addLayer({id:this.forecastModelLayer,type:"symbol",source:this.source,filter:["all",["==","$type","LineString"],["==","type","forecast"],["!=","disabled",!0]],layout:{"symbol-placement":"line","text-field":"{model}","text-rotation-alignment":"viewport","text-size":13},paint:{"text-color":["match",["get","model"],"cma","#000","jma","#000","ecmwf","#fff","ukm","#fff","noaa-at","#fff","noaa-ep","#fff","#fff"],"text-opacity":1,"text-halo-color":["match",["get","model"],"cma","#e2ea03","jma","#01d2b7","ecmwf","#f582f2","ukm","#4783f5","noaa-at","#9758fb","noaa-ep","#9758fb","#fff"],"text-halo-width":4}}),f=new Date().valueOf()-(d+m),console.log("[tropical] add elapsed: ",f,", total: ",m+=f)),(s=this.map)!=null&&s.getSource(this.clusterSource)?((n=this.map)==null||n.getSource(this.clusterSource).setData((l=this.tropicals)!=null&&l.active?this.tropicals.data:this.empty),f=new Date().valueOf()-(d+m),console.log("[tropical] update elapsed: ",f,", total: ",m+=f)):(this.map.addSource(this.clusterSource,{type:"geojson",data:(c=this.tropicals)!=null&&c.active?(h=this.tropicals)==null?void 0:h.data:this.empty}),this.map.addLayer({id:this.pointCircleLayer+"-border",type:"circle",source:this.clusterSource,filter:["all",["==","$type","Point"],["==","type","forecast"],["!=","disabled",!0]],paint:{"circle-radius":6,"circle-color":"#fff"}}),this.map.addLayer({id:this.pointCircleLayer,type:"circle",source:this.clusterSource,filter:["all",["==","$type","Point"],["==","type","forecast"],["!=","disabled",!0]],paint:{"circle-radius":4,"circle-color":["case",["boolean",["<",["get","spd",["get","wind"]],17.2]],"#03f869",["boolean",["<=",["get","spd",["get","wind"]],24.5]],"#f2f202",["boolean",["<=",["get","spd",["get","wind"]],32.7]],"#ff9100",["boolean",["<=",["get","spd",["get","wind"]],41.5]],"#f44336",["boolean",["<",["get","spd",["get","wind"]],51]],"#c604a4",["boolean",[">=",["get","spd",["get","wind"]],51]],"#6b05bb","#fff"]}}),this.map.addLayer({id:this.pointLabelLayer,type:"symbol",source:this.clusterSource,filter:["all",["==","$type","Point"],["==","type","forecast"],["!=","disabled",!0]],layout:{"text-field":["get","format"],"text-offset":[0,-.5],"text-anchor":"bottom-left","text-size":12},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-color":"#fff","text-halo-width":1}}),this.map.addLayer({id:this.historyPointCircleLayer+"-border",type:"circle",source:this.clusterSource,filter:["all",["==","$type","Point"],["==","type","history"],["==","showHistoryLabel",!0],["!=","disabled",!0]],paint:{"circle-radius":8,"circle-color":"#fff"}}),this.map.addLayer({id:this.historyPointCircleLayer,type:"circle",source:this.clusterSource,filter:["all",["==","$type","Point"],["==","type","history"],["==","showHistoryLabel",!0],["!=","disabled",!0]],paint:{"circle-radius":6,"circle-color":"rgba(0,0,0,0.7)"}}),this.map.addLayer({id:this.historyPointCircleLayer+"-inner",type:"circle",source:this.clusterSource,filter:["all",["==","$type","Point"],["==","type","history"],["==","showHistoryLabel",!0],["!=","disabled",!0]],paint:{"circle-radius":4,"circle-color":"#fff"}}),this.map.addLayer({id:this.historyPointLabelLayer,type:"symbol",source:this.clusterSource,filter:["all",["==","$type","Point"],["==","type","history"],["==","showHistoryLabel",!0],["!=","disabled",!0]],layout:{"text-field":["get","format"],"text-offset":[0,-.5],"text-anchor":"bottom-left","text-size":14},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-color":"#fff","text-halo-width":1}}),this.map.addLayer({id:this.forecastNameLayer,type:"symbol",source:this.clusterSource,filter:["all",["==","$type","Point"],["==","type","history"],["==","showNameLabel",!0]],layout:{"text-field":["get","name"],"text-offset":[0,1.5],"text-anchor":"bottom","text-size":16,"text-allow-overlap":!0,"text-ignore-placement":!0},paint:{"text-color":"#fff","text-halo-color":"#146bf5","text-halo-width":4}}),f=new Date().valueOf()-(d+m),console.log("[tropical] add elapsed: ",f,", total: ",m+=f))}if(!((y=this.tropicals)!=null&&y.cached)){const d=ke.TropicalHelper.interpolate(this.tropicals,1),m=JSON.parse(JSON.stringify(d)),f=[];m.forEach(u=>{var g,p,b;(g=u.properties)!=null&&g.name&&!f.includes((p=u.properties)==null?void 0:p.name)&&f.push((b=u.properties)==null?void 0:b.name)}),f.forEach(u=>{var b;const p=(b=m.filter(_=>{var w;return((w=_.properties)==null?void 0:w.name)===u})[0])==null?void 0:b.properties.model;m.map((_,w)=>{var x,L;return((x=_.properties)==null?void 0:x.name)===u&&(_.properties.disabled=((L=_.properties)==null?void 0:L.model)!==p),_})}),this.interpolateData=JSON.parse(JSON.stringify(m))}this.handleDateChange()}},handleClear(){var t;this.map&&(this.map.getLayer(this.historyLayer)&&this.map.removeLayer(this.historyLayer),this.map.getLayer(this.forecastLayer)&&this.map.removeLayer(this.forecastLayer),this.map.getLayer(this.forecastModelLayer)&&this.map.removeLayer(this.forecastModelLayer),this.map.getLayer(this.forecastNameLayer)&&this.map.removeLayer(this.forecastNameLayer),this.map.getLayer(this.pointCircleLayer)&&this.map.removeLayer(this.pointCircleLayer),this.map.getLayer(this.pointCircleLayer+"-border")&&this.map.removeLayer(this.pointCircleLayer+"-border"),this.map.getLayer(this.pointLabelLayer)&&this.map.removeLayer(this.pointLabelLayer),this.map.getLayer(this.historyPointCircleLayer)&&this.map.removeLayer(this.historyPointCircleLayer),this.map.getLayer(this.historyPointCircleLayer+"-border")&&this.map.removeLayer(this.historyPointCircleLayer+"-border"),this.map.getLayer(this.historyPointCircleLayer+"-inner")&&this.map.removeLayer(this.historyPointCircleLayer+"-inner"),this.map.getLayer(this.historyPointLabelLayer)&&this.map.removeLayer(this.historyPointLabelLayer),this.map.getLayer(this.interpolateLineLayer)&&this.map.removeLayer(this.interpolateLineLayer),(t=this.interpolateMarkers)==null||t.forEach(e=>e==null?void 0:e.remove()),this.map.getSource(this.source)&&this.map.removeSource(this.source),this.map.getSource(this.clusterSource)&&this.map.removeSource(this.clusterSource),this.map.getSource(this.interpolateSource)&&this.map.removeSource(this.interpolateSource))},handleDateChange(){var t,e,a,o,r,s,l,n,c,h,y,d,m,f,u,g,p,b,_,w,x,L,S,N,T,$,R,z;if((t=this.interpolateMarkers)==null||t.forEach(M=>M==null?void 0:M.remove()),(e=this.interpolateData)!=null&&e.length&&this.tropicals.active){const M=O(this.date).utc().set({minute:0,second:0,millisecond:0}),J=this.interpolateData.filter(P=>P.properties.date===M.format()&&!P.properties.disabled),ie=this.handleComputePolygons(J),q=E.featureCollection([...J]);ie.forEach(P=>{q.features.push(P)}),(a=this.map)!=null&&a.getSource(this.interpolateSource)?(o=this.map)==null||o.getSource(this.interpolateSource).setData(q):((r=this.map)==null||r.addSource(this.interpolateSource,{type:"geojson",data:q}),(s=this.map)==null||s.addLayer({id:this.interpolateLineLayer,type:"line",source:this.interpolateSource,filter:["all",["==","$type","Polygon"],["!=","disabled",!0]],paint:{"line-opacity":1,"line-color":["match",["get","level"],7,"#ff9500",10,"#f74468","#ffffff"],"line-width":2}})),this.interpolateMarkers=[];for(const P of J)if(!P.properties.disabled){let B="#f44336";((n=(l=P.properties)==null?void 0:l.wind)==null?void 0:n.spd)<17.2?B="#03f869":((h=(c=P.properties)==null?void 0:c.wind)==null?void 0:h.spd)>=17.2&&((d=(y=P.properties)==null?void 0:y.wind)==null?void 0:d.spd)<24.5?B="#f2f202":((f=(m=P.properties)==null?void 0:m.wind)==null?void 0:f.spd)>=24.5&&((g=(u=P.properties)==null?void 0:u.wind)==null?void 0:g.spd)<32.7?B="#ff9100":((b=(p=P.properties)==null?void 0:p.wind)==null?void 0:b.spd)>=32.7&&((w=(_=P.properties)==null?void 0:_.wind)==null?void 0:w.spd)<41.5?B="#f44336":((L=(x=P.properties)==null?void 0:x.wind)==null?void 0:L.spd)>=41.5&&((N=(S=P.properties)==null?void 0:S.wind)==null?void 0:N.spd)<51?B="#c604a4":(($=(T=P.properties)==null?void 0:T.wind)==null?void 0:$.spd)>=51?B="#6b05bb":B="#f44336";const re=`<svg t="1719918955501"
189
+ }`);const $r="",vt={name:"IdmWindParticle",props:{factor:{type:Object},viewport:{type:ve},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,wrapper:void 0,animation:void 0,particleContext:void 0,particleTexture:void 0,particleOptions:{fadeOpacity:.9,speedFactor:.25,dropRate:.003,dropRateBump:.01,uvRange:[-25,26],sRange:[0,31.985]},paused:!1,initial:!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("[wind-particle] add elapsed: ",t,", total: ",e+=t)}},handleClear(){var a,e,t,o,r,s,l,n;(a=this.viewport)==null||a.toggle(!1),(e=this.viewport)==null||e.toggleParticle(!1),this.context=void 0,this.particleContext=void 0,this.etime=void 0,this.initial=!0,(o=(t=this.viewport)==null?void 0:t.map)==null||o.off("resize",this.handleResize),(s=(r=this.viewport)==null?void 0:r.map)==null||s.off("movestart",this.handlePause),(n=(l=this.viewport)==null?void 0:l.map)==null||n.off("moveend",this.handlePlay),this.handlePause()},handleSetup(){if(!this.context){this.context=this.viewport.rampColorCanvas.getContext("webgl");const a=[[0,"rgb(98, 113, 184, 0.8)"],[12/255,"rgb(98, 113, 184)"],[24/255,"rgb(61, 110, 163)"],[32/255,"rgb(74, 146, 148)"],[40/255,"rgb(77, 142, 124)"],[60/255,"rgb(76, 164, 76)"],[80/255,"rgb(103, 164, 54)"],[100/255,"rgb(162, 135, 64)"],[120/255,"rgb(162, 109, 92)"],[140/255,"rgb(141, 63, 92)"],[160/255,"rgb(151, 75, 145)"],[200/255,"rgb(95, 100, 160)"],[240/255,"rgb(91, 136, 161)"],[1,"rgb(91, 136, 161)"]];this.rampColor=this.webgl.setup(this.context,a);const{program:e,aPositionBuffer:t}=this.webgl.bind(this.context,I.vertexSchema,I.uvFragmentSchema);this.program=e,this.aPositionBuffer=t}this.handleParticleSetup()},handleParticleSetup(){if(!this.particleContext){this.particleContext=this.viewport.particleCanvas.getContext("webgl");const a=[[0,"rgb(205,255,255)"],[1,"rgb(235,255,255)"]];this.wrapper=this.webgl.bindParticle(this.particleContext,D.vertexSchema,D.fragmentSchema,D.quadVertSchema,D.screenFragmentSchema,D.updateFragmentSchema),this.wrapper.color=this.webgl.setup(this.particleContext,a,!0,16,16),this.wrapper={...this.wrapper,...this.webgl.setupParticle(this.particleContext,9e3),...this.webgl.resize(this.viewport,this.particleContext)},this.viewport.map.on("resize",this.handleResize),this.viewport.map.on("movestart",this.handlePause),this.viewport.map.on("moveend",this.handlePlay)}},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.particleTexture=this.webgl.createTexture(this.particleContext,this.particleContext.NEAREST,this.particleContext.LINEAR,this.particleContext.CLAMP_TO_EDGE,a),this.wrapper.image=a}this.initial&&(this.initial=!1,this.handlePlay()),this.webgl.draw(this.viewport,this.context,this.program,this.texture,this.rampColor.texture,this.aPositionBuffer,this.particleOptions),this.viewport.toggle(!0)},handleResize(){this.wrapper={...this.wrapper,...this.webgl.resize(this.viewport,this.particleContext)}},handlePause(){this.paused=!0,this.animation&&(cancelAnimationFrame(this.animation),this.viewport.toggleParticle(!1))},handlePlay(){this.paused=!1,this.animation=requestAnimationFrame(()=>{this.webgl.drawParticle(this.viewport,this.particleContext,this.particleTexture,this.wrapper,this.particleOptions),this.viewport.toggleParticle(!0),this.handlePlay()})}}},G=a=>(i.pushScopeId("data-v-bc5ff165"),a=a(),i.popScopeId(),a),Et={key:0},xt=[G(()=>i.createElementVNode("span",null,"kts",-1)),G(()=>i.createElementVNode("span",null,"0",-1)),G(()=>i.createElementVNode("span",null,"5",-1)),G(()=>i.createElementVNode("span",null,"10",-1)),G(()=>i.createElementVNode("span",null,"20",-1)),G(()=>i.createElementVNode("span",null,"30",-1)),G(()=>i.createElementVNode("span",null,"40",-1)),G(()=>i.createElementVNode("span",null,"60",-1))];function Ct(a,e,t,o,r,s){var l;return(l=t.factor)!=null&&l.active?(i.openBlock(),i.createElementBlock("div",Et,[i.createElementVNode("div",{class:"legend-bars flex-center",style:i.normalizeStyle([{position:"absolute"},{right:r.right+"px",bottom:t.bottom}])},xt,4)])):i.createCommentVNode("",!0)}const St=C(vt,[["render",Ct],["__scopeId","data-v-bc5ff165"]]),jr="",kt={name:"IdmCurrent",props:{map:{type:Object},current:{type:Object},beforeLayer:{type:String},showParticle:{type:Boolean,default:!1},marginBottom:{type:String,default:"30px"},toggleVersion:{type:Number},weatherLayers:{type:Object}},emits:["particle"],data(){return{source:"current-source",directionLayer:"current-direction-layer",speedLayer:"current-speed-layer",speedLabelLayer:"current-speed-label-layer",empty:E.featureCollection([]),showJson:!1,right:10,bottom:95}},watch:{"current.version":{handler(){var a;(a=this.current)!=null&&a.active?this.handleRender():this.handleClear()},deep:!0},showParticle:{handler(){this.showJson=!this.showParticle},immediate:!0},showJson:{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},weatherLayers:{handler(){var a;this.bottom=(((a=document.getElementsByClassName("active-layers")[0])==null?void 0:a.clientHeight)||0)+105},immediate:!0}},methods:{handleParticle(){this.$emit("particle",{particle:!this.showParticle,key:"current",weight:96})},handleRender(){var a,e;if(!this.map)setTimeout(()=>{this.handleRender()},500);else if(this.current){const t=new Date().valueOf();let o=0,r=0,s=this.empty;this.current.active&&(s=this.current.data),(a=this.map)!=null&&a.getSource(this.source)?((e=this.map)==null||e.getSource(this.source).setData(s),r=new Date().valueOf()-(t+o),console.log("[current] update elapsed: ",r,", total: ",o+=r)):(this.map.addSource(this.source,{type:"geojson",data:s}),this.map.addLayer({id:this.speedLayer,type:"fill",source:this.source,filter:["==","$type","Polygon"],paint:{"fill-outline-color":"silver","fill-opacity":.5,"fill-color":["step",["get","val"],"#e1ffb3",1,"#ffff00",3,"#ff9500",4,"#f44336",5,"#f44336"]}},this.beforeLayer),this.map.addLayer({id:this.speedLabelLayer,type:"symbol",source:this.source,filter:["==","$type","Polygon"],layout:{"symbol-placement":"line","text-field":"{val} kts","text-allow-overlap":!0,"text-rotation-alignment":"viewport","text-size":12},paint:{"text-color":"rgba(0, 0, 0, 0.8)"}},this.beforeLayer),this.map.addLayer({id:this.directionLayer,type:"symbol",source:this.source,filter:["==","$type","Point"],layout:{"symbol-placement":"point","icon-image":"arrow-red","icon-size":["interpolate",["linear"],["get","spd"],.5,.14,3,.28],"icon-offset":[0,-20],"icon-allow-overlap":!0,"icon-rotation-alignment":"map","icon-rotate":{property:"val",stops:[[0,0],[360,360]]}},paint:{"icon-opacity":.6}},this.beforeLayer),r=new Date().valueOf()-(t+o),console.log("[current] add elapsed: ",r,", total: ",o+=r)),this.handleToggle()}},handleToggle(){this.map.getLayer(this.speedLayer)&&this.map.setLayoutProperty(this.speedLayer,"visibility",this.showJson?"visible":"none"),this.map.getLayer(this.speedLabelLayer)&&this.map.setLayoutProperty(this.speedLabelLayer,"visibility",this.showJson?"visible":"none"),this.map.getLayer(this.directionLayer)&&this.map.setLayoutProperty(this.directionLayer,"visibility",this.showJson?"visible":"none")},handleClear(){this.map.getLayer(this.speedLayer)&&this.map.removeLayer(this.speedLayer),this.map.getLayer(this.speedLabelLayer)&&this.map.removeLayer(this.speedLabelLayer),this.map.getLayer(this.directionLayer)&&this.map.removeLayer(this.directionLayer),this.map.getSource(this.source)&&this.map.removeSource(this.source)}}},Pt={key:0},Nt={key:0,class:"iconfont active"},Tt={key:1,class:"iconfont"},Vt={key:0,class:"iconfont active"},It={key:1,class:"iconfont"};function $t(a,e,t,o,r,s){var l;return(l=t.current)!=null&&l.active?(i.openBlock(),i.createElementBlock("div",Pt,[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",Nt,"")):(i.openBlock(),i.createElementBlock("i",Tt,"")),i.createElementVNode("span",{class:i.normalizeClass(t.showParticle?"active":"")},"Current 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.showJson=!r.showJson)},[r.showJson?(i.openBlock(),i.createElementBlock("i",Vt,"")):(i.openBlock(),i.createElementBlock("i",It,"")),i.createElementVNode("span",{class:i.normalizeClass(r.showJson?"active":"")},"Current",2)])):i.createCommentVNode("",!0)],4)])):i.createCommentVNode("",!0)}const Rt=C(kt,[["render",$t],["__scopeId","data-v-ce5e09b8"]]),Fr="",Dt={name:"IdmCurrentParticle",props:{factor:{type:Object},viewport:{type:ve},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,wrapper:void 0,animation:void 0,particleContext:void 0,particleTexture:void 0,particleOptions:{fadeOpacity:.96,speedFactor:4,dropRate:.005,dropRateBump:.01,uvRange:[-2.5,2.6],sRange:[0,3]},paused:!1,initial:!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("[current-particle] add elapsed: ",t,", total: ",e+=t)}},handleClear(){var a,e,t,o,r,s,l,n;(a=this.viewport)==null||a.toggle(!1),(e=this.viewport)==null||e.toggleParticle(!1),this.context=void 0,this.particleContext=void 0,this.etime=void 0,this.initial=!0,(o=(t=this.viewport)==null?void 0:t.map)==null||o.off("resize",this.handleResize),(s=(r=this.viewport)==null?void 0:r.map)==null||s.off("movestart",this.handlePause),(n=(l=this.viewport)==null?void 0:l.map)==null||n.off("moveend",this.handlePlay),this.handlePause()},handleSetup(){if(!this.context){this.context=this.viewport.rampColorCanvas.getContext("webgl");const a=[[0/255,"rgba(95, 143, 197,1)"],[5/255,"rgba(64,127,115,1)"],[10/255,"rgb(58,164,58)"],[15/255,"rgb(191,182,67)"],[20/255,"rgb(197,154,68)"],[30/255,"rgb(160,70,94)"],[40/255,"rgb(138,84,166)"],[45/255,"rgb(82,113,165)"],[50/255,"rgb(84,142,152)"],[65/255,"rgb(150,181,184)"],[80/255,"rgb(195,194,194)"],[254/255,"rgb(195,194,194)"],[1,"rgb(195,194,194)"]];this.rampColor=this.webgl.setup(this.context,a);const{program:e,aPositionBuffer:t}=this.webgl.bind(this.context,I.vertexSchema,I.uvFragmentSchema);this.program=e,this.aPositionBuffer=t}this.handleParticleSetup()},handleParticleSetup(){if(!this.particleContext){this.particleContext=this.viewport.particleCanvas.getContext("webgl");const a=[[0,"rgb(205,255,255)"],[1,"rgb(235,255,255)"]];this.wrapper=this.webgl.bindParticle(this.particleContext,D.vertexSchema,D.fragmentSchema,D.quadVertSchema,D.screenFragmentSchema,D.updateFragmentSchema),this.wrapper.color=this.webgl.setup(this.particleContext,a,!0,16,16),this.wrapper={...this.wrapper,...this.webgl.setupParticle(this.particleContext,12e3),...this.webgl.resize(this.viewport,this.particleContext)},this.viewport.map.on("resize",this.handleResize),this.viewport.map.on("movestart",this.handlePause),this.viewport.map.on("moveend",this.handlePlay)}},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.particleTexture=this.webgl.createTexture(this.particleContext,this.particleContext.NEAREST,this.particleContext.LINEAR,this.particleContext.CLAMP_TO_EDGE,a),this.wrapper.image=a}this.initial&&(this.initial=!1,this.handlePlay()),this.webgl.draw(this.viewport,this.context,this.program,this.texture,this.rampColor.texture,this.aPositionBuffer,this.particleOptions),this.viewport.toggle(!0)},handleResize(){this.wrapper={...this.wrapper,...this.webgl.resize(this.viewport,this.particleContext)}},handlePause(){this.paused=!0,this.animation&&(cancelAnimationFrame(this.animation),this.viewport.toggleParticle(!1))},handlePlay(){this.paused=!1,this.animation=requestAnimationFrame(()=>{this.webgl.drawParticle(this.viewport,this.particleContext,this.particleTexture,this.wrapper,this.particleOptions),this.viewport.toggleParticle(!0),this.handlePlay()})}}},K=a=>(i.pushScopeId("data-v-5f45c14c"),a=a(),i.popScopeId(),a),Bt={key:0},At=[K(()=>i.createElementVNode("span",null,"kts",-1)),K(()=>i.createElementVNode("span",null,"0",-1)),K(()=>i.createElementVNode("span",null,"0.4",-1)),K(()=>i.createElementVNode("span",null,"0.8",-1)),K(()=>i.createElementVNode("span",null,"1.6",-1)),K(()=>i.createElementVNode("span",null,"2",-1)),K(()=>i.createElementVNode("span",null,"3.2",-1))];function zt(a,e,t,o,r,s){var l;return(l=t.factor)!=null&&l.active?(i.openBlock(),i.createElementBlock("div",Bt,[i.createElementVNode("div",{class:"legend-bars flex-center",style:i.normalizeStyle([{position:"absolute"},{right:r.right+"px",bottom:t.bottom}])},At,4)])):i.createCommentVNode("",!0)}const Mt=C(Dt,[["render",zt],["__scopeId","data-v-5f45c14c"]]),Ot={name:"IdmSigWave",props:{map:{type:Object},sigWave:{type:Object},beforeLayer:{type:String}},data(){return{source:"sig-wave-source",heightLayer:"sig-wave-height-layer",heightLabelLayer:"sig-wave-height-label-layer",empty:E.featureCollection([])}},watch:{"sigWave.version":{handler(){var a;(a=this.sigWave)!=null&&a.active?this.handleRender():this.handleClear()},deep:!0}},methods:{handleRender(){var a,e;if(!this.map)setTimeout(()=>{this.handleRender()},500);else if(this.sigWave){const t=new Date().valueOf();let o=0,r=0,s=this.empty;this.sigWave.active&&(s=this.sigWave.data),(a=this.map)!=null&&a.getSource(this.source)?((e=this.map)==null||e.getSource(this.source).setData(s),r=new Date().valueOf()-(t+o),console.log("[sig.wave] update elapsed: ",r,", total: ",o+=r)):(this.map.addSource(this.source,{type:"geojson",data:s}),this.map.addLayer({id:this.heightLayer,type:"fill",source:this.source,filter:["==","$type","Polygon"],layout:{"fill-sort-key":["get","val"]},paint:{"fill-outline-color":"#888","fill-opacity":.6,"fill-color":["step",["get","val"],"#7bf9f7",3,"#7bf9d1",4,"#81f98d",5,"#c2fb63",6,"#ffff63",7,"#fcd95a",8,"#fca157",9,"#fc5d5d",10,"#f72f7a",11,"#f259f2",12,"#d118b3",13,"#780178"]}},this.beforeLayer),this.map.addLayer({id:this.heightLabelLayer,type:"symbol",source:this.source,filter:["==","$type","Polygon"],layout:{"symbol-placement":"line","symbol-avoid-edges":!0,"symbol-sort-key":["get","val"],"text-field":"{val} m","text-rotation-alignment":"viewport","text-size":10},paint:{"text-opacity":.7}},this.beforeLayer),r=new Date().valueOf()-(t+o),console.log("[sig.wave] add elapsed: ",r,", total: ",o+=r))}},handleClear(){this.map.getLayer(this.heightLayer)&&this.map.removeLayer(this.heightLayer),this.map.getLayer(this.heightLabelLayer)&&this.map.removeLayer(this.heightLabelLayer),this.map.getSource(this.source)&&this.map.removeSource(this.source)}}};function Wt(a,e,t,o,r,s){return i.openBlock(),i.createElementBlock("div")}const jt=C(Ot,[["render",Wt]]),Ft={name:"IdmSwell",props:{map:{type:Object},swell:{type:Object},beforeLayer:{type:String}},data(){return{source:"swell-source",directionLayer:"swell-direction-layer",heightLayer:"swell-height-layer",heightLabelLayer:"swell-height-label-layer",empty:E.featureCollection([])}},watch:{"swell.version":{handler(){var a;(a=this.swell)!=null&&a.active?this.handleRender():this.handleClear()},deep:!0}},methods:{handleRender(){var a,e;if(!this.map)setTimeout(()=>{this.handleRender()},500);else if(this.swell){const t=new Date().valueOf();let o=0,r=0,s=this.empty;this.swell.active&&(s=this.swell.data),(a=this.map)!=null&&a.getSource(this.source)?((e=this.map)==null||e.getSource(this.source).setData(s),r=new Date().valueOf()-(t+o),console.log("[swell] update elapsed: ",r,", total: ",o+=r)):(this.map.addSource(this.source,{type:"geojson",data:s}),this.map.addLayer({id:this.heightLayer,type:"line",source:this.source,filter:["==","$type","LineString"],paint:{"line-opacity":1,"line-width":2,"line-color":["match",["get","val"],2,"rgba(255,255,0,0.9)",3,"rgba(255,149,0,0.9)",4,"rgba(244,67,54,0.9)",5,"rgba(162,2,31,0.9)",6,"rgba(162,2,31,0.9)","rgba(162,2,31,0.9)"]}},this.beforeLayer),this.map.addLayer({id:this.heightLabelLayer,type:"symbol",source:this.source,filter:["==","$type","LineString"],layout:{"symbol-placement":"line","text-rotation-alignment":"viewport","text-field":"{val}M","text-size":12},paint:{"text-color":["step",["get","val"],"black",4,"white",5,"white",6,"white"],"text-halo-color":["match",["get","val"],2,"rgba(255,255,0,0.7)",3,"rgba(255,149,0,0.7)",4,"rgba(244,67,54,0.7)",5,"rgba(162,13,2,0.7)",6,"rgba(162,13,2,0.7)","rgba(162,13,2,0.7)"],"text-halo-width":4}}),this.map.addLayer({id:this.directionLayer,type:"symbol",source:this.source,filter:["==","$type","Point"],layout:{"symbol-placement":"point","icon-image":"arrow-yellow","icon-size":{base:1,stops:[[2,.14],[6,.28]]},"icon-offset":[0,-20],"icon-allow-overlap":!0,"icon-rotation-alignment":"map","icon-rotate":{property:"val",stops:[[0,180],[360,540]]}},paint:{"icon-opacity":.8}},this.beforeLayer),r=new Date().valueOf()-(t+o),console.log("[swell] add elapsed: ",r,", total: ",o+=r))}},handleClear(){this.map.getLayer(this.heightLayer)&&this.map.removeLayer(this.heightLayer),this.map.getLayer(this.heightLabelLayer)&&this.map.removeLayer(this.heightLabelLayer),this.map.getLayer(this.directionLayer)&&this.map.removeLayer(this.directionLayer),this.map.getSource(this.source)&&this.map.removeSource(this.source)}}};function Ut(a,e,t,o,r,s){return i.openBlock(),i.createElementBlock("div")}const Ht=C(Ft,[["render",Ut]]),Gt={name:"IdmPrmsl",props:{map:{type:Object},prmsl:{type:Object},beforeLayer:{type:String}},data(){return{source:"prmsl-source",layer:"prmsl-layer",labelLayer:"prmsl-label-layer",pointLabelLayer:"prmsl-point-label-layer",empty:E.featureCollection([])}},watch:{"prmsl.version":{handler(){var a;(a=this.prmsl)!=null&&a.active?this.handleRender():this.handleClear()},deep:!0}},methods:{handleRender(){var a,e,t;if(!this.map)setTimeout(()=>{this.handleRender()},500);else if(this.prmsl){const o=new Date().valueOf();let r=0,s=0,l=this.empty;this.prmsl.active&&(l=this.prmsl.data),(a=this.map)!=null&&a.getSource(this.source)?((e=this.map)==null||e.getSource(this.source).setData(l),s=new Date().valueOf()-(o+r),console.log("[prmsl] update elapsed: ",s,", total: ",r+=s)):(this.map.addSource(this.source,{type:"geojson",data:l}),this.map.addLayer({id:this.layer,type:"line",source:this.source,filter:["==","$type","LineString"],paint:{"line-color":["step",["get","val"],"rgba(162,13,2,1)",920,"rgba(244,67,54,1)",980,"rgba(255,255,0,1)",1100,"rgba(199,171,250,1)"],"line-width":1,"line-opacity":1}},this.beforeLayer),(t=this.map)==null||t.addLayer({id:this.labelLayer,type:"symbol",source:this.source,minzoom:4,filter:["==","$type","LineString"],layout:{"symbol-placement":"line","text-rotation-alignment":"viewport","text-field":"{val}","text-size":12},paint:{"text-color":"black","text-opacity":.7}},this.beforeLayer),setTimeout(()=>{this.map.addLayer({id:this.pointLabelLayer,type:"symbol",source:this.source,filter:["==","$type","Point"],layout:{"symbol-placement":"point","text-field":["format",["get","type"],{"font-scale":1.03},`
190
+ `,["get","val"],{"font-scale":1}],"text-rotation-alignment":"map","text-line-height":1.3,"text-size":12},paint:{"text-opacity":1,"text-color":["step",["get","val"],"white",980,"black",1100,"black"],"text-halo-color":["step",["get","val"],"rgba(162,13,2,0.9)",920,"rgba(244,67,54,0.9)",980,"rgba(255,255,0,0.9)",1100,"rgba(199,171,250,0.9)"],"text-halo-width":4}},this.beforeLayer)},1e3),s=new Date().valueOf()-(o+r),console.log("[prmsl] add elapsed: ",s,", total: ",r+=s))}},handleClear(){this.map.getLayer(this.pointLabelLayer)&&this.map.removeLayer(this.pointLabelLayer),this.map.getLayer(this.labelLayer)&&this.map.removeLayer(this.labelLayer),this.map.getLayer(this.layer)&&this.map.removeLayer(this.layer),this.map.getSource(this.source)&&this.map.removeSource(this.source)}}};function Xt(a,e,t,o,r,s){return i.openBlock(),i.createElementBlock("div")}const Zt=C(Gt,[["render",Xt]]),Jt={name:"IdmIceberg",props:{map:{type:Object},iceberg:{type:Object},beforeLayer:{type:String}},data(){return{source:"iceberg-source",layer:"iceberg-layer",empty:E.featureCollection([])}},watch:{"iceberg.version":{handler(){var a;(a=this.iceberg)!=null&&a.active?this.handleRender():this.handleClear()},deep:!0}},methods:{handleRender(){var a,e;if(!this.map)setTimeout(()=>{this.handleRender()},500);else if(this.iceberg){const t=new Date().valueOf();let o=0,r=0,s=this.empty;this.iceberg.active&&(s=this.iceberg.data),(a=this.map)!=null&&a.getSource(this.source)?((e=this.map)==null||e.getSource(this.source).setData(s),r=new Date().valueOf()-(t+o),console.log("[iceberg] update elapsed: ",r,", total: ",o+=r)):(this.map.addSource(this.source,{type:"geojson",data:s}),this.map.addLayer({id:this.layer,type:"line",source:this.source,filter:["==","$type","LineString"],paint:{"line-color":"rgba(255,255,255, 0.8)","line-width":2,"line-opacity":1}}),r=new Date().valueOf()-(t+o),console.log("[iceberg] add elapsed: ",r,", total: ",o+=r))}},handleClear(){this.map.getLayer(this.layer)&&this.map.removeLayer(this.layer),this.map.getSource(this.source)&&this.map.removeSource(this.source)}}};function qt(a,e,t,o,r,s){return i.openBlock(),i.createElementBlock("div")}const Yt=C(Jt,[["render",qt]]),Yr="",Kt={name:"IdmTropicals",props:{map:{type:Object},tropicals:{type:Object},date:{type:String}},emits:["tropical"],data(){return{source:"tropicals-source",clusterSource:"tropicals-cluster-source",historyLayer:"tropicals-history-layer",forecastLayer:"tropicals-forecast-layer",forecastModelLayer:"tropicals-forecast-model-layer",forecastNameLayer:"tropicals-forecast-name-layer",pointCircleLayer:"tropicals-point-circle-layer",pointLabelLayer:"tropicals-point-label-layer",historyPointCircleLayer:"history-tropicals-point-circle-layer",historyPointLabelLayer:"history-tropicals-point-label-layer",interpolateData:[],interpolateMarkers:[],interpolateSource:"tropicals-interpolate-source",interpolateLineLayer:"tropicals-interpolate-line-layer",showTropicals:!1,activeTropicals:void 0,activeTropicalsMarker:void 0,empty:E.featureCollection([])}},computed:{computeTime(){return function(a){if(a){const e=O(a).utc();return`${e.format("MMM-DD,HHmm[Z]")} (${e==null?void 0:e.fromNow()})`}return"-"}}},watch:{"tropicals.active":{handler(){this.handleInit()},immediate:!0},showTropicals:{handler(){this.$emit("tropical",this.showTropicals)},immediate:!0},"tropicals.version":{handler(){var o,r;const a=((r=(o=this.tropicals)==null?void 0:o.data)==null?void 0:r.features)||[],e=O().utc().hour(),t=[];a.forEach(s=>{var l,n,c;(l=s.properties)!=null&&l.name&&!t.includes((n=s.properties)==null?void 0:n.name)&&t.push((c=s.properties)==null?void 0:c.name)}),t.forEach(s=>{var d;let l=0,n,c="",h="";const y=a.filter(m=>{var f,u;return((u=(f=m.properties)==null?void 0:f.category)==null?void 0:u.split("-")[0])===s});c=(d=y.filter(m=>{var f,u;return((f=m.geometry)==null?void 0:f.type)==="LineString"&&((u=m.properties)==null?void 0:u.type)==="forecast"})[0])==null?void 0:d.properties.model,y.forEach((m,f)=>{var u,g,p,b,_,w;((u=m.geometry)==null?void 0:u.type)==="Point"&&((g=m.properties)==null?void 0:g.type)==="history"&&(l=f,n=n===void 0?f:n),((p=m.geometry)==null?void 0:p.type)==="Point"&&((b=m.properties)==null?void 0:b.type)==="forecast"&&n===void 0&&(n=f),((_=m.geometry)==null?void 0:_.type)==="LineString"&&((w=m.properties)==null?void 0:w.type)==="forecast"&&(h=`${s}-${c}`)}),y.map((m,f)=>{var u,g,p,b,_,w,x,L,S,N;if(((u=m.geometry)==null?void 0:u.type)==="LineString"&&((g=m.properties)==null?void 0:g.type)==="forecast"&&(m.properties.disabled=((p=m.properties)==null?void 0:p.model)!==c),((b=m.geometry)==null?void 0:b.type)==="Point"&&((_=m.properties)==null?void 0:_.type)==="forecast"&&(m.properties.disabled=((w=m.properties)==null?void 0:w.category)!==h,m.properties.name=s),((x=m.geometry)==null?void 0:x.type)==="Point"&&((L=m.properties)==null?void 0:L.type)==="history"){const T=((N=(S=m.properties)==null?void 0:S.format)==null?void 0:N.slice(7,12))===O().utc().hour(Math.floor(e/6)*6).minute("00").format("HHmm")+"Z";m.properties.showHistoryLabel=T||f===l,m.properties.showNameLabel=f===l,m.properties.name=s}return m})}),this.handleInit()}}},methods:{handleInit(){var a,e;this.tropicals&&this.tropicals.active?(this.handleRender(),(a=this.map)==null||a.on("click",[this.forecastNameLayer,this.forecastLayer,this.historyLayer,this.forecastModelLayer,this.pointCircleLayer,this.pointLabelLayer,this.historyPointCircleLayer,this.historyPointLabelLayer],this.handleClick)):(this.handleClear(),(e=this.map)==null||e.off("click",[this.forecastNameLayer,this.forecastLayer,this.historyLayer,this.forecastModelLayer,this.pointCircleLayer,this.pointLabelLayer,this.historyPointCircleLayer,this.historyPointLabelLayer],this.handleClick))},handleRender(){var a,e,t,o,r,s,l,n,c,h,y;if(!this.map)setTimeout(()=>{this.handleRender()},500);else{if(this.tropicals){const d=new Date().valueOf();let m=0,f=0;(a=this.map)!=null&&a.getSource(this.source)?((t=this.map)==null||t.getSource(this.source).setData((e=this.tropicals)!=null&&e.active?this.tropicals.data:this.empty),f=new Date().valueOf()-(d+m),console.log("[tropicals] update elapsed: ",f,", total: ",m+=f)):(this.map.addSource(this.source,{type:"geojson",data:(o=this.tropicals)!=null&&o.active?(r=this.tropicals)==null?void 0:r.data:this.empty}),this.map.addLayer({id:this.historyLayer,type:"line",source:this.source,filter:["all",["==","$type","LineString"],["==","type","history"],["!=","disabled",!0]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#000","line-width":4,"line-opacity":.5}}),this.map.addLayer({id:this.forecastLayer,type:"line",source:this.source,filter:["all",["==","$type","LineString"],["==","type","forecast"],["!=","disabled",!0]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":["match",["get","model"],"cma","#e2ea03","jma","#01d2b7","ecmwf","#f582f2","ukm","#4783f5","noaa-at","#9758fb","noaa-ep","#9758fb","#fff"],"line-width":3,"line-opacity":.9,"line-dasharray":[1,2]}}),this.map.addLayer({id:this.forecastModelLayer,type:"symbol",source:this.source,filter:["all",["==","$type","LineString"],["==","type","forecast"],["!=","disabled",!0]],layout:{"symbol-placement":"line","text-field":"{model}","text-rotation-alignment":"viewport","text-size":13},paint:{"text-color":["match",["get","model"],"cma","#000","jma","#000","ecmwf","#fff","ukm","#fff","noaa-at","#fff","noaa-ep","#fff","#fff"],"text-opacity":1,"text-halo-color":["match",["get","model"],"cma","#e2ea03","jma","#01d2b7","ecmwf","#f582f2","ukm","#4783f5","noaa-at","#9758fb","noaa-ep","#9758fb","#fff"],"text-halo-width":4}}),f=new Date().valueOf()-(d+m),console.log("[tropical] add elapsed: ",f,", total: ",m+=f)),(s=this.map)!=null&&s.getSource(this.clusterSource)?((n=this.map)==null||n.getSource(this.clusterSource).setData((l=this.tropicals)!=null&&l.active?this.tropicals.data:this.empty),f=new Date().valueOf()-(d+m),console.log("[tropical] update elapsed: ",f,", total: ",m+=f)):(this.map.addSource(this.clusterSource,{type:"geojson",data:(c=this.tropicals)!=null&&c.active?(h=this.tropicals)==null?void 0:h.data:this.empty}),this.map.addLayer({id:this.pointCircleLayer+"-border",type:"circle",source:this.clusterSource,filter:["all",["==","$type","Point"],["==","type","forecast"],["!=","disabled",!0]],paint:{"circle-radius":6,"circle-color":"#fff"}}),this.map.addLayer({id:this.pointCircleLayer,type:"circle",source:this.clusterSource,filter:["all",["==","$type","Point"],["==","type","forecast"],["!=","disabled",!0]],paint:{"circle-radius":4,"circle-color":["case",["boolean",["<",["get","spd",["get","wind"]],17.2]],"#03f869",["boolean",["<=",["get","spd",["get","wind"]],24.5]],"#f2f202",["boolean",["<=",["get","spd",["get","wind"]],32.7]],"#ff9100",["boolean",["<=",["get","spd",["get","wind"]],41.5]],"#f44336",["boolean",["<",["get","spd",["get","wind"]],51]],"#c604a4",["boolean",[">=",["get","spd",["get","wind"]],51]],"#6b05bb","#fff"]}}),this.map.addLayer({id:this.pointLabelLayer,type:"symbol",source:this.clusterSource,filter:["all",["==","$type","Point"],["==","type","forecast"],["!=","disabled",!0]],layout:{"text-field":["get","format"],"text-offset":[0,-.5],"text-anchor":"bottom-left","text-size":12},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-color":"#fff","text-halo-width":1}}),this.map.addLayer({id:this.historyPointCircleLayer+"-border",type:"circle",source:this.clusterSource,filter:["all",["==","$type","Point"],["==","type","history"],["==","showHistoryLabel",!0],["!=","disabled",!0]],paint:{"circle-radius":8,"circle-color":"#fff"}}),this.map.addLayer({id:this.historyPointCircleLayer,type:"circle",source:this.clusterSource,filter:["all",["==","$type","Point"],["==","type","history"],["==","showHistoryLabel",!0],["!=","disabled",!0]],paint:{"circle-radius":6,"circle-color":"rgba(0,0,0,0.7)"}}),this.map.addLayer({id:this.historyPointCircleLayer+"-inner",type:"circle",source:this.clusterSource,filter:["all",["==","$type","Point"],["==","type","history"],["==","showHistoryLabel",!0],["!=","disabled",!0]],paint:{"circle-radius":4,"circle-color":"#fff"}}),this.map.addLayer({id:this.historyPointLabelLayer,type:"symbol",source:this.clusterSource,filter:["all",["==","$type","Point"],["==","type","history"],["==","showHistoryLabel",!0],["!=","disabled",!0]],layout:{"text-field":["get","format"],"text-offset":[0,-.5],"text-anchor":"bottom-left","text-size":14},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-color":"#fff","text-halo-width":1}}),this.map.addLayer({id:this.forecastNameLayer,type:"symbol",source:this.clusterSource,filter:["all",["==","$type","Point"],["==","type","history"],["==","showNameLabel",!0]],layout:{"text-field":["get","name"],"text-offset":[0,1.5],"text-anchor":"bottom","text-size":16,"text-allow-overlap":!0,"text-ignore-placement":!0},paint:{"text-color":"#fff","text-halo-color":"#146bf5","text-halo-width":4}}),f=new Date().valueOf()-(d+m),console.log("[tropical] add elapsed: ",f,", total: ",m+=f))}if(!((y=this.tropicals)!=null&&y.cached)){const d=ke.TropicalHelper.interpolate(this.tropicals,1),m=JSON.parse(JSON.stringify(d)),f=[];m.forEach(u=>{var g,p,b;(g=u.properties)!=null&&g.name&&!f.includes((p=u.properties)==null?void 0:p.name)&&f.push((b=u.properties)==null?void 0:b.name)}),f.forEach(u=>{var b;const p=(b=m.filter(_=>{var w;return((w=_.properties)==null?void 0:w.name)===u})[0])==null?void 0:b.properties.model;m.map((_,w)=>{var x,L;return((x=_.properties)==null?void 0:x.name)===u&&(_.properties.disabled=((L=_.properties)==null?void 0:L.model)!==p),_})}),this.interpolateData=JSON.parse(JSON.stringify(m))}this.handleDateChange()}},handleClear(){var a;this.map&&(this.map.getLayer(this.historyLayer)&&this.map.removeLayer(this.historyLayer),this.map.getLayer(this.forecastLayer)&&this.map.removeLayer(this.forecastLayer),this.map.getLayer(this.forecastModelLayer)&&this.map.removeLayer(this.forecastModelLayer),this.map.getLayer(this.forecastNameLayer)&&this.map.removeLayer(this.forecastNameLayer),this.map.getLayer(this.pointCircleLayer)&&this.map.removeLayer(this.pointCircleLayer),this.map.getLayer(this.pointCircleLayer+"-border")&&this.map.removeLayer(this.pointCircleLayer+"-border"),this.map.getLayer(this.pointLabelLayer)&&this.map.removeLayer(this.pointLabelLayer),this.map.getLayer(this.historyPointCircleLayer)&&this.map.removeLayer(this.historyPointCircleLayer),this.map.getLayer(this.historyPointCircleLayer+"-border")&&this.map.removeLayer(this.historyPointCircleLayer+"-border"),this.map.getLayer(this.historyPointCircleLayer+"-inner")&&this.map.removeLayer(this.historyPointCircleLayer+"-inner"),this.map.getLayer(this.historyPointLabelLayer)&&this.map.removeLayer(this.historyPointLabelLayer),this.map.getLayer(this.interpolateLineLayer)&&this.map.removeLayer(this.interpolateLineLayer),(a=this.interpolateMarkers)==null||a.forEach(e=>e==null?void 0:e.remove()),this.map.getSource(this.source)&&this.map.removeSource(this.source),this.map.getSource(this.clusterSource)&&this.map.removeSource(this.clusterSource),this.map.getSource(this.interpolateSource)&&this.map.removeSource(this.interpolateSource))},handleDateChange(){var a,e,t,o,r,s,l,n,c,h,y,d,m,f,u,g,p,b,_,w,x,L,S,N,T,$,R,z;if((a=this.interpolateMarkers)==null||a.forEach(M=>M==null?void 0:M.remove()),(e=this.interpolateData)!=null&&e.length&&this.tropicals.active){const M=O(this.date).utc().set({minute:0,second:0,millisecond:0}),J=this.interpolateData.filter(P=>P.properties.date===M.format()&&!P.properties.disabled),ie=this.handleComputePolygons(J),q=E.featureCollection([...J]);ie.forEach(P=>{q.features.push(P)}),(t=this.map)!=null&&t.getSource(this.interpolateSource)?(o=this.map)==null||o.getSource(this.interpolateSource).setData(q):((r=this.map)==null||r.addSource(this.interpolateSource,{type:"geojson",data:q}),(s=this.map)==null||s.addLayer({id:this.interpolateLineLayer,type:"line",source:this.interpolateSource,filter:["all",["==","$type","Polygon"],["!=","disabled",!0]],paint:{"line-opacity":1,"line-color":["match",["get","level"],7,"#ff9500",10,"#f74468","#ffffff"],"line-width":2}})),this.interpolateMarkers=[];for(const P of J)if(!P.properties.disabled){let B="#f44336";((n=(l=P.properties)==null?void 0:l.wind)==null?void 0:n.spd)<17.2?B="#03f869":((h=(c=P.properties)==null?void 0:c.wind)==null?void 0:h.spd)>=17.2&&((d=(y=P.properties)==null?void 0:y.wind)==null?void 0:d.spd)<24.5?B="#f2f202":((f=(m=P.properties)==null?void 0:m.wind)==null?void 0:f.spd)>=24.5&&((g=(u=P.properties)==null?void 0:u.wind)==null?void 0:g.spd)<32.7?B="#ff9100":((b=(p=P.properties)==null?void 0:p.wind)==null?void 0:b.spd)>=32.7&&((w=(_=P.properties)==null?void 0:_.wind)==null?void 0:w.spd)<41.5?B="#f44336":((L=(x=P.properties)==null?void 0:x.wind)==null?void 0:L.spd)>=41.5&&((N=(S=P.properties)==null?void 0:S.wind)==null?void 0:N.spd)<51?B="#c604a4":(($=(T=P.properties)==null?void 0:T.wind)==null?void 0:$.spd)>=51?B="#6b05bb":B="#f44336";const re=`<svg t="1719918955501"
191
191
  class="icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" p-id="18382"
192
192
  xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200">
193
193
  <path
@@ -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(t){var s,l,n,c,h,y;const e=t.features[0],a=(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)});a.sort((d,m)=>{var f,u,g,p;return((f=d.properties)==null?void 0:f.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:a.map(d=>d.properties),history:(y=o[0])==null?void 0:y.properties},this.showTropicals=!0;const r=document.getElementById("active-tropical");this.activeTropicalsMarker?this.activeTropicalsMarker.setLngLat([t.lngLat.lng,t.lngLat.lat]):this.activeTropicalsMarker=new U.Marker(r).setLngLat([t.lngLat.lng,t.lngLat.lat]).setOffset([220,0]).addTo(this.map)},handleForecastToggle(t){var o,r,s,l,n,c;t.disabled=!t.disabled;const e=`${t.name}-${t.model}`,a=(r=(o=this.map)==null?void 0:o.getSource(this.source)._data)==null?void 0:r.features;a.forEach(h=>{h.properties.category===e&&(h.properties.disabled=t.disabled)}),this.interpolateData.forEach(h=>{h.properties.category===e&&(h.properties.disabled=t.disabled)}),(l=(s=this.map)==null?void 0:s.getSource(this.source))==null||l.setData(E.featureCollection(a)),(c=(n=this.map)==null?void 0:n.getSource(this.clusterSource))==null||c.setData(E.featureCollection(a)),this.handleDateChange()},handleStrikeProbability(t){this.$emit("tropicalProbability",t)},handleComputePolygons(t){const e=[];for(const a of t){const o=a.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(a.geometry.coordinates,r,{...a.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(a.geometry.coordinates,l,{...a.properties,level:10});e.push(n)}return e},handleComputeArc(t,e,a){var s;const o=[];for(const l in e){const n=e[l]??0;let c;switch(l){case"ne":c=E.lineArc(t,n*1.852,0,90,{steps:n>0?64:1});break;case"se":c=E.lineArc(t,n*1.852,90,180,{steps:n>0?64:1});break;case"sw":c=E.lineArc(t,n*1.852,180,270,{steps:n>0?64:1});break;case"nw":c=E.lineArc(t,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:a})}}},Ee=t=>(i.pushScopeId("data-v-dfdfd5f2"),t=t(),i.popScopeId(),t),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)),fa={class:"forecast-models"},ya=["onClick"],ga=i.createStaticVNode('<div class="row" style="padding:0;height:1px;margin:10px 0;background:var(--idm-black-1);" data-v-dfdfd5f2></div><div class="row" style="padding:2px 10px;" data-v-dfdfd5f2><div class="legend" data-v-dfdfd5f2><div class="icon td" data-v-dfdfd5f2></div><div class="label" data-v-dfdfd5f2>TD</div></div><div class="legend" data-v-dfdfd5f2><div class="icon ts" data-v-dfdfd5f2></div><div class="label" data-v-dfdfd5f2>TS</div></div><div class="legend" data-v-dfdfd5f2><div class="icon sts" data-v-dfdfd5f2></div><div class="label" data-v-dfdfd5f2>STS</div></div><div class="legend" data-v-dfdfd5f2><div class="icon ty" data-v-dfdfd5f2></div><div class="label" data-v-dfdfd5f2>TY</div></div><div class="legend" data-v-dfdfd5f2><div class="icon sty" data-v-dfdfd5f2></div><div class="label" data-v-dfdfd5f2>STY</div></div><div class="legend" data-v-dfdfd5f2><div class="icon supper-ty" data-v-dfdfd5f2></div><div class="label" data-v-dfdfd5f2>Super TY</div></div></div><div class="row" style="padding:2px 10px;" data-v-dfdfd5f2><div class="legend" data-v-dfdfd5f2><div class="icon history" data-v-dfdfd5f2></div><div class="label" data-v-dfdfd5f2>History</div></div><div class="legend" data-v-dfdfd5f2><div class="icon r7" data-v-dfdfd5f2></div><div class="label" data-v-dfdfd5f2>35kts Radii</div></div><div class="legend" data-v-dfdfd5f2><div class="icon r10" data-v-dfdfd5f2></div><div class="label" data-v-dfdfd5f2>50kts Radii</div></div></div>',3),ua={class:"more"};function _a(t,e,a,o,r,s){var l,n,c,h,y,d,m,f,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((y=r.activeTropicals)==null?void 0:y.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=(f=r.activeTropicals)==null?void 0:f.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(((b=(p=r.activeTropicals)==null?void 0:p.history)==null?void 0:b.kts)||"-")+"[kts]",1)]),i.createElementVNode("div",ca,[ha,i.createElementVNode("span",null,i.toDisplayString(((w=(_=r.activeTropicals)==null?void 0:_.history)==null?void 0:w.pressure)||"-")+"[hPa]",1)])]),i.createElementVNode("div",da,[i.createElementVNode("div",pa,[ma,i.createElementVNode("div",fa,[(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,ya)}),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",_a],["__scopeId","data-v-dfdfd5f2"]]),Kr="",ba={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 t;(t=this.factor)!=null&&t.active?this.handleRender():this.handleClear()},deep:!0},toggleVersion:{handler(){var t,e;this.right=(((t=document.getElementsByClassName("available-layers-show")[0])==null?void 0:t.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 t=new Date().valueOf();let e=0,a=0;this.handleDraw(),a=new Date().valueOf()-(t+e),console.log("[precip3h] add elapsed: ",a,", total: ",e+=a)}},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 t=[[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,t);const{program:e,aPositionBuffer:a}=this.webgl.bind(this.context,I.vertexSchema,I.fragmentSchema);this.program=e,this.aPositionBuffer=a}},async handleDraw(){if(this.handleSetup(),this.etime!==this.factor.etime){this.etime=this.factor.etime;const t=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,t)}this.webgl.draw(this.viewport,this.context,this.program,this.texture,this.rampColor.texture,this.aPositionBuffer),this.viewport.toggle(!0)}}},X=t=>(i.pushScopeId("data-v-42b977ed"),t=t(),i.popScopeId(),t),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(t,e,a,o,r,s){var l;return(l=a.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:a.bottom}])},wa,4)])):i.createCommentVNode("",!0)}const Ea=C(ba,[["render",va],["__scopeId","data-v-42b977ed"]]),no="",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 t;(t=this.factor)!=null&&t.active?this.handleRender():this.handleClear()},deep:!0},toggleVersion:{handler(){var t,e;this.right=(((t=document.getElementsByClassName("available-layers-show")[0])==null?void 0:t.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 t=new Date().valueOf();let e=0,a=0;this.handleDraw(),a=new Date().valueOf()-(t+e),console.log("[visibility] add elapsed: ",a,", total: ",e+=a)}},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 t=[[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,t);const{program:e,aPositionBuffer:a}=this.webgl.bind(this.context,I.vertexSchema,I.fragmentSchema);this.program=e,this.aPositionBuffer=a}},async handleDraw(){if(this.handleSetup(),this.etime!==this.factor.etime){this.etime=this.factor.etime;const t=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,t)}this.webgl.draw(this.viewport,this.context,this.program,this.texture,this.rampColor.texture,this.aPositionBuffer),this.viewport.toggle(!0)}}},ee=t=>(i.pushScopeId("data-v-2a5fbadd"),t=t(),i.popScopeId(),t),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(t,e,a,o,r,s){var l;return(l=a.factor)!=null&&l.active?(i.openBlock(),i.createElementBlock("div",Ca,[i.createElementVNode("div",{class:"legend-bars flex-center",style:i.normalizeStyle([{position:"absolute"},{right:t.right+"px",bottom:a.bottom}])},Sa,4)])):i.createCommentVNode("",!0)}const Pa=C(xa,[["render",ka],["__scopeId","data-v-2a5fbadd"]]),yo="",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 t;(t=this.factor)!=null&&t.active?this.handleRender():this.handleClear()},deep:!0},toggleVersion:{handler(){var t,e;this.right=(((t=document.getElementsByClassName("available-layers-show")[0])==null?void 0:t.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 t=new Date().valueOf();let e=0,a=0;this.handleDraw(),a=new Date().valueOf()-(t+e),console.log("[water-temp] add elapsed: ",a,", total: ",e+=a)}},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 t=[[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,t);const{program:e,aPositionBuffer:a}=this.webgl.bind(this.context,I.vertexSchema,I.fragmentSchema);this.program=e,this.aPositionBuffer=a}},async handleDraw(){if(this.handleSetup(),this.etime!==this.factor.etime){this.etime=this.factor.etime;const t=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,t)}this.webgl.draw(this.viewport,this.context,this.program,this.texture,this.rampColor.texture,this.aPositionBuffer),this.viewport.toggle(!0)}}},te=t=>(i.pushScopeId("data-v-5b28deaf"),t=t(),i.popScopeId(),t),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(t,e,a,o,r,s){var l;return(l=a.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:a.bottom}])},Va,4)])):i.createCommentVNode("",!0)}const $a=C(Na,[["render",Ia],["__scopeId","data-v-5b28deaf"]]),vo="",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 t;(t=this.factor)!=null&&t.active?this.handleRender():this.handleClear()},deep:!0},toggleVersion:{handler(){var t,e;this.right=(((t=document.getElementsByClassName("available-layers-show")[0])==null?void 0:t.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 t=new Date().valueOf();let e=0,a=0;this.handleDraw(),a=new Date().valueOf()-(t+e),console.log("[water-temp] add elapsed: ",a,", total: ",e+=a)}},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 t=[[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,t);const{program:e,aPositionBuffer:a}=this.webgl.bind(this.context,I.vertexSchema,I.fragmentSchema);this.program=e,this.aPositionBuffer=a}},async handleDraw(){if(this.handleSetup(),this.etime!==this.factor.etime){this.etime=this.factor.etime;const t=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,t)}this.webgl.draw(this.viewport,this.context,this.program,this.texture,this.rampColor.texture,this.aPositionBuffer),this.viewport.toggle(!0)}}},Z=t=>(i.pushScopeId("data-v-72cd9cf1"),t=t(),i.popScopeId(),t),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(t,e,a,o,r,s){var l;return(l=a.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:a.bottom}])},Ba,4)])):i.createCommentVNode("",!0)}const za=C(Ra,[["render",Aa],["__scopeId","data-v-72cd9cf1"]]),Vo="",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 t;(t=this.factor)!=null&&t.active?this.handleRender():this.handleClear()},deep:!0},toggleVersion:{handler(){var t,e;this.right=(((t=document.getElementsByClassName("available-layers-show")[0])==null?void 0:t.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 t=new Date().valueOf();let e=0,a=0;this.handleDraw(),a=new Date().valueOf()-(t+e),console.log("[water-temp] add elapsed: ",a,", total: ",e+=a)}},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 t=[[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,t);const{program:e,aPositionBuffer:a}=this.webgl.bind(this.context,I.vertexSchema,I.fragmentSchema);this.program=e,this.aPositionBuffer=a}},async handleDraw(){if(this.handleSetup(),this.etime!==this.factor.etime){this.etime=this.factor.etime;const t=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,t)}this.webgl.draw(this.viewport,this.context,this.program,this.texture,this.rampColor.texture,this.aPositionBuffer),this.viewport.toggle(!0)}}},ae=t=>(i.pushScopeId("data-v-2092df03"),t=t(),i.popScopeId(),t),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(t,e,a,o,r,s){var l;return(l=a.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:a.bottom}])},Wa,4)])):i.createCommentVNode("",!0)}const Fa=C(Ma,[["render",ja],["__scopeId","data-v-2092df03"]]),zo="",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(t){return t?`${O(t).utc().format("MMM-DD,HHmm[Z]")}`:"-"}},computeLat(){return function(t,e=4){return v.LngLatHelper.lat2pretty(t,e).pretty}},computeLng(){return function(t,e=4){return v.LngLatHelper.lng2pretty(t,e).pretty}},roundPrecision(){return function(t,e=4){return isNaN(t)?"-":v.LngLatHelper.roundPrecision(t,e)}}},methods:{handleBind(){var t,e;this.show?(t=this.map)==null||t.on("click",this.handleClick):((e=this.map)==null||e.off("click",this.handleClick),this.showMeteo=!1)},handleClick(t){t.originalEvent.stopPropagation();const e=t.originalEvent.target.className;e.indexOf("close")>-1?this.showMeteo=!1:e==="more"?this.$emit("more",this.meteo):this.$emit("point",t.lngLat)},handleRender(){var t;if(this.meteo){const e=document.getElementById("point-meteo");this.meteoMarker?(t=this.meteoMarker)==null||t.setLngLat([this.meteo.lng,this.meteo.lat]):this.meteoMarker=new U.Marker(e).setLngLat([this.meteo.lng,this.meteo.lat]).addTo(this.map)}}}},W=t=>(i.pushScopeId("data-v-8b51d938"),t=t(),i.popScopeId(),t),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=W(()=>i.createElementVNode("label",null,"Wind",-1)),Qa={class:"flex-space"},ei=W(()=>i.createElementVNode("label",null,"Wind.Wave",-1)),ti={class:"flex-space"},ai=W(()=>i.createElementVNode("label",null,"Swell",-1)),ii={class:"flex-space"},ri=W(()=>i.createElementVNode("label",null,"Sig.Wave",-1)),oi={class:"flex-space"},si=W(()=>i.createElementVNode("label",null,"Current",-1)),ni={class:"flex-space"},li=W(()=>i.createElementVNode("label",null,"Precip",-1)),ci={class:"flex-space"},hi=W(()=>i.createElementVNode("label",null,"Visibility",-1)),di={class:"flex-space"},pi=W(()=>i.createElementVNode("label",null,"Temp",-1)),mi={class:"flex-space"},fi=W(()=>i.createElementVNode("label",null,"Water Temp",-1));function yi(t,e,a,o,r,s){var l,n,c,h,y,d,m,f,u,g,p,b,_,w,x,L,S,N,T,$,R,z,M,J,ie,q,P,B,re,j,Q,oe,se,ne,le,ce,he,de,pe,me,fe,ye,ge,ue,_e,be,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=a.meteo)==null?void 0:l.lat))+","+i.toDisplayString(s.computeLng((n=a.meteo)==null?void 0:n.lng)),1),i.createElementVNode("div",Ja,i.toDisplayString(s.computeTime((c=a.meteo)==null?void 0:c.utc)),1)]),i.createElementVNode("div",qa,[i.createElementVNode("div",Ya,[Ka,i.createElementVNode("span",null,i.toDisplayString(((y=(h=a.meteo)==null?void 0:h.wind)==null?void 0:y.direction)||"-")+"/"+i.toDisplayString(s.roundPrecision((m=(d=a.meteo)==null?void 0:d.wind)==null?void 0:m.kts,1))+"[kts]/"+i.toDisplayString((u=(f=a.meteo)==null?void 0:f.wind)==null?void 0:u.scale)+"[BF]/"+i.toDisplayString(s.roundPrecision((p=(g=a.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=a.meteo)==null?void 0:b.wave)==null?void 0:_.wd)==null?void 0:w.direction)||"-")+"/"+i.toDisplayString(s.roundPrecision((S=(L=(x=a.meteo)==null?void 0:x.wave)==null?void 0:L.wd)==null?void 0:S.height,1))+"[m]/"+i.toDisplayString(s.roundPrecision(($=(T=(N=a.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(((M=(z=(R=a.meteo)==null?void 0:R.wave)==null?void 0:z.swell)==null?void 0:M.direction)||"-")+"/"+i.toDisplayString(s.roundPrecision((q=(ie=(J=a.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=a.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=a.meteo)==null?void 0:j.wave)==null?void 0:Q.sig)==null?void 0:oe.direction)||"-")+"/"+i.toDisplayString(s.roundPrecision((le=(ne=(se=a.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=a.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=a.meteo)==null?void 0:pe.current)==null?void 0:me.direction)||"-")+"/"+i.toDisplayString(s.roundPrecision((ye=(fe=a.meteo)==null?void 0:fe.current)==null?void 0:ye.kts,2))+"[kts]",1)]),i.createElementVNode("div",ni,[li,i.createElementVNode("span",null,i.toDisplayString(s.roundPrecision((ue=(ge=a.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(((_e=a.meteo)==null?void 0:_e.visibility)/1852,0))+"[nm]",1)]),i.createElementVNode("div",di,[pi,i.createElementVNode("span",null,i.toDisplayString(s.roundPrecision((be=a.meteo)==null?void 0:be.temp,0))+"[°C]",1)]),i.createElementVNode("div",mi,[fi,i.createElementVNode("span",null,i.toDisplayString(s.roundPrecision((Le=a.meteo)==null?void 0:Le.waterTemp,2))+"[°C]",1)])])])],512)),[[i.vShow,r.showMeteo]])}const gi=C(Ua,[["render",yi],["__scopeId","data-v-8b51d938"]]),ui={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 _i(t,e,a,o,r,s){return i.openBlock(),i.createElementBlock("div")}const bi=C(ui,[["render",_i]]),Li={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 wi(t,e,a,o,r,s){return i.openBlock(),i.createElementBlock("div")}const vi=C(Li,[["render",wi]]),Ei={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 t;this.map?(this.handleClear(),this.zone&&(this.map.getSource(this.source)?(t=this.map)==null||t.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 xi(t,e,a,o,r,s){return i.openBlock(),i.createElementBlock("div")}const Ci=C(Ei,[["render",xi]]),Mo="",Si={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 t,e;this.zone?(this.handleRender(),(t=this.map)==null||t.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(t){var o;const e=t.features[0],a=(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];a&&(this.showZone=!0,this.form={...a.properties})},handleRender(){var t;this.map?(this.handleClear(),this.zone&&(this.map.getSource(this.source)?(t=this.map)==null||t.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)}}},ki={id:"zone-info"},Pi=["innerHTML"];function Ni(t,e,a,o,r,s){var l;return i.withDirectives((i.openBlock(),i.createElementBlock("div",ki,[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,Pi)],512)),[[i.vShow,r.showZone]])}const Ti=C(Si,[["render",Ni],["__scopeId","data-v-d1cb4e6e"]]),Oo="",Vi={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(t){return v.LngLatHelper.lat2pretty(t,4).pretty}},computeLng(){return function(t){return v.LngLatHelper.lng2pretty(t,4).pretty}}},watch:{port:{handler(){var t,e;this.port?(this.handleRender(),(t=this.map)==null||t.on("click",[this.layer],this.handleClick)):(this.handleClear(),(e=this.map)==null||e.off("click",[this.layer],this.handleClick))}}},methods:{handleClick(t){var o;const e=t.features[0],a=(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(a){this.showPort=!0,this.form={...a.properties},this.form.lng=a.geometry.coordinates[0],this.form.lat=a.geometry.coordinates[1];const r=document.getElementById("port-info");this.marker?this.marker.setLngLat([t.lngLat.lng,t.lngLat.lat]):this.marker=new U.Marker(r).setLngLat([t.lngLat.lng,t.lngLat.lat]).setOffset([0,-85]).addTo(this.map)}},handleEmit(){this.$emit("port",this.form)},handleRender(){var t;this.map?this.port&&(this.map.getSource(this.source)?(t=this.map)==null||t.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=t=>(i.pushScopeId("data-v-6fdfee96"),t=t(),i.popScopeId(),t),Ii={id:"port-info"},$i={class:"port-box"},Ri={class:"flex-start"},Di=we(()=>i.createElementVNode("label",null,"Name : ",-1)),Bi={class:"flex-start"},Ai=we(()=>i.createElementVNode("label",null,"Position : ",-1)),zi={class:"flex-start"},Mi=we(()=>i.createElementVNode("label",null,"LoCode : ",-1)),Oi={class:"flex-start",style:{"align-items":"flex-start"}},Wi=we(()=>i.createElementVNode("label",null,"Region : ",-1));function ji(t,e,a,o,r,s){return i.withDirectives((i.openBlock(),i.createElementBlock("div",Ii,[i.createElementVNode("div",{class:"close iconfont",onClick:e[0]||(e[0]=l=>r.showPort=!1)},""),i.createElementVNode("div",$i,[i.createElementVNode("div",Ri,[Di,i.createElementVNode("span",{onClick:e[1]||(e[1]=(...l)=>s.handleEmit&&s.handleEmit(...l))},i.toDisplayString(r.form.name),1)]),i.createElementVNode("div",Bi,[Ai,i.createElementVNode("span",null,i.toDisplayString(s.computeLat(r.form.lat))+", "+i.toDisplayString(s.computeLng(r.form.lng)),1)]),i.createElementVNode("div",zi,[Mi,i.createElementVNode("span",null,i.toDisplayString(r.form.loCode||"-"),1)]),i.createElementVNode("div",Oi,[Wi,i.createElementVNode("span",null,i.toDisplayString(r.form.city||"-")+", "+i.toDisplayString(r.form.country||"-"),1)])])],512)),[[i.vShow,r.showPort]])}const Fi=C(Vi,[["render",ji],["__scopeId","data-v-6fdfee96"]]),Ui={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 Hi(t,e,a,o,r,s){return i.openBlock(),i.createElementBlock("div")}const Gi=C(Ui,[["render",Hi]]),Xi={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 Zi(t,e,a,o,r,s){return i.openBlock(),i.createElementBlock("div")}const Ji=C(Xi,[["render",Zi]]),qi={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 Yi(t,e,a,o,r,s){return i.openBlock(),i.createElementBlock("div")}const Ki=C(qi,[["render",Yi]]),Qi={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(t=>{t.geometry.type==="Polygon"&&t.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 er(t,e,a,o,r,s){return i.openBlock(),i.createElementBlock("div")}const tr=C(Qi,[["render",er]]),ar={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 ir(t,e,a,o,r,s){return i.openBlock(),i.createElementBlock("div")}const rr=C(ar,[["render",ir]]),Wo="",or={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 t;this.map&&((t=this.map)==null||t.on("mousemove",this.handleMouseMove))},immediate:!0},toggleVersion:{handler(){var t,e,a;this.right=(((t=document.getElementsByClassName("legend-bars")[0])==null?void 0:t.clientWidth)||-10)+(((e=document.getElementsByClassName("available-layers-show")[0])==null?void 0:e.clientWidth)||0)+(((a=document.getElementsByClassName("fleet-list-container")[0])==null?void 0:a.clientWidth)||0)+20},immediate:!0}},methods:{handleBind(){var t,e;this.show?((t=this.map)==null||t.on("zoomend",this.handleZoomEnd),this.handleRender()):(this.handleClear(),(e=this.map)==null||e.off("zoomend",this.handleZoomEnd))},handleMouseMove(t){const e=t.lngLat,a=v.LngLatHelper.lng2pretty(e.lng,2),o=v.LngLatHelper.lat2pretty(e.lat,2);this.lngLat={lng:a,lat:o}},handleComputeLatLngs(){var o;const t=(o=this.map)==null?void 0:o.getZoom();console.log(t);let e=30;t>4?e=10:t>3&&(e=15);const a=[];for(let r=-60;r<90;r+=e)a.push({type:"Feature",geometry:{type:"LineString",coordinates:[[-180,r],[180,r]]}});for(let r=-180;r<180;r+=e)a.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)a.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 a},handleZoomEnd(){var e;const t=this.handleComputeLatLngs();(e=this.map)==null||e.getSource(this.source).setData(E.featureCollection(t))},handleRender(){if(this.map){const t=this.handleComputeLatLngs();this.map.addSource(this.source,{type:"geojson",data:{type:"FeatureCollection",features:t}}),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 t,e,a,o,r,s;(t=this.map)!=null&&t.getLayer(this.layer)&&((e=this.map)==null||e.removeLayer(this.layer)),(a=this.map)!=null&&a.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))}}},sr=(t=>(i.pushScopeId("data-v-9f51b3f9"),t=t(),i.popScopeId(),t))(()=>i.createElementVNode("span",null,", ",-1));function nr(t,e,a,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:a.bottom})},[i.createElementVNode("span",null,i.toDisplayString(r.lngLat.lat.pretty),1),sr,i.createElementVNode("span",null,i.toDisplayString(r.lngLat.lng.pretty),1)],4)):i.createCommentVNode("",!0)}const Ce=C(or,[["render",nr],["__scopeId","data-v-9f51b3f9"]]),lr={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 t,e,a,o,r,s,l,n,c,h;if(this.show)(t=this.map)==null||t.getCanvas().addEventListener("keydown",this.handleKeydown),(e=this.map)==null||e.on("mousemove",this.handleMove),(a=this.map)==null||a.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 y of this.geojson)this.handleClear(y,!0);this.geojson=[],this.map&&(this.map.getCanvas().style.cursor="grab")}},handleKeydown(t){if(t.key==="Shift"){this.navigation=this.navigation==="RL"?"GC":"RL";const a=this.geojson.at(-1).features.filter(o=>o.geometry.type==="Point");a.length&&(a.at(-1).properties.mode=this.navigation)}},handleDrag(t){var a,o,r,s,l,n,c,h,y,d;const e=(o=(a=t.target)==null?void 0:a._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 b;return((b=p._element)==null?void 0:b.id)===e})[0].setLngLat([(s=(r=t.target)==null?void 0:r._lngLat)==null?void 0:s.lng,(n=(l=t.target)==null?void 0:l._lngLat)==null?void 0:n.lat]);let u;m.features.forEach((p,b)=>{if(p.geometry.type==="Point"&&p.properties.id==e.split("-")[1]){u=b;return}});const g=m.features.filter(p=>p.geometry.type==="Point");this.handleTmpPointUpdate(m,g[u-1],{lng:(h=(c=t.target)==null?void 0:c._lngLat)==null?void 0:h.lng,lat:(d=(y=t.target)==null?void 0:y._lngLat)==null?void 0:d.lat,properties:g[u].properties},u===g.length-1?void 0:g[u+1])}},handleDragEnd(t){var a,o,r,s,l,n,c,h,y,d;const e=(o=(a=t.target)==null?void 0:a._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=t.target)==null?void 0:r._lngLat)==null?void 0:s.lng,(n=(l=t.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=t.target)==null?void 0:c._lngLat)==null?void 0:h.lng,(d=(y=t.target)==null?void 0:y._lngLat)==null?void 0:d.lat],m.features=m.features.filter(g=>g.geometry.type==="Point"),this.handlePointUpdate(m)}},handleContextmenu(t){var a,o,r,s;t.preventDefault(),(a=this.contextmenu)==null||a.remove();const e=(s=(r=(o=t.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([t.lngLat.lng,t.lngLat.lat]).addTo(this.map)}}},handleClick(t){var a,o,r,s,l;(a=this.contextmenu)==null||a.remove();const e=t.originalEvent.target.className;if(e==="marker-close"){const n=(r=(o=t.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=t.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:[t.lngLat.lng,t.lngLat.lat]},{id:new Date().getTime().toString(),mode:this.navigation});n.features.push(c),this.handlePointUpdate(n)}},handlePointUpdate(t){const e=t.features;if(e.length>1){let a=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]},y=v.calculateDistance(c,h,n.mode==="RL",2),d=v.calculateBearing(c,h,n.mode==="RL",2);a=v.LngLatHelper.roundPrecision(a+y,2);let m;n.mode==="RL"?m=v.convertToMonotonicLng([c,h]):m=v.convertToMonotonicLng(v.interpolateCoordinates(c,h,200));const f=E.lineString(m.map(u=>[u.lng,u.lat]));f.properties.dist=y,f.properties.bearing=d,f.properties.total=a,o.push(f)}e.push(...o),t.total=a}return this.handleRender(t),t},handleTmpPointUpdate(t,e,a,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]},y={lng:a.lng,lat:a.lat};s=v.calculateDistance(h,y,c.mode==="RL",2),l=v.calculateBearing(h,y,c.mode==="RL",2);let d;c.mode==="RL"?d=v.convertToMonotonicLng([h,y]):d=v.convertToMonotonicLng(v.interpolateCoordinates(h,y,200));const m=E.lineString(d.map(f=>[f.lng,f.lat]));m.properties.dist=s,m.properties.bearing=l,r.features.push(m)}if(o){const c=a.properties,h=a,y={lng:o.geometry.coordinates[0],lat:o.geometry.coordinates[1]};s=v.calculateDistance(h,y,c.mode==="RL",2),l=v.calculateBearing(h,y,c.mode==="RL",2);let d;c.mode==="RL"?d=v.convertToMonotonicLng([h,y]):d=v.convertToMonotonicLng(v.interpolateCoordinates(h,y,200));const m=E.lineString(d.map(f=>[f.lng,f.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((t.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([a.lng,a.lat]);else{const c=document.createElement("div");c.className="tip-marker",c.innerHTML=n,this.tipMarker=new U.Marker(c).setOffset([140,0]).setLngLat([a.lng,a.lat]).addTo(this.map)}},handleMove(t){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 a=e.features.filter(o=>o.geometry.type==="Point");a!=null&&a.length&&this.handleTmpPointUpdate(e,a.at(-1),{lng:t.lngLat.lng,lat:t.lngLat.lat})},handleDblClick(t){t.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(t){var e;if((e=t==null?void 0:t.features)!=null&&e.length){const a=`${t.id}-${this.source}`,o=`${t.id}-${this.layer}`,r=`${t.id}-${this.labelLayer}`;this.map.getSource(a)?this.map.getSource(a).setData(t):this.map.addSource(a,{type:"geojson",data:t}),this.handleClear(t,!1),this.map.addLayer({id:o,type:"line",source:a,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:a,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=t.features.filter(l=>l.geometry.type==="Point");for(const l of s){const n=document.createElement("div");n.id=`${t.id}-${l.properties.id}`,n.className=`${t.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[t.id]?this.pointMarkers[t.id].push(c):this.pointMarkers[t.id]=[c]}if(t.closed){const l=s.at(-1),c=t.features.filter(y=>y.geometry.type==="LineString").at(-1),h=document.createElement("div");h.className="point-summary-marker",h.innerHTML=`<div id="${t.id}" class="marker-close">×</div><div class="marker-label">Tol: ${c.properties.total}nm</div>`,this.closeMarkers[t.id]=new U.Marker(h).setOffset([60,0]).setLngLat(l.geometry.coordinates).addTo(this.map)}}},handleClear(t,e=!0){var s,l,n,c,h,y,d,m,f;const a=`${t.id}-${this.source}`,o=`${t.id}-${this.layer}`,r=`${t.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[t.id])==null||h.remove(),this.closeMarkers[t.id]=void 0,(y=this.pointMarkers[t.id])==null||y.forEach(u=>{u==null||u.remove()}),this.pointMarkers[t.id]=[],(d=this.tipMarker)==null||d.remove(),this.tipMarker=void 0,e&&((m=this.map)!=null&&m.getSource(a))&&this.map.removeSource(a),e&&((f=this.map)!=null&&f.getSource(this.tmpSource))&&this.map.removeSource(this.tmpSource)}}};function cr(t,e,a,o,r,s){return i.openBlock(),i.createElementBlock("div")}const hr=C(lr,[["render",cr]]),Fo="",dr={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 t,e;this.right=(((t=document.getElementsByClassName("available-layers-show")[0])==null?void 0:t.clientWidth)||0)+(((e=document.getElementsByClassName("fleet-list-container")[0])==null?void 0:e.clientWidth)||0)+10},immediate:!0}},methods:{}},Pe=t=>(i.pushScopeId("data-v-2d85e33b"),t=t(),i.popScopeId(),t),pr={key:0},mr={class:"bar-item"},fr=[Pe(()=>i.createElementVNode("span",{class:"iconfont"},"HI",-1))],yr=[Pe(()=>i.createElementVNode("span",{class:"iconfont"},"I4",-1))];function gr(t,e,a,o,r,s){return a.enabled&&a.permission&r.helper.LEVEL.Supper?(i.openBlock(),i.createElementBlock("div",pr,[i.createElementVNode("div",{class:"menu-bar-box",style:i.normalizeStyle({position:"absolute",right:r.right+"px",bottom:a.bottom})},[i.createElementVNode("div",mr,[i.createElementVNode("div",{class:i.normalizeClass(r.vendor==="hi"?"menu-icon active":"menu-icon"),onClick:e[0]||(e[0]=l=>r.vendor="hi")},fr,2),i.createElementVNode("div",{class:i.normalizeClass(r.vendor==="i4"?"menu-icon active":"menu-icon"),onClick:e[1]||(e[1]=l=>r.vendor="i4")},yr,2)])],4)])):i.createCommentVNode("",!0)}const ur=C(dr,[["render",gr],["__scopeId","data-v-2d85e33b"]]),Go="",_r={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:bi,IdmGmdssArea:vi,IdmEcaZone:Ci,IdmAlertZone:Ti,IdmPort:Fi,IdmLoadLine:Gi,IdmTimezone:Ji,IdmVRA:Ki,IdmSpecialArea:tr,IdmTerminator:rr,IdmLatLng:Ce,IdmMeasure:hr,IdmPoint:gi,IdmENC:ur},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(t,e){t&&e&&O(t).utc().format("yyyy-MM-DD HH")!==O(e).utc().format("yyyy-MM-DD HH")&&this.$nextTick(()=>{this.handleDateChange({tropicals:!1})})},immediate:!0},map:{handler(){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())},immediate:!0},activeWeatherLayers:{handler(){var t,e,a,o,r,s,l,n,c,h,y,d,m,f,u,g,p;if(!this.map)return!1;this.activeWeatherLayers.some(b=>["wind","current"].includes(b.key))&&((t=this.particleFactor)!=null&&t.particle)||this.activeWeatherLayers.some(b=>["temp","water-temp"].includes(b.key))?((a=(e=this.map)==null?void 0:e.getLayer("grayland"))==null||a.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")&&((y=this.map)==null||y.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=(f=this.map)==null?void 0:f.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 t,e,a,o,r,s,l;this.activeWeatherLayers.some(n=>["wind","current"].includes(n.key))&&!((t=this.particleFactor)!=null&&t.particle)&&!this.activeWeatherLayers.some(n=>["temp","water-temp"].includes(n.key))&&((a=this.map)==null||a.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(t,e){var a,o,r,s;this.activeWeatherLayers.some(l=>["wind","temp","current"].includes(l.key))||((o=(a=this.map)==null?void 0:a.getLayer(t))==null||o.setLayoutProperty("visibility","visible"),(s=(r=this.map)==null?void 0:r.getLayer(e))==null||s.setLayoutProperty("visibility","none"))}}},methods:{async fetchWeatherLayers(t={tropicals:!1}){var r,s,l,n,c,h,y,d;const e=new Date().valueOf();let a=0,o=0;if(this.map){const m=((r=this.map)==null?void 0:r.getZoom())+1,f=(s=this.map)==null?void 0:s.getBounds(),u=`${f._sw.lng},${f._sw.lat},${f._ne.lng},${f._ne.lat}`;if(this.handleRampColorState(),this.particleFactor){const g=v.LayerHelper.WEATHER_LAYERS.find(p=>{var b;return((b=p.peer)==null?void 0:b.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(t.tropicals||this.weatherWeight&256&&(p=this.weatherLayers.tropicals,p&&(g-=256,p.version=Math.random()+1)),g>0){const b=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+a),console.log("weather links elapsed: ",o,", total: ",a+=o),((l=b==null?void 0:b.data)==null?void 0:l.code)===0){const _=(n=b==null?void 0:b.data)==null?void 0:n.data,w=[];for(const L in _)L==="ice-edge"&&(_[L]="https://idm-hz.oss-cn-hangzhou.aliyuncs.com/test/sea_ice_contours.geojson"),L!=="tropicals"&&w.push(H.get(_[L],{headers:{Authorization:this.token||this.defaultMeteoToken,key:L},responseType:/\.(jpg|png)$/.test(_[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})}),_.tropicals&&H.get(_.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+a),console.log("weather layers elapsed: ",o,", total: ",a+=o),this.weatherLayers["swell-direction"]||this.weatherLayers["swell-height"]){const _=(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:_,height:{raw:w},etime:this.ts}}if(this.weatherLayers["current-direction"]||this.weatherLayers["current-speed"]){const _=(y=this.weatherLayers["current-direction"])==null?void 0:y.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:_,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(t={all:!1,dayNight:!1,enc:!1}){var e,a,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(t.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=(a=n==null?void 0:n.data)==null?void 0:a.data,h=[];for(const d in c)h.push(H.get(c[d],{headers:{Authorization:this.token||this.defaultMeteoToken,key:d}}));const y=await Promise.all(h);this.otherLayers={enc:l},y.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),f=(p=(g=d==null?void 0:d.config)==null?void 0:g.headers)==null?void 0:p.key;this.otherLayers[f]=m})}}else if(t.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),f=(p=(g=d==null?void 0:d.config)==null?void 0:g.headers)==null?void 0:p.key;this.otherLayers[f]=m})}}}else this.otherLayers={enc:l}}else this.otherLayers={};this.handleBeforeLayerToggle()}},handleRampColorState(){var t;if(this.showRampColor=!1,this.showWindParticle=!1,this.showCurrentParticle=!1,(t=this.particleFactor)!=null&&t.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 t,e,a,o,r,s,l,n,c,h,y,d;this.viewport.map.getSource((t=this.viewport)==null?void 0:t.rampColorSource)||this.viewport.map.addSource((e=this.viewport)==null?void 0:e.rampColorSource,{type:"canvas",canvas:(a=this.viewport)==null?void 0:a.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:(y=this.viewport)==null?void 0:y.particleLayer,source:(d=this.viewport)==null?void 0:d.particleSource,layout:{visibility:"none"}},this.beforeLayer)},handleDragEndWithZoom4Json(){var h,y,d,m;const t=new Date().valueOf();let e=0,a=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 f in this.weatherLayers)if(this.weatherLayers[f].active&&this.weatherLayers[f].type==="json"){this.weatherLayers[f].active=!1,this.weatherLayers[f].version=Math.random()+1;let u=[];if(["swell","current"].includes(f)){const g=((y=this.weatherLayers[f])==null?void 0:y.direction)||{};for(const p in g)if(p>n&&p<c&&(!(r<=this.zoom)||p%(r<this.zoom/2?5:3)===0)){const b=g[p].lng;s>l?b.forEach((_,w)=>{var x;if((_>=s&&_<=180||_>=-180&&_<=l)&&(!(r<=this.zoom)||_%(r<this.zoom/2?5:3)===0)){const L=E.point([_,p],{val:g[p].val[w],spd:(x=g[p].spd)==null?void 0:x[w]});u.push(L)}}):b.forEach((_,w)=>{var x;if(_>=s&&_<=l&&(!(r<=this.zoom)||_%(r<this.zoom/2?5:3)===0)){const L=E.point([_,p],{val:g[p].val[w],spd:(x=g[p].spd)==null?void 0:x[w]});u.push(L)}})}if(a=new Date().valueOf()-(t+e),console.log("direction elapsed: ",a,", total: ",e+=a),f==="swell"){const p=this.weatherLayers[f].height;if(p){if(!p.data){const b=[];for(const _ in(d=p.raw)==null?void 0:d.LineString){const w=p.raw.LineString[_];for(const x of w)b.push(E.lineString(x,{val:Number(_)}));p.data=E.featureCollection(b)}}if(p.data){const b=this.handleBboxClip(p.data,o);u=u.concat(b)}a=new Date().valueOf()-(t+e),console.log("height elapsed: ",a,", total: ",e+=a)}}if(f==="current"){const p=this.weatherLayers[f].speed;if(p){if(!p.data){const _=[];for(const w in(m=p.raw)==null?void 0:m.Polygon){const x=p.raw.Polygon[w];for(const L of x)_.push(E.polygon(L,{val:Number(w)}))}p.data=E.featureCollection(_)}const b=r<this.zoom?p.data.features.filter(_=>_.properties.val>.5):p.data.features;u=u.concat(b),a=new Date().valueOf()-(t+e),console.log("speed elapsed: ",a,", total: ",e+=a)}}}else if(f==="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 b=g[p].lng;s>l?b.forEach((_,w)=>{if((_>=s&&_<=180||_>=-180&&_<=l)&&(!(r<=this.zoom)||_%(r<this.zoom/2?5:3)===0)){const x=E.point([_,p],{val:g[p].val[w],spd:g[p].spd[w]});u.push(x)}}):b.forEach((_,w)=>{if(_>=s&&_<=l&&(!(r<=this.zoom)||_%(r<this.zoom/2?5:3)===0)){const x=E.point([_,p],{val:g[p].val[w],spd:g[p].spd[w]});u.push(x)}})}a=new Date().valueOf()-(t+e),console.log("wind barb elapsed: ",a,", total: ",e+=a)}else if(f==="sig-wave-height"){if(this.weatherLayers[f].data)u=this.weatherLayers[f].data;else{const g=this.weatherLayers[f].raw;if(g){const p=[];for(const b in g.Polygon){const _=g.Polygon[b];for(const w of _)p.push(E.polygon(w,{val:Number(b)}))}u=u.concat(p)}}a=new Date().valueOf()-(t+e),console.log("sigWave elapsed: ",a,", total: ",e+=a)}else if(f==="prmsl"){if(this.weatherLayers[f].data)u=this.weatherLayers[f].data;else{const g=this.weatherLayers[f].raw;if(g){const p=[];for(const b in g.LineString){const _=g.LineString[b];for(const w of _)p.push(E.lineString(w,{val:Number(b)}))}for(const b in g.Point)g.Point[b].lng.forEach((_,w)=>{_=v.convertToStandardLng(_),p.push(E.point([_,b],{val:g.Point[b].val[w],type:g.Point[b].type[w]}))});u=u.concat(p)}}a=new Date().valueOf()-(t+e),console.log("prmsl elapsed: ",a,", total: ",e+=a)}else if(f==="arctic"||f==="iceberg"){if(this.weatherLayers[f].data)u=this.weatherLayers[f].data;else{const g=this.weatherLayers[f].raw;if(g){const p=[];for(const b in g.LineString){const _=g.LineString[b];for(const w of _)p.push(E.lineString(w,{val:Number(b)}))}u=u.concat(p)}}a=new Date().valueOf()-(t+e)}console.log(f," elapsed: ",a,", total: ",e+=a),u.length&&(this.weatherLayers[f].data=E.featureCollection(u)),this.weatherLayers[f].active=!0,this.weatherLayers[f].version=Math.random()+1}},handleDragEndWithZoom4Image(){for(const t in this.weatherLayers)this.weatherLayers[t].active&&this.weatherLayers[t].type==="image"&&(this.weatherLayers[t].active=!0,this.weatherLayers[t].version=Math.random()+1)},handleBboxClip(t,e){const a=[],o=v.convertToStandardLng(e._sw.lng),r=v.convertToStandardLng(e._ne.lng);return t.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&&a.push(n),l=[-180,e._sw.lat,r,e._ne.lat],n=E.bboxClip(s,l),n.geometry.coordinates.length&&a.push(n)}else{const l=[o,e._sw.lat,r,e._ne.lat],n=E.bboxClip(s,l);n.geometry.coordinates.length&&a.push(n)}else a.push(s)}),a},handleWeatherLayerToggle(){var t;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 a=e.key;a.indexOf("swell")>-1?a="swell":a.indexOf("current")>-1&&(a="current"),this.weatherLayers[a]&&(this.weatherLayers[a].active=!0,this.weatherLayers[a].version=Math.random()+1,((t=this.particleFactor)==null?void 0:t.key)===a&&this.weatherLayers[`${a}-particle`]&&(this.weatherLayers[`${a}-particle`].active=this.particleFactor.particle))}this.handleBeforeLayerToggle()},handleBeforeLayerToggle(){var t,e,a,o,r,s,l,n,c,h,y,d,m;(t=this.map)!=null&&t.getLayer(this.beforeLayer)&&((e=this.activeWeatherLayers)!=null&&e.length||(a=this.otherLayers)!=null&&a["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||(y=this.otherLayers)!=null&&y["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(t={tropicals:!1}){this.fetchWeatherLayers(t),this.fetchOtherLayers({dayNight:!0})},handleWeatherLayerChange(t,e,a){if(!this.map)setTimeout(()=>{this.handleWeatherLayerChange(t,e,a)},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!==a?(this.source=a,this.weatherWeight=s,this.fetchWeatherLayers({tropicals:!1})):this.handleWeatherLayerToggle()}},handleOtherLayerChange(t){if(!this.map)setTimeout(()=>{this.handleOtherLayerChange(t)},500);else{const e=t==null?void 0:t.reduce((a,o)=>a+(o==null?void 0:o.weight),0);this.otherWeight!=e&&(this.otherWeight=e,this.fetchOtherLayers({all:!0}))}},async handlePointChange(t){const e=this.ts?O(this.ts):O(),a={lat:t.lat,lng:t.lng,ts:e.utc().format(),wt:!0,src:this.source},o=await H.get(`${this.gateway}/api/arc/meteo/query`,{params:a,headers:{Authorization:this.token||this.defaultMeteoToken}});(o==null?void 0:o.status)===200&&(this.meteo={...o==null?void 0:o.data,...t})},handle3dToggle(t){t?this.map.setProjection("globe"):this.map.setProjection("mercator")},handleParticle(t){this.particleFactor=t,this.fetchWeatherLayers({tropicals:!1})}}},br={key:0,class:"map-gl-home"};function Lr(t,e,a,o,r,s){var j,Q,oe,se,ne,le,ce,he,de,pe,me,fe,ye,ge,ue,_e,be,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"),y=i.resolveComponent("IdmPrmsl"),d=i.resolveComponent("IdmIceberg"),m=i.resolveComponent("IdmTropicals"),f=i.resolveComponent("IdmCurrents"),u=i.resolveComponent("IdmCurrentParticle"),g=i.resolveComponent("IdmWindBarb"),p=i.resolveComponent("IdmWindParticle"),b=i.resolveComponent("IdmPrecip3h"),_=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"),M=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 a.map?(i.openBlock(),i.createElementBlock("div",br,[i.createVNode(l,i.mergeProps({ref:"layer",map:a.map,"toggle-version":r.toggleVersion},t.$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:a.map,token:a.token,enabled:(j=r.otherLayers)==null?void 0:j.enc,"toggle-version":r.toggleVersion},t.$attrs,{onEnc:e[4]||(e[4]=F=>r.enc=F)}),null,16,["map","token","enabled","toggle-version"]),i.createVNode(c,i.mergeProps({map:a.map,"sig-wave":(Q=r.weatherLayers)==null?void 0:Q["sig-wave-height"],"before-layer":a.beforeLayer},t.$attrs),null,16,["map","sig-wave","before-layer"]),i.createVNode(h,i.mergeProps({map:a.map,swell:(oe=r.weatherLayers)==null?void 0:oe.swell,"before-layer":a.beforeLayer},t.$attrs),null,16,["map","swell","before-layer"]),i.createVNode(y,i.mergeProps({map:a.map,prmsl:(se=r.weatherLayers)==null?void 0:se.prmsl,"before-layer":a.beforeLayer},t.$attrs),null,16,["map","prmsl","before-layer"]),i.createVNode(d,i.mergeProps({map:a.map,iceberg:(ne=r.weatherLayers)==null?void 0:ne.iceberg,"before-layer":a.beforeLayer},t.$attrs),null,16,["map","iceberg","before-layer"]),i.createVNode(m,i.mergeProps({map:a.map,date:a.ts,tropicals:(le=r.weatherLayers)==null?void 0:le.tropicals,"before-layer":a.beforeLayer},t.$attrs),null,16,["map","date","tropicals","before-layer"]),i.createVNode(f,i.mergeProps({map:a.map,current:(ce=r.weatherLayers)==null?void 0:ce.current,"before-layer":a.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},t.$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":a.beforeLayer,"toggle-version":r.toggleVersion},t.$attrs),null,16,["viewport","factor","before-layer","toggle-version"]),i.createVNode(g,i.mergeProps({ref:"windBarb",map:a.map,wind:(de=r.weatherLayers)==null?void 0:de.wind,current:(pe=r.weatherLayers)==null?void 0:pe.current,"before-layer":a.beforeLayer,"margin-bottom":r.showRampColor?"56px":"30px","show-particle":r.showWindParticle},t.$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":a.beforeLayer,"toggle-version":r.toggleVersion},t.$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.precip3h,"before-layer":a.beforeLayer,"toggle-version":r.toggleVersion},t.$attrs),null,16,["viewport","factor","before-layer","toggle-version"]),i.createVNode(_,i.mergeProps({viewport:r.viewport,factor:(ye=r.weatherLayers)==null?void 0:ye.visibility,"before-layer":a.beforeLayer,"toggle-version":r.toggleVersion},t.$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":a.beforeLayer,"toggle-version":r.toggleVersion},t.$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":a.beforeLayer,"toggle-version":r.toggleVersion},t.$attrs),null,16,["viewport","factor","before-layer","toggle-version"]),i.createVNode(L,i.mergeProps({viewport:r.viewport,factor:(_e=r.weatherLayers)==null?void 0:_e.arctic,"before-layer":a.beforeLayer,"toggle-version":r.toggleVersion},t.$attrs),null,16,["viewport","factor","before-layer","toggle-version"]),i.createVNode(S,i.mergeProps({map:a.map,zone:(be=r.otherLayers)==null?void 0:be["war-zones"],"before-layer":a.beforeLayer},t.$attrs),null,16,["map","zone","before-layer"]),i.createVNode(N,i.mergeProps({map:a.map,area:(Le=r.otherLayers)==null?void 0:Le["gmdss-areas"],"before-layer":a.beforeLayer},t.$attrs),null,16,["map","area","before-layer"]),i.createVNode(T,i.mergeProps({map:a.map,zone:(Se=r.otherLayers)==null?void 0:Se["eca-zones"],"before-layer":a.beforeLayer},t.$attrs),null,16,["map","zone","before-layer"]),i.createVNode($,i.mergeProps({map:a.map,zone:(Te=r.otherLayers)==null?void 0:Te["alert-zones"],"before-layer":a.beforeLayer},t.$attrs),null,16,["map","zone","before-layer"]),i.createVNode(R,i.mergeProps({map:a.map,port:(Ve=r.otherLayers)==null?void 0:Ve.ports,"before-layer":a.beforeLayer},t.$attrs),null,16,["map","port","before-layer"]),i.createVNode(z,i.mergeProps({map:a.map,line:(Ie=r.otherLayers)==null?void 0:Ie["load-lines"],"before-layer":a.beforeLayer},t.$attrs),null,16,["map","line","before-layer"]),i.createVNode(M,i.mergeProps({map:a.map,zone:($e=r.otherLayers)==null?void 0:$e["time-zones"],"before-layer":a.beforeLayer},t.$attrs),null,16,["map","zone","before-layer"]),i.createVNode(J,i.mergeProps({map:a.map,area:(Re=r.otherLayers)==null?void 0:Re["voluntary-reporting-area"],"before-layer":a.beforeLayer},t.$attrs),null,16,["map","area","before-layer"]),i.createVNode(ie,i.mergeProps({map:a.map,area:(De=r.otherLayers)==null?void 0:De["special-area"],"before-layer":a.beforeLayer},t.$attrs),null,16,["map","area","before-layer"]),i.createVNode(q,i.mergeProps({map:a.map,area:(Be=r.otherLayers)==null?void 0:Be["day-night"]},t.$attrs),null,16,["map","area"]),i.createVNode(P,i.mergeProps({map:a.map,show:r.showCoord,"toggle-version":r.toggleVersion},t.$attrs),null,16,["map","show","toggle-version"]),i.createVNode(B,i.mergeProps({map:a.map,show:r.showMeasure},t.$attrs),null,16,["map","show"]),i.createVNode(re,i.mergeProps({map:a.map,show:r.showPoint,meteo:r.meteo},t.$attrs,{onPoint:s.handlePointChange}),null,16,["map","show","meteo","onPoint"])])):i.createCommentVNode("",!0)}const Ne=C(_r,[["render",Lr]]),wr={install(t){t.component("MapboxGL",Ne),t.component("TropicalGL",xe),t.component("LatLngGL",Ce)}};k.LatLngGL=Ce,k.MapboxGL=Ne,k.MapboxGLPlugin=wr,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,y;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 f,u,g,p;return((f=d.properties)==null?void 0:f.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:(y=o[0])==null?void 0:y.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-dfdfd5f2"),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)),fa={class:"forecast-models"},ya=["onClick"],ga=i.createStaticVNode('<div class="row" style="padding:0;height:1px;margin:10px 0;background:var(--idm-black-1);" data-v-dfdfd5f2></div><div class="row" style="padding:2px 10px;" data-v-dfdfd5f2><div class="legend" data-v-dfdfd5f2><div class="icon td" data-v-dfdfd5f2></div><div class="label" data-v-dfdfd5f2>TD</div></div><div class="legend" data-v-dfdfd5f2><div class="icon ts" data-v-dfdfd5f2></div><div class="label" data-v-dfdfd5f2>TS</div></div><div class="legend" data-v-dfdfd5f2><div class="icon sts" data-v-dfdfd5f2></div><div class="label" data-v-dfdfd5f2>STS</div></div><div class="legend" data-v-dfdfd5f2><div class="icon ty" data-v-dfdfd5f2></div><div class="label" data-v-dfdfd5f2>TY</div></div><div class="legend" data-v-dfdfd5f2><div class="icon sty" data-v-dfdfd5f2></div><div class="label" data-v-dfdfd5f2>STY</div></div><div class="legend" data-v-dfdfd5f2><div class="icon supper-ty" data-v-dfdfd5f2></div><div class="label" data-v-dfdfd5f2>Super TY</div></div></div><div class="row" style="padding:2px 10px;" data-v-dfdfd5f2><div class="legend" data-v-dfdfd5f2><div class="icon history" data-v-dfdfd5f2></div><div class="label" data-v-dfdfd5f2>History</div></div><div class="legend" data-v-dfdfd5f2><div class="icon r7" data-v-dfdfd5f2></div><div class="label" data-v-dfdfd5f2>35kts Radii</div></div><div class="legend" data-v-dfdfd5f2><div class="icon r10" data-v-dfdfd5f2></div><div class="label" data-v-dfdfd5f2>50kts Radii</div></div></div>',3),ua={class:"more"};function _a(a,e,t,o,r,s){var l,n,c,h,y,d,m,f,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((y=r.activeTropicals)==null?void 0:y.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=(f=r.activeTropicals)==null?void 0:f.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(((b=(p=r.activeTropicals)==null?void 0:p.history)==null?void 0:b.kts)||"-")+"[kts]",1)]),i.createElementVNode("div",ca,[ha,i.createElementVNode("span",null,i.toDisplayString(((w=(_=r.activeTropicals)==null?void 0:_.history)==null?void 0:w.pressure)||"-")+"[hPa]",1)])]),i.createElementVNode("div",da,[i.createElementVNode("div",pa,[ma,i.createElementVNode("div",fa,[(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,ya)}),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",_a],["__scopeId","data-v-dfdfd5f2"]]),Kr="",ba={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(ba,[["render",va],["__scopeId","data-v-42b977ed"]]),no="",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"]]),yo="",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"]]),vo="",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"]]),Vo="",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"]]),zo="",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?`${O(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)}}}},W=a=>(i.pushScopeId("data-v-8b51d938"),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=W(()=>i.createElementVNode("label",null,"Wind",-1)),Qa={class:"flex-space"},ei=W(()=>i.createElementVNode("label",null,"Wind.Wave",-1)),ti={class:"flex-space"},ai=W(()=>i.createElementVNode("label",null,"Swell",-1)),ii={class:"flex-space"},ri=W(()=>i.createElementVNode("label",null,"Sig.Wave",-1)),oi={class:"flex-space"},si=W(()=>i.createElementVNode("label",null,"Current",-1)),ni={class:"flex-space"},li=W(()=>i.createElementVNode("label",null,"Precip",-1)),ci={class:"flex-space"},hi=W(()=>i.createElementVNode("label",null,"Visibility",-1)),di={class:"flex-space"},pi=W(()=>i.createElementVNode("label",null,"Temp",-1)),mi={class:"flex-space"},fi=W(()=>i.createElementVNode("label",null,"Water Temp",-1));function yi(a,e,t,o,r,s){var l,n,c,h,y,d,m,f,u,g,p,b,_,w,x,L,S,N,T,$,R,z,M,J,ie,q,P,B,re,j,Q,oe,se,ne,le,ce,he,de,pe,me,fe,ye,ge,ue,_e,be,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(((y=(h=t.meteo)==null?void 0:h.wind)==null?void 0:y.direction)||"-")+"/"+i.toDisplayString(s.roundPrecision((m=(d=t.meteo)==null?void 0:d.wind)==null?void 0:m.kts,1))+"[kts]/"+i.toDisplayString((u=(f=t.meteo)==null?void 0:f.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:b.wave)==null?void 0:_.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(((M=(z=(R=t.meteo)==null?void 0:R.wave)==null?void 0:z.swell)==null?void 0:M.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((ye=(fe=t.meteo)==null?void 0:fe.current)==null?void 0:ye.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(((_e=t.meteo)==null?void 0:_e.visibility)/1852,0))+"[nm]",1)]),i.createElementVNode("div",di,[pi,i.createElementVNode("span",null,i.toDisplayString(s.roundPrecision((be=t.meteo)==null?void 0:be.temp,0))+"[°C]",1)]),i.createElementVNode("div",mi,[fi,i.createElementVNode("span",null,i.toDisplayString(s.roundPrecision((Le=t.meteo)==null?void 0:Le.waterTemp,2))+"[°C]",1)])])])],512)),[[i.vShow,r.showMeteo]])}const gi=C(Ua,[["render",yi],["__scopeId","data-v-8b51d938"]]),ui={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 _i(a,e,t,o,r,s){return i.openBlock(),i.createElementBlock("div")}const bi=C(ui,[["render",_i]]),Li={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 wi(a,e,t,o,r,s){return i.openBlock(),i.createElementBlock("div")}const vi=C(Li,[["render",wi]]),Ei={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 xi(a,e,t,o,r,s){return i.openBlock(),i.createElementBlock("div")}const Ci=C(Ei,[["render",xi]]),Mo="",Si={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)}}},ki={id:"zone-info"},Pi=["innerHTML"];function Ni(a,e,t,o,r,s){var l;return i.withDirectives((i.openBlock(),i.createElementBlock("div",ki,[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,Pi)],512)),[[i.vShow,r.showZone]])}const Ti=C(Si,[["render",Ni],["__scopeId","data-v-d1cb4e6e"]]),Oo="",Vi={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),Ii={id:"port-info"},$i={class:"port-box"},Ri={class:"flex-start"},Di=we(()=>i.createElementVNode("label",null,"Name : ",-1)),Bi={class:"flex-start"},Ai=we(()=>i.createElementVNode("label",null,"Position : ",-1)),zi={class:"flex-start"},Mi=we(()=>i.createElementVNode("label",null,"LoCode : ",-1)),Oi={class:"flex-start",style:{"align-items":"flex-start"}},Wi=we(()=>i.createElementVNode("label",null,"Region : ",-1));function ji(a,e,t,o,r,s){return i.withDirectives((i.openBlock(),i.createElementBlock("div",Ii,[i.createElementVNode("div",{class:"close iconfont",onClick:e[0]||(e[0]=l=>r.showPort=!1)},""),i.createElementVNode("div",$i,[i.createElementVNode("div",Ri,[Di,i.createElementVNode("span",{onClick:e[1]||(e[1]=(...l)=>s.handleEmit&&s.handleEmit(...l))},i.toDisplayString(r.form.name),1)]),i.createElementVNode("div",Bi,[Ai,i.createElementVNode("span",null,i.toDisplayString(s.computeLat(r.form.lat))+", "+i.toDisplayString(s.computeLng(r.form.lng)),1)]),i.createElementVNode("div",zi,[Mi,i.createElementVNode("span",null,i.toDisplayString(r.form.loCode||"-"),1)]),i.createElementVNode("div",Oi,[Wi,i.createElementVNode("span",null,i.toDisplayString(r.form.city||"-")+", "+i.toDisplayString(r.form.country||"-"),1)])])],512)),[[i.vShow,r.showPort]])}const Fi=C(Vi,[["render",ji],["__scopeId","data-v-6fdfee96"]]),Ui={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 Hi(a,e,t,o,r,s){return i.openBlock(),i.createElementBlock("div")}const Gi=C(Ui,[["render",Hi]]),Xi={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 Zi(a,e,t,o,r,s){return i.openBlock(),i.createElementBlock("div")}const Ji=C(Xi,[["render",Zi]]),qi={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 Yi(a,e,t,o,r,s){return i.openBlock(),i.createElementBlock("div")}const Ki=C(qi,[["render",Yi]]),Qi={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 er(a,e,t,o,r,s){return i.openBlock(),i.createElementBlock("div")}const tr=C(Qi,[["render",er]]),ar={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 ir(a,e,t,o,r,s){return i.openBlock(),i.createElementBlock("div")}const rr=C(ar,[["render",ir]]),Wo="",or={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))}}},sr=(a=>(i.pushScopeId("data-v-9f51b3f9"),a=a(),i.popScopeId(),a))(()=>i.createElementVNode("span",null,", ",-1));function nr(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),sr,i.createElementVNode("span",null,i.toDisplayString(r.lngLat.lng.pretty),1)],4)):i.createCommentVNode("",!0)}const Ce=C(or,[["render",nr],["__scopeId","data-v-9f51b3f9"]]),lr={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 y of this.geojson)this.handleClear(y,!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,y,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 b;return((b=p._element)==null?void 0:b.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,b)=>{if(p.geometry.type==="Point"&&p.properties.id==e.split("-")[1]){u=b;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=(y=a.target)==null?void 0:y._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,y,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=(y=a.target)==null?void 0:y._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]},y=v.calculateDistance(c,h,n.mode==="RL",2),d=v.calculateBearing(c,h,n.mode==="RL",2);t=v.LngLatHelper.roundPrecision(t+y,2);let m;n.mode==="RL"?m=v.convertToMonotonicLng([c,h]):m=v.convertToMonotonicLng(v.interpolateCoordinates(c,h,200));const f=E.lineString(m.map(u=>[u.lng,u.lat]));f.properties.dist=y,f.properties.bearing=d,f.properties.total=t,o.push(f)}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]},y={lng:t.lng,lat:t.lat};s=v.calculateDistance(h,y,c.mode==="RL",2),l=v.calculateBearing(h,y,c.mode==="RL",2);let d;c.mode==="RL"?d=v.convertToMonotonicLng([h,y]):d=v.convertToMonotonicLng(v.interpolateCoordinates(h,y,200));const m=E.lineString(d.map(f=>[f.lng,f.lat]));m.properties.dist=s,m.properties.bearing=l,r.features.push(m)}if(o){const c=t.properties,h=t,y={lng:o.geometry.coordinates[0],lat:o.geometry.coordinates[1]};s=v.calculateDistance(h,y,c.mode==="RL",2),l=v.calculateBearing(h,y,c.mode==="RL",2);let d;c.mode==="RL"?d=v.convertToMonotonicLng([h,y]):d=v.convertToMonotonicLng(v.interpolateCoordinates(h,y,200));const m=E.lineString(d.map(f=>[f.lng,f.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(y=>y.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,y,d,m,f;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,(y=this.pointMarkers[a.id])==null||y.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&&((f=this.map)!=null&&f.getSource(this.tmpSource))&&this.map.removeSource(this.tmpSource)}}};function cr(a,e,t,o,r,s){return i.openBlock(),i.createElementBlock("div")}const hr=C(lr,[["render",cr]]),Fo="",dr={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),pr={key:0},mr={class:"bar-item"},fr=[Pe(()=>i.createElementVNode("span",{class:"iconfont"},"HI",-1))],yr=[Pe(()=>i.createElementVNode("span",{class:"iconfont"},"I4",-1))];function gr(a,e,t,o,r,s){return t.enabled&&t.permission&r.helper.LEVEL.Supper?(i.openBlock(),i.createElementBlock("div",pr,[i.createElementVNode("div",{class:"menu-bar-box",style:i.normalizeStyle({position:"absolute",right:r.right+"px",bottom:t.bottom})},[i.createElementVNode("div",mr,[i.createElementVNode("div",{class:i.normalizeClass(r.vendor==="hi"?"menu-icon active":"menu-icon"),onClick:e[0]||(e[0]=l=>r.vendor="hi")},fr,2),i.createElementVNode("div",{class:i.normalizeClass(r.vendor==="i4"?"menu-icon active":"menu-icon"),onClick:e[1]||(e[1]=l=>r.vendor="i4")},yr,2)])],4)])):i.createCommentVNode("",!0)}const ur=C(dr,[["render",gr],["__scopeId","data-v-2d85e33b"]]),Go="",_r={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:bi,IdmGmdssArea:vi,IdmEcaZone:Ci,IdmAlertZone:Ti,IdmPort:Fi,IdmLoadLine:Gi,IdmTimezone:Ji,IdmVRA:Ki,IdmSpecialArea:tr,IdmTerminator:rr,IdmLatLng:Ce,IdmMeasure:hr,IdmPoint:gi,IdmENC:ur},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&&O(a).utc().format("yyyy-MM-DD HH")!==O(e).utc().format("yyyy-MM-DD HH")&&this.$nextTick(()=>{this.handleDateChange({tropicals:!1})})},immediate:!0},map:{handler(){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())},immediate:!0},activeWeatherLayers:{handler(){var a,e,t,o,r,s,l,n,c,h,y,d,m,f,u,g,p;if(!this.map)return!1;this.activeWeatherLayers.some(b=>["wind","current"].includes(b.key))&&((a=this.particleFactor)!=null&&a.particle)||this.activeWeatherLayers.some(b=>["temp","water-temp"].includes(b.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")&&((y=this.map)==null||y.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=(f=this.map)==null?void 0:f.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,y,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,f=(s=this.map)==null?void 0:s.getBounds(),u=`${f._sw.lng},${f._sw.lat},${f._ne.lng},${f._ne.lat}`;if(this.handleRampColorState(),this.particleFactor){const g=v.LayerHelper.WEATHER_LAYERS.find(p=>{var b;return((b=p.peer)==null?void 0:b.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 b=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=b==null?void 0:b.data)==null?void 0:l.code)===0){const _=(n=b==null?void 0:b.data)==null?void 0:n.data,w=[];for(const L in _)L==="ice-edge"&&(_[L]="https://idm-hz.oss-cn-hangzhou.aliyuncs.com/test/sea_ice_contours.geojson"),L!=="tropicals"&&w.push(H.get(_[L],{headers:{Authorization:this.token||this.defaultMeteoToken,key:L},responseType:/\.(jpg|png)$/.test(_[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})}),_.tropicals&&H.get(_.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 _=(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:_,height:{raw:w},etime:this.ts}}if(this.weatherLayers["current-direction"]||this.weatherLayers["current-speed"]){const _=(y=this.weatherLayers["current-direction"])==null?void 0:y.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:_,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 y=await Promise.all(h);this.otherLayers={enc:l},y.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),f=(p=(g=d==null?void 0:d.config)==null?void 0:g.headers)==null?void 0:p.key;this.otherLayers[f]=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),f=(p=(g=d==null?void 0:d.config)==null?void 0:g.headers)==null?void 0:p.key;this.otherLayers[f]=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,y,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:(y=this.viewport)==null?void 0:y.particleLayer,source:(d=this.viewport)==null?void 0:d.particleSource,layout:{visibility:"none"}},this.beforeLayer)},handleDragEndWithZoom4Json(){var h,y,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 f in this.weatherLayers)if(this.weatherLayers[f].active&&this.weatherLayers[f].type==="json"){this.weatherLayers[f].active=!1,this.weatherLayers[f].version=Math.random()+1;let u=[];if(["swell","current"].includes(f)){const g=((y=this.weatherLayers[f])==null?void 0:y.direction)||{};for(const p in g)if(p>n&&p<c&&(!(r<=this.zoom)||p%(r<this.zoom/2?5:3)===0)){const b=g[p].lng;s>l?b.forEach((_,w)=>{var x;if((_>=s&&_<=180||_>=-180&&_<=l)&&(!(r<=this.zoom)||_%(r<this.zoom/2?5:3)===0)){const L=E.point([_,p],{val:g[p].val[w],spd:(x=g[p].spd)==null?void 0:x[w]});u.push(L)}}):b.forEach((_,w)=>{var x;if(_>=s&&_<=l&&(!(r<=this.zoom)||_%(r<this.zoom/2?5:3)===0)){const L=E.point([_,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),f==="swell"){const p=this.weatherLayers[f].height;if(p){if(!p.data){const b=[];for(const _ in(d=p.raw)==null?void 0:d.LineString){const w=p.raw.LineString[_];for(const x of w)b.push(E.lineString(x,{val:Number(_)}));p.data=E.featureCollection(b)}}if(p.data){const b=this.handleBboxClip(p.data,o);u=u.concat(b)}t=new Date().valueOf()-(a+e),console.log("height elapsed: ",t,", total: ",e+=t)}}if(f==="current"){const p=this.weatherLayers[f].speed;if(p){if(!p.data){const _=[];for(const w in(m=p.raw)==null?void 0:m.Polygon){const x=p.raw.Polygon[w];for(const L of x)_.push(E.polygon(L,{val:Number(w)}))}p.data=E.featureCollection(_)}const b=r<this.zoom?p.data.features.filter(_=>_.properties.val>.5):p.data.features;u=u.concat(b),t=new Date().valueOf()-(a+e),console.log("speed elapsed: ",t,", total: ",e+=t)}}}else if(f==="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 b=g[p].lng;s>l?b.forEach((_,w)=>{if((_>=s&&_<=180||_>=-180&&_<=l)&&(!(r<=this.zoom)||_%(r<this.zoom/2?5:3)===0)){const x=E.point([_,p],{val:g[p].val[w],spd:g[p].spd[w]});u.push(x)}}):b.forEach((_,w)=>{if(_>=s&&_<=l&&(!(r<=this.zoom)||_%(r<this.zoom/2?5:3)===0)){const x=E.point([_,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(f==="sig-wave-height"){if(this.weatherLayers[f].data)u=this.weatherLayers[f].data;else{const g=this.weatherLayers[f].raw;if(g){const p=[];for(const b in g.Polygon){const _=g.Polygon[b];for(const w of _)p.push(E.polygon(w,{val:Number(b)}))}u=u.concat(p)}}t=new Date().valueOf()-(a+e),console.log("sigWave elapsed: ",t,", total: ",e+=t)}else if(f==="prmsl"){if(this.weatherLayers[f].data)u=this.weatherLayers[f].data;else{const g=this.weatherLayers[f].raw;if(g){const p=[];for(const b in g.LineString){const _=g.LineString[b];for(const w of _)p.push(E.lineString(w,{val:Number(b)}))}for(const b in g.Point)g.Point[b].lng.forEach((_,w)=>{_=v.convertToStandardLng(_),p.push(E.point([_,b],{val:g.Point[b].val[w],type:g.Point[b].type[w]}))});u=u.concat(p)}}t=new Date().valueOf()-(a+e),console.log("prmsl elapsed: ",t,", total: ",e+=t)}else if(f==="arctic"||f==="iceberg"){if(this.weatherLayers[f].data)u=this.weatherLayers[f].data;else{const g=this.weatherLayers[f].raw;if(g){const p=[];for(const b in g.LineString){const _=g.LineString[b];for(const w of _)p.push(E.lineString(w,{val:Number(b)}))}u=u.concat(p)}}t=new Date().valueOf()-(a+e)}console.log(f," elapsed: ",t,", total: ",e+=t),u.length&&(this.weatherLayers[f].data=E.featureCollection(u)),this.weatherLayers[f].active=!0,this.weatherLayers[f].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,y,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||(y=this.otherLayers)!=null&&y["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?O(this.ts):O(),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})}}},br={key:0,class:"map-gl-home"};function Lr(a,e,t,o,r,s){var j,Q,oe,se,ne,le,ce,he,de,pe,me,fe,ye,ge,ue,_e,be,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"),y=i.resolveComponent("IdmPrmsl"),d=i.resolveComponent("IdmIceberg"),m=i.resolveComponent("IdmTropicals"),f=i.resolveComponent("IdmCurrents"),u=i.resolveComponent("IdmCurrentParticle"),g=i.resolveComponent("IdmWindBarb"),p=i.resolveComponent("IdmWindParticle"),b=i.resolveComponent("IdmPrecip3h"),_=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"),M=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",br,[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(y,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(f,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(b,i.mergeProps({viewport:r.viewport,factor:(fe=r.weatherLayers)==null?void 0:fe.precip3h,"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.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:(_e=r.weatherLayers)==null?void 0:_e.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:(be=r.otherLayers)==null?void 0:be["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(M,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(_r,[["render",Lr]]),wr={install(a){a.component("MapboxGL",Ne),a.component("TropicalGL",xe),a.component("LatLngGL",Ce)}};k.LatLngGL=Ce,k.MapboxGL=Ne,k.MapboxGLPlugin=wr,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-66a5718f],.idm-gl-layer .fade-leave-active[data-v-66a5718f]{transition:opacity .4s}.idm-gl-layer .fade-enter[data-v-66a5718f],.idm-gl-layer .fade-leave-to[data-v-66a5718f]{opacity:0}.idm-gl-layer .menu-bar-box[data-v-66a5718f]{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-66a5718f]{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-66a5718f]{padding:8px;display:flex}.idm-gl-layer .menu-bar-box .bar-item .menu-icon[data-v-66a5718f]:first-child{border-top-left-radius:5px;border-top-right-radius:5px}.idm-gl-layer .menu-bar-box .bar-item .menu-icon[data-v-66a5718f]: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-66a5718f]{font-size:20px;font-weight:600;color:var(--idm-black-8)}.idm-gl-layer .menu-bar-box .bar-item .menu-icon.active[data-v-66a5718f]{background:var(--idm-primary-color)}.idm-gl-layer .menu-bar-box .bar-item .menu-icon.active span[data-v-66a5718f]{color:var(--idm-white)}.idm-gl-layer .layer[data-v-66a5718f]{cursor:pointer;display:inline-flex;align-items:center;padding:5px 0}.idm-gl-layer .layer.disabled[data-v-66a5718f]{cursor:not-allowed}.idm-gl-layer .layer.disabled span[data-v-66a5718f]{color:var(--idm-black-6)}.idm-gl-layer .layer.active .checkbox[data-v-66a5718f]{border:var(--idm-primary-color);background:var(--idm-primary-color)}.idm-gl-layer .layer.active .checkbox[data-v-66a5718f]: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-66a5718f]{color:var(--idm-primary-color)}.idm-gl-layer .layer .checkbox[data-v-66a5718f]{width:16px;height:16px;margin-right:4px;border:1px solid var(--idm-black-8)}.idm-gl-layer .layer span[data-v-66a5718f]{color:var(--idm-black-8);font-size:14px;width:max-content}.idm-gl-layer .other-bars[data-v-66a5718f]{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-66a5718f]{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-66a5718f]{width:auto;padding:5px}.idm-gl-layer .available-layers[data-v-66a5718f]{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-66a5718f]{margin-right:10px;box-sizing:border-box}.idm-gl-layer .available-layers .side-bar i[data-v-66a5718f]{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-66a5718f]{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-66a5718f]{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-66a5718f]{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-66a5718f]{width:140px}.idm-gl-layer .available-layers .list-box .model-box[data-v-66a5718f]{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-66a5718f]{padding:3px 10px;border:1px solid #cecece}.idm-gl-layer .available-layers .list-box .model-box span.active[data-v-66a5718f]{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-66a5718f]:first-child{border-top-left-radius:5px;border-bottom-left-radius:5px}.idm-gl-layer .available-layers .list-box .model-box span[data-v-66a5718f]:last-child{border-top-right-radius:5px;border-bottom-right-radius:5px;border-left:none}.tool-bars[data-v-59d56055]{transition:all .4s ease-in-out}.tool-bars i[data-v-59d56055]{cursor:pointer;font-size:30px;color:var(--idm-white-8);text-shadow:var(--idm-text-shadow)}.tool-bars i.active[data-v-59d56055]{color:var(--idm-white)}.tool-bars span[data-v-59d56055]{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-59d56055]{color:var(--idm-white);background:var(--idm-primary-color)}.legend-bars[data-v-b7e5940e]{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-b7e5940e]{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-911e159b]{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-911e159b]{font-size:12px;text-align:center;color:var(--idm-white);width:36px}.active-tropical[data-v-dfdfd5f2]{bottom:unset;background:var(--idm-white-9);padding:10px;border-radius:5px;z-index:5}.active-tropical .header-box[data-v-dfdfd5f2]{min-width:360px;margin-bottom:10px;box-sizing:border-box;color:var(--idm-black-8)}.active-tropical .header-box .close-btn[data-v-dfdfd5f2]{position:relative;height:0px;text-align:right;font-size:22px;color:var(--idm-primary-color)}.active-tropical .header-box .main[data-v-dfdfd5f2]{font-size:16px}.active-tropical .header-box .sub[data-v-dfdfd5f2]{margin:3px 0;font-size:12px;color:var(--idm-info-color)}.active-tropical .main-box[data-v-dfdfd5f2]{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-dfdfd5f2]{padding:5px 0;border-radius:5px;background:var(--idm-gray-light)}.active-tropical .main-box .row[data-v-dfdfd5f2]{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-dfdfd5f2]{display:flex;align-items:center;justify-content:space-between}.active-tropical .main-box .row .col label[data-v-dfdfd5f2]{width:82px;margin-right:4px;color:var(--idm-info-color)}.active-tropical .main-box .row .col.col-24[data-v-dfdfd5f2]{width:100%}.active-tropical .main-box .row .col.col-left[data-v-dfdfd5f2]{width:55%}.active-tropical .main-box .row .col.col-right[data-v-dfdfd5f2]{width:40%}.forecast-models[data-v-dfdfd5f2]{display:flex;justify-content:flex-end;flex:1;margin-left:5px;flex-wrap:wrap}.forecast-models .model[data-v-dfdfd5f2]{font-size:12px;padding:0 6px 4px;display:flex;border:1px solid var(--idm-primary-color)}.forecast-models .model span[data-v-dfdfd5f2]{border-bottom:2px dashed var(--idm-white)}.forecast-models .model span.cma[data-v-dfdfd5f2]{border-color:#e2ea03cc}.forecast-models .model span.jma[data-v-dfdfd5f2]{border-color:#01d2b7cc}.forecast-models .model span.ecmwf[data-v-dfdfd5f2]{border-color:#f582f2cc}.forecast-models .model span.ukm[data-v-dfdfd5f2]{border-color:#4783f5cc}.forecast-models .model span.noaa-at[data-v-dfdfd5f2],.forecast-models .model span.noaa-ep[data-v-dfdfd5f2]{border-color:#9758fbcc}.forecast-models .model.active[data-v-dfdfd5f2]{border:1px solid var(--idm-primary-color);background-color:var(--idm-primary-color);color:var(--idm-white)}.forecast-models .model[data-v-dfdfd5f2]:first-child{border-top-left-radius:6px;border-bottom-left-radius:6px}.forecast-models .model.center-child[data-v-dfdfd5f2]{border-left:1px solid var(--idm-primary-color);border-right:1px solid var(--idm-primary-color)}.forecast-models .model[data-v-dfdfd5f2]:last-child{border-top-right-radius:6px;border-bottom-right-radius:6px}.legend[data-v-dfdfd5f2]{display:flex;align-items:center;color:var(--idm-info-color)}.legend .icon[data-v-dfdfd5f2]{height:14px;width:14px;border-radius:50%;border:3px solid #fff;margin-right:3px}.legend .icon.td[data-v-dfdfd5f2]{background-color:var(--idm-tropicals-td)}.legend .icon.ts[data-v-dfdfd5f2]{background-color:var(--idm-tropicals-ts)}.legend .icon.sts[data-v-dfdfd5f2]{background-color:var(--idm-tropicals-sts)}.legend .icon.ty[data-v-dfdfd5f2]{background-color:var(--idm-tropicals-ty)}.legend .icon.sty[data-v-dfdfd5f2]{background-color:var(--idm-tropicals-sty)}.legend .icon.supper-ty[data-v-dfdfd5f2]{background-color:var(--idm-tropicals-super-ty)}.legend .icon.r7[data-v-dfdfd5f2]{border:1.5px solid var(--idm-tropicals-r7)}.legend .icon.r10[data-v-dfdfd5f2]{border:1.5px solid var(--idm-tropicals-r10)}.legend .icon.history[data-v-dfdfd5f2]{border:none;border-radius:0;height:4px;background:var(--idm-black-5)}.legend .button[data-v-dfdfd5f2]{cursor:pointer;padding:0 4px;border-radius:4px;border:1px solid var(--idm-primary-color);color:var(--idm-primary-color)}.more[data-v-dfdfd5f2]{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-8b51d938]{bottom:unset}.point-meteo .meteo-box[data-v-8b51d938]{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}.point-meteo .meteo-box .header-box[data-v-8b51d938]{margin-bottom:10px;box-sizing:border-box;color:var(--idm-black-8)}.point-meteo .meteo-box .header-box .close[data-v-8b51d938]{position:relative;height:0px;text-align:right;font-size:22px;color:var(--idm-primary-color)}.point-meteo .meteo-box .header-box .main[data-v-8b51d938]{font-size:16px}.point-meteo .meteo-box .header-box .sub[data-v-8b51d938]{margin:3px 0;font-size:12px;color:var(--idm-info-color)}.point-meteo .meteo-box .main-box[data-v-8b51d938]{padding:0 5px;border-radius:5px;background:var(--idm-gray-light)}.point-meteo .meteo-box .main-box .flex-space[data-v-8b51d938]{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-8b51d938]{color:var(--idm-black-8)}.point-meteo .meteo-box .main-box .flex-space label[data-v-8b51d938]:after{content:":"}.point-meteo .meteo-box .main-box .flex-space[data-v-8b51d938]:last-child{border-bottom:none}.point-meteo .meteo-box .more[data-v-8b51d938]{margin-top:5px;color:var(--idm-primary-color);font-weight:700;cursor:pointer}.point-meteo[data-v-8b51d938]:after{display:block;width:8px;height:8px;border-radius:50%;content:"";background-color:var(--idm-black-3);margin-bottom:360px}.point-meteo[data-v-8b51d938]:before{display:block;content:"";width:2px;height:360px;margin-left:3px;border-left:2px solid var(--idm-black-2)}#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-66a5718f],.idm-gl-layer .fade-leave-active[data-v-66a5718f]{transition:opacity .4s}.idm-gl-layer .fade-enter[data-v-66a5718f],.idm-gl-layer .fade-leave-to[data-v-66a5718f]{opacity:0}.idm-gl-layer .menu-bar-box[data-v-66a5718f]{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-66a5718f]{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-66a5718f]{padding:8px;display:flex}.idm-gl-layer .menu-bar-box .bar-item .menu-icon[data-v-66a5718f]:first-child{border-top-left-radius:5px;border-top-right-radius:5px}.idm-gl-layer .menu-bar-box .bar-item .menu-icon[data-v-66a5718f]: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-66a5718f]{font-size:20px;font-weight:600;color:var(--idm-black-8)}.idm-gl-layer .menu-bar-box .bar-item .menu-icon.active[data-v-66a5718f]{background:var(--idm-primary-color)}.idm-gl-layer .menu-bar-box .bar-item .menu-icon.active span[data-v-66a5718f]{color:var(--idm-white)}.idm-gl-layer .layer[data-v-66a5718f]{cursor:pointer;display:inline-flex;align-items:center;padding:5px 0}.idm-gl-layer .layer.disabled[data-v-66a5718f]{cursor:not-allowed}.idm-gl-layer .layer.disabled span[data-v-66a5718f]{color:var(--idm-black-6)}.idm-gl-layer .layer.active .checkbox[data-v-66a5718f]{border:var(--idm-primary-color);background:var(--idm-primary-color)}.idm-gl-layer .layer.active .checkbox[data-v-66a5718f]: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-66a5718f]{color:var(--idm-primary-color)}.idm-gl-layer .layer .checkbox[data-v-66a5718f]{width:16px;height:16px;margin-right:4px;border:1px solid var(--idm-black-8)}.idm-gl-layer .layer span[data-v-66a5718f]{color:var(--idm-black-8);font-size:14px;width:max-content}.idm-gl-layer .other-bars[data-v-66a5718f]{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-66a5718f]{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-66a5718f]{width:auto;padding:5px}.idm-gl-layer .available-layers[data-v-66a5718f]{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-66a5718f]{margin-right:10px;box-sizing:border-box}.idm-gl-layer .available-layers .side-bar i[data-v-66a5718f]{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-66a5718f]{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-66a5718f]{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-66a5718f]{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-66a5718f]{width:140px}.idm-gl-layer .available-layers .list-box .model-box[data-v-66a5718f]{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-66a5718f]{padding:3px 10px;border:1px solid #cecece}.idm-gl-layer .available-layers .list-box .model-box span.active[data-v-66a5718f]{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-66a5718f]:first-child{border-top-left-radius:5px;border-bottom-left-radius:5px}.idm-gl-layer .available-layers .list-box .model-box span[data-v-66a5718f]:last-child{border-top-right-radius:5px;border-bottom-right-radius:5px;border-left:none}.tool-bars[data-v-59d56055]{transition:all .4s ease-in-out}.tool-bars i[data-v-59d56055]{cursor:pointer;font-size:30px;color:var(--idm-white-8);text-shadow:var(--idm-text-shadow)}.tool-bars i.active[data-v-59d56055]{color:var(--idm-white)}.tool-bars span[data-v-59d56055]{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-59d56055]{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-dfdfd5f2]{bottom:unset;background:var(--idm-white-9);padding:10px;border-radius:5px;z-index:5}.active-tropical .header-box[data-v-dfdfd5f2]{min-width:360px;margin-bottom:10px;box-sizing:border-box;color:var(--idm-black-8)}.active-tropical .header-box .close-btn[data-v-dfdfd5f2]{position:relative;height:0px;text-align:right;font-size:22px;color:var(--idm-primary-color)}.active-tropical .header-box .main[data-v-dfdfd5f2]{font-size:16px}.active-tropical .header-box .sub[data-v-dfdfd5f2]{margin:3px 0;font-size:12px;color:var(--idm-info-color)}.active-tropical .main-box[data-v-dfdfd5f2]{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-dfdfd5f2]{padding:5px 0;border-radius:5px;background:var(--idm-gray-light)}.active-tropical .main-box .row[data-v-dfdfd5f2]{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-dfdfd5f2]{display:flex;align-items:center;justify-content:space-between}.active-tropical .main-box .row .col label[data-v-dfdfd5f2]{width:82px;margin-right:4px;color:var(--idm-info-color)}.active-tropical .main-box .row .col.col-24[data-v-dfdfd5f2]{width:100%}.active-tropical .main-box .row .col.col-left[data-v-dfdfd5f2]{width:55%}.active-tropical .main-box .row .col.col-right[data-v-dfdfd5f2]{width:40%}.forecast-models[data-v-dfdfd5f2]{display:flex;justify-content:flex-end;flex:1;margin-left:5px;flex-wrap:wrap}.forecast-models .model[data-v-dfdfd5f2]{font-size:12px;padding:0 6px 4px;display:flex;border:1px solid var(--idm-primary-color)}.forecast-models .model span[data-v-dfdfd5f2]{border-bottom:2px dashed var(--idm-white)}.forecast-models .model span.cma[data-v-dfdfd5f2]{border-color:#e2ea03cc}.forecast-models .model span.jma[data-v-dfdfd5f2]{border-color:#01d2b7cc}.forecast-models .model span.ecmwf[data-v-dfdfd5f2]{border-color:#f582f2cc}.forecast-models .model span.ukm[data-v-dfdfd5f2]{border-color:#4783f5cc}.forecast-models .model span.noaa-at[data-v-dfdfd5f2],.forecast-models .model span.noaa-ep[data-v-dfdfd5f2]{border-color:#9758fbcc}.forecast-models .model.active[data-v-dfdfd5f2]{border:1px solid var(--idm-primary-color);background-color:var(--idm-primary-color);color:var(--idm-white)}.forecast-models .model[data-v-dfdfd5f2]:first-child{border-top-left-radius:6px;border-bottom-left-radius:6px}.forecast-models .model.center-child[data-v-dfdfd5f2]{border-left:1px solid var(--idm-primary-color);border-right:1px solid var(--idm-primary-color)}.forecast-models .model[data-v-dfdfd5f2]:last-child{border-top-right-radius:6px;border-bottom-right-radius:6px}.legend[data-v-dfdfd5f2]{display:flex;align-items:center;color:var(--idm-info-color)}.legend .icon[data-v-dfdfd5f2]{height:14px;width:14px;border-radius:50%;border:3px solid #fff;margin-right:3px}.legend .icon.td[data-v-dfdfd5f2]{background-color:var(--idm-tropicals-td)}.legend .icon.ts[data-v-dfdfd5f2]{background-color:var(--idm-tropicals-ts)}.legend .icon.sts[data-v-dfdfd5f2]{background-color:var(--idm-tropicals-sts)}.legend .icon.ty[data-v-dfdfd5f2]{background-color:var(--idm-tropicals-ty)}.legend .icon.sty[data-v-dfdfd5f2]{background-color:var(--idm-tropicals-sty)}.legend .icon.supper-ty[data-v-dfdfd5f2]{background-color:var(--idm-tropicals-super-ty)}.legend .icon.r7[data-v-dfdfd5f2]{border:1.5px solid var(--idm-tropicals-r7)}.legend .icon.r10[data-v-dfdfd5f2]{border:1.5px solid var(--idm-tropicals-r10)}.legend .icon.history[data-v-dfdfd5f2]{border:none;border-radius:0;height:4px;background:var(--idm-black-5)}.legend .button[data-v-dfdfd5f2]{cursor:pointer;padding:0 4px;border-radius:4px;border:1px solid var(--idm-primary-color);color:var(--idm-primary-color)}.more[data-v-dfdfd5f2]{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-8b51d938]{bottom:unset}.point-meteo .meteo-box[data-v-8b51d938]{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}.point-meteo .meteo-box .header-box[data-v-8b51d938]{margin-bottom:10px;box-sizing:border-box;color:var(--idm-black-8)}.point-meteo .meteo-box .header-box .close[data-v-8b51d938]{position:relative;height:0px;text-align:right;font-size:22px;color:var(--idm-primary-color)}.point-meteo .meteo-box .header-box .main[data-v-8b51d938]{font-size:16px}.point-meteo .meteo-box .header-box .sub[data-v-8b51d938]{margin:3px 0;font-size:12px;color:var(--idm-info-color)}.point-meteo .meteo-box .main-box[data-v-8b51d938]{padding:0 5px;border-radius:5px;background:var(--idm-gray-light)}.point-meteo .meteo-box .main-box .flex-space[data-v-8b51d938]{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-8b51d938]{color:var(--idm-black-8)}.point-meteo .meteo-box .main-box .flex-space label[data-v-8b51d938]:after{content:":"}.point-meteo .meteo-box .main-box .flex-space[data-v-8b51d938]:last-child{border-bottom:none}.point-meteo .meteo-box .more[data-v-8b51d938]{margin-top:5px;color:var(--idm-primary-color);font-weight:700;cursor:pointer}.point-meteo[data-v-8b51d938]:after{display:block;width:8px;height:8px;border-radius:50%;content:"";background-color:var(--idm-black-3);margin-bottom:360px}.point-meteo[data-v-8b51d938]:before{display:block;content:"";width:2px;height:360px;margin-left:3px;border-left:2px solid var(--idm-black-2)}#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,7 +1,7 @@
1
1
  {
2
2
  "name": "@idmwx/idmui-gl3",
3
3
  "private": false,
4
- "version": "3.4.3",
4
+ "version": "3.4.4",
5
5
  "description": "idm webgl3",
6
6
  "type": "module",
7
7
  "keywords": [