@idmwx/idmui-report 4.7.1 → 4.7.2

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
@@ -912,7 +912,7 @@ const BM = {
912
912
  computeMajorPoints() {
913
913
  return function(i, l) {
914
914
  const s = [];
915
- if (l.length)
915
+ if (l != null && l.length)
916
916
  return l.forEach((D) => {
917
917
  s.push(D), D.suspend && (i != null && i.useRouteParam) && s.push({
918
918
  etd: D.etd,
@@ -1493,7 +1493,7 @@ function SD(i, l, s, D, M, d) {
1493
1493
  }, null, 8, gr)
1494
1494
  ]),
1495
1495
  t("div", ur, [
1496
- l[19] || (l[19] = et('<div class="legend" data-v-1e7923d0><label style="background-color:var(--idm-dangerous);" data-v-1e7923d0></label><span data-v-1e7923d0>Dangerous</span></div><div class="legend" data-v-1e7923d0><label style="background-color:var(--idm-severe);" data-v-1e7923d0></label><span data-v-1e7923d0>Severe</span></div><div class="legend" data-v-1e7923d0><label style="background-color:var(--idm-heavy);" data-v-1e7923d0></label><span data-v-1e7923d0>Heavy</span></div>', 3)),
1496
+ l[19] || (l[19] = et('<div class="legend" data-v-c0d12831><label style="background-color:var(--idm-dangerous);" data-v-c0d12831></label><span data-v-c0d12831>Dangerous</span></div><div class="legend" data-v-c0d12831><label style="background-color:var(--idm-severe);" data-v-c0d12831></label><span data-v-c0d12831>Severe</span></div><div class="legend" data-v-c0d12831><label style="background-color:var(--idm-heavy);" data-v-c0d12831></label><span data-v-c0d12831>Heavy</span></div>', 3)),
1497
1497
  t("div", cr, [
1498
1498
  l[16] || (l[16] = t("b", { class: "route1" }, null, -1)),
1499
1499
  t("span", {
@@ -1706,7 +1706,7 @@ function SD(i, l, s, D, M, d) {
1706
1706
  }, null, 40, Kr))
1707
1707
  ]),
1708
1708
  t("div", qr, [
1709
- l[51] || (l[51] = et('<div class="major-header" data-v-1e7923d0><div class="cell-item flex" style="flex:1.5;" data-v-1e7923d0>Major waypoint</div><div class="cell-item flex" data-v-1e7923d0>Time</div><div class="cell-item flex" data-v-1e7923d0>Nav</div><div class="cell-item flex" data-v-1e7923d0>Dist</div><div class="cell-item flex" data-v-1e7923d0>SOG/COG</div><div class="cell-item flex" data-v-1e7923d0>Memo</div></div>', 1)),
1709
+ l[51] || (l[51] = et('<div class="major-header" data-v-c0d12831><div class="cell-item flex" style="flex:1.5;" data-v-c0d12831>Major waypoint</div><div class="cell-item flex" data-v-c0d12831>Time</div><div class="cell-item flex" data-v-c0d12831>Nav</div><div class="cell-item flex" data-v-c0d12831>Dist</div><div class="cell-item flex" data-v-c0d12831>SOG/COG</div><div class="cell-item flex" data-v-c0d12831>Memo</div></div>', 1)),
1710
1710
  t("div", $r, [
1711
1711
  (fl = (Ul = s.plan) == null ? void 0 : Ul.speeds) != null && fl.length ? (n(!0), a(U, { key: 0 }, it(d.computeMajorPoints((ml = (Ol = (bl = (El = s.plan) == null ? void 0 : El.speeds) == null ? void 0 : bl[M.speedIndex]) == null ? void 0 : Ol.speed) == null ? void 0 : ml.argv, (Rl = (hl = (kl = (Ql = (Sl = s.plan) == null ? void 0 : Sl.speeds) == null ? void 0 : Ql[M.speedIndex]) == null ? void 0 : kl.speed) == null ? void 0 : hl.sample) == null ? void 0 : Rl.wps), (T, Pt) => (n(), a("div", {
1712
1712
  key: Pt,
@@ -1882,7 +1882,7 @@ function SD(i, l, s, D, M, d) {
1882
1882
  ])
1883
1883
  ]);
1884
1884
  }
1885
- const ma = /* @__PURE__ */ Xt(BM, [["render", SD], ["__scopeId", "data-v-1e7923d0"]]);
1885
+ const ma = /* @__PURE__ */ Xt(BM, [["render", SD], ["__scopeId", "data-v-c0d12831"]]);
1886
1886
  const QD = {
1887
1887
  name: "RouteReport",
1888
1888
  components: {
@@ -1,4 +1,4 @@
1
- (function(B,de){typeof exports=="object"&&typeof module<"u"?de(exports,require("@idm-plugin/geo"),require("moment"),require("vue"),require("echarts"),require("@wangeditor/editor-for-vue"),require("element-plus"),require("@idmui/tropical"),require("@element-plus/icons-vue"),require("axios"),require("mapbox-gl"),require("@idmui/precip")):typeof define=="function"&&define.amd?define(["exports","@idm-plugin/geo","moment","vue","echarts","@wangeditor/editor-for-vue","element-plus","@idmui/tropical","@element-plus/icons-vue","axios","mapbox-gl","@idmui/precip"],de):(B=typeof globalThis<"u"?globalThis:B||self,de(B["idmui-report"]={},B["@idm-plugin/geo"],B.moment,B.Vue,B.echarts,B["@wangeditor/editor-for-vue"],B["element-plus"],B["@idmui/tropical"],B["@element-plus/icons-vue"],B.axios,B["mapbox-gl"],B["@idmui/precip"]))})(this,function(B,de,F,e,Ld,Ns,cs,Zd,Qn,bn,hn,Hd){"use strict";function Jd(o){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const l in o)if(l!=="default"){const d=Object.getOwnPropertyDescriptor(o,l);Object.defineProperty(t,l,d.get?d:{enumerable:!0,get:()=>o[l]})}}return t.default=o,Object.freeze(t)}const Rn=Jd(Ld),ew="",Re=(o,t)=>{const l=o.__vccOpts||o;for(const[d,i]of t)l[d]=i;return l},_d={name:"IdmBrand",props:{name:{type:String,default:""},issued:{type:String,default:""}},computed:{computeUTCTime(){return function(o,t="MMM-DD/HHmm[Z]"){return`${(o?F(o):F()).utc().format(t)}`}}}},Xd={class:"section brand-section flex-space"},Kd={class:"report-box flex-space"},ud={class:"name flex-start"},qd={class:"flex-start",style:{"flex-wrap":"wrap",width:"200px"}},$d={class:"flex-start",style:{width:"100%"}},vd={class:"label-block flex-evenly",style:{flex:"1"}},er={class:"flex-end",style:{flex:"2"}};function tr(o,t,l,d,i,a){return e.openBlock(),e.createElementBlock("div",Xd,[t[2]||(t[2]=e.createStaticVNode('<div class="logo-box flex-center" data-v-7679e32b><div class="logo" data-v-7679e32b><a href="https://fmp.idmwx.com" target="_blank" data-v-7679e32b><img src="https://img.idmwx.com/asset/orm/logo_300x180.png" data-v-7679e32b></a><a href="https://fmp.idmwx.com" target="_blank" style="text-decoration:none;" data-v-7679e32b><div class="brand" data-v-7679e32b><span style="text-decoration:underline;" data-v-7679e32b>Weather Routing</span><div class="company" data-v-7679e32b>Ocean Right Marine Service</div></div></a></div></div>',1)),e.createElementVNode("div",Kd,[e.createElementVNode("div",ud,e.toDisplayString(l.name),1),e.createElementVNode("div",qd,[e.createElementVNode("div",$d,[e.createElementVNode("div",vd,[t[0]||(t[0]=e.createElementVNode("label",{class:"flex-end",style:{flex:"1"}},"Issued",-1)),e.createElementVNode("span",er,e.toDisplayString(a.computeUTCTime(l.issued,"MMM-DD, YYYY")),1)])]),t[1]||(t[1]=e.createElementVNode("div",{class:"flex-start",style:{width:"100%"}},[e.createElementVNode("div",{class:"label-block flex-evenly",style:{flex:"1"}},[e.createElementVNode("label",{class:"flex-end",style:{flex:"1"}},"Mail to"),e.createElementVNode("a",{class:"flex-end",style:{flex:"2"},href:"mailto:op@ormwx.com"},"op@ormwx.com")])],-1))])])])}const ql=Re(_d,[["render",tr],["__scopeId","data-v-7679e32b"]]),lr={name:"IdmLoading",props:{loading:{type:Boolean,default:!1},text:{type:String,default:"Loading..."}},emits:["timeout"],watch:{loading:{handler(){this.loading&&setTimeout(()=>{this.$emit("timeout",!1)},5e3)},immediate:!0}}},or={key:0,class:"loading"};function nr(o,t,l,d,i,a){return l.loading?(e.openBlock(),e.createElementBlock("div",or,[t[0]||(t[0]=e.createElementVNode("i",{class:"iconfont"},"",-1)),e.createElementVNode("div",null,e.toDisplayString(l.text),1)])):e.createCommentVNode("",!0)}const Fn=Re(lr,[["render",nr]]),tw="",ar={name:"ORMPointReport",components:{IdmLoading:Fn,IdmBrand:ql},props:{report:{type:Object,default:()=>({})},showPrate:{type:Boolean,default:!1},showAcc:{type:Boolean,default:!0}},data(){return{echart:void 0,localTZ:"0",loading:!0}},computed:{computeLat(){return function(o){return de.LngLatHelper.lat2pretty(o,2)}},computeLng(){return function(o){return de.LngLatHelper.lng2pretty(o,2)}},computeLTime(){return function(o,t=8,l="MMM-DD/HHmm[LT]"){return`${F(o).utcOffset(t).format(l)}`}},computeTZ(){return function(o="0"){return de.LngLatHelper.prettyTimeZoneOffset(o)}},roundPrecision(){return function(o,t=4){if(typeof o=="number"){const l=Number("1".padEnd(t+1,"0"));return Math.round(o*l)/l}else return"-"}},computeDegree(){return function(o,t){o=o%360;for(let l=0;l<17;l++)if(l*22.5+o+11.25>=360){let d=(16-l)*22.5;return t||(d=d+180),`transform:rotate(${d}deg);height:1rem;width:1rem;margin-left:3px`}}},computeForm(){return function(o){var d,i,a,N,s,c,E,I,D,M;const t={};for(let x=0;x<((i=(d=o==null?void 0:o.extend)==null?void 0:d.data)==null?void 0:i.length);x++){const A=(a=o==null?void 0:o.extend)==null?void 0:a.data[x];if(x===0)A.precip.pacc=0;else{const p=(N=o==null?void 0:o.extend)==null?void 0:N.data[x-1],V=F(A.utc).utcOffset(this.localTZ),y=F(p.utc).utcOffset(this.localTZ),z=(s=p==null?void 0:p.precip)==null?void 0:s.prate,T=V.diff(y,"h"),C=this.roundPrecision(z*T,1);if(A.precip.pacc=C,C>0){const g=t[V.format("MMM-DD")],U=Math.floor(V.get("hour")/6);g?(g.pacc=this.roundPrecision(g.pacc+C,1),g[`${U}`]?g[`${U}`]+=C:(g[`${U}`]=C,g.colspan+=1)):(t[V.format("MMM-DD")]={pacc:C,colspan:1},t[V.format("MMM-DD")][`${U}`]=C)}}}o.paccInDays=t;let l=0;for(const x of Object.keys(t))l+=(c=t[x])==null?void 0:c.colspan,t[x].level=((E=t[x])==null?void 0:E.pacc)<10?"Light":((I=t[x])==null?void 0:I.pacc)<24.9?"Moderate":((D=t[x])==null?void 0:D.pacc)<49.9?"Heavy":((M=t[x])==null?void 0:M.pacc)<99.9?"Rainstorm":"HeavyRainstorm";return o.span=l,o}}},watch:{report:{handler(){var o,t,l,d;(t=(o=this.report)==null?void 0:o.extend)!=null&&t.data&&(this.loading=!1,this.localTZ=de.LngLatHelper.guessTimeZoneOffset((l=this.report)==null?void 0:l.lng,(d=this.report)==null?void 0:d.lat),this.$nextTick(()=>{this.initEchart()}))},immediate:!0}},methods:{initEchart(){var a,N,s;this.echart||(this.echart=e.markRaw(Rn.init(this.$refs.echart)));const o=[],t=[],l={dateTime:0,windSpeed:1,gusts:2,waveHeight:3,windDirection:4,windDegree:5,windScale:6,current:7,precip:8,visibility:9,temp:10};let d=4;(s=(N=(a=this.report)==null?void 0:a.extend)==null?void 0:N.data)==null||s.forEach(c=>{var I,D,M,x,A,p,V,y,z,T,C,g,U;const E=F(c.utc).utcOffset(this.localTZ).format("MMM-DD/HHmm[LT]");o.push(E),d=((D=(I=c.wave)==null?void 0:I.sig)==null?void 0:D.height)>d?(x=(M=c.wave)==null?void 0:M.sig)==null?void 0:x.height:d,t.push([E,(A=c.wind)==null?void 0:A.kts,(p=c.gusts)==null?void 0:p.kts,(y=(V=c.wave)==null?void 0:V.sig)==null?void 0:y.height,(z=c.wind)==null?void 0:z.direction,(T=c.wind)==null?void 0:T.degree,(C=c.wind)==null?void 0:C.scale,(g=c.current)==null?void 0:g.kts,(U=c.precip)==null?void 0:U.acc,this.roundPrecision(c.visibility/1852,0),c.temp])});const i={animation:!1,title:{text:"Weather Conditions",subtext:"Wind/Gusts/Sig.Wave/Visibility/Precip Acc",textStyle:{color:"#000000B3",fontWeight:"500"},left:"left"},legend:{show:!0,right:0},tooltip:{trigger:"axis"},grid:{bottom:35},xAxis:[{data:o}],yAxis:[{name:"Precip Acc (mm)",nameLocation:"middle",position:"left",nameGap:30,axisLine:{lineStyle:{color:"#f85c5c"}}},{name:"Visibility (nm)",nameLocation:"middle",position:"left",offset:45,nameGap:30,axisLine:{lineStyle:{color:"#de8600"}}},{name:"Sig. Wave Height (m)",nameLocation:"middle",position:"right",nameGap:25,max:d,axisLine:{lineStyle:{color:"#015DD5"}},splitLine:{show:!1}},{name:"Wind Speed (kts)",nameLocation:"middle",position:"right",offset:40,nameGap:25,axisLine:{lineStyle:{color:"#0e6500"}}}],visualMap:{type:"piecewise",orient:"horizontal",left:"center",bottom:0,show:!1,pieces:[{gte:17,color:"#f85c5c",label:"≥ BF5"},{gte:11,lt:17,color:"#de8600",label:"BF4"},{lt:11,color:"#67c23a",label:"< BF4"}],seriesIndex:3,dimension:1},series:[{type:"bar",name:"Precip Acc",yAxisIndex:0,showSymbol:!1,encode:{x:l.dateTime,y:l.precip},lineStyle:{color:"#f85c5c",type:"solid"},itemStyle:{color:"#f85c5c"},data:t,z:4},{type:"line",name:"Visibility",yAxisIndex:1,showSymbol:!1,encode:{x:l.dateTime,y:l.visibility},lineStyle:{color:"#de8600",type:"solid"},itemStyle:{color:"#de8600"},data:t,z:3},{name:"Sig. Wave Height",type:"line",showSymbol:!1,yAxisIndex:2,areaStyle:{color:{type:"linear",x:0,y:0,x2:0,y2:1,global:!1,colorStops:[{offset:0,color:"rgba(88, 160, 253, 1)"},{offset:.5,color:"rgba(88, 160, 253, 0.7)"},{offset:1,color:"rgba(88, 160, 253, 0)"}]}},lineStyle:{color:"rgba(88, 160, 253, 1)"},itemStyle:{color:"rgba(88, 160, 253, 1)"},encode:{x:l.dateTime,y:l.waveHeight},data:t,z:1},{name:"Wind Speed",type:"line",showSymbol:!1,yAxisIndex:3,encode:{x:l.dateTime,y:l.windSpeed},lineStyle:{color:"#398626",type:"solid"},itemStyle:{color:"#398626"},data:t,z:2},{type:"line",name:"Gusts",showSymbol:!1,yAxisIndex:3,encode:{x:l.dateTime,y:l.gusts},lineStyle:{color:"#0e6500",type:"dashed"},itemStyle:{color:"#0e6500"},data:t,z:2}]};this.echart.setOption(i)}}},ir={class:"point-report"},sr={class:"section info-section"},dr={class:"flex-evenly"},rr={class:"flex-space label-block",style:{width:"100%"}},cr={class:"flex-space label-block",style:{width:"100%"}},Nr={class:"flex-evenly"},Dr={class:"flex-space label-block",style:{width:"100%"}},Mr={class:"flex-space label-block",style:{width:"100%"}},gr={class:"flex-end",style:{width:"180px"}},mr={class:"section echart-section"},Er={ref:"echart",class:"echart"},yr={class:"section sample-section"},Ir=["colspan"],Ar={key:0},pr={key:1},Vr={width:"120px"},Tr={key:0,class:"degree-box"},xr={key:1},zr={key:0,class:"degree-box"},Cr={key:1},Sr={key:0,class:"degree-box"},kr={key:1},jr={key:0,class:"degree-box"},Ur={key:1},fr={key:0},br={key:1};function Or(o,t,l,d,i,a){var c,E,I,D;const N=e.resolveComponent("IdmBrand"),s=e.resolveComponent("IdmLoading");return e.openBlock(),e.createElementBlock("div",ir,[e.createVNode(N,{name:"Point Weather Forecast"}),e.createVNode(s,{loading:i.loading},null,8,["loading"]),e.createElementVNode("div",sr,[e.createElementVNode("div",dr,[e.createElementVNode("div",rr,[t[0]||(t[0]=e.createElementVNode("label",{class:"flex-end",style:{width:"180px"}},"Position",-1)),e.createElementVNode("span",null,e.toDisplayString(a.computeLat((c=l.report)==null?void 0:c.lat).pretty)+" / "+e.toDisplayString(a.computeLng((E=l.report)==null?void 0:E.lng).pretty),1)]),e.createElementVNode("div",cr,[t[1]||(t[1]=e.createElementVNode("label",{class:"flex-end",style:{width:"180px"}},"Issued (+00:00)",-1)),e.createElementVNode("span",null,e.toDisplayString(a.computeLTime(l.report.updatedAt,0,"YYYY, MMM-DD/HHmm[Z]")),1)])]),e.createElementVNode("div",Nr,[e.createElementVNode("div",Dr,[t[2]||(t[2]=e.createElementVNode("label",{class:"flex-end",style:{width:"180px"}},"Timezone",-1)),e.createElementVNode("span",null,e.toDisplayString(a.computeTZ(i.localTZ)),1)]),e.createElementVNode("div",Mr,[e.createElementVNode("label",gr,"("+e.toDisplayString(a.computeTZ(i.localTZ))+")",1),e.createElementVNode("span",null,e.toDisplayString(a.computeLTime(l.report.updatedAt,i.localTZ,"YYYY, MMM-DD/HHmm[LT]")),1)])])]),e.createElementVNode("div",mr,[e.createElementVNode("div",Er,null,512)]),e.createElementVNode("div",yr,[e.createElementVNode("table",null,[e.createElementVNode("thead",null,[e.createElementVNode("tr",null,[t[3]||(t[3]=e.createElementVNode("th",{rowspan:"2"},"Date Time",-1)),t[4]||(t[4]=e.createElementVNode("th",{colspan:"4"},"Wind",-1)),t[5]||(t[5]=e.createElementVNode("th",{rowspan:"2"},[e.createTextVNode("Sea HT "),e.createElementVNode("br"),e.createTextVNode("(m)")],-1)),t[6]||(t[6]=e.createElementVNode("th",{colspan:"3"},"Swell",-1)),t[7]||(t[7]=e.createElementVNode("th",{colspan:"3"},"Sig",-1)),t[8]||(t[8]=e.createElementVNode("th",{colspan:"2"},"Current",-1)),e.createElementVNode("th",{colspan:l.showPrate&&l.showAcc?2:1},"Precip",8,Ir),t[9]||(t[9]=e.createElementVNode("th",{colspan:"1"},"Visibility",-1)),t[10]||(t[10]=e.createElementVNode("th",{colspan:"1"},"Temp",-1))]),e.createElementVNode("tr",null,[t[11]||(t[11]=e.createElementVNode("th",null,"Dir",-1)),t[12]||(t[12]=e.createElementVNode("th",null,"Speed (kts)",-1)),t[13]||(t[13]=e.createElementVNode("th",null,"BF",-1)),t[14]||(t[14]=e.createElementVNode("th",null,"Gusts (kts)",-1)),t[15]||(t[15]=e.createElementVNode("th",null,"Dir",-1)),t[16]||(t[16]=e.createElementVNode("th",null,"Ht (m)",-1)),t[17]||(t[17]=e.createElementVNode("th",null,"Prd (s)",-1)),t[18]||(t[18]=e.createElementVNode("th",null,"Dir",-1)),t[19]||(t[19]=e.createElementVNode("th",null,"Hgt (m)",-1)),t[20]||(t[20]=e.createElementVNode("th",null,"Prd (s)",-1)),t[21]||(t[21]=e.createElementVNode("th",null,"Dir",-1)),t[22]||(t[22]=e.createElementVNode("th",null,"Speed (kts)",-1)),l.showPrate?(e.openBlock(),e.createElementBlock("th",Ar,"Rate (mm/h)")):e.createCommentVNode("",!0),l.showAcc?(e.openBlock(),e.createElementBlock("th",pr,"Acc (mm)")):e.createCommentVNode("",!0),t[23]||(t[23]=e.createElementVNode("th",null,"Dist (nm)",-1)),t[24]||(t[24]=e.createElementVNode("th",null,"°C",-1))])]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((D=(I=l.report)==null?void 0:I.extend)==null?void 0:D.data,(M,x)=>{var A,p,V,y,z,T,C,g,U,b,O,w,Y,Q,R,P,G,W,L,J,f,ee,te,le,oe,ne,n,Z,u,q,$,ae,ie,_;return e.openBlock(),e.createElementBlock("tr",{key:x},[e.createElementVNode("td",Vr,e.toDisplayString(a.computeLTime(M.utc,i.localTZ)),1),e.createElementVNode("td",null,[(A=M.wind)!=null&&A.kts?(e.openBlock(),e.createElementBlock("span",Tr,[e.createTextVNode(e.toDisplayString((p=M.wind)==null?void 0:p.direction),1),e.createElementVNode("i",{class:"iconfont",style:e.normalizeStyle(a.computeDegree((V=M.wind)==null?void 0:V.degree,!1))},"",4)])):(e.openBlock(),e.createElementBlock("span",xr,"-"))]),e.createElementVNode("td",null,e.toDisplayString(a.roundPrecision((y=M.wind)==null?void 0:y.kts,1)),1),e.createElementVNode("td",null,e.toDisplayString((z=M.wind)==null?void 0:z.scale),1),e.createElementVNode("td",null,e.toDisplayString(a.roundPrecision((T=M.gusts)==null?void 0:T.kts,1)),1),e.createElementVNode("td",null,e.toDisplayString(a.roundPrecision((g=(C=M.wave)==null?void 0:C.wd)==null?void 0:g.height,1)),1),e.createElementVNode("td",null,[(b=(U=M.wave)==null?void 0:U.swell)!=null&&b.height?(e.openBlock(),e.createElementBlock("span",zr,[e.createTextVNode(e.toDisplayString((w=(O=M.wave)==null?void 0:O.swell)==null?void 0:w.direction),1),e.createElementVNode("i",{class:"iconfont",style:e.normalizeStyle(a.computeDegree((Q=(Y=M.wave)==null?void 0:Y.swell)==null?void 0:Q.degree,!1))},"",4)])):(e.openBlock(),e.createElementBlock("span",Cr,"-"))]),e.createElementVNode("td",null,e.toDisplayString(a.roundPrecision((P=(R=M.wave)==null?void 0:R.swell)==null?void 0:P.height,1)),1),e.createElementVNode("td",null,e.toDisplayString(a.roundPrecision((W=(G=M.wave)==null?void 0:G.swell)==null?void 0:W.period,1)),1),e.createElementVNode("td",null,[(J=(L=M.wave)==null?void 0:L.sig)!=null&&J.height?(e.openBlock(),e.createElementBlock("span",Sr,[e.createTextVNode(e.toDisplayString((ee=(f=M.wave)==null?void 0:f.sig)==null?void 0:ee.direction),1),e.createElementVNode("i",{class:"iconfont",style:e.normalizeStyle(a.computeDegree((le=(te=M.wave)==null?void 0:te.sig)==null?void 0:le.degree,!1))},"",4)])):(e.openBlock(),e.createElementBlock("span",kr,"-"))]),e.createElementVNode("td",null,e.toDisplayString(a.roundPrecision((ne=(oe=M.wave)==null?void 0:oe.sig)==null?void 0:ne.height,1)),1),e.createElementVNode("td",null,e.toDisplayString(a.roundPrecision((Z=(n=M.wave)==null?void 0:n.sig)==null?void 0:Z.period,1)),1),e.createElementVNode("td",null,[(u=M.current)!=null&&u.kts?(e.openBlock(),e.createElementBlock("span",jr,[e.createTextVNode(e.toDisplayString((q=M.current)==null?void 0:q.direction),1),e.createElementVNode("i",{class:"iconfont",style:e.normalizeStyle(a.computeDegree(($=M.current)==null?void 0:$.degree,!0))},"",4)])):(e.openBlock(),e.createElementBlock("span",Ur,"-"))]),e.createElementVNode("td",null,e.toDisplayString(a.roundPrecision((ae=M.current)==null?void 0:ae.kts,1)),1),l.showPrate?(e.openBlock(),e.createElementBlock("td",fr,e.toDisplayString(a.roundPrecision((ie=M.precip)==null?void 0:ie.prate,2)),1)):e.createCommentVNode("",!0),l.showAcc?(e.openBlock(),e.createElementBlock("td",br,e.toDisplayString(a.roundPrecision((_=M.precip)==null?void 0:_.acc,2)),1)):e.createCommentVNode("",!0),e.createElementVNode("td",null,e.toDisplayString(a.roundPrecision(M.visibility/1852,0)||"-"),1),e.createElementVNode("td",null,e.toDisplayString(a.roundPrecision(M.temp,1)),1)])}),128))])])])])}const Ds=Re(ar,[["render",Or],["__scopeId","data-v-eb929a40"]]),wr={install(o){o.component("ORMPointReport",Ds)}},lw="",Yr={name:"IdmLng",props:{lng:{type:Number,default:void 0},label:{type:String,default:"Lng"}},data(){return{pretty:void 0}},watch:{lng:{handler(){if(this.lng!==void 0){const o=de.LngLatHelper.convertToStdLng(this.lng);this.pretty=de.LngLatHelper.lng2pretty(o).pretty}},immediate:!0}}},Qr={class:"lng-box"},hr={key:0};function Br(o,t,l,d,i,a){return e.openBlock(),e.createElementBlock("div",Qr,[l.label?(e.openBlock(),e.createElementBlock("span",hr,e.toDisplayString(l.label),1)):e.createCommentVNode("",!0),e.createElementVNode("label",null,e.toDisplayString(i.pretty),1)])}const On=Re(Yr,[["render",Br],["__scopeId","data-v-0d3c152f"]]),ow="",Rr={name:"IdmLat",props:{lat:{type:Number,default:void 0},label:{type:String,default:"Lat"}},data(){return{pretty:void 0}},watch:{lat:{handler(){this.lat!==void 0&&(this.pretty=de.LngLatHelper.lat2pretty(this.lat).pretty)},immediate:!0}}},Fr={class:"lat-box"},Pr={key:0};function Gr(o,t,l,d,i,a){return e.openBlock(),e.createElementBlock("div",Fr,[l.label?(e.openBlock(),e.createElementBlock("span",Pr,e.toDisplayString(l.label),1)):e.createCommentVNode("",!0),e.createElementVNode("label",null,e.toDisplayString(i.pretty),1)])}const wn=Re(Rr,[["render",Gr],["__scopeId","data-v-3d953d12"]]),nw="",Wr={name:"IdmEditor",components:{Editor:Ns.Editor,Toolbar:Ns.Toolbar},props:{height:{type:String,default:"200px"},modelValue:{type:String,default:()=>""},disabled:{type:Boolean,default:()=>!1}},data(){return{editorRef:null,editor:null,mode:"simple",valueHtml:void 0,editorConfig:{placeholder:"please input something..."},toolbarConfig:{toolbarKeys:["bold","color","bgColor","fontSize","lineHeight"]}}},watch:{disabled:{handler(o){var t,l;o?(t=this.editor)==null||t.disable():(l=this.editor)==null||l.enable()}},modelValue:{handler(){var o;this.valueHtml=this.modelValue,(o=this.editor)==null||o.setHtml(this.valueHtml)}}},methods:{handleCreated(o){var t;this.editorRef=e.shallowRef(),this.editor=Object.seal(o),this.valueHtml=this.modelValue,(t=this.editor)==null||t.setHtml(this.valueHtml),this.disabled?this.editor.disable():this.editor.enable()},handleChange(o){this.$emit("update:modelValue",this.valueHtml)},handleBlur(o){this.$emit("blur",this.valueHtml)},beforeDestroy(){var o;(o=this.editor)==null||o.destroy()}}},Lr={class:"editor-box"};function Zr(o,t,l,d,i,a){const N=e.resolveComponent("Toolbar"),s=e.resolveComponent("Editor");return e.openBlock(),e.createElementBlock("div",Lr,[e.withDirectives(e.createVNode(N,{editor:i.editor,"default-config":i.toolbarConfig,mode:i.mode,class:"toolbar"},null,8,["editor","default-config","mode"]),[[e.vShow,!l.disabled]]),e.createVNode(s,{modelValue:i.valueHtml,"onUpdate:modelValue":t[0]||(t[0]=c=>i.valueHtml=c),"default-config":i.editorConfig,mode:i.mode,class:"editor",style:e.normalizeStyle({height:l.height}),onOnCreated:a.handleCreated,onOnChange:a.handleChange,onOnBlur:a.handleBlur},null,8,["modelValue","default-config","mode","style","onOnCreated","onOnChange","onOnBlur"])])}const vl=Re(Wr,[["render",Zr],["__scopeId","data-v-9854b172"]]),aw="",Hr={name:"OrmRouteReport",components:{Lng:On,Lat:wn,Editor:vl,Brand:ql,Loading:Fn,ElTooltip:cs.ElTooltip},props:{plan:{type:Object,default:()=>({})},weatherPrinciple:{type:Object,default:()=>({})},editorDisabled:{type:Boolean,default:()=>!1},print:{type:Boolean,default:()=>!1}},emits:["commit","refresh"],data(){return{editable:!1,advisory:"",echart:void 0,speedIndex:0,loading:!0}},computed:{showCost(){var o,t;return this.print?!1:(t=(o=this.plan)==null?void 0:o.voyage)==null?void 0:t.showCost},computeUTCTime(){return function(o,t="MMM-DD/HHmm[Z]"){return`${F(o).utc().format(t)}`}},computeLTime(){return function(o,t,l){let d=0;return l&&t&&(d=de.LngLatHelper.guessTimeZoneOffset(t,l)),`${F(o).utcOffset(d).format("MMM-DD/HHmm")}LT`}},computeTimeDiff(){return function(o,t){var l,d,i,a,N;if(t===0)return"-";{const s=F((i=(d=(l=o==null?void 0:o.speeds)==null?void 0:l[t])==null?void 0:d.speed)==null?void 0:i.eta).diff(F((N=(a=o==null?void 0:o.speeds)==null?void 0:a[0])==null?void 0:N.speed.eta),"h",!0);return Math.round(s*100)/100}}},computeCostDiff(){return function(o,t){var l,d,i,a,N,s,c;if(t===0)return"-";{const E=Number((a=(i=(d=(l=o==null?void 0:o.speeds)==null?void 0:l[t])==null?void 0:d.speed)==null?void 0:i.cost)==null?void 0:a.total)-Number((c=(s=(N=o==null?void 0:o.speeds)==null?void 0:N[0])==null?void 0:s.speed)==null?void 0:c.cost.total);return`${(Math.round(E/1e3*100)/100).toLocaleString("en-US")}k`}}},computeNav(){return function(o){return o.gcToPrevious?"GC":"RL"}},roundPrecision(){return function(o,t=4){if(typeof o=="number"){const l=Number("1".padEnd(t+1,"0"));return Math.round(o*l)/l}else return"-"}},computeMemo(){return function(o){return(o==null?void 0:o.memo)??"-"}},computeMajorPoints(){return function(o,t){const l=[];if(t.length)return t.forEach(d=>{l.push(d),d.suspend&&(o!=null&&o.useRouteParam)&&l.push({etd:d.etd,eta:d.etd,isResume:!0,memo:`Stoppage: ${d.suspend}hrs`})}),l}},computeDegree(){return function(o,t){o=o%360;for(let l=0;l<17;l++)if(l*22.5+o+11.25>=360){let d=(16-l)*22.5;return t||(d=d+180),`transform:rotate(${d}deg);margin-left:3px;`}}},computeDay(){return function(o,t=0){var a,N,s,c;const l=(c=(s=(N=(a=o==null?void 0:o.speeds)==null?void 0:a[t])==null?void 0:N.speed)==null?void 0:s.sample)==null?void 0:c.hours,d=l==null?void 0:l[0],i=l==null?void 0:l[(l==null?void 0:l.length)-1];return Math.round(F(i==null?void 0:i.eta).diff(F(d==null?void 0:d.eta),"day",!0)*10)/10}},computeSuspend(){return function(o){var l,d;let t=0;return(d=(l=o==null?void 0:o.sample)==null?void 0:l.wps)==null||d.forEach(i=>{t+=i.suspend||0}),t?Math.round(t*100)/100:"-"}},computeModel(){return function(o){const t=o==null?void 0:o.source;return["ec","cmems"].includes(t==null?void 0:t.toLowerCase())?"The forecast data is sourced from EC":`The forecast data is sourced from ${t}`}}},watch:{plan:{handler(){var o,t;(o=this.plan)!=null&&o.id&&(this.loading=!1,this.advisory=((t=this.plan)==null?void 0:t.advisory)||"Pls find the following major waypoints for your safe navigation.",this.$nextTick(()=>{this.initEchart()}))},immediate:!0}},methods:{handleCommit(o){this.editable=!1,this.$emit("commit",o)},handleRefresh(){this.$emit("refresh")},handleEdit(){this.editorDisabled?this.editable=!1:this.editable=!0},initEchart(){this.echart||(this.echart=e.markRaw(Rn.init(this.$refs.echart))),this.renderEchart()},renderEchart(){var c,E,I,D,M,x,A;const o=[],t=[],l={dateTime:0,windSpeed:1,waveHeight:2,windDirection:3,windDegree:4,windScale:5,currentFactor:6,weatherFactor:7,speed:8},d={};["W","WSW","SW","SSW","S","SSE","SE","ESE","E","ENE","NE","NNE","N","NNW","NW","WNW"].forEach((p,V)=>{d[p]=Math.PI/8*V});const a=18;let N=4;(x=(M=(D=(I=(E=(c=this.plan)==null?void 0:c.speeds)==null?void 0:E[this.speedIndex])==null?void 0:I.speed)==null?void 0:D.sample)==null?void 0:M.hours)==null||x.forEach(p=>{var y,z,T,C,g,U,b,O,w,Y;const V=p.meteo;if(V){const Q=F(V.utc).utc().format("MMM-DD/HHmm[Z]");o.push(Q),N=Math.ceil(((z=(y=V.wave)==null?void 0:y.sig)==null?void 0:z.height)>N?(C=(T=V.wave)==null?void 0:T.sig)==null?void 0:C.height:N),t.push([Q,(g=V.wind)==null?void 0:g.kts,(b=(U=V.wave)==null?void 0:U.sig)==null?void 0:b.height,(O=V.wind)==null?void 0:O.direction,(w=V.wind)==null?void 0:w.degree,(Y=V.wind)==null?void 0:Y.scale,p.cFactor,p.wFactor,p.speed])}});const s={animation:!1,title:{text:"Weather Conditions & Speed Analysis",textStyle:{color:"#000000B3",fontWeight:"500"},left:"left"},tooltip:{trigger:"axis"},legend:{show:!0,right:0},grid:{bottom:40},xAxis:[{data:o,boundaryGap:!1}],yAxis:[{name:"Wind Speed (kts)",nameLocation:"middle",position:"left",nameGap:35,minInterval:5,axisLine:{lineStyle:{color:"rgba(58,128,0,0.6)"}}},{type:"value",name:"Sig. Wave Height (m)",nameLocation:"middle",position:"right",nameGap:35,max:N,min:0,minInterval:1,axisLine:{lineStyle:{color:"#2a57b7"}},splitLine:{show:!1}},{name:"Current Factor (kts)",nameLocation:"middle",position:"left",offset:50,nameGap:35,axisLine:{lineStyle:{color:"rgb(15,168,146)"}},splitLine:{show:!0},alignTicks:!0},{name:"SOG (kts)",nameLocation:"middle",position:"right",offset:50,nameGap:35,axisLine:{lineStyle:{color:"rgba(233,30,99,0.7)"}},splitLine:{show:!0}}],visualMap:{show:!1,type:"piecewise",orient:"horizontal",left:"center",bottom:0,pieces:[{gte:22,color:"rgb(251,75,59)",label:"≥ BF6"},{gte:17,lt:22,color:"rgb(247,158,27)",label:"BF5"},{lt:17,color:"rgb(121,183,68)",label:"≤ BF4"}],seriesIndex:2,dimension:1},series:[{name:"Sig. Wave Height",type:"line",showSymbol:!0,yAxisIndex:1,areaStyle:{color:{type:"linear",x:0,y:0,x2:0,y2:1,global:!1,colorStops:[{offset:0,color:"rgba(42,87,184,0.6)"},{offset:.5,color:"rgba(42,87,184,0.3)"},{offset:1,color:"rgba(42,87,184,0)"}]}},lineStyle:{color:"#2a57b7"},itemStyle:{color:"#2a57b7"},encode:{x:l.dateTime,y:l.waveHeight},data:t,z:1},{name:"Wind Speed",type:"line",showSymbol:!0,yAxisIndex:0,encode:{x:l.dateTime,y:l.windSpeed},lineStyle:{color:"rgba(58,128,0,0.6)",type:"dashed"},itemStyle:{color:"rgba(58,128,0,0.6)"},data:t,z:2},{type:"custom",yAxisIndex:0,renderItem:(p,V)=>{const y=V.coord([V.value(l.dateTime),V.value(l.windSpeed)]);return{type:"path",shape:{pathData:"M31 16l-15-15v9h-26v12h26v9z",x:-a/2,y:-a/2,width:a,height:a},rotation:d[V.value(l.windDirection)],position:y,style:V.style({stroke:"#555",lineWidth:1})}},encode:{x:l.dateTime,y:l.windSpeed},data:t,z:10},{name:"Current Factor",type:"line",yAxisIndex:2,showSymbol:!0,encode:{x:l.dateTime,y:l.currentFactor},lineStyle:{color:"rgb(15,168,146)",type:"dotted"},itemStyle:{color:"rgb(15,168,146)"},data:t,z:3},{name:"SOG",type:"line",yAxisIndex:3,showSymbol:!0,encode:{x:l.dateTime,y:l.speed},lineStyle:{color:"rgba(233,30,99,0.7)",type:"solid"},itemStyle:{color:"rgba(233,30,99,0.7)"},data:t,z:4}]};(A=this.echart)==null||A.setOption(s)}}},Jr={class:"voyage-plan"},_r={class:"plan-report"},Xr={class:"section voyage-section flex-space"},Kr={class:"flex-end",style:{width:"50%","flex-wrap":"wrap"}},ur={class:"flex-start label-block",style:{width:"100%"}},qr={style:{"text-transform":"uppercase"},class:"text-ellipsis"},$r={class:"flex-start label-block",style:{width:"100%"}},vr={class:"flex-end text-ellipsis",style:{"text-transform":"uppercase"}},ec={class:"flex-start label-block",style:{width:"100%"}},tc={class:"flex-end"},lc={class:"flex-end",style:{width:"50%","flex-wrap":"wrap"}},oc={class:"flex-start label-block",style:{width:"100%"}},nc={key:0,class:"flex-end",style:{flex:"1"}},ac={key:1,class:"flex-end",style:{flex:"1"}},ic={class:"flex-end",style:{width:"120px"}},sc={class:"flex-space label-block",style:{width:"100%"}},dc={key:0,class:"flex-end",style:{flex:"1"}},rc={key:1,class:"flex-end",style:{flex:"1"}},cc={class:"flex-end",style:{width:"120px"}},Nc={class:"flex-space label-block",style:{width:"100%"}},Dc={class:"flex-end",style:{"text-transform":"uppercase"}},Mc={class:"section chart-section"},gc={class:"flex-center"},mc=["src"],Ec={class:"legends"},yc={class:"legend"},Ic={key:0,class:"legend"},Ac={key:1,class:"legend"},pc={key:1,class:"empty"},Vc={class:"section comparison-section"},Tc={key:0},xc={key:0},zc=["rowspan"],Cc={key:0},Sc={key:1},kc={rowspan:"2"},jc={rowspan:"2"},Uc={key:0},fc={key:1},bc={rowspan:"1"},Oc={key:0},wc={rowspan:"2"},Yc={rowspan:"2"},Qc={rowspan:"2"},hc={key:0},Bc={key:0},Rc=["rowspan"],Fc={key:0},Pc={rowspan:"1"},Gc={key:0},Wc={key:0},Lc={key:1},Zc={class:"tips"},Hc={key:0},Jc={class:"section waypoint-section"},_c={class:"header-block flex-start"},Xc={class:"title"},Kc={key:0,class:"flex-end",style:{flex:"1"}},uc=["onClick"],qc={class:"advisory"},$c=["innerHTML"],vc={class:"major-waypoint"},eN={class:"major-body"},tN={class:"cell-item flex",style:{flex:"1.5"}},lN={key:0,class:"flex-center"},oN={key:1,class:"flex-center"},nN={key:0,style:{"margin-left":"3px"}},aN={class:"cell-item flex"},iN={key:0,style:{"margin-left":"4px","font-weight":"600"}},sN={key:0,class:"cell-item flex offset"},dN={key:1,class:"cell-item flex nbsp"},rN={key:2,class:"cell-item flex offset"},cN={key:3,class:"cell-item flex nbsp"},NN={key:4,class:"cell-item flex offset"},DN={key:5,class:"cell-item flex nbsp"},MN={key:6,class:"cell-item flex offset"},gN={key:7,class:"cell-item flex nbsp"},mN={class:"section forecast-section"},EN={class:"header-block flex-start"},yN={class:"title"},IN={key:0,class:"flex-end",style:{flex:"1"}},AN=["onClick"],pN={class:"echart-block"},VN={ref:"echart",class:"echart"},TN={class:"tips forecast-model",style:{margin:"10px auto","text-align":"left"}},xN=["colspan"],zN={key:0},CN={class:"flex-center"},SN={key:0,class:"degree-box"},kN={key:1},jN={key:0},UN={key:0,class:"degree-box"},fN={key:1},bN={key:0,class:"degree-box"},ON={key:1},wN={key:0,class:"degree-box"},YN={key:1};function QN(o,t,l,d,i,a){var M,x,A,p,V,y,z,T,C,g,U,b,O,w,Y,Q,R,P,G,W,L,J,f,ee,te,le,oe,ne,n,Z,u,q,$,ae,ie,_,Ne,K,ce,De,Me,re,ye,Ie,Ae,pe,Ve,Te,xe,ze,Ce,Se,ke,je,Ue,fe,ge,we,Ye,Oe,S,Ee,Qe,Ge,We,j,Le,Ze,r,v,me,h,Fe,se,Pe,He,Je,Ke,ue,qe,$e,ve,et,ot,nt,at,it,st,dt,rt,ct,Nt,Dt,Mt,gt,mt,Et,yt,It,At,pt,xt,zt,Ct,St,kt,jt,Ut,ft,bt,Ot,wt,Yt,Qt,ht,Bt,Rt,Ft,Pt,Gt,Wt,Lt,Zt,Ht,Jt,_t,Xt,Kt;const N=e.resolveComponent("Brand"),s=e.resolveComponent("Loading"),c=e.resolveComponent("Lat"),E=e.resolveComponent("Lng"),I=e.resolveComponent("ElTooltip"),D=e.resolveComponent("Editor");return e.openBlock(),e.createElementBlock("div",Jr,[e.createElementVNode("div",_r,[e.createVNode(N,{name:"Voyage Planning",issued:(M=l.plan)==null?void 0:M.updatedAt},null,8,["issued"]),e.createVNode(s,{loading:i.loading,onTimeout:t[0]||(t[0]=m=>i.loading=!1)},null,8,["loading"]),e.createElementVNode("div",Xr,[e.createElementVNode("div",Kr,[e.createElementVNode("div",ur,[t[8]||(t[8]=e.createElementVNode("label",{class:"flex-end",style:{width:"140px"}},"Prepare for",-1)),e.createElementVNode("span",qr,e.toDisplayString((p=(A=(x=l.plan)==null?void 0:x.voyage)==null?void 0:A.company)==null?void 0:p.name),1)]),e.createElementVNode("div",$r,[t[9]||(t[9]=e.createElementVNode("label",{class:"flex-end",style:{width:"140px"}},"Vessel",-1)),e.createElementVNode("span",vr,e.toDisplayString((z=(y=(V=l.plan)==null?void 0:V.voyage)==null?void 0:y.vessel)==null?void 0:z.name)+" ("+e.toDisplayString((U=(g=(C=(T=l.plan)==null?void 0:T.voyage)==null?void 0:C.vessel)==null?void 0:g.vesselType)==null?void 0:U.name)+")",1)]),e.createElementVNode("div",ec,[t[10]||(t[10]=e.createElementVNode("label",{class:"flex-end",style:{width:"140px"}},"Voyage No.",-1)),e.createElementVNode("span",tc,e.toDisplayString((O=(b=l.plan)==null?void 0:b.voyage)==null?void 0:O.number),1)])]),e.createElementVNode("div",lc,[e.createElementVNode("div",oc,[t[12]||(t[12]=e.createElementVNode("label",{class:"flex-end",style:{width:"140px"}},"Departure Port",-1)),(Q=(Y=(w=l.plan)==null?void 0:w.leg)==null?void 0:Y.departure)!=null&&Q.name?(e.openBlock(),e.createElementBlock("span",nc,e.toDisplayString((P=(R=l.plan)==null?void 0:R.leg)==null?void 0:P.departure.name),1)):(e.openBlock(),e.createElementBlock("div",ac,[e.createVNode(c,{lat:(L=(W=(G=l.plan)==null?void 0:G.leg)==null?void 0:W.departure)==null?void 0:L.lat,label:""},null,8,["lat"]),t[11]||(t[11]=e.createElementVNode("span",{style:{"margin-right":"3px"}},",",-1)),e.createVNode(E,{lng:(ee=(f=(J=l.plan)==null?void 0:J.leg)==null?void 0:f.departure)==null?void 0:ee.lng,label:""},null,8,["lng"])])),e.createElementVNode("span",ic,e.toDisplayString(a.computeUTCTime(((oe=(le=(te=l.plan)==null?void 0:te.leg)==null?void 0:le.departure)==null?void 0:oe.atd)||((Z=(n=(ne=l.plan)==null?void 0:ne.leg)==null?void 0:n.departure)==null?void 0:Z.etd)||((ae=($=(q=(u=l.plan)==null?void 0:u.speeds)==null?void 0:q[i.speedIndex])==null?void 0:$.speed)==null?void 0:ae.etd),"MMM-DD/HHmm[Z]")),1)]),e.createElementVNode("div",sc,[t[14]||(t[14]=e.createElementVNode("label",{class:"flex-end",style:{width:"140px"}},"Arrival Port",-1)),(Ne=(_=(ie=l.plan)==null?void 0:ie.leg)==null?void 0:_.destination)!=null&&Ne.name?(e.openBlock(),e.createElementBlock("span",dc,e.toDisplayString((De=(ce=(K=l.plan)==null?void 0:K.leg)==null?void 0:ce.destination)==null?void 0:De.name),1)):(e.openBlock(),e.createElementBlock("div",rc,[e.createVNode(c,{lat:(ye=(re=(Me=l.plan)==null?void 0:Me.leg)==null?void 0:re.destination)==null?void 0:ye.lat,label:""},null,8,["lat"]),t[13]||(t[13]=e.createElementVNode("span",{style:{"margin-right":"3px"}},",",-1)),e.createVNode(E,{lng:(pe=(Ae=(Ie=l.plan)==null?void 0:Ie.leg)==null?void 0:Ae.destination)==null?void 0:pe.lng,label:""},null,8,["lng"])])),e.createElementVNode("span",cc,e.toDisplayString(a.computeUTCTime(((ze=(xe=(Te=(Ve=l.plan)==null?void 0:Ve.speeds)==null?void 0:Te[i.speedIndex])==null?void 0:xe.speed)==null?void 0:ze.ata)||((je=(ke=(Se=(Ce=l.plan)==null?void 0:Ce.speeds)==null?void 0:Se[i.speedIndex])==null?void 0:ke.speed)==null?void 0:je.eta),"MMM-DD/HHmm[Z]")),1)]),e.createElementVNode("div",Nc,[t[15]||(t[15]=e.createElementVNode("label",{class:"flex-end",style:{width:"140px"}},"Load Condition",-1)),e.createElementVNode("span",Dc,e.toDisplayString((fe=(Ue=l.plan)==null?void 0:Ue.voyage)==null?void 0:fe.loadCondition),1)])])]),e.createElementVNode("div",Mc,[t[22]||(t[22]=e.createElementVNode("div",{class:"header-block flex-start"},[e.createElementVNode("i",{class:"iconfont"},""),e.createElementVNode("div",{class:"title"},"Weather chart")],-1)),(ge=l.plan)!=null&&ge.chartUrl?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("div",gc,[e.createElementVNode("img",{src:l.plan.chartUrl},null,8,mc)]),e.createElementVNode("div",Ec,[t[19]||(t[19]=e.createStaticVNode('<div class="legend" data-v-1e7923d0><label style="background-color:var(--idm-dangerous);" data-v-1e7923d0></label><span data-v-1e7923d0>Dangerous</span></div><div class="legend" data-v-1e7923d0><label style="background-color:var(--idm-severe);" data-v-1e7923d0></label><span data-v-1e7923d0>Severe</span></div><div class="legend" data-v-1e7923d0><label style="background-color:var(--idm-heavy);" data-v-1e7923d0></label><span data-v-1e7923d0>Heavy</span></div>',3)),e.createElementVNode("div",yc,[t[16]||(t[16]=e.createElementVNode("b",{class:"route1"},null,-1)),e.createElementVNode("span",{class:"btn",onClick:t[1]||(t[1]=m=>{i.speedIndex=0,a.renderEchart()})},e.toDisplayString((Ee=(S=(Oe=(Ye=(we=l.plan)==null?void 0:we.speeds)==null?void 0:Ye[0])==null?void 0:Oe.speed)==null?void 0:S.lane)==null?void 0:Ee.name),1)]),((Ge=(Qe=l.plan)==null?void 0:Qe.speeds)==null?void 0:Ge.length)>1?(e.openBlock(),e.createElementBlock("div",Ic,[t[17]||(t[17]=e.createElementVNode("b",{class:"route2"},null,-1)),e.createElementVNode("span",{class:"btn",onClick:t[2]||(t[2]=m=>{i.speedIndex=1,a.renderEchart()})},e.toDisplayString((r=(Ze=(Le=(j=(We=l.plan)==null?void 0:We.speeds)==null?void 0:j[1])==null?void 0:Le.speed)==null?void 0:Ze.lane)==null?void 0:r.name),1)])):e.createCommentVNode("",!0),((me=(v=l.plan)==null?void 0:v.speeds)==null?void 0:me.length)>2?(e.openBlock(),e.createElementBlock("div",Ac,[t[18]||(t[18]=e.createElementVNode("b",{class:"route3"},null,-1)),e.createElementVNode("span",{class:"btn",onClick:t[3]||(t[3]=m=>{i.speedIndex=2,a.renderEchart()})},e.toDisplayString((He=(Pe=(se=(Fe=(h=l.plan)==null?void 0:h.speeds)==null?void 0:Fe[2])==null?void 0:se.speed)==null?void 0:Pe.lane)==null?void 0:He.name),1)])):e.createCommentVNode("",!0)])],64)):(e.openBlock(),e.createElementBlock("div",pc,[e.createElementVNode("span",null,[t[20]||(t[20]=e.createTextVNode("Weather chart in cooking ")),e.createElementVNode("span",{class:"btn",onClick:t[4]||(t[4]=(...m)=>a.handleRefresh&&a.handleRefresh(...m))},"Refresh"),t[21]||(t[21]=e.createTextVNode(" later please"))])]))]),e.createElementVNode("div",Vc,[(Ke=(Je=l.plan)==null?void 0:Je.speeds)!=null&&Ke.length?(e.openBlock(),e.createElementBlock("table",Tc,[e.createElementVNode("thead",null,[e.createElementVNode("tr",null,[t[23]||(t[23]=e.createElementVNode("th",{rowspan:"2",colspan:"2"},"Route",-1)),t[24]||(t[24]=e.createElementVNode("th",null,"SPD (kts)",-1)),t[25]||(t[25]=e.createElementVNode("th",{clospan:"2"},"DTG (nm)",-1)),t[26]||(t[26]=e.createElementVNode("th",null,"ETA (LT)",-1)),t[27]||(t[27]=e.createElementVNode("th",{rowspan:"2"},"Stoppage (h)",-1)),t[28]||(t[28]=e.createElementVNode("th",{colspan:"2"},"Cons (mt)",-1)),a.showCost?(e.openBlock(),e.createElementBlock("th",xc,"TTL Cost (USD)")):e.createCommentVNode("",!0),e.createElementVNode("th",{rowspan:a.showCost?1:2},"Diff Time (h)",8,zc),t[29]||(t[29]=e.createElementVNode("th",null,"Weather en route",-1))]),e.createElementVNode("tr",null,[t[30]||(t[30]=e.createElementVNode("th",null,"*Daily Cons (mt)",-1)),t[31]||(t[31]=e.createElementVNode("th",null,"TTG (h)",-1)),t[32]||(t[32]=e.createElementVNode("th",null,"Avg.Spd / Wx / Cur.Factor (kts)",-1)),t[33]||(t[33]=e.createElementVNode("th",null,"*FO",-1)),t[34]||(t[34]=e.createElementVNode("th",null,"*DO/GO",-1)),a.showCost?(e.openBlock(),e.createElementBlock("th",Cc,"*Hire / Bunker (USD)")):e.createCommentVNode("",!0),a.showCost?(e.openBlock(),e.createElementBlock("th",Sc,"Diff Cost (USD)")):e.createCommentVNode("",!0),e.createElementVNode("th",null,"*in the next "+e.toDisplayString(a.computeDay(l.plan,0))+" days",1)])]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((ue=l.plan)==null?void 0:ue.speeds,(m,be)=>{var k,tt,Vt,ut,qt,$t,vt,el,tl,ll,ol,nl,al,il,sl,dl,rl,cl,Nl,Dl,Ml,gl,ml,El,yl,Il,Al,pl,Vl,Tl,xl,zl,Cl,Sl,kl,jl,Ul,fl,bl,Ol,wl,Yl,Ql,hl,Bl,Rl,Fl,Pl,Gl,Wl,Ll,Zl,Hl,_l,Xl,Kl,_e,$l,eo,to,lo,oo;return e.openBlock(),e.createElementBlock(e.Fragment,{key:be},[e.createElementVNode("tr",null,[e.createElementVNode("td",kc,e.toDisplayString(be+1),1),e.createElementVNode("td",jc,e.toDisplayString((tt=(k=m.speed)==null?void 0:k.lane)==null?void 0:tt.name),1),e.createElementVNode("td",null,[m.speed.label!=="Combined"?(e.openBlock(),e.createElementBlock("span",Uc,e.toDisplayString(`CP ${((ut=(Vt=m.speed)==null?void 0:Vt.cpCopy)==null?void 0:ut.speed)??((qt=m.speed)==null?void 0:qt.v0)}`),1)):(e.openBlock(),e.createElementBlock("div",fc,[t[35]||(t[35]=e.createTextVNode("CP")),t[36]||(t[36]=e.createElementVNode("sub",null,"1",-1)),e.createTextVNode(" "+e.toDisplayString((el=(vt=($t=m.speed)==null?void 0:$t.extend)==null?void 0:vt.cps[0])==null?void 0:el.speed)+", CP",1),t[37]||(t[37]=e.createElementVNode("sub",null,"2",-1)),e.createTextVNode(" "+e.toDisplayString((ol=(ll=(tl=m.speed)==null?void 0:tl.extend)==null?void 0:ll.cps[1])==null?void 0:ol.speed),1)]))]),e.createElementVNode("td",bc,[e.createElementVNode("span",null,e.toDisplayString(a.roundPrecision((nl=m.speed)==null?void 0:nl.distance,0)),1),(il=(al=m.speed)==null?void 0:al.extend)!=null&&il.distanceInECA?(e.openBlock(),e.createElementBlock("span",Oc," ("+e.toDisplayString(a.roundPrecision(m.speed.extend.distanceInECA,0))+" in ECA)",1)):e.createCommentVNode("",!0)]),e.createElementVNode("td",null,[e.createElementVNode("b",null,e.toDisplayString(a.computeLTime((sl=m.speed)==null?void 0:sl.eta,(cl=(rl=(dl=l.plan)==null?void 0:dl.leg)==null?void 0:rl.destination)==null?void 0:cl.lng,(Ml=(Dl=(Nl=l.plan)==null?void 0:Nl.leg)==null?void 0:Dl.destination)==null?void 0:Ml.lat)),1),e.createTextVNode(" ["+e.toDisplayString(a.computeUTCTime((gl=m.speed)==null?void 0:gl.eta))+"] ",1)]),e.createElementVNode("td",wc,e.toDisplayString(a.computeSuspend(m.speed)),1),e.createElementVNode("td",Yc,e.toDisplayString(a.roundPrecision((ml=m.speed)==null?void 0:ml.totalFoCons,3)),1),e.createElementVNode("td",Qc,[e.createElementVNode("span",null,e.toDisplayString(a.roundPrecision((El=m.speed)==null?void 0:El.totalDgoCons,3)),1),(Il=(yl=m.speed)==null?void 0:yl.extend)!=null&&Il.totalDgoConsInECA?(e.openBlock(),e.createElementBlock("span",hc," + "+e.toDisplayString(a.roundPrecision((Al=m.speed.extend)==null?void 0:Al.totalDgoConsInECA,3))+"*",1)):e.createCommentVNode("",!0)]),a.showCost?(e.openBlock(),e.createElementBlock("td",Bc,e.toDisplayString((Tl=a.roundPrecision(((Vl=(pl=m==null?void 0:m.speed)==null?void 0:pl.cost)==null?void 0:Vl.total)/1e3,2))==null?void 0:Tl.toLocaleString("en-US"))+"k",1)):e.createCommentVNode("",!0),e.createElementVNode("td",{rowspan:a.showCost?1:2},e.toDisplayString(a.computeTimeDiff(l.plan,be)),9,Rc),e.createElementVNode("td",null,[e.createVNode(I,{effect:"light",placement:"top",trigger:"hover",width:300,content:(zl=(xl=l.weatherPrinciple)==null?void 0:xl.dangerous)==null?void 0:zl.pretty},{default:e.withCtx(()=>t[38]||(t[38]=[e.createElementVNode("span",{style:{cursor:"pointer"}},"Dangerous",-1)])),_:1,__:[38]},8,["content"]),t[41]||(t[41]=e.createTextVNode(" / ")),e.createVNode(I,{effect:"light",placement:"top",trigger:"hover",width:300,content:(Sl=(Cl=l.weatherPrinciple)==null?void 0:Cl.severe)==null?void 0:Sl.pretty},{default:e.withCtx(()=>t[39]||(t[39]=[e.createElementVNode("span",{style:{cursor:"pointer"}},"Severe",-1)])),_:1,__:[39]},8,["content"]),t[42]||(t[42]=e.createTextVNode(" / ")),e.createVNode(I,{effect:"light",placement:"top",trigger:"hover",width:300,content:(jl=(kl=l.weatherPrinciple)==null?void 0:kl.heavy)==null?void 0:jl.pretty},{default:e.withCtx(()=>t[40]||(t[40]=[e.createElementVNode("span",{style:{cursor:"pointer"}},"Heavy",-1)])),_:1,__:[40]},8,["content"])])]),e.createElementVNode("tr",null,[e.createElementVNode("td",null,[((Ul=m.speed)==null?void 0:Ul.label)!=="Combined"?(e.openBlock(),e.createElementBlock("div",Fc,"FO: "+e.toDisplayString((bl=(fl=m.speed)==null?void 0:fl.cpCopy)==null?void 0:bl.fo)+" / DO: "+e.toDisplayString((wl=(Ol=m.speed)==null?void 0:Ol.cpCopy)==null?void 0:wl.dgo),1)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",null,"FO: "+e.toDisplayString((Ql=(Yl=m.speed)==null?void 0:Yl.extend)==null?void 0:Ql.cps[0].fo)+" / "+e.toDisplayString((Bl=(hl=m.speed)==null?void 0:hl.extend)==null?void 0:Bl.cps[1].fo),1),e.createElementVNode("div",null,"DO: "+e.toDisplayString((Fl=(Rl=m.speed)==null?void 0:Rl.extend)==null?void 0:Fl.cps[0].dgo)+" / "+e.toDisplayString((Gl=(Pl=m.speed)==null?void 0:Pl.extend)==null?void 0:Gl.cps[1].dgo),1)],64))]),e.createElementVNode("td",Pc,[e.createElementVNode("span",null,e.toDisplayString(a.roundPrecision((Wl=m.speed)==null?void 0:Wl.totalHrs,1)),1),(Zl=(Ll=m.speed)==null?void 0:Ll.extend)!=null&&Zl.hoursInECA?(e.openBlock(),e.createElementBlock("span",Gc," ("+e.toDisplayString(a.roundPrecision(m.speed.extend.hoursInECA,1))+" in ECA)",1)):e.createCommentVNode("",!0)]),e.createElementVNode("td",null,e.toDisplayString(a.roundPrecision((Hl=m.speed)==null?void 0:Hl.avgSpeed,2))+" / "+e.toDisplayString(a.roundPrecision((_l=m.speed)==null?void 0:_l.wxFactor,2))+" / "+e.toDisplayString(a.roundPrecision((Xl=m.speed)==null?void 0:Xl.cFactor,2)),1),a.showCost?(e.openBlock(),e.createElementBlock("td",Wc,e.toDisplayString(a.roundPrecision(((_e=(Kl=m==null?void 0:m.speed)==null?void 0:Kl.cost)==null?void 0:_e.hire)/1e3,2).toLocaleString("en-US"))+"k / "+e.toDisplayString(a.roundPrecision(((eo=($l=m==null?void 0:m.speed)==null?void 0:$l.cost)==null?void 0:eo.bunker)/1e3,2).toLocaleString("en-US"))+"k",1)):e.createCommentVNode("",!0),a.showCost?(e.openBlock(),e.createElementBlock("td",Lc,e.toDisplayString(a.computeCostDiff(l.plan,be)),1)):e.createCommentVNode("",!0),e.createElementVNode("td",null,e.toDisplayString(a.roundPrecision(((to=m.speed)==null?void 0:to.dangerous)/24,2))+" / "+e.toDisplayString(a.roundPrecision(((lo=m.speed)==null?void 0:lo.severe)/24,2))+" / "+e.toDisplayString(a.roundPrecision(((oo=m.speed)==null?void 0:oo.heavy)/24,2)),1)])],64)}),128))])])):e.createCommentVNode("",!0),e.createElementVNode("div",Zc,[t[44]||(t[44]=e.createTextVNode(" * Fuel consumption was calculated based on the computed daily consumption, and does not reflect actual consumption.")),t[45]||(t[45]=e.createElementVNode("br",null,null,-1)),a.showCost?(e.openBlock(),e.createElementBlock("span",Hc,[e.createTextVNode("* Hire cost was calculated at "+e.toDisplayString((ve=a.roundPrecision(($e=(qe=l.plan)==null?void 0:qe.voyage)==null?void 0:$e.dailyHire,0))==null?void 0:ve.toLocaleString("en-US"))+" USD perday, and the bunker cost was "+e.toDisplayString((nt=a.roundPrecision((ot=(et=l.plan)==null?void 0:et.voyage)==null?void 0:ot.priceFO,0))==null?void 0:nt.toLocaleString("en-US"))+" USD/mt for FO and "+e.toDisplayString((st=a.roundPrecision((it=(at=l.plan)==null?void 0:at.voyage)==null?void 0:it.priceDGO,0))==null?void 0:st.toLocaleString("en-US"))+" USD/mt for MGO.",1),t[43]||(t[43]=e.createElementVNode("br",null,null,-1))])):e.createCommentVNode("",!0),t[46]||(t[46]=e.createTextVNode(" * Please note the climatology data was used for days that extend beyond the available forecast.")),t[47]||(t[47]=e.createElementVNode("br",null,null,-1)),t[48]||(t[48]=e.createTextVNode(" * DO/GO consumption includes daily consumption and eca consumption. "))])]),e.createElementVNode("div",Jc,[e.createElementVNode("div",_c,[t[49]||(t[49]=e.createElementVNode("i",{class:"iconfont"},"",-1)),e.createElementVNode("div",Xc,"Advisory & Major Waypoint of Route "+e.toDisplayString((Nt=(ct=(rt=(dt=l.plan.speeds)==null?void 0:dt[i.speedIndex])==null?void 0:rt.speed)==null?void 0:ct.lane)==null?void 0:Nt.name),1),((Mt=(Dt=l.plan)==null?void 0:Dt.speeds)==null?void 0:Mt.length)>1?(e.openBlock(),e.createElementBlock("div",Kc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((gt=l.plan)==null?void 0:gt.speeds,(m,be)=>{var k,tt;return e.openBlock(),e.createElementBlock("div",{key:be,class:e.normalizeClass(["route-item",i.speedIndex===be?"active":""]),onClick:Vt=>{i.speedIndex=be,a.renderEchart()}},e.toDisplayString((tt=(k=m.speed)==null?void 0:k.lane)==null?void 0:tt.name),11,uc)}),128))])):e.createCommentVNode("",!0)]),e.createElementVNode("div",qc,[i.editable?(e.openBlock(),e.createBlock(D,{key:0,modelValue:i.advisory,"onUpdate:modelValue":t[5]||(t[5]=m=>i.advisory=m),class:"editor",height:"120px",onBlur:t[6]||(t[6]=m=>a.handleCommit(m))},null,8,["modelValue"])):(e.openBlock(),e.createElementBlock("div",{key:1,class:"txt",onDblclick:t[7]||(t[7]=(...m)=>a.handleEdit&&a.handleEdit(...m)),innerHTML:i.advisory},null,40,$c))]),e.createElementVNode("div",vc,[t[51]||(t[51]=e.createStaticVNode('<div class="major-header" data-v-1e7923d0><div class="cell-item flex" style="flex:1.5;" data-v-1e7923d0>Major waypoint</div><div class="cell-item flex" data-v-1e7923d0>Time</div><div class="cell-item flex" data-v-1e7923d0>Nav</div><div class="cell-item flex" data-v-1e7923d0>Dist</div><div class="cell-item flex" data-v-1e7923d0>SOG/COG</div><div class="cell-item flex" data-v-1e7923d0>Memo</div></div>',1)),e.createElementVNode("div",eN,[(Et=(mt=l.plan)==null?void 0:mt.speeds)!=null&&Et.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(a.computeMajorPoints((pt=(At=(It=(yt=l.plan)==null?void 0:yt.speeds)==null?void 0:It[i.speedIndex])==null?void 0:At.speed)==null?void 0:pt.argv,(kt=(St=(Ct=(zt=(xt=l.plan)==null?void 0:xt.speeds)==null?void 0:zt[i.speedIndex])==null?void 0:Ct.speed)==null?void 0:St.sample)==null?void 0:kt.wps),(m,be)=>(e.openBlock(),e.createElementBlock("div",{key:be,class:"cell-row"},[e.createElementVNode("div",tN,[m.isResume?(e.openBlock(),e.createElementBlock("div",lN,"Resume")):(e.openBlock(),e.createElementBlock("div",oN,[e.createVNode(c,{lat:m.lat,label:""},null,8,["lat"]),t[50]||(t[50]=e.createElementVNode("span",{style:{"margin-right":"3px"}},",",-1)),e.createVNode(E,{lng:m.lng,label:""},null,8,["lng"]),m.pilot?(e.openBlock(),e.createElementBlock("span",nN,"[P]")):e.createCommentVNode("",!0)]))]),e.createElementVNode("div",aN,[e.createTextVNode(e.toDisplayString(a.computeUTCTime(m.eta))+" ",1),m.cp?(e.openBlock(),e.createElementBlock("span",iN,"[cp: "+e.toDisplayString(m.cp.speed)+"]",1)):e.createCommentVNode("",!0)]),be?(e.openBlock(),e.createElementBlock("div",sN,e.toDisplayString(a.computeNav(m)),1)):(e.openBlock(),e.createElementBlock("div",dN)),be?(e.openBlock(),e.createElementBlock("div",rN,e.toDisplayString(a.roundPrecision(m.distanceFromStart,1)),1)):(e.openBlock(),e.createElementBlock("div",cN)),be?(e.openBlock(),e.createElementBlock("div",NN,e.toDisplayString(a.roundPrecision(m.avgSpd??m.speed,2))+" / "+e.toDisplayString(a.roundPrecision(m.bearing,0)),1)):(e.openBlock(),e.createElementBlock("div",DN)),be?(e.openBlock(),e.createElementBlock("div",MN,e.toDisplayString(a.computeMemo(m)),1)):(e.openBlock(),e.createElementBlock("div",gN))]))),128)):e.createCommentVNode("",!0)])])]),e.createElementVNode("div",mN,[(Ut=(jt=l.plan)==null?void 0:jt.speeds)!=null&&Ut.length?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("div",EN,[t[52]||(t[52]=e.createElementVNode("i",{class:"iconfont"},"",-1)),e.createElementVNode("div",yN," Weather Forecast for the Next "+e.toDisplayString(a.computeDay(l.plan,i.speedIndex))+" Days of Route "+e.toDisplayString((Yt=(wt=(Ot=(bt=(ft=l.plan)==null?void 0:ft.speeds)==null?void 0:bt[i.speedIndex])==null?void 0:Ot.speed)==null?void 0:wt.lane)==null?void 0:Yt.name),1),((ht=(Qt=l.plan)==null?void 0:Qt.speeds)==null?void 0:ht.length)>1?(e.openBlock(),e.createElementBlock("div",IN,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((Bt=l.plan)==null?void 0:Bt.speeds,(m,be)=>{var k,tt;return e.openBlock(),e.createElementBlock("div",{key:be,class:e.normalizeClass(["route-item",i.speedIndex===be?"active":""]),onClick:Vt=>{i.speedIndex=be,a.renderEchart()}},e.toDisplayString((tt=(k=m==null?void 0:m.speed)==null?void 0:k.lane)==null?void 0:tt.name),11,AN)}),128))])):e.createCommentVNode("",!0)]),e.createElementVNode("div",pN,[e.createElementVNode("div",VN,null,512)]),e.createElementVNode("div",TN,e.toDisplayString(a.computeModel((Pt=(Ft=(Rt=l.plan)==null?void 0:Rt.speeds)==null?void 0:Ft[i.speedIndex])==null?void 0:Pt.speed)),1),e.createElementVNode("table",null,[e.createElementVNode("thead",null,[e.createElementVNode("tr",null,[t[53]||(t[53]=e.createElementVNode("th",{rowspan:"2"},[e.createTextVNode("Date Time "),e.createElementVNode("br"),e.createTextVNode("UTC")],-1)),t[54]||(t[54]=e.createElementVNode("th",{rowspan:"2"},[e.createTextVNode("Position "),e.createElementVNode("br"),e.createTextVNode("(lat/lon)")],-1)),e.createElementVNode("th",{colspan:(Wt=(Gt=l.plan)==null?void 0:Gt.voyage)!=null&&Wt.sendRptWithBF?3:2},"Wind",8,xN),t[55]||(t[55]=e.createElementVNode("th",{rowspan:"2"},[e.createTextVNode("Sea HT "),e.createElementVNode("br"),e.createTextVNode("(m)")],-1)),t[56]||(t[56]=e.createElementVNode("th",{colspan:"3"},"Swell",-1)),t[57]||(t[57]=e.createElementVNode("th",{colspan:"3"},"Sig",-1)),t[58]||(t[58]=e.createElementVNode("th",{colspan:"3"},"Current",-1))]),e.createElementVNode("tr",null,[t[59]||(t[59]=e.createElementVNode("th",null,"Dir",-1)),t[60]||(t[60]=e.createElementVNode("th",null,"Speed (kts)",-1)),(Zt=(Lt=l.plan)==null?void 0:Lt.voyage)!=null&&Zt.sendRptWithBF?(e.openBlock(),e.createElementBlock("th",zN,"BF")):e.createCommentVNode("",!0),t[61]||(t[61]=e.createElementVNode("th",null,"Dir",-1)),t[62]||(t[62]=e.createElementVNode("th",null,"Ht (m)",-1)),t[63]||(t[63]=e.createElementVNode("th",null,"Prd (s)",-1)),t[64]||(t[64]=e.createElementVNode("th",null,"Dir",-1)),t[65]||(t[65]=e.createElementVNode("th",null,"Hgt (m)",-1)),t[66]||(t[66]=e.createElementVNode("th",null,"Prd (s)",-1)),t[67]||(t[67]=e.createElementVNode("th",null,"Dir",-1)),t[68]||(t[68]=e.createElementVNode("th",null,"Speed (kts)",-1)),t[69]||(t[69]=e.createElementVNode("th",null,"Factor (kts)",-1))])]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((Kt=(Xt=(_t=(Jt=(Ht=l.plan)==null?void 0:Ht.speeds)==null?void 0:Jt[i.speedIndex])==null?void 0:_t.speed)==null?void 0:Xt.sample)==null?void 0:Kt.hours,(m,be)=>{var k,tt,Vt,ut,qt,$t,vt,el,tl,ll,ol,nl,al,il,sl,dl,rl,cl,Nl,Dl,Ml,gl,ml,El,yl,Il,Al,pl,Vl,Tl,xl,zl,Cl,Sl,kl,jl,Ul,fl,bl,Ol,wl,Yl,Ql,hl,Bl,Rl,Fl,Pl,Gl,Wl,Ll,Zl,Hl;return e.openBlock(),e.createElementBlock("tr",{key:be,class:e.normalizeClass(m.isDangerous?"dangerous":m.isSevere?"severe":m.isHeavy?"heavy":"")},[e.createElementVNode("td",null,e.toDisplayString(a.computeUTCTime(m.eta)),1),e.createElementVNode("td",null,[e.createElementVNode("div",CN,[e.createVNode(c,{lat:m.lat,label:""},null,8,["lat"]),t[70]||(t[70]=e.createElementVNode("span",null,"/",-1)),e.createVNode(E,{lng:m.lng,label:""},null,8,["lng"])])]),e.createElementVNode("td",null,[(tt=(k=m.meteo)==null?void 0:k.wind)!=null&&tt.kts?(e.openBlock(),e.createElementBlock("span",SN,[e.createTextVNode(e.toDisplayString((ut=(Vt=m.meteo)==null?void 0:Vt.wind)==null?void 0:ut.direction),1),e.createElementVNode("i",{class:"iconfont",style:e.normalizeStyle(a.computeDegree(($t=(qt=m.meteo)==null?void 0:qt.wind)==null?void 0:$t.degree,!1))},"",4)])):(e.openBlock(),e.createElementBlock("span",kN,"-"))]),e.createElementVNode("td",null,e.toDisplayString(a.roundPrecision((el=(vt=m.meteo)==null?void 0:vt.wind)==null?void 0:el.kts,1)),1),(ll=(tl=l.plan)==null?void 0:tl.voyage)!=null&&ll.sendRptWithBF?(e.openBlock(),e.createElementBlock("td",jN,e.toDisplayString((nl=(ol=m.meteo)==null?void 0:ol.wind)==null?void 0:nl.scale),1)):e.createCommentVNode("",!0),e.createElementVNode("td",null,e.toDisplayString(a.roundPrecision((sl=(il=(al=m.meteo)==null?void 0:al.wave)==null?void 0:il.wd)==null?void 0:sl.height,1)),1),e.createElementVNode("td",null,[(cl=(rl=(dl=m.meteo)==null?void 0:dl.wave)==null?void 0:rl.swell)!=null&&cl.height?(e.openBlock(),e.createElementBlock("span",UN,[e.createTextVNode(e.toDisplayString((Ml=(Dl=(Nl=m.meteo)==null?void 0:Nl.wave)==null?void 0:Dl.swell)==null?void 0:Ml.direction),1),e.createElementVNode("i",{class:"iconfont",style:e.normalizeStyle(a.computeDegree((El=(ml=(gl=m.meteo)==null?void 0:gl.wave)==null?void 0:ml.swell)==null?void 0:El.degree,!1))},"",4)])):(e.openBlock(),e.createElementBlock("span",fN,"-"))]),e.createElementVNode("td",null,e.toDisplayString(a.roundPrecision((Al=(Il=(yl=m.meteo)==null?void 0:yl.wave)==null?void 0:Il.swell)==null?void 0:Al.height,1)),1),e.createElementVNode("td",null,e.toDisplayString(a.roundPrecision((Tl=(Vl=(pl=m.meteo)==null?void 0:pl.wave)==null?void 0:Vl.swell)==null?void 0:Tl.period,1)),1),e.createElementVNode("td",null,[(Cl=(zl=(xl=m.meteo)==null?void 0:xl.wave)==null?void 0:zl.sig)!=null&&Cl.height?(e.openBlock(),e.createElementBlock("span",bN,[e.createTextVNode(e.toDisplayString((jl=(kl=(Sl=m.meteo)==null?void 0:Sl.wave)==null?void 0:kl.sig)==null?void 0:jl.direction),1),e.createElementVNode("i",{class:"iconfont",style:e.normalizeStyle(a.computeDegree((bl=(fl=(Ul=m.meteo)==null?void 0:Ul.wave)==null?void 0:fl.sig)==null?void 0:bl.degree,!1))},"",4)])):(e.openBlock(),e.createElementBlock("span",ON,"-"))]),e.createElementVNode("td",null,e.toDisplayString(a.roundPrecision((Yl=(wl=(Ol=m.meteo)==null?void 0:Ol.wave)==null?void 0:wl.sig)==null?void 0:Yl.height,1)),1),e.createElementVNode("td",null,e.toDisplayString(a.roundPrecision((Bl=(hl=(Ql=m.meteo)==null?void 0:Ql.wave)==null?void 0:hl.sig)==null?void 0:Bl.period,1)),1),e.createElementVNode("td",null,[(Fl=(Rl=m.meteo)==null?void 0:Rl.current)!=null&&Fl.kts?(e.openBlock(),e.createElementBlock("span",wN,[e.createTextVNode(e.toDisplayString((Gl=(Pl=m.meteo)==null?void 0:Pl.current)==null?void 0:Gl.direction),1),e.createElementVNode("i",{class:"iconfont",style:e.normalizeStyle(a.computeDegree((Ll=(Wl=m.meteo)==null?void 0:Wl.current)==null?void 0:Ll.degree,!0))},"",4)])):(e.openBlock(),e.createElementBlock("span",YN,"-"))]),e.createElementVNode("td",null,e.toDisplayString(a.roundPrecision((Hl=(Zl=m.meteo)==null?void 0:Zl.current)==null?void 0:Hl.kts,1)),1),e.createElementVNode("td",null,e.toDisplayString(a.roundPrecision(m.cFactor,1)),1)],2)}),128))])])],64)):e.createCommentVNode("",!0),t[71]||(t[71]=e.createElementVNode("div",{class:"tips",style:{"text-align":"justify"}},[e.createElementVNode("div",null,"The waypoints in this sheet are approximate positions."),e.createElementVNode("div",null," The route map is for reference only and should not be used for navigation. All the material is an advisory provided so as to assist the Master in making the final route decision. ")],-1))])])])}const rs=Re(Hr,[["render",QN],["__scopeId","data-v-1e7923d0"]]),iw="",hN={name:"RouteReport",components:{Lng:On,Lat:wn,Editor:vl},props:{plan:{type:Object,default:()=>({})},editorDisabled:{type:Boolean,default:()=>!1}},emits:["commit","refresh"],data(){return{editable:!1,advisory:""}},computed:{computeUTCTime(){return function(o,t="MMM-DD/HHmm[Z]"){return`${F(o).utc().format(t)}`}},computeLTime(){return function(o,t){const l=F(o);return l.utcOffset(t),`${l.format("MMM-DD/HHmm")}LT`}},computeUTCOffset(){var o,t,l,d,i;return(i=(d=(l=(t=(o=this.plan)==null?void 0:o.leg)==null?void 0:t.destination)==null?void 0:l.port)==null?void 0:d.timezone)==null?void 0:i.UtcCurrentOffset},computeTimeDiff(){return function(o,t){var l,d,i;if(t===0)return"-";{const a=F((d=(l=o==null?void 0:o.speeds[t])==null?void 0:l.speed)==null?void 0:d.eta).diff(F((i=o==null?void 0:o.speeds[0])==null?void 0:i.speed.eta),"h",!0);return Math.round(a*10)/10}}},computeNav(){return function(o){return o.gcToPrevious?"GC":"RL"}},roundPrecision(){return function(o,t=4){if(typeof o=="number"){const l=Number("1".padEnd(t+1,"0"));return Math.round(o*l)/l}else return"-"}},computeMapChart(){var o;return((o=this.plan)==null?void 0:o.chartUrl)||"//oss.idmwx.com/asset/route-report_example.png"},computeDegree(){return function(o,t){o=o%360;for(let l=0;l<17;l++)if(l*22.5+o+11.25>=360){let d=(16-l)*22.5;return t||(d=d+180),`transform:rotate(${d}deg);margin-left:3px;`}}},computeDay(){return function(o){var i,a,N;const t=(N=(a=(i=o==null?void 0:o.speeds[0])==null?void 0:i.speed)==null?void 0:a.sample)==null?void 0:N.hours,l=t==null?void 0:t[0],d=t==null?void 0:t[(t==null?void 0:t.length)-1];return F(d==null?void 0:d.eta).diff(F(l==null?void 0:l.eta),"day")}}},watch:{plan:{handler(){var o,t;(o=this.plan)!=null&&o.id&&(this.advisory=((t=this.plan)==null?void 0:t.advisory)||"Pls find the following major waypoints for your safe navigation.")},immediate:!0}},methods:{handleCommit(o){this.editable=!1,this.$emit("commit",o)},handleRefresh(){this.$emit("refresh")},handleEdit(){this.editorDisabled?this.editable=!1:this.editable=!0}}},BN={class:"route-report"},RN={class:"section"},FN={class:"section-body basics"},PN={class:"flex-space section-row"},GN={class:"flex-start"},WN={class:"flex-start"},LN={class:"flex-start"},ZN={class:"flex-start flex"},HN={key:0,class:"flex"},JN={key:1,class:"flex-space flex"},_N={class:"time flex"},XN={class:"flex-space section-row"},KN={class:"flex-start"},uN={class:"flex-start"},qN={class:"flex-start"},$N={class:"flex-start flex"},vN={key:0,class:"flex"},eD={key:1,class:"flex-space"},tD={class:"time flex"},lD={class:"flex-space section-row"},oD={class:"flex-start"},nD={class:"flex-start"},aD={class:"flex-start"},iD={class:"flex-start flex"},sD={class:"section",style:{"border-bottom":"2px dashed var(--fli-border-color-dark)"}},dD={class:"section-body detail"},rD={class:"flex-space",style:{"align-items":"stretch"}},cD={class:"chart"},ND=["src"],DD={key:1,class:"empty flex-center"},MD={class:"route flex",style:{"justify-content":"space-between"}},gD={class:"suggestion"},mD=["innerHTML"],ED={class:"flex-start legends"},yD={key:0,class:"legend"},ID={key:1,class:"legend"},AD={class:"section"},pD={class:"section-body comparison"},VD={class:"container"},TD={key:0},xD={class:"section",style:{"page-break-inside":"avoid"}},zD={class:"section-body sample"},CD={class:"major-waypoints"},SD={class:"container"},kD={class:"body"},jD={class:"cell-item flexM"},UD={class:"flex-center"},fD={class:"cell-item flexL"},bD={key:0,class:"flex-center"},OD={key:1},wD={class:"cell-item flex"},YD={key:0,class:"cell-item flex offset"},QD={key:1,class:"cell-item flex nbsp"},hD={key:2,class:"cell-item flex offset"},BD={key:3,class:"cell-item flex nbsp"},RD={key:4,class:"cell-item flex offset"},FD={key:5,class:"cell-item flex nbsp"},PD={class:"section"},GD={class:"section-body sample"},WD={key:0},LD={class:"flex-center"},ZD={key:0,class:"degree-box"},HD={key:1},JD={key:0,class:"degree-box"},_D={key:1},XD={key:0,class:"degree-box"},KD={key:1},uD={key:0,class:"degree-box"},qD={key:1};function $D(o,t,l,d,i,a){var E,I,D,M,x,A,p,V,y,z,T,C,g,U,b,O,w,Y,Q,R,P,G,W,L,J,f,ee,te,le,oe,ne,n,Z,u,q,$,ae,ie,_,Ne,K,ce,De,Me,re,ye,Ie,Ae,pe,Ve,Te,xe,ze,Ce,Se,ke,je,Ue,fe,ge,we,Ye,Oe;const N=e.resolveComponent("Lat"),s=e.resolveComponent("Lng"),c=e.resolveComponent("Editor");return e.openBlock(),e.createElementBlock("div",BN,[t[28]||(t[28]=e.createElementVNode("div",{class:"brand"},[e.createElementVNode("img",{class:"bgImg",src:"https://img.idmwx.com/asset/fli_bg.jpeg"})],-1)),e.createElementVNode("div",RN,[t[12]||(t[12]=e.createElementVNode("div",{class:"section-header flex-start"},[e.createElementVNode("i",{class:"iconfont"},""),e.createElementVNode("div",{class:"title"},"Voyage Basics")],-1)),e.createElementVNode("div",FN,[e.createElementVNode("div",PN,[e.createElementVNode("div",GN,[t[4]||(t[4]=e.createElementVNode("label",{class:"flex-end"},"Company Name",-1)),e.createElementVNode("div",WN,e.toDisplayString((D=(I=(E=l.plan)==null?void 0:E.voyage)==null?void 0:I.company)==null?void 0:D.name),1)]),e.createElementVNode("div",LN,[t[6]||(t[6]=e.createElementVNode("label",{class:"flex-end"},"Departure Port",-1)),e.createElementVNode("div",ZN,[(A=(x=(M=l.plan)==null?void 0:M.leg)==null?void 0:x.departure)!=null&&A.name?(e.openBlock(),e.createElementBlock("div",HN,e.toDisplayString((V=(p=l.plan)==null?void 0:p.leg)==null?void 0:V.departure.name),1)):(e.openBlock(),e.createElementBlock("div",JN,[e.createVNode(N,{lat:(T=(z=(y=l.plan)==null?void 0:y.leg)==null?void 0:z.departure)==null?void 0:T.lat,label:""},null,8,["lat"]),t[5]||(t[5]=e.createElementVNode("span",{style:{"margin-right":"3px"}},",",-1)),e.createVNode(s,{lng:(U=(g=(C=l.plan)==null?void 0:C.leg)==null?void 0:g.departure)==null?void 0:U.lng,label:""},null,8,["lng"])])),e.createElementVNode("div",_N,e.toDisplayString(a.computeUTCTime(((w=(O=(b=l.plan)==null?void 0:b.leg)==null?void 0:O.departure)==null?void 0:w.atd)||((R=(Q=(Y=l.plan)==null?void 0:Y.leg)==null?void 0:Q.departure)==null?void 0:R.etd),"MMMM-DD, HHmm[Z]")),1)])])]),e.createElementVNode("div",XN,[e.createElementVNode("div",KN,[t[7]||(t[7]=e.createElementVNode("label",{class:"flex-end"},"Vessel Name",-1)),e.createElementVNode("div",uN,e.toDisplayString((W=(G=(P=l.plan)==null?void 0:P.voyage)==null?void 0:G.vessel)==null?void 0:W.name),1)]),e.createElementVNode("div",qN,[t[9]||(t[9]=e.createElementVNode("label",{class:"flex-end"},"Arrival Port",-1)),e.createElementVNode("div",$N,[(f=(J=(L=l.plan)==null?void 0:L.leg)==null?void 0:J.destination)!=null&&f.name?(e.openBlock(),e.createElementBlock("div",vN,e.toDisplayString((te=(ee=l.plan)==null?void 0:ee.leg)==null?void 0:te.destination.name),1)):(e.openBlock(),e.createElementBlock("div",eD,[e.createVNode(N,{lat:(ne=(oe=(le=l.plan)==null?void 0:le.leg)==null?void 0:oe.destination)==null?void 0:ne.lat,label:""},null,8,["lat"]),t[8]||(t[8]=e.createElementVNode("span",{style:{"margin-right":"3px"}},",",-1)),e.createVNode(s,{lng:(u=(Z=(n=l.plan)==null?void 0:n.leg)==null?void 0:Z.destination)==null?void 0:u.lng,label:""},null,8,["lng"])])),e.createElementVNode("div",tD,e.toDisplayString(a.computeUTCTime(((ae=($=(q=l.plan)==null?void 0:q.speeds)==null?void 0:$[0])==null?void 0:ae.speed.ata)||((_=(ie=l.plan)==null?void 0:ie.speeds)==null?void 0:_[0].speed.eta),"MMMM-DD, HHmm[Z]")),1)])])]),e.createElementVNode("div",lD,[e.createElementVNode("div",oD,[t[10]||(t[10]=e.createElementVNode("label",{class:"flex-end"},"Report Created",-1)),e.createElementVNode("div",nD,e.toDisplayString(a.computeUTCTime((Ne=l.plan)==null?void 0:Ne.createdAt,"MMMM-DD, HHmm[Z]")),1)]),e.createElementVNode("div",aD,[t[11]||(t[11]=e.createElementVNode("label",{class:"flex-end"},"Voyage Condition",-1)),e.createElementVNode("div",iD,[e.createElementVNode("div",null,e.toDisplayString((ce=(K=l.plan)==null?void 0:K.voyage)==null?void 0:ce.loadCondition),1)])])])])]),e.createElementVNode("div",sD,[t[19]||(t[19]=e.createElementVNode("div",{class:"section-header flex-start"},[e.createElementVNode("i",{class:"iconfont"},""),e.createElementVNode("div",{class:"title"},"Route Details")],-1)),e.createElementVNode("div",dD,[e.createElementVNode("div",rD,[e.createElementVNode("div",cD,[(De=l.plan)!=null&&De.chartUrl?(e.openBlock(),e.createElementBlock("img",{key:0,src:(Me=l.plan)==null?void 0:Me.chartUrl},null,8,ND)):(e.openBlock(),e.createElementBlock("div",DD,[t[13]||(t[13]=e.createTextVNode("waiting for weather map, ")),e.createElementVNode("b",{onClick:t[0]||(t[0]=(...S)=>a.handleRefresh&&a.handleRefresh(...S))},"Refresh"),t[14]||(t[14]=e.createTextVNode("later please"))]))]),e.createElementVNode("div",MD,[e.createElementVNode("div",null,[t[15]||(t[15]=e.createElementVNode("div",{class:"title"},"ROUTE REMARKS",-1)),e.createElementVNode("div",gD,[i.editable?(e.openBlock(),e.createBlock(c,{key:0,modelValue:i.advisory,"onUpdate:modelValue":t[1]||(t[1]=S=>i.advisory=S),class:"editor",height:"120px",onBlur:t[2]||(t[2]=S=>a.handleCommit(S))},null,8,["modelValue"])):(e.openBlock(),e.createElementBlock("div",{key:1,class:"txt",onDblclick:t[3]||(t[3]=(...S)=>a.handleEdit&&a.handleEdit(...S)),innerHTML:i.advisory},null,40,mD))])]),e.createElementVNode("div",ED,[t[18]||(t[18]=e.createStaticVNode('<div class="legend" data-v-e08bd687><label style="background-color:var(--idm-severe);" data-v-e08bd687></label><span data-v-e08bd687>Dangerous</span></div><div class="legend" data-v-e08bd687><label style="background-color:var(--idm-heavy);" data-v-e08bd687></label><span data-v-e08bd687>Severe</span></div><div class="legend" data-v-e08bd687><b class="route1" data-v-e08bd687></b><span data-v-e08bd687>Route 1</span></div>',3)),((ye=(re=l.plan)==null?void 0:re.speeds)==null?void 0:ye.length)>1?(e.openBlock(),e.createElementBlock("div",yD,t[16]||(t[16]=[e.createElementVNode("b",{class:"route2"},null,-1),e.createElementVNode("span",null,"Route 2",-1)]))):e.createCommentVNode("",!0),((Ae=(Ie=l.plan)==null?void 0:Ie.speeds)==null?void 0:Ae.length)>2?(e.openBlock(),e.createElementBlock("div",ID,t[17]||(t[17]=[e.createElementVNode("b",{class:"route3"},null,-1),e.createElementVNode("span",null,"Route 3",-1)]))):e.createCommentVNode("",!0)])])])])]),e.createElementVNode("div",AD,[t[21]||(t[21]=e.createElementVNode("div",{class:"section-header flex-start"},[e.createElementVNode("i",{class:"iconfont"},""),e.createElementVNode("div",{class:"title"},"Route Summary")],-1)),e.createElementVNode("div",pD,[e.createElementVNode("div",VD,[(Ve=(pe=l.plan)==null?void 0:pe.speeds)!=null&&Ve.length?(e.openBlock(),e.createElementBlock("table",TD,[t[20]||(t[20]=e.createElementVNode("thead",null,[e.createElementVNode("tr"),e.createElementVNode("tr",null,[e.createElementVNode("th",null,"Route"),e.createElementVNode("th",null,"TTL Dist (nm)"),e.createElementVNode("th",null,"SPD (kts)"),e.createElementVNode("th",null,"CP Cons (mt)"),e.createElementVNode("th",null,"ETA (UTC)"),e.createElementVNode("th",null,"Avg.Spd / Wx / Cur.Factor (kts)"),e.createElementVNode("th",null,"TTL Cons (mt)")])],-1)),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((Te=l.plan)==null?void 0:Te.speeds,(S,Ee)=>{var Qe,Ge,We,j,Le,Ze,r,v,me,h,Fe,se,Pe,He,Je;return e.openBlock(),e.createElementBlock("tr",{key:Ee},[e.createElementVNode("td",null,"Route "+e.toDisplayString(Ee+1),1),e.createElementVNode("td",null,e.toDisplayString(a.roundPrecision((Qe=S.speed)==null?void 0:Qe.distance,0)),1),e.createElementVNode("td",null,e.toDisplayString(`${((Ge=S.speed)==null?void 0:Ge.label)??"CP"} ${((We=S.speed)==null?void 0:We.v0)??((Le=(j=S.speed)==null?void 0:j.cpCopy)==null?void 0:Le.speed)}`),1),e.createElementVNode("td",null,e.toDisplayString((r=(Ze=S.speed)==null?void 0:Ze.cpCopy)==null?void 0:r.fo)+" FO / "+e.toDisplayString((me=(v=S.speed)==null?void 0:v.cpCopy)==null?void 0:me.dgo)+" DO",1),e.createElementVNode("td",null,e.toDisplayString(a.computeUTCTime((h=S.speed)==null?void 0:h.eta)),1),e.createElementVNode("td",null,e.toDisplayString(a.roundPrecision((Fe=S.speed)==null?void 0:Fe.avgSpeed,2))+" / "+e.toDisplayString(a.roundPrecision((se=S.speed)==null?void 0:se.wxFactor,2))+" / "+e.toDisplayString(a.roundPrecision((Pe=S.speed)==null?void 0:Pe.cFactor,2)),1),e.createElementVNode("td",null,e.toDisplayString(a.roundPrecision((He=S.speed)==null?void 0:He.totalFoCons,3))+" FO /"+e.toDisplayString(a.roundPrecision((Je=S.speed)==null?void 0:Je.totalDgoCons,3))+" DO",1)])}),128))])])):e.createCommentVNode("",!0)])])]),e.createElementVNode("div",xD,[t[24]||(t[24]=e.createElementVNode("div",{class:"section-header flex-start"},[e.createElementVNode("i",{class:"iconfont"},""),e.createElementVNode("div",{class:"title"},"Major Waypoint")],-1)),e.createElementVNode("div",zD,[e.createElementVNode("div",CD,[e.createElementVNode("div",SD,[t[23]||(t[23]=e.createStaticVNode('<div class="header" data-v-e08bd687><div class="cell-item flexM" data-v-e08bd687>Major waypoint</div><div class="cell-item flexL" data-v-e08bd687>Name</div><div class="cell-item flex" data-v-e08bd687>Time</div><div class="cell-item flex" data-v-e08bd687>Nav</div><div class="cell-item flex" data-v-e08bd687>Dist</div><div class="cell-item flex" data-v-e08bd687>SOG</div></div>',1)),e.createElementVNode("div",kD,[(ze=(xe=l.plan)==null?void 0:xe.speeds)!=null&&ze.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList((je=(ke=(Se=(Ce=l.plan)==null?void 0:Ce.speeds[0])==null?void 0:Se.speed)==null?void 0:ke.sample)==null?void 0:je.wps,(S,Ee)=>(e.openBlock(),e.createElementBlock("div",{key:Ee,class:"cell-row"},[e.createElementVNode("div",jD,[e.createElementVNode("div",UD,[e.createVNode(N,{lat:S.lat,label:""},null,8,["lat"]),t[22]||(t[22]=e.createElementVNode("span",{style:{"margin-right":"3px"}},",",-1)),e.createVNode(s,{lng:S.lng,label:""},null,8,["lng"])])]),e.createElementVNode("div",fD,[S.name?(e.openBlock(),e.createElementBlock("span",bD,e.toDisplayString(S.name),1)):(e.openBlock(),e.createElementBlock("span",OD,"-"))]),e.createElementVNode("div",wD,e.toDisplayString(a.computeUTCTime(S.eta)),1),Ee?(e.openBlock(),e.createElementBlock("div",YD,e.toDisplayString(a.computeNav(S)),1)):(e.openBlock(),e.createElementBlock("div",QD)),Ee?(e.openBlock(),e.createElementBlock("div",hD,e.toDisplayString(a.roundPrecision(S.distanceFromStart,1)),1)):(e.openBlock(),e.createElementBlock("div",BD)),Ee?(e.openBlock(),e.createElementBlock("div",RD,e.toDisplayString(a.roundPrecision(S.avgSpd??S.speed,1)),1)):(e.openBlock(),e.createElementBlock("div",FD))]))),128)):e.createCommentVNode("",!0)])])])])]),e.createElementVNode("div",PD,[t[27]||(t[27]=e.createElementVNode("div",{class:"section-header flex-start"},[e.createElementVNode("i",{class:"iconfont"},""),e.createElementVNode("div",{class:"title"},"Route Forecast")],-1)),e.createElementVNode("div",GD,[(fe=(Ue=l.plan)==null?void 0:Ue.speeds)!=null&&fe.length?(e.openBlock(),e.createElementBlock("table",WD,[t[26]||(t[26]=e.createElementVNode("thead",null,[e.createElementVNode("tr",null,[e.createElementVNode("th",{rowspan:"2"},[e.createTextVNode("Date Time "),e.createElementVNode("br"),e.createTextVNode("(UTC)")]),e.createElementVNode("th",{rowspan:"2"},[e.createTextVNode("Position "),e.createElementVNode("br"),e.createTextVNode("(lat/lon)")]),e.createElementVNode("th",{colspan:"2"},"Wind"),e.createElementVNode("th",{rowspan:"2"},[e.createTextVNode("Sea HT "),e.createElementVNode("br"),e.createTextVNode("(m)")]),e.createElementVNode("th",{colspan:"3"},"Swell"),e.createElementVNode("th",{colspan:"3"},"Sig"),e.createElementVNode("th",{colspan:"3"},"Current")]),e.createElementVNode("tr",null,[e.createElementVNode("th",null,"Dir"),e.createElementVNode("th",null,"Speed (kts)"),e.createElementVNode("th",null,"Dir"),e.createElementVNode("th",null,"Ht (m)"),e.createElementVNode("th",null,"Prd (s)"),e.createElementVNode("th",null,"Dir"),e.createElementVNode("th",null,"Hgt (m)"),e.createElementVNode("th",null,"Prd (s)"),e.createElementVNode("th",null,"Dir"),e.createElementVNode("th",null,"Speed (kts)"),e.createElementVNode("th",null,"Factor (kts)")])],-1)),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((Oe=(Ye=(we=(ge=l.plan)==null?void 0:ge.speeds[0])==null?void 0:we.speed)==null?void 0:Ye.sample)==null?void 0:Oe.hours,(S,Ee)=>{var Qe,Ge,We,j,Le,Ze,r,v,me,h,Fe,se,Pe,He,Je,Ke,ue,qe,$e,ve,et,ot,nt,at,it,st,dt,rt,ct,Nt,Dt,Mt,gt,mt,Et,yt,It,At,pt;return e.openBlock(),e.createElementBlock("tr",{key:Ee,class:e.normalizeClass(S.isDangerous?"dangerous":S.isSevere?"severe":S.isHeavy?"heavy":"")},[e.createElementVNode("td",null,e.toDisplayString(a.computeUTCTime(S.eta)),1),e.createElementVNode("td",null,[e.createElementVNode("div",LD,[e.createVNode(N,{lat:S.lat,label:""},null,8,["lat"]),t[25]||(t[25]=e.createElementVNode("span",null,"/",-1)),e.createVNode(s,{lng:S.lng,label:""},null,8,["lng"])])]),e.createElementVNode("td",null,[(Ge=(Qe=S.meteo)==null?void 0:Qe.wind)!=null&&Ge.kts?(e.openBlock(),e.createElementBlock("span",ZD,e.toDisplayString((j=(We=S.meteo)==null?void 0:We.wind)==null?void 0:j.direction),1)):(e.openBlock(),e.createElementBlock("span",HD,"-"))]),e.createElementVNode("td",null,e.toDisplayString(a.roundPrecision((Ze=(Le=S.meteo)==null?void 0:Le.wind)==null?void 0:Ze.kts,1)),1),e.createElementVNode("td",null,e.toDisplayString(a.roundPrecision((me=(v=(r=S.meteo)==null?void 0:r.wave)==null?void 0:v.wd)==null?void 0:me.height,1)),1),e.createElementVNode("td",null,[(se=(Fe=(h=S.meteo)==null?void 0:h.wave)==null?void 0:Fe.swell)!=null&&se.height?(e.openBlock(),e.createElementBlock("span",JD,e.toDisplayString((Je=(He=(Pe=S.meteo)==null?void 0:Pe.wave)==null?void 0:He.swell)==null?void 0:Je.direction),1)):(e.openBlock(),e.createElementBlock("span",_D,"-"))]),e.createElementVNode("td",null,e.toDisplayString(a.roundPrecision((qe=(ue=(Ke=S.meteo)==null?void 0:Ke.wave)==null?void 0:ue.swell)==null?void 0:qe.height,1)),1),e.createElementVNode("td",null,e.toDisplayString(a.roundPrecision((et=(ve=($e=S.meteo)==null?void 0:$e.wave)==null?void 0:ve.swell)==null?void 0:et.period,1)),1),e.createElementVNode("td",null,[(at=(nt=(ot=S.meteo)==null?void 0:ot.wave)==null?void 0:nt.sig)!=null&&at.height?(e.openBlock(),e.createElementBlock("span",XD,e.toDisplayString((dt=(st=(it=S.meteo)==null?void 0:it.wave)==null?void 0:st.sig)==null?void 0:dt.direction),1)):(e.openBlock(),e.createElementBlock("span",KD,"-"))]),e.createElementVNode("td",null,e.toDisplayString(a.roundPrecision((Nt=(ct=(rt=S.meteo)==null?void 0:rt.wave)==null?void 0:ct.sig)==null?void 0:Nt.height,1)),1),e.createElementVNode("td",null,e.toDisplayString(a.roundPrecision((gt=(Mt=(Dt=S.meteo)==null?void 0:Dt.wave)==null?void 0:Mt.sig)==null?void 0:gt.period,1)),1),e.createElementVNode("td",null,[(Et=(mt=S.meteo)==null?void 0:mt.current)!=null&&Et.kts?(e.openBlock(),e.createElementBlock("span",uD,e.toDisplayString((It=(yt=S.meteo)==null?void 0:yt.current)==null?void 0:It.direction),1)):(e.openBlock(),e.createElementBlock("span",qD,"-"))]),e.createElementVNode("td",null,e.toDisplayString(a.roundPrecision((pt=(At=S.meteo)==null?void 0:At.current)==null?void 0:pt.kts,1)),1),e.createElementVNode("td",null,e.toDisplayString(a.roundPrecision(S.cFactor,1)),1)],2)}),128))])])):e.createCommentVNode("",!0)])]),t[29]||(t[29]=e.createElementVNode("div",{class:"section"},[e.createElementVNode("div",{class:"section-body footer"},[e.createElementVNode("div",null,[e.createTextVNode("Fleet Insight Limited "),e.createElementVNode("a",{href:"mailto:ops@fltins.com"},"ops@fltins.com")]),e.createElementVNode("div",{style:{"font-size":"11px","margin-top":"10px"}}," The waypoints and route map provided are intended for informational purposes only and should not be relied upon for actual navigation. Fleet Insight Limited assumes no liability for any direct/potential damage to vessels or cargo that may occur as a result of using this voyage plan for exact navigation. ")])],-1))])}const Ms=Re(hN,[["render",$D],["__scopeId","data-v-e08bd687"]]),vD={install(o){o.component("RouteReport",rs),o.component("FliPlanReport",Ms),o.component("OrmPlanReport",rs)}},eM={install(o){o.component("IdmEditor",vl)}},tM={install(o){o.component("IdmLat",wn)}},lM={install(o){o.component("IdmLng",On)}},oM={name:"PiLogo",props:{fill:{type:String,default:"#000000"}}},nM={class:"logo"},aM={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1280.000000 1280.000000"},iM=["fill"];function sM(o,t,l,d,i,a){return e.openBlock(),e.createElementBlock("i",nM,[(e.openBlock(),e.createElementBlock("svg",aM,[e.createElementVNode("g",{transform:"translate(0.000000,1280.000000) scale(0.100000,-0.100000)",fill:l.fill,"fill-opacity":.6,stroke:"none"},t[0]||(t[0]=[e.createElementVNode("path",{d:`M4225 11533 c-100 -6 -311 -23 -335 -27 -14 -3 -59 -10 -100 -16
1
+ (function(B,de){typeof exports=="object"&&typeof module<"u"?de(exports,require("@idm-plugin/geo"),require("moment"),require("vue"),require("echarts"),require("@wangeditor/editor-for-vue"),require("element-plus"),require("@idmui/tropical"),require("@element-plus/icons-vue"),require("axios"),require("mapbox-gl"),require("@idmui/precip")):typeof define=="function"&&define.amd?define(["exports","@idm-plugin/geo","moment","vue","echarts","@wangeditor/editor-for-vue","element-plus","@idmui/tropical","@element-plus/icons-vue","axios","mapbox-gl","@idmui/precip"],de):(B=typeof globalThis<"u"?globalThis:B||self,de(B["idmui-report"]={},B["@idm-plugin/geo"],B.moment,B.Vue,B.echarts,B["@wangeditor/editor-for-vue"],B["element-plus"],B["@idmui/tropical"],B["@element-plus/icons-vue"],B.axios,B["mapbox-gl"],B["@idmui/precip"]))})(this,function(B,de,F,e,Ld,Ns,cs,Zd,Qn,bn,hn,Hd){"use strict";function Jd(o){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const l in o)if(l!=="default"){const d=Object.getOwnPropertyDescriptor(o,l);Object.defineProperty(t,l,d.get?d:{enumerable:!0,get:()=>o[l]})}}return t.default=o,Object.freeze(t)}const Rn=Jd(Ld),ew="",Re=(o,t)=>{const l=o.__vccOpts||o;for(const[d,i]of t)l[d]=i;return l},_d={name:"IdmBrand",props:{name:{type:String,default:""},issued:{type:String,default:""}},computed:{computeUTCTime(){return function(o,t="MMM-DD/HHmm[Z]"){return`${(o?F(o):F()).utc().format(t)}`}}}},Xd={class:"section brand-section flex-space"},Kd={class:"report-box flex-space"},ud={class:"name flex-start"},qd={class:"flex-start",style:{"flex-wrap":"wrap",width:"200px"}},$d={class:"flex-start",style:{width:"100%"}},vd={class:"label-block flex-evenly",style:{flex:"1"}},er={class:"flex-end",style:{flex:"2"}};function tr(o,t,l,d,i,a){return e.openBlock(),e.createElementBlock("div",Xd,[t[2]||(t[2]=e.createStaticVNode('<div class="logo-box flex-center" data-v-7679e32b><div class="logo" data-v-7679e32b><a href="https://fmp.idmwx.com" target="_blank" data-v-7679e32b><img src="https://img.idmwx.com/asset/orm/logo_300x180.png" data-v-7679e32b></a><a href="https://fmp.idmwx.com" target="_blank" style="text-decoration:none;" data-v-7679e32b><div class="brand" data-v-7679e32b><span style="text-decoration:underline;" data-v-7679e32b>Weather Routing</span><div class="company" data-v-7679e32b>Ocean Right Marine Service</div></div></a></div></div>',1)),e.createElementVNode("div",Kd,[e.createElementVNode("div",ud,e.toDisplayString(l.name),1),e.createElementVNode("div",qd,[e.createElementVNode("div",$d,[e.createElementVNode("div",vd,[t[0]||(t[0]=e.createElementVNode("label",{class:"flex-end",style:{flex:"1"}},"Issued",-1)),e.createElementVNode("span",er,e.toDisplayString(a.computeUTCTime(l.issued,"MMM-DD, YYYY")),1)])]),t[1]||(t[1]=e.createElementVNode("div",{class:"flex-start",style:{width:"100%"}},[e.createElementVNode("div",{class:"label-block flex-evenly",style:{flex:"1"}},[e.createElementVNode("label",{class:"flex-end",style:{flex:"1"}},"Mail to"),e.createElementVNode("a",{class:"flex-end",style:{flex:"2"},href:"mailto:op@ormwx.com"},"op@ormwx.com")])],-1))])])])}const ql=Re(_d,[["render",tr],["__scopeId","data-v-7679e32b"]]),lr={name:"IdmLoading",props:{loading:{type:Boolean,default:!1},text:{type:String,default:"Loading..."}},emits:["timeout"],watch:{loading:{handler(){this.loading&&setTimeout(()=>{this.$emit("timeout",!1)},5e3)},immediate:!0}}},or={key:0,class:"loading"};function nr(o,t,l,d,i,a){return l.loading?(e.openBlock(),e.createElementBlock("div",or,[t[0]||(t[0]=e.createElementVNode("i",{class:"iconfont"},"",-1)),e.createElementVNode("div",null,e.toDisplayString(l.text),1)])):e.createCommentVNode("",!0)}const Fn=Re(lr,[["render",nr]]),tw="",ar={name:"ORMPointReport",components:{IdmLoading:Fn,IdmBrand:ql},props:{report:{type:Object,default:()=>({})},showPrate:{type:Boolean,default:!1},showAcc:{type:Boolean,default:!0}},data(){return{echart:void 0,localTZ:"0",loading:!0}},computed:{computeLat(){return function(o){return de.LngLatHelper.lat2pretty(o,2)}},computeLng(){return function(o){return de.LngLatHelper.lng2pretty(o,2)}},computeLTime(){return function(o,t=8,l="MMM-DD/HHmm[LT]"){return`${F(o).utcOffset(t).format(l)}`}},computeTZ(){return function(o="0"){return de.LngLatHelper.prettyTimeZoneOffset(o)}},roundPrecision(){return function(o,t=4){if(typeof o=="number"){const l=Number("1".padEnd(t+1,"0"));return Math.round(o*l)/l}else return"-"}},computeDegree(){return function(o,t){o=o%360;for(let l=0;l<17;l++)if(l*22.5+o+11.25>=360){let d=(16-l)*22.5;return t||(d=d+180),`transform:rotate(${d}deg);height:1rem;width:1rem;margin-left:3px`}}},computeForm(){return function(o){var d,i,a,N,s,c,E,I,D,M;const t={};for(let x=0;x<((i=(d=o==null?void 0:o.extend)==null?void 0:d.data)==null?void 0:i.length);x++){const A=(a=o==null?void 0:o.extend)==null?void 0:a.data[x];if(x===0)A.precip.pacc=0;else{const p=(N=o==null?void 0:o.extend)==null?void 0:N.data[x-1],V=F(A.utc).utcOffset(this.localTZ),y=F(p.utc).utcOffset(this.localTZ),z=(s=p==null?void 0:p.precip)==null?void 0:s.prate,T=V.diff(y,"h"),C=this.roundPrecision(z*T,1);if(A.precip.pacc=C,C>0){const g=t[V.format("MMM-DD")],U=Math.floor(V.get("hour")/6);g?(g.pacc=this.roundPrecision(g.pacc+C,1),g[`${U}`]?g[`${U}`]+=C:(g[`${U}`]=C,g.colspan+=1)):(t[V.format("MMM-DD")]={pacc:C,colspan:1},t[V.format("MMM-DD")][`${U}`]=C)}}}o.paccInDays=t;let l=0;for(const x of Object.keys(t))l+=(c=t[x])==null?void 0:c.colspan,t[x].level=((E=t[x])==null?void 0:E.pacc)<10?"Light":((I=t[x])==null?void 0:I.pacc)<24.9?"Moderate":((D=t[x])==null?void 0:D.pacc)<49.9?"Heavy":((M=t[x])==null?void 0:M.pacc)<99.9?"Rainstorm":"HeavyRainstorm";return o.span=l,o}}},watch:{report:{handler(){var o,t,l,d;(t=(o=this.report)==null?void 0:o.extend)!=null&&t.data&&(this.loading=!1,this.localTZ=de.LngLatHelper.guessTimeZoneOffset((l=this.report)==null?void 0:l.lng,(d=this.report)==null?void 0:d.lat),this.$nextTick(()=>{this.initEchart()}))},immediate:!0}},methods:{initEchart(){var a,N,s;this.echart||(this.echart=e.markRaw(Rn.init(this.$refs.echart)));const o=[],t=[],l={dateTime:0,windSpeed:1,gusts:2,waveHeight:3,windDirection:4,windDegree:5,windScale:6,current:7,precip:8,visibility:9,temp:10};let d=4;(s=(N=(a=this.report)==null?void 0:a.extend)==null?void 0:N.data)==null||s.forEach(c=>{var I,D,M,x,A,p,V,y,z,T,C,g,U;const E=F(c.utc).utcOffset(this.localTZ).format("MMM-DD/HHmm[LT]");o.push(E),d=((D=(I=c.wave)==null?void 0:I.sig)==null?void 0:D.height)>d?(x=(M=c.wave)==null?void 0:M.sig)==null?void 0:x.height:d,t.push([E,(A=c.wind)==null?void 0:A.kts,(p=c.gusts)==null?void 0:p.kts,(y=(V=c.wave)==null?void 0:V.sig)==null?void 0:y.height,(z=c.wind)==null?void 0:z.direction,(T=c.wind)==null?void 0:T.degree,(C=c.wind)==null?void 0:C.scale,(g=c.current)==null?void 0:g.kts,(U=c.precip)==null?void 0:U.acc,this.roundPrecision(c.visibility/1852,0),c.temp])});const i={animation:!1,title:{text:"Weather Conditions",subtext:"Wind/Gusts/Sig.Wave/Visibility/Precip Acc",textStyle:{color:"#000000B3",fontWeight:"500"},left:"left"},legend:{show:!0,right:0},tooltip:{trigger:"axis"},grid:{bottom:35},xAxis:[{data:o}],yAxis:[{name:"Precip Acc (mm)",nameLocation:"middle",position:"left",nameGap:30,axisLine:{lineStyle:{color:"#f85c5c"}}},{name:"Visibility (nm)",nameLocation:"middle",position:"left",offset:45,nameGap:30,axisLine:{lineStyle:{color:"#de8600"}}},{name:"Sig. Wave Height (m)",nameLocation:"middle",position:"right",nameGap:25,max:d,axisLine:{lineStyle:{color:"#015DD5"}},splitLine:{show:!1}},{name:"Wind Speed (kts)",nameLocation:"middle",position:"right",offset:40,nameGap:25,axisLine:{lineStyle:{color:"#0e6500"}}}],visualMap:{type:"piecewise",orient:"horizontal",left:"center",bottom:0,show:!1,pieces:[{gte:17,color:"#f85c5c",label:"≥ BF5"},{gte:11,lt:17,color:"#de8600",label:"BF4"},{lt:11,color:"#67c23a",label:"< BF4"}],seriesIndex:3,dimension:1},series:[{type:"bar",name:"Precip Acc",yAxisIndex:0,showSymbol:!1,encode:{x:l.dateTime,y:l.precip},lineStyle:{color:"#f85c5c",type:"solid"},itemStyle:{color:"#f85c5c"},data:t,z:4},{type:"line",name:"Visibility",yAxisIndex:1,showSymbol:!1,encode:{x:l.dateTime,y:l.visibility},lineStyle:{color:"#de8600",type:"solid"},itemStyle:{color:"#de8600"},data:t,z:3},{name:"Sig. Wave Height",type:"line",showSymbol:!1,yAxisIndex:2,areaStyle:{color:{type:"linear",x:0,y:0,x2:0,y2:1,global:!1,colorStops:[{offset:0,color:"rgba(88, 160, 253, 1)"},{offset:.5,color:"rgba(88, 160, 253, 0.7)"},{offset:1,color:"rgba(88, 160, 253, 0)"}]}},lineStyle:{color:"rgba(88, 160, 253, 1)"},itemStyle:{color:"rgba(88, 160, 253, 1)"},encode:{x:l.dateTime,y:l.waveHeight},data:t,z:1},{name:"Wind Speed",type:"line",showSymbol:!1,yAxisIndex:3,encode:{x:l.dateTime,y:l.windSpeed},lineStyle:{color:"#398626",type:"solid"},itemStyle:{color:"#398626"},data:t,z:2},{type:"line",name:"Gusts",showSymbol:!1,yAxisIndex:3,encode:{x:l.dateTime,y:l.gusts},lineStyle:{color:"#0e6500",type:"dashed"},itemStyle:{color:"#0e6500"},data:t,z:2}]};this.echart.setOption(i)}}},ir={class:"point-report"},sr={class:"section info-section"},dr={class:"flex-evenly"},rr={class:"flex-space label-block",style:{width:"100%"}},cr={class:"flex-space label-block",style:{width:"100%"}},Nr={class:"flex-evenly"},Dr={class:"flex-space label-block",style:{width:"100%"}},Mr={class:"flex-space label-block",style:{width:"100%"}},gr={class:"flex-end",style:{width:"180px"}},mr={class:"section echart-section"},Er={ref:"echart",class:"echart"},yr={class:"section sample-section"},Ir=["colspan"],Ar={key:0},pr={key:1},Vr={width:"120px"},Tr={key:0,class:"degree-box"},xr={key:1},zr={key:0,class:"degree-box"},Cr={key:1},Sr={key:0,class:"degree-box"},kr={key:1},jr={key:0,class:"degree-box"},Ur={key:1},fr={key:0},br={key:1};function Or(o,t,l,d,i,a){var c,E,I,D;const N=e.resolveComponent("IdmBrand"),s=e.resolveComponent("IdmLoading");return e.openBlock(),e.createElementBlock("div",ir,[e.createVNode(N,{name:"Point Weather Forecast"}),e.createVNode(s,{loading:i.loading},null,8,["loading"]),e.createElementVNode("div",sr,[e.createElementVNode("div",dr,[e.createElementVNode("div",rr,[t[0]||(t[0]=e.createElementVNode("label",{class:"flex-end",style:{width:"180px"}},"Position",-1)),e.createElementVNode("span",null,e.toDisplayString(a.computeLat((c=l.report)==null?void 0:c.lat).pretty)+" / "+e.toDisplayString(a.computeLng((E=l.report)==null?void 0:E.lng).pretty),1)]),e.createElementVNode("div",cr,[t[1]||(t[1]=e.createElementVNode("label",{class:"flex-end",style:{width:"180px"}},"Issued (+00:00)",-1)),e.createElementVNode("span",null,e.toDisplayString(a.computeLTime(l.report.updatedAt,0,"YYYY, MMM-DD/HHmm[Z]")),1)])]),e.createElementVNode("div",Nr,[e.createElementVNode("div",Dr,[t[2]||(t[2]=e.createElementVNode("label",{class:"flex-end",style:{width:"180px"}},"Timezone",-1)),e.createElementVNode("span",null,e.toDisplayString(a.computeTZ(i.localTZ)),1)]),e.createElementVNode("div",Mr,[e.createElementVNode("label",gr,"("+e.toDisplayString(a.computeTZ(i.localTZ))+")",1),e.createElementVNode("span",null,e.toDisplayString(a.computeLTime(l.report.updatedAt,i.localTZ,"YYYY, MMM-DD/HHmm[LT]")),1)])])]),e.createElementVNode("div",mr,[e.createElementVNode("div",Er,null,512)]),e.createElementVNode("div",yr,[e.createElementVNode("table",null,[e.createElementVNode("thead",null,[e.createElementVNode("tr",null,[t[3]||(t[3]=e.createElementVNode("th",{rowspan:"2"},"Date Time",-1)),t[4]||(t[4]=e.createElementVNode("th",{colspan:"4"},"Wind",-1)),t[5]||(t[5]=e.createElementVNode("th",{rowspan:"2"},[e.createTextVNode("Sea HT "),e.createElementVNode("br"),e.createTextVNode("(m)")],-1)),t[6]||(t[6]=e.createElementVNode("th",{colspan:"3"},"Swell",-1)),t[7]||(t[7]=e.createElementVNode("th",{colspan:"3"},"Sig",-1)),t[8]||(t[8]=e.createElementVNode("th",{colspan:"2"},"Current",-1)),e.createElementVNode("th",{colspan:l.showPrate&&l.showAcc?2:1},"Precip",8,Ir),t[9]||(t[9]=e.createElementVNode("th",{colspan:"1"},"Visibility",-1)),t[10]||(t[10]=e.createElementVNode("th",{colspan:"1"},"Temp",-1))]),e.createElementVNode("tr",null,[t[11]||(t[11]=e.createElementVNode("th",null,"Dir",-1)),t[12]||(t[12]=e.createElementVNode("th",null,"Speed (kts)",-1)),t[13]||(t[13]=e.createElementVNode("th",null,"BF",-1)),t[14]||(t[14]=e.createElementVNode("th",null,"Gusts (kts)",-1)),t[15]||(t[15]=e.createElementVNode("th",null,"Dir",-1)),t[16]||(t[16]=e.createElementVNode("th",null,"Ht (m)",-1)),t[17]||(t[17]=e.createElementVNode("th",null,"Prd (s)",-1)),t[18]||(t[18]=e.createElementVNode("th",null,"Dir",-1)),t[19]||(t[19]=e.createElementVNode("th",null,"Hgt (m)",-1)),t[20]||(t[20]=e.createElementVNode("th",null,"Prd (s)",-1)),t[21]||(t[21]=e.createElementVNode("th",null,"Dir",-1)),t[22]||(t[22]=e.createElementVNode("th",null,"Speed (kts)",-1)),l.showPrate?(e.openBlock(),e.createElementBlock("th",Ar,"Rate (mm/h)")):e.createCommentVNode("",!0),l.showAcc?(e.openBlock(),e.createElementBlock("th",pr,"Acc (mm)")):e.createCommentVNode("",!0),t[23]||(t[23]=e.createElementVNode("th",null,"Dist (nm)",-1)),t[24]||(t[24]=e.createElementVNode("th",null,"°C",-1))])]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((D=(I=l.report)==null?void 0:I.extend)==null?void 0:D.data,(M,x)=>{var A,p,V,y,z,T,C,g,U,b,O,w,Y,Q,R,P,G,W,L,J,f,ee,te,le,oe,ne,n,Z,u,q,$,ae,ie,_;return e.openBlock(),e.createElementBlock("tr",{key:x},[e.createElementVNode("td",Vr,e.toDisplayString(a.computeLTime(M.utc,i.localTZ)),1),e.createElementVNode("td",null,[(A=M.wind)!=null&&A.kts?(e.openBlock(),e.createElementBlock("span",Tr,[e.createTextVNode(e.toDisplayString((p=M.wind)==null?void 0:p.direction),1),e.createElementVNode("i",{class:"iconfont",style:e.normalizeStyle(a.computeDegree((V=M.wind)==null?void 0:V.degree,!1))},"",4)])):(e.openBlock(),e.createElementBlock("span",xr,"-"))]),e.createElementVNode("td",null,e.toDisplayString(a.roundPrecision((y=M.wind)==null?void 0:y.kts,1)),1),e.createElementVNode("td",null,e.toDisplayString((z=M.wind)==null?void 0:z.scale),1),e.createElementVNode("td",null,e.toDisplayString(a.roundPrecision((T=M.gusts)==null?void 0:T.kts,1)),1),e.createElementVNode("td",null,e.toDisplayString(a.roundPrecision((g=(C=M.wave)==null?void 0:C.wd)==null?void 0:g.height,1)),1),e.createElementVNode("td",null,[(b=(U=M.wave)==null?void 0:U.swell)!=null&&b.height?(e.openBlock(),e.createElementBlock("span",zr,[e.createTextVNode(e.toDisplayString((w=(O=M.wave)==null?void 0:O.swell)==null?void 0:w.direction),1),e.createElementVNode("i",{class:"iconfont",style:e.normalizeStyle(a.computeDegree((Q=(Y=M.wave)==null?void 0:Y.swell)==null?void 0:Q.degree,!1))},"",4)])):(e.openBlock(),e.createElementBlock("span",Cr,"-"))]),e.createElementVNode("td",null,e.toDisplayString(a.roundPrecision((P=(R=M.wave)==null?void 0:R.swell)==null?void 0:P.height,1)),1),e.createElementVNode("td",null,e.toDisplayString(a.roundPrecision((W=(G=M.wave)==null?void 0:G.swell)==null?void 0:W.period,1)),1),e.createElementVNode("td",null,[(J=(L=M.wave)==null?void 0:L.sig)!=null&&J.height?(e.openBlock(),e.createElementBlock("span",Sr,[e.createTextVNode(e.toDisplayString((ee=(f=M.wave)==null?void 0:f.sig)==null?void 0:ee.direction),1),e.createElementVNode("i",{class:"iconfont",style:e.normalizeStyle(a.computeDegree((le=(te=M.wave)==null?void 0:te.sig)==null?void 0:le.degree,!1))},"",4)])):(e.openBlock(),e.createElementBlock("span",kr,"-"))]),e.createElementVNode("td",null,e.toDisplayString(a.roundPrecision((ne=(oe=M.wave)==null?void 0:oe.sig)==null?void 0:ne.height,1)),1),e.createElementVNode("td",null,e.toDisplayString(a.roundPrecision((Z=(n=M.wave)==null?void 0:n.sig)==null?void 0:Z.period,1)),1),e.createElementVNode("td",null,[(u=M.current)!=null&&u.kts?(e.openBlock(),e.createElementBlock("span",jr,[e.createTextVNode(e.toDisplayString((q=M.current)==null?void 0:q.direction),1),e.createElementVNode("i",{class:"iconfont",style:e.normalizeStyle(a.computeDegree(($=M.current)==null?void 0:$.degree,!0))},"",4)])):(e.openBlock(),e.createElementBlock("span",Ur,"-"))]),e.createElementVNode("td",null,e.toDisplayString(a.roundPrecision((ae=M.current)==null?void 0:ae.kts,1)),1),l.showPrate?(e.openBlock(),e.createElementBlock("td",fr,e.toDisplayString(a.roundPrecision((ie=M.precip)==null?void 0:ie.prate,2)),1)):e.createCommentVNode("",!0),l.showAcc?(e.openBlock(),e.createElementBlock("td",br,e.toDisplayString(a.roundPrecision((_=M.precip)==null?void 0:_.acc,2)),1)):e.createCommentVNode("",!0),e.createElementVNode("td",null,e.toDisplayString(a.roundPrecision(M.visibility/1852,0)||"-"),1),e.createElementVNode("td",null,e.toDisplayString(a.roundPrecision(M.temp,1)),1)])}),128))])])])])}const Ds=Re(ar,[["render",Or],["__scopeId","data-v-eb929a40"]]),wr={install(o){o.component("ORMPointReport",Ds)}},lw="",Yr={name:"IdmLng",props:{lng:{type:Number,default:void 0},label:{type:String,default:"Lng"}},data(){return{pretty:void 0}},watch:{lng:{handler(){if(this.lng!==void 0){const o=de.LngLatHelper.convertToStdLng(this.lng);this.pretty=de.LngLatHelper.lng2pretty(o).pretty}},immediate:!0}}},Qr={class:"lng-box"},hr={key:0};function Br(o,t,l,d,i,a){return e.openBlock(),e.createElementBlock("div",Qr,[l.label?(e.openBlock(),e.createElementBlock("span",hr,e.toDisplayString(l.label),1)):e.createCommentVNode("",!0),e.createElementVNode("label",null,e.toDisplayString(i.pretty),1)])}const On=Re(Yr,[["render",Br],["__scopeId","data-v-0d3c152f"]]),ow="",Rr={name:"IdmLat",props:{lat:{type:Number,default:void 0},label:{type:String,default:"Lat"}},data(){return{pretty:void 0}},watch:{lat:{handler(){this.lat!==void 0&&(this.pretty=de.LngLatHelper.lat2pretty(this.lat).pretty)},immediate:!0}}},Fr={class:"lat-box"},Pr={key:0};function Gr(o,t,l,d,i,a){return e.openBlock(),e.createElementBlock("div",Fr,[l.label?(e.openBlock(),e.createElementBlock("span",Pr,e.toDisplayString(l.label),1)):e.createCommentVNode("",!0),e.createElementVNode("label",null,e.toDisplayString(i.pretty),1)])}const wn=Re(Rr,[["render",Gr],["__scopeId","data-v-3d953d12"]]),nw="",Wr={name:"IdmEditor",components:{Editor:Ns.Editor,Toolbar:Ns.Toolbar},props:{height:{type:String,default:"200px"},modelValue:{type:String,default:()=>""},disabled:{type:Boolean,default:()=>!1}},data(){return{editorRef:null,editor:null,mode:"simple",valueHtml:void 0,editorConfig:{placeholder:"please input something..."},toolbarConfig:{toolbarKeys:["bold","color","bgColor","fontSize","lineHeight"]}}},watch:{disabled:{handler(o){var t,l;o?(t=this.editor)==null||t.disable():(l=this.editor)==null||l.enable()}},modelValue:{handler(){var o;this.valueHtml=this.modelValue,(o=this.editor)==null||o.setHtml(this.valueHtml)}}},methods:{handleCreated(o){var t;this.editorRef=e.shallowRef(),this.editor=Object.seal(o),this.valueHtml=this.modelValue,(t=this.editor)==null||t.setHtml(this.valueHtml),this.disabled?this.editor.disable():this.editor.enable()},handleChange(o){this.$emit("update:modelValue",this.valueHtml)},handleBlur(o){this.$emit("blur",this.valueHtml)},beforeDestroy(){var o;(o=this.editor)==null||o.destroy()}}},Lr={class:"editor-box"};function Zr(o,t,l,d,i,a){const N=e.resolveComponent("Toolbar"),s=e.resolveComponent("Editor");return e.openBlock(),e.createElementBlock("div",Lr,[e.withDirectives(e.createVNode(N,{editor:i.editor,"default-config":i.toolbarConfig,mode:i.mode,class:"toolbar"},null,8,["editor","default-config","mode"]),[[e.vShow,!l.disabled]]),e.createVNode(s,{modelValue:i.valueHtml,"onUpdate:modelValue":t[0]||(t[0]=c=>i.valueHtml=c),"default-config":i.editorConfig,mode:i.mode,class:"editor",style:e.normalizeStyle({height:l.height}),onOnCreated:a.handleCreated,onOnChange:a.handleChange,onOnBlur:a.handleBlur},null,8,["modelValue","default-config","mode","style","onOnCreated","onOnChange","onOnBlur"])])}const vl=Re(Wr,[["render",Zr],["__scopeId","data-v-9854b172"]]),aw="",Hr={name:"OrmRouteReport",components:{Lng:On,Lat:wn,Editor:vl,Brand:ql,Loading:Fn,ElTooltip:cs.ElTooltip},props:{plan:{type:Object,default:()=>({})},weatherPrinciple:{type:Object,default:()=>({})},editorDisabled:{type:Boolean,default:()=>!1},print:{type:Boolean,default:()=>!1}},emits:["commit","refresh"],data(){return{editable:!1,advisory:"",echart:void 0,speedIndex:0,loading:!0}},computed:{showCost(){var o,t;return this.print?!1:(t=(o=this.plan)==null?void 0:o.voyage)==null?void 0:t.showCost},computeUTCTime(){return function(o,t="MMM-DD/HHmm[Z]"){return`${F(o).utc().format(t)}`}},computeLTime(){return function(o,t,l){let d=0;return l&&t&&(d=de.LngLatHelper.guessTimeZoneOffset(t,l)),`${F(o).utcOffset(d).format("MMM-DD/HHmm")}LT`}},computeTimeDiff(){return function(o,t){var l,d,i,a,N;if(t===0)return"-";{const s=F((i=(d=(l=o==null?void 0:o.speeds)==null?void 0:l[t])==null?void 0:d.speed)==null?void 0:i.eta).diff(F((N=(a=o==null?void 0:o.speeds)==null?void 0:a[0])==null?void 0:N.speed.eta),"h",!0);return Math.round(s*100)/100}}},computeCostDiff(){return function(o,t){var l,d,i,a,N,s,c;if(t===0)return"-";{const E=Number((a=(i=(d=(l=o==null?void 0:o.speeds)==null?void 0:l[t])==null?void 0:d.speed)==null?void 0:i.cost)==null?void 0:a.total)-Number((c=(s=(N=o==null?void 0:o.speeds)==null?void 0:N[0])==null?void 0:s.speed)==null?void 0:c.cost.total);return`${(Math.round(E/1e3*100)/100).toLocaleString("en-US")}k`}}},computeNav(){return function(o){return o.gcToPrevious?"GC":"RL"}},roundPrecision(){return function(o,t=4){if(typeof o=="number"){const l=Number("1".padEnd(t+1,"0"));return Math.round(o*l)/l}else return"-"}},computeMemo(){return function(o){return(o==null?void 0:o.memo)??"-"}},computeMajorPoints(){return function(o,t){const l=[];if(t!=null&&t.length)return t.forEach(d=>{l.push(d),d.suspend&&(o!=null&&o.useRouteParam)&&l.push({etd:d.etd,eta:d.etd,isResume:!0,memo:`Stoppage: ${d.suspend}hrs`})}),l}},computeDegree(){return function(o,t){o=o%360;for(let l=0;l<17;l++)if(l*22.5+o+11.25>=360){let d=(16-l)*22.5;return t||(d=d+180),`transform:rotate(${d}deg);margin-left:3px;`}}},computeDay(){return function(o,t=0){var a,N,s,c;const l=(c=(s=(N=(a=o==null?void 0:o.speeds)==null?void 0:a[t])==null?void 0:N.speed)==null?void 0:s.sample)==null?void 0:c.hours,d=l==null?void 0:l[0],i=l==null?void 0:l[(l==null?void 0:l.length)-1];return Math.round(F(i==null?void 0:i.eta).diff(F(d==null?void 0:d.eta),"day",!0)*10)/10}},computeSuspend(){return function(o){var l,d;let t=0;return(d=(l=o==null?void 0:o.sample)==null?void 0:l.wps)==null||d.forEach(i=>{t+=i.suspend||0}),t?Math.round(t*100)/100:"-"}},computeModel(){return function(o){const t=o==null?void 0:o.source;return["ec","cmems"].includes(t==null?void 0:t.toLowerCase())?"The forecast data is sourced from EC":`The forecast data is sourced from ${t}`}}},watch:{plan:{handler(){var o,t;(o=this.plan)!=null&&o.id&&(this.loading=!1,this.advisory=((t=this.plan)==null?void 0:t.advisory)||"Pls find the following major waypoints for your safe navigation.",this.$nextTick(()=>{this.initEchart()}))},immediate:!0}},methods:{handleCommit(o){this.editable=!1,this.$emit("commit",o)},handleRefresh(){this.$emit("refresh")},handleEdit(){this.editorDisabled?this.editable=!1:this.editable=!0},initEchart(){this.echart||(this.echart=e.markRaw(Rn.init(this.$refs.echart))),this.renderEchart()},renderEchart(){var c,E,I,D,M,x,A;const o=[],t=[],l={dateTime:0,windSpeed:1,waveHeight:2,windDirection:3,windDegree:4,windScale:5,currentFactor:6,weatherFactor:7,speed:8},d={};["W","WSW","SW","SSW","S","SSE","SE","ESE","E","ENE","NE","NNE","N","NNW","NW","WNW"].forEach((p,V)=>{d[p]=Math.PI/8*V});const a=18;let N=4;(x=(M=(D=(I=(E=(c=this.plan)==null?void 0:c.speeds)==null?void 0:E[this.speedIndex])==null?void 0:I.speed)==null?void 0:D.sample)==null?void 0:M.hours)==null||x.forEach(p=>{var y,z,T,C,g,U,b,O,w,Y;const V=p.meteo;if(V){const Q=F(V.utc).utc().format("MMM-DD/HHmm[Z]");o.push(Q),N=Math.ceil(((z=(y=V.wave)==null?void 0:y.sig)==null?void 0:z.height)>N?(C=(T=V.wave)==null?void 0:T.sig)==null?void 0:C.height:N),t.push([Q,(g=V.wind)==null?void 0:g.kts,(b=(U=V.wave)==null?void 0:U.sig)==null?void 0:b.height,(O=V.wind)==null?void 0:O.direction,(w=V.wind)==null?void 0:w.degree,(Y=V.wind)==null?void 0:Y.scale,p.cFactor,p.wFactor,p.speed])}});const s={animation:!1,title:{text:"Weather Conditions & Speed Analysis",textStyle:{color:"#000000B3",fontWeight:"500"},left:"left"},tooltip:{trigger:"axis"},legend:{show:!0,right:0},grid:{bottom:40},xAxis:[{data:o,boundaryGap:!1}],yAxis:[{name:"Wind Speed (kts)",nameLocation:"middle",position:"left",nameGap:35,minInterval:5,axisLine:{lineStyle:{color:"rgba(58,128,0,0.6)"}}},{type:"value",name:"Sig. Wave Height (m)",nameLocation:"middle",position:"right",nameGap:35,max:N,min:0,minInterval:1,axisLine:{lineStyle:{color:"#2a57b7"}},splitLine:{show:!1}},{name:"Current Factor (kts)",nameLocation:"middle",position:"left",offset:50,nameGap:35,axisLine:{lineStyle:{color:"rgb(15,168,146)"}},splitLine:{show:!0},alignTicks:!0},{name:"SOG (kts)",nameLocation:"middle",position:"right",offset:50,nameGap:35,axisLine:{lineStyle:{color:"rgba(233,30,99,0.7)"}},splitLine:{show:!0}}],visualMap:{show:!1,type:"piecewise",orient:"horizontal",left:"center",bottom:0,pieces:[{gte:22,color:"rgb(251,75,59)",label:"≥ BF6"},{gte:17,lt:22,color:"rgb(247,158,27)",label:"BF5"},{lt:17,color:"rgb(121,183,68)",label:"≤ BF4"}],seriesIndex:2,dimension:1},series:[{name:"Sig. Wave Height",type:"line",showSymbol:!0,yAxisIndex:1,areaStyle:{color:{type:"linear",x:0,y:0,x2:0,y2:1,global:!1,colorStops:[{offset:0,color:"rgba(42,87,184,0.6)"},{offset:.5,color:"rgba(42,87,184,0.3)"},{offset:1,color:"rgba(42,87,184,0)"}]}},lineStyle:{color:"#2a57b7"},itemStyle:{color:"#2a57b7"},encode:{x:l.dateTime,y:l.waveHeight},data:t,z:1},{name:"Wind Speed",type:"line",showSymbol:!0,yAxisIndex:0,encode:{x:l.dateTime,y:l.windSpeed},lineStyle:{color:"rgba(58,128,0,0.6)",type:"dashed"},itemStyle:{color:"rgba(58,128,0,0.6)"},data:t,z:2},{type:"custom",yAxisIndex:0,renderItem:(p,V)=>{const y=V.coord([V.value(l.dateTime),V.value(l.windSpeed)]);return{type:"path",shape:{pathData:"M31 16l-15-15v9h-26v12h26v9z",x:-a/2,y:-a/2,width:a,height:a},rotation:d[V.value(l.windDirection)],position:y,style:V.style({stroke:"#555",lineWidth:1})}},encode:{x:l.dateTime,y:l.windSpeed},data:t,z:10},{name:"Current Factor",type:"line",yAxisIndex:2,showSymbol:!0,encode:{x:l.dateTime,y:l.currentFactor},lineStyle:{color:"rgb(15,168,146)",type:"dotted"},itemStyle:{color:"rgb(15,168,146)"},data:t,z:3},{name:"SOG",type:"line",yAxisIndex:3,showSymbol:!0,encode:{x:l.dateTime,y:l.speed},lineStyle:{color:"rgba(233,30,99,0.7)",type:"solid"},itemStyle:{color:"rgba(233,30,99,0.7)"},data:t,z:4}]};(A=this.echart)==null||A.setOption(s)}}},Jr={class:"voyage-plan"},_r={class:"plan-report"},Xr={class:"section voyage-section flex-space"},Kr={class:"flex-end",style:{width:"50%","flex-wrap":"wrap"}},ur={class:"flex-start label-block",style:{width:"100%"}},qr={style:{"text-transform":"uppercase"},class:"text-ellipsis"},$r={class:"flex-start label-block",style:{width:"100%"}},vr={class:"flex-end text-ellipsis",style:{"text-transform":"uppercase"}},ec={class:"flex-start label-block",style:{width:"100%"}},tc={class:"flex-end"},lc={class:"flex-end",style:{width:"50%","flex-wrap":"wrap"}},oc={class:"flex-start label-block",style:{width:"100%"}},nc={key:0,class:"flex-end",style:{flex:"1"}},ac={key:1,class:"flex-end",style:{flex:"1"}},ic={class:"flex-end",style:{width:"120px"}},sc={class:"flex-space label-block",style:{width:"100%"}},dc={key:0,class:"flex-end",style:{flex:"1"}},rc={key:1,class:"flex-end",style:{flex:"1"}},cc={class:"flex-end",style:{width:"120px"}},Nc={class:"flex-space label-block",style:{width:"100%"}},Dc={class:"flex-end",style:{"text-transform":"uppercase"}},Mc={class:"section chart-section"},gc={class:"flex-center"},mc=["src"],Ec={class:"legends"},yc={class:"legend"},Ic={key:0,class:"legend"},Ac={key:1,class:"legend"},pc={key:1,class:"empty"},Vc={class:"section comparison-section"},Tc={key:0},xc={key:0},zc=["rowspan"],Cc={key:0},Sc={key:1},kc={rowspan:"2"},jc={rowspan:"2"},Uc={key:0},fc={key:1},bc={rowspan:"1"},Oc={key:0},wc={rowspan:"2"},Yc={rowspan:"2"},Qc={rowspan:"2"},hc={key:0},Bc={key:0},Rc=["rowspan"],Fc={key:0},Pc={rowspan:"1"},Gc={key:0},Wc={key:0},Lc={key:1},Zc={class:"tips"},Hc={key:0},Jc={class:"section waypoint-section"},_c={class:"header-block flex-start"},Xc={class:"title"},Kc={key:0,class:"flex-end",style:{flex:"1"}},uc=["onClick"],qc={class:"advisory"},$c=["innerHTML"],vc={class:"major-waypoint"},eN={class:"major-body"},tN={class:"cell-item flex",style:{flex:"1.5"}},lN={key:0,class:"flex-center"},oN={key:1,class:"flex-center"},nN={key:0,style:{"margin-left":"3px"}},aN={class:"cell-item flex"},iN={key:0,style:{"margin-left":"4px","font-weight":"600"}},sN={key:0,class:"cell-item flex offset"},dN={key:1,class:"cell-item flex nbsp"},rN={key:2,class:"cell-item flex offset"},cN={key:3,class:"cell-item flex nbsp"},NN={key:4,class:"cell-item flex offset"},DN={key:5,class:"cell-item flex nbsp"},MN={key:6,class:"cell-item flex offset"},gN={key:7,class:"cell-item flex nbsp"},mN={class:"section forecast-section"},EN={class:"header-block flex-start"},yN={class:"title"},IN={key:0,class:"flex-end",style:{flex:"1"}},AN=["onClick"],pN={class:"echart-block"},VN={ref:"echart",class:"echart"},TN={class:"tips forecast-model",style:{margin:"10px auto","text-align":"left"}},xN=["colspan"],zN={key:0},CN={class:"flex-center"},SN={key:0,class:"degree-box"},kN={key:1},jN={key:0},UN={key:0,class:"degree-box"},fN={key:1},bN={key:0,class:"degree-box"},ON={key:1},wN={key:0,class:"degree-box"},YN={key:1};function QN(o,t,l,d,i,a){var M,x,A,p,V,y,z,T,C,g,U,b,O,w,Y,Q,R,P,G,W,L,J,f,ee,te,le,oe,ne,n,Z,u,q,$,ae,ie,_,Ne,K,ce,De,Me,re,ye,Ie,Ae,pe,Ve,Te,xe,ze,Ce,Se,ke,je,Ue,fe,ge,we,Ye,Oe,S,Ee,Qe,Ge,We,j,Le,Ze,r,v,me,h,Fe,se,Pe,He,Je,Ke,ue,qe,$e,ve,et,ot,nt,at,it,st,dt,rt,ct,Nt,Dt,Mt,gt,mt,Et,yt,It,At,pt,xt,zt,Ct,St,kt,jt,Ut,ft,bt,Ot,wt,Yt,Qt,ht,Bt,Rt,Ft,Pt,Gt,Wt,Lt,Zt,Ht,Jt,_t,Xt,Kt;const N=e.resolveComponent("Brand"),s=e.resolveComponent("Loading"),c=e.resolveComponent("Lat"),E=e.resolveComponent("Lng"),I=e.resolveComponent("ElTooltip"),D=e.resolveComponent("Editor");return e.openBlock(),e.createElementBlock("div",Jr,[e.createElementVNode("div",_r,[e.createVNode(N,{name:"Voyage Planning",issued:(M=l.plan)==null?void 0:M.updatedAt},null,8,["issued"]),e.createVNode(s,{loading:i.loading,onTimeout:t[0]||(t[0]=m=>i.loading=!1)},null,8,["loading"]),e.createElementVNode("div",Xr,[e.createElementVNode("div",Kr,[e.createElementVNode("div",ur,[t[8]||(t[8]=e.createElementVNode("label",{class:"flex-end",style:{width:"140px"}},"Prepare for",-1)),e.createElementVNode("span",qr,e.toDisplayString((p=(A=(x=l.plan)==null?void 0:x.voyage)==null?void 0:A.company)==null?void 0:p.name),1)]),e.createElementVNode("div",$r,[t[9]||(t[9]=e.createElementVNode("label",{class:"flex-end",style:{width:"140px"}},"Vessel",-1)),e.createElementVNode("span",vr,e.toDisplayString((z=(y=(V=l.plan)==null?void 0:V.voyage)==null?void 0:y.vessel)==null?void 0:z.name)+" ("+e.toDisplayString((U=(g=(C=(T=l.plan)==null?void 0:T.voyage)==null?void 0:C.vessel)==null?void 0:g.vesselType)==null?void 0:U.name)+")",1)]),e.createElementVNode("div",ec,[t[10]||(t[10]=e.createElementVNode("label",{class:"flex-end",style:{width:"140px"}},"Voyage No.",-1)),e.createElementVNode("span",tc,e.toDisplayString((O=(b=l.plan)==null?void 0:b.voyage)==null?void 0:O.number),1)])]),e.createElementVNode("div",lc,[e.createElementVNode("div",oc,[t[12]||(t[12]=e.createElementVNode("label",{class:"flex-end",style:{width:"140px"}},"Departure Port",-1)),(Q=(Y=(w=l.plan)==null?void 0:w.leg)==null?void 0:Y.departure)!=null&&Q.name?(e.openBlock(),e.createElementBlock("span",nc,e.toDisplayString((P=(R=l.plan)==null?void 0:R.leg)==null?void 0:P.departure.name),1)):(e.openBlock(),e.createElementBlock("div",ac,[e.createVNode(c,{lat:(L=(W=(G=l.plan)==null?void 0:G.leg)==null?void 0:W.departure)==null?void 0:L.lat,label:""},null,8,["lat"]),t[11]||(t[11]=e.createElementVNode("span",{style:{"margin-right":"3px"}},",",-1)),e.createVNode(E,{lng:(ee=(f=(J=l.plan)==null?void 0:J.leg)==null?void 0:f.departure)==null?void 0:ee.lng,label:""},null,8,["lng"])])),e.createElementVNode("span",ic,e.toDisplayString(a.computeUTCTime(((oe=(le=(te=l.plan)==null?void 0:te.leg)==null?void 0:le.departure)==null?void 0:oe.atd)||((Z=(n=(ne=l.plan)==null?void 0:ne.leg)==null?void 0:n.departure)==null?void 0:Z.etd)||((ae=($=(q=(u=l.plan)==null?void 0:u.speeds)==null?void 0:q[i.speedIndex])==null?void 0:$.speed)==null?void 0:ae.etd),"MMM-DD/HHmm[Z]")),1)]),e.createElementVNode("div",sc,[t[14]||(t[14]=e.createElementVNode("label",{class:"flex-end",style:{width:"140px"}},"Arrival Port",-1)),(Ne=(_=(ie=l.plan)==null?void 0:ie.leg)==null?void 0:_.destination)!=null&&Ne.name?(e.openBlock(),e.createElementBlock("span",dc,e.toDisplayString((De=(ce=(K=l.plan)==null?void 0:K.leg)==null?void 0:ce.destination)==null?void 0:De.name),1)):(e.openBlock(),e.createElementBlock("div",rc,[e.createVNode(c,{lat:(ye=(re=(Me=l.plan)==null?void 0:Me.leg)==null?void 0:re.destination)==null?void 0:ye.lat,label:""},null,8,["lat"]),t[13]||(t[13]=e.createElementVNode("span",{style:{"margin-right":"3px"}},",",-1)),e.createVNode(E,{lng:(pe=(Ae=(Ie=l.plan)==null?void 0:Ie.leg)==null?void 0:Ae.destination)==null?void 0:pe.lng,label:""},null,8,["lng"])])),e.createElementVNode("span",cc,e.toDisplayString(a.computeUTCTime(((ze=(xe=(Te=(Ve=l.plan)==null?void 0:Ve.speeds)==null?void 0:Te[i.speedIndex])==null?void 0:xe.speed)==null?void 0:ze.ata)||((je=(ke=(Se=(Ce=l.plan)==null?void 0:Ce.speeds)==null?void 0:Se[i.speedIndex])==null?void 0:ke.speed)==null?void 0:je.eta),"MMM-DD/HHmm[Z]")),1)]),e.createElementVNode("div",Nc,[t[15]||(t[15]=e.createElementVNode("label",{class:"flex-end",style:{width:"140px"}},"Load Condition",-1)),e.createElementVNode("span",Dc,e.toDisplayString((fe=(Ue=l.plan)==null?void 0:Ue.voyage)==null?void 0:fe.loadCondition),1)])])]),e.createElementVNode("div",Mc,[t[22]||(t[22]=e.createElementVNode("div",{class:"header-block flex-start"},[e.createElementVNode("i",{class:"iconfont"},""),e.createElementVNode("div",{class:"title"},"Weather chart")],-1)),(ge=l.plan)!=null&&ge.chartUrl?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("div",gc,[e.createElementVNode("img",{src:l.plan.chartUrl},null,8,mc)]),e.createElementVNode("div",Ec,[t[19]||(t[19]=e.createStaticVNode('<div class="legend" data-v-c0d12831><label style="background-color:var(--idm-dangerous);" data-v-c0d12831></label><span data-v-c0d12831>Dangerous</span></div><div class="legend" data-v-c0d12831><label style="background-color:var(--idm-severe);" data-v-c0d12831></label><span data-v-c0d12831>Severe</span></div><div class="legend" data-v-c0d12831><label style="background-color:var(--idm-heavy);" data-v-c0d12831></label><span data-v-c0d12831>Heavy</span></div>',3)),e.createElementVNode("div",yc,[t[16]||(t[16]=e.createElementVNode("b",{class:"route1"},null,-1)),e.createElementVNode("span",{class:"btn",onClick:t[1]||(t[1]=m=>{i.speedIndex=0,a.renderEchart()})},e.toDisplayString((Ee=(S=(Oe=(Ye=(we=l.plan)==null?void 0:we.speeds)==null?void 0:Ye[0])==null?void 0:Oe.speed)==null?void 0:S.lane)==null?void 0:Ee.name),1)]),((Ge=(Qe=l.plan)==null?void 0:Qe.speeds)==null?void 0:Ge.length)>1?(e.openBlock(),e.createElementBlock("div",Ic,[t[17]||(t[17]=e.createElementVNode("b",{class:"route2"},null,-1)),e.createElementVNode("span",{class:"btn",onClick:t[2]||(t[2]=m=>{i.speedIndex=1,a.renderEchart()})},e.toDisplayString((r=(Ze=(Le=(j=(We=l.plan)==null?void 0:We.speeds)==null?void 0:j[1])==null?void 0:Le.speed)==null?void 0:Ze.lane)==null?void 0:r.name),1)])):e.createCommentVNode("",!0),((me=(v=l.plan)==null?void 0:v.speeds)==null?void 0:me.length)>2?(e.openBlock(),e.createElementBlock("div",Ac,[t[18]||(t[18]=e.createElementVNode("b",{class:"route3"},null,-1)),e.createElementVNode("span",{class:"btn",onClick:t[3]||(t[3]=m=>{i.speedIndex=2,a.renderEchart()})},e.toDisplayString((He=(Pe=(se=(Fe=(h=l.plan)==null?void 0:h.speeds)==null?void 0:Fe[2])==null?void 0:se.speed)==null?void 0:Pe.lane)==null?void 0:He.name),1)])):e.createCommentVNode("",!0)])],64)):(e.openBlock(),e.createElementBlock("div",pc,[e.createElementVNode("span",null,[t[20]||(t[20]=e.createTextVNode("Weather chart in cooking ")),e.createElementVNode("span",{class:"btn",onClick:t[4]||(t[4]=(...m)=>a.handleRefresh&&a.handleRefresh(...m))},"Refresh"),t[21]||(t[21]=e.createTextVNode(" later please"))])]))]),e.createElementVNode("div",Vc,[(Ke=(Je=l.plan)==null?void 0:Je.speeds)!=null&&Ke.length?(e.openBlock(),e.createElementBlock("table",Tc,[e.createElementVNode("thead",null,[e.createElementVNode("tr",null,[t[23]||(t[23]=e.createElementVNode("th",{rowspan:"2",colspan:"2"},"Route",-1)),t[24]||(t[24]=e.createElementVNode("th",null,"SPD (kts)",-1)),t[25]||(t[25]=e.createElementVNode("th",{clospan:"2"},"DTG (nm)",-1)),t[26]||(t[26]=e.createElementVNode("th",null,"ETA (LT)",-1)),t[27]||(t[27]=e.createElementVNode("th",{rowspan:"2"},"Stoppage (h)",-1)),t[28]||(t[28]=e.createElementVNode("th",{colspan:"2"},"Cons (mt)",-1)),a.showCost?(e.openBlock(),e.createElementBlock("th",xc,"TTL Cost (USD)")):e.createCommentVNode("",!0),e.createElementVNode("th",{rowspan:a.showCost?1:2},"Diff Time (h)",8,zc),t[29]||(t[29]=e.createElementVNode("th",null,"Weather en route",-1))]),e.createElementVNode("tr",null,[t[30]||(t[30]=e.createElementVNode("th",null,"*Daily Cons (mt)",-1)),t[31]||(t[31]=e.createElementVNode("th",null,"TTG (h)",-1)),t[32]||(t[32]=e.createElementVNode("th",null,"Avg.Spd / Wx / Cur.Factor (kts)",-1)),t[33]||(t[33]=e.createElementVNode("th",null,"*FO",-1)),t[34]||(t[34]=e.createElementVNode("th",null,"*DO/GO",-1)),a.showCost?(e.openBlock(),e.createElementBlock("th",Cc,"*Hire / Bunker (USD)")):e.createCommentVNode("",!0),a.showCost?(e.openBlock(),e.createElementBlock("th",Sc,"Diff Cost (USD)")):e.createCommentVNode("",!0),e.createElementVNode("th",null,"*in the next "+e.toDisplayString(a.computeDay(l.plan,0))+" days",1)])]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((ue=l.plan)==null?void 0:ue.speeds,(m,be)=>{var k,tt,Vt,ut,qt,$t,vt,el,tl,ll,ol,nl,al,il,sl,dl,rl,cl,Nl,Dl,Ml,gl,ml,El,yl,Il,Al,pl,Vl,Tl,xl,zl,Cl,Sl,kl,jl,Ul,fl,bl,Ol,wl,Yl,Ql,hl,Bl,Rl,Fl,Pl,Gl,Wl,Ll,Zl,Hl,_l,Xl,Kl,_e,$l,eo,to,lo,oo;return e.openBlock(),e.createElementBlock(e.Fragment,{key:be},[e.createElementVNode("tr",null,[e.createElementVNode("td",kc,e.toDisplayString(be+1),1),e.createElementVNode("td",jc,e.toDisplayString((tt=(k=m.speed)==null?void 0:k.lane)==null?void 0:tt.name),1),e.createElementVNode("td",null,[m.speed.label!=="Combined"?(e.openBlock(),e.createElementBlock("span",Uc,e.toDisplayString(`CP ${((ut=(Vt=m.speed)==null?void 0:Vt.cpCopy)==null?void 0:ut.speed)??((qt=m.speed)==null?void 0:qt.v0)}`),1)):(e.openBlock(),e.createElementBlock("div",fc,[t[35]||(t[35]=e.createTextVNode("CP")),t[36]||(t[36]=e.createElementVNode("sub",null,"1",-1)),e.createTextVNode(" "+e.toDisplayString((el=(vt=($t=m.speed)==null?void 0:$t.extend)==null?void 0:vt.cps[0])==null?void 0:el.speed)+", CP",1),t[37]||(t[37]=e.createElementVNode("sub",null,"2",-1)),e.createTextVNode(" "+e.toDisplayString((ol=(ll=(tl=m.speed)==null?void 0:tl.extend)==null?void 0:ll.cps[1])==null?void 0:ol.speed),1)]))]),e.createElementVNode("td",bc,[e.createElementVNode("span",null,e.toDisplayString(a.roundPrecision((nl=m.speed)==null?void 0:nl.distance,0)),1),(il=(al=m.speed)==null?void 0:al.extend)!=null&&il.distanceInECA?(e.openBlock(),e.createElementBlock("span",Oc," ("+e.toDisplayString(a.roundPrecision(m.speed.extend.distanceInECA,0))+" in ECA)",1)):e.createCommentVNode("",!0)]),e.createElementVNode("td",null,[e.createElementVNode("b",null,e.toDisplayString(a.computeLTime((sl=m.speed)==null?void 0:sl.eta,(cl=(rl=(dl=l.plan)==null?void 0:dl.leg)==null?void 0:rl.destination)==null?void 0:cl.lng,(Ml=(Dl=(Nl=l.plan)==null?void 0:Nl.leg)==null?void 0:Dl.destination)==null?void 0:Ml.lat)),1),e.createTextVNode(" ["+e.toDisplayString(a.computeUTCTime((gl=m.speed)==null?void 0:gl.eta))+"] ",1)]),e.createElementVNode("td",wc,e.toDisplayString(a.computeSuspend(m.speed)),1),e.createElementVNode("td",Yc,e.toDisplayString(a.roundPrecision((ml=m.speed)==null?void 0:ml.totalFoCons,3)),1),e.createElementVNode("td",Qc,[e.createElementVNode("span",null,e.toDisplayString(a.roundPrecision((El=m.speed)==null?void 0:El.totalDgoCons,3)),1),(Il=(yl=m.speed)==null?void 0:yl.extend)!=null&&Il.totalDgoConsInECA?(e.openBlock(),e.createElementBlock("span",hc," + "+e.toDisplayString(a.roundPrecision((Al=m.speed.extend)==null?void 0:Al.totalDgoConsInECA,3))+"*",1)):e.createCommentVNode("",!0)]),a.showCost?(e.openBlock(),e.createElementBlock("td",Bc,e.toDisplayString((Tl=a.roundPrecision(((Vl=(pl=m==null?void 0:m.speed)==null?void 0:pl.cost)==null?void 0:Vl.total)/1e3,2))==null?void 0:Tl.toLocaleString("en-US"))+"k",1)):e.createCommentVNode("",!0),e.createElementVNode("td",{rowspan:a.showCost?1:2},e.toDisplayString(a.computeTimeDiff(l.plan,be)),9,Rc),e.createElementVNode("td",null,[e.createVNode(I,{effect:"light",placement:"top",trigger:"hover",width:300,content:(zl=(xl=l.weatherPrinciple)==null?void 0:xl.dangerous)==null?void 0:zl.pretty},{default:e.withCtx(()=>t[38]||(t[38]=[e.createElementVNode("span",{style:{cursor:"pointer"}},"Dangerous",-1)])),_:1,__:[38]},8,["content"]),t[41]||(t[41]=e.createTextVNode(" / ")),e.createVNode(I,{effect:"light",placement:"top",trigger:"hover",width:300,content:(Sl=(Cl=l.weatherPrinciple)==null?void 0:Cl.severe)==null?void 0:Sl.pretty},{default:e.withCtx(()=>t[39]||(t[39]=[e.createElementVNode("span",{style:{cursor:"pointer"}},"Severe",-1)])),_:1,__:[39]},8,["content"]),t[42]||(t[42]=e.createTextVNode(" / ")),e.createVNode(I,{effect:"light",placement:"top",trigger:"hover",width:300,content:(jl=(kl=l.weatherPrinciple)==null?void 0:kl.heavy)==null?void 0:jl.pretty},{default:e.withCtx(()=>t[40]||(t[40]=[e.createElementVNode("span",{style:{cursor:"pointer"}},"Heavy",-1)])),_:1,__:[40]},8,["content"])])]),e.createElementVNode("tr",null,[e.createElementVNode("td",null,[((Ul=m.speed)==null?void 0:Ul.label)!=="Combined"?(e.openBlock(),e.createElementBlock("div",Fc,"FO: "+e.toDisplayString((bl=(fl=m.speed)==null?void 0:fl.cpCopy)==null?void 0:bl.fo)+" / DO: "+e.toDisplayString((wl=(Ol=m.speed)==null?void 0:Ol.cpCopy)==null?void 0:wl.dgo),1)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",null,"FO: "+e.toDisplayString((Ql=(Yl=m.speed)==null?void 0:Yl.extend)==null?void 0:Ql.cps[0].fo)+" / "+e.toDisplayString((Bl=(hl=m.speed)==null?void 0:hl.extend)==null?void 0:Bl.cps[1].fo),1),e.createElementVNode("div",null,"DO: "+e.toDisplayString((Fl=(Rl=m.speed)==null?void 0:Rl.extend)==null?void 0:Fl.cps[0].dgo)+" / "+e.toDisplayString((Gl=(Pl=m.speed)==null?void 0:Pl.extend)==null?void 0:Gl.cps[1].dgo),1)],64))]),e.createElementVNode("td",Pc,[e.createElementVNode("span",null,e.toDisplayString(a.roundPrecision((Wl=m.speed)==null?void 0:Wl.totalHrs,1)),1),(Zl=(Ll=m.speed)==null?void 0:Ll.extend)!=null&&Zl.hoursInECA?(e.openBlock(),e.createElementBlock("span",Gc," ("+e.toDisplayString(a.roundPrecision(m.speed.extend.hoursInECA,1))+" in ECA)",1)):e.createCommentVNode("",!0)]),e.createElementVNode("td",null,e.toDisplayString(a.roundPrecision((Hl=m.speed)==null?void 0:Hl.avgSpeed,2))+" / "+e.toDisplayString(a.roundPrecision((_l=m.speed)==null?void 0:_l.wxFactor,2))+" / "+e.toDisplayString(a.roundPrecision((Xl=m.speed)==null?void 0:Xl.cFactor,2)),1),a.showCost?(e.openBlock(),e.createElementBlock("td",Wc,e.toDisplayString(a.roundPrecision(((_e=(Kl=m==null?void 0:m.speed)==null?void 0:Kl.cost)==null?void 0:_e.hire)/1e3,2).toLocaleString("en-US"))+"k / "+e.toDisplayString(a.roundPrecision(((eo=($l=m==null?void 0:m.speed)==null?void 0:$l.cost)==null?void 0:eo.bunker)/1e3,2).toLocaleString("en-US"))+"k",1)):e.createCommentVNode("",!0),a.showCost?(e.openBlock(),e.createElementBlock("td",Lc,e.toDisplayString(a.computeCostDiff(l.plan,be)),1)):e.createCommentVNode("",!0),e.createElementVNode("td",null,e.toDisplayString(a.roundPrecision(((to=m.speed)==null?void 0:to.dangerous)/24,2))+" / "+e.toDisplayString(a.roundPrecision(((lo=m.speed)==null?void 0:lo.severe)/24,2))+" / "+e.toDisplayString(a.roundPrecision(((oo=m.speed)==null?void 0:oo.heavy)/24,2)),1)])],64)}),128))])])):e.createCommentVNode("",!0),e.createElementVNode("div",Zc,[t[44]||(t[44]=e.createTextVNode(" * Fuel consumption was calculated based on the computed daily consumption, and does not reflect actual consumption.")),t[45]||(t[45]=e.createElementVNode("br",null,null,-1)),a.showCost?(e.openBlock(),e.createElementBlock("span",Hc,[e.createTextVNode("* Hire cost was calculated at "+e.toDisplayString((ve=a.roundPrecision(($e=(qe=l.plan)==null?void 0:qe.voyage)==null?void 0:$e.dailyHire,0))==null?void 0:ve.toLocaleString("en-US"))+" USD perday, and the bunker cost was "+e.toDisplayString((nt=a.roundPrecision((ot=(et=l.plan)==null?void 0:et.voyage)==null?void 0:ot.priceFO,0))==null?void 0:nt.toLocaleString("en-US"))+" USD/mt for FO and "+e.toDisplayString((st=a.roundPrecision((it=(at=l.plan)==null?void 0:at.voyage)==null?void 0:it.priceDGO,0))==null?void 0:st.toLocaleString("en-US"))+" USD/mt for MGO.",1),t[43]||(t[43]=e.createElementVNode("br",null,null,-1))])):e.createCommentVNode("",!0),t[46]||(t[46]=e.createTextVNode(" * Please note the climatology data was used for days that extend beyond the available forecast.")),t[47]||(t[47]=e.createElementVNode("br",null,null,-1)),t[48]||(t[48]=e.createTextVNode(" * DO/GO consumption includes daily consumption and eca consumption. "))])]),e.createElementVNode("div",Jc,[e.createElementVNode("div",_c,[t[49]||(t[49]=e.createElementVNode("i",{class:"iconfont"},"",-1)),e.createElementVNode("div",Xc,"Advisory & Major Waypoint of Route "+e.toDisplayString((Nt=(ct=(rt=(dt=l.plan.speeds)==null?void 0:dt[i.speedIndex])==null?void 0:rt.speed)==null?void 0:ct.lane)==null?void 0:Nt.name),1),((Mt=(Dt=l.plan)==null?void 0:Dt.speeds)==null?void 0:Mt.length)>1?(e.openBlock(),e.createElementBlock("div",Kc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((gt=l.plan)==null?void 0:gt.speeds,(m,be)=>{var k,tt;return e.openBlock(),e.createElementBlock("div",{key:be,class:e.normalizeClass(["route-item",i.speedIndex===be?"active":""]),onClick:Vt=>{i.speedIndex=be,a.renderEchart()}},e.toDisplayString((tt=(k=m.speed)==null?void 0:k.lane)==null?void 0:tt.name),11,uc)}),128))])):e.createCommentVNode("",!0)]),e.createElementVNode("div",qc,[i.editable?(e.openBlock(),e.createBlock(D,{key:0,modelValue:i.advisory,"onUpdate:modelValue":t[5]||(t[5]=m=>i.advisory=m),class:"editor",height:"120px",onBlur:t[6]||(t[6]=m=>a.handleCommit(m))},null,8,["modelValue"])):(e.openBlock(),e.createElementBlock("div",{key:1,class:"txt",onDblclick:t[7]||(t[7]=(...m)=>a.handleEdit&&a.handleEdit(...m)),innerHTML:i.advisory},null,40,$c))]),e.createElementVNode("div",vc,[t[51]||(t[51]=e.createStaticVNode('<div class="major-header" data-v-c0d12831><div class="cell-item flex" style="flex:1.5;" data-v-c0d12831>Major waypoint</div><div class="cell-item flex" data-v-c0d12831>Time</div><div class="cell-item flex" data-v-c0d12831>Nav</div><div class="cell-item flex" data-v-c0d12831>Dist</div><div class="cell-item flex" data-v-c0d12831>SOG/COG</div><div class="cell-item flex" data-v-c0d12831>Memo</div></div>',1)),e.createElementVNode("div",eN,[(Et=(mt=l.plan)==null?void 0:mt.speeds)!=null&&Et.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(a.computeMajorPoints((pt=(At=(It=(yt=l.plan)==null?void 0:yt.speeds)==null?void 0:It[i.speedIndex])==null?void 0:At.speed)==null?void 0:pt.argv,(kt=(St=(Ct=(zt=(xt=l.plan)==null?void 0:xt.speeds)==null?void 0:zt[i.speedIndex])==null?void 0:Ct.speed)==null?void 0:St.sample)==null?void 0:kt.wps),(m,be)=>(e.openBlock(),e.createElementBlock("div",{key:be,class:"cell-row"},[e.createElementVNode("div",tN,[m.isResume?(e.openBlock(),e.createElementBlock("div",lN,"Resume")):(e.openBlock(),e.createElementBlock("div",oN,[e.createVNode(c,{lat:m.lat,label:""},null,8,["lat"]),t[50]||(t[50]=e.createElementVNode("span",{style:{"margin-right":"3px"}},",",-1)),e.createVNode(E,{lng:m.lng,label:""},null,8,["lng"]),m.pilot?(e.openBlock(),e.createElementBlock("span",nN,"[P]")):e.createCommentVNode("",!0)]))]),e.createElementVNode("div",aN,[e.createTextVNode(e.toDisplayString(a.computeUTCTime(m.eta))+" ",1),m.cp?(e.openBlock(),e.createElementBlock("span",iN,"[cp: "+e.toDisplayString(m.cp.speed)+"]",1)):e.createCommentVNode("",!0)]),be?(e.openBlock(),e.createElementBlock("div",sN,e.toDisplayString(a.computeNav(m)),1)):(e.openBlock(),e.createElementBlock("div",dN)),be?(e.openBlock(),e.createElementBlock("div",rN,e.toDisplayString(a.roundPrecision(m.distanceFromStart,1)),1)):(e.openBlock(),e.createElementBlock("div",cN)),be?(e.openBlock(),e.createElementBlock("div",NN,e.toDisplayString(a.roundPrecision(m.avgSpd??m.speed,2))+" / "+e.toDisplayString(a.roundPrecision(m.bearing,0)),1)):(e.openBlock(),e.createElementBlock("div",DN)),be?(e.openBlock(),e.createElementBlock("div",MN,e.toDisplayString(a.computeMemo(m)),1)):(e.openBlock(),e.createElementBlock("div",gN))]))),128)):e.createCommentVNode("",!0)])])]),e.createElementVNode("div",mN,[(Ut=(jt=l.plan)==null?void 0:jt.speeds)!=null&&Ut.length?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("div",EN,[t[52]||(t[52]=e.createElementVNode("i",{class:"iconfont"},"",-1)),e.createElementVNode("div",yN," Weather Forecast for the Next "+e.toDisplayString(a.computeDay(l.plan,i.speedIndex))+" Days of Route "+e.toDisplayString((Yt=(wt=(Ot=(bt=(ft=l.plan)==null?void 0:ft.speeds)==null?void 0:bt[i.speedIndex])==null?void 0:Ot.speed)==null?void 0:wt.lane)==null?void 0:Yt.name),1),((ht=(Qt=l.plan)==null?void 0:Qt.speeds)==null?void 0:ht.length)>1?(e.openBlock(),e.createElementBlock("div",IN,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((Bt=l.plan)==null?void 0:Bt.speeds,(m,be)=>{var k,tt;return e.openBlock(),e.createElementBlock("div",{key:be,class:e.normalizeClass(["route-item",i.speedIndex===be?"active":""]),onClick:Vt=>{i.speedIndex=be,a.renderEchart()}},e.toDisplayString((tt=(k=m==null?void 0:m.speed)==null?void 0:k.lane)==null?void 0:tt.name),11,AN)}),128))])):e.createCommentVNode("",!0)]),e.createElementVNode("div",pN,[e.createElementVNode("div",VN,null,512)]),e.createElementVNode("div",TN,e.toDisplayString(a.computeModel((Pt=(Ft=(Rt=l.plan)==null?void 0:Rt.speeds)==null?void 0:Ft[i.speedIndex])==null?void 0:Pt.speed)),1),e.createElementVNode("table",null,[e.createElementVNode("thead",null,[e.createElementVNode("tr",null,[t[53]||(t[53]=e.createElementVNode("th",{rowspan:"2"},[e.createTextVNode("Date Time "),e.createElementVNode("br"),e.createTextVNode("UTC")],-1)),t[54]||(t[54]=e.createElementVNode("th",{rowspan:"2"},[e.createTextVNode("Position "),e.createElementVNode("br"),e.createTextVNode("(lat/lon)")],-1)),e.createElementVNode("th",{colspan:(Wt=(Gt=l.plan)==null?void 0:Gt.voyage)!=null&&Wt.sendRptWithBF?3:2},"Wind",8,xN),t[55]||(t[55]=e.createElementVNode("th",{rowspan:"2"},[e.createTextVNode("Sea HT "),e.createElementVNode("br"),e.createTextVNode("(m)")],-1)),t[56]||(t[56]=e.createElementVNode("th",{colspan:"3"},"Swell",-1)),t[57]||(t[57]=e.createElementVNode("th",{colspan:"3"},"Sig",-1)),t[58]||(t[58]=e.createElementVNode("th",{colspan:"3"},"Current",-1))]),e.createElementVNode("tr",null,[t[59]||(t[59]=e.createElementVNode("th",null,"Dir",-1)),t[60]||(t[60]=e.createElementVNode("th",null,"Speed (kts)",-1)),(Zt=(Lt=l.plan)==null?void 0:Lt.voyage)!=null&&Zt.sendRptWithBF?(e.openBlock(),e.createElementBlock("th",zN,"BF")):e.createCommentVNode("",!0),t[61]||(t[61]=e.createElementVNode("th",null,"Dir",-1)),t[62]||(t[62]=e.createElementVNode("th",null,"Ht (m)",-1)),t[63]||(t[63]=e.createElementVNode("th",null,"Prd (s)",-1)),t[64]||(t[64]=e.createElementVNode("th",null,"Dir",-1)),t[65]||(t[65]=e.createElementVNode("th",null,"Hgt (m)",-1)),t[66]||(t[66]=e.createElementVNode("th",null,"Prd (s)",-1)),t[67]||(t[67]=e.createElementVNode("th",null,"Dir",-1)),t[68]||(t[68]=e.createElementVNode("th",null,"Speed (kts)",-1)),t[69]||(t[69]=e.createElementVNode("th",null,"Factor (kts)",-1))])]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((Kt=(Xt=(_t=(Jt=(Ht=l.plan)==null?void 0:Ht.speeds)==null?void 0:Jt[i.speedIndex])==null?void 0:_t.speed)==null?void 0:Xt.sample)==null?void 0:Kt.hours,(m,be)=>{var k,tt,Vt,ut,qt,$t,vt,el,tl,ll,ol,nl,al,il,sl,dl,rl,cl,Nl,Dl,Ml,gl,ml,El,yl,Il,Al,pl,Vl,Tl,xl,zl,Cl,Sl,kl,jl,Ul,fl,bl,Ol,wl,Yl,Ql,hl,Bl,Rl,Fl,Pl,Gl,Wl,Ll,Zl,Hl;return e.openBlock(),e.createElementBlock("tr",{key:be,class:e.normalizeClass(m.isDangerous?"dangerous":m.isSevere?"severe":m.isHeavy?"heavy":"")},[e.createElementVNode("td",null,e.toDisplayString(a.computeUTCTime(m.eta)),1),e.createElementVNode("td",null,[e.createElementVNode("div",CN,[e.createVNode(c,{lat:m.lat,label:""},null,8,["lat"]),t[70]||(t[70]=e.createElementVNode("span",null,"/",-1)),e.createVNode(E,{lng:m.lng,label:""},null,8,["lng"])])]),e.createElementVNode("td",null,[(tt=(k=m.meteo)==null?void 0:k.wind)!=null&&tt.kts?(e.openBlock(),e.createElementBlock("span",SN,[e.createTextVNode(e.toDisplayString((ut=(Vt=m.meteo)==null?void 0:Vt.wind)==null?void 0:ut.direction),1),e.createElementVNode("i",{class:"iconfont",style:e.normalizeStyle(a.computeDegree(($t=(qt=m.meteo)==null?void 0:qt.wind)==null?void 0:$t.degree,!1))},"",4)])):(e.openBlock(),e.createElementBlock("span",kN,"-"))]),e.createElementVNode("td",null,e.toDisplayString(a.roundPrecision((el=(vt=m.meteo)==null?void 0:vt.wind)==null?void 0:el.kts,1)),1),(ll=(tl=l.plan)==null?void 0:tl.voyage)!=null&&ll.sendRptWithBF?(e.openBlock(),e.createElementBlock("td",jN,e.toDisplayString((nl=(ol=m.meteo)==null?void 0:ol.wind)==null?void 0:nl.scale),1)):e.createCommentVNode("",!0),e.createElementVNode("td",null,e.toDisplayString(a.roundPrecision((sl=(il=(al=m.meteo)==null?void 0:al.wave)==null?void 0:il.wd)==null?void 0:sl.height,1)),1),e.createElementVNode("td",null,[(cl=(rl=(dl=m.meteo)==null?void 0:dl.wave)==null?void 0:rl.swell)!=null&&cl.height?(e.openBlock(),e.createElementBlock("span",UN,[e.createTextVNode(e.toDisplayString((Ml=(Dl=(Nl=m.meteo)==null?void 0:Nl.wave)==null?void 0:Dl.swell)==null?void 0:Ml.direction),1),e.createElementVNode("i",{class:"iconfont",style:e.normalizeStyle(a.computeDegree((El=(ml=(gl=m.meteo)==null?void 0:gl.wave)==null?void 0:ml.swell)==null?void 0:El.degree,!1))},"",4)])):(e.openBlock(),e.createElementBlock("span",fN,"-"))]),e.createElementVNode("td",null,e.toDisplayString(a.roundPrecision((Al=(Il=(yl=m.meteo)==null?void 0:yl.wave)==null?void 0:Il.swell)==null?void 0:Al.height,1)),1),e.createElementVNode("td",null,e.toDisplayString(a.roundPrecision((Tl=(Vl=(pl=m.meteo)==null?void 0:pl.wave)==null?void 0:Vl.swell)==null?void 0:Tl.period,1)),1),e.createElementVNode("td",null,[(Cl=(zl=(xl=m.meteo)==null?void 0:xl.wave)==null?void 0:zl.sig)!=null&&Cl.height?(e.openBlock(),e.createElementBlock("span",bN,[e.createTextVNode(e.toDisplayString((jl=(kl=(Sl=m.meteo)==null?void 0:Sl.wave)==null?void 0:kl.sig)==null?void 0:jl.direction),1),e.createElementVNode("i",{class:"iconfont",style:e.normalizeStyle(a.computeDegree((bl=(fl=(Ul=m.meteo)==null?void 0:Ul.wave)==null?void 0:fl.sig)==null?void 0:bl.degree,!1))},"",4)])):(e.openBlock(),e.createElementBlock("span",ON,"-"))]),e.createElementVNode("td",null,e.toDisplayString(a.roundPrecision((Yl=(wl=(Ol=m.meteo)==null?void 0:Ol.wave)==null?void 0:wl.sig)==null?void 0:Yl.height,1)),1),e.createElementVNode("td",null,e.toDisplayString(a.roundPrecision((Bl=(hl=(Ql=m.meteo)==null?void 0:Ql.wave)==null?void 0:hl.sig)==null?void 0:Bl.period,1)),1),e.createElementVNode("td",null,[(Fl=(Rl=m.meteo)==null?void 0:Rl.current)!=null&&Fl.kts?(e.openBlock(),e.createElementBlock("span",wN,[e.createTextVNode(e.toDisplayString((Gl=(Pl=m.meteo)==null?void 0:Pl.current)==null?void 0:Gl.direction),1),e.createElementVNode("i",{class:"iconfont",style:e.normalizeStyle(a.computeDegree((Ll=(Wl=m.meteo)==null?void 0:Wl.current)==null?void 0:Ll.degree,!0))},"",4)])):(e.openBlock(),e.createElementBlock("span",YN,"-"))]),e.createElementVNode("td",null,e.toDisplayString(a.roundPrecision((Hl=(Zl=m.meteo)==null?void 0:Zl.current)==null?void 0:Hl.kts,1)),1),e.createElementVNode("td",null,e.toDisplayString(a.roundPrecision(m.cFactor,1)),1)],2)}),128))])])],64)):e.createCommentVNode("",!0),t[71]||(t[71]=e.createElementVNode("div",{class:"tips",style:{"text-align":"justify"}},[e.createElementVNode("div",null,"The waypoints in this sheet are approximate positions."),e.createElementVNode("div",null," The route map is for reference only and should not be used for navigation. All the material is an advisory provided so as to assist the Master in making the final route decision. ")],-1))])])])}const rs=Re(Hr,[["render",QN],["__scopeId","data-v-c0d12831"]]),iw="",hN={name:"RouteReport",components:{Lng:On,Lat:wn,Editor:vl},props:{plan:{type:Object,default:()=>({})},editorDisabled:{type:Boolean,default:()=>!1}},emits:["commit","refresh"],data(){return{editable:!1,advisory:""}},computed:{computeUTCTime(){return function(o,t="MMM-DD/HHmm[Z]"){return`${F(o).utc().format(t)}`}},computeLTime(){return function(o,t){const l=F(o);return l.utcOffset(t),`${l.format("MMM-DD/HHmm")}LT`}},computeUTCOffset(){var o,t,l,d,i;return(i=(d=(l=(t=(o=this.plan)==null?void 0:o.leg)==null?void 0:t.destination)==null?void 0:l.port)==null?void 0:d.timezone)==null?void 0:i.UtcCurrentOffset},computeTimeDiff(){return function(o,t){var l,d,i;if(t===0)return"-";{const a=F((d=(l=o==null?void 0:o.speeds[t])==null?void 0:l.speed)==null?void 0:d.eta).diff(F((i=o==null?void 0:o.speeds[0])==null?void 0:i.speed.eta),"h",!0);return Math.round(a*10)/10}}},computeNav(){return function(o){return o.gcToPrevious?"GC":"RL"}},roundPrecision(){return function(o,t=4){if(typeof o=="number"){const l=Number("1".padEnd(t+1,"0"));return Math.round(o*l)/l}else return"-"}},computeMapChart(){var o;return((o=this.plan)==null?void 0:o.chartUrl)||"//oss.idmwx.com/asset/route-report_example.png"},computeDegree(){return function(o,t){o=o%360;for(let l=0;l<17;l++)if(l*22.5+o+11.25>=360){let d=(16-l)*22.5;return t||(d=d+180),`transform:rotate(${d}deg);margin-left:3px;`}}},computeDay(){return function(o){var i,a,N;const t=(N=(a=(i=o==null?void 0:o.speeds[0])==null?void 0:i.speed)==null?void 0:a.sample)==null?void 0:N.hours,l=t==null?void 0:t[0],d=t==null?void 0:t[(t==null?void 0:t.length)-1];return F(d==null?void 0:d.eta).diff(F(l==null?void 0:l.eta),"day")}}},watch:{plan:{handler(){var o,t;(o=this.plan)!=null&&o.id&&(this.advisory=((t=this.plan)==null?void 0:t.advisory)||"Pls find the following major waypoints for your safe navigation.")},immediate:!0}},methods:{handleCommit(o){this.editable=!1,this.$emit("commit",o)},handleRefresh(){this.$emit("refresh")},handleEdit(){this.editorDisabled?this.editable=!1:this.editable=!0}}},BN={class:"route-report"},RN={class:"section"},FN={class:"section-body basics"},PN={class:"flex-space section-row"},GN={class:"flex-start"},WN={class:"flex-start"},LN={class:"flex-start"},ZN={class:"flex-start flex"},HN={key:0,class:"flex"},JN={key:1,class:"flex-space flex"},_N={class:"time flex"},XN={class:"flex-space section-row"},KN={class:"flex-start"},uN={class:"flex-start"},qN={class:"flex-start"},$N={class:"flex-start flex"},vN={key:0,class:"flex"},eD={key:1,class:"flex-space"},tD={class:"time flex"},lD={class:"flex-space section-row"},oD={class:"flex-start"},nD={class:"flex-start"},aD={class:"flex-start"},iD={class:"flex-start flex"},sD={class:"section",style:{"border-bottom":"2px dashed var(--fli-border-color-dark)"}},dD={class:"section-body detail"},rD={class:"flex-space",style:{"align-items":"stretch"}},cD={class:"chart"},ND=["src"],DD={key:1,class:"empty flex-center"},MD={class:"route flex",style:{"justify-content":"space-between"}},gD={class:"suggestion"},mD=["innerHTML"],ED={class:"flex-start legends"},yD={key:0,class:"legend"},ID={key:1,class:"legend"},AD={class:"section"},pD={class:"section-body comparison"},VD={class:"container"},TD={key:0},xD={class:"section",style:{"page-break-inside":"avoid"}},zD={class:"section-body sample"},CD={class:"major-waypoints"},SD={class:"container"},kD={class:"body"},jD={class:"cell-item flexM"},UD={class:"flex-center"},fD={class:"cell-item flexL"},bD={key:0,class:"flex-center"},OD={key:1},wD={class:"cell-item flex"},YD={key:0,class:"cell-item flex offset"},QD={key:1,class:"cell-item flex nbsp"},hD={key:2,class:"cell-item flex offset"},BD={key:3,class:"cell-item flex nbsp"},RD={key:4,class:"cell-item flex offset"},FD={key:5,class:"cell-item flex nbsp"},PD={class:"section"},GD={class:"section-body sample"},WD={key:0},LD={class:"flex-center"},ZD={key:0,class:"degree-box"},HD={key:1},JD={key:0,class:"degree-box"},_D={key:1},XD={key:0,class:"degree-box"},KD={key:1},uD={key:0,class:"degree-box"},qD={key:1};function $D(o,t,l,d,i,a){var E,I,D,M,x,A,p,V,y,z,T,C,g,U,b,O,w,Y,Q,R,P,G,W,L,J,f,ee,te,le,oe,ne,n,Z,u,q,$,ae,ie,_,Ne,K,ce,De,Me,re,ye,Ie,Ae,pe,Ve,Te,xe,ze,Ce,Se,ke,je,Ue,fe,ge,we,Ye,Oe;const N=e.resolveComponent("Lat"),s=e.resolveComponent("Lng"),c=e.resolveComponent("Editor");return e.openBlock(),e.createElementBlock("div",BN,[t[28]||(t[28]=e.createElementVNode("div",{class:"brand"},[e.createElementVNode("img",{class:"bgImg",src:"https://img.idmwx.com/asset/fli_bg.jpeg"})],-1)),e.createElementVNode("div",RN,[t[12]||(t[12]=e.createElementVNode("div",{class:"section-header flex-start"},[e.createElementVNode("i",{class:"iconfont"},""),e.createElementVNode("div",{class:"title"},"Voyage Basics")],-1)),e.createElementVNode("div",FN,[e.createElementVNode("div",PN,[e.createElementVNode("div",GN,[t[4]||(t[4]=e.createElementVNode("label",{class:"flex-end"},"Company Name",-1)),e.createElementVNode("div",WN,e.toDisplayString((D=(I=(E=l.plan)==null?void 0:E.voyage)==null?void 0:I.company)==null?void 0:D.name),1)]),e.createElementVNode("div",LN,[t[6]||(t[6]=e.createElementVNode("label",{class:"flex-end"},"Departure Port",-1)),e.createElementVNode("div",ZN,[(A=(x=(M=l.plan)==null?void 0:M.leg)==null?void 0:x.departure)!=null&&A.name?(e.openBlock(),e.createElementBlock("div",HN,e.toDisplayString((V=(p=l.plan)==null?void 0:p.leg)==null?void 0:V.departure.name),1)):(e.openBlock(),e.createElementBlock("div",JN,[e.createVNode(N,{lat:(T=(z=(y=l.plan)==null?void 0:y.leg)==null?void 0:z.departure)==null?void 0:T.lat,label:""},null,8,["lat"]),t[5]||(t[5]=e.createElementVNode("span",{style:{"margin-right":"3px"}},",",-1)),e.createVNode(s,{lng:(U=(g=(C=l.plan)==null?void 0:C.leg)==null?void 0:g.departure)==null?void 0:U.lng,label:""},null,8,["lng"])])),e.createElementVNode("div",_N,e.toDisplayString(a.computeUTCTime(((w=(O=(b=l.plan)==null?void 0:b.leg)==null?void 0:O.departure)==null?void 0:w.atd)||((R=(Q=(Y=l.plan)==null?void 0:Y.leg)==null?void 0:Q.departure)==null?void 0:R.etd),"MMMM-DD, HHmm[Z]")),1)])])]),e.createElementVNode("div",XN,[e.createElementVNode("div",KN,[t[7]||(t[7]=e.createElementVNode("label",{class:"flex-end"},"Vessel Name",-1)),e.createElementVNode("div",uN,e.toDisplayString((W=(G=(P=l.plan)==null?void 0:P.voyage)==null?void 0:G.vessel)==null?void 0:W.name),1)]),e.createElementVNode("div",qN,[t[9]||(t[9]=e.createElementVNode("label",{class:"flex-end"},"Arrival Port",-1)),e.createElementVNode("div",$N,[(f=(J=(L=l.plan)==null?void 0:L.leg)==null?void 0:J.destination)!=null&&f.name?(e.openBlock(),e.createElementBlock("div",vN,e.toDisplayString((te=(ee=l.plan)==null?void 0:ee.leg)==null?void 0:te.destination.name),1)):(e.openBlock(),e.createElementBlock("div",eD,[e.createVNode(N,{lat:(ne=(oe=(le=l.plan)==null?void 0:le.leg)==null?void 0:oe.destination)==null?void 0:ne.lat,label:""},null,8,["lat"]),t[8]||(t[8]=e.createElementVNode("span",{style:{"margin-right":"3px"}},",",-1)),e.createVNode(s,{lng:(u=(Z=(n=l.plan)==null?void 0:n.leg)==null?void 0:Z.destination)==null?void 0:u.lng,label:""},null,8,["lng"])])),e.createElementVNode("div",tD,e.toDisplayString(a.computeUTCTime(((ae=($=(q=l.plan)==null?void 0:q.speeds)==null?void 0:$[0])==null?void 0:ae.speed.ata)||((_=(ie=l.plan)==null?void 0:ie.speeds)==null?void 0:_[0].speed.eta),"MMMM-DD, HHmm[Z]")),1)])])]),e.createElementVNode("div",lD,[e.createElementVNode("div",oD,[t[10]||(t[10]=e.createElementVNode("label",{class:"flex-end"},"Report Created",-1)),e.createElementVNode("div",nD,e.toDisplayString(a.computeUTCTime((Ne=l.plan)==null?void 0:Ne.createdAt,"MMMM-DD, HHmm[Z]")),1)]),e.createElementVNode("div",aD,[t[11]||(t[11]=e.createElementVNode("label",{class:"flex-end"},"Voyage Condition",-1)),e.createElementVNode("div",iD,[e.createElementVNode("div",null,e.toDisplayString((ce=(K=l.plan)==null?void 0:K.voyage)==null?void 0:ce.loadCondition),1)])])])])]),e.createElementVNode("div",sD,[t[19]||(t[19]=e.createElementVNode("div",{class:"section-header flex-start"},[e.createElementVNode("i",{class:"iconfont"},""),e.createElementVNode("div",{class:"title"},"Route Details")],-1)),e.createElementVNode("div",dD,[e.createElementVNode("div",rD,[e.createElementVNode("div",cD,[(De=l.plan)!=null&&De.chartUrl?(e.openBlock(),e.createElementBlock("img",{key:0,src:(Me=l.plan)==null?void 0:Me.chartUrl},null,8,ND)):(e.openBlock(),e.createElementBlock("div",DD,[t[13]||(t[13]=e.createTextVNode("waiting for weather map, ")),e.createElementVNode("b",{onClick:t[0]||(t[0]=(...S)=>a.handleRefresh&&a.handleRefresh(...S))},"Refresh"),t[14]||(t[14]=e.createTextVNode("later please"))]))]),e.createElementVNode("div",MD,[e.createElementVNode("div",null,[t[15]||(t[15]=e.createElementVNode("div",{class:"title"},"ROUTE REMARKS",-1)),e.createElementVNode("div",gD,[i.editable?(e.openBlock(),e.createBlock(c,{key:0,modelValue:i.advisory,"onUpdate:modelValue":t[1]||(t[1]=S=>i.advisory=S),class:"editor",height:"120px",onBlur:t[2]||(t[2]=S=>a.handleCommit(S))},null,8,["modelValue"])):(e.openBlock(),e.createElementBlock("div",{key:1,class:"txt",onDblclick:t[3]||(t[3]=(...S)=>a.handleEdit&&a.handleEdit(...S)),innerHTML:i.advisory},null,40,mD))])]),e.createElementVNode("div",ED,[t[18]||(t[18]=e.createStaticVNode('<div class="legend" data-v-e08bd687><label style="background-color:var(--idm-severe);" data-v-e08bd687></label><span data-v-e08bd687>Dangerous</span></div><div class="legend" data-v-e08bd687><label style="background-color:var(--idm-heavy);" data-v-e08bd687></label><span data-v-e08bd687>Severe</span></div><div class="legend" data-v-e08bd687><b class="route1" data-v-e08bd687></b><span data-v-e08bd687>Route 1</span></div>',3)),((ye=(re=l.plan)==null?void 0:re.speeds)==null?void 0:ye.length)>1?(e.openBlock(),e.createElementBlock("div",yD,t[16]||(t[16]=[e.createElementVNode("b",{class:"route2"},null,-1),e.createElementVNode("span",null,"Route 2",-1)]))):e.createCommentVNode("",!0),((Ae=(Ie=l.plan)==null?void 0:Ie.speeds)==null?void 0:Ae.length)>2?(e.openBlock(),e.createElementBlock("div",ID,t[17]||(t[17]=[e.createElementVNode("b",{class:"route3"},null,-1),e.createElementVNode("span",null,"Route 3",-1)]))):e.createCommentVNode("",!0)])])])])]),e.createElementVNode("div",AD,[t[21]||(t[21]=e.createElementVNode("div",{class:"section-header flex-start"},[e.createElementVNode("i",{class:"iconfont"},""),e.createElementVNode("div",{class:"title"},"Route Summary")],-1)),e.createElementVNode("div",pD,[e.createElementVNode("div",VD,[(Ve=(pe=l.plan)==null?void 0:pe.speeds)!=null&&Ve.length?(e.openBlock(),e.createElementBlock("table",TD,[t[20]||(t[20]=e.createElementVNode("thead",null,[e.createElementVNode("tr"),e.createElementVNode("tr",null,[e.createElementVNode("th",null,"Route"),e.createElementVNode("th",null,"TTL Dist (nm)"),e.createElementVNode("th",null,"SPD (kts)"),e.createElementVNode("th",null,"CP Cons (mt)"),e.createElementVNode("th",null,"ETA (UTC)"),e.createElementVNode("th",null,"Avg.Spd / Wx / Cur.Factor (kts)"),e.createElementVNode("th",null,"TTL Cons (mt)")])],-1)),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((Te=l.plan)==null?void 0:Te.speeds,(S,Ee)=>{var Qe,Ge,We,j,Le,Ze,r,v,me,h,Fe,se,Pe,He,Je;return e.openBlock(),e.createElementBlock("tr",{key:Ee},[e.createElementVNode("td",null,"Route "+e.toDisplayString(Ee+1),1),e.createElementVNode("td",null,e.toDisplayString(a.roundPrecision((Qe=S.speed)==null?void 0:Qe.distance,0)),1),e.createElementVNode("td",null,e.toDisplayString(`${((Ge=S.speed)==null?void 0:Ge.label)??"CP"} ${((We=S.speed)==null?void 0:We.v0)??((Le=(j=S.speed)==null?void 0:j.cpCopy)==null?void 0:Le.speed)}`),1),e.createElementVNode("td",null,e.toDisplayString((r=(Ze=S.speed)==null?void 0:Ze.cpCopy)==null?void 0:r.fo)+" FO / "+e.toDisplayString((me=(v=S.speed)==null?void 0:v.cpCopy)==null?void 0:me.dgo)+" DO",1),e.createElementVNode("td",null,e.toDisplayString(a.computeUTCTime((h=S.speed)==null?void 0:h.eta)),1),e.createElementVNode("td",null,e.toDisplayString(a.roundPrecision((Fe=S.speed)==null?void 0:Fe.avgSpeed,2))+" / "+e.toDisplayString(a.roundPrecision((se=S.speed)==null?void 0:se.wxFactor,2))+" / "+e.toDisplayString(a.roundPrecision((Pe=S.speed)==null?void 0:Pe.cFactor,2)),1),e.createElementVNode("td",null,e.toDisplayString(a.roundPrecision((He=S.speed)==null?void 0:He.totalFoCons,3))+" FO /"+e.toDisplayString(a.roundPrecision((Je=S.speed)==null?void 0:Je.totalDgoCons,3))+" DO",1)])}),128))])])):e.createCommentVNode("",!0)])])]),e.createElementVNode("div",xD,[t[24]||(t[24]=e.createElementVNode("div",{class:"section-header flex-start"},[e.createElementVNode("i",{class:"iconfont"},""),e.createElementVNode("div",{class:"title"},"Major Waypoint")],-1)),e.createElementVNode("div",zD,[e.createElementVNode("div",CD,[e.createElementVNode("div",SD,[t[23]||(t[23]=e.createStaticVNode('<div class="header" data-v-e08bd687><div class="cell-item flexM" data-v-e08bd687>Major waypoint</div><div class="cell-item flexL" data-v-e08bd687>Name</div><div class="cell-item flex" data-v-e08bd687>Time</div><div class="cell-item flex" data-v-e08bd687>Nav</div><div class="cell-item flex" data-v-e08bd687>Dist</div><div class="cell-item flex" data-v-e08bd687>SOG</div></div>',1)),e.createElementVNode("div",kD,[(ze=(xe=l.plan)==null?void 0:xe.speeds)!=null&&ze.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList((je=(ke=(Se=(Ce=l.plan)==null?void 0:Ce.speeds[0])==null?void 0:Se.speed)==null?void 0:ke.sample)==null?void 0:je.wps,(S,Ee)=>(e.openBlock(),e.createElementBlock("div",{key:Ee,class:"cell-row"},[e.createElementVNode("div",jD,[e.createElementVNode("div",UD,[e.createVNode(N,{lat:S.lat,label:""},null,8,["lat"]),t[22]||(t[22]=e.createElementVNode("span",{style:{"margin-right":"3px"}},",",-1)),e.createVNode(s,{lng:S.lng,label:""},null,8,["lng"])])]),e.createElementVNode("div",fD,[S.name?(e.openBlock(),e.createElementBlock("span",bD,e.toDisplayString(S.name),1)):(e.openBlock(),e.createElementBlock("span",OD,"-"))]),e.createElementVNode("div",wD,e.toDisplayString(a.computeUTCTime(S.eta)),1),Ee?(e.openBlock(),e.createElementBlock("div",YD,e.toDisplayString(a.computeNav(S)),1)):(e.openBlock(),e.createElementBlock("div",QD)),Ee?(e.openBlock(),e.createElementBlock("div",hD,e.toDisplayString(a.roundPrecision(S.distanceFromStart,1)),1)):(e.openBlock(),e.createElementBlock("div",BD)),Ee?(e.openBlock(),e.createElementBlock("div",RD,e.toDisplayString(a.roundPrecision(S.avgSpd??S.speed,1)),1)):(e.openBlock(),e.createElementBlock("div",FD))]))),128)):e.createCommentVNode("",!0)])])])])]),e.createElementVNode("div",PD,[t[27]||(t[27]=e.createElementVNode("div",{class:"section-header flex-start"},[e.createElementVNode("i",{class:"iconfont"},""),e.createElementVNode("div",{class:"title"},"Route Forecast")],-1)),e.createElementVNode("div",GD,[(fe=(Ue=l.plan)==null?void 0:Ue.speeds)!=null&&fe.length?(e.openBlock(),e.createElementBlock("table",WD,[t[26]||(t[26]=e.createElementVNode("thead",null,[e.createElementVNode("tr",null,[e.createElementVNode("th",{rowspan:"2"},[e.createTextVNode("Date Time "),e.createElementVNode("br"),e.createTextVNode("(UTC)")]),e.createElementVNode("th",{rowspan:"2"},[e.createTextVNode("Position "),e.createElementVNode("br"),e.createTextVNode("(lat/lon)")]),e.createElementVNode("th",{colspan:"2"},"Wind"),e.createElementVNode("th",{rowspan:"2"},[e.createTextVNode("Sea HT "),e.createElementVNode("br"),e.createTextVNode("(m)")]),e.createElementVNode("th",{colspan:"3"},"Swell"),e.createElementVNode("th",{colspan:"3"},"Sig"),e.createElementVNode("th",{colspan:"3"},"Current")]),e.createElementVNode("tr",null,[e.createElementVNode("th",null,"Dir"),e.createElementVNode("th",null,"Speed (kts)"),e.createElementVNode("th",null,"Dir"),e.createElementVNode("th",null,"Ht (m)"),e.createElementVNode("th",null,"Prd (s)"),e.createElementVNode("th",null,"Dir"),e.createElementVNode("th",null,"Hgt (m)"),e.createElementVNode("th",null,"Prd (s)"),e.createElementVNode("th",null,"Dir"),e.createElementVNode("th",null,"Speed (kts)"),e.createElementVNode("th",null,"Factor (kts)")])],-1)),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((Oe=(Ye=(we=(ge=l.plan)==null?void 0:ge.speeds[0])==null?void 0:we.speed)==null?void 0:Ye.sample)==null?void 0:Oe.hours,(S,Ee)=>{var Qe,Ge,We,j,Le,Ze,r,v,me,h,Fe,se,Pe,He,Je,Ke,ue,qe,$e,ve,et,ot,nt,at,it,st,dt,rt,ct,Nt,Dt,Mt,gt,mt,Et,yt,It,At,pt;return e.openBlock(),e.createElementBlock("tr",{key:Ee,class:e.normalizeClass(S.isDangerous?"dangerous":S.isSevere?"severe":S.isHeavy?"heavy":"")},[e.createElementVNode("td",null,e.toDisplayString(a.computeUTCTime(S.eta)),1),e.createElementVNode("td",null,[e.createElementVNode("div",LD,[e.createVNode(N,{lat:S.lat,label:""},null,8,["lat"]),t[25]||(t[25]=e.createElementVNode("span",null,"/",-1)),e.createVNode(s,{lng:S.lng,label:""},null,8,["lng"])])]),e.createElementVNode("td",null,[(Ge=(Qe=S.meteo)==null?void 0:Qe.wind)!=null&&Ge.kts?(e.openBlock(),e.createElementBlock("span",ZD,e.toDisplayString((j=(We=S.meteo)==null?void 0:We.wind)==null?void 0:j.direction),1)):(e.openBlock(),e.createElementBlock("span",HD,"-"))]),e.createElementVNode("td",null,e.toDisplayString(a.roundPrecision((Ze=(Le=S.meteo)==null?void 0:Le.wind)==null?void 0:Ze.kts,1)),1),e.createElementVNode("td",null,e.toDisplayString(a.roundPrecision((me=(v=(r=S.meteo)==null?void 0:r.wave)==null?void 0:v.wd)==null?void 0:me.height,1)),1),e.createElementVNode("td",null,[(se=(Fe=(h=S.meteo)==null?void 0:h.wave)==null?void 0:Fe.swell)!=null&&se.height?(e.openBlock(),e.createElementBlock("span",JD,e.toDisplayString((Je=(He=(Pe=S.meteo)==null?void 0:Pe.wave)==null?void 0:He.swell)==null?void 0:Je.direction),1)):(e.openBlock(),e.createElementBlock("span",_D,"-"))]),e.createElementVNode("td",null,e.toDisplayString(a.roundPrecision((qe=(ue=(Ke=S.meteo)==null?void 0:Ke.wave)==null?void 0:ue.swell)==null?void 0:qe.height,1)),1),e.createElementVNode("td",null,e.toDisplayString(a.roundPrecision((et=(ve=($e=S.meteo)==null?void 0:$e.wave)==null?void 0:ve.swell)==null?void 0:et.period,1)),1),e.createElementVNode("td",null,[(at=(nt=(ot=S.meteo)==null?void 0:ot.wave)==null?void 0:nt.sig)!=null&&at.height?(e.openBlock(),e.createElementBlock("span",XD,e.toDisplayString((dt=(st=(it=S.meteo)==null?void 0:it.wave)==null?void 0:st.sig)==null?void 0:dt.direction),1)):(e.openBlock(),e.createElementBlock("span",KD,"-"))]),e.createElementVNode("td",null,e.toDisplayString(a.roundPrecision((Nt=(ct=(rt=S.meteo)==null?void 0:rt.wave)==null?void 0:ct.sig)==null?void 0:Nt.height,1)),1),e.createElementVNode("td",null,e.toDisplayString(a.roundPrecision((gt=(Mt=(Dt=S.meteo)==null?void 0:Dt.wave)==null?void 0:Mt.sig)==null?void 0:gt.period,1)),1),e.createElementVNode("td",null,[(Et=(mt=S.meteo)==null?void 0:mt.current)!=null&&Et.kts?(e.openBlock(),e.createElementBlock("span",uD,e.toDisplayString((It=(yt=S.meteo)==null?void 0:yt.current)==null?void 0:It.direction),1)):(e.openBlock(),e.createElementBlock("span",qD,"-"))]),e.createElementVNode("td",null,e.toDisplayString(a.roundPrecision((pt=(At=S.meteo)==null?void 0:At.current)==null?void 0:pt.kts,1)),1),e.createElementVNode("td",null,e.toDisplayString(a.roundPrecision(S.cFactor,1)),1)],2)}),128))])])):e.createCommentVNode("",!0)])]),t[29]||(t[29]=e.createElementVNode("div",{class:"section"},[e.createElementVNode("div",{class:"section-body footer"},[e.createElementVNode("div",null,[e.createTextVNode("Fleet Insight Limited "),e.createElementVNode("a",{href:"mailto:ops@fltins.com"},"ops@fltins.com")]),e.createElementVNode("div",{style:{"font-size":"11px","margin-top":"10px"}}," The waypoints and route map provided are intended for informational purposes only and should not be relied upon for actual navigation. Fleet Insight Limited assumes no liability for any direct/potential damage to vessels or cargo that may occur as a result of using this voyage plan for exact navigation. ")])],-1))])}const Ms=Re(hN,[["render",$D],["__scopeId","data-v-e08bd687"]]),vD={install(o){o.component("RouteReport",rs),o.component("FliPlanReport",Ms),o.component("OrmPlanReport",rs)}},eM={install(o){o.component("IdmEditor",vl)}},tM={install(o){o.component("IdmLat",wn)}},lM={install(o){o.component("IdmLng",On)}},oM={name:"PiLogo",props:{fill:{type:String,default:"#000000"}}},nM={class:"logo"},aM={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1280.000000 1280.000000"},iM=["fill"];function sM(o,t,l,d,i,a){return e.openBlock(),e.createElementBlock("i",nM,[(e.openBlock(),e.createElementBlock("svg",aM,[e.createElementVNode("g",{transform:"translate(0.000000,1280.000000) scale(0.100000,-0.100000)",fill:l.fill,"fill-opacity":.6,stroke:"none"},t[0]||(t[0]=[e.createElementVNode("path",{d:`M4225 11533 c-100 -6 -311 -23 -335 -27 -14 -3 -59 -10 -100 -16
2
2
  -408 -60 -813 -229 -1110 -465 -98 -77 -307 -287 -393 -395 -37 -47 -74 -93
3
3
  -82 -102 -7 -9 -22 -29 -32 -45 -9 -15 -20 -30 -23 -33 -16 -13 -139 -202
4
4
  -225 -345 -94 -157 -256 -467 -330 -635 -21 -47 -48 -108 -60 -136 -71 -158